From 245353c0810de8e967b93da58b58920c361b21ce Mon Sep 17 00:00:00 2001 From: James Pogran Date: Wed, 1 Nov 2017 11:55:47 -0400 Subject: [PATCH 01/10] (MODULES-5839) Remove all generated types This commit removes all the generated dsc types from the dsc module. --- lib/puppet/type/dsc_archive.rb | 187 --- lib/puppet/type/dsc_auditpolicycsv.rb | 103 -- lib/puppet/type/dsc_auditpolicyoption.rb | 108 -- lib/puppet/type/dsc_auditpolicysubcategory.rb | 125 -- lib/puppet/type/dsc_environment.rb | 135 -- lib/puppet/type/dsc_file.rb | 280 ---- lib/puppet/type/dsc_group.rb | 189 --- lib/puppet/type/dsc_log.rb | 82 - lib/puppet/type/dsc_officeonlineserverfarm.rb | 891 ---------- .../type/dsc_officeonlineserverinstall.rb | 105 -- .../type/dsc_officeonlineservermachine.rb | 123 -- lib/puppet/type/dsc_package.rb | 295 ---- lib/puppet/type/dsc_registry.rb | 189 --- lib/puppet/type/dsc_runbookdirectory.rb | 157 -- lib/puppet/type/dsc_script.rb | 149 -- lib/puppet/type/dsc_securitysetting.rb | 462 ------ lib/puppet/type/dsc_securitytemplate.rb | 103 -- lib/puppet/type/dsc_service.rb | 252 --- lib/puppet/type/dsc_smavariable.rb | 186 --- lib/puppet/type/dsc_spaccessserviceapp.rb | 151 -- lib/puppet/type/dsc_spaccessservices2010.rb | 136 -- lib/puppet/type/dsc_spalternateurl.rb | 156 -- lib/puppet/type/dsc_spantivirussettings.rb | 186 --- lib/puppet/type/dsc_spappcatalog.rb | 101 -- lib/puppet/type/dsc_spappdomain.rb | 116 -- .../type/dsc_spappmanagementserviceapp.rb | 181 -- lib/puppet/type/dsc_spappstoresettings.rb | 133 -- lib/puppet/type/dsc_spbcsserviceapp.rb | 166 -- lib/puppet/type/dsc_spblobcachesettings.rb | 203 --- lib/puppet/type/dsc_spcacheaccounts.rb | 147 -- lib/puppet/type/dsc_spconfigwizard.rb | 149 -- lib/puppet/type/dsc_spcontentdatabase.rb | 203 --- lib/puppet/type/dsc_spcreatefarm.rb | 219 --- lib/puppet/type/dsc_spdatabaseaag.rb | 151 -- lib/puppet/type/dsc_spdesignersettings.rb | 231 --- .../type/dsc_spdiagnosticloggingsettings.rb | 389 ----- .../type/dsc_spdistributedcacheservice.rb | 188 --- lib/puppet/type/dsc_spexcelserviceapp.rb | 463 ------ lib/puppet/type/dsc_spfarm.rb | 253 --- lib/puppet/type/dsc_spfarmadministrators.rb | 155 -- lib/puppet/type/dsc_spfarmpropertybag.rb | 136 -- lib/puppet/type/dsc_spfarmsolution.rb | 203 --- lib/puppet/type/dsc_spfeature.rb | 171 -- .../type/dsc_sphealthanalyzerrulestate.rb | 169 -- lib/puppet/type/dsc_spinstall.rb | 150 -- lib/puppet/type/dsc_spinstalllanguagepack.rb | 164 -- lib/puppet/type/dsc_spinstallprereqs.rb | 376 ----- lib/puppet/type/dsc_spirmsettings.rb | 137 -- lib/puppet/type/dsc_spjoinfarm.rb | 152 -- .../dsc_spmachinetranslationserviceapp.rb | 166 -- lib/puppet/type/dsc_spmanagedaccount.rb | 188 --- .../type/dsc_spmanagedmetadataserviceapp.rb | 214 --- lib/puppet/type/dsc_spmanagedpath.rb | 170 -- .../type/dsc_spofficeonlineserverbinding.rb | 139 -- .../type/dsc_spoutgoingemailsettings.rb | 195 --- .../type/dsc_sppasswordchangesettings.rb | 155 -- .../type/dsc_spperformancepointserviceapp.rb | 181 -- .../dsc_sppowerpointautomationserviceapp.rb | 241 --- lib/puppet/type/dsc_spproductupdate.rb | 180 -- .../type/dsc_sppublishserviceapplication.rb | 121 -- lib/puppet/type/dsc_spquotatemplate.rb | 193 --- lib/puppet/type/dsc_spremotefarmtrust.rb | 151 -- .../type/dsc_spsearchauthoritativepage.rb | 171 -- lib/puppet/type/dsc_spsearchcontentsource.rb | 345 ---- .../type/dsc_spsearchcrawlerimpactrule.rb | 189 --- lib/puppet/type/dsc_spsearchcrawlmapping.rb | 153 -- lib/puppet/type/dsc_spsearchcrawlrule.rb | 231 --- lib/puppet/type/dsc_spsearchfiletype.rb | 184 --- lib/puppet/type/dsc_spsearchindexpartition.rb | 154 -- lib/puppet/type/dsc_spsearchresultsource.rb | 184 --- lib/puppet/type/dsc_spsearchserviceapp.rb | 244 --- lib/puppet/type/dsc_spsearchtopology.rb | 224 --- .../type/dsc_spsecurestoreserviceapp.rb | 296 ---- lib/puppet/type/dsc_spserviceapppool.rb | 136 -- lib/puppet/type/dsc_spserviceappproxygroup.rb | 175 -- lib/puppet/type/dsc_spserviceappsecurity.rb | 218 --- lib/puppet/type/dsc_spserviceinstance.rb | 121 -- lib/puppet/type/dsc_spsessionstateservice.rb | 156 -- lib/puppet/type/dsc_spshelladmins.rb | 222 --- lib/puppet/type/dsc_spsite.rb | 287 ---- lib/puppet/type/dsc_spstateserviceapp.rb | 167 -- .../dsc_spsubscriptionsettingsserviceapp.rb | 166 -- lib/puppet/type/dsc_sptimerjobstate.rb | 147 -- .../type/dsc_sptrustedidentitytokenissuer.rb | 292 ---- lib/puppet/type/dsc_sptrustedrootauthority.rb | 136 -- lib/puppet/type/dsc_spusageapplication.rb | 251 --- lib/puppet/type/dsc_spuserprofileproperty.rb | 458 ------ lib/puppet/type/dsc_spuserprofilesection.rb | 169 -- .../type/dsc_spuserprofileserviceapp.rb | 304 ---- .../dsc_spuserprofileserviceapppermissions.rb | 155 -- .../type/dsc_spuserprofilesyncconnection.rb | 248 --- .../type/dsc_spuserprofilesyncservice.rb | 153 -- lib/puppet/type/dsc_spvisioserviceapp.rb | 151 -- lib/puppet/type/dsc_spweb.rb | 248 --- .../type/dsc_spwebappblockedfiletypes.rb | 155 -- .../type/dsc_spwebappgeneralsettings.rb | 419 ----- lib/puppet/type/dsc_spwebapplication.rb | 306 ---- .../type/dsc_spwebapplicationappdomain.rb | 167 -- .../type/dsc_spwebapplicationextension.rb | 281 ---- lib/puppet/type/dsc_spwebapppermissions.rb | 201 --- lib/puppet/type/dsc_spwebapppolicy.rb | 224 --- lib/puppet/type/dsc_spwebappproxygroup.rb | 116 -- .../type/dsc_spwebappsiteuseanddeletion.rb | 169 -- .../type/dsc_spwebappthrottlingsettings.rb | 316 ---- .../type/dsc_spwebappworkflowsettings.rb | 149 -- .../type/dsc_spwordautomationserviceapp.rb | 406 ----- .../type/dsc_spworkmanagementserviceapp.rb | 259 --- lib/puppet/type/dsc_systemlocale.rb | 103 -- lib/puppet/type/dsc_user.rb | 214 --- lib/puppet/type/dsc_userrightsassignment.rb | 142 -- lib/puppet/type/dsc_windowsfeature.rb | 181 -- lib/puppet/type/dsc_windowsoptionalfeature.rb | 235 --- lib/puppet/type/dsc_windowsprocess.rb | 287 ---- lib/puppet/type/dsc_xadcomputer.rb | 320 ---- .../type/dsc_xadcscertificationauthority.rb | 423 ----- lib/puppet/type/dsc_xadcsonlineresponder.rb | 124 -- lib/puppet/type/dsc_xadcswebenrollment.rb | 139 -- lib/puppet/type/dsc_xaddomain.rb | 208 --- lib/puppet/type/dsc_xaddomaincontroller.rb | 177 -- .../dsc_xaddomaindefaultpasswordpolicy.rb | 274 ---- lib/puppet/type/dsc_xaddomaintrust.rb | 174 -- lib/puppet/type/dsc_xadgroup.rb | 319 ---- lib/puppet/type/dsc_xadorganizationalunit.rb | 169 -- lib/puppet/type/dsc_xadrecyclebin.rb | 131 -- lib/puppet/type/dsc_xaduser.rb | 775 --------- lib/puppet/type/dsc_xarchive.rb | 188 --- lib/puppet/type/dsc_xazureaffinitygroup.rb | 150 -- lib/puppet/type/dsc_xazurepackadmin.rb | 169 -- .../type/dsc_xazurepackdatabasesetting.rb | 184 --- lib/puppet/type/dsc_xazurepackfqdn.rb | 183 --- .../type/dsc_xazurepackidentityprovider.rb | 183 --- lib/puppet/type/dsc_xazurepackrelyingparty.rb | 185 --- .../type/dsc_xazurepackresourceprovider.rb | 638 ------- lib/puppet/type/dsc_xazurepacksetup.rb | 231 --- lib/puppet/type/dsc_xazurepackupdate.rb | 134 -- lib/puppet/type/dsc_xazurequickvm.rb | 227 --- lib/puppet/type/dsc_xazureservice.rb | 150 -- lib/puppet/type/dsc_xazuresqldatabase.rb | 214 --- ...dsc_xazuresqldatabaseserverfirewallrule.rb | 182 -- lib/puppet/type/dsc_xazurestorageaccount.rb | 165 -- lib/puppet/type/dsc_xazuresubscription.rb | 120 -- lib/puppet/type/dsc_xazurevm.rb | 258 --- .../type/dsc_xazurevmdscconfiguration.rb | 180 -- lib/puppet/type/dsc_xazurevmdscextension.rb | 312 ---- lib/puppet/type/dsc_xblautobitlocker.rb | 395 ----- lib/puppet/type/dsc_xblbitlocker.rb | 390 ----- lib/puppet/type/dsc_xbltpm.rb | 133 -- lib/puppet/type/dsc_xcertificateexport.rb | 332 ---- lib/puppet/type/dsc_xcertificateimport.rb | 157 -- lib/puppet/type/dsc_xcertreq.rb | 332 ---- lib/puppet/type/dsc_xcluster.rb | 116 -- lib/puppet/type/dsc_xclusterdisk.rb | 120 -- lib/puppet/type/dsc_xclusternetwork.rb | 150 -- lib/puppet/type/dsc_xclusterpreferredowner.rb | 158 -- lib/puppet/type/dsc_xclusterquorum.rb | 121 -- lib/puppet/type/dsc_xcomputer.rb | 177 -- lib/puppet/type/dsc_xcredssp.rb | 142 -- lib/puppet/type/dsc_xdatabase.rb | 214 --- lib/puppet/type/dsc_xdatabaselogin.rb | 169 -- lib/puppet/type/dsc_xdatabaseserver.rb | 88 - lib/puppet/type/dsc_xdbpackage.rb | 167 -- lib/puppet/type/dsc_xdefaultgatewayaddress.rb | 120 -- lib/puppet/type/dsc_xdfsnamespacefolder.rb | 238 --- lib/puppet/type/dsc_xdfsnamespaceroot.rb | 304 ---- .../dsc_xdfsnamespaceserverconfiguration.rb | 140 -- lib/puppet/type/dsc_xdfsreplicationgroup.rb | 207 --- .../dsc_xdfsreplicationgroupconnection.rb | 205 --- .../type/dsc_xdfsreplicationgroupfolder.rb | 183 --- .../dsc_xdfsreplicationgroupmembership.rb | 211 --- lib/puppet/type/dsc_xdhcpclient.rb | 123 -- .../type/dsc_xdhcpserverauthorization.rb | 120 -- lib/puppet/type/dsc_xdhcpserverclass.rb | 179 -- lib/puppet/type/dsc_xdhcpserveroption.rb | 174 -- lib/puppet/type/dsc_xdhcpserverreservation.rb | 170 -- lib/puppet/type/dsc_xdhcpserverscope.rb | 218 --- lib/puppet/type/dsc_xdisk.rb | 219 --- lib/puppet/type/dsc_xdiskaccesspath.rb | 187 --- lib/puppet/type/dsc_xdismfeature.rb | 120 -- lib/puppet/type/dsc_xdnsarecord.rb | 137 -- .../type/dsc_xdnsclientglobalsetting.rb | 140 -- lib/puppet/type/dsc_xdnsconnectionsuffix.rb | 152 -- lib/puppet/type/dsc_xdnsrecord.rb | 157 -- lib/puppet/type/dsc_xdnsserveraddress.rb | 139 -- lib/puppet/type/dsc_xdnsserveradzone.rb | 187 --- lib/puppet/type/dsc_xdnsserverforwarder.rb | 106 -- lib/puppet/type/dsc_xdnsserverprimaryzone.rb | 138 -- .../type/dsc_xdnsserversecondaryzone.rb | 138 -- lib/puppet/type/dsc_xdnsserverzonetransfer.rb | 121 -- lib/puppet/type/dsc_xdscwebservice.rb | 306 ---- lib/puppet/type/dsc_xenvironment.rb | 164 -- .../dsc_xexchactivesyncvirtualdirectory.rb | 313 ---- .../type/dsc_xexchantimalwarescanning.rb | 118 -- .../dsc_xexchautodiscovervirtualdirectory.rb | 196 --- lib/puppet/type/dsc_xexchautomountpoint.rb | 264 --- .../type/dsc_xexchclientaccessserver.rb | 197 --- .../dsc_xexchdatabaseavailabilitygroup.rb | 497 ------ ...sc_xexchdatabaseavailabilitygroupmember.rb | 147 -- ...c_xexchdatabaseavailabilitygroupnetwork.rb | 201 --- .../type/dsc_xexchecpvirtualdirectory.rb | 260 --- lib/puppet/type/dsc_xexcheventloglevel.rb | 119 -- .../type/dsc_xexchexchangecertificate.rb | 201 --- lib/puppet/type/dsc_xexchexchangeserver.rb | 208 --- lib/puppet/type/dsc_xexchimapsettings.rb | 183 --- lib/puppet/type/dsc_xexchinstall.rb | 118 -- lib/puppet/type/dsc_xexchjetstress.rb | 154 -- lib/puppet/type/dsc_xexchjetstresscleanup.rb | 183 --- lib/puppet/type/dsc_xexchmailboxdatabase.rb | 552 ------- .../type/dsc_xexchmailboxdatabasecopy.rb | 226 --- lib/puppet/type/dsc_xexchmailboxserver.rb | 853 ---------- .../type/dsc_xexchmailboxtransportservice.rb | 456 ------ lib/puppet/type/dsc_xexchmaintenancemode.rb | 182 -- .../type/dsc_xexchmapivirtualdirectory.rb | 180 -- .../type/dsc_xexchoabvirtualdirectory.rb | 300 ---- lib/puppet/type/dsc_xexchoutlookanywhere.rb | 318 ---- .../type/dsc_xexchowavirtualdirectory.rb | 405 ----- lib/puppet/type/dsc_xexchpopsettings.rb | 183 --- .../dsc_xexchpowershellvirtualdirectory.rb | 226 --- lib/puppet/type/dsc_xexchreceiveconnector.rb | 950 ----------- lib/puppet/type/dsc_xexchtransportservice.rb | 1459 ----------------- .../type/dsc_xexchumcallroutersettings.rb | 134 -- lib/puppet/type/dsc_xexchumservice.rb | 152 -- lib/puppet/type/dsc_xexchwaitforadprep.rb | 209 --- lib/puppet/type/dsc_xexchwaitfordag.rb | 152 -- .../type/dsc_xexchwaitformailboxdatabase.rb | 167 -- .../dsc_xexchwebservicesvirtualdirectory.rb | 273 --- lib/puppet/type/dsc_xfirewall.rb | 621 ------- lib/puppet/type/dsc_xfirewallprofile.rb | 391 ----- lib/puppet/type/dsc_xgroup.rb | 190 --- lib/puppet/type/dsc_xhostsfile.rb | 120 -- lib/puppet/type/dsc_xhotfix.rb | 151 -- lib/puppet/type/dsc_xiisfeaturedelegation.rb | 105 -- lib/puppet/type/dsc_xiishandler.rb | 105 -- lib/puppet/type/dsc_xiislogging.rb | 180 -- lib/puppet/type/dsc_xiismimetypemapping.rb | 122 -- lib/puppet/type/dsc_xiismodule.rb | 202 --- .../type/dsc_xinternetexplorerhomepage.rb | 120 -- lib/puppet/type/dsc_xipaddress.rb | 123 -- lib/puppet/type/dsc_xjeaendpoint.rb | 172 -- lib/puppet/type/dsc_xjeatoolkit.rb | 156 -- lib/puppet/type/dsc_xmicrosoftupdate.rb | 90 - lib/puppet/type/dsc_xmountimage.rb | 156 -- lib/puppet/type/dsc_xmppreference.rb | 981 ----------- lib/puppet/type/dsc_xmsipackage.rb | 368 ----- lib/puppet/type/dsc_xmysqldatabase.rb | 136 -- lib/puppet/type/dsc_xmysqlgrant.rb | 173 -- lib/puppet/type/dsc_xmysqlserver.rb | 136 -- lib/puppet/type/dsc_xmysqluser.rb | 152 -- lib/puppet/type/dsc_xnetadapterbinding.rb | 138 -- lib/puppet/type/dsc_xnetadapterlso.rb | 119 -- lib/puppet/type/dsc_xnetadaptername.rb | 245 --- lib/puppet/type/dsc_xnetadapterrdma.rb | 101 -- lib/puppet/type/dsc_xnetbios.rb | 103 -- lib/puppet/type/dsc_xnetconnectionprofile.rb | 139 -- lib/puppet/type/dsc_xnetworkteam.rb | 159 -- lib/puppet/type/dsc_xnetworkteaminterface.rb | 138 -- lib/puppet/type/dsc_xofflinedomainjoin.rb | 103 -- lib/puppet/type/dsc_xpackage.rb | 469 ------ lib/puppet/type/dsc_xpendingreboot.rb | 245 --- lib/puppet/type/dsc_xpfximport.rb | 189 --- lib/puppet/type/dsc_xpowerplan.rb | 103 -- .../type/dsc_xpowershellexecutionpolicy.rb | 88 - lib/puppet/type/dsc_xpsendpoint.rb | 169 -- lib/puppet/type/dsc_xrdremoteapp.rb | 260 --- lib/puppet/type/dsc_xrdsessioncollection.rb | 132 -- .../dsc_xrdsessioncollectionconfiguration.rb | 373 ----- lib/puppet/type/dsc_xrdsessiondeployment.rb | 119 -- lib/puppet/type/dsc_xregistry.rb | 190 --- lib/puppet/type/dsc_xremotedesktopadmin.rb | 108 -- lib/puppet/type/dsc_xremotefile.rb | 231 --- lib/puppet/type/dsc_xrobocopy.rb | 285 ---- lib/puppet/type/dsc_xroute.rb | 210 --- lib/puppet/type/dsc_xscdpmconsolesetup.rb | 136 -- .../type/dsc_xscdpmdatabaseserversetup.rb | 136 -- lib/puppet/type/dsc_xscdpmserversetup.rb | 288 ---- lib/puppet/type/dsc_xscheduledtask.rb | 698 -------- lib/puppet/type/dsc_xscomadmin.rb | 138 -- lib/puppet/type/dsc_xscomconsolesetup.rb | 223 --- lib/puppet/type/dsc_xscomconsoleupdate.rb | 151 -- lib/puppet/type/dsc_xscommanagementpack.rb | 176 -- .../type/dsc_xscommanagementserversetup.rb | 507 ------ .../type/dsc_xscommanagementserverupdate.rb | 151 -- .../type/dsc_xscomreportingserversetup.rb | 284 ---- .../type/dsc_xscomwebconsoleserversetup.rb | 287 ---- .../type/dsc_xscomwebconsoleserverupdate.rb | 151 -- lib/puppet/type/dsc_xscript.rb | 150 -- lib/puppet/type/dsc_xscsmapowershellsetup.rb | 136 -- .../dsc_xscsmarunbookworkerserversetup.rb | 287 ---- .../type/dsc_xscsmawebserviceserversetup.rb | 414 ----- lib/puppet/type/dsc_xscspfserver.rb | 139 -- lib/puppet/type/dsc_xscspfserversetup.rb | 447 ----- lib/puppet/type/dsc_xscspfserverupdate.rb | 151 -- lib/puppet/type/dsc_xscspfsetting.rb | 171 -- lib/puppet/type/dsc_xscspfstamp.rb | 139 -- lib/puppet/type/dsc_xscsrserversetup.rb | 307 ---- lib/puppet/type/dsc_xscsrserverupdate.rb | 151 -- lib/puppet/type/dsc_xscvmmadmin.rb | 138 -- lib/puppet/type/dsc_xscvmmconsolesetup.rb | 187 --- lib/puppet/type/dsc_xscvmmconsoleupdate.rb | 151 -- .../type/dsc_xscvmmmanagementserversetup.rb | 604 ------- .../type/dsc_xscvmmmanagementserverupdate.rb | 151 -- lib/puppet/type/dsc_xservice.rb | 290 ---- lib/puppet/type/dsc_xsmacredential.rb | 164 -- lib/puppet/type/dsc_xsmbshare.rb | 319 ---- lib/puppet/type/dsc_xsqlalias.rb | 171 -- lib/puppet/type/dsc_xsqlaogroupensure.rb | 294 ---- lib/puppet/type/dsc_xsqlaogroupjoin.rb | 153 -- lib/puppet/type/dsc_xsqlhaendpoint.rb | 135 -- lib/puppet/type/dsc_xsqlhagroup.rb | 195 --- lib/puppet/type/dsc_xsqlhaservice.rb | 117 -- lib/puppet/type/dsc_xsqlserveralias.rb | 189 --- ...dsc_xsqlserveralwaysonavailabilitygroup.rb | 312 ---- ...lserveralwaysonavailabilitygroupreplica.rb | 337 ---- .../type/dsc_xsqlserveralwaysonservice.rb | 140 -- ...dsc_xsqlserveravailabilitygrouplistener.rb | 204 --- .../type/dsc_xsqlserverconfiguration.rb | 171 -- lib/puppet/type/dsc_xsqlserverdatabase.rb | 139 -- .../type/dsc_xsqlserverdatabaseowner.rb | 130 -- .../type/dsc_xsqlserverdatabasepermission.rb | 194 --- .../dsc_xsqlserverdatabaserecoverymodel.rb | 137 -- lib/puppet/type/dsc_xsqlserverdatabaserole.rb | 174 -- lib/puppet/type/dsc_xsqlserverendpoint.rb | 170 -- .../type/dsc_xsqlserverendpointpermission.rb | 170 -- .../type/dsc_xsqlserverendpointstate.rb | 135 -- .../dsc_xsqlserverfailoverclustersetup.rb | 795 --------- lib/puppet/type/dsc_xsqlserverfirewall.rb | 233 --- lib/puppet/type/dsc_xsqlserverinstall.rb | 313 ---- lib/puppet/type/dsc_xsqlserverlogin.rb | 221 --- lib/puppet/type/dsc_xsqlservermaxdop.rb | 154 -- lib/puppet/type/dsc_xsqlservermemory.rb | 172 -- lib/puppet/type/dsc_xsqlservernetwork.rb | 168 -- lib/puppet/type/dsc_xsqlserverpermission.rb | 163 -- lib/puppet/type/dsc_xsqlserverreplication.rb | 216 --- lib/puppet/type/dsc_xsqlserverrole.rb | 193 --- lib/puppet/type/dsc_xsqlserverrsconfig.rb | 147 -- .../dsc_xsqlserverrssecureconnectionlevel.rb | 121 -- lib/puppet/type/dsc_xsqlserverscript.rb | 188 --- lib/puppet/type/dsc_xsqlserversetup.rb | 846 ---------- lib/puppet/type/dsc_xsslsettings.rb | 133 -- lib/puppet/type/dsc_xsystemrestore.rb | 108 -- lib/puppet/type/dsc_xsystemrestorepoint.rb | 123 -- lib/puppet/type/dsc_xtimezone.rb | 103 -- lib/puppet/type/dsc_xuser.rb | 215 --- lib/puppet/type/dsc_xvhd.rb | 240 --- lib/puppet/type/dsc_xvhdfile.rb | 154 -- lib/puppet/type/dsc_xvirtualmemory.rb | 141 -- lib/puppet/type/dsc_xvmdvddrive.rb | 160 -- lib/puppet/type/dsc_xvmhost.rb | 331 ---- lib/puppet/type/dsc_xvmhyperv.rb | 488 ------ lib/puppet/type/dsc_xvmnetworkadapter.rb | 181 -- lib/puppet/type/dsc_xvmprocessor.rb | 288 ---- lib/puppet/type/dsc_xvmswitch.rb | 223 --- lib/puppet/type/dsc_xwaitforaddomain.rb | 155 -- .../type/dsc_xwaitforavailabilitygroup.rb | 121 -- .../type/dsc_xwaitforcertificateservices.rb | 138 -- lib/puppet/type/dsc_xwaitforcluster.rb | 121 -- lib/puppet/type/dsc_xwaitfordisk.rb | 139 -- lib/puppet/type/dsc_xwaitforsqlhagroup.rb | 183 --- lib/puppet/type/dsc_xwaitforvolume.rb | 121 -- lib/puppet/type/dsc_xwebapplication.rb | 315 ---- lib/puppet/type/dsc_xwebapppool.rb | 911 ---------- lib/puppet/type/dsc_xwebapppooldefaults.rb | 124 -- lib/puppet/type/dsc_xwebconfigkeyvalue.rb | 173 -- lib/puppet/type/dsc_xwebpackagedeploy.rb | 120 -- lib/puppet/type/dsc_xwebsite.rb | 454 ----- lib/puppet/type/dsc_xwebsitedefaults.rb | 169 -- lib/puppet/type/dsc_xwebvirtualdirectory.rb | 154 -- lib/puppet/type/dsc_xwefcollector.rb | 105 -- lib/puppet/type/dsc_xwefsubscription.rb | 411 ----- lib/puppet/type/dsc_xwindowsfeature.rb | 167 -- .../type/dsc_xwindowsoptionalfeature.rb | 218 --- lib/puppet/type/dsc_xwindowspackagecab.rb | 135 -- lib/puppet/type/dsc_xwindowsprocess.rb | 306 ---- lib/puppet/type/dsc_xwindowsupdateagent.rb | 217 --- lib/puppet/type/dsc_xwineventlog.rb | 167 -- lib/puppet/type/dsc_xwordpresssite.rb | 151 -- 375 files changed, 82549 deletions(-) delete mode 100644 lib/puppet/type/dsc_archive.rb delete mode 100644 lib/puppet/type/dsc_auditpolicycsv.rb delete mode 100644 lib/puppet/type/dsc_auditpolicyoption.rb delete mode 100644 lib/puppet/type/dsc_auditpolicysubcategory.rb delete mode 100644 lib/puppet/type/dsc_environment.rb delete mode 100644 lib/puppet/type/dsc_file.rb delete mode 100644 lib/puppet/type/dsc_group.rb delete mode 100644 lib/puppet/type/dsc_log.rb delete mode 100644 lib/puppet/type/dsc_officeonlineserverfarm.rb delete mode 100644 lib/puppet/type/dsc_officeonlineserverinstall.rb delete mode 100644 lib/puppet/type/dsc_officeonlineservermachine.rb delete mode 100644 lib/puppet/type/dsc_package.rb delete mode 100644 lib/puppet/type/dsc_registry.rb delete mode 100644 lib/puppet/type/dsc_runbookdirectory.rb delete mode 100644 lib/puppet/type/dsc_script.rb delete mode 100644 lib/puppet/type/dsc_securitysetting.rb delete mode 100644 lib/puppet/type/dsc_securitytemplate.rb delete mode 100644 lib/puppet/type/dsc_service.rb delete mode 100644 lib/puppet/type/dsc_smavariable.rb delete mode 100644 lib/puppet/type/dsc_spaccessserviceapp.rb delete mode 100644 lib/puppet/type/dsc_spaccessservices2010.rb delete mode 100644 lib/puppet/type/dsc_spalternateurl.rb delete mode 100644 lib/puppet/type/dsc_spantivirussettings.rb delete mode 100644 lib/puppet/type/dsc_spappcatalog.rb delete mode 100644 lib/puppet/type/dsc_spappdomain.rb delete mode 100644 lib/puppet/type/dsc_spappmanagementserviceapp.rb delete mode 100644 lib/puppet/type/dsc_spappstoresettings.rb delete mode 100644 lib/puppet/type/dsc_spbcsserviceapp.rb delete mode 100644 lib/puppet/type/dsc_spblobcachesettings.rb delete mode 100644 lib/puppet/type/dsc_spcacheaccounts.rb delete mode 100644 lib/puppet/type/dsc_spconfigwizard.rb delete mode 100644 lib/puppet/type/dsc_spcontentdatabase.rb delete mode 100644 lib/puppet/type/dsc_spcreatefarm.rb delete mode 100644 lib/puppet/type/dsc_spdatabaseaag.rb delete mode 100644 lib/puppet/type/dsc_spdesignersettings.rb delete mode 100644 lib/puppet/type/dsc_spdiagnosticloggingsettings.rb delete mode 100644 lib/puppet/type/dsc_spdistributedcacheservice.rb delete mode 100644 lib/puppet/type/dsc_spexcelserviceapp.rb delete mode 100644 lib/puppet/type/dsc_spfarm.rb delete mode 100644 lib/puppet/type/dsc_spfarmadministrators.rb delete mode 100644 lib/puppet/type/dsc_spfarmpropertybag.rb delete mode 100644 lib/puppet/type/dsc_spfarmsolution.rb delete mode 100644 lib/puppet/type/dsc_spfeature.rb delete mode 100644 lib/puppet/type/dsc_sphealthanalyzerrulestate.rb delete mode 100644 lib/puppet/type/dsc_spinstall.rb delete mode 100644 lib/puppet/type/dsc_spinstalllanguagepack.rb delete mode 100644 lib/puppet/type/dsc_spinstallprereqs.rb delete mode 100644 lib/puppet/type/dsc_spirmsettings.rb delete mode 100644 lib/puppet/type/dsc_spjoinfarm.rb delete mode 100644 lib/puppet/type/dsc_spmachinetranslationserviceapp.rb delete mode 100644 lib/puppet/type/dsc_spmanagedaccount.rb delete mode 100644 lib/puppet/type/dsc_spmanagedmetadataserviceapp.rb delete mode 100644 lib/puppet/type/dsc_spmanagedpath.rb delete mode 100644 lib/puppet/type/dsc_spofficeonlineserverbinding.rb delete mode 100644 lib/puppet/type/dsc_spoutgoingemailsettings.rb delete mode 100644 lib/puppet/type/dsc_sppasswordchangesettings.rb delete mode 100644 lib/puppet/type/dsc_spperformancepointserviceapp.rb delete mode 100644 lib/puppet/type/dsc_sppowerpointautomationserviceapp.rb delete mode 100644 lib/puppet/type/dsc_spproductupdate.rb delete mode 100644 lib/puppet/type/dsc_sppublishserviceapplication.rb delete mode 100644 lib/puppet/type/dsc_spquotatemplate.rb delete mode 100644 lib/puppet/type/dsc_spremotefarmtrust.rb delete mode 100644 lib/puppet/type/dsc_spsearchauthoritativepage.rb delete mode 100644 lib/puppet/type/dsc_spsearchcontentsource.rb delete mode 100644 lib/puppet/type/dsc_spsearchcrawlerimpactrule.rb delete mode 100644 lib/puppet/type/dsc_spsearchcrawlmapping.rb delete mode 100644 lib/puppet/type/dsc_spsearchcrawlrule.rb delete mode 100644 lib/puppet/type/dsc_spsearchfiletype.rb delete mode 100644 lib/puppet/type/dsc_spsearchindexpartition.rb delete mode 100644 lib/puppet/type/dsc_spsearchresultsource.rb delete mode 100644 lib/puppet/type/dsc_spsearchserviceapp.rb delete mode 100644 lib/puppet/type/dsc_spsearchtopology.rb delete mode 100644 lib/puppet/type/dsc_spsecurestoreserviceapp.rb delete mode 100644 lib/puppet/type/dsc_spserviceapppool.rb delete mode 100644 lib/puppet/type/dsc_spserviceappproxygroup.rb delete mode 100644 lib/puppet/type/dsc_spserviceappsecurity.rb delete mode 100644 lib/puppet/type/dsc_spserviceinstance.rb delete mode 100644 lib/puppet/type/dsc_spsessionstateservice.rb delete mode 100644 lib/puppet/type/dsc_spshelladmins.rb delete mode 100644 lib/puppet/type/dsc_spsite.rb delete mode 100644 lib/puppet/type/dsc_spstateserviceapp.rb delete mode 100644 lib/puppet/type/dsc_spsubscriptionsettingsserviceapp.rb delete mode 100644 lib/puppet/type/dsc_sptimerjobstate.rb delete mode 100644 lib/puppet/type/dsc_sptrustedidentitytokenissuer.rb delete mode 100644 lib/puppet/type/dsc_sptrustedrootauthority.rb delete mode 100644 lib/puppet/type/dsc_spusageapplication.rb delete mode 100644 lib/puppet/type/dsc_spuserprofileproperty.rb delete mode 100644 lib/puppet/type/dsc_spuserprofilesection.rb delete mode 100644 lib/puppet/type/dsc_spuserprofileserviceapp.rb delete mode 100644 lib/puppet/type/dsc_spuserprofileserviceapppermissions.rb delete mode 100644 lib/puppet/type/dsc_spuserprofilesyncconnection.rb delete mode 100644 lib/puppet/type/dsc_spuserprofilesyncservice.rb delete mode 100644 lib/puppet/type/dsc_spvisioserviceapp.rb delete mode 100644 lib/puppet/type/dsc_spweb.rb delete mode 100644 lib/puppet/type/dsc_spwebappblockedfiletypes.rb delete mode 100644 lib/puppet/type/dsc_spwebappgeneralsettings.rb delete mode 100644 lib/puppet/type/dsc_spwebapplication.rb delete mode 100644 lib/puppet/type/dsc_spwebapplicationappdomain.rb delete mode 100644 lib/puppet/type/dsc_spwebapplicationextension.rb delete mode 100644 lib/puppet/type/dsc_spwebapppermissions.rb delete mode 100644 lib/puppet/type/dsc_spwebapppolicy.rb delete mode 100644 lib/puppet/type/dsc_spwebappproxygroup.rb delete mode 100644 lib/puppet/type/dsc_spwebappsiteuseanddeletion.rb delete mode 100644 lib/puppet/type/dsc_spwebappthrottlingsettings.rb delete mode 100644 lib/puppet/type/dsc_spwebappworkflowsettings.rb delete mode 100644 lib/puppet/type/dsc_spwordautomationserviceapp.rb delete mode 100644 lib/puppet/type/dsc_spworkmanagementserviceapp.rb delete mode 100644 lib/puppet/type/dsc_systemlocale.rb delete mode 100644 lib/puppet/type/dsc_user.rb delete mode 100644 lib/puppet/type/dsc_userrightsassignment.rb delete mode 100644 lib/puppet/type/dsc_windowsfeature.rb delete mode 100644 lib/puppet/type/dsc_windowsoptionalfeature.rb delete mode 100644 lib/puppet/type/dsc_windowsprocess.rb delete mode 100644 lib/puppet/type/dsc_xadcomputer.rb delete mode 100644 lib/puppet/type/dsc_xadcscertificationauthority.rb delete mode 100644 lib/puppet/type/dsc_xadcsonlineresponder.rb delete mode 100644 lib/puppet/type/dsc_xadcswebenrollment.rb delete mode 100644 lib/puppet/type/dsc_xaddomain.rb delete mode 100644 lib/puppet/type/dsc_xaddomaincontroller.rb delete mode 100644 lib/puppet/type/dsc_xaddomaindefaultpasswordpolicy.rb delete mode 100644 lib/puppet/type/dsc_xaddomaintrust.rb delete mode 100644 lib/puppet/type/dsc_xadgroup.rb delete mode 100644 lib/puppet/type/dsc_xadorganizationalunit.rb delete mode 100644 lib/puppet/type/dsc_xadrecyclebin.rb delete mode 100644 lib/puppet/type/dsc_xaduser.rb delete mode 100644 lib/puppet/type/dsc_xarchive.rb delete mode 100644 lib/puppet/type/dsc_xazureaffinitygroup.rb delete mode 100644 lib/puppet/type/dsc_xazurepackadmin.rb delete mode 100644 lib/puppet/type/dsc_xazurepackdatabasesetting.rb delete mode 100644 lib/puppet/type/dsc_xazurepackfqdn.rb delete mode 100644 lib/puppet/type/dsc_xazurepackidentityprovider.rb delete mode 100644 lib/puppet/type/dsc_xazurepackrelyingparty.rb delete mode 100644 lib/puppet/type/dsc_xazurepackresourceprovider.rb delete mode 100644 lib/puppet/type/dsc_xazurepacksetup.rb delete mode 100644 lib/puppet/type/dsc_xazurepackupdate.rb delete mode 100644 lib/puppet/type/dsc_xazurequickvm.rb delete mode 100644 lib/puppet/type/dsc_xazureservice.rb delete mode 100644 lib/puppet/type/dsc_xazuresqldatabase.rb delete mode 100644 lib/puppet/type/dsc_xazuresqldatabaseserverfirewallrule.rb delete mode 100644 lib/puppet/type/dsc_xazurestorageaccount.rb delete mode 100644 lib/puppet/type/dsc_xazuresubscription.rb delete mode 100644 lib/puppet/type/dsc_xazurevm.rb delete mode 100644 lib/puppet/type/dsc_xazurevmdscconfiguration.rb delete mode 100644 lib/puppet/type/dsc_xazurevmdscextension.rb delete mode 100644 lib/puppet/type/dsc_xblautobitlocker.rb delete mode 100644 lib/puppet/type/dsc_xblbitlocker.rb delete mode 100644 lib/puppet/type/dsc_xbltpm.rb delete mode 100644 lib/puppet/type/dsc_xcertificateexport.rb delete mode 100644 lib/puppet/type/dsc_xcertificateimport.rb delete mode 100644 lib/puppet/type/dsc_xcertreq.rb delete mode 100644 lib/puppet/type/dsc_xcluster.rb delete mode 100644 lib/puppet/type/dsc_xclusterdisk.rb delete mode 100644 lib/puppet/type/dsc_xclusternetwork.rb delete mode 100644 lib/puppet/type/dsc_xclusterpreferredowner.rb delete mode 100644 lib/puppet/type/dsc_xclusterquorum.rb delete mode 100644 lib/puppet/type/dsc_xcomputer.rb delete mode 100644 lib/puppet/type/dsc_xcredssp.rb delete mode 100644 lib/puppet/type/dsc_xdatabase.rb delete mode 100644 lib/puppet/type/dsc_xdatabaselogin.rb delete mode 100644 lib/puppet/type/dsc_xdatabaseserver.rb delete mode 100644 lib/puppet/type/dsc_xdbpackage.rb delete mode 100644 lib/puppet/type/dsc_xdefaultgatewayaddress.rb delete mode 100644 lib/puppet/type/dsc_xdfsnamespacefolder.rb delete mode 100644 lib/puppet/type/dsc_xdfsnamespaceroot.rb delete mode 100644 lib/puppet/type/dsc_xdfsnamespaceserverconfiguration.rb delete mode 100644 lib/puppet/type/dsc_xdfsreplicationgroup.rb delete mode 100644 lib/puppet/type/dsc_xdfsreplicationgroupconnection.rb delete mode 100644 lib/puppet/type/dsc_xdfsreplicationgroupfolder.rb delete mode 100644 lib/puppet/type/dsc_xdfsreplicationgroupmembership.rb delete mode 100644 lib/puppet/type/dsc_xdhcpclient.rb delete mode 100644 lib/puppet/type/dsc_xdhcpserverauthorization.rb delete mode 100644 lib/puppet/type/dsc_xdhcpserverclass.rb delete mode 100644 lib/puppet/type/dsc_xdhcpserveroption.rb delete mode 100644 lib/puppet/type/dsc_xdhcpserverreservation.rb delete mode 100644 lib/puppet/type/dsc_xdhcpserverscope.rb delete mode 100644 lib/puppet/type/dsc_xdisk.rb delete mode 100644 lib/puppet/type/dsc_xdiskaccesspath.rb delete mode 100644 lib/puppet/type/dsc_xdismfeature.rb delete mode 100644 lib/puppet/type/dsc_xdnsarecord.rb delete mode 100644 lib/puppet/type/dsc_xdnsclientglobalsetting.rb delete mode 100644 lib/puppet/type/dsc_xdnsconnectionsuffix.rb delete mode 100644 lib/puppet/type/dsc_xdnsrecord.rb delete mode 100644 lib/puppet/type/dsc_xdnsserveraddress.rb delete mode 100644 lib/puppet/type/dsc_xdnsserveradzone.rb delete mode 100644 lib/puppet/type/dsc_xdnsserverforwarder.rb delete mode 100644 lib/puppet/type/dsc_xdnsserverprimaryzone.rb delete mode 100644 lib/puppet/type/dsc_xdnsserversecondaryzone.rb delete mode 100644 lib/puppet/type/dsc_xdnsserverzonetransfer.rb delete mode 100644 lib/puppet/type/dsc_xdscwebservice.rb delete mode 100644 lib/puppet/type/dsc_xenvironment.rb delete mode 100644 lib/puppet/type/dsc_xexchactivesyncvirtualdirectory.rb delete mode 100644 lib/puppet/type/dsc_xexchantimalwarescanning.rb delete mode 100644 lib/puppet/type/dsc_xexchautodiscovervirtualdirectory.rb delete mode 100644 lib/puppet/type/dsc_xexchautomountpoint.rb delete mode 100644 lib/puppet/type/dsc_xexchclientaccessserver.rb delete mode 100644 lib/puppet/type/dsc_xexchdatabaseavailabilitygroup.rb delete mode 100644 lib/puppet/type/dsc_xexchdatabaseavailabilitygroupmember.rb delete mode 100644 lib/puppet/type/dsc_xexchdatabaseavailabilitygroupnetwork.rb delete mode 100644 lib/puppet/type/dsc_xexchecpvirtualdirectory.rb delete mode 100644 lib/puppet/type/dsc_xexcheventloglevel.rb delete mode 100644 lib/puppet/type/dsc_xexchexchangecertificate.rb delete mode 100644 lib/puppet/type/dsc_xexchexchangeserver.rb delete mode 100644 lib/puppet/type/dsc_xexchimapsettings.rb delete mode 100644 lib/puppet/type/dsc_xexchinstall.rb delete mode 100644 lib/puppet/type/dsc_xexchjetstress.rb delete mode 100644 lib/puppet/type/dsc_xexchjetstresscleanup.rb delete mode 100644 lib/puppet/type/dsc_xexchmailboxdatabase.rb delete mode 100644 lib/puppet/type/dsc_xexchmailboxdatabasecopy.rb delete mode 100644 lib/puppet/type/dsc_xexchmailboxserver.rb delete mode 100644 lib/puppet/type/dsc_xexchmailboxtransportservice.rb delete mode 100644 lib/puppet/type/dsc_xexchmaintenancemode.rb delete mode 100644 lib/puppet/type/dsc_xexchmapivirtualdirectory.rb delete mode 100644 lib/puppet/type/dsc_xexchoabvirtualdirectory.rb delete mode 100644 lib/puppet/type/dsc_xexchoutlookanywhere.rb delete mode 100644 lib/puppet/type/dsc_xexchowavirtualdirectory.rb delete mode 100644 lib/puppet/type/dsc_xexchpopsettings.rb delete mode 100644 lib/puppet/type/dsc_xexchpowershellvirtualdirectory.rb delete mode 100644 lib/puppet/type/dsc_xexchreceiveconnector.rb delete mode 100644 lib/puppet/type/dsc_xexchtransportservice.rb delete mode 100644 lib/puppet/type/dsc_xexchumcallroutersettings.rb delete mode 100644 lib/puppet/type/dsc_xexchumservice.rb delete mode 100644 lib/puppet/type/dsc_xexchwaitforadprep.rb delete mode 100644 lib/puppet/type/dsc_xexchwaitfordag.rb delete mode 100644 lib/puppet/type/dsc_xexchwaitformailboxdatabase.rb delete mode 100644 lib/puppet/type/dsc_xexchwebservicesvirtualdirectory.rb delete mode 100644 lib/puppet/type/dsc_xfirewall.rb delete mode 100644 lib/puppet/type/dsc_xfirewallprofile.rb delete mode 100644 lib/puppet/type/dsc_xgroup.rb delete mode 100644 lib/puppet/type/dsc_xhostsfile.rb delete mode 100644 lib/puppet/type/dsc_xhotfix.rb delete mode 100644 lib/puppet/type/dsc_xiisfeaturedelegation.rb delete mode 100644 lib/puppet/type/dsc_xiishandler.rb delete mode 100644 lib/puppet/type/dsc_xiislogging.rb delete mode 100644 lib/puppet/type/dsc_xiismimetypemapping.rb delete mode 100644 lib/puppet/type/dsc_xiismodule.rb delete mode 100644 lib/puppet/type/dsc_xinternetexplorerhomepage.rb delete mode 100644 lib/puppet/type/dsc_xipaddress.rb delete mode 100644 lib/puppet/type/dsc_xjeaendpoint.rb delete mode 100644 lib/puppet/type/dsc_xjeatoolkit.rb delete mode 100644 lib/puppet/type/dsc_xmicrosoftupdate.rb delete mode 100644 lib/puppet/type/dsc_xmountimage.rb delete mode 100644 lib/puppet/type/dsc_xmppreference.rb delete mode 100644 lib/puppet/type/dsc_xmsipackage.rb delete mode 100644 lib/puppet/type/dsc_xmysqldatabase.rb delete mode 100644 lib/puppet/type/dsc_xmysqlgrant.rb delete mode 100644 lib/puppet/type/dsc_xmysqlserver.rb delete mode 100644 lib/puppet/type/dsc_xmysqluser.rb delete mode 100644 lib/puppet/type/dsc_xnetadapterbinding.rb delete mode 100644 lib/puppet/type/dsc_xnetadapterlso.rb delete mode 100644 lib/puppet/type/dsc_xnetadaptername.rb delete mode 100644 lib/puppet/type/dsc_xnetadapterrdma.rb delete mode 100644 lib/puppet/type/dsc_xnetbios.rb delete mode 100644 lib/puppet/type/dsc_xnetconnectionprofile.rb delete mode 100644 lib/puppet/type/dsc_xnetworkteam.rb delete mode 100644 lib/puppet/type/dsc_xnetworkteaminterface.rb delete mode 100644 lib/puppet/type/dsc_xofflinedomainjoin.rb delete mode 100644 lib/puppet/type/dsc_xpackage.rb delete mode 100644 lib/puppet/type/dsc_xpendingreboot.rb delete mode 100644 lib/puppet/type/dsc_xpfximport.rb delete mode 100644 lib/puppet/type/dsc_xpowerplan.rb delete mode 100644 lib/puppet/type/dsc_xpowershellexecutionpolicy.rb delete mode 100644 lib/puppet/type/dsc_xpsendpoint.rb delete mode 100644 lib/puppet/type/dsc_xrdremoteapp.rb delete mode 100644 lib/puppet/type/dsc_xrdsessioncollection.rb delete mode 100644 lib/puppet/type/dsc_xrdsessioncollectionconfiguration.rb delete mode 100644 lib/puppet/type/dsc_xrdsessiondeployment.rb delete mode 100644 lib/puppet/type/dsc_xregistry.rb delete mode 100644 lib/puppet/type/dsc_xremotedesktopadmin.rb delete mode 100644 lib/puppet/type/dsc_xremotefile.rb delete mode 100644 lib/puppet/type/dsc_xrobocopy.rb delete mode 100644 lib/puppet/type/dsc_xroute.rb delete mode 100644 lib/puppet/type/dsc_xscdpmconsolesetup.rb delete mode 100644 lib/puppet/type/dsc_xscdpmdatabaseserversetup.rb delete mode 100644 lib/puppet/type/dsc_xscdpmserversetup.rb delete mode 100644 lib/puppet/type/dsc_xscheduledtask.rb delete mode 100644 lib/puppet/type/dsc_xscomadmin.rb delete mode 100644 lib/puppet/type/dsc_xscomconsolesetup.rb delete mode 100644 lib/puppet/type/dsc_xscomconsoleupdate.rb delete mode 100644 lib/puppet/type/dsc_xscommanagementpack.rb delete mode 100644 lib/puppet/type/dsc_xscommanagementserversetup.rb delete mode 100644 lib/puppet/type/dsc_xscommanagementserverupdate.rb delete mode 100644 lib/puppet/type/dsc_xscomreportingserversetup.rb delete mode 100644 lib/puppet/type/dsc_xscomwebconsoleserversetup.rb delete mode 100644 lib/puppet/type/dsc_xscomwebconsoleserverupdate.rb delete mode 100644 lib/puppet/type/dsc_xscript.rb delete mode 100644 lib/puppet/type/dsc_xscsmapowershellsetup.rb delete mode 100644 lib/puppet/type/dsc_xscsmarunbookworkerserversetup.rb delete mode 100644 lib/puppet/type/dsc_xscsmawebserviceserversetup.rb delete mode 100644 lib/puppet/type/dsc_xscspfserver.rb delete mode 100644 lib/puppet/type/dsc_xscspfserversetup.rb delete mode 100644 lib/puppet/type/dsc_xscspfserverupdate.rb delete mode 100644 lib/puppet/type/dsc_xscspfsetting.rb delete mode 100644 lib/puppet/type/dsc_xscspfstamp.rb delete mode 100644 lib/puppet/type/dsc_xscsrserversetup.rb delete mode 100644 lib/puppet/type/dsc_xscsrserverupdate.rb delete mode 100644 lib/puppet/type/dsc_xscvmmadmin.rb delete mode 100644 lib/puppet/type/dsc_xscvmmconsolesetup.rb delete mode 100644 lib/puppet/type/dsc_xscvmmconsoleupdate.rb delete mode 100644 lib/puppet/type/dsc_xscvmmmanagementserversetup.rb delete mode 100644 lib/puppet/type/dsc_xscvmmmanagementserverupdate.rb delete mode 100644 lib/puppet/type/dsc_xservice.rb delete mode 100644 lib/puppet/type/dsc_xsmacredential.rb delete mode 100644 lib/puppet/type/dsc_xsmbshare.rb delete mode 100644 lib/puppet/type/dsc_xsqlalias.rb delete mode 100644 lib/puppet/type/dsc_xsqlaogroupensure.rb delete mode 100644 lib/puppet/type/dsc_xsqlaogroupjoin.rb delete mode 100644 lib/puppet/type/dsc_xsqlhaendpoint.rb delete mode 100644 lib/puppet/type/dsc_xsqlhagroup.rb delete mode 100644 lib/puppet/type/dsc_xsqlhaservice.rb delete mode 100644 lib/puppet/type/dsc_xsqlserveralias.rb delete mode 100644 lib/puppet/type/dsc_xsqlserveralwaysonavailabilitygroup.rb delete mode 100644 lib/puppet/type/dsc_xsqlserveralwaysonavailabilitygroupreplica.rb delete mode 100644 lib/puppet/type/dsc_xsqlserveralwaysonservice.rb delete mode 100644 lib/puppet/type/dsc_xsqlserveravailabilitygrouplistener.rb delete mode 100644 lib/puppet/type/dsc_xsqlserverconfiguration.rb delete mode 100644 lib/puppet/type/dsc_xsqlserverdatabase.rb delete mode 100644 lib/puppet/type/dsc_xsqlserverdatabaseowner.rb delete mode 100644 lib/puppet/type/dsc_xsqlserverdatabasepermission.rb delete mode 100644 lib/puppet/type/dsc_xsqlserverdatabaserecoverymodel.rb delete mode 100644 lib/puppet/type/dsc_xsqlserverdatabaserole.rb delete mode 100644 lib/puppet/type/dsc_xsqlserverendpoint.rb delete mode 100644 lib/puppet/type/dsc_xsqlserverendpointpermission.rb delete mode 100644 lib/puppet/type/dsc_xsqlserverendpointstate.rb delete mode 100644 lib/puppet/type/dsc_xsqlserverfailoverclustersetup.rb delete mode 100644 lib/puppet/type/dsc_xsqlserverfirewall.rb delete mode 100644 lib/puppet/type/dsc_xsqlserverinstall.rb delete mode 100644 lib/puppet/type/dsc_xsqlserverlogin.rb delete mode 100644 lib/puppet/type/dsc_xsqlservermaxdop.rb delete mode 100644 lib/puppet/type/dsc_xsqlservermemory.rb delete mode 100644 lib/puppet/type/dsc_xsqlservernetwork.rb delete mode 100644 lib/puppet/type/dsc_xsqlserverpermission.rb delete mode 100644 lib/puppet/type/dsc_xsqlserverreplication.rb delete mode 100644 lib/puppet/type/dsc_xsqlserverrole.rb delete mode 100644 lib/puppet/type/dsc_xsqlserverrsconfig.rb delete mode 100644 lib/puppet/type/dsc_xsqlserverrssecureconnectionlevel.rb delete mode 100644 lib/puppet/type/dsc_xsqlserverscript.rb delete mode 100644 lib/puppet/type/dsc_xsqlserversetup.rb delete mode 100644 lib/puppet/type/dsc_xsslsettings.rb delete mode 100644 lib/puppet/type/dsc_xsystemrestore.rb delete mode 100644 lib/puppet/type/dsc_xsystemrestorepoint.rb delete mode 100644 lib/puppet/type/dsc_xtimezone.rb delete mode 100644 lib/puppet/type/dsc_xuser.rb delete mode 100644 lib/puppet/type/dsc_xvhd.rb delete mode 100644 lib/puppet/type/dsc_xvhdfile.rb delete mode 100644 lib/puppet/type/dsc_xvirtualmemory.rb delete mode 100644 lib/puppet/type/dsc_xvmdvddrive.rb delete mode 100644 lib/puppet/type/dsc_xvmhost.rb delete mode 100644 lib/puppet/type/dsc_xvmhyperv.rb delete mode 100644 lib/puppet/type/dsc_xvmnetworkadapter.rb delete mode 100644 lib/puppet/type/dsc_xvmprocessor.rb delete mode 100644 lib/puppet/type/dsc_xvmswitch.rb delete mode 100644 lib/puppet/type/dsc_xwaitforaddomain.rb delete mode 100644 lib/puppet/type/dsc_xwaitforavailabilitygroup.rb delete mode 100644 lib/puppet/type/dsc_xwaitforcertificateservices.rb delete mode 100644 lib/puppet/type/dsc_xwaitforcluster.rb delete mode 100644 lib/puppet/type/dsc_xwaitfordisk.rb delete mode 100644 lib/puppet/type/dsc_xwaitforsqlhagroup.rb delete mode 100644 lib/puppet/type/dsc_xwaitforvolume.rb delete mode 100644 lib/puppet/type/dsc_xwebapplication.rb delete mode 100644 lib/puppet/type/dsc_xwebapppool.rb delete mode 100644 lib/puppet/type/dsc_xwebapppooldefaults.rb delete mode 100644 lib/puppet/type/dsc_xwebconfigkeyvalue.rb delete mode 100644 lib/puppet/type/dsc_xwebpackagedeploy.rb delete mode 100644 lib/puppet/type/dsc_xwebsite.rb delete mode 100644 lib/puppet/type/dsc_xwebsitedefaults.rb delete mode 100644 lib/puppet/type/dsc_xwebvirtualdirectory.rb delete mode 100644 lib/puppet/type/dsc_xwefcollector.rb delete mode 100644 lib/puppet/type/dsc_xwefsubscription.rb delete mode 100644 lib/puppet/type/dsc_xwindowsfeature.rb delete mode 100644 lib/puppet/type/dsc_xwindowsoptionalfeature.rb delete mode 100644 lib/puppet/type/dsc_xwindowspackagecab.rb delete mode 100644 lib/puppet/type/dsc_xwindowsprocess.rb delete mode 100644 lib/puppet/type/dsc_xwindowsupdateagent.rb delete mode 100644 lib/puppet/type/dsc_xwineventlog.rb delete mode 100644 lib/puppet/type/dsc_xwordpresssite.rb diff --git a/lib/puppet/type/dsc_archive.rb b/lib/puppet/type/dsc_archive.rb deleted file mode 100644 index d03c5e7b..00000000 --- a/lib/puppet/type/dsc_archive.rb +++ /dev/null @@ -1,187 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_archive) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC Archive resource type. - Automatically generated from - 'PSDesiredStateConfiguration/DSCResources/MSFT_ArchiveResource/MSFT_ArchiveResource.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_path is a required attribute') if self[:dsc_path].nil? - fail('dsc_destination is a required attribute') if self[:dsc_destination].nil? - end - - def dscmeta_resource_friendly_name; 'Archive' end - def dscmeta_resource_name; 'MSFT_ArchiveResource' end - def dscmeta_module_name; 'PSDesiredStateConfiguration' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Path - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Destination - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_destination) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Destination" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Validate - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_validate) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Validate" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Checksum - # Type: string - # IsMandatory: False - # Values: ["SHA-1", "SHA-256", "SHA-512", "CreatedDate", "ModifiedDate"] - newparam(:dsc_checksum) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Checksum - Valid values are SHA-1, SHA-256, SHA-512, CreatedDate, ModifiedDate." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['SHA-1', 'sha-1', 'SHA-256', 'sha-256', 'SHA-512', 'sha-512', 'CreatedDate', 'createddate', 'ModifiedDate', 'modifieddate'].include?(value) - fail("Invalid value '#{value}'. Valid values are SHA-1, SHA-256, SHA-512, CreatedDate, ModifiedDate") - end - end - end - - # Name: Force - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_force) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Force" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_archive).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_auditpolicycsv.rb b/lib/puppet/type/dsc_auditpolicycsv.rb deleted file mode 100644 index c81344f4..00000000 --- a/lib/puppet/type/dsc_auditpolicycsv.rb +++ /dev/null @@ -1,103 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_auditpolicycsv) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC AuditPolicyCsv resource type. - Automatically generated from - 'AuditPolicyDsc/DSCResources/MSFT_AuditPolicyCsv/MSFT_AuditPolicyCsv.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_issingleinstance is a required attribute') if self[:dsc_issingleinstance].nil? - end - - def dscmeta_resource_friendly_name; 'AuditPolicyCsv' end - def dscmeta_resource_name; 'MSFT_AuditPolicyCsv' end - def dscmeta_module_name; 'AuditPolicyDsc' end - def dscmeta_module_version; '1.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: IsSingleInstance - # Type: string - # IsMandatory: True - # Values: ["Yes"] - newparam(:dsc_issingleinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes' Valid values are Yes." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Yes', 'yes'].include?(value) - fail("Invalid value '#{value}'. Valid values are Yes") - end - end - end - - # Name: CsvPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_csvpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CsvPath - Path to a CSV backup of Auditing settings" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_auditpolicycsv).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_auditpolicyoption.rb b/lib/puppet/type/dsc_auditpolicyoption.rb deleted file mode 100644 index e03629dc..00000000 --- a/lib/puppet/type/dsc_auditpolicyoption.rb +++ /dev/null @@ -1,108 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_auditpolicyoption) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC AuditPolicyOption resource type. - Automatically generated from - 'AuditPolicyDsc/DSCResources/MSFT_AuditPolicyOption/MSFT_AuditPolicyOption.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - fail('dsc_value is a required attribute') if self[:dsc_value].nil? - end - - def dscmeta_resource_friendly_name; 'AuditPolicyOption' end - def dscmeta_resource_name; 'MSFT_AuditPolicyOption' end - def dscmeta_module_name; 'AuditPolicyDsc' end - def dscmeta_module_version; '1.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: ["CrashOnAuditFail", "FullPrivilegeAuditing", "AuditBaseObjects", "AuditBaseDirectories"] - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the audit policy option to set. Valid values are CrashOnAuditFail, FullPrivilegeAuditing, AuditBaseObjects, AuditBaseDirectories." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['CrashOnAuditFail', 'crashonauditfail', 'FullPrivilegeAuditing', 'fullprivilegeauditing', 'AuditBaseObjects', 'auditbaseobjects', 'AuditBaseDirectories', 'auditbasedirectories'].include?(value) - fail("Invalid value '#{value}'. Valid values are CrashOnAuditFail, FullPrivilegeAuditing, AuditBaseObjects, AuditBaseDirectories") - end - end - end - - # Name: Value - # Type: string - # IsMandatory: True - # Values: ["Enabled", "Disabled"] - newparam(:dsc_value) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Value - The value to set the audit policy option to. Valid values are Enabled, Disabled." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Enabled', 'enabled', 'Disabled', 'disabled'].include?(value) - fail("Invalid value '#{value}'. Valid values are Enabled, Disabled") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_auditpolicyoption).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_auditpolicysubcategory.rb b/lib/puppet/type/dsc_auditpolicysubcategory.rb deleted file mode 100644 index b56d8e9b..00000000 --- a/lib/puppet/type/dsc_auditpolicysubcategory.rb +++ /dev/null @@ -1,125 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_auditpolicysubcategory) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC AuditPolicySubcategory resource type. - Automatically generated from - 'AuditPolicyDsc/DSCResources/MSFT_AuditPolicySubcategory/MSFT_AuditPolicySubcategory.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - fail('dsc_auditflag is a required attribute') if self[:dsc_auditflag].nil? - end - - def dscmeta_resource_friendly_name; 'AuditPolicySubcategory' end - def dscmeta_resource_name; 'MSFT_AuditPolicySubcategory' end - def dscmeta_module_name; 'AuditPolicyDsc' end - def dscmeta_module_version; '1.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the Subcategory to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AuditFlag - # Type: string - # IsMandatory: True - # Values: ["Success", "Failure"] - newparam(:dsc_auditflag) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AuditFlag - The audit flag to be configured. Valid values are Success, Failure." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Success', 'success', 'Failure', 'failure'].include?(value) - fail("Invalid value '#{value}'. Valid values are Success, Failure") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether the flag should be enabled or disabled. To enable the flag, set this property to Present. To disable the flag, set this property to Absent. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_auditpolicysubcategory).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_environment.rb b/lib/puppet/type/dsc_environment.rb deleted file mode 100644 index 862f058e..00000000 --- a/lib/puppet/type/dsc_environment.rb +++ /dev/null @@ -1,135 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_environment) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC Environment resource type. - Automatically generated from - 'PSDesiredStateConfiguration/DSCResources/MSFT_EnvironmentResource/MSFT_EnvironmentResource.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'Environment' end - def dscmeta_resource_name; 'MSFT_EnvironmentResource' end - def dscmeta_module_name; 'PSDesiredStateConfiguration' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Value - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_value) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Value" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Path - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_path) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Path" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_environment).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_file.rb b/lib/puppet/type/dsc_file.rb deleted file mode 100644 index 70fcda25..00000000 --- a/lib/puppet/type/dsc_file.rb +++ /dev/null @@ -1,280 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_file) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC File resource type. - Automatically generated from - 'PSDesiredStateConfiguration/DSCResources/MSFT_FileDirectoryConfiguration/MSFT_FileDirectoryConfiguration.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_destinationpath is a required attribute') if self[:dsc_destinationpath].nil? - end - - def dscmeta_resource_friendly_name; 'File' end - def dscmeta_resource_name; 'MSFT_FileDirectoryConfiguration' end - def dscmeta_module_name; 'PSDesiredStateConfiguration' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: DestinationPath - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_destinationpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DestinationPath" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Type - # Type: string - # IsMandatory: False - # Values: ["File", "Directory"] - newparam(:dsc_type) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Type - Valid values are File, Directory." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['File', 'file', 'Directory', 'directory'].include?(value) - fail("Invalid value '#{value}'. Valid values are File, Directory") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Contents - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_contents) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Contents" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Checksum - # Type: string - # IsMandatory: False - # Values: ["SHA-1", "SHA-256", "SHA-512", "CreatedDate", "ModifiedDate"] - newparam(:dsc_checksum) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Checksum - Valid values are SHA-1, SHA-256, SHA-512, CreatedDate, ModifiedDate." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['SHA-1', 'sha-1', 'SHA-256', 'sha-256', 'SHA-512', 'sha-512', 'CreatedDate', 'createddate', 'ModifiedDate', 'modifieddate'].include?(value) - fail("Invalid value '#{value}'. Valid values are SHA-1, SHA-256, SHA-512, CreatedDate, ModifiedDate") - end - end - end - - # Name: Recurse - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_recurse) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Recurse" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Force - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_force) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Force" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Attributes - # Type: string[] - # IsMandatory: False - # Values: ["ReadOnly", "Hidden", "System", "Archive"] - newparam(:dsc_attributes, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Attributes - Valid values are ReadOnly, Hidden, System, Archive." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - if value.kind_of?(Array) - unless (['ReadOnly', 'readonly', 'Hidden', 'hidden', 'System', 'system', 'Archive', 'archive'] & value).count == value.count - fail("Invalid value #{value}. Valid values are ReadOnly, Hidden, System, Archive") - end - end - if value.kind_of?(String) - unless ['ReadOnly', 'readonly', 'Hidden', 'hidden', 'System', 'system', 'Archive', 'archive'].include?(value) - fail("Invalid value #{value}. Valid values are ReadOnly, Hidden, System, Archive") - end - end - end - munge do |value| - Array(value) - end - end - - # Name: DependsOn - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_dependson, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "DependsOn" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: MatchSource - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_matchsource) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "MatchSource" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_file).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_group.rb b/lib/puppet/type/dsc_group.rb deleted file mode 100644 index 15f10caa..00000000 --- a/lib/puppet/type/dsc_group.rb +++ /dev/null @@ -1,189 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_group) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC Group resource type. - Automatically generated from - 'PSDesiredStateConfiguration/DSCResources/MSFT_GroupResource/MSFT_GroupResource.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_groupname is a required attribute') if self[:dsc_groupname].nil? - end - - def dscmeta_resource_friendly_name; 'Group' end - def dscmeta_resource_name; 'MSFT_GroupResource' end - def dscmeta_module_name; 'PSDesiredStateConfiguration' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: GroupName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_groupname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "GroupName" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Members - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_members, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Members" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: MembersToInclude - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_memberstoinclude, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "MembersToInclude" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: MembersToExclude - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_memberstoexclude, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "MembersToExclude" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_group).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_log.rb b/lib/puppet/type/dsc_log.rb deleted file mode 100644 index eed8e831..00000000 --- a/lib/puppet/type/dsc_log.rb +++ /dev/null @@ -1,82 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_log) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC Log resource type. - Automatically generated from - 'PSDesiredStateConfiguration/DSCResources/MSFT_LogResource/MSFT_LogResource.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - end - - def dscmeta_resource_friendly_name; 'Log' end - def dscmeta_resource_name; 'MSFT_LogResource' end - def dscmeta_module_name; 'PSDesiredStateConfiguration' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Message - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_message) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Message" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_log).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_officeonlineserverfarm.rb b/lib/puppet/type/dsc_officeonlineserverfarm.rb deleted file mode 100644 index 851c80c7..00000000 --- a/lib/puppet/type/dsc_officeonlineserverfarm.rb +++ /dev/null @@ -1,891 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_officeonlineserverfarm) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC OfficeOnlineServerFarm resource type. - Automatically generated from - 'OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerFarm/MSFT_OfficeOnlineServerFarm.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_internalurl is a required attribute') if self[:dsc_internalurl].nil? - end - - def dscmeta_resource_friendly_name; 'OfficeOnlineServerFarm' end - def dscmeta_resource_name; 'MSFT_OfficeOnlineServerFarm' end - def dscmeta_module_name; 'OfficeOnlineServerDsc' end - def dscmeta_module_version; '1.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AllowCEIP - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowceip) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowCEIP - Enables Customer Experience Improvement Program (CEIP) reporting on all servers in the Office Web Apps Server farm" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AllowHttp - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowhttp) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowHttp - Indicates that IIS sites should be provisioned on port 80 for HTTP access. Use AllowHTTP only in environments where all computers require IPSEC (full encryption) or in test environments that do not contain sensitive files." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AllowHttpSecureStoreConnections - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowhttpsecurestoreconnections) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowHttpSecureStoreConnections - Indicates that secure store connections can be made by using non-SSL connections (such as HTTP). The default is False." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: CacheLocation - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_cachelocation) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CacheLocation - Specifies the location of the global disk cache that is used to store rendered image files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CacheSizeInGB - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_cachesizeingb) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "CacheSizeInGB - Specifies the maximum size of the global disk cache in gigabytes." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: CertificateName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_certificatename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CertificateName - Specifies the friendly name of the certificate that Office Web Apps Server uses to create HTTPS bindings." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ClipartEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_clipartenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ClipartEnabled - Enables support for inserting clip art from Office.com into Office documents. This feature requires server-to-web communication, configured either directly or by using a proxy that you specify by using the Proxy parameter." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DocumentInfoCacheSize - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_documentinfocachesize) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "DocumentInfoCacheSize - Specifies the maximum number of document conversion records that are stored in a memory cache." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: EditingEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_editingenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "EditingEnabled - Enables support for editing in the browser. The default is False. Only set to True if you have the appropriate licensing to use the editing functionality." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ExcelAllowExternalData - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_excelallowexternaldata) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ExcelAllowExternalData - Enables the refresh of supported external data in Excel Web App workbooks where workbooks contain connections to external data. The default is True." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ExcelConnectionLifetime - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_excelconnectionlifetime) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "ExcelConnectionLifetime - Specifies the duration, in seconds, of external data connections for Excel Web App. The default is 1800 seconds." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ExcelExternalDataCacheLifetime - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_excelexternaldatacachelifetime) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "ExcelExternalDataCacheLifetime - Specifes the duration, in seconds, of the external data cache lifetime in Excel Web App. The default is 300 seconds." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ExcelPrivateBytesMax - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_excelprivatebytesmax) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "ExcelPrivateBytesMax - Specifies the maximum private bytes, in megabytes, used by Excel Web App. When set to -1, the maximum private bytes use 50 percent of physical memory on the computer." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ExcelRequestDurationMax - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_excelrequestdurationmax) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "ExcelRequestDurationMax - Specifies the maximum duration, in seconds, for a single request in a session. After this time elapses, the request times out." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ExcelSessionTimeout - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_excelsessiontimeout) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "ExcelSessionTimeout - Specifies the time, in seconds, that a session remains active in Excel Web App when there is no user activity." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ExcelUdfsAllowed - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_exceludfsallowed) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ExcelUdfsAllowed - Activates user-defined functions for use with Web Excel." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ExcelWarnOnDataRefresh - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_excelwarnondatarefresh) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ExcelWarnOnDataRefresh - Turns off or on the warning dialog displayed when data refreshes in Excel Web App." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ExcelWorkbookSizeMax - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_excelworkbooksizemax) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "ExcelWorkbookSizeMax - Specifies the maximum size, in megabytes, of a workbook that can be loaded." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ExcelMemoryCacheThreshold - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_excelmemorycachethreshold) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "ExcelMemoryCacheThreshold - The percentage of the Maximum Private Bytes that can be allocated to inactive objects. When the memory cache threshold is exceeded, cached objects that are not currently in use are released." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ExcelUnusedObjectAgeMax - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_excelunusedobjectagemax) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "ExcelUnusedObjectAgeMax - The maximum time (in minutes) that inactive objects remain in the memory cache. Inactive objects are objects that are not used in a session." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ExcelCachingUnusedFiles - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_excelcachingunusedfiles) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ExcelCachingUnusedFiles - Enable caching of files that are no longer in use by Web Excel sessions." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ExcelAbortOnRefreshOnOpenFail - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_excelabortonrefreshonopenfail) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ExcelAbortOnRefreshOnOpenFail - Specifies that the loading of a Web Excel file automatically fails if an automatic data refresh operation fails when the file is opened." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ExcelAutomaticVolatileFunctionCacheLifetime - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_excelautomaticvolatilefunctioncachelifetime) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "ExcelAutomaticVolatileFunctionCacheLifetime - Specifies the maximum time, in seconds, that a computed value for a volatile function is cached for automatic recalculations." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ExcelConcurrentDataRequestsPerSessionMax - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_excelconcurrentdatarequestspersessionmax) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "ExcelConcurrentDataRequestsPerSessionMax - Specifies the maximum number of concurrent external data requests allowed in each session. If a session must issue more than this number of requests, additional requests must be queued. The scope of this setting is the logical server." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ExcelDefaultWorkbookCalcMode - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_exceldefaultworkbookcalcmode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ExcelDefaultWorkbookCalcMode - Specifies the calculation mode of workbooks. Settings other than File override the workbook settings." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ExcelRestExternalDataEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_excelrestexternaldataenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ExcelRestExternalDataEnabled - Specifies whether requests from the Representational State Transfer (REST) Application Programming Interface (API) are permitted to refresh external data connections." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ExcelChartAndImageSizeMax - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_excelchartandimagesizemax) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "ExcelChartAndImageSizeMax - Specifies the maximum size, in megabytes, of a chart or image that can be opened." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ExternalURL - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_externalurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ExternalURL - Specifies the URL root that clients use to access the Office Web Apps Server farm from the Internet. In the case of a load-balanced, multiserver Office Web Apps Server farm, the external URL is bound to the IP address of the external-facing load balancer." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FarmOU - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_farmou) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FarmOU - Specifies the name of the Active Directory organizational unit (OU) that servers must be a member of to join the Office Web Apps Server farm. Use this parameter to prevent unauthorized servers (that is, servers that are not in the OU) from joining an Office Web Apps Server farm." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InternalURL - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_internalurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InternalURL - Specifies the URL root that clients use to access the Office Web Apps Server farm from the intranet." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LogLocation - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_loglocation) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogLocation - Specifies the location on the local computer where activity logs are stored." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LogRetentionInDays - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_logretentionindays) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "LogRetentionInDays - Specifies the number of days that log entries are stored. Log entries older than the configured date are trimmed." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: LogVerbosity - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logverbosity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogVerbosity - Specifies how much information is stored in the trace log files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MaxMemoryCacheSizeInMB - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maxmemorycachesizeinmb) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "MaxMemoryCacheSizeInMB - Specifies, in megabytes, the maximum amount of memory that the rendering cache can use." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaxTranslationCharacterCount - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maxtranslationcharactercount) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "MaxTranslationCharacterCount - Specifies the maximum amount of characters a document can have in order to be translated." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: OpenFromUncEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_openfromuncenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "OpenFromUncEnabled - Turns on or off the ability to use Online Viewers to view Office files from a UNC path." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: OpenFromUrlEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_openfromurlenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "OpenFromUrlEnabled - Turns on or off the ability to use Online Viewers to view Office files from a URL or UNC path." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: OpenFromUrlThrottlingEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_openfromurlthrottlingenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "OpenFromUrlThrottlingEnabled - Throttles the number of open from URL requests from any given server in a time period. The default throttling values, which are not configurable, make sure that an Office Web Apps Server farm will not overwhelm a single server with requests for content to be viewed in the Online Viewers." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Proxy - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_proxy) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Proxy - Specifies the URL of the proxy server that is configured to allow HTTP requests to external sites. Typically configured in conjunction with the ClipartEnabled and TranslationEnabled parameters." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RecycleActiveProcessCount - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_recycleactiveprocesscount) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "RecycleActiveProcessCount - Specifies the number of files that a single Word or PowerPoint process can render before the process is recycled." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RenderingLocalCacheLocation - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_renderinglocalcachelocation) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RenderingLocalCacheLocation - Specifies the location of the temporary cache for use by the Word and PowerPoint Viewing Services." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SSLOffloaded - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_ssloffloaded) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SSLOffloaded - Indicates to the servers in the Office Web Apps Server farm that SSL is offloaded to the load balancer. When SSLOffloaded is enabled, web applications are bound to port 80 (HTTP) on the local server. However, HTML that references other resources, such as CSS or images, uses HTTPS URLs for those references." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: TranslationEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_translationenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "TranslationEnabled - Enables support for automatic document translation using Microsoft Translator, an online service that translates text between languages. The translated file is shown in the Word Web App. Because Microsoft Translator is an online service, you must enable server-to-web communication directly or by using a proxy that you specify by using the Proxy parameter." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: TranslationServiceAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_translationserviceaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TranslationServiceAddress - Specifies the URL of the translation server that translation requests are sent to. The default is the Microsoft Translator online service. Typically you will not use this parameter unless you must change translation services." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TranslationServiceAppId - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_translationserviceappid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TranslationServiceAppId - Specifies the application ID for the translation service. The default is the public application ID for Office Web Apps. Typically you will not use this parameter unless you have negotiated with Microsoft Translator for additional services and they have provided you with a private application ID." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AllowOutboundHttp - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowoutboundhttp) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowOutboundHttp" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ExcelUseEffectiveUserName - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_exceluseeffectiveusername) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ExcelUseEffectiveUserName" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: S2SCertificateName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_s2scertificatename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "S2SCertificateName" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RemovePersonalInformationFromLogs - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_removepersonalinformationfromlogs) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RemovePersonalInformationFromLogs" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: PicturePasteDisabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_picturepastedisabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "PicturePasteDisabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_officeonlineserverfarm).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_officeonlineserverinstall.rb b/lib/puppet/type/dsc_officeonlineserverinstall.rb deleted file mode 100644 index 763a9b9f..00000000 --- a/lib/puppet/type/dsc_officeonlineserverinstall.rb +++ /dev/null @@ -1,105 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_officeonlineserverinstall) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC OfficeOnlineServerInstall resource type. - Automatically generated from - 'OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerInstall/MSFT_OfficeOnlineServerInstall.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'OfficeOnlineServerInstall' end - def dscmeta_resource_name; 'MSFT_OfficeOnlineServerInstall' end - def dscmeta_module_name; 'OfficeOnlineServerDsc' end - def dscmeta_module_version; '1.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Set to 'present' to specificy that the product should be installed. Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Path - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - Path to setup.exe" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_officeonlineserverinstall).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_officeonlineservermachine.rb b/lib/puppet/type/dsc_officeonlineservermachine.rb deleted file mode 100644 index fdfea6d3..00000000 --- a/lib/puppet/type/dsc_officeonlineservermachine.rb +++ /dev/null @@ -1,123 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_officeonlineservermachine) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC OfficeOnlineServerMachine resource type. - Automatically generated from - 'OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerMachine/MSFT_OfficeOnlineServerMachine.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_machinetojoin is a required attribute') if self[:dsc_machinetojoin].nil? - end - - def dscmeta_resource_friendly_name; 'OfficeOnlineServerMachine' end - def dscmeta_resource_name; 'MSFT_OfficeOnlineServerMachine' end - def dscmeta_module_name; 'OfficeOnlineServerDsc' end - def dscmeta_module_version; '1.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Ensure Present or Absent Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Roles - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_roles, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Roles - Specifies one or more server roles, separated by commas, to assign to the new server. If no roles are specified, then the server is assigned all roles." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: MachineToJoin - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_machinetojoin) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MachineToJoin - Specifies the name of any server that is already a member of the Office Web Apps Server farm." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_officeonlineservermachine).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_package.rb b/lib/puppet/type/dsc_package.rb deleted file mode 100644 index 167d2f6b..00000000 --- a/lib/puppet/type/dsc_package.rb +++ /dev/null @@ -1,295 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_package) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC Package resource type. - Automatically generated from - 'PSDesiredStateConfiguration/DSCResources/MSFT_PackageResource/MSFT_PackageResource.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - fail('dsc_productid is a required attribute') if self[:dsc_productid].nil? - end - - def dscmeta_resource_friendly_name; 'Package' end - def dscmeta_resource_name; 'MSFT_PackageResource' end - def dscmeta_module_name; 'PSDesiredStateConfiguration' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Path - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProductId - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_productid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProductId" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Arguments - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_arguments) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Arguments" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ReturnCode - # Type: uint32[] - # IsMandatory: False - # Values: None - newparam(:dsc_returncode, :array_matching => :all) do - def mof_type; 'uint32[]' end - def mof_is_embedded?; false end - desc "ReturnCode" - validate do |value| - unless value.kind_of?(Array) || (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value '#{value}'. Should be an integer or an array of integers") - end - end - munge do |value| - v = PuppetX::Dsc::TypeHelpers.munge_integer(value) - v.is_a?(Array) ? v : Array(v) - end - end - - # Name: LogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PackageDescription - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_packagedescription) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PackageDescription" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Publisher - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_publisher) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Publisher" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstalledOn - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_installedon) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstalledOn" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Size - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_size) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "Size" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Version - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_version) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Version" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Installed - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_installed) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Installed" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_package).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_registry.rb b/lib/puppet/type/dsc_registry.rb deleted file mode 100644 index 89cfb50d..00000000 --- a/lib/puppet/type/dsc_registry.rb +++ /dev/null @@ -1,189 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_registry) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC Registry resource type. - Automatically generated from - 'PSDesiredStateConfiguration/DSCResources/MSFT_RegistryResource/MSFT_RegistryResource.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_key is a required attribute') if self[:dsc_key].nil? - fail('dsc_valuename is a required attribute') if self[:dsc_valuename].nil? - end - - def dscmeta_resource_friendly_name; 'Registry' end - def dscmeta_resource_name; 'MSFT_RegistryResource' end - def dscmeta_module_name; 'PSDesiredStateConfiguration' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Key - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_key) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Key" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ValueName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_valuename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ValueName" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ValueData - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_valuedata, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ValueData" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ValueType - # Type: string - # IsMandatory: False - # Values: ["String", "Binary", "Dword", "Qword", "MultiString", "ExpandString"] - newparam(:dsc_valuetype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ValueType - Valid values are String, Binary, Dword, Qword, MultiString, ExpandString." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['String', 'string', 'Binary', 'binary', 'Dword', 'dword', 'Qword', 'qword', 'MultiString', 'multistring', 'ExpandString', 'expandstring'].include?(value) - fail("Invalid value '#{value}'. Valid values are String, Binary, Dword, Qword, MultiString, ExpandString") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Hex - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_hex) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Hex" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Force - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_force) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Force" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_registry).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_runbookdirectory.rb b/lib/puppet/type/dsc_runbookdirectory.rb deleted file mode 100644 index d305c58f..00000000 --- a/lib/puppet/type/dsc_runbookdirectory.rb +++ /dev/null @@ -1,157 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_runbookdirectory) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC RunbookDirectory resource type. - Automatically generated from - 'xSCSMA/DSCResources/MSFT_xRunbookDirectory/MSFT_xRunbookDirectory.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_runbookpath is a required attribute') if self[:dsc_runbookpath].nil? - fail('dsc_webserviceendpoint is a required attribute') if self[:dsc_webserviceendpoint].nil? - end - - def dscmeta_resource_friendly_name; 'RunbookDirectory' end - def dscmeta_resource_name; 'MSFT_xRunbookDirectory' end - def dscmeta_module_name; 'xSCSMA' end - def dscmeta_module_version; '1.5.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:published) { provider.create } - newvalue(:draft) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :published } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Published", "Draft", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - The import state of runbooks found at RunbookPath. This can be Published, Draft, or Absent Valid values are Published, Draft, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Published', 'published', 'Draft', 'draft', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Published, Draft, Absent") - end - end - end - - # Name: RunbookPath - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_runbookpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RunbookPath - Path to Runbook(s) to be imported. Accepts wildcards." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Matches - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_matches) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Matches - Describes the validity of the imported Runbook(s)." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: WebServiceEndpoint - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_webserviceendpoint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WebServiceEndpoint - URL of SMA's web service endpoint." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Port - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_port) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "Port - Port of the SMA web site. Defaults to the SMA default of 9090." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_runbookdirectory).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_script.rb b/lib/puppet/type/dsc_script.rb deleted file mode 100644 index 9049ec70..00000000 --- a/lib/puppet/type/dsc_script.rb +++ /dev/null @@ -1,149 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_script) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC Script resource type. - Automatically generated from - 'PSDesiredStateConfiguration/DSCResources/MSFT_ScriptResource/MSFT_ScriptResource.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_getscript is a required attribute') if self[:dsc_getscript].nil? - fail('dsc_setscript is a required attribute') if self[:dsc_setscript].nil? - fail('dsc_testscript is a required attribute') if self[:dsc_testscript].nil? - end - - def dscmeta_resource_friendly_name; 'Script' end - def dscmeta_resource_name; 'MSFT_ScriptResource' end - def dscmeta_module_name; 'PSDesiredStateConfiguration' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: GetScript - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_getscript) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "GetScript" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetScript - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_setscript) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SetScript" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TestScript - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_testscript) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TestScript" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Result - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_result) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Result" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_script).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_securitysetting.rb b/lib/puppet/type/dsc_securitysetting.rb deleted file mode 100644 index 28992797..00000000 --- a/lib/puppet/type/dsc_securitysetting.rb +++ /dev/null @@ -1,462 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_securitysetting) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SecuritySetting resource type. - Automatically generated from - 'SecurityPolicyDsc/DSCResources/MSFT_SecuritySetting/MSFT_SecuritySetting.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SecuritySetting' end - def dscmeta_resource_name; 'MSFT_SecuritySetting' end - def dscmeta_module_name; 'SecurityPolicyDsc' end - def dscmeta_module_version; '1.5.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: ["MinimumPasswordAge", "MaximumPasswordAge", "MinimumPasswordLength", "PasswordComplexity", "PasswordHistorySize", "LockoutBadCount", "ForceLogoffWhenHourExpire", "NewAdministratorName", "NewGuestName", "ClearTextPassword", "LSAAnonymousNameLookup", "EnableAdminAccount", "EnableGuestAccount", "ResetLockoutCount", "LockoutDuration", "MaxServiceAge", "MaxTicketAge", "MaxRenewAge", "MaxClockSkew", "TicketValidateClient"] - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - This is just here to avoid conflicts Valid values are MinimumPasswordAge, MaximumPasswordAge, MinimumPasswordLength, PasswordComplexity, PasswordHistorySize, LockoutBadCount, ForceLogoffWhenHourExpire, NewAdministratorName, NewGuestName, ClearTextPassword, LSAAnonymousNameLookup, EnableAdminAccount, EnableGuestAccount, ResetLockoutCount, LockoutDuration, MaxServiceAge, MaxTicketAge, MaxRenewAge, MaxClockSkew, TicketValidateClient." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['MinimumPasswordAge', 'minimumpasswordage', 'MaximumPasswordAge', 'maximumpasswordage', 'MinimumPasswordLength', 'minimumpasswordlength', 'PasswordComplexity', 'passwordcomplexity', 'PasswordHistorySize', 'passwordhistorysize', 'LockoutBadCount', 'lockoutbadcount', 'ForceLogoffWhenHourExpire', 'forcelogoffwhenhourexpire', 'NewAdministratorName', 'newadministratorname', 'NewGuestName', 'newguestname', 'ClearTextPassword', 'cleartextpassword', 'LSAAnonymousNameLookup', 'lsaanonymousnamelookup', 'EnableAdminAccount', 'enableadminaccount', 'EnableGuestAccount', 'enableguestaccount', 'ResetLockoutCount', 'resetlockoutcount', 'LockoutDuration', 'lockoutduration', 'MaxServiceAge', 'maxserviceage', 'MaxTicketAge', 'maxticketage', 'MaxRenewAge', 'maxrenewage', 'MaxClockSkew', 'maxclockskew', 'TicketValidateClient', 'ticketvalidateclient'].include?(value) - fail("Invalid value '#{value}'. Valid values are MinimumPasswordAge, MaximumPasswordAge, MinimumPasswordLength, PasswordComplexity, PasswordHistorySize, LockoutBadCount, ForceLogoffWhenHourExpire, NewAdministratorName, NewGuestName, ClearTextPassword, LSAAnonymousNameLookup, EnableAdminAccount, EnableGuestAccount, ResetLockoutCount, LockoutDuration, MaxServiceAge, MaxTicketAge, MaxRenewAge, MaxClockSkew, TicketValidateClient") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Desired state of resource. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: MinimumPasswordAge - # Type: sint16 - # IsMandatory: False - # Values: None - newparam(:dsc_minimumpasswordage) do - def mof_type; 'sint16' end - def mof_is_embedded?; false end - desc "MinimumPasswordAge" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaximumPasswordAge - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_maximumpasswordage) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "MaximumPasswordAge" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MinimumPasswordLength - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_minimumpasswordlength) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "MinimumPasswordLength" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: PasswordComplexity - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_passwordcomplexity) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "PasswordComplexity" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: PasswordHistorySize - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_passwordhistorysize) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "PasswordHistorySize" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: LockoutBadCount - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_lockoutbadcount) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "LockoutBadCount" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ForceLogoffWhenHourExpire - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_forcelogoffwhenhourexpire) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "ForceLogoffWhenHourExpire" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: NewAdministratorName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_newadministratorname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "NewAdministratorName" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: NewGuestName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_newguestname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "NewGuestName" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ClearTextPassword - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_cleartextpassword) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "ClearTextPassword" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: LSAAnonymousNameLookup - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_lsaanonymousnamelookup) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "LSAAnonymousNameLookup" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: EnableAdminAccount - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_enableadminaccount) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "EnableAdminAccount" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: EnableGuestAccount - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_enableguestaccount) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "EnableGuestAccount" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ResetLockoutCount - # Type: sint16 - # IsMandatory: False - # Values: None - newparam(:dsc_resetlockoutcount) do - def mof_type; 'sint16' end - def mof_is_embedded?; false end - desc "ResetLockoutCount" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: LockoutDuration - # Type: sint16 - # IsMandatory: False - # Values: None - newparam(:dsc_lockoutduration) do - def mof_type; 'sint16' end - def mof_is_embedded?; false end - desc "LockoutDuration" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaxServiceAge - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_maxserviceage) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "MaxServiceAge" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaxTicketAge - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_maxticketage) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "MaxTicketAge" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaxRenewAge - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_maxrenewage) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "MaxRenewAge" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaxClockSkew - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_maxclockskew) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "MaxClockSkew" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: TicketValidateClient - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_ticketvalidateclient) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "TicketValidateClient" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_securitysetting).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_securitytemplate.rb b/lib/puppet/type/dsc_securitytemplate.rb deleted file mode 100644 index 2e22e0f7..00000000 --- a/lib/puppet/type/dsc_securitytemplate.rb +++ /dev/null @@ -1,103 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_securitytemplate) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SecurityTemplate resource type. - Automatically generated from - 'SecurityPolicyDsc/DSCResources/MSFT_SecurityTemplate/MSFT_SecurityTemplate.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_issingleinstance is a required attribute') if self[:dsc_issingleinstance].nil? - end - - def dscmeta_resource_friendly_name; 'SecurityTemplate' end - def dscmeta_resource_name; 'MSFT_SecurityTemplate' end - def dscmeta_module_name; 'SecurityPolicyDsc' end - def dscmeta_module_version; '1.5.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: IsSingleInstance - # Type: string - # IsMandatory: True - # Values: ["Yes"] - newparam(:dsc_issingleinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes' Valid values are Yes." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Yes', 'yes'].include?(value) - fail("Invalid value '#{value}'. Valid values are Yes") - end - end - end - - # Name: Path - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - The path to the desired security policy template (.inf)" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_securitytemplate).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_service.rb b/lib/puppet/type/dsc_service.rb deleted file mode 100644 index ba0d2f4a..00000000 --- a/lib/puppet/type/dsc_service.rb +++ /dev/null @@ -1,252 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_service) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC Service resource type. - Automatically generated from - 'PSDesiredStateConfiguration/DSCResources/MSFT_ServiceResource/MSFT_ServiceResource.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'Service' end - def dscmeta_resource_name; 'MSFT_ServiceResource' end - def dscmeta_module_name; 'PSDesiredStateConfiguration' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: State - # Type: string - # IsMandatory: False - # Values: ["Running", "Stopped"] - newparam(:dsc_state) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "State - Valid values are Running, Stopped." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Running', 'running', 'Stopped', 'stopped'].include?(value) - fail("Invalid value '#{value}'. Valid values are Running, Stopped") - end - end - end - - # Name: StartupType - # Type: string - # IsMandatory: False - # Values: ["Automatic", "Manual", "Disabled"] - newparam(:dsc_startuptype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "StartupType - Valid values are Automatic, Manual, Disabled." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Automatic', 'automatic', 'Manual', 'manual', 'Disabled', 'disabled'].include?(value) - fail("Invalid value '#{value}'. Valid values are Automatic, Manual, Disabled") - end - end - end - - # Name: BuiltInAccount - # Type: string - # IsMandatory: False - # Values: ["LocalSystem", "LocalService", "NetworkService"] - newparam(:dsc_builtinaccount) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "BuiltInAccount - Valid values are LocalSystem, LocalService, NetworkService." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['LocalSystem', 'localsystem', 'LocalService', 'localservice', 'NetworkService', 'networkservice'].include?(value) - fail("Invalid value '#{value}'. Valid values are LocalSystem, LocalService, NetworkService") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Status - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_status) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Status" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DisplayName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_displayname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DisplayName" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Path - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Dependencies - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_dependencies, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Dependencies" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_service).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_smavariable.rb b/lib/puppet/type/dsc_smavariable.rb deleted file mode 100644 index 0a37b4c2..00000000 --- a/lib/puppet/type/dsc_smavariable.rb +++ /dev/null @@ -1,186 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_smavariable) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SmaVariable resource type. - Automatically generated from - 'xSCSMA/DSCResources/MSFT_xSmaVariable/MSFT_xSmaVariable.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - fail('dsc_webserviceendpoint is a required attribute') if self[:dsc_webserviceendpoint].nil? - end - - def dscmeta_resource_friendly_name; 'SmaVariable' end - def dscmeta_resource_name; 'MSFT_xSmaVariable' end - def dscmeta_module_name; 'xSCSMA' end - def dscmeta_module_version; '1.5.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Desired state of SMA variable Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of SMA variable." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: value - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_value) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "value - Value of SMA variable." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - Description of SMA variable." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Set - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_set) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Set - Set is true if existing SMA variable matches configuration." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: WebServiceEndpoint - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_webserviceendpoint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WebServiceEndpoint - Web service endpoint of SMA instance." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Port - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_port) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "Port - Port to reach the web service endpoint. Defaults to the SMA default of 9090." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_smavariable).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spaccessserviceapp.rb b/lib/puppet/type/dsc_spaccessserviceapp.rb deleted file mode 100644 index 59d122bb..00000000 --- a/lib/puppet/type/dsc_spaccessserviceapp.rb +++ /dev/null @@ -1,151 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spaccessserviceapp) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPAccessServiceApp resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/MSFT_SPAccessServiceApp.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPAccessServiceApp' end - def dscmeta_resource_name; 'MSFT_SPAccessServiceApp' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the service application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ApplicationPool - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_applicationpool) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApplicationPool - The name of the application pool to run the service app in" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databaseserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseServer - The name of the database server to host Access Services databases" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present ensures service app exists, absent ensures it is removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spaccessserviceapp).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spaccessservices2010.rb b/lib/puppet/type/dsc_spaccessservices2010.rb deleted file mode 100644 index 4e0b24f4..00000000 --- a/lib/puppet/type/dsc_spaccessservices2010.rb +++ /dev/null @@ -1,136 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spaccessservices2010) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPAccessServices2010 resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPAccessServices2010/MSFT_SPAccessServices2010.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPAccessServices2010' end - def dscmeta_resource_name; 'MSFT_SPAccessServices2010' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the service application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ApplicationPool - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_applicationpool) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApplicationPool - The name of the application pool to run the service app in" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present ensures service app exists, absent ensures it is removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run thsi resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spaccessservices2010).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spalternateurl.rb b/lib/puppet/type/dsc_spalternateurl.rb deleted file mode 100644 index e0869a33..00000000 --- a/lib/puppet/type/dsc_spalternateurl.rb +++ /dev/null @@ -1,156 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spalternateurl) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPAlternateUrl resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPAlternateUrl/MSFT_SPAlternateUrl.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_webappurl is a required attribute') if self[:dsc_webappurl].nil? - fail('dsc_zone is a required attribute') if self[:dsc_zone].nil? - end - - def dscmeta_resource_friendly_name; 'SPAlternateUrl' end - def dscmeta_resource_name; 'MSFT_SPAlternateUrl' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: WebAppUrl - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_webappurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WebAppUrl - The URL of the web application to apply the alternate URL to" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Zone - # Type: string - # IsMandatory: True - # Values: ["Default", "Intranet", "Extranet", "Custom", "Internet"] - newparam(:dsc_zone) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Zone - The Zone to use for the alternate URL Valid values are Default, Intranet, Extranet, Custom, Internet." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Default', 'default', 'Intranet', 'intranet', 'Extranet', 'extranet', 'Custom', 'custom', 'Internet', 'internet'].include?(value) - fail("Invalid value '#{value}'. Valid values are Default, Intranet, Extranet, Custom, Internet") - end - end - end - - # Name: Url - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_url) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Url - The new alternate URL" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present ensures the URL is set for this zone on this web app, Absent ensures it is removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spalternateurl).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spantivirussettings.rb b/lib/puppet/type/dsc_spantivirussettings.rb deleted file mode 100644 index 96b47cb5..00000000 --- a/lib/puppet/type/dsc_spantivirussettings.rb +++ /dev/null @@ -1,186 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spantivirussettings) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPAntivirusSettings resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/MSFT_SPAntivirusSettings.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_scanondownload is a required attribute') if self[:dsc_scanondownload].nil? - end - - def dscmeta_resource_friendly_name; 'SPAntivirusSettings' end - def dscmeta_resource_name; 'MSFT_SPAntivirusSettings' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ScanOnDownload - # Type: boolean - # IsMandatory: True - # Values: None - newparam(:dsc_scanondownload) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ScanOnDownload - Should documents be scanned before being downloaded" - isrequired - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ScanOnUpload - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_scanonupload) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ScanOnUpload - Should documents be scanned on upload" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AllowDownloadInfected - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowdownloadinfected) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowDownloadInfected - Should documents that are infected be allowed to be downloaded" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AttemptToClean - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_attempttoclean) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AttemptToClean - Should infected documents be handed to the AV engine to attempt cleaning" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: TimeoutDuration - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_timeoutduration) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "TimeoutDuration - What is the timeout for an AV scan in seconds" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: NumberOfThreads - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_numberofthreads) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "NumberOfThreads - How many concurrent threads should the AV engine be able to run on a server" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spantivirussettings).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spappcatalog.rb b/lib/puppet/type/dsc_spappcatalog.rb deleted file mode 100644 index a035b83a..00000000 --- a/lib/puppet/type/dsc_spappcatalog.rb +++ /dev/null @@ -1,101 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spappcatalog) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPAppCatalog resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPAppCatalog/MSFT_SPAppCatalog.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_siteurl is a required attribute') if self[:dsc_siteurl].nil? - end - - def dscmeta_resource_friendly_name; 'SPAppCatalog' end - def dscmeta_resource_name; 'MSFT_SPAppCatalog' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: SiteUrl - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_siteurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SiteUrl - The URL of the site collection that will be the app catalog for the web app that it is in" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spappcatalog).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spappdomain.rb b/lib/puppet/type/dsc_spappdomain.rb deleted file mode 100644 index 95746ab8..00000000 --- a/lib/puppet/type/dsc_spappdomain.rb +++ /dev/null @@ -1,116 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spappdomain) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPAppDomain resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPAppDomain/MSFT_SPAppDomain.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_appdomain is a required attribute') if self[:dsc_appdomain].nil? - end - - def dscmeta_resource_friendly_name; 'SPAppDomain' end - def dscmeta_resource_name; 'MSFT_SPAppDomain' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AppDomain - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_appdomain) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AppDomain - The domain name for apps to use in this farm" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Prefix - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_prefix) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Prefix - The prefix to go on to app URLs" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spappdomain).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spappmanagementserviceapp.rb b/lib/puppet/type/dsc_spappmanagementserviceapp.rb deleted file mode 100644 index e6bd6b2a..00000000 --- a/lib/puppet/type/dsc_spappmanagementserviceapp.rb +++ /dev/null @@ -1,181 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spappmanagementserviceapp) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPAppManagementServiceApp resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/MSFT_SPAppManagementServiceApp.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPAppManagementServiceApp' end - def dscmeta_resource_name; 'MSFT_SPAppManagementServiceApp' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the app management service application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProxyName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_proxyname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProxyName - The proxy name, if not specified will be /Name of service app/ Proxy" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ApplicationPool - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_applicationpool) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApplicationPool - The app pool that should be used to run the service app" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseName - The name of the database for the service application" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databaseserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseServer - The name of the server for the database" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present ensures service app exists, absent ensures it is removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spappmanagementserviceapp).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spappstoresettings.rb b/lib/puppet/type/dsc_spappstoresettings.rb deleted file mode 100644 index 3ed57b38..00000000 --- a/lib/puppet/type/dsc_spappstoresettings.rb +++ /dev/null @@ -1,133 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spappstoresettings) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPAppStoreSettings resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/MSFT_SPAppStoreSettings.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_webappurl is a required attribute') if self[:dsc_webappurl].nil? - end - - def dscmeta_resource_friendly_name; 'SPAppStoreSettings' end - def dscmeta_resource_name; 'MSFT_SPAppStoreSettings' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: WebAppUrl - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_webappurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WebAppUrl - The URL of the web application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AllowAppPurchases - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowapppurchases) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowAppPurchases - Specifies if App Purchases from the SharePoint Store are allowed" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AllowAppsForOffice - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowappsforoffice) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowAppsForOffice - Specifies if App Purchases for Office applications are allowed" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spappstoresettings).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spbcsserviceapp.rb b/lib/puppet/type/dsc_spbcsserviceapp.rb deleted file mode 100644 index 80d57e37..00000000 --- a/lib/puppet/type/dsc_spbcsserviceapp.rb +++ /dev/null @@ -1,166 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spbcsserviceapp) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPBCSServiceApp resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/MSFT_SPBCSServiceApp.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPBCSServiceApp' end - def dscmeta_resource_name; 'MSFT_SPBCSServiceApp' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the BCS service app" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ApplicationPool - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_applicationpool) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApplicationPool - The application pool it should run in" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseName - Name of the database to create for the service app" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databaseserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseServer - Name of the database server to host the database on" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present ensures service app exists, absent ensures it is removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spbcsserviceapp).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spblobcachesettings.rb b/lib/puppet/type/dsc_spblobcachesettings.rb deleted file mode 100644 index 45ea2e90..00000000 --- a/lib/puppet/type/dsc_spblobcachesettings.rb +++ /dev/null @@ -1,203 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spblobcachesettings) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPBlobCacheSettings resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/MSFT_SPBlobCacheSettings.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_webappurl is a required attribute') if self[:dsc_webappurl].nil? - fail('dsc_zone is a required attribute') if self[:dsc_zone].nil? - end - - def dscmeta_resource_friendly_name; 'SPBlobCacheSettings' end - def dscmeta_resource_name; 'MSFT_SPBlobCacheSettings' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: WebAppUrl - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_webappurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WebAppUrl - The URL of the web application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Zone - # Type: string - # IsMandatory: True - # Values: ["Default", "Intranet", "Internet", "Custom", "Extranet"] - newparam(:dsc_zone) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Zone - The zone of the web application for which blob cache has to be configured Valid values are Default, Intranet, Internet, Custom, Extranet." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Default', 'default', 'Intranet', 'intranet', 'Internet', 'internet', 'Custom', 'custom', 'Extranet', 'extranet'].include?(value) - fail("Invalid value '#{value}'. Valid values are Default, Intranet, Internet, Custom, Extranet") - end - end - end - - # Name: EnableCache - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enablecache) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "EnableCache - Specify if the blob cache has to be enabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Location - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_location) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Location - The location where the blob cache has to store its files" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MaxSizeInGB - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_maxsizeingb) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "MaxSizeInGB - The maximum size (in GB) of disk space the blob cache is allowed to use" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaxAgeInSeconds - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maxageinseconds) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "MaxAgeInSeconds - The maximum age (in seconds) that a browser caches a blob" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: FileTypes - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_filetypes) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FileTypes - Specify the file types that must be stored by the blob cache" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spblobcachesettings).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spcacheaccounts.rb b/lib/puppet/type/dsc_spcacheaccounts.rb deleted file mode 100644 index 6d6a2cd7..00000000 --- a/lib/puppet/type/dsc_spcacheaccounts.rb +++ /dev/null @@ -1,147 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spcacheaccounts) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPCacheAccounts resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPCacheAccounts/MSFT_SPCacheAccounts.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_webappurl is a required attribute') if self[:dsc_webappurl].nil? - end - - def dscmeta_resource_friendly_name; 'SPCacheAccounts' end - def dscmeta_resource_name; 'MSFT_SPCacheAccounts' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: WebAppUrl - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_webappurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WebAppUrl - The URL of the web application to set the accounts for" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SuperUserAlias - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_superuseralias) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SuperUserAlias - The account name for the super user" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SuperReaderAlias - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_superreaderalias) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SuperReaderAlias - The account name for the super reader" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetWebAppPolicy - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_setwebapppolicy) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SetWebAppPolicy - Should the web app policy be set for these accounts?" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spcacheaccounts).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spconfigwizard.rb b/lib/puppet/type/dsc_spconfigwizard.rb deleted file mode 100644 index c84bd3f2..00000000 --- a/lib/puppet/type/dsc_spconfigwizard.rb +++ /dev/null @@ -1,149 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spconfigwizard) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPConfigWizard resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPConfigWizard/MSFT_SPConfigWizard.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'SPConfigWizard' end - def dscmeta_resource_name; 'MSFT_SPConfigWizard' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present to install SharePoint. Absent is currently not supported Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: DatabaseUpgradeDays - # Type: string[] - # IsMandatory: False - # Values: ["mon", "tue", "wed", "thu", "fri", "sat", "sun"] - newparam(:dsc_databaseupgradedays, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "DatabaseUpgradeDays - Specify on which dates running the Configuration Wizard is allowed Valid values are mon, tue, wed, thu, fri, sat, sun." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - if value.kind_of?(Array) - unless (['mon', 'mon', 'tue', 'tue', 'wed', 'wed', 'thu', 'thu', 'fri', 'fri', 'sat', 'sat', 'sun', 'sun'] & value).count == value.count - fail("Invalid value #{value}. Valid values are mon, tue, wed, thu, fri, sat, sun") - end - end - if value.kind_of?(String) - unless ['mon', 'mon', 'tue', 'tue', 'wed', 'wed', 'thu', 'thu', 'fri', 'fri', 'sat', 'sat', 'sun', 'sun'].include?(value) - fail("Invalid value #{value}. Valid values are mon, tue, wed, thu, fri, sat, sun") - end - end - end - munge do |value| - Array(value) - end - end - - # Name: DatabaseUpgradeTime - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databaseupgradetime) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseUpgradeTime - Specify in which time frame running the Configuration Wizard is allowed" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spconfigwizard).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spcontentdatabase.rb b/lib/puppet/type/dsc_spcontentdatabase.rb deleted file mode 100644 index 81240235..00000000 --- a/lib/puppet/type/dsc_spcontentdatabase.rb +++ /dev/null @@ -1,203 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spcontentdatabase) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPContentDatabase resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPContentDatabase/MSFT_SPContentDatabase.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPContentDatabase' end - def dscmeta_resource_name; 'MSFT_SPContentDatabase' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Specifies the name of the content database" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databaseserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseServer - The name of the database server to host the content DB" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: WebAppUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_webappurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WebAppUrl - The URL of the web application" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Enabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Enabled - Should the database be enabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: WarningSiteCount - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_warningsitecount) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "WarningSiteCount - Specify the site collection warning limit for the content database" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaximumSiteCount - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_maximumsitecount) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "MaximumSiteCount - Specify the site collection maximum limit for the content database" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present to create this database, absent to ensure it does not exist Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spcontentdatabase).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spcreatefarm.rb b/lib/puppet/type/dsc_spcreatefarm.rb deleted file mode 100644 index 4e35ed90..00000000 --- a/lib/puppet/type/dsc_spcreatefarm.rb +++ /dev/null @@ -1,219 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spcreatefarm) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPCreateFarm resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPCreateFarm/MSFT_SPCreateFarm.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_farmconfigdatabasename is a required attribute') if self[:dsc_farmconfigdatabasename].nil? - fail('dsc_databaseserver is a required attribute') if self[:dsc_databaseserver].nil? - end - - def dscmeta_resource_friendly_name; 'SPCreateFarm' end - def dscmeta_resource_name; 'MSFT_SPCreateFarm' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: FarmConfigDatabaseName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_farmconfigdatabasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FarmConfigDatabaseName - Name of the configuration database" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseServer - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_databaseserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseServer - Server that will host the configuration and admin content databases" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FarmAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_farmaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "FarmAccount - The account to use as the main farm account" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("FarmAccount", value) - end - end - - # Name: Passphrase - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_passphrase) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Passphrase - The passphrase to use to allow servers to join this farm" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Passphrase", value) - end - end - - # Name: AdminContentDatabaseName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_admincontentdatabasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AdminContentDatabaseName - The name of the admin content database" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CentralAdministrationPort - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_centraladministrationport) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "CentralAdministrationPort - What port will Central Admin be provisioned to - default is 9999" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: CentralAdministrationAuth - # Type: string - # IsMandatory: False - # Values: ["NTLM", "Kerberos"] - newparam(:dsc_centraladministrationauth) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CentralAdministrationAuth - The authentication provider of the CentralAdministration web application Valid values are NTLM, Kerberos." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['NTLM', 'ntlm', 'Kerberos', 'kerberos'].include?(value) - fail("Invalid value '#{value}'. Valid values are NTLM, Kerberos") - end - end - end - - # Name: ServerRole - # Type: string - # IsMandatory: False - # Values: ["Application", "ApplicationWithSearch", "Custom", "DistributedCache", "Search", "SingleServer", "SingleServerFarm", "WebFrontEnd", "WebFrontEndWithDistributedCache"] - newparam(:dsc_serverrole) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServerRole - SharePoint 2016 only - the MinRole role to enroll this server as Valid values are Application, ApplicationWithSearch, Custom, DistributedCache, Search, SingleServer, SingleServerFarm, WebFrontEnd, WebFrontEndWithDistributedCache." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Application', 'application', 'ApplicationWithSearch', 'applicationwithsearch', 'Custom', 'custom', 'DistributedCache', 'distributedcache', 'Search', 'search', 'SingleServer', 'singleserver', 'SingleServerFarm', 'singleserverfarm', 'WebFrontEnd', 'webfrontend', 'WebFrontEndWithDistributedCache', 'webfrontendwithdistributedcache'].include?(value) - fail("Invalid value '#{value}'. Valid values are Application, ApplicationWithSearch, Custom, DistributedCache, Search, SingleServer, SingleServerFarm, WebFrontEnd, WebFrontEndWithDistributedCache") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spcreatefarm).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spdatabaseaag.rb b/lib/puppet/type/dsc_spdatabaseaag.rb deleted file mode 100644 index ce677ff2..00000000 --- a/lib/puppet/type/dsc_spdatabaseaag.rb +++ /dev/null @@ -1,151 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spdatabaseaag) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPDatabaseAAG resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/MSFT_SPDatabaseAAG.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_databasename is a required attribute') if self[:dsc_databasename].nil? - end - - def dscmeta_resource_friendly_name; 'SPDatabaseAAG' end - def dscmeta_resource_name; 'MSFT_SPDatabaseAAG' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: DatabaseName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_databasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseName - The name of the database to put in the AlwaysOn group" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AGName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_agname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AGName - Name of the AlwaysOn group on the SQL server - this must already exist" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FileShare - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_fileshare) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FileShare - The fileshare to use for the SQL backup when adding to the group" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present if the database should be in this AlwaysOn group, or Absent if it should not be in the group Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spdatabaseaag).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spdesignersettings.rb b/lib/puppet/type/dsc_spdesignersettings.rb deleted file mode 100644 index a8b86a33..00000000 --- a/lib/puppet/type/dsc_spdesignersettings.rb +++ /dev/null @@ -1,231 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spdesignersettings) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPDesignerSettings resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPDesignerSettings/MSFT_SPDesignerSettings.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_url is a required attribute') if self[:dsc_url].nil? - end - - def dscmeta_resource_friendly_name; 'SPDesignerSettings' end - def dscmeta_resource_name; 'MSFT_SPDesignerSettings' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Url - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_url) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Url - The URL of the web application or site collection to configure" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SettingsScope - # Type: string - # IsMandatory: False - # Values: ["WebApplication", "SiteCollection"] - newparam(:dsc_settingsscope) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SettingsScope - Define the scope of the configuration - either WebApplication or SiteCollection Valid values are WebApplication, SiteCollection." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['WebApplication', 'webapplication', 'SiteCollection', 'sitecollection'].include?(value) - fail("Invalid value '#{value}'. Valid values are WebApplication, SiteCollection") - end - end - end - - # Name: AllowSharePointDesigner - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowsharepointdesigner) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowSharePointDesigner - Allow the use of SharePoint Designer" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AllowDetachPagesFromDefinition - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowdetachpagesfromdefinition) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowDetachPagesFromDefinition - Allow pages to be un-ghosted by SharePoint Designer" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AllowCustomiseMasterPage - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowcustomisemasterpage) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowCustomiseMasterPage - Allow masterpages to be changed by SharePoint Designer" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AllowManageSiteURLStructure - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowmanagesiteurlstructure) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowManageSiteURLStructure - Allow site URL structure to be changed by SharePoint Designer" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AllowCreateDeclarativeWorkflow - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowcreatedeclarativeworkflow) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowCreateDeclarativeWorkflow - Allow users to create declarative workflows with SharePoint Designer" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AllowSavePublishDeclarativeWorkflow - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowsavepublishdeclarativeworkflow) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowSavePublishDeclarativeWorkflow - Allow users to save and re-publish declarative workflows with SharePoint Designer" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AllowSaveDeclarativeWorkflowAsTemplate - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowsavedeclarativeworkflowastemplate) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowSaveDeclarativeWorkflowAsTemplate - Allow users to save declarative workflows as a template from SharePoint Designer" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spdesignersettings).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spdiagnosticloggingsettings.rb b/lib/puppet/type/dsc_spdiagnosticloggingsettings.rb deleted file mode 100644 index cf3b98b6..00000000 --- a/lib/puppet/type/dsc_spdiagnosticloggingsettings.rb +++ /dev/null @@ -1,389 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spdiagnosticloggingsettings) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPDiagnosticLoggingSettings resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/MSFT_SPDiagnosticLoggingSettings.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_logpath is a required attribute') if self[:dsc_logpath].nil? - end - - def dscmeta_resource_friendly_name; 'SPDiagnosticLoggingSettings' end - def dscmeta_resource_name; 'MSFT_SPDiagnosticLoggingSettings' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: LogPath - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_logpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogPath - The physical path on each server to store ULS logs" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LogSpaceInGB - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_logspaceingb) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "LogSpaceInGB - The space in GB that should be used to store ULS logs" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: AppAnalyticsAutomaticUploadEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_appanalyticsautomaticuploadenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AppAnalyticsAutomaticUploadEnabled - Should app analytics automatically be uploaded" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: CustomerExperienceImprovementProgramEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_customerexperienceimprovementprogramenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "CustomerExperienceImprovementProgramEnabled - Should the customer experience program be enabled in this farm" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DaysToKeepLogs - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_daystokeeplogs) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "DaysToKeepLogs - How many days should ULS logs be kept for" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: DownloadErrorReportingUpdatesEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_downloaderrorreportingupdatesenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DownloadErrorReportingUpdatesEnabled - Should updates to error reporting tools be automatically downloaded" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ErrorReportingAutomaticUploadEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_errorreportingautomaticuploadenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ErrorReportingAutomaticUploadEnabled - Should error reports be automatically uploaded" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ErrorReportingEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_errorreportingenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ErrorReportingEnabled - Should reporting of errors be enabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: EventLogFloodProtectionEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_eventlogfloodprotectionenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "EventLogFloodProtectionEnabled - Protect event logs with Event Log Flood Protection" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: EventLogFloodProtectionNotifyInterval - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_eventlogfloodprotectionnotifyinterval) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "EventLogFloodProtectionNotifyInterval - What interval should the event logs report a flood event" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: EventLogFloodProtectionQuietPeriod - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_eventlogfloodprotectionquietperiod) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "EventLogFloodProtectionQuietPeriod - What quiet period should reset the event log flood protection thresholds" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: EventLogFloodProtectionThreshold - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_eventlogfloodprotectionthreshold) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "EventLogFloodProtectionThreshold - What is the event log flood protection threshold" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: EventLogFloodProtectionTriggerPeriod - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_eventlogfloodprotectiontriggerperiod) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "EventLogFloodProtectionTriggerPeriod - What is the time period that will trigger event log flood protection" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: LogCutInterval - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_logcutinterval) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "LogCutInterval - How many minutes of activity will a ULS log file leep in an individual file" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: LogMaxDiskSpaceUsageEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_logmaxdiskspaceusageenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "LogMaxDiskSpaceUsageEnabled - Will the maximum disk space setting be enabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ScriptErrorReportingDelay - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_scripterrorreportingdelay) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "ScriptErrorReportingDelay - What delay will be set before script error reporting is triggered" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ScriptErrorReportingEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_scripterrorreportingenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ScriptErrorReportingEnabled - Is script error reporting enabled in this farm" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ScriptErrorReportingRequireAuth - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_scripterrorreportingrequireauth) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ScriptErrorReportingRequireAuth - Require users to be authenticated to allow script errors to be reported" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spdiagnosticloggingsettings).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spdistributedcacheservice.rb b/lib/puppet/type/dsc_spdistributedcacheservice.rb deleted file mode 100644 index d3b7197d..00000000 --- a/lib/puppet/type/dsc_spdistributedcacheservice.rb +++ /dev/null @@ -1,188 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spdistributedcacheservice) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPDistributedCacheService resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/MSFT_SPDistributedCacheService.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPDistributedCacheService' end - def dscmeta_resource_name; 'MSFT_SPDistributedCacheService' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - A name to assign to this resource - not really used. For example - AppFabricCachingService" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present to ensure the current server should be running distributed cache, absent to ensure that it isn't running Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: CacheSizeInMB - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_cachesizeinmb) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "CacheSizeInMB - How many MB should be used for the cache. The maximum supported is 16384" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ServiceAccount - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_serviceaccount) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServiceAccount - The name of the service account to run the service as. This should already be registered as a managed account in SharePoint" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ServerProvisionOrder - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_serverprovisionorder, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ServerProvisionOrder - A list of servers which specifies the order they should provision the cache in to ensure that two servers do not do it at the same time" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: CreateFirewallRules - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_createfirewallrules) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "CreateFirewallRules - Should the Windows Firewall rules for distributed cache be created?" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spdistributedcacheservice).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spexcelserviceapp.rb b/lib/puppet/type/dsc_spexcelserviceapp.rb deleted file mode 100644 index dc97db81..00000000 --- a/lib/puppet/type/dsc_spexcelserviceapp.rb +++ /dev/null @@ -1,463 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spexcelserviceapp) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - class PuppetX::Dsc::TypeHelpers - def self.validate_MSFT_SPExcelFileLocation(mof_type_map, name, value) - required = ['locationtype'] - allowed = ['address','abortonrefreshonopenfail','automaticvolatilefunctioncachelifetime','chartandimagesizemax','concurrentdatarequestspersessionmax','defaultworkbookcalcmode','description','displaygranularextdataerrors','externaldataallowed','includechildren','manualextdatacachelifetime','newworkbooksessiontimeout','periodicextdatacachelifetime','requestdurationmax','restexternaldataallowed','sessiontimeout','shortsessiontimeout','udfsallowed','warnondatarefresh','workbooksizemax'] - lowkey_hash = Hash[value.map { |k, v| [k.to_s.downcase, v] }] - - missing = required - lowkey_hash.keys - unless missing.empty? - fail "#{name} is missing the following required keys: #{missing.join(',')}" - end - - extraneous = lowkey_hash.keys - required - allowed - unless extraneous.empty? - fail "#{name} includes invalid keys: #{extraneous.join(',')}" - end - - lowkey_hash.keys.each do |key| - if lowkey_hash[key] - validate_mof_type(mof_type_map[key], 'MSFT_SPExcelFileLocation', key, lowkey_hash[key]) - end - end - end - end - - @doc = %q{ - The DSC SPExcelServiceApp resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/MSFT_SPExcelServiceApp.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPExcelServiceApp' end - def dscmeta_resource_name; 'MSFT_SPExcelServiceApp' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the service application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ApplicationPool - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_applicationpool) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApplicationPool - The name of the application pool to run the service app in" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TrustedFileLocations - # Type: MSFT_SPExcelFileLocation[] - # IsMandatory: False - # Values: None - newparam(:dsc_trustedfilelocations, :array_matching => :all) do - def mof_type; 'MSFT_SPExcelFileLocation[]' end - def mof_is_embedded?; true end - def mof_type_map - {"address"=>{:type=>"string"}, "locationtype"=>{:type=>"string", :values=>["SharePoint", "UNC", "HTTP"]}, "abortonrefreshonopenfail"=>{:type=>"boolean"}, "automaticvolatilefunctioncachelifetime"=>{:type=>"uint32"}, "chartandimagesizemax"=>{:type=>"uint32"}, "concurrentdatarequestspersessionmax"=>{:type=>"uint32"}, "defaultworkbookcalcmode"=>{:type=>"string", :values=>["File", "Manual", "Auto", "AutoDataTables"]}, "description"=>{:type=>"string"}, "displaygranularextdataerrors"=>{:type=>"boolean"}, "externaldataallowed"=>{:type=>"string", :values=>["None", "Dcl", "DclandEmbedded"]}, "includechildren"=>{:type=>"boolean"}, "manualextdatacachelifetime"=>{:type=>"uint32"}, "newworkbooksessiontimeout"=>{:type=>"uint32"}, "periodicextdatacachelifetime"=>{:type=>"uint32"}, "requestdurationmax"=>{:type=>"uint32"}, "restexternaldataallowed"=>{:type=>"boolean"}, "sessiontimeout"=>{:type=>"uint32"}, "shortsessiontimeout"=>{:type=>"uint32"}, "udfsallowed"=>{:type=>"boolean"}, "warnondatarefresh"=>{:type=>"boolean"}, "workbooksizemax"=>{:type=>"uint32"}} - end - desc "TrustedFileLocations - Trusted file locations for the service app" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be an array of hashes or a hash") - end - (value.kind_of?(Hash) ? [value] : value).each_with_index do |v, i| - fail "TrustedFileLocations value at index #{i} should be a Hash" unless v.is_a? Hash - - PuppetX::Dsc::TypeHelpers.validate_MSFT_SPExcelFileLocation(mof_type_map, "TrustedFileLocations", v) - end - end - munge do |value| - value.kind_of?(Hash) ? - [PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, value)] : - value.map { |v| PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, v) } - end - end - - # Name: CachingOfUnusedFilesEnable - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_cachingofunusedfilesenable) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "CachingOfUnusedFilesEnable - Specifies that files that are no longer used by Excel Services Application can remain in the cache for later use." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: CrossDomainAccessAllowed - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_crossdomainaccessallowed) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "CrossDomainAccessAllowed - Specifies that trusted workbooks and data connection files can be requested and rendered by Web Parts or pages that reside in other HTTP domains." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: EncryptedUserConnectionRequired - # Type: string - # IsMandatory: False - # Values: ["None", "Connection"] - newparam(:dsc_encrypteduserconnectionrequired) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EncryptedUserConnectionRequired - Requires that encryption is used between the end-user and the server running Excel Services Application. Valid values are None, Connection." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['None', 'none', 'Connection', 'connection'].include?(value) - fail("Invalid value '#{value}'. Valid values are None, Connection") - end - end - end - - # Name: ExternalDataConnectionLifetime - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_externaldataconnectionlifetime) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "ExternalDataConnectionLifetime - Specifies the maximum number of seconds that an external data connection can remain open in the connection pool." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: FileAccessMethod - # Type: string - # IsMandatory: False - # Values: ["UseImpersonation", "UseFileAccessAccount"] - newparam(:dsc_fileaccessmethod) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FileAccessMethod - Specifies the authentication method that Excel Services Application uses to retrieve files. Valid values are UseImpersonation, UseFileAccessAccount." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['UseImpersonation', 'useimpersonation', 'UseFileAccessAccount', 'usefileaccessaccount'].include?(value) - fail("Invalid value '#{value}'. Valid values are UseImpersonation, UseFileAccessAccount") - end - end - end - - # Name: LoadBalancingScheme - # Type: string - # IsMandatory: False - # Values: ["RoundRobin", "Local", "WorkbookURL"] - newparam(:dsc_loadbalancingscheme) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LoadBalancingScheme - Specifies the load-balancing schema that is used by the Excel Services Application Web service application to send requests to different back-end Excel Services Application computers. Valid values are RoundRobin, Local, WorkbookURL." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['RoundRobin', 'roundrobin', 'Local', 'local', 'WorkbookURL', 'workbookurl'].include?(value) - fail("Invalid value '#{value}'. Valid values are RoundRobin, Local, WorkbookURL") - end - end - end - - # Name: MemoryCacheThreshold - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_memorycachethreshold) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "MemoryCacheThreshold - Specifies the percentage of the maximum private bytes that can be allocated to inactive objects." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: PrivateBytesMax - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_privatebytesmax) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "PrivateBytesMax - Specifies the maximum private bytes, in megabytes, that are used by Excel Services Application." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: SessionsPerUserMax - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_sessionsperusermax) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "SessionsPerUserMax - Specifies the maximum number of sessions allowed for a user." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: SiteCollectionAnonymousSessionsMax - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_sitecollectionanonymoussessionsmax) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "SiteCollectionAnonymousSessionsMax - Specifies the maximum number of anonymous sessions allowed per site collection." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: TerminateProcessOnAccessViolation - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_terminateprocessonaccessviolation) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "TerminateProcessOnAccessViolation - Terminates Excel Services Application when an access violation occurs in the process." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ThrottleAccessViolationsPerSiteCollection - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_throttleaccessviolationspersitecollection) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "ThrottleAccessViolationsPerSiteCollection - Specifies that if a workbook causes an access violation error on Excel Services Application, all files originating from that workbook's site collection are blocked from loading for the specified period (in seconds)." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: UnattendedAccountApplicationId - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_unattendedaccountapplicationid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UnattendedAccountApplicationId - Specifies that the application ID that is used to look up the unattended service account credentials from the secure storage service that is specified by the UnattendedAccountSecureServiceAppName parameter." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UnusedObjectAgeMax - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_unusedobjectagemax) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "UnusedObjectAgeMax - Specifies the maximum amount of time, in minutes, that objects not currently used in a session are kept in the memory cache." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: WorkbookCache - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_workbookcache) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WorkbookCache - Specifies the local file system location of the cache that is used to store workbooks that are used by Excel Services Application." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: WorkbookCacheSizeMax - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_workbookcachesizemax) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "WorkbookCacheSizeMax - Specifies the maximum allowable size, in megabytes, of an individual session." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present ensures service app exists, absent ensures it is removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spexcelserviceapp).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spfarm.rb b/lib/puppet/type/dsc_spfarm.rb deleted file mode 100644 index 88967488..00000000 --- a/lib/puppet/type/dsc_spfarm.rb +++ /dev/null @@ -1,253 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spfarm) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPFarm resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPFarm/MSFT_SPFarm.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'SPFarm' end - def dscmeta_resource_name; 'MSFT_SPFarm' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present to create/join the farm. Absent is currently not supported Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: FarmConfigDatabaseName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_farmconfigdatabasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FarmConfigDatabaseName - Name of the configuration database" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databaseserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseServer - Server that will host the configuration and admin content databases" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FarmAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_farmaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "FarmAccount - The account to use as the main farm account" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("FarmAccount", value) - end - end - - # Name: Passphrase - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_passphrase) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Passphrase - The passphrase to use to allow servers to join this farm" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Passphrase", value) - end - end - - # Name: AdminContentDatabaseName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_admincontentdatabasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AdminContentDatabaseName - The name of the admin content database" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RunCentralAdmin - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_runcentraladmin) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RunCentralAdmin - Should the central admin site run on this specific server?" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: CentralAdministrationPort - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_centraladministrationport) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "CentralAdministrationPort - What port will Central Admin be provisioned to - default is 9999" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: CentralAdministrationAuth - # Type: string - # IsMandatory: False - # Values: ["NTLM", "Kerberos"] - newparam(:dsc_centraladministrationauth) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CentralAdministrationAuth - The authentication provider of the CentralAdministration web application Valid values are NTLM, Kerberos." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['NTLM', 'ntlm', 'Kerberos', 'kerberos'].include?(value) - fail("Invalid value '#{value}'. Valid values are NTLM, Kerberos") - end - end - end - - # Name: ServerRole - # Type: string - # IsMandatory: False - # Values: ["Application", "ApplicationWithSearch", "Custom", "DistributedCache", "Search", "SingleServer", "SingleServerFarm", "WebFrontEnd", "WebFrontEndWithDistributedCache"] - newparam(:dsc_serverrole) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServerRole - SharePoint 2016 only - the MinRole role to enroll this server as Valid values are Application, ApplicationWithSearch, Custom, DistributedCache, Search, SingleServer, SingleServerFarm, WebFrontEnd, WebFrontEndWithDistributedCache." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Application', 'application', 'ApplicationWithSearch', 'applicationwithsearch', 'Custom', 'custom', 'DistributedCache', 'distributedcache', 'Search', 'search', 'SingleServer', 'singleserver', 'SingleServerFarm', 'singleserverfarm', 'WebFrontEnd', 'webfrontend', 'WebFrontEndWithDistributedCache', 'webfrontendwithdistributedcache'].include?(value) - fail("Invalid value '#{value}'. Valid values are Application, ApplicationWithSearch, Custom, DistributedCache, Search, SingleServer, SingleServerFarm, WebFrontEnd, WebFrontEndWithDistributedCache") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spfarm).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spfarmadministrators.rb b/lib/puppet/type/dsc_spfarmadministrators.rb deleted file mode 100644 index 1e1ad30c..00000000 --- a/lib/puppet/type/dsc_spfarmadministrators.rb +++ /dev/null @@ -1,155 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spfarmadministrators) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPFarmAdministrators resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/MSFT_SPFarmAdministrators.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPFarmAdministrators' end - def dscmeta_resource_name; 'MSFT_SPFarmAdministrators' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - A generic name for this resource, its value is not important" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Members - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_members, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Members - A list of members to set the group to. Those not in this list will be removed" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: MembersToInclude - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_memberstoinclude, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "MembersToInclude - A list of members to add. Members not in this list will be left in the group" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: MembersToExclude - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_memberstoexclude, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "MembersToExclude - A list of members to remove. Members not in this list will be left in the group" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spfarmadministrators).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spfarmpropertybag.rb b/lib/puppet/type/dsc_spfarmpropertybag.rb deleted file mode 100644 index 22fb7e4e..00000000 --- a/lib/puppet/type/dsc_spfarmpropertybag.rb +++ /dev/null @@ -1,136 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spfarmpropertybag) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPFarmPropertyBag resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/MSFT_SPFarmPropertyBag.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_key is a required attribute') if self[:dsc_key].nil? - end - - def dscmeta_resource_friendly_name; 'SPFarmPropertyBag' end - def dscmeta_resource_name; 'MSFT_SPFarmPropertyBag' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Key - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_key) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Key - The key of the SPFarm property bag" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Value - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_value) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Value - Value of the SPfarm property bag" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Set to present to ensure the SPfarm property exists, or absent to ensure it is removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spfarmpropertybag).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spfarmsolution.rb b/lib/puppet/type/dsc_spfarmsolution.rb deleted file mode 100644 index fcdae18b..00000000 --- a/lib/puppet/type/dsc_spfarmsolution.rb +++ /dev/null @@ -1,203 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spfarmsolution) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPFarmSolution resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPFarmSolution/MSFT_SPFarmSolution.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPFarmSolution' end - def dscmeta_resource_name; 'MSFT_SPFarmSolution' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The filename of the WSP package" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LiteralPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_literalpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LiteralPath - The full path to the WSP file" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: WebApplications - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_webapplications, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "WebApplications - A list of the web applications to deploy this to" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present if the WSP should be deployed, or Absent if it should be removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Version - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_version) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Version - The version of the package that is being modified" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Deployed - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_deployed) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Deployed - Should the solution be deployed to the farm, or just installed to the farm" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: SolutionLevel - # Type: string - # IsMandatory: False - # Values: ["14", "15", "All"] - newparam(:dsc_solutionlevel) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SolutionLevel - What compatability level should the WSP be deployed as? Valid values are 14, 15, All." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['14', '14', '15', '15', 'All', 'all'].include?(value) - fail("Invalid value '#{value}'. Valid values are 14, 15, All") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spfarmsolution).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spfeature.rb b/lib/puppet/type/dsc_spfeature.rb deleted file mode 100644 index e7038f2f..00000000 --- a/lib/puppet/type/dsc_spfeature.rb +++ /dev/null @@ -1,171 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spfeature) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPFeature resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPFeature/MSFT_SPFeature.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - fail('dsc_url is a required attribute') if self[:dsc_url].nil? - end - - def dscmeta_resource_friendly_name; 'SPFeature' end - def dscmeta_resource_name; 'MSFT_SPFeature' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the feature" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FeatureScope - # Type: string - # IsMandatory: False - # Values: ["Farm", "WebApplication", "Site", "Web"] - newparam(:dsc_featurescope) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FeatureScope - The scope to change the feature at - Farm, WebApplication, SiteCollection or Site Valid values are Farm, WebApplication, Site, Web." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Farm', 'farm', 'WebApplication', 'webapplication', 'Site', 'site', 'Web', 'web'].include?(value) - fail("Invalid value '#{value}'. Valid values are Farm, WebApplication, Site, Web") - end - end - end - - # Name: Url - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_url) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Url - The URL to change the feature at" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present if the feature is to be enabled, Absent if it is to be disabled Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Version - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_version) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Version - The version of the feature to check against" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spfeature).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_sphealthanalyzerrulestate.rb b/lib/puppet/type/dsc_sphealthanalyzerrulestate.rb deleted file mode 100644 index 7e49f4ad..00000000 --- a/lib/puppet/type/dsc_sphealthanalyzerrulestate.rb +++ /dev/null @@ -1,169 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_sphealthanalyzerrulestate) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPHealthAnalyzerRuleState resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/MSFT_SPHealthAnalyzerRuleState.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPHealthAnalyzerRuleState' end - def dscmeta_resource_name; 'MSFT_SPHealthAnalyzerRuleState' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the rule exactly as it appears in central admin" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Enabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Enabled - Should the rule be enabled?" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: RuleScope - # Type: string - # IsMandatory: False - # Values: ["All Servers", "Any Server"] - newparam(:dsc_rulescope) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RuleScope - What is the scope of this rule Valid values are All Servers, Any Server." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['All Servers', 'all servers', 'Any Server', 'any server'].include?(value) - fail("Invalid value '#{value}'. Valid values are All Servers, Any Server") - end - end - end - - # Name: Schedule - # Type: string - # IsMandatory: False - # Values: ["Hourly", "Daily", "Weekly", "Monthly", "OnDemandOnly"] - newparam(:dsc_schedule) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Schedule - How often should the rule check Valid values are Hourly, Daily, Weekly, Monthly, OnDemandOnly." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Hourly', 'hourly', 'Daily', 'daily', 'Weekly', 'weekly', 'Monthly', 'monthly', 'OnDemandOnly', 'ondemandonly'].include?(value) - fail("Invalid value '#{value}'. Valid values are Hourly, Daily, Weekly, Monthly, OnDemandOnly") - end - end - end - - # Name: FixAutomatically - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_fixautomatically) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "FixAutomatically - Should the rule fix itself automatically" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_sphealthanalyzerrulestate).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spinstall.rb b/lib/puppet/type/dsc_spinstall.rb deleted file mode 100644 index ae016a87..00000000 --- a/lib/puppet/type/dsc_spinstall.rb +++ /dev/null @@ -1,150 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spinstall) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPInstall resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPInstall/MSFT_SPInstall.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_binarydir is a required attribute') if self[:dsc_binarydir].nil? - end - - def dscmeta_resource_friendly_name; 'SPInstall' end - def dscmeta_resource_name; 'MSFT_SPInstall' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: BinaryDir - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_binarydir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "BinaryDir - The directory that contains all of the SharePoint binaries" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProductKey - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_productkey) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProductKey - The product key to use during the installation" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstallPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_installpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstallPath - The install directory to use in the installation, leave blank to use the setup defaults" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DataPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_datapath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DataPath - The data directory to use in the installation, leave blank to use the setup defaults" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present to install SharePoint. Absent is currently not supported Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spinstall).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spinstalllanguagepack.rb b/lib/puppet/type/dsc_spinstalllanguagepack.rb deleted file mode 100644 index e118d364..00000000 --- a/lib/puppet/type/dsc_spinstalllanguagepack.rb +++ /dev/null @@ -1,164 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spinstalllanguagepack) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPInstallLanguagePack resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/MSFT_SPInstallLanguagePack.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_binarydir is a required attribute') if self[:dsc_binarydir].nil? - end - - def dscmeta_resource_friendly_name; 'SPInstallLanguagePack' end - def dscmeta_resource_name; 'MSFT_SPInstallLanguagePack' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: BinaryDir - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_binarydir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "BinaryDir - The directory that contains all of the SharePoint binaries" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: BinaryInstallDays - # Type: string[] - # IsMandatory: False - # Values: ["mon", "tue", "wed", "thu", "fri", "sat", "sun"] - newparam(:dsc_binaryinstalldays, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "BinaryInstallDays - Specify on which dates the installation is allowed Valid values are mon, tue, wed, thu, fri, sat, sun." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - if value.kind_of?(Array) - unless (['mon', 'mon', 'tue', 'tue', 'wed', 'wed', 'thu', 'thu', 'fri', 'fri', 'sat', 'sat', 'sun', 'sun'] & value).count == value.count - fail("Invalid value #{value}. Valid values are mon, tue, wed, thu, fri, sat, sun") - end - end - if value.kind_of?(String) - unless ['mon', 'mon', 'tue', 'tue', 'wed', 'wed', 'thu', 'thu', 'fri', 'fri', 'sat', 'sat', 'sun', 'sun'].include?(value) - fail("Invalid value #{value}. Valid values are mon, tue, wed, thu, fri, sat, sun") - end - end - end - munge do |value| - Array(value) - end - end - - # Name: BinaryInstallTime - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_binaryinstalltime) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "BinaryInstallTime - Specify in which time frame the installation is allowed" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present to install SharePoint. Absent is currently not supported Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spinstalllanguagepack).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spinstallprereqs.rb b/lib/puppet/type/dsc_spinstallprereqs.rb deleted file mode 100644 index 9a832038..00000000 --- a/lib/puppet/type/dsc_spinstallprereqs.rb +++ /dev/null @@ -1,376 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spinstallprereqs) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPInstallPrereqs resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/MSFT_SPInstallPrereqs.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_installerpath is a required attribute') if self[:dsc_installerpath].nil? - end - - def dscmeta_resource_friendly_name; 'SPInstallPrereqs' end - def dscmeta_resource_name; 'MSFT_SPInstallPrereqs' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: InstallerPath - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_installerpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstallerPath - The full path to prerequisiteinstaller.exe" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: OnlineMode - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_onlinemode) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "OnlineMode - Should the installer download prerequisites from the internet or not" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: SXSpath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sxspath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SXSpath - The path to the Windows Server Operating System SXS source files, for use in closed environments without access to Windows Update" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLNCli - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlncli) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLNCli - The path to the installer for this prerequisite" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PowerShell - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_powershell) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PowerShell - The path to the installer for this prerequisite" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: NETFX - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_netfx) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "NETFX - The path to the installer for this prerequisite" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IDFX - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_idfx) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IDFX - The path to the installer for this prerequisite" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Sync - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sync) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Sync - The path to the installer for this prerequisite" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AppFabric - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_appfabric) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AppFabric - The path to the installer for this prerequisite" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IDFX11 - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_idfx11) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IDFX11 - The path to the installer for this prerequisite" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MSIPCClient - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_msipcclient) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MSIPCClient - The path to the installer for this prerequisite" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: WCFDataServices - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_wcfdataservices) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WCFDataServices - The path to the installer for this prerequisite" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: KB2671763 - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_kb2671763) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "KB2671763 - The path to the installer for this prerequisite" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: WCFDataServices56 - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_wcfdataservices56) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WCFDataServices56 - The path to the installer for this prerequisite" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MSVCRT11 - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_msvcrt11) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MSVCRT11 - The path to the installer for this prerequisite" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MSVCRT14 - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_msvcrt14) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MSVCRT14 - The path to the installer for this prerequisite" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: KB3092423 - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_kb3092423) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "KB3092423 - The path to the installer for this prerequisite" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ODBC - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_odbc) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ODBC - The path to the installer for this prerequisite" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DotNetFx - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_dotnetfx) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DotNetFx - The path to the installer for this prerequisite" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present to install the prerequisites. Absent is currently not supported Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spinstallprereqs).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spirmsettings.rb b/lib/puppet/type/dsc_spirmsettings.rb deleted file mode 100644 index aeeb7db8..00000000 --- a/lib/puppet/type/dsc_spirmsettings.rb +++ /dev/null @@ -1,137 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spirmsettings) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPIrmSettings resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPIrmSettings/MSFT_SPIrmSettings.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'SPIrmSettings' end - def dscmeta_resource_name; 'MSFT_SPIrmSettings' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Enable or Disable IRM on this farm Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: UseADRMS - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_useadrms) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UseADRMS - Use the RMS server published in this farm's Active Directory" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: RMSserver - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_rmsserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RMSserver - Use the specified RMS server, must provide in URL format" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spirmsettings).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spjoinfarm.rb b/lib/puppet/type/dsc_spjoinfarm.rb deleted file mode 100644 index e21538df..00000000 --- a/lib/puppet/type/dsc_spjoinfarm.rb +++ /dev/null @@ -1,152 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spjoinfarm) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPJoinFarm resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPJoinFarm/MSFT_SPJoinFarm.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_farmconfigdatabasename is a required attribute') if self[:dsc_farmconfigdatabasename].nil? - fail('dsc_databaseserver is a required attribute') if self[:dsc_databaseserver].nil? - end - - def dscmeta_resource_friendly_name; 'SPJoinFarm' end - def dscmeta_resource_name; 'MSFT_SPJoinFarm' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: FarmConfigDatabaseName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_farmconfigdatabasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FarmConfigDatabaseName - The name of the config database to connect to" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseServer - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_databaseserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseServer - The server that hosts the config database" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Passphrase - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_passphrase) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Passphrase - The passphrase that should be used to join the farm" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Passphrase", value) - end - end - - # Name: ServerRole - # Type: string - # IsMandatory: False - # Values: ["Application", "ApplicationWithSearch", "Custom", "DistributedCache", "Search", "SingleServer", "SingleServerFarm", "WebFrontEnd", "WebFrontEndWithDistributedCache"] - newparam(:dsc_serverrole) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServerRole - SharePoint 2016 only - the MinRole role to enroll this server as Valid values are Application, ApplicationWithSearch, Custom, DistributedCache, Search, SingleServer, SingleServerFarm, WebFrontEnd, WebFrontEndWithDistributedCache." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Application', 'application', 'ApplicationWithSearch', 'applicationwithsearch', 'Custom', 'custom', 'DistributedCache', 'distributedcache', 'Search', 'search', 'SingleServer', 'singleserver', 'SingleServerFarm', 'singleserverfarm', 'WebFrontEnd', 'webfrontend', 'WebFrontEndWithDistributedCache', 'webfrontendwithdistributedcache'].include?(value) - fail("Invalid value '#{value}'. Valid values are Application, ApplicationWithSearch, Custom, DistributedCache, Search, SingleServer, SingleServerFarm, WebFrontEnd, WebFrontEndWithDistributedCache") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spjoinfarm).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spmachinetranslationserviceapp.rb b/lib/puppet/type/dsc_spmachinetranslationserviceapp.rb deleted file mode 100644 index f54fb5ad..00000000 --- a/lib/puppet/type/dsc_spmachinetranslationserviceapp.rb +++ /dev/null @@ -1,166 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spmachinetranslationserviceapp) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPMachineTranslationServiceApp resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/MSFT_SPMachineTranslationServiceApp.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPMachineTranslationServiceApp' end - def dscmeta_resource_name; 'MSFT_SPMachineTranslationServiceApp' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Specifies the name of the service application." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseName - Specifies the name of the database for the service application." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databaseserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseServer - Specifies the name of the database server for the service application." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ApplicationPool - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_applicationpool) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApplicationPool - Specifies the application pool to use with the service application." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present ensures service app exists, absent ensures it is removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spmachinetranslationserviceapp).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spmanagedaccount.rb b/lib/puppet/type/dsc_spmanagedaccount.rb deleted file mode 100644 index 9919a220..00000000 --- a/lib/puppet/type/dsc_spmanagedaccount.rb +++ /dev/null @@ -1,188 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spmanagedaccount) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPManagedAccount resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPManagedAccount/MSFT_SPManagedAccount.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_accountname is a required attribute') if self[:dsc_accountname].nil? - end - - def dscmeta_resource_friendly_name; 'SPManagedAccount' end - def dscmeta_resource_name; 'MSFT_SPManagedAccount' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AccountName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_accountname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AccountName - The username of the account" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Account - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_account) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Account - The credential with password of the account" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Account", value) - end - end - - # Name: EmailNotification - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_emailnotification) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "EmailNotification - How many days before a password change should an email be sent" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: PreExpireDays - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_preexpiredays) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "PreExpireDays - How many days before a password expires should it be changed" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Schedule - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_schedule) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Schedule - What is the schedule for the password reset" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present ensures managed account exists, absent ensures it is removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spmanagedaccount).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spmanagedmetadataserviceapp.rb b/lib/puppet/type/dsc_spmanagedmetadataserviceapp.rb deleted file mode 100644 index 634a2757..00000000 --- a/lib/puppet/type/dsc_spmanagedmetadataserviceapp.rb +++ /dev/null @@ -1,214 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spmanagedmetadataserviceapp) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPManagedMetaDataServiceApp resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/MSFT_SPManagedMetaDataServiceApp.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPManagedMetaDataServiceApp' end - def dscmeta_resource_name; 'MSFT_SPManagedMetaDataServiceApp' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the managed metadata service application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProxyName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_proxyname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProxyName - The proxy name, if not specified will be /Name of service app/ Proxy" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ApplicationPool - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_applicationpool) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApplicationPool - The application pool that the service app will use" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databaseserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseServer - The name of the database server which will host the application" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseName - The name of the database for the service application" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TermStoreAdministrators - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_termstoreadministrators, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "TermStoreAdministrators - A list of the users/groups who are administrators of the term store" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present ensures service app exists, absent ensures it is removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: ContentTypeHubUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_contenttypehuburl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ContentTypeHubUrl - The URL of the content type hub for this app (only set when the app is provisioned)" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spmanagedmetadataserviceapp).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spmanagedpath.rb b/lib/puppet/type/dsc_spmanagedpath.rb deleted file mode 100644 index e504c435..00000000 --- a/lib/puppet/type/dsc_spmanagedpath.rb +++ /dev/null @@ -1,170 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spmanagedpath) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPManagedPath resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPManagedPath/MSFT_SPManagedPath.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_webappurl is a required attribute') if self[:dsc_webappurl].nil? - fail('dsc_relativeurl is a required attribute') if self[:dsc_relativeurl].nil? - end - - def dscmeta_resource_friendly_name; 'SPManagedPath' end - def dscmeta_resource_name; 'MSFT_SPManagedPath' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: WebAppUrl - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_webappurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WebAppUrl - The URL of the web application to apply the managed path to - this is ignored for host header web applications" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RelativeUrl - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_relativeurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RelativeUrl - The relative URL of the managed path" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Explicit - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_explicit) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Explicit - Should the host header be explicit? If false then it is a wildcard" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: HostHeader - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_hostheader) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "HostHeader - Is this a host header web application?" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present ensures managed path exists, absent ensures it is removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spmanagedpath).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spofficeonlineserverbinding.rb b/lib/puppet/type/dsc_spofficeonlineserverbinding.rb deleted file mode 100644 index 79b40f77..00000000 --- a/lib/puppet/type/dsc_spofficeonlineserverbinding.rb +++ /dev/null @@ -1,139 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spofficeonlineserverbinding) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPOfficeOnlineServerBinding resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/MSFT_SPOfficeOnlineServerBinding.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_zone is a required attribute') if self[:dsc_zone].nil? - end - - def dscmeta_resource_friendly_name; 'SPOfficeOnlineServerBinding' end - def dscmeta_resource_name; 'MSFT_SPOfficeOnlineServerBinding' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Zone - # Type: string - # IsMandatory: True - # Values: ["Internal-HTTP", "Internal-HTTPS", "External-HTTP", "External-HTTPS"] - newparam(:dsc_zone) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Zone - The zone for this binding Valid values are Internal-HTTP, Internal-HTTPS, External-HTTP, External-HTTPS." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Internal-HTTP', 'internal-http', 'Internal-HTTPS', 'internal-https', 'External-HTTP', 'external-http', 'External-HTTPS', 'external-https'].include?(value) - fail("Invalid value '#{value}'. Valid values are Internal-HTTP, Internal-HTTPS, External-HTTP, External-HTTPS") - end - end - end - - # Name: DnsName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_dnsname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DnsName - The DNS name of the server/s that are running Office Web Apps" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present ensures the binding for this zone exists, absent ensures it doesn't Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spofficeonlineserverbinding).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spoutgoingemailsettings.rb b/lib/puppet/type/dsc_spoutgoingemailsettings.rb deleted file mode 100644 index 35dca2ab..00000000 --- a/lib/puppet/type/dsc_spoutgoingemailsettings.rb +++ /dev/null @@ -1,195 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spoutgoingemailsettings) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPOutgoingEmailSettings resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/MSFT_SPOutgoingEmailSettings.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_webappurl is a required attribute') if self[:dsc_webappurl].nil? - end - - def dscmeta_resource_friendly_name; 'SPOutgoingEmailSettings' end - def dscmeta_resource_name; 'MSFT_SPOutgoingEmailSettings' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: WebAppUrl - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_webappurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WebAppUrl - The URL of the web application. If you want to set the global settings use the Central Admin URL" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SMTPServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_smtpserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SMTPServer - The SMTP server for outgoing mail" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FromAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_fromaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FromAddress - The from address to put on messages" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ReplyToAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_replytoaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ReplyToAddress - The email address that replies should be directed to" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CharacterSet - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_characterset) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CharacterSet - The character set to use on messages" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UseTLS - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_usetls) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UseTLS - Use TLS when connecting to the SMTP server (SharePoint 2016 only)" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: SMTPPort - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_smtpport) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "SMTPPort - The port which is used to connect to the SMTP server (SharePoint 2016 only)" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spoutgoingemailsettings).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_sppasswordchangesettings.rb b/lib/puppet/type/dsc_sppasswordchangesettings.rb deleted file mode 100644 index 1ae8c462..00000000 --- a/lib/puppet/type/dsc_sppasswordchangesettings.rb +++ /dev/null @@ -1,155 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_sppasswordchangesettings) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPPasswordChangeSettings resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/MSFT_SPPasswordChangeSettings.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_mailaddress is a required attribute') if self[:dsc_mailaddress].nil? - end - - def dscmeta_resource_friendly_name; 'SPPasswordChangeSettings' end - def dscmeta_resource_name; 'MSFT_SPPasswordChangeSettings' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: MailAddress - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_mailaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MailAddress - The email address to send notifications of password changes to" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DaysBeforeExpiry - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_daysbeforeexpiry) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "DaysBeforeExpiry - The number of days before password expiry to send send emails" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: PasswordChangeWaitTimeSeconds - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_passwordchangewaittimeseconds) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "PasswordChangeWaitTimeSeconds - The duration that a password reset will wait for before it times out" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: NumberOfRetries - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_numberofretries) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "NumberOfRetries - How many retries if the password change fails" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_sppasswordchangesettings).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spperformancepointserviceapp.rb b/lib/puppet/type/dsc_spperformancepointserviceapp.rb deleted file mode 100644 index 0c995ff6..00000000 --- a/lib/puppet/type/dsc_spperformancepointserviceapp.rb +++ /dev/null @@ -1,181 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spperformancepointserviceapp) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPPerformancePointServiceApp resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/MSFT_SPPerformancePointServiceApp.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPPerformancePointServiceApp' end - def dscmeta_resource_name; 'MSFT_SPPerformancePointServiceApp' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the service application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProxyName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_proxyname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProxyName - The proxy name, if not specified will be /Name of service app/ Proxy" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ApplicationPool - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_applicationpool) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApplicationPool - The name of the application pool to run the service app in" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseName - The name of the database for the service app" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databaseserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseServer - The name of the database server to host the database" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present ensures service app exists, absent ensures it is removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spperformancepointserviceapp).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_sppowerpointautomationserviceapp.rb b/lib/puppet/type/dsc_sppowerpointautomationserviceapp.rb deleted file mode 100644 index 70e3294a..00000000 --- a/lib/puppet/type/dsc_sppowerpointautomationserviceapp.rb +++ /dev/null @@ -1,241 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_sppowerpointautomationserviceapp) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPPowerPointAutomationServiceApp resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPPowerPointAutomationServiceApp/MSFT_SPPowerPointAutomationServiceApp.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPPowerPointAutomationServiceApp' end - def dscmeta_resource_name; 'MSFT_SPPowerPointAutomationServiceApp' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the service application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProxyName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_proxyname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProxyName - The name of the service application proxy" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ApplicationPool - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_applicationpool) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApplicationPool - The name of the application pool to run the service app in" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CacheExpirationPeriodInSeconds - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_cacheexpirationperiodinseconds) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "CacheExpirationPeriodInSeconds - Specifies the maximum time, in seconds, that items remain in the back-end server cache. The default value is 600 seconds (10 minutes)." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaximumConversionsPerWorker - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maximumconversionsperworker) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "MaximumConversionsPerWorker - Specifies the maximum number of presentations that a conversion worker process can convert before recycling. The default value is 5." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: WorkerKeepAliveTimeoutInSeconds - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_workerkeepalivetimeoutinseconds) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "WorkerKeepAliveTimeoutInSeconds - Specifies the maximum time, in seconds, that a conversion worker process can be unresponsive before being terminated. The default value is 120 seconds." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: WorkerProcessCount - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_workerprocesscount) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "WorkerProcessCount - Specifies the number of active instances of the conversion worker process on each back-end. This value must be less than the Windows Communication Foundation (WCF) connection limit for this computer. The default value is 3." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: WorkerTimeoutInSeconds - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_workertimeoutinseconds) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "WorkerTimeoutInSeconds - Specifies the maximum time, in seconds, that a conversion worker process is given for any single conversion. The default is 300 seconds (5 minutes)." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Ensure the crawl rule is Present or Absent Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run thsi resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_sppowerpointautomationserviceapp).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spproductupdate.rb b/lib/puppet/type/dsc_spproductupdate.rb deleted file mode 100644 index 9dfa81f2..00000000 --- a/lib/puppet/type/dsc_spproductupdate.rb +++ /dev/null @@ -1,180 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spproductupdate) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPProductUpdate resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPProductUpdate/MSFT_SPProductUpdate.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_setupfile is a required attribute') if self[:dsc_setupfile].nil? - end - - def dscmeta_resource_friendly_name; 'SPProductUpdate' end - def dscmeta_resource_name; 'MSFT_SPProductUpdate' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: SetupFile - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_setupfile) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SetupFile - The name of the update setup file" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ShutdownServices - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_shutdownservices) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ShutdownServices - Shutdown SharePoint services to speed up installation" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: BinaryInstallDays - # Type: string[] - # IsMandatory: False - # Values: ["mon", "tue", "wed", "thu", "fri", "sat", "sun"] - newparam(:dsc_binaryinstalldays, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "BinaryInstallDays - Specify on which dates the installation is allowed Valid values are mon, tue, wed, thu, fri, sat, sun." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - if value.kind_of?(Array) - unless (['mon', 'mon', 'tue', 'tue', 'wed', 'wed', 'thu', 'thu', 'fri', 'fri', 'sat', 'sat', 'sun', 'sun'] & value).count == value.count - fail("Invalid value #{value}. Valid values are mon, tue, wed, thu, fri, sat, sun") - end - end - if value.kind_of?(String) - unless ['mon', 'mon', 'tue', 'tue', 'wed', 'wed', 'thu', 'thu', 'fri', 'fri', 'sat', 'sat', 'sun', 'sun'].include?(value) - fail("Invalid value #{value}. Valid values are mon, tue, wed, thu, fri, sat, sun") - end - end - end - munge do |value| - Array(value) - end - end - - # Name: BinaryInstallTime - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_binaryinstalltime) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "BinaryInstallTime - Specify in which time frame the installation is allowed" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present to install SharePoint. Absent is currently not supported Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spproductupdate).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_sppublishserviceapplication.rb b/lib/puppet/type/dsc_sppublishserviceapplication.rb deleted file mode 100644 index 54743c5d..00000000 --- a/lib/puppet/type/dsc_sppublishserviceapplication.rb +++ /dev/null @@ -1,121 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_sppublishserviceapplication) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPPublishServiceApplication resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/MSFT_SPPublishServiceApplication.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPPublishServiceApplication' end - def dscmeta_resource_name; 'MSFT_SPPublishServiceApplication' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the service application to publish" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present to ensure it runs on this server, or absent to ensure it is stopped Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_sppublishserviceapplication).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spquotatemplate.rb b/lib/puppet/type/dsc_spquotatemplate.rb deleted file mode 100644 index 762e3ecf..00000000 --- a/lib/puppet/type/dsc_spquotatemplate.rb +++ /dev/null @@ -1,193 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spquotatemplate) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPQuotaTemplate resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/MSFT_SPQuotaTemplate.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPQuotaTemplate' end - def dscmeta_resource_name; 'MSFT_SPQuotaTemplate' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the quota template" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: StorageMaxInMB - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_storagemaxinmb) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "StorageMaxInMB - The maximum storage for sites of this template in MB" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: StorageWarningInMB - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_storagewarninginmb) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "StorageWarningInMB - The amount of storage for sites of this template that triggers a warning" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaximumUsagePointsSolutions - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maximumusagepointssolutions) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "MaximumUsagePointsSolutions - The maximum number of performance points for sandbox solutions for this template" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: WarningUsagePointsSolutions - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_warningusagepointssolutions) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "WarningUsagePointsSolutions - The warning number of performance points for sandbox solutions for this template" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present to create this template, absent to ensure it does not exist Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spquotatemplate).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spremotefarmtrust.rb b/lib/puppet/type/dsc_spremotefarmtrust.rb deleted file mode 100644 index 1a9882b4..00000000 --- a/lib/puppet/type/dsc_spremotefarmtrust.rb +++ /dev/null @@ -1,151 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spremotefarmtrust) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPRemoteFarmTrust resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/MSFT_SPRemoteFarmTrust.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPRemoteFarmTrust' end - def dscmeta_resource_name; 'MSFT_SPRemoteFarmTrust' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - A name of the remote farm, used to create token issuer and root authority" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RemoteWebAppUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_remotewebappurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RemoteWebAppUrl - The URL of a web app in the remote farm, must use HTTPS" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LocalWebAppUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_localwebappurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LocalWebAppUrl - The URL of a local web app to connect the remote farm to" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Set to present to ensure the trust exists, or absent to ensure it is removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spremotefarmtrust).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spsearchauthoritativepage.rb b/lib/puppet/type/dsc_spsearchauthoritativepage.rb deleted file mode 100644 index fcfb49dc..00000000 --- a/lib/puppet/type/dsc_spsearchauthoritativepage.rb +++ /dev/null @@ -1,171 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spsearchauthoritativepage) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPSearchAuthoritativePage resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/MSFT_SPSearchAuthoritativePage.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_serviceappname is a required attribute') if self[:dsc_serviceappname].nil? - fail('dsc_path is a required attribute') if self[:dsc_path].nil? - end - - def dscmeta_resource_friendly_name; 'SPSearchAuthoritativePage' end - def dscmeta_resource_name; 'MSFT_SPSearchAuthoritativePage' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ServiceAppName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_serviceappname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServiceAppName - Search Service Application Name" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Path - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - Source URI for the authoritative page" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Level - # Type: real32 - # IsMandatory: False - # Values: None - newparam(:dsc_level) do - def mof_type; 'real32' end - def mof_is_embedded?; false end - desc "Level - Level of Authoratitive Page, values between 0.0 and 2.0" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Action - # Type: string - # IsMandatory: False - # Values: ["Authoratative", "Demoted"] - newparam(:dsc_action) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Action - The resource will either make the page authoritative or demoted based on this value Valid values are Authoratative, Demoted." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Authoratative', 'authoratative', 'Demoted', 'demoted'].include?(value) - fail("Invalid value '#{value}'. Valid values are Authoratative, Demoted") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Ensure the Authoritative is Present or Absent Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spsearchauthoritativepage).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spsearchcontentsource.rb b/lib/puppet/type/dsc_spsearchcontentsource.rb deleted file mode 100644 index d7464ac3..00000000 --- a/lib/puppet/type/dsc_spsearchcontentsource.rb +++ /dev/null @@ -1,345 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spsearchcontentsource) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - class PuppetX::Dsc::TypeHelpers - def self.validate_MSFT_SPSearchCrawlSchedule(mof_type_map, name, value) - required = ['scheduletype'] - allowed = ['crawlscheduledaysofmonth','crawlscheduledaysofweek','crawlschedulemonthsofyear','starthour','startminute','crawlschedulerepeatduration','crawlschedulerepeatinterval','crawlscheduleruneveryinterval'] - lowkey_hash = Hash[value.map { |k, v| [k.to_s.downcase, v] }] - - missing = required - lowkey_hash.keys - unless missing.empty? - fail "#{name} is missing the following required keys: #{missing.join(',')}" - end - - extraneous = lowkey_hash.keys - required - allowed - unless extraneous.empty? - fail "#{name} includes invalid keys: #{extraneous.join(',')}" - end - - lowkey_hash.keys.each do |key| - if lowkey_hash[key] - validate_mof_type(mof_type_map[key], 'MSFT_SPSearchCrawlSchedule', key, lowkey_hash[key]) - end - end - end - end - - @doc = %q{ - The DSC SPSearchContentSource resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPSearchContentSource/MSFT_SPSearchContentSource.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - fail('dsc_serviceappname is a required attribute') if self[:dsc_serviceappname].nil? - end - - def dscmeta_resource_friendly_name; 'SPSearchContentSource' end - def dscmeta_resource_name; 'MSFT_SPSearchContentSource' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the content source" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ServiceAppName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_serviceappname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServiceAppName - The name of the search service app that this content source exists within" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ContentSourceType - # Type: string - # IsMandatory: False - # Values: ["SharePoint", "Website", "FileShare"] - newparam(:dsc_contentsourcetype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ContentSourceType - The type of content source - currently only SharePoint, Website and File Shares are supported Valid values are SharePoint, Website, FileShare." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['SharePoint', 'sharepoint', 'Website', 'website', 'FileShare', 'fileshare'].include?(value) - fail("Invalid value '#{value}'. Valid values are SharePoint, Website, FileShare") - end - end - end - - # Name: Addresses - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_addresses, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Addresses - A list of the addresses this content source includes" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: CrawlSetting - # Type: string - # IsMandatory: False - # Values: ["CrawlEverything", "CrawlFirstOnly", "Custom"] - newparam(:dsc_crawlsetting) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CrawlSetting - Should the crawler index everything, just the first site or page, or a custom depth (applies to websites only) Valid values are CrawlEverything, CrawlFirstOnly, Custom." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['CrawlEverything', 'crawleverything', 'CrawlFirstOnly', 'crawlfirstonly', 'Custom', 'custom'].include?(value) - fail("Invalid value '#{value}'. Valid values are CrawlEverything, CrawlFirstOnly, Custom") - end - end - end - - # Name: ContinuousCrawl - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_continuouscrawl) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ContinuousCrawl - Should this content source use continuous crawl (SharePoint sites only)" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: IncrementalSchedule - # Type: MSFT_SPSearchCrawlSchedule - # IsMandatory: False - # Values: None - newparam(:dsc_incrementalschedule) do - def mof_type; 'MSFT_SPSearchCrawlSchedule' end - def mof_is_embedded?; true end - def mof_type_map - {"scheduletype"=>{:type=>"string", :values=>["None", "Daily", "Weekly", "Monthly"]}, "crawlscheduledaysofmonth"=>{:type=>"uint32"}, "crawlscheduledaysofweek"=>{:type=>"string[]", :values=>["Everyday", "Weekdays", "Weekends", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]}, "crawlschedulemonthsofyear"=>{:type=>"string[]", :values=>["AllMonths", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]}, "starthour"=>{:type=>"uint32"}, "startminute"=>{:type=>"uint32"}, "crawlschedulerepeatduration"=>{:type=>"uint32"}, "crawlschedulerepeatinterval"=>{:type=>"uint32"}, "crawlscheduleruneveryinterval"=>{:type=>"uint32"}} - end - desc "IncrementalSchedule - What is the incremental schedule for this content source" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_SPSearchCrawlSchedule(mof_type_map, "IncrementalSchedule", value) - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, value) - end - end - - # Name: FullSchedule - # Type: MSFT_SPSearchCrawlSchedule - # IsMandatory: False - # Values: None - newparam(:dsc_fullschedule) do - def mof_type; 'MSFT_SPSearchCrawlSchedule' end - def mof_is_embedded?; true end - def mof_type_map - {"scheduletype"=>{:type=>"string", :values=>["None", "Daily", "Weekly", "Monthly"]}, "crawlscheduledaysofmonth"=>{:type=>"uint32"}, "crawlscheduledaysofweek"=>{:type=>"string[]", :values=>["Everyday", "Weekdays", "Weekends", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]}, "crawlschedulemonthsofyear"=>{:type=>"string[]", :values=>["AllMonths", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]}, "starthour"=>{:type=>"uint32"}, "startminute"=>{:type=>"uint32"}, "crawlschedulerepeatduration"=>{:type=>"uint32"}, "crawlschedulerepeatinterval"=>{:type=>"uint32"}, "crawlscheduleruneveryinterval"=>{:type=>"uint32"}} - end - desc "FullSchedule - What is the full schedule for this content source" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_SPSearchCrawlSchedule(mof_type_map, "FullSchedule", value) - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, value) - end - end - - # Name: Priority - # Type: string - # IsMandatory: False - # Values: ["Normal", "High"] - newparam(:dsc_priority) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Priority - What is the priority on this content source Valid values are Normal, High." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Normal', 'normal', 'High', 'high'].include?(value) - fail("Invalid value '#{value}'. Valid values are Normal, High") - end - end - end - - # Name: LimitPageDepth - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_limitpagedepth) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "LimitPageDepth - How many pages deep should the crawler go (-1 = unlimited, website sources only)" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: LimitServerHops - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_limitserverhops) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "LimitServerHops - How many server hops should the crawler make (-1 = unlimtied, website sources only)" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present if the source should exist, absent if it should not Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Force - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_force) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Force - Specify true if DSC is allowed to delete and recreate a content source to apply the correct settings, otherwise false will just report errors if a change can not be applied." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spsearchcontentsource).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spsearchcrawlerimpactrule.rb b/lib/puppet/type/dsc_spsearchcrawlerimpactrule.rb deleted file mode 100644 index 14058c8d..00000000 --- a/lib/puppet/type/dsc_spsearchcrawlerimpactrule.rb +++ /dev/null @@ -1,189 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spsearchcrawlerimpactrule) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPSearchCrawlerImpactRule resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/MSFT_SPSearchCrawlerImpactRule.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_serviceappname is a required attribute') if self[:dsc_serviceappname].nil? - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPSearchCrawlerImpactRule' end - def dscmeta_resource_name; 'MSFT_SPSearchCrawlerImpactRule' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ServiceAppName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_serviceappname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServiceAppName - Search Service Application Name" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The Site for the crawl impact rule" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Behavior - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_behavior) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Behavior - The Behavior (RequestLimit or WaitTime) for this crawl impact rule" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RequestLimit - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_requestlimit) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "RequestLimit - The RequestLimit setting for the crawl impact rule" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: WaitTime - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_waittime) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "WaitTime - The WaitTime setting for the crawl impact rule" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Ensure the crawl rule is Present or Absent Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spsearchcrawlerimpactrule).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spsearchcrawlmapping.rb b/lib/puppet/type/dsc_spsearchcrawlmapping.rb deleted file mode 100644 index 71f3b64b..00000000 --- a/lib/puppet/type/dsc_spsearchcrawlmapping.rb +++ /dev/null @@ -1,153 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spsearchcrawlmapping) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPSearchCrawlMapping resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/MSFT_SPSearchCrawlMapping.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_serviceappname is a required attribute') if self[:dsc_serviceappname].nil? - fail('dsc_url is a required attribute') if self[:dsc_url].nil? - end - - def dscmeta_resource_friendly_name; 'SPSearchCrawlMapping' end - def dscmeta_resource_name; 'MSFT_SPSearchCrawlMapping' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ServiceAppName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_serviceappname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServiceAppName - Search Service Application Name" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Url - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_url) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Url - Source URI for the crawl mapping" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Target - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_target) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Target - Target URI for the crawl mapping" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Ensure the crawl mapping is Present or Absent Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spsearchcrawlmapping).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spsearchcrawlrule.rb b/lib/puppet/type/dsc_spsearchcrawlrule.rb deleted file mode 100644 index 0733cee8..00000000 --- a/lib/puppet/type/dsc_spsearchcrawlrule.rb +++ /dev/null @@ -1,231 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spsearchcrawlrule) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPSearchCrawlRule resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/MSFT_SPSearchCrawlRule.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_path is a required attribute') if self[:dsc_path].nil? - end - - def dscmeta_resource_friendly_name; 'SPSearchCrawlRule' end - def dscmeta_resource_name; 'MSFT_SPSearchCrawlRule' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Path - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - The name of the search service application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ServiceAppName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_serviceappname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServiceAppName - The name of the search service application" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AuthenticationType - # Type: string - # IsMandatory: False - # Values: ["DefaultRuleAccess", "BasicAccountRuleAccess", "CertificateRuleAccess", "NTLMAccountRuleAccess", "FormRuleAccess", "CookieRuleAccess", "AnonymousAccess"] - newparam(:dsc_authenticationtype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AuthenticationType - Authentication type used by the crawl rule Valid values are DefaultRuleAccess, BasicAccountRuleAccess, CertificateRuleAccess, NTLMAccountRuleAccess, FormRuleAccess, CookieRuleAccess, AnonymousAccess." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['DefaultRuleAccess', 'defaultruleaccess', 'BasicAccountRuleAccess', 'basicaccountruleaccess', 'CertificateRuleAccess', 'certificateruleaccess', 'NTLMAccountRuleAccess', 'ntlmaccountruleaccess', 'FormRuleAccess', 'formruleaccess', 'CookieRuleAccess', 'cookieruleaccess', 'AnonymousAccess', 'anonymousaccess'].include?(value) - fail("Invalid value '#{value}'. Valid values are DefaultRuleAccess, BasicAccountRuleAccess, CertificateRuleAccess, NTLMAccountRuleAccess, FormRuleAccess, CookieRuleAccess, AnonymousAccess") - end - end - end - - # Name: RuleType - # Type: string - # IsMandatory: False - # Values: ["InclusionRule", "ExclusionRule"] - newparam(:dsc_ruletype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RuleType - The type of the rule Valid values are InclusionRule, ExclusionRule." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['InclusionRule', 'inclusionrule', 'ExclusionRule', 'exclusionrule'].include?(value) - fail("Invalid value '#{value}'. Valid values are InclusionRule, ExclusionRule") - end - end - end - - # Name: CrawlConfigurationRules - # Type: string[] - # IsMandatory: False - # Values: ["FollowLinksNoPageCrawl", "CrawlComplexUrls", "CrawlAsHTTP"] - newparam(:dsc_crawlconfigurationrules, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "CrawlConfigurationRules - The configuration options for this rule Valid values are FollowLinksNoPageCrawl, CrawlComplexUrls, CrawlAsHTTP." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - if value.kind_of?(Array) - unless (['FollowLinksNoPageCrawl', 'followlinksnopagecrawl', 'CrawlComplexUrls', 'crawlcomplexurls', 'CrawlAsHTTP', 'crawlashttp'] & value).count == value.count - fail("Invalid value #{value}. Valid values are FollowLinksNoPageCrawl, CrawlComplexUrls, CrawlAsHTTP") - end - end - if value.kind_of?(String) - unless ['FollowLinksNoPageCrawl', 'followlinksnopagecrawl', 'CrawlComplexUrls', 'crawlcomplexurls', 'CrawlAsHTTP', 'crawlashttp'].include?(value) - fail("Invalid value #{value}. Valid values are FollowLinksNoPageCrawl, CrawlComplexUrls, CrawlAsHTTP") - end - end - end - munge do |value| - Array(value) - end - end - - # Name: AuthenticationCredentials - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_authenticationcredentials) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "AuthenticationCredentials - The credentials used for this crawl rule (used for types BasicAccountRuleAccess and NTLMAccountRuleAccess)" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("AuthenticationCredentials", value) - end - end - - # Name: CertificateName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_certificatename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CertificateName - The certificate used for this crawl rule (used for type CertificateRuleAccess)" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present if the crawl rule should exist, absent if it should not Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spsearchcrawlrule).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spsearchfiletype.rb b/lib/puppet/type/dsc_spsearchfiletype.rb deleted file mode 100644 index 48258206..00000000 --- a/lib/puppet/type/dsc_spsearchfiletype.rb +++ /dev/null @@ -1,184 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spsearchfiletype) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPSearchFileType resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPSearchFileType/MSFT_SPSearchFileType.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_filetype is a required attribute') if self[:dsc_filetype].nil? - fail('dsc_serviceappname is a required attribute') if self[:dsc_serviceappname].nil? - end - - def dscmeta_resource_friendly_name; 'SPSearchFileType' end - def dscmeta_resource_name; 'MSFT_SPSearchFileType' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: FileType - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_filetype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FileType - The name of the file type" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ServiceAppName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_serviceappname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServiceAppName - The name of the search service application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - The description of the file type" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MimeType - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_mimetype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MimeType - The mime type of the file type" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Enabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Enabled - The state of the file type" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present if the file type should exist, absent if it should not Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spsearchfiletype).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spsearchindexpartition.rb b/lib/puppet/type/dsc_spsearchindexpartition.rb deleted file mode 100644 index d3c90c6e..00000000 --- a/lib/puppet/type/dsc_spsearchindexpartition.rb +++ /dev/null @@ -1,154 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spsearchindexpartition) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPSearchIndexPartition resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/MSFT_SPSearchIndexPartition.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_index is a required attribute') if self[:dsc_index].nil? - fail('dsc_serviceappname is a required attribute') if self[:dsc_serviceappname].nil? - end - - def dscmeta_resource_friendly_name; 'SPSearchIndexPartition' end - def dscmeta_resource_name; 'MSFT_SPSearchIndexPartition' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Index - # Type: uint32 - # IsMandatory: True - # Values: None - newparam(:dsc_index) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "Index - The number of the partition in this farm" - isrequired - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Servers - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_servers, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Servers - A list of the servers that this partition should exist on" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: RootDirectory - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_rootdirectory) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RootDirectory - The directory that the index should use locally on each server to store data" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ServiceAppName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_serviceappname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServiceAppName - The name of the search service application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spsearchindexpartition).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spsearchresultsource.rb b/lib/puppet/type/dsc_spsearchresultsource.rb deleted file mode 100644 index f34dc22d..00000000 --- a/lib/puppet/type/dsc_spsearchresultsource.rb +++ /dev/null @@ -1,184 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spsearchresultsource) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPSearchResultSource resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPSearchResultSource/MSFT_SPSearchResultSource.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPSearchResultSource' end - def dscmeta_resource_name; 'MSFT_SPSearchResultSource' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the result source" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SearchServiceAppName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_searchserviceappname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SearchServiceAppName - The name of the search service application to associate this result source with" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Query - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_query) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Query - The query to pass to the provider source" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProviderType - # Type: string - # IsMandatory: False - # Values: ["Exchange Search Provider", "Local People Provider", "Local SharePoint Provider", "OpenSearch Provider", "Remote People Provider", "Remote SharePoint Provider"] - newparam(:dsc_providertype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProviderType - The provider type to use for the result source Valid values are Exchange Search Provider, Local People Provider, Local SharePoint Provider, OpenSearch Provider, Remote People Provider, Remote SharePoint Provider." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Exchange Search Provider', 'exchange search provider', 'Local People Provider', 'local people provider', 'Local SharePoint Provider', 'local sharepoint provider', 'OpenSearch Provider', 'opensearch provider', 'Remote People Provider', 'remote people provider', 'Remote SharePoint Provider', 'remote sharepoint provider'].include?(value) - fail("Invalid value '#{value}'. Valid values are Exchange Search Provider, Local People Provider, Local SharePoint Provider, OpenSearch Provider, Remote People Provider, Remote SharePoint Provider") - end - end - end - - # Name: ConnectionUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_connectionurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConnectionUrl - The URI to connect to the remote location" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present if the result source should exist, absent if it should not Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spsearchresultsource).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spsearchserviceapp.rb b/lib/puppet/type/dsc_spsearchserviceapp.rb deleted file mode 100644 index b036c741..00000000 --- a/lib/puppet/type/dsc_spsearchserviceapp.rb +++ /dev/null @@ -1,244 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spsearchserviceapp) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPSearchServiceApp resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/MSFT_SPSearchServiceApp.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPSearchServiceApp' end - def dscmeta_resource_name; 'MSFT_SPSearchServiceApp' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the search service application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProxyName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_proxyname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProxyName - The proxy name, if not specified will be /Name of service app/ Proxy" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ApplicationPool - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_applicationpool) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApplicationPool - The application pool that it should run in" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SearchCenterUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_searchcenterurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SearchCenterUrl - The URL of the enterprise search center site collection" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseName - The name of the database (noting that some search databases will use this as a prefix)" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databaseserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseServer - The server that host the databases for this service application" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DefaultContentAccessAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_defaultcontentaccessaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "DefaultContentAccessAccount - The default content access account for this search service app" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("DefaultContentAccessAccount", value) - end - end - - # Name: CloudIndex - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_cloudindex) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "CloudIndex - Should this search service application be a cloud based service app" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present if the service app should exist, absent if it should not Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: WindowsServiceAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_windowsserviceaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "WindowsServiceAccount - Sets the windows services for search to run as this account" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("WindowsServiceAccount", value) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spsearchserviceapp).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spsearchtopology.rb b/lib/puppet/type/dsc_spsearchtopology.rb deleted file mode 100644 index 17289a4e..00000000 --- a/lib/puppet/type/dsc_spsearchtopology.rb +++ /dev/null @@ -1,224 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spsearchtopology) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPSearchTopology resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPSearchTopology/MSFT_SPSearchTopology.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_serviceappname is a required attribute') if self[:dsc_serviceappname].nil? - end - - def dscmeta_resource_friendly_name; 'SPSearchTopology' end - def dscmeta_resource_name; 'MSFT_SPSearchTopology' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ServiceAppName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_serviceappname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServiceAppName - The name of the search service application for this topology" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Admin - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_admin, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Admin - A list of servers that will run the admin component" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Crawler - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_crawler, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Crawler - A list of servers that will run the crawler component" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ContentProcessing - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_contentprocessing, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ContentProcessing - A list of servers that will run the content processing component" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: AnalyticsProcessing - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_analyticsprocessing, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "AnalyticsProcessing - A list of servers that will run the analytics processing component" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: QueryProcessing - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_queryprocessing, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "QueryProcessing - A list of servers that will run the query processing component" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: IndexPartition - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_indexpartition, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "IndexPartition - A list of servers that will host the first (0) index partition" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: FirstPartitionDirectory - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_firstpartitiondirectory) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FirstPartitionDirectory - The local directory servers will use to store the first index partition" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spsearchtopology).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spsecurestoreserviceapp.rb b/lib/puppet/type/dsc_spsecurestoreserviceapp.rb deleted file mode 100644 index 0010ba6d..00000000 --- a/lib/puppet/type/dsc_spsecurestoreserviceapp.rb +++ /dev/null @@ -1,296 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spsecurestoreserviceapp) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPSecureStoreServiceApp resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/MSFT_SPSecureStoreServiceApp.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPSecureStoreServiceApp' end - def dscmeta_resource_name; 'MSFT_SPSecureStoreServiceApp' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the secure store service app" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProxyName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_proxyname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProxyName - The proxy name, if not specified will be /Name of service app/ Proxy" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ApplicationPool - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_applicationpool) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApplicationPool - The name of the application pool it will run in" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AuditingEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_auditingenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AuditingEnabled - Is auditing enabled for this service app" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AuditlogMaxSize - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_auditlogmaxsize) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "AuditlogMaxSize - What is the maximum size of the audit log in MB" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: DatabaseCredentials - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_databasecredentials) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "DatabaseCredentials - What SQL credentials should be used to access the database" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("DatabaseCredentials", value) - end - end - - # Name: DatabaseName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseName - The name of the database for the service app" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databaseserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseServer - The name of the database server to host the database" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseAuthenticationType - # Type: string - # IsMandatory: False - # Values: ["Windows", "SQL"] - newparam(:dsc_databaseauthenticationtype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseAuthenticationType - What type of authentication should be used to access the database Valid values are Windows, SQL." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Windows', 'windows', 'SQL', 'sql'].include?(value) - fail("Invalid value '#{value}'. Valid values are Windows, SQL") - end - end - end - - # Name: FailoverDatabaseServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_failoverdatabaseserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FailoverDatabaseServer - The name of the database server hosting a failover instance of the database" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PartitionMode - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_partitionmode) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "PartitionMode - Is partition mode enabled for this service app" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Sharing - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_sharing) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Sharing - Is sharing enabled for this service app" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present if the service app should exist, absent if it should not Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spsecurestoreserviceapp).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spserviceapppool.rb b/lib/puppet/type/dsc_spserviceapppool.rb deleted file mode 100644 index f86feeee..00000000 --- a/lib/puppet/type/dsc_spserviceapppool.rb +++ /dev/null @@ -1,136 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spserviceapppool) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPServiceAppPool resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPServiceAppPool/MSFT_SPServiceAppPool.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPServiceAppPool' end - def dscmeta_resource_name; 'MSFT_SPServiceAppPool' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of application pool" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ServiceAccount - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_serviceaccount) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServiceAccount - The name of the managed account to run this service account as" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present if the service app pool should exist, absent if it should not Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spserviceapppool).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spserviceappproxygroup.rb b/lib/puppet/type/dsc_spserviceappproxygroup.rb deleted file mode 100644 index 357c9e53..00000000 --- a/lib/puppet/type/dsc_spserviceappproxygroup.rb +++ /dev/null @@ -1,175 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spserviceappproxygroup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPServiceAppProxyGroup resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/MSFT_SPServiceAppProxyGroup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPServiceAppProxyGroup' end - def dscmeta_resource_name; 'MSFT_SPServiceAppProxyGroup' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of the Proxy Group to create" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present creates the proxy group if it does not already exist, Absent will delete the proxy group if it exists Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: ServiceAppProxies - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_serviceappproxies, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ServiceAppProxies - List of service application proxies that belong in this proxy group, all others will be removed" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ServiceAppProxiesToInclude - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_serviceappproxiestoinclude, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ServiceAppProxiesToInclude - List of service application proxies to add to this proxy group, existing proxies will remain" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ServiceAppProxiesToExclude - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_serviceappproxiestoexclude, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ServiceAppProxiesToExclude - List of service application proxies to remove from this proxy grop, all others will remain" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spserviceappproxygroup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spserviceappsecurity.rb b/lib/puppet/type/dsc_spserviceappsecurity.rb deleted file mode 100644 index 7523254d..00000000 --- a/lib/puppet/type/dsc_spserviceappsecurity.rb +++ /dev/null @@ -1,218 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spserviceappsecurity) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - class PuppetX::Dsc::TypeHelpers - def self.validate_MSFT_SPServiceAppSecurityEntry(mof_type_map, name, value) - required = ['accesslevel'] - allowed = ['username'] - lowkey_hash = Hash[value.map { |k, v| [k.to_s.downcase, v] }] - - missing = required - lowkey_hash.keys - unless missing.empty? - fail "#{name} is missing the following required keys: #{missing.join(',')}" - end - - extraneous = lowkey_hash.keys - required - allowed - unless extraneous.empty? - fail "#{name} includes invalid keys: #{extraneous.join(',')}" - end - - lowkey_hash.keys.each do |key| - if lowkey_hash[key] - validate_mof_type(mof_type_map[key], 'MSFT_SPServiceAppSecurityEntry', key, lowkey_hash[key]) - end - end - end - end - - @doc = %q{ - The DSC SPServiceAppSecurity resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/MSFT_SPServiceAppSecurity.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_serviceappname is a required attribute') if self[:dsc_serviceappname].nil? - fail('dsc_securitytype is a required attribute') if self[:dsc_securitytype].nil? - end - - def dscmeta_resource_friendly_name; 'SPServiceAppSecurity' end - def dscmeta_resource_name; 'MSFT_SPServiceAppSecurity' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ServiceAppName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_serviceappname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServiceAppName - The name of the service application you wish to apply security settings to" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SecurityType - # Type: string - # IsMandatory: True - # Values: ["Administrators", "SharingPermissions"] - newparam(:dsc_securitytype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SecurityType - Administrators will set the administrators for the service app, SharingPermissions will set those granted access through the permissions button seen in the Sharing section of the ribbon in central admin Valid values are Administrators, SharingPermissions." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Administrators', 'administrators', 'SharingPermissions', 'sharingpermissions'].include?(value) - fail("Invalid value '#{value}'. Valid values are Administrators, SharingPermissions") - end - end - end - - # Name: Members - # Type: MSFT_SPServiceAppSecurityEntry[] - # IsMandatory: False - # Values: None - newparam(:dsc_members, :array_matching => :all) do - def mof_type; 'MSFT_SPServiceAppSecurityEntry[]' end - def mof_is_embedded?; true end - def mof_type_map - {"username"=>{:type=>"string"}, "accesslevel"=>{:type=>"string", :values=>["Change Permissions", "Full Control", "Write", "Read"]}} - end - desc "Members - A list of members to set the group to. Those not in this list will be removed" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be an array of hashes or a hash") - end - (value.kind_of?(Hash) ? [value] : value).each_with_index do |v, i| - fail "Members value at index #{i} should be a Hash" unless v.is_a? Hash - - PuppetX::Dsc::TypeHelpers.validate_MSFT_SPServiceAppSecurityEntry(mof_type_map, "Members", v) - end - end - munge do |value| - value.kind_of?(Hash) ? - [PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, value)] : - value.map { |v| PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, v) } - end - end - - # Name: MembersToInclude - # Type: MSFT_SPServiceAppSecurityEntry[] - # IsMandatory: False - # Values: None - newparam(:dsc_memberstoinclude, :array_matching => :all) do - def mof_type; 'MSFT_SPServiceAppSecurityEntry[]' end - def mof_is_embedded?; true end - def mof_type_map - {"username"=>{:type=>"string"}, "accesslevel"=>{:type=>"string", :values=>["Change Permissions", "Full Control", "Write", "Read"]}} - end - desc "MembersToInclude - A list of members to add. Members not in this list will be left in the group" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be an array of hashes or a hash") - end - (value.kind_of?(Hash) ? [value] : value).each_with_index do |v, i| - fail "MembersToInclude value at index #{i} should be a Hash" unless v.is_a? Hash - - PuppetX::Dsc::TypeHelpers.validate_MSFT_SPServiceAppSecurityEntry(mof_type_map, "MembersToInclude", v) - end - end - munge do |value| - value.kind_of?(Hash) ? - [PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, value)] : - value.map { |v| PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, v) } - end - end - - # Name: MembersToExclude - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_memberstoexclude, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "MembersToExclude - A list of members to remove. Members not in this list will be left in the group" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spserviceappsecurity).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spserviceinstance.rb b/lib/puppet/type/dsc_spserviceinstance.rb deleted file mode 100644 index 3efe3bb4..00000000 --- a/lib/puppet/type/dsc_spserviceinstance.rb +++ /dev/null @@ -1,121 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spserviceinstance) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPServiceInstance resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPServiceInstance/MSFT_SPServiceInstance.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPServiceInstance' end - def dscmeta_resource_name; 'MSFT_SPServiceInstance' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the service instance to manage" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present to ensure it runs on this server, or absent to ensure it is stopped Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spserviceinstance).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spsessionstateservice.rb b/lib/puppet/type/dsc_spsessionstateservice.rb deleted file mode 100644 index 17e5702b..00000000 --- a/lib/puppet/type/dsc_spsessionstateservice.rb +++ /dev/null @@ -1,156 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spsessionstateservice) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPSessionStateService resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPSessionStateService/MSFT_SPSessionStateService.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_databasename is a required attribute') if self[:dsc_databasename].nil? - fail('dsc_databaseserver is a required attribute') if self[:dsc_databaseserver].nil? - end - - def dscmeta_resource_friendly_name; 'SPSessionStateService' end - def dscmeta_resource_name; 'MSFT_SPSessionStateService' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: DatabaseName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_databasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseName - The name of the database for the service" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseServer - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_databaseserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseServer - The name of the database server for the database" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present is the state service should be enabled, absent if it should be disabled Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SessionTimeout - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_sessiontimeout) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "SessionTimeout - What is the timeout on sessions" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spsessionstateservice).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spshelladmins.rb b/lib/puppet/type/dsc_spshelladmins.rb deleted file mode 100644 index 83402294..00000000 --- a/lib/puppet/type/dsc_spshelladmins.rb +++ /dev/null @@ -1,222 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spshelladmins) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - class PuppetX::Dsc::TypeHelpers - def self.validate_MSFT_SPContentDatabasePermissions(mof_type_map, name, value) - required = [] - allowed = ['name','members','memberstoinclude','memberstoexclude'] - lowkey_hash = Hash[value.map { |k, v| [k.to_s.downcase, v] }] - - missing = required - lowkey_hash.keys - unless missing.empty? - fail "#{name} is missing the following required keys: #{missing.join(',')}" - end - - extraneous = lowkey_hash.keys - required - allowed - unless extraneous.empty? - fail "#{name} includes invalid keys: #{extraneous.join(',')}" - end - - lowkey_hash.keys.each do |key| - if lowkey_hash[key] - validate_mof_type(mof_type_map[key], 'MSFT_SPContentDatabasePermissions', key, lowkey_hash[key]) - end - end - end - end - - @doc = %q{ - The DSC SPShellAdmins resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPShellAdmins/MSFT_SPShellAdmins.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPShellAdmins' end - def dscmeta_resource_name; 'MSFT_SPShellAdmins' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name for the config, used for administration purposes" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Members - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_members, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Members - Exact list of accounts that will have to get Shell Admin permissions" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: MembersToInclude - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_memberstoinclude, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "MembersToInclude - List of all accounts that must be in the Shell Admins group" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: MembersToExclude - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_memberstoexclude, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "MembersToExclude - List of all accounts that are not allowed to have Shell Admin permissions" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ContentDatabases - # Type: MSFT_SPContentDatabasePermissions[] - # IsMandatory: False - # Values: None - newparam(:dsc_contentdatabases, :array_matching => :all) do - def mof_type; 'MSFT_SPContentDatabasePermissions[]' end - def mof_is_embedded?; true end - def mof_type_map - {"name"=>{:type=>"string"}, "members"=>{:type=>"string[]"}, "memberstoinclude"=>{:type=>"string[]"}, "memberstoexclude"=>{:type=>"string[]"}} - end - desc "ContentDatabases - Shell Admin configuration of Content Databases" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be an array of hashes or a hash") - end - (value.kind_of?(Hash) ? [value] : value).each_with_index do |v, i| - fail "ContentDatabases value at index #{i} should be a Hash" unless v.is_a? Hash - - PuppetX::Dsc::TypeHelpers.validate_MSFT_SPContentDatabasePermissions(mof_type_map, "ContentDatabases", v) - end - end - munge do |value| - value.kind_of?(Hash) ? - [PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, value)] : - value.map { |v| PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, v) } - end - end - - # Name: AllContentDatabases - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allcontentdatabases) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllContentDatabases - Specify if all content databases must get the same config as the general config" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spshelladmins).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spsite.rb b/lib/puppet/type/dsc_spsite.rb deleted file mode 100644 index 3f572db7..00000000 --- a/lib/puppet/type/dsc_spsite.rb +++ /dev/null @@ -1,287 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spsite) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPSite resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPSite/MSFT_SPSite.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_url is a required attribute') if self[:dsc_url].nil? - end - - def dscmeta_resource_friendly_name; 'SPSite' end - def dscmeta_resource_name; 'MSFT_SPSite' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Url - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_url) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Url - The URL of the site collection" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: OwnerAlias - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_owneralias) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "OwnerAlias - The username of the site collection administrator" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CompatibilityLevel - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_compatibilitylevel) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "CompatibilityLevel - The compatibility level of the site" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ContentDatabase - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_contentdatabase) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ContentDatabase - The name of the content database to create the site in" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - The description to apply to the site collection" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: HostHeaderWebApplication - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_hostheaderwebapplication) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "HostHeaderWebApplication - The URL of the host header web application to create this site in" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Language - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_language) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "Language - The language code of the site" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Name - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The display name of the site collection" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: OwnerEmail - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_owneremail) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "OwnerEmail - The email address of the site collection administrator" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: QuotaTemplate - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_quotatemplate) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "QuotaTemplate - The quota template to apply to the site collection" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SecondaryEmail - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_secondaryemail) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SecondaryEmail - The secondary site collection admin email address" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SecondaryOwnerAlias - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_secondaryowneralias) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SecondaryOwnerAlias - The secondary site collection admin username" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Template - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_template) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Template - The template to apply to the site collection" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spsite).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spstateserviceapp.rb b/lib/puppet/type/dsc_spstateserviceapp.rb deleted file mode 100644 index 39721587..00000000 --- a/lib/puppet/type/dsc_spstateserviceapp.rb +++ /dev/null @@ -1,167 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spstateserviceapp) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPStateServiceApp resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPStateServiceApp/MSFT_SPStateServiceApp.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPStateServiceApp' end - def dscmeta_resource_name; 'MSFT_SPStateServiceApp' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the state service app" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseCredentials - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_databasecredentials) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "DatabaseCredentials - The database credentials for accessing the database" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("DatabaseCredentials", value) - end - end - - # Name: DatabaseName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseName - The name of the database for the service app" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databaseserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseServer - The name of the database server" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present if the service app should exist, absent if it should not Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spstateserviceapp).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spsubscriptionsettingsserviceapp.rb b/lib/puppet/type/dsc_spsubscriptionsettingsserviceapp.rb deleted file mode 100644 index 9fb14e56..00000000 --- a/lib/puppet/type/dsc_spsubscriptionsettingsserviceapp.rb +++ /dev/null @@ -1,166 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spsubscriptionsettingsserviceapp) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPSubscriptionSettingsServiceApp resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/MSFT_SPSubscriptionSettingsServiceApp.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPSubscriptionSettingsServiceApp' end - def dscmeta_resource_name; 'MSFT_SPSubscriptionSettingsServiceApp' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the subscription settings service app" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ApplicationPool - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_applicationpool) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApplicationPool - The name of the application pool the service app runs in" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseName - The name of the database for the service app" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databaseserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseServer - The name of the database server" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present if the service app should exist, absent if it should not Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spsubscriptionsettingsserviceapp).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_sptimerjobstate.rb b/lib/puppet/type/dsc_sptimerjobstate.rb deleted file mode 100644 index 826fb18d..00000000 --- a/lib/puppet/type/dsc_sptimerjobstate.rb +++ /dev/null @@ -1,147 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_sptimerjobstate) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPTimerJobState resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPTimerJobState' end - def dscmeta_resource_name; 'MSFT_SPTimerJobState' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The internal name of the timer job (not the display name)" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: WebApplication - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_webapplication) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WebApplication - The name of the web application that the timer job belongs to" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Enabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Enabled - Should the timer job be enabled or not" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Schedule - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_schedule) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Schedule - The schedule for the timer job to execute on" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_sptimerjobstate).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_sptrustedidentitytokenissuer.rb b/lib/puppet/type/dsc_sptrustedidentitytokenissuer.rb deleted file mode 100644 index 95f7f5fe..00000000 --- a/lib/puppet/type/dsc_sptrustedidentitytokenissuer.rb +++ /dev/null @@ -1,292 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_sptrustedidentitytokenissuer) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - class PuppetX::Dsc::TypeHelpers - def self.validate_MSFT_SPClaimTypeMapping(mof_type_map, name, value) - required = ['incomingclaimtype'] - allowed = ['name','localclaimtype'] - lowkey_hash = Hash[value.map { |k, v| [k.to_s.downcase, v] }] - - missing = required - lowkey_hash.keys - unless missing.empty? - fail "#{name} is missing the following required keys: #{missing.join(',')}" - end - - extraneous = lowkey_hash.keys - required - allowed - unless extraneous.empty? - fail "#{name} includes invalid keys: #{extraneous.join(',')}" - end - - lowkey_hash.keys.each do |key| - if lowkey_hash[key] - validate_mof_type(mof_type_map[key], 'MSFT_SPClaimTypeMapping', key, lowkey_hash[key]) - end - end - end - end - - @doc = %q{ - The DSC SPTrustedIdentityTokenIssuer resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/MSFT_SPTrustedIdentityTokenIssuer.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPTrustedIdentityTokenIssuer' end - def dscmeta_resource_name; 'MSFT_SPTrustedIdentityTokenIssuer' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of the SPTrustedIdentityTokenIssuer" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - Description of the SPTrustedIdentityTokenIssuer" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Realm - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_realm) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Realm - Default Realm that is passed to identity provider" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SignInUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_signinurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SignInUrl - URL of the identity provider where user is redirected to for authentication" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IdentifierClaim - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_identifierclaim) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IdentifierClaim - Identity claim type that uniquely identifies the user" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ClaimsMappings - # Type: MSFT_SPClaimTypeMapping[] - # IsMandatory: False - # Values: None - newparam(:dsc_claimsmappings, :array_matching => :all) do - def mof_type; 'MSFT_SPClaimTypeMapping[]' end - def mof_is_embedded?; true end - def mof_type_map - {"name"=>{:type=>"string"}, "incomingclaimtype"=>{:type=>"string"}, "localclaimtype"=>{:type=>"string"}} - end - desc "ClaimsMappings - Array of MSFT_SPClaimTypeMapping to use with cmdlet New-SPClaimTypeMapping" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be an array of hashes or a hash") - end - (value.kind_of?(Hash) ? [value] : value).each_with_index do |v, i| - fail "ClaimsMappings value at index #{i} should be a Hash" unless v.is_a? Hash - - PuppetX::Dsc::TypeHelpers.validate_MSFT_SPClaimTypeMapping(mof_type_map, "ClaimsMappings", v) - end - end - munge do |value| - value.kind_of?(Hash) ? - [PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, value)] : - value.map { |v| PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, v) } - end - end - - # Name: SigningCertificateThumbprint - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_signingcertificatethumbprint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SigningCertificateThumbprint - Specify the thumbprint of the signing certificate, which must be located in certificate store LocalMachine\\My" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SigningCertificateFilePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_signingcertificatefilepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SigningCertificateFilePath - Specify the file path to the signing certificate if it is not stored in the local certificate store already" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ClaimProviderName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_claimprovidername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ClaimProviderName - Name of a claims provider to set with this SPTrustedIdentityTokenIssuer" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProviderSignOutUri - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_providersignouturi) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProviderSignOutUri - Sign-out URL" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present if the SPTrustedIdentityTokenIssuer should be created, or Absent if it should be removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_sptrustedidentitytokenissuer).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_sptrustedrootauthority.rb b/lib/puppet/type/dsc_sptrustedrootauthority.rb deleted file mode 100644 index f9a34afa..00000000 --- a/lib/puppet/type/dsc_sptrustedrootauthority.rb +++ /dev/null @@ -1,136 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_sptrustedrootauthority) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPTrustedRootAuthority resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPTrustedRootAuthority/MSFT_SPTrustedRootAuthority.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPTrustedRootAuthority' end - def dscmeta_resource_name; 'MSFT_SPTrustedRootAuthority' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Specifies the name of the trusted root authority to create." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CertificateThumbprint - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_certificatethumbprint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CertificateThumbprint - Specifies the X.509 certificate of the trusted root authority, as a certificate thumbprint." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present ensures service app exists, absent ensures it is removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_sptrustedrootauthority).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spusageapplication.rb b/lib/puppet/type/dsc_spusageapplication.rb deleted file mode 100644 index d9263aa8..00000000 --- a/lib/puppet/type/dsc_spusageapplication.rb +++ /dev/null @@ -1,251 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spusageapplication) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPUsageApplication resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPUsageApplication/MSFT_SPUsageApplication.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPUsageApplication' end - def dscmeta_resource_name; 'MSFT_SPUsageApplication' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the service application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseName - The name of the database for the service app" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databaseserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseServer - The name of the database server" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseCredentials - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_databasecredentials) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "DatabaseCredentials - The credentials to use to access the database" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("DatabaseCredentials", value) - end - end - - # Name: FailoverDatabaseServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_failoverdatabaseserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FailoverDatabaseServer - The name of the failover database server" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UsageLogCutTime - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_usagelogcuttime) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "UsageLogCutTime - The time in minutes to cut over to new log files" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: UsageLogLocation - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_usageloglocation) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UsageLogLocation - The location on each server to store the log files" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UsageLogMaxFileSizeKB - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_usagelogmaxfilesizekb) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "UsageLogMaxFileSizeKB - The maximum file size for log files in KB" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: UsageLogMaxSpaceGB - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_usagelogmaxspacegb) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "UsageLogMaxSpaceGB - The total space of all log files on disk in GB" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present if the service app should exist, absent if it should not Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spusageapplication).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spuserprofileproperty.rb b/lib/puppet/type/dsc_spuserprofileproperty.rb deleted file mode 100644 index 3f99bae2..00000000 --- a/lib/puppet/type/dsc_spuserprofileproperty.rb +++ /dev/null @@ -1,458 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spuserprofileproperty) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPUserProfileProperty resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/MSFT_SPUserProfileProperty.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPUserProfileProperty' end - def dscmeta_resource_name; 'MSFT_SPUserProfileProperty' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The internal name of the user profile property" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present if the property should exist, absent if it should be removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: UserProfileService - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_userprofileservice) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UserProfileService - The name of the user profile service application" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DisplayName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_displayname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DisplayName - The display name of the property" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Type - # Type: string - # IsMandatory: False - # Values: ["BigInteger", "Binary", "Boolean", "Date", "DateNoYear", "DateTime", "Email", "Float", "Guid", "HTML", "Integer", "Person", "String", "StringMultiValue", "TimeZone", "URL"] - newparam(:dsc_type) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Type - The type of the property Valid values are BigInteger, Binary, Boolean, Date, DateNoYear, DateTime, Email, Float, Guid, HTML, Integer, Person, String, StringMultiValue, TimeZone, URL." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['BigInteger', 'biginteger', 'Binary', 'binary', 'Boolean', 'boolean', 'Date', 'date', 'DateNoYear', 'datenoyear', 'DateTime', 'datetime', 'Email', 'email', 'Float', 'float', 'Guid', 'guid', 'HTML', 'html', 'Integer', 'integer', 'Person', 'person', 'String', 'string', 'StringMultiValue', 'stringmultivalue', 'TimeZone', 'timezone', 'URL', 'url'].include?(value) - fail("Invalid value '#{value}'. Valid values are BigInteger, Binary, Boolean, Date, DateNoYear, DateTime, Email, Float, Guid, HTML, Integer, Person, String, StringMultiValue, TimeZone, URL") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - The description of the property" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PolicySetting - # Type: string - # IsMandatory: False - # Values: ["Mandatory", "Optin", "Optout", "Disabled"] - newparam(:dsc_policysetting) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PolicySetting - The policy setting to apply to the property Valid values are Mandatory, Optin, Optout, Disabled." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Mandatory', 'mandatory', 'Optin', 'optin', 'Optout', 'optout', 'Disabled', 'disabled'].include?(value) - fail("Invalid value '#{value}'. Valid values are Mandatory, Optin, Optout, Disabled") - end - end - end - - # Name: PrivacySetting - # Type: string - # IsMandatory: False - # Values: ["Public", "Contacts", "Organization", "Manager", "Private"] - newparam(:dsc_privacysetting) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PrivacySetting - The privacy setting for the property Valid values are Public, Contacts, Organization, Manager, Private." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Public', 'public', 'Contacts', 'contacts', 'Organization', 'organization', 'Manager', 'manager', 'Private', 'private'].include?(value) - fail("Invalid value '#{value}'. Valid values are Public, Contacts, Organization, Manager, Private") - end - end - end - - # Name: MappingConnectionName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_mappingconnectionname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MappingConnectionName - The name of the UPS connect to map this property to" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MappingPropertyName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_mappingpropertyname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MappingPropertyName - The name of the property from the UPS connection to map to" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MappingDirection - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_mappingdirection) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MappingDirection - The direction of the mapping, either Import or Export" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Length - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_length) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "Length - The length of the field" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: DisplayOrder - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_displayorder) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "DisplayOrder - The display order to put the property in to the list at" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: IsEventLog - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_iseventlog) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "IsEventLog - Is this field used for event logging" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: IsVisibleOnEditor - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_isvisibleoneditor) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "IsVisibleOnEditor - Is this field visible when editing a users profile, or hidden from editing" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: IsVisibleOnViewer - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_isvisibleonviewer) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "IsVisibleOnViewer - Is this field visible when viewing a users profile" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: IsUserEditable - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_isusereditable) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "IsUserEditable - Is this field able to be edited by a user, or only an administrator" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: IsAlias - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_isalias) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "IsAlias - Is this field an alias that can be used to refer to a user by" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: IsSearchable - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_issearchable) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "IsSearchable - Is this field able to be searched upon" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: UserOverridePrivacy - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_useroverrideprivacy) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UserOverridePrivacy - Can users override the default privacy policy" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: TermStore - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_termstore) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TermStore - The name of the term store to look up managed terms from" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TermGroup - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_termgroup) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TermGroup - The name of the term store group that terms are in for this field" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TermSet - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_termset) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TermSet - The name of the term set to allow values to be selected from" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spuserprofileproperty).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spuserprofilesection.rb b/lib/puppet/type/dsc_spuserprofilesection.rb deleted file mode 100644 index e47bdaaa..00000000 --- a/lib/puppet/type/dsc_spuserprofilesection.rb +++ /dev/null @@ -1,169 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spuserprofilesection) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPUserProfileSection resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPUserProfileSection/MSFT_SPUserProfileSection.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPUserProfileSection' end - def dscmeta_resource_name; 'MSFT_SPUserProfileSection' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The internal name of the user profile section" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present if the section should exist, absent if it should be removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: UserProfileService - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_userprofileservice) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UserProfileService - The name of the user profile service application this section exists in" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DisplayName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_displayname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DisplayName - The display name of the section" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DisplayOrder - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_displayorder) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "DisplayOrder - A number used to sort sections by" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spuserprofilesection).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spuserprofileserviceapp.rb b/lib/puppet/type/dsc_spuserprofileserviceapp.rb deleted file mode 100644 index b64a5fd3..00000000 --- a/lib/puppet/type/dsc_spuserprofileserviceapp.rb +++ /dev/null @@ -1,304 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spuserprofileserviceapp) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPUserProfileServiceApp resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPUserProfileServiceApp' end - def dscmeta_resource_name; 'MSFT_SPUserProfileServiceApp' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the user profile service" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProxyName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_proxyname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProxyName - The proxy name, if not specified will be /Name of service app/ Proxy" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ApplicationPool - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_applicationpool) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApplicationPool - The name of the application pool to run the service app in" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FarmAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_farmaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "FarmAccount - The farm account to use when provisioning the app" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("FarmAccount", value) - end - end - - # Name: MySiteHostLocation - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_mysitehostlocation) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MySiteHostLocation - The URL of the my site host collection" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProfileDBName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_profiledbname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProfileDBName - The name of the profile database" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProfileDBServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_profiledbserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProfileDBServer - The name of the server to host the profile database" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SocialDBName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_socialdbname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SocialDBName - The name of the social database" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SocialDBServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_socialdbserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SocialDBServer - The name of the database server to host the social database" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SyncDBName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_syncdbname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SyncDBName - The name of the sync database" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SyncDBServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_syncdbserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SyncDBServer - The name of the database server to host the sync database" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: EnableNetBIOS - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enablenetbios) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "EnableNetBIOS - Whether Farm should resolve NetBIOS domain names" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: NoILMUsed - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_noilmused) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "NoILMUsed - Specifies if the service application should be configured to use AD Import" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present if the service app should exist, absent if it should not Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spuserprofileserviceapp).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spuserprofileserviceapppermissions.rb b/lib/puppet/type/dsc_spuserprofileserviceapppermissions.rb deleted file mode 100644 index b368fbe6..00000000 --- a/lib/puppet/type/dsc_spuserprofileserviceapppermissions.rb +++ /dev/null @@ -1,155 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spuserprofileserviceapppermissions) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPUserProfileServiceAppPermissions resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/MSFT_SPUserProfileServiceAppPermissions.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_proxyname is a required attribute') if self[:dsc_proxyname].nil? - end - - def dscmeta_resource_friendly_name; 'SPUserProfileServiceAppPermissions' end - def dscmeta_resource_name; 'MSFT_SPUserProfileServiceAppPermissions' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ProxyName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_proxyname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProxyName - The name of the proxy that is attached to the user profile service you wish to set permissions for" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CreatePersonalSite - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_createpersonalsite, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "CreatePersonalSite - A list of user principals that will have the Create personal site permission" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: FollowAndEditProfile - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_followandeditprofile, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "FollowAndEditProfile - A list of user principals that will have the Follow users and edit profile permission" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: UseTagsAndNotes - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_usetagsandnotes, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "UseTagsAndNotes - A list of user principals that will have the Use tags and notes permission" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spuserprofileserviceapppermissions).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spuserprofilesyncconnection.rb b/lib/puppet/type/dsc_spuserprofilesyncconnection.rb deleted file mode 100644 index e760da03..00000000 --- a/lib/puppet/type/dsc_spuserprofilesyncconnection.rb +++ /dev/null @@ -1,248 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spuserprofilesyncconnection) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPUserProfileSyncConnection resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPUserProfileSyncConnection' end - def dscmeta_resource_name; 'MSFT_SPUserProfileSyncConnection' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the connection" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Forest - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_forest) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Forest - The name of the AD forest to read from" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UserProfileService - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_userprofileservice) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UserProfileService - The name of the user profile service that this connection is attached to" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ConnectionCredentials - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_connectioncredentials) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "ConnectionCredentials - The credentials to connect to Active Directory with" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("ConnectionCredentials", value) - end - end - - # Name: IncludedOUs - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_includedous, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "IncludedOUs - A list of the OUs to import users from" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ExcludedOUs - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_excludedous, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ExcludedOUs - A list of the OUs to ignore users from" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Server - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_server) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Server - The specific AD server to connect to" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UseSSL - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_usessl) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UseSSL - Should SSL be used for the connection" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Force - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_force) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Force - Set to true to run the set method on every call to this resource" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ConnectionType - # Type: string - # IsMandatory: False - # Values: ["ActiveDirectory", "BusinessDataCatalog"] - newparam(:dsc_connectiontype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConnectionType - The type of the connection - currently only Active Directory is supported Valid values are ActiveDirectory, BusinessDataCatalog." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['ActiveDirectory', 'activedirectory', 'BusinessDataCatalog', 'businessdatacatalog'].include?(value) - fail("Invalid value '#{value}'. Valid values are ActiveDirectory, BusinessDataCatalog") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spuserprofilesyncconnection).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spuserprofilesyncservice.rb b/lib/puppet/type/dsc_spuserprofilesyncservice.rb deleted file mode 100644 index f74dcf1b..00000000 --- a/lib/puppet/type/dsc_spuserprofilesyncservice.rb +++ /dev/null @@ -1,153 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spuserprofilesyncservice) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPUserProfileSyncService resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/MSFT_SPUserProfileSyncService.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_userprofileserviceappname is a required attribute') if self[:dsc_userprofileserviceappname].nil? - end - - def dscmeta_resource_friendly_name; 'SPUserProfileSyncService' end - def dscmeta_resource_name; 'MSFT_SPUserProfileSyncService' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: UserProfileServiceAppName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_userprofileserviceappname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UserProfileServiceAppName - The name of the user profile service for this sync instance" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present to ensure the service is running, absent to ensure it is not Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: FarmAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_farmaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "FarmAccount - The farm account, which is needed to provision the service app" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("FarmAccount", value) - end - end - - # Name: RunOnlyWhenWriteable - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_runonlywhenwriteable) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RunOnlyWhenWriteable - Should the sync service only run when the user profile database is in a writeable state?" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spuserprofilesyncservice).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spvisioserviceapp.rb b/lib/puppet/type/dsc_spvisioserviceapp.rb deleted file mode 100644 index 03cf46d0..00000000 --- a/lib/puppet/type/dsc_spvisioserviceapp.rb +++ /dev/null @@ -1,151 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spvisioserviceapp) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPVisioServiceApp resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/MSFT_SPVisioServiceApp.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPVisioServiceApp' end - def dscmeta_resource_name; 'MSFT_SPVisioServiceApp' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the service application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ApplicationPool - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_applicationpool) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApplicationPool - The name of the application pool to run the service app in" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProxyName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_proxyname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProxyName - The name of the Visio Service Application Proxy" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present if the service app should exist, absent if it should not Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spvisioserviceapp).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spweb.rb b/lib/puppet/type/dsc_spweb.rb deleted file mode 100644 index 825cdc75..00000000 --- a/lib/puppet/type/dsc_spweb.rb +++ /dev/null @@ -1,248 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spweb) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPWeb resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPWeb/MSFT_SPWeb.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_url is a required attribute') if self[:dsc_url].nil? - end - - def dscmeta_resource_friendly_name; 'SPWeb' end - def dscmeta_resource_name; 'MSFT_SPWeb' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Url - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_url) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Url - The URL of the web" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present if the web should exist or Absent if it should be removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - The description to apply to the web" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The Name of the web" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Language - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_language) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "Language - The Lanhuage (LCID) of the web" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Template - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_template) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Template - The WebTemplate to use to create the web" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UniquePermissions - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_uniquepermissions) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UniquePermissions - True if the web should have unique permissions, otherwise false." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: UseParentTopNav - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_useparenttopnav) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UseParentTopNav - True if the web should use the parent nav bar, otherwise false." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AddToQuickLaunch - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_addtoquicklaunch) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AddToQuickLaunch - True if the web should be in the quick launch of the parent web, otherwise false." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AddToTopNav - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_addtotopnav) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AddToTopNav - True if the web should be added to the top nav bar of the parent web, otherwise false." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spweb).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spwebappblockedfiletypes.rb b/lib/puppet/type/dsc_spwebappblockedfiletypes.rb deleted file mode 100644 index 7b836bf2..00000000 --- a/lib/puppet/type/dsc_spwebappblockedfiletypes.rb +++ /dev/null @@ -1,155 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spwebappblockedfiletypes) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPWebAppBlockedFileTypes resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/MSFT_SPWebAppBlockedFileTypes.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_url is a required attribute') if self[:dsc_url].nil? - end - - def dscmeta_resource_friendly_name; 'SPWebAppBlockedFileTypes' end - def dscmeta_resource_name; 'MSFT_SPWebAppBlockedFileTypes' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Url - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_url) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Url - The URL of the web application to set blocked file types for" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Blocked - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_blocked, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Blocked - This is a fixed list to use for blocked file types in this web app" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: EnsureBlocked - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_ensureblocked, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "EnsureBlocked - This list of file types that will always be added to the list for this web app. Types not in this list will be left in the list" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: EnsureAllowed - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_ensureallowed, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "EnsureAllowed - This list of file types that will always be removedfrom the list for this web app. Types not in this list will be left in the list" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spwebappblockedfiletypes).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spwebappgeneralsettings.rb b/lib/puppet/type/dsc_spwebappgeneralsettings.rb deleted file mode 100644 index 7e2f3cac..00000000 --- a/lib/puppet/type/dsc_spwebappgeneralsettings.rb +++ /dev/null @@ -1,419 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spwebappgeneralsettings) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPWebAppGeneralSettings resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/MSFT_SPWebAppGeneralSettings.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_url is a required attribute') if self[:dsc_url].nil? - end - - def dscmeta_resource_friendly_name; 'SPWebAppGeneralSettings' end - def dscmeta_resource_name; 'MSFT_SPWebAppGeneralSettings' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Url - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_url) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Url - The URL of the web app to set the general settings for" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TimeZone - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_timezone) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "TimeZone - The timezone code to use for this web app. A full list is at https://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.spregionalsettings.timezones.aspx" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Alerts - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_alerts) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Alerts - Should alerts be enabled for this web app" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AlertsLimit - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_alertslimit) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "AlertsLimit - What is the maximum number of alerts that a user can create in this web app" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RSS - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_rss) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RSS - Should RSS feeds be enabled in this web app" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: BlogAPI - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_blogapi) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "BlogAPI - Should the Blog API be enabled in this web app" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: BlogAPIAuthenticated - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_blogapiauthenticated) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "BlogAPIAuthenticated - Is authentication required for the blog API" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: BrowserFileHandling - # Type: string - # IsMandatory: False - # Values: ["Strict", "Permissive"] - newparam(:dsc_browserfilehandling) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "BrowserFileHandling - What file handling mode should be used in this web app - strict or permissive Valid values are Strict, Permissive." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Strict', 'strict', 'Permissive', 'permissive'].include?(value) - fail("Invalid value '#{value}'. Valid values are Strict, Permissive") - end - end - end - - # Name: SecurityValidation - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_securityvalidation) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SecurityValidation - Is security validation enforced in this web app" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: SecurityValidationExpires - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_securityvalidationexpires) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SecurityValidationExpires - Does security validation expire after a set time" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: SecurityValidationTimeOutMinutes - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_securityvalidationtimeoutminutes) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "SecurityValidationTimeOutMinutes - Number of minutes security validation will expire if securityvalidationexpires is set" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RecycleBinEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_recyclebinenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RecycleBinEnabled - Is the recycle bin enabled in this web application" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: RecycleBinCleanupEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_recyclebincleanupenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RecycleBinCleanupEnabled - Is automatic cleanup of the recycle bin enabled in this web app" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: RecycleBinRetentionPeriod - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_recyclebinretentionperiod) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "RecycleBinRetentionPeriod - How many days does the recycle bin keep content for" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: SecondStageRecycleBinQuota - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_secondstagerecyclebinquota) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "SecondStageRecycleBinQuota - How much content does the second stage recycle bin keep content for" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaximumUploadSize - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maximumuploadsize) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "MaximumUploadSize - What is the maximum file upload size for this web app (in MB)" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: CustomerExperienceProgram - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_customerexperienceprogram) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "CustomerExperienceProgram - Should the customer experience program be enabled in this web app" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AllowOnlineWebPartCatalog - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowonlinewebpartcatalog) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowOnlineWebPartCatalog - Should the Online WebPart Gallery be enabled for this web app" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: SelfServiceSiteCreationEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_selfservicesitecreationenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SelfServiceSiteCreationEnabled - Should Self Service Site Creation be enabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: PresenceEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_presenceenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "PresenceEnabled - Is Skype for Business presence enabled for this web app" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spwebappgeneralsettings).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spwebapplication.rb b/lib/puppet/type/dsc_spwebapplication.rb deleted file mode 100644 index a7210a43..00000000 --- a/lib/puppet/type/dsc_spwebapplication.rb +++ /dev/null @@ -1,306 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spwebapplication) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPWebApplication resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPWebApplication/MSFT_SPWebApplication.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPWebApplication' end - def dscmeta_resource_name; 'MSFT_SPWebApplication' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the web application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ApplicationPool - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_applicationpool) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApplicationPool - The name of the application pool to run this site in" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ApplicationPoolAccount - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_applicationpoolaccount) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApplicationPoolAccount - The name of the managed account to run the app pool with" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Url - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_url) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Url - The URL of the web application" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AllowAnonymous - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowanonymous) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowAnonymous - Should anonymous access be enabled for this web app" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AuthenticationMethod - # Type: string - # IsMandatory: False - # Values: ["NTLM", "Kerberos", "Claims", "Classic"] - newparam(:dsc_authenticationmethod) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AuthenticationMethod - What authentication mode should be used for the web app Valid values are NTLM, Kerberos, Claims, Classic." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['NTLM', 'ntlm', 'Kerberos', 'kerberos', 'Claims', 'claims', 'Classic', 'classic'].include?(value) - fail("Invalid value '#{value}'. Valid values are NTLM, Kerberos, Claims, Classic") - end - end - end - - # Name: AuthenticationProvider - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_authenticationprovider) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AuthenticationProvider - What authentication provider should be used for the web app. This value is required when AuthenticationMethod is set to Claims" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseName - The name of the first content database to be created with this web app" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databaseserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseServer - The name of the database server to host the default content DB" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: HostHeader - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_hostheader) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "HostHeader - The host header to use for the web app" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Path - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - The path on the local servers to host the IIS web site from" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Port - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_port) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Port - The port to run the site on" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UseSSL - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_usessl) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UseSSL - Should this web app use SSL" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present if the web app should exist, absent if it should not Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spwebapplication).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spwebapplicationappdomain.rb b/lib/puppet/type/dsc_spwebapplicationappdomain.rb deleted file mode 100644 index 93c84360..00000000 --- a/lib/puppet/type/dsc_spwebapplicationappdomain.rb +++ /dev/null @@ -1,167 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spwebapplicationappdomain) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPWebApplicationAppDomain resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/MSFT_SPWebApplicationAppDomain.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_webapplication is a required attribute') if self[:dsc_webapplication].nil? - fail('dsc_zone is a required attribute') if self[:dsc_zone].nil? - end - - def dscmeta_resource_friendly_name; 'SPWebApplicationAppDomain' end - def dscmeta_resource_name; 'MSFT_SPWebApplicationAppDomain' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: WebApplication - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_webapplication) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WebApplication - The URL of the web application to set the app domain for" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Zone - # Type: string - # IsMandatory: True - # Values: ["Default", "Internet", "Intranet", "Extranet", "Custom"] - newparam(:dsc_zone) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Zone - The zone that this app domain applies to Valid values are Default, Internet, Intranet, Extranet, Custom." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Default', 'default', 'Internet', 'internet', 'Intranet', 'intranet', 'Extranet', 'extranet', 'Custom', 'custom'].include?(value) - fail("Invalid value '#{value}'. Valid values are Default, Internet, Intranet, Extranet, Custom") - end - end - end - - # Name: AppDomain - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_appdomain) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AppDomain - The domain for apps in this web app zone" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Port - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_port) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Port - The port to run apps on" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SSL - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_ssl) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SSL - Should apps run under SSL" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spwebapplicationappdomain).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spwebapplicationextension.rb b/lib/puppet/type/dsc_spwebapplicationextension.rb deleted file mode 100644 index 142c468f..00000000 --- a/lib/puppet/type/dsc_spwebapplicationextension.rb +++ /dev/null @@ -1,281 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spwebapplicationextension) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPWebApplicationExtension resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/MSFT_SPWebApplicationExtension.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_webappurl is a required attribute') if self[:dsc_webappurl].nil? - fail('dsc_zone is a required attribute') if self[:dsc_zone].nil? - end - - def dscmeta_resource_friendly_name; 'SPWebApplicationExtension' end - def dscmeta_resource_name; 'MSFT_SPWebApplicationExtension' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: WebAppUrl - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_webappurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WebAppUrl - The URL of the parent web application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the web application extension" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Url - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_url) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Url - The URL of the web application extension" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Zone - # Type: string - # IsMandatory: True - # Values: ["Default", "Intranet", "Internet", "Extranet", "Custom"] - newparam(:dsc_zone) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Zone - Specifies one of the five zones with which the internal URL of this new extension is to be associated. Valid values are Default, Intranet, Internet, Extranet, Custom." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Default', 'default', 'Intranet', 'intranet', 'Internet', 'internet', 'Extranet', 'extranet', 'Custom', 'custom'].include?(value) - fail("Invalid value '#{value}'. Valid values are Default, Intranet, Internet, Extranet, Custom") - end - end - end - - # Name: AllowAnonymous - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowanonymous) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowAnonymous - Should anonymous access be enabled for this web app extension" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AuthenticationMethod - # Type: string - # IsMandatory: False - # Values: ["NTLM", "Kerberos", "Claims"] - newparam(:dsc_authenticationmethod) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AuthenticationMethod - What authentication mode should be used for the web app extension Valid values are NTLM, Kerberos, Claims." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['NTLM', 'ntlm', 'Kerberos', 'kerberos', 'Claims', 'claims'].include?(value) - fail("Invalid value '#{value}'. Valid values are NTLM, Kerberos, Claims") - end - end - end - - # Name: AuthenticationProvider - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_authenticationprovider) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AuthenticationProvider - What authentication provider should be used for the web app. This value is required when AuthenticationMethod is set to Claims" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: HostHeader - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_hostheader) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "HostHeader - The host header to use for the web app extension" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Path - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - The path on the local servers to host the IIS web site from" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Port - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_port) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Port - The port to run the site on" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UseSSL - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_usessl) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UseSSL - Should this web app extension use SSL" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present if the web app should exist, absent if it should not Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spwebapplicationextension).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spwebapppermissions.rb b/lib/puppet/type/dsc_spwebapppermissions.rb deleted file mode 100644 index 49eef931..00000000 --- a/lib/puppet/type/dsc_spwebapppermissions.rb +++ /dev/null @@ -1,201 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spwebapppermissions) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPWebAppPermissions resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/MSFT_SPWebAppPermissions.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_webappurl is a required attribute') if self[:dsc_webappurl].nil? - end - - def dscmeta_resource_friendly_name; 'SPWebAppPermissions' end - def dscmeta_resource_name; 'MSFT_SPWebAppPermissions' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: WebAppUrl - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_webappurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WebAppUrl - The url of the web application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ListPermissions - # Type: string[] - # IsMandatory: False - # Values: ["Manage Lists", "Override List Behaviors", "Add Items", "Edit Items", "Delete Items", "View Items", "Approve Items", "Open Items", "View Versions", "Delete Versions", "Create Alerts", "View Application Pages"] - newparam(:dsc_listpermissions, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ListPermissions - List permissions that need to be configured Valid values are Manage Lists, Override List Behaviors, Add Items, Edit Items, Delete Items, View Items, Approve Items, Open Items, View Versions, Delete Versions, Create Alerts, View Application Pages." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - if value.kind_of?(Array) - unless (['Manage Lists', 'manage lists', 'Override List Behaviors', 'override list behaviors', 'Add Items', 'add items', 'Edit Items', 'edit items', 'Delete Items', 'delete items', 'View Items', 'view items', 'Approve Items', 'approve items', 'Open Items', 'open items', 'View Versions', 'view versions', 'Delete Versions', 'delete versions', 'Create Alerts', 'create alerts', 'View Application Pages', 'view application pages'] & value).count == value.count - fail("Invalid value #{value}. Valid values are Manage Lists, Override List Behaviors, Add Items, Edit Items, Delete Items, View Items, Approve Items, Open Items, View Versions, Delete Versions, Create Alerts, View Application Pages") - end - end - if value.kind_of?(String) - unless ['Manage Lists', 'manage lists', 'Override List Behaviors', 'override list behaviors', 'Add Items', 'add items', 'Edit Items', 'edit items', 'Delete Items', 'delete items', 'View Items', 'view items', 'Approve Items', 'approve items', 'Open Items', 'open items', 'View Versions', 'view versions', 'Delete Versions', 'delete versions', 'Create Alerts', 'create alerts', 'View Application Pages', 'view application pages'].include?(value) - fail("Invalid value #{value}. Valid values are Manage Lists, Override List Behaviors, Add Items, Edit Items, Delete Items, View Items, Approve Items, Open Items, View Versions, Delete Versions, Create Alerts, View Application Pages") - end - end - end - munge do |value| - Array(value) - end - end - - # Name: SitePermissions - # Type: string[] - # IsMandatory: False - # Values: ["Manage Permissions", "View Web Analytics Data", "Create Subsites", "Manage Web Site", "Add and Customize Pages", "Apply Themes and Borders", "Apply Style Sheets", "Create Groups", "Browse Directories", "Use Self-Service Site Creation", "View Pages", "Enumerate Permissions", "Browse User Information", "Manage Alerts", "Use Remote Interfaces", "Use Client Integration Features", "Open", "Edit Personal User Information"] - newparam(:dsc_sitepermissions, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "SitePermissions - Site permissions that need to be configured Valid values are Manage Permissions, View Web Analytics Data, Create Subsites, Manage Web Site, Add and Customize Pages, Apply Themes and Borders, Apply Style Sheets, Create Groups, Browse Directories, Use Self-Service Site Creation, View Pages, Enumerate Permissions, Browse User Information, Manage Alerts, Use Remote Interfaces, Use Client Integration Features, Open, Edit Personal User Information." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - if value.kind_of?(Array) - unless (['Manage Permissions', 'manage permissions', 'View Web Analytics Data', 'view web analytics data', 'Create Subsites', 'create subsites', 'Manage Web Site', 'manage web site', 'Add and Customize Pages', 'add and customize pages', 'Apply Themes and Borders', 'apply themes and borders', 'Apply Style Sheets', 'apply style sheets', 'Create Groups', 'create groups', 'Browse Directories', 'browse directories', 'Use Self-Service Site Creation', 'use self-service site creation', 'View Pages', 'view pages', 'Enumerate Permissions', 'enumerate permissions', 'Browse User Information', 'browse user information', 'Manage Alerts', 'manage alerts', 'Use Remote Interfaces', 'use remote interfaces', 'Use Client Integration Features', 'use client integration features', 'Open', 'open', 'Edit Personal User Information', 'edit personal user information'] & value).count == value.count - fail("Invalid value #{value}. Valid values are Manage Permissions, View Web Analytics Data, Create Subsites, Manage Web Site, Add and Customize Pages, Apply Themes and Borders, Apply Style Sheets, Create Groups, Browse Directories, Use Self-Service Site Creation, View Pages, Enumerate Permissions, Browse User Information, Manage Alerts, Use Remote Interfaces, Use Client Integration Features, Open, Edit Personal User Information") - end - end - if value.kind_of?(String) - unless ['Manage Permissions', 'manage permissions', 'View Web Analytics Data', 'view web analytics data', 'Create Subsites', 'create subsites', 'Manage Web Site', 'manage web site', 'Add and Customize Pages', 'add and customize pages', 'Apply Themes and Borders', 'apply themes and borders', 'Apply Style Sheets', 'apply style sheets', 'Create Groups', 'create groups', 'Browse Directories', 'browse directories', 'Use Self-Service Site Creation', 'use self-service site creation', 'View Pages', 'view pages', 'Enumerate Permissions', 'enumerate permissions', 'Browse User Information', 'browse user information', 'Manage Alerts', 'manage alerts', 'Use Remote Interfaces', 'use remote interfaces', 'Use Client Integration Features', 'use client integration features', 'Open', 'open', 'Edit Personal User Information', 'edit personal user information'].include?(value) - fail("Invalid value #{value}. Valid values are Manage Permissions, View Web Analytics Data, Create Subsites, Manage Web Site, Add and Customize Pages, Apply Themes and Borders, Apply Style Sheets, Create Groups, Browse Directories, Use Self-Service Site Creation, View Pages, Enumerate Permissions, Browse User Information, Manage Alerts, Use Remote Interfaces, Use Client Integration Features, Open, Edit Personal User Information") - end - end - end - munge do |value| - Array(value) - end - end - - # Name: PersonalPermissions - # Type: string[] - # IsMandatory: False - # Values: ["Manage Personal Views", "Add/Remove Personal Web Parts", "Update Personal Web Parts"] - newparam(:dsc_personalpermissions, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "PersonalPermissions - Personal permissions that need to be configured Valid values are Manage Personal Views, Add/Remove Personal Web Parts, Update Personal Web Parts." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - if value.kind_of?(Array) - unless (['Manage Personal Views', 'manage personal views', 'Add/Remove Personal Web Parts', 'add/remove personal web parts', 'Update Personal Web Parts', 'update personal web parts'] & value).count == value.count - fail("Invalid value #{value}. Valid values are Manage Personal Views, Add/Remove Personal Web Parts, Update Personal Web Parts") - end - end - if value.kind_of?(String) - unless ['Manage Personal Views', 'manage personal views', 'Add/Remove Personal Web Parts', 'add/remove personal web parts', 'Update Personal Web Parts', 'update personal web parts'].include?(value) - fail("Invalid value #{value}. Valid values are Manage Personal Views, Add/Remove Personal Web Parts, Update Personal Web Parts") - end - end - end - munge do |value| - Array(value) - end - end - - # Name: AllPermissions - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allpermissions) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllPermissions - Set all permissions" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spwebapppermissions).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spwebapppolicy.rb b/lib/puppet/type/dsc_spwebapppolicy.rb deleted file mode 100644 index 046207a7..00000000 --- a/lib/puppet/type/dsc_spwebapppolicy.rb +++ /dev/null @@ -1,224 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spwebapppolicy) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - class PuppetX::Dsc::TypeHelpers - def self.validate_MSFT_SPWebPolicyPermissions(mof_type_map, name, value) - required = [] - allowed = ['username','permissionlevel','identitytype','actassystemaccount'] - lowkey_hash = Hash[value.map { |k, v| [k.to_s.downcase, v] }] - - missing = required - lowkey_hash.keys - unless missing.empty? - fail "#{name} is missing the following required keys: #{missing.join(',')}" - end - - extraneous = lowkey_hash.keys - required - allowed - unless extraneous.empty? - fail "#{name} includes invalid keys: #{extraneous.join(',')}" - end - - lowkey_hash.keys.each do |key| - if lowkey_hash[key] - validate_mof_type(mof_type_map[key], 'MSFT_SPWebPolicyPermissions', key, lowkey_hash[key]) - end - end - end - end - - @doc = %q{ - The DSC SPWebAppPolicy resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/MSFT_SPWebAppPolicy.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_webappurl is a required attribute') if self[:dsc_webappurl].nil? - end - - def dscmeta_resource_friendly_name; 'SPWebAppPolicy' end - def dscmeta_resource_name; 'MSFT_SPWebAppPolicy' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: WebAppUrl - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_webappurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WebAppUrl - The URL of the web application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Members - # Type: MSFT_SPWebPolicyPermissions[] - # IsMandatory: False - # Values: None - newparam(:dsc_members, :array_matching => :all) do - def mof_type; 'MSFT_SPWebPolicyPermissions[]' end - def mof_is_embedded?; true end - def mof_type_map - {"username"=>{:type=>"string"}, "permissionlevel"=>{:type=>"string[]", :values=>["Deny All", "Deny Write", "Full Read", "Full Control"]}, "identitytype"=>{:type=>"string", :values=>["Claims", "Native"]}, "actassystemaccount"=>{:type=>"boolean"}} - end - desc "Members - Exact list of accounts that will have to get Web Policy permissions" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be an array of hashes or a hash") - end - (value.kind_of?(Hash) ? [value] : value).each_with_index do |v, i| - fail "Members value at index #{i} should be a Hash" unless v.is_a? Hash - - PuppetX::Dsc::TypeHelpers.validate_MSFT_SPWebPolicyPermissions(mof_type_map, "Members", v) - end - end - munge do |value| - value.kind_of?(Hash) ? - [PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, value)] : - value.map { |v| PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, v) } - end - end - - # Name: MembersToInclude - # Type: MSFT_SPWebPolicyPermissions[] - # IsMandatory: False - # Values: None - newparam(:dsc_memberstoinclude, :array_matching => :all) do - def mof_type; 'MSFT_SPWebPolicyPermissions[]' end - def mof_is_embedded?; true end - def mof_type_map - {"username"=>{:type=>"string"}, "permissionlevel"=>{:type=>"string[]", :values=>["Deny All", "Deny Write", "Full Read", "Full Control"]}, "identitytype"=>{:type=>"string", :values=>["Claims", "Native"]}, "actassystemaccount"=>{:type=>"boolean"}} - end - desc "MembersToInclude - List of all accounts that must be in the Web Policy group" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be an array of hashes or a hash") - end - (value.kind_of?(Hash) ? [value] : value).each_with_index do |v, i| - fail "MembersToInclude value at index #{i} should be a Hash" unless v.is_a? Hash - - PuppetX::Dsc::TypeHelpers.validate_MSFT_SPWebPolicyPermissions(mof_type_map, "MembersToInclude", v) - end - end - munge do |value| - value.kind_of?(Hash) ? - [PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, value)] : - value.map { |v| PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, v) } - end - end - - # Name: MembersToExclude - # Type: MSFT_SPWebPolicyPermissions[] - # IsMandatory: False - # Values: None - newparam(:dsc_memberstoexclude, :array_matching => :all) do - def mof_type; 'MSFT_SPWebPolicyPermissions[]' end - def mof_is_embedded?; true end - def mof_type_map - {"username"=>{:type=>"string"}, "permissionlevel"=>{:type=>"string[]", :values=>["Deny All", "Deny Write", "Full Read", "Full Control"]}, "identitytype"=>{:type=>"string", :values=>["Claims", "Native"]}, "actassystemaccount"=>{:type=>"boolean"}} - end - desc "MembersToExclude - List of all accounts that are not allowed to have any Web Policy permissions" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be an array of hashes or a hash") - end - (value.kind_of?(Hash) ? [value] : value).each_with_index do |v, i| - fail "MembersToExclude value at index #{i} should be a Hash" unless v.is_a? Hash - - PuppetX::Dsc::TypeHelpers.validate_MSFT_SPWebPolicyPermissions(mof_type_map, "MembersToExclude", v) - end - end - munge do |value| - value.kind_of?(Hash) ? - [PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, value)] : - value.map { |v| PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, v) } - end - end - - # Name: SetCacheAccountsPolicy - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_setcacheaccountspolicy) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SetCacheAccountsPolicy - Include the Cache Accounts in the policy or not" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spwebapppolicy).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spwebappproxygroup.rb b/lib/puppet/type/dsc_spwebappproxygroup.rb deleted file mode 100644 index 7930157c..00000000 --- a/lib/puppet/type/dsc_spwebappproxygroup.rb +++ /dev/null @@ -1,116 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spwebappproxygroup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPWebAppProxyGroup resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/MSFT_SPWebAppProxyGroup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_webappurl is a required attribute') if self[:dsc_webappurl].nil? - end - - def dscmeta_resource_friendly_name; 'SPWebAppProxyGroup' end - def dscmeta_resource_name; 'MSFT_SPWebAppProxyGroup' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: WebAppUrl - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_webappurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WebAppUrl - URL of the web application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ServiceAppProxyGroup - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_serviceappproxygroup) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServiceAppProxyGroup - Name of the Service Application Proxy Group" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spwebappproxygroup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spwebappsiteuseanddeletion.rb b/lib/puppet/type/dsc_spwebappsiteuseanddeletion.rb deleted file mode 100644 index 4d74492d..00000000 --- a/lib/puppet/type/dsc_spwebappsiteuseanddeletion.rb +++ /dev/null @@ -1,169 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spwebappsiteuseanddeletion) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPWebAppSiteUseAndDeletion resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/MSFT_SPWebAppSiteUseAndDeletion.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_url is a required attribute') if self[:dsc_url].nil? - end - - def dscmeta_resource_friendly_name; 'SPWebAppSiteUseAndDeletion' end - def dscmeta_resource_name; 'MSFT_SPWebAppSiteUseAndDeletion' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Url - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_url) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Url - The URL of the web application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SendUnusedSiteCollectionNotifications - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_sendunusedsitecollectionnotifications) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SendUnusedSiteCollectionNotifications - Should emails be sent to notify site owners of unused site collections" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: UnusedSiteNotificationPeriod - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_unusedsitenotificationperiod) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "UnusedSiteNotificationPeriod - How many days should pass before a site is flagged as unused" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: AutomaticallyDeleteUnusedSiteCollections - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_automaticallydeleteunusedsitecollections) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AutomaticallyDeleteUnusedSiteCollections - Should unused site collection be automatically deleted" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: UnusedSiteNotificationsBeforeDeletion - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_unusedsitenotificationsbeforedeletion) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "UnusedSiteNotificationsBeforeDeletion - How many days before an unused site is deleted should an email be sent to the owner" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spwebappsiteuseanddeletion).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spwebappthrottlingsettings.rb b/lib/puppet/type/dsc_spwebappthrottlingsettings.rb deleted file mode 100644 index 72036822..00000000 --- a/lib/puppet/type/dsc_spwebappthrottlingsettings.rb +++ /dev/null @@ -1,316 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spwebappthrottlingsettings) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - class PuppetX::Dsc::TypeHelpers - def self.validate_MSFT_SPWebApplicationHappyHour(mof_type_map, name, value) - required = [] - allowed = ['hour','minute','duration'] - lowkey_hash = Hash[value.map { |k, v| [k.to_s.downcase, v] }] - - missing = required - lowkey_hash.keys - unless missing.empty? - fail "#{name} is missing the following required keys: #{missing.join(',')}" - end - - extraneous = lowkey_hash.keys - required - allowed - unless extraneous.empty? - fail "#{name} includes invalid keys: #{extraneous.join(',')}" - end - - lowkey_hash.keys.each do |key| - if lowkey_hash[key] - validate_mof_type(mof_type_map[key], 'MSFT_SPWebApplicationHappyHour', key, lowkey_hash[key]) - end - end - end - end - - @doc = %q{ - The DSC SPWebAppThrottlingSettings resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/MSFT_SPWebAppThrottlingSettings.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_url is a required attribute') if self[:dsc_url].nil? - end - - def dscmeta_resource_friendly_name; 'SPWebAppThrottlingSettings' end - def dscmeta_resource_name; 'MSFT_SPWebAppThrottlingSettings' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Url - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_url) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Url - The URL of the web application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ListViewThreshold - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_listviewthreshold) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "ListViewThreshold - What should the list view threshold for this site be set to" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: AllowObjectModelOverride - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowobjectmodeloverride) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowObjectModelOverride - Should object model code be able to be override the list view threshold" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AdminThreshold - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_adminthreshold) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "AdminThreshold - What is the list view threshold for site administrators" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ListViewLookupThreshold - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_listviewlookupthreshold) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "ListViewLookupThreshold - What is the maximum number of lookup fields in a single list view" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: HappyHourEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_happyhourenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "HappyHourEnabled - Should the happy hour window be enabled for this web app" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: HappyHour - # Type: MSFT_SPWebApplicationHappyHour - # IsMandatory: False - # Values: None - newparam(:dsc_happyhour) do - def mof_type; 'MSFT_SPWebApplicationHappyHour' end - def mof_is_embedded?; true end - def mof_type_map - {"hour"=>{:type=>"uint32"}, "minute"=>{:type=>"uint32"}, "duration"=>{:type=>"uint32"}} - end - desc "HappyHour - The time window for happy hour" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_SPWebApplicationHappyHour(mof_type_map, "HappyHour", value) - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, value) - end - end - - # Name: UniquePermissionThreshold - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_uniquepermissionthreshold) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "UniquePermissionThreshold - What is the limit for unique permissions on a single object in this web app" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RequestThrottling - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_requestthrottling) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RequestThrottling - Is request throttling enabled on this web app" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ChangeLogEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_changelogenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ChangeLogEnabled - Is the change log enabled for this web app" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ChangeLogExpiryDays - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_changelogexpirydays) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "ChangeLogExpiryDays - How many days does the change log store data for" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: EventHandlersEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_eventhandlersenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "EventHandlersEnabled - Are event handlers enabled in the web application" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spwebappthrottlingsettings).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spwebappworkflowsettings.rb b/lib/puppet/type/dsc_spwebappworkflowsettings.rb deleted file mode 100644 index 442e6a8b..00000000 --- a/lib/puppet/type/dsc_spwebappworkflowsettings.rb +++ /dev/null @@ -1,149 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spwebappworkflowsettings) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPWebAppWorkflowSettings resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/MSFT_SPWebAppWorkflowSettings.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_url is a required attribute') if self[:dsc_url].nil? - end - - def dscmeta_resource_friendly_name; 'SPWebAppWorkflowSettings' end - def dscmeta_resource_name; 'MSFT_SPWebAppWorkflowSettings' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Url - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_url) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Url - The URL of the web application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ExternalWorkflowParticipantsEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_externalworkflowparticipantsenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ExternalWorkflowParticipantsEnabled - Are external workflow participants enabled in the web app" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: UserDefinedWorkflowsEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_userdefinedworkflowsenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UserDefinedWorkflowsEnabled - Are user defined workflows enabled in this web app" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: EmailToNoPermissionWorkflowParticipantsEnable - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_emailtonopermissionworkflowparticipantsenable) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "EmailToNoPermissionWorkflowParticipantsEnable - Are documents sent via email to external participants of workflow" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spwebappworkflowsettings).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spwordautomationserviceapp.rb b/lib/puppet/type/dsc_spwordautomationserviceapp.rb deleted file mode 100644 index 730d479e..00000000 --- a/lib/puppet/type/dsc_spwordautomationserviceapp.rb +++ /dev/null @@ -1,406 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spwordautomationserviceapp) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPWordAutomationServiceApp resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/MSFT_SPWordAutomationServiceApp.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPWordAutomationServiceApp' end - def dscmeta_resource_name; 'MSFT_SPWordAutomationServiceApp' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - THe name of the service application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present to ensure the app exists, absent to ensure that it does not Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: ApplicationPool - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_applicationpool) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApplicationPool - The name of the application pool to run the service app in" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseName - The name of the database for the service app" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databaseserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseServer - The name of the server that will host the database" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SupportedFileFormats - # Type: string[] - # IsMandatory: False - # Values: ["docx", "doc", "mht", "rtf", "xml"] - newparam(:dsc_supportedfileformats, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "SupportedFileFormats - The list of supported file types Valid values are docx, doc, mht, rtf, xml." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - if value.kind_of?(Array) - unless (['docx', 'docx', 'doc', 'doc', 'mht', 'mht', 'rtf', 'rtf', 'xml', 'xml'] & value).count == value.count - fail("Invalid value #{value}. Valid values are docx, doc, mht, rtf, xml") - end - end - if value.kind_of?(String) - unless ['docx', 'docx', 'doc', 'doc', 'mht', 'mht', 'rtf', 'rtf', 'xml', 'xml'].include?(value) - fail("Invalid value #{value}. Valid values are docx, doc, mht, rtf, xml") - end - end - end - munge do |value| - Array(value) - end - end - - # Name: DisableEmbeddedFonts - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disableembeddedfonts) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DisableEmbeddedFonts - Should embedded fonts be disabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: MaximumMemoryUsage - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maximummemoryusage) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "MaximumMemoryUsage - What is the maximum amount of memory the service app should use (in MB)" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RecycleThreshold - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_recyclethreshold) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "RecycleThreshold - What is the recycle threshold for this service app" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: DisableBinaryFileScan - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disablebinaryfilescan) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DisableBinaryFileScan - Should binary file scans be disabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ConversionProcesses - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_conversionprocesses) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "ConversionProcesses - How many conversion processes can be run at once" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: JobConversionFrequency - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_jobconversionfrequency) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "JobConversionFrequency - How frequently should new jobs be started from the queue (in minutes)" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: NumberOfConversionsPerProcess - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_numberofconversionsperprocess) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "NumberOfConversionsPerProcess - How many document conversions should be included in a single process" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: TimeBeforeConversionIsMonitored - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_timebeforeconversionismonitored) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "TimeBeforeConversionIsMonitored - How long can a conversion be run before it becomes monitored" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaximumConversionAttempts - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maximumconversionattempts) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "MaximumConversionAttempts - What is the maximum number of attempts to convert a document" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaximumSyncConversionRequests - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maximumsyncconversionrequests) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "MaximumSyncConversionRequests - What is the maximum number of sync conversion requests for the service app" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: KeepAliveTimeout - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_keepalivetimeout) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "KeepAliveTimeout - How long is the keep alive timeout set to for the service app" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaximumConversionTime - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maximumconversiontime) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "MaximumConversionTime - What is the maximum time in seconds for a document conversion to be allowed to run" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spwordautomationserviceapp).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_spworkmanagementserviceapp.rb b/lib/puppet/type/dsc_spworkmanagementserviceapp.rb deleted file mode 100644 index 35108b29..00000000 --- a/lib/puppet/type/dsc_spworkmanagementserviceapp.rb +++ /dev/null @@ -1,259 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_spworkmanagementserviceapp) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SPWorkManagementServiceApp resource type. - Automatically generated from - 'SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/MSFT_SPWorkManagementServiceApp.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'SPWorkManagementServiceApp' end - def dscmeta_resource_name; 'MSFT_SPWorkManagementServiceApp' end - def dscmeta_module_name; 'SharePointDsc' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the work management service application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProxyName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_proxyname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProxyName - The proxy name, if not specified will be /Name of service app/ Proxy" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present to ensure the app exists, Absent to ensure it is removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: ApplicationPool - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_applicationpool) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApplicationPool - The name of the application pool this will run in" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MinimumTimeBetweenEwsSyncSubscriptionSearches - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_minimumtimebetweenewssyncsubscriptionsearches) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "MinimumTimeBetweenEwsSyncSubscriptionSearches - The minimum amount of time bween EWS sync subscription searches" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MinimumTimeBetweenProviderRefreshes - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_minimumtimebetweenproviderrefreshes) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "MinimumTimeBetweenProviderRefreshes - The minimum time between provider refreshes" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MinimumTimeBetweenSearchQueries - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_minimumtimebetweensearchqueries) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "MinimumTimeBetweenSearchQueries - The minimum time between search queries" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: NumberOfSubscriptionSyncsPerEwsSyncRun - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_numberofsubscriptionsyncsperewssyncrun) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "NumberOfSubscriptionSyncsPerEwsSyncRun - The number of subscription syncronisations per EWS sync run" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: NumberOfUsersEwsSyncWillProcessAtOnce - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_numberofusersewssyncwillprocessatonce) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "NumberOfUsersEwsSyncWillProcessAtOnce - How many users will EWS calls include at once" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: NumberOfUsersPerEwsSyncBatch - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_numberofusersperewssyncbatch) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "NumberOfUsersPerEwsSyncBatch - How many users are included in a batch for EWS" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: InstallAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_installaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_spworkmanagementserviceapp).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_systemlocale.rb b/lib/puppet/type/dsc_systemlocale.rb deleted file mode 100644 index 74357638..00000000 --- a/lib/puppet/type/dsc_systemlocale.rb +++ /dev/null @@ -1,103 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_systemlocale) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC SystemLocale resource type. - Automatically generated from - 'SystemLocaleDsc/DSCResources/MSFT_SystemLocale/MSFT_SystemLocale.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_issingleinstance is a required attribute') if self[:dsc_issingleinstance].nil? - end - - def dscmeta_resource_friendly_name; 'SystemLocale' end - def dscmeta_resource_name; 'MSFT_SystemLocale' end - def dscmeta_module_name; 'SystemLocaleDsc' end - def dscmeta_module_version; '1.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: IsSingleInstance - # Type: string - # IsMandatory: True - # Values: ["Yes"] - newparam(:dsc_issingleinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes' Valid values are Yes." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Yes', 'yes'].include?(value) - fail("Invalid value '#{value}'. Valid values are Yes") - end - end - end - - # Name: SystemLocale - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_systemlocale) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SystemLocale - Specifies the System Locale." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_systemlocale).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_user.rb b/lib/puppet/type/dsc_user.rb deleted file mode 100644 index a7466644..00000000 --- a/lib/puppet/type/dsc_user.rb +++ /dev/null @@ -1,214 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_user) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC User resource type. - Automatically generated from - 'PSDesiredStateConfiguration/DSCResources/MSFT_UserResource/MSFT_UserResource.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_username is a required attribute') if self[:dsc_username].nil? - end - - def dscmeta_resource_friendly_name; 'User' end - def dscmeta_resource_name; 'MSFT_UserResource' end - def dscmeta_module_name; 'PSDesiredStateConfiguration' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: UserName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_username) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UserName" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: FullName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_fullname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FullName" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Password - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_password) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Password" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Password", value) - end - end - - # Name: Disabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Disabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: PasswordNeverExpires - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_passwordneverexpires) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "PasswordNeverExpires" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: PasswordChangeRequired - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_passwordchangerequired) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "PasswordChangeRequired" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: PasswordChangeNotAllowed - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_passwordchangenotallowed) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "PasswordChangeNotAllowed" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_user).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_userrightsassignment.rb b/lib/puppet/type/dsc_userrightsassignment.rb deleted file mode 100644 index f98df599..00000000 --- a/lib/puppet/type/dsc_userrightsassignment.rb +++ /dev/null @@ -1,142 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_userrightsassignment) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC UserRightsAssignment resource type. - Automatically generated from - 'SecurityPolicyDsc/DSCResources/MSFT_UserRightsAssignment/MSFT_UserRightsAssignment.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_policy is a required attribute') if self[:dsc_policy].nil? - end - - def dscmeta_resource_friendly_name; 'UserRightsAssignment' end - def dscmeta_resource_name; 'MSFT_UserRightsAssignment' end - def dscmeta_module_name; 'SecurityPolicyDsc' end - def dscmeta_module_version; '1.5.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Policy - # Type: string - # IsMandatory: True - # Values: ["Create_a_token_object", "Access_this_computer_from_the_network", "Change_the_system_time", "Deny_log_on_as_a_batch_job", "Deny_log_on_through_Remote_Desktop_Services", "Create_global_objects", "Remove_computer_from_docking_station", "Deny_access_to_this_computer_from_the_network", "Act_as_part_of_the_operating_system", "Modify_firmware_environment_values", "Deny_log_on_locally", "Access_Credential_Manager_as_a_trusted_caller", "Restore_files_and_directories", "Change_the_time_zone", "Replace_a_process_level_token", "Manage_auditing_and_security_log", "Create_symbolic_links", "Modify_an_object_label", "Enable_computer_and_user_accounts_to_be_trusted_for_delegation", "Generate_security_audits", "Increase_a_process_working_set", "Take_ownership_of_files_or_other_objects", "Bypass_traverse_checking", "Log_on_as_a_service", "Shut_down_the_system", "Lock_pages_in_memory", "Impersonate_a_client_after_authentication", "Profile_system_performance", "Debug_programs", "Profile_single_process", "Allow_log_on_through_Remote_Desktop_Services", "Allow_log_on_locally", "Increase_scheduling_priority", "Synchronize_directory_service_data", "Add_workstations_to_domain", "Adjust_memory_quotas_for_a_process", "Obtain_an_impersonation_token_for_another_user_in_the_same_session", "Perform_volume_maintenance_tasks", "Load_and_unload_device_drivers", "Force_shutdown_from_a_remote_system", "Back_up_files_and_directories", "Create_a_pagefile", "Deny_log_on_as_a_service", "Log_on_as_a_batch_job", "Create_permanent_shared_objects"] - newparam(:dsc_policy) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Policy - The policy name of the user rights assignment to be configured. Valid values are Create_a_token_object, Access_this_computer_from_the_network, Change_the_system_time, Deny_log_on_as_a_batch_job, Deny_log_on_through_Remote_Desktop_Services, Create_global_objects, Remove_computer_from_docking_station, Deny_access_to_this_computer_from_the_network, Act_as_part_of_the_operating_system, Modify_firmware_environment_values, Deny_log_on_locally, Access_Credential_Manager_as_a_trusted_caller, Restore_files_and_directories, Change_the_time_zone, Replace_a_process_level_token, Manage_auditing_and_security_log, Create_symbolic_links, Modify_an_object_label, Enable_computer_and_user_accounts_to_be_trusted_for_delegation, Generate_security_audits, Increase_a_process_working_set, Take_ownership_of_files_or_other_objects, Bypass_traverse_checking, Log_on_as_a_service, Shut_down_the_system, Lock_pages_in_memory, Impersonate_a_client_after_authentication, Profile_system_performance, Debug_programs, Profile_single_process, Allow_log_on_through_Remote_Desktop_Services, Allow_log_on_locally, Increase_scheduling_priority, Synchronize_directory_service_data, Add_workstations_to_domain, Adjust_memory_quotas_for_a_process, Obtain_an_impersonation_token_for_another_user_in_the_same_session, Perform_volume_maintenance_tasks, Load_and_unload_device_drivers, Force_shutdown_from_a_remote_system, Back_up_files_and_directories, Create_a_pagefile, Deny_log_on_as_a_service, Log_on_as_a_batch_job, Create_permanent_shared_objects." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Create_a_token_object', 'create_a_token_object', 'Access_this_computer_from_the_network', 'access_this_computer_from_the_network', 'Change_the_system_time', 'change_the_system_time', 'Deny_log_on_as_a_batch_job', 'deny_log_on_as_a_batch_job', 'Deny_log_on_through_Remote_Desktop_Services', 'deny_log_on_through_remote_desktop_services', 'Create_global_objects', 'create_global_objects', 'Remove_computer_from_docking_station', 'remove_computer_from_docking_station', 'Deny_access_to_this_computer_from_the_network', 'deny_access_to_this_computer_from_the_network', 'Act_as_part_of_the_operating_system', 'act_as_part_of_the_operating_system', 'Modify_firmware_environment_values', 'modify_firmware_environment_values', 'Deny_log_on_locally', 'deny_log_on_locally', 'Access_Credential_Manager_as_a_trusted_caller', 'access_credential_manager_as_a_trusted_caller', 'Restore_files_and_directories', 'restore_files_and_directories', 'Change_the_time_zone', 'change_the_time_zone', 'Replace_a_process_level_token', 'replace_a_process_level_token', 'Manage_auditing_and_security_log', 'manage_auditing_and_security_log', 'Create_symbolic_links', 'create_symbolic_links', 'Modify_an_object_label', 'modify_an_object_label', 'Enable_computer_and_user_accounts_to_be_trusted_for_delegation', 'enable_computer_and_user_accounts_to_be_trusted_for_delegation', 'Generate_security_audits', 'generate_security_audits', 'Increase_a_process_working_set', 'increase_a_process_working_set', 'Take_ownership_of_files_or_other_objects', 'take_ownership_of_files_or_other_objects', 'Bypass_traverse_checking', 'bypass_traverse_checking', 'Log_on_as_a_service', 'log_on_as_a_service', 'Shut_down_the_system', 'shut_down_the_system', 'Lock_pages_in_memory', 'lock_pages_in_memory', 'Impersonate_a_client_after_authentication', 'impersonate_a_client_after_authentication', 'Profile_system_performance', 'profile_system_performance', 'Debug_programs', 'debug_programs', 'Profile_single_process', 'profile_single_process', 'Allow_log_on_through_Remote_Desktop_Services', 'allow_log_on_through_remote_desktop_services', 'Allow_log_on_locally', 'allow_log_on_locally', 'Increase_scheduling_priority', 'increase_scheduling_priority', 'Synchronize_directory_service_data', 'synchronize_directory_service_data', 'Add_workstations_to_domain', 'add_workstations_to_domain', 'Adjust_memory_quotas_for_a_process', 'adjust_memory_quotas_for_a_process', 'Obtain_an_impersonation_token_for_another_user_in_the_same_session', 'obtain_an_impersonation_token_for_another_user_in_the_same_session', 'Perform_volume_maintenance_tasks', 'perform_volume_maintenance_tasks', 'Load_and_unload_device_drivers', 'load_and_unload_device_drivers', 'Force_shutdown_from_a_remote_system', 'force_shutdown_from_a_remote_system', 'Back_up_files_and_directories', 'back_up_files_and_directories', 'Create_a_pagefile', 'create_a_pagefile', 'Deny_log_on_as_a_service', 'deny_log_on_as_a_service', 'Log_on_as_a_batch_job', 'log_on_as_a_batch_job', 'Create_permanent_shared_objects', 'create_permanent_shared_objects'].include?(value) - fail("Invalid value '#{value}'. Valid values are Create_a_token_object, Access_this_computer_from_the_network, Change_the_system_time, Deny_log_on_as_a_batch_job, Deny_log_on_through_Remote_Desktop_Services, Create_global_objects, Remove_computer_from_docking_station, Deny_access_to_this_computer_from_the_network, Act_as_part_of_the_operating_system, Modify_firmware_environment_values, Deny_log_on_locally, Access_Credential_Manager_as_a_trusted_caller, Restore_files_and_directories, Change_the_time_zone, Replace_a_process_level_token, Manage_auditing_and_security_log, Create_symbolic_links, Modify_an_object_label, Enable_computer_and_user_accounts_to_be_trusted_for_delegation, Generate_security_audits, Increase_a_process_working_set, Take_ownership_of_files_or_other_objects, Bypass_traverse_checking, Log_on_as_a_service, Shut_down_the_system, Lock_pages_in_memory, Impersonate_a_client_after_authentication, Profile_system_performance, Debug_programs, Profile_single_process, Allow_log_on_through_Remote_Desktop_Services, Allow_log_on_locally, Increase_scheduling_priority, Synchronize_directory_service_data, Add_workstations_to_domain, Adjust_memory_quotas_for_a_process, Obtain_an_impersonation_token_for_another_user_in_the_same_session, Perform_volume_maintenance_tasks, Load_and_unload_device_drivers, Force_shutdown_from_a_remote_system, Back_up_files_and_directories, Create_a_pagefile, Deny_log_on_as_a_service, Log_on_as_a_batch_job, Create_permanent_shared_objects") - end - end - end - - # Name: Identity - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_identity, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Identity - The identity of the user or group to be added or removed from the user rights assignment." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Force - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_force) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Force - Specifies whether to Force the change" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Desired state of resource. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_userrightsassignment).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_windowsfeature.rb b/lib/puppet/type/dsc_windowsfeature.rb deleted file mode 100644 index 93dec761..00000000 --- a/lib/puppet/type/dsc_windowsfeature.rb +++ /dev/null @@ -1,181 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_windowsfeature) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC WindowsFeature resource type. - Automatically generated from - 'PSDesiredStateConfiguration/DSCResources/MSFT_RoleResource/MSFT_RoleResource.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'WindowsFeature' end - def dscmeta_resource_name; 'MSFT_RoleResource' end - def dscmeta_module_name; 'PSDesiredStateConfiguration' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the role or feature is expected to be installed on not on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: DisplayName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_displayname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DisplayName" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Source - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_source) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Source" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IncludeAllSubFeature - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_includeallsubfeature) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "IncludeAllSubFeature" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: LogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_windowsfeature).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_windowsoptionalfeature.rb b/lib/puppet/type/dsc_windowsoptionalfeature.rb deleted file mode 100644 index 8147106e..00000000 --- a/lib/puppet/type/dsc_windowsoptionalfeature.rb +++ /dev/null @@ -1,235 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_windowsoptionalfeature) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC WindowsOptionalFeature resource type. - Automatically generated from - 'PSDesiredStateConfiguration/DSCResources/MSFT_WindowsOptionalFeature/MSFT_WindowsOptionalFeature.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'WindowsOptionalFeature' end - def dscmeta_resource_name; 'MSFT_WindowsOptionalFeature' end - def dscmeta_module_name; 'PSDesiredStateConfiguration' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:enable) { provider.create } - newvalue(:disable) { provider.destroy } - defaultto { :enable } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Enable", "Disable"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Enable, Disable." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Enable', 'enable', 'Disable', 'disable'].include?(value) - fail("Invalid value '#{value}'. Valid values are Enable, Disable") - end - end - end - - # Name: Source - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_source, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Source" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: NoWindowsUpdateCheck - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_nowindowsupdatecheck) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "NoWindowsUpdateCheck" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: RemoveFilesOnDisable - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_removefilesondisable) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RemoveFilesOnDisable" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: LogLevel - # Type: string - # IsMandatory: False - # Values: ["ErrorsOnly", "ErrorsAndWarning", "ErrorsAndWarningAndInformation"] - newparam(:dsc_loglevel) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogLevel - Valid values are ErrorsOnly, ErrorsAndWarning, ErrorsAndWarningAndInformation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['ErrorsOnly', 'errorsonly', 'ErrorsAndWarning', 'errorsandwarning', 'ErrorsAndWarningAndInformation', 'errorsandwarningandinformation'].include?(value) - fail("Invalid value '#{value}'. Valid values are ErrorsOnly, ErrorsAndWarning, ErrorsAndWarningAndInformation") - end - end - end - - # Name: LogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CustomProperties - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_customproperties, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "CustomProperties" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DisplayName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_displayname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DisplayName" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_windowsoptionalfeature).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_windowsprocess.rb b/lib/puppet/type/dsc_windowsprocess.rb deleted file mode 100644 index cda895fd..00000000 --- a/lib/puppet/type/dsc_windowsprocess.rb +++ /dev/null @@ -1,287 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_windowsprocess) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC WindowsProcess resource type. - Automatically generated from - 'PSDesiredStateConfiguration/DSCResources/MSFT_ProcessResource/MSFT_ProcessResource.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_path is a required attribute') if self[:dsc_path].nil? - fail('dsc_arguments is a required attribute') if self[:dsc_arguments].nil? - end - - def dscmeta_resource_friendly_name; 'WindowsProcess' end - def dscmeta_resource_name; 'MSFT_ProcessResource' end - def dscmeta_module_name; 'PSDesiredStateConfiguration' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Path - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Arguments - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_arguments) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Arguments" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: StandardOutputPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_standardoutputpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "StandardOutputPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: StandardErrorPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_standarderrorpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "StandardErrorPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: StandardInputPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_standardinputpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "StandardInputPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: WorkingDirectory - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_workingdirectory) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WorkingDirectory" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PagedMemorySize - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_pagedmemorysize) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "PagedMemorySize" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: NonPagedMemorySize - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_nonpagedmemorysize) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "NonPagedMemorySize" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: VirtualMemorySize - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_virtualmemorysize) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "VirtualMemorySize" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: HandleCount - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_handlecount) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "HandleCount" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ProcessId - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_processid) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "ProcessId" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_windowsprocess).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xadcomputer.rb b/lib/puppet/type/dsc_xadcomputer.rb deleted file mode 100644 index b1c7f747..00000000 --- a/lib/puppet/type/dsc_xadcomputer.rb +++ /dev/null @@ -1,320 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xadcomputer) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xADComputer resource type. - Automatically generated from - 'xActiveDirectory/DSCResources/MSFT_xADComputer/MSFT_xADComputer.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_computername is a required attribute') if self[:dsc_computername].nil? - end - - def dscmeta_resource_friendly_name; 'xADComputer' end - def dscmeta_resource_name; 'MSFT_xADComputer' end - def dscmeta_module_name; 'xActiveDirectory' end - def dscmeta_module_version; '2.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ComputerName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_computername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ComputerName - Specifies the name of the computer" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Location - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_location) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Location - Specifies the location of the computer, such as an office number" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DnsHostName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_dnshostname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DnsHostName - Specifies the fully qualified domain name (FQDN) of the computer" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ServicePrincipalNames - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_serviceprincipalnames, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ServicePrincipalNames - Specifies the service principal names for the computer account" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: UserPrincipalName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_userprincipalname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UserPrincipalName - Specifies the UPN assigned to the computer account" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DisplayName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_displayname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DisplayName - Specifies the display name of the computer" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Path - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - Specifies the X.500 path of the Organizational Unit (OU) or container where the computer is located" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - Specifies a description of the computer object" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Enabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Enabled - Specifies if the computer account is enabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Manager - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_manager) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Manager - Specifies the user or group Distinguished Name that manages the computer object" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController - Specifies the Active Directory Domain Services instance to connect to perform the task" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DomainAdministratorCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_domainadministratorcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "DomainAdministratorCredential - Specifies the user account credentials to use to perform the task" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("DomainAdministratorCredential", value) - end - end - - # Name: RequestFile - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_requestfile) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RequestFile - Specifies the full path to the Offline Domain Join Request file to create." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: DistinguishedName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_distinguishedname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DistinguishedName - Returns the X.500 path of the computer object" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SID - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SID - Returns the security identifier of the computer object" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xadcomputer).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xadcscertificationauthority.rb b/lib/puppet/type/dsc_xadcscertificationauthority.rb deleted file mode 100644 index af624d9f..00000000 --- a/lib/puppet/type/dsc_xadcscertificationauthority.rb +++ /dev/null @@ -1,423 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xadcscertificationauthority) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xAdcsCertificationAuthority resource type. - Automatically generated from - 'xAdcsDeployment/DSCResources/MSFT_xAdcsCertificationAuthority/MSFT_xAdcsCertificationAuthority.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_catype is a required attribute') if self[:dsc_catype].nil? - end - - def dscmeta_resource_friendly_name; 'xAdcsCertificationAuthority' end - def dscmeta_resource_name; 'MSFT_xAdcsCertificationAuthority' end - def dscmeta_module_name; 'xAdcsDeployment' end - def dscmeta_module_version; '1.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: CAType - # Type: string - # IsMandatory: True - # Values: ["EnterpriseRootCA", "EnterpriseSubordinateCA", "StandaloneRootCA", "StandaloneSubordinateCA"] - newparam(:dsc_catype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CAType - Specifies the type of certification authority to install. The possible values are EnterpriseRootCA, EnterpriseSubordinateCA, StandaloneRootCA, or StandaloneSubordinateCA. Valid values are EnterpriseRootCA, EnterpriseSubordinateCA, StandaloneRootCA, StandaloneSubordinateCA." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['EnterpriseRootCA', 'enterpriserootca', 'EnterpriseSubordinateCA', 'enterprisesubordinateca', 'StandaloneRootCA', 'standalonerootca', 'StandaloneSubordinateCA', 'standalonesubordinateca'].include?(value) - fail("Invalid value '#{value}'. Valid values are EnterpriseRootCA, EnterpriseSubordinateCA, StandaloneRootCA, StandaloneSubordinateCA") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - To install an enterprise certification authority, the computer must be joined to an Active Directory Domain Services domain and a user account that is a member of the Enterprise Admin group is required. To install a standalone certification authority, the computer can be in a workgroup or AD DS domain. If the computer is in a workgroup, a user account that is a member of Administrators is required. If the computer is in an AD DS domain, a user account that is a member of Domain Admins is required." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether the Certificate Authority should be installed or uninstalled. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: CACommonName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_cacommonname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CACommonName - Specifies the certification authority common name." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CADistinguishedNameSuffix - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_cadistinguishednamesuffix) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CADistinguishedNameSuffix - Specifies the certification authority distinguished name suffix." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CertFile - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_certfile) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CertFile - Specifies the file name of certification authority PKCS 12 formatted certificate file." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CertFilePassword - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_certfilepassword) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "CertFilePassword - Specifies the password for certification authority certificate file." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("CertFilePassword", value) - end - end - - # Name: CertificateID - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_certificateid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CertificateID - Specifies the thumbprint or serial number of certification authority certificate." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CryptoProviderName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_cryptoprovidername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CryptoProviderName - The name of the cryptographic service provider or key storage provider that is used to generate or store the private key for the CA." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseDirectory - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databasedirectory) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseDirectory - Specifies the folder location of the certification authority database." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: HashAlgorithmName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_hashalgorithmname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "HashAlgorithmName - Specifies the signature hash algorithm used by the certification authority." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IgnoreUnicode - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_ignoreunicode) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "IgnoreUnicode - Specifies that Unicode characters are allowed in certification authority name string." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: KeyContainerName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_keycontainername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "KeyContainerName - Specifies the name of an existing private key container." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: KeyLength - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_keylength) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "KeyLength - Specifies the bit length for new certification authority key." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: LogDirectory - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logdirectory) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogDirectory - Specifies the folder location of the certification authority database log." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: OutputCertRequestFile - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_outputcertrequestfile) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "OutputCertRequestFile - Specifies the folder location for certificate request file." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: OverwriteExistingCAinDS - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_overwriteexistingcainds) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "OverwriteExistingCAinDS - Specifies that the computer object in the Active Directory Domain Service domain should be overwritten with the same computer name." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: OverwriteExistingDatabase - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_overwriteexistingdatabase) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "OverwriteExistingDatabase - Specifies that the existing certification authority database should be overwritten." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: OverwriteExistingKey - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_overwriteexistingkey) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "OverwriteExistingKey - Overwrite existing key container with the same name" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ParentCA - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_parentca) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ParentCA - Specifies the configuration string of the parent certification authority that will certify this CA." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ValidityPeriod - # Type: string - # IsMandatory: False - # Values: ["Hours", "Days", "Months", "Years"] - newparam(:dsc_validityperiod) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ValidityPeriod - Specifies the validity period of the certification authority certificate in hours, days, weeks, months or years. If this is a subordinate CA, do not use this parameter, because the validity period is determined by the parent CA. Valid values are Hours, Days, Months, Years." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Hours', 'hours', 'Days', 'days', 'Months', 'months', 'Years', 'years'].include?(value) - fail("Invalid value '#{value}'. Valid values are Hours, Days, Months, Years") - end - end - end - - # Name: ValidityPeriodUnits - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_validityperiodunits) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "ValidityPeriodUnits - Validity period of the certification authority certificate. If this is a subordinate CA, do not specify this parameter because the validity period is determined by the parent CA." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xadcscertificationauthority).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xadcsonlineresponder.rb b/lib/puppet/type/dsc_xadcsonlineresponder.rb deleted file mode 100644 index f01af8cc..00000000 --- a/lib/puppet/type/dsc_xadcsonlineresponder.rb +++ /dev/null @@ -1,124 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xadcsonlineresponder) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xAdcsOnlineResponder resource type. - Automatically generated from - 'xAdcsDeployment/DSCResources/MSFT_xAdcsOnlineResponder/MSFT_xAdcsOnlineResponder.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_issingleinstance is a required attribute') if self[:dsc_issingleinstance].nil? - end - - def dscmeta_resource_friendly_name; 'xAdcsOnlineResponder' end - def dscmeta_resource_name; 'MSFT_xAdcsOnlineResponder' end - def dscmeta_module_name; 'xAdcsDeployment' end - def dscmeta_module_version; '1.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: IsSingleInstance - # Type: string - # IsMandatory: True - # Values: ["Yes"] - newparam(:dsc_issingleinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes' Valid values are Yes." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Yes', 'yes'].include?(value) - fail("Invalid value '#{value}'. Valid values are Yes") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - If the Online Responder service is configured to use Standalone certification authority, then an account that is a member of the local Administrators on the CA is required. If the Online Responder service is configured to use an Enterprise CA, then an account that is a member of Domain Admins is required." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether the Online Responder feature should be installed or uninstalled. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xadcsonlineresponder).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xadcswebenrollment.rb b/lib/puppet/type/dsc_xadcswebenrollment.rb deleted file mode 100644 index a36c6e8d..00000000 --- a/lib/puppet/type/dsc_xadcswebenrollment.rb +++ /dev/null @@ -1,139 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xadcswebenrollment) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xAdcsWebEnrollment resource type. - Automatically generated from - 'xAdcsDeployment/DSCResources/MSFT_xAdcsWebEnrollment/MSFT_xAdcsWebEnrollment.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_issingleinstance is a required attribute') if self[:dsc_issingleinstance].nil? - end - - def dscmeta_resource_friendly_name; 'xAdcsWebEnrollment' end - def dscmeta_resource_name; 'MSFT_xAdcsWebEnrollment' end - def dscmeta_module_name; 'xAdcsDeployment' end - def dscmeta_module_version; '1.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: IsSingleInstance - # Type: string - # IsMandatory: True - # Values: ["Yes"] - newparam(:dsc_issingleinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes' Valid values are Yes." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Yes', 'yes'].include?(value) - fail("Invalid value '#{value}'. Valid values are Yes") - end - end - end - - # Name: CAConfig - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_caconfig) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CAConfig - CAConfig parameter string. Do not specify this if there is a local CA installed." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - If the Web Enrollment service is configured to use Standalone certification authority, then an account that is a member of the local Administrators on the CA is required. If the Web Enrollment service is configured to use an Enterprise CA, then an account that is a member of Domain Admins is required." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether the Web Enrollment feature should be installed or uninstalled. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xadcswebenrollment).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xaddomain.rb b/lib/puppet/type/dsc_xaddomain.rb deleted file mode 100644 index 99a67fe3..00000000 --- a/lib/puppet/type/dsc_xaddomain.rb +++ /dev/null @@ -1,208 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xaddomain) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xADDomain resource type. - Automatically generated from - 'xActiveDirectory/DSCResources/MSFT_xADDomain/MSFT_xADDomain.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_domainname is a required attribute') if self[:dsc_domainname].nil? - end - - def dscmeta_resource_friendly_name; 'xADDomain' end - def dscmeta_resource_name; 'MSFT_xADDomain' end - def dscmeta_module_name; 'xActiveDirectory' end - def dscmeta_module_version; '2.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: DomainName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_domainname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainName - Name of the domain to which the user will be added" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DomainAdministratorCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_domainadministratorcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "DomainAdministratorCredential - Credentials used to query for domain existence" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("DomainAdministratorCredential", value) - end - end - - # Name: SafemodeAdministratorPassword - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_safemodeadministratorpassword) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SafemodeAdministratorPassword - Password for the administrator account when the computer is started in Safe Mode" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SafemodeAdministratorPassword", value) - end - end - - # Name: ParentDomainName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_parentdomainname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ParentDomainName - Fully qualified name of the parent domain" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DomainNetbiosName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domainnetbiosname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainNetbiosName - NetBIOS name for the new domain" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DnsDelegationCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_dnsdelegationcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "DnsDelegationCredential - Credential used for creating DNS delegation" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("DnsDelegationCredential", value) - end - end - - # Name: DatabasePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databasepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabasePath - Path to a directory that contains the domain database" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogPath - Path to a directory for the log file that will be written" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SysvolPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sysvolpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SysvolPath - Path to a directory where the Sysvol file will be written" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xaddomain).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xaddomaincontroller.rb b/lib/puppet/type/dsc_xaddomaincontroller.rb deleted file mode 100644 index 0f5f8502..00000000 --- a/lib/puppet/type/dsc_xaddomaincontroller.rb +++ /dev/null @@ -1,177 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xaddomaincontroller) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xADDomainController resource type. - Automatically generated from - 'xActiveDirectory/DSCResources/MSFT_xADDomainController/MSFT_xADDomainController.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_domainname is a required attribute') if self[:dsc_domainname].nil? - end - - def dscmeta_resource_friendly_name; 'xADDomainController' end - def dscmeta_resource_name; 'MSFT_xADDomainController' end - def dscmeta_module_name; 'xActiveDirectory' end - def dscmeta_module_version; '2.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: DomainName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_domainname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainName" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DomainAdministratorCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_domainadministratorcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "DomainAdministratorCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("DomainAdministratorCredential", value) - end - end - - # Name: SafemodeAdministratorPassword - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_safemodeadministratorpassword) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SafemodeAdministratorPassword" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SafemodeAdministratorPassword", value) - end - end - - # Name: DatabasePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databasepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabasePath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SysvolPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sysvolpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SysvolPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SiteName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sitename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SiteName" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xaddomaincontroller).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xaddomaindefaultpasswordpolicy.rb b/lib/puppet/type/dsc_xaddomaindefaultpasswordpolicy.rb deleted file mode 100644 index cb0a620c..00000000 --- a/lib/puppet/type/dsc_xaddomaindefaultpasswordpolicy.rb +++ /dev/null @@ -1,274 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xaddomaindefaultpasswordpolicy) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xADDomainDefaultPasswordPolicy resource type. - Automatically generated from - 'xActiveDirectory/DSCResources/MSFT_xADDomainDefaultPasswordPolicy/MSFT_xADDomainDefaultPasswordPolicy.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_domainname is a required attribute') if self[:dsc_domainname].nil? - end - - def dscmeta_resource_friendly_name; 'xADDomainDefaultPasswordPolicy' end - def dscmeta_resource_name; 'MSFT_xADDomainDefaultPasswordPolicy' end - def dscmeta_module_name; 'xActiveDirectory' end - def dscmeta_module_version; '2.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: DomainName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_domainname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainName - Name of the domain to which the password policy will be applied" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ComplexityEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_complexityenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ComplexityEnabled - Whether password complexity is enabled for the default password policy" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: LockoutDuration - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_lockoutduration) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "LockoutDuration - Length of time that an account is locked after the number of failed login attempts (minutes)" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: LockoutObservationWindow - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_lockoutobservationwindow) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "LockoutObservationWindow - Maximum time between two unsuccessful login attempts before the counter is reset to 0 (minutes)" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: LockoutThreshold - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_lockoutthreshold) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "LockoutThreshold - Number of unsuccessful login attempts that are permitted before an account is locked out" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MinPasswordAge - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_minpasswordage) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "MinPasswordAge - Minimum length of time that you can have the same password (minutes)" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaxPasswordAge - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maxpasswordage) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "MaxPasswordAge - Maximum length of time that you can have the same password (minutes)" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MinPasswordLength - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_minpasswordlength) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "MinPasswordLength - Minimum number of characters that a password must contain" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: PasswordHistoryCount - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_passwordhistorycount) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "PasswordHistoryCount - Number of previous passwords to remember" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ReversibleEncryptionEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_reversibleencryptionenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ReversibleEncryptionEnabled - Whether the directory must store passwords using reversible encryption" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController - Active Directory domain controller to enact the change upon" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - Credentials used to access the domain" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xaddomaindefaultpasswordpolicy).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xaddomaintrust.rb b/lib/puppet/type/dsc_xaddomaintrust.rb deleted file mode 100644 index 8b47a3fd..00000000 --- a/lib/puppet/type/dsc_xaddomaintrust.rb +++ /dev/null @@ -1,174 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xaddomaintrust) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xADDomainTrust resource type. - Automatically generated from - 'xActiveDirectory/DSCResources/MSFT_xADDomainTrust/MSFT_xADDomainTrust.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_targetdomainname is a required attribute') if self[:dsc_targetdomainname].nil? - fail('dsc_sourcedomainname is a required attribute') if self[:dsc_sourcedomainname].nil? - end - - def dscmeta_resource_friendly_name; 'xADDomainTrust' end - def dscmeta_resource_name; 'MSFT_xADDomainTrust' end - def dscmeta_module_name; 'xActiveDirectory' end - def dscmeta_module_version; '2.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Should this resource be present or absent Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: TargetDomainAdministratorCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_targetdomainadministratorcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "TargetDomainAdministratorCredential - Credentials to authenticate to the target domain" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("TargetDomainAdministratorCredential", value) - end - end - - # Name: TargetDomainName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_targetdomainname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TargetDomainName - Name of the AD domain that is being trusted" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TrustType - # Type: string - # IsMandatory: False - # Values: ["External", "Forest"] - newparam(:dsc_trusttype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TrustType - Type of trust Valid values are External, Forest." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['External', 'external', 'Forest', 'forest'].include?(value) - fail("Invalid value '#{value}'. Valid values are External, Forest") - end - end - end - - # Name: TrustDirection - # Type: string - # IsMandatory: False - # Values: ["Bidirectional", "Inbound", "Outbound"] - newparam(:dsc_trustdirection) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TrustDirection - Direction of trust Valid values are Bidirectional, Inbound, Outbound." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Bidirectional', 'bidirectional', 'Inbound', 'inbound', 'Outbound', 'outbound'].include?(value) - fail("Invalid value '#{value}'. Valid values are Bidirectional, Inbound, Outbound") - end - end - end - - # Name: SourceDomainName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sourcedomainname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceDomainName - Name of the AD domain that is requesting the trust" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xaddomaintrust).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xadgroup.rb b/lib/puppet/type/dsc_xadgroup.rb deleted file mode 100644 index ab4a01b7..00000000 --- a/lib/puppet/type/dsc_xadgroup.rb +++ /dev/null @@ -1,319 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xadgroup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xADGroup resource type. - Automatically generated from - 'xActiveDirectory/DSCResources/MSFT_xADGroup/MSFT_xADGroup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_groupname is a required attribute') if self[:dsc_groupname].nil? - end - - def dscmeta_resource_friendly_name; 'xADGroup' end - def dscmeta_resource_name; 'MSFT_xADGroup' end - def dscmeta_module_name; 'xActiveDirectory' end - def dscmeta_module_version; '2.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: GroupName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_groupname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "GroupName - Name of the Active Directory group" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: GroupScope - # Type: string - # IsMandatory: False - # Values: ["DomainLocal", "Global", "Universal"] - newparam(:dsc_groupscope) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "GroupScope - Active Directory group scope Valid values are DomainLocal, Global, Universal." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['DomainLocal', 'domainlocal', 'Global', 'global', 'Universal', 'universal'].include?(value) - fail("Invalid value '#{value}'. Valid values are DomainLocal, Global, Universal") - end - end - end - - # Name: Category - # Type: string - # IsMandatory: False - # Values: ["Security", "Distribution"] - newparam(:dsc_category) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Category - Active Directory group category Valid values are Security, Distribution." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Security', 'security', 'Distribution', 'distribution'].include?(value) - fail("Invalid value '#{value}'. Valid values are Security, Distribution") - end - end - end - - # Name: Path - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - Location of the group within Active Directory expressed as a Distinguished Name" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Should this resource be present or absent Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - Description of the Active Directory group" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DisplayName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_displayname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DisplayName - Display name of the Active Directory group" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - Credentials used to enact the change upon" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController - Active Directory domain controller to enact the change upon" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Members - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_members, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Members - Active Directory group membership should match membership exactly" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: MembersToInclude - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_memberstoinclude, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "MembersToInclude - Active Directory group should include these members" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: MembersToExclude - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_memberstoexclude, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "MembersToExclude - Active Directory group should NOT include these members" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: MembershipAttribute - # Type: string - # IsMandatory: False - # Values: ["SamAccountName", "DistinguishedName", "ObjectGUID", "SID"] - newparam(:dsc_membershipattribute) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MembershipAttribute - Active Directory attribute used to perform membership operations Valid values are SamAccountName, DistinguishedName, ObjectGUID, SID." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['SamAccountName', 'samaccountname', 'DistinguishedName', 'distinguishedname', 'ObjectGUID', 'objectguid', 'SID', 'sid'].include?(value) - fail("Invalid value '#{value}'. Valid values are SamAccountName, DistinguishedName, ObjectGUID, SID") - end - end - end - - # Name: ManagedBy - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_managedby) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ManagedBy - Active Directory managed by attribute specified as a DistinguishedName" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Notes - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_notes) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Notes - Active Directory group notes field" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xadgroup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xadorganizationalunit.rb b/lib/puppet/type/dsc_xadorganizationalunit.rb deleted file mode 100644 index c4ba929e..00000000 --- a/lib/puppet/type/dsc_xadorganizationalunit.rb +++ /dev/null @@ -1,169 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xadorganizationalunit) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xADOrganizationalUnit resource type. - Automatically generated from - 'xActiveDirectory/DSCResources/MSFT_xADOrganizationalUnit/MSFT_xADOrganizationalUnit.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - fail('dsc_path is a required attribute') if self[:dsc_path].nil? - end - - def dscmeta_resource_friendly_name; 'xADOrganizationalUnit' end - def dscmeta_resource_name; 'MSFT_xADOrganizationalUnit' end - def dscmeta_module_name; 'xActiveDirectory' end - def dscmeta_module_version; '2.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of OU" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Path - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - Specifies the X500 path of the OU or container where the new object is created" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - The credential to be used to perform the operation on Active Directory" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ProtectedFromAccidentalDeletion - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_protectedfromaccidentaldeletion) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ProtectedFromAccidentalDeletion - Defaults to True" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - The description of the OU" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xadorganizationalunit).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xadrecyclebin.rb b/lib/puppet/type/dsc_xadrecyclebin.rb deleted file mode 100644 index b28792e8..00000000 --- a/lib/puppet/type/dsc_xadrecyclebin.rb +++ /dev/null @@ -1,131 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xadrecyclebin) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xADRecycleBin resource type. - Automatically generated from - 'xActiveDirectory/DSCResources/MSFT_xADRecycleBin/MSFT_xADRecycleBin.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_forestfqdn is a required attribute') if self[:dsc_forestfqdn].nil? - end - - def dscmeta_resource_friendly_name; 'xADRecycleBin' end - def dscmeta_resource_name; 'MSFT_xADRecycleBin' end - def dscmeta_module_name; 'xActiveDirectory' end - def dscmeta_module_version; '2.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ForestFQDN - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_forestfqdn) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ForestFQDN" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: EnterpriseAdministratorCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_enterpriseadministratorcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "EnterpriseAdministratorCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("EnterpriseAdministratorCredential", value) - end - end - - # Name: RecycleBinEnabled - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_recyclebinenabled) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RecycleBinEnabled" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ForestMode - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_forestmode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ForestMode" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xadrecyclebin).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xaduser.rb b/lib/puppet/type/dsc_xaduser.rb deleted file mode 100644 index 33b33c9f..00000000 --- a/lib/puppet/type/dsc_xaduser.rb +++ /dev/null @@ -1,775 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xaduser) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xADUser resource type. - Automatically generated from - 'xActiveDirectory/DSCResources/MSFT_xADUser/MSFT_xADUser.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_domainname is a required attribute') if self[:dsc_domainname].nil? - fail('dsc_username is a required attribute') if self[:dsc_username].nil? - end - - def dscmeta_resource_friendly_name; 'xADUser' end - def dscmeta_resource_name; 'MSFT_xADUser' end - def dscmeta_module_name; 'xActiveDirectory' end - def dscmeta_module_version; '2.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: DomainName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_domainname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainName - Name of the domain where the user account is located (only used if password is managed)" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UserName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_username) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UserName - Specifies the Security Account Manager (SAM) account name of the user (ldapDisplayName 'sAMAccountName')" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Password - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_password) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Password - Specifies a new password value for the account" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Password", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether the user account is created or deleted Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: CommonName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_commonname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CommonName - Specifies the common nane assigned to the user account (ldapDisplayName 'cn')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UserPrincipalName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_userprincipalname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UserPrincipalName - Specifies the UPN assigned to the user account (ldapDisplayName 'userPrincipalName')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DisplayName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_displayname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DisplayName - Specifies the display name of the object (ldapDisplayName 'displayName')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Path - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - Specifies the X.500 path of the Organizational Unit (OU) or container where the new object is created" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: GivenName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_givenname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "GivenName - Specifies the user's given name (ldapDisplayName 'givenName')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Initials - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_initials) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Initials - Specifies the initials that represent part of a user's name (ldapDisplayName 'initials')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Surname - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_surname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Surname - Specifies the user's last name or surname (ldapDisplayName 'sn')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - Specifies a description of the object (ldapDisplayName 'description')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: StreetAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_streetaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "StreetAddress - Specifies the user's street address (ldapDisplayName 'streetAddress')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: POBox - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_pobox) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "POBox - Specifies the user's post office box number (ldapDisplayName 'postOfficeBox')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: City - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_city) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "City - Specifies the user's town or city (ldapDisplayName 'l')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: State - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_state) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "State - Specifies the user's or Organizational Unit's state or province (ldapDisplayName 'st')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PostalCode - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_postalcode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PostalCode - Specifies the user's postal code or zip code (ldapDisplayName 'postalCode')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Country - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_country) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Country - Specifies the country or region code for the user's language of choice (ldapDisplayName 'c')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Department - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_department) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Department - Specifies the user's department (ldapDisplayName 'department')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Division - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_division) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Division - Specifies the user's division (ldapDisplayName 'division')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Company - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_company) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Company - Specifies the user's company (ldapDisplayName 'company')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Office - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_office) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Office - Specifies the location of the user's office or place of business (ldapDisplayName 'physicalDeliveryOfficeName')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: JobTitle - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_jobtitle) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "JobTitle - Specifies the user's title (ldapDisplayName 'title')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: EmailAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_emailaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EmailAddress - Specifies the user's e-mail address (ldapDisplayName 'mail')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: EmployeeID - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_employeeid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EmployeeID - Specifies the user's employee ID (ldapDisplayName 'employeeID')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: EmployeeNumber - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_employeenumber) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EmployeeNumber - Specifies the user's employee number (ldapDisplayName 'employeeNumber')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: HomeDirectory - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_homedirectory) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "HomeDirectory - Specifies a user's home directory path (ldapDisplayName 'homeDirectory')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: HomeDrive - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_homedrive) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "HomeDrive - Specifies a drive that is associated with the UNC path defined by the HomeDirectory property (ldapDisplayName 'homeDrive')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: HomePage - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_homepage) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "HomePage - Specifies the URL of the home page of the object (ldapDisplayName 'wWWHomePage')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProfilePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_profilepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProfilePath - Specifies a path to the user's profile (ldapDisplayName 'profilePath')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LogonScript - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logonscript) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogonScript - Specifies a path to the user's log on script (ldapDisplayName 'scriptPath')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Notes - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_notes) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Notes - Specifies the notes attached to the user's accoutn (ldapDisplayName 'info')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: OfficePhone - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_officephone) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "OfficePhone - Specifies the user's office telephone number (ldapDisplayName 'telephoneNumber')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MobilePhone - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_mobilephone) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MobilePhone - Specifies the user's mobile phone number (ldapDisplayName 'mobile')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Fax - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_fax) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Fax - Specifies the user's fax phone number (ldapDisplayName 'facsimileTelephoneNumber')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: HomePhone - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_homephone) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "HomePhone - Specifies the user's home telephone number (ldapDisplayName 'homePhone')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Pager - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_pager) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Pager - Specifies the user's pager number (ldapDisplayName 'pager')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IPPhone - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_ipphone) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IPPhone - Specifies the user's IP telephony phone number (ldapDisplayName 'ipPhone')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Manager - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_manager) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Manager - Specifies the user's manager specified as a Distinguished Name (ldapDisplayName 'manager')" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Enabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Enabled - Specifies if the account is enabled (default True)" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: CannotChangePassword - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_cannotchangepassword) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "CannotChangePassword - Specifies whether the account password can be changed" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: PasswordNeverExpires - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_passwordneverexpires) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "PasswordNeverExpires - Specifies whether the password of an account can expire" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController - Specifies the Active Directory Domain Services instance to use to perform the task." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DomainAdministratorCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_domainadministratorcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "DomainAdministratorCredential - Specifies the user account credentials to use to perform this task" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("DomainAdministratorCredential", value) - end - end - - # Name: PasswordAuthentication - # Type: string - # IsMandatory: False - # Values: ["Default", "Negotiate"] - newparam(:dsc_passwordauthentication) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PasswordAuthentication - Specifies the authentication context type used when testing passwords Valid values are Default, Negotiate." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Default', 'default', 'Negotiate', 'negotiate'].include?(value) - fail("Invalid value '#{value}'. Valid values are Default, Negotiate") - end - end - end - - # Name: DistinguishedName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_distinguishedname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DistinguishedName - Returns the X.500 path of the object" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xaduser).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xarchive.rb b/lib/puppet/type/dsc_xarchive.rb deleted file mode 100644 index 3d69b9d6..00000000 --- a/lib/puppet/type/dsc_xarchive.rb +++ /dev/null @@ -1,188 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xarchive) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xArchive resource type. - Automatically generated from - 'xPSDesiredStateConfiguration/DSCResources/MSFT_xArchive/MSFT_xArchive.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_path is a required attribute') if self[:dsc_path].nil? - fail('dsc_destination is a required attribute') if self[:dsc_destination].nil? - end - - def dscmeta_resource_friendly_name; 'xArchive' end - def dscmeta_resource_name; 'MSFT_xArchive' end - def dscmeta_module_name; 'xPSDesiredStateConfiguration' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Path - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - The path to the archive file that should be expanded to or removed from the specified destination." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Destination - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_destination) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Destination - The path where the specified archive file should be expanded to or removed from." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether or not the expanded content of the archive file at the specified path should exist at the specified destination. To update the specified destination to have the expanded content of the archive file at the specified path, specify this property as Present. To remove the expanded content of the archive file at the specified path from the specified destination, specify this property as Absent. The default value is Present. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Validate - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_validate) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Validate - Specifies whether or not to validate that a file at the destination with the same name as a file in the archive actually matches that corresponding file in the archive by the specified checksum method. If the file does not match and Ensure is specified as Present and Force is not specified, the resource will throw an error that the file at the desintation cannot be overwritten. If the file does not match and Ensure is specified as Present and Force is specified, the file at the desintation will be overwritten. If the file does not match and Ensure is specified as Absent, the file at the desintation will not be removed. The default value is false." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Checksum - # Type: string - # IsMandatory: False - # Values: ["SHA-1", "SHA-256", "SHA-512", "CreatedDate", "ModifiedDate"] - newparam(:dsc_checksum) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Checksum - The Checksum method to use to validate whether or not a file at the destination with the same name as a file in the archive actually matches that corresponding file in the archive. An invalid argument exception will be thrown if Checksum is specified while Validate is specified as false. ModifiedDate will check that the LastWriteTime property of the file at the destination matches the LastWriteTime property of the file in the archive. CreatedDate will check that the CreationTime property of the file at the destination matches the CreationTime property of the file in the archive. SHA-1, SHA-256, and SHA-512 will check that the hash of the file at the destination by the specified SHA method matches the hash of the file in the archive by the specified SHA method. The default value is ModifiedDate. Valid values are SHA-1, SHA-256, SHA-512, CreatedDate, ModifiedDate." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['SHA-1', 'sha-1', 'SHA-256', 'sha-256', 'SHA-512', 'sha-512', 'CreatedDate', 'createddate', 'ModifiedDate', 'modifieddate'].include?(value) - fail("Invalid value '#{value}'. Valid values are SHA-1, SHA-256, SHA-512, CreatedDate, ModifiedDate") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - The credential of a user account with permissions to access the specified archive path and destination if needed." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Force - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_force) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Force - Specifies whether or not any existing files or directories at the destination with the same name as a file or directory in the archive should be overwritten to match the file or directory in the archive. When this property is false, an error will be thrown if an item at the destination needs to be overwritten. The default value is false." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xarchive).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xazureaffinitygroup.rb b/lib/puppet/type/dsc_xazureaffinitygroup.rb deleted file mode 100644 index 276ce787..00000000 --- a/lib/puppet/type/dsc_xazureaffinitygroup.rb +++ /dev/null @@ -1,150 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xazureaffinitygroup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xAzureAffinityGroup resource type. - Automatically generated from - 'xAzure/DSCResources/MSFT_xAzureAffinityGroup/MSFT_xAzureAffinityGroup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xAzureAffinityGroup' end - def dscmeta_resource_name; 'MSFT_xAzureAffinityGroup' end - def dscmeta_module_name; 'xAzure' end - def dscmeta_module_version; '0.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Specifies a name for the new affinity group that is unique to the subscription." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether the Azure Affinity Group should be present or absent. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Location - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_location) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Location - Specifies the geographical location of the data center where the affinity group will be created. This must match a value from the Name property of objects returned by Get-AzureLocation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - Specifies a description for the affinity group. The description may be up to 1024 characters in length. " - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Label - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_label) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Label - Specifies a label for the affinity group. The label may be up to 100 characters in length. " - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xazureaffinitygroup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xazurepackadmin.rb b/lib/puppet/type/dsc_xazurepackadmin.rb deleted file mode 100644 index a1f54f46..00000000 --- a/lib/puppet/type/dsc_xazurepackadmin.rb +++ /dev/null @@ -1,169 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xazurepackadmin) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xAzurePackAdmin resource type. - Automatically generated from - 'xAzurePack/DSCResources/MSFT_xAzurePackAdmin/MSFT_xAzurePackAdmin.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_principal is a required attribute') if self[:dsc_principal].nil? - fail('dsc_sqlserver is a required attribute') if self[:dsc_sqlserver].nil? - end - - def dscmeta_resource_friendly_name; 'xAzurePackAdmin' end - def dscmeta_resource_name; 'MSFT_xAzurePackAdmin' end - def dscmeta_module_name; 'xAzurePack' end - def dscmeta_module_version; '1.4.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the principal is an Azure Pack admin.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Principal - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_principal) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Principal - The Azure Pack admin principal." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AzurePackAdminCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_azurepackadmincredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "AzurePackAdminCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("AzurePackAdminCredential", value) - end - end - - # Name: SQLServer - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLServer - Database server for the Azure Pack databases." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLInstance - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLInstance - Database instance for the Azure Pack databases." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: dbUser - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_dbuser) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "dbUser - SQL user to be used to create the database if the SetupCredential cannot be used." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("dbUser", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xazurepackadmin).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xazurepackdatabasesetting.rb b/lib/puppet/type/dsc_xazurepackdatabasesetting.rb deleted file mode 100644 index b3951fbf..00000000 --- a/lib/puppet/type/dsc_xazurepackdatabasesetting.rb +++ /dev/null @@ -1,184 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xazurepackdatabasesetting) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xAzurePackDatabaseSetting resource type. - Automatically generated from - 'xAzurePack/DSCResources/MSFT_xAzurePackDatabaseSetting/MSFT_xAzurePackDatabaseSetting.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_namespace is a required attribute') if self[:dsc_namespace].nil? - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - fail('dsc_sqlserver is a required attribute') if self[:dsc_sqlserver].nil? - end - - def dscmeta_resource_friendly_name; 'xAzurePackDatabaseSetting' end - def dscmeta_resource_name; 'MSFT_xAzurePackDatabaseSetting' end - def dscmeta_module_name; 'xAzurePack' end - def dscmeta_module_version; '1.4.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Namespace - # Type: string - # IsMandatory: True - # Values: ["AdminSite", "TenantSite"] - newparam(:dsc_namespace) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Namespace - Specifies the namespace. Valid values are AdminSite, TenantSite." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['AdminSite', 'adminsite', 'TenantSite', 'tenantsite'].include?(value) - fail("Invalid value '#{value}'. Valid values are AdminSite, TenantSite") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Specifies the name of the setting." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Value - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_value) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Value - Specifies the value of the setting." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AzurePackAdminCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_azurepackadmincredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "AzurePackAdminCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("AzurePackAdminCredential", value) - end - end - - # Name: SQLServer - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLServer - Database server for the Azure Pack databases." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLInstance - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLInstance - Database instance for the Azure Pack databases." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: dbUser - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_dbuser) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "dbUser - SQL user to be used to create the database if the SetupCredential cannot be used." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("dbUser", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xazurepackdatabasesetting).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xazurepackfqdn.rb b/lib/puppet/type/dsc_xazurepackfqdn.rb deleted file mode 100644 index 16a8894f..00000000 --- a/lib/puppet/type/dsc_xazurepackfqdn.rb +++ /dev/null @@ -1,183 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xazurepackfqdn) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xAzurePackFQDN resource type. - Automatically generated from - 'xAzurePack/DSCResources/MSFT_xAzurePackFQDN/MSFT_xAzurePackFQDN.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_namespace is a required attribute') if self[:dsc_namespace].nil? - end - - def dscmeta_resource_friendly_name; 'xAzurePackFQDN' end - def dscmeta_resource_name; 'MSFT_xAzurePackFQDN' end - def dscmeta_module_name; 'xAzurePack' end - def dscmeta_module_version; '1.4.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Namespace - # Type: string - # IsMandatory: True - # Values: ["AdminSite", "AuthSite", "TenantSite", "WindowsAuthSite"] - newparam(:dsc_namespace) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Namespace - Specifies a namespace. Valid values are AdminSite, AuthSite, TenantSite, WindowsAuthSite." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['AdminSite', 'adminsite', 'AuthSite', 'authsite', 'TenantSite', 'tenantsite', 'WindowsAuthSite', 'windowsauthsite'].include?(value) - fail("Invalid value '#{value}'. Valid values are AdminSite, AuthSite, TenantSite, WindowsAuthSite") - end - end - end - - # Name: FullyQualifiedDomainName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_fullyqualifieddomainname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FullyQualifiedDomainName - Specifies a Fully Qualified Domain Name (FQDN)." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Port - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_port) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "Port - Specifies a port number." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: AzurePackAdminCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_azurepackadmincredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "AzurePackAdminCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("AzurePackAdminCredential", value) - end - end - - # Name: SQLServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLServer - Database server for the Azure Pack databases." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLInstance - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLInstance - Database instance for the Azure Pack databases." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: dbUser - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_dbuser) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "dbUser - SQL user to be used to create the database if the SetupCredential cannot be used." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("dbUser", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xazurepackfqdn).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xazurepackidentityprovider.rb b/lib/puppet/type/dsc_xazurepackidentityprovider.rb deleted file mode 100644 index 919a00b5..00000000 --- a/lib/puppet/type/dsc_xazurepackidentityprovider.rb +++ /dev/null @@ -1,183 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xazurepackidentityprovider) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xAzurePackIdentityProvider resource type. - Automatically generated from - 'xAzurePack/DSCResources/MSFT_xAzurePackIdentityProvider/MSFT_xAzurePackIdentityProvider.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_target is a required attribute') if self[:dsc_target].nil? - end - - def dscmeta_resource_friendly_name; 'xAzurePackIdentityProvider' end - def dscmeta_resource_name; 'MSFT_xAzurePackIdentityProvider' end - def dscmeta_module_name; 'xAzurePack' end - def dscmeta_module_version; '1.4.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Target - # Type: string - # IsMandatory: True - # Values: ["Membership", "Windows"] - newparam(:dsc_target) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Target - Specifies the target site. Valid values are Membership, Windows." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Membership', 'membership', 'Windows', 'windows'].include?(value) - fail("Invalid value '#{value}'. Valid values are Membership, Windows") - end - end - end - - # Name: FullyQualifiedDomainName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_fullyqualifieddomainname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FullyQualifiedDomainName - Specifies a Fully Qualified Domain Name (FQDN)." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Port - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_port) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "Port - Specifies a port number." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: AzurePackAdminCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_azurepackadmincredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "AzurePackAdminCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("AzurePackAdminCredential", value) - end - end - - # Name: SQLServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLServer - Database server for the Azure Pack databases." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLInstance - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLInstance - Database instance for the Azure Pack databases." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: dbUser - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_dbuser) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "dbUser - SQL user to be used to create the database if the SetupCredential cannot be used." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("dbUser", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xazurepackidentityprovider).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xazurepackrelyingparty.rb b/lib/puppet/type/dsc_xazurepackrelyingparty.rb deleted file mode 100644 index 2bdf01e1..00000000 --- a/lib/puppet/type/dsc_xazurepackrelyingparty.rb +++ /dev/null @@ -1,185 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xazurepackrelyingparty) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xAzurePackRelyingParty resource type. - Automatically generated from - 'xAzurePack/DSCResources/MSFT_xAzurePackRelyingParty/MSFT_xAzurePackRelyingParty.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_target is a required attribute') if self[:dsc_target].nil? - fail('dsc_fullyqualifieddomainname is a required attribute') if self[:dsc_fullyqualifieddomainname].nil? - end - - def dscmeta_resource_friendly_name; 'xAzurePackRelyingParty' end - def dscmeta_resource_name; 'MSFT_xAzurePackRelyingParty' end - def dscmeta_module_name; 'xAzurePack' end - def dscmeta_module_version; '1.4.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Target - # Type: string - # IsMandatory: True - # Values: ["Admin", "Tenant"] - newparam(:dsc_target) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Target - Specifies the target site. Valid values are Admin, Tenant." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Admin', 'admin', 'Tenant', 'tenant'].include?(value) - fail("Invalid value '#{value}'. Valid values are Admin, Tenant") - end - end - end - - # Name: FullyQualifiedDomainName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_fullyqualifieddomainname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FullyQualifiedDomainName - Specifies a Fully Qualified Domain Name (FQDN)." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Port - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_port) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "Port - Specifies a port number." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: AzurePackAdminCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_azurepackadmincredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "AzurePackAdminCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("AzurePackAdminCredential", value) - end - end - - # Name: SQLServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLServer - Database server for the Azure Pack databases." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLInstance - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLInstance - Database instance for the Azure Pack databases." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: dbUser - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_dbuser) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "dbUser - SQL user to be used to create the database if the SetupCredential cannot be used." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("dbUser", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xazurepackrelyingparty).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xazurepackresourceprovider.rb b/lib/puppet/type/dsc_xazurepackresourceprovider.rb deleted file mode 100644 index 67578930..00000000 --- a/lib/puppet/type/dsc_xazurepackresourceprovider.rb +++ /dev/null @@ -1,638 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xazurepackresourceprovider) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xAzurePackResourceProvider resource type. - Automatically generated from - 'xAzurePack/DSCResources/MSFT_xAzurePackResourceProvider/MSFT_xAzurePackResourceProvider.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xAzurePackResourceProvider' end - def dscmeta_resource_name; 'MSFT_xAzurePackResourceProvider' end - def dscmeta_module_name; 'xAzurePack' end - def dscmeta_module_version; '1.4.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AuthenticationSite - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_authenticationsite) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AuthenticationSite - URL of the authentication site." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AdminUri - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_adminuri) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AdminUri - Specifies the URI of the Windows Azure Pack administrator API." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Specifies the name of a resource provider." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AzurePackAdminCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_azurepackadmincredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "AzurePackAdminCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("AzurePackAdminCredential", value) - end - end - - # Name: DisplayName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_displayname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DisplayName - Specifies the display name of a resource provider." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Enabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Enabled - Enables the resource provider." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: PassthroughEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_passthroughenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "PassthroughEnabled - Indicates whether the resource provider supports API pass-through." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AllowAnonymousAccess - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowanonymousaccess) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowAnonymousAccess - Specifies the URI of the Windows Azure Pack administrator API." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AllowMultipleInstances - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowmultipleinstances) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowMultipleInstances - Indicates that the cmdlet allows multiple instances of the resource provider." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AdminForwardingAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_adminforwardingaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AdminForwardingAddress - Specifies an administrative forwarding address for a resource provider." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AdminAuthenticationMode - # Type: string - # IsMandatory: False - # Values: ["None", "Basic", "Windows"] - newparam(:dsc_adminauthenticationmode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AdminAuthenticationMode - Specifies the administrative authentication mode for a resource provider. Valid values are None, Basic, Windows." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['None', 'none', 'Basic', 'basic', 'Windows', 'windows'].include?(value) - fail("Invalid value '#{value}'. Valid values are None, Basic, Windows") - end - end - end - - # Name: AdminAuthenticationUser - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_adminauthenticationuser) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "AdminAuthenticationUser - Specifies, as a PSCredential object, an administrative user name and password to connect to a resource provider." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("AdminAuthenticationUser", value) - end - end - - # Name: AdminAuthenticationUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_adminauthenticationusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AdminAuthenticationUsername - Output for the administrative user name." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TenantForwardingAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_tenantforwardingaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TenantForwardingAddress - Specifies the tenant forwarding address of a resource provider." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TenantAuthenticationMode - # Type: string - # IsMandatory: False - # Values: ["None", "Basic", "Windows"] - newparam(:dsc_tenantauthenticationmode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TenantAuthenticationMode - Specifies the tenant authentication mode for a resource provider. Valid values are None, Basic, Windows." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['None', 'none', 'Basic', 'basic', 'Windows', 'windows'].include?(value) - fail("Invalid value '#{value}'. Valid values are None, Basic, Windows") - end - end - end - - # Name: TenantAuthenticationUser - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_tenantauthenticationuser) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "TenantAuthenticationUser - Specifies, as a PSCredential object, a tenant user name and password to connect to a resource provider." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("TenantAuthenticationUser", value) - end - end - - # Name: TenantAuthenticationUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_tenantauthenticationusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TenantAuthenticationUsername - Output for the tenant user name." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TenantSourceUriTemplate - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_tenantsourceuritemplate) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TenantSourceUriTemplate - Specifies the tenant source URI template of a resource provider." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TenantTargetUriTemplate - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_tenanttargeturitemplate) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TenantTargetUriTemplate - Specifies the tenant target URI template of a resource provider." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UsageForwardingAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_usageforwardingaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UsageForwardingAddress - Specifies the tenant forwarding address of a resource provider." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UsageAuthenticationMode - # Type: string - # IsMandatory: False - # Values: ["None", "Basic", "Windows"] - newparam(:dsc_usageauthenticationmode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UsageAuthenticationMode - Specifies the usage authentication mode for a resource provider. Valid values are None, Basic, Windows." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['None', 'none', 'Basic', 'basic', 'Windows', 'windows'].include?(value) - fail("Invalid value '#{value}'. Valid values are None, Basic, Windows") - end - end - end - - # Name: UsageAuthenticationUser - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_usageauthenticationuser) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "UsageAuthenticationUser - Specifies, as a PSCredential object, a usage user name and password to connect to a resource provider." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("UsageAuthenticationUser", value) - end - end - - # Name: UsageAuthenticationUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_usageauthenticationusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UsageAuthenticationUsername - Output for the usage user name." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: HealthCheckForwardingAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_healthcheckforwardingaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "HealthCheckForwardingAddress - Specifies the health check forwarding address for a resource provider." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: HealthCheckAuthenticationMode - # Type: string - # IsMandatory: False - # Values: ["None", "Basic", "Windows"] - newparam(:dsc_healthcheckauthenticationmode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "HealthCheckAuthenticationMode - Specifies the health check authentication mode for a resource provider. Valid values are None, Basic, Windows." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['None', 'none', 'Basic', 'basic', 'Windows', 'windows'].include?(value) - fail("Invalid value '#{value}'. Valid values are None, Basic, Windows") - end - end - end - - # Name: HealthCheckAuthenticationUser - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_healthcheckauthenticationuser) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "HealthCheckAuthenticationUser - Specifies, as a PSCredential object, a health check user name and password to connect to a resource provider." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("HealthCheckAuthenticationUser", value) - end - end - - # Name: HealthCheckAuthenticationUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_healthcheckauthenticationusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "HealthCheckAuthenticationUsername - Output for the health check user name." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: NotificationForwardingAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_notificationforwardingaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "NotificationForwardingAddress - Specifies the notification forwarding address of a resource provider." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: NotificationAuthenticationMode - # Type: string - # IsMandatory: False - # Values: ["None", "Basic", "Windows"] - newparam(:dsc_notificationauthenticationmode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "NotificationAuthenticationMode - Specifies the notification authentication mode for a resource provider. Valid values are None, Basic, Windows." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['None', 'none', 'Basic', 'basic', 'Windows', 'windows'].include?(value) - fail("Invalid value '#{value}'. Valid values are None, Basic, Windows") - end - end - end - - # Name: NotificationAuthenticationUser - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_notificationauthenticationuser) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "NotificationAuthenticationUser - Specifies, as a PSCredential object, a notification user name and password to connect to a resource provider." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("NotificationAuthenticationUser", value) - end - end - - # Name: NotificationAuthenticationUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_notificationauthenticationusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "NotificationAuthenticationUsername - Output for the notification user name." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstanceId - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_instanceid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceId - Specifies an ID for an instance of a resource provider." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstanceDisplayName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_instancedisplayname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceDisplayName - Specifies a display name for an instance of a resource provider." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MaxQuotaUpdateBatchSize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_maxquotaupdatebatchsize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MaxQuotaUpdateBatchSize - Specifies the number of subscriptions that can be updated in a single request." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SubscriptionStatusPollingInterval - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_subscriptionstatuspollinginterval) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SubscriptionStatusPollingInterval - Specifies the time interval at which the management service polls the resource provider for subscription status updates." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Type - # Type: string - # IsMandatory: False - # Values: ["Standard", "UsageProvider", "CloudServiceProvider"] - newparam(:dsc_type) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Type - Specifies the type of the resource provider. Valid values are Standard, UsageProvider, CloudServiceProvider." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Standard', 'standard', 'UsageProvider', 'usageprovider', 'CloudServiceProvider', 'cloudserviceprovider'].include?(value) - fail("Invalid value '#{value}'. Valid values are Standard, UsageProvider, CloudServiceProvider") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xazurepackresourceprovider).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xazurepacksetup.rb b/lib/puppet/type/dsc_xazurepacksetup.rb deleted file mode 100644 index 99a34795..00000000 --- a/lib/puppet/type/dsc_xazurepacksetup.rb +++ /dev/null @@ -1,231 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xazurepacksetup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xAzurePackSetup resource type. - Automatically generated from - 'xAzurePack/DSCResources/MSFT_xAzurePackSetup/MSFT_xAzurePackSetup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_role is a required attribute') if self[:dsc_role].nil? - fail('dsc_action is a required attribute') if self[:dsc_action].nil? - end - - def dscmeta_resource_friendly_name; 'xAzurePackSetup' end - def dscmeta_resource_name; 'MSFT_xAzurePackSetup' end - def dscmeta_module_name; 'xAzurePack' end - def dscmeta_module_version; '1.4.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Role - # Type: string - # IsMandatory: True - # Values: ["Admin API", "Tenant API", "Tenant Public API", "SQL Server Extension", "MySQL Extension", "Admin Site", "Admin Authentication Site", "Tenant Site", "Tenant Authentication Site"] - newparam(:dsc_role) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Role - The Azure Pack role to be installed or initialized. Valid values are Admin API, Tenant API, Tenant Public API, SQL Server Extension, MySQL Extension, Admin Site, Admin Authentication Site, Tenant Site, Tenant Authentication Site." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Admin API', 'admin api', 'Tenant API', 'tenant api', 'Tenant Public API', 'tenant public api', 'SQL Server Extension', 'sql server extension', 'MySQL Extension', 'mysql extension', 'Admin Site', 'admin site', 'Admin Authentication Site', 'admin authentication site', 'Tenant Site', 'tenant site', 'Tenant Authentication Site', 'tenant authentication site'].include?(value) - fail("Invalid value '#{value}'. Valid values are Admin API, Tenant API, Tenant Public API, SQL Server Extension, MySQL Extension, Admin Site, Admin Authentication Site, Tenant Site, Tenant Authentication Site") - end - end - end - - # Name: Action - # Type: string - # IsMandatory: True - # Values: ["Install", "Initialize"] - newparam(:dsc_action) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Action - Install or initialize. Valid values are Install, Initialize." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Install', 'install', 'Initialize', 'initialize'].include?(value) - fail("Invalid value '#{value}'. Valid values are Install, Initialize") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - # Name: Passphrase - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_passphrase) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Passphrase - Passphrase for the Azure Pack deployment." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Passphrase", value) - end - end - - # Name: SQLServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLServer - Database server for the Azure Pack databases." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLInstance - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLInstance - Database instance for the Azure Pack databases." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: dbUser - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_dbuser) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "dbUser - SQL user to be used to create the database if the SetupCredential cannot be used." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("dbUser", value) - end - end - - # Name: EnableCeip - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_enableceip) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EnableCeip - Enable Customer Experience Improvement Program." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xazurepacksetup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xazurepackupdate.rb b/lib/puppet/type/dsc_xazurepackupdate.rb deleted file mode 100644 index f1889b48..00000000 --- a/lib/puppet/type/dsc_xazurepackupdate.rb +++ /dev/null @@ -1,134 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xazurepackupdate) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xAzurePackUpdate resource type. - Automatically generated from - 'xAzurePack/DSCResources/MSFT_xAzurePackUpdate/MSFT_xAzurePackUpdate.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_role is a required attribute') if self[:dsc_role].nil? - end - - def dscmeta_resource_friendly_name; 'xAzurePackUpdate' end - def dscmeta_resource_name; 'MSFT_xAzurePackUpdate' end - def dscmeta_module_name; 'xAzurePack' end - def dscmeta_module_version; '1.4.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Role - # Type: string - # IsMandatory: True - # Values: ["Admin API", "Tenant API", "Tenant Public API", "SQL Server Extension", "MySQL Extension", "Admin Site", "Admin Authentication Site", "Tenant Site", "Tenant Authentication Site"] - newparam(:dsc_role) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Role - The Azure Pack role to be updated. Valid values are Admin API, Tenant API, Tenant Public API, SQL Server Extension, MySQL Extension, Admin Site, Admin Authentication Site, Tenant Site, Tenant Authentication Site." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Admin API', 'admin api', 'Tenant API', 'tenant api', 'Tenant Public API', 'tenant public api', 'SQL Server Extension', 'sql server extension', 'MySQL Extension', 'mysql extension', 'Admin Site', 'admin site', 'Admin Authentication Site', 'admin authentication site', 'Tenant Site', 'tenant site', 'Tenant Authentication Site', 'tenant authentication site'].include?(value) - fail("Invalid value '#{value}'. Valid values are Admin API, Tenant API, Tenant Public API, SQL Server Extension, MySQL Extension, Admin Site, Admin Authentication Site, Tenant Site, Tenant Authentication Site") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xazurepackupdate).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xazurequickvm.rb b/lib/puppet/type/dsc_xazurequickvm.rb deleted file mode 100644 index 41b8d37a..00000000 --- a/lib/puppet/type/dsc_xazurequickvm.rb +++ /dev/null @@ -1,227 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xazurequickvm) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xAzureQuickVM resource type. - Automatically generated from - 'xAzure/DSCResources/MSFT_xAzureQuickVM/MSFT_xAzureQuickVM.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xAzureQuickVM' end - def dscmeta_resource_name; 'MSFT_xAzureQuickVM' end - def dscmeta_module_name; 'xAzure' end - def dscmeta_module_version; '0.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Specifies the name of the virtual machine." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether the Azure VM should be present or absent. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: ImageName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_imagename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ImageName - Specifies the name of the operating system image to use to create the operating system disk." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ServiceName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_servicename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServiceName - Specifies the new or existing service name. " - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Linux - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_linux) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Linux - Creates a Linux virtual machine." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: LinuxUser - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_linuxuser) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LinuxUser - Specifies the Linux administrative account name to create." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Windows - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_windows) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Windows - Creates a Windows virtual machine." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AdminUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_adminusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AdminUsername - Specifies the name for the administrative account to create." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Password - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_password) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Password - Specifies the password for the administrative account." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstanceSize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_instancesize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceSize - Specifies the size of the instance. For a list of virtual machine sizes, see http://msdn.microsoft.com/library/azure/dn197896.aspx" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xazurequickvm).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xazureservice.rb b/lib/puppet/type/dsc_xazureservice.rb deleted file mode 100644 index 6a4ced75..00000000 --- a/lib/puppet/type/dsc_xazureservice.rb +++ /dev/null @@ -1,150 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xazureservice) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xAzureService resource type. - Automatically generated from - 'xAzure/DSCResources/MSFT_xAzureService/MSFT_xAzureService.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_servicename is a required attribute') if self[:dsc_servicename].nil? - end - - def dscmeta_resource_friendly_name; 'xAzureService' end - def dscmeta_resource_name; 'MSFT_xAzureService' end - def dscmeta_module_name; 'xAzure' end - def dscmeta_module_version; '0.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ServiceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_servicename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServiceName - Specifies a name for the new cloud service that is unique to the subscription." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether the service should be present or absent. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - Specifies the Azure Affinity Group for the service." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AffinityGroup - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_affinitygroup) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AffinityGroup - Specifies a description for the service." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Label - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_label) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Label - Specifies a label for the service." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xazureservice).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xazuresqldatabase.rb b/lib/puppet/type/dsc_xazuresqldatabase.rb deleted file mode 100644 index f360467d..00000000 --- a/lib/puppet/type/dsc_xazuresqldatabase.rb +++ /dev/null @@ -1,214 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xazuresqldatabase) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xAzureSqlDatabase resource type. - Automatically generated from - 'xAzure/DSCResources/MSFT_xAzureSqlDatabase/MSFT_xAzureSqlDatabase.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xAzureSqlDatabase' end - def dscmeta_resource_name; 'MSFT_xAzureSqlDatabase' end - def dscmeta_module_name; 'xAzure' end - def dscmeta_module_version; '0.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of the database" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MaximumSizeInGB - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maximumsizeingb) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "MaximumSizeInGB - Maximum size of the database in GB" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Collation - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_collation) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Collation - Collation of the database" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Edition - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_edition) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Edition - Edition of the database" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ServerCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_servercredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "ServerCredential - Credential to the database server" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("ServerCredential", value) - end - end - - # Name: ServerName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_servername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServerName - Name of the database server" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AzureSubscriptionName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_azuresubscriptionname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AzureSubscriptionName - Specifies the name of the Azure subscription that should be set to Current" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AzurePublishSettingsFile - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_azurepublishsettingsfile) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AzurePublishSettingsFile - Specifies the location of the Publish Settings file for the Azure Subscription" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Ensure that database is present or absent Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xazuresqldatabase).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xazuresqldatabaseserverfirewallrule.rb b/lib/puppet/type/dsc_xazuresqldatabaseserverfirewallrule.rb deleted file mode 100644 index e2c1ea26..00000000 --- a/lib/puppet/type/dsc_xazuresqldatabaseserverfirewallrule.rb +++ /dev/null @@ -1,182 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xazuresqldatabaseserverfirewallrule) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xAzureSqlDatabaseServerFirewallRule resource type. - Automatically generated from - 'xAzure/DSCResources/MSFT_xAzureSqlDatabaseServerFirewallRule/MSFT_xAzureSqlDatabaseServerFirewallRule.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_rulename is a required attribute') if self[:dsc_rulename].nil? - fail('dsc_servername is a required attribute') if self[:dsc_servername].nil? - end - - def dscmeta_resource_friendly_name; 'xAzureSqlDatabaseServerFirewallRule' end - def dscmeta_resource_name; 'MSFT_xAzureSqlDatabaseServerFirewallRule' end - def dscmeta_module_name; 'xAzure' end - def dscmeta_module_version; '0.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: RuleName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_rulename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RuleName - Name of the firewall rule" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ServerName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_servername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServerName - Name of the database server for which firewall rule should be created" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: StartIPAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_startipaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "StartIPAddress - Start IP address of the firewall rule" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: EndIPAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_endipaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EndIPAddress - End IP address of the firewall rule" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AzureSubscriptionName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_azuresubscriptionname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AzureSubscriptionName - Specifies the name of the Azure subscription that should be set to Current" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AzurePublishSettingsFile - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_azurepublishsettingsfile) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AzurePublishSettingsFile - Specifies the location of the Publish Settings file for the Azure Subscription" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Ensure that firewall rule is present or absent Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xazuresqldatabaseserverfirewallrule).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xazurestorageaccount.rb b/lib/puppet/type/dsc_xazurestorageaccount.rb deleted file mode 100644 index 2e3c191d..00000000 --- a/lib/puppet/type/dsc_xazurestorageaccount.rb +++ /dev/null @@ -1,165 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xazurestorageaccount) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xAzureStorageAccount resource type. - Automatically generated from - 'xAzure/DSCResources/MSFT_xAzureStorageAccount/MSFT_xAzureStorageAccount.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_storageaccountname is a required attribute') if self[:dsc_storageaccountname].nil? - end - - def dscmeta_resource_friendly_name; 'xAzureStorageAccount' end - def dscmeta_resource_name; 'MSFT_xAzureStorageAccount' end - def dscmeta_module_name; 'xAzure' end - def dscmeta_module_version; '0.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: StorageAccountName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_storageaccountname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "StorageAccountName - Specifies a name for the storage account. The storage account name must be unique to Windows Azure and must be between 3 and 24 characters in length and use lowercase letters and numbers only." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether the Azure Storage Account should be present or absent. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: AffinityGroup - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_affinitygroup) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AffinityGroup - Specifies the name of an existing affinity group in the current subscription. You can specify either a Location or an AffinityGroup parameter, but not both. " - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Container - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_container) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Container - Specifies a name for the Container that should be created in the Azure Storage Account." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Folder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_folder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Folder - Specifies a local folder. All files in the root of the folder will be uploaded to the new container." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Label - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_label) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Label - Specifies a label for the storage account. The label may be up to 100 characters in length." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xazurestorageaccount).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xazuresubscription.rb b/lib/puppet/type/dsc_xazuresubscription.rb deleted file mode 100644 index 5a6172e1..00000000 --- a/lib/puppet/type/dsc_xazuresubscription.rb +++ /dev/null @@ -1,120 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xazuresubscription) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xAzureSubscription resource type. - Automatically generated from - 'xAzure/DSCResources/MSFT_xAzureSubscription/MSFT_xAzureSubscription.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_azuresubscriptionname is a required attribute') if self[:dsc_azuresubscriptionname].nil? - end - - def dscmeta_resource_friendly_name; 'xAzureSubscription' end - def dscmeta_resource_name; 'MSFT_xAzureSubscription' end - def dscmeta_module_name; 'xAzure' end - def dscmeta_module_version; '0.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether the subscription should be present or absent. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: AzureSubscriptionName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_azuresubscriptionname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AzureSubscriptionName - Specifies the name of the Azure subscription that should be set to Current." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AzurePublishSettingsFile - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_azurepublishsettingsfile) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AzurePublishSettingsFile - Specifies the location of the Publish Settings file for the Azure Subscription." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xazuresubscription).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xazurevm.rb b/lib/puppet/type/dsc_xazurevm.rb deleted file mode 100644 index c658bdf1..00000000 --- a/lib/puppet/type/dsc_xazurevm.rb +++ /dev/null @@ -1,258 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xazurevm) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xAzureVM resource type. - Automatically generated from - 'xAzure/DSCResources/MSFT_xAzureVM/MSFT_xAzureVM.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xAzureVM' end - def dscmeta_resource_name; 'MSFT_xAzureVM' end - def dscmeta_module_name; 'xAzure' end - def dscmeta_module_version; '0.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Specifies the name of the virtual machine." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether the Azure VM should be present or absent. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: ImageName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_imagename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ImageName - Specifies the name of the operating system image to use to create the operating system disk." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ServiceName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_servicename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServiceName - Specifies the new or existing service name." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: StorageAccountName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_storageaccountname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "StorageAccountName - Specifies the name of the storage account for the VM." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstanceSize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_instancesize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceSize - Specifies the size of the instance. For a list of virtual machine sizes, see http://msdn.microsoft.com/library/azure/dn197896.aspx" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Linux - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_linux) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Linux - Creates a Linux virtual machine." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Windows - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_windows) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Windows - Creates a Windows virtual machine." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ExtensionContainerName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_extensioncontainername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ExtensionContainerName - The name of the Container in Azure Blob storage where the script files will reside. Case sensitive." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ExtensionFileList - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_extensionfilelist) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ExtensionFileList - List of files in Azure Blob container that should be copied in to the VM. Case sensitive." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ExtensionScriptName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_extensionscriptname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ExtensionScriptName - Name of one of the files in the container that will be exectued at startup. Case sensitive." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xazurevm).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xazurevmdscconfiguration.rb b/lib/puppet/type/dsc_xazurevmdscconfiguration.rb deleted file mode 100644 index e0fcc6cf..00000000 --- a/lib/puppet/type/dsc_xazurevmdscconfiguration.rb +++ /dev/null @@ -1,180 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xazurevmdscconfiguration) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xAzureVMDscConfiguration resource type. - Automatically generated from - 'xAzure/DSCResources/MSFT_xAzureVMDscConfiguration/MSFT_xAzureVMDscConfiguration.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_storageaccountname is a required attribute') if self[:dsc_storageaccountname].nil? - end - - def dscmeta_resource_friendly_name; 'xAzureVMDscConfiguration' end - def dscmeta_resource_name; 'MSFT_xAzureVMDscConfiguration' end - def dscmeta_module_name; 'xAzure' end - def dscmeta_module_version; '0.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: StorageAccountName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_storageaccountname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "StorageAccountName - Specifies name of the existing storage account." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether the supplied Configuration is Present or Absent in Azure Storage Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: ContainerName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_containername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ContainerName - Specifies the name of the Container in the Azure Storage Account." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ConfigurationPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_configurationpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConfigurationPath - Specifies location of the Dsc Configuration document" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AzureSubscriptionName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_azuresubscriptionname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AzureSubscriptionName - Specifies the name of the Azure subscription that should be set to Current." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AzurePublishSettingsPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_azurepublishsettingspath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AzurePublishSettingsPath - Specifies the location of the Publish Settings file for the Azure Subscription." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: BlobUri - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_bloburi) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "BlobUri - Absolute Uri of the Blob" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xazurevmdscconfiguration).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xazurevmdscextension.rb b/lib/puppet/type/dsc_xazurevmdscextension.rb deleted file mode 100644 index ae1f6926..00000000 --- a/lib/puppet/type/dsc_xazurevmdscextension.rb +++ /dev/null @@ -1,312 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xazurevmdscextension) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xAzureVMDscExtension resource type. - Automatically generated from - 'xAzure/DSCResources/MSFT_xAzureVMDscExtension/MSFT_xAzureVMDscExtension.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_vmname is a required attribute') if self[:dsc_vmname].nil? - end - - def dscmeta_resource_friendly_name; 'xAzureVMDscExtension' end - def dscmeta_resource_name; 'MSFT_xAzureVMDscExtension' end - def dscmeta_module_name; 'xAzure' end - def dscmeta_module_version; '0.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: VMName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_vmname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "VMName - Specifies name of the VM. This is used together with ServiceName to construct a persistent vm object." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ServiceName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_servicename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServiceName - Specifies name of the Service where the VM is deployed." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ConfigurationArchive - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_configurationarchive) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConfigurationArchive - The name of the configuration package .zip file that was previously uploaded by Publish-AzureVMDscConfiguration. This parameter must specify only the name of the file, without any path." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: StorageAccountName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_storageaccountname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "StorageAccountName - Specifies the name of the Storage Account used to create the Storage Context. The Azure Storage Context provides the security settings used to access the configuration script. This context should provide read access to the container specified by ContainerName." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ConfigurationArgument - # Type: MSFT_KeyValuePair - # IsMandatory: False - # Values: None - newparam(:dsc_configurationargument) do - def mof_type; 'MSFT_KeyValuePair' end - def mof_is_embedded?; true end - desc "ConfigurationArgument - A hashtable specifying the arguments to the configuration function. The keys correspond to the parameter names and the values to the parameter values." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - fail 'ConfigurationArgument may only have a single key / value pair' unless value.length == 1 - end - end - - # Name: ConfigurationDataPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_configurationdatapath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConfigurationDataPath - The path to a .psd1 file that specifies the data for the configuration function." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Configuration - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_configuration) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Configuration - Name of the configuration script or module that will be invoked by the DSC Extension." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ContainerName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_containername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ContainerName - Name of the Azure Storage Container where the ConfigurationArchive is located." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Force - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_force) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Force - By default Set-AzureVMDscExtension will not overwrite any existing blobs. Use -Force to overwrite them." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ReferenceName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_referencename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ReferenceName - The Extension Reference Name" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: StorageEndpointSuffix - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_storageendpointsuffix) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "StorageEndpointSuffix - The DNS endpoint suffix for all storage services, e.g. core.windows.net" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Version - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_version) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Version - The specific version of the DSC Extension to use. If not given, it will default to 1.*" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TimeStamp - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_timestamp) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TimeStamp - Returns the timestamp of the last DSC Extension execution." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Code - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_code) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Code - Returns the message code for the latest oepration by the DSC Extension." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Message - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_message) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Message - Returns the formatted message string for the latest operation by the DSC Extension." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Status - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_status) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Status - Returns the state of the DSC Extension from Azure." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xazurevmdscextension).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xblautobitlocker.rb b/lib/puppet/type/dsc_xblautobitlocker.rb deleted file mode 100644 index 1a1149aa..00000000 --- a/lib/puppet/type/dsc_xblautobitlocker.rb +++ /dev/null @@ -1,395 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xblautobitlocker) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xBLAutoBitlocker resource type. - Automatically generated from - 'xBitlocker/DSCResources/MSFT_xBLAutoBitlocker/MSFT_xBLAutoBitlocker.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_drivetype is a required attribute') if self[:dsc_drivetype].nil? - end - - def dscmeta_resource_friendly_name; 'xBLAutoBitlocker' end - def dscmeta_resource_name; 'MSFT_xBLAutoBitlocker' end - def dscmeta_module_name; 'xBitlocker' end - def dscmeta_module_version; '1.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: DriveType - # Type: string - # IsMandatory: True - # Values: ["Fixed", "Removable"] - newparam(:dsc_drivetype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DriveType - Valid values are Fixed, Removable." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Fixed', 'fixed', 'Removable', 'removable'].include?(value) - fail("Invalid value '#{value}'. Valid values are Fixed, Removable") - end - end - end - - # Name: MinDiskCapacityGB - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_mindiskcapacitygb) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "MinDiskCapacityGB" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: PrimaryProtector - # Type: string - # IsMandatory: False - # Values: ["PasswordProtector", "RecoveryPasswordProtector", "StartupKeyProtector", "TpmProtector"] - newparam(:dsc_primaryprotector) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PrimaryProtector - Valid values are PasswordProtector, RecoveryPasswordProtector, StartupKeyProtector, TpmProtector." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['PasswordProtector', 'passwordprotector', 'RecoveryPasswordProtector', 'recoverypasswordprotector', 'StartupKeyProtector', 'startupkeyprotector', 'TpmProtector', 'tpmprotector'].include?(value) - fail("Invalid value '#{value}'. Valid values are PasswordProtector, RecoveryPasswordProtector, StartupKeyProtector, TpmProtector") - end - end - end - - # Name: AutoUnlock - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_autounlock) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AutoUnlock" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AdAccountOrGroup - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_adaccountorgroup) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AdAccountOrGroup" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AdAccountOrGroupProtector - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_adaccountorgroupprotector) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AdAccountOrGroupProtector" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: EncryptionMethod - # Type: string - # IsMandatory: False - # Values: ["Aes128", "Aes256"] - newparam(:dsc_encryptionmethod) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EncryptionMethod - Valid values are Aes128, Aes256." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Aes128', 'aes128', 'Aes256', 'aes256'].include?(value) - fail("Invalid value '#{value}'. Valid values are Aes128, Aes256") - end - end - end - - # Name: HardwareEncryption - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_hardwareencryption) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "HardwareEncryption" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Password - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_password) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Password" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Password", value) - end - end - - # Name: PasswordProtector - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_passwordprotector) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "PasswordProtector" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Pin - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_pin) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Pin" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Pin", value) - end - end - - # Name: RecoveryKeyPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_recoverykeypath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RecoveryKeyPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RecoveryKeyProtector - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_recoverykeyprotector) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RecoveryKeyProtector" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: RecoveryPasswordProtector - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_recoverypasswordprotector) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RecoveryPasswordProtector" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Service - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_service) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Service" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: SkipHardwareTest - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_skiphardwaretest) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SkipHardwareTest" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: StartupKeyPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_startupkeypath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "StartupKeyPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: StartupKeyProtector - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_startupkeyprotector) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "StartupKeyProtector" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: TpmProtector - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_tpmprotector) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "TpmProtector" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: UsedSpaceOnly - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_usedspaceonly) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UsedSpaceOnly" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xblautobitlocker).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xblbitlocker.rb b/lib/puppet/type/dsc_xblbitlocker.rb deleted file mode 100644 index 1f267584..00000000 --- a/lib/puppet/type/dsc_xblbitlocker.rb +++ /dev/null @@ -1,390 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xblbitlocker) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xBLBitlocker resource type. - Automatically generated from - 'xBitlocker/DSCResources/MSFT_xBLBitlocker/MSFT_xBLBitlocker.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_mountpoint is a required attribute') if self[:dsc_mountpoint].nil? - end - - def dscmeta_resource_friendly_name; 'xBLBitlocker' end - def dscmeta_resource_name; 'MSFT_xBLBitlocker' end - def dscmeta_module_name; 'xBitlocker' end - def dscmeta_module_version; '1.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: MountPoint - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_mountpoint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MountPoint" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PrimaryProtector - # Type: string - # IsMandatory: False - # Values: ["PasswordProtector", "RecoveryPasswordProtector", "StartupKeyProtector", "TpmProtector"] - newparam(:dsc_primaryprotector) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PrimaryProtector - Valid values are PasswordProtector, RecoveryPasswordProtector, StartupKeyProtector, TpmProtector." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['PasswordProtector', 'passwordprotector', 'RecoveryPasswordProtector', 'recoverypasswordprotector', 'StartupKeyProtector', 'startupkeyprotector', 'TpmProtector', 'tpmprotector'].include?(value) - fail("Invalid value '#{value}'. Valid values are PasswordProtector, RecoveryPasswordProtector, StartupKeyProtector, TpmProtector") - end - end - end - - # Name: AutoUnlock - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_autounlock) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AutoUnlock" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AllowImmediateReboot - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowimmediatereboot) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowImmediateReboot" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AdAccountOrGroup - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_adaccountorgroup) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AdAccountOrGroup" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AdAccountOrGroupProtector - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_adaccountorgroupprotector) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AdAccountOrGroupProtector" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: EncryptionMethod - # Type: string - # IsMandatory: False - # Values: ["Aes128", "Aes256"] - newparam(:dsc_encryptionmethod) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EncryptionMethod - Valid values are Aes128, Aes256." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Aes128', 'aes128', 'Aes256', 'aes256'].include?(value) - fail("Invalid value '#{value}'. Valid values are Aes128, Aes256") - end - end - end - - # Name: HardwareEncryption - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_hardwareencryption) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "HardwareEncryption" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Password - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_password) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Password" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Password", value) - end - end - - # Name: PasswordProtector - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_passwordprotector) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "PasswordProtector" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Pin - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_pin) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Pin" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Pin", value) - end - end - - # Name: RecoveryKeyPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_recoverykeypath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RecoveryKeyPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RecoveryKeyProtector - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_recoverykeyprotector) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RecoveryKeyProtector" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: RecoveryPasswordProtector - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_recoverypasswordprotector) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RecoveryPasswordProtector" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Service - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_service) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Service" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: SkipHardwareTest - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_skiphardwaretest) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SkipHardwareTest" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: StartupKeyPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_startupkeypath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "StartupKeyPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: StartupKeyProtector - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_startupkeyprotector) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "StartupKeyProtector" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: TpmProtector - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_tpmprotector) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "TpmProtector" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: UsedSpaceOnly - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_usedspaceonly) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UsedSpaceOnly" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xblbitlocker).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xbltpm.rb b/lib/puppet/type/dsc_xbltpm.rb deleted file mode 100644 index 68f594d8..00000000 --- a/lib/puppet/type/dsc_xbltpm.rb +++ /dev/null @@ -1,133 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xbltpm) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xBLTpm resource type. - Automatically generated from - 'xBitlocker/DSCResources/MSFT_xBLTpm/MSFT_xBLTpm.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_identity is a required attribute') if self[:dsc_identity].nil? - end - - def dscmeta_resource_friendly_name; 'xBLTpm' end - def dscmeta_resource_name; 'MSFT_xBLTpm' end - def dscmeta_module_name; 'xBitlocker' end - def dscmeta_module_version; '1.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Identity - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_identity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Identity" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AllowClear - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowclear) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowClear" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AllowPhysicalPresence - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowphysicalpresence) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowPhysicalPresence" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AllowImmediateReboot - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowimmediatereboot) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowImmediateReboot" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xbltpm).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xcertificateexport.rb b/lib/puppet/type/dsc_xcertificateexport.rb deleted file mode 100644 index 75438750..00000000 --- a/lib/puppet/type/dsc_xcertificateexport.rb +++ /dev/null @@ -1,332 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xcertificateexport) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xCertificateExport resource type. - Automatically generated from - 'xCertificate/DSCResources/MSFT_xCertificateExport/MSFT_xCertificateExport.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_path is a required attribute') if self[:dsc_path].nil? - end - - def dscmeta_resource_friendly_name; 'xCertificateExport' end - def dscmeta_resource_name; 'MSFT_xCertificateExport' end - def dscmeta_module_name; 'xCertificate' end - def dscmeta_module_version; '3.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Path - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - The path to the file you that will contain the exported certificate." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Thumbprint - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_thumbprint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Thumbprint - The thumbprint of the certificate to export. Certificate selector parameter." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FriendlyName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_friendlyname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FriendlyName - The friendly name of the certificate to export. Certificate selector parameter." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Subject - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_subject) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Subject - The subject of the certificate to export. Certificate selector parameter." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DNSName - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_dnsname, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "DNSName - The subject alternative name of the certificate to export must contain these values. Certificate selector parameter." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Issuer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_issuer) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Issuer - The issuer of the certificate to export. Certificate selector parameter." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: KeyUsage - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_keyusage, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "KeyUsage - The key usage of the certificate to export must contain these values. Certificate selector parameter." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: EnhancedKeyUsage - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_enhancedkeyusage, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "EnhancedKeyUsage - The enhanced key usage of the certificate to export must contain these values. Certificate selector parameter." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Store - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_store) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Store - The Windows Certificate Store Name to search for the certificate to export from. Certificate selector parameter. Defaults to 'My'." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AllowExpired - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowexpired) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowExpired - Allow an expired certificate to be exported. Certificate selector parameter." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: MatchSource - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_matchsource) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "MatchSource - Causes an existing exported certificate to be compared with the certificate identified for export and re-exported if it does not match." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Type - # Type: string - # IsMandatory: False - # Values: ["Cert", "P7B", "SST", "PFX"] - newparam(:dsc_type) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Type - Specifies the type of certificate to export. Valid values are Cert, P7B, SST, PFX." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Cert', 'cert', 'P7B', 'p7b', 'SST', 'sst', 'PFX', 'pfx'].include?(value) - fail("Invalid value '#{value}'. Valid values are Cert, P7B, SST, PFX") - end - end - end - - # Name: ChainOption - # Type: string - # IsMandatory: False - # Values: ["BuildChain", "EndEntityCertOnly"] - newparam(:dsc_chainoption) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ChainOption - Specifies the options for building a chain when exporting a PFX certificate. Valid values are BuildChain, EndEntityCertOnly." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['BuildChain', 'buildchain', 'EndEntityCertOnly', 'endentitycertonly'].include?(value) - fail("Invalid value '#{value}'. Valid values are BuildChain, EndEntityCertOnly") - end - end - end - - # Name: Password - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_password) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Password - Specifies the password used to protect an exported PFX file." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Password", value) - end - end - - # Name: ProtectTo - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_protectto, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ProtectTo - Specifies an array of strings for the username or group name that can access the private key of an exported PFX file without any password." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: IsExported - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_isexported) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "IsExported - Returns true if the certificate file already exists and therefore has been exported." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xcertificateexport).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xcertificateimport.rb b/lib/puppet/type/dsc_xcertificateimport.rb deleted file mode 100644 index 8fcfc69d..00000000 --- a/lib/puppet/type/dsc_xcertificateimport.rb +++ /dev/null @@ -1,157 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xcertificateimport) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xCertificateImport resource type. - Automatically generated from - 'xCertificate/DSCResources/MSFT_xCertificateImport/MSFT_xCertificateImport.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_thumbprint is a required attribute') if self[:dsc_thumbprint].nil? - fail('dsc_location is a required attribute') if self[:dsc_location].nil? - fail('dsc_store is a required attribute') if self[:dsc_store].nil? - end - - def dscmeta_resource_friendly_name; 'xCertificateImport' end - def dscmeta_resource_name; 'MSFT_xCertificateImport' end - def dscmeta_module_name; 'xCertificate' end - def dscmeta_module_version; '3.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Thumbprint - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_thumbprint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Thumbprint - The thumbprint (unique identifier) of the certificate you're importing." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Path - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - The path to the CER file you want to import." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Location - # Type: string - # IsMandatory: True - # Values: ["LocalMachine", "CurrentUser"] - newparam(:dsc_location) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Location - The Windows Certificate Store Location to import the certificate to. Valid values are LocalMachine, CurrentUser." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['LocalMachine', 'localmachine', 'CurrentUser', 'currentuser'].include?(value) - fail("Invalid value '#{value}'. Valid values are LocalMachine, CurrentUser") - end - end - end - - # Name: Store - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_store) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Store - The Windows Certificate Store Name to import the certificate to." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether the certificate should be present or absent. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xcertificateimport).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xcertreq.rb b/lib/puppet/type/dsc_xcertreq.rb deleted file mode 100644 index 292cf603..00000000 --- a/lib/puppet/type/dsc_xcertreq.rb +++ /dev/null @@ -1,332 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xcertreq) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xCertReq resource type. - Automatically generated from - 'xCertificate/DSCResources/MSFT_xCertReq/MSFT_xCertReq.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_subject is a required attribute') if self[:dsc_subject].nil? - end - - def dscmeta_resource_friendly_name; 'xCertReq' end - def dscmeta_resource_name; 'MSFT_xCertReq' end - def dscmeta_module_name; 'xCertificate' end - def dscmeta_module_version; '3.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Subject - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_subject) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Subject - Provide the text string to use as the subject of the certificate." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CAType - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_catype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CAType - The type of CA in use, Standalone/Enterprise." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CAServerFQDN - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_caserverfqdn) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CAServerFQDN - The FQDN of the Active Directory Certificate Authority on the local area network. Leave empty to automatically locate." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CARootName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_carootname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CARootName - The name of the certificate authority, by default this will be in format domain-servername-ca. Leave empty to automatically locate." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: KeyLength - # Type: string - # IsMandatory: False - # Values: ["1024", "2048", "4096", "8192"] - newparam(:dsc_keylength) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "KeyLength - The bit length of the encryption key to be used. Defaults to 2048. Valid values are 1024, 2048, 4096, 8192." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['1024', '1024', '2048', '2048', '4096', '4096', '8192', '8192'].include?(value) - fail("Invalid value '#{value}'. Valid values are 1024, 2048, 4096, 8192") - end - end - end - - # Name: Exportable - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_exportable) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Exportable - The option to allow the certificate to be exportable, by default it will be true." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ProviderName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_providername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProviderName - The selection of provider for the type of encryption to be used." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: OID - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_oid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "OID - The Object Identifier that is used to name the object." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: KeyUsage - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_keyusage) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "KeyUsage - The Keyusage is a restriction method that determines what a certificate can be used for." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CertificateTemplate - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_certificatetemplate) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CertificateTemplate - The template used for the definition of the certificate." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SubjectAltName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_subjectaltname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SubjectAltName - The subject alternative name used to create the certificate." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - The credentials that will be used to access the template in the Certificate Authority." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AutoRenew - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_autorenew) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AutoRenew - Determines if the resource will also renew a certificate within 7 days of expiration." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: CepURL - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_cepurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CepURL - The URL to the Certification Enrollment Policy Service." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CesURL - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_cesurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CesURL - The URL to the Certification Enrollment Service." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UseMachineContext - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_usemachinecontext) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UseMachineContext - Indicates whether or not the flag -adminforcemachine will be used when requesting certificates. Necessary for certain templates like e.g. DomainControllerAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: FriendlyName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_friendlyname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FriendlyName - Specifies a friendly name for the certificate." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xcertreq).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xcluster.rb b/lib/puppet/type/dsc_xcluster.rb deleted file mode 100644 index 1065d1aa..00000000 --- a/lib/puppet/type/dsc_xcluster.rb +++ /dev/null @@ -1,116 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xcluster) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xCluster resource type. - Automatically generated from - 'xFailOverCluster/DSCResources/MSFT_xCluster/MSFT_xCluster.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xCluster' end - def dscmeta_resource_name; 'MSFT_xCluster' end - def dscmeta_module_name; 'xFailOverCluster' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of the Cluster" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: StaticIPAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_staticipaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "StaticIPAddress - StaticIPAddress of the Cluster" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DomainAdministratorCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_domainadministratorcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "DomainAdministratorCredential - Credential to create the cluster" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("DomainAdministratorCredential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xcluster).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xclusterdisk.rb b/lib/puppet/type/dsc_xclusterdisk.rb deleted file mode 100644 index 46197ed4..00000000 --- a/lib/puppet/type/dsc_xclusterdisk.rb +++ /dev/null @@ -1,120 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xclusterdisk) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xClusterDisk resource type. - Automatically generated from - 'xFailOverCluster/DSCResources/MSFT_xClusterDisk/MSFT_xClusterDisk.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_number is a required attribute') if self[:dsc_number].nil? - end - - def dscmeta_resource_friendly_name; 'xClusterDisk' end - def dscmeta_resource_name; 'MSFT_xClusterDisk' end - def dscmeta_module_name; 'xFailOverCluster' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Number - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_number) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Number - The disk number of the cluster disk." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Define if the cluster disk should be added (Present) or removed (Absent). Default value is 'Present'. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Label - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_label) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Label - The disk label that should be assigned to the disk on the Failover Cluster disk resource." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xclusterdisk).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xclusternetwork.rb b/lib/puppet/type/dsc_xclusternetwork.rb deleted file mode 100644 index 23680673..00000000 --- a/lib/puppet/type/dsc_xclusternetwork.rb +++ /dev/null @@ -1,150 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xclusternetwork) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xClusterNetwork resource type. - Automatically generated from - 'xFailOverCluster/DSCResources/MSFT_xClusterNetwork/MSFT_xClusterNetwork.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_address is a required attribute') if self[:dsc_address].nil? - fail('dsc_addressmask is a required attribute') if self[:dsc_addressmask].nil? - end - - def dscmeta_resource_friendly_name; 'xClusterNetwork' end - def dscmeta_resource_name; 'MSFT_xClusterNetwork' end - def dscmeta_module_name; 'xFailOverCluster' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Address - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_address) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Address - The address for the cluster network in the format '10.0.0.0'." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AddressMask - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_addressmask) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AddressMask - The address mask for the cluster network in the format '255.255.255.0'." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the cluster network. If the cluster network name is not in desired state it will be renamed to match this name." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Role - # Type: string - # IsMandatory: False - # Values: ["0", "1", "3"] - newparam(:dsc_role) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Role - he role of the cluster network. If the cluster network role is not in desired state it will change to match this role. Valid values are 0, 1, 3." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['0', '0', '1', '1', '3', '3'].include?(value) - fail("Invalid value '#{value}'. Valid values are 0, 1, 3") - end - end - end - - # Name: Metric - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_metric) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Metric - The metric number for the cluster network. If the cluster network metric number is not in desired state it will be changed to match this metric number." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xclusternetwork).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xclusterpreferredowner.rb b/lib/puppet/type/dsc_xclusterpreferredowner.rb deleted file mode 100644 index 7232c05f..00000000 --- a/lib/puppet/type/dsc_xclusterpreferredowner.rb +++ /dev/null @@ -1,158 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xclusterpreferredowner) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xClusterPreferredOwner resource type. - Automatically generated from - 'xFailOverCluster/DSCResources/MSFT_xClusterPreferredOwner/MSFT_xClusterPreferredOwner.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_clustergroup is a required attribute') if self[:dsc_clustergroup].nil? - fail('dsc_clustername is a required attribute') if self[:dsc_clustername].nil? - end - - def dscmeta_resource_friendly_name; 'xClusterPreferredOwner' end - def dscmeta_resource_name; 'MSFT_xClusterPreferredOwner' end - def dscmeta_module_name; 'xFailOverCluster' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ClusterGroup - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_clustergroup) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ClusterGroup - Name of the cluster group." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ClusterName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_clustername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ClusterName - Name of the cluster." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Nodes - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_nodes, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Nodes - The nodes to set as owners." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ClusterResources - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_clusterresources, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ClusterResources - he resources to set preferred owners on." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - If the preferred owners should be present or absent. Default value is 'Present'. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xclusterpreferredowner).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xclusterquorum.rb b/lib/puppet/type/dsc_xclusterquorum.rb deleted file mode 100644 index f7a57261..00000000 --- a/lib/puppet/type/dsc_xclusterquorum.rb +++ /dev/null @@ -1,121 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xclusterquorum) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xClusterQuorum resource type. - Automatically generated from - 'xFailOverCluster/DSCResources/MSFT_xClusterQuorum/MSFT_xClusterQuorum.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_issingleinstance is a required attribute') if self[:dsc_issingleinstance].nil? - end - - def dscmeta_resource_friendly_name; 'xClusterQuorum' end - def dscmeta_resource_name; 'MSFT_xClusterQuorum' end - def dscmeta_module_name; 'xFailOverCluster' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: IsSingleInstance - # Type: string - # IsMandatory: True - # Values: ["Yes"] - newparam(:dsc_issingleinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. Valid values are Yes." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Yes', 'yes'].include?(value) - fail("Invalid value '#{value}'. Valid values are Yes") - end - end - end - - # Name: Type - # Type: string - # IsMandatory: False - # Values: ["NodeMajority", "NodeAndDiskMajority", "NodeAndFileShareMajority", "DiskOnly"] - newparam(:dsc_type) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Type - Quorum type to use. Can be set to either NodeMajority, NodeAndDiskMajority, NodeAndFileShareMajority or DiskOnly. Valid values are NodeMajority, NodeAndDiskMajority, NodeAndFileShareMajority, DiskOnly." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['NodeMajority', 'nodemajority', 'NodeAndDiskMajority', 'nodeanddiskmajority', 'NodeAndFileShareMajority', 'nodeandfilesharemajority', 'DiskOnly', 'diskonly'].include?(value) - fail("Invalid value '#{value}'. Valid values are NodeMajority, NodeAndDiskMajority, NodeAndFileShareMajority, DiskOnly") - end - end - end - - # Name: Resource - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_resource) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Resource - The name of the disk or file share resource to use as witness. This parameter is optional if the quorum type is set to NodeMajority." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xclusterquorum).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xcomputer.rb b/lib/puppet/type/dsc_xcomputer.rb deleted file mode 100644 index d47f541c..00000000 --- a/lib/puppet/type/dsc_xcomputer.rb +++ /dev/null @@ -1,177 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xcomputer) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xComputer resource type. - Automatically generated from - 'xComputerManagement/DSCResources/MSFT_xComputer/MSFT_xComputer.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xComputer' end - def dscmeta_resource_name; 'MSFT_xComputer' end - def dscmeta_module_name; 'xComputerManagement' end - def dscmeta_module_version; '2.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DomainName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domainname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainName" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: JoinOU - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_joinou) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "JoinOU" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CurrentOU - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_currentou) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CurrentOU" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: UnjoinCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_unjoincredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "UnjoinCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("UnjoinCredential", value) - end - end - - # Name: WorkGroupName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_workgroupname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WorkGroupName" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xcomputer).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xcredssp.rb b/lib/puppet/type/dsc_xcredssp.rb deleted file mode 100644 index af821315..00000000 --- a/lib/puppet/type/dsc_xcredssp.rb +++ /dev/null @@ -1,142 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xcredssp) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xCredSSP resource type. - Automatically generated from - 'xCredSSP/DSCResources/MSFT_xCredSSP/MSFT_xCredSSP.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_role is a required attribute') if self[:dsc_role].nil? - end - - def dscmeta_resource_friendly_name; 'xCredSSP' end - def dscmeta_resource_name; 'MSFT_xCredSSP' end - def dscmeta_module_name; 'xCredSSP' end - def dscmeta_module_version; '1.3.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Role - # Type: string - # IsMandatory: True - # Values: ["Server", "Client"] - newparam(:dsc_role) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Role - Specifies the CredSSP role.\nServer \nClient \n Valid values are Server, Client." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Server', 'server', 'Client', 'client'].include?(value) - fail("Invalid value '#{value}'. Valid values are Server, Client") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the role is expected to be enabled on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: DelegateComputers - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_delegatecomputers, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "DelegateComputers - Specifies the array of computers that CredSSP client can delegate to." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: SuppressReboot - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_suppressreboot) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SuppressReboot - Specifies if a reboot should be supressed. Default is False" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xcredssp).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdatabase.rb b/lib/puppet/type/dsc_xdatabase.rb deleted file mode 100644 index 4f520080..00000000 --- a/lib/puppet/type/dsc_xdatabase.rb +++ /dev/null @@ -1,214 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdatabase) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDatabase resource type. - Automatically generated from - 'xDatabase/DSCResources/MSFT_xDatabase/MSFT_xDatabase.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_databasename is a required attribute') if self[:dsc_databasename].nil? - end - - def dscmeta_resource_friendly_name; 'xDatabase' end - def dscmeta_resource_name; 'MSFT_xDatabase' end - def dscmeta_module_name; 'xDatabase' end - def dscmeta_module_version; '1.6.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Credentials - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credentials) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credentials - Credentials to Connect to the sql server" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credentials", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SqlServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SqlServer - Sql Server Name" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SqlServerVersion - # Type: string - # IsMandatory: False - # Values: ["2008-R2", "2012", "2014"] - newparam(:dsc_sqlserverversion) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SqlServerVersion - Sql Server Version For DacFx Valid values are 2008-R2, 2012, 2014." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['2008-R2', '2008-r2', '2012', '2012', '2014', '2014'].include?(value) - fail("Invalid value '#{value}'. Valid values are 2008-R2, 2012, 2014") - end - end - end - - # Name: BacPacPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_bacpacpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "BacPacPath - Path to BacPac, if this is specified resore is performed" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_databasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseName - Name of the Database" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DacPacPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_dacpacpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DacPacPath - Path to DacPac, if this is specified dacpac deployment is performed" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DacPacApplicationName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_dacpacapplicationname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DacPacApplicationName - DacPac Application Name for Registration" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DacPacApplicationVersion - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_dacpacapplicationversion) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DacPacApplicationVersion - DacPac Application Version for Registration" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdatabase).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdatabaselogin.rb b/lib/puppet/type/dsc_xdatabaselogin.rb deleted file mode 100644 index f9f90bae..00000000 --- a/lib/puppet/type/dsc_xdatabaselogin.rb +++ /dev/null @@ -1,169 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdatabaselogin) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDatabaseLogin resource type. - Automatically generated from - 'xDatabase/DSCResources/MSFT_xDatabaseLogin/MSFT_xDatabaseLogin.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_loginname is a required attribute') if self[:dsc_loginname].nil? - end - - def dscmeta_resource_friendly_name; 'xDatabaseLogin' end - def dscmeta_resource_name; 'MSFT_xDatabaseLogin' end - def dscmeta_module_name; 'xDatabase' end - def dscmeta_module_version; '1.6.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: LoginName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_loginname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LoginName" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LoginPassword - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_loginpassword) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LoginPassword" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SqlAuthType - # Type: string - # IsMandatory: False - # Values: ["Windows", "SQL"] - newparam(:dsc_sqlauthtype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SqlAuthType - Valid values are Windows, SQL." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Windows', 'windows', 'SQL', 'sql'].include?(value) - fail("Invalid value '#{value}'. Valid values are Windows, SQL") - end - end - end - - # Name: SqlServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SqlServer - Sql Server Name" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SqlConnectionCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_sqlconnectioncredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SqlConnectionCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SqlConnectionCredential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdatabaselogin).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdatabaseserver.rb b/lib/puppet/type/dsc_xdatabaseserver.rb deleted file mode 100644 index 4ce4e17a..00000000 --- a/lib/puppet/type/dsc_xdatabaseserver.rb +++ /dev/null @@ -1,88 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdatabaseserver) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDatabaseServer resource type. - Automatically generated from - 'xDatabase/DSCResources/MSFT_xDatabaseServer/MSFT_xDatabaseServer.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_loginmode is a required attribute') if self[:dsc_loginmode].nil? - end - - def dscmeta_resource_friendly_name; 'xDatabaseServer' end - def dscmeta_resource_name; 'MSFT_xDatabaseServer' end - def dscmeta_module_name; 'xDatabase' end - def dscmeta_module_version; '1.6.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: LoginMode - # Type: string - # IsMandatory: True - # Values: ["Windows", "Mixed"] - newparam(:dsc_loginmode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LoginMode - Valid values are Windows, Mixed." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Windows', 'windows', 'Mixed', 'mixed'].include?(value) - fail("Invalid value '#{value}'. Valid values are Windows, Mixed") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdatabaseserver).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdbpackage.rb b/lib/puppet/type/dsc_xdbpackage.rb deleted file mode 100644 index 3e676bcb..00000000 --- a/lib/puppet/type/dsc_xdbpackage.rb +++ /dev/null @@ -1,167 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdbpackage) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDBPackage resource type. - Automatically generated from - 'xDatabase/DSCResources/MSFT_xDBPackage/MSFT_xDBPackage.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_databasename is a required attribute') if self[:dsc_databasename].nil? - end - - def dscmeta_resource_friendly_name; 'xDBPackage' end - def dscmeta_resource_name; 'MSFT_xDBPackage' end - def dscmeta_module_name; 'xDatabase' end - def dscmeta_module_version; '1.6.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Credentials - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credentials) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credentials - Credentials to Connect to the sql server" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credentials", value) - end - end - - # Name: DatabaseName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_databasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseName - Name of the Database" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SqlServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SqlServer - Sql Server Name" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Path - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - Path to BacPac/DacPac" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Type - # Type: string - # IsMandatory: False - # Values: ["DACPAC", "BACPAC"] - newparam(:dsc_type) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Type - Type for backup(Extract id done for DACPAC and Import for BACPAC) Valid values are DACPAC, BACPAC." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['DACPAC', 'dacpac', 'BACPAC', 'bacpac'].include?(value) - fail("Invalid value '#{value}'. Valid values are DACPAC, BACPAC") - end - end - end - - # Name: SqlServerVersion - # Type: string - # IsMandatory: False - # Values: ["2008-R2", "2012", "2014"] - newparam(:dsc_sqlserverversion) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SqlServerVersion - Sql Server Version For DacFx Valid values are 2008-R2, 2012, 2014." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['2008-R2', '2008-r2', '2012', '2012', '2014', '2014'].include?(value) - fail("Invalid value '#{value}'. Valid values are 2008-R2, 2012, 2014") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdbpackage).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdefaultgatewayaddress.rb b/lib/puppet/type/dsc_xdefaultgatewayaddress.rb deleted file mode 100644 index 6ffed70b..00000000 --- a/lib/puppet/type/dsc_xdefaultgatewayaddress.rb +++ /dev/null @@ -1,120 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdefaultgatewayaddress) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDefaultGatewayAddress resource type. - Automatically generated from - 'xNetworking/DSCResources/MSFT_xDefaultGatewayAddress/MSFT_xDefaultGatewayAddress.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_interfacealias is a required attribute') if self[:dsc_interfacealias].nil? - fail('dsc_addressfamily is a required attribute') if self[:dsc_addressfamily].nil? - end - - def dscmeta_resource_friendly_name; 'xDefaultGatewayAddress' end - def dscmeta_resource_name; 'MSFT_xDefaultGatewayAddress' end - def dscmeta_module_name; 'xNetworking' end - def dscmeta_module_version; '5.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: InterfaceAlias - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_interfacealias) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InterfaceAlias - Alias of the network interface for which the default gateway address is set." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AddressFamily - # Type: string - # IsMandatory: True - # Values: ["IPv4", "IPv6"] - newparam(:dsc_addressfamily) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AddressFamily - IP address family. Valid values are IPv4, IPv6." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['IPv4', 'ipv4', 'IPv6', 'ipv6'].include?(value) - fail("Invalid value '#{value}'. Valid values are IPv4, IPv6") - end - end - end - - # Name: Address - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_address) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Address - The desired default gateway address - if not provided default gateway will be removed." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdefaultgatewayaddress).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdfsnamespacefolder.rb b/lib/puppet/type/dsc_xdfsnamespacefolder.rb deleted file mode 100644 index 9b8b2bbf..00000000 --- a/lib/puppet/type/dsc_xdfsnamespacefolder.rb +++ /dev/null @@ -1,238 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdfsnamespacefolder) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDFSNamespaceFolder resource type. - Automatically generated from - 'xDFS/DSCResources/MSFT_xDFSNamespaceFolder/MSFT_xDFSNamespaceFolder.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_path is a required attribute') if self[:dsc_path].nil? - fail('dsc_targetpath is a required attribute') if self[:dsc_targetpath].nil? - end - - def dscmeta_resource_friendly_name; 'xDFSNamespaceFolder' end - def dscmeta_resource_name; 'MSFT_xDFSNamespaceFolder' end - def dscmeta_module_name; 'xDFS' end - def dscmeta_module_version; '3.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Path - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - Specifies a path for the root of a DFS namespace." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TargetPath - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_targetpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TargetPath - Specifies a path for a root target of the DFS namespace." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies if the DFS Namespace root should exist. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - The description of the DFS Namespace." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: EnableInsiteReferrals - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enableinsitereferrals) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "EnableInsiteReferrals - Indicates whether a DFS namespace server provides a client only with referrals that are in the same site as the client." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: EnableTargetFailback - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enabletargetfailback) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "EnableTargetFailback - Indicates whether a DFS namespace uses target failback." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ReferralPriorityClass - # Type: string - # IsMandatory: False - # Values: ["Global-High", "SiteCost-High", "SiteCost-Normal", "SiteCost-Low", "Global-Low"] - newparam(:dsc_referralpriorityclass) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ReferralPriorityClass - Specifies the target priority class for a DFS namespace root. Valid values are Global-High, SiteCost-High, SiteCost-Normal, SiteCost-Low, Global-Low." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Global-High', 'global-high', 'SiteCost-High', 'sitecost-high', 'SiteCost-Normal', 'sitecost-normal', 'SiteCost-Low', 'sitecost-low', 'Global-Low', 'global-low'].include?(value) - fail("Invalid value '#{value}'. Valid values are Global-High, SiteCost-High, SiteCost-Normal, SiteCost-Low, Global-Low") - end - end - end - - # Name: ReferralPriorityRank - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_referralpriorityrank) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "ReferralPriorityRank - Specifies the priority rank, as an integer, for a root target of the DFS namespace." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: TimeToLiveSec - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_timetolivesec) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "TimeToLiveSec - Specifies a TTL interval, in seconds, for referrals." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: State - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_state) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "State" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdfsnamespacefolder).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdfsnamespaceroot.rb b/lib/puppet/type/dsc_xdfsnamespaceroot.rb deleted file mode 100644 index 7896db63..00000000 --- a/lib/puppet/type/dsc_xdfsnamespaceroot.rb +++ /dev/null @@ -1,304 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdfsnamespaceroot) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDFSNamespaceRoot resource type. - Automatically generated from - 'xDFS/DSCResources/MSFT_xDFSNamespaceRoot/MSFT_xDFSNamespaceRoot.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_path is a required attribute') if self[:dsc_path].nil? - fail('dsc_targetpath is a required attribute') if self[:dsc_targetpath].nil? - end - - def dscmeta_resource_friendly_name; 'xDFSNamespaceRoot' end - def dscmeta_resource_name; 'MSFT_xDFSNamespaceRoot' end - def dscmeta_module_name; 'xDFS' end - def dscmeta_module_version; '3.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Path - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - Specifies a path for the root of a DFS namespace." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TargetPath - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_targetpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TargetPath - Specifies a path for a root target of the DFS namespace." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies if the DFS Namespace root should exist. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Type - # Type: string - # IsMandatory: False - # Values: ["Standalone", "DomainV1", "DomainV2"] - newparam(:dsc_type) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Type - Specifies the type of a DFS namespace as a Type object. Valid values are Standalone, DomainV1, DomainV2." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Standalone', 'standalone', 'DomainV1', 'domainv1', 'DomainV2', 'domainv2'].include?(value) - fail("Invalid value '#{value}'. Valid values are Standalone, DomainV1, DomainV2") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - The description of the DFS Namespace." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: EnableSiteCosting - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enablesitecosting) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "EnableSiteCosting - Indicates whether a DFS namespace uses cost-based selection." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: EnableInsiteReferrals - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enableinsitereferrals) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "EnableInsiteReferrals - Indicates whether a DFS namespace server provides a client only with referrals that are in the same site as the client." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: EnableAccessBasedEnumeration - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enableaccessbasedenumeration) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "EnableAccessBasedEnumeration - Indicates whether a DFS namespace uses access-based enumeration." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: EnableRootScalability - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enablerootscalability) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "EnableRootScalability - Indicates whether a DFS namespace uses root scalability mode." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: EnableTargetFailback - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enabletargetfailback) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "EnableTargetFailback - Indicates whether a DFS namespace uses target failback." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ReferralPriorityClass - # Type: string - # IsMandatory: False - # Values: ["Global-High", "SiteCost-High", "SiteCost-Normal", "SiteCost-Low", "Global-Low"] - newparam(:dsc_referralpriorityclass) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ReferralPriorityClass - Specifies the target priority class for a DFS namespace root. Valid values are Global-High, SiteCost-High, SiteCost-Normal, SiteCost-Low, Global-Low." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Global-High', 'global-high', 'SiteCost-High', 'sitecost-high', 'SiteCost-Normal', 'sitecost-normal', 'SiteCost-Low', 'sitecost-low', 'Global-Low', 'global-low'].include?(value) - fail("Invalid value '#{value}'. Valid values are Global-High, SiteCost-High, SiteCost-Normal, SiteCost-Low, Global-Low") - end - end - end - - # Name: ReferralPriorityRank - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_referralpriorityrank) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "ReferralPriorityRank - Specifies the priority rank, as an integer, for a root target of the DFS namespace." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: TimeToLiveSec - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_timetolivesec) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "TimeToLiveSec - Specifies a TTL interval, in seconds, for referrals." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: State - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_state) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "State" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdfsnamespaceroot).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdfsnamespaceserverconfiguration.rb b/lib/puppet/type/dsc_xdfsnamespaceserverconfiguration.rb deleted file mode 100644 index 8c0d7066..00000000 --- a/lib/puppet/type/dsc_xdfsnamespaceserverconfiguration.rb +++ /dev/null @@ -1,140 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdfsnamespaceserverconfiguration) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDFSNamespaceServerConfiguration resource type. - Automatically generated from - 'xDFS/DSCResources/MSFT_xDFSNamespaceServerConfiguration/MSFT_xDFSNamespaceServerConfiguration.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_issingleinstance is a required attribute') if self[:dsc_issingleinstance].nil? - end - - def dscmeta_resource_friendly_name; 'xDFSNamespaceServerConfiguration' end - def dscmeta_resource_name; 'MSFT_xDFSNamespaceServerConfiguration' end - def dscmeta_module_name; 'xDFS' end - def dscmeta_module_version; '3.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: IsSingleInstance - # Type: string - # IsMandatory: True - # Values: ["Yes"] - newparam(:dsc_issingleinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. Valid values are Yes." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Yes', 'yes'].include?(value) - fail("Invalid value '#{value}'. Valid values are Yes") - end - end - end - - # Name: LdapTimeoutSec - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_ldaptimeoutsec) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "LdapTimeoutSec - Specifies a time-out value, in seconds, for Lightweight Directory Access Protocol (LDAP) requests for the DFS namespace server." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: SyncIntervalSec - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_syncintervalsec) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "SyncIntervalSec - This interval controls how often domain-based DFS namespace root servers and domain controllers connect to the PDC emulator to get updates of DFS namespace metadata." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: UseFQDN - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_usefqdn) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UseFQDN - Indicates whether a DFS namespace server uses FQDNs in referrals." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdfsnamespaceserverconfiguration).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdfsreplicationgroup.rb b/lib/puppet/type/dsc_xdfsreplicationgroup.rb deleted file mode 100644 index b5747299..00000000 --- a/lib/puppet/type/dsc_xdfsreplicationgroup.rb +++ /dev/null @@ -1,207 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdfsreplicationgroup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDFSReplicationGroup resource type. - Automatically generated from - 'xDFS/DSCResources/MSFT_xDFSReplicationGroup/MSFT_xDFSReplicationGroup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_groupname is a required attribute') if self[:dsc_groupname].nil? - end - - def dscmeta_resource_friendly_name; 'xDFSReplicationGroup' end - def dscmeta_resource_name; 'MSFT_xDFSReplicationGroup' end - def dscmeta_module_name; 'xDFS' end - def dscmeta_module_version; '3.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: GroupName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_groupname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "GroupName - The name of the DFS Replication Group." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether the DSF Replication Group should exist. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - A description for the DFS Replication Group." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Members - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_members, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Members - A list of computers that are members of this Replication Group. These can be specified using either the ComputerName or FQDN name for each member. If an FQDN name is used and the DomainName parameter is set, the FQDN domain name must match." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Folders - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_folders, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Folders - A list of folders that are replicated in this Replication Group." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Topology - # Type: string - # IsMandatory: False - # Values: ["Fullmesh", "Manual"] - newparam(:dsc_topology) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Topology - This allows a replication topology to assign to the Replication Group. It defaults to Manual, which will not automatically create a topology. If set to Fullmesh, a full mesh topology between all members will be created. Valid values are Fullmesh, Manual." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Fullmesh', 'fullmesh', 'Manual', 'manual'].include?(value) - fail("Invalid value '#{value}'. Valid values are Fullmesh, Manual") - end - end - end - - # Name: ContentPaths - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_contentpaths, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ContentPaths - An array of DFS Replication Group Content Paths to use for each of the Folders. This can have one entry for each Folder in the Folders parameter and should be set in th same order. If any entry is not blank then the Content Paths will need to be set manually by using the xDFSReplicationGroupMembership resource." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: DomainName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domainname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainName - The AD domain the Replication Group should created in." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdfsreplicationgroup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdfsreplicationgroupconnection.rb b/lib/puppet/type/dsc_xdfsreplicationgroupconnection.rb deleted file mode 100644 index 4bc9cabc..00000000 --- a/lib/puppet/type/dsc_xdfsreplicationgroupconnection.rb +++ /dev/null @@ -1,205 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdfsreplicationgroupconnection) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDFSReplicationGroupConnection resource type. - Automatically generated from - 'xDFS/DSCResources/MSFT_xDFSReplicationGroupConnection/MSFT_xDFSReplicationGroupConnection.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_groupname is a required attribute') if self[:dsc_groupname].nil? - fail('dsc_sourcecomputername is a required attribute') if self[:dsc_sourcecomputername].nil? - fail('dsc_destinationcomputername is a required attribute') if self[:dsc_destinationcomputername].nil? - end - - def dscmeta_resource_friendly_name; 'xDFSReplicationGroupConnection' end - def dscmeta_resource_name; 'MSFT_xDFSReplicationGroupConnection' end - def dscmeta_module_name; 'xDFS' end - def dscmeta_module_version; '3.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: GroupName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_groupname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "GroupName - The name of the DFS Replication Group." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceComputerName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sourcecomputername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceComputerName - The name of the Replication Group source computer for the connection. This can be specified using either the ComputerName or FQDN name for the member. If an FQDN name is used and the DomainName parameter is set, the FQDN domain name must match." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DestinationComputerName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_destinationcomputername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DestinationComputerName - The name of the Replication Group destination computer for the connection. This can be specified using either the ComputerName or FQDN name for the member. If an FQDN name is used and the DomainName parameter is set, the FQDN domain name must match." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether the DSF Replication Group connection should exist. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - A description for the DFS Replication Group connection." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: EnsureEnabled - # Type: string - # IsMandatory: False - # Values: ["Enabled", "Disabled"] - newparam(:dsc_ensureenabled) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EnsureEnabled - Ensures that connection is either Enabled or Disabled. Valid values are Enabled, Disabled." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Enabled', 'enabled', 'Disabled', 'disabled'].include?(value) - fail("Invalid value '#{value}'. Valid values are Enabled, Disabled") - end - end - end - - # Name: EnsureRDCEnabled - # Type: string - # IsMandatory: False - # Values: ["Enabled", "Disabled"] - newparam(:dsc_ensurerdcenabled) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EnsureRDCEnabled - Ensures remote differential compression is Enabled or Disabled. Valid values are Enabled, Disabled." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Enabled', 'enabled', 'Disabled', 'disabled'].include?(value) - fail("Invalid value '#{value}'. Valid values are Enabled, Disabled") - end - end - end - - # Name: DomainName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domainname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainName - The name of the AD Domain the DFS Replication Group connection should be in." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdfsreplicationgroupconnection).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdfsreplicationgroupfolder.rb b/lib/puppet/type/dsc_xdfsreplicationgroupfolder.rb deleted file mode 100644 index 40c71a60..00000000 --- a/lib/puppet/type/dsc_xdfsreplicationgroupfolder.rb +++ /dev/null @@ -1,183 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdfsreplicationgroupfolder) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDFSReplicationGroupFolder resource type. - Automatically generated from - 'xDFS/DSCResources/MSFT_xDFSReplicationGroupFolder/MSFT_xDFSReplicationGroupFolder.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_groupname is a required attribute') if self[:dsc_groupname].nil? - fail('dsc_foldername is a required attribute') if self[:dsc_foldername].nil? - end - - def dscmeta_resource_friendly_name; 'xDFSReplicationGroupFolder' end - def dscmeta_resource_name; 'MSFT_xDFSReplicationGroupFolder' end - def dscmeta_module_name; 'xDFS' end - def dscmeta_module_version; '3.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: GroupName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_groupname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "GroupName - The name of the DFS Replication Group." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FolderName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_foldername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FolderName - The name of the DFS Replication Group Folder." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - A description for the DFS Replication Group Folder." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FilenameToExclude - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_filenametoexclude, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "FilenameToExclude - An array of file names to exclude from replication." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: DirectoryNameToExclude - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_directorynametoexclude, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "DirectoryNameToExclude - An array of directory names to exclude from replication." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: DfsnPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_dfsnpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DfsnPath - The DFS Namespace Path to this Replication Group folder is mapped to. This does NOT create the Namespace folders, it only sets the name in the folder object." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DomainName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domainname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainName - The name of the AD Domain the DFS Replication Group Folder will be in." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdfsreplicationgroupfolder).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdfsreplicationgroupmembership.rb b/lib/puppet/type/dsc_xdfsreplicationgroupmembership.rb deleted file mode 100644 index dd089c70..00000000 --- a/lib/puppet/type/dsc_xdfsreplicationgroupmembership.rb +++ /dev/null @@ -1,211 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdfsreplicationgroupmembership) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDFSReplicationGroupMembership resource type. - Automatically generated from - 'xDFS/DSCResources/MSFT_xDFSReplicationGroupMembership/MSFT_xDFSReplicationGroupMembership.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_groupname is a required attribute') if self[:dsc_groupname].nil? - fail('dsc_foldername is a required attribute') if self[:dsc_foldername].nil? - fail('dsc_computername is a required attribute') if self[:dsc_computername].nil? - end - - def dscmeta_resource_friendly_name; 'xDFSReplicationGroupMembership' end - def dscmeta_resource_name; 'MSFT_xDFSReplicationGroupMembership' end - def dscmeta_module_name; 'xDFS' end - def dscmeta_module_version; '3.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: GroupName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_groupname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "GroupName - The name of the DFS Replication Group." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FolderName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_foldername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FolderName - The name of the DFS Replication Group Folder." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ComputerName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_computername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ComputerName - The computer name of the Replication Group member. This can be specified using either the ComputerName or FQDN name for the member. If an FQDN name is used and the DomainName parameter is set, the FQDN domain name must match." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ContentPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_contentpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ContentPath - The local content path for the DFS Replication Group Folder." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: StagingPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_stagingpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "StagingPath - The local staging path for the DFS Replication Group Folder." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ConflictAndDeletedPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_conflictanddeletedpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConflictAndDeletedPath - The local content and deleted path for the DFS Replication Group Folder." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ReadOnly - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_readonly) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ReadOnly - Specify if this content path should be read only." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: PrimaryMember - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_primarymember) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "PrimaryMember - Used to configure this as the Primary Member. Every folder must have at least one primary member for initial replication to take place." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DomainName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domainname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainName - The name of the AD Domain the DFS Replication Group this replication group is in." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdfsreplicationgroupmembership).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdhcpclient.rb b/lib/puppet/type/dsc_xdhcpclient.rb deleted file mode 100644 index d43fbe02..00000000 --- a/lib/puppet/type/dsc_xdhcpclient.rb +++ /dev/null @@ -1,123 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdhcpclient) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDHCPClient resource type. - Automatically generated from - 'xNetworking/DSCResources/MSFT_xDhcpClient/MSFT_xDhcpClient.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_interfacealias is a required attribute') if self[:dsc_interfacealias].nil? - fail('dsc_addressfamily is a required attribute') if self[:dsc_addressfamily].nil? - end - - def dscmeta_resource_friendly_name; 'xDHCPClient' end - def dscmeta_resource_name; 'MSFT_xDHCPClient' end - def dscmeta_module_name; 'xNetworking' end - def dscmeta_module_version; '5.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: InterfaceAlias - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_interfacealias) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InterfaceAlias - Alias of the network interface for which the DHCP Client is set." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AddressFamily - # Type: string - # IsMandatory: True - # Values: ["IPv4", "IPv6"] - newparam(:dsc_addressfamily) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AddressFamily - IP address family. Valid values are IPv4, IPv6." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['IPv4', 'ipv4', 'IPv6', 'ipv6'].include?(value) - fail("Invalid value '#{value}'. Valid values are IPv4, IPv6") - end - end - end - - # Name: State - # Type: string - # IsMandatory: False - # Values: ["Enabled", "Disabled"] - newparam(:dsc_state) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "State - The desired state of the DHCP Client. Valid values are Enabled, Disabled." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Enabled', 'enabled', 'Disabled', 'disabled'].include?(value) - fail("Invalid value '#{value}'. Valid values are Enabled, Disabled") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdhcpclient).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdhcpserverauthorization.rb b/lib/puppet/type/dsc_xdhcpserverauthorization.rb deleted file mode 100644 index ec37c32e..00000000 --- a/lib/puppet/type/dsc_xdhcpserverauthorization.rb +++ /dev/null @@ -1,120 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdhcpserverauthorization) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDhcpServerAuthorization resource type. - Automatically generated from - 'xDhcpServer/DSCResources/MSFT_xDhcpServerAuthorization/MSFT_xDhcpServerAuthorization.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xDhcpServerAuthorization' end - def dscmeta_resource_name; 'MSFT_xDhcpServerAuthorization' end - def dscmeta_module_name; 'xDhcpServer' end - def dscmeta_module_version; '1.6.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: DnsName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_dnsname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DnsName - DHCP Server FQDN" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IPAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_ipaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IPAddress - DHCP Server IP Address" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Whether the DHCP server should be authorised within Active Directory Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdhcpserverauthorization).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdhcpserverclass.rb b/lib/puppet/type/dsc_xdhcpserverclass.rb deleted file mode 100644 index 5d3fdc0d..00000000 --- a/lib/puppet/type/dsc_xdhcpserverclass.rb +++ /dev/null @@ -1,179 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdhcpserverclass) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDhcpServerClass resource type. - Automatically generated from - 'xDhcpServer/DSCResources/MSFT_xDhcpServerClass/MSFT_xDhcpServerClass.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - fail('dsc_type is a required attribute') if self[:dsc_type].nil? - fail('dsc_asciidata is a required attribute') if self[:dsc_asciidata].nil? - fail('dsc_addressfamily is a required attribute') if self[:dsc_addressfamily].nil? - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xDhcpServerClass' end - def dscmeta_resource_name; 'MSFT_xDhcpServerClass' end - def dscmeta_module_name; 'xDhcpServer' end - def dscmeta_module_version; '1.6.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Class Name" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Type - # Type: string - # IsMandatory: True - # Values: ["Vendor", "User"] - newparam(:dsc_type) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Type - Class Type, Vendor or User Valid values are Vendor, User." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Vendor', 'vendor', 'User', 'user'].include?(value) - fail("Invalid value '#{value}'. Valid values are Vendor, User") - end - end - end - - # Name: AsciiData - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_asciidata) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AsciiData - Class Data, in ASCII format" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - Class Description" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AddressFamily - # Type: string - # IsMandatory: True - # Values: ["IPv4"] - newparam(:dsc_addressfamily) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AddressFamily - Class address family. Currently needs to be IPv4 Valid values are IPv4." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['IPv4', 'ipv4'].include?(value) - fail("Invalid value '#{value}'. Valid values are IPv4") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Whether the DHCP server Class should exist Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdhcpserverclass).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdhcpserveroption.rb b/lib/puppet/type/dsc_xdhcpserveroption.rb deleted file mode 100644 index 40cf5da1..00000000 --- a/lib/puppet/type/dsc_xdhcpserveroption.rb +++ /dev/null @@ -1,174 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdhcpserveroption) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDhcpServerOption resource type. - Automatically generated from - 'xDhcpServer/DSCResources/MSFT_xDhcpServerOption/MSFT_xDhcpServerOption.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_scopeid is a required attribute') if self[:dsc_scopeid].nil? - end - - def dscmeta_resource_friendly_name; 'xDhcpServerOption' end - def dscmeta_resource_name; 'MSFT_xDhcpServerOption' end - def dscmeta_module_name; 'xDhcpServer' end - def dscmeta_module_version; '1.6.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ScopeID - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_scopeid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ScopeID - ScopeId for which options are set" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DnsServerIPAddress - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_dnsserveripaddress, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "DnsServerIPAddress - IP address of DNS Servers" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: DnsDomain - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_dnsdomain) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DnsDomain - Domain name of DNS Server" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Router - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_router, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Router - IP address of the router/default gateway." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: AddressFamily - # Type: string - # IsMandatory: False - # Values: ["IPv4"] - newparam(:dsc_addressfamily) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AddressFamily - Address family type Valid values are IPv4." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['IPv4', 'ipv4'].include?(value) - fail("Invalid value '#{value}'. Valid values are IPv4") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Whether option should be set or removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdhcpserveroption).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdhcpserverreservation.rb b/lib/puppet/type/dsc_xdhcpserverreservation.rb deleted file mode 100644 index 1cd97b65..00000000 --- a/lib/puppet/type/dsc_xdhcpserverreservation.rb +++ /dev/null @@ -1,170 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdhcpserverreservation) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDhcpServerReservation resource type. - Automatically generated from - 'xDhcpServer/DSCResources/MSFT_xDhcpServerReservation/MSFT_xDhcpServerReservation.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_scopeid is a required attribute') if self[:dsc_scopeid].nil? - fail('dsc_ipaddress is a required attribute') if self[:dsc_ipaddress].nil? - end - - def dscmeta_resource_friendly_name; 'xDhcpServerReservation' end - def dscmeta_resource_name; 'MSFT_xDhcpServerReservation' end - def dscmeta_module_name; 'xDhcpServer' end - def dscmeta_module_version; '1.6.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ScopeID - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_scopeid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ScopeID - ScopeId for which reservations are set" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IPAddress - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_ipaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IPAddress - IP address of the reservation for which the properties are modified" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ClientMACAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_clientmacaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ClientMACAddress - Client MAC Address to set on the reservation" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Reservation name" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AddressFamily - # Type: string - # IsMandatory: False - # Values: ["IPv4"] - newparam(:dsc_addressfamily) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AddressFamily - Address family type Valid values are IPv4." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['IPv4', 'ipv4'].include?(value) - fail("Invalid value '#{value}'. Valid values are IPv4") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Whether option should be set or removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdhcpserverreservation).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdhcpserverscope.rb b/lib/puppet/type/dsc_xdhcpserverscope.rb deleted file mode 100644 index aef3448b..00000000 --- a/lib/puppet/type/dsc_xdhcpserverscope.rb +++ /dev/null @@ -1,218 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdhcpserverscope) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDhcpServerScope resource type. - Automatically generated from - 'xDhcpServer/DSCResources/MSFT_xDhcpServerScope/MSFT_xDhcpServerScope.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ipstartrange is a required attribute') if self[:dsc_ipstartrange].nil? - fail('dsc_ipendrange is a required attribute') if self[:dsc_ipendrange].nil? - end - - def dscmeta_resource_friendly_name; 'xDhcpServerScope' end - def dscmeta_resource_name; 'MSFT_xDhcpServerScope' end - def dscmeta_module_name; 'xDhcpServer' end - def dscmeta_module_version; '1.6.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: IPStartRange - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_ipstartrange) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IPStartRange - Starting address to set for this scope" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IPEndRange - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_ipendrange) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IPEndRange - Ending address to set for this scope" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of DHCP Scope" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SubnetMask - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_subnetmask) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SubnetMask - Subnet mask for the scope specified in IP address format" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LeaseDuration - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_leaseduration) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LeaseDuration - Time interval for which an IP address should be leased" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: State - # Type: string - # IsMandatory: False - # Values: ["Active", "Inactive"] - newparam(:dsc_state) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "State - Whether scope should be active or inactive Valid values are Active, Inactive." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Active', 'active', 'Inactive', 'inactive'].include?(value) - fail("Invalid value '#{value}'. Valid values are Active, Inactive") - end - end - end - - # Name: AddressFamily - # Type: string - # IsMandatory: False - # Values: ["IPv4"] - newparam(:dsc_addressfamily) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AddressFamily - Address family type Valid values are IPv4." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['IPv4', 'ipv4'].include?(value) - fail("Invalid value '#{value}'. Valid values are IPv4") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Whether scope should be set or removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: ScopeID - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_scopeid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ScopeID - ScopeId for the given scope" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdhcpserverscope).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdisk.rb b/lib/puppet/type/dsc_xdisk.rb deleted file mode 100644 index 2a578c47..00000000 --- a/lib/puppet/type/dsc_xdisk.rb +++ /dev/null @@ -1,219 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdisk) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDisk resource type. - Automatically generated from - 'xStorage/DSCResources/MSFT_xDisk/MSFT_xDisk.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_driveletter is a required attribute') if self[:dsc_driveletter].nil? - end - - def dscmeta_resource_friendly_name; 'xDisk' end - def dscmeta_resource_name; 'MSFT_xDisk' end - def dscmeta_module_name; 'xStorage' end - def dscmeta_module_version; '3.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: DriveLetter - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_driveletter) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DriveLetter - Specifies the identifier for which disk to modify." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DiskId - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_diskid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DiskId - Specifies the disk identifier for the disk to modify." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DiskIdType - # Type: string - # IsMandatory: False - # Values: ["Number", "UniqueId"] - newparam(:dsc_diskidtype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DiskIdType - Specifies the identifier type the DiskId contains. Defaults to Number. Valid values are Number, UniqueId." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Number', 'number', 'UniqueId', 'uniqueid'].include?(value) - fail("Invalid value '#{value}'. Valid values are Number, UniqueId") - end - end - end - - # Name: Size - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_size) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "Size - Specifies the size of new volume. Leave empty to use the remaining free space." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: FSLabel - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_fslabel) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FSLabel - Define volume label if required." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AllocationUnitSize - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_allocationunitsize) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "AllocationUnitSize - Specifies the allocation unit size to use when formatting the volume." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: FSFormat - # Type: string - # IsMandatory: False - # Values: ["NTFS", "ReFS"] - newparam(:dsc_fsformat) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FSFormat - Specifies the file system format of the new volume. Valid values are NTFS, ReFS." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['NTFS', 'ntfs', 'ReFS', 'refs'].include?(value) - fail("Invalid value '#{value}'. Valid values are NTFS, ReFS") - end - end - end - - # Name: AllowDestructive - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowdestructive) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowDestructive - Specifies if potentially destructive operations may occur." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ClearDisk - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_cleardisk) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ClearDisk - Specifies if the disks partition schema should be removed entirely, even if data and oem partitions are present. Only possible with AllowDestructive enabled." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdisk).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdiskaccesspath.rb b/lib/puppet/type/dsc_xdiskaccesspath.rb deleted file mode 100644 index b5df8236..00000000 --- a/lib/puppet/type/dsc_xdiskaccesspath.rb +++ /dev/null @@ -1,187 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdiskaccesspath) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDiskAccessPath resource type. - Automatically generated from - 'xStorage/DSCResources/MSFT_xDiskAccessPath/MSFT_xDiskAccessPath.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_accesspath is a required attribute') if self[:dsc_accesspath].nil? - end - - def dscmeta_resource_friendly_name; 'xDiskAccessPath' end - def dscmeta_resource_name; 'MSFT_xDiskAccessPath' end - def dscmeta_module_name; 'xStorage' end - def dscmeta_module_version; '3.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AccessPath - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_accesspath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AccessPath - Specifies the access path folder to the assign the disk volume to." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DiskId - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_diskid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DiskId - Specifies the disk identifier for the disk to modify." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DiskIdType - # Type: string - # IsMandatory: False - # Values: ["Number", "UniqueId"] - newparam(:dsc_diskidtype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DiskIdType - Specifies the identifier type the DiskId contains. Defaults to Number. Valid values are Number, UniqueId." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Number', 'number', 'UniqueId', 'uniqueid'].include?(value) - fail("Invalid value '#{value}'. Valid values are Number, UniqueId") - end - end - end - - # Name: Size - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_size) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "Size - Specifies the size of new volume." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: FSLabel - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_fslabel) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FSLabel - Define volume label if required." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AllocationUnitSize - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_allocationunitsize) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "AllocationUnitSize - Specifies the allocation unit size to use when formatting the volume." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: FSFormat - # Type: string - # IsMandatory: False - # Values: ["NTFS", "ReFS"] - newparam(:dsc_fsformat) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FSFormat - Specifies the file system format of the new volume. Valid values are NTFS, ReFS." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['NTFS', 'ntfs', 'ReFS', 'refs'].include?(value) - fail("Invalid value '#{value}'. Valid values are NTFS, ReFS") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdiskaccesspath).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdismfeature.rb b/lib/puppet/type/dsc_xdismfeature.rb deleted file mode 100644 index f39e8e5d..00000000 --- a/lib/puppet/type/dsc_xdismfeature.rb +++ /dev/null @@ -1,120 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdismfeature) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDismFeature resource type. - Automatically generated from - 'xDismFeature/DSCResources/MSFT_xDismFeature/MSFT_xDismFeature.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xDismFeature' end - def dscmeta_resource_name; 'MSFT_xDismFeature' end - def dscmeta_module_name; 'xDismFeature' end - def dscmeta_module_version; '1.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the feature is expected to be enabled on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of the feature." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Source - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_source) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Source - Optional location of Source." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdismfeature).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdnsarecord.rb b/lib/puppet/type/dsc_xdnsarecord.rb deleted file mode 100644 index 950c5646..00000000 --- a/lib/puppet/type/dsc_xdnsarecord.rb +++ /dev/null @@ -1,137 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdnsarecord) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDnsARecord resource type. - Automatically generated from - 'xDnsServer/DSCResources/MSFT_xDnsARecord/MSFT_xDnsARecord.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - fail('dsc_zone is a required attribute') if self[:dsc_zone].nil? - end - - def dscmeta_resource_friendly_name; 'xDnsARecord' end - def dscmeta_resource_name; 'MSFT_xDnsARecord' end - def dscmeta_module_name; 'xDnsServer' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Zone - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_zone) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Zone" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Target - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_target) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Target" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Should this DNS resource record be present or absent Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdnsarecord).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdnsclientglobalsetting.rb b/lib/puppet/type/dsc_xdnsclientglobalsetting.rb deleted file mode 100644 index c5cfe581..00000000 --- a/lib/puppet/type/dsc_xdnsclientglobalsetting.rb +++ /dev/null @@ -1,140 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdnsclientglobalsetting) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDnsClientGlobalSetting resource type. - Automatically generated from - 'xNetworking/DSCResources/MSFT_xDnsClientGlobalSetting/MSFT_xDnsClientGlobalSetting.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_issingleinstance is a required attribute') if self[:dsc_issingleinstance].nil? - end - - def dscmeta_resource_friendly_name; 'xDnsClientGlobalSetting' end - def dscmeta_resource_name; 'MSFT_xDnsClientGlobalSetting' end - def dscmeta_module_name; 'xNetworking' end - def dscmeta_module_version; '5.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: IsSingleInstance - # Type: string - # IsMandatory: True - # Values: ["Yes"] - newparam(:dsc_issingleinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. Valid values are Yes." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Yes', 'yes'].include?(value) - fail("Invalid value '#{value}'. Valid values are Yes") - end - end - end - - # Name: SuffixSearchList - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_suffixsearchlist, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "SuffixSearchList - Specifies a list of global suffixes that can be used in the specified order by the DNS client for resolving the IP address of the computer name." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: UseDevolution - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_usedevolution) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UseDevolution - Specifies that devolution is activated." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DevolutionLevel - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_devolutionlevel) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "DevolutionLevel - Specifies the number of labels up to which devolution should occur." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdnsclientglobalsetting).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdnsconnectionsuffix.rb b/lib/puppet/type/dsc_xdnsconnectionsuffix.rb deleted file mode 100644 index d9763737..00000000 --- a/lib/puppet/type/dsc_xdnsconnectionsuffix.rb +++ /dev/null @@ -1,152 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdnsconnectionsuffix) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDnsConnectionSuffix resource type. - Automatically generated from - 'xNetworking/DSCResources/MSFT_xDnsConnectionSuffix/MSFT_xDnsConnectionSuffix.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_interfacealias is a required attribute') if self[:dsc_interfacealias].nil? - end - - def dscmeta_resource_friendly_name; 'xDnsConnectionSuffix' end - def dscmeta_resource_name; 'MSFT_xDnsConnectionSuffix' end - def dscmeta_module_name; 'xNetworking' end - def dscmeta_module_version; '5.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: InterfaceAlias - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_interfacealias) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InterfaceAlias - Alias of the network interface for which the DNS server address is set." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ConnectionSpecificSuffix - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_connectionspecificsuffix) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConnectionSpecificSuffix - DNS connection-specific suffix to assign to the network interface." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RegisterThisConnectionsAddress - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_registerthisconnectionsaddress) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RegisterThisConnectionsAddress - Specifies that the IP address for this connection is to be registered." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: UseSuffixWhenRegistering - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_usesuffixwhenregistering) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UseSuffixWhenRegistering - Specifies that this host name and the connection specific suffix for this connection are to be registered." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Ensure that the network interface connection-specific suffix is present or not. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdnsconnectionsuffix).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdnsrecord.rb b/lib/puppet/type/dsc_xdnsrecord.rb deleted file mode 100644 index 65e16119..00000000 --- a/lib/puppet/type/dsc_xdnsrecord.rb +++ /dev/null @@ -1,157 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdnsrecord) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDnsRecord resource type. - Automatically generated from - 'xDnsServer/DSCResources/MSFT_xDnsRecord/MSFT_xDnsRecord.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - fail('dsc_zone is a required attribute') if self[:dsc_zone].nil? - fail('dsc_target is a required attribute') if self[:dsc_target].nil? - end - - def dscmeta_resource_friendly_name; 'xDnsRecord' end - def dscmeta_resource_name; 'MSFT_xDnsRecord' end - def dscmeta_module_name; 'xDnsServer' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Zone - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_zone) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Zone" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Type - # Type: string - # IsMandatory: False - # Values: ["ARecord", "CName"] - newparam(:dsc_type) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Type - Valid values are ARecord, CName." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['ARecord', 'arecord', 'CName', 'cname'].include?(value) - fail("Invalid value '#{value}'. Valid values are ARecord, CName") - end - end - end - - # Name: Target - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_target) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Target" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Should this DNS resource record be present or absent Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdnsrecord).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdnsserveraddress.rb b/lib/puppet/type/dsc_xdnsserveraddress.rb deleted file mode 100644 index da78f847..00000000 --- a/lib/puppet/type/dsc_xdnsserveraddress.rb +++ /dev/null @@ -1,139 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdnsserveraddress) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDNSServerAddress resource type. - Automatically generated from - 'xNetworking/DSCResources/MSFT_xDNSServerAddress/MSFT_xDNSServerAddress.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_interfacealias is a required attribute') if self[:dsc_interfacealias].nil? - fail('dsc_addressfamily is a required attribute') if self[:dsc_addressfamily].nil? - end - - def dscmeta_resource_friendly_name; 'xDNSServerAddress' end - def dscmeta_resource_name; 'MSFT_xDNSServerAddress' end - def dscmeta_module_name; 'xNetworking' end - def dscmeta_module_version; '5.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: InterfaceAlias - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_interfacealias) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InterfaceAlias - Alias of the network interface for which the DNS server address is set." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AddressFamily - # Type: string - # IsMandatory: True - # Values: ["IPv4", "IPv6"] - newparam(:dsc_addressfamily) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AddressFamily - IP address family. Valid values are IPv4, IPv6." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['IPv4', 'ipv4', 'IPv6', 'ipv6'].include?(value) - fail("Invalid value '#{value}'. Valid values are IPv4, IPv6") - end - end - end - - # Name: Address - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_address, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Address - The desired DNS Server address(es). Exclude to enable DHCP." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Validate - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_validate) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Validate - Requires that the DNS Server addresses be validated if they are updated. It will cause the resource to throw a 'A general error occurred that is not covered by a more specific error code.' error if set to True and specified DNS Servers are not accessible." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdnsserveraddress).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdnsserveradzone.rb b/lib/puppet/type/dsc_xdnsserveradzone.rb deleted file mode 100644 index 32c39e19..00000000 --- a/lib/puppet/type/dsc_xdnsserveradzone.rb +++ /dev/null @@ -1,187 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdnsserveradzone) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDnsServerADZone resource type. - Automatically generated from - 'xDnsServer/DSCResources/MSFT_xDnsServerADZone/MSFT_xDnsServerADZone.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xDnsServerADZone' end - def dscmeta_resource_name; 'MSFT_xDnsServerADZone' end - def dscmeta_module_name; 'xDnsServer' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - DNS Server zone name" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DynamicUpdate - # Type: string - # IsMandatory: False - # Values: ["None", "NonsecureAndSecure", "Secure"] - newparam(:dsc_dynamicupdate) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DynamicUpdate - Dynamic zone update option Valid values are None, NonsecureAndSecure, Secure." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['None', 'none', 'NonsecureAndSecure', 'nonsecureandsecure', 'Secure', 'secure'].include?(value) - fail("Invalid value '#{value}'. Valid values are None, NonsecureAndSecure, Secure") - end - end - end - - # Name: ReplicationScope - # Type: string - # IsMandatory: False - # Values: ["Custom", "Domain", "Forest", "Legacy"] - newparam(:dsc_replicationscope) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ReplicationScope - Replication scope option Valid values are Custom, Domain, Forest, Legacy." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Custom', 'custom', 'Domain', 'domain', 'Forest', 'forest', 'Legacy', 'legacy'].include?(value) - fail("Invalid value '#{value}'. Valid values are Custom, Domain, Forest, Legacy") - end - end - end - - # Name: DirectoryPartitionName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_directorypartitionname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DirectoryPartitionName - Directory partition name" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ComputerName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_computername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ComputerName - DNS Server name" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - Credential used to set zone" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Whether the DNS zone should be available or removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdnsserveradzone).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdnsserverforwarder.rb b/lib/puppet/type/dsc_xdnsserverforwarder.rb deleted file mode 100644 index 8751303d..00000000 --- a/lib/puppet/type/dsc_xdnsserverforwarder.rb +++ /dev/null @@ -1,106 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdnsserverforwarder) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDnsServerForwarder resource type. - Automatically generated from - 'xDnsServer/DSCResources/MSFT_xDnsServerForwarder/MSFT_xDnsServerForwarder.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_issingleinstance is a required attribute') if self[:dsc_issingleinstance].nil? - end - - def dscmeta_resource_friendly_name; 'xDnsServerForwarder' end - def dscmeta_resource_name; 'MSFT_xDnsServerForwarder' end - def dscmeta_module_name; 'xDnsServer' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: IsSingleInstance - # Type: string - # IsMandatory: True - # Values: ["Yes"] - newparam(:dsc_issingleinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes' Valid values are Yes." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Yes', 'yes'].include?(value) - fail("Invalid value '#{value}'. Valid values are Yes") - end - end - end - - # Name: IPAddresses - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_ipaddresses, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "IPAddresses" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdnsserverforwarder).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdnsserverprimaryzone.rb b/lib/puppet/type/dsc_xdnsserverprimaryzone.rb deleted file mode 100644 index 2504481c..00000000 --- a/lib/puppet/type/dsc_xdnsserverprimaryzone.rb +++ /dev/null @@ -1,138 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdnsserverprimaryzone) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDnsServerPrimaryZone resource type. - Automatically generated from - 'xDnsServer/DSCResources/MSFT_xDnsServerPrimaryZone/MSFT_xDnsServerPrimaryZone.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xDnsServerPrimaryZone' end - def dscmeta_resource_name; 'MSFT_xDnsServerPrimaryZone' end - def dscmeta_module_name; 'xDnsServer' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - DNS Server primary zone name" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ZoneFile - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_zonefile) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ZoneFile - DNS Server primary zone file" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DynamicUpdate - # Type: string - # IsMandatory: False - # Values: ["None", "NonsecureAndSecure"] - newparam(:dsc_dynamicupdate) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DynamicUpdate - Dynamic zone update option Valid values are None, NonsecureAndSecure." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['None', 'none', 'NonsecureAndSecure', 'nonsecureandsecure'].include?(value) - fail("Invalid value '#{value}'. Valid values are None, NonsecureAndSecure") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Whether the DNS zone should be available or removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdnsserverprimaryzone).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdnsserversecondaryzone.rb b/lib/puppet/type/dsc_xdnsserversecondaryzone.rb deleted file mode 100644 index b617fb58..00000000 --- a/lib/puppet/type/dsc_xdnsserversecondaryzone.rb +++ /dev/null @@ -1,138 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdnsserversecondaryzone) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDnsServerSecondaryZone resource type. - Automatically generated from - 'xDnsServer/DSCResources/MSFT_xDnsServerSecondaryZone/MSFT_xDnsServerSecondaryZone.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xDnsServerSecondaryZone' end - def dscmeta_resource_name; 'MSFT_xDnsServerSecondaryZone' end - def dscmeta_module_name; 'xDnsServer' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of the secondary zone" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MasterServers - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_masterservers, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "MasterServers - IP address or DNS name of the secondary DNS servers" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Should this resource be present or absent Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Type - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_type) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Type - Type of the DNS server zone" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdnsserversecondaryzone).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdnsserverzonetransfer.rb b/lib/puppet/type/dsc_xdnsserverzonetransfer.rb deleted file mode 100644 index 0928b380..00000000 --- a/lib/puppet/type/dsc_xdnsserverzonetransfer.rb +++ /dev/null @@ -1,121 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdnsserverzonetransfer) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDnsServerZoneTransfer resource type. - Automatically generated from - 'xDnsServer/DSCResources/MSFT_xDnsServerZoneTransfer/MSFT_xDnsServerZoneTransfer.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xDnsServerZoneTransfer' end - def dscmeta_resource_name; 'MSFT_xDnsServerZoneTransfer' end - def dscmeta_module_name; 'xDnsServer' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of the DNS zone" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Type - # Type: string - # IsMandatory: False - # Values: ["None", "Any", "Named", "Specific"] - newparam(:dsc_type) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Type - Type of transfer allowed Valid values are None, Any, Named, Specific." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['None', 'none', 'Any', 'any', 'Named', 'named', 'Specific', 'specific'].include?(value) - fail("Invalid value '#{value}'. Valid values are None, Any, Named, Specific") - end - end - end - - # Name: SecondaryServer - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_secondaryserver, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "SecondaryServer - IP address or DNS name of DNS servers where zone information can be transfered" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdnsserverzonetransfer).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xdscwebservice.rb b/lib/puppet/type/dsc_xdscwebservice.rb deleted file mode 100644 index b21b2d4b..00000000 --- a/lib/puppet/type/dsc_xdscwebservice.rb +++ /dev/null @@ -1,306 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xdscwebservice) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xDSCWebService resource type. - Automatically generated from - 'xPSDesiredStateConfiguration/DSCResources/MSFT_xDSCWebService/MSFT_xDSCWebService.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_endpointname is a required attribute') if self[:dsc_endpointname].nil? - end - - def dscmeta_resource_friendly_name; 'xDSCWebService' end - def dscmeta_resource_name; 'MSFT_xDSCWebService' end - def dscmeta_module_name; 'xPSDesiredStateConfiguration' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: EndpointName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_endpointname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EndpointName" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CertificateThumbPrint - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_certificatethumbprint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CertificateThumbPrint - Can take the value AllowUnencryptedTraffic for setting up a non SSL based endpoint" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Port - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_port) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "Port" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: PhysicalPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_physicalpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PhysicalPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: State - # Type: string - # IsMandatory: False - # Values: ["Started", "Stopped"] - newparam(:dsc_state) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "State - Valid values are Started, Stopped." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Started', 'started', 'Stopped', 'stopped'].include?(value) - fail("Invalid value '#{value}'. Valid values are Started, Stopped") - end - end - end - - # Name: DatabasePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databasepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabasePath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ModulePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_modulepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ModulePath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ConfigurationPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_configurationpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConfigurationPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DSCServerUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_dscserverurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DSCServerUrl" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RegistrationKeyPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_registrationkeypath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RegistrationKeyPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AcceptSelfSignedCertificates - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_acceptselfsignedcertificates) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AcceptSelfSignedCertificates" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: UseSecurityBestPractices - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_usesecuritybestpractices) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UseSecurityBestPractices - This property will ensure that the Pull Server is created with the most secure practices" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DisableSecurityBestPractices - # Type: string[] - # IsMandatory: False - # Values: ["SecureTLSProtocols"] - newparam(:dsc_disablesecuritybestpractices, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "DisableSecurityBestPractices - Valid values are SecureTLSProtocols." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - if value.kind_of?(Array) - unless (['SecureTLSProtocols', 'securetlsprotocols'] & value).count == value.count - fail("Invalid value #{value}. Valid values are SecureTLSProtocols") - end - end - if value.kind_of?(String) - unless ['SecureTLSProtocols', 'securetlsprotocols'].include?(value) - fail("Invalid value #{value}. Valid values are SecureTLSProtocols") - end - end - end - munge do |value| - Array(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xdscwebservice).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xenvironment.rb b/lib/puppet/type/dsc_xenvironment.rb deleted file mode 100644 index 351c210d..00000000 --- a/lib/puppet/type/dsc_xenvironment.rb +++ /dev/null @@ -1,164 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xenvironment) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xEnvironment resource type. - Automatically generated from - 'xPSDesiredStateConfiguration/DSCResources/MSFT_xEnvironmentResource/MSFT_xEnvironmentResource.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xEnvironment' end - def dscmeta_resource_name; 'MSFT_xEnvironmentResource' end - def dscmeta_module_name; 'xPSDesiredStateConfiguration' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the environment variable for which you want to ensure a specific state." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Value - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_value) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Value - The desired value for the environment variable." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies if the environment varaible should exist. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Path - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_path) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Path - Indicates whether or not the environment variable is the Path variable." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Target - # Type: string[] - # IsMandatory: False - # Values: ["Process", "Machine"] - newparam(:dsc_target, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Target - Indicates the target where the environment variable should be set. Valid values are Process, Machine." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - if value.kind_of?(Array) - unless (['Process', 'process', 'Machine', 'machine'] & value).count == value.count - fail("Invalid value #{value}. Valid values are Process, Machine") - end - end - if value.kind_of?(String) - unless ['Process', 'process', 'Machine', 'machine'].include?(value) - fail("Invalid value #{value}. Valid values are Process, Machine") - end - end - end - munge do |value| - Array(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xenvironment).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchactivesyncvirtualdirectory.rb b/lib/puppet/type/dsc_xexchactivesyncvirtualdirectory.rb deleted file mode 100644 index 34aed037..00000000 --- a/lib/puppet/type/dsc_xexchactivesyncvirtualdirectory.rb +++ /dev/null @@ -1,313 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchactivesyncvirtualdirectory) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchActiveSyncVirtualDirectory resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchActiveSyncVirtualDirectory/MSFT_xExchActiveSyncVirtualDirectory.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_identity is a required attribute') if self[:dsc_identity].nil? - end - - def dscmeta_resource_friendly_name; 'xExchActiveSyncVirtualDirectory' end - def dscmeta_resource_name; 'MSFT_xExchActiveSyncVirtualdirectory' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Identity - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_identity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Identity" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AllowServiceRestart - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowservicerestart) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowServiceRestart" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AutoCertBasedAuth - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_autocertbasedauth) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AutoCertBasedAuth" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AutoCertBasedAuthThumbprint - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_autocertbasedauththumbprint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AutoCertBasedAuthThumbprint" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AutoCertBasedAuthHttpsBindings - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_autocertbasedauthhttpsbindings, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "AutoCertBasedAuthHttpsBindings" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: BasicAuthEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_basicauthenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "BasicAuthEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ClientCertAuth - # Type: string - # IsMandatory: False - # Values: ["Ignore", "Accepted", "Required"] - newparam(:dsc_clientcertauth) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ClientCertAuth - Valid values are Ignore, Accepted, Required." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Ignore', 'ignore', 'Accepted', 'accepted', 'Required', 'required'].include?(value) - fail("Invalid value '#{value}'. Valid values are Ignore, Accepted, Required") - end - end - end - - # Name: CompressionEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_compressionenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "CompressionEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ExternalAuthenticationMethods - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_externalauthenticationmethods, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ExternalAuthenticationMethods" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ExternalUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_externalurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ExternalUrl" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InternalAuthenticationMethods - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_internalauthenticationmethods, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "InternalAuthenticationMethods" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: InternalUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_internalurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InternalUrl" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: WindowsAuthEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_windowsauthenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "WindowsAuthEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchactivesyncvirtualdirectory).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchantimalwarescanning.rb b/lib/puppet/type/dsc_xexchantimalwarescanning.rb deleted file mode 100644 index caa7f91d..00000000 --- a/lib/puppet/type/dsc_xexchantimalwarescanning.rb +++ /dev/null @@ -1,118 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchantimalwarescanning) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchAntiMalwareScanning resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchAntiMalwareScanning/MSFT_xExchAntiMalwareScanning.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_enabled is a required attribute') if self[:dsc_enabled].nil? - end - - def dscmeta_resource_friendly_name; 'xExchAntiMalwareScanning' end - def dscmeta_resource_name; 'MSFT_xExchAntiMalwareScanning' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Enabled - # Type: boolean - # IsMandatory: True - # Values: None - newparam(:dsc_enabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Enabled - Whether Exchange Anti-malware scanning should be Enabled" - isrequired - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - Credentials used to establish a remote Powershell session to Exchange" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AllowServiceRestart - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowservicerestart) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowServiceRestart - Whether the Transport services should be automatically restarted after a status change" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchantimalwarescanning).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchautodiscovervirtualdirectory.rb b/lib/puppet/type/dsc_xexchautodiscovervirtualdirectory.rb deleted file mode 100644 index 2bb29798..00000000 --- a/lib/puppet/type/dsc_xexchautodiscovervirtualdirectory.rb +++ /dev/null @@ -1,196 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchautodiscovervirtualdirectory) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchAutodiscoverVirtualDirectory resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchAutodiscoverVirtualDirectory/MSFT_xExchAutodiscoverVirtualDirectory.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_identity is a required attribute') if self[:dsc_identity].nil? - end - - def dscmeta_resource_friendly_name; 'xExchAutodiscoverVirtualDirectory' end - def dscmeta_resource_name; 'MSFT_xExchAutodiscoverVirtualDirectory' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Identity - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_identity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Identity" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AllowServiceRestart - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowservicerestart) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowServiceRestart" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: BasicAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_basicauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "BasicAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DigestAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_digestauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DigestAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: WindowsAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_windowsauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "WindowsAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: WSSecurityAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_wssecurityauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "WSSecurityAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchautodiscovervirtualdirectory).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchautomountpoint.rb b/lib/puppet/type/dsc_xexchautomountpoint.rb deleted file mode 100644 index 57226e79..00000000 --- a/lib/puppet/type/dsc_xexchautomountpoint.rb +++ /dev/null @@ -1,264 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchautomountpoint) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchAutoMountPoint resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchAutoMountPoint/MSFT_xExchAutoMountPoint.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_identity is a required attribute') if self[:dsc_identity].nil? - end - - def dscmeta_resource_friendly_name; 'xExchAutoMountPoint' end - def dscmeta_resource_name; 'MSFT_xExchAutoMountPoint' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Identity - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_identity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Identity" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AutoDagDatabasesRootFolderPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_autodagdatabasesrootfolderpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AutoDagDatabasesRootFolderPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AutoDagVolumesRootFolderPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_autodagvolumesrootfolderpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AutoDagVolumesRootFolderPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DiskToDBMap - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_disktodbmap, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "DiskToDBMap" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: SpareVolumeCount - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_sparevolumecount) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "SpareVolumeCount" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: EnsureExchangeVolumeMountPointIsLast - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_ensureexchangevolumemountpointislast) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "EnsureExchangeVolumeMountPointIsLast" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: CreateSubfolders - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_createsubfolders) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "CreateSubfolders" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: FileSystem - # Type: string - # IsMandatory: False - # Values: ["NTFS", "REFS"] - newparam(:dsc_filesystem) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FileSystem - Valid values are NTFS, REFS." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['NTFS', 'ntfs', 'REFS', 'refs'].include?(value) - fail("Invalid value '#{value}'. Valid values are NTFS, REFS") - end - end - end - - # Name: MinDiskSize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_mindisksize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MinDiskSize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PartitioningScheme - # Type: string - # IsMandatory: False - # Values: ["MBR", "GPT"] - newparam(:dsc_partitioningscheme) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PartitioningScheme - Valid values are MBR, GPT." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['MBR', 'mbr', 'GPT', 'gpt'].include?(value) - fail("Invalid value '#{value}'. Valid values are MBR, GPT") - end - end - end - - # Name: UnitSize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_unitsize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UnitSize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: VolumePrefix - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_volumeprefix) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "VolumePrefix" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchautomountpoint).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchclientaccessserver.rb b/lib/puppet/type/dsc_xexchclientaccessserver.rb deleted file mode 100644 index 836efbd9..00000000 --- a/lib/puppet/type/dsc_xexchclientaccessserver.rb +++ /dev/null @@ -1,197 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchclientaccessserver) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchClientAccessServer resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchClientAccessServer/MSFT_xExchClientAccessServer.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_identity is a required attribute') if self[:dsc_identity].nil? - end - - def dscmeta_resource_friendly_name; 'xExchClientAccessServer' end - def dscmeta_resource_name; 'MSFT_xExchClientAccessServer' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Identity - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_identity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Identity" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AutoDiscoverServiceInternalUri - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_autodiscoverserviceinternaluri) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AutoDiscoverServiceInternalUri" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AutoDiscoverSiteScope - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_autodiscoversitescope, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "AutoDiscoverSiteScope" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AlternateServiceAccountCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_alternateserviceaccountcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "AlternateServiceAccountCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("AlternateServiceAccountCredential", value) - end - end - - # Name: CleanUpInvalidAlternateServiceAccountCredentials - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_cleanupinvalidalternateserviceaccountcredentials) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "CleanUpInvalidAlternateServiceAccountCredentials" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: RemoveAlternateServiceAccountCredentials - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_removealternateserviceaccountcredentials) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RemoveAlternateServiceAccountCredentials" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchclientaccessserver).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchdatabaseavailabilitygroup.rb b/lib/puppet/type/dsc_xexchdatabaseavailabilitygroup.rb deleted file mode 100644 index 128a029b..00000000 --- a/lib/puppet/type/dsc_xexchdatabaseavailabilitygroup.rb +++ /dev/null @@ -1,497 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchdatabaseavailabilitygroup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchDatabaseAvailabilityGroup resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroup/MSFT_xExchDatabaseAvailabilityGroup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xExchDatabaseAvailabilityGroup' end - def dscmeta_resource_name; 'MSFT_xExchDatabaseAvailabilityGroup' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AutoDagTotalNumberOfServers - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_autodagtotalnumberofservers) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "AutoDagTotalNumberOfServers" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: AlternateWitnessDirectory - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_alternatewitnessdirectory) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AlternateWitnessDirectory" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AlternateWitnessServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_alternatewitnessserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AlternateWitnessServer" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AutoDagAutoRedistributeEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_autodagautoredistributeenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AutoDagAutoRedistributeEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AutoDagAutoReseedEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_autodagautoreseedenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AutoDagAutoReseedEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AutoDagDatabaseCopiesPerDatabase - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_autodagdatabasecopiesperdatabase) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "AutoDagDatabaseCopiesPerDatabase" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: AutoDagDatabaseCopiesPerVolume - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_autodagdatabasecopiespervolume) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "AutoDagDatabaseCopiesPerVolume" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: AutoDagDatabasesRootFolderPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_autodagdatabasesrootfolderpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AutoDagDatabasesRootFolderPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AutoDagDiskReclaimerEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_autodagdiskreclaimerenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AutoDagDiskReclaimerEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AutoDagTotalNumberOfDatabases - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_autodagtotalnumberofdatabases) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "AutoDagTotalNumberOfDatabases" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: AutoDagVolumesRootFolderPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_autodagvolumesrootfolderpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AutoDagVolumesRootFolderPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseAvailabilityGroupIpAddresses - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_databaseavailabilitygroupipaddresses, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "DatabaseAvailabilityGroupIpAddresses" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: DatacenterActivationMode - # Type: string - # IsMandatory: False - # Values: ["Off", "DagOnly"] - newparam(:dsc_datacenteractivationmode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatacenterActivationMode - Valid values are Off, DagOnly." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Off', 'off', 'DagOnly', 'dagonly'].include?(value) - fail("Invalid value '#{value}'. Valid values are Off, DagOnly") - end - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FileSystem - # Type: string - # IsMandatory: False - # Values: ["NTFS", "ReFS"] - newparam(:dsc_filesystem) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FileSystem - Valid values are NTFS, ReFS." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['NTFS', 'ntfs', 'ReFS', 'refs'].include?(value) - fail("Invalid value '#{value}'. Valid values are NTFS, ReFS") - end - end - end - - # Name: ManualDagNetworkConfiguration - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_manualdagnetworkconfiguration) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ManualDagNetworkConfiguration" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: NetworkCompression - # Type: string - # IsMandatory: False - # Values: ["Disabled", "Enabled", "InterSubnetOnly", "SeedOnly"] - newparam(:dsc_networkcompression) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "NetworkCompression - Valid values are Disabled, Enabled, InterSubnetOnly, SeedOnly." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Disabled', 'disabled', 'Enabled', 'enabled', 'InterSubnetOnly', 'intersubnetonly', 'SeedOnly', 'seedonly'].include?(value) - fail("Invalid value '#{value}'. Valid values are Disabled, Enabled, InterSubnetOnly, SeedOnly") - end - end - end - - # Name: NetworkEncryption - # Type: string - # IsMandatory: False - # Values: ["Disabled", "Enabled", "InterSubnetOnly", "SeedOnly"] - newparam(:dsc_networkencryption) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "NetworkEncryption - Valid values are Disabled, Enabled, InterSubnetOnly, SeedOnly." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Disabled', 'disabled', 'Enabled', 'enabled', 'InterSubnetOnly', 'intersubnetonly', 'SeedOnly', 'seedonly'].include?(value) - fail("Invalid value '#{value}'. Valid values are Disabled, Enabled, InterSubnetOnly, SeedOnly") - end - end - end - - # Name: PreferenceMoveFrequency - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_preferencemovefrequency) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PreferenceMoveFrequency" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ReplayLagManagerEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_replaylagmanagerenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ReplayLagManagerEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ReplicationPort - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_replicationport) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "ReplicationPort" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: SkipDagValidation - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_skipdagvalidation) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SkipDagValidation" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: WitnessDirectory - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_witnessdirectory) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WitnessDirectory" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: WitnessServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_witnessserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WitnessServer" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchdatabaseavailabilitygroup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchdatabaseavailabilitygroupmember.rb b/lib/puppet/type/dsc_xexchdatabaseavailabilitygroupmember.rb deleted file mode 100644 index f823cc41..00000000 --- a/lib/puppet/type/dsc_xexchdatabaseavailabilitygroupmember.rb +++ /dev/null @@ -1,147 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchdatabaseavailabilitygroupmember) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchDatabaseAvailabilityGroupMember resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroupMember/MSFT_xExchDatabaseAvailabilityGroupMember.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_mailboxserver is a required attribute') if self[:dsc_mailboxserver].nil? - end - - def dscmeta_resource_friendly_name; 'xExchDatabaseAvailabilityGroupMember' end - def dscmeta_resource_name; 'MSFT_xExchDatabaseAvailabilityGroupMember' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: MailboxServer - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_mailboxserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MailboxServer" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: DAGName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_dagname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DAGName" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SkipDagValidation - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_skipdagvalidation) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SkipDagValidation" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchdatabaseavailabilitygroupmember).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchdatabaseavailabilitygroupnetwork.rb b/lib/puppet/type/dsc_xexchdatabaseavailabilitygroupnetwork.rb deleted file mode 100644 index e34898d9..00000000 --- a/lib/puppet/type/dsc_xexchdatabaseavailabilitygroupnetwork.rb +++ /dev/null @@ -1,201 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchdatabaseavailabilitygroupnetwork) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchDatabaseAvailabilityGroupNetwork resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroupNetwork/MSFT_xExchDatabaseAvailabilityGroupNetwork.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xExchDatabaseAvailabilityGroupNetwork' end - def dscmeta_resource_name; 'MSFT_xExchDatabaseAvailabilityGroupNetwork' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: DatabaseAvailabilityGroup - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databaseavailabilitygroup) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseAvailabilityGroup" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IgnoreNetwork - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_ignorenetwork) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "IgnoreNetwork" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ReplicationEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_replicationenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ReplicationEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Subnets - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_subnets, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Subnets" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchdatabaseavailabilitygroupnetwork).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchecpvirtualdirectory.rb b/lib/puppet/type/dsc_xexchecpvirtualdirectory.rb deleted file mode 100644 index fa978ae5..00000000 --- a/lib/puppet/type/dsc_xexchecpvirtualdirectory.rb +++ /dev/null @@ -1,260 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchecpvirtualdirectory) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchEcpVirtualDirectory resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchEcpVirtualDirectory/MSFT_xExchEcpVirtualDirectory.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_identity is a required attribute') if self[:dsc_identity].nil? - end - - def dscmeta_resource_friendly_name; 'xExchEcpVirtualDirectory' end - def dscmeta_resource_name; 'MSFT_xExchEcpVirtualDirectory' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Identity - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_identity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Identity" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AllowServiceRestart - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowservicerestart) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowServiceRestart" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AdfsAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_adfsauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AdfsAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: BasicAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_basicauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "BasicAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DigestAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_digestauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DigestAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ExternalAuthenticationMethods - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_externalauthenticationmethods, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ExternalAuthenticationMethods" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: FormsAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_formsauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "FormsAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ExternalUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_externalurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ExternalUrl" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InternalUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_internalurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InternalUrl" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: WindowsAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_windowsauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "WindowsAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchecpvirtualdirectory).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexcheventloglevel.rb b/lib/puppet/type/dsc_xexcheventloglevel.rb deleted file mode 100644 index 98491572..00000000 --- a/lib/puppet/type/dsc_xexcheventloglevel.rb +++ /dev/null @@ -1,119 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexcheventloglevel) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchEventLogLevel resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchEventLogLevel/MSFT_xExchEventLogLevel.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_identity is a required attribute') if self[:dsc_identity].nil? - end - - def dscmeta_resource_friendly_name; 'xExchEventLogLevel' end - def dscmeta_resource_name; 'MSFT_xExchEventLogLevel' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Identity - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_identity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Identity - The Identity parameter specifies the name of the event logging category for which you want to set the event logging level." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - Credentials used to establish a remote Powershell session to Exchange" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Level - # Type: string - # IsMandatory: False - # Values: ["Lowest", "Low", "Medium", "High", "Expert"] - newparam(:dsc_level) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Level - The Level parameter specifies the log level for the specific event logging category. Valid values are Lowest, Low, Medium, High, Expert." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Lowest', 'lowest', 'Low', 'low', 'Medium', 'medium', 'High', 'high', 'Expert', 'expert'].include?(value) - fail("Invalid value '#{value}'. Valid values are Lowest, Low, Medium, High, Expert") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexcheventloglevel).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchexchangecertificate.rb b/lib/puppet/type/dsc_xexchexchangecertificate.rb deleted file mode 100644 index 4e021253..00000000 --- a/lib/puppet/type/dsc_xexchexchangecertificate.rb +++ /dev/null @@ -1,201 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchexchangecertificate) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchExchangeCertificate resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchExchangeCertificate/MSFT_xExchExchangeCertificate.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_thumbprint is a required attribute') if self[:dsc_thumbprint].nil? - end - - def dscmeta_resource_friendly_name; 'xExchExchangeCertificate' end - def dscmeta_resource_name; 'MSFT_xExchExchangeCertificate' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Thumbprint - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_thumbprint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Thumbprint" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: AllowExtraServices - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowextraservices) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowExtraServices" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: CertCreds - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_certcreds) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "CertCreds" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("CertCreds", value) - end - end - - # Name: CertFilePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_certfilepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CertFilePath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Services - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_services, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Services" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchexchangecertificate).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchexchangeserver.rb b/lib/puppet/type/dsc_xexchexchangeserver.rb deleted file mode 100644 index fed3730a..00000000 --- a/lib/puppet/type/dsc_xexchexchangeserver.rb +++ /dev/null @@ -1,208 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchexchangeserver) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchExchangeServer resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchExchangeServer/MSFT_xExchExchangeServer.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_identity is a required attribute') if self[:dsc_identity].nil? - end - - def dscmeta_resource_friendly_name; 'xExchExchangeServer' end - def dscmeta_resource_name; 'MSFT_xExchExchangeServer' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Identity - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_identity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Identity" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AllowServiceRestart - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowservicerestart) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowServiceRestart" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: CustomerFeedbackEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_customerfeedbackenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "CustomerFeedbackEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InternetWebProxy - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_internetwebproxy) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InternetWebProxy" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MonitoringGroup - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_monitoringgroup) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MonitoringGroup" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProductKey - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_productkey) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProductKey" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: WorkloadManagementPolicy - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_workloadmanagementpolicy) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WorkloadManagementPolicy" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchexchangeserver).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchimapsettings.rb b/lib/puppet/type/dsc_xexchimapsettings.rb deleted file mode 100644 index b1976648..00000000 --- a/lib/puppet/type/dsc_xexchimapsettings.rb +++ /dev/null @@ -1,183 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchimapsettings) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchImapSettings resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchImapSettings/MSFT_xExchImapSettings.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_server is a required attribute') if self[:dsc_server].nil? - end - - def dscmeta_resource_friendly_name; 'xExchImapSettings' end - def dscmeta_resource_name; 'MSFT_xExchImapSettings' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Server - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_server) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Server" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AllowServiceRestart - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowservicerestart) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowServiceRestart" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LoginType - # Type: string - # IsMandatory: False - # Values: ["PlainTextLogin", "PlainTextAuthentication", "SecureLogin"] - newparam(:dsc_logintype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LoginType - Valid values are PlainTextLogin, PlainTextAuthentication, SecureLogin." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['PlainTextLogin', 'plaintextlogin', 'PlainTextAuthentication', 'plaintextauthentication', 'SecureLogin', 'securelogin'].include?(value) - fail("Invalid value '#{value}'. Valid values are PlainTextLogin, PlainTextAuthentication, SecureLogin") - end - end - end - - # Name: ExternalConnectionSettings - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_externalconnectionsettings, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ExternalConnectionSettings" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: X509CertificateName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_x509certificatename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "X509CertificateName" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchimapsettings).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchinstall.rb b/lib/puppet/type/dsc_xexchinstall.rb deleted file mode 100644 index 0498994f..00000000 --- a/lib/puppet/type/dsc_xexchinstall.rb +++ /dev/null @@ -1,118 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchinstall) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchInstall resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchInstall/MSFT_xExchInstall.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_path is a required attribute') if self[:dsc_path].nil? - fail('dsc_arguments is a required attribute') if self[:dsc_arguments].nil? - end - - def dscmeta_resource_friendly_name; 'xExchInstall' end - def dscmeta_resource_name; 'MSFT_xExchInstall' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Path - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - Full path to setup.exe in the Exchange 2013 setup directory" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Arguments - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_arguments) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Arguments - Command line arguments to pass to setup.exe" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - The credentials to use to perform the installation" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchinstall).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchjetstress.rb b/lib/puppet/type/dsc_xexchjetstress.rb deleted file mode 100644 index 6026fdb2..00000000 --- a/lib/puppet/type/dsc_xexchjetstress.rb +++ /dev/null @@ -1,154 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchjetstress) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchJetstress resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchJetstress/MSFT_xExchJetstress.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_type is a required attribute') if self[:dsc_type].nil? - end - - def dscmeta_resource_friendly_name; 'xExchJetstress' end - def dscmeta_resource_name; 'MSFT_xExchJetstress' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Type - # Type: string - # IsMandatory: True - # Values: ["Performance", "Stress", "DatabaseBackup", "SoftRecovery"] - newparam(:dsc_type) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Type - Specifies the Type which was defined in the JetstressConfig.xml file. Valid values are Performance, Stress, DatabaseBackup, or SoftRecovery. Defaults to Performance. Valid values are Performance, Stress, DatabaseBackup, SoftRecovery." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Performance', 'performance', 'Stress', 'stress', 'DatabaseBackup', 'databasebackup', 'SoftRecovery', 'softrecovery'].include?(value) - fail("Invalid value '#{value}'. Valid values are Performance, Stress, DatabaseBackup, SoftRecovery") - end - end - end - - # Name: JetstressPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_jetstresspath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "JetstressPath - The path to the folder where Jetstress is installed, and which contains JetstressCmd.exe" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: JetstressParams - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_jetstressparams) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "JetstressParams - Command line parameters to pass into JetstressCmd.exe" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MaxWaitMinutes - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maxwaitminutes) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "MaxWaitMinutes - The maximum amount of time that the Scheduled Task which runs Jetstress can execute for. Defaults to 0, which means there is no time limit." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MinAchievedIOPS - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_minachievediops) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "MinAchievedIOPS - The minimum value reported in the Achieved Transactional I/O per Second section of the Jetstress report for the run to be considered successful. Defaults to 0." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchjetstress).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchjetstresscleanup.rb b/lib/puppet/type/dsc_xexchjetstresscleanup.rb deleted file mode 100644 index 1071bf67..00000000 --- a/lib/puppet/type/dsc_xexchjetstresscleanup.rb +++ /dev/null @@ -1,183 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchjetstresscleanup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchJetstressCleanup resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchJetstressCleanup/MSFT_xExchJetstressCleanup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_jetstresspath is a required attribute') if self[:dsc_jetstresspath].nil? - end - - def dscmeta_resource_friendly_name; 'xExchJetstressCleanup' end - def dscmeta_resource_name; 'MSFT_xExchJetstressCleanup' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: JetstressPath - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_jetstresspath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "JetstressPath - The path to the folder where Jetstress is installed, and which contains JetstressCmd.exe" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ConfigFilePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_configfilepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConfigFilePath - Either ConfigFilePath, or DatabasePaths AND LogPaths MUST be specified. ConfigFilePath takes precedence. This is the full path to the JetstressConfig.xml file. If ConfigFilePath is specified, the config file will be used to determine the database and log folders that need to be removed" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabasePaths - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_databasepaths, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "DatabasePaths - Either ConfigFilePath, or DatabasePaths AND LogPaths MUST be specified. DatabasePaths specifies the paths to database directories that should be cleaned up." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: DeleteAssociatedMountPoints - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_deleteassociatedmountpoints) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DeleteAssociatedMountPoints - Defaults to $false. If specified, indicates that mount points associated with the Jetstress database and log paths should be removed" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: LogPaths - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_logpaths, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "LogPaths - Either ConfigFilePath, or DatabasePaths AND LogPaths MUST be specified. LogPaths specifies the paths to log directories that should be cleaned up." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: OutputSaveLocation - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_outputsavelocation) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "OutputSaveLocation - If RemoveBinaries is set to $true and Jetstress output was saved to the default location (the installation path of Jetstress), specifies the folder path to copy the Jetstress output files to." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RemoveBinaries - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_removebinaries) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RemoveBinaries - Specifies that the files in the Jetstress installation directory should be removed" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchjetstresscleanup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchmailboxdatabase.rb b/lib/puppet/type/dsc_xexchmailboxdatabase.rb deleted file mode 100644 index 8a5bc731..00000000 --- a/lib/puppet/type/dsc_xexchmailboxdatabase.rb +++ /dev/null @@ -1,552 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchmailboxdatabase) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchMailboxDatabase resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchMailboxDatabase/MSFT_xExchMailboxDatabase.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xExchMailboxDatabase' end - def dscmeta_resource_name; 'MSFT_xExchMailboxDatabase' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: DatabaseCopyCount - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_databasecopycount) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "DatabaseCopyCount" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Server - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_server) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Server" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: EdbFilePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_edbfilepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EdbFilePath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LogFolderPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logfolderpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogFolderPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AdServerSettingsPreferredServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_adserversettingspreferredserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AdServerSettingsPreferredServer" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SkipInitialDatabaseMount - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_skipinitialdatabasemount) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SkipInitialDatabaseMount" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AllowServiceRestart - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowservicerestart) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowServiceRestart" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AutoDagExcludeFromMonitoring - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_autodagexcludefrommonitoring) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AutoDagExcludeFromMonitoring" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: BackgroundDatabaseMaintenance - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_backgrounddatabasemaintenance) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "BackgroundDatabaseMaintenance" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: CalendarLoggingQuota - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_calendarloggingquota) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CalendarLoggingQuota" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CircularLoggingEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_circularloggingenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "CircularLoggingEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DataMoveReplicationConstraint - # Type: string - # IsMandatory: False - # Values: ["None", "SecondCopy", "SecondDatacenter", "AllDatacenters", "AllCopies"] - newparam(:dsc_datamovereplicationconstraint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DataMoveReplicationConstraint - Valid values are None, SecondCopy, SecondDatacenter, AllDatacenters, AllCopies." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['None', 'none', 'SecondCopy', 'secondcopy', 'SecondDatacenter', 'seconddatacenter', 'AllDatacenters', 'alldatacenters', 'AllCopies', 'allcopies'].include?(value) - fail("Invalid value '#{value}'. Valid values are None, SecondCopy, SecondDatacenter, AllDatacenters, AllCopies") - end - end - end - - # Name: DeletedItemRetention - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_deleteditemretention) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DeletedItemRetention" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: EventHistoryRetentionPeriod - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_eventhistoryretentionperiod) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EventHistoryRetentionPeriod" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IndexEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_indexenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "IndexEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: IsExcludedFromProvisioning - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_isexcludedfromprovisioning) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "IsExcludedFromProvisioning" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: IsExcludedFromProvisioningReason - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_isexcludedfromprovisioningreason) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IsExcludedFromProvisioningReason" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IssueWarningQuota - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_issuewarningquota) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IssueWarningQuota" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IsSuspendedFromProvisioning - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_issuspendedfromprovisioning) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "IsSuspendedFromProvisioning" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: JournalRecipient - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_journalrecipient) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "JournalRecipient" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MailboxRetention - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_mailboxretention) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MailboxRetention" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MountAtStartup - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_mountatstartup) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "MountAtStartup" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: OfflineAddressBook - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_offlineaddressbook) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "OfflineAddressBook" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProhibitSendQuota - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_prohibitsendquota) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProhibitSendQuota" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProhibitSendReceiveQuota - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_prohibitsendreceivequota) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProhibitSendReceiveQuota" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RecoverableItemsQuota - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_recoverableitemsquota) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RecoverableItemsQuota" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RecoverableItemsWarningQuota - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_recoverableitemswarningquota) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RecoverableItemsWarningQuota" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RetainDeletedItemsUntilBackup - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_retaindeleteditemsuntilbackup) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RetainDeletedItemsUntilBackup" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchmailboxdatabase).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchmailboxdatabasecopy.rb b/lib/puppet/type/dsc_xexchmailboxdatabasecopy.rb deleted file mode 100644 index 521e839b..00000000 --- a/lib/puppet/type/dsc_xexchmailboxdatabasecopy.rb +++ /dev/null @@ -1,226 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchmailboxdatabasecopy) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchMailboxDatabaseCopy resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchMailboxDatabaseCopy/MSFT_xExchMailboxDatabaseCopy.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_identity is a required attribute') if self[:dsc_identity].nil? - end - - def dscmeta_resource_friendly_name; 'xExchMailboxDatabaseCopy' end - def dscmeta_resource_name; 'MSFT_xExchMailboxDatabaseCopy' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Identity - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_identity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Identity" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: MailboxServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_mailboxserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MailboxServer" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AdServerSettingsPreferredServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_adserversettingspreferredserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AdServerSettingsPreferredServer" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AllowServiceRestart - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowservicerestart) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowServiceRestart" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ActivationPreference - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_activationpreference) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "ActivationPreference" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ReplayLagTime - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_replaylagtime) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ReplayLagTime" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SeedingPostponed - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_seedingpostponed) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SeedingPostponed" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: TruncationLagTime - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_truncationlagtime) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TruncationLagTime" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchmailboxdatabasecopy).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchmailboxserver.rb b/lib/puppet/type/dsc_xexchmailboxserver.rb deleted file mode 100644 index dc29d484..00000000 --- a/lib/puppet/type/dsc_xexchmailboxserver.rb +++ /dev/null @@ -1,853 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchmailboxserver) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchMailboxServer resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchMailboxServer/MSFT_xExchMailboxServer.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_identity is a required attribute') if self[:dsc_identity].nil? - end - - def dscmeta_resource_friendly_name; 'xExchMailboxServer' end - def dscmeta_resource_name; 'MSFT_xExchMailboxServer' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Identity - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_identity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Identity - The Identity parameter specifies the Mailbox server that you want to modify." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - Credentials used to establish a remote Powershell session to Exchange" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AutoDatabaseMountDial - # Type: string - # IsMandatory: False - # Values: ["BestAvailability", "GoodAvailability", "Lossless"] - newparam(:dsc_autodatabasemountdial) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AutoDatabaseMountDial - The AutoDatabaseMountDial parameter specifies the automatic database mount behavior for a continuous replication environment after a database failover. Valid values are BestAvailability, GoodAvailability, Lossless." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['BestAvailability', 'bestavailability', 'GoodAvailability', 'goodavailability', 'Lossless', 'lossless'].include?(value) - fail("Invalid value '#{value}'. Valid values are BestAvailability, GoodAvailability, Lossless") - end - end - end - - # Name: CalendarRepairIntervalEndWindow - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_calendarrepairintervalendwindow) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "CalendarRepairIntervalEndWindow - The CalendarRepairIntervalEndWindow parameter specifies the number of days into the future to repair calendars. For example, if this parameter is set to 90, the Calendar Repair Assistant repairs calendars on this Mailbox server 90 days from now." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: CalendarRepairLogDirectorySizeLimit - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_calendarrepairlogdirectorysizelimit) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CalendarRepairLogDirectorySizeLimit - The CalendarRepairLogDirectorySizeLimit parameter specifies the size limit for all log files for the Calendar Repair Assistant. After the limit is reached, the oldest files are deleted." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CalendarRepairLogEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_calendarrepairlogenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "CalendarRepairLogEnabled - The CalendarRepairLogEnabled parameter specifies whether the Calendar Repair Attendant logs items that it repairs. The repair log doesn't contain failed repair attempts." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: CalendarRepairLogFileAgeLimit - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_calendarrepairlogfileagelimit) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CalendarRepairLogFileAgeLimit - The CalendarRepairLogFileAgeLimit parameter specifies how long to retain calendar repair logs. Log files that exceed the maximum retention period are deleted." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CalendarRepairLogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_calendarrepairlogpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CalendarRepairLogPath - The CalendarRepairLogPath parameter specifies the location of the calendar repair log files on the Mailbox server." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CalendarRepairLogSubjectLoggingEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_calendarrepairlogsubjectloggingenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "CalendarRepairLogSubjectLoggingEnabled - The CalendarRepairLogSubjectLoggingEnabled parameter specifies that the subject of the repaired calendar item is logged in the calendar repair log." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: CalendarRepairMissingItemFixDisabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_calendarrepairmissingitemfixdisabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "CalendarRepairMissingItemFixDisabled - The CalendarRepairMissingItemFixDisabled parameter specifies that the Calendar Repair Assistant won't fix missing attendee calendar items for mailboxes homed on this Mailbox server." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: CalendarRepairMode - # Type: string - # IsMandatory: False - # Values: ["ValidateOnly", "RepairAndValidate"] - newparam(:dsc_calendarrepairmode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CalendarRepairMode - The CalendarRepairMode parameter specifies the mode that the Calendar Repair Assistant will run in. Valid values are ValidateOnly, RepairAndValidate." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['ValidateOnly', 'validateonly', 'RepairAndValidate', 'repairandvalidate'].include?(value) - fail("Invalid value '#{value}'. Valid values are ValidateOnly, RepairAndValidate") - end - end - end - - # Name: CalendarRepairWorkCycle - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_calendarrepairworkcycle) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CalendarRepairWorkCycle - The CalendarRepairWorkCycle parameter specifies the time span in which all mailboxes on the specified server will be scanned by the Calendar Repair Assistant. Calendars that have inconsistencies will be flagged and repaired according to the interval specified by the CalendarRepairWorkCycleCheckpoint parameter." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CalendarRepairWorkCycleCheckpoint - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_calendarrepairworkcyclecheckpoint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CalendarRepairWorkCycleCheckpoint - The CalendarRepairWorkCycleCheckpoint parameter specifies the time span at which all mailboxes will be identified as needing work completed on them." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController - The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to Active Directory." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseCopyActivationDisabledAndMoveNow - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_databasecopyactivationdisabledandmovenow) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DatabaseCopyActivationDisabledAndMoveNow - The DatabaseCopyActivationDisabledAndMoveNow parameter specifies whether to prevent databases from being mounted on this Mailbox server if there are other healthy copies of the databases on other Mailbox servers. It will also immediately move any mounted databases on the server to other servers if copies exist and are healthy." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DatabaseCopyAutoActivationPolicy - # Type: string - # IsMandatory: False - # Values: ["Blocked", "IntrasiteOnly", "Unrestricted"] - newparam(:dsc_databasecopyautoactivationpolicy) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseCopyAutoActivationPolicy - The DatabaseCopyAutoActivationPolicy parameter specifies the type of automatic activation available for mailbox database copies on the specified Mailbox server. Valid values are Blocked, IntrasiteOnly, and Unrestricted. Valid values are Blocked, IntrasiteOnly, Unrestricted." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Blocked', 'blocked', 'IntrasiteOnly', 'intrasiteonly', 'Unrestricted', 'unrestricted'].include?(value) - fail("Invalid value '#{value}'. Valid values are Blocked, IntrasiteOnly, Unrestricted") - end - end - end - - # Name: FolderLogForManagedFoldersEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_folderlogformanagedfoldersenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "FolderLogForManagedFoldersEnabled - The FolderLogForManagedFoldersEnabled parameter specifies whether the folder log for managed folders is enabled for messages that were moved to managed folders." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ForceGroupMetricsGeneration - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_forcegroupmetricsgeneration) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ForceGroupMetricsGeneration - The ForceGroupMetricsGeneration parameter specifies that group metrics information must be generated on the Mailbox server regardless of whether that server generates an offline address book (OAB). By default, group metrics are generated only on servers that generate OABs. Group metrics information is used by MailTips to inform senders about how many recipients their messages will be sent to. You need to use this parameter if your organization doesn't generate OABs and you want the group metrics data to be available." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: IsExcludedFromProvisioning - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_isexcludedfromprovisioning) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "IsExcludedFromProvisioning - The IsExcludedFromProvisioning parameter specifies that the Mailbox server isn't considered by the OAB provisioning load balancer. If the IsExcludedFromProvisioning parameter is set to $true, the server won't be used for provisioning a new OAB or for moving existing OABs." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: JournalingLogForManagedFoldersEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_journalinglogformanagedfoldersenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "JournalingLogForManagedFoldersEnabled - The JournalingLogForManagedFoldersEnabled parameter specifies whether the log for managed folders is enabled for journaling. The two possible values for this parameter are $true or $false. If you specify $true, information about messages that were journaled is logged. The logs are located at the location you specify with the LogPathForManagedFolders parameter." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Locale - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_locale, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Locale - The Locale parameter specifies the locale. A locale is a collection of language-related user preferences such as writing system, calendar, and date format." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: LogDirectorySizeLimitForManagedFolders - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logdirectorysizelimitformanagedfolders) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogDirectorySizeLimitForManagedFolders - The LogDirectorySizeLimitForManagedFolders parameter specifies the size limit for all managed folder log files from a single message database. After the limit is reached for a set of managed folder log files from a message database, the oldest files are deleted to make space for new files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LogFileAgeLimitForManagedFolders - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logfileagelimitformanagedfolders) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogFileAgeLimitForManagedFolders - The LogFileAgeLimitForManagedFolders parameter specifies how long to retain managed folder logs. Log files that exceed the maximum retention period are deleted." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LogFileSizeLimitForManagedFolders - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logfilesizelimitformanagedfolders) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogFileSizeLimitForManagedFolders - The LogFileSizeLimitForManagedFolders parameter specifies the maximum size for each managed folder log file. When the log file size limit is reached, a new log file is created." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LogPathForManagedFolders - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logpathformanagedfolders) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogPathForManagedFolders - The LogPathForManagedFolders parameter specifies the path to the directory that stores the managed folder log files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MailboxProcessorWorkCycle - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_mailboxprocessorworkcycle) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MailboxProcessorWorkCycle - The MailboxProcessorWorkCycle parameter specifies how often to scan for locked mailboxes." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ManagedFolderAssistantSchedule - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_managedfolderassistantschedule, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ManagedFolderAssistantSchedule - The ManagedFolderAssistantSchedule parameter specifies the intervals each week during which the Managed Folder Assistant applies messaging records management (MRM) settings to managed folders. The format is StartDay.Time-EndDay." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ManagedFolderWorkCycle - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_managedfolderworkcycle) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ManagedFolderWorkCycle - The ManagedFolderWorkCycle parameter specifies the time span in which all mailboxes on the specified server will be processed by the Managed Folder Assistant. The Managed Folder Assistant applies retention policies according to the ManagedFolderWorkCycleCheckpoint interval." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ManagedFolderWorkCycleCheckpoint - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_managedfolderworkcyclecheckpoint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ManagedFolderWorkCycleCheckpoint - The ManagedFolderWorkCycleCheckpoint parameter specifies the time span at which to refresh the list of mailboxes so that new mailboxes that have been created or moved will be part of the work queue. Also, as mailboxes are prioritized, existing mailboxes that haven't been successfully processed for a long time will be placed higher in the queue and will have a greater chance of being processed again in the same work cycle." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MAPIEncryptionRequired - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_mapiencryptionrequired) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "MAPIEncryptionRequired - The MAPIEncryptionRequired parameter specifies whether Exchange blocks MAPI clients that don't use encrypted remote procedure calls (RPCs)." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: MaximumActiveDatabases - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_maximumactivedatabases) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MaximumActiveDatabases - The MaximumActiveDatabases parameter specifies the number of databases that can be mounted on this Mailbox server. This parameter accepts numeric values." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MaximumPreferredActiveDatabases - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_maximumpreferredactivedatabases) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MaximumPreferredActiveDatabases - The MaximumPreferredActiveDatabases parameter specifies a preferred maximum number of databases that a server should have. This value is different from the actual maximum, which is configured using the MaximumActiveDatabases parameter. The value of MaximumPreferredActiveDatabases is only honored during best copy and server selection, database and server switchovers, and when rebalancing the DAG." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: OABGeneratorWorkCycle - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_oabgeneratorworkcycle) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "OABGeneratorWorkCycle - The OABGeneratorWorkCycle parameter specifies the time span in which the OAB generation on the specified server will be processed." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: OABGeneratorWorkCycleCheckpoint - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_oabgeneratorworkcyclecheckpoint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "OABGeneratorWorkCycleCheckpoint - The OABGeneratorWorkCycleCheckpoint parameter specifies the time span at which to run OAB generation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PublicFolderWorkCycle - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_publicfolderworkcycle) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PublicFolderWorkCycle - The PublicFolderWorkCycle parameter is used by the public folder assistant to determine how often the mailboxes in a database are processed by the assistant." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PublicFolderWorkCycleCheckpoint - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_publicfolderworkcyclecheckpoint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PublicFolderWorkCycleCheckpoint - The PublicFolderWorkCycleCheckpoint determines how often the mailbox list for a database is evaluated. The processing speed is also calculated." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RetentionLogForManagedFoldersEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_retentionlogformanagedfoldersenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RetentionLogForManagedFoldersEnabled - The RetentionLogForManagedFoldersEnabled parameter specifies whether the Managed Folder Assistant logs information about messages that have reached their retention limits." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: SharingPolicySchedule - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_sharingpolicyschedule, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "SharingPolicySchedule - The SharingPolicySchedule parameter specifies the intervals each week during which the sharing policy runs. The Sharing Policy Assistant checks permissions on shared calendar items and contact folders in users' mailboxes against the assigned sharing policy. The assistant lowers or removes permissions according to the policy. The format is StartDay.Time-EndDay.Time." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: SharingPolicyWorkCycle - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sharingpolicyworkcycle) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SharingPolicyWorkCycle - The SharingPolicyWorkCycle parameter specifies the time span in which all mailboxes on the specified server will be scanned by the Sharing Policy Assistant. The Sharing Policy Assistant scans all mailboxes and enables or disables sharing polices according to the interval specified by the SharingPolicyWorkCycle." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SharingPolicyWorkCycleCheckpoint - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sharingpolicyworkcyclecheckpoint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SharingPolicyWorkCycleCheckpoint - The SharingPolicyWorkCycleCheckpoint parameter specifies the time span at which to refresh the list of mailboxes so that new mailboxes that have been created or moved will be part of the work queue. Also, as mailboxes are prioritized, existing mailboxes that haven't been successfully processed for a long time will be placed higher in the queue and will have a greater chance of being processed again in the same work cycle." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SharingSyncWorkCycle - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sharingsyncworkcycle) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SharingSyncWorkCycle - The SharingSyncWorkCycle parameter specifies the time span in which all mailboxes on the specified server will be synced to the cloud-based service by the Sharing Sync Assistant. Mailboxes that require syncing will be synced according to the interval specified by the SharingSyncWorkCycleCheckpoint parameter." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SharingSyncWorkCycleCheckpoint - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sharingsyncworkcyclecheckpoint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SharingSyncWorkCycleCheckpoint - The SharingSyncWorkCycleCheckpoint parameter specifies the time span at which to refresh the list of mailboxes so that new mailboxes that have been created or moved will be part of the work queue. Also, as mailboxes are prioritized, existing mailboxes that haven't been successfully processed for a long time will be placed higher in the queue and will have a greater chance of being processed again in the same work cycle." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SiteMailboxWorkCycle - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sitemailboxworkcycle) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SiteMailboxWorkCycle - The SiteMailboxWorkCycle parameter specifies the time span in which the site mailbox information on the specified server will be processed." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SiteMailboxWorkCycleCheckpoint - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sitemailboxworkcyclecheckpoint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SiteMailboxWorkCycleCheckpoint - The SiteMailboxWorkCycleCheckpoint parameter specifies the time span at which to refresh the site mailbox workcycle." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SubjectLogForManagedFoldersEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_subjectlogformanagedfoldersenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SubjectLogForManagedFoldersEnabled - The SubjectLogForManagedFoldersEnabled parameter specifies whether the subject of messages is displayed in managed folder logs." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: TopNWorkCycle - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_topnworkcycle) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TopNWorkCycle - The TopNWorkCycle parameter specifies the time span in which all mailboxes that have Unified Messaging on the specified server will be scanned by the TopN Words Assistant. The TopN Words Assistant scans voice mail for the most frequently used words to aid in transcription." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TopNWorkCycleCheckpoint - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_topnworkcyclecheckpoint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TopNWorkCycleCheckpoint - The TopNWorkCycleCheckpoint parameter specifies the time span at which to refresh the list of mailboxes so that new mailboxes that have been created or moved will be part of the work queue. Also, as mailboxes are prioritized, existing mailboxes that haven't been successfully processed for a long time will be placed higher in the queue and will have a greater chance of being processed again in the same work cycle." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UMReportingWorkCycle - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_umreportingworkcycle) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UMReportingWorkCycle - The UMReportingWorkCycle parameter specifies the time span in which the arbitration mailbox named SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9} on the specified server will be scanned by the Unified Messaging Reporting Assistant. The Unified Messaging Reporting Assistant updates the Call Statistics reports by reading Unified Messaging call data records for an organization on a regular basis." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UMReportingWorkCycleCheckpoint - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_umreportingworkcyclecheckpoint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UMReportingWorkCycleCheckpoint - The UMReportingWorkCycleCheckpoint parameter specifies the time span at which the arbitration mailbox named SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9} will be marked by processing." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: WacDiscoveryEndpoint - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_wacdiscoveryendpoint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WacDiscoveryEndpoint - The WacDiscoveryEndpoint parameter specifies the Office Online Server endpoint to use. Exchange 2016 only." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchmailboxserver).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchmailboxtransportservice.rb b/lib/puppet/type/dsc_xexchmailboxtransportservice.rb deleted file mode 100644 index 3839d80d..00000000 --- a/lib/puppet/type/dsc_xexchmailboxtransportservice.rb +++ /dev/null @@ -1,456 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchmailboxtransportservice) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchMailboxTransportService resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchMailboxTransportService/MSFT_xExchMailboxTransportService.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_identity is a required attribute') if self[:dsc_identity].nil? - end - - def dscmeta_resource_friendly_name; 'xExchMailboxTransportService' end - def dscmeta_resource_name; 'MSFT_xExchMailboxTransportService' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Identity - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_identity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Identity" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AllowServiceRestart - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowservicerestart) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowServiceRestart" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ConnectivityLogEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_connectivitylogenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ConnectivityLogEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ConnectivityLogMaxAge - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_connectivitylogmaxage) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConnectivityLogMaxAge" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ConnectivityLogMaxDirectorySize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_connectivitylogmaxdirectorysize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConnectivityLogMaxDirectorySize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ConnectivityLogMaxFileSize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_connectivitylogmaxfilesize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConnectivityLogMaxFileSize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ConnectivityLogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_connectivitylogpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConnectivityLogPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ContentConversionTracingEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_contentconversiontracingenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ContentConversionTracingEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: MaxConcurrentMailboxDeliveries - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maxconcurrentmailboxdeliveries) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "MaxConcurrentMailboxDeliveries" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaxConcurrentMailboxSubmissions - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maxconcurrentmailboxsubmissions) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "MaxConcurrentMailboxSubmissions" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: PipelineTracingEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_pipelinetracingenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "PipelineTracingEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: PipelineTracingPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_pipelinetracingpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PipelineTracingPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PipelineTracingSenderAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_pipelinetracingsenderaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PipelineTracingSenderAddress" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ReceiveProtocolLogMaxAge - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_receiveprotocollogmaxage) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ReceiveProtocolLogMaxAge" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ReceiveProtocolLogMaxDirectorySize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_receiveprotocollogmaxdirectorysize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ReceiveProtocolLogMaxDirectorySize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ReceiveProtocolLogMaxFileSize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_receiveprotocollogmaxfilesize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ReceiveProtocolLogMaxFileSize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ReceiveProtocolLogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_receiveprotocollogpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ReceiveProtocolLogPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RoutingTableLogMaxAge - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_routingtablelogmaxage) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RoutingTableLogMaxAge" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RoutingTableLogMaxDirectorySize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_routingtablelogmaxdirectorysize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RoutingTableLogMaxDirectorySize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RoutingTableLogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_routingtablelogpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RoutingTableLogPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SendProtocolLogMaxAge - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sendprotocollogmaxage) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SendProtocolLogMaxAge" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SendProtocolLogMaxDirectorySize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sendprotocollogmaxdirectorysize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SendProtocolLogMaxDirectorySize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SendProtocolLogMaxFileSize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sendprotocollogmaxfilesize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SendProtocolLogMaxFileSize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SendProtocolLogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sendprotocollogpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SendProtocolLogPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchmailboxtransportservice).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchmaintenancemode.rb b/lib/puppet/type/dsc_xexchmaintenancemode.rb deleted file mode 100644 index de48afef..00000000 --- a/lib/puppet/type/dsc_xexchmaintenancemode.rb +++ /dev/null @@ -1,182 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchmaintenancemode) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchMaintenanceMode resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchMaintenanceMode/MSFT_xExchMaintenanceMode.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_enabled is a required attribute') if self[:dsc_enabled].nil? - end - - def dscmeta_resource_friendly_name; 'xExchMaintenanceMode' end - def dscmeta_resource_name; 'MSFT_xExchMaintenanceMode' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Enabled - # Type: boolean - # IsMandatory: True - # Values: None - newparam(:dsc_enabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Enabled - Whether the server should be put into Maintenance Mode. When Enabled is set to True, the server will be put in Maintenance Mode. If False, the server will be taken out of Maintenance Mode." - isrequired - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - Credentials used to establish a remote Powershell session to Exchange" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AdditionalComponentsToActivate - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_additionalcomponentstoactivate, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "AdditionalComponentsToActivate - When taking a server out of Maintenance Mode, the following components will be set to Active by default: ServerWideOffline, UMCallRouter, HighAvailability, Monitoring, RecoveryActionsEnabled. This parameter specifies an additional list of components to set to Active." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController - The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to Active Directory." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MovePreferredDatabasesBack - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_movepreferreddatabasesback) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "MovePreferredDatabasesBack - Whether to move back databases with an Activation Preference of one for this server after taking the server out of Maintenance Mode. Defaults to False." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: SetInactiveComponentsFromAnyRequesterToActive - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_setinactivecomponentsfromanyrequestertoactive) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SetInactiveComponentsFromAnyRequesterToActive - Whether components that were set to Inactive by outside Requesters should also be set to Active when exiting Maintenance Mode. Defaults to False." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: UpgradedServerVersion - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_upgradedserverversion) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UpgradedServerVersion - Optional string to specify what the server version will be after applying a Cumulative Update. If the server is already at this version, requests to put the server in Maintenance Mode will be ignored. Version should be in the format ##.#.####.#, as in 15.0.1104.5." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchmaintenancemode).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchmapivirtualdirectory.rb b/lib/puppet/type/dsc_xexchmapivirtualdirectory.rb deleted file mode 100644 index 1fe7214b..00000000 --- a/lib/puppet/type/dsc_xexchmapivirtualdirectory.rb +++ /dev/null @@ -1,180 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchmapivirtualdirectory) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchMapiVirtualDirectory resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchMapiVirtualDirectory/MSFT_xExchMapiVirtualDirectory.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_identity is a required attribute') if self[:dsc_identity].nil? - end - - def dscmeta_resource_friendly_name; 'xExchMapiVirtualDirectory' end - def dscmeta_resource_name; 'MSFT_xExchMapiVirtualDirectory' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Identity - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_identity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Identity" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AllowServiceRestart - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowservicerestart) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowServiceRestart" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ExternalUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_externalurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ExternalUrl" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IISAuthenticationMethods - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_iisauthenticationmethods, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "IISAuthenticationMethods" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: InternalUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_internalurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InternalUrl" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchmapivirtualdirectory).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchoabvirtualdirectory.rb b/lib/puppet/type/dsc_xexchoabvirtualdirectory.rb deleted file mode 100644 index 56dd47ea..00000000 --- a/lib/puppet/type/dsc_xexchoabvirtualdirectory.rb +++ /dev/null @@ -1,300 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchoabvirtualdirectory) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchOabVirtualDirectory resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchOabVirtualDirectory/MSFT_xExchOabVirtualDirectory.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_identity is a required attribute') if self[:dsc_identity].nil? - end - - def dscmeta_resource_friendly_name; 'xExchOabVirtualDirectory' end - def dscmeta_resource_name; 'MSFT_xExchOabVirtualDirectory' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Identity - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_identity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Identity" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: OABsToDistribute - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_oabstodistribute, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "OABsToDistribute" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: AllowServiceRestart - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowservicerestart) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowServiceRestart" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: BasicAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_basicauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "BasicAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ExtendedProtectionFlags - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_extendedprotectionflags, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ExtendedProtectionFlags" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ExtendedProtectionSPNList - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_extendedprotectionspnlist, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ExtendedProtectionSPNList" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ExtendedProtectionTokenChecking - # Type: string - # IsMandatory: False - # Values: ["None", "Allow", "Require"] - newparam(:dsc_extendedprotectiontokenchecking) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ExtendedProtectionTokenChecking - Valid values are None, Allow, Require." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['None', 'none', 'Allow', 'allow', 'Require', 'require'].include?(value) - fail("Invalid value '#{value}'. Valid values are None, Allow, Require") - end - end - end - - # Name: ExternalUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_externalurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ExternalUrl" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InternalUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_internalurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InternalUrl" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PollInterval - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_pollinterval) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "PollInterval" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RequireSSL - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_requiressl) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RequireSSL" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: WindowsAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_windowsauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "WindowsAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchoabvirtualdirectory).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchoutlookanywhere.rb b/lib/puppet/type/dsc_xexchoutlookanywhere.rb deleted file mode 100644 index 988b32e0..00000000 --- a/lib/puppet/type/dsc_xexchoutlookanywhere.rb +++ /dev/null @@ -1,318 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchoutlookanywhere) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchOutlookAnywhere resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchOutlookAnywhere/MSFT_xExchOutlookAnywhere.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_identity is a required attribute') if self[:dsc_identity].nil? - end - - def dscmeta_resource_friendly_name; 'xExchOutlookAnywhere' end - def dscmeta_resource_name; 'MSFT_xExchOutlookAnywhere' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Identity - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_identity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Identity" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AllowServiceRestart - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowservicerestart) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowServiceRestart" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ExternalClientsRequireSsl - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_externalclientsrequiressl) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ExternalClientsRequireSsl" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ExtendedProtectionFlags - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_extendedprotectionflags, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ExtendedProtectionFlags" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ExtendedProtectionSPNList - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_extendedprotectionspnlist, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ExtendedProtectionSPNList" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ExtendedProtectionTokenChecking - # Type: string - # IsMandatory: False - # Values: ["Allow", "None", "Require"] - newparam(:dsc_extendedprotectiontokenchecking) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ExtendedProtectionTokenChecking - Valid values are Allow, None, Require." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Allow', 'allow', 'None', 'none', 'Require', 'require'].include?(value) - fail("Invalid value '#{value}'. Valid values are Allow, None, Require") - end - end - end - - # Name: ExternalClientAuthenticationMethod - # Type: string - # IsMandatory: False - # Values: ["Ntlm", "Basic", "Negotiate"] - newparam(:dsc_externalclientauthenticationmethod) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ExternalClientAuthenticationMethod - Valid values are Ntlm, Basic, Negotiate." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Ntlm', 'ntlm', 'Basic', 'basic', 'Negotiate', 'negotiate'].include?(value) - fail("Invalid value '#{value}'. Valid values are Ntlm, Basic, Negotiate") - end - end - end - - # Name: ExternalHostname - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_externalhostname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ExternalHostname" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IISAuthenticationMethods - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_iisauthenticationmethods, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "IISAuthenticationMethods" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: InternalClientAuthenticationMethod - # Type: string - # IsMandatory: False - # Values: ["Ntlm", "Basic", "Negotiate"] - newparam(:dsc_internalclientauthenticationmethod) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InternalClientAuthenticationMethod - Valid values are Ntlm, Basic, Negotiate." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Ntlm', 'ntlm', 'Basic', 'basic', 'Negotiate', 'negotiate'].include?(value) - fail("Invalid value '#{value}'. Valid values are Ntlm, Basic, Negotiate") - end - end - end - - # Name: InternalClientsRequireSsl - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_internalclientsrequiressl) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "InternalClientsRequireSsl" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: InternalHostname - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_internalhostname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InternalHostname" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SSLOffloading - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_ssloffloading) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SSLOffloading" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchoutlookanywhere).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchowavirtualdirectory.rb b/lib/puppet/type/dsc_xexchowavirtualdirectory.rb deleted file mode 100644 index 5338e36a..00000000 --- a/lib/puppet/type/dsc_xexchowavirtualdirectory.rb +++ /dev/null @@ -1,405 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchowavirtualdirectory) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchOwaVirtualDirectory resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchOwaVirtualDirectory/MSFT_xExchOwaVirtualDirectory.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_identity is a required attribute') if self[:dsc_identity].nil? - end - - def dscmeta_resource_friendly_name; 'xExchOwaVirtualDirectory' end - def dscmeta_resource_name; 'MSFT_xExchOwaVirtualDirectory' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Identity - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_identity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Identity" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AdfsAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_adfsauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AdfsAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AllowServiceRestart - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowservicerestart) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowServiceRestart" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: BasicAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_basicauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "BasicAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ChangePasswordEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_changepasswordenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ChangePasswordEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DigestAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_digestauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DigestAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ExternalAuthenticationMethods - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_externalauthenticationmethods, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ExternalAuthenticationMethods" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ExternalUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_externalurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ExternalUrl" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FormsAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_formsauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "FormsAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: InternalUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_internalurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InternalUrl" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstantMessagingEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_instantmessagingenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "InstantMessagingEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: InstantMessagingCertificateThumbprint - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_instantmessagingcertificatethumbprint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstantMessagingCertificateThumbprint" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstantMessagingServerName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_instantmessagingservername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstantMessagingServerName" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstantMessagingType - # Type: string - # IsMandatory: False - # Values: ["None", "Ocs"] - newparam(:dsc_instantmessagingtype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstantMessagingType - Valid values are None, Ocs." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['None', 'none', 'Ocs', 'ocs'].include?(value) - fail("Invalid value '#{value}'. Valid values are None, Ocs") - end - end - end - - # Name: LogonPagePublicPrivateSelectionEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_logonpagepublicprivateselectionenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "LogonPagePublicPrivateSelectionEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: LogonPageLightSelectionEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_logonpagelightselectionenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "LogonPageLightSelectionEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: WindowsAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_windowsauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "WindowsAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: LogonFormat - # Type: string - # IsMandatory: False - # Values: ["FullDomain", "UserName", "PrincipalName"] - newparam(:dsc_logonformat) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogonFormat - Valid values are FullDomain, UserName, PrincipalName." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['FullDomain', 'fulldomain', 'UserName', 'username', 'PrincipalName', 'principalname'].include?(value) - fail("Invalid value '#{value}'. Valid values are FullDomain, UserName, PrincipalName") - end - end - end - - # Name: DefaultDomain - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_defaultdomain) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DefaultDomain" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchowavirtualdirectory).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchpopsettings.rb b/lib/puppet/type/dsc_xexchpopsettings.rb deleted file mode 100644 index 18cf2f77..00000000 --- a/lib/puppet/type/dsc_xexchpopsettings.rb +++ /dev/null @@ -1,183 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchpopsettings) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchPopSettings resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchPopSettings/MSFT_xExchPopSettings.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_server is a required attribute') if self[:dsc_server].nil? - end - - def dscmeta_resource_friendly_name; 'xExchPopSettings' end - def dscmeta_resource_name; 'MSFT_xExchPopSettings' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Server - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_server) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Server" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AllowServiceRestart - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowservicerestart) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowServiceRestart" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LoginType - # Type: string - # IsMandatory: False - # Values: ["PlainTextLogin", "PlainTextAuthentication", "SecureLogin"] - newparam(:dsc_logintype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LoginType - Valid values are PlainTextLogin, PlainTextAuthentication, SecureLogin." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['PlainTextLogin', 'plaintextlogin', 'PlainTextAuthentication', 'plaintextauthentication', 'SecureLogin', 'securelogin'].include?(value) - fail("Invalid value '#{value}'. Valid values are PlainTextLogin, PlainTextAuthentication, SecureLogin") - end - end - end - - # Name: ExternalConnectionSettings - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_externalconnectionsettings, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ExternalConnectionSettings" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: X509CertificateName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_x509certificatename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "X509CertificateName" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchpopsettings).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchpowershellvirtualdirectory.rb b/lib/puppet/type/dsc_xexchpowershellvirtualdirectory.rb deleted file mode 100644 index b09e240b..00000000 --- a/lib/puppet/type/dsc_xexchpowershellvirtualdirectory.rb +++ /dev/null @@ -1,226 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchpowershellvirtualdirectory) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchPowerShellVirtualDirectory resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchPowershellVirtualDirectory/MSFT_xExchPowerShellVirtualDirectory.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_identity is a required attribute') if self[:dsc_identity].nil? - end - - def dscmeta_resource_friendly_name; 'xExchPowerShellVirtualDirectory' end - def dscmeta_resource_name; 'MSFT_xExchPowerShellVirtualDirectory' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Identity - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_identity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Identity" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AllowServiceRestart - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowservicerestart) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowServiceRestart" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: BasicAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_basicauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "BasicAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: CertificateAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_certificateauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "CertificateAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ExternalUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_externalurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ExternalUrl" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InternalUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_internalurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InternalUrl" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RequireSSL - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_requiressl) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RequireSSL" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: WindowsAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_windowsauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "WindowsAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchpowershellvirtualdirectory).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchreceiveconnector.rb b/lib/puppet/type/dsc_xexchreceiveconnector.rb deleted file mode 100644 index b49251c4..00000000 --- a/lib/puppet/type/dsc_xexchreceiveconnector.rb +++ /dev/null @@ -1,950 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchreceiveconnector) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchReceiveConnector resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchReceiveConnector/MSFT_xExchReceiveConnector.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_identity is a required attribute') if self[:dsc_identity].nil? - end - - def dscmeta_resource_friendly_name; 'xExchReceiveConnector' end - def dscmeta_resource_name; 'MSFT_xExchReceiveConnector' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Identity - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_identity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Identity" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: AdvertiseClientSettings - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_advertiseclientsettings) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AdvertiseClientSettings" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AuthMechanism - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_authmechanism, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "AuthMechanism" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Banner - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_banner) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Banner" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: BareLinefeedRejectionEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_barelinefeedrejectionenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "BareLinefeedRejectionEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: BinaryMimeEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_binarymimeenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "BinaryMimeEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Bindings - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_bindings, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Bindings" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ChunkingEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_chunkingenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ChunkingEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Comment - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_comment) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Comment" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ConnectionInactivityTimeout - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_connectioninactivitytimeout) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConnectionInactivityTimeout" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ConnectionTimeout - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_connectiontimeout) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConnectionTimeout" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DefaultDomain - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_defaultdomain) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DefaultDomain" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DeliveryStatusNotificationEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_deliverystatusnotificationenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DeliveryStatusNotificationEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DomainSecureEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_domainsecureenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DomainSecureEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: EightBitMimeEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_eightbitmimeenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "EightBitMimeEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: EnableAuthGSSAPI - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enableauthgssapi) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "EnableAuthGSSAPI" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Enabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Enabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: EnhancedStatusCodesEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enhancedstatuscodesenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "EnhancedStatusCodesEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ExtendedRightAllowEntries - # Type: MSFT_KeyValuePair[] - # IsMandatory: False - # Values: None - newparam(:dsc_extendedrightallowentries) do - def mof_type; 'MSFT_KeyValuePair[]' end - def mof_is_embedded?; true end - desc "ExtendedRightAllowEntries" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - end - end - - # Name: ExtendedRightDenyEntries - # Type: MSFT_KeyValuePair[] - # IsMandatory: False - # Values: None - newparam(:dsc_extendedrightdenyentries) do - def mof_type; 'MSFT_KeyValuePair[]' end - def mof_is_embedded?; true end - desc "ExtendedRightDenyEntries" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - end - end - - # Name: ExtendedProtectionPolicy - # Type: string - # IsMandatory: False - # Values: ["None", "Allow", "Require"] - newparam(:dsc_extendedprotectionpolicy) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ExtendedProtectionPolicy - Valid values are None, Allow, Require." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['None', 'none', 'Allow', 'allow', 'Require', 'require'].include?(value) - fail("Invalid value '#{value}'. Valid values are None, Allow, Require") - end - end - end - - # Name: Fqdn - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_fqdn) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Fqdn" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LongAddressesEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_longaddressesenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "LongAddressesEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: MaxAcknowledgementDelay - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_maxacknowledgementdelay) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MaxAcknowledgementDelay" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MaxHeaderSize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_maxheadersize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MaxHeaderSize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MaxHopCount - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maxhopcount) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "MaxHopCount" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaxInboundConnection - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_maxinboundconnection) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MaxInboundConnection" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MaxInboundConnectionPercentagePerSource - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maxinboundconnectionpercentagepersource) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "MaxInboundConnectionPercentagePerSource" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaxInboundConnectionPerSource - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_maxinboundconnectionpersource) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MaxInboundConnectionPerSource" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MaxLocalHopCount - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maxlocalhopcount) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "MaxLocalHopCount" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaxLogonFailures - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maxlogonfailures) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "MaxLogonFailures" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaxMessageSize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_maxmessagesize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MaxMessageSize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MaxProtocolErrors - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_maxprotocolerrors) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MaxProtocolErrors" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MaxRecipientsPerMessage - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maxrecipientspermessage) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "MaxRecipientsPerMessage" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MessageRateLimit - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_messageratelimit) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MessageRateLimit" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MessageRateSource - # Type: string - # IsMandatory: False - # Values: ["None", "IPAddress", "User", "All"] - newparam(:dsc_messageratesource) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MessageRateSource - Valid values are None, IPAddress, User, All." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['None', 'none', 'IPAddress', 'ipaddress', 'User', 'user', 'All', 'all'].include?(value) - fail("Invalid value '#{value}'. Valid values are None, IPAddress, User, All") - end - end - end - - # Name: OrarEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_orarenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "OrarEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: PermissionGroups - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_permissiongroups, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "PermissionGroups" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: PipeliningEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_pipeliningenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "PipeliningEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ProtocolLoggingLevel - # Type: string - # IsMandatory: False - # Values: ["None", "Verbose"] - newparam(:dsc_protocollogginglevel) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProtocolLoggingLevel - Valid values are None, Verbose." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['None', 'none', 'Verbose', 'verbose'].include?(value) - fail("Invalid value '#{value}'. Valid values are None, Verbose") - end - end - end - - # Name: RemoteIPRanges - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_remoteipranges, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "RemoteIPRanges" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: RequireEHLODomain - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_requireehlodomain) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RequireEHLODomain" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: RequireTLS - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_requiretls) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RequireTLS" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ServiceDiscoveryFqdn - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_servicediscoveryfqdn) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServiceDiscoveryFqdn" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SizeEnabled - # Type: string - # IsMandatory: False - # Values: ["Enabled", "Disabled", "EnabledWithoutValue"] - newparam(:dsc_sizeenabled) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SizeEnabled - Valid values are Enabled, Disabled, EnabledWithoutValue." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Enabled', 'enabled', 'Disabled', 'disabled', 'EnabledWithoutValue', 'enabledwithoutvalue'].include?(value) - fail("Invalid value '#{value}'. Valid values are Enabled, Disabled, EnabledWithoutValue") - end - end - end - - # Name: SuppressXAnonymousTls - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_suppressxanonymoustls) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SuppressXAnonymousTls" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: TarpitInterval - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_tarpitinterval) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TarpitInterval" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TlsCertificateName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_tlscertificatename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TlsCertificateName" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TlsDomainCapabilities - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_tlsdomaincapabilities, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "TlsDomainCapabilities" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: TransportRole - # Type: string - # IsMandatory: False - # Values: ["FrontendTransport", "HubTransport"] - newparam(:dsc_transportrole) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TransportRole - Valid values are FrontendTransport, HubTransport." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['FrontendTransport', 'frontendtransport', 'HubTransport', 'hubtransport'].include?(value) - fail("Invalid value '#{value}'. Valid values are FrontendTransport, HubTransport") - end - end - end - - # Name: Usage - # Type: string - # IsMandatory: False - # Values: ["Client", "Internal", "Internet", "Partner", "Custom"] - newparam(:dsc_usage) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Usage - Valid values are Client, Internal, Internet, Partner, Custom." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Client', 'client', 'Internal', 'internal', 'Internet', 'internet', 'Partner', 'partner', 'Custom', 'custom'].include?(value) - fail("Invalid value '#{value}'. Valid values are Client, Internal, Internet, Partner, Custom") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchreceiveconnector).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchtransportservice.rb b/lib/puppet/type/dsc_xexchtransportservice.rb deleted file mode 100644 index 53743072..00000000 --- a/lib/puppet/type/dsc_xexchtransportservice.rb +++ /dev/null @@ -1,1459 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchtransportservice) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchTransportService resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchTransportService/MSFT_xExchTransportService.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_identity is a required attribute') if self[:dsc_identity].nil? - end - - def dscmeta_resource_friendly_name; 'xExchTransportService' end - def dscmeta_resource_name; 'MSFT_xExchTransportService' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Identity - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_identity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Identity" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AllowServiceRestart - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowservicerestart) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowServiceRestart" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ActiveUserStatisticsLogMaxAge - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_activeuserstatisticslogmaxage) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ActiveUserStatisticsLogMaxAge" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ActiveUserStatisticsLogMaxDirectorySize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_activeuserstatisticslogmaxdirectorysize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ActiveUserStatisticsLogMaxDirectorySize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ActiveUserStatisticsLogMaxFileSize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_activeuserstatisticslogmaxfilesize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ActiveUserStatisticsLogMaxFileSize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ActiveUserStatisticsLogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_activeuserstatisticslogpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ActiveUserStatisticsLogPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AgentLogEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_agentlogenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AgentLogEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AgentLogMaxAge - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_agentlogmaxage) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AgentLogMaxAge" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AgentLogMaxDirectorySize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_agentlogmaxdirectorysize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AgentLogMaxDirectorySize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AgentLogMaxFileSize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_agentlogmaxfilesize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AgentLogMaxFileSize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AgentLogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_agentlogpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AgentLogPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ConnectivityLogEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_connectivitylogenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ConnectivityLogEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ConnectivityLogMaxAge - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_connectivitylogmaxage) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConnectivityLogMaxAge" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ConnectivityLogMaxDirectorySize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_connectivitylogmaxdirectorysize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConnectivityLogMaxDirectorySize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ConnectivityLogMaxFileSize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_connectivitylogmaxfilesize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConnectivityLogMaxFileSize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ConnectivityLogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_connectivitylogpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConnectivityLogPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ContentConversionTracingEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_contentconversiontracingenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ContentConversionTracingEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DelayNotificationTimeout - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_delaynotificationtimeout) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DelayNotificationTimeout" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DnsLogEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_dnslogenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DnsLogEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DnsLogMaxAge - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_dnslogmaxage) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DnsLogMaxAge" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DnsLogMaxDirectorySize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_dnslogmaxdirectorysize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DnsLogMaxDirectorySize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DnsLogMaxFileSize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_dnslogmaxfilesize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DnsLogMaxFileSize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DnsLogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_dnslogpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DnsLogPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ExternalDNSAdapterEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_externaldnsadapterenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ExternalDNSAdapterEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ExternalDNSAdapterGuid - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_externaldnsadapterguid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ExternalDNSAdapterGuid" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ExternalDNSProtocolOption - # Type: string - # IsMandatory: False - # Values: ["Any", "UseTcpOnly", "UseUdpOnly"] - newparam(:dsc_externaldnsprotocoloption) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ExternalDNSProtocolOption - Valid values are Any, UseTcpOnly, UseUdpOnly." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Any', 'any', 'UseTcpOnly', 'usetcponly', 'UseUdpOnly', 'useudponly'].include?(value) - fail("Invalid value '#{value}'. Valid values are Any, UseTcpOnly, UseUdpOnly") - end - end - end - - # Name: ExternalDNSServers - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_externaldnsservers, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ExternalDNSServers" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ExternalIPAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_externalipaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ExternalIPAddress" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InternalDNSAdapterEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_internaldnsadapterenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "InternalDNSAdapterEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: InternalDNSAdapterGuid - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_internaldnsadapterguid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InternalDNSAdapterGuid" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InternalDNSProtocolOption - # Type: string - # IsMandatory: False - # Values: ["Any", "UseTcpOnly", "UseUdpOnly"] - newparam(:dsc_internaldnsprotocoloption) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InternalDNSProtocolOption - Valid values are Any, UseTcpOnly, UseUdpOnly." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Any', 'any', 'UseTcpOnly', 'usetcponly', 'UseUdpOnly', 'useudponly'].include?(value) - fail("Invalid value '#{value}'. Valid values are Any, UseTcpOnly, UseUdpOnly") - end - end - end - - # Name: InternalDNSServers - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_internaldnsservers, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "InternalDNSServers" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: IntraOrgConnectorProtocolLoggingLevel - # Type: string - # IsMandatory: False - # Values: ["None", "Verbose"] - newparam(:dsc_intraorgconnectorprotocollogginglevel) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IntraOrgConnectorProtocolLoggingLevel - Valid values are None, Verbose." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['None', 'none', 'Verbose', 'verbose'].include?(value) - fail("Invalid value '#{value}'. Valid values are None, Verbose") - end - end - end - - # Name: IntraOrgConnectorSmtpMaxMessagesPerConnection - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_intraorgconnectorsmtpmaxmessagesperconnection) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "IntraOrgConnectorSmtpMaxMessagesPerConnection" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: IrmLogEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_irmlogenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "IrmLogEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: IrmLogMaxAge - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_irmlogmaxage) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IrmLogMaxAge" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IrmLogMaxDirectorySize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_irmlogmaxdirectorysize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IrmLogMaxDirectorySize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IrmLogMaxFileSize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_irmlogmaxfilesize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IrmLogMaxFileSize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IrmLogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_irmlogpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IrmLogPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MaxConcurrentMailboxDeliveries - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maxconcurrentmailboxdeliveries) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "MaxConcurrentMailboxDeliveries" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaxConcurrentMailboxSubmissions - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maxconcurrentmailboxsubmissions) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "MaxConcurrentMailboxSubmissions" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaxConnectionRatePerMinute - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maxconnectionrateperminute) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "MaxConnectionRatePerMinute" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaxOutboundConnections - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_maxoutboundconnections) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MaxOutboundConnections" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MaxPerDomainOutboundConnections - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_maxperdomainoutboundconnections) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MaxPerDomainOutboundConnections" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MessageExpirationTimeout - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_messageexpirationtimeout) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MessageExpirationTimeout" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MessageRetryInterval - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_messageretryinterval) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MessageRetryInterval" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MessageTrackingLogEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_messagetrackinglogenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "MessageTrackingLogEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: MessageTrackingLogMaxAge - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_messagetrackinglogmaxage) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MessageTrackingLogMaxAge" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MessageTrackingLogMaxDirectorySize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_messagetrackinglogmaxdirectorysize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MessageTrackingLogMaxDirectorySize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MessageTrackingLogMaxFileSize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_messagetrackinglogmaxfilesize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MessageTrackingLogMaxFileSize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MessageTrackingLogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_messagetrackinglogpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MessageTrackingLogPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MessageTrackingLogSubjectLoggingEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_messagetrackinglogsubjectloggingenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "MessageTrackingLogSubjectLoggingEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: OutboundConnectionFailureRetryInterval - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_outboundconnectionfailureretryinterval) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "OutboundConnectionFailureRetryInterval" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PickupDirectoryMaxHeaderSize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_pickupdirectorymaxheadersize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PickupDirectoryMaxHeaderSize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PickupDirectoryMaxMessagesPerMinute - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_pickupdirectorymaxmessagesperminute) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "PickupDirectoryMaxMessagesPerMinute" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: PickupDirectoryMaxRecipientsPerMessage - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_pickupdirectorymaxrecipientspermessage) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "PickupDirectoryMaxRecipientsPerMessage" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: PickupDirectoryPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_pickupdirectorypath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PickupDirectoryPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PipelineTracingEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_pipelinetracingenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "PipelineTracingEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: PipelineTracingPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_pipelinetracingpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PipelineTracingPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PipelineTracingSenderAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_pipelinetracingsenderaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PipelineTracingSenderAddress" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PoisonMessageDetectionEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_poisonmessagedetectionenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "PoisonMessageDetectionEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: PoisonThreshold - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_poisonthreshold) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "PoisonThreshold" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: QueueLogMaxAge - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_queuelogmaxage) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "QueueLogMaxAge" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: QueueLogMaxDirectorySize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_queuelogmaxdirectorysize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "QueueLogMaxDirectorySize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: QueueLogMaxFileSize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_queuelogmaxfilesize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "QueueLogMaxFileSize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: QueueLogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_queuelogpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "QueueLogPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: QueueMaxIdleTime - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_queuemaxidletime) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "QueueMaxIdleTime" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ReceiveProtocolLogMaxAge - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_receiveprotocollogmaxage) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ReceiveProtocolLogMaxAge" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ReceiveProtocolLogMaxDirectorySize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_receiveprotocollogmaxdirectorysize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ReceiveProtocolLogMaxDirectorySize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ReceiveProtocolLogMaxFileSize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_receiveprotocollogmaxfilesize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ReceiveProtocolLogMaxFileSize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ReceiveProtocolLogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_receiveprotocollogpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ReceiveProtocolLogPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RecipientValidationCacheEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_recipientvalidationcacheenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RecipientValidationCacheEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ReplayDirectoryPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_replaydirectorypath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ReplayDirectoryPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RootDropDirectoryPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_rootdropdirectorypath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RootDropDirectoryPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RoutingTableLogMaxAge - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_routingtablelogmaxage) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RoutingTableLogMaxAge" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RoutingTableLogMaxDirectorySize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_routingtablelogmaxdirectorysize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RoutingTableLogMaxDirectorySize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RoutingTableLogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_routingtablelogpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RoutingTableLogPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SendProtocolLogMaxAge - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sendprotocollogmaxage) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SendProtocolLogMaxAge" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SendProtocolLogMaxDirectorySize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sendprotocollogmaxdirectorysize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SendProtocolLogMaxDirectorySize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SendProtocolLogMaxFileSize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sendprotocollogmaxfilesize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SendProtocolLogMaxFileSize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SendProtocolLogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sendprotocollogpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SendProtocolLogPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ServerStatisticsLogMaxAge - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_serverstatisticslogmaxage) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServerStatisticsLogMaxAge" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ServerStatisticsLogMaxDirectorySize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_serverstatisticslogmaxdirectorysize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServerStatisticsLogMaxDirectorySize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ServerStatisticsLogMaxFileSize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_serverstatisticslogmaxfilesize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServerStatisticsLogMaxFileSize" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ServerStatisticsLogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_serverstatisticslogpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServerStatisticsLogPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TransientFailureRetryCount - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_transientfailureretrycount) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "TransientFailureRetryCount" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: TransientFailureRetryInterval - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_transientfailureretryinterval) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TransientFailureRetryInterval" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UseDowngradedExchangeServerAuth - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_usedowngradedexchangeserverauth) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UseDowngradedExchangeServerAuth" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchtransportservice).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchumcallroutersettings.rb b/lib/puppet/type/dsc_xexchumcallroutersettings.rb deleted file mode 100644 index 0ae241cd..00000000 --- a/lib/puppet/type/dsc_xexchumcallroutersettings.rb +++ /dev/null @@ -1,134 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchumcallroutersettings) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchUMCallRouterSettings resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchUMCallRouterSettings/MSFT_xExchUMCallRouterSettings.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_server is a required attribute') if self[:dsc_server].nil? - end - - def dscmeta_resource_friendly_name; 'xExchUMCallRouterSettings' end - def dscmeta_resource_name; 'MSFT_xExchUMCallRouterSettings' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Server - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_server) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Server - Hostname of the UM server to configure" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - Credentials used to establish a remote Powershell session to Exchange" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: UMStartupMode - # Type: string - # IsMandatory: False - # Values: ["TCP", "TLS", "Dual"] - newparam(:dsc_umstartupmode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UMStartupMode - UMStartupMode for the UM call router Valid values are TCP, TLS, Dual." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['TCP', 'tcp', 'TLS', 'tls', 'Dual', 'dual'].include?(value) - fail("Invalid value '#{value}'. Valid values are TCP, TLS, Dual") - end - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController - Optional Domain Controller to connect to" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchumcallroutersettings).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchumservice.rb b/lib/puppet/type/dsc_xexchumservice.rb deleted file mode 100644 index ae331de9..00000000 --- a/lib/puppet/type/dsc_xexchumservice.rb +++ /dev/null @@ -1,152 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchumservice) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchUMService resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchUMService/MSFT_xExchUMService.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_identity is a required attribute') if self[:dsc_identity].nil? - end - - def dscmeta_resource_friendly_name; 'xExchUMService' end - def dscmeta_resource_name; 'MSFT_xExchUMService' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Identity - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_identity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Identity" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: UMStartupMode - # Type: string - # IsMandatory: False - # Values: ["TCP", "TLS", "Dual"] - newparam(:dsc_umstartupmode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UMStartupMode - Valid values are TCP, TLS, Dual." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['TCP', 'tcp', 'TLS', 'tls', 'Dual', 'dual'].include?(value) - fail("Invalid value '#{value}'. Valid values are TCP, TLS, Dual") - end - end - end - - # Name: DialPlans - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_dialplans, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "DialPlans" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchumservice).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchwaitforadprep.rb b/lib/puppet/type/dsc_xexchwaitforadprep.rb deleted file mode 100644 index cd50e4f4..00000000 --- a/lib/puppet/type/dsc_xexchwaitforadprep.rb +++ /dev/null @@ -1,209 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchwaitforadprep) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchWaitForADPrep resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchWaitForADPrep/MSFT_xExchWaitForADPrep.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_identity is a required attribute') if self[:dsc_identity].nil? - end - - def dscmeta_resource_friendly_name; 'xExchWaitForADPrep' end - def dscmeta_resource_name; 'MSFT_xExchWaitForADPrep' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Identity - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_identity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Identity - Not actually used. Enter anything, as long as it's not null" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - Credentials used to perform Active Directory lookups against the Schema, Configuration, and Domain naming contexts" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: SchemaVersion - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_schemaversion) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "SchemaVersion - Specifies that the Active Directory schema should have been prepared using Exchange 2013 'setup /PrepareSchema', and should be at the specified version" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: OrganizationVersion - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_organizationversion) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "OrganizationVersion - Specifies that the Exchange Organization should have been prepared using Exchange 2013 'setup /PrepareAD', and should be at the specified version" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: DomainVersion - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_domainversion) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "DomainVersion - Specifies that the domain containing the target Exchange 2013 server was prepared using setup /PrepareAD, /PrepareDomain, or /PrepareAllDomains, and should be at the specified version" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ExchangeDomains - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_exchangedomains, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ExchangeDomains - The FQDN's of domains that should be checked for DomainVersion in addition to the domain that this Exchange server belongs to" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: RetryIntervalSec - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_retryintervalsec) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "RetryIntervalSec - How many seconds to wait between retries when checking whether AD has been prepped. Defaults to 60." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RetryCount - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_retrycount) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "RetryCount - How many retry attempts should be made to see if AD has been prepped before an exception is thrown. Defaults to 30." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchwaitforadprep).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchwaitfordag.rb b/lib/puppet/type/dsc_xexchwaitfordag.rb deleted file mode 100644 index f8a7febc..00000000 --- a/lib/puppet/type/dsc_xexchwaitfordag.rb +++ /dev/null @@ -1,152 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchwaitfordag) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchWaitForDAG resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchWaitForDAG/MSFT_xExchWaitForDAG.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_identity is a required attribute') if self[:dsc_identity].nil? - end - - def dscmeta_resource_friendly_name; 'xExchWaitForDAG' end - def dscmeta_resource_name; 'MSFT_xExchWaitForDAG' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Identity - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_identity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Identity" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RetryIntervalSec - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_retryintervalsec) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "RetryIntervalSec" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RetryCount - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_retrycount) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "RetryCount" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchwaitfordag).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchwaitformailboxdatabase.rb b/lib/puppet/type/dsc_xexchwaitformailboxdatabase.rb deleted file mode 100644 index 96ebd3ff..00000000 --- a/lib/puppet/type/dsc_xexchwaitformailboxdatabase.rb +++ /dev/null @@ -1,167 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchwaitformailboxdatabase) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchWaitForMailboxDatabase resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchWaitForMailboxDatabase/MSFT_xExchWaitForMailboxDatabase.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_identity is a required attribute') if self[:dsc_identity].nil? - end - - def dscmeta_resource_friendly_name; 'xExchWaitForMailboxDatabase' end - def dscmeta_resource_name; 'MSFT_xExchWaitForMailboxDatabase' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Identity - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_identity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Identity" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AdServerSettingsPreferredServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_adserversettingspreferredserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AdServerSettingsPreferredServer" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RetryIntervalSec - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_retryintervalsec) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "RetryIntervalSec" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RetryCount - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_retrycount) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "RetryCount" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchwaitformailboxdatabase).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xexchwebservicesvirtualdirectory.rb b/lib/puppet/type/dsc_xexchwebservicesvirtualdirectory.rb deleted file mode 100644 index 245817c2..00000000 --- a/lib/puppet/type/dsc_xexchwebservicesvirtualdirectory.rb +++ /dev/null @@ -1,273 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xexchwebservicesvirtualdirectory) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xExchWebServicesVirtualDirectory resource type. - Automatically generated from - 'xExchange/DSCResources/MSFT_xExchWebServicesVirtualDirectory/MSFT_xExchWebServicesVirtualDirectory.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_identity is a required attribute') if self[:dsc_identity].nil? - end - - def dscmeta_resource_friendly_name; 'xExchWebServicesVirtualDirectory' end - def dscmeta_resource_name; 'MSFT_xExchWebServicesVirtualDirectory' end - def dscmeta_module_name; 'xExchange' end - def dscmeta_module_version; '1.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Identity - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_identity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Identity" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: AllowServiceRestart - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowservicerestart) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowServiceRestart" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: BasicAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_basicauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "BasicAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: CertificateAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_certificateauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "CertificateAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DigestAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_digestauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DigestAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DomainController - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_domaincontroller) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainController" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ExternalUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_externalurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ExternalUrl" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InternalNLBBypassUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_internalnlbbypassurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InternalNLBBypassUrl" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InternalUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_internalurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InternalUrl" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: OAuthAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_oauthauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "OAuthAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: WindowsAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_windowsauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "WindowsAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: WSSecurityAuthentication - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_wssecurityauthentication) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "WSSecurityAuthentication" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xexchwebservicesvirtualdirectory).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xfirewall.rb b/lib/puppet/type/dsc_xfirewall.rb deleted file mode 100644 index 4ff3b514..00000000 --- a/lib/puppet/type/dsc_xfirewall.rb +++ /dev/null @@ -1,621 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xfirewall) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xFirewall resource type. - Automatically generated from - 'xNetworking/DSCResources/MSFT_xFirewall/MSFT_xFirewall.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xFirewall' end - def dscmeta_resource_name; 'MSFT_xFirewall' end - def dscmeta_module_name; 'xNetworking' end - def dscmeta_module_version; '5.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of the Firewall Rule" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DisplayName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_displayname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DisplayName - Localized, user-facing name of the Firewall Rule being created" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Group - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_group) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Group - Name of the Firewall Group where we want to put the Firewall Rule" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Ensure the presence/absence of the resource Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Enabled - # Type: string - # IsMandatory: False - # Values: ["True", "False"] - newparam(:dsc_enabled) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Enabled - Enable or disable the supplied configuration Valid values are True, False." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['True', 'true', 'False', 'false'].include?(value) - fail("Invalid value '#{value}'. Valid values are True, False") - end - end - end - - # Name: Action - # Type: string - # IsMandatory: False - # Values: ["NotConfigured", "Allow", "Block"] - newparam(:dsc_action) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Action - Allow or Block the supplied configuration Valid values are NotConfigured, Allow, Block." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['NotConfigured', 'notconfigured', 'Allow', 'allow', 'Block', 'block'].include?(value) - fail("Invalid value '#{value}'. Valid values are NotConfigured, Allow, Block") - end - end - end - - # Name: Profile - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_profile, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Profile - Specifies one or more profiles to which the rule is assigned" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Direction - # Type: string - # IsMandatory: False - # Values: ["Inbound", "Outbound"] - newparam(:dsc_direction) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Direction - Direction of the connection Valid values are Inbound, Outbound." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Inbound', 'inbound', 'Outbound', 'outbound'].include?(value) - fail("Invalid value '#{value}'. Valid values are Inbound, Outbound") - end - end - end - - # Name: RemotePort - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_remoteport, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "RemotePort - Specific Port used for filter. Specified by port number, range, or keyword" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: LocalPort - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_localport, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "LocalPort - Local Port used for the filter" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Protocol - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_protocol) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Protocol - Specific Protocol for filter. Specified by name, number, or range" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - Documentation for the Rule." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Program - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_program) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Program - Path and file name of the program for which the rule is applied" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Service - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_service) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Service - Specifies the short name of a Windows service to which the firewall rule applies" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Authentication - # Type: string - # IsMandatory: False - # Values: ["NotRequired", "Required", "NoEncap"] - newparam(:dsc_authentication) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Authentication - Specifies that authentication is required on firewall rules Valid values are NotRequired, Required, NoEncap." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['NotRequired', 'notrequired', 'Required', 'required', 'NoEncap', 'noencap'].include?(value) - fail("Invalid value '#{value}'. Valid values are NotRequired, Required, NoEncap") - end - end - end - - # Name: Encryption - # Type: string - # IsMandatory: False - # Values: ["NotRequired", "Required", "Dynamic"] - newparam(:dsc_encryption) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Encryption - Specifies that encryption in authentication is required on firewall rules Valid values are NotRequired, Required, Dynamic." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['NotRequired', 'notrequired', 'Required', 'required', 'Dynamic', 'dynamic'].include?(value) - fail("Invalid value '#{value}'. Valid values are NotRequired, Required, Dynamic") - end - end - end - - # Name: InterfaceAlias - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_interfacealias, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "InterfaceAlias - Specifies the alias of the interface that applies to the traffic" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: InterfaceType - # Type: string - # IsMandatory: False - # Values: ["Any", "Wired", "Wireless", "RemoteAccess"] - newparam(:dsc_interfacetype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InterfaceType - Specifies that only network connections made through the indicated interface types are subject to the requirements of this rule Valid values are Any, Wired, Wireless, RemoteAccess." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Any', 'any', 'Wired', 'wired', 'Wireless', 'wireless', 'RemoteAccess', 'remoteaccess'].include?(value) - fail("Invalid value '#{value}'. Valid values are Any, Wired, Wireless, RemoteAccess") - end - end - end - - # Name: LocalAddress - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_localaddress, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "LocalAddress - Specifies that network packets with matching IP addresses match this rule" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: LocalUser - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_localuser) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LocalUser - Specifies the principals to which network traffic this firewall rule applies" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Package - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_package) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Package - Specifies the Windows Store application to which the firewall rule applies" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Platform - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_platform, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Platform - Specifies which version of Windows the associated rule applies" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: RemoteAddress - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_remoteaddress, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "RemoteAddress - Specifies that network packets with matching IP addresses match this rule" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: RemoteMachine - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_remotemachine) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RemoteMachine - Specifies that matching IPsec rules of the indicated computer accounts are created" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RemoteUser - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_remoteuser) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RemoteUser - Specifies that matching IPsec rules of the indicated user accounts are created" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DynamicTransport - # Type: string - # IsMandatory: False - # Values: ["Any", "ProximityApps", "ProximitySharing", "WifiDirectPrinting", "WifiDirectDisplay", "WifiDirectDevices"] - newparam(:dsc_dynamictransport) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DynamicTransport - Specifies a dynamic transport Valid values are Any, ProximityApps, ProximitySharing, WifiDirectPrinting, WifiDirectDisplay, WifiDirectDevices." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Any', 'any', 'ProximityApps', 'proximityapps', 'ProximitySharing', 'proximitysharing', 'WifiDirectPrinting', 'wifidirectprinting', 'WifiDirectDisplay', 'wifidirectdisplay', 'WifiDirectDevices', 'wifidirectdevices'].include?(value) - fail("Invalid value '#{value}'. Valid values are Any, ProximityApps, ProximitySharing, WifiDirectPrinting, WifiDirectDisplay, WifiDirectDevices") - end - end - end - - # Name: EdgeTraversalPolicy - # Type: string - # IsMandatory: False - # Values: ["Block", "Allow", "DeferToUser", "DeferToApp"] - newparam(:dsc_edgetraversalpolicy) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EdgeTraversalPolicy - Specifies that matching firewall rules of the indicated edge traversal policy are created Valid values are Block, Allow, DeferToUser, DeferToApp." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Block', 'block', 'Allow', 'allow', 'DeferToUser', 'defertouser', 'DeferToApp', 'defertoapp'].include?(value) - fail("Invalid value '#{value}'. Valid values are Block, Allow, DeferToUser, DeferToApp") - end - end - end - - # Name: IcmpType - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_icmptype, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "IcmpType - Specifies the ICMP type codes" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: LocalOnlyMapping - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_localonlymapping) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "LocalOnlyMapping - Indicates that matching firewall rules of the indicated value are created" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: LooseSourceMapping - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_loosesourcemapping) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "LooseSourceMapping - Indicates that matching firewall rules of the indicated value are created" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: OverrideBlockRules - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_overrideblockrules) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "OverrideBlockRules - Indicates that matching network traffic that would otherwise be blocked are allowed" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Owner - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_owner) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Owner - Specifies that matching firewall rules of the indicated owner are created" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DisplayGroup - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_displaygroup) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DisplayGroup - The current value of the Display Group of the Firewall Rule" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xfirewall).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xfirewallprofile.rb b/lib/puppet/type/dsc_xfirewallprofile.rb deleted file mode 100644 index dcca82a3..00000000 --- a/lib/puppet/type/dsc_xfirewallprofile.rb +++ /dev/null @@ -1,391 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xfirewallprofile) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xFirewallProfile resource type. - Automatically generated from - 'xNetworking/DSCResources/MSFT_xFirewallProfile/MSFT_xFirewallProfile.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xFirewallProfile' end - def dscmeta_resource_name; 'MSFT_xFirewallProfile' end - def dscmeta_module_name; 'xNetworking' end - def dscmeta_module_version; '5.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: ["Domain", "Public", "Private"] - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the firewall profile to configure. Valid values are Domain, Public, Private." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Domain', 'domain', 'Public', 'public', 'Private', 'private'].include?(value) - fail("Invalid value '#{value}'. Valid values are Domain, Public, Private") - end - end - end - - # Name: AllowInboundRules - # Type: string - # IsMandatory: False - # Values: ["True", "False", "NotConfigured"] - newparam(:dsc_allowinboundrules) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AllowInboundRules - Specifies that the firewall blocks inbound traffic. Valid values are True, False, NotConfigured." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['True', 'true', 'False', 'false', 'NotConfigured', 'notconfigured'].include?(value) - fail("Invalid value '#{value}'. Valid values are True, False, NotConfigured") - end - end - end - - # Name: AllowLocalFirewallRules - # Type: string - # IsMandatory: False - # Values: ["True", "False", "NotConfigured"] - newparam(:dsc_allowlocalfirewallrules) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AllowLocalFirewallRules - Specifies that the local firewall rules should be merged into the effective policy along with Group Policy settings. Valid values are True, False, NotConfigured." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['True', 'true', 'False', 'false', 'NotConfigured', 'notconfigured'].include?(value) - fail("Invalid value '#{value}'. Valid values are True, False, NotConfigured") - end - end - end - - # Name: AllowLocalIPsecRules - # Type: string - # IsMandatory: False - # Values: ["True", "False", "NotConfigured"] - newparam(:dsc_allowlocalipsecrules) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AllowLocalIPsecRules - Specifies that the local IPsec rules should be merged into the effective policy along with Group Policy settings. Valid values are True, False, NotConfigured." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['True', 'true', 'False', 'false', 'NotConfigured', 'notconfigured'].include?(value) - fail("Invalid value '#{value}'. Valid values are True, False, NotConfigured") - end - end - end - - # Name: AllowUnicastResponseToMulticast - # Type: string - # IsMandatory: False - # Values: ["True", "False", "NotConfigured"] - newparam(:dsc_allowunicastresponsetomulticast) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AllowUnicastResponseToMulticast - Allows unicast responses to multi-cast traffic. Valid values are True, False, NotConfigured." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['True', 'true', 'False', 'false', 'NotConfigured', 'notconfigured'].include?(value) - fail("Invalid value '#{value}'. Valid values are True, False, NotConfigured") - end - end - end - - # Name: AllowUserApps - # Type: string - # IsMandatory: False - # Values: ["True", "False", "NotConfigured"] - newparam(:dsc_allowuserapps) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AllowUserApps - Specifies that traffic from local user applications is allowed through the firewall. Valid values are True, False, NotConfigured." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['True', 'true', 'False', 'false', 'NotConfigured', 'notconfigured'].include?(value) - fail("Invalid value '#{value}'. Valid values are True, False, NotConfigured") - end - end - end - - # Name: AllowUserPorts - # Type: string - # IsMandatory: False - # Values: ["True", "False", "NotConfigured"] - newparam(:dsc_allowuserports) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AllowUserPorts - Specifies that traffic is allowed through local user ports. Valid values are True, False, NotConfigured." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['True', 'true', 'False', 'false', 'NotConfigured', 'notconfigured'].include?(value) - fail("Invalid value '#{value}'. Valid values are True, False, NotConfigured") - end - end - end - - # Name: DefaultInboundAction - # Type: string - # IsMandatory: False - # Values: ["Block", "Allow", "NotConfigured"] - newparam(:dsc_defaultinboundaction) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DefaultInboundAction - Specifies how to filter inbound traffic. Valid values are Block, Allow, NotConfigured." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Block', 'block', 'Allow', 'allow', 'NotConfigured', 'notconfigured'].include?(value) - fail("Invalid value '#{value}'. Valid values are Block, Allow, NotConfigured") - end - end - end - - # Name: DefaultOutboundAction - # Type: string - # IsMandatory: False - # Values: ["Block", "Allow", "NotConfigured"] - newparam(:dsc_defaultoutboundaction) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DefaultOutboundAction - Specifies how to filter outbound traffic. Valid values are Block, Allow, NotConfigured." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Block', 'block', 'Allow', 'allow', 'NotConfigured', 'notconfigured'].include?(value) - fail("Invalid value '#{value}'. Valid values are Block, Allow, NotConfigured") - end - end - end - - # Name: DisabledInterfaceAliases - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_disabledinterfacealiases, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "DisabledInterfaceAliases - Specifies a list of interfaces on which firewall settings are excluded." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Enabled - # Type: string - # IsMandatory: False - # Values: ["True", "False", "NotConfigured"] - newparam(:dsc_enabled) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Enabled - Specifies that devolution is activated. Valid values are True, False, NotConfigured." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['True', 'true', 'False', 'false', 'NotConfigured', 'notconfigured'].include?(value) - fail("Invalid value '#{value}'. Valid values are True, False, NotConfigured") - end - end - end - - # Name: EnableStealthModeForIPsec - # Type: string - # IsMandatory: False - # Values: ["True", "False", "NotConfigured"] - newparam(:dsc_enablestealthmodeforipsec) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EnableStealthModeForIPsec - Enables stealth mode for IPsec traffic. Valid values are True, False, NotConfigured." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['True', 'true', 'False', 'false', 'NotConfigured', 'notconfigured'].include?(value) - fail("Invalid value '#{value}'. Valid values are True, False, NotConfigured") - end - end - end - - # Name: LogAllowed - # Type: string - # IsMandatory: False - # Values: ["True", "False", "NotConfigured"] - newparam(:dsc_logallowed) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogAllowed - Specifies how to log the allowed packets in the location specified by the LogFileName parameter. Valid values are True, False, NotConfigured." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['True', 'true', 'False', 'false', 'NotConfigured', 'notconfigured'].include?(value) - fail("Invalid value '#{value}'. Valid values are True, False, NotConfigured") - end - end - end - - # Name: LogBlocked - # Type: string - # IsMandatory: False - # Values: ["True", "False", "NotConfigured"] - newparam(:dsc_logblocked) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogBlocked - Specifies how to log the dropped packets in the location specified by the LogFileName parameter. Valid values are True, False, NotConfigured." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['True', 'true', 'False', 'false', 'NotConfigured', 'notconfigured'].include?(value) - fail("Invalid value '#{value}'. Valid values are True, False, NotConfigured") - end - end - end - - # Name: LogFileName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logfilename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogFileName - Specifies the path and filename of the file to which Windows Server writes log entries." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LogIgnored - # Type: string - # IsMandatory: False - # Values: ["True", "False", "NotConfigured"] - newparam(:dsc_logignored) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogIgnored - Specifies how to log the ignored packets in the location specified by the LogFileName parameter. Valid values are True, False, NotConfigured." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['True', 'true', 'False', 'false', 'NotConfigured', 'notconfigured'].include?(value) - fail("Invalid value '#{value}'. Valid values are True, False, NotConfigured") - end - end - end - - # Name: LogMaxSizeKilobytes - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_logmaxsizekilobytes) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "LogMaxSizeKilobytes - Specifies the maximum file size of the log, in kilobytes. The acceptable values for this parameter are: 1 through 32767." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: NotifyOnListen - # Type: string - # IsMandatory: False - # Values: ["True", "False", "NotConfigured"] - newparam(:dsc_notifyonlisten) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "NotifyOnListen - Allows the notification of listening for inbound connections by a service. Valid values are True, False, NotConfigured." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['True', 'true', 'False', 'false', 'NotConfigured', 'notconfigured'].include?(value) - fail("Invalid value '#{value}'. Valid values are True, False, NotConfigured") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xfirewallprofile).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xgroup.rb b/lib/puppet/type/dsc_xgroup.rb deleted file mode 100644 index 8401971a..00000000 --- a/lib/puppet/type/dsc_xgroup.rb +++ /dev/null @@ -1,190 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xgroup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xGroup resource type. - Automatically generated from - 'xPSDesiredStateConfiguration/DSCResources/MSFT_xGroupResource/MSFT_xGroupResource.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_groupname is a required attribute') if self[:dsc_groupname].nil? - end - - def dscmeta_resource_friendly_name; 'xGroup' end - def dscmeta_resource_name; 'MSFT_xGroupResource' end - def dscmeta_module_name; 'xPSDesiredStateConfiguration' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: GroupName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_groupname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "GroupName - The name of the group to create, modify, or remove." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Indicates if the group should exist or not. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - The description the group should have." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Members - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_members, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Members - The members the group should have." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: MembersToInclude - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_memberstoinclude, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "MembersToInclude - The members the group should include." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: MembersToExclude - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_memberstoexclude, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "MembersToExclude - The members the group should exclude." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - A credential to resolve non-local group members." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xgroup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xhostsfile.rb b/lib/puppet/type/dsc_xhostsfile.rb deleted file mode 100644 index 31745122..00000000 --- a/lib/puppet/type/dsc_xhostsfile.rb +++ /dev/null @@ -1,120 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xhostsfile) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xHostsFile resource type. - Automatically generated from - 'xNetworking/DSCResources/MSFT_xHostsFile/MSFT_xHostsFile.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_hostname is a required attribute') if self[:dsc_hostname].nil? - end - - def dscmeta_resource_friendly_name; 'xHostsFile' end - def dscmeta_resource_name; 'MSFT_xHostsFile' end - def dscmeta_module_name; 'xNetworking' end - def dscmeta_module_version; '5.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: HostName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_hostname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "HostName - Specifies the name of the computer that will be mapped to an IP address." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IPAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_ipaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IPAddress - Specifies the IP Address that should be mapped to the host name." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies if the hosts file entry should be created or deleted. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xhostsfile).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xhotfix.rb b/lib/puppet/type/dsc_xhotfix.rb deleted file mode 100644 index 093691de..00000000 --- a/lib/puppet/type/dsc_xhotfix.rb +++ /dev/null @@ -1,151 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xhotfix) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xHotfix resource type. - Automatically generated from - 'xWindowsUpdate/DscResources/MSFT_xWindowsUpdate/MSFT_xWindowsUpdate.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_path is a required attribute') if self[:dsc_path].nil? - end - - def dscmeta_resource_friendly_name; 'xHotfix' end - def dscmeta_resource_name; 'MSFT_xWindowsUpdate' end - def dscmeta_module_name; 'xWindowsUpdate' end - def dscmeta_module_version; '2.7.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Path - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - Specifies the path that contains the msu file for the hotfix installation." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Id - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_id) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Id - Specifies the Hotfix ID." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Log - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_log) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Log - Specifies the location of the log that contains information from the installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether the hotfix needs to be installed or uninstalled. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - Specifies the credential to use to authenticate to a UNC share if the path is on a UNC share." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xhotfix).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xiisfeaturedelegation.rb b/lib/puppet/type/dsc_xiisfeaturedelegation.rb deleted file mode 100644 index 4ad49a45..00000000 --- a/lib/puppet/type/dsc_xiisfeaturedelegation.rb +++ /dev/null @@ -1,105 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xiisfeaturedelegation) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xIisFeatureDelegation resource type. - Automatically generated from - 'xWebAdministration/DSCResources/MSFT_xIisFeatureDelegation/MSFT_xIisFeatureDelegation.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_sectionname is a required attribute') if self[:dsc_sectionname].nil? - fail('dsc_overridemode is a required attribute') if self[:dsc_overridemode].nil? - end - - def dscmeta_resource_friendly_name; 'xIisFeatureDelegation' end - def dscmeta_resource_name; 'MSFT_xIisFeatureDelegation' end - def dscmeta_module_name; 'xWebAdministration' end - def dscmeta_module_version; '1.18.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: SectionName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sectionname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SectionName" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: OverrideMode - # Type: string - # IsMandatory: True - # Values: ["Allow", "Deny"] - newparam(:dsc_overridemode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "OverrideMode - Valid values are Allow, Deny." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Allow', 'allow', 'Deny', 'deny'].include?(value) - fail("Invalid value '#{value}'. Valid values are Allow, Deny") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xiisfeaturedelegation).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xiishandler.rb b/lib/puppet/type/dsc_xiishandler.rb deleted file mode 100644 index 8e6fbcf7..00000000 --- a/lib/puppet/type/dsc_xiishandler.rb +++ /dev/null @@ -1,105 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xiishandler) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xIisHandler resource type. - Automatically generated from - 'xWebAdministration/DSCResources/MSFT_xIIsHandler/MSFT_xIisHandler.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xIisHandler' end - def dscmeta_resource_name; 'MSFT_xIisHandler' end - def dscmeta_module_name; 'xWebAdministration' end - def dscmeta_module_version; '1.18.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xiishandler).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xiislogging.rb b/lib/puppet/type/dsc_xiislogging.rb deleted file mode 100644 index 57b63853..00000000 --- a/lib/puppet/type/dsc_xiislogging.rb +++ /dev/null @@ -1,180 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xiislogging) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xIisLogging resource type. - Automatically generated from - 'xWebAdministration/DSCResources/MSFT_xIisLogging/MSFT_xIisLogging.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_logpath is a required attribute') if self[:dsc_logpath].nil? - end - - def dscmeta_resource_friendly_name; 'xIisLogging' end - def dscmeta_resource_name; 'MSFT_xIisLogging' end - def dscmeta_module_name; 'xWebAdministration' end - def dscmeta_module_version; '1.18.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: LogPath - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_logpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogPath - The directory to be used for logfiles" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LogFlags - # Type: string[] - # IsMandatory: False - # Values: ["Date", "Time", "ClientIP", "UserName", "SiteName", "ComputerName", "ServerIP", "Method", "UriStem", "UriQuery", "HttpStatus", "Win32Status", "BytesSent", "BytesRecv", "TimeTaken", "ServerPort", "UserAgent", "Cookie", "Referer", "ProtocolVersion", "Host", "HttpSubStatus"] - newparam(:dsc_logflags, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "LogFlags - The W3C logging fields Valid values are Date, Time, ClientIP, UserName, SiteName, ComputerName, ServerIP, Method, UriStem, UriQuery, HttpStatus, Win32Status, BytesSent, BytesRecv, TimeTaken, ServerPort, UserAgent, Cookie, Referer, ProtocolVersion, Host, HttpSubStatus." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - if value.kind_of?(Array) - unless (['Date', 'date', 'Time', 'time', 'ClientIP', 'clientip', 'UserName', 'username', 'SiteName', 'sitename', 'ComputerName', 'computername', 'ServerIP', 'serverip', 'Method', 'method', 'UriStem', 'uristem', 'UriQuery', 'uriquery', 'HttpStatus', 'httpstatus', 'Win32Status', 'win32status', 'BytesSent', 'bytessent', 'BytesRecv', 'bytesrecv', 'TimeTaken', 'timetaken', 'ServerPort', 'serverport', 'UserAgent', 'useragent', 'Cookie', 'cookie', 'Referer', 'referer', 'ProtocolVersion', 'protocolversion', 'Host', 'host', 'HttpSubStatus', 'httpsubstatus'] & value).count == value.count - fail("Invalid value #{value}. Valid values are Date, Time, ClientIP, UserName, SiteName, ComputerName, ServerIP, Method, UriStem, UriQuery, HttpStatus, Win32Status, BytesSent, BytesRecv, TimeTaken, ServerPort, UserAgent, Cookie, Referer, ProtocolVersion, Host, HttpSubStatus") - end - end - if value.kind_of?(String) - unless ['Date', 'date', 'Time', 'time', 'ClientIP', 'clientip', 'UserName', 'username', 'SiteName', 'sitename', 'ComputerName', 'computername', 'ServerIP', 'serverip', 'Method', 'method', 'UriStem', 'uristem', 'UriQuery', 'uriquery', 'HttpStatus', 'httpstatus', 'Win32Status', 'win32status', 'BytesSent', 'bytessent', 'BytesRecv', 'bytesrecv', 'TimeTaken', 'timetaken', 'ServerPort', 'serverport', 'UserAgent', 'useragent', 'Cookie', 'cookie', 'Referer', 'referer', 'ProtocolVersion', 'protocolversion', 'Host', 'host', 'HttpSubStatus', 'httpsubstatus'].include?(value) - fail("Invalid value #{value}. Valid values are Date, Time, ClientIP, UserName, SiteName, ComputerName, ServerIP, Method, UriStem, UriQuery, HttpStatus, Win32Status, BytesSent, BytesRecv, TimeTaken, ServerPort, UserAgent, Cookie, Referer, ProtocolVersion, Host, HttpSubStatus") - end - end - end - munge do |value| - Array(value) - end - end - - # Name: LogPeriod - # Type: string - # IsMandatory: False - # Values: ["Hourly", "Daily", "Weekly", "Monthly", "MaxSize"] - newparam(:dsc_logperiod) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogPeriod - How often the log file should rollover Valid values are Hourly, Daily, Weekly, Monthly, MaxSize." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Hourly', 'hourly', 'Daily', 'daily', 'Weekly', 'weekly', 'Monthly', 'monthly', 'MaxSize', 'maxsize'].include?(value) - fail("Invalid value '#{value}'. Valid values are Hourly, Daily, Weekly, Monthly, MaxSize") - end - end - end - - # Name: LogTruncateSize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logtruncatesize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogTruncateSize - How large the file should be before it is truncated" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LoglocalTimeRollover - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_loglocaltimerollover) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "LoglocalTimeRollover - Use the localtime for file naming and rollover" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: LogFormat - # Type: string - # IsMandatory: False - # Values: ["IIS", "W3C", "NCSA"] - newparam(:dsc_logformat) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogFormat - Format of the Logfiles. Only W3C supports LogFlags Valid values are IIS, W3C, NCSA." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['IIS', 'iis', 'W3C', 'w3c', 'NCSA', 'ncsa'].include?(value) - fail("Invalid value '#{value}'. Valid values are IIS, W3C, NCSA") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xiislogging).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xiismimetypemapping.rb b/lib/puppet/type/dsc_xiismimetypemapping.rb deleted file mode 100644 index efebfe98..00000000 --- a/lib/puppet/type/dsc_xiismimetypemapping.rb +++ /dev/null @@ -1,122 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xiismimetypemapping) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xIisMimeTypeMapping resource type. - Automatically generated from - 'xWebAdministration/DSCResources/MSFT_xIisMimeTypeMapping/MSFT_xIisMimeTypeMapping.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_extension is a required attribute') if self[:dsc_extension].nil? - fail('dsc_mimetype is a required attribute') if self[:dsc_mimetype].nil? - end - - def dscmeta_resource_friendly_name; 'xIisMimeTypeMapping' end - def dscmeta_resource_name; 'MSFT_xIisMimeTypeMapping' end - def dscmeta_module_name; 'xWebAdministration' end - def dscmeta_module_version; '1.18.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Extension - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_extension) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Extension" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MimeType - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_mimetype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MimeType" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xiismimetypemapping).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xiismodule.rb b/lib/puppet/type/dsc_xiismodule.rb deleted file mode 100644 index da682695..00000000 --- a/lib/puppet/type/dsc_xiismodule.rb +++ /dev/null @@ -1,202 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xiismodule) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xIisModule resource type. - Automatically generated from - 'xWebAdministration/DSCResources/MSFT_xIisModule/MSFT_xIisModule.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_path is a required attribute') if self[:dsc_path].nil? - end - - def dscmeta_resource_friendly_name; 'xIisModule' end - def dscmeta_resource_name; 'MSFT_xIisModule' end - def dscmeta_module_name; 'xWebAdministration' end - def dscmeta_module_version; '1.18.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Path - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - The path to the module, usually a dll, to be added to IIS." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The logical name of the module to add to IIS." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RequestPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_requestpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RequestPath - The allowed request Path example: *.php" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Verb - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_verb, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Verb - The supported verbs for the module." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: SiteName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sitename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SiteName - The IIS Site to register the module." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Should the module be present or absent. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: ModuleType - # Type: string - # IsMandatory: False - # Values: ["FastCgiModule"] - newparam(:dsc_moduletype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ModuleType - The type of the module. Valid values are FastCgiModule." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['FastCgiModule', 'fastcgimodule'].include?(value) - fail("Invalid value '#{value}'. Valid values are FastCgiModule") - end - end - end - - # Name: EndPointSetup - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_endpointsetup) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "EndPointSetup - The End Point is setup. Such as a Fast Cgi endpoint." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xiismodule).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xinternetexplorerhomepage.rb b/lib/puppet/type/dsc_xinternetexplorerhomepage.rb deleted file mode 100644 index 2cbe284c..00000000 --- a/lib/puppet/type/dsc_xinternetexplorerhomepage.rb +++ /dev/null @@ -1,120 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xinternetexplorerhomepage) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xInternetExplorerHomePage resource type. - Automatically generated from - 'xInternetExplorerHomePage/DSCResources/xInternetExplorerHomePage/xInternetExplorerHomePage.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_startpage is a required attribute') if self[:dsc_startpage].nil? - end - - def dscmeta_resource_friendly_name; 'xInternetExplorerHomePage' end - def dscmeta_resource_name; 'xInternetExplorerHomePage' end - def dscmeta_module_name; 'xInternetExplorerHomePage' end - def dscmeta_module_version; '1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: StartPage - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_startpage) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "StartPage - Specifies the URL for the home page of Internet Explorer." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SecondaryStartPages - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_secondarystartpages) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SecondaryStartPages - Specifies the URL for the secondary home pages of Internet Explorer." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Should the IE home page is configured or unconfigured. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xinternetexplorerhomepage).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xipaddress.rb b/lib/puppet/type/dsc_xipaddress.rb deleted file mode 100644 index 3daa0c5a..00000000 --- a/lib/puppet/type/dsc_xipaddress.rb +++ /dev/null @@ -1,123 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xipaddress) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xIPAddress resource type. - Automatically generated from - 'xNetworking/DSCResources/MSFT_xIPAddress/MSFT_xIPAddress.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_interfacealias is a required attribute') if self[:dsc_interfacealias].nil? - fail('dsc_addressfamily is a required attribute') if self[:dsc_addressfamily].nil? - end - - def dscmeta_resource_friendly_name; 'xIPAddress' end - def dscmeta_resource_name; 'MSFT_xIPAddress' end - def dscmeta_module_name; 'xNetworking' end - def dscmeta_module_version; '5.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: IPAddress - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_ipaddress, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "IPAddress - The desired IP address, optionally including prefix length using CIDR notation." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: InterfaceAlias - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_interfacealias) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InterfaceAlias - Alias of the network interface for which the IP address should be set." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AddressFamily - # Type: string - # IsMandatory: True - # Values: ["IPv4", "IPv6"] - newparam(:dsc_addressfamily) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AddressFamily - IP address family. Valid values are IPv4, IPv6." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['IPv4', 'ipv4', 'IPv6', 'ipv6'].include?(value) - fail("Invalid value '#{value}'. Valid values are IPv4, IPv6") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xipaddress).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xjeaendpoint.rb b/lib/puppet/type/dsc_xjeaendpoint.rb deleted file mode 100644 index b6d2ad4c..00000000 --- a/lib/puppet/type/dsc_xjeaendpoint.rb +++ /dev/null @@ -1,172 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xjeaendpoint) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xJeaEndPoint resource type. - Automatically generated from - 'xJea/DSCResources/MSFT_xJeaEndpoint/MSFT_xJeaEndpoint.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xJeaEndPoint' end - def dscmeta_resource_name; 'MSFT_xJeaEndpoint' end - def dscmeta_module_name; 'xJea' end - def dscmeta_module_version; '0.3.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of the JEA toolkit to be generated" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Toolkit - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_toolkit, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Toolkit - List of Jea Toolkits to make available via this endpoint" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: SecurityDescriptorSddl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_securitydescriptorsddl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SecurityDescriptorSddl - Sddl to define who can access this JeaEndpoint" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Group - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_group, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Group - List of local groups that this Endpoints JeaSessionAccount should be a member of" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: CleanAll - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_cleanall) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "CleanAll" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xjeaendpoint).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xjeatoolkit.rb b/lib/puppet/type/dsc_xjeatoolkit.rb deleted file mode 100644 index 7034999a..00000000 --- a/lib/puppet/type/dsc_xjeatoolkit.rb +++ /dev/null @@ -1,156 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xjeatoolkit) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xJeaToolKit resource type. - Automatically generated from - 'xJea/DSCResources/MSFT_xJeaToolkit/MSFT_xJeaToolkit.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xJeaToolKit' end - def dscmeta_resource_name; 'MSFT_xJeaToolkit' end - def dscmeta_module_name; 'xJea' end - def dscmeta_module_version; '0.3.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of the JEA toolkit to be generated" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CommandSpecs - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_commandspecs) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CommandSpecs - CSV formated list of command specifications" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ScriptDirectory - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_scriptdirectory, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ScriptDirectory - array of script directories that can be run" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Applications - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_applications, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Applications - Array of executables that are allowed to run" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xjeatoolkit).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xmicrosoftupdate.rb b/lib/puppet/type/dsc_xmicrosoftupdate.rb deleted file mode 100644 index ba1e6b32..00000000 --- a/lib/puppet/type/dsc_xmicrosoftupdate.rb +++ /dev/null @@ -1,90 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xmicrosoftupdate) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xMicrosoftUpdate resource type. - Automatically generated from - 'xWindowsUpdate/DscResources/MSFT_xMicrosoftUpdate/MSFT_xMicrosoftUpdate.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xMicrosoftUpdate' end - def dscmeta_resource_name; 'MSFT_xMicrosoftUpdate' end - def dscmeta_module_name; 'xWindowsUpdate' end - def dscmeta_module_version; '2.7.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Indicates that the Microsoft Update is enabled or is disabled. Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xmicrosoftupdate).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xmountimage.rb b/lib/puppet/type/dsc_xmountimage.rb deleted file mode 100644 index 899480b8..00000000 --- a/lib/puppet/type/dsc_xmountimage.rb +++ /dev/null @@ -1,156 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xmountimage) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xMountImage resource type. - Automatically generated from - 'xStorage/DSCResources/MSFT_xMountImage/MSFT_xMountImage.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_imagepath is a required attribute') if self[:dsc_imagepath].nil? - end - - def dscmeta_resource_friendly_name; 'xMountImage' end - def dscmeta_resource_name; 'MSFT_xMountImage' end - def dscmeta_module_name; 'xStorage' end - def dscmeta_module_version; '3.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ImagePath - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_imagepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ImagePath - Specifies the path of the VHD or ISO file." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DriveLetter - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_driveletter) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DriveLetter - Specifies the drive letter to mount this VHD or ISO to." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: StorageType - # Type: string - # IsMandatory: False - # Values: ["ISO", "VHD", "VHDx", "VHDSet"] - newparam(:dsc_storagetype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "StorageType - Specifies the storage type of a file. If the StorageType parameter is not specified, then the storage type is determined by file extension. Valid values are ISO, VHD, VHDx, VHDSet." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['ISO', 'iso', 'VHD', 'vhd', 'VHDx', 'vhdx', 'VHDSet', 'vhdset'].include?(value) - fail("Invalid value '#{value}'. Valid values are ISO, VHD, VHDx, VHDSet") - end - end - end - - # Name: Access - # Type: string - # IsMandatory: False - # Values: ["ReadOnly", "ReadWrite"] - newparam(:dsc_access) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Access - Allows a VHD file to be mounted in read-only or read-write mode. ISO files are mounted in read-only mode regardless of what parameter value you provide. Valid values are ReadOnly, ReadWrite." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['ReadOnly', 'readonly', 'ReadWrite', 'readwrite'].include?(value) - fail("Invalid value '#{value}'. Valid values are ReadOnly, ReadWrite") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Determines whether the VHD or ISO should be mounted or not. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xmountimage).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xmppreference.rb b/lib/puppet/type/dsc_xmppreference.rb deleted file mode 100644 index 71f113b1..00000000 --- a/lib/puppet/type/dsc_xmppreference.rb +++ /dev/null @@ -1,981 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xmppreference) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xMpPreference resource type. - Automatically generated from - 'xDefender/DSCResources/MSFT_xMpPreference/MSFT_xMpPreference.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xMpPreference' end - def dscmeta_resource_name; 'MSFT_xMpPreference' end - def dscmeta_module_name; 'xDefender' end - def dscmeta_module_version; '0.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Provide the text string to uniquely identify this group of settings" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ExclusionPath - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_exclusionpath, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ExclusionPath - Specifies an array of file paths to exclude from scheduled and real-time scanning. You can specify a folder to exclude all the files under the folder." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ExclusionExtension - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_exclusionextension, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ExclusionExtension - Specifies an array of file name extensions, such as obj or lib, to exclude from scheduled, custom, and real-time scanning." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ExclusionProcess - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_exclusionprocess, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ExclusionProcess - Specifies an array of processes, as paths to process images. The cmdlet excludes any files opened by the processes that you specify from scheduled and real-time scanning. Specifying this parameter excludes files opened by executable programs only. The cmdlet does not exclude the processes themselves. To exclude a process, specify it by using the ExclusionPath parameter." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: RealTimeScanDirection - # Type: string - # IsMandatory: False - # Values: ["Both", "Incoming", "Outgoing"] - newparam(:dsc_realtimescandirection) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RealTimeScanDirection - Specifies scanning configuration for incoming and outgoing files on NTFS volumes. Specify a value for this parameter to enhance performance on servers which have a large number of file transfers, but need scanning for either incoming or outgoing files. Evaluate this configuration based on the server role. For non-NTFS volumes, Windows Defender performs full monitoring of file and program activity. Valid values are Both, Incoming, Outgoing." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Both', 'both', 'Incoming', 'incoming', 'Outgoing', 'outgoing'].include?(value) - fail("Invalid value '#{value}'. Valid values are Both, Incoming, Outgoing") - end - end - end - - # Name: QuarantinePurgeItemsAfterDelay - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_quarantinepurgeitemsafterdelay) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "QuarantinePurgeItemsAfterDelay - Specifies the number of days to keep items in the Quarantine folder. If you specify a value of zero or do not specify a value for this parameter, items stay in the Quarantine folder indefinitely." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RemediationScheduleDay - # Type: string - # IsMandatory: False - # Values: ["Everyday", "Never", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] - newparam(:dsc_remediationscheduleday) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RemediationScheduleDay - Specifies the day of the week on which to perform a scheduled full scan in order to complete remediation. Alternatively, specify everyday for this full scan or never. The default value is Never. If you specify a value of Never or do not specify a value, Windows Defender performs a scheduled full scan to complete remediation by using a default frequency. Valid values are Everyday, Never, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Everyday', 'everyday', 'Never', 'never', 'Monday', 'monday', 'Tuesday', 'tuesday', 'Wednesday', 'wednesday', 'Thursday', 'thursday', 'Friday', 'friday', 'Saturday', 'saturday', 'Sunday', 'sunday'].include?(value) - fail("Invalid value '#{value}'. Valid values are Everyday, Never, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday") - end - end - end - - # Name: RemediationScheduleTime - # Type: datetime - # IsMandatory: False - # Values: None - newparam(:dsc_remediationscheduletime) do - def mof_type; 'datetime' end - def mof_is_embedded?; false end - desc "RemediationScheduleTime - Specifies the time of day, as the number of minutes after midnight, to perform a scheduled scan. The time refers to the local time on the computer. If you do not specify a value for this parameter, a scheduled scan runs at the default time of two hours after midnight." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ReportingAdditionalActionTimeOut - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_reportingadditionalactiontimeout) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "ReportingAdditionalActionTimeOut - Specifies the number of minutes before a detection in the additional action state changes to the cleared state." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ReportingNonCriticalTimeOut - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_reportingnoncriticaltimeout) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "ReportingNonCriticalTimeOut - Specifies the number of minutes before a detection in the non-critically failed state changes to the cleared state." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ReportingCriticalFailureTimeOut - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_reportingcriticalfailuretimeout) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "ReportingCriticalFailureTimeOut - Specifies the number of minutes before a detection in the critically failed state changes to either the additional action state or the cleared state." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ScanAvgCPULoadFactor - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_scanavgcpuloadfactor) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "ScanAvgCPULoadFactor - Specifies the maxium percentage CPU usage for a scan. The acceptable values for this parameter are: integers from 5 through 100, and the value 0, which disables CPU throttling. Windows Defender does not exceed the percentage of CPU usage that you specify. The default value is 50." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: CheckForSignaturesBeforeRunningScan - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_checkforsignaturesbeforerunningscan) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "CheckForSignaturesBeforeRunningScan - Indicates whether to check for new virus and spyware definitions before Windows Defender runs a scan. If you specify a value of $True, Windows Defender checks for new definitions. If you specify $False or do not specify a value, the scan begins with existing definitions. This value applies to scheduled scans and to scans that you start from the command line, but it does not affect scans that you start from the user interface." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ScanPurgeItemsAfterDelay - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_scanpurgeitemsafterdelay) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "ScanPurgeItemsAfterDelay - Specifies the number of days to keep items in the scan history folder. After this time, Windows Defender removes the items. If you specify a value of zero, Windows Defender does not remove items. If you do not specify a value, Windows Defender removes items from the scan history folder after the default length of time, which is 30 days." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ScanOnlyIfIdleEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_scanonlyifidleenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ScanOnlyIfIdleEnabled - Indicates whether to start scheduled scans only when the computer is not in use. If you specify a value of $True or do not specify a value, Windows Defender runs schedules scans when the computer is on, but not in use." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ScanParameters - # Type: string - # IsMandatory: False - # Values: ["FullSCan", "QuickScan"] - newparam(:dsc_scanparameters) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ScanParameters - Specifies the scan type to use during a scheduled scan. If you do not specify this parameter, Windows Defender uses the default value of quick scan. Valid values are FullSCan, QuickScan." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['FullSCan', 'fullscan', 'QuickScan', 'quickscan'].include?(value) - fail("Invalid value '#{value}'. Valid values are FullSCan, QuickScan") - end - end - end - - # Name: ScanScheduleDay - # Type: string - # IsMandatory: False - # Values: ["Everyday", "Never", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] - newparam(:dsc_scanscheduleday) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ScanScheduleDay - Specifies the day of the week on which to perform a scheduled scan. Alternatively, specify everyday for a scheduled scan or never. If you specify a value of Never or do not specify a value, Windows Defender performs a scheduled scan by using a default frequency. Valid values are Everyday, Never, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Everyday', 'everyday', 'Never', 'never', 'Monday', 'monday', 'Tuesday', 'tuesday', 'Wednesday', 'wednesday', 'Thursday', 'thursday', 'Friday', 'friday', 'Saturday', 'saturday', 'Sunday', 'sunday'].include?(value) - fail("Invalid value '#{value}'. Valid values are Everyday, Never, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday") - end - end - end - - # Name: ScanScheduleQuickScanTime - # Type: datetime - # IsMandatory: False - # Values: None - newparam(:dsc_scanschedulequickscantime) do - def mof_type; 'datetime' end - def mof_is_embedded?; false end - desc "ScanScheduleQuickScanTime - Specifies the time of day, as the number of minutes after midnight, to perform a scheduled quick scan. The time refers to the local time on the computer. If you do not specify a value for this parameter, a scheduled quick scan runs at the time specified by the ScanScheduleTime parameter. That parameter has a default time of two hours after midnight." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ScanScheduleTime - # Type: datetime - # IsMandatory: False - # Values: None - newparam(:dsc_scanscheduletime) do - def mof_type; 'datetime' end - def mof_is_embedded?; false end - desc "ScanScheduleTime - Specifies the time of day, as the number of minutes after midnight, to perform a scheduled scan. The time refers to the local time on the computer. If you do not specify a value for this parameter, a scheduled scan runs at a default time of two hours after midnight." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SignatureFirstAuGracePeriod - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_signaturefirstaugraceperiod) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "SignatureFirstAuGracePeriod - Specifies a grace period, in minutes, for the definition. If a definition successfully updates within this period, Windows Defender abandons any service initiated updates. This parameter overrides the value of the CheckForSignaturesBeforeRunningScan parameter." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: SignatureAuGracePeriod - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_signatureaugraceperiod) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "SignatureAuGracePeriod - Specifies a grace period, in minutes, for the definition. If a definition successfully updates within this period, Windows Defender abandons any service initiated updates." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: SignatureDefinitionUpdateFileSharesSources - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_signaturedefinitionupdatefilesharessources) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SignatureDefinitionUpdateFileSharesSources - Specifies file-share sources for definition updates. Specify sources as a bracketed sequence of Universal Naming Convention (UNC) locations, separated by the pipeline symbol. If you specify a value for this parameter, Windows Defender attempts to connect to the shares in the order that you specify. After Windows Defender updates a definition, it stops attempting to connect to shares on the list. If you do not specify a value for this parameter, the list is empty." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SignatureDisableUpdateOnStartupWithoutEngine - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_signaturedisableupdateonstartupwithoutengine) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SignatureDisableUpdateOnStartupWithoutEngine - Indicates whether to initiate definition updates even if no antimalware engine is present. If you specify a value of $True or do not specify a value, Windows Defender initiates definition updates on startup. If you specify a value of $False, and if no antimalware engine is present, Windows Defender does not initiate definition updates on startup." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: SignatureFallbackOrder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_signaturefallbackorder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SignatureFallbackOrder - Specifies the order in which to contact different definition update sources. Specify the types of update sources in the order in which you want Windows Defender to contact them, enclosed in braces and separated by the pipeline symbol." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SignatureScheduleDay - # Type: string - # IsMandatory: False - # Values: ["Everyday", "Never", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] - newparam(:dsc_signaturescheduleday) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SignatureScheduleDay - Specifies the day of the week on which to check for definition updates. Alternatively, specify everyday for a scheduled scan or never. If you specify a value of Never or do not specify a value, Windows Defender checks for definition updates by using a default frequency. Valid values are Everyday, Never, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Everyday', 'everyday', 'Never', 'never', 'Monday', 'monday', 'Tuesday', 'tuesday', 'Wednesday', 'wednesday', 'Thursday', 'thursday', 'Friday', 'friday', 'Saturday', 'saturday', 'Sunday', 'sunday'].include?(value) - fail("Invalid value '#{value}'. Valid values are Everyday, Never, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday") - end - end - end - - # Name: SignatureScheduleTime - # Type: datetime - # IsMandatory: False - # Values: None - newparam(:dsc_signaturescheduletime) do - def mof_type; 'datetime' end - def mof_is_embedded?; false end - desc "SignatureScheduleTime - Specifies the time of day, as the number of minutes after midnight, to check for definition updates. The time refers to the local time on the computer. If you do not specify a value for this parameter, Windows Defender checks for definition updates at the default time of 15 minutes before the scheduled scan time." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SignatureUpdateCatchupInterval - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_signatureupdatecatchupinterval) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "SignatureUpdateCatchupInterval - Specifies the number of days after which Windows Defender requires a catch-up definition update. If you do not specify a value for this parameter, Windows Defender requires a catch-up definition update after the default value of one day." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: SignatureUpdateInterval - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_signatureupdateinterval) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "SignatureUpdateInterval - Specifies the interval, in hours, at which to check for definition updates. The acceptable values for this parameter are: integers from 1 through 24. If you do not specify a value for this parameter, Windows Defender checks at the default interval. You can use this parameter instead of the SignatureScheduleDay parameter and SignatureScheduleTime parameter. " - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MAPSReporting - # Type: string - # IsMandatory: False - # Values: ["Advanced", "Basic", "Disabled"] - newparam(:dsc_mapsreporting) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MAPSReporting - Specifies the type of membership in Microsoft Active Protection Service. Microsoft Active Protection Service is an online community that helps you choose how to respond to potential threats. The community also helps prevent the spread of new malicious software. If you join this community, you can choose to automatically send basic or additional information about detected software. Additional information helps Microsoft create new definitions. In some instances, personal information might unintentionally be sent to Microsoft. However, Microsoft will not use this information to identify you or contact you. Valid values are Advanced, Basic, Disabled." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Advanced', 'advanced', 'Basic', 'basic', 'Disabled', 'disabled'].include?(value) - fail("Invalid value '#{value}'. Valid values are Advanced, Basic, Disabled") - end - end - end - - # Name: DisablePrivacyMode - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disableprivacymode) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DisablePrivacyMode - Indicates whether to disable privacy mode. Privacy mode prevents users, other than administrators, from displaying threat history." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: RandomizeScheduleTaskTimes - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_randomizescheduletasktimes) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RandomizeScheduleTaskTimes - Indicates whether to select a random time for the scheduled start and scheduled update for definitions. If you specify a value of $True or do not specify a value, scheduled tasks begin within 30 minutes, before or after, the scheduled time. If you randomize the start times, it can distribute the impact of scanning. For example, if several virtual machines share the same host, randomized start times prevents all the hosts from starting the scheduled tasks at the same time." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DisableBehaviorMonitoring - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disablebehaviormonitoring) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DisableBehaviorMonitoring - Indicates whether to enable behavior monitoring. If you specify a value of $True or do not specify a value, Windows Defender enables behavior monitoring" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DisableIntrusionPreventionSystem - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disableintrusionpreventionsystem) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DisableIntrusionPreventionSystem - Indicates whether to configure network protection against exploitation of known vulnerabilities. If you specify a value of $True or do not specify a value, network protection is enabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DisableIOAVProtection - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disableioavprotection) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DisableIOAVProtection - Indicates whether Windows Defender scans all downloaded files and attachments. If you specify a value of $True or do not specify a value, scanning downloaded files and attachments is enabled. " - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DisableRealtimeMonitoring - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disablerealtimemonitoring) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DisableRealtimeMonitoring - Indicates whether to use real-time protection. If you specify a value of $True or do not specify a value, Windows Defender uses real-time protection. We recommend that you enable Windows Defender to use real-time protection." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DisableScriptScanning - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disablescriptscanning) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DisableScriptScanning - Specifies whether to disable the scanning of scripts during malware scans." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DisableArchiveScanning - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disablearchivescanning) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DisableArchiveScanning - Indicates whether to scan archive files, such as .zip and .cab files, for malicious and unwanted software. If you specify a value of $True or do not specify a value, Windows Defender scans archive files." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DisableAutoExclusions - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disableautoexclusions) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DisableAutoExclusions - Indicates whether to disable the Automatic Exclusions feature for the server." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DisableCatchupFullScan - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disablecatchupfullscan) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DisableCatchupFullScan - Indicates whether Windows Defender runs catch-up scans for scheduled full scans. A computer can miss a scheduled scan, usually because the computer is turned off at the scheduled time. If you specify a value of $True, after the computer misses two scheduled full scans, Windows Defender runs a catch-up scan the next time someone logs on to the computer. If you specify a value of $False or do not specify a value, the computer does not run catch-up scans for scheduled full scans." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DisableCatchupQuickScan - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disablecatchupquickscan) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DisableCatchupQuickScan - Indicates whether Windows Defender runs catch-up scans for scheduled quick scans. A computer can miss a scheduled scan, usually because the computer is off at the scheduled time. If you specify a value of $True, after the computer misses two scheduled quick scans, Windows Defender runs a catch-up scan the next time someone logs onto the computer. If you specify a value of $False or do not specify a value, the computer does not run catch-up scans for scheduled quick scans. " - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DisableEmailScanning - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disableemailscanning) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DisableEmailScanning - Indicates whether Windows Defender parses the mailbox and mail files, according to their specific format, in order to analyze mail bodies and attachments. Windows Defender supports several formats, including .pst, .dbx, .mbx, .mime, and .binhex. If you specify a value of $True, Windows Defender performs email scanning. If you specify a value of $False or do not specify a value, Windows Defender does not perform email scanning. " - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DisableRemovableDriveScanning - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disableremovabledrivescanning) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DisableRemovableDriveScanning - Indicates whether to scan for malicious and unwanted software in removable drives, such as flash drives, during a full scan. If you specify a value of $True, Windows Defender scans removable drives during any type of scan. If you specify a value of $False or do not specify a value, Windows Defender does not scan removable drives during a full scan. Windows Defender can still scan removable drives during quick scans or custom scans." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DisableRestorePoint - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disablerestorepoint) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DisableRestorePoint - Indicates whether to disable scanning of restore points." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DisableScanningMappedNetworkDrivesForFullScan - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disablescanningmappednetworkdrivesforfullscan) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DisableScanningMappedNetworkDrivesForFullScan - Indicates whether to scan mapped network drives. If you specify a value of $True, Windows Defender scans mapped network drives. If you specify a value of $False or do not specify a value, Windows Defender does not scan mapped network drives." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DisableScanningNetworkFiles - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disablescanningnetworkfiles) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DisableScanningNetworkFiles - Indicates whether to scan for network files. If you specify a value of $True, Windows Defender scans network files. If you specify a value of $False or do not specify a value, Windows Defender does not scan network files. We do not recommend that you scan network files." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: UILockdown - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_uilockdown) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UILockdown - Indicates whether to disable UI lockdown mode. If you specify a value of $True, Windows Defender disables UI lockdown mode. If you specify $False or do not specify a value, UI lockdown mode is enabled." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ThreatIDDefaultAction_Ids - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_threatiddefaultaction_ids) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "ThreatIDDefaultAction_Ids - Specifies an array of the actions to take for the IDs specified by using the ThreatIDDefaultAction_Ids parameter." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ThreatIDDefaultAction_Actions - # Type: string - # IsMandatory: False - # Values: ["Allow", "Block", "Clean", "NoAction", "Quarantine", "Remove", "UserDefined"] - newparam(:dsc_threatiddefaultaction_actions) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ThreatIDDefaultAction_Actions - Specifies which automatic remediation action to take for an unknonwn level threat. Valid values are Allow, Block, Clean, NoAction, Quarantine, Remove, UserDefined." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Allow', 'allow', 'Block', 'block', 'Clean', 'clean', 'NoAction', 'noaction', 'Quarantine', 'quarantine', 'Remove', 'remove', 'UserDefined', 'userdefined'].include?(value) - fail("Invalid value '#{value}'. Valid values are Allow, Block, Clean, NoAction, Quarantine, Remove, UserDefined") - end - end - end - - # Name: UnknownThreatDefaultAction - # Type: string - # IsMandatory: False - # Values: ["Allow", "Block", "Clean", "NoAction", "Quarantine", "Remove", "UserDefined"] - newparam(:dsc_unknownthreatdefaultaction) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UnknownThreatDefaultAction - Specifies which automatic remediation action to take for a low level threat. Valid values are Allow, Block, Clean, NoAction, Quarantine, Remove, UserDefined." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Allow', 'allow', 'Block', 'block', 'Clean', 'clean', 'NoAction', 'noaction', 'Quarantine', 'quarantine', 'Remove', 'remove', 'UserDefined', 'userdefined'].include?(value) - fail("Invalid value '#{value}'. Valid values are Allow, Block, Clean, NoAction, Quarantine, Remove, UserDefined") - end - end - end - - # Name: LowThreatDefaultAction - # Type: string - # IsMandatory: False - # Values: ["Allow", "Block", "Clean", "NoAction", "Quarantine", "Remove", "UserDefined"] - newparam(:dsc_lowthreatdefaultaction) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LowThreatDefaultAction - Specifies which automatic remediation action to take for a low level threat. Valid values are Allow, Block, Clean, NoAction, Quarantine, Remove, UserDefined." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Allow', 'allow', 'Block', 'block', 'Clean', 'clean', 'NoAction', 'noaction', 'Quarantine', 'quarantine', 'Remove', 'remove', 'UserDefined', 'userdefined'].include?(value) - fail("Invalid value '#{value}'. Valid values are Allow, Block, Clean, NoAction, Quarantine, Remove, UserDefined") - end - end - end - - # Name: ModerateThreatDefaultAction - # Type: string - # IsMandatory: False - # Values: ["Allow", "Block", "Clean", "NoAction", "Quarantine", "Remove", "UserDefined"] - newparam(:dsc_moderatethreatdefaultaction) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ModerateThreatDefaultAction - Specifies which automatic remediation action to take for a moderate level threat. Valid values are Allow, Block, Clean, NoAction, Quarantine, Remove, UserDefined." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Allow', 'allow', 'Block', 'block', 'Clean', 'clean', 'NoAction', 'noaction', 'Quarantine', 'quarantine', 'Remove', 'remove', 'UserDefined', 'userdefined'].include?(value) - fail("Invalid value '#{value}'. Valid values are Allow, Block, Clean, NoAction, Quarantine, Remove, UserDefined") - end - end - end - - # Name: HighThreatDefaultAction - # Type: string - # IsMandatory: False - # Values: ["Allow", "Block", "Clean", "NoAction", "Quarantine", "Remove", "UserDefined"] - newparam(:dsc_highthreatdefaultaction) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "HighThreatDefaultAction - Specifies which automatic remediation action to take for a high level threat. Valid values are Allow, Block, Clean, NoAction, Quarantine, Remove, UserDefined." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Allow', 'allow', 'Block', 'block', 'Clean', 'clean', 'NoAction', 'noaction', 'Quarantine', 'quarantine', 'Remove', 'remove', 'UserDefined', 'userdefined'].include?(value) - fail("Invalid value '#{value}'. Valid values are Allow, Block, Clean, NoAction, Quarantine, Remove, UserDefined") - end - end - end - - # Name: SevereThreatDefaultAction - # Type: string - # IsMandatory: False - # Values: ["Allow", "Block", "Clean", "NoAction", "Quarantine", "Remove", "UserDefined"] - newparam(:dsc_severethreatdefaultaction) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SevereThreatDefaultAction - Specifies which automatic remediation action to take for a severe level threat. Valid values are Allow, Block, Clean, NoAction, Quarantine, Remove, UserDefined." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Allow', 'allow', 'Block', 'block', 'Clean', 'clean', 'NoAction', 'noaction', 'Quarantine', 'quarantine', 'Remove', 'remove', 'UserDefined', 'userdefined'].include?(value) - fail("Invalid value '#{value}'. Valid values are Allow, Block, Clean, NoAction, Quarantine, Remove, UserDefined") - end - end - end - - # Name: SubmitSamplesConsent - # Type: string - # IsMandatory: False - # Values: ["Allways Prompt", "Send safe samples automatically", "Never send", "Send all samples automatically"] - newparam(:dsc_submitsamplesconsent) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SubmitSamplesConsent - Specifies how Windows Defender checks for user consent for certain samples. If consent has previously been granted, Windows Defender submits the samples. Otherwise, if the MAPSReporting parameter does not have a value of Disabled, Windows Defender prompts the user for consent. Valid values are Allways Prompt, Send safe samples automatically, Never send, Send all samples automatically." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Allways Prompt', 'allways prompt', 'Send safe samples automatically', 'send safe samples automatically', 'Never send', 'never send', 'Send all samples automatically', 'send all samples automatically'].include?(value) - fail("Invalid value '#{value}'. Valid values are Allways Prompt, Send safe samples automatically, Never send, Send all samples automatically") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xmppreference).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xmsipackage.rb b/lib/puppet/type/dsc_xmsipackage.rb deleted file mode 100644 index 409d0f14..00000000 --- a/lib/puppet/type/dsc_xmsipackage.rb +++ /dev/null @@ -1,368 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xmsipackage) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xMsiPackage resource type. - Automatically generated from - 'xPSDesiredStateConfiguration/DSCResources/MSFT_xMsiPackage/MSFT_xMsiPackage.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_productid is a required attribute') if self[:dsc_productid].nil? - end - - def dscmeta_resource_friendly_name; 'xMsiPackage' end - def dscmeta_resource_name; 'MSFT_xMsiPackage' end - def dscmeta_module_name; 'xPSDesiredStateConfiguration' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ProductId - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_productid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProductId - The identifying number used to find the package, usually a GUID." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Path - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - The path to the MSI file that should be installed or uninstalled." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether or not the MSI file should be installed or uninstalled. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Arguments - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_arguments) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Arguments - The arguments to be passed to the MSI package during installation or uninstallation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - The credential of a user account to be used to mount a UNC path if needed." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: LogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogPath - The path to the log file to log the output from the MSI execution." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FileHash - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_filehash) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FileHash - The expected hash value of the MSI file at the given path." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: HashAlgorithm - # Type: string - # IsMandatory: False - # Values: ["SHA1", "SHA256", "SHA384", "SHA512", "MD5", "RIPEMD160"] - newparam(:dsc_hashalgorithm) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "HashAlgorithm - The algorithm used to generate the given hash value. Valid values are SHA1, SHA256, SHA384, SHA512, MD5, RIPEMD160." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['SHA1', 'sha1', 'SHA256', 'sha256', 'SHA384', 'sha384', 'SHA512', 'sha512', 'MD5', 'md5', 'RIPEMD160', 'ripemd160'].include?(value) - fail("Invalid value '#{value}'. Valid values are SHA1, SHA256, SHA384, SHA512, MD5, RIPEMD160") - end - end - end - - # Name: SignerSubject - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_signersubject) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SignerSubject - The subject that should match the signer certificate of the digital signature of the MSI file." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SignerThumbprint - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_signerthumbprint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SignerThumbprint - The certificate thumbprint that should match the signer certificate of the digital signature of the MSI file." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ServerCertificateValidationCallback - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_servercertificatevalidationcallback) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServerCertificateValidationCallback - PowerShell code that should be used to validate SSL certificates for paths using HTTPS." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_runascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "RunAsCredential - The credential of a user account under which to run the installation or uninstallation of the MSI package." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("RunAsCredential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The display name of the MSI package." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstallSource - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_installsource) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstallSource - The path to the MSI package." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstalledOn - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_installedon) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstalledOn - The date that the MSI package was installed on or serviced on, whichever is later." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Size - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_size) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "Size - The size of the MSI package in MB." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Version - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_version) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Version - The version number of the MSI package." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PackageDescription - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_packagedescription) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PackageDescription - The description of the MSI package." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Publisher - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_publisher) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Publisher - The publisher of the MSI package." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xmsipackage).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xmysqldatabase.rb b/lib/puppet/type/dsc_xmysqldatabase.rb deleted file mode 100644 index f70ee8a2..00000000 --- a/lib/puppet/type/dsc_xmysqldatabase.rb +++ /dev/null @@ -1,136 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xmysqldatabase) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xMySqlDatabase resource type. - Automatically generated from - 'xMySql/DscResources/MSFT_xMySqlDatabase/MSFT_xMySqlDatabase.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_databasename is a required attribute') if self[:dsc_databasename].nil? - end - - def dscmeta_resource_friendly_name; 'xMySqlDatabase' end - def dscmeta_resource_name; 'MSFT_xMySqlDatabase' end - def dscmeta_module_name; 'xMySql' end - def dscmeta_module_version; '2.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: DatabaseName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_databasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseName - Name of the database." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Should the database be present or absent. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: RootCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_rootcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "RootCredential - The root credential that is used to install MySql server." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("RootCredential", value) - end - end - - # Name: MySqlVersion - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_mysqlversion) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MySqlVersion - MYSql Version Number" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xmysqldatabase).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xmysqlgrant.rb b/lib/puppet/type/dsc_xmysqlgrant.rb deleted file mode 100644 index 34f865d7..00000000 --- a/lib/puppet/type/dsc_xmysqlgrant.rb +++ /dev/null @@ -1,173 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xmysqlgrant) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xMySqlGrant resource type. - Automatically generated from - 'xMySql/DscResources/MSFT_xMySqlGrant/MSFT_xMySqlGrant.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_username is a required attribute') if self[:dsc_username].nil? - fail('dsc_databasename is a required attribute') if self[:dsc_databasename].nil? - fail('dsc_permissiontype is a required attribute') if self[:dsc_permissiontype].nil? - end - - def dscmeta_resource_friendly_name; 'xMySqlGrant' end - def dscmeta_resource_name; 'MSFT_xMySqlGrant' end - def dscmeta_module_name; 'xMySql' end - def dscmeta_module_version; '2.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: UserName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_username) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UserName - Name of MySQL user." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_databasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseName - MySql database name to grant permissions." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RootCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_rootcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "RootCredential - MySql connection credential used for the root." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("RootCredential", value) - end - end - - # Name: PermissionType - # Type: string - # IsMandatory: True - # Values: ["ALL PRIVILEGES", "CREATE", "DROP", "DELETE", "INSERT", "SELECT", "UPDATE", "EXECUTE"] - newparam(:dsc_permissiontype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PermissionType - MySql user permission type. Valid values are ALL PRIVILEGES, CREATE, DROP, DELETE, INSERT, SELECT, UPDATE, EXECUTE." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['ALL PRIVILEGES', 'all privileges', 'CREATE', 'create', 'DROP', 'drop', 'DELETE', 'delete', 'INSERT', 'insert', 'SELECT', 'select', 'UPDATE', 'update', 'EXECUTE', 'execute'].include?(value) - fail("Invalid value '#{value}'. Valid values are ALL PRIVILEGES, CREATE, DROP, DELETE, INSERT, SELECT, UPDATE, EXECUTE") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Ensure given grant to mySql database present or absent. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: MySqlVersion - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_mysqlversion) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MySqlVersion - MYSql Version Number" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xmysqlgrant).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xmysqlserver.rb b/lib/puppet/type/dsc_xmysqlserver.rb deleted file mode 100644 index c6962069..00000000 --- a/lib/puppet/type/dsc_xmysqlserver.rb +++ /dev/null @@ -1,136 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xmysqlserver) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xMySqlServer resource type. - Automatically generated from - 'xMySql/DscResources/MSFT_xMySqlServer/MSFT_xMySqlServer.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_mysqlversion is a required attribute') if self[:dsc_mysqlversion].nil? - end - - def dscmeta_resource_friendly_name; 'xMySqlServer' end - def dscmeta_resource_name; 'MSFT_xMySqlServer' end - def dscmeta_module_name; 'xMySql' end - def dscmeta_module_version; '2.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: MySqlVersion - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_mysqlversion) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MySqlVersion - mySql Version Number" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Ensure server is present or absent Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: RootPassword - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_rootpassword) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "RootPassword - The root credential that is used to install mySql server." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("RootPassword", value) - end - end - - # Name: Port - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_port) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Port - The port number for the service" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xmysqlserver).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xmysqluser.rb b/lib/puppet/type/dsc_xmysqluser.rb deleted file mode 100644 index e7c0e44b..00000000 --- a/lib/puppet/type/dsc_xmysqluser.rb +++ /dev/null @@ -1,152 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xmysqluser) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xMySqlUser resource type. - Automatically generated from - 'xMySql/DscResources/MSFT_xMySqlUser/MSFT_xMySqlUser.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_username is a required attribute') if self[:dsc_username].nil? - end - - def dscmeta_resource_friendly_name; 'xMySqlUser' end - def dscmeta_resource_name; 'MSFT_xMySqlUser' end - def dscmeta_module_name; 'xMySql' end - def dscmeta_module_version; '2.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: UserName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_username) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UserName - Name of MySQL user to create or remove." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UserCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_usercredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "UserCredential - Credential for MySQL user." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("UserCredential", value) - end - end - - # Name: RootCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_rootcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "RootCredential - MySQL root credential used to create a user." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("RootCredential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Ensure MySQL user is present or absent. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: MySqlVersion - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_mysqlversion) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MySqlVersion - MySQL Version Number" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xmysqluser).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xnetadapterbinding.rb b/lib/puppet/type/dsc_xnetadapterbinding.rb deleted file mode 100644 index 1caf6a7a..00000000 --- a/lib/puppet/type/dsc_xnetadapterbinding.rb +++ /dev/null @@ -1,138 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xnetadapterbinding) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xNetAdapterBinding resource type. - Automatically generated from - 'xNetworking/DSCResources/MSFT_xNetAdapterBinding/MSFT_xNetAdapterBinding.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_interfacealias is a required attribute') if self[:dsc_interfacealias].nil? - fail('dsc_componentid is a required attribute') if self[:dsc_componentid].nil? - end - - def dscmeta_resource_friendly_name; 'xNetAdapterBinding' end - def dscmeta_resource_name; 'MSFT_xNetAdapterBinding' end - def dscmeta_module_name; 'xNetworking' end - def dscmeta_module_version; '5.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: InterfaceAlias - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_interfacealias) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InterfaceAlias - Specifies the alias of a network interface. Supports the use of '*'." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ComponentId - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_componentid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ComponentId - Specifies the underlying name of the transport or filter in the following form - ms_xxxx, such as ms_tcpip." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: State - # Type: string - # IsMandatory: False - # Values: ["Enabled", "Disabled"] - newparam(:dsc_state) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "State - Specifies if the component ID for the Interface should be Enabled or Disabled. Valid values are Enabled, Disabled." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Enabled', 'enabled', 'Disabled', 'disabled'].include?(value) - fail("Invalid value '#{value}'. Valid values are Enabled, Disabled") - end - end - end - - # Name: CurrentState - # Type: string - # IsMandatory: False - # Values: ["Enabled", "Disabled", "Mixed"] - newparam(:dsc_currentstate) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CurrentState - Returns the current state of the component ID for the Interfaces. Valid values are Enabled, Disabled, Mixed." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Enabled', 'enabled', 'Disabled', 'disabled', 'Mixed', 'mixed'].include?(value) - fail("Invalid value '#{value}'. Valid values are Enabled, Disabled, Mixed") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xnetadapterbinding).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xnetadapterlso.rb b/lib/puppet/type/dsc_xnetadapterlso.rb deleted file mode 100644 index aeb621cc..00000000 --- a/lib/puppet/type/dsc_xnetadapterlso.rb +++ /dev/null @@ -1,119 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xnetadapterlso) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xNetAdapterLso resource type. - Automatically generated from - 'xNetworking/DSCResources/MSFT_xNetAdapterLso/MSFT_xNetAdapterLso.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xNetAdapterLso' end - def dscmeta_resource_name; 'MSFT_xNetAdapterLso' end - def dscmeta_module_name; 'xNetworking' end - def dscmeta_module_version; '5.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Specifies the name of network adapter." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Protocol - # Type: string - # IsMandatory: False - # Values: ["V1IPv4", "IPv4", "IPv6"] - newparam(:dsc_protocol) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Protocol - Specifies which protocol to make changes to. Valid values are V1IPv4, IPv4, IPv6." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['V1IPv4', 'v1ipv4', 'IPv4', 'ipv4', 'IPv6', 'ipv6'].include?(value) - fail("Invalid value '#{value}'. Valid values are V1IPv4, IPv4, IPv6") - end - end - end - - # Name: State - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_state) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "State - Specifies whether LSO should be enabled or disabled." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xnetadapterlso).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xnetadaptername.rb b/lib/puppet/type/dsc_xnetadaptername.rb deleted file mode 100644 index d303679a..00000000 --- a/lib/puppet/type/dsc_xnetadaptername.rb +++ /dev/null @@ -1,245 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xnetadaptername) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xNetAdapterName resource type. - Automatically generated from - 'xNetworking/DSCResources/MSFT_xNetAdapterName/MSFT_xNetAdapterName.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_newname is a required attribute') if self[:dsc_newname].nil? - end - - def dscmeta_resource_friendly_name; 'xNetAdapterName' end - def dscmeta_resource_name; 'MSFT_xNetAdapterName' end - def dscmeta_module_name; 'xNetworking' end - def dscmeta_module_version; '5.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: NewName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_newname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "NewName - Specifies the new name of the network adapter." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - This is the name of the network adapter to find." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PhysicalMediaType - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_physicalmediatype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PhysicalMediaType - This is the media type of the network adapter to find." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Status - # Type: string - # IsMandatory: False - # Values: ["Up", "Disconnected", "Disabled"] - newparam(:dsc_status) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Status - This is the status of the network adapter to find. Valid values are Up, Disconnected, Disabled." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Up', 'up', 'Disconnected', 'disconnected', 'Disabled', 'disabled'].include?(value) - fail("Invalid value '#{value}'. Valid values are Up, Disconnected, Disabled") - end - end - end - - # Name: MacAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_macaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MacAddress - This is the MAC address of the network adapter to find." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InterfaceDescription - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_interfacedescription) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InterfaceDescription - This is the interface description of the network adapter to find." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InterfaceIndex - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_interfaceindex) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "InterfaceIndex - This is the interface index of the network adapter to find." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: InterfaceGuid - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_interfaceguid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InterfaceGuid - This is the interface GUID of the network adapter to find." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DriverDescription - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_driverdescription) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DriverDescription - This is the driver description of the network adapter." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InterfaceNumber - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_interfacenumber) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "InterfaceNumber - This is the interface number of the network adapter if more than one are returned by the parameters." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: IgnoreMultipleMatchingAdapters - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_ignoremultiplematchingadapters) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "IgnoreMultipleMatchingAdapters - This switch will suppress an error occurring if more than one matching adapter matches the parameters passed." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xnetadaptername).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xnetadapterrdma.rb b/lib/puppet/type/dsc_xnetadapterrdma.rb deleted file mode 100644 index 5784c989..00000000 --- a/lib/puppet/type/dsc_xnetadapterrdma.rb +++ /dev/null @@ -1,101 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xnetadapterrdma) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xNetAdapterRDMA resource type. - Automatically generated from - 'xNetworking/DSCResources/MSFT_xNetAdapterRDMA/MSFT_xNetAdapterRDMA.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xNetAdapterRDMA' end - def dscmeta_resource_name; 'MSFT_xNetAdapterRDMA' end - def dscmeta_module_name; 'xNetworking' end - def dscmeta_module_version; '5.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Specifies the name of network adapter for which RDMA needs to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Enabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Enabled - Specifies whether RDMA is enabled or disabled." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xnetadapterrdma).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xnetbios.rb b/lib/puppet/type/dsc_xnetbios.rb deleted file mode 100644 index b469a6f3..00000000 --- a/lib/puppet/type/dsc_xnetbios.rb +++ /dev/null @@ -1,103 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xnetbios) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xNetBIOS resource type. - Automatically generated from - 'xNetworking/DSCResources/MSFT_xNetBIOS/MSFT_xNetBIOS.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_interfacealias is a required attribute') if self[:dsc_interfacealias].nil? - end - - def dscmeta_resource_friendly_name; 'xNetBIOS' end - def dscmeta_resource_name; 'MSFT_xNetBIOS' end - def dscmeta_module_name; 'xNetworking' end - def dscmeta_module_version; '5.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: InterfaceAlias - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_interfacealias) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InterfaceAlias - Specifies the alias of a network interface." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Setting - # Type: string - # IsMandatory: False - # Values: ["Default", "Enable", "Disable"] - newparam(:dsc_setting) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Setting - Default - Use NetBios settings from the DHCP server. If static IP, Enable NetBIOS. Valid values are Default, Enable, Disable." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Default', 'default', 'Enable', 'enable', 'Disable', 'disable'].include?(value) - fail("Invalid value '#{value}'. Valid values are Default, Enable, Disable") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xnetbios).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xnetconnectionprofile.rb b/lib/puppet/type/dsc_xnetconnectionprofile.rb deleted file mode 100644 index 67810df7..00000000 --- a/lib/puppet/type/dsc_xnetconnectionprofile.rb +++ /dev/null @@ -1,139 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xnetconnectionprofile) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xNetConnectionProfile resource type. - Automatically generated from - 'xNetworking/DSCResources/MSFT_xNetConnectionProfile/MSFT_xNetConnectionProfile.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_interfacealias is a required attribute') if self[:dsc_interfacealias].nil? - end - - def dscmeta_resource_friendly_name; 'xNetConnectionProfile' end - def dscmeta_resource_name; 'MSFT_xNetConnectionProfile' end - def dscmeta_module_name; 'xNetworking' end - def dscmeta_module_version; '5.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: InterfaceAlias - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_interfacealias) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InterfaceAlias - Specifies the alias for the Interface that is being changed." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IPv4Connectivity - # Type: string - # IsMandatory: False - # Values: ["Disconnected", "NoTraffic", "Subnet", "LocalNetwork", "Internet"] - newparam(:dsc_ipv4connectivity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IPv4Connectivity - Sets the Network Category for the interface. Valid values are Disconnected, NoTraffic, Subnet, LocalNetwork, Internet." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Disconnected', 'disconnected', 'NoTraffic', 'notraffic', 'Subnet', 'subnet', 'LocalNetwork', 'localnetwork', 'Internet', 'internet'].include?(value) - fail("Invalid value '#{value}'. Valid values are Disconnected, NoTraffic, Subnet, LocalNetwork, Internet") - end - end - end - - # Name: IPv6Connectivity - # Type: string - # IsMandatory: False - # Values: ["Disconnected", "NoTraffic", "Subnet", "LocalNetwork", "Internet"] - newparam(:dsc_ipv6connectivity) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IPv6Connectivity - Specifies the IPv4 Connection Value. Valid values are Disconnected, NoTraffic, Subnet, LocalNetwork, Internet." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Disconnected', 'disconnected', 'NoTraffic', 'notraffic', 'Subnet', 'subnet', 'LocalNetwork', 'localnetwork', 'Internet', 'internet'].include?(value) - fail("Invalid value '#{value}'. Valid values are Disconnected, NoTraffic, Subnet, LocalNetwork, Internet") - end - end - end - - # Name: NetworkCategory - # Type: string - # IsMandatory: False - # Values: ["Public", "Private"] - newparam(:dsc_networkcategory) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "NetworkCategory - Specifies the IPv6 Connection Value. Valid values are Public, Private." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Public', 'public', 'Private', 'private'].include?(value) - fail("Invalid value '#{value}'. Valid values are Public, Private") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xnetconnectionprofile).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xnetworkteam.rb b/lib/puppet/type/dsc_xnetworkteam.rb deleted file mode 100644 index ab21c64f..00000000 --- a/lib/puppet/type/dsc_xnetworkteam.rb +++ /dev/null @@ -1,159 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xnetworkteam) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xNetworkTeam resource type. - Automatically generated from - 'xNetworking/DSCResources/MSFT_xNetworkTeam/MSFT_xNetworkTeam.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xNetworkTeam' end - def dscmeta_resource_name; 'MSFT_xNetworkTeam' end - def dscmeta_module_name; 'xNetworking' end - def dscmeta_module_version; '5.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Specifies the name of the network team to create." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TeamMembers - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_teammembers, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "TeamMembers - Specifies the network interfaces that should be a part of the network team. This is a comma-separated list." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: TeamingMode - # Type: string - # IsMandatory: False - # Values: ["SwitchIndependent", "LACP", "Static"] - newparam(:dsc_teamingmode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TeamingMode - Specifies the teaming mode configuration. Valid values are SwitchIndependent, LACP, Static." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['SwitchIndependent', 'switchindependent', 'LACP', 'lacp', 'Static', 'static'].include?(value) - fail("Invalid value '#{value}'. Valid values are SwitchIndependent, LACP, Static") - end - end - end - - # Name: LoadBalancingAlgorithm - # Type: string - # IsMandatory: False - # Values: ["Dynamic", "HyperVPort", "IPAddresses", "MacAddresses", "TransportPorts"] - newparam(:dsc_loadbalancingalgorithm) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LoadBalancingAlgorithm - Specifies the load balancing algorithm for the network team. Valid values are Dynamic, HyperVPort, IPAddresses, MacAddresses, TransportPorts." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Dynamic', 'dynamic', 'HyperVPort', 'hypervport', 'IPAddresses', 'ipaddresses', 'MacAddresses', 'macaddresses', 'TransportPorts', 'transportports'].include?(value) - fail("Invalid value '#{value}'. Valid values are Dynamic, HyperVPort, IPAddresses, MacAddresses, TransportPorts") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies if the network team should be created or deleted. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xnetworkteam).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xnetworkteaminterface.rb b/lib/puppet/type/dsc_xnetworkteaminterface.rb deleted file mode 100644 index 5f2d9a36..00000000 --- a/lib/puppet/type/dsc_xnetworkteaminterface.rb +++ /dev/null @@ -1,138 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xnetworkteaminterface) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xNetworkTeamInterface resource type. - Automatically generated from - 'xNetworking/DSCResources/MSFT_xNetworkTeamInterface/MSFT_xNetworkTeamInterface.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xNetworkTeamInterface' end - def dscmeta_resource_name; 'MSFT_xNetworkTeamInterface' end - def dscmeta_module_name; 'xNetworking' end - def dscmeta_module_version; '5.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Specifies the name of the network team interface to create." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TeamName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_teamname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TeamName - Specifies the name of the network team on which this particular interface should exist." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: VlanID - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_vlanid) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "VlanID - Specifies VlanID to be set on network team interface." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies if the network team interface should be created or deleted. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xnetworkteaminterface).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xofflinedomainjoin.rb b/lib/puppet/type/dsc_xofflinedomainjoin.rb deleted file mode 100644 index f4b7bda1..00000000 --- a/lib/puppet/type/dsc_xofflinedomainjoin.rb +++ /dev/null @@ -1,103 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xofflinedomainjoin) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xOfflineDomainJoin resource type. - Automatically generated from - 'xComputerManagement/DSCResources/MSFT_xOfflineDomainJoin/MSFT_xOfflineDomainJoin.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_issingleinstance is a required attribute') if self[:dsc_issingleinstance].nil? - end - - def dscmeta_resource_friendly_name; 'xOfflineDomainJoin' end - def dscmeta_resource_name; 'MSFT_xOfflineDomainJoin' end - def dscmeta_module_name; 'xComputerManagement' end - def dscmeta_module_version; '2.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: IsSingleInstance - # Type: string - # IsMandatory: True - # Values: ["Yes"] - newparam(:dsc_issingleinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes' Valid values are Yes." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Yes', 'yes'].include?(value) - fail("Invalid value '#{value}'. Valid values are Yes") - end - end - end - - # Name: RequestFile - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_requestfile) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RequestFile - The full path to the Offline Domain Join Request file to use." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xofflinedomainjoin).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xpackage.rb b/lib/puppet/type/dsc_xpackage.rb deleted file mode 100644 index 0bf42195..00000000 --- a/lib/puppet/type/dsc_xpackage.rb +++ /dev/null @@ -1,469 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xpackage) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xPackage resource type. - Automatically generated from - 'xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - fail('dsc_productid is a required attribute') if self[:dsc_productid].nil? - end - - def dscmeta_resource_friendly_name; 'xPackage' end - def dscmeta_resource_name; 'MSFT_xPackageResource' end - def dscmeta_module_name; 'xPSDesiredStateConfiguration' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Path - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProductId - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_productid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProductId" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Arguments - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_arguments) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Arguments" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ReturnCode - # Type: uint32[] - # IsMandatory: False - # Values: None - newparam(:dsc_returncode, :array_matching => :all) do - def mof_type; 'uint32[]' end - def mof_is_embedded?; false end - desc "ReturnCode" - validate do |value| - unless value.kind_of?(Array) || (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value '#{value}'. Should be an integer or an array of integers") - end - end - munge do |value| - v = PuppetX::Dsc::TypeHelpers.munge_integer(value) - v.is_a?(Array) ? v : Array(v) - end - end - - # Name: LogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PackageDescription - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_packagedescription) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PackageDescription" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Publisher - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_publisher) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Publisher" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstalledOn - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_installedon) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstalledOn" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Size - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_size) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "Size" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Version - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_version) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Version" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Installed - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_installed) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Installed" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: FileHash - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_filehash) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FileHash" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: HashAlgorithm - # Type: string - # IsMandatory: False - # Values: ["SHA1", "SHA256", "SHA384", "SHA512", "MD5", "RIPEMD160"] - newparam(:dsc_hashalgorithm) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "HashAlgorithm - Valid values are SHA1, SHA256, SHA384, SHA512, MD5, RIPEMD160." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['SHA1', 'sha1', 'SHA256', 'sha256', 'SHA384', 'sha384', 'SHA512', 'sha512', 'MD5', 'md5', 'RIPEMD160', 'ripemd160'].include?(value) - fail("Invalid value '#{value}'. Valid values are SHA1, SHA256, SHA384, SHA512, MD5, RIPEMD160") - end - end - end - - # Name: SignerSubject - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_signersubject) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SignerSubject" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SignerThumbprint - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_signerthumbprint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SignerThumbprint" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ServerCertificateValidationCallback - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_servercertificatevalidationcallback) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServerCertificateValidationCallback" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstalledCheckRegHive - # Type: string - # IsMandatory: False - # Values: ["LocalMachine", "CurrentUser"] - newparam(:dsc_installedcheckreghive) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstalledCheckRegHive - Valid values are LocalMachine, CurrentUser." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['LocalMachine', 'localmachine', 'CurrentUser', 'currentuser'].include?(value) - fail("Invalid value '#{value}'. Valid values are LocalMachine, CurrentUser") - end - end - end - - # Name: InstalledCheckRegKey - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_installedcheckregkey) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstalledCheckRegKey" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstalledCheckRegValueName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_installedcheckregvaluename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstalledCheckRegValueName" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstalledCheckRegValueData - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_installedcheckregvaluedata) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstalledCheckRegValueData" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CreateCheckRegValue - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_createcheckregvalue) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "CreateCheckRegValue" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: RunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_runascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "RunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("RunAsCredential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xpackage).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xpendingreboot.rb b/lib/puppet/type/dsc_xpendingreboot.rb deleted file mode 100644 index 8c29b36b..00000000 --- a/lib/puppet/type/dsc_xpendingreboot.rb +++ /dev/null @@ -1,245 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xpendingreboot) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xPendingReboot resource type. - Automatically generated from - 'xPendingReboot/DSCResources/MSFT_xPendingReboot/MSFT_xPendingReboot.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xPendingReboot' end - def dscmeta_resource_name; 'MSFT_xPendingReboot' end - def dscmeta_module_name; 'xPendingReboot' end - def dscmeta_module_version; '0.3.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of this pending reboot check" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SkipComponentBasedServicing - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_skipcomponentbasedservicing) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SkipComponentBasedServicing - Specifies whether to skip reboots triggered by the Component-Based Servicing component" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ComponentBasedServicing - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_componentbasedservicing) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ComponentBasedServicing - A value indicating whether the Component-Based Servicing component requested a reboot" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: SkipWindowsUpdate - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_skipwindowsupdate) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SkipWindowsUpdate - Specifies whether to skip reboots triggered by Windows Update" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: WindowsUpdate - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_windowsupdate) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "WindowsUpdate - A value indicating whether Windows Update requested a reboot" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: SkipPendingFileRename - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_skippendingfilerename) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SkipPendingFileRename - Specifies whether to skip pending file rename reboots" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: PendingFileRename - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_pendingfilerename) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "PendingFileRename - A value indicating whether a pending file rename triggered a reboot" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: SkipPendingComputerRename - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_skippendingcomputerrename) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SkipPendingComputerRename - Specifies whether to skip reboots triggered by a pending computer rename" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: PendingComputerRename - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_pendingcomputerrename) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "PendingComputerRename - A value indicating whether a pending computer rename triggered a reboot" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: SkipCcmClientSDK - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_skipccmclientsdk) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SkipCcmClientSDK - Specifies whether to skip reboots triggered by the ConfigMgr client" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: CcmClientSDK - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_ccmclientsdk) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "CcmClientSDK - A value indicating whether the ConfigMgr client triggered a reboot" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xpendingreboot).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xpfximport.rb b/lib/puppet/type/dsc_xpfximport.rb deleted file mode 100644 index 6b901687..00000000 --- a/lib/puppet/type/dsc_xpfximport.rb +++ /dev/null @@ -1,189 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xpfximport) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xPfxImport resource type. - Automatically generated from - 'xCertificate/DSCResources/MSFT_xPfxImport/MSFT_xPfxImport.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_thumbprint is a required attribute') if self[:dsc_thumbprint].nil? - fail('dsc_location is a required attribute') if self[:dsc_location].nil? - fail('dsc_store is a required attribute') if self[:dsc_store].nil? - end - - def dscmeta_resource_friendly_name; 'xPfxImport' end - def dscmeta_resource_name; 'MSFT_xPfxImport' end - def dscmeta_module_name; 'xCertificate' end - def dscmeta_module_version; '3.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Thumbprint - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_thumbprint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Thumbprint - The thumbprint (unique identifier) of the PFX file you're importing." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Path - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - The path to the PFX file you want to import." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Location - # Type: string - # IsMandatory: True - # Values: ["LocalMachine", "CurrentUser"] - newparam(:dsc_location) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Location - The Windows Certificate Store Location to import the PFX file to. Valid values are LocalMachine, CurrentUser." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['LocalMachine', 'localmachine', 'CurrentUser', 'currentuser'].include?(value) - fail("Invalid value '#{value}'. Valid values are LocalMachine, CurrentUser") - end - end - end - - # Name: Store - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_store) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Store - The Windows Certificate Store Name to import the PFX file to." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Exportable - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_exportable) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Exportable - Determines whether the private key is exportable from the machine after it has been imported" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - A [PSCredential] object that is used to decrypt the PFX file." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether the PFX file should be present or absent. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xpfximport).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xpowerplan.rb b/lib/puppet/type/dsc_xpowerplan.rb deleted file mode 100644 index 6dac3b6f..00000000 --- a/lib/puppet/type/dsc_xpowerplan.rb +++ /dev/null @@ -1,103 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xpowerplan) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xPowerPlan resource type. - Automatically generated from - 'xComputerManagement/DSCResources/MSFT_xPowerPlan/MSFT_xPowerPlan.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_issingleinstance is a required attribute') if self[:dsc_issingleinstance].nil? - end - - def dscmeta_resource_friendly_name; 'xPowerPlan' end - def dscmeta_resource_name; 'MSFT_xPowerPlan' end - def dscmeta_module_name; 'xComputerManagement' end - def dscmeta_module_version; '2.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: IsSingleInstance - # Type: string - # IsMandatory: True - # Values: ["Yes"] - newparam(:dsc_issingleinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes' Valid values are Yes." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Yes', 'yes'].include?(value) - fail("Invalid value '#{value}'. Valid values are Yes") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the power plan to activate." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xpowerplan).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xpowershellexecutionpolicy.rb b/lib/puppet/type/dsc_xpowershellexecutionpolicy.rb deleted file mode 100644 index 60f302d6..00000000 --- a/lib/puppet/type/dsc_xpowershellexecutionpolicy.rb +++ /dev/null @@ -1,88 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xpowershellexecutionpolicy) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xPowerShellExecutionPolicy resource type. - Automatically generated from - 'xPowerShellExecutionPolicy/DSCResources/MSFT_xPowerShellExecutionPolicy/MSFT_xPowerShellExecutionPolicy.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_executionpolicy is a required attribute') if self[:dsc_executionpolicy].nil? - end - - def dscmeta_resource_friendly_name; 'xPowerShellExecutionPolicy' end - def dscmeta_resource_name; 'MSFT_xPowerShellExecutionPolicy' end - def dscmeta_module_name; 'xPowerShellExecutionPolicy' end - def dscmeta_module_version; '1.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ExecutionPolicy - # Type: string - # IsMandatory: True - # Values: ["Bypass", "Restricted", "AllSigned", "RemoteSigned", "Unrestricted"] - newparam(:dsc_executionpolicy) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ExecutionPolicy - Changes the user preference for the Windows PowerShell execution policy. Valid values are Bypass, Restricted, AllSigned, RemoteSigned, Unrestricted." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Bypass', 'bypass', 'Restricted', 'restricted', 'AllSigned', 'allsigned', 'RemoteSigned', 'remotesigned', 'Unrestricted', 'unrestricted'].include?(value) - fail("Invalid value '#{value}'. Valid values are Bypass, Restricted, AllSigned, RemoteSigned, Unrestricted") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xpowershellexecutionpolicy).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xpsendpoint.rb b/lib/puppet/type/dsc_xpsendpoint.rb deleted file mode 100644 index e301f5a8..00000000 --- a/lib/puppet/type/dsc_xpsendpoint.rb +++ /dev/null @@ -1,169 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xpsendpoint) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xPSEndpoint resource type. - Automatically generated from - 'xPSDesiredStateConfiguration/DSCResources/MSFT_xPSSessionConfiguration/MSFT_xPSSessionConfiguration.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xPSEndpoint' end - def dscmeta_resource_name; 'MSFT_xPSSessionConfiguration' end - def dscmeta_module_name; 'xPSDesiredStateConfiguration' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of the PS Remoting Endpoint" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Whether to create the endpoint or delete it Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: StartupScript - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_startupscript) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "StartupScript - Path for the startup script" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_runascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "RunAsCredential - Credential for Running under different user context" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("RunAsCredential", value) - end - end - - # Name: SecurityDescriptorSDDL - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_securitydescriptorsddl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SecurityDescriptorSDDL - SDDL for allowed users to connect to this endpoint" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AccessMode - # Type: string - # IsMandatory: False - # Values: ["Local", "Remote", "Disabled"] - newparam(:dsc_accessmode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AccessMode - Whether the endpoint is remotely accessible or has local access only or no access Valid values are Local, Remote, Disabled." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Local', 'local', 'Remote', 'remote', 'Disabled', 'disabled'].include?(value) - fail("Invalid value '#{value}'. Valid values are Local, Remote, Disabled") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xpsendpoint).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xrdremoteapp.rb b/lib/puppet/type/dsc_xrdremoteapp.rb deleted file mode 100644 index b5aa356f..00000000 --- a/lib/puppet/type/dsc_xrdremoteapp.rb +++ /dev/null @@ -1,260 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xrdremoteapp) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xRDRemoteApp resource type. - Automatically generated from - 'xRemoteDesktopSessionHost/DSCResources/MSFT_xRDRemoteApp/MSFT_xRDRemoteApp.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_alias is a required attribute') if self[:dsc_alias].nil? - fail('dsc_collectionname is a required attribute') if self[:dsc_collectionname].nil? - fail('dsc_displayname is a required attribute') if self[:dsc_displayname].nil? - fail('dsc_filepath is a required attribute') if self[:dsc_filepath].nil? - end - - def dscmeta_resource_friendly_name; 'xRDRemoteApp' end - def dscmeta_resource_name; 'MSFT_xRDRemoteApp' end - def dscmeta_module_name; 'xRemoteDesktopSessionHost' end - def dscmeta_module_version; '1.4.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Alias - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_alias) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Alias - Specifies an alias for the RemoteApp program." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CollectionName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_collectionname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CollectionName - Specifies the name of the personal virtual desktop collection or session collection. The cmdlet publishes the RemoteApp program to this collection. " - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DisplayName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_displayname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DisplayName - Specifies a name to display to users for the RemoteApp program." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FilePath - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_filepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FilePath - Specifies a path for the executable file for the application. Do not include any environment variables." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FileVirtualPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_filevirtualpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FileVirtualPath - Specifies a path for the application executable file. This path resolves to the same location as the value of the FilePath parameter, but it can include environment variables. " - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FolderName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_foldername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FolderName - Specifies the name of the folder that the RemoteApp program appears in on the Remote Desktop Web Access (RD Web Access) webpage and in the Start menu for subscribed RemoteApp and Desktop Connections. " - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CommandLineSetting - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_commandlinesetting) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CommandLineSetting - Specifies whether the RemoteApp program accepts command-line arguments from the client at connection time. The acceptable values for this parameter are: Allow, DoNotAllow, Require" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RequiredCommandLine - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_requiredcommandline) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RequiredCommandLine - Specifies a string that contains command-line arguments that the client can use at connection time with the RemoteApp program. " - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IconIndex - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_iconindex) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "IconIndex - Specifies the index within the icon file (specified by the IconPath parameter) where the RemoteApp program's icon can be found." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: IconPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_iconpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IconPath - Specifies the path to a file containing the icon to display for the RemoteApp program identified by the Alias parameter." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UserGroups - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_usergroups) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UserGroups - Specifies a domain group that can view the RemoteApp in RD Web Access, and in RemoteApp and Desktop Connections. To allow all users to see a RemoteApp program, provide a value of Null." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ShowInWebAccess - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_showinwebaccess) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ShowInWebAccess - Specifies whether to show the RemoteApp program in the RD Web Access server, and in RemoteApp and Desktop Connections that the user subscribes to. " - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xrdremoteapp).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xrdsessioncollection.rb b/lib/puppet/type/dsc_xrdsessioncollection.rb deleted file mode 100644 index ce68d2e4..00000000 --- a/lib/puppet/type/dsc_xrdsessioncollection.rb +++ /dev/null @@ -1,132 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xrdsessioncollection) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xRDSessionCollection resource type. - Automatically generated from - 'xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionCollection/MSFT_xRDSessionCollection.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_collectionname is a required attribute') if self[:dsc_collectionname].nil? - fail('dsc_sessionhost is a required attribute') if self[:dsc_sessionhost].nil? - end - - def dscmeta_resource_friendly_name; 'xRDSessionCollection' end - def dscmeta_resource_name; 'MSFT_xRDSessionCollection' end - def dscmeta_module_name; 'xRemoteDesktopSessionHost' end - def dscmeta_module_version; '1.4.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: CollectionName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_collectionname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CollectionName - Specifies a name for the session collection. " - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SessionHost - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sessionhost) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SessionHost - Specifies an RD Session Host server to include in the session collection. " - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CollectionDescription - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_collectiondescription) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CollectionDescription - Specifies a description for the collection." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ConnectionBroker - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_connectionbroker) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConnectionBroker - Specifies the Remote Desktop Connection Broker (RD Connection Broker) server for a Remote Desktop deployment." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xrdsessioncollection).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xrdsessioncollectionconfiguration.rb b/lib/puppet/type/dsc_xrdsessioncollectionconfiguration.rb deleted file mode 100644 index 3b086965..00000000 --- a/lib/puppet/type/dsc_xrdsessioncollectionconfiguration.rb +++ /dev/null @@ -1,373 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xrdsessioncollectionconfiguration) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xRDSessionCollectionConfiguration resource type. - Automatically generated from - 'xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionCollectionConfiguration/MSFT_xRDSessionCollectionConfiguration.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_collectionname is a required attribute') if self[:dsc_collectionname].nil? - end - - def dscmeta_resource_friendly_name; 'xRDSessionCollectionConfiguration' end - def dscmeta_resource_name; 'MSFT_xRDSessionCollectionConfiguration' end - def dscmeta_module_name; 'xRemoteDesktopSessionHost' end - def dscmeta_module_version; '1.4.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: CollectionName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_collectionname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CollectionName - Specifies the name of a session collection. " - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ActiveSessionLimitMin - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_activesessionlimitmin) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "ActiveSessionLimitMin - Specifies the maximum time, in minutes, an active session runs. After this period, the RD Session Host server ends the session. " - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: AuthenticateUsingNLA - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_authenticateusingnla) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AuthenticateUsingNLA - Indicates whether to use Network Level Authentication (NLA). If this value is $True, Remote Desktop uses NLA to authenticate a user before the user sees a logon screen. " - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AutomaticReconnectionEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_automaticreconnectionenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AutomaticReconnectionEnabled - Indicates whether the Remote Desktop client attempts to reconnect after a connection interruption. " - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: BrokenConnectionAction - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_brokenconnectionaction) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "BrokenConnectionAction - Specifies an action for an RD Session Host server to take after a connection interruption. The acceptable values for this parameter are: None, Disconnect, LogOff." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ClientDeviceRedirectionOptions - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_clientdeviceredirectionoptions) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ClientDeviceRedirectionOptions - Specifies a type of client device to be redirected to an RD Session Host server in this session collection. The acceptable values for this parameter are: None, AudioVideoPlayBack, AudioRecording, COMPort, PlugAndPlayDevice, SmartCard, Clipboard, LPTPort, Drive, TimeZone. You can use binary-or to combine two or more values of this enum to specify multiple client device types." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ClientPrinterAsDefault - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_clientprinterasdefault) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ClientPrinterAsDefault - Indicates whether to use the client printer or server printer as the default printer. If this value is $True, use the client printer as default. If this value is $False, use the server as default." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ClientPrinterRedirected - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_clientprinterredirected) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ClientPrinterRedirected - Indicates whether to use client printer redirection, which routes print jobs from the Remote Desktop session to a printer attached to the client computer." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: CollectionDescription - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_collectiondescription) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CollectionDescription - Specifies a description of the session collection. " - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ConnectionBroker - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_connectionbroker) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConnectionBroker - Specifies the Remote Desktop Connection Broker (RD Connection Broker) server for a Remote Desktop deployment." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CustomRdpProperty - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_customrdpproperty) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CustomRdpProperty - Specifies Remote Desktop Protocol (RDP) settings to include in the .rdp files for all Windows Server 2012 RemoteApp programs and remote desktops published in this collection. " - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DisconnectedSessionLimitMin - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_disconnectedsessionlimitmin) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "DisconnectedSessionLimitMin - Specifies a length of time, in minutes. After client disconnection from a session for this period, the RD Session Host ends the session." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: EncryptionLevel - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_encryptionlevel) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EncryptionLevel - Specifies the level of data encryption used for a Remote Desktop session. The acceptable values for this parameter are: Low, ClientCompatible, High, FipsCompliant. The default value is ClientCompatible." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IdleSessionLimitMin - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_idlesessionlimitmin) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "IdleSessionLimitMin - Specifies the length of time, in minutes, to wait before an RD Session Host logs off or disconnects an idle session. The BrokenConnectionAction parameter determines whether to log off or disconnect. " - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaxRedirectedMonitors - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maxredirectedmonitors) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "MaxRedirectedMonitors - Specifies the maximum number of client monitors that an RD Session Host server can redirect to a remote session. The highest value for this parameter is 16." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RDEasyPrintDriverEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_rdeasyprintdriverenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RDEasyPrintDriverEnabled - Specifies whether to enable the Remote Desktop Easy Print driver." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: SecurityLayer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_securitylayer) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SecurityLayer - Specifies which security protocol to use. The acceptable values for this parameter are: RDP, Negotiate, SSL. The default value is Negotiate." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TemporaryFoldersDeletedOnExit - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_temporaryfoldersdeletedonexit) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "TemporaryFoldersDeletedOnExit - Specifies whether to delete temporary folders from the RD Session Host server for a disconnected session. " - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: UserGroup - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_usergroup) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UserGroup - Specifies a domain group authorized to connect to the RD Session Host servers in a session collection. " - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xrdsessioncollectionconfiguration).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xrdsessiondeployment.rb b/lib/puppet/type/dsc_xrdsessiondeployment.rb deleted file mode 100644 index 09674990..00000000 --- a/lib/puppet/type/dsc_xrdsessiondeployment.rb +++ /dev/null @@ -1,119 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xrdsessiondeployment) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xRDSessionDeployment resource type. - Automatically generated from - 'xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionDeployment/MSFT_xRDSessionDeployment.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_sessionhost is a required attribute') if self[:dsc_sessionhost].nil? - fail('dsc_connectionbroker is a required attribute') if self[:dsc_connectionbroker].nil? - fail('dsc_webaccessserver is a required attribute') if self[:dsc_webaccessserver].nil? - end - - def dscmeta_resource_friendly_name; 'xRDSessionDeployment' end - def dscmeta_resource_name; 'MSFT_xRDSessionDeployment' end - def dscmeta_module_name; 'xRemoteDesktopSessionHost' end - def dscmeta_module_version; '1.4.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: SessionHost - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sessionhost) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SessionHost - Specifies the FQDN of a server to host the RD Session Host role service. " - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ConnectionBroker - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_connectionbroker) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConnectionBroker - Specifies the FQDN of a server to host the RD Connection Broker role service." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: WebAccessServer - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_webaccessserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WebAccessServer - Specifies the FQDN of a server to host the RD Web Access role service. " - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xrdsessiondeployment).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xregistry.rb b/lib/puppet/type/dsc_xregistry.rb deleted file mode 100644 index b00c5449..00000000 --- a/lib/puppet/type/dsc_xregistry.rb +++ /dev/null @@ -1,190 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xregistry) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xRegistry resource type. - Automatically generated from - 'xPSDesiredStateConfiguration/DSCResources/MSFT_xRegistryResource/MSFT_xRegistryResource.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_key is a required attribute') if self[:dsc_key].nil? - fail('dsc_valuename is a required attribute') if self[:dsc_valuename].nil? - end - - def dscmeta_resource_friendly_name; 'xRegistry' end - def dscmeta_resource_name; 'MSFT_xRegistryResource' end - def dscmeta_module_name; 'xPSDesiredStateConfiguration' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Key - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_key) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Key - The path of the registry key to add, modify, or remove. This path must include the registry hive/drive." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ValueName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_valuename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ValueName - The name of the registry value. To add or remove a registry key, specify this property as an empty string without specifying ValueType or ValueData. To modify or remove the default value of a registry key, specify this property as an empty string while also specifying ValueType or ValueData." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ValueData - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_valuedata, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ValueData - The data the specified registry key value should have as a string or an array of strings (MultiString only)." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ValueType - # Type: string - # IsMandatory: False - # Values: ["String", "Binary", "DWord", "QWord", "MultiString", "ExpandString"] - newparam(:dsc_valuetype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ValueType - The type the specified registry key value should have. Valid values are String, Binary, DWord, QWord, MultiString, ExpandString." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['String', 'string', 'Binary', 'binary', 'DWord', 'dword', 'QWord', 'qword', 'MultiString', 'multistring', 'ExpandString', 'expandstring'].include?(value) - fail("Invalid value '#{value}'. Valid values are String, Binary, DWord, QWord, MultiString, ExpandString") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether or not the registry key or value should exist. To add or modify a registry key or value, set this property to Present. To remove a registry key or value, set the property to Absent. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Hex - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_hex) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Hex - Specifies whether or not the specified DWord or QWord registry key data is provided in a hexadecimal format. Not valid for types other than DWord and QWord. The default value is $false." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Force - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_force) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Force - Specifies whether or not to overwrite the specified registry key value if it already has a value or whether or not to delete a registry key that has subkeys. The default value is $false." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xregistry).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xremotedesktopadmin.rb b/lib/puppet/type/dsc_xremotedesktopadmin.rb deleted file mode 100644 index 24396d47..00000000 --- a/lib/puppet/type/dsc_xremotedesktopadmin.rb +++ /dev/null @@ -1,108 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xremotedesktopadmin) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xRemoteDesktopAdmin resource type. - Automatically generated from - 'xRemoteDesktopAdmin/DSCResources/xRemoteDesktopAdmin/xRemoteDesktopAdmin.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xRemoteDesktopAdmin' end - def dscmeta_resource_name; 'xRemoteDesktopAdmin' end - def dscmeta_module_name; 'xRemoteDesktopAdmin' end - def dscmeta_module_version; '1.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Determines whether or not the computer should accept remote connections. Present sets the value to Enabled and Absent sets the value to Disabled. Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: UserAuthentication - # Type: string - # IsMandatory: False - # Values: ["Secure", "NonSecure"] - newparam(:dsc_userauthentication) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UserAuthentication - User Authentication. Setting this value to Secure configures the machine to require NLA. Valid values are Secure, NonSecure." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Secure', 'secure', 'NonSecure', 'nonsecure'].include?(value) - fail("Invalid value '#{value}'. Valid values are Secure, NonSecure") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xremotedesktopadmin).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xremotefile.rb b/lib/puppet/type/dsc_xremotefile.rb deleted file mode 100644 index f9173afc..00000000 --- a/lib/puppet/type/dsc_xremotefile.rb +++ /dev/null @@ -1,231 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xremotefile) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xRemoteFile resource type. - Automatically generated from - 'xPSDesiredStateConfiguration/DSCResources/MSFT_xRemoteFile/MSFT_xRemoteFile.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_destinationpath is a required attribute') if self[:dsc_destinationpath].nil? - end - - def dscmeta_resource_friendly_name; 'xRemoteFile' end - def dscmeta_resource_name; 'MSFT_xRemoteFile' end - def dscmeta_module_name; 'xPSDesiredStateConfiguration' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: DestinationPath - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_destinationpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DestinationPath - Path under which downloaded or copied file should be accessible after operation." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Uri - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_uri) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Uri - Uri of a file which should be copied or downloaded. This parameter supports HTTP and HTTPS values." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UserAgent - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_useragent) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UserAgent - User agent for the web request." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Headers - # Type: MSFT_KeyValuePair[] - # IsMandatory: False - # Values: None - newparam(:dsc_headers) do - def mof_type; 'MSFT_KeyValuePair[]' end - def mof_is_embedded?; true end - desc "Headers - Headers of the web request." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - Specifies a user account that has permission to send the request." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: MatchSource - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_matchsource) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "MatchSource - A boolean value to indicate whether the remote file should be re-downloaded if the file in the DestinationPath was modified locally." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: TimeoutSec - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_timeoutsec) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "TimeoutSec - Specifies how long the request can be pending before it times out." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Proxy - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_proxy) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Proxy - Uses a proxy server for the request, rather than connecting directly to the Internet resource. Should be the URI of a network proxy server (e.g 'http://10.20.30.1')." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProxyCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_proxycredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "ProxyCredential - Specifies a user account that has permission to use the proxy server that is specified by the Proxy parameter." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("ProxyCredential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Says whether DestinationPath exists on the machine Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xremotefile).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xrobocopy.rb b/lib/puppet/type/dsc_xrobocopy.rb deleted file mode 100644 index 0e8bc10a..00000000 --- a/lib/puppet/type/dsc_xrobocopy.rb +++ /dev/null @@ -1,285 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xrobocopy) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xRobocopy resource type. - Automatically generated from - 'xRobocopy/DSCResources/MSFT_xRobocopy/MSFT_xRobocopy.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_source is a required attribute') if self[:dsc_source].nil? - fail('dsc_destination is a required attribute') if self[:dsc_destination].nil? - end - - def dscmeta_resource_friendly_name; 'xRobocopy' end - def dscmeta_resource_name; 'MSFT_xRobocopy' end - def dscmeta_module_name; 'xRobocopy' end - def dscmeta_module_version; '2.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Source - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_source) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Source - Source Directory, Drive or UNC path." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Destination - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_destination) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Destination - Destination Dir, Drive or UNC path." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Files - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_files) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Files - File(s) to copy (names/wildcards: default is all files)." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Retry - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_retry) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "Retry - Number of Retries on failed copies: default 1 million." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Wait - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_wait) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "Wait - Wait time between retries: default is 30 seconds." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: SubdirectoriesIncludingEmpty - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_subdirectoriesincludingempty) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SubdirectoriesIncludingEmpty - Copy subdirectories, including Empty ones." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Restartable - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_restartable) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Restartable - Copy files in restartable mode." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: MultiThreaded - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_multithreaded) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "MultiThreaded - Do multi-threaded copies with n threads (default 8). N must be at least 1 and not greater than 128. This option is incompatible with the /IPG and /EFSRAW options. Redirect output using /LOG option for better performance." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ExcludeFiles - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_excludefiles) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ExcludeFiles - Exclude Files matching given names/paths/wildcards." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LogOutput - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logoutput) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogOutput - Output status to LOG file." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AppendLog - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_appendlog) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AppendLog - Determine whether to overwrite log file or append." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AdditionalArgs - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_additionalargs, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "AdditionalArgs - Robocopy has MANY configuration options. Too many to present them all as DSC parameters effectively. Use this option to set additional parameters. Each parameter should be a separate array member. This array will be combined with main argument array. For a list of options run Robocopy /??? in a shell window." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Will indicate whether Destination is in sync with Source Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xrobocopy).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xroute.rb b/lib/puppet/type/dsc_xroute.rb deleted file mode 100644 index a8b770f7..00000000 --- a/lib/puppet/type/dsc_xroute.rb +++ /dev/null @@ -1,210 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xroute) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xRoute resource type. - Automatically generated from - 'xNetworking/DSCResources/MSFT_xRoute/MSFT_xRoute.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_interfacealias is a required attribute') if self[:dsc_interfacealias].nil? - fail('dsc_addressfamily is a required attribute') if self[:dsc_addressfamily].nil? - fail('dsc_destinationprefix is a required attribute') if self[:dsc_destinationprefix].nil? - fail('dsc_nexthop is a required attribute') if self[:dsc_nexthop].nil? - end - - def dscmeta_resource_friendly_name; 'xRoute' end - def dscmeta_resource_name; 'MSFT_xRoute' end - def dscmeta_module_name; 'xNetworking' end - def dscmeta_module_version; '5.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: InterfaceAlias - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_interfacealias) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InterfaceAlias - Specifies the alias of a network interface." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AddressFamily - # Type: string - # IsMandatory: True - # Values: ["IPv4", "IPv6"] - newparam(:dsc_addressfamily) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AddressFamily - Specifies the IP address family. Valid values are IPv4, IPv6." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['IPv4', 'ipv4', 'IPv6', 'ipv6'].include?(value) - fail("Invalid value '#{value}'. Valid values are IPv4, IPv6") - end - end - end - - # Name: DestinationPrefix - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_destinationprefix) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DestinationPrefix - Specifies a destination prefix of an IP route. A destination prefix consists of an IP address prefix and a prefix length, separated by a slash (/)." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: NextHop - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_nexthop) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "NextHop - Specifies the next hop for the IP route." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether the route should exist. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: RouteMetric - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_routemetric) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "RouteMetric - Specifies an integer route metric for an IP route." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Publish - # Type: string - # IsMandatory: False - # Values: ["No", "Yes", "Age"] - newparam(:dsc_publish) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Publish - Specifies the publish setting of an IP route. Valid values are No, Yes, Age." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['No', 'no', 'Yes', 'yes', 'Age', 'age'].include?(value) - fail("Invalid value '#{value}'. Valid values are No, Yes, Age") - end - end - end - - # Name: PreferredLifetime - # Type: real64 - # IsMandatory: False - # Values: None - newparam(:dsc_preferredlifetime) do - def mof_type; 'real64' end - def mof_is_embedded?; false end - desc "PreferredLifetime - Specifies a preferred lifetime in seconds of an IP route." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xroute).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscdpmconsolesetup.rb b/lib/puppet/type/dsc_xscdpmconsolesetup.rb deleted file mode 100644 index 1ebeb84d..00000000 --- a/lib/puppet/type/dsc_xscdpmconsolesetup.rb +++ /dev/null @@ -1,136 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscdpmconsolesetup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCDPMConsoleSetup resource type. - Automatically generated from - 'xSCDPM/DSCResources/MSFT_xSCDPMConsoleSetup/MSFT_xSCDPMConsoleSetup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xSCDPMConsoleSetup' end - def dscmeta_resource_name; 'MSFT_xSCDPMConsoleSetup' end - def dscmeta_module_name; 'xSCDPM' end - def dscmeta_module_version; '1.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the DPM console is expected to be installed on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscdpmconsolesetup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscdpmdatabaseserversetup.rb b/lib/puppet/type/dsc_xscdpmdatabaseserversetup.rb deleted file mode 100644 index 71104da9..00000000 --- a/lib/puppet/type/dsc_xscdpmdatabaseserversetup.rb +++ /dev/null @@ -1,136 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscdpmdatabaseserversetup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCDPMDatabaseServerSetup resource type. - Automatically generated from - 'xSCDPM/DSCResources/MSFT_xSCDPMDatabaseServerSetup/MSFT_xSCDPMDatabaseServerSetup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_sourcepath is a required attribute') if self[:dsc_sourcepath].nil? - end - - def dscmeta_resource_friendly_name; 'xSCDPMDatabaseServerSetup' end - def dscmeta_resource_name; 'MSFT_xSCDPMDatabaseServerSetup' end - def dscmeta_module_name; 'xSCDPM' end - def dscmeta_module_version; '1.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the DPM database support files are expected to be installed on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscdpmdatabaseserversetup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscdpmserversetup.rb b/lib/puppet/type/dsc_xscdpmserversetup.rb deleted file mode 100644 index 388b7ded..00000000 --- a/lib/puppet/type/dsc_xscdpmserversetup.rb +++ /dev/null @@ -1,288 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscdpmserversetup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCDPMServerSetup resource type. - Automatically generated from - 'xSCDPM/DSCResources/MSFT_xSCDPMServerSetup/MSFT_xSCDPMServerSetup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xSCDPMServerSetup' end - def dscmeta_resource_name; 'MSFT_xSCDPMServerSetup' end - def dscmeta_module_name; 'xSCDPM' end - def dscmeta_module_version; '1.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the DPM server is expected to be installed on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source filesfor installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - # Name: UserName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_username) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UserName - User name that the software will be registered to." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CompanyName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_companyname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CompanyName - Company name that the software will be registered to." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProductKey - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_productkey) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProductKey - Product key for licensed installations." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProgramFiles - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_programfiles) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProgramFiles - Installation path for the software." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: YukonMachineName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_yukonmachinename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "YukonMachineName - Name of the SQL server for the DPM database." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: YukonInstanceName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_yukoninstancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "YukonInstanceName - SQL instance for the DPM database." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: YukonMachineCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_yukonmachinecredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "YukonMachineCredential - Credential to be used to access the SQL instance for DPM at installation time." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("YukonMachineCredential", value) - end - end - - # Name: ReportingMachineName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_reportingmachinename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ReportingMachineName - Name of the SQL server for reporting." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ReportingInstanceName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_reportinginstancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ReportingInstanceName - SQL instance for reporting." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ReportingMachineCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_reportingmachinecredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "ReportingMachineCredential - Credential to be used to access SQL reporting for DPM at installation time." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("ReportingMachineCredential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscdpmserversetup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscheduledtask.rb b/lib/puppet/type/dsc_xscheduledtask.rb deleted file mode 100644 index 7eed1e7f..00000000 --- a/lib/puppet/type/dsc_xscheduledtask.rb +++ /dev/null @@ -1,698 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscheduledtask) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xScheduledTask resource type. - Automatically generated from - 'xComputerManagement/DSCResources/MSFT_xScheduledTask/MSFT_xScheduledTask.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_taskname is a required attribute') if self[:dsc_taskname].nil? - end - - def dscmeta_resource_friendly_name; 'xScheduledTask' end - def dscmeta_resource_name; 'MSFT_xScheduledTask' end - def dscmeta_module_name; 'xComputerManagement' end - def dscmeta_module_version; '2.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: TaskName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_taskname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TaskName - The name of the task" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TaskPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_taskpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TaskPath - The path to the task - defaults to the root directory" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - The task description" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ActionExecutable - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_actionexecutable) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ActionExecutable - The path to the .exe for this task" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ActionArguments - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_actionarguments) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ActionArguments - The arguments to pass the executable" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ActionWorkingPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_actionworkingpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ActionWorkingPath - The working path to specify for the executable" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ScheduleType - # Type: string - # IsMandatory: False - # Values: ["Once", "Daily", "Weekly", "AtStartup", "AtLogOn"] - newparam(:dsc_scheduletype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ScheduleType - When should the task be executed Valid values are Once, Daily, Weekly, AtStartup, AtLogOn." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Once', 'once', 'Daily', 'daily', 'Weekly', 'weekly', 'AtStartup', 'atstartup', 'AtLogOn', 'atlogon'].include?(value) - fail("Invalid value '#{value}'. Valid values are Once, Daily, Weekly, AtStartup, AtLogOn") - end - end - end - - # Name: RepeatInterval - # Type: datetime - # IsMandatory: False - # Values: None - newparam(:dsc_repeatinterval) do - def mof_type; 'datetime' end - def mof_is_embedded?; false end - desc "RepeatInterval - How many units (minutes, hours, days) between each run of this task?" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: StartTime - # Type: datetime - # IsMandatory: False - # Values: None - newparam(:dsc_starttime) do - def mof_type; 'datetime' end - def mof_is_embedded?; false end - desc "StartTime - The time of day this task should start at - defaults to 12:00 AM. Not valid for AtLogon and AtStartup tasks" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Present if the task should exist, Absent if it should be removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Enable - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enable) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Enable - True if the task should be enabled, false if it should be disabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ExecuteAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_executeascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "ExecuteAsCredential - The credential this task should execute as. If not specified defaults to running as the local system account" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("ExecuteAsCredential", value) - end - end - - # Name: DaysInterval - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_daysinterval) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "DaysInterval - Specifies the interval between the days in the schedule. An interval of 1 produces a daily schedule. An interval of 2 produces an every-other day schedule." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RandomDelay - # Type: datetime - # IsMandatory: False - # Values: None - newparam(:dsc_randomdelay) do - def mof_type; 'datetime' end - def mof_is_embedded?; false end - desc "RandomDelay - Specifies a random amount of time to delay the start time of the trigger. The delay time is a random time between the time the task triggers and the time that you specify in this setting." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RepetitionDuration - # Type: datetime - # IsMandatory: False - # Values: None - newparam(:dsc_repetitionduration) do - def mof_type; 'datetime' end - def mof_is_embedded?; false end - desc "RepetitionDuration - Specifies how long the repetition pattern repeats after the task starts." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DaysOfWeek - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_daysofweek, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "DaysOfWeek - Specifies an array of the days of the week on which Task Scheduler runs the task." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: WeeksInterval - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_weeksinterval) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "WeeksInterval - Specifies the interval between the weeks in the schedule. An interval of 1 produces a weekly schedule. An interval of 2 produces an every-other week schedule." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: User - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_user) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "User - Specifies the identifier of the user for a trigger that starts a task when a user logs on." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DisallowDemandStart - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disallowdemandstart) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DisallowDemandStart - Indicates whether the task is prohibited to run on demand or not. Defaults to $false" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DisallowHardTerminate - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disallowhardterminate) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DisallowHardTerminate - Indicates whether the task is prohibited to be terminated or not. Defaults to $false" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Compatibility - # Type: string - # IsMandatory: False - # Values: ["AT", "V1", "Vista", "Win7", "Win8"] - newparam(:dsc_compatibility) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Compatibility - The task compatibility level. Defaults to Vista. Valid values are AT, V1, Vista, Win7, Win8." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['AT', 'at', 'V1', 'v1', 'Vista', 'vista', 'Win7', 'win7', 'Win8', 'win8'].include?(value) - fail("Invalid value '#{value}'. Valid values are AT, V1, Vista, Win7, Win8") - end - end - end - - # Name: AllowStartIfOnBatteries - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowstartifonbatteries) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowStartIfOnBatteries - Indicates whether the task should start if the machine is on batteries or not. Defaults to $false" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Hidden - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_hidden) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Hidden - Indicates that the task is hidden in the Task Scheduler UI." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: RunOnlyIfIdle - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_runonlyifidle) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RunOnlyIfIdle - Indicates that Task Scheduler runs the task only when the computer is idle." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: IdleWaitTimeout - # Type: datetime - # IsMandatory: False - # Values: None - newparam(:dsc_idlewaittimeout) do - def mof_type; 'datetime' end - def mof_is_embedded?; false end - desc "IdleWaitTimeout - Specifies the amount of time that Task Scheduler waits for an idle condition to occur." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: NetworkName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_networkname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "NetworkName - Specifies the name of a network profile that Task Scheduler uses to determine if the task can run. The Task Scheduler UI uses this setting for display purposes. Specify a network name if you specify the RunOnlyIfNetworkAvailable parameter." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DisallowStartOnRemoteAppSession - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disallowstartonremoteappsession) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DisallowStartOnRemoteAppSession - Indicates that the task does not start if the task is triggered to run in a Remote Applications Integrated Locally (RAIL) session." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: StartWhenAvailable - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_startwhenavailable) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "StartWhenAvailable - Indicates that Task Scheduler can start the task at any time after its scheduled time has passed." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DontStopIfGoingOnBatteries - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_dontstopifgoingonbatteries) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DontStopIfGoingOnBatteries - Indicates that the task does not stop if the computer switches to battery power." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: WakeToRun - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_waketorun) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "WakeToRun - Indicates that Task Scheduler wakes the computer before it runs the task." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: IdleDuration - # Type: datetime - # IsMandatory: False - # Values: None - newparam(:dsc_idleduration) do - def mof_type; 'datetime' end - def mof_is_embedded?; false end - desc "IdleDuration - Specifies the amount of time that the computer must be in an idle state before Task Scheduler runs the task." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RestartOnIdle - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_restartonidle) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RestartOnIdle - Indicates that Task Scheduler restarts the task when the computer cycles into an idle condition more than once." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: DontStopOnIdleEnd - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_dontstoponidleend) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DontStopOnIdleEnd - Indicates that Task Scheduler does not terminate the task if the idle condition ends before the task is completed." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ExecutionTimeLimit - # Type: datetime - # IsMandatory: False - # Values: None - newparam(:dsc_executiontimelimit) do - def mof_type; 'datetime' end - def mof_is_embedded?; false end - desc "ExecutionTimeLimit - Specifies the amount of time that Task Scheduler is allowed to complete the task." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MultipleInstances - # Type: string - # IsMandatory: False - # Values: ["IgnoreNew", "Parallel", "Queue"] - newparam(:dsc_multipleinstances) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MultipleInstances - Specifies the policy that defines how Task Scheduler handles multiple instances of the task. Valid values are IgnoreNew, Parallel, Queue." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['IgnoreNew', 'ignorenew', 'Parallel', 'parallel', 'Queue', 'queue'].include?(value) - fail("Invalid value '#{value}'. Valid values are IgnoreNew, Parallel, Queue") - end - end - end - - # Name: Priority - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_priority) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "Priority - Specifies the priority level of the task. Priority must be an integer from 0 (highest priority) to 10 (lowest priority). The default value is 7. Priority levels 7 and 8 are used for background tasks. Priority levels 4, 5, and 6 are used for interactive tasks." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RestartCount - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_restartcount) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "RestartCount - Specifies the number of times that Task Scheduler attempts to restart the task." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RestartInterval - # Type: datetime - # IsMandatory: False - # Values: None - newparam(:dsc_restartinterval) do - def mof_type; 'datetime' end - def mof_is_embedded?; false end - desc "RestartInterval - Specifies the amount of time that Task Scheduler attempts to restart the task." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RunOnlyIfNetworkAvailable - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_runonlyifnetworkavailable) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RunOnlyIfNetworkAvailable - Indicates that Task Scheduler runs the task only when a network is available. Task Scheduler uses the NetworkID parameter and NetworkName parameter that you specify in this cmdlet to determine if the network is available." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscheduledtask).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscomadmin.rb b/lib/puppet/type/dsc_xscomadmin.rb deleted file mode 100644 index 57704b6a..00000000 --- a/lib/puppet/type/dsc_xscomadmin.rb +++ /dev/null @@ -1,138 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscomadmin) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCOMAdmin resource type. - Automatically generated from - 'xSCOM/DSCResources/MSFT_xSCOMAdmin/MSFT_xSCOMAdmin.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_principal is a required attribute') if self[:dsc_principal].nil? - fail('dsc_userrole is a required attribute') if self[:dsc_userrole].nil? - end - - def dscmeta_resource_friendly_name; 'xSCOMAdmin' end - def dscmeta_resource_name; 'MSFT_xSCOMAdmin' end - def dscmeta_module_name; 'xSCOM' end - def dscmeta_module_version; '1.3.3.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the principal is an Operations Manager admin.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Principal - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_principal) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Principal - The Operations Manager admin principal." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UserRole - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_userrole) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UserRole - The Operations Manager user role." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SCOMAdminCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_scomadmincredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SCOMAdminCredential - Credential to be used to perform the operations." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SCOMAdminCredential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscomadmin).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscomconsolesetup.rb b/lib/puppet/type/dsc_xscomconsolesetup.rb deleted file mode 100644 index 9ceec19b..00000000 --- a/lib/puppet/type/dsc_xscomconsolesetup.rb +++ /dev/null @@ -1,223 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscomconsolesetup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCOMConsoleSetup resource type. - Automatically generated from - 'xSCOM/DSCResources/MSFT_xSCOMConsoleSetup/MSFT_xSCOMConsoleSetup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xSCOMConsoleSetup' end - def dscmeta_resource_name; 'MSFT_xSCOMConsoleSetup' end - def dscmeta_module_name; 'xSCOM' end - def dscmeta_module_version; '1.3.3.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the OM Console is expected to be installed on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - # Name: InstallPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_installpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstallPath - Installation path for the software." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UseMicrosoftUpdate - # Type: uint8 - # IsMandatory: False - # Values: None - newparam(:dsc_usemicrosoftupdate) do - def mof_type; 'uint8' end - def mof_is_embedded?; false end - desc "UseMicrosoftUpdate - 0: Do not opt in to Microsoft Update. 1: Opt in to Microsoft Update." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: SendCEIPReports - # Type: uint8 - # IsMandatory: False - # Values: None - newparam(:dsc_sendceipreports) do - def mof_type; 'uint8' end - def mof_is_embedded?; false end - desc "SendCEIPReports - 0: Do not opt in to the Customer Experience Improvement Program (CEIP). 1: Opt in to CEIP." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: EnableErrorReporting - # Type: string - # IsMandatory: False - # Values: ["Never", "Queued", "Always"] - newparam(:dsc_enableerrorreporting) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EnableErrorReporting - Never: Do not opt in to sending automatic error reports. Queued: Opt in to sending error reports, but queue the reports for review before sending. Always: Opt in to automatically send error reports. Valid values are Never, Queued, Always." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Never', 'never', 'Queued', 'queued', 'Always', 'always'].include?(value) - fail("Invalid value '#{value}'. Valid values are Never, Queued, Always") - end - end - end - - # Name: SendODRReports - # Type: uint8 - # IsMandatory: False - # Values: None - newparam(:dsc_sendodrreports) do - def mof_type; 'uint8' end - def mof_is_embedded?; false end - desc "SendODRReports - 0: Do not opt in to sending operational data reports. 1: opt in to sending operational data reports." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscomconsolesetup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscomconsoleupdate.rb b/lib/puppet/type/dsc_xscomconsoleupdate.rb deleted file mode 100644 index 47564774..00000000 --- a/lib/puppet/type/dsc_xscomconsoleupdate.rb +++ /dev/null @@ -1,151 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscomconsoleupdate) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCOMConsoleUpdate resource type. - Automatically generated from - 'xSCOM/DSCResources/MSFT_xSCOMConsoleUpdate/MSFT_xSCOMConsoleUpdate.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xSCOMConsoleUpdate' end - def dscmeta_resource_name; 'MSFT_xSCOMConsoleUpdate' end - def dscmeta_module_name; 'xSCOM' end - def dscmeta_module_version; '1.3.3.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the update is expected to be installed on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - # Name: Update - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_update) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Update - Display name of the update." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscomconsoleupdate).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscommanagementpack.rb b/lib/puppet/type/dsc_xscommanagementpack.rb deleted file mode 100644 index c3b0cbb2..00000000 --- a/lib/puppet/type/dsc_xscommanagementpack.rb +++ /dev/null @@ -1,176 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscommanagementpack) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCOMManagementPack resource type. - Automatically generated from - 'xSCOM/DSCResources/MSFT_xSCOMManagementPack/MSFT_xSCOMManagementPack.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xSCOMManagementPack' end - def dscmeta_resource_name; 'MSFT_xSCOMManagementPack' end - def dscmeta_module_name; 'xSCOM' end - def dscmeta_module_version; '1.3.3.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of the Management Pack." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Version - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_version) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Version - Specific version of the Management Pack, overrides MinVersion if both set." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MinVersion - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_minversion) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MinVersion - Minimum version of the Management Pack, overridden by Version if both set." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SCOMAdminCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_scomadmincredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SCOMAdminCredential - Credential with admin permissions to Operations Manager." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SCOMAdminCredential", value) - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation, if omitted the Operations Manager installation folder will be used." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFile - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefile) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFile - Name of the file in the source folder for the Management Pack." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscommanagementpack).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscommanagementserversetup.rb b/lib/puppet/type/dsc_xscommanagementserversetup.rb deleted file mode 100644 index ba1a93ed..00000000 --- a/lib/puppet/type/dsc_xscommanagementserversetup.rb +++ /dev/null @@ -1,507 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscommanagementserversetup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCOMManagementServerSetup resource type. - Automatically generated from - 'xSCOM/DSCResources/MSFT_xSCOMManagementServerSetup/MSFT_xSCOMManagementServerSetup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xSCOMManagementServerSetup' end - def dscmeta_resource_name; 'MSFT_xSCOMManagementServerSetup' end - def dscmeta_module_name; 'xSCOM' end - def dscmeta_module_version; '1.3.3.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the OM management server is expected to be installed on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - # Name: ProductKey - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_productkey) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProductKey - Product key for licensed installations." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstallPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_installpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstallPath - Installation path for the software." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ManagementGroupName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_managementgroupname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ManagementGroupName - The name of the management group." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FirstManagementServer - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_firstmanagementserver) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "FirstManagementServer - Is this the first Management Server?" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ManagementServicePort - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_managementserviceport) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "ManagementServicePort - Change the Management Server port on install." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ActionAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_actionaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "ActionAccount - The domain and user name of the Management server action account." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("ActionAccount", value) - end - end - - # Name: ActionAccountUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_actionaccountusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ActionAccountUsername - Output username of the Management server action account." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DASAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_dasaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "DASAccount - The domain and user name of the Data Access service account." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("DASAccount", value) - end - end - - # Name: DASAccountUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_dasaccountusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DASAccountUsername - Output username of the Data Access service account." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DataReader - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_datareader) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "DataReader - The domain and user name of the data reader account." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("DataReader", value) - end - end - - # Name: DataReaderUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_datareaderusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DataReaderUsername - Output username of the data reader account." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DataWriter - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_datawriter) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "DataWriter - The domain and user name of the data Writer account." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("DataWriter", value) - end - end - - # Name: DataWriterUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_datawriterusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DataWriterUsername - Output username of the data writer account." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SqlServerInstance - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlserverinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SqlServerInstance - The SQL server and instance." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseName - The name of the Operational database." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseSize - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_databasesize) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "DatabaseSize - The size in MB of the Operational database." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: DwSqlServerInstance - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_dwsqlserverinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DwSqlServerInstance - The data warehouse server and instance." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DwDatabaseName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_dwdatabasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DwDatabaseName - The name of the data warehouse database." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DwDatabaseSize - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_dwdatabasesize) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "DwDatabaseSize - The size in MB of the data warehouse database." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: UseMicrosoftUpdate - # Type: uint8 - # IsMandatory: False - # Values: None - newparam(:dsc_usemicrosoftupdate) do - def mof_type; 'uint8' end - def mof_is_embedded?; false end - desc "UseMicrosoftUpdate - 0: Do not opt in to Microsoft Update. 1: Opt in to Microsoft Update." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: SendCEIPReports - # Type: uint8 - # IsMandatory: False - # Values: None - newparam(:dsc_sendceipreports) do - def mof_type; 'uint8' end - def mof_is_embedded?; false end - desc "SendCEIPReports - 0: Do not opt in to the Customer Experience Improvement Program (CEIP). 1: Opt in to CEIP." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: EnableErrorReporting - # Type: string - # IsMandatory: False - # Values: ["Never", "Queued", "Always"] - newparam(:dsc_enableerrorreporting) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EnableErrorReporting - Never: Do not opt in to sending automatic error reports. Queued: Opt in to sending error reports, but queue the reports for review before sending. Always: Opt in to automatically send error reports. Valid values are Never, Queued, Always." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Never', 'never', 'Queued', 'queued', 'Always', 'always'].include?(value) - fail("Invalid value '#{value}'. Valid values are Never, Queued, Always") - end - end - end - - # Name: SendODRReports - # Type: uint8 - # IsMandatory: False - # Values: None - newparam(:dsc_sendodrreports) do - def mof_type; 'uint8' end - def mof_is_embedded?; false end - desc "SendODRReports - 0: Do not opt in to sending operational data reports. 1: opt in to sending operational data reports." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscommanagementserversetup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscommanagementserverupdate.rb b/lib/puppet/type/dsc_xscommanagementserverupdate.rb deleted file mode 100644 index 5a94adbf..00000000 --- a/lib/puppet/type/dsc_xscommanagementserverupdate.rb +++ /dev/null @@ -1,151 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscommanagementserverupdate) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCOMManagementServerUpdate resource type. - Automatically generated from - 'xSCOM/DSCResources/MSFT_xSCOMManagementServerUpdate/MSFT_xSCOMManagementServerUpdate.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xSCOMManagementServerUpdate' end - def dscmeta_resource_name; 'MSFT_xSCOMManagementServerUpdate' end - def dscmeta_module_name; 'xSCOM' end - def dscmeta_module_version; '1.3.3.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the update is expected to be installed on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - # Name: Update - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_update) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Update - Display name of the update." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscommanagementserverupdate).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscomreportingserversetup.rb b/lib/puppet/type/dsc_xscomreportingserversetup.rb deleted file mode 100644 index 9ad8bfd8..00000000 --- a/lib/puppet/type/dsc_xscomreportingserversetup.rb +++ /dev/null @@ -1,284 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscomreportingserversetup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCOMReportingServerSetup resource type. - Automatically generated from - 'xSCOM/DSCResources/MSFT_xSCOMReportingServerSetup/MSFT_xSCOMReportingServerSetup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xSCOMReportingServerSetup' end - def dscmeta_resource_name; 'MSFT_xSCOMReportingServerSetup' end - def dscmeta_module_name; 'xSCOM' end - def dscmeta_module_version; '1.3.3.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the OM Reporting server is expected to be installed on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - # Name: InstallPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_installpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstallPath - Installation path for the software." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ManagementServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_managementserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ManagementServer - The name of the management server associated with the Reporting server." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SRSInstance - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_srsinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SRSInstance - The reporting server and instance." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DataReader - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_datareader) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "DataReader - The domain and user name of the data reader account." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("DataReader", value) - end - end - - # Name: DataReaderUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_datareaderusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DataReaderUsername - Output username of the data reader account." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UseMicrosoftUpdate - # Type: uint8 - # IsMandatory: False - # Values: None - newparam(:dsc_usemicrosoftupdate) do - def mof_type; 'uint8' end - def mof_is_embedded?; false end - desc "UseMicrosoftUpdate - 0: Do not opt in to Microsoft Update. 1: Opt in to Microsoft Update." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: SendCEIPReports - # Type: uint8 - # IsMandatory: False - # Values: None - newparam(:dsc_sendceipreports) do - def mof_type; 'uint8' end - def mof_is_embedded?; false end - desc "SendCEIPReports - 0: Do not opt in to the Customer Experience Improvement Program (CEIP). 1: Opt in to CEIP." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: EnableErrorReporting - # Type: string - # IsMandatory: False - # Values: ["Never", "Queued", "Always"] - newparam(:dsc_enableerrorreporting) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EnableErrorReporting - Never: Do not opt in to sending automatic error reports. Queued: Opt in to sending error reports, but queue the reports for review before sending. Always: Opt in to automatically send error reports. Valid values are Never, Queued, Always." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Never', 'never', 'Queued', 'queued', 'Always', 'always'].include?(value) - fail("Invalid value '#{value}'. Valid values are Never, Queued, Always") - end - end - end - - # Name: SendODRReports - # Type: uint8 - # IsMandatory: False - # Values: None - newparam(:dsc_sendodrreports) do - def mof_type; 'uint8' end - def mof_is_embedded?; false end - desc "SendODRReports - 0: Do not opt in to sending operational data reports. 1: opt in to sending operational data reports." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscomreportingserversetup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscomwebconsoleserversetup.rb b/lib/puppet/type/dsc_xscomwebconsoleserversetup.rb deleted file mode 100644 index e0e39e92..00000000 --- a/lib/puppet/type/dsc_xscomwebconsoleserversetup.rb +++ /dev/null @@ -1,287 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscomwebconsoleserversetup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCOMWebConsoleServerSetup resource type. - Automatically generated from - 'xSCOM/DSCResources/MSFT_xSCOMWebConsoleServerSetup/MSFT_xSCOMWebConsoleServerSetup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xSCOMWebConsoleServerSetup' end - def dscmeta_resource_name; 'MSFT_xSCOMWebConsoleServerSetup' end - def dscmeta_module_name; 'xSCOM' end - def dscmeta_module_version; '1.3.3.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the OM Web Console server is expected to be installed on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - # Name: InstallPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_installpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstallPath - Installation path for the software." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ManagementServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_managementserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ManagementServer - The name of the management server associated with the Reporting server." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: WebSiteName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_websitename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WebSiteName - The name of the website." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: WebConsoleAuthorizationMode - # Type: string - # IsMandatory: False - # Values: ["Mixed", "Network"] - newparam(:dsc_webconsoleauthorizationmode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WebConsoleAuthorizationMode - Mixed: Used for intranet scenarios. Network: Used for extranet scenarios. Valid values are Mixed, Network." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Mixed', 'mixed', 'Network', 'network'].include?(value) - fail("Invalid value '#{value}'. Valid values are Mixed, Network") - end - end - end - - # Name: WebConsoleUseSSL - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_webconsoleusessl) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "WebConsoleUseSSL - Specify only if your website has Secure Sockets Layer (SSL) activated. " - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: UseMicrosoftUpdate - # Type: uint8 - # IsMandatory: False - # Values: None - newparam(:dsc_usemicrosoftupdate) do - def mof_type; 'uint8' end - def mof_is_embedded?; false end - desc "UseMicrosoftUpdate - 0: Do not opt in to Microsoft Update. 1: Opt in to Microsoft Update." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: SendCEIPReports - # Type: uint8 - # IsMandatory: False - # Values: None - newparam(:dsc_sendceipreports) do - def mof_type; 'uint8' end - def mof_is_embedded?; false end - desc "SendCEIPReports - 0: Do not opt in to the Customer Experience Improvement Program (CEIP). 1: Opt in to CEIP." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: EnableErrorReporting - # Type: string - # IsMandatory: False - # Values: ["Never", "Queued", "Always"] - newparam(:dsc_enableerrorreporting) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EnableErrorReporting - Never: Do not opt in to sending automatic error reports. Queued: Opt in to sending error reports, but queue the reports for review before sending. Always: Opt in to automatically send error reports. Valid values are Never, Queued, Always." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Never', 'never', 'Queued', 'queued', 'Always', 'always'].include?(value) - fail("Invalid value '#{value}'. Valid values are Never, Queued, Always") - end - end - end - - # Name: SendODRReports - # Type: uint8 - # IsMandatory: False - # Values: None - newparam(:dsc_sendodrreports) do - def mof_type; 'uint8' end - def mof_is_embedded?; false end - desc "SendODRReports - 0: Do not opt in to sending operational data reports. 1: opt in to sending operational data reports." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscomwebconsoleserversetup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscomwebconsoleserverupdate.rb b/lib/puppet/type/dsc_xscomwebconsoleserverupdate.rb deleted file mode 100644 index c046264b..00000000 --- a/lib/puppet/type/dsc_xscomwebconsoleserverupdate.rb +++ /dev/null @@ -1,151 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscomwebconsoleserverupdate) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCOMWebConsoleServerUpdate resource type. - Automatically generated from - 'xSCOM/DSCResources/MSFT_xSCOMWebConsoleServerUpdate/MSFT_xSCOMWebConsoleServerUpdate.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xSCOMWebConsoleServerUpdate' end - def dscmeta_resource_name; 'MSFT_xSCOMWebConsoleServerUpdate' end - def dscmeta_module_name; 'xSCOM' end - def dscmeta_module_version; '1.3.3.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the update is expected to be installed on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - # Name: Update - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_update) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Update - Display name of the update." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscomwebconsoleserverupdate).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscript.rb b/lib/puppet/type/dsc_xscript.rb deleted file mode 100644 index 25b3acbd..00000000 --- a/lib/puppet/type/dsc_xscript.rb +++ /dev/null @@ -1,150 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscript) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xScript resource type. - Automatically generated from - 'xPSDesiredStateConfiguration/DSCResources/MSFT_xScriptResource/MSFT_xScriptResource.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_getscript is a required attribute') if self[:dsc_getscript].nil? - fail('dsc_setscript is a required attribute') if self[:dsc_setscript].nil? - fail('dsc_testscript is a required attribute') if self[:dsc_testscript].nil? - end - - def dscmeta_resource_friendly_name; 'xScript' end - def dscmeta_resource_name; 'MSFT_xScriptResource' end - def dscmeta_module_name; 'xPSDesiredStateConfiguration' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: GetScript - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_getscript) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "GetScript - A string that can be used to create a PowerShell script block that retrieves the current state of the resource." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetScript - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_setscript) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SetScript - A string that can be used to create a PowerShell script block that sets the resource to the desired state." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TestScript - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_testscript) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TestScript - A string that can be used to create a PowerShell script block that validates whether or not the resource is in the desired state." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - The credential of the user account to run the script under if needed." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Result - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_result) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Result - The result from the GetScript script block." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscript).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscsmapowershellsetup.rb b/lib/puppet/type/dsc_xscsmapowershellsetup.rb deleted file mode 100644 index be8cba1d..00000000 --- a/lib/puppet/type/dsc_xscsmapowershellsetup.rb +++ /dev/null @@ -1,136 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscsmapowershellsetup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCSMAPowerShellSetup resource type. - Automatically generated from - 'xSCSMA/DSCResources/MSFT_xSCSMAPowerShellSetup/MSFT_xSCSMAPowerShellSetup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xSCSMAPowerShellSetup' end - def dscmeta_resource_name; 'MSFT_xSCSMAPowerShellSetup' end - def dscmeta_module_name; 'xSCSMA' end - def dscmeta_module_version; '1.5.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if SMA PowerShell is expected to be installed on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscsmapowershellsetup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscsmarunbookworkerserversetup.rb b/lib/puppet/type/dsc_xscsmarunbookworkerserversetup.rb deleted file mode 100644 index 9768a656..00000000 --- a/lib/puppet/type/dsc_xscsmarunbookworkerserversetup.rb +++ /dev/null @@ -1,287 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscsmarunbookworkerserversetup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCSMARunbookWorkerServerSetup resource type. - Automatically generated from - 'xSCSMA/DSCResources/MSFT_xSCSMARunbookWorkerServerSetup/MSFT_xSCSMARunbookWorkerServerSetup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xSCSMARunbookWorkerServerSetup' end - def dscmeta_resource_name; 'MSFT_xSCSMARunbookWorkerServerSetup' end - def dscmeta_module_name; 'xSCSMA' end - def dscmeta_module_version; '1.5.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the SMA Runbook Worker server is expected to be installed on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - # Name: Service - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_service) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Service - Service account of the web service application pool." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Service", value) - end - end - - # Name: ServiceUserName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_serviceusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServiceUserName - Output username of the Service account of the web service application pool." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SqlServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SqlServer - Name of the SQL Server for the SMA database." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SqlInstance - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SqlInstance - Name of the SQL Instance for the SMA database." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SqlDatabase - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqldatabase) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SqlDatabase - Name of the SMA database." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstallFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_installfolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstallFolder - Installation folder for SMA." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ETWManifest - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_etwmanifest) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ETWManifest - Log to ETW." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SendCEIPReports - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sendceipreports) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SendCEIPReports - Participate in the Customer Experience Improvement Program." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MSUpdate - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_msupdate) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MSUpdate - Use Microsoft Update." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProductKey - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_productkey) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProductKey - Product key for licensed installations." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscsmarunbookworkerserversetup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscsmawebserviceserversetup.rb b/lib/puppet/type/dsc_xscsmawebserviceserversetup.rb deleted file mode 100644 index b1b6c9e3..00000000 --- a/lib/puppet/type/dsc_xscsmawebserviceserversetup.rb +++ /dev/null @@ -1,414 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscsmawebserviceserversetup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCSMAWebServiceServerSetup resource type. - Automatically generated from - 'xSCSMA/DSCResources/MSFT_xSCSMAWebServiceServerSetup/MSFT_xSCSMAWebServiceServerSetup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xSCSMAWebServiceServerSetup' end - def dscmeta_resource_name; 'MSFT_xSCSMAWebServiceServerSetup' end - def dscmeta_module_name; 'xSCSMA' end - def dscmeta_module_version; '1.5.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the SMA Web Service server is expected to be installed on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - # Name: FirstWebServiceServer - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_firstwebserviceserver) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "FirstWebServiceServer - Is this the first Management Server?" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ApPool - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_appool) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "ApPool - Service account of the web service application pool." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("ApPool", value) - end - end - - # Name: ApPoolUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_appoolusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApPoolUsername - Output username of the web service application pool." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AdminGroupMembers - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_admingroupmembers) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AdminGroupMembers - A comma-separated list of users to add to the IIS Administrators group." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SqlServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SqlServer - Name of the SQL Server for the SMA database." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SqlInstance - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SqlInstance - Name of the SQL Instance for the SMA database." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SqlDatabase - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqldatabase) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SqlDatabase - Name of the SMA database." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SiteName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sitename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SiteName - Name of the SMA web site." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: WebServicePort - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_webserviceport) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "WebServicePort - Port of the SMA web site." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: InstallFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_installfolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstallFolder - Installation folder for SMA." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UseSSL - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_usessl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UseSSL - Use SSL?" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SpecifyCertificate - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_specifycertificate) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SpecifyCertificate - Specify an existing certificate for the SMA web site." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CertificateName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_certificatename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CertificateName - Name of the existing certificate to use." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ETWManifest - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_etwmanifest) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ETWManifest - Log to ETW." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SendCEIPReports - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sendceipreports) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SendCEIPReports - Send Customer Experience Improvement Program." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MSUpdate - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_msupdate) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MSUpdate - Use Microsoft Update." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProductKey - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_productkey) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProductKey - Product key for licensed installations." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RunbookWorkerServers - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_runbookworkerservers, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "RunbookWorkerServers - Array of Runbook Worker servers in this deployment." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscsmawebserviceserversetup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscspfserver.rb b/lib/puppet/type/dsc_xscspfserver.rb deleted file mode 100644 index e565a144..00000000 --- a/lib/puppet/type/dsc_xscspfserver.rb +++ /dev/null @@ -1,139 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscspfserver) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCSPFServer resource type. - Automatically generated from - 'xSCSPF/DSCResources/MSFT_xSCSPFServer/MSFT_xSCSPFServer.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xSCSPFServer' end - def dscmeta_resource_name; 'MSFT_xSCSPFServer' end - def dscmeta_module_name; 'xSCSPF' end - def dscmeta_module_version; '1.3.1.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the SPF server exists.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Specifies a name for the server." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ServerType - # Type: string - # IsMandatory: False - # Values: ["VMM", "OM", "DPM", "OMDW", "RDGateway", "Orchestrator", "None"] - newparam(:dsc_servertype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServerType - Specifies the type of server. Valid values are VMM, OM, DPM, OMDW, RDGateway, Orchestrator, None." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['VMM', 'vmm', 'OM', 'om', 'DPM', 'dpm', 'OMDW', 'omdw', 'RDGateway', 'rdgateway', 'Orchestrator', 'orchestrator', 'None', 'none'].include?(value) - fail("Invalid value '#{value}'. Valid values are VMM, OM, DPM, OMDW, RDGateway, Orchestrator, None") - end - end - end - - # Name: SCSPFAdminCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_scspfadmincredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SCSPFAdminCredential - Credential with admin permissions to Service Provider Foundation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SCSPFAdminCredential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscspfserver).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscspfserversetup.rb b/lib/puppet/type/dsc_xscspfserversetup.rb deleted file mode 100644 index 53fa3490..00000000 --- a/lib/puppet/type/dsc_xscspfserversetup.rb +++ /dev/null @@ -1,447 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscspfserversetup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCSPFServerSetup resource type. - Automatically generated from - 'xSCSPF/DSCResources/MSFT_xSCSPFServerSetup/MSFT_xSCSPFServerSetup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xSCSPFServerSetup' end - def dscmeta_resource_name; 'MSFT_xSCSPFServerSetup' end - def dscmeta_module_name; 'xSCSPF' end - def dscmeta_module_version; '1.3.1.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if SPF server is expected to be installed on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - # Name: SendCEIPReports - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sendceipreports) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SendCEIPReports - Participate in the Customer Experience Improvement Program." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UseMicrosoftUpdate - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_usemicrosoftupdate) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UseMicrosoftUpdate - Use Microsoft Update." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SpecifyCertificate - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_specifycertificate) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SpecifyCertificate - Use an existing certificate." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: CertificateName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_certificatename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CertificateName - Name of existing certificate to use." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databaseserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseServer - Name of the database server." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabasePortNumber - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_databaseportnumber) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "DatabasePortNumber - Port of the database server instance." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: DatabaseName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseName - Name of the SPF database." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: WebSitePortNumber - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_websiteportnumber) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "WebSitePortNumber - Port for the SPF web service." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: SCVMM - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_scvmm) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SCVMM - Credential for the VMM application pool." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SCVMM", value) - end - end - - # Name: SCVMMUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_scvmmusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SCVMMUsername - Output username of the VMM application pool serivce." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SCAdmin - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_scadmin) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SCAdmin - Credential for the Admin application pool" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SCAdmin", value) - end - end - - # Name: SCAdminUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_scadminusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SCAdminUsername - Output username of the Admin application pool serivce." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SCProvider - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_scprovider) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SCProvider - Credential for the Provider application pool" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SCProvider", value) - end - end - - # Name: SCProviderUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_scproviderusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SCProviderUsername - Output username of the Provider application pool serivce." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SCUsage - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_scusage) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SCUsage - Credential for the Usage application pool" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SCUsage", value) - end - end - - # Name: SCUsageUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_scusageusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SCUsageUsername - Output username of the Usage application pool serivce." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: VMMSecurityGroupUsers - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_vmmsecuritygroupusers) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "VMMSecurityGroupUsers - Administrator of the VMM application pool." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AdminSecurityGroupUsers - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_adminsecuritygroupusers) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AdminSecurityGroupUsers - Administrator of the Admin application pool" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProviderSecurityGroupUsers - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_providersecuritygroupusers) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProviderSecurityGroupUsers - Administrator of the Provider application pool" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UsageSecurityGroupUsers - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_usagesecuritygroupusers) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UsageSecurityGroupUsers - Administrator of the Usage application pool" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscspfserversetup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscspfserverupdate.rb b/lib/puppet/type/dsc_xscspfserverupdate.rb deleted file mode 100644 index e8c00dac..00000000 --- a/lib/puppet/type/dsc_xscspfserverupdate.rb +++ /dev/null @@ -1,151 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscspfserverupdate) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCSPFServerUpdate resource type. - Automatically generated from - 'xSCSPF/DSCResources/MSFT_xSCSPFServerUpdate/MSFT_xSCSPFServerUpdate.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xSCSPFServerUpdate' end - def dscmeta_resource_name; 'MSFT_xSCSPFServerUpdate' end - def dscmeta_module_name; 'xSCSPF' end - def dscmeta_module_version; '1.3.1.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the update is expected to be installed on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - # Name: Update - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_update) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Update - Display name of the update." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscspfserverupdate).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscspfsetting.rb b/lib/puppet/type/dsc_xscspfsetting.rb deleted file mode 100644 index 147c2b09..00000000 --- a/lib/puppet/type/dsc_xscspfsetting.rb +++ /dev/null @@ -1,171 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscspfsetting) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCSPFSetting resource type. - Automatically generated from - 'xSCSPF/DSCResources/MSFT_xSCSPFSetting/MSFT_xSCSPFSetting.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_servername is a required attribute') if self[:dsc_servername].nil? - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xSCSPFSetting' end - def dscmeta_resource_name; 'MSFT_xSCSPFSetting' end - def dscmeta_module_name; 'xSCSPF' end - def dscmeta_module_version; '1.3.1.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the SPF setting exists.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: ServerName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_servername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServerName - Specifies the name of the server the setting is associated with." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SettingType - # Type: string - # IsMandatory: False - # Values: ["DatabaseConnectionString", "EndPointConnectionString"] - newparam(:dsc_settingtype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SettingType - Specifies either DatabaseConnectionString or EndPointConnectionString. Valid values are DatabaseConnectionString, EndPointConnectionString." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['DatabaseConnectionString', 'databaseconnectionstring', 'EndPointConnectionString', 'endpointconnectionstring'].include?(value) - fail("Invalid value '#{value}'. Valid values are DatabaseConnectionString, EndPointConnectionString") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Specifies a friendly name for the setting." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Value - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_value) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Value - Specifies the value for the setting." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SCSPFAdminCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_scspfadmincredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SCSPFAdminCredential - Credential with admin permissions to Service Provider Foundation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SCSPFAdminCredential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscspfsetting).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscspfstamp.rb b/lib/puppet/type/dsc_xscspfstamp.rb deleted file mode 100644 index e2a83aec..00000000 --- a/lib/puppet/type/dsc_xscspfstamp.rb +++ /dev/null @@ -1,139 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscspfstamp) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCSPFStamp resource type. - Automatically generated from - 'xSCSPF/DSCResources/MSFT_xSCSPFStamp/MSFT_xSCSPFStamp.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xSCSPFStamp' end - def dscmeta_resource_name; 'MSFT_xSCSPFStamp' end - def dscmeta_module_name; 'xSCSPF' end - def dscmeta_module_version; '1.3.1.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the SPF stamp exists.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Specifies a name for the stamp." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Servers - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_servers, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Servers - Specifies the name of one or more server objects to associate with the new stamp." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: SCSPFAdminCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_scspfadmincredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SCSPFAdminCredential - Credential with admin permissions to Service Provider Foundation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SCSPFAdminCredential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscspfstamp).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscsrserversetup.rb b/lib/puppet/type/dsc_xscsrserversetup.rb deleted file mode 100644 index 7e0f532c..00000000 --- a/lib/puppet/type/dsc_xscsrserversetup.rb +++ /dev/null @@ -1,307 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscsrserversetup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCSRServerSetup resource type. - Automatically generated from - 'xSCSR/DSCResources/MSFT_xSCSRServerSetup/MSFT_xSCSRServerSetup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xSCSRServerSetup' end - def dscmeta_resource_name; 'MSFT_xSCSRServerSetup' end - def dscmeta_module_name; 'xSCSR' end - def dscmeta_module_version; '1.3.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the Service Reporting server is expected to be installed on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - # Name: SendCEIPReports - # Type: string - # IsMandatory: False - # Values: ["Yes", "No"] - newparam(:dsc_sendceipreports) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SendCEIPReports - Participation in Customer Experience Improvement Program (yes or no). Valid values are Yes, No." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Yes', 'yes', 'No', 'no'].include?(value) - fail("Invalid value '#{value}'. Valid values are Yes, No") - end - end - end - - # Name: UseMicrosoftUpdate - # Type: string - # IsMandatory: False - # Values: ["Yes", "No"] - newparam(:dsc_usemicrosoftupdate) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UseMicrosoftUpdate - Participation in Microsoft Update (yes or no). Valid values are Yes, No." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Yes', 'yes', 'No', 'no'].include?(value) - fail("Invalid value '#{value}'. Valid values are Yes, No") - end - end - end - - # Name: InstallFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_installfolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstallFolder - Folder to install to." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databaseserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseServer - Name of the server that is running SQL Server where the databases already exist, or where Setup will create them ." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseServerInstance - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databaseserverinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseServerInstance - Name of the SQL Server database instance to install to." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RepositoryDatabaseName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_repositorydatabasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RepositoryDatabaseName - Name of the usage repository database that already exists, or that Setup will create." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: StagingDatabaseName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_stagingdatabasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "StagingDatabaseName - Name of the usage staging database that already exists, or that Setup will create." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DWDatabaseName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_dwdatabasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DWDatabaseName - Name of the usage data warehouse database that already exists, or that Setup will create." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AnalysisDatabaseServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_analysisdatabaseserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AnalysisDatabaseServer - Name of the server that is running SQL Server where the analysis database already exists, or where Setup will create it." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AnalysisDatabaseServerInstance - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_analysisdatabaseserverinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AnalysisDatabaseServerInstance - Name of the SQL Server analysis database instance to install to." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AnalysisDatabaseName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_analysisdatabasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AnalysisDatabaseName - Name of the analysis database that already exists, or that Setup will create." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscsrserversetup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscsrserverupdate.rb b/lib/puppet/type/dsc_xscsrserverupdate.rb deleted file mode 100644 index 086bf3cb..00000000 --- a/lib/puppet/type/dsc_xscsrserverupdate.rb +++ /dev/null @@ -1,151 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscsrserverupdate) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCSRServerUpdate resource type. - Automatically generated from - 'xSCSR/DSCResources/MSFT_xSCSRServerUpdate/MSFT_xSCSRServerUpdate.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xSCSRServerUpdate' end - def dscmeta_resource_name; 'MSFT_xSCSRServerUpdate' end - def dscmeta_module_name; 'xSCSR' end - def dscmeta_module_version; '1.3.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the update is expected to be installed on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - # Name: Update - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_update) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Update - Display name of the update." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscsrserverupdate).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscvmmadmin.rb b/lib/puppet/type/dsc_xscvmmadmin.rb deleted file mode 100644 index 41788292..00000000 --- a/lib/puppet/type/dsc_xscvmmadmin.rb +++ /dev/null @@ -1,138 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscvmmadmin) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCVMMAdmin resource type. - Automatically generated from - 'xSCVMM/DSCResources/MSFT_xSCVMMAdmin/MSFT_xSCVMMAdmin.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_principal is a required attribute') if self[:dsc_principal].nil? - fail('dsc_userrole is a required attribute') if self[:dsc_userrole].nil? - end - - def dscmeta_resource_friendly_name; 'xSCVMMAdmin' end - def dscmeta_resource_name; 'MSFT_xSCVMMAdmin' end - def dscmeta_module_name; 'xSCVMM' end - def dscmeta_module_version; '1.2.4.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the principal is an Virtual Machine Manager admin.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Principal - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_principal) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Principal - The Virtual Machine Manager admin principal." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UserRole - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_userrole) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UserRole - The Virtual Machine Manager user role." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SCVMMAdminCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_scvmmadmincredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SCVMMAdminCredential - Credential to be used to perform the operations." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SCVMMAdminCredential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscvmmadmin).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscvmmconsolesetup.rb b/lib/puppet/type/dsc_xscvmmconsolesetup.rb deleted file mode 100644 index ee50f05d..00000000 --- a/lib/puppet/type/dsc_xscvmmconsolesetup.rb +++ /dev/null @@ -1,187 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscvmmconsolesetup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCVMMConsoleSetup resource type. - Automatically generated from - 'xSCVMM/DSCResources/MSFT_xSCVMMConsoleSetup/MSFT_xSCVMMConsoleSetup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xSCVMMConsoleSetup' end - def dscmeta_resource_name; 'MSFT_xSCVMMConsoleSetup' end - def dscmeta_module_name; 'xSCVMM' end - def dscmeta_module_version; '1.2.4.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the DPM server is expected to be installed on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - # Name: ProgramFiles - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_programfiles) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProgramFiles - Installation path for the software." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IndigoTcpPort - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_indigotcpport) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "IndigoTcpPort - Port for communication with the VMM management server." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MUOptIn - # Type: uint8 - # IsMandatory: False - # Values: None - newparam(:dsc_muoptin) do - def mof_type; 'uint8' end - def mof_is_embedded?; false end - desc "MUOptIn - 0: Do not opt in to Microsoft Update. 1: Opt in to Microsoft Update." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscvmmconsolesetup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscvmmconsoleupdate.rb b/lib/puppet/type/dsc_xscvmmconsoleupdate.rb deleted file mode 100644 index 53bacedd..00000000 --- a/lib/puppet/type/dsc_xscvmmconsoleupdate.rb +++ /dev/null @@ -1,151 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscvmmconsoleupdate) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCVMMConsoleUpdate resource type. - Automatically generated from - 'xSCVMM/DSCResources/MSFT_xSCVMMConsoleUpdate/MSFT_xSCVMMConsoleUpdate.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xSCVMMConsoleUpdate' end - def dscmeta_resource_name; 'MSFT_xSCVMMConsoleUpdate' end - def dscmeta_module_name; 'xSCVMM' end - def dscmeta_module_version; '1.2.4.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the update is expected to be installed on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - # Name: Update - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_update) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Update - Display name of the update." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscvmmconsoleupdate).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscvmmmanagementserversetup.rb b/lib/puppet/type/dsc_xscvmmmanagementserversetup.rb deleted file mode 100644 index 4ae926de..00000000 --- a/lib/puppet/type/dsc_xscvmmmanagementserversetup.rb +++ /dev/null @@ -1,604 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscvmmmanagementserversetup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCVMMManagementServerSetup resource type. - Automatically generated from - 'xSCVMM/DSCResources/MSFT_xSCVMMManagementServerSetup/MSFT_xSCVMMManagementServerSetup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xSCVMMManagementServerSetup' end - def dscmeta_resource_name; 'MSFT_xSCVMMManagementServerSetup' end - def dscmeta_module_name; 'xSCVMM' end - def dscmeta_module_version; '1.2.4.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the DPM server is expected to be installed on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - # Name: vmmService - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_vmmservice) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "vmmService - Domain account for the VMM service." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("vmmService", value) - end - end - - # Name: vmmServiceUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_vmmserviceusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "vmmServiceUsername - Output username of the VMM service." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProductKey - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_productkey) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProductKey - Product key for licensed installations." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UserName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_username) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UserName - Display name for the user." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CompanyName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_companyname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CompanyName - Display name for the organization." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProgramFiles - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_programfiles) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProgramFiles - Installation path for the software." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ClusterManagementServer - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_clustermanagementserver) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ClusterManagementServer - Is this a clustered Management Server?" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: FirstManagementServer - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_firstmanagementserver) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "FirstManagementServer - Is this the first Management Server?" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: CreateNewSqlDatabase - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_createnewsqldatabase) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CreateNewSqlDatabase - 0: Use an existing Microsoft SQL Server database. 1: Create a new SQL Server database." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SqlMachineName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlmachinename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SqlMachineName - Name of the server that is hosting SQL Server." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SqlInstanceName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlinstancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SqlInstanceName - Name of the new or existing instance of SQL Server." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SqlDatabaseName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqldatabasename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SqlDatabaseName - Name of the new or existing SQL Server database." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IndigoTcpPort - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_indigotcpport) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "IndigoTcpPort - Port for communication with the VMM console." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: IndigoHTTPSPort - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_indigohttpsport) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "IndigoHTTPSPort - Port for communication with the Windows Preinstallation Environment agents." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: IndigoNETTCPPort - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_indigonettcpport) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "IndigoNETTCPPort - Port for communication with Windows Deployment Services." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: IndigoHTTPPort - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_indigohttpport) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "IndigoHTTPPort - Port for communication with Windows PE agent for time synchronization." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: WSManTcpPort - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_wsmantcpport) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "WSManTcpPort - Port for communication with agents on hosts and library servers." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: BitsTcpPort - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_bitstcpport) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "BitsTcpPort - Port for file transfers to agents on hosts and library servers." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: CreateNewLibraryShare - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_createnewlibraryshare) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CreateNewLibraryShare - 0: Use an existing library share. 1: Create a new library share." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LibraryShareName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_librarysharename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LibraryShareName - Name of the file share to be used or created." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LibrarySharePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_librarysharepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LibrarySharePath - Location of the existing file share or the new file share to be created." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LibraryShareDescription - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_librarysharedescription) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LibraryShareDescription - Description of the share." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TopContainerName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_topcontainername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TopContainerName - Container for Distributed Key Management." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: VmmServerName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_vmmservername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "VmmServerName - Clustered service name for a highly available VMM management server." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: VMMStaticIPAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_vmmstaticipaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "VMMStaticIPAddress - IP address for the clustered service name for a highly available VMM management server, if you are not using Dynamic Host Configuration Protocol (DHCP)." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RetainSqlDatabase - # Type: uint8 - # IsMandatory: False - # Values: None - newparam(:dsc_retainsqldatabase) do - def mof_type; 'uint8' end - def mof_is_embedded?; false end - desc "RetainSqlDatabase - 0: Remove the SQL Server database. 1: Do not remove the SQL Server database." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ForceHAVMMUninstall - # Type: uint8 - # IsMandatory: False - # Values: None - newparam(:dsc_forcehavmmuninstall) do - def mof_type; 'uint8' end - def mof_is_embedded?; false end - desc "ForceHAVMMUninstall - 0: Do not force uninstallation if setup.exe cannot verify whether this node is the final node of the highly available installation. 1: Force the uninstallation." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: SQMOptIn - # Type: uint8 - # IsMandatory: False - # Values: None - newparam(:dsc_sqmoptin) do - def mof_type; 'uint8' end - def mof_is_embedded?; false end - desc "SQMOptIn - 0: Do not opt in to the Customer Experience Improvement Program (CEIP). 1: Opt in to CEIP." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MUOptIn - # Type: uint8 - # IsMandatory: False - # Values: None - newparam(:dsc_muoptin) do - def mof_type; 'uint8' end - def mof_is_embedded?; false end - desc "MUOptIn - 0: Do not opt in to Microsoft Update. 1: Opt in to Microsoft Update." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscvmmmanagementserversetup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xscvmmmanagementserverupdate.rb b/lib/puppet/type/dsc_xscvmmmanagementserverupdate.rb deleted file mode 100644 index c1873ae3..00000000 --- a/lib/puppet/type/dsc_xscvmmmanagementserverupdate.rb +++ /dev/null @@ -1,151 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xscvmmmanagementserverupdate) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSCVMMManagementServerUpdate resource type. - Automatically generated from - 'xSCVMM/DSCResources/MSFT_xSCVMMManagementServerUpdate/MSFT_xSCVMMManagementServerUpdate.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xSCVMMManagementServerUpdate' end - def dscmeta_resource_name; 'MSFT_xSCVMMManagementServerUpdate' end - def dscmeta_module_name; 'xSCVMM' end - def dscmeta_module_version; '1.2.4.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the update is expected to be installed on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - # Name: Update - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_update) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Update - Display name of the update." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xscvmmmanagementserverupdate).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xservice.rb b/lib/puppet/type/dsc_xservice.rb deleted file mode 100644 index 11b0155d..00000000 --- a/lib/puppet/type/dsc_xservice.rb +++ /dev/null @@ -1,290 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xservice) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xService resource type. - Automatically generated from - 'xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/MSFT_xServiceResource.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xService' end - def dscmeta_resource_name; 'MSFT_xServiceResource' end - def dscmeta_module_name; 'xPSDesiredStateConfiguration' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Indicates the service name. Note that sometimes this is different from the display name. You can get a list of the services and their current state with the Get-Service cmdlet." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Ensures that the service is present or absent. Defaults to Present. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Path - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - The path to the service executable file." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: StartupType - # Type: string - # IsMandatory: False - # Values: ["Automatic", "Manual", "Disabled"] - newparam(:dsc_startuptype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "StartupType - Indicates the startup type for the service. Valid values are Automatic, Manual, Disabled." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Automatic', 'automatic', 'Manual', 'manual', 'Disabled', 'disabled'].include?(value) - fail("Invalid value '#{value}'. Valid values are Automatic, Manual, Disabled") - end - end - end - - # Name: BuiltInAccount - # Type: string - # IsMandatory: False - # Values: ["LocalSystem", "LocalService", "NetworkService"] - newparam(:dsc_builtinaccount) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "BuiltInAccount - Indicates the sign-in account to use for the service. Valid values are LocalSystem, LocalService, NetworkService." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['LocalSystem', 'localsystem', 'LocalService', 'localservice', 'NetworkService', 'networkservice'].include?(value) - fail("Invalid value '#{value}'. Valid values are LocalSystem, LocalService, NetworkService") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - The credential to run the service under." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: DesktopInteract - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_desktopinteract) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DesktopInteract - The service can create or communicate with a window on the desktop. Must be false for services not running as LocalSystem. Defaults to False." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: State - # Type: string - # IsMandatory: False - # Values: ["Running", "Stopped", "Ignore"] - newparam(:dsc_state) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "State - Indicates the state you want to ensure for the service. Defaults to Running. Valid values are Running, Stopped, Ignore." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Running', 'running', 'Stopped', 'stopped', 'Ignore', 'ignore'].include?(value) - fail("Invalid value '#{value}'. Valid values are Running, Stopped, Ignore") - end - end - end - - # Name: DisplayName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_displayname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DisplayName - The display name of the service." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - The description of the service." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Dependencies - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_dependencies, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Dependencies - An array of strings indicating the names of the dependencies of the service." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: StartupTimeout - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_startuptimeout) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "StartupTimeout - The time to wait for the service to start in milliseconds. Defaults to 30000." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: TerminateTimeout - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_terminatetimeout) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "TerminateTimeout - The time to wait for the service to stop in milliseconds. Defaults to 30000." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xservice).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsmacredential.rb b/lib/puppet/type/dsc_xsmacredential.rb deleted file mode 100644 index cae2a5d9..00000000 --- a/lib/puppet/type/dsc_xsmacredential.rb +++ /dev/null @@ -1,164 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsmacredential) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSmaCredential resource type. - Automatically generated from - 'xSCSMA/DSCResources/MSFT_xSmaCredential/MSFT_xSmaCredential.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xSmaCredential' end - def dscmeta_resource_name; 'MSFT_xSmaCredential' end - def dscmeta_module_name; 'xSCSMA' end - def dscmeta_module_version; '1.5.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of credential." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "credential - Credential object to be imported." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("credential", value) - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - Description of credential." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: WebServiceEndpoint - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_webserviceendpoint) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WebServiceEndpoint - Web service endpoint of SMA instance." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Port - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_port) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "Port - Port to reach the web service endpoint." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: UserName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_username) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UserName - User name of credential found within SMA" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsmacredential).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsmbshare.rb b/lib/puppet/type/dsc_xsmbshare.rb deleted file mode 100644 index 33036bc2..00000000 --- a/lib/puppet/type/dsc_xsmbshare.rb +++ /dev/null @@ -1,319 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsmbshare) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSmbShare resource type. - Automatically generated from - 'xSmbShare/DscResources/MSFT_xSmbShare/MSFT_xSmbShare.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xSmbShare' end - def dscmeta_resource_name; 'MSFT_xSmbShare' end - def dscmeta_module_name; 'xSmbShare' end - def dscmeta_module_version; '2.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of the SMB Share" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Path - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - Path to the share" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - Description of the share" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ChangeAccess - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_changeaccess, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ChangeAccess - Specifies which user will be granted modify permission to access the share" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ConcurrentUserLimit - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_concurrentuserlimit) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "ConcurrentUserLimit - Specifies the maximum number of concurrently connected users that the new SMB share may accommodate. If this parameter is set to zero (0), then the number of users is unlimited. The default value is zero (0)." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: EncryptData - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_encryptdata) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "EncryptData - Indicates that the share is encrypted." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: FolderEnumerationMode - # Type: string - # IsMandatory: False - # Values: ["AccessBased", "Unrestricted"] - newparam(:dsc_folderenumerationmode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FolderEnumerationMode - Specifies which files and folders in the new SMB share are visible to users. Valid values are AccessBased, Unrestricted." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['AccessBased', 'accessbased', 'Unrestricted', 'unrestricted'].include?(value) - fail("Invalid value '#{value}'. Valid values are AccessBased, Unrestricted") - end - end - end - - # Name: FullAccess - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_fullaccess, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "FullAccess - Specifies which accounts are granted full permission to access the share." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: NoAccess - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_noaccess, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "NoAccess - Specifies which accounts are denied access to the share." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ReadAccess - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_readaccess, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ReadAccess - Specifies which user is granted read permission to access the share." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies if the share should be added or removed Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: ShareState - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sharestate) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ShareState - Specfies the state of the share" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ShareType - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sharetype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ShareType - Specfies the type of the share" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ShadowCopy - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_shadowcopy) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ShadowCopy - Specifies if this share is a ShadowCopy" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Special - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_special) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Special - Specifies if this share is a Special Share. Admin share, default shares, IPC$ share are examples." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsmbshare).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlalias.rb b/lib/puppet/type/dsc_xsqlalias.rb deleted file mode 100644 index 58ab9fa7..00000000 --- a/lib/puppet/type/dsc_xsqlalias.rb +++ /dev/null @@ -1,171 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlalias) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSqlAlias resource type. - Automatically generated from - 'xSqlPs/DSCResources/MSFT_xSqlAlias/MSFT_xSqlAlias.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xSqlAlias' end - def dscmeta_resource_name; 'MSFT_xSqlAlias' end - def dscmeta_module_name; 'xSqlPs' end - def dscmeta_module_version; '1.4.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Protocol - # Type: string - # IsMandatory: False - # Values: ["TCP", "NP"] - newparam(:dsc_protocol) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Protocol - Valid values are TCP, NP." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['TCP', 'tcp', 'NP', 'np'].include?(value) - fail("Invalid value '#{value}'. Valid values are TCP, NP") - end - end - end - - # Name: ServerName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_servername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServerName" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TCPPort - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_tcpport) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "TCPPort" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: PipeName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_pipename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PipeName" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlalias).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlaogroupensure.rb b/lib/puppet/type/dsc_xsqlaogroupensure.rb deleted file mode 100644 index 6703f41c..00000000 --- a/lib/puppet/type/dsc_xsqlaogroupensure.rb +++ /dev/null @@ -1,294 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlaogroupensure) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLAOGroupEnsure resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLAOGroupEnsure/MSFT_xSQLAOGroupEnsure.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - fail('dsc_availabilitygroupname is a required attribute') if self[:dsc_availabilitygroupname].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLAOGroupEnsure' end - def dscmeta_resource_name; 'MSFT_xSQLAOGroupEnsure' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Determines whether the availability group should be added or removed. Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: AvailabilityGroupName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_availabilitygroupname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AvailabilityGroupName - Name for availability group." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AvailabilityGroupNameListener - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_availabilitygroupnamelistener) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AvailabilityGroupNameListener - Listener name for availability group." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AvailabilityGroupNameIP - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_availabilitygroupnameip, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "AvailabilityGroupNameIP - List of IP addresses associated with listener." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: AvailabilityGroupSubMask - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_availabilitygroupsubmask, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "AvailabilityGroupSubMask - Network subnetmask for listener." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: AvailabilityGroupPort - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_availabilitygroupport) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "AvailabilityGroupPort - Port availability group should listen on." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ReadableSecondary - # Type: string - # IsMandatory: False - # Values: ["None", "ReadOnly", "ReadIntent"] - newparam(:dsc_readablesecondary) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ReadableSecondary - Mode secondaries should operate under (None, ReadOnly, ReadIntent). Valid values are None, ReadOnly, ReadIntent." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['None', 'none', 'ReadOnly', 'readonly', 'ReadIntent', 'readintent'].include?(value) - fail("Invalid value '#{value}'. Valid values are None, ReadOnly, ReadIntent") - end - end - end - - # Name: AutoBackupPreference - # Type: string - # IsMandatory: False - # Values: ["Primary", "Secondary"] - newparam(:dsc_autobackuppreference) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AutoBackupPreference - Where backups should be backed up from (Primary, Secondary). Valid values are Primary, Secondary." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Primary', 'primary', 'Secondary', 'secondary'].include?(value) - fail("Invalid value '#{value}'. Valid values are Primary, Secondary") - end - end - end - - # Name: BackupPriority - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_backuppriority) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "BackupPriority - The percentage weight for backup prority (default 50)." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: EndPointPort - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_endpointport) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "EndPointPort - he TCP port for the SQL AG Endpoint (default 5022)." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: SQLServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLServer - The SQL Server for the database." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLInstanceName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlinstancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLInstanceName - The SQL instance for the database." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to Grant Permissions on SQL Server, set this to $null to use Windows Authentication." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlaogroupensure).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlaogroupjoin.rb b/lib/puppet/type/dsc_xsqlaogroupjoin.rb deleted file mode 100644 index 77d1281e..00000000 --- a/lib/puppet/type/dsc_xsqlaogroupjoin.rb +++ /dev/null @@ -1,153 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlaogroupjoin) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLAOGroupJoin resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLAOGroupJoin/MSFT_xSQLAOGroupJoin.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - fail('dsc_availabilitygroupname is a required attribute') if self[:dsc_availabilitygroupname].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLAOGroupJoin' end - def dscmeta_resource_name; 'MSFT_xSQLAOGroupJoin' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - If the replica should be joined ('Present') to the Availability Group or not joined ('Absent') to the Availability Group. Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: AvailabilityGroupName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_availabilitygroupname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AvailabilityGroupName - The name Availability Group to join." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLServer - Name of the SQL server to be configured." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLInstanceName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlinstancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLInstanceName - Name of the SQL instance to be configured." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to Grant Permissions in SQL." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlaogroupjoin).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlhaendpoint.rb b/lib/puppet/type/dsc_xsqlhaendpoint.rb deleted file mode 100644 index ce34e2fb..00000000 --- a/lib/puppet/type/dsc_xsqlhaendpoint.rb +++ /dev/null @@ -1,135 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlhaendpoint) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSqlHAEndPoint resource type. - Automatically generated from - 'xSqlPs/DSCResources/MSFT_xSqlHAEndPoint/MSFT_xSqlHAEndPoint.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_instancename is a required attribute') if self[:dsc_instancename].nil? - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xSqlHAEndPoint' end - def dscmeta_resource_name; 'MSFT_xSqlHAEndPoint' end - def dscmeta_module_name; 'xSqlPs' end - def dscmeta_module_version; '1.4.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: InstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_instancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceName - Name of Sql Instance." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AllowedUser - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_alloweduser) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AllowedUser - Windows Account that could access the HA database mirroring endpoing." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Unique name for HA database mirroring endpoint of the sql instance." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PortNumber - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_portnumber) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "PortNumber - The single port number(nnnn) on which the Sql HA to listen to." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlhaendpoint).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlhagroup.rb b/lib/puppet/type/dsc_xsqlhagroup.rb deleted file mode 100644 index 376500da..00000000 --- a/lib/puppet/type/dsc_xsqlhagroup.rb +++ /dev/null @@ -1,195 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlhagroup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSqlHAGroup resource type. - Automatically generated from - 'xSqlPs/DSCResources/MSFT_xSqlHAGroup/MSFT_xSqlHAGroup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xSqlHAGroup' end - def dscmeta_resource_name; 'MSFT_xSqlHAGroup' end - def dscmeta_module_name; 'xSqlPs' end - def dscmeta_module_version; '1.4.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of sql availability group" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Database - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_database, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Database - Array of databases on the local sql instance. Each database can belong to only one HA group." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ClusterName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_clustername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ClusterName - The name of windows failover cluster for the availability group" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseBackupPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_databasebackuppath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DatabaseBackupPath - The net share for Sql replication initialization" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstanceName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_instancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceName - Name of sql instance" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: EndPointName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_endpointname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EndPointName - Name of EndPoint to access High Availability sql instance." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DomainCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_domaincredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "DomainCredential - Domain credential could get list of cluster nodes." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("DomainCredential", value) - end - end - - # Name: SqlAdministratorCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_sqladministratorcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SqlAdministratorCredential - Sql sa credential." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SqlAdministratorCredential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlhagroup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlhaservice.rb b/lib/puppet/type/dsc_xsqlhaservice.rb deleted file mode 100644 index 0ca46879..00000000 --- a/lib/puppet/type/dsc_xsqlhaservice.rb +++ /dev/null @@ -1,117 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlhaservice) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSqlHAService resource type. - Automatically generated from - 'xSqlPs/DSCResources/MSFT_xSqlHAService/MSFT_xSqlHAService.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_instancename is a required attribute') if self[:dsc_instancename].nil? - end - - def dscmeta_resource_friendly_name; 'xSqlHAService' end - def dscmeta_resource_name; 'MSFT_xSqlHAService' end - def dscmeta_module_name; 'xSqlPs' end - def dscmeta_module_version; '1.4.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: InstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_instancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceName - The name of Sql instance." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SqlAdministratorCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_sqladministratorcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SqlAdministratorCredential - Sql sa credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SqlAdministratorCredential", value) - end - end - - # Name: ServiceCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_servicecredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "ServiceCredential - Domain credential to run sql service" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("ServiceCredential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlhaservice).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserveralias.rb b/lib/puppet/type/dsc_xsqlserveralias.rb deleted file mode 100644 index 0c58236b..00000000 --- a/lib/puppet/type/dsc_xsqlserveralias.rb +++ /dev/null @@ -1,189 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserveralias) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerAlias resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerAlias/MSFT_xSQLServerAlias.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - fail('dsc_servername is a required attribute') if self[:dsc_servername].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerAlias' end - def dscmeta_resource_name; 'MSFT_xSQLServerAlias' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of Alias (e.g. svr01\\inst01)." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Protocol - # Type: string - # IsMandatory: False - # Values: ["TCP", "NP"] - newparam(:dsc_protocol) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Protocol - Protocol to use when connecting. Valid values are 'TCP' or 'NP' (Named Pipes). Default value is 'TCP'. Valid values are TCP, NP." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['TCP', 'tcp', 'NP', 'np'].include?(value) - fail("Invalid value '#{value}'. Valid values are TCP, NP") - end - end - end - - # Name: ServerName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_servername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServerName - The SQL Server you are aliasing (the netbios name or FQDN)." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TcpPort - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_tcpport) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "TcpPort - The TCP port SQL is listening on. Only used when protocol is set to 'TCP'. Default value is port 1433." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: UseDynamicTcpPort - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_usedynamictcpport) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UseDynamicTcpPort - The UseDynamicTcpPort specify that the Net-Library will determine the port dynamically. The port specified in Port number will not be used. Default value is '$false'." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: PipeName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_pipename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PipeName - Named Pipes path from the Get-TargetResource method." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Determines whether the alias should be added or removed. Default value is 'Present' Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserveralias).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserveralwaysonavailabilitygroup.rb b/lib/puppet/type/dsc_xsqlserveralwaysonavailabilitygroup.rb deleted file mode 100644 index 089ca85c..00000000 --- a/lib/puppet/type/dsc_xsqlserveralwaysonavailabilitygroup.rb +++ /dev/null @@ -1,312 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserveralwaysonavailabilitygroup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerAlwaysOnAvailabilityGroup resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnAvailabilityGroup/MSFT_xSQLServerAlwaysOnAvailabilityGroup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - fail('dsc_sqlinstancename is a required attribute') if self[:dsc_sqlinstancename].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerAlwaysOnAvailabilityGroup' end - def dscmeta_resource_name; 'MSFT_xSQLServerAlwaysOnAvailabilityGroup' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the availability group." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLServer - Hostname of the SQL Server to be configured." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLInstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sqlinstancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLInstanceName - Name of the SQL instance to be configued." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies if the availability group should be present or absent. Default is Present. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: AutomatedBackupPreference - # Type: string - # IsMandatory: False - # Values: ["Primary", "SecondaryOnly", "Secondary", "None"] - newparam(:dsc_automatedbackuppreference) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AutomatedBackupPreference - Specifies the automated backup preference for the availability group. Default is None Valid values are Primary, SecondaryOnly, Secondary, None." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Primary', 'primary', 'SecondaryOnly', 'secondaryonly', 'Secondary', 'secondary', 'None', 'none'].include?(value) - fail("Invalid value '#{value}'. Valid values are Primary, SecondaryOnly, Secondary, None") - end - end - end - - # Name: AvailabilityMode - # Type: string - # IsMandatory: False - # Values: ["AsynchronousCommit", "SynchronousCommit"] - newparam(:dsc_availabilitymode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AvailabilityMode - Specifies the replica availability mode. Default is 'AsynchronousCommit'. Valid values are AsynchronousCommit, SynchronousCommit." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['AsynchronousCommit', 'asynchronouscommit', 'SynchronousCommit', 'synchronouscommit'].include?(value) - fail("Invalid value '#{value}'. Valid values are AsynchronousCommit, SynchronousCommit") - end - end - end - - # Name: BackupPriority - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_backuppriority) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "BackupPriority - Specifies the desired priority of the replicas in performing backups. The acceptable values for this parameter are: integers from 0 through 100. Of the set of replicas which are online and available, the replica that has the highest priority performs the backup. Default is 50." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: BasicAvailabilityGroup - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_basicavailabilitygroup) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "BasicAvailabilityGroup - Specifies the type of availability group is Basic. This is only available is SQL Server 2016 and later and is ignored when applied to previous versions." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ConnectionModeInPrimaryRole - # Type: string - # IsMandatory: False - # Values: ["AllowAllConnections", "AllowReadWriteConnections"] - newparam(:dsc_connectionmodeinprimaryrole) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConnectionModeInPrimaryRole - Specifies how the availability replica handles connections when in the primary role. Valid values are AllowAllConnections, AllowReadWriteConnections." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['AllowAllConnections', 'allowallconnections', 'AllowReadWriteConnections', 'allowreadwriteconnections'].include?(value) - fail("Invalid value '#{value}'. Valid values are AllowAllConnections, AllowReadWriteConnections") - end - end - end - - # Name: ConnectionModeInSecondaryRole - # Type: string - # IsMandatory: False - # Values: ["AllowNoConnections", "AllowReadIntentConnectionsOnly", "AllowAllConnections"] - newparam(:dsc_connectionmodeinsecondaryrole) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConnectionModeInSecondaryRole - Specifies how the availability replica handles connections when in the secondary role. Valid values are AllowNoConnections, AllowReadIntentConnectionsOnly, AllowAllConnections." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['AllowNoConnections', 'allownoconnections', 'AllowReadIntentConnectionsOnly', 'allowreadintentconnectionsonly', 'AllowAllConnections', 'allowallconnections'].include?(value) - fail("Invalid value '#{value}'. Valid values are AllowNoConnections, AllowReadIntentConnectionsOnly, AllowAllConnections") - end - end - end - - # Name: EndpointHostName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_endpointhostname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EndpointHostName - Specifies the hostname or IP address of the availability group replica endpoint. Default is the instance network name." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FailureConditionLevel - # Type: string - # IsMandatory: False - # Values: ["OnServerDown", "OnServerUnresponsive", "OnCriticalServerErrors", "OnModerateServerErrors", "OnAnyQualifiedFailureCondition"] - newparam(:dsc_failureconditionlevel) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FailureConditionLevel - Specifies the automatic failover behavior of the availability group. Valid values are OnServerDown, OnServerUnresponsive, OnCriticalServerErrors, OnModerateServerErrors, OnAnyQualifiedFailureCondition." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['OnServerDown', 'onserverdown', 'OnServerUnresponsive', 'onserverunresponsive', 'OnCriticalServerErrors', 'oncriticalservererrors', 'OnModerateServerErrors', 'onmoderateservererrors', 'OnAnyQualifiedFailureCondition', 'onanyqualifiedfailurecondition'].include?(value) - fail("Invalid value '#{value}'. Valid values are OnServerDown, OnServerUnresponsive, OnCriticalServerErrors, OnModerateServerErrors, OnAnyQualifiedFailureCondition") - end - end - end - - # Name: FailoverMode - # Type: string - # IsMandatory: False - # Values: ["Automatic", "Manual"] - newparam(:dsc_failovermode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FailoverMode - Specifies the failover mode. Default is 'Manual'. Valid values are Automatic, Manual." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Automatic', 'automatic', 'Manual', 'manual'].include?(value) - fail("Invalid value '#{value}'. Valid values are Automatic, Manual") - end - end - end - - # Name: HealthCheckTimeout - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_healthchecktimeout) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "HealthCheckTimeout - Specifies the length of time, in milliseconds, after which AlwaysOn availability groups declare an unresponsive server to be unhealthy. Default is 30000." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserveralwaysonavailabilitygroup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserveralwaysonavailabilitygroupreplica.rb b/lib/puppet/type/dsc_xsqlserveralwaysonavailabilitygroupreplica.rb deleted file mode 100644 index 15dad18a..00000000 --- a/lib/puppet/type/dsc_xsqlserveralwaysonavailabilitygroupreplica.rb +++ /dev/null @@ -1,337 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserveralwaysonavailabilitygroupreplica) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerAlwaysOnAvailabilityGroupReplica resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnAvailabilityGroupReplica/MSFT_xSQLServerAlwaysOnAvailabilityGroupReplica.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - fail('dsc_availabilitygroupname is a required attribute') if self[:dsc_availabilitygroupname].nil? - fail('dsc_sqlinstancename is a required attribute') if self[:dsc_sqlinstancename].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerAlwaysOnAvailabilityGroupReplica' end - def dscmeta_resource_name; 'MSFT_xSQLServerAlwaysOnAvailabilityGroupReplica' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the availability group replica." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AvailabilityGroupName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_availabilitygroupname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AvailabilityGroupName - The name of the availability group." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLServer - Hostname of the SQL Server to be configured." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLInstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sqlinstancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLInstanceName - Name of the SQL instance to be configued." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PrimaryReplicaSQLServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_primaryreplicasqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PrimaryReplicaSQLServer - Hostname of the SQL Server where the primary replica is expected to be active. If the primary replica is not found here, the resource will attempt to find the host that holds the primary replica and connect to it." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PrimaryReplicaSQLInstanceName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_primaryreplicasqlinstancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PrimaryReplicaSQLInstanceName - Name of the SQL instance where the primary replica lives." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies if the availability group replica should be present or absent. Default is Present. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: AvailabilityMode - # Type: string - # IsMandatory: False - # Values: ["AsynchronousCommit", "SynchronousCommit"] - newparam(:dsc_availabilitymode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AvailabilityMode - Specifies the replica availability mode. Default is 'AsynchronousCommit'. Valid values are AsynchronousCommit, SynchronousCommit." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['AsynchronousCommit', 'asynchronouscommit', 'SynchronousCommit', 'synchronouscommit'].include?(value) - fail("Invalid value '#{value}'. Valid values are AsynchronousCommit, SynchronousCommit") - end - end - end - - # Name: BackupPriority - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_backuppriority) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "BackupPriority - Specifies the desired priority of the replicas in performing backups. The acceptable values for this parameter are: integers from 0 through 100. Of the set of replicas which are online and available, the replica that has the highest priority performs the backup. Default is 50." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ConnectionModeInPrimaryRole - # Type: string - # IsMandatory: False - # Values: ["AllowAllConnections", "AllowReadWriteConnections"] - newparam(:dsc_connectionmodeinprimaryrole) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConnectionModeInPrimaryRole - Specifies how the availability replica handles connections when in the primary role. Valid values are AllowAllConnections, AllowReadWriteConnections." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['AllowAllConnections', 'allowallconnections', 'AllowReadWriteConnections', 'allowreadwriteconnections'].include?(value) - fail("Invalid value '#{value}'. Valid values are AllowAllConnections, AllowReadWriteConnections") - end - end - end - - # Name: ConnectionModeInSecondaryRole - # Type: string - # IsMandatory: False - # Values: ["AllowNoConnections", "AllowReadIntentConnectionsOnly", "AllowAllConnections"] - newparam(:dsc_connectionmodeinsecondaryrole) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConnectionModeInSecondaryRole - Specifies how the availability replica handles connections when in the secondary role. Valid values are AllowNoConnections, AllowReadIntentConnectionsOnly, AllowAllConnections." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['AllowNoConnections', 'allownoconnections', 'AllowReadIntentConnectionsOnly', 'allowreadintentconnectionsonly', 'AllowAllConnections', 'allowallconnections'].include?(value) - fail("Invalid value '#{value}'. Valid values are AllowNoConnections, AllowReadIntentConnectionsOnly, AllowAllConnections") - end - end - end - - # Name: EndpointHostName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_endpointhostname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EndpointHostName - Specifies the hostname or IP address of the availability group replica endpoint. Default is the instance network name which is set in the code because the value can only be determined when connected to the SQL Instance." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FailoverMode - # Type: string - # IsMandatory: False - # Values: ["Automatic", "Manual"] - newparam(:dsc_failovermode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FailoverMode - Specifies the failover mode. Default is 'Manual'. Valid values are Automatic, Manual." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Automatic', 'automatic', 'Manual', 'manual'].include?(value) - fail("Invalid value '#{value}'. Valid values are Automatic, Manual") - end - end - end - - # Name: ReadOnlyRoutingConnectionUrl - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_readonlyroutingconnectionurl) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ReadOnlyRoutingConnectionUrl - Specifies the fully-qualified domain name (FQDN) and port to use when routing to the replica for read only connections." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ReadOnlyRoutingList - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_readonlyroutinglist, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ReadOnlyRoutingList - Specifies an ordered list of replica server names that represent the probe sequence for connection director to use when redirecting read-only connections through this availability replica. This parameter applies if the availability replica is the current primary replica of the availability group." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: SqlServerNetName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlservernetname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SqlServerNetName - Output the NetName property from the SQL Server object. Used by Get-TargetResource" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserveralwaysonavailabilitygroupreplica).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserveralwaysonservice.rb b/lib/puppet/type/dsc_xsqlserveralwaysonservice.rb deleted file mode 100644 index 683c9c8b..00000000 --- a/lib/puppet/type/dsc_xsqlserveralwaysonservice.rb +++ /dev/null @@ -1,140 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserveralwaysonservice) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerAlwaysOnService resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnService/MSFT_xSQLServerAlwaysOnService.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_sqlserver is a required attribute') if self[:dsc_sqlserver].nil? - fail('dsc_sqlinstancename is a required attribute') if self[:dsc_sqlinstancename].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerAlwaysOnService' end - def dscmeta_resource_name; 'MSFT_xSQLServerAlwaysOnService' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - HADR is Present (enabled) or Absent (disabled) Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SQLServer - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLServer - The hostname of the SQL Server to be configured" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLInstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sqlinstancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLInstanceName - Name of the SQL instance to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RestartTimeout - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_restarttimeout) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "RestartTimeout - The length of time, in seconds, to wait for the service to restart. Default is 120 seconds." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserveralwaysonservice).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserveravailabilitygrouplistener.rb b/lib/puppet/type/dsc_xsqlserveravailabilitygrouplistener.rb deleted file mode 100644 index 41588204..00000000 --- a/lib/puppet/type/dsc_xsqlserveravailabilitygrouplistener.rb +++ /dev/null @@ -1,204 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserveravailabilitygrouplistener) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerAvailabilityGroupListener resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerAvailabilityGroupListener/MSFT_xSQLServerAvailabilityGroupListener.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_instancename is a required attribute') if self[:dsc_instancename].nil? - fail('dsc_availabilitygroup is a required attribute') if self[:dsc_availabilitygroup].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerAvailabilityGroupListener' end - def dscmeta_resource_name; 'MSFT_xSQLServerAvailabilityGroupListener' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: InstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_instancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceName - The SQL Server instance name of the primary replica." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: NodeName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_nodename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "NodeName - The host name or FQDN of the primary replica." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the availability group listener, max 15 characters. This name will be used as the Virtual Computer Object (VCO)." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - If the availability group listener should be present or absent. Default value is 'Present'. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: AvailabilityGroup - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_availabilitygroup) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AvailabilityGroup - The name of the availability group to which the availability group listener is or will be connected." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IpAddress - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_ipaddress, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "IpAddress - The IP address used for the availability group listener, in the format 192.168.10.45/255.255.252.0. If using DCHP, set to the first IP-address of the DHCP subnet, in the format 192.168.8.1/255.255.252.0. Must be valid in the cluster-allowed IP range." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Port - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_port) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "Port - The port used for the availability group listener" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: DHCP - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_dhcp) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DHCP - If DHCP should be used for the availability group listener instead of static IP address." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserveravailabilitygrouplistener).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserverconfiguration.rb b/lib/puppet/type/dsc_xsqlserverconfiguration.rb deleted file mode 100644 index eb55227a..00000000 --- a/lib/puppet/type/dsc_xsqlserverconfiguration.rb +++ /dev/null @@ -1,171 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserverconfiguration) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerConfiguration resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerConfiguration/MSFT_xSQLServerConfiguration.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_sqlserver is a required attribute') if self[:dsc_sqlserver].nil? - fail('dsc_sqlinstancename is a required attribute') if self[:dsc_sqlinstancename].nil? - fail('dsc_optionname is a required attribute') if self[:dsc_optionname].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerConfiguration' end - def dscmeta_resource_name; 'MSFT_xSQLServerConfiguration' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: SQLServer - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLServer - The hostname of the SQL Server to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLInstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sqlinstancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLInstanceName - Name of the SQL instance to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: OptionName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_optionname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "OptionName - The name of the SQL configuration option to be checked." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: OptionValue - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_optionvalue) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "OptionValue - The desired value of the SQL configuration option." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RestartService - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_restartservice) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RestartService - Determines whether the instance should be restarted after updating the configuration option." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: RestartTimeout - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_restarttimeout) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "RestartTimeout - The length of time, in seconds, to wait for the service to restart. Default is 120 seconds." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserverconfiguration).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserverdatabase.rb b/lib/puppet/type/dsc_xsqlserverdatabase.rb deleted file mode 100644 index da59de55..00000000 --- a/lib/puppet/type/dsc_xsqlserverdatabase.rb +++ /dev/null @@ -1,139 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserverdatabase) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerDatabase resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerDatabase/MSFT_xSQLServerDatabase.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - fail('dsc_sqlserver is a required attribute') if self[:dsc_sqlserver].nil? - fail('dsc_sqlinstancename is a required attribute') if self[:dsc_sqlinstancename].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerDatabase' end - def dscmeta_resource_name; 'MSFT_xSQLServerDatabase' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the SQL database." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the database is added (Present) or dropped (Absent). Valid values are 'Present' or 'Absent'. Default Value is 'Present'. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SQLServer - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLServer - The host name of the SQL Server to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLInstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sqlinstancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLInstanceName - The name of the SQL instance to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserverdatabase).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserverdatabaseowner.rb b/lib/puppet/type/dsc_xsqlserverdatabaseowner.rb deleted file mode 100644 index fa74d819..00000000 --- a/lib/puppet/type/dsc_xsqlserverdatabaseowner.rb +++ /dev/null @@ -1,130 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserverdatabaseowner) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerDatabaseOwner resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerDatabaseOwner/MSFT_xSQLServerDatabaseOwner.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_database is a required attribute') if self[:dsc_database].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerDatabaseOwner' end - def dscmeta_resource_name; 'MSFT_xSQLServerDatabaseOwner' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Database - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_database) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Database - The name of database to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the login that will become a owner of the desired sql database." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLServer - The host name of the SQL Server to be configured." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLInstanceName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlinstancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLInstanceName - The name of the SQL instance to be configured." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserverdatabaseowner).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserverdatabasepermission.rb b/lib/puppet/type/dsc_xsqlserverdatabasepermission.rb deleted file mode 100644 index 5a3122c1..00000000 --- a/lib/puppet/type/dsc_xsqlserverdatabasepermission.rb +++ /dev/null @@ -1,194 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserverdatabasepermission) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerDatabasePermission resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerDatabasePermission/MSFT_xSQLServerDatabasePermission.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_database is a required attribute') if self[:dsc_database].nil? - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - fail('dsc_permissionstate is a required attribute') if self[:dsc_permissionstate].nil? - fail('dsc_sqlserver is a required attribute') if self[:dsc_sqlserver].nil? - fail('dsc_sqlinstancename is a required attribute') if self[:dsc_sqlinstancename].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerDatabasePermission' end - def dscmeta_resource_name; 'MSFT_xSQLServerDatabasePermission' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - If the values should be present or absent. Valid values are 'Present' or 'Absent'. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Database - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_database) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Database - The name of the database." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the user that should be granted or denied the permission." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PermissionState - # Type: string - # IsMandatory: True - # Values: ["Grant", "Deny"] - newparam(:dsc_permissionstate) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PermissionState - The state of the permission. Valid values are 'Grant' or 'Deny'. Valid values are Grant, Deny." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Grant', 'grant', 'Deny', 'deny'].include?(value) - fail("Invalid value '#{value}'. Valid values are Grant, Deny") - end - end - end - - # Name: Permissions - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_permissions, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Permissions - The set of permissions for the SQL database." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: SQLServer - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLServer - The host name of the SQL Server to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLInstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sqlinstancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLInstanceName - The name of the SQL instance to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserverdatabasepermission).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserverdatabaserecoverymodel.rb b/lib/puppet/type/dsc_xsqlserverdatabaserecoverymodel.rb deleted file mode 100644 index b1512c65..00000000 --- a/lib/puppet/type/dsc_xsqlserverdatabaserecoverymodel.rb +++ /dev/null @@ -1,137 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserverdatabaserecoverymodel) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerDatabaseRecoveryModel resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerDatabaseRecoveryModel/MSFT_xSQLServerDatabaseRecoveryModel.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - fail('dsc_sqlserver is a required attribute') if self[:dsc_sqlserver].nil? - fail('dsc_sqlinstancename is a required attribute') if self[:dsc_sqlinstancename].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerDatabaseRecoveryModel' end - def dscmeta_resource_name; 'MSFT_xSQLServerDatabaseRecoveryModel' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The SQL database name" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RecoveryModel - # Type: string - # IsMandatory: False - # Values: ["Full", "Simple", "BulkLogged"] - newparam(:dsc_recoverymodel) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RecoveryModel - The recovery model to use for the database. Valid values are Full, Simple, BulkLogged." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Full', 'full', 'Simple', 'simple', 'BulkLogged', 'bulklogged'].include?(value) - fail("Invalid value '#{value}'. Valid values are Full, Simple, BulkLogged") - end - end - end - - # Name: SQLServer - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLServer - The host name of the SQL Server to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLInstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sqlinstancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLInstanceName - The name of the SQL instance to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserverdatabaserecoverymodel).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserverdatabaserole.rb b/lib/puppet/type/dsc_xsqlserverdatabaserole.rb deleted file mode 100644 index 379ace27..00000000 --- a/lib/puppet/type/dsc_xsqlserverdatabaserole.rb +++ /dev/null @@ -1,174 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserverdatabaserole) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerDatabaseRole resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerDatabaseRole/MSFT_xSQLServerDatabaseRole.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - fail('dsc_sqlserver is a required attribute') if self[:dsc_sqlserver].nil? - fail('dsc_sqlinstancename is a required attribute') if self[:dsc_sqlinstancename].nil? - fail('dsc_database is a required attribute') if self[:dsc_database].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerDatabaseRole' end - def dscmeta_resource_name; 'MSFT_xSQLServerDatabaseRole' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - If 'Present' (the default value) then the login (user) will be added to the role(s). If 'Absent' then the login (user) will be removed from the role(s). Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the login that will become a member, or removed as a member, of the role(s)." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLServer - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLServer - The host name of the SQL Server to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLInstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sqlinstancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLInstanceName - The name of the SQL instance to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Database - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_database) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Database - The database in which the login (user) and role(s) exist." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Role - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_role, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Role - One or more roles to which the login (user) will be added or removed." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserverdatabaserole).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserverendpoint.rb b/lib/puppet/type/dsc_xsqlserverendpoint.rb deleted file mode 100644 index 235a5664..00000000 --- a/lib/puppet/type/dsc_xsqlserverendpoint.rb +++ /dev/null @@ -1,170 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserverendpoint) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerEndpoint resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerEndpoint/MSFT_xSQLServerEndpoint.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_endpointname is a required attribute') if self[:dsc_endpointname].nil? - fail('dsc_sqlinstancename is a required attribute') if self[:dsc_sqlinstancename].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerEndpoint' end - def dscmeta_resource_name; 'MSFT_xSQLServerEndpoint' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: EndpointName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_endpointname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EndpointName - The name of the endpoint." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - If the endpoint should be present or absent. Default values is 'Present'. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Port - # Type: uint16 - # IsMandatory: False - # Values: None - newparam(:dsc_port) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "Port - The network port the endpoint is listening on. Default value is 5022." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: SQLServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLServer - The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLInstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sqlinstancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLInstanceName - The name of the SQL instance to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IpAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_ipaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IpAddress - The network IP address the endpoint is listening on. Default the endpoint will listen on any valid IP address." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserverendpoint).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserverendpointpermission.rb b/lib/puppet/type/dsc_xsqlserverendpointpermission.rb deleted file mode 100644 index 1ce53658..00000000 --- a/lib/puppet/type/dsc_xsqlserverendpointpermission.rb +++ /dev/null @@ -1,170 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserverendpointpermission) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerEndpointPermission resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerEndpointPermission/MSFT_xSQLServerEndpointPermission.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_instancename is a required attribute') if self[:dsc_instancename].nil? - fail('dsc_principal is a required attribute') if self[:dsc_principal].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerEndpointPermission' end - def dscmeta_resource_name; 'MSFT_xSQLServerEndpointPermission' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: InstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_instancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceName - The name of the SQL instance to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: NodeName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_nodename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "NodeName - The host name of the SQL Server to be configured." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - If the permission should be present or absent. Default value is 'Present'. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the endpoint." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Principal - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_principal) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Principal - The login to which permission will be set." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Permission - # Type: string - # IsMandatory: False - # Values: ["CONNECT"] - newparam(:dsc_permission) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Permission - The permission to set for the login. Valid value for permission are only CONNECT. Valid values are CONNECT." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['CONNECT', 'connect'].include?(value) - fail("Invalid value '#{value}'. Valid values are CONNECT") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserverendpointpermission).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserverendpointstate.rb b/lib/puppet/type/dsc_xsqlserverendpointstate.rb deleted file mode 100644 index 54bfd552..00000000 --- a/lib/puppet/type/dsc_xsqlserverendpointstate.rb +++ /dev/null @@ -1,135 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserverendpointstate) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerEndpointState resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerEndpointState/MSFT_xSQLServerEndpointState.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_instancename is a required attribute') if self[:dsc_instancename].nil? - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerEndpointState' end - def dscmeta_resource_name; 'MSFT_xSQLServerEndpointState' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: InstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_instancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceName - The name of the SQL instance to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: NodeName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_nodename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "NodeName - The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the endpoint." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: State - # Type: string - # IsMandatory: False - # Values: ["Started", "Stopped", "Disabled"] - newparam(:dsc_state) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "State - The state of the endpoint. Valid states are Started, Stopped or Disabled. Default value is 'Started'. Valid values are Started, Stopped, Disabled." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Started', 'started', 'Stopped', 'stopped', 'Disabled', 'disabled'].include?(value) - fail("Invalid value '#{value}'. Valid values are Started, Stopped, Disabled") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserverendpointstate).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserverfailoverclustersetup.rb b/lib/puppet/type/dsc_xsqlserverfailoverclustersetup.rb deleted file mode 100644 index 73af98fa..00000000 --- a/lib/puppet/type/dsc_xsqlserverfailoverclustersetup.rb +++ /dev/null @@ -1,795 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserverfailoverclustersetup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerFailoverClusterSetup resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerFailoverClusterSetup/MSFT_xSQLServerFailoverClusterSetup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_action is a required attribute') if self[:dsc_action].nil? - fail('dsc_instancename is a required attribute') if self[:dsc_instancename].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerFailoverClusterSetup' end - def dscmeta_resource_name; 'MSFT_xSQLServerFailoverClusterSetup' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Action - # Type: string - # IsMandatory: True - # Values: ["Prepare", "Complete"] - newparam(:dsc_action) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Action - Prepare or Complete. Valid values are Prepare, Complete." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Prepare', 'prepare', 'Complete', 'complete'].include?(value) - fail("Invalid value '#{value}'. Valid values are Prepare, Complete") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourceFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcefolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourceFolder - Folder within the source path containing the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - # Name: SourceCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_sourcecredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SourceCredential - Credential to be used to access SourcePath." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SourceCredential", value) - end - end - - # Name: SuppressReboot - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_suppressreboot) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SuppressReboot - Suppress reboot." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ForceReboot - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_forcereboot) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ForceReboot - Force reboot." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Features - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_features) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Features - SQL features to be installed." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_instancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceName - SQL instance to be installed." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstanceID - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_instanceid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceID - SQL instance ID, if different from InstanceName." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PID - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_pid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PID - Product key for licensed installations." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UpdateEnabled - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_updateenabled) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UpdateEnabled - Enabled updates during installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UpdateSource - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_updatesource) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UpdateSource - Source of updates to be applied during installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQMReporting - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqmreporting) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQMReporting - Enable customer experience reporting." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ErrorReporting - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_errorreporting) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ErrorReporting - Enable error reporting." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FailoverClusterGroup - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_failoverclustergroup) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FailoverClusterGroup - Name of the resource group to be used for the SQL Server failover cluster." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FailoverClusterNetworkName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_failoverclusternetworkname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FailoverClusterNetworkName - Network name for the SQL Server failover cluster." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FailoverClusterIPAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_failoverclusteripaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FailoverClusterIPAddress - IPv4 address for the SQL Server failover cluster." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstallSharedDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_installshareddir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstallSharedDir - Installation path for shared SQL files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstallSharedWOWDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_installsharedwowdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstallSharedWOWDir - Installation path for x86 shared SQL files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstanceDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_instancedir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceDir - Installation path for SQL instance files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLSvcAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_sqlsvcaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SQLSvcAccount - Service account for the SQL service." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SQLSvcAccount", value) - end - end - - # Name: SQLSvcAccountUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlsvcaccountusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLSvcAccountUsername - Output username for the SQL service." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AgtSvcAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_agtsvcaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "AgtSvcAccount - Service account for the SQL Agent service." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("AgtSvcAccount", value) - end - end - - # Name: AgtSvcAccountUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_agtsvcaccountusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AgtSvcAccountUsername - Output username for the SQL Agent service." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLCollation - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlcollation) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLCollation - Collation for SQL." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLSysAdminAccounts - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_sqlsysadminaccounts, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "SQLSysAdminAccounts - Array of accounts to be made SQL administrators." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: SecurityMode - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_securitymode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SecurityMode - Security mode." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SAPwd - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_sapwd) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SAPwd - SA password, if SecurityMode=SQL" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SAPwd", value) - end - end - - # Name: InstallSQLDataDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_installsqldatadir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstallSQLDataDir - Root path for SQL database files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLUserDBDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqluserdbdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLUserDBDir - Path for SQL database files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLUserDBLogDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqluserdblogdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLUserDBLogDir - Path for SQL log files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLTempDBDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqltempdbdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLTempDBDir - Path for SQL TempDB files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLTempDBLogDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqltempdblogdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLTempDBLogDir - Path for SQL TempDB log files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLBackupDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlbackupdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLBackupDir - Path for SQL backup files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ASSvcAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_assvcaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "ASSvcAccount - Service account for Analysus Services service." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("ASSvcAccount", value) - end - end - - # Name: ASSvcAccountUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_assvcaccountusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ASSvcAccountUsername - Output username for the Analysis Services service." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ASCollation - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_ascollation) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ASCollation - Collation for Analysis Services." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ASSysAdminAccounts - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_assysadminaccounts, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ASSysAdminAccounts - Array of accounts to be made Analysis Services admins." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ASDataDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_asdatadir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ASDataDir - Path for Analysis Services data files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ASLogDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_aslogdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ASLogDir - Path for Analysis Services log files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ASBackupDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_asbackupdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ASBackupDir - Path for Analysis Services backup files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ASTempDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_astempdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ASTempDir - Path for Analysis Services temp files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ASConfigDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_asconfigdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ASConfigDir - Path for Analysis Services config." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ISSvcAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_issvcaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "ISSvcAccount - Service account for Integration Services service." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("ISSvcAccount", value) - end - end - - # Name: ISSvcAccountUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_issvcaccountusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ISSvcAccountUsername - Output username for the Integration Services service." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ISFileSystemFolder - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_isfilesystemfolder) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ISFileSystemFolder - File system folder for Integration Services." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserverfailoverclustersetup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserverfirewall.rb b/lib/puppet/type/dsc_xsqlserverfirewall.rb deleted file mode 100644 index f241489e..00000000 --- a/lib/puppet/type/dsc_xsqlserverfirewall.rb +++ /dev/null @@ -1,233 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserverfirewall) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerFirewall resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerFirewall/MSFT_xSQLServerFirewall.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_features is a required attribute') if self[:dsc_features].nil? - fail('dsc_instancename is a required attribute') if self[:dsc_instancename].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerFirewall' end - def dscmeta_resource_name; 'MSFT_xSQLServerFirewall' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the SQL firewall rules are is expected to be enabled on the machine.\nPresent {default} \nAbsent \n Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - UNC path to the root of the source files for installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Features - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_features) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Features - SQL features to enable firewall rules for." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_instancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceName - SQL instance to enable firewall rules for." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DatabaseEngineFirewall - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_databaseenginefirewall) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DatabaseEngineFirewall - Is the firewall rule for the Database Engine enabled?" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: BrowserFirewall - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_browserfirewall) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "BrowserFirewall - Is the firewall rule for the Browser enabled?" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ReportingServicesFirewall - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_reportingservicesfirewall) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ReportingServicesFirewall - Is the firewall rule for Reporting Services enabled?" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AnalysisServicesFirewall - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_analysisservicesfirewall) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AnalysisServicesFirewall - Is the firewall rule for Analysis Services enabled?" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: IntegrationServicesFirewall - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_integrationservicesfirewall) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "IntegrationServicesFirewall - Is the firewall rule for the Integration Services enabled?" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: SourceCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_sourcecredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SourceCredential - Credentials used to access the path set in the parameter 'SourcePath'." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SourceCredential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserverfirewall).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserverinstall.rb b/lib/puppet/type/dsc_xsqlserverinstall.rb deleted file mode 100644 index 84ce165e..00000000 --- a/lib/puppet/type/dsc_xsqlserverinstall.rb +++ /dev/null @@ -1,313 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserverinstall) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSqlServerInstall resource type. - Automatically generated from - 'xSqlPs/DSCResources/MSFT_xSqlServerInstall/MSFT_xSqlServerInstall.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_instancename is a required attribute') if self[:dsc_instancename].nil? - end - - def dscmeta_resource_friendly_name; 'xSqlServerInstall' end - def dscmeta_resource_name; 'MSFT_xSqlServerInstall' end - def dscmeta_module_name; 'xSqlPs' end - def dscmeta_module_version; '1.4.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: InstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_instancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceName - The name of sql instance." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - The share path of sql server software." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: VersionID - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_versionid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "VersionID - The numeric version identifier for the instance to be installed" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SourcePathCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepathcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SourcePathCredential - The credential that vm could use to access net share of sql server software." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SourcePathCredential", value) - end - end - - # Name: Features - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_features) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Features - List of names of Sql Server features to install" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SqlAdministratorCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_sqladministratorcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SqlAdministratorCredential - Sql sa credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SqlAdministratorCredential", value) - end - end - - # Name: UpdateEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_updateenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UpdateEnabled - Specify whether SQL server setup should discover and include product updates." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: SvcAccount - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_svcaccount) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SvcAccount - Specify the startup account for the SQL server service." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SysAdminAccounts - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sysadminaccounts) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SysAdminAccounts - Specify logins to be members of the sysadmin role." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AgentSvcAccount - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_agentsvcaccount) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AgentSvcAccount - Specify the account for SQL server agent service." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SqlCollation - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlcollation) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SqlCollation - Specify the default collation for SQL server" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstallSqlDataDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_installsqldatadir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstallSqlDataDir - Specify the directory for SQL server system db files" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SqlTempDBDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqltempdbdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SqlTempDBDir - Specify the directory for TempDB files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SqlUserDBDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqluserdbdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SqlUserDBDir - Specify the directory for UserDB data files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SqlUserDBLogDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqluserdblogdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SqlUserDBLogDir - Specify the directory for UserDB log files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SqlBackupDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlbackupdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SqlBackupDir - Specify the directory for backup files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserverinstall).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserverlogin.rb b/lib/puppet/type/dsc_xsqlserverlogin.rb deleted file mode 100644 index 71f2c3e2..00000000 --- a/lib/puppet/type/dsc_xsqlserverlogin.rb +++ /dev/null @@ -1,221 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserverlogin) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerLogin resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerLogin/MSFT_xSQLServerLogin.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - fail('dsc_sqlserver is a required attribute') if self[:dsc_sqlserver].nil? - fail('dsc_sqlinstancename is a required attribute') if self[:dsc_sqlinstancename].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerLogin' end - def dscmeta_resource_name; 'MSFT_xSQLServerLogin' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - The specified login is Present or Absent. Default is Present. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the login." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LoginType - # Type: string - # IsMandatory: False - # Values: ["WindowsUser", "WindowsGroup", "SqlLogin", "Certificate", "AsymmetricKey", "ExternalUser", "ExternalGroup"] - newparam(:dsc_logintype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LoginType - The type of login to be created. If LoginType is 'WindowsUser' or 'WindowsGroup' then provide the name in the format DOMAIN\name. Default is WindowsUser. Unsupported login types are Certificate, AsymmetricKey, ExternalUser, and ExternalGroup. Valid values are WindowsUser, WindowsGroup, SqlLogin, Certificate, AsymmetricKey, ExternalUser, ExternalGroup." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['WindowsUser', 'windowsuser', 'WindowsGroup', 'windowsgroup', 'SqlLogin', 'sqllogin', 'Certificate', 'certificate', 'AsymmetricKey', 'asymmetrickey', 'ExternalUser', 'externaluser', 'ExternalGroup', 'externalgroup'].include?(value) - fail("Invalid value '#{value}'. Valid values are WindowsUser, WindowsGroup, SqlLogin, Certificate, AsymmetricKey, ExternalUser, ExternalGroup") - end - end - end - - # Name: SQLServer - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLServer - The hostname of the SQL Server to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLInstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sqlinstancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLInstanceName - Name of the SQL instance to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LoginCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_logincredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "LoginCredential - If LoginType is 'SqlLogin' then a PSCredential is needed for the password to the login." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("LoginCredential", value) - end - end - - # Name: LoginMustChangePassword - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_loginmustchangepassword) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "LoginMustChangePassword - Specifies if the login is required to have its password change on the next login. Only applies to SQL Logins. Default is $true." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: LoginPasswordExpirationEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_loginpasswordexpirationenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "LoginPasswordExpirationEnabled - Specifies if the login password is required to expire in accordance to the operating system security policy. Only applies to SQL Logins. Default is $true." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: LoginPasswordPolicyEnforced - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_loginpasswordpolicyenforced) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "LoginPasswordPolicyEnforced - Specifies if the login password is required to conform to the password policy specified in the system security policy. Only applies to SQL Logins. Default is $true." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserverlogin).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlservermaxdop.rb b/lib/puppet/type/dsc_xsqlservermaxdop.rb deleted file mode 100644 index 26bf7c48..00000000 --- a/lib/puppet/type/dsc_xsqlservermaxdop.rb +++ /dev/null @@ -1,154 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlservermaxdop) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerMaxDop resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerMaxDop/MSFT_xSQLServerMaxDop.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_sqlinstancename is a required attribute') if self[:dsc_sqlinstancename].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerMaxDop' end - def dscmeta_resource_name; 'MSFT_xSQLServerMaxDop' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if MaxDop is configured (Present) or reset to default value (Absent) Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: DynamicAlloc - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_dynamicalloc) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DynamicAlloc - Flag to Dynamically allocate Maxdop based on Best Practices" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: MaxDop - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maxdop) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "MaxDop - Numeric value to configure Maxdop to" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: SQLServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLServer - The host name of the SQL Server to be configured. Default value is '$env:COMPUTERNAME'." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLInstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sqlinstancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLInstanceName - The name of the SQL instance to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlservermaxdop).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlservermemory.rb b/lib/puppet/type/dsc_xsqlservermemory.rb deleted file mode 100644 index edb1e812..00000000 --- a/lib/puppet/type/dsc_xsqlservermemory.rb +++ /dev/null @@ -1,172 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlservermemory) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerMemory resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerMemory/MSFT_xSQLServerMemory.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_sqlinstancename is a required attribute') if self[:dsc_sqlinstancename].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerMemory' end - def dscmeta_resource_name; 'MSFT_xSQLServerMemory' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: SQLInstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sqlinstancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLInstanceName - The name of the SQL instance to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLServer - The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - When set to 'Present' then min and max memory will be set to either the value in parameter MinMemory and MaxMemory or dynamically configured when parameter DynamicAlloc is set to $true. When set to 'Absent' min and max memory will be set to default values. Default value is Present. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: DynamicAlloc - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_dynamicalloc) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DynamicAlloc - If set to $true then max memory will be dynamically configured. When this is set parameter is set to $true, the parameter MaxMemory must be set to $null or not be configured. Default value is $false." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: MinMemory - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_minmemory) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "MinMemory - Minimum amount of memory, in MB, in the buffer pool used by the instance of SQL Server." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaxMemory - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maxmemory) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "MaxMemory - Maximum amount of memory, in MB, in the buffer pool used by the instance of SQL Server." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlservermemory).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlservernetwork.rb b/lib/puppet/type/dsc_xsqlservernetwork.rb deleted file mode 100644 index bcff9a06..00000000 --- a/lib/puppet/type/dsc_xsqlservernetwork.rb +++ /dev/null @@ -1,168 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlservernetwork) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerNetwork resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerNetwork/MSFT_xSQLServerNetwork.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_instancename is a required attribute') if self[:dsc_instancename].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerNetwork' end - def dscmeta_resource_name; 'MSFT_xSQLServerNetwork' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: InstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_instancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceName - SQL Server instance name of which network protocol should be configured" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProtocolName - # Type: string - # IsMandatory: False - # Values: ["tcp"] - newparam(:dsc_protocolname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProtocolName - Network protocol name that should be configured Valid values are tcp." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['tcp', 'tcp'].include?(value) - fail("Invalid value '#{value}'. Valid values are tcp") - end - end - end - - # Name: IsEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_isenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "IsEnabled - Is network protocol should be enabled or disabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: TCPDynamicPorts - # Type: string - # IsMandatory: False - # Values: ["0"] - newparam(:dsc_tcpdynamicports) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TCPDynamicPorts - If dynamic ports are used should be set to 0, otherwise leave empty Valid values are 0." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['0', '0'].include?(value) - fail("Invalid value '#{value}'. Valid values are 0") - end - end - end - - # Name: TCPPort - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_tcpport) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TCPPort - Sets static port for TCP/IP" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RestartService - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_restartservice) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RestartService - Controls if affected SQL Service should be restarted automatically" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlservernetwork).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserverpermission.rb b/lib/puppet/type/dsc_xsqlserverpermission.rb deleted file mode 100644 index 1f09afca..00000000 --- a/lib/puppet/type/dsc_xsqlserverpermission.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserverpermission) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerPermission resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerPermission/MSFT_xSQLServerPermission.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_instancename is a required attribute') if self[:dsc_instancename].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerPermission' end - def dscmeta_resource_name; 'MSFT_xSQLServerPermission' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: InstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_instancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceName - The SQL Server instance name." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: NodeName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_nodename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "NodeName - The host name or FQDN." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - If the permission should be present or absent. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Principal - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_principal) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Principal - The login to which permission will be set." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Permission - # Type: string[] - # IsMandatory: False - # Values: ["AlterAnyAvailabilityGroup", "ViewServerState", "AlterAnyEndPoint"] - newparam(:dsc_permission, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Permission - The permission to set for the login. Valid values are AlterAnyAvailabilityGroup, ViewServerState, AlterAnyEndPoint." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - if value.kind_of?(Array) - unless (['AlterAnyAvailabilityGroup', 'alteranyavailabilitygroup', 'ViewServerState', 'viewserverstate', 'AlterAnyEndPoint', 'alteranyendpoint'] & value).count == value.count - fail("Invalid value #{value}. Valid values are AlterAnyAvailabilityGroup, ViewServerState, AlterAnyEndPoint") - end - end - if value.kind_of?(String) - unless ['AlterAnyAvailabilityGroup', 'alteranyavailabilitygroup', 'ViewServerState', 'viewserverstate', 'AlterAnyEndPoint', 'alteranyendpoint'].include?(value) - fail("Invalid value #{value}. Valid values are AlterAnyAvailabilityGroup, ViewServerState, AlterAnyEndPoint") - end - end - end - munge do |value| - Array(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserverpermission).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserverreplication.rb b/lib/puppet/type/dsc_xsqlserverreplication.rb deleted file mode 100644 index bca59fab..00000000 --- a/lib/puppet/type/dsc_xsqlserverreplication.rb +++ /dev/null @@ -1,216 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserverreplication) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerReplication resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerReplication/MSFT_xSQLServerReplication.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_instancename is a required attribute') if self[:dsc_instancename].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerReplication' end - def dscmeta_resource_name; 'MSFT_xSQLServerReplication' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: InstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_instancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceName - SQL Server instance name where replication distribution will be configured" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: DistributorMode - # Type: string - # IsMandatory: False - # Values: ["Local", "Remote"] - newparam(:dsc_distributormode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DistributorMode - Valid values are Local, Remote." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Local', 'local', 'Remote', 'remote'].include?(value) - fail("Invalid value '#{value}'. Valid values are Local, Remote") - end - end - end - - # Name: AdminLinkCredentials - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_adminlinkcredentials) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "AdminLinkCredentials - Distributor administration link password" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("AdminLinkCredentials", value) - end - end - - # Name: DistributionDBName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_distributiondbname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DistributionDBName - Distribution database name" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RemoteDistributor - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_remotedistributor) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RemoteDistributor - Distributor server name if configuring publisher with remote distributor" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: WorkingDirectory - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_workingdirectory) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WorkingDirectory - Publisher working directory" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UseTrustedConnection - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_usetrustedconnection) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UseTrustedConnection - Publisher security mode" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: UninstallWithForce - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_uninstallwithforce) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UninstallWithForce - Force flag for uninstall procedure" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserverreplication).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserverrole.rb b/lib/puppet/type/dsc_xsqlserverrole.rb deleted file mode 100644 index 90929fc8..00000000 --- a/lib/puppet/type/dsc_xsqlserverrole.rb +++ /dev/null @@ -1,193 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserverrole) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerRole resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerRole/MSFT_xSQLServerRole.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_serverrolename is a required attribute') if self[:dsc_serverrolename].nil? - fail('dsc_sqlserver is a required attribute') if self[:dsc_sqlserver].nil? - fail('dsc_sqlinstancename is a required attribute') if self[:dsc_sqlinstancename].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerRole' end - def dscmeta_resource_name; 'MSFT_xSQLServerRole' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ServerRoleName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_serverrolename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServerRoleName - The name of of SQL role to add or remove." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLServer - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLServer - The host name of the SQL Server to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLInstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_sqlinstancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLInstanceName - The name of the SQL instance to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the server role is added (Present) or dropped (Absent). Default value is 'Present'. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Members - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_members, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Members - The members the server role should have. This parameter will replace all the current server role members with the specified members." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: MembersToInclude - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_memberstoinclude, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "MembersToInclude - The members the server role should include. This parameter will only add members to a server role. Can not be used at the same time as parameter Members." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: MembersToExclude - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_memberstoexclude, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "MembersToExclude - The members the server role should exclude. This parameter will only remove members from a server role. Can only be used when parameter Ensure is set to 'Present'. Can not be used at the same time as parameter Members." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserverrole).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserverrsconfig.rb b/lib/puppet/type/dsc_xsqlserverrsconfig.rb deleted file mode 100644 index cb641937..00000000 --- a/lib/puppet/type/dsc_xsqlserverrsconfig.rb +++ /dev/null @@ -1,147 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserverrsconfig) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerRSConfig resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerRSConfig/MSFT_xSQLServerRSConfig.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_instancename is a required attribute') if self[:dsc_instancename].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerRSConfig' end - def dscmeta_resource_name; 'MSFT_xSQLServerRSConfig' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: InstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_instancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceName - Name of the SQL Server Reporting Services instance to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RSSQLServer - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_rssqlserver) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RSSQLServer - Name of the SQL Server to host the Reporting Service database." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RSSQLInstanceName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_rssqlinstancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RSSQLInstanceName - Name of the SQL Server instance to host the Reporting Service database." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLAdminCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_sqladmincredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SQLAdminCredential - Credential to be used to perform the configuration." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SQLAdminCredential", value) - end - end - - # Name: IsInitialized - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_isinitialized) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "IsInitialized - Is the Reporting Services instance initialized." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserverrsconfig).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserverrssecureconnectionlevel.rb b/lib/puppet/type/dsc_xsqlserverrssecureconnectionlevel.rb deleted file mode 100644 index 008016de..00000000 --- a/lib/puppet/type/dsc_xsqlserverrssecureconnectionlevel.rb +++ /dev/null @@ -1,121 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserverrssecureconnectionlevel) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerRSSecureConnectionLevel resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerRSSecureConnectionLevel/MSFT_xSQLServerRSSecureConnectionLevel.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_instancename is a required attribute') if self[:dsc_instancename].nil? - fail('dsc_secureconnectionlevel is a required attribute') if self[:dsc_secureconnectionlevel].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerRSSecureConnectionLevel' end - def dscmeta_resource_name; 'MSFT_xSQLServerRSSecureConnectionLevel' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: InstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_instancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceName - SQL instance to set secure connection level for." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SecureConnectionLevel - # Type: uint16 - # IsMandatory: True - # Values: None - newparam(:dsc_secureconnectionlevel) do - def mof_type; 'uint16' end - def mof_is_embedded?; false end - desc "SecureConnectionLevel - SQL Server Reporting Service secure connection level." - isrequired - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: SQLAdminCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_sqladmincredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SQLAdminCredential - Credential with administrative permissions to the SQL instance." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SQLAdminCredential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserverrssecureconnectionlevel).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserverscript.rb b/lib/puppet/type/dsc_xsqlserverscript.rb deleted file mode 100644 index d38ca167..00000000 --- a/lib/puppet/type/dsc_xsqlserverscript.rb +++ /dev/null @@ -1,188 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserverscript) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerScript resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerScript/MSFT_xSQLServerScript.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_serverinstance is a required attribute') if self[:dsc_serverinstance].nil? - fail('dsc_setfilepath is a required attribute') if self[:dsc_setfilepath].nil? - fail('dsc_getfilepath is a required attribute') if self[:dsc_getfilepath].nil? - fail('dsc_testfilepath is a required attribute') if self[:dsc_testfilepath].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerScript' end - def dscmeta_resource_name; 'MSFT_xSQLServerScript' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ServerInstance - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_serverinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServerInstance - The name of an instance of the Database Engine. For a default instance, only specify the computer name. For a named instance, use the format ComputerName\\InstanceName" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetFilePath - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_setfilepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SetFilePath - Path to the T-SQL file that will perform Set action." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: GetFilePath - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_getfilepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "GetFilePath - Path to the T-SQL file that will perform Get action. Any values returned by the T-SQL queries will also be returned by the cmdlet Get-DscConfiguration through the 'GetResult' property." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TestFilePath - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_testfilepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TestFilePath - Path to the T-SQL file that will perform Test action. Any script that does not throw an error or returns null is evaluated to true. The cmdlet Invoke-SqlCmd treats T-SQL Print statements as verbose text, and will not cause the test to return false." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - The credentials to authenticate with, using SQL Authentication. To authenticate using Windows Authentication, assign the credentials to the built-in parameter 'PsDscRunAsCredential'. If both parameters 'Credential' and 'PsDscRunAsCredential' are not assigned, then SYSTEM account will be used to authenticate using Windows Authentication." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Variable - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_variable, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Variable - Specifies, as a string array, a sqlcmd scripting variable for use in the sqlcmd script, and sets a value for the variable. Use a Windows PowerShell array to specify multiple variables and their values. For more information how to use this, please go to the help documentation for Invoke-Sqlcmd." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: GetResult - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_getresult, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "GetResult - Contains the values returned from the T-SQL script provided in the parameter 'GetFilePath' when cmdlet Get-DscConfiguration is run." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserverscript).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsqlserversetup.rb b/lib/puppet/type/dsc_xsqlserversetup.rb deleted file mode 100644 index 97343232..00000000 --- a/lib/puppet/type/dsc_xsqlserversetup.rb +++ /dev/null @@ -1,846 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsqlserversetup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSQLServerSetup resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xSQLServerSetup/MSFT_xSQLServerSetup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_instancename is a required attribute') if self[:dsc_instancename].nil? - end - - def dscmeta_resource_friendly_name; 'xSQLServerSetup' end - def dscmeta_resource_name; 'MSFT_xSQLServerSetup' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Action - # Type: string - # IsMandatory: False - # Values: ["Install", "InstallFailoverCluster", "AddNode", "PrepareFailoverCluster", "CompleteFailoverCluster"] - newparam(:dsc_action) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Action - The action to be performed. Default value is 'Install'. Valid values are Install, InstallFailoverCluster, AddNode, PrepareFailoverCluster, CompleteFailoverCluster." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Install', 'install', 'InstallFailoverCluster', 'installfailovercluster', 'AddNode', 'addnode', 'PrepareFailoverCluster', 'preparefailovercluster', 'CompleteFailoverCluster', 'completefailovercluster'].include?(value) - fail("Invalid value '#{value}'. Valid values are Install, InstallFailoverCluster, AddNode, PrepareFailoverCluster, CompleteFailoverCluster") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - The path to the root of the source files for installation. I.e and UNC path to a shared resource. Environment variables can be used in the path." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SetupCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_setupcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SetupCredential - Credential to be used to perform the installation." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SetupCredential", value) - end - end - - # Name: SourceCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_sourcecredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SourceCredential - Credentials used to access the path set in the parameter 'SourcePath'." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SourceCredential", value) - end - end - - # Name: SuppressReboot - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_suppressreboot) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SuppressReboot - Suppresses reboot." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ForceReboot - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_forcereboot) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ForceReboot - Forces reboot." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Features - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_features) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Features - SQL features to be installed." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstanceName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_instancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceName - Name of the SQL instance to be installed." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstanceID - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_instanceid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceID - SQL instance ID, if different from InstanceName." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ProductKey - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_productkey) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ProductKey - Product key for licensed installations." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UpdateEnabled - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_updateenabled) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UpdateEnabled - Enabled updates during installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: UpdateSource - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_updatesource) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UpdateSource - Path to the source of updates to be applied during installation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQMReporting - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqmreporting) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQMReporting - Enable customer experience reporting." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ErrorReporting - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_errorreporting) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ErrorReporting - Enable error reporting." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstallSharedDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_installshareddir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstallSharedDir - Installation path for shared SQL files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstallSharedWOWDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_installsharedwowdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstallSharedWOWDir - Installation path for x86 shared SQL files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: InstanceDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_instancedir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceDir - Installation path for SQL instance files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLSvcAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_sqlsvcaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SQLSvcAccount - Service account for the SQL service." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SQLSvcAccount", value) - end - end - - # Name: SQLSvcAccountUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlsvcaccountusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLSvcAccountUsername - Output username for the SQL service." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AgtSvcAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_agtsvcaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "AgtSvcAccount - Service account for the SQL Agent service." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("AgtSvcAccount", value) - end - end - - # Name: AgtSvcAccountUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_agtsvcaccountusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AgtSvcAccountUsername - Output username for the SQL Agent service." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLCollation - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlcollation) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLCollation - Collation for SQL." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLSysAdminAccounts - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_sqlsysadminaccounts, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "SQLSysAdminAccounts - Array of accounts to be made SQL administrators." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: SecurityMode - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_securitymode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SecurityMode - Security mode to apply to the SQL Server instance." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SAPwd - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_sapwd) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SAPwd - SA password, if SecurityMode is set to 'SQL'." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SAPwd", value) - end - end - - # Name: InstallSQLDataDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_installsqldatadir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstallSQLDataDir - Root path for SQL database files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLUserDBDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqluserdbdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLUserDBDir - Path for SQL database files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLUserDBLogDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqluserdblogdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLUserDBLogDir - Path for SQL log files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLTempDBDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqltempdbdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLTempDBDir - Path for SQL TempDB files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLTempDBLogDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqltempdblogdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLTempDBLogDir - Path for SQL TempDB log files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SQLBackupDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sqlbackupdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SQLBackupDir - Path for SQL backup files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FTSvcAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_ftsvcaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "FTSvcAccount - Service account for the Full Text service." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("FTSvcAccount", value) - end - end - - # Name: FTSvcAccountUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_ftsvcaccountusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FTSvcAccountUsername - Output username for the Full Text service." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RSSvcAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_rssvcaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "RSSvcAccount - Service account for Reporting Services service." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("RSSvcAccount", value) - end - end - - # Name: RSSvcAccountUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_rssvcaccountusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RSSvcAccountUsername - Output username for the Reporting Services service." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ASSvcAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_assvcaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "ASSvcAccount - Service account for Analysis Services service." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("ASSvcAccount", value) - end - end - - # Name: ASSvcAccountUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_assvcaccountusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ASSvcAccountUsername - Output username for the Analysis Services service." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ASCollation - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_ascollation) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ASCollation - Collation for Analysis Services." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ASSysAdminAccounts - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_assysadminaccounts, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "ASSysAdminAccounts - Array of accounts to be made Analysis Services admins." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ASDataDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_asdatadir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ASDataDir - Path for Analysis Services data files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ASLogDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_aslogdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ASLogDir - Path for Analysis Services log files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ASBackupDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_asbackupdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ASBackupDir - Path for Analysis Services backup files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ASTempDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_astempdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ASTempDir - Path for Analysis Services temp files." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ASConfigDir - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_asconfigdir) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ASConfigDir - Path for Analysis Services config." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ISSvcAccount - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_issvcaccount) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "ISSvcAccount - Service account for Integration Services service." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("ISSvcAccount", value) - end - end - - # Name: ISSvcAccountUsername - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_issvcaccountusername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ISSvcAccountUsername - Output username for the Integration Services service." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: BrowserSvcStartupType - # Type: string - # IsMandatory: False - # Values: ["Automatic", "Disabled", "Manual"] - newparam(:dsc_browsersvcstartuptype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "BrowserSvcStartupType - Specifies the startup mode for SQL Server Browser service. Valid values are Automatic, Disabled, Manual." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Automatic', 'automatic', 'Disabled', 'disabled', 'Manual', 'manual'].include?(value) - fail("Invalid value '#{value}'. Valid values are Automatic, Disabled, Manual") - end - end - end - - # Name: FailoverClusterGroupName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_failoverclustergroupname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FailoverClusterGroupName - The name of the resource group to create for the clustered SQL Server instance. Default is 'SQL Server (InstanceName)'." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FailoverClusterIPAddress - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_failoverclusteripaddress, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "FailoverClusterIPAddress - Array of IP Addresses to be assigned to the clustered SQL Server instance." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: FailoverClusterNetworkName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_failoverclusternetworkname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FailoverClusterNetworkName - Host name to be assigend to the clustered SQL Server instance." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsqlserversetup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsslsettings.rb b/lib/puppet/type/dsc_xsslsettings.rb deleted file mode 100644 index 9a6f5a43..00000000 --- a/lib/puppet/type/dsc_xsslsettings.rb +++ /dev/null @@ -1,133 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsslsettings) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSSLSettings resource type. - Automatically generated from - 'xWebAdministration/DSCResources/MSFT_xSSLSettings/MSFT_xSSLSettings.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xSSLSettings' end - def dscmeta_resource_name; 'MSFT_xSSLSettings' end - def dscmeta_module_name; 'xWebAdministration' end - def dscmeta_module_version; '1.18.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of website in which to modify the SSL Settings" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Bindings - # Type: string[] - # IsMandatory: False - # Values: ["", "Ssl", "SslNegotiateCert", "SslRequireCert", "Ssl128"] - newparam(:dsc_bindings, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Bindings - The Bindings in which to modify for the website Valid values are , Ssl, SslNegotiateCert, SslRequireCert, Ssl128." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - if value.kind_of?(Array) - unless (['', '', 'Ssl', 'ssl', 'SslNegotiateCert', 'sslnegotiatecert', 'SslRequireCert', 'sslrequirecert', 'Ssl128', 'ssl128'] & value).count == value.count - fail("Invalid value #{value}. Valid values are , Ssl, SslNegotiateCert, SslRequireCert, Ssl128") - end - end - if value.kind_of?(String) - unless ['', '', 'Ssl', 'ssl', 'SslNegotiateCert', 'sslnegotiatecert', 'SslRequireCert', 'sslrequirecert', 'Ssl128', 'ssl128'].include?(value) - fail("Invalid value #{value}. Valid values are , Ssl, SslNegotiateCert, SslRequireCert, Ssl128") - end - end - end - munge do |value| - Array(value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Whether the bindings should be present or absent Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsslsettings).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsystemrestore.rb b/lib/puppet/type/dsc_xsystemrestore.rb deleted file mode 100644 index 24ccf553..00000000 --- a/lib/puppet/type/dsc_xsystemrestore.rb +++ /dev/null @@ -1,108 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsystemrestore) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSystemRestore resource type. - Automatically generated from - 'xWindowsRestore/DSCResources/xSystemRestore/xSystemRestore.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? - end - - def dscmeta_resource_friendly_name; 'xSystemRestore' end - def dscmeta_resource_name; 'xSystemRestore' end - def dscmeta_module_name; 'xWindowsRestore' end - def dscmeta_module_version; '1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: True - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Indicates that the computer restore is enabled or is disabled. Valid values are Present, Absent." - isrequired - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Drive - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_drive, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Drive - Specifies the file system drives. Enter one or more file system drive letters, each followed by a colon and a backslash and enclosed in quotation marks, such as 'C:\' or 'D:\'." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsystemrestore).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xsystemrestorepoint.rb b/lib/puppet/type/dsc_xsystemrestorepoint.rb deleted file mode 100644 index 49926c0b..00000000 --- a/lib/puppet/type/dsc_xsystemrestorepoint.rb +++ /dev/null @@ -1,123 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xsystemrestorepoint) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xSystemRestorePoint resource type. - Automatically generated from - 'xWindowsRestore/DSCResources/xSystemRestorePoint/xSystemRestorePoint.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_description is a required attribute') if self[:dsc_description].nil? - end - - def dscmeta_resource_friendly_name; 'xSystemRestorePoint' end - def dscmeta_resource_name; 'xSystemRestorePoint' end - def dscmeta_module_name; 'xWindowsRestore' end - def dscmeta_module_version; '1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Description - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - Specifies a descriptive name for the restore point." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RestorePointType - # Type: string - # IsMandatory: False - # Values: ["APPLICATION_INSTALL", "APPLICATION_UNINSTALL", "DEVICE_DRIVER_INSTALL", "MODIFY_SETTINGS", "CANCELLED_OPERATION"] - newparam(:dsc_restorepointtype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "RestorePointType - Specifies the type of restore point. The default is APPLICATION_INSTALL. Valid values are APPLICATION_INSTALL, APPLICATION_UNINSTALL, DEVICE_DRIVER_INSTALL, MODIFY_SETTINGS, CANCELLED_OPERATION." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['APPLICATION_INSTALL', 'application_install', 'APPLICATION_UNINSTALL', 'application_uninstall', 'DEVICE_DRIVER_INSTALL', 'device_driver_install', 'MODIFY_SETTINGS', 'modify_settings', 'CANCELLED_OPERATION', 'cancelled_operation'].include?(value) - fail("Invalid value '#{value}'. Valid values are APPLICATION_INSTALL, APPLICATION_UNINSTALL, DEVICE_DRIVER_INSTALL, MODIFY_SETTINGS, CANCELLED_OPERATION") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Indicates if the specified restore point created. Set this property to 'Absent' to ensure that the restore point does not exist. Set it to 'Present' to ensure that the restore point does exist. The default is 'Present'. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xsystemrestorepoint).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xtimezone.rb b/lib/puppet/type/dsc_xtimezone.rb deleted file mode 100644 index 3a87eb36..00000000 --- a/lib/puppet/type/dsc_xtimezone.rb +++ /dev/null @@ -1,103 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xtimezone) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xTimeZone resource type. - Automatically generated from - 'xTimeZone/DSCResources/xTimeZone/xTimeZone.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_issingleinstance is a required attribute') if self[:dsc_issingleinstance].nil? - end - - def dscmeta_resource_friendly_name; 'xTimeZone' end - def dscmeta_resource_name; 'xTimeZone' end - def dscmeta_module_name; 'xTimeZone' end - def dscmeta_module_version; '1.6.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: IsSingleInstance - # Type: string - # IsMandatory: True - # Values: ["Yes"] - newparam(:dsc_issingleinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes' Valid values are Yes." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Yes', 'yes'].include?(value) - fail("Invalid value '#{value}'. Valid values are Yes") - end - end - end - - # Name: TimeZone - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_timezone) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TimeZone - Specifies the TimeZone." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xtimezone).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xuser.rb b/lib/puppet/type/dsc_xuser.rb deleted file mode 100644 index 4dcf12e1..00000000 --- a/lib/puppet/type/dsc_xuser.rb +++ /dev/null @@ -1,215 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xuser) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xUser resource type. - Automatically generated from - 'xPSDesiredStateConfiguration/DSCResources/MSFT_xUserResource/MSFT_xUserResource.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_username is a required attribute') if self[:dsc_username].nil? - end - - def dscmeta_resource_friendly_name; 'xUser' end - def dscmeta_resource_name; 'MSFT_xUserResource' end - def dscmeta_module_name; 'xPSDesiredStateConfiguration' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: UserName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_username) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "UserName - The name of the User to Create/Modify/Delete" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - An enumerated value that describes if the user is expected to exist on the machine Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: FullName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_fullname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FullName - The display name of the user" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - A description for the user" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Password - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_password) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Password - The password for the user" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Password", value) - end - end - - # Name: Disabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "Disabled - Value used to disable/enable a user account" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: PasswordNeverExpires - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_passwordneverexpires) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "PasswordNeverExpires - Value used to set whether a user's password expires or not" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: PasswordChangeRequired - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_passwordchangerequired) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "PasswordChangeRequired - Value used to require a user to change their password" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: PasswordChangeNotAllowed - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_passwordchangenotallowed) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "PasswordChangeNotAllowed - Value used to set whether a user can/cannot change their password" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xuser).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xvhd.rb b/lib/puppet/type/dsc_xvhd.rb deleted file mode 100644 index 4ba18e19..00000000 --- a/lib/puppet/type/dsc_xvhd.rb +++ /dev/null @@ -1,240 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xvhd) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xVHD resource type. - Automatically generated from - 'xHyper-V/DSCResources/MSFT_xVHD/MSFT_xVHD.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - fail('dsc_path is a required attribute') if self[:dsc_path].nil? - end - - def dscmeta_resource_friendly_name; 'xVHD' end - def dscmeta_resource_name; 'MSFT_xVHD' end - def dscmeta_module_name; 'xHyper-V' end - def dscmeta_module_version; '3.9.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of the VHD File" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Path - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - Folder where the VHD will be created" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ParentPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_parentpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ParentPath - Parent VHD file path, for differencing disk" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MaximumSizeBytes - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_maximumsizebytes) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "MaximumSizeBytes - Maximum size of Vhd to be created" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Generation - # Type: string - # IsMandatory: False - # Values: ["Vhd", "Vhdx"] - newparam(:dsc_generation) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Generation - Virtual disk format - Vhd or Vhdx Valid values are Vhd, Vhdx." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Vhd', 'vhd', 'Vhdx', 'vhdx'].include?(value) - fail("Invalid value '#{value}'. Valid values are Vhd, Vhdx") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Should the VHD be created or deleted Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: ID - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_id) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ID - Virtual Disk Identifier" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Type - # Type: string - # IsMandatory: False - # Values: ["Dynamic", "Fixed", "Differencing"] - newparam(:dsc_type) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Type - Type of Vhd - Dynamic, Fixed, Differencing Valid values are Dynamic, Fixed, Differencing." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Dynamic', 'dynamic', 'Fixed', 'fixed', 'Differencing', 'differencing'].include?(value) - fail("Invalid value '#{value}'. Valid values are Dynamic, Fixed, Differencing") - end - end - end - - # Name: FileSizeBytes - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_filesizebytes) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "FileSizeBytes - Current size of the VHD" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: IsAttached - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_isattached) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "IsAttached - Is the VHD attached to a VM or not" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xvhd).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xvhdfile.rb b/lib/puppet/type/dsc_xvhdfile.rb deleted file mode 100644 index 299dba22..00000000 --- a/lib/puppet/type/dsc_xvhdfile.rb +++ /dev/null @@ -1,154 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xvhdfile) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - class PuppetX::Dsc::TypeHelpers - def self.validate_MSFT_xFileDirectory(mof_type_map, name, value) - required = ['destinationpath'] - allowed = ['sourcepath','ensure','type','recurse','force','content','attributes'] - lowkey_hash = Hash[value.map { |k, v| [k.to_s.downcase, v] }] - - missing = required - lowkey_hash.keys - unless missing.empty? - fail "#{name} is missing the following required keys: #{missing.join(',')}" - end - - extraneous = lowkey_hash.keys - required - allowed - unless extraneous.empty? - fail "#{name} includes invalid keys: #{extraneous.join(',')}" - end - - lowkey_hash.keys.each do |key| - if lowkey_hash[key] - validate_mof_type(mof_type_map[key], 'MSFT_xFileDirectory', key, lowkey_hash[key]) - end - end - end - end - - @doc = %q{ - The DSC xVhdFile resource type. - Automatically generated from - 'xHyper-V/DSCResources/MSFT_xVhdFileDirectory/MSFT_xVhdFileDirectory.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_vhdpath is a required attribute') if self[:dsc_vhdpath].nil? - end - - def dscmeta_resource_friendly_name; 'xVhdFile' end - def dscmeta_resource_name; 'MSFT_xVhdFileDirectory' end - def dscmeta_module_name; 'xHyper-V' end - def dscmeta_module_version; '3.9.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: VhdPath - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_vhdpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "VhdPath - Path to the VHD" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FileDirectory - # Type: MSFT_xFileDirectory[] - # IsMandatory: False - # Values: None - newparam(:dsc_filedirectory, :array_matching => :all) do - def mof_type; 'MSFT_xFileDirectory[]' end - def mof_is_embedded?; true end - def mof_type_map - {"destinationpath"=>{:type=>"string"}, "sourcepath"=>{:type=>"string"}, "ensure"=>{:type=>"string", :values=>["Present", "Absent"]}, "type"=>{:type=>"string", :values=>["File", "Directory"]}, "recurse"=>{:type=>"boolean"}, "force"=>{:type=>"boolean"}, "content"=>{:type=>"string"}, "attributes"=>{:type=>"string[]", :values=>["ReadOnly", "Hidden", "System", "Archive"]}} - end - desc "FileDirectory - The FileDirectory objects to copy to the VHD" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be an array of hashes or a hash") - end - (value.kind_of?(Hash) ? [value] : value).each_with_index do |v, i| - fail "FileDirectory value at index #{i} should be a Hash" unless v.is_a? Hash - - PuppetX::Dsc::TypeHelpers.validate_MSFT_xFileDirectory(mof_type_map, "FileDirectory", v) - end - end - munge do |value| - value.kind_of?(Hash) ? - [PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, value)] : - value.map { |v| PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, v) } - end - end - - # Name: CheckSum - # Type: string - # IsMandatory: False - # Values: ["ModifiedDate", "SHA-1", "SHA-256", "SHA-512"] - newparam(:dsc_checksum) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CheckSum - Valid values are ModifiedDate, SHA-1, SHA-256, SHA-512." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['ModifiedDate', 'modifieddate', 'SHA-1', 'sha-1', 'SHA-256', 'sha-256', 'SHA-512', 'sha-512'].include?(value) - fail("Invalid value '#{value}'. Valid values are ModifiedDate, SHA-1, SHA-256, SHA-512") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xvhdfile).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xvirtualmemory.rb b/lib/puppet/type/dsc_xvirtualmemory.rb deleted file mode 100644 index 17a0ff64..00000000 --- a/lib/puppet/type/dsc_xvirtualmemory.rb +++ /dev/null @@ -1,141 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xvirtualmemory) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xVirtualMemory resource type. - Automatically generated from - 'xComputerManagement/DSCResources/MSFT_xVirtualMemory/MSFT_xVirtualMemory.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_drive is a required attribute') if self[:dsc_drive].nil? - fail('dsc_type is a required attribute') if self[:dsc_type].nil? - end - - def dscmeta_resource_friendly_name; 'xVirtualMemory' end - def dscmeta_resource_name; 'MSFT_xVirtualMemory' end - def dscmeta_module_name; 'xComputerManagement' end - def dscmeta_module_version; '2.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Drive - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_drive) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Drive - The drive letter for which paging settings should be set. Can be letter only, letter and colon or letter with colon and trailing slash." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Type - # Type: string - # IsMandatory: True - # Values: ["AutoManagePagingFile", "CustomSize", "SystemManagedSize", "NoPagingFile"] - newparam(:dsc_type) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Type - The type of the paging setting to use. If set to AutoManagePagingFile, the drive letter will be ignored. If set to SystemManagedSize, the values for InitialSize and MaximumSize will be ignored Valid values are AutoManagePagingFile, CustomSize, SystemManagedSize, NoPagingFile." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['AutoManagePagingFile', 'automanagepagingfile', 'CustomSize', 'customsize', 'SystemManagedSize', 'systemmanagedsize', 'NoPagingFile', 'nopagingfile'].include?(value) - fail("Invalid value '#{value}'. Valid values are AutoManagePagingFile, CustomSize, SystemManagedSize, NoPagingFile") - end - end - end - - # Name: InitialSize - # Type: sint64 - # IsMandatory: False - # Values: None - newparam(:dsc_initialsize) do - def mof_type; 'sint64' end - def mof_is_embedded?; false end - desc "InitialSize - The initial size of the page file in Megabyte" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaximumSize - # Type: sint64 - # IsMandatory: False - # Values: None - newparam(:dsc_maximumsize) do - def mof_type; 'sint64' end - def mof_is_embedded?; false end - desc "MaximumSize - The maximum size of the page file in Megabyte" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xvirtualmemory).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xvmdvddrive.rb b/lib/puppet/type/dsc_xvmdvddrive.rb deleted file mode 100644 index f6ec2724..00000000 --- a/lib/puppet/type/dsc_xvmdvddrive.rb +++ /dev/null @@ -1,160 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xvmdvddrive) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xVMDvdDrive resource type. - Automatically generated from - 'xHyper-V/DSCResources/MSFT_xVMDvdDrive/MSFT_xVMDvdDrive.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_vmname is a required attribute') if self[:dsc_vmname].nil? - fail('dsc_controllernumber is a required attribute') if self[:dsc_controllernumber].nil? - fail('dsc_controllerlocation is a required attribute') if self[:dsc_controllerlocation].nil? - end - - def dscmeta_resource_friendly_name; 'xVMDvdDrive' end - def dscmeta_resource_name; 'MSFT_xVMDvdDrive' end - def dscmeta_module_name; 'xHyper-V' end - def dscmeta_module_version; '3.9.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: VMName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_vmname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "VMName - Specifies the name of the virtual machine to which the DVD drive is to be added." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ControllerNumber - # Type: uint32 - # IsMandatory: True - # Values: None - newparam(:dsc_controllernumber) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "ControllerNumber - Specifies the number of the controller to which the DVD drive is to be added." - isrequired - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ControllerLocation - # Type: uint32 - # IsMandatory: True - # Values: None - newparam(:dsc_controllerlocation) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "ControllerLocation - Specifies the number of the location on the controller at which the DVD drive is to be added." - isrequired - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Path - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - Specifies the full path to the virtual hard disk file or physical hard disk volume for the added DVD drive." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies if the DVD Drive should exist or not. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xvmdvddrive).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xvmhost.rb b/lib/puppet/type/dsc_xvmhost.rb deleted file mode 100644 index 47967775..00000000 --- a/lib/puppet/type/dsc_xvmhost.rb +++ /dev/null @@ -1,331 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xvmhost) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xVMHost resource type. - Automatically generated from - 'xHyper-V/DSCResources/MSFT_xVMHost/MSFT_xVMHost.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_issingleinstance is a required attribute') if self[:dsc_issingleinstance].nil? - end - - def dscmeta_resource_friendly_name; 'xVMHost' end - def dscmeta_resource_name; 'MSFT_xVMHost' end - def dscmeta_module_name; 'xHyper-V' end - def dscmeta_module_version; '3.9.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: IsSingleInstance - # Type: string - # IsMandatory: True - # Values: ["Yes"] - newparam(:dsc_issingleinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. Valid values are Yes." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Yes', 'yes'].include?(value) - fail("Invalid value '#{value}'. Valid values are Yes") - end - end - end - - # Name: EnableEnhancedSessionMode - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enableenhancedsessionmode) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "EnableEnhancedSessionMode - Indicates whether users can use enhanced mode when they connect to virtual machines on this server by using Virtual Machine Connection." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: FibreChannelWwnn - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_fibrechannelwwnn) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FibreChannelWwnn - Specifies the default value of the World Wide Node Name on the Hyper-V host." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FibreChannelWwpnMaximum - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_fibrechannelwwpnmaximum) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FibreChannelWwpnMaximum - Specifies the maximum value that can be used to generate World Wide Port Names on the Hyper-V host." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: FibreChannelWwpnMinimum - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_fibrechannelwwpnminimum) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "FibreChannelWwpnMinimum - Specifies the minimum value that can be used to generate the World Wide Port Names on the Hyper-V host." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MacAddressMaximum - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_macaddressmaximum) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MacAddressMaximum - Specifies the maximum MAC address using a valid hexadecimal value." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MacAddressMinimum - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_macaddressminimum) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MacAddressMinimum - Specifies the minimum MAC address using a valid hexadecimal value." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MaximumStorageMigrations - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maximumstoragemigrations) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "MaximumStorageMigrations - Specifies the maximum number of storage migrations that can be performed at the same time on the Hyper-V host." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaximumVirtualMachineMigrations - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maximumvirtualmachinemigrations) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "MaximumVirtualMachineMigrations - Specifies the maximum number of live migrations that can be performed at the same time on the Hyper-V host." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: NumaSpanningEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_numaspanningenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "NumaSpanningEnabled - Specifies whether virtual machines on the Hyper-V host can use resources from more than one NUMA node." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ResourceMeteringSaveIntervalMinute - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_resourcemeteringsaveintervalminute) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "ResourceMeteringSaveIntervalMinute - Specifies how often the Hyper-V host saves the data that tracks resource usage. The range is a minimum of 60 minutes to a maximum of 1440 (24 hours)." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: UseAnyNetworkForMigration - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_useanynetworkformigration) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UseAnyNetworkForMigration - Specifies how networks are selected for incoming live migration traffic." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: VirtualHardDiskPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_virtualharddiskpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "VirtualHardDiskPath - Specifies the default folder to store virtual hard disks on the Hyper-V host." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: VirtualMachineMigrationAuthenticationType - # Type: string - # IsMandatory: False - # Values: ["CredSSP", "Kerberos"] - newparam(:dsc_virtualmachinemigrationauthenticationtype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "VirtualMachineMigrationAuthenticationType - Specifies the type of authentication to be used for live migrations. The acceptable values for this parameter are 'Kerberos' and 'CredSSP'. Valid values are CredSSP, Kerberos." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['CredSSP', 'credssp', 'Kerberos', 'kerberos'].include?(value) - fail("Invalid value '#{value}'. Valid values are CredSSP, Kerberos") - end - end - end - - # Name: VirtualMachineMigrationPerformanceOption - # Type: string - # IsMandatory: False - # Values: ["TCPIP", "Compression", "SMB"] - newparam(:dsc_virtualmachinemigrationperformanceoption) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "VirtualMachineMigrationPerformanceOption - Specifies the performance option to use for live migration. The acceptable values for this parameter are 'TCPIP', 'Compression' and 'SMB'. Valid values are TCPIP, Compression, SMB." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['TCPIP', 'tcpip', 'Compression', 'compression', 'SMB', 'smb'].include?(value) - fail("Invalid value '#{value}'. Valid values are TCPIP, Compression, SMB") - end - end - end - - # Name: VirtualMachinePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_virtualmachinepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "VirtualMachinePath - Specifies the default folder to store virtual machine configuration files on the Hyper-V host." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xvmhost).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xvmhyperv.rb b/lib/puppet/type/dsc_xvmhyperv.rb deleted file mode 100644 index 78f72f03..00000000 --- a/lib/puppet/type/dsc_xvmhyperv.rb +++ /dev/null @@ -1,488 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xvmhyperv) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xVMHyperV resource type. - Automatically generated from - 'xHyper-V/DSCResources/MSFT_xVMHyperV/MSFT_xVMHyperV.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xVMHyperV' end - def dscmeta_resource_name; 'MSFT_xVMHyperV' end - def dscmeta_module_name; 'xHyper-V' end - def dscmeta_module_version; '3.9.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of the VM" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: VhdPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_vhdpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "VhdPath - VHD associated with the VM" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SwitchName - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_switchname, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "SwitchName - Virtual switch(es) associated with the VM" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: State - # Type: string - # IsMandatory: False - # Values: ["Running", "Paused", "Off"] - newparam(:dsc_state) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "State - State of the VM. Valid values are Running, Paused, Off." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Running', 'running', 'Paused', 'paused', 'Off', 'off'].include?(value) - fail("Invalid value '#{value}'. Valid values are Running, Paused, Off") - end - end - end - - # Name: Path - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - Folder where the VM data will be stored" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Generation - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_generation) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "Generation - Virtual machine generation" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: StartupMemory - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_startupmemory) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "StartupMemory - Startup RAM for the VM." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MinimumMemory - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_minimummemory) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "MinimumMemory - Minimum RAM for the VM. This enables dynamic memory." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaximumMemory - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_maximummemory) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "MaximumMemory - Maximum RAM for the VM. This enable dynamic memory." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MACAddress - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_macaddress, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "MACAddress - MAC address(es) of the VM NICs." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: ProcessorCount - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_processorcount) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "ProcessorCount - Processor count for the VM" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: WaitForIP - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_waitforip) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "WaitForIP - Waits for VM to get valid IP address." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: RestartIfNeeded - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_restartifneeded) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RestartIfNeeded - If specified, shutdowns and restarts the VM as needed for property changes" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Should the VM be created or deleted Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Notes - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_notes) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Notes - Notes about the VM." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SecureBoot - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_secureboot) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "SecureBoot - Enable secure boot for Generation 2 VMs." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: EnableGuestService - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enableguestservice) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "EnableGuestService - Enable Guest Service Interface for the VM." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ID - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_id) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ID - VM unique ID" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Status - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_status) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Status - Status of the VM" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CPUUsage - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_cpuusage) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "CPUUsage - CPU Usage of the VM" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MemoryAssigned - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_memoryassigned) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "MemoryAssigned - Memory assigned to the VM" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Uptime - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_uptime) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Uptime - Uptime of the VM" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CreationTime - # Type: datetime - # IsMandatory: False - # Values: None - newparam(:dsc_creationtime) do - def mof_type; 'datetime' end - def mof_is_embedded?; false end - desc "CreationTime - Creation time of the VM" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: HasDynamicMemory - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_hasdynamicmemory) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "HasDynamicMemory - Does VM has dynamic memory enabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: NetworkAdapters - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_networkadapters, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "NetworkAdapters - Network adapters' IP addresses of the VM" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xvmhyperv).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xvmnetworkadapter.rb b/lib/puppet/type/dsc_xvmnetworkadapter.rb deleted file mode 100644 index 569e3a90..00000000 --- a/lib/puppet/type/dsc_xvmnetworkadapter.rb +++ /dev/null @@ -1,181 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xvmnetworkadapter) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xVMNetworkAdapter resource type. - Automatically generated from - 'xHyper-V/DSCResources/MSFT_xVMNetworkAdapter/MSFT_xVMNetworkAdapter.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_id is a required attribute') if self[:dsc_id].nil? - end - - def dscmeta_resource_friendly_name; 'xVMNetworkAdapter' end - def dscmeta_resource_name; 'MSFT_xVMNetworkAdapter' end - def dscmeta_module_name; 'xHyper-V' end - def dscmeta_module_version; '3.9.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Id - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_id) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Id" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: SwitchName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_switchname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SwitchName" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: VMName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_vmname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "VMName" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MacAddress - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_macaddress) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "MacAddress" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: DynamicMacAddress - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_dynamicmacaddress) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "DynamicMacAddress" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xvmnetworkadapter).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xvmprocessor.rb b/lib/puppet/type/dsc_xvmprocessor.rb deleted file mode 100644 index f3fb0d3f..00000000 --- a/lib/puppet/type/dsc_xvmprocessor.rb +++ /dev/null @@ -1,288 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xvmprocessor) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xVMProcessor resource type. - Automatically generated from - 'xHyper-V/DSCResources/MSFT_xVMProcessor/MSFT_xVMProcessor.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_vmname is a required attribute') if self[:dsc_vmname].nil? - end - - def dscmeta_resource_friendly_name; 'xVMProcessor' end - def dscmeta_resource_name; 'MSFT_xVMProcessor' end - def dscmeta_module_name; 'xHyper-V' end - def dscmeta_module_version; '3.9.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: VMName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_vmname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "VMName - Specifies the name of the virtual machine on which the processor is to be configured." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: EnableHostResourceProtection - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enablehostresourceprotection) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "EnableHostResourceProtection - Specifies whether to enable host resource protection." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ExposeVirtualizationExtensions - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_exposevirtualizationextensions) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ExposeVirtualizationExtensions - Specifies whether nested virtualization is enabled." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: HwThreadCountPerCore - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_hwthreadcountpercore) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "HwThreadCountPerCore - Specifies the maximum thread core per processor core." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Maximum - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_maximum) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "Maximum - Specifies the maximum percentage of resources available to the virtual machine processor to be configured. Allowed values range from 0 to 100." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaximumCountPerNumaNode - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maximumcountpernumanode) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "MaximumCountPerNumaNode - Specifies the maximum number of processors per NUMA node to be configured for the virtual machine." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaximumCountPerNumaSocket - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maximumcountpernumasocket) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "MaximumCountPerNumaSocket - Specifies the maximum number of sockets per NUMA node to be configured for the virtual machine." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RelativeWeight - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_relativeweight) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "RelativeWeight - Specifies the priority for allocating the physical computer's processing power to this virtual machine relative to others. Allowed values range from 1 to 10000." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: Reserve - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_reserve) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "Reserve - Specifies the percentage of processor resources to be reserved for this virtual machine. Allowed values range from 0 to 100." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ResourcePoolName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_resourcepoolname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ResourcePoolName - Specifies the name of the processor resource pool to be used." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CompatibilityForMigrationEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_compatibilityformigrationenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "CompatibilityForMigrationEnabled - Specifies whether the virtual processors features are to be limited for compatibility when migrating the virtual machine to another host." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: CompatibilityForOlderOperatingSystemsEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_compatibilityforolderoperatingsystemsenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "CompatibilityForOlderOperatingSystemsEnabled - Specifies whether the virtual processor's features are to be limited for compatibility with older operating systems." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: RestartIfNeeded - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_restartifneeded) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RestartIfNeeded - If specified, shutdowns and restarts the VM if needed for property changes." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xvmprocessor).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xvmswitch.rb b/lib/puppet/type/dsc_xvmswitch.rb deleted file mode 100644 index 657e1a90..00000000 --- a/lib/puppet/type/dsc_xvmswitch.rb +++ /dev/null @@ -1,223 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xvmswitch) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xVMSwitch resource type. - Automatically generated from - 'xHyper-V/DSCResources/MSFT_xVMSwitch/MSFT_xVMSwitch.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - fail('dsc_type is a required attribute') if self[:dsc_type].nil? - end - - def dscmeta_resource_friendly_name; 'xVMSwitch' end - def dscmeta_resource_name; 'MSFT_xVMSwitch' end - def dscmeta_module_name; 'xHyper-V' end - def dscmeta_module_version; '3.9.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of the VM Switch" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Type - # Type: string - # IsMandatory: True - # Values: ["External", "Internal", "Private"] - newparam(:dsc_type) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Type - Type of switch Valid values are External, Internal, Private." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['External', 'external', 'Internal', 'internal', 'Private', 'private'].include?(value) - fail("Invalid value '#{value}'. Valid values are External, Internal, Private") - end - end - end - - # Name: NetAdapterName - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_netadaptername, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "NetAdapterName - Network adapter name(s) for external switch type" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: AllowManagementOS - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_allowmanagementos) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "AllowManagementOS - Specify if the VM host has access to the physical NIC" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: EnableEmbeddedTeaming - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enableembeddedteaming) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "EnableEmbeddedTeaming - Should embedded NIC teaming be used (Windows Server 2016 only)" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: BandwidthReservationMode - # Type: string - # IsMandatory: False - # Values: ["Default", "Weight", "Absolute", "None", "NA"] - newparam(:dsc_bandwidthreservationmode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "BandwidthReservationMode - Type of Bandwidth Reservation Mode to use for the switch Valid values are Default, Weight, Absolute, None, NA." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Default', 'default', 'Weight', 'weight', 'Absolute', 'absolute', 'None', 'none', 'NA', 'na'].include?(value) - fail("Invalid value '#{value}'. Valid values are Default, Weight, Absolute, None, NA") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Whether switch should be present or absent Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Id - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_id) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Id - Unique ID for the switch" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: NetAdapterInterfaceDescription - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_netadapterinterfacedescription) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "NetAdapterInterfaceDescription - Description of the network interface" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xvmswitch).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwaitforaddomain.rb b/lib/puppet/type/dsc_xwaitforaddomain.rb deleted file mode 100644 index 8caab022..00000000 --- a/lib/puppet/type/dsc_xwaitforaddomain.rb +++ /dev/null @@ -1,155 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwaitforaddomain) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xWaitForADDomain resource type. - Automatically generated from - 'xActiveDirectory/DSCResources/MSFT_xWaitForADDomain/MSFT_xWaitForADDomain.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_domainname is a required attribute') if self[:dsc_domainname].nil? - end - - def dscmeta_resource_friendly_name; 'xWaitForADDomain' end - def dscmeta_resource_name; 'MSFT_xWaitForADDomain' end - def dscmeta_module_name; 'xActiveDirectory' end - def dscmeta_module_version; '2.16.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: DomainName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_domainname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DomainName" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DomainUserCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_domainusercredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "DomainUserCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("DomainUserCredential", value) - end - end - - # Name: RetryIntervalSec - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_retryintervalsec) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "RetryIntervalSec" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RetryCount - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_retrycount) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "RetryCount" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RebootRetryCount - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_rebootretrycount) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "RebootRetryCount" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwaitforaddomain).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwaitforavailabilitygroup.rb b/lib/puppet/type/dsc_xwaitforavailabilitygroup.rb deleted file mode 100644 index 9e35cf04..00000000 --- a/lib/puppet/type/dsc_xwaitforavailabilitygroup.rb +++ /dev/null @@ -1,121 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwaitforavailabilitygroup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xWaitForAvailabilityGroup resource type. - Automatically generated from - 'xSQLServer/DSCResources/MSFT_xWaitForAvailabilityGroup/MSFT_xWaitForAvailabilityGroup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xWaitForAvailabilityGroup' end - def dscmeta_resource_name; 'MSFT_xWaitForAvailabilityGroup' end - def dscmeta_module_name; 'xSQLServer' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Availability Group Name" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RetryIntervalSec - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_retryintervalsec) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "RetryIntervalSec - Interval to check for Availability Group" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RetryCount - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_retrycount) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "RetryCount - Maximum number of retries to check Availabilty group creation" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwaitforavailabilitygroup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwaitforcertificateservices.rb b/lib/puppet/type/dsc_xwaitforcertificateservices.rb deleted file mode 100644 index a7f30b93..00000000 --- a/lib/puppet/type/dsc_xwaitforcertificateservices.rb +++ /dev/null @@ -1,138 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwaitforcertificateservices) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xWaitForCertificateServices resource type. - Automatically generated from - 'xCertificate/DSCResources/MSFT_xWaitForCertificateServices/MSFT_xWaitForCertificateServices.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_caserverfqdn is a required attribute') if self[:dsc_caserverfqdn].nil? - fail('dsc_carootname is a required attribute') if self[:dsc_carootname].nil? - end - - def dscmeta_resource_friendly_name; 'xWaitForCertificateServices' end - def dscmeta_resource_name; 'MSFT_xWaitForCertificateServices' end - def dscmeta_module_name; 'xCertificate' end - def dscmeta_module_version; '3.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: CAServerFQDN - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_caserverfqdn) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CAServerFQDN - The FQDN of the Active Directory Certificate Service Certificate Authority to wait for." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CARootName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_carootname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CARootName - The name of the Active Directory Certificate Service Certificate Authority to wait for." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RetryIntervalSeconds - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_retryintervalseconds) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "RetryIntervalSeconds - Specifies the number of seconds to wait for the Active Directory Certificate Service Certificate Authority to become available. Defaults to 10 seconds." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RetryCount - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_retrycount) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "RetryCount - The number of times to loop the retry interval while waiting for the Active Directory Certificate Service Certificate Authority. Defaults to 60 retries." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwaitforcertificateservices).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwaitforcluster.rb b/lib/puppet/type/dsc_xwaitforcluster.rb deleted file mode 100644 index 9cbae1ce..00000000 --- a/lib/puppet/type/dsc_xwaitforcluster.rb +++ /dev/null @@ -1,121 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwaitforcluster) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xWaitForCluster resource type. - Automatically generated from - 'xFailOverCluster/DSCResources/MSFT_xWaitForCluster/MSFT_xWaitForCluster.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xWaitForCluster' end - def dscmeta_resource_name; 'MSFT_xWaitForCluster' end - def dscmeta_module_name; 'xFailOverCluster' end - def dscmeta_module_version; '1.8.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of the cluster to wait for." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RetryIntervalSec - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_retryintervalsec) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "RetryIntervalSec - Interval to check for cluster existence. Default values is 10 seconds." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RetryCount - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_retrycount) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "RetryCount - Maximum number of retries to check for cluster existence. Default value is 50 retries." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwaitforcluster).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwaitfordisk.rb b/lib/puppet/type/dsc_xwaitfordisk.rb deleted file mode 100644 index 28dbd4a1..00000000 --- a/lib/puppet/type/dsc_xwaitfordisk.rb +++ /dev/null @@ -1,139 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwaitfordisk) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xWaitForDisk resource type. - Automatically generated from - 'xStorage/DSCResources/MSFT_xWaitForDisk/MSFT_xWaitForDisk.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_diskid is a required attribute') if self[:dsc_diskid].nil? - end - - def dscmeta_resource_friendly_name; 'xWaitForDisk' end - def dscmeta_resource_name; 'MSFT_xWaitForDisk' end - def dscmeta_module_name; 'xStorage' end - def dscmeta_module_version; '3.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: DiskId - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_diskid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DiskId - Specifies the disk identifier for the disk to wait for." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DiskIdType - # Type: string - # IsMandatory: False - # Values: ["Number", "UniqueId"] - newparam(:dsc_diskidtype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DiskIdType - Specifies the identifier type the DiskId contains. Defaults to Number. Valid values are Number, UniqueId." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Number', 'number', 'UniqueId', 'uniqueid'].include?(value) - fail("Invalid value '#{value}'. Valid values are Number, UniqueId") - end - end - end - - # Name: RetryIntervalSec - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_retryintervalsec) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "RetryIntervalSec - Specifies the number of seconds to wait for the disk to become available." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RetryCount - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_retrycount) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "RetryCount - The number of times to loop the retry interval while waiting for the disk." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwaitfordisk).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwaitforsqlhagroup.rb b/lib/puppet/type/dsc_xwaitforsqlhagroup.rb deleted file mode 100644 index 59902400..00000000 --- a/lib/puppet/type/dsc_xwaitforsqlhagroup.rb +++ /dev/null @@ -1,183 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwaitforsqlhagroup) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xWaitForSqlHAGroup resource type. - Automatically generated from - 'xSqlPs/DSCResources/MSFT_xWaitForSqlHAGroup/MSFT_xWaitForSqlHAGroup.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xWaitForSqlHAGroup' end - def dscmeta_resource_name; 'MSFT_xWaitForSqlHAGroup' end - def dscmeta_module_name; 'xSqlPs' end - def dscmeta_module_version; '1.4.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of Sql High Availability group" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ClusterName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_clustername) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ClusterName - The name of windows failover cluster for the availability group." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RetryIntervalSec - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_retryintervalsec) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "RetryIntervalSec - Interval to check the HA group existency" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RetryCount - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_retrycount) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "RetryCount - Maximum number of retries to check HA group existency" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: InstanceName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_instancename) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "InstanceName - The name of sql instance." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DomainCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_domaincredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "DomainCredential - Domain credential could get list of cluster nodes." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("DomainCredential", value) - end - end - - # Name: SqlAdministratorCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_sqladministratorcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "SqlAdministratorCredential - Sql sa credential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("SqlAdministratorCredential", value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwaitforsqlhagroup).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwaitforvolume.rb b/lib/puppet/type/dsc_xwaitforvolume.rb deleted file mode 100644 index 899fe6c0..00000000 --- a/lib/puppet/type/dsc_xwaitforvolume.rb +++ /dev/null @@ -1,121 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwaitforvolume) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xWaitForVolume resource type. - Automatically generated from - 'xStorage/DSCResources/MSFT_xWaitForVolume/MSFT_xWaitForVolume.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_driveletter is a required attribute') if self[:dsc_driveletter].nil? - end - - def dscmeta_resource_friendly_name; 'xWaitForVolume' end - def dscmeta_resource_name; 'MSFT_xWaitForVolume' end - def dscmeta_module_name; 'xStorage' end - def dscmeta_module_version; '3.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: DriveLetter - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_driveletter) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DriveLetter - Specifies the drive letter of the volume to wait for." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: RetryIntervalSec - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_retryintervalsec) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "RetryIntervalSec - Specifies the number of seconds to wait for the volume to become available." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RetryCount - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_retrycount) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "RetryCount - The number of times to loop the retry interval while waiting for the volume." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwaitforvolume).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwebapplication.rb b/lib/puppet/type/dsc_xwebapplication.rb deleted file mode 100644 index 1661d300..00000000 --- a/lib/puppet/type/dsc_xwebapplication.rb +++ /dev/null @@ -1,315 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwebapplication) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - class PuppetX::Dsc::TypeHelpers - def self.validate_MSFT_xWebApplicationAuthenticationInformation(mof_type_map, name, value) - required = [] - allowed = ['anonymous','basic','digest','windows'] - lowkey_hash = Hash[value.map { |k, v| [k.to_s.downcase, v] }] - - missing = required - lowkey_hash.keys - unless missing.empty? - fail "#{name} is missing the following required keys: #{missing.join(',')}" - end - - extraneous = lowkey_hash.keys - required - allowed - unless extraneous.empty? - fail "#{name} includes invalid keys: #{extraneous.join(',')}" - end - - lowkey_hash.keys.each do |key| - if lowkey_hash[key] - validate_mof_type(mof_type_map[key], 'MSFT_xWebApplicationAuthenticationInformation', key, lowkey_hash[key]) - end - end - end - end - - @doc = %q{ - The DSC xWebApplication resource type. - Automatically generated from - 'xWebAdministration/DSCResources/MSFT_xWebApplication/MSFT_xWebApplication.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_website is a required attribute') if self[:dsc_website].nil? - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xWebApplication' end - def dscmeta_resource_name; 'MSFT_xWebApplication' end - def dscmeta_module_name; 'xWebAdministration' end - def dscmeta_module_version; '1.18.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Website - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_website) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Website - Name of website with which web application is associated" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of web application" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: WebAppPool - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_webapppool) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WebAppPool - Web application pool for the web application" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PhysicalPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_physicalpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PhysicalPath - Physical path for the web application directory" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Whether web application should be present or absent Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SslFlags - # Type: string[] - # IsMandatory: False - # Values: ["", "Ssl", "SslNegotiateCert", "SslRequireCert", "Ssl128"] - newparam(:dsc_sslflags, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "SslFlags - SSLFlags for the application Valid values are , Ssl, SslNegotiateCert, SslRequireCert, Ssl128." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - if value.kind_of?(Array) - unless (['', '', 'Ssl', 'ssl', 'SslNegotiateCert', 'sslnegotiatecert', 'SslRequireCert', 'sslrequirecert', 'Ssl128', 'ssl128'] & value).count == value.count - fail("Invalid value #{value}. Valid values are , Ssl, SslNegotiateCert, SslRequireCert, Ssl128") - end - end - if value.kind_of?(String) - unless ['', '', 'Ssl', 'ssl', 'SslNegotiateCert', 'sslnegotiatecert', 'SslRequireCert', 'sslrequirecert', 'Ssl128', 'ssl128'].include?(value) - fail("Invalid value #{value}. Valid values are , Ssl, SslNegotiateCert, SslRequireCert, Ssl128") - end - end - end - munge do |value| - Array(value) - end - end - - # Name: AuthenticationInfo - # Type: MSFT_xWebApplicationAuthenticationInformation - # IsMandatory: False - # Values: None - newparam(:dsc_authenticationinfo) do - def mof_type; 'MSFT_xWebApplicationAuthenticationInformation' end - def mof_is_embedded?; true end - def mof_type_map - {"anonymous"=>{:type=>"boolean"}, "basic"=>{:type=>"boolean"}, "digest"=>{:type=>"boolean"}, "windows"=>{:type=>"boolean"}} - end - desc "AuthenticationInfo - Hashtable containing authentication information (Anonymous, Basic, Digest, Windows)" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_xWebApplicationAuthenticationInformation(mof_type_map, "AuthenticationInfo", value) - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, value) - end - end - - # Name: PreloadEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_preloadenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "PreloadEnabled - Allows a Application to automatically start without a request" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ServiceAutoStartEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_serviceautostartenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ServiceAutoStartEnabled - Enables Autostart on an Application." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ServiceAutoStartProvider - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_serviceautostartprovider) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServiceAutoStartProvider - Adds a AutostartProvider" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ApplicationType - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_applicationtype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApplicationType - Adds a AutostartProvider ApplicationType" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: EnabledProtocols - # Type: string[] - # IsMandatory: False - # Values: ["http", "https", "net.tcp", "net.msmq", "net.pipe"] - newparam(:dsc_enabledprotocols, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "EnabledProtocols - Adds EnabledProtocols on an Application Valid values are http, https, net.tcp, net.msmq, net.pipe." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - if value.kind_of?(Array) - unless (['http', 'http', 'https', 'https', 'net.tcp', 'net.tcp', 'net.msmq', 'net.msmq', 'net.pipe', 'net.pipe'] & value).count == value.count - fail("Invalid value #{value}. Valid values are http, https, net.tcp, net.msmq, net.pipe") - end - end - if value.kind_of?(String) - unless ['http', 'http', 'https', 'https', 'net.tcp', 'net.tcp', 'net.msmq', 'net.msmq', 'net.pipe', 'net.pipe'].include?(value) - fail("Invalid value #{value}. Valid values are http, https, net.tcp, net.msmq, net.pipe") - end - end - end - munge do |value| - Array(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwebapplication).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwebapppool.rb b/lib/puppet/type/dsc_xwebapppool.rb deleted file mode 100644 index e1862b42..00000000 --- a/lib/puppet/type/dsc_xwebapppool.rb +++ /dev/null @@ -1,911 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwebapppool) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xWebAppPool resource type. - Automatically generated from - 'xWebAdministration/DSCResources/MSFT_xWebAppPool/MSFT_xWebAppPool.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xWebAppPool' end - def dscmeta_resource_name; 'MSFT_xWebAppPool' end - def dscmeta_module_name; 'xWebAdministration' end - def dscmeta_module_version; '1.18.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Indicates the application pool name. The value must contain between 1 and 64 characters." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Indicates if the application pool exists. Set this property to Absent to ensure that the application pool does not exist. Setting it to Present (the default value) ensures that the application pool exists. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: State - # Type: string - # IsMandatory: False - # Values: ["Started", "Stopped"] - newparam(:dsc_state) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "State - Indicates the state of the application pool. The values that are allowed for this property are: Started, Stopped. Valid values are Started, Stopped." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Started', 'started', 'Stopped', 'stopped'].include?(value) - fail("Invalid value '#{value}'. Valid values are Started, Stopped") - end - end - end - - # Name: autoStart - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_autostart) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "autoStart - When set to true, indicates to the World Wide Web Publishing Service (W3SVC) that the application pool should be automatically started when it is created or when IIS is started." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: CLRConfigFile - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_clrconfigfile) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CLRConfigFile - Indicates the .NET configuration file for the application pool." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: enable32BitAppOnWin64 - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enable32bitapponwin64) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "enable32BitAppOnWin64 - When set to true, enables a 32-bit application to run on a computer that runs a 64-bit version of Windows." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: enableConfigurationOverride - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_enableconfigurationoverride) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "enableConfigurationOverride - When set to true, indicates that delegated settings in Web.config files will processed for applications within this application pool. When set to false, all settings in Web.config files will be ignored for this application pool." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: managedPipelineMode - # Type: string - # IsMandatory: False - # Values: ["Integrated", "Classic"] - newparam(:dsc_managedpipelinemode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "managedPipelineMode - Indicates the request-processing mode that is used to process requests for managed content. The values that are allowed for this property are: Integrated, Classic. Valid values are Integrated, Classic." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Integrated', 'integrated', 'Classic', 'classic'].include?(value) - fail("Invalid value '#{value}'. Valid values are Integrated, Classic") - end - end - end - - # Name: managedRuntimeLoader - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_managedruntimeloader) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "managedRuntimeLoader - Indicates the managed loader to use for pre-loading the application pool." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: managedRuntimeVersion - # Type: string - # IsMandatory: False - # Values: ["v4.0", "v2.0", ""] - newparam(:dsc_managedruntimeversion) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "managedRuntimeVersion - Indicates the CLR version to be used by the application pool. The values that are allowed for this property are: v4.0, v2.0, and ''. Valid values are v4.0, v2.0, ." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['v4.0', 'v4.0', 'v2.0', 'v2.0', '', ''].include?(value) - fail("Invalid value '#{value}'. Valid values are v4.0, v2.0, ") - end - end - end - - # Name: passAnonymousToken - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_passanonymoustoken) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "passAnonymousToken - When set to true, the Windows Process Activation Service (WAS) creates and passes a token for the built-in IUSR anonymous user account to the Anonymous authentication module. The Anonymous authentication module uses the token to impersonate the built-in account. When this property is set to false, the token will not be passed." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: startMode - # Type: string - # IsMandatory: False - # Values: ["OnDemand", "AlwaysRunning"] - newparam(:dsc_startmode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "startMode - Indicates the startup type for the application pool. The values that are allowed for this property are: OnDemand, AlwaysRunning. Valid values are OnDemand, AlwaysRunning." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['OnDemand', 'ondemand', 'AlwaysRunning', 'alwaysrunning'].include?(value) - fail("Invalid value '#{value}'. Valid values are OnDemand, AlwaysRunning") - end - end - end - - # Name: queueLength - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_queuelength) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "queueLength - Indicates the maximum number of requests that HTTP.sys will queue for the application pool. The value must be a valid integer between 10 and 65535." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: cpuAction - # Type: string - # IsMandatory: False - # Values: ["NoAction", "KillW3wp", "Throttle", "ThrottleUnderLoad"] - newparam(:dsc_cpuaction) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "cpuAction - Configures the action that IIS takes when a worker process exceeds its configured CPU limit. The values that are allowed for this property are: NoAction, KillW3wp, Throttle, and ThrottleUnderLoad. Valid values are NoAction, KillW3wp, Throttle, ThrottleUnderLoad." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['NoAction', 'noaction', 'KillW3wp', 'killw3wp', 'Throttle', 'throttle', 'ThrottleUnderLoad', 'throttleunderload'].include?(value) - fail("Invalid value '#{value}'. Valid values are NoAction, KillW3wp, Throttle, ThrottleUnderLoad") - end - end - end - - # Name: cpuLimit - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_cpulimit) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "cpuLimit - Configures the maximum percentage of CPU time (in 1/1000ths of one percent) that the worker processes in the application pool are allowed to consume over a period of time as indicated by the cpuResetInterval property. The value must be a valid integer between 0 and 100000." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: cpuResetInterval - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_cpuresetinterval) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "cpuResetInterval - Indicates the reset period (in minutes) for CPU monitoring and throttling limits on the application pool. The value must be a string representation of a TimeSpan value. The valid range (in minutes) is 0 to 1440. Setting the value of this property to 0 disables CPU monitoring." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: cpuSmpAffinitized - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_cpusmpaffinitized) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "cpuSmpAffinitized - Indicates whether a particular worker process assigned to the application pool should also be assigned to a given CPU." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: cpuSmpProcessorAffinityMask - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_cpusmpprocessoraffinitymask) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "cpuSmpProcessorAffinityMask - Indicates the hexadecimal processor mask for multi-processor computers, which indicates to which CPU the worker processes in the application pool should be bound. Before this property takes effect, the cpuSmpAffinitized property must be set to true for the application pool. The value must be a valid integer between 0 and 4294967295." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: cpuSmpProcessorAffinityMask2 - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_cpusmpprocessoraffinitymask2) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "cpuSmpProcessorAffinityMask2 - Indicates the high-order DWORD hexadecimal processor mask for 64-bit multi-processor computers, which indicates to which CPU the worker processes in the application pool should be bound. Before this property takes effect, the cpuSmpAffinitized property must be set to true for the application pool. The value must be a valid integer between 0 and 4294967295." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: identityType - # Type: string - # IsMandatory: False - # Values: ["ApplicationPoolIdentity", "LocalService", "LocalSystem", "NetworkService", "SpecificUser"] - newparam(:dsc_identitytype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "identityType - Indicates the account identity under which the application pool runs. The values that are allowed for this property are: ApplicationPoolIdentity, LocalService, LocalSystem, NetworkService, and SpecificUser. Valid values are ApplicationPoolIdentity, LocalService, LocalSystem, NetworkService, SpecificUser." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['ApplicationPoolIdentity', 'applicationpoolidentity', 'LocalService', 'localservice', 'LocalSystem', 'localsystem', 'NetworkService', 'networkservice', 'SpecificUser', 'specificuser'].include?(value) - fail("Invalid value '#{value}'. Valid values are ApplicationPoolIdentity, LocalService, LocalSystem, NetworkService, SpecificUser") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - Indicates the custom account crededentials. This property is only valid when the identityType property is set to SpecificUser." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: idleTimeout - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_idletimeout) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "idleTimeout - Indicates the amount of time (in minutes) a worker process will remain idle before it shuts down. The value must be a string representation of a TimeSpan value and must be less than the restartTimeLimit property value. The valid range (in minutes) is 0 to 43200." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: idleTimeoutAction - # Type: string - # IsMandatory: False - # Values: ["Terminate", "Suspend"] - newparam(:dsc_idletimeoutaction) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "idleTimeoutAction - Indicates the action to perform when the idle timeout duration has been reached. The values that are allowed for this property are: Terminate, Suspend. Valid values are Terminate, Suspend." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Terminate', 'terminate', 'Suspend', 'suspend'].include?(value) - fail("Invalid value '#{value}'. Valid values are Terminate, Suspend") - end - end - end - - # Name: loadUserProfile - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_loaduserprofile) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "loadUserProfile - Indicates whether IIS loads the user profile for the application pool identity." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: logEventOnProcessModel - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logeventonprocessmodel) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "logEventOnProcessModel - Indicates that IIS should generate an event log entry for each occurrence of the specified process model events." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: logonType - # Type: string - # IsMandatory: False - # Values: ["LogonBatch", "LogonService"] - newparam(:dsc_logontype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "logonType - Indicates the logon type for the process identity. The values that are allowed for this property are: LogonBatch, LogonService. Valid values are LogonBatch, LogonService." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['LogonBatch', 'logonbatch', 'LogonService', 'logonservice'].include?(value) - fail("Invalid value '#{value}'. Valid values are LogonBatch, LogonService") - end - end - end - - # Name: manualGroupMembership - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_manualgroupmembership) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "manualGroupMembership - Indicates whether the IIS_IUSRS group Security Identifier (SID) is added to the worker process token." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: maxProcesses - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maxprocesses) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "maxProcesses - Indicates the maximum number of worker processes that would be used for the application pool. The value must be a valid integer between 0 and 2147483647." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: pingingEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_pingingenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "pingingEnabled - Indicates whether pinging (health monitoring) is enabled for the worker process(es) serving this application pool." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: pingInterval - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_pinginterval) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "pingInterval - Indicates the period of time (in seconds) between health monitoring pings sent to the worker process(es) serving this application pool. The value must be a string representation of a TimeSpan value. The valid range (in seconds) is 1 to 4294967." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: pingResponseTime - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_pingresponsetime) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "pingResponseTime - Indicates the maximum time (in seconds) that a worker process is given to respond to a health monitoring ping. The value must be a string representation of a TimeSpan value. The valid range (in seconds) is 1 to 4294967." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: setProfileEnvironment - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_setprofileenvironment) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "setProfileEnvironment - Indicates the environment to be set based on the user profile for the new process." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: shutdownTimeLimit - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_shutdowntimelimit) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "shutdownTimeLimit - Indicates the period of time (in seconds) a worker process is given to finish processing requests and shut down. The value must be a string representation of a TimeSpan value. The valid range (in seconds) is 1 to 4294967." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: startupTimeLimit - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_startuptimelimit) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "startupTimeLimit - Indicates the period of time (in seconds) a worker process is given to start up and initialize. The value must be a string representation of a TimeSpan value. The valid range (in seconds) is 1 to 4294967." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: orphanActionExe - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_orphanactionexe) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "orphanActionExe - Indicates an executable to run when a worker process is orphaned." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: orphanActionParams - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_orphanactionparams) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "orphanActionParams - Indicates parameters for the executable that is specified in the orphanActionExe property." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: orphanWorkerProcess - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_orphanworkerprocess) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "orphanWorkerProcess - Indicates whether to assign a worker process to an orphan state instead of terminating it when the application pool fails. If true, an unresponsive worker process will be orphaned instead of terminated." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: loadBalancerCapabilities - # Type: string - # IsMandatory: False - # Values: ["HttpLevel", "TcpLevel"] - newparam(:dsc_loadbalancercapabilities) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "loadBalancerCapabilities - Indicates the response behavior of a service when it is unavailable. The values that are allowed for this property are: HttpLevel, TcpLevel. If set to HttpLevel and the application pool is stopped, HTTP.sys will return HTTP 503 error. If set to TcpLevel, HTTP.sys will reset the connection. Valid values are HttpLevel, TcpLevel." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['HttpLevel', 'httplevel', 'TcpLevel', 'tcplevel'].include?(value) - fail("Invalid value '#{value}'. Valid values are HttpLevel, TcpLevel") - end - end - end - - # Name: rapidFailProtection - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_rapidfailprotection) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "rapidFailProtection - Indicates whether rapid-fail protection is enabled. If true, the application pool is shut down if there are a specified number of worker process crashes within a specified time period." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: rapidFailProtectionInterval - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_rapidfailprotectioninterval) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "rapidFailProtectionInterval - Indicates the time interval (in minutes) during which the specified number of worker process crashes must occur before the application pool is shut down by rapid-fail protection. The value must be a string representation of a TimeSpan value. The valid range (in minutes) is 1 to 144000." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: rapidFailProtectionMaxCrashes - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_rapidfailprotectionmaxcrashes) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "rapidFailProtectionMaxCrashes - Indicates the maximum number of worker process crashes permitted before the application pool is shut down by rapid-fail protection. The value must be a valid integer between 0 and 2147483647." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: autoShutdownExe - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_autoshutdownexe) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "autoShutdownExe - Indicates an executable to run when the application pool is shut down by rapid-fail protection." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: autoShutdownParams - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_autoshutdownparams) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "autoShutdownParams - Indicates parameters for the executable that is specified in the autoShutdownExe property." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: disallowOverlappingRotation - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disallowoverlappingrotation) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "disallowOverlappingRotation - Indicates whether the W3SVC service should start another worker process to replace the existing worker process while that process is shutting down. If true, the application pool recycle will happen such that the existing worker process exits before another worker process is created." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: disallowRotationOnConfigChange - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_disallowrotationonconfigchange) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "disallowRotationOnConfigChange - Indicates whether the W3SVC service should rotate worker processes in the application pool when the configuration has changed. If true, the application pool will not recycle when its configuration is changed." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: logEventOnRecycle - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logeventonrecycle) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "logEventOnRecycle - Indicates that IIS should generate an event log entry for each occurrence of the specified recycling events." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: restartMemoryLimit - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_restartmemorylimit) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "restartMemoryLimit - Indicates the maximum amount of virtual memory (in KB) a worker process can consume before causing the application pool to recycle. The value must be a valid integer between 0 and 4294967295. A value of 0 means there is no limit." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: restartPrivateMemoryLimit - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_restartprivatememorylimit) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "restartPrivateMemoryLimit - Indicates the maximum amount of private memory (in KB) a worker process can consume before causing the application pool to recycle. The value must be a valid integer between 0 and 4294967295. A value of 0 means there is no limit." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: restartRequestsLimit - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_restartrequestslimit) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "restartRequestsLimit - Indicates the maximum number of requests the application pool can process before it is recycled. The value must be a valid integer between 0 and 4294967295. A value of 0 means the application pool can process an unlimited number of requests." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: restartTimeLimit - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_restarttimelimit) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "restartTimeLimit - Indicates the period of time (in minutes) after which the application pool will recycle. The value must be a string representation of a TimeSpan value. The valid range (in minutes) is 0 to 432000. A value of 0 means the application pool does not recycle on a regular interval." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: restartSchedule - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_restartschedule, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "restartSchedule - Indicates a set of specific local times, in 24 hour format, when the application pool is recycled. The value must be an array of string representations of TimeSpan values. TimeSpan values must be between 00:00:00 and 23:59:59 seconds inclusive, with a granularity of 60 seconds. Setting the value of this property to '' disables the schedule." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwebapppool).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwebapppooldefaults.rb b/lib/puppet/type/dsc_xwebapppooldefaults.rb deleted file mode 100644 index e2d06cd6..00000000 --- a/lib/puppet/type/dsc_xwebapppooldefaults.rb +++ /dev/null @@ -1,124 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwebapppooldefaults) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xWebAppPoolDefaults resource type. - Automatically generated from - 'xWebAdministration/DSCResources/MSFT_xWebAppPoolDefaults/MSFT_xWebAppPoolDefaults.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_applyto is a required attribute') if self[:dsc_applyto].nil? - end - - def dscmeta_resource_friendly_name; 'xWebAppPoolDefaults' end - def dscmeta_resource_name; 'MSFT_xWebAppPoolDefaults' end - def dscmeta_module_name; 'xWebAdministration' end - def dscmeta_module_version; '1.18.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ApplyTo - # Type: string - # IsMandatory: True - # Values: ["Machine"] - newparam(:dsc_applyto) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApplyTo - Dummy value because we need a key, always 'Machine' Valid values are Machine." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Machine', 'machine'].include?(value) - fail("Invalid value '#{value}'. Valid values are Machine") - end - end - end - - # Name: ManagedRuntimeVersion - # Type: string - # IsMandatory: False - # Values: ["", "v2.0", "v4.0"] - newparam(:dsc_managedruntimeversion) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ManagedRuntimeVersion - applicationPools/applicationPoolDefaults/managedRuntimeVersion Valid values are , v2.0, v4.0." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['', '', 'v2.0', 'v2.0', 'v4.0', 'v4.0'].include?(value) - fail("Invalid value '#{value}'. Valid values are , v2.0, v4.0") - end - end - end - - # Name: IdentityType - # Type: string - # IsMandatory: False - # Values: ["ApplicationPoolIdentity", "LocalService", "LocalSystem", "NetworkService"] - newparam(:dsc_identitytype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IdentityType - applicationPools/applicationPoolDefaults/processModel/identityType Valid values are ApplicationPoolIdentity, LocalService, LocalSystem, NetworkService." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['ApplicationPoolIdentity', 'applicationpoolidentity', 'LocalService', 'localservice', 'LocalSystem', 'localsystem', 'NetworkService', 'networkservice'].include?(value) - fail("Invalid value '#{value}'. Valid values are ApplicationPoolIdentity, LocalService, LocalSystem, NetworkService") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwebapppooldefaults).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwebconfigkeyvalue.rb b/lib/puppet/type/dsc_xwebconfigkeyvalue.rb deleted file mode 100644 index 09c674ac..00000000 --- a/lib/puppet/type/dsc_xwebconfigkeyvalue.rb +++ /dev/null @@ -1,173 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwebconfigkeyvalue) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xWebConfigKeyValue resource type. - Automatically generated from - 'xWebAdministration/DSCResources/MSFT_xWebConfigKeyValue/MSFT_xWebConfigKeyValue.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_websitepath is a required attribute') if self[:dsc_websitepath].nil? - fail('dsc_configsection is a required attribute') if self[:dsc_configsection].nil? - fail('dsc_key is a required attribute') if self[:dsc_key].nil? - end - - def dscmeta_resource_friendly_name; 'xWebConfigKeyValue' end - def dscmeta_resource_name; 'MSFT_xWebConfigKeyValue' end - def dscmeta_module_name; 'xWebAdministration' end - def dscmeta_module_version; '1.18.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: WebsitePath - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_websitepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WebsitePath - Path to website location(IIS or WebAdministration format)" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ConfigSection - # Type: string - # IsMandatory: True - # Values: ["AppSettings"] - newparam(:dsc_configsection) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ConfigSection - Config Section to be update Valid values are AppSettings." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['AppSettings', 'appsettings'].include?(value) - fail("Invalid value '#{value}'. Valid values are AppSettings") - end - end - end - - # Name: Key - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_key) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Key - Key for AppSettings" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Value - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_value) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Value - Value for AppSettings" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: IsAttribute - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_isattribute) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "IsAttribute - If the given key value pair is for attribute, default is element" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwebconfigkeyvalue).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwebpackagedeploy.rb b/lib/puppet/type/dsc_xwebpackagedeploy.rb deleted file mode 100644 index ea44cf18..00000000 --- a/lib/puppet/type/dsc_xwebpackagedeploy.rb +++ /dev/null @@ -1,120 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwebpackagedeploy) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xWebPackageDeploy resource type. - Automatically generated from - 'xWebDeploy/DSCResources/xWebPackageDeploy/xWebPackageDeploy.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_destination is a required attribute') if self[:dsc_destination].nil? - end - - def dscmeta_resource_friendly_name; 'xWebPackageDeploy' end - def dscmeta_resource_name; 'xWebPackageDeploy' end - def dscmeta_module_name; 'xWebDeploy' end - def dscmeta_module_version; '1.2.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - Full path to the zip package." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Destination - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_destination) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Destination - WebDeploy destination for content path or website name)." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Desired state of resource. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwebpackagedeploy).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwebsite.rb b/lib/puppet/type/dsc_xwebsite.rb deleted file mode 100644 index 31290f0c..00000000 --- a/lib/puppet/type/dsc_xwebsite.rb +++ /dev/null @@ -1,454 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwebsite) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - class PuppetX::Dsc::TypeHelpers - def self.validate_MSFT_xWebBindingInformation(mof_type_map, name, value) - required = ['protocol'] - allowed = ['bindinginformation','ipaddress','port','hostname','certificatethumbprint','certificatestorename','sslflags'] - lowkey_hash = Hash[value.map { |k, v| [k.to_s.downcase, v] }] - - missing = required - lowkey_hash.keys - unless missing.empty? - fail "#{name} is missing the following required keys: #{missing.join(',')}" - end - - extraneous = lowkey_hash.keys - required - allowed - unless extraneous.empty? - fail "#{name} includes invalid keys: #{extraneous.join(',')}" - end - - lowkey_hash.keys.each do |key| - if lowkey_hash[key] - validate_mof_type(mof_type_map[key], 'MSFT_xWebBindingInformation', key, lowkey_hash[key]) - end - end - end - end - class PuppetX::Dsc::TypeHelpers - def self.validate_MSFT_xWebAuthenticationInformation(mof_type_map, name, value) - required = [] - allowed = ['anonymous','basic','digest','windows'] - lowkey_hash = Hash[value.map { |k, v| [k.to_s.downcase, v] }] - - missing = required - lowkey_hash.keys - unless missing.empty? - fail "#{name} is missing the following required keys: #{missing.join(',')}" - end - - extraneous = lowkey_hash.keys - required - allowed - unless extraneous.empty? - fail "#{name} includes invalid keys: #{extraneous.join(',')}" - end - - lowkey_hash.keys.each do |key| - if lowkey_hash[key] - validate_mof_type(mof_type_map[key], 'MSFT_xWebAuthenticationInformation', key, lowkey_hash[key]) - end - end - end - end - - @doc = %q{ - The DSC xWebsite resource type. - Automatically generated from - 'xWebAdministration/DSCResources/MSFT_xWebsite/MSFT_xWebsite.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xWebsite' end - def dscmeta_resource_name; 'MSFT_xWebsite' end - def dscmeta_module_name; 'xWebAdministration' end - def dscmeta_module_version; '1.18.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PhysicalPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_physicalpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PhysicalPath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: State - # Type: string - # IsMandatory: False - # Values: ["Started", "Stopped"] - newparam(:dsc_state) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "State - Valid values are Started, Stopped." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Started', 'started', 'Stopped', 'stopped'].include?(value) - fail("Invalid value '#{value}'. Valid values are Started, Stopped") - end - end - end - - # Name: ApplicationPool - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_applicationpool) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApplicationPool" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: BindingInfo - # Type: MSFT_xWebBindingInformation[] - # IsMandatory: False - # Values: None - newparam(:dsc_bindinginfo, :array_matching => :all) do - def mof_type; 'MSFT_xWebBindingInformation[]' end - def mof_is_embedded?; true end - def mof_type_map - {"protocol"=>{:type=>"string", :values=>["http", "https", "msmq.formatname", "net.msmq", "net.pipe", "net.tcp"]}, "bindinginformation"=>{:type=>"string"}, "ipaddress"=>{:type=>"string"}, "port"=>{:type=>"uint16"}, "hostname"=>{:type=>"string"}, "certificatethumbprint"=>{:type=>"string"}, "certificatestorename"=>{:type=>"string", :values=>["My", "WebHosting"]}, "sslflags"=>{:type=>"string", :values=>["0", "1", "2", "3"]}} - end - desc "BindingInfo - Website's binding information in the form of an array of embedded instances of the MSFT_xWebBindingInformation CIM class." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be an array of hashes or a hash") - end - (value.kind_of?(Hash) ? [value] : value).each_with_index do |v, i| - fail "BindingInfo value at index #{i} should be a Hash" unless v.is_a? Hash - - PuppetX::Dsc::TypeHelpers.validate_MSFT_xWebBindingInformation(mof_type_map, "BindingInfo", v) - end - end - munge do |value| - value.kind_of?(Hash) ? - [PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, value)] : - value.map { |v| PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, v) } - end - end - - # Name: DefaultPage - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_defaultpage, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "DefaultPage" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: EnabledProtocols - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_enabledprotocols) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "EnabledProtocols" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AuthenticationInfo - # Type: MSFT_xWebAuthenticationInformation - # IsMandatory: False - # Values: None - newparam(:dsc_authenticationinfo) do - def mof_type; 'MSFT_xWebAuthenticationInformation' end - def mof_is_embedded?; true end - def mof_type_map - {"anonymous"=>{:type=>"boolean"}, "basic"=>{:type=>"boolean"}, "digest"=>{:type=>"boolean"}, "windows"=>{:type=>"boolean"}} - end - desc "AuthenticationInfo - Hashtable containing authentication information (Anonymous, Basic, Digest, Windows)" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_xWebAuthenticationInformation(mof_type_map, "AuthenticationInfo", value) - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, value) - end - end - - # Name: PreloadEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_preloadenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "PreloadEnabled - Allows the Website to automatically start without a request" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ServiceAutoStartEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_serviceautostartenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "ServiceAutoStartEnabled - Enables Autostart on a Website." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: ServiceAutoStartProvider - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_serviceautostartprovider) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ServiceAutoStartProvider - Adds a AutostartProvider" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ApplicationType - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_applicationtype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApplicationType - Adds a AutostartProvider ApplicationType" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogPath - The directory to be used for logfiles" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LogFlags - # Type: string[] - # IsMandatory: False - # Values: ["Date", "Time", "ClientIP", "UserName", "SiteName", "ComputerName", "ServerIP", "Method", "UriStem", "UriQuery", "HttpStatus", "Win32Status", "BytesSent", "BytesRecv", "TimeTaken", "ServerPort", "UserAgent", "Cookie", "Referer", "ProtocolVersion", "Host", "HttpSubStatus"] - newparam(:dsc_logflags, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "LogFlags - The W3C logging fields Valid values are Date, Time, ClientIP, UserName, SiteName, ComputerName, ServerIP, Method, UriStem, UriQuery, HttpStatus, Win32Status, BytesSent, BytesRecv, TimeTaken, ServerPort, UserAgent, Cookie, Referer, ProtocolVersion, Host, HttpSubStatus." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - if value.kind_of?(Array) - unless (['Date', 'date', 'Time', 'time', 'ClientIP', 'clientip', 'UserName', 'username', 'SiteName', 'sitename', 'ComputerName', 'computername', 'ServerIP', 'serverip', 'Method', 'method', 'UriStem', 'uristem', 'UriQuery', 'uriquery', 'HttpStatus', 'httpstatus', 'Win32Status', 'win32status', 'BytesSent', 'bytessent', 'BytesRecv', 'bytesrecv', 'TimeTaken', 'timetaken', 'ServerPort', 'serverport', 'UserAgent', 'useragent', 'Cookie', 'cookie', 'Referer', 'referer', 'ProtocolVersion', 'protocolversion', 'Host', 'host', 'HttpSubStatus', 'httpsubstatus'] & value).count == value.count - fail("Invalid value #{value}. Valid values are Date, Time, ClientIP, UserName, SiteName, ComputerName, ServerIP, Method, UriStem, UriQuery, HttpStatus, Win32Status, BytesSent, BytesRecv, TimeTaken, ServerPort, UserAgent, Cookie, Referer, ProtocolVersion, Host, HttpSubStatus") - end - end - if value.kind_of?(String) - unless ['Date', 'date', 'Time', 'time', 'ClientIP', 'clientip', 'UserName', 'username', 'SiteName', 'sitename', 'ComputerName', 'computername', 'ServerIP', 'serverip', 'Method', 'method', 'UriStem', 'uristem', 'UriQuery', 'uriquery', 'HttpStatus', 'httpstatus', 'Win32Status', 'win32status', 'BytesSent', 'bytessent', 'BytesRecv', 'bytesrecv', 'TimeTaken', 'timetaken', 'ServerPort', 'serverport', 'UserAgent', 'useragent', 'Cookie', 'cookie', 'Referer', 'referer', 'ProtocolVersion', 'protocolversion', 'Host', 'host', 'HttpSubStatus', 'httpsubstatus'].include?(value) - fail("Invalid value #{value}. Valid values are Date, Time, ClientIP, UserName, SiteName, ComputerName, ServerIP, Method, UriStem, UriQuery, HttpStatus, Win32Status, BytesSent, BytesRecv, TimeTaken, ServerPort, UserAgent, Cookie, Referer, ProtocolVersion, Host, HttpSubStatus") - end - end - end - munge do |value| - Array(value) - end - end - - # Name: LogPeriod - # Type: string - # IsMandatory: False - # Values: ["Hourly", "Daily", "Weekly", "Monthly", "MaxSize"] - newparam(:dsc_logperiod) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogPeriod - How often the log file should rollover Valid values are Hourly, Daily, Weekly, Monthly, MaxSize." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Hourly', 'hourly', 'Daily', 'daily', 'Weekly', 'weekly', 'Monthly', 'monthly', 'MaxSize', 'maxsize'].include?(value) - fail("Invalid value '#{value}'. Valid values are Hourly, Daily, Weekly, Monthly, MaxSize") - end - end - end - - # Name: LogTruncateSize - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logtruncatesize) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogTruncateSize - How large the file should be before it is truncated" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LoglocalTimeRollover - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_loglocaltimerollover) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "LoglocalTimeRollover - Use the localtime for file naming and rollover" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: LogFormat - # Type: string - # IsMandatory: False - # Values: ["IIS", "W3C", "NCSA"] - newparam(:dsc_logformat) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogFormat - Format of the Logfiles. Only W3C supports LogFlags Valid values are IIS, W3C, NCSA." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['IIS', 'iis', 'W3C', 'w3c', 'NCSA', 'ncsa'].include?(value) - fail("Invalid value '#{value}'. Valid values are IIS, W3C, NCSA") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwebsite).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwebsitedefaults.rb b/lib/puppet/type/dsc_xwebsitedefaults.rb deleted file mode 100644 index 7b58932b..00000000 --- a/lib/puppet/type/dsc_xwebsitedefaults.rb +++ /dev/null @@ -1,169 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwebsitedefaults) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xWebSiteDefaults resource type. - Automatically generated from - 'xWebAdministration/DSCResources/MSFT_xWebSiteDefaults/MSFT_xWebSiteDefaults.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_applyto is a required attribute') if self[:dsc_applyto].nil? - end - - def dscmeta_resource_friendly_name; 'xWebSiteDefaults' end - def dscmeta_resource_name; 'MSFT_xWebSiteDefaults' end - def dscmeta_module_name; 'xWebAdministration' end - def dscmeta_module_version; '1.18.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: ApplyTo - # Type: string - # IsMandatory: True - # Values: ["Machine"] - newparam(:dsc_applyto) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ApplyTo - Dummy value because we need a key, always 'Machine' Valid values are Machine." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Machine', 'machine'].include?(value) - fail("Invalid value '#{value}'. Valid values are Machine") - end - end - end - - # Name: LogFormat - # Type: string - # IsMandatory: False - # Values: ["W3C", "IIS", "NCSA", "Custom"] - newparam(:dsc_logformat) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogFormat - sites/siteDefaults/logFile/logFormat Valid values are W3C, IIS, NCSA, Custom." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['W3C', 'w3c', 'IIS', 'iis', 'NCSA', 'ncsa', 'Custom', 'custom'].include?(value) - fail("Invalid value '#{value}'. Valid values are W3C, IIS, NCSA, Custom") - end - end - end - - # Name: LogDirectory - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logdirectory) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogDirectory - sites/siteDefaults/logFile/directory" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TraceLogDirectory - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_tracelogdirectory) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TraceLogDirectory - sites/siteDefaults/traceFailedRequestsLogging/directory" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DefaultApplicationPool - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_defaultapplicationpool) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DefaultApplicationPool - sites/applicationDefaults/applicationPool" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AllowSubDirConfig - # Type: string - # IsMandatory: False - # Values: ["true", "false"] - newparam(:dsc_allowsubdirconfig) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AllowSubDirConfig - sites/virtualDirectoryDefaults/allowSubDirConfig Valid values are true, false." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['true', 'true', 'false', 'false'].include?(value) - fail("Invalid value '#{value}'. Valid values are true, false") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwebsitedefaults).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwebvirtualdirectory.rb b/lib/puppet/type/dsc_xwebvirtualdirectory.rb deleted file mode 100644 index 82d19694..00000000 --- a/lib/puppet/type/dsc_xwebvirtualdirectory.rb +++ /dev/null @@ -1,154 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwebvirtualdirectory) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xWebVirtualDirectory resource type. - Automatically generated from - 'xWebAdministration/DSCResources/MSFT_xWebVirtualDirectory/MSFT_xWebVirtualDirectory.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_website is a required attribute') if self[:dsc_website].nil? - fail('dsc_webapplication is a required attribute') if self[:dsc_webapplication].nil? - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xWebVirtualDirectory' end - def dscmeta_resource_name; 'MSFT_xWebVirtualDirectory' end - def dscmeta_module_name; 'xWebAdministration' end - def dscmeta_module_version; '1.18.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Website - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_website) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Website - Name of website with which Web Application is associated" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: WebApplication - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_webapplication) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WebApplication - Web application name for the virtual directory" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Name of virtual directory" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PhysicalPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_physicalpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "PhysicalPath - Physical path for the virtual directory" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Whether virtual directory should be present or absent Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwebvirtualdirectory).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwefcollector.rb b/lib/puppet/type/dsc_xwefcollector.rb deleted file mode 100644 index b8574a43..00000000 --- a/lib/puppet/type/dsc_xwefcollector.rb +++ /dev/null @@ -1,105 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwefcollector) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xWEFCollector resource type. - Automatically generated from - 'xWindowsEventForwarding/DSCResources/MSFT_xWEFCollector/MSFT_xWEFCollector.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xWEFCollector' end - def dscmeta_resource_name; 'MSFT_xWEFCollector' end - def dscmeta_module_name; 'xWindowsEventForwarding' end - def dscmeta_module_version; '1.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Determines whether the Collector service should be enabled or disabled Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - Provide a unique name for the setting" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwefcollector).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwefsubscription.rb b/lib/puppet/type/dsc_xwefsubscription.rb deleted file mode 100644 index 77275873..00000000 --- a/lib/puppet/type/dsc_xwefsubscription.rb +++ /dev/null @@ -1,411 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwefsubscription) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xWEFSubscription resource type. - Automatically generated from - 'xWindowsEventForwarding/DSCResources/MSFT_xWEFSubscription/MSFT_xWEFSubscription.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_subscriptionid is a required attribute') if self[:dsc_subscriptionid].nil? - end - - def dscmeta_resource_friendly_name; 'xWEFSubscription' end - def dscmeta_resource_name; 'MSFT_xWEFSubscription' end - def dscmeta_module_name; 'xWindowsEventForwarding' end - def dscmeta_module_version; '1.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: SubscriptionID - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_subscriptionid) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SubscriptionID - Name of the Subscription" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Determines whether to validate or remove the scubscription Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SubscriptionType - # Type: string - # IsMandatory: False - # Values: ["CollectorInitiated", "SourceInitiated"] - newparam(:dsc_subscriptiontype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SubscriptionType - Type of Subscription to create Valid values are CollectorInitiated, SourceInitiated." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['CollectorInitiated', 'collectorinitiated', 'SourceInitiated', 'sourceinitiated'].include?(value) - fail("Invalid value '#{value}'. Valid values are CollectorInitiated, SourceInitiated") - end - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - Description of the Collector subscription" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Enabled - # Type: string - # IsMandatory: False - # Values: ["true", "false"] - newparam(:dsc_enabled) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Enabled - Sets whether the subscription will be enabled, default true Valid values are true, false." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['true', 'true', 'false', 'false'].include?(value) - fail("Invalid value '#{value}'. Valid values are true, false") - end - end - end - - # Name: DeliveryMode - # Type: string - # IsMandatory: False - # Values: ["Push", "Pull"] - newparam(:dsc_deliverymode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DeliveryMode - Configures whether the collector will pull events from source nodes or if the source nodes will push events to the collector, default push Valid values are Push, Pull." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Push', 'push', 'Pull', 'pull'].include?(value) - fail("Invalid value '#{value}'. Valid values are Push, Pull") - end - end - end - - # Name: MaxItems - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_maxitems) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "MaxItems - The number of events that can occur on the source before they are submitted to the collector, default 1" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: MaxLatencyTime - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_maxlatencytime) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "MaxLatencyTime - The maximum amount of time that can pass before events are submitted to the collector, default 20000" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: HeartBeatInterval - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_heartbeatinterval) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "HeartBeatInterval - Frequency to verify connectivity, default 20000" - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ReadExistingEvents - # Type: string - # IsMandatory: False - # Values: ["true", "false"] - newparam(:dsc_readexistingevents) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ReadExistingEvents - Should the collector read existing or only new events, default false Valid values are true, false." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['true', 'true', 'false', 'false'].include?(value) - fail("Invalid value '#{value}'. Valid values are true, false") - end - end - end - - # Name: TransportName - # Type: string - # IsMandatory: False - # Values: ["HTTP", "HTTPS"] - newparam(:dsc_transportname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TransportName - Determines whether to require SSL, default HTTP Valid values are HTTP, HTTPS." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['HTTP', 'http', 'HTTPS', 'https'].include?(value) - fail("Invalid value '#{value}'. Valid values are HTTP, HTTPS") - end - end - end - - # Name: TransportPort - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_transportport) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "TransportPort - Set the port number that WinRM should use to make a connection, default 5985" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: ContentFormat - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_contentformat) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "ContentFormat - Format that event logs will be submitted in, default RenderedText" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Locale - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_locale) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Locale - Sets the subscription Locale, default en-US" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LogFile - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logfile) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogFile - Sets the event log that the collected events will be written to, default ForwardedEvents" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CredentialsType - # Type: string - # IsMandatory: False - # Values: ["Default", "Basic", "Negotiate", "Digest"] - newparam(:dsc_credentialstype) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "CredentialsType - Sets the credential type used for authenticating to WinRM, default Default Valid values are Default, Basic, Negotiate, Digest." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Default', 'default', 'Basic', 'basic', 'Negotiate', 'negotiate', 'Digest', 'digest'].include?(value) - fail("Invalid value '#{value}'. Valid values are Default, Basic, Negotiate, Digest") - end - end - end - - # Name: AllowedSourceNonDomainComputers - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_allowedsourcenondomaincomputers, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "AllowedSourceNonDomainComputers - This parameter has not been fully implemented, only required for source initiated scenarios, provide XML to set IssuerCAList, AllowedSubjectList, or DeniedSubjectList if this will be used, default empty string" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: AllowedSourceDomainComputers - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_allowedsourcedomaincomputers) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AllowedSourceDomainComputers - In Source Initiated scenario this SDDL determines who can push events, default O:NSG:NSD:(A;;GA;;;DC)(A;;GA;;;NS) which equates to Domain Computers and Network Service" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Query - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_query, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Query - Expects an array of hashtables that set which events should be collected, default is all application and system logs" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Address - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_address, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Address - Expects an array of source node FQDNs, default source.wef.test to prevent errors when only staging test subscription" - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwefsubscription).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwindowsfeature.rb b/lib/puppet/type/dsc_xwindowsfeature.rb deleted file mode 100644 index d276b166..00000000 --- a/lib/puppet/type/dsc_xwindowsfeature.rb +++ /dev/null @@ -1,167 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwindowsfeature) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xWindowsFeature resource type. - Automatically generated from - 'xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsFeature/MSFT_xWindowsFeature.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xWindowsFeature' end - def dscmeta_resource_name; 'MSFT_xWindowsFeature' end - def dscmeta_module_name; 'xPSDesiredStateConfiguration' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the role or feature to install or uninstall." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether the role or feature should be installed or uninstalled. To install the feature, set this property to Present. To uninstall the feature, set the property to Absent. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: IncludeAllSubFeature - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_includeallsubfeature) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "IncludeAllSubFeature - Specifies whether the subfeatures of the main feature should also be installed." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: LogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogPath - The path to the log file to log this operation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - A credential, if needed, to install or uninstall the role or feature." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: DisplayName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_displayname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DisplayName - The display name of the retrieved role or feature." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwindowsfeature).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwindowsoptionalfeature.rb b/lib/puppet/type/dsc_xwindowsoptionalfeature.rb deleted file mode 100644 index 4b60d484..00000000 --- a/lib/puppet/type/dsc_xwindowsoptionalfeature.rb +++ /dev/null @@ -1,218 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwindowsoptionalfeature) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xWindowsOptionalFeature resource type. - Automatically generated from - 'xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsOptionalFeature/MSFT_xWindowsOptionalFeature.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xWindowsOptionalFeature' end - def dscmeta_resource_name; 'MSFT_xWindowsOptionalFeature' end - def dscmeta_module_name; 'xPSDesiredStateConfiguration' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the feature to enable or disable." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether the feature should be enabled or disabled. To enable the feature, set this property to Present. To disable the feature, set the property to Absent. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: RemoveFilesOnDisable - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_removefilesondisable) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RemoveFilesOnDisable - Specifies that all files associated with the feature should be removed if the feature is being disabled." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: NoWindowsUpdateCheck - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_nowindowsupdatecheck) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "NoWindowsUpdateCheck - Specifies whether or not DISM contacts Windows Update (WU) when searching for the source files to enable the feature. If $true, DISM will not contact WU." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: LogLevel - # Type: string - # IsMandatory: False - # Values: ["ErrorsOnly", "ErrorsAndWarning", "ErrorsAndWarningAndInformation"] - newparam(:dsc_loglevel) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogLevel - The maximum output level to show in the log. Accepted values are: ErrorsOnly (only errors are logged), ErrorsAndWarning (errors and warnings are logged), and ErrorsAndWarningAndInformation (errors, warnings, and debug information are logged). Valid values are ErrorsOnly, ErrorsAndWarning, ErrorsAndWarningAndInformation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['ErrorsOnly', 'errorsonly', 'ErrorsAndWarning', 'errorsandwarning', 'ErrorsAndWarningAndInformation', 'errorsandwarningandinformation'].include?(value) - fail("Invalid value '#{value}'. Valid values are ErrorsOnly, ErrorsAndWarning, ErrorsAndWarningAndInformation") - end - end - end - - # Name: LogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogPath - The path to the log file to log this operation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: CustomProperties - # Type: string[] - # IsMandatory: False - # Values: None - newparam(:dsc_customproperties, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "CustomProperties - The custom properties retrieved from the Windows optional feature as an array of strings." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - end - munge do |value| - Array(value) - end - end - - # Name: Description - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_description) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Description - The description retrieved from the Windows optional feature." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: DisplayName - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_displayname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "DisplayName - The display name retrieved from the Windows optional feature." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwindowsoptionalfeature).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwindowspackagecab.rb b/lib/puppet/type/dsc_xwindowspackagecab.rb deleted file mode 100644 index 8e5fef61..00000000 --- a/lib/puppet/type/dsc_xwindowspackagecab.rb +++ /dev/null @@ -1,135 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwindowspackagecab) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xWindowsPackageCab resource type. - Automatically generated from - 'xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsPackageCab/MSFT_xWindowsPackageCab.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_name is a required attribute') if self[:dsc_name].nil? - end - - def dscmeta_resource_friendly_name; 'xWindowsPackageCab' end - def dscmeta_resource_name; 'MSFT_xWindowsPackageCab' end - def dscmeta_module_name; 'xPSDesiredStateConfiguration' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Name - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_name) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Name - The name of the package to install or uninstall." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Specifies whether the package should be installed or uninstalled. To install the package, set this property to Present. To uninstall the package, set the property to Absent. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: SourcePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_sourcepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SourcePath - The path to the cab file to install or uninstall the package from." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LogPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogPath - The path to a file to log the operation to." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwindowspackagecab).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwindowsprocess.rb b/lib/puppet/type/dsc_xwindowsprocess.rb deleted file mode 100644 index 451e8fd8..00000000 --- a/lib/puppet/type/dsc_xwindowsprocess.rb +++ /dev/null @@ -1,306 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwindowsprocess) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xWindowsProcess resource type. - Automatically generated from - 'xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsProcess/MSFT_xWindowsProcess.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_path is a required attribute') if self[:dsc_path].nil? - fail('dsc_arguments is a required attribute') if self[:dsc_arguments].nil? - end - - def dscmeta_resource_friendly_name; 'xWindowsProcess' end - def dscmeta_resource_name; 'MSFT_xWindowsProcess' end - def dscmeta_module_name; 'xPSDesiredStateConfiguration' end - def dscmeta_module_version; '7.0.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Path - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_path) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Path - The full path or file name to the process executable to start or stop." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Arguments - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_arguments) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Arguments - A string of arguments to pass to the process executable. Pass in an empty string if no arguments are needed." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Credential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_credential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "Credential - The credential to run the process under." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Indicates whether the process is present (running) or absent (not running). Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - # Name: StandardOutputPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_standardoutputpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "StandardOutputPath - The path to write the standard output stream to." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: StandardErrorPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_standarderrorpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "StandardErrorPath - The path to write the standard error stream to." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: StandardInputPath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_standardinputpath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "StandardInputPath - The path to receive standard input from." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: WorkingDirectory - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_workingdirectory) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "WorkingDirectory - The directory to run the processes under." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: PagedMemorySize - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_pagedmemorysize) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "PagedMemorySize - The amount of paged memory, in bytes, allocated for the process." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: NonPagedMemorySize - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_nonpagedmemorysize) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "NonPagedMemorySize - The amount of nonpaged memory, in bytes, allocated for the process." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: VirtualMemorySize - # Type: uint64 - # IsMandatory: False - # Values: None - newparam(:dsc_virtualmemorysize) do - def mof_type; 'uint64' end - def mof_is_embedded?; false end - desc "VirtualMemorySize - The amount of virtual memory, in bytes, allocated for the process." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: HandleCount - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_handlecount) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "HandleCount - The number of handles opened by the process." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ProcessId - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_processid) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "ProcessId - The unique identifier of the process." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: ProcessCount - # Type: sint32 - # IsMandatory: False - # Values: None - newparam(:dsc_processcount) do - def mof_type; 'sint32' end - def mof_is_embedded?; false end - desc "ProcessCount - The number of instances of the given process that are currently running." - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwindowsprocess).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwindowsupdateagent.rb b/lib/puppet/type/dsc_xwindowsupdateagent.rb deleted file mode 100644 index 1da4a79c..00000000 --- a/lib/puppet/type/dsc_xwindowsupdateagent.rb +++ /dev/null @@ -1,217 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwindowsupdateagent) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xWindowsUpdateAgent resource type. - Automatically generated from - 'xWindowsUpdate/DscResources/MSFT_xWindowsUpdateAgent/MSFT_xWindowsUpdateAgent.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_issingleinstance is a required attribute') if self[:dsc_issingleinstance].nil? - end - - def dscmeta_resource_friendly_name; 'xWindowsUpdateAgent' end - def dscmeta_resource_name; 'MSFT_xWindowsUpdateAgent' end - def dscmeta_module_name; 'xWindowsUpdate' end - def dscmeta_module_version; '2.7.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: IsSingleInstance - # Type: string - # IsMandatory: True - # Values: ["Yes"] - newparam(:dsc_issingleinstance) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes' Valid values are Yes." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Yes', 'yes'].include?(value) - fail("Invalid value '#{value}'. Valid values are Yes") - end - end - end - - # Name: Category - # Type: string[] - # IsMandatory: False - # Values: ["Security", "Important", "Optional"] - newparam(:dsc_category, :array_matching => :all) do - def mof_type; 'string[]' end - def mof_is_embedded?; false end - desc "Category - Indicates if the resource should ensure all Windows Updates are installed or if Automatic updates should be disabled. Valid values are Security, Important, Optional." - validate do |value| - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end - if value.kind_of?(Array) - unless (['Security', 'security', 'Important', 'important', 'Optional', 'optional'] & value).count == value.count - fail("Invalid value #{value}. Valid values are Security, Important, Optional") - end - end - if value.kind_of?(String) - unless ['Security', 'security', 'Important', 'important', 'Optional', 'optional'].include?(value) - fail("Invalid value #{value}. Valid values are Security, Important, Optional") - end - end - end - munge do |value| - Array(value) - end - end - - # Name: Notifications - # Type: string - # IsMandatory: False - # Values: ["Disabled", "ScheduledInstallation"] - newparam(:dsc_notifications) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Notifications - Indicates if Windows update agent should notify about updates, see:https://msdn.microsoft.com/en-us/library/windows/desktop/aa385806%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396. Valid values are Disabled, ScheduledInstallation." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Disabled', 'disabled', 'ScheduledInstallation', 'scheduledinstallation'].include?(value) - fail("Invalid value '#{value}'. Valid values are Disabled, ScheduledInstallation") - end - end - end - - # Name: Source - # Type: string - # IsMandatory: False - # Values: ["WindowsUpdate", "MicrosoftUpdate", "WSUS"] - newparam(:dsc_source) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Source - Indicates which source service Windows update agent should use. Note: WSUS is not implemented in this resource. Valid values are WindowsUpdate, MicrosoftUpdate, WSUS." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['WindowsUpdate', 'windowsupdate', 'MicrosoftUpdate', 'microsoftupdate', 'WSUS', 'wsus'].include?(value) - fail("Invalid value '#{value}'. Valid values are WindowsUpdate, MicrosoftUpdate, WSUS") - end - end - end - - # Name: UpdateNow - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_updatenow) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "UpdateNow - Indicates if the resource should trigger an update during consistency." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: AutomaticUpdatesNotificationSetting - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_automaticupdatesnotificationsetting) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AutomaticUpdatesNotificationSetting - Automatic Updates Notification Setting" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: TotalUpdatesNotInstalled - # Type: uint32 - # IsMandatory: False - # Values: None - newparam(:dsc_totalupdatesnotinstalled) do - def mof_type; 'uint32' end - def mof_is_embedded?; false end - desc "TotalUpdatesNotInstalled - Count of updates not installed. Only returned if UpdateNow is specified." - validate do |value| - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: RebootRequired - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_rebootrequired) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "RebootRequired - Indicates if Wua Requires a reboot. Only returned if UpdateNow is specified." - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwindowsupdateagent).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwineventlog.rb b/lib/puppet/type/dsc_xwineventlog.rb deleted file mode 100644 index 65d87c2b..00000000 --- a/lib/puppet/type/dsc_xwineventlog.rb +++ /dev/null @@ -1,167 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwineventlog) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xWinEventLog resource type. - Automatically generated from - 'xWinEventLog/DSCResources/MSFT_xWinEventLog/MSFT_xWinEventLog.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_logname is a required attribute') if self[:dsc_logname].nil? - end - - def dscmeta_resource_friendly_name; 'xWinEventLog' end - def dscmeta_resource_name; 'MSFT_xWinEventLog' end - def dscmeta_module_name; 'xWinEventLog' end - def dscmeta_module_version; '1.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: LogName - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_logname) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogName - Name of the event log" - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: MaximumSizeInBytes - # Type: sint64 - # IsMandatory: False - # Values: None - newparam(:dsc_maximumsizeinbytes) do - def mof_type; 'sint64' end - def mof_is_embedded?; false end - desc "MaximumSizeInBytes - sizethat the event log file is allowed to be When the file reaches this maximum size it is considered full" - validate do |value| - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end - end - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end - end - - # Name: IsEnabled - # Type: boolean - # IsMandatory: False - # Values: None - newparam(:dsc_isenabled) do - def mof_type; 'boolean' end - def mof_is_embedded?; false end - desc "IsEnabled" - validate do |value| - end - newvalues(true, false) - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end - end - - # Name: LogMode - # Type: string - # IsMandatory: False - # Values: ["AutoBackup", "Circular", "Retain"] - newparam(:dsc_logmode) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogMode - Valid values are AutoBackup, Circular, Retain." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['AutoBackup', 'autobackup', 'Circular', 'circular', 'Retain', 'retain'].include?(value) - fail("Invalid value '#{value}'. Valid values are AutoBackup, Circular, Retain") - end - end - end - - # Name: SecurityDescriptor - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_securitydescriptor) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "SecurityDescriptor" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: LogFilePath - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_logfilepath) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "LogFilePath" - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwineventlog).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/lib/puppet/type/dsc_xwordpresssite.rb b/lib/puppet/type/dsc_xwordpresssite.rb deleted file mode 100644 index f385e210..00000000 --- a/lib/puppet/type/dsc_xwordpresssite.rb +++ /dev/null @@ -1,151 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_xwordpresssite) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - - - @doc = %q{ - The DSC xWordPressSite resource type. - Automatically generated from - 'xWordPress/DscResources/MSFT_xWordPressSite/MSFT_xWordPressSite.schema.mof' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - fail('dsc_uri is a required attribute') if self[:dsc_uri].nil? - end - - def dscmeta_resource_friendly_name; 'xWordPressSite' end - def dscmeta_resource_name; 'MSFT_xWordPressSite' end - def dscmeta_module_name; 'xWordPress' end - def dscmeta_module_version; '1.1.0.0' end - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } - newvalue(:present) { provider.create } - newvalue(:absent) { provider.destroy } - defaultto { :present } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - - # Name: Uri - # Type: string - # IsMandatory: True - # Values: None - newparam(:dsc_uri) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Uri - The WordPress Site URI." - isrequired - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Title - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_title) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Title - The WordPress Site Default page title." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: AdministratorCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_administratorcredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "AdministratorCredential - The username and password of the WordPress administrator to create when creating the site." - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("AdministratorCredential", value) - end - end - - # Name: AdministratorEmail - # Type: string - # IsMandatory: False - # Values: None - newparam(:dsc_administratoremail) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "AdministratorEmail - The email address of the WordPress administrator to create." - validate do |value| - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - end - end - - # Name: Ensure - # Type: string - # IsMandatory: False - # Values: ["Present", "Absent"] - newparam(:dsc_ensure) do - def mof_type; 'string' end - def mof_is_embedded?; false end - desc "Ensure - Should the module be present or absent. Valid values are Present, Absent." - validate do |value| - resource[:ensure] = value.downcase - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end - unless ['Present', 'present', 'Absent', 'absent'].include?(value) - fail("Invalid value '#{value}'. Valid values are Present, Absent") - end - end - end - - - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_xwordpresssite).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end From a26c532f468bfb7b2e56e98daa1909e7779d8b5b Mon Sep 17 00:00:00 2001 From: James Pogran Date: Wed, 1 Nov 2017 11:56:27 -0400 Subject: [PATCH 02/10] (MODULES-5839) Remove all DSC Resource source files This commit removes all the source DSC Resources as they are no longer needed. --- .../AuditPolicyDsc/AuditPolicyDsc.psd1 | 122 - .../AuditPolicyResourceHelper.psm1 | 224 -- .../AuditPolicyResourceHelper.strings.psd1 | 8 - .../MSFT_AuditPolicyCsv.psm1 | 256 -- .../MSFT_AuditPolicyCsv.schema.mof | 6 - .../en-US/MSFT_AuditPolicyCsv.strings.psd1 | 12 - .../MSFT_AuditPolicyOption.psm1 | 205 -- .../MSFT_AuditPolicyOption.schema.mof | 7 - .../en-US/MSFT_AuditPolicyOption.strings.psd1 | 9 - .../MSFT_AuditPolicySubcategory.psm1 | 286 -- .../MSFT_AuditPolicySubcategory.schema.mof | 9 - .../MSFT_AuditPolicySubcategory.strings.psd1 | 10 - .../dsc_resources/AuditPolicyDsc/LICENSE | 21 - .../MSFT_OfficeOnlineServerFarm.psm1 | 702 ----- .../MSFT_OfficeOnlineServerFarm.schema.mof | 56 - .../MSFT_OfficeOnlineServerInstall.psm1 | 113 - .../MSFT_OfficeOnlineServerInstall.schema.mof | 7 - .../MSFT_OfficeOnlineServerMachine.psm1 | 193 -- .../MSFT_OfficeOnlineServerMachine.schema.mof | 9 - .../OfficeOnlineServerDsc.Util.psm1 | 245 -- .../OfficeOnlineServerDsc.psd1 | 125 - .../MSFT_SecuritySetting.psm1 | 465 --- .../MSFT_SecuritySetting.schema.mof | 26 - .../en-US/MSFT_SecuritySetting.strings.psd1 | 8 - .../MSFT_SecurityTemplate.psm1 | 221 -- .../MSFT_SecurityTemplate.schema.mof | 8 - .../en-US/MSFT_SecurityTemplate.strings.psd1 | 6 - .../MSFT_UserRightsAssignment.psm1 | 600 ---- .../MSFT_UserRightsAssignment.schema.mof | 9 - .../UserRightsFriendlyNameConversions.psd1 | 45 - .../MSFT_UserRightsAssignment.strings.psd1 | 13 - .../SecurityPolicyResourceHelper.psm1 | 322 -- .../SecurityPolicyResourceHelper.strings.psd1 | 6 - .../dsc_resources/SecurityPolicyDsc/LICENSE | 21 - .../SecurityPolicyDsc/SecurityPolicyDsc.psd1 | 63 - .../MSFT_SPAccessServiceApp.psm1 | 194 -- .../MSFT_SPAccessServiceApp.schema.mof | 9 - .../MSFT_SPAccessServices2010.psm1 | 185 -- .../MSFT_SPAccessServices2010.schema.mof | 9 - .../MSFT_SPAlternateUrl.psm1 | 192 -- .../MSFT_SPAlternateUrl.schema.mof | 10 - .../MSFT_SPAntivirusSettings.psm1 | 206 -- .../MSFT_SPAntivirusSettings.schema.mof | 12 - .../MSFT_SPAppCatalog/MSFT_SPAppCatalog.psm1 | 105 - .../MSFT_SPAppCatalog.schema.mof | 6 - .../MSFT_SPAppDomain/MSFT_SPAppDomain.psm1 | 94 - .../MSFT_SPAppDomain.schema.mof | 8 - .../MSFT_SPAppManagementServiceApp.psm1 | 262 -- .../MSFT_SPAppManagementServiceApp.schema.mof | 12 - .../MSFT_SPAppStoreSettings.psm1 | 167 -- .../MSFT_SPAppStoreSettings.schema.mof | 8 - .../MSFT_SPBCSServiceApp.psm1 | 220 -- .../MSFT_SPBCSServiceApp.schema.mof | 11 - .../MSFT_SPBlobCacheSettings.psm1 | 384 --- .../MSFT_SPBlobCacheSettings.schema.mof | 14 - .../MSFT_SPCacheAccounts.psm1 | 280 -- .../MSFT_SPCacheAccounts.schema.mof | 10 - .../MSFT_SPConfigWizard.psm1 | 248 -- .../MSFT_SPConfigWizard.schema.mof | 9 - .../MSFT_SPContentDatabase.psm1 | 401 --- .../MSFT_SPContentDatabase.schema.mof | 13 - .../MSFT_SPCreateFarm/MSFT_SPCreateFarm.psm1 | 395 --- .../MSFT_SPCreateFarm.schema.mof | 13 - .../MSFT_SPDatabaseAAG.psm1 | 294 -- .../MSFT_SPDatabaseAAG.schema.mof | 10 - .../MSFT_SPDesignerSettings.psm1 | 418 --- .../MSFT_SPDesignerSettings.schema.mof | 15 - .../MSFT_SPDiagnosticLoggingSettings.psm1 | 321 -- ...SFT_SPDiagnosticLoggingSettings.schema.mof | 24 - .../MSFT_SPDistributedCacheService.psm1 | 405 --- .../MSFT_SPDistributedCacheService.schema.mof | 11 - .../MSFT_SPExcelServiceApp.psm1 | 673 ----- .../MSFT_SPExcelServiceApp.schema.mof | 50 - .../DSCResources/MSFT_SPFarm/MSFT_SPFarm.psm1 | 609 ---- .../MSFT_SPFarm/MSFT_SPFarm.schema.mof | 15 - .../MSFT_SPFarmAdministrators.psm1 | 372 --- .../MSFT_SPFarmAdministrators.schema.mof | 10 - .../MSFT_SPFarmPropertyBag.psm1 | 173 -- .../MSFT_SPFarmPropertyBag.schema.mof | 8 - .../MSFT_SPFarmSolution.psm1 | 458 --- .../MSFT_SPFarmSolution.schema.mof | 12 - .../MSFT_SPFeature/MSFT_SPFeature.psm1 | 217 -- .../MSFT_SPFeature/MSFT_SPFeature.schema.mof | 10 - .../MSFT_SPHealthAnalyzerRuleState.psm1 | 274 -- .../MSFT_SPHealthAnalyzerRuleState.schema.mof | 26 - .../MSFT_SPInstall/MSFT_SPInstall.psm1 | 271 -- .../MSFT_SPInstall/MSFT_SPInstall.schema.mof | 10 - .../MSFT_SPInstallLanguagePack.psm1 | 386 --- .../MSFT_SPInstallLanguagePack.schema.mof | 10 - .../MSFT_SPInstallPrereqs.psm1 | 776 ----- .../MSFT_SPInstallPrereqs.schema.mof | 24 - .../MSFT_SPIrmSettings.psm1 | 178 -- .../MSFT_SPIrmSettings.schema.mof | 8 - .../MSFT_SPJoinFarm/MSFT_SPJoinFarm.psm1 | 332 --- .../MSFT_SPJoinFarm.schema.mof | 9 - .../MSFT_SPMachineTranslationServiceApp.psm1 | 209 -- ..._SPMachineTranslationServiceApp.schema.mof | 12 - .../MSFT_SPManagedAccount.psm1 | 219 -- .../MSFT_SPManagedAccount.schema.mof | 11 - .../MSFT_SPManagedMetaDataServiceApp.psm1 | 449 --- ...SFT_SPManagedMetaDataServiceApp.schema.mof | 13 - .../MSFT_SPManagedPath.psm1 | 207 -- .../MSFT_SPManagedPath.schema.mof | 10 - .../MSFT_SPOfficeOnlineServerBinding.psm1 | 174 -- ...SFT_SPOfficeOnlineServerBinding.schema.mof | 20 - .../MSFT_SPOutgoingEmailSettings.psm1 | 255 -- .../MSFT_SPOutgoingEmailSettings.schema.mof | 13 - .../MSFT_SPPasswordChangeSettings.psm1 | 159 - .../MSFT_SPPasswordChangeSettings.schema.mof | 9 - .../MSFT_SPPerformancePointServiceApp.psm1 | 256 -- ...FT_SPPerformancePointServiceApp.schema.mof | 11 - ...MSFT_SPPowerPointAutomationServiceApp.psm1 | 390 --- ...PPowerPointAutomationServiceApp.schema.mof | 14 - .../MSFT_SPProductUpdate.psm1 | 545 ---- .../MSFT_SPProductUpdate.schema.mof | 11 - .../MSFT_SPPublishServiceApplication.psm1 | 146 - ...SFT_SPPublishServiceApplication.schema.mof | 7 - .../MSFT_SPQuotaTemplate.psm1 | 351 --- .../MSFT_SPQuotaTemplate.schema.mof | 11 - .../MSFT_SPRemoteFarmTrust.psm1 | 215 -- .../MSFT_SPRemoteFarmTrust.schema.mof | 9 - .../MSFT_SPSearchAuthoritativePage.psm1 | 297 -- .../MSFT_SPSearchAuthoritativePage.schema.mof | 10 - .../MSFT_SPSearchContentSource.psm1 | 780 ----- .../MSFT_SPSearchContentSource.schema.mof | 31 - .../MSFT_SPSearchCrawlMapping.psm1 | 225 -- .../MSFT_SPSearchCrawlMapping.schema.mof | 10 - .../MSFT_SPSearchCrawlRule.psm1 | 555 ---- .../MSFT_SPSearchCrawlRule.schema.mof | 14 - .../MSFT_SPSearchCrawlerImpactRule.psm1 | 288 -- .../MSFT_SPSearchCrawlerImpactRule.schema.mof | 13 - .../MSFT_SPSearchFileType.psm1 | 343 --- .../MSFT_SPSearchFileType.schema.mof | 12 - .../MSFT_SPSearchIndexPartition.psm1 | 261 -- .../MSFT_SPSearchIndexPartition.schema.mof | 9 - .../MSFT_SPSearchResultSource.psm1 | 292 -- .../MSFT_SPSearchResultSource.schema.mof | 11 - .../MSFT_SPSearchServiceApp.psm1 | 453 --- .../MSFT_SPSearchServiceApp.schema.mof | 16 - .../MSFT_SPSearchTopology.psm1 | 484 --- .../MSFT_SPSearchTopology.schema.mof | 13 - .../MSFT_SPSecureStoreServiceApp.psm1 | 408 --- .../MSFT_SPSecureStoreServiceApp.schema.mof | 19 - .../MSFT_SPServiceAppPool.psm1 | 176 -- .../MSFT_SPServiceAppPool.schema.mof | 9 - .../MSFT_SPServiceAppProxyGroup.psm1 | 449 --- .../MSFT_SPServiceAppProxyGroup.schema.mof | 10 - .../MSFT_SPServiceAppSecurity.psm1 | 419 --- .../MSFT_SPServiceAppSecurity.schema.mof | 16 - .../MSFT_SPServiceInstance.psm1 | 295 -- .../MSFT_SPServiceInstance.schema.mof | 7 - .../MSFT_SPSessionStateService.psm1 | 179 -- .../MSFT_SPSessionStateService.schema.mof | 10 - .../MSFT_SPShellAdmins.psm1 | 956 ------ .../MSFT_SPShellAdmins.schema.mof | 20 - .../DSCResources/MSFT_SPSite/MSFT_SPSite.psm1 | 302 -- .../MSFT_SPSite/MSFT_SPSite.schema.mof | 19 - .../MSFT_SPStateServiceApp.psm1 | 179 -- .../MSFT_SPStateServiceApp.schema.mof | 10 - ...MSFT_SPSubscriptionSettingsServiceApp.psm1 | 234 -- ...PSubscriptionSettingsServiceApp.schema.mof | 11 - .../MSFT_SPTimerJobState.psm1 | 258 -- .../MSFT_SPTimerJobState.schema.mof | 10 - .../MSFT_SPTrustedIdentityTokenIssuer.psm1 | 429 --- ...FT_SPTrustedIdentityTokenIssuer.schema.mof | 26 - .../MSFT_SPTrustedRootAuthority.psm1 | 169 -- .../MSFT_SPTrustedRootAuthority.schema.mof | 9 - .../MSFT_SPUsageApplication.psm1 | 328 -- .../MSFT_SPUsageApplication.schema.mof | 15 - .../MSFT_SPUserProfileProperty.psm1 | 782 ----- .../MSFT_SPUserProfileProperty.schema.mof | 28 - .../MSFT_SPUserProfileSection.psm1 | 240 -- .../MSFT_SPUserProfileSection.schema.mof | 10 - .../MSFT_SPUserProfileServiceApp.psm1 | 453 --- .../MSFT_SPUserProfileServiceApp.schema.mof | 19 - ...FT_SPUserProfileServiceAppPermissions.psm1 | 365 --- ...serProfileServiceAppPermissions.schema.mof | 9 - .../MSFT_SPUserProfileSyncConnection.psm1 | 383 --- ...SFT_SPUserProfileSyncConnection.schema.mof | 15 - .../MSFT_SPUserProfileSyncService.psm1 | 375 --- .../MSFT_SPUserProfileSyncService.schema.mof | 9 - .../MSFT_SPVisioServiceApp.psm1 | 210 -- .../MSFT_SPVisioServiceApp.schema.mof | 9 - .../DSCResources/MSFT_SPWeb/MSFT_SPWeb.psm1 | 283 -- .../MSFT_SPWeb/MSFT_SPWeb.schema.mof | 15 - .../MSFT_SPWebAppBlockedFileTypes.psm1 | 142 - .../MSFT_SPWebAppBlockedFileTypes.schema.mof | 9 - .../MSFT_SPWebAppGeneralSettings.psm1 | 339 --- .../MSFT_SPWebAppGeneralSettings.schema.mof | 25 - .../MSFT_SPWebAppPermissions.psm1 | 732 ----- .../MSFT_SPWebAppPermissions.schema.mof | 11 - .../MSFT_SPWebAppPolicy.psm1 | 823 ----- .../MSFT_SPWebAppPolicy.schema.mof | 18 - .../MSFT_SPWebAppProxyGroup.psm1 | 129 - .../MSFT_SPWebAppProxyGroup.schema.mof | 7 - .../MSFT_SPWebAppSiteUseAndDeletion.psm1 | 236 -- ...MSFT_SPWebAppSiteUseAndDeletion.schema.mof | 10 - .../MSFT_SPWebAppThrottlingSettings.psm1 | 247 -- ...MSFT_SPWebAppThrottlingSettings.schema.mof | 25 - .../MSFT_SPWebAppWorkflowSettings.psm1 | 137 - .../MSFT_SPWebAppWorkflowSettings.schema.mof | 9 - .../MSFT_SPWebApplication.psm1 | 426 --- .../MSFT_SPWebApplication.schema.mof | 20 - .../MSFT_SPWebApplicationAppDomain.psm1 | 173 -- .../MSFT_SPWebApplicationAppDomain.schema.mof | 10 - .../MSFT_SPWebApplicationExtension.psm1 | 423 --- .../MSFT_SPWebApplicationExtension.schema.mof | 18 - .../MSFT_SPWordAutomationServiceApp.psm1 | 676 ----- ...MSFT_SPWordAutomationServiceApp.schema.mof | 23 - .../MSFT_SPWorkManagementServiceApp.psm1 | 396 --- ...MSFT_SPWorkManagementServiceApp.schema.mof | 15 - .../dsc_resources/SharePointDsc/LICENSE | 22 - .../SPContentDatabase.psm1 | 76 - .../Modules/SharePointDsc.Farm/SPFarm.psm1 | 206 -- .../SPSearchContentSource.Schedules.psm1 | 136 - .../SharePointDsc.Util.psm1 | 750 ----- .../SPWebAppPolicy.psm1 | 194 -- .../SPWebApplication.BlockedFileTypes.psm1 | 138 - .../SPWebApplication.GeneralSettings.psm1 | 142 - .../SPWebApplication.Throttling.psm1 | 172 -- .../SPWebApplication.Workflow.psm1 | 68 - .../SharePointDsc/SharePointDsc.psd1 | 163 - .../MSFT_SystemLocale/MSFT_SystemLocale.psm1 | 217 -- .../MSFT_SystemLocale.schema.mof | 6 - .../en-us/MSFT_SystemLocale.psd1 | 12 - .../dsc_resources/SystemLocaleDsc/LICENSE | 21 - .../SystemLocaleDsc/SystemLocaleDsc.psd1 | 64 - .../xActiveDirectory/Assert-HADC.ps1 | 91 - .../Assert-ParentChildDomains.ps1 | 92 - .../MSFT_xADCommon/MSFT_xADCommon.ps1 | 601 ---- .../MSFT_xADCommon/MSFT_xADCommon.psm1 | 4 - .../MSFT_xADComputer/MSFT_xADComputer.psm1 | 521 ---- .../MSFT_xADComputer.schema.mof | 20 - .../en-US/MSFT_xADComputer.psd1 | 25 - .../MSFT_xADDomain/MSFT_xADDomain.psm1 | 347 --- .../MSFT_xADDomain/MSFT_xADDomain.schema.mof | 13 - .../MSFT_xADDomainController.psm1 | 224 -- .../MSFT_xADDomainController.schema.mof | 11 - .../MSFT_xADDomainDefaultPasswordPolicy.psm1 | 226 -- ..._xADDomainDefaultPasswordPolicy.schema.mof | 17 - .../MSFT_xADDomainTrust.psm1 | 398 --- .../MSFT_xADDomainTrust.schema.mof | 13 - .../MSFT_xADGroup/MSFT_xADGroup.psm1 | 492 --- .../MSFT_xADGroup/MSFT_xADGroup.schema.mof | 19 - .../MSFT_xADOrganizationalUnit.psm1 | 221 -- .../MSFT_xADOrganizationalUnit.schema.mof | 12 - .../MSFT_xADRecycleBin.psm1 | 189 -- .../MSFT_xADRecycleBin.schema.mof | 8 - .../GeneratexADRecycleBinSchema.ps1 | 6 - .../MSFT_xADUser/MSFT_xADUser.psm1 | 1017 ------- .../MSFT_xADUser/MSFT_xADUser.schema.mof | 50 - .../MSFT_xWaitForADDomain.psm1 | 185 -- .../MSFT_xWaitForADDomain.schema.mof | 9 - .../xActiveDirectory/HADCConfiguration.psd1 | 23 - .../dsc_resources/xActiveDirectory/LICENSE | 21 - .../Misc/New-ADDomainTrust.ps1 | 17 - .../xActiveDirectory/ParentChildConfig.psd1 | 24 - .../xActiveDirectory/xActiveDirectory.psd1 | 66 - .../DSCResources/CommonResourceHelper.psm1 | 163 - .../MSFT_xAdcsCertificationAuthority.psm1 | 628 ---- ...SFT_xAdcsCertificationAuthority.schema.mof | 27 - ...T_xAdcsCertificationAuthority.strings.psd1 | 13 - .../MSFT_xAdcsOnlineResponder.psm1 | 262 -- .../MSFT_xAdcsOnlineResponder.schema.mof | 7 - .../MSFT_xAdcsOnlineResponder.strings.psd1 | 13 - .../MSFT_xAdcsWebEnrollment.psm1 | 281 -- .../MSFT_xAdcsWebEnrollment.schema.mof | 9 - .../MSFT_xAdcsWebEnrollment.strings.psd1 | 13 - .../dsc_resources/xAdcsDeployment/LICENSE | 21 - .../xAdcsDeployment/xAdcsDeployment.psd1 | 87 - .../MSFT_xAzureAffinityGroup.psm1 | 133 - .../MSFT_xAzureAffinityGroup.schema.mof | 12 - .../MSFT_xAzureQuickVM.psm1 | 123 - .../MSFT_xAzureQuickVM.schema.mof | 17 - .../MSFT_xAzureService.psm1 | 149 - .../MSFT_xAzureService.schema.mof | 12 - .../MSFT_xAzureSqlDatabase.psm1 | 380 --- .../MSFT_xAzureSqlDatabase.schema.mof | 17 - ...T_xAzureSqlDatabaseServerFirewallRule.psm1 | 210 -- ...reSqlDatabaseServerFirewallRule.schema.mof | 15 - .../MSFT_xAzureStorageAccount.psm1 | 240 -- .../MSFT_xAzureStorageAccount.schema.mof | 13 - .../MSFT_xAzureSubscription.psm1 | 98 - .../MSFT_xAzureSubscription.schema.mof | 10 - .../MSFT_xAzureVM/MSFT_xAzureVM.psm1 | 148 - .../MSFT_xAzureVM/MSFT_xAzureVM.schema.mof | 19 - .../MSFT_xAzureVMDscConfiguration.psm1 | 176 -- .../MSFT_xAzureVMDscConfiguration.schema.mof | 18 - .../MSFT_xAzureVMDscExtension.psm1 | 156 - .../MSFT_xAzureVMDscExtension.schema.mof | 22 - lib/puppet_x/dsc_resources/xAzure/LICENSE | 21 - .../GenerateXAzureSqlDatabase.ps1 | 10 - ...ateXAzureSqlDatabaseServerFirewallRule.ps1 | 9 - lib/puppet_x/dsc_resources/xAzure/xAzure.psd1 | 31 - .../MSFT_xAzurePackAdmin.psm1 | 170 -- .../MSFT_xAzurePackAdmin.schema.mof | 10 - .../MSFT_xAzurePackDatabaseSetting.psm1 | 149 - .../MSFT_xAzurePackDatabaseSetting.schema.mof | 11 - .../MSFT_xAzurePackFQDN.psm1 | 194 -- .../MSFT_xAzurePackFQDN.schema.mof | 11 - .../MSFT_xAzurePackIdentityProvider.psm1 | 196 -- ...MSFT_xAzurePackIdentityProvider.schema.mof | 11 - .../MSFT_xAzurePackRelyingParty.psm1 | 193 -- .../MSFT_xAzurePackRelyingParty.schema.mof | 11 - .../MSFT_xAzurePackResourceProvider.psm1 | 764 ----- ...MSFT_xAzurePackResourceProvider.schema.mof | 40 - .../MSFT_xAzurePackSetup.psm1 | 670 ----- .../MSFT_xAzurePackSetup.schema.mof | 14 - .../MSFT_xAzurePackUpdate.psm1 | 372 --- .../MSFT_xAzurePackUpdate.schema.mof | 8 - lib/puppet_x/dsc_resources/xAzurePack/LICENSE | 21 - .../xAzurePack/en-US/xPDT.strings.psd1 | 10 - .../dsc_resources/xAzurePack/xAzurePack.psd1 | 55 - .../dsc_resources/xAzurePack/xPDT.psm1 | 708 ----- .../MSFT_xBLAutoBitlocker.psm1 | 398 --- .../MSFT_xBLAutoBitlocker.schema.mof | 32 - .../MSFT_xBLBitlocker/MSFT_xBLBitlocker.psm1 | 243 -- .../MSFT_xBLBitlocker.schema.mof | 30 - .../DSCResources/MSFT_xBLTpm/MSFT_xBLTpm.psm1 | 118 - .../MSFT_xBLTpm/MSFT_xBLTpm.schema.mof | 11 - lib/puppet_x/dsc_resources/xBitlocker/LICENSE | 21 - .../xBitlocker/Misc/xBitlockerCommon.psm1 | 516 ---- .../dsc_resources/xBitlocker/xBitlocker.psd1 | 118 - .../MSFT_xCertReq/MSFT_xCertReq.psm1 | 941 ------ .../MSFT_xCertReq/MSFT_xCertReq.schema.mof | 21 - .../en-us/MSFT_xCertReq.strings.psd1 | 24 - .../MSFT_xCertificateExport.psm1 | 487 --- .../MSFT_xCertificateExport.schema.mof | 20 - .../MSFT_xCertificateExport.strings.psd1 | 12 - .../MSFT_xCertificateImport.psm1 | 272 -- .../MSFT_xCertificateImport.schema.mof | 9 - .../MSFT_xCertificateImport.strings.psd1 | 11 - .../MSFT_xPfxImport/MSFT_xPfxImport.psm1 | 319 -- .../MSFT_xPfxImport.schema.mof | 11 - .../en-us/MSFT_xPfxImport.strings.psd1 | 11 - .../MSFT_xWaitForCertificateServices.psm1 | 242 -- ...SFT_xWaitForCertificateServices.schema.mof | 9 - ...T_xWaitForCertificateServices.strings.psd1 | 8 - .../dsc_resources/xCertificate/LICENSE | 22 - .../CertificateDSc.Common.psm1 | 587 ---- .../en-us/CertificateDsc.Common.strings.psd1 | 17 - .../CertificateDsc.PDT.psm1 | 744 ----- .../en-us/CertificateDsc.PDT.strings.psd1 | 10 - .../CertificateDsc.ResourceHelper.psm1 | 174 -- .../xCertificate/xCertificate.psd1 | 84 - .../DSCResources/CommonResourceHelper.psm1 | 425 --- .../MSFT_xComputer/MSFT_xComputer.psm1 | 386 --- .../MSFT_xComputer/MSFT_xComputer.schema.mof | 11 - .../MSFT_xOfflineDomainJoin.psm1 | 224 -- .../MSFT_xOfflineDomainJoin.schema.mof | 6 - .../MSFT_xOfflineDomainJoin.strings.psd1 | 11 - .../MSFT_xPowerPlan/MSFT_xPowerPlan.psm1 | 176 -- .../MSFT_xPowerPlan.schema.mof | 6 - .../en-US/MSFT_xPowerPlan.schema.mfl | 6 - .../en-US/MSFT_xPowerPlan.strings.psd1 | 11 - .../MSFT_xScheduledTask.psm1 | 1361 --------- .../MSFT_xScheduledTask.schema.mof | 43 - .../MSFT_xVirtualMemory.psm1 | 428 --- .../MSFT_xVirtualMemory.schema.mof | 10 - .../dsc_resources/xComputerManagement/LICENSE | 21 - .../xComputerManagement.psd1 | 95 - .../MSFT_xCredSSP/MSFT_xCredSSP.psm1 | 324 -- .../MSFT_xCredSSP/MSFT_xCredSSP.schema.mof | 9 - lib/puppet_x/dsc_resources/xCredSSP/LICENSE | 21 - .../dsc_resources/xCredSSP/xCredSSP.psd1 | 60 - .../MSFT_xDFSNamespaceFolder.psm1 | 696 ----- .../MSFT_xDFSNamespaceFolder.schema.mof | 14 - .../MSFT_xDFSNamespaceFolder.strings.psd1 | 19 - .../MSFT_xDFSNamespaceRoot.psm1 | 840 ------ .../MSFT_xDFSNamespaceRoot.schema.mof | 18 - .../en-us/MSFT_xDFSNamespaceRoot.strings.psd1 | 20 - ...MSFT_xDFSNamespaceServerConfiguration.psm1 | 267 -- ...DFSNamespaceServerConfiguration.schema.mof | 8 - ...SNamespaceServerConfiguration.strings.psd1 | 9 - .../MSFT_xDFSReplicationGroup.psm1 | 866 ------ .../MSFT_xDFSReplicationGroup.schema.mof | 12 - .../MSFT_xDFSReplicationGroup.strings.psd1 | 29 - .../MSFT_xDFSReplicationGroupConnection.psm1 | 513 ---- ..._xDFSReplicationGroupConnection.schema.mof | 12 - ...DFSReplicationGroupConnection.strings.psd1 | 16 - .../MSFT_xDFSReplicationGroupFolder.psm1 | 339 --- ...MSFT_xDFSReplicationGroupFolder.schema.mof | 11 - ...FT_xDFSReplicationGroupFolder.strings.psd1 | 12 - .../MSFT_xDFSReplicationGroupMembership.psm1 | 372 --- ..._xDFSReplicationGroupMembership.schema.mof | 13 - ...DFSReplicationGroupMembership.strings.psd1 | 12 - lib/puppet_x/dsc_resources/xDFS/LICENSE | 21 - .../DFSDsc.ResourceHelper.psm1 | 181 -- lib/puppet_x/dsc_resources/xDFS/xDFS.psd1 | 75 - .../MSFT_xDBPackage/MSFT_xDBPackage.psm1 | 242 -- .../MSFT_xDBPackage.schema.mof | 13 - .../MSFT_xDatabase/MSFT_xDatabase.psm1 | 224 -- .../MSFT_xDatabase/MSFT_xDatabase.schema.mof | 16 - .../MSFT_xDatabaseLogin.psm1 | 239 -- .../MSFT_xDatabaseLogin.schema.mof | 15 - .../MSFT_xDatabaseLoginWithDefaultDB.psm1 | 210 -- .../MSFT_xDatabaseServer.psm1 | 155 - .../MSFT_xDatabaseServer.schema.mof | 10 - .../xDatabase_Common/xDatabase_Common.psm1 | 282 -- lib/puppet_x/dsc_resources/xDatabase/LICENSE | 21 - .../dsc_resources/xDatabase/xDatabase.psd1 | 68 - .../MSFT_xMpPreference.psm1 | 702 ----- .../MSFT_xMpPreference.schema.mof | 60 - lib/puppet_x/dsc_resources/xDefender/LICENSE | Bin 2210 -> 0 bytes .../dsc_resources/xDefender/xDefender.psd1 | 120 - .../xDhcpServer/DSCResources/Helper.psm1 | 141 - .../MSFT_xDhcpServerAuthorization.psm1 | 171 -- .../MSFT_xDhcpServerAuthorization.schema.mof | 7 - .../MSFT_xDhcpServerClass.psm1 | 187 -- .../MSFT_xDhcpServerClass.schema.mof | 10 - .../MSFT_xDhcpServerOption.psm1 | 428 --- .../MSFT_xDhcpServerOption.schema.mof | 11 - .../MSFT_xDhcpServerOptionDefinition.psm1 | 171 -- .../MSFT_xDhcpServerReservation.psm1 | 354 --- .../MSFT_xDhcpServerReservation.schema.mof | 11 - .../MSFT_xDhcpServerScope.psm1 | 461 --- .../MSFT_xDhcpServerScope.schema.mof | 14 - .../dsc_resources/xDhcpServer/LICENSE | 21 - .../Misc/New-DhcpServerOptionResource.ps1 | 17 - .../New-DhcpServerReservationResource.ps1 | 17 - .../Misc/New-DhcpServerScopeResource.ps1 | 24 - .../xDhcpServer/xDhcpServer.psd1 | 63 - .../MSFT_xDismFeature/MSFT_xDismFeature.psm1 | 135 - .../MSFT_xDismFeature.schema.mof | 7 - .../dsc_resources/xDismFeature/LICENSE | 21 - .../xDismFeature/xDismFeature.psd1 | 60 - .../xDnsServer/DSCResources/Helper.psm1 | 45 - .../MSFT_xDnsARecord/MSFT_xDnsARecord.psm1 | 108 - .../MSFT_xDnsARecord.schema.mof | 9 - .../MSFT_xDnsRecord/MSFT_xDnsRecord.psm1 | 190 -- .../MSFT_xDnsRecord.schema.mof | 10 - .../MSFT_xDnsServerADZone/Helper.psm1 | 45 - .../MSFT_xDnsServerADZone.psm1 | 221 -- .../MSFT_xDnsServerADZone.schema.mof | 11 - .../MSFT_xDnsServerForwarder.psm1 | 69 - .../MSFT_xDnsServerForwarder.schema.mof | 6 - .../MSFT_xDnsServerPrimaryZone.psm1 | 164 - .../MSFT_xDnsServerPrimaryZone.schema.mof | 10 - .../MSFT_xDnsServerSecondaryZone.psm1 | 271 -- .../MSFT_xDnsServerSecondaryZone.schema.mof | 9 - .../MSFT_xDnsServerZoneTransfer.psm1 | 232 -- .../MSFT_xDnsServerZoneTransfer.schema.mof | 8 - lib/puppet_x/dsc_resources/xDnsServer/LICENSE | 21 - .../Misc/New-DnsServerSecondaryZone.ps1 | 10 - .../Misc/New-DnsServerZoneTransfer.ps1 | 12 - .../dsc_resources/xDnsServer/xDnsServer.psd1 | 62 - .../MSFT_xExchActiveSyncVirtualDirectory.psm1 | 663 ----- ...xExchActiveSyncVirtualDirectory.schema.mof | 25 - .../MSFT_xExchAntiMalwareScanning.psm1 | 145 - .../MSFT_xExchAntiMalwareScanning.schema.mof | 11 - .../MSFT_xExchAutoMountPoint.psm1 | 918 ------ .../MSFT_xExchAutoMountPoint.schema.mof | 20 - ...SFT_xExchAutodiscoverVirtualDirectory.psm1 | 246 -- ...xchAutodiscoverVirtualDirectory.schema.mof | 19 - .../MSFT_xExchClientAccessServer.psm1 | 291 -- .../MSFT_xExchClientAccessServer.schema.mof | 19 - .../MSFT_xExchDatabaseAvailabilityGroup.psm1 | 675 ----- ..._xExchDatabaseAvailabilityGroup.schema.mof | 37 - ..._xExchDatabaseAvailabilityGroupMember.psm1 | 178 -- ...DatabaseAvailabilityGroupMember.schema.mof | 13 - ...xExchDatabaseAvailabilityGroupNetwork.psm1 | 312 -- ...atabaseAvailabilityGroupNetwork.schema.mof | 19 - .../MSFT_xExchEcpVirtualDirectory.psm1 | 321 -- .../MSFT_xExchEcpVirtualDirectory.schema.mof | 23 - .../MSFT_xExchEventLogLevel.psm1 | 133 - .../MSFT_xExchEventLogLevel.schema.mof | 9 - .../MSFT_xExchExchangeCertificate.psm1 | 349 --- .../MSFT_xExchExchangeCertificate.schema.mof | 16 - .../MSFT_xExchExchangeServer.psm1 | 309 -- .../MSFT_xExchExchangeServer.schema.mof | 20 - .../MSFT_xExchImapSettings.psm1 | 228 -- .../MSFT_xExchImapSettings.schema.mof | 15 - .../MSFT_xExchInstall/MSFT_xExchInstall.psm1 | 282 -- .../MSFT_xExchInstall.schema.mof | 8 - .../MSFT_xExchJetstress.psm1 | 399 --- .../MSFT_xExchJetstress.schema.mof | 13 - .../MSFT_xExchJetstressCleanup.psm1 | 440 --- .../MSFT_xExchJetstressCleanup.schema.mof | 15 - .../MSFT_xExchMailboxDatabase.psm1 | 992 ------ .../MSFT_xExchMailboxDatabase.schema.mof | 42 - .../MSFT_xExchMailboxDatabaseCopy.psm1 | 383 --- .../MSFT_xExchMailboxDatabaseCopy.schema.mof | 21 - .../MSFT_xExchMailboxServer.psm1 | 1072 ------- .../MSFT_xExchMailboxServer.schema.mof | 56 - .../MSFT_xExchMailboxTransportService.psm1 | 450 --- ...FT_xExchMailboxTransportService.schema.mof | 29 - .../MSFT_xExchMaintenanceMode.psm1 | 1286 -------- .../MSFT_xExchMaintenanceMode.schema.mof | 13 - .../TransportMaintenance.psm1 | 2648 ----------------- .../MSFT_xExchMapiVirtualDirectory.psm1 | 231 -- .../MSFT_xExchMapiVirtualDirectory.schema.mof | 18 - .../MSFT_xExchOabVirtualDirectory.psm1 | 405 --- .../MSFT_xExchOabVirtualDirectory.schema.mof | 25 - .../MSFT_xExchOutlookAnywhere.psm1 | 387 --- .../MSFT_xExchOutlookAnywhere.schema.mof | 26 - .../MSFT_xExchOwaVirtualDirectory.psm1 | 488 --- .../MSFT_xExchOwaVirtualDirectory.schema.mof | 32 - .../MSFT_xExchPopSettings.psm1 | 228 -- .../MSFT_xExchPopSettings.schema.mof | 15 - .../MSFT_xExchPowerShellVirtualDirectory.psm1 | 282 -- ...xExchPowerShellVirtualDirectory.schema.mof | 21 - .../MSFT_xExchReceiveConnector.psm1 | 1245 -------- .../MSFT_xExchReceiveConnector.schema.mof | 63 - .../MSFT_xExchTransportService.psm1 | 1562 ---------- .../MSFT_xExchTransportService.schema.mof | 93 - .../MSFT_xExchUMCallRouterSettings.psm1 | 143 - .../MSFT_xExchUMCallRouterSettings.schema.mof | 12 - .../MSFT_xExchUMService.psm1 | 154 - .../MSFT_xExchUMService.schema.mof | 13 - .../MSFT_xExchWaitForADPrep.psm1 | 416 --- .../MSFT_xExchWaitForADPrep.schema.mof | 20 - .../MSFT_xExchWaitForDAG.psm1 | 176 -- .../MSFT_xExchWaitForDAG.schema.mof | 13 - .../MSFT_xExchWaitForMailboxDatabase.psm1 | 208 -- ...SFT_xExchWaitForMailboxDatabase.schema.mof | 14 - ...MSFT_xExchWebServicesVirtualDirectory.psm1 | 343 --- ...ExchWebServicesVirtualDirectory.schema.mof | 24 - lib/puppet_x/dsc_resources/xExchange/LICENSE | 21 - .../xExchange/Misc/xExchangeCommon.psm1 | 991 ------ .../xExchange/Misc/xExchangeDiskPart.psm1 | 217 -- .../dsc_resources/xExchange/xExchange.psd1 | 129 - .../DSCResources/CommonResourceHelper.psm1 | 265 -- .../MSFT_xCluster/MSFT_xCluster.psm1 | 413 --- .../MSFT_xCluster/MSFT_xCluster.schema.mof | 11 - .../en-US/MSFT_xCluster.strings.psd1 | 22 - .../MSFT_xClusterDisk/MSFT_xClusterDisk.psm1 | 185 -- .../MSFT_xClusterDisk.schema.mof | 7 - .../en-US/MSFT_xClusterDisk.strings.psd1 | 9 - .../MSFT_xClusterNetwork.psm1 | 236 -- .../MSFT_xClusterNetwork.schema.mof | 9 - .../en-US/MSFT_xClusterNetwork.strings.psd1 | 9 - .../MSFT_xClusterPreferredOwner.psm1 | 314 -- .../MSFT_xClusterPreferredOwner.schema.mof | 9 - .../MSFT_xClusterPreferredOwner.strings.psd1 | 15 - .../MSFT_xClusterQuorum.psm1 | 210 -- .../MSFT_xClusterQuorum.schema.mof | 7 - .../en-US/MSFT_xClusterQuorum.strings.psd1 | 7 - .../MSFT_xWaitForCluster.psm1 | 183 -- .../MSFT_xWaitForCluster.schema.mof | 11 - .../en-US/MSFT_xWaitForCluster.strings.psd1 | 13 - .../dsc_resources/xFailOverCluster/LICENSE | 21 - .../xFailOverCluster/xFailOverCluster.psd1 | 114 - .../HyperVCommon/HyperVCommon.psm1 | 407 --- .../en-us/HyperVCommon.strings.psd1 | 15 - .../DSCResources/MSFT_xVHD/MSFT_xVHD.psm1 | 381 --- .../MSFT_xVHD/MSFT_xVHD.schema.mof | 15 - .../MSFT_xVMDvdDrive/MSFT_xVMDvdDrive.psm1 | 437 --- .../MSFT_xVMDvdDrive.schema.mof | 9 - .../en-us/MSFT_xVMDvdDrive.strings.psd1 | 20 - .../MSFT_xVMHost/MSFT_xVMHost.psm1 | 409 --- .../MSFT_xVMHost/MSFT_xVMHost.schema.mof | 20 - .../MSFT_xVMHost/en-US/MSFT_xVMHost.psd1 | 8 - .../MSFT_xVMHyperV/MSFT_xVMHyperV.psm1 | 785 ----- .../MSFT_xVMHyperV/MSFT_xVMHyperV.schema.mof | 29 - .../MSFT_xVMNetworkAdapter.psm1 | 373 --- .../MSFT_xVMNetworkAdapter.schema.mof | 12 - .../en-US/MSFT_xVMNetworkAdapter.psd1 | 23 - .../MSFT_xVMProcessor/MSFT_xVMProcessor.psm1 | 443 --- .../MSFT_xVMProcessor.schema.mof | 17 - .../en-US/MSFT_xVMProcessor.psd1 | 12 - .../MSFT_xVMSwitch/MSFT_xVMSwitch.psm1 | 566 ---- .../MSFT_xVMSwitch/MSFT_xVMSwitch.schema.mof | 13 - .../en-us/MSFT_xVMSwitch.strings.psd1 | 35 - .../MSFT_xVhdFileDirectory.psm1 | 482 --- .../MSFT_xVhdFileDirectory.schema.mof | 24 - lib/puppet_x/dsc_resources/xHyper-V/LICENSE | 21 - .../xHyper-V/Misc/VHDResourceGenerator.ps1 | 13 - .../xHyper-V/Misc/VMResourceGenerator.ps1 | 26 - .../xHyper-V/Misc/VMSwitchGenerator.ps1 | 8 - .../dsc_resources/xHyper-V/xHyper-V.psd1 | 101 - .../xInternetExplorerHomePage.psm1 | 241 -- .../xInternetExplorerHomePage.schema.mof | 11 - .../xInternetExplorerHomePage/LICENSE | 21 - .../xInternetExplorerHomePage.psd1 | 37 - .../xJea/DSCResources/Library/Helper.psm1 | 22 - .../xJea/DSCResources/Library/JeaAccount.psm1 | 330 -- .../xJea/DSCResources/Library/JeaDir.psm1 | 39 - .../DSCResources/Library/JeaInitFile.psm1 | 39 - .../xJea/DSCResources/Library/JeaProxy.psm1 | 429 --- .../MSFT_xJeaEndpoint/MSFT_xJeaEndpoint.psm1 | 272 -- .../MSFT_xJeaEndpoint.schema.mof | 13 - .../MSFT_xJeaToolkit/MSFT_xJeaToolkit.psm1 | 161 - .../MSFT_xJeaToolkit.schema.mof | 12 - lib/puppet_x/dsc_resources/xJea/LICENSE | 21 - .../xJea/Util/Initialize-ToolKit.ps1 | 174 -- .../dsc_resources/xJea/Util/SafeProxy.psm1 | 658 ---- lib/puppet_x/dsc_resources/xJea/xJea.psd1 | 59 - lib/puppet_x/dsc_resources/xJea/xjea.psm1 | 29 - .../MSFT_xMySqlDatabase.psm1 | 126 - .../MSFT_xMySqlDatabase.schema.mof | 10 - .../xMySqlDatabaseDesigner.ps1 | 26 - .../MSFT_xMySqlGrant/MSFT_xMySqlGrant.psm1 | 182 -- .../MSFT_xMySqlGrant.schema.mof | 13 - .../en-US/MSFT_xMySqlGrant.strings.psd1 | 15 - .../MSFT_xMySqlGrant/xMySqlGrantDesigner.ps1 | 27 - .../MSFT_xMySqlServer/MSFT_xMySqlServer.psm1 | 112 - .../MSFT_xMySqlServer.schema.mof | 11 - .../MSFT_xMySqlUser/MSFT_xMySqlUser.psm1 | 154 - .../MSFT_xMySqlUser.schema.mof | 12 - .../en-US/MSFT_xMySqlUser.strings.psd1 | 14 - .../MSFT_xMySqlUser/xMySqlUserDesigner.ps1 | 26 - .../xMySqlProvision.Schema.psm1 | 89 - .../xMySqlProvision/xMySqlProvision.psd1 | 97 - lib/puppet_x/dsc_resources/xMySql/LICENSE | 21 - .../xMySql/MSFT_xMySqlUtilities.psm1 | 315 -- lib/puppet_x/dsc_resources/xMySql/xMySql.psd1 | 63 - .../MSFT_xDNSServerAddress.psm1 | 354 --- .../MSFT_xDNSServerAddress.schema.mof | 8 - .../en-US/MSFT_xDNSServerAddress.strings.psd1 | 16 - .../MSFT_xDefaultGatewayAddress.psm1 | 346 --- .../MSFT_xDefaultGatewayAddress.schema.mof | 7 - .../MSFT_xDefaultGatewayAddress.strings.psd1 | 18 - .../MSFT_xDhcpClient/MSFT_xDhcpClient.psm1 | 233 -- .../MSFT_xDhcpClient.schema.mof | 7 - .../en-US/MSFT_xDhcpClient.strings.psd1 | 10 - .../MSFT_xDnsClientGlobalSetting.data.psd1 | 16 - .../MSFT_xDnsClientGlobalSetting.psm1 | 232 -- .../MSFT_xDnsClientGlobalSetting.schema.mof | 8 - .../MSFT_xDnsClientGlobalSetting.strings.psd1 | 10 - .../MSFT_xDnsConnectionSuffix.psm1 | 273 -- .../MSFT_xDnsConnectionSuffix.schema.mof | 9 - .../MSFT_xDnsConnectionSuffix.strings.psd1 | 10 - .../MSFT_xFirewall/MSFT_xFirewall.Schema.mof | 37 - .../MSFT_xFirewall/MSFT_xFirewall.data.psd1 | 36 - .../MSFT_xFirewall/MSFT_xFirewall.psm1 | 1352 --------- .../en-US/MSFT_xFirewall.strings.psd1 | 24 - .../MSFT_xFirewallProfile.data.psd1 | 72 - .../MSFT_xFirewallProfile.psm1 | 475 --- .../MSFT_xFirewallProfile.schema.mof | 22 - .../en-US/MSFT_xFirewallProfile.strings.psd1 | 10 - .../MSFT_xHostsFile/MSFT_xHostsFile.psm1 | 266 -- .../MSFT_xHostsFile.schema.mof | 7 - .../en-US/MSFT_xHostsFile.strings.psd1 | 11 - .../MSFT_xIPAddress/MSFT_xIPAddress.psm1 | 476 --- .../MSFT_xIPAddress.schema.mof | 7 - .../en-US/MSFT_xIPAddress.strings.psd1 | 20 - .../MSFT_xNetAdapterBinding.psm1 | 281 -- .../MSFT_xNetAdapterBinding.schema.mof | 8 - .../MSFT_xNetAdapterBinding.strings.psd1 | 13 - .../MSFT_xNetAdapterLso.psm1 | 237 -- .../MSFT_xNetAdapterLso.schema.mof | 7 - .../en-US/MSFT_xNetAdapterLso.strings.psd1 | 9 - .../MSFT_xNetAdapterName.psm1 | 399 --- .../MSFT_xNetAdapterName.schema.mof | 15 - .../en-us/MSFT_xNetAdapterName.strings.psd1 | 11 - .../MSFT_xNetAdapterRDMA.psm1 | 156 - .../MSFT_xNetAdapterRDMA.schema.mof | 6 - .../en-US/MSFT_xNetAdapterRDMA.strings.psd1 | 10 - .../MSFT_xNetBIOS/MSFT_xNetBIOS.psm1 | 196 -- .../MSFT_xNetBIOS/MSFT_xNetBIOS.schema.mof | 7 - .../en-US/MSFT_xNetBIOS.strings.psd1 | 13 - .../MSFT_xNetConnectionProfile.psm1 | 232 -- .../MSFT_xNetConnectionProfile.schema.mof | 8 - .../MSFT_xNetConnectionProfile.strings.psd1 | 11 - .../MSFT_xNetworkTeam/MSFT_xNetworkTeam.psm1 | 306 -- .../MSFT_xNetworkTeam.schema.mof | 9 - .../en-US/MSFT_xNetworkTeam.strings.psd1 | 24 - .../MSFT_xNetworkTeamInterface.psm1 | 245 -- .../MSFT_xNetworkTeamInterface.schema.mof | 9 - .../MSFT_xNetworkTeamInterface.strings.psd1 | 19 - .../DSCResources/MSFT_xRoute/MSFT_xRoute.psm1 | 675 ----- .../MSFT_xRoute/MSFT_xRoute.schema.mof | 12 - .../en-US/MSFT_xRoute.strings.psd1 | 22 - .../dsc_resources/xNetworking/LICENSE | 21 - .../NetworkingDsc.Common.psm1 | 428 --- .../en-us/NetworkingDsc.Common.strings.psd1 | 12 - .../NetworkingDsc.ResourceHelper.psm1 | 173 -- .../xNetworking/PSScriptAnalyzerSettings.psd1 | 10 - .../xNetworking/xNetworking.psd1 | 112 - .../PublishModulesAndMofsToPullServer.psm1 | 302 -- .../DSCResources/CommonResourceHelper.psm1 | 178 -- .../MSFT_xArchive/MSFT_xArchive.psm1 | 1604 ---------- .../MSFT_xArchive/MSFT_xArchive.schema.mof | 11 - .../en-US/MSFT_xArchive.schema.mfl | Bin 5900 -> 0 bytes .../en-US/MSFT_xArchive.strings.psd1 | 57 - .../MSFT_xDSCWebService.Schema.mof | 19 - .../MSFT_xDSCWebService.psm1 | 691 ----- .../MSFT_xDSCWebService/PSWSIISEndpoint.psm1 | 709 ----- .../SecureTLSProtocols.psm1 | 48 - .../UseSecurityBestPractices.psm1 | 38 - .../MSFT_xEnvironmentResource.psm1 | 1145 ------- .../MSFT_xEnvironmentResource.schema.mof | 9 - .../MSFT_xEnvironmentResource.schema.mfl | Bin 1522 -> 0 bytes .../MSFT_xEnvironmentResource.strings.psd1 | 21 - .../MSFT_xGroupResource.psm1 | 2572 ---------------- .../MSFT_xGroupResource.schema.mof | 12 - .../en-US/MSFT_xGroupResource.schema.mfl | Bin 1694 -> 0 bytes .../en-US/MSFT_xGroupResource.strings.psd1 | 36 - .../MSFT_xMsiPackage/MSFT_xMsiPackage.psm1 | 1636 ---------- .../MSFT_xMsiPackage.schema.mof | 23 - .../en-US/MSFT_xMsiPackage.schema.mfl | Bin 4568 -> 0 bytes .../en-US/MSFT_xMsiPackage.strings.psd1 | 44 - .../MSFT_xPSSessionConfiguration.psm1 | 796 ----- .../MSFT_xPSSessionConfiguration.schema.mof | 11 - .../MSFT_xPackageResource.psm1 | 1970 ------------ .../MSFT_xPackageResource.schema.mof | 29 - .../en-US/MSFT_xPackageResource.schema.mfl | 32 - .../en-US/MSFT_xPackageResource.strings.psd1 | 68 - .../MSFT_xRegistryResource.psm1 | 1451 --------- .../MSFT_xRegistryResource.schema.mof | 11 - .../en-US/MSFT_xRegistryResource.schema.mfl | 11 - .../en-US/MSFT_xRegistryResource.strings.psd1 | 38 - .../MSFT_xRemoteFile/MSFT_xRemoteFile.psm1 | 586 ---- .../MSFT_xRemoteFile.schema.mof | 18 - .../en-us/MSFT_xRemoteFile.psd1 | 22 - .../MSFT_xScriptResource.psm1 | 283 -- .../MSFT_xScriptResource.schema.mof | 10 - .../en-US/MSFT_xScriptResource.schema.mfl | Bin 1936 -> 0 bytes .../en-US/MSFT_xScriptResource.strings.psd1 | 16 - .../MSFT_xServiceResource.psm1 | 1763 ----------- .../MSFT_xServiceResource.schema.mof | 18 - .../en-US/MSFT_xServiceResource.schema.mfl | Bin 2812 -> 0 bytes .../en-US/MSFT_xServiceResource.strings.psd1 | 38 - .../MSFT_xUserResource.psm1 | 1341 --------- .../MSFT_xUserResource.schema.mof | 13 - .../en-US/MSFT_xUserResource.schema.mfl | Bin 2418 -> 0 bytes .../en-US/MSFT_xUserResource.strings.psd1 | 23 - .../MSFT_xWindowsFeature.psm1 | 554 ---- .../MSFT_xWindowsFeature.schema.mof | 11 - .../en-US/MSFT_xWindowsFeature.schema.mfl | Bin 2160 -> 0 bytes .../en-US/MSFT_xWindowsFeature.strings.psd1 | 23 - .../MSFT_xWindowsOptionalFeature.psm1 | 385 --- .../MSFT_xWindowsOptionalFeature.schema.mof | 14 - .../MSFT_xWindowsOptionalFeature.schema.mfl | Bin 3260 -> 0 bytes .../MSFT_xWindowsOptionalFeature.strings.psd1 | 20 - .../MSFT_xWindowsPackageCab.psm1 | 225 -- .../MSFT_xWindowsPackageCab.schema.mof | 9 - .../en-US/MSFT_xWindowsPackageCab.schema.mfl | 8 - .../MSFT_xWindowsPackageCab.strings.psd1 | 13 - .../MSFT_xWindowsProcess.psm1 | 1491 ---------- .../MSFT_xWindowsProcess.schema.mof | 18 - .../en-US/MSFT_xWindowsProcess.schema.mfl | Bin 3574 -> 0 bytes .../en-US/MSFT_xWindowsProcess.strings.psd1 | 36 - .../DSCResources/ResourceSetHelper.psm1 | 248 -- .../DSCResources/xFileUpload/xFileUpload.psd1 | 89 - .../xFileUpload/xFileUpload.schema.psm1 | 544 ---- .../DSCResources/xGroupSet/xGroupSet.psd1 | 27 - .../xGroupSet/xGroupSet.schema.psm1 | 68 - .../DSCResources/xProcessSet/xProcessSet.psd1 | 27 - .../xProcessSet/xProcessSet.schema.psm1 | 96 - .../DSCResources/xServiceSet/xServiceSet.psd1 | 27 - .../xServiceSet/xServiceSet.schema.psm1 | 89 - .../xWindowsFeatureSet.psd1 | 27 - .../xWindowsFeatureSet.schema.psm1 | 78 - .../xWindowsOptionalFeatureSet.psd1 | 27 - .../xWindowsOptionalFeatureSet.schema.psm1 | 77 - .../xPSDesiredStateConfiguration/LICENSE | 21 - .../GenerateXRemoteFileSchema.ps1 | 10 - .../New-PSSessionConfigurationResource.ps1 | 18 - .../xPSDesiredStateConfiguration.psd1 | 79 - .../MSFT_xPendingReboot.psm1 | 135 - .../MSFT_xPendingReboot.schema.mof | 20 - .../dsc_resources/xPendingReboot/LICENSE | 21 - .../xPendingReboot/xPendingReboot.psd1 | 57 - .../xPhpProvision/xPhpProvision.Schema.psm1 | 140 - .../xPhpProvision/xPhpProvision.psd1 | 94 - lib/puppet_x/dsc_resources/xPhp/LICENSE | 21 - lib/puppet_x/dsc_resources/xPhp/xPhp.psd1 | 97 - .../MSFT_xPowerShellExecutionPolicy.psm1 | 78 - ...MSFT_xPowerShellExecutionPolicy.schema.mof | 9 - .../xPowerShellExecutionPolicy/LICENSE | 21 - .../xPowerShellExecutionPolicy.psd1 | 61 - .../xRemoteDesktopAdmin.psm1 | 157 - .../xRemoteDesktopAdmin.schema.mof | 10 - .../dsc_resources/xRemoteDesktopAdmin/LICENSE | 21 - .../xRemoteDesktopAdmin.psd1 | 32 - .../MSFT_xRDRemoteApp/MSFT_xRDRemoteApp.psm1 | 133 - .../MSFT_xRDRemoteApp.schema.mof | 19 - .../MSFT_xRDSessionCollection.psm1 | 85 - .../MSFT_xRDSessionCollection.schema.mof | 12 - ...SFT_xRDSessionCollectionConfiguration.psm1 | 152 - ...DSessionCollectionConfiguration.schema.mof | 33 - .../MSFT_xRDSessionDeployment.psm1 | 76 - .../MSFT_xRDSessionDeployment.schema.mof | 11 - .../xRemoteDesktopSessionHost/LICENSE | 21 - .../xRemoteDesktopSessionHost.psd1 | 61 - .../xRemoteDesktopSessionHostCommon.psm1 | 12 - .../MSFT_xRobocopy/MSFT_xRobocopy.psm1 | 301 -- .../MSFT_xRobocopy/MSFT_xRobocopy.schema.mof | 18 - lib/puppet_x/dsc_resources/xRobocopy/LICENSE | 22 - .../xDscResourceDesigner_CreateScript.ps1 | 162 - .../dsc_resources/xRobocopy/xRobocopy.psd1 | 126 - .../MSFT_xSCDPMConsoleSetup.psm1 | 184 -- .../MSFT_xSCDPMConsoleSetup.schema.mof | 8 - .../MSFT_xSCDPMDatabaseServerSetup.psm1 | 178 -- .../MSFT_xSCDPMDatabaseServerSetup.schema.mof | 8 - .../MSFT_xSCDPMServerSetup.psm1 | 373 --- .../MSFT_xSCDPMServerSetup.schema.mof | 18 - lib/puppet_x/dsc_resources/xSCDPM/LICENSE | 21 - .../xSCDPM/en-US/xPDT.strings.psd1 | 10 - lib/puppet_x/dsc_resources/xSCDPM/xPDT.psm1 | 708 ----- lib/puppet_x/dsc_resources/xSCDPM/xSCDPM.psd1 | 31 - .../MSFT_xSCOMAdmin/MSFT_xSCOMAdmin.psm1 | 147 - .../MSFT_xSCOMAdmin.schema.mof | 8 - .../MSFT_xSCOMConsoleSetup.psm1 | 256 -- .../MSFT_xSCOMConsoleSetup.schema.mof | 13 - .../MSFT_xSCOMConsoleUpdate.psm1 | 183 -- .../MSFT_xSCOMConsoleUpdate.schema.mof | 9 - .../MSFT_xSCOMManagementPack.psm1 | 237 -- .../MSFT_xSCOMManagementPack.schema.mof | 11 - .../MSFT_xSCOMManagementServerSetup.psm1 | 543 ---- ...MSFT_xSCOMManagementServerSetup.schema.mof | 31 - .../MSFT_xSCOMManagementServerUpdate.psm1 | 183 -- ...SFT_xSCOMManagementServerUpdate.schema.mof | 9 - .../MSFT_xSCOMReportingServerSetup.psm1 | 333 --- .../MSFT_xSCOMReportingServerSetup.schema.mof | 17 - .../MSFT_xSCOMWebConsoleServerSetup.psm1 | 315 -- ...MSFT_xSCOMWebConsoleServerSetup.schema.mof | 17 - .../MSFT_xSCOMWebConsoleServerUpdate.psm1 | 183 -- ...SFT_xSCOMWebConsoleServerUpdate.schema.mof | 9 - lib/puppet_x/dsc_resources/xSCOM/LICENSE | 21 - .../xSCOM/en-US/xPDT.strings.psd1 | 10 - lib/puppet_x/dsc_resources/xSCOM/xPDT.psm1 | 708 ----- lib/puppet_x/dsc_resources/xSCOM/xSCOM.psd1 | 31 - .../MSFT_xRunbookDirectory.psm1 | 250 -- .../MSFT_xRunbookDirectory.schema.mof | 10 - .../MSFT_xSCSMAPowerShellSetup.psm1 | 199 -- .../MSFT_xSCSMAPowerShellSetup.schema.mof | 8 - .../MSFT_xSCSMARunbookWorkerServerSetup.psm1 | 367 --- ..._xSCSMARunbookWorkerServerSetup.schema.mof | 18 - .../MSFT_xSCSMAWebServiceServerSetup.psm1 | 505 ---- ...SFT_xSCSMAWebServiceServerSetup.schema.mof | 26 - .../MSFT_xSmaCredential.psm1 | 128 - .../MSFT_xSmaCredential.schema.mof | 12 - .../MSFT_xSmaVariable/MSFT_xSmaVariable.psm1 | 173 -- .../MSFT_xSmaVariable.schema.mof | 14 - lib/puppet_x/dsc_resources/xSCSMA/LICENSE | 21 - .../xSCSMA/en-US/xPDT.strings.psd1 | 10 - lib/puppet_x/dsc_resources/xSCSMA/xPDT.psm1 | 708 ----- lib/puppet_x/dsc_resources/xSCSMA/xSCSMA.psd1 | 60 - .../MSFT_xSCSPFServer/MSFT_xSCSPFServer.psm1 | 143 - .../MSFT_xSCSPFServer.schema.mof | 8 - .../MSFT_xSCSPFServerSetup.psm1 | 490 --- .../MSFT_xSCSPFServerSetup.schema.mof | 28 - .../MSFT_xSCSPFServerUpdate.psm1 | 183 -- .../MSFT_xSCSPFServerUpdate.schema.mof | 9 - .../MSFT_xSCSPFSetting.psm1 | 171 -- .../MSFT_xSCSPFSetting.schema.mof | 10 - .../MSFT_xSCSPFStamp/MSFT_xSCSPFStamp.psm1 | 180 -- .../MSFT_xSCSPFStamp.schema.mof | 8 - lib/puppet_x/dsc_resources/xSCSPF/LICENSE | 21 - .../xSCSPF/en-US/xPDT.strings.psd1 | 10 - lib/puppet_x/dsc_resources/xSCSPF/xPDT.psm1 | 708 ----- lib/puppet_x/dsc_resources/xSCSPF/xSCSPF.psd1 | 31 - .../MSFT_xSCSRServerSetup.psm1 | 390 --- .../MSFT_xSCSRServerSetup.schema.mof | 19 - .../MSFT_xSCSRServerUpdate.psm1 | 183 -- .../MSFT_xSCSRServerUpdate.schema.mof | 9 - lib/puppet_x/dsc_resources/xSCSR/LICENSE | 21 - .../xSCSR/en-US/xPDT.strings.psd1 | 10 - lib/puppet_x/dsc_resources/xSCSR/xPDT.psm1 | 708 ----- lib/puppet_x/dsc_resources/xSCSR/xSCSR.psd1 | 31 - .../MSFT_xSCVMMAdmin/MSFT_xSCVMMAdmin.psm1 | 129 - .../MSFT_xSCVMMAdmin.schema.mof | 8 - .../MSFT_xSCVMMConsoleSetup.psm1 | 259 -- .../MSFT_xSCVMMConsoleSetup.schema.mof | 11 - .../MSFT_xSCVMMConsoleUpdate.psm1 | 183 -- .../MSFT_xSCVMMConsoleUpdate.schema.mof | 9 - .../MSFT_xSCVMMManagementServerSetup.psm1 | 628 ---- ...SFT_xSCVMMManagementServerSetup.schema.mof | 37 - .../MSFT_xSCVMMManagementServerUpdate.psm1 | 183 -- ...FT_xSCVMMManagementServerUpdate.schema.mof | 9 - lib/puppet_x/dsc_resources/xSCVMM/LICENSE | 21 - .../xSCVMM/en-US/xPDT.strings.psd1 | 10 - lib/puppet_x/dsc_resources/xSCVMM/xPDT.psm1 | 708 ----- lib/puppet_x/dsc_resources/xSCVMM/xSCVMM.psd1 | 31 - .../MSFT_xSQLAOGroupEnsure.psm1 | 367 --- .../MSFT_xSQLAOGroupEnsure.schema.mof | 17 - .../MSFT_xSQLAOGroupJoin.psm1 | 227 -- .../MSFT_xSQLAOGroupJoin.schema.mof | 10 - .../MSFT_xSQLServerAlias.psm1 | 289 -- .../MSFT_xSQLServerAlias.schema.mof | 11 - ...T_xSQLServerAlwaysOnAvailabilityGroup.psm1 | 758 ----- ...ServerAlwaysOnAvailabilityGroup.schema.mof | 18 - ...erverAlwaysOnAvailabilityGroupReplica.psm1 | 738 ----- ...lwaysOnAvailabilityGroupReplica.schema.mof | 20 - .../MSFT_xSQLServerAlwaysOnService.psm1 | 186 -- .../MSFT_xSQLServerAlwaysOnService.schema.mof | 8 - ...T_xSQLServerAvailabilityGroupListener.psm1 | 494 --- ...ServerAvailabilityGroupListener.schema.mof | 14 - .../MSFT_xSQLServerConfiguration.psm1 | 213 -- .../MSFT_xSQLServerConfiguration.schema.mof | 10 - .../MSFT_xSQLServerDatabase.psm1 | 245 -- .../MSFT_xSQLServerDatabase.schema.mof | 8 - .../MSFT_xSQLServerDatabaseOwner.psm1 | 208 -- .../MSFT_xSQLServerDatabaseOwner.schema.mof | 8 - .../MSFT_xSQLServerDatabasePermission.psm1 | 278 -- ...FT_xSQLServerDatabasePermission.schema.mof | 11 - .../MSFT_xSQLServerDatabaseRecoveryModel.psm1 | 199 -- ...xSQLServerDatabaseRecoveryModel.schema.mof | 8 - .../MSFT_xSQLServerDatabaseRole.psm1 | 377 --- .../MSFT_xSQLServerDatabaseRole.schema.mof | 10 - .../MSFT_xSQLServerEndpoint.psm1 | 281 -- .../MSFT_xSQLServerEndpoint.schema.mof | 10 - .../MSFT_xSQLServerEndpointPermission.psm1 | 249 -- ...FT_xSQLServerEndpointPermission.schema.mof | 12 - .../MSFT_xSQLServerEndpointState.psm1 | 205 -- .../MSFT_xSQLServerEndpointState.schema.mof | 8 - .../MSFT_xSQLServerFailoverClusterSetup.psm1 | 1038 ------- ..._xSQLServerFailoverClusterSetup.schema.mof | 51 - .../MSFT_xSQLServerFirewall.psm1 | 806 ----- .../MSFT_xSQLServerFirewall.schema.mof | 14 - .../MSFT_xSQLServerLogin.psm1 | 615 ---- .../MSFT_xSQLServerLogin.schema.mof | 15 - .../MSFT_xSQLServerMaxDop.psm1 | 282 -- .../MSFT_xSQLServerMaxDop.schema.mof | 9 - .../MSFT_xSQLServerMemory.psm1 | 366 --- .../MSFT_xSQLServerMemory.schema.mof | 10 - .../MSFT_xSQLServerNetwork.psm1 | 287 -- .../MSFT_xSQLServerNetwork.schema.mof | 10 - .../MSFT_xSQLServerPermission.psm1 | 252 -- .../MSFT_xSQLServerPermission.schema.mof | 11 - .../MSFT_xSQLServerRSConfig.psm1 | 229 -- .../MSFT_xSQLServerRSConfig.schema.mof | 9 - ...SFT_xSQLServerRSSecureConnectionLevel.psm1 | 114 - ...QLServerRSSecureConnectionLevel.schema.mof | 7 - .../MSFT_xSQLServerReplication.psm1 | 505 ---- .../MSFT_xSQLServerReplication.schema.mof | 13 - .../MSFT_xSQLServerRole.psm1 | 541 ---- .../MSFT_xSQLServerRole.schema.mof | 11 - .../MSFT_xSQLServerScript.Schema.mof | 11 - .../MSFT_xSQLServerScript.psm1 | 283 -- .../MSFT_xSQLServerSetup.psm1 | 1973 ------------ .../MSFT_xSQLServerSetup.schema.mof | 54 - .../MSFT_xWaitForAvailabilityGroup.psm1 | 126 - .../MSFT_xWaitForAvailabilityGroup.schema.mof | 9 - lib/puppet_x/dsc_resources/xSQLServer/LICENSE | 21 - .../xSQLServer/en-US/xPDT.strings.psd1 | 11 - .../xSQLServer/en-US/xSQLServer.strings.psd1 | 114 - .../dsc_resources/xSQLServer/xPDT.psm1 | 708 ----- .../dsc_resources/xSQLServer/xSQLServer.psd1 | 174 -- .../xSQLServer/xSQLServerHelper.psm1 | 1428 --------- .../MSFT_xSmbShare/MSFT_xSmbShare.psm1 | 354 --- .../MSFT_xSmbShare/MSFT_xSmbShare.schema.mof | 23 - lib/puppet_x/dsc_resources/xSmbShare/LICENSE | 21 - .../dsc_resources/xSmbShare/xSmbShare.psd1 | 62 - .../MSFT_xSqlAlias/MSFT_xSqlAlias.psm1 | 324 -- .../MSFT_xSqlAlias/MSFT_xSqlAlias.schema.mof | 12 - .../MSFT_xSqlHAEndPoint.psm1 | 156 - .../MSFT_xSqlHAEndPoint.schema.mof | 12 - .../MSFT_xSqlHAGroup/MSFT_xSqlHAGroup.psm1 | 422 --- .../MSFT_xSqlHAGroup.schema.mof | 19 - .../MSFT_xSqlHAService.psm1 | 223 -- .../MSFT_xSqlHAService.schema.mof | 15 - .../MSFT_xSqlServerInstall.psm1 | 337 --- .../MSFT_xSqlServerInstall.schema.mof | 30 - .../MSFT_xWaitForSqlHAGroup.psm1 | 284 -- .../MSFT_xWaitForSqlHAGroup.schema.mof | 18 - lib/puppet_x/dsc_resources/xSqlPs/LICENSE | 21 - lib/puppet_x/dsc_resources/xSqlPs/xSqlPs.psd1 | 45 - .../DSCResources/MSFT_xDisk/MSFT_xDisk.psm1 | 806 ----- .../MSFT_xDisk/MSFT_xDisk.schema.mof | 14 - .../MSFT_xDisk/en-us/MSFT_xDisk.strings.psd1 | 38 - .../MSFT_xDiskAccessPath.psm1 | 682 ----- .../MSFT_xDiskAccessPath.schema.mof | 12 - .../en-us/MSFT_xDiskAccessPath.strings.psd1 | 34 - .../MSFT_xMountImage/MSFT_xMountImage.psm1 | 591 ---- .../MSFT_xMountImage.schema.mof | 11 - .../en-us/MSFT_xMountImage.strings.psd1 | 22 - .../MSFT_xWaitForDisk/MSFT_xWaitForDisk.psm1 | 231 -- .../MSFT_xWaitForDisk.schema.mof | 9 - .../en-us/MSFT_xWaitForDisk.strings.psd1 | 12 - .../MSFT_xWaitForVolume.psm1 | 210 -- .../MSFT_xWaitForVolume.schema.mof | 8 - .../en-us/MSFT_xWaitForVolume.strings.psd1 | 12 - lib/puppet_x/dsc_resources/xStorage/LICENSE | 22 - .../StorageDsc.Common/StorageDsc.Common.psm1 | 107 - .../en-us/StorageDsc.Common.strings.psd1 | 4 - .../StorageDsc.ResourceHelper.psm1 | 170 -- .../dsc_resources/xStorage/xStorage.psd1 | 137 - .../xTimeZone/DSCResources/SetTimeZone.cs | 268 -- .../DSCResources/TimezoneHelper.psm1 | 189 -- .../DSCResources/en-us/TimezoneHelper.psd1 | 8 - .../xTimeZone/en-us/xTimeZone.psd1 | 6 - .../DSCResources/xTimeZone/xTimeZone.psm1 | 119 - .../xTimeZone/xTimeZone.schema.mof | 6 - lib/puppet_x/dsc_resources/xTimeZone/LICENSE | 21 - .../dsc_resources/xTimeZone/xTimeZone.psd1 | 66 - .../DSCResources/Helper.psm1 | 63 - .../MSFT_xIIsHandler/MSFT_xIisHandler.psm1 | 959 ------ .../MSFT_xIisHandler.schema.mof | 6 - .../MSFT_xIisFeatureDelegation.psm1 | 146 - .../MSFT_xIisFeatureDelegation.schema.mof | 6 - .../MSFT_xIisLogging/MSFT_xIisLogging.psm1 | 311 -- .../MSFT_xIisLogging.schema.mof | 10 - .../MSFT_xIisMimeTypeMapping.psm1 | 192 -- .../MSFT_xIisMimeTypeMapping.schema.mof | 7 - .../MSFT_xIisModule/MSFT_xIisModule.psm1 | 414 --- .../MSFT_xIisModule.schema.mof | 17 - .../MSFT_xIisModule/xIisModuleDesigner.ps1 | 50 - .../MSFT_xSSLSettings/MSFT_xSSLSettings.psm1 | 175 -- .../MSFT_xSSLSettings.schema.mof | 7 - .../MSFT_xWebAppPool/MSFT_xWebAppPool.psm1 | 927 ------ .../MSFT_xWebAppPool.schema.mof | 55 - .../MSFT_xWebAppPoolDefaults.psm1 | 215 -- .../MSFT_xWebAppPoolDefaults.schema.mof | 8 - .../MSFT_xWebApplication.psm1 | 834 ------ .../MSFT_xWebApplication.schema.mof | 25 - .../MSFT_xWebConfigKeyValue.psm1 | 404 --- .../MSFT_xWebConfigKeyValue.schema.mof | 10 - .../MSFT_xWebSiteDefaults.psm1 | 245 -- .../MSFT_xWebSiteDefaults.schema.mof | 10 - .../MSFT_xWebVirtualDirectory.psm1 | 211 -- .../MSFT_xWebVirtualDirectory.schema.mof | 10 - .../MSFT_xWebsite/MSFT_xWebsite.psm1 | 2106 ------------- .../MSFT_xWebsite/MSFT_xWebsite.schema.mof | 45 - .../dsc_resources/xWebAdministration/LICENSE | 21 - .../xWebAdministration.psd1 | 69 - .../xWebDeploy/xWebDeploy.Schema.psm1 | 73 - .../DSCResources/xWebDeploy/xWebDeploy.psd1 | 96 - .../xWebPackageDeploy/xWebPackageDeploy.psm1 | 203 -- .../xWebPackageDeploy.schema.mof | 12 - lib/puppet_x/dsc_resources/xWebDeploy/LICENSE | 21 - .../dsc_resources/xWebDeploy/xWebDeploy.psd1 | 119 - .../MSFT_xWinEventLog/MSFT_xWinEventLog.psm1 | 240 -- .../MSFT_xWinEventLog.schema.mof | 14 - .../dsc_resources/xWinEventLog/LICENSE | 21 - .../xWinEventLog/xWinEventLog.psd1 | 98 - .../xWinEventLog/xWinEventLog.psm1 | 18 - .../MSFT_xWEFCollector.psm1 | 77 - .../MSFT_xWEFCollector.schema.mof | 8 - .../MSFT_xWEFSubscription.psm1 | 331 --- .../MSFT_xWEFSubscription.schema.mof | 26 - .../xWindowsEventForwarding/LICENSE | 22 - .../xWindowsEventForwarding.psd1 | 120 - .../xSystemRestore/xSystemRestore.psm1 | 120 - .../xSystemRestore/xSystemRestore.schema.mof | 10 - .../xSystemRestorePoint.psm1 | 205 -- .../xSystemRestorePoint.schema.mof | 11 - .../dsc_resources/xWindowsRestore/LICENSE | 21 - .../xWindowsRestore/xWindowsRestore.psd1 | 31 - .../MSFT_xMicrosoftUpdate.psm1 | 122 - .../MSFT_xMicrosoftUpdate.schema.mof | 6 - .../MSFT_xWindowsUpdate.psm1 | 418 --- .../MSFT_xWindowsUpdate.schema.mof | 13 - .../MSFT_xWindowsUpdateAgent.psm1 | 614 ---- .../MSFT_xWindowsUpdateAgent.schema.mof | 17 - .../dsc_resources/xWindowsUpdate/LICENSE | 21 - .../xWindowsUpdate/xWindowsUpdate.psd1 | 60 - .../MSFT_xWordPressSite.psm1 | 156 - .../MSFT_xWordPressSite.schema.mof | 13 - .../MSFT_xWordPressSite/xWordPressSite.ps1 | 55 - .../xIisWordPressSite.Schema.psm1 | 84 - .../xIisWordPressSite/xIisWordPressSite.psd1 | 96 - lib/puppet_x/dsc_resources/xWordPress/LICENSE | 21 - .../dsc_resources/xWordPress/xWordPress.psd1 | 36 - 1046 files changed, 179789 deletions(-) delete mode 100644 lib/puppet_x/dsc_resources/AuditPolicyDsc/AuditPolicyDsc.psd1 delete mode 100644 lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/AuditPolicyResourceHelper/AuditPolicyResourceHelper.psm1 delete mode 100644 lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/AuditPolicyResourceHelper/en-US/AuditPolicyResourceHelper.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyCsv/MSFT_AuditPolicyCsv.psm1 delete mode 100644 lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyCsv/MSFT_AuditPolicyCsv.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyCsv/en-US/MSFT_AuditPolicyCsv.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyOption/MSFT_AuditPolicyOption.psm1 delete mode 100644 lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyOption/MSFT_AuditPolicyOption.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyOption/en-US/MSFT_AuditPolicyOption.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicySubcategory/MSFT_AuditPolicySubcategory.psm1 delete mode 100644 lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicySubcategory/MSFT_AuditPolicySubcategory.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicySubcategory/en-US/MSFT_AuditPolicySubcategory.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/AuditPolicyDsc/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerFarm/MSFT_OfficeOnlineServerFarm.psm1 delete mode 100644 lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerFarm/MSFT_OfficeOnlineServerFarm.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerInstall/MSFT_OfficeOnlineServerInstall.psm1 delete mode 100644 lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerInstall/MSFT_OfficeOnlineServerInstall.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerMachine/MSFT_OfficeOnlineServerMachine.psm1 delete mode 100644 lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerMachine/MSFT_OfficeOnlineServerMachine.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/Modules/OfficeOnlineServerDsc.Util/OfficeOnlineServerDsc.Util.psm1 delete mode 100644 lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/OfficeOnlineServerDsc.psd1 delete mode 100644 lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecuritySetting/MSFT_SecuritySetting.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecuritySetting/MSFT_SecuritySetting.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecuritySetting/en-US/MSFT_SecuritySetting.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecurityTemplate/MSFT_SecurityTemplate.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecurityTemplate/MSFT_SecurityTemplate.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecurityTemplate/en-US/MSFT_SecurityTemplate.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_UserRightsAssignment/MSFT_UserRightsAssignment.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_UserRightsAssignment/MSFT_UserRightsAssignment.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_UserRightsAssignment/UserRightsFriendlyNameConversions.psd1 delete mode 100644 lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_UserRightsAssignment/en-US/MSFT_UserRightsAssignment.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/SecurityPolicyResourceHelper/SecurityPolicyResourceHelper.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/SecurityPolicyResourceHelper/en-US/SecurityPolicyResourceHelper.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/SecurityPolicyDsc/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/SecurityPolicyDsc/SecurityPolicyDsc.psd1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/MSFT_SPAccessServiceApp.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/MSFT_SPAccessServiceApp.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAccessServices2010/MSFT_SPAccessServices2010.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAccessServices2010/MSFT_SPAccessServices2010.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/MSFT_SPAlternateUrl.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/MSFT_SPAlternateUrl.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/MSFT_SPAntivirusSettings.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/MSFT_SPAntivirusSettings.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppCatalog/MSFT_SPAppCatalog.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppCatalog/MSFT_SPAppCatalog.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppDomain/MSFT_SPAppDomain.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppDomain/MSFT_SPAppDomain.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/MSFT_SPAppManagementServiceApp.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/MSFT_SPAppManagementServiceApp.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/MSFT_SPAppStoreSettings.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/MSFT_SPAppStoreSettings.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/MSFT_SPBCSServiceApp.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/MSFT_SPBCSServiceApp.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/MSFT_SPBlobCacheSettings.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/MSFT_SPBlobCacheSettings.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/MSFT_SPCacheAccounts.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/MSFT_SPCacheAccounts.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPConfigWizard/MSFT_SPConfigWizard.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPConfigWizard/MSFT_SPConfigWizard.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPContentDatabase/MSFT_SPContentDatabase.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPContentDatabase/MSFT_SPContentDatabase.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPCreateFarm/MSFT_SPCreateFarm.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPCreateFarm/MSFT_SPCreateFarm.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/MSFT_SPDatabaseAAG.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/MSFT_SPDatabaseAAG.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/MSFT_SPDesignerSettings.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/MSFT_SPDesignerSettings.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/MSFT_SPDiagnosticLoggingSettings.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/MSFT_SPDiagnosticLoggingSettings.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/MSFT_SPDistributedCacheService.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/MSFT_SPDistributedCacheService.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/MSFT_SPExcelServiceApp.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/MSFT_SPExcelServiceApp.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarm/MSFT_SPFarm.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarm/MSFT_SPFarm.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/MSFT_SPFarmAdministrators.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/MSFT_SPFarmAdministrators.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/MSFT_SPFarmPropertyBag.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/MSFT_SPFarmPropertyBag.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmSolution/MSFT_SPFarmSolution.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmSolution/MSFT_SPFarmSolution.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFeature/MSFT_SPFeature.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFeature/MSFT_SPFeature.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/MSFT_SPHealthAnalyzerRuleState.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/MSFT_SPHealthAnalyzerRuleState.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstall/MSFT_SPInstall.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstall/MSFT_SPInstall.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/MSFT_SPInstallLanguagePack.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/MSFT_SPInstallLanguagePack.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/MSFT_SPInstallPrereqs.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/MSFT_SPInstallPrereqs.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPIrmSettings/MSFT_SPIrmSettings.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPIrmSettings/MSFT_SPIrmSettings.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPJoinFarm/MSFT_SPJoinFarm.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPJoinFarm/MSFT_SPJoinFarm.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/MSFT_SPMachineTranslationServiceApp.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/MSFT_SPMachineTranslationServiceApp.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedAccount/MSFT_SPManagedAccount.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedAccount/MSFT_SPManagedAccount.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/MSFT_SPManagedMetaDataServiceApp.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/MSFT_SPManagedMetaDataServiceApp.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedPath/MSFT_SPManagedPath.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedPath/MSFT_SPManagedPath.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/MSFT_SPOfficeOnlineServerBinding.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/MSFT_SPOfficeOnlineServerBinding.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/MSFT_SPOutgoingEmailSettings.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/MSFT_SPOutgoingEmailSettings.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/MSFT_SPPasswordChangeSettings.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/MSFT_SPPasswordChangeSettings.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/MSFT_SPPerformancePointServiceApp.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/MSFT_SPPerformancePointServiceApp.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPowerPointAutomationServiceApp/MSFT_SPPowerPointAutomationServiceApp.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPowerPointAutomationServiceApp/MSFT_SPPowerPointAutomationServiceApp.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPProductUpdate/MSFT_SPProductUpdate.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPProductUpdate/MSFT_SPProductUpdate.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/MSFT_SPPublishServiceApplication.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/MSFT_SPPublishServiceApplication.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/MSFT_SPQuotaTemplate.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/MSFT_SPQuotaTemplate.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/MSFT_SPRemoteFarmTrust.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/MSFT_SPRemoteFarmTrust.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/MSFT_SPSearchAuthoritativePage.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/MSFT_SPSearchAuthoritativePage.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/MSFT_SPSearchContentSource.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/MSFT_SPSearchContentSource.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/MSFT_SPSearchCrawlMapping.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/MSFT_SPSearchCrawlMapping.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/MSFT_SPSearchCrawlRule.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/MSFT_SPSearchCrawlRule.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/MSFT_SPSearchCrawlerImpactRule.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/MSFT_SPSearchCrawlerImpactRule.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchFileType/MSFT_SPSearchFileType.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchFileType/MSFT_SPSearchFileType.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/MSFT_SPSearchIndexPartition.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/MSFT_SPSearchIndexPartition.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/MSFT_SPSearchResultSource.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/MSFT_SPSearchResultSource.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/MSFT_SPSearchServiceApp.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/MSFT_SPSearchServiceApp.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchTopology/MSFT_SPSearchTopology.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchTopology/MSFT_SPSearchTopology.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/MSFT_SPSecureStoreServiceApp.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/MSFT_SPSecureStoreServiceApp.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/MSFT_SPServiceAppPool.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/MSFT_SPServiceAppPool.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/MSFT_SPServiceAppProxyGroup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/MSFT_SPServiceAppProxyGroup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/MSFT_SPServiceAppSecurity.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/MSFT_SPServiceAppSecurity.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceInstance/MSFT_SPServiceInstance.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceInstance/MSFT_SPServiceInstance.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSessionStateService/MSFT_SPSessionStateService.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSessionStateService/MSFT_SPSessionStateService.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPShellAdmins/MSFT_SPShellAdmins.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPShellAdmins/MSFT_SPShellAdmins.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSite/MSFT_SPSite.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSite/MSFT_SPSite.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/MSFT_SPStateServiceApp.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/MSFT_SPStateServiceApp.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/MSFT_SPSubscriptionSettingsServiceApp.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/MSFT_SPSubscriptionSettingsServiceApp.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/MSFT_SPTrustedIdentityTokenIssuer.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/MSFT_SPTrustedIdentityTokenIssuer.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTrustedRootAuthority/MSFT_SPTrustedRootAuthority.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTrustedRootAuthority/MSFT_SPTrustedRootAuthority.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUsageApplication/MSFT_SPUsageApplication.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUsageApplication/MSFT_SPUsageApplication.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/MSFT_SPUserProfileProperty.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/MSFT_SPUserProfileProperty.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/MSFT_SPUserProfileSection.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/MSFT_SPUserProfileSection.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/MSFT_SPUserProfileServiceAppPermissions.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/MSFT_SPUserProfileServiceAppPermissions.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/MSFT_SPUserProfileSyncService.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/MSFT_SPUserProfileSyncService.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/MSFT_SPVisioServiceApp.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/MSFT_SPVisioServiceApp.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWeb/MSFT_SPWeb.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWeb/MSFT_SPWeb.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/MSFT_SPWebAppBlockedFileTypes.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/MSFT_SPWebAppBlockedFileTypes.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/MSFT_SPWebAppGeneralSettings.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/MSFT_SPWebAppGeneralSettings.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/MSFT_SPWebAppPermissions.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/MSFT_SPWebAppPermissions.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/MSFT_SPWebAppPolicy.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/MSFT_SPWebAppPolicy.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/MSFT_SPWebAppProxyGroup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/MSFT_SPWebAppProxyGroup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/MSFT_SPWebAppSiteUseAndDeletion.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/MSFT_SPWebAppSiteUseAndDeletion.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/MSFT_SPWebAppThrottlingSettings.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/MSFT_SPWebAppThrottlingSettings.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/MSFT_SPWebAppWorkflowSettings.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/MSFT_SPWebAppWorkflowSettings.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplication/MSFT_SPWebApplication.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplication/MSFT_SPWebApplication.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/MSFT_SPWebApplicationAppDomain.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/MSFT_SPWebApplicationAppDomain.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/MSFT_SPWebApplicationExtension.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/MSFT_SPWebApplicationExtension.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/MSFT_SPWordAutomationServiceApp.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/MSFT_SPWordAutomationServiceApp.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/MSFT_SPWorkManagementServiceApp.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/MSFT_SPWorkManagementServiceApp.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.ContentDatabase/SPContentDatabase.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.Farm/SPFarm.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.Search/SPSearchContentSource.Schedules.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.WebAppPolicy/SPWebAppPolicy.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.BlockedFileTypes.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.GeneralSettings.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.Throttling.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.Workflow.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SharePointDsc/SharePointDsc.psd1 delete mode 100644 lib/puppet_x/dsc_resources/SystemLocaleDsc/DSCResources/MSFT_SystemLocale/MSFT_SystemLocale.psm1 delete mode 100644 lib/puppet_x/dsc_resources/SystemLocaleDsc/DSCResources/MSFT_SystemLocale/MSFT_SystemLocale.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/SystemLocaleDsc/DSCResources/MSFT_SystemLocale/en-us/MSFT_SystemLocale.psd1 delete mode 100644 lib/puppet_x/dsc_resources/SystemLocaleDsc/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/SystemLocaleDsc/SystemLocaleDsc.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/Assert-HADC.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/Assert-ParentChildDomains.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADCommon/MSFT_xADCommon.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADCommon/MSFT_xADCommon.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADComputer/MSFT_xADComputer.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADComputer/MSFT_xADComputer.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADComputer/en-US/MSFT_xADComputer.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomain/MSFT_xADDomain.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomain/MSFT_xADDomain.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainController/MSFT_xADDomainController.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainController/MSFT_xADDomainController.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainDefaultPasswordPolicy/MSFT_xADDomainDefaultPasswordPolicy.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainDefaultPasswordPolicy/MSFT_xADDomainDefaultPasswordPolicy.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainTrust/MSFT_xADDomainTrust.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainTrust/MSFT_xADDomainTrust.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADGroup/MSFT_xADGroup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADGroup/MSFT_xADGroup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADOrganizationalUnit/MSFT_xADOrganizationalUnit.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADOrganizationalUnit/MSFT_xADOrganizationalUnit.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADRecycleBin/MSFT_xADRecycleBin.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADRecycleBin/MSFT_xADRecycleBin.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADRecycleBin/ResourceDesignerScripts/GeneratexADRecycleBinSchema.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADUser/MSFT_xADUser.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADUser/MSFT_xADUser.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xWaitForADDomain/MSFT_xWaitForADDomain.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xWaitForADDomain/MSFT_xWaitForADDomain.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/HADCConfiguration.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/Misc/New-ADDomainTrust.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/ParentChildConfig.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xActiveDirectory/xActiveDirectory.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/CommonResourceHelper.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsCertificationAuthority/MSFT_xAdcsCertificationAuthority.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsCertificationAuthority/MSFT_xAdcsCertificationAuthority.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsCertificationAuthority/en-us/MSFT_xAdcsCertificationAuthority.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsOnlineResponder/MSFT_xAdcsOnlineResponder.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsOnlineResponder/MSFT_xAdcsOnlineResponder.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsOnlineResponder/en-us/MSFT_xAdcsOnlineResponder.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsWebEnrollment/MSFT_xAdcsWebEnrollment.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsWebEnrollment/MSFT_xAdcsWebEnrollment.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsWebEnrollment/en-us/MSFT_xAdcsWebEnrollment.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xAdcsDeployment/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xAdcsDeployment/xAdcsDeployment.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureAffinityGroup/MSFT_xAzureAffinityGroup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureAffinityGroup/MSFT_xAzureAffinityGroup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureQuickVM/MSFT_xAzureQuickVM.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureQuickVM/MSFT_xAzureQuickVM.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureService/MSFT_xAzureService.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureService/MSFT_xAzureService.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSqlDatabase/MSFT_xAzureSqlDatabase.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSqlDatabase/MSFT_xAzureSqlDatabase.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSqlDatabaseServerFirewallRule/MSFT_xAzureSqlDatabaseServerFirewallRule.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSqlDatabaseServerFirewallRule/MSFT_xAzureSqlDatabaseServerFirewallRule.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureStorageAccount/MSFT_xAzureStorageAccount.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureStorageAccount/MSFT_xAzureStorageAccount.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSubscription/MSFT_xAzureSubscription.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSubscription/MSFT_xAzureSubscription.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVM/MSFT_xAzureVM.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVM/MSFT_xAzureVM.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVMDscConfiguration/MSFT_xAzureVMDscConfiguration.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVMDscConfiguration/MSFT_xAzureVMDscConfiguration.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVMDscExtension/MSFT_xAzureVMDscExtension.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVMDscExtension/MSFT_xAzureVMDscExtension.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xAzure/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xAzure/ResourceDesignerScripts/GenerateXAzureSqlDatabase.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xAzure/ResourceDesignerScripts/GenerateXAzureSqlDatabaseServerFirewallRule.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xAzure/xAzure.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackAdmin/MSFT_xAzurePackAdmin.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackAdmin/MSFT_xAzurePackAdmin.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackDatabaseSetting/MSFT_xAzurePackDatabaseSetting.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackDatabaseSetting/MSFT_xAzurePackDatabaseSetting.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackFQDN/MSFT_xAzurePackFQDN.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackFQDN/MSFT_xAzurePackFQDN.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackIdentityProvider/MSFT_xAzurePackIdentityProvider.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackIdentityProvider/MSFT_xAzurePackIdentityProvider.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackRelyingParty/MSFT_xAzurePackRelyingParty.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackRelyingParty/MSFT_xAzurePackRelyingParty.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackResourceProvider/MSFT_xAzurePackResourceProvider.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackResourceProvider/MSFT_xAzurePackResourceProvider.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackSetup/MSFT_xAzurePackSetup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackSetup/MSFT_xAzurePackSetup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackUpdate/MSFT_xAzurePackUpdate.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackUpdate/MSFT_xAzurePackUpdate.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xAzurePack/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xAzurePack/en-US/xPDT.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xAzurePack/xAzurePack.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xAzurePack/xPDT.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLAutoBitlocker/MSFT_xBLAutoBitlocker.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLAutoBitlocker/MSFT_xBLAutoBitlocker.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLBitlocker/MSFT_xBLBitlocker.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLBitlocker/MSFT_xBLBitlocker.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLTpm/MSFT_xBLTpm.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLTpm/MSFT_xBLTpm.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xBitlocker/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xBitlocker/Misc/xBitlockerCommon.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xBitlocker/xBitlocker.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertReq/MSFT_xCertReq.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertReq/MSFT_xCertReq.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertReq/en-us/MSFT_xCertReq.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateExport/MSFT_xCertificateExport.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateExport/MSFT_xCertificateExport.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateExport/en-us/MSFT_xCertificateExport.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateImport/MSFT_xCertificateImport.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateImport/MSFT_xCertificateImport.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateImport/en-us/MSFT_xCertificateImport.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xPfxImport/MSFT_xPfxImport.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xPfxImport/MSFT_xPfxImport.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xPfxImport/en-us/MSFT_xPfxImport.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xWaitForCertificateServices/MSFT_xWaitForCertificateServices.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xWaitForCertificateServices/MSFT_xWaitForCertificateServices.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xWaitForCertificateServices/en-us/MSFT_xWaitForCertificateServices.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xCertificate/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xCertificate/Modules/CertificateDsc.Common/CertificateDSc.Common.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xCertificate/Modules/CertificateDsc.Common/en-us/CertificateDsc.Common.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xCertificate/Modules/CertificateDsc.PDT/CertificateDsc.PDT.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xCertificate/Modules/CertificateDsc.PDT/en-us/CertificateDsc.PDT.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xCertificate/Modules/CertificateDsc.ResourceHelper/CertificateDsc.ResourceHelper.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xCertificate/xCertificate.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/CommonResourceHelper.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xComputer/MSFT_xComputer.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xComputer/MSFT_xComputer.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xOfflineDomainJoin/MSFT_xOfflineDomainJoin.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xOfflineDomainJoin/MSFT_xOfflineDomainJoin.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xOfflineDomainJoin/en-us/MSFT_xOfflineDomainJoin.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xPowerPlan/MSFT_xPowerPlan.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xPowerPlan/MSFT_xPowerPlan.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xPowerPlan/en-US/MSFT_xPowerPlan.schema.mfl delete mode 100644 lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xPowerPlan/en-US/MSFT_xPowerPlan.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xScheduledTask/MSFT_xScheduledTask.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xScheduledTask/MSFT_xScheduledTask.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xVirtualMemory/MSFT_xVirtualMemory.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xVirtualMemory/MSFT_xVirtualMemory.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xComputerManagement/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xComputerManagement/xComputerManagement.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xCredSSP/DSCResources/MSFT_xCredSSP/MSFT_xCredSSP.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xCredSSP/DSCResources/MSFT_xCredSSP/MSFT_xCredSSP.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xCredSSP/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xCredSSP/xCredSSP.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceFolder/MSFT_xDFSNamespaceFolder.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceFolder/MSFT_xDFSNamespaceFolder.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceFolder/en-us/MSFT_xDFSNamespaceFolder.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceRoot/MSFT_xDFSNamespaceRoot.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceRoot/MSFT_xDFSNamespaceRoot.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceRoot/en-us/MSFT_xDFSNamespaceRoot.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceServerConfiguration/MSFT_xDFSNamespaceServerConfiguration.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceServerConfiguration/MSFT_xDFSNamespaceServerConfiguration.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceServerConfiguration/en-us/MSFT_xDFSNamespaceServerConfiguration.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroup/MSFT_xDFSReplicationGroup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroup/MSFT_xDFSReplicationGroup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroup/en-us/MSFT_xDFSReplicationGroup.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupConnection/MSFT_xDFSReplicationGroupConnection.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupConnection/MSFT_xDFSReplicationGroupConnection.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupConnection/en-us/MSFT_xDFSReplicationGroupConnection.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupFolder/MSFT_xDFSReplicationGroupFolder.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupFolder/MSFT_xDFSReplicationGroupFolder.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupFolder/en-us/MSFT_xDFSReplicationGroupFolder.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupMembership/MSFT_xDFSReplicationGroupMembership.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupMembership/MSFT_xDFSReplicationGroupMembership.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupMembership/en-us/MSFT_xDFSReplicationGroupMembership.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xDFS/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xDFS/Modules/DFSDsc.ResourceHelper/DFSDsc.ResourceHelper.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDFS/xDFS.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDBPackage/MSFT_xDBPackage.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDBPackage/MSFT_xDBPackage.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabase/MSFT_xDatabase.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabase/MSFT_xDatabase.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabaseLogin/MSFT_xDatabaseLogin.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabaseLogin/MSFT_xDatabaseLogin.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabaseLogin/MSFT_xDatabaseLoginWithDefaultDB.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabaseServer/MSFT_xDatabaseServer.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabaseServer/MSFT_xDatabaseServer.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDatabase/DSCResources/xDatabase_Common/xDatabase_Common.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDatabase/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xDatabase/xDatabase.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xDefender/DSCResources/MSFT_xMpPreference/MSFT_xMpPreference.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDefender/DSCResources/MSFT_xMpPreference/MSFT_xMpPreference.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDefender/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xDefender/xDefender.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/Helper.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerAuthorization/MSFT_xDhcpServerAuthorization.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerAuthorization/MSFT_xDhcpServerAuthorization.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerClass/MSFT_xDhcpServerClass.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerClass/MSFT_xDhcpServerClass.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerOption/MSFT_xDhcpServerOption.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerOption/MSFT_xDhcpServerOption.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerOptionDefinition/MSFT_xDhcpServerOptionDefinition.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerReservation/MSFT_xDhcpServerReservation.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerReservation/MSFT_xDhcpServerReservation.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerScope/MSFT_xDhcpServerScope.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerScope/MSFT_xDhcpServerScope.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDhcpServer/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xDhcpServer/Misc/New-DhcpServerOptionResource.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xDhcpServer/Misc/New-DhcpServerReservationResource.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xDhcpServer/Misc/New-DhcpServerScopeResource.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xDhcpServer/xDhcpServer.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xDismFeature/DSCResources/MSFT_xDismFeature/MSFT_xDismFeature.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDismFeature/DSCResources/MSFT_xDismFeature/MSFT_xDismFeature.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDismFeature/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xDismFeature/xDismFeature.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xDnsServer/DSCResources/Helper.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsARecord/MSFT_xDnsARecord.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsARecord/MSFT_xDnsARecord.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsRecord/MSFT_xDnsRecord.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsRecord/MSFT_xDnsRecord.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerADZone/Helper.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerADZone/MSFT_xDnsServerADZone.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerADZone/MSFT_xDnsServerADZone.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerForwarder/MSFT_xDnsServerForwarder.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerForwarder/MSFT_xDnsServerForwarder.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerPrimaryZone/MSFT_xDnsServerPrimaryZone.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerPrimaryZone/MSFT_xDnsServerPrimaryZone.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerSecondaryZone/MSFT_xDnsServerSecondaryZone.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerSecondaryZone/MSFT_xDnsServerSecondaryZone.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerZoneTransfer/MSFT_xDnsServerZoneTransfer.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerZoneTransfer/MSFT_xDnsServerZoneTransfer.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xDnsServer/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xDnsServer/Misc/New-DnsServerSecondaryZone.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xDnsServer/Misc/New-DnsServerZoneTransfer.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xDnsServer/xDnsServer.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchActiveSyncVirtualDirectory/MSFT_xExchActiveSyncVirtualDirectory.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchActiveSyncVirtualDirectory/MSFT_xExchActiveSyncVirtualDirectory.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAntiMalwareScanning/MSFT_xExchAntiMalwareScanning.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAntiMalwareScanning/MSFT_xExchAntiMalwareScanning.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAutoMountPoint/MSFT_xExchAutoMountPoint.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAutoMountPoint/MSFT_xExchAutoMountPoint.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAutodiscoverVirtualDirectory/MSFT_xExchAutodiscoverVirtualDirectory.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAutodiscoverVirtualDirectory/MSFT_xExchAutodiscoverVirtualDirectory.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchClientAccessServer/MSFT_xExchClientAccessServer.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchClientAccessServer/MSFT_xExchClientAccessServer.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroup/MSFT_xExchDatabaseAvailabilityGroup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroup/MSFT_xExchDatabaseAvailabilityGroup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroupMember/MSFT_xExchDatabaseAvailabilityGroupMember.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroupMember/MSFT_xExchDatabaseAvailabilityGroupMember.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroupNetwork/MSFT_xExchDatabaseAvailabilityGroupNetwork.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroupNetwork/MSFT_xExchDatabaseAvailabilityGroupNetwork.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchEcpVirtualDirectory/MSFT_xExchEcpVirtualDirectory.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchEcpVirtualDirectory/MSFT_xExchEcpVirtualDirectory.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchEventLogLevel/MSFT_xExchEventLogLevel.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchEventLogLevel/MSFT_xExchEventLogLevel.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchExchangeCertificate/MSFT_xExchExchangeCertificate.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchExchangeCertificate/MSFT_xExchExchangeCertificate.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchExchangeServer/MSFT_xExchExchangeServer.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchExchangeServer/MSFT_xExchExchangeServer.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchImapSettings/MSFT_xExchImapSettings.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchImapSettings/MSFT_xExchImapSettings.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchInstall/MSFT_xExchInstall.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchInstall/MSFT_xExchInstall.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchJetstress/MSFT_xExchJetstress.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchJetstress/MSFT_xExchJetstress.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchJetstressCleanup/MSFT_xExchJetstressCleanup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchJetstressCleanup/MSFT_xExchJetstressCleanup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxDatabase/MSFT_xExchMailboxDatabase.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxDatabase/MSFT_xExchMailboxDatabase.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxDatabaseCopy/MSFT_xExchMailboxDatabaseCopy.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxDatabaseCopy/MSFT_xExchMailboxDatabaseCopy.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxServer/MSFT_xExchMailboxServer.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxServer/MSFT_xExchMailboxServer.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxTransportService/MSFT_xExchMailboxTransportService.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxTransportService/MSFT_xExchMailboxTransportService.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMaintenanceMode/MSFT_xExchMaintenanceMode.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMaintenanceMode/MSFT_xExchMaintenanceMode.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMaintenanceMode/TransportMaintenance.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMapiVirtualDirectory/MSFT_xExchMapiVirtualDirectory.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMapiVirtualDirectory/MSFT_xExchMapiVirtualDirectory.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOabVirtualDirectory/MSFT_xExchOabVirtualDirectory.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOabVirtualDirectory/MSFT_xExchOabVirtualDirectory.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOutlookAnywhere/MSFT_xExchOutlookAnywhere.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOutlookAnywhere/MSFT_xExchOutlookAnywhere.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOwaVirtualDirectory/MSFT_xExchOwaVirtualDirectory.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOwaVirtualDirectory/MSFT_xExchOwaVirtualDirectory.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchPopSettings/MSFT_xExchPopSettings.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchPopSettings/MSFT_xExchPopSettings.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchPowershellVirtualDirectory/MSFT_xExchPowerShellVirtualDirectory.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchPowershellVirtualDirectory/MSFT_xExchPowerShellVirtualDirectory.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchReceiveConnector/MSFT_xExchReceiveConnector.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchReceiveConnector/MSFT_xExchReceiveConnector.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchTransportService/MSFT_xExchTransportService.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchTransportService/MSFT_xExchTransportService.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchUMCallRouterSettings/MSFT_xExchUMCallRouterSettings.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchUMCallRouterSettings/MSFT_xExchUMCallRouterSettings.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchUMService/MSFT_xExchUMService.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchUMService/MSFT_xExchUMService.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForADPrep/MSFT_xExchWaitForADPrep.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForADPrep/MSFT_xExchWaitForADPrep.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForDAG/MSFT_xExchWaitForDAG.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForDAG/MSFT_xExchWaitForDAG.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForMailboxDatabase/MSFT_xExchWaitForMailboxDatabase.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForMailboxDatabase/MSFT_xExchWaitForMailboxDatabase.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWebServicesVirtualDirectory/MSFT_xExchWebServicesVirtualDirectory.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWebServicesVirtualDirectory/MSFT_xExchWebServicesVirtualDirectory.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xExchange/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xExchange/Misc/xExchangeCommon.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/Misc/xExchangeDiskPart.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xExchange/xExchange.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/CommonResourceHelper.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xCluster/MSFT_xCluster.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xCluster/MSFT_xCluster.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xCluster/en-US/MSFT_xCluster.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterDisk/MSFT_xClusterDisk.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterDisk/MSFT_xClusterDisk.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterDisk/en-US/MSFT_xClusterDisk.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterNetwork/MSFT_xClusterNetwork.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterNetwork/MSFT_xClusterNetwork.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterNetwork/en-US/MSFT_xClusterNetwork.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterPreferredOwner/MSFT_xClusterPreferredOwner.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterPreferredOwner/MSFT_xClusterPreferredOwner.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterPreferredOwner/en-US/MSFT_xClusterPreferredOwner.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterQuorum/MSFT_xClusterQuorum.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterQuorum/MSFT_xClusterQuorum.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterQuorum/en-US/MSFT_xClusterQuorum.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xWaitForCluster/MSFT_xWaitForCluster.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xWaitForCluster/MSFT_xWaitForCluster.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xWaitForCluster/en-US/MSFT_xWaitForCluster.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xFailOverCluster/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xFailOverCluster/xFailOverCluster.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/DSCResources/HyperVCommon/HyperVCommon.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/DSCResources/HyperVCommon/en-us/HyperVCommon.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVHD/MSFT_xVHD.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVHD/MSFT_xVHD.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMDvdDrive/MSFT_xVMDvdDrive.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMDvdDrive/MSFT_xVMDvdDrive.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMDvdDrive/en-us/MSFT_xVMDvdDrive.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMHost/MSFT_xVMHost.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMHost/MSFT_xVMHost.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMHost/en-US/MSFT_xVMHost.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMHyperV/MSFT_xVMHyperV.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMHyperV/MSFT_xVMHyperV.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMNetworkAdapter/MSFT_xVMNetworkAdapter.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMNetworkAdapter/MSFT_xVMNetworkAdapter.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMNetworkAdapter/en-US/MSFT_xVMNetworkAdapter.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMProcessor/MSFT_xVMProcessor.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMProcessor/MSFT_xVMProcessor.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMProcessor/en-US/MSFT_xVMProcessor.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMSwitch/MSFT_xVMSwitch.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMSwitch/MSFT_xVMSwitch.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMSwitch/en-us/MSFT_xVMSwitch.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVhdFileDirectory/MSFT_xVhdFileDirectory.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVhdFileDirectory/MSFT_xVhdFileDirectory.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/Misc/VHDResourceGenerator.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/Misc/VMResourceGenerator.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/Misc/VMSwitchGenerator.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xHyper-V/xHyper-V.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xInternetExplorerHomePage/DSCResources/xInternetExplorerHomePage/xInternetExplorerHomePage.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xInternetExplorerHomePage/DSCResources/xInternetExplorerHomePage/xInternetExplorerHomePage.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xInternetExplorerHomePage/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xInternetExplorerHomePage/xInternetExplorerHomePage.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xJea/DSCResources/Library/Helper.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xJea/DSCResources/Library/JeaAccount.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xJea/DSCResources/Library/JeaDir.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xJea/DSCResources/Library/JeaInitFile.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xJea/DSCResources/Library/JeaProxy.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xJea/DSCResources/MSFT_xJeaEndpoint/MSFT_xJeaEndpoint.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xJea/DSCResources/MSFT_xJeaEndpoint/MSFT_xJeaEndpoint.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xJea/DSCResources/MSFT_xJeaToolkit/MSFT_xJeaToolkit.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xJea/DSCResources/MSFT_xJeaToolkit/MSFT_xJeaToolkit.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xJea/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xJea/Util/Initialize-ToolKit.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xJea/Util/SafeProxy.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xJea/xJea.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xJea/xjea.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlDatabase/MSFT_xMySqlDatabase.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlDatabase/MSFT_xMySqlDatabase.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlDatabase/xMySqlDatabaseDesigner.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlGrant/MSFT_xMySqlGrant.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlGrant/MSFT_xMySqlGrant.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlGrant/en-US/MSFT_xMySqlGrant.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlGrant/xMySqlGrantDesigner.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlServer/MSFT_xMySqlServer.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlServer/MSFT_xMySqlServer.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlUser/MSFT_xMySqlUser.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlUser/MSFT_xMySqlUser.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlUser/en-US/MSFT_xMySqlUser.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlUser/xMySqlUserDesigner.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xMySql/DscResources/xMySqlProvision/xMySqlProvision.Schema.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xMySql/DscResources/xMySqlProvision/xMySqlProvision.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xMySql/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xMySql/MSFT_xMySqlUtilities.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xMySql/xMySql.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDNSServerAddress/MSFT_xDNSServerAddress.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDNSServerAddress/MSFT_xDNSServerAddress.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDNSServerAddress/en-US/MSFT_xDNSServerAddress.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDefaultGatewayAddress/MSFT_xDefaultGatewayAddress.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDefaultGatewayAddress/MSFT_xDefaultGatewayAddress.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDefaultGatewayAddress/en-US/MSFT_xDefaultGatewayAddress.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDhcpClient/MSFT_xDhcpClient.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDhcpClient/MSFT_xDhcpClient.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDhcpClient/en-US/MSFT_xDhcpClient.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsClientGlobalSetting/MSFT_xDnsClientGlobalSetting.data.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsClientGlobalSetting/MSFT_xDnsClientGlobalSetting.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsClientGlobalSetting/MSFT_xDnsClientGlobalSetting.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsClientGlobalSetting/en-US/MSFT_xDnsClientGlobalSetting.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsConnectionSuffix/MSFT_xDnsConnectionSuffix.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsConnectionSuffix/MSFT_xDnsConnectionSuffix.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsConnectionSuffix/en-US/MSFT_xDnsConnectionSuffix.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewall/MSFT_xFirewall.Schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewall/MSFT_xFirewall.data.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewall/MSFT_xFirewall.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewall/en-US/MSFT_xFirewall.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewallProfile/MSFT_xFirewallProfile.data.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewallProfile/MSFT_xFirewallProfile.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewallProfile/MSFT_xFirewallProfile.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewallProfile/en-US/MSFT_xFirewallProfile.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xHostsFile/MSFT_xHostsFile.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xHostsFile/MSFT_xHostsFile.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xHostsFile/en-US/MSFT_xHostsFile.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xIPAddress/MSFT_xIPAddress.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xIPAddress/MSFT_xIPAddress.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xIPAddress/en-US/MSFT_xIPAddress.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterBinding/MSFT_xNetAdapterBinding.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterBinding/MSFT_xNetAdapterBinding.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterBinding/en-US/MSFT_xNetAdapterBinding.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterLso/MSFT_xNetAdapterLso.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterLso/MSFT_xNetAdapterLso.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterLso/en-US/MSFT_xNetAdapterLso.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterName/MSFT_xNetAdapterName.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterName/MSFT_xNetAdapterName.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterName/en-us/MSFT_xNetAdapterName.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterRDMA/MSFT_xNetAdapterRDMA.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterRDMA/MSFT_xNetAdapterRDMA.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterRDMA/en-US/MSFT_xNetAdapterRDMA.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetBIOS/MSFT_xNetBIOS.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetBIOS/MSFT_xNetBIOS.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetBIOS/en-US/MSFT_xNetBIOS.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetConnectionProfile/MSFT_xNetConnectionProfile.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetConnectionProfile/MSFT_xNetConnectionProfile.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetConnectionProfile/en-US/MSFT_xNetConnectionProfile.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeam/MSFT_xNetworkTeam.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeam/MSFT_xNetworkTeam.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeam/en-US/MSFT_xNetworkTeam.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeamInterface/MSFT_xNetworkTeamInterface.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeamInterface/MSFT_xNetworkTeamInterface.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeamInterface/en-US/MSFT_xNetworkTeamInterface.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xRoute/MSFT_xRoute.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xRoute/MSFT_xRoute.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xRoute/en-US/MSFT_xRoute.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/Modules/NetworkingDsc.Common/NetworkingDsc.Common.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/Modules/NetworkingDsc.Common/en-us/NetworkingDsc.Common.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/Modules/NetworkingDsc.ResourceHelper/NetworkingDsc.ResourceHelper.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/PSScriptAnalyzerSettings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xNetworking/xNetworking.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCPullServerSetup/PublishModulesAndMofsToPullServer.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/CommonResourceHelper.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xArchive/MSFT_xArchive.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xArchive/MSFT_xArchive.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xArchive/en-US/MSFT_xArchive.schema.mfl delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xArchive/en-US/MSFT_xArchive.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xDSCWebService/MSFT_xDSCWebService.Schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xDSCWebService/MSFT_xDSCWebService.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xDSCWebService/PSWSIISEndpoint.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xDSCWebService/SecureTLSProtocols.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xDSCWebService/UseSecurityBestPractices.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xEnvironmentResource/MSFT_xEnvironmentResource.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xEnvironmentResource/MSFT_xEnvironmentResource.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xEnvironmentResource/en-US/MSFT_xEnvironmentResource.schema.mfl delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xEnvironmentResource/en-US/MSFT_xEnvironmentResource.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xGroupResource/MSFT_xGroupResource.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xGroupResource/MSFT_xGroupResource.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xGroupResource/en-US/MSFT_xGroupResource.schema.mfl delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xGroupResource/en-US/MSFT_xGroupResource.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xMsiPackage/MSFT_xMsiPackage.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xMsiPackage/MSFT_xMsiPackage.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xMsiPackage/en-US/MSFT_xMsiPackage.schema.mfl delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xMsiPackage/en-US/MSFT_xMsiPackage.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPSSessionConfiguration/MSFT_xPSSessionConfiguration.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPSSessionConfiguration/MSFT_xPSSessionConfiguration.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/en-US/MSFT_xPackageResource.schema.mfl delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/en-US/MSFT_xPackageResource.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRegistryResource/MSFT_xRegistryResource.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRegistryResource/MSFT_xRegistryResource.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRegistryResource/en-US/MSFT_xRegistryResource.schema.mfl delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRegistryResource/en-US/MSFT_xRegistryResource.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRemoteFile/MSFT_xRemoteFile.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRemoteFile/MSFT_xRemoteFile.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRemoteFile/en-us/MSFT_xRemoteFile.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xScriptResource/MSFT_xScriptResource.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xScriptResource/MSFT_xScriptResource.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xScriptResource/en-US/MSFT_xScriptResource.schema.mfl delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xScriptResource/en-US/MSFT_xScriptResource.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/MSFT_xServiceResource.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/MSFT_xServiceResource.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/en-US/MSFT_xServiceResource.schema.mfl delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/en-US/MSFT_xServiceResource.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xUserResource/MSFT_xUserResource.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xUserResource/MSFT_xUserResource.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xUserResource/en-US/MSFT_xUserResource.schema.mfl delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xUserResource/en-US/MSFT_xUserResource.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsFeature/MSFT_xWindowsFeature.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsFeature/MSFT_xWindowsFeature.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsFeature/en-US/MSFT_xWindowsFeature.schema.mfl delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsFeature/en-US/MSFT_xWindowsFeature.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsOptionalFeature/MSFT_xWindowsOptionalFeature.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsOptionalFeature/MSFT_xWindowsOptionalFeature.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsOptionalFeature/en-US/MSFT_xWindowsOptionalFeature.schema.mfl delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsOptionalFeature/en-US/MSFT_xWindowsOptionalFeature.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsPackageCab/MSFT_xWindowsPackageCab.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsPackageCab/MSFT_xWindowsPackageCab.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsPackageCab/en-US/MSFT_xWindowsPackageCab.schema.mfl delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsPackageCab/en-US/MSFT_xWindowsPackageCab.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsProcess/MSFT_xWindowsProcess.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsProcess/MSFT_xWindowsProcess.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsProcess/en-US/MSFT_xWindowsProcess.schema.mfl delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsProcess/en-US/MSFT_xWindowsProcess.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/ResourceSetHelper.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xFileUpload/xFileUpload.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xFileUpload/xFileUpload.schema.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xGroupSet/xGroupSet.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xGroupSet/xGroupSet.schema.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xProcessSet/xProcessSet.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xProcessSet/xProcessSet.schema.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xServiceSet/xServiceSet.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xServiceSet/xServiceSet.schema.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xWindowsFeatureSet/xWindowsFeatureSet.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xWindowsFeatureSet/xWindowsFeatureSet.schema.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xWindowsOptionalFeatureSet/xWindowsOptionalFeatureSet.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xWindowsOptionalFeatureSet/xWindowsOptionalFeatureSet.schema.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/ResourceDesignerScripts/GenerateXRemoteFileSchema.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/ResourceDesignerScripts/New-PSSessionConfigurationResource.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/xPSDesiredStateConfiguration.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPendingReboot/DSCResources/MSFT_xPendingReboot/MSFT_xPendingReboot.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPendingReboot/DSCResources/MSFT_xPendingReboot/MSFT_xPendingReboot.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xPendingReboot/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xPendingReboot/xPendingReboot.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPhp/DscResources/xPhpProvision/xPhpProvision.Schema.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPhp/DscResources/xPhpProvision/xPhpProvision.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPhp/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xPhp/xPhp.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xPowerShellExecutionPolicy/DSCResources/MSFT_xPowerShellExecutionPolicy/MSFT_xPowerShellExecutionPolicy.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xPowerShellExecutionPolicy/DSCResources/MSFT_xPowerShellExecutionPolicy/MSFT_xPowerShellExecutionPolicy.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xPowerShellExecutionPolicy/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xPowerShellExecutionPolicy/xPowerShellExecutionPolicy.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xRemoteDesktopAdmin/DSCResources/xRemoteDesktopAdmin/xRemoteDesktopAdmin.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xRemoteDesktopAdmin/DSCResources/xRemoteDesktopAdmin/xRemoteDesktopAdmin.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xRemoteDesktopAdmin/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xRemoteDesktopAdmin/xRemoteDesktopAdmin.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDRemoteApp/MSFT_xRDRemoteApp.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDRemoteApp/MSFT_xRDRemoteApp.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionCollection/MSFT_xRDSessionCollection.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionCollection/MSFT_xRDSessionCollection.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionCollectionConfiguration/MSFT_xRDSessionCollectionConfiguration.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionCollectionConfiguration/MSFT_xRDSessionCollectionConfiguration.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionDeployment/MSFT_xRDSessionDeployment.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionDeployment/MSFT_xRDSessionDeployment.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/xRemoteDesktopSessionHost.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/xRemoteDesktopSessionHostCommon.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xRobocopy/DSCResources/MSFT_xRobocopy/MSFT_xRobocopy.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xRobocopy/DSCResources/MSFT_xRobocopy/MSFT_xRobocopy.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xRobocopy/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xRobocopy/Resources/xDscResourceDesigner_CreateScript.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xRobocopy/xRobocopy.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMConsoleSetup/MSFT_xSCDPMConsoleSetup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMConsoleSetup/MSFT_xSCDPMConsoleSetup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMDatabaseServerSetup/MSFT_xSCDPMDatabaseServerSetup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMDatabaseServerSetup/MSFT_xSCDPMDatabaseServerSetup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMServerSetup/MSFT_xSCDPMServerSetup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMServerSetup/MSFT_xSCDPMServerSetup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCDPM/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xSCDPM/en-US/xPDT.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xSCDPM/xPDT.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCDPM/xSCDPM.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMAdmin/MSFT_xSCOMAdmin.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMAdmin/MSFT_xSCOMAdmin.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMConsoleSetup/MSFT_xSCOMConsoleSetup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMConsoleSetup/MSFT_xSCOMConsoleSetup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMConsoleUpdate/MSFT_xSCOMConsoleUpdate.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMConsoleUpdate/MSFT_xSCOMConsoleUpdate.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementPack/MSFT_xSCOMManagementPack.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementPack/MSFT_xSCOMManagementPack.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementServerSetup/MSFT_xSCOMManagementServerSetup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementServerSetup/MSFT_xSCOMManagementServerSetup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementServerUpdate/MSFT_xSCOMManagementServerUpdate.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementServerUpdate/MSFT_xSCOMManagementServerUpdate.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMReportingServerSetup/MSFT_xSCOMReportingServerSetup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMReportingServerSetup/MSFT_xSCOMReportingServerSetup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMWebConsoleServerSetup/MSFT_xSCOMWebConsoleServerSetup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMWebConsoleServerSetup/MSFT_xSCOMWebConsoleServerSetup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMWebConsoleServerUpdate/MSFT_xSCOMWebConsoleServerUpdate.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMWebConsoleServerUpdate/MSFT_xSCOMWebConsoleServerUpdate.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCOM/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xSCOM/en-US/xPDT.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xSCOM/xPDT.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCOM/xSCOM.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xRunbookDirectory/MSFT_xRunbookDirectory.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xRunbookDirectory/MSFT_xRunbookDirectory.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMAPowerShellSetup/MSFT_xSCSMAPowerShellSetup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMAPowerShellSetup/MSFT_xSCSMAPowerShellSetup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMARunbookWorkerServerSetup/MSFT_xSCSMARunbookWorkerServerSetup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMARunbookWorkerServerSetup/MSFT_xSCSMARunbookWorkerServerSetup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMAWebServiceServerSetup/MSFT_xSCSMAWebServiceServerSetup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMAWebServiceServerSetup/MSFT_xSCSMAWebServiceServerSetup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSmaCredential/MSFT_xSmaCredential.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSmaCredential/MSFT_xSmaCredential.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSmaVariable/MSFT_xSmaVariable.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSmaVariable/MSFT_xSmaVariable.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCSMA/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xSCSMA/en-US/xPDT.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xSCSMA/xPDT.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCSMA/xSCSMA.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServer/MSFT_xSCSPFServer.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServer/MSFT_xSCSPFServer.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServerSetup/MSFT_xSCSPFServerSetup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServerSetup/MSFT_xSCSPFServerSetup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServerUpdate/MSFT_xSCSPFServerUpdate.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServerUpdate/MSFT_xSCSPFServerUpdate.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFSetting/MSFT_xSCSPFSetting.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFSetting/MSFT_xSCSPFSetting.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFStamp/MSFT_xSCSPFStamp.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFStamp/MSFT_xSCSPFStamp.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCSPF/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xSCSPF/en-US/xPDT.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xSCSPF/xPDT.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCSPF/xSCSPF.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xSCSR/DSCResources/MSFT_xSCSRServerSetup/MSFT_xSCSRServerSetup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCSR/DSCResources/MSFT_xSCSRServerSetup/MSFT_xSCSRServerSetup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCSR/DSCResources/MSFT_xSCSRServerUpdate/MSFT_xSCSRServerUpdate.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCSR/DSCResources/MSFT_xSCSRServerUpdate/MSFT_xSCSRServerUpdate.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCSR/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xSCSR/en-US/xPDT.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xSCSR/xPDT.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCSR/xSCSR.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMAdmin/MSFT_xSCVMMAdmin.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMAdmin/MSFT_xSCVMMAdmin.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMConsoleSetup/MSFT_xSCVMMConsoleSetup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMConsoleSetup/MSFT_xSCVMMConsoleSetup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMConsoleUpdate/MSFT_xSCVMMConsoleUpdate.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMConsoleUpdate/MSFT_xSCVMMConsoleUpdate.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMManagementServerSetup/MSFT_xSCVMMManagementServerSetup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMManagementServerSetup/MSFT_xSCVMMManagementServerSetup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMManagementServerUpdate/MSFT_xSCVMMManagementServerUpdate.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMManagementServerUpdate/MSFT_xSCVMMManagementServerUpdate.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSCVMM/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xSCVMM/en-US/xPDT.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xSCVMM/xPDT.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSCVMM/xSCVMM.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLAOGroupEnsure/MSFT_xSQLAOGroupEnsure.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLAOGroupEnsure/MSFT_xSQLAOGroupEnsure.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLAOGroupJoin/MSFT_xSQLAOGroupJoin.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLAOGroupJoin/MSFT_xSQLAOGroupJoin.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlias/MSFT_xSQLServerAlias.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlias/MSFT_xSQLServerAlias.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnAvailabilityGroup/MSFT_xSQLServerAlwaysOnAvailabilityGroup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnAvailabilityGroup/MSFT_xSQLServerAlwaysOnAvailabilityGroup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnAvailabilityGroupReplica/MSFT_xSQLServerAlwaysOnAvailabilityGroupReplica.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnAvailabilityGroupReplica/MSFT_xSQLServerAlwaysOnAvailabilityGroupReplica.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnService/MSFT_xSQLServerAlwaysOnService.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnService/MSFT_xSQLServerAlwaysOnService.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAvailabilityGroupListener/MSFT_xSQLServerAvailabilityGroupListener.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAvailabilityGroupListener/MSFT_xSQLServerAvailabilityGroupListener.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerConfiguration/MSFT_xSQLServerConfiguration.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerConfiguration/MSFT_xSQLServerConfiguration.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabase/MSFT_xSQLServerDatabase.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabase/MSFT_xSQLServerDatabase.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseOwner/MSFT_xSQLServerDatabaseOwner.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseOwner/MSFT_xSQLServerDatabaseOwner.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabasePermission/MSFT_xSQLServerDatabasePermission.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabasePermission/MSFT_xSQLServerDatabasePermission.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseRecoveryModel/MSFT_xSQLServerDatabaseRecoveryModel.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseRecoveryModel/MSFT_xSQLServerDatabaseRecoveryModel.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseRole/MSFT_xSQLServerDatabaseRole.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseRole/MSFT_xSQLServerDatabaseRole.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpoint/MSFT_xSQLServerEndpoint.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpoint/MSFT_xSQLServerEndpoint.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpointPermission/MSFT_xSQLServerEndpointPermission.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpointPermission/MSFT_xSQLServerEndpointPermission.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpointState/MSFT_xSQLServerEndpointState.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpointState/MSFT_xSQLServerEndpointState.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerFailoverClusterSetup/MSFT_xSQLServerFailoverClusterSetup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerFailoverClusterSetup/MSFT_xSQLServerFailoverClusterSetup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerFirewall/MSFT_xSQLServerFirewall.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerFirewall/MSFT_xSQLServerFirewall.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerLogin/MSFT_xSQLServerLogin.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerLogin/MSFT_xSQLServerLogin.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerMaxDop/MSFT_xSQLServerMaxDop.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerMaxDop/MSFT_xSQLServerMaxDop.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerMemory/MSFT_xSQLServerMemory.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerMemory/MSFT_xSQLServerMemory.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerNetwork/MSFT_xSQLServerNetwork.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerNetwork/MSFT_xSQLServerNetwork.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerPermission/MSFT_xSQLServerPermission.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerPermission/MSFT_xSQLServerPermission.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRSConfig/MSFT_xSQLServerRSConfig.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRSConfig/MSFT_xSQLServerRSConfig.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRSSecureConnectionLevel/MSFT_xSQLServerRSSecureConnectionLevel.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRSSecureConnectionLevel/MSFT_xSQLServerRSSecureConnectionLevel.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerReplication/MSFT_xSQLServerReplication.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerReplication/MSFT_xSQLServerReplication.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRole/MSFT_xSQLServerRole.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRole/MSFT_xSQLServerRole.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerScript/MSFT_xSQLServerScript.Schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerScript/MSFT_xSQLServerScript.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerSetup/MSFT_xSQLServerSetup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerSetup/MSFT_xSQLServerSetup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xWaitForAvailabilityGroup/MSFT_xWaitForAvailabilityGroup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xWaitForAvailabilityGroup/MSFT_xWaitForAvailabilityGroup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/en-US/xPDT.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/en-US/xSQLServer.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/xPDT.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/xSQLServer.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xSQLServer/xSQLServerHelper.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSmbShare/DscResources/MSFT_xSmbShare/MSFT_xSmbShare.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSmbShare/DscResources/MSFT_xSmbShare/MSFT_xSmbShare.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSmbShare/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xSmbShare/xSmbShare.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlAlias/MSFT_xSqlAlias.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlAlias/MSFT_xSqlAlias.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAEndPoint/MSFT_xSqlHAEndPoint.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAEndPoint/MSFT_xSqlHAEndPoint.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAGroup/MSFT_xSqlHAGroup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAGroup/MSFT_xSqlHAGroup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAService/MSFT_xSqlHAService.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAService/MSFT_xSqlHAService.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlServerInstall/MSFT_xSqlServerInstall.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlServerInstall/MSFT_xSqlServerInstall.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xWaitForSqlHAGroup/MSFT_xWaitForSqlHAGroup.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xWaitForSqlHAGroup/MSFT_xWaitForSqlHAGroup.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xSqlPs/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xSqlPs/xSqlPs.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDisk/MSFT_xDisk.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDisk/MSFT_xDisk.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDisk/en-us/MSFT_xDisk.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDiskAccessPath/MSFT_xDiskAccessPath.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDiskAccessPath/MSFT_xDiskAccessPath.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDiskAccessPath/en-us/MSFT_xDiskAccessPath.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xMountImage/MSFT_xMountImage.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xMountImage/MSFT_xMountImage.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xMountImage/en-us/MSFT_xMountImage.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForDisk/MSFT_xWaitForDisk.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForDisk/MSFT_xWaitForDisk.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForDisk/en-us/MSFT_xWaitForDisk.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForVolume/MSFT_xWaitForVolume.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForVolume/MSFT_xWaitForVolume.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForVolume/en-us/MSFT_xWaitForVolume.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xStorage/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xStorage/Modules/StorageDsc.Common/StorageDsc.Common.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xStorage/Modules/StorageDsc.Common/en-us/StorageDsc.Common.strings.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xStorage/Modules/StorageDsc.ResourceHelper/StorageDsc.ResourceHelper.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xStorage/xStorage.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xTimeZone/DSCResources/SetTimeZone.cs delete mode 100644 lib/puppet_x/dsc_resources/xTimeZone/DSCResources/TimezoneHelper.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xTimeZone/DSCResources/en-us/TimezoneHelper.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xTimeZone/DSCResources/xTimeZone/en-us/xTimeZone.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xTimeZone/DSCResources/xTimeZone/xTimeZone.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xTimeZone/DSCResources/xTimeZone/xTimeZone.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xTimeZone/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xTimeZone/xTimeZone.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/Helper.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIIsHandler/MSFT_xIisHandler.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIIsHandler/MSFT_xIisHandler.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisFeatureDelegation/MSFT_xIisFeatureDelegation.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisFeatureDelegation/MSFT_xIisFeatureDelegation.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisLogging/MSFT_xIisLogging.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisLogging/MSFT_xIisLogging.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisMimeTypeMapping/MSFT_xIisMimeTypeMapping.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisMimeTypeMapping/MSFT_xIisMimeTypeMapping.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisModule/MSFT_xIisModule.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisModule/MSFT_xIisModule.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisModule/xIisModuleDesigner.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xSSLSettings/MSFT_xSSLSettings.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xSSLSettings/MSFT_xSSLSettings.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebAppPool/MSFT_xWebAppPool.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebAppPool/MSFT_xWebAppPool.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebAppPoolDefaults/MSFT_xWebAppPoolDefaults.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebAppPoolDefaults/MSFT_xWebAppPoolDefaults.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebApplication/MSFT_xWebApplication.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebApplication/MSFT_xWebApplication.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebConfigKeyValue/MSFT_xWebConfigKeyValue.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebConfigKeyValue/MSFT_xWebConfigKeyValue.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebSiteDefaults/MSFT_xWebSiteDefaults.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebSiteDefaults/MSFT_xWebSiteDefaults.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebVirtualDirectory/MSFT_xWebVirtualDirectory.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebVirtualDirectory/MSFT_xWebVirtualDirectory.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebsite/MSFT_xWebsite.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebsite/MSFT_xWebsite.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xWebAdministration/xWebAdministration.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xWebDeploy/DSCResources/xWebDeploy/xWebDeploy.Schema.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWebDeploy/DSCResources/xWebDeploy/xWebDeploy.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xWebDeploy/DSCResources/xWebPackageDeploy/xWebPackageDeploy.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWebDeploy/DSCResources/xWebPackageDeploy/xWebPackageDeploy.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xWebDeploy/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xWebDeploy/xWebDeploy.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xWinEventLog/DSCResources/MSFT_xWinEventLog/MSFT_xWinEventLog.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWinEventLog/DSCResources/MSFT_xWinEventLog/MSFT_xWinEventLog.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xWinEventLog/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xWinEventLog/xWinEventLog.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xWinEventLog/xWinEventLog.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWindowsEventForwarding/DSCResources/MSFT_xWEFCollector/MSFT_xWEFCollector.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWindowsEventForwarding/DSCResources/MSFT_xWEFCollector/MSFT_xWEFCollector.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xWindowsEventForwarding/DSCResources/MSFT_xWEFSubscription/MSFT_xWEFSubscription.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWindowsEventForwarding/DSCResources/MSFT_xWEFSubscription/MSFT_xWEFSubscription.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xWindowsEventForwarding/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xWindowsEventForwarding/xWindowsEventForwarding.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xWindowsRestore/DSCResources/xSystemRestore/xSystemRestore.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWindowsRestore/DSCResources/xSystemRestore/xSystemRestore.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xWindowsRestore/DSCResources/xSystemRestorePoint/xSystemRestorePoint.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWindowsRestore/DSCResources/xSystemRestorePoint/xSystemRestorePoint.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xWindowsRestore/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xWindowsRestore/xWindowsRestore.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xMicrosoftUpdate/MSFT_xMicrosoftUpdate.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xMicrosoftUpdate/MSFT_xMicrosoftUpdate.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xWindowsUpdate/MSFT_xWindowsUpdate.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xWindowsUpdate/MSFT_xWindowsUpdate.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xWindowsUpdateAgent/MSFT_xWindowsUpdateAgent.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xWindowsUpdateAgent/MSFT_xWindowsUpdateAgent.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xWindowsUpdate/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xWindowsUpdate/xWindowsUpdate.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xWordPress/DscResources/MSFT_xWordPressSite/MSFT_xWordPressSite.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWordPress/DscResources/MSFT_xWordPressSite/MSFT_xWordPressSite.schema.mof delete mode 100644 lib/puppet_x/dsc_resources/xWordPress/DscResources/MSFT_xWordPressSite/xWordPressSite.ps1 delete mode 100644 lib/puppet_x/dsc_resources/xWordPress/DscResources/xIisWordPressSite/xIisWordPressSite.Schema.psm1 delete mode 100644 lib/puppet_x/dsc_resources/xWordPress/DscResources/xIisWordPressSite/xIisWordPressSite.psd1 delete mode 100644 lib/puppet_x/dsc_resources/xWordPress/LICENSE delete mode 100644 lib/puppet_x/dsc_resources/xWordPress/xWordPress.psd1 diff --git a/lib/puppet_x/dsc_resources/AuditPolicyDsc/AuditPolicyDsc.psd1 b/lib/puppet_x/dsc_resources/AuditPolicyDsc/AuditPolicyDsc.psd1 deleted file mode 100644 index 7ffd3a74..00000000 --- a/lib/puppet_x/dsc_resources/AuditPolicyDsc/AuditPolicyDsc.psd1 +++ /dev/null @@ -1,122 +0,0 @@ -# -# Module manifest for module 'AuditPolicyDsc' -# -# Generated by: Adam Haynes -# -# Generated on: 12/17/2015 -# - -@{ - -# Script module or binary module file associated with this manifest. -# RootModule = '' - -# Version number of this module. -ModuleVersion = '1.1.0.0' - -# ID used to uniquely identify this module -GUID = '644501e3-ebc7-451e-9155-366a4f8d4a9a' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2016 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'The AuditPolicyDsc module allows you to configure and manage the advanced audit policy on all currently supported versions of Windows.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Name of the Windows PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the Windows PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module -# DotNetFrameworkVersion = '' - -# Minimum version of the common language runtime (CLR) required by this module -# CLRVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -# RequiredModules = @() - -# Assemblies that must be loaded prior to importing this module -# RequiredAssemblies = @() - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -# FormatsToProcess = @() - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -# NestedModules = @() - -# Functions to export from this module -# FunctionsToExport = '*' - -# Cmdlets to export from this module -# CmdletsToExport = '*' - -# Variables to export from this module -# VariablesToExport = '*' - -# Aliases to export from this module -# AliasesToExport = '*' - -# DSC resources to export from this module -# DscResourcesToExport = @() - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @( 'DSC','DesiredStateConfiguration','DSCResourceKit','DSCResource','AuditPolicy' ) - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/AuditPolicyDsc/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/AuditPolicyDsc' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* Added the AuditPolicyCsv resource. - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - -} - diff --git a/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/AuditPolicyResourceHelper/AuditPolicyResourceHelper.psm1 b/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/AuditPolicyResourceHelper/AuditPolicyResourceHelper.psm1 deleted file mode 100644 index c8d5bca5..00000000 --- a/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/AuditPolicyResourceHelper/AuditPolicyResourceHelper.psm1 +++ /dev/null @@ -1,224 +0,0 @@ -#Requires -Version 4.0 - -<# - This PS module contains functions for Desired State Configuration (DSC) AuditPolicyDsc provider. - It enables querying, creation, removal and update of Windows advanced audit policies through - Get, Set, and Test operations on DSC managed nodes. -#> - -<# - .SYNOPSIS - Retrieves the localized string data based on the machine's culture. - Falls back to en-US strings if the machine's culture is not supported. - - .PARAMETER ResourceName - The name of the resource as it appears before '.strings.psd1' of the localized string file. - For example: - AuditPolicySubcategory: MSFT_AuditPolicySubcategory - AuditPolicyOption: MSFT_AuditPolicyOption -#> -function Get-LocalizedData -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true, ParameterSetName = 'resource')] - [ValidateNotNullOrEmpty()] - [String] - $ResourceName, - - [Parameter(Mandatory = $true, ParameterSetName = 'helper')] - [ValidateNotNullOrEmpty()] - [String] - $HelperName - ) - - # With the helper module just update the name and path variables as if it were a resource. - if ($PSCmdlet.ParameterSetName -eq 'helper') - { - $resourceDirectory = $PSScriptRoot - $ResourceName = $HelperName - } - else - { - # Step up one additional level to build the correct path to the resource culture. - $resourceDirectory = Join-Path -Path ( Split-Path $PSScriptRoot -Parent ) ` - -ChildPath $ResourceName - } - - $localizedStringFileLocation = Join-Path -Path $resourceDirectory -ChildPath $PSUICulture - - if (-not (Test-Path -Path $localizedStringFileLocation)) - { - # Fallback to en-US - $localizedStringFileLocation = Join-Path -Path $resourceDirectory -ChildPath 'en-US' - } - - Import-LocalizedData ` - -BindingVariable 'localizedData' ` - -FileName "$ResourceName.strings.psd1" ` - -BaseDirectory $localizedStringFileLocation - - return $localizedData -} - -<# - .SYNOPSIS - Invoke-AuditPol is a private function that wraps auditpol.exe providing a - centralized function to manage access to and the output of auditpol.exe. - .DESCRIPTION - The function will accept a string to pass to auditpol.exe for execution. Any 'get' or - 'set' opertions can be passed to the central wrapper to execute. All of the - nuances of auditpol.exe can be further broken out into specalized functions that - call Invoke-AuditPol. - - Since the call operator is being used to run auditpol, the input is restricted to only execute - against auditpol.exe. Any input that is an invalid flag or parameter in - auditpol.exe will return an error to prevent abuse of the call. - The call operator will not parse the parameters, so they are split in the function. - .PARAMETER Command - The action that audtipol should take on the subcommand. - .PARAMETER SubCommand - The subcommand to execute. - .OUTPUTS - The raw string output of auditpol.exe with the /r switch to return a CSV string. - .EXAMPLE - Invoke-AuditPol -Command 'Get' -SubCommand 'Subcategory:Logon' -#> -function Invoke-AuditPol -{ - [OutputType([System.String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Get', 'Set', 'List','Restore','Backup')] - [System.String] - $Command, - - [Parameter(Mandatory = $true)] - [System.String[]] - $SubCommand - ) - - # Localized messages for Write-Verbose statements in this resource - $localizedData = Get-LocalizedData -HelperName 'AuditPolicyResourceHelper' - <# - The raw auditpol data with the /r switch is a 3 line CSV - 0 - header row - 1 - blank row - 2 - the data row we are interested in - #> - - # set the base commands to execute - if ( $Command -eq 'Get') - { - $commandString = @("/$Command","/$SubCommand","/r" ) - } - else - { - # The set subcommand comes in an array of the subcategory and flag - $commandString = @("/$Command","/$($SubCommand[0])",$SubCommand[1] ) - } - - Write-Debug -Message ( $localizedData.ExecuteAuditpolCommand -f $commandString ) - - try - { - # Use the call operator to process the auditpol command - $auditPolicyCommandResult = & "auditpol.exe" $commandString 2>&1 - - # auditpol does not throw exceptions, so test the results and throw if needed - if ( $LASTEXITCODE -ne 0 ) - { - throw New-Object System.ArgumentException - } - - if ($Command -notmatch "Restore|Backup") - { - return $auditPolicyCommandResult - } - } - catch [System.Management.Automation.CommandNotFoundException] - { - # Catch error if the auditpol command is not found on the system - Write-Error -Message $localizedData.AuditpolNotFound - } - catch [System.ArgumentException] - { - # Catch the error thrown if the lastexitcode is not 0 - [String] $errorString = $error[0].Exception - $errorString = $errorString + "`$LASTEXITCODE = $LASTEXITCODE;" - $errorString = $errorString + " Command = auditpol $commandString" - - Write-Error -Message $errorString - } - catch - { - # Catch any other errors - Write-Error -Message ( $localizedData.UnknownError -f $error[0] ) - } -} - -<# - .SYNOPSIS - Returns the list of valid Subcategories. - .DESCRIPTION - This funciton will check if the list of valid subcategories has already been created. - If the list exists it will simply return it. If it doe not exists, it will generate - it and return it. -#> -function Get-ValidSubcategoryList -{ - [OutputType([String[]])] - [CmdletBinding()] - param () - - if ($null -eq $script:validSubcategoryList) - { - $script:validSubcategoryList = @() - - # Populating $validSubcategoryList uses Invoke-AuditPol and needs to follow the definition. - Invoke-AuditPol -Command List -SubCommand "Subcategory:*" | - Where-Object { $_ -notlike 'Category/Subcategory*' } | - ForEach-Object { - # The categories do not have any space in front of them, but the subcategories do. - if ( $_ -like " *" ) - { - $script:validSubcategoryList += $_.trim() - } - } - } - - return $script:validSubcategoryList -} - -<# - .SYNOPSIS - Verifies that the Subcategory is valid. - .PARAMETER Name - The name of the Subcategory to validate. -#> -function Test-ValidSubcategory -{ - [OutputType([Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] - $Name - ) - - if ( ( Get-ValidSubcategoryList ) -icontains $Name ) - { - return $true - } - else - { - return $false - } -} - -Export-ModuleMember -Function @( 'Invoke-AuditPol', 'Get-LocalizedData', - 'Test-ValidSubcategory' ) diff --git a/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/AuditPolicyResourceHelper/en-US/AuditPolicyResourceHelper.strings.psd1 b/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/AuditPolicyResourceHelper/en-US/AuditPolicyResourceHelper.strings.psd1 deleted file mode 100644 index 591d5bf2..00000000 --- a/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/AuditPolicyResourceHelper/en-US/AuditPolicyResourceHelper.strings.psd1 +++ /dev/null @@ -1,8 +0,0 @@ -ConvertFrom-StringData -StringData @' - AuditpolNotFound = (ERROR) auditpol.exe was not found on the system - RequiredPrivilegeMissing = (ERROR) A required privilege is not held by the client - IncorrectParameter = (ERROR) The parameter is incorrect - UnknownError = (ERROR) An unknown error has occured: {0} - ExecuteAuditpolCommand = Executing 'auditpol.exe {0}' -'@ - diff --git a/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyCsv/MSFT_AuditPolicyCsv.psm1 b/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyCsv/MSFT_AuditPolicyCsv.psm1 deleted file mode 100644 index 9e07d095..00000000 --- a/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyCsv/MSFT_AuditPolicyCsv.psm1 +++ /dev/null @@ -1,256 +0,0 @@ - -Import-Module -Name (Join-Path -Path ( Join-Path -Path ( Split-Path $PSScriptRoot -Parent ) ` - -ChildPath 'AuditPolicyResourceHelper' ) ` - -ChildPath 'AuditPolicyResourceHelper.psm1') - -# Localized messages for Write-Verbose statements in this resource -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_AuditPolicyCsv' - -<# - .SYNOPSIS - Gets the current audit policy for the node. - .PARAMETER CsvPath - This parameter is ignored in the Get operation, but does return the path to the - backup of the current audit policy settings. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [String] - $IsSingleInstance, - - [parameter(Mandatory = $true)] - [System.String] - $CsvPath - ) - - [string] $tempFile = ([system.IO.Path]::GetTempFileName()).Replace('.tmp','.csv') - - try - { - Write-Verbose -Message ($localizedData.BackupFilePath -f $tempFile) - Invoke-SecurityCmdlet -Action "Export" -CsvPath $tempFile - } - catch - { - Write-Verbose -Message ($localizedData.ExportFailed -f $tempFile) - } - - return @{ - CsvPath = $tempFile - IsSingleInstance = 'Yes' - } -} - -<# - .SYNOPSIS - Sets the current audit policy for the node. - .PARAMETER CsvPath - Specifies the path to desired audit policy settings to apply to the node. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [String] - $IsSingleInstance, - - [parameter(Mandatory = $true)] - [System.String] - $CsvPath - ) - - if (Test-Path -Path $CsvPath) - { - try - { - Invoke-SecurityCmdlet -Action "Import" -CsvPath $CsvPath | Out-Null - Write-Verbose -Message ($localizedData.ImportSucceeded -f $CsvPath) - } - catch - { - Write-Verbose -Message ($localizedData.ImportFailed -f $CsvPath) - } - } - else - { - Write-Verbose -Message ($localizedData.FileNotFound -f $CsvPath) - } -} - -<# - .SYNOPSIS - Tests the current audit policy against the desired policy. - .PARAMETER CsvPath - Specifies the path to desired audit policy settings to test against the node. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [String] - $IsSingleInstance, - - [parameter(Mandatory = $true)] - [System.String] - $CsvPath - ) - - if (Test-Path -Path $CsvPath) - { - # The CsvPath in Get-TargetResource is ignored and a temp file is returned for comparison. - $currentAuditPolicyBackupPath = (Get-TargetResource -CsvPath $CsvPath ` - -IsSingleInstance $IsSingleInstance).CsvPath - - $currentAuditPolicy = Import-Csv -Path $currentAuditPolicyBackupPath | - Select-Object -Property Subcategory, @{ - 'Name' = 'Value'; - 'Expression' = {$_.'Setting Value'} - } - - $desiredAuditPolicy = Import-Csv -Path $CsvPath | - Select-Object -Property Subcategory, @{ - 'Name' = 'Value'; - 'Expression' = {$_.'Setting Value'} - } - - # Assume the node is in the desired state until proven false. - $inDesiredState = $true - - foreach ($desiredAuditPolicySetting in $desiredAuditPolicy) - { - # Get the current setting name that mathches the desired setting name - $currentAuditPolicySetting = $currentAuditPolicy.Where({ - $_.Subcategory -eq $desiredAuditPolicySetting.Subcategory - }) - - # If the current and desired setting do not match, set the flag to $false - if ($desiredAuditPolicySetting.Value -ne $currentAuditPolicySetting.Value) - { - Write-Verbose -Message ($localizedData.testCsvFailed -f - $desiredAuditPolicySetting.Subcategory) - - $inDesiredState = $false - } - else - { - Write-Verbose -Message ($localizedData.testCsvSucceed -f - $desiredAuditPolicySetting.Subcategory) - } - } - - # Cleanup the temp file, since it is no longer needed. - Remove-BackupFile -CsvPath $currentAuditPolicyBackupPath -Verbose - - return $inDesiredState - } - else - { - Write-Verbose -Message ($localizedData.FileNotFound -f $CsvPath) - return $false - } -} - -<# - .SYNOPSIS - Helper function to use SecurityCmdlet modules if present. If not, go through AuditPol.exe. - .PARAMETER Action - The action to take, either Import or Export. Import will clear existing policy before writing. - .PARAMETER CsvPath - The path to a CSV file to either create or import. - .EXAMPLE - Invoke-SecurityCmdlet -Action Import -CsvPath .\test.csv -#> -function Invoke-SecurityCmdlet -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet('Import','Export')] - [System.String] - $Action, - - [Parameter(Mandatory = $true)] - [System.String] - $CsvPath - ) - - # Use the security cmdlets if present. If not, use Invoke-AuditPol to call auditpol.exe. - if ($null -eq (Get-Module -ListAvailable -Name "SecurityCmdlets")) - { - Write-Verbose -Message ($localizedData.CmdletsNotFound) - - if ($Action -ieq "Import") - { - Invoke-AuditPol -Command Restore -SubCommand "file:$CsvPath" - } - else - { - # No force option on Backup, manually check for file and delete it so we can write back again - if (Test-Path -Path $CsvPath) - { - Remove-Item -Path $CsvPath -Force - } - - Invoke-AuditPol -Command Backup -SubCommand "file:$CsvPath" - } - } - else - { - Import-Module -Name SecurityCmdlets - - if ($Action -ieq "Import") - { - Restore-AuditPolicy -Path $CsvPath | Out-Null - } - elseif ($Action -ieq "Export") - { - # No force option on Backup, manually check for file and delete it so we can write back again - if (Test-Path -Path $CsvPath) - { - Remove-Item -Path $CsvPath -Force - } - Backup-AuditPolicy -Path $CsvPath | Out-Null - } - } -} - -<# - .SYNOPSIS - Removes the temporary file that is created by the Get\Test functions. - .PARAMETER CsvPath - Specifies the path of the temp file to remove. -#> -function Remove-BackupFile -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $CsvPath - ) - - try - { - Remove-Item -Path $CsvPath - Write-Verbose -Message ($localizedData.RemoveFile -f $CsvPath) - } - catch - { - Write-Error $error[0] - } -} diff --git a/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyCsv/MSFT_AuditPolicyCsv.schema.mof b/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyCsv/MSFT_AuditPolicyCsv.schema.mof deleted file mode 100644 index e0a63b54..00000000 --- a/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyCsv/MSFT_AuditPolicyCsv.schema.mof +++ /dev/null @@ -1,6 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("AuditPolicyCsv")] -class MSFT_AuditPolicyCsv : OMI_BaseResource -{ - [Key, Description("Specifies the resource is a single instance, the value must be 'Yes'"), ValueMap{"Yes"}, Values{"Yes"}] String IsSingleInstance; - [Required, Description("Path to a CSV backup of Auditing settings")] String CsvPath; -}; diff --git a/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyCsv/en-US/MSFT_AuditPolicyCsv.strings.psd1 b/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyCsv/en-US/MSFT_AuditPolicyCsv.strings.psd1 deleted file mode 100644 index 9cf08dc1..00000000 --- a/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyCsv/en-US/MSFT_AuditPolicyCsv.strings.psd1 +++ /dev/null @@ -1,12 +0,0 @@ -ConvertFrom-StringData -StringData @' - BackupFilePath = Exporting to {0} - ExportFailed = Failed export to {0} - ImportFailed = Failed import of {0} - ExportSucceeded = Succeeded export to {0} - ImportSucceeded = Succeeded import of {0} - testCsvFailed = {0} not in desired state - testCsvSucceed = {0} in desired state - FileNotFound = {0} not found - RemoveFile = Removing {0} - CmdletsNotFound = Security cmdlets not found, switching to auditpol.exe -'@ diff --git a/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyOption/MSFT_AuditPolicyOption.psm1 b/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyOption/MSFT_AuditPolicyOption.psm1 deleted file mode 100644 index 4a8c7f8a..00000000 --- a/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyOption/MSFT_AuditPolicyOption.psm1 +++ /dev/null @@ -1,205 +0,0 @@ - -Import-Module -Name (Join-Path -Path ( Split-Path $PSScriptRoot -Parent ) ` - -ChildPath 'AuditPolicyResourceHelper\AuditPolicyResourceHelper.psm1') ` - -Force - -# Localized messages for Write-Verbose statements in this resource -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_AuditPolicyOption' - -<# - .SYNOPSIS - Gets the value of the audit policy option. - .PARAMETER Name - Specifies the option to get. - .PARAMETER Value - Not used in Get-TargetResource. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('CrashOnAuditFail', 'FullPrivilegeAuditing', 'AuditBaseObjects', - 'AuditBaseDirectories')] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateSet('Enabled', 'Disabled')] - [System.String] - $Value - ) - - # Get the option's current value - $optionValue = Get-AuditOption -Name $Name - - Write-Verbose -Message ( $localizedData.GetAuditpolOptionSucceed -f $Name ) - - return @{ - Name = $Name - Value = $optionValue - } -} - -<# - .SYNOPSIS - Sets the value of the audit policy option. - .PARAMETER Name - Specifies the option to set. - .PARAMETER Value - Specifies the value to set the option to. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('CrashOnAuditFail', 'FullPrivilegeAuditing', 'AuditBaseObjects', - 'AuditBaseDirectories')] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateSet('Enabled', 'Disabled')] - [System.String] - $Value - ) - - try - { - Set-AuditOption -Name $Name -Value $Value - Write-Verbose -Message ( $localizedData.SetAuditpolOptionSucceed -f $Name, $Value ) - } - catch - { - Write-Verbose -Message ( $localizedData.SetAuditpolOptionFailed -f $Name, $Value ) - } -} - -<# - .SYNOPSIS - Tests that the audit policy option is in the desired state - .PARAMETER Name - Specifies the option to test. - .PARAMETER Value - Specifies the value to test against the option. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('CrashOnAuditFail', 'FullPrivilegeAuditing', 'AuditBaseObjects', - 'AuditBaseDirectories')] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateSet('Enabled', 'Disabled')] - [System.String] - $Value - ) - - if ( ( Get-AuditOption -Name $Name ) -eq $Value ) - { - Write-Verbose -Message ( $localizedData.TestAuditpolOptionCorrect -f $Name, $value ) - return $true - } - else - { - Write-Verbose -Message ( $localizedData.TestAuditpolOptionIncorrect -f $Name, $value ) - return $false - } -} - -#--------------------------------------------------------------------------------------------------- -# Support functions to handle auditpol I/O - -<# - .SYNOPSIS - Gets the audit policy option state. - .DESCRIPTION - Ths is one of the public functions that calls into Get-AuditOptionCommand. - This function enforces parameters that will be passed through to the - Get-AuditOptionCommand function and aligns to a specifc parameterset. - .PARAMETER Option - The name of an audit option. - .OUTPUTS - A string that is the state of the option (Enabled|Disables). -#> -function Get-AuditOption -{ - [CmdletBinding()] - [OutputType([System.String])] - param - ( - [Parameter(Mandatory=$true)] - [System.String] - $Name - ) - <# - When PowerShell cmdlets are released for individual audit policy settings a condition - will be placed here to use native PowerShell cmdlets to set the option details. - #> - # get the auditpol raw csv output - $returnCsv = Invoke-AuditPol -Command "Get" -SubCommand "Option:$Name" - - # split the details into an array - $optionDetails = ( $returnCsv[2] ) -Split ',' - - # return the option value - return $optionDetails[4] -} - -<# - .SYNOPSIS - Sets an audit policy option to enabled or disabled. - .DESCRIPTION - This public function calls Set-AuditOptionCommand and enforces parameters - that will be passed to Set-AuditOptionCommand and aligns to a specifc parameterset. - .PARAMETER Name - The specific option to set. - .PARAMETER Value - The value to set the provided option to. -#> -function Set-AuditOption -{ - [CmdletBinding(SupportsShouldProcess=$true)] - param - ( - [Parameter(Mandatory=$true)] - [System.String] - $Name, - - [Parameter(Mandatory=$true)] - [System.String] - $Value - ) - - <# - When PowerShell cmdlets are released for individual audit policy settings a condition - will be placed here to use native PowerShell cmdlets to set the option details. - #> - if ( $pscmdlet.ShouldProcess( "$Name","Set $Value" ) ) - { - <# - The output text of auditpol is in simple past tense, but the input is in simple - present tense, so the hashtable converts the input accordingly. - #> - $pastToPresentValues = @{ - 'Enabled' = 'enable' - 'Disabled' = 'disable' - } - - [String[]] $subCommand = @( "Option:$Name", "/value:$($pastToPresentValues[$value])" ) - - Invoke-AuditPol -Command 'Set' -SubCommand $subCommand | Out-Null - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyOption/MSFT_AuditPolicyOption.schema.mof b/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyOption/MSFT_AuditPolicyOption.schema.mof deleted file mode 100644 index 1bc5308d..00000000 --- a/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyOption/MSFT_AuditPolicyOption.schema.mof +++ /dev/null @@ -1,7 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("AuditPolicyOption")] -class MSFT_AuditPolicyOption : OMI_BaseResource -{ - [Key, Description("The name of the audit policy option to set."), ValueMap{"CrashOnAuditFail","FullPrivilegeAuditing","AuditBaseObjects","AuditBaseDirectories"}, Values{"CrashOnAuditFail","FullPrivilegeAuditing","AuditBaseObjects","AuditBaseDirectories"}] String Name; - [Key, Description("The value to set the audit policy option to."), ValueMap{"Enabled","Disabled"}, Values{"Enabled","Disabled"}] String Value; -}; diff --git a/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyOption/en-US/MSFT_AuditPolicyOption.strings.psd1 b/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyOption/en-US/MSFT_AuditPolicyOption.strings.psd1 deleted file mode 100644 index 9d0ab522..00000000 --- a/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicyOption/en-US/MSFT_AuditPolicyOption.strings.psd1 +++ /dev/null @@ -1,9 +0,0 @@ -ConvertFrom-StringData -StringData @' - GetAuditpolOptionSucceed = (GET) '{0}' - GetAuditpolOptionFailed = (ERROR) getting '{0}' - SetAuditpolOptionSucceed = (SET) '{0}' to '{1}' - SetAuditpolOptionFailed = (ERROR) setting '{0}' to value '{1}' - TestAuditpolOptionCorrect = '{0}' is '{1}' - TestAuditpolOptionIncorrect = '{0}' is NOT '{1}' -'@ - diff --git a/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicySubcategory/MSFT_AuditPolicySubcategory.psm1 b/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicySubcategory/MSFT_AuditPolicySubcategory.psm1 deleted file mode 100644 index f9320374..00000000 --- a/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicySubcategory/MSFT_AuditPolicySubcategory.psm1 +++ /dev/null @@ -1,286 +0,0 @@ - -Import-Module -Name (Join-Path -Path ( Split-Path $PSScriptRoot -Parent ) ` - -ChildPath 'AuditPolicyResourceHelper\AuditPolicyResourceHelper.psm1') ` - -Force - -# Localized messages for Write-Verbose statements in this resource -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_AuditPolicySubcategory' - -<# - .SYNOPSIS - Returns the current audit flag for the given subcategory. - .PARAMETER Name - Specifies the subcategory to retrieve. - .PARAMETER AuditFlag - Specifies the audit flag to retrieve. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateSet('Success', 'Failure')] - [System.String] - $AuditFlag - ) - - try - { - $currentAuditFlag = Get-AuditSubCategory -Name $Name - Write-Verbose -Message ( $localizedData.GetAuditpolSubcategorySucceed -f $Name, $AuditFlag ) - } - catch - { - Write-Verbose -Message ( $localizedData.GetAuditPolSubcategoryFailed -f $Name, $AuditFlag ) - } - - <# - The auditType property returned from Get-AuditSubCategory can be 'None','Success', - 'Failure', or 'Success and Failure'. Using the match operator will return the correct - state if both are set. - #> - if ( $currentAuditFlag -match $AuditFlag ) - { - $currentAuditFlag = $AuditFlag - $ensure = 'Present' - } - else - { - $ensure = 'Absent' - } - - return @{ - Name = $Name - AuditFlag = $currentAuditFlag - Ensure = $ensure - } -} - -<# - .SYNOPSIS - Sets the audit flag for the given subcategory. - .PARAMETER Name - Specifies the subcategory to set. - .PARAMETER AuditFlag - Specifies the audit flag to set. - .PARAMETER Ensure - Specifies the state of the audit flag provided. By default this is set to Present. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateSet('Success', 'Failure')] - [System.String] - $AuditFlag, - - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present' - ) - - if ( -Not ( Test-ValidSubcategory -Name $Name ) ) - { - Throw ( $localizedData.InvalidSubcategory -f $Name ) - } - - try - { - Set-AuditSubcategory -Name $Name -AuditFlag $AuditFlag -Ensure $Ensure - Write-Verbose -Message ( $localizedData.SetAuditpolSubcategorySucceed ` - -f $Name, $AuditFlag, $Ensure ) - } - catch - { - Write-Verbose -Message ( $localizedData.SetAuditpolSubcategoryFailed ` - -f $Name, $AuditFlag, $Ensure ) - } -} - -<# - .SYNOPSIS - Tests the audit flag state for the given subcategory. - .PARAMETER Name - Specifies the subcategory to test. - .PARAMETER AuditFlag - Specifies the audit flag to test. - .PARAMETER Ensure - Specifies the state of the audit flag should be in. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateSet('Success', 'Failure')] - [System.String] - $AuditFlag, - - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure - ) - - [System.Boolean] $isInDesiredState = $false - - if ( -Not ( Test-ValidSubcategory -Name $Name ) ) - { - Throw ( $localizedData.InvalidSubcategory -f $Name ) - } - - try - { - [String] $currentAuditFlag = Get-AuditSubCategory -Name $Name - Write-Verbose -Message ( $localizedData.GetAuditpolSubcategorySucceed -f $Name, $AuditFlag ) - } - catch - { - Write-Verbose -Message ( $localizedData.GetAuditPolSubcategoryFailed -f $Name, $AuditFlag ) - } - - # If the setting should be present look for a match, otherwise look for a notmatch - if ( $Ensure -eq 'Present' ) - { - $isInDesiredState = $currentAuditFlag -match $AuditFlag - } - else - { - $isInDesiredState = $currentAuditFlag -notmatch $AuditFlag - } - - <# - The audit type can be true in either a match or non-match state. If the audit type - matches the ensure property return the setting correct message, else return the - setting incorrect message - #> - if ( $isInDesiredState ) - { - Write-Verbose -Message ( $localizedData.TestAuditpolSubcategoryCorrect ` - -f $Name, $AuditFlag, $Ensure ) - } - else - { - Write-Verbose -Message ( $localizedData.TestAuditpolSubcategoryIncorrect ` - -f $Name, $AuditFlag, $Ensure ) - } - - $isInDesiredState -} - -#--------------------------------------------------------------------------------------------------- -# Support functions to handle auditpol I/O - -<# - .SYNOPSIS - Gets the audit flag state for a specifc subcategory. - .DESCRIPTION - This function enforces parameters that will be passed to Invoke-Auditpol. - .PARAMETER Name - The name of the subcategory to get the audit flags from. - .OUTPUTS - A string with the flags that are set for the specificed subcategory - .EXAMPLE - Get-AuditSubCategory -Name 'Logon' -#> -function Get-AuditSubCategory -{ - [CmdletBinding()] - [OutputType([System.String])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Name - ) - <# - When PowerShell cmdlets are released for individual audit policy settings a condition - will be placed here to use native PowerShell cmdlets to set the option details. - #> - # get the auditpol raw csv output - $returnCsv = Invoke-AuditPol -Command 'Get' -SubCommand "Subcategory:""$Name""" - - # split the details into an array - $subcategoryFlags = ( $returnCsv[2] ) -Split ',' - - # remove the spaces from 'Success and Failure' to prevent any wierd string problems later - return $subcategoryFlags[4] -replace ' ','' -} - -<# - .SYNOPSIS - Sets the audit flag state for a specifc subcategory. - .DESCRIPTION - Calls the private function to execute a set operation on the given subcategory - .PARAMETER Name - The name of the audit subcategory to set - .PARAMETER AuditFlag - The specifc flag to set (Success|Failure) - .PARAMETER Ensure - The action to take on the flag - .EXAMPLE - Set-AuditSubcategory -Name 'Logon' -AuditFlag 'Success' -Ensure 'Present' -#> -function Set-AuditSubcategory -{ - [CmdletBinding( SupportsShouldProcess=$true )] - param - ( - [Parameter( Mandatory = $true )] - [System.String] - $Name, - - [Parameter( Mandatory = $true )] - [ValidateSet( 'Success','Failure' )] - [System.String] - $AuditFlag, - - [Parameter( Mandatory = $true )] - [System.String] - $Ensure - ) - - <# - When PowerShell cmdlets are released for individual audit policy settings a condition - will be placed here to use native PowerShell cmdlets to set the option details. - #> - if ( $pscmdlet.ShouldProcess( "$Name","Set AuditFlag '$AuditFlag'" ) ) - { - # translate $ensure=present to enable and $ensure=absent to disable - $auditState = @{ - 'Present' = 'enable' - 'Absent' = 'disable' - } - - # Create the line needed for auditpol to set the category flag - if ( $AuditFlag -eq 'Success' ) - { - [String[]] $subcommand = @( "Subcategory:""$Name""", "/success:$($auditState[$Ensure])" ) - } - else - { - [String[]] $subcommand = @( "Subcategory:""$Name""", "/failure:$($auditState[$Ensure])" ) - } - - Invoke-AuditPol -Command 'Set' -subCommand $subcommand | Out-Null - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicySubcategory/MSFT_AuditPolicySubcategory.schema.mof b/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicySubcategory/MSFT_AuditPolicySubcategory.schema.mof deleted file mode 100644 index 1fd8023c..00000000 --- a/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicySubcategory/MSFT_AuditPolicySubcategory.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("AuditPolicySubcategory")] -class MSFT_AuditPolicySubcategory : OMI_BaseResource -{ - [Key, Description("The name of the Subcategory to be configured.")] String Name; - [Key, Description("The audit flag to be configured."), ValueMap{"Success","Failure"}, Values{"Success","Failure"}] String AuditFlag; - [Write, Description("Specifies whether the flag should be enabled or disabled. To enable the flag, set this property to Present. To disable the flag, set this property to Absent."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; - diff --git a/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicySubcategory/en-US/MSFT_AuditPolicySubcategory.strings.psd1 b/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicySubcategory/en-US/MSFT_AuditPolicySubcategory.strings.psd1 deleted file mode 100644 index fa02dc21..00000000 --- a/lib/puppet_x/dsc_resources/AuditPolicyDsc/DSCResources/MSFT_AuditPolicySubcategory/en-US/MSFT_AuditPolicySubcategory.strings.psd1 +++ /dev/null @@ -1,10 +0,0 @@ -ConvertFrom-StringData -StringData @' - InvalidSubcategory = {0} is not a valid Subcategory - GetAuditpolSubcategorySucceed = (GET) '{0}':'{1}' - GetAuditPolSubcategoryFailed = (ERROR) getting '{0}':'{1}' - SetAuditpolSubcategorySucceed = (SET) '{0}' audit '{1}' to '{2}' - SetAuditpolSubcategoryFailed = (ERROR) setting '{0}' audit '{1}' to '{2}' - TestAuditpolSubcategoryCorrect = '{0}':'{1}' is '{2}' - TestAuditpolSubcategoryIncorrect = '{0}':'{1}' is NOT '{2}' -'@ - diff --git a/lib/puppet_x/dsc_resources/AuditPolicyDsc/LICENSE b/lib/puppet_x/dsc_resources/AuditPolicyDsc/LICENSE deleted file mode 100644 index fbcfe007..00000000 --- a/lib/puppet_x/dsc_resources/AuditPolicyDsc/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerFarm/MSFT_OfficeOnlineServerFarm.psm1 b/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerFarm/MSFT_OfficeOnlineServerFarm.psm1 deleted file mode 100644 index 1f5638df..00000000 --- a/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerFarm/MSFT_OfficeOnlineServerFarm.psm1 +++ /dev/null @@ -1,702 +0,0 @@ -$script:v16onlyParams = @("AllowOutboundHttp", "S2SCertificateName", "OnlinePictureEnabled", ` - "OnlineVideoEnabled", "OfficeAddinEnabled", ` - "ExcelUseEffectiveUserName", "ExcelUdfsAllowed", ` - "ExcelMemoryCacheThreshold", "ExcelUnusedObjectAgeMax", ` - "ExcelCachingUnusedFiles", "ExcelAbortOnRefreshOnOpenFail", ` - "ExcelAutomaticVolatileFunctionCacheLifeTime", ` - "ExcelConcurrentDataRequestsPerSessionMax", ` - "ExcelDefaultWorkbookCalcMode", "ExcelRestExternalDataEnabled", ` - "ExcelChartAndImageSizeMax") - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [System.Boolean] - $AllowCEIP, - - [System.Boolean] - $AllowHttp, - - [System.Boolean] - $AllowHttpSecureStoreConnections, - - [System.String] - $CacheLocation, - - [System.Int32] - $CacheSizeInGB, - - [System.String] - $CertificateName, - - [System.Boolean] - $ClipartEnabled, - - [System.Int32] - $DocumentInfoCacheSize, - - [System.Boolean] - $EditingEnabled, - - [System.Boolean] - $ExcelAllowExternalData, - - [System.Int32] - $ExcelConnectionLifetime, - - [System.Int32] - $ExcelExternalDataCacheLifetime, - - [System.Int32] - $ExcelPrivateBytesMax, - - [System.Int32] - $ExcelRequestDurationMax, - - [System.Int32] - $ExcelSessionTimeout, - - [System.Boolean] - $ExcelUdfsAllowed, - - [System.Boolean] - $ExcelWarnOnDataRefresh, - - [System.Int32] - $ExcelWorkbookSizeMax, - - [System.Int32] - $ExcelMemoryCacheThreshold, - - [System.Int32] - $ExcelUnusedObjectAgeMax, - - [System.Boolean] - $ExcelCachingUnusedFiles, - - [System.Boolean] - $ExcelAbortOnRefreshOnOpenFail, - - [System.Int32] - $ExcelAutomaticVolatileFunctionCacheLifetime, - - [System.Int32] - $ExcelConcurrentDataRequestsPerSessionMax, - - [System.String] - $ExcelDefaultWorkbookCalcMode, - - [System.Boolean] - $ExcelRestExternalDataEnabled, - - [System.Int32] - $ExcelChartAndImageSizeMax, - - [System.String] - $ExternalURL, - - [System.String] - $FarmOU, - - [parameter(Mandatory = $true)] - [System.String] - $InternalURL, - - [System.String] - $LogLocation, - - [System.Int32] - $LogRetentionInDays, - - [System.String] - $LogVerbosity, - - [System.Int32] - $MaxMemoryCacheSizeInMB, - - [System.Int32] - $MaxTranslationCharacterCount, - - [System.Boolean] - $OpenFromUncEnabled, - - [System.Boolean] - $OpenFromUrlEnabled, - - [System.Boolean] - $OpenFromUrlThrottlingEnabled, - - [System.String] - $Proxy, - - [System.Int32] - $RecycleActiveProcessCount, - - [System.String] - $RenderingLocalCacheLocation, - - [System.Boolean] - $SSLOffloaded, - - [System.Boolean] - $TranslationEnabled, - - [System.String] - $TranslationServiceAddress, - - [System.String] - $TranslationServiceAppId, - - [System.Boolean] - $AllowOutboundHttp, - - [System.Boolean] - $ExcelUseEffectiveUserName, - - [System.String] - $S2SCertificateName, - - [System.Boolean] - $RemovePersonalInformationFromLogs, - - [System.Boolean] - $PicturePasteDisabled - ) - - Test-OosDscV16Support -Parameters $PSBoundParameters - - try - { - $officeWebAppsFarm = Get-OfficeWebAppsFarm -ErrorAction Stop - } - catch - { - Write-Verbose -Message $_ - } - - $returnValue = @{ - AllowCEIP = $officeWebAppsFarm.AllowCEIP - AllowHttp = $officeWebAppsFarm.AllowHTTP - AllowHttpSecureStoreConnections = $officeWebAppsFarm.AllowHttpSecureStoreConnections - CacheLocation = $officeWebAppsFarm.CacheLocation - CacheSizeInGB = $officeWebAppsFarm.CacheSizeInGB - CertificateName = $officeWebAppsFarm.CertificateName - ClipartEnabled = $officeWebAppsFarm.ClipartEnabled - DocumentInfoCacheSize = $officeWebAppsFarm.DocumentInfoCacheSize - EditingEnabled = $officeWebAppsFarm.EditingEnabled - ExcelAllowExternalData = $officeWebAppsFarm.ExcelAllowExternalData - ExcelConnectionLifetime = $officeWebAppsFarm.ExcelConnectionLifetime - ExcelExternalDataCacheLifetime = $officeWebAppsFarm.ExcelExternalDataCacheLifetime - ExcelPrivateBytesMax = $officeWebAppsFarm.ExcelPrivateBytesMax - ExcelRequestDurationMax = $officeWebAppsFarm.ExcelRequestDurationMax - ExcelSessionTimeout = $officeWebAppsFarm.ExcelSessionTimeout - ExcelUdfsAllowed = $officeWebAppsFarm.ExcelUdfsAllowed - ExcelWarnOnDataRefresh = $officeWebAppsFarm.ExcelWarnOnDataRefresh - ExcelWorkbookSizeMax = $officeWebAppsFarm.ExcelWorkbookSizeMax - ExcelMemoryCacheThreshold = $officeWebAppsFarm.ExcelMemoryCacheThreshold - ExcelUnusedObjectAgeMax = $officeWebAppsFarm.ExcelUnusedObjectAgeMax - ExcelCachingUnusedFiles = $officeWebAppsFarm.ExcelCachingUnusedFiles - ExcelAbortOnRefreshOnOpenFail = $officeWebAppsFarm.ExcelAbortOnRefreshOnOpenFail - ExcelAutomaticVolatileFunctionCacheLifetime = $officeWebAppsFarm.ExcelAutomaticVolatileFunctionCacheLifeTime - ExcelConcurrentDataRequestsPerSessionMax = $officeWebAppsFarm.ExcelConcurrentDataRequestsPerSessionMax - ExcelDefaultWorkbookCalcMode = $officeWebAppsFarm.ExcelDefaultWorkbookCalcMode - ExcelRestExternalDataEnabled = $officeWebAppsFarm.ExcelRestExternalDataEnabled - ExcelChartAndImageSizeMax = $officeWebAppsFarm.ExcelChartAndImageSizeMax - ExternalURL = $officeWebAppsFarm.ExternalURL - FarmOU = $officeWebAppsFarm.FarmOU - InternalURL = $officeWebAppsFarm.InternalURL - LogLocation = $officeWebAppsFarm.LogLocation - LogRetentionInDays = $officeWebAppsFarm.LogRetentionInDays - LogVerbosity = $officeWebAppsFarm.LogVerbosity - MaxMemoryCacheSizeInMB = $officeWebAppsFarm.MaxMemoryCacheSizeInMB - MaxTranslationCharacterCount = $officeWebAppsFarm.MaxTranslationCharacterCount - OpenFromUncEnabled = $officeWebAppsFarm.OpenFromUncEnabled - OpenFromUrlEnabled = $officeWebAppsFarm.OpenFromUrlEnabled - OpenFromUrlThrottlingEnabled = $officeWebAppsFarm.OpenFromUrlThrottlingEnabled - PicturePasteDisabled = $officeWebAppsFarm.PicturePasteDisabled - Proxy = $officeWebAppsFarm.Proxy - RecycleActiveProcessCount = $officeWebAppsFarm.RecycleActiveProcessCount - RenderingLocalCacheLocation = $officeWebAppsFarm.RenderingLocalCacheLocation - SSLOffloaded = $officeWebAppsFarm.SSLOffloaded - TranslationEnabled = $officeWebAppsFarm.TranslationEnabled - TranslationServiceAddress = $officeWebAppsFarm.TranslationServiceAddress - TranslationServiceAppId = $officeWebAppsFarm.TranslationServiceAppId - RemovePersonalInformationFromLogs = $officeWebAppsFarm.RemovePersonalInformationFromLogs - ExcelUseEffectiveUserName = $officeWebAppsFarm.ExcelUseEffectiveUserName - AllowOutboundHttp = $officeWebAppsFarm.AllowOutboundHttp - S2SCertificateName = $officeWebAppsFarm.S2SCertificateName - } - - return $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [System.Boolean] - $AllowCEIP, - - [System.Boolean] - $AllowHttp, - - [System.Boolean] - $AllowHttpSecureStoreConnections, - - [System.String] - $CacheLocation, - - [System.Int32] - $CacheSizeInGB, - - [System.String] - $CertificateName, - - [System.Boolean] - $ClipartEnabled, - - [System.Int32] - $DocumentInfoCacheSize, - - [System.Boolean] - $EditingEnabled, - - [System.Boolean] - $ExcelAllowExternalData, - - [System.Int32] - $ExcelConnectionLifetime, - - [System.Int32] - $ExcelExternalDataCacheLifetime, - - [System.Int32] - $ExcelPrivateBytesMax, - - [System.Int32] - $ExcelRequestDurationMax, - - [System.Int32] - $ExcelSessionTimeout, - - [System.Boolean] - $ExcelUdfsAllowed, - - [System.Boolean] - $ExcelWarnOnDataRefresh, - - [System.Int32] - $ExcelWorkbookSizeMax, - - [System.Int32] - $ExcelMemoryCacheThreshold, - - [System.Int32] - $ExcelUnusedObjectAgeMax, - - [System.Boolean] - $ExcelCachingUnusedFiles, - - [System.Boolean] - $ExcelAbortOnRefreshOnOpenFail, - - [System.Int32] - $ExcelAutomaticVolatileFunctionCacheLifetime, - - [System.Int32] - $ExcelConcurrentDataRequestsPerSessionMax, - - [System.String] - $ExcelDefaultWorkbookCalcMode, - - [System.Boolean] - $ExcelRestExternalDataEnabled, - - [System.Int32] - $ExcelChartAndImageSizeMax, - - [System.String] - $ExternalURL, - - [System.String] - $FarmOU, - - [parameter(Mandatory = $true)] - [System.String] - $InternalURL, - - [System.String] - $LogLocation, - - [System.Int32] - $LogRetentionInDays, - - [System.String] - $LogVerbosity, - - [System.Int32] - $MaxMemoryCacheSizeInMB, - - [System.Int32] - $MaxTranslationCharacterCount, - - [System.Boolean] - $OpenFromUncEnabled, - - [System.Boolean] - $OpenFromUrlEnabled, - - [System.Boolean] - $OpenFromUrlThrottlingEnabled, - - [System.String] - $Proxy, - - [System.Int32] - $RecycleActiveProcessCount, - - [System.String] - $RenderingLocalCacheLocation, - - [System.Boolean] - $SSLOffloaded, - - [System.Boolean] - $TranslationEnabled, - - [System.String] - $TranslationServiceAddress, - - [System.String] - $TranslationServiceAppId, - - [System.Boolean] - $AllowOutboundHttp, - - [System.Boolean] - $ExcelUseEffectiveUserName, - - [System.String] - $S2SCertificateName, - - [System.Boolean] - $RemovePersonalInformationFromLogs, - - [System.Boolean] - $PicturePasteDisabled - ) - - Test-OosDscV16Support -Parameters $PSBoundParameters - - try - { - $officeWebAppsFarm = Get-OfficeWebAppsFarm -ErrorAction Stop - } - catch - { - Write-Verbose -Message $_ - } - - if(-not $officeWebAppsFarm) - { - Write-Verbose "Installing new WebAppsFarm" - New-OfficeWebAppsFarm @PSBoundParameters -Force - } - else - { - Write-Verbose "WebAppsFarm found setting parameters on farm" - Set-OfficeWebAppsFarm @PSBoundParameters -Force - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [System.Boolean] - $AllowCEIP, - - [System.Boolean] - $AllowHttp, - - [System.Boolean] - $AllowHttpSecureStoreConnections, - - [System.String] - $CacheLocation, - - [System.Int32] - $CacheSizeInGB, - - [System.String] - $CertificateName, - - [System.Boolean] - $ClipartEnabled, - - [System.Int32] - $DocumentInfoCacheSize, - - [System.Boolean] - $EditingEnabled, - - [System.Boolean] - $ExcelAllowExternalData, - - [System.Int32] - $ExcelConnectionLifetime, - - [System.Int32] - $ExcelExternalDataCacheLifetime, - - [System.Int32] - $ExcelPrivateBytesMax, - - [System.Int32] - $ExcelRequestDurationMax, - - [System.Int32] - $ExcelSessionTimeout, - - [System.Boolean] - $ExcelUdfsAllowed, - - [System.Boolean] - $ExcelWarnOnDataRefresh, - - [System.Int32] - $ExcelWorkbookSizeMax, - - [System.Int32] - $ExcelMemoryCacheThreshold, - - [System.Int32] - $ExcelUnusedObjectAgeMax, - - [System.Boolean] - $ExcelCachingUnusedFiles, - - [System.Boolean] - $ExcelAbortOnRefreshOnOpenFail, - - [System.Int32] - $ExcelAutomaticVolatileFunctionCacheLifetime, - - [System.Int32] - $ExcelConcurrentDataRequestsPerSessionMax, - - [System.String] - $ExcelDefaultWorkbookCalcMode, - - [System.Boolean] - $ExcelRestExternalDataEnabled, - - [System.Int32] - $ExcelChartAndImageSizeMax, - - [System.String] - $ExternalURL, - - [System.String] - $FarmOU, - - [parameter(Mandatory = $true)] - [System.String] - $InternalURL, - - [System.String] - $LogLocation, - - [System.Int32] - $LogRetentionInDays, - - [System.String] - $LogVerbosity, - - [System.Int32] - $MaxMemoryCacheSizeInMB, - - [System.Int32] - $MaxTranslationCharacterCount, - - [System.Boolean] - $OpenFromUncEnabled, - - [System.Boolean] - $OpenFromUrlEnabled, - - [System.Boolean] - $OpenFromUrlThrottlingEnabled, - - [System.String] - $Proxy, - - [System.Int32] - $RecycleActiveProcessCount, - - [System.String] - $RenderingLocalCacheLocation, - - [System.Boolean] - $SSLOffloaded, - - [System.Boolean] - $TranslationEnabled, - - [System.String] - $TranslationServiceAddress, - - [System.String] - $TranslationServiceAppId, - - [System.Boolean] - $AllowOutboundHttp, - - [System.Boolean] - $ExcelUseEffectiveUserName, - - [System.String] - $S2SCertificateName, - - [System.Boolean] - $RemovePersonalInformationFromLogs, - - [System.Boolean] - $PicturePasteDisabled - ) - - Test-OosDscV16Support -Parameters $PSBoundParameters - - try - { - $officeWebAppsFarm = Get-OfficeWebAppsFarm -ErrorAction Stop - } - catch - { - Write-Verbose -Message $_ - return $false - } - - if($PSBoundParameters.ContainsKey('FarmOU')) - { - if ((Test-OosDscFarmOu -ExistingOU $officeWebAppsFarm.FarmOU -DesiredOU $FarmOU) -ne $true) - { - Write-Verbose -Message ("FarmOU not in a desired state. " + ` - "Expected: '$($PSBoundParameters['FarmOU'])'. " + ` - "Actual: '$($officeWebAppsFarm.FarmOU)'.") - return $false - } - } - - $currentValues = Get-TargetResource @PSBoundParameters - - if ($InternalURL.EndsWith('/') -eq $false) - { - $InternalURL += "/" - } - if ($ExternalURL.EndsWith('/') -eq $false) - { - $ExternalURL += "/" - } - if ($Proxy.EndsWith('/') -eq $false) - { - $Proxy += "/" - } - return Test-OosDscParameterState -CurrentValues $currentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @( - "InternalURL", - "ExternalURL", - "Proxy", - "AllowHTTP", - "AllowOutboundHttp", - "SSLOffloaded", - "CertificateName", - "S2SCertificateName", - "EditingEnabled", - "LogLocation", - "LogRetentionInDays", - "LogVerbosity", - "CacheLocation", - "MaxMemoryCacheSizeInMB", - "DocumentInfoCacheSize", - "CacheSizeInGB", - "ClipartEnabled", - "TranslationEnabled", - "MaxTranslationCharacterCount", - "TranslationServiceAppId", - "TranslationServiceAddress", - "RenderingLocalCacheLocation", - "RecycleActiveProcessCount", - "AllowCEIP", - "ExcelRequestDurationMax", - "ExcelSessionTimeout", - "ExcelWorkbookSizeMax", - "ExcelPrivateBytesMax", - "ExcelConnectionLifetime", - "ExcelExternalDataCacheLifetime", - "ExcelAllowExternalData", - "ExcelUseEffectiveUserName", - "ExcelWarnOnDataRefresh", - "ExcelUdfsAllowed", - "ExcelMemoryCacheThreshold", - "ExcelUnusedObjectAgeMax", - "ExcelCachingUnusedFiles", - "ExcelAbortOnRefreshOnOpenFail", - "ExcelAutomaticVolatileFunctionCacheLifeTime", - "ExcelConcurrentDataRequestsPerSessionMax", - "ExcelDefaultWorkbookCalcMode", - "ExcelRestExternalDataEnabled", - "ExcelChartAndImageSizeMax", - "OpenFromUrlEnabled", - "OpenFromUncEnabled", - "OpenFromUrlThrottlingEnabled", - "PicturePasteDisabled", - "RemovePersonalInformationFromLogs", - "AllowHttpSecureStoreConnections" - ) -} - -function Test-OosDscV16Support -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param( - [Parameter(Mandatory=$true)] - [Object] - $Parameters - ) - - $version = Get-OosDscInstalledProductVersion - switch ($version.Major) { - 15 { - Write-Verbose -Message "Office Web Apps 2013 install detected. Checking parameter use." - foreach($param in $script:v16onlyParams) - { - if ($Parameters.ContainsKey($param) -eq $true) - { - throw "The parameter '$param' is not supported on Office Web Apps Server 2013" - } - } - } - 16 { - Write-Verbose -Message ("Office Online Server 2016 install detected. All " + ` - "parameters are enabled") - } - Default { - throw ("This module only supports Office Web Apps 2013 (v15) and Office " + ` - "Online Server 2016 (v16). Detected version was $($version.Major)") - } - } -} - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerFarm/MSFT_OfficeOnlineServerFarm.schema.mof b/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerFarm/MSFT_OfficeOnlineServerFarm.schema.mof deleted file mode 100644 index ed1e5f3d..00000000 --- a/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerFarm/MSFT_OfficeOnlineServerFarm.schema.mof +++ /dev/null @@ -1,56 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("OfficeOnlineServerFarm")] -class MSFT_OfficeOnlineServerFarm : OMI_BaseResource -{ - [Write, Description("Enables Customer Experience Improvement Program (CEIP) reporting on all servers in the Office Web Apps Server farm")] Boolean AllowCEIP; - [Write, Description("Indicates that IIS sites should be provisioned on port 80 for HTTP access. Use AllowHTTP only in environments where all computers require IPSEC (full encryption) or in test environments that do not contain sensitive files.")] Boolean AllowHttp; - [Write, Description("Indicates that secure store connections can be made by using non-SSL connections (such as HTTP). The default is False.")] Boolean AllowHttpSecureStoreConnections; - [Write, Description("Specifies the location of the global disk cache that is used to store rendered image files.")] String CacheLocation; - [Write, Description("Specifies the maximum size of the global disk cache in gigabytes.")] Sint32 CacheSizeInGB; - [Write, Description("Specifies the friendly name of the certificate that Office Web Apps Server uses to create HTTPS bindings.")] String CertificateName; - [Write, Description("Enables support for inserting clip art from Office.com into Office documents. This feature requires server-to-web communication, configured either directly or by using a proxy that you specify by using the Proxy parameter.")] Boolean ClipartEnabled; - [Write, Description("Specifies the maximum number of document conversion records that are stored in a memory cache.")] Sint32 DocumentInfoCacheSize; - [Write, Description("Enables support for editing in the browser. The default is False. Only set to True if you have the appropriate licensing to use the editing functionality.")] Boolean EditingEnabled; - [Write, Description("Enables the refresh of supported external data in Excel Web App workbooks where workbooks contain connections to external data. The default is True.")] Boolean ExcelAllowExternalData; - [Write, Description("Specifies the duration, in seconds, of external data connections for Excel Web App. The default is 1800 seconds.")] Sint32 ExcelConnectionLifetime; - [Write, Description("Specifes the duration, in seconds, of the external data cache lifetime in Excel Web App. The default is 300 seconds.")] Sint32 ExcelExternalDataCacheLifetime; - [Write, Description("Specifies the maximum private bytes, in megabytes, used by Excel Web App. When set to -1, the maximum private bytes use 50 percent of physical memory on the computer.")] Sint32 ExcelPrivateBytesMax; - [Write, Description("Specifies the maximum duration, in seconds, for a single request in a session. After this time elapses, the request times out.")] Sint32 ExcelRequestDurationMax; - [Write, Description("Specifies the time, in seconds, that a session remains active in Excel Web App when there is no user activity.")] Sint32 ExcelSessionTimeout; - [Write, Description("Activates user-defined functions for use with Web Excel.")] Boolean ExcelUdfsAllowed; - [Write, Description("Turns off or on the warning dialog displayed when data refreshes in Excel Web App.")] Boolean ExcelWarnOnDataRefresh; - [Write, Description("Specifies the maximum size, in megabytes, of a workbook that can be loaded.")] Sint32 ExcelWorkbookSizeMax; - [Write, Description("The percentage of the Maximum Private Bytes that can be allocated to inactive objects. When the memory cache threshold is exceeded, cached objects that are not currently in use are released.")] Sint32 ExcelMemoryCacheThreshold; - [Write, Description("The maximum time (in minutes) that inactive objects remain in the memory cache. Inactive objects are objects that are not used in a session.")] Sint32 ExcelUnusedObjectAgeMax; - [Write, Description("Enable caching of files that are no longer in use by Web Excel sessions.")] Boolean ExcelCachingUnusedFiles; - [Write, Description("Specifies that the loading of a Web Excel file automatically fails if an automatic data refresh operation fails when the file is opened.")] Boolean ExcelAbortOnRefreshOnOpenFail; - [Write, Description("Specifies the maximum time, in seconds, that a computed value for a volatile function is cached for automatic recalculations.")] Sint32 ExcelAutomaticVolatileFunctionCacheLifetime; - [Write, Description("Specifies the maximum number of concurrent external data requests allowed in each session. If a session must issue more than this number of requests, additional requests must be queued. The scope of this setting is the logical server.")] Sint32 ExcelConcurrentDataRequestsPerSessionMax; - [Write, Description("Specifies the calculation mode of workbooks. Settings other than File override the workbook settings.")] String ExcelDefaultWorkbookCalcMode; - [Write, Description("Specifies whether requests from the Representational State Transfer (REST) Application Programming Interface (API) are permitted to refresh external data connections.")] Boolean ExcelRestExternalDataEnabled; - [Write, Description("Specifies the maximum size, in megabytes, of a chart or image that can be opened.")] Sint32 ExcelChartAndImageSizeMax; - [Write, Description("Specifies the URL root that clients use to access the Office Web Apps Server farm from the Internet. In the case of a load-balanced, multiserver Office Web Apps Server farm, the external URL is bound to the IP address of the external-facing load balancer.")] String ExternalURL; - [Write, Description("Specifies the name of the Active Directory organizational unit (OU) that servers must be a member of to join the Office Web Apps Server farm. Use this parameter to prevent unauthorized servers (that is, servers that are not in the OU) from joining an Office Web Apps Server farm.")] String FarmOU; - [Key, Description("Specifies the URL root that clients use to access the Office Web Apps Server farm from the intranet.")] String InternalURL; - [Write, Description("Specifies the location on the local computer where activity logs are stored.")] String LogLocation; - [Write, Description("Specifies the number of days that log entries are stored. Log entries older than the configured date are trimmed.")] Sint32 LogRetentionInDays; - [Write, Description("Specifies how much information is stored in the trace log files.")] String LogVerbosity; - [Write, Description("Specifies, in megabytes, the maximum amount of memory that the rendering cache can use.")] Sint32 MaxMemoryCacheSizeInMB; - [Write, Description("Specifies the maximum amount of characters a document can have in order to be translated.")] Sint32 MaxTranslationCharacterCount; - [Write, Description("Turns on or off the ability to use Online Viewers to view Office files from a UNC path.")] Boolean OpenFromUncEnabled; - [Write, Description("Turns on or off the ability to use Online Viewers to view Office files from a URL or UNC path.")] Boolean OpenFromUrlEnabled; - [Write, Description("Throttles the number of open from URL requests from any given server in a time period. The default throttling values, which are not configurable, make sure that an Office Web Apps Server farm will not overwhelm a single server with requests for content to be viewed in the Online Viewers.")] Boolean OpenFromUrlThrottlingEnabled; - [Write, Description("Specifies the URL of the proxy server that is configured to allow HTTP requests to external sites. Typically configured in conjunction with the ClipartEnabled and TranslationEnabled parameters.")] String Proxy; - [Write, Description("Specifies the number of files that a single Word or PowerPoint process can render before the process is recycled.")] Sint32 RecycleActiveProcessCount; - [Write, Description("Specifies the location of the temporary cache for use by the Word and PowerPoint Viewing Services.")] String RenderingLocalCacheLocation; - [Write, Description("Indicates to the servers in the Office Web Apps Server farm that SSL is offloaded to the load balancer. When SSLOffloaded is enabled, web applications are bound to port 80 (HTTP) on the local server. However, HTML that references other resources, such as CSS or images, uses HTTPS URLs for those references.")] Boolean SSLOffloaded; - [Write, Description("Enables support for automatic document translation using Microsoft Translator, an online service that translates text between languages. The translated file is shown in the Word Web App. Because Microsoft Translator is an online service, you must enable server-to-web communication directly or by using a proxy that you specify by using the Proxy parameter.")] Boolean TranslationEnabled; - [Write, Description("Specifies the URL of the translation server that translation requests are sent to. The default is the Microsoft Translator online service. Typically you will not use this parameter unless you must change translation services.")] String TranslationServiceAddress; - [Write, Description("Specifies the application ID for the translation service. The default is the public application ID for Office Web Apps. Typically you will not use this parameter unless you have negotiated with Microsoft Translator for additional services and they have provided you with a private application ID.")] String TranslationServiceAppId; - [Write] Boolean AllowOutboundHttp; - [Write] Boolean ExcelUseEffectiveUserName; - [Write] String S2SCertificateName; - [Write] Boolean RemovePersonalInformationFromLogs; - [Write] Boolean PicturePasteDisabled; -}; - diff --git a/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerInstall/MSFT_OfficeOnlineServerInstall.psm1 b/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerInstall/MSFT_OfficeOnlineServerInstall.psm1 deleted file mode 100644 index 3319ff7a..00000000 --- a/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerInstall/MSFT_OfficeOnlineServerInstall.psm1 +++ /dev/null @@ -1,113 +0,0 @@ -$Script:UninstallPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" -$script:InstallKeyPattern = "Office1(5)|(6).WacServer" - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - [ValidateSet("Present", "Absent")] - $Ensure, - - [parameter(Mandatory = $true)] - [System.String] - $Path - ) - - if ($Ensure -eq "Absent") - { - throw "Uninstallation is not supported by OfficeOnlineServer Dsc" - } - - Write-Verbose -Message "Getting details of installation of Office Online Server" - - $matchPath = "HKEY_LOCAL_MACHINE\\$($Script:UninstallPath.Replace('\','\\'))" + ` - "\\$script:InstallKeyPattern" - $wacPath = Get-ChildItem -Path "HKLM:\$Script:UninstallPath" | Where-Object -FilterScript { - $_.Name -match $matchPath - } - - $localEnsure = "Absent" - if($null -ne $wacPath) - { - $localEnsure = "Present" - } - - return @{ - Ensure = $localEnsure - Path = $Path - } -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - [ValidateSet("Present", "Absent")] - $Ensure, - - [parameter(Mandatory = $true)] - [System.String] - $Path - ) - - if ($Ensure -eq "Absent") - { - throw "Uninstallation is not supported by OfficeOnlineServer Dsc" - } - - Write-Verbose -Message "Starting installation of Office Online Server" - - $installer = Start-Process -FilePath $Path ` - -ArgumentList '/config .\files\setupsilent\config.xml' ` - -Wait ` - -PassThru - - switch ($installer.ExitCode) { - 0 { - Write-Verbose -Message "Installation of Office Online Server succeeded." - } - Default { - throw ("Office Online Server installation failed. Exit code " + ` - "'$($installer.ExitCode)' was returned. Check " + ` - "$($env:TEMP)\Wac Server Setup.log for further information") - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - [ValidateSet("Present", "Absent")] - $Ensure, - - [parameter(Mandatory = $true)] - [System.String] - $Path - ) - - if ($Ensure -eq "Absent") - { - throw "Uninstallation is not supported by OfficeOnlineServer Dsc" - } - - Write-Verbose -Message "Testing for installation of Office Online Server" - $result = Get-TargetResource @PSBoundParameters - - return ($result.Ensure -eq $Ensure) -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerInstall/MSFT_OfficeOnlineServerInstall.schema.mof b/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerInstall/MSFT_OfficeOnlineServerInstall.schema.mof deleted file mode 100644 index 26377623..00000000 --- a/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerInstall/MSFT_OfficeOnlineServerInstall.schema.mof +++ /dev/null @@ -1,7 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("OfficeOnlineServerInstall")] -class MSFT_OfficeOnlineServerInstall : OMI_BaseResource -{ - [Key, Description("Set to 'present' to specificy that the product should be installed."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("Path to setup.exe")] String Path; -}; diff --git a/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerMachine/MSFT_OfficeOnlineServerMachine.psm1 b/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerMachine/MSFT_OfficeOnlineServerMachine.psm1 deleted file mode 100644 index 91543055..00000000 --- a/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerMachine/MSFT_OfficeOnlineServerMachine.psm1 +++ /dev/null @@ -1,193 +0,0 @@ -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData -StringData @' -NotApartOfAFarm = It does not appear that this machine is part of an Office Online Server/Office Web Apps farm. -ChangingAppMachineConfig = Changing App Maching Configuration. -SetAppMachine = The Office Web App Machine has been Set. -RemoveAppMachine = The Office Web App Machine has been removed. -FailedRemove = Failed to remove the Web App Machine. -'@ -} - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [System.String[]] - $Roles, - - [parameter(Mandatory = $true)] - [System.String] - $MachineToJoin - ) - - - Import-Module -Name OfficeWebApps -ErrorAction Stop - - $officeWebAppsMachine = $null - - try - { - $officeWebAppsMachine = Get-OfficeWebAppsMachine - } - catch - { - # catch when not a part of the farm and redirect output to returned hash table - $notInFarmError = "It does not appear that this machine is part of an " + ` - "(Office Online)|(Office Web Apps) Server farm\." - if($_.toString() -match $notInFarmError) - { - Write-Verbose -Message $LocalizedData.NotApartOfAFarm - } - else - { - throw - } - } - - if ($null -eq $officeWebAppsMachine) - { - $returnValue = @{ - Ensure = "Absent" - Roles = $null - MachineToJoin = $null - } - } - else - { - $returnValue = @{ - Ensure = "Present" - Roles = [System.String[]]$officeWebAppsMachine.Roles - MachineToJoin = [System.String]$officeWebAppsMachine.MasterMachineName - } - } - - return $returnValue -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [System.String[]] - $Roles, - - [parameter(Mandatory = $true)] - [System.String] - $MachineToJoin - ) - - Write-Verbose -Message "Updating settings for local Office Online Server" - Import-Module -Name OfficeWebApps -ErrorAction Stop - - if ($Ensure -eq "Absent") - { - Remove-OfficeWebAppsMachine - - Write-Verbose -Message $LocalizedData.RemoveAppMachine - } - else - { - # Due to issues with Set-OfficeWebAppsMachine not changing machine roles, - # always remove the machine and re-add. - - try - { - Remove-OfficeWebAppsMachine -ErrorAction Stop - } - catch - { - Write-Verbose -Message $LocalizedData.FailedRemove - } - - if ($null -eq $Roles) - { - $Roles = @("All") - } - - New-OfficeWebAppsMachine -MachineToJoin $MachineToJoin -Roles $Roles - - Write-Verbose -Message $LocalizedData.SetAppMachine - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [System.String[]] - $Roles, - - [parameter(Mandatory = $true)] - [System.String] - $MachineToJoin - ) - - Write-Verbose -Message "Testing settings for local Office Online Server" - $results = Get-TargetResource -MachineToJoin $MachineToJoin - - if ($null -eq $Roles) - { - $Roles = @("All") - } - - if ($null -eq $results.Roles) - { - $roleCompare = $null - } - else - { - $roleCompare = Compare-Object -ReferenceObject $results.Roles -DifferenceObject $Roles - } - - if ($MachineToJoin.Contains(".") -eq $true) - { - $fqdn = $MachineToJoin - $computer = $MachineToJoin.Substring(0, $MachineToJoin.IndexOf(".")) - } - else - { - $domain = (Get-CimInstance -ClassName Win32_ComputerSystem).Domain - $fqdn = "$MachineToJoin.$domain" - $computer = $MachineToJoin - } - - if (($results.Ensure -eq "Present") ` - -and ($Ensure -eq "Present") ` - -and (($results.MachineToJoin -eq $fqdn) -or ($results.MachineToJoin -eq $computer)) ` - -and ( $null -eq $roleCompare)) - { - # If present and all value match return true - return $true - } - elseif(($results.Ensure -eq "Absent") -and ($Ensure -eq "Absent")) - { - # if absent no need to check all values - return $true - } - else - { - return $false - } -} - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerMachine/MSFT_OfficeOnlineServerMachine.schema.mof b/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerMachine/MSFT_OfficeOnlineServerMachine.schema.mof deleted file mode 100644 index c432caf2..00000000 --- a/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerMachine/MSFT_OfficeOnlineServerMachine.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("OfficeOnlineServerMachine")] -class MSFT_OfficeOnlineServerMachine : OMI_BaseResource -{ - [Write, Description("Ensure Present or Absent"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("Specifies one or more server roles, separated by commas, to assign to the new server. If no roles are specified, then the server is assigned all roles.")] String Roles[]; - [Key, Description("Specifies the name of any server that is already a member of the Office Web Apps Server farm.")] String MachineToJoin; -}; - diff --git a/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/Modules/OfficeOnlineServerDsc.Util/OfficeOnlineServerDsc.Util.psm1 b/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/Modules/OfficeOnlineServerDsc.Util/OfficeOnlineServerDsc.Util.psm1 deleted file mode 100644 index 87df7c96..00000000 --- a/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/Modules/OfficeOnlineServerDsc.Util/OfficeOnlineServerDsc.Util.psm1 +++ /dev/null @@ -1,245 +0,0 @@ -<# -.SYNOPSIS - -This cmdlet determines the version number of Office Web Apps that is installed locally - -#> -function Get-OosDscInstalledProductVersion -{ - [CmdletBinding()] - [OutputType([Version])] - param() - - return Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | ` - Select-Object DisplayName, DisplayVersion | ` - Where-Object { - $_.DisplayName -eq "Microsoft Office Web Apps Server 2013" -or ` - $_.DisplayName -eq "Microsoft Office Online Server" - } | ForEach-Object -Process { - return [Version]::Parse($_.DisplayVersion) - } | Select-Object -First 1 -} - - -<# -.SYNOPSIS - -This cmdlet determines if the OU of the farm matches the OU of the current deployment - -.PARAMETER DesiredOU - -The name of the OU that the farm should be in - -.PARAMETER ExistingOU - -The name of the OU that the farm currently is in - -#> -function Test-OosDscFarmOu -{ - [cmdletbinding()] - param - ( - [parameter(Mandatory = $true)] - [string] - $DesiredOU, - - [parameter(Mandatory = $true)] - [object] - $ExistingOU - ) - - $adsi = [adsisearcher]'(objectCategory=organizationalUnit)' - $adsi.Filter = "name=$DesiredOU" - $ou = $adsi.FindAll() - if($ou.path){ - $searchRoot = "," + $adsi.SearchRoot.Path -replace 'LDAP://' - $ldapResult = $ou.path -replace $searchRoot - Write-Verbose -Message "LDAP search result: $ldapResult" - Write-Verbose "Current Farm OU: $ExistingOU" - return ($ldapResult -contains $ExistingOU) - } - else - { - throw "$DesiredOU not found" - } -} - -<# -.SYNOPSIS - -This method is used to compare current and desired values for any DSC resource - -.PARAMETER CurrentValues - -This is hashtable of the current values that are applied to the resource - -.PARAMETER DesiredValues - -This is a PSBoundParametersDictionary of the desired values for the resource - -.PARAMETER ValuesToCheck - -This is a list of which properties in the desired values list should be checkked. -If this is empty then all values in DesiredValues are checked. - -#> -function Test-OosDscParameterState() { - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true, Position=1)] - [HashTable] - $CurrentValues, - - [parameter(Mandatory = $true, Position=2)] - [Object] - $DesiredValues, - - [parameter(Mandatory = $false, Position=3)] - [Array] - $ValuesToCheck - ) - - $returnValue = $true - - if (($DesiredValues.GetType().Name -ne "HashTable") ` - -and ($DesiredValues.GetType().Name -ne "CimInstance") ` - -and ($DesiredValues.GetType().Name -ne "PSBoundParametersDictionary")) - { - throw ("Property 'DesiredValues' in Test-SPDscParameterState must be either a " + ` - "Hashtable or CimInstance. Type detected was $($DesiredValues.GetType().Name)") - } - - if (($DesiredValues.GetType().Name -eq "CimInstance") -and ($null -eq $ValuesToCheck)) - { - throw ("If 'DesiredValues' is a Hashtable then property 'ValuesToCheck' must contain " + ` - "a value") - } - - if (($null -eq $ValuesToCheck) -or ($ValuesToCheck.Count -lt 1)) - { - $KeyList = $DesiredValues.Keys - } - else - { - $KeyList = $ValuesToCheck - } - - $KeyList | ForEach-Object -Process { - if ($_ -ne "Verbose") - { - if (($CurrentValues.ContainsKey($_) -eq $false) ` - -or ($CurrentValues.$_ -ne $DesiredValues.$_) ` - -or (($DesiredValues.ContainsKey($_) -eq $true) -and ($DesiredValues.$_.GetType().IsArray))) - { - if ($DesiredValues.GetType().Name -eq "HashTable" -or ` - $DesiredValues.GetType().Name -eq "PSBoundParametersDictionary") - { - $CheckDesiredValue = $DesiredValues.ContainsKey($_) - } - else - { - $CheckDesiredValue = Test-SPDSCObjectHasProperty $DesiredValues $_ - } - - if ($CheckDesiredValue) - { - $desiredType = $DesiredValues.$_.GetType() - $fieldName = $_ - if ($desiredType.IsArray -eq $true) - { - if (($CurrentValues.ContainsKey($fieldName) -eq $false) ` - -or ($null -eq $CurrentValues.$fieldName)) - { - Write-Verbose -Message ("Expected to find an array value for " + ` - "property $fieldName in the current " + ` - "values, but it was either not present or " + ` - "was null. This has caused the test method " + ` - "to return false.") - $returnValue = $false - } - else - { - $arrayCompare = Compare-Object -ReferenceObject $CurrentValues.$fieldName ` - -DifferenceObject $DesiredValues.$fieldName - if ($null -ne $arrayCompare) - { - Write-Verbose -Message ("Found an array for property $fieldName " + ` - "in the current values, but this array " + ` - "does not match the desired state. " + ` - "Details of the changes are below.") - $arrayCompare | ForEach-Object -Process { - Write-Verbose -Message "$($_.InputObject) - $($_.SideIndicator)" - } - $returnValue = $false - } - } - } - else - { - switch ($desiredType.Name) - { - "String" { - if ([string]::IsNullOrEmpty($CurrentValues.$fieldName) ` - -and [string]::IsNullOrEmpty($DesiredValues.$fieldName)) - {} - else - { - Write-Verbose -Message ("String value for property " + ` - "$fieldName does not match. " + ` - "Current state is " + ` - "'$($CurrentValues.$fieldName)' " + ` - "and desired state is " + ` - "'$($DesiredValues.$fieldName)'") - $returnValue = $false - } - } - "Int32" { - if (($DesiredValues.$fieldName -eq 0) ` - -and ($null -eq $CurrentValues.$fieldName)) - {} - else - { - Write-Verbose -Message ("Int32 value for property " + ` - "$fieldName does not match. " + ` - "Current state is " + ` - "'$($CurrentValues.$fieldName)' " + ` - "and desired state is " + ` - "'$($DesiredValues.$fieldName)'") - $returnValue = $false - } - } - "Int16" { - if (($DesiredValues.$fieldName -eq 0) ` - -and ($null -eq $CurrentValues.$fieldName)) - {} - else - { - Write-Verbose -Message ("Int16 value for property " + ` - "$fieldName does not match. " + ` - "Current state is " + ` - "'$($CurrentValues.$fieldName)' " + ` - "and desired state is " + ` - "'$($DesiredValues.$fieldName)'") - $returnValue = $false - } - } - default { - Write-Verbose -Message ("Unable to compare property $fieldName " + ` - "as the type ($($desiredType.Name)) is " + ` - "not handled by the " + ` - "Test-SPDscParameterState cmdlet") - $returnValue = $false - } - } - } - } - } - } - } - return $returnValue -} - -Export-ModuleMember -Function * diff --git a/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/OfficeOnlineServerDsc.psd1 b/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/OfficeOnlineServerDsc.psd1 deleted file mode 100644 index c309f366..00000000 --- a/lib/puppet_x/dsc_resources/OfficeOnlineServerDsc/OfficeOnlineServerDsc.psd1 +++ /dev/null @@ -1,125 +0,0 @@ -# -# Module manifest for module 'OfficeOnlineServerDsc' -# -# Generated by: Jason Walker -# -# Generated on: 2/3/2016 -# - -@{ - -# Script module or binary module file associated with this manifest. -# RootModule = '' - -# Version number of this module. -ModuleVersion = '1.0.0.0' - -# ID used to uniquely identify this module -GUID = '7514bb93-d3e4-40b2-98e7-3404e9674c1c' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2016 Microsoft. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'The OfficeOnlineServerDsc module provides the ability to install Office Online Server (formerly known as Office Web App Server).' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Name of the Windows PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the Windows PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module -# DotNetFrameworkVersion = '' - -# Minimum version of the common language runtime (CLR) required by this module -# CLRVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -# RequiredModules = @() - -# Assemblies that must be loaded prior to importing this module -# RequiredAssemblies = @() - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -# FormatsToProcess = @() - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -NestedModules = @("modules\OfficeOnlineServerDsc.Util\OfficeOnlineServerDsc.Util.psm1") - -# Functions to export from this module -# FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = @('Get-OosDscInstalledProductVersion', - 'Test-OosDscFarmOu', - 'Test-OosDscParameterState') - -# Variables to export from this module -# VariablesToExport = '*' - -# Aliases to export from this module -# AliasesToExport = '*' - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess -# PrivateData = '' - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/OfficeOnlineServerDsc/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/OfficeOnlineServerDsc' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* Added documentation to the module to finalise for release -* Renamed resources to shorten names before release - * "OfficeOnlineServerWebAppsFarm" becomes "OfficeOnlineServerFarm" - * "OfficeOnlineServerWebAppsMachine" becomes "OfficeOnlineServerMachine" -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable - -} - diff --git a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecuritySetting/MSFT_SecuritySetting.psm1 b/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecuritySetting/MSFT_SecuritySetting.psm1 deleted file mode 100644 index 60b29b2b..00000000 --- a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecuritySetting/MSFT_SecuritySetting.psm1 +++ /dev/null @@ -1,465 +0,0 @@ -Import-Module -Name (Join-Path -Path ( Split-Path $PSScriptRoot -Parent ) ` - -ChildPath 'SecurityPolicyResourceHelper\SecurityPolicyResourceHelper.psm1') ` - -Force - -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_SecuritySetting' - -$headerSettings = @{ - MinimumPasswordAge = "System Access" - MaximumPasswordAge = "System Access" - MinimumPasswordLength = "System Access" - PasswordComplexity = "System Access" - PasswordHistorySize = "System Access" - LockoutBadCount = "System Access" - ForceLogoffWhenHourExpire = "System Access" - NewAdministratorName = "System Access" - NewGuestName = "System Access" - ClearTextPassword = "System Access" - LSAAnonymousNameLookup = "System Access" - EnableAdminAccount = "System Access" - EnableGuestAccount = "System Access" - ResetLockoutCount = "System Access" - LockoutDuration = "System Access" - MaxServiceAge = "Keberos Policy" - MaxTicketAge = "Kerberos Policy" - MaxRenewAge = "Kerberos Policy" - MaxClockSkew = "Kerberos Policy" - TicketValidateClient = "Kerberos Policy" -} - -function Get-IniContent -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] - $Path - ) - - $ini = @{} - switch -regex -file $Path - { - "^\[(.+)\]" # Section - { - $section = $matches[1] - $ini[$section] = @{} - $CommentCount = 0 - } - "^(;.*)$" # Comment - { - $value = $matches[1] - $CommentCount = $CommentCount + 1 - $name = "Comment" + $CommentCount - $ini[$section][$name] = $value.Trim() - continue - } - "(.+ )\s*=(.*)" # Key - { - $name,$value = $matches[1..2] - $ini[$section][$name.Trim()] = $value.Trim() - # Need to replace double quotes with `" - continue - } - "\`"(.*)`",(.*)$" - { - $name, $value = $matches[1..2] - $ini[$section][$name.Trim()] = $value.Trim() - continue - } - } - return $ini -} - -function Get-SecuritySettings -{ - [CmdletBinding()] - param() - - $file = Join-Path -Path $env:SystemRoot -ChildPath "\security\database\temppol.inf" - Write-Verbose -Message ($script:localizedData.CreatingTmpFile -f $file) - - $PowerShellProcess = new-object System.Diagnostics.Process - $PowerShellProcess.StartInfo.Filename = "secedit.exe" - $PowerShellProcess.StartInfo.Arguments = " /export /cfg $file /areas securitypolicy" - $PowerShellProcess.StartInfo.RedirectStandardOutput = $True - $PowerShellProcess.StartInfo.UseShellExecute = $false - $PowerShellProcess.Start() | Out-Null - $PowerShellProcess.WaitForExit('10') | Out-Null - [System.String] $process = $PowerShellProcess.StandardOutput.ReadToEnd(); - - $ini = Get-IniContent -Path $file - Remove-Item $file -Force - return $ini -} - -function Set-SecuritySettings -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [string] - $secDB, - - [Parameter(Mandatory = $true)] - [string] - $tmpFile - ) - - $PowerShellProcess = new-object System.Diagnostics.Process - $PowerShellProcess.StartInfo.Filename = "secedit.exe" - $PowerShellProcess.StartInfo.Arguments = " /configure /db $secDB /cfg $tmpfile /overwrite /quiet" - $PowerShellProcess.StartInfo.RedirectStandardOutput = $True - $PowerShellProcess.StartInfo.UseShellExecute = $false - $PowerShellProcess.Start() | Out-Null - $PowerShellProcess.WaitForExit('10') | Out-Null - [System.String] $process = $PowerShellProcess.StandardOutput.ReadToEnd(); -} - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet("MinimumPasswordAge","MaximumPasswordAge","MinimumPasswordLength","PasswordComplexity","PasswordHistorySize","LockoutBadCount","ForceLogoffWhenHourExpire","NewAdministratorName","NewGuestName","ClearTextPassword","LSAAnonymousNameLookup","EnableAdminAccount","EnableGuestAccount","ResetLockoutCount","LockoutDuration","MaxServiceAge","MaxTicketAge","MaxRenewAge","MaxClockSkew","TicketValidateClient")] - [System.String] - $Name - ) - - $ini = Get-SecuritySettings - - $returnHash = @{} - $values = "MinimumPasswordAge","MaximumPasswordAge","MinimumPasswordLength","PasswordComplexity","PasswordHistorySize","LockoutBadCount","ForceLogoffWhenHourExpire","NewAdministratorName","NewGuestName","ClearTextPassword","LSAAnonymousNameLookup","EnableAdminAccount","EnableGuestAccount","ResetLockoutCount","LockoutDuration","MaxServiceAge","MaxTicketAge","MaxRenewAge","MaxClockSkew","TicketValidateClient" - foreach ($value in $values) - { - $returnHash.$value = $ini[$headerSettings[$value]].$value - } - - $returnHash.Name = $Name - - return $returnHash -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter()] - [ValidateRange(-1, 999)] - [System.Int16] - $MinimumPasswordAge, - - [Parameter()] - [ValidateRange(0,999)] - [System.UInt16] - $MaximumPasswordAge, - - [Parameter()] - [System.UInt16] - $MinimumPasswordLength, - - [Parameter()] - [System.UInt16] - $PasswordComplexity, - - [Parameter()] - [System.UInt16] - $PasswordHistorySize, - - [Parameter()] - [System.UInt16] - $LockoutBadCount, - - [Parameter()] - [System.UInt16] - $ForceLogoffWhenHourExpire, - - [Parameter()] - [System.String] - $NewAdministratorName, - - [Parameter()] - [System.String] - $NewGuestName, - - [Parameter()] - [System.UInt16] - $ClearTextPassword, - - [Parameter()] - [System.UInt16] - $LSAAnonymousNameLookup, - - [Parameter()] - [System.UInt16] - $EnableAdminAccount, - - [Parameter()] - [System.UInt16] - $EnableGuestAccount, - - [Parameter()] - [System.Int16] - $ResetLockoutCount, - - [Parameter()] - [ValidateRange(-1, 99999)] - [ValidateScript({$_ -ne 0})] - [System.Int16] - $LockoutDuration, - - [Parameter()] - [ValidateScript({$_ -ge 10})] - [System.UInt16] - $MaxServiceAge, - - [Parameter()] - [ValidateRange(0,99999)] - [System.UInt16] - $MaxTicketAge, - - [Parameter()] - [ValidateRange(0,99999)] - [System.UInt16] - $MaxRenewAge, - - [Parameter()] - [ValidateRange(0,99999)] - [System.UInt16] - $MaxClockSkew, - - [Parameter()] - [System.UInt16] - $TicketValidateClient, - - [Parameter()] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [Parameter(Mandatory = $true)] - [ValidateSet("MinimumPasswordAge","MaximumPasswordAge","MinimumPasswordLength","PasswordComplexity","PasswordHistorySize","LockoutBadCount","ForceLogoffWhenHourExpire","NewAdministratorName","NewGuestName","ClearTextPassword","LSAAnonymousNameLookup","EnableAdminAccount","EnableGuestAccount","ResetLockoutCount","LockoutDuration","MaxServiceAge","MaxTicketAge","MaxRenewAge","MaxClockSkew","TicketValidateClient")] - [System.String] - $Name - ) - - if (@($PSBoundParameters.Keys.Where({$_ -notin "Name", "Ensure"})).Count -eq 0) - { - Write-Error $script:localizedData.NoValuesSpecified - } - - # Find out what sections we are setting. - $PSBoundParameters.Remove("Ensure") - $PSBoundParameters.Remove("Name") - $headers = ($PSBoundParameters.GetEnumerator() | ForEach-Object { $headerSettings[$_.Key] } | Group-Object).Name - - $ini = Get-SecuritySettings - $tmpFile = Join-Path -Path $env:SystemRoot -ChildPath "\security\database\temppol.inf" - $newSecDB = Join-Path -Path $env:SystemRoot -ChildPath "\security\database\tmpsecedit.sdb" - - Write-Verbose -Message ($script:localizedData.CreatingTmpFile -f $tmpFile) - Write-Verbose -Message ($script:localizedData.CreatingTmpFile -f $newSecDB) - - foreach ($header in $headers) - { - foreach ($keyPair in $PSBoundParameters.GetEnumerator()) - { - try - { - $ini[$header][$keyPair.Key] = $keyPair.Value - } - catch - { - Write-Error $script:localizedData.FailureSettingKey -f $keyPair.Key, $keyPair.Value - continue - } - } - } - - if (Test-Path $tmpFile) - { - Remove-Item $tmpFile -Force - } - - "[Unicode]" | Out-File $tmpfile - "Unicode=yes" | Out-File $tmpfile -Append - foreach ($headers in $headers) - { - "[$header]" | Out-File $tmpfile -Append - - foreach ($keyPair in $ini[$header].GetEnumerator()) - { - $Value = 1 - if ([System.Int32]::TryParse($keyPair.value, [ref]$Value)) - { - "$($keyPair.Name) = $Value" | Out-File $tmpFile -Append - } - else - { - "$($keyPair.Name) = `"$($keyPair.Value)`"" | Out-File $tmpFile -Append - } - } - } - - "[Version]" | Out-File $tmpfile -Append - "signature=`"`$CHICAGO`$`"" | Out-File $tmpfile -Append - "Revision=1" | Out-File $tmpfile -Append - - Set-SecuritySettings -secDB $newSecDB -tmpFile $tmpFile - - Remove-Item $tmpfile -Force -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter()] - [ValidateRange(-1, 999)] - [System.Int16] - $MinimumPasswordAge, - - [Parameter()] - [ValidateRange(0,999)] - [System.UInt16] - $MaximumPasswordAge, - - [Parameter()] - [System.UInt16] - $MinimumPasswordLength, - - [Parameter()] - [System.UInt16] - $PasswordComplexity, - - [Parameter()] - [System.UInt16] - $PasswordHistorySize, - - [Parameter()] - [System.UInt16] - $LockoutBadCount, - - [Parameter()] - [System.UInt16] - $ForceLogoffWhenHourExpire, - - [Parameter()] - [System.String] - $NewAdministratorName, - - [Parameter()] - [System.String] - $NewGuestName, - - [Parameter()] - [System.UInt16] - $ClearTextPassword, - - [Parameter()] - [System.UInt16] - $LSAAnonymousNameLookup, - - [Parameter()] - [System.UInt16] - $EnableAdminAccount, - - [Parameter()] - [System.UInt16] - $EnableGuestAccount, - - [Parameter()] - [System.Int16] - $ResetLockoutCount, - - [Parameter()] - [ValidateRange(-1, 99999)] - [ValidateScript({$_ -ne 0})] - [System.Int16] - $LockoutDuration, - - [Parameter()] - [ValidateScript({$_ -ge 10})] - [System.UInt16] - $MaxServiceAge, - - [Parameter()] - [ValidateRange(0,99999)] - [System.UInt16] - $MaxTicketAge, - - [Parameter()] - [ValidateRange(0,99999)] - [System.UInt16] - $MaxRenewAge, - - [Parameter()] - [ValidateRange(0,99999)] - [System.UInt16] - $MaxClockSkew, - - [Parameter()] - [System.UInt16] - $TicketValidateClient, - - [Parameter()] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [Parameter(Mandatory = $true)] - [ValidateSet("MinimumPasswordAge","MaximumPasswordAge","MinimumPasswordLength","PasswordComplexity","PasswordHistorySize","LockoutBadCount","ForceLogoffWhenHourExpire","NewAdministratorName","NewGuestName","ClearTextPassword","LSAAnonymousNameLookup","EnableAdminAccount","EnableGuestAccount","ResetLockoutCount","LockoutDuration","MaxServiceAge","MaxTicketAge","MaxRenewAge","MaxClockSkew","TicketValidateClient")] - [System.String] - $Name - ) - - if (@($PSBoundParameters.Keys.Where({$_ -notin "Name", "Ensure"})).Count -eq 0) - { - Write-Error $script:localizedData.NoValuesSpecified - return $false - } - - # Find out what sections we are setting. - $PSBoundParameters.Remove("Ensure") | Out-Null - $PSBoundParameters.Remove("Name") | Out-Null - $headers = ($PSBoundParameters.GetEnumerator() | ForEach-Object { $headerSettings[$_.Key] } | Group-Object).Name - - $ini = Get-SecuritySettings - - $returnValue = $true - foreach ($header in $headers) - { - foreach ($keyPair in ($PSBoundParameters.GetEnumerator() | Where-Object {$headerSettings[$_.Key] -eq $header})) - { - if ($ini.ContainsKey($header)) - { - if ($ini[$header][$keyPair.Key] -eq $keyPair.Value) - { - Write-Verbose -Message ($script:localizedData.TestSuccess -f $keyPair.Key, $keyPair.Value) - } - else - { - Write-Verbose -Message ($script:localizedData.TestFailure -f $keyPair.Key, $keyPair.Value) - $returnValue = $false - } - } - else - { - Write-Verbose -Message ($script:localizedData.SectionError -f $header) - $returnValue = $false - } - } - } - - return $returnValue -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecuritySetting/MSFT_SecuritySetting.schema.mof b/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecuritySetting/MSFT_SecuritySetting.schema.mof deleted file mode 100644 index b4add458..00000000 --- a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecuritySetting/MSFT_SecuritySetting.schema.mof +++ /dev/null @@ -1,26 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SecuritySetting")] -class MSFT_SecuritySetting : OMI_BaseResource -{ - [Key, Description("This is just here to avoid conflicts"), ValueMap{"MinimumPasswordAge","MaximumPasswordAge","MinimumPasswordLength","PasswordComplexity","PasswordHistorySize","LockoutBadCount","ForceLogoffWhenHourExpire","NewAdministratorName","NewGuestName","ClearTextPassword","LSAAnonymousNameLookup","EnableAdminAccount","EnableGuestAccount","ResetLockoutCount","LockoutDuration","MaxServiceAge","MaxTicketAge","MaxRenewAge","MaxClockSkew","TicketValidateClient"}, Values{"MinimumPasswordAge","MaximumPasswordAge","MinimumPasswordLength","PasswordComplexity","PasswordHistorySize","LockoutBadCount","ForceLogoffWhenHourExpire","NewAdministratorName","NewGuestName","ClearTextPassword","LSAAnonymousNameLookup","EnableAdminAccount","EnableGuestAccount","ResetLockoutCount","LockoutDuration","MaxServiceAge","MaxTicketAge","MaxRenewAge","MaxClockSkew","TicketValidateClient"}] String Name; - [Write, Description("Desired state of resource."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write] SInt16 MinimumPasswordAge; - [Write] UInt16 MaximumPasswordAge; - [Write] UInt16 MinimumPasswordLength; - [Write] Uint16 PasswordComplexity; - [Write] UInt16 PasswordHistorySize; - [Write] UInt16 LockoutBadCount; - [Write] Uint16 ForceLogoffWhenHourExpire; - [Write] String NewAdministratorName; - [Write] String NewGuestName; - [Write] Uint16 ClearTextPassword; - [Write] Uint16 LSAAnonymousNameLookup; - [Write] Uint16 EnableAdminAccount; - [Write] Uint16 EnableGuestAccount; - [Write] SInt16 ResetLockoutCount; - [Write] SInt16 LockoutDuration; - [Write] UInt16 MaxServiceAge; - [Write] Uint16 MaxTicketAge; - [Write] Uint16 MaxRenewAge; - [Write] Uint16 MaxClockSkew; - [Write] Uint16 TicketValidateClient; -}; diff --git a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecuritySetting/en-US/MSFT_SecuritySetting.strings.psd1 b/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecuritySetting/en-US/MSFT_SecuritySetting.strings.psd1 deleted file mode 100644 index 2e135ebb..00000000 --- a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecuritySetting/en-US/MSFT_SecuritySetting.strings.psd1 +++ /dev/null @@ -1,8 +0,0 @@ -ConvertFrom-StringData @' - CreatingTmpFile = Creating Temp file at path: {0} - TestSuccess = Tested {0} expecting {1}: SUCCESS! - TestFail = Tested {0} expecting {1}: FAILURE! - SectionError = Could not find section: {0} - NoValuesSpecified = No Values Specified! - FailureSettingKey = Unable to set {0} to {1}" -'@ diff --git a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecurityTemplate/MSFT_SecurityTemplate.psm1 b/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecurityTemplate/MSFT_SecurityTemplate.psm1 deleted file mode 100644 index 2a23dfeb..00000000 --- a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecurityTemplate/MSFT_SecurityTemplate.psm1 +++ /dev/null @@ -1,221 +0,0 @@ - -Import-Module -Name (Join-Path -Path ( Split-Path $PSScriptRoot -Parent ) ` - -ChildPath 'SecurityPolicyResourceHelper\SecurityPolicyResourceHelper.psm1') ` - -Force - -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_SecurityTemplate' - -<# - .SYNOPSIS - Gets the path of the current policy template. - .PARAMETER Path - Not used in Get-TargetResource. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [String] - $IsSingleInstance, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Path - ) - - $securityCmdlets = Get-Module -Name SecurityCmdlets -ListAvailable - $currentUserRightsInf = ([System.IO.Path]::GetTempFileName()).Replace('tmp','inf') - - if ($securityCmdlets) - { - Backup-SecurityPolicy -Path $currentUserRightsInf - $templateFileName = Format-SecurityPolicyFile -Path $currentUserRightsInf - } - else - { - Get-SecurityTemplate -Path $currentUserRightsInf | Out-Null - $templateFileName = $currentUserRightsInf - } - - $returnValue = @{ - Path = [System.String]$templateFileName - IsSingleInstance = 'Yes' - } - - $returnValue -} - -<# - .SYNOPSIS - Gets the path of the desired policy template. - .PARAMETER Path - Specifies the path to the policy template. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [String] - $IsSingleInstance, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Path - ) - - $securityCmdlets = Get-Module -Name SecurityCmdlets -ListAvailable - - if ($securityCmdlets) - { - Restore-SecurityPolicy -Path $Path - } - else - { - $secEditOutput = "$env:TEMP\Secedit-OutPut.txt" - - Invoke-Secedit -UserRightsToAddInf $Path -SecEditOutput $seceditOutput - } - # Verify secedit command was successful - $testSuccuess = Test-TargetResource @PSBoundParameters - - if ($testSuccuess -eq $true) - { - Write-Verbose -Message ($script:localizedData.TaskSuccess) - } - else - { - Write-Error -Message ($script:localizedData.TaskFail) - } -} - -<# - .SYNOPSIS - Gets the path of the desired policy template. - .PARAMETER Path - Specifies the path to the policy template. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [String] - $IsSingleInstance, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Path - ) - - $securityCmdlets = Get-Module -Name SecurityCmdlets -ListAvailable - $currentUserRightsInf = ([System.IO.Path]::GetTempFileName()).Replace('tmp','inf') - $fileExists = Test-Path -Path $Path - - if ($fileExists -eq $false) - { - throw ($script:localizedData.PathNotFound) -f $Path - } - - if ($securityCmdlets) - { - Backup-SecurityPolicy -Path $currentUserRightsInf - } - else - { - Get-SecurityTemplate -Path $currentUserRightsInf | Out-Null - } - - $desiredPolicies = (Get-UserRightsAssignment -FilePath $Path).'Privilege Rights' - $currentPolicies = (Get-UserRightsAssignment -FilePath $currentUserRightsInf).'Privilege Rights' - - $policyNames = $desiredPolicies.keys - - foreach ($policy in $policyNames) - { - $policiesMatch = $false - - if ($null -eq $currentPolicies[$policy] -or $null -eq $desiredPolicies[$policy]) - { - $policiesMatch = [String]::IsNullOrEmpty($currentPolicies[$policy]) -and [String]::IsNullOrEmpty($desiredPolicies[$policy]) - } - else - { - $policiesMatch = $null -eq ( Compare-Object -ReferenceObject ($currentPolicies[$policy]).Trim() -DifferenceObject ($desiredPolicies[$policy]).Trim() ) - } - - if(-not $policiesMatch) - { - Write-Verbose -Message ($script:localizedData.NotDesiredState -f $Policy) - return $false - } - } - - # If the code made it this far all policies must be in a desired state - return $true -} - -<# - .SYNOPSIS - Removes the other security areas from policy template file so only settings for user rights assignments are returned. - .PARAMETER Path - Specifies the path to the template file to be parsed. -#> -function Format-SecurityPolicyFile -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Path - ) - - $outputPath = ([System.IO.Path]::GetTempFileName()).Replace('tmp','inf') - $content = Get-Content -Path $Path - - $privilegeRightsMatch = Select-String -Path $Path -Pattern "[Privilege Rights]" -SimpleMatch - $endOfFileMatch = Select-String -Path $Path -Pattern "Revision=1" -SimpleMatch - - $startOfFile = $privilegeRightIndex.LineNumber -1 - $endOfFile = $endOfFileMatch.LineNumber - - $content[$startOfFile..$endOfFile] | Out-File -FilePath $outputPath - - $outputPath -} - -<# - .SYNOPSIS - Invokes secedit.exe to create an INF file of the current policies. - .PARAMETER Path - The path to the export INF file that will be created. -#> -function Get-SecurityTemplate -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Path - ) - - secedit.exe /export /cfg $Path /areas "USER_Rights" -} - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecurityTemplate/MSFT_SecurityTemplate.schema.mof b/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecurityTemplate/MSFT_SecurityTemplate.schema.mof deleted file mode 100644 index bbf03b5f..00000000 --- a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecurityTemplate/MSFT_SecurityTemplate.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("SecurityTemplate")] -class MSFT_SecurityTemplate : OMI_BaseResource -{ - [Key, Description("Specifies the resource is a single instance, the value must be 'Yes'"), ValueMap{"Yes"}, Values{"Yes"}] String IsSingleInstance; - [Required, Description("The path to the desired security policy template (.inf)")] String Path; -}; - diff --git a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecurityTemplate/en-US/MSFT_SecurityTemplate.strings.psd1 b/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecurityTemplate/en-US/MSFT_SecurityTemplate.strings.psd1 deleted file mode 100644 index f48dc3d4..00000000 --- a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_SecurityTemplate/en-US/MSFT_SecurityTemplate.strings.psd1 +++ /dev/null @@ -1,6 +0,0 @@ -ConvertFrom-StringData @' - TaskSuccess = Task successfully completed - TaskFail = Task did not complete successfully - NotDesiredState = Policy: {0} not in a desired state. - PathNotFound = {0} not found. -'@ diff --git a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_UserRightsAssignment/MSFT_UserRightsAssignment.psm1 b/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_UserRightsAssignment/MSFT_UserRightsAssignment.psm1 deleted file mode 100644 index 9a2ac882..00000000 --- a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_UserRightsAssignment/MSFT_UserRightsAssignment.psm1 +++ /dev/null @@ -1,600 +0,0 @@ - -Import-Module -Name (Join-Path -Path ( Split-Path $PSScriptRoot -Parent ) ` - -ChildPath 'SecurityPolicyResourceHelper\SecurityPolicyResourceHelper.psm1') ` - -Force - -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_UserRightsAssignment' - -<# - .SYNOPSIS - Gets the current identities assigned to a user rights assignment. - .PARAMETER Policy - Specifies the policy to configure. - .PARAMETER Identity - Specifies the identity to add to a user rights assignment. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet( - "Create_a_token_object", - "Access_this_computer_from_the_network", - "Change_the_system_time", - "Deny_log_on_as_a_batch_job", - "Deny_log_on_through_Remote_Desktop_Services", - "Create_global_objects", - "Remove_computer_from_docking_station", - "Deny_access_to_this_computer_from_the_network", - "Act_as_part_of_the_operating_system", - "Modify_firmware_environment_values", - "Deny_log_on_locally", - "Access_Credential_Manager_as_a_trusted_caller", - "Restore_files_and_directories", - "Change_the_time_zone", - "Replace_a_process_level_token", - "Manage_auditing_and_security_log", - "Create_symbolic_links", - "Modify_an_object_label", - "Enable_computer_and_user_accounts_to_be_trusted_for_delegation", - "Generate_security_audits", - "Increase_a_process_working_set", - "Take_ownership_of_files_or_other_objects", - "Bypass_traverse_checking", - "Log_on_as_a_service", - "Shut_down_the_system", - "Lock_pages_in_memory", - "Impersonate_a_client_after_authentication", - "Profile_system_performance", - "Debug_programs", - "Profile_single_process", - "Allow_log_on_through_Remote_Desktop_Services", - "Allow_log_on_locally", - "Increase_scheduling_priority", - "Synchronize_directory_service_data", - "Add_workstations_to_domain", - "Adjust_memory_quotas_for_a_process", - "Obtain_an_impersonation_token_for_another_user_in_the_same_session", - "Perform_volume_maintenance_tasks", - "Load_and_unload_device_drivers", - "Force_shutdown_from_a_remote_system", - "Back_up_files_and_directories", - "Create_a_pagefile", - "Deny_log_on_as_a_service", - "Log_on_as_a_batch_job", - "Create_permanent_shared_objects" - )] - [System.String] - $Policy, - - [Parameter(Mandatory = $true)] - [AllowEmptyCollection()] - [AllowEmptyString()] - [System.String[]] - $Identity, - - [Parameter()] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [Parameter()] - [System.Boolean] - $Force - ) - - $userRightPolicy = Get-UserRightPolicy -Name $Policy - - Write-Verbose -Message "Policy: $($userRightPolicy.FriendlyName). Identity: $($userRightPolicy.Identity)" - - return @{ - Policy = $userRightPolicy.FriendlyName - Identity = $userRightPolicy.Identity - } -} - -<# - .SYNOPSIS - Gets the current identities assigned to a user rights assignment. - .PARAMETER Policy - Specifies the policy to configure. - .PARAMETER Identity - Specifies the identity to add to a user rights assignment. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet( - "Create_a_token_object", - "Access_this_computer_from_the_network", - "Change_the_system_time", - "Deny_log_on_as_a_batch_job", - "Deny_log_on_through_Remote_Desktop_Services", - "Create_global_objects", - "Remove_computer_from_docking_station", - "Deny_access_to_this_computer_from_the_network", - "Act_as_part_of_the_operating_system", - "Modify_firmware_environment_values", - "Deny_log_on_locally", - "Access_Credential_Manager_as_a_trusted_caller", - "Restore_files_and_directories", - "Change_the_time_zone", - "Replace_a_process_level_token", - "Manage_auditing_and_security_log", - "Create_symbolic_links", - "Modify_an_object_label", - "Enable_computer_and_user_accounts_to_be_trusted_for_delegation", - "Generate_security_audits", - "Increase_a_process_working_set", - "Take_ownership_of_files_or_other_objects", - "Bypass_traverse_checking", - "Log_on_as_a_service", - "Shut_down_the_system", - "Lock_pages_in_memory", - "Impersonate_a_client_after_authentication", - "Profile_system_performance", - "Debug_programs", - "Profile_single_process", - "Allow_log_on_through_Remote_Desktop_Services", - "Allow_log_on_locally", - "Increase_scheduling_priority", - "Synchronize_directory_service_data", - "Add_workstations_to_domain", - "Adjust_memory_quotas_for_a_process", - "Obtain_an_impersonation_token_for_another_user_in_the_same_session", - "Perform_volume_maintenance_tasks", - "Load_and_unload_device_drivers", - "Force_shutdown_from_a_remote_system", - "Back_up_files_and_directories", - "Create_a_pagefile", - "Deny_log_on_as_a_service", - "Log_on_as_a_batch_job", - "Create_permanent_shared_objects" - )] - [System.String] - $Policy, - - [Parameter(Mandatory = $true)] - [AllowEmptyCollection()] - [AllowEmptyString()] - [System.String[]] - $Identity, - - [Parameter()] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [Parameter()] - [System.Boolean] - $Force = $false - ) - - $userRightConstant = Get-UserRightConstant -Policy $Policy - - $script:seceditOutput = "$env:TEMP\Secedit-OutPut.txt" - $userRightsToAddInf = "$env:TEMP\userRightsToAdd.inf" - $idsToAdd = $Identity -join "," - - if ($null -eq $Identity) - { - Write-Verbose -Message ($script:localizedData.IdentityIsNullRemovingAll -f $Policy) - $idsToAdd = $null - } - else - { - $currentRights = Get-TargetResource -Policy $Policy -Identity $Identity - - $accounts = @() - switch ($Identity) - { - "[Local Account]" { $accounts += (Get-CimInstance win32_useraccount -Filter "LocalAccount='True'").SID } - "[Local Account|Administrator]" - { - $administratorsGroup = Get-CimInstance -class win32_group -filter "SID='S-1-5-32-544'" - $groupUsers = Get-CimInstance -query "select * from win32_groupuser where GroupComponent = `"Win32_Group.Domain='$($env:COMPUTERNAME)'`,Name='$($administratorsGroup.name)'`"" - [array]$usersList = $groupUsers.partcomponent | ForEach-Object { (($_ -replace '.*Win32_UserAccount.Domain="', "") -replace '",Name="', "\") -replace '"', '' } - $users += $usersList | Where-Object {$_ -match $env:COMPUTERNAME} - $accounts += $users | ForEach-Object {(Get-CimInstance win32_useraccount -Filter "Caption='$($_.Replace("\", "\\"))'").SID} - } - Default { $accounts += $_} - } - - if ($Ensure -eq "Present") - { - if (!$Force) - { - foreach ($id in $currentRights.Identity) - { - if ($id -notin $accounts) - { - $accounts += $id - } - } - } - } - else - { - $accounts = $accounts | Where-Object {$_ -notin $currentRights.Identity} - } - - $idsToAdd = $accounts -join "," - - Write-Verbose -Message ($script:localizedData.GrantingPolicyRightsToIds -f $Policy, $idsToAdd) - } - - Out-UserRightsInf -InfPolicy $userRightConstant -UserList $idsToAdd -FilePath $userRightsToAddInf - Write-Debug -Message ($script:localizedData.EchoDebugInf -f $userRightsToAddInf) - - Write-Verbose "Attempting to Set ($($idstoAdd -join ",")) for Policy $($Policy))" - Invoke-Secedit -UserRightsToAddInf $userRightsToAddInf -SecEditOutput $seceditOutput - - # Verify secedit command was successful - - if ( Test-TargetResource -Identity $Identity -Policy $Policy -Ensure $Ensure ) - { - Write-Verbose -Message ($script:localizedData.TaskSuccess) - Write-Verbose "$(($idsToAdd -join ",")) successfully given Rights ($Policy)" - } - else - { - $seceditResult = Get-Content -Path $script:seceditOutput - Write-Verbose -Message ($script:localizedData.TaskFail) - throw "$($script:localizedData.TaskFail) $($seceditResult[-1])" - } -} - -<# - .SYNOPSIS - Gets the current identities assigned to a user rights assignment. - .PARAMETER Policy - Specifies the policy to configure. - .PARAMETER Identity - Specifies the identity to add to a user rights assignment. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet( - "Create_a_token_object", - "Access_this_computer_from_the_network", - "Change_the_system_time", - "Deny_log_on_as_a_batch_job", - "Deny_log_on_through_Remote_Desktop_Services", - "Create_global_objects", - "Remove_computer_from_docking_station", - "Deny_access_to_this_computer_from_the_network", - "Act_as_part_of_the_operating_system", - "Modify_firmware_environment_values", - "Deny_log_on_locally", - "Access_Credential_Manager_as_a_trusted_caller", - "Restore_files_and_directories", - "Change_the_time_zone", - "Replace_a_process_level_token", - "Manage_auditing_and_security_log", - "Create_symbolic_links", - "Modify_an_object_label", - "Enable_computer_and_user_accounts_to_be_trusted_for_delegation", - "Generate_security_audits", - "Increase_a_process_working_set", - "Take_ownership_of_files_or_other_objects", - "Bypass_traverse_checking", - "Log_on_as_a_service", - "Shut_down_the_system", - "Lock_pages_in_memory", - "Impersonate_a_client_after_authentication", - "Profile_system_performance", - "Debug_programs", - "Profile_single_process", - "Allow_log_on_through_Remote_Desktop_Services", - "Allow_log_on_locally", - "Increase_scheduling_priority", - "Synchronize_directory_service_data", - "Add_workstations_to_domain", - "Adjust_memory_quotas_for_a_process", - "Obtain_an_impersonation_token_for_another_user_in_the_same_session", - "Perform_volume_maintenance_tasks", - "Load_and_unload_device_drivers", - "Force_shutdown_from_a_remote_system", - "Back_up_files_and_directories", - "Create_a_pagefile", - "Deny_log_on_as_a_service", - "Log_on_as_a_batch_job", - "Create_permanent_shared_objects" - )] - [System.String] - $Policy, - - [Parameter(Mandatory = $true)] - [AllowEmptyCollection()] - [AllowEmptyString()] - [System.String[]] - $Identity, - - [Parameter()] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [Parameter()] - [System.Boolean] - $Force - ) - - $currentUserRights = Get-UserRightPolicy -Name $Policy - - if ( Test-IdentityIsNull -Identity $Identity ) - { - Write-Verbose -Message ($script:localizedData.TestIdentityIsPresentOnPolicy -f "NULL", $Policy) - - if ( $null -eq $currentUserRights.Identity ) - { - Write-Verbose -Message ($script:localizedData.NoIdentitiesFoundOnPolicy -f $Policy) - return $true - } - else - { - Write-Verbose -Message ($script:localizedData.IdentityFoundExpectedNull -f $Policy) - return $false - } - } - - Write-Verbose -Message ($script:localizedData.TestIdentityIsPresentOnPolicy -f $($Identity -join ","), $Policy) - - $accounts = @() - switch ($Identity) - { - "[Local Account]" { $accounts += (Get-CimInstance Win32_UserAccount -Filter "LocalAccount='True'").SID } - "[Local Account|Administrator]" - { - $administratorsGroup = Get-CimInstance -class Win32_Group -filter "SID='S-1-5-32-544'" - $groupUsers = Get-CimInstance -Query "select * from win32_groupuser where GroupComponent = `"Win32_Group.Domain='$($env:COMPUTERNAME)'`,Name='$($administratorsGroup.name)'`"" - [array]$usersList = $groupUsers.partcomponent | ForEach-Object { (($_ -replace '.*Win32_UserAccount.Domain="', "") -replace '",Name="', "\") -replace '"', '' } - $users += $usersList | Where-Object {$_ -match $env:COMPUTERNAME} - $accounts += $users | ForEach-Object {(Get-CimInstance Win32_UserAccount -Filter "Caption='$($_.Replace("\", "\\"))'").SID} - } - Default - { - # To test for identities we have to do a dump of the security database the dump does not specify the - # computerName on local accounts. So we need to test for that scenario. - if ( $_ -match '\\' -and $_ -notmatch 'Builtin') - { - if ( Test-IsLocalAccount -Identity $_ ) - { - $accounts += ( $_ -split '\\' )[-1] - } - else - { - $accounts += ConvertTo-LocalFriendlyName $_ - } - } - elseif( ($_ -match 'Builtin\\') -or ($_ -match 'NT Authority\\') -or ($_ -match 'NT Service\\') -or ($_ -match 'Window Manager\\') ) - { - $accounts += $_ - } - else - { - $accounts += ConvertTo-LocalFriendlyName $(($_) -replace '\*') - } - } - } - - if ($Ensure -eq "Present") - { - $usersWithoutRight = $accounts | Where-Object { $_ -notin $currentUserRights.Identity } - if ($usersWithoutRight) - { - Write-Verbose "$($usersWithoutRight -join ",") do not have Privilege ($Policy)" - return $false - } - - if ($Force) - { - $effectiveUsers = $currentUserRights.Identity | Where-Object {$_ -notin $accounts} - if ($effectiveUsers.Count -gt 0) - { - Write-Verbose "$($effectiveUsers -join ",") are extraneous users with Privilege ($Policy)" - return $false - } - } - - $returnValue = $true - } - else - { - $UsersWithRight = $accounts | Where-Object {$_ -in $userRights.Identity} - if ($UsersWithRight.Count -gt 0) - { - Write-Verbose "$($UsersWithRight) should NOT have Privilege ($Policy)" - return $false - } - - $returnValue = $true - } - - # If the code made it this far all identities have the desired user rights - return $returnValue -} - -<# - .SYNOPSIS - Returns an object of the identities assigned to a user rights assignment - .PARAMETER Name - Name of the policy to inspect - .EXAMPLE - Get-UserRightPolicy -Name Create_a_token_object -#> -function Get-UserRightPolicy -{ - [OutputType([PSObject])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet( - "Create_a_token_object", - "Access_this_computer_from_the_network", - "Change_the_system_time", - "Deny_log_on_as_a_batch_job", - "Deny_log_on_through_Remote_Desktop_Services", - "Create_global_objects", - "Remove_computer_from_docking_station", - "Deny_access_to_this_computer_from_the_network", - "Act_as_part_of_the_operating_system", - "Modify_firmware_environment_values", - "Deny_log_on_locally", - "Access_Credential_Manager_as_a_trusted_caller", - "Restore_files_and_directories", - "Change_the_time_zone", - "Replace_a_process_level_token", - "Manage_auditing_and_security_log", - "Create_symbolic_links", - "Modify_an_object_label", - "Enable_computer_and_user_accounts_to_be_trusted_for_delegation", - "Generate_security_audits", - "Increase_a_process_working_set", - "Take_ownership_of_files_or_other_objects", - "Bypass_traverse_checking", - "Log_on_as_a_service", - "Shut_down_the_system", - "Lock_pages_in_memory", - "Impersonate_a_client_after_authentication", - "Profile_system_performance", - "Debug_programs", - "Profile_single_process", - "Allow_log_on_through_Remote_Desktop_Services", - "Allow_log_on_locally", - "Increase_scheduling_priority", - "Synchronize_directory_service_data", - "Add_workstations_to_domain", - "Adjust_memory_quotas_for_a_process", - "Obtain_an_impersonation_token_for_another_user_in_the_same_session", - "Perform_volume_maintenance_tasks", - "Load_and_unload_device_drivers", - "Force_shutdown_from_a_remote_system", - "Back_up_files_and_directories", - "Create_a_pagefile", - "Deny_log_on_as_a_service", - "Log_on_as_a_batch_job", - "Create_permanent_shared_objects" - )] - [System.String] - $Name - ) - - $userRightConstant = Get-UserRightConstant -Policy $Name - - $userRights = Get-SecurityPolicy -Area 'USER_RIGHTS' - - [PSObject]@{ - Constant = $userRightConstant - FriendlyName = $Name - Identity = $userRights[$userRightConstant] - } -} - -<# - .SYNOPSIS - Converts policy names that match the GUI to the abbreviated names used by secedit.exe - .PARAMETER Policy - Name of the policy to get friendly name for. -#> -function Get-UserRightConstant -{ - [OutputType([string])] - [CmdletBinding()] - Param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Policy - ) - - $friendlyNames = Get-Content -Path $PSScriptRoot\UserRightsFriendlyNameConversions.psd1 -Raw | - ConvertFrom-StringData - - $friendlyNames[$Policy] -} - -<# - .SYNOPSIS - Creates Inf with desired configuration for a user rights assignment that is passed to secedit.exe - .PARAMETER InfPolicy - Name of user rights assignment policy - .PARAMETER UserList - List of users to be added to policy - .PARAMETER FilePath - Path to where the Inf will be created - .EXAMPLE - Out-UserRightsInf -InfPolicy SeTrustedCredManAccessPrivilege -UserList Contoso\User1 -FilePath C:\Scratch\Secedit.Inf -#> -function Out-UserRightsInf -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $InfPolicy, - - [Parameter(Mandatory = $true)] - [AllowEmptyString()] - [AllowNull()] - [System.String] - $UserList, - - [Parameter(Mandatory = $true)] - [System.String] - $FilePath - ) - - $infTemplate =@" -[Unicode] -Unicode=yes -[Privilege Rights] -$InfPolicy = $UserList -[Version] -signature="`$CHICAGO`$" -Revision=1 -"@ - - $null = Out-File -InputObject $infTemplate -FilePath $FilePath -Encoding unicode -} -<# - .SYNOPSIS - Test if an account is a local account - .PARAMETER Identity - The identity of the user or group to be added or removed from the user rights assignment -#> -function Test-IsLocalAccount -{ - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Identity - ) - - $localAccounts = Get-CimInstance Win32_UserAccount -Filter "LocalAccount='True'" - - if ( $localAccounts.Caption -contains $Identity ) - { - return $true - } - else - { - return $false - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_UserRightsAssignment/MSFT_UserRightsAssignment.schema.mof b/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_UserRightsAssignment/MSFT_UserRightsAssignment.schema.mof deleted file mode 100644 index 47b5abfb..00000000 --- a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_UserRightsAssignment/MSFT_UserRightsAssignment.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("UserRightsAssignment")] -class MSFT_UserRightsAssignment : OMI_BaseResource -{ - [Key, Description("The policy name of the user rights assignment to be configured."), ValueMap{"Create_a_token_object","Access_this_computer_from_the_network","Change_the_system_time","Deny_log_on_as_a_batch_job","Deny_log_on_through_Remote_Desktop_Services","Create_global_objects","Remove_computer_from_docking_station","Deny_access_to_this_computer_from_the_network","Act_as_part_of_the_operating_system","Modify_firmware_environment_values","Deny_log_on_locally","Access_Credential_Manager_as_a_trusted_caller","Restore_files_and_directories","Change_the_time_zone","Replace_a_process_level_token","Manage_auditing_and_security_log","Create_symbolic_links","Modify_an_object_label","Enable_computer_and_user_accounts_to_be_trusted_for_delegation","Generate_security_audits","Increase_a_process_working_set","Take_ownership_of_files_or_other_objects","Bypass_traverse_checking","Log_on_as_a_service","Shut_down_the_system","Lock_pages_in_memory","Impersonate_a_client_after_authentication","Profile_system_performance","Debug_programs","Profile_single_process","Allow_log_on_through_Remote_Desktop_Services","Allow_log_on_locally","Increase_scheduling_priority","Synchronize_directory_service_data","Add_workstations_to_domain","Adjust_memory_quotas_for_a_process","Obtain_an_impersonation_token_for_another_user_in_the_same_session","Perform_volume_maintenance_tasks","Load_and_unload_device_drivers","Force_shutdown_from_a_remote_system","Back_up_files_and_directories","Create_a_pagefile","Deny_log_on_as_a_service","Log_on_as_a_batch_job","Create_permanent_shared_objects"}, Values{"Create_a_token_object","Access_this_computer_from_the_network","Change_the_system_time","Deny_log_on_as_a_batch_job","Deny_log_on_through_Remote_Desktop_Services","Create_global_objects","Remove_computer_from_docking_station","Deny_access_to_this_computer_from_the_network","Act_as_part_of_the_operating_system","Modify_firmware_environment_values","Deny_log_on_locally","Access_Credential_Manager_as_a_trusted_caller","Restore_files_and_directories","Change_the_time_zone","Replace_a_process_level_token","Manage_auditing_and_security_log","Create_symbolic_links","Modify_an_object_label","Enable_computer_and_user_accounts_to_be_trusted_for_delegation","Generate_security_audits","Increase_a_process_working_set","Take_ownership_of_files_or_other_objects","Bypass_traverse_checking","Log_on_as_a_service","Shut_down_the_system","Lock_pages_in_memory","Impersonate_a_client_after_authentication","Profile_system_performance","Debug_programs","Profile_single_process","Allow_log_on_through_Remote_Desktop_Services","Allow_log_on_locally","Increase_scheduling_priority","Synchronize_directory_service_data","Add_workstations_to_domain","Adjust_memory_quotas_for_a_process","Obtain_an_impersonation_token_for_another_user_in_the_same_session","Perform_volume_maintenance_tasks","Load_and_unload_device_drivers","Force_shutdown_from_a_remote_system","Back_up_files_and_directories","Create_a_pagefile","Deny_log_on_as_a_service","Log_on_as_a_batch_job","Create_permanent_shared_objects"}] String Policy; - [Required, Description("The identity of the user or group to be added or removed from the user rights assignment.")] String Identity[]; - [Write, Description("Specifies whether to Force the change")] Boolean Force; - [Write, Description("Desired state of resource."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; diff --git a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_UserRightsAssignment/UserRightsFriendlyNameConversions.psd1 b/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_UserRightsAssignment/UserRightsFriendlyNameConversions.psd1 deleted file mode 100644 index 28618e20..00000000 --- a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_UserRightsAssignment/UserRightsFriendlyNameConversions.psd1 +++ /dev/null @@ -1,45 +0,0 @@ -Access_Credential_Manager_as_a_trusted_caller = SeTrustedCredManAccessPrivilege -Access_this_computer_from_the_network = SeNetworkLogonRight -Act_as_part_of_the_operating_system = SeTcbPrivilege -Add_workstations_to_domain = SeMachineAccountPrivilege -Adjust_memory_quotas_for_a_process = SeIncreaseQuotaPrivilege -Allow_log_on_locally = SeInteractiveLogonRight -Allow_log_on_through_Remote_Desktop_Services = SeRemoteInteractiveLogonRight -Back_up_files_and_directories = SeBackupPrivilege -Bypass_traverse_checking = SeChangeNotifyPrivilege -Change_the_system_time = SeSystemtimePrivilege -Change_the_time_zone = SeTimeZonePrivilege -Create_a_pagefile = SeCreatePagefilePrivilege -Create_a_token_object = SeCreateTokenPrivilege -Create_global_objects = SeCreateGlobalPrivilege -Create_permanent_shared_objects = SeCreatePermanentPrivilege -Create_symbolic_links = SeCreateSymbolicLinkPrivilege -Debug_programs = SeDebugPrivilege -Deny_access_to_this_computer_from_the_network = SeDenyNetworkLogonRight -Deny_log_on_as_a_batch_job = SeDenyBatchLogonRight -Deny_log_on_as_a_service = SeDenyServiceLogonRight -Deny_log_on_locally = SeDenyInteractiveLogonRight -Deny_log_on_through_Remote_Desktop_Services = SeDenyRemoteInteractiveLogonRight -Enable_computer_and_user_accounts_to_be_trusted_for_delegation = SeEnableDelegationPrivilege -Force_shutdown_from_a_remote_system = SeRemoteShutdownPrivilege -Generate_security_audits = SeAuditPrivilege -Impersonate_a_client_after_authentication = SeImpersonatePrivilege -Increase_a_process_working_set = SeIncreaseWorkingSetPrivilege -Increase_scheduling_priority = SeIncreaseBasePriorityPrivilege -Load_and_unload_device_drivers = SeLoadDriverPrivilege -Lock_pages_in_memory = SeLockMemoryPrivilege -Log_on_as_a_batch_job = SeBatchLogonRight -Log_on_as_a_service = SeServiceLogonRight -Manage_auditing_and_security_log = SeSecurityPrivilege -Modify_an_object_label = SeRelabelPrivilege -Modify_firmware_environment_values = SeSystemEnvironmentPrivilege -Obtain_an_impersonation_token_for_another_user_in_the_same_session = SeDelegateSessionUserImpersonatePrivilege -Perform_volume_maintenance_tasks = SeManageVolumePrivilege -Profile_single_process = SeProfileSingleProcessPrivilege -Profile_system_performance = SeSystemProfilePrivilege -Remove_computer_from_docking_station = SeUndockPrivilege -Replace_a_process_level_token = SeAssignPrimaryTokenPrivilege -Restore_files_and_directories = SeRestorePrivilege -Shut_down_the_system = SeShutdownPrivilege -Synchronize_directory_service_data = SeSyncAgentPrivilege -Take_ownership_of_files_or_other_objects = SeTakeOwnershipPrivilege diff --git a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_UserRightsAssignment/en-US/MSFT_UserRightsAssignment.strings.psd1 b/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_UserRightsAssignment/en-US/MSFT_UserRightsAssignment.strings.psd1 deleted file mode 100644 index 23e901e8..00000000 --- a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/MSFT_UserRightsAssignment/en-US/MSFT_UserRightsAssignment.strings.psd1 +++ /dev/null @@ -1,13 +0,0 @@ -ConvertFrom-StringData @' - IdentityIsNullRemovingAll = Identity is NULL. Removing all Identities from {0} - GrantingPolicyRightsToIds = Granting {0} rights to {1} - TaskSuccess = Task successfully completed - TaskFail = Task did not complete successfully - TestIdentityIsPresentOnPolicy = Testing {0} is present on policy {1} - NoIdentitiesFoundOnPolicy = No identities found on {0} - IdNotFoundOnPolicy = {0} not found on {1} - ErrorCantTranslateSID = Error processing {0}. Error message: {1} - EchoDebugInf = Temp inf {0} - IdentityFoundExpectedNull = Identity found on {0}. Expected NULL - IdentityNotSpecified = An Identity must be sepcified even if it is NULL -'@ diff --git a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/SecurityPolicyResourceHelper/SecurityPolicyResourceHelper.psm1 b/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/SecurityPolicyResourceHelper/SecurityPolicyResourceHelper.psm1 deleted file mode 100644 index 86302c66..00000000 --- a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/SecurityPolicyResourceHelper/SecurityPolicyResourceHelper.psm1 +++ /dev/null @@ -1,322 +0,0 @@ - -<# - .SYNOPSIS - Retrieves the localized string data based on the machine's culture. - Falls back to en-US strings if the machine's culture is not supported. - - .PARAMETER ResourceName - The name of the resource as it appears before '.strings.psd1' of the localized string file. - For example: - AuditPolicySubcategory: MSFT_AuditPolicySubcategory - AuditPolicyOption: MSFT_AuditPolicyOption -#> -function Get-LocalizedData -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true, ParameterSetName = 'resource')] - [ValidateNotNullOrEmpty()] - [String] - $ResourceName, - - [Parameter(Mandatory = $true, ParameterSetName = 'helper')] - [ValidateNotNullOrEmpty()] - [String] - $HelperName - ) - - # With the helper module just update the name and path variables as if it were a resource. - if ($PSCmdlet.ParameterSetName -eq 'helper') - { - $resourceDirectory = $PSScriptRoot - $ResourceName = $HelperName - } - else - { - # Step up one additional level to build the correct path to the resource culture. - $resourceDirectory = Join-Path -Path ( Split-Path $PSScriptRoot -Parent ) ` - -ChildPath $ResourceName - } - - $localizedStringFileLocation = Join-Path -Path $resourceDirectory -ChildPath $PSUICulture - - if (-not (Test-Path -Path $localizedStringFileLocation)) - { - # Fallback to en-US - - $localizedStringFileLocation = Join-Path -Path $resourceDirectory -ChildPath 'en-US' - } - - Import-LocalizedData ` - -BindingVariable 'localizedData' ` - -FileName "$ResourceName.strings.psd1" ` - -BaseDirectory $localizedStringFileLocation - - return $localizedData -} - -<# - .SYNOPSIS - Wrapper around secedit.exe used to make changes - .PARAMETER UserRightsToAddInf - Path to an INF file with desired user rights assignment policy configuration - .PARAMETER SeceditOutput - Path to secedit log file output - .EXAMPLE - Invoke-Secedit -UserRightsToAddInf C:\secedit.inf -SeceditOutput C:\seceditLog.txt -#> -function Invoke-Secedit -{ - [OutputType([void])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $UserRightsToAddInf, - - [Parameter(Mandatory = $true)] - [System.String] - $SeceditOutput, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $OverWrite - ) - - $script:localizedData = Get-LocalizedData -HelperName 'SecurityPolicyResourceHelper' - - $tempDB = "$env:TEMP\DscSecedit.sdb" - $arguments = "/configure /db $tempDB /cfg $userRightsToAddInf" - - if ($OverWrite) - { - $arguments = $arguments + " /overwrite /quiet" - } - - Start-Process -FilePath secedit.exe -ArgumentList $arguments -RedirectStandardOutput $seceditOutput -NoNewWindow -Wait -} - -function Get-SecurityPolicy -{ - [OutputType([Hashtable])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet("SECURITYPOLICY","GROUP_MGMT","USER_RIGHTS","REGKEYS","FILESTORE","SERVICES")] - [System.String] - $Area - ) - - $currentSecurityPolicyFilePath = Join-Path -Path $env:temp -ChildPath 'SecurityPolicy.inf' - Write-Debug -Message ($localizedData.EchoDebugInf -f $currentSecurityPolicyFilePath) - - secedit.exe /export /cfg $currentSecurityPolicyFilePath /areas $Area | Out-Null - - $policyConfiguration = @{} - switch -regex -file $currentSecurityPolicyFilePath - { - "^\[(.+)\]" # Section - { - $section = $matches[1] - $policyConfiguration[$section] = @{} - $CommentCount = 0 - } - "^(;.*)$" # Comment - { - $value = $matches[1] - $commentCount = $commentCount + 1 - $name = "Comment" + $commentCount - $policyConfiguration[$section][$name] = $value - } - "(.+?)\s*=(.*)" # Key - { - $name,$value = $matches[1..2] -replace "\*" - $policyConfiguration[$section][$name] = @(ConvertTo-LocalFriendlyName $($value -split ',')) - } - } - - Switch($Area) - { - "USER_RIGHTS" - { - $returnValue = $policyConfiguration.'Privilege Rights' - continue - } - } - - # Cleanup the temp file - Remove-Item -Path $currentSecurityPolicyFilePath - - return $returnValue -} - -<# - .SYNOPSIS - Parses an INF file produced by 'secedit.exe /export' and returns an object of identites assigned to a user rights assignment policy - .PARAMETER FilePath - Path to an INF file - .EXAMPLE - Get-UserRightsAssignment -FilePath C:\seceditOutput.inf -#> -function Get-UserRightsAssignment -{ - [OutputType([Hashtable])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $FilePath - ) - - $policyConfiguration = @{} - switch -regex -file $FilePath - { - "^\[(.+)\]" # Section - { - $section = $matches[1] - $policyConfiguration[$section] = @{} - $CommentCount = 0 - } - "^(;.*)$" # Comment - { - $value = $matches[1] - $commentCount = $commentCount + 1 - $name = "Comment" + $commentCount - $policyConfiguration[$section][$name] = $value - } - "(.+?)\s*=(.*)" # Key - { - $name,$value = $matches[1..2] -replace "\*" - $policyConfiguration[$section][$name] = @(ConvertTo-LocalFriendlyName $($value -split ',')) - } - } - return $policyConfiguration -} - -<# - .SYNOPSIS - Converts SID to a friendly name - .PARAMETER SID - SID of an identity being converted - .EXAMPLE - ConvertTo-LocalFriendlyName -SID 'S-1-5-21-3623811015-3361044348-30300820-1013' -#> -function ConvertTo-LocalFriendlyName -{ - [OutputType([String[]])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String[]] - $SID - ) - - $localizedData = Get-LocalizedData -HelperName 'SecurityPolicyResourceHelper' - - $friendlyNames = [String[]]@() - - foreach ($id in $SID) - { - $id = $id.Trim() - - Write-Verbose "Received Identity ($id)" - if ($null -ne $id -and $id -match '^(S-[0-9-]{3,})') - { - try - { - Write-Verbose -Message ($localizedData:TranslateID -f $id) - $securityIdentifier = [System.Security.Principal.SecurityIdentifier]($id) - $user = $securityIdentifier.Translate([System.Security.Principal.NTAccount]) - $friendlyNames += $user.value - Write-Verbose -Message ($localizedData:IdTranslatesTo -f $id,$user.Value) - } - catch - { - Write-Warning -Message ($localizedData.ErrorCantTranslateSID -f $id, $($_.Exception.Message) ) - } - } - elseIf ( ( Get-DomainRole ) -eq 'DomainController') - { - $friendlyNames += "$($env:USERDOMAIN + '\' + $($id))" - } - elseIf ($id -notmatch '^S-') - { - $friendlyNames += "$($id)" - } - } - - return $friendlyNames -} - -<# - .SYNOPSIS - Converts int value from the Win32_ComputerSystem class into its text equivalent -#> -function Get-DomainRole -{ - [OutputType([String])] - [CmdletBinding()] - param() - - $domainRoleInt = (Get-CimInstance -ClassName Win32_ComputerSystem).DomainRole - - if ($domainRoleInt -eq 0) - { - $domainRole = 'StandaloneWorkstation' - } - elseif($domainRoleInt -eq 1) - { - $domainRole = 'MemberWorkstation' - } - elseif($domainRoleInt -eq 2) - { - $domainRole = 'StandaloneServer' - } - elseif($domainRoleInt -eq 3) - { - $domainRole = 'MemberServer' - } - else - { - $domainRole = 'DomainController' - } - - return $domainRole -} - - -<# - .SYNOPSIS - Tests if the provided Identity is null - .PARAMETER Identity - The identity string to test -#> -function Test-IdentityIsNull -{ - [OutputType([bool])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [AllowEmptyCollection()] - [AllowEmptyString()] - [AllowNull()] - [System.String[]] - $Identity - ) - - if ( $null -eq $Identity -or [System.String]::IsNullOrWhiteSpace($Identity) ) - { - return $true - } - else - { - return $false - } -} diff --git a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/SecurityPolicyResourceHelper/en-US/SecurityPolicyResourceHelper.strings.psd1 b/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/SecurityPolicyResourceHelper/en-US/SecurityPolicyResourceHelper.strings.psd1 deleted file mode 100644 index 481ad542..00000000 --- a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/DSCResources/SecurityPolicyResourceHelper/en-US/SecurityPolicyResourceHelper.strings.psd1 +++ /dev/null @@ -1,6 +0,0 @@ -ConvertFrom-StringData @' - EchoDebugInf = Temp inf {0} - ErrorCantTranslateSID = Error processing {0}. Error message: {1} - TranslateID = Translating Identity ({0}) - IdTranslatesTo = Identity ({0}) is equal to $({1})" -'@ diff --git a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/LICENSE b/lib/puppet_x/dsc_resources/SecurityPolicyDsc/LICENSE deleted file mode 100644 index 9f66f02b..00000000 --- a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Microsoft Corporation - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/SecurityPolicyDsc.psd1 b/lib/puppet_x/dsc_resources/SecurityPolicyDsc/SecurityPolicyDsc.psd1 deleted file mode 100644 index 779c8d3a..00000000 --- a/lib/puppet_x/dsc_resources/SecurityPolicyDsc/SecurityPolicyDsc.psd1 +++ /dev/null @@ -1,63 +0,0 @@ -# -# Module manifest for module 'SecurityPolicyDsc' -# -# Generated by: Jason Walker -# -# Generated on: 12/29/2015 -# - -@{ - -# Version number of this module. -ModuleVersion = '1.5.0.0' - -# ID used to uniquely identify this module -GUID = 'e2b73194-69ef-4fa6-b949-9f62ebe04989' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2016 Microsoft. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'This module is a wrapper around secedit.exe which provides the ability to configure user rights assignments' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource', 'Secedit','SecurityPolicyDsc') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/SecurityPolicyDsc/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/SecurityPolicyDsc' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* Refactored user rights assignment to read and test easier. - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable - -} - - - - - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/MSFT_SPAccessServiceApp.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/MSFT_SPAccessServiceApp.psm1 deleted file mode 100644 index 00e023f1..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/MSFT_SPAccessServiceApp.psm1 +++ /dev/null @@ -1,194 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting Access Services service app '$Name'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApps = Get-SPServiceApplication -Name $params.Name -ErrorAction SilentlyContinue - $nullReturn = @{ - Name = $params.Name - ApplicationPool = $params.ApplicationPool - DatabaseServer = $params.DatabaseServer - Ensure = "Absent" - InstallAccount = $params.InstallAccount - } - if ($null -eq $serviceApps) - { - return $nullReturn - } - $serviceApp = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Access.Services.MossHost.AccessServicesWebServiceApplication" - } - - if ($null -eq $serviceApp) - { - return $nullReturn - } - else - { - ### Find database server name - $context = [Microsoft.SharePoint.SPServiceContext]::GetContext($serviceApp.ServiceApplicationProxyGroup, [Microsoft.SharePoint.SPSiteSubscriptionIdentifier]::Default) - $dbserver = (Get-SPAccessServicesDatabaseServer $context).ServerName - return @{ - Name = $serviceApp.DisplayName - DatabaseServer = $dbserver - ApplicationPool = $serviceApp.ApplicationPool.Name - Ensure = "Present" - } - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting Access Services service app '$Name'" - - $result = Get-TargetResource @PSBoundParameters - - if ($result.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - Write-Verbose -Message "Creating Access Services Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - - $params = $args[0] - - $app = New-SPAccessServicesApplication -Name $params.Name ` - -ApplicationPool $params.ApplicationPool ` - -Default ` - -DatabaseServer $params.DatabaseServer - - $app | New-SPAccessServicesApplicationProxy | Out-Null - } - } - if ($Ensure -eq "Absent") - { - Write-Verbose -Message "Removing Access Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - - $params = $args[0] - - $app = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Access.Services.MossHost.AccessServicesWebServiceApplication" - } - - $proxies = Get-SPServiceApplicationProxy - foreach($proxyInstance in $proxies) - { - if($app.IsConnected($proxyInstance)) - { - $proxyInstance.Delete() - } - } - - Remove-SPServiceApplication -Identity $app -Confirm:$false - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing for Access Service Application '$Name'" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($CurrentValues.DatabaseServer -ne $DatabaseServer) - { - Write-Verbose -Message ("Specified database server does not match the actual " + ` - "database server. This resource cannot move the database " + ` - "to a different SQL instance.") - return $false - } - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/MSFT_SPAccessServiceApp.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/MSFT_SPAccessServiceApp.schema.mof deleted file mode 100644 index 0539bc63..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/MSFT_SPAccessServiceApp.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPAccessServiceApp")] -class MSFT_SPAccessServiceApp : OMI_BaseResource -{ - [Key, Description("The name of the service application")] string Name; - [Required, Description("The name of the application pool to run the service app in")] string ApplicationPool; - [Required, Description("The name of the database server to host Access Services databases")] string DatabaseServer; - [Write, Description("Present ensures service app exists, absent ensures it is removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAccessServices2010/MSFT_SPAccessServices2010.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAccessServices2010/MSFT_SPAccessServices2010.psm1 deleted file mode 100644 index 286f9ddd..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAccessServices2010/MSFT_SPAccessServices2010.psm1 +++ /dev/null @@ -1,185 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting Access 2010 Service app '$Name'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - $serviceApps = Get-SPServiceApplication -Name $params.Name ` - -ErrorAction SilentlyContinue - $nullReturn = @{ - Name = $params.Name - ApplicationPool = $params.ApplicationPool - Ensure = "Absent" - } - if($null -eq $serviceApps) - { - return $nullReturn - } - - $serviceApp = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Access.Server.MossHost.AccessServerWebServiceApplication" - } - - if($null -eq $serviceApp) - { - return $nullReturn - } - else - { - return @{ - Name = $serviceApp.DisplayName - ApplicationPool = $serviceApp.ApplicationPool.Name - Ensure = "Present" - InstallAccount = $params.InstallAccount - } - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting Access 2010 Services app '$Name'" - $result = Get-TargetResource @PSBoundParameters - - if($result.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - Write-Verbose "Creating Access 2010 Service Application '$Name'" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - $accessApp = New-SPAccessServiceApplication -Name $params.Name ` - -ApplicationPool $params.ApplicationPool - } - } - if($result.Ensure -eq "Present" -and $Ensure -eq "Present") - { - Write-Verbose "Updating Access 2010 service application '$Name'" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - $apps = Get-SPServiceApplication -Name $params.Name ` - -ErrorAction SilentlyContinue - if($null -ne $apps) - { - $app = $apps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Access.Server.MossHost.AccessServerWebServiceApplication" - } - if($null -ne $app) - { - $appPool = Get-SPServiceApplicationPool -Identity $params.ApplicationPool - if($null -ne $appPool) - { - $app.ApplicationPool = $appPool - $app.Update() - return; - } - } - } - - $accessApp = New-SPAccessServiceApplication -Name $params.Name ` - -ApplicationPool $params.ApplicationPool - } - } - if($Ensure -eq "Absent") - { - Write-Verbose "Removing Access 2010 service application '$Name'" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $apps = Get-SPServiceApplication -Name $params.Name ` - -ErrorAction SilentlyContinue - if($null -eq $apps) - { - return - } - - $app = $apps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Access.Server.MossHost.AccessServerWebServiceApplication" - } - - if($null -ne $app) - { - Remove-SPServiceApplication -Identity $app -Confirm:$false - } - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [System.Management.Automation.PSCredential] - $InstallAccount - ) - Write-Verbose -Message "Testing Access 2010 service app '$Name'" - - $PSBoundParameters.Ensure = $Ensure - $CurrentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Name", "ApplicationPool", "Ensure") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAccessServices2010/MSFT_SPAccessServices2010.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAccessServices2010/MSFT_SPAccessServices2010.schema.mof deleted file mode 100644 index 9d5e21e6..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAccessServices2010/MSFT_SPAccessServices2010.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("SPAccessServices2010")] -class MSFT_SPAccessServices2010 : OMI_BaseResource -{ - [Key, Description("The name of the service application")] String Name; - [Required, Description("The name of the application pool to run the service app in")] String ApplicationPool; - [Write, Description("Present ensures service app exists, absent ensures it is removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, EmbeddedInstance("MSFT_Credential"), Description("POWERSHELL 4 ONLY: The account to run thsi resource as, use PsDscRunAsCredential if using PowerShell 5")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/MSFT_SPAlternateUrl.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/MSFT_SPAlternateUrl.psm1 deleted file mode 100644 index fb69fa0b..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/MSFT_SPAlternateUrl.psm1 +++ /dev/null @@ -1,192 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $true)] - [ValidateSet("Default","Intranet","Extranet","Custom","Internet")] - [System.String] - $Zone, - - [parameter(Mandatory = $false)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting Alternate URL for $Zone in $WebAppUrl" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $aam = Get-SPAlternateURL -WebApplication $params.WebAppUrl ` - -Zone $params.Zone ` - -ErrorAction SilentlyContinue | Select-Object -First 1 - $url = $null - $Ensure = "Absent" - - if (($null -eq $aam) -and ($params.Zone -eq "Default")) - { - # The default zone URL will change the URL of the web app, so assuming it has been applied - # correctly then the first call there will fail as the WebAppUrl parameter will no longer - # be the URL of the web app. So the assumption is that if a matching default entry with - # the new public URL is found then it can be returned and will pass a test. - $aam = Get-SPAlternateURL -Zone $params.Zone | Where-Object -FilterScript { - $_.PublicUrl -eq $params.Url - } | Select-Object -First 1 - } - - if ($null -ne $aam) { - $url = $aam.PublicUrl - $Ensure = "Present" - } - - return @{ - WebAppUrl = $params.WebAppUrl - Zone = $params.Zone - Url = $url - Ensure = $Ensure - InstallAccount = $params.InstallAccount - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $true)] - [ValidateSet("Default","Intranet","Extranet","Custom","Internet")] - [System.String] - $Zone, - - [parameter(Mandatory = $false)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - - ) - - Write-Verbose -Message "Setting Alternate URL for $Zone in $WebAppUrl" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($Ensure -eq "Present") - { - if ([string]::IsNullOrEmpty($Url)) - { - throw "URL must be specified when ensure is set to present" - } - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments ($PSBoundParameters, $CurrentValues) ` - -ScriptBlock { - $params = $args[0] - $CurrentValues = $args[1] - - if ([string]::IsNullOrEmpty($CurrentValues.Url)) - { - New-SPAlternateURL -WebApplication $params.WebAppUrl ` - -Url $params.Url ` - -Zone $params.Zone - } - else - { - Get-SPAlternateURL -WebApplication $params.WebAppUrl ` - -Zone $params.Zone | Set-SPAlternateURL -Url $params.Url - } - } - } - else - { - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - Get-SPAlternateURL -WebApplication $params.WebAppUrl ` - -Zone $params.Zone | Remove-SPAlternateURL -Confirm:$false - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $true)] - [ValidateSet("Default","Intranet","Extranet","Custom","Internet")] - [System.String] - $Zone, - - [parameter(Mandatory = $false)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - - ) - - Write-Verbose -Message "Testing Alternate URL for $Zone in $WebAppUrl" - - $PSBoundParameters.Ensure = $Ensure - - if ([string]::IsNullOrEmpty($Url) -and $Ensure -eq "Present") - { - throw "URL must be specified when ensure is set to present" - } - - if ($Ensure -eq "Present") - { - return Test-SPDscParameterState -CurrentValues (Get-TargetResource @PSBoundParameters) ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Url", "Ensure") - } - else - { - return Test-SPDscParameterState -CurrentValues (Get-TargetResource @PSBoundParameters) ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") - } -} diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/MSFT_SPAlternateUrl.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/MSFT_SPAlternateUrl.schema.mof deleted file mode 100644 index f7fb4f87..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/MSFT_SPAlternateUrl.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPAlternateUrl")] -class MSFT_SPAlternateUrl : OMI_BaseResource -{ - [Key, Description("The URL of the web application to apply the alternate URL to")] String WebAppUrl; - [Key, Description("The Zone to use for the alternate URL"), ValueMap{"Default","Intranet","Extranet","Custom","Internet"}, Values{"Default","Intranet","Extranet","Custom","Internet"}] String Zone; - [Write, Description("The new alternate URL")] String Url; - [Write, Description("Present ensures the URL is set for this zone on this web app, Absent ensures it is removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/MSFT_SPAntivirusSettings.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/MSFT_SPAntivirusSettings.psm1 deleted file mode 100644 index 5d522b19..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/MSFT_SPAntivirusSettings.psm1 +++ /dev/null @@ -1,206 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.Boolean] - $ScanOnDownload, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ScanOnUpload, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowDownloadInfected, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AttemptToClean, - - [parameter(Mandatory = $false)] - [System.UInt16] - $TimeoutDuration, - - [parameter(Mandatory = $false)] - [System.UInt16] - $NumberOfThreads, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting antivirus configuration settings" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - try - { - $spFarm = Get-SPFarm - } - catch - { - Write-Verbose -Message ("No local SharePoint farm was detected. Antivirus " + ` - "settings will not be applied") - return @{ - # Set the antivirus settings - AllowDownloadInfected = $false - ScanOnDownload = $false - ScanOnUpload = $false - AttemptToClean = $false - NumberOfThreads = 0 - TimeoutDuration = 0 - InstallAccount = $params.InstallAccount - } - } - - # Get a reference to the Administration WebService - $admService = Get-SPDSCContentService - - return @{ - # Set the antivirus settings - AllowDownloadInfected = $admService.AntivirusSettings.AllowDownload - ScanOnDownload = $admService.AntivirusSettings.DownloadScanEnabled - ScanOnUpload = $admService.AntivirusSettings.UploadScanEnabled - AttemptToClean = $admService.AntivirusSettings.CleaningEnabled - NumberOfThreads = $admService.AntivirusSettings.NumberOfThreads - TimeoutDuration = $admService.AntivirusSettings.Timeout.TotalSeconds - InstallAccount = $params.InstallAccount - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.Boolean] - $ScanOnDownload, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ScanOnUpload, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowDownloadInfected, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AttemptToClean, - - [parameter(Mandatory = $false)] - [System.UInt16] - $TimeoutDuration, - - [parameter(Mandatory = $false)] - [System.UInt16] - $NumberOfThreads, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting antivirus configuration settings" - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - try - { - $spFarm = Get-SPFarm - } - catch - { - throw "No local SharePoint farm was detected. Antivirus settings will not be applied" - return - } - - Write-Verbose -Message "Start update" - $admService = Get-SPDSCContentService - - # Set the antivirus settings - if ($params.ContainsKey("AllowDownloadInfected")) - { - Write-Verbose -Message "Setting Allow Download" - $admService.AntivirusSettings.AllowDownload = $params.AllowDownloadInfected - } - if ($params.ContainsKey("ScanOnDownload")) - { - $admService.AntivirusSettings.DownloadScanEnabled = $params.ScanOnDownload - } - if ($params.ContainsKey("ScanOnUpload")) - { - $admService.AntivirusSettings.UploadScanEnabled = $params.ScanOnUpload - } - if ($params.ContainsKey("AttemptToClean")) - { - $admService.AntivirusSettings.CleaningEnabled = $params.AttemptToClean - } - if ($params.ContainsKey("NumberOfThreads")) - { - $admService.AntivirusSettings.NumberOfThreads = $params.NumberOfThreads - } - if ($params.ContainsKey("TimeoutDuration")) - { - $timespan = New-TimeSpan -Seconds $params.TimeoutDuration - $admService.AntivirusSettings.Timeout = $timespan - } - $admService.Update() - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.Boolean] - $ScanOnDownload, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ScanOnUpload, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowDownloadInfected, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AttemptToClean, - - [parameter(Mandatory = $false)] - [System.UInt16] - $TimeoutDuration, - - [parameter(Mandatory = $false)] - [System.UInt16] - $NumberOfThreads, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing antivirus configuration settings" - - return Test-SPDscParameterState -CurrentValues (Get-TargetResource @PSBoundParameters) ` - -DesiredValues $PSBoundParameters -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/MSFT_SPAntivirusSettings.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/MSFT_SPAntivirusSettings.schema.mof deleted file mode 100644 index 46e3b4aa..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/MSFT_SPAntivirusSettings.schema.mof +++ /dev/null @@ -1,12 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPAntivirusSettings")] -class MSFT_SPAntivirusSettings : OMI_BaseResource -{ - [Key, Description("Should documents be scanned before being downloaded")] Boolean ScanOnDownload; - [Write, Description("Should documents be scanned on upload")] Boolean ScanOnUpload; - [Write, Description("Should documents that are infected be allowed to be downloaded")] Boolean AllowDownloadInfected; - [Write, Description("Should infected documents be handed to the AV engine to attempt cleaning")] Boolean AttemptToClean; - [Write, Description("What is the timeout for an AV scan in seconds")] Uint16 TimeoutDuration; - [Write, Description("How many concurrent threads should the AV engine be able to run on a server")] Uint16 NumberOfThreads; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppCatalog/MSFT_SPAppCatalog.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppCatalog/MSFT_SPAppCatalog.psm1 deleted file mode 100644 index 442dbb7b..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppCatalog/MSFT_SPAppCatalog.psm1 +++ /dev/null @@ -1,105 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $SiteUrl, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting app catalog status of $SiteUrl" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $site = Get-SPSite $params.SiteUrl -ErrorAction SilentlyContinue - $nullreturn = @{ - SiteUrl = $null - InstallAccount = $params.InstallAccount - } - if ($null -eq $site) - { - return $nullreturn - } - $wa = $site.WebApplication - $feature = $wa.Features.Item([Guid]::Parse("f8bea737-255e-4758-ab82-e34bb46f5828")) - if($null -eq $feature) - { - return $nullreturn - } - if ($site.ID -ne $feature.Properties["__AppCatSiteId"].Value) - { - return $nullreturn - } - return @{ - SiteUrl = $site.Url - InstallAccount = $params.InstallAccount - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $SiteUrl, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting app catalog status of $SiteUrl" - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - try - { - Update-SPAppCatalogConfiguration -Site $params.SiteUrl -Confirm:$false - } - catch [System.UnauthorizedAccessException] - { - throw ("This resource must be run as the farm account (not a setup account). " + ` - "Please ensure either the PsDscRunAsCredential or InstallAccount " + ` - "credentials are set to the farm account and run this resource again") - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $SiteUrl, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing app catalog status of $SiteUrl" - - return Test-SPDscParameterState -CurrentValues (Get-TargetResource @PSBoundParameters) ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("SiteUrl") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppCatalog/MSFT_SPAppCatalog.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppCatalog/MSFT_SPAppCatalog.schema.mof deleted file mode 100644 index 8e7fb9af..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppCatalog/MSFT_SPAppCatalog.schema.mof +++ /dev/null @@ -1,6 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPAppCatalog")] -class MSFT_SPAppCatalog : OMI_BaseResource -{ - [Key, Description("The URL of the site collection that will be the app catalog for the web app that it is in")] string SiteUrl; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppDomain/MSFT_SPAppDomain.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppDomain/MSFT_SPAppDomain.psm1 deleted file mode 100644 index f1f2ea2d..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppDomain/MSFT_SPAppDomain.psm1 +++ /dev/null @@ -1,94 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $AppDomain, - - [parameter(Mandatory = $true)] - [System.String] - $Prefix, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting app domain settings" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - $appDomain = Get-SPAppDomain - $prefix = Get-SPAppSiteSubscriptionName -ErrorAction Continue - - return @{ - AppDomain = $appDomain - Prefix= $prefix - InstallAccount = $params.InstallAccount - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $AppDomain, - - [parameter(Mandatory = $true)] - [System.String] - $Prefix, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting app domain settings" - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - Set-SPAppDomain $params.AppDomain - Set-SPAppSiteSubscriptionName -Name $params.Prefix -Confirm:$false - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $AppDomain, - - [parameter(Mandatory = $true)] - [System.String] - $Prefix, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting app domain settings" - - return Test-SPDscParameterState -CurrentValues (Get-TargetResource @PSBoundParameters) ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("AppDomain", "Prefix") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppDomain/MSFT_SPAppDomain.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppDomain/MSFT_SPAppDomain.schema.mof deleted file mode 100644 index d24a57c9..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppDomain/MSFT_SPAppDomain.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPAppDomain")] -class MSFT_SPAppDomain : OMI_BaseResource -{ - [Key, Description("The domain name for apps to use in this farm")] string AppDomain; - [Required, Description("The prefix to go on to app URLs")] string Prefix; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; - -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/MSFT_SPAppManagementServiceApp.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/MSFT_SPAppManagementServiceApp.psm1 deleted file mode 100644 index 8df5e0a3..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/MSFT_SPAppManagementServiceApp.psm1 +++ /dev/null @@ -1,262 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting App management service app '$Name'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApps = Get-SPServiceApplication -Name $params.Name -ErrorAction SilentlyContinue - $nullReturn = @{ - Name = $params.Name - ApplicationPool = $params.ApplicationPool - Ensure = "Absent" - InstallAccount = $params.InstallAccount - } - if ($null -eq $serviceApps) { - return $nullReturn - } - $serviceApp = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.SharePoint.AppManagement.AppManagementServiceApplication" - } - - if ($null -eq $serviceApp) - { - return $nullReturn - } - else - { - $serviceAppProxies = Get-SPServiceApplicationProxy -ErrorAction SilentlyContinue - if ($null -ne $serviceAppProxies) - { - $serviceAppProxy = $serviceAppProxies | Where-Object -FilterScript { - $serviceApp.IsConnected($_) - } - if ($null -ne $serviceAppProxy) - { - $proxyName = $serviceAppProxy.Name - } - } - return @{ - Name = $serviceApp.DisplayName - ProxyName = $proxyName - ApplicationPool = $serviceApp.ApplicationPool.Name - DatabaseName = $serviceApp.Databases.Name - DatabaseServer = $serviceApp.Databases.Server.Name - Ensure = "Present" - InstallAccount = $params.InstallAccount - } - } - } - return $result -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting App management service app '$Name'" - - $result = Get-TargetResource @PSBoundParameters - - if ($result.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - # The service app doesn't exist but should - - Write-Verbose -Message "Creating App management Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $newParams = @{ - Name = $params.Name - ApplicationPool = $params.ApplicationPool - } - if ($params.ContainsKey("DatabaseName") -eq $true) - { - $newParams.Add("DatabaseName", $params.DatabaseName) - } - if ($params.ContainsKey("DatabaseServer") -eq $true) - { - $newParams.Add("DatabaseServer", $params.DatabaseServer) - } - - $appService = New-SPAppManagementServiceApplication @newParams - if ($null -eq $params.ProxyName) - { - $pName = "$($params.Name) Proxy" - } - else - { - $pName = $params.ProxyName - } - New-SPAppManagementServiceApplicationProxy -Name $pName ` - -UseDefaultProxyGroup ` - -ServiceApplication $appService ` - -ErrorAction Stop | Out-Null - } - } - - if ($result.Ensure -eq "Present" -and $Ensure -eq "Present") - { - # The service app exists but has the wrong application pool - - if ($ApplicationPool -ne $result.ApplicationPool) - { - Write-Verbose -Message "Updating App management Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - $appPool = Get-SPServiceApplicationPool -Identity $params.ApplicationPool - - $app = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.SharePoint.AppManagement.AppManagementServiceApplication" - } - $app.ApplicationPool = $appPool - $app.Update() - } - } - } - - if ($Ensure -eq "Absent") - { - # The service app should not exit - Write-Verbose -Message "Removing App management Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $app = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.SharePoint.AppManagement.AppManagementServiceApplication" - } - - $proxies = Get-SPServiceApplicationProxy - foreach($proxyInstance in $proxies) - { - if($app.IsConnected($proxyInstance)) - { - $proxyInstance.Delete() - } - } - - Remove-SPServiceApplication -Identity $app -Confirm:$false - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing App management service app '$Name'" - - $PSBoundParameters.Ensure = $Ensure - - return Test-SPDscParameterState -CurrentValues (Get-TargetResource @PSBoundParameters) ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("ApplicationPool", "Ensure") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/MSFT_SPAppManagementServiceApp.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/MSFT_SPAppManagementServiceApp.schema.mof deleted file mode 100644 index 6ab9a697..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/MSFT_SPAppManagementServiceApp.schema.mof +++ /dev/null @@ -1,12 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPAppManagementServiceApp")] -class MSFT_SPAppManagementServiceApp : OMI_BaseResource -{ - [Key, Description("The name of the app management service application")] string Name; - [Write, Description("The proxy name, if not specified will be /Name of service app/ Proxy")] string ProxyName; - [Required, Description("The app pool that should be used to run the service app")] String ApplicationPool; - [Write, Description("The name of the database for the service application")] string DatabaseName; - [Write, Description("The name of the server for the database")] String DatabaseServer; - [Write, Description("Present ensures service app exists, absent ensures it is removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/MSFT_SPAppStoreSettings.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/MSFT_SPAppStoreSettings.psm1 deleted file mode 100644 index bb0d08d4..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/MSFT_SPAppStoreSettings.psm1 +++ /dev/null @@ -1,167 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowAppPurchases, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowAppsForOffice, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting app store settings of $WebAppUrl" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $nullreturn = @{ - WebAppUrl = $null - InstallAccount = $params.InstallAccount - } - - $wa = Get-SPWebApplication -Identity $params.WebAppUrl -ErrorAction SilentlyContinue - if ($null -eq $wa) - { - return $nullreturn - } - - $currentAAP = (Get-SPAppAcquisitionConfiguration -WebApplication $params.WebAppUrl).Enabled - $AllowAppPurchases = [System.Convert]::ToBoolean($currentAAP) - $currentAAFO = (Get-SPOfficeStoreAppsDefaultActivation -WebApplication $params.WebAppUrl).Enable - $AllowAppsForOffice = [System.Convert]::ToBoolean($currentAAFO) - - return @{ - WebAppUrl = $params.WebAppUrl - AllowAppPurchases = $AllowAppPurchases - AllowAppsForOffice = $AllowAppsForOffice - InstallAccount = $params.InstallAccount - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowAppPurchases, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowAppsForOffice, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting app store settings of $WebAppUrl" - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $wa = Get-SPWebApplication -Identity $params.WebAppUrl -ErrorAction SilentlyContinue - if ($null -eq $wa) - { - throw ("Specified web application does not exist.") - } - - if ($params.ContainsKey("AllowAppPurchases")) - { - $current = (Get-SPAppAcquisitionConfiguration -WebApplication $params.WebAppUrl).Enabled - $AllowAppPurchases = [System.Convert]::ToBoolean($current) - if ($AllowAppPurchases -ne $params.AllowAppPurchases) - { - Set-SPAppAcquisitionConfiguration -WebApplication $params.WebAppUrl ` - -Enable $params.AllowAppPurchases - } - } - - if ($params.ContainsKey("AllowAppsForOffice")) - { - $current = (Get-SPOfficeStoreAppsDefaultActivation -WebApplication $params.WebAppUrl).Enable - $AllowAppsForOffice = [System.Convert]::ToBoolean($current) - if ($AllowAppsForOffice -ne $params.AllowAppsForOffice) - { - Set-SPOfficeStoreAppsDefaultActivation -WebApplication $params.WebAppUrl ` - -Enable $params.AllowAppsForOffice - } - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowAppPurchases, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowAppsForOffice, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing app store settings of $WebAppUrl" - - $currentValues = Get-TargetResource @PSBoundParameters - - if ($null -eq $currentValues.WebAppUrl) { - Write-Verbose -Message "Specified web application does not exist." - return $false - } - - if ($PSBoundParameters.ContainsKey("AllowAppPurchases")) - { - if ($AllowAppPurchases -ne $currentValues.AllowAppPurchases) - { - return $false - } - } - - if ($PSBoundParameters.ContainsKey("AllowAppsForOffice")) - { - if ($AllowAppsForOffice -ne $currentValues.AllowAppsForOffice) - { - return $false - } - } - - return $true -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/MSFT_SPAppStoreSettings.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/MSFT_SPAppStoreSettings.schema.mof deleted file mode 100644 index 90b3455c..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/MSFT_SPAppStoreSettings.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPAppStoreSettings")] -class MSFT_SPAppStoreSettings : OMI_BaseResource -{ - [Key, Description("The URL of the web application")] string WebAppUrl; - [Write, Description("Specifies if App Purchases from the SharePoint Store are allowed")] Boolean AllowAppPurchases; - [Write, Description("Specifies if App Purchases for Office applications are allowed")] Boolean AllowAppsForOffice; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/MSFT_SPBCSServiceApp.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/MSFT_SPBCSServiceApp.psm1 deleted file mode 100644 index 27e034e2..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/MSFT_SPBCSServiceApp.psm1 +++ /dev/null @@ -1,220 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting BCS service app '$Name'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApps = Get-SPServiceApplication -Name $params.Name -ErrorAction SilentlyContinue - $nullReturn = @{ - Name = $params.Name - ApplicationPool = $params.ApplicationPool - DatabaseName = $null - DatabaseServer = $null - Ensure = "Absent" - InstallAccount = $params.InstallAccount - } - if ($null -eq $serviceApps) - { - return $nullReturn - } - $serviceApp = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.SharePoint.BusinessData.SharedService.BdcServiceApplication" - } - - if ($null -eq $serviceApp) - { - return $nullReturn - } - else - { - $returnVal = @{ - Name = $serviceApp.DisplayName - ApplicationPool = $serviceApp.ApplicationPool.Name - DatabaseName = $serviceApp.Database.Name - DatabaseServer = $serviceApp.Database.Server.Name - Ensure = "Present" - InstallAccount = $params.InstallAccount - } - return $returnVal - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting BCS service app '$Name'" - - $result = Get-TargetResource @PSBoundParameters - - if ($result.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - # The service app doesn't exist but should - - Write-Verbose -Message "Creating BCS Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - New-SPBusinessDataCatalogServiceApplication -Name $params.Name ` - -ApplicationPool $params.ApplicationPool ` - -DatabaseName $params.DatabaseName ` - -DatabaseServer $params.DatabaseServer - } - } - - if ($result.Ensure -eq "Present" -and $Ensure -eq "Present") - { - # The service app exists but has the wrong application pool - - if ($ApplicationPool -ne $result.ApplicationPool) - { - Write-Verbose -Message "Updating BCS Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $appPool = Get-SPServiceApplicationPool -Identity $params.ApplicationPool - - Get-SPServiceApplication -Name $params.Name ` - | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.SharePoint.BusinessData.SharedService.BdcServiceApplication" - } ` - | Set-SPBusinessDataCatalogServiceApplication -ApplicationPool $appPool - } - } - } - - if ($Ensure -eq "Absent") - { - # The service app should not exit - Write-Verbose -Message "Removing BCS Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $app = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.SharePoint.BusinessData.SharedService.BdcServiceApplication" - } - - $proxies = Get-SPServiceApplicationProxy - foreach($proxyInstance in $proxies) - { - if($app.IsConnected($proxyInstance)) - { - $proxyInstance.Delete() - } - } - - Remove-SPServiceApplication -Identity $app -Confirm:$false - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing BCS service app '$Name'" - - $PSBoundParameters.Ensure = $Ensure - - return Test-SPDscParameterState -CurrentValues (Get-TargetResource @PSBoundParameters) ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("ApplicationPool", "Ensure") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/MSFT_SPBCSServiceApp.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/MSFT_SPBCSServiceApp.schema.mof deleted file mode 100644 index 3946dcc9..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/MSFT_SPBCSServiceApp.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPBCSServiceApp")] -class MSFT_SPBCSServiceApp : OMI_BaseResource -{ - [Key, Description("The name of the BCS service app")] string Name; - [Required, Description("The application pool it should run in")] String ApplicationPool; - [Write, Description("Name of the database to create for the service app")] string DatabaseName; - [Write, Description("Name of the database server to host the database on")] String DatabaseServer; - [Write, Description("Present ensures service app exists, absent ensures it is removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/MSFT_SPBlobCacheSettings.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/MSFT_SPBlobCacheSettings.psm1 deleted file mode 100644 index 08f4fc80..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/MSFT_SPBlobCacheSettings.psm1 +++ /dev/null @@ -1,384 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $true)] - [ValidateSet("Default", "Intranet", "Internet", "Custom", "Extranet")] - [System.String] - $Zone, - - [parameter(Mandatory = $true)] - [System.Boolean] - $EnableCache, - - [parameter(Mandatory = $false)] - [System.String] - $Location, - - [parameter(Mandatory = $false)] - [System.UInt16] - $MaxSizeInGB, - - [parameter(Mandatory = $false)] - [System.UInt32] - $MaxAgeInSeconds, - - [parameter(Mandatory = $false)] - [System.String] - $FileTypes, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting blob cache settings for $WebAppUrl" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $webappsi = Get-SPServiceInstance -Server $env:COMPUTERNAME ` - -ErrorAction SilentlyContinue ` - | Where-Object -FilterScript { - $_.TypeName -eq "Microsoft SharePoint Foundation Web Application" - } - - if ($null -eq $webappsi) - { - Write-Verbose -Message "Server isn't running the Web Application role" - return @{ - WebAppUrl = $null - Zone = $null - EnableCache = $false - Location = $null - MaxSizeInGB = $null - MaxAgeInSeconds = $null - FileTypes = $null - InstallAccount = $params.InstallAccount - } - } - - $wa = Get-SPWebApplication -Identity $params.WebAppUrl ` - -ErrorAction SilentlyContinue - - if ($null -eq $wa) - { - Write-Verbose -Message "Specified web application was not found." - return @{ - WebAppUrl = $null - Zone = $null - EnableCache = $false - Location = $null - MaxSizeInGB = $null - MaxAgeInSeconds = $null - FileTypes = $null - InstallAccount = $params.InstallAccount - } - } - - $zone = [Microsoft.SharePoint.Administration.SPUrlZone]::$($params.Zone) - - $sitePath = $wa.IisSettings[$zone].Path - $webconfiglocation = Join-Path $sitePath "web.config" - - [xml]$webConfig = Get-Content -Path $webConfigLocation - - if ($webconfig.configuration.SharePoint.BlobCache.enabled -eq "true") - { - $cacheEnabled = $true - } - else - { - $cacheEnabled = $false - } - - try - { - $maxsize = [Convert]::ToUInt16($webconfig.configuration.SharePoint.BlobCache.maxSize) - } - catch [FormatException] - { - $maxsize = 0 - } - catch - { - throw "Error: $($_.Exception.Message)" - } - - try - { - $maxage = [Convert]::ToUInt32($webconfig.configuration.SharePoint.BlobCache."max-age") - } - catch [FormatException] - { - $maxage = 0 - } - catch - { - throw "Error: $($_.Exception.Message)" - } - - $returnval = @{ - WebAppUrl = $params.WebAppUrl - Zone = $params.Zone - EnableCache = $cacheEnabled - Location = $webconfig.configuration.SharePoint.BlobCache.location - MaxSizeInGB = $maxsize - MaxAgeInSeconds = $maxage - FileTypes = $webconfig.configuration.SharePoint.BlobCache.path - InstallAccount = $params.InstallAccount - } - - return $returnval - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $true)] - [ValidateSet("Default", "Intranet", "Internet", "Custom", "Extranet")] - [System.String] - $Zone, - - [parameter(Mandatory = $true)] - [System.Boolean] - $EnableCache, - - [parameter(Mandatory = $false)] - [System.String] - $Location, - - [parameter(Mandatory = $false)] - [System.UInt16] - $MaxSizeInGB, - - [parameter(Mandatory = $false)] - [System.UInt32] - $MaxAgeInSeconds, - - [parameter(Mandatory = $false)] - [System.String] - $FileTypes, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting blob cache settings for $WebAppUrl" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - $changes = @{} - - if ($PSBoundParameters.ContainsKey("EnableCache")) - { - if ($CurrentValues.EnableCache -ne $EnableCache) - { - $changes.EnableCache = $EnableCache - } - } - - if ($PSBoundParameters.ContainsKey("Location")) - { - if ($CurrentValues.Location -ne $Location) - { - $changes.Location = $Location - } - } - - if ($PSBoundParameters.ContainsKey("MaxSizeInGB")) - { - if ($CurrentValues.MaxSizeInGB -ne $MaxSizeInGB) - { - $changes.MaxSizeInGB = $MaxSizeInGB - } - } - - if ($PSBoundParameters.ContainsKey("MaxAgeInSeconds")) - { - if ($CurrentValues.MaxAgeInSeconds -ne $MaxAgeInSeconds) - { - $changes.MaxAgeInSeconds = $MaxAgeInSeconds - } - } - - if ($PSBoundParameters.ContainsKey("FileTypes")) - { - if ($CurrentValues.FileTypes -ne $FileTypes) - { - $changes.FileTypes = $FileTypes - } - } - - if ($changes.Count -ne 0) - { - ## Perform changes - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters, $changes) ` - -ScriptBlock { - $params = $args[0] - $changes = $args[1] - - $webappsi = Get-SPServiceInstance -Server $env:COMPUTERNAME ` - -ErrorAction SilentlyContinue ` - | Where-Object -FilterScript { - $_.TypeName -eq "Microsoft SharePoint Foundation Web Application" - } - - if ($null -eq $webappsi) - { - throw "Server isn't running the Web Application role" - } - - $wa = Get-SPWebApplication -Identity $params.WebAppUrl -ErrorAction SilentlyContinue - - if ($null -eq $wa) - { - throw "Specified web application could not be found." - } - - Write-Verbose -Message "Processing changes" - - $zone = [Microsoft.SharePoint.Administration.SPUrlZone]::$($params.Zone) - - $sitePath = $wa.IisSettings[$zone].Path - $timestamp = Get-Date -Format "yyyyMMdd_HHmmss" - $webconfiglocation = Join-Path -Path $sitePath -ChildPath "web.config" - $webconfigbackuplocation = Join-Path -Path $sitePath -ChildPath "web_config-$timestamp.backup" - Copy-Item -Path $webconfiglocation -Destination $webconfigbackuplocation - - [xml]$webConfig = Get-Content -Path $webConfigLocation - - if ($changes.ContainsKey("EnableCache")) - { - $webconfig.configuration.SharePoint.BlobCache.enabled ` - = $changes.EnableCache.ToString() - } - - if ($changes.ContainsKey("Location")) - { - $webconfig.configuration.SharePoint.BlobCache.location ` - = $changes.Location - } - - if ($changes.ContainsKey("MaxSizeInGB")) - { - $webconfig.configuration.SharePoint.BlobCache.maxSize ` - = $changes.MaxSizeInGB.ToString() - } - - if ($changes.ContainsKey("MaxAgeInSeconds")) - { - $webconfig.configuration.SharePoint.BlobCache."max-age" ` - = $changes.MaxAgeInSeconds.ToString() - } - - if ($changes.ContainsKey("FileTypes")) - { - $webconfig.configuration.SharePoint.BlobCache.path ` - = $changes.FileTypes - } - $webconfig.Save($webconfiglocation) - } - } - - ## Check Blob Cache folder - if ($Location) - { - if ( -not (Test-Path -Path $Location)) - { - Write-Verbose "Create Blob Cache Folder $Location" - try - { - New-Item -Path $Location -ItemType Directory | Out-Null - } - catch [DriveNotFoundException] - { - throw "Specified drive does not exist" - } - catch - { - throw "Error creating Blob Cache folder: $($_.Exception.Message)" - } - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $true)] - [ValidateSet("Default", "Intranet", "Internet", "Custom", "Extranet")] - [System.String] - $Zone, - - [parameter(Mandatory = $true)] - [System.Boolean] - $EnableCache, - - [parameter(Mandatory = $false)] - [System.String] - $Location, - - [parameter(Mandatory = $false)] - [System.UInt16] - $MaxSizeInGB, - - [parameter(Mandatory = $false)] - [System.UInt32] - $MaxAgeInSeconds, - - [parameter(Mandatory = $false)] - [System.String] - $FileTypes, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing blob cache settings for $WebAppUrl" - - if ($Location) - { - if ( -not (Test-Path -Path $Location)) - { - Write-Verbose "Blob Cache Folder $Location does not exist" - return $false - } - } - - return Test-SPDscParameterState -CurrentValues (Get-TargetResource @PSBoundParameters) ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("EnableCache", - "Location", - "MaxSizeInGB", - "FileType", - "MaxAgeInSeconds") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/MSFT_SPBlobCacheSettings.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/MSFT_SPBlobCacheSettings.schema.mof deleted file mode 100644 index 81ac90cf..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/MSFT_SPBlobCacheSettings.schema.mof +++ /dev/null @@ -1,14 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPBlobCacheSettings")] -class MSFT_SPBlobCacheSettings : OMI_BaseResource -{ - [Key, Description("The URL of the web application")] string WebAppUrl; - [Key, Description("The zone of the web application for which blob cache has to be configured"), ValueMap{"Default","Intranet","Internet","Custom","Extranet"}, Values{"Default","Intranet","Internet","Custom","Extranet"}] string Zone; - [Required, Description("Specify if the blob cache has to be enabled")] Boolean EnableCache; - [Write, Description("The location where the blob cache has to store its files")] string Location; - [Write, Description("The maximum size (in GB) of disk space the blob cache is allowed to use")] Uint16 MaxSizeInGB; - [Write, Description("The maximum age (in seconds) that a browser caches a blob")] Uint32 MaxAgeInSeconds; - [Write, Description("Specify the file types that must be stored by the blob cache")] string FileTypes; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/MSFT_SPCacheAccounts.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/MSFT_SPCacheAccounts.psm1 deleted file mode 100644 index 3ade9ccb..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/MSFT_SPCacheAccounts.psm1 +++ /dev/null @@ -1,280 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $true)] - [System.String] - $SuperUserAlias, - - [parameter(Mandatory = $true)] - [System.String] - $SuperReaderAlias, - - [parameter(Mandatory = $false)] - [System.Boolean] - $SetWebAppPolicy = $true, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting cache accounts for $WebAppUrl" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount -Arguments $PSBoundParameters -ScriptBlock { - $params = $args[0] - - $wa = Get-SPWebApplication -Identity $params.WebAppUrl -ErrorAction SilentlyContinue - - if ($null -eq $wa) - { - return @{ - WebAppUrl = $params.WebAppUrl - SuperUserAlias = $null - SuperReaderAlias = $null - SetWebAppPolicy = $false - InstallAccount = $params.InstallAccount - } - } - - $returnVal = @{ - InstallAccount = $params.InstallAccount - WebAppUrl = $params.WebAppUrl - } - - $policiesSet = $true - if ($wa.UseClaimsAuthentication -eq $true) - { - if ($wa.Properties.ContainsKey("portalsuperuseraccount")) - { - $claim = New-SPClaimsPrincipal -Identity $wa.Properties["portalsuperuseraccount"] ` - -IdentityType EncodedClaim ` - -ErrorAction SilentlyContinue - if ($null -ne $claim) - { - $returnVal.Add("SuperUserAlias", $claim.Value) - } - else - { - $returnVal.Add("SuperUserAlias", "") - } - } - else - { - $returnVal.Add("SuperUserAlias", "") - } - if ($wa.Properties.ContainsKey("portalsuperreaderaccount")) - { - $claim = New-SPClaimsPrincipal -Identity $wa.Properties["portalsuperreaderaccount"] ` - -IdentityType EncodedClaim ` - -ErrorAction SilentlyContinue - if ($null -ne $claim) - { - $returnVal.Add("SuperReaderAlias", $claim.Value) - } - else - { - $returnVal.Add("SuperReaderAlias", "") - } - } - else - { - $returnVal.Add("SuperReaderAlias", "") - } - if ($wa.Policies.UserName -notcontains ((New-SPClaimsPrincipal -Identity $params.SuperReaderAlias ` - -IdentityType WindowsSamAccountName).ToEncodedString())) - { - $policiesSet = $false - } - - if ($wa.Policies.UserName -notcontains ((New-SPClaimsPrincipal -Identity $params.SuperUserAlias ` - -IdentityType WindowsSamAccountName).ToEncodedString())) - { - $policiesSet = $false - } - } - else - { - if ($wa.Properties.ContainsKey("portalsuperuseraccount")) - { - $returnVal.Add("SuperUserAlias", $wa.Properties["portalsuperuseraccount"]) - } - else - { - $returnVal.Add("SuperUserAlias", "") - } - - if ($wa.Properties.ContainsKey("portalsuperreaderaccount")) - { - $returnVal.Add("SuperReaderAlias", $wa.Properties["portalsuperreaderaccount"]) - } - else - { - $returnVal.Add("SuperReaderAlias", "") - } - - if ($wa.Policies.UserName -notcontains $params.SuperReaderAlias) - { - $policiesSet = $false - } - - if ($wa.Policies.UserName -notcontains $params.SuperUserAlias) - { - $policiesSet = $false - } - } - $returnVal.Add("SetWebAppPolicy", $policiesSet) - - return $returnVal - } - return $result -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $true)] - [System.String] - $SuperUserAlias, - - [parameter(Mandatory = $true)] - [System.String] - $SuperReaderAlias, - - [parameter(Mandatory = $false)] - [System.Boolean] - $SetWebAppPolicy = $true, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount ) - - Write-Verbose -Message "Setting cache accounts for $WebAppUrl" - - $PSBoundParameters.SetWebAppPolicy = $SetWebAppPolicy - - Invoke-SPDSCCommand -Credential $InstallAccount -Arguments $PSBoundParameters -ScriptBlock { - $params = $args[0] - - $wa = Get-SPWebApplication -Identity $params.WebAppUrl -ErrorAction SilentlyContinue - if ($null -eq $wa) - { - throw [Exception] "The web applications $($params.WebAppUrl) can not be found to set cache accounts" - } - - if ($wa.UseClaimsAuthentication -eq $true) - { - $wa.Properties["portalsuperuseraccount"] = (New-SPClaimsPrincipal -Identity $params.SuperUserAlias ` - -IdentityType WindowsSamAccountName).ToEncodedString() - $wa.Properties["portalsuperreaderaccount"] = (New-SPClaimsPrincipal -Identity $params.SuperReaderAlias ` - -IdentityType WindowsSamAccountName).ToEncodedString() - } - else - { - $wa.Properties["portalsuperuseraccount"] = $params.SuperUserAlias - $wa.Properties["portalsuperreaderaccount"] = $params.SuperReaderAlias - } - - if ($params.SetWebAppPolicy -eq $true) - { - if ($wa.UseClaimsAuthentication -eq $true) - { - $claimsReader = (New-SPClaimsPrincipal -Identity $params.SuperReaderAlias ` - -IdentityType WindowsSamAccountName).ToEncodedString() - if ($wa.Policies.UserName -contains $claimsReader) - { - $wa.Policies.Remove($claimsReader) - } - $policy = $wa.Policies.Add($claimsReader, "Super Reader (Claims)") - $policyRole = $wa.PolicyRoles.GetSpecialRole([Microsoft.SharePoint.Administration.SPPolicyRoleType]::FullRead) - $policy.PolicyRoleBindings.Add($policyRole) - - $claimsSuper = (New-SPClaimsPrincipal -Identity $params.SuperUserAlias ` - -IdentityType WindowsSamAccountName).ToEncodedString() - if ($wa.Policies.UserName -contains $claimsSuper) - { - $wa.Policies.Remove($claimsSuper) - } - $policy = $wa.Policies.Add($claimsSuper, "Super User (Claims)") - $policyRole = $wa.PolicyRoles.GetSpecialRole([Microsoft.SharePoint.Administration.SPPolicyRoleType]::FullControl) - $policy.PolicyRoleBindings.Add($policyRole) - } - else - { - if ($wa.Policies.UserName -contains $params.SuperReaderAlias) - { - $wa.Policies.Remove($params.SuperReaderAlias) - } - - $readPolicy = $wa.Policies.Add($params.SuperReaderAlias, "Super Reader") - $readPolicyRole = $wa.PolicyRoles.GetSpecialRole([Microsoft.SharePoint.Administration.SPPolicyRoleType]::FullRead) - $readPolicy.PolicyRoleBindings.Add($readPolicyRole) - - if ($wa.Policies.UserName -contains $params.SuperUserAlias) - { - $wa.Policies.Remove($params.SuperUserAlias) - } - $policy = $wa.Policies.Add($params.SuperUserAlias, "Super User") - $policyRole = $wa.PolicyRoles.GetSpecialRole([Microsoft.SharePoint.Administration.SPPolicyRoleType]::FullControl) - $policy.PolicyRoleBindings.Add($policyRole) - } - } - - $wa.Update() - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $true)] - [System.String] - $SuperUserAlias, - - [parameter(Mandatory = $true)] - [System.String] - $SuperReaderAlias, - - [parameter(Mandatory = $false)] - [System.Boolean] - $SetWebAppPolicy = $true, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount ) - - Write-Verbose -Message "Testing cache accounts for $WebAppUrl" - - $PSBoundParameters.SetWebAppPolicy = $SetWebAppPolicy - - $CurrentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("SuperUserAlias", ` - "SuperReaderAlias", ` - "SetWebAppPolicy") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/MSFT_SPCacheAccounts.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/MSFT_SPCacheAccounts.schema.mof deleted file mode 100644 index c7583997..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/MSFT_SPCacheAccounts.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPCacheAccounts")] -class MSFT_SPCacheAccounts : OMI_BaseResource -{ - [Key, Description("The URL of the web application to set the accounts for")] string WebAppUrl; - [Required, Description("The account name for the super user")] string SuperUserAlias; - [Required, Description("The account name for the super reader")] string SuperReaderAlias; - [Write, Description("Should the web app policy be set for these accounts?")] boolean SetWebAppPolicy; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPConfigWizard/MSFT_SPConfigWizard.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPConfigWizard/MSFT_SPConfigWizard.psm1 deleted file mode 100644 index 53937652..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPConfigWizard/MSFT_SPConfigWizard.psm1 +++ /dev/null @@ -1,248 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [parameter(Mandatory = $false)] - [ValidateSet("mon","tue","wed","thu","fri","sat","sun")] - [System.String[]] - $DatabaseUpgradeDays, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseUpgradeTime, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting status of Configuration Wizard" - - # Check which version of SharePoint is installed - if ((Get-SPDSCInstalledProductVersion).FileMajorPart -eq 15) - { - $wssRegKey ="hklm:SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\15.0\WSS" - } - else - { - $wssRegKey ="hklm:SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\16.0\WSS" - } - - # Read LanguagePackInstalled and SetupType registry keys - $languagePackInstalled = Get-SPDSCRegistryKey -Key $wssRegKey -Value "LanguagePackInstalled" - $setupType = Get-SPDSCRegistryKey -Key $wssRegKey -Value "SetupType" - - # Determine if LanguagePackInstalled=1 or SetupType=B2B_Upgrade. - # If so, the Config Wizard is required - if (($languagePackInstalled -eq 1) -or ($setupType -eq "B2B_UPGRADE")) - { - return @{ - Ensure = "Absent" - DatabaseUpgradeDays = $DatabaseUpgradeDays - DatabaseUpgradeTime = $DatabaseUpgradeTime - } - } - else - { - return @{ - Ensure = "Present" - DatabaseUpgradeDays = $DatabaseUpgradeDays - DatabaseUpgradeTime = $DatabaseUpgradeTime - } - } -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [parameter(Mandatory = $false)] - [ValidateSet("mon","tue","wed","thu","fri","sat","sun")] - [System.String[]] - $DatabaseUpgradeDays, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseUpgradeTime, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting status of Configuration Wizard" - - $now = Get-Date - if ($DatabaseUpgradeDays) - { - # DatabaseUpgradeDays parameter exists, check if current day is specified - $currentDayOfWeek = $now.DayOfWeek.ToString().ToLower().Substring(0,3) - - if ($DatabaseUpgradeDays -contains $currentDayOfWeek) - { - Write-Verbose -Message ("Current day is present in the parameter DatabaseUpgradeDays. " + ` - "Configuration wizard can be run today.") - } - else - { - Write-Verbose -Message ("Current day is not present in the parameter DatabaseUpgradeDays, " + ` - "skipping the Configuration Wizard") - return - } - } - else - { - Write-Verbose -Message ("No DatabaseUpgradeDays specified, Configuration Wizard can be " + ` - "ran on any day.") - } - - # Check if DatabaseUpdateTime parameter exists - if ($DatabaseUpgradeTime) - { - # Check if current time is inside of time window - $upgradeTimes = $DatabaseUpgradeTime.Split(" ") - $starttime = 0 - $endtime = 0 - - if ($upgradeTimes.Count -ne 3) - { - throw "Time window incorrectly formatted." - } - else - { - if ([datetime]::TryParse($upgradeTimes[0],[ref]$starttime) -ne $true) - { - throw "Error converting start time" - } - - if ([datetime]::TryParse($upgradeTimes[2],[ref]$endtime) -ne $true) - { - throw "Error converting end time" - } - - if ($starttime -gt $endtime) - { - throw "Error: Start time cannot be larger than end time" - } - } - - if (($starttime -lt $now) -and ($endtime -gt $now)) - { - Write-Verbose -Message ("Current time is inside of the window specified in " + ` - "DatabaseUpgradeTime. Starting wizard") - } - else - { - Write-Verbose -Message ("Current time is outside of the window specified in " + ` - "DatabaseUpgradeTime, skipping the Configuration Wizard") - return - } - } - else - { - Write-Verbose -Message ("No DatabaseUpgradeTime specified, Configuration Wizard can be " + ` - "ran at any time. Starting wizard.") - } - - if ($Ensure -eq $false) - { - Write-Verbose -Message ("Ensure is set to Absent, so running the Configuration " + ` - "Wizard is not required") - return - } - - # Check which version of SharePoint is installed - if ((Get-SPDSCInstalledProductVersion).FileMajorPart -eq 15) - { - $binaryDir = Join-Path $env:CommonProgramFiles "Microsoft Shared\Web Server Extensions\15\BIN" - } - else - { - $binaryDir = Join-Path $env:CommonProgramFiles "Microsoft Shared\Web Server Extensions\16\BIN" - } - $psconfigExe = Join-Path -Path $binaryDir -ChildPath "psconfig.exe" - - # Start wizard - Write-Verbose -Message "Starting Configuration Wizard" - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $psconfigExe ` - -ScriptBlock { - $psconfigExe = $args[0] - $psconfig = Start-Process -FilePath $psconfigExe ` - -ArgumentList "-cmd upgrade -inplace b2b -wait -force" ` - -Wait ` - -PassThru - - return $psconfig.ExitCode - } - - # Error codes: https://aka.ms/installerrorcodes - switch ($result) - { - 0 { - Write-Verbose -Message "SharePoint Post Setup Configuration Wizard ran successfully" - } - Default { - throw ("SharePoint Post Setup Configuration Wizard failed, " + ` - "exit code was $($setup.ExitCode). Error codes can be found at " + ` - "https://aka.ms/installerrorcodes") - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [parameter(Mandatory = $false)] - [ValidateSet("mon","tue","wed","thu","fri","sat","sun")] - [System.String[]] - $DatabaseUpgradeDays, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseUpgradeTime, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing status of Configuration Wizard" - - if ($Ensure -eq "Absent") - { - Write-Verbose -Message ("Ensure is set to Absent, so running the Configuration Wizard " + ` - "is not required") - return $true - } - - $currentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPConfigWizard/MSFT_SPConfigWizard.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPConfigWizard/MSFT_SPConfigWizard.schema.mof deleted file mode 100644 index c93913ce..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPConfigWizard/MSFT_SPConfigWizard.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPConfigWizard")] -class MSFT_SPConfigWizard : OMI_BaseResource -{ - [Key, Description("Present to install SharePoint. Absent is currently not supported"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("Specify on which dates running the Configuration Wizard is allowed"), ValueMap{"mon","tue","wed","thu","fri","sat","sun"}, Values{"mon","tue","wed","thu","fri","sat","sun"}] String DatabaseUpgradeDays[]; - [Write, Description("Specify in which time frame running the Configuration Wizard is allowed")] String DatabaseUpgradeTime; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPContentDatabase/MSFT_SPContentDatabase.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPContentDatabase/MSFT_SPContentDatabase.psm1 deleted file mode 100644 index cda6fa9a..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPContentDatabase/MSFT_SPContentDatabase.psm1 +++ /dev/null @@ -1,401 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $false)] - [System.Boolean] - $Enabled, - - [parameter(Mandatory = $false)] - [System.UInt16] - $WarningSiteCount, - - [parameter(Mandatory = $false)] - [System.UInt16] - $MaximumSiteCount, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting content database configuration settings" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $cdb = Get-SPDatabase | Where-Object -FilterScript { - $_.Type -eq "Content Database" -and $_.Name -eq $params.Name - } - - if ($null -eq $cdb) - { - # Database does not exist - return @{ - Name = $params.Name - DatabaseServer = $params.DatabaseServer - WebAppUrl = $params.WebAppUrl - Enabled = $params.Enabled - WarningSiteCount = $params.WarningSiteCount - MaximumSiteCount = $params.MaximumSiteCount - Ensure = "Absent" - InstallAccount = $params.InstallAccount - } - } - else - { - # Database exists - if ($cdb.Status -eq "Online") - { - $cdbenabled = $true - } - else - { - $cdbenabled = $false - } - - $returnVal = @{ - Name = $params.Name - DatabaseServer = $cdb.Server - WebAppUrl = $cdb.WebApplication.Url.Trim("/") - Enabled = $cdbenabled - WarningSiteCount = $cdb.WarningSiteCount - MaximumSiteCount = $cdb.MaximumSiteCount - Ensure = "Present" - InstallAccount = $params.InstallAccount - } - return $returnVal - } - } - - return $result -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $false)] - [System.Boolean] - $Enabled, - - [parameter(Mandatory = $false)] - [System.UInt16] - $WarningSiteCount, - - [parameter(Mandatory = $false)] - [System.UInt16] - $MaximumSiteCount, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting content database configuration settings" - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - # Use Get-SPDatabase instead of Get-SPContentDatabase because the Get-SPContentDatabase - # does not return disabled databases. - $cdb = Get-SPDatabase | Where-Object -FilterScript { - $_.Type -eq "Content Database" -and $_.Name -eq $params.Name - } - - if ($params.Ensure -eq "Present") - { - # Check if specified web application exists and throw exception when - # this is not the case - $webapp = Get-SPWebApplication | Where-Object -FilterScript { - $_.Url.Trim("/") -eq $params.WebAppUrl.Trim("/") - } - - if ($null -eq $webapp) - { - throw "Specified web application does not exist." - } - - # Check if database exists - if ($null -ne $cdb) - { - if ($cdb.Server -ne $params.DatabaseServer) - { - throw ("Specified database server does not match the actual database " + ` - "server. This resource cannot move the database to a different " + ` - "SQL instance.") - } - - # Check and change attached web application. - # Dismount and mount to correct web application - if ($params.WebAppUrl.Trim("/") -ne $cdb.WebApplication.Url.Trim("/")) - { - Dismount-SPContentDatabase $params.Name -Confirm:$false - - $newParams= @{} - foreach ($param in $params.GetEnumerator()) - { - $skipParams = @("Enabled", "Ensure", "InstallAccount", "MaximumSiteCount", "WebAppUrl") - - if ($skipParams -notcontains $param.Key) - { - $newParams.$($param.Key) = $param.Value - } - - if ($param.Key -eq "MaximumSiteCount") - { - $newParams.MaxSiteCount = $param.Value - } - - if ($param.Key -eq "WebAppUrl") - { - $newParams.WebApplication = $param.Value - } - } - - try - { - $cdb = Mount-SPContentDatabase @newParams -ErrorAction Stop - } - catch - { - throw ("Error occurred while mounting content database. " + ` - "Content database is not mounted. " + ` - "Error details: $($_.Exception.Message)") - } - - if ($cdb.Status -eq "Online") - { - $cdbenabled = $true - } - else - { - $cdbenabled = $false - } - - if ($params.Enabled -ne $cdbenabled) - { - switch ($params.Enabled) - { - $true - { - $cdb.Status = [Microsoft.SharePoint.Administration.SPObjectStatus]::Online - } - $false - { - $cdb.Status = [Microsoft.SharePoint.Administration.SPObjectStatus]::Disabled - } - } - } - } - - # Check and change database status - if ($cdb.Status -eq "Online") - { - $cdbenabled = $true - } - else - { - $cdbenabled = $false - } - - if ($params.ContainsKey("Enabled") -and $params.Enabled -ne $cdbenabled) - { - switch ($params.Enabled) - { - $true - { - $cdb.Status = [Microsoft.SharePoint.Administration.SPObjectStatus]::Online - } - $false - { - $cdb.Status = [Microsoft.SharePoint.Administration.SPObjectStatus]::Disabled - } - } - } - - # Check and change site count settings - if ($null -ne $params.WarningSiteCount -and $params.WarningSiteCount -ne $cdb.WarningSiteCount) - { - $cdb.WarningSiteCount = $params.WarningSiteCount - } - - if ($params.MaximumSiteCount -and $params.MaximumSiteCount -ne $cdb.MaximumSiteCount) - { - $cdb.MaximumSiteCount = $params.MaximumSiteCount - } - } - else - { - # Database does not exist, but should. Create/mount database - $newParams= @{} - foreach ($param in $params.GetEnumerator()) - { - $skipParams = @("Enabled", "Ensure", "InstallAccount", "MaximumSiteCount", "WebAppUrl") - - if ($skipParams -notcontains $param.Key) - { - $newParams.$($param.Key) = $param.Value - } - - if ($param.Key -eq "MaximumSiteCount") - { - $newParams.MaxSiteCount = $param.Value - } - - if ($param.Key -eq "WebAppUrl") - { - $newParams.WebApplication = $param.Value - } - } - - try - { - $cdb = Mount-SPContentDatabase @newParams -ErrorAction Stop - } - catch - { - throw ("Error occurred while mounting content database. " + ` - "Content database is not mounted. " + ` - "Error details: $($_.Exception.Message)") - } - - if ($cdb.Status -eq "Online") - { - $cdbenabled = $true - } - else - { - $cdbenabled = $false - } - - if ($params.Enabled -ne $cdbenabled) - { - switch ($params.Enabled) - { - $true - { - $cdb.Status = [Microsoft.SharePoint.Administration.SPObjectStatus]::Online - } - $false - { - $cdb.Status = [Microsoft.SharePoint.Administration.SPObjectStatus]::Disabled - } - } - } - } - $cdb.Update() - } - else - { - if ($null -ne $cdb) - { - # Database exists, but shouldn't. Dismount database - Dismount-SPContentDatabase $params.Name -Confirm:$false - } - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $false)] - [System.Boolean] - $Enabled, - - [parameter(Mandatory = $false)] - [System.UInt16] - $WarningSiteCount, - - [parameter(Mandatory = $false)] - [System.UInt16] - $MaximumSiteCount, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing content database configuration settings" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($CurrentValues.DatabaseServer -ne $DatabaseServer) - { - Write-Verbose -Message ("Specified database server does not match the actual " + ` - "database server. This resource cannot move the database " + ` - "to a different SQL instance.") - return $false - } - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPContentDatabase/MSFT_SPContentDatabase.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPContentDatabase/MSFT_SPContentDatabase.schema.mof deleted file mode 100644 index 80fcc632..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPContentDatabase/MSFT_SPContentDatabase.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPContentDatabase")] -class MSFT_SPContentDatabase : OMI_BaseResource -{ - [Key, Description("Specifies the name of the content database")] String Name; - [Write, Description("The name of the database server to host the content DB")] string DatabaseServer; - [Required, Description("The URL of the web application")] string WebAppUrl; - [Write, Description("Should the database be enabled")] Boolean Enabled; - [Write, Description("Specify the site collection warning limit for the content database")] Uint16 WarningSiteCount; - [Write, Description("Specify the site collection maximum limit for the content database")] Uint16 MaximumSiteCount; - [Write, Description("Present to create this database, absent to ensure it does not exist"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPCreateFarm/MSFT_SPCreateFarm.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPCreateFarm/MSFT_SPCreateFarm.psm1 deleted file mode 100644 index 6e9d9470..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPCreateFarm/MSFT_SPCreateFarm.psm1 +++ /dev/null @@ -1,395 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $FarmConfigDatabaseName, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $FarmAccount, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $Passphrase, - - [parameter(Mandatory = $true)] - [System.String] - $AdminContentDatabaseName, - - [parameter(Mandatory = $false)] - [System.UInt32] - $CentralAdministrationPort, - - [parameter(Mandatory = $false)] - [System.String] - [ValidateSet("NTLM","Kerberos")] - $CentralAdministrationAuth, - - [parameter(Mandatory = $false)] - [System.String] - [ValidateSet("Application", - "ApplicationWithSearch", - "Custom", - "DistributedCache", - "Search", - "SingleServer", - "SingleServerFarm", - "WebFrontEnd", - "WebFrontEndWithDistributedCache")] - $ServerRole - ) - - Write-Verbose -Message ("WARNING! SPCreateFarm is deprecated and will be removed in " + ` - "SharePointDsc v2.0. Swap to use the new SPFarm resource as " + ` - "an alternative. See http://aka.ms/SPDsc-SPFarm for details.") - - Write-Verbose -Message "Getting local SP Farm settings" - - if (($PSBoundParameters.ContainsKey("ServerRole") -eq $true) ` - -and (Get-SPDSCInstalledProductVersion).FileMajorPart -ne 16) - { - throw [Exception] "Server role is only supported in SharePoint 2016." - } - - if (($PSBoundParameters.ContainsKey("ServerRole") -eq $true) ` - -and (Get-SPDSCInstalledProductVersion).FileMajorPart -eq 16 ` - -and (Get-SPDSCInstalledProductVersion).FileBuildPart -lt 4456 ` - -and ($ServerRole -eq "ApplicationWithSearch" ` - -or $ServerRole -eq "WebFrontEndWithDistributedCache")) - { - throw [Exception] ("ServerRole values of 'ApplicationWithSearch' or " + ` - "'WebFrontEndWithDistributedCache' require the SharePoint 2016 " + ` - "Feature Pack 1 to be installed. See " + ` - "https://support.microsoft.com/en-au/kb/3127940") - } - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $getSPMajorVersion = (Get-SPDSCInstalledProductVersion).FileMajorPart - $cfgDbRegKey = "hklm:SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\$getSPMajorVersion.0\Secure\ConfigDB" - try - { - $configDbDsn = Get-SPDSCRegistryKey -Key $cfgDbRegKey -Value "dsn" - } - catch - { - Write-Verbose -Message "SharePoint registry key cannot be found." - } - $serverIsJoined = $true - - if ($null -eq $configDbDsn) - { - $serverIsJoined = $false - } - elseif (-NOT($configDbDsn.Contains($params.FarmConfigDatabaseName))) - { - $serverIsJoined = $false - } - - try - { - $spFarm = Get-SPFarm - } - catch - { - Write-Verbose -Message "Unable to detect local farm." - } - - if ($null -eq $spFarm) - { - if ($serverIsJoined) - { - throw 'Server already joined to farm but SPFarm not reachable' - } - return $null - } - - $configDb = Get-SPDatabase | Where-Object -FilterScript { - $_.Name -eq $spFarm.Name -and $_.Type -eq "Configuration Database" - } - $centralAdminSite = Get-SPWebApplication -IncludeCentralAdministration ` - | Where-Object -FilterScript { - $_.IsAdministrationWebApplication -eq $true - } - - if ($params.FarmAccount.UserName -eq $spFarm.DefaultServiceAccount.Name) - { - $farmAccount = $params.FarmAccount - } - else - { - $farmAccount = $spFarm.DefaultServiceAccount.Name - } - - $returnValue = @{ - FarmConfigDatabaseName = $spFarm.Name - DatabaseServer = $configDb.Server.Name - FarmAccount = $farmAccount - InstallAccount = $params.InstallAccount - Passphrase = $params.Passphrase.password - AdminContentDatabaseName = $centralAdminSite.ContentDatabases[0].Name - CentralAdministrationPort = (New-Object -TypeName System.Uri $centralAdminSite.Url).Port - CentralAdministrationAuth = $params.CentralAdministrationAuth - } - return $returnValue - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $FarmConfigDatabaseName, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $FarmAccount, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $Passphrase, - - [parameter(Mandatory = $true)] - [System.String] - $AdminContentDatabaseName, - - [parameter(Mandatory = $false)] - [System.UInt32] - $CentralAdministrationPort, - - [parameter(Mandatory = $false)] - [System.String] - [ValidateSet("NTLM","Kerberos")] - $CentralAdministrationAuth, - - [parameter(Mandatory = $false)] - [System.String] - [ValidateSet("Application", - "ApplicationWithSearch", - "Custom", - "DistributedCache", - "Search", - "SingleServer", - "SingleServerFarm", - "WebFrontEnd", - "WebFrontEndWithDistributedCache")] - $ServerRole - ) - - Write-Verbose -Message ("WARNING! SPCreateFarm is deprecated and will be removed in " + ` - "SharePointDsc v2.0. Swap to use the new SPFarm resource as " + ` - "an alternative. See http://aka.ms/SPDsc-SPFarm for details.") - - Write-Verbose -Message "Setting local SP Farm settings" - - if (($PSBoundParameters.ContainsKey("ServerRole") -eq $true) ` - -and (Get-SPDSCInstalledProductVersion).FileMajorPart -ne 16) - { - throw [Exception] "Server role is only supported in SharePoint 2016." - } - - if (($PSBoundParameters.ContainsKey("ServerRole") -eq $true) ` - -and (Get-SPDSCInstalledProductVersion).FileMajorPart -eq 16 ` - -and (Get-SPDSCInstalledProductVersion).FileBuildPart -lt 4456 ` - -and ($ServerRole -eq "ApplicationWithSearch" ` - -or $ServerRole -eq "WebFrontEndWithDistributedCache")) - { - throw [Exception] ("ServerRole values of 'ApplicationWithSearch' or " + ` - "'WebFrontEndWithDistributedCache' require the SharePoint 2016 " + ` - "Feature Pack 1 to be installed. See " + ` - "https://support.microsoft.com/en-au/kb/3127940") - } - - $CurrentValues = Get-TargetResource @PSBoundParameters - if ([string]::IsNullOrEmpty($CurrentValues.FarmConfigDatabaseName) -eq $false) - { - throw ("This server is already connected to a farm " + ` - "($($CurrentValues.FarmConfigDatabaseName)). Please manually remove it " + ` - "to apply this change.") - } - - if (-not $PSBoundParameters.ContainsKey("CentralAdministrationPort")) - { - $PSBoundParameters.Add("CentralAdministrationPort", 9999) - } - if (-not $PSBoundParameters.ContainsKey("CentralAdministrationAuth")) - { - $PSBoundParameters.Add("CentralAdministrationAuth", "NTLM") - } - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters, $PSScriptRoot) ` - -ScriptBlock { - - $params = $args[0] - $scriptRoot = $args[1] - - $modulePath = "..\..\Modules\SharePointDsc.Farm\SPFarm.psm1" - Import-Module -Name (Join-Path -Path $scriptRoot -ChildPath $modulePath -Resolve) - $dbStatus = Get-SPDSCConfigDBStatus -SQLServer $params.DatabaseServer ` - -Database $params.FarmConfigDatabaseName - - while ($dbStatus.Locked -eq $true) - { - Write-Verbose -Message ("[$([DateTime]::Now.ToShortTimeString())] The configuration " + ` - "database is currently being provisioned by a remote " + ` - "server, this server will wait for this to complete") - Start-Sleep -Seconds 30 - $dbStatus = Get-SPDSCConfigDBStatus -SQLServer $params.DatabaseServer ` - -Database $params.FarmConfigDatabaseName - } - - if ($dbStatus.ValidPermissions -eq $false) - { - throw "The current user does not have sufficient permissions to SQL Server" - return - } - - $newFarmArgs = @{ - DatabaseServer = $params.DatabaseServer - DatabaseName = $params.FarmConfigDatabaseName - FarmCredentials = $params.FarmAccount - AdministrationContentDatabaseName = $params.AdminContentDatabaseName - Passphrase = ($params.Passphrase).Password - SkipRegisterAsDistributedCacheHost = $true - } - - switch((Get-SPDSCInstalledProductVersion).FileMajorPart) - { - 15 { - Write-Verbose -Message "Detected Version: SharePoint 2013" - } - 16 { - if ($params.ContainsKey("ServerRole") -eq $true) - { - Write-Verbose -Message ("Detected Version: SharePoint 2016 - " + ` - "configuring server as $($params.ServerRole)") - $newFarmArgs.Add("LocalServerRole", $params.ServerRole) - } - else - { - Write-Verbose -Message ("Detected Version: SharePoint 2016 - no " + ` - "server role provided, configuring server " + ` - "without a specific role") - $newFarmArgs.Add("ServerRoleOptional", $true) - } - } - Default { - throw [Exception] ("An unknown version of SharePoint (Major version $_) was " + ` - "detected. Only versions 15 (SharePoint 2013) or 16 " + ` - "(SharePoint 2016) are supported.") - } - } - - New-SPConfigurationDatabase @newFarmArgs - Install-SPHelpCollection -All - Initialize-SPResourceSecurity - Install-SPService - Install-SPFeature -AllExistingFeatures -Force - New-SPCentralAdministration -Port $params.CentralAdministrationPort ` - -WindowsAuthProvider $params.CentralAdministrationAuth - Install-SPApplicationContent - } | Out-Null -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $FarmConfigDatabaseName, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $FarmAccount, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $Passphrase, - - [parameter(Mandatory = $true)] - [System.String] - $AdminContentDatabaseName, - - [parameter(Mandatory = $false)] - [System.UInt32] - $CentralAdministrationPort, - - [parameter(Mandatory = $false)] - [System.String] - [ValidateSet("NTLM","Kerberos")] - $CentralAdministrationAuth, - - [parameter(Mandatory = $false)] - [System.String] - [ValidateSet("Application", - "ApplicationWithSearch", - "Custom", - "DistributedCache", - "Search", - "SingleServer", - "SingleServerFarm", - "WebFrontEnd", - "WebFrontEndWithDistributedCache")] - $ServerRole - ) - - Write-Verbose -Message "Testing local SP Farm settings" - - if (($PSBoundParameters.ContainsKey("ServerRole") -eq $true) ` - -and (Get-SPDSCInstalledProductVersion).FileMajorPart -ne 16) - { - throw [Exception] "Server role is only supported in SharePoint 2016." - } - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($null -eq $CurrentValues) - { - return $false - } - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("FarmConfigDatabaseName") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPCreateFarm/MSFT_SPCreateFarm.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPCreateFarm/MSFT_SPCreateFarm.schema.mof deleted file mode 100644 index 40339482..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPCreateFarm/MSFT_SPCreateFarm.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPCreateFarm")] -class MSFT_SPCreateFarm : OMI_BaseResource -{ - [Key, Description("Name of the configuration database")] String FarmConfigDatabaseName; - [Key, Description("Server that will host the configuration and admin content databases")] String DatabaseServer; - [Required, Description("The account to use as the main farm account"), EmbeddedInstance("MSFT_Credential")] String FarmAccount; - [Required, Description("The passphrase to use to allow servers to join this farm"), EmbeddedInstance("MSFT_Credential")] String Passphrase; - [Required, Description("The name of the admin content database")] String AdminContentDatabaseName; - [Write, Description("What port will Central Admin be provisioned to - default is 9999")] uint32 CentralAdministrationPort; - [Write, Description("The authentication provider of the CentralAdministration web application"), ValueMap{"NTLM","Kerberos"}, Values{"NTLM","Kerberos"}] String CentralAdministrationAuth; - [Write, Description("SharePoint 2016 only - the MinRole role to enroll this server as"), ValueMap{"Application","ApplicationWithSearch","Custom","DistributedCache","Search","SingleServer","SingleServerFarm","WebFrontEnd","WebFrontEndWithDistributedCache"}, Values{"Application","ApplicationWithSearch","Custom","DistributedCache","Search","SingleServer","SingleServerFarm","WebFrontEnd","WebFrontEndWithDistributedCache"}] string ServerRole; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/MSFT_SPDatabaseAAG.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/MSFT_SPDatabaseAAG.psm1 deleted file mode 100644 index c6ac6f0d..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/MSFT_SPDatabaseAAG.psm1 +++ /dev/null @@ -1,294 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $true)] - [System.String] - $AGName, - - [parameter(Mandatory = $false)] - [System.String] - $FileShare, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting AAG configuration for $DatabaseName" - - # Check if the April 2014 CU has been installed. The cmdlets have been added in this CU - if ((Get-SPDSCInstalledProductVersion).FileMajorPart -eq 15 ` - -and (Get-SPDSCInstalledProductVersion).FileBuildPart -lt 4605) - { - throw [Exception] ("Adding databases to SQL Always-On Availability Groups " + ` - "require the SharePoint 2013 April 2014 CU to be installed. " + ` - "http://support.microsoft.com/kb/2880551") - } - - if ($Ensure -eq "Present") - { - Write-Verbose -Message "Database(s) must be included in AAG $AGName" - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments ($PSBoundParameters) ` - -ScriptBlock { - $params = $args[0] - - $Ensure = "Present" - $databases = Get-SPDatabase | Where-Object -FilterScript { - $_.Name -like $params.DatabaseName - } - - $dbname = $params.DatabaseName - if ($null -ne $databases) - { - foreach ($database in $databases) - { - $ag = $database.AvailabilityGroup - if ($null -ne $ag) - { - if ($ag.Name -ne $params.AGName) - { - $Ensure = "Absent" - } - } - else - { - $Ensure = "Absent" - } - } - } - else - { - Write-Verbose -Message "Specified database(s) not found." - $dbname = "" - } - - return @{ - DatabaseName = $dbname - AGName = $params.AGName - FileShare = $params.FileShare - Ensure = $Ensure - InstallAccount = $params.InstallAccount - } - } - } - else - { - Write-Verbose -Message "Database(s) must not be included in an AAG $AGName" - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $Ensure = "Absent" - $databases = Get-SPDatabase | Where-Object -FilterScript { - $_.Name -like $params.DatabaseName - } - - $dbname = $params.DatabaseName - if ($null -ne $databases) - { - foreach ($database in $databases) - { - $ag = $database.AvailabilityGroup - if ($null -ne $ag) - { - $Ensure = "Present" - } - } - } - else - { - Write-Verbose -Message "Specified database(s) not found." - $dbname = "" - } - - return @{ - DatabaseName = $dbname - AGName = $params.AGName - FileShare = $params.FileShare - Ensure = $Ensure - InstallAccount = $params.InstallAccount - } - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $true)] - [System.String] - $AGName, - - [parameter(Mandatory = $false)] - [System.String] - $FileShare, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting AAG configuration for $DatabaseName" - - # Check if the April 2014 CU has been installed. The cmdlets have been added in this CU - if ((Get-SPDSCInstalledProductVersion).FileMajorPart -eq 15 ` - -and (Get-SPDSCInstalledProductVersion).FileBuildPart -lt 4605) - { - throw [Exception] ("Adding databases to SQL Always-On Availability Groups " + ` - "require the SharePoint 2013 April 2014 CU to be installed. " + ` - "http://support.microsoft.com/kb/2880551") - } - - if ($Ensure -eq "Present") - { - Write-Verbose -Message "Checking AAG settings for $DatabaseName" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments ($PSBoundParameters) ` - -ScriptBlock { - $params = $args[0] - - $databases = Get-SPDatabase | Where-Object -FilterScript { - $_.Name -like $params.DatabaseName - } - - if ($null -ne $databases) - { - foreach ($database in $databases) - { - $ag = $database.AvailabilityGroup - if ($null -ne $ag) - { - if ($ag.Name -ne $params.AGName) - { - # Remove it from the current AAG first - Remove-DatabaseFromAvailabilityGroup -AGName $params.AGName ` - -DatabaseName $database.Name ` - -Force - - # Now add it to the AAG it's meant to be in - $addParams = @{ - AGName = $params.AGName - DatabaseName = $database.Name - } - if ($params.ContainsKey("FileShare")) - { - $addParams.Add("FileShare", $params.FileShare) - } - Add-DatabaseToAvailabilityGroup @addParams - } - } - else - { - Write-Verbose -Message "Adding $DatabaseName to $AGName" - $cmdParams = @{ - AGName = $params.AGName - DatabaseName = $database.Name - } - if ($params.ContainsKey("FileShare")) - { - $cmdParams.Add("FileShare", $params.FileShare) - } - Add-DatabaseToAvailabilityGroup @cmdParams - } - } - } - else - { - throw "Specified database(s) not found." - } - } - } - else - { - Write-Verbose -Message "Removing $DatabaseName from $AGName" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $databases = Get-SPDatabase | Where-Object -FilterScript { - $_.Name -like $params.DatabaseName - } - - if ($null -ne $databases) - { - foreach ($database in $databases) - { - Remove-DatabaseFromAvailabilityGroup -AGName $params.AGName ` - -DatabaseName $database.Name ` - -Force - } - } - else - { - throw "Specified database(s) not found." - } - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $true)] - [System.String] - $AGName, - - [parameter(Mandatory = $false)] - [System.String] - $FileShare, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing AAG configuration for $DatabaseName" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure", "DatabaseName") -} - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/MSFT_SPDatabaseAAG.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/MSFT_SPDatabaseAAG.schema.mof deleted file mode 100644 index 48373c97..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/MSFT_SPDatabaseAAG.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPDatabaseAAG")] -class MSFT_SPDatabaseAAG : OMI_BaseResource -{ - [Key, Description("The name of the database to put in the AlwaysOn group")] string DatabaseName; - [Required, Description("Name of the AlwaysOn group on the SQL server - this must already exist")] string AGName; - [Write, Description("The fileshare to use for the SQL backup when adding to the group")] string FileShare; - [Write, Description("Present if the database should be in this AlwaysOn group, or Absent if it should not be in the group"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/MSFT_SPDesignerSettings.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/MSFT_SPDesignerSettings.psm1 deleted file mode 100644 index aae291bd..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/MSFT_SPDesignerSettings.psm1 +++ /dev/null @@ -1,418 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $true)] - [ValidateSet("WebApplication","SiteCollection")] - [System.String] - $SettingsScope, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowSharePointDesigner, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowDetachPagesFromDefinition, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowCustomiseMasterPage, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowManageSiteURLStructure, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowCreateDeclarativeWorkflow, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowSavePublishDeclarativeWorkflow, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowSaveDeclarativeWorkflowAsTemplate, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting SharePoint Designer configuration settings" - - switch ($SettingsScope) - { - "WebApplication" { - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - try - { - $spFarm = Get-SPFarm - } - catch - { - Write-Verbose -Message ("No local SharePoint farm was detected. " + ` - "SharePoint Designer settings will not be applied") - return $null - } - - # Check if web application exists - $webapp = Get-SPWebApplication | Where-Object -FilterScript { - ($_.Url).StartsWith($params.Url) - } - if ($null -eq $webapp) - { - Write-Verbose -Message ("Web application not found. SharePoint Designer " + ` - "settings will not be applied") - return $null - } - else - { - # Get SPD settings for the web application - $spdSettings = Get-SPDesignerSettings $params.Url - - return @{ - # Set the SPD settings - Url = $params.Url - SettingsScope = $params.SettingsScope - AllowSharePointDesigner = $spdSettings.AllowDesigner - AllowDetachPagesFromDefinition = $spdSettings.AllowRevertFromTemplate - AllowCustomiseMasterPage = $spdSettings.AllowMasterPageEditing - AllowManageSiteURLStructure = $spdSettings.ShowURLStructure - AllowCreateDeclarativeWorkflow = ` - $spdSettings.AllowCreateDeclarativeWorkflow - AllowSavePublishDeclarativeWorkflow = ` - $spdSettings.AllowSavePublishDeclarativeWorkflow - AllowSaveDeclarativeWorkflowAsTemplate = ` - $spdSettings.AllowSaveDeclarativeWorkflowAsTemplate - InstallAccount = $params.InstallAccount - } - } - } - } - "SiteCollection" { - if ((Test-SPDSCRunAsCredential -Credential $InstallAccount) -eq $true) - { - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - try - { - $spFarm = Get-SPFarm - } - catch - { - Write-Verbose -Message ("No local SharePoint farm was detected. " + ` - "SharePoint Designer settings will not be applied") - return $null - } - - # Check if site collections exists - $site = Get-SPSite -Identity $params.Url -ErrorAction SilentlyContinue - if ($null -eq $site) - { - Write-Verbose -Message ("Site collection not found. SharePoint " + ` - "Designer settings will not be applied") - return $null - } - else - { - return @{ - # Set the SPD settings - Url = $params.Url - SettingsScope = $params.SettingsScope - AllowSharePointDesigner = $site.AllowDesigner - AllowDetachPagesFromDefinition = $site.AllowRevertFromTemplate - AllowCustomiseMasterPage = $site.AllowMasterPageEditing - AllowManageSiteURLStructure = $site.ShowURLStructure - AllowCreateDeclarativeWorkflow = $site.AllowCreateDeclarativeWorkflow - AllowSavePublishDeclarativeWorkflow = ` - $site.AllowSavePublishDeclarativeWorkflow - AllowSaveDeclarativeWorkflowAsTemplate = ` - $site.AllowSaveDeclarativeWorkflowAsTemplate - InstallAccount = $params.InstallAccount - } - } - } - } - else - { - throw ("A known issue exists that prevents these settings from being managed " + ` - "when InstallAccount is used instead of PsDscRunAsAccount. See " + ` - "http://aka.ms/xSharePointRemoteIssues for details.") - } - } - } - return $result -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $true)] - [ValidateSet("WebApplication","SiteCollection")] - [System.String] - $SettingsScope, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowSharePointDesigner, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowDetachPagesFromDefinition, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowCustomiseMasterPage, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowManageSiteURLStructure, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowCreateDeclarativeWorkflow, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowSavePublishDeclarativeWorkflow, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowSaveDeclarativeWorkflowAsTemplate, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting SharePoint Designer configuration settings" - - switch ($SettingsScope) - { - "WebApplication" { - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - try - { - $spFarm = Get-SPFarm - } - catch - { - throw ("No local SharePoint farm was detected. SharePoint " + ` - "Designer settings will not be applied") - return - } - - Write-Verbose -Message "Start update SPD web application settings" - - # Check if web application exists - $webapp = Get-SPWebApplication | Where-Object -FilterScript { - ($_.Url).StartsWith($params.Url) - } - if ($null -eq $webapp) - { - throw ("Web application not found. SharePoint Designer settings " + ` - "will not be applied") - return - } - else - { - # Set the SharePoint Designer settings - if ($params.ContainsKey("AllowSharePointDesigner")) - { - $webapp.AllowDesigner = $params.AllowSharePointDesigner - } - if ($params.ContainsKey("AllowDetachPagesFromDefinition")) - { - $webapp.AllowRevertFromTemplate = $params.AllowDetachPagesFromDefinition - } - if ($params.ContainsKey("AllowCustomiseMasterPage")) - { - $webapp.AllowMasterPageEditing = $params.AllowCustomiseMasterPage - } - if ($params.ContainsKey("AllowManageSiteURLStructure")) - { - $webapp.ShowURLStructure = $params.AllowManageSiteURLStructure - } - if ($params.ContainsKey("AllowCreateDeclarativeWorkflow")) - { - $webapp.AllowCreateDeclarativeWorkflow = ` - $params.AllowCreateDeclarativeWorkflow - } - if ($params.ContainsKey("AllowSavePublishDeclarativeWorkflow")) - { - $webapp.AllowSavePublishDeclarativeWorkflow = ` - $params.AllowSavePublishDeclarativeWorkflow - } - if ($params.ContainsKey("AllowSaveDeclarativeWorkflowAsTemplate")) - { - $webapp.AllowSaveDeclarativeWorkflowAsTemplate = ` - $params.AllowSaveDeclarativeWorkflowAsTemplate - } - $webapp.Update() - } - } - } - "SiteCollection" { - if ((Test-SPDSCRunAsCredential -Credential $InstallAccount) -eq $true) - { - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - try - { - $spFarm = Get-SPFarm - } - catch - { - throw ("No local SharePoint farm was detected. SharePoint Designer " + ` - "settings will not be applied") - return - } - - Write-Verbose -Message "Start update SPD site collection settings" - - # Check if site collection exists - $site = Get-SPSite -Identity $params.Url -ErrorAction SilentlyContinue - if ($null -eq $site) - { - throw ("Site collection not found. SharePoint Designer settings " + ` - "will not be applied") - return $null - } - else - { - # Set the SharePoint Designer settings - if ($params.ContainsKey("AllowSharePointDesigner")) - { - $site.AllowDesigner = $params.AllowSharePointDesigner - } - if ($params.ContainsKey("AllowDetachPagesFromDefinition")) - { - $site.AllowRevertFromTemplate = $params.AllowDetachPagesFromDefinition - } - if ($params.ContainsKey("AllowCustomiseMasterPage")) - { - $site.AllowMasterPageEditing = $params.AllowCustomiseMasterPage - } - if ($params.ContainsKey("AllowManageSiteURLStructure")) - { - $site.ShowURLStructure = $params.AllowManageSiteURLStructure - } - if ($params.ContainsKey("AllowCreateDeclarativeWorkflow")) - { - $site.AllowCreateDeclarativeWorkflow = ` - $params.AllowCreateDeclarativeWorkflow - } - if ($params.ContainsKey("AllowSavePublishDeclarativeWorkflow")) - { - $site.AllowSavePublishDeclarativeWorkflow = ` - $params.AllowSavePublishDeclarativeWorkflow - } - if ($params.ContainsKey("AllowSaveDeclarativeWorkflowAsTemplate")) - { - $site.AllowSaveDeclarativeWorkflowAsTemplate = ` - $params.AllowSaveDeclarativeWorkflowAsTemplate - } - } - } - } - else - { - throw ("A known issue exists that prevents these settings from being " + ` - "managed when InstallAccount is used instead of PsDscRunAsAccount. " + ` - "See http://aka.ms/xSharePointRemoteIssues for details.") - } - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $true)] - [ValidateSet("WebApplication","SiteCollection")] - [System.String] - $SettingsScope, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowSharePointDesigner, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowDetachPagesFromDefinition, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowCustomiseMasterPage, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowManageSiteURLStructure, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowCreateDeclarativeWorkflow, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowSavePublishDeclarativeWorkflow, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowSaveDeclarativeWorkflowAsTemplate, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing SharePoint Designer configuration settings" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($null -eq $CurrentValues) - { - return $false - } - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/MSFT_SPDesignerSettings.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/MSFT_SPDesignerSettings.schema.mof deleted file mode 100644 index 1174ff18..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/MSFT_SPDesignerSettings.schema.mof +++ /dev/null @@ -1,15 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPDesignerSettings")] -class MSFT_SPDesignerSettings : OMI_BaseResource -{ - [Key, Description("The URL of the web application or site collection to configure")] string Url; - [Required, Description("Define the scope of the configuration - either WebApplication or SiteCollection"), ValueMap{"WebApplication","SiteCollection"}, Values{"WebApplication","SiteCollection"}] string SettingsScope; - [Write, Description("Allow the use of SharePoint Designer")] Boolean AllowSharePointDesigner; - [Write, Description("Allow pages to be un-ghosted by SharePoint Designer")] Boolean AllowDetachPagesFromDefinition; - [Write, Description("Allow masterpages to be changed by SharePoint Designer")] Boolean AllowCustomiseMasterPage; - [Write, Description("Allow site URL structure to be changed by SharePoint Designer")] Boolean AllowManageSiteURLStructure; - [Write, Description("Allow users to create declarative workflows with SharePoint Designer")] Boolean AllowCreateDeclarativeWorkflow; - [Write, Description("Allow users to save and re-publish declarative workflows with SharePoint Designer")] Boolean AllowSavePublishDeclarativeWorkflow; - [Write, Description("Allow users to save declarative workflows as a template from SharePoint Designer")] Boolean AllowSaveDeclarativeWorkflowAsTemplate; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/MSFT_SPDiagnosticLoggingSettings.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/MSFT_SPDiagnosticLoggingSettings.psm1 deleted file mode 100644 index a4eb386d..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/MSFT_SPDiagnosticLoggingSettings.psm1 +++ /dev/null @@ -1,321 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $LogPath, - - [parameter(Mandatory = $true)] - [System.UInt32] - $LogSpaceInGB, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AppAnalyticsAutomaticUploadEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $CustomerExperienceImprovementProgramEnabled, - - [parameter(Mandatory = $false)] - [System.UInt32] - $DaysToKeepLogs, - - [parameter(Mandatory = $false)] - [System.Boolean] - $DownloadErrorReportingUpdatesEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ErrorReportingAutomaticUploadEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ErrorReportingEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $EventLogFloodProtectionEnabled, - - [parameter(Mandatory = $false)] - [System.UInt32] - $EventLogFloodProtectionNotifyInterval, - - [parameter(Mandatory = $false)] - [System.UInt32] - $EventLogFloodProtectionQuietPeriod, - - [parameter(Mandatory = $false)] - [System.UInt32] - $EventLogFloodProtectionThreshold, - - [parameter(Mandatory = $false)] - [System.UInt32] - $EventLogFloodProtectionTriggerPeriod, - - [parameter(Mandatory = $false)] - [System.UInt32] - $LogCutInterval, - - [parameter(Mandatory = $false)] - [System.Boolean] - $LogMaxDiskSpaceUsageEnabled, - - [parameter(Mandatory = $false)] - [System.UInt32] - $ScriptErrorReportingDelay, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ScriptErrorReportingEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ScriptErrorReportingRequireAuth, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting diagnostic configuration settings" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $dc = Get-SPDiagnosticConfig -ErrorAction SilentlyContinue - if ($null -eq $dc) { - return $null - } - - return @{ - AppAnalyticsAutomaticUploadEnabled = $dc.AppAnalyticsAutomaticUploadEnabled - CustomerExperienceImprovementProgramEnabled = ` - $dc.CustomerExperienceImprovementProgramEnabled - ErrorReportingEnabled = $dc.ErrorReportingEnabled - ErrorReportingAutomaticUploadEnabled = $dc.ErrorReportingAutomaticUploadEnabled - DownloadErrorReportingUpdatesEnabled = $dc.DownloadErrorReportingUpdatesEnabled - DaysToKeepLogs = $dc.DaysToKeepLogs - LogMaxDiskSpaceUsageEnabled = $dc.LogMaxDiskSpaceUsageEnabled - LogSpaceInGB = $dc.LogDiskSpaceUsageGB - LogPath = $dc.LogLocation - LogCutInterval = $dc.LogCutInterval - EventLogFloodProtectionEnabled = $dc.EventLogFloodProtectionEnabled - EventLogFloodProtectionThreshold = $dc.EventLogFloodProtectionThreshold - EventLogFloodProtectionTriggerPeriod = $dc.EventLogFloodProtectionTriggerPeriod - EventLogFloodProtectionQuietPeriod = $dc.EventLogFloodProtectionQuietPeriod - EventLogFloodProtectionNotifyInterval = $dc.EventLogFloodProtectionNotifyInterval - ScriptErrorReportingEnabled = $dc.ScriptErrorReportingEnabled - ScriptErrorReportingRequireAuth = $dc.ScriptErrorReportingRequireAuth - ScriptErrorReportingDelay = $dc.ScriptErrorReportingDelay - InstallAccount = $params.InstallAccount - } - } - return $result -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $LogPath, - - [parameter(Mandatory = $true)] - [System.UInt32] - $LogSpaceInGB, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AppAnalyticsAutomaticUploadEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $CustomerExperienceImprovementProgramEnabled, - - [parameter(Mandatory = $false)] - [System.UInt32] - $DaysToKeepLogs, - - [parameter(Mandatory = $false)] - [System.Boolean] - $DownloadErrorReportingUpdatesEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ErrorReportingAutomaticUploadEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ErrorReportingEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $EventLogFloodProtectionEnabled, - - [parameter(Mandatory = $false)] - [System.UInt32] - $EventLogFloodProtectionNotifyInterval, - - [parameter(Mandatory = $false)] - [System.UInt32] - $EventLogFloodProtectionQuietPeriod, - - [parameter(Mandatory = $false)] - [System.UInt32] - $EventLogFloodProtectionThreshold, - - [parameter(Mandatory = $false)] - [System.UInt32] - $EventLogFloodProtectionTriggerPeriod, - - [parameter(Mandatory = $false)] - [System.UInt32] - $LogCutInterval, - - [parameter(Mandatory = $false)] - [System.Boolean] - $LogMaxDiskSpaceUsageEnabled, - - [parameter(Mandatory = $false)] - [System.UInt32] - $ScriptErrorReportingDelay, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ScriptErrorReportingEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ScriptErrorReportingRequireAuth, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting diagnostic configuration settings" - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - if ($params.ContainsKey("InstallAccount")) - { - $params.Remove("InstallAccount") | Out-Null - } - $params = $params | Rename-SPDSCParamValue -oldName "LogPath" ` - -newName "LogLocation" ` - | Rename-SPDSCParamValue -oldName "LogSpaceInGB" ` - -newName "LogDiskSpaceUsageGB" - - Set-SPDiagnosticConfig @params - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $LogPath, - - [parameter(Mandatory = $true)] - [System.UInt32] - $LogSpaceInGB, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AppAnalyticsAutomaticUploadEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $CustomerExperienceImprovementProgramEnabled, - - [parameter(Mandatory = $false)] - [System.UInt32] - $DaysToKeepLogs, - - [parameter(Mandatory = $false)] - [System.Boolean] - $DownloadErrorReportingUpdatesEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ErrorReportingAutomaticUploadEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ErrorReportingEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $EventLogFloodProtectionEnabled, - - [parameter(Mandatory = $false)] - [System.UInt32] - $EventLogFloodProtectionNotifyInterval, - - [parameter(Mandatory = $false)] - [System.UInt32] - $EventLogFloodProtectionQuietPeriod, - - [parameter(Mandatory = $false)] - [System.UInt32] - $EventLogFloodProtectionThreshold, - - [parameter(Mandatory = $false)] - [System.UInt32] - $EventLogFloodProtectionTriggerPeriod, - - [parameter(Mandatory = $false)] - [System.UInt32] - $LogCutInterval, - - [parameter(Mandatory = $false)] - [System.Boolean] - $LogMaxDiskSpaceUsageEnabled, - - [parameter(Mandatory = $false)] - [System.UInt32] - $ScriptErrorReportingDelay, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ScriptErrorReportingEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ScriptErrorReportingRequireAuth, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing diagnostic configuration settings" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($null -eq $CurrentValues) - { - return $false - } - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/MSFT_SPDiagnosticLoggingSettings.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/MSFT_SPDiagnosticLoggingSettings.schema.mof deleted file mode 100644 index e2bd4586..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/MSFT_SPDiagnosticLoggingSettings.schema.mof +++ /dev/null @@ -1,24 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPDiagnosticLoggingSettings")] -class MSFT_SPDiagnosticLoggingSettings : OMI_BaseResource -{ - [Key, Description("The physical path on each server to store ULS logs")] string LogPath; - [Required, Description("The space in GB that should be used to store ULS logs")] uint32 LogSpaceInGB; - [Write, Description("Should app analytics automatically be uploaded")] boolean AppAnalyticsAutomaticUploadEnabled; - [Write, Description("Should the customer experience program be enabled in this farm")] boolean CustomerExperienceImprovementProgramEnabled; - [Write, Description("How many days should ULS logs be kept for")] uint32 DaysToKeepLogs; - [Write, Description("Should updates to error reporting tools be automatically downloaded")] boolean DownloadErrorReportingUpdatesEnabled; - [Write, Description("Should error reports be automatically uploaded")] boolean ErrorReportingAutomaticUploadEnabled; - [Write, Description("Should reporting of errors be enabled")] boolean ErrorReportingEnabled; - [Write, Description("Protect event logs with Event Log Flood Protection")] boolean EventLogFloodProtectionEnabled; - [Write, Description("What interval should the event logs report a flood event")] uint32 EventLogFloodProtectionNotifyInterval; - [Write, Description("What quiet period should reset the event log flood protection thresholds")] uint32 EventLogFloodProtectionQuietPeriod; - [Write, Description("What is the event log flood protection threshold")] uint32 EventLogFloodProtectionThreshold; - [Write, Description("What is the time period that will trigger event log flood protection")] uint32 EventLogFloodProtectionTriggerPeriod; - [Write, Description("How many minutes of activity will a ULS log file leep in an individual file")] uint32 LogCutInterval; - [Write, Description("Will the maximum disk space setting be enabled")] boolean LogMaxDiskSpaceUsageEnabled; - [Write, Description("What delay will be set before script error reporting is triggered")] uint32 ScriptErrorReportingDelay; - [Write, Description("Is script error reporting enabled in this farm")] boolean ScriptErrorReportingEnabled; - [Write, Description("Require users to be authenticated to allow script errors to be reported")] boolean ScriptErrorReportingRequireAuth; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/MSFT_SPDistributedCacheService.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/MSFT_SPDistributedCacheService.psm1 deleted file mode 100644 index d670c869..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/MSFT_SPDistributedCacheService.psm1 +++ /dev/null @@ -1,405 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.UInt32] - $CacheSizeInMB, - - [parameter(Mandatory = $true)] - [System.String] - $ServiceAccount, - - [parameter(Mandatory = $true)] - [System.Boolean] - $CreateFirewallRules, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String[]] - $ServerProvisionOrder, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting the cache host information" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - $nullReturnValue = @{ - Name = $params.Name - Ensure = "Absent" - InstallAccount = $params.InstallAccount - } - - try - { - Use-CacheCluster -ErrorAction SilentlyContinue - $cacheHost = Get-CacheHost -ErrorAction SilentlyContinue - - if ($null -eq $cacheHost) - { - return $nullReturnValue - } - $computerName = ([System.Net.Dns]::GetHostByName($env:computerName)).HostName - $cachePort = ($cacheHost | Where-Object -FilterScript { - $_.HostName -eq $computerName - }).PortNo - $cacheHostConfig = Get-AFCacheHostConfiguration -ComputerName $computerName ` - -CachePort $cachePort ` - -ErrorAction SilentlyContinue - - $windowsService = Get-CimInstance -Class Win32_Service -Filter "Name='AppFabricCachingService'" - $firewallRule = Get-NetFirewallRule -DisplayName "SharePoint Distributed Cache" ` - -ErrorAction SilentlyContinue - - return @{ - Name = $params.Name - CacheSizeInMB = $cacheHostConfig.Size - ServiceAccount = $windowsService.StartName - CreateFirewallRules = ($null -ne $firewallRule) - Ensure = "Present" - ServerProvisionOrder = $params.ServerProvisionOrder - InstallAccount = $params.InstallAccount - } - } - catch - { - return $nullReturnValue - } - } - return $result -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.UInt32] - $CacheSizeInMB, - - [parameter(Mandatory = $true)] - [System.String] - $ServiceAccount, - - [parameter(Mandatory = $true)] - [System.Boolean] - $CreateFirewallRules, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String[]] - $ServerProvisionOrder, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting the cache host information" - - $CurrentState = Get-TargetResource @PSBoundParameters - - if ($Ensure -eq "Present") - { - Write-Verbose -Message "Adding the distributed cache to the server" - if ($createFirewallRules -eq $true) - { - Write-Verbose -Message "Create a firewall rule for AppFabric" - Invoke-SPDSCCommand -Credential $InstallAccount -ScriptBlock { - $icmpRuleName = "File and Printer Sharing (Echo Request - ICMPv4-In)" - $icmpFirewallRule = Get-NetFirewallRule -DisplayName $icmpRuleName ` - -ErrorAction SilentlyContinue - if ($null -eq $icmpFirewallRule ) - { - New-NetFirewallRule -Name Allow_Ping -DisplayName $icmpRuleName ` - -Description "Allow ICMPv4 ping" ` - -Protocol ICMPv4 ` - -IcmpType 8 ` - -Enabled True ` - -Profile Any ` - -Action Allow - } - Enable-NetFirewallRule -DisplayName $icmpRuleName - - $spRuleName = "SharePoint Distributed Cache" - $firewallRule = Get-NetFirewallRule -DisplayName $spRuleName ` - -ErrorAction SilentlyContinue - if ($null -eq $firewallRule) - { - New-NetFirewallRule -Name "SPDistCache" ` - -DisplayName $spRuleName ` - -Protocol TCP ` - -LocalPort 22233-22236 ` - -Group "SharePoint" - } - Enable-NetFirewallRule -DisplayName $spRuleName - } - Write-Verbose -Message "Firewall rule added" - } - - Write-Verbose -Message ("Current state is '$($CurrentState.Ensure)' " + ` - "and desired state is '$Ensure'") - - if ($CurrentState.Ensure -ne $Ensure) - { - Write-Verbose -Message "Enabling distributed cache service" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - if ($params.ContainsKey("ServerProvisionOrder")) - { - $serverCount = 0 - $currentServer = $params.ServerProvisionOrder[$serverCount] - - while ($currentServer -ne $env:COMPUTERNAME) - { - $count = 0 - $maxCount = 30 - - # Attempt to see if we can find the service with just the computer - # name, or if we need to use the FQDN - $si = Get-SPServiceInstance -Server $currentServer ` - | Where-Object -FilterScript { - $_.GetType().Name -eq "SPDistributedCacheServiceInstance" - } - - if ($null -eq $si) - { - $domain = (Get-CimInstance -ClassName Win32_ComputerSystem).Domain - $currentServer = "$currentServer.$domain" - } - - Write-Verbose "Waiting for cache on $currentServer" - $serviceCheck = Get-SPServiceInstance -Server $currentServer ` - | Where-Object -FilterScript { - $_.GetType().Name -eq "SPDistributedCacheServiceInstance" -and ` - $_.Status -eq "Online" - } - - while (($count -lt $maxCount) -and ($null -eq $serviceCheck)) { - Write-Verbose -Message ("$([DateTime]::Now.ToShortTimeString()) - " + ` - "Waiting for distributed cache to start " + ` - "on $currentServer (waited $count of " + ` - "$maxCount minutes)") - Start-Sleep -Seconds 60 - $serviceCheck = Get-SPServiceInstance -Server $currentServer ` - | Where-Object -FilterScript { - $_.GetType().Name -eq "SPDistributedCacheServiceInstance" -and ` - $_.Status -eq "Online" - } - $count++ - } - - $serviceCheck = Get-SPServiceInstance -Server $currentServer ` - | Where-Object -FilterScript { - $_.GetType().Name -eq "SPDistributedCacheServiceInstance" ` - -and $_.Status -eq "Online" - } - - if ($null -eq $serviceCheck) - { - Write-Warning -Message ("Server $currentServer is not running " + ` - "distributed cache after waiting 30 " + ` - "minutes. No longer waiting for this " + ` - "server, progressing to next action") - } - - $serverCount++ - - if ($ServerCount -ge $params.ServerProvisionOrder.Length) - { - throw ("The server $($env:COMPUTERNAME) was not found in the " + ` - "array for distributed cache servers") - } - $currentServer = $params.ServerProvisionOrder[$serverCount] - } - } - - - Add-SPDistributedCacheServiceInstance - - Get-SPServiceInstance | Where-Object -FilterScript { - $_.GetType().Name -eq "SPDistributedCacheServiceInstance" - } | Stop-SPServiceInstance -Confirm:$false - - $count = 0 - $maxCount = 30 - - $serviceCheck = Get-SPServiceInstance | Where-Object -FilterScript { - $_.GetType().Name -eq "SPDistributedCacheServiceInstance" -and ` - $_.Status -ne "Disabled" - } - - while (($count -lt $maxCount) -and ($null -ne $serviceCheck)) { - Write-Verbose -Message ("$([DateTime]::Now.ToShortTimeString()) - Waiting " + ` - "for distributed cache to stop on all servers " + ` - "(waited $count of $maxCount minutes)") - Start-Sleep -Seconds 60 - $serviceCheck = Get-SPServiceInstance | Where-Object -FilterScript { - $_.GetType().Name -eq "SPDistributedCacheServiceInstance" -and ` - $_.Status -ne "Disabled" - } - $count++ - } - - Update-SPDistributedCacheSize -CacheSizeInMB $params.CacheSizeInMB - - Get-SPServiceInstance | Where-Object -FilterScript { - $_.GetType().Name -eq "SPDistributedCacheServiceInstance" - } | Start-SPServiceInstance - - $count = 0 - $maxCount = 30 - - $serviceCheck = Get-SPServiceInstance | Where-Object -FilterScript { - $_.GetType().Name -eq "SPDistributedCacheServiceInstance" -and ` - $_.Status -ne "Online" - } - - while (($count -lt $maxCount) -and ($null -ne $serviceCheck)) { - Write-Verbose -Message ("$([DateTime]::Now.ToShortTimeString()) - Waiting " + ` - "for distributed cache to start on all servers " + ` - "(waited $count of $maxCount minutes)") - Start-Sleep -Seconds 60 - $serviceCheck = Get-SPServiceInstance | Where-Object -FilterScript { - $_.GetType().Name -eq "SPDistributedCacheServiceInstance" -and ` - $_.Status -ne "Online" - } - $count++ - } - - $farm = Get-SPFarm - $cacheService = $farm.Services | Where-Object -FilterScript { - $_.Name -eq "AppFabricCachingService" - } - - if ($cacheService.ProcessIdentity.ManagedAccount.Username -ne $params.ServiceAccount) - { - $cacheService.ProcessIdentity.CurrentIdentityType = "SpecificUser" - $account = Get-SPManagedAccount -Identity $params.ServiceAccount - $cacheService.ProcessIdentity.ManagedAccount = $account - $cacheService.ProcessIdentity.Update() - $cacheService.ProcessIdentity.Deploy() - } - } - } - } - else - { - Write-Verbose -Message "Removing distributed cache to the server" - Invoke-SPDSCCommand -Credential $InstallAccount -ScriptBlock { - $serviceInstance = Get-SPServiceInstance -Server $env:computername ` - | Where-Object -FilterScript { - $_.GetType().Name -eq "SPDistributedCacheServiceInstance" - } - - if ($null -eq $serviceInstance) - { - $domain = (Get-CimInstance -ClassName Win32_ComputerSystem).Domain - $currentServer = "$($env:computername).$domain" - $serviceInstance = Get-SPServiceInstance -Server $currentServer ` - | Where-Object -FilterScript { - $_.GetType().Name -eq "SPDistributedCacheServiceInstance" - } - } - if ($null -eq $serviceInstance) - { - throw ("Unable to locate a distributed cache service instance " + ` - "on $($env:computername) to remove") - } - $serviceInstance.Delete() - - Remove-SPDistributedCacheServiceInstance - } - if ($CreateFirewallRules -eq $true) - { - Invoke-SPDSCCommand -Credential $InstallAccount -ScriptBlock { - $firewallRule = Get-NetFirewallRule -DisplayName "SharePoint Distribute Cache" ` - -ErrorAction SilentlyContinue - if($null -ne $firewallRule) - { - Write-Verbose -Message "Disabling firewall rules." - Disable-NetFirewallRule -DisplayName "SharePoint Distribute Cache" - } - } - } - Write-Verbose -Message "Distributed cache removed." - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.UInt32] - $CacheSizeInMB, - - [parameter(Mandatory = $true)] - [System.String] - $ServiceAccount, - - [parameter(Mandatory = $true)] - [System.Boolean] - $CreateFirewallRules, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String[]] - $ServerProvisionOrder, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing the cache host information" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure", "CreateFirewallRules") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/MSFT_SPDistributedCacheService.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/MSFT_SPDistributedCacheService.schema.mof deleted file mode 100644 index 58ba7c76..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/MSFT_SPDistributedCacheService.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPDistributedCacheService")] -class MSFT_SPDistributedCacheService : OMI_BaseResource -{ - [Key, Description("A name to assign to this resource - not really used. For example - AppFabricCachingService")] String Name; - [Write, Description("Present to ensure the current server should be running distributed cache, absent to ensure that it isn't running"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Required, Description("How many MB should be used for the cache. The maximum supported is 16384")] UInt32 CacheSizeInMB; - [Required, Description("The name of the service account to run the service as. This should already be registered as a managed account in SharePoint")] String ServiceAccount; - [Write, Description("A list of servers which specifies the order they should provision the cache in to ensure that two servers do not do it at the same time")] String ServerProvisionOrder[]; - [Required, Description("Should the Windows Firewall rules for distributed cache be created?")] Boolean CreateFirewallRules; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/MSFT_SPExcelServiceApp.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/MSFT_SPExcelServiceApp.psm1 deleted file mode 100644 index 808963c3..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/MSFT_SPExcelServiceApp.psm1 +++ /dev/null @@ -1,673 +0,0 @@ -$Script:TrustLocationProperties = @( - "Address", - "LocationType", - "IncludeChildren", - "SessionTimeout", - "ShortSessionTimeout", - "NewWorkbookSessionTimeout", - "RequestDurationMax", - "ChartRenderDurationMax", - "WorkbookSizeMax", - "ChartAndImageSizeMax", - "AutomaticVolatileFunctionCacheLifetime", - "DefaultWorkbookCalcMode", - "ExternalDataAllowed", - "WarnOnDataRefresh", - "DisplayGranularExtDataErrors", - "AbortOnRefreshOnOpenFail", - "PeriodicExtDataCacheLifetime", - "ManualExtDataCacheLifetime", - "ConcurrentDataRequestsPerSessionMax", - "UdfsAllowed", - "Description", - "RESTExternalDataAllowed" -) -$Script:ServiceAppObjectType = "Microsoft.Office.Excel.Server.MossHost.ExcelServerWebServiceApplication" - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $TrustedFileLocations, - - [parameter(Mandatory = $false)] - [System.Boolean] - $CachingOfUnusedFilesEnable, - - [parameter(Mandatory = $false)] - [System.Boolean] - $CrossDomainAccessAllowed, - - [parameter(Mandatory = $false)] - [ValidateSet("None","Connection")] - [System.String] - $EncryptedUserConnectionRequired, - - [parameter(Mandatory = $false)] - [System.UInt32] - $ExternalDataConnectionLifetime, - - [parameter(Mandatory = $false)] - [ValidateSet("UseImpersonation","UseFileAccessAccount")] - [System.String] - $FileAccessMethod, - - [parameter(Mandatory = $false)] - [ValidateSet("RoundRobin","Local","WorkbookURL")] - [System.String] - $LoadBalancingScheme, - - [parameter(Mandatory = $false)] - [System.UInt32] - $MemoryCacheThreshold, - - [parameter(Mandatory = $false)] - [System.UInt32] - $PrivateBytesMax, - - [parameter(Mandatory = $false)] - [System.UInt32] - $SessionsPerUserMax, - - [parameter(Mandatory = $false)] - [System.UInt32] - $SiteCollectionAnonymousSessionsMax, - - [parameter(Mandatory = $false)] - [System.Boolean] - $TerminateProcessOnAccessViolation, - - [parameter(Mandatory = $false)] - [System.UInt32] - $ThrottleAccessViolationsPerSiteCollection, - - [parameter(Mandatory = $false)] - [System.String] - $UnattendedAccountApplicationId, - - [parameter(Mandatory = $false)] - [System.UInt32] - $UnusedObjectAgeMax, - - [parameter(Mandatory = $false)] - [System.String] - $WorkbookCache, - - [parameter(Mandatory = $false)] - [System.UInt32] - $WorkbookCacheSizeMax, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting Excel Services Application '$Name'" - - if ((Get-SPDSCInstalledProductVersion).FileMajorPart -ne 15) - { - throw [Exception] ("Only SharePoint 2013 is supported to deploy Excel Services " + ` - "service applications via DSC, as SharePoint 2016 deprecated " + ` - "this service. See " + ` - "https://technet.microsoft.com/en-us/library/mt346112(v=office.16).aspx " + ` - "for more info.") - } - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters, $Script:ServiceAppObjectType) ` - -ScriptBlock { - $params = $args[0] - $serviceAppObjectType = $args[1] - - $serviceApps = Get-SPServiceApplication -Name $params.Name ` - -ErrorAction SilentlyContinue - $nullReturn = @{ - Name = $params.Name - ApplicationPool = $params.ApplicationPool - Ensure = "Absent" - InstallAccount = $params.InstallAccount - } - if ($null -eq $serviceApps) - { - return $nullReturn - } - $serviceApp = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq $serviceAppObjectType - } - - if ($null -eq $serviceApp) - { - return $nullReturn - } - else - { - $fileLocations = Get-SPExcelFileLocation -ExcelServiceApplication $serviceApp - $fileLocationsToReturn = @() - $fileLocations | ForEach-Object -Process { - $fileLocationsToReturn += @{ - Address = $_.Address - LocationType = $_.LocationType - IncludeChildren = [Convert]::ToBoolean($_.IncludeChildren) - SessionTimeout = $_.SessionTimeout - ShortSessionTimeout = $_.ShortSessionTimeout - NewWorkbookSessionTimeout = $_.NewWorkbookSessionTimeout - RequestDurationMax = $_.RequestDurationMax - ChartRenderDurationMax = $_.ChartRenderDurationMax - WorkbookSizeMax = $_.WorkbookSizeMax - ChartAndImageSizeMax = $_.ChartAndImageSizeMax - AutomaticVolatileFunctionCacheLifetime = $_.AutomaticVolatileFunctionCacheLifetime - DefaultWorkbookCalcMode = $_.DefaultWorkbookCalcMode - ExternalDataAllowed = $_.ExternalDataAllowed - WarnOnDataRefresh = [Convert]::ToBoolean($_.WarnOnDataRefresh) - DisplayGranularExtDataErrors = [Convert]::ToBoolean($_.DisplayGranularExtDataErrors) - AbortOnRefreshOnOpenFail = [Convert]::ToBoolean($_.AbortOnRefreshOnOpenFail) - PeriodicExtDataCacheLifetime = $_.PeriodicExtDataCacheLifetime - ManualExtDataCacheLifetime = $_.ManualExtDataCacheLifetime - ConcurrentDataRequestsPerSessionMax = $_.ConcurrentDataRequestsPerSessionMax - UdfsAllowed = [Convert]::ToBoolean($_.UdfsAllowed) - Description = $_.Description - RESTExternalDataAllowed = [Convert]::ToBoolean($_.RESTExternalDataAllowed) - } - } - - $returnVal = @{ - Name = $serviceApp.DisplayName - ApplicationPool = $serviceApp.ApplicationPool.Name - Ensure = "Present" - TrustedFileLocations = $fileLocationsToReturn - CachingOfUnusedFilesEnable = $serviceApp.CachingOfUnusedFilesEnable - CrossDomainAccessAllowed = $serviceApp.CrossDomainAccessAllowed - EncryptedUserConnectionRequired = $serviceApp.EncryptedUserConnectionRequired - ExternalDataConnectionLifetime = $serviceApp.ExternalDataConnectionLifetime - FileAccessMethod = $serviceApp.FileAccessMethod - LoadBalancingScheme = $serviceApp.LoadBalancingScheme - MemoryCacheThreshold = $serviceApp.MemoryCacheThreshold - PrivateBytesMax = $serviceApp.PrivateBytesMax - SessionsPerUserMax = $serviceApp.SessionsPerUserMax - SiteCollectionAnonymousSessionsMax = $serviceApp.SiteCollectionAnonymousSessionsMax - TerminateProcessOnAccessViolation = $serviceApp.TerminateProcessOnAccessViolation - ThrottleAccessViolationsPerSiteCollection = $serviceApp.ThrottleAccessViolationsPerSiteCollection - UnattendedAccountApplicationId = $serviceApp.UnattendedAccountApplicationId - UnusedObjectAgeMax = $serviceApp.UnusedObjectAgeMax - WorkbookCache = $serviceApp.WorkbookCache - WorkbookCacheSizeMax = $serviceApp.WorkbookCacheSizeMax - InstallAccount = $params.InstallAccount - } - return $returnVal - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $TrustedFileLocations, - - [parameter(Mandatory = $false)] - [System.Boolean] - $CachingOfUnusedFilesEnable, - - [parameter(Mandatory = $false)] - [System.Boolean] - $CrossDomainAccessAllowed, - - [parameter(Mandatory = $false)] - [ValidateSet("None","Connection")] - [System.String] - $EncryptedUserConnectionRequired, - - [parameter(Mandatory = $false)] - [System.UInt32] - $ExternalDataConnectionLifetime, - - [parameter(Mandatory = $false)] - [ValidateSet("UseImpersonation","UseFileAccessAccount")] - [System.String] - $FileAccessMethod, - - [parameter(Mandatory = $false)] - [ValidateSet("RoundRobin","Local","WorkbookURL")] - [System.String] - $LoadBalancingScheme, - - [parameter(Mandatory = $false)] - [System.UInt32] - $MemoryCacheThreshold, - - [parameter(Mandatory = $false)] - [System.UInt32] - $PrivateBytesMax, - - [parameter(Mandatory = $false)] - [System.UInt32] - $SessionsPerUserMax, - - [parameter(Mandatory = $false)] - [System.UInt32] - $SiteCollectionAnonymousSessionsMax, - - [parameter(Mandatory = $false)] - [System.Boolean] - $TerminateProcessOnAccessViolation, - - [parameter(Mandatory = $false)] - [System.UInt32] - $ThrottleAccessViolationsPerSiteCollection, - - [parameter(Mandatory = $false)] - [System.String] - $UnattendedAccountApplicationId, - - [parameter(Mandatory = $false)] - [System.UInt32] - $UnusedObjectAgeMax, - - [parameter(Mandatory = $false)] - [System.String] - $WorkbookCache, - - [parameter(Mandatory = $false)] - [System.UInt32] - $WorkbookCacheSizeMax, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting Excel Services Application '$Name'" - - if ((Get-SPDSCInstalledProductVersion).FileMajorPart -ne 15) - { - throw [Exception] ("Only SharePoint 2013 is supported to deploy Excel Services " + ` - "service applications via DSC, as SharePoint 2016 deprecated " + ` - "this service. See " + ` - "https://technet.microsoft.com/en-us/library/mt346112(v=office.16).aspx " + ` - "for more info.") - } - $result = Get-TargetResource @PSBoundParameters - - if ($result.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - Write-Verbose -Message "Creating Excel Services Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - New-SPExcelServiceApplication -Name $params.Name ` - -ApplicationPool $params.ApplicationPool ` - -Default - } - } - - if ($Ensure -eq "Present") - { - Write-Verbose -Message "Updating settings for Excel Services Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $params.Add("Identity", $params.Name) - - # Remove parameters that do not belong on the set method - @("InstallAccount", "Ensure", "TrustedFileLocations", "Name", "ApplicationPool") | - ForEach-Object -Process { - if ($params.ContainsKey($_) -eq $true) - { - $params.Remove($_) | Out-Null - } - } - - Set-SPExcelServiceApplication @params - } - - - # Update trusted locations - if ($null -ne $TrustedFileLocations) - { - $TrustedFileLocations | ForEach-Object -Process { - $desiredLocation = $_ - $matchingCurrentValue = $result.TrustedFileLocations | Where-Object -FilterScript { - $_.Address -eq $desiredLocation.Address - } - if ($null -eq $matchingCurrentValue) - { - Write-Verbose -Message "Adding trusted location '$($desiredLocation.Address)' to service app" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters, $desiredLocation, $Script:TrustLocationProperties, $Script:ServiceAppObjectType) ` - -ScriptBlock { - $params = $args[0] - $desiredLocation = $args[1] - $trustLocationProperties = $args[2] - $serviceAppObjectType = $args[3] - - $newArgs = @{} - $trustLocationProperties | ForEach-Object -Process { - if ($null -ne $desiredLocation.$_) - { - $newArgs.Add($_, $desiredLocation.$_) - } - } - $serviceApp = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript { - $_.GetType().FullName -eq $serviceAppObjectType - } - $newArgs.Add("ExcelServiceApplication", $serviceApp) - - New-SPExcelFileLocation @newArgs - } - } - else - { - Write-Verbose -Message "Updating trusted location '$($desiredLocation.Address)' in service app" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters, $desiredLocation, $Script:TrustLocationProperties, $Script:ServiceAppObjectType) ` - -ScriptBlock { - $params = $args[0] - $desiredLocation = $args[1] - $trustLocationProperties = $args[2] - $serviceAppObjectType = $args[3] - - $updateArgs = @{} - $trustLocationProperties | ForEach-Object -Process { - if ($null -ne $desiredLocation.$_) - { - $updateArgs.Add($_, $desiredLocation.$_) - } - } - $serviceApp = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript { - $_.GetType().FullName -eq $serviceAppObjectType - } - $updateArgs.Add("Identity", $desiredLocation.Address) - $updateArgs.Add("ExcelServiceApplication", $serviceApp) - - Set-SPExcelFileLocation @updateArgs - } - } - } - - # Remove unlisted trusted locations - $result.TrustedFileLocations | ForEach-Object -Process { - $currentLocation = $_ - $matchingDesiredValue = $TrustedFileLocations | Where-Object -FilterScript { - $_.Address -eq $currentLocation.Address - } - if ($null -eq $matchingDesiredValue) - { - Write-Verbose -Message "Removing trusted location '$($currentLocation.Address)' from service app" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($Name, $currentLocation) ` - -ScriptBlock { - $name = $args[0] - $currentLocation = $args[1] - - Remove-SPExcelFileLocation -ExcelServiceApplication $name -Identity $currentLocation.Address -Confirm:$false - } - } - } - } - } - - if ($Ensure -eq "Absent") - { - Write-Verbose -Message "Removing Excel Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters, $Script:ServiceAppObjectType) ` - -ScriptBlock { - $params = $args[0] - $serviceAppObjectType = $args[1] - - $serviceApp = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript { - $_.GetType().FullName -eq $serviceAppObjectType - } - - $proxies = Get-SPServiceApplicationProxy - foreach($proxyInstance in $proxies) - { - if($serviceApp.IsConnected($proxyInstance)) - { - $proxyInstance.Delete() - } - } - - Remove-SPServiceApplication -Identity $serviceApp -Confirm:$false - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $TrustedFileLocations, - - [parameter(Mandatory = $false)] - [System.Boolean] - $CachingOfUnusedFilesEnable, - - [parameter(Mandatory = $false)] - [System.Boolean] - $CrossDomainAccessAllowed, - - [parameter(Mandatory = $false)] - [ValidateSet("None","Connection")] - [System.String] - $EncryptedUserConnectionRequired, - - [parameter(Mandatory = $false)] - [System.UInt32] - $ExternalDataConnectionLifetime, - - [parameter(Mandatory = $false)] - [ValidateSet("UseImpersonation","UseFileAccessAccount")] - [System.String] - $FileAccessMethod, - - [parameter(Mandatory = $false)] - [ValidateSet("RoundRobin","Local","WorkbookURL")] - [System.String] - $LoadBalancingScheme, - - [parameter(Mandatory = $false)] - [System.UInt32] - $MemoryCacheThreshold, - - [parameter(Mandatory = $false)] - [System.UInt32] - $PrivateBytesMax, - - [parameter(Mandatory = $false)] - [System.UInt32] - $SessionsPerUserMax, - - [parameter(Mandatory = $false)] - [System.UInt32] - $SiteCollectionAnonymousSessionsMax, - - [parameter(Mandatory = $false)] - [System.Boolean] - $TerminateProcessOnAccessViolation, - - [parameter(Mandatory = $false)] - [System.UInt32] - $ThrottleAccessViolationsPerSiteCollection, - - [parameter(Mandatory = $false)] - [System.String] - $UnattendedAccountApplicationId, - - [parameter(Mandatory = $false)] - [System.UInt32] - $UnusedObjectAgeMax, - - [parameter(Mandatory = $false)] - [System.String] - $WorkbookCache, - - [parameter(Mandatory = $false)] - [System.UInt32] - $WorkbookCacheSizeMax, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing Excel Services Application '$Name'" - - $PSBoundParameters.Ensure = $Ensure - - if ((Get-SPDSCInstalledProductVersion).FileMajorPart -ne 15) - { - throw [Exception] ("Only SharePoint 2013 is supported to deploy Excel Services " + ` - "service applications via DSC, as SharePoint 2016 deprecated " + ` - "this service. See " + ` - "https://technet.microsoft.com/en-us/library/mt346112(v=office.16).aspx " + ` - "for more info.") - } - - $CurrentValues = Get-TargetResource @PSBoundParameters - - $mainCheck = Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @( - "Ensure", - "CachingOfUnusedFilesEnable", - "CrossDomainAccessAllowed", - "EncryptedUserConnectionRequired", - "ExternalDataConnectionLifetime", - "FileAccessMethod", - "LoadBalancingScheme", - "MemoryCacheThreshold", - "PrivateBytesMax", - "SessionsPerUserMax", - "SiteCollectionAnonymousSessionsMax", - "TerminateProcessOnAccessViolation", - "ThrottleAccessViolationsPerSiteCollection", - "UnattendedAccountApplicationId", - "UnusedObjectAgeMax", - "WorkbookCache", - "WorkbookCacheSizeMax" - ) - - - if ($Ensure -eq "Present" -and $mainCheck -eq $true -and $null -ne $TrustedFileLocations) - { - # Check that all the desired types are in the current values and match - $locationCheck = $TrustedFileLocations | ForEach-Object -Process { - $desiredLocation = $_ - $matchingCurrentValue = $CurrentValues.TrustedFileLocations | Where-Object -FilterScript { - $_.Address -eq $desiredLocation.Address - } - if ($null -eq $matchingCurrentValue) - { - Write-Verbose -Message ("Trusted file location '$($_.Address)' was not found " + ` - "in the Excel service app. Desired state is false.") - return $false - } - else - { - $Script:TrustLocationProperties | ForEach-Object -Process { - if ($desiredLocation.CimInstanceProperties.Name -contains $_) - { - if ($desiredLocation.$_ -ne $matchingCurrentValue.$_) - { - Write-Verbose -Message ("Trusted file location '$($desiredLocation.Address)' did not match " + ` - "desired property '$_'. Desired value is " + ` - "'$($desiredLocation.$_)' but the current value is " + ` - "'$($matchingCurrentValue.$_)'") - return $false - } - } - } - } - return $true - } - if ($locationCheck -contains $false) - { - return $false - } - - # Check that any other existing trusted locations are in the desired state - $locationCheck = $CurrentValues.TrustedFileLocations | ForEach-Object -Process { - $currentLocation = $_ - $matchingDesiredValue = $TrustedFileLocations | Where-Object -FilterScript { - $_.Address -eq $currentLocation.Address - } - if ($null -eq $matchingDesiredValue) - { - Write-Verbose -Message ("Existing trusted file location '$($_.Address)' was not " + ` - "found in the desired state for this service " + ` - "application. Desired state is false.") - return $false - } - return $true - } - if ($locationCheck -contains $false) - { - return $false - } - - # at this point if no other value has been returned, all desired entires exist and are - # correct, and no existing entries exist that are not in desired state, so return true - return $true - } - else - { - return $mainCheck - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/MSFT_SPExcelServiceApp.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/MSFT_SPExcelServiceApp.schema.mof deleted file mode 100644 index 371736fc..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/MSFT_SPExcelServiceApp.schema.mof +++ /dev/null @@ -1,50 +0,0 @@ -[ClassVersion("1.0.0.0")] -Class MSFT_SPExcelFileLocation -{ - [Key, Description("The address of the file location")] String Address; - [Required, Description("The type of the trusted file location"), ValueMap{"SharePoint","UNC", "HTTP"}, Values{"SharePoint","UNC", "HTTP"}] String LocationType; - [Write, Description("Specifies that the loading of a Excel Services Application file automatically fails if an automatic data refresh operation fails when the file is opened.")] Boolean AbortOnRefreshOnOpenFail; - [Write, Description("Specifies the maximum time, in seconds, that a computed value for a volatile function is cached for automatic recalculations.")] Uint32 AutomaticVolatileFunctionCacheLifetime; - [Write, Description("Specifies the maximum size, in megabytes, of a chart or image that can be opened.")] Uint32 ChartAndImageSizeMax; - [Write, Description("Specifies the maximum number of concurrent external data requests allowed in each session.")] Uint32 ConcurrentDataRequestsPerSessionMax; - [Write, Description("Specifies the calculation mode of workbooks."), ValueMap{"File","Manual", "Auto", "AutoDataTables"}, Values{"File","Manual", "Auto", "AutoDataTables"}] String DefaultWorkbookCalcMode; - [Write, Description("Specifies a friendly description for the new file location.")] String Description; - [Write, Description("Displays granular error messages for external data failures for files in this location.")] Boolean DisplayGranularExtDataErrors; - [Write, Description("Specifies the type of external data access allowed for workbooks."), ValueMap{"None","Dcl", "DclandEmbedded"}, Values{"None","Dcl", "DclandEmbedded"}] String ExternalDataAllowed; - [Write, Description("Indicates that subordinate URLs, directories and libraries are trusted.")] Boolean IncludeChildren; - [Write, Description("Specifies the time, in seconds, that Excel Services Application waits before it re-issues a manual, or user-initiated, external data request.")] Uint32 ManualExtDataCacheLifetime; - [Write, Description("Specifies the time, in seconds, that a session for a new, unsaved, workbook remains active on Excel Services Application with no user activity.")] Uint32 NewWorkbookSessionTimeout; - [Write, Description("Specifies the time, in seconds, that Excel Services Application waits before it re-issues an on-open or periodic (that is, automatic) external data request.")] Uint32 PeriodicExtDataCacheLifetime; - [Write, Description("Specifies the maximum duration, in seconds, for a single request in a session.")] Uint32 RequestDurationMax; - [Write, Description("Specifies whether requests from the Representational State Transfer (REST) Application Programming Interface (API) are permitted to refresh external data connections.")] Boolean RESTExternalDataAllowed; - [Write, Description("Specifies the time, in seconds, that a session remains active on Excel Services Application with no user activity.")] Uint32 SessionTimeout; - [Write, Description("Specifies the time, in seconds, that a user has to make the initial interaction with a spreadsheet.")] Uint32 ShortSessionTimeout; - [Write, Description("Specifies that user-defined functions can be called by workbooks that are loaded from the trusted file location that is specified in Address.")] Boolean UdfsAllowed; - [Write, Description("Specifies that a warning is displayed to the user on the first refresh of data for the workbook.")] Boolean WarnOnDataRefresh; - [Write, Description("Specifies the maximum size, in megabytes, of a workbook that can be loaded.")] Uint32 WorkbookSizeMax; -}; -[ClassVersion("1.0.0.0"), FriendlyName("SPExcelServiceApp")] -class MSFT_SPExcelServiceApp : OMI_BaseResource -{ - [Key, Description("The name of the service application")] string Name; - [Required, Description("The name of the application pool to run the service app in")] string ApplicationPool; - [Write, Description("Trusted file locations for the service app"), EmbeddedInstance("MSFT_SPExcelFileLocation")] string TrustedFileLocations[]; - [Write, Description("Specifies that files that are no longer used by Excel Services Application can remain in the cache for later use.")] Boolean CachingOfUnusedFilesEnable; - [Write, Description("Specifies that trusted workbooks and data connection files can be requested and rendered by Web Parts or pages that reside in other HTTP domains.")] Boolean CrossDomainAccessAllowed; - [Write, Description("Requires that encryption is used between the end-user and the server running Excel Services Application."), ValueMap{"None","Connection"}, Values{"None","Connection"}] String EncryptedUserConnectionRequired; - [Write, Description("Specifies the maximum number of seconds that an external data connection can remain open in the connection pool.")] Uint32 ExternalDataConnectionLifetime; - [Write, Description("Specifies the authentication method that Excel Services Application uses to retrieve files."), ValueMap{"UseImpersonation","UseFileAccessAccount"}, Values{"UseImpersonation","UseFileAccessAccount"}] String FileAccessMethod; - [Write, Description("Specifies the load-balancing schema that is used by the Excel Services Application Web service application to send requests to different back-end Excel Services Application computers."), ValueMap{"RoundRobin","Local","WorkbookURL"}, Values{"RoundRobin","Local","WorkbookURL"}] String LoadBalancingScheme; - [Write, Description("Specifies the percentage of the maximum private bytes that can be allocated to inactive objects.")] Uint32 MemoryCacheThreshold; - [Write, Description("Specifies the maximum private bytes, in megabytes, that are used by Excel Services Application.")] Uint32 PrivateBytesMax; - [Write, Description("Specifies the maximum number of sessions allowed for a user.")] Uint32 SessionsPerUserMax; - [Write, Description("Specifies the maximum number of anonymous sessions allowed per site collection.")] Uint32 SiteCollectionAnonymousSessionsMax; - [Write, Description("Terminates Excel Services Application when an access violation occurs in the process.")] Boolean TerminateProcessOnAccessViolation; - [Write, Description("Specifies that if a workbook causes an access violation error on Excel Services Application, all files originating from that workbook’s site collection are blocked from loading for the specified period (in seconds).")] Uint32 ThrottleAccessViolationsPerSiteCollection; - [Write, Description("Specifies that the application ID that is used to look up the unattended service account credentials from the secure storage service that is specified by the UnattendedAccountSecureServiceAppName parameter.")] String UnattendedAccountApplicationId; - [Write, Description("Specifies the maximum amount of time, in minutes, that objects not currently used in a session are kept in the memory cache.")] Uint32 UnusedObjectAgeMax; - [Write, Description("Specifies the local file system location of the cache that is used to store workbooks that are used by Excel Services Application.")] String WorkbookCache; - [Write, Description("Specifies the maximum allowable size, in megabytes, of an individual session.")] Uint32 WorkbookCacheSizeMax; - [Write, Description("Present ensures service app exists, absent ensures it is removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarm/MSFT_SPFarm.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarm/MSFT_SPFarm.psm1 deleted file mode 100644 index 98115073..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarm/MSFT_SPFarm.psm1 +++ /dev/null @@ -1,609 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [parameter(Mandatory = $true)] - [System.String] - $FarmConfigDatabaseName, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $FarmAccount, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $Passphrase, - - [parameter(Mandatory = $true)] - [System.String] - $AdminContentDatabaseName, - - [parameter(Mandatory = $true)] - [System.Boolean] - $RunCentralAdmin, - - [parameter(Mandatory = $false)] - [System.UInt32] - $CentralAdministrationPort, - - [parameter(Mandatory = $false)] - [System.String] - [ValidateSet("NTLM","Kerberos")] - $CentralAdministrationAuth, - - [parameter(Mandatory = $false)] - [System.String] - [ValidateSet("Application", - "ApplicationWithSearch", - "Custom", - "DistributedCache", - "Search", - "SingleServer", - "SingleServerFarm", - "WebFrontEnd", - "WebFrontEndWithDistributedCache")] - $ServerRole - ) - - Write-Verbose -Message "Getting the settings of the current local SharePoint Farm (if any)" - - if ($Ensure -eq "Absent") - { - throw ("SharePointDsc does not support removing a server from a farm, please set the " + ` - "ensure property to 'present'") - } - - $installedVersion = Get-SPDSCInstalledProductVersion - switch ($installedVersion.FileMajorPart) - { - 15 { - Write-Verbose -Message "Detected installation of SharePoint 2013" - } - 16 { - Write-Verbose -Message "Detected installation of SharePoint 2016" - } - default { - throw ("Detected an unsupported major version of SharePoint. SharePointDsc only " + ` - "supports SharePoint 2013 or 2016.") - } - } - - - if (($PSBoundParameters.ContainsKey("ServerRole") -eq $true) ` - -and $installedVersion.FileMajorPart -ne 16) - { - throw [Exception] "Server role is only supported in SharePoint 2016." - } - - if (($PSBoundParameters.ContainsKey("ServerRole") -eq $true) ` - -and $installedVersion.FileMajorPart -eq 16 ` - -and $installedVersion.FileBuildPart -lt 4456 ` - -and ($ServerRole -eq "ApplicationWithSearch" ` - -or $ServerRole -eq "WebFrontEndWithDistributedCache")) - { - throw [Exception] ("ServerRole values of 'ApplicationWithSearch' or " + ` - "'WebFrontEndWithDistributedCache' require the SharePoint 2016 " + ` - "Feature Pack 1 to be installed. See " + ` - "https://support.microsoft.com/en-au/kb/3127940") - } - - - # Determine if a connection to a farm already exists - $majorVersion = $installedVersion.FileMajorPart - $regPath = "hklm:SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\$majorVersion.0\Secure\ConfigDB" - $dsnValue = Get-SPDSCRegistryKey -Key $regPath -Value "dsn" -ErrorAction SilentlyContinue - - if ($null -ne $dsnValue) - { - # This node has already been connected to a farm - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - try - { - $spFarm = Get-SPFarm - } - catch - { - Write-Verbose -Message "Unable to detect local farm." - return $null - } - - if ($null -eq $spFarm) - { - return $null - } - - $configDb = Get-SPDatabase | Where-Object -FilterScript { - $_.Name -eq $spFarm.Name -and $_.Type -eq "Configuration Database" - } - $centralAdminSite = Get-SPWebApplication -IncludeCentralAdministration ` - | Where-Object -FilterScript { - $_.IsAdministrationWebApplication -eq $true - } - - if ($params.FarmAccount.UserName -eq $spFarm.DefaultServiceAccount.Name) - { - $farmAccount = $params.FarmAccount - } - else - { - $farmAccount = $spFarm.DefaultServiceAccount.Name - } - - $centralAdminSite = Get-SPWebApplication -IncludeCentralAdministration ` - | Where-Object -FilterScript { - $_.IsAdministrationWebApplication -eq $true - } - - $centralAdminProvisioned = $false - $ca = Get-SPServiceInstance -Server $env:ComputerName ` - | Where-Object -Filterscript { - $_.TypeName -eq "Central Administration" -and $_.Status -eq "Online" - } - if ($null -ne $ca) - { - $centralAdminProvisioned = $true - } - - $returnValue = @{ - FarmConfigDatabaseName = $spFarm.Name - DatabaseServer = $configDb.Server.Name - FarmAccount = $farmAccount # Need to return this as a credential to match the type expected - InstallAccount = $null - Passphrase = $null - AdminContentDatabaseName = $centralAdminSite.ContentDatabases[0].Name - RunCentralAdmin = $centralAdminProvisioned - CentralAdministrationPort = (New-Object -TypeName System.Uri $centralAdminSite.Url).Port - CentralAdministrationAuth = $params.CentralAdministrationAuth #TODO: Need to return this as the current value - } - return $returnValue - } - - if ($null -eq $result) - { - # The node is currently connected to a farm but was unable to retrieve the values - # of current farm settings, most likely due to connectivity issues with the SQL box - Write-Verbose -Message ("This server appears to be connected to a farm already, " + ` - "but the configuration database is currently unable to be " + ` - "accessed. Values returned from the get method will be " + ` - "incomplete, however the 'Ensure' property should be " + ` - "considered correct") - return @{ - FarmConfigDatabaseName = $null - DatabaseServer = $null - FarmAccount = $null - InstallAccount = $null - Passphrase = $null - AdminContentDatabaseName = $null - RunCentralAdmin = $null - CentralAdministrationPort = $null - CentralAdministrationAuth = $null - Ensure = "Present" - } - } - else - { - $result.Add("Ensure", "Present") - return $result - } - } - else - { - # This node has never been connected to a farm, return the null return object - return @{ - FarmConfigDatabaseName = $null - DatabaseServer = $null - FarmAccount = $null - InstallAccount = $null - Passphrase = $null - AdminContentDatabaseName = $null - RunCentralAdmin = $null - CentralAdministrationPort = $null - CentralAdministrationAuth = $null - Ensure = "Absent" - } - } -} - -function Set-TargetResource -{ - # Supressing the global variable use to allow passing DSC the reboot message - [CmdletBinding()] - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidGlobalVars", "")] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [parameter(Mandatory = $true)] - [System.String] - $FarmConfigDatabaseName, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $FarmAccount, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $Passphrase, - - [parameter(Mandatory = $true)] - [System.String] - $AdminContentDatabaseName, - - [parameter(Mandatory = $true)] - [System.Boolean] - $RunCentralAdmin, - - [parameter(Mandatory = $false)] - [System.UInt32] - $CentralAdministrationPort, - - [parameter(Mandatory = $false)] - [System.String] - [ValidateSet("NTLM","Kerberos")] - $CentralAdministrationAuth, - - [parameter(Mandatory = $false)] - [System.String] - [ValidateSet("Application", - "ApplicationWithSearch", - "Custom", - "DistributedCache", - "Search", - "SingleServer", - "SingleServerFarm", - "WebFrontEnd", - "WebFrontEndWithDistributedCache")] - $ServerRole - ) - - Write-Verbose -Message "Setting local SP Farm settings" - - if ($Ensure -eq "Absent") - { - throw ("SharePointDsc does not support removing a server from a farm, please set the " + ` - "ensure property to 'present'") - } - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($CurrentValues.Ensure -eq "Present") - { - throw ("This server is already connected to a farm. " + ` - "Please manually remove it to apply this change.") - } - - - # Set default values to ensure they are passed to Invoke-SPDSCCommand - if (-not $PSBoundParameters.ContainsKey("CentralAdministrationPort")) - { - $PSBoundParameters.Add("CentralAdministrationPort", 9999) - } - if (-not $PSBoundParameters.ContainsKey("CentralAdministrationAuth")) - { - $PSBoundParameters.Add("CentralAdministrationAuth", "NTLM") - } - - $actionResult = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters, $PSScriptRoot) ` - -ScriptBlock { - $params = $args[0] - $scriptRoot = $args[1] - - $modulePath = "..\..\Modules\SharePointDsc.Farm\SPFarm.psm1" - Import-Module -Name (Join-Path -Path $scriptRoot -ChildPath $modulePath -Resolve) - $dbStatus = Get-SPDSCConfigDBStatus -SQLServer $params.DatabaseServer ` - -Database $params.FarmConfigDatabaseName - - while ($dbStatus.Locked -eq $true) - { - Write-Verbose -Message ("[$([DateTime]::Now.ToShortTimeString())] The configuration " + ` - "database is currently being provisioned by a remote " + ` - "server, this server will wait for this to complete") - Start-Sleep -Seconds 30 - $dbStatus = Get-SPDSCConfigDBStatus -SQLServer $params.DatabaseServer ` - -Database $params.FarmConfigDatabaseName - } - - if ($dbStatus.ValidPermissions -eq $false) - { - throw "The current user does not have sufficient permissions to SQL Server" - return - } - - $executeArgs = @{ - DatabaseServer = $params.DatabaseServer - DatabaseName = $params.FarmConfigDatabaseName - Passphrase = $params.Passphrase.Password - SkipRegisterAsDistributedCacheHost = $true - } - - switch((Get-SPDSCInstalledProductVersion).FileMajorPart) { - 15 { - Write-Verbose -Message "Detected Version: SharePoint 2013" - } - 16 { - if ($params.ContainsKey("ServerRole") -eq $true) { - Write-Verbose -Message ("Detected Version: SharePoint 2016 - " + ` - "configuring server as $($params.ServerRole)") - $executeArgs.Add("LocalServerRole", $params.ServerRole) - } else { - Write-Verbose -Message ("Detected Version: SharePoint 2016 - no server " + ` - "role provided, configuring server without a " + ` - "specific role") - $executeArgs.Add("ServerRoleOptional", $true) - } - } - Default { - throw [Exception] ("An unknown version of SharePoint (Major version $_) " + ` - "was detected. Only versions 15 (SharePoint 2013) or " + ` - "16 (SharePoint 2016) are supported.") - } - } - - if ($dbStatus.DatabaseExists -eq $true) - { - Write-Verbose -Message ("The SharePoint config database " + ` - "'$($params.FarmConfigDatabaseName)' already exists, so " + ` - "this server will join the farm.") - $createFarm = $false - } - elseif ($dbStatus.DatabaseExists -eq $false -and $params.RunCentralAdmin -eq $false) - { - # Only allow the farm to be created by a server that will run central admin - # to avoid a ghost CA site appearing on this server and causing issues - Write-Verbose -Message ("The SharePoint config database " + ` - "'$($params.FarmConfigDatabaseName)' does not exist, but " + ` - "this server will not be running the central admin " + ` - "website, so it will wait to join the farm rather than " + ` - "create one.") - $createFarm = $false - } - else - { - Write-Verbose -Message ("The SharePoint config database " + ` - "'$($params.FarmConfigDatabaseName)' does not exist, so " + ` - "this server will create the farm.") - $createFarm = $true - } - - $farmAction = "" - if ($createFarm -eq $false) - { - # The database exists, so attempt to join the farm to the server - - - # Remove the server role optional attribute as it is only used when creating - # a new farm - if ($executeArgs.ContainsKey("ServerRoleOptional") -eq $true) - { - $executeArgs.Remove("ServerRoleOptional") - } - - Write-Verbose -Message ("The server will attempt to join the farm now once every " + ` - "60 seconds for the next 15 minutes.") - $loopCount = 0 - $connectedToFarm = $false - $lastException = $null - while ($connectedToFarm -eq $false -and $loopCount -lt 15) - { - try - { - $joinObject = Connect-SPConfigurationDatabase @executeArgs - $connectedToFarm = $true - } - catch - { - $lastException = $_.Exception - Write-Verbose -Message ("$([DateTime]::Now.ToShortTimeString()) - An error " + ` - "occured joining config database " + ` - "'$($params.FarmConfigDatabaseName)' on " + ` - "'$($params.DatabaseServer)'. This resource will " + ` - "wait and retry automatically for up to 15 minutes. " + ` - "(waited $loopCount of 15 minutes)") - $loopCount++ - Start-Sleep -Seconds 60 - } - } - - if ($connectedToFarm -eq $false) - { - Write-Verbose -Message ("Unable to join config database. Throwing exception.") - throw $lastException - return - } - $farmAction = "JoinedFarm" - } - else - { - Add-SPDscConfigDBLock -SQLServer $params.DatabaseServer ` - -Database $params.FarmConfigDatabaseName - - try - { - $executeArgs += @{ - FarmCredentials = $params.FarmAccount - AdministrationContentDatabaseName = $params.AdminContentDatabaseName - } - - New-SPConfigurationDatabase @executeArgs - - $farmAction = "CreatedFarm" - } - finally - { - Remove-SPDscConfigDBLock -SQLServer $params.DatabaseServer ` - -Database $params.FarmConfigDatabaseName - } - } - - # Run common tasks for a new server - Install-SPHelpCollection -All | Out-Null - Initialize-SPResourceSecurity | Out-Null - Install-SPService | Out-Null - Install-SPFeature -AllExistingFeatures -Force | Out-Null - - # Provision central administration - if ($params.RunCentralAdmin -eq $true) - { - $centralAdminSite = Get-SPWebApplication -IncludeCentralAdministration ` - | Where-Object -FilterScript { - $_.IsAdministrationWebApplication -eq $true - } - - - $centralAdminProvisioned = $false - if ((New-Object -TypeName System.Uri $centralAdminSite.Url).Port -eq $params.CentralAdministrationPort) - { - $centralAdminProvisioned = $true - } - - if ($centralAdminProvisioned -eq $false) - { - New-SPCentralAdministration -Port $params.CentralAdministrationPort ` - -WindowsAuthProvider $params.CentralAdministrationAuth - } - else - { - $serviceInstance = Get-SPServiceInstance -Server $env:COMPUTERNAME ` - | Where-Object -FilterScript { - $_.TypeName -eq "Central Administration" - } - if ($null -eq $serviceInstance) - { - $domain = (Get-CimInstance -ClassName Win32_ComputerSystem).Domain - $fqdn = "$($env:COMPUTERNAME).$domain" - $serviceInstance = Get-SPServiceInstance -Server $fqdn ` - | Where-Object -FilterScript { - $_.TypeName -eq "Central Administration" - } - } - if ($null -eq $serviceInstance) - { - throw [Exception] "Unable to locate Central Admin service instance on this server" - } - Start-SPServiceInstance -Identity $serviceInstance - } - } - - Install-SPApplicationContent | Out-Null - - return $farmAction - } - - if ($actionResult -eq "JoinedFarm") - { - Write-Verbose -Message "Starting timer service" - Start-Service -Name sptimerv4 - - Write-Verbose -Message ("Pausing for 5 minutes to allow the timer service to " + ` - "fully provision the server") - Start-Sleep -Seconds 300 - Write-Verbose -Message ("Join farm complete. Restarting computer to allow " + ` - "configuration to continue") - - $global:DSCMachineStatus = 1 - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [parameter(Mandatory = $true)] - [System.String] - $FarmConfigDatabaseName, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $FarmAccount, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $Passphrase, - - [parameter(Mandatory = $true)] - [System.String] - $AdminContentDatabaseName, - - [parameter(Mandatory = $true)] - [System.Boolean] - $RunCentralAdmin, - - [parameter(Mandatory = $false)] - [System.UInt32] - $CentralAdministrationPort, - - [parameter(Mandatory = $false)] - [System.String] - [ValidateSet("NTLM","Kerberos")] - $CentralAdministrationAuth, - - [parameter(Mandatory = $false)] - [System.String] - [ValidateSet("Application", - "ApplicationWithSearch", - "Custom", - "DistributedCache", - "Search", - "SingleServer", - "SingleServerFarm", - "WebFrontEnd", - "WebFrontEndWithDistributedCache")] - $ServerRole - ) - - Write-Verbose -Message "Testing local SP Farm settings" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarm/MSFT_SPFarm.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarm/MSFT_SPFarm.schema.mof deleted file mode 100644 index 337fe993..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarm/MSFT_SPFarm.schema.mof +++ /dev/null @@ -1,15 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPFarm")] -class MSFT_SPFarm : OMI_BaseResource -{ - [Key, Description("Present to create/join the farm. Absent is currently not supported"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Required, Description("Name of the configuration database")] String FarmConfigDatabaseName; - [Required, Description("Server that will host the configuration and admin content databases")] String DatabaseServer; - [Required, Description("The account to use as the main farm account"), EmbeddedInstance("MSFT_Credential")] String FarmAccount; - [Required, Description("The passphrase to use to allow servers to join this farm"), EmbeddedInstance("MSFT_Credential")] String Passphrase; - [Required, Description("The name of the admin content database")] String AdminContentDatabaseName; - [Required, Description("Should the central admin site run on this specific server?")] Boolean RunCentralAdmin; - [Write, Description("What port will Central Admin be provisioned to - default is 9999")] uint32 CentralAdministrationPort; - [Write, Description("The authentication provider of the CentralAdministration web application"), ValueMap{"NTLM","Kerberos"}, Values{"NTLM","Kerberos"}] String CentralAdministrationAuth; - [Write, Description("SharePoint 2016 only - the MinRole role to enroll this server as"), ValueMap{"Application","ApplicationWithSearch","Custom","DistributedCache","Search","SingleServer","SingleServerFarm","WebFrontEnd","WebFrontEndWithDistributedCache"}, Values{"Application","ApplicationWithSearch","Custom","DistributedCache","Search","SingleServer","SingleServerFarm","WebFrontEnd","WebFrontEndWithDistributedCache"}] string ServerRole; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/MSFT_SPFarmAdministrators.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/MSFT_SPFarmAdministrators.psm1 deleted file mode 100644 index 57e81b4a..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/MSFT_SPFarmAdministrators.psm1 +++ /dev/null @@ -1,372 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String[]] - $Members, - - [parameter(Mandatory = $false)] - [System.String[]] - $MembersToInclude, - - [parameter(Mandatory = $false)] - [System.String[]] - $MembersToExclude, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting Farm Administrators configuration" - - if ($Members -and (($MembersToInclude) -or ($MembersToExclude))) - { - throw ("Cannot use the Members parameter together with the " + ` - "MembersToInclude or MembersToExclude parameters") - } - - if (!$Members -and !$MembersToInclude -and !$MembersToExclude) - { - throw ("At least one of the following parameters must be specified: " + ` - "Members, MembersToInclude, MembersToExclude") - } - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $webApps = Get-SPwebapplication -IncludeCentralAdministration - $caWebapp = $webApps | Where-Object -FilterScript { - $_.IsAdministrationWebApplication - } - - if ($null -eq $caWebapp) - { - Write-Verbose "Unable to locate central administration website" - return $null - } - $caWeb = Get-SPweb($caWebapp.Url) - $farmAdminGroup = $caWeb.AssociatedOwnerGroup - $farmAdministratorsGroup = $caWeb.SiteGroups.GetByName($farmAdminGroup) - return @{ - Name = $params.Name - Members = $farmAdministratorsGroup.users.UserLogin - MembersToInclude = $params.MembersToInclude - MembersToExclude = $params.MembersToExclude - InstallAccount = $params.InstallAccount - } - } - return $result -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String[]] - $Members, - - [parameter(Mandatory = $false)] - [System.String[]] - $MembersToInclude, - - [parameter(Mandatory = $false)] - [System.String[]] - $MembersToExclude, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting Farm Administrators configuration" - - if ($Members -and (($MembersToInclude) -or ($MembersToExclude))) - { - throw ("Cannot use the Members parameter together with the " + ` - "MembersToInclude or MembersToExclude parameters") - } - - if (!$Members -and !$MembersToInclude -and !$MembersToExclude) - { - throw ("At least one of the following parameters must be specified: " + ` - "Members, MembersToInclude, MembersToExclude") - } - - $CurrentValues = Get-TargetResource @PSBoundParameters - if ($null -eq $CurrentValues) { - throw "Unable to locate central administration website" - } - - $changeUsers = @{} - $runChange = $false - - if ($Members) { - Write-Verbose "Processing Members parameter" - - $differences = Compare-Object -ReferenceObject $CurrentValues.Members ` - -DifferenceObject $Members - - if ($null -eq $differences) - { - Write-Verbose "Farm Administrators group matches. No further processing required" - } - else - { - Write-Verbose "Farm Administrators group does not match. Perform corrective action" - $addUsers = @() - $removeUsers = @() - foreach ($difference in $differences) - { - if ($difference.SideIndicator -eq "=>") - { - # Add account - $user = $difference.InputObject - Write-Verbose "Add $user to Add list" - $addUsers += $user - } - elseif ($difference.SideIndicator -eq "<=") - { - # Remove account - $user = $difference.InputObject - Write-Verbose "Add $user to Remove list" - $removeUsers += $user - } - } - - if($addUsers.count -gt 0) - { - Write-Verbose "Adding $($addUsers.Count) users to the Farm Administrators group" - $changeUsers.Add = $addUsers - $runChange = $true - } - - if($removeUsers.count -gt 0) - { - Write-Verbose "Removing $($removeUsers.Count) users from the Farm Administrators group" - $changeUsers.Remove = $removeUsers - $runChange = $true - } - } - } - - if ($MembersToInclude) - { - Write-Verbose "Processing MembersToInclude parameter" - - $addUsers = @() - foreach ($member in $MembersToInclude) - { - if (-not($CurrentValues.Members.Contains($member))) - { - Write-Verbose "$member is not a Farm Administrator. Add user to Add list" - $addUsers += $member - } - else - { - Write-Verbose "$member is already a Farm Administrator. Skipping" - } - } - - if($addUsers.count -gt 0) - { - Write-Verbose "Adding $($addUsers.Count) users to the Farm Administrators group" - $changeUsers.Add = $addUsers - $runChange = $true - } - } - - if ($MembersToExclude) - { - Write-Verbose "Processing MembersToExclude parameter" - - $removeUsers = @() - foreach ($member in $MembersToExclude) - { - if ($CurrentValues.Members.Contains($member)) - { - Write-Verbose "$member is a Farm Administrator. Add user to Remove list" - $removeUsers += $member - } - else - { - Write-Verbose "$member is not a Farm Administrator. Skipping" - } - } - - if($removeUsers.count -gt 0) - { - Write-Verbose "Removing $($removeUsers.Count) users from the Farm Administrators group" - $changeUsers.Remove = $removeUsers - $runChange = $true - } - } - - if ($runChange) - { - Write-Verbose "Apply changes" - Merge-SPDscFarmAdminList $changeUsers - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String[]] - $Members, - - [parameter(Mandatory = $false)] - [System.String[]] - $MembersToInclude, - - [parameter(Mandatory = $false)] - [System.String[]] - $MembersToExclude, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing Farm Administrators configuration" - - if ($Members -and (($MembersToInclude) -or ($MembersToExclude))) - { - throw ("Cannot use the Members parameter together with the " + ` - "MembersToInclude or MembersToExclude parameters") - } - - if (!$Members -and !$MembersToInclude -and !$MembersToExclude) - { - throw ("At least one of the following parameters must be specified: " + ` - "Members, MembersToInclude, MembersToExclude") - } - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($null -eq $CurrentValues) - { - return $false - } - - if ($Members) - { - Write-Verbose "Processing Members parameter" - $differences = Compare-Object -ReferenceObject $CurrentValues.Members ` - -DifferenceObject $Members - - if ($null -eq $differences) - { - Write-Verbose "Farm Administrators group matches" - return $true - } - else - { - Write-Verbose "Farm Administrators group does not match" - return $false - } - } - - $result = $true - if ($MembersToInclude) - { - Write-Verbose "Processing MembersToInclude parameter" - foreach ($member in $MembersToInclude) - { - if (-not($CurrentValues.Members -contains $member)) - { - Write-Verbose "$member is not a Farm Administrator. Set result to false" - $result = $false - } - else - { - Write-Verbose "$member is already a Farm Administrator. Skipping" - } - } - } - - if ($MembersToExclude) - { - Write-Verbose "Processing MembersToExclude parameter" - foreach ($member in $MembersToExclude) - { - if ($CurrentValues.Members -contains $member) - { - Write-Verbose "$member is a Farm Administrator. Set result to false" - $result = $false - } - else - { - Write-Verbose "$member is not a Farm Administrator. Skipping" - } - } - } - - return $result -} - -function Merge-SPDscFarmAdminList -{ - param ( - [Hashtable] - $changeUsers - ) - - $result = Invoke-SPDSCCommand -Credential $InstallAccount -Arguments $changeUsers -ScriptBlock { - $changeUsers = $args[0] - - $webApps = Get-SPwebapplication -IncludeCentralAdministration - $caWebapp = $webApps | Where-Object -FilterScript { - $_.IsAdministrationWebApplication - } - if ($null -eq $caWebapp) { - throw "Unable to locate central administration website" - } - $caWeb = Get-SPweb($caWebapp.Url) - $farmAdminGroup = $caWeb.AssociatedOwnerGroup - - if ($changeUsers.ContainsKey("Add")) - { - foreach ($loginName in $changeUsers.Add) - { - $caWeb.SiteGroups.GetByName($farmAdminGroup).AddUser($loginName,"","","") - } - } - - if ($changeUsers.ContainsKey("Remove")) - { - foreach ($loginName in $changeUsers.Remove) - { - $removeUser = get-spuser $loginName -web $caWebapp.Url - $caWeb.SiteGroups.GetByName($farmAdminGroup).RemoveUser($removeUser) - } - } - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/MSFT_SPFarmAdministrators.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/MSFT_SPFarmAdministrators.schema.mof deleted file mode 100644 index 6b0650f8..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/MSFT_SPFarmAdministrators.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPFarmAdministrators")] -class MSFT_SPFarmAdministrators : OMI_BaseResource -{ - [Key, Description("A generic name for this resource, its value is not important")] String Name; - [Write, Description("A list of members to set the group to. Those not in this list will be removed")] String Members[]; - [Write, Description("A list of members to add. Members not in this list will be left in the group")] String MembersToInclude[]; - [Write, Description("A list of members to remove. Members not in this list will be left in the group")] String MembersToExclude[]; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/MSFT_SPFarmPropertyBag.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/MSFT_SPFarmPropertyBag.psm1 deleted file mode 100644 index a31bda88..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/MSFT_SPFarmPropertyBag.psm1 +++ /dev/null @@ -1,173 +0,0 @@ -function Get-TargetResource() -{ - [CmdletBinding()] - [OutputType([System.Collections.HashTable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Key, - - [Parameter(Mandatory = $false)] - [System.String] - $Value, - - [Parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = 'Present', - - [Parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Looking for SPFarm property '$Name'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - try - { - $spFarm = Get-SPFarm -ErrorAction SilentlyContinue - } - catch - { - Write-Verbose -Message ("No local SharePoint farm was detected.") - return @{ - Key = $params.Key - Value = $null - Ensure = 'Absent' - } - } - - if ($null -ne $spFarm) - { - if ($spFarm.Properties) - { - if ($spFarm.Properties.Contains($params.Key) -eq $true) - { - $localEnsure = "Present" - $currentValue = $spFarm.Properties[$params.Key] - } - else - { - $localEnsure = "Absent" - $currentValue = $null - } - } - } - else - { - $null = $currentValue - $localEnsure = 'Absent' - } - - return @{ - Key = $params.Key - Value = $currentValue - Ensure = $localEnsure - } - } - return $result -} - -function Set-TargetResource() -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Key, - - [Parameter(Mandatory = $false)] - [System.String] - $Value, - - [Parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = 'Present', - - [Parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting SPFarm property '$Name'" - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - try - { - $spFarm = Get-SPFarm -ErrorAction SilentlyContinue - } - catch - { - throw "No local SharePoint farm was detected." - return - } - - if ($params.Ensure -eq 'Present') - { - if ($params.Value) - { - Write-Verbose -Message "Adding property '$params.Key'='$params.value' to SPFarm.properties" - $spFarm.Properties[$params.Key] = $params.Value - $spFarm.Update() - } - else - { - Write-Warning -Message 'Ensure = Present, value parameter cannot be null' - } - } - else - { - Write-Verbose -Message "Removing property '$params.Key' from SPFarm.properties" - - $spFarm.Properties.Remove($params.Key) - $spFarm.Update() - } - } -} - -function Test-TargetResource() -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Key, - - [Parameter(Mandatory = $false)] - [System.String] - $Value, - - [Parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = 'Present', - - [Parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing SPFarm property '$Name'" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @('Ensure','Key','Value') -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/MSFT_SPFarmPropertyBag.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/MSFT_SPFarmPropertyBag.schema.mof deleted file mode 100644 index c9e5c824..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/MSFT_SPFarmPropertyBag.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPFarmPropertyBag")] -class MSFT_SPFarmPropertyBag : OMI_BaseResource -{ - [Key, Description("The key of the SPFarm property bag")] string Key; - [Write, Description("Value of the SPfarm property bag")] String Value; - [Write, Description("Set to present to ensure the SPfarm property exists, or absent to ensure it is removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmSolution/MSFT_SPFarmSolution.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmSolution/MSFT_SPFarmSolution.psm1 deleted file mode 100644 index 8b10cb97..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmSolution/MSFT_SPFarmSolution.psm1 +++ /dev/null @@ -1,458 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $LiteralPath, - - [parameter(Mandatory = $false)] - [System.String[]] - $WebApplications = @(), - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String] - $Version = "1.0.0.0", - - [parameter(Mandatory = $false)] - [System.Boolean] - $Deployed = $true, - - [parameter(Mandatory = $false)] - [ValidateSet("14","15","All")] - [System.String] - $SolutionLevel, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting farm solution '$Name' settings" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $solution = Get-SPSolution -Identity $params.Name ` - -ErrorAction SilentlyContinue ` - -Verbose:$false - - if ($null -ne $solution) - { - $currentState = "Present" - $deployed = $solution.Deployed - $version = $Solution.Properties["Version"] - $deployedWebApplications = @($solution.DeployedWebApplications ` - | Select-Object -ExpandProperty Url) - } - else - { - $currentState = "Absent" - $deployed = $false - $version = "0.0.0.0" - $deployedWebApplications = @() - } - - return @{ - Name = $params.Name - LiteralPath = $LiteralPath - Deployed = $deployed - Ensure = $currentState - Version = $version - WebApplications = $deployedWebApplications - SolutionLevel = $params.SolutionLevel - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $LiteralPath, - - [parameter(Mandatory = $false)] - [System.String[]] - $WebApplications = @(), - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String] - $Version = "1.0.0.0", - - [parameter(Mandatory = $false)] - [System.Boolean] - $Deployed = $true, - - [parameter(Mandatory = $false)] - [ValidateSet("14","15","All")] - [System.String] - $SolutionLevel, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting farm solution '$Name' settings" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - $PSBoundParameters.Ensure = $Ensure - $PSBoundParameters.Version = $Version - $PSBoundParameters.Deployed = $Deployed - - if ($Ensure -eq "Present") - { - if ($CurrentValues.Ensure -eq "Absent") - { - Write-Verbose -Message "Upload solution to the farm." - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $runParams = @{} - $runParams.Add("LiteralPath", $params.LiteralPath) - $runParams.Add("Verbose", $false) - - $solution = Add-SPSolution @runParams - - $solution.Properties["Version"] = $params.Version - $solution.Update() - - return $solution - } - - $CurrentValues.Version = $result.Properties["Version"] - } - - if ($CurrentValues.Version -ne $Version) - { - # If the solution is not deployed and the versions do not match we have to - # remove the current solution and add the new one - if (-not $CurrentValues.Deployed) - { - Write-Verbose -Message ("Remove current version " + ` - "('$($CurrentValues.Version)') of solution...") - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $runParams = @{} - $runParams.Add("Identity", $params.Name) - $runParams.Add("Confirm", $false) - $runParams.Add("Verbose", $false) - - Remove-SPSolution $runParams - - $runParams = @{} - $runParams.Add("LiteralPath", $params.LiteralPath) - - $solution = Add-SPSolution @runParams - - $solution.Properties["Version"] = $params.Version - $solution.Update() - - return $solution - } - - $CurrentValues.Version = $result.Properties["Version"] - } - else - { - Write-Verbose -Message ("Update solution from " + ` - "'$($CurrentValues.Version)' to $Version...") - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $solution = Get-SPSolution -Identity $params.Name -Verbose:$false - - $runParams = @{} - $runParams.Add("Identity", $params.Name) - $runParams.Add("LiteralPath", $params.LiteralPath) - $runParams.Add("GACDeployment", $solution.ContainsGlobalAssembly) - $runParams.Add("Confirm", $false) - $runParams.Add("Local", $false) - $runParams.Add("Verbose", $false) - - Update-SPSolution @runParams - - $solution = Get-SPSolution -Identity $params.Name -Verbose:$false - $solution.Properties["Version"] = $params.Version - $solution.Update() - - # Install new features... - Install-SPFeature -AllExistingFeatures -Confirm:$false - } - } - } - - } - else - { - #If ensure is absent we should also retract the solution first - $Deployed = $false - } - - if ($Deployed -ne $CurrentValues.Deployed) - { - Write-Verbose -Message ("The deploy state of $Name is " + ` - "'$($CurrentValues.Deployed)' but should be '$Deployed'.") - if ($CurrentValues.Deployed) - { - # Retract Solution globally - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $runParams = @{} - $runParams.Add("Identity", $params.Name) - $runParams.Add("Confirm", $false) - $runParams.Add("Verbose", $false) - - if ($solution.ContainsWebApplicationResource) - { - if ($null -eq $webApps -or $webApps.Length -eq 0) - { - $runParams.Add("AllWebApplications", $true) - - Uninstall-SPSolution @runParams - } - else - { - foreach ($webApp in $webApps) - { - $runParams["WebApplication"] = $webApp - - Uninstall-SPSolution @runParams - } - } - } - else - { - Uninstall-SPSolution @runParams - } - } - } - else - { - # Deploy solution - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $solution = Get-SPSolution -Identity $params.Name -Verbose:$false - - $runParams = @{ - Identity = $solution - GACDeployment = $solution.ContainsGlobalAssembly - Local = $false - Verbose = $false - } - if ($params.ContainsKey("SolutionLevel") -eq $true) - { - $runParams.Add("CompatibilityLevel", $params.SolutionLevel) - } - - if (!$solution.ContainsWebApplicationResource) - { - Install-SPSolution @runParams - } - else - { - if ($null -eq $webApps -or $webApps.Length -eq 0) - { - $runParams.Add("AllWebApplications", $true) - - Install-SPSolution @runParams - } - else - { - foreach ($webApp in $webApps) - { - $runParams["WebApplication"] = $webApp - - Install-SPSolution @runParams - } - } - } - } - } - } - - Wait-SPDSCSolutionJob -SolutionName $Name -InstallAccount $InstallAccount - - if ($Ensure -eq "Absent") - { - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $runParams = @{ - Identity = $params.Name - Confirm = $false - Verbose = $false - } - - Remove-SPSolution @runParams - - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $LiteralPath, - - [parameter(Mandatory = $false)] - [System.String[]] - $WebApplications = @(), - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String] - $Version = "1.0.0.0", - - [parameter(Mandatory = $false)] - [System.Boolean] - $Deployed = $true, - - [parameter(Mandatory = $false)] - [ValidateSet("14","15","All")] - [System.String] - $SolutionLevel, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing farm solution '$Name' settings" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - $valuesToCheck = @("Ensure", "Version", "Deployed") - if ($WebApplications.Count -gt 0) - { - $valuesToCheck += "WebApplications" - } - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck $valuesToCheck -} - -function Wait-SPDSCSolutionJob -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [string] - $SolutionName, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Start-Sleep -Seconds 5 - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @{ Name = $SolutionName } ` - -ScriptBlock { - $params = $args[0] - - $gc = Start-SPAssignment -Verbose:$false - - $solution = Get-SPSolution -Identity $params.Name -Verbose:$false -AssignmentCollection $gc - - if ($solution.JobExists -eq $true) - { - Write-Verbose -Message "Waiting for solution '$($params.Name)'..." - $loopCount = 0 - while ($solution.JobExists -and $loopCount -lt 600) - { - $solution = Get-SPSolution -Identity $params.Name -Verbose:$false -AssignmentCollection $gc - - Write-Verbose -Message ("$([DateTime]::Now.ToShortTimeString()) - Waiting for a " + ` - "job for solution '$($params.Name)' to complete") - $loopCount++ - Start-Sleep -Seconds 5 - - } - - Write-Verbose -Message "Result: $($solution.LastOperationResult)" - Write-Verbose -Message "Details: $($solution.LastOperationDetails)" - - } - else - { - Write-Verbose -Message "Solution '$($params.Name)' has no job pending." - return @{ - LastOperationResult = "DeploymentSucceeded" - LastOperationDetails = "Solution '$($params.Name)' has no job pending." - } - } - - Stop-SPAssignment $gc -Verbose:$false - - return @{ - LastOperationResult = $solution.LastOperationResult - LastOperationDetails = $solution.LastOperationDetails - } - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmSolution/MSFT_SPFarmSolution.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmSolution/MSFT_SPFarmSolution.schema.mof deleted file mode 100644 index 4c06cf3a..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFarmSolution/MSFT_SPFarmSolution.schema.mof +++ /dev/null @@ -1,12 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPFarmSolution")] -class MSFT_SPFarmSolution : OMI_BaseResource -{ - [Key, Description("The filename of the WSP package")] string Name; - [Required, Description("The full path to the WSP file")] string LiteralPath; - [Write, Description("A list of the web applications to deploy this to")] string WebApplications[]; - [Write, Description("Present if the WSP should be deployed, or Absent if it should be removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("The version of the package that is being modified")] string Version; - [Write, Description("Should the solution be deployed to the farm, or just installed to the farm")] Boolean Deployed; - [Write, Description("What compatability level should the WSP be deployed as?"), ValueMap{"14","15","All"}, Values{"14","15","All"}] string SolutionLevel; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFeature/MSFT_SPFeature.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFeature/MSFT_SPFeature.psm1 deleted file mode 100644 index 08af712c..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFeature/MSFT_SPFeature.psm1 +++ /dev/null @@ -1,217 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $true)] - [ValidateSet("Farm","WebApplication","Site","Web")] - [System.String] - $FeatureScope, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String] - $Version - ) - - Write-Verbose -Message "Getting feature $Name at $FeatureScope scope" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $checkParams = @{ - Identity = $params.Name - } - if ($params.FeatureScope -eq "Farm") - { - $checkParams.Add($params.FeatureScope, $true) - } - else - { - $checkParams.Add($params.FeatureScope, $params.Url) - } - $featureAtScope = Get-SPFeature @checkParams -ErrorAction SilentlyContinue - $enabled = ($null -ne $featureAtScope) - if ($enabled -eq $true) - { - $currentState = "Present" - } - else - { - $currentState = "Absent" - } - - return @{ - Name = $params.Name - FeatureScope = $params.FeatureScope - Url = $params.Url - InstallAccount = $params.InstallAccount - Ensure = $currentState - Version = $featureAtScope.Version - } - } - return $result -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $true)] - [ValidateSet("Farm","WebApplication","Site","Web")] - [System.String] - $FeatureScope, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String] - $Version - ) - - Write-Verbose -Message "Setting feature $Name at $FeatureScope scope" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - $PSBoundParameters.Add("CurrentValues", $CurrentValues) - $PSBoundParameters.Ensure = $Ensure - - if ($Ensure -eq "Present") - { - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - $currentValues = $params["CurrentValues"] - - $runParams = @{ - Identity = $params.Name - } - - if ($params.FeatureScope -ne "Farm") - { - $runParams.Add("Url", $params.Url) - } - - if ($currentValues.Ensure -eq "Present") - { - # Disable the feature first if it already exists. - $runParams.Add("Confirm", $false) - Write-Verbose -Message ("Disable Feature '$($params.Name)' because it is " + ` - "already active at scope '$($params.FeatureScope)'...") - Disable-SPFeature @runParams - } - - Write-Verbose -Message ("Enable Feature '$($params.Name)' at scope " + ` - "'$($params.FeatureScope)'...") - Enable-SPFeature @runParams - } - } - if ($Ensure -eq "Absent") - { - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - - $params = $args[0] - $currentValues = $params["CurrentValues"] - - $runParams = @{ - Identity = $params.Name - } - - if ($params.FeatureScope -ne "Farm") - { - $runParams.Add("Url", $params.Url) - } - - $runParams.Add("Confirm", $false) - Write-Verbose -Message ("Disable Feature '$($params.Name)' because 'Ensure' is " + ` - "'$($params.Ensure)'...") - Disable-SPFeature @runParams - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $true)] - [ValidateSet("Farm","WebApplication","Site","Web")] - [System.String] - $FeatureScope, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String] - $Version - ) - - Write-Verbose -Message "Testing feature $Name at $FeatureScope scope" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure", "Version") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFeature/MSFT_SPFeature.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFeature/MSFT_SPFeature.schema.mof deleted file mode 100644 index fa7f3eb8..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPFeature/MSFT_SPFeature.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPFeature")] -class MSFT_SPFeature : OMI_BaseResource -{ - [Key, Description("The name of the feature")] string Name; - [Required, Description("The scope to change the feature at - Farm, WebApplication, SiteCollection or Site"), ValueMap{"Farm","WebApplication","Site","Web"}, Values{"Farm","WebApplication","Site","Web"}] string FeatureScope; - [Key, Description("The URL to change the feature at")] string Url; - [Write, Description("Present if the feature is to be enabled, Absent if it is to be disabled"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("The version of the feature to check against")] string Version; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/MSFT_SPHealthAnalyzerRuleState.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/MSFT_SPHealthAnalyzerRuleState.psm1 deleted file mode 100644 index a778f0c1..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/MSFT_SPHealthAnalyzerRuleState.psm1 +++ /dev/null @@ -1,274 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Boolean] - $Enabled, - - [parameter(Mandatory = $false)] - [ValidateSet("All Servers","Any Server")] - [System.String] - $RuleScope, - - [parameter(Mandatory = $false)] - [ValidateSet("Hourly","Daily","Weekly","Monthly","OnDemandOnly")] - [System.String] - $Schedule, - - [parameter(Mandatory = $false)] - [System.Boolean] - $FixAutomatically, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting Health Rule configuration settings" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - try - { - $spFarm = Get-SPFarm - } - catch - { - Write-Verbose -Message ("No local SharePoint farm was detected. Health " + ` - "Analyzer Rule settings will not be applied") - return $null - } - - $caWebapp = Get-SPwebapplication -IncludeCentralAdministration ` - | Where-Object -FilterScript { - $_.IsAdministrationWebApplication - } - - if ($null -eq $caWebapp) - { - Write-Verbose -Message "Unable to locate central administration website" - return $null - } - - # Get CA SPWeb - $caWeb = Get-SPWeb($caWebapp.Url) - $healthRulesList = $caWeb.Lists | Where-Object -FilterScript { - $_.BaseTemplate -eq "HealthRules" - } - - if ($null -ne $healthRulesList) - { - $spQuery = New-Object Microsoft.SharePoint.SPQuery - $querytext = "" + ` - "$($params.Name)" - $spQuery.Query = $querytext - $results = $healthRulesList.GetItems($spQuery) - if ($results.Count -eq 1) - { - $item = $results[0] - - # Additional check for incorrect default value of the schedule for rule - # "One or more app domains for web applications aren't configured correctly." - $ruleschedule = $item["HealthRuleSchedule"] - if ($ruleschedule -eq "On Demand") - { - $ruleschedule = "OnDemandOnly" - } - - return @{ - # Set the Health Analyzer Rule settings - Name = $params.Name - Enabled = $item["HealthRuleCheckEnabled"] - RuleScope = $item["HealthRuleScope"] - Schedule = $ruleschedule - FixAutomatically = $item["HealthRuleAutoRepairEnabled"] - InstallAccount = $params.InstallAccount - } - } - else - { - Write-Verbose -Message ("Unable to find specified Health Analyzer Rule. Make " + ` - "sure any related service applications exists.") - return $null - } - } - else - { - Write-Verbose -Message "Unable to locate Health Analyzer Rules list" - return $null - } - } - return $result -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Boolean] - $Enabled, - - [parameter(Mandatory = $false)] - [ValidateSet("All Servers","Any Server")] - [System.String] - $RuleScope, - - [parameter(Mandatory = $false)] - [ValidateSet("Hourly","Daily","Weekly","Monthly","OnDemandOnly")] - [System.String] - $Schedule, - - [parameter(Mandatory = $false)] - [System.Boolean] - $FixAutomatically, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting Health Analyzer Rule configuration settings" - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - try - { - $spFarm = Get-SPFarm - } - catch - { - throw ("No local SharePoint farm was detected. Health Analyzer Rule " + ` - "settings will not be applied") - return - } - - $caWebapp = Get-SPwebapplication -IncludeCentralAdministration ` - | Where-Object -FilterScript { - $_.IsAdministrationWebApplication - } - - if ($null -eq $caWebapp) - { - throw ("No Central Admin web application was found. Health Analyzer Rule " + ` - "settings will not be applied") - return - } - - # Get Central Admin SPWeb - $caWeb = Get-SPWeb($caWebapp.Url) - $healthRulesList = $caWeb.Lists | Where-Object -FilterScript { - $_.BaseTemplate -eq "HealthRules" - } - - if ($null -ne $healthRulesList) - { - $spQuery = New-Object Microsoft.SharePoint.SPQuery - $querytext = "" + ` - "$($params.Name)" - $spQuery.Query = $querytext - $results = $healthRulesList.GetItems($spQuery) - if ($results.Count -eq 1) - { - $item = $results[0] - - $item["HealthRuleCheckEnabled"] = $params.Enabled - if ($params.ContainsKey("RuleScope")) - { - $item["HealthRuleScope"] = $params.RuleScope - } - if ($params.ContainsKey("Schedule")) - { - $item["HealthRuleSchedule"] = $params.Schedule - } - if ($params.ContainsKey("FixAutomatically")) - { - $item["HealthRuleAutoRepairEnabled"] = $params.FixAutomatically - } - - $item.Update() - } - else - { - throw ("Could not find specified Health Analyzer Rule. Health Analyzer Rule " + ` - "settings will not be applied. Make sure any related service " + ` - "applications exists") - return - } - } - else - { - throw ("Could not find Health Analyzer Rules list. Health Analyzer Rule settings " + ` - "will not be applied") - return - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Boolean] - $Enabled, - - [parameter(Mandatory = $false)] - [ValidateSet("All Servers","Any Server")] - [System.String] - $RuleScope, - - [parameter(Mandatory = $false)] - [ValidateSet("Hourly","Daily","Weekly","Monthly","OnDemandOnly")] - [System.String] - $Schedule, - - [parameter(Mandatory = $false)] - [System.Boolean] - $FixAutomatically, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing Health Analyzer rule configuration settings" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($null -eq $CurrentValues) - { - return $false - } - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/MSFT_SPHealthAnalyzerRuleState.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/MSFT_SPHealthAnalyzerRuleState.schema.mof deleted file mode 100644 index 2785d80d..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/MSFT_SPHealthAnalyzerRuleState.schema.mof +++ /dev/null @@ -1,26 +0,0 @@ -/* - -**Example** - - SPHealthAnalyzerRuleState DisableDiskSpaceRule - { - Name = "Drives are at risk of running out of free space." - Enabled = $true - RuleScope = "All Servers" - Schedule = "Daily" - FixAutomatically = $false - InstallAccount = $InstallAccount - } -*/ - -[ClassVersion("1.0.0.0"), FriendlyName("SPHealthAnalyzerRuleState")] -class MSFT_SPHealthAnalyzerRuleState : OMI_BaseResource -{ - [Key, Description("The name of the rule exactly as it appears in central admin")] String Name; - [Required, Description("Should the rule be enabled?")] Boolean Enabled; - [Write, Description("What is the scope of this rule"), ValueMap{"All Servers","Any Server"}, Values{"All Servers","Any Server"}] String RuleScope; - [Write, Description("How often should the rule check"), ValueMap{"Hourly","Daily","Weekly","Monthly","OnDemandOnly"}, Values{"Hourly","Daily","Weekly","Monthly","OnDemandOnly"}] String Schedule; - [Write, Description("Should the rule fix itself automatically")] Boolean FixAutomatically; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstall/MSFT_SPInstall.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstall/MSFT_SPInstall.psm1 deleted file mode 100644 index 578c9da9..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstall/MSFT_SPInstall.psm1 +++ /dev/null @@ -1,271 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $BinaryDir, - - [parameter(Mandatory = $true)] - [System.String] - $ProductKey, - - [parameter(Mandatory = $false)] - [System.String] - $InstallPath, - - [parameter(Mandatory = $false)] - [System.String] - $DataPath, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present" - ) - - Write-Verbose -Message "Getting install status of SharePoint" - - $x86Path = "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*" - $installedItemsX86 = Get-ItemProperty -Path $x86Path | Select-Object -Property DisplayName - - $x64Path = "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*" - $installedItemsX64 = Get-ItemProperty -Path $x64Path | Select-Object -Property DisplayName - - $installedItems = $installedItemsX86 + $installedItemsX64 - $installedItems = $installedItems | Select-Object -Property DisplayName -Unique - $spInstall = $installedItems | Where-Object -FilterScript { - $_ -match "Microsoft SharePoint Server (2013|2016)" - } - - if ($spInstall) - { - return @{ - BinaryDir = $BinaryDir - ProductKey = $ProductKey - InstallPath = $InstallPath - DataPath = $DataPath - Ensure = "Present" - } - } - else - { - return @{ - BinaryDir = $BinaryDir - ProductKey = $ProductKey - InstallPath = $InstallPath - DataPath = $DataPath - Ensure = "Absent" - } - } -} - - -function Set-TargetResource -{ - # Supressing the global variable use to allow passing DSC the reboot message - [CmdletBinding()] - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidGlobalVars", "")] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $BinaryDir, - - [parameter(Mandatory = $true)] - [System.String] - $ProductKey, - - [parameter(Mandatory = $false)] - [System.String] - $InstallPath, - - [parameter(Mandatory = $false)] - [System.String] - $DataPath, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present" - ) - - Write-Verbose -Message "Setting install status of SharePoint" - - if ($Ensure -eq "Absent") - { - throw [Exception] ("SharePointDsc does not support uninstalling SharePoint or " + ` - "its prerequisites. Please remove this manually.") - return - } - - $InstallerPath = Join-Path $BinaryDir "setup.exe" - $majorVersion = (Get-SPDSCAssemblyVersion -PathToAssembly $InstallerPath) - if ($majorVersion -eq 15) - { - $svrsetupDll = Join-Path -Path $BinaryDir -ChildPath "updates\svrsetup.dll" - $checkDotNet = $true - if (Test-Path -Path $svrsetupDll) - { - $svrsetupDllFileInfo = Get-ItemProperty -Path $svrsetupDll - $fileVersion = $svrsetupDllFileInfo.VersionInfo.FileVersion - if ($fileVersion -ge "15.0.4709.1000") - { - $checkDotNet = $false - } - } - - if ($checkDotNet -eq $true) - { - $ndpKey = "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4" - $dotNet46Installed = $false - if (Test-Path -Path $ndpKey) - { - $dotNetv4Keys = Get-ChildItem -Path $ndpKey - foreach ($dotnetInstance in $dotNetv4Keys) - { - if ($dotnetInstance.GetValue("Release") -ge 390000) - { - $dotNet46Installed = $true - break - } - } - } - - if ($dotNet46Installed -eq $true) - { - throw [Exception] ("A known issue prevents installation of SharePoint 2013 on " + ` - "servers that have .NET 4.6 already installed. See details " + ` - "at https://support.microsoft.com/en-us/kb/3087184") - return - } - } - } - - Write-Verbose -Message "Writing install config file" - - $configPath = "$env:temp\SPInstallConfig.xml" - - $configData = " - - - - - - - - - - - -" - - if ($PSBoundParameters.ContainsKey("InstallPath") -eq $true) - { - $configData += " -" - } - if ($PSBoundParameters.ContainsKey("DataPath") -eq $true) - { - $configData += " -" - } - $configData += " - - - -" - - $configData | Out-File -FilePath $configPath - - Write-Verbose -Message "Beginning installation of SharePoint" - - $setupExe = Join-Path -Path $BinaryDir -ChildPath "setup.exe" - - $setup = Start-Process -FilePath $setupExe ` - -ArgumentList "/config `"$configPath`"" ` - -Wait ` - -PassThru - - switch ($setup.ExitCode) - { - 0 { - Write-Verbose -Message "SharePoint binary installation complete" - $global:DSCMachineStatus = 1 - } - 30066 { - $pr1 = ("HKLM:\Software\Microsoft\Windows\CurrentVersion\" + ` - "Component Based Servicing\RebootPending") - $pr2 = ("HKLM:\Software\Microsoft\Windows\CurrentVersion\" + ` - "WindowsUpdate\Auto Update\RebootRequired") - $pr3 = "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager" - if ( ($null -ne (Get-Item $pr1 -ErrorAction SilentlyContinue)) ` - -or ($null -ne (Get-Item $pr2 -ErrorAction SilentlyContinue)) ` - -or ((Get-Item $pr3 | Get-ItemProperty).PendingFileRenameOperations.count -gt 0) ` - ) { - - Write-Verbose -Message ("SPInstall has detected the server has pending " + ` - "a reboot. Flagging to the DSC engine that the " + ` - "server should reboot before continuing.") - $global:DSCMachineStatus = 1 - } else { - throw ("SharePoint installation has failed due to an issue with prerequisites " + ` - "not being installed correctly. Please review the setup logs.") - } - } - Default { - throw "SharePoint install failed, exit code was $($setup.ExitCode)" - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $BinaryDir, - - [parameter(Mandatory = $true)] - [System.String] - $ProductKey, - - [parameter(Mandatory = $false)] - [System.String] - $InstallPath, - - [parameter(Mandatory = $false)] - [System.String] - $DataPath, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present" - ) - - Write-Verbose -Message "Testing install status of SharePoint" - - $PSBoundParameters.Ensure = $Ensure - - if ($Ensure -eq "Absent") - { - throw [Exception] ("SharePointDsc does not support uninstalling SharePoint or " + ` - "its prerequisites. Please remove this manually.") - return - } - - $CurrentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstall/MSFT_SPInstall.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstall/MSFT_SPInstall.schema.mof deleted file mode 100644 index abecf48c..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstall/MSFT_SPInstall.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPInstall")] -class MSFT_SPInstall : OMI_BaseResource -{ - [Key, Description("The directory that contains all of the SharePoint binaries")] String BinaryDir; - [Required, Description("The product key to use during the installation")] String ProductKey; - [Write, Description("The install directory to use in the installation, leave blank to use the setup defaults")] String InstallPath; - [Write, Description("The data directory to use in the installation, leave blank to use the setup defaults")] String DataPath; - [Write, Description("Present to install SharePoint. Absent is currently not supported"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/MSFT_SPInstallLanguagePack.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/MSFT_SPInstallLanguagePack.psm1 deleted file mode 100644 index e0dca300..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/MSFT_SPInstallLanguagePack.psm1 +++ /dev/null @@ -1,386 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $BinaryDir, - - [parameter(Mandatory = $false)] - [ValidateSet("mon","tue","wed","thu","fri","sat","sun")] - [System.String[]] - $BinaryInstallDays, - - [parameter(Mandatory = $false)] - [System.String] - $BinaryInstallTime, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting install status of SharePoint Language Pack" - - # Check if Binary folder exists - if (-not(Test-Path -Path $BinaryDir)) - { - throw "Specified path cannot be found." - } - - $osrvFolder = Get-ChildItem -Path (Join-Path -Path $BinaryDir ` - -ChildPath "\osmui*.*") - - if ($osrvFolder.Count -ne 1) - { - throw "Unknown folder structure" - } - - $products = Get-SPDscRegProductsInfo - - $englishProducts = @() - foreach ($product in $products) - { - $parsedProduct = $product -split " - " - switch -Regex ($parsedProduct) - { - "Dari" { $languageEN = "Dari"} - "Serbian" { - if ($parsedProduct[1] -match "srpski") - { - $languageEN = "Serbian (Latin)" - } - else - { - $languageEN = "Serbian (Cyrillic)" - } - } - "Chinese" { - $parsedENProduct = $parsedProduct[1] -split "/" - $languageEN = $parsedENProduct[0] - } - "Portuguese" { - if ($parsedProduct[1] -match "\(Brasil\)") - { - $languageEN = "Portuguese (Brasil)" - } - else - { - $languageEN = "Portuguese (Portugal)" - } - } - Default { - $parsedENProduct = $parsedProduct[1] -split "/" - $parsedENProduct = $parsedENProduct[0] -split " " - $languageEN = $parsedENProduct[0] - } - } - $englishProducts += $languageEN - } - - # Extract language from filename - if ($osrvFolder.Name -match "\w*.(\w{2,3}-\w*-?\w*)") - { - $language = $matches[1] - } - else - { - throw "Update does not contain the language code in the correct format." - } - - try - { - $cultureInfo = New-Object -TypeName System.Globalization.CultureInfo ` - -ArgumentList $language - } - catch - { - throw "Error while converting language information: $language" - } - - # try/catch is required for some versions of Windows, other version use the LCID value of 4096 - if ($cultureInfo.LCID -eq 4096) - { - throw "Error while converting language information: $language" - } - - # Extract English name of the language code - $updateLanguage = $cultureInfo.EnglishName - switch ($cultureInfo.EnglishName) - { - "Dari (Afghanistan)" { $languageEnglish = "Dari" } - "Chinese (Simplified, China)" { $languageEnglish = "Chinese (PRC)" } - "Chinese (Traditional, Taiwan)" { $languageEnglish = "Chinese (Taiwan)" } - "Portuguese (Brazil)" { $languageEnglish = "Portuguese (Brasil)" } - "Portuguese (Portugal)" { $languageEnglish = "Portuguese (Portugal)" } - "Serbian (Cyrillic, Serbia)" { $languageEnglish = "Serbian (Cyrillic)" } - "Serbian (Latin, Serbia)" { $languageEnglish = "Serbian (Latin)" } - Default { - if ($cultureInfo.EnglishName -match "(\w*,*\s*\w*) \([^)]*\)") - { - $languageEnglish = $matches[1] - $updateLanguage = $matches[0] - if ($languageEnglish.contains(",")) - { - $languages = $languageEnglish.Split(",") - $languageEnglish = $languages[0] - } - } - } - } - - Write-Verbose -Message "Update is for the $languageEnglish language" - - if ($englishProducts -contains $languageEnglish -eq $true) - { - Write-Verbose -Message "Language Pack $languageEnglish is found" - return @{ - BinaryDir = $BinaryDir - BinaryInstallDays = $BinaryInstallDays - BinaryInstallTime = $BinaryInstallTime - Ensure = "Present" - } - } - else - { - Write-Verbose -Message "Language Pack $languageEnglish is NOT found" - return @{ - BinaryDir = $BinaryDir - BinaryInstallDays = $BinaryInstallDays - BinaryInstallTime = $BinaryInstallTime - Ensure = "Absent" - } - } -} - - -function Set-TargetResource -{ - # Supressing the global variable use to allow passing DSC the reboot message - [CmdletBinding()] - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidGlobalVars", "")] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $BinaryDir, - - [parameter(Mandatory = $false)] - [ValidateSet("mon","tue","wed","thu","fri","sat","sun")] - [System.String[]] - $BinaryInstallDays, - - [parameter(Mandatory = $false)] - [System.String] - $BinaryInstallTime, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting install status of SharePoint Language Pack" - - if ($Ensure -eq "Absent") - { - throw [Exception] ("SharePointDsc does not support uninstalling SharePoint " + ` - "Language Packs. Please remove this manually.") - return - } - - # Check if Binary folder exists - if (-not(Test-Path -Path $BinaryDir)) - { - throw "Specified path cannot be found." - } - - $now = Get-Date - if ($BinaryInstallDays) - { - # BinaryInstallDays parameter exists, check if current day is specified - $currentDayOfWeek = $now.DayOfWeek.ToString().ToLower().Substring(0,3) - - if ($BinaryInstallDays -contains $currentDayOfWeek) - { - Write-Verbose -Message ("Current day is present in the parameter BinaryInstallDays. " + ` - "Update can be run today.") - } - else - { - Write-Verbose -Message ("Current day is not present in the parameter BinaryInstallDays, " + ` - "skipping the update") - return - } - } - else - { - Write-Verbose -Message "No BinaryInstallDays specified, Update can be ran on any day." - } - - # Check if BinaryInstallTime parameter exists - if ($BinaryInstallTime) - { - # Check if current time is inside of time window - $upgradeTimes = $BinaryInstallTime.Split(" ") - $starttime = 0 - $endtime = 0 - - if ($upgradeTimes.Count -ne 3) - { - throw "Time window incorrectly formatted." - } - else - { - if ([datetime]::TryParse($upgradeTimes[0],[ref]$starttime) -ne $true) - { - throw "Error converting start time" - } - - if ([datetime]::TryParse($upgradeTimes[2],[ref]$endtime) -ne $true) - { - throw "Error converting end time" - } - - if ($starttime -gt $endtime) - { - throw "Error: Start time cannot be larger than end time" - } - } - - if (($starttime -lt $now) -and ($endtime -gt $now)) - { - Write-Verbose -Message ("Current time is inside of the window specified in " + ` - "BinaryInstallTime. Starting update") - } - else - { - Write-Verbose -Message ("Current time is outside of the window specified in " + ` - "BinaryInstallTime, skipping the update") - return - } - } - else - { - Write-Verbose -Message ("No BinaryInstallTime specified, Update can be ran at " + ` - "any time. Starting update.") - } - - # To prevent an endless loop: Check if an upgrade is required. - if ((Get-SPDSCInstalledProductVersion).FileMajorPart -eq 15) - { - $wssRegKey ="hklm:SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\15.0\WSS" - } - else - { - $wssRegKey ="hklm:SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\16.0\WSS" - } - - Write-Verbose -Message "Writing install config file" - - $configPath = "$env:temp\SPInstallLanguagePackConfig.xml" - - $configData = " - - - - -" - - $configData | Out-File -FilePath $configPath - - Write-Verbose -Message "Beginning installation of the SharePoint Language Pack" - - $setupExe = Join-Path -Path $BinaryDir -ChildPath "setup.exe" - - $setup = Start-Process -FilePath $setupExe ` - -ArgumentList "/config `"$configPath`"" ` - -Wait ` - -PassThru - - switch ($setup.ExitCode) - { - 0 { - Write-Verbose -Message "SharePoint Language Pack binary installation complete" - } - 17022 { - Write-Verbose -Message "SharePoint Language Pack binary installation complete. Reboot required." - $global:DSCMachineStatus = 1 - } - Default { - throw "SharePoint Language Pack install failed, exit code was $($setup.ExitCode)" - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $BinaryDir, - - [parameter(Mandatory = $false)] - [ValidateSet("mon","tue","wed","thu","fri","sat","sun")] - [System.String[]] - $BinaryInstallDays, - - [parameter(Mandatory = $false)] - [System.String] - $BinaryInstallTime, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing install status of SharePoint Language Pack" - - $PSBoundParameters.Ensure = $Ensure - - if ($Ensure -eq "Absent") - { - throw [Exception] ("SharePointDsc does not support uninstalling SharePoint " + ` - "Language Packs. Please remove this manually.") - return - } - - $CurrentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/MSFT_SPInstallLanguagePack.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/MSFT_SPInstallLanguagePack.schema.mof deleted file mode 100644 index aa9bdac4..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/MSFT_SPInstallLanguagePack.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPInstallLanguagePack")] -class MSFT_SPInstallLanguagePack : OMI_BaseResource -{ - [Key, Description("The directory that contains all of the SharePoint binaries")] String BinaryDir; - [Write, Description("Specify on which dates the installation is allowed"), ValueMap{"mon","tue","wed","thu","fri","sat","sun"}, Values{"mon","tue","wed","thu","fri","sat","sun"}] String BinaryInstallDays[]; - [Write, Description("Specify in which time frame the installation is allowed")] String BinaryInstallTime; - [Write, Description("Present to install SharePoint. Absent is currently not supported"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/MSFT_SPInstallPrereqs.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/MSFT_SPInstallPrereqs.psm1 deleted file mode 100644 index 06fc9c42..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/MSFT_SPInstallPrereqs.psm1 +++ /dev/null @@ -1,776 +0,0 @@ -$Script:SP2013Features = @("Application-Server", "AS-NET-Framework", - "AS-TCP-Port-Sharing", "AS-Web-Support", "AS-WAS-Support", - "AS-HTTP-Activation", "AS-Named-Pipes", "AS-TCP-Activation","Web-Server", - "Web-WebServer", "Web-Common-Http", "Web-Default-Doc", "Web-Dir-Browsing", - "Web-Http-Errors", "Web-Static-Content", "Web-Http-Redirect", "Web-Health", - "Web-Http-Logging", "Web-Log-Libraries", "Web-Request-Monitor", - "Web-Http-Tracing", "Web-Performance", "Web-Stat-Compression", - "Web-Dyn-Compression", "Web-Security", "Web-Filtering", "Web-Basic-Auth", - "Web-Client-Auth", "Web-Digest-Auth", "Web-Cert-Auth", "Web-IP-Security", - "Web-Url-Auth", "Web-Windows-Auth", "Web-App-Dev", "Web-Net-Ext", - "Web-Net-Ext45", "Web-Asp-Net", "Web-Asp-Net45", "Web-ISAPI-Ext", - "Web-ISAPI-Filter", "Web-Mgmt-Tools", "Web-Mgmt-Console", "Web-Mgmt-Compat", - "Web-Metabase", "Web-Lgcy-Scripting", "Web-WMI", "Web-Scripting-Tools", - "NET-Framework-Features", "NET-Framework-Core", "NET-Framework-45-ASPNET", - "NET-WCF-HTTP-Activation45", "NET-WCF-Pipe-Activation45", - "NET-WCF-TCP-Activation45", "Server-Media-Foundation", - "Windows-Identity-Foundation", "PowerShell-V2", "WAS", "WAS-Process-Model", - "WAS-NET-Environment", "WAS-Config-APIs", "XPS-Viewer") - -$Script:SP2016Win16Features = @("Web-Server", "Web-WebServer", - "Web-Common-Http", "Web-Default-Doc", "Web-Dir-Browsing", - "Web-Http-Errors", "Web-Static-Content", "Web-Health", - "Web-Http-Logging", "Web-Log-Libraries", "Web-Request-Monitor", - "Web-Http-Tracing", "Web-Performance", "Web-Stat-Compression", - "Web-Dyn-Compression", "Web-Security", "Web-Filering", "Web-Basic-Auth", - "Web-Digest-Auth", "Web-Windows-Auth", "Web-App-Dev", "Web-Net-Ext", - "Web-Net-Ext45Web-Asp-Net", "Web-Asp-Net45", "Web-ISAPI-Ext", - "Web-ISAPI-Filter", "Web-Mgmt-Tools", "Web-Mgmt-Console", - "Web-Mgmt-Compat", "Web-Metabase", "Web-Lgcy-Scripting", "Web-WMI", - "NET-Framework-Features", "NET-HTTP-Activation", "NET-Non-HTTP-Activ", - "NET-Framework-45-ASPNET", "NET-WCF-Pipe-Activation45", - "Windows-Identity-Foundation", "WAS", "WAS-Process-Model", - "WAS-NET-Environment", "WAS-Config-APIs", "XPS-Viewer") - -$Script:SP2016Win12r2Features = @("Application-Server", "AS-NET-Framework", - "AS-Web-Support", "Web-Server", "Web-WebServer", "Web-Common-Http", - "Web-Default-Doc", "Web-Dir-Browsing", "Web-Http-Errors", - "Web-Static-Content", "Web-Http-Redirect", "Web-Health", - "Web-Http-Logging", "Web-Log-Libraries", "Web-Request-Monitor", - "Web-Performance", "Web-Stat-Compression", "Web-Dyn-Compression", - "Web-Security", "Web-Filtering", "Web-Basic-Auth", "Web-Client-Auth", - "Web-Digest-Auth", "Web-Cert-Auth", "Web-IP-Security", "Web-Url-Auth", - "Web-Windows-Auth", "Web-App-Dev", "Web-Net-Ext", "Web-Net-Ext45", - "Web-Asp-Net45", "Web-ISAPI-Ext", "Web-ISAPI-Filter", "Web-Mgmt-Tools", - "Web-Mgmt-Console", "Web-Mgmt-Compat", "Web-Metabase", - "Web-Lgcy-Mgmt-Console", "Web-Lgcy-Scripting", "Web-WMI", - "Web-Scripting-Tools", "NET-Framework-Features", "NET-Framework-Core", - "NET-HTTP-Activation", "NET-Non-HTTP-Activ", "NET-Framework-45-ASPNET", - "NET-WCF-HTTP-Activation45", "Windows-Identity-Foundation", - "PowerShell-V2", "WAS", "WAS-Process-Model", "WAS-NET-Environment", - "WAS-Config-APIs") - - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $InstallerPath, - - [parameter(Mandatory = $true)] - [System.Boolean] - $OnlineMode, - - [parameter(Mandatory = $false)] - [System.String] - $SXSpath, - - [parameter(Mandatory = $false)] - [System.String] - $SQLNCli, - - [parameter(Mandatory = $false)] - [System.String] - $PowerShell, - - [parameter(Mandatory = $false)] - [System.String] - $NETFX, - - [parameter(Mandatory = $false)] - [System.String] - $IDFX, - - [parameter(Mandatory = $false)] - [System.String] - $Sync, - - [parameter(Mandatory = $false)] - [System.String] - $AppFabric, - - [parameter(Mandatory = $false)] - [System.String] - $IDFX11, - - [parameter(Mandatory = $false)] - [System.String] - $MSIPCClient, - - [parameter(Mandatory = $false)] - [System.String] - $WCFDataServices, - - [parameter(Mandatory = $false)] - [System.String] - $KB2671763, - - [parameter(Mandatory = $false)] - [System.String] - $WCFDataServices56, - - [parameter(Mandatory = $false)] - [System.String] - $MSVCRT11, - - [parameter(Mandatory = $false)] - [System.String] - $MSVCRT14, - - [parameter(Mandatory = $false)] - [System.String] - $KB3092423, - - [parameter(Mandatory = $false)] - [System.String] - $ODBC, - - [parameter(Mandatory = $false)] - [System.String] - $DotNetFx, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present" - ) - - Write-Verbose -Message "Getting installation status of SharePoint prerequisites" - - $majorVersion = (Get-SPDSCAssemblyVersion -PathToAssembly $InstallerPath) - if ($majorVersion -eq 15) - { - Write-Verbose -Message "Version: SharePoint 2013" - } - if ($majorVersion -eq 16) - { - Write-Verbose -Message "Version: SharePoint 2016" - } - - Write-Verbose -Message "Getting installed windows features" - - $osVersion = Get-SPDscOSVersion - if ($majorVersion -eq 15) - { - $WindowsFeatures = Get-WindowsFeature -Name $Script:SP2013Features - } - if ($majorVersion -eq 16) - { - if ($osVersion.Major -eq 10) - { - # Server 2016 - $WindowsFeatures = Get-WindowsFeature -Name $Script:SP2016Win16Features - } - elseif ($osVersion.Major -eq 6 -and $osVersion.Minor -eq 3) - { - # Server 2012 R2 - $WindowsFeatures = Get-WindowsFeature -Name $Script:SP2016Win12r2Features - } - else - { - throw "SharePoint 2016 only supports Windows Server 2016 or 2012 R2" - } - } - - $windowsFeaturesInstalled = $true - foreach ($feature in $WindowsFeatures) - { - if ($feature.Installed -eq $false) - { - $windowsFeaturesInstalled = $false - Write-Verbose -Message "Windows feature $($feature.Name) is not installed" - } - } - - Write-Verbose -Message "Checking windows packages from the registry" - - $x86Path = "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*" - $installedItemsX86 = Get-ItemProperty -Path $x86Path | Select-Object -Property DisplayName - - $x64Path = "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*" - $installedItemsX64 = Get-ItemProperty -Path $x64Path | Select-Object -Property DisplayName - - $installedItems = $installedItemsX86 + $installedItemsX64 | Select-Object -Property DisplayName -Unique - - # Common prereqs - $prereqsToTest = @( - [PSObject]@{ - Name = "AppFabric 1.1 for Windows Server" - SearchType = "Equals" - SearchValue = "AppFabric 1.1 for Windows Server" - }, - [PSObject]@{ - Name = "Microsoft CCR and DSS Runtime 2008 R3" - SearchType = "Equals" - SearchValue = "Microsoft CCR and DSS Runtime 2008 R3" - }, - [PSObject]@{ - Name = "Microsoft Identity Extensions" - SearchType = "Equals" - SearchValue = "Microsoft Identity Extensions" - }, - [PSObject]@{ - Name = "Microsoft Sync Framework Runtime v1.0 SP1 (x64)" - SearchType = "Equals" - SearchValue = "Microsoft Sync Framework Runtime v1.0 SP1 (x64)" - }, - [PSObject]@{ - Name = "WCF Data Services 5.6.0 Runtime" - SearchType = "Equals" - SearchValue = "WCF Data Services 5.6.0 Runtime" - } - ) - - #SP2013 prereqs - if ($majorVersion -eq 15) - { - $prereqsToTest += @( - [PSObject]@{ - Name = "Active Directory Rights Management Services Client 2.*" - SearchType = "Like" - SearchValue = "Active Directory Rights Management Services Client 2.*" - }, - [PSObject]@{ - Name = "Microsoft SQL Server Native Client (2008 R2 or 2012)" - SearchType = "Match" - SearchValue = "SQL Server (2008 R2|2012) Native Client" - }, - [PSObject]@{ - Name = "WCF Data Services 5.0 (for OData v3) Primary Components" - SearchType = "Equals" - SearchValue = "WCF Data Services 5.0 (for OData v3) Primary Components" - } - ) - } - - #SP2016 prereqs - if ($majorVersion -eq 16) - { - $prereqsToTest += @( - [PSObject]@{ - Name = "Active Directory Rights Management Services Client 2.1" - SearchType = "Equals" - SearchValue = "Active Directory Rights Management Services Client 2.1" - }, - [PSObject]@{ - Name = "Microsoft SQL Server 2012 Native Client" - SearchType = "Equals" - SearchValue = "Microsoft SQL Server 2012 Native Client" - }, - [PSObject]@{ - Name = "Microsoft ODBC Driver 11 for SQL Server" - SearchType = "Equals" - SearchValue = "Microsoft ODBC Driver 11 for SQL Server" - }, - [PSObject]@{ - Name = "Microsoft Visual C++ 2012 x64 Minimum Runtime - 11.0" - SearchType = "Like" - SearchValue = "Microsoft Visual C++ 2012 x64 Minimum Runtime - 11.0.*" - }, - [PSObject]@{ - Name = "Microsoft Visual C++ 2012 x64 Additional Runtime - 11.0" - SearchType = "Like" - SearchValue = "Microsoft Visual C++ 2012 x64 Additional Runtime - 11.0.*" - }, - [PSObject]@{ - Name = "Microsoft Visual C++ 2015 x64 Minimum Runtime - 14.0" - SearchType = "Like" - SearchValue = "Microsoft Visual C++ 2015 x64 Minimum Runtime - 14.0.*" - }, - [PSObject]@{ - Name = "Microsoft Visual C++ 2015 x64 Additional Runtime - 14.0" - SearchType = "Like" - SearchValue = "Microsoft Visual C++ 2015 x64 Additional Runtime - 14.0.*" - } - ) - } - $prereqsInstalled = Test-SPDscPrereqInstallStatus -InstalledItems $installedItems ` - -PrereqsToCheck $prereqsToTest - - $results = @{ - InstallerPath = $InstallerPath - OnlineMode = $OnlineMode - SXSpath = $SXSpath - SQLNCli = $SQLNCli - PowerShell = $PowerShell - NETFX = $NETFX - IDFX = $IDFX - Sync = $Sync - AppFabric = $AppFabric - IDFX11 = $IDFX11 - MSIPCClient = $MSIPCClient - WCFDataServices = $WCFDataServices - KB2671763 = $KB2671763 - WCFDataServices56 = $WCFDataServices56 - MSVCRT11 = $MSVCRT11 - MSVCRT14 = $MSVCRT14 - KB3092423 = $KB3092423 - ODBC = $ODBC - DotNetFx = $DotNetFx - } - - if ($prereqsInstalled -eq $true -and $windowsFeaturesInstalled -eq $true) - { - $results.Ensure = "Present" - } - else - { - $results.Ensure = "Absent" - } - - return $results -} - -function Set-TargetResource -{ - # Supressing the global variable use to allow passing DSC the reboot message - [CmdletBinding()] - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidGlobalVars", "")] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $InstallerPath, - - [parameter(Mandatory = $true)] - [System.Boolean] - $OnlineMode, - - [parameter(Mandatory = $false)] - [System.String] - $SXSpath, - - [parameter(Mandatory = $false)] - [System.String] - $SQLNCli, - - [parameter(Mandatory = $false)] - [System.String] - $PowerShell, - - [parameter(Mandatory = $false)] - [System.String] - $NETFX, - - [parameter(Mandatory = $false)] - [System.String] - $IDFX, - - [parameter(Mandatory = $false)] - [System.String] - $Sync, - - [parameter(Mandatory = $false)] - [System.String] - $AppFabric, - - [parameter(Mandatory = $false)] - [System.String] - $IDFX11, - - [parameter(Mandatory = $false)] - [System.String] - $MSIPCClient, - - [parameter(Mandatory = $false)] - [System.String] - $WCFDataServices, - - [parameter(Mandatory = $false)] - [System.String] - $KB2671763, - - [parameter(Mandatory = $false)] - [System.String] - $WCFDataServices56, - - [parameter(Mandatory = $false)] - [System.String] - $MSVCRT11, - - [parameter(Mandatory = $false)] - [System.String] - $MSVCRT14, - - [parameter(Mandatory = $false)] - [System.String] - $KB3092423, - - [parameter(Mandatory = $false)] - [System.String] - $ODBC, - - [parameter(Mandatory = $false)] - [System.String] - $DotNetFx, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present" - ) - - Write-Verbose -Message "Setting installation status of SharePoint prerequisites" - - if ($Ensure -eq "Absent") - { - throw [Exception] ("SharePointDsc does not support uninstalling SharePoint or its " + ` - "prerequisites. Please remove this manually.") - return - } - - Write-Verbose -Message "Detecting SharePoint version from binaries" - $majorVersion = Get-SPDSCAssemblyVersion -PathToAssembly $InstallerPath - $osVersion = Get-SPDscOSVersion - - if ($majorVersion -eq 15) - { - $BinaryDir = Split-Path -Path $InstallerPath - $svrsetupDll = Join-Path -Path $BinaryDir -ChildPath "updates\svrsetup.dll" - $checkDotNet = $true - if (Test-Path -Path $svrsetupDll) - { - $svrsetupDllFileInfo = Get-ItemProperty -Path $svrsetupDll - $fileVersion = $svrsetupDllFileInfo.VersionInfo.FileVersion - if ($fileVersion -ge "15.0.4709.1000") - { - $checkDotNet = $false - } - } - - if ($checkDotNet -eq $true) - { - $ndpKey = "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4" - $dotNet46Installed = $false - if (Test-Path -Path $ndpKey) - { - $dotNetv4Keys = Get-ChildItem -Path $ndpKey - foreach ($dotnetInstance in $dotNetv4Keys) - { - if ($dotnetInstance.GetValue("Release") -ge 390000) - { - $dotNet46Installed = $true - break - } - } - } - - if ($dotNet46Installed -eq $true) - { - throw [Exception] ("A known issue prevents installation of SharePoint 2013 on " + ` - "servers that have .NET 4.6 already installed. See details " + ` - "at https://support.microsoft.com/en-us/kb/3087184") - return - } - } - - Write-Verbose -Message "Version: SharePoint 2013" - $requiredParams = @("SQLNCli","PowerShell","NETFX","IDFX","Sync","AppFabric","IDFX11", - "MSIPCClient","WCFDataServices","KB2671763","WCFDataServices56") - $WindowsFeatures = Get-WindowsFeature -Name $Script:SP2013Features - } - - if ($majorVersion -eq 16) - { - Write-Verbose -Message "Version: SharePoint 2016" - $requiredParams = @("SQLNCli","Sync","AppFabric","IDFX11","MSIPCClient","KB3092423", - "WCFDataServices56","DotNetFx","MSVCRT11","MSVCRT14","ODBC") - if ($osVersion.Major -eq 10) - { - # Server 2016 - $WindowsFeatures = Get-WindowsFeature -Name $Script:SP2016Win16Features - } - elseif ($osVersion.Major -eq 6 -and $osVersion.Minor -eq 3) - { - # Server 2012 R2 - $WindowsFeatures = Get-WindowsFeature -Name $Script:SP2016Win12r2Features - } - else - { - throw "SharePoint 2016 only supports Windows Server 2016 or 2012 R2" - } - } - - # SXSstore for feature install specified, we will manually install features from the - # store, rather then relying on the prereq installer to download them - if ($SXSpath) { - Write-Verbose -Message "Getting installed windows features" - foreach ($feature in $WindowsFeatures) - { - if ($feature.Installed -ne $true) - { - Write-Verbose "Installing $($feature.name)" - $installResult = Install-WindowsFeature -Name $feature.Name -Source $SXSpath - if ($installResult.restartneeded -eq "yes") - { - $global:DSCMachineStatus = 1 - } - if ($installResult.Success -ne $true) - { - throw "Error installing $($feature.name)" - } - } - } - - # see if we need to reboot after feature install - if ($global:DSCMachineStatus -eq 1) - { - return - } - } - - $prereqArgs = "/unattended" - if ($OnlineMode -eq $false) - { - $requiredParams | ForEach-Object -Process { - if (($PSBoundParameters.ContainsKey($_) -eq $true ` - -and [string]::IsNullOrEmpty($PSBoundParameters.$_)) ` - -or (-not $PSBoundParameters.ContainsKey($_))) - { - throw "In offline mode for version $majorVersion parameter $_ is required" - } - if ((Test-Path $PSBoundParameters.$_) -eq $false) - { - throw ("The $_ parameter has been passed but the file cannot be found at the " + ` - "path supplied: `"$($PSBoundParameters.$_)`"") - } - } - $requiredParams | ForEach-Object -Process { - $prereqArgs += " /$_`:`"$($PSBoundParameters.$_)`"" - } - } - - Write-Verbose -Message "Calling the SharePoint Pre-req installer" - Write-Verbose -Message "Args for prereq installer are: $prereqArgs" - $process = Start-Process -FilePath $InstallerPath -ArgumentList $prereqArgs -Wait -PassThru - - switch ($process.ExitCode) - { - 0 - { - Write-Verbose -Message "Prerequisite installer completed successfully." - } - 1 - { - throw "Another instance of the prerequisite installer is already running" - } - 2 - { - throw "Invalid command line parameters passed to the prerequisite installer" - } - 1001 - { - Write-Verbose -Message ("A pending restart is blocking the prerequisite " + ` - "installer from running. Scheduling a reboot.") - $global:DSCMachineStatus = 1 - } - 3010 - { - Write-Verbose -Message ("The prerequisite installer has run correctly and needs " + ` - "to reboot the machine before continuing.") - $global:DSCMachineStatus = 1 - } - default - { - throw ("The prerequisite installer ran with the following unknown " + ` - "exit code $($process.ExitCode)") - } - } - - $rebootKey1 = "HKLM:\Software\Microsoft\Windows\CurrentVersion\" + ` - "Component Based Servicing\RebootPending" - $rebootTest1 = Get-Item -Path $rebootKey1 -ErrorAction SilentlyContinue - - $rebootKey2 = "HKLM:\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\" + ` - "Auto Update\RebootRequired" - $rebootTest2 = Get-Item -Path $rebootKey2 -ErrorAction SilentlyContinue - - $sessionManagerKey = "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager" - $sessionManager = Get-Item -Path $sessionManagerKey | Get-ItemProperty - $pendingFileRenames = $sessionManager.PendingFileRenameOperations.Count - - if (($null -ne $rebootTest1) -or ($null -ne $rebootTest2) -or ($pendingFileRenames -gt 0)) - { - Write-Verbose -Message ("SPInstallPrereqs has detected the server has pending a " + ` - "reboot. Flagging to the DSC engine that the server should " + ` - "reboot before continuing.") - $global:DSCMachineStatus = 1 - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $InstallerPath, - - [parameter(Mandatory = $true)] - [System.Boolean] - $OnlineMode, - - [parameter(Mandatory = $false)] - [System.String] - $SXSpath, - - [parameter(Mandatory = $false)] - [System.String] - $SQLNCli, - - [parameter(Mandatory = $false)] - [System.String] - $PowerShell, - - [parameter(Mandatory = $false)] - [System.String] - $NETFX, - - [parameter(Mandatory = $false)] - [System.String] - $IDFX, - - [parameter(Mandatory = $false)] - [System.String] - $Sync, - - [parameter(Mandatory = $false)] - [System.String] - $AppFabric, - - [parameter(Mandatory = $false)] - [System.String] - $IDFX11, - - [parameter(Mandatory = $false)] - [System.String] - $MSIPCClient, - - [parameter(Mandatory = $false)] - [System.String] - $WCFDataServices, - - [parameter(Mandatory = $false)] - [System.String] - $KB2671763, - - [parameter(Mandatory = $false)] - [System.String] - $WCFDataServices56, - - [parameter(Mandatory = $false)] - [System.String] - $MSVCRT11, - - [parameter(Mandatory = $false)] - [System.String] - $MSVCRT14, - - [parameter(Mandatory = $false)] - [System.String] - $KB3092423, - - [parameter(Mandatory = $false)] - [System.String] - $ODBC, - - [parameter(Mandatory = $false)] - [System.String] - $DotNetFx, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present" - ) - - Write-Verbose -Message "Testing installation status of SharePoint prerequisites" - - $PSBoundParameters.Ensure = $Ensure - - if ($Ensure -eq "Absent") - { - throw [Exception] ("SharePointDsc does not support uninstalling SharePoint or its " + ` - "prerequisites. Please remove this manually.") - return - } - - $CurrentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters -ValuesToCheck @("Ensure") -} - -function Test-SPDscPrereqInstallStatus -{ - param - ( - [Parameter(Mandatory = $false)] - [Object] - $InstalledItems, - - [Parameter(Mandatory = $true)] - [psobject[]] - $PrereqsToCheck - ) - - if ($null -eq $InstalledItems) { - return $false - } - - $itemsInstalled = $true - $PrereqsToCheck | ForEach-Object -Process { - $itemToCheck = $_ - switch ($itemToCheck.SearchType) - { - "Equals" - { - if ($null -eq ($InstalledItems | Where-Object -FilterScript { - $null -ne $_.DisplayName -and $_.DisplayName.Trim() -eq $itemToCheck.SearchValue - })) - { - $itemsInstalled = $false - Write-Verbose -Message ("Prerequisite $($itemToCheck.Name) was not found " + ` - "on this system") - } - } - "Match" - { - if ($null -eq ($InstalledItems | Where-Object -FilterScript { - $null -ne $_.DisplayName -and $_.DisplayName.Trim() -match $itemToCheck.SearchValue - })) - { - $itemsInstalled = $false - Write-Verbose -Message ("Prerequisite $($itemToCheck.Name) was not found " + ` - "on this system") - } - } - "Like" - { - if ($null -eq ($InstalledItems | Where-Object -FilterScript { - $null -ne $_.DisplayName -and $_.DisplayName.Trim() -like $itemToCheck.SearchValue - })) - { - $itemsInstalled = $false - Write-Verbose -Message ("Prerequisite $($itemToCheck.Name) was not found " + ` - "on this system") - } - } - Default - { - throw ("Unable to search for a prereq with mode '$($itemToCheck.SearchType)'. " + ` - "please use either 'Equals', 'Like' or 'Match'") - } - } - } - return $itemsInstalled -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/MSFT_SPInstallPrereqs.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/MSFT_SPInstallPrereqs.schema.mof deleted file mode 100644 index fe94c744..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/MSFT_SPInstallPrereqs.schema.mof +++ /dev/null @@ -1,24 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPInstallPrereqs")] -class MSFT_SPInstallPrereqs : OMI_BaseResource -{ - [Key, Description("The full path to prerequisiteinstaller.exe")] String InstallerPath; - [Required, Description("Should the installer download prerequisites from the internet or not")] Boolean OnlineMode; - [Write, Description("The path to the Windows Server Operating System SXS source files, for use in closed environments without access to Windows Update")] String SXSpath; - [Write, Description("The path to the installer for this prerequisite")] String SQLNCli; - [Write, Description("The path to the installer for this prerequisite")] String PowerShell; - [Write, Description("The path to the installer for this prerequisite")] String NETFX; - [Write, Description("The path to the installer for this prerequisite")] String IDFX; - [Write, Description("The path to the installer for this prerequisite")] String Sync; - [Write, Description("The path to the installer for this prerequisite")] String AppFabric; - [Write, Description("The path to the installer for this prerequisite")] String IDFX11; - [Write, Description("The path to the installer for this prerequisite")] String MSIPCClient; - [Write, Description("The path to the installer for this prerequisite")] String WCFDataServices; - [Write, Description("The path to the installer for this prerequisite")] String KB2671763; - [Write, Description("The path to the installer for this prerequisite")] String WCFDataServices56; - [Write, Description("The path to the installer for this prerequisite")] String MSVCRT11; - [Write, Description("The path to the installer for this prerequisite")] String MSVCRT14; - [Write, Description("The path to the installer for this prerequisite")] String KB3092423; - [Write, Description("The path to the installer for this prerequisite")] String ODBC; - [Write, Description("The path to the installer for this prerequisite")] String DotNetFx; - [Write, Description("Present to install the prerequisites. Absent is currently not supported"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPIrmSettings/MSFT_SPIrmSettings.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPIrmSettings/MSFT_SPIrmSettings.psm1 deleted file mode 100644 index 80d6a678..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPIrmSettings/MSFT_SPIrmSettings.psm1 +++ /dev/null @@ -1,178 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - [ValidateSet("Present","Absent")] - $Ensure, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UseADRMS, - - [parameter(Mandatory = $false)] - [System.String] - $RMSserver, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose "Getting SharePoint IRM Settings" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - try - { - $spFarm = Get-SPFarm - } - catch - { - Write-Verbose -Message ("No local SharePoint farm was detected. IRM settings " + ` - "will not be applied") - return @{ - Ensure = "Absent" - UseADRMS = $UseADRMS - RMSserver = $RMSserver - } - } - - # Get a reference to the Administration WebService - $admService = Get-SPDSCContentService - - if ($admService.IrmSettings.IrmRMSEnabled) - { - $Ensure = "Present" - } - else - { - $Ensure = "Absent" - } - - return @{ - Ensure = $Ensure - UseADRMS = $admService.IrmSettings.IrmRMSUseAD - RMSserver = $admService.IrmSettings.IrmRMSCertServer - } - } - return $Result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - [ValidateSet("Present","Absent")] - $Ensure, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UseADRMS, - - [parameter(Mandatory = $false)] - [System.String] - $RMSserver, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose "Setting SharePoint IRM Settings" - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - try - { - $spFarm = Get-SPFarm - } - catch - { - throw "No local SharePoint farm was detected. IRM settings will not be applied" - return - } - - $admService = Get-SPDSCContentService - - if ($params.UseADRMS -and ($null -ne $params.RMSserver)) - { - throw "Cannot specify both an RMSserver and set UseADRMS to True" - } - - if ($params.UseADRMS -ne $true) - { - $params.UseADRMS = $false - } - - if ($params.Ensure -eq "Present") - { - $admService.IrmSettings.IrmRMSEnabled = $true - $admService.IrmSettings.IrmRMSUseAD = $params.UseADRMS - $admService.IrmSettings.IrmRMSCertServer = $params.RMSserver - } - else - { - $admService.IrmSettings.IrmRMSEnabled = $false - $admService.IrmSettings.IrmRMSUseAD = $false - $admService.IrmSettings.IrmRMSCertServer = $null - } - $admService.Update() - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - [ValidateSet("Present","Absent")] - $Ensure, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UseADRMS, - - [parameter(Mandatory = $false)] - [System.String] - $RMSserver, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose "Testing SharePoint IRM settings" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($null -eq $CurrentValues) - { - return $false - } - - if ($UseADRMS -ne $true) - { - $PSBoundParameters.UseADRMS = $false - } - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPIrmSettings/MSFT_SPIrmSettings.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPIrmSettings/MSFT_SPIrmSettings.schema.mof deleted file mode 100644 index 658713eb..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPIrmSettings/MSFT_SPIrmSettings.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPIrmSettings")] -class MSFT_SPIrmSettings : OMI_BaseResource -{ - [Key, Description("Enable or Disable IRM on this farm"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("Use the RMS server published in this farm's Active Directory")] Boolean UseADRMS; - [Write, Description("Use the specified RMS server, must provide in URL format")] String RMSserver; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPJoinFarm/MSFT_SPJoinFarm.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPJoinFarm/MSFT_SPJoinFarm.psm1 deleted file mode 100644 index 75ce0fda..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPJoinFarm/MSFT_SPJoinFarm.psm1 +++ /dev/null @@ -1,332 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $FarmConfigDatabaseName, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $Passphrase, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $false)] - [System.String] - [ValidateSet("Application", - "ApplicationWithSearch", - "Custom", - "DistributedCache", - "Search", - "SingleServer", - "SingleServerFarm", - "WebFrontEnd", - "WebFrontEndWithDistributedCache")] - $ServerRole - ) - - Write-Verbose -Message ("WARNING! SPCreateFarm is deprecated and will be removed in " + ` - "SharePointDsc v2.0. Swap to use the new SPFarm resource as " + ` - "an alternative. See http://aka.ms/SPDsc-SPFarm for details.") - - Write-Verbose -Message "Getting local farm presence" - - if (($PSBoundParameters.ContainsKey("ServerRole") -eq $true) ` - -and (Get-SPDSCInstalledProductVersion).FileMajorPart -ne 16) - { - throw [Exception] "Server role is only supported in SharePoint 2016." - } - - if (($PSBoundParameters.ContainsKey("ServerRole") -eq $true) ` - -and (Get-SPDSCInstalledProductVersion).FileMajorPart -eq 16 ` - -and (Get-SPDSCInstalledProductVersion).FileBuildPart -lt 4456 ` - -and ($ServerRole -eq "ApplicationWithSearch" ` - -or $ServerRole -eq "WebFrontEndWithDistributedCache")) - { - throw [Exception] ("ServerRole values of 'ApplicationWithSearch' or " + ` - "'WebFrontEndWithDistributedCache' require the SharePoint 2016 " + ` - "Feature Pack 1 to be installed. See " + ` - "https://support.microsoft.com/en-au/kb/3127940") - } - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $getSPMajorVersion = (Get-SPDSCInstalledProductVersion).FileMajorPart - $cfgDbRegKey = "hklm:SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\$getSPMajorVersion.0\Secure\ConfigDB" - try - { - $configDbDsn = Get-SPDSCRegistryKey -Key $cfgDbRegKey -Value "dsn" - } - catch - { - Write-Verbose -Message "SharePoint registry key cannot be found." - } - $serverIsJoined = $true - - if ($null -eq $configDbDsn) - { - $serverIsJoined = $false - } - elseif (-NOT($configDbDsn.Contains($params.FarmConfigDatabaseName))) - { - $serverIsJoined = $false - } - - try - { - $spFarm = Get-SPFarm - } - catch - { - Write-Verbose -Message "Unable to detect local farm." - if ($serverIsJoined) - { - throw 'Server already joined to farm but SPFarm not reachable' - } - } - - if ($null -eq $spFarm) - { - return @{ - FarmConfigDatabaseName = "" - DatabaseServer = "" - InstallAccount = "" - Passphrase = "" - } - } - - $configDb = Get-SPDatabase | Where-Object -FilterScript { - $_.Name -eq $spFarm.Name -and $_.Type -eq "Configuration Database" - } - - return @{ - FarmConfigDatabaseName = $spFarm.Name - DatabaseServer = $configDb.Server.Name - InstallAccount = $params.InstallAccount - Passphrase = $params.Passphrase.password - } - } - return $result -} - -function Set-TargetResource -{ - # Supressing the global variable use to allow passing DSC the reboot message - [CmdletBinding()] - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidGlobalVars", "")] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $FarmConfigDatabaseName, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $Passphrase, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $false)] - [System.String] - [ValidateSet("Application", - "ApplicationWithSearch", - "Custom", - "DistributedCache", - "Search", - "SingleServer", - "SingleServerFarm", - "WebFrontEnd", - "WebFrontEndWithDistributedCache")] - $ServerRole - ) - - Write-Verbose -Message ("WARNING! SPCreateFarm is deprecated and will be removed in " + ` - "SharePointDsc v2.0. Swap to use the new SPFarm resource as " + ` - "an alternative. See http://aka.ms/SPDsc-SPFarm for details.") - - Write-Verbose -Message "Setting local farm" - - if (($PSBoundParameters.ContainsKey("ServerRole") -eq $true) ` - -and (Get-SPDSCInstalledProductVersion).FileMajorPart -ne 16) - { - throw [Exception] "Server role is only supported in SharePoint 2016." - } - - if (($PSBoundParameters.ContainsKey("ServerRole") -eq $true) ` - -and (Get-SPDSCInstalledProductVersion).FileMajorPart -eq 16 ` - -and (Get-SPDSCInstalledProductVersion).FileBuildPart -lt 4456 ` - -and ($ServerRole -eq "ApplicationWithSearch" ` - -or $ServerRole -eq "WebFrontEndWithDistributedCache")) - { - throw [Exception] ("ServerRole values of 'ApplicationWithSearch' or " + ` - "'WebFrontEndWithDistributedCache' require the SharePoint 2016 " + ` - "Feature Pack 1 to be installed. See " + ` - "https://support.microsoft.com/en-au/kb/3127940") - } - - $CurrentValues = Get-TargetResource @PSBoundParameters - if ([string]::IsNullOrEmpty($CurrentValues.FarmConfigDatabaseName) -eq $false) - { - throw ("This server is already connected to a farm " + ` - "($($CurrentValues.FarmConfigDatabaseName)). Please manually remove it " + ` - "to apply this change.") - } - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters, $PSScriptRoot) ` - -ScriptBlock { - - $params = $args[0] - $scriptRoot = $args[1] - - $modulePath = "..\..\Modules\SharePointDsc.Farm\SPFarm.psm1" - Import-Module -Name (Join-Path -Path $scriptRoot -ChildPath $modulePath -Resolve) - $dbStatus = Get-SPDSCConfigDBStatus -SQLServer $params.DatabaseServer ` - -Database $params.FarmConfigDatabaseName - - while ($dbStatus.Locked -eq $true) - { - Write-Verbose -Message ("[$([DateTime]::Now.ToShortTimeString())] The configuration " + ` - "database is currently being provisioned by a remote " + ` - "server, this server will wait for this to complete") - Start-Sleep -Seconds 30 - $dbStatus = Get-SPDSCConfigDBStatus -SQLServer $params.DatabaseServer ` - -Database $params.FarmConfigDatabaseName - } - - if ($dbStatus.ValidPermissions -eq $false) - { - throw "The current user does not have sufficient permissions to SQL Server" - return - } - - try { - $joinFarmArgs = @{ - DatabaseServer = $params.DatabaseServer - DatabaseName = $params.FarmConfigDatabaseName - Passphrase = $params.Passphrase.password - SkipRegisterAsDistributedCacheHost = $true - } - - switch((Get-SPDSCInstalledProductVersion).FileMajorPart) { - 15 { - Write-Verbose -Message "Detected Version: SharePoint 2013" - } - 16 { - if ($params.ContainsKey("ServerRole") -eq $true) { - Write-Verbose -Message ("Detected Version: SharePoint 2016 - " + ` - "configuring server as $($params.ServerRole)") - $joinFarmArgs.Add("LocalServerRole", $params.ServerRole) - } else { - Write-Verbose -Message ("Detected Version: SharePoint 2016 - no server " + ` - "role provided, configuring server without a " + ` - "specific role") - } - } - Default { - throw [Exception] ("An unknown version of SharePoint (Major version $_) " + ` - "was detected. Only versions 15 (SharePoint 2013) or " + ` - "16 (SharePoint 2016) are supported.") - } - } - - Connect-SPConfigurationDatabase @joinFarmArgs - Install-SPHelpCollection -All - Initialize-SPResourceSecurity - Install-SPService - Install-SPFeature -AllExistingFeatures -Force | out-null - Install-SPApplicationContent - } - catch [System.Exception] { - return $_ - } - } - - if ($null -ne $result) - { - Write-Verbose -Message "An error occured joining the farm" - throw $_ - } - - Write-Verbose -Message "Starting timer service" - Start-Service -Name sptimerv4 - - Write-Verbose -Message ("Pausing for 5 minutes to allow the timer service to " + ` - "fully provision the server") - Start-Sleep -Seconds 300 - Write-Verbose -Message ("Join farm complete. Restarting computer to allow " + ` - "configuration to continue") - - $global:DSCMachineStatus = 1 -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $FarmConfigDatabaseName, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $Passphrase, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $false)] - [System.String] - [ValidateSet("Application", - "ApplicationWithSearch", - "Custom", - "DistributedCache", - "Search", - "SingleServer", - "SingleServerFarm", - "WebFrontEnd", - "WebFrontEndWithDistributedCache")] - $ServerRole - ) - - Write-Verbose -Message "Testing for local farm presence" - - if (($PSBoundParameters.ContainsKey("ServerRole") -eq $true) ` - -and (Get-SPDSCInstalledProductVersion).FileMajorPart -ne 16) - { - throw [Exception] "Server role is only supported in SharePoint 2016." - } - - $CurrentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("FarmConfigDatabaseName") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPJoinFarm/MSFT_SPJoinFarm.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPJoinFarm/MSFT_SPJoinFarm.schema.mof deleted file mode 100644 index 50203148..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPJoinFarm/MSFT_SPJoinFarm.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPJoinFarm")] -class MSFT_SPJoinFarm : OMI_BaseResource -{ - [Key, Description("The name of the config database to connect to")] string FarmConfigDatabaseName; - [Key, Description("The server that hosts the config database")] string DatabaseServer; - [Required, Description("The passphrase that should be used to join the farm") , EmbeddedInstance("MSFT_Credential")] string Passphrase; - [Write, Description("SharePoint 2016 only - the MinRole role to enroll this server as"), ValueMap{"Application","ApplicationWithSearch","Custom","DistributedCache","Search","SingleServer","SingleServerFarm","WebFrontEnd","WebFrontEndWithDistributedCache"}, Values{"Application","ApplicationWithSearch","Custom","DistributedCache","Search","SingleServer","SingleServerFarm","WebFrontEnd","WebFrontEndWithDistributedCache"}] string ServerRole; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/MSFT_SPMachineTranslationServiceApp.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/MSFT_SPMachineTranslationServiceApp.psm1 deleted file mode 100644 index a24ed5e9..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/MSFT_SPMachineTranslationServiceApp.psm1 +++ /dev/null @@ -1,209 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [System.Management.Automation.PSCredential] - $InstallAccount - ) - Write-Verbose -Message "Getting Machine Translation Service Application '$Name'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApps = Get-SPServiceApplication -Name $params.Name -ErrorAction SilentlyContinue - - $nullReturn = @{ - Name = $params.Name - DatabaseName = $params.DatabaseName - DatabaseServer = $params.DatabaseServer - ApplicationPool = $params.ApplicationPool - Ensure = "Absent" - } - - if($null -eq $serviceApps) - { - return $nullReturn - } - - $serviceApp = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.TranslationServices.TranslationServiceApplication" - } - - if($null -eq $serviceApp) - { - return $nullReturn - } - else { - return @{ - Name = $params.Name - DatabaseName = $($serviceApp.Database.Name) - DatabaseServer = $($serviceApp.Database.Server.Name) - ApplicationPool = $($serviceApp.ApplicationPool.Name) - Ensure = "Present" - } - } - - } - - return $result -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose "Setting Machine Translation Service Application." - $CurrentValues = Get-TargetResource @PSBoundParameters - - if($CurrentValues.Ensure -eq "Present" -and $Ensure -eq "Present") - { - Write-Verbose "Resetting Machine Translation Service Application." - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - $serviceApps = Get-SPServiceApplication -Identity $params.Name - - $serviceApp = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.TranslationServices.TranslationServiceApplication" - } - - $serviceApp | Set-SPTranslationServiceApplication -ApplicationPool $params.ApplicationPool ` - -DatabaseName $params.DatabaseName ` - -DatabaseServer $params.DatabaseServer - } - } - if($CurrentValues.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - Write-Verbose "Creating Machine Translation Service Application." - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - New-SPTranslationServiceApplication -Name $params.Name ` - -DatabaseName $params.DatabaseName ` - -DatabaseServer $params.DatabaseServer ` - -ApplicationPool $params.ApplicationPool - } - } - if($Ensure -eq "Absent") - { - Write-Verbose "Removing Machine Translation Service Application." - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApps = Get-SPServiceApplication -Identity $params.Name - $serviceApp = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.TranslationServices.TranslationServiceApplication" - } - $serviceApp | Remove-SPServiceApplication - - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose "Test Machine Translation Service Application." - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - $params = $PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Name","ApplicationPool", - "DatabaseName","DatabaseServer", - "Ensure") - -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/MSFT_SPMachineTranslationServiceApp.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/MSFT_SPMachineTranslationServiceApp.schema.mof deleted file mode 100644 index 35141dc8..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/MSFT_SPMachineTranslationServiceApp.schema.mof +++ /dev/null @@ -1,12 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("SPMachineTranslationServiceApp")] -class MSFT_SPMachineTranslationServiceApp : OMI_BaseResource -{ - [Key, Description("Specifies the name of the service application.")] String Name; - [Required, Description("Specifies the name of the database for the service application.")] String DatabaseName; - [Required, Description("Specifies the name of the database server for the service application.")] String DatabaseServer; - [Required, Description("Specifies the application pool to use with the service application.")] String ApplicationPool; - [Write, Description("Present ensures service app exists, absent ensures it is removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, EmbeddedInstance("MSFT_Credential"), Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedAccount/MSFT_SPManagedAccount.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedAccount/MSFT_SPManagedAccount.psm1 deleted file mode 100644 index 8c23da60..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedAccount/MSFT_SPManagedAccount.psm1 +++ /dev/null @@ -1,219 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $Account, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $false)] - [System.UInt32] - $EmailNotification, - - [parameter(Mandatory = $false)] - [System.UInt32] - $PreExpireDays, - - [parameter(Mandatory = $false)] - [System.String] - $Schedule, - - [parameter(Mandatory = $true)] - [System.String] - $AccountName - ) - - Write-Verbose -Message "Getting managed account $AccountName" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $ma = Get-SPManagedAccount -Identity $params.AccountName ` - -ErrorAction SilentlyContinue - if ($null -eq $ma) - { - return @{ - AccountName = $params.AccountName - Account = $params.Account - Ensure = "Absent" - InstallAccount = $params.InstallAccount - } - } - $schedule = $null - if ($null -ne $ma.ChangeSchedule) - { - $schedule = $ma.ChangeSchedule.ToString() - } - return @{ - AccountName = $ma.Username - EmailNotification = $ma.DaysBeforeChangeToEmail - PreExpireDays = $ma.DaysBeforeExpiryToChange - Schedule = $schedule - Account = $params.Account - Ensure = "Present" - InstallAccount = $params.InstallAccount - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $Account, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $false)] - [System.UInt32] - $EmailNotification, - - [parameter(Mandatory = $false)] - [System.UInt32] - $PreExpireDays, - - [parameter(Mandatory = $false)] - [System.String] - $Schedule, - - [parameter(Mandatory = $true)] - [System.String] - $AccountName - ) - - Write-Verbose -Message "Setting managed account $AccountName" - - if ($Ensure -eq "Present" -and $null -eq $Account) - { - throw ("You must specify the 'Account' property as a PSCredential to create a " + ` - "managed account") - return - } - - $currentValues = Get-TargetResource @PSBoundParameters - if ($currentValues.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - Write-Verbose -Message ("Managed account does not exist but should, creating " + ` - "the managed account") - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - New-SPManagedAccount -Credential $params.Account - } - } - - if ($Ensure -eq "Present") - { - Write-Verbose -Message "Updating settings for managed account" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $updateParams = @{ - Identity = $params.Account.UserName - } - if ($params.ContainsKey("EmailNotification")) - { - $updateParams.Add("EmailNotification", $params.EmailNotification) - } - if ($params.ContainsKey("PreExpireDays")) - { - $updateParams.Add("PreExpireDays", $params.PreExpireDays) - } - if ($params.ContainsKey("Schedule")) - { - $updateParams.Add("Schedule", $params.Schedule) - } - Set-SPManagedAccount @updateParams - } - } - else - { - Write-Verbose -Message "Removing managed account" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - Remove-SPManagedAccount -Identity $params.AccountName -Confirm:$false - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $Account, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $false)] - [System.UInt32] - $EmailNotification, - - [parameter(Mandatory = $false)] - [System.UInt32] - $PreExpireDays, - - [parameter(Mandatory = $false)] - [System.String] - $Schedule, - - [parameter(Mandatory = $true)] - [System.String] - $AccountName - ) - - Write-Verbose -Message "Testing managed account $AccountName" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("AccountName", - "Schedule", - "PreExpireDays", - "EmailNotification", - "Ensure") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedAccount/MSFT_SPManagedAccount.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedAccount/MSFT_SPManagedAccount.schema.mof deleted file mode 100644 index 881fa8e9..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedAccount/MSFT_SPManagedAccount.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPManagedAccount")] -class MSFT_SPManagedAccount : OMI_BaseResource -{ - [Key, Description("The username of the account")] string AccountName; - [Write, Description("The credential with password of the account"), EmbeddedInstance("MSFT_Credential")] String Account; - [Write, Description("How many days before a password change should an email be sent")] Uint32 EmailNotification; - [Write, Description("How many days before a password expires should it be changed")] Uint32 PreExpireDays; - [Write, Description("What is the schedule for the password reset")] string Schedule; - [Write, Description("Present ensures managed account exists, absent ensures it is removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/MSFT_SPManagedMetaDataServiceApp.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/MSFT_SPManagedMetaDataServiceApp.psm1 deleted file mode 100644 index e9970d3a..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/MSFT_SPManagedMetaDataServiceApp.psm1 +++ /dev/null @@ -1,449 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String[]] - $TermStoreAdministrators, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String] - $ContentTypeHubUrl, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting managed metadata service application $Name" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApps = Get-SPServiceApplication -Name $params.Name ` - -ErrorAction SilentlyContinue - $nullReturn = @{ - Name = $params.Name - Ensure = "Absent" - ApplicationPool = $params.ApplicationPool - TermStoreAdministrators = @() - } - if ($null -eq $serviceApps) - { - return $nullReturn - } - $serviceApp = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplication" - } - - if ($null -eq $serviceApp) - { - return $nullReturn - } - else - { - $serviceAppProxies = Get-SPServiceApplicationProxy -ErrorAction SilentlyContinue - if ($null -ne $serviceAppProxies) - { - $serviceAppProxy = $serviceAppProxies | Where-Object -FilterScript { - $serviceApp.IsConnected($_) - } - if ($null -ne $serviceAppProxy) - { - $proxyName = $serviceAppProxy.Name - } - } - - # Get the ContentTypeHubUrl value - $hubUrl = "" - try - { - $propertyFlags = [System.Reflection.BindingFlags]::Instance ` - -bor [System.Reflection.BindingFlags]::NonPublic - $defaultPartitionId = [Guid]::Parse("0C37852B-34D0-418e-91C6-2AC25AF4BE5B") - - $installedVersion = Get-SPDSCInstalledProductVersion - switch ($installedVersion.FileMajorPart) - { - 15 { - $propData = $serviceApp.GetType().GetMethods($propertyFlags) - $method = $propData | Where-Object -FilterScript { - $_.Name -eq "GetContentTypeSyndicationHubLocal" - } - $hubUrl = $method.Invoke($serviceApp, $defaultPartitionId).AbsoluteUri } - 16 { - $propData = $serviceApp.GetType().GetProperties($propertyFlags) - $dbMapperProp = $propData | Where-Object -FilterScript { - $_.Name -eq "DatabaseMapper" - } - - $dbMapper = $dbMapperProp.GetValue($serviceApp) - - $propData2 = $dbMapper.GetType().GetMethods($propertyFlags) - $cthubMethod = $propData2 | Where-Object -FilterScript { - $_.Name -eq "GetContentTypeSyndicationHubLocal" - } - - $hubUrl = $cthubMethod.Invoke($dbMapper, $defaultPartitionId).AbsoluteUri - } - default { - throw ("Detected an unsupported major version of SharePoint. " + ` - "SharePointDsc only supports SharePoint 2013 or 2016.") - } - } - - if ($hubUrl) - { - $hubUrl = $hubUrl.TrimEnd('/') - } - } - catch [System.Exception] - { - $hubUrl = "" - } - - $centralAdminSite = Get-SPWebApplication -IncludeCentralAdministration ` - | Where-Object -FilterScript { - $_.IsAdministrationWebApplication -eq $true - } - $session = Get-SPTaxonomySession -Site $centralAdminSite.Url - - $currentAdmins = @() - - $session.TermStores[0].TermStoreAdministrators | ForEach-Object -Process { - $name = [string]::Empty - if ($_.IsWindowsAuthenticationMode -eq $true) - { - $name = $_.PrincipalName - } - else - { - $name = (New-SPClaimsPrincipal -Identity $_.PrincipalName -IdentityType EncodedClaim).Value - if ($name -match "^s-1-[0-59]-\d+-\d+-\d+-\d+-\d+") - { - $name = Resolve-SPDscSecurityIdentifier -SID $name - } - } - $currentAdmins += $name - } - - return @{ - Name = $serviceApp.DisplayName - ProxyName = $proxyName - Ensure = "Present" - ApplicationPool = $serviceApp.ApplicationPool.Name - DatabaseName = $serviceApp.Database.Name - DatabaseServer = $serviceApp.Database.Server.Name - TermStoreAdministrators = $currentAdmins - ContentTypeHubUrl = $hubUrl - InstallAccount = $params.InstallAccount - } - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String[]] - $TermStoreAdministrators, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String] - $ContentTypeHubUrl, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting managed metadata service application $Name" - - $result = Get-TargetResource @PSBoundParameters - - if ($result.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - Write-Verbose -Message "Creating Managed Metadata Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - if ($params.ContainsKey("Ensure")) - { - $params.Remove("Ensure") | Out-Null - } - if ($params.ContainsKey("InstallAccount")) - { - $params.Remove("InstallAccount") | Out-Null - } - if ($params.ContainsKey("TermStoreAdministrators")) - { - $params.Remove("TermStoreAdministrators") | Out-Null - } - if ($params.ContainsKey("ContentTypeHubUrl")) - { - $params.Add("HubUri", $params.ContentTypeHubUrl) - $params.Remove("ContentTypeHubUrl") - } - if ($params.ContainsKey("ProxyName")) - { - $pName = $params.ProxyName - $params.Remove("ProxyName") | Out-Null - } - if ($null -eq $pName) { - $pName = "$($params.Name) Proxy" - } - - $app = New-SPMetadataServiceApplication @params - if ($null -ne $app) - { - New-SPMetadataServiceApplicationProxy -Name $pName ` - -ServiceApplication $app ` - -DefaultProxyGroup ` - -ContentTypePushdownEnabled ` - -DefaultKeywordTaxonomy ` - -DefaultSiteCollectionTaxonomy - } - } - } - - if ($result.Ensure -eq "Present" -and $Ensure -eq "Present") - { - if ([string]::IsNullOrEmpty($ApplicationPool) -eq $false ` - -and $ApplicationPool -ne $result.ApplicationPool) - { - Write-Verbose -Message "Updating Managed Metadata Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApp = Get-SPServiceApplication -Name $params.Name ` - | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplication" - } - $appPool = Get-SPServiceApplicationPool -Identity $params.ApplicationPool - Set-SPMetadataServiceApplication -Identity $serviceApp -ApplicationPool $appPool - } - } - - if (($PSBoundParameters.ContainsKey("ContentTypeHubUrl") -eq $true) ` - -and ($ContentTypeHubUrl.TrimEnd('/') -ne $result.ContentTypeHubUrl.TrimEnd('/'))) - { - Write-Verbose -Message "Updating Content type hub for Managed Metadata Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApp = Get-SPServiceApplication -Name $params.Name ` - | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplication" - } - Set-SPMetadataServiceApplication -Identity $serviceApp -HubUri $params.ContentTypeHubUrl - } - } - } - - if ($Ensure -eq "Present" -and $PSBoundParameters.ContainsKey("TermStoreAdministrators") -eq $true) - { - # Update the term store administrators - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters, $result) ` - -ScriptBlock { - - Write-Verbose -Message "Setting term store administrators" - $params = $args[0] - $currentValues = $args[1] - - $centralAdminSite = Get-SPWebApplication -IncludeCentralAdministration ` - | Where-Object -FilterScript { - $_.IsAdministrationWebApplication -eq $true - } - $session = Get-SPTaxonomySession -Site $centralAdminSite.Url - $termStore = $session.TermStores[0] - - $changesToMake = Compare-Object -ReferenceObject $currentValues.TermStoreAdministrators ` - -DifferenceObject $params.TermStoreAdministrators - - $changesToMake | ForEach-Object -Process { - $change = $_ - switch($change.SideIndicator) - { - "<=" { - # remove an existing user - if ($termStore.TermStoreAdministrators.PrincipalName -contains $change.InputObject) - { - $termStore.DeleteTermStoreAdministrator($change.InputObject) - } - else - { - $claimsToken = New-SPClaimsPrincipal -Identity $change.InputObject ` - -IdentityType WindowsSamAccountName - $termStore.DeleteTermStoreAdministrator($claimsToken.ToEncodedString()) - } - } - "=>" { - # add a new user - $termStore.AddTermStoreAdministrator($change.InputObject) - } - default { - throw "An unknown side indicator was found." - } - } - } - - $termStore.CommitAll(); - } - } - - if ($Ensure -eq "Absent") - { - # The service app should not exit - Write-Verbose -Message "Removing Managed Metadata Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApp = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplication" - - } - - $proxies = Get-SPServiceApplicationProxy - foreach($proxyInstance in $proxies) - { - if($serviceApp.IsConnected($proxyInstance)) - { - $proxyInstance.Delete() - } - } - - Remove-SPServiceApplication -Identity $serviceApp -Confirm:$false - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String[]] - $TermStoreAdministrators, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String] - $ContentTypeHubUrl, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing managed metadata service application $Name" - - $PSBoundParameters.Ensure = $Ensure - if ($PSBoundParameters.ContainsKey("ContentTypeHubUrl") -eq $true) - { - $PSBoundParameters.ContentTypeHubUrl = $ContentTypeHubUrl.TrimEnd('/') - } - - $CurrentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("ApplicationPool", - "ContentTypeHubUrl", - "TermStoreAdministrators", - "Ensure") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/MSFT_SPManagedMetaDataServiceApp.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/MSFT_SPManagedMetaDataServiceApp.schema.mof deleted file mode 100644 index 4bd75d90..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/MSFT_SPManagedMetaDataServiceApp.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPManagedMetaDataServiceApp")] -class MSFT_SPManagedMetaDataServiceApp : OMI_BaseResource -{ - [Key, Description("The name of the managed metadata service application")] string Name; - [Write, Description("The proxy name, if not specified will be /Name of service app/ Proxy")] string ProxyName; - [Required, Description("The application pool that the service app will use")] string ApplicationPool; - [Write, Description("The name of the database server which will host the application")] string DatabaseServer; - [Write, Description("The name of the database for the service application")] string DatabaseName; - [Write, Description("A list of the users/groups who are administrators of the term store")] string TermStoreAdministrators[]; - [Write, Description("Present ensures service app exists, absent ensures it is removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("The URL of the content type hub for this app (only set when the app is provisioned)")] string ContentTypeHubUrl; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedPath/MSFT_SPManagedPath.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedPath/MSFT_SPManagedPath.psm1 deleted file mode 100644 index efc15cbb..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedPath/MSFT_SPManagedPath.psm1 +++ /dev/null @@ -1,207 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $true)] - [System.String] - $RelativeUrl, - - [parameter(Mandatory = $true)] - [System.Boolean] - $Explicit, - - [parameter(Mandatory = $true)] - [System.Boolean] - $HostHeader, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting managed path $RelativeUrl in $WebAppUrl" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $getParams = @{ - Identity = $params.RelativeUrl - } - if ($params.HostHeader) - { - $getParams.Add("HostHeader", $true) - } - else - { - $getParams.Add("WebApplication", $params.WebAppUrl) - } - $path = Get-SPManagedPath @getParams -ErrorAction SilentlyContinue - if ($null -eq $path) - { - return @{ - WebAppUrl = $params.WebAppUrl - RelativeUrl = $params.RelativeUrl - Explicit = $params.Explicit - HostHeader = $params.HostHeader - InstallAccount = $params.InstallAccount - Ensure = "Absent" - } - } - - return @{ - RelativeUrl = $path.Name - Explicit = ($path.Type -eq "ExplicitInclusion") - WebAppUrl = $params.WebAppUrl - HostHeader = $params.HostHeader - InstallAccount = $params.InstallAccount - Ensure = "Present" - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $true)] - [System.String] - $RelativeUrl, - - [parameter(Mandatory = $true)] - [System.Boolean] - $Explicit, - - [parameter(Mandatory = $true)] - [System.Boolean] - $HostHeader, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting managed path $RelativeUrl in $WebAppUrl" - - $CurrentResults = Get-TargetResource @PSBoundParameters - - if ($CurrentResults.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - Write-Verbose -Message "Creating the managed path $RelativeUrl in $WebAppUrl" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $newParams = @{ - RelativeURL = $params.RelativeUrl - Explicit = $params.Explicit - } - if ($params.HostHeader) - { - $newParams.Add("HostHeader", $params.HostHeader) - } - else - { - $newParams.Add("WebApplication", $params.WebAppUrl) - } - New-SPManagedPath @newParams - } - } - - if ($Ensure -eq "Absent") - { - Write-Verbose -Message "Removing the managed path $RelativeUrl from $WebAppUrl" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $removeParams = @{ - Identity = $params.RelativeUrl - } - if ($params.HostHeader) - { - $removeParams.Add("HostHeader", $params.HostHeader) - } - else - { - $removeParams.Add("WebApplication", $params.WebAppUrl) - } - - Remove-SPManagedPath @removeParams -Confirm:$false - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $true)] - [System.String] - $RelativeUrl, - - [parameter(Mandatory = $true)] - [System.Boolean] - $Explicit, - - [parameter(Mandatory = $true)] - [System.Boolean] - $HostHeader, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing managed path $RelativeUrl in $WebAppUrl" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("WebAppUrl", - "RelativeUrl", - "Explicit", - "HostHeader", - "Ensure") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedPath/MSFT_SPManagedPath.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedPath/MSFT_SPManagedPath.schema.mof deleted file mode 100644 index 8964ea01..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPManagedPath/MSFT_SPManagedPath.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPManagedPath")] -class MSFT_SPManagedPath : OMI_BaseResource -{ - [Key, Description("The URL of the web application to apply the managed path to - this is ignored for host header web applications")] string WebAppUrl; - [Key, Description("The relative URL of the managed path")] string RelativeUrl; - [Required, Description("Should the host header be explicit? If false then it is a wildcard")] boolean Explicit; - [Required, Description("Is this a host header web application?")] boolean HostHeader; - [Write, Description("Present ensures managed path exists, absent ensures it is removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/MSFT_SPOfficeOnlineServerBinding.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/MSFT_SPOfficeOnlineServerBinding.psm1 deleted file mode 100644 index 6ee071c2..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/MSFT_SPOfficeOnlineServerBinding.psm1 +++ /dev/null @@ -1,174 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Internal-HTTP","Internal-HTTPS","External-HTTP","External-HTTPS")] - [System.String] - $Zone, - - [parameter(Mandatory = $true)] - [System.String] - $DnsName, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting Office Online Server details for '$Zone' zone" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $currentZone = Get-SPWOPIZone - $bindings = Get-SPWOPIBinding -WOPIZone $currentZone - - if ($null -eq $bindings) - { - return @{ - Zone = $currentZone - DnsName = $null - Ensure = "Absent" - InstallAccount = $params.InstallAccount - } - } - else - { - return @{ - Zone = $currentZone - DnsName = ($bindings | Select-Object -First 1).ServerName - Ensure = "Present" - InstallAccount = $params.InstallAccount - } - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Internal-HTTP","Internal-HTTPS","External-HTTP","External-HTTPS")] - [System.String] - $Zone, - - [parameter(Mandatory = $true)] - [System.String] - $DnsName, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting Office Online Server details for '$Zone' zone" - - $CurrentResults = Get-TargetResource @PSBoundParameters - - if ($Ensure -eq "Present") - { - if ($DnsName -ne $CurrentResults.DnsName -or $Zone -ne $CurrentResults.Zone) - { - if ([String]::IsNullOrEmpty($CurrentResults.DnsName) -eq $false ` - -or $Zone -ne $CurrentResults.Zone) - { - Write-Verbose -Message ("Removing bindings for zone '$Zone' so new bindings " + ` - "can be added") - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - Get-SPWOPIBinding -WOPIZone $params.Zone | Remove-SPWOPIBinding -Confirm:$false - } - } - Write-Verbose -Message "Creating new bindings for '$DnsName' and setting zone to '$Zone'" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $newParams = @{ - ServerName = $params.DnsName - } - if ($params.Zone.ToLower().EndsWith("http") -eq $true) - { - $newParams.Add("AllowHTTP", $true) - } - New-SPWOPIBinding @newParams - Set-SPWOPIZone -zone $params.Zone - } - } - } - - if ($Ensure -eq "Absent") - { - Write-Verbose -Message "Removing bindings for zone '$Zone'" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - Get-SPWOPIBinding -WOPIZone $params.Zone | Remove-SPWOPIBinding -Confirm:$false - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Internal-HTTP","Internal-HTTPS","External-HTTP","External-HTTPS")] - [System.String] - $Zone, - - [parameter(Mandatory = $true)] - [System.String] - $DnsName, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing Office Online Server details for '$Zone' zone" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - $paramsToCheck = @("Ensure") - if ($Ensure -eq "Present") - { - $paramsToCheck += @("Zone","DnsName") - } - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck $paramsToCheck -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/MSFT_SPOfficeOnlineServerBinding.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/MSFT_SPOfficeOnlineServerBinding.schema.mof deleted file mode 100644 index bdf0cc3e..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/MSFT_SPOfficeOnlineServerBinding.schema.mof +++ /dev/null @@ -1,20 +0,0 @@ -/* - -**Example** - - SPOfficeOnlineServerBinding OosBinding - { - Zone = "internal-https" - DnsName = "webapps.contoso.com" - Ensure = "Present" - PsDscRunAsCredential = $SetupAccount - } -*/ -[ClassVersion("1.0.0.0"), FriendlyName("SPOfficeOnlineServerBinding")] -class MSFT_SPOfficeOnlineServerBinding : OMI_BaseResource -{ - [Key, Description("The zone for this binding"), ValueMap{"Internal-HTTP","Internal-HTTPS","External-HTTP","External-HTTPS"}, Values{"Internal-HTTP","Internal-HTTPS","External-HTTP","External-HTTPS"}] string Zone; - [Required, Description("The DNS name of the server/s that are running Office Web Apps")] string DnsName; - [Write, Description("Present ensures the binding for this zone exists, absent ensures it doesn't"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/MSFT_SPOutgoingEmailSettings.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/MSFT_SPOutgoingEmailSettings.psm1 deleted file mode 100644 index d4a0fc90..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/MSFT_SPOutgoingEmailSettings.psm1 +++ /dev/null @@ -1,255 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $true)] - [System.String] - $SMTPServer, - - [parameter(Mandatory = $true)] - [System.String] - $FromAddress, - - [parameter(Mandatory = $true)] - [System.String] - $ReplyToAddress, - - [parameter(Mandatory = $true)] - [System.String] - $CharacterSet, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UseTLS, - - [parameter(Mandatory = $false)] - [System.UInt32] - $SMTPPort, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting outgoing email settings configuration for $WebAppUrl" - - $installedVersion = Get-SPDSCInstalledProductVersion - if (($PSBoundParameters.ContainsKey("UseTLS") -eq $true) ` - -and $installedVersion.FileMajorPart -ne 16) - { - throw [Exception] "UseTLS is only supported in SharePoint 2016." - } - - if (($PSBoundParameters.ContainsKey("SMTPPort") -eq $true) ` - -and $installedVersion.FileMajorPart -ne 16) - { - throw [Exception] "SMTPPort is only supported in SharePoint 2016." - } - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - $webApp = Get-SPWebApplication -Identity $params.WebAppUrl ` - -IncludeCentralAdministration ` - -ErrorAction SilentlyContinue - - if ($null -eq $webApp) - { - return $null - } - - $mailServer = $null - if ($null -ne $webApp.OutboundMailServiceInstance) - { - $mailServer = $webApp.OutboundMailServiceInstance.Server.Name - } - - return @{ - WebAppUrl = $webApp.Url - SMTPServer= $mailServer - FromAddress= $webApp.OutboundMailSenderAddress - ReplyToAddress= $webApp.OutboundMailReplyToAddress - CharacterSet = $webApp.OutboundMailCodePage - UseTLS = $webApp.OutboundMailEnableSsl - SMTPPort = $webApp.OutboundMailPort - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $true)] - [System.String] - $SMTPServer, - - [parameter(Mandatory = $true)] - [System.String] - $FromAddress, - - [parameter(Mandatory = $true)] - [System.String] - $ReplyToAddress, - - [parameter(Mandatory = $true)] - [System.String] - $CharacterSet, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UseTLS, - - [parameter(Mandatory = $false)] - [System.UInt32] - $SMTPPort, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting outgoing email settings configuration for $WebAppUrl" - - $installedVersion = Get-SPDSCInstalledProductVersion - if (($PSBoundParameters.ContainsKey("UseTLS") -eq $true) ` - -and $installedVersion.FileMajorPart -lt 16) - { - throw [Exception] "UseTLS is only supported in SharePoint 2016." - } - - if (($PSBoundParameters.ContainsKey("SMTPPort") -eq $true) ` - -and $installedVersion.FileMajorPart -lt 16) - { - throw [Exception] "SMTPPort is only supported in SharePoint 2016." - } - - $null = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - $webApp = $null - - Write-Verbose -Message "Retrieving $($params.WebAppUrl) settings" - - $webApp = Get-SPWebApplication $params.WebAppUrl -IncludeCentralAdministration - if ($null -eq $webApp) - { - throw "Web Application $webAppUrl not found" - } - - $installedVersion = Get-SPDSCInstalledProductVersion - switch ($installedVersion.FileMajorPart) - { - 15 { - $webApp.UpdateMailSettings($params.SMTPServer, ` - $params.FromAddress, ` - $params.ReplyToAddress, ` - $params.CharacterSet) - } - 16 { - if ($params.ContainsKey("UseTLS") -eq $false) - { - $UseTLS = $false - } - else - { - $UseTLS = $params.UseTLS - } - - if ($params.ContainsKey("SMTPPort") -eq $false) - { - $SMTPPort = 25 - } - else - { - $SMTPPort = $params.SMTPPort - } - - $webApp.UpdateMailSettings($params.SMTPServer, ` - $params.FromAddress, ` - $params.ReplyToAddress, ` - $params.CharacterSet, ` - $UseTLS, ` - $SMTPPort) - } - default { - throw ("Detected an unsupported major version of SharePoint. SharePointDsc only " + ` - "supports SharePoint 2013 or 2016.") - } - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $true)] - [System.String] - $SMTPServer, - - [parameter(Mandatory = $true)] - [System.String] - $FromAddress, - - [parameter(Mandatory = $true)] - [System.String] - $ReplyToAddress, - - [parameter(Mandatory = $true)] - [System.String] - $CharacterSet, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UseTLS, - - [parameter(Mandatory = $false)] - [System.UInt32] - $SMTPPort, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting outgoing email settings configuration for $WebAppUrl" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($null -eq $CurrentValues) - { - return $false - } - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("SMTPServer", - "FromAddress", - "ReplyToAddress", - "CharacterSet", - "UseTLS", - "SMTPPort") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/MSFT_SPOutgoingEmailSettings.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/MSFT_SPOutgoingEmailSettings.schema.mof deleted file mode 100644 index 8f3c9376..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/MSFT_SPOutgoingEmailSettings.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPOutgoingEmailSettings")] -class MSFT_SPOutgoingEmailSettings : OMI_BaseResource -{ - [key, Description("The URL of the web application. If you want to set the global settings use the Central Admin URL")] string WebAppUrl; - [Required, Description("The SMTP server for outgoing mail")] string SMTPServer; - [Required, Description("The from address to put on messages")] string FromAddress; - [Required, Description("The email address that replies should be directed to")] string ReplyToAddress; - [Required, Description("The character set to use on messages")] string CharacterSet; - [Write, Description("Use TLS when connecting to the SMTP server (SharePoint 2016 only)")] boolean UseTLS; - [Write, Description("The port which is used to connect to the SMTP server (SharePoint 2016 only)")] uint32 SMTPPort; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/MSFT_SPPasswordChangeSettings.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/MSFT_SPPasswordChangeSettings.psm1 deleted file mode 100644 index 30d625ff..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/MSFT_SPPasswordChangeSettings.psm1 +++ /dev/null @@ -1,159 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $MailAddress, - - [parameter(Mandatory = $false)] - [ValidateRange(0,356)] - [System.UInt32] - $DaysBeforeExpiry, - - [parameter(Mandatory = $false)] - [ValidateRange(0,36000)] - [System.UInt32] - $PasswordChangeWaitTimeSeconds, - - [parameter(Mandatory = $false)] - [ValidateRange(0,99)] - [System.UInt32] - $NumberOfRetries, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting farm wide automatic password change settings" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $farm = Get-SPFarm - if ($null -eq $farm ) - { - return $null - } - return @{ - MailAddress = $farm.PasswordChangeEmailAddress - PasswordChangeWaitTimeSeconds= $farm.PasswordChangeGuardTime - NumberOfRetries= $farm.PasswordChangeMaximumTries - DaysBeforeExpiry = $farm.DaysBeforePasswordExpirationToSendEmail - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $MailAddress, - - [parameter(Mandatory = $false)] - [ValidateRange(0,356)] - [System.UInt32] - $DaysBeforeExpiry, - - [parameter(Mandatory = $false)] - [ValidateRange(0,36000)] - [System.UInt32] - $PasswordChangeWaitTimeSeconds, - - [parameter(Mandatory = $false)] - [ValidateRange(0,99)] - [System.UInt32] - $NumberOfRetries, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting farm wide automatic password change settings" - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - $farm = Get-SPFarm -ErrorAction Continue - - if ($null -eq $farm ) - { - return $null - } - - $farm.PasswordChangeEmailAddress = $params.MailAddress - if ($null -ne $params.PasswordChangeWaitTimeSeconds) - { - $farm.PasswordChangeGuardTime = $params.PasswordChangeWaitTimeSeconds - } - if ($null -ne $params.NumberOfRetries) - { - $farm.PasswordChangeMaximumTries = $params.NumberOfRetries - } - if ($null -ne $params.DaysBeforeExpiry) - { - $farm.DaysBeforePasswordExpirationToSendEmail = $params.DaysBeforeExpiry - } - $farm.Update(); - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $MailAddress, - - [parameter(Mandatory = $false)] - [ValidateRange(0,356)] - [System.UInt32] - $DaysBeforeExpiry, - - [parameter(Mandatory = $false)] - [ValidateRange(0,36000)] - [System.UInt32] - $PasswordChangeWaitTimeSeconds, - - [parameter(Mandatory = $false)] - [ValidateRange(0,99)] - [System.UInt32] - $NumberOfRetries, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing farm wide automatic password change settings" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($null -eq $CurrentValues) - { - return $false - } - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("MailAddress", - "DaysBeforeExpiry", - "PasswordChangeWaitTimeSeconds", - "NumberOfRetries") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/MSFT_SPPasswordChangeSettings.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/MSFT_SPPasswordChangeSettings.schema.mof deleted file mode 100644 index fad54d4f..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/MSFT_SPPasswordChangeSettings.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPPasswordChangeSettings")] -class MSFT_SPPasswordChangeSettings : OMI_BaseResource -{ - [key, Description("The email address to send notifications of password changes to")] string MailAddress; - [Write, Description("The number of days before password expiry to send send emails")] Uint32 DaysBeforeExpiry; - [Write, Description("The duration that a password reset will wait for before it times out")] Uint32 PasswordChangeWaitTimeSeconds; - [Write, Description("How many retries if the password change fails")] Uint32 NumberOfRetries; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/MSFT_SPPerformancePointServiceApp.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/MSFT_SPPerformancePointServiceApp.psm1 deleted file mode 100644 index 4321a492..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/MSFT_SPPerformancePointServiceApp.psm1 +++ /dev/null @@ -1,256 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting for PerformancePoint Service Application '$Name'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApps = Get-SPServiceApplication -Name $params.Name -ErrorAction SilentlyContinue - $nullReturn = @{ - Name = $params.Name - ApplicationPool = $params.ApplicationPool - Ensure = "Absent" - InstallAccount = $params.InstallAccount - } - if ($null -eq $serviceApps) - { - return $nullReturn - } - $serviceApp = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.PerformancePoint.Scorecards.BIMonitoringServiceApplication" - } - - if ($null -eq $serviceApp) - { - return $nullReturn - } - else - { - $serviceAppProxies = Get-SPServiceApplicationProxy -ErrorAction SilentlyContinue - if ($null -ne $serviceAppProxies) - { - $serviceAppProxy = $serviceAppProxies | Where-Object -FilterScript { - $serviceApp.IsConnected($_) - } - if ($null -ne $serviceAppProxy) - { - $proxyName = $serviceAppProxy.Name - } - } - return @{ - Name = $serviceApp.DisplayName - ProxyName = $proxyName - ApplicationPool = $serviceApp.ApplicationPool.Name - DatabaseName = $serviceApp.Database.Name - DatabaseServer = $serviceApp.Database.Server.Name - Ensure = "Present" - } - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting PerformancePoint Service Application '$Name'" - - $result = Get-TargetResource @PSBoundParameters - - if ($result.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - Write-Verbose -Message "Creating PerformancePoint Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $newParams = @{ - Name = $params.Name - ApplicationPool = $params.ApplicationPool - } - if ($params.ContainsKey("DatabaseName") -eq $true) - { - $newParams.Add("DatabaseName", $params.DatabaseName) - } - if ($params.ContainsKey("DatabaseServer") -eq $true) - { - $newParams.Add("DatabaseServer", $params.DatabaseServer) - } - - New-SPPerformancePointServiceApplication @newParams - if ($null -eq $params.ProxyName) - { - $pName = "$($params.Name) Proxy" - } - else - { - $pName = $params.ProxyName - } - New-SPPerformancePointServiceApplicationProxy -Name $pName ` - -ServiceApplication $params.Name ` - -Default - } - } - - if ($result.Ensure -eq "Present" -and $Ensure -eq "Present") - { - if ($ApplicationPool -ne $result.ApplicationPool) - { - Write-Verbose -Message "Updating PerformancePoint Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $appPool = Get-SPServiceApplicationPool -Identity $params.ApplicationPool - - Get-SPServiceApplication -Name $params.Name ` - | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.PerformancePoint.Scorecards.BIMonitoringServiceApplication" - } | Set-SPPerformancePointServiceApplication -ApplicationPool $appPool - } - } - } - if ($Ensure -eq "Absent") - { - Write-Verbose -Message "Removing PerformancePoint Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $app = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.PerformancePoint.Scorecards.BIMonitoringServiceApplication" - } - - $proxies = Get-SPServiceApplicationProxy - foreach($proxyInstance in $proxies) - { - if($app.IsConnected($proxyInstance)) - { - $proxyInstance.Delete() - } - } - - Remove-SPServiceApplication -Identity $app -Confirm:$false - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing PerformancePoint Service Application '$Name'" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("ApplicationPool", "Ensure") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/MSFT_SPPerformancePointServiceApp.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/MSFT_SPPerformancePointServiceApp.schema.mof deleted file mode 100644 index 3c0cb179..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/MSFT_SPPerformancePointServiceApp.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPPerformancePointServiceApp")] -class MSFT_SPPerformancePointServiceApp : OMI_BaseResource -{ - [Key, Description("The name of the service application")] string Name; - [Write, Description("The proxy name, if not specified will be /Name of service app/ Proxy")] string ProxyName; - [Required, Description("The name of the application pool to run the service app in")] string ApplicationPool; - [Write, Description("The name of the database for the service app")] string DatabaseName; - [Write, Description("The name of the database server to host the database")] string DatabaseServer; - [Write, Description("Present ensures service app exists, absent ensures it is removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPowerPointAutomationServiceApp/MSFT_SPPowerPointAutomationServiceApp.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPowerPointAutomationServiceApp/MSFT_SPPowerPointAutomationServiceApp.psm1 deleted file mode 100644 index ade4557e..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPowerPointAutomationServiceApp/MSFT_SPPowerPointAutomationServiceApp.psm1 +++ /dev/null @@ -1,390 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [System.String] - $ProxyName, - - [System.String] - $ApplicationPool, - - [System.UInt32] - $CacheExpirationPeriodInSeconds, - - [System.UInt32] - $MaximumConversionsPerWorker, - - [System.UInt32] - $WorkerKeepAliveTimeoutInSeconds, - - [System.UInt32] - $WorkerProcessCount, - - [System.UInt32] - $WorkerTimeoutInSeconds, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting PowerPoint Automation service app '$Name'" - - if(($ApplicationPool ` - -or $ProxyName ` - -or $CacheExpirationPeriodInSeconds ` - -or $MaximumConversionsPerWorker ` - -or $WorkerKeepAliveTimeoutInSeconds ` - -or $WorkerProcessCount ` - -or $WorkerTimeoutInSeconds) -and ($Ensure -eq "Absent")) - { - throw "You cannot use any of the parameters when Ensure is specified as Absent" - } - if (($Ensure -eq "Present") -and -not $ApplicationPool) - { - throw ("An Application Pool is required to configure the PowerPoint " + ` - "Automation Service Application") - } - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - $serviceApps = Get-SPServiceApplication -Name $params.Name ` - -ErrorAction SilentlyContinue - $nullReturn = @{ - Name = $params.Name - Ensure = "Absent" - ApplicationPool = $params.ApplicationPool - } - - if ($null -eq $serviceApps) - { - return $nullReturn - } - - $serviceApp = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Server.PowerPoint.Administration.PowerPointConversionServiceApplication" - } - - if ($null -eq $serviceApp) - { - return $nullReturn - } - - $proxyName = "" - $serviceAppProxies = Get-SPServiceApplicationProxy -ErrorAction SilentlyContinue - if ($null -ne $serviceAppProxies) - { - $serviceAppProxy = $serviceAppProxies | Where-Object -FilterScript { - $serviceApp.IsConnected($_) - } - if ($null -ne $serviceAppProxy) - { - $proxyName = $serviceAppProxy.Name - } - } - - $returnVal = @{ - Name = $serviceApp.DisplayName - ProxyName = $proxyName - ApplicationPool = $serviceApp.ApplicationPool.Name - CacheExpirationPeriodInSeconds = $serviceApp.CacheExpirationPeriodInSeconds - MaximumConversionsPerWorker = $serviceApp.MaximumConversionsPerWorker - WorkerKeepAliveTimeoutInSeconds = $serviceApp.WorkerKeepAliveTimeoutInSeconds - WorkerProcessCount = $serviceApp.WorkerProcessCount - WorkerTimeoutInSeconds = $serviceApp.WorkerTimeoutInSeconds - Ensure = "Present" - InstallAccount = $params.InstallAccount - - } - return $returnVal - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [System.String] - $ProxyName, - - [System.String] - $ApplicationPool, - - [System.UInt32] - $CacheExpirationPeriodInSeconds, - - [System.UInt32] - $MaximumConversionsPerWorker, - - [System.UInt32] - $WorkerKeepAliveTimeoutInSeconds, - - [System.UInt32] - $WorkerProcessCount, - - [System.UInt32] - $WorkerTimeoutInSeconds, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting PowerPoint Automation service app '$Name'" - - if(($ApplicationPool ` - -or $ProxyName ` - -or $CacheExpirationPeriodInSeconds ` - -or $MaximumConversionsPerWorker ` - -or $WorkerKeepAliveTimeoutInSeconds ` - -or $WorkerProcessCount ` - -or $WorkerTimeoutInSeconds) -and ($Ensure -eq "Absent")) - { - throw "You cannot use any of the parameters when Ensure is specified as Absent" - } - if (($Ensure -eq "Present") -and -not $ApplicationPool) - { - throw ("An Application Pool is required to configure the PowerPoint " + ` - "Automation Service Application") - } - - $result = Get-TargetResource @PSBoundParameters - if ($result.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - Write-Verbose -Message "Creating PowerPoint Automation Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $proxyName = $params.ProxyName - if($null -eq $proxyName) - { - $proxyName = "$($params.Name) Proxy" - } - - $appPool = Get-SPServiceApplicationPool -Identity $params.ApplicationPool - if($appPool) - { - $serviceApp = New-SPPowerPointConversionServiceApplication -Name $params.Name -ApplicationPool $params.ApplicationPool - $serviceAppProxy = New-SPPowerPointConversionServiceApplicationProxy -name $proxyName -ServiceApplication $serviceApp - - if($null -ne $params.CacheExpirationPeriodInSeconds) - { - $serviceApp.CacheExpirationPeriodInSeconds = $params.CacheExpirationPeriodInSeconds - } - if($null -ne $params.MaximumConversionsPerWorker) - { - $serviceApp.MaximumConversionsPerWorker = $params.MaximumConversionsPerWorker - } - if($null -ne $params.WorkerKeepAliveTimeoutInSeconds) - { - $serviceApp.WorkerKeepAliveTimeoutInSeconds = $params.WorkerKeepAliveTimeoutInSeconds - } - if($null -ne $params.WorkerProcessCount) - { - $serviceApp.WorkerProcessCount = $params.WorkerProcessCount - } - if($null -ne $params.WorkerTimeoutInSeconds) - { - $serviceApp.WorkerTimeoutInSeconds = $params.WorkerTimeoutInSeconds - } - $serviceApp.Update(); - } - else - { - throw "Specified application pool does not exist" - } - } - } - if ($result.Ensure -eq "Present" -and $Ensure -eq "Present") - { - Write-Verbose -Message "Updating PowerPoint Automation Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters, $result ` - -ScriptBlock { - $params = $args[0] - $result = $args[1] - - $serviceApps = Get-SPServiceApplication -Name $params.Name ` - -ErrorAction SilentlyContinue - if($null -eq $serviceApps) - { - throw "No Service applications are available in the farm." - } - $serviceApp = $serviceApps ` - | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Server.PowerPoint.Administration.PowerPointConversionServiceApplication" - } - if($null -eq $serviceApp) - { - throw "Unable to find specified service application." - } - if ([string]::IsNullOrEmpty($params.ApplicationPool) -eq $false ` - -and $params.ApplicationPool -ne $result.ApplicationPool) - { - $appPool = Get-SPServiceApplicationPool -Identity $params.ApplicationPool - if($null -eq $appPool) - { - throw "The specified App Pool does not exist" - } - $serviceApp.ApplicationPool = $appPool - } - if([string]::IsNullOrEmpty($params.ProxyName) -eq $false ` - -and $params.ProxyName -ne $result.ProxyName) - { - $proxies = Get-SPServiceApplicationProxy - foreach($proxyInstance in $proxies) - { - if($serviceApp.IsConnected($proxyInstance)) - { - $proxyInstance.Delete() - } - } - $serviceAppProxy = New-SPPowerPointConversionServiceApplicationProxy -Name $params.proxyName -ServiceApplication $serviceApp - } - if($null -ne $params.CacheExpirationPeriodInSeconds) - { - $serviceApp.CacheExpirationPeriodInSeconds = $params.CacheExpirationPeriodInSeconds - } - if($null -ne $params.MaximumConversionsPerWorker) - { - $serviceApp.MaximumConversionsPerWorker = $params.MaximumConversionsPerWorker - } - if($null -ne $params.WorkerKeepAliveTimeoutInSeconds) - { - $serviceApp.WorkerKeepAliveTimeoutInSeconds = $params.WorkerKeepAliveTimeoutInSeconds - } - if($null -ne $params.WorkerProcessCount) - { - $serviceApp.WorkerProcessCount = $params.WorkerProcessCount - } - if($null -ne $params.WorkerTimeoutInSeconds) - { - $serviceApp.WorkerTimeoutInSeconds = $params.WorkerTimeoutInSeconds - } - $serviceApp.Update(); - } - } - if($Ensure -eq "Absent") - { - Write-Verbose -Message "Removing PowerPoint Automation Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount -Arguments $PSBoundParameters -ScriptBlock { - $params = $args[0] - - $serviceApps = Get-SPServiceApplication -Name $params.Name -ErrorAction SilentlyContinue - if($null -eq $serviceApps) - { - return; - } - $serviceApp = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Server.PowerPoint.Administration.PowerPointConversionServiceApplication" - } - if ($null -ne $serviceApp) - { - $proxies = Get-SPServiceApplicationProxy - foreach($proxyInstance in $proxies) - { - if($serviceApp.IsConnected($proxyInstance)) - { - $proxyInstance.Delete() - } - } - Remove-SPServiceApplication -Identity $serviceApp -Confirm:$false - } - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [System.String] - $ProxyName, - - [System.String] - $ApplicationPool, - - [System.UInt32] - $CacheExpirationPeriodInSeconds, - - [System.UInt32] - $MaximumConversionsPerWorker, - - [System.UInt32] - $WorkerKeepAliveTimeoutInSeconds, - - [System.UInt32] - $WorkerProcessCount, - - [System.UInt32] - $WorkerTimeoutInSeconds, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing PowerPoint Automation service app '$Name'" - if(($ApplicationPool ` - -or $ProxyName ` - -or $CacheExpirationPeriodInSeconds ` - -or $MaximumConversionsPerWorker ` - -or $WorkerKeepAliveTimeoutInSeconds ` - -or $WorkerProcessCount ` - -or $WorkerTimeoutInSeconds) -and ($Ensure -eq "Absent")) - { - throw "You cannot use any of the parameters when Ensure is specified as Absent" - } - if (($Ensure -eq "Present") -and -not $ApplicationPool) - { - throw ("An Application Pool is required to configure the PowerPoint " + ` - "Automation Service Application") - } - $CurrentValues = Get-TargetResource @PSBoundParameters - - if($Ensure -eq "Absent") - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") - } - else - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPowerPointAutomationServiceApp/MSFT_SPPowerPointAutomationServiceApp.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPowerPointAutomationServiceApp/MSFT_SPPowerPointAutomationServiceApp.schema.mof deleted file mode 100644 index 275d6d54..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPowerPointAutomationServiceApp/MSFT_SPPowerPointAutomationServiceApp.schema.mof +++ /dev/null @@ -1,14 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPPowerPointAutomationServiceApp")] -class MSFT_SPPowerPointAutomationServiceApp : OMI_BaseResource -{ - [Key, Description("The name of the service application")] String Name; - [Write, Description("The name of the service application proxy")] String ProxyName; - [Write, Description("The name of the application pool to run the service app in")] String ApplicationPool; - [Write, Description("Specifies the maximum time, in seconds, that items remain in the back-end server cache. The default value is 600 seconds (10 minutes).")] Uint32 CacheExpirationPeriodInSeconds; - [Write, Description("Specifies the maximum number of presentations that a conversion worker process can convert before recycling. The default value is 5.")] Uint32 MaximumConversionsPerWorker; - [Write, Description("Specifies the maximum time, in seconds, that a conversion worker process can be unresponsive before being terminated. The default value is 120 seconds.")] Uint32 WorkerKeepAliveTimeoutInSeconds; - [Write, Description("Specifies the number of active instances of the conversion worker process on each back-end. This value must be less than the Windows Communication Foundation (WCF) connection limit for this computer. The default value is 3.")] Uint32 WorkerProcessCount; - [Write, Description("Specifies the maximum time, in seconds, that a conversion worker process is given for any single conversion. The default is 300 seconds (5 minutes).")] Uint32 WorkerTimeoutInSeconds; - [Write, Description("Ensure the crawl rule is Present or Absent"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, EmbeddedInstance("MSFT_Credential"), Description("POWERSHELL 4 ONLY: The account to run thsi resource as, use PsDscRunAsCredential if using PowerShell 5")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPProductUpdate/MSFT_SPProductUpdate.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPProductUpdate/MSFT_SPProductUpdate.psm1 deleted file mode 100644 index ba57f5d6..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPProductUpdate/MSFT_SPProductUpdate.psm1 +++ /dev/null @@ -1,545 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $SetupFile, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ShutdownServices, - - [parameter(Mandatory = $false)] - [ValidateSet("mon","tue","wed","thu","fri","sat","sun")] - [System.String[]] - $BinaryInstallDays, - - [parameter(Mandatory = $false)] - [System.String] - $BinaryInstallTime, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - if ($Ensure -eq "Absent") - { - throw [Exception] "SharePoint does not support uninstalling updates." - return - } - - Write-Verbose -Message "Getting install status of SP binaries" - - $languagepack = $false - $servicepack = $false - $language = "" - - # Get file information from setup file - if (-not(Test-Path $SetupFile)) - { - throw "Setup file cannot be found." - } - - Write-Verbose -Message "Checking file status of $SetupFile" - $zone = Get-Item -Path $SetupFile -Stream "Zone.Identifier" -EA SilentlyContinue - - if ($null -ne $zone) - { - throw ("Setup file is blocked! Please use Unblock-File to unblock the file " + ` - "before continuing.") - } - - $setupFileInfo = Get-ItemProperty -Path $SetupFile - $fileVersion = $setupFileInfo.VersionInfo.FileVersion - Write-Verbose -Message "Update has version $fileVersion" - - $products = Invoke-SPDSCCommand -Credential $InstallAccount -ScriptBlock { - return Get-SPDscFarmProductsInfo - } - - if ($setupFileInfo.VersionInfo.FileDescription -match "Language Pack") - { - Write-Verbose -Message "Update is a Language Pack Service Pack." - # Retrieve language from file and check version for that language pack. - $languagepack = $true - - # Extract language from filename - if ($setupFileInfo.Name -match "\w*-(\w{2}-\w{2}).exe") - { - $language = $matches[1] - } - else - { - throw "Update does not contain the language code in the correct format." - } - - try - { - $cultureInfo = New-Object -TypeName System.Globalization.CultureInfo -ArgumentList $language - } - catch - { - throw "Error while converting language information: $language" - } - - # try/catch is required for some versions of Windows, other version use the LCID value of 4096 - if ($cultureInfo.LCID -eq 4096) - { - throw "Error while converting language information: $language" - } - - # Extract English name of the language code - if ($cultureInfo.EnglishName -match "(\w*,*\s*\w*) \(\w*\)") - { - $languageEnglish = $matches[1] - if ($languageEnglish.contains(",")) - { - $languages = $languageEnglish.Split(",") - $languageEnglish = $languages[0] - } - } - - # Extract Native name of the language code - if ($cultureInfo.NativeName -match "(\w*,*\s*\w*) \(\w*\)") - { - $languageNative = $matches[1] - if ($languageNative.contains(",")) - { - $languages = $languageNative.Split(",") - $languageNative = $languages[0] - } - } - - # Build language string used in Language Pack names - $languageString = "$languageEnglish/$languageNative" - Write-Verbose -Message "Update is for the $languageEnglish language" - - # Find the product name for the specific language pack - $productName = "" - foreach ($product in $products) - { - if ($product -match $languageString) - { - $productName = $product - } - } - - if ($productName -eq "") - { - throw "Error: Product for language $language is not found." - } - else - { - Write-Verbose -Message "Product found: $productName" - } - $versionInfo = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $productName ` - -ScriptBlock { - $productToCheck = $args[0] - return Get-SPDscFarmVersionInfo -ProductToCheck $productToCheck - } - } - elseif ($setupFileInfo.VersionInfo.FileDescription -match "Service Pack") - { - Write-Verbose -Message "Update is a Service Pack for SharePoint." - # Check SharePoint version information. - $servicepack = $true - $versionInfo = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $productName ` - -ScriptBlock { - $productToCheck = $args[0] - return Get-SPDscFarmVersionInfo -ProductToCheck "Microsoft SharePoint Server 2013" - } - } - else - { - Write-Verbose -Message "Update is a Cumulative Update." - # Cumulative Update is multi-lingual. Check version information of all products. - $versionInfo = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $productName ` - -ScriptBlock { - $productToCheck = $args[0] - return Get-SPDscFarmVersionInfo - } - } - - Write-Verbose -Message "The lowest version of any SharePoint component is $($versionInfo.Lowest)" - if ($versionInfo.Lowest -lt $fileVersion) - { - # Version of SharePoint is lower than the patch version. Patch is not installed. - return @{ - SetupFile = $SetupFile - ShutdownServices = $ShutdownServices - BinaryInstallDays = $BinaryInstallDays - BinaryInstallTime = $BinaryInstallTime - Ensure = "Absent" - } - } - else - { - # Version of SharePoint is equal or greater than the patch version. Patch is installed. - return @{ - SetupFile = $SetupFile - ShutdownServices = $ShutdownServices - BinaryInstallDays = $BinaryInstallDays - BinaryInstallTime = $BinaryInstallTime - Ensure = "Present" - } - } -} - -function Set-TargetResource -{ - # Supressing the global variable use to allow passing DSC the reboot message - [CmdletBinding()] - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidGlobalVars", "")] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $SetupFile, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ShutdownServices, - - [parameter(Mandatory = $false)] - [ValidateSet("mon","tue","wed","thu","fri","sat","sun")] - [System.String[]] - $BinaryInstallDays, - - [parameter(Mandatory = $false)] - [System.String] - $BinaryInstallTime, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting install status of SP Update binaries" - - if ($Ensure -eq "Absent") - { - throw [Exception] "SharePoint does not support uninstalling updates." - return - } - - # Check if setup file exists - if (-not(Test-Path $SetupFile)) - { - throw "Setup file cannot be found." - } - - Write-Verbose -Message "Checking file status of $SetupFile" - $zone = Get-Item $SetupFile -Stream "Zone.Identifier" -EA SilentlyContinue - - if ($null -ne $zone) - { - throw ("Setup file is blocked! Please use Unblock-File to unblock the file " + ` - "before continuing.") - } - - $now = Get-Date - if ($BinaryInstallDays) - { - # BinaryInstallDays parameter exists, check if current day is specified - $currentDayOfWeek = $now.DayOfWeek.ToString().ToLower().Substring(0,3) - - if ($BinaryInstallDays -contains $currentDayOfWeek) - { - Write-Verbose -Message ("Current day is present in the parameter BinaryInstallDays. " + ` - "Update can be run today.") - } - else - { - Write-Verbose -Message ("Current day is not present in the parameter BinaryInstallDays, " + ` - "skipping the update") - return - } - } - else - { - Write-Verbose -Message "No BinaryInstallDays specified, Update can be ran on any day." - } - - # Check if BinaryInstallTime parameter exists - if ($BinaryInstallTime) - { - # Check if current time is inside of time window - $upgradeTimes = $BinaryInstallTime.Split(" ") - $starttime = 0 - $endtime = 0 - - if ($upgradeTimes.Count -ne 3) - { - throw "Time window incorrectly formatted." - } - else - { - if ([datetime]::TryParse($upgradeTimes[0],[ref]$starttime) -ne $true) - { - throw "Error converting start time" - } - - if ([datetime]::TryParse($upgradeTimes[2],[ref]$endtime) -ne $true) - { - throw "Error converting end time" - } - - if ($starttime -gt $endtime) - { - throw "Error: Start time cannot be larger than end time" - } - } - - if (($starttime -lt $now) -and ($endtime -gt $now)) - { - Write-Verbose -Message ("Current time is inside of the window specified in " + ` - "BinaryInstallTime. Starting update") - } - else - { - Write-Verbose -Message ("Current time is outside of the window specified in " + ` - "BinaryInstallTime, skipping the update") - return - } - } - else - { - Write-Verbose -Message ("No BinaryInstallTime specified, Update can be ran at " + ` - "any time. Starting update.") - } - - # To prevent an endless loop: Check if an upgrade is required. - if ((Get-SPDSCInstalledProductVersion).FileMajorPart -eq 15) - { - $wssRegKey ="hklm:SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\15.0\WSS" - } - else - { - $wssRegKey ="hklm:SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\16.0\WSS" - } - - # Read LanguagePackInstalled and SetupType registry keys - $languagePackInstalled = Get-SPDSCRegistryKey -Key $wssRegKey -Value "LanguagePackInstalled" - $setupType = Get-SPDSCRegistryKey -Key $wssRegKey -Value "SetupType" - - # Determine if LanguagePackInstalled=1 or SetupType=B2B_Upgrade. - # If so, the Config Wizard is required, so the installation will be skipped. - if (($languagePackInstalled -eq 1) -or ($setupType -eq "B2B_UPGRADE")) - { - Write-Verbose -Message ("An upgrade is pending. " + ` - "To prevent a possible loop, the install will be skipped") - return - } - - if ($ShutdownServices) - { - Write-Verbose -Message "Stopping services to speed up installation process" - - $searchPaused = $false - $osearchStopped = $false - $hostControllerStopped = $false - - if ((Get-SPDSCInstalledProductVersion).FileMajorPart -eq 15) - { - $searchServiceName = "OSearch15" - } - else - { - $searchServiceName = "OSearch16" - } - - $osearchSvc = Get-Service -Name $searchServiceName - $hostControllerSvc = Get-Service -Name "SPSearchHostController" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -ScriptBlock { - $searchPaused = $true - $searchSAs = Get-SPEnterpriseSearchServiceApplication - foreach ($searchSA in $searchSAs) - { - $searchSA.Pause() - } - } - - if($osearchSvc.Status -eq "Running") - { - $osearchStopped = $true - Set-Service -Name $searchServiceName -StartupType Disabled - $osearchSvc.Stop() - } - - if($hostControllerSvc.Status -eq "Running") - { - $hostControllerStopped = $true - Set-Service "SPSearchHostController" -StartupType Disabled - $hostControllerSvc.Stop() - } - - $hostControllerSvc.WaitForStatus('Stopped','00:01:00') - - Write-Verbose -Message "Search Services are stopped" - - Write-Verbose -Message "Stopping other services" - - Set-Service -Name "IISADMIN" -StartupType Disabled - Set-Service -Name "SPTimerV4" -StartupType Disabled - - $iisreset = Start-Process -FilePath "iisreset.exe" ` - -ArgumentList "-stop -noforce" ` - -Wait ` - -PassThru - - $timerSvc = Get-Service -Name "SPTimerV4" - if($timerSvc.Status -eq "Running") - { - $timerSvc.Stop() - } - } - - Write-Verbose -Message "Beginning installation of the SharePoint update" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $SetupFile ` - -ScriptBlock { - $setupFile = $args[0] - - $setup = Start-Process -FilePath $setupFile ` - -ArgumentList "/quiet /passive" ` - -Wait ` - -PassThru - - # Error codes: https://aka.ms/installerrorcodes - switch ($setup.ExitCode) { - 0 - { - Write-Verbose -Message "SharePoint update binary installation complete." - } - 17022 - { - Write-Verbose -Message ("SharePoint update binary installation complete, " + ` - "however a reboot is required.") - $global:DSCMachineStatus = 1 - } - Default - { - throw ("SharePoint update install failed, exit code was $($setup.ExitCode). " + ` - "Error codes can be found at https://aka.ms/installerrorcodes") - } - } - } - - if ($ShutdownServices) - { - Write-Verbose -Message "Restart stopped services" - Set-Service -Name "SPTimerV4" -StartupType Automatic - Set-Service -Name "IISADMIN" -StartupType Automatic - - $timerSvc = Get-Service -Name "SPTimerV4" - $timerSvc.Start() - - $iisreset = Start-Process -FilePath "iisreset.exe" ` - -ArgumentList "-start" ` - -Wait ` - -PassThru - - $osearchSvc = Get-Service -Name $searchServiceName - $hostControllerSvc = Get-Service -Name "SPSearchHostController" - - # Ensuring Search Services were stopped by script before Starting" - if($osearchStopped -eq $true) - { - Set-Service -Name $searchServiceName -StartupType Manual - $osearchSvc.Start() - } - - if($hostControllerStopped -eq $true) - { - Set-Service "SPSearchHostController" -StartupType Automatic - $hostControllerSvc.Start() - } - - # Resuming Search Service Application if paused### - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -ScriptBlock { - if($searchPaused -eq $true) - { - $searchSAs = Get-SPEnterpriseSearchServiceApplication - foreach ($searchSA in $searchSAs) - { - $searchSA.Resume() - } - } - } - - Write-Verbose -Message "Services restarted." - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $SetupFile, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ShutdownServices, - - [parameter(Mandatory = $false)] - [ValidateSet("mon","tue","wed","thu","fri","sat","sun")] - [System.String[]] - $BinaryInstallDays, - - [parameter(Mandatory = $false)] - [System.String] - $BinaryInstallTime, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing install status of SP Update binaries" - - $PSBoundParameters.Ensure = $Ensure - - if ($Ensure -eq "Absent") - { - throw [Exception] "SharePoint does not support uninstalling updates." - return - } - - $CurrentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPProductUpdate/MSFT_SPProductUpdate.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPProductUpdate/MSFT_SPProductUpdate.schema.mof deleted file mode 100644 index 6ef8eb62..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPProductUpdate/MSFT_SPProductUpdate.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPProductUpdate")] -class MSFT_SPProductUpdate : OMI_BaseResource -{ - [Key, Description("The name of the update setup file")] String SetupFile; - [Write, Description("Shutdown SharePoint services to speed up installation")] Boolean ShutdownServices; - [Write, Description("Specify on which dates the installation is allowed"), ValueMap{"mon","tue","wed","thu","fri","sat","sun"}, Values{"mon","tue","wed","thu","fri","sat","sun"}] String BinaryInstallDays[]; - [Write, Description("Specify in which time frame the installation is allowed")] String BinaryInstallTime; - [Write, Description("Present to install SharePoint. Absent is currently not supported"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/MSFT_SPPublishServiceApplication.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/MSFT_SPPublishServiceApplication.psm1 deleted file mode 100644 index 0eca1a5c..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/MSFT_SPPublishServiceApplication.psm1 +++ /dev/null @@ -1,146 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present" - ) - - Write-Verbose -Message "Getting service application publish status '$Name'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApp = Get-SPServiceApplication -Name $params.Name -ErrorAction SilentlyContinue - - if ($null -eq $serviceApp) - { - Write-Verbose -Message "The service application $Name does not exist" - $sharedEnsure = "Absent" - } - - if ($null -eq $serviceApp.Uri) - { - Write-Verbose -Message ("Only Business Data Connectivity, Machine Translation, Managed Metadata, " + ` - "User Profile, Search, Secure Store are supported to be published via DSC.") - $sharedEnsure = "Absent" - } - else - { - if ($serviceApp.Shared -eq $true) - { - $sharedEnsure = "Present" - } - elseif ($serviceApp.Shared -eq $false) - { - $sharedEnsure = "Absent" - } - } - - return @{ - Name = $params.Name - Ensure = $sharedEnsure - InstallAccount = $params.InstallAccount - } - } - return $result -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present" - ) - - Write-Verbose -Message "Setting service application publish status '$Name'" - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApp = Get-SPServiceApplication -Name $params.Name -ErrorAction SilentlyContinue - if ($null -eq $serviceApp) - { - throw [Exception] ("The service application $Name does not exist") - } - - if ($null -eq $serviceApp.Uri) - { - throw [Exception] ("Only Business Data Connectivity, Machine Translation, Managed Metadata, " + ` - "User Profile, Search, Secure Store are supported to be published via DSC.") - } - - if ($Ensure -eq "Present") - { - Write-Verbose -Message "Publishing Service Application $Name" - Publish-SPServiceApplication -Identity $serviceApp - } - - if ($Ensure -eq "Absent") - { - Write-Verbose -Message "Unpublishing Service Application $Name" - Unpublish-SPServiceApplication -Identity $serviceApp - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present" - ) - - Write-Verbose -Message "Testing service application '$Name'" - - $currentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Name", "Ensure") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/MSFT_SPPublishServiceApplication.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/MSFT_SPPublishServiceApplication.schema.mof deleted file mode 100644 index 791dfe58..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/MSFT_SPPublishServiceApplication.schema.mof +++ /dev/null @@ -1,7 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPPublishServiceApplication")] -class MSFT_SPPublishServiceApplication : OMI_BaseResource -{ - [Key, Description("The name of the service application to publish")] string Name; - [Write, Description("Present to ensure it runs on this server, or absent to ensure it is stopped"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/MSFT_SPQuotaTemplate.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/MSFT_SPQuotaTemplate.psm1 deleted file mode 100644 index 124e29da..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/MSFT_SPQuotaTemplate.psm1 +++ /dev/null @@ -1,351 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.UInt32] - $StorageMaxInMB, - - [parameter(Mandatory = $false)] - [System.UInt32] - $StorageWarningInMB, - - [parameter(Mandatory = $false)] - [System.UInt32] - $MaximumUsagePointsSolutions, - - [parameter(Mandatory = $false)] - [System.UInt32] - $WarningUsagePointsSolutions, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting Quota Template settings for quota $Name" - - if ($StorageMaxInMB -lt $StorageWarningInMB) - { - Throw "StorageMaxInMB must be equal to or larger than StorageWarningInMB." - } - - if ($MaximumUsagePointsSolutions -lt $WarningUsagePointsSolutions) - { - Throw ("MaximumUsagePointsSolutions must be equal to or larger than " + ` - "WarningUsagePointsSolutions.") - } - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - try - { - $spFarm = Get-SPFarm - } - catch - { - Write-Verbose -Message ("No local SharePoint farm was detected. Quota " + ` - "template settings will not be applied") - return @{ - Name = $params.Name - StorageMaxInMB = 0 - StorageWarningInMB = 0 - MaximumUsagePointsSolutions = 0 - WarningUsagePointsSolutions = 0 - Ensure = "Absent" - InstallAccount = $params.InstallAccount - } - } - - # Get a reference to the Administration WebService - $admService = Get-SPDSCContentService - - $template = $admService.QuotaTemplates[$params.Name] - if ($null -eq $template) - { - return @{ - Name = $params.Name - Ensure = "Absent" - InstallAccount = $params.InstallAccount - } - } - else - { - return @{ - Name = $params.Name - # Convert from bytes to megabytes - StorageMaxInMB = ($template.StorageMaximumLevel / 1MB) - # Convert from bytes to megabytes - StorageWarningInMB = ($template.StorageWarningLevel / 1MB) - MaximumUsagePointsSolutions = $template.UserCodeMaximumLevel - WarningUsagePointsSolutions = $template.UserCodeWarningLevel - Ensure = "Present" - InstallAccount = $params.InstallAccount - } - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.UInt32] - $StorageMaxInMB, - - [parameter(Mandatory = $false)] - [System.UInt32] - $StorageWarningInMB, - - [parameter(Mandatory = $false)] - [System.UInt32] - $MaximumUsagePointsSolutions, - - [parameter(Mandatory = $false)] - [System.UInt32] - $WarningUsagePointsSolutions, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting Quota Template settings for quota $Name" - - if ($StorageMaxInMB -lt $StorageWarningInMB) - { - Throw "StorageMaxInMB must be equal to or larger than StorageWarningInMB." - } - - if ($MaximumUsagePointsSolutions -lt $WarningUsagePointsSolutions) - { - Throw ("MaximumUsagePointsSolutions must be equal to or larger than " + ` - "WarningUsagePointsSolutions.") - } - - switch ($Ensure) - { - "Present" { - Write-Verbose "Ensure is set to Present - Add or update template" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - try - { - $spFarm = Get-SPFarm - } - catch - { - throw ("No local SharePoint farm was detected. Quota " + ` - "template settings will not be applied") - return - } - - Write-Verbose -Message "Start update" - # Get a reference to the Administration WebService - $admService = Get-SPDSCContentService - - $template = $admService.QuotaTemplates[$params.Name] - - if ($null -eq $template) - { - #Template does not exist, create new template - $newTemplate = New-Object Microsoft.SharePoint.Administration.SPQuotaTemplate - $newTemplate.Name = $params.Name - if ($params.ContainsKey("StorageMaxInMB")) - { - $newTemplate.StorageMaximumLevel = ($params.StorageMaxInMB * 1MB) - } - if ($params.ContainsKey("StorageWarningInMB")) - { - $newTemplate.StorageWarningLevel = ($params.StorageWarningInMB * 1MB) - } - if ($params.ContainsKey("MaximumUsagePointsSolutions")) - { - $newTemplate.UserCodeMaximumLevel = $params.MaximumUsagePointsSolutions - } - if ($params.ContainsKey("WarningUsagePointsSolutions")) - { - $newTemplate.UserCodeWarningLevel = $params.WarningUsagePointsSolutions - } - $admService.QuotaTemplates.Add($newTemplate) - $admService.Update() - } - else - { - #Template exists, update settings - if ($params.ContainsKey("StorageMaxInMB")) - { - $template.StorageMaximumLevel = ($params.StorageMaxInMB * 1MB) - } - if ($params.ContainsKey("StorageWarningInMB")) - { - $template.StorageWarningLevel = ($params.StorageWarningInMB * 1MB) - } - if ($params.ContainsKey("MaximumUsagePointsSolutions")) - { - $template.UserCodeMaximumLevel = $params.MaximumUsagePointsSolutions - } - if ($params.ContainsKey("WarningUsagePointsSolutions")) - { - $template.UserCodeWarningLevel = $params.WarningUsagePointsSolutions - } - $admService.Update() - } - } - } - "Absent" { - Write-Verbose "Ensure is set to Absent - Removing template" - - if ($StorageMaxInMB ` - -or $StorageWarningInMB ` - -or $MaximumUsagePointsSolutions ` - -or $WarningUsagePointsSolutions) - { - Throw ("Do not use StorageMaxInMB, StorageWarningInMB, " + ` - "MaximumUsagePointsSolutions or WarningUsagePointsSolutions " + ` - "when Ensure is specified as Absent") - } - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - try - { - $spFarm = Get-SPFarm - } - catch - { - Write-Verbose -Message ("No local SharePoint farm was detected. Quota " + ` - "template settings will not be applied") - return - } - - Write-Verbose -Message "Start update" - # Get a reference to the Administration WebService - $admService = Get-SPDSCContentService - - # Delete template, function does not throw an error when the template does not - # exist. So safe to call without error handling. - $admService.QuotaTemplates.Delete($params.Name) - } - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.UInt32] - $StorageMaxInMB, - - [parameter(Mandatory = $false)] - [System.UInt32] - $StorageWarningInMB, - - [parameter(Mandatory = $false)] - [System.UInt32] - $MaximumUsagePointsSolutions, - - [parameter(Mandatory = $false)] - [System.UInt32] - $WarningUsagePointsSolutions, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing Quota Template settings for quota $Name" - - if ($StorageMaxInMB -lt $StorageWarningInMB) - { - Throw "StorageMaxInMB must be equal to or larger than StorageWarningInMB." - } - - if ($MaximumUsagePointsSolutions -lt $WarningUsagePointsSolutions) - { - Throw ("MaximumUsagePointsSolutions must be equal to or larger than " + ` - "WarningUsagePointsSolutions.") - } - - switch ($Ensure) - { - "Present" { - $CurrentValues = Get-TargetResource @PSBoundParameters - if ($CurrentValues.Ensure -eq "Absent") - { - return $false - } - return Test-SPDscParameterState -CurrentValues $CurrentValues -DesiredValues $PSBoundParameters - } - "Absent" { - if ($StorageMaxInMB ` - -or $StorageWarningInMB ` - -or $MaximumUsagePointsSolutions ` - -or $WarningUsagePointsSolutions) - { - Throw ("Do not use StorageMaxInMB, StorageWarningInMB, " + ` - "MaximumUsagePointsSolutions or WarningUsagePointsSolutions " + ` - "when Ensure is specified as Absent") - } - - $CurrentValues = Get-TargetResource @PSBoundParameters - if ($CurrentValues.Ensure -eq "Present") - { - # Error occured in Get method or template exists, which is not supposed to be. Return false - return $false - } - else - { - # Template does not exists, which is supposed to be. Return true - return $true - } - } - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/MSFT_SPQuotaTemplate.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/MSFT_SPQuotaTemplate.schema.mof deleted file mode 100644 index 991d4a68..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/MSFT_SPQuotaTemplate.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPQuotaTemplate")] -class MSFT_SPQuotaTemplate : OMI_BaseResource -{ - [Key, Description("The name of the quota template")] string Name; - [Write, Description("The maximum storage for sites of this template in MB")] uint32 StorageMaxInMB; - [Write, Description("The amount of storage for sites of this template that triggers a warning")] uint32 StorageWarningInMB; - [Write, Description("The maximum number of performance points for sandbox solutions for this template")] uint32 MaximumUsagePointsSolutions; - [Write, Description("The warning number of performance points for sandbox solutions for this template")] uint32 WarningUsagePointsSolutions; - [Write, Description("Present to create this template, absent to ensure it does not exist"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/MSFT_SPRemoteFarmTrust.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/MSFT_SPRemoteFarmTrust.psm1 deleted file mode 100644 index 0cacee9f..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/MSFT_SPRemoteFarmTrust.psm1 +++ /dev/null @@ -1,215 +0,0 @@ -function Get-TargetResource() -{ - [CmdletBinding()] - [OutputType([System.Collections.HashTable])] - param( - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [System.String] - $RemoteWebAppUrl, - - [Parameter(Mandatory = $true)] - [System.String] - $LocalWebAppUrl, - - [Parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] $Ensure = "Present", - - [Parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting remote farm trust '$Name'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $returnValue = @{ - Name = $params.Name - RemoteWebAppUrl = $params.RemoteWebAppUrl - LocalWebAppUrl = $params.LocalWebAppUrl - Ensure = "Absent" - InstallAccount = $params.InstallAccount - } - - $issuer = Get-SPTrustedSecurityTokenIssuer -Identity $params.Name ` - -ErrorAction SilentlyContinue - if ($null -eq $issuer) - { - return $returnValue - } - $rootAuthority = Get-SPTrustedRootAuthority -Identity $params.Name ` - -ErrorAction SilentlyContinue - if ($null -eq $rootAuthority) - { - return $returnValue - } - $realm = $issuer.NameId.Split("@") - $site = Get-SPSite -Identity $params.LocalWebAppUrl - $serviceContext = Get-SPServiceContext -Site $site - $currentRealm = Get-SPAuthenticationRealm -ServiceContext $serviceContext - - if ($realm[1] -ne $currentRealm) - { - return $returnValue - } - $returnValue.Ensure = "Present" - return $returnValue - } - return $result -} - -function Set-TargetResource() -{ - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [System.String] - $RemoteWebAppUrl, - - [Parameter(Mandatory = $true)] - [System.String] - $LocalWebAppUrl, - - [Parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] $Ensure = "Present", - - [Parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting remote farm trust '$Name'" - - if ($Ensure -eq "Present") - { - Write-Verbose -Message "Adding remote farm trust '$Name'" - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - $remoteWebApp = $params.RemoteWebAppUrl.TrimEnd('/') - - $issuer = Get-SPTrustedSecurityTokenIssuer -Identity $params.Name ` - -ErrorAction SilentlyContinue - if ($null -eq $issuer) - { - $endpoint = "$remoteWebApp/_layouts/15/metadata/json/1" - $issuer = New-SPTrustedSecurityTokenIssuer -Name $params.Name ` - -IsTrustBroker:$false ` - -MetadataEndpoint $endpoint - } - - $rootAuthority = Get-SPTrustedRootAuthority -Identity $params.Name ` - -ErrorAction SilentlyContinue - if ($null -eq $rootAuthority) - { - $endpoint = "$remoteWebApp/_layouts/15/metadata/json/1/rootcertificate" - New-SPTrustedRootAuthority -Name $params.Name ` - -MetadataEndPoint $endpoint - } - $realm = $issuer.NameId.Split("@") - $site = Get-SPSite -Identity $params.LocalWebAppUrl - $serviceContext = Get-SPServiceContext -Site $site - $currentRealm = Get-SPAuthenticationRealm -ServiceContext $serviceContext ` - -ErrorAction SilentlyContinue - - if ($realm[1] -ne $currentRealm) - { - Set-SPAuthenticationRealm -ServiceContext $serviceContext -Realm $realm[1] - } - - $appPrincipal = Get-SPAppPrincipal -Site $params.LocalWebAppUrl ` - -NameIdentifier $issuer.NameId - - Set-SPAppPrincipalPermission -Site $params.LocalWebAppUrl ` - -AppPrincipal $appPrincipal ` - -Scope SiteCollection ` - -Right FullControl - } - } - - if ($Ensure -eq "Absent") - { - Write-Verbose -Message "Removing remote farm trust '$Name'" - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - $remoteWebApp = $params.RemoteWebAppUrl.TrimEnd('/') - - $issuer = Get-SPTrustedSecurityTokenIssuer -Identity $params.Name ` - -ErrorAction SilentlyContinue - if ($null -ne $issuer) - { - $appPrincipal = Get-SPAppPrincipal -Site $params.LocalWebAppUrl ` - -NameIdentifier $issuer.NameId - Remove-SPAppPrincipalPermission -Site $params.LocalWebAppUrl ` - -AppPrincipal $appPrincipal ` - -Scope SiteCollection ` - -Confirm:$false - } - - Get-SPTrustedRootAuthority -Identity $params.Name ` - -ErrorAction SilentlyContinue ` - | Remove-SPTrustedRootAuthority -Confirm:$false - if ($null -ne $issuer) - { - $issuer | Remove-SPTrustedSecurityTokenIssuer -Confirm:$false - } - } - } -} - -function Test-TargetResource() -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param( - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [System.String] - $RemoteWebAppUrl, - - [Parameter(Mandatory = $true)] - [System.String] - $LocalWebAppUrl, - - [Parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] $Ensure = "Present", - - [Parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing remote farm trust '$Name'" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/MSFT_SPRemoteFarmTrust.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/MSFT_SPRemoteFarmTrust.schema.mof deleted file mode 100644 index d5c7ed3b..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/MSFT_SPRemoteFarmTrust.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPRemoteFarmTrust")] -class MSFT_SPRemoteFarmTrust : OMI_BaseResource -{ - [Key, Description("A name of the remote farm, used to create token issuer and root authority")] string Name; - [Required, Description("The URL of a web app in the remote farm, must use HTTPS")] string RemoteWebAppUrl; - [Required, Description("The URL of a local web app to connect the remote farm to")] string LocalWebAppUrl; - [Write, Description("Set to present to ensure the trust exists, or absent to ensure it is removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/MSFT_SPSearchAuthoritativePage.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/MSFT_SPSearchAuthoritativePage.psm1 deleted file mode 100644 index bb81bb92..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/MSFT_SPSearchAuthoritativePage.psm1 +++ /dev/null @@ -1,297 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $true)] - [System.String] - $Path, - - [ValidateRange(0.0, 2.0)] - [System.Single] - $Level, - - [ValidateSet("Authoratative","Demoted")] - [System.String] - $Action, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting Authoratative Page Setting for '$Path'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $nullReturn = @{ - ServiceAppName = $params.ServiceAppName - Path = "" - Level = $params.Level - Action = $params.Action - Ensure = "Absent" - InstallAccount = $params.InstallAccount - } - - $serviceApp = Get-SPEnterpriseSearchServiceApplication -Identity $params.ServiceAppName - if($null -eq $serviceApp) - { - return $nullReturn - } - - $searchObjectLevel = [Microsoft.Office.Server.Search.Administration.SearchObjectLevel]::Ssa - $searchOwner = New-Object -TypeName "Microsoft.Office.Server.Search.Administration.SearchObjectOwner" -ArgumentList $searchObjectLevel - - if($params.Action -eq "Authoratative") - { - - $queryAuthority = Get-SPEnterpriseSearchQueryAuthority -Identity $params.Path ` - -Owner $searchOwner ` - -SearchApplication $serviceApp ` - -ErrorAction SilentlyContinue - if($null -eq $queryAuthority) - { - return $nullReturn - } - else - { - - return @{ - ServiceAppName = $params.ServiceAppName - Path = $params.Path - Level = $queryAuthority.Level - Action = $params.Action - Ensure = "Present" - InstallAccount = $params.InstallAccount - } - } - } - else - { - $queryDemoted = $serviceApp | Get-SPEnterpriseSearchQueryDemoted -Identity $params.Path ` - -Owner $searchOwner ` - -SearchApplication $serviceApp ` - -ErrorAction SilentlyContinue - if($null -eq $queryDemoted) - { - return $nullReturn - } - else - { - return @{ - ServiceAppName = $params.ServiceAppName - Path = $params.Path - Action = $params.Action - Ensure = "Present" - InstallAccount = $params.InstallAccount - } - } - } - - } - return $result - -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $true)] - [System.String] - $Path, - - [ValidateRange(0.0, 2.0)] - [System.Single] - $Level, - - [ValidateSet("Authoratative","Demoted")] - [System.String] - $Action, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting Authoratative Page Settings for '$Path'" - - $CurrentResults = Get-TargetResource @PSBoundParameters - - if($CurrentResults.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApp = Get-SPEnterpriseSearchServiceApplication -Identity $params.ServiceAppName - $searchObjectLevel = [Microsoft.Office.Server.Search.Administration.SearchObjectLevel]::Ssa - $searchOwner = New-Object -TypeName "Microsoft.Office.Server.Search.Administration.SearchObjectOwner" -ArgumentList $searchObjectLevel - - if($null -eq $serviceApp) - { - throw "Search Service App was not available." - } - if($params.Action -eq "Authoratative") - { - New-SPEnterpriseSearchQueryAuthority -Url $params.Path ` - -SearchApplication $serviceApp ` - -Owner $searchOwner ` - -Level $params.Level - } - else - { - New-SPEnterpriseSearchQueryDemoted -Url $params.Path -SearchApplication $serviceApp -Owner $searchOwner - } - } - } - if($CurrentResults.Ensure -eq "Present" -and $Ensure -eq "Present") - { - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApp = Get-SPEnterpriseSearchServiceApplication -Identity $params.ServiceAppName - $searchObjectLevel = [Microsoft.Office.Server.Search.Administration.SearchObjectLevel]::Ssa - $searchOwner = New-Object -TypeName "Microsoft.Office.Server.Search.Administration.SearchObjectOwner" -ArgumentList $searchObjectLevel - - if($null -eq $serviceApp) - { - throw "Search Service App was not available." - } - - if($params.Action -eq "Authoratative") - { - Set-SPEnterpriseSearchQueryAuthority -Identity $params.ServiceAppName ` - -SearchApplication $ssa ` - -Owner $searchOwner ` - -Level $params.Level - } - } - } - if($Ensure -eq "Absent") - { - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApp = Get-SPEnterpriseSearchServiceApplication -Identity $params.ServiceAppName - $searchObjectLevel = [Microsoft.Office.Server.Search.Administration.SearchObjectLevel]::Ssa - $searchOwner = New-Object -TypeName "Microsoft.Office.Server.Search.Administration.SearchObjectOwner" -ArgumentList $searchObjectLevel - - if($null -eq $serviceApp) - { - throw "Search Service App was not available." - } - if($params.Action -eq "Authoratative") - { - Remove-SPEnterpriseSearchQueryAuthority -Identity $params.ServiceAppName ` - -SearchApplication $ssa ` - -Owner $searchOwner ` - -ErrorAction SilentlyContinue - } - else - { - Remove-SPEnterpriseSearchQueryDemoted -Identity $params.ServiceAppName ` - -SearchApplication $ssa ` - -Owner $searchOwner ` - -ErrorAction SilentlyContinue - } - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $true)] - [System.String] - $Path, - - [ValidateRange(0.0, 2.0)] - [System.Single] - $Level, - - [ValidateSet("Authoratative","Demoted")] - [System.String] - $Action, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing Authoratative Page Settings '$Path'" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - if($Ensure -eq "Present") - { - if($Action -eq "Authoratative") - { - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("ServiceAppName", - "Path", - "Level", - "Action", - "Ensure") - } - else - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("ServiceAppName", - "Path", - "Action", - "Ensure") - } - } - else - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("ServiceAppName", - "Action", - "Ensure") - } -} - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/MSFT_SPSearchAuthoritativePage.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/MSFT_SPSearchAuthoritativePage.schema.mof deleted file mode 100644 index 894d1f50..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/MSFT_SPSearchAuthoritativePage.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPSearchAuthoritativePage")] -class MSFT_SPSearchAuthoritativePage : OMI_BaseResource -{ - [Key, Description("Search Service Application Name")] String ServiceAppName; - [Key, Description("Source URI for the authoritative page")] String Path; - [Write, Description("Level of Authoratitive Page, values between 0.0 and 2.0")] Real32 Level; - [Write, Description("The resource will either make the page authoritative or demoted based on this value"), ValueMap{"Authoratative","Demoted"}, Values{"Authoratative","Demoted"}] String Action; - [Write, Description("Ensure the Authoritative is Present or Absent"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, EmbeddedInstance("MSFT_Credential"), Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/MSFT_SPSearchContentSource.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/MSFT_SPSearchContentSource.psm1 deleted file mode 100644 index 06bc16f2..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/MSFT_SPSearchContentSource.psm1 +++ /dev/null @@ -1,780 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $true)] - [ValidateSet("SharePoint","Website","FileShare")] - [System.String] - $ContentSourceType, - - [parameter(Mandatory = $true)] - [System.String[]] - $Addresses, - - [parameter(Mandatory = $true)] - [ValidateSet("CrawlEverything","CrawlFirstOnly","Custom")] - [System.String] - $CrawlSetting, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ContinuousCrawl, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance] - $IncrementalSchedule, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance] - $FullSchedule, - - [parameter(Mandatory = $false)] - [ValidateSet("Normal","High")] - [System.String] - $Priority, - - [parameter(Mandatory = $false)] - [System.UInt32] - $LimitPageDepth, - - [parameter(Mandatory = $false)] - [System.UInt32] - $LimitServerHops, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Boolean] - $Force, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting Content Source Setting for '$Name'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters, $PSScriptRoot) ` - -ScriptBlock { - $params = $args[0] - $ScriptRoot = $args[1] - - $relativePath = "..\..\Modules\SharePointDsc.Search\SPSearchContentSource.Schedules.psm1" - $modulePath = Join-Path -Path $ScriptRoot ` - -ChildPath $relativePath ` - -Resolve - Import-Module -Name $modulePath - - $source = Get-SPEnterpriseSearchCrawlContentSource -SearchApplication $params.ServiceAppName ` - -Identity $params.Name ` - -ErrorAction SilentlyContinue - if ($null -eq $source) - { - return @{ - Name = $params.Name - ServiceAppName = $params.ServiceAppName - ContentSourceType = $params.ContentSourceType - Ensure = "Absent" - } - } - - switch ($source.Type) - { - "SharePoint" { - $crawlSetting = "CrawlEverything" - if ($source.SharePointCrawlBehavior -eq "CrawlSites") - { - $crawlSetting = "CrawlFirstOnly" - } - - $incrementalSchedule = Get-SPDSCSearchCrawlSchedule ` - -Schedule $source.IncrementalCrawlSchedule - $fullSchedule = Get-SPDSCSearchCrawlSchedule ` - -Schedule $source.FullCrawlSchedule - - $result = @{ - Name = $params.Name - ServiceAppName = $params.ServiceAppName - Ensure = "Present" - ContentSourceType = "SharePoint" - Addresses = $source.StartAddresses.AbsoluteUri - CrawlSetting = $crawlSetting - ContinuousCrawl = $source.EnableContinuousCrawls - IncrementalSchedule = $incrementalSchedule - FullSchedule = $fullSchedule - Priority = $source.CrawlPriority - InstallAccount = $params.InstallAccount - } - } - "Web" { - $crawlSetting = "Custom" - if ($source.MaxPageEnumerationDepth -eq [System.Int32]::MaxValue) - { - $crawlSetting = "CrawlEverything" - } - if ($source.MaxPageEnumerationDepth -eq 0) - { - $crawlSetting = "CrawlFirstOnly" - } - - $incrementalSchedule = Get-SPDSCSearchCrawlSchedule ` - -Schedule $source.IncrementalCrawlSchedule - $fullSchedule = Get-SPDSCSearchCrawlSchedule ` - -Schedule $source.FullCrawlSchedule - - $result = @{ - Name = $params.Name - ServiceAppName = $params.ServiceAppName - Ensure = "Present" - ContentSourceType = "Website" - Addresses = $source.StartAddresses.AbsoluteUri - CrawlSetting = $crawlSetting - IncrementalSchedule = $incrementalSchedule - FullSchedule = $fullSchedule - LimitPageDepth = $source.MaxPageEnumerationDepth - LimitServerHops = $source.MaxSiteEnumerationDepth - Priority = $source.CrawlPriority - } - } - "File" { - $crawlSetting = "CrawlFirstOnly" - if ($source.FollowDirectories -eq $true) - { - $crawlSetting = "CrawlEverything" - } - - $addresses = $source.StartAddresses.AbsoluteUri - $addresses = $addresses.Replace("file:///","\\").Replace("/", "\") - - $incrementalSchedule = Get-SPDSCSearchCrawlSchedule ` - -Schedule $source.IncrementalCrawlSchedule - $fullSchedule = Get-SPDSCSearchCrawlSchedule ` - -Schedule $source.FullCrawlSchedule - - $result = @{ - Name = $params.Name - ServiceAppName = $params.ServiceAppName - Ensure = "Present" - ContentSourceType = "FileShare" - Addresses = $addresses - CrawlSetting = $crawlSetting - IncrementalSchedule = $incrementalSchedule - FullSchedule = $fullSchedule - Priority = $source.CrawlPriority - } - } - Default { - throw ("SharePointDsc does not currently support '$($source.Type)' content " + ` - "sources. Please use only 'SharePoint', 'FileShare' or 'Website'.") - } - } - return $result - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $true)] - [ValidateSet("SharePoint","Website","FileShare")] - [System.String] - $ContentSourceType, - - [parameter(Mandatory = $true)] - [System.String[]] - $Addresses, - - [parameter(Mandatory = $true)] - [ValidateSet("CrawlEverything","CrawlFirstOnly","Custom")] - [System.String] - $CrawlSetting, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ContinuousCrawl, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance] - $IncrementalSchedule, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance] - $FullSchedule, - - [parameter(Mandatory = $false)] - [ValidateSet("Normal","High")] - [System.String] - $Priority, - - [parameter(Mandatory = $false)] - [System.UInt32] - $LimitPageDepth, - - [parameter(Mandatory = $false)] - [System.UInt32] - $LimitServerHops, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Boolean] - $Force, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting Content Source Setting for '$Name'" - - switch ($ContentSourceType) - { - "SharePoint" { - if ($PSBoundParameters.ContainsKey("LimitPageDepth") -eq $true) - { - throw "Parameter LimitPageDepth is not valid for SharePoint content sources" - } - if ($PSBoundParameters.ContainsKey("LimitServerHops") -eq $true) - { - throw "Parameter LimitServerHops is not valid for SharePoint content sources" - } - if ($ContinuousCrawl -eq $true -and ` - $PSBoundParameters.ContainsKey("IncrementalSchedule") -eq $true) - { - throw ("You can not specify an incremental crawl schedule on a content source " + ` - "that will use continous crawl") - } - if ($CrawlSetting -eq "Custom") - { - throw ("Parameter 'CrawlSetting' can only be set to custom for website content " + ` - "sources") - } - } - "Website" { - if ($PSBoundParameters.ContainsKey("ContinuousCrawl") -eq $true) - { - throw "Parameter ContinuousCrawl is not valid for website content sources" - } - if ($PSBoundParameters.ContainsKey("LimitServerHops") -eq $true) - { - throw "Parameter LimitServerHops is not valid for website content sources" - } - } - "FileShare" { - if ($PSBoundParameters.ContainsKey("LimitPageDepth") -eq $true) - { - throw "Parameter LimitPageDepth is not valid for file share content sources" - } - if ($PSBoundParameters.ContainsKey("LimitServerHops") -eq $true) - { - throw "Parameter LimitServerHops is not valid for file share content sources" - } - if ($CrawlSetting -eq "Custom") - { - throw "Parameter 'CrawlSetting' can only be set to custom for website content sources" - } - } - } - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($ContentSourceType -ne $CurrentValues.ContentSourceType -and $Force -eq $false) - { - throw ("The type of the a search content source can not be changed from " + ` - "'$($CurrentValues.ContentSourceType)' to '$ContentSourceType' without " + ` - "deleting and adding it again. Specify 'Force = `$true' in order to allow " + ` - "DSC to do this, or manually remove the existing content source and re-run " + ` - "the configuration.") - } - - if (($ContentSourceType -ne $CurrentValues.ContentSourceType -and $Force -eq $true) ` - -or ($Ensure -eq "Absent" -and $CurrentValues.Ensure -ne $Ensure)) - { - # Remove the existing content source - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters) ` - -ScriptBlock { - $params = $args[0] - Remove-SPEnterpriseSearchCrawlContentSource -Identity $params.Name ` - -SearchApplication $params.ServiceAppName ` - -Confirm:$false - } - } - - if ($Ensure -eq "Present") - { - # Create the new content source and then apply settings to it - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters) ` - -ScriptBlock { - $params = $args[0] - - $OFS = "," - $startAddresses = "$($params.Addresses)" - - $source = Get-SPEnterpriseSearchCrawlContentSource ` - -SearchApplication $params.ServiceAppName ` - -Identity $params.Name ` - -ErrorAction SilentlyContinue - - if ($null -eq $source) - { - switch ($params.ContentSourceType) { - "SharePoint" { - $newType = "SharePoint" - } - "Website" { - $newType = "Web" - } - "FileShare" { - $newType = "File" - } - } - $source = New-SPEnterpriseSearchCrawlContentSource ` - -SearchApplication $params.ServiceAppName ` - -Type $newType ` - -Name $params.Name ` - -StartAddresses $startAddresses - } - - $allSetArguments = @{ - Identity = $params.Name - SearchApplication = $params.ServiceAppName - Confirm = $false - } - - if ($params.ContentSourceType -eq "SharePoint" -and ` - $source.EnableContinuousCrawls -eq $true) - { - Set-SPEnterpriseSearchCrawlContentSource @allSetArguments ` - -EnableContinuousCrawls $false - Write-Verbose -Message ("Pausing to allow Continuous Crawl to shut down " + ` - "correctly before continuing updating the configuration.") - Start-Sleep -Seconds 300 - } - - if ($source.CrawlStatus -ne "Idle") - { - Write-Verbose -Message ("Content source '$($params.Name)' is not idle, " + ` - "stopping current crawls to allow settings to be updated") - - $source = Get-SPEnterpriseSearchCrawlContentSource ` - -SearchApplication $params.ServiceAppName ` - -Identity $params.Name - - $source.StopCrawl() - $loopCount = 0 - - $sourceToWait = Get-SPEnterpriseSearchCrawlContentSource ` - -SearchApplication $params.ServiceAppName ` - -Identity $params.Name - - while ($sourceToWait.CrawlStatus -ne "Idle" -or $loopCount > 15) - { - $sourceToWait = Get-SPEnterpriseSearchCrawlContentSource ` - -SearchApplication $params.ServiceAppName ` - -Identity $params.Name - - Write-Verbose -Message ("$([DateTime]::Now.ToShortTimeString()) - Waiting " + ` - "for content source '$($params.Name)' to be idle " + ` - "(waited $loopCount of 15 minutes)") - Start-Sleep -Seconds 60 - $loopCount++ - } - } - - $primarySetArgs = @{ - StartAddresses = $startAddresses - } - - if ($params.ContainsKey("ContinuousCrawl") -eq $true) - { - $primarySetArgs.Add("EnableContinuousCrawls", $params.ContinuousCrawl) - } - - if ($params.ContainsKey("Priority") -eq $true) - { - switch ($params.Priority) - { - "High" { - $primarySetArgs.Add("CrawlPriority", "2") - } - "Normal" { - $primarySetArgs.Add("CrawlPriority", "1") - } - } - } - - Set-SPEnterpriseSearchCrawlContentSource @allSetArguments @primarySetArgs - - # Set the incremental search values - if ($params.ContainsKey("IncrementalSchedule") -eq $true -and ` - $null -ne $params.IncrementalSchedule) - { - $incrementalSetArgs = @{ - ScheduleType = "Incremental" - } - switch ($params.IncrementalSchedule.ScheduleType) - { - "None" { - $incrementalSetArgs.Add("RemoveCrawlSchedule", $true) - } - "Daily" { - $incrementalSetArgs.Add("DailyCrawlSchedule", $true) - } - "Weekly" { - $incrementalSetArgs.Add("WeeklyCrawlSchedule", $true) - $propertyTest = Test-SPDSCObjectHasProperty ` - -Object $params.IncrementalSchedule ` - -PropertyName "CrawlScheduleDaysOfWeek" - - if ($propertyTest -eq $true) - { - $OFS = "," - $enumValue = ` - [enum]::Parse([Microsoft.Office.Server.Search.Administration.DaysOfWeek], ` - "$($params.IncrementalSchedule.CrawlScheduleDaysOfWeek)") - - $incrementalSetArgs.Add("CrawlScheduleDaysOfWeek", $enumValue) - } - } - "Monthly" { - $incrementalSetArgs.Add("MonthlyCrawlSchedule", $true) - $propertyTest = Test-SPDSCObjectHasProperty ` - -Object $params.IncrementalSchedule ` - -PropertyName "CrawlScheduleDaysOfMonth" - - if ($propertyTest -eq $true) - { - $incrementalSetArgs.Add("CrawlScheduleDaysOfMonth", ` - $params.IncrementalSchedule.CrawlScheduleDaysOfMonth) - } - - $propertyTest = Test-SPDSCObjectHasProperty ` - -Object $params.IncrementalSchedule ` - -PropertyName "CrawlScheduleMonthsOfYear" - - if ($propertyTest -eq $true) - { - foreach ($month in $params.IncrementalSchedule.CrawlScheduleMonthsOfYear) { - $months += [Microsoft.Office.Server.Search.Administration.MonthsOfYear]::$month - } - $incrementalSetArgs.Add("CrawlScheduleMonthsOfYear", $months) - } - } - } - - $propertyTest = Test-SPDSCObjectHasProperty -Object $params.IncrementalSchedule ` - -PropertyName "CrawlScheduleRepeatDuration" - if ($propertyTest -eq $true) - { - $incrementalSetArgs.Add("CrawlScheduleRepeatDuration", - $params.IncrementalSchedule.CrawlScheduleRepeatDuration) - } - - $propertyTest = Test-SPDSCObjectHasProperty -Object $params.IncrementalSchedule ` - -PropertyName "CrawlScheduleRepeatInterval" - if ($propertyTest -eq $true) - { - $incrementalSetArgs.Add("CrawlScheduleRepeatInterval", - $params.IncrementalSchedule.CrawlScheduleRepeatInterval) - } - - $propertyTest = Test-SPDSCObjectHasProperty -Object $params.IncrementalSchedule ` - -PropertyName "CrawlScheduleRunEveryInterval" - if ($propertyTest -eq $true) { - $incrementalSetArgs.Add("CrawlScheduleRunEveryInterval", - $params.IncrementalSchedule.CrawlScheduleRunEveryInterval) - } - Set-SPEnterpriseSearchCrawlContentSource @allSetArguments @incrementalSetArgs - } - - # Set the full search values - if ($params.ContainsKey("FullSchedule") -eq $true) - { - $fullSetArgs = @{ - ScheduleType = "Full" - } - switch ($params.FullSchedule.ScheduleType) - { - "None" { - $fullSetArgs.Add("RemoveCrawlSchedule", $true) - } - "Daily" { - $fullSetArgs.Add("DailyCrawlSchedule", $true) - } - "Weekly" { - $fullSetArgs.Add("WeeklyCrawlSchedule", $true) - $propertyTest = Test-SPDSCObjectHasProperty -Object $params.FullSchedule ` - -PropertyName "CrawlScheduleDaysOfWeek" - if ($propertyTest -eq $true) - { - foreach ($day in $params.FullSchedule.CrawlScheduleDaysOfWeek) { - $daysOfweek += [Microsoft.Office.Server.Search.Administration.DaysOfWeek]::$day - } - $fullSetArgs.Add("CrawlScheduleDaysOfWeek", $daysOfweek) - } - } - "Monthly" { - $fullSetArgs.Add("MonthlyCrawlSchedule", $true) - $propertyTest = Test-SPDSCObjectHasProperty -Object $params.FullSchedule ` - -PropertyName "CrawlScheduleDaysOfMonth" - if ($propertyTest -eq $true) - { - $fullSetArgs.Add("CrawlScheduleDaysOfMonth", - $params.FullSchedule.CrawlScheduleDaysOfMonth) - } - - $propertyTest = Test-SPDSCObjectHasProperty -Object $params.FullSchedule ` - -PropertyName "CrawlScheduleMonthsOfYear" - if ($propertyTest -eq $true) - { - foreach ($month in $params.FullSchedule.CrawlScheduleMonthsOfYear) { - $months += [Microsoft.Office.Server.Search.Administration.MonthsOfYear]::$month - } - $fullSetArgs.Add("CrawlScheduleMonthsOfYear", $months) - } - } - } - - $propertyTest = Test-SPDSCObjectHasProperty -Object $params.FullSchedule ` - -PropertyName "CrawlScheduleRepeatDuration" - if ($propertyTest -eq $true) - { - $fullSetArgs.Add("CrawlScheduleRepeatDuration", - $params.FullSchedule.CrawlScheduleRepeatDuration) - } - - $propertyTest = Test-SPDSCObjectHasProperty -Object $params.FullSchedule ` - -PropertyName "CrawlScheduleRepeatInterval" - if ($propertyTest -eq $true) - { - $fullSetArgs.Add("CrawlScheduleRepeatInterval", - $params.FullSchedule.CrawlScheduleRepeatInterval) - } - - $propertyTest = Test-SPDSCObjectHasProperty -Object $params.FullSchedule ` - -PropertyName "CrawlScheduleRunEveryInterval" - if ($propertyTest -eq $true) - { - $fullSetArgs.Add("CrawlScheduleRunEveryInterval", - $params.FullSchedule.CrawlScheduleRunEveryInterval) - } - Set-SPEnterpriseSearchCrawlContentSource @allSetArguments @fullSetArgs - } - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $true)] - [ValidateSet("SharePoint","Website","FileShare")] - [System.String] - $ContentSourceType, - - [parameter(Mandatory = $true)] - [System.String[]] - $Addresses, - - [parameter(Mandatory = $true)] - [ValidateSet("CrawlEverything","CrawlFirstOnly","Custom")] - [System.String] - $CrawlSetting, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ContinuousCrawl, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance] - $IncrementalSchedule, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance] - $FullSchedule, - - [parameter(Mandatory = $false)] - [ValidateSet("Normal","High")] - [System.String] - $Priority, - - [parameter(Mandatory = $false)] - [System.UInt32] - $LimitPageDepth, - - [parameter(Mandatory = $false)] - [System.UInt32] - $LimitServerHops, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Boolean] - $Force, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing Content Source Setting for '$Name'" - - $PSBoundParameters.Ensure = $Ensure - - switch ($ContentSourceType) - { - "SharePoint" { - if ($PSBoundParameters.ContainsKey("LimitPageDepth") -eq $true) - { - throw "Parameter LimitPageDepth is not valid for SharePoint content sources" - } - if ($PSBoundParameters.ContainsKey("LimitServerHops") -eq $true) - { - throw "Parameter LimitServerHops is not valid for SharePoint content sources" - } - if ($ContinuousCrawl -eq $true -and ` - $PSBoundParameters.ContainsKey("IncrementalSchedule") -eq $true) - { - throw ("You can not specify an incremental crawl schedule on a content source " + ` - "that will use continous crawl") - } - if ($CrawlSetting -eq "Custom") - { - throw ("Parameter 'CrawlSetting' can only be set to custom for website content " + ` - "sources") - } - } - "Website" { - if ($PSBoundParameters.ContainsKey("ContinuousCrawl") -eq $true) - { - throw "Parameter ContinuousCrawl is not valid for website content sources" - } - if ($PSBoundParameters.ContainsKey("LimitServerHops") -eq $true) - { - throw "Parameter LimitServerHops is not valid for website content sources" - } - } - "FileShare" { - if ($PSBoundParameters.ContainsKey("LimitPageDepth") -eq $true) - { - throw "Parameter LimitPageDepth is not valid for file share content sources" - } - if ($PSBoundParameters.ContainsKey("LimitServerHops") -eq $true) - { - throw "Parameter LimitServerHops is not valid for file share content sources" - } - if ($CrawlSetting -eq "Custom") - { - throw "Parameter 'CrawlSetting' can only be set to custom for website content sources" - } - } - } - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($Ensure -eq "Absent" -or $CurrentValues.Ensure -eq "Absent") - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") - } - - $relativePath = "..\..\Modules\SharePointDsc.Search\SPSearchContentSource.Schedules.psm1" - $modulePath = Join-Path -Path $PSScriptRoot ` - -ChildPath $relativePath ` - -Resolve - Import-Module -Name $modulePath - - if (($PSBoundParameters.ContainsKey("IncrementalSchedule") -eq $true) -and ($null -ne $IncrementalSchedule)) - { - $propertyTest = Test-SPDSCSearchCrawlSchedule -CurrentSchedule $CurrentValues.IncrementalSchedule ` - -DesiredSchedule $IncrementalSchedule - if ($propertyTest -eq $false) - { - return $false - } - } - - if (($PSBoundParameters.ContainsKey("FullSchedule") -eq $true) -and ($null -ne $FullSchedule)) - { - $propertyTest = Test-SPDSCSearchCrawlSchedule -CurrentSchedule $CurrentValues.FullSchedule ` - -DesiredSchedule $FullSchedule - if ($propertyTest -eq $false) - { - return $false - } - } - - # Compare the addresses as Uri objects to handle things like trailing /'s on URLs - $currentAddresses = @() - foreach ($address in $CurrentValues.Addresses) - { - $currentAddresses += New-Object -TypeName System.Uri -ArgumentList $address - } - $desiredAddresses = @() - foreach ($address in $Addresses) - { - $desiredAddresses += New-Object -TypeName System.Uri -ArgumentList $address - } - - if ($null -ne (Compare-Object -ReferenceObject $currentAddresses ` - -DifferenceObject $desiredAddresses)) - { - return $false - } - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("ContentSourceType", - "CrawlSetting", - "ContinousCrawl", - "Priority", - "LimitPageDepth", - "LimitServerHops", - "Ensure") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/MSFT_SPSearchContentSource.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/MSFT_SPSearchContentSource.schema.mof deleted file mode 100644 index 03b8db0d..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/MSFT_SPSearchContentSource.schema.mof +++ /dev/null @@ -1,31 +0,0 @@ -[ClassVersion("1.0.0")] -Class MSFT_SPSearchCrawlSchedule -{ - [Required, Description("How frequently should this crawl be run"), ValueMap{"None","Daily","Weekly","Monthly"}, Values{"None","Daily","Weekly","Monthly"}] String ScheduleType; - [Write, Description("Monthly crawls only: Which day of the month should the crawl run on")] Uint32 CrawlScheduleDaysOfMonth; - [Write, Description("Weekly crawls only: What days should the crawl be run on"), ValueMap{"Everyday", "Weekdays", "Weekends", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"}, Values{"Everyday", "Weekdays", "Weekends", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"}] String CrawlScheduleDaysOfWeek[]; - [Write, Description("Monthly crawls only: Which months should this crawl be run during"), ValueMap{"AllMonths", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, Values{"AllMonths", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}] String CrawlScheduleMonthsOfYear[]; - [Write, Description("The hour of the day that the schedule should begin")] Uint32 StartHour; - [Write, Description("The minute of the specified hour that the schedule should begin")] Uint32 StartMinute; - [Write, Description("Specifies the number of times to repeat the crawl within a day")] Uint32 CrawlScheduleRepeatDuration; - [Write, Description("Specifies the number of minutes between crawl repeats on a day")] Uint32 CrawlScheduleRepeatInterval; - [Write, Description("For daily crawls, this is the number of days between crawls. For weekly this is the number of weeks between crawls")] Uint32 CrawlScheduleRunEveryInterval; -}; -[ClassVersion("1.0.0.0"), FriendlyName("SPSearchContentSource")] -class MSFT_SPSearchContentSource : OMI_BaseResource -{ - [Key, Description("The name of the content source")] String Name; - [Key, Description("The name of the search service app that this content source exists within")] String ServiceAppName; - [Required, Description("The type of content source - currently only SharePoint, Website and File Shares are supported"), ValueMap{"SharePoint","Website","FileShare"}, Values{"SharePoint","Website","FileShare"}] String ContentSourceType; - [Required, Description("A list of the addresses this content source includes")] String Addresses[]; - [Required, Description("Should the crawler index everything, just the first site or page, or a custom depth (applies to websites only)"), ValueMap{"CrawlEverything","CrawlFirstOnly","Custom"}, Values{"CrawlEverything","CrawlFirstOnly","Custom"}] String CrawlSetting; - [Write, Description("Should this content source use continuous crawl (SharePoint sites only)")] Boolean ContinuousCrawl; - [Write, Description("What is the incremental schedule for this content source"), EmbeddedInstance("MSFT_SPSearchCrawlSchedule")] String IncrementalSchedule; - [Write, Description("What is the full schedule for this content source"), EmbeddedInstance("MSFT_SPSearchCrawlSchedule")] String FullSchedule; - [Write, Description("What is the priority on this content source"), ValueMap{"Normal","High"}, Values{"Normal","High"}] String Priority; - [Write, Description("How many pages deep should the crawler go (-1 = unlimited, website sources only)")] Uint32 LimitPageDepth; - [Write, Description("How many server hops should the crawler make (-1 = unlimtied, website sources only)")] Uint32 LimitServerHops; - [Write, Description("Present if the source should exist, absent if it should not"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("Specify true if DSC is allowed to delete and recreate a content source to apply the correct settings, otherwise false will just report errors if a change can not be applied.")] Boolean Force; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/MSFT_SPSearchCrawlMapping.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/MSFT_SPSearchCrawlMapping.psm1 deleted file mode 100644 index 4a32d344..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/MSFT_SPSearchCrawlMapping.psm1 +++ /dev/null @@ -1,225 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $true)] - [System.String] - $Target, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting Search Crawl Mapping for '$Url'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - - $params = $args[0] - $searchApp = Get-SPEnterpriseSearchServiceApplication -Identity $params.ServiceAppName - if($null -eq $searchApp) - { - Write-Verbose -Message "Search Service Application $($params.ServiceAppName) not found" - $returnVal = @{ - ServiceAppName = "" - Url = $params.Url - Target = "" - Ensure = "Absent" - InstallAccount = $params.InstallAccount - } - return $returnVal - } - - $mappings = $searchApp | Get-SPEnterpriseSearchCrawlMapping - - if($null -eq $mappings) - { - Write-Verbose -Message "Search Service Application $($params.ServiceAppName) has no mappings" - $returnVal = @{ - ServiceAppName = $params.ServiceAppName - Url = $params.Url - Target = "" - Ensure = "Absent" - InstallAccount = $params.InstallAccount - } - return $returnVal - } - - $mapping = $mappings | Where-Object -FilterScript { $_.Source -eq "$($params.Url)" } | Select-Object -First 1 - - if($null -eq $mapping) - { - Write-Verbose "Search Service Application $($params.ServiceAppName) has no matching mapping" - $returnVal = @{ - ServiceAppName = $params.ServiceAppName - Url = $params.Url - Target = "" - Ensure = "Absent" - InstallAccount = $params.InstallAccount - } - return $returnVal - } - else - { - Write-Verbose "Search Service Application $($params.ServiceAppName) has a matching mapping" - $returnVal = @{ - ServiceAppName = $params.ServiceAppName - Url = $mapping.Source - Target = $mapping.Target - Ensure = "Present" - InstallAccount = $params.InstallAccount - } - return $returnVal - - } - - } - - return $result - -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $true)] - [System.String] - $Target, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [System.Management.Automation.PSCredential] - $InstallAccount - ) - Write-Verbose -Message "Setting Search Crawl Mapping Rule '$Url'" - $result = Get-TargetResource @PSBoundParameters - - if($result.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - Write-Verbose "Adding the Crawl Mapping '$Url'" - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $searchApp = Get-SPEnterpriseSearchServiceApplication -Identity $params.ServiceAppName - if($null -eq $searchApp) - { - throw [Exception] "The Search Service Application does not exist" - } - else - { - New-SPEnterpriseSearchCrawlMapping -SearchApplication $searchApp -Url $params.Url -Target $params.Target - } - } - } - if($result.Ensure -eq "Present" -and $Ensure -eq "Present") - { - Write-Verbose "Updating the Crawl Mapping '$Url'" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $searchApp = Get-SPEnterpriseSearchServiceApplication -Identity $params.ServiceAppName - $mappings = $searchApp | Get-SPEnterpriseSearchCrawlMapping - $mapping = $mappings | Where-Object -FilterScript { $_.Source -eq $params.Url } | Select-Object -First 1 - $mapping | Remove-SPEnterpriseSearchCrawlMapping - - New-SPEnterpriseSearchCrawlMapping -SearchApplication $searchApp -Url $params.Url -Target $params.Target - } - } - if($result.Ensure -eq "Present" -and $Ensure -eq "Absent") - { - - Write-Verbose "Removing the Crawl Mapping '$Url'" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $searchapp = Get-SPEnterpriseSearchServiceApplication -Identity $params.ServiceAppName - $mappings = $searchApp | Get-SPEnterpriseSearchCrawlMapping - $mapping = $mappings | Where-Object -FilterScript { $_.Source -eq $params.Url } | Select-Object -First 1 - $mapping | Remove-SPEnterpriseSearchCrawlMapping - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $true)] - [System.String] - $Target, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [System.Management.Automation.PSCredential] - $InstallAccount - ) - Write-Verbose -Message "Testing Search Crawl Mapping for '$Url'" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if($Ensure -eq "Present") - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("ServiceAppName","Url","Target","Ensure") - } - else - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") - } -} - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/MSFT_SPSearchCrawlMapping.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/MSFT_SPSearchCrawlMapping.schema.mof deleted file mode 100644 index d62f23d8..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/MSFT_SPSearchCrawlMapping.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("SPSearchCrawlMapping")] -class MSFT_SPSearchCrawlMapping : OMI_BaseResource -{ - [Key, Description("Search Service Application Name")] String ServiceAppName; - [Key, Description("Source URI for the crawl mapping")] String Url; - [Required, Description("Target URI for the crawl mapping")] String Target; - [Write, Description("Ensure the crawl mapping is Present or Absent"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, EmbeddedInstance("MSFT_Credential"), Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/MSFT_SPSearchCrawlRule.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/MSFT_SPSearchCrawlRule.psm1 deleted file mode 100644 index d44e9c96..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/MSFT_SPSearchCrawlRule.psm1 +++ /dev/null @@ -1,555 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Path, - - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $false)] - [ValidateSet("DefaultRuleAccess", - "BasicAccountRuleAccess", - "CertificateRuleAccess", - "NTLMAccountRuleAccess", - "FormRuleAccess", - "CookieRuleAccess", - "AnonymousAccess")] - [System.String] - $AuthenticationType, - - [parameter(Mandatory = $false)] - [ValidateSet("InclusionRule","ExclusionRule")] - [System.String] - $RuleType, - - [parameter(Mandatory = $false)] - [ValidateSet("FollowLinksNoPageCrawl", - "CrawlComplexUrls", - "CrawlAsHTTP")] - [System.String[]] - $CrawlConfigurationRules, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $AuthenticationCredentials, - - [parameter(Mandatory = $false)] - [System.String] - $CertificateName, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting Search Crawl Rule '$Path'" - - # AuthenticationType=CertificateName and CertificateRuleAccess parameters not specified - if ($AuthenticationType -eq "CertificateRuleAccess" -and -not $CertificateName) - { - throw ("When AuthenticationType=CertificateRuleAccess, the parameter " + ` - "CertificateName is required") - } - - # AuthenticationType=CertificateName and CertificateRuleAccess parameters not - # specified correctly - if ($AuthenticationType -ne "CertificateRuleAccess" -and $CertificateName) - { - throw "When specifying CertificateName, the AuthenticationType parameter is required" - } - - # AuthenticationType=NTLMAccountRuleAccess and AuthenticationCredentialsparameters - # not specified - if (($AuthenticationType -eq "NTLMAccountRuleAccess" ` - -or $AuthenticationType -eq "BasicAccountRuleAccess") ` - -and -not $AuthenticationCredentials) - { - throw ("When AuthenticationType is NTLMAccountRuleAccess or BasicAccountRuleAccess, " + ` - "the parameter AuthenticationCredentials is required") - } - - # AuthenticationCredentials parameters, but AuthenticationType is not NTLMAccountRuleAccess - # or BasicAccountRuleAccess - if ($AuthenticationCredentials ` - -and $AuthenticationType -ne "NTLMAccountRuleAccess" ` - -and $AuthenticationType -ne "BasicAccountRuleAccess") - { - throw ("When specifying AuthenticationCredentials, the AuthenticationType " + ` - "parameter is required") - } - - # ExclusionRule only with CrawlConfigurationRules=CrawlComplexUrls - if ($RuleType -eq "ExclusionRule" ` - -and ($CrawlConfigurationRules -contains "CrawlAsHTTP" ` - -or $CrawlConfigurationRules -contains "FollowLinksNoPageCrawl")) - { - throw ("When RuleType=ExclusionRule, CrawlConfigurationRules cannot contain " + ` - "the values FollowLinksNoPageCrawl or CrawlAsHTTP") - } - - # ExclusionRule cannot be used with AuthenticationCredentials, CertificateName or - # AuthenticationType parameters - if ($RuleType -eq "ExclusionRule" ` - -and ($AuthenticationCredentials -or $CertificateName -or $AuthenticationType)) - { - throw ("When Type=ExclusionRule, parameters AuthenticationCredentials, " + ` - "CertificateName or AuthenticationType are not allowed") - } - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApps = Get-SPServiceApplication -Name $params.ServiceAppName ` - -ErrorAction SilentlyContinue - - $nullReturn = @{ - Path = $params.Path - ServiceAppName = $params.ServiceAppName - Ensure = "Absent" - InstallAccount = $params.InstallAccount - } - - if ($null -eq $serviceApps) - { - Write-Verbose -Message "Service Application $($params.ServiceAppName) not found" - return $nullReturn - } - - $serviceApp = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Server.Search.Administration.SearchServiceApplication" - } - - if ($null -eq $serviceApp) - { - Write-Verbose -Message "Service Application $($params.ServiceAppName) not found" - return $nullReturn - } - else - { - $crawlRule = Get-SPEnterpriseSearchCrawlRule ` - -SearchApplication $params.ServiceAppName | Where-Object -FilterScript { - $_.Path -eq $params.Path - } - - if ($null -eq $crawlRule) - { - Write-Verbose -Message "Crawl rule $($params.Path) not found" - return $nullReturn - } - else - { - $crawlConfigurationRules = @() - if ($crawlRule.SuppressIndexing) - { - $crawlConfigurationRules += "FollowLinksNoPageCrawl" - } - if ($crawlRule.FollowComplexUrls) - { - $crawlConfigurationRules += "CrawlComplexUrls" - } - if ($crawlRule.CrawlAsHttp) - { - $crawlConfigurationRules += "CrawlAsHTTP" - } - - switch ($crawlRule.AuthenticationType) - { - {@("BasicAccountRuleAccess", - "NTLMAccountRuleAccess") -contains $_ } { - $returnVal = @{ - Path = $params.Path - ServiceAppName = $params.ServiceAppName - AuthenticationType = $crawlRule.AuthenticationType - RuleType = $crawlRule.Type.ToString() - CrawlConfigurationRules = $crawlConfigurationRules - AuthenticationCredentials = $crawlRule.AccountName - Ensure = "Present" - InstallAccount = $params.InstallAccount - } - } - "CertificateRuleAccess" { - $returnVal = @{ - Path = $params.Path - ServiceAppName = $params.ServiceAppName - AuthenticationType = $crawlRule.AuthenticationType - RuleType = $crawlRule.Type.ToString() - CrawlConfigurationRules = $crawlConfigurationRules - CertificateName = $crawlRule.AccountName - Ensure = "Present" - InstallAccount = $params.InstallAccount - } - } - { @("DefaultRuleAccess", - "FormRuleAccess", - "CookieRuleAccess", - "AnonymousAccess") -contains $_ } { - $returnVal = @{ - Path = $params.Path - ServiceAppName = $params.ServiceAppName - AuthenticationType = $crawlRule.AuthenticationType.ToString() - RuleType = $crawlRule.Type.ToString() - CrawlConfigurationRules = $crawlConfigurationRules - Ensure = "Present" - InstallAccount = $params.InstallAccount - } - } - default { - Path = $params.Path - ServiceAppName = $params.ServiceAppName - AuthenticationType = "Unknown" - RuleType = $crawlRule.Type.ToString() - CrawlConfigurationRules = $crawlConfigurationRules - Ensure = "Present" - InstallAccount = $params.InstallAccount - } - } - return $returnVal - } - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Path, - - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $false)] - [ValidateSet("DefaultRuleAccess", - "BasicAccountRuleAccess", - "CertificateRuleAccess", - "NTLMAccountRuleAccess", - "FormRuleAccess", - "CookieRuleAccess", - "AnonymousAccess")] - [System.String] - $AuthenticationType, - - [parameter(Mandatory = $false)] - [ValidateSet("InclusionRule","ExclusionRule")] - [System.String] - $RuleType, - - [parameter(Mandatory = $false)] - [ValidateSet("FollowLinksNoPageCrawl", - "CrawlComplexUrls", - "CrawlAsHTTP")] - [System.String[]] - $CrawlConfigurationRules, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $AuthenticationCredentials, - - [parameter(Mandatory = $false)] - [System.String] - $CertificateName, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting Search Crawl Rule '$Path'" - - $result = Get-TargetResource @PSBoundParameters - - # AuthenticationType=CertificateName and CertificateRuleAccess parameters not specified - if ($AuthenticationType -eq "CertificateRuleAccess" -and -not $CertificateName) - { - throw ("When AuthenticationType=CertificateRuleAccess, the parameter " + ` - "CertificateName is required") - } - - # AuthenticationType=CertificateName and CertificateRuleAccess parameters not - # specified correctly - if ($AuthenticationType -ne "CertificateRuleAccess" -and $CertificateName) - { - throw "When specifying CertificateName, the AuthenticationType parameter is required" - } - - # AuthenticationType=NTLMAccountRuleAccess and AuthenticationCredentialsparameters - # not specified - if (($AuthenticationType -eq "NTLMAccountRuleAccess" ` - -or $AuthenticationType -eq "BasicAccountRuleAccess") ` - -and -not $AuthenticationCredentials) - { - throw ("When AuthenticationType is NTLMAccountRuleAccess or BasicAccountRuleAccess, " + ` - "the parameter AuthenticationCredentials is required") - } - - # AuthenticationCredentials parameters, but AuthenticationType is not NTLMAccountRuleAccess - # or BasicAccountRuleAccess - if ($AuthenticationCredentials ` - -and $AuthenticationType -ne "NTLMAccountRuleAccess" ` - -and $AuthenticationType -ne "BasicAccountRuleAccess") - { - throw ("When specifying AuthenticationCredentials, the AuthenticationType " + ` - "parameter is required") - } - - # ExclusionRule only with CrawlConfigurationRules=CrawlComplexUrls - if ($RuleType -eq "ExclusionRule" ` - -and ($CrawlConfigurationRules -contains "CrawlAsHTTP" ` - -or $CrawlConfigurationRules -contains "FollowLinksNoPageCrawl")) - { - throw ("When RuleType=ExclusionRule, CrawlConfigurationRules cannot contain " + ` - "the values FollowLinksNoPageCrawl or CrawlAsHTTP") - } - - # ExclusionRule cannot be used with AuthenticationCredentials, CertificateName or - # AuthenticationType parameters - if ($RuleType -eq "ExclusionRule" ` - -and ($AuthenticationCredentials -or $CertificateName -or $AuthenticationType)) - { - throw ("When Type=ExclusionRule, parameters AuthenticationCredentials, " + ` - "CertificateName or AuthenticationType are not allowed") - } - - if ($result.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - Write-Verbose -Message "Creating Crawl Rule $Path" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $newParams = @{ - Path = $params.Path - SearchApplication = $params.ServiceAppName - } - if ($params.ContainsKey("AuthenticationType") -eq $true) - { - $newParams.Add("AuthenticationType", $params.AuthenticationType) - } - if ($params.ContainsKey("RuleType") -eq $true) - { - $newParams.Add("Type", $params.RuleType) - } - if ($params.ContainsKey("CrawlConfigurationRules") -eq $true) - { - if($params.CrawlConfigurationRules -contains "FollowLinksNoPageCrawl") - { - $newParams.Add("SuppressIndexing",1) - } - if($params.CrawlConfigurationRules -contains "CrawlComplexUrls") - { - $newParams.Add("FollowComplexUrls",1) - } - if($params.CrawlConfigurationRules -contains "CrawlAsHTTP") - { - $newParams.Add("CrawlAsHttp",1) - } - } - if ($params.ContainsKey("AuthenticationCredentials") -eq $true) - { - $newParams.Add("AccountName", $params.AuthenticationCredentials.UserName) - $newParams.Add("AccountPassword", $params.AuthenticationCredentials.Password) - } - if ($params.ContainsKey("CertificateName") -eq $true) - { - $newParams.Add("CertificateName", $params.CertificateName) - } - - New-SPEnterpriseSearchCrawlRule @newParams - } - } - if ($result.Ensure -eq "Present" -and $Ensure -eq "Present") - { - Write-Verbose -Message "Updating Crawl Rule $Path" - Invoke-SPDSCCommand -Credential $InstallAccount -Arguments $PSBoundParameters -ScriptBlock { - $params = $args[0] - - $crawlRule = Get-SPEnterpriseSearchCrawlRule ` - -SearchApplication $params.ServiceAppName | Where-Object -FilterScript { - $_.Path -eq $params.Path - } - - if ($null -ne $crawlRule) - { - $setParams = @{ - Identity = $params.Path - SearchApplication = $params.ServiceAppName - } - if ($params.ContainsKey("AuthenticationType") -eq $true) - { - $setParams.Add("AuthenticationType", $params.AuthenticationType) - } - if ($params.ContainsKey("RuleType") -eq $true) - { - $setParams.Add("Type", $params.RuleType) - } - if ($params.ContainsKey("CrawlConfigurationRules") -eq $true) - { - if($params.CrawlConfigurationRules -contains "FollowLinksNoPageCrawl") - { - $setParams.Add("SuppressIndexing",1) - } - if($params.CrawlConfigurationRules -contains "CrawlComplexUrls") - { - $setParams.Add("FollowComplexUrls",1) - } - if($params.CrawlConfigurationRules -contains "CrawlAsHTTP") - { - $setParams.Add("CrawlAsHttp",1) - } - } - if ($params.ContainsKey("AuthenticationCredentials") -eq $true) - { - $setParams.Add("AccountName", $params.AuthenticationCredentials.UserName) - $setParams.Add("AccountPassword", $params.AuthenticationCredentials.Password) - } - if ($params.ContainsKey("CertificateName") -eq $true) - { - $setParams.Add("AccountName", $params.CertificateName) - } - Set-SPEnterpriseSearchCrawlRule @setParams - } - } - } - - if ($Ensure -eq "Absent") - { - Write-Verbose -Message "Removing Crawl Rule $Path" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - Remove-SPEnterpriseSearchCrawlRule -SearchApplication $params.ServiceAppName ` - -Identity $params.Path ` - -Confirm:$false - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Path, - - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $false)] - [ValidateSet("DefaultRuleAccess", - "BasicAccountRuleAccess", - "CertificateRuleAccess", - "NTLMAccountRuleAccess", - "FormRuleAccess", - "CookieRuleAccess", - "AnonymousAccess")] - [System.String] - $AuthenticationType, - - [parameter(Mandatory = $false)] - [ValidateSet("InclusionRule","ExclusionRule")] - [System.String] - $RuleType, - - [parameter(Mandatory = $false)] - [ValidateSet("FollowLinksNoPageCrawl", - "CrawlComplexUrls", - "CrawlAsHTTP")] - [System.String[]] - $CrawlConfigurationRules, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $AuthenticationCredentials, - - [parameter(Mandatory = $false)] - [System.String] - $CertificateName, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing Search Crawl Rule '$Path'" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($Ensure -eq "Present") - { - if ($CrawlConfigurationRules) - { - if ($CurrentValues.ContainsKey("CrawlConfigurationRules")) - { - $compareObject = Compare-Object ` - -ReferenceObject $CrawlConfigurationRules ` - -DifferenceObject $CurrentValues.CrawlConfigurationRules - if ($null -ne $compareObject) - { - return $false - } - } - else - { - return $false - } - } - - if ($CurrentValues.ContainsKey("AuthenticationCredentials") -and $AuthenticationCredentials) - { - if ($AuthenticationCredentials.UserName -ne $CurrentValues.AuthenticationCredentials) - { - return $false - } - } - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure", - "AuthenticationType", - "RuleType", - "CertificateName") - } else { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/MSFT_SPSearchCrawlRule.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/MSFT_SPSearchCrawlRule.schema.mof deleted file mode 100644 index 0df36c22..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/MSFT_SPSearchCrawlRule.schema.mof +++ /dev/null @@ -1,14 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPSearchCrawlRule")] -class MSFT_SPSearchCrawlRule : OMI_BaseResource -{ - [Key, Description("The name of the search service application")] string Path; - [Required, Description("The name of the search service application")] string ServiceAppName; - [Write, Description("Authentication type used by the crawl rule"), ValueMap{"DefaultRuleAccess","BasicAccountRuleAccess","CertificateRuleAccess","NTLMAccountRuleAccess","FormRuleAccess","CookieRuleAccess","AnonymousAccess"}, Values{"DefaultRuleAccess","BasicAccountRuleAccess","CertificateRuleAccess","NTLMAccountRuleAccess","FormRuleAccess","CookieRuleAccess","AnonymousAccess"}] string AuthenticationType; - [Write, Description("The type of the rule"), ValueMap{"InclusionRule","ExclusionRule"}, Values{"InclusionRule","ExclusionRule"}] string RuleType; - [Write, Description("The configuration options for this rule"), ValueMap{"FollowLinksNoPageCrawl","CrawlComplexUrls","CrawlAsHTTP"}, Values{"FollowLinksNoPageCrawl","CrawlComplexUrls","CrawlAsHTTP"}] string CrawlConfigurationRules[]; - [Write, Description("The credentials used for this crawl rule (used for types BasicAccountRuleAccess and NTLMAccountRuleAccess)"), EmbeddedInstance("MSFT_Credential")] String AuthenticationCredentials; - [Write, Description("The certificate used for this crawl rule (used for type CertificateRuleAccess)")] string CertificateName; - [Write, Description("Present if the crawl rule should exist, absent if it should not"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/MSFT_SPSearchCrawlerImpactRule.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/MSFT_SPSearchCrawlerImpactRule.psm1 deleted file mode 100644 index 22b5586f..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/MSFT_SPSearchCrawlerImpactRule.psm1 +++ /dev/null @@ -1,288 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [System.UInt32] - $RequestLimit = 0, - - [System.UInt32] - $WaitTime = 0, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting Crawler Impact Rule Setting for '$Name'" - - if(($RequestLimit -gt 0) -and ($WaitTime -gt 0)) - { - throw "Only one Crawler Impact Rule HitRate argument (RequestLimit, WaitTime) can be specified" - } - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $nullReturn = @{ - - ServiceAppName = $params.ServiceAppName - Name = $params.Name - RequestLimit = $null - WaitTime = $null - Ensure = "Absent" - InstallAccount = $params.InstallAccount - } - - - $serviceApp = Get-SPEnterpriseSearchServiceApplication -Identity $params.ServiceAppName - if($null -eq $serviceApp) - { - $nullReturn.ServiceAppName = $null - return $nullReturn - } - else - { - $crawlerImpactRule = Get-SPEnterpriseSearchSiteHitRule -Identity $params.Name -SearchService $serviceApp - if($null -eq $crawlerImpactRule) - { - return $nullReturn - } - else - { - if($crawlerImpactRule.Behavior -eq "0") - { - return @{ - ServiceAppName = $params.ServiceAppName - Name = $params.Name - RequestLimit = $crawlerImpactRule.HitRate - WaitTime = 0 - Ensure = "Present" - InstallAccount = $params.InstallAccount - } - } - else - { - return @{ - ServiceAppName = $params.ServiceAppName - Name = $params.Name - RequestLimit = 0 - WaitTime = $crawlerImpactRule.HitRate - Ensure = "Present" - InstallAccount = $params.InstallAccount - } - } - } - } - - - } - - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [System.UInt32] - $RequestLimit = 0, - - [System.UInt32] - $WaitTime = 0, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - - Write-Verbose -Message "Setting Crawler Impact Rule Setting for '$Name'" - - if(($RequestLimit -gt 0) -and ($WaitTime -gt 0)) - { - throw "Only one Crawler Impact Rule HitRate argument (RequestLimit, WaitTime) can be specified" - } - - $result = Get-TargetResource @PSBoundParameters - - if ($result.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - Write-Verbose -Message "Creating Crawler Impact Rule $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - $behavior = "0" - $hitRate = 0 - if($null -eq $params.RequestLimit) - { - $behavior = "1" - $hitRate = $params.WaitTime - } - else - { - $behavior = "0" - $hitRate = $params.RequestLimit - } - - $serviceApp = Get-SPEnterpriseSearchServiceApplication -Identity $params.ServiceAppName - if($null -eq $serviceApp) - { - throw "The Search Service Application does not exist." - } - New-SPEnterpriseSearchSiteHitRule -Name $params.Name ` - -Behavior $behavior ` - -HitRate $hitRate ` - -SearchService $serviceApp - } - } - if ($result.Ensure -eq "Present" -and $Ensure -eq "Present") - { - Write-Verbose -Message "Updating Crawler Impact Rule $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - $behavior = "0" - $hitRate = 0 - if($null -eq $params.RequestLimit) - { - $behavior = "1" - $hitRate = $params.WaitTime - } - else - { - $behavior = "0" - $hitRate = $params.RequestLimit - } - $serviceApp = Get-SPEnterpriseSearchServiceApplication -Identity $params.ServiceAppName - if($null -eq $serviceApp) - { - throw "The Search Service Application does not exist." - } - - Remove-SPEnterpriseSearchSiteHitRule -Identity $params.Name ` - -SearchService $serviceApp ` - -ErrorAction SilentlyContinue - - New-SPEnterpriseSearchSiteHitRule -Name $params.Name ` - -Behavior $behavior ` - -HitRate $hitRate ` - -SearchService $serviceApp - - } - } - if($Ensure -eq "Absent") - { - Write-Verbose -Message "Removing Crawler Impact Rule $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - $serviceApp = Get-SPEnterpriseSearchServiceApplication -Identity $params.ServiceAppName - if($null -eq $serviceApp) - { - throw "The Search Service Application does not exist." - } - Remove-SPEnterpriseSearchSiteHitRule -Identity $params.Name ` - -SearchService $serviceApp ` - -ErrorAction SilentlyContinue - } - } - - -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [System.UInt32] - $RequestLimit = 0, - - [System.UInt32] - $WaitTime = 0, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [System.Management.Automation.PSCredential] - $InstallAccount - ) - Write-Verbose -Message "Testing Crawler Impact Rule Setting for '$Name'" - - if(($RequestLimit -gt 0) -and ($WaitTime -gt 0)) - { - throw "Only one Crawler Impact Rule HitRate argument (RequestLimit, WaitTime) can be specified" - } - - $behavior = "" - if($RequestLimit -ne 0) - { - $behavior = "RequestLimit" - } - else - { - $behavior = "WaitTime" - } - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if($Ensure -eq "Present") - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("ServiceAppName", - "Name", - $behavior) - } - else - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("ServiceAppName", - "Name", - "Ensure") - } -} - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/MSFT_SPSearchCrawlerImpactRule.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/MSFT_SPSearchCrawlerImpactRule.schema.mof deleted file mode 100644 index 5b1062a4..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/MSFT_SPSearchCrawlerImpactRule.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("SPSearchCrawlerImpactRule")] -class MSFT_SPSearchCrawlerImpactRule : OMI_BaseResource -{ - [Key, Description("Search Service Application Name")] String ServiceAppName; - [Key, Description("The Site for the crawl impact rule")] String Name; - [Read, Description("The Behavior (RequestLimit or WaitTime) for this crawl impact rule")] String Behavior; - [Write, Description("The RequestLimit setting for the crawl impact rule")] UInt32 RequestLimit; - [Write, Description("The WaitTime setting for the crawl impact rule")] UInt32 WaitTime; - [Write, Description("Ensure the crawl rule is Present or Absent"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, EmbeddedInstance("MSFT_Credential"), Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchFileType/MSFT_SPSearchFileType.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchFileType/MSFT_SPSearchFileType.psm1 deleted file mode 100644 index 52f1c652..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchFileType/MSFT_SPSearchFileType.psm1 +++ /dev/null @@ -1,343 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $FileType, - - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $false)] - [System.String] - $Description, - - [parameter(Mandatory = $false)] - [System.String] - $MimeType, - - [parameter(Mandatory = $false)] - [System.Boolean] - $Enabled, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting Search File Type '$FileType'" - - if ($Ensure -eq "Present" -and ` - (-not($PSBoundParameters.ContainsKey("MimeType")) -or ` - -not($PSBoundParameters.ContainsKey("Description")))) - { - Write-Verbose -Message "Ensure is configured as Present, but MimeType and/or Description is missing" - $nullReturn = @{ - FileType = $params.FileType - ServiceAppName = $params.ServiceAppName - Ensure = "Absent" - InstallAccount = $params.InstallAccount - } - return $nullReturn - } - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApps = Get-SPServiceApplication -Name $params.ServiceAppName ` - -ErrorAction SilentlyContinue - - $nullReturn = @{ - FileType = $params.FileType - ServiceAppName = $params.ServiceAppName - Ensure = "Absent" - InstallAccount = $params.InstallAccount - } - - if ($null -eq $serviceApps) - { - Write-Verbose -Message "Service Application $($params.ServiceAppName) is not found" - return $nullReturn - } - - $serviceApp = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Server.Search.Administration.SearchServiceApplication" - } - - if ($null -eq $serviceApp) - { - Write-Verbose -Message "Service Application $($params.ServiceAppName) is not a search service application" - return $nullReturn - } - else - { - $fileType = Get-SPEnterpriseSearchFileFormat ` - -SearchApplication $params.ServiceAppName | Where-Object -FilterScript { - $_.Identity -eq $params.FileType - } - - if ($null -eq $fileType) - { - Write-Verbose -Message "File Type $($params.FileType) not found" - return $nullReturn - } - else - { - $returnVal = @{ - FileType = $params.FileType - ServiceAppName = $params.ServiceAppName - Description = $fileType.Name - MimeType = $fileType.MimeType - Enabled = $fileType.Enabled - Ensure = "Present" - InstallAccount = $params.InstallAccount - } - - return $returnVal - } - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $FileType, - - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $false)] - [System.String] - $Description, - - [parameter(Mandatory = $false)] - [System.String] - $MimeType, - - [parameter(Mandatory = $false)] - [System.Boolean] - $Enabled, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting Search File Type '$FileType'" - - if ($Ensure -eq "Present" -and ` - (-not($PSBoundParameters.ContainsKey("MimeType")) -or ` - -not($PSBoundParameters.ContainsKey("Description")))) - { - throw "Ensure is configured as Present, but MimeType and/or Description is missing" - } - - $PSBoundParameters.Ensure = $Ensure - - $result = Get-TargetResource @PSBoundParameters - - Write-Verbose -Message "Checking if Service Application '$ServiceAppName' exists" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApps = Get-SPServiceApplication -Name $params.ServiceAppName ` - -ErrorAction SilentlyContinue - - if ($null -eq $serviceApps) - { - throw "Service Application $($params.ServiceAppName) is not found" - } - - $serviceApp = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Server.Search.Administration.SearchServiceApplication" - } - - if ($null -eq $serviceApp) - { - throw "Service Application $($params.ServiceAppName) is not a search service application" - } - } - - if ($result.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - Write-Verbose -Message "Creating File Type $FileType" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $newParams = @{ - FormatId = $params.FileType - SearchApplication = $params.ServiceAppName - FormatName = $params.Description - MimeType = $params.MimeType - } - - New-SPEnterpriseSearchFileFormat @newParams - - if ($params.ContainsKey("Enabled") -eq $true) - { - $stateParams = @{ - Identity = $params.FileType - SearchApplication = $params.ServiceAppName - Enable = $params.Enabled - } - Set-SPEnterpriseSearchFileFormatState @stateParams - } - } - } - - if ($result.Ensure -eq "Present" -and $Ensure -eq "Present") - { - Write-Verbose -Message "Updating File Type $FileType" - Invoke-SPDSCCommand -Credential $InstallAccount -Arguments $PSBoundParameters -ScriptBlock { - $params = $args[0] - - $fileType = Get-SPEnterpriseSearchFileFormat ` - -SearchApplication $params.ServiceAppName | Where-Object -FilterScript { - $_.Identity -eq $params.FileType - } - - if ($null -ne $fileType) - { - if (($fileType.MimeType -ne $params.MimeType) -or - ($fileType.Name -ne $params.Description)) - { - Remove-SPEnterpriseSearchFileFormat -Identity $params.FileType ` - -SearchApplication $params.ServiceAppName ` - -Confirm:$false - - $newParams = @{ - FormatId = $params.FileType - SearchApplication = $params.ServiceAppName - FormatName = $params.Description - MimeType = $params.MimeType - } - - New-SPEnterpriseSearchFileFormat @newParams - } - - if ($params.ContainsKey("Enabled") -eq $true) - { - if ($fileType.Enabled -ne $params.Enabled) - { - $stateParams = @{ - Identity = $params.FileType - SearchApplication = $params.ServiceAppName - Enable = $params.Enabled - } - - Set-SPEnterpriseSearchFileFormatState @stateParams - } - } - } - } - } - - if ($Ensure -eq "Absent") - { - Write-Verbose -Message "Removing Crawl Rule $Path" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - Remove-SPEnterpriseSearchFileFormat -Identity $params.FileType ` - -SearchApplication $params.ServiceAppName ` - -Confirm:$false - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $FileType, - - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $false)] - [System.String] - $Description, - - [parameter(Mandatory = $false)] - [System.String] - $MimeType, - - [parameter(Mandatory = $false)] - [System.Boolean] - $Enabled, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing Search File Type '$FileType'" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($Ensure -eq "Present") - { - if ($PSBoundParameters.ContainsKey("Enabled") -eq $true) - { - if ($Enabled -ne $CurrentValues.Enabled) - { - return $false - } - } - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure", - "Description", - "MimeType") - } - else - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchFileType/MSFT_SPSearchFileType.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchFileType/MSFT_SPSearchFileType.schema.mof deleted file mode 100644 index 06d07da6..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchFileType/MSFT_SPSearchFileType.schema.mof +++ /dev/null @@ -1,12 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPSearchFileType")] -class MSFT_SPSearchFileType : OMI_BaseResource -{ - [Key, Description("The name of the file type")] string FileType; - [Key, Description("The name of the search service application")] string ServiceAppName; - [Write, Description("The description of the file type")] string Description; - [Write, Description("The mime type of the file type")] string MimeType; - [Write, Description("The state of the file type")] boolean Enabled; - [Write, Description("Present if the file type should exist, absent if it should not"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/MSFT_SPSearchIndexPartition.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/MSFT_SPSearchIndexPartition.psm1 deleted file mode 100644 index 1cceafbc..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/MSFT_SPSearchIndexPartition.psm1 +++ /dev/null @@ -1,261 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.UInt32] - $Index, - - [parameter(Mandatory = $true)] - [System.String[]] - $Servers, - - [parameter(Mandatory = $false)] - [System.String] - $RootDirectory, - - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting Search Index Partition '$Index' settings" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - $ConfirmPreference = 'None' - - $ssa = Get-SPEnterpriseSearchServiceApplication -Identity $params.ServiceAppName - $currentTopology = $ssa.ActiveTopology - - $IndexComponents = (Get-SPEnterpriseSearchComponent -SearchTopology $currentTopology | ` - Where-Object -FilterScript { - ($_.GetType().Name -eq "IndexComponent") ` - -and ($_.IndexPartitionOrdinal -eq $params.Index) - }).ServerName - - return @{ - Index = $params.Index - Servers = $IndexComponents - RootDirectory = $params.RootDirectory - ServiceAppName = $params.ServiceAppName - InstallAccount = $params.InstallAccount - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.UInt32] - $Index, - - [parameter(Mandatory = $true)] - [System.String[]] - $Servers, - - [parameter(Mandatory = $false)] - [System.String] - $RootDirectory, - - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting Search Index Partition '$Index' settings" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters, $CurrentValues) ` - -ScriptBlock { - $params = $args[0] - $CurrentValues = $args[1] - $ConfirmPreference = 'None' - - $AllSearchServers = $params.Servers - - # Ensure the search service instance is running on all servers - foreach($searchServer in $AllSearchServers) - { - $searchService = Get-SPEnterpriseSearchServiceInstance -Identity $searchServer - if($searchService.Status -eq "Offline") - { - Write-Verbose -Message "Start Search Service Instance" - Start-SPEnterpriseSearchServiceInstance -Identity $searchService - } - - #Wait for Search Service Instance to come online - $loopCount = 0 - $online = Get-SPEnterpriseSearchServiceInstance -Identity $searchServer - do - { - $online = Get-SPEnterpriseSearchServiceInstance -Identity $searchServer - Write-Verbose -Message "Waiting for service: $($online.TypeName)" - $loopCount++ - Start-Sleep -Seconds 30 - } - until ($online.Status -eq "Online" -or $loopCount -eq 20) - } - - if ($params.ContainsKey("RootDirectory") -eq $true) - { - # Create the index partition directory on each remote server - foreach($IndexPartitionServer in $params.Servers) - { - $networkPath = "\\$IndexPartitionServer\" + $params.RootDirectory.Replace(":\", "$\") - New-Item -Path $networkPath -ItemType Directory -Force - } - - # Create the directory on the local server as it will not apply the topology without it - if ((Test-Path -Path $params.RootDirectory) -eq $false) - { - New-Item $params.RootDirectory -ItemType Directory -Force - } - } - - # Get all service service instances to assign topology components to - $AllSearchServiceInstances = @{} - foreach ($server in $AllSearchServers) - { - $si = Get-SPEnterpriseSearchServiceInstance -Identity $server - $AllSearchServiceInstances.Add($server, $si) - } - - # Get current topology and prepare a new one - $ssa = Get-SPEnterpriseSearchServiceApplication -Identity $params.ServiceAppName - $currentTopology = $ssa.ActiveTopology - $newTopology = New-SPEnterpriseSearchTopology -SearchApplication $ssa ` - -Clone ` - -SearchTopology $currentTopology - - $componentTypes = @{ - Servers = "IndexComponent" - } - - # Build up the topology changes for each object type - @("Servers") | ForEach-Object -Process { - $CurrentSearchProperty = $_ - Write-Verbose -Message "Setting components for '$CurrentSearchProperty' property" - - if ($null -eq $CurrentValues.$CurrentSearchProperty) - { - $ComponentsToAdd = $params.$CurrentSearchProperty - } - else - { - $ComponentsToAdd = @() - $ComponentsToRemove = @() - - $components = $params.$CurrentSearchProperty | Where-Object -FilterScript { - $CurrentValues.$CurrentSearchProperty.Contains($_) -eq $false - } - foreach($component in $components) - { - $ComponentsToAdd += $component - } - $components = $CurrentValues.$CurrentSearchProperty | Where-Object -FilterScript { - $params.$CurrentSearchProperty.Contains($_) -eq $false - } - foreach($component in $components) - { - $ComponentsToRemove += $component - } - } - foreach($componentToAdd in $ComponentsToAdd) - { - $NewComponentParams = @{ - SearchTopology = $newTopology - SearchServiceInstance = $AllSearchServiceInstances.$componentToAdd - } - switch($componentTypes.$CurrentSearchProperty) - { - "IndexComponent" { - $NewComponentParams.Add("IndexPartition", $params.Index) - if ($params.ContainsKey("RootDirectory") -eq $true) - { - if ([string]::IsNullOrEmpty($params.RootDirectory) -eq $false) - { - $NewComponentParams.Add("RootDirectory", $params.RootDirectory) - } - } - New-SPEnterpriseSearchIndexComponent @NewComponentParams - } - } - } - foreach($componentToRemove in $ComponentsToRemove) - { - $component = Get-SPEnterpriseSearchComponent -SearchTopology $newTopology | ` - Where-Object -FilterScript { - ($_.GetType().Name -eq $componentTypes.$CurrentSearchProperty) ` - -and ($_.ServerName -eq $componentToRemove) ` - -and ($_.IndexPartitionOrdinal -eq $params.Index) - } - if ($null -ne $component) - { - $component | Remove-SPEnterpriseSearchComponent -SearchTopology $newTopology ` - -Confirm:$false - } - - } - } - - # Apply the new topology - Set-SPEnterpriseSearchTopology -Identity $newTopology - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.UInt32] - $Index, - - [parameter(Mandatory = $true)] - [System.String[]] - $Servers, - - [parameter(Mandatory = $false)] - [System.String] - $RootDirectory, - - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing Search Index Partition '$Index' settings" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Servers") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/MSFT_SPSearchIndexPartition.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/MSFT_SPSearchIndexPartition.schema.mof deleted file mode 100644 index 3ba702ed..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/MSFT_SPSearchIndexPartition.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPSearchIndexPartition")] -class MSFT_SPSearchIndexPartition : OMI_BaseResource -{ - [Key, Description("The number of the partition in this farm")] Uint32 Index; - [Required, Description("A list of the servers that this partition should exist on")] String Servers[]; - [Write, Description("The directory that the index should use locally on each server to store data")] String RootDirectory; - [Key, Description("The name of the search service application")] String ServiceAppName; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/MSFT_SPSearchResultSource.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/MSFT_SPSearchResultSource.psm1 deleted file mode 100644 index 45eece8b..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/MSFT_SPSearchResultSource.psm1 +++ /dev/null @@ -1,292 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $SearchServiceAppName, - - [parameter(Mandatory = $true)] - [System.String] - $Query, - - [parameter(Mandatory = $true)] - [ValidateSet("Exchange Search Provider", - "Local People Provider", - "Local SharePoint Provider", - "OpenSearch Provider", - "Remote People Provider", - "Remote SharePoint Provider")] - [System.String] - $ProviderType, - - [parameter(Mandatory = $false)] - [System.String] - $ConnectionUrl, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting search result source '$Name'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - [void] [Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.Search") - - $nullReturn = @{ - Name = $params.Name - SearchServiceAppName = $params.SearchServiceAppName - Query = $null - ProviderType = $null - ConnectionUrl = $null - Ensure = "Absent" - InstallAccount = $params.InstallAccount - } - $serviceApp = Get-SPEnterpriseSearchServiceApplication -Identity $params.SearchServiceAppName - $searchSiteUrl = $serviceApp.SearchCenterUrl -replace "/pages" - $searchSite = Get-SPWeb -Identity $searchSiteUrl -ErrorAction SilentlyContinue - - if ($null -eq $searchSite) - { - Write-Verbose -Message ("Search centre site collection does not exist at " + ` - "$searchSiteUrl. Unable to create search context " + ` - "to determine result source details.") - return $nullReturn - } - - $adminNamespace = "Microsoft.Office.Server.Search.Administration" - $queryNamespace = "Microsoft.Office.Server.Search.Administration.Query" - $objectLevel = [Microsoft.Office.Server.Search.Administration.SearchObjectLevel] - $fedManager = New-Object -TypeName "$queryNamespace.FederationManager" ` - -ArgumentList $serviceApp - $searchOwner = New-Object -TypeName "$adminNamespace.SearchObjectOwner" ` - -ArgumentList @( - $objectLevel::Ssa, - $searchSite - ) - - $source = $fedManager.GetSourceByName($params.Name, $searchOwner) - - if ($null -ne $source) - { - $providers = $fedManager.ListProviders() - $provider = $providers.Values | Where-Object -FilterScript { - $_.Id -eq $source.ProviderId - } - return @{ - Name = $params.Name - SearchServiceAppName = $params.SearchServiceAppName - Query = $source.QueryTransform.QueryTemplate - ProviderType = $provider.Name - ConnectionUrl = $source.ConnectionUrlTemplate - Ensure = "Present" - InstallAccount = $params.InstallAccount - } - } - else - { - return $nullReturn - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $SearchServiceAppName, - - [parameter(Mandatory = $true)] - [System.String] - $Query, - - [parameter(Mandatory = $true)] - [ValidateSet("Exchange Search Provider", - "Local People Provider", - "Local SharePoint Provider", - "OpenSearch Provider", - "Remote People Provider", - "Remote SharePoint Provider")] - [System.String] - $ProviderType, - - [parameter(Mandatory = $false)] - [System.String] - $ConnectionUrl, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting search result source '$Name'" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($CurrentValues.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - Write-Verbose -Message "Creating search result source $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - [void] [Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.Search") - - $serviceApp = Get-SPEnterpriseSearchServiceApplication ` - -Identity $params.SearchServiceAppName - - $searchSiteUrl = $serviceApp.SearchCenterUrl -replace "/pages" - $searchSite = Get-SPWeb -Identity $searchSiteUrl -ErrorAction SilentlyContinue - - if ($null -eq $searchSite) - { - throw ("Search centre site collection does not exist at " + ` - "$searchSiteUrl. Unable to create search context " + ` - "to set result source.") - return - } - - $adminNamespace = "Microsoft.Office.Server.Search.Administration" - $queryNamespace = "Microsoft.Office.Server.Search.Administration.Query" - $objectLevel = [Microsoft.Office.Server.Search.Administration.SearchObjectLevel] - $fedManager = New-Object -TypeName "$queryNamespace.FederationManager" ` - -ArgumentList $serviceApp - $searchOwner = New-Object -TypeName "$adminNamespace.SearchObjectOwner" ` - -ArgumentList @( - $objectLevel::Ssa, - $searchSite - ) - - $transformType = "Microsoft.Office.Server.Search.Query.Rules.QueryTransformProperties" - $queryProperties = New-Object -TypeName $transformType - $resultSource = $fedManager.CreateSource($searchOwner) - $resultSource.Name = $params.Name - $providers = $fedManager.ListProviders() - $provider = $providers.Values | Where-Object -FilterScript { - $_.Name -eq $params.ProviderType - } - $resultSource.ProviderId = $provider.Id - $resultSource.CreateQueryTransform($queryProperties, $params.Query) - if ($params.ContainsKey("ConnectionUrl") -eq $true) - { - $resultSource.ConnectionUrlTemplate = $params.ConnectionUrl - } - $resultSource.Commit() - } - } - - if ($Ensure -eq "Absent") - { - Write-Verbose -Message "Removing search result source $Name" - Invoke-SPDSCCommand -Credential $InstallAccount -Arguments $PSBoundParameters -ScriptBlock { - $params = $args[0] - [void] [Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.Search") - - $serviceApp = Get-SPEnterpriseSearchServiceApplication ` - -Identity $params.SearchServiceAppName - - $searchSiteUrl = $serviceApp.SearchCenterUrl -replace "/pages" - $searchSite = Get-SPWeb -Identity $searchSiteUrl - - $adminNamespace = "Microsoft.Office.Server.Search.Administration" - $queryNamespace = "Microsoft.Office.Server.Search.Administration.Query" - $objectLevel = [Microsoft.Office.Server.Search.Administration.SearchObjectLevel] - $fedManager = New-Object -TypeName "$queryNamespace.FederationManager" ` - -ArgumentList $serviceApp - $searchOwner = New-Object -TypeName "$adminNamespace.SearchObjectOwner" ` - -ArgumentList @( - $objectLevel::Ssa, - $searchSite - ) - - $source = $fedManager.GetSourceByName($params.Name, $searchOwner) - if ($null -ne $source) - { - $fedManager.RemoveSource($source) - } - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $SearchServiceAppName, - - [parameter(Mandatory = $true)] - [System.String] - $Query, - - [parameter(Mandatory = $true)] - [ValidateSet("Exchange Search Provider", - "Local People Provider", - "Local SharePoint Provider", - "OpenSearch Provider", - "Remote People Provider", - "Remote SharePoint Provider")] - [System.String] - $ProviderType, - - [parameter(Mandatory = $false)] - [System.String] - $ConnectionUrl, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing search result source '$Name'" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/MSFT_SPSearchResultSource.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/MSFT_SPSearchResultSource.schema.mof deleted file mode 100644 index 7960da7b..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/MSFT_SPSearchResultSource.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPSearchResultSource")] -class MSFT_SPSearchResultSource : OMI_BaseResource -{ - [Key, Description("The name of the result source")] String Name; - [Required, Description("The name of the search service application to associate this result source with")] String SearchServiceAppName; - [Required, Description("The query to pass to the provider source")] String Query; - [Required, Description("The provider type to use for the result source"), ValueMap{"Exchange Search Provider","Local People Provider","Local SharePoint Provider","OpenSearch Provider","Remote People Provider","Remote SharePoint Provider"}, Values{"Exchange Search Provider","Local People Provider","Local SharePoint Provider","OpenSearch Provider","Remote People Provider","Remote SharePoint Provider"}] String ProviderType; - [Write, Description("The URI to connect to the remote location")] String ConnectionUrl; - [Write, Description("Present if the result source should exist, absent if it should not"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/MSFT_SPSearchServiceApp.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/MSFT_SPSearchServiceApp.psm1 deleted file mode 100644 index 5a33366e..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/MSFT_SPSearchServiceApp.psm1 +++ /dev/null @@ -1,453 +0,0 @@ -function Get-TargetResource -{ - # Ignoring this because we need to generate a stub credential to return up the current - # crawl account as a PSCredential - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingConvertToSecureStringWithPlainText", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String] - $SearchCenterUrl, - - [parameter(Mandatory = $false)] - [System.Boolean] - $CloudIndex, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $DefaultContentAccessAccount, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $WindowsServiceAccount, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting Search service application '$Name'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters, $PSScriptRoot) ` - -ScriptBlock { - $params = $args[0] - $scriptRoot = $args[1] - - Import-Module -Name (Join-Path $scriptRoot "MSFT_SPSearchServiceApp.psm1") - - [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") - [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Administration") - [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.Search.Administration") - [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.Search") - [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server") - - $serviceApps = Get-SPServiceApplication -Name $params.Name -ErrorAction SilentlyContinue - - $nullReturn = @{ - Name = $params.Name - ApplicationPool = $params.ApplicationPool - Ensure = "Absent" - } - - if ($null -eq $serviceApps) - { - return $nullReturn - } - $serviceApp = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Server.Search.Administration.SearchServiceApplication" - } - - if ($null -eq $serviceApp) - { - return $nullReturn - } - else - { - $c = [Microsoft.Office.Server.Search.Administration.SearchContext]::GetContext($serviceApp.Name) - $sc = New-Object -TypeName Microsoft.Office.Server.Search.Administration.Content ` - -ArgumentList $c; - $dummyPassword = ConvertTo-SecureString -String "-" -AsPlainText -Force - $defaultAccount = New-Object -TypeName System.Management.Automation.PSCredential ` - -ArgumentList @($sc.DefaultGatheringAccount, $dummyPassword) - - $cloudIndex = $false - $version = Get-SPDSCInstalledProductVersion - if(($version.FileMajorPart -gt 15) ` - -or ($version.FileMajorPart -eq 15 -and $version.FileBuildPart -ge 4745)) - { - $cloudIndex = $serviceApp.CloudIndex - } - - $serviceAppProxies = Get-SPServiceApplicationProxy -ErrorAction SilentlyContinue - if ($null -ne $serviceAppProxies) - { - $serviceAppProxy = $serviceAppProxies | Where-Object -FilterScript { - $serviceApp.IsConnected($_) - } - if ($null -ne $serviceAppProxy) - { - $proxyName = $serviceAppProxy.Name - } - } - - $searchService = Get-SPEnterpriseSearchService - $windowsAccount = New-Object -TypeName System.Management.Automation.PSCredential ` - -ArgumentList @($searchService.ProcessIdentity, $dummyPassword) - - $returnVal = @{ - Name = $serviceApp.DisplayName - ProxyName = $proxyName - ApplicationPool = $serviceApp.ApplicationPool.Name - DatabaseName = $serviceApp.SearchAdminDatabase.Name - DatabaseServer = $serviceApp.SearchAdminDatabase.Server.Name - Ensure = "Present" - SearchCenterUrl = $serviceApp.SearchCenterUrl - DefaultContentAccessAccount = $defaultAccount - CloudIndex = $cloudIndex - WindowsServiceAccount = $windowsAccount - InstallAccount = $params.InstallAccount - } - return $returnVal - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String] - $SearchCenterUrl, - - [parameter(Mandatory = $false)] - [System.Boolean] - $CloudIndex, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $DefaultContentAccessAccount, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $WindowsServiceAccount, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting Search service application '$Name'" - - $result = Get-TargetResource @PSBoundParameters - - if ($result.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - # Create the service app as it doesn't exist - - Write-Verbose -Message "Creating Search Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount -Arguments $PSBoundParameters -ScriptBlock { - $params = $args[0] - - $serviceInstance = Get-SPEnterpriseSearchServiceInstance -Local - Start-SPEnterpriseSearchServiceInstance -Identity $serviceInstance ` - -ErrorAction SilentlyContinue - $newParams = @{ - Name = $params.Name - ApplicationPool = $params.ApplicationPool - } - if ($params.ContainsKey("DatabaseServer") -eq $true) - { - $newParams.Add("DatabaseServer", $params.DatabaseServer) - } - if ($params.ContainsKey("DatabaseName") -eq $true) - { - $newParams.Add("DatabaseName", $params.DatabaseName) - } - - if ($params.ContainsKey("CloudIndex") -eq $true -and $params.CloudIndex -eq $true) - { - $version = Get-SPDSCInstalledProductVersion - if (($version.FileMajorPart -gt 15) ` - -or ($version.FileMajorPart -eq 15 -and $version.FileBuildPart -ge 4745)) - { - $newParams.Add("CloudIndex", $params.CloudIndex) - } - else - { - throw ("Please install SharePoint 2016 or SharePoint 2013 with August " + ` - "2015 CU or higher before attempting to create a cloud enabled " + ` - "search service application") - } - } - - $app = New-SPEnterpriseSearchServiceApplication @newParams - if ($app) - { - if ($null -eq $params.ProxyName) - { - $pName = "$($params.Name) Proxy" - } - else - { - $pName = $params.ProxyName - } - New-SPEnterpriseSearchServiceApplicationProxy -Name $pName -SearchApplication $app - if ($params.ContainsKey("DefaultContentAccessAccount") -eq $true) - { - $appPool = Get-SPServiceApplicationPool -Identity $params.ApplicationPool - $account = $params.DefaultContentAccessAccount - $setParams = @{ - ApplicationPool = $appPool - Identity = $app - DefaultContentAccessAccountName = $account.UserName - DefaultContentAccessAccountPassword = $account.Password - } - Set-SPEnterpriseSearchServiceApplication @setParams - } - - if ($params.ContainsKey("SearchCenterUrl") -eq $true) - { - $serviceApp = Get-SPServiceApplication -Name $params.Name | ` - Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Server.Search.Administration.SearchServiceApplication" - } - $serviceApp.SearchCenterUrl = $params.SearchCenterUrl - $serviceApp.Update() - } - - if ($params.ContainsKey("WindowsServiceAccount") -eq $true) - { - Set-SPEnterpriseSearchService -ServiceAccount $WindowsServiceAccount.UserName ` - -ServicePassword $WindowsServiceAccount.Password - } - } - } - } - - if ($result.Ensure -eq "Present" -and $Ensure -eq "Present") - { - # Update the service app that already exists - Write-Verbose -Message "Updating Search Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters, $result) ` - -ScriptBlock { - $params = $args[0] - $result = $args[1] - - $serviceApp = Get-SPServiceApplication -Name $params.Name | ` - Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Server.Search.Administration.SearchServiceApplication" - } - $appPool = Get-SPServiceApplicationPool -Identity $params.ApplicationPool - $setParams = @{ - ApplicationPool = $appPool - Identity = $serviceApp - } - if ($params.ContainsKey("DefaultContentAccessAccount") -eq $true) - { - $account = $params.DefaultContentAccessAccount - $setParams.Add("DefaultContentAccessAccountName", $account.UserName) - $setParams.Add("DefaultContentAccessAccountPassword", $account.Password) - } - Set-SPEnterpriseSearchServiceApplication @setParams - - if ($params.ContainsKey("SearchCenterUrl") -eq $true) - { - $serviceApp = Get-SPServiceApplication -Name $params.Name | ` - Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Server.Search.Administration.SearchServiceApplication" - } - $serviceApp.SearchCenterUrl = $params.SearchCenterUrl - $serviceApp.Update() - } - - if ($params.ContainsKey("WindowsServiceAccount") -eq $true -and ` - $result.WindowsServiceAccount.UserName -ne $params.WindowsServiceAccount.UserName) - { - Set-SPEnterpriseSearchService -ServiceAccount $params.WindowsServiceAccount.UserName ` - -ServicePassword $params.WindowsServiceAccount.Password - } - } - } - - if ($Ensure -eq "Absent") - { - # The service app should not exit - Write-Verbose -Message "Removing Search Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApp = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Server.Search.Administration.SearchServiceApplication" - - } - - $proxies = Get-SPServiceApplicationProxy - foreach($proxyInstance in $proxies) - { - if($serviceApp.IsConnected($proxyInstance)) - { - $proxyInstance.Delete() - } - } - - Remove-SPServiceApplication -Identity $serviceApp -Confirm:$false - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String] - $SearchCenterUrl, - - [parameter(Mandatory = $false)] - [System.Boolean] - $CloudIndex, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $DefaultContentAccessAccount, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $WindowsServiceAccount, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing Search service application '$Name'" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($PSBoundParameters.ContainsKey("DefaultContentAccessAccount") ` - -and $Ensure -eq "Present") - { - if ($DefaultContentAccessAccount.UserName ` - -ne $CurrentValues.DefaultContentAccessAccount.UserName) - { - Write-Verbose -Message "Default content access account is different, returning false" - return $false - } - } - - if ($PSBoundParameters.ContainsKey("WindowsServiceAccount") ` - -and $Ensure -eq "Present") - { - if ($WindowsServiceAccount.UserName ` - -ne $CurrentValues.WindowsServiceAccount.UserName) - { - Write-Verbose -Message "Windows service account is different, returning false" - return $false - } - } - - if ($Ensure -eq "Present") - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure", - "ApplicationPool", - "SearchCenterUrl") - } - else - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/MSFT_SPSearchServiceApp.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/MSFT_SPSearchServiceApp.schema.mof deleted file mode 100644 index e187966a..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/MSFT_SPSearchServiceApp.schema.mof +++ /dev/null @@ -1,16 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPSearchServiceApp")] -class MSFT_SPSearchServiceApp : OMI_BaseResource -{ - [Key, Description("The name of the search service application")] string Name; - [Write, Description("The proxy name, if not specified will be /Name of service app/ Proxy")] string ProxyName; - [Required, Description("The application pool that it should run in")] string ApplicationPool; - [Write, Description("The URL of the enterprise search center site collection")] string SearchCenterUrl; - [Write, Description("The name of the database (noting that some search databases will use this as a prefix)")] string DatabaseName; - [Write, Description("The server that host the databases for this service application")] string DatabaseServer; - [Write, Description("The default content access account for this search service app"), EmbeddedInstance("MSFT_Credential")] String DefaultContentAccessAccount; - [Write, Description("Should this search service application be a cloud based service app")] boolean CloudIndex; - [Write, Description("Present if the service app should exist, absent if it should not"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("Sets the windows services for search to run as this account"), EmbeddedInstance("MSFT_Credential")] string WindowsServiceAccount; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchTopology/MSFT_SPSearchTopology.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchTopology/MSFT_SPSearchTopology.psm1 deleted file mode 100644 index 46f18249..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchTopology/MSFT_SPSearchTopology.psm1 +++ /dev/null @@ -1,484 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $true)] - [System.String[]] - $Admin, - - [parameter(Mandatory = $true)] - [System.String[]] - $Crawler, - - [parameter(Mandatory = $true)] - [System.String[]] - $ContentProcessing, - - [parameter(Mandatory = $true)] - [System.String[]] - $AnalyticsProcessing, - - [parameter(Mandatory = $true)] - [System.String[]] - $QueryProcessing, - - [parameter(Mandatory = $true)] - [System.String[]] - $IndexPartition, - - [parameter(Mandatory = $true)] - [System.String] - $FirstPartitionDirectory, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting Search Topology for '$ServiceAppName'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - $ConfirmPreference = 'None' - - $ssa = Get-SPEnterpriseSearchServiceApplication -Identity $params.ServiceAppName - - if ($null -eq $ssa) - { - return $null - } - $currentTopology = $ssa.ActiveTopology - - $allServers = Get-SPServer | ForEach-Object -Process { - return New-Object -TypeName System.Object | ` - Add-Member -MemberType NoteProperty ` - -Name Name ` - -Value $_.Name ` - -PassThru | ` - Add-Member -MemberType NoteProperty ` - -Name Id ` - -Value $_.Id ` - -PassThru - } - - $allComponents = Get-SPEnterpriseSearchComponent -SearchTopology $currentTopology - - $AdminComponents = @() - $AdminComponents += ($allComponents | Where-Object -FilterScript { - ($_.GetType().Name -eq "AdminComponent") - }).ServerId | ForEach-Object -Process { - $serverId = $_ - $server = $allServers | Where-Object -FilterScript { - $_.Id -eq $serverId - } | Select-Object -First 1 - return $server.Name - } - - $CrawlComponents = @() - $CrawlComponents += ($allComponents | Where-Object -FilterScript { - ($_.GetType().Name -eq "CrawlComponent") - }).ServerId | ForEach-Object -Process { - $serverId = $_ - $server = $allServers | Where-Object -FilterScript { - $_.Id -eq $serverId - } | Select-Object -First 1 - return $server.Name - } - - $ContentProcessingComponents = @() - $ContentProcessingComponents += ($allComponents | Where-Object -FilterScript { - ($_.GetType().Name -eq "ContentProcessingComponent") - }).ServerId | ForEach-Object -Process { - $serverId = $_ - $server = $allServers | Where-Object -FilterScript { - $_.Id -eq $serverId - } | Select-Object -First 1 - return $server.Name - } - - $AnalyticsProcessingComponents = @() - $AnalyticsProcessingComponents += ($allComponents | Where-Object -FilterScript { - ($_.GetType().Name -eq "AnalyticsProcessingComponent") - }).ServerId | ForEach-Object -Process { - $serverId = $_ - $server = $allServers | Where-Object -FilterScript { - $_.Id -eq $serverId - } | Select-Object -First 1 - return $server.Name - } - - $QueryProcessingComponents = @() - $QueryProcessingComponents += ($allComponents | Where-Object -FilterScript { - ($_.GetType().Name -eq "QueryProcessingComponent") - }).ServerId | ForEach-Object -Process { - $serverId = $_ - $server = $allServers | Where-Object -FilterScript { - $_.Id -eq $serverId - } | Select-Object -First 1 - return $server.Name - } - - $IndexComponents = @() - $IndexComponents += ($allComponents | Where-Object -FilterScript { - ($_.GetType().Name -eq "IndexComponent") - }).ServerId | ForEach-Object -Process { - $serverId = $_ - $server = $allServers | Where-Object -FilterScript { - $_.Id -eq $serverId - } | Select-Object -First 1 - return $server.Name - } - - $domain = (Get-CimInstance -ClassName Win32_ComputerSystem).Domain - - return @{ - ServiceAppName = $params.ServiceAppName - Admin = $AdminComponents -replace ".$domain" - Crawler = $CrawlComponents -replace ".$domain" - ContentProcessing = $ContentProcessingComponents -replace ".$domain" - AnalyticsProcessing = $AnalyticsProcessingComponents -replace ".$domain" - QueryProcessing = $QueryProcessingComponents -replace ".$domain" - InstallAccount = $params.InstallAccount - FirstPartitionDirectory = $params.FirstPartitionDirectory - IndexPartition = $IndexComponents -replace ".$domain" - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $true)] - [System.String[]] - $Admin, - - [parameter(Mandatory = $true)] - [System.String[]] - $Crawler, - - [parameter(Mandatory = $true)] - [System.String[]] - $ContentProcessing, - - [parameter(Mandatory = $true)] - [System.String[]] - $AnalyticsProcessing, - - [parameter(Mandatory = $true)] - [System.String[]] - $QueryProcessing, - - [parameter(Mandatory = $true)] - [System.String[]] - $IndexPartition, - - [parameter(Mandatory = $true)] - [System.String] - $FirstPartitionDirectory, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting Search Topology for '$ServiceAppName'" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters, $CurrentValues) ` - -ScriptBlock { - - $params = $args[0] - $CurrentValues = $args[1] - $ConfirmPreference = 'None' - - $AllSearchServers = @() - $AllSearchServers += ($params.Admin | Where-Object -FilterScript { - ($AllSearchServers -contains $_) -eq $false - }) - $AllSearchServers += ($params.Crawler | Where-Object -FilterScript { - ($AllSearchServers -contains $_) -eq $false - }) - $AllSearchServers += ($params.ContentProcessing | Where-Object -FilterScript { - ($AllSearchServers -contains $_) -eq $false - }) - $AllSearchServers += ($params.AnalyticsProcessing | Where-Object -FilterScript { - ($AllSearchServers -contains $_) -eq $false - }) - $AllSearchServers += ($params.QueryProcessing | Where-Object -FilterScript { - ($AllSearchServers -contains $_) -eq $false - }) - $AllSearchServers += ($params.IndexPartition | Where-Object -FilterScript { - ($AllSearchServers -contains $_) -eq $false - }) - - # Ensure the search service instance is running on all servers - foreach($searchServer in $AllSearchServers) { - - $searchService = Get-SPEnterpriseSearchServiceInstance -Identity $searchServer ` - -ErrorAction SilentlyContinue - if ($null -eq $searchService) - { - $domain = (Get-CimInstance -ClassName Win32_ComputerSystem).Domain - $searchServer = "$searchServer.$domain" - $searchService = Get-SPEnterpriseSearchServiceInstance -Identity $searchServer - } - - if($searchService.Status -eq "Offline") - { - Write-Verbose -Message "Start Search Service Instance" - Start-SPEnterpriseSearchServiceInstance -Identity $searchServer - } - - # Wait for Search Service Instance to come online - $loopCount = 0 - $online = Get-SPEnterpriseSearchServiceInstance -Identity $searchServer - while ($online.Status -ne "Online" -and $loopCount -lt 15) - { - $online = Get-SPEnterpriseSearchServiceInstance -Identity $searchServer - Write-Verbose -Message ("$([DateTime]::Now.ToShortTimeString()) - Waiting for " + ` - "search service instance to start on $searchServer " + ` - "(waited $loopCount of 15 minutes)") - $loopCount++ - Start-Sleep -Seconds 60 - } - } - - # Create the index partition directory on each remote server - foreach($IndexPartitionServer in $params.IndexPartition) { - $networkPath = "\\$IndexPartitionServer\" + ` - $params.FirstPartitionDirectory.Replace(":\", "$\") - New-Item $networkPath -ItemType Directory -Force - } - - # Create the directory on the local server as it will not apply the topology without it - if ((Test-Path -Path $params.FirstPartitionDirectory) -eq $false) - { - New-Item $params.FirstPartitionDirectory -ItemType Directory -Force - } - - # Get all service service instances to assign topology components to - $AllSearchServiceInstances = @{} - foreach ($server in $AllSearchServers) { - $serverName = $server - $serviceToAdd = Get-SPEnterpriseSearchServiceInstance -Identity $server ` - -ErrorAction SilentlyContinue - if ($null -eq $serviceToAdd) - { - $domain = (Get-CimInstance -ClassName Win32_ComputerSystem).Domain - $server = "$server.$domain" - $serviceToAdd = Get-SPEnterpriseSearchServiceInstance -Identity $server - } - if ($null -eq $serviceToAdd) { - throw "Unable to locate a search service instance on $serverName" - } - $AllSearchServiceInstances.Add($serverName, $serviceToAdd) - } - - # Get current topology and prepare a new one - $ssa = Get-SPEnterpriseSearchServiceApplication -Identity $params.ServiceAppName - if ($null -eq $ssa) { - throw "Search service applications '$($params.ServiceAppName)' was not found" - return - } - $currentTopology = $ssa.ActiveTopology - $newTopology = New-SPEnterpriseSearchTopology -SearchApplication $ssa ` - -Clone ` - -SearchTopology $currentTopology - - $componentTypes = @{ - Admin = "AdminComponent" - Crawler = "CrawlComponent" - ContentProcessing = "ContentProcessingComponent" - AnalyticsProcessing = "AnalyticsProcessingComponent" - QueryProcessing = "QueryProcessingComponent" - IndexPartition = "IndexComponent" - } - - # Build up the topology changes for each object type - @("Admin", - "Crawler", - "ContentProcessing", - "AnalyticsProcessing", - "QueryProcessing", - "IndexPartition") | ForEach-Object -Process { - - $CurrentSearchProperty = $_ - Write-Verbose "Setting components for '$CurrentSearchProperty' property" - - if ($null -eq $CurrentValues.$CurrentSearchProperty) - { - $ComponentsToAdd = $params.$CurrentSearchProperty - } - else - { - $ComponentsToAdd = $params.$CurrentSearchProperty | Where-Object -FilterScript { - $CurrentValues.$CurrentSearchProperty -contains $_ -eq $false - } - - $ComponentsToRemove = $CurrentValues.$CurrentSearchProperty | Where-Object -FilterScript { - $params.$CurrentSearchProperty -contains $_ -eq $false - } - } - foreach($ComponentToAdd in $ComponentsToAdd) { - $NewComponentParams = @{ - SearchTopology = $newTopology - SearchServiceInstance = $AllSearchServiceInstances.$ComponentToAdd - } - switch($componentTypes.$CurrentSearchProperty) { - "AdminComponent" { - New-SPEnterpriseSearchAdminComponent @NewComponentParams - } - "CrawlComponent" { - New-SPEnterpriseSearchCrawlComponent @NewComponentParams - } - "ContentProcessingComponent" { - New-SPEnterpriseSearchContentProcessingComponent @NewComponentParams - } - "AnalyticsProcessingComponent" { - New-SPEnterpriseSearchAnalyticsProcessingComponent @NewComponentParams - } - "QueryProcessingComponent" { - New-SPEnterpriseSearchQueryProcessingComponent @NewComponentParams - } - "IndexComponent" { - $NewComponentParams.Add("IndexPartition", 0) - if ($params.ContainsKey("FirstPartitionDirectory") -eq $true) - { - if ([string]::IsNullOrEmpty($params.FirstPartitionDirectory) -eq $false) - { - $dir = $params.FirstPartitionDirectory - $NewComponentParams.Add("RootDirectory", $dir) - } - } - New-SPEnterpriseSearchIndexComponent @NewComponentParams - } - } - } - foreach($ComponentToRemove in $ComponentsToRemove) { - if ($componentTypes.$CurrentSearchProperty -eq "IndexComponent") - { - $component = Get-SPEnterpriseSearchComponent -SearchTopology $newTopology | ` - Where-Object -FilterScript { - ($_.GetType().Name -eq $componentTypes.$CurrentSearchProperty) ` - -and ($_.ServerName -eq $ComponentToRemove) ` - -and ($_.IndexPartitionOrdinal -eq 0) - } - } - else - { - $component = Get-SPEnterpriseSearchComponent -SearchTopology $newTopology | ` - Where-Object -FilterScript { - ($_.GetType().Name -eq $componentTypes.$CurrentSearchProperty) ` - -and ($_.ServerName -eq $ComponentToRemove) - } - } - if ($null -ne $component) - { - $component | Remove-SPEnterpriseSearchComponent -SearchTopology $newTopology ` - -confirm:$false - } - } - } - - # Look for components that have no server name and remove them - $idsWithNoName = (Get-SPEnterpriseSearchComponent -SearchTopology $newTopology | ` - Where-Object -FilterScript { - $null -eq $_.ServerName - }).ComponentId - $idsWithNoName | ForEach-Object -Process { - $id = $_ - Get-SPEnterpriseSearchComponent -SearchTopology $newTopology | ` - Where-Object -FilterScript { - $_.ComponentId -eq $id - } | ` - Remove-SPEnterpriseSearchComponent -SearchTopology $newTopology ` - -confirm:$false - } - - # Apply the new topology to the farm - Set-SPEnterpriseSearchTopology -Identity $newTopology - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $true)] - [System.String[]] - $Admin, - - [parameter(Mandatory = $true)] - [System.String[]] - $Crawler, - - [parameter(Mandatory = $true)] - [System.String[]] - $ContentProcessing, - - [parameter(Mandatory = $true)] - [System.String[]] - $AnalyticsProcessing, - - [parameter(Mandatory = $true)] - [System.String[]] - $QueryProcessing, - - [parameter(Mandatory = $true)] - [System.String[]] - $IndexPartition, - - [parameter(Mandatory = $true)] - [System.String] - $FirstPartitionDirectory, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing Search Topology for '$ServiceAppName'" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($null -eq $CurrentValues) - { - return $false - } - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @( - "Admin", - "Crawler", - "ContentProcessing", - "AnalyticsProcessing", - "QueryProcessing", - "IndexPartition" - ) -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchTopology/MSFT_SPSearchTopology.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchTopology/MSFT_SPSearchTopology.schema.mof deleted file mode 100644 index 661fae08..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSearchTopology/MSFT_SPSearchTopology.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPSearchTopology")] -class MSFT_SPSearchTopology : OMI_BaseResource -{ - [Key, Description("The name of the search service application for this topology")] String ServiceAppName; - [Required, Description("A list of servers that will run the admin component")] String Admin[]; - [Required, Description("A list of servers that will run the crawler component")] String Crawler[]; - [Required, Description("A list of servers that will run the content processing component")] String ContentProcessing[]; - [Required, Description("A list of servers that will run the analytics processing component")] String AnalyticsProcessing[]; - [Required, Description("A list of servers that will run the query processing component")] String QueryProcessing[]; - [Required, Description("A list of servers that will host the first (0) index partition")] String IndexPartition[]; - [Required, Description("The local directory servers will use to store the first index partition")] String FirstPartitionDirectory; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/MSFT_SPSecureStoreServiceApp.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/MSFT_SPSecureStoreServiceApp.psm1 deleted file mode 100644 index df431dfa..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/MSFT_SPSecureStoreServiceApp.psm1 +++ /dev/null @@ -1,408 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $true)] - [System.Boolean] - $AuditingEnabled, - - [parameter(Mandatory = $false)] - [System.UInt32] - $AuditlogMaxSize, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [System.String] - $FailoverDatabaseServer, - - [parameter(Mandatory = $false)] - [System.Boolean] - $PartitionMode, - - [parameter(Mandatory = $false)] - [System.Boolean] - $Sharing, - - [parameter(Mandatory = $false)] - [ValidateSet("Windows", "SQL")] - [System.String] - $DatabaseAuthenticationType, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $DatabaseCredentials, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting secure store service application '$Name'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $nullReturn = @{ - Name = $params.Name - ApplicationPool = $params.ApplicationPool - AuditingEnabled = $false - Ensure = "Absent" - } - - $serviceApps = Get-SPServiceApplication -Name $params.Name -ErrorAction SilentlyContinue - if ($null -eq $serviceApps) - { - return $nullReturn - } - $serviceApp = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.SecureStoreService.Server.SecureStoreServiceApplication" - } - - if ($null -eq $serviceApp) - { - return $nullReturn - } - else - { - $serviceAppProxies = Get-SPServiceApplicationProxy -ErrorAction SilentlyContinue - if ($null -ne $serviceAppProxies) - { - $serviceAppProxy = $serviceAppProxies | Where-Object -FilterScript { - $serviceApp.IsConnected($_) - } - if ($null -ne $serviceAppProxy) - { - $proxyName = $serviceAppProxy.Name - } - } - - $propertyFlags = [System.Reflection.BindingFlags]::Instance ` - -bor [System.Reflection.BindingFlags]::NonPublic - - $propData = $serviceApp.GetType().GetProperties($propertyFlags) - - $dbProp = $propData | Where-Object -FilterScript { - $_.Name -eq "Database" - } - - $db = $dbProp.GetValue($serviceApp) - - return @{ - Name = $serviceApp.DisplayName - ProxyName = $proxyName - ApplicationPool = $serviceApp.ApplicationPool.Name - DatabaseName = $db.Name - DatabaseServer = $db.Server.Name - FailoverDatabaseServer = $db.FailoverServer - InstallAccount = $params.InstallAccount - Ensure = "Present" - } - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $true)] - [System.Boolean] - $AuditingEnabled, - - [parameter(Mandatory = $false)] - [System.UInt32] - $AuditlogMaxSize, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [System.String] - $FailoverDatabaseServer, - - [parameter(Mandatory = $false)] - [System.Boolean] - $PartitionMode, - - [parameter(Mandatory = $false)] - [System.Boolean] - $Sharing, - - [parameter(Mandatory = $false)] - [ValidateSet("Windows", "SQL")] - [System.String] - $DatabaseAuthenticationType, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $DatabaseCredentials, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting secure store service application '$Name'" - - $result = Get-TargetResource @PSBoundParameters - $params = $PSBoundParameters - - if ((($params.ContainsKey("DatabaseAuthenticationType") -eq $true) -and ` - ($params.ContainsKey("DatabaseCredentials") -eq $false)) -or ` - (($params.ContainsKey("DatabaseCredentials") -eq $true) -and ` - ($params.ContainsKey("DatabaseAuthenticationType") -eq $false))) - { - throw ("Where DatabaseCredentials are specified you must also specify " + ` - "DatabaseAuthenticationType to identify the type of credentials being passed") - return - } - - if ($result.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - Write-Verbose -Message "Creating Secure Store Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $params ` - -ScriptBlock { - $params = $args[0] - - if ($params.ContainsKey("Ensure")) - { - $params.Remove("Ensure") | Out-Null - } - if ($params.ContainsKey("InstallAccount")) - { - $params.Remove("InstallAccount") | Out-Null - } - - if($params.ContainsKey("DatabaseAuthenticationType")) - { - if ($params.DatabaseAuthenticationType -eq "SQL") - { - $params.Add("DatabaseUsername", $params.DatabaseCredentials.Username) - $params.Add("DatabasePassword", $params.DatabaseCredentials.Password) - } - $params.Remove("DatabaseAuthenticationType") - } - - if ($params.ContainsKey("ProxyName")) - { - $pName = $params.ProxyName - $params.Remove("ProxyName") | Out-Null - } - if ($null -eq $pName) - { - $pName = "$($params.Name) Proxy" - } - New-SPSecureStoreServiceApplication @params | New-SPSecureStoreServiceApplicationProxy -Name $pName - } - } - - if ($result.Ensure -eq "Present" -and $Ensure -eq "Present") - { - if ($PSBoundParameters.ContainsKey("DatabaseServer") -and ` - ($result.DatabaseServer -ne $DatabaseServer)) - { - throw ("Specified database server does not match the actual " + ` - "database server. This resource cannot move the database " + ` - "to a different SQL instance.") - } - - if ($PSBoundParameters.ContainsKey("DatabaseName") -and ` - ($result.DatabaseName -ne $DatabaseName)) - { - throw ("Specified database name does not match the actual " + ` - "database name. This resource cannot rename the database.") - } - - if ([string]::IsNullOrEmpty($ApplicationPool) -eq $false ` - -and $ApplicationPool -ne $result.ApplicationPool) - { - Write-Verbose -Message "Updating Secure Store Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApp = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.SecureStoreService.Server.SecureStoreServiceApplication" - } - $appPool = Get-SPServiceApplicationPool -Identity $params.ApplicationPool - Set-SPSecureStoreServiceApplication -Identity $serviceApp -ApplicationPool $appPool - } - } - } - - if ($Ensure -eq "Absent") - { - # The service app should not exit - Write-Verbose -Message "Removing Secure Store Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApp = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.SecureStoreService.Server.SecureStoreServiceApplication" - } - - # Remove the connected proxy(ies) - $proxies = Get-SPServiceApplicationProxy - foreach($proxyInstance in $proxies) - { - if($serviceApp.IsConnected($proxyInstance)) - { - $proxyInstance.Delete() - } - } - - Remove-SPServiceApplication $serviceApp -Confirm:$false - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $true)] - [System.Boolean] - $AuditingEnabled, - - [parameter(Mandatory = $false)] - [System.UInt32] - $AuditlogMaxSize, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [System.String] - $FailoverDatabaseServer, - - [parameter(Mandatory = $false)] - [System.Boolean] - $PartitionMode, - - [parameter(Mandatory = $false)] - [System.Boolean] - $Sharing, - - [parameter(Mandatory = $false)] - [ValidateSet("Windows", "SQL")] - [System.String] - $DatabaseAuthenticationType, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $DatabaseCredentials, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing secure store service application $Name" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($PSBoundParameters.ContainsKey("DatabaseServer") -and ` - ($CurrentValues.DatabaseServer -ne $DatabaseServer)) - { - Write-Verbose -Message ("Specified database server does not match the actual " + ` - "database server. This resource cannot move the database " + ` - "to a different SQL instance.") - return $false - } - - if ($PSBoundParameters.ContainsKey("DatabaseName") -and ` - ($CurrentValues.DatabaseName -ne $DatabaseName)) - { - Write-Verbose -Message ("Specified database name does not match the actual " + ` - "database name. This resource cannot rename the database.") - return $false - } - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("ApplicationPool", "Ensure") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/MSFT_SPSecureStoreServiceApp.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/MSFT_SPSecureStoreServiceApp.schema.mof deleted file mode 100644 index 98b57000..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/MSFT_SPSecureStoreServiceApp.schema.mof +++ /dev/null @@ -1,19 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPSecureStoreServiceApp")] -class MSFT_SPSecureStoreServiceApp : OMI_BaseResource -{ - [Key, Description("The name of the secure store service app")] string Name; - [Write, Description("The proxy name, if not specified will be /Name of service app/ Proxy")] string ProxyName; - [Required, Description("The name of the application pool it will run in")] string ApplicationPool; - [Required, Description("Is auditing enabled for this service app")] boolean AuditingEnabled; - [Write, Description("What is the maximum size of the audit log in MB")] uint32 AuditlogMaxSize; - [Write, Description("What SQL credentials should be used to access the database"), EmbeddedInstance("MSFT_Credential")] String DatabaseCredentials; - [Write, Description("The name of the database for the service app")] string DatabaseName; - [Write, Description("The name of the database server to host the database")] string DatabaseServer; - [Write, Description("What type of authentication should be used to access the database"), ValueMap{"Windows","SQL"}, Values{"Windows","SQL"}] string DatabaseAuthenticationType; - [Write, Description("The name of the database server hosting a failover instance of the database")] string FailoverDatabaseServer; - [Write, Description("Is partition mode enabled for this service app")] boolean PartitionMode; - [Write, Description("Is sharing enabled for this service app")] boolean Sharing; - [Write, Description("Present if the service app should exist, absent if it should not"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/MSFT_SPServiceAppPool.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/MSFT_SPServiceAppPool.psm1 deleted file mode 100644 index 2da3f966..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/MSFT_SPServiceAppPool.psm1 +++ /dev/null @@ -1,176 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ServiceAccount, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting service application pool '$Name'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $sap = Get-SPServiceApplicationPool -Identity $params.Name ` - -ErrorAction SilentlyContinue - if ($null -eq $sap) - { - return @{ - Name = $params.Name - ServiceAccount = $params.ProcessAccountName - InstallAccount = $params.InstallAccount - Ensure = "Absent" - } - } - return @{ - Name = $sap.Name - ServiceAccount = $sap.ProcessAccountName - InstallAccount = $params.InstallAccount - Ensure = "Present" - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ServiceAccount, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting service application pool '$Name'" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($CurrentValues.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - Write-Verbose -Message "Creating Service Application Pool $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - New-SPServiceApplicationPool -Name $params.Name ` - -Account $params.ServiceAccount - - $sap = Get-SPServiceApplicationPool -Identity $params.Name ` - -ErrorAction SilentlyContinue - if ($null -ne $sap) - { - if ($sap.ProcessAccountName -ne $params.ServiceAccount) - { - Set-SPServiceApplicationPool -Identity $params.Name ` - -Account $params.ServiceAccount - } - } - } - } - if ($CurrentValues.Ensure -eq "Present" -and $Ensure -eq "Present") - { - Write-Verbose -Message "Updating Service Application Pool $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $sap = Get-SPServiceApplicationPool -Identity $params.Name ` - -ErrorAction SilentlyContinue - if ($sap.ProcessAccountName -ne $params.ServiceAccount) - { - Set-SPServiceApplicationPool -Identity $params.Name ` - -Account $params.ServiceAccount - } - } - } - if ($Ensure -eq "Absent") - { - Write-Verbose -Message "Removing Service Application Pool $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - Remove-SPServiceApplicationPool -Identity $params.Name -Confirm:$false - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ServiceAccount, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing service application pool '$Name'" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($Ensure -eq "Present") - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("ServiceAccount", "Ensure") - } - else - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/MSFT_SPServiceAppPool.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/MSFT_SPServiceAppPool.schema.mof deleted file mode 100644 index a562ae7f..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/MSFT_SPServiceAppPool.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPServiceAppPool")] -class MSFT_SPServiceAppPool : OMI_BaseResource -{ - [Key, Description("The name of application pool")] string Name; - [Required, Description("The name of the managed account to run this service account as")] string ServiceAccount; - [Write, Description("Present if the service app pool should exist, absent if it should not"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/MSFT_SPServiceAppProxyGroup.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/MSFT_SPServiceAppProxyGroup.psm1 deleted file mode 100644 index dcf4593f..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/MSFT_SPServiceAppProxyGroup.psm1 +++ /dev/null @@ -1,449 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - [ValidateSet("Present","Absent")] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String[]] - $ServiceAppProxies, - - [parameter(Mandatory = $false)] - [System.String[]] - $ServiceAppProxiesToInclude, - - [parameter(Mandatory = $false)] - [System.String[]] - $ServiceAppProxiesToExclude, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting Service Application Proxy Group $Name" - - if (($Ensure -eq "Present") ` - -and $ServiceAppProxies ` - -and (($ServiceAppProxiesToInclude) -or ($ServiceAppProxiesToExclude))) - { - Write-Verbose -Message ("Cannot use the ServiceAppProxies parameter together " + ` - "with the ServiceAppProxiesToInclude or " + ` - "ServiceAppProxiesToExclude parameters") - return $null - } - - if (($Ensure -eq "Present") ` - -and !$ServiceAppProxies ` - -and !$ServiceAppProxiesToInclude ` - -and !$ServiceAppProxiesToExclude) - { - Write-Verbose -Message ("At least one of the following parameters must be specified: " + ` - "ServiceAppProxies, ServiceAppProxiesToInclude, " + ` - "ServiceAppProxiesToExclude") - return $null - } - - $result = Invoke-SPDSCCommand -Credential $InstallAccount -Arguments $PSBoundParameters -ScriptBlock { - $params = $args[0] - - #Try to get the proxy group - if ($params.Name -eq "Default") { - $ProxyGroup = Get-SPServiceApplicationProxyGroup -Default - } else { - $ProxyGroup = Get-SPServiceApplicationProxyGroup $params.name -ErrorAction SilentlyContinue - } - - if ($ProxyGroup){ - $Ensure = "Present" - } - else { - $Ensure = "Absent" - } - - $ServiceAppProxies = $ProxyGroup.Proxies.DisplayName - - return @{ - Name = $params.name - Ensure = $Ensure - ServiceAppProxies = $ServiceAppProxies - ServiceAppProxiesToInclude = $param.ServiceAppProxiesToInclude - ServiceAppProxiesToExclude = $param.ServiceAppProxiesToExclude - InstallAccount = $params.InstallAccount - } - - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - [ValidateSet("Present","Absent")] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String[]] - $ServiceAppProxies, - - [parameter(Mandatory = $false)] - [System.String[]] - $ServiceAppProxiesToInclude, - - [parameter(Mandatory = $false)] - [System.String[]] - $ServiceAppProxiesToExclude, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting Service Application Proxy Group $Name" - - if (($Ensure -eq "Present") ` - -and $ServiceAppProxies ` - -and (($ServiceAppProxiesToInclude) -or ($ServiceAppProxiesToExclude))) - { - throw ("Cannot use the ServiceAppProxies parameter together " + ` - "with the ServiceAppProxiesToInclude or " + ` - "ServiceAppProxiesToExclude parameters") - } - - if (($Ensure -eq "Present") ` - -and !$ServiceAppProxies ` - -and !$ServiceAppProxiesToInclude ` - -and !$ServiceAppProxiesToExclude) - { - throw ("At least one of the following parameters must be specified: " + ` - "ServiceAppProxies, ServiceAppProxiesToInclude, " + ` - "ServiceAppProxiesToExclude") - } - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - if ($params.Ensure -eq "Present") - { - if ($params.Name -eq "Default") - { - $ProxyGroup = Get-SPServiceApplicationProxyGroup -Default - } - else - { - $ProxyGroup = Get-SPServiceApplicationProxyGroup -Identity $params.Name ` - -ErrorAction SilentlyContinue - } - - if (!($ProxyGroup)) - { - Write-Verbose -Message "Creating new Service Application Proxy Group $($params.Name)" - $ProxyGroup = New-SPServiceApplicationProxyGroup -Name $params.Name - } - #Explicit Service Applications - if ($params.ServiceAppProxies) - { - if ($ProxyGroup.Proxies.DisplayName) - { - $differences = Compare-Object -ReferenceObject $ProxyGroup.Proxies.DisplayName ` - -DifferenceObject $params.ServiceAppProxies - - if ($null -eq $Differences) - { - Write-Verbose -Message ("Service Proxy Group $($params.name) " + ` - "membership matches desired state") - } - else - { - foreach ($difference in $differences) - { - if ($difference.SideIndicator -eq "=>") - { - $ServiceProxyName = $difference.InputObject - $ServiceProxy = Get-SPServiceApplicationProxy | ` - Where-Object -FilterScript { - $_.DisplayName -eq $ServiceProxyName - } - - if (!$ServiceProxy) - { - throw "Invalid Service Application Proxy $ServiceProxyName" - } - - Write-Verbose -Message "Adding $ServiceProxyName to $($params.name) Proxy Group" - $ProxyGroup | Add-SPServiceApplicationProxyGroupMember -Member $ServiceProxy - - } - elseif ($difference.SideIndicator -eq "<=") - { - $ServiceProxyName = $difference.InputObject - $ServiceProxy = Get-SPServiceApplicationProxy | ` - Where-Object -FilterScript { - $_.DisplayName -eq $ServiceProxyName - } - - if (!$ServiceProxy) - { - throw "Invalid Service Application Proxy $ServiceProxyName" - } - - Write-Verbose -Message "Removing $ServiceProxyName from $($params.name) Proxy Group" - $ProxyGroup | Remove-SPServiceApplicationProxyGroupMember -member $ServiceProxy - } - } - } - } - else - { - foreach ($ServiceProxyName in $params.ServiceAppProxies) - { - $ServiceProxy = Get-SPServiceApplicationProxy | Where-Object -FilterScript { - $_.DisplayName -eq $ServiceProxyName - } - - if (!$ServiceProxy) - { - throw "Invalid Service Application Proxy $ServiceProxyName" - } - - Write-Verbose -Message "Adding $ServiceProxyName to $($params.name) Proxy Group" - $ProxyGroup | Add-SPServiceApplicationProxyGroupMember -member $ServiceProxy - } - } - } - - if ($params.ServiceAppProxiesToInclude) - { - if ($ProxyGroup.Proxies.DisplayName) - { - $differences = Compare-Object -ReferenceObject $ProxyGroup.Proxies.DisplayName ` - -DifferenceObject $params.ServiceAppProxiesToInclude - - if ($null -eq $Differences) - { - Write-Verbose -Message "Service Proxy Group $($params.name) Membership matches desired state" - } - else - { - foreach ($difference in $differences) - { - if ($difference.SideIndicator -eq "=>") - { - $ServiceProxyName = $difference.InputObject - $ServiceProxy = Get-SPServiceApplicationProxy | ` - Where-Object -FilterScript { - $_.DisplayName -eq $ServiceProxyName - } - - if (!$ServiceProxy) - { - throw "Invalid Service Application Proxy $ServiceProxyName" - } - - Write-Verbose -Message "Adding $ServiceProxyName to $($params.name) Proxy Group" - $ProxyGroup | Add-SPServiceApplicationProxyGroupMember -member $ServiceProxy - - } - } - } - } - else - { - foreach ($ServiceProxyName in $params.ServiceAppProxies) - { - $ServiceProxy = Get-SPServiceApplicationProxy | ` - Where-Object -FilterScript { - $_.DisplayName -eq $ServiceProxyName - } - - if (!$ServiceProxy) - { - throw "Invalid Service Application Proxy $ServiceProxyName" - } - - Write-Verbose "Adding $ServiceProxyName to $($params.name) Proxy Group" - $ProxyGroup | Add-SPServiceApplicationProxyGroupMember -member $ServiceProxy - } - } - } - - if ($params.ServiceAppProxiesToExclude) - { - if ($ProxyGroup.Proxies.Displayname) - { - $differences = Compare-Object -ReferenceObject $ProxyGroup.Proxies.DisplayName ` - -DifferenceObject $params.ServiceAppProxiesToExclude ` - -IncludeEqual - - if ($null -eq $Differences) - { - throw "Error comparing ServiceAppProxiesToExclude for Service Proxy Group $($params.name)" - } - else - { - foreach ($difference in $differences) - { - if ($difference.SideIndicator -eq "==") - { - $ServiceProxyName = $difference.InputObject - $ServiceProxy = Get-SPServiceApplicationProxy | Where-Object -FilterScript { - $_.DisplayName -eq $ServiceProxyName - } - - if (!$ServiceProxy) - { - throw "Invalid Service Application Proxy $ServiceProxyName" - } - - Write-Verbose -Message "Removing $ServiceProxyName to $($params.name) Proxy Group" - $ProxyGroup | Remove-SPServiceApplicationProxyGroupMember -member $ServiceProxy - } - } - } - } - } - } - else - { - Write-Verbose "Removing $($params.name) Proxy Group" - $ProxyGroup | Remove-SPServiceApplicationProxyGroup -confirm:$false - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - [ValidateSet("Present","Absent")] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String[]] - $ServiceAppProxies, - - [parameter(Mandatory = $false)] - [System.String[]] - $ServiceAppProxiesToInclude, - - [parameter(Mandatory = $false)] - [System.String[]] - $ServiceAppProxiesToExclude, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing Service Application Proxy Group $Name" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($null -eq $CurrentValues) - { - return $false - } - - if ($CurrentValues.Ensure -ne $Ensure) - { - return $false - } - - if ($ServiceAppProxies) - { - Write-Verbose -Message "Testing ServiceAppProxies property for $Name Proxy Group" - - if (-not $CurrentValues.ServiceAppProxies) - { - return $false - } - - $differences = Compare-Object -ReferenceObject $CurrentValues.ServiceAppProxies ` - -DifferenceObject $ServiceAppProxies - - if ($null -eq $differences) - { - Write-Verbose -Message "ServiceAppProxies match" - } - else - { - Write-Verbose -Message "ServiceAppProxies do not match" - return $false - } - } - - if ($ServiceAppProxiesToInclude){ - Write-Verbose -Message "Testing ServiceAppProxiesToInclude property for $Name Proxy Group" - - if (-not $CurrentValues.ServiceAppProxies) - { - return $false - } - - $differences = Compare-Object -ReferenceObject $CurrentValues.ServiceAppProxies ` - -DifferenceObject $ServiceAppProxiesToInclude - - if ($null -eq $differences) - { - Write-Verbose -Message "ServiceAppProxiesToInclude matches" - } - elseif ($differences.sideindicator -contains "=>") - { - Write-Verbose -Message "ServiceAppProxiesToInclude does not match" - return $false - } - } - - if ($ServiceAppProxiesToExclude) - { - Write-Verbose -Message "Testing ServiceAppProxiesToExclude property for $Name Proxy Group" - - if (-not $CurrentValues.ServiceAppProxies) - { - return $true - } - - $differences = Compare-Object -ReferenceObject $CurrentValues.ServiceAppProxies ` - -DifferenceObject $ServiceAppProxiesToExclude ` - -IncludeEqual - - if ($null -eq $differences) - { - return $false - } - elseif ($differences.sideindicator -contains "==") - { - Write-Verbose -Message "ServiceAppProxiesToExclude does not match" - return $false - } - } - - return $true -} diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/MSFT_SPServiceAppProxyGroup.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/MSFT_SPServiceAppProxyGroup.schema.mof deleted file mode 100644 index cfb861d6..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/MSFT_SPServiceAppProxyGroup.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPServiceAppProxyGroup")] -class MSFT_SPServiceAppProxyGroup : OMI_BaseResource -{ - [Key, Description("Name of the Proxy Group to create")] String Name; - [Write, Description("Present creates the proxy group if it does not already exist, Absent will delete the proxy group if it exists"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("List of service application proxies that belong in this proxy group, all others will be removed")] String ServiceAppProxies[]; - [Write, Description("List of service application proxies to add to this proxy group, existing proxies will remain")] String ServiceAppProxiesToInclude[]; - [Write, Description("List of service application proxies to remove from this proxy grop, all others will remain")] String ServiceAppProxiesToExclude[]; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/MSFT_SPServiceAppSecurity.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/MSFT_SPServiceAppSecurity.psm1 deleted file mode 100644 index a87d12e7..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/MSFT_SPServiceAppSecurity.psm1 +++ /dev/null @@ -1,419 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $true)] - [ValidateSet("Administrators","SharingPermissions")] - [System.String] - $SecurityType, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $Members, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $MembersToInclude, - - [parameter(Mandatory = $false)] - [System.String[]] - $MembersToExclude, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting all security options for $SecurityType in $ServiceAppName" - - if ($Members -and (($MembersToInclude) -or ($MembersToExclude))) - { - throw ("Cannot use the Members parameter together with the MembersToInclude or " + ` - "MembersToExclude parameters") - } - - if (!$Members -and !$MembersToInclude -and !$MembersToExclude) - { - throw ("At least one of the following parameters must be specified: Members, " + ` - "MembersToInclude, MembersToExclude") - } - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApp = Get-SPServiceApplication -Name $params.ServiceAppName - - if ($null -eq $serviceApp) - { - return @{ - ServiceAppName = "" - SecurityType = $params.SecurityType - InstallAccount = $params.InstallAccount - } - } - - switch ($params.SecurityType) - { - "Administrators" { - $security = $serviceApp | Get-SPServiceApplicationSecurity -Admin - } - "SharingPermissions" { - $security = $serviceApp | Get-SPServiceApplicationSecurity - } - } - - $members = @() - foreach ($securityEntry in $security.AccessRules) - { - $user = $securityEntry.Name - if ($user -like "i:*|*" -or $user -like "c:*|*") - { - $user = (New-SPClaimsPrincipal -Identity $user -IdentityType EncodedClaim).Value - if ($user -match "^s-1-[0-59]-\d+-\d+-\d+-\d+-\d+") - { - $user = Resolve-SPDscSecurityIdentifier -SID $user - } - } - - $accessLevel = $securityEntry.AllowedRights.ToString() - $accessLevel = $accessLevel.Replace("FullControl", "Full Control") - $accessLevel = $accessLevel.Replace("ChangePermissions", "Change Permissions") - $members += @{ - Username = $user - AccessLevel = $accessLevel - } - } - - return @{ - ServiceAppName = $params.ServiceAppName - SecurityType = $params.SecurityType - Members = $members - MembersToInclude = $params.MembersToInclude - MembersToExclude = $params.MembersToExclude - InstallAccount = $params.InstallAccount - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $true)] - [ValidateSet("Administrators","SharingPermissions")] - [System.String] - $SecurityType, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $Members, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $MembersToInclude, - - [parameter(Mandatory = $false)] - [System.String[]] - $MembersToExclude, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting all security options for $SecurityType in $ServiceAppName" - - if ($Members -and (($MembersToInclude) -or ($MembersToExclude))) - { - throw ("Cannot use the Members parameter together with the MembersToInclude or " + ` - "MembersToExclude parameters") - } - - if (!$Members -and !$MembersToInclude -and !$MembersToExclude) - { - throw ("At least one of the following parameters must be specified: Members, " + ` - "MembersToInclude, MembersToExclude") - } - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ([System.String]::IsNullOrEmpty($CurrentValues.ServiceAppName) -eq $true) - { - throw "Unable to locate service application $ServiceAppName" - } - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters, $CurrentValues) ` - -ScriptBlock { - $params = $args[0] - $CurrentValues = $args[1] - - $serviceApp = Get-SPServiceApplication -Name $params.ServiceAppName - switch ($params.SecurityType) - { - "Administrators" { - $security = $serviceApp | Get-SPServiceApplicationSecurity -Admin - } - "SharingPermissions" { - $security = $serviceApp | Get-SPServiceApplicationSecurity - } - } - - if ($params.ContainsKey("Members") -eq $true) - { - foreach($desiredMember in $params.Members) - { - $isUser = Test-SPDSCIsADUser -IdentityName $desiredMember.Username - if ($isUser -eq $true) - { - $claim = New-SPClaimsPrincipal -Identity $desiredMember.Username ` - -IdentityType WindowsSamAccountName - } - else - { - $claim = New-SPClaimsPrincipal -Identity $desiredMember.Username ` - -IdentityType WindowsSecurityGroupName - } - - if ($CurrentValues.Members.Username -contains $desiredMember.Username) - { - if (($CurrentValues.Members | Where-Object -FilterScript { - $_.Username -eq $desiredMember.Username - } | Select-Object -First 1).AccessLevel -ne $desiredMember.AccessLevel) - { - Revoke-SPObjectSecurity -Identity $security ` - -Principal $claim - - Grant-SPObjectSecurity -Identity $security ` - -Principal $claim ` - -Rights $desiredMember.AccessLevel - } - } - else - { - Grant-SPObjectSecurity -Identity $security -Principal $claim -Rights $desiredMember.AccessLevel - } - } - - foreach($currentMember in $CurrentValues.Members) - { - if ($params.Members.Username -notcontains $currentMember.Username) - { - $isUser = Test-SPDSCIsADUser -IdentityName $desiredMember.Username - if ($isUser -eq $true) - { - $claim = New-SPClaimsPrincipal -Identity $desiredMember.Username ` - -IdentityType WindowsSamAccountName - } - else - { - $claim = New-SPClaimsPrincipal -Identity $desiredMember.Username ` - -IdentityType WindowsSecurityGroupName - } - Revoke-SPObjectSecurity -Identity $security -Principal $claim - } - } - } - - if ($params.ContainsKey("MembersToInclude") -eq $true) - { - foreach($desiredMember in $params.MembersToInclude) - { - $isUser = Test-SPDSCIsADUser -IdentityName $desiredMember.Username - if ($isUser -eq $true) - { - $claim = New-SPClaimsPrincipal -Identity $desiredMember.Username ` - -IdentityType WindowsSamAccountName - } - else - { - $claim = New-SPClaimsPrincipal -Identity $desiredMember.Username ` - -IdentityType WindowsSecurityGroupName - } - if ($CurrentValues.Members.Username -contains $desiredMember.Username) - { - if (($CurrentValues.Members | Where-Object -FilterScript { - $_.Username -eq $desiredMember.Username - } | Select-Object -First 1).AccessLevel -ne $desiredMember.AccessLevel) - { - Revoke-SPObjectSecurity -Identity $security ` - -Principal $claim - - Grant-SPObjectSecurity -Identity $security ` - -Principal $claim ` - -Rights $desiredMember.AccessLevel - } - } - else - { - Grant-SPObjectSecurity -Identity $security ` - -Principal $claim ` - -Rights $desiredMember.AccessLevel - } - } - } - - if ($params.ContainsKey("MembersToExclude") -eq $true) - { - foreach($excludeMember in $params.MembersToExclude) - { - if ($CurrentValues.Members.Username -contains $excludeMember) - { - $isUser = Test-SPDSCIsADUser -IdentityName $desiredMember.Username - if ($isUser -eq $true) - { - $claim = New-SPClaimsPrincipal -Identity $desiredMember.Username ` - -IdentityType WindowsSamAccountName - } - else - { - $claim = New-SPClaimsPrincipal -Identity $desiredMember.Username ` - -IdentityType WindowsSecurityGroupName - } - Revoke-SPObjectSecurity -Identity $security -Principal $claim - } - } - } - - switch ($params.SecurityType) - { - "Administrators" { - $security = $serviceApp | Set-SPServiceApplicationSecurity -ObjectSecurity $security ` - -Admin - } - "SharingPermissions" { - $security = $serviceApp | Set-SPServiceApplicationSecurity -ObjectSecurity $security - } - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppName, - - [parameter(Mandatory = $true)] - [ValidateSet("Administrators","SharingPermissions")] - [System.String] - $SecurityType, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $Members, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $MembersToInclude, - - [parameter(Mandatory = $false)] - [System.String[]] - $MembersToExclude, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing all security options for $SecurityType in $ServiceAppName" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ([System.String]::IsNullOrEmpty($CurrentValues.ServiceAppName) -eq $true) - { - return $false - } - - if ($Members) - { - Write-Verbose -Message "Processing Members parameter" - $differences = Compare-Object -ReferenceObject $CurrentValues.Members.Username ` - -DifferenceObject $Members.Username - - if ($null -eq $differences) - { - Write-Verbose -Message "Security list matches - checking that permissions match on each object" - foreach($currentMember in $CurrentValues.Members) - { - if ($currentMember.AccessLevel -ne ($Members | Where-Object -FilterScript { - $_.Username -eq $currentMember.Username - } | Select-Object -First 1).AccessLevel) - { - Write-Verbose -Message "$($currentMember.Username) has incorrect permission level. Test failed." - return $false - } - } - return $true - } - else - { - Write-Verbose -Message "Security list does not match" - return $false - } - } - - $result = $true - if ($MembersToInclude) - { - Write-Verbose -Message "Processing MembersToInclude parameter" - foreach ($member in $MembersToInclude) - { - if (-not($CurrentValues.Members.Username -contains $member.Username)) - { - Write-Verbose -Message "$($member.Username) does not have access. Set result to false" - $result = $false - } - else - { - Write-Verbose -Message "$($member.Username) already has access. Checking permission..." - if ($member.AccessLevel -ne ($CurrentValues.Members | Where-Object -FilterScript { - $_.Username -eq $member.Username - } | Select-Object -First 1).AccessLevel) - { - Write-Verbose -Message "$($member.Username) has incorrect permission level. Test failed." - return $false - } - } - } - } - - if ($MembersToExclude) - { - Write-Verbose -Message "Processing MembersToExclude parameter" - foreach ($member in $MembersToExclude) - { - if ($CurrentValues.Members.Username -contains $member.Username) - { - Write-Verbose -Message "$member already has access. Set result to false" - $result = $false - } - else - { - Write-Verbose -Message "$member does not have access. Skipping" - } - } - } - - return $result -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/MSFT_SPServiceAppSecurity.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/MSFT_SPServiceAppSecurity.schema.mof deleted file mode 100644 index f68a8073..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/MSFT_SPServiceAppSecurity.schema.mof +++ /dev/null @@ -1,16 +0,0 @@ -[ClassVersion("1.0.0.0")] -class MSFT_SPServiceAppSecurityEntry -{ - [Key, Description("The username for the entry")] String Username; - [Required, Description("The access level for the entry"), ValueMap{"Change Permissions","Full Control", "Write", "Read"}, Values{"Change Permissions","Full Control", "Write", "Read"}] String AccessLevel; -}; -[ClassVersion("1.0.0.0"), FriendlyName("SPServiceAppSecurity")] -class MSFT_SPServiceAppSecurity : OMI_BaseResource -{ - [Key, Description("The name of the service application you wish to apply security settings to")] String ServiceAppName; - [Key, Description("Administrators will set the administrators for the service app, SharingPermissions will set those granted access through the permissions button seen in the Sharing section of the ribbon in central admin"), ValueMap{"Administrators","SharingPermissions"}, Values{"Administrators","SharingPermissions"}] string SecurityType; - [Write, Description("A list of members to set the group to. Those not in this list will be removed"), EmbeddedInstance("MSFT_SPServiceAppSecurityEntry")] String Members[]; - [Write, Description("A list of members to add. Members not in this list will be left in the group"), EmbeddedInstance("MSFT_SPServiceAppSecurityEntry")] String MembersToInclude[]; - [Write, Description("A list of members to remove. Members not in this list will be left in the group")] String MembersToExclude[]; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceInstance/MSFT_SPServiceInstance.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceInstance/MSFT_SPServiceInstance.psm1 deleted file mode 100644 index da4e6f1d..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceInstance/MSFT_SPServiceInstance.psm1 +++ /dev/null @@ -1,295 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present" - ) - - Write-Verbose -Message "Getting service instance '$Name'" - - $newName = (Get-SPDscServiceTypeName -DisplayName $Name) - - $invokeArgs = @{ - Credential = $InstallAccount - Arguments = @($PSBoundParameters, $newName) - } - $result = Invoke-SPDSCCommand @invokeArgs -ScriptBlock { - $params = $args[0] - $newName = $args[1] - - $si = Get-SPServiceInstance -Server $env:COMPUTERNAME | Where-Object -FilterScript { - $_.TypeName -eq $params.Name -or ` - $_.TypeName -eq $newName -or ` - $_.GetType().Name -eq $newName - } - - if ($null -eq $si) - { - $domain = (Get-CimInstance -ClassName Win32_ComputerSystem).Domain - $fqdn = "$($env:COMPUTERNAME).$domain" - $si = Get-SPServiceInstance -Server $fqdn | Where-Object -FilterScript { - $_.TypeName -eq $params.Name -or ` - $_.TypeName -eq $newName -or ` - $_.GetType().Name -eq $newName - } - } - - if ($null -eq $si) - { - return @{ - Name = $params.Name - Ensure = "Absent" - InstallAccount = $params.InstallAccount - } - } - if ($si.Status -eq "Online") - { - $localEnsure = "Present" - } - else - { - $localEnsure = "Absent" - } - - return @{ - Name = $params.Name - Ensure = $localEnsure - InstallAccount = $params.InstallAccount - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present" - ) - - Write-Verbose -Message "Setting service instance '$Name'" - - $newName = (Get-SPDscServiceTypeName -DisplayName $Name) - $invokeArgs = @{ - Credential = $InstallAccount - Arguments = @($PSBoundParameters, $newName) - } - - if ($Ensure -eq "Present") - { - Write-Verbose -Message "Provisioning service instance '$Name'" - - Invoke-SPDSCCommand @invokeArgs -ScriptBlock { - $params = $args[0] - $newName = $args[1] - - $si = Get-SPServiceInstance -Server $env:COMPUTERNAME | Where-Object -FilterScript { - $_.TypeName -eq $params.Name -or ` - $_.TypeName -eq $newName -or ` - $_.GetType().Name -eq $newName - } - - if ($null -eq $si) - { - $domain = (Get-CimInstance -ClassName Win32_ComputerSystem).Domain - $fqdn = "$($env:COMPUTERNAME).$domain" - $si = Get-SPServiceInstance -Server $fqdn | Where-Object -FilterScript { - $_.TypeName -eq $params.Name -or ` - $_.TypeName -eq $newName -or ` - $_.GetType().Name -eq $newName - } - } - if ($null -eq $si) { - throw [Exception] "Unable to locate service application '$($params.Name)'" - } - Start-SPServiceInstance -Identity $si - } - } - else - { - Write-Verbose -Message "Deprovisioning service instance '$Name'" - - Invoke-SPDSCCommand @invokeArgs -ScriptBlock { - $params = $args[0] - $newName = $args[1] - - $si = Get-SPServiceInstance -Server $env:COMPUTERNAME | Where-Object -FilterScript { - $_.TypeName -eq $params.Name -or ` - $_.TypeName -eq $newName -or ` - $_.GetType().Name -eq $newName - } - - if ($null -eq $si) - { - $domain = (Get-CimInstance -ClassName Win32_ComputerSystem).Domain - $fqdn = "$($env:COMPUTERNAME).$domain" - $si = Get-SPServiceInstance -Server $fqdn | Where-Object -FilterScript { - $_.TypeName -eq $params.Name -or ` - $_.TypeName -eq $newName -or ` - $_.GetType().Name -eq $newName - } - } - if ($null -eq $si) { - throw [Exception] "Unable to locate service application '$($params.Name)'" - } - Stop-SPServiceInstance -Identity $si - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present" - ) - - Write-Verbose -Message "Testing service instance '$Name'" - - $PSBoundParameters.Ensure = $Ensure - - $testArgs = @{ - CurrentValues = (Get-TargetResource @PSBoundParameters) - DesiredValues = $PSBoundParameters - ValuesToCheck = @("Name", "Ensure") - } - return Test-SPDscParameterState @testArgs -} - -function Get-SPDscServiceTypeName -{ - [CmdletBinding()] - [OutputType([System.String])] - param( - [Parameter(Mandatory = $true)] - [string] - $DisplayName - ) - switch ($DisplayName) - { - "Access Database Service 2010" { - return "AccessServerWebServiceInstance" - } - "Access Services" { - return "AccessServicesWebServiceInstance" - } - "App Management Service" { - return "AppManagementServiceInstance" - } - "Business Data Connectivity Service" { - return "BdcServiceInstance" - } - "PerformancePoint Service" { - return "BIMonitoringServiceInstance" - } - "Excel Calculation Services" { - return "ExcelServerWebServiceInstance" - } - "Document Conversions Launcher Service" { - return "LauncherServiceInstance" - } - "Document Conversions Load Balancer Service" { - return "LoadBalancerServiceInstance" - } - "Managed Metadata Web Service" { - return "MetadataWebServiceInstance" - } - "Lotus Notes Connector" { - return "NotesWebServiceInstance" - } - "PowerPoint Conversion Service" { - return "PowerPointConversionServiceInstance" - } - "User Profile Synchronization Service" { - return "ProfileSynchronizationServiceInstance" - } - "Search Query and Site Settings Service" { - return "SearchQueryAndSiteSettingsServiceInstance" - } - "Search Host Controller Service" { - return "SearchRuntimeServiceInstance" - } - "SharePoint Server Search" { - return "SearchServiceInstance" - } - "Secure Store Service" { - return "SecureStoreServiceInstance" - } - "Microsoft SharePoint Foundation Incoming E-Mail" { - return "SPIncomingEmailServiceInstance" - } - "Request Management" { - return "SPRequestManagementServiceInstance" - } - "Microsoft SharePoint Foundation Subscription Settings Service" { - return "SPSubscriptionSettingsServiceInstance" - } - "Microsoft SharePoint Foundation Sandboxed Code Service" { - return "SPUserCodeServiceInstance" - } - "Claims to Windows Token Service" { - return "SPWindowsTokenServiceInstance" - } - "Microsoft SharePoint Foundation Workflow Timer Service" { - return "SPWorkflowTimerServiceInstance" - } - "Machine Translation Service" { - return "TranslationServiceInstance" - } - "User Profile Service" { - return "UserProfileServiceInstance" - } - "Visio Graphics Service" { - return "VisioGraphicsServiceInstance" - } - "Word Automation Services" { - return "WordServiceInstance" - } - "Work Management Service" { - return "WorkManagementServiceInstance" - } - Default { - return $DisplayName - } - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceInstance/MSFT_SPServiceInstance.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceInstance/MSFT_SPServiceInstance.schema.mof deleted file mode 100644 index 875823de..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPServiceInstance/MSFT_SPServiceInstance.schema.mof +++ /dev/null @@ -1,7 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPServiceInstance")] -class MSFT_SPServiceInstance : OMI_BaseResource -{ - [Key, Description("The name of the service instance to manage")] string Name; - [Write, Description("Present to ensure it runs on this server, or absent to ensure it is stopped"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSessionStateService/MSFT_SPSessionStateService.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSessionStateService/MSFT_SPSessionStateService.psm1 deleted file mode 100644 index e426a633..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSessionStateService/MSFT_SPSessionStateService.psm1 +++ /dev/null @@ -1,179 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.UInt32] - $SessionTimeout, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting SPSessionStateService info" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $svc = Get-SPSessionStateService - $Ensure = "Absent" - if ($svc.SessionStateEnabled -eq $true) - { - $Ensure = "Present" - } - return @{ - DatabaseName = $svc.CatalogName - DatabaseServer = $svc.ServerName - Ensure = $Ensure - SessionTimeout = $svc.Timeout.TotalMinutes - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.UInt32] - $SessionTimeout, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting SPSessionStateService info" - - if($SessionTimeout -eq 0) - { - $SessionTimeout = 60 - } - - if ($Ensure -eq "Present") - { - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $svc = Get-SPSessionStateService - if($svc.SessionStateEnabled) - { - if($svc.Timeout.TotalMinutes -ne $params.SessionTimeout){ - Write-Verbose -Message "Configuring SPSessionState timeout" - Set-SPSessionStateService -SessionTimeout $params.SessionTimeout - } - } - else - { - Write-Verbose -Message "Enabling SPSessionState" - Enable-SPSessionStateService -DatabaseName $params.DatabaseName ` - -DatabaseServer $params.DatabaseServer ` - -SessionTimeout $params.SessionTimeout - } - } - } - if ($Ensure -eq "Absent") - { - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $svc = Get-SPSessionStateService - if($svc.SessionStateEnabled) - { - Write-Verbose -Message "Disabling SPSessionState" - Disable-SPSessionStateService - } - else - { - Write-Verbose -Message "Keeping SPSessionState disabled" - } - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.UInt32] - $SessionTimeout, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing SPSessionStateService info" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($Ensure -eq "Present") - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure","SessionTimeout") - } - else - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSessionStateService/MSFT_SPSessionStateService.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSessionStateService/MSFT_SPSessionStateService.schema.mof deleted file mode 100644 index 1cfd177b..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSessionStateService/MSFT_SPSessionStateService.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPSessionStateService")] -class MSFT_SPSessionStateService : OMI_BaseResource -{ - [Key, Description("The name of the database for the service")] string DatabaseName; - [Key, Description("The name of the database server for the database")] string DatabaseServer; - [Write, Description("Present is the state service should be enabled, absent if it should be disabled"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("What is the timeout on sessions")] uint32 SessionTimeout; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPShellAdmins/MSFT_SPShellAdmins.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPShellAdmins/MSFT_SPShellAdmins.psm1 deleted file mode 100644 index 74f5e8b4..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPShellAdmins/MSFT_SPShellAdmins.psm1 +++ /dev/null @@ -1,956 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String[]] - $Members, - - [parameter(Mandatory = $false)] - [System.String[]] - $MembersToInclude, - - [parameter(Mandatory = $false)] - [System.String[]] - $MembersToExclude, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $ContentDatabases, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllContentDatabases, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting Shell Admins config" - - if ($Members -and (($MembersToInclude) -or ($MembersToExclude))) - { - Write-Verbose -Message ("Cannot use the Members parameter together with the " + ` - "MembersToInclude or MembersToExclude parameters") - return $null - } - - if ($ContentDatabases) - { - foreach ($contentDatabase in $ContentDatabases) - { - if ($contentDatabase.Members -and (($contentDatabase.MembersToInclude) ` - -or ($contentDatabase.MembersToExclude))) - { - Write-Verbose -Message ("ContentDatabases: Cannot use the Members parameter " + ` - "together with the MembersToInclude or " + ` - "MembersToExclude parameters") - return $null - } - - if (!$contentDatabase.Members ` - -and !$contentDatabase.MembersToInclude ` - -and !$contentDatabase.MembersToExclude) - { - Write-Verbose -Message ("ContentDatabases: At least one of the following " + ` - "parameters must be specified: Members, " + ` - "MembersToInclude, MembersToExclude") - return $null - } - } - } - else - { - if (!$Members -and !$MembersToInclude -and !$MembersToExclude) - { - Write-Verbose -Message ("At least one of the following parameters must be " + ` - "specified: Members, MembersToInclude, MembersToExclude") - return $null - } - } - - if ($ContentDatabases -and $AllContentDatabases) - { - Write-Verbose -Message ("Cannot use the ContentDatabases parameter together with the " + ` - "AllContentDatabases parameter") - return $null - } - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters, $PSScriptRoot) ` - -ScriptBlock { - $params = $args[0] - $scriptRoot = $args[1] - - Import-Module -Name (Join-Path -Path $scriptRoot -ChildPath "MSFT_SPShellAdmins.psm1") - - try - { - $spFarm = Get-SPFarm - } - catch - { - Write-Verbose -Message ("No local SharePoint farm was detected. Shell admin " + ` - "settings will not be applied") - return $null - } - - $shellAdmins = Get-SPShellAdmin - $allContentDatabases = $true - - $cdbPermissions = @() - $databases = Get-SPContentDatabase - foreach ($contentDatabase in $databases) - { - $cdbPermission = @{} - - $cdbPermission.Name = $contentDatabase.Name - $dbShellAdmins = Get-SPShellAdmin -Database $contentDatabase.Id - $cdbPermission.Members = $dbShellAdmins.UserName - - $cdbPermissions += $cdbPermission - } - - return @{ - Name = $params.Name - Members = $shellAdmins.UserName - MembersToInclude = $params.MembersToInclude - MembersToExclude = $params.MembersToExclude - ContentDatabases = $cdbPermissions - AllContentDatabases = $params.AllContentDatabases - InstallAccount = $params.InstallAccount - } - } - return $result -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String[]] - $Members, - - [parameter(Mandatory = $false)] - [System.String[]] - $MembersToInclude, - - [parameter(Mandatory = $false)] - [System.String[]] - $MembersToExclude, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $ContentDatabases, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllContentDatabases, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting Shell Admin config" - - if ($Members -and (($MembersToInclude) -or ($MembersToExclude))) - { - throw ("Cannot use the Members parameter together with the " + ` - "MembersToInclude or MembersToExclude parameters") - } - - if ($ContentDatabases) - { - foreach ($contentDatabase in $ContentDatabases) - { - if ($contentDatabase.Members -and (($contentDatabase.MembersToInclude) ` - -or ($contentDatabase.MembersToExclude))) - { - throw ("ContentDatabases: Cannot use the Members parameter " + ` - "together with the MembersToInclude or " + ` - "MembersToExclude parameters") - } - - if (!$contentDatabase.Members ` - -and !$contentDatabase.MembersToInclude ` - -and !$contentDatabase.MembersToExclude) - { - throw ("ContentDatabases: At least one of the following " + ` - "parameters must be specified: Members, " + ` - "MembersToInclude, MembersToExclude") - } - } - } - else - { - if (!$Members -and !$MembersToInclude -and !$MembersToExclude) - { - throw ("At least one of the following parameters must be " + ` - "specified: Members, MembersToInclude, MembersToExclude") - } - } - - if ($ContentDatabases -and $AllContentDatabases) - { - throw ("Cannot use the ContentDatabases parameter together with the " + ` - "AllContentDatabases parameter") - } - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters, $PSScriptRoot) ` - -ScriptBlock { - $params = $args[0] - $scriptRoot = $args[1] - - Import-Module -Name (Join-Path -Path $scriptRoot -ChildPath "MSFT_SPShellAdmins.psm1") - - try - { - $spFarm = Get-SPFarm - } - catch - { - throw ("No local SharePoint farm was detected. Shell admin " + ` - "settings will not be applied") - } - - $shellAdmins = Get-SPShellAdmin - - if ($params.Members) - { - Write-Verbose -Message "Processing Members" - if ($shellAdmins) - { - $differences = Compare-Object -ReferenceObject $shellAdmins.UserName ` - -DifferenceObject $params.Members - - if ($null -eq $differences) - { - Write-Verbose -Message ("Shell Admins group matches. No further " + ` - "processing required") - } - else - { - Write-Verbose -Message ("Shell Admins group does not match. Perform " + ` - "corrective action") - - foreach ($difference in $differences) - { - if ($difference.SideIndicator -eq "=>") - { - $user = $difference.InputObject - try - { - Add-SPShellAdmin -UserName $user - } - catch - { - throw ("Error while setting the Shell Admin. The Shell " + ` - "Admin permissions will not be applied. Error " + ` - "details: $($_.Exception.Message)") - return - } - } - elseif ($difference.SideIndicator -eq "<=") - { - $user = $difference.InputObject - try - { - Remove-SPShellAdmin -UserName $user -Confirm:$false - } - catch - { - throw ("Error while removing the Shell Admin. The Shell Admin " + ` - "permissions will not be revoked. Error details: " + ` - "$($_.Exception.Message)") - return - } - } - } - } - } - else - { - foreach ($member in $params.Members) - { - try - { - Add-SPShellAdmin -UserName $member - } - catch - { - throw ("Error while setting the Shell Admin. The Shell Admin " + ` - "permissions will not be applied. Error details: " + ` - "$($_.Exception.Message)") - return - } - } - } - } - - if ($params.MembersToInclude) - { - Write-Verbose -Message "Processing MembersToInclude" - if ($shellAdmins) - { - foreach ($member in $params.MembersToInclude) - { - if (-not $shellAdmins.UserName.Contains($member)) - { - try - { - Add-SPShellAdmin -UserName $member - } - catch - { - throw ("Error while setting the Shell Admin. The Shell Admin " + ` - "permissions will not be applied. Error details: " + ` - "$($_.Exception.Message)") - return - } - } - } - } - else - { - foreach ($member in $params.MembersToInclude) - { - try - { - Add-SPShellAdmin -UserName $member - } - catch - { - throw ("Error while setting the Shell Admin. The Shell Admin " + ` - "permissions will not be applied. Error details: $($_.Exception.Message)") - return - } - } - } - } - - if ($params.MembersToExclude) - { - Write-Verbose -Message "Processing MembersToExclude" - if ($shellAdmins) - { - foreach ($member in $params.MembersToExclude) - { - if ($shellAdmins.UserName.Contains($member)) - { - try - { - Remove-SPShellAdmin -UserName $member -Confirm:$false - } - catch - { - throw ("Error while removing the Shell Admin. The Shell Admin " + ` - "permissions will not be revoked. Error details: " + ` - "$($_.Exception.Message)") - return - } - } - } - } - } - - if ($params.ContentDatabases) - { - Write-Verbose -Message "Processing ContentDatabases parameter" - # The ContentDatabases parameter is set - # Compare the configuration against the actual set and correct any issues - - foreach ($contentDatabase in $params.ContentDatabases) - { - # Check if configured database exists, throw error if not - Write-Verbose -Message "Processing Content Database: $($contentDatabase.Name)" - - $currentCDB = Get-SPContentDatabase | Where-Object -FilterScript { - $_.Name -eq $contentDatabase.Name - } - if ($null -ne $currentCDB) - { - $dbShellAdmins = Get-SPShellAdmin -database $currentCDB.Id - - if ($contentDatabase.Members) - { - Write-Verbose -Message "Processing Members" - if ($dbShellAdmins) - { - $differences = Compare-Object -ReferenceObject $contentDatabase.Members ` - -DifferenceObject $dbShellAdmins.UserName - foreach ($difference in $differences) - { - if ($difference.SideIndicator -eq "<=") - { - $user = $difference.InputObject - try - { - Add-SPShellAdmin -database $currentCDB.Id -UserName $user - } - catch - { - throw ("Error while setting the Shell Admin. The " + ` - "Shell Admin permissions will not be applied. " + ` - "Error details: $($_.Exception.Message)") - return - } - } - elseif ($difference.SideIndicator -eq "=>") - { - $user = $difference.InputObject - try - { - Remove-SPShellAdmin -Database $currentCDB.Id ` - -UserName $user ` - -Confirm:$false - } - catch - { - throw ("Error while removing the Shell Admin. The " + ` - "Shell Admin permissions will not be revoked. " + ` - "Error details: $($_.Exception.Message)") - return - } - } - } - } - else - { - foreach ($member in $contentDatabase.Members) - { - try - { - Add-SPShellAdmin -database $currentCDB.Id -UserName $member - } - catch - { - throw ("Error while setting the Shell Admin. The Shell " + ` - "Admin permissions will not be applied. Error " + ` - "details: $($_.Exception.Message)") - return - } - } - } - } - - if ($contentDatabase.MembersToInclude) - { - Write-Verbose -Message "Processing MembersToInclude" - if ($dbShellAdmins) - { - foreach ($member in $contentDatabase.MembersToInclude) - { - if (-not $dbShellAdmins.UserName.Contains($member)) - { - try - { - Add-SPShellAdmin -database $currentCDB.Id -UserName $member - } - catch - { - throw ("Error while setting the Shell Admin. The " + ` - "Shell Admin permissions will not be applied. " + ` - "Error details: $($_.Exception.Message)") - return - } - } - } - } - else - { - foreach ($member in $contentDatabase.MembersToInclude) - { - try - { - Add-SPShellAdmin -database $currentCDB.Id -UserName $member - } - catch - { - throw ("Error while setting the Shell Admin. The Shell " + ` - "Admin permissions will not be applied. Error " + ` - "details: $($_.Exception.Message)") - return - } - } - } - } - - if ($contentDatabase.MembersToExclude) - { - Write-Verbose -Message "Processing MembersToExclude" - if ($dbShellAdmins) - { - foreach ($member in $contentDatabase.MembersToExclude) - { - if ($dbShellAdmins.UserName.Contains($member)) - { - try - { - Remove-SPShellAdmin -Database $currentCDB.Id ` - -UserName $member ` - -Confirm:$false - } - catch - { - throw ("Error while removing the Shell Admin. The " + ` - "Shell Admin permissions will not be revoked. " + ` - "Error details: $($_.Exception.Message)") - return - } - } - } - } - } - } - else - { - throw "Specified database does not exist: $($contentDatabase.Name)" - } - } - } - - if ($params.AllContentDatabases) - { - Write-Verbose -Message "Processing AllContentDatabases parameter" - - foreach ($contentDatabase in (Get-SPContentDatabase)) - { - $dbShellAdmins = Get-SPShellAdmin -database $contentDatabase.Id - if ($params.Members) - { - Write-Verbose -Message "Processing Content Database: $($contentDatabase.Name)" - if ($dbShellAdmins) - { - $differences = Compare-Object -ReferenceObject $dbShellAdmins.UserName ` - -DifferenceObject $params.Members - - if ($null -eq $differences) - { - Write-Verbose -Message ("Shell Admins group matches. No further " + ` - "processing required") - } - else - { - Write-Verbose -Message ("Shell Admins group does not match. Perform " + ` - "corrective action") - - foreach ($difference in $differences) - { - if ($difference.SideIndicator -eq "=>") - { - - $user = $difference.InputObject - try - { - Add-SPShellAdmin -database $contentDatabase.Id -UserName $user - } - catch - { - throw ("Error while setting the Shell Admin. The " + ` - "Shell Admin permissions will not be applied. " + ` - "Error details: $($_.Exception.Message)") - return - } - } - elseif ($difference.SideIndicator -eq "<=") - { - $user = $difference.InputObject - try - { - Remove-SPShellAdmin -Database $contentDatabase.Id ` - -UserName $user ` - -Confirm:$false - } - catch - { - throw ("Error while removing the Shell Admin. The " + ` - "Shell Admin permissions will not be revoked. " + ` - "Error details: $($_.Exception.Message)") - return - } - } - } - } - } - else - { - foreach ($member in $params.Members) - { - try - { - Add-SPShellAdmin -database $contentDatabase.Id -UserName $member - } - catch - { - throw ("Error while setting the Shell Admin. The Shell Admin " + ` - "permissions will not be applied. Error details: " + ` - "$($_.Exception.Message)") - return - } - } - } - } - - if ($params.MembersToInclude) - { - if ($dbShellAdmins) - { - foreach ($member in $params.MembersToInclude) - { - if (-not $dbShellAdmins.UserName.Contains($member)) - { - try - { - Add-SPShellAdmin -database $contentDatabase.Id -UserName $member - } - catch - { - throw ("Error while setting the Shell Admin. The Shell " + ` - "Admin permissions will not be applied. Error " + ` - "details: $($_.Exception.Message)") - return - } - } - } - } - else - { - foreach ($member in $params.MembersToInclude) - { - try - { - Add-SPShellAdmin -database $contentDatabase.Id -UserName $member - } - catch - { - throw ("Error while setting the Shell Admin. The Shell Admin " + ` - "permissions will not be applied. Error details: " + ` - "$($_.Exception.Message)") - return - } - } - - } - } - - if ($params.MembersToExclude) - { - if ($dbShellAdmins) - { - foreach ($member in $params.MembersToExclude) - { - if ($dbShellAdmins.UserName.Contains($member)) - { - try - { - Remove-SPShellAdmin -Database $contentDatabase.Id ` - -UserName $member ` - -Confirm:$false - } - catch - { - throw ("Error while removing the Shell Admin. The Shell " + ` - "Admin permissions will not be revoked. Error " + ` - "details: $($_.Exception.Message)") - return - } - } - } - } - } - } - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String[]] - $Members, - - [parameter(Mandatory = $false)] - [System.String[]] - $MembersToInclude, - - [parameter(Mandatory = $false)] - [System.String[]] - $MembersToExclude, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $ContentDatabases, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllContentDatabases, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing Shell Admin settings" - - # Start checking - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($null -eq $CurrentValues) - { - return $false - } - - if ($Members) - { - Write-Verbose -Message "Processing Members parameter" - if (-not $CurrentValues.Members) - { - return $false - } - - $differences = Compare-Object -ReferenceObject $CurrentValues.Members ` - -DifferenceObject $Members - - if ($null -eq $differences) - { - Write-Verbose -Message "Shell Admins group matches" - } - else - { - Write-Verbose -Message "Shell Admins group does not match" - return $false - } - } - - if ($MembersToInclude) - { - Write-Verbose -Message "Processing MembersToInclude parameter" - if (-not $CurrentValues.Members) - { - return $false - } - - foreach ($member in $MembersToInclude) - { - if (-not($CurrentValues.Members.Contains($member))) - { - Write-Verbose -Message "$member is not a Shell Admin. Set result to false" - return $false - } - else - { - Write-Verbose -Message "$member is already a Shell Admin. Skipping" - } - } - } - - if ($MembersToExclude) - { - Write-Verbose -Message "Processing MembersToExclude parameter" - if ($CurrentValues.Members) - { - foreach ($member in $MembersToExclude) - { - if ($CurrentValues.Members.Contains($member)) - { - Write-Verbose -Message "$member is a Shell Admin. Set result to false" - return $false - } - else - { - Write-Verbose -Message "$member is not a Shell Admin. Skipping" - } - } - } - } - - if ($AllContentDatabases) - { - # The AllContentDatabases parameter is set - # Check the Members group against all databases - Write-Verbose -Message "Processing AllContentDatabases parameter" - - foreach ($contentDatabase in $CurrentValues.ContentDatabases) - { - # Check if configured database exists, throw error if not - Write-Verbose -Message "Processing Content Database: $($contentDatabase.Name)" - - if ($Members) - { - if (-not $contentDatabase.Members) - { - return $false - } - - $differences = Compare-Object -ReferenceObject $contentDatabase.Members ` - -DifferenceObject $Members - - if ($null -eq $differences) - { - Write-Verbose -Message "Shell Admins group matches" - } - else - { - Write-Verbose -Message "Shell Admins group does not match" - return $false - } - } - - if ($MembersToInclude) - { - if (-not $contentDatabase.Members) - { - return $false - } - - foreach ($member in $MembersToInclude) - { - if (-not($contentDatabase.Members.Contains($member))) - { - Write-Verbose -Message "$member is not a Shell Admin. Set result to false" - return $false - } - else - { - Write-Verbose -Message "$member is already a Shell Admin. Skipping" - } - } - } - - if ($MembersToExclude) - { - if ($contentDatabase.Members) - { - foreach ($member in $MembersToExclude) - { - if ($contentDatabase.Members.Contains($member)) - { - Write-Verbose -Message "$member is a Shell Admin. Set result to false" - return $false - } - else - { - Write-Verbose -Message "$member is not a Shell Admin. Skipping" - } - } - } - } - } - } - - if ($ContentDatabases) - { - # The ContentDatabases parameter is set - # Compare the configuration against the actual set - Write-Verbose -Message "Processing ContentDatabases parameter" - - foreach ($contentDatabase in $ContentDatabases) - { - # Check if configured database exists, throw error if not - Write-Verbose -Message "Processing Content Database: $($contentDatabase.Name)" - - $currentCDB = $CurrentValues.ContentDatabases | Where-Object -FilterScript { - $_.Name -eq $contentDatabase.Name - } - - if ($null -ne $currentCDB) - { - if ($contentDatabase.Members) - { - Write-Verbose -Message "Processing Members parameter" - if (-not $currentCDB.Members) - { - return $false - } - - $differences = Compare-Object -ReferenceObject $currentCDB.Members ` - -DifferenceObject $contentDatabase.Members - - if ($null -eq $differences) - { - Write-Verbose -Message "Shell Admins group matches" - } - else - { - Write-Verbose -Message "Shell Admins group does not match" - return $false - } - } - - if ($contentDatabase.MembersToInclude) - { - Write-Verbose -Message "Processing MembersToInclude parameter" - if (-not $currentCDB.Members) - { - return $false - } - - foreach ($member in $contentDatabase.MembersToInclude) - { - if (-not($currentCDB.Members.Contains($member))) - { - Write-Verbose -Message "$member is not a Shell Admin. Set result to false" - return $false - } - else - { - Write-Verbose -Message "$member is already a Shell Admin. Skipping" - } - } - } - - if ($contentDatabase.MembersToExclude) - { - Write-Verbose -Message "Processing MembersToExclude parameter" - if ($currentCDB.Members) - { - foreach ($member in $contentDatabase.MembersToExclude) - { - if ($currentCDB.Members.Contains($member)) - { - Write-Verbose -Message "$member is a Shell Admin. Set result to false" - return $false - } - else - { - Write-Verbose -Message "$member is not a Shell Admin. Skipping" - } - } - } - } - } - else - { - throw "Specified database does not exist: $($contentDatabase.Name)" - } - } - } - - return $true -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPShellAdmins/MSFT_SPShellAdmins.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPShellAdmins/MSFT_SPShellAdmins.schema.mof deleted file mode 100644 index b151ad86..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPShellAdmins/MSFT_SPShellAdmins.schema.mof +++ /dev/null @@ -1,20 +0,0 @@ -[ClassVersion("1.0.0")] -Class MSFT_SPContentDatabasePermissions -{ - [Key, Description("Name of the Content Database")] String Name; - [Write, Description("Exact list of accounts that will have to get Shell Admin permissions")] String Members[]; - [Write, Description("List of all accounts that must be in the Shell Admins group")] String MembersToInclude[]; - [Write, Description("List of all accounts that are not allowed to have Shell Admin permissions")] String MembersToExclude[]; -}; -[ClassVersion("1.0.0.0"), FriendlyName("SPShellAdmins")] -class MSFT_SPShellAdmins : OMI_BaseResource -{ - [Key, Description("Name for the config, used for administration purposes")] String Name; - [Write, Description("Exact list of accounts that will have to get Shell Admin permissions")] String Members[]; - [Write, Description("List of all accounts that must be in the Shell Admins group")] String MembersToInclude[]; - [Write, Description("List of all accounts that are not allowed to have Shell Admin permissions")] String MembersToExclude[]; - [Write, Description("Shell Admin configuration of Content Databases"), EmbeddedInstance("MSFT_SPContentDatabasePermissions")] String ContentDatabases[]; - [Write, Description("Specify if all content databases must get the same config as the general config")] Boolean AllContentDatabases; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSite/MSFT_SPSite.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSite/MSFT_SPSite.psm1 deleted file mode 100644 index 50a49483..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSite/MSFT_SPSite.psm1 +++ /dev/null @@ -1,302 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $true)] - [System.String] - $OwnerAlias, - - [parameter(Mandatory = $false)] - [System.UInt32] - $CompatibilityLevel, - - [parameter(Mandatory = $false)] - [System.String] - $ContentDatabase, - - [parameter(Mandatory = $false)] - [System.String] - $Description, - - [parameter(Mandatory = $false)] - [System.String] - $HostHeaderWebApplication, - - [parameter(Mandatory = $false)] - [System.UInt32] - $Language, - - [parameter(Mandatory = $false)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $OwnerEmail, - - [parameter(Mandatory = $false)] - [System.String] - $QuotaTemplate, - - [parameter(Mandatory = $false)] - [System.String] - $SecondaryEmail, - - [parameter(Mandatory = $false)] - [System.String] - $SecondaryOwnerAlias, - - [parameter(Mandatory = $false)] - [System.String] - $Template, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting site collection $Url" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $site = Get-SPSite -Identity $params.Url ` - -ErrorAction SilentlyContinue - - if ($null -eq $site) - { - return $null - } - else - { - if ($site.HostHeaderIsSiteName) - { - $HostHeaderWebApplication = $site.WebApplication.Url - } - - if ($null -eq $site.Owner) - { - $owner = $null - } - else - { - if ($site.WebApplication.UseClaimsAuthentication) - { - $owner = (New-SPClaimsPrincipal -Identity $site.Owner.UserLogin ` - -IdentityType "EncodedClaim").Value - } - else - { - $owner = $site.Owner.UserLogin - } - } - - if ($null -eq $site.SecondaryContact) - { - $secondaryOwner = $null - } - else - { - if ($site.WebApplication.UseClaimsAuthentication) - { - $secondaryOwner = (New-SPClaimsPrincipal -Identity $site.SecondaryContact.UserLogin ` - -IdentityType "EncodedClaim").Value - } - else - { - $secondaryOwner = $site.SecondaryContact.UserLogin - } - } - - $admService = Get-SPDSCContentService - $quota = ($admService.QuotaTemplates | ` - Where-Object -FilterScript { - $_.QuotaID -eq $site.Quota.QuotaID - }).Name - - return @{ - Url = $site.Url - OwnerAlias = $owner - CompatibilityLevel = $site.CompatibilityLevel - ContentDatabase = $site.ContentDatabase.Name - Description = $site.RootWeb.Description - HostHeaderWebApplication = $HostHeaderWebApplication - Language = $site.RootWeb.Language - Name = $site.RootWeb.Name - OwnerEmail = $site.Owner.Email - QuotaTemplate = $quota - SecondaryEmail = $site.SecondaryContact.Email - SecondaryOwnerAlias = $secondaryOwner - Template = "$($site.RootWeb.WebTemplate)#$($site.RootWeb.Configuration)" - InstallAccount = $params.InstallAccount - } - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $true)] - [System.String] - $OwnerAlias, - - [parameter(Mandatory = $false)] - [System.UInt32] - $CompatibilityLevel, - - [parameter(Mandatory = $false)] - [System.String] - $ContentDatabase, - - [parameter(Mandatory = $false)] - [System.String] - $Description, - - [parameter(Mandatory = $false)] - [System.String] - $HostHeaderWebApplication, - - [parameter(Mandatory = $false)] - [System.UInt32] - $Language, - - [parameter(Mandatory = $false)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $OwnerEmail, - - [parameter(Mandatory = $false)] - [System.String] - $QuotaTemplate, - - [parameter(Mandatory = $false)] - [System.String] - $SecondaryEmail, - - [parameter(Mandatory = $false)] - [System.String] - $SecondaryOwnerAlias, - - [parameter(Mandatory = $false)] - [System.String] - $Template, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting site collection $Url" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $params.Remove("InstallAccount") | Out-Null - - $site = Get-SPSite -Identity $params.Url -ErrorAction SilentlyContinue - - if ($null -eq $site) - { - New-SPSite @params | Out-Null - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $true)] - [System.String] - $OwnerAlias, - - [parameter(Mandatory = $false)] - [System.UInt32] - $CompatibilityLevel, - - [parameter(Mandatory = $false)] - [System.String] - $ContentDatabase, - - [parameter(Mandatory = $false)] - [System.String] - $Description, - - [parameter(Mandatory = $false)] - [System.String] - $HostHeaderWebApplication, - - [parameter(Mandatory = $false)] - [System.UInt32] - $Language, - - [parameter(Mandatory = $false)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $OwnerEmail, - - [parameter(Mandatory = $false)] - [System.String] - $QuotaTemplate, - - [parameter(Mandatory = $false)] - [System.String] - $SecondaryEmail, - - [parameter(Mandatory = $false)] - [System.String] - $SecondaryOwnerAlias, - - [parameter(Mandatory = $false)] - [System.String] - $Template, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing site collection $Url" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($null -eq $CurrentValues) - { - return $false - } - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Url") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSite/MSFT_SPSite.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSite/MSFT_SPSite.schema.mof deleted file mode 100644 index 7b28c3f8..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSite/MSFT_SPSite.schema.mof +++ /dev/null @@ -1,19 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPSite")] -class MSFT_SPSite : OMI_BaseResource -{ - [Key, Description("The URL of the site collection")] string Url; - [Required, Description("The username of the site collection administrator")] string OwnerAlias; - [Write, Description("The compatibility level of the site")] uint32 CompatibilityLevel; - [Write, Description("The name of the content database to create the site in")] string ContentDatabase; - [Write, Description("The description to apply to the site collection")] string Description; - [Write, Description("The URL of the host header web application to create this site in")] string HostHeaderWebApplication; - [Write, Description("The language code of the site")] uint32 Language; - [Write, Description("The display name of the site collection")] string Name; - [Write, Description("The email address of the site collection administrator")] string OwnerEmail; - [Write, Description("The quota template to apply to the site collection")] string QuotaTemplate; - [Write, Description("The secondary site collection admin email address")] string SecondaryEmail; - [Write, Description("The secondary site collection admin username")] string SecondaryOwnerAlias; - [Write, Description("The template to apply to the site collection")] string Template; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/MSFT_SPStateServiceApp.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/MSFT_SPStateServiceApp.psm1 deleted file mode 100644 index 40837272..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/MSFT_SPStateServiceApp.psm1 +++ /dev/null @@ -1,179 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $DatabaseCredentials, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting state service application '$Name'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApp = Get-SPStateServiceApplication -Identity $params.Name ` - -ErrorAction SilentlyContinue - - if ($null -eq $serviceApp) - { - return @{ - Name = $params.Name - Ensure = "Absent" - InstallAccount = $params.InstallAccount - } - } - - return @{ - Name = $serviceApp.DisplayName - DatabaseName = $serviceApp.Databases.Name - DatabaseServer = $serviceApp.Databases.Server.Name - InstallAccount = $params.InstallAccount - Ensure = "Present" - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $DatabaseCredentials, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting state service application '$Name'" - - if ($Ensure -eq "Present") - { - Write-Verbose -Message "Creating State Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - - $params = $args[0] - - $dbParams = @{} - if ($params.ContainsKey("DatabaseName")) - { - $dbParams.Add("Name", $params.DatabaseName) - } - if ($params.ContainsKey("DatabaseServer")) - { - $dbParams.Add("DatabaseServer", $params.DatabaseServer) - } - if ($params.ContainsKey("DatabaseCredentials")) - { - $dbParams.Add("DatabaseCredentials", $params.DatabaseCredentials) - } - - $database = New-SPStateServiceDatabase @dbParams - $app = New-SPStateServiceApplication -Name $params.Name -Database $database - New-SPStateServiceApplicationProxy -ServiceApplication $app -DefaultProxyGroup | Out-Null - } - } - if ($Ensure -eq "Absent") - { - Write-Verbose -Message "Removing State Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount -Arguments $PSBoundParameters -ScriptBlock { - $params = $args[0] - - $serviceApp = Get-SPStateServiceApplication -Name $params.Name - Remove-SPServiceApplication $serviceApp -Confirm:$false - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $DatabaseCredentials, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing for state service application $Name" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Name", "Ensure") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/MSFT_SPStateServiceApp.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/MSFT_SPStateServiceApp.schema.mof deleted file mode 100644 index 6025b680..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/MSFT_SPStateServiceApp.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPStateServiceApp")] -class MSFT_SPStateServiceApp : OMI_BaseResource -{ - [Key, Description("The name of the state service app")] string Name; - [Write, Description("The database credentials for accessing the database"), EmbeddedInstance("MSFT_Credential")] String DatabaseCredentials; - [Required, Description("The name of the database for the service app")] string DatabaseName; - [Write, Description("The name of the database server")] string DatabaseServer; - [Write, Description("Present if the service app should exist, absent if it should not"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/MSFT_SPSubscriptionSettingsServiceApp.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/MSFT_SPSubscriptionSettingsServiceApp.psm1 deleted file mode 100644 index fe3443fb..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/MSFT_SPSubscriptionSettingsServiceApp.psm1 +++ /dev/null @@ -1,234 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting Subscription Settings Service '$Name'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApps = Get-SPServiceApplication -Name $params.Name ` - -ErrorAction SilentlyContinue - $nullReturn = @{ - Name = $params.Name - ApplicationPool = $params.ApplicationPool - Ensure = "Absent" - } - - if ($null -eq $serviceApps) - { - return $nullReturn - } - $serviceApp = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.SharePoint.SPSubscriptionSettingsServiceApplication" - } - - if ($null -eq $serviceApp) - { - return $nullReturn - } - else - { - $propertyFlags = [System.Reflection.BindingFlags]::Instance ` - -bor [System.Reflection.BindingFlags]::NonPublic - - $propData = $serviceApp.GetType().GetProperties($propertyFlags) - - $dbProp = $propData | Where-Object -FilterScript { - $_.Name -eq "Database" - } - - $db = $dbProp.GetValue($serviceApp) - - return @{ - Name = $serviceApp.DisplayName - ApplicationPool = $serviceApp.ApplicationPool.Name - DatabaseName = $db.Name - DatabaseServer = $db.Server.Name - InstallAccount = $params.InstallAccount - Ensure = "Present" - } - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting Subscription Settings Service '$Name'" - - $result = Get-TargetResource @PSBoundParameters - - if ($result.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - Write-Verbose -Message "Creating Subscription Settings Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $newParams = @{ - Name = $params.Name - ApplicationPool = $params.ApplicationPool - } - if ($params.ContainsKey("DatabaseName") -eq $true) - { - $newParams.Add("DatabaseName", $params.DatabaseName) - } - if ($params.ContainsKey("DatabaseServer") -eq $true) - { - $newParams.Add("DatabaseServer", $params.DatabaseServer) - } - $serviceApp = New-SPSubscriptionSettingsServiceApplication @newParams - New-SPSubscriptionSettingsServiceApplicationProxy -ServiceApplication $serviceApp | Out-Null - } - } - if ($result.Ensure -eq "Present" -and $Ensure -eq "Present") - { - if ($ApplicationPool -ne $result.ApplicationPool) - { - Write-Verbose -Message "Updating Subscription Settings Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - - $params = $args[0] - $appPool = Get-SPServiceApplicationPool -Identity $params.ApplicationPool - $service = Get-SPServiceApplication -Name $params.Name ` - | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.SharePoint.SPSubscriptionSettingsServiceApplication" - } - $service.ApplicationPool = $appPool - $service.Update() - } - } - } - if ($Ensure -eq "Absent") - { - Write-Verbose -Message "Removing Subscription Settings Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $service = Get-SPServiceApplication -Name $params.Name ` - | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.SharePoint.SPSubscriptionSettingsServiceApplication" - } - Remove-SPServiceApplication $service -Confirm:$false - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing Subscription Settings Service '$Name'" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($Ensure -eq "Present") - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("ApplicationPool", "Ensure") - } - else - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/MSFT_SPSubscriptionSettingsServiceApp.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/MSFT_SPSubscriptionSettingsServiceApp.schema.mof deleted file mode 100644 index ed6167db..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/MSFT_SPSubscriptionSettingsServiceApp.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPSubscriptionSettingsServiceApp")] -class MSFT_SPSubscriptionSettingsServiceApp : OMI_BaseResource -{ - [Key, Description("The name of the subscription settings service app")] string Name; - [Required, Description("The name of the application pool the service app runs in")] String ApplicationPool; - [Write, Description("The name of the database for the service app")] string DatabaseName; - [Write, Description("The name of the database server")] String DatabaseServer; - [Write, Description("Present if the service app should exist, absent if it should not"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.psm1 deleted file mode 100644 index 6bb22384..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.psm1 +++ /dev/null @@ -1,258 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $WebApplication, - - [parameter(Mandatory = $false)] - [System.Boolean] - $Enabled, - - [parameter(Mandatory = $false)] - [System.String] - $Schedule, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting timer job settings for job '$Name'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - try - { - $spFarm = Get-SPFarm - } - catch - { - Write-Verbose -Message ("No local SharePoint farm was detected. Timer job " + ` - "settings will not be applied") - return $null - } - - # Get a reference to the timer job - if ($params.ContainsKey("WebApplication")) - { - $timerjob = Get-SPTimerJob -Identity $params.Name ` - -WebApplication $params.WebApplication - } - else - { - $timerjob = Get-SPTimerJob $params.Name - } - - # Check if timer job if found - if ($null -eq $timerjob) - { - return $null - } - - $schedule = $null - if ($null -ne $timerjob.Schedule) - { - $schedule = $timerjob.Schedule.ToString() - } - - if ($null -eq $timerjob.WebApplication) - { - # Timer job is not associated to web application - return @{ - Name = $params.Name - Enabled = -not $timerjob.IsDisabled - Schedule = $schedule - InstallAccount = $params.InstallAccount - } - } - else - { - # Timer job is associated to web application - return @{ - Name = $params.Name - WebApplication = $timerjob.WebApplication.Url - Enabled = -not $timerjob.IsDisabled - Schedule = $schedule - InstallAccount = $params.InstallAccount - } - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $WebApplication, - - [parameter(Mandatory = $false)] - [System.Boolean] - $Enabled, - - [parameter(Mandatory = $false)] - [System.String] - $Schedule, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting timer job settings for job '$Name'" - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - - $params = $args[0] - - try - { - $spFarm = Get-SPFarm - } - catch - { - throw "No local SharePoint farm was detected. Timer job settings will not be applied" - return - } - - Write-Verbose -Message "Start update" - - #find Timer Job - if ($params.ContainsKey("WebApplication") -eq $true) - { - $job = Get-SPTimerJob $params.Name -WebApplication $params.WebApplication - } - else - { - $job = Get-SPTimerJob $params.Name - } - - if ($job.GetType().IsArray -eq $false) - { - # Set the timer job settings - if ($params.ContainsKey("Enabled") -eq $true) - { - # Enable/Disable timer job - if ($params.Enabled) - { - Write-Verbose -Message "Enable timer job $($params.Name)" - try - { - Enable-SPTimerJob $job - } - catch - { - throw ("Error occurred while enabling job. Timer job settings will " + ` - "not be applied. Error details: $($_.Exception.Message)") - return - } - } - else - { - Write-Verbose -Message "Disable timer job $($params.Name)" - try - { - Disable-SPTimerJob $job - } - catch - { - throw ("Error occurred while disabling job. Timer job settings will " + ` - "not be applied. Error details: $($_.Exception.Message)") - return - } - } - } - - if ($params.ContainsKey("Schedule") -eq $true) - { - # Set timer job schedule - Write-Verbose -Message "Set timer job $($params.Name) schedule" - try - { - Set-SPTimerJob $job -Schedule $params.Schedule -ErrorAction Stop - } - catch - { - if ($_.Exception.Message -like "*The time given was not given in the proper format*") - { - throw "Incorrect schedule format used. New schedule will not be applied." - return - } - else - { - throw ("Error occurred. Timer job settings will not be applied. Error " + ` - "details: $($_.Exception.Message)") - return - } - } - } - } - else - { - throw "Could not find specified job. Total jobs found: $($job.Count)" - return - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $WebApplication, - - [parameter(Mandatory = $false)] - [System.Boolean] - $Enabled, - - [parameter(Mandatory = $false)] - [System.String] - $Schedule, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing timer job settings for job '$Name'" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($null -eq $CurrentValues) - { - return $false - } - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.schema.mof deleted file mode 100644 index fcbdf3ef..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPTimerJobState")] -class MSFT_SPTimerJobState : OMI_BaseResource -{ - [Key, Description("The internal name of the timer job (not the display name)")] String Name; - [Write, Description("The name of the web application that the timer job belongs to")] String WebApplication; - [Write, Description("Should the timer job be enabled or not")] Boolean Enabled; - [Write, Description("The schedule for the timer job to execute on")] String Schedule; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/MSFT_SPTrustedIdentityTokenIssuer.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/MSFT_SPTrustedIdentityTokenIssuer.psm1 deleted file mode 100644 index 78855ee1..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/MSFT_SPTrustedIdentityTokenIssuer.psm1 +++ /dev/null @@ -1,429 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [String] - $Name, - - [parameter(Mandatory = $true)] - [String] - $Description, - - [parameter(Mandatory = $true)] - [String] - $Realm, - - [parameter(Mandatory = $true)] - [String] - $SignInUrl, - - [parameter(Mandatory = $true)] - [String] - $IdentifierClaim, - - [parameter(Mandatory = $true)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $ClaimsMappings, - - [parameter(Mandatory = $false)] - [String] - $SigningCertificateThumbprint, - - [parameter(Mandatory = $false)] - [String] - $SigningCertificateFilePath, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [String] - $ClaimProviderName, - - [parameter(Mandatory = $false)] - [String] - $ProviderSignOutUri, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting SPTrustedIdentityTokenIssuer '$Name' settings" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $claimsMappings = @() - $spTrust = Get-SPTrustedIdentityTokenIssuer -Identity $params.Name ` - -ErrorAction SilentlyContinue - if ($spTrust) - { - $description = $spTrust.Description - $realm = $spTrust.DefaultProviderRealm - $signInUrl = $spTrust.ProviderUri.OriginalString - $identifierClaim = $spTrust.IdentityClaimTypeInformation.MappedClaimType - $SigningCertificateThumbprint = $spTrust.SigningCertificate.Thumbprint - $currentState = "Present" - $claimProviderName = $sptrust.ClaimProviderName - $providerSignOutUri = $sptrust.ProviderSignOutUri.OriginalString - $spTrust.ClaimTypeInformation| Foreach-Object -Process { - $claimsMappings = $claimsMappings + @{ - Name = $_.DisplayName - IncomingClaimType = $_.InputClaimType - LocalClaimType = $_.MappedClaimType - } - } - } - else - { - $description = "" - $realm = "" - $signInUrl = "" - $identifierClaim = "" - $SigningCertificateThumbprint = "" - $currentState = "Absent" - $claimProviderName = "" - $providerSignOutUri = "" - } - - return @{ - Name = $params.Name - Description = $description - Realm = $realm - SignInUrl = $signInUrl - IdentifierClaim = $identifierClaim - ClaimsMappings = $claimsMappings - SigningCertificateThumbprint = $SigningCertificateThumbprint - SigningCertificateFilePath = "" - Ensure = $currentState - ClaimProviderName = $claimProviderName - ProviderSignOutUri = $providerSignOutUri - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [String] - $Name, - - [parameter(Mandatory = $true)] - [String] - $Description, - - [parameter(Mandatory = $true)] - [String] - $Realm, - - [parameter(Mandatory = $true)] - [String] - $SignInUrl, - - [parameter(Mandatory = $true)] - [String] - $IdentifierClaim, - - [parameter(Mandatory = $true)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $ClaimsMappings, - - [parameter(Mandatory = $false)] - [String] - $SigningCertificateThumbprint, - - [parameter(Mandatory = $false)] - [String] - $SigningCertificateFilePath, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [String] - $ClaimProviderName, - - [parameter(Mandatory = $false)] - [String] - $ProviderSignOutUri, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting SPTrustedIdentityTokenIssuer '$Name' settings" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($Ensure -eq "Present") - { - if ($CurrentValues.Ensure -eq "Absent") - { - if ($PSBoundParameters.ContainsKey("SigningCertificateThumbprint") -and ` - $PSBoundParameters.ContainsKey("SigningCertificateFilePath")) - { - throw ("Cannot use both parameters SigningCertificateThumbprint and SigningCertificateFilePath at the same time.") - return - } - - if (!$PSBoundParameters.ContainsKey("SigningCertificateThumbprint") -and ` - !$PSBoundParameters.ContainsKey("SigningCertificateFilePath")) - { - throw ("At least one of the following parameters must be specified: " + ` - "SigningCertificateThumbprint, SigningCertificateFilePath.") - return - } - - Write-Verbose -Message "Creating SPTrustedIdentityTokenIssuer '$Name'" - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - if ($params.SigningCertificateThumbprint) - { - Write-Verbose -Message ("Getting signing certificate with thumbprint " + ` - "$($params.SigningCertificateThumbprint) from the certificate store 'LocalMachine\My'") - - if ($params.SigningCertificateThumbprint -notmatch "^[A-Fa-f0-9]{40}$") - { - throw ("Parameter SigningCertificateThumbprint does not match valid format '^[A-Fa-f0-9]{40}$'.") - return - } - - $cert = Get-ChildItem -Path Cert:\LocalMachine\My | Where-Object -FilterScript { - $_.Thumbprint -match $params.SigningCertificateThumbprint - } - - if (!$cert) - { - throw ("Signing certificate with thumbprint $($params.SigningCertificateThumbprint) " + ` - "was not found in certificate store 'LocalMachine\My'.") - return - } - - if ($cert.HasPrivateKey) - { - throw ("SharePoint requires that the private key of the signing certificate" + ` - " is not installed in the certificate store.") - return - } - } - else - { - Write-Verbose -Message "Getting signing certificate from file system path '$($params.SigningCertificateFilePath)'" - try - { - $cert = New-Object -TypeName "System.Security.Cryptography.X509Certificates.X509Certificate2" ` - -ArgumentList @($params.SigningCertificateFilePath) - } - catch - { - throw ("Signing certificate was not found in path '$($params.SigningCertificateFilePath)'.") - return - } - } - - $claimsMappingsArray = @() - $params.ClaimsMappings| Foreach-Object -Process { - $runParams = @{} - $runParams.Add("IncomingClaimTypeDisplayName", $_.Name) - $runParams.Add("IncomingClaimType", $_.IncomingClaimType) - if ($null -eq $_.LocalClaimType) - { - $runParams.Add("LocalClaimType", $_.IncomingClaimType) - } - else - { - $runParams.Add("LocalClaimType", $_.LocalClaimType) - } - - $newMapping = New-SPClaimTypeMapping @runParams - $claimsMappingsArray += $newMapping - } - - if (!($claimsMappingsArray | Where-Object -FilterScript { - $_.MappedClaimType -like $params.IdentifierClaim - })) - { - throw ("IdentifierClaim does not match any claim type specified in ClaimsMappings.") - return - } - - $runParams = @{} - $runParams.Add("ImportTrustCertificate", $cert) - $runParams.Add("Name", $params.Name) - $runParams.Add("Description", $params.Description) - $runParams.Add("Realm", $params.Realm) - $runParams.Add("SignInUrl", $params.SignInUrl) - $runParams.Add("IdentifierClaim", $params.IdentifierClaim) - $runParams.Add("ClaimsMappings", $claimsMappingsArray) - $trust = New-SPTrustedIdentityTokenIssuer @runParams - - if ($null -eq $trust) - { - throw "SharePoint failed to create the SPTrustedIdentityTokenIssuer." - } - - if ((Get-SPClaimProvider| Where-Object -FilterScript { - $_.DisplayName -eq $params.ClaimProviderName - })) - { - $trust.ClaimProviderName = $params.ClaimProviderName - } - - if ($params.ProviderSignOutUri) - { - $trust.ProviderSignOutUri = New-Object -TypeName System.Uri ($params.ProviderSignOutUri) - } - $trust.Update() - } - } - } - else - { - Write-Verbose "Removing SPTrustedIdentityTokenIssuer '$Name'" - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - $Name = $params.Name - # SPTrustedIdentityTokenIssuer must be removed from each zone of each web app before - # it can be deleted - Get-SPWebApplication | Foreach-Object -Process { - $wa = $_ - $webAppUrl = $wa.Url - $update = $false - $urlZones = [Enum]::GetNames([Microsoft.SharePoint.Administration.SPUrlZone]) - $urlZones | Foreach-Object -Process { - $zone = $_ - $providers = Get-SPAuthenticationProvider -WebApplication $wa.Url ` - -Zone $zone ` - -ErrorAction SilentlyContinue - if (!$providers) - { - return - } - $trustedProviderToRemove = $providers | Where-Object -FilterScript { - $_ -is [Microsoft.SharePoint.Administration.SPTrustedAuthenticationProvider] ` - -and $_.LoginProviderName -like $params.Name - } - if ($trustedProviderToRemove) - { - Write-Verbose -Message ("Removing SPTrustedAuthenticationProvider " + ` - "'$Name' from web app '$webAppUrl' in zone " + ` - "'$zone'") - $wa.GetIisSettingsWithFallback($zone).ClaimsAuthenticationProviders.Remove($trustedProviderToRemove) | Out-Null - $update = $true - } - } - if ($update) - { - $wa.Update() - } - } - - $runParams = @{ - Identity = $params.Name - Confirm = $false - } - Remove-SPTrustedIdentityTokenIssuer @runParams - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [parameter(Mandatory = $true)] - [String] - $Name, - - [parameter(Mandatory = $true)] - [String] - $Description, - - [parameter(Mandatory = $true)] - [String] - $Realm, - - [parameter(Mandatory = $true)] - [String] - $SignInUrl, - - [parameter(Mandatory = $true)] - [String] - $IdentifierClaim, - - [parameter(Mandatory = $true)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $ClaimsMappings, - - [parameter(Mandatory = $false)] - [String] - $SigningCertificateThumbprint, - - [parameter(Mandatory = $false)] - [String] - $SigningCertificateFilePath, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [String] - $ClaimProviderName, - - [parameter(Mandatory = $false)] - [String] - $ProviderSignOutUri, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing SPTrustedIdentityTokenIssuer '$Name' settings" - - if ($PSBoundParameters.ContainsKey("SigningCertificateThumbprint") -and ` - $PSBoundParameters.ContainsKey("SigningCertificateFilePath")) - { - throw ("Cannot use both parameters SigningCertificateThumbprint and SigningCertificateFilePath at the same time.") - return - } - - if (!$PSBoundParameters.ContainsKey("SigningCertificateThumbprint") -and ` - !$PSBoundParameters.ContainsKey("SigningCertificateFilePath")) - { - throw ("At least one of the following parameters must be specified: " + ` - "SigningCertificateThumbprint, SigningCertificateFilePath.") - return - } - - $CurrentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/MSFT_SPTrustedIdentityTokenIssuer.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/MSFT_SPTrustedIdentityTokenIssuer.schema.mof deleted file mode 100644 index f0056d89..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/MSFT_SPTrustedIdentityTokenIssuer.schema.mof +++ /dev/null @@ -1,26 +0,0 @@ - -[ClassVersion("1.0.0.0")] -class MSFT_SPClaimTypeMapping -{ - [Key, Description("Display name of the incoming claim type")] String Name; - [Required, Description("URI of the incoming claim type")] String IncomingClaimType; - [Write, Description("URI of the local claim type, not required if same as IncomingClaimType")] String LocalClaimType; -}; - - -[ClassVersion("1.1.0.0"), FriendlyName("SPTrustedIdentityTokenIssuer")] -class MSFT_SPTrustedIdentityTokenIssuer : OMI_BaseResource -{ - [Key, Description("Name of the SPTrustedIdentityTokenIssuer")] String Name; - [Required, Description("Description of the SPTrustedIdentityTokenIssuer")] String Description; - [Required, Description("Default Realm that is passed to identity provider")] String Realm; - [Required, Description("URL of the identity provider where user is redirected to for authentication")] String SignInUrl; - [Required, Description("Identity claim type that uniquely identifies the user")] String IdentifierClaim; - [Required, Description("Array of MSFT_SPClaimTypeMapping to use with cmdlet New-SPClaimTypeMapping"), EmbeddedInstance("MSFT_SPClaimTypeMapping")] String ClaimsMappings[]; - [Write, Description("Specify the thumbprint of the signing certificate, which must be located in certificate store LocalMachine\\My")] String SigningCertificateThumbprint; - [Write, Description("Specify the file path to the signing certificate if it is not stored in the local certificate store already")] String SigningCertificateFilePath; - [Write, Description("Name of a claims provider to set with this SPTrustedIdentityTokenIssuer")] String ClaimProviderName; - [Write, Description("Sign-out URL")] String ProviderSignOutUri; - [Write, Description("Present if the SPTrustedIdentityTokenIssuer should be created, or Absent if it should be removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTrustedRootAuthority/MSFT_SPTrustedRootAuthority.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTrustedRootAuthority/MSFT_SPTrustedRootAuthority.psm1 deleted file mode 100644 index 318f6d3d..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTrustedRootAuthority/MSFT_SPTrustedRootAuthority.psm1 +++ /dev/null @@ -1,169 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $CertificateThumbprint, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose "Getting Trusted Root Authority with name '$Name'" - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $rootCert = Get-SPTrustedRootAuthority -Identity $params.Name -ErrorAction SilentlyContinue - - $ensure = "Absent" - - if($null -eq $rootCert) - { - return @{ - Name = $params.Name - CertificateThumbprint = [string]::Empty - Ensure = $ensure - } - } - else - { - $ensure = "Present" - - return @{ - Name = $params.Name - CertificateThumbprint = $rootCert.Certificate.Thumbprint - Ensure = $ensure - } - } - } - - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $CertificateThumbprint, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting SPTrustedRootAuthority '$Name'" - - $CurrentValues = Get-TargetResource @PSBoundParameters - if ($Ensure -eq "Present" -and $CurrentValues.Ensure -eq "Present") - { - Write-Verbose -Message "Updating SPTrustedRootAuthority '$Name'" - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - $cert = Get-Item -Path "CERT:\LocalMachine\My\$($params.CertificateThumbprint)" ` - -ErrorAction SilentlyContinue - - if($null -eq $cert) - { - throw "Certificate not found in the local Certificate Store" - } - - Set-SPTrustedRootAuthority -Identity $params.Name -Certificate $cert - } - } - if ($Ensure -eq "Present" -and $CurrentValues.Ensure -eq "Absent") - { - Write-Verbose -Message "Adding SPTrustedRootAuthority '$Name'" - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $cert = Get-Item -Path "CERT:\LocalMachine\My\$($params.CertificateThumbprint)" ` - -ErrorAction SilentlyContinue - - if($null -eq $cert) - { - throw "Certificate not found in the local Certificate Store" - } - - New-SPTrustedRootAuthority -Name $params.Name -Certificate $cert - } - } - if ($Ensure -eq "Absent") - { - Write-Verbose -Message "Removing SPTrustedRootAuthority '$Name'" - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - Remove-SPTrustedRootAuthority -Identity $params.Name ` - -ErrorAction SilentlyContinue - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $CertificateThumbprint, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing SPTrustedRootAuthority '$Name'" - - $CurrentValues = Get-TargetResource @PSBoundParameters - if($Ensure -eq "Present") - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Name","CertificateThumbprint","Ensure") - } - else - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Name","Ensure") - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTrustedRootAuthority/MSFT_SPTrustedRootAuthority.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTrustedRootAuthority/MSFT_SPTrustedRootAuthority.schema.mof deleted file mode 100644 index d71573d2..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPTrustedRootAuthority/MSFT_SPTrustedRootAuthority.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("SPTrustedRootAuthority")] -class MSFT_SPTrustedRootAuthority : OMI_BaseResource -{ - [Key, Description("Specifies the name of the trusted root authority to create.")] String Name; - [Required, Description("Specifies the X.509 certificate of the trusted root authority, as a certificate thumbprint.")] String CertificateThumbprint; - [Write, Description("Present ensures service app exists, absent ensures it is removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, EmbeddedInstance("MSFT_Credential"), Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUsageApplication/MSFT_SPUsageApplication.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUsageApplication/MSFT_SPUsageApplication.psm1 deleted file mode 100644 index 773ad782..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUsageApplication/MSFT_SPUsageApplication.psm1 +++ /dev/null @@ -1,328 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $DatabaseCredentials, - - [parameter(Mandatory = $false)] - [System.String] - $FailoverDatabaseServer, - - [parameter(Mandatory = $false)] - [System.UInt32] - $UsageLogCutTime, - - [parameter(Mandatory = $false)] - [System.String] - $UsageLogLocation, - - [parameter(Mandatory = $false)] - [System.UInt32] - $UsageLogMaxFileSizeKB, - - [parameter(Mandatory = $false)] - [System.UInt32] - $UsageLogMaxSpaceGB - ) - - Write-Verbose -Message "Getting usage application '$Name'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApps = Get-SPServiceApplication -Name $params.Name ` - -ErrorAction SilentlyContinue - $nullReturn = @{ - Name = $params.Name - Ensure = "Absent" - } - - if ($null -eq $serviceApps) - { - return $nullReturn - } - $serviceApp = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.SharePoint.Administration.SPUsageApplication" - } - - if ($null -eq $serviceApp) - { - return $nullReturn - } - else - { - $spUsageApplicationProxy = Get-SPServiceApplicationProxy | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.SharePoint.Administration.SPUsageApplicationProxy" - } - - $ensure = "Present" - if($spUsageApplicationProxy.Status -eq "Disabled") - { - $ensure = "Absent" - } - - $service = Get-SPUsageService - return @{ - Name = $serviceApp.DisplayName - InstallAccount = $params.InstallAccount - DatabaseName = $serviceApp.UsageDatabase.Name - DatabaseServer = $serviceApp.UsageDatabase.Server.Name - DatabaseCredentials = $params.DatabaseCredentials - FailoverDatabaseServer = $serviceApp.UsageDatabase.FailoverServer - UsageLogCutTime = $service.UsageLogCutTime - UsageLogLocation = $service.UsageLogDir - UsageLogMaxFileSizeKB = $service.UsageLogMaxFileSize / 1024 - UsageLogMaxSpaceGB = $service.UsageLogMaxSpaceGB - Ensure = $ensure - } - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $DatabaseCredentials, - - [parameter(Mandatory = $false)] - [System.String] - $FailoverDatabaseServer, - - [parameter(Mandatory = $false)] - [System.UInt32] - $UsageLogCutTime, - - [parameter(Mandatory = $false)] - [System.String] - $UsageLogLocation, - - [parameter(Mandatory = $false)] - [System.UInt32] - $UsageLogMaxFileSizeKB, - - [parameter(Mandatory = $false)] - [System.UInt32] - $UsageLogMaxSpaceGB - ) - - Write-Verbose -Message "Setting usage application $Name" - - $CurrentState = Get-TargetResource @PSBoundParameters - - if ($CurrentState.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $newParams = @{} - $newParams.Add("Name", $params.Name) - if ($params.ContainsKey("DatabaseName")) - { - $newParams.Add("DatabaseName", $params.DatabaseName) - } - if ($params.ContainsKey("DatabaseCredentials")) - { - $params.Add("DatabaseUsername", $params.DatabaseCredentials.Username) - $params.Add("DatabasePassword", $params.DatabaseCredentials.Password) - } - if ($params.ContainsKey("DatabaseServer")) - { - $newParams.Add("DatabaseServer", $params.DatabaseServer) - } - if ($params.ContainsKey("FailoverDatabaseServer")) - { - $newParams.Add("FailoverDatabaseServer", $params.FailoverDatabaseServer) - } - - New-SPUsageApplication @newParams - } - } - - if ($Ensure -eq "Present") - { - Write-Verbose -Message "Configuring usage application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $spUsageApplicationProxy = Get-SPServiceApplicationProxy | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.SharePoint.Administration.SPUsageApplicationProxy" - } - - if($spUsageApplicationProxy.Status -eq "Disabled") - { - $spUsageApplicationProxy.Provision() - } - - $setParams = @{} - $setParams.Add("LoggingEnabled", $true) - if ($params.ContainsKey("UsageLogCutTime")) - { - $setParams.Add("UsageLogCutTime", $params.UsageLogCutTime) - } - if ($params.ContainsKey("UsageLogLocation")) - { - $setParams.Add("UsageLogLocation", $params.UsageLogLocation) - } - if ($params.ContainsKey("UsageLogMaxFileSizeKB")) - { - $setParams.Add("UsageLogMaxFileSizeKB", $params.UsageLogMaxFileSizeKB) - } - if ($params.ContainsKey("UsageLogMaxSpaceGB")) - { - $setParams.Add("UsageLogMaxSpaceGB", $params.UsageLogMaxSpaceGB) - } - Set-SPUsageService @setParams - } - } - - if ($Ensure -eq "Absent") - { - Write-Verbose -Message "Removing usage application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $service = Get-SPServiceApplication -Name $params.Name ` - | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.SharePoint.Administration.SPUsageApplication" - } - Remove-SPServiceApplication $service -Confirm:$false - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $DatabaseCredentials, - - [parameter(Mandatory = $false)] - [System.String] - $FailoverDatabaseServer, - - [parameter(Mandatory = $false)] - [System.UInt32] - $UsageLogCutTime, - - [parameter(Mandatory = $false)] - [System.String] - $UsageLogLocation, - - [parameter(Mandatory = $false)] - [System.UInt32] - $UsageLogMaxFileSizeKB, - - [parameter(Mandatory = $false)] - [System.UInt32] - $UsageLogMaxSpaceGB - ) - - Write-Verbose -Message "Testing for usage application '$Name'" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($Ensure -eq "Present") - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("UsageLogCutTime", - "UsageLogLocation", - "UsageLogMaxFileSizeKB", - "UsageLogMaxSpaceGB", - "Ensure") - } - else - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUsageApplication/MSFT_SPUsageApplication.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUsageApplication/MSFT_SPUsageApplication.schema.mof deleted file mode 100644 index a97fbf15..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUsageApplication/MSFT_SPUsageApplication.schema.mof +++ /dev/null @@ -1,15 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPUsageApplication")] -class MSFT_SPUsageApplication : OMI_BaseResource -{ - [Key, Description("The name of the service application")] string Name; - [Write, Description("The name of the database for the service app")] string DatabaseName; - [Write, Description("The name of the database server")] string DatabaseServer; - [Write, Description("The credentials to use to access the database"), EmbeddedInstance("MSFT_Credential")] String DatabaseCredentials; - [Write, Description("The name of the failover database server")] string FailoverDatabaseServer; - [Write, Description("The time in minutes to cut over to new log files")] uint32 UsageLogCutTime; - [Write, Description("The location on each server to store the log files")] string UsageLogLocation; - [Write, Description("The maximum file size for log files in KB")] uint32 UsageLogMaxFileSizeKB; - [Write, Description("The total space of all log files on disk in GB")] uint32 UsageLogMaxSpaceGB; - [Write, Description("Present if the service app should exist, absent if it should not"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/MSFT_SPUserProfileProperty.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/MSFT_SPUserProfileProperty.psm1 deleted file mode 100644 index a70b222f..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/MSFT_SPUserProfileProperty.psm1 +++ /dev/null @@ -1,782 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.string] - $Name, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.string] - $UserProfileService, - - [parameter(Mandatory = $false)] - [System.string] - $DisplayName, - - [parameter(Mandatory = $false)] - [ValidateSet("BigInteger", - "Binary", - "Boolean", - "Date", - "DateNoYear", - "DateTime", - "Email", - "Float", - "Guid", - "HTML", - "Integer", - "Person", - "String", - "StringMultiValue", - "TimeZone", - "URL")] - [System.string] - $Type, - - [parameter(Mandatory = $false)] - [System.string] - $Description, - - [parameter(Mandatory = $false)] - [ValidateSet("Mandatory", "Optin","Optout", "Disabled")] - [System.string] - $PolicySetting, - - [parameter(Mandatory = $false)] - [ValidateSet("Public", "Contacts", "Organization", "Manager", "Private")] - [System.string] - $PrivacySetting, - - [parameter(Mandatory = $false)] - [System.string] - $MappingConnectionName, - - [parameter(Mandatory = $false)] - [System.string] - $MappingPropertyName, - - [parameter(Mandatory = $false)] - [System.string] - $MappingDirection, - - [parameter(Mandatory = $false)] - [System.uint32] - $Length, - - [parameter(Mandatory = $false)] - [System.uint32] - $DisplayOrder, - - [parameter(Mandatory = $false)] - [System.Boolean] - $IsEventLog, - - [parameter(Mandatory = $false)] - [System.Boolean] - $IsVisibleOnEditor, - - [parameter(Mandatory = $false)] - [System.Boolean] - $IsVisibleOnViewer, - - [parameter(Mandatory = $false)] - [System.Boolean] - $IsUserEditable, - - [parameter(Mandatory = $false)] - [System.Boolean] - $IsAlias, - - [parameter(Mandatory = $false)] - [System.Boolean] - $IsSearchable, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UserOverridePrivacy, - - [parameter(Mandatory = $false)] - [System.string] - $TermStore, - - [parameter(Mandatory = $false)] - [System.string] - $TermGroup, - - [parameter(Mandatory = $false)] - [System.string] - $TermSet, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting user profile property $Name" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $upsa = Get-SPServiceApplication -Name $params.UserProfileService ` - -ErrorAction SilentlyContinue - $nullReturn = @{ - Name = $params.Name - UserProfileService = $params.UserProfileService - Ensure = "Absent" - } - if ($null -eq $upsa) - { - return $nullReturn - } - - $caURL = (Get-SPWebApplication -IncludeCentralAdministration | Where-Object -FilterScript { - $_.IsAdministrationWebApplication -eq $true - }).Url - - $context = Get-SPServiceContext -Site $caURL - - $userProfileSubTypeManager = Get-SPDSCUserProfileSubTypeManager -Context $context - $userProfileSubType = $userProfileSubTypeManager.GetProfileSubtype("UserProfile") - - $userProfileProperty = $userProfileSubType.Properties.GetPropertyByName($params.Name) - if ($null -eq $userProfileProperty) - { - return $nullReturn - } - - $termSet = @{ - TermSet = "" - TermGroup ="" - TermStore = "" - } - - if ($null -ne $userProfileProperty.CoreProperty.TermSet) - { - $termSet.TermSet = $userProfileProperty.CoreProperty.TermSet.Name - $termSet.TermGroup = $userProfileProperty.CoreProperty.TermSet.Group.Name - $termSet.TermStore = $userProfileProperty.CoreProperty.TermSet.TermStore.Name - } - $mapping = @{ - ConectionName = "" - PropertyName ="" - Direction = "" - } - - $userProfileConfigManager = New-Object -TypeName "Microsoft.Office.Server.UserProfiles.UserProfileConfigManager" ` - -ArgumentList $context - $syncConnection = $userProfileConfigManager.ConnectionManager | ` - Where-Object -FilterScript { - $null -ne $_.PropertyMapping -and $null -ne $_.PropertyMapping.Item($params.Name) - } - - if($null -ne $syncConnection) - { - $currentMapping = $syncConnection.PropertyMapping.Item($params.Name) - if($null -ne $currentMapping) - { - $mapping.Direction = "Import" - $mapping.ConnectionName = $params.MappingConnectionName - if($currentMapping.IsExport) - { - $mapping.Direction = "Export" - } - $mapping.PropertyName = $currentMapping.DataSourcePropertyName - } - } - - return @{ - Name = $userProfileProperty.Name - UserProfileService = $params.UserProfileService - DisplayName = $userProfileProperty.DisplayName - Type = $userProfileProperty.CoreProperty.Type - Description = $userProfileProperty.Description - PolicySetting = $userProfileProperty.PrivacyPolicy - PrivacySetting = $userProfileProperty.DefaultPrivacy - MappingConnectionName = $mapping.ConnectionName - MappingPropertyName = $mapping.PropertyName - MappingDirection = $Mapping.Direction - Length = $userProfileProperty.CoreProperty.Length - DisplayOrder =$userProfileProperty.DisplayOrder - IsEventLog =$userProfileProperty.TypeProperty.IsEventLog - IsVisibleOnEditor=$userProfileProperty.TypeProperty.IsVisibleOnEditor - IsVisibleOnViewer =$userProfileProperty.TypeProperty.IsVisibleOnViewer - IsUserEditable = $userProfileProperty.IsUserEditable - IsAlias = $userProfileProperty.IsAlias - IsSearchable = $userProfileProperty.CoreProperty.IsSearchable - TermStore = $termSet.TermStore - TermGroup = $termSet.TermGroup - TermSet = $termSet.TermSet - UserOverridePrivacy = $userProfileProperty.AllowPolicyOverride - Ensure = "Present" - } - - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.string] - $Name, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.string] - $UserProfileService, - - [parameter(Mandatory = $false)] - [System.string] - $DisplayName, - - [parameter(Mandatory = $false)] - [ValidateSet("BigInteger", - "Binary", - "Boolean", - "Date", - "DateNoYear", - "DateTime", - "Email", - "Float", - "Guid", - "HTML", - "Integer", - "Person", - "String", - "StringMultiValue", - "TimeZone", - "URL")] - [System.string] - $Type, - - [parameter(Mandatory = $false)] - [System.string] - $Description, - - [parameter(Mandatory = $false)] - [ValidateSet("Mandatory", "Optin","Optout", "Disabled")] - [System.string] - $PolicySetting, - - [parameter(Mandatory = $false)] - [ValidateSet("Public", "Contacts", "Organization", "Manager", "Private")] - [System.string] - $PrivacySetting, - - [parameter(Mandatory = $false)] - [System.string] - $MappingConnectionName, - - [parameter(Mandatory = $false)] - [System.string] - $MappingPropertyName, - - [parameter(Mandatory = $false)] - [System.string] - $MappingDirection, - - [parameter(Mandatory = $false)] - [System.uint32] - $Length, - - [parameter(Mandatory = $false)] - [System.uint32] - $DisplayOrder, - - [parameter(Mandatory = $false)] - [System.Boolean] - $IsEventLog, - - [parameter(Mandatory = $false)] - [System.Boolean] - $IsVisibleOnEditor, - - [parameter(Mandatory = $false)] - [System.Boolean] - $IsVisibleOnViewer, - - [parameter(Mandatory = $false)] - [System.Boolean] - $IsUserEditable, - - [parameter(Mandatory = $false)] - [System.Boolean] - $IsAlias, - - [parameter(Mandatory = $false)] - [System.Boolean] - $IsSearchable, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UserOverridePrivacy, - - [parameter(Mandatory = $false)] - [System.string] - $TermStore, - - [parameter(Mandatory = $false)] - [System.string] - $TermGroup, - - [parameter(Mandatory = $false)] - [System.string] - $TermSet, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - # Note for integration test: CA can take a couple of minutes to notice the change. don't try - # refreshing properties page. Go through from a fresh "flow" from Service apps page - - Write-Verbose -Message "Setting user profile property $Name" - - $PSBoundParameters.Ensure = $Ensure - - $test = $PSBoundParameters - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $test ` - -ScriptBlock { - - $params = $args[0] - - if( ($params.ContainsKey("TermSet") ` - -or $params.ContainsKey("TermGroup") ` - -or $params.ContainsKey("TermSet") ) ` - -and ($params.ContainsKey("TermSet") ` - -and $params.ContainsKey("TermGroup") ` - -and $params.ContainsKey("TermSet") -eq $false) - ) - { - throw ("You have to provide all 3 parameters Termset, TermGroup and TermStore " + ` - "when providing any of the 3.") - } - - if ($params.ContainsKey("TermSet") ` - -and (@("string","stringmultivalue").Contains($params.Type.ToLower()) -eq $false)) - { - throw "Only String and String Maultivalue can use Termsets" - } - - $ups = Get-SPServiceApplication -Name $params.UserProfileService ` - -ErrorAction SilentlyContinue - - if ($null -eq $ups) - { - return $null - } - - $caURL = (Get-SPWebApplication -IncludeCentralAdministration | Where-Object -FilterScript { - $_.IsAdministrationWebApplication -eq $true - }).Url - $context = Get-SPServiceContext $caURL - - $userProfileConfigManager = New-Object -TypeName "Microsoft.Office.Server.UserProfiles.UserProfileConfigManager" ` - -ArgumentList $context - - if ($null -eq $userProfileConfigManager) - { #if config manager returns when ups is available then isuee is permissions - throw ("Account running process needs admin permissions on the user profile " + ` - "service application") - } - $coreProperties = $userProfileConfigManager.ProfilePropertyManager.GetCoreProperties() - - $userProfileSubTypeManager = Get-SPDSCUserProfileSubTypeManager $context - $userProfileSubType = $userProfileSubTypeManager.GetProfileSubtype("UserProfile") - - $userProfileProperty = $userProfileSubType.Properties.GetPropertyByName($params.Name) - - if ($null -ne $userProfileProperty ` - -and $userProfileProperty.CoreProperty.Type -ne $params.Type) - { - throw ("Can't change property type. Current Type is " + ` - "$($userProfileProperty.CoreProperty.Type)") - } - - $termSet = $null - - if ($params.ContainsKey("TermSet")) - { - $currentTermSet = $userProfileProperty.CoreProperty.TermSet; - if($currentTermSet.Name -ne $params.TermSet -or - $currentTermSet.Group.Name -ne $params.TermGroup -or - $currentTermSet.TermStore.Name -ne $params.TermStore) - { - $session = New-Object -TypeName Microsoft.SharePoint.Taxonomy.TaxonomySession ` - -ArgumentList $caURL - - $termStore = $session.TermStores[$params.TermStore] - - if ($null -eq $termStore) - { - throw "Term Store $($params.termStore) not found" - } - - $group = $termStore.Groups[$params.TermGroup] - - if($null -eq $group) - { - throw "Term Group $($params.termGroup) not found" - } - - $termSet = $group.TermSets[$params.TermSet] - if($null -eq $termSet) - { - throw "Term Set $($params.termSet) not found" - } - } - } - - if ($params.ContainsKey("Ensure") -and $params.Ensure -eq "Absent") - { - if ($null -ne $userProfileProperty) - { - $coreProperties.RemovePropertyByName($params.Name) - return - } - } - elseif($null -eq $userProfileProperty) - { - $coreProperty = $coreProperties.Create($false) - $coreProperty.Name = $params.Name - $coreProperty.DisplayName = $params.DisplayName - - Set-SPDscObjectPropertyIfValuePresent -ObjectToSet $coreProperty ` - -PropertyToSet "Length" ` - -ParamsValue $params ` - -ParamKey "Length" - - if($params.Type -eq "stringmultivalue") - { - $coreProperty.IsMultivalued = $true - } - - $coreProperty.Type = $params.Type - if($null -ne $termSet) - { - $coreProperty.TermSet = $termSet - } - - $userProfilePropertyManager = $userProfileConfigManager.ProfilePropertyManager - $userProfileTypeProperties = $userProfilePropertyManager.GetProfileTypeProperties([Microsoft.Office.Server.UserProfiles.ProfileType]::User) - $userProfileSubTypeProperties = $userProfileSubType.Properties - - $CoreProperties.Add($coreProperty) - $upTypeProperty = $userProfileTypeProperties.Create($coreProperty) - $userProfileTypeProperties.Add($upTypeProperty) - $upSubProperty = $userProfileSubTypeProperties.Create($UPTypeProperty) - $userProfileSubTypeProperties.Add($upSubProperty) - Start-Sleep -Milliseconds 100 - $userProfileProperty = $userProfileSubType.Properties.GetPropertyByName($params.Name) - - } - - $coreProperty = $userProfileProperty.CoreProperty - $userProfileTypeProperty = $userProfileProperty.TypeProperty - Set-SPDscObjectPropertyIfValuePresent -ObjectToSet $coreProperty ` - -PropertyToSet "DisplayName" ` - -ParamsValue $params ` - -ParamKey "DisplayName" - - Set-SPDscObjectPropertyIfValuePresent -ObjectToSet $coreProperty ` - -PropertyToSet "Description" ` - -ParamsValue $params ` - -ParamKey "Description" - - Set-SPDscObjectPropertyIfValuePresent -ObjectToSet $userProfileTypeProperty ` - -PropertyToSet "IsVisibleOnViewer" ` - -ParamsValue $params ` - -ParamKey "IsVisibleOnViewer" - - Set-SPDscObjectPropertyIfValuePresent -ObjectToSet $userProfileTypeProperty ` - -PropertyToSet "IsVisibleOnEditor" ` - -ParamsValue $params ` - -ParamKey "IsVisibleOnEditor" - - Set-SPDscObjectPropertyIfValuePresent -ObjectToSet $userProfileTypeProperty ` - -PropertyToSet "IsEventLog" ` - -ParamsValue $params ` - -ParamKey "IsEventLog" - - Set-SPDscObjectPropertyIfValuePresent -ObjectToSet $userProfileProperty ` - -PropertyToSet "DefaultPrivacy" ` - -ParamsValue $params ` - -ParamKey "PrivacySetting" - - Set-SPDscObjectPropertyIfValuePresent -ObjectToSet $userProfileProperty ` - -PropertyToSet "PrivacyPolicy" ` - -ParamsValue $params ` - -ParamKey "PolicySetting" - - Set-SPDscObjectPropertyIfValuePresent -ObjectToSet $userProfileProperty ` - -PropertyToSet "IsUserEditable" ` - -ParamsValue $params ` - -ParamKey "IsUserEditable" - - Set-SPDscObjectPropertyIfValuePresent -ObjectToSet $userProfileProperty ` - -PropertyToSet "UserOverridePrivacy" ` - -ParamsValue $params ` - -ParamKey "UserOverridePrivacy" - if ($null -ne $termSet) - { - $coreProperty.TermSet = $termSet - } - - $userProfileProperty.CoreProperty.Commit() - $userProfileTypeProperty.Commit() - $userProfileProperty.Commit() - - if ($params.ContainsKey("DisplayOrder")) - { - $profileManager = New-Object -TypeName "Microsoft.Office.Server.UserProfiles.UserProfileManager" ` - -ArgumentList $context - $profileManager.Properties.SetDisplayOrderByPropertyName($params.Name, $params.DisplayOrder) - $profileManager.Properties.CommitDisplayOrder() - } - - if ($params.ContainsKey("MappingConnectionName") ` - -and $params.ContainsKey("MappingPropertyName")) - { - $syncConnection = $userProfileConfigManager.ConnectionManager | Where-Object -FilterScript { - $_.DisplayName -eq $params.MappingConnectionName - } - - if ($null -eq $syncConnection ) - { - throw "connection not found" - } - $syncConnection = $userProfileConfigManager.ConnectionManager | Where-Object -FilterScript { - $_.DisplayName -eq $params.MappingConnectionName - } - - $currentMapping = $syncConnection.PropertyMapping.Item($params.Name) - - if($null -eq $currentMapping ` - -or ($currentMapping.DataSourcePropertyName -ne $params.MappingPropertyName) ` - -or ($currentMapping.IsImport ` - -and $params.ContainsKey("MappingDirection") ` - -and $params.MappingDirection -eq "Export") - ) - { - if ($null -ne $currentMapping) - { - $currentMapping.Delete() #API allows updating, but UI doesn't do that. - } - - $export = $params.ContainsKey("MappingDirection") -and $params.MappingDirection -eq "Export" - if ($Connection.Type -eq "ActiveDirectoryImport") - { - if ($export) - { - throw "not implemented" - } - else - { - $Connection.AddPropertyMapping($params.MappingPropertyName,$params.Name) - $Connection.Update() - } - } - else - { - if ($export) - { - $syncConnection.PropertyMapping.AddNewExportMapping([Microsoft.Office.Server.UserProfiles.ProfileType]::User, - $params.Name, - $params.MappingPropertyName) - } - else - { - $syncConnection.PropertyMapping.AddNewMapping([Microsoft.Office.Server.UserProfiles.ProfileType]::User, - $params.Name, - $params.MappingPropertyName) - } - } - } - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.string] - $Name, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.string] - $UserProfileService, - - [parameter(Mandatory = $false)] - [System.string] - $DisplayName, - - [parameter(Mandatory = $false)] - [ValidateSet("BigInteger", - "Binary", - "Boolean", - "Date", - "DateNoYear", - "DateTime", - "Email", - "Float", - "Guid", - "HTML", - "Integer", - "Person", - "String", - "StringMultiValue", - "TimeZone", - "URL")] - [System.string] - $Type, - - [parameter(Mandatory = $false)] - [System.string] - $Description, - - [parameter(Mandatory = $false)] - [ValidateSet("Mandatory", "Optin","Optout", "Disabled")] - [System.string] - $PolicySetting, - - [parameter(Mandatory = $false)] - [ValidateSet("Public", "Contacts", "Organization", "Manager", "Private")] - [System.string] - $PrivacySetting, - - [parameter(Mandatory = $false)] - [System.string] - $MappingConnectionName, - - [parameter(Mandatory = $false)] - [System.string] - $MappingPropertyName, - - [parameter(Mandatory = $false)] - [System.string] - $MappingDirection, - - [parameter(Mandatory = $false)] - [System.uint32] - $Length, - - [parameter(Mandatory = $false)] - [System.uint32] - $DisplayOrder, - - [parameter(Mandatory = $false)] - [System.Boolean] - $IsEventLog, - - [parameter(Mandatory = $false)] - [System.Boolean] - $IsVisibleOnEditor, - - [parameter(Mandatory = $false)] - [System.Boolean] - $IsVisibleOnViewer, - - [parameter(Mandatory = $false)] - [System.Boolean] - $IsUserEditable, - - [parameter(Mandatory = $false)] - [System.Boolean] - $IsAlias, - - [parameter(Mandatory = $false)] - [System.Boolean] - $IsSearchable, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UserOverridePrivacy, - - [parameter(Mandatory = $false)] - [System.string] - $TermStore, - - [parameter(Mandatory = $false)] - [System.string] - $TermGroup, - - [parameter(Mandatory = $false)] - [System.string] - $TermSet, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - - ) - - Write-Verbose -Message "Testing for user profile property $Name" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($Ensure -eq "Present") - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Name", - "DisplayName", - "Type", - "Description", - "PolicySetting", - "PrivacySetting", - "MappingConnectionName", - "MappingPropertyName", - "MappingDirection", - "Length", - "DisplayOrder", - "IsEventLog", - "IsVisibleOnEditor", - "IsVisibleOnViewer", - "IsUserEditable", - "IsAlias", - "IsSearchabe", - "UserOverridePrivacy", - "TermGroup", - "TermStore", - "TermSet", - "Ensure") - } - else - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/MSFT_SPUserProfileProperty.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/MSFT_SPUserProfileProperty.schema.mof deleted file mode 100644 index c7bad60c..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/MSFT_SPUserProfileProperty.schema.mof +++ /dev/null @@ -1,28 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPUserProfileProperty")] -class MSFT_SPUserProfileProperty : OMI_BaseResource -{ - [Key, Description("The internal name of the user profile property")] string Name; - [Write, Description("Present if the property should exist, absent if it should be removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Required, Description("The name of the user profile service application")] string UserProfileService; - [Write, Description("The display name of the property")] string DisplayName; - [Write, Description("The type of the property"), ValueMap{"BigInteger","Binary","Boolean","Date","DateNoYear","DateTime","Email","Float","Guid","HTML","Integer","Person","String","StringMultiValue","TimeZone","URL"}, Values{"BigInteger","Binary","Boolean","Date","DateNoYear","DateTime","Email","Float","Guid","HTML","Integer","Person","String","StringMultiValue","TimeZone","URL"}] string Type; - [Write, Description("The description of the property")] string Description; - [Write, Description("The policy setting to apply to the property"), ValueMap{"Mandatory","Optin","Optout","Disabled"}, Values{"Mandatory","Optin","Optout","Disabled"}] string PolicySetting; - [Write, Description("The privacy setting for the property"), ValueMap{"Public","Contacts","Organization","Manager","Private"}, Values{"Public","Contacts","Organization","Manager","Private"}] string PrivacySetting; - [Write, Description("The name of the UPS connect to map this property to")] string MappingConnectionName; - [Write, Description("The name of the property from the UPS connection to map to")] string MappingPropertyName; - [Write, Description("The direction of the mapping, either Import or Export")] string MappingDirection; - [Write, Description("The length of the field")] uint32 Length; - [Write, Description("The display order to put the property in to the list at")] uint32 DisplayOrder; - [Write, Description("Is this field used for event logging")] boolean IsEventLog; - [Write, Description("Is this field visible when editing a users profile, or hidden from editing")] boolean IsVisibleOnEditor; - [Write, Description("Is this field visible when viewing a users profile")] boolean IsVisibleOnViewer; - [Write, Description("Is this field able to be edited by a user, or only an administrator")] boolean IsUserEditable; - [Write, Description("Is this field an alias that can be used to refer to a user by")] boolean IsAlias; - [Write, Description("Is this field able to be searched upon")] boolean IsSearchable; - [Write, Description("Can users override the default privacy policy")] boolean UserOverridePrivacy; - [Write, Description("The name of the term store to look up managed terms from")] string TermStore; - [Write, Description("The name of the term store group that terms are in for this field")] string TermGroup; - [Write, Description("The name of the term set to allow values to be selected from")] string TermSet; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/MSFT_SPUserProfileSection.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/MSFT_SPUserProfileSection.psm1 deleted file mode 100644 index d0cce7b4..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/MSFT_SPUserProfileSection.psm1 +++ /dev/null @@ -1,240 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.string] - $Name, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.string] - $UserProfileService, - - [parameter(Mandatory = $false)] - [System.string] - $DisplayName, - - [parameter(Mandatory = $false)] - [System.uint32] - $DisplayOrder, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting user profile section $Name" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $upsa = Get-SPServiceApplication -Name $params.UserProfileService ` - -ErrorAction SilentlyContinue - $nullReturn = @{ - Name = $params.Name - Ensure = "Absent" - UserProfileService = $params.UserProfileService - } - - if ($null -eq $upsa) - { - return $nullReturn - } - - $caURL = (Get-SpWebApplication -IncludeCentralAdministration | Where-Object -FilterScript { - $_.IsAdministrationWebApplication -eq $true - }).Url - $context = Get-SPServiceContext -Site $caURL - $userProfileConfigManager = New-Object -TypeName "Microsoft.Office.Server.UserProfiles.UserProfileConfigManager" ` - -ArgumentList $context - $properties = $userProfileConfigManager.GetPropertiesWithSection() - - $userProfileProperty = $properties.GetSectionByName($params.Name) - if ($null -eq $userProfileProperty) - { - return $nullReturn - } - - return @{ - Name = $userProfileProperty.Name - UserProfileService = $params.UserProfileService - DisplayName = $userProfileProperty.DisplayName - DisplayOrder =$userProfileProperty.DisplayOrder - Ensure = "Present" - } - - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.string] - $Name, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.string] - $UserProfileService, - - [parameter(Mandatory = $false)] - [System.string] - $DisplayName, - - [parameter(Mandatory = $false)] - [System.uint32] - $DisplayOrder, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - # note for integration test: CA can take a couple of minutes to notice the change. - # don't try refreshing properties page. go through from a fresh "flow" from Service apps page - Write-Verbose -Message "Setting user profile section $Name" - - $PSBoundParameters.Ensure = $Ensure - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $ups = Get-SPServiceApplication -Name $params.UserProfileService ` - -ErrorAction SilentlyContinue - - if ($null -eq $ups) - { - throw "Service application $($params.UserProfileService) not found" - } - - $caURL = (Get-SpWebApplication -IncludeCentralAdministration | Where-Object -FilterScript { - $_.IsAdministrationWebApplication -eq $true - }).Url - $context = Get-SPServiceContext $caURL - - $userProfileConfigManager = New-Object -TypeName "Microsoft.Office.Server.UserProfiles.UserProfileConfigManager" ` - -ArgumentList $context - - if ($null -eq $userProfileConfigManager) - { #if config manager returns null when ups is available then isuee is permissions - throw "Account running process needs admin permission on user profile service application" - } - $properties = $userProfileConfigManager.GetPropertiesWithSection() - $userProfileProperty = $properties.GetSectionByName($params.Name) - - if ($params.ContainsKey("Ensure") -and $params.Ensure -eq "Absent") - { - if ($null -ne $userProfileProperty) - { - $properties.RemoveSectionByName($params.Name) - } - return - } - elseif($null -eq $userProfileProperty) - { - $coreProperty = $properties.Create($true) - $coreProperty.Name = $params.Name - $coreProperty.DisplayName = $params.DisplayName - $coreProperty.Commit() - } - else - { - Set-SPDscObjectPropertyIfValuePresent -ObjectToSet $userProfileProperty ` - -PropertyToSet "DisplayName" ` - -ParamsValue $params ` - -ParamKey "DisplayName" - $userProfileProperty.Commit() - } - - #region display order - if ($params.ContainsKey("DisplayOrder")) - { - $properties = $userProfileConfigManager.GetPropertiesWithSection() - $properties.SetDisplayOrderBySectionName($params.Name,$params.DisplayOrder) - $properties.CommitDisplayOrder() - } - - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.string] - $Name, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.string] - $UserProfileService, - - [parameter(Mandatory = $false)] - [System.string] - $DisplayName, - - [parameter(Mandatory = $false)] - [System.uint32] - $DisplayOrder, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - - ) - - Write-Verbose -Message "Testing user profile section $Name" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($null -eq $CurrentValues) - { - return $false - } - - if ($Ensure -eq "Present") - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Name", - "DisplayName", - "DisplayOrder", - "Ensure") - } - else - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/MSFT_SPUserProfileSection.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/MSFT_SPUserProfileSection.schema.mof deleted file mode 100644 index 2908ffc7..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/MSFT_SPUserProfileSection.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPUserProfileSection")] -class MSFT_SPUserProfileSection : OMI_BaseResource -{ - [Key, Description("The internal name of the user profile section")] string Name; - [Write, Description("Present if the section should exist, absent if it should be removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Required, Description("The name of the user profile service application this section exists in")] string UserProfileService; - [Write, Description("The display name of the section")] string DisplayName; - [Write, Description("A number used to sort sections by")] uint32 DisplayOrder; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 deleted file mode 100644 index 70d7f4f2..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 +++ /dev/null @@ -1,453 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $FarmAccount, - - [parameter(Mandatory = $false)] - [System.String] - $MySiteHostLocation, - - [parameter(Mandatory = $false)] - [System.String] - $ProfileDBName, - - [parameter(Mandatory = $false)] - [System.String] - $ProfileDBServer, - - [parameter(Mandatory = $false)] - [System.String] - $SocialDBName, - - [parameter(Mandatory = $false)] - [System.String] - $SocialDBServer, - - [parameter(Mandatory = $false)] - [System.String] - $SyncDBName, - - [parameter(Mandatory = $false)] - [System.String] - $SyncDBServer, - - [parameter(Mandatory = $false)] - [System.Boolean] - $EnableNetBIOS = $false, - - [parameter(Mandatory = $false)] - [System.Boolean] - $NoILMUsed = $false, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting user profile service application $Name" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApps = Get-SPServiceApplication -Name $params.Name -ErrorAction SilentlyContinue - $nullReturn = @{ - Name = $params.Name - Ensure = "Absent" - } - if ($null -eq $serviceApps) - { - return $nullReturn - } - $serviceApp = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Server.Administration.UserProfileApplication" - } - - if ($null -eq $serviceApp) - { - return $nullReturn - } - else - { - $databases = @{} - $propertyFlags = [System.Reflection.BindingFlags]::Instance ` - -bor [System.Reflection.BindingFlags]::NonPublic - - $propData = $serviceApp.GetType().GetProperties($propertyFlags) - - $socialProp = $propData | Where-Object -FilterScript { - $_.Name -eq "SocialDatabase" - } - $databases.Add("SocialDatabase", $socialProp.GetValue($serviceApp)) - - $profileProp = $propData | Where-Object -FilterScript { - $_.Name -eq "ProfileDatabase" - } - $databases.Add("ProfileDatabase", $profileProp.GetValue($serviceApp)) - - $syncProp = $propData | Where-Object -FilterScript { - $_.Name -eq "SynchronizationDatabase" - } - $databases.Add("SynchronizationDatabase", $syncProp.GetValue($serviceApp)) - - $spFarm = Get-SPFarm - - if ($params.FarmAccount.UserName -eq $spFarm.DefaultServiceAccount.Name) - { - $farmAccount = $params.FarmAccount - } - else - { - $farmAccount = $spFarm.DefaultServiceAccount.Name - } - $serviceAppProxies = Get-SPServiceApplicationProxy -ErrorAction SilentlyContinue - if ($null -ne $serviceAppProxies) - { - $serviceAppProxy = $serviceAppProxies | Where-Object -FilterScript { - $serviceApp.IsConnected($_) - } - if ($null -ne $serviceAppProxy) - { - $proxyName = $serviceAppProxy.Name - } - } - return @{ - Name = $serviceApp.DisplayName - ProxyName = $proxyName - ApplicationPool = $serviceApp.ApplicationPool.Name - FarmAccount = $farmAccount - MySiteHostLocation = $params.MySiteHostLocation - ProfileDBName = $databases.ProfileDatabase.Name - ProfileDBServer = $databases.ProfileDatabase.Server.Name - SocialDBName = $databases.SocialDatabase.Name - SocialDBServer = $databases.SocialDatabase.Server.Name - SyncDBName = $databases.SynchronizationDatabase.Name - SyncDBServer = $databases.SynchronizationDatabase.Server.Name - InstallAccount = $params.InstallAccount - EnableNetBIOS = $serviceApp.NetBIOSDomainNamesEnabled - NoILMUsed = $serviceApp.NoILMUsed - Ensure = "Present" - } - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $FarmAccount, - - [parameter(Mandatory = $false)] - [System.String] - $MySiteHostLocation, - - [parameter(Mandatory = $false)] - [System.String] - $ProfileDBName, - - [parameter(Mandatory = $false)] - [System.String] - $ProfileDBServer, - - [parameter(Mandatory = $false)] - [System.String] - $SocialDBName, - - [parameter(Mandatory = $false)] - [System.String] - $SocialDBServer, - - [parameter(Mandatory = $false)] - [System.String] - $SyncDBName, - - [parameter(Mandatory = $false)] - [System.String] - $SyncDBServer, - - [parameter(Mandatory = $false)] - [System.Boolean] - $EnableNetBIOS = $false, - - [parameter(Mandatory = $false)] - [System.Boolean] - $NoILMUsed = $false, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting user profile service application $Name" - - if ($Ensure -eq "Present") - { - if ($PSBoundParameters.ContainsKey("FarmAccount") -eq $false) - { - throw ("Unable to provision the user profile service without the Farm Account. " + ` - "Please specify the FarmAccount parameter and try again") - return - } - - Write-Verbose -Message "Creating user profile service application $Name" - - # Add the FarmAccount to the local Administrators group, if it's not already there - $isLocalAdmin = Test-SPDSCUserIsLocalAdmin -UserName $FarmAccount.UserName - - if (!$isLocalAdmin) - { - Add-SPDSCUserToLocalAdmin -UserName $FarmAccount.UserName - } - - $result = Invoke-SPDSCCommand -Credential $FarmAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $updateEnableNetBIOS = $false - if ($params.ContainsKey("EnableNetBIOS")) - { - $updateEnableNetBIOS = $true - $enableNetBIOS = $params.EnableNetBIOS - $params.Remove("EnableNetBIOS") | Out-Null - } - - $updateNoILMUsed = $false - if ($params.ContainsKey("NoILMUsed")) - { - $updateNoILMUsed = $true - $NoILMUsed = $params.NoILMUsed - $params.Remove("NoILMUsed") | Out-Null - } - - if ($params.ContainsKey("InstallAccount")) - { - $params.Remove("InstallAccount") | Out-Null - } - if ($params.ContainsKey("Ensure")) - { - $params.Remove("Ensure") | Out-Null - } - $params.Remove("FarmAccount") | Out-Null - - $params = Rename-SPDSCParamValue -params $params ` - -oldName "SyncDBName" ` - -newName "ProfileSyncDBName" - - $params = Rename-SPDSCParamValue -params $params ` - -oldName "SyncDBServer" ` - -newName "ProfileSyncDBServer" - - if ($params.ContainsKey("ProxyName")) - { - $pName = $params.ProxyName - $params.Remove("ProxyName") | Out-Null - } - if ($null -eq $pName) - { - $pName = "$($params.Name) Proxy" - } - - $serviceApps = Get-SPServiceApplication -Name $params.Name ` - -ErrorAction SilentlyContinue - $app = $serviceApps | Select-Object -First 1 - if ($null -eq $serviceApps) - { - $app = New-SPProfileServiceApplication @params - if ($null -ne $app) - { - New-SPProfileServiceApplicationProxy -Name $pName ` - -ServiceApplication $app ` - -DefaultProxyGroup - } - } - - if (($updateEnableNetBIOS -eq $true) -or ($updateNoILMUsed -eq $true)) - { - if (($updateEnableNetBIOS -eq $true) -and ` - ($app.NetBIOSDomainNamesEnabled -ne $enableNetBIOS)) - { - $app.NetBIOSDomainNamesEnabled = $enableNetBIOS - } - - if (($updateNoILMUsed -eq $true) -and ` - ($app.NoILMUsed -ne $NoILMUsed)) - { - $app.NoILMUsed = $NoILMUsed - } - $app.Update() - } - } - - # Remove the FarmAccount from the local Administrators group, if it was added above - if (!$isLocalAdmin) - { - Remove-SPDSCUserToLocalAdmin -UserName $FarmAccount.UserName - } - } - - if ($Ensure -eq "Absent") - { - Write-Verbose -Message "Removing user profile service application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - - $params = $args[0] - - $app = Get-SPServiceApplication -Name $params.Name ` - | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Server.Administration.UserProfileApplication" - } - - $proxies = Get-SPServiceApplicationProxy - foreach($proxyInstance in $proxies) - { - if($app.IsConnected($proxyInstance)) - { - $proxyInstance.Delete() - } - } - - Remove-SPServiceApplication -Identity $app -Confirm:$false - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $FarmAccount, - - [parameter(Mandatory = $false)] - [System.String] - $MySiteHostLocation, - - [parameter(Mandatory = $false)] - [System.String] - $ProfileDBName, - - [parameter(Mandatory = $false)] - [System.String] - $ProfileDBServer, - - [parameter(Mandatory = $false)] - [System.String] - $SocialDBName, - - [parameter(Mandatory = $false)] - [System.String] - $SocialDBServer, - - [parameter(Mandatory = $false)] - [System.String] - $SyncDBName, - - [parameter(Mandatory = $false)] - [System.String] - $SyncDBServer, - - [parameter(Mandatory = $false)] - [System.Boolean] - $EnableNetBIOS = $false, - - [parameter(Mandatory = $false)] - [System.Boolean] - $NoILMUsed = $false, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing for user profile service application $Name" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if($Ensure -eq "Present") - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Name", - "EnableNetBIOS", - "NoILMUsed", - "Ensure") - } - else - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Name", "Ensure") - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.schema.mof deleted file mode 100644 index 5c320b89..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.schema.mof +++ /dev/null @@ -1,19 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPUserProfileServiceApp")] -class MSFT_SPUserProfileServiceApp : OMI_BaseResource -{ - [Key, Description("The name of the user profile service")] string Name; - [Write, Description("The proxy name, if not specified will be /Name of service app/ Proxy")] string ProxyName; - [Required, Description("The name of the application pool to run the service app in")] string ApplicationPool; - [Write, Description("The farm account to use when provisioning the app"), EmbeddedInstance("MSFT_Credential")] String FarmAccount; - [Write, Description("The URL of the my site host collection")] string MySiteHostLocation; - [Write, Description("The name of the profile database")] string ProfileDBName; - [Write, Description("The name of the server to host the profile database")] string ProfileDBServer; - [Write, Description("The name of the social database")] string SocialDBName; - [Write, Description("The name of the database server to host the social database")] string SocialDBServer; - [Write, Description("The name of the sync database")] string SyncDBName; - [Write, Description("The name of the database server to host the sync database")] string SyncDBServer; - [Write, Description("Whether Farm should resolve NetBIOS domain names")] boolean EnableNetBIOS; - [Write, Description("Specifies if the service application should be configured to use AD Import")] boolean NoILMUsed; - [Write, Description("Present if the service app should exist, absent if it should not"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/MSFT_SPUserProfileServiceAppPermissions.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/MSFT_SPUserProfileServiceAppPermissions.psm1 deleted file mode 100644 index 6ffb2797..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/MSFT_SPUserProfileServiceAppPermissions.psm1 +++ /dev/null @@ -1,365 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $true)] - [System.String[]] - $CreatePersonalSite, - - [parameter(Mandatory = $true)] - [System.String[]] - $FollowAndEditProfile, - - [parameter(Mandatory = $true)] - [System.String[]] - $UseTagsAndNotes, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting permissions for user profile service proxy '$ProxyName" - - Confirm-SPDscUpaPermissionsConfig -Parameters $PSBoundParameters - - $result = Invoke-SPDSCCommand -Credential $InstallAccount -Arguments $PSBoundParameters -ScriptBlock { - $params = $args[0] - - $proxy = Get-SPServiceApplicationProxy | Where-Object { $_.DisplayName -eq $params.ProxyName } - if ($null -eq $proxy) - { - return @{ - ProxyName = $params.ProxyName - CreatePersonalSite = $null - FollowAndEditProfile = $null - UseTagsAndNotes = $null - InstallAccount = $params.InstallAccount - } - } - $security = Get-SPProfileServiceApplicationSecurity -ProfileServiceApplicationProxy $proxy - - $createPersonalSite = @() - $followAndEditProfile = @() - $useTagsAndNotes = @() - - foreach ($securityEntry in $security.AccessRules) - { - $user = $securityEntry.Name - if ($user -like "i:*|*" -or $user -like "c:*|*") - { - # Only claims users can be processed by the PowerShell cmdlets, so only - # report on and manage the claims identities - if ($user -eq "c:0(.s|true") - { - $user = "Everyone" - } - else - { - $user = (New-SPClaimsPrincipal -Identity $user -IdentityType EncodedClaim).Value - } - } - if ($securityEntry.AllowedRights.ToString() -eq "All") - { - $createPersonalSite += $user - $followAndEditProfile += $user - $useTagsAndNotes += $user - } - if ($securityEntry.AllowedRights.ToString() -like "*UsePersonalFeatures*") - { - $followAndEditProfile += $user - } - if ($securityEntry.AllowedRights.ToString() -like "*UseSocialFeatures*") - { - $useTagsAndNotes += $user - } - if (($securityEntry.AllowedRights.ToString() -like "*CreatePersonalSite*") ` - -and ($securityEntry.AllowedRights.ToString() -like "*UseMicrobloggingAndFollowing*")) - { - $createPersonalSite += $user - } - } - - if ($createPersonalSite.Length -eq 0) - { - $createPersonalSite += "None" - } - if ($followAndEditProfile.Length -eq 0) - { - $followAndEditProfile += "None" - } - if ($useTagsAndNotes.Length -eq 0) - { - $useTagsAndNotes += "None" - } - - return @{ - ProxyName = $params.ProxyName - CreatePersonalSite = $createPersonalSite - FollowAndEditProfile = $followAndEditProfile - UseTagsAndNotes = $useTagsAndNotes - InstallAccount = $params.InstallAccount - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $true)] - [System.String[]] - $CreatePersonalSite, - - [parameter(Mandatory = $true)] - [System.String[]] - $FollowAndEditProfile, - - [parameter(Mandatory = $true)] - [System.String[]] - $UseTagsAndNotes, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting permissions for user profile service proxy '$ProxyName" - - Confirm-SPDscUpaPermissionsConfig -Parameters $PSBoundParameters - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($CurrentValues.CreatePersonalSite -contains "NT AUTHORITY\Authenticated Users" ` - -or $CurrentValues.FollowAndEditProfile -contains "NT AUTHORITY\Authenticated Users" ` - -or $CurrentValues.UseTagsAndNotes -contains "NT AUTHORITY\Authenticated Users") - { - Write-Warning -Message ("Permissions were found for the non-claims identity " + ` - "'NT AUTHORITY\Authenticated Users'. This will be removed as " + ` - "identies on service app proxy permissions should be claims based.") - - Invoke-SPDSCCommand -Credential $InstallAccount -Arguments $PSBoundParameters -ScriptBlock { - $params = $args[0] - - $proxy = Get-SPServiceApplicationProxy | Where-Object { $_.DisplayName -eq $params.ProxyName } - $security = Get-SPProfileServiceApplicationSecurity -ProfileServiceApplicationProxy $proxy - Revoke-SPObjectSecurity -Identity $security -All - Set-SPProfileServiceApplicationSecurity -Identity $security -ProfileServiceApplicationProxy $proxy -Confirm:$false - Write-Verbose -Message "Successfully cleared all permissions on the service app proxy" - } - - Write-Verbose -Message "Waiting 2 minutes for proxy permissions to be applied fully before continuing" - Start-Sleep -Seconds 120 - Write-Verbose -Message "Continuing configuration by getting the new current values." - $CurrentValues = Get-TargetResource @PSBoundParameters - } - - Invoke-SPDSCCommand -Credential $InstallAccount -Arguments @($PSBoundParameters, $CurrentValues) -ScriptBlock { - $params = $args[0] - $CurrentValues = $args[1] - - $proxy = Get-SPServiceApplicationProxy | Where-Object { $_.DisplayName -eq $params.ProxyName } - if ($null -eq $proxy) - { - throw "Unable to find service application proxy called '$($params.ProxyName)'" - return - } - $security = Get-SPProfileServiceApplicationSecurity -ProfileServiceApplicationProxy $proxy - - $permissionsToUpdate = @{ - "CreatePersonalSite" = "Create Personal Site" - "FollowAndEditProfile" = "Use Personal Features" - "UseTagsAndNotes" = "Use Social Features" - } - - foreach ($permission in $permissionsToUpdate.Keys) - { - $permissionsDiff = Compare-Object -ReferenceObject $CurrentValues.$permission ` - -DifferenceObject $params.$permission - - $everyoneDiff = $permissionsDiff | Where-Object -FilterScript { $_.InputObject -eq "Everyone" } - $noneDiff = $permissionsDiff | Where-Object -FilterScript { $_.InputObject -eq "None" } - - if (($null -ne $noneDiff) -and ($noneDiff.SideIndicator -eq "=>")) - { - # Need to remove everyone - foreach($user in $CurrentValues.$permission) - { - if ($user -ne "Everyone" -and $user -ne "None") - { - $isUser = Test-SPDSCIsADUser -IdentityName $user - if ($isUser -eq $true) - { - $claim = New-SPClaimsPrincipal -Identity $user ` - -IdentityType WindowsSamAccountName - } - else - { - $claim = New-SPClaimsPrincipal -Identity $user ` - -IdentityType WindowsSecurityGroupName - } - Revoke-SPObjectSecurity -Identity $security ` - -Principal $claim ` - -Rights $permissionsToUpdate.$permission - } - elseif ($user -eq "Everyone") - { - # Revoke the all user permissions - $allClaimsUsersClaim = New-SPClaimsPrincipal -Identity "c:0(.s|true" ` - -IdentityType EncodedClaim - Revoke-SPObjectSecurity -Identity $security ` - -Principal $allClaimsUsersClaim ` - -Rights $permissionsToUpdate.$permission - } - } - } - elseif (($null -ne $everyoneDiff) -and ($everyoneDiff.SideIndicator -eq "=>")) - { - # Need to add everyone, so remove all the permissions that exist currently of this type - # and then add the everyone permissions - foreach($user in $CurrentValues.$permission) - { - if ($user -ne "Everyone" -and $user -ne "None") - { - $isUser = Test-SPDSCIsADUser -IdentityName $user - if ($isUser -eq $true) { - $claim = New-SPClaimsPrincipal -Identity $user ` - -IdentityType WindowsSamAccountName - } - else - { - $claim = New-SPClaimsPrincipal -Identity $user ` - -IdentityType WindowsSecurityGroupName - } - Revoke-SPObjectSecurity -Identity $security ` - -Principal $claim ` - -Rights $permissionsToUpdate.$permission - } - } - - $allClaimsUsersClaim = New-SPClaimsPrincipal -Identity "c:0(.s|true" ` - -IdentityType EncodedClaim - Grant-SPObjectSecurity -Identity $security ` - -Principal $allClaimsUsersClaim ` - -Rights $permissionsToUpdate.$permission - } - else - { - # permission changes aren't to everyone or none, process each change - foreach ($permissionChange in $permissionsDiff) - { - if ($permissionChange.InputObject -ne "Everyone" -and ` - $permissionChange.InputObject -ne "None") - { - $isUser = Test-SPDSCIsADUser -IdentityName $permissionChange.InputObject - if ($isUser -eq $true) - { - $claim = New-SPClaimsPrincipal -Identity $permissionChange.InputObject ` - -IdentityType WindowsSamAccountName - } - else - { - $claim = New-SPClaimsPrincipal -Identity $permissionChange.InputObject ` - -IdentityType WindowsSecurityGroupName - } - if ($permissionChange.SideIndicator -eq "=>") - { - # Grant permission to the identity - Grant-SPObjectSecurity -Identity $security ` - -Principal $claim ` - -Rights $permissionsToUpdate.$permission - } - if ($permissionChange.SideIndicator -eq "<=") - { - # Revoke permission for the identity - Revoke-SPObjectSecurity -Identity $security ` - -Principal $claim ` - -Rights $permissionsToUpdate.$permission - } - } - } - } - } - - Set-SPProfileServiceApplicationSecurity -Identity $security ` - -ProfileServiceApplicationProxy $proxy ` - -Confirm:$false - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $true)] - [System.String[]] - $CreatePersonalSite, - - [parameter(Mandatory = $true)] - [System.String[]] - $FollowAndEditProfile, - - [parameter(Mandatory = $true)] - [System.String[]] - $UseTagsAndNotes, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing permissions for user profile service proxy '$ProxyName" - - Confirm-SPDscUpaPermissionsConfig -Parameters $PSBoundParameters - - $CurrentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("CreatePersonalSite", ` - "FollowAndEditProfile", ` - "UseTagsAndNotes") -} - -function Confirm-SPDscUpaPermissionsConfig() -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [Object] - $Parameters - ) - - @( - "CreatePersonalSite", - "FollowAndEditProfile", - "UseTagsAndNotes" - ) | ForEach-Object -Process { - if (($Parameters.$_ -contains "Everyone") -and ($Parameters.$_ -contains "None")) - { - throw ("You can not specify 'Everyone' and 'None' in the same property. " + ` - "Check the value for the '$_' property on this resource.") - } - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/MSFT_SPUserProfileServiceAppPermissions.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/MSFT_SPUserProfileServiceAppPermissions.schema.mof deleted file mode 100644 index 499f6862..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/MSFT_SPUserProfileServiceAppPermissions.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPUserProfileServiceAppPermissions")] -class MSFT_SPUserProfileServiceAppPermissions : OMI_BaseResource -{ - [Key, Description("The name of the proxy that is attached to the user profile service you wish to set permissions for")] string ProxyName; - [Required, Description("A list of user principals that will have the Create personal site permission")] string CreatePersonalSite[]; - [Required, Description("A list of user principals that will have the Follow users and edit profile permission")] string FollowAndEditProfile[]; - [Required, Description("A list of user principals that will have the Use tags and notes permission")] string UseTagsAndNotes[]; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 deleted file mode 100644 index c1cbf3f4..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 +++ /dev/null @@ -1,383 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Forest, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $ConnectionCredentials, - - [parameter(Mandatory = $true)] - [System.String] - $UserProfileService, - - [parameter(Mandatory = $true)] - [System.String[]] - $IncludedOUs, - - [parameter(Mandatory = $false)] - [System.String[]] - $ExcludedOUs, - - [parameter(Mandatory = $false)] - [System.String] - $Server, - - [parameter(Mandatory = $false)] - [System.Boolean] - $Force, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UseSSL, - - [parameter(Mandatory = $false)] - [ValidateSet("ActiveDirectory","BusinessDataCatalog")] - [System.String] - $ConnectionType, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting user profile service sync connection $Name" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $ups = Get-SPServiceApplication -Name $params.UserProfileService ` - -ErrorAction SilentlyContinue - - if ($null -eq $ups) - { - return $null - } - else - { - $context = Get-SPDSCServiceContext -ProxyGroup $ups.ServiceApplicationProxyGroup - $upcm = New-Object -TypeName "Microsoft.Office.Server.UserProfiles.UserProfileConfigManager" ` - -ArgumentList $context - - $connection = $upcm.ConnectionManager | Where-Object -FilterScript { - $_.DisplayName -eq $params.Name - } - if ($null -eq $connection) - { - return $null - } - $namingContext = $connection.NamingContexts | Select-Object -First 1 - if ($null -eq $namingContext) - { - return $null - } - $accountCredentials = "$($connection.AccountDomain)\$($connection.AccountUsername)" - $domainController = $namingContext.PreferredDomainControllers | Select-Object -First 1 - return @{ - UserProfileService = $UserProfileService - Forest = $connection.Server - Name = $namingContext.DisplayName - Credentials = $accountCredentials - IncludedOUs = $namingContext.ContainersIncluded - ExcludedOUs = $namingContext.ContainersExcluded - Server =$domainController - UseSSL = $connection.UseSSL - ConnectionType = $connection.Type.ToString() - Force = $params.Force - } - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Forest, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $ConnectionCredentials, - - [parameter(Mandatory = $true)] - [System.String] - $UserProfileService, - - [parameter(Mandatory = $true)] - [System.String[]] - $IncludedOUs, - - [parameter(Mandatory = $false)] - [System.String[]] - $ExcludedOUs, - - [parameter(Mandatory = $false)] - [System.String] - $Server, - - [parameter(Mandatory = $false)] - [System.Boolean] - $Force, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UseSSL, - - [parameter(Mandatory = $false)] - [ValidateSet("ActiveDirectory","BusinessDataCatalog")] - [System.String] - $ConnectionType, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting user profile service sync connection $Name" - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters, $PSScriptRoot) ` - -ScriptBlock { - - $params = $args[0] - $scriptRoot = $args[1] - - Import-Module -Name (Join-Path $scriptRoot "MSFT_SPUserProfileSyncConnection.psm1") - - if ($params.ContainsKey("InstallAccount")) { $params.Remove("InstallAccount") | Out-Null } - $ups = Get-SPServiceApplication -Name $params.UserProfileService -ErrorAction SilentlyContinue - - if ($null -eq $ups) { - throw "User Profile Service Application $($params.UserProfileService) not found" - } - $context = Get-SPDSCServiceContext -ProxyGroup $ups.ServiceApplicationProxyGroup - - Write-Verbose -Message "retrieving UserProfileConfigManager " - $upcm = New-Object -TypeName "Microsoft.Office.Server.UserProfiles.UserProfileConfigManager" ` - -ArgumentList @($context) - - if ($upcm.IsSynchronizationRunning()) - { - throw "Synchronization is in Progress." - } - - $connection = $upcm.ConnectionManager | Where-Object -FilterScript { - $_.DisplayName -eq $params.Name - } | Select-Object -first 1 - - if ($null -ne $connection -and $params.Forest -ieq $connection.Server) - { - $domain = $params.ConnectionCredentials.UserName.Split("\")[0] - $userName= $params.ConnectionCredentials.UserName.Split("\")[1] - $connection.SetCredentials($domain, $userName, $params.ConnectionCredentials.Password) - - $connection.NamingContexts | ForEach-Object -Process { - $namingContext = $_ - if ($params.ContainsKey("IncludedOUs")) - { - $namingContext.ContainersIncluded.Clear() - $params.IncludedOUs| ForEach-Object -Process { - $namingContext.ContainersIncluded.Add($_) - } - } - $namingContext.ContainersExcluded.Clear() - if ($params.ContainsKey("ExcludedOUs")) - { - $params.IncludedOUs| ForEach-Object -Process { - $namingContext.ContainersExcluded.Add($_) - } - } - } - $connection.Update() - $connection.RefreshSchema($params.ConnectionCredentials.Password) - - return - } - else - { - Write-Verbose -Message "creating a new connection " - if ($null -ne $connection -and $params.Forest -ine $connection.Server) - { - if ($params.ContainsKey("Force") -and $params.Force -eq $true) - { - $connection.Delete() - } - else - { - throw "connection exists and forest is different. use force" - } - - } - - $servers = New-Object -TypeName "System.Collections.Generic.List[[System.String]]" - if ($params.ContainsKey("Server")) - { - $servers.add($params.Server) - } - $listIncludedOUs = New-Object -TypeName "System.Collections.Generic.List[[System.String]]" - $params.IncludedOUs | ForEach-Object -Process { - $listIncludedOUs.Add($_) - } - - $listExcludedOUs = New-Object -TypeName "System.Collections.Generic.List[[System.String]]" - if ($params.ContainsKey("ExcludedOus")) - { - $params.ExcludedOus | ForEach-Object -Process { - $listExcludedOUs.Add($_) - } - } - $list = New-Object -TypeName System.Collections.Generic.List[[Microsoft.Office.Server.UserProfiles.DirectoryServiceNamingContext]] - - $partition = Get-SPDSCADSIObject -LdapPath ("LDAP://" +("DC=" + $params.Forest.Replace(".", ",DC="))) - $list.Add((New-Object -TypeName "Microsoft.Office.Server.UserProfiles.DirectoryServiceNamingContext" ` - -ArgumentList @( - $partition.distinguishedName, - $params.Forest, - $false, - (New-Object -TypeName "System.Guid" ` - -ArgumentList $partition.objectGUID), - $listIncludedOUs, - $listExcludedOUs, - $null , - $false))) - $partition = Get-SPDSCADSIObject -LdapPath ("LDAP://CN=Configuration," + ("DC=" + $params.Forest.Replace(".", ",DC="))) - $list.Add((New-Object -TypeName "Microsoft.Office.Server.UserProfiles.DirectoryServiceNamingContext" ` - -ArgumentList @( - $partition.distinguishedName, - $params.Forest, - $true, - (New-Object -TypeName "System.Guid" ` - -ArgumentList $partition.objectGUID), - $listIncludedOUs , - $listExcludedOUs , - $null , - $false))) - - $userDomain = $params.ConnectionCredentials.UserName.Split("\")[0] - $userName= $params.ConnectionCredentials.UserName.Split("\")[1] - - $upcm.ConnectionManager.AddActiveDirectoryConnection( [Microsoft.Office.Server.UserProfiles.ConnectionType]::ActiveDirectory, ` - $params.Name, ` - $params.Forest, ` - $params.UseSSL, ` - $userDomain, ` - $userName, ` - $params.ConnectionCredentials.Password, ` - $list, ` - $null,` - $null) | Out-Null - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Forest, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $ConnectionCredentials, - - [parameter(Mandatory = $true)] - [System.String] - $UserProfileService, - - [parameter(Mandatory = $true)] - [System.String[]] - $IncludedOUs, - - [parameter(Mandatory = $false)] - [System.String[]] - $ExcludedOUs, - - [parameter(Mandatory = $false)] - [System.String] - $Server, - - [parameter(Mandatory = $false)] - [System.Boolean] - $Force, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UseSSL, - - [parameter(Mandatory = $false)] - [ValidateSet("ActiveDirectory","BusinessDataCatalog")] - [System.String] - $ConnectionType, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing for user profile service sync connection $Name" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($null -eq $CurrentValues) - { - return $false - } - - if ($Force -eq $true) - { - return $false - } - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Name", - "Forest", - "UserProfileService", - "Server", - "UseSSL", - "IncludedOUs", - "ExcludedOUs") -} - -<# -.DESCRIPTION - -This method is not intensed for public use, and was created to facilitate unit testing -#> -function Get-SPDSCADSIObject -{ - param( - [string] $LdapPath - ) - return [ADSI]($LdapPath) -} - - -Export-ModuleMember -Function *-TargetResource, Get-SPDSCADSIObject diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.schema.mof deleted file mode 100644 index be9b5ec5..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.schema.mof +++ /dev/null @@ -1,15 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPUserProfileSyncConnection")] -class MSFT_SPUserProfileSyncConnection : OMI_BaseResource -{ - [Key, Description("The name of the connection")] string Name; - [Required, Description("The name of the AD forest to read from")] string Forest; - [Required, Description("The name of the user profile service that this connection is attached to")] string UserProfileService; - [Required, Description("The credentials to connect to Active Directory with"), EmbeddedInstance("MSFT_Credential")] string ConnectionCredentials; - [Required, Description("A list of the OUs to import users from")] string IncludedOUs[]; - [Write, Description("A list of the OUs to ignore users from")] string ExcludedOUs[]; - [Write, Description("The specific AD server to connect to")] string Server; - [Write, Description("Should SSL be used for the connection")] boolean UseSSL; - [Write, Description("Set to true to run the set method on every call to this resource")] boolean Force; - [Write, Description("The type of the connection - currently only Active Directory is supported"), ValueMap{"ActiveDirectory","BusinessDataCatalog"}, Values{"ActiveDirectory","BusinessDataCatalog"}] string ConnectionType; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] string InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/MSFT_SPUserProfileSyncService.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/MSFT_SPUserProfileSyncService.psm1 deleted file mode 100644 index 46f7f471..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/MSFT_SPUserProfileSyncService.psm1 +++ /dev/null @@ -1,375 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $UserProfileServiceAppName, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $FarmAccount, - - [parameter(Mandatory = $false)] - [System.Boolean] - $RunOnlyWhenWriteable, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting user profile sync service for $UserProfileServiceAppName" - - if ((Get-SPDSCInstalledProductVersion).FileMajorPart -ne 15) - { - throw [Exception] ("Only SharePoint 2013 is supported to deploy the user profile sync " + ` - "service via DSC, as 2016 does not use the FIM based sync service.") - } - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $syncServices = Get-SPServiceInstance -Server $env:COMPUTERNAME ` - -ErrorAction SilentlyContinue - - if ($null -eq $syncServices) - { - return @{ - UserProfileServiceAppName = $params.UserProfileServiceAppName - Ensure = "Absent" - FarmAccount = $params.FarmAccount - RunOnlyWhenWriteable = $params.RunOnlyWhenWriteable - InstallAccount = $params.InstallAccount - } - } - - $syncService = $syncServices | Where-Object -FilterScript { - $_.GetType().Name -eq "UserProfileServiceInstance" - } - - if ($null -eq $syncService) - { - $domain = (Get-CimInstance -ClassName Win32_ComputerSystem).Domain - $currentServer = "$($env:COMPUTERNAME).$domain" - $syncServices = Get-SPServiceInstance -Server $currentServer ` - -ErrorAction SilentlyContinue - $syncService = $syncServices | Where-Object -FilterScript { - $_.GetType().Name -eq "UserProfileServiceInstance" - } - } - - if ($null -eq $syncService) - { - return @{ - UserProfileServiceAppName = $params.UserProfileServiceAppName - Ensure = "Absent" - FarmAccount = $params.FarmAccount - RunOnlyWhenWriteable = $params.RunOnlyWhenWriteable - InstallAccount = $params.InstallAccount - } - } - if ($null -ne $syncService.UserProfileApplicationGuid -and ` - $syncService.UserProfileApplicationGuid -ne [Guid]::Empty) - { - $upa = Get-SPServiceInstance -Identity $syncService.UserProfileApplicationGuid ` - -ErrorAction SilentlyContinue - } - if ($syncService.Status -eq "Online") - { - $localEnsure = "Present" - } - else - { - $localEnsure = "Absent" - } - - $spFarm = Get-SPFarm - - if ($params.FarmAccount.UserName -eq $spFarm.DefaultServiceAccount.Name) - { - $farmAccount = $params.FarmAccount - } - else - { - $farmAccount = $spFarm.DefaultServiceAccount.Name - } - - return @{ - UserProfileServiceAppName = $upa.Name - Ensure = $localEnsure - FarmAccount = $farmAccount - RunOnlyWhenWriteable = $params.RunOnlyWhenWriteable - InstallAccount = $params.InstallAccount - } - } - return $result -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $UserProfileServiceAppName, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $FarmAccount, - - [parameter(Mandatory = $false)] - [System.Boolean] - $RunOnlyWhenWriteable, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting user profile sync service for $UserProfileServiceAppName" - - $PSBoundParameters.Ensure = $Ensure - - if ((Get-SPDSCInstalledProductVersion).FileMajorPart -ne 15) - { - throw [Exception] ("Only SharePoint 2013 is supported to deploy the user profile sync " + ` - "service via DSC, as 2016 does not use the FIM based sync service.") - } - - if ($PSBoundParameters.ContainsKey("RunOnlyWhenWriteable") -eq $true) - { - $databaseReadOnly = Test-SPDscUserProfileDBReadOnly ` - -UserProfileServiceAppName $UserProfileServiceAppName ` - -InstallAccount $InstallAccount - - if ($databaseReadOnly) - { - Write-Verbose -Message ("User profile database is read only, setting user profile " + ` - "sync service to not run on the local server") - $PSBoundParameters.Ensure = "Absent" - } - else - { - $PSBoundParameters.Ensure = "Present" - } - } - - # Add the FarmAccount to the local Admins group, if it's not already there - $isLocalAdmin = Test-SPDSCUserIsLocalAdmin -UserName $FarmAccount.UserName - - if (!$isLocalAdmin) - { - Add-SPDSCUserToLocalAdmin -UserName $FarmAccount.UserName - - # Cycle the Timer Service so that it picks up the local Admin token - Restart-Service -Name "SPTimerV4" - } - - try - { - Invoke-SPDSCCommand -Credential $FarmAccount -Arguments $PSBoundParameters -ScriptBlock { - $params = $args[0] - - $currentServer = $env:COMPUTERNAME - - $syncServices = Get-SPServiceInstance -Server $currentServer ` - -ErrorAction SilentlyContinue - $syncService = $syncServices | Where-Object -FilterScript { - $_.GetType().Name -eq "UserProfileServiceInstance" - } - if ($null -eq $syncService) - { - $domain = (Get-CimInstance -ClassName Win32_ComputerSystem).Domain - $currentServer = "$currentServer.$domain" - $syncService = $syncServices | Where-Object -FilterScript { - $_.GetType().Name -eq "UserProfileServiceInstance" - } - } - if ($null -eq $syncService) - { - throw "Unable to locate a user profile service instance on $currentServer to start" - } - - # Start the Sync service if it should be running on this server - if (($params.Ensure -eq "Present") -and ($syncService.Status -ne "Online")) - { - $serviceApps = Get-SPServiceApplication -Name $params.UserProfileServiceAppName ` - -ErrorAction SilentlyContinue - if ($null -eq $serviceApps) { - throw [Exception] ("No user profile service was found " + ` - "named $($params.UserProfileServiceAppName)") - } - $ups = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Server.Administration.UserProfileApplication" - } - - $userName = $params.FarmAccount.UserName - $password = $params.FarmAccount.GetNetworkCredential().Password - $ups.SetSynchronizationMachine($currentServer, $syncService.ID, $userName, $password) - - Start-SPServiceInstance -Identity $syncService.ID - - $desiredState = "Online" - } - # Stop the Sync service in all other cases - else - { - Stop-SPServiceInstance -Identity $syncService.ID -Confirm:$false - $desiredState = "Disabled" - } - - $count = 0 - $maxCount = 10 - - while (($count -lt $maxCount) -and ($syncService.Status -ne $desiredState)) - { - if ($syncService.Status -ne $desiredState) - { - Start-Sleep -Seconds 60 - } - # Get the current status of the Sync service - Write-Verbose ("$([DateTime]::Now.ToShortTimeString()) - Waiting for user profile " + ` - "sync service to become '$desiredState' (waited $count of " + ` - "$maxCount minutes)") - $syncService = $syncServices | Where-Object -FilterScript { - $_.GetType().Name -eq "UserProfileServiceInstance" - } - $count++ - } - } - } - finally - { - # Remove the FarmAccount from the local Admins group, if it was added above - if (!$isLocalAdmin) - { - Remove-SPDSCUserToLocalAdmin -UserName $FarmAccount.UserName - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $UserProfileServiceAppName, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $FarmAccount, - - [parameter(Mandatory = $false)] - [System.Boolean] - $RunOnlyWhenWriteable, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing user profile sync service for $UserProfileServiceAppName" - - $PSBoundParameters.Ensure = $Ensure - - if ((Get-SPDSCInstalledProductVersion).FileMajorPart -ne 15) - { - throw [Exception] ("Only SharePoint 2013 is supported to deploy the user profile sync " + ` - "service via DSC, as 2016 does not use the FIM based sync service.") - } - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($PSBoundParameters.ContainsKey("RunOnlyWhenWriteable") -eq $true) - { - $databaseReadOnly = Test-SPDscUserProfileDBReadOnly ` - -UserProfileServiceAppName $UserProfileServiceAppName ` - -InstallAccount $InstallAccount - - if ($databaseReadOnly) - { - Write-Verbose -Message ("User profile database is read only, setting user profile " + ` - "sync service to not run on the local server") - $PSBoundParameters.Ensure = "Absent" - } - else - { - $PSBoundParameters.Ensure = "Present" - } - } - - Write-Verbose -Message "Testing for User Profile Synchronization Service" - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") -} - -function Test-SPDscUserProfileDBReadOnly() -{ - param( - [Parameter(Mandatory = $true)] - [String] - $UserProfileServiceAppName, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - $databaseReadOnly = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $UserProfileServiceAppName ` - -ScriptBlock { - $UserProfileServiceAppName = $args[0] - - $serviceApps = Get-SPServiceApplication -Name $UserProfileServiceAppName ` - -ErrorAction SilentlyContinue - if ($null -eq $serviceApps) - { - throw [Exception] ("No user profile service was found " + ` - "named $UserProfileServiceAppName") - } - $ups = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Server.Administration.UserProfileApplication" - } - - $propType = $ups.GetType() - $propData = $propType.GetProperties([System.Reflection.BindingFlags]::Instance -bor ` - [System.Reflection.BindingFlags]::NonPublic) - $profileProp = $propData | Where-Object -FilterScript { - $_.Name -eq "ProfileDatabase" - } - $profileDBName = $profileProp.GetValue($ups).Name - - $database = Get-SPDatabase | Where-Object -FilterScript { - $_.Name -eq $profileDBName - } - return $database.IsReadyOnly - } - return $databaseReadOnly -} - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/MSFT_SPUserProfileSyncService.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/MSFT_SPUserProfileSyncService.schema.mof deleted file mode 100644 index 68327b13..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/MSFT_SPUserProfileSyncService.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPUserProfileSyncService")] -class MSFT_SPUserProfileSyncService : OMI_BaseResource -{ - [Key, Description("The name of the user profile service for this sync instance")] string UserProfileServiceAppName; - [Write, Description("Present to ensure the service is running, absent to ensure it is not"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Required, Description("The farm account, which is needed to provision the service app"), EmbeddedInstance("MSFT_Credential")] String FarmAccount; - [Write, Description("Should the sync service only run when the user profile database is in a writeable state?")] Boolean RunOnlyWhenWriteable; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/MSFT_SPVisioServiceApp.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/MSFT_SPVisioServiceApp.psm1 deleted file mode 100644 index e0682617..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/MSFT_SPVisioServiceApp.psm1 +++ /dev/null @@ -1,210 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting Visio Graphics service app '$Name'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApps = Get-SPServiceApplication -Name $params.Name ` - -ErrorAction SilentlyContinue - $nullReturn = @{ - Name = $params.Name - ApplicationPool = $params.ApplicationPool - Ensure = "Absent" - } - if ($null -eq $serviceApps) - { - return $nullReturn - } - $serviceApp = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Visio.Server.Administration.VisioGraphicsServiceApplication" - } - - if ($null -eq $serviceApp) - { - return $nullReturn - } - else - { - return @{ - Name = $serviceApp.DisplayName - ApplicationPool = $serviceApp.ApplicationPool.Name - Ensure = "Present" - InstallAccount = $params.InstallAccount - } - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting Visio Graphics service app '$Name'" - - $result = Get-TargetResource @PSBoundParameters - - if ($result.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - Write-Verbose -Message "Creating Visio Graphics Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $visioApp = New-SPVisioServiceApplication -Name $params.Name ` - -ApplicationPool $params.ApplicationPool - if ($params.ContainsKey("ProxyName")) - { - $pName = $params.ProxyName - $params.Remove("ProxyName") | Out-Null - } - - if ($null -eq $pName) { - $pName = "$($params.Name) Proxy" - } - if ($null -ne $visioApp) - { - $visioProxy = New-SPVisioServiceApplicationProxy -Name $pName -ServiceApplication $params.Name - } - } - } - if ($result.Ensure -eq "Present" -and $Ensure -eq "Present") - { - if ($ApplicationPool -ne $result.ApplicationPool) - { - Write-Verbose -Message "Updating Visio Graphics Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $appPool = Get-SPServiceApplicationPool -Identity $params.ApplicationPool - - Get-SPServiceApplication -Name $params.Name ` - | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Visio.Server.Administration.VisioGraphicsServiceApplication" - } | Set-SPVisioServiceApplication -ServiceApplicationPool $appPool - } - } - } - - if ($Ensure -eq "Absent") - { - Write-Verbose -Message "Removing Visio service application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $app = Get-SPServiceApplication -Name $params.Name ` - | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Visio.Server.Administration.VisioGraphicsServiceApplication" - } - - $proxies = Get-SPServiceApplicationProxy - foreach($proxyInstance in $proxies) - { - if($app.IsConnected($proxyInstance)) - { - $proxyInstance.Delete() - } - } - - Remove-SPServiceApplication -Identity $app -Confirm:$false - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing Visio Graphics service app '$Name'" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("ApplicationPool", "Ensure") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/MSFT_SPVisioServiceApp.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/MSFT_SPVisioServiceApp.schema.mof deleted file mode 100644 index a6f71658..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/MSFT_SPVisioServiceApp.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPVisioServiceApp")] -class MSFT_SPVisioServiceApp : OMI_BaseResource -{ - [Key, Description("The name of the service application")] string Name; - [Required, Description("The name of the application pool to run the service app in")] string ApplicationPool; - [Write, Description("The name of the Visio Service Application Proxy")] string ProxyName; - [Write, Description("Present if the service app should exist, absent if it should not"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWeb/MSFT_SPWeb.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWeb/MSFT_SPWeb.psm1 deleted file mode 100644 index 0ae2dc4e..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWeb/MSFT_SPWeb.psm1 +++ /dev/null @@ -1,283 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String] - $Description, - - [parameter(Mandatory = $false)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.UInt32] - $Language, - - [parameter(Mandatory = $false)] - [System.String] - $Template, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UniquePermissions, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UseParentTopNav, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AddToQuickLaunch, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AddToTopNav, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting SPWeb '$Url'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $web = Get-SPWeb -Identity $params.Url -ErrorAction SilentlyContinue - - if ($web) - { - $ensureResult = "Present" - $templateResult = "$($web.WebTemplate)#$($web.WebTemplateId)" - $parentTopNav = $web.Navigation.UseShared - } - else - { - $ensureResult = "Absent" - } - - return @{ - Url = $web.Url - Ensure = $ensureResult - Description = $web.Description - Name = $web.Title - Language = $web.Language - Template = $templateResult - UniquePermissions = $web.HasUniquePerm - UseParentTopNav = $parentTopNav - } - } - - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String] - $Description, - - [parameter(Mandatory = $false)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.UInt32] - $Language, - - [parameter(Mandatory = $false)] - [System.String] - $Template, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UniquePermissions, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UseParentTopNav, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AddToQuickLaunch, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AddToTopNav, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting SPWeb '$Url'" - - $PSBoundParameters.Ensure = $Ensure - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - if ($null -eq $params.InstallAccount) - { - $currentUserName = "$env:USERDOMAIN\$env:USERNAME" - } - else - { - $currentUserName = $params.InstallAccount.UserName - } - - Write-Verbose "Grant user '$currentUserName' Access To Process Identity for '$($params.Url)'..." - $site = New-Object -Type Microsoft.SharePoint.SPSite -ArgumentList $params.Url - $site.WebApplication.GrantAccessToProcessIdentity($currentUserName) - - $web = Get-SPWeb -Identity $params.Url -ErrorAction SilentlyContinue - - if ($null -eq $web) - { - $params.Remove("InstallAccount") | Out-Null - $params.Remove("Ensure") | Out-Null - - New-SPWeb @params | Out-Null - } - else - { - if ($params.Ensure -eq "Absent") - { - Remove-SPweb $params.Url -confirm:$false - } - else - { - $changedWeb = $false - - if ($web.Title -ne $params.Name) - { - $web.Title = $params.Name - $changedWeb = $true - } - - if ($web.Description -ne $params.Description) - { - $web.Description = $params.Description - $changedWeb = $true - } - - if ($web.Navigation.UseShared -ne $params.UseParentTopNav) - { - $web.Navigation.UseShared = $params.UseParentTopNav - $changedWeb = $true - } - - if ($web.HasUniquePerm -ne $params.UniquePermissions) - { - $web.HasUniquePerm = $params.UniquePermissions - $changedWeb = $true - } - - if ($changedWeb) - { - $web.Update() - } - } - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String] - $Description, - - [parameter(Mandatory = $false)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.UInt32] - $Language, - - [parameter(Mandatory = $false)] - [System.String] - $Template, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UniquePermissions, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UseParentTopNav, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AddToQuickLaunch, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AddToTopNav, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing SPWeb '$Url'" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - $valuesToCheck = @("Url", - "Name", - "Description", - "UniquePermissions", - "UseParentTopNav", - "Ensure") - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck $valuesToCheck -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWeb/MSFT_SPWeb.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWeb/MSFT_SPWeb.schema.mof deleted file mode 100644 index 899a8449..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWeb/MSFT_SPWeb.schema.mof +++ /dev/null @@ -1,15 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPWeb")] -class MSFT_SPWeb : OMI_BaseResource -{ - [Key, Description("The URL of the web")] string Url; - [Write, Description("Present if the web should exist or Absent if it should be removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("The description to apply to the web")] string Description; - [Write, Description("The Name of the web")] string Name; - [Write, Description("The Lanhuage (LCID) of the web")] uint32 Language; - [Write, Description("The WebTemplate to use to create the web")] string Template; - [Write, Description("True if the web should have unique permissions, otherwise false.")] Boolean UniquePermissions; - [Write, Description("True if the web should use the parent nav bar, otherwise false.")] Boolean UseParentTopNav; - [Write, Description("True if the web should be in the quick launch of the parent web, otherwise false.")] Boolean AddToQuickLaunch; - [Write, Description("True if the web should be added to the top nav bar of the parent web, otherwise false.")] Boolean AddToTopNav; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/MSFT_SPWebAppBlockedFileTypes.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/MSFT_SPWebAppBlockedFileTypes.psm1 deleted file mode 100644 index b5e2d43c..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/MSFT_SPWebAppBlockedFileTypes.psm1 +++ /dev/null @@ -1,142 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [System.String[]] - $Blocked, - - [parameter(Mandatory = $false)] - [System.String[]] - $EnsureBlocked, - - [parameter(Mandatory = $false)] - [System.String[]] - $EnsureAllowed, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting web application '$url' blocked file types" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters,$PSScriptRoot) ` - -ScriptBlock { - $params = $args[0] - $ScriptRoot = $args[1] - - $wa = Get-SPWebApplication -Identity $params.Url -ErrorAction SilentlyContinue - if ($null -eq $wa) { return $null } - - $modulePath = "..\..\Modules\SharePointDsc.WebApplication\SPWebApplication.BlockedFileTypes.psm1" - Import-Module -Name (Join-Path -Path $ScriptRoot -ChildPath $modulePath -Resolve) - - $result = Get-SPDSCWebApplicationBlockedFileTypeConfig -WebApplication $wa - $result.Add("Url", $params.Url) - $result.Add("InstallAccount", $params.InstallAccount) - return $result - } - return $result -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [System.String[]] - $Blocked, - - [parameter(Mandatory = $false)] - [System.String[]] - $EnsureBlocked, - - [parameter(Mandatory = $false)] - [System.String[]] - $EnsureAllowed, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting web application '$Url' blocked file types" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters,$PSScriptRoot) ` - -ScriptBlock { - $params = $args[0] - $ScriptRoot = $args[1] - - $wa = Get-SPWebApplication -Identity $params.Url -ErrorAction SilentlyContinue - if ($null -eq $wa) { - throw "Web application $($params.Url) was not found" - return - } - - $modulePath = "..\..\Modules\SharePointDsc.WebApplication\SPWebApplication.BlockedFileTypes.psm1" - Import-Module -Name (Join-Path -Path $ScriptRoot -ChildPath $modulePath -Resolve) - - Set-SPDSCWebApplicationBlockedFileTypeConfig -WebApplication $wa -Settings $params - $wa.Update() - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [System.String[]] - $Blocked, - - [parameter(Mandatory = $false)] - [System.String[]] - $EnsureBlocked, - - [parameter(Mandatory = $false)] - [System.String[]] - $EnsureAllowed, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing for web application '$Url' blocked file types" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($null -eq $CurrentValues) - { - return $false - } - - $modulePath = "..\..\Modules\SharePointDsc.WebApplication\SPWebApplication.BlockedFileTypes.psm1" - Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath $modulePath -Resolve) - - return Test-SPDSCWebApplicationBlockedFileTypeConfig -CurrentSettings $CurrentValues ` - -DesiredSettings $PSBoundParameters -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/MSFT_SPWebAppBlockedFileTypes.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/MSFT_SPWebAppBlockedFileTypes.schema.mof deleted file mode 100644 index b2ecbd49..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/MSFT_SPWebAppBlockedFileTypes.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("SPWebAppBlockedFileTypes")] -class MSFT_SPWebAppBlockedFileTypes : OMI_BaseResource -{ - [Key, Description("The URL of the web application to set blocked file types for")] string Url; - [write, Description("This is a fixed list to use for blocked file types in this web app")] string Blocked[]; - [write, Description("This list of file types that will always be added to the list for this web app. Types not in this list will be left in the list")] string EnsureBlocked[]; - [write, Description("This list of file types that will always be removedfrom the list for this web app. Types not in this list will be left in the list")] string EnsureAllowed[]; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] string InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/MSFT_SPWebAppGeneralSettings.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/MSFT_SPWebAppGeneralSettings.psm1 deleted file mode 100644 index fdb8f667..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/MSFT_SPWebAppGeneralSettings.psm1 +++ /dev/null @@ -1,339 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [System.UInt32] - $TimeZone, - - [parameter(Mandatory = $false)] - [System.Boolean] - $Alerts, - - [parameter(Mandatory = $false)] - [System.UInt32] - $AlertsLimit, - - [parameter(Mandatory = $false)] - [System.Boolean] - $RSS, - - [parameter(Mandatory = $false)] - [System.Boolean] - $BlogAPI, - - [parameter(Mandatory = $false)] - [System.Boolean] - $BlogAPIAuthenticated, - - [parameter(Mandatory = $false)] - [ValidateSet("Strict","Permissive")] - [System.String] - $BrowserFileHandling, - - [parameter(Mandatory = $false)] - [System.Boolean] - $SecurityValidation, - - [parameter(Mandatory = $false)] - [System.Boolean] - $SecurityValidationExpires, - - [parameter(Mandatory = $false)] - [System.Uint32] - $SecurityValidationTimeoutMinutes, - - [parameter(Mandatory = $false)] - [System.Boolean] - $RecycleBinEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $RecycleBinCleanupEnabled, - - [parameter(Mandatory = $false)] - [System.UInt32] - $RecycleBinRetentionPeriod, - - [parameter(Mandatory = $false)] - [System.UInt32] - $SecondStageRecycleBinQuota, - - [parameter(Mandatory = $false)] - [System.UInt32] - $MaximumUploadSize, - - [parameter(Mandatory = $false)] - [System.Boolean] - $CustomerExperienceProgram, - - [parameter(Mandatory = $false)] - [System.Boolean] - $PresenceEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowOnlineWebPartCatalog, - - [parameter(Mandatory = $false)] - [System.Boolean] - $SelfServiceSiteCreationEnabled, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting web application '$url' general settings" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters,$PSScriptRoot) ` - -ScriptBlock { - $params = $args[0] - $ScriptRoot = $args[1] - - $wa = Get-SPWebApplication -Identity $params.Url -ErrorAction SilentlyContinue - if ($null -eq $wa) - { - return $null - } - - $modulePath = "..\..\Modules\SharePointDsc.WebApplication\SPWebApplication.GeneralSettings.psm1" - Import-Module -Name (Join-Path -Path $ScriptRoot -ChildPath $modulePath -Resolve) - - $result = Get-SPDSCWebApplicationGeneralConfig -WebApplication $wa - $result.Add("Url", $params.Url) - $result.Add("InstallAccount", $params.InstallAccount) - return $result - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [System.UInt32] - $TimeZone, - - [parameter(Mandatory = $false)] - [System.Boolean] - $Alerts, - - [parameter(Mandatory = $false)] - [System.UInt32] - $AlertsLimit, - - [parameter(Mandatory = $false)] - [System.Boolean] - $RSS, - - [parameter(Mandatory = $false)] - [System.Boolean] - $BlogAPI, - - [parameter(Mandatory = $false)] - [System.Boolean] - $BlogAPIAuthenticated, - - [parameter(Mandatory = $false)] - [ValidateSet("Strict","Permissive")] - [System.String] - $BrowserFileHandling, - - [parameter(Mandatory = $false)] - [System.Boolean] - $SecurityValidation, - - [parameter(Mandatory = $false)] - [System.Boolean] - $SecurityValidationExpires, - - [parameter(Mandatory = $false)] - [System.Uint32] - $SecurityValidationTimeoutMinutes, - - [parameter(Mandatory = $false)] - [System.Boolean] - $RecycleBinEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $RecycleBinCleanupEnabled, - - [parameter(Mandatory = $false)] - [System.UInt32] - $RecycleBinRetentionPeriod, - - [parameter(Mandatory = $false)] - [System.UInt32] - $SecondStageRecycleBinQuota, - - [parameter(Mandatory = $false)] - [System.UInt32] - $MaximumUploadSize, - - [parameter(Mandatory = $false)] - [System.Boolean] - $CustomerExperienceProgram, - - [parameter(Mandatory = $false)] - [System.Boolean] - $PresenceEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowOnlineWebPartCatalog, - - [parameter(Mandatory = $false)] - [System.Boolean] - $SelfServiceSiteCreationEnabled, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting web application '$url' general settings" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters,$PSScriptRoot) ` - -ScriptBlock { - $params = $args[0] - $ScriptRoot = $args[1] - - $wa = Get-SPWebApplication -Identity $params.Url -ErrorAction SilentlyContinue - if ($null -eq $wa) - { - throw "Web application $($params.Url) was not found" - return - } - - $modulePath = "..\..\Modules\SharePointDsc.WebApplication\SPWebApplication.GeneralSettings.psm1" - Import-Module -Name (Join-Path -Path $ScriptRoot -ChildPath $modulePath -Resolve) - - Set-SPDSCWebApplicationGeneralConfig -WebApplication $wa -Settings $params - $wa.Update() - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [System.UInt32] - $TimeZone, - - [parameter(Mandatory = $false)] - [System.Boolean] - $Alerts, - - [parameter(Mandatory = $false)] - [System.UInt32] - $AlertsLimit, - - [parameter(Mandatory = $false)] - [System.Boolean] - $RSS, - - [parameter(Mandatory = $false)] - [System.Boolean] - $BlogAPI, - - [parameter(Mandatory = $false)] - [System.Boolean] - $BlogAPIAuthenticated, - - [parameter(Mandatory = $false)] - [ValidateSet("Strict","Permissive")] - [System.String] - $BrowserFileHandling, - - [parameter(Mandatory = $false)] - [System.Boolean] - $SecurityValidation, - - [parameter(Mandatory = $false)] - [System.Boolean] - $SecurityValidationExpires, - - [parameter(Mandatory = $false)] - [System.Uint32] - $SecurityValidationTimeoutMinutes, - - [parameter(Mandatory = $false)] - [System.Boolean] - $RecycleBinEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $RecycleBinCleanupEnabled, - - [parameter(Mandatory = $false)] - [System.UInt32] - $RecycleBinRetentionPeriod, - - [parameter(Mandatory = $false)] - [System.UInt32] - $SecondStageRecycleBinQuota, - - [parameter(Mandatory = $false)] - [System.UInt32] - $MaximumUploadSize, - - [parameter(Mandatory = $false)] - [System.Boolean] - $CustomerExperienceProgram, - - [parameter(Mandatory = $false)] - [System.Boolean] - $PresenceEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowOnlineWebPartCatalog, - - [parameter(Mandatory = $false)] - [System.Boolean] - $SelfServiceSiteCreationEnabled, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing web application '$url' general settings" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($null -eq $CurrentValues) - { - return $false - } - - $modulePath = "..\..\Modules\SharePointDsc.WebApplication\SPWebApplication.GeneralSettings.psm1" - Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath $modulePath -Resolve) - - return Test-SPDSCWebApplicationGeneralConfig -CurrentSettings $CurrentValues -DesiredSettings $PSBoundParameters -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/MSFT_SPWebAppGeneralSettings.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/MSFT_SPWebAppGeneralSettings.schema.mof deleted file mode 100644 index 0a93b4cd..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/MSFT_SPWebAppGeneralSettings.schema.mof +++ /dev/null @@ -1,25 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("SPWebAppGeneralSettings")] -class MSFT_SPWebAppGeneralSettings : OMI_BaseResource -{ - [Key, Description("The URL of the web app to set the general settings for")] string Url; - [Write, Description("The timezone code to use for this web app. A full list is at https://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.spregionalsettings.timezones.aspx")] uint32 TimeZone; - [Write, Description("Should alerts be enabled for this web app")] boolean Alerts; - [Write, Description("What is the maximum number of alerts that a user can create in this web app")] uint32 AlertsLimit; - [Write, Description("Should RSS feeds be enabled in this web app")] boolean RSS; - [Write, Description("Should the Blog API be enabled in this web app")] boolean BlogAPI; - [Write, Description("Is authentication required for the blog API")] boolean BlogAPIAuthenticated; - [Write, Description("What file handling mode should be used in this web app - strict or permissive"), ValueMap{"Strict","Permissive"}, Values{"Strict","Permissive"}] String BrowserFileHandling; - [Write, Description("Is security validation enforced in this web app")] boolean SecurityValidation; - [Write, Description("Does security validation expire after a set time")] boolean SecurityValidationExpires; - [Write, Description("Number of minutes security validation will expire if securityvalidationexpires is set")] uint32 SecurityValidationTimeOutMinutes; - [Write, Description("Is the recycle bin enabled in this web application")] boolean RecycleBinEnabled; - [Write, Description("Is automatic cleanup of the recycle bin enabled in this web app")] boolean RecycleBinCleanupEnabled; - [Write, Description("How many days does the recycle bin keep content for")] uint32 RecycleBinRetentionPeriod; - [Write, Description("How much content does the second stage recycle bin keep content for")] uint32 SecondStageRecycleBinQuota; - [Write, Description("What is the maximum file upload size for this web app (in MB)")] uint32 MaximumUploadSize; - [Write, Description("Should the customer experience program be enabled in this web app")] boolean CustomerExperienceProgram; - [Write, Description("Should the Online WebPart Gallery be enabled for this web app")] boolean AllowOnlineWebPartCatalog; - [Write, Description("Should Self Service Site Creation be enabled")] boolean SelfServiceSiteCreationEnabled; - [Write, Description("Is Skype for Business presence enabled for this web app")] boolean PresenceEnabled; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] string InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/MSFT_SPWebAppPermissions.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/MSFT_SPWebAppPermissions.psm1 deleted file mode 100644 index 529ebcd5..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/MSFT_SPWebAppPermissions.psm1 +++ /dev/null @@ -1,732 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $false)] - [ValidateSet("Manage Lists", "Override List Behaviors", "Add Items", "Edit Items", - "Delete Items", "View Items", "Approve Items", "Open Items", - "View Versions", "Delete Versions", "Create Alerts", - "View Application Pages")] - [System.String[]] - $ListPermissions, - - [parameter(Mandatory = $false)] - [ValidateSet("Manage Permissions", "View Web Analytics Data", "Create Subsites", - "Manage Web Site", "Add and Customize Pages", "Apply Themes and Borders", - "Apply Style Sheets", "Create Groups", "Browse Directories", - "Use Self-Service Site Creation", "View Pages", "Enumerate Permissions", - "Browse User Information", "Manage Alerts", "Use Remote Interfaces", - "Use Client Integration Features", "Open", "Edit Personal User Information")] - [System.String[]] - $SitePermissions, - - [parameter(Mandatory = $false)] - [ValidateSet("Manage Personal Views", "Add/Remove Personal Web Parts", - "Update Personal Web Parts")] - [System.String[]] - $PersonalPermissions, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllPermissions, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting permissions for Web Application '$WebAppUrl'" - - Test-SPDSCInput @PSBoundParameters - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $wa = Get-SPWebApplication -Identity $params.WebAppUrl -ErrorAction SilentlyContinue - - if ($null -eq $wa) - { - throw "The specified web application could not be found." - } - - if ($wa.RightsMask -eq [Microsoft.SharePoint.SPBasePermissions]::FullMask) - { - $returnval = @{ - WebAppUrl = $params.WebAppUrl - AllPermissions = $true - } - } - else - { - $ListPermissions = @() - $SitePermissions = @() - $PersonalPermissions = @() - - $rightsmask = ($wa.RightsMask -split ",").trim() - foreach ($rightmask in $rightsmask) - { - switch ($rightmask) - { - "ManageLists" { - $ListPermissions += "Manage Lists" - } - "CancelCheckout" { - $ListPermissions += "Override List Behaviors" - } - "AddListItems" { - $ListPermissions += "Add Items" - } - "EditListItems" { - $ListPermissions += "Edit Items" - } - "DeleteListItems" { - $ListPermissions += "Delete Items" - } - "ViewListItems" { - $ListPermissions += "View Items" - } - "ApproveItems" { - $ListPermissions += "Approve Items" - } - "OpenItems" { - $ListPermissions += "Open Items" - } - "ViewVersions" { - $ListPermissions += "View Versions" - } - "DeleteVersions" { - $ListPermissions += "Delete Versions" - } - "CreateAlerts" { - $ListPermissions += "Create Alerts" - } - "ViewFormPages" { - $ListPermissions += "View Application Pages" - } - - "ManagePermissions" { - $SitePermissions += "Manage Permissions" - } - "ViewUsageData" { - $SitePermissions += "View Web Analytics Data" - } - "ManageSubwebs" { - $SitePermissions += "Create Subsites" - } - "ManageWeb" { - $SitePermissions += "Manage Web Site" - } - "AddAndCustomizePages" { - $SitePermissions += "Add and Customize Pages" - } - "ApplyThemeAndBorder" { - $SitePermissions += "Apply Themes and Borders" - } - "ApplyStyleSheets" { - $SitePermissions += "Apply Style Sheets" - } - "CreateGroups" { - $SitePermissions += "Create Groups" - } - "BrowseDirectories" { - $SitePermissions += "Browse Directories" - } - "CreateSSCSite" { - $SitePermissions += "Use Self-Service Site Creation" - } - "ViewPages" { - $SitePermissions += "View Pages" - } - "EnumeratePermissions" { - $SitePermissions += "Enumerate Permissions" - } - "BrowseUserInfo" { - $SitePermissions += "Browse User Information" - } - "ManageAlerts" { - $SitePermissions += "Manage Alerts" - } - "UseRemoteAPIs" { - $SitePermissions += "Use Remote Interfaces" - } - "UseClientIntegration" { - $SitePermissions += "Use Client Integration Features" - } - "Open" { - $SitePermissions += "Open" - } - "EditMyUserInfo" { - $SitePermissions += "Edit Personal User Information" - } - - "ManagePersonalViews" { - $PersonalPermissions += "Manage Personal Views" - } - "AddDelPrivateWebParts" { - $PersonalPermissions += "Add/Remove Personal Web Parts" - } - "UpdatePersonalWebParts" { - $PersonalPermissions += "Update Personal Web Parts" - } - } - } - - $returnval = @{ - WebAppUrl = $params.WebAppUrl - ListPermissions = $ListPermissions - SitePermissions = $SitePermissions - PersonalPermissions = $PersonalPermissions - } - } - return $returnval - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $false)] - [ValidateSet("Manage Lists", "Override List Behaviors", "Add Items", "Edit Items", - "Delete Items", "View Items", "Approve Items", "Open Items", - "View Versions", "Delete Versions", "Create Alerts", - "View Application Pages")] - [System.String[]] - $ListPermissions, - - [parameter(Mandatory = $false)] - [ValidateSet("Manage Permissions", "View Web Analytics Data", "Create Subsites", - "Manage Web Site", "Add and Customize Pages", "Apply Themes and Borders", - "Apply Style Sheets", "Create Groups", "Browse Directories", - "Use Self-Service Site Creation", "View Pages", "Enumerate Permissions", - "Browse User Information", "Manage Alerts", "Use Remote Interfaces", - "Use Client Integration Features", "Open", "Edit Personal User Information")] - [System.String[]] - $SitePermissions, - - [parameter(Mandatory = $false)] - [ValidateSet("Manage Personal Views", "Add/Remove Personal Web Parts", - "Update Personal Web Parts")] - [System.String[]] - $PersonalPermissions, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllPermissions, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting permissions for Web Application '$WebAppUrl'" - - Test-SPDSCInput @PSBoundParameters - - $result = Get-TargetResource @PSBoundParameters - - if ($AllPermissions) { - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $wa = Get-SPWebApplication -Identity $params.WebAppUrl ` - -ErrorAction SilentlyContinue - - if ($null -eq $wa) - { - throw "The specified web application could not be found." - } - - $wa.RightsMask = [Microsoft.SharePoint.SPBasePermissions]::FullMask - $wa.Update() - } - } - else - { - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $wa = Get-SPWebApplication -Identity $params.WebAppUrl ` - -ErrorAction SilentlyContinue - - if ($null -eq $wa) - { - throw "The specified web application could not be found." - } - - $newMask = [Microsoft.SharePoint.SPBasePermissions]::EmptyMask - foreach ($lp in $params.ListPermissions) - { - switch ($lp) - { - "Manage Lists" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::ManageLists - } - "Override List Behaviors" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::CancelCheckout - } - "Add Items" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::AddListItems - } - "Edit Items" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::EditListItems - } - "Delete Items" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::DeleteListItems - } - "View Items" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::ViewListItems - } - "Approve Items" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::ApproveItems - } - "Open Items" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::OpenItems - } - "View Versions" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::ViewVersions - } - "Delete Versions" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::DeleteVersions - } - "Create Alerts" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::CreateAlerts - } - "View Application Pages" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::ViewFormPages - } - } - } - - foreach ($sp in $params.SitePermissions) - { - switch ($sp) - { - "Manage Permissions" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::ManagePermissions - } - "View Web Analytics Data" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::ViewUsageData - } - "Create Subsites" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::ManageSubwebs - } - "Manage Web Site" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::ManageWeb - } - "Add and Customize Pages" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::AddAndCustomizePages - } - "Apply Themes and Borders" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::ApplyThemeAndBorder - } - "Apply Style Sheets" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::ApplyStyleSheets - } - "Create Groups" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::CreateGroups - } - "Browse Directories" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::BrowseDirectories - } - "Use Self-Service Site Creation" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::CreateSSCSite - } - "View Pages" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::ViewPages - } - "Enumerate Permissions" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::EnumeratePermissions - } - "Browse User Information" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::BrowseUserInfo - } - "Manage Alerts" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::ManageAlerts - } - "Use Remote Interfaces" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::UseRemoteAPIs - } - "Use Client Integration Features" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::UseClientIntegration - } - "Open" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::Open - } - "Edit Personal User Information" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::EditMyUserInfo - } - } - } - - foreach ($pp in $params.PersonalPermissions) - { - switch ($pp) - { - "Manage Personal Views" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::ManagePersonalViews - } - "Add/Remove Personal Web Parts" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::AddDelPrivateWebParts - } - "Update Personal Web Parts" { - $newMask = $newMask -bor [Microsoft.SharePoint.SPBasePermissions]::UpdatePersonalWebParts - } - } - } - $wa.RightsMask = $newMask - $wa.Update() - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $false)] - [ValidateSet("Manage Lists", "Override List Behaviors", "Add Items", "Edit Items", - "Delete Items", "View Items", "Approve Items", "Open Items", - "View Versions", "Delete Versions", "Create Alerts", - "View Application Pages")] - [System.String[]] - $ListPermissions, - - [parameter(Mandatory = $false)] - [ValidateSet("Manage Permissions", "View Web Analytics Data", "Create Subsites", - "Manage Web Site", "Add and Customize Pages", "Apply Themes and Borders", - "Apply Style Sheets", "Create Groups", "Browse Directories", - "Use Self-Service Site Creation", "View Pages", "Enumerate Permissions", - "Browse User Information", "Manage Alerts", "Use Remote Interfaces", - "Use Client Integration Features", "Open", "Edit Personal User Information")] - [System.String[]] - $SitePermissions, - - [parameter(Mandatory = $false)] - [ValidateSet("Manage Personal Views", "Add/Remove Personal Web Parts", - "Update Personal Web Parts")] - [System.String[]] - $PersonalPermissions, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllPermissions, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing permissions for Web Application '$WebAppUrl'" - - Test-SPDSCInput @PSBoundParameters - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($AllPermissions -eq $true) - { - if ($CurrentValues.ContainsKey("AllPermissions")) - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("AllPermissions") - } - else - { - return $false - } - } - else - { - if ($CurrentValues.ContainsKey("AllPermissions")) - { - return $false - } - else - { - if ($null -ne (Compare-Object -ReferenceObject $ListPermissions ` - -DifferenceObject $CurrentValues.ListPermissions)) - { - return $false - } - if ($null -ne (Compare-Object -ReferenceObject $SitePermissions ` - -DifferenceObject $CurrentValues.SitePermissions)) - { - return $false - } - if ($null -ne (Compare-Object -ReferenceObject $PersonalPermissions ` - -DifferenceObject $CurrentValues.PersonalPermissions)) - { - return $false - } - return $true - } - } -} - -function Test-SPDSCInput() -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $false)] - [ValidateSet("Manage Lists", "Override List Behaviors", "Add Items", "Edit Items", - "Delete Items", "View Items", "Approve Items", "Open Items", - "View Versions", "Delete Versions", "Create Alerts", - "View Application Pages")] - [System.String[]] - $ListPermissions, - - [parameter(Mandatory = $false)] - [ValidateSet("Manage Permissions", "View Web Analytics Data", "Create Subsites", - "Manage Web Site", "Add and Customize Pages", "Apply Themes and Borders", - "Apply Style Sheets", "Create Groups", "Browse Directories", - "Use Self-Service Site Creation", "View Pages", "Enumerate Permissions", - "Browse User Information", "Manage Alerts", "Use Remote Interfaces", - "Use Client Integration Features", "Open", "Edit Personal User Information")] - [System.String[]] - $SitePermissions, - - [parameter(Mandatory = $false)] - [ValidateSet("Manage Personal Views", "Add/Remove Personal Web Parts", - "Update Personal Web Parts")] - [System.String[]] - $PersonalPermissions, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllPermissions, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - if ($AllPermissions) - { - # AllPermissions parameter specified with and one of the other parameters - if ($ListPermissions -or $SitePermissions -or $PersonalPermissions) - { - throw ("Do not specify parameters ListPermissions, SitePermissions " + ` - "or PersonalPermissions when specifying parameter AllPermissions") - } - } - else - { - # You have to specify all three parameters - if (-not ($ListPermissions -and $SitePermissions -and $PersonalPermissions)) - { - throw ("One of the parameters ListPermissions, SitePermissions or " + ` - "PersonalPermissions is missing") - } - } - - #Checks - if ($ListPermissions -contains "Approve Items" -and -not ($ListPermissions -contains "Edit Items")) - { - throw "Edit Items is required when specifying Approve Items" - } - - if (($ListPermissions -contains "Manage Lists" ` - -or $ListPermissions -contains "Override List Behaviors" ` - -or $ListPermissions -contains "Add Items" ` - -or $ListPermissions -contains "Edit Items" ` - -or $ListPermissions -contains "Delete Items" ` - -or $ListPermissions -contains "Approve Items" ` - -or $ListPermissions -contains "Open Items" ` - -or $ListPermissions -contains "View Versions" ` - -or $ListPermissions -contains "Delete Versions" ` - -or $ListPermissions -contains "Create Alerts" ` - -or $SitePermissions -contains "Manage Permissions" ` - -or $SitePermissions -contains "Manage Web Site" ` - -or $SitePermissions -contains "Add and Customize Pages" ` - -or $SitePermissions -contains "Manage Alerts" ` - -or $SitePermissions -contains "Use Client Integration Features" ` - -or $PersonalPermissions -contains "Manage Personal Views" ` - -or $PersonalPermissions -contains "Add/Remove Personal Web Parts" ` - -or $PersonalPermissions -contains "Update Personal Web Parts") ` - -and -not ($ListPermissions -contains "View Items")) - { - throw ("View Items is required when specifying Manage Lists, Override List Behaviors, " + ` - "Add Items, Edit Items, Delete Items, Approve Items, Open Items, View " + ` - "Versions, Delete Versions, Create Alerts, Manage Permissions, Manage Web Site, " + ` - "Add and Customize Pages, Manage Alerts, Use Client Integration Features, " + ` - "Manage Personal Views, Add/Remove Personal Web Parts or Update Personal Web Parts") - } - - if (($ListPermissions -contains "View Versions" ` - -or $SitePermissions -contains "Manage Permissions") ` - -and -not ($ListPermissions -contains "Open Items")) - { - throw "Open Items is required when specifying View Versions or Manage Permissions" - } - - if (($ListPermissions -contains "Delete Versions" ` - -or $SitePermissions -contains "Manage Permissions") ` - -and -not ($ListPermissions -contains "View Versions")) - { - throw "View Versions is required when specifying Delete Versions or Manage Permissions" - } - - if ($SitePermissions -contains "Manage Alerts" ` - -and -not ($ListPermissions -contains "Create Alerts")) - { - throw "Create Alerts is required when specifying Manage Alerts" - } - - if ($SitePermissions -contains "Manage Web Site" ` - -and -not ($SitePermissions -contains "Add and Customize Pages")) - { - throw "Add and Customize Pages is required when specifying Manage Web Site" - } - - if (($SitePermissions -contains "Manage Permissions" ` - -or $SitePermissions -contains "Manage Web Site" ` - -or $SitePermissions -contains "Add and Customize Pages" ` - -or $SitePermissions -contains "Enumerate Permissions") ` - -and -not ($SitePermissions -contains "Browse Directories")) - { - throw ("Browse Directories is required when specifying Manage Permissions, Manage Web " + ` - "Site, Add and Customize Pages or Enumerate Permissions") - } - - if (($ListPermissions -contains "Manage Lists" ` - -or $ListPermissions -contains "Override List Behaviors" ` - -or $ListPermissions -contains "Add Items" ` - -or $ListPermissions -contains "Edit Items" ` - -or $ListPermissions -contains "Delete Items" ` - -or $ListPermissions -contains "View Items" ` - -or $ListPermissions -contains "Approve Items" ` - -or $ListPermissions -contains "Open Items" ` - -or $ListPermissions -contains "View Versions" ` - -or $ListPermissions -contains "Delete Versions" ` - -or $ListPermissions -contains "Create Alerts" ` - -or $SitePermissions -contains "Manage Permissions" ` - -or $SitePermissions -contains "View Web Analytics Data" ` - -or $SitePermissions -contains "Create Subsites" ` - -or $SitePermissions -contains "Manage Web Site" ` - -or $SitePermissions -contains "Add and Customize Pages" ` - -or $SitePermissions -contains "Apply Themes and Borders" ` - -or $SitePermissions -contains "Apply Style Sheets" ` - -or $SitePermissions -contains "Create Groups" ` - -or $SitePermissions -contains "Browse Directories" ` - -or $SitePermissions -contains "Use Self-Service Site Creation" ` - -or $SitePermissions -contains "Enumerate Permissions" ` - -or $SitePermissions -contains "Manage Alerts" ` - -or $PersonalPermissions -contains "Manage Personal Views" ` - -or $PersonalPermissions -contains "Add/Remove Personal Web Parts" ` - -or $PersonalPermissions -contains "Update Personal Web Parts") ` - -and -not ($SitePermissions -contains "View Pages")) - { - throw ("View Pages is required when specifying Manage Lists, Override List Behaviors, " + ` - "Add Items, Edit Items, Delete Items, View Items, Approve Items, Open Items, " + ` - "View Versions, Delete Versions, Create Alerts, Manage Permissions, View Web " + ` - "Analytics Data, Create Subsites, Manage Web Site, Add and Customize Pages, " + ` - "Apply Themes and Borders, Apply Style Sheets, Create Groups, Browse " + ` - "Directories, Use Self-Service Site Creation, Enumerate Permissions, Manage " + ` - "Alerts, Manage Personal Views, Add/Remove Personal Web Parts or Update " + ` - "Personal Web Parts") - } - - if (($SitePermissions -contains "Manage Permissions" ` - -or $SitePermissions -contains "Manage Web Site") ` - -and -not ($SitePermissions -contains "Enumerate Permissions")) - { - throw ("Enumerate Permissions is required when specifying Manage Permissions or " + ` - "Manage Web Site") - } - - if (($SitePermissions -contains "Manage Permissions" ` - -or $SitePermissions -contains "Create Subsites" ` - -or $SitePermissions -contains "Manage Web Site" ` - -or $SitePermissions -contains "Create Groups" ` - -or $SitePermissions -contains "Use Self-Service Site Creation" ` - -or $SitePermissions -contains "Enumerate Permissions" ` - -or $SitePermissions -contains "Edit Personal User Information") ` - -and -not ($SitePermissions -contains "Browse User Information")) - { - throw ("Browse User Information is required when specifying Manage Permissions, " + ` - "Create Subsites, Manage Web Site, Create Groups, Use Self-Service Site " + ` - "Creation, Enumerate Permissions or Edit Personal User Information") - } - - if ($SitePermissions -contains "Use Client Integration Features" ` - -and -not ($SitePermissions -contains "Use Remote Interfaces")) - { - throw "Use Remote Interfaces is required when specifying Use Client Integration Features" - } - - if (($ListPermissions -contains "Manage Lists" ` - -or $ListPermissions -contains "Override List Behaviors" ` - -or $ListPermissions -contains "Add Items" ` - -or $ListPermissions -contains "Edit Items" ` - -or $ListPermissions -contains "Delete Items" ` - -or $ListPermissions -contains "View Items" ` - -or $ListPermissions -contains "Approve Items" ` - -or $ListPermissions -contains "Open Items" ` - -or $ListPermissions -contains "View Versions" ` - -or $ListPermissions -contains "Delete Versions" ` - -or $ListPermissions -contains "Create Alerts" ` - -or $ListPermissions -contains "View Application Pages" ` - -or $SitePermissions -contains "Manage Permissions" ` - -or $SitePermissions -contains "View Web Analytics Data" ` - -or $SitePermissions -contains "Create Subsites" ` - -or $SitePermissions -contains "Manage Web Site" ` - -or $SitePermissions -contains "Add and Customize Pages" ` - -or $SitePermissions -contains "Apply Themes and Borders" ` - -or $SitePermissions -contains "Apply Style Sheets" ` - -or $SitePermissions -contains "Create Groups" ` - -or $SitePermissions -contains "Browse Directories" ` - -or $SitePermissions -contains "Use Self-Service Site Creation" ` - -or $SitePermissions -contains "View Pages" ` - -or $SitePermissions -contains "Enumerate Permissions" ` - -or $SitePermissions -contains "Browse User Information" ` - -or $SitePermissions -contains "Manage Alerts" ` - -or $SitePermissions -contains "Use Remote Interfaces" ` - -or $SitePermissions -contains "Use Client Integration Features" ` - -or $SitePermissions -contains "Edit Personal User Information" ` - -or $PersonalPermissions -contains "Manage Personal Views" ` - -or $PersonalPermissions -contains "Add/Remove Personal Web Parts" ` - -or $PersonalPermissions -contains "Update Personal Web Parts") ` - -and -not ($SitePermissions -contains "Open")) - { - throw "Open is required when specifying any of the other permissions" - } - - if ($PersonalPermissions -contains "Add/Remove Personal Web Parts" ` - -and -not ($PersonalPermissions -contains "Update Personal Web Parts")) - { - throw "Update Personal Web Parts is required when specifying Add/Remove Personal Web Parts" - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/MSFT_SPWebAppPermissions.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/MSFT_SPWebAppPermissions.schema.mof deleted file mode 100644 index 98e8979a..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/MSFT_SPWebAppPermissions.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPWebAppPermissions")] -class MSFT_SPWebAppPermissions : OMI_BaseResource -{ - [Key, Description("The url of the web application")] string WebAppUrl; - [Write, Description("List permissions that need to be configured"), ValueMap{"Manage Lists","Override List Behaviors","Add Items","Edit Items","Delete Items","View Items","Approve Items","Open Items","View Versions","Delete Versions","Create Alerts","View Application Pages"}, Values{"Manage Lists","Override List Behaviors","Add Items","Edit Items","Delete Items","View Items","Approve Items","Open Items","View Versions","Delete Versions","Create Alerts","View Application Pages"}] string ListPermissions[]; - [Write, Description("Site permissions that need to be configured"), ValueMap{"Manage Permissions","View Web Analytics Data","Create Subsites","Manage Web Site","Add and Customize Pages","Apply Themes and Borders","Apply Style Sheets","Create Groups","Browse Directories","Use Self-Service Site Creation","View Pages","Enumerate Permissions","Browse User Information","Manage Alerts","Use Remote Interfaces","Use Client Integration Features","Open","Edit Personal User Information"}, Values{"Manage Permissions","View Web Analytics Data","Create Subsites","Manage Web Site","Add and Customize Pages","Apply Themes and Borders","Apply Style Sheets","Create Groups","Browse Directories","Use Self-Service Site Creation","View Pages","Enumerate Permissions","Browse User Information","Manage Alerts","Use Remote Interfaces","Use Client Integration Features","Open","Edit Personal User Information"}] string SitePermissions[]; - [Write, Description("Personal permissions that need to be configured"), ValueMap{"Manage Personal Views","Add/Remove Personal Web Parts","Update Personal Web Parts"}, Values{"Manage Personal Views","Add/Remove Personal Web Parts","Update Personal Web Parts"}] string PersonalPermissions[]; - [Write, Description("Set all permissions")] boolean AllPermissions; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/MSFT_SPWebAppPolicy.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/MSFT_SPWebAppPolicy.psm1 deleted file mode 100644 index 9b43fa6e..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/MSFT_SPWebAppPolicy.psm1 +++ /dev/null @@ -1,823 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $Members, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $MembersToInclude, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $MembersToExclude, - - [parameter(Mandatory = $false)] - [System.Boolean] - $SetCacheAccountsPolicy, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting web app policy for $WebAppUrl" - - if ($Members -and (($MembersToInclude) -or ($MembersToExclude))) - { - Write-Verbose -Message ("Cannot use the Members parameter together with " + ` - "the MembersToInclude or MembersToExclude parameters") - return $null - } - - if (!$Members -and !$MembersToInclude -and !$MembersToExclude) - { - Write-Verbose -Message ("At least one of the following parameters must be specified: " + ` - "Members, MembersToInclude, MembersToExclude") - return $null - } - - foreach ($member in $Members) - { - if (($member.ActAsSystemAccount -eq $true) ` - -and ($member.PermissionLevel -ne "Full Control")) - { - Write-Verbose -Message ("Members Parameter: You cannot specify ActAsSystemAccount " + ` - "with any other permission than Full Control") - return $null - } - } - - foreach ($member in $MembersToInclude) - { - if (($member.ActAsSystemAccount -eq $true) ` - -and ($member.PermissionLevel -ne "Full Control")) - { - Write-Verbose -Message ("MembersToInclude Parameter: You cannot specify " + ` - "ActAsSystemAccount with any other permission than Full " + ` - "Control") - return $null - } - } - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $wa = Get-SPWebApplication -Identity $params.WebAppUrl ` - -ErrorAction SilentlyContinue - - if ($null -eq $wa) - { - return $null - } - - $SetCacheAccountsPolicy = $false - if ($params.SetCacheAccountsPolicy) - { - if (($wa.Properties.ContainsKey("portalsuperuseraccount") -eq $true) -and ` - ($wa.Properties.ContainsKey("portalsuperreaderaccount") -eq $true)) - { - - $correctPSU = $false - $correctPSR = $false - - $psu = $wa.Policies[$wa.Properties["portalsuperuseraccount"]] - if ($null -ne $psu) - { - if ($psu.PolicyRoleBindings.Type -eq 'FullControl') - { - $correctPSU = $true - } - } - - $psr = $wa.Policies[$wa.Properties["portalsuperreaderaccount"]] - if ($null -ne $psr) - { - if ($psr.PolicyRoleBindings.Type -eq 'FullRead') - { - $correctPSR = $true - } - } - - if ($correctPSU -eq $true -and $correctPSR -eq $true) - { - $SetCacheAccountsPolicy = $true - } - } - } - - $members = @() - foreach ($policy in $wa.Policies) - { - $member = @{} - $memberName = $policy.UserName - $identityType = "Native" - if ($memberName -like "i:*|*" -or $memberName -like "c:*|*") - { - $identityType = "Claims" - $convertedClaim = New-SPClaimsPrincipal -Identity $memberName ` - -IdentityType EncodedClaim ` - -ErrorAction SilentlyContinue - if ($null -ne $convertedClaim) - { - $memberName = $convertedClaim.Value - } - } - - if ($memberName -match "^s-1-[0-59]-\d+-\d+-\d+-\d+-\d+") - { - $memberName = Resolve-SPDscSecurityIdentifier -SID $memberName - } - - switch ($policy.PolicyRoleBindings.Type) - { - 'DenyAll' - { - $memberPermissionlevel = 'Deny All' - } - 'DenyWrite' - { - $memberPermissionlevel = 'Deny Write' - } - 'FullControl' - { - $memberPermissionlevel = 'Full Control' - } - 'FullRead' - { - $memberPermissionlevel = 'Full Read' - } - } - - $member.Username = $memberName - $member.PermissionLevel = $memberPermissionlevel - $member.ActAsSystemAccount = $policy.IsSystemUser - $member.IdentityType = $identityType - $members += $member - } - - $returnval = @{ - WebAppUrl = $params.WebAppUrl - Members = $members - MembersToInclude = $params.MembersToInclude - MembersToExclude = $params.MembersToExclude - SetCacheAccountsPolicy = $SetCacheAccountsPolicy - InstallAccount = $params.InstallAccount - } - - return $returnval - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $Members, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $MembersToInclude, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $MembersToExclude, - - [parameter(Mandatory = $false)] - [System.Boolean] - $SetCacheAccountsPolicy, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting web app policy for $WebAppUrl" - - if ($Members -and (($MembersToInclude) -or ($MembersToExclude))) - { - throw ("Cannot use the Members parameter together with the " + ` - "MembersToInclude or MembersToExclude parameters") - } - - if (!$Members -and !$MembersToInclude -and !$MembersToExclude) - { - throw ("At least one of the following parameters must be specified: " + ` - "Members, MembersToInclude, MembersToExclude") - } - - foreach ($member in $Members) - { - if (($member.ActAsSystemAccount -eq $true) -and ` - ($member.PermissionLevel -ne "Full Control")) - { - throw ("Members Parameter: You cannot specify ActAsSystemAccount " + ` - "with any other permission than Full Control") - } - } - - foreach ($member in $MembersToInclude) - { - if (($member.ActAsSystemAccount -eq $true) -and ` - ($member.PermissionLevel -ne "Full Control")) - { - throw ("MembersToInclude Parameter: You cannot specify ActAsSystemAccount " + ` - "with any other permission than Full Control") - } - } - - $CurrentValues = Get-TargetResource @PSBoundParameters - - - $modulePath = "..\..\Modules\SharePointDsc.WebAppPolicy\SPWebAppPolicy.psm1" - Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath $modulePath -Resolve) - - if ($null -eq $CurrentValues) - { - throw "Web application does not exist" - } - - $cacheAccounts = Get-SPDSCCacheAccountConfiguration -InputParameters $WebAppUrl - - if ($SetCacheAccountsPolicy) - { - if ($cacheAccounts.SuperUserAccount -eq "" -or $cacheAccounts.SuperReaderAccount -eq "") - { - throw ("Cache accounts not configured properly. PortalSuperUserAccount or " + ` - "PortalSuperReaderAccount property is not configured.") - } - } - - # Determine the default identity type to use for entries that do not have it specified - $defaultIdentityType = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $wa = Get-SPWebApplication -Identity $params.WebAppUrl - if ($wa.UseClaimsAuthentication -eq $true) - { - return "Claims" - } - else - { - return "Native" - } - } - - $changeUsers = @() - - if ($Members -or $MembersToInclude) - { - $allMembers = @() - if ($Members) - { - Write-Verbose -Message "Members property is set - setting full membership list" - $membersToCheck = $Members - } - if ($MembersToInclude) - { - Write-Verbose -Message ("MembersToInclude property is set - setting membership " + ` - "list to ensure specified members are included") - $membersToCheck = $MembersToInclude - } - foreach ($member in $membersToCheck) - { - $allMembers += $member - } - - # Determine if cache accounts are to be included users - if ($SetCacheAccountsPolicy) - { - Write-Verbose -Message "SetCacheAccountsPolicy is True - Adding Cache Accounts to list" - $psuAccount = @{ - UserName = $cacheAccounts.SuperUserAccount - PermissionLevel = "Full Control" - IdentityMode = $cacheAccounts.IdentityMode - } - $allMembers += $psuAccount - - $psrAccount = @{ - UserName = $cacheAccounts.SuperReaderAccount - PermissionLevel = "Full Read" - IdentityMode = $cacheAccounts.IdentityMode - } - $allMembers += $psrAccount - } - - # Get the list of differences from the current configuration - $differences = Compare-SPDSCWebAppPolicy -WAPolicies $CurrentValues.Members ` - -DSCSettings $allMembers ` - -DefaultIdentityType $defaultIdentityType - - foreach ($difference in $differences) - { - switch ($difference.Status) - { - Additional { - # Only remove users if the "Members" property was set - # instead of "MembersToInclude" - if ($Members) - { - $user = @{ - Type = "Delete" - Username = $difference.Username - IdentityMode = $difference.IdentityType - } - } - } - Different { - $user = @{ - Type = "Change" - Username = $difference.Username - PermissionLevel = $difference.DesiredPermissionLevel - ActAsSystemAccount = $difference.DesiredActAsSystemSetting - IdentityMode = $difference.IdentityType - } - } - Missing { - $user = @{ - Type = "Add" - Username = $difference.Username - PermissionLevel = $difference.DesiredPermissionLevel - ActAsSystemAccount = $difference.DesiredActAsSystemSetting - IdentityMode = $difference.IdentityType - } - } - } - $changeUsers += $user - } - } - - if ($MembersToExclude) - { - Write-Verbose -Message ("MembersToExclude property is set - setting membership list " + ` - "to ensure specified members are not included") - - foreach ($member in $MembersToExclude) - { - $policy = $CurrentValues.Members | Where-Object -FilterScript { - $_.UserName -eq $member.UserName -and $_.IdentityType -eq $identityType - } - - if (($cacheAccounts.SuperUserAccount -eq $member.Username) -or ` - ($cacheAccounts.SuperReaderAccount -eq $member.Username)) - { - throw "You cannot exclude the Cache accounts from the Web Application Policy" - } - - if ($null -ne $policy) - { - $user = @{ - Type = "Delete" - Username = $member.UserName - } - } - $changeUsers += $user - } - } - - ## Perform changes - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters,$PSScriptRoot,$changeUsers) ` - -ScriptBlock { - $params = $args[0] - $scriptRoot = $args[1] - $changeUsers = $args[2] - - $modulePath = "..\..\Modules\SharePointDsc.WebAppPolicy\SPWebAppPolicy.psm1" - Import-Module -Name (Join-Path -Path $scriptRoot -ChildPath $modulePath -Resolve) - - $wa = Get-SPWebApplication -Identity $params.WebAppUrl -ErrorAction SilentlyContinue - - if ($null -eq $wa) - { - throw "Specified web application could not be found." - } - - $denyAll = $wa.PolicyRoles.GetSpecialRole([Microsoft.SharePoint.Administration.SPPolicyRoleType]::DenyAll) - $denyWrite = $wa.PolicyRoles.GetSpecialRole([Microsoft.SharePoint.Administration.SPPolicyRoleType]::DenyWrite) - $fullControl = $wa.PolicyRoles.GetSpecialRole([Microsoft.SharePoint.Administration.SPPolicyRoleType]::FullControl) - $fullRead = $wa.PolicyRoles.GetSpecialRole([Microsoft.SharePoint.Administration.SPPolicyRoleType]::FullRead) - - Write-Verbose -Message "Processing changes" - - foreach ($user in $changeUsers) - { - switch ($user.Type) - { - "Add" { - # User does not exist. Add user - Write-Verbose -Message "Adding $($user.Username)" - - $userToAdd = $user.Username - if ($user.IdentityMode -eq "Claims") - { - $isUser = Test-SPDSCIsADUser -IdentityName $user.Username - if ($isUser -eq $true) - { - $principal = New-SPClaimsPrincipal -Identity $user.Username ` - -IdentityType WindowsSamAccountName - $userToAdd = $principal.ToEncodedString() - } - else - { - $principal = New-SPClaimsPrincipal -Identity $user.Username ` - -IdentityType WindowsSecurityGroupName - $userToAdd = $principal.ToEncodedString() - } - } - $newPolicy = $wa.Policies.Add($userToAdd, $user.UserName) - foreach ($permissionLevel in $user.PermissionLevel) - { - switch ($permissionLevel) - { - "Deny All" { - $newPolicy.PolicyRoleBindings.Add($denyAll) - } - "Deny Write" { - $newPolicy.PolicyRoleBindings.Add($denyWrite) - } - "Full Control" { - $newPolicy.PolicyRoleBindings.Add($fullControl) - } - "Full Read" { - $newPolicy.PolicyRoleBindings.Add($fullRead) - } - } - } - if ($user.ActAsSystemAccount) - { - $newPolicy.IsSystemUser = $user.ActAsSystemAccount - } - } - "Change" { - # User exists. Check permissions - $userToChange = $user.Username - if ($user.IdentityMode -eq "Claims") - { - $isUser = Test-SPDSCIsADUser -IdentityName $user.Username - if ($isUser -eq $true) - { - $principal = New-SPClaimsPrincipal -Identity $user.Username ` - -IdentityType WindowsSamAccountName - $userToChange = $principal.ToEncodedString() - } - else - { - $principal = New-SPClaimsPrincipal -Identity $user.Username ` - -IdentityType WindowsSecurityGroupName - $userToChange = $principal.ToEncodedString() - } - } - $policy = $wa.Policies | Where-Object -FilterScript { - $_.UserName -eq $userToChange - } - - Write-Verbose -Message "User $($user.Username) exists, checking permissions" - if ($user.ActAsSystemAccount -ne $policy.IsSystemUser) - { - $policy.IsSystemUser = $user.ActAsSystemAccount - } - - switch ($policy.PolicyRoleBindings.Type) - { - 'DenyAll' - { - $userPermissionlevel = 'Deny All' - } - 'DenyWrite' - { - $userPermissionlevel = 'Deny Write' - } - 'FullControl' - { - $userPermissionlevel = 'Full Control' - } - 'FullRead' - { - $userPermissionlevel = 'Full Read' - } - } - - $polbinddiff = Compare-Object -ReferenceObject $userPermissionlevel ` - -DifferenceObject $user.PermissionLevel - if ($null -ne $polbinddiff) - { - $policy.PolicyRoleBindings.RemoveAll() - foreach ($permissionLevel in $user.PermissionLevel) - { - switch ($permissionLevel) - { - "Deny All" { - $policy.PolicyRoleBindings.Add($denyAll) - } - "Deny Write" { - $policy.PolicyRoleBindings.Add($denyWrite) - } - "Full Control" { - $policy.PolicyRoleBindings.Add($fullControl) - } - "Full Read" { - $policy.PolicyRoleBindings.Add($fullRead) - } - } - } - } - } - "Delete" - { - Write-Verbose -Message "Removing $($user.Username)" - $userToDrop = $user.Username - if ($user.IdentityMode -eq "Claims") - { - $isUser = Test-SPDSCIsADUser -IdentityName $user.Username - if ($isUser -eq $true) - { - $principal = New-SPClaimsPrincipal -Identity $user.Username ` - -IdentityType WindowsSamAccountName - $userToDrop = $principal.ToEncodedString() - } - else - { - $principal = New-SPClaimsPrincipal -Identity $user.Username ` - -IdentityType WindowsSecurityGroupName - $userToDrop = $principal.ToEncodedString() - } - } - Remove-SPDSCGenericObject -SourceCollection $wa.Policies ` - -Target $userToDrop ` - -ErrorAction SilentlyContinue - } - } - } - $wa.Update() - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $Members, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $MembersToInclude, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $MembersToExclude, - - [parameter(Mandatory = $false)] - [System.Boolean] - $SetCacheAccountsPolicy, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing web app policy for $WebAppUrl" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - $modulePath = "..\..\Modules\SharePointDsc.WebAppPolicy\SPWebAppPolicy.psm1" - Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath $modulePath -Resolve) - - if ($null -eq $CurrentValues) - { - return $false - } - - $cacheAccounts = Get-SPDSCCacheAccountConfiguration -InputParameters $WebAppUrl - if ($SetCacheAccountsPolicy) - { - if (($cacheAccounts.SuperUserAccount -eq "") -or ` - ($cacheAccounts.SuperReaderAccount -eq "")) - { - throw "Cache accounts not configured properly. PortalSuperUserAccount or " + ` - "PortalSuperReaderAccount property is not configured." - } - } - - # Determine the default identity type to use for entries that do not have it specified - $defaultIdentityType = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $wa = Get-SPWebApplication -Identity $params.WebAppUrl - if ($wa.UseClaimsAuthentication -eq $true) - { - return "Claims" - } - else - { - return "Native" - } - } - - # If checking the full members list, or the list of members to include then build the - # appropriate members list and check for the output of Compare-SPDSCWebAppPolicy - if ($Members -or $MembersToInclude) - { - $allMembers = @() - if ($Members) - { - Write-Verbose -Message "Members property is set - testing full membership list" - $membersToCheck = $Members - } - if ($MembersToInclude) - { - Write-Verbose -Message ("MembersToInclude property is set - testing membership " + ` - "list to ensure specified members are included") - $membersToCheck = $MembersToInclude - } - foreach ($member in $membersToCheck) - { - $allMembers += $member - } - - # Determine if cache accounts are to be included users - if ($SetCacheAccountsPolicy) - { - Write-Verbose -Message "SetCacheAccountsPolicy is True - Adding Cache Accounts to list" - $psuAccount = @{ - UserName = $cacheAccounts.SuperUserAccount - PermissionLevel = "Full Control" - IdentityMode = $cacheAccounts.IdentityMode - } - $allMembers += $psuAccount - - $psrAccount = @{ - UserName = $cacheAccounts.SuperReaderAccount - PermissionLevel = "Full Read" - IdentityMode = $cacheAccounts.IdentityMode - } - $allMembers += $psrAccount - } - - # Get the list of differences from the current configuration - $differences = Compare-SPDSCWebAppPolicy -WAPolicies $CurrentValues.Members ` - -DSCSettings $allMembers ` - -DefaultIdentityType $defaultIdentityType - - # If checking members, any difference counts as a fail - if ($Members) - { - if ($differences.Count -eq 0) - { - return $true - } - else - { - Write-Verbose -Message "Differences in the policy were found, returning false" - return $false - } - } - - # If only checking members to include only differences or missing records count as a fail - if ($MembersToInclude) - { - if (($differences | Where-Object -FilterScript { - $_.Status -eq "Different" -or $_.Status -eq "Missing" - }).Count -eq 0) - { - return $true - } - else - { - Write-Verbose -Message "Different or Missing policy was found, returning false" - return $false - } - } - } - - # If checking members to exlclude, simply compare the list of user names to the current - # membership list - if ($MembersToExclude) - { - Write-Verbose -Message ("MembersToExclude property is set - checking for permissions " + ` - "that need to be removed") - foreach ($member in $MembersToExclude) - { - if (($cacheAccounts.SuperUserAccount -eq $member.Username) -or ` - ($cacheAccounts.SuperReaderAccount -eq $member.Username)) - { - throw "You cannot exclude the Cache accounts from the Web Application Policy" - } - - foreach ($policy in $CurrentValues.Members) - { - if ($policy.Username -eq $member.Username) - { - return $false - } - } - } - return $true - } -} - -function Get-SPDSCCacheAccountConfiguration() -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param ( - [parameter(Mandatory = $false)] - [Object[]] - $InputParameters - ) - - $cacheAccounts = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $InputParameters ` - -ScriptBlock { - Write-Verbose -Message "Retrieving CacheAccounts" - $params = $args[0] - - $wa = Get-SPWebApplication -Identity $params -ErrorAction SilentlyContinue - - if ($null -eq $wa) - { - throw "Specified web application could not be found." - } - - $returnval = @{ - SuperUserAccount = "" - SuperReaderAccount = "" - } - - if ($wa.Properties.ContainsKey("portalsuperuseraccount")) - { - $memberName = $wa.Properties["portalsuperuseraccount"] - if ($wa.UseClaimsAuthentication -eq $true) - { - $convertedClaim = New-SPClaimsPrincipal -Identity $memberName ` - -IdentityType EncodedClaim ` - -ErrorAction SilentlyContinue - if($null -ne $convertedClaim) - { - $memberName = $convertedClaim.Value - } - } - $returnval.SuperUserAccount = $memberName - } - if ($wa.Properties.ContainsKey("portalsuperreaderaccount")) - { - $memberName = $wa.Properties["portalsuperreaderaccount"] - if ($wa.UseClaimsAuthentication -eq $true) - { - $convertedClaim = New-SPClaimsPrincipal -Identity $memberName ` - -IdentityType EncodedClaim ` - -ErrorAction SilentlyContinue - if($null -ne $convertedClaim) - { - $memberName = $convertedClaim.Value - } - } - $returnval.SuperReaderAccount = $memberName - } - - if ($wa.UseClaimsAuthentication -eq $true) - { - $returnval.IdentityMode = "Claims" - } - else - { - $returnval.IdentityMode = "Native" - } - - return $returnval - } - - return $cacheAccounts -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/MSFT_SPWebAppPolicy.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/MSFT_SPWebAppPolicy.schema.mof deleted file mode 100644 index 10f38d30..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/MSFT_SPWebAppPolicy.schema.mof +++ /dev/null @@ -1,18 +0,0 @@ -[ClassVersion("1.0.0.0")] -Class MSFT_SPWebPolicyPermissions -{ - [Key, Description("Name of the account")] String Username; - [Write, Description("Permission level of the account"), ValueMap{"Deny All","Deny Write","Full Read","Full Control"}, Values{"Deny All","Deny Write","Full Read","Full Control"}] String PermissionLevel[]; - [Write, Description("Identity type for this entry, either claims or native. If not specified it will default to whatever mode the web application is in."), ValueMap{"Claims","Native"}, Values{"Claims","Native"}] String IdentityType; - [Write, Description("Specifies if the account is allowed to act as a system account")] Boolean ActAsSystemAccount; -}; -[ClassVersion("1.0.0.0"), FriendlyName("SPWebAppPolicy")] -class MSFT_SPWebAppPolicy : OMI_BaseResource -{ - [Key, Description("The URL of the web application")] string WebAppUrl; - [Write, Description("Exact list of accounts that will have to get Web Policy permissions"), EmbeddedInstance("MSFT_SPWebPolicyPermissions")] String Members[]; - [Write, Description("List of all accounts that must be in the Web Policy group"), EmbeddedInstance("MSFT_SPWebPolicyPermissions")] String MembersToInclude[]; - [Write, Description("List of all accounts that are not allowed to have any Web Policy permissions"), EmbeddedInstance("MSFT_SPWebPolicyPermissions")] String MembersToExclude[]; - [Write, Description("Include the Cache Accounts in the policy or not")] Boolean SetCacheAccountsPolicy; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/MSFT_SPWebAppProxyGroup.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/MSFT_SPWebAppProxyGroup.psm1 deleted file mode 100644 index f63330d9..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/MSFT_SPWebAppProxyGroup.psm1 +++ /dev/null @@ -1,129 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppProxyGroup, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting $WebAppUrl Service Proxy Group Association" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $WebApp = get-spwebapplication $params.WebAppUrl - if (!$WebApp) - { - return @{ - WebAppUrl = $null - ServiceAppProxyGroup = $null - InstallAccount = $InstallAccount - } - } - - if ($WebApp.ServiceApplicationProxyGroup.friendlyname -eq "[default]") - { - $ServiceAppProxyGroup = "Default" - } - else - { - $ServiceAppProxyGroup = $WebApp.ServiceApplicationProxyGroup.name - } - - return @{ - WebAppUrl = $params.WebAppUrl - ServiceAppProxyGroup = $ServiceAppProxyGroup - InstallAccount = $InstallAccount - } - } - - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppProxyGroup, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting $WebAppUrl Service Proxy Group Association" - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - if ($params.ServiceAppProxyGroup -eq "Default") - { - $params.ServiceAppProxyGroup = "[default]" - } - - Set-SPWebApplication -Identity $params.WebAppUrl ` - -ServiceApplicationProxyGroup $params.ServiceAppProxyGroup - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $true)] - [System.String] - $ServiceAppProxyGroup, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing $WebAppUrl Service Proxy Group Association" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if (($null -eq $CurrentValues.WebAppUrl) -or ($null -eq $CurrentValues.ServiceAppProxyGroup)) - { - return $false - } - - if ($CurrentValues.ServiceAppProxyGroup -eq $ServiceAppProxyGroup) - { - return $true - } - else - { - return $false - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/MSFT_SPWebAppProxyGroup.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/MSFT_SPWebAppProxyGroup.schema.mof deleted file mode 100644 index e5781169..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/MSFT_SPWebAppProxyGroup.schema.mof +++ /dev/null @@ -1,7 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPWebAppProxyGroup")] -class MSFT_SPWebAppProxyGroup : OMI_BaseResource -{ - [Key, Description("URL of the web application")] String WebAppUrl; - [Required, Description("Name of the Service Application Proxy Group")] string ServiceAppProxyGroup; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/MSFT_SPWebAppSiteUseAndDeletion.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/MSFT_SPWebAppSiteUseAndDeletion.psm1 deleted file mode 100644 index 3269748d..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/MSFT_SPWebAppSiteUseAndDeletion.psm1 +++ /dev/null @@ -1,236 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [System.Boolean] - $SendUnusedSiteCollectionNotifications, - - [parameter(Mandatory = $false)] - [System.UInt32] - $UnusedSiteNotificationPeriod, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AutomaticallyDeleteUnusedSiteCollections, - - [parameter(Mandatory = $false)] - [ValidateRange(2,168)] - [System.UInt32] - $UnusedSiteNotificationsBeforeDeletion, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting web application '$url' site use and deletion settings" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - try - { - $spFarm = Get-SPFarm - } - catch - { - Write-Verbose -Message ("No local SharePoint farm was detected. Site Use and " + ` - "Deletion settings will not be applied") - return $null - } - - $wa = Get-SPWebApplication -Identity $params.Url ` - -ErrorAction SilentlyContinue - if ($null -eq $wa) - { - return $null - } - - return @{ - # Set the Site Use and Deletion settings - Url = $params.Url - SendUnusedSiteCollectionNotifications = $wa.SendUnusedSiteCollectionNotifications - UnusedSiteNotificationPeriod = $wa.UnusedSiteNotificationPeriod.TotalDays - AutomaticallyDeleteUnusedSiteCollections = $wa.AutomaticallyDeleteUnusedSiteCollections - UnusedSiteNotificationsBeforeDeletion = $wa.UnusedSiteNotificationsBeforeDeletion - InstallAccount = $params.InstallAccount - } - } - - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [System.Boolean] - $SendUnusedSiteCollectionNotifications, - - [parameter(Mandatory = $false)] - [System.UInt32] - $UnusedSiteNotificationPeriod, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AutomaticallyDeleteUnusedSiteCollections, - - [parameter(Mandatory = $false)] - [ValidateRange(2,168)] - [System.UInt32] - $UnusedSiteNotificationsBeforeDeletion, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting web application '$Url' Site Use and Deletion settings" - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - try - { - $spFarm = Get-SPFarm - } - catch - { - throw ("No local SharePoint farm was detected. Site Use and Deletion settings " + ` - "will not be applied") - } - - $wa = Get-SPWebApplication -Identity $params.Url -ErrorAction SilentlyContinue - if ($null -eq $wa) - { - throw "Configured web application could not be found" - } - - # Check if the specified value is in the range for the configured schedule - $job = Get-SPTimerJob -Identity job-dead-site-delete -WebApplication $params.Url - if ($null -eq $job) - { - throw "Dead Site Delete timer job for web application $($params.Url) could not be found" - } - else - { - # Check schedule value - switch ($job.Schedule.Description) - { - "Daily" { - if (($params.UnusedSiteNotificationsBeforeDeletion -lt 28) -or - ($params.UnusedSiteNotificationsBeforeDeletion -gt 168)) - { - throw ("Value of UnusedSiteNotificationsBeforeDeletion has to be >28 and " + ` - "<168 when the schedule is set to daily") - } - } - "Weekly" { - if (($params.UnusedSiteNotificationsBeforeDeletion -lt 4) -or - ($params.UnusedSiteNotificationsBeforeDeletion -gt 24)) - { - throw ("Value of UnusedSiteNotificationsBeforeDeletion has to be >4 and " + ` - "<24 when the schedule is set to weekly") - } - } - "Monthly" { - if (($params.UnusedSiteNotificationsBeforeDeletion -lt 2) -or - ($params.UnusedSiteNotificationsBeforeDeletion -gt 6)) - { - throw ("Value of UnusedSiteNotificationsBeforeDeletion has to be >2 and " + ` - "<6 when the schedule is set to monthly") - } - } - } - } - - Write-Verbose -Message "Start update" - - # Set the Site Use and Deletion settings - if ($params.ContainsKey("SendUnusedSiteCollectionNotifications")) - { - $wa.SendUnusedSiteCollectionNotifications = ` - $params.SendUnusedSiteCollectionNotifications - } - if ($params.ContainsKey("UnusedSiteNotificationPeriod")) - { - $timespan = New-TimeSpan -Days $params.UnusedSiteNotificationPeriod - $wa.UnusedSiteNotificationPeriod = $timespan - } - if ($params.ContainsKey("AutomaticallyDeleteUnusedSiteCollections")) - { - $wa.AutomaticallyDeleteUnusedSiteCollections = ` - $params.AutomaticallyDeleteUnusedSiteCollections - } - if ($params.ContainsKey("UnusedSiteNotificationsBeforeDeletion")) - { - $wa.UnusedSiteNotificationsBeforeDeletion = ` - $params.UnusedSiteNotificationsBeforeDeletion - } - $wa.Update() - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [System.Boolean] - $SendUnusedSiteCollectionNotifications, - - [parameter(Mandatory = $false)] - [System.UInt32] - $UnusedSiteNotificationPeriod, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AutomaticallyDeleteUnusedSiteCollections, - - [parameter(Mandatory = $false)] - [ValidateRange(2,168)] - [System.UInt32] - $UnusedSiteNotificationsBeforeDeletion, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing web application '$url' site use and deletion settings" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($null -eq $CurrentValues) - { - return $false - } - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/MSFT_SPWebAppSiteUseAndDeletion.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/MSFT_SPWebAppSiteUseAndDeletion.schema.mof deleted file mode 100644 index 0de0fd28..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/MSFT_SPWebAppSiteUseAndDeletion.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("SPWebAppSiteUseAndDeletion")] -class MSFT_SPWebAppSiteUseAndDeletion : OMI_BaseResource -{ - [Key, Description("The URL of the web application")] string Url; - [Write, Description("Should emails be sent to notify site owners of unused site collections")] boolean SendUnusedSiteCollectionNotifications; - [Write, Description("How many days should pass before a site is flagged as unused")] uint32 UnusedSiteNotificationPeriod; - [Write, Description("Should unused site collection be automatically deleted")] boolean AutomaticallyDeleteUnusedSiteCollections; - [Write, Description("How many days before an unused site is deleted should an email be sent to the owner")] uint32 UnusedSiteNotificationsBeforeDeletion; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] string InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/MSFT_SPWebAppThrottlingSettings.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/MSFT_SPWebAppThrottlingSettings.psm1 deleted file mode 100644 index 216828d2..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/MSFT_SPWebAppThrottlingSettings.psm1 +++ /dev/null @@ -1,247 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [System.UInt32] - $ListViewThreshold, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowObjectModelOverride, - - [parameter(Mandatory = $false)] - [System.UInt32] - $AdminThreshold, - - [parameter(Mandatory = $false)] - [System.UInt32] - $ListViewLookupThreshold, - - [parameter(Mandatory = $false)] - [System.Boolean] - $HappyHourEnabled, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance] - $HappyHour, - - [parameter(Mandatory = $false)] - [System.UInt32] - $UniquePermissionThreshold, - - [parameter(Mandatory = $false)] - [System.Boolean] - $RequestThrottling, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ChangeLogEnabled, - - [parameter(Mandatory = $false)] - [System.UInt32] - $ChangeLogExpiryDays, - - [parameter(Mandatory = $false)] - [System.Boolean] - $EventHandlersEnabled, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting web application '$url' throttling settings" - - $paramArgs = @($PSBoundParameters,$PSScriptRoot) - $result = Invoke-SPDSCCommand -Credential $InstallAccount -Arguments $paramArgs -ScriptBlock { - $params = $args[0] - $ScriptRoot = $args[1] - - $wa = Get-SPWebApplication -Identity $params.Url -ErrorAction SilentlyContinue - if ($null -eq $wa) - { - return $null - } - - $relPath = "..\..\Modules\SharePointDsc.WebApplication\SPWebApplication.Throttling.psm1" - Import-Module -Name (Join-Path -Path $ScriptRoot -ChildPath $relPath -Resolve) - - $result = Get-SPDSCWebApplicationThrottlingConfig -WebApplication $wa - $result.Add("Url", $params.Url) - $result.Add("InstallAccount", $params.InstallAccount) - return $result - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [System.UInt32] - $ListViewThreshold, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowObjectModelOverride, - - [parameter(Mandatory = $false)] - [System.UInt32] - $AdminThreshold, - - [parameter(Mandatory = $false)] - [System.UInt32] - $ListViewLookupThreshold, - - [parameter(Mandatory = $false)] - [System.Boolean] - $HappyHourEnabled, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance] - $HappyHour, - - [parameter(Mandatory = $false)] - [System.UInt32] - $UniquePermissionThreshold, - - [parameter(Mandatory = $false)] - [System.Boolean] - $RequestThrottling, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ChangeLogEnabled, - - [parameter(Mandatory = $false)] - [System.UInt32] - $ChangeLogExpiryDays, - - [parameter(Mandatory = $false)] - [System.Boolean] - $EventHandlersEnabled, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting web application '$Url' throttling settings" - - $paramArgs = @($PSBoundParameters,$PSScriptRoot) - - $result = Invoke-SPDSCCommand -Credential $InstallAccount -Arguments $paramArgs -ScriptBlock { - $params = $args[0] - $ScriptRoot = $args[1] - - $wa = Get-SPWebApplication -Identity $params.Url -ErrorAction SilentlyContinue - if ($null -eq $wa) - { - throw "Web application $($params.Url) was not found" - return - } - - $relPath = "..\..\Modules\SharePointDsc.WebApplication\SPWebApplication.Throttling.psm1" - Import-Module -Name (Join-Path -Path $ScriptRoot -ChildPath $relPath -Resolve) - Set-SPDSCWebApplicationThrottlingConfig -WebApplication $wa -Settings $params - $wa.Update() - - # Happy hour settings - if ($params.ContainsKey("HappyHour") -eq $true) - { - # Happy hour settins use separate update method so use a fresh web app to update these - $wa2 = Get-SPWebApplication -Identity $params.Url - Set-SPDSCWebApplicationHappyHourConfig -WebApplication $wa2 -Settings $params.HappyHour - $wa2.Update() - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [System.UInt32] - $ListViewThreshold, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowObjectModelOverride, - - [parameter(Mandatory = $false)] - [System.UInt32] - $AdminThreshold, - - [parameter(Mandatory = $false)] - [System.UInt32] - $ListViewLookupThreshold, - - [parameter(Mandatory = $false)] - [System.Boolean] - $HappyHourEnabled, - - [parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance] - $HappyHour, - - [parameter(Mandatory = $false)] - [System.UInt32] - $UniquePermissionThreshold, - - [parameter(Mandatory = $false)] - [System.Boolean] - $RequestThrottling, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ChangeLogEnabled, - - [parameter(Mandatory = $false)] - [System.UInt32] - $ChangeLogExpiryDays, - - [parameter(Mandatory = $false)] - [System.Boolean] - $EventHandlersEnabled, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing web application '$url' throttling settings" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($null -eq $CurrentValues) - { - return $false - } - - $relPath = "..\..\Modules\SharePointDsc.WebApplication\SPWebApplication.Throttling.psm1" - Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath $relPath -Resolve) - return Test-SPDSCWebApplicationThrottlingConfig -CurrentSettings $CurrentValues ` - -DesiredSettings $PSBoundParameters -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/MSFT_SPWebAppThrottlingSettings.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/MSFT_SPWebAppThrottlingSettings.schema.mof deleted file mode 100644 index 0814b256..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/MSFT_SPWebAppThrottlingSettings.schema.mof +++ /dev/null @@ -1,25 +0,0 @@ -[ClassVersion("1.0.0.0")] -Class MSFT_SPWebApplicationHappyHour -{ - [write] uint32 Hour; - [write] uint32 Minute; - [write] uint32 Duration; - -}; -[ClassVersion("1.0.0.0"), FriendlyName("SPWebAppThrottlingSettings")] -class MSFT_SPWebAppThrottlingSettings : OMI_BaseResource -{ - [Key, Description("The URL of the web application")] string Url; - [Write, Description("What should the list view threshold for this site be set to")] uint32 ListViewThreshold; - [Write, Description("Should object model code be able to be override the list view threshold")] boolean AllowObjectModelOverride; - [Write, Description("What is the list view threshold for site administrators")] uint32 AdminThreshold; - [Write, Description("What is the maximum number of lookup fields in a single list view")] uint32 ListViewLookupThreshold; - [Write, Description("Should the happy hour window be enabled for this web app")] boolean HappyHourEnabled; - [Write, Description("The time window for happy hour"), EmbeddedInstance("MSFT_SPWebApplicationHappyHour")] string HappyHour; - [Write, Description("What is the limit for unique permissions on a single object in this web app")] uint32 UniquePermissionThreshold; - [Write, Description("Is request throttling enabled on this web app")] boolean RequestThrottling; - [Write, Description("Is the change log enabled for this web app")] boolean ChangeLogEnabled; - [Write, Description("How many days does the change log store data for")] uint32 ChangeLogExpiryDays; - [Write, Description("Are event handlers enabled in the web application")] boolean EventHandlersEnabled; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] string InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/MSFT_SPWebAppWorkflowSettings.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/MSFT_SPWebAppWorkflowSettings.psm1 deleted file mode 100644 index 2c6484ea..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/MSFT_SPWebAppWorkflowSettings.psm1 +++ /dev/null @@ -1,137 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ExternalWorkflowParticipantsEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UserDefinedWorkflowsEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $EmailToNoPermissionWorkflowParticipantsEnable, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting web application '$url' workflow settings" - - $paramArgs = @($PSBoundParameters,$PSScriptRoot) - $result = Invoke-SPDSCCommand -Credential $InstallAccount -Arguments $paramArgs -ScriptBlock { - $params = $args[0] - $ScriptRoot = $args[1] - - - $wa = Get-SPWebApplication -Identity $params.Url -ErrorAction SilentlyContinue - if ($null -eq $wa) - { - return $null - } - - $relPath = "..\..\Modules\SharePointDsc.WebApplication\SPWebApplication.Workflow.psm1" - Import-Module (Join-Path $ScriptRoot $relPath -Resolve) - - $result = Get-SPDSCWebApplicationWorkflowConfig -WebApplication $wa - $result.Add("Url", $params.Url) - $result.Add("InstallAccount", $params.InstallAccount) - return $result - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ExternalWorkflowParticipantsEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UserDefinedWorkflowsEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $EmailToNoPermissionWorkflowParticipantsEnable, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting web application '$Url' workflow settings" - - $paramArgs = @($PSBoundParameters,$PSScriptRoot) - $result = Invoke-SPDSCCommand -Credential $InstallAccount -Arguments $paramArgs -ScriptBlock { - $params = $args[0] - $ScriptRoot = $args[1] - - $wa = Get-SPWebApplication -Identity $params.Url -ErrorAction SilentlyContinue - if ($null -eq $wa) { - throw "Web application $($params.Url) was not found" - return - } - - $relpath = "..\..\Modules\SharePointDsc.WebApplication\SPWebApplication.Workflow.psm1" - Import-Module (Join-Path $ScriptRoot $relPath -Resolve) - Set-SPDSCWebApplicationWorkflowConfig -WebApplication $wa -Settings $params - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [System.Boolean] - $ExternalWorkflowParticipantsEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UserDefinedWorkflowsEnabled, - - [parameter(Mandatory = $false)] - [System.Boolean] - $EmailToNoPermissionWorkflowParticipantsEnable, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing web application '$Url' workflow settings" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($null -eq $CurrentValues) { return $false } - - $relPath = "..\..\Modules\SharePointDsc.WebApplication\SPWebApplication.Workflow.psm1" - Import-Module (Join-Path $PSScriptRoot $relPath -Resolve) - return Test-SPDSCWebApplicationWorkflowConfig -CurrentSettings $CurrentValues ` - -DesiredSettings $PSBoundParameters -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/MSFT_SPWebAppWorkflowSettings.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/MSFT_SPWebAppWorkflowSettings.schema.mof deleted file mode 100644 index 60c944fa..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/MSFT_SPWebAppWorkflowSettings.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPWebAppWorkflowSettings")] -class MSFT_SPWebAppWorkflowSettings : OMI_BaseResource -{ - [Key, Description("The URL of the web application")] string Url; - [Write, Description("Are external workflow participants enabled in the web app")] boolean ExternalWorkflowParticipantsEnabled; - [Write, Description("Are user defined workflows enabled in this web app")] boolean UserDefinedWorkflowsEnabled; - [Write, Description("Are documents sent via email to external participants of workflow")] boolean EmailToNoPermissionWorkflowParticipantsEnable; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] string InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplication/MSFT_SPWebApplication.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplication/MSFT_SPWebApplication.psm1 deleted file mode 100644 index 372edcc2..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplication/MSFT_SPWebApplication.psm1 +++ /dev/null @@ -1,426 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPoolAccount, - - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowAnonymous, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [System.String] - $HostHeader, - - [parameter(Mandatory = $false)] - [System.String] - $Path, - - [parameter(Mandatory = $false)] - [System.String] - $Port, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UseSSL, - - [parameter(Mandatory = $false)] - [ValidateSet("NTLM","Kerberos","Claims","Classic")] - [System.String] - $AuthenticationMethod, - - [parameter(Mandatory = $false)] - [System.String] - $AuthenticationProvider, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting web application '$Name' config" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $wa = Get-SPWebApplication -Identity $params.Name -ErrorAction SilentlyContinue - if ($null -eq $wa) - { - return @{ - Name = $params.Name - ApplicationPool = $params.ApplicationPool - ApplicationPoolAccount = $params.ApplicationPoolAccount - Url = $params.Url - Ensure = "Absent" - } - } - - ### COMMENT: Are we making an assumption here, about Default Zone - $authProvider = Get-SPAuthenticationProvider -WebApplication $wa.Url -Zone "Default" - if ($null -eq $authProvider) - { - $authenticationProvider = "" - $localAuthMode = "Classic" - } - else - { - if ($authProvider.DisplayName -eq "Windows Authentication") - { - if ($authProvider.DisableKerberos -eq $true) - { - $localAuthMode = "NTLM" - } - else - { - $localAuthMode = "Kerberos" - } - $authenticationProvider = "Windows Authentication" - } - else - { - $localAuthMode = "Claims" - $authenticationProvider = $authProvider.DisplayName - } - } - - return @{ - Name = $wa.DisplayName - ApplicationPool = $wa.ApplicationPool.Name - ApplicationPoolAccount = $wa.ApplicationPool.Username - Url = $wa.Url - AllowAnonymous = $authProvider.AllowAnonymous - DatabaseName = $wa.ContentDatabases[0].Name - DatabaseServer = $wa.ContentDatabases[0].Server - HostHeader = (New-Object -TypeName System.Uri $wa.Url).Host - Path = $wa.IisSettings[0].Path - Port = (New-Object -TypeName System.Uri $wa.Url).Port - AuthenticationMethod = $localAuthMode - AuthenticationProvider = $authenticationProvider - UseSSL = (New-Object -TypeName System.Uri $wa.Url).Scheme -eq "https" - InstallAccount = $params.InstallAccount - Ensure = "Present" - } - } - return $result -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPoolAccount, - - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowAnonymous, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [System.String] - $HostHeader, - - [parameter(Mandatory = $false)] - [System.String] - $Path, - - [parameter(Mandatory = $false)] - [System.String] - $Port, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UseSSL, - - [parameter(Mandatory = $false)] - [ValidateSet("NTLM","Kerberos","Claims","Classic")] - [System.String] - $AuthenticationMethod, - - [parameter(Mandatory = $false)] - [System.String] - $AuthenticationProvider, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting web application '$Name' config" - - if ($Ensure -eq "Present") - { - if ($PSBoundParameters.ContainsKey("AuthenticationMethod") -eq $false) - { - throw [Exception] ("When Ensure is Present, the AuthenticationMethod " + ` - "parameter is required.") - } - - if ($AuthenticationMethod -eq "Claims" -and [string]::IsNullOrEmpty($AuthenticationProvider)) - { - throw [Exception] ("When configuring SPWebApplication to use Claims the " + ` - "AuthenticationProvider value must be specified.") - } - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $wa = Get-SPWebApplication -Identity $params.Name -ErrorAction SilentlyContinue - if ($null -eq $wa) - { - $newWebAppParams = @{ - Name = $params.Name - ApplicationPool = $params.ApplicationPool - Url = $params.Url - } - - # Get a reference to the Administration WebService - $admService = Get-SPDSCContentService - $appPools = $admService.ApplicationPools | Where-Object -FilterScript { - $_.Name -eq $params.ApplicationPool - } - if ($null -eq $appPools) - { - # Application pool does not exist, create a new one. - # Test if the specified managed account exists. If so, add - # ApplicationPoolAccount parameter to create the application pool - try - { - Get-SPManagedAccount $params.ApplicationPoolAccount -ErrorAction Stop | Out-Null - $newWebAppParams.Add("ApplicationPoolAccount", $params.ApplicationPoolAccount) - } - catch - { - if ($_.Exception.Message -like "*No matching accounts were found*") - { - throw ("The specified managed account was not found. Please make " + ` - "sure the managed account exists before continuing.") - return - } - else - { - throw ("Error occurred. Web application was not created. Error " + ` - "details: $($_.Exception.Message)") - return - } - } - } - - if ($params.ContainsKey("AuthenticationMethod") -eq $true) - { - if ($params.AuthenticationMethod -ne "Classic") - { - if ($params.AuthenticationMethod -eq "Claims") - { - $ap = Get-SPTrustedIdentityTokenIssuer -Identity $params.AuthenticationProvider - } - else - { - $disableKerberos = ($params.AuthenticationMethod -eq "NTLM") - $ap = New-SPAuthenticationProvider -UseWindowsIntegratedAuthentication ` - -DisableKerberos:$disableKerberos - } - - $newWebAppParams.Add("AuthenticationProvider", $ap) - } - } - - if ($params.ContainsKey("AllowAnonymous") -eq $true) - { - $newWebAppParams.Add("AllowAnonymousAccess", $params.AllowAnonymous) - } - if ($params.ContainsKey("DatabaseName") -eq $true) - { - $newWebAppParams.Add("DatabaseName", $params.DatabaseName) - } - if ($params.ContainsKey("DatabaseServer") -eq $true) - { - $newWebAppParams.Add("DatabaseServer", $params.DatabaseServer) - } - if ($params.ContainsKey("HostHeader") -eq $true) - { - $newWebAppParams.Add("HostHeader", $params.HostHeader) - } - if ($params.ContainsKey("Path") -eq $true) - { - $newWebAppParams.Add("Path", $params.Path) - } - if ($params.ContainsKey("Port") -eq $true) - { - $newWebAppParams.Add("Port", $params.Port) - } - if ($params.ContainsKey("UseSSL") -eq $true) - { - $newWebAppParams.Add("SecureSocketsLayer", $params.UseSSL) - } - - New-SPWebApplication @newWebAppParams | Out-Null - } - } - } - - if ($Ensure -eq "Absent") - { - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $wa = Get-SPWebApplication -Identity $params.Name -ErrorAction SilentlyContinue - if ($null -ne $wa) - { - $wa | Remove-SPWebApplication -Confirm:$false -DeleteIISSite - } - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $true)] - [System.String] - $ApplicationPoolAccount, - - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowAnonymous, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [System.String] - $HostHeader, - - [parameter(Mandatory = $false)] - [System.String] - $Path, - - [parameter(Mandatory = $false)] - [System.String] - $Port, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UseSSL, - - [parameter(Mandatory = $false)] - [ValidateSet("NTLM","Kerberos","Claims","Classic")] - [System.String] - $AuthenticationMethod, - - [parameter(Mandatory = $false)] - [System.String] - $AuthenticationProvider, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing for web application '$Name' config" - - $PSBoundParameters.Ensure = $Ensure - - if ($Ensure -eq "Present" -and - $PSBoundParameters.ContainsKey("AuthenticationMethod") -eq $false) - { - throw [Exception] ("When Ensure is Present, the AuthenticationMethod " + ` - "parameter is required.") - } - - $CurrentValues = Get-TargetResource @PSBoundParameters - - $testReturn = Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") - return $testReturn -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplication/MSFT_SPWebApplication.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplication/MSFT_SPWebApplication.schema.mof deleted file mode 100644 index 0741d7c2..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplication/MSFT_SPWebApplication.schema.mof +++ /dev/null @@ -1,20 +0,0 @@ -[ClassVersion("1.1.0.0"), FriendlyName("SPWebApplication")] -class MSFT_SPWebApplication : OMI_BaseResource -{ - [Key, Description("The name of the web application")] string Name; - [Required, Description("The name of the application pool to run this site in")] string ApplicationPool; - [Required, Description("The name of the managed account to run the app pool with")] string ApplicationPoolAccount; - [Required, Description("The URL of the web application")] string Url; - [Write, Description("Should anonymous access be enabled for this web app")] boolean AllowAnonymous; - [Write, Description("What authentication mode should be used for the web app"), ValueMap{"NTLM","Kerberos","Claims","Classic"}, Values{"NTLM","Kerberos","Claims","Classic"}] string AuthenticationMethod; - [Write, Description("What authentication provider should be used for the web app. This value is required when AuthenticationMethod is set to Claims")] string AuthenticationProvider; - [Write, Description("The name of the first content database to be created with this web app")] string DatabaseName; - [Write, Description("The name of the database server to host the default content DB")] string DatabaseServer; - [Write, Description("The host header to use for the web app")] string HostHeader; - [Write, Description("The path on the local servers to host the IIS web site from")] string Path; - [Write, Description("The port to run the site on")] string Port; - [Write, Description("Should this web app use SSL")] boolean UseSSL; - [Write, Description("Present if the web app should exist, absent if it should not"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] string InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/MSFT_SPWebApplicationAppDomain.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/MSFT_SPWebApplicationAppDomain.psm1 deleted file mode 100644 index 8ac2d471..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/MSFT_SPWebApplicationAppDomain.psm1 +++ /dev/null @@ -1,173 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $AppDomain, - - [parameter(Mandatory = $true)] - [System.String] - $WebApplication, - - [parameter(Mandatory = $true)] - [System.String] - [ValidateSet("Default","Internet","Intranet","Extranet","Custom")] - $Zone, - - [parameter(Mandatory = $false)] - [System.String] - $Port, - - [parameter(Mandatory = $false)] - [System.Boolean] - $SSL, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting app domain settings for '$AppDomain'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - $webAppAppDomain = Get-SPWebApplicationAppDomain -WebApplication $params.WebApplication ` - -Zone $params.Zone - - if ($null -eq $webAppAppDomain) - { - return $null - } - else - { - return @{ - AppDomain = $webAppAppDomain.AppDomain - WebApplication = $params.WebApplication - Zone = $webAppAppDomain.UrlZone - Port = $webAppAppDomain.Port - SSL = $webAppAppDomain.IsSchemeSSL - InstallAccount = $params.InstallAccount - } - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $AppDomain, - - [parameter(Mandatory = $true)] - [System.String] - $WebApplication, - - [parameter(Mandatory = $true)] - [System.String] - [ValidateSet("Default","Internet","Intranet","Extranet","Custom")] - $Zone, - - [parameter(Mandatory = $false)] - [System.String] - $Port, - - [parameter(Mandatory = $false)] - [System.Boolean] - $SSL, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting app domain settings for '$AppDomain'" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters, $CurrentValues) ` - -ScriptBlock { - $params = $args[0] - $CurrentValues = $args[1] - - if ($null -ne $CurrentValues) - { - Get-SPWebApplicationAppDomain -WebApplication $params.WebApplication ` - -Zone $params.Zone | Remove-SPWebApplicationAppDomain - Start-Sleep -Seconds 5 - } - - $newParams = @{ - AppDomain = $params.AppDomain - WebApplication = $params.WebApplication - Zone = $params.Zone - } - if ($params.ContainsKey("Port") -eq $true) - { - $newParams.Add("Port", $params.Port) - } - if ($params.ContainsKey("SSL") -eq $true) - { - $newParams.Add("SecureSocketsLayer", $params.SSL) - } - - New-SPWebApplicationAppDomain @newParams - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $AppDomain, - - [parameter(Mandatory = $true)] - [System.String] - $WebApplication, - - [parameter(Mandatory = $true)] - [System.String] - [ValidateSet("Default","Internet","Intranet","Extranet","Custom")] - $Zone, - - [parameter(Mandatory = $false)] - [System.String] - $Port, - - [parameter(Mandatory = $false)] - [System.Boolean] - $SSL, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing app domain settings for '$AppDomain'" - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($null -eq $CurrentValues) - { - return $false - } - - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("AppDomain", "Port", "SSL") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/MSFT_SPWebApplicationAppDomain.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/MSFT_SPWebApplicationAppDomain.schema.mof deleted file mode 100644 index 37e11133..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/MSFT_SPWebApplicationAppDomain.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPWebApplicationAppDomain")] -class MSFT_SPWebApplicationAppDomain : OMI_BaseResource -{ - [Key, Description("The URL of the web application to set the app domain for")] string WebApplication; - [Key, Description("The zone that this app domain applies to"), ValueMap{"Default","Internet","Intranet","Extranet","Custom"}, Values{"Default","Internet","Intranet","Extranet","Custom"}] string Zone; - [Required, Description("The domain for apps in this web app zone")] string AppDomain; - [Write, Description("The port to run apps on")] string Port; - [Write, Description("Should apps run under SSL")] boolean SSL; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/MSFT_SPWebApplicationExtension.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/MSFT_SPWebApplicationExtension.psm1 deleted file mode 100644 index 9666fd60..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/MSFT_SPWebApplicationExtension.psm1 +++ /dev/null @@ -1,423 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $true)] - [ValidateSet("Default","Intranet","Internet","Extranet","Custom")] - [System.String] - $Zone, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowAnonymous, - - [parameter(Mandatory = $false)] - [System.String] - $HostHeader, - - [parameter(Mandatory = $false)] - [System.String] - $Path, - - [parameter(Mandatory = $false)] - [System.String] - $Port, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UseSSL, - - [parameter(Mandatory = $false)] - [ValidateSet("NTLM","Kerberos","Claims")] - [System.String] - $AuthenticationMethod, - - [parameter(Mandatory = $false)] - [System.String] - $AuthenticationProvider, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting web application extension '$Name' config" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters,$PSScriptRoot) ` - -ScriptBlock { - $params = $args[0] - $ScriptRoot = $args[1] - - $wa = Get-SPWebApplication -Identity $params.WebAppUrl -ErrorAction SilentlyContinue - - if ($null -eq $wa) - { - Write-Verbose -Message "WebApplication $($params.WebAppUrl) does not exist" - return @{ - WebAppUrl = $params.WebAppUrl - Name = $params.Name - Url = $null - Zone = $null - Ensure = "Absent" - } - } - - $zone = [Microsoft.SharePoint.Administration.SPUrlZone]::$($params.Zone) - $waExt = $wa.IisSettings[$zone] - - if ($null -eq $waExt) - { - return @{ - WebAppUrl = $params.WebAppUrl - Name = $params.Name - Url = $params.Url - Zone = $params.zone - Ensure = "Absent" - } - } - - $publicUrl = (Get-SPAlternateURL -WebApplication $params.WebAppUrl -Zone $params.zone).PublicUrl - - if ($null -ne $waExt.SecureBindings.HostHeader) #default to SSL bindings if present - { - $HostHeader = $waExt.SecureBindings.HostHeader - $Port = $waExt.SecureBindings.Port - $UseSSL = $true - } - else - { - $HostHeader = $waExt.ServerBindings.HostHeader - $Port = $waExt.ServerBindings.Port - $UseSSL = $false - } - - $authProvider = Get-SPAuthenticationProvider -WebApplication $wa.Url -Zone $params.zone - if($authProvider.DisplayName -eq "Windows Authentication") - { - if ($authProvider.DisableKerberos -eq $true) - { - $localAuthMode = "NTLM" - } - else - { - $localAuthMode = "Kerberos" - } - } - else - { - $localAuthMode = "Claims" - $authenticationProvider = $authProvider.DisplayName - } - - return @{ - WebAppUrl = $params.WebAppUrl - Name = $waExt.ServerComment - Url = $PublicURL - AllowAnonymous = $authProvider.AllowAnonymous - HostHeader = $HostHeader - Path = $waExt.Path - Port = $Port - Zone = $params.zone - AuthenticationMethod = $localAuthMode - AuthenticationProvider = $authenticationProvider - UseSSL = $UseSSL - InstallAccount = $params.InstallAccount - Ensure = "Present" - } - } - return $result -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $true)] - [ValidateSet("Default","Intranet","Internet","Extranet","Custom")] - [System.String] - $Zone, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowAnonymous, - - [parameter(Mandatory = $false)] - [System.String] - $HostHeader, - - [parameter(Mandatory = $false)] - [System.String] - $Path, - - [parameter(Mandatory = $false)] - [System.String] - $Port, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UseSSL, - - [parameter(Mandatory = $false)] - [ValidateSet("NTLM","Kerberos","Claims")] - [System.String] - $AuthenticationMethod, - - [parameter(Mandatory = $false)] - [System.String] - $AuthenticationProvider, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting web application extension '$Name' config" - - if ($Ensure -eq "Present") - { - if ($AuthenticationMethod -eq "Claims" -and [string]::IsNullOrEmpty($AuthenticationProvider)) - { - throw [Exception] "When configuring SPWebApplication to use Claims the AuthenticationProvider value must be specified." - } - - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters,$PSScriptRoot) ` - -ScriptBlock { - $params = $args[0] - $ScriptRoot = $args[1] - - - $wa = Get-SPWebApplication -Identity $params.WebAppUrl -ErrorAction SilentlyContinue - if ($null -eq $wa) - { - throw "Web Application with URL $($params.WebAppUrl) does not exist" - } - - - $zone = [Microsoft.SharePoint.Administration.SPUrlZone]::$($params.Zone) - $waExt = $wa.IisSettings[$zone] - - if ($null -eq $waExt) - { - $newWebAppExtParams = @{ - Name = $params.Name - Url = $params.Url - Zone = $params.zone - } - - - if ($params.ContainsKey("AuthenticationMethod") -eq $true) - { - if($params.AuthenticationMethod -eq "Claims") - { - try - { - $ap = Get-SPTrustedIdentityTokenIssuer -Identity $params.AuthenticationProvider -ErrorAction Stop - } - catch - { - throw [Exception] "Cannot find Authentication Provider $($params.AuthenticationProvider)" - } - } - else - { - $disableKerberos = ($params.AuthenticationMethod -eq "NTLM") - $ap = New-SPAuthenticationProvider -UseWindowsIntegratedAuthentication ` - -DisableKerberos:$disableKerberos - } - - $newWebAppExtParams.Add("AuthenticationProvider", $ap) - } - - if ($params.ContainsKey("AllowAnonymous") -eq $true) - { - $newWebAppExtParams.Add("AllowAnonymousAccess", $params.AllowAnonymous) - } - if ($params.ContainsKey("HostHeader") -eq $true) - { - $newWebAppExtParams.Add("HostHeader", $params.HostHeader) - } - if ($params.ContainsKey("Path") -eq $true) - { - $newWebAppExtParams.Add("Path", $params.Path) - } - if ($params.ContainsKey("Port") -eq $true) - { - $newWebAppExtParams.Add("Port", $params.Port) - } - if ($params.ContainsKey("UseSSL") -eq $true) - { - $newWebAppExtParams.Add("SecureSocketsLayer", $params.UseSSL) - } - - $wa | New-SPWebApplicationExtension @newWebAppExtParams | Out-Null - } - else - { - if ($params.ContainsKey("AllowAnonymous") -eq $true) - { - $waExt.AllowAnonymous = $params.AllowAnonymous - $wa.update() - } - - if ($params.ContainsKey("AuthenticationMethod") -eq $true) - { - if($params.AuthenticationMethod -eq "Claims") - { - try - { - $ap = Get-SPTrustedIdentityTokenIssuer -Identity $params.AuthenticationProvider -ErrorAction Stop - } - catch - { - throw [Exception] "Cannot find Authentication Provider $($params.AuthenticationProvider)" - } - } - else - { - $disableKerberos = ($params.AuthenticationMethod -eq "NTLM") - $ap = New-SPAuthenticationProvider -UseWindowsIntegratedAuthentication ` - -DisableKerberos:$disableKerberos - } - - Set-SPWebApplication -Identity $params.WebAppUrl -Zone $params.zone -AuthenticationProvider $ap - } - } - } - } - - if ($Ensure -eq "Absent") - { - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters,$PSScriptRoot) ` - -ScriptBlock { - $params = $args[0] - $ScriptRoot = $args[1] - - $wa = Get-SPWebApplication -Identity $params.WebAppUrl -ErrorAction SilentlyContinue - if ($null -eq $wa) - { - throw "Web Application with URL $($params.WebAppUrl) does not exist" - } - if ($null -ne $wa) - { - $wa | Remove-SPWebApplication -Zone $params.zone -Confirm:$false -DeleteIISSite - } - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $WebAppUrl, - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Url, - - [parameter(Mandatory = $true)] - [ValidateSet("Default","Intranet","Internet","Extranet","Custom")] - [System.String] - $Zone, - - [parameter(Mandatory = $false)] - [System.Boolean] - $AllowAnonymous, - - [parameter(Mandatory = $false)] - [System.String] - $HostHeader, - - [parameter(Mandatory = $false)] - [System.String] - $Path, - - [parameter(Mandatory = $false)] - [System.String] - $Port, - - [parameter(Mandatory = $false)] - [System.Boolean] - $UseSSL, - - [parameter(Mandatory = $false)] - [ValidateSet("NTLM","Kerberos","Claims")] - [System.String] - $AuthenticationMethod, - - [parameter(Mandatory = $false)] - [System.String] - $AuthenticationProvider, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing for web application extension '$Name'config" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - $testReturn = Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure","AuthenticationMethod","AllowAnonymous") - return $testReturn -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/MSFT_SPWebApplicationExtension.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/MSFT_SPWebApplicationExtension.schema.mof deleted file mode 100644 index aff259f8..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/MSFT_SPWebApplicationExtension.schema.mof +++ /dev/null @@ -1,18 +0,0 @@ -[ClassVersion("1.1.0.0"), FriendlyName("SPWebApplicationExtension")] -class MSFT_SPWebApplicationExtension : OMI_BaseResource -{ - [Key, Description("The URL of the parent web application")] string WebAppUrl; - [Required, Description("The name of the web application extension")] string Name; - [Required, Description("The URL of the web application extension")] string Url; - [Key, Description("Specifies one of the five zones with which the internal URL of this new extension is to be associated."),ValueMap{"Default","Intranet","Internet","Extranet","Custom"}, Values{"Default","Intranet","Internet","Extranet","Custom"}] string Zone; - [Write, Description("Should anonymous access be enabled for this web app extension")] boolean AllowAnonymous; - [Write, Description("What authentication mode should be used for the web app extension"), ValueMap{"NTLM","Kerberos","Claims"}, Values{"NTLM","Kerberos","Claims"}] string AuthenticationMethod; - [Write, Description("What authentication provider should be used for the web app. This value is required when AuthenticationMethod is set to Claims")] string AuthenticationProvider; - [Write, Description("The host header to use for the web app extension")] string HostHeader; - [Write, Description("The path on the local servers to host the IIS web site from")] string Path; - [Write, Description("The port to run the site on")] string Port; - [Write, Description("Should this web app extension use SSL")] boolean UseSSL; - [Write, Description("Present if the web app should exist, absent if it should not"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] string InstallAccount; -}; - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/MSFT_SPWordAutomationServiceApp.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/MSFT_SPWordAutomationServiceApp.psm1 deleted file mode 100644 index 6c7fb3d9..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/MSFT_SPWordAutomationServiceApp.psm1 +++ /dev/null @@ -1,676 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("docx","doc","mht","rtf","xml")] - [System.String[]] - $SupportedFileFormats, - - [parameter(Mandatory = $false)] - [System.Boolean] - $DisableEmbeddedFonts, - - [parameter(Mandatory = $false)] - [ValidateRange(10,100)] - [System.UInt32] - $MaximumMemoryUsage, - - [parameter(Mandatory = $false)] - [ValidateRange(1,1000)] - [System.UInt32] - $RecycleThreshold, - - [parameter(Mandatory = $false)] - [System.Boolean] - $DisableBinaryFileScan, - - [parameter(Mandatory = $false)] - [ValidateRange(1,1000)] - [System.UInt32] - $ConversionProcesses, - - [parameter(Mandatory = $false)] - [ValidateRange(1,59)] - [System.UInt32] - $JobConversionFrequency, - - [parameter(Mandatory = $false)] - [System.UInt32] - $NumberOfConversionsPerProcess, - - [parameter(Mandatory = $false)] - [ValidateRange(1,60)] - [System.UInt32] - $TimeBeforeConversionIsMonitored, - - [parameter(Mandatory = $false)] - [ValidateRange(1,10)] - [System.UInt32] - $MaximumConversionAttempts, - - [parameter(Mandatory = $false)] - [ValidateRange(1,60)] - [System.UInt32] - $MaximumSyncConversionRequests, - - [parameter(Mandatory = $false)] - [ValidateRange(10,60)] - [System.UInt32] - $KeepAliveTimeout, - - [parameter(Mandatory = $false)] - [ValidateRange(60,3600)] - [System.UInt32] - $MaximumConversionTime, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting Word Automation service app '$Name'" - - $PSBoundParameters.Ensure = $Ensure - - if (($ApplicationPool ` - -or $DatabaseName ` - -or $DatabaseServer ` - -or $SupportedFileFormats ` - -or $DisableEmbeddedFonts ` - -or $MaximumMemoryUsage ` - -or $RecycleThreshold ` - -or $DisableBinaryFileScan ` - -or $ConversionProcesses ` - -or $JobConversionFrequency ` - -or $NumberOfConversionsPerProcess ` - -or $TimeBeforeConversionIsMonitored ` - -or $MaximumConversionAttempts ` - -or $MaximumSyncConversionRequests ` - -or $KeepAliveTimeout ` - -or $MaximumConversionTime) ` - -and ($Ensure -eq "Absent")) - { - throw "You cannot use any of the parameters when Ensure is specified as Absent" - } - - if (($Ensure -eq "Present") -and -not ($ApplicationPool -and $DatabaseName)) - { - throw ("An Application Pool and Database Name are required to configure the Word " + ` - "Automation Service Application") - } - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApps = Get-SPServiceApplication -Name $params.Name ` - -ErrorAction SilentlyContinue - $nullReturn = @{ - Name = $params.Name - Ensure = "Absent" - ApplicationPool = $params.ApplicationPool - } - - if ($null -eq $serviceApps) - { - return $nullReturn - } - - $serviceApp = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Word.Server.Service.WordServiceApplication" - } - - if ($null -eq $serviceApp) - { - return $nullReturn - } - - $supportedFileFormats = @() - if ($serviceApp.WordServiceFormats.OpenXmlDocument) - { - $supportedFileFormats += "docx" - } - if ($serviceApp.WordServiceFormats.Word972003Document) - { - $supportedFileFormats += "doc" - } - if ($serviceApp.WordServiceFormats.RichTextFormat) - { - $supportedFileFormats += "rtf" - } - if ($serviceApp.WordServiceFormats.WebPage) - { - $supportedFileFormats += "mht" - } - if ($serviceApp.WordServiceFormats.Word2003Xml) - { - $supportedFileFormats += "xml" - } - - $returnVal = @{ - Name = $serviceApp.DisplayName - Ensure = "Present" - ApplicationPool = $serviceApp.ApplicationPool.Name - DatabaseName = $serviceApp.Database.Name - DatabaseServer = $serviceApp.Database.Server.Name - SupportedFileFormats = $supportedFileFormats - DisableEmbeddedFonts = $serviceApp.DisableEmbeddedFonts - MaximumMemoryUsage = $serviceApp.MaximumMemoryUsage - RecycleThreshold = $serviceApp.RecycleProcessThreshold - DisableBinaryFileScan = $serviceApp.DisableBinaryFileScan - ConversionProcesses = $serviceApp.TotalActiveProcesses - JobConversionFrequency = $serviceApp.TimerJobFrequency.TotalMinutes - NumberOfConversionsPerProcess = $serviceApp.ConversionsPerInstance - TimeBeforeConversionIsMonitored = $serviceApp.ConversionTimeout.TotalMinutes - MaximumConversionAttempts = $serviceApp.MaximumConversionAttempts - MaximumSyncConversionRequests = $serviceApp.MaximumSyncConversionRequests - KeepAliveTimeout = $serviceApp.KeepAliveTimeout.TotalSeconds - MaximumConversionTime = $serviceApp.MaximumConversionTime.TotalSeconds - InstallAccount = $params.InstallAccount - } - return $returnVal - } - - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("docx","doc","mht","rtf","xml")] - [System.String[]] - $SupportedFileFormats, - - [parameter(Mandatory = $false)] - [System.Boolean] - $DisableEmbeddedFonts, - - [parameter(Mandatory = $false)] - [ValidateRange(10,100)] - [System.UInt32] - $MaximumMemoryUsage, - - [parameter(Mandatory = $false)] - [ValidateRange(1,1000)] - [System.UInt32] - $RecycleThreshold, - - [parameter(Mandatory = $false)] - [System.Boolean] - $DisableBinaryFileScan, - - [parameter(Mandatory = $false)] - [ValidateRange(1,1000)] - [System.UInt32] - $ConversionProcesses, - - [parameter(Mandatory = $false)] - [ValidateRange(1,59)] - [System.UInt32] - $JobConversionFrequency, - - [parameter(Mandatory = $false)] - [System.UInt32] - $NumberOfConversionsPerProcess, - - [parameter(Mandatory = $false)] - [ValidateRange(1,60)] - [System.UInt32] - $TimeBeforeConversionIsMonitored, - - [parameter(Mandatory = $false)] - [ValidateRange(1,10)] - [System.UInt32] - $MaximumConversionAttempts, - - [parameter(Mandatory = $false)] - [ValidateRange(1,60)] - [System.UInt32] - $MaximumSyncConversionRequests, - - [parameter(Mandatory = $false)] - [ValidateRange(10,60)] - [System.UInt32] - $KeepAliveTimeout, - - [parameter(Mandatory = $false)] - [ValidateRange(60,3600)] - [System.UInt32] - $MaximumConversionTime, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting Word Automation service app '$Name'" - - if (($ApplicationPool ` - -or $DatabaseName ` - -or $DatabaseServer ` - -or $SupportedFileFormats ` - -or $DisableEmbeddedFonts ` - -or $MaximumMemoryUsage ` - -or $RecycleThreshold ` - -or $DisableBinaryFileScan ` - -or $ConversionProcesses ` - -or $JobConversionFrequency ` - -or $NumberOfConversionsPerProcess ` - -or $TimeBeforeConversionIsMonitored ` - -or $MaximumConversionAttempts ` - -or $MaximumSyncConversionRequests ` - -or $KeepAliveTimeout ` - -or $MaximumConversionTime) ` - -and ($Ensure -eq "Absent")) - { - throw "You cannot use any of the parameters when Ensure is specified as Absent" - } - - $PSBoundParameters.Ensure = $Ensure - - if (($Ensure -eq "Present") -and -not ($ApplicationPool -and $DatabaseName)) - { - throw ("An Application Pool and Database Name are required to configure the Word " + ` - "Automation Service Application") - } - - $result = Get-TargetResource @PSBoundParameters - if ($result.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - Write-Verbose -Message "Creating Word Automation Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $appPool = Get-SPServiceApplicationPool -Identity $params.ApplicationPool - if ($appPool) - { - $cmdletparams = @{} - $cmdletparams.Name = $params.Name - if ($params.Name) - { - $cmdletparams.DatabaseName = $params.DatabaseName - } - if ($params.Name) - { - $cmdletparams.DatabaseServer = $params.DatabaseServer - } - if ($params.Name) - { - $cmdletparams.ApplicationPool = $params.ApplicationPool - } - - $serviceApp = New-SPWordConversionServiceApplication @cmdletparams - } - else - { - throw "Specified application pool does not exist" - } - } - } - - if ($result.Ensure -eq "Present" -and $Ensure -eq "Present") - { - Write-Verbose -Message "Updating Word Automation Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApp = Get-SPServiceApplication -Name $params.Name ` - | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Word.Server.Service.WordServiceApplication" - } - - # Check if the specified Application Pool is different and change if so - if ([string]::IsNullOrEmpty($ApplicationPool) -eq $false ` - -and $ApplicationPool -ne $result.ApplicationPool) - { - $appPool = Get-SPServiceApplicationPool -Identity $params.ApplicationPool - Set-SPWordConversionServiceApplication -Identity $serviceApp -ApplicationPool $appPool - } - # Check if the specified Database Name and Server are different and change if so - if ($params.DatabaseName) - { - if ($params.DatabaseServer) - { - if ($serviceApp.Database.Server.Name -ne $params.DatabaseServer) - { - Set-SPWordConversionServiceApplication -Identity $serviceApp ` - -DatabaseServer $params.DatabaseServer ` - -DatabaseName $params.DatabaseName - } - } - else - { - if ($serviceApp.Database.Name -ne $params.DatabaseName) - { - Set-SPWordConversionServiceApplication -Identity $serviceApp ` - -DatabaseName $params.DatabaseName - } - } - } - - if ($params.SupportedFileFormats) - { - if ($params.SupportedFileFormats.Contains("docx")) - { - $serviceApp.WordServiceFormats.OpenXmlDocument = $true - } - else - { - $serviceApp.WordServiceFormats.OpenXmlDocument = $false - } - if ($params.SupportedFileFormats.Contains("doc")) - { - $serviceApp.WordServiceFormats.Word972003Document = $true - } - else - { - $serviceApp.WordServiceFormats.Word972003Document = $false - } - if ($params.SupportedFileFormats.Contains("rtf")) - { - $serviceApp.WordServiceFormats.RichTextFormat = $true - } - else - { - $serviceApp.WordServiceFormats.RichTextFormat = $false - } - if ($params.SupportedFileFormats.Contains("mht")) - { - $serviceApp.WordServiceFormats.WebPage = $true - } - else - { - $serviceApp.WordServiceFormats.WebPage = $false - } - if ($params.SupportedFileFormats.Contains("xml")) - { - $serviceApp.WordServiceFormats.Word2003Xml = $true - } - else - { - $serviceApp.WordServiceFormats.Word2003Xml = $false - } - } - - if ($params.DisableEmbeddedFonts) - { - $serviceApp.DisableEmbeddedFonts = $params.DisableEmbeddedFonts - } - if ($params.MaximumMemoryUsage) - { - $serviceApp.MaximumMemoryUsage = $params.MaximumMemoryUsage - } - if ($params.RecycleThreshold) - { - $serviceApp.RecycleProcessThreshold = $params.RecycleThreshold - } - if ($params.DisableBinaryFileScan) - { - $serviceApp.DisableBinaryFileScan = $params.DisableBinaryFileScan - } - if ($params.ConversionProcesses) - { - $serviceApp.TotalActiveProcesses = $params.ConversionProcesses - } - if ($params.JobConversionFrequency) - { - # Check for TimerJob and change schedule - $wordAutomationTimerjob = Get-SPTimerJob $params.Name - if ($wordAutomationTimerjob.Count -eq 1) - { - $schedule = "every $($params.JobConversionFrequency) minutes between 0 and 0" - Set-SPTimerJob $wordAutomationTimerjob -Schedule $schedule - } - else - { - throw "Timerjob could not be found" - } - } - if ($params.NumberOfConversionsPerProcess) - { - $serviceApp.ConversionsPerInstance = $params.NumberOfConversionsPerProcess - } - if ($params.TimeBeforeConversionIsMonitored) - { - $timespan = New-TimeSpan -Minutes $params.TimeBeforeConversionIsMonitored - $serviceApp.ConversionTimeout = $timespan - } - if ($params.MaximumConversionAttempts) - { - $serviceApp.MaximumConversionAttempts = $params.MaximumConversionAttempts - } - if ($params.MaximumSyncConversionRequests) - { - $serviceApp.MaximumSyncConversionRequests = $params.MaximumSyncConversionRequests - } - if ($params.KeepAliveTimeout) - { - $timespan = New-TimeSpan -Seconds $params.KeepAliveTimeout - $serviceApp.KeepAliveTimeout = $timespan - } - if ($params.MaximumConversionTime) - { - $timespan = New-TimeSpan -Seconds $params.MaximumConversionTime - $serviceApp.MaximumConversionTime = $timespan - } - - $serviceApp.Update() - } - } - - if ($Ensure -eq "Absent") - { - Write-Verbose -Message "Removing Word Automation Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount -Arguments $PSBoundParameters -ScriptBlock { - $params = $args[0] - - $serviceApp = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Word.Server.Service.WordServiceApplication" - } - if ($null -ne $serviceApp) - { - $proxies = Get-SPServiceApplicationProxy - foreach($proxyInstance in $proxies) - { - if($serviceApp.IsConnected($proxyInstance)) - { - $proxyInstance.Delete() - } - } - - # Service app existed, deleting - Remove-SPServiceApplication -Identity $serviceApp -RemoveData -Confirm:$false - } - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $false)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $false)] - [ValidateSet("docx","doc","mht","rtf","xml")] - [System.String[]] - $SupportedFileFormats, - - [parameter(Mandatory = $false)] - [System.Boolean] - $DisableEmbeddedFonts, - - [parameter(Mandatory = $false)] - [ValidateRange(10,100)] - [System.UInt32] - $MaximumMemoryUsage, - - [parameter(Mandatory = $false)] - [ValidateRange(1,1000)] - [System.UInt32] - $RecycleThreshold, - - [parameter(Mandatory = $false)] - [System.Boolean] - $DisableBinaryFileScan, - - [parameter(Mandatory = $false)] - [ValidateRange(1,1000)] - [System.UInt32] - $ConversionProcesses, - - [parameter(Mandatory = $false)] - [ValidateRange(1,59)] - [System.UInt32] - $JobConversionFrequency, - - [parameter(Mandatory = $false)] - [System.UInt32] - $NumberOfConversionsPerProcess, - - [parameter(Mandatory = $false)] - [ValidateRange(1,60)] - [System.UInt32] - $TimeBeforeConversionIsMonitored, - - [parameter(Mandatory = $false)] - [ValidateRange(1,10)] - [System.UInt32] - $MaximumConversionAttempts, - - [parameter(Mandatory = $false)] - [ValidateRange(1,60)] - [System.UInt32] - $MaximumSyncConversionRequests, - - [parameter(Mandatory = $false)] - [ValidateRange(10,60)] - [System.UInt32] - $KeepAliveTimeout, - - [parameter(Mandatory = $false)] - [ValidateRange(60,3600)] - [System.UInt32] - $MaximumConversionTime, - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing Word Automation service app '$Name'" - - $PSBoundParameters.Ensure = $Ensure - - if (($ApplicationPool ` - -or $DatabaseName ` - -or $DatabaseServer ` - -or $SupportedFileFormats ` - -or $DisableEmbeddedFonts ` - -or $MaximumMemoryUsage ` - -or $RecycleThreshold ` - -or $DisableBinaryFileScan ` - -or $ConversionProcesses ` - -or $JobConversionFrequency ` - -or $NumberOfConversionsPerProcess ` - -or $TimeBeforeConversionIsMonitored ` - -or $MaximumConversionAttempts ` - -or $MaximumSyncConversionRequests ` - -or $KeepAliveTimeout ` - -or $MaximumConversionTime) ` - -and ($Ensure -eq "Absent")) - { - throw "You cannot use any of the parameters when Ensure is specified as Absent" - } - - if (($Ensure -eq "Present") -and -not ($ApplicationPool -and $DatabaseName)) - { - throw ("An Application Pool and Database Name are required to configure the Word " + ` - "Automation Service Application") - } - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($null -eq $CurrentValues) - { - return $false - } - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/MSFT_SPWordAutomationServiceApp.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/MSFT_SPWordAutomationServiceApp.schema.mof deleted file mode 100644 index 399a6bb2..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/MSFT_SPWordAutomationServiceApp.schema.mof +++ /dev/null @@ -1,23 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPWordAutomationServiceApp")] -class MSFT_SPWordAutomationServiceApp : OMI_BaseResource -{ - [Key, Description("THe name of the service application")] string Name; - [Write, Description("Present to ensure the app exists, absent to ensure that it does not"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("The name of the application pool to run the service app in")] string ApplicationPool; - [Write, Description("The name of the database for the service app")] string DatabaseName; - [Write, Description("The name of the server that will host the database")] string DatabaseServer; - [Write, Description("The list of supported file types"), ValueMap{"docx","doc","mht","rtf","xml"}, Values{"docx","doc","mht","rtf","xml"}] string SupportedFileFormats[]; - [Write, Description("Should embedded fonts be disabled")] boolean DisableEmbeddedFonts; - [Write, Description("What is the maximum amount of memory the service app should use (in MB)")] uint32 MaximumMemoryUsage; - [Write, Description("What is the recycle threshold for this service app")] uint32 RecycleThreshold; - [Write, Description("Should binary file scans be disabled")] boolean DisableBinaryFileScan; - [Write, Description("How many conversion processes can be run at once")] uint32 ConversionProcesses; - [Write, Description("How frequently should new jobs be started from the queue (in minutes)")] uint32 JobConversionFrequency; - [Write, Description("How many document conversions should be included in a single process")] uint32 NumberOfConversionsPerProcess; - [Write, Description("How long can a conversion be run before it becomes monitored")] uint32 TimeBeforeConversionIsMonitored; - [Write, Description("What is the maximum number of attempts to convert a document")] uint32 MaximumConversionAttempts; - [Write, Description("What is the maximum number of sync conversion requests for the service app")] uint32 MaximumSyncConversionRequests; - [Write, Description("How long is the keep alive timeout set to for the service app")] uint32 KeepAliveTimeout; - [Write, Description("What is the maximum time in seconds for a document conversion to be allowed to run")] uint32 MaximumConversionTime; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] string InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/MSFT_SPWorkManagementServiceApp.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/MSFT_SPWorkManagementServiceApp.psm1 deleted file mode 100644 index c4685082..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/MSFT_SPWorkManagementServiceApp.psm1 +++ /dev/null @@ -1,396 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $false)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.UInt32] - $MinimumTimeBetweenEwsSyncSubscriptionSearches, - - [parameter(Mandatory = $false)] - [System.UInt32] - $MinimumTimeBetweenProviderRefreshes, - - [parameter(Mandatory = $false)] - [System.UInt32] - $MinimumTimeBetweenSearchQueries, - - [parameter(Mandatory = $false)] - [System.UInt32] - $NumberOfSubscriptionSyncsPerEwsSyncRun, - - [parameter(Mandatory = $false)] - [System.UInt32] - $NumberOfUsersEwsSyncWillProcessAtOnce, - - [parameter(Mandatory = $false)] - [System.UInt32] - $NumberOfUsersPerEwsSyncBatch, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Getting Work management service app '$Name'" - - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApps = Get-SPServiceApplication -Name $params.Name -ErrorAction SilentlyContinue - - $nullReturn = @{ - Name = $params.Name - Ensure = "Absent" - ApplicationPool = $params.ApplicationPool - } - - if ($null -eq $serviceApps) - { - return $nullReturn - } - $serviceApp = $serviceApps | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Server.WorkManagement.WorkManagementServiceApplication" - } - - if ($null -eq $serviceApp) - { - return $nullReturn - } - else - { - $serviceAppProxies = Get-SPServiceApplicationProxy -ErrorAction SilentlyContinue - if ($null -ne $serviceAppProxies) - { - $serviceAppProxy = $serviceAppProxies | Where-Object -FilterScript { - $serviceApp.IsConnected($_) - } - if ($null -ne $serviceAppProxy) - { - $proxyName = $serviceAppProxy.Name - } - } - - return @{ - Name = $serviceApp.DisplayName - ProxyName = $proxyName - ApplicationPool = $serviceApp.ApplicationPool.Name - MinimumTimeBetweenEwsSyncSubscriptionSearches = $serviceApp.AdminSettings.MinimumTimeBetweenEwsSyncSubscriptionSearches.TotalMinutes - MinimumTimeBetweenProviderRefreshes = $serviceApp.AdminSettings.MinimumTimeBetweenProviderRefreshes.TotalMinutes - MinimumTimeBetweenSearchQueries = $serviceApp.AdminSettings.MinimumTimeBetweenProviderRefreshes.TotalMinutes - NumberOfSubscriptionSyncsPerEwsSyncRun = $serviceApp.AdminSettings.NumberOfSubscriptionSyncsPerEwsSyncRun - NumberOfUsersEwsSyncWillProcessAtOnce = $serviceApp.AdminSettings.NumberOfUsersEwsSyncWillProcessAtOnce - NumberOfUsersPerEwsSyncBatch = $serviceApp.AdminSettings.NumberOfUsersPerEwsSyncBatch - Ensure = "Present" - } - } - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $false)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.UInt32] - $MinimumTimeBetweenEwsSyncSubscriptionSearches, - - [parameter(Mandatory = $false)] - [System.UInt32] - $MinimumTimeBetweenProviderRefreshes, - - [parameter(Mandatory = $false)] - [System.UInt32] - $MinimumTimeBetweenSearchQueries, - - [parameter(Mandatory = $false)] - [System.UInt32] - $NumberOfSubscriptionSyncsPerEwsSyncRun, - - [parameter(Mandatory = $false)] - [System.UInt32] - $NumberOfUsersEwsSyncWillProcessAtOnce, - - [parameter(Mandatory = $false)] - [System.UInt32] - $NumberOfUsersPerEwsSyncBatch, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Setting Work management service app '$Name'" - $PSBoundParameters.Ensure = $Ensure - - if ($Ensure -ne "Absent" -and $PSBoundParameters.ContainsKey("ApplicationPool") -eq $false) - { - throw "Parameter ApplicationPool is required unless service is being removed(Ensure='Absent')" - } - - $result = Get-TargetResource @PSBoundParameters - - if ($result.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - Write-Verbose -Message "Creating work management Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - if ($params.ContainsKey("Ensure")) - { - $params.Remove("Ensure") | Out-Null - } - if ($params.ContainsKey("InstallAccount")) - { - $params.Remove("InstallAccount") | Out-Null - } - if ($params.ContainsKey("ProxyName")) - { - $pName = $params.ProxyName - $params.Remove("ProxyName") | Out-Null - } - if ($null -eq $pName) { - $pName = "$($params.Name) Proxy" - } - - $app = New-SPWorkManagementServiceApplication @params - if ($null -ne $app) - { - New-SPWorkManagementServiceApplicationProxy -Name $pName ` - -ServiceApplication $app ` - -DefaultProxyGroup - Start-Sleep -Milliseconds 200 - } - } - } - - if ($result.Ensure -eq "Present" -and $Ensure -eq "Present") - { - if ([string]::IsNullOrEmpty($ApplicationPool) -eq $false ` - -and $ApplicationPool -ne $result.ApplicationPool) - { - Write-Verbose -Message "Updating Application Pool of Work Management Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApp = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Server.WorkManagement.WorkManagementServiceApplication" - } - $appPool = Get-SPServiceApplicationPool -Identity $params.ApplicationPool - Set-SPWorkManagementServiceApplication -Identity $serviceApp -ApplicationPool $appPool - } - } - - Write-Verbose -Message "Updating Application Pool of Work Management Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $setParams = @{} - if ($params.ContainsKey("MinimumTimeBetweenEwsSyncSubscriptionSearches")) - { - $setParams.Add("MinimumTimeBetweenEwsSyncSubscriptionSearches", - $params.MinimumTimeBetweenEwsSyncSubscriptionSearches) - } - if ($params.ContainsKey("MinimumTimeBetweenProviderRefreshes")) - { - $setParams.Add("MinimumTimeBetweenProviderRefreshes", - $params.MinimumTimeBetweenProviderRefreshes) - } - if ($params.ContainsKey("MinimumTimeBetweenSearchQueries")) - { - $setParams.Add("MinimumTimeBetweenSearchQueries", - $params.MinimumTimeBetweenSearchQueries) - } - if ($params.ContainsKey("NumberOfSubscriptionSyncsPerEwsSyncRun")) - { - $setParams.Add("NumberOfSubscriptionSyncsPerEwsSyncRun", - $params.NumberOfSubscriptionSyncsPerEwsSyncRun) - } - if ($params.ContainsKey("NumberOfUsersEwsSyncWillProcessAtOnce")) - { - $setParams.Add("NumberOfUsersEwsSyncWillProcessAtOnce", - $params.NumberOfUsersEwsSyncWillProcessAtOnce) - } - if ($params.ContainsKey("NumberOfUsersPerEwsSyncBatch")) - { - $setParams.Add("NumberOfUsersPerEwsSyncBatch", - $params.NumberOfUsersPerEwsSyncBatch) - } - - $setParams.Add("Name", $params.Name) - $setParams.Add("ApplicationPool", $params.ApplicationPool) - - if ($setParams.ContainsKey("MinimumTimeBetweenEwsSyncSubscriptionSearches")) - { - $setParams.MinimumTimeBetweenEwsSyncSubscriptionSearches = New-TimeSpan -Days $setParams.MinimumTimeBetweenEwsSyncSubscriptionSearches - } - if ($setParams.ContainsKey("MinimumTimeBetweenProviderRefreshes")) - { - $setParams.MinimumTimeBetweenProviderRefreshes = New-TimeSpan -Days $setParams.MinimumTimeBetweenProviderRefreshes - } - if ($setParams.ContainsKey("MinimumTimeBetweenSearchQueries")) - { - $setParams.MinimumTimeBetweenSearchQueries = New-TimeSpan -Days $setParams.MinimumTimeBetweenSearchQueries - } - $setParams.Add("Confirm", $false) - $appService = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Server.WorkManagement.WorkManagementServiceApplication" - } - - $appService | Set-SPWorkManagementServiceApplication @setPArams | Out-Null - } - } - - if ($Ensure -eq "Absent") - { - # The service app should not exit - Write-Verbose -Message "Removing Work Management Service Application $Name" - Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $serviceApp = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript { - $_.GetType().FullName -eq "Microsoft.Office.Server.WorkManagement.WorkManagementServiceApplication" - } - - $proxies = Get-SPServiceApplicationProxy - foreach($proxyInstance in $proxies) - { - if($serviceApp.IsConnected($proxyInstance)) - { - $proxyInstance.Delete() - } - } - - Remove-SPServiceApplication $serviceApp -Confirm:$false - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $ProxyName, - - [parameter(Mandatory = $false)] - [System.String] - $ApplicationPool, - - [parameter(Mandatory = $false)] - [System.UInt32] - $MinimumTimeBetweenEwsSyncSubscriptionSearches, - - [parameter(Mandatory = $false)] - [System.UInt32] - $MinimumTimeBetweenProviderRefreshes, - - [parameter(Mandatory = $false)] - [System.UInt32] - $MinimumTimeBetweenSearchQueries, - - [parameter(Mandatory = $false)] - [System.UInt32] - $NumberOfSubscriptionSyncsPerEwsSyncRun, - - [parameter(Mandatory = $false)] - [System.UInt32] - $NumberOfUsersEwsSyncWillProcessAtOnce, - - [parameter(Mandatory = $false)] - [System.UInt32] - $NumberOfUsersPerEwsSyncBatch, - - [parameter(Mandatory = $false)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $InstallAccount - ) - - Write-Verbose -Message "Testing Work management service app '$Name'" - - $PSBoundParameters.Ensure = $Ensure - - $CurrentValues = Get-TargetResource @PSBoundParameters - - if ($Ensure -eq "Present") - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("ApplicationPool", - "MinimumTimeBetweenEwsSyncSubscriptionSearches", - "MinimumTimeBetweenProviderRefreshes", - "MinimumTimeBetweenSearchQueries", - "Name", - "NumberOfSubscriptionSyncsPerEwsSyncRun", - "NumberOfUsersEwsSyncWillProcessAtOnce", - "NumberOfUsersPerEwsSyncBatch", - "Ensure") - } - else - { - return Test-SPDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Ensure") - } -} - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/MSFT_SPWorkManagementServiceApp.schema.mof b/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/MSFT_SPWorkManagementServiceApp.schema.mof deleted file mode 100644 index dd6c2e86..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/MSFT_SPWorkManagementServiceApp.schema.mof +++ /dev/null @@ -1,15 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SPWorkManagementServiceApp")] -class MSFT_SPWorkManagementServiceApp : OMI_BaseResource -{ - [Key, Description("The name of the work management service application")] string Name; - [Write, Description("The proxy name, if not specified will be /Name of service app/ Proxy")] string ProxyName; - [Write, Description("Present to ensure the app exists, Absent to ensure it is removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("The name of the application pool this will run in")] String ApplicationPool; - [Write, Description("The minimum amount of time bween EWS sync subscription searches")] uint32 MinimumTimeBetweenEwsSyncSubscriptionSearches; - [Write, Description("The minimum time between provider refreshes")] uint32 MinimumTimeBetweenProviderRefreshes; - [Write, Description("The minimum time between search queries")] uint32 MinimumTimeBetweenSearchQueries; - [Write, Description("The number of subscription syncronisations per EWS sync run")] uint32 NumberOfSubscriptionSyncsPerEwsSyncRun; - [Write, Description("How many users will EWS calls include at once")] uint32 NumberOfUsersEwsSyncWillProcessAtOnce; - [Write, Description("How many users are included in a batch for EWS")] uint32 NumberOfUsersPerEwsSyncBatch; - [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; -}; diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/LICENSE b/lib/puppet_x/dsc_resources/SharePointDsc/LICENSE deleted file mode 100644 index b8b569d7..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.ContentDatabase/SPContentDatabase.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.ContentDatabase/SPContentDatabase.psm1 deleted file mode 100644 index 1aa6a0ae..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.ContentDatabase/SPContentDatabase.psm1 +++ /dev/null @@ -1,76 +0,0 @@ -function Mount-SPDscContentDatabase() -{ - param - ( - [Parameter(Mandatory=$true)] - [System.Collections.Hashtable] - $params, - - [Parameter(Mandatory=$true)] - [System.Boolean] - $enabled - ) - - if ($params.ContainsKey("Enabled")) - { - $params.Remove("Enabled") - } - - if ($params.ContainsKey("Ensure")) - { - $params.Remove("Ensure") - } - - if ($params.ContainsKey("InstallAccount")) - { - $params.Remove("InstallAccount") - } - - if ($params.ContainsKey("MaximumSiteCount")) - { - $params.MaxSiteCount = $params.MaximumSiteCount - $params.Remove("MaximumSiteCount") - } - if ($params.ContainsKey("WebAppUrl")) - { - $params.WebApplication = $params.WebAppUrl - $params.Remove("WebAppUrl") - } - - try - { - $cdb = Mount-SPContentDatabase @params - } - catch - { - throw ("Error occurred while mounting content database. " + ` - "Content database is not mounted. " + ` - "Error details: $($_.Exception.Message)") - } - - if ($cdb.Status -eq "Online") - { - $cdbenabled = $true - } - else - { - $cdbenabled = $false - } - - if ($enabled -ne $cdbenabled) - { - switch ($params.Enabled) - { - $true - { - $cdb.Status = [Microsoft.SharePoint.Administration.SPObjectStatus]::Online - } - $false - { - $cdb.Status = [Microsoft.SharePoint.Administration.SPObjectStatus]::Disabled - } - } - } - - return $cdb -} diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.Farm/SPFarm.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.Farm/SPFarm.psm1 deleted file mode 100644 index c0016716..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.Farm/SPFarm.psm1 +++ /dev/null @@ -1,206 +0,0 @@ -<# - -.SYNOPSIS - -Get-SPDSCConfigDBStatus is used to determine the state of a configuration database - -.DESCRIPTION - -Get-SPDSCConfigDBStatus will determine two things - firstly, if the config database -exists, and secondly if the user executing the script has appropriate permissions -to the instance to create the database. These values are used by the SPFarm resource -to determine what actions to take in it's set method. - -.PARAMETER SQLServer - -The name of the SQL server to check against - -.PARAMETER Database - -The name of the database to validate as the configuration database - -.EXAMPLE - -Get-SPDSCConfigDBStatus -SQLServer sql.contoso.com -Database SP_Config - -#> -function Get-SPDSCConfigDBStatus -{ - param( - [Parameter(Mandatory = $true)] - [String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [String] - $Database - ) - - $connection = New-Object -TypeName "System.Data.SqlClient.SqlConnection" - $connection.ConnectionString = "Server=$SQLServer;Integrated Security=SSPI;Database=Master" - $command = New-Object -TypeName "System.Data.SqlClient.SqlCommand" - - try - { - $currentUser = ([Security.Principal.WindowsIdentity]::GetCurrent()).Name - $connection.Open() - $command.Connection = $connection - - $command.CommandText = "SELECT COUNT(*) FROM sys.databases WHERE name = '$Database'" - $configDBexists = ($command.ExecuteScalar() -eq 1) - - $command.CommandText = "SELECT COUNT(*) FROM sys.databases WHERE name = '$($Database)_Lock'" - $lockExists = ($command.ExecuteScalar() -eq 1) - - $serverRolesToCheck = @("dbcreator", "securityadmin") - $hasPermissions = $true - foreach ($serverRole in $serverRolesToCheck) - { - $command.CommandText = "SELECT IS_SRVROLEMEMBER('$serverRole')" - if ($command.ExecuteScalar() -eq "0") - { - Write-Verbose -Message "$currentUser does not have '$serverRole' role on server '$SQLServer'" - $hasPermissions = $false - } - } - - return @{ - DatabaseExists = $configDBexists - ValidPermissions = $hasPermissions - Locked = $lockExists - } - } - finally - { - if ($connection.State -eq "Open") - { - $connection.Close() - $connection.Dispose() - } - } -} - -<# - -.SYNOPSIS - -Add-SPDSCConfigDBLock is used to create a lock to tell other servers that the -config DB is currently provisioning - -.DESCRIPTION - -Add-SPDSCConfigDBLock will create an empty database with the same name as the -config DB but suffixed with "_Lock". The presences of this database will -indicate to other servers that the config database is in the process of being -provisioned as the database is removed at the end of the process. - -.PARAMETER SQLServer - -The name of the SQL server to check against - -.PARAMETER Database - -The name of the database to validate as the configuration database - -.EXAMPLE - -Add-SPDSCConfigDBLock -SQLServer sql.contoso.com -Database SP_Config - -#> -function Add-SPDSCConfigDBLock -{ - param( - [Parameter(Mandatory = $true)] - [String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [String] - $Database - ) - - Write-Verbose -Message "Creating lock database $($Database)_Lock" - - $connection = New-Object -TypeName "System.Data.SqlClient.SqlConnection" - $connection.ConnectionString = "Server=$SQLServer;Integrated Security=SSPI;Database=Master" - $command = New-Object -TypeName "System.Data.SqlClient.SqlCommand" - - try - { - $connection.Open() - $command.Connection = $connection - - $command.CommandText = "CREATE DATABASE [$($Database)_Lock]" - $command.ExecuteNonQuery() - } - finally - { - if ($connection.State -eq "Open") - { - $connection.Close() - $connection.Dispose() - } - } -} - -<# - -.SYNOPSIS - -Remove-SPDSCConfigDBLock is used to create a lock to tell other servers that the -config DB is currently provisioning - -.DESCRIPTION - -Remove-SPDSCConfigDBLock will cremove the lock database created by the -Add-SPDSCConfigDBLock command. - -.PARAMETER SQLServer - -The name of the SQL server to check against - -.PARAMETER Database - -The name of the database to validate as the configuration database - -.EXAMPLE - -Remove-SPDSCConfigDBLock -SQLServer sql.contoso.com -Database SP_Config - -#> -function Remove-SPDSCConfigDBLock -{ - param( - [Parameter(Mandatory = $true)] - [String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [String] - $Database - ) - - Write-Verbose -Message "Removing lock database $($Database)_Lock" - - $connection = New-Object -TypeName "System.Data.SqlClient.SqlConnection" - $connection.ConnectionString = "Server=$SQLServer;Integrated Security=SSPI;Database=Master" - $command = New-Object -TypeName "System.Data.SqlClient.SqlCommand" - - try - { - $connection.Open() - $command.Connection = $connection - - $command.CommandText = "DROP DATABASE [$($Database)_Lock]" - $command.ExecuteNonQuery() - } - finally - { - if ($connection.State -eq "Open") - { - $connection.Close() - $connection.Dispose() - } - } -} - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.Search/SPSearchContentSource.Schedules.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.Search/SPSearchContentSource.Schedules.psm1 deleted file mode 100644 index a9c02254..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.Search/SPSearchContentSource.Schedules.psm1 +++ /dev/null @@ -1,136 +0,0 @@ -function Get-SPDSCSearchCrawlSchedule -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param( - [parameter(Mandatory = $false)] - $Schedule - ) - - if ($null -eq $Schedule) - { - return @{ - ScheduleType = "None" - } - } - - $scheduleType = $Schedule.GetType().Name - $result = @{ - CrawlScheduleRepeatDuration = $Schedule.RepeatDuration - CrawlScheduleRepeatInterval = $Schedule.RepeatInterval - StartHour = $Schedule.StartHour - StartMinute = $Schedule.StartMinute - } - - switch ($scheduleType) - { - "DailySchedule" { - $result.Add("ScheduleType", "Daily") - $result.Add("CrawlScheduleRunEveryInterval", $Schedule.DaysInterval) - } - "WeeklySchedule" { - $result.Add("ScheduleType", "Weekly") - $result.Add("CrawlScheduleRunEveryInterval", $Schedule.WeeksInterval) - $result.Add("CrawlScheduleDaysOfWeek", $Schedule.DaysOfWeek) - } - "MonthlyDateSchedule" { - $result.Add("ScheduleType", "Monthly") - $result.Add("CrawlScheduleDaysOfMonth", ($Schedule.DaysOfMonth.ToString() -replace "Day")) - $result.Add("CrawlScheduleMonthsOfYear", $schedule.MonthsOfYear) - } - Default { - throw "An unknown schedule type was detected" - } - } - return $result -} - -function Test-SPDSCSearchCrawlSchedule -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param( - [parameter(Mandatory = $true)] $CurrentSchedule, - [parameter(Mandatory = $true)] $DesiredSchedule - ) - - Import-Module -Name (Join-Path -Path $PSScriptRoot ` - -ChildPath "..\SharePointDsc.Util\SharePointDsc.Util.psm1") - - if ($CurrentSchedule.ScheduleType -ne $DesiredSchedule.ScheduleType) - { - return $false - } - - if ((Test-SPDSCObjectHasProperty -Object $DesiredSchedule ` - -PropertyName "CrawlScheduleRepeatDuration") -eq $true ` - -and $CurrentSchedule.CrawlScheduleRepeatDuration -ne $DesiredSchedule.CrawlScheduleRepeatDuration) - { - return $false - } - if ((Test-SPDSCObjectHasProperty -Object $DesiredSchedule ` - -PropertyName "CrawlScheduleRepeatInterval") -eq $true ` - -and $CurrentSchedule.CrawlScheduleRepeatInterval -ne $DesiredSchedule.CrawlScheduleRepeatInterval) - { - return $false - } - if ((Test-SPDSCObjectHasProperty -Object $DesiredSchedule ` - -PropertyName "StartHour") -eq $true ` - -and $CurrentSchedule.StartHour -ne $DesiredSchedule.StartHour) - { - return $false - } - if ((Test-SPDSCObjectHasProperty -Object $DesiredSchedule ` - -PropertyName "StartMinute") -eq $true ` - -and $CurrentSchedule.StartMinute -ne $DesiredSchedule.StartMinute) - { - return $false - } - - switch ($CurrentSchedule.ScheduleType) - { - "Daily" { - if ((Test-SPDSCObjectHasProperty -Object $DesiredSchedule ` - -PropertyName "CrawlScheduleRunEveryInterval") -eq $true ` - -and $CurrentSchedule.CrawlScheduleRunEveryInterval -ne $DesiredSchedule.CrawlScheduleRunEveryInterval) - { - return $false - } - } - "Weekly" { - if ((Test-SPDSCObjectHasProperty -Object $DesiredSchedule ` - -PropertyName "CrawlScheduleRunEveryInterval") -eq $true ` - -and $CurrentSchedule.CrawlScheduleRunEveryInterval -ne $DesiredSchedule.CrawlScheduleRunEveryInterval) - { - return $false - } - $days = $CurrentSchedule.CrawlScheduleDaysOfWeek.ToString() - if ((Test-SPDSCObjectHasProperty -Object $DesiredSchedule ` - -PropertyName "CrawlScheduleDaysOfWeek") -eq $true ` - -and $null -ne (Compare-Object -ReferenceObject $days.Split(', ', [System.StringSplitOptions]::RemoveEmptyEntries) ` - -DifferenceObject $DesiredSchedule.CrawlScheduleDaysOfWeek)) - { - return $false - } - } - "Monthly" { - if ((Test-SPDSCObjectHasProperty -Object $DesiredSchedule ` - -PropertyName "CrawlScheduleDaysOfMonth") -eq $true ` - -and $CurrentSchedule.CrawlScheduleDaysOfMonth -ne $DesiredSchedule.CrawlScheduleDaysOfMonth) - { - return $false - } - $months = $CurrentSchedule.CrawlScheduleMonthsOfYear.ToString() - if ((Test-SPDSCObjectHasProperty -Object $DesiredSchedule ` - -PropertyName "CrawlScheduleMonthsOfYear") -eq $true ` - -and $null -eq (Compare-Object -ReferenceObject $months.Split(', ', [System.StringSplitOptions]::RemoveEmptyEntries) ` - -DifferenceObject $DesiredSchedule.CrawlScheduleMonthsOfYear)) - { - return $false - } - } - } - return $true -} - -Export-ModuleMember -Function * diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 deleted file mode 100644 index dc796e2d..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 +++ /dev/null @@ -1,750 +0,0 @@ -function Add-SPDSCUserToLocalAdmin -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true,Position=1)] - [string] - $UserName - ) - - if ($UserName.Contains("\") -eq $false) - { - throw [Exception] "Usernames should be formatted as domain\username" - } - - $domainName = $UserName.Split('\')[0] - $accountName = $UserName.Split('\')[1] - - Write-Verbose -Message "Adding $domainName\$userName to local admin group" - ([ADSI]"WinNT://$($env:computername)/Administrators,group").Add("WinNT://$domainName/$accountName") | Out-Null -} - -function Get-SPDscOSVersion -{ - [CmdletBinding()] - param() - return [System.Environment]::OSVersion.Version -} - -function Get-SPDSCAssemblyVersion -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true,Position=1)] - [string] - $PathToAssembly - ) - return (Get-Command $PathToAssembly).FileVersionInfo.FileMajorPart -} - -function Get-SPDscFarmVersionInfo -{ - param - ( - [parameter(Mandatory = $false)] - [System.String] - $ProductToCheck - ) - - $farm = Get-SPFarm - $productVersions = [Microsoft.SharePoint.Administration.SPProductVersions]::GetProductVersions($farm) - $server = Get-SPServer -Identity $env:COMPUTERNAME - $versionInfo = @{} - $versionInfo.Highest = "" - $versionInfo.Lowest = "" - - $serverProductInfo = $productVersions.GetServerProductInfo($server.id) - $products = $serverProductInfo.Products - - if ($ProductToCheck) - { - $products = $products | Where-Object -FilterScript { - $_ -eq $ProductToCheck - } - - if ($null -eq $products) - { - throw "Product not found: $ProductToCheck" - } - } - - # Loop through all products - foreach ($product in $products) - { - $singleProductInfo = $serverProductInfo.GetSingleProductInfo($product) - $patchableUnits = $singleProductInfo.PatchableUnitDisplayNames - - # Loop through all individual components within the product - foreach ($patchableUnit in $patchableUnits) - { - # Check if the displayname is the Proofing tools (always mentioned in first product, - # generates noise) - if (($patchableUnit -notmatch "Microsoft Server Proof") -and - ($patchableUnit -notmatch "SQL Express") -and - ($patchableUnit -notmatch "OMUI") -and - ($patchableUnit -notmatch "XMUI") -and - ($patchableUnit -notmatch "Project Server") -and - ($patchableUnit -notmatch "Microsoft SharePoint Server (2013|2016)")) - { - $patchableUnitsInfo = $singleProductInfo.GetPatchableUnitInfoByDisplayName($patchableUnit) - $currentVersion = "" - foreach ($patchableUnitInfo in $patchableUnitsInfo) - { - # Loop through version of the patchableUnit - $currentVersion = $patchableUnitInfo.LatestPatch.Version.ToString() - - # Check if the version of the patchableUnit is the highest for the installed product - if ($currentVersion -gt $versionInfo.Highest) - { - $versionInfo.Highest = $currentVersion - } - - if ($versionInfo.Lowest -eq "") - { - $versionInfo.Lowest = $currentVersion - } - else - { - if ($currentversion -lt $versionInfo.Lowest) - { - $versionInfo.Lowest = $currentVersion - } - } - } - } - } - } - return $versionInfo -} - -function Get-SPDscFarmProductsInfo -{ - $farm = Get-SPFarm - $productVersions = [Microsoft.SharePoint.Administration.SPProductVersions]::GetProductVersions($farm) - $server = Get-SPServer -Identity $env:COMPUTERNAME - - $serverProductInfo = $productVersions.GetServerProductInfo($server.id) - return $serverProductInfo.Products -} - -function Get-SPDscRegProductsInfo -{ - $registryLocation = Get-ChildItem -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall" - $sharePointPrograms = $registryLocation | Where-Object -FilterScript { - $_.PsPath -like "*\Office*" - } | ForEach-Object -Process { - Get-ItemProperty -Path $_.PsPath - } - - return $sharePointPrograms.DisplayName -} - -function Get-SPDSCRegistryKey -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Key, - - [parameter(Mandatory = $true)] - [System.String] - $Value - ) - - if ((Test-Path -Path $Key) -eq $true) - { - $regKey = Get-ItemProperty -LiteralPath $Key - return $regKey.$Value - } - else - { - throw "Specified registry key $Key could not be found." - } -} - -function Get-SPDSCServiceContext -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true,Position=1)] - $ProxyGroup - ) - Write-Verbose -Message "Getting SPContext for Proxy group $($proxyGroup)" - return [Microsoft.SharePoint.SPServiceContext]::GetContext($proxyGroup,[Microsoft.SharePoint.SPSiteSubscriptionIdentifier]::Default) -} - -function Get-SPDSCContentService -{ - [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") | Out-Null - return [Microsoft.SharePoint.Administration.SPWebService]::ContentService -} - -function Get-SPDSCUserProfileSubTypeManager -{ - [CmdletBinding()] - param - ( - $Context - ) - [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") | Out-Null - return [Microsoft.Office.Server.UserProfiles.ProfileSubtypeManager]::Get($Context) -} - -function Get-SPDSCInstalledProductVersion -{ - $pathToSearch = "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\*\ISAPI\Microsoft.SharePoint.dll" - $fullPath = Get-Item $pathToSearch | Sort-Object { $_.Directory } -Descending | Select-Object -First 1 - return (Get-Command $fullPath).FileVersionInfo -} - -function Invoke-SPDSCCommand -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $Credential, - - [parameter(Mandatory = $false)] - [Object[]] - $Arguments, - - [parameter(Mandatory = $true)] - [ScriptBlock] - $ScriptBlock - ) - - $VerbosePreference = 'Continue' - - $baseScript = @" - if (`$null -eq (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue)) - { - Add-PSSnapin Microsoft.SharePoint.PowerShell - } - -"@ - - $invokeArgs = @{ - ScriptBlock = [ScriptBlock]::Create($baseScript + $ScriptBlock.ToString()) - } - if ($null -ne $Arguments) - { - $invokeArgs.Add("ArgumentList", $Arguments) - } - - if ($null -eq $Credential) - { - if ($Env:USERNAME.Contains("$")) - { - throw [Exception] ("You need to specify a value for either InstallAccount " + ` - "or PsDscRunAsCredential.") - return - } - Write-Verbose -Message "Executing as the local run as user $($Env:USERDOMAIN)\$($Env:USERNAME)" - - try - { - $result = Invoke-Command @invokeArgs -Verbose - } - catch - { - if ($_.Exception.Message.Contains("An update conflict has occurred, and you must re-try this action")) - { - Write-Verbose -Message ("Detected an update conflict, restarting server to " + ` - "allow DSC to resume and retry") - $global:DSCMachineStatus = 1 - } - else - { - throw $_ - } - } - return $result - } - else - { - if ($Credential.UserName.Split("\")[1] -eq $Env:USERNAME) - { - if (-not $Env:USERNAME.Contains("$")) - { - throw [Exception] ("Unable to use both InstallAccount and " + ` - "PsDscRunAsCredential in a single resource. Remove one " + ` - "and try again.") - return - } - } - Write-Verbose -Message ("Executing using a provided credential and local PSSession " + ` - "as user $($Credential.UserName)") - - # Running garbage collection to resolve issues related to Azure DSC extention use - [GC]::Collect() - - $session = New-PSSession -ComputerName $env:COMPUTERNAME ` - -Credential $Credential ` - -Authentication CredSSP ` - -Name "Microsoft.SharePoint.DSC" ` - -SessionOption (New-PSSessionOption -OperationTimeout 0 ` - -IdleTimeout 60000) ` - -ErrorAction Continue - - if ($session) - { - $invokeArgs.Add("Session", $session) - } - - try - { - $result = Invoke-Command @invokeArgs -Verbose - } - catch - { - if ($_.Exception.Message.Contains("An update conflict has occurred, and you must re-try this action")) - { - Write-Verbose -Message ("Detected an update conflict, restarting server to " + ` - "allow DSC to resume and retry") - $global:DSCMachineStatus = 1 - } - else - { - throw $_ - } - } - - if ($session) - { - Remove-PSSession -Session $session - } - return $result - } -} - -function Rename-SPDSCParamValue -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true,Position=1,ValueFromPipeline=$true)] - $Params, - - [parameter(Mandatory = $true,Position=2)] - $OldName, - - [parameter(Mandatory = $true,Position=3)] - $NewName - ) - - if ($Params.ContainsKey($OldName)) - { - $Params.Add($NewName, $Params.$OldName) - $Params.Remove($OldName) | Out-Null - } - return $Params -} - -function Remove-SPDSCUserToLocalAdmin -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true,Position=1)] - [string] - $UserName - ) - - if ($UserName.Contains("\") -eq $false) - { - throw [Exception] "Usernames should be formatted as domain\username" - } - - $domainName = $UserName.Split('\')[0] - $accountName = $UserName.Split('\')[1] - - Write-Verbose -Message "Removing $domainName\$userName from local admin group" - ([ADSI]"WinNT://$($env:computername)/Administrators,group").Remove("WinNT://$domainName/$accountName") | Out-Null -} - -function Resolve-SPDscSecurityIdentifier -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] - $SID - ) - $memberName = ([wmi]"Win32_SID.SID='$SID'").AccountName - $memberName = "$($env:USERDOMAIN)\$memberName" - return $memberName -} - -function Test-SPDSCObjectHasProperty -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true,Position=1)] - [Object] - $Object, - - [parameter(Mandatory = $true,Position=2)] - [String] - $PropertyName - ) - - if (([bool]($Object.PSobject.Properties.name -contains $PropertyName)) -eq $true) - { - if ($null -ne $Object.$PropertyName) - { - return $true - } - } - return $false -} - -function Test-SPDSCRunAsCredential -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $false)] - [System.Management.Automation.PSCredential] - $Credential - ) - - # If no specific credential is passed and it's not the machine account, it must be - # PsDscRunAsCredential - if (($null -eq $Credential) -and ($Env:USERNAME.Contains("$") -eq $false)) - { - return $true - } - # return false for all other scenarios - return $false -} - -function Test-SPDSCRunningAsFarmAccount -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param ( - [parameter(Mandatory = $false)] - [pscredential] - $InstallAccount - ) - - if ($null -eq $InstallAccount) - { - if ($Env:USERNAME.Contains("$")) - { - throw [Exception] "You need to specify a value for either InstallAccount or PsDscRunAsCredential." - return - } - $Username = "$($Env:USERDOMAIN)\$($Env:USERNAME)" - } - else - { - $Username = $InstallAccount.UserName - } - - $result = Invoke-SPDSCCommand -Credential $InstallAccount -ScriptBlock { - try - { - $spFarm = Get-SPFarm - } - catch - { - Write-Verbose -Message "Unable to detect local farm." - return $null - } - return $spFarm.DefaultServiceAccount.Name - } - - if ($Username -eq $result) - { - return $true - } - return $false -} - -function Test-SPDscParameterState -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true, Position=1)] - [HashTable] - $CurrentValues, - - [parameter(Mandatory = $true, Position=2)] - [Object] - $DesiredValues, - - [parameter(Mandatory = $false, Position=3)] - [Array] - $ValuesToCheck - ) - - $returnValue = $true - - if (($DesiredValues.GetType().Name -ne "HashTable") ` - -and ($DesiredValues.GetType().Name -ne "CimInstance") ` - -and ($DesiredValues.GetType().Name -ne "PSBoundParametersDictionary")) - { - throw ("Property 'DesiredValues' in Test-SPDscParameterState must be either a " + ` - "Hashtable or CimInstance. Type detected was $($DesiredValues.GetType().Name)") - } - - if (($DesiredValues.GetType().Name -eq "CimInstance") -and ($null -eq $ValuesToCheck)) - { - throw ("If 'DesiredValues' is a CimInstance then property 'ValuesToCheck' must contain " + ` - "a value") - } - - if (($null -eq $ValuesToCheck) -or ($ValuesToCheck.Count -lt 1)) - { - $KeyList = $DesiredValues.Keys - } - else - { - $KeyList = $ValuesToCheck - } - - $KeyList | ForEach-Object -Process { - if (($_ -ne "Verbose") -and ($_ -ne "InstallAccount")) - { - if (($CurrentValues.ContainsKey($_) -eq $false) ` - -or ($CurrentValues.$_ -ne $DesiredValues.$_) ` - -or (($DesiredValues.ContainsKey($_) -eq $true) -and ($null -ne $DesiredValues.$_ -and $DesiredValues.$_.GetType().IsArray))) - { - if ($DesiredValues.GetType().Name -eq "HashTable" -or ` - $DesiredValues.GetType().Name -eq "PSBoundParametersDictionary") - { - $CheckDesiredValue = $DesiredValues.ContainsKey($_) - } - else - { - $CheckDesiredValue = Test-SPDSCObjectHasProperty $DesiredValues $_ - } - - if ($CheckDesiredValue) - { - $desiredType = $DesiredValues.$_.GetType() - $fieldName = $_ - if ($desiredType.IsArray -eq $true) - { - if (($CurrentValues.ContainsKey($fieldName) -eq $false) ` - -or ($null -eq $CurrentValues.$fieldName)) - { - Write-Verbose -Message ("Expected to find an array value for " + ` - "property $fieldName in the current " + ` - "values, but it was either not present or " + ` - "was null. This has caused the test method " + ` - "to return false.") - $returnValue = $false - } - else - { - $arrayCompare = Compare-Object -ReferenceObject $CurrentValues.$fieldName ` - -DifferenceObject $DesiredValues.$fieldName - if ($null -ne $arrayCompare) - { - Write-Verbose -Message ("Found an array for property $fieldName " + ` - "in the current values, but this array " + ` - "does not match the desired state. " + ` - "Details of the changes are below.") - $arrayCompare | ForEach-Object -Process { - Write-Verbose -Message "$($_.InputObject) - $($_.SideIndicator)" - } - $returnValue = $false - } - } - } - else - { - switch ($desiredType.Name) - { - "String" { - if ([string]::IsNullOrEmpty($CurrentValues.$fieldName) ` - -and [string]::IsNullOrEmpty($DesiredValues.$fieldName)) - {} - else - { - Write-Verbose -Message ("String value for property " + ` - "$fieldName does not match. " + ` - "Current state is " + ` - "'$($CurrentValues.$fieldName)' " + ` - "and desired state is " + ` - "'$($DesiredValues.$fieldName)'") - $returnValue = $false - } - } - "Int32" { - if (($DesiredValues.$fieldName -eq 0) ` - -and ($null -eq $CurrentValues.$fieldName)) - {} - else - { - Write-Verbose -Message ("Int32 value for property " + ` - "$fieldName does not match. " + ` - "Current state is " + ` - "'$($CurrentValues.$fieldName)' " + ` - "and desired state is " + ` - "'$($DesiredValues.$fieldName)'") - $returnValue = $false - } - } - "Int16" { - if (($DesiredValues.$fieldName -eq 0) ` - -and ($null -eq $CurrentValues.$fieldName)) - {} - else - { - Write-Verbose -Message ("Int16 value for property " + ` - "$fieldName does not match. " + ` - "Current state is " + ` - "'$($CurrentValues.$fieldName)' " + ` - "and desired state is " + ` - "'$($DesiredValues.$fieldName)'") - $returnValue = $false - } - } - default { - Write-Verbose -Message ("Unable to compare property $fieldName " + ` - "as the type ($($desiredType.Name)) is " + ` - "not handled by the " + ` - "Test-SPDscParameterState cmdlet") - $returnValue = $false - } - } - } - } - } - } - } - return $returnValue -} - -function Test-SPDSCUserIsLocalAdmin -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true,Position=1)] - [string] - $UserName - ) - - if ($UserName.Contains("\") -eq $false) - { - throw [Exception] "Usernames should be formatted as domain\username" - } - - $domainName = $UserName.Split('\')[0] - $accountName = $UserName.Split('\')[1] - - return ([ADSI]"WinNT://$($env:computername)/Administrators,group").PSBase.Invoke("Members") | ` - ForEach-Object -Process { - $_.GetType().InvokeMember("Name", 'GetProperty', $null, $_, $null) - } | Where-Object -FilterScript { - $_ -eq $accountName - } -} - -function Test-SPDSCIsADUser -{ - [OutputType([System.Boolean])] - [CmdletBinding()] - param ( - [string] - $IdentityName - ) - - if ($IdentityName -like "*\*") - { - $IdentityName = $IdentityName.Substring($IdentityName.IndexOf('\') + 1) - } - - $searcher = New-Object -TypeName System.DirectoryServices.DirectorySearcher - $searcher.filter = "((samAccountName=$IdentityName))" - $searcher.SearchScope = "subtree" - $searcher.PropertiesToLoad.Add("objectClass") | Out-Null - $searcher.PropertiesToLoad.Add("objectCategory") | Out-Null - $searcher.PropertiesToLoad.Add("name") | Out-Null - $result = $searcher.FindOne() - - if ($null -eq $result) - { - throw "Unable to locate identity '$IdentityName' in the current domain." - } - - if ($result[0].Properties.objectclass -contains "user") - { - return $true - } - else - { - return $false - } -} - -function Set-SPDscObjectPropertyIfValuePresent -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [object] - $ObjectToSet, - - [parameter(Mandatory = $true)] - [string] - $PropertyToSet, - - [parameter(Mandatory = $true)] - [object] - $ParamsValue, - - [parameter(Mandatory = $true)] - [string] - $ParamKey - ) - if ($ParamsValue.PSobject.Methods.name -contains "ContainsKey") - { - if ($ParamsValue.ContainsKey($ParamKey) -eq $true) - { - $ObjectToSet.$PropertyToSet = $ParamsValue.$ParamKey - } - } - else - { - if (((Test-SPDSCObjectHasProperty $ParamsValue $ParamKey) -eq $true) ` - -and ($null -ne $ParamsValue.$ParamKey)) - { - $ObjectToSet.$PropertyToSet = $ParamsValue.$ParamKey - } - } -} - -function Remove-SPDSCGenericObject -{ - [CmdletBinding()] - param ( - [parameter(Mandatory = $true)] - [Object] - $SourceCollection, - - [parameter(Mandatory = $true)] - [Object] - $Target - ) - $SourceCollection.Remove($Target) -} - -Export-ModuleMember -Function * diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.WebAppPolicy/SPWebAppPolicy.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.WebAppPolicy/SPWebAppPolicy.psm1 deleted file mode 100644 index 3cc63ae9..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.WebAppPolicy/SPWebAppPolicy.psm1 +++ /dev/null @@ -1,194 +0,0 @@ -function Assert-SPDSCPolicyUser() -{ - Param ( - [Parameter(Mandatory=$false)] - [Array] - $CurrentDifferences, - - [Parameter(Mandatory=$true)] - [String] - $UsernameToCheck - ) - - foreach ($difference in $CurrentDifferences) - { - if($difference.ContainsKey($UsernameToCheck)) - { - return $true - } - } - return $false -} - -function Compare-SPDSCWebAppPolicy() -{ - Param ( - [Parameter(Mandatory=$true)] - [Array] - $WAPolicies, - - [Parameter(Mandatory=$true)] - [Array] - $DSCSettings, - - [Parameter(Mandatory=$true)] - [String] - $DefaultIdentityType - ) - Import-Module -Name (Join-Path -Path $PSScriptRoot ` - -ChildPath "..\SharePointDsc.Util\SharePointDsc.Util.psm1" ` - -Resolve) - $diff = @() - - foreach ($policy in $WAPolicies) - { - $memberexists = $false - foreach($setting in $DSCSettings) - { - $identityType = $DefaultIdentityType - if ((Test-SPDSCObjectHasProperty -Object $setting ` - -PropertyName "IdentityType") -eq $true) - { - $identityType = $setting.IdentityType - } - if (($policy.Username -eq $setting.Username) -and ` - ($policy.IdentityType -eq $identityType)) - { - - $memberexists = $true - - $polbinddiff = Compare-Object -ReferenceObject $policy.PermissionLevel.ToLower() ` - -DifferenceObject $setting.PermissionLevel.ToLower() - - if ($null -ne $polbinddiff) - { - Write-Verbose -Message ("Permission level different for " + ` - "$($policy.IdentityType) user '$($policy.Username)'") - - if (-not (Assert-SPDSCPolicyUser -CurrentDifferences $diff ` - -UsernameToCheck $policy.Username.ToLower())) - { - $diff += @{ - Username = $policy.Username.ToLower() - Status = "Different" - IdentityType = $policy.IdentityType - DesiredPermissionLevel = $setting.PermissionLevel - DesiredActAsSystemSetting = $setting.ActAsSystemAccount - } - } - } - - if ($setting.ActAsSystemAccount) - { - if ($policy.ActAsSystemAccount -ne $setting.ActAsSystemAccount) - { - Write-Verbose -Message ("System User different for " + ` - "$($policy.IdentityType) user '$($policy.Username)'") - - if (-not (Assert-SPDSCPolicyUser -CurrentDifferences $diff ` - -UsernameToCheck $policy.Username.ToLower())) - { - $diff += @{ - Username = $policy.Username.ToLower() - Status = "Different" - IdentityType = $policy.IdentityType - DesiredPermissionLevel = $setting.PermissionLevel - DesiredActAsSystemSetting = $setting.ActAsSystemAccount - } - } - } - } - } - } - - if (-not $memberexists) - { - if (-not (Assert-SPDSCPolicyUser -CurrentDifferences $diff ` - -UsernameToCheck $policy.Username.ToLower())) - { - $diff += @{ - Username = $policy.Username.ToLower() - Status = "Additional" - IdentityType = $policy.IdentityType - DesiredPermissionLevel = $null - DesiredActAsSystemSetting = $null - } - } - } - } - - foreach ($setting in $DSCSettings) - { - $memberexists = $false - $identityType = $DefaultIdentityType - if ((Test-SPDSCObjectHasProperty -Object $setting -PropertyName "IdentityType") -eq $true) - { - $identityType = $setting.IdentityType - } - foreach($policy in $WAPolicies) - { - if (($policy.Username -eq $setting.Username) -and ` - ($policy.IdentityType -eq $identityType)) - { - $memberexists = $true - - $polbinddiff = Compare-Object -ReferenceObject $policy.PermissionLevel.ToLower() ` - -DifferenceObject $setting.PermissionLevel.ToLower() - if ($null -ne $polbinddiff) - { - Write-Verbose -Message ("Permission level different for " + ` - "$($policy.IdentityType) user '$($policy.Username)'") - - if (-not (Assert-SPDSCPolicyUser -CurrentDifferences $diff ` - -UsernameToCheck $policy.Username.ToLower())) - { - $diff += @{ - Username = $setting.Username.ToLower() - Status = "Different" - IdentityType = $identityType - DesiredPermissionLevel = $setting.PermissionLevel - DesiredActAsSystemSetting = $setting.ActAsSystemAccount - } - } - } - - if ($setting.ActAsSystemAccount) - { - if ($policy.ActAsSystemAccount -ne $setting.ActAsSystemAccount) - { - Write-Verbose -Message ("System User different for " + ` - "$($policy.IdentityType) user '$($policy.Username)'") - - if (-not (Assert-SPDSCPolicyUser -CurrentDifferences $diff ` - -UsernameToCheck $policy.Username.ToLower())) - { - $diff += @{ - Username = $setting.Username.ToLower() - Status = "Different" - IdentityType = $identityType - DesiredPermissionLevel = $setting.PermissionLevel - DesiredActAsSystemSetting = $setting.ActAsSystemAccount - } - } - } - } - } - } - - if (-not $memberexists) - { - if (-not (Assert-SPDSCPolicyUser -CurrentDifferences $diff ` - -UsernameToCheck $setting.Username.ToLower())) - { - $diff += @{ - Username = $setting.Username.ToLower() - Status = "Missing" - IdentityType = $identityType - DesiredPermissionLevel = $setting.PermissionLevel - DesiredActAsSystemSetting = $setting.ActAsSystemAccount - } - } - } - } - return $diff -} diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.BlockedFileTypes.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.BlockedFileTypes.psm1 deleted file mode 100644 index d5711040..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.BlockedFileTypes.psm1 +++ /dev/null @@ -1,138 +0,0 @@ -function Get-SPDSCWebApplicationBlockedFileTypeConfig -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param( - [parameter(Mandatory = $true)] - $WebApplication - ) - $result = @() - $WebApplication.BlockedFileExtensions | ForEach-Object -Process { - $result += $_ - } - return @{ - Blocked = $result - } -} - -function Set-SPDSCWebApplicationBlockedFileTypeConfig -{ - [CmdletBinding()] - param( - [parameter(Mandatory = $true)] - $WebApplication, - - [parameter(Mandatory = $true)] - $Settings - ) - - if (($Settings.ContainsKey("Blocked") -eq $true) ` - -and (($Settings.ContainsKey("EnsureBlocked") -eq $true) ` - -or ($Settings.ContainsKey("EnsureAllowed") -eq $true))) - { - throw ("Blocked file types must use either the 'blocked' property or the " + ` - "'EnsureBlocked' and/or 'EnsureAllowed' properties, but not both.") - } - - if (($Settings.ContainsKey("Blocked") -eq $false) ` - -and ($Settings.ContainsKey("EnsureBlocked") -eq $false) ` - -and ($Settings.ContainsKey("EnsureAllowed") -eq $false)) - { - throw ("Blocked file types must specify at least one property (either 'Blocked, " + ` - "'EnsureBlocked' or 'EnsureAllowed')") - } - - if($Settings.ContainsKey("Blocked") -eq $true) - { - $WebApplication.BlockedFileExtensions.Clear(); - $Settings.Blocked | ForEach-Object -Process { - $WebApplication.BlockedFileExtensions.Add($_.ToLower()); - } - } - - if($Settings.ContainsKey("EnsureBlocked") -eq $true) - { - $Settings.EnsureBlocked | ForEach-Object -Process { - if(!$WebApplication.BlockedFileExtensions.Contains($_.ToLower())){ - $WebApplication.BlockedFileExtensions.Add($_.ToLower()); - } - } - } - - if($Settings.ContainsKey("EnsureAllowed") -eq $true) - { - $Settings.EnsureAllowed | ForEach-Object -Process { - if($WebApplication.BlockedFileExtensions.Contains($_.ToLower())){ - $WebApplication.BlockedFileExtensions.Remove($_.ToLower()); - } - } - } -} - -function Test-SPDSCWebApplicationBlockedFileTypeConfig -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param( - [parameter(Mandatory = $true)] - $CurrentSettings, - - [parameter(Mandatory = $true)] - $DesiredSettings - ) - - if (($DesiredSettings.ContainsKey("Blocked") -eq $true) ` - -and (($DesiredSettings.ContainsKey("EnsureBlocked") -eq $true) ` - -or ($DesiredSettings.ContainsKey("EnsureAllowed") -eq $true))) - { - throw ("Blocked file types must use either the 'blocked' property or the " + ` - "'EnsureBlocked' and/or 'EnsureAllowed' properties, but not both.") - } - - if (($DesiredSettings.ContainsKey("Blocked") -eq $false) ` - -and ($DesiredSettings.ContainsKey("EnsureBlocked") -eq $false) ` - -and ($DesiredSettings.ContainsKey("EnsureAllowed") -eq $false)) - { - throw ("Blocked file types must specify at least one property (either 'Blocked, " + ` - "'EnsureBlocked' or 'EnsureAllowed')") - } - - if ($DesiredSettings.ContainsKey("Blocked") -eq $true) - { - $compareResult = Compare-Object -ReferenceObject $CurrentSettings.Blocked ` - -DifferenceObject $DesiredSettings.Blocked - if ($null -eq $compareResult) - { - return $true - } - else - { - return $false - } - } - - if ($DesiredSettings.ContainsKey("EnsureBlocked") -eq $true) - { - $itemsToAdd = Compare-Object -ReferenceObject $CurrentSettings.Blocked ` - -DifferenceObject $DesiredSettings.EnsureBlocked | Where-Object { - $_.SideIndicator -eq "=>" - } - if ($null -ne $itemsToAdd) - { - return $false - } - } - - if ($DesiredSettings.ContainsKey("EnsureAllowed") -eq $true) - { - $itemsToRemove = Compare-Object -ReferenceObject $CurrentSettings.Blocked ` - -DifferenceObject $DesiredSettings.EnsureAllowed ` - -ExcludeDifferent -IncludeEqual - if ($null -ne $itemsToRemove) - { - return $false - } - } - return $true -} - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.GeneralSettings.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.GeneralSettings.psm1 deleted file mode 100644 index a6e26f47..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.GeneralSettings.psm1 +++ /dev/null @@ -1,142 +0,0 @@ -function Get-SPDSCWebApplicationGeneralConfig -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param( - [parameter(Mandatory = $true)] - $WebApplication - ) - - if ($WebApplication.DefaultTimeZone -eq -1) - { - $timezone = $null - } - else - { - $timezone = $WebApplication.DefaultTimeZone - } - - return @{ - TimeZone = $timezone - Alerts = $WebApplication.AlertsEnabled - AlertsLimit = $WebApplication.AlertsMaximum - RSS = $WebApplication.SyndicationEnabled - BlogAPI = $WebApplication.MetaWeblogEnabled - BlogAPIAuthenticated = $WebApplication.MetaWeblogAuthenticationEnabled - BrowserFileHandling = $WebApplication.BrowserFileHandling - SecurityValidation = $WebApplication.FormDigestSettings.Enabled - SecurityValidationExpires = $WebApplication.FormDigestSettings.Expires - SecurityValidationTimeoutMinutes = $WebApplication.FormDigestSettings.Timeout.TotalMinutes - RecycleBinEnabled = $WebApplication.RecycleBinEnabled - RecycleBinCleanupEnabled = $WebApplication.RecycleBinCleanupEnabled - RecycleBinRetentionPeriod = $WebApplication.RecycleBinRetentionPeriod - SecondStageRecycleBinQuota = $WebApplication.SecondStageRecycleBinQuota - MaximumUploadSize = $WebApplication.MaximumFileSize - CustomerExperienceProgram = $WebApplication.BrowserCEIPEnabled - PresenceEnabled = $WebApplication.PresenceEnabled - AllowOnlineWebPartCatalog = $WebApplication.AllowAccessToWebPartCatalog - SelfServiceSiteCreationEnabled = $WebApplication.SelfServiceSiteCreationEnabled - } -} - -function Set-SPDSCWebApplicationGeneralConfig -{ - [CmdletBinding()] - param( - [parameter(Mandatory = $true)] - $WebApplication, - - [parameter(Mandatory = $true)] - $Settings - ) - - if ($Settings.SecurityValidationTimeoutMinutes) - { - Write-Verbose -Message "timeout minutes: $($Settings.SecurityValidationTimeOutMinutes)" - $mins = New-TimeSpan -Minutes $Settings.SecurityValidationTimeoutMinutes - $Settings.SecurityValidationTimeoutMinutes = $mins - } - - # Format here is SPWebApplication property = Custom settings property - $mapping = @{ - DefaultTimeZone = "TimeZone" - AlertsEnabled = "Alerts" - AlertsMaximum = "AlertsLimit" - SyndicationEnabled = "RSS" - MetaWeblogEnabled = "BlogAPI" - MetaWeblogAuthenticationEnabled = "BlogAPIAuthenticated" - BrowserFileHandling = "BrowserFileHandling" - MaximumFileSize = "MaximumUploadSize" - RecycleBinEnabled = "RecycleBinEnabled" - RecycleBinCleanupEnabled = "RecycleBinCleanupEnabled" - RecycleBinRetentionPeriod = "RecycleBinRetentionPeriod" - SecondStageRecycleBinQuota = "SecondStageRecycleBinQuota" - BrowserCEIPEnabled = "CustomerExperienceProgram" - PresenceEnabled = "Presence" - AllowAccessToWebPartCatalog = "AllowOnlineWebPartCatalog" - SelfServiceSiteCreationEnabled = "SelfServiceSiteCreationEnabled" - } - $mapping.Keys | ForEach-Object -Process { - Set-SPDscObjectPropertyIfValuePresent -ObjectToSet $WebApplication ` - -PropertyToSet $_ ` - -ParamsValue $settings ` - -ParamKey $mapping[$_] - } - - # Set form digest settings child properties - Set-SPDscObjectPropertyIfValuePresent -ObjectToSet $WebApplication.FormDigestSettings ` - -PropertyToSet "Enabled" ` - -ParamsValue $settings ` - -ParamKey "SecurityValidation" - - Set-SPDscObjectPropertyIfValuePresent -ObjectToSet $WebApplication.FormDigestSettings ` - -PropertyToSet "Expires" ` - -ParamsValue $settings ` - -ParamKey "SecurityValidationExpires" - - Set-SPDscObjectPropertyIfValuePresent -ObjectToSet $WebApplication.FormDigestSettings ` - -PropertyToSet "Timeout" ` - -ParamsValue $settings ` - -ParamKey "SecurityValidationTimeOutMinutes" -} - -function Test-SPDSCWebApplicationGeneralConfig -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param( - [parameter(Mandatory = $true)] - $CurrentSettings, - - [parameter(Mandatory = $true)] - $DesiredSettings - ) - - $relPath = "..\..\Modules\SharePointDsc.Util\SharePointDsc.Util.psm1" - Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath $relPath -Resolve) - $valuesToCheck = @("TimeZone", - "Alerts", - "AlertsLimit", - "RSS", - "BlogAPI", - "BlogAPIAuthenticated", - "BrowserFileHandling", - "SecurityValidation", - "SecurityValidationExpires", - "SecurityValidationTimeoutMinutes", - "RecycleBinEnabled", - "RecycleBinCleanupEnabled", - "RecycleBinRetentionPeriod", - "SecondStageRecycleBinQuota", - "MaximumUploadSize", - "CustomerExperienceProgram", - "PresenceEnabled", - "AllowOnlineWebPartCatalog", - "SelfServiceSiteCreationEnabled" - ) - $testReturn = Test-SPDscParameterState -CurrentValues $CurrentSettings ` - -DesiredValues $DesiredSettings ` - -ValuesToCheck $valuesToCheck - return $testReturn -} - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.Throttling.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.Throttling.psm1 deleted file mode 100644 index 921d85ec..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.Throttling.psm1 +++ /dev/null @@ -1,172 +0,0 @@ -function Get-SPDSCWebApplicationThrottlingConfig -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param( - [parameter(Mandatory = $true)] - $WebApplication - ) - return @{ - ListViewThreshold = $WebApplication.MaxItemsPerThrottledOperation - AllowObjectModelOverride = $WebApplication.AllowOMCodeOverrideThrottleSettings - AdminThreshold = $WebApplication.MaxItemsPerThrottledOperationOverride - ListViewLookupThreshold = $WebApplication.MaxQueryLookupFields - HappyHourEnabled = $WebApplication.UnthrottledPrivilegedOperationWindowEnabled - HappyHour = @{ - Hour = $WebApplication.DailyStartUnthrottledPrivilegedOperationsHour - Minute = $WebApplication.DailyStartUnthrottledPrivilegedOperationsMinute - Duration = $WebApplication.DailyUnthrottledPrivilegedOperationsDuration - } - UniquePermissionThreshold = $WebApplication.MaxUniquePermScopesPerList - RequestThrottling = $WebApplication.HttpThrottleSettings.PerformThrottle - ChangeLogEnabled = $WebApplication.ChangeLogExpirationEnabled - ChangeLogExpiryDays = $WebApplication.ChangeLogRetentionPeriod.Days - EventHandlersEnabled = $WebApplication.EventHandlersEnabled - } -} - -function Set-SPDSCWebApplicationThrottlingConfig -{ - [CmdletBinding()] - param( - [parameter(Mandatory = $true)] - $WebApplication, - - [parameter(Mandatory = $true)] - $Settings - ) - - # Format here is SPWebApplication property = Custom settings property - $mapping = @{ - MaxItemsPerThrottledOperation = "ListViewThreshold" - AllowOMCodeOverrideThrottleSettings = "AllowObjectModelOverride" - MaxItemsPerThrottledOperationOverride = "AdminThreshold" - MaxQueryLookupFields = "ListViewLookupThreshold" - UnthrottledPrivilegedOperationWindowEnabled = "HappyHourEnabled" - MaxUniquePermScopesPerList = "UniquePermissionThreshold" - EventHandlersEnabled = "EventHandlersEnabled" - ChangeLogExpirationEnabled = "ChangeLogEnabled" - } - $mapping.Keys | ForEach-Object -Process { - Set-SPDscObjectPropertyIfValuePresent -ObjectToSet $WebApplication ` - -PropertyToSet $_ ` - -ParamsValue $settings ` - -ParamKey $mapping[$_] - } - - # Set throttle settings child property seperately - Set-SPDscObjectPropertyIfValuePresent -ObjectToSet $WebApplication.HttpThrottleSettings ` - -PropertyToSet "PerformThrottle" ` - -ParamsValue $Settings ` - -ParamKey "RequestThrottling" - - # Create time span object separately - if ((Test-SPDSCObjectHasProperty $Settings "ChangeLogExpiryDays") -eq $true) - { - $days = New-TimeSpan -Days $Settings.ChangeLogExpiryDays - $WebApplication.ChangeLogRetentionPeriod = $days - } -} - - -function Set-SPDSCWebApplicationHappyHourConfig -{ - [CmdletBinding()] - param( - [parameter(Mandatory = $true)] - $WebApplication, - - [parameter(Mandatory = $true)] - $Settings - ) - - if ((Test-SPDSCObjectHasProperty $Settings "Hour") -eq $false ` - -or (Test-SPDSCObjectHasProperty $Settings "Minute") -eq $false ` - -or (Test-SPDSCObjectHasProperty $Settings "Duration") -eq $false) - { - throw "Happy hour settings must include 'hour', 'minute' and 'duration'" - } - else - { - if ($Settings.Hour -lt 0 -or $Settings.Hour -gt 23) - { - throw "Happy hour setting 'hour' must be between 0 and 23" - } - if ($Settings.Minute -lt 0 -or $Settings.Minute -gt 59) - { - throw "Happy hour setting 'minute' must be between 0 and 59" - } - if ($Settings.Duration -lt 0 -or $Settings.Duration -gt 23) - { - throw "Happy hour setting 'hour' must be between 0 and 23" - } - $h = $Settings.Hour - $m = $Settings.Minute - $d = $Settings.Duration - $WebApplication.SetDailyUnthrottledPrivilegedOperationWindow($h, $m, $d) - } -} - -function Test-SPDSCWebApplicationThrottlingConfig -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param( - [parameter(Mandatory = $true)] - $CurrentSettings, - - [parameter(Mandatory = $true)] - $DesiredSettings - ) - - $relPath = "..\..\Modules\SharePointDsc.Util\SharePointDsc.Util.psm1" - Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath $relPath -Resolve) - $testReturn = Test-SPDscParameterState -CurrentValues $CurrentSettings ` - -DesiredValues $DesiredSettings ` - -ValuesToCheck @( - "ListViewThreshold", - "AllowObjectModelOverride", - "AdminThreshold", - "ListViewLookupThreshold", - "HappyHourEnabled", - "UniquePermissionThreshold", - "RequestThrottling", - "ChangeLogEnabled", - "ChangeLogExpiryDays", - "EventHandlersEnabled" - ) - if ($testReturn -eq $true) - { - if ($null -ne $DesiredSettings.HappyHour) - { - $DesiredHappyHour = @{} - if ($null -ne $DesiredSettings.HappyHour.Hour) - { - $DesiredHappyHour.Add("Hour",[int32]$DesiredSettings.HappyHour.Hour) - } - else - { - $DesiredHappyHour.Add("Hour",$null) - } - if ($null -ne $DesiredSettings.HappyHour.Minute) - { - $DesiredHappyHour.Add("Minute",[int32]$DesiredSettings.HappyHour.Minute) - } else - { - $DesiredHappyHour.Add("Minute",$null) - } - if ($null -ne $DesiredSettings.HappyHour.Duration) - { - $DesiredHappyHour.Add("Duration",[int32]$DesiredSettings.HappyHour.Duration) - } else - { - $DesiredHappyHour.Add("Duration",$null) - } - - $testReturn = Test-SPDscParameterState -CurrentValues $CurrentSettings.HappyHour ` - -DesiredValues $DesiredHappyHour ` - -ValuesToCheck @("Hour", "Minute", "Duration") - } - } - return $testReturn -} diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.Workflow.psm1 b/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.Workflow.psm1 deleted file mode 100644 index 25814e04..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.Workflow.psm1 +++ /dev/null @@ -1,68 +0,0 @@ -function Get-SPDSCWebApplicationWorkflowConfig -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param( - [parameter(Mandatory = $true)] - $WebApplication - ) - return @{ - ExternalWorkflowParticipantsEnabled = ` - $WebApplication.ExternalWorkflowParticipantsEnabled - UserDefinedWorkflowsEnabled = ` - $WebApplication.UserDefinedWorkflowsEnabled - EmailToNoPermissionWorkflowParticipantsEnable = ` - $WebApplication.EmailToNoPermissionWorkflowParticipantsEnabled - } -} - -function Set-SPDSCWebApplicationWorkflowConfig -{ - [CmdletBinding()] - param( - [parameter(Mandatory = $true)] - $WebApplication, - - [parameter(Mandatory = $true)] - $Settings - ) - if ($Settings.ContainsKey("UserDefinedWorkflowsEnabled") -eq $true) - { - $WebApplication.UserDefinedWorkflowsEnabled = ` - $Settings.UserDefinedWorkflowsEnabled; - } - if ($Settings.ContainsKey("EmailToNoPermissionWorkflowParticipantsEnable") -eq $true) - { - $WebApplication.EmailToNoPermissionWorkflowParticipantsEnabled = ` - $Settings.EmailToNoPermissionWorkflowParticipantsEnable; - } - if ($Settings.ContainsKey("ExternalWorkflowParticipantsEnabled") -eq $true) - { - $WebApplication.ExternalWorkflowParticipantsEnabled = ` - $Settings.ExternalWorkflowParticipantsEnabled; - } - $WebApplication.UpdateWorkflowConfigurationSettings(); -} - -function Test-SPDSCWebApplicationWorkflowConfig { - [CmdletBinding()] - [OutputType([System.Boolean])] - param( - [parameter(Mandatory = $true)] - $CurrentSettings, - - [parameter(Mandatory = $true)] - $DesiredSettings - ) - - $relPath = "..\..\Modules\SharePointDsc.Util\SharePointDsc.Util.psm1" - Import-Module (Join-Path $PSScriptRoot $relPath -Resolve) - $valuesTocheck = @("UserDefinedWorkflowsEnabled", - "EmailToNoPermissionWorkflowParticipantsEnable", - "ExternalWorkflowParticipantsEnabled") - $testReturn = Test-SPDscParameterState -CurrentValues $CurrentSettings ` - -DesiredValues $DesiredSettings ` - -ValuesToCheck $valuesTocheck - return $testReturn -} - diff --git a/lib/puppet_x/dsc_resources/SharePointDsc/SharePointDsc.psd1 b/lib/puppet_x/dsc_resources/SharePointDsc/SharePointDsc.psd1 deleted file mode 100644 index 4bcfa646..00000000 --- a/lib/puppet_x/dsc_resources/SharePointDsc/SharePointDsc.psd1 +++ /dev/null @@ -1,163 +0,0 @@ -# -# Module manifest for module 'SharePointDsc' -# -# Generated by: Brian Farnhill -# -# Generated on: 17/03/2015 -# - -@{ - -# Script module or binary module file associated with this manifest. -# RootModule = '' - -# Version number of this module. -ModuleVersion = '1.8.0.0' - -# ID used to uniquely identify this module -GUID = '6c1176a0-4fac-4134-8ca2-3fa8a21a7b90' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2015-2017 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'This DSC module is used to deploy and configure SharePoint Server 2013 and 2016, and covers a wide range of areas including web apps, service apps and farm configuration.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Name of the Windows PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the Windows PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module -# DotNetFrameworkVersion = '' - -# Minimum version of the common language runtime (CLR) required by this module -# CLRVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -# RequiredModules = @() - -# Assemblies that must be loaded prior to importing this module -# RequiredAssemblies = @() - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -# FormatsToProcess = @() - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -NestedModules = @("modules\SharePointDsc.Util\SharePointDsc.Util.psm1") - -# Functions to export from this module -#FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = @("Invoke-SPDSCCommand", - "Get-SPDSCInstalledProductVersion", - "Get-SPDSCContentService", - "Rename-SPDSCParamValue", - "Add-SPDSCUserToLocalAdmin", - "Remove-SPDSCUserToLocalAdmin", - "Test-SPDSCObjectHasProperty", - "Test-SPDSCRunAsCredential", - "Test-SPDSCUserIsLocalAdmin", - "Test-SPDscParameterState", - "Test-SPDSCIsADUser", - "Test-SPDSCRunningAsFarmAccount", - "Set-SPDscObjectPropertyIfValuePresent", - "Get-SPDSCUserProfileSubTypeManager", - "Get-SPDscOSVersion", - "Get-SPDSCRegistryKey", - "Resolve-SPDscSecurityIdentifier", - "Get-SPDscFarmProductsInfo", - "Get-SPDscFarmVersionInfo") - -# Variables to export from this module -#VariablesToExport = '*' - -# Aliases to export from this module -#AliasesToExport = '*' - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -prefix. -# DefaultCommandPrefix = '' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/SharePointDsc/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/SharePointDsc' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = " -* Fixed issue in SPServiceAppProxyGroup causing some service names to return as null -* Added TLS and SMTP port support for SharePoint 2016 -* Fixed issue in SPWebApplication where the Get method didn't return Classic - web applications properly -* Fixed issue in SPSubscriptionSettingsServiceApp not returning database values -* Updated Readme of SPInstall to include SharePoint Foundation is not supported -* Fixed issue with Access Denied in SPDesignerSettings -* Fixed missing brackets in error message in SPExcelServiceApp -* Removed the requirement for the ConfigWizard in SPInstallLanguagePack -* Fixed Language Pack detection issue in SPInstallLanguagePack -* Added support to set Windows service accounts for search related services to - SPSearchServiceApp resource -* Fixed issue in SPCreateFarm and SPJoinFarm where an exception was not handled - correctly -* Fixed issue in SPSessionStateService not returning correct database server - and name -* Fixed missing Ensure property default in SPRemoteFarmTrust -* Fixed issue in SPWebAppGeneralSettings where -1 was returned for the TimeZone -* Fixed incorrect UsagePoint check in SPQuotaTemplate -* Fixed issue in SPWebAppPolicy module where verbose messages are causing errors -* Fixed incorrect parameter naming in Get method of SPUserProfilePropery -* Fixed issue in SPBlobCacheSettings when trying to declare same URL with - different zone -* Improve documentation on SPProductUpdate to specify the need to unblock downloaded - files -* Added check if file is blocked in SPProductUpdate to prevent endless wait -* Enhance SPUserProfileServiceApp to allow for NoILM to be enabled -* Fixed issue in SPUserProfileProperty where PropertyMapping was Null -" - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - diff --git a/lib/puppet_x/dsc_resources/SystemLocaleDsc/DSCResources/MSFT_SystemLocale/MSFT_SystemLocale.psm1 b/lib/puppet_x/dsc_resources/SystemLocaleDsc/DSCResources/MSFT_SystemLocale/MSFT_SystemLocale.psm1 deleted file mode 100644 index 70f26b5c..00000000 --- a/lib/puppet_x/dsc_resources/SystemLocaleDsc/DSCResources/MSFT_SystemLocale/MSFT_SystemLocale.psm1 +++ /dev/null @@ -1,217 +0,0 @@ -#region localizeddata -if (Test-Path "${PSScriptRoot}\${PSUICulture}") -{ - Import-LocalizedData ` - -BindingVariable LocalizedData ` - -Filename MSFT_SystemLocale.psd1 ` - -BaseDirectory "${PSScriptRoot}\${PSUICulture}" -} -else -{ - #fallback to en-US - Import-LocalizedData ` - -BindingVariable LocalizedData ` - -Filename MSFT_SystemLocale.psd1 ` - -BaseDirectory "${PSScriptRoot}\en-US" -} -#endregion - -<# - .SYNOPSIS - Returns the current System Local on the node. - .PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes' - .PARAMETER SystemLocale - Specifies the System Locale. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [String] $IsSingleInstance, - - [Parameter(Mandatory = $true)] - [String] $SystemLocale - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.GettingSystemLocaleMessage) - ) -join '' ) - - # Get the current System Locale - $currentSystemLocale = Get-WinSystemLocale ` - -ErrorAction Stop - - # Generate the return object. - $returnValue = @{ - IsSingleInstance = $IsSingleInstance - SystemLocale = $currentSystemLocale.Name - } - - return $returnValue -} # Get-TargetResource - -<# - .SYNOPSIS - Sets the current System Locale on the node. - .PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes' - .PARAMETER SystemLocale - Specifies the System Locale. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [String] $IsSingleInstance, - - [Parameter(Mandatory = $true)] - [String] $SystemLocale - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.SettingSystemLocaleMessage) - ) -join '' ) - - # Get the current System Locale - $currentSystemLocale = Get-WinSystemLocale ` - -ErrorAction Stop - if ($currentSystemLocale.Name -ne $SystemLocale) - { - Set-WinSystemLocale ` - -SystemLocale $SystemLocale ` - -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.SystemLocaleUpdatedMessage) - ) -join '' ) - - $global:DSCMachineStatus = 1 - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.RestartRequiredMessage) - ) -join '' ) - } -} # Set-TargetResource - -<# - .SYNOPSIS - Tests if the current System Locale on the node needs to be changed. - .PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes' - .PARAMETER SystemLocale - Specifies the System Locale. - .OUTPUTS - Returns false if the System Locale needs to be changed or true if it is correct. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [String] $IsSingleInstance, - - [Parameter(Mandatory = $true)] - [String] $SystemLocale - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.TestingSystemLocaleMessage) - ) -join '' ) - - - if (-not (Test-SystemLocaleValue -SystemLocale $SystemLocale)) { - New-TerminatingError ` - -errorId 'InvalidSystemLocaleError' ` - -errorMessage ($LocalizedData.InvalidSystemLocaleError -f $SystemLocale) ` - -errorCategory InvalidArgument - } # if - - # Get the current System Locale - $currentSystemLocale = Get-WinSystemLocale ` - -ErrorAction Stop - - if ($currentSystemLocale.Name -ne $SystemLocale) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.SystemLocaleParameterNeedsUpdateMessage -f ` - $currentSystemLocale.Name,$SystemLocale) - ) -join '' ) - return $false - } - return $true -} # Test-TargetResource - -# Helper Functions -<# - .SYNOPSIS - Throw a custome exception. - .PARAMETER ErrorId - The identifier representing the exception being thrown. - .PARAMETER ErrorMessage - The error message to be used for this exception. - .PARAMETER ErrorCategory - The exception error category. -#> -function New-TerminatingError -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory)] - [String] $ErrorId, - - [Parameter(Mandatory)] - [String] $ErrorMessage, - - [Parameter(Mandatory)] - [System.Management.Automation.ErrorCategory] $ErrorCategory - ) - - $exception = New-Object ` - -TypeName System.InvalidOperationException ` - -ArgumentList $errorMessage - $errorRecord = New-Object ` - -TypeName System.Management.Automation.ErrorRecord ` - -ArgumentList $exception, $errorId, $errorCategory, $null - $PSCmdlet.ThrowTerminatingError($errorRecord) -} - -<# - .SYNOPSIS - Checks the provided System Locale against the list of valid cultures. - .PARAMETER SystemLocale - The System Locale to check the validitiy of. -#> -function Test-SystemLocaleValue -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [Parameter(Mandatory)] - [String] $SystemLocale - ) - $validCultures = [System.Globalization.CultureInfo]::GetCultures(` - [System.Globalization.CultureTypes]::AllCultures` - ).name - return ($SystemLocale -in $validCultures) -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/SystemLocaleDsc/DSCResources/MSFT_SystemLocale/MSFT_SystemLocale.schema.mof b/lib/puppet_x/dsc_resources/SystemLocaleDsc/DSCResources/MSFT_SystemLocale/MSFT_SystemLocale.schema.mof deleted file mode 100644 index 1272747a..00000000 --- a/lib/puppet_x/dsc_resources/SystemLocaleDsc/DSCResources/MSFT_SystemLocale/MSFT_SystemLocale.schema.mof +++ /dev/null @@ -1,6 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("SystemLocale")] -class MSFT_SystemLocale : OMI_BaseResource -{ - [Key, Description("Specifies the resource is a single instance, the value must be 'Yes'"), ValueMap{"Yes"}, Values{"Yes"}] String IsSingleInstance; - [Required, Description("Specifies the System Locale.")] String SystemLocale; -}; diff --git a/lib/puppet_x/dsc_resources/SystemLocaleDsc/DSCResources/MSFT_SystemLocale/en-us/MSFT_SystemLocale.psd1 b/lib/puppet_x/dsc_resources/SystemLocaleDsc/DSCResources/MSFT_SystemLocale/en-us/MSFT_SystemLocale.psd1 deleted file mode 100644 index 8486bbfb..00000000 --- a/lib/puppet_x/dsc_resources/SystemLocaleDsc/DSCResources/MSFT_SystemLocale/en-us/MSFT_SystemLocale.psd1 +++ /dev/null @@ -1,12 +0,0 @@ -# culture="en-US" -ConvertFrom-StringData -StringData @' - GettingSystemLocaleMessage = Getting Windows System Locale. - SettingSystemLocaleMessage = Setting Windows System Locale. - SystemLocaleUpdateParameterMessage = Setting Windows System Locale parameter {0} to "{1}". - SystemLocaleUpdatedMessage = Setting Windows System Locale updated. - RestartRequiredMessage = Node restart required. - TestingSystemLocaleMessage = Testing Windows System Locale. - SystemLocaleParameterNeedsUpdateMessage = System Locale is "{0}" but should be "{1}". Change required. - - InvalidSystemLocaleError = The System Locale "{0}" is invalid. -'@ diff --git a/lib/puppet_x/dsc_resources/SystemLocaleDsc/LICENSE b/lib/puppet_x/dsc_resources/SystemLocaleDsc/LICENSE deleted file mode 100644 index 8db96a2f..00000000 --- a/lib/puppet_x/dsc_resources/SystemLocaleDsc/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/puppet_x/dsc_resources/SystemLocaleDsc/SystemLocaleDsc.psd1 b/lib/puppet_x/dsc_resources/SystemLocaleDsc/SystemLocaleDsc.psd1 deleted file mode 100644 index de4662b2..00000000 --- a/lib/puppet_x/dsc_resources/SystemLocaleDsc/SystemLocaleDsc.psd1 +++ /dev/null @@ -1,64 +0,0 @@ -@{ - -# Version number of this module. -ModuleVersion = '1.1.0.0' - -# ID used to uniquely identify this module -GUID = '9857ac65-2a1d-4902-bac5-1d90a99607e5' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2016 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'This DSC Resource allows configuration of the Windows System Locale.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = 'Get-TargetResource', 'Test-TargetResource', 'Set-TargetResource' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Variables to export from this module -VariablesToExport = '*' - -# Aliases to export from this module -AliasesToExport = '*' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource', 'SystemLocale') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/SystemLocaleDsc/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/SystemLocaleDsc' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* Fix AppVeyor.yml build process. -* Convert Get-TargetResource to output IsSingleInstance value passed in as parameter. - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - - diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/Assert-HADC.ps1 b/lib/puppet_x/dsc_resources/xActiveDirectory/Assert-HADC.ps1 deleted file mode 100644 index 3a4d69f5..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/Assert-HADC.ps1 +++ /dev/null @@ -1,91 +0,0 @@ -[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingComputerNameHardcoded', '')] -[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')] -param() - -# A configuration to Create High Availability Domain Controller -$secpasswd = ConvertTo-SecureString "Adrumble@6" -AsPlainText -Force -$domainCred = New-Object System.Management.Automation.PSCredential ("sva-dscdom\Administrator", $secpasswd) -$safemodeAdministratorCred = New-Object System.Management.Automation.PSCredential ("sva-dscdom\Administrator", $secpasswd) -$localcred = New-Object System.Management.Automation.PSCredential ("Administrator", $secpasswd) -$redmondCred = Get-Credential -Message "Enter Credentials for DNS Delegation: " -$newpasswd = ConvertTo-SecureString "Adrumble@7" -AsPlainText -Force -$userCred = New-Object System.Management.Automation.PSCredential ("sva-dscdom\Administrator", $newpasswd) - -configuration AssertHADC -{ - Import-DscResource -ModuleName xActiveDirectory - - Node $AllNodes.Where{$_.Role -eq "Primary DC"}.Nodename - { - WindowsFeature ADDSInstall - { - Ensure = "Present" - Name = "AD-Domain-Services" - } - - xADDomain FirstDS - { - DomainName = $Node.DomainName - DomainAdministratorCredential = $domaincred - SafemodeAdministratorPassword = $safemodeAdministratorCred - DnsDelegationCredential = $redmondCred - DependsOn = "[WindowsFeature]ADDSInstall" - } - - xWaitForADDomain DscForestWait - { - DomainName = $Node.DomainName - DomainUserCredential = $domaincred - RetryCount = $Node.RetryCount - RetryIntervalSec = $Node.RetryIntervalSec - DependsOn = "[xADDomain]FirstDS" - } - - xADUser FirstUser - { - DomainName = $Node.DomainName - DomainAdministratorCredential = $domaincred - UserName = "dummy" - Password = $userCred - Ensure = "Present" - DependsOn = "[xWaitForADDomain]DscForestWait" - } - - } - - Node $AllNodes.Where{$_.Role -eq "Replica DC"}.Nodename - { - WindowsFeature ADDSInstall - { - Ensure = "Present" - Name = "AD-Domain-Services" - } - - xWaitForADDomain DscForestWait - { - DomainName = $Node.DomainName - DomainUserCredential = $domaincred - RetryCount = $Node.RetryCount - RetryIntervalSec = $Node.RetryIntervalSec - DependsOn = "[WindowsFeature]ADDSInstall" - } - - xADDomainController SecondDC - { - DomainName = $Node.DomainName - DomainAdministratorCredential = $domaincred - SafemodeAdministratorPassword = $safemodeAdministratorCred - DependsOn = "[xWaitForADDomain]DscForestWait" - } - } -} - -$config = Invoke-Expression (Get-content $PSScriptRoot\HADCconfiguration.psd1 -Raw) -AssertHADC -configurationData $config - -$computerName1 = "sva-dsc1" -$computerName2 = "sva-dsc2" - -Start-DscConfiguration -Wait -Force -Verbose -ComputerName $computerName1 -Path $PSScriptRoot\AssertHADC -Credential $localcred -Start-DscConfiguration -Wait -Force -Verbose -ComputerName $computerName2 -Path $PSScriptRoot\AssertHADC -Credential $localcred - diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/Assert-ParentChildDomains.ps1 b/lib/puppet_x/dsc_resources/xActiveDirectory/Assert-ParentChildDomains.ps1 deleted file mode 100644 index 35eb14eb..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/Assert-ParentChildDomains.ps1 +++ /dev/null @@ -1,92 +0,0 @@ -[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingComputerNameHardcoded', '')] -[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')] -param() - -$secpasswd = ConvertTo-SecureString "Adrumble@6" -AsPlainText -Force -$domainCred = New-Object System.Management.Automation.PSCredential ("sva-dscdom\Administrator", $secpasswd) -$safemodeAdministratorCred = New-Object System.Management.Automation.PSCredential ("sva-dscdom\Administrator", $secpasswd) -$localcred = New-Object System.Management.Automation.PSCredential ("Administrator", $secpasswd) -$redmondCred = Get-Credential -Message "Enter Credentials for DNS Delegation: " -$newpasswd = ConvertTo-SecureString "Adrumble@7" -AsPlainText -Force -$userCred = New-Object System.Management.Automation.PSCredential ("sva-dscdom\Administrator", $newpasswd) - -configuration AssertParentChildDomains -{ - - Import-DscResource -ModuleName xActiveDirectory - - Node $AllNodes.Where{$_.Role -eq "Parent DC"}.Nodename - { - WindowsFeature ADDSInstall - { - Ensure = "Present" - Name = "AD-Domain-Services" - } - - xADDomain FirstDS - { - DomainName = $Node.DomainName - DomainAdministratorCredential = $domaincred - SafemodeAdministratorPassword = $safemodeAdministratorCred - DnsDelegationCredential = $redmondCred - DependsOn = "[WindowsFeature]ADDSInstall" - } - - xWaitForADDomain DscForestWait - { - DomainName = $Node.DomainName - DomainUserCredential = $domaincred - RetryCount = $Node.RetryCount - RetryIntervalSec = $Node.RetryIntervalSec - DependsOn = "[xADDomain]FirstDS" - } - - xADUser FirstUser - { - DomainName = $Node.DomainName - DomainAdministratorCredential = $domaincred - UserName = "dummy" - Password = $userCred - Ensure = "Present" - DependsOn = "[xWaitForADDomain]DscForestWait" - } - - } - - Node $AllNodes.Where{$_.Role -eq "Child DC"}.Nodename - { - WindowsFeature ADDSInstall - { - Ensure = "Present" - Name = "AD-Domain-Services" - } - - xWaitForADDomain DscForestWait - { - DomainName = $Node.ParentDomainName - DomainUserCredential = $domaincred - RetryCount = $Node.RetryCount - RetryIntervalSec = $Node.RetryIntervalSec - DependsOn = "[WindowsFeature]ADDSInstall" - } - - xADDomain ChildDS - { - DomainName = $Node.DomainName - ParentDomainName = $Node.ParentDomainName - DomainAdministratorCredential = $domaincred - SafemodeAdministratorPassword = $safemodeAdministratorCred - DependsOn = "[xWaitForADDomain]DscForestWait" - } - } -} - -$config = Invoke-Expression (Get-content $PSScriptRoot\ParentChildconfig.psd1 -Raw) -AssertParentChildDomains -configurationData $config - -$computerName1 = "sva-dsc1" -$computerName2 = "sva-dsc2" - -Start-DscConfiguration -Wait -Force -Verbose -ComputerName $computerName1 -Path $PSScriptRoot\AssertParentChildDomains -Credential $localcred -Start-DscConfiguration -Wait -Force -Verbose -ComputerName $computerName2 -Path $PSScriptRoot\AssertParentChildDomains -Credential $localcred - diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADCommon/MSFT_xADCommon.ps1 b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADCommon/MSFT_xADCommon.ps1 deleted file mode 100644 index 5ce68dc9..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADCommon/MSFT_xADCommon.ps1 +++ /dev/null @@ -1,601 +0,0 @@ -data localizedString -{ - # culture="en-US" - ConvertFrom-StringData @' - RoleNotFoundError = Please ensure that the PowerShell module for role '{0}' is installed - MembersAndIncludeExcludeError = The '{0}' and '{1}' and/or '{2}' parameters conflict. The '{0}' parameter should not be used in any combination with the '{1}' and '{2}' parameters. - MembersIsNullError = The Members parameter value is null. The '{0}' parameter must be provided if neither '{1}' nor '{2}' is provided. - MembersIsEmptyError = The Members parameter is empty. At least one group member must be provided. - IncludeAndExcludeConflictError = The member '{0}' is included in both '{1}' and '{2}' parameter values. The same member must not be included in both '{1}' and '{2}' parameter values. - IncludeAndExcludeAreEmptyError = The '{0}' and '{1}' parameters are either both null or empty. At least one member must be specified in one of these parameters. - - CheckingMembers = Checking for '{0}' members. - MembershipCountMismatch = Membership count is not correct. Expected '{0}' members, actual '{1}' members. - MemberNotInDesiredState = Member '{0}' is not in the desired state. - RemovingDuplicateMember = Removing duplicate member '{0}' definition. - MembershipInDesiredState = Membership is in the desired state. - MembershipNotDesiredState = Membership is NOT in the desired state. - CheckingDomain = Checking for domain '{0}'. - CheckingSite = Checking for site '{0}'. -'@ -} - -# Internal function to assert if the role specific module is installed or not -function Assert-Module -{ - [CmdletBinding()] - param - ( - [Parameter()] [ValidateNotNullOrEmpty()] - [System.String] $ModuleName = 'ActiveDirectory' - ) - - if (-not (Get-Module -Name $ModuleName -ListAvailable)) - { - $errorId = '{0}_ModuleNotFound' -f $ModuleName; - $errorMessage = $localizedString.RoleNotFoundError -f $moduleName; - ThrowInvalidOperationError -ErrorId $errorId -ErrorMessage $errorMessage; - } -} #end function Assert-Module - -# Internal function to test whether computer is a member of a domain -function Test-DomainMember { - [CmdletBinding()] - [OutputType([System.Boolean])] - param ( ) - $isDomainMember = [System.Boolean] (Get-CimInstance -ClassName Win32_ComputerSystem -Verbose:$false).PartOfDomain; - return $isDomainMember; -} - - -# Internal function to get the domain name of the computer -function Get-DomainName { - [CmdletBinding()] - [OutputType([System.String])] - param ( ) - $domainName = [System.String] (Get-CimInstance -ClassName Win32_ComputerSystem -Verbose:$false).Domain; - return $domainName; -} # function Get-DomainName - -# Internal function to build domain FQDN -function Resolve-DomainFQDN { - [CmdletBinding()] - param ( - [Parameter(Mandatory)] - [OutputType([System.String])] - [System.String] $DomainName, - - [Parameter()] [AllowNull()] - [System.String] $ParentDomainName - ) - $domainFQDN = $DomainName - if ($ParentDomainName) - { - $domainFQDN = '{0}.{1}' -f $DomainName, $ParentDomainName; - } - return $domainFQDN -} - -## Internal function to test/ domain availability -function Test-ADDomain -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory)] - [System.String] $DomainName, - - [Parameter()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $Credential - ) - Write-Verbose -Message ($localizedString.CheckingDomain -f $DomainName); - $ldapDomain = 'LDAP://{0}' -f $DomainName; - if ($PSBoundParameters.ContainsKey('Credential')) - { - $domain = New-Object DirectoryServices.DirectoryEntry($ldapDomain, $Credential.UserName, $Credential.GetNetworkCredential().Password); - } - else - { - $domain = New-Object DirectoryServices.DirectoryEntry($ldapDomain); - } - return ($null -ne $domain); -} - -# Internal function to get an Active Directory object's parent Distinguished Name -function Get-ADObjectParentDN -{ - <# - Copyright (c) 2016 The University Of Vermont - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, are permitted provided that - the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the - following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the - following disclaimer in the documentation and/or other materials provided with the distribution. - 3. Neither the name of the University nor the names of its contributors may be used to endorse or promote - products derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - http://www.uvm.edu/~gcd/code-license/ - #> - [CmdletBinding()] - [OutputType([System.String])] - param - ( - [Parameter(Mandatory)] - [System.String] - $DN - ) - - # https://www.uvm.edu/~gcd/2012/07/listing-parent-of-ad-object-in-powershell/ - $distinguishedNameParts = $DN -split '(? -function ConvertFrom-TimeSpan -{ - [CmdletBinding()] - [OutputType([System.Int32])] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [System.TimeSpan] - $TimeSpan, - - [Parameter(Mandatory)] - [ValidateSet('Seconds','Minutes','Hours','Days')] - [System.String] - $TimeSpanType - ) - switch ($TimeSpanType) - { - 'Seconds' { return $TimeSpan.TotalSeconds -as [System.UInt32] } - 'Minutes' { return $TimeSpan.TotalMinutes -as [System.UInt32] } - 'Hours' { return $TimeSpan.TotalHours -as [System.UInt32] } - 'Days' { return $TimeSpan.TotalDays -as [System.UInt32] } - } -} #end function ConvertFrom-TimeSpan - -<# - .SYNOPSIS - Returns common AD cmdlet connection parameter for splatting - .PARAMETER CommonName - When specified, a CommonName overrides theUsed by the xADUser cmdletReturns the Identity as the Name key. For example, the Get-ADUser, Set-ADUser and - Remove-ADUser cmdlets take an Identity parameter, but the New-ADUser cmdlet uses the - Name parameter. - .PARAMETER UseNameParameter - Returns the Identity as the Name key. For example, the Get-ADUser, Set-ADUser and - Remove-ADUser cmdlets take an Identity parameter, but the New-ADUser cmdlet uses the - Name parameter. - .EXAMPLE - $getADUserParams = Get-CommonADParameters @PSBoundParameters - - Returns connection parameters suitable for Get-ADUser using the splatted cmdlet - parameters. - .EXAMPLE - $newADUserParams = Get-CommonADParameters @PSBoundParameters -UseNameParameter - - Returns connection parameters suitable for New-ADUser using the splatted cmdlet - parameters. -#> -function Get-ADCommonParameters -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [Alias('UserName','GroupName','ComputerName')] - [System.String] - $Identity, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $CommonName, - - [Parameter()] - [ValidateNotNull()] - [Alias('DomainAdministratorCredential')] - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $Credential, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [Alias('DomainController')] - [System.String] - $Server, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $UseNameParameter, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $PreferCommonName, - - ## Catch all to enable splatted $PSBoundParameters - [Parameter(ValueFromRemainingArguments)] - $RemainingArguments - ) - - if ($UseNameParameter) - { - if ($PreferCommonName -and ($PSBoundParameters.ContainsKey('CommonName'))) - { - $adConnectionParameters = @{ Name = $CommonName; } - } - else { - $adConnectionParameters = @{ Name = $Identity; } - } - } - else - { - if ($PreferCommonName -and ($PSBoundParameters.ContainsKey('CommonName'))) - { - $adConnectionParameters = @{ Identity = $CommonName; } - } - else { - $adConnectionParameters = @{ Identity = $Identity; } - } - } - - if ($Credential) - { - $adConnectionParameters['Credential'] = $Credential; - } - - if ($Server) - { - $adConnectionParameters['Server'] = $Server; - } - - return $adConnectionParameters; -} #end function Get-ADCommonParameters - -function ThrowInvalidOperationError -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [System.String] - $ErrorId, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [System.String] - $ErrorMessage - ) - - $exception = New-Object -TypeName System.InvalidOperationException -ArgumentList $ErrorMessage; - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidOperation; - $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord -ArgumentList $exception, $ErrorId, $errorCategory, $null; - throw $errorRecord; -} - -function ThrowInvalidArgumentError -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [System.String] - $ErrorId, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [System.String] - $ErrorMessage - ) - - $exception = New-Object -TypeName System.ArgumentException -ArgumentList $ErrorMessage; - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidArgument; - $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord -ArgumentList $exception, $ErrorId, $errorCategory, $null; - throw $errorRecord; - -} #end function ThrowInvalidArgumentError - -## Internal function to test site availability -function Test-ADReplicationSite -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory)] - [System.String] $SiteName, - - [Parameter(Mandatory)] - [System.String] $DomainName, - - [Parameter()] - [System.Management.Automation.PSCredential] - $Credential - ) - - Write-Verbose -Message ($localizedString.CheckingSite -f $SiteName); - - $existingDC = "$((Get-ADDomainController -Discover -DomainName $DomainName -ForceDiscover).HostName)"; - - try - { - $site = Get-ADReplicationSite -Identity $SiteName -Server $existingDC -Credential $Credential; - } - catch [Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException] - { - return $false; - } - - return ($null -ne $site); -} diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADCommon/MSFT_xADCommon.psm1 b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADCommon/MSFT_xADCommon.psm1 deleted file mode 100644 index 86038565..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADCommon/MSFT_xADCommon.psm1 +++ /dev/null @@ -1,4 +0,0 @@ -## Import all .ps1 files to enable testing using the unit test framework -Get-ChildItem -Path $PSScriptRoot -Include '*.ps1' -Recurse | ForEach-Object { - . $PSItem.FullName; -} diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADComputer/MSFT_xADComputer.psm1 b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADComputer/MSFT_xADComputer.psm1 deleted file mode 100644 index c28cc143..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADComputer/MSFT_xADComputer.psm1 +++ /dev/null @@ -1,521 +0,0 @@ -$moduleRoot = Split-Path -Path $MyInvocation.MyCommand.Path -Parent -#region LocalizedData -$culture = 'en-us' -if (Test-Path -Path (Join-Path -Path $moduleRoot -ChildPath $PSUICulture)) -{ - $culture = $PSUICulture -} -$importLocalizedDataParams = @{ - BindingVariable = 'LocalizedData' - Filename = 'MSFT_xADComputer.psd1' - BaseDirectory = $moduleRoot - UICulture = $culture -} -Import-LocalizedData @importLocalizedDataParams -#endregion - -## Create a property map that maps the DSC resource parameters to the -## Active Directory computer attributes. -$adPropertyMap = @( - @{ Parameter = 'ComputerName'; ADProperty = 'cn'; } - @{ Parameter = 'Location'; } - @{ Parameter = 'DnsHostName'; } - @{ Parameter = 'ServicePrincipalNames'; } - @{ Parameter = 'UserPrincipalName'; } - @{ Parameter = 'DisplayName'; } - @{ Parameter = 'Path'; ADProperty = 'distinguishedName'; } - @{ Parameter = 'Description'; } - @{ Parameter = 'Enabled'; } - @{ Parameter = 'Manager'; ADProperty = 'managedBy'; } -) - - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - # Common Name - [Parameter(Mandatory)] - [System.String] $ComputerName, - - [ValidateSet('Present', 'Absent')] - [System.String] $Ensure = 'Present', - - [ValidateNotNull()] - [System.String] $UserPrincipalName, - - [ValidateNotNull()] - [System.String] $DisplayName, - - [ValidateNotNull()] - [System.String] $Path, - - [ValidateNotNull()] - [System.String] $Location, - - [ValidateNotNull()] - [System.String] $DnsHostName, - - [ValidateNotNull()] - [System.String[]] $ServicePrincipalNames, - - [ValidateNotNull()] - [System.String] $Description, - - ## Computer's manager specified as a Distinguished Name (DN) - [ValidateNotNull()] - [System.String] $Manager, - - [ValidateNotNull()] - [System.String] $RequestFile, - - [ValidateNotNull()] - [System.Boolean] $Enabled = $true, - - [ValidateNotNull()] - [System.String] $DomainController, - - ## Ideally this should just be called 'Credential' but is here for consistency with xADUser - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $DomainAdministratorCredential - ) - - Assert-Module -ModuleName 'ActiveDirectory'; - Import-Module -Name 'ActiveDirectory' -Verbose:$false; - - try - { - $adCommonParameters = Get-ADCommonParameters @PSBoundParameters; - - $adProperties = @(); - ## Create an array of the AD property names to retrieve from the property map - foreach ($property in $adPropertyMap) - { - - if ($property.ADProperty) - { - $adProperties += $property.ADProperty; - } - else - { - $adProperties += $property.Parameter; - } - } - - Write-Verbose -Message ($LocalizedData.RetrievingADComputer -f $ComputerName); - $adComputer = Get-ADComputer @adCommonParameters -Properties $adProperties; - Write-Verbose -Message ($LocalizedData.ADComputerIsPresent -f $ComputerName); - $Ensure = 'Present'; - } - catch [Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException] - { - Write-Verbose -Message ($LocalizedData.ADComputerNotPresent -f $ComputerName); - $Ensure = 'Absent'; - } - catch - { - Write-Error -Message ($LocalizedData.RetrievingADComputerError -f $ComputerName); - throw $_; - } - - $targetResource = @{ - ComputerName = $ComputerName; - DistinguishedName = $adComputer.DistinguishedName; ## Read-only property - SID = $adComputer.SID; ## Read-only property - Ensure = $Ensure; - DomainController = $DomainController; - RequestFile = $RequestFile; - } - - ## Retrieve each property from the ADPropertyMap and add to the hashtable - foreach ($property in $adPropertyMap) - { - $propertyName = $property.Parameter; - if ($propertyName -eq 'Path') { - ## The path returned is not the parent container - if (-not [System.String]::IsNullOrEmpty($adComputer.DistinguishedName)) - { - $targetResource['Path'] = Get-ADObjectParentDN -DN $adComputer.DistinguishedName; - } - } - elseif ($property.ADProperty) - { - ## The AD property name is different to the function parameter to use this - $targetResource[$propertyName] = $adComputer.($property.ADProperty); - } - else - { - ## The AD property name matches the function parameter - if ($adComputer.$propertyName -is [Microsoft.ActiveDirectory.Management.ADPropertyValueCollection]) - { - $targetResource[$propertyName] = $adComputer.$propertyName -as [System.String[]]; - } - else - { - $targetResource[$propertyName] = $adComputer.$propertyName; - } - } - } - return $targetResource; - -} #end function Get-TargetResource - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - # Common Name - [Parameter(Mandatory)] - [System.String] $ComputerName, - - [ValidateSet('Present', 'Absent')] - [System.String] $Ensure = 'Present', - - [ValidateNotNull()] - [System.String] $UserPrincipalName, - - [ValidateNotNull()] - [System.String] $DisplayName, - - [ValidateNotNull()] - [System.String] $Path, - - [ValidateNotNull()] - [System.String] $Location, - - [ValidateNotNull()] - [System.String] $DnsHostName, - - [ValidateNotNull()] - [System.String[]] $ServicePrincipalNames, - - [ValidateNotNull()] - [System.String] $Description, - - ## Computer's manager specified as a Distinguished Name (DN) - [ValidateNotNull()] - [System.String] $Manager, - - [ValidateNotNull()] - [System.String] $RequestFile, - - [ValidateNotNull()] - [System.Boolean] $Enabled = $true, - - [ValidateNotNull()] - [System.String] $DomainController, - - ## Ideally this should just be called 'Credential' but is here for backwards compatibility - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $DomainAdministratorCredential - ) - - $targetResource = Get-TargetResource @PSBoundParameters; - $isCompliant = $true; - - if ($Ensure -eq 'Absent') - { - if ($targetResource.Ensure -eq 'Present') - { - Write-Verbose -Message ($LocalizedData.ADComputerNotDesiredPropertyState -f ` - 'Ensure', $PSBoundParameters.Ensure, $targetResource.Ensure); - $isCompliant = $false; - } - } - else - { - ## Add ensure and enabled as they may not be explicitly passed and we want to enumerate them - $PSBoundParameters['Ensure'] = $Ensure; - $PSBoundParameters['Enabled'] = $Enabled; - - foreach ($parameter in $PSBoundParameters.Keys) - { - if ($targetResource.ContainsKey($parameter)) - { - ## This check is required to be able to explicitly remove values with an empty string, if required - if (([System.String]::IsNullOrEmpty($PSBoundParameters.$parameter)) -and - ([System.String]::IsNullOrEmpty($targetResource.$parameter))) - { - # Both values are null/empty and therefore we are compliant - } - elseif ($parameter -eq 'ServicePrincipalNames') - { - $testMembersParams = @{ - ExistingMembers = $targetResource.ServicePrincipalNames -as [System.String[]]; - Members = $ServicePrincipalNames; - } - if (-not (Test-Members @testMembersParams)) - { - $existingSPNs = $testMembersParams['ExistingMembers'] -join ','; - $desiredSPNs = $ServicePrincipalNames -join ','; - Write-Verbose -Message ($LocalizedData.ADComputerNotDesiredPropertyState -f ` - 'ServicePrincipalNames', $desiredSPNs, $existingSPNs); - $isCompliant = $false; - } - } - elseif ($PSBoundParameters.$parameter -ne $targetResource.$parameter) - { - Write-Verbose -Message ($LocalizedData.ADComputerNotDesiredPropertyState -f ` - $parameter, $PSBoundParameters.$parameter, $targetResource.$parameter); - $isCompliant = $false; - } - } - } #end foreach PSBoundParameter - } - - if ($isCompliant) - { - Write-Verbose -Message ($LocalizedData.ADComputerInDesiredState -f $ComputerName) - return $true - } - else - { - Write-Verbose -Message ($LocalizedData.ADComputerNotInDesiredState -f $ComputerName) - return $false - } - -} #end function Test-TargetResource - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - # Common Name - [Parameter(Mandatory)] - [System.String] $ComputerName, - - [ValidateSet('Present', 'Absent')] - [System.String] $Ensure = 'Present', - - [ValidateNotNull()] - [System.String] $UserPrincipalName, - - [ValidateNotNull()] - [System.String] $DisplayName, - - [ValidateNotNull()] - [System.String] $Path, - - [ValidateNotNull()] - [System.String] $Location, - - [ValidateNotNull()] - [System.String] $DnsHostName, - - [ValidateNotNull()] - [System.String[]] $ServicePrincipalNames, - - [ValidateNotNull()] - [System.String] $Description, - - ## Computer's manager specified as a Distinguished Name (DN) - [ValidateNotNull()] - [System.String] $Manager, - - [ValidateNotNull()] - [System.String] $RequestFile, - - [ValidateNotNull()] - [System.Boolean] $Enabled = $true, - - [ValidateNotNull()] - [System.String] $DomainController, - - ## Ideally this should just be called 'Credential' but is here for backwards compatibility - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $DomainAdministratorCredential - ) - - $targetResource = Get-TargetResource @PSBoundParameters; - - ## Add ensure and enabled as they may not be explicitly passed and we want to enumerate them - $PSBoundParameters['Ensure'] = $Ensure; - $PSBoundParameters['Enabled'] = $Enabled; - - if ($Ensure -eq 'Present') - { - if ($targetResource.Ensure -eq 'Absent') { - ## Computer does not exist and needs creating - if ($RequestFile) - { - ## Use DJOIN to create the computer account as well as the ODJ Request file. - Write-Verbose -Message ($LocalizedData.ODJRequestStartMessage -f ` - $DomainName,$ComputerName,$RequestFile) - - # This should only be performed on a Domain Member, so detect the Domain Name. - $DomainName = Get-DomainName - $DJoinParameters = @( - '/PROVISION' - '/DOMAIN',$DomainName - '/MACHINE',$ComputerName ) - if ($PSBoundParameters.ContainsKey('Path')) - { - $DJoinParameters += @( '/MACHINEOU',$Path ) - } # if - - if ($PSBoundParameters.ContainsKey('DomainController')) - { - $DJoinParameters += @( '/DCNAME',$DomainController ) - } # if - - $DJoinParameters += @( '/SAVEFILE',$RequestFile ) - $Result = & djoin.exe @DjoinParameters - - if ($LASTEXITCODE -ne 0) - { - $errorId = 'ODJRequestError' - $errorMessage = $($LocalizedData.ODJRequestError ` - -f $LASTEXITCODE,$Result) - ThrowInvalidOperationError -ErrorId $errorId -ErrorMessage $errorMessage - } # if - - Write-Verbose -Message ($LocalizedData.ODJRequestCompleteMessage -f ` - $DomainName,$ComputerName,$RequestFile) - } - else - { - ## Create the computer account using New-ADComputer - $newADComputerParams = Get-ADCommonParameters @PSBoundParameters -UseNameParameter; - if ($PSBoundParameters.ContainsKey('Path')) - { - Write-Verbose -Message ($LocalizedData.UpdatingADComputerProperty -f 'Path', $Path); - $newADComputerParams['Path'] = $Path; - } - Write-Verbose -Message ($LocalizedData.AddingADComputer -f $ComputerName); - New-ADComputer @newADComputerParams; - } # if - ## Now retrieve the newly created computer - $targetResource = Get-TargetResource @PSBoundParameters; - } - - $setADComputerParams = Get-ADCommonParameters @PSBoundParameters; - $replaceComputerProperties = @{}; - $removeComputerProperties = @{}; - foreach ($parameter in $PSBoundParameters.Keys) - { - ## Only check/action properties specified/declared parameters that match one of the function's - ## parameters. This will ignore common parameters such as -Verbose etc. - if ($targetResource.ContainsKey($parameter)) - { - if ($parameter -eq 'Path' -and ($PSBoundParameters.Path -ne $targetResource.Path)) - { - ## Cannot move computers by updating the DistinguishedName property - $adCommonParameters = Get-ADCommonParameters @PSBoundParameters; - ## Using the SamAccountName for identity with Move-ADObject does not work, use the DN instead - $adCommonParameters['Identity'] = $targetResource.DistinguishedName; - Write-Verbose -Message ($LocalizedData.MovingADComputer -f ` - $targetResource.Path, $PSBoundParameters.Path); - Move-ADObject @adCommonParameters -TargetPath $PSBoundParameters.Path; - } - elseif ($parameter -eq 'ServicePrincipalNames') - { - Write-Verbose -Message ($LocalizedData.UpdatingADComputerProperty -f ` - 'ServicePrincipalNames', ($ServicePrincipalNames -join ',')); - $replaceComputerProperties['ServicePrincipalName'] = $ServicePrincipalNames; - } - elseif ($parameter -eq 'Enabled' -and ($PSBoundParameters.$parameter -ne $targetResource.$parameter)) - { - ## We cannot enable/disable an account with -Add or -Replace parameters, but inform that - ## we will change this as it is out of compliance (it always gets set anyway) - Write-Verbose -Message ($LocalizedData.UpdatingADComputerProperty -f ` - $parameter, $PSBoundParameters.$parameter); - } - elseif ($PSBoundParameters.$parameter -ne $targetResource.$parameter) - { - ## Find the associated AD property - $adProperty = $adPropertyMap | Where-Object { $_.Parameter -eq $parameter }; - - if ([System.String]::IsNullOrEmpty($adProperty)) - { - ## We can't do anything with an empty AD property! - } - elseif ([System.String]::IsNullOrEmpty($PSBoundParameters.$parameter)) - { - ## We are removing properties - ## Only remove if the existing value in not null or empty - if (-not ([System.String]::IsNullOrEmpty($targetResource.$parameter))) - { - Write-Verbose -Message ($LocalizedData.RemovingADComputerProperty -f ` - $parameter, $PSBoundParameters.$parameter); - if ($adProperty.UseCmdletParameter -eq $true) - { - ## We need to pass the parameter explicitly to Set-ADComputer, not via -Remove - $setADComputerParams[$adProperty.Parameter] = $PSBoundParameters.$parameter; - } - elseif ([System.String]::IsNullOrEmpty($adProperty.ADProperty)) - { - $removeComputerProperties[$adProperty.Parameter] = $targetResource.$parameter; - } - else - { - $removeComputerProperties[$adProperty.ADProperty] = $targetResource.$parameter; - } - } - } #end if remove existing value - else - { - ## We are replacing the existing value - Write-Verbose -Message ($LocalizedData.UpdatingADComputerProperty -f ` - $parameter, $PSBoundParameters.$parameter); - if ($adProperty.UseCmdletParameter -eq $true) - { - ## We need to pass the parameter explicitly to Set-ADComputer, not via -Replace - $setADComputerParams[$adProperty.Parameter] = $PSBoundParameters.$parameter; - } - elseif ([System.String]::IsNullOrEmpty($adProperty.ADProperty)) - { - $replaceComputerProperties[$adProperty.Parameter] = $PSBoundParameters.$parameter; - } - else - { - $replaceComputerProperties[$adProperty.ADProperty] = $PSBoundParameters.$parameter; - } - } #end if replace existing value - } - - } #end if TargetResource parameter - } #end foreach PSBoundParameter - - ## Only pass -Remove and/or -Replace if we have something to set/change - if ($replaceComputerProperties.Count -gt 0) - { - $setADComputerParams['Replace'] = $replaceComputerProperties; - } - if ($removeComputerProperties.Count -gt 0) - { - $setADComputerParams['Remove'] = $removeComputerProperties; - } - - Write-Verbose -Message ($LocalizedData.UpdatingADComputer -f $ComputerName); - [ref] $null = Set-ADComputer @setADComputerParams -Enabled $Enabled; - } - elseif (($Ensure -eq 'Absent') -and ($targetResource.Ensure -eq 'Present')) - { - ## User exists and needs removing - Write-Verbose ($LocalizedData.RemovingADComputer -f $ComputerName); - $adCommonParameters = Get-ADCommonParameters @PSBoundParameters; - [ref] $null = Remove-ADComputer @adCommonParameters -Confirm:$false; - } - -} #end function Set-TargetResource - -## Import the common AD functions -$adCommonFunctions = Join-Path ` - -Path (Split-Path -Path $PSScriptRoot -Parent) ` - -ChildPath '\MSFT_xADCommon\MSFT_xADCommon.ps1'; -. $adCommonFunctions; - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADComputer/MSFT_xADComputer.schema.mof b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADComputer/MSFT_xADComputer.schema.mof deleted file mode 100644 index d2fdfce7..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADComputer/MSFT_xADComputer.schema.mof +++ /dev/null @@ -1,20 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xADComputer")] -class MSFT_xADComputer : OMI_BaseResource -{ - [Key, Description("Specifies the name of the computer")] String ComputerName; - [Write, Description("Specifies the location of the computer, such as an office number")] String Location; - [Write, Description("Specifies the fully qualified domain name (FQDN) of the computer")] String DnsHostName; - [Write, Description("Specifies the service principal names for the computer account")] String ServicePrincipalNames[]; - [Write, Description("Specifies the UPN assigned to the computer account")] String UserPrincipalName; - [Write, Description("Specifies the display name of the computer")] String DisplayName; - [Write, Description("Specifies the X.500 path of the Organizational Unit (OU) or container where the computer is located")] String Path; - [Write, Description("Specifies a description of the computer object")] String Description; - [Write, Description("Specifies if the computer account is enabled")] Boolean Enabled; - [Write, Description("Specifies the user or group Distinguished Name that manages the computer object")] String Manager; - [Write, Description("Specifies the Active Directory Domain Services instance to connect to perform the task")] String DomainController; - [Write, Description("Specifies the user account credentials to use to perform the task"), EmbeddedInstance("MSFT_Credential")] String DomainAdministratorCredential; - [Write, Description("Specifies the full path to the Offline Domain Join Request file to create.")] String RequestFile; - [Write, ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] String Ensure; - [Read, Description("Returns the X.500 path of the computer object")] String DistinguishedName; - [Read, Description("Returns the security identifier of the computer object")] String SID; -}; diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADComputer/en-US/MSFT_xADComputer.psd1 b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADComputer/en-US/MSFT_xADComputer.psd1 deleted file mode 100644 index acb3811c..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADComputer/en-US/MSFT_xADComputer.psd1 +++ /dev/null @@ -1,25 +0,0 @@ -# culture="en-US" -ConvertFrom-StringData @' - RoleNotFoundError = Please ensure that the PowerShell module for role '{0}' is installed. - RetrievingADComputerError = Error looking up Active Directory computer '{0}'. - - RetrievingADComputer = Retrieving Active Directory computer '{0}' ... - CreatingADDomainConnection = Creating connection to Active Directory domain ... - ADComputerIsPresent = Active Directory computer '{0}' is present. - ADComputerNotPresent = Active Directory computer '{0}' was NOT present. - ADComputerNotDesiredPropertyState = Computer '{0}' property is NOT in the desired state. Expected '{1}', actual '{2}'. - ADComputerInDesiredState = Active Directory computer '{0}' is in the desired state. - ADComputerNotInDesiredState = Active Directory computer '{0}' is NOT in the desired state. - - AddingADComputer = Adding Active Directory computer '{0}'. - RemovingADComputer = Removing Active Directory computer '{0}'. - UpdatingADComputer = Updating Active Directory computer '{0}'. - UpdatingADComputerProperty = Updating computer property '{0}' with/to '{1}'. - RemovingADComputerProperty = Removing computer property '{0}' with '{1}'. - MovingADComputer = Moving computer from '{0}' to '{1}'. - RenamingADComputer = Renaming computer from '{0}' to '{1}'. - - ODJRequestStartMessage=Attempting to create the ODJ request file '{2}' for computer '{1}' in Domain '{0}'. - ODJRequestCompleteMessage=The ODJ request file '{2}' for computer '{1}' in Domain '{0}' has been provisioned successfully. - ODJRequestError=Error {0} occured provisioning the computer using ODJ- {1}. -'@ diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomain/MSFT_xADDomain.psm1 b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomain/MSFT_xADDomain.psm1 deleted file mode 100644 index 29fc8cf8..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomain/MSFT_xADDomain.psm1 +++ /dev/null @@ -1,347 +0,0 @@ -# Localized messages -data localizedData -{ - # culture="en-US" - ConvertFrom-StringData @' - RoleNotFoundError = Please ensure that the PowerShell module for role '{0}' is installed. - InvalidDomainError = Computer is a member of the wrong domain?! - ExistingDomainMemberError = Computer is already a domain member. Cannot create a new '{0}' domain? - InvalidCredentialError = Domain '{0}' is available, but invalid credentials were supplied. - - QueryDomainWithLocalCredential = Computer is a domain member; querying domain '{0}' using local credential ... - QueryDomainWithCredential = Computer is a workgroup member; querying for domain '{0}' using supplied credential ... - DomainFound = Active Directory domain '{0}' found. - DomainNotFound = Active Directory domain '{0}' cannot be found. - CreatingChildDomain = Creating domain '{0}' as a child of domain '{1}' ... - CreatedChildDomain = Child domain '{0}' created. - CreatingForest = Creating AD forest '{0}' ... - CreatedForest = AD forest '{0}' created. - ResourcePropertyValueIncorrect = Property '{0}' value is incorrect; expected '{1}', actual '{2}'. - ResourceInDesiredState = Resource '{0}' is in the desired state. - ResourceNotInDesiredState = Resource '{0}' is NOT in the desired state. - RetryingGetADDomain = Attempt {0} of {1} to call Get-ADDomain failed, retrying in {2} seconds. - UnhandledError = Unhandled error occured, detail here: {0} - FaultExceptionAndDomainShouldExist = ServiceModel FaultException detected and domain should exist, performing retry... -'@ -} - -<# - .SYNOPSIS - Retrieves the name of the file that tracks the status of the xADDomain resource with the - specified domain name. - - .PARAMETER DomainName - The domain name of the xADDomain resource to retrieve the tracking file name of. - - .NOTES - The tracking file is currently output to the environment's temp directory. - - This file is NOT removed when a configuration completes, so if another call to a xADDomain - resource with the same domain name occurs in the same environment, this file will already - be present. - - This is so that when another call is made to the same resource, the resource will not - attempt to promote the machine to a domain controller again (which would cause an error). - - If the resource should be promoted to a domain controller once again, you must first remove - this file from the environment's temp directory (usually C:\Temp). - - If in the future this functionality needs to change so that future configurations are not - affected, $env:temp should be changed to the resource's cache location which is removed - after each configuration. - ($env:systemRoot\system32\Configuration\BuiltinProvCache\MSFT_xADDomain) -#> -function Get-TrackingFilename { - [OutputType([String])] - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [String] - $DomainName - ) - - return Join-Path -Path ($env:temp) -ChildPath ('{0}.xADDomain.completed' -f $DomainName) -} - -function Get-TargetResource -{ - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory)] - [String] $DomainName, - - [Parameter(Mandatory)] - [PSCredential] $DomainAdministratorCredential, - - [Parameter(Mandatory)] - [PSCredential] $SafemodeAdministratorPassword, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String] $ParentDomainName, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String] $DomainNetBIOSName, - - [Parameter()] [ValidateNotNullOrEmpty()] - [PSCredential] $DnsDelegationCredential, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String] $DatabasePath, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String] $LogPath, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String] $SysvolPath - ) - - Assert-Module -ModuleName 'ADDSDeployment'; - $domainFQDN = Resolve-DomainFQDN -DomainName $DomainName -ParentDomainName $ParentDomainName; - $isDomainMember = Test-DomainMember; - - $retries = 0 - $maxRetries = 5 - $retryIntervalInSeconds = 30 - $domainShouldExist = (Test-Path (Get-TrackingFilename -DomainName $DomainName)) - do { - try - { - if ($isDomainMember) { - ## We're already a domain member, so take the credentials out of the equation - Write-Verbose ($localizedData.QueryDomainADWithLocalCredentials -f $domainFQDN); - $domain = Get-ADDomain -Identity $domainFQDN -ErrorAction Stop; - } - else { - Write-Verbose ($localizedData.QueryDomainWithCredential -f $domainFQDN); - $domain = Get-ADDomain -Identity $domainFQDN -Credential $DomainAdministratorCredential -ErrorAction Stop; - } - - ## No need to check whether the node is actually a domain controller. If we don't throw an exception, - ## the domain is already UP - and this resource shouldn't run. Domain controller functionality - ## should be checked by the xADDomainController resource? - Write-Verbose ($localizedData.DomainFound -f $domain.DnsRoot); - - $targetResource = @{ - DomainName = $domain.DnsRoot; - ParentDomainName = $domain.ParentDomain; - DomainNetBIOSName = $domain.NetBIOSName; - } - - return $targetResource; - } - catch [Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException] - { - $errorMessage = $localizedData.ExistingDomainMemberError -f $DomainName; - ThrowInvalidOperationError -ErrorId 'xADDomain_DomainMember' -ErrorMessage $errorMessage; - } - catch [Microsoft.ActiveDirectory.Management.ADServerDownException] - { - Write-Verbose ($localizedData.DomainNotFound -f $domainFQDN) - $domain = @{ }; - # will fall into retry mechanism - } - catch [System.Security.Authentication.AuthenticationException] - { - $errorMessage = $localizedData.InvalidCredentialError -f $DomainName; - ThrowInvalidOperationError -ErrorId 'xADDomain_InvalidCredential' -ErrorMessage $errorMessage; - } - catch - { - $errorMessage = $localizedData.UnhandledError -f ($_.Exception | Format-List -Force | Out-String) - Write-Verbose $errorMessage - - if ($domainShouldExist -and ($_.Exception.InnerException -is [System.ServiceModel.FaultException])) - { - Write-Verbose $localizedData.FaultExceptionAndDomainShouldExist - # will fall into retry mechanism - } else { - ## Not sure what's gone on here! - throw $_ - } - } - - if($domainShouldExist) { - $retries++ - Write-Verbose ($localizedData.RetryingGetADDomain -f $retries, $maxRetries, $retryIntervalInSeconds) - Start-Sleep -Seconds ($retries * $retryIntervalInSeconds) - } - - } while ($domainShouldExist -and ($retries -le $maxRetries) ) - -} #end function Get-TargetResource - -function Test-TargetResource -{ - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory)] - [String] $DomainName, - - [Parameter(Mandatory)] - [PSCredential] $DomainAdministratorCredential, - - [Parameter(Mandatory)] - [PSCredential] $SafemodeAdministratorPassword, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String] $ParentDomainName, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String] $DomainNetBIOSName, - - [Parameter()] [ValidateNotNullOrEmpty()] - [PSCredential] $DnsDelegationCredential, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String] $DatabasePath, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String] $LogPath, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String] $SysvolPath - ) - - $targetResource = Get-TargetResource @PSBoundParameters - $isCompliant = $true; - - ## The Get-Target resource returns .DomainName as the domain's FQDN. Therefore, we - ## need to resolve this before comparison. - $domainFQDN = Resolve-DomainFQDN -DomainName $DomainName -ParentDomainName $ParentDomainName - if ($domainFQDN -ne $targetResource.DomainName) - { - $message = $localizedData.ResourcePropertyValueIncorrect -f 'DomainName', $domainFQDN, $targetResource.DomainName; - Write-Verbose -Message $message; - $isCompliant = $false; - } - - $propertyNames = @('ParentDomainName','DomainNetBIOSName'); - foreach ($propertyName in $propertyNames) - { - if ($PSBoundParameters.ContainsKey($propertyName)) - { - $propertyValue = (Get-Variable -Name $propertyName).Value; - if ($targetResource.$propertyName -ne $propertyValue) - { - $message = $localizedData.ResourcePropertyValueIncorrect -f $propertyName, $propertyValue, $targetResource.$propertyName; - Write-Verbose -Message $message; - $isCompliant = $false; - } - } - } - - if ($isCompliant) - { - Write-Verbose -Message ($localizedData.ResourceInDesiredState -f $domainFQDN); - return $true; - } - else - { - Write-Verbose -Message ($localizedData.ResourceNotInDesiredState -f $domainFQDN); - return $false; - } - -} #end function Test-TargetResource - -function Set-TargetResource -{ - param - ( - [Parameter(Mandatory)] - [String] $DomainName, - - [Parameter(Mandatory)] - [PSCredential] $DomainAdministratorCredential, - - [Parameter(Mandatory)] - [PSCredential] $SafemodeAdministratorPassword, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String] $ParentDomainName, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String] $DomainNetBIOSName, - - [Parameter()] [ValidateNotNullOrEmpty()] - [PSCredential] $DnsDelegationCredential, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String] $DatabasePath, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String] $LogPath, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String] $SysvolPath - ) - - # Debug can pause Install-ADDSForest/Install-ADDSDomain, so we remove it. - [ref] $null = $PSBoundParameters.Remove("Debug"); - ## Not entirely necessary, but run Get-TargetResouece to ensure we raise any pre-flight errors. - $targetResource = Get-TargetResource @PSBoundParameters; - - $installADDSParams = @{ - SafeModeAdministratorPassword = $SafemodeAdministratorPassword.Password; - NoRebootOnCompletion = $true; - Force = $true; - } - - if ($PSBoundParameters.ContainsKey('DnsDelegationCredential')) - { - $installADDSParams['DnsDelegationCredential'] = $DnsDelegationCredential; - $installADDSParams['CreateDnsDelegation'] = $true; - } - if ($PSBoundParameters.ContainsKey('DatabasePath')) - { - $installADDSParams['DatabasePath'] = $DatabasePath; - } - if ($PSBoundParameters.ContainsKey('LogPath')) - { - $installADDSParams['LogPath'] = $LogPath; - } - if ($PSBoundParameters.ContainsKey('SysvolPath')) - { - $installADDSParams['SysvolPath'] = $SysvolPath; - } - - if ($PSBoundParameters.ContainsKey('ParentDomainName')) - { - Write-Verbose -Message ($localizedData.CreatingChildDomain -f $DomainName, $ParentDomainName); - $installADDSParams['Credential'] = $DomainAdministratorCredential - $installADDSParams['NewDomainName'] = $DomainName - $installADDSParams['ParentDomainName'] = $ParentDomainName - $installADDSParams['DomainType'] = 'ChildDomain'; - if ($PSBoundParameters.ContainsKey('DomainNetBIOSName')) - { - $installADDSParams['NewDomainNetbiosName'] = $DomainNetBIOSName; - } - Install-ADDSDomain @installADDSParams; - Write-Verbose -Message ($localizedData.CreatedChildDomain); - } - else - { - Write-Verbose -Message ($localizedData.CreatingForest -f $DomainName); - $installADDSParams['DomainName'] = $DomainName; - if ($PSBoundParameters.ContainsKey('DomainNetbiosName')) - { - $installADDSParams['DomainNetbiosName'] = $DomainNetBIOSName; - } - Install-ADDSForest @installADDSParams; - Write-Verbose -Message ($localizedData.CreatedForest -f $DomainName); - } - - "Finished" | Out-File -FilePath (Get-TrackingFilename -DomainName $DomainName) -Force - - # Signal to the LCM to reboot the node to compensate for the one we - # suppressed from Install-ADDSForest/Install-ADDSDomain - $global:DSCMachineStatus = 1 - -} #end function Set-TargetResource - -## Import the common AD functions -$adCommonFunctions = Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -ChildPath '\MSFT_xADCommon\MSFT_xADCommon.ps1'; -. $adCommonFunctions; - -Export-ModuleMember -Function *-TargetResource; diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomain/MSFT_xADDomain.schema.mof b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomain/MSFT_xADDomain.schema.mof deleted file mode 100644 index 47c01842..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomain/MSFT_xADDomain.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ -[ClassVersion("1.0.1.0"), FriendlyName("xADDomain")] -class MSFT_xADDomain : OMI_BaseResource -{ - [Key, Description("Name of the domain to which the user will be added")] String DomainName; - [Required, Description("Credentials used to query for domain existence"), EmbeddedInstance("MSFT_Credential")] String DomainAdministratorCredential; - [Required, Description("Password for the administrator account when the computer is started in Safe Mode"), EmbeddedInstance("MSFT_Credential")] String SafemodeAdministratorPassword; - [Write, Description("Fully qualified name of the parent domain")] String ParentDomainName; - [Write, Description("NetBIOS name for the new domain")] String DomainNetbiosName; - [Write, Description("Credential used for creating DNS delegation"), EmbeddedInstance("MSFT_Credential")] String DnsDelegationCredential; - [Write, Description("Path to a directory that contains the domain database")] String DatabasePath; - [Write, Description("Path to a directory for the log file that will be written")] String LogPath; - [Write, Description("Path to a directory where the Sysvol file will be written")] String SysvolPath; -}; diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainController/MSFT_xADDomainController.psm1 b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainController/MSFT_xADDomainController.psm1 deleted file mode 100644 index 1d6dd83b..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainController/MSFT_xADDomainController.psm1 +++ /dev/null @@ -1,224 +0,0 @@ -# -# xADDomainController: DSC resource to install a domain controller in Active -# Directory. -# - -function Get-TargetResource -{ - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory)] - [String]$DomainName, - - [Parameter(Mandatory)] - [PSCredential]$DomainAdministratorCredential, - - [Parameter(Mandatory)] - [PSCredential]$SafemodeAdministratorPassword, - - [String]$DatabasePath, - - [String]$LogPath, - - [String]$SysvolPath, - - [String]$SiteName - ) - - $returnValue = @{ - DomainName = $DomainName - Ensure = $false - } - - try - { - Write-Verbose -Message "Resolving '$($DomainName)' ..." - $domain = Get-ADDomain -Identity $DomainName -Credential $DomainAdministratorCredential - if ($domain -ne $null) - { - Write-Verbose -Message "Domain '$($DomainName)' is present. Looking for DCs ..." - try - { - $dc = Get-ADDomainController -Identity $env:COMPUTERNAME -Credential $DomainAdministratorCredential - Write-Verbose -Message "Found domain controller '$($dc.Name)' in domain '$($dc.Domain)'." - if ($dc.Domain -eq $DomainName) - { - Write-Verbose -Message "Current node '$($dc.Name)' is already a domain controller for domain '$($dc.Domain)'." - - $serviceNTDS = Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\NTDS\Parameters' - $serviceNETLOGON = Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters' - - $returnValue.Ensure = $true - $returnValue.DatabasePath = $serviceNTDS.'DSA Working Directory' - $returnValue.LogPath = $serviceNTDS.'Database log files path' - $returnValue.SysvolPath = $serviceNETLOGON.SysVol -replace '\\sysvol$', '' - $returnValue.SiteName = $dc.Site - } - } - catch - { - if ($error[0]) {Write-Verbose $error[0].Exception} - Write-Verbose -Message "Current node does not host a domain controller." - } - } - } - catch [System.Management.Automation.CommandNotFoundException] - { - if ($error[0]) {Write-Verbose $error[0].Exception} - Write-Verbose -Message "Current node is not running AD WS, and hence is not a domain controller." - } - $returnValue -} - -function Set-TargetResource -{ - param - ( - [Parameter(Mandatory)] - [String]$DomainName, - - [Parameter(Mandatory)] - [PSCredential]$DomainAdministratorCredential, - - [Parameter(Mandatory)] - [PSCredential]$SafemodeAdministratorPassword, - - [String]$DatabasePath, - - [String]$LogPath, - - [String]$SysvolPath, - - [String]$SiteName - ) - - # Debug can pause Install-ADDSDomainController, so we remove it. - $parameters = $PSBoundParameters.Remove("Debug"); - $targetResource = Get-TargetResource @PSBoundParameters - - if ($targetResource.Ensure -eq $false) - { - ## Node is not a domain controllr so we promote it - Write-Verbose -Message "Checking if domain '$($DomainName)' is present ..." - $domain = $null; - try - { - $domain = Get-ADDomain -Identity $DomainName -Credential $DomainAdministratorCredential - } - catch - { - if ($error[0]) {Write-Verbose $error[0].Exception} - throw (New-Object -TypeName System.InvalidOperationException -ArgumentList "Domain '$($DomainName)' could not be found.") - } - - Write-Verbose -Message "Verified that domain '$($DomainName)' is present, continuing ..." - $params = @{ - DomainName = $DomainName - SafeModeAdministratorPassword = $SafemodeAdministratorPassword.Password - Credential = $DomainAdministratorCredential - NoRebootOnCompletion = $true - Force = $true - } - if ($DatabasePath -ne $null) - { - $params.Add("DatabasePath", $DatabasePath) - } - if ($LogPath -ne $null) - { - $params.Add("LogPath", $LogPath) - } - if ($SysvolPath -ne $null) - { - $params.Add("SysvolPath", $SysvolPath) - } - if ($SiteName -ne $null -and $SiteName -ne "") - { - $params.Add("SiteName", $SiteName) - } - - Install-ADDSDomainController @params - Write-Verbose -Message "Node is now a domain controller for '$($DomainName)'." - - # Signal to the LCM to reboot the node to compensate for the one we - # suppressed from Install-ADDSDomainController - $global:DSCMachineStatus = 1 - } - elseif ($targetResource.Ensure) - { - ## Node is a domain controller. We check if other properties are in desired state - if ($PSBoundParameters["SiteName"] -and $targetResource.SiteName -ne $SiteName) - { - ## DC is not in correct site. Move it. - Write-Verbose "Moving Domain Controller from '$($targetResource.SiteName)' to '$SiteName'" - Move-ADDirectoryServer -Identity $env:COMPUTERNAME -Site $SiteName -Credential $DomainAdministratorCredential - } - } -} - -function Test-TargetResource -{ - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory)] - [String]$DomainName, - - [Parameter(Mandatory)] - [PSCredential]$DomainAdministratorCredential, - - [Parameter(Mandatory)] - [PSCredential]$SafemodeAdministratorPassword, - - [String]$DatabasePath, - - [String]$LogPath, - - [String]$SysvolPath, - - [String]$SiteName - ) - - if ($PSBoundParameters.SiteName) - { - if (-not (Test-ADReplicationSite -SiteName $SiteName -DomainName $DomainName -Credential $DomainAdministratorCredential)) - { - throw (New-Object -TypeName System.InvalidOperationException -ArgumentList "Site '$($SiteName)' could not be found.") - } - } - - $isCompliant = $true - - try - { - $parameters = $PSBoundParameters.Remove("Debug"); - - $existingResource = Get-TargetResource @PSBoundParameters - $isCompliant = $existingResource.Ensure - - if ([System.String]::IsNullOrEmpty($SiteName)) - { - #If SiteName is not specified confgiuration is compliant - } - elseif ($existingResource.SiteName -ne $SiteName) - { - Write-Verbose "Domain Controller Site is not in a desired state. Expected '$SiteName', actual '$($existingResource.SiteName)'" - $isCompliant = $false - } - } - catch - { - if ($error[0]) {Write-Verbose $error[0].Exception} - Write-Verbose -Message "Domain '$($DomainName)' is NOT present on the current node." - $isCompliant = $false - } - - $isCompliant - -} - -## Import the common AD functions -$adCommonFunctions = Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -ChildPath '\MSFT_xADCommon\MSFT_xADCommon.ps1' -. $adCommonFunctions - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainController/MSFT_xADDomainController.schema.mof b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainController/MSFT_xADDomainController.schema.mof deleted file mode 100644 index bde09183..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainController/MSFT_xADDomainController.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.1.0"), FriendlyName("xADDomainController")] -class MSFT_xADDomainController : OMI_BaseResource -{ - [Key] String DomainName; - [Required, EmbeddedInstance("MSFT_Credential")] String DomainAdministratorCredential; - [Required, EmbeddedInstance("MSFT_Credential")] String SafemodeAdministratorPassword; - [write] String DatabasePath; - [write] String LogPath; - [write] String SysvolPath; - [write] String SiteName; -}; diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainDefaultPasswordPolicy/MSFT_xADDomainDefaultPasswordPolicy.psm1 b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainDefaultPasswordPolicy/MSFT_xADDomainDefaultPasswordPolicy.psm1 deleted file mode 100644 index 619a218c..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainDefaultPasswordPolicy/MSFT_xADDomainDefaultPasswordPolicy.psm1 +++ /dev/null @@ -1,226 +0,0 @@ -# Localized messages -data localizedData -{ - # culture="en-US" - ConvertFrom-StringData @' - RoleNotFoundError = Please ensure that the PowerShell module for role '{0}' is installed. - QueryingDomainPasswordPolicy = Querying Active Directory domain '{0}' default password policy. - UpdatingDomainPasswordPolicy = Updating Active Directory domain '{0}' default password policy. - SettingPasswordPolicyValue = Setting password policy '{0}' property to '{1}'. - ResourcePropertyValueIncorrect = Property '{0}' value is incorrect; expected '{1}', actual '{2}'. - ResourceInDesiredState = Resource '{0}' is in the desired state. - ResourceNotInDesiredState = Resource '{0}' is NOT in the desired state. -'@ -} - -## List of changeable policy properties -$mutablePropertyMap = @( - @{ Name = 'ComplexityEnabled'; } - @{ Name = 'LockoutDuration'; IsTimeSpan = $true; } - @{ Name = 'LockoutObservationWindow'; IsTimeSpan = $true; } - @{ Name = 'LockoutThreshold'; } - @{ Name = 'MinPasswordAge'; IsTimeSpan = $true; } - @{ Name = 'MaxPasswordAge'; IsTimeSpan = $true; } - @{ Name = 'MinPasswordLength'; } - @{ Name = 'PasswordHistoryCount'; } - @{ Name = 'ReversibleEncryptionEnabled'; } -) - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory)] - [System.String] $DomainName, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] $DomainController, - - [Parameter()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $Credential - ) - Assert-Module -ModuleName 'ActiveDirectory'; - - $PSBoundParameters['Identity'] = $DomainName; - $getADDefaultDomainPasswordPolicyParams = Get-ADCommonParameters @PSBoundParameters; - Write-Verbose -Message ($localizedData.QueryingDomainPasswordPolicy -f $DomainName); - $policy = Get-ADDefaultDomainPasswordPolicy @getADDefaultDomainPasswordPolicyParams; - $targetResource = @{ - DomainName = $DomainName; - ComplexityEnabled = $policy.ComplexityEnabled; - LockoutDuration = ConvertFrom-Timespan -Timespan $policy.LockoutDuration -TimeSpanType Minutes; - LockoutObservationWindow = ConvertFrom-Timespan -Timespan $policy.LockoutObservationWindow -TimeSpanType Minutes; - LockoutThreshold = $policy.LockoutThreshold; - MinPasswordAge = ConvertFrom-Timespan -Timespan $policy.MinPasswordAge -TimeSpanType Minutes; - MaxPasswordAge = ConvertFrom-Timespan -Timespan $policy.MaxPasswordAge -TimeSpanType Minutes; - MinPasswordLength = $policy.MinPasswordLength; - PasswordHistoryCount = $policy.PasswordHistoryCount; - ReversibleEncryptionEnabled = $policy.ReversibleEncryptionEnabled; - } - return $targetResource; -} #end Get-TargetResource - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory)] - [System.String] $DomainName, - - [Parameter()] - [System.Boolean] $ComplexityEnabled, - - [Parameter()] - [System.UInt32] $LockoutDuration, - - [Parameter()] - [System.UInt32] $LockoutObservationWindow, - - [Parameter()] - [System.UInt32] $LockoutThreshold, - - [Parameter()] - [System.UInt32] $MinPasswordAge, - - [Parameter()] - [System.UInt32] $MaxPasswordAge, - - [Parameter()] - [System.UInt32] $MinPasswordLength, - - [Parameter()] - [System.UInt32] $PasswordHistoryCount, - - [Parameter()] - [System.Boolean] $ReversibleEncryptionEnabled, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] $DomainController, - - [Parameter()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $Credential - ) - $getTargetResourceParams = @{ - DomainName = $DomainName; - } - if ($PSBoundParameters.ContainsKey('Credential')) - { - $getTargetResourceParams['Credential'] = $Credential; - } - if ($PSBoundParameters.ContainsKey('DomainController')) - { - $getTargetResourceParams['DomainController'] = $DomainController; - } - $targetResource = Get-TargetResource @getTargetResourceParams; - - $inDesiredState = $true; - foreach ($property in $mutablePropertyMap) - { - $propertyName = $property.Name; - if ($PSBoundParameters.ContainsKey($propertyName)) - { - $expectedValue = $PSBoundParameters[$propertyName]; - $actualValue = $targetResource[$propertyName]; - if ($expectedValue -ne $actualValue) - { - $valueIncorrectMessage = $localizedData.ResourcePropertyValueIncorrect -f $propertyName, $expectedValue, $actualValue; - Write-Verbose -Message $valueIncorrectMessage; - $inDesiredState = $false; - } - } - } - - if ($inDesiredState) - { - Write-Verbose -Message ($localizedData.ResourceInDesiredState -f $DomainName); - return $true; - } - else - { - Write-Verbose -Message ($localizedData.ResourceNotInDesiredState -f $DomainName); - return $false; - } -} #end Test-TargetResource - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory)] - [System.String] $DomainName, - - [Parameter()] - [System.Boolean] $ComplexityEnabled, - - [Parameter()] - [System.UInt32] $LockoutDuration, - - [Parameter()] - [System.UInt32] $LockoutObservationWindow, - - [Parameter()] - [System.UInt32] $LockoutThreshold, - - [Parameter()] - [System.UInt32] $MinPasswordAge, - - [Parameter()] - [System.UInt32] $MaxPasswordAge, - - [Parameter()] - [System.UInt32] $MinPasswordLength, - - [Parameter()] - [System.UInt32] $PasswordHistoryCount, - - [Parameter()] - [System.Boolean] $ReversibleEncryptionEnabled, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] $DomainController, - - [Parameter()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $Credential - ) - Assert-Module -ModuleName 'ActiveDirectory'; - $PSBoundParameters['Identity'] = $DomainName; - $setADDefaultDomainPasswordPolicyParams = Get-ADCommonParameters @PSBoundParameters; - - foreach ($property in $mutablePropertyMap) - { - $propertyName = $property.Name; - if ($PSBoundParameters.ContainsKey($propertyName)) - { - $propertyValue = $PSBoundParameters[$propertyName]; - if ($property.IsTimeSpan -eq $true) - { - $propertyValue = ConvertTo-TimeSpan -TimeSpan $propertyValue -TimeSpanType Minutes; - } - $setADDefaultDomainPasswordPolicyParams[$propertyName] = $propertyValue; - Write-Verbose -Message ($localizedData.SettingPasswordPolicyValue -f $propertyName, $propertyValue); - } - } - - Write-Verbose -Message ($localizedData.UpdatingDomainPasswordPolicy -f $DomainName); - [ref] $null = Set-ADDefaultDomainPasswordPolicy @setADDefaultDomainPasswordPolicyParams; -} #end Set-TargetResource - -## Import the common AD functions -$adCommonFunctions = Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -ChildPath '\MSFT_xADCommon\MSFT_xADCommon.ps1'; -. $adCommonFunctions; - -Export-ModuleMember -Function *-TargetResource; diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainDefaultPasswordPolicy/MSFT_xADDomainDefaultPasswordPolicy.schema.mof b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainDefaultPasswordPolicy/MSFT_xADDomainDefaultPasswordPolicy.schema.mof deleted file mode 100644 index 6eaca449..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainDefaultPasswordPolicy/MSFT_xADDomainDefaultPasswordPolicy.schema.mof +++ /dev/null @@ -1,17 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("xADDomainDefaultPasswordPolicy")] -class MSFT_xADDomainDefaultPasswordPolicy : OMI_BaseResource -{ - [Key, Description("Name of the domain to which the password policy will be applied")] String DomainName; - [Write, Description("Whether password complexity is enabled for the default password policy")] Boolean ComplexityEnabled; - [Write, Description("Length of time that an account is locked after the number of failed login attempts (minutes)")] UInt32 LockoutDuration; - [Write, Description("Maximum time between two unsuccessful login attempts before the counter is reset to 0 (minutes)")] UInt32 LockoutObservationWindow; - [Write, Description("Number of unsuccessful login attempts that are permitted before an account is locked out")] UInt32 LockoutThreshold; - [Write, Description("Minimum length of time that you can have the same password (minutes)")] UInt32 MinPasswordAge; - [Write, Description("Maximum length of time that you can have the same password (minutes)")] UInt32 MaxPasswordAge; - [Write, Description("Minimum number of characters that a password must contain")] UInt32 MinPasswordLength; - [Write, Description("Number of previous passwords to remember")] UInt32 PasswordHistoryCount; - [Write, Description("Whether the directory must store passwords using reversible encryption")] Boolean ReversibleEncryptionEnabled; - [Write, Description("Active Directory domain controller to enact the change upon")] String DomainController; - [Write, Description("Credentials used to access the domain"), EmbeddedInstance("MSFT_Credential")] String Credential; -}; - diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainTrust/MSFT_xADDomainTrust.psm1 b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainTrust/MSFT_xADDomainTrust.psm1 deleted file mode 100644 index df3d719d..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainTrust/MSFT_xADDomainTrust.psm1 +++ /dev/null @@ -1,398 +0,0 @@ -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' -MissingRoleMessage = Please ensure that the {0} role is installed - -CheckingTrustMessage = Checking if Trust between {0} and {1} exists ... -TestTrustMessage = Trust is {0} between source and target domains and it should be {1} -RemovingTrustMessage = Removing trust between {0} and {1} domains ... -DeleteTrustMessage = Trust between specified domains is now absent -AddingTrustMessage = Adding domain trust between {0} and {1} ... -SetTrustMessage = Trust between specified domains is now present - -CheckPropertyMessage = Checking for {0} between domains ... -DesiredPropertyMessage = {0} between domains is set correctly -NotDesiredPropertyMessage = {0} between domains is not correct. Expected {1}, actual {2} -SetPropertyMessage = {0} between domains is set -'@ -} - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory)] - [String]$SourceDomainName, - - [parameter(Mandatory)] - [String]$TargetDomainName, - - [parameter(Mandatory)] - [PSCredential]$TargetDomainAdministratorCredential, - - [parameter(Mandatory)] - [ValidateSet("External","Forest")] - [String]$TrustType, - - [parameter(Mandatory)] - [ValidateSet("Bidirectional","Inbound","Outbound")] - [String]$TrustDirection, - - [ValidateSet("Present","Absent")] - [String]$Ensure = 'Present' - ) - -#region Input Validation - - # Load the .NET assembly - try - { - Add-type -AssemblyName System.DirectoryServices - } - # If not found, means ADDS role is not installed - catch - { - $missingRoleMessage = $($LocalizedData.MissingRoleMessage) -f 'AD-Domain-Services' - New-TerminatingError -errorId ActiveDirectoryRoleMissing -errorMessage $missingRoleMessage -errorCategory NotInstalled - } - -#endregion - - try - { - switch ($TrustType) - { - 'External' {$DomainOrForest = 'Domain'} - 'Forest' {$DomainOrForest = 'Forest'} - } - # Create the target object - $trgDirectoryContext = New-Object System.DirectoryServices.ActiveDirectory.DirectoryContext($DomainOrForest,$TargetDomainName, $TargetDomainAdministratorCredential.UserName, $TargetDomainAdministratorCredential.GetNetworkCredential().Password) - $trgDomain = ([type]"System.DirectoryServices.ActiveDirectory.$DomainOrForest")::"Get$DomainOrForest"($trgDirectoryContext) - # Create the source object - $srcDirectoryContext = New-Object System.DirectoryServices.ActiveDirectory.DirectoryContext($DomainOrForest,$SourceDomainName) - $srcDomain = ([type]"System.DirectoryServices.ActiveDirectory.$DomainOrForest")::"Get$DomainOrForest"($srcDirectoryContext) - - # Find trust betwen source & destination. - $trust = $srcDomain.GetTrustRelationship($trgDomain) - - $Ensure = 'Present' - } - catch - { - $Ensure = 'Absent' - } - - # return a credential object without password - $CIMCredential = New-CimInstance -ClassName MSFT_Credential -ClientOnly ` - -Namespace root/microsoft/windows/desiredstateconfiguration ` - -Property @{ - UserName = [string]$TargetDomainAdministratorCredential.UserName - Password = [string]$null - } - - @{ - SourceDomainName = $SourceDomainName - TargetDomainName = $TargetDomainName - Ensure = $Ensure - TrustType = $trust.TrustType - TrustDirection = $trust.TrustDirection - TargetDomainAdministratorCredential = $CIMCredential - } - -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory)] - [String]$SourceDomainName, - - [parameter(Mandatory)] - [String]$TargetDomainName, - - [parameter(Mandatory)] - [PSCredential]$TargetDomainAdministratorCredential, - - [parameter(Mandatory)] - [ValidateSet("External","Forest")] - [String]$TrustType, - - [parameter(Mandatory)] - [ValidateSet("Bidirectional","Inbound","Outbound")] - [String]$TrustDirection, - - [ValidateSet("Present","Absent")] - [String]$Ensure = 'Present' - ) - - if($PSBoundParameters.ContainsKey('Debug')){$null = $PSBoundParameters.Remove('Debug')} - Validate-ResourceProperties @PSBoundParameters -Apply -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory)] - [String]$SourceDomainName, - - [parameter(Mandatory)] - [String]$TargetDomainName, - - [parameter(Mandatory)] - [PSCredential]$TargetDomainAdministratorCredential, - - [parameter(Mandatory)] - [ValidateSet("External","Forest")] - [String]$TrustType, - - [parameter(Mandatory)] - [ValidateSet("Bidirectional","Inbound","Outbound")] - [String]$TrustDirection, - - [ValidateSet("Present","Absent")] - [String]$Ensure = 'Present' - ) - -#region Input Validation - - # Load the .NET assembly - try - { - Add-type -AssemblyName System.DirectoryServices - } - # If not found, means ADDS role is not installed - catch - { - $missingRoleMessage = $($LocalizedData.MissingRoleMessage) -f 'AD-Domain-Services' - New-TerminatingError -errorId ActiveDirectoryRoleMissing -errorMessage $missingRoleMessage -errorCategory NotInstalled - } - -#endregion - - if($PSBoundParameters.ContainsKey('Debug')){$null = $PSBoundParameters.Remove('Debug')} - Validate-ResourceProperties @PSBoundParameters -} - -#region Helper Functions -function Validate-ResourceProperties -{ - [Cmdletbinding()] - param - ( - [parameter(Mandatory)] - [String]$SourceDomainName, - - [parameter(Mandatory)] - [String]$TargetDomainName, - - [parameter(Mandatory)] - [PSCredential]$TargetDomainAdministratorCredential, - - [parameter(Mandatory)] - [ValidateSet("External","Forest")] - [String]$TrustType, - - [parameter(Mandatory)] - [ValidateSet("Bidirectional","Inbound","Outbound")] - [String]$TrustDirection, - - [ValidateSet("Present","Absent")] - [String]$Ensure = 'Present', - - [Switch]$Apply - ) - - try - { - $checkingTrustMessage = $($LocalizedData.CheckingTrustMessage) -f $SourceDomainName,$TargetDomainName - Write-Verbose -Message $checkingTrustMessage - - switch ($TrustType) - { - 'External' {$DomainOrForest = 'Domain'} - 'Forest' {$DomainOrForest = 'Forest'} - } - # Create the target object - $trgDirectoryContext = New-Object System.DirectoryServices.ActiveDirectory.DirectoryContext($DomainOrForest,$TargetDomainName, $TargetDomainAdministratorCredential.UserName, $TargetDomainAdministratorCredential.GetNetworkCredential().Password) - $trgDomain = ([type]"System.DirectoryServices.ActiveDirectory.$DomainOrForest")::"Get$DomainOrForest"($trgDirectoryContext) - # Create the source object - $srcDirectoryContext = New-Object System.DirectoryServices.ActiveDirectory.DirectoryContext($DomainOrForest,$SourceDomainName) - $srcDomain = ([type]"System.DirectoryServices.ActiveDirectory.$DomainOrForest")::"Get$DomainOrForest"($srcDirectoryContext) - - # Find trust - try - { - # Find trust betwen source & destination. - $trust = $srcDomain.GetTrustRelationship($TargetDomainName) - - $TestTrustMessage = $($LocalizedData.TestTrustMessage) -f 'present',$Ensure - Write-Verbose -Message $TestTrustMessage - - if($Ensure -eq 'Present') - { - #region Test for trust direction - - $CheckPropertyMessage = $($LocalizedData.CheckPropertyMessage) -f 'trust direction' - Write-Verbose -Message $CheckPropertyMessage - - # Set the trust direction if not correct - if($trust.TrustDirection -ne $TrustDirection) - { - $notDesiredPropertyMessage = $($LocalizedData.NotDesiredPropertyMessage) -f 'Trust direction',$TrustDirection,$trust.TrustDirection - Write-Verbose -Message $notDesiredPropertyMessage - - if($Apply) - { - $srcDomain.UpdateTrustRelationship($trgDomain,$TrustDirection) - - $setPropertyMessage = $($LocalizedData.SetPropertyMessage) -f 'Trust direction' - Write-Verbose -Message $setPropertyMessage - } - else - { - return $false - } - } # end trust direction is not correct - - # Trust direction is correct - else - { - $desiredPropertyMessage = $($LocalizedData.DesiredPropertyMessage) -f 'Trust direction' - Write-Verbose -Message $desiredPropertyMessage - } - #endregion trust direction - - #region Test for trust type - - $CheckPropertyMessage = $($LocalizedData.CheckPropertyMessage) -f 'trust type' - Write-Verbose -Message $CheckPropertyMessage - - # Set the trust type if not correct - if($trust.TrustType-ne $TrustType) - { - $notDesiredPropertyMessage = $($LocalizedData.NotDesiredPropertyMessage) -f 'Trust type',$TrustType,$trust.TrustType - Write-Verbose -Message $notDesiredPropertyMessage - - if($Apply) - { - # Only way to fix the trust direction is to delete it and create again - # TODO: Add a property to ask user permission to delete an existing trust - $srcDomain.DeleteTrustRelationship($trgDomain) - $srcDomain.CreateTrustRelationship($trgDomain,$TrustDirection) - - $setPropertyMessage = $($LocalizedData.SetPropertyMessage) -f 'Trust type' - Write-Verbose -Message $setPropertyMessage - } - else - { - return $false - } - } # end trust type is not correct - - # Trust type is correct - else - { - $desiredPropertyMessage = $($LocalizedData.DesiredPropertyMessage) -f 'Trust type' - Write-Verbose -Message $desiredPropertyMessage - } - - #endregion Test for trust type - - # If both trust type and trust direction are correct, return true - if(-not $Apply) - { - return $true - } - } # end Ensure -eq present - - # If the trust should be absent, remove the trust - else - { - if($Apply) - { - $removingTrustMessage = $($LocalizedData.RemovingTrustMessage) -f $SourceDomainName,$TargetDomainName - Write-Verbose -Message $removingTrustMessage - - $srcDomain.DeleteTrustRelationship($trgDomain) - - $deleteTrustMessage = $LocalizedData.DeleteTrustMessage - Write-Verbose -Message $deleteTrustMessage - } - else - { - return $false - } - } # end Ensure -eq absent - } # end find trust - - # Trust does not exist between source and destination - catch [System.DirectoryServices.ActiveDirectory.ActiveDirectoryObjectNotFoundException] - { - $TestTrustMessage = $($LocalizedData.TestTrustMessage) -f 'absent',$Ensure - Write-Verbose -Message $TestTrustMessage - - if($Ensure -eq 'Present') - { - if($Apply) - { - $addingTrustMessage = $($LocalizedData.AddingTrustMessage) -f $SourceDomainName,$TargetDomainName - Write-Verbose -Message $addingTrustMessage - - $srcDomain.CreateTrustRelationship($trgDomain,$TrustDirection) - - $setTrustMessage = $LocalizedData.SetTrustMessage - Write-Verbose -Message $setTrustMessage - } - else - { - return $false - } - } # end Ensure -eq Present - else - { - if(-not $Apply) - { - return $true - } - } - } # end no trust - }# end getting directory object - catch [System.DirectoryServices.ActiveDirectory.ActiveDirectoryObjectNotFoundException] - { - throw - } -} - -# Internal function to throw terminating error with specified errroCategory, errorId and errorMessage -function New-TerminatingError -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory)] - [String]$errorId, - - [Parameter(Mandatory)] - [String]$errorMessage, - - [Parameter(Mandatory)] - [System.Management.Automation.ErrorCategory]$errorCategory - ) - - $exception = New-Object System.InvalidOperationException $errorMessage - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - throw $errorRecord -} - -#endregion - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainTrust/MSFT_xADDomainTrust.schema.mof b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainTrust/MSFT_xADDomainTrust.schema.mof deleted file mode 100644 index 4f35d5a6..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADDomainTrust/MSFT_xADDomainTrust.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ - -[ClassVersion("1.0.1.0"), FriendlyName("xADDomainTrust")] -class MSFT_xADDomainTrust : OMI_BaseResource -{ - [Write, Description("Should this resource be present or absent"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credentials to authenticate to the target domain")] String TargetDomainAdministratorCredential; - [Key, Description("Name of the AD domain that is being trusted")] String TargetDomainName; - [Required, Description("Type of trust"), ValueMap{"External","Forest"}, Values{"External","Forest"}] String TrustType; - [Required, Description("Direction of trust"), ValueMap{"Bidirectional","Inbound","Outbound"}, Values{"Bidirectional","Inbound","Outbound"}] String TrustDirection; - [Key, Description("Name of the AD domain that is requesting the trust")] String SourceDomainName; -}; - - diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADGroup/MSFT_xADGroup.psm1 b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADGroup/MSFT_xADGroup.psm1 deleted file mode 100644 index e23cff3f..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADGroup/MSFT_xADGroup.psm1 +++ /dev/null @@ -1,492 +0,0 @@ -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' - RetrievingGroupMembers = Retrieving group membership based on '{0}' property. - GroupMembershipInDesiredState = Group membership is in the desired state. - GroupMembershipNotDesiredState = Group membership is NOT in the desired state. - - AddingGroupMembers = Adding '{0}' member(s) to AD group '{1}'. - RemovingGroupMembers = Removing '{0}' member(s) from AD group '{1}'. - AddingGroup = Adding AD Group '{0}' - UpdatingGroup = Updating AD Group '{0}' - RemovingGroup = Removing AD Group '{0}' - MovingGroup = Moving AD Group '{0}' to '{1}' - GroupNotFound = AD Group '{0}' was not found - NotDesiredPropertyState = AD Group '{0}' is not correct. Expected '{1}', actual '{2}' - UpdatingGroupProperty = Updating AD Group property '{0}' to '{1}' -'@ -} - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $GroupName, - - [ValidateSet('DomainLocal','Global','Universal')] - [System.String] - $GroupScope = 'Global', - - [ValidateSet('Security','Distribution')] - [System.String] - $Category = 'Security', - - [ValidateNotNullOrEmpty()] - [System.String] - $Path, - - [ValidateSet("Present", "Absent")] - [System.String] - $Ensure = "Present", - - [ValidateNotNullOrEmpty()] - [System.String] - $Description, - - [ValidateNotNullOrEmpty()] - [System.String] - $DisplayName, - - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $Credential, - - [ValidateNotNullOrEmpty()] - [System.String] - $DomainController, - - [System.String[]] - $Members, - - [System.String[]] - $MembersToInclude, - - [System.String[]] - $MembersToExclude, - - [ValidateSet('SamAccountName','DistinguishedName','SID','ObjectGUID')] - [System.String] - $MembershipAttribute = 'SamAccountName', - - ## This must be the user's DN - [ValidateNotNullOrEmpty()] - [System.String] - $ManagedBy, - - [ValidateNotNullOrEmpty()] - [System.String] - $Notes - ) - Assert-Module -ModuleName 'ActiveDirectory'; - $adGroupParams = Get-ADCommonParameters @PSBoundParameters; - try { - $adGroup = Get-ADGroup @adGroupParams -Property Name,GroupScope,GroupCategory,DistinguishedName,Description,DisplayName,ManagedBy,Info; - Write-Verbose -Message ($LocalizedData.RetrievingGroupMembers -f $MembershipAttribute); - ## Retrieve the current list of members, returning the specified membership attribute - $adGroupMembers = (Get-ADGroupMember @adGroupParams).$MembershipAttribute; - $targetResource = @{ - GroupName = $adGroup.Name; - GroupScope = $adGroup.GroupScope; - Category = $adGroup.GroupCategory; - Path = Get-ADObjectParentDN -DN $adGroup.DistinguishedName; - Description = $adGroup.Description; - DisplayName = $adGroup.DisplayName; - Members = $adGroupMembers; - MembersToInclude = $MembersToInclude; - MembersToExclude = $MembersToExclude; - MembershipAttribute = $MembershipAttribute; - ManagedBy = $adGroup.ManagedBy; - Notes = $adGroup.Info; - Ensure = 'Absent'; - } - if ($adGroup) - { - $targetResource['Ensure'] = 'Present'; - } - } - catch [Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException] { - Write-Verbose ($LocalizedData.GroupNotFound -f $GroupName); - $targetResource = @{ - GroupName = $GroupName; - GroupScope = $GroupScope; - Category = $Category; - Path = $Path; - Description = $Description; - DisplayName = $DisplayName; - Members = @(); - MembersToInclude = $MembersToInclude; - MembersToExclude = $MembersToExclude; - MembershipAttribute = $MembershipAttribute; - ManagedBy = $ManagedBy; - Notes = $Notes; - Ensure = 'Absent'; - } - } - return $targetResource; -} #end function Get-TargetResource - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $GroupName, - - [ValidateSet('DomainLocal','Global','Universal')] - [System.String] - $GroupScope = 'Global', - - [ValidateSet('Security','Distribution')] - [System.String] - $Category = 'Security', - - [ValidateNotNullOrEmpty()] - [System.String] - $Path, - - [ValidateSet("Present", "Absent")] - [System.String] - $Ensure = "Present", - - [ValidateNotNullOrEmpty()] - [System.String] - $Description, - - [ValidateNotNullOrEmpty()] - [System.String] - $DisplayName, - - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $Credential, - - [ValidateNotNullOrEmpty()] - [System.String] - $DomainController, - - [System.String[]] - $Members, - - [System.String[]] - $MembersToInclude, - - [System.String[]] - $MembersToExclude, - - [ValidateSet('SamAccountName','DistinguishedName','SID','ObjectGUID')] - [System.String] - $MembershipAttribute = 'SamAccountName', - - ## This must be the user's DN - [ValidateNotNullOrEmpty()] - [System.String] - $ManagedBy, - - [ValidateNotNullOrEmpty()] - [System.String] - $Notes - ) - ## Validate parameters before we even attempt to retrieve anything - $assertMemberParameters = @{}; - if ($PSBoundParameters.ContainsKey('Members') -and -not [system.string]::IsNullOrEmpty($Members)) - { - $assertMemberParameters['Members'] = $Members; - } - if ($PSBoundParameters.ContainsKey('MembersToInclude') -and -not [system.string]::IsNullOrEmpty($MembersToInclude)) - { - $assertMemberParameters['MembersToInclude'] = $MembersToInclude; - } - if ($PSBoundParameters.ContainsKey('MembersToExclude') -and -not [system.string]::IsNullOrEmpty($MembersToExclude)) - { - $assertMemberParameters['MembersToExclude'] = $MembersToExclude; - } - Assert-MemberParameters @assertMemberParameters -ModuleName 'xADDomain' -ErrorAction Stop; - - $targetResource = Get-TargetResource @PSBoundParameters; - $targetResourceInCompliance = $true; - if ($targetResource.GroupScope -ne $GroupScope) - { - Write-Verbose ($LocalizedData.NotDesiredPropertyState -f 'GroupScope', $GroupScope, $targetResource.GroupScope); - $targetResourceInCompliance = $false; - } - if ($targetResource.Category -ne $Category) - { - Write-Verbose ($LocalizedData.NotDesiredPropertyState -f 'Category', $Category, $targetResource.Category); - $targetResourceInCompliance = $false; - } - if ($Path -and ($targetResource.Path -ne $Path)) - { - Write-Verbose ($LocalizedData.NotDesiredPropertyState -f 'Path', $Path, $targetResource.Path); - $targetResourceInCompliance = $false; - } - if ($Description -and ($targetResource.Description -ne $Description)) - { - Write-Verbose ($LocalizedData.NotDesiredPropertyState -f 'Description', $Description, $targetResource.Description); - $targetResourceInCompliance = $false; - } - if ($DisplayName -and ($targetResource.DisplayName -ne $DisplayName)) - { - Write-Verbose ($LocalizedData.NotDesiredPropertyState -f 'DisplayName', $DisplayName, $targetResource.DisplayName); - $targetResourceInCompliance = $false; - } - if ($ManagedBy -and ($targetResource.ManagedBy -ne $ManagedBy)) - { - Write-Verbose ($LocalizedData.NotDesiredPropertyState -f 'ManagedBy', $ManagedBy, $targetResource.ManagedBy); - $targetResourceInCompliance = $false; - } - if ($Notes -and ($targetResource.Notes -ne $Notes)) - { - Write-Verbose ($LocalizedData.NotDesiredPropertyState -f 'Notes', $Notes, $targetResource.Notes); - $targetResourceInCompliance = $false; - } - ## Test group members match passed membership parameters - if (-not (Test-Members @assertMemberParameters -ExistingMembers $targetResource.Members)) - { - Write-Verbose -Message $LocalizedData.GroupMembershipNotDesiredState; - $targetResourceInCompliance = $false; - } - if ($targetResource.Ensure -ne $Ensure) - { - Write-Verbose ($LocalizedData.NotDesiredPropertyState -f 'Ensure', $Ensure, $targetResource.Ensure); - $targetResourceInCompliance = $false; - } - return $targetResourceInCompliance; -} #end function Test-TargetResource - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $GroupName, - - [ValidateSet('DomainLocal','Global','Universal')] - [System.String] - $GroupScope = 'Global', - - [ValidateSet('Security','Distribution')] - [System.String] - $Category = 'Security', - - [ValidateNotNullOrEmpty()] - [System.String] - $Path, - - [ValidateSet("Present", "Absent")] - [System.String] - $Ensure = "Present", - - [ValidateNotNullOrEmpty()] - [System.String] - $Description, - - [ValidateNotNullOrEmpty()] - [System.String] - $DisplayName, - - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $Credential, - - [ValidateNotNullOrEmpty()] - [System.String] - $DomainController, - - [System.String[]] - $Members, - - [System.String[]] - $MembersToInclude, - - [System.String[]] - $MembersToExclude, - - [ValidateSet('SamAccountName','DistinguishedName','SID','ObjectGUID')] - [System.String] - $MembershipAttribute = 'SamAccountName', - - ## This must be the user's DN - [ValidateNotNullOrEmpty()] - [System.String] - $ManagedBy, - - [ValidateNotNullOrEmpty()] - [System.String] - $Notes - - ) - Assert-Module -ModuleName 'ActiveDirectory'; - $adGroupParams = Get-ADCommonParameters @PSBoundParameters; - - try { - $adGroup = Get-ADGroup @adGroupParams -Property Name,GroupScope,GroupCategory,DistinguishedName,Description,DisplayName,ManagedBy,Info; - - if ($Ensure -eq 'Present') { - - $setADGroupParams = $adGroupParams.Clone(); - $setADGroupParams['Identity'] = $adGroup.DistinguishedName; - - # Update existing group properties - if ($Category -ne $adGroup.GroupCategory) - { - Write-Verbose ($LocalizedData.UpdatingGroupProperty -f 'Category', $Category); - $setADGroupParams['GroupCategory'] = $Category; - } - if ($GroupScope -ne $adGroup.GroupScope) - { - ## Cannot change DomainLocal to Global or vice versa directly. Need to change them to a Universal group first! - Set-ADGroup -Identity $adGroup.DistinguishedName -GroupScope Universal; - Write-Verbose ($LocalizedData.UpdatingGroupProperty -f 'GroupScope', $GroupScope); - $setADGroupParams['GroupScope'] = $GroupScope; - } - if ($Description -and ($Description -ne $adGroup.Description)) - { - Write-Verbose ($LocalizedData.UpdatingGroupProperty -f 'Description', $Description); - $setADGroupParams['Description'] = $Description; - } - if ($DisplayName -and ($DisplayName -ne $adGroup.DisplayName)) - { - Write-Verbose ($LocalizedData.UpdatingGroupProperty -f 'DisplayName', $DisplayName); - $setADGroupParams['DisplayName'] = $DisplayName; - } - if ($ManagedBy -and ($ManagedBy -ne $adGroup.ManagedBy)) - { - Write-Verbose ($LocalizedData.UpdatingGroupProperty -f 'ManagedBy', $ManagedBy); - $setADGroupParams['ManagedBy'] = $ManagedBy; - } - if ($Notes -and ($Notes -ne $adGroup.Info)) - { - Write-Verbose ($LocalizedData.UpdatingGroupProperty -f 'Notes', $Notes); - $setADGroupParams['Replace'] = @{ Info = $Notes }; - } - Write-Verbose ($LocalizedData.UpdatingGroup -f $GroupName); - Set-ADGroup @setADGroupParams; - - # Move group if the path is not correct - if ($Path -and ($Path -ne (Get-ADObjectParentDN -DN $adGroup.DistinguishedName))) { - Write-Verbose ($LocalizedData.MovingGroup -f $GroupName, $Path); - $moveADObjectParams = $adGroupParams.Clone(); - $moveADObjectParams['Identity'] = $adGroup.DistinguishedName - Move-ADObject @moveADObjectParams -TargetPath $Path; - } - - Write-Verbose -Message ($LocalizedData.RetrievingGroupMembers -f $MembershipAttribute); - $adGroupMembers = (Get-ADGroupMember @adGroupParams).$MembershipAttribute; - if (-not (Test-Members -ExistingMembers $adGroupMembers -Members $Members -MembersToInclude $MembersToInclude -MembersToExclude $MembersToExclude)) - { - ## The fact that we're in the Set method, there is no need to validate the parameter - ## combination as this was performed in the Test method - if ($PSBoundParameters.ContainsKey('Members') -and -not [system.string]::IsNullOrEmpty($Members)) - { - # Remove all existing first and add explicit members - $Members = Remove-DuplicateMembers -Members $Members; - # We can only remove members if there are members already in the group! - if ($adGroupMembers.Count -gt 0) - { - Write-Verbose -Message ($LocalizedData.RemovingGroupMembers -f $adGroupMembers.Count, $GroupName); - Remove-ADGroupMember @adGroupParams -Members $adGroupMembers -Confirm:$false; - } - Write-Verbose -Message ($LocalizedData.AddingGroupMembers -f $Members.Count, $GroupName); - Add-ADGroupMember @adGroupParams -Members $Members; - } - if ($PSBoundParameters.ContainsKey('MembersToInclude') -and -not [system.string]::IsNullOrEmpty($MembersToInclude)) - { - $MembersToInclude = Remove-DuplicateMembers -Members $MembersToInclude; - Write-Verbose -Message ($LocalizedData.AddingGroupMembers -f $MembersToInclude.Count, $GroupName); - Add-ADGroupMember @adGroupParams -Members $MembersToInclude; - } - if ($PSBoundParameters.ContainsKey('MembersToExclude') -and -not [system.string]::IsNullOrEmpty($MembersToExclude)) - { - $MembersToExclude = Remove-DuplicateMembers -Members $MembersToExclude; - Write-Verbose -Message ($LocalizedData.RemovingGroupMembers -f $MembersToExclude.Count, $GroupName); - Remove-ADGroupMember @adGroupParams -Members $MembersToExclude -Confirm:$false; - } - } - } - elseif ($Ensure -eq 'Absent') - { - # Remove existing group - Write-Verbose ($LocalizedData.RemovingGroup -f $GroupName); - Remove-ADGroup @adGroupParams -Confirm:$false; - } - } - catch [Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException] - { - ## The AD group doesn't exist - if ($Ensure -eq 'Present') - { - - Write-Verbose ($LocalizedData.GroupNotFound -f $GroupName); - Write-Verbose ($LocalizedData.AddingGroup -f $GroupName); - - $adGroupParams = Get-ADCommonParameters @PSBoundParameters -UseNameParameter; - if ($Description) - { - $adGroupParams['Description'] = $Description; - } - if ($DisplayName) - { - $adGroupParams['DisplayName'] = $DisplayName; - } - if ($ManagedBy) - { - $adGroupParams['ManagedBy'] = $ManagedBy; - } - if ($Path) - { - $adGroupParams['Path'] = $Path; - } - ## Create group - $adGroup = New-ADGroup @adGroupParams -GroupCategory $Category -GroupScope $GroupScope -PassThru; - - ## Only the New-ADGroup cmdlet takes a -Name parameter. Refresh - ## the parameters with the -Identity parameter rather than -Name - $adGroupParams = Get-ADCommonParameters @PSBoundParameters - - if ($Notes) { - ## Can't set the Notes field when creating the group - Write-Verbose ($LocalizedData.UpdatingGroupProperty -f 'Notes', $Notes); - $setADGroupParams = $adGroupParams.Clone(); - $setADGroupParams['Identity'] = $adGroup.DistinguishedName; - Set-ADGroup @setADGroupParams -Add @{ Info = $Notes }; - } - - ## Add the required members - if ($PSBoundParameters.ContainsKey('Members') -and -not [system.string]::IsNullOrEmpty($Members)) - { - $Members = Remove-DuplicateMembers -Members $Members; - Write-Verbose -Message ($LocalizedData.AddingGroupMembers -f $Members.Count, $GroupName); - Add-ADGroupMember @adGroupParams -Members $Members; - } - elseif ($PSBoundParameters.ContainsKey('MembersToInclude') -and -not [system.string]::IsNullOrEmpty($MembersToInclude)) - { - $MembersToInclude = Remove-DuplicateMembers -Members $MembersToInclude; - Write-Verbose -Message ($LocalizedData.AddingGroupMembers -f $MembersToInclude.Count, $GroupName); - Add-ADGroupMember @adGroupParams -Members $MembersToInclude; - } - - } - } #end catch -} #end function Set-TargetResource - -## Import the common AD functions -$adCommonFunctions = Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -ChildPath '\MSFT_xADCommon\MSFT_xADCommon.ps1'; -. $adCommonFunctions; - -Export-ModuleMember -Function *-TargetResource; diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADGroup/MSFT_xADGroup.schema.mof b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADGroup/MSFT_xADGroup.schema.mof deleted file mode 100644 index 4466bb7c..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADGroup/MSFT_xADGroup.schema.mof +++ /dev/null @@ -1,19 +0,0 @@ -[ClassVersion("1.0.1.0"), FriendlyName("xADGroup")] -class MSFT_xADGroup : OMI_BaseResource -{ - [Key, Description("Name of the Active Directory group")] String GroupName; - [Write, Description("Active Directory group scope"), ValueMap{"DomainLocal","Global","Universal"}, Values{"DomainLocal","Global","Universal"}] String GroupScope; - [Write, Description("Active Directory group category"), ValueMap{"Security","Distribution"}, Values{"Security","Distribution"}] String Category; - [Write, Description("Location of the group within Active Directory expressed as a Distinguished Name")] String Path; - [Write, Description("Should this resource be present or absent"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("Description of the Active Directory group")] String Description; - [Write, Description("Display name of the Active Directory group")] String DisplayName; - [Write, Description("Credentials used to enact the change upon"), EmbeddedInstance("MSFT_Credential")] String Credential; - [Write, Description("Active Directory domain controller to enact the change upon")] String DomainController; - [Write, Description("Active Directory group membership should match membership exactly")] String Members[]; - [Write, Description("Active Directory group should include these members")] String MembersToInclude[]; - [Write, Description("Active Directory group should NOT include these members")] String MembersToExclude[]; - [Write, Description("Active Directory attribute used to perform membership operations"), ValueMap{"SamAccountName","DistinguishedName","ObjectGUID","SID"}, Values{"SamAccountName","DistinguishedName","ObjectGUID","SID"}] String MembershipAttribute; - [Write, Description("Active Directory managed by attribute specified as a DistinguishedName")] String ManagedBy; - [Write, Description("Active Directory group notes field")] String Notes; -}; diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADOrganizationalUnit/MSFT_xADOrganizationalUnit.psm1 b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADOrganizationalUnit/MSFT_xADOrganizationalUnit.psm1 deleted file mode 100644 index 71617065..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADOrganizationalUnit/MSFT_xADOrganizationalUnit.psm1 +++ /dev/null @@ -1,221 +0,0 @@ -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' - RoleNotFoundError = Please ensure that the PowerShell module for role '{0}' is installed - RetrievingOU = Retrieving OU '{0}'. - UpdatingOU = Updating OU '{0}' - DeletingOU = Deleting OU '{0}' - CreatingOU = Creating OU '{0}' - OUInDesiredState = OU '{0}' exists and is in the desired state - OUNotInDesiredState = OU '{0}' exists but is not in the desired state - OUExistsButShouldNot = OU '{0}' exists when it should not exist - OUDoesNotExistButShould = OU '{0}' does not exist when it should exist -'@ -} - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory)] - [System.String] $Name, - - [parameter(Mandatory)] - [System.String] $Path - ) - - Assert-Module -ModuleName 'ActiveDirectory'; - Write-Verbose ($LocalizedData.RetrievingOU -f $Name) - $ou = Get-ADOrganizationalUnit -Filter { Name -eq $Name } -SearchBase $Path -SearchScope OneLevel -Properties ProtectedFromAccidentalDeletion, Description - - $targetResource = @{ - Name = $Name - Path = $Path - Ensure = if ($null -eq $ou) { 'Absent' } else { 'Present' } - ProtectedFromAccidentalDeletion = $ou.ProtectedFromAccidentalDeletion - Description = $ou.Description - } - return $targetResource - -} # end function Get-TargetResource - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory)] - [System.String] $Name, - - [parameter(Mandatory)] - [System.String] $Path, - - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present', - - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $Credential, - - [ValidateNotNull()] - [System.Boolean] $ProtectedFromAccidentalDeletion = $true, - - [ValidateNotNull()] - [System.String] $Description = '' - ) - - $targetResource = Get-TargetResource -Name $Name -Path $Path - - if ($targetResource.Ensure -eq 'Present') - { - if ($Ensure -eq 'Present') - { - ## Organizational unit exists - if ([System.String]::IsNullOrEmpty($Description)) { - $isCompliant = (($targetResource.Name -eq $Name) -and - ($targetResource.Path -eq $Path) -and - ($targetResource.ProtectedFromAccidentalDeletion -eq $ProtectedFromAccidentalDeletion)) - } - else { - $isCompliant = (($targetResource.Name -eq $Name) -and - ($targetResource.Path -eq $Path) -and - ($targetResource.ProtectedFromAccidentalDeletion -eq $ProtectedFromAccidentalDeletion) -and - ($targetResource.Description -eq $Description)) - } - - if ($isCompliant) - { - Write-Verbose ($LocalizedData.OUInDesiredState -f $targetResource.Name) - } - else - { - Write-Verbose ($LocalizedData.OUNotInDesiredState -f $targetResource.Name) - } - } - else - { - $isCompliant = $false - Write-Verbose ($LocalizedData.OUExistsButShouldNot -f $targetResource.Name) - } - } - else - { - ## Organizational unit does not exist - if ($Ensure -eq 'Present') - { - $isCompliant = $false - Write-Verbose ($LocalizedData.OUDoesNotExistButShould -f $targetResource.Name) - } - else - { - $isCompliant = $true - Write-Verbose ($LocalizedData.OUInDesiredState -f $targetResource.Name) - } - } - - return $isCompliant - -} #end function Test-TargetResource - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory)] - [System.String] $Name, - - [parameter(Mandatory)] - [System.String] $Path, - - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present', - - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $Credential, - - [ValidateNotNull()] - [System.Boolean] $ProtectedFromAccidentalDeletion = $true, - - [ValidateNotNull()] - [System.String] $Description = '' - ) - - Assert-Module -ModuleName 'ActiveDirectory'; - $targetResource = Get-TargetResource -Name $Name -Path $Path - - if ($targetResource.Ensure -eq 'Present') - { - $ou = Get-ADOrganizationalUnit -Filter { Name -eq $Name } -SearchBase $Path -SearchScope OneLevel - if ($Ensure -eq 'Present') - { - Write-Verbose ($LocalizedData.UpdatingOU -f $targetResource.Name) - $setADOrganizationalUnitParams = @{ - Identity = $ou - Description = $Description - ProtectedFromAccidentalDeletion = $ProtectedFromAccidentalDeletion - } - if ($Credential) - { - $setADOrganizationalUnitParams['Credential'] = $Credential - } - Set-ADOrganizationalUnit @setADOrganizationalUnitParams - } - else - { - Write-Verbose ($LocalizedData.DeletingOU -f $targetResource.Name) - if ($targetResource.ProtectedFromAccidentalDeletion) - { - $setADOrganizationalUnitParams = @{ - Identity = $ou - ProtectedFromAccidentalDeletion = $ProtectedFromAccidentalDeletion - } - if ($Credential) - { - $setADOrganizationalUnitParams['Credential'] = $Credential - } - Set-ADOrganizationalUnit @setADOrganizationalUnitParams - } - - $removeADOrganizationalUnitParams = @{ - Identity = $ou - } - if ($Credential) - { - $removeADOrganizationalUnitParams['Credential'] = $Credential - } - Remove-ADOrganizationalUnit @removeADOrganizationalUnitParams - } - } - else - { - Write-Verbose ($LocalizedData.CreatingOU -f $targetResource.Name) - $newADOrganizationalUnitParams = @{ - Name = $Name - Path = $Path - Description = $Description - ProtectedFromAccidentalDeletion = $ProtectedFromAccidentalDeletion - } - if ($Credential) { - $newADOrganizationalUnitParams['Credential'] = $Credential - } - New-ADOrganizationalUnit @newADOrganizationalUnitParams - } - -} #end function Set-TargetResource - -## Import the common AD functions -$adCommonFunctions = Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -ChildPath '\MSFT_xADCommon\MSFT_xADCommon.ps1'; -. $adCommonFunctions; - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADOrganizationalUnit/MSFT_xADOrganizationalUnit.schema.mof b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADOrganizationalUnit/MSFT_xADOrganizationalUnit.schema.mof deleted file mode 100644 index 687a7542..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADOrganizationalUnit/MSFT_xADOrganizationalUnit.schema.mof +++ /dev/null @@ -1,12 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xADOrganizationalUnit")] -class MSFT_xADOrganizationalUnit : OMI_BaseResource -{ - [Key, Description("The name of OU")] string Name; - [Key, Description("Specifies the X500 path of the OU or container where the new object is created")] string Path; - - [Write, ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}] string Ensure; - [Write, EmbeddedInstance("MSFT_Credential"),Description("The credential to be used to perform the operation on Active Directory")] string Credential; - [Write, Description("Defaults to True")] boolean ProtectedFromAccidentalDeletion; - [Write, Description("The description of the OU")] string Description; -}; - diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADRecycleBin/MSFT_xADRecycleBin.psm1 b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADRecycleBin/MSFT_xADRecycleBin.psm1 deleted file mode 100644 index d64268fb..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADRecycleBin/MSFT_xADRecycleBin.psm1 +++ /dev/null @@ -1,189 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $ForestFQDN, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $EnterpriseAdministratorCredential - ) - - Try - { - # AD cmdlets generate non-terminating errors. - $ErrorActionPreference = 'Stop' - - $RootDSE = Get-ADRootDSE -Server $ForestFQDN -Credential $EnterpriseAdministratorCredential - $RecycleBinPath = "CN=Recycle Bin Feature,CN=Optional Features,CN=Directory Service,CN=Windows NT,CN=Services,$($RootDSE.configurationNamingContext)" - $msDSEnabledFeature = Get-ADObject -Identity "CN=Partitions,$($RootDSE.configurationNamingContext)" -Property msDS-EnabledFeature -Server $ForestFQDN -Credential $EnterpriseAdministratorCredential | - Select-Object -ExpandProperty msDS-EnabledFeature - - If ($msDSEnabledFeature -contains $RecycleBinPath) { - $RecycleBinEnabled = $True - } Else { - $RecycleBinEnabled = $False - } - } - - Catch [Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException],[Microsoft.ActiveDirectory.Management.ADServerDownException] { - Write-Error -Message "Cannot contact forest $ForestFQDN. Check the spelling of the Forest FQDN and make sure that a domain contoller is available on the network." - Throw $_ - } - Catch [System.Security.Authentication.AuthenticationException] { - Write-Error -Message "Credential error. Check the username and password used." - Throw $_ - } - Catch { - Write-Error -Message "Unhandled exception getting Recycle Bin status for forest $ForestFQDN." - Throw $_ - } - - Finally { - $ErrorActionPreference = 'Continue' - } - - $returnValue = @{ - ForestFQDN = $ForestFQDN - RecycleBinEnabled = $RecycleBinEnabled - ForestMode = $RootDSE.forestFunctionality.ToString() - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding(SupportsShouldProcess=$true)] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $ForestFQDN, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $EnterpriseAdministratorCredential - ) - - - Try - { - # AD cmdlets generate non-terminating errors. - $ErrorActionPreference = 'Stop' - - $Forest = Get-ADForest -Identity $ForestFQDN -Server $ForestFQDN -Credential $EnterpriseAdministratorCredential - - # Check minimum forest level and throw if not - If (($Forest.ForestMode -as [int]) -lt 4) { - Write-Verbose -Message "Forest functionality level $($Forest.ForestMode) does not meet minimum requirement of Windows2008R2Forest or greater." - Throw "Forest functionality level $($Forest.ForestMode) does not meet minimum requirement of Windows2008R2Forest or greater." - } - - If ($PSCmdlet.ShouldProcess($Forest.RootDomain, "Enable Active Directory Recycle Bin")) { - Enable-ADOptionalFeature 'Recycle Bin Feature' -Scope ForestOrConfigurationSet ` - -Target $Forest.RootDomain -Server $Forest.DomainNamingMaster ` - -Credential $EnterpriseAdministratorCredential ` - -Verbose - } - } - - Catch [Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException],[Microsoft.ActiveDirectory.Management.ADServerDownException] { - Write-Error -Message "Cannot contact forest $ForestFQDN. Check the spelling of the Forest FQDN and make sure that a domain contoller is available on the network." - Throw $_ - } - Catch [System.Security.Authentication.AuthenticationException] { - Write-Error -Message "Credential error. Check the username and password used." - Throw $_ - } - Catch { - Write-Error -Message "Unhandled exception setting Recycle Bin status for forest $ForestFQDN." - Throw $_ - } - - Finally { - $ErrorActionPreference = 'Continue' - } - -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $ForestFQDN, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $EnterpriseAdministratorCredential - ) - - Try { - # AD cmdlets generate non-terminating errors. - $ErrorActionPreference = 'Stop' - - $RootDSE = Get-ADRootDSE -Server $ForestFQDN -Credential $EnterpriseAdministratorCredential - $RecycleBinPath = "CN=Recycle Bin Feature,CN=Optional Features,CN=Directory Service,CN=Windows NT,CN=Services,$($RootDSE.configurationNamingContext)" - $msDSEnabledFeature = Get-ADObject -Identity "CN=Partitions,$($RootDSE.configurationNamingContext)" -Property msDS-EnabledFeature -Server $ForestFQDN -Credential $EnterpriseAdministratorCredential | - Select-Object -ExpandProperty msDS-EnabledFeature - - If ($msDSEnabledFeature -contains $RecycleBinPath) { - Write-Verbose "Active Directory Recycle Bin is enabled." - Return $True - } Else { - Write-Verbose "Active Directory Recycle Bin is not enabled." - Return $False - } - } - - Catch [Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException],[Microsoft.ActiveDirectory.Management.ADServerDownException] { - Write-Error -Message "Cannot contact forest $ForestFQDN. Check the spelling of the Forest FQDN and make sure that a domain contoller is available on the network." - Throw $_ - } - Catch [System.Security.Authentication.AuthenticationException] { - Write-Error -Message "Credential error. Check the username and password used." - Throw $_ - } - Catch { - Write-Error -Message "Unhandled exception testing Recycle Bin status for forest $ForestFQDN." - Throw $_ - } - - Finally { - $ErrorActionPreference = 'Continue' - } - - -} - - -Export-ModuleMember -Function *-TargetResource - -<# -Test syntax: - -$cred = Get-Credential contoso\administrator - -# Valid Domain -Get-TargetResource -ForestFQDN contoso.com -EnterpriseAdministratorCredential $cred -Test-TargetResource -ForestFQDN contoso.com -EnterpriseAdministratorCredential $cred -Set-TargetResource -ForestFQDN contoso.com -EnterpriseAdministratorCredential $cred -WhatIf - -# Invalid Domain -Get-TargetResource -ForestFQDN contoso.cm -EnterpriseAdministratorCredential $cred -Test-TargetResource -ForestFQDN contoso.cm -EnterpriseAdministratorCredential $cred -Set-TargetResource -ForestFQDN contoso.cm -EnterpriseAdministratorCredential $cred -WhatIf -#> - - - diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADRecycleBin/MSFT_xADRecycleBin.schema.mof b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADRecycleBin/MSFT_xADRecycleBin.schema.mof deleted file mode 100644 index 6688c5b4..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADRecycleBin/MSFT_xADRecycleBin.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xADRecycleBin")] -class MSFT_xADRecycleBin : OMI_BaseResource -{ - [Key] String ForestFQDN; - [Required, EmbeddedInstance("MSFT_Credential")] String EnterpriseAdministratorCredential; - [Read] String RecycleBinEnabled; - [Read] String ForestMode; -}; diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADRecycleBin/ResourceDesignerScripts/GeneratexADRecycleBinSchema.ps1 b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADRecycleBin/ResourceDesignerScripts/GeneratexADRecycleBinSchema.ps1 deleted file mode 100644 index 831ac8e2..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADRecycleBin/ResourceDesignerScripts/GeneratexADRecycleBinSchema.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -New-xDscResource -Name MSFT_xADRecycleBin -FriendlyName xADRecycleBin -ModuleName xActiveDirectory -Path . -Force -Property @( - New-xDscResourceProperty -Name ForestFQDN -Type String -Attribute Key - New-xDscResourceProperty -Name EnterpriseAdministratorCredential -Type PSCredential -Attribute Required - New-xDscResourceProperty -Name RecycleBinEnabled -Type Boolean -Attribute Read - New-xDscResourceProperty -Name ForestMode -Type String -Attribute Read -) diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADUser/MSFT_xADUser.psm1 b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADUser/MSFT_xADUser.psm1 deleted file mode 100644 index e5f0f84c..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADUser/MSFT_xADUser.psm1 +++ /dev/null @@ -1,1017 +0,0 @@ -[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPassWordParams', '')] -param() - -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' - RoleNotFoundError = Please ensure that the PowerShell module for role '{0}' is installed. - RetrievingADUserError = Error looking up Active Directory user '{0}' ({0}@{1}). - PasswordParameterConflictError = Parameter '{0}' cannot be set to '{1}' when the '{2}' parameter is specified. - - RetrievingADUser = Retrieving Active Directory user '{0}' ({0}@{1}) ... - CreatingADDomainConnection = Creating connection to Active Directory domain '{0}' ... - CheckingADUserPassword = Checking Active Directory user '{0}' password ... - ADUserIsPresent = Active Directory user '{0}' ({0}@{1}) is present. - ADUserNotPresent = Active Directory user '{0}' ({0}@{1}) was NOT present. - ADUserNotDesiredPropertyState = User '{0}' property is NOT in the desired state. Expected '{1}', actual '{2}'. - - AddingADUser = Adding Active Directory user '{0}'. - RemovingADUser = Removing Active Directory user '{0}'. - UpdatingADUser = Updating Active Directory user '{0}'. - SettingADUserPassword = Setting Active Directory user password. - UpdatingADUserProperty = Updating user property '{0}' with/to '{1}'. - RemovingADUserProperty = Removing user property '{0}' with '{1}'. - MovingADUser = Moving user from '{0}' to '{1}'. - RenamingADUser = Renaming user from '{0}' to '{1}'. -'@ -} - -## Create a property map that maps the DSC resource parameters to the -## Active Directory user attributes. -$adPropertyMap = @( - @{ Parameter = 'CommonName'; ADProperty = 'cn'; } - @{ Parameter = 'UserPrincipalName'; } - @{ Parameter = 'DisplayName'; } - @{ Parameter = 'Path'; ADProperty = 'distinguishedName'; } - @{ Parameter = 'GivenName'; } - @{ Parameter = 'Initials'; } - @{ Parameter = 'Surname'; ADProperty = 'sn'; } - @{ Parameter = 'Description'; } - @{ Parameter = 'StreetAddress'; } - @{ Parameter = 'POBox'; } - @{ Parameter = 'City'; ADProperty = 'l'; } - @{ Parameter = 'State'; ADProperty = 'st'; } - @{ Parameter = 'PostalCode'; } - @{ Parameter = 'Country'; ADProperty = 'c'; } - @{ Parameter = 'Department'; } - @{ Parameter = 'Division'; } - @{ Parameter = 'Company'; } - @{ Parameter = 'Office'; ADProperty = 'physicalDeliveryOfficeName'; } - @{ Parameter = 'JobTitle'; ADProperty = 'title'; } - @{ Parameter = 'EmailAddress'; ADProperty = 'mail'; } - @{ Parameter = 'EmployeeID'; } - @{ Parameter = 'EmployeeNumber'; } - @{ Parameter = 'HomeDirectory'; } - @{ Parameter = 'HomeDrive'; } - @{ Parameter = 'HomePage'; ADProperty = 'wWWHomePage'; } - @{ Parameter = 'ProfilePath'; } - @{ Parameter = 'LogonScript'; ADProperty = 'scriptPath'; } - @{ Parameter = 'Notes'; ADProperty = 'info'; } - @{ Parameter = 'OfficePhone'; ADProperty = 'telephoneNumber'; } - @{ Parameter = 'MobilePhone'; ADProperty = 'mobile'; } - @{ Parameter = 'Fax'; ADProperty = 'facsimileTelephoneNumber'; } - @{ Parameter = 'Pager'; } - @{ Parameter = 'IPPhone'; } - @{ Parameter = 'HomePhone'; } - @{ Parameter = 'Enabled'; } - @{ Parameter = 'Manager'; } - @{ Parameter = 'PasswordNeverExpires'; UseCmdletParameter = $true; } - @{ Parameter = 'CannotChangePassword'; UseCmdletParameter = $true; } -) - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - ## Name of the domain where the user account is located (only used if password is managed) - [Parameter(Mandatory)] - [System.String] $DomainName, - - # Specifies the Security Account Manager (SAM) account name of the user (ldapDisplayName 'sAMAccountName') - [Parameter(Mandatory)] - [System.String] $UserName, - - ## Specifies a new password value for an account - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $Password, - - ## Specifies whether the user account is created or deleted - [ValidateSet('Present', 'Absent')] - [System.String] $Ensure = 'Present', - - ## Specifies the common nane assigned to the user account (ldapDisplayName 'cn') - [ValidateNotNull()] - [System.String] $CommonName = $UserName, - - ## Specifies the UPN assigned to the user account (ldapDisplayName 'userPrincipalName') - [ValidateNotNull()] - [System.String] $UserPrincipalName, - - ## Specifies the display name of the object (ldapDisplayName 'displayName') - [ValidateNotNull()] - [System.String] $DisplayName, - - ## Specifies the X.500 path of the Organizational Unit (OU) or container where the new object is created - [ValidateNotNull()] - [System.String] $Path, - - ## Specifies the user's given name (ldapDisplayName 'givenName') - [ValidateNotNull()] - [System.String] $GivenName, - - ## Specifies the initials that represent part of a user's name (ldapDisplayName 'initials') - [ValidateNotNull()] - [System.String] $Initials, - - ## Specifies the user's last name or surname (ldapDisplayName 'sn') - [ValidateNotNull()] - [System.String] $Surname, - - ## Specifies a description of the object (ldapDisplayName 'description') - [ValidateNotNull()] - [System.String] $Description, - - ## Specifies the user's street address (ldapDisplayName 'streetAddress') - [ValidateNotNull()] - [System.String] $StreetAddress, - - ## Specifies the user's post office box number (ldapDisplayName 'postOfficeBox') - [ValidateNotNull()] - [System.String] $POBox, - - ## Specifies the user's town or city (ldapDisplayName 'l') - [ValidateNotNull()] - [System.String] $City, - - ## Specifies the user's or Organizational Unit's state or province (ldapDisplayName 'st') - [ValidateNotNull()] - [System.String] $State, - - ## Specifies the user's postal code or zip code (ldapDisplayName 'postalCode') - [ValidateNotNull()] - [System.String] $PostalCode, - - ## Specifies the country or region code for the user's language of choice (ldapDisplayName 'c') - [ValidateNotNull()] - [System.String] $Country, - - ## Specifies the user's department (ldapDisplayName 'department') - [ValidateNotNull()] - [System.String] $Department, - - ## Specifies the user's division (ldapDisplayName 'division') - [ValidateNotNull()] - [System.String] $Division, - - ## Specifies the user's company (ldapDisplayName 'company') - [ValidateNotNull()] - [System.String] $Company, - - ## Specifies the location of the user's office or place of business (ldapDisplayName 'physicalDeliveryOfficeName') - [ValidateNotNull()] - [System.String] $Office, - - ## Specifies the user's title (ldapDisplayName 'title') - [ValidateNotNull()] - [System.String] $JobTitle, - - ## Specifies the user's e-mail address (ldapDisplayName 'mail') - [ValidateNotNull()] - [System.String] $EmailAddress, - - ## Specifies the user's employee ID (ldapDisplayName 'employeeID') - [ValidateNotNull()] - [System.String] $EmployeeID, - - ## Specifies the user's employee number (ldapDisplayName 'employeeNumber') - [ValidateNotNull()] - [System.String] $EmployeeNumber, - - ## Specifies a user's home directory path (ldapDisplayName 'homeDirectory') - [ValidateNotNull()] - [System.String] $HomeDirectory, - - ## Specifies a drive that is associated with the UNC path defined by the HomeDirectory property (ldapDisplayName 'homeDrive') - [ValidateNotNull()] - [System.String] $HomeDrive, - - ## Specifies the URL of the home page of the object (ldapDisplayName 'wWWHomePage') - [ValidateNotNull()] - [System.String] $HomePage, - - ## Specifies a path to the user's profile (ldapDisplayName 'profilePath') - [ValidateNotNull()] - [System.String] $ProfilePath, - - ## Specifies a path to the user's log on script (ldapDisplayName 'scriptPath') - [ValidateNotNull()] - [System.String] $LogonScript, - - ## Specifies the notes attached to the user's accoutn (ldapDisplayName 'info') - [ValidateNotNull()] - [System.String] $Notes, - - ## Specifies the user's office telephone number (ldapDisplayName 'telephoneNumber') - [ValidateNotNull()] - [System.String] $OfficePhone, - - ## Specifies the user's mobile phone number (ldapDisplayName 'mobile') - [ValidateNotNull()] - [System.String] $MobilePhone, - - ## Specifies the user's fax phone number (ldapDisplayName 'facsimileTelephoneNumber') - [ValidateNotNull()] - [System.String] $Fax, - - ## Specifies the user's home telephone number (ldapDisplayName 'homePhone') - [ValidateNotNull()] - [System.String] $HomePhone, - - ## Specifies the user's pager number (ldapDisplayName 'pager') - [ValidateNotNull()] - [System.String] $Pager, - - ## Specifies the user's IP telephony phone number (ldapDisplayName 'ipPhone') - [ValidateNotNull()] - [System.String] $IPPhone, - - ## Specifies the user's manager specified as a Distinguished Name (ldapDisplayName 'manager') - [ValidateNotNull()] - [System.String] $Manager, - - ## Specifies if the account is enabled (default True) - [ValidateNotNull()] - [System.Boolean] $Enabled = $true, - - ## Specifies whether the account password can be changed - [ValidateNotNull()] - [System.Boolean] $CannotChangePassword, - - ## Specifies whether the password of an account can expire - [ValidateNotNull()] - [System.Boolean] $PasswordNeverExpires, - - ## Specifies the Active Directory Domain Services instance to use to perform the task. - [ValidateNotNull()] - [System.String] $DomainController, - - ## Specifies the user account credentials to use to perform this task. Ideally this should just be called 'Credential' but is here for backwards compatibility - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $DomainAdministratorCredential, - - ## Specifies the authentication context type when testing user passwords #61 - [ValidateSet('Default','Negotiate')] - [System.String] $PasswordAuthentication = 'Default' - ) - - Assert-Module -ModuleName 'ActiveDirectory'; - - try - { - $adCommonParameters = Get-ADCommonParameters @PSBoundParameters; - - $adProperties = @(); - ## Create an array of the AD propertie names to retrieve from the property map - foreach ($property in $adPropertyMap) - { - if ($property.ADProperty) - { - $adProperties += $property.ADProperty; - } - else - { - $adProperties += $property.Parameter; - } - } - - Write-Verbose -Message ($LocalizedData.RetrievingADUser -f $UserName, $DomainName); - $adUser = Get-ADUser @adCommonParameters -Properties $adProperties; - Write-Verbose -Message ($LocalizedData.ADUserIsPresent -f $UserName, $DomainName); - $Ensure = 'Present'; - } - catch [Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException] - { - Write-Verbose -Message ($LocalizedData.ADUserNotPresent -f $UserName, $DomainName); - $Ensure = 'Absent'; - } - catch - { - Write-Error -Message ($LocalizedData.RetrievingADUserError -f $UserName, $DomainName); - throw $_; - } - - $targetResource = @{ - DomainName = $DomainName; - Password = $Password; - UserName = $UserName; - DistinguishedName = $adUser.DistinguishedName; ## Read-only property - Ensure = $Ensure; - DomainController = $DomainController; - } - - ## Retrieve each property from the ADPropertyMap and add to the hashtable - foreach ($property in $adPropertyMap) - { - if ($property.Parameter -eq 'Path') { - ## The path returned is not the parent container - if (-not [System.String]::IsNullOrEmpty($adUser.DistinguishedName)) - { - $targetResource['Path'] = Get-ADObjectParentDN -DN $adUser.DistinguishedName; - } - } - elseif ($property.ADProperty) - { - ## The AD property name is different to the function parameter to use this - $targetResource[$property.Parameter] = $adUser.($property.ADProperty); - } - else - { - ## The AD property name matches the function parameter - $targetResource[$property.Parameter] = $adUser.($property.Parameter); - } - } - return $targetResource; - -} #end function Get-TargetResource - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - ## Name of the domain where the user account is located (only used if password is managed) - [Parameter(Mandatory)] - [System.String] $DomainName, - - # Specifies the Security Account Manager (SAM) account name of the user (ldapDisplayName 'sAMAccountName') - [Parameter(Mandatory)] - [System.String] $UserName, - - ## Specifies a new password value for an account - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $Password, - - ## Specifies whether the user account is created or deleted - [ValidateSet('Present', 'Absent')] - [System.String] $Ensure = 'Present', - - ## Specifies the common nane assigned to the user account (ldapDisplayName 'cn') - [ValidateNotNull()] - [System.String] $CommonName = $UserName, - - ## Specifies the UPN assigned to the user account (ldapDisplayName 'userPrincipalName') - [ValidateNotNull()] - [System.String] $UserPrincipalName, - - ## Specifies the display name of the object (ldapDisplayName 'displayName') - [ValidateNotNull()] - [System.String] $DisplayName, - - ## Specifies the X.500 path of the Organizational Unit (OU) or container where the new object is created - [ValidateNotNull()] - [System.String] $Path, - - ## Specifies the user's given name (ldapDisplayName 'givenName') - [ValidateNotNull()] - [System.String] $GivenName, - - ## Specifies the initials that represent part of a user's name (ldapDisplayName 'initials') - [ValidateNotNull()] - [System.String] $Initials, - - ## Specifies the user's last name or surname (ldapDisplayName 'sn') - [ValidateNotNull()] - [System.String] $Surname, - - ## Specifies a description of the object (ldapDisplayName 'description') - [ValidateNotNull()] - [System.String] $Description, - - ## Specifies the user's street address (ldapDisplayName 'streetAddress') - [ValidateNotNull()] - [System.String] $StreetAddress, - - ## Specifies the user's post office box number (ldapDisplayName 'postOfficeBox') - [ValidateNotNull()] - [System.String] $POBox, - - ## Specifies the user's town or city (ldapDisplayName 'l') - [ValidateNotNull()] - [System.String] $City, - - ## Specifies the user's or Organizational Unit's state or province (ldapDisplayName 'st') - [ValidateNotNull()] - [System.String] $State, - - ## Specifies the user's postal code or zip code (ldapDisplayName 'postalCode') - [ValidateNotNull()] - [System.String] $PostalCode, - - ## Specifies the country or region code for the user's language of choice (ldapDisplayName 'c') - [ValidateNotNull()] - [System.String] $Country, - - ## Specifies the user's department (ldapDisplayName 'department') - [ValidateNotNull()] - [System.String] $Department, - - ## Specifies the user's division (ldapDisplayName 'division') - [ValidateNotNull()] - [System.String] $Division, - - ## Specifies the user's company (ldapDisplayName 'company') - [ValidateNotNull()] - [System.String] $Company, - - ## Specifies the location of the user's office or place of business (ldapDisplayName 'physicalDeliveryOfficeName') - [ValidateNotNull()] - [System.String] $Office, - - ## Specifies the user's title (ldapDisplayName 'title') - [ValidateNotNull()] - [System.String] $JobTitle, - - ## Specifies the user's e-mail address (ldapDisplayName 'mail') - [ValidateNotNull()] - [System.String] $EmailAddress, - - ## Specifies the user's employee ID (ldapDisplayName 'employeeID') - [ValidateNotNull()] - [System.String] $EmployeeID, - - ## Specifies the user's employee number (ldapDisplayName 'employeeNumber') - [ValidateNotNull()] - [System.String] $EmployeeNumber, - - ## Specifies a user's home directory path (ldapDisplayName 'homeDirectory') - [ValidateNotNull()] - [System.String] $HomeDirectory, - - ## Specifies a drive that is associated with the UNC path defined by the HomeDirectory property (ldapDisplayName 'homeDrive') - [ValidateNotNull()] - [System.String] $HomeDrive, - - ## Specifies the URL of the home page of the object (ldapDisplayName 'wWWHomePage') - [ValidateNotNull()] - [System.String] $HomePage, - - ## Specifies a path to the user's profile (ldapDisplayName 'profilePath') - [ValidateNotNull()] - [System.String] $ProfilePath, - - ## Specifies a path to the user's log on script (ldapDisplayName 'scriptPath') - [ValidateNotNull()] - [System.String] $LogonScript, - - ## Specifies the notes attached to the user's accoutn (ldapDisplayName 'info') - [ValidateNotNull()] - [System.String] $Notes, - - ## Specifies the user's office telephone number (ldapDisplayName 'telephoneNumber') - [ValidateNotNull()] - [System.String] $OfficePhone, - - ## Specifies the user's mobile phone number (ldapDisplayName 'mobile') - [ValidateNotNull()] - [System.String] $MobilePhone, - - ## Specifies the user's fax phone number (ldapDisplayName 'facsimileTelephoneNumber') - [ValidateNotNull()] - [System.String] $Fax, - - ## Specifies the user's home telephone number (ldapDisplayName 'homePhone') - [ValidateNotNull()] - [System.String] $HomePhone, - - ## Specifies the user's pager number (ldapDisplayName 'pager') - [ValidateNotNull()] - [System.String] $Pager, - - ## Specifies the user's IP telephony phone number (ldapDisplayName 'ipPhone') - [ValidateNotNull()] - [System.String] $IPPhone, - - ## Specifies the user's manager specified as a Distinguished Name (ldapDisplayName 'manager') - [ValidateNotNull()] - [System.String] $Manager, - - ## Specifies if the account is enabled (default True) - [ValidateNotNull()] - [System.Boolean] $Enabled = $true, - - ## Specifies whether the account password can be changed - [ValidateNotNull()] - [System.Boolean] $CannotChangePassword, - - ## Specifies whether the password of an account can expire - [ValidateNotNull()] - [System.Boolean] $PasswordNeverExpires, - - ## Specifies the Active Directory Domain Services instance to use to perform the task. - [ValidateNotNull()] - [System.String] $DomainController, - - ## Specifies the user account credentials to use to perform this task. Ideally this should just be called 'Credential' but is here for backwards compatibility - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $DomainAdministratorCredential, - - ## Specifies the authentication context type when testing user passwords #61 - [ValidateSet('Default','Negotiate')] - [System.String] $PasswordAuthentication = 'Default' - ) - - Assert-Parameters @PSBoundParameters; - $targetResource = Get-TargetResource @PSBoundParameters; - $isCompliant = $true; - - if ($Ensure -eq 'Absent') - { - if ($targetResource.Ensure -eq 'Present') - { - Write-Verbose -Message ($LocalizedData.ADUserNotDesiredPropertyState -f 'Ensure', $PSBoundParameters.Ensure, $targetResource.Ensure); - $isCompliant = $false; - } - } - else - { - ## Add common name, ensure and enabled as they may not be explicitly passed and we want to enumerate them - $PSBoundParameters['Ensure'] = $Ensure; - $PSBoundParameters['Enabled'] = $Enabled; - - foreach ($parameter in $PSBoundParameters.Keys) - { - if ($parameter -eq 'Password') - { - $testPasswordParams = @{ - Username = $UserName; - Password = $Password; - DomainName = $DomainName; - PasswordAuthentication = $PasswordAuthentication; - } - if ($DomainAdministratorCredential) - { - $testPasswordParams['DomainAdministratorCredential'] = $DomainAdministratorCredential; - } - if (-not (Test-Password @testPasswordParams)) - { - Write-Verbose -Message ($LocalizedData.ADUserNotDesiredPropertyState -f 'Password', '', ''); - $isCompliant = $false; - } - } - # Only check properties that are returned by Get-TargetResource - elseif ($targetResource.ContainsKey($parameter)) - { - ## This check is required to be able to explicitly remove values with an empty string, if required - if (([System.String]::IsNullOrEmpty($PSBoundParameters.$parameter)) -and ([System.String]::IsNullOrEmpty($targetResource.$parameter))) - { - # Both values are null/empty and therefore we are compliant - } - elseif ($PSBoundParameters.$parameter -ne $targetResource.$parameter) - { - Write-Verbose -Message ($LocalizedData.ADUserNotDesiredPropertyState -f $parameter, $PSBoundParameters.$parameter, $targetResource.$parameter); - $isCompliant = $false; - } - } - } #end foreach PSBoundParameter - } - - return $isCompliant; - -} #end function Test-TargetResource - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - ## Name of the domain where the user account is located (only used if password is managed) - [Parameter(Mandatory)] - [System.String] $DomainName, - - # Specifies the Security Account Manager (SAM) account name of the user (ldapDisplayName 'sAMAccountName') - [Parameter(Mandatory)] - [System.String] $UserName, - - ## Specifies a new password value for an account - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $Password, - - ## Specifies whether the user account is created or deleted - [ValidateSet('Present', 'Absent')] - [System.String] $Ensure = 'Present', - - ## Specifies the common nane assigned to the user account (ldapDisplayName 'cn') - [ValidateNotNull()] - [System.String] $CommonName = $UserName, - - ## Specifies the UPN assigned to the user account (ldapDisplayName 'userPrincipalName') - [ValidateNotNull()] - [System.String] $UserPrincipalName, - - ## Specifies the display name of the object (ldapDisplayName 'displayName') - [ValidateNotNull()] - [System.String] $DisplayName, - - ## Specifies the X.500 path of the Organizational Unit (OU) or container where the new object is created - [ValidateNotNull()] - [System.String] $Path, - - ## Specifies the user's given name (ldapDisplayName 'givenName') - [ValidateNotNull()] - [System.String] $GivenName, - - ## Specifies the initials that represent part of a user's name (ldapDisplayName 'initials') - [ValidateNotNull()] - [System.String] $Initials, - - ## Specifies the user's last name or surname (ldapDisplayName 'sn') - [ValidateNotNull()] - [System.String] $Surname, - - ## Specifies a description of the object (ldapDisplayName 'description') - [ValidateNotNull()] - [System.String] $Description, - - ## Specifies the user's street address (ldapDisplayName 'streetAddress') - [ValidateNotNull()] - [System.String] $StreetAddress, - - ## Specifies the user's post office box number (ldapDisplayName 'postOfficeBox') - [ValidateNotNull()] - [System.String] $POBox, - - ## Specifies the user's town or city (ldapDisplayName 'l') - [ValidateNotNull()] - [System.String] $City, - - ## Specifies the user's or Organizational Unit's state or province (ldapDisplayName 'st') - [ValidateNotNull()] - [System.String] $State, - - ## Specifies the user's postal code or zip code (ldapDisplayName 'postalCode') - [ValidateNotNull()] - [System.String] $PostalCode, - - ## Specifies the country or region code for the user's language of choice (ldapDisplayName 'c') - [ValidateNotNull()] - [System.String] $Country, - - ## Specifies the user's department (ldapDisplayName 'department') - [ValidateNotNull()] - [System.String] $Department, - - ## Specifies the user's division (ldapDisplayName 'division') - [ValidateNotNull()] - [System.String] $Division, - - ## Specifies the user's company (ldapDisplayName 'company') - [ValidateNotNull()] - [System.String] $Company, - - ## Specifies the location of the user's office or place of business (ldapDisplayName 'physicalDeliveryOfficeName') - [ValidateNotNull()] - [System.String] $Office, - - ## Specifies the user's title (ldapDisplayName 'title') - [ValidateNotNull()] - [System.String] $JobTitle, - - ## Specifies the user's e-mail address (ldapDisplayName 'mail') - [ValidateNotNull()] - [System.String] $EmailAddress, - - ## Specifies the user's employee ID (ldapDisplayName 'employeeID') - [ValidateNotNull()] - [System.String] $EmployeeID, - - ## Specifies the user's employee number (ldapDisplayName 'employeeNumber') - [ValidateNotNull()] - [System.String] $EmployeeNumber, - - ## Specifies a user's home directory path (ldapDisplayName 'homeDirectory') - [ValidateNotNull()] - [System.String] $HomeDirectory, - - ## Specifies a drive that is associated with the UNC path defined by the HomeDirectory property (ldapDisplayName 'homeDrive') - [ValidateNotNull()] - [System.String] $HomeDrive, - - ## Specifies the URL of the home page of the object (ldapDisplayName 'wWWHomePage') - [ValidateNotNull()] - [System.String] $HomePage, - - ## Specifies a path to the user's profile (ldapDisplayName 'profilePath') - [ValidateNotNull()] - [System.String] $ProfilePath, - - ## Specifies a path to the user's log on script (ldapDisplayName 'scriptPath') - [ValidateNotNull()] - [System.String] $LogonScript, - - ## Specifies the notes attached to the user's accoutn (ldapDisplayName 'info') - [ValidateNotNull()] - [System.String] $Notes, - - ## Specifies the user's office telephone number (ldapDisplayName 'telephoneNumber') - [ValidateNotNull()] - [System.String] $OfficePhone, - - ## Specifies the user's mobile phone number (ldapDisplayName 'mobile') - [ValidateNotNull()] - [System.String] $MobilePhone, - - ## Specifies the user's fax phone number (ldapDisplayName 'facsimileTelephoneNumber') - [ValidateNotNull()] - [System.String] $Fax, - - ## Specifies the user's home telephone number (ldapDisplayName 'homePhone') - [ValidateNotNull()] - [System.String] $HomePhone, - - ## Specifies the user's pager number (ldapDisplayName 'pager') - [ValidateNotNull()] - [System.String] $Pager, - - ## Specifies the user's IP telephony phone number (ldapDisplayName 'ipPhone') - [ValidateNotNull()] - [System.String] $IPPhone, - - ## Specifies the user's manager specified as a Distinguished Name (ldapDisplayName 'manager') - [ValidateNotNull()] - [System.String] $Manager, - - ## Specifies if the account is enabled (default True) - [ValidateNotNull()] - [System.Boolean] $Enabled = $true, - - ## Specifies whether the account password can be changed - [ValidateNotNull()] - [System.Boolean] $CannotChangePassword, - - ## Specifies whether the password of an account can expire - [ValidateNotNull()] - [System.Boolean] $PasswordNeverExpires, - - ## Specifies the Active Directory Domain Services instance to use to perform the task. - [ValidateNotNull()] - [System.String] $DomainController, - - ## Specifies the user account credentials to use to perform this task. Ideally this should just be called 'Credential' but is here for backwards compatibility - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $DomainAdministratorCredential, - - ## Specifies the authentication context type when testing user passwords #61 - [ValidateSet('Default','Negotiate')] - [System.String] $PasswordAuthentication = 'Default' - ) - - Assert-Parameters @PSBoundParameters; - $targetResource = Get-TargetResource @PSBoundParameters; - - ## Add common name, ensure and enabled as they may not be explicitly passed - $PSBoundParameters['Ensure'] = $Ensure; - $PSBoundParameters['Enabled'] = $Enabled; - - if ($Ensure -eq 'Present') - { - if ($targetResource.Ensure -eq 'Absent') { - ## User does not exist and needs creating - $newADUserParams = Get-ADCommonParameters @PSBoundParameters -UseNameParameter; - if ($PSBoundParameters.ContainsKey('Path')) - { - $newADUserParams['Path'] = $Path; - } - Write-Verbose -Message ($LocalizedData.AddingADUser -f $UserName); - New-ADUser @newADUserParams -SamAccountName $UserName; - ## Now retrieve the newly created user - $targetResource = Get-TargetResource @PSBoundParameters; - } - - $setADUserParams = Get-ADCommonParameters @PSBoundParameters; - $replaceUserProperties = @{}; - $removeUserProperties = @{}; - foreach ($parameter in $PSBoundParameters.Keys) - { - ## Only check/action properties specified/declared parameters that match one of the function's - ## parameters. This will ignore common parameters such as -Verbose etc. - if ($targetResource.ContainsKey($parameter)) - { - if ($parameter -eq 'Path' -and ($PSBoundParameters.Path -ne $targetResource.Path)) - { - ## Cannot move users by updating the DistinguishedName property - $adCommonParameters = Get-ADCommonParameters @PSBoundParameters; - ## Using the SamAccountName for identity with Move-ADObject does not work, use the DN instead - $adCommonParameters['Identity'] = $targetResource.DistinguishedName; - Write-Verbose -Message ($LocalizedData.MovingADUser -f $targetResource.Path, $PSBoundParameters.Path); - Move-ADObject @adCommonParameters -TargetPath $PSBoundParameters.Path; - } - elseif ($parameter -eq 'CommonName' -and ($PSBoundParameters.CommonName -ne $targetResource.CommonName)) - { - ## Cannot rename users by updating the CN property directly - $adCommonParameters = Get-ADCommonParameters @PSBoundParameters; - ## Using the SamAccountName for identity with Rename-ADObject does not work, use the DN instead - $adCommonParameters['Identity'] = $targetResource.DistinguishedName; - Write-Verbose -Message ($LocalizedData.RenamingADUser -f $targetResource.CommonName, $PSBoundParameters.CommonName); - Rename-ADObject @adCommonParameters -NewName $PSBoundParameters.CommonName; - } - elseif ($parameter -eq 'Password') - { - $adCommonParameters = Get-ADCommonParameters @PSBoundParameters; - Write-Verbose -Message ($LocalizedData.SettingADUserPassword -f $UserName); - Set-ADAccountPassword @adCommonParameters -Reset -NewPassword $Password.Password; - } - elseif ($parameter -eq 'Enabled' -and ($PSBoundParameters.$parameter -ne $targetResource.$parameter)) - { - ## We cannot enable/disable an account with -Add or -Replace parameters, but inform that - ## we will change this as it is out of compliance (it always gets set anyway) - Write-Verbose -Message ($LocalizedData.UpdatingADUserProperty -f $parameter, $PSBoundParameters.$parameter); - } - elseif ($PSBoundParameters.$parameter -ne $targetResource.$parameter) - { - ## Find the associated AD property - $adProperty = $adPropertyMap | Where-Object { $_.Parameter -eq $parameter }; - - if ([System.String]::IsNullOrEmpty($adProperty)) - { - ## We can't do anything is an empty AD property! - } - elseif ([System.String]::IsNullOrEmpty($PSBoundParameters.$parameter)) - { - ## We are removing properties - ## Only remove if the existing value in not null or empty - if (-not ([System.String]::IsNullOrEmpty($targetResource.$parameter))) - { - Write-Verbose -Message ($LocalizedData.RemovingADUserProperty -f $parameter, $PSBoundParameters.$parameter); - if ($adProperty.UseCmdletParameter -eq $true) - { - ## We need to pass the parameter explicitly to Set-ADUser, not via -Remove - $setADUserParams[$adProperty.Parameter] = $PSBoundParameters.$parameter; - } - elseif ([System.String]::IsNullOrEmpty($adProperty.ADProperty)) - { - $removeUserProperties[$adProperty.Parameter] = $targetResource.$parameter; - } - else - { - $removeUserProperties[$adProperty.ADProperty] = $targetResource.$parameter; - } - } - } #end if remove existing value - else - { - ## We are replacing the existing value - Write-Verbose -Message ($LocalizedData.UpdatingADUserProperty -f $parameter, $PSBoundParameters.$parameter); - if ($adProperty.UseCmdletParameter -eq $true) - { - ## We need to pass the parameter explicitly to Set-ADUser, not via -Replace - $setADUserParams[$adProperty.Parameter] = $PSBoundParameters.$parameter; - } - elseif ([System.String]::IsNullOrEmpty($adProperty.ADProperty)) - { - $replaceUserProperties[$adProperty.Parameter] = $PSBoundParameters.$parameter; - } - else - { - $replaceUserProperties[$adProperty.ADProperty] = $PSBoundParameters.$parameter; - } - } #end if replace existing value - } - - } #end if TargetResource parameter - } #end foreach PSBoundParameter - - ## Only pass -Remove and/or -Replace if we have something to set/change - if ($replaceUserProperties.Count -gt 0) - { - $setADUserParams['Replace'] = $replaceUserProperties; - } - if ($removeUserProperties.Count -gt 0) - { - $setADUserParams['Remove'] = $removeUserProperties; - } - - Write-Verbose -Message ($LocalizedData.UpdatingADUser -f $UserName); - [ref] $null = Set-ADUser @setADUserParams -Enabled $Enabled; - } - elseif (($Ensure -eq 'Absent') -and ($targetResource.Ensure -eq 'Present')) - { - ## User exists and needs removing - Write-Verbose ($LocalizedData.RemovingADUser -f $UserName); - $adCommonParameters = Get-ADCommonParameters @PSBoundParameters; - [ref] $null = Remove-ADUser @adCommonParameters -Confirm:$false; - } - -} #end function Set-TargetResource - -# Internal function to validate unsupported options/configurations -function Assert-Parameters -{ - [CmdletBinding()] - param - ( - [ValidateNotNull()] - [System.Management.Automation.PSCredential] $Password, - - [ValidateNotNull()] - [System.Boolean] $Enabled = $true, - - [Parameter(ValueFromRemainingArguments)] - $IgnoredArguments - ) - - ## We cannot test/set passwords on disabled AD accounts - if (($PSBoundParameters.ContainsKey('Password')) -and ($Enabled -eq $false)) - { - $throwInvalidArgumentErrorParams = @{ - ErrorId = 'xADUser_DisabledAccountPasswordConflict'; - ErrorMessage = $LocalizedData.PasswordParameterConflictError -f 'Enabled', $false, 'Password'; - } - ThrowInvalidArgumentError @throwInvalidArgumentErrorParams; - } - -} #end function Assert-Parameters - -# Internal function to test the validity of a user's password. -function Test-Password -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory)] - [System.String] $DomainName, - - [Parameter(Mandatory)] - [System.String] $UserName, - - [Parameter(Mandatory)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $Password, - - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $DomainAdministratorCredential, - - ## Specifies the authentication context type when testing user passwords #61 - [Parameter(Mandatory)] - [ValidateSet('Default','Negotiate')] - [System.String] $PasswordAuthentication - ) - - Write-Verbose -Message ($LocalizedData.CreatingADDomainConnection -f $DomainName); - Add-Type -AssemblyName 'System.DirectoryServices.AccountManagement'; - - if ($DomainAdministratorCredential) - { - $principalContext = New-Object System.DirectoryServices.AccountManagement.PrincipalContext( - [System.DirectoryServices.AccountManagement.ContextType]::Domain, - $DomainName, - $DomainAdministratorCredential.UserName, - $DomainAdministratorCredential.GetNetworkCredential().Password - ); - } - else - { - $principalContext = New-Object System.DirectoryServices.AccountManagement.PrincipalContext( - [System.DirectoryServices.AccountManagement.ContextType]::Domain, - $DomainName, - $null, - $null - ); - } - Write-Verbose -Message ($LocalizedData.CheckingADUserPassword -f $UserName); - - if ($PasswordAuthentication -eq 'Negotiate') - { - return $principalContext.ValidateCredentials( - $UserName, - $Password.GetNetworkCredential().Password, - [System.DirectoryServices.AccountManagement.ContextOptions]::Negotiate -bor - [System.DirectoryServices.AccountManagement.ContextOptions]::Signing -bor - [System.DirectoryServices.AccountManagement.ContextOptions]::Sealing - ); - } - else - { - ## Use default authentication context - return $principalContext.ValidateCredentials( - $UserName, - $Password.GetNetworkCredential().Password - ); - } - -} #end function Test-Password - -## Import the common AD functions -$adCommonFunctions = Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -ChildPath '\MSFT_xADCommon\MSFT_xADCommon.ps1'; -. $adCommonFunctions; - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADUser/MSFT_xADUser.schema.mof b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADUser/MSFT_xADUser.schema.mof deleted file mode 100644 index c0ad1d63..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xADUser/MSFT_xADUser.schema.mof +++ /dev/null @@ -1,50 +0,0 @@ -[ClassVersion("1.0.1.0"), FriendlyName("xADUser")] -class MSFT_xADUser : OMI_BaseResource -{ - [Key, Description("Name of the domain where the user account is located (only used if password is managed)")] String DomainName; - [Key, Description("Specifies the Security Account Manager (SAM) account name of the user (ldapDisplayName 'sAMAccountName')")] String UserName; - [Write, Description("Specifies a new password value for the account"), EmbeddedInstance("MSFT_Credential")] String Password; - [Write, Description("Specifies whether the user account is created or deleted"), ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] String Ensure; - [Write, Description("Specifies the common nane assigned to the user account (ldapDisplayName 'cn')")] String CommonName; - [Write, Description("Specifies the UPN assigned to the user account (ldapDisplayName 'userPrincipalName')")] String UserPrincipalName; - [Write, Description("Specifies the display name of the object (ldapDisplayName 'displayName')")] String DisplayName; - [Write, Description("Specifies the X.500 path of the Organizational Unit (OU) or container where the new object is created")] String Path; - [Write, Description("Specifies the user's given name (ldapDisplayName 'givenName')")] String GivenName; - [Write, Description("Specifies the initials that represent part of a user's name (ldapDisplayName 'initials')")] String Initials; - [Write, Description("Specifies the user's last name or surname (ldapDisplayName 'sn')")] String Surname; - [Write, Description("Specifies a description of the object (ldapDisplayName 'description')")] String Description; - [Write, Description("Specifies the user's street address (ldapDisplayName 'streetAddress')")] String StreetAddress; - [Write, Description("Specifies the user's post office box number (ldapDisplayName 'postOfficeBox')")] String POBox; - [Write, Description("Specifies the user's town or city (ldapDisplayName 'l')")] String City; - [Write, Description("Specifies the user's or Organizational Unit's state or province (ldapDisplayName 'st')")] String State; - [Write, Description("Specifies the user's postal code or zip code (ldapDisplayName 'postalCode')")] String PostalCode; - [Write, Description("Specifies the country or region code for the user's language of choice (ldapDisplayName 'c')")] String Country; - [Write, Description("Specifies the user's department (ldapDisplayName 'department')")] String Department; - [Write, Description("Specifies the user's division (ldapDisplayName 'division')")] String Division; - [Write, Description("Specifies the user's company (ldapDisplayName 'company')")] String Company; - [Write, Description("Specifies the location of the user's office or place of business (ldapDisplayName 'physicalDeliveryOfficeName')")] String Office; - [Write, Description("Specifies the user's title (ldapDisplayName 'title')")] String JobTitle; - [Write, Description("Specifies the user's e-mail address (ldapDisplayName 'mail')")] String EmailAddress; - [Write, Description("Specifies the user's employee ID (ldapDisplayName 'employeeID')")] String EmployeeID; - [Write, Description("Specifies the user's employee number (ldapDisplayName 'employeeNumber')")] String EmployeeNumber; - [Write, Description("Specifies a user's home directory path (ldapDisplayName 'homeDirectory')")] String HomeDirectory; - [Write, Description("Specifies a drive that is associated with the UNC path defined by the HomeDirectory property (ldapDisplayName 'homeDrive')")] String HomeDrive; - [Write, Description("Specifies the URL of the home page of the object (ldapDisplayName 'wWWHomePage')")] String HomePage; - [Write, Description("Specifies a path to the user's profile (ldapDisplayName 'profilePath')")] String ProfilePath; - [Write, Description("Specifies a path to the user's log on script (ldapDisplayName 'scriptPath')")] String LogonScript; - [Write, Description("Specifies the notes attached to the user's accoutn (ldapDisplayName 'info')")] String Notes; - [Write, Description("Specifies the user's office telephone number (ldapDisplayName 'telephoneNumber')")] String OfficePhone; - [Write, Description("Specifies the user's mobile phone number (ldapDisplayName 'mobile')")] String MobilePhone; - [Write, Description("Specifies the user's fax phone number (ldapDisplayName 'facsimileTelephoneNumber')")] String Fax; - [Write, Description("Specifies the user's home telephone number (ldapDisplayName 'homePhone')")] String HomePhone; - [Write, Description("Specifies the user's pager number (ldapDisplayName 'pager')")] String Pager; - [Write, Description("Specifies the user's IP telephony phone number (ldapDisplayName 'ipPhone')")] String IPPhone; - [Write, Description("Specifies the user's manager specified as a Distinguished Name (ldapDisplayName 'manager')")] String Manager; - [Write, Description("Specifies if the account is enabled (default True)")] Boolean Enabled; - [Write, Description("Specifies whether the account password can be changed")] Boolean CannotChangePassword; - [Write, Description("Specifies whether the password of an account can expire")] Boolean PasswordNeverExpires; - [Write, Description("Specifies the Active Directory Domain Services instance to use to perform the task.")] String DomainController; - [Write, Description("Specifies the user account credentials to use to perform this task"), EmbeddedInstance("MSFT_Credential")] String DomainAdministratorCredential; - [Write, Description("Specifies the authentication context type used when testing passwords"), ValueMap{"Default","Negotiate"},Values{"Default","Negotiate"}] String PasswordAuthentication; - [Read, Description("Returns the X.500 path of the object")] String DistinguishedName; -}; diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xWaitForADDomain/MSFT_xWaitForADDomain.psm1 b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xWaitForADDomain/MSFT_xWaitForADDomain.psm1 deleted file mode 100644 index b87e8c8e..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xWaitForADDomain/MSFT_xWaitForADDomain.psm1 +++ /dev/null @@ -1,185 +0,0 @@ -function Get-TargetResource -{ - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory)] - [String]$DomainName, - - [PSCredential]$DomainUserCredential, - - [UInt64]$RetryIntervalSec = 60, - - [UInt32]$RetryCount = 10, - - [UInt32]$RebootRetryCount = 0 - - ) - - if($DomainUserCredential) - { - $convertToCimCredential = New-CimInstance -ClassName MSFT_Credential -Property @{Username=[string]$DomainUserCredential.UserName; Password=[string]$null} -Namespace root/microsoft/windows/desiredstateconfiguration -ClientOnly - } - else - { - $convertToCimCredential = $null - } - - $domain = Get-Domain -DomainName $DomainName -DomainUserCredential $DomainUserCredential - - - $returnValue = @{ - DomainName = $domain.Name - DomainUserCredential = $convertToCimCredential - RetryIntervalSec = $RetryIntervalSec - RetryCount = $RetryCount - RebootRetryCount = $RebootRetryCount - } - - $returnValue -} - - -function Set-TargetResource -{ - param - ( - [Parameter(Mandatory)] - [String]$DomainName, - - [PSCredential]$DomainUserCredential, - - [UInt64]$RetryIntervalSec = 60, - - [UInt32]$RetryCount = 10, - - [UInt32]$RebootRetryCount = 0 - - ) - - $rebootLogFile = "$env:temp\xWaitForADDomain_Reboot.tmp" - - for($count = 0; $count -lt $RetryCount; $count++) - { - $domain = Get-Domain -DomainName $DomainName -DomainUserCredential $DomainUserCredential - - if($domain) - { - if($RebootRetryCount -gt 0) - { - Remove-Item $rebootLogFile -ErrorAction SilentlyContinue - } - - break; - } - else - { - Write-Verbose -Message "Domain $DomainName not found. Will retry again after $RetryIntervalSec sec" - Start-Sleep -Seconds $RetryIntervalSec - Clear-DnsClientCache - } - } - - if(-not $domain) - { - if($RebootRetryCount -gt 0) - { - [UInt32]$rebootCount = Get-Content $RebootLogFile -ErrorAction SilentlyContinue - - if($rebootCount -lt $RebootRetryCount) - { - $rebootCount = $rebootCount + 1 - Write-Verbose -Message "Domain $DomainName not found after $count attempts with $RetryIntervalSec sec interval. Rebooting. Reboot attempt number $rebootCount of $RebootRetryCount." - Set-Content -Path $RebootLogFile -Value $rebootCount - $global:DSCMachineStatus = 1 - } - else - { - throw "Domain '$($DomainName)' NOT found after $RebootRetryCount Reboot attempts." - } - - - } - else - { - throw "Domain '$($DomainName)' NOT found after $RetryCount attempts." - } - } -} - -function Test-TargetResource -{ - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory)] - [String]$DomainName, - - [PSCredential]$DomainUserCredential, - - [UInt64]$RetryIntervalSec = 60, - - [UInt32]$RetryCount = 10, - - [UInt32]$RebootRetryCount = 0 - - ) - - $rebootLogFile = "$env:temp\xWaitForADDomain_Reboot.tmp" - - $domain = Get-Domain -DomainName $DomainName -DomainUserCredential $DomainUserCredential - - if($domain) - { - if($RebootRetryCount -gt 0) - { - Remove-Item $rebootLogFile -ErrorAction SilentlyContinue - } - - $true - } - else - { - $false - } -} - - - -function Get-Domain -{ - [OutputType([PSObject])] - param - ( - [Parameter(Mandatory)] - [String]$DomainName, - - [PSCredential]$DomainUserCredential - - ) - Write-Verbose -Message "Checking for domain $DomainName ..." - - if($DomainUserCredential) - { - $context = new-object System.DirectoryServices.ActiveDirectory.DirectoryContext('Domain', $DomainName, $DomainUserCredential.UserName, $DomainUserCredential.GetNetworkCredential().Password) - } - else - { - $context = new-object System.DirectoryServices.ActiveDirectory.DirectoryContext('Domain',$DomainName) - } - - try - { - $domain = ([System.DirectoryServices.ActiveDirectory.DomainController]::FindOne($context)).domain.ToString() - Write-Verbose -Message "Found domain $DomainName" - $returnValue = @{ - Name = $domain - } - - $returnValue - } - catch - { - Write-Verbose -Message "Domain $DomainName not found" - } -} diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xWaitForADDomain/MSFT_xWaitForADDomain.schema.mof b/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xWaitForADDomain/MSFT_xWaitForADDomain.schema.mof deleted file mode 100644 index 7b7a8233..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/DSCResources/MSFT_xWaitForADDomain/MSFT_xWaitForADDomain.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.1.0"), FriendlyName("xWaitForADDomain")] -class MSFT_xWaitForADDomain : OMI_BaseResource -{ - [Key] String DomainName; - [Write, EmbeddedInstance("MSFT_Credential")] String DomainUserCredential; - [Write] uint64 RetryIntervalSec; - [Write] uint32 RetryCount; - [Write] uint32 RebootRetryCount; -}; diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/HADCConfiguration.psd1 b/lib/puppet_x/dsc_resources/xActiveDirectory/HADCConfiguration.psd1 deleted file mode 100644 index 3f4d236e..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/HADCConfiguration.psd1 +++ /dev/null @@ -1,23 +0,0 @@ -@{ - AllNodes = @( - - @{ - Nodename = "sva-dsc1" - Role = "Primary DC" - DomainName = "sva-dscdom.nttest.microsoft.com" - PSDscAllowPlainTextPassword = $true - RetryCount = 20 - RetryIntervalSec = 30 - }, - - @{ - Nodename = "sva-dsc2" - Role = "Replica DC" - DomainName = "sva-dscdom.nttest.microsoft.com" - PSDscAllowPlainTextPassword = $true - RetryCount = 20 - RetryIntervalSec = 30 - } - ) -} - diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/LICENSE b/lib/puppet_x/dsc_resources/xActiveDirectory/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/Misc/New-ADDomainTrust.ps1 b/lib/puppet_x/dsc_resources/xActiveDirectory/Misc/New-ADDomainTrust.ps1 deleted file mode 100644 index 73f8ff64..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/Misc/New-ADDomainTrust.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -$Properties = @{ - SourceDomain = New-xDscResourceProperty -Name SourceDomainName -Type String -Attribute Key ` - -Description 'Name of the AD domain that is requesting the trust' - TargetDomain = New-xDscResourceProperty -Name TargetDomainName -Type String -Attribute Key ` - -Description 'Name of the AD domain that is being trusted' - TargetAdminCred = New-xDscResourceProperty -Name TargetDomainAdministratorCredential -Type PSCredential -Attribute Required ` - -Description 'Credentials to authenticate to the target domain' - TrustDirection = New-xDscResourceProperty -Name TrustDirection -Type String -Attribute Required -ValidateSet 'Bidirectional','Inbound','Outbound' ` - -Description 'Direction of trust' - TrustType = New-xDscResourceProperty -Name TrustType -Type String -Attribute Required -ValidateSet 'CrossLink','External','Forest','Kerberos','ParentChild','TreeRoot','Unknown' ` - -Description 'Type of trust' - Ensure = New-xDscResourceProperty -Name Ensure -Type String -Attribute Write -ValidateSet 'Present','Absent' ` - -Description 'Should this resource be present or absent' - - } -New-xDscResource -Name MSFT_xADDomainTrust -Property $Properties.Values -Path . -ModuleName xActiveDirectory -FriendlyName xADDomainTrust -Force - diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/ParentChildConfig.psd1 b/lib/puppet_x/dsc_resources/xActiveDirectory/ParentChildConfig.psd1 deleted file mode 100644 index 42b792e3..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/ParentChildConfig.psd1 +++ /dev/null @@ -1,24 +0,0 @@ -@{ - AllNodes = @( - - @{ - Nodename = "sva-dsc1" - Role = "Parent DC" - DomainName = "sva-dscdom.nttest.microsoft.com" - PSDscAllowPlainTextPassword = $true - RetryCount = 50 - RetryIntervalSec = 30 - }, - - @{ - Nodename = "sva-dsc2" - Role = "Child DC" - DomainName = "sva-dscchild" - ParentDomainName = "sva-dscdom.nttest.microsoft.com" - PSDscAllowPlainTextPassword = $true - RetryCount = 50 - RetryIntervalSec = 30 - } - ) -} - diff --git a/lib/puppet_x/dsc_resources/xActiveDirectory/xActiveDirectory.psd1 b/lib/puppet_x/dsc_resources/xActiveDirectory/xActiveDirectory.psd1 deleted file mode 100644 index 1809222d..00000000 --- a/lib/puppet_x/dsc_resources/xActiveDirectory/xActiveDirectory.psd1 +++ /dev/null @@ -1,66 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '2.16.0.0' - -# ID used to uniquely identify this module -GUID = '9FECD4F6-8F02-4707-99B3-539E940E9FF5' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'The xActiveDirectory module is originally part of the Windows PowerShell Desired State Configuration (DSC) Resource Kit. This version has been modified for use in Azure. This module contains the xADDomain, xADDomainController, xADUser, and xWaitForDomain resources. These DSC Resources allow you to configure and manage Active Directory. - -All of the resources in the DSC Resource Kit are provided AS IS, and are not supported through any Microsoft standard support program or service.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xActiveDirectory/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xActiveDirectory' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* xAdDomainController: Update to complete fix for SiteName being required field. -* xADDomain: Added retry logic to prevent FaultException to crash in Get-TargetResource on subsequent reboots after a domain is created because the service is not yet running. This error is mostly occur when the resource is used with the DSCExtension on Azure. - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - - - - - - diff --git a/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/CommonResourceHelper.psm1 b/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/CommonResourceHelper.psm1 deleted file mode 100644 index 257b21ba..00000000 --- a/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/CommonResourceHelper.psm1 +++ /dev/null @@ -1,163 +0,0 @@ -<# - .SYNOPSIS - Tests if the current machine is a Nano server. -#> -function Test-IsNanoServer -{ - if (Test-Command -Name Get-ComputerInfo) - { - $computerInfo = Get-ComputerInfo - - if ("Server" -eq $computerInfo.OsProductType ` - -and "NanoServer" -eq $computerInfo.OsServerLevel) - { - return $true - } - } - - return $false -} - -<# - .SYNOPSIS - Tests if the the specified command is found. -#> -function Test-Command -{ - param - ( - [String] $Name - ) - - return ($null -ne (Get-Command -Name $Name -ErrorAction Continue 2> $null)) -} - -<# - .SYNOPSIS - Creates and throws an invalid argument exception - - .PARAMETER Message - The message explaining why this error is being thrown - - .PARAMETER ArgumentName - The name of the invalid argument that is causing this error to be thrown -#> -function New-InvalidArgumentException -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Message, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ArgumentName - ) - - $argumentException = New-Object -TypeName 'ArgumentException' -ArgumentList @( $Message, - $ArgumentName ) - $newObjectParams = @{ - TypeName = 'System.Management.Automation.ErrorRecord' - ArgumentList = @( $argumentException, $ArgumentName, 'InvalidArgument', $null ) - } - $errorRecord = New-Object @newObjectParams - - throw $errorRecord -} - -<# - .SYNOPSIS - Creates and throws an invalid operation exception - - .PARAMETER Message - The message explaining why this error is being thrown - - .PARAMETER ErrorRecord - The error record containing the exception that is causing this terminating error -#> -function New-InvalidOperationException -{ - [CmdletBinding()] - param - ( - [ValidateNotNullOrEmpty()] - [String] - $Message, - - [ValidateNotNull()] - [System.Management.Automation.ErrorRecord] - $ErrorRecord - ) - - if ($null -eq $Message) - { - $invalidOperationException = New-Object -TypeName 'InvalidOperationException' - } - elseif ($null -eq $ErrorRecord) - { - $invalidOperationException = - New-Object -TypeName 'InvalidOperationException' -ArgumentList @( $Message ) - } - else - { - $invalidOperationException = - New-Object -TypeName 'InvalidOperationException' -ArgumentList @( $Message, - $ErrorRecord.Exception ) - } - - $newObjectParams = @{ - TypeName = 'System.Management.Automation.ErrorRecord' - ArgumentList = @( $invalidOperationException.ToString(), 'MachineStateIncorrect', - 'InvalidOperation', $null ) - } - $errorRecordToThrow = New-Object @newObjectParams - throw $errorRecordToThrow -} - -<# - .SYNOPSIS - Retrieves the localized string data based on the machine's culture. - Falls back to en-US strings if the machine's culture is not supported. - - .PARAMETER ResourceName - The name of the resource as it appears before '.strings.psd1' of the localized string file. - - For example: - For WindowsOptionalFeature: MSFT_xWindowsOptionalFeature - For Service: MSFT_xServiceResource - For Registry: MSFT_xRegistryResource -#> -function Get-LocalizedData -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ResourceName - ) - - $resourceDirectory = (Join-Path -Path $PSScriptRoot -ChildPath $ResourceName) - $localizedStringFileLocation = Join-Path -Path $resourceDirectory -ChildPath $PSUICulture - - if (-not (Test-Path -Path $localizedStringFileLocation)) - { - # Fallback to en-US - $localizedStringFileLocation = Join-Path -Path $resourceDirectory -ChildPath 'en-US' - } - - Import-LocalizedData ` - -BindingVariable 'localizedData' ` - -FileName "$ResourceName.strings.psd1" ` - -BaseDirectory $localizedStringFileLocation - - return $localizedData -} - -Export-ModuleMember -Function @( 'Test-IsNanoServer', 'New-InvalidArgumentException', - 'New-InvalidOperationException', 'Get-LocalizedData' ) diff --git a/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsCertificationAuthority/MSFT_xAdcsCertificationAuthority.psm1 b/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsCertificationAuthority/MSFT_xAdcsCertificationAuthority.psm1 deleted file mode 100644 index b64532ba..00000000 --- a/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsCertificationAuthority/MSFT_xAdcsCertificationAuthority.psm1 +++ /dev/null @@ -1,628 +0,0 @@ -# Suppressed as per PSSA Rule Severity guidelines for unit/integration tests: -# https://github.com/PowerShell/DscResources/blob/master/PSSARuleSeverities.md -[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')] -param () - -Import-Module -Name (Join-Path -Path (Split-Path $PSScriptRoot -Parent) ` - -ChildPath 'CommonResourceHelper.psm1') - -# Localized messages for Write-Verbose statements in this resource -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xAdcsCertificationAuthority' - -<# - .SYNOPSIS - Returns an object containing the current state information for the ADCS CA on the server. - .PARAMETER CAType - Specifies the type of certification authority to install. - .PARAMETER Credential - To install an enterprise certification authority, the computer must be joined to an Active - Directory Domain Services domain and a user account that is a member of the Enterprise Admin - group is required. To install a standalone certification authority, the computer can be in a - workgroup or AD DS domain. If the computer is in a workgroup, a user account that is a member - of Administrators is required. If the computer is in an AD DS domain, a user account that is - a member of Domain Admins is required. - .PARAMETER Ensure - Specifies whether the Certificate Authority should be installed or uninstalled. - .PARAMETER CACommonName - Specifies the certification authority common name. - .PARAMETER CADistinguishedNameSuffix - Specifies the certification authority distinguished name suffix. - .PARAMETER CertFile - Specifies the file name of certification authority PKCS 12 formatted certificate file. - .PARAMETER CertFilePassword - Specifies the password for certification authority certificate file. - .PARAMETER CertificateID - Specifies the thumbprint or serial number of certification authority certificate. - .PARAMETER CryptoProviderName - The name of the cryptographic service provider or key storage provider that is used to generate - or store the private key for the CA. - .PARAMETER DatabaseDirectory - Specifies the folder location of the certification authority database. - .PARAMETER HashAlgorithmName - Specifies the signature hash algorithm used by the certification authority. - .PARAMETER IgnoreUnicode - Specifies that Unicode characters are allowed in certification authority name string. - .PARAMETER KeyContainerName - Specifies the name of an existing private key container. - .PARAMETER KeyLength - Specifies the bit length for new certification authority key. - .PARAMETER LogDirectory - Specifies the folder location of the certification authority database log. - .PARAMETER OutputCertRequestFile - Specifies the folder location for certificate request file. - .PARAMETER OverwriteExistingCAinDS - Specifies that the computer object in the Active Directory Domain Service domain should be - overwritten with the same computer name. - .PARAMETER OverwriteExistingDatabase - Specifies that the existing certification authority database should be overwritten. - .PARAMETER OverwriteExistingKey - Overwrite existing key container with the same name. - .PARAMETER ParentCA - Specifies the configuration string of the parent certification authority that will certify this - CA. - .PARAMETER ValidityPeriod - Specifies the validity period of the certification authority certificate in hours, days, weeks, - months or years. If this is a subordinate CA, do not use this parameter, because the validity - period is determined by the parent CA. - .PARAMETER ValidityPeriodUnits - Validity period of the certification authority certificate. If this is a subordinate CA, do not - specify this parameter because the validity period is determined by the parent CA. - .OUTPUTS - Returns an object containing the ADCS CA state information. -#> -Function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '')] - [CmdletBinding(SupportsShouldProcess = $true)] - [OutputType([System.Collections.Hashtable])] - param ( - [Parameter(Mandatory = $true)] - [ValidateSet('EnterpriseRootCA','EnterpriseSubordinateCA','StandaloneRootCA','StandaloneSubordinateCA')] - [string] - $CAType, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [Parameter()] - [ValidateSet('Present','Absent')] - [string] - $Ensure = 'Present', - - [Parameter()] - [string] - $CACommonName, - - [Parameter()] - [string] - $CADistinguishedNameSuffix, - - [Parameter()] - [string] - $CertFile, - - [Parameter()] - [pscredential] - $CertFilePassword, - - [Parameter()] - [string] - $CertificateID, - - [Parameter()] - [string] - $CryptoProviderName, - - [Parameter()] - [string] - $DatabaseDirectory, - - [Parameter()] - [string] - $HashAlgorithmName, - - [Parameter()] - [boolean] - $IgnoreUnicode, - - [Parameter()] - [string] - $KeyContainerName, - - [Parameter()] - [uint32] - $KeyLength, - - [Parameter()] - [string] - $LogDirectory, - - [Parameter()] - [string] - $OutputCertRequestFile, - - [Parameter()] - [boolean] - $OverwriteExistingCAinDS, - - [Parameter()] - [boolean] - $OverwriteExistingDatabase, - - [Parameter()] - [boolean] - $OverwriteExistingKey, - - [Parameter()] - [string] - $ParentCA, - - [Parameter()] - [ValidateSet('Hours','Days','Months','Years')] - [string] - $ValidityPeriod, - - [Parameter()] - [uint32] - $ValidityPeriodUnits - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.GettingAdcsCAStatusMessage -f $CAType) - ) -join '' ) - - $ADCSParams = @{} + $PSBoundParameters - $null = $ADCSParams.Remove('Ensure') - $null = $ADCSParams.Remove('Debug') - $null = $ADCSParams.Remove('ErrorAction') - - try - { - $null = Install-AdcsCertificationAuthority @ADCSParams -WhatIf - # CA is not installed - $Ensure = 'Absent' - } - catch [Microsoft.CertificateServices.Deployment.Common.CA.CertificationAuthoritySetupException] - { - # CA is already installed - $Ensure = 'Present' - } - catch - { - # Something else went wrong - Throw $_ - } - - return @{ - Ensure = $Ensure - CAType = $CAType - Credential = $Credential - } -} # Function Get-TargetResource - -<# - .SYNOPSIS - Installs or uinstalls the ADCS CA from the server. - .PARAMETER CAType - Specifies the type of certification authority to install. - .PARAMETER Credential - To install an enterprise certification authority, the computer must be joined to an Active - Directory Domain Services domain and a user account that is a member of the Enterprise Admin - group is required. To install a standalone certification authority, the computer can be in a - workgroup or AD DS domain. If the computer is in a workgroup, a user account that is a member - of Administrators is required. If the computer is in an AD DS domain, a user account that is - a member of Domain Admins is required. - .PARAMETER Ensure - Specifies whether the Certificate Authority should be installed or uninstalled. - .PARAMETER CACommonName - Specifies the certification authority common name. - .PARAMETER CADistinguishedNameSuffix - Specifies the certification authority distinguished name suffix. - .PARAMETER CertFile - Specifies the file name of certification authority PKCS 12 formatted certificate file. - .PARAMETER CertFilePassword - Specifies the password for certification authority certificate file. - .PARAMETER CertificateID - Specifies the thumbprint or serial number of certification authority certificate. - .PARAMETER CryptoProviderName - The name of the cryptographic service provider or key storage provider that is used to generate - or store the private key for the CA. - .PARAMETER DatabaseDirectory - Specifies the folder location of the certification authority database. - .PARAMETER HashAlgorithmName - Specifies the signature hash algorithm used by the certification authority. - .PARAMETER IgnoreUnicode - Specifies that Unicode characters are allowed in certification authority name string. - .PARAMETER KeyContainerName - Specifies the name of an existing private key container. - .PARAMETER KeyLength - Specifies the bit length for new certification authority key. - .PARAMETER LogDirectory - Specifies the folder location of the certification authority database log. - .PARAMETER OutputCertRequestFile - Specifies the folder location for certificate request file. - .PARAMETER OverwriteExistingCAinDS - Specifies that the computer object in the Active Directory Domain Service domain should be - overwritten with the same computer name. - .PARAMETER OverwriteExistingDatabase - Specifies that the existing certification authority database should be overwritten. - .PARAMETER OverwriteExistingKey - Overwrite existing key container with the same name. - .PARAMETER ParentCA - Specifies the configuration string of the parent certification authority that will certify this - CA. - .PARAMETER ValidityPeriod - Specifies the validity period of the certification authority certificate in hours, days, weeks, - months or years. If this is a subordinate CA, do not use this parameter, because the validity - period is determined by the parent CA. - .PARAMETER ValidityPeriodUnits - Validity period of the certification authority certificate. If this is a subordinate CA, do not - specify this parameter because the validity period is determined by the parent CA. -#> -Function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '')] - [CmdletBinding()] - param ( - [Parameter(Mandatory = $true)] - [ValidateSet('EnterpriseRootCA','EnterpriseSubordinateCA','StandaloneRootCA','StandaloneSubordinateCA')] - [string] - $CAType, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [Parameter()] - [ValidateSet('Present','Absent')] - [string] - $Ensure = 'Present', - - [Parameter()] - [string] - $CACommonName, - - [Parameter()] - [string] - $CADistinguishedNameSuffix, - - [Parameter()] - [string] - $CertFile, - - [Parameter()] - [pscredential] - $CertFilePassword, - - [Parameter()] - [string] - $CertificateID, - - [Parameter()] - [string] - $CryptoProviderName, - - [Parameter()] - [string] - $DatabaseDirectory, - - [Parameter()] - [string] - $HashAlgorithmName, - - [Parameter()] - [boolean] - $IgnoreUnicode, - - [Parameter()] - [string] - $KeyContainerName, - - [Parameter()] - [uint32] - $KeyLength, - - [Parameter()] - [string] - $LogDirectory, - - [Parameter()] - [string] - $OutputCertRequestFile, - - [Parameter()] - [boolean] - $OverwriteExistingCAinDS, - - [Parameter()] - [boolean] - $OverwriteExistingDatabase, - - [Parameter()] - [boolean] - $OverwriteExistingKey, - - [Parameter()] - [string] - $ParentCA, - - [Parameter()] - [ValidateSet('Hours','Days','Months','Years')] - [string] - $ValidityPeriod, - - [Parameter()] - [uint32] - $ValidityPeriodUnits - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.SettingAdcsCAStatusMessage -f $CAType) - ) -join '' ) - - $ADCSParams = @{} + $PSBoundParameters - $null = $ADCSParams.Remove('Ensure') - $null = $ADCSParams.Remove('Debug') - $null = $ADCSParams.Remove('ErrorAction') - - switch ($Ensure) - { - 'Present' - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.InstallingAdcsCAMessage -f $CAType) - ) -join '' ) - - (Install-AdcsCertificationAuthority @ADCSParams -Force).ErrorString - } - 'Absent' - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.UninstallingAdcsCAMessage -f $CAType) - ) -join '' ) - - (Uninstall-AdcsCertificationAuthority -Force).ErrorString - } - } # switch -} # Function Set-TargetResource - -<# - .SYNOPSIS - Tests is the ADCS CA is in the desired state. - .PARAMETER CAType - Specifies the type of certification authority to install. - .PARAMETER Credential - To install an enterprise certification authority, the computer must be joined to an Active - Directory Domain Services domain and a user account that is a member of the Enterprise Admin - group is required. To install a standalone certification authority, the computer can be in a - workgroup or AD DS domain. If the computer is in a workgroup, a user account that is a member - of Administrators is required. If the computer is in an AD DS domain, a user account that is - a member of Domain Admins is required. - .PARAMETER Ensure - Specifies whether the Certificate Authority should be installed or uninstalled. - .PARAMETER CACommonName - Specifies the certification authority common name. - .PARAMETER CADistinguishedNameSuffix - Specifies the certification authority distinguished name suffix. - .PARAMETER CertFile - Specifies the file name of certification authority PKCS 12 formatted certificate file. - .PARAMETER CertFilePassword - Specifies the password for certification authority certificate file. - .PARAMETER CertificateID - Specifies the thumbprint or serial number of certification authority certificate. - .PARAMETER CryptoProviderName - The name of the cryptographic service provider or key storage provider that is used to generate - or store the private key for the CA. - .PARAMETER DatabaseDirectory - Specifies the folder location of the certification authority database. - .PARAMETER HashAlgorithmName - Specifies the signature hash algorithm used by the certification authority. - .PARAMETER IgnoreUnicode - Specifies that Unicode characters are allowed in certification authority name string. - .PARAMETER KeyContainerName - Specifies the name of an existing private key container. - .PARAMETER KeyLength - Specifies the bit length for new certification authority key. - .PARAMETER LogDirectory - Specifies the folder location of the certification authority database log. - .PARAMETER OutputCertRequestFile - Specifies the folder location for certificate request file. - .PARAMETER OverwriteExistingCAinDS - Specifies that the computer object in the Active Directory Domain Service domain should be - overwritten with the same computer name. - .PARAMETER OverwriteExistingDatabase - Specifies that the existing certification authority database should be overwritten. - .PARAMETER OverwriteExistingKey - Overwrite existing key container with the same name. - .PARAMETER ParentCA - Specifies the configuration string of the parent certification authority that will certify this - CA. - .PARAMETER ValidityPeriod - Specifies the validity period of the certification authority certificate in hours, days, weeks, - months or years. If this is a subordinate CA, do not use this parameter, because the validity - period is determined by the parent CA. - .PARAMETER ValidityPeriodUnits - Validity period of the certification authority certificate. If this is a subordinate CA, do not - specify this parameter because the validity period is determined by the parent CA. - .OUTPUTS - Returns true if the ADCS CA is in the desired state. -#> -Function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '')] - [CmdletBinding()] - [OutputType([System.Boolean])] - param ( - [Parameter(Mandatory = $true)] - [ValidateSet('EnterpriseRootCA','EnterpriseSubordinateCA','StandaloneRootCA','StandaloneSubordinateCA')] - [string] - $CAType, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [Parameter()] - [ValidateSet('Present','Absent')] - [string] - $Ensure = 'Present', - - [Parameter()] - [string] - $CACommonName, - - [Parameter()] - [string] - $CADistinguishedNameSuffix, - - [Parameter()] - [string] - $CertFile, - - [Parameter()] - [pscredential] - $CertFilePassword, - - [Parameter()] - [string] - $CertificateID, - - [Parameter()] - [string] - $CryptoProviderName, - - [Parameter()] - [string] - $DatabaseDirectory, - - [Parameter()] - [string] - $HashAlgorithmName, - - [Parameter()] - [boolean] - $IgnoreUnicode, - - [Parameter()] - [string] - $KeyContainerName, - - [Parameter()] - [uint32] - $KeyLength, - - [Parameter()] - [string] - $LogDirectory, - - [Parameter()] - [string] - $OutputCertRequestFile, - - [Parameter()] - [boolean] - $OverwriteExistingCAinDS, - - [Parameter()] - [boolean] - $OverwriteExistingDatabase, - - [Parameter()] - [boolean] - $OverwriteExistingKey, - - [Parameter()] - [string] - $ParentCA, - - [Parameter()] - [ValidateSet('Hours','Days','Months','Years')] - [string] - $ValidityPeriod, - - [Parameter()] - [uint32] - $ValidityPeriodUnits - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.TestingAdcsCAStatusMessage -f $CAType) - ) -join '' ) - - $ADCSParams = @{} + $PSBoundParameters - $null = $ADCSParams.Remove('Ensure') - $null = $ADCSParams.Remove('Debug') - $null = $ADCSParams.Remove('ErrorAction') - - try - { - $null = Install-AdcsCertificationAuthority @ADCSParams -WhatIf - # CA is not installed - switch ($Ensure) - { - 'Present' - { - # CA is not installed but should be - change required - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.AdcsCANotInstalledButShouldBeMessage -f $CAType) - ) -join '' ) - - return $false - } - 'Absent' - { - # CA is not installed and should not be - change not required - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.AdcsCANotInstalledAndShouldNotBeMessage -f $CAType) - ) -join '' ) - - return $true - } - } # switch - } - catch [Microsoft.CertificateServices.Deployment.Common.CA.CertificationAuthoritySetupException] - { - # CA is already installed - switch ($Ensure) - { - 'Present' - { - # CA is installed and should be - change not required - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.AdcsCAInstalledAndShouldBeMessage -f $CAType) - ) -join '' ) - - return $true - } - 'Absent' - { - # CA is installed and should not be - change required - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.AdcsCAInstalledButShouldNotBeMessage -f $CAType) - ) -join '' ) - - return $false - } - } # switch - } - catch - { - # Something else went wrong - Throw $_ - } # try -} # Function Test-TargetResource - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsCertificationAuthority/MSFT_xAdcsCertificationAuthority.schema.mof b/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsCertificationAuthority/MSFT_xAdcsCertificationAuthority.schema.mof deleted file mode 100644 index 3dc6ceac..00000000 --- a/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsCertificationAuthority/MSFT_xAdcsCertificationAuthority.schema.mof +++ /dev/null @@ -1,27 +0,0 @@ -[ClassVersion("0.1.0.0"), FriendlyName("xAdcsCertificationAuthority")] -class MSFT_xAdcsCertificationAuthority : OMI_BaseResource -{ - [key, Description("Specifies the type of certification authority to install. The possible values are EnterpriseRootCA, EnterpriseSubordinateCA, StandaloneRootCA, or StandaloneSubordinateCA."), ValueMap{"EnterpriseRootCA","EnterpriseSubordinateCA","StandaloneRootCA","StandaloneSubordinateCA"}, Values{"EnterpriseRootCA","EnterpriseSubordinateCA","StandaloneRootCA","StandaloneSubordinateCA"}] String CAType; - [Required, Description("To install an enterprise certification authority, the computer must be joined to an Active Directory Domain Services domain and a user account that is a member of the Enterprise Admin group is required. To install a standalone certification authority, the computer can be in a workgroup or AD DS domain. If the computer is in a workgroup, a user account that is a member of Administrators is required. If the computer is in an AD DS domain, a user account that is a member of Domain Admins is required."), EmbeddedInstance("MSFT_Credential")] String Credential; - [write, Description("Specifies whether the Certificate Authority should be installed or uninstalled."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [write, Description("Specifies the certification authority common name.")] String CACommonName; - [write, Description("Specifies the certification authority distinguished name suffix.")] String CADistinguishedNameSuffix; - [write, Description("Specifies the file name of certification authority PKCS 12 formatted certificate file.")] String CertFile; - [write, Description("Specifies the password for certification authority certificate file."), EmbeddedInstance("MSFT_Credential")] String CertFilePassword; - [write, Description("Specifies the thumbprint or serial number of certification authority certificate.")] String CertificateID; - [write, Description("The name of the cryptographic service provider or key storage provider that is used to generate or store the private key for the CA.")] String CryptoProviderName; - [write, Description("Specifies the folder location of the certification authority database.")] String DatabaseDirectory; - [write, Description("Specifies the signature hash algorithm used by the certification authority.")] String HashAlgorithmName; - [write, Description("Specifies that Unicode characters are allowed in certification authority name string.")] Boolean IgnoreUnicode; - [write, Description("Specifies the name of an existing private key container.")] String KeyContainerName; - [write, Description("Specifies the bit length for new certification authority key.")] Uint32 KeyLength; - [write, Description("Specifies the folder location of the certification authority database log.")] String LogDirectory; - [write, Description("Specifies the folder location for certificate request file.")] String OutputCertRequestFile; - [write, Description("Specifies that the computer object in the Active Directory Domain Service domain should be overwritten with the same computer name.")] Boolean OverwriteExistingCAinDS; - [write, Description("Specifies that the existing certification authority database should be overwritten.")] Boolean OverwriteExistingDatabase; - [write, Description("Overwrite existing key container with the same name")] Boolean OverwriteExistingKey; - [write, Description("Specifies the configuration string of the parent certification authority that will certify this CA.")] String ParentCA; - [write, Description("Specifies the validity period of the certification authority certificate in hours, days, weeks, months or years. If this is a subordinate CA, do not use this parameter, because the validity period is determined by the parent CA."), ValueMap{"Hours","Days","Months","Years"}, Values{"Hours","Days","Months","Years"}] String ValidityPeriod; - [write, Description("Validity period of the certification authority certificate. If this is a subordinate CA, do not specify this parameter because the validity period is determined by the parent CA.")] Uint32 ValidityPeriodUnits; -}; - diff --git a/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsCertificationAuthority/en-us/MSFT_xAdcsCertificationAuthority.strings.psd1 b/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsCertificationAuthority/en-us/MSFT_xAdcsCertificationAuthority.strings.psd1 deleted file mode 100644 index a5a9de17..00000000 --- a/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsCertificationAuthority/en-us/MSFT_xAdcsCertificationAuthority.strings.psd1 +++ /dev/null @@ -1,13 +0,0 @@ -# Localized resources for MSFT_xAdcsCertificationAuthority - -ConvertFrom-StringData @' - GettingAdcsCAStatusMessage = Getting ADCS {0} Status. - TestingAdcsCAStatusMessage = Testing ADCS {0} Status. - AdcsCAInstalledButShouldNotBeMessage = ADCS {0} is installed but should not be. Change required. - AdcsCAInstalledAndShouldBeMessage = ADCS {0} is installed and should be. Change not required. - AdcsCANotInstalledButShouldBeMessage = ADCS {0} is not installed but should be. Change required. - AdcsCANotInstalledAndShouldNotBeMessage = ADCS {0} is not installed and should not be. Change not required. - SettingAdcsCAStatusMessage = Setting ADCS {0} Status. - InstallingAdcsCAMessage = Installing ADCS {0}. - UninstallingAdcsCAMessage = Uninstalling ADCS {0}. -'@ diff --git a/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsOnlineResponder/MSFT_xAdcsOnlineResponder.psm1 b/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsOnlineResponder/MSFT_xAdcsOnlineResponder.psm1 deleted file mode 100644 index 22599669..00000000 --- a/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsOnlineResponder/MSFT_xAdcsOnlineResponder.psm1 +++ /dev/null @@ -1,262 +0,0 @@ -# Suppressed as per PSSA Rule Severity guidelines for unit/integration tests: -# https://github.com/PowerShell/DscResources/blob/master/PSSARuleSeverities.md -[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')] -param () - -Import-Module -Name (Join-Path -Path (Split-Path $PSScriptRoot -Parent) ` - -ChildPath 'CommonResourceHelper.psm1') - -# Localized messages for Write-Verbose statements in this resource -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xAdcsOnlineResponder' - -<# - .SYNOPSIS - Returns an object containing the current state information for the ADCS Online Responder. - .PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. - .PARAMETER Credential - If the Online Responder service is configured to use Standalone certification authority, - then an account that is a member of the local Administrators on the CA is required. If - the Online Responder service is configured to use an Enterprise CA, then an account that - is a member of Domain Admins is required. - .PARAMETER Ensure - Specifies whether the Online Responder feature should be installed or uninstalled. - .OUTPUTS - Returns an object containing the ADCS Online Responder state information. -#> -Function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '')] - [CmdletBinding(SupportsShouldProcess = $true)] - [OutputType([System.Collections.Hashtable])] - param( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [String] - $IsSingleInstance, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [Parameter()] - [ValidateSet('Present','Absent')] - [string] - $Ensure = 'Present' - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.GettingAdcsOnlineResponderStatusMessage) - ) -join '' ) - - $ADCSParams = @{} + $PSBoundParameters - $null = $ADCSParams.Remove('IsSingleInstance') - $null = $ADCSParams.Remove('Ensure') - $null = $ADCSParams.Remove('Debug') - $null = $ADCSParams.Remove('ErrorAction') - - try - { - $null = Install-AdcsOnlineResponder @ADCSParams -WhatIf - # CA is not installed - $Ensure = 'Absent' - } - catch [Microsoft.CertificateServices.Deployment.Common.OCSP.OnlineResponderSetupException] - { - # CA is already installed - $Ensure = 'Present' - } - catch - { - # Something else went wrong - Throw $_ - } - - return @{ - Ensure = $Ensure - CAType = $CAType - Credential = $Credential - } -} # Function Get-TargetResource - -<# - .SYNOPSIS - Installs or uinstalls the ADCS Online Responder from the server. - .PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. - .PARAMETER Credential - If the Online Responder service is configured to use Standalone certification authority, - then an account that is a member of the local Administrators on the CA is required. If - the Online Responder service is configured to use an Enterprise CA, then an account that - is a member of Domain Admins is required. - .PARAMETER Ensure - Specifies whether the Online Responder feature should be installed or uninstalled. -#> -Function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '')] - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [String] - $IsSingleInstance, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [Parameter()] - [ValidateSet('Present','Absent')] - [string] - $Ensure = 'Present' - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.SettingAdcsOnlineResponderStatusMessage) - ) -join '' ) - - $ADCSParams = @{} + $PSBoundParameters - $null = $ADCSParams.Remove('IsSingleInstance') - $null = $ADCSParams.Remove('Ensure') - $null = $ADCSParams.Remove('Debug') - $null = $ADCSParams.Remove('ErrorAction') - - switch ($Ensure) - { - 'Present' - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.InstallingAdcsOnlineResponderMessage) - ) -join '' ) - - (Install-AdcsOnlineResponder @ADCSParams -Force).ErrorString - } - 'Absent' - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.UninstallingAdcsOnlineResponderMessage) - ) -join '' ) - - (Uninstall-AdcsOnlineResponder -Force).ErrorString - } - } # switch -} # Function Set-TargetResource - -<# - .SYNOPSIS - Tests is the ADCS Online Responder is in the desired state. - .PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. - .PARAMETER Credential - If the Online Responder service is configured to use Standalone certification authority, - then an account that is a member of the local Administrators on the CA is required. If - the Online Responder service is configured to use an Enterprise CA, then an account that - is a member of Domain Admins is required. - .PARAMETER Ensure - Specifies whether the Online Responder feature should be installed or uninstalled. - .OUTPUTS - Returns true if the ADCS Online Responder is in the desired state. -#> -Function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '')] - [CmdletBinding()] - [OutputType([System.Boolean])] - param( - [parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [String] - $IsSingleInstance, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [Parameter()] - [ValidateSet('Present','Absent')] - [string] - $Ensure = 'Present' - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.TestingAdcsOnlineResponderStatusMessage -f $CAType) - ) -join '' ) - - $ADCSParams = @{} + $PSBoundParameters - $null = $ADCSParams.Remove('IsSingleInstance') - $null = $ADCSParams.Remove('Ensure') - $null = $ADCSParams.Remove('Debug') - $null = $ADCSParams.Remove('ErrorAction') - - try - { - $null = Install-AdcsOnlineResponder @ADCSParams -WhatIf - # Online Responder is not installed - switch ($Ensure) - { - 'Present' - { - # Online Responder is not installed but should be - change required - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.AdcsOnlineResponderNotInstalledButShouldBeMessage) - ) -join '' ) - - return $false - } - 'Absent' - { - # Online Responder is not installed and should not be - change not required - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.AdcsOnlineResponderNotInstalledAndShouldNotBeMessage) - ) -join '' ) - - return $true - } - } # switch - } - catch [Microsoft.CertificateServices.Deployment.Common.OCSP.OnlineResponderSetupException] - { - # Online Responder is already installed - switch ($Ensure) - { - 'Present' - { - # Online Responder is installed and should be - change not required - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.AdcsOnlineResponderInstalledAndShouldBeMessage) - ) -join '' ) - - return $true - } - 'Absent' - { - # Online Responder is installed and should not be - change required - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.AdcsOnlineResponderInstalledButShouldNotBeMessage) - ) -join '' ) - - return $false - } - } # switch - } - catch - { - # Something else went wrong - Throw $_ - } # try -} # Function Test-TargetResource - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsOnlineResponder/MSFT_xAdcsOnlineResponder.schema.mof b/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsOnlineResponder/MSFT_xAdcsOnlineResponder.schema.mof deleted file mode 100644 index 88b11ddf..00000000 --- a/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsOnlineResponder/MSFT_xAdcsOnlineResponder.schema.mof +++ /dev/null @@ -1,7 +0,0 @@ -[ClassVersion("0.1.0.0"), FriendlyName("xAdcsOnlineResponder")] -class MSFT_xAdcsOnlineResponder : OMI_BaseResource -{ - [Key, Description("Specifies the resource is a single instance, the value must be 'Yes'"), ValueMap{"Yes"}, Values{"Yes"}] String IsSingleInstance; - [Required, Description("If the Online Responder service is configured to use Standalone certification authority, then an account that is a member of the local Administrators on the CA is required. If the Online Responder service is configured to use an Enterprise CA, then an account that is a member of Domain Admins is required."), EmbeddedInstance("MSFT_Credential")] String Credential; - [Write, Description("Specifies whether the Online Responder feature should be installed or uninstalled."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; diff --git a/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsOnlineResponder/en-us/MSFT_xAdcsOnlineResponder.strings.psd1 b/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsOnlineResponder/en-us/MSFT_xAdcsOnlineResponder.strings.psd1 deleted file mode 100644 index 73ed2913..00000000 --- a/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsOnlineResponder/en-us/MSFT_xAdcsOnlineResponder.strings.psd1 +++ /dev/null @@ -1,13 +0,0 @@ -# Localized resources for MSFT_xAdcsOnlineResponder - -ConvertFrom-StringData @' - GettingAdcsOnlineResponderStatusMessage = Getting ADCS Online Responder Status. - TestingAdcsOnlineResponderStatusMessage = Testing ADCS Online Responder Status. - AdcsOnlineResponderInstalledButShouldNotBeMessage = ADCS Online Responder is installed but should not be. Change required. - AdcsOnlineResponderInstalledAndShouldBeMessage = ADCS Online Responder is installed and should be. Change not required. - AdcsOnlineResponderNotInstalledButShouldBeMessage = ADCS Online Responder is not installed but should be. Change required. - AdcsOnlineResponderNotInstalledAndShouldNotBeMessage = ADCS Online Responder is not installed and should not be. Change not required. - SettingAdcsOnlineResponderStatusMessage = Setting ADCS Online Responder Status. - InstallingAdcsOnlineResponderMessage = Installing ADCS Online Responder. - UninstallingAdcsOnlineResponderMessage = Uninstalling ADCS Online Responder. -'@ diff --git a/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsWebEnrollment/MSFT_xAdcsWebEnrollment.psm1 b/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsWebEnrollment/MSFT_xAdcsWebEnrollment.psm1 deleted file mode 100644 index 6a665e1e..00000000 --- a/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsWebEnrollment/MSFT_xAdcsWebEnrollment.psm1 +++ /dev/null @@ -1,281 +0,0 @@ -# Suppressed as per PSSA Rule Severity guidelines for unit/integration tests: -# https://github.com/PowerShell/DscResources/blob/master/PSSARuleSeverities.md -[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')] -param () - -Import-Module -Name (Join-Path -Path (Split-Path $PSScriptRoot -Parent) ` - -ChildPath 'CommonResourceHelper.psm1') - -# Localized messages for Write-Verbose statements in this resource -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xAdcsWebEnrollment' - -<# - .SYNOPSIS - Returns an object containing the current state information for the ADCS Web Enrollment. - .PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. - .PARAMETER CAConfig - CAConfig parameter string. Do not specify this if there is a local CA installed. - .PARAMETER Credential - If the Web Enrollment service is configured to use Standalone certification authority, then - an account that is a member of the local Administrators on the CA is required. If the - Web Enrollment service is configured to use an Enterprise CA, then an account that is a - member of Domain Admins is required. - .PARAMETER Ensure - Specifies whether the Web Enrollment feature should be installed or uninstalled. - .OUTPUTS - Returns an object containing the ADCS Web Enrollment state information. -#> -Function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '')] - [CmdletBinding(SupportsShouldProcess = $true)] - [OutputType([System.Collections.Hashtable])] - param( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [String] - $IsSingleInstance, - - [Parameter()] - [String] - $CAConfig, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [Parameter()] - [ValidateSet('Present','Absent')] - [String] - $Ensure = 'Present' - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.GettingAdcsWebEnrollmentStatusMessage) - ) -join '' ) - - $ADCSParams = @{} + $PSBoundParameters - $null = $ADCSParams.Remove('IsSingleInstance') - $null = $ADCSParams.Remove('Ensure') - $null = $ADCSParams.Remove('Debug') - $null = $ADCSParams.Remove('ErrorAction') - - try - { - $null = Install-AdcsWebEnrollment @ADCSParams -WhatIf - # CA is not installed - $Ensure = 'Absent' - } - catch [Microsoft.CertificateServices.Deployment.Common.WEP.WebEnrollmentSetupException] - { - # CA is already installed - $Ensure = 'Present' - } - catch - { - # Something else went wrong - Throw $_ - } - - return @{ - Ensure = $Ensure - CAType = $CAType - Credential = $Credential - } -} # Function Get-TargetResource - -<# - .SYNOPSIS - Installs or uinstalls the ADCS Web Enrollment from the server. - .PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. - .PARAMETER CAConfig - CAConfig parameter string. Do not specify this if there is a local CA installed. - .PARAMETER Credential - If the Web Enrollment service is configured to use Standalone certification authority, then - an account that is a member of the local Administrators on the CA is required. If the - Web Enrollment service is configured to use an Enterprise CA, then an account that is a - member of Domain Admins is required. - .PARAMETER Ensure - Specifies whether the Web Enrollment feature should be installed or uninstalled. -#> -Function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '')] - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [String] - $IsSingleInstance, - - [Parameter()] - [String] - $CAConfig, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [Parameter()] - [ValidateSet('Present','Absent')] - [String] - $Ensure = 'Present' - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.SettingAdcsWebEnrollmentStatusMessage) - ) -join '' ) - - $ADCSParams = @{} + $PSBoundParameters - $null = $ADCSParams.Remove('IsSingleInstance') - $null = $ADCSParams.Remove('Ensure') - $null = $ADCSParams.Remove('Debug') - $null = $ADCSParams.Remove('ErrorAction') - - switch ($Ensure) - { - 'Present' - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.InstallingAdcsWebEnrollmentMessage) - ) -join '' ) - - (Install-AdcsWebEnrollment @ADCSParams -Force).ErrorString - } - 'Absent' - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.UninstallingAdcsWebEnrollmentMessage) - ) -join '' ) - - (Uninstall-AdcsWebEnrollment -Force).ErrorString - } - } # switch -} # Function Set-TargetResource - -<# - .SYNOPSIS - Tests is the ADCS Web Enrollment is in the desired state. - .PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. - .PARAMETER CAConfig - CAConfig parameter string. Do not specify this if there is a local CA installed. - .PARAMETER Credential - If the Web Enrollment service is configured to use Standalone certification authority, then - an account that is a member of the local Administrators on the CA is required. If the - Web Enrollment service is configured to use an Enterprise CA, then an account that is a - member of Domain Admins is required. - .PARAMETER Ensure - Specifies whether the Web Enrollment feature should be installed or uninstalled. - .OUTPUTS - Returns true if the ADCS Web Enrollment is in the desired state. -#> -Function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '')] - [CmdletBinding()] - [OutputType([System.Boolean])] - param( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [String] - $IsSingleInstance, - - [Parameter()] - [String] - $CAConfig, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [Parameter()] - [ValidateSet('Present','Absent')] - [String] - $Ensure = 'Present' - ) - - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.TestingAdcsWebEnrollmentStatusMessage -f $CAType) - ) -join '' ) - - $ADCSParams = @{} + $PSBoundParameters - $null = $ADCSParams.Remove('IsSingleInstance') - $null = $ADCSParams.Remove('Ensure') - $null = $ADCSParams.Remove('Debug') - $null = $ADCSParams.Remove('ErrorAction') - - try - { - $null = Install-AdcsWebEnrollment @ADCSParams -WhatIf - # Web Enrollment is not installed - switch ($Ensure) - { - 'Present' - { - # Web Enrollment is not installed but should be - change required - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.AdcsWebEnrollmentNotInstalledButShouldBeMessage) - ) -join '' ) - - return $false - } - 'Absent' - { - # Web Enrollment is not installed and should not be - change not required - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.AdcsWebEnrollmentNotInstalledAndShouldNotBeMessage) - ) -join '' ) - - return $true - } - } # switch - } - catch [Microsoft.CertificateServices.Deployment.Common.WEP.WebEnrollmentSetupException] - { - # Web Enrollment is already installed - switch ($Ensure) - { - 'Present' - { - # Web Enrollment is installed and should be - change not required - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.AdcsWebEnrollmentInstalledAndShouldBeMessage) - ) -join '' ) - - return $true - } - 'Absent' - { - # Web Enrollment is installed and should not be - change required - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.AdcsWebEnrollmentInstalledButShouldNotBeMessage) - ) -join '' ) - - return $false - } - } # switch - } - catch - { - # Something else went wrong - Throw $_ - } # try -} # Function Test-TargetResource - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsWebEnrollment/MSFT_xAdcsWebEnrollment.schema.mof b/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsWebEnrollment/MSFT_xAdcsWebEnrollment.schema.mof deleted file mode 100644 index ccb41051..00000000 --- a/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsWebEnrollment/MSFT_xAdcsWebEnrollment.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("0.1.0.0"), FriendlyName("xAdcsWebEnrollment")] -class MSFT_xAdcsWebEnrollment : OMI_BaseResource -{ - [Key, Description("Specifies the resource is a single instance, the value must be 'Yes'"), ValueMap{"Yes"}, Values{"Yes"}] String IsSingleInstance; - [Write, Description("CAConfig parameter string. Do not specify this if there is a local CA installed.")] String CAConfig; - [Required, Description("If the Web Enrollment service is configured to use Standalone certification authority, then an account that is a member of the local Administrators on the CA is required. If the Web Enrollment service is configured to use an Enterprise CA, then an account that is a member of Domain Admins is required."), EmbeddedInstance("MSFT_Credential")] String Credential; - [Write, Description("Specifies whether the Web Enrollment feature should be installed or uninstalled."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; - diff --git a/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsWebEnrollment/en-us/MSFT_xAdcsWebEnrollment.strings.psd1 b/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsWebEnrollment/en-us/MSFT_xAdcsWebEnrollment.strings.psd1 deleted file mode 100644 index 360dd656..00000000 --- a/lib/puppet_x/dsc_resources/xAdcsDeployment/DSCResources/MSFT_xAdcsWebEnrollment/en-us/MSFT_xAdcsWebEnrollment.strings.psd1 +++ /dev/null @@ -1,13 +0,0 @@ -# Localized resources for MSFT_xAdcsWebEnrollment - -ConvertFrom-StringData @' - GettingAdcsWebEnrollmentStatusMessage = Getting ADCS Web Enrollment Status. - TestingAdcsWebEnrollmentStatusMessage = Testing ADCS Web Enrollment Status. - AdcsWebEnrollmentInstalledButShouldNotBeMessage = ADCS Web Enrollment is installed but should not be. Change required. - AdcsWebEnrollmentInstalledAndShouldBeMessage = ADCS Web Enrollment is installed and should be. Change not required. - AdcsWebEnrollmentNotInstalledButShouldBeMessage = ADCS Web Enrollment is not installed but should be. Change required. - AdcsWebEnrollmentNotInstalledAndShouldNotBeMessage = ADCS Web Enrollment is not installed and should not be. Change not required. - SettingAdcsWebEnrollmentStatusMessage = Setting ADCS Web Enrollment Status. - InstallingAdcsWebEnrollmentMessage = Installing ADCS Web Enrollment. - UninstallingAdcsWebEnrollmentMessage = Uninstalling ADCS Web Enrollment. -'@ diff --git a/lib/puppet_x/dsc_resources/xAdcsDeployment/LICENSE b/lib/puppet_x/dsc_resources/xAdcsDeployment/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xAdcsDeployment/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xAdcsDeployment/xAdcsDeployment.psd1 b/lib/puppet_x/dsc_resources/xAdcsDeployment/xAdcsDeployment.psd1 deleted file mode 100644 index d2a084d3..00000000 --- a/lib/puppet_x/dsc_resources/xAdcsDeployment/xAdcsDeployment.psd1 +++ /dev/null @@ -1,87 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '1.1.0.0' - -# ID used to uniquely identify this module -GUID = 'f8ddd7fc-c6d6-469e-8a80-c96efabe2fcc' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2013 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'The xCertificateServices module can be used to install or uninstall Certificate Services components in Windows Server. All of the resources in the DSC Resource Kit are provided AS IS, and are not supported through any Microsoft standard support program or service.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xAdcsDeployment/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xAdcsDeployment' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '- Converted AppVeyor.yml to pull Pester from PSGallery instead of Chocolatey. -- Changed AppVeyor.yml to use default image. -- xAdcsCertificateAuthority: - - Change property format in Readme.md to be standard layout. - - Converted style to meet HQRM guidelines. - - Added verbose logging support. - - Added string localization. - - Fixed Get-TargetResource by removing IsCA and changing Ensure to return whether or not CA is installed. - - Added unit tests. - - Updated parameter format to meet HQRM guidelines. -- xAdcsOnlineResponder: - - Change property format in Readme.md to be standard layout. - - Added unit test header to be latest version. - - Added function help. - - Updated parameter format to meet HQRM guidelines. - - Updated resource to meet HQRM guidelines. -- xAdcsWebEnrollment: - - Change property format in Readme.md to be standard layout. - - Added unit test header to be latest version. - - Added function help. - - Updated parameter format to meet HQRM guidelines. - - Updated resource to meet HQRM guidelines. -- Added CommonResourceHelper.psm1 (copied from xPSDesiredStateConfiguration). -- Removed Technet Documentation HTML file from root folder. -- Removed redundant code from AppVeyor.yml. -- Fix markdown violations in Readme.md. -- Updated readme.md to match DSCResource.Template\Readme.md. - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - - - - diff --git a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureAffinityGroup/MSFT_xAzureAffinityGroup.psm1 b/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureAffinityGroup/MSFT_xAzureAffinityGroup.psm1 deleted file mode 100644 index f3895c1d..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureAffinityGroup/MSFT_xAzureAffinityGroup.psm1 +++ /dev/null @@ -1,133 +0,0 @@ -#region GET FUNCTION - -function Get-TargetResource { -[CmdletBinding()] -[OutputType([Hashtable])] -param ( -[Parameter(Mandatory)][string]$Location, -[Parameter(Mandatory)][string]$Name, -[string]$Description, -[string]$Label -) - $CurrentSubscription = Get-AzureSubscription -Current - Write-Verbose "The Azure subscription ID is $($CurrentSubscription.SubscriptionID)" - - # Native Get cmdlet - $Get = Get-AzureAffinityGroup -Name $Name -ErrorAction SilentlyContinue - - # Build Hashtable from native cmdlet values - $out = @{ - 'Ensure' = If ($Get.Name -eq $Name) {'Present'} Else {'Absent'} - 'Location' = $Get.Location - 'Name' = $Get.Name - 'Description' = $Get.Description - 'Label' = $Get.Label - } - $out - } - -# Get-TargetResource 'West US' 'TestVMWestUS1' 'West US Affinity Group for Test Virtual Machines' 'TestVMWestUS1' -Verbose -# Expectation is a hashtable with properties of the affinity group, if it exists. - -#endregion - - - -#region SET FUNCTION - -function Set-TargetResource { -[CmdletBinding()] -param( -[ValidateSet('Present','Absent')] -[string]$Ensure = 'Present', -[Parameter(Mandatory)][string]$Location, -[Parameter(Mandatory)][string]$Name, -[string]$Description, -[string]$Label -) - switch ($Ensure) { - 'Present' { - # Validate whether New or Set is required - $Get = Get-TargetResource -Location $Location -Name $Name -ErrorAction SilentlyContinue - - $PSBoundParameters.Remove('Ensure') | out-null - - if ($Get.Name -eq $Name) { - # Native Set cmdlet - $PSBoundParameters.Remove('Location') | out-null - Write-Verbose "Setting properties of existing Affinity Group: `"$Name`"" - Write-Verbose 'Please be patient as the operation completes.' - $CurrentSubscription = Get-AzureSubscription -Current - Write-Verbose "The Azure subscription ID is $($CurrentSubscription.SubscriptionID)" - Set-AzureAffinityGroup @PSBoundParameters - } - else { - # Native New cmdlet - Write-Verbose "Creating new Affinity Group: `"$Name`"" - Write-Verbose 'Please be patient as the operation completes.' - $CurrentSubscription = Get-AzureSubscription -Current - Write-Verbose "The Azure subscription ID is $($CurrentSubscription.SubscriptionID)" - New-AzureAffinityGroup @PSBoundParameters - } - } - 'Absent' { - Remove-AzureAffinityGroup $Name - } - } - } - -# Set-TargetResource 'Present' 'West US' 'TestVMWestUS1' 'West US Affinity Group for Test Virtual Machines' 'TestVMWestUS1' -Verbose -# Expectation is the affinity group will be created, set, or removed. Validate using Get-AzureAffinityGroup. - -#endregion - - - -#region TEST FUNCTION - -function Test-TargetResource { -[CmdletBinding()] -[OutputType([Boolean])] -param( -[ValidateSet('Present','Absent')] -[string]$Ensure, -[Parameter(Mandatory)][string]$Location, -[Parameter(Mandatory)][string]$Name, -[string]$Description, -[string]$Label -) - - # Output from Get-TargetResource - $Get = Get-TargetResource -Location $Location -Name $Name -ErrorAction SilentlyContinue - - # Removing Cmdlet parameters from output - $PSBoundParameters.Remove('Ensure') | out-null - $PSBoundParameters.Remove('Verbose') | out-null - $PSBoundParameters.Remove('Debug') | out-null - $PSBoundParameters.Remove('ErrorAction') | out-null - - # Compare dictionary and hash table - switch ($Ensure) { - 'Present'{$bool = $true} - 'Absent'{$bool = $false} - } - - $PSBoundParameters.keys | % { - if ($PSBoundParameters[$_] -ne $Get[$_]) { - switch ($Ensure) { - 'Present'{$bool = $false} - 'Absent'{$bool = $true} - } - write-verbose "$($_): $($PSBoundParameters[$_]) -ne `"$($Get[$_])`"" - } - } - - $bool - } - -# Test-TargetResource 'Present' 'West US' 'TestVMWestUS1' 'West US Affinity Group for Test Virtual Machines' 'TestVMWestUS1' -Verbose -# Expectation is True or False based on whether the affinity group has been deployed, depending on Present/Absent. - -#endregion - -Export-ModuleMember -function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureAffinityGroup/MSFT_xAzureAffinityGroup.schema.mof b/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureAffinityGroup/MSFT_xAzureAffinityGroup.schema.mof deleted file mode 100644 index e53e3a17..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureAffinityGroup/MSFT_xAzureAffinityGroup.schema.mof +++ /dev/null @@ -1,12 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xAzureAffinityGroup")] -class MSFT_xAzureAffinityGroup : OMI_BaseResource -{ - [key, Description("Specifies a name for the new affinity group that is unique to the subscription.")] string Name; - [write, Description("Specifies whether the Azure Affinity Group should be present or absent."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [required, Description("Specifies the geographical location of the data center where the affinity group will be created. This must match a value from the Name property of objects returned by Get-AzureLocation.")] string Location; - [write, Description("Specifies a description for the affinity group. The description may be up to 1024 characters in length. ")] string Description; - [write, Description("Specifies a label for the affinity group. The label may be up to 100 characters in length. ")] string Label; -}; - - diff --git a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureQuickVM/MSFT_xAzureQuickVM.psm1 b/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureQuickVM/MSFT_xAzureQuickVM.psm1 deleted file mode 100644 index 69210952..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureQuickVM/MSFT_xAzureQuickVM.psm1 +++ /dev/null @@ -1,123 +0,0 @@ -#region GET FUNCTION - -function Get-TargetResource { -[CmdletBinding()] -[OutputType([HashTable])] -param ( -[Parameter(Mandatory)][string]$Name, -[Parameter(Mandatory)][string]$ServiceName -) - $CurrentSubscription = Get-AzureSubscription -Current - Write-Verbose "The Azure subscription ID is $($CurrentSubscription.SubscriptionID)" - - # Native Get cmdlet - $Get = Get-AzureVM -Name $Name -ServiceName $ServiceName - - # Build Hashtable from native cmdlet values - @{ - 'Ensure' = If ($Get.Name -eq $Name) {'Present'} Else {'Absent'} - 'Name' = $Get.Name - 'ServiceName' = $Get.ServiceName - } - - } - -# Get-TargetResource -Name 'TestVM1' -ServiceName 'DSCCreatedService1' -Verbose -# Expectation is a hashtable with properties of the VM, if it exists. - -#endregion - - - -#region SET FUNCTION - -function Set-TargetResource { -[CmdletBinding()] -param( -[ValidateSet('Present','Absent')] -[string]$Ensure = 'Present', -[Parameter(Mandatory)][string]$Name, -[string]$ImageName, -[Parameter(Mandatory)][string]$ServiceName, -[bool]$Linux, -[string]$LinuxUser, -[bool]$Windows, -[string]$AdminUserName, -[string]$Password, -[string]$InstanceSize -) - # Removing parameters from output - $PSBoundParameters.Remove('Ensure') | out-null - $PSBoundParameters.Remove('Debug') | out-null - $PSBoundParameters.Remove('ErrorAction') | out-null - - switch ($Ensure) { - 'Present' { - # Native Set cmdlet - Write-Verbose "Creating VM `"$Name`" in Microsoft Azure." - Write-Verbose 'Please be patient as the operation completes.' - $CurrentSubscription = Get-AzureSubscription -Current - Write-Verbose "The Azure subscription ID is $($CurrentSubscription.SubscriptionID)" - New-AzureQuickVM @PSBoundParameters - } - 'Absent' { - # Native Set cmdlet - Write-Verbose "Removing VM `"$Name`" from Azure." - Write-Verbose 'Please be patient as the operation completes.' - $CurrentSubscription = Get-AzureSubscription -Current - Write-Verbose "The Azure subscription ID is $($CurrentSubscription.SubscriptionID)" - Remove-AzureVM -Name $Name -ServiceName $ServiceName -DeleteVHD - } - } - } - -# Set-TargetResource -Ensure 'Present' -Name 'TestVM1' -ImageName 'a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201404.01-en.us-127GB.vhd' -ServiceName 'DSCCreatedService1' -Windows $True -AdminUserName 'YOURADMINACCOUNTHERE' -Password 'YOURPASSWORDHERE'-Verbose -# Expectation is the VM will be created, set, or removed. Validate using Get-AzureVM. - -#endregion - - - -#region TEST FUNCTION - -function Test-TargetResource { -[CmdletBinding()] -[OutputType([Boolean])] -param( -[ValidateSet('Present','Absent')] -[string]$Ensure = 'Present', -[Parameter(Mandatory)][string]$Name, -[string]$ImageName, -[Parameter(Mandatory)][string]$ServiceName, -[bool]$Linux, -[string]$LinuxUser, -[bool]$Windows, -[string]$AdminUserName, -[string]$Password, -[string]$InstanceSize -) - # Output from Get-TargetResource - $Get = Get-TargetResource -Name $Name -ServiceName $ServiceName -ErrorAction SilentlyContinue - - switch ($Ensure) { - 'Present'{$bool = $true} - 'Absent'{$bool = $false} - } - - if ($Name -ne $Get.Name -AND $ServiceName -ne $Get.ServiceName) { - switch ($Ensure) { - 'Present'{$bool = $false} - 'Absent'{$bool = $true} - } - write-verbose 'The VM could not be found in Azure.' - } - - $bool - } - -# Test-TargetResource -Ensure 'Present' -Name 'TestVM1' -ServiceName 'DSCCreatedService1' -Verbose -# Expectation is True or False based on whether the VM has been deployed, depending on Present/Absent. - -#endregion - -Export-ModuleMember -function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureQuickVM/MSFT_xAzureQuickVM.schema.mof b/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureQuickVM/MSFT_xAzureQuickVM.schema.mof deleted file mode 100644 index 66a232cc..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureQuickVM/MSFT_xAzureQuickVM.schema.mof +++ /dev/null @@ -1,17 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xAzureQuickVM")] -class MSFT_xAzureQuickVM : OMI_BaseResource -{ - [key, Description("Specifies the name of the virtual machine.")] string Name; - [write, Description("Specifies whether the Azure VM should be present or absent."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [write, Description("Specifies the name of the operating system image to use to create the operating system disk.")] string ImageName; - [required, Description("Specifies the new or existing service name. ")] string ServiceName; - [write, Description("Creates a Linux virtual machine.")] boolean Linux; - [write, Description("Specifies the Linux administrative account name to create.")] string LinuxUser; - [write, Description("Creates a Windows virtual machine.")] boolean Windows; - [write, Description("Specifies the name for the administrative account to create.")] string AdminUsername; - [write, Description("Specifies the password for the administrative account.")] string Password; - [write, Description("Specifies the size of the instance. For a list of virtual machine sizes, see http://msdn.microsoft.com/library/azure/dn197896.aspx")] string InstanceSize; -}; - - diff --git a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureService/MSFT_xAzureService.psm1 b/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureService/MSFT_xAzureService.psm1 deleted file mode 100644 index b89652be..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureService/MSFT_xAzureService.psm1 +++ /dev/null @@ -1,149 +0,0 @@ -#region GET FUNCTION - -function Get-TargetResource { -[CmdletBinding()] -[OutputType([HashTable])] -param ( -[ValidateSet('Present','Absent')] -[string]$Ensure = 'Present', -[Parameter(Mandatory)][string]$AffinityGroup, -[Parameter(Mandatory)][string]$ServiceName, -[string]$Description, -[string]$Label -) - $CurrentSubscription = Get-AzureSubscription -Current - Write-Verbose "The Azure subscription ID is $($CurrentSubscription.SubscriptionID)" - - # Native Get cmdlet - $Get = Get-AzureService $ServiceName -ErrorAction SilentlyContinue - - # Build Hashtable from native cmdlet values - @{ - 'Ensure' = If ($Get.ServiceName -eq $ServiceName) {'Present'} Else {'Absent'} - 'AffinityGroup' = $Get.AffinityGroup - 'ServiceName' = $Get.ServiceName - 'Description' = $Get.Description - 'Label' = $Get.Label - } - - } - -# Get-TargetResource 'Present' 'TestVMsWestUS1' 'testvmsservice1' 'Test Service created for Test Virtual Machines 1' 'Test VMs Service 1' -Verbose -# Expectation is a hashtable with properties of the service, if it exists. - -#endregion - - - -#region SET FUNCTION - -function Set-TargetResource { -[CmdletBinding()] -param( -[ValidateSet('Present','Absent')] -[string]$Ensure = 'Present', -[Parameter(Mandatory)][string]$AffinityGroup, -[Parameter(Mandatory)][string]$ServiceName, -[string]$Description, -[string]$Label -) - $CurrentSubscription = Get-AzureSubscription -Current - Write-Verbose "The Azure subscription ID is $($CurrentSubscription.SubscriptionID)" - - # Removing parameters from output - $PSBoundParameters.Remove('Debug') | out-null - $PSBoundParameters.Remove('ErrorAction') | out-null - - switch ($Ensure) { - 'Present' { - #Native test for name conflict - $TestAzureServiceName = Test-AzureName -Name $ServiceName -Service - - # Validate whether New or Set is required - $Get = Get-TargetResource -AffinityGroup $AffinityGroup -ServiceName $ServiceName -ErrorAction SilentlyContinue - $PSBoundParameters.Remove('Ensure') | out-null - - if ($Get.ServiceName -eq $ServiceName) { - # Native Set cmdlet - $PSBoundParameters.Remove('AffinityGroup') | out-null - Write-Verbose "Setting properties of Azure Service: `"$ServiceName`"" - Write-Verbose 'Please be patient as the operation completes.' - $CurrentSubscription = Get-AzureSubscription -Current - Write-Verbose "The Azure subscription ID is $($CurrentSubscription.SubscriptionID)" - Set-AzureService @PSBoundParameters - } - else{ - # Native New cmdlet - if ($TestAzureServiceName -eq $False){ - Write-Verbose "Creating new Azure Service: `"$ServiceName`"" - Write-Verbose 'Please be patient as the operation completes.' - $CurrentSubscription = Get-AzureSubscription -Current - Write-Verbose "The Azure subscription ID is $($CurrentSubscription.SubscriptionID)" - New-AzureService @PSBoundParameters - } - else { - Write-Error "Unable to create Service, the name `"$ServiceName`" is already in use" - } - } - } - 'Absent' { - $CurrentSubscription = Get-AzureSubscription -Current - Write-Verbose "The Azure subscription ID is $($CurrentSubscription.SubscriptionID)" - Remove-AzureService -ServiceName $ServiceName -Force - } - } - } - -# Set-TargetResource 'Present' 'TestVMsWestUS1' 'testvmsservice1' 'Test Service created for Test Virtual Machines 1' 'Test VMs Service 1' -Verbose -# Expectation is the service will be created, set, or removed. Validate using Get-AzureService. - -#endregion - - - -#region TEST FUNCTION - -function Test-TargetResource { -[CmdletBinding()] -[OutputType([Boolean])] -param( -[ValidateSet('Present','Absent')] -[string]$Ensure = 'Present', -[Parameter(Mandatory)][string]$AffinityGroup, -[Parameter(Mandatory)][string]$ServiceName, -[string]$Description, -[string]$Label -) - $Get = Get-TargetResource -AffinityGroup $AffinityGroup -ServiceName $ServiceName -ErrorAction SilentlyContinue - - # Removing Cmdlet parameters from output - $PSBoundParameters.Remove('Ensure') | out-null - $PSBoundParameters.Remove('Verbose') | out-null - $PSBoundParameters.Remove('Debug') | out-null - $PSBoundParameters.Remove('ErrorAction') | out-null - - # Compare dictionary and hash table - switch ($Ensure) { - 'Present'{$bool = $true} - 'Absent'{$bool = $false} - } - - $PSBoundParameters.keys | % { - if ($PSBoundParameters[$_] -ne $Get[$_]) { - switch ($Ensure) { - 'Present'{$bool = $false} - 'Absent'{$bool = $true} - } - write-verbose "$($_): $($PSBoundParameters[$_]) -ne `"$($Get[$_])`"" - } - } - - $bool - } - -# Test-TargetResource 'Present' 'TestVMsWestUS1' 'testvmsservice1' 'Test Service created for Test Virtual Machines 1' 'Test VMs Service 1' -Verbose -# Expectation is True or False based on whether the service has been deployed, depending on Present/Absent. - -#endregion - -Export-ModuleMember -function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureService/MSFT_xAzureService.schema.mof b/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureService/MSFT_xAzureService.schema.mof deleted file mode 100644 index d10a1300..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureService/MSFT_xAzureService.schema.mof +++ /dev/null @@ -1,12 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xAzureService")] -class MSFT_xAzureService : OMI_BaseResource -{ - [key, Description("Specifies a name for the new cloud service that is unique to the subscription.")] string ServiceName; - [write, Description("Specifies whether the service should be present or absent."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [write, Description("Specifies the Azure Affinity Group for the service.")] string Description; - [required, Description("Specifies a description for the service.")] string AffinityGroup; - [write, Description("Specifies a label for the service.")] string Label; -}; - - diff --git a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSqlDatabase/MSFT_xAzureSqlDatabase.psm1 b/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSqlDatabase/MSFT_xAzureSqlDatabase.psm1 deleted file mode 100644 index a50a3178..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSqlDatabase/MSFT_xAzureSqlDatabase.psm1 +++ /dev/null @@ -1,380 +0,0 @@ -data localizedData -{ - # culture="en-US" - ConvertFrom-StringData @' -DatabaseServerCouldNotBeCreatedError=Could not create database in the following location: "{0}". Verify you did not exceed database server limit. -DatabaseServerNotExistsError=Database server "{0}" does not exist. You have to specify name of existing server. -'@ -} - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $ServerCredential, - - [parameter(Mandatory = $true)] - [System.String] - $ServerName, - - [System.String] - $AzureSubscriptionName, - - [System.String] - $AzurePublishSettingsFile - ) - - # Select Azure subscription - if ($AzureSubscriptionName -and $AzurePublishSettingsFile) - { - Write-Verbose "Azure Publish Setting provided. AzureSubscriptionName = $AzureSubscriptionName, AzurePublishSettingsFile = $AzurePublishSettingsFile. Selecting Azure subscription." - Import-AzurePublishSettingsFile $AzurePublishSettingsFile - Select-AzureSubscription -SubscriptionName $AzureSubscriptionName -Current -ErrorAction SilentlyContinue - $currentSubscription = Get-AzureSubscription -Current - Write-Verbose "The selected Azure subscription ID is $($currentSubscription.SubscriptionID)" - } - - # Verify that database server with given name exists - Write-Verbose "Verifying that server '$ServerName' exists" - - try { - $server = Get-AzureSqlDatabaseServer -ServerName $ServerName -ErrorAction Stop - Write-Verbose "Server '$ServerName' exists" - } catch [System.Exception] { - # Throw exception if specified ServerName does not exist - $errorMessage = $($LocalizedData.DatabaseServerNotExistsError) -f ${ServerName} - $errorMessage += "`nException message: `n" + $_ - Throw-InvalidOperationException -errorId "DatabaseServerNotExistsFailure" -errorMessage $errorMessage - } - - $nameState = $Name - $maxSizeGBState = $null - $collationState = $null - $editionState = $null - $serverCredentialState = $null - $serverNameState = $ServerName - $ensureState = $null - - # Get database state - Write-Verbose "Creating database server context for $ServerName" - $databaseServerContext = New-AzureSqlDatabaseServerContext -ServerName $ServerName -Credential $ServerCredential - - Write-Verbose "Checking whether Azure SQL database '$Name' exists" - $currentDatabase = Get-AzureSqlDatabase -ConnectionContext $databaseServerContext -DatabaseName $Name -ErrorAction SilentlyContinue - - Write-Verbose "Getting status of database '$Name'" - if ($currentDatabase) { - $maxSizeGBState = $currentDatabase.MaxSizeGB - $collationState = $currentDatabase.CollationName - $editionState = $currentDatabase.Edition - $ensureState = "Present" - - } else { - $ensureState = "Absent" - } - - $returnValue = @{ - Name = $nameState - MaximumSizeInGB = $maxSizeGBState - Collation = $collationState - Edition = $editionState - ServerCredential = $serverCredentialState - ServerName = $serverNameState - Ensure = $ensureState - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [System.UInt32] - $MaximumSizeInGB = 1, - - [System.String] - $Collation = "SQL_Latin1_General_CP1_CI_AS", - - [System.String] - $Edition = "Web", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $ServerCredential, - - [parameter(Mandatory = $true)] - [System.String] - $ServerName, - - [System.String] - $AzureSubscriptionName, - - [System.String] - $AzurePublishSettingsFile, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present" - ) - # Verify that database server with given name exists - Write-Verbose "Verifying that server '$ServerName' exists" - - try { - $server = Get-AzureSqlDatabaseServer -ServerName $ServerName -ErrorAction Stop - Write-Verbose "Server '$ServerName' exists" - } catch [System.Exception] { - # Throw exception if specified ServerName does not exist - $errorMessage = $($LocalizedData.DatabaseServerNotExistsError) -f ${ServerName} - $errorMessage += "`nException message: `n" + $_ - Throw-InvalidOperationException -errorId "DatabaseServerNotExistsFailure" -errorMessage $errorMessage - } - - # If we want to ensure database is present - if ($Ensure -eq "Present") - { - # Create database server context - Write-Verbose "Creating database server context for $ServerName" - $databaseServerContext = New-AzureSqlDatabaseServerContext -ServerName $ServerName -Credential $ServerCredential - - Write-Verbose "Checking whether Azure SQL database '$Name' exists" - $database = Get-AzureSqlDatabase -ConnectionContext $databaseServerContext -DatabaseName $Name -ErrorAction SilentlyContinue - - if ($database) { - Write-Verbose "Azure SQL database '$Name' exists." - - # Get passed values - $splat = @{} - $value = $null - - $paramName = "MaximumSizeInGB" - if ($PSBoundParameters.TryGetValue($paramName, [ref]$value)) { - $splat.Add("MaxSizeGB", $value) - } - - $paramName = "Edition" - if ($PSBoundParameters.TryGetValue($paramName, [ref]$value)) { - $splat.Add($paramName, $value) - } - - if ($splat.Count -ne 0) { - # Update database with passed values - Write-Verbose "Updating database '$Name' with properties specified by user." - $database = Set-AzureSqlDatabase -ConnectionContext $databaseServerContext -DatabaseName $Name @splat -ErrorAction Stop - } else { - Write-Verbose "No need for updating database '$Name' cause no additional properties were passed by the user." - } - - # If user specified collation which is different than current one, delete and recreate database (collation cannot be changed) - $paramName = "Collation" - if ($PSBoundParameters.TryGetValue($paramName, [ref]$value)) { - if ($value -ne $database.CollationName) { - Write-Verbose "Collation was specified with value '$value' which is different than current collation: '$($database.CollationName)'. Will remove and recreate database." - Remove-AzureSqlDatabase -ConnectionContext $databaseServerContext -DatabaseName $Name -Force - Write-Verbose "Azure SQL database '$Name' has been removed. Recreating it..." - $database = New-AzureSqlDatabase -ConnectionContext $databaseServerContext -DatabaseName $Name -MaxSizeGB $MaximumSizeInGB -Collation $Collation -Edition $Edition -ErrorAction Stop - Write-Verbose "Azure SQL database '$Name' has been created" - } - } - - } else { - Write-Verbose "Azure SQL database '$Name' does not exist. Creating it..." - if ($Collation) { - $database = New-AzureSqlDatabase -ConnectionContext $databaseServerContext -DatabaseName $Name -MaxSizeGB $MaximumSizeInGB -Collation $Collation -Edition $Edition -ErrorAction Stop - } else { - $database = New-AzureSqlDatabase -ConnectionContext $databaseServerContext -DatabaseName $Name -MaxSizeGB $MaximumSizeInGB -Edition $Edition -ErrorAction Stop - } - Write-Verbose "Azure SQL database '$Name' has been created" - } - } - # If we want to ensure database is absent - elseif ($Ensure -eq "Absent") - { - # Create database server context - Write-Verbose "Creating database server context for $ServerName" - $databaseServerContext = New-AzureSqlDatabaseServerContext -ServerName $ServerName -Credential $ServerCredential - - # Remove database - Write-Verbose "Checking whether Azure SQL database '$Name' exists." - $database = Get-AzureSqlDatabase -ConnectionContext $databaseServerContext -DatabaseName $Name -ErrorAction SilentlyContinue - - if ($database) { - Write-Verbose "Azure SQL database '$Name' exists. Removing it..." - Remove-AzureSqlDatabase -ConnectionContext $databaseServerContext -DatabaseName $Name -Force - Write-Verbose "Azure SQL database '$Name' has been removed." - } else { - Write-Verbose "Azure SQL database '$Name' does not exist. No need to remove." - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [System.UInt32] - $MaximumSizeInGB = 1, - - [System.String] - $Collation = "SQL_Latin1_General_CP1_CI_AS", - - [System.String] - $Edition = "Web", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $ServerCredential, - - [parameter(Mandatory = $true)] - [System.String] - $ServerName, - - [System.String] - $AzureSubscriptionName, - - [System.String] - $AzurePublishSettingsFile, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present" - ) - - $testResult = $true; - - # Select Azure subscription - if ($AzureSubscriptionName -and $AzurePublishSettingsFile) - { - Write-Verbose "Azure Publish Setting provided. AzureSubscriptionName = $AzureSubscriptionName, AzurePublishSettingsPath = $AzurePublishSettingsFile. Selecting Azure subscription." - Import-AzurePublishSettingsFile -PublishSettingsFile $AzurePublishSettingsFile -ErrorAction SilentlyContinue - Select-AzureSubscription -SubscriptionName $AzureSubscriptionName -Current -ErrorAction SilentlyContinue - $currentSubscription = Get-AzureSubscription -Current - Write-Verbose "The selected Azure subscription ID is $($currentSubscription.SubscriptionID)" - } - - # Select Azure subscription - if ($AzureSubscriptionName -and $AzurePublishSettingsFile) - { - Write-Verbose "Azure Publish Setting provided. AzureSubscriptionName = $AzureSubscriptionName, AzurePublishSettingsFile = $AzurePublishSettingsFile. Selecting Azure subscription." - Import-AzurePublishSettingsFile $AzurePublishSettingsFile - Select-AzureSubscription -SubscriptionName $AzureSubscriptionName -Current -ErrorAction SilentlyContinue - $currentSubscription = Get-AzureSubscription -Current - Write-Verbose "The selected Azure subscription ID is $($currentSubscription.SubscriptionID)" - } - - if ($Ensure -eq "Present") - { - # Verify that database server with given name exists - Write-Verbose "Verifying that server '$ServerName' exists" - - try { - $server = Get-AzureSqlDatabaseServer -ServerName $ServerName #-ErrorAction Stop - Write-Verbose "Server '$ServerName' exists" - } catch [System.Exception] { - # Throw exception if specified ServerName does not exist - $errorMessage = $($LocalizedData.DatabaseServerNotExistsError) -f ${ServerName} - $errorMessage += "`nException message: `n" + $_ - Throw-InvalidOperationException -errorId "DatabaseServerNotExistsFailure" -errorMessage $errorMessage - } - - # Check whether database is in desired state - Write-Verbose "Creating database server context for $ServerName" - $databaseServerContext = New-AzureSqlDatabaseServerContext -ServerName $ServerName -Credential $ServerCredential - - Write-Verbose "Checking whether Azure SQL database '$Name' exists" - $currentDatabase = Get-AzureSqlDatabase -ConnectionContext $databaseServerContext -DatabaseName $Name -ErrorAction SilentlyContinue - - if ($currentDatabase) { - - # Check whether current database properties match the specified ones - $editionMatches = $currentDatabase.Edition.Equals($Edition) - $maximumSizeInGBMatches = ($currentDatabase.MaxSizeGB -eq $MaximumSizeInGB) - $collationMatches = $currentDatabase.CollationName.Equals($Collation) - - if ($editionMatches -and $maximumSizeInGBMatches -and $collationMatches) { - Write-Verbose "Azure SQL database '$Name' exists and properties match." - } else { - # Check whether some of specified properties don't match - $value = $null - $paramNames = @("Edition", "MaximumSizeInGB", "Collation") - $specifiedPropertiesMatch = $true - foreach ($paramName in $paramNames) { - $paramMatches = (Get-Variable -Name ("$paramName" + "Matches")) - if (($PSBoundParameters.TryGetValue($paramName, [ref]$value)) -and (-not ($paramMatches.Value))) { - $testResult = $false - $specifiedPropertiesMatch = $false - Write-Verbose "Azure SQL database '$Name' exists but current $paramName value does not match desired value: $value. Resource is not in desired state." - } - } - - if ($specifiedPropertiesMatch) { - Write-Verbose "Azure SQL database '$Name' exists and specified properties match!" - } - } - - } else { - Write-Verbose "Azure SQL database '$Name' does not exist. Resource is not in desired state." - $testResult = $false - } - } - elseif ($Ensure -eq "Absent") - { - # Check whether database is in desired state - Write-Verbose "Creating database server context for $ServerName" - $databaseServerContext = New-AzureSqlDatabaseServerContext -ServerName $ServerName -Credential $ServerCredential - - Write-Verbose "Checking whether Azure SQL database '$Name' exists" - $currentDatabase = Get-AzureSqlDatabase -ConnectionContext $databaseServerContext -DatabaseName $Name -ErrorAction SilentlyContinue - - if ($currentDatabase) { - Write-Verbose "Azure SQL database '$Name' exists. Resource is not in desired state." - $testResult = $false - } - } - - return $testResult -} - -# Throws terminating error of category InvalidOperation with specified errorId and errorMessage -function Throw-InvalidOperationException -{ - param( - [parameter(Mandatory = $true)] - [System.String] - $errorId, - [parameter(Mandatory = $true)] - [System.String] - $errorMessage - ) - - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidOperation - $exception = New-Object System.InvalidOperationException $errorMessage - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - throw $errorRecord -} - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSqlDatabase/MSFT_xAzureSqlDatabase.schema.mof b/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSqlDatabase/MSFT_xAzureSqlDatabase.schema.mof deleted file mode 100644 index ef1a626d..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSqlDatabase/MSFT_xAzureSqlDatabase.schema.mof +++ /dev/null @@ -1,17 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xAzureSqlDatabase")] -class MSFT_xAzureSqlDatabase : OMI_BaseResource -{ - [Key, Description("Name of the database")] String Name; - [Write, Description("Maximum size of the database in GB")] UInt32 MaximumSizeInGB; - [Write, Description("Collation of the database")] String Collation; - [Write, Description("Edition of the database")] String Edition; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to the database server")] String ServerCredential; - [Required, Description("Name of the database server")] String ServerName; - [Write, Description("Specifies the name of the Azure subscription that should be set to Current")] String AzureSubscriptionName; - [Write, Description("Specifies the location of the Publish Settings file for the Azure Subscription")] String AzurePublishSettingsFile; - [Write, Description("Ensure that database is present or absent"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSqlDatabaseServerFirewallRule/MSFT_xAzureSqlDatabaseServerFirewallRule.psm1 b/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSqlDatabaseServerFirewallRule/MSFT_xAzureSqlDatabaseServerFirewallRule.psm1 deleted file mode 100644 index 0f353f37..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSqlDatabaseServerFirewallRule/MSFT_xAzureSqlDatabaseServerFirewallRule.psm1 +++ /dev/null @@ -1,210 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $RuleName, - - [parameter(Mandatory = $true)] - [System.String] - $ServerName, - - [parameter(Mandatory = $true)] - [System.String] - $StartIPAddress, - - [parameter(Mandatory = $true)] - [System.String] - $EndIPAddress, - - [System.String] - $AzureSubscriptionName, - - [System.String] - $AzurePublishSettingsFile - ) - - # Select Azure subscription - if ($AzureSubscriptionName -and $AzurePublishSettingsFile) - { - Write-Verbose "Azure Publish Setting provided. AzureSubscriptionName = $AzureSubscriptionName, AzurePublishSettingsFile = $AzurePublishSettingsFile. Selecting Azure subscription." - Import-AzurePublishSettingsFile $AzurePublishSettingsFile -verbose - Select-AzureSubscription -SubscriptionName $AzureSubscriptionName -Current -ErrorAction SilentlyContinue -verbose - $currentSubscription = Get-AzureSubscription -Current -verbose - Write-Verbose "The selected Azure subscription ID is $($currentSubscription.SubscriptionID)" - } - - $startIPAddressState = $null - $endIPAddressState = $null - $ensureState = $null - - # Get firewall rule state - Write-Verbose "Getting status of firewall rule '$RuleName'" - $currentFirewallRule = Get-AzureSqlDatabaseServerFirewallRule -ServerName $ServerName -RuleName $RuleName -ErrorAction SilentlyContinue -verbose - Write-Verbose "Status of firewall rule '$RuleName' obtained." - if ($currentFirewallRule) { - $startIPAddressState = $currentFirewallRule.StartIPAddress - $endIPAddressState = $currentFirewallRule.EndIPAddress - $ensureState = "Present" - } else { - $ensureState = "Absent" - } - - $returnValue = @{ - RuleName = $RuleName - ServerName = $ServerName - StartIPAddress = $startIPAddressState - EndIPAddress = $endIPAddressState - AzureSubscriptionName = $AzureSubscriptionName - AzurePublishSettingsFile = $AzurePublishSettingsFile - Ensure = $ensureState - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $RuleName, - - [parameter(Mandatory = $true)] - [System.String] - $ServerName, - - [parameter(Mandatory = $true)] - [System.String] - $StartIPAddress, - - [parameter(Mandatory = $true)] - [System.String] - $EndIPAddress, - - [System.String] - $AzureSubscriptionName, - - [System.String] - $AzurePublishSettingsFile, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present" - ) - - # Check whether firwall rule with specific name exists - $PSBoundParameters.Remove("Ensure") | Out-Null - $currentFirewallRule = Get-TargetResource @PSBoundParameters - $firwallRuleExists = $false - if ($currentFirewallRule.Ensure -eq "Present") { - $firewallRuleExists = $true - } - - # If we want to ensure firewall rule is present - if ($Ensure -eq "Present") - { - # Create firewall rule if not exists - if (-not $firewallRuleExists) { - Write-Verbose "Creating firewall rule '$RuleName'" - New-AzureSqlDatabaseServerFirewallRule -ServerName $ServerName -RuleName $RuleName -StartIpAddress $StartIPAddress -EndIpAddress $EndIPAddress -ErrorAction Stop | Out-Null - Write-Verbose "Firewall rule '$RuleName' created" - # Modify firewall rule if exists - } else { - Write-Verbose "Updating firewall rule '$RuleName'" - Set-AzureSqlDatabaseServerFirewallRule -ServerName $ServerName -RuleName $RuleName -StartIpAddress $StartIPAddress -EndIpAddress $EndIPAddress -ErrorAction Stop | Out-Null - Write-Verbose "Firewall rule '$RuleName' updated" - } - } - # If we want to ensure database is absent - elseif ($Ensure -eq "Absent") - { - # Remove firewall rule - if ($firewallRuleExists) { - Write-Verbose "Firewall rule '$RuleName' exists. Removing it." - Remove-AzureSqlDatabaseServerFirewallRule -ServerName $ServerName -RuleName $RuleName -verbose - Write-Verbose "Firewall rule '$RuleName' has been removed." - } else { - Write-Verbose "Firewall rule '$RuleName' does not exist. No need to remove." - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $RuleName, - - [parameter(Mandatory = $true)] - [System.String] - $ServerName, - - [parameter(Mandatory = $true)] - [System.String] - $StartIPAddress, - - [parameter(Mandatory = $true)] - [System.String] - $EndIPAddress, - - [System.String] - $AzureSubscriptionName, - - [System.String] - $AzurePublishSettingsFile, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present" - ) - - $testResult = $true; - - $PSBoundParameters.Remove("Ensure") | Out-Null - $currentFirewallRule = Get-TargetResource @PSBoundParameters - Write-Verbose "Testing whether resource is in desired state" - if($Ensure -eq "Present") { - if ($currentFirewallRule.Ensure -eq "Present") { - - # Check whether current firewall rule properties match the specified ones - if($currentFirewallRule.StartIpAddress.Equals($startIPAddress) -and $currentFirewallRule.EndIpAddress.Equals($endIPAddress)) { - Write-Verbose "SQL database server firewall rule '$RuleName' exists and properties match. Resource is in desired state." - } else { - Write-Verbose "SQL database server firewall rule '$RuleName' exists but properties don't match. Resource is not in desired state." - $testResult = $false - } - } else { - Write-Verbose "SQL database server firewall rule '$RuleName' does not exist, but expected to be present. Resource is not in desired state." - $testResult = $false - } - } elseif ($Ensure -eq "Absent") { - - # If firewall rule with given name exists, resource is not in the desired state - if ($currentFirewallRule.Ensure -eq "Present") { - Write-Verbose "SQL database server firewall rule '$RuleName' exists, but expected to be absent. Resource is not in desired state." - $testResult = $false - } else { - Write-Verbose "SQL database server firewall rule '$RuleName' does not exist. Resource is in desired state." - } - } - - $testResult - -} - - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSqlDatabaseServerFirewallRule/MSFT_xAzureSqlDatabaseServerFirewallRule.schema.mof b/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSqlDatabaseServerFirewallRule/MSFT_xAzureSqlDatabaseServerFirewallRule.schema.mof deleted file mode 100644 index ef96236c..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSqlDatabaseServerFirewallRule/MSFT_xAzureSqlDatabaseServerFirewallRule.schema.mof +++ /dev/null @@ -1,15 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xAzureSqlDatabaseServerFirewallRule")] -class MSFT_xAzureSqlDatabaseServerFirewallRule : OMI_BaseResource -{ - [Key, Description("Name of the firewall rule")] String RuleName; - [Key, Description("Name of the database server for which firewall rule should be created")] String ServerName; - [Required, Description("Start IP address of the firewall rule")] String StartIPAddress; - [Required, Description("End IP address of the firewall rule")] String EndIPAddress; - [Write, Description("Specifies the name of the Azure subscription that should be set to Current")] String AzureSubscriptionName; - [Write, Description("Specifies the location of the Publish Settings file for the Azure Subscription")] String AzurePublishSettingsFile; - [Write, Description("Ensure that firewall rule is present or absent"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureStorageAccount/MSFT_xAzureStorageAccount.psm1 b/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureStorageAccount/MSFT_xAzureStorageAccount.psm1 deleted file mode 100644 index 2e142bf6..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureStorageAccount/MSFT_xAzureStorageAccount.psm1 +++ /dev/null @@ -1,240 +0,0 @@ -#region GET FUNCTION - -function Get-TargetResource { -[CmdletBinding()] -[OutputType([Hashtable])] -param ( -[Parameter(Mandatory)][string]$AffinityGroup, -[Parameter(Mandatory)][string]$StorageAccountName, -[string]$Container, -[string]$Folder, -[string]$Label -) - $CurrentSubscription = Get-AzureSubscription -Current - $CurrentSubscription.CurrentStorageAccountName = $StorageAccountName - Write-Verbose "The Azure subscription ID is $($CurrentSubscription.SubscriptionID)" - Write-Verbose "The Azure storage account is $($CurrentSubscription.CurrentStorageAccountName)" - - # Native Get cmdlet - $Get = Get-AzureStorageAccount -StorageAccountName $StorageAccountName -ErrorAction SilentlyContinue - if ($Get -ne $null -AND $Container -ne '') { - $StorageKey = Get-AzureStorageKey -StorageAccountName $StorageAccountName - $AzureStorageContext = New-AzureStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $StorageKey.Primary -Protocol Https - - $GetContainer = Get-AzureStorageContainer -Name $Container -Context $AzureStorageContext -ErrorAction SilentlyContinue | % Name - - if ($Folder){ - $GetFolder = Get-Item $Folder -ErrorAction SilentlyContinue | % FullName - } - } - - # Build Hashtable from cmdlet values - @{ - 'Ensure' = If ($Get.StorageAccountName -eq $StorageAccountName) {'Present'} Else {'Absent'} - 'AffinityGroup' = $Get.AffinityGroup - 'StorageAccountName' = $Get.StorageAccountName - 'Container' = $GetContainer - 'Folder' = $GetFolder - 'Label' = $Get.Label - } - - } - -# Get-TargetResource 'TestVMWestUS1' 'testvmstorage1' -Container 'scriptextensionfiles' -folder 'c:\Azure\scriptextensionfiles' -Verbose -# Expectation is a hashtable with properties of the storage account, if it exists. - -#endregion - - - -#region SET FUNCTION - -function Set-TargetResource { -[CmdletBinding()] -param( -[ValidateSet('Present','Absent')] -[string]$Ensure = 'Present', -[Parameter(Mandatory)][string]$AffinityGroup, -[Parameter(Mandatory)][string]$StorageAccountName, -[string]$Container, -[string]$Folder, -[string]$Label -) - - switch ($Ensure) { - 'Present' { - # Native Test for name conflict - $CurrentSubscription = Get-AzureSubscription -Current - Write-Verbose "The Azure subscription ID is $($CurrentSubscription.SubscriptionID)" - $TestAzureStorageName = Test-AzureName -Name $StorageAccountName -Storage - - # Test storage account name for Azure requirements, lowercase, no special characters, and between 3 and 24 characters - $AzureStorageNameRequirements = ($StorageAccountName -cmatch '^[a-z\d]+$') - if ($AzureStorageNameRequirements -eq $False) { - Write-Error 'The Storage Account Name does not meet requirements of 3-24 characters, lower case letters, and numbers.' - } - - # Validate whether New or Set is required - $Get = Get-TargetResource -AffinityGroup $AffinityGroup -StorageAccountName $StorageAccountName -Container $Container -Folder $Folder -Label $Label -ErrorAction SilentlyContinue - - if ($Get.StorageAccountName -eq $StorageAccountName) { - # Storage already exists. Verify Configuration with native Set cmdlet - $CurrentSubscription = Get-AzureSubscription -Current - Write-Verbose "The Azure subscription ID is $($CurrentSubscription.SubscriptionID)" - Set-AzureStorageAccount -StorageAccountName $StorageAccountName -Label $Label - - # Assign current storage account name - Set-AzureSubscription -SubscriptionName $CurrentSubscription.SubscriptionName -CurrentStorageAccountName $StorageAccountName - $CurrentSubscription = Get-AzureSubscription -Current - Write-verbose "Azure Storage Account Name: $($CurrentSubscription.CurrentStorageAccountName)" - - # Create Storage Context - $StorageKey = Get-AzureStorageKey -StorageAccountName $StorageAccountName - $AzureStorageContext = New-AzureStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $StorageKey.Primary - - # If Container does not exist, re-create it - if ($Get.Container -notcontains $Container) { - Write-Verbose "Creating container: $Container" - New-AzureStorageContainer -Name $Container -Context $AzureStorageContext - } - - # If files should be uploaded and are newer locally, update files - if ($Folder) { - foreach ($File in (Get-ChildItem -Path $Folder)) { - $Blob = Get-AzureStorageBlob -Context $AzureStorageContext -Container $Container -Blob $File.Name -ErrorAction SilentlyContinue - if (!$Blob -OR $File.LastWriteTime -gt $Blob.LastModified.DateTime) { - Write-Verbose "Uploading file: $($File.FUllName)" - Set-AzureStorageBlobContent -Context $AzureStorageContext -Container $Container -File $File.FullName -Force - } - } - } - } - else { - # Creating storage account using native New cmdlet - if ($TestAzureStorageName -eq $False){ - Write-Verbose "Creating Storage Account `"$StorageAccountName`" in Microsoft Azure." - Write-Verbose 'Please be patient as the operation completes.' - $CurrentSubscription = Get-AzureSubscription -Current - Write-Verbose "The Azure subscription ID is $($CurrentSubscription.SubscriptionID)" - New-AzureStorageAccount -StorageAccountName $StorageAccountName -Label $Label -AffinityGroup $AffinityGroup - - # Assign current storage account name - Set-AzureSubscription -SubscriptionName $CurrentSubscription.SubscriptionName -CurrentStorageAccountName $StorageAccountName - $CurrentSubscription = Get-AzureSubscription -Current - Write-verbose "Azure Storage Account Name: $($CurrentSubscription.CurrentStorageAccountName)" - - # Wait for creation to finish - $Status = (Get-AzureStorageAccount -StorageAccountName $StorageAccountName).StorageAccountStatus - While ($Status -ne 'Created') { - start-sleep 3 - $Status = (Get-AzureStorageAccount -StorageAccountName $StorageAccountName).StorageAccountStatus - } - - # Create Storage Context - $StorageKey = Get-AzureStorageKey -StorageAccountName $StorageAccountName - $AzureStorageContext = New-AzureStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $StorageKey.Primary - - # Create container - Write-Verbose "Creating container: $Container" - New-AzureStorageContainer -Name $Container -Context $AzureStorageContext - - # Upload files if needed - if ($Folder) { - foreach ($File in (Get-ChildItem -Path $Folder)) { - Write-Verbose "Uploading file: $File" - Set-AzureStorageBlobContent -Context $AzureStorageContext -Container $Container -File $File.FullName -Force - } - } - - if ($TestAzureStorageName -ne $False) { - # Test failed due to conflict or the name was invalid - Write-Error "Unable to create Storage Account, the name `"$StorageAccountName`" is invalid or already in use" - } - } - } - } - - 'Absent' { - $CurrentSubscription = Get-AzureSubscription -Current - Write-Verbose "The Azure subscription ID is $($CurrentSubscription.SubscriptionID)" - - # Create Storage Context - $StorageKey = Get-AzureStorageKey -StorageAccountName $StorageAccountName - $AzureStorageContext = New-AzureStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $StorageKey.Primary -Protocol Https - - # Remove each item in containers - $Containers = Get-AzureStorageContainer -Context $AzureStorageContext - foreach ($ContainerItem in $Containers) { - Write-Verbose "Removing Container `"$($ContainerItem.Name)`"" - $LeaseStatus = $ContainerItem.CloudBlobContainer.Properties.LeaseStatus - #Wait for Remove operation to complete - While ($LeaseStatus -eq 'Locked') { - Start-Sleep 5 - $LeaseStatus = (Get-AzureStorageContainer -Name $ContainerItem.Name -Context $AzureStorageContext).CloudBlobContainer.Properties.LeaseStatus - } - # Remove containers - Remove-AzureStorageContainer -Context $AzureStorageContext -Name $ContainerItem.Name -Force - } - # Remove Storage Account - Remove-AzureStorageAccount -StorageAccountName $StorageAccountName - } - } - } - -# Set-TargetResource 'Present' 'TestVMWestUS1' 'testvmstorage1' -Container 'scriptextensionfiles' -folder 'c:\Azure\scriptextensionfiles' -Verbose -# Expectation is the storage account will be created, set, or removed. Validate using Get-AzureStorageAccount. - -#endregion - - - -#region TEST FUNCTION - -function Test-TargetResource { -[CmdletBinding()] -[OutputType([Boolean])] -param( -[ValidateSet('Present','Absent')] -[string]$Ensure = 'Present', -[Parameter(Mandatory)][string]$AffinityGroup, -[Parameter(Mandatory)][string]$StorageAccountName, -[string]$Container, -[string]$Folder, -[string]$Label -) - # Output from Get-TargetResource - $Get = Get-TargetResource -AffinityGroup $AffinityGroup -StorageAccountName $StorageAccountName -ErrorAction SilentlyContinue - - $CurrentAccountSet = (Get-AzureSubscription -Current).CurrentStorageAccountName -eq $StorageAccountName - - # Compare dictionary and hash table - switch ($Ensure) { - 'Present'{ - $bool = $true - $bool = $CurrentAccountSet - } - 'Absent'{ - $bool = $false - $bool = !$CurrentAccountSet - } - } - - @('AffinityGroup','StorageAccountName','Container','Folder','Local') | % { - if ($PSBoundParameters[$_] -ne $Get[$_]) { - switch ($Ensure) { - 'Present'{$bool = $false} - 'Absent'{$bool = $true} - } - write-verbose "$($_): $($PSBoundParameters[$_]) -ne `"$($Get[$_])`"" - } - } - - $bool - } - -# Test-TargetResource 'Present' 'TestVMWestUS1' 'testvmstorage1' -Container 'scriptextensionfiles' -folder 'c:\Azure\scriptextensionfiles' -Verbose -# Expectation is True or False based on whether the storage account has been deployed, depending on Present/Absent. - -#endregion - -Export-ModuleMember -function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureStorageAccount/MSFT_xAzureStorageAccount.schema.mof b/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureStorageAccount/MSFT_xAzureStorageAccount.schema.mof deleted file mode 100644 index 9a810ce2..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureStorageAccount/MSFT_xAzureStorageAccount.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ - -[ClassVersion("1.0.1.0"), FriendlyName("xAzureStorageAccount")] -class MSFT_xAzureStorageAccount : OMI_BaseResource -{ - [key, Description("Specifies a name for the storage account. The storage account name must be unique to Windows Azure and must be between 3 and 24 characters in length and use lowercase letters and numbers only.")] string StorageAccountName; - [write, Description("Specifies whether the Azure Storage Account should be present or absent."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [required, Description("Specifies the name of an existing affinity group in the current subscription. You can specify either a Location or an AffinityGroup parameter, but not both. ")] string AffinityGroup; - [write, Description("Specifies a name for the Container that should be created in the Azure Storage Account.")] string Container; - [write, Description("Specifies a local folder. All files in the root of the folder will be uploaded to the new container.")] string Folder; - [write, Description("Specifies a label for the storage account. The label may be up to 100 characters in length.")] string Label; -}; - - diff --git a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSubscription/MSFT_xAzureSubscription.psm1 b/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSubscription/MSFT_xAzureSubscription.psm1 deleted file mode 100644 index 6e4a0ec9..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSubscription/MSFT_xAzureSubscription.psm1 +++ /dev/null @@ -1,98 +0,0 @@ -#region GET FUNCTION - -function Get-TargetResource { -[CmdletBinding()] -[OutputType([Hashtable])] -param ( -[Parameter(Mandatory)][string]$AzureSubscriptionName -) - # Native Get cmdlet - $Get = Get-AzureSubscription -Current -ErrorAction SilentlyContinue - - # Build Hashtable - @{ - 'Ensure' = If ($Get.SubscriptionName -eq $AzureSubscriptionName) {'Present'} Else {'Absent'} - 'AzureSubscriptionName' = $Get.SubscriptionName - } - - } - -# Get-TargetResource -AzureSubscriptionName 'Visual Studio Ultimate with MSDN' -Verbose -# Expectation is hashtable with subscription id, if it is registered - -#endregion - - - -#region SET FUNCTION - -function Set-TargetResource { -[CmdletBinding()] -param( -[ValidateSet('Present','Absent')] -[string]$Ensure = 'Present', -[Parameter(Mandatory)][string]$AzureSubscriptionName, -[string]$AzurePublishSettingsFile -) - switch ($Ensure) { - 'Present' { - if ($WhatIfPreference -eq $true) { - Write-Verbose 'What if:The Azure subscription ID is (SubscriptionID)' - } - else { - Import-AzurePublishSettingsFile -PublishSettingsFile $AzurePublishSettingsFile -ErrorAction SilentlyContinue - Select-AzureSubscription -SubscriptionName $AzureSubscriptionName -Current -ErrorAction SilentlyContinue - $CurrentSubscription = Get-AzureSubscription -Current - Write-Verbose "The Azure subscription ID is $($CurrentSubscription.SubscriptionID)" - } - } - 'Absent' { - Remove-AzureSubscription -SubscriptionName $AzureSubscriptionName -Force -ErrorAction SilentlyContinue - } - } - } - -# Set-TargetResource -Ensure 'Absent' -AzureSubscriptionName 'Visual Studio Ultimate with MSDN' -AzurePublishSettingsFile 'C:\Azure\MSDN.publishsettings' -Verbose -# Expectation is subscription woul dbe registered and set as current. Validate using Get-AzureSubscription. - -#endregion - - - -#region TEST FUNCTION - -function Test-TargetResource { -[CmdletBinding()] -[OutputType([Boolean])] -param( -[ValidateSet('Present','Absent')] -[string]$Ensure = 'Present', -[Parameter(Mandatory)][string]$AzureSubscriptionName, -[string]$AzurePublishSettingsFile -) - # Output from Get-TargetResource - $Get = Get-TargetResource -AzureSubscriptionName $AzureSubscriptionName -ErrorAction SilentlyContinue - - # Compare - switch ($Ensure) { - 'Present'{$bool = $true} - 'Absent'{$bool = $false} - } - - if ($AzureSubscriptionName -ne $Get.AzureSubscriptionName) { - switch ($Ensure) { - 'Present'{$bool = $false} - 'Absent'{$bool = $true} - } - write-verbose 'Azure Subscription not set to Current.' - } - - $bool - } - -# Test-TargetResource -Ensure 'Present' -AzureSubscriptionName 'Visual Studio Ultimate with MSDN' -AzurePublishSettingsFile 'C:\Azure\MSDN.publishsettings' -Verbose -# Expectation is boolean value representing whether subscription has been registered, depending on Present/Absent. - -#endregion - -Export-ModuleMember -function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSubscription/MSFT_xAzureSubscription.schema.mof b/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSubscription/MSFT_xAzureSubscription.schema.mof deleted file mode 100644 index 5ce77ab3..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureSubscription/MSFT_xAzureSubscription.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xAzureSubscription")] -class MSFT_xAzureSubscription : OMI_BaseResource -{ - [write, Description("Specifies whether the subscription should be present or absent."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [key, Description("Specifies the name of the Azure subscription that should be set to Current.")] string AzureSubscriptionName; - [write, Description("Specifies the location of the Publish Settings file for the Azure Subscription.")] string AzurePublishSettingsFile; -}; - - diff --git a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVM/MSFT_xAzureVM.psm1 b/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVM/MSFT_xAzureVM.psm1 deleted file mode 100644 index 0b7f3d83..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVM/MSFT_xAzureVM.psm1 +++ /dev/null @@ -1,148 +0,0 @@ -#region GET FUNCTION - -function Get-TargetResource { -[CmdletBinding()] -[OutputType([Hashtable])] -param ( -[Parameter(Mandatory)][string]$Name, -[Parameter(Mandatory)][string]$ImageName, -[Parameter(Mandatory)][string]$ServiceName, -[Parameter(Mandatory)][string]$StorageAccountName -) - $CurrentSubscription = Get-AzureSubscription -Current - Write-Verbose "The Azure subscription ID is $($CurrentSubscription.SubscriptionID)" - - # Native Get cmdlet - $Get = Get-AzureVM -Name $Name -ServiceName $ServiceName - - # Build Hashtable from native cmdlet values - @{ - 'Ensure' = If ($Get.Name -eq $Name) {'Present'} Else {'Absent'} - 'Name' = $Get.Name - 'ServiceName' = $Get.ServiceName - } - - } - -# Get-TargetResource -Name 'TestVM1' -ServiceName 'testvmservice1' -storageaccountname 'testvmstorage1' -ImageName 'a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201404.01-en.us-127GB.vhd' -Verbose -# Expectation is a hashtable with properties of the VM, if it exists. - -#endregion - - - -#region SET FUNCTION - -function Set-TargetResource { -[CmdletBinding()] -param( -[ValidateSet('Present','Absent')] -[string]$Ensure = 'Present', -[Parameter(Mandatory)][string]$Name, -[Parameter(Mandatory)][string]$ImageName, -[Parameter(Mandatory)][string]$ServiceName, -[Parameter(Mandatory)][string]$StorageAccountName, -[string]$InstanceSize = 'Medium', -[bool]$Linux, -[bool]$Windows, -[pscredential]$Credential, -[string]$ExtensionContainerName, -[string]$ExtensionFileList, -[string]$ExtensionScriptName -) - # Removing parameters from output - $PSBoundParameters.Remove('Ensure') | out-null - $PSBoundParameters.Remove('Debug') | out-null - $PSBoundParameters.Remove('ErrorAction') | out-null - - switch ($Ensure) { - 'Present' { - Write-Verbose "Creating VM `"$Name`" in Microsoft Azure." - Write-Verbose 'Please be patient as the operation completes.' - - # Create VM COnfig - $VM = New-AzureVMConfig -Name $Name -InstanceSize $InstanceSize -ImageName $ImageName -MediaLocation "http://$StorageAccountName.blob.core.windows.net/vhds/$Name.vhd" - - # Set OS Switch - if ($Windows -eq $true) {Add-AzureProvisioningConfig -VM $VM -AdminUserName $Credential.UserName -Password $Credential.GetNetworkCredential().Password -Windows} - else {Add-AzureProvisioningConfig -VM $VM -LinuxUser $Credential.UserName -Password $Credential.GetNetworkCredential().Password -Linux} - - if ($ExtensionContainerName -ne '') { - # VM Agent - $ExtensionFileList = $ExtensionFileList.Split(',') - Set-AzureVMCustomScriptExtension -ContainerName $ExtensionContainerName -FileName $ExtensionFileList -VM $VM -Run $ExtensionScriptName - } - - # Native cmdlet for new VM - - $CurrentSubscription = Get-AzureSubscription -Current - $CurrentSubscription.CurrentStorageAccountName = $StorageAccountName - Write-Verbose "The Azure subscription ID is $($CurrentSubscription.SubscriptionID)" - Write-Verbose "The Azure storage account is $($CurrentSubscription.CurrentStorageAccountName)" - - New-AzureVM -VMs $VM -ServiceName $ServiceName - } - 'Absent' { - # Native Remove cmdlet - Write-Verbose "Removing VM `"$Name`" from Azure." - Write-Verbose 'Please be patient as the operation completes.' - - $CurrentSubscription = Get-AzureSubscription -Current - Write-Verbose "The Azure subscription ID is $($CurrentSubscription.SubscriptionID)" - Remove-AzureVM -Name $Name -ServiceName $ServiceName -DeleteVHD - } - } - } - -# Set-TargetResource -Ensure 'Present' -Name 'TestVM1' -ServiceName 'testvmsservice1' -storageaccountname 'testvmstorage1' -ImageName 'a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201404.01-en.us-127GB.vhd' -windows $true -Verbose -# Expectation is the VM will be created, set, or removed. Validate using Get-AzureVM. - -#endregion - - - -#region TEST FUNCTION - -function Test-TargetResource { -[CmdletBinding()] -[OutputType([Boolean])] -param( -[ValidateSet('Present','Absent')] -[string]$Ensure = 'Present', -[Parameter(Mandatory)][string]$Name, -[Parameter(Mandatory)][string]$ImageName, -[Parameter(Mandatory)][string]$ServiceName, -[Parameter(Mandatory)][string]$StorageAccountName, -[string]$InstanceSize, -[bool]$Linux, -[bool]$Windows, -[pscredential]$Credential, -[string]$ExtensionContainerName, -[string]$ExtensionFileList, -[string]$ExtensionScriptName -) - # Output from Get-TargetResource - $Get = Get-TargetResource -Name $Name -ServiceName $ServiceName -ImageName $ImageName -StorageAccountName $StorageAccountName -ErrorAction SilentlyContinue - - switch ($Ensure) { - 'Present'{$bool = $true} - 'Absent'{$bool = $false} - } - - if ($Name -ne $Get.Name -AND $ServiceName -ne $Get.ServiceName) { - switch ($Ensure) { - 'Present'{$bool = $false} - 'Absent'{$bool = $true} - } - write-verbose 'The VM could not be found in Azure.' - } - - $bool - } - -# Test-TargetResource -Ensure 'Absent' -Name 'TestVM1' -ServiceName 'testvmservice1' -storageaccountname 'testvmstorage1' -ImageName 'a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201404.01-en.us-127GB.vhd' -windows $true -Verbose -# Expectation is True or False based on whether the VM has been deployed, depending on Present/Absent. - -#endregion - -Export-ModuleMember -function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVM/MSFT_xAzureVM.schema.mof b/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVM/MSFT_xAzureVM.schema.mof deleted file mode 100644 index 6821344c..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVM/MSFT_xAzureVM.schema.mof +++ /dev/null @@ -1,19 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xAzureVM")] -class MSFT_xAzureVM : OMI_BaseResource -{ - [key, Description("Specifies the name of the virtual machine.")] string Name; - [write, Description("Specifies whether the Azure VM should be present or absent."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [required, Description("Specifies the name of the operating system image to use to create the operating system disk.")] string ImageName; - [required, Description("Specifies the new or existing service name.")] string ServiceName; - [required, Description("Specifies the name of the storage account for the VM.")] string StorageAccountName; - [write, Description("Specifies the size of the instance. For a list of virtual machine sizes, see http://msdn.microsoft.com/library/azure/dn197896.aspx")] string InstanceSize; - [write, Description("Creates a Linux virtual machine.")] boolean Linux; - [write, Description("Creates a Windows virtual machine.")] boolean Windows; - [write, EmbeddedInstance("MSFT_Credential")] string Credential; - [write, Description("The name of the Container in Azure Blob storage where the script files will reside. Case sensitive.")] string ExtensionContainerName; - [write, Description("List of files in Azure Blob container that should be copied in to the VM. Case sensitive.")] string ExtensionFileList; - [write, Description("Name of one of the files in the container that will be exectued at startup. Case sensitive.")] string ExtensionScriptName; -}; - - diff --git a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVMDscConfiguration/MSFT_xAzureVMDscConfiguration.psm1 b/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVMDscConfiguration/MSFT_xAzureVMDscConfiguration.psm1 deleted file mode 100644 index 87de4f84..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVMDscConfiguration/MSFT_xAzureVMDscConfiguration.psm1 +++ /dev/null @@ -1,176 +0,0 @@ -# Purpose: -# Resource to Publish a Dsc Configuration archive to Azure storage - -#region GET - -function Get-TargetResource { -[CmdletBinding()] -[OutputType([Hashtable])] -param( - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string]$StorageAccountName, - - [string]$ContainerName = 'windows-powershell-dsc', - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string]$ConfigurationPath, - - [ValidateNotNullOrEmpty()] - [string]$AzureSubscriptionName, - - [ValidateNotNullOrEmpty()] - [string]$AzurePublishSettingsPath - -) - - if ($AzureSubscriptionName -and $AzurePublishSettingsPath) - { - Write-Verbose "Azure Publish Settings provided. AzureSubscriptionName = $AzureSubscriptionName, AzurePublishSettingsPath = $AzurePublishSettingsPath" - Import-AzurePublishSettingsFile $AzurePublishSettingsPath - Set-AzureSubscription -SubscriptionName $AzureSubscriptionName - } - - Write-Verbose "Storage Account Name = $StorageAccountName" - $storageAccountKey = (Get-AzureStorageKey $StorageAccountName).Primary - $Script:StorageContext = New-AzureStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $storageAccountKey -Protocol https - - Write-Verbose "ConfigurationPath = $ConfigurationPath" - $Script:ConfigFileName = [IO.Path]::GetFileName($ConfigurationPath) - - $storageBlobArchive = Get-AzureStorageBlob -Blob "$Script:ConfigFileName.zip" -Container $ContainerName -Context $Script:StorageContext -ErrorAction SilentlyContinue - $blobUri = $($storageBlobArchive.ICloudBlob.Uri.AbsoluteUri) - - Write-Verbose "Blob Uri is $blobUri" - - $returnValue = @{ - BlobUri = $blobUri - } - - return $returnValue - - } - -#endregion - - -#region SET - -function Set-TargetResource { -[CmdletBinding()] -param( - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string]$StorageAccountName, - - [ValidateSet('Present','Absent')] - [string]$Ensure = 'Present', - - [string]$ContainerName = 'windows-powershell-dsc', - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string]$ConfigurationPath, - - [ValidateNotNullOrEmpty()] - [string]$AzureSubscriptionName, - - [ValidateNotNullOrEmpty()] - [string]$AzurePublishSettingsPath - -) - - switch ($Ensure) { - 'Present' - { - Write-Verbose "Ensure is set to $Ensure. Calling Publish-AzureVMDscConfiguration to create the Configuration and Resource archive in Storage `"$($Script:StorageContext.StorageAccountName)`"" - Publish-AzureVMDscConfiguration -ConfigurationPath $ConfigurationPath -StorageContext $Script:StorageContext -Force -Verbose - } - - 'Absent' - { - Write-Verbose "Ensure is set to $Ensure. Calling Remove-AzureStorageBlob to remove the Blob from Storage `"$($Script:StorageContext.StorageAccountName)`"" - Remove-AzureStorageBlob -Blob "$Script:ConfigFileName.zip" -Container $ContainerName -Force - } - } - - } - -#endregion - - -#region TEST - -function Test-TargetResource { -[CmdletBinding()] -[OutputType([Boolean])] -param( - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string]$StorageAccountName, - - [ValidateSet('Present','Absent')] - [string]$Ensure = 'Present', - - [string]$ContainerName = 'windows-powershell-dsc', - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string]$ConfigurationPath, - - [ValidateNotNullOrEmpty()] - [string]$AzureSubscriptionName, - - [ValidateNotNullOrEmpty()] - [string]$AzurePublishSettingsPath - -) - Write-Verbose "Invoke Get-TargetResource to obtain the Absolute Uri to the Blob" - $parameters = @{} - $parameters["StorageAccountName"] = $StorageAccountName - $parameters["ContainerName"] = $ContainerName - $parameters["ConfigurationPath"] = $ConfigurationPath - - if($AzureSubscriptionName) - { - $parameters["AzureSubscriptionName"] = $AzureSubscriptionName - } - - if($AzurePublishSettingsPath) - { - $parameters["AzurePublishSettingsPath"] = $AzurePublishSettingsPath - } - - $blobUriObj = Get-TargetResource @parameters - - switch ($Ensure) { - 'Present' - { - if (-not $($blobUriObj.BlobUri)) - { - Write-Verbose "Ensure is set to $Ensure. But the archive is absent in Storage. We need to Publish the archive to Storage" - return $false - } - } - 'Absent' - { - if ($($blobUriObj.BlobUri)) - { - Write-Verbose "Ensure is set to $Ensure. But the archive is present in Storage. We need to Remove the archive from Storage" - return $false - } - } - } - - return $true - - } - -#endregion - - -Export-ModuleMember -function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVMDscConfiguration/MSFT_xAzureVMDscConfiguration.schema.mof b/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVMDscConfiguration/MSFT_xAzureVMDscConfiguration.schema.mof deleted file mode 100644 index d951473e..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVMDscConfiguration/MSFT_xAzureVMDscConfiguration.schema.mof +++ /dev/null @@ -1,18 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xAzureVMDscConfiguration")] -class MSFT_xAzureVMDscConfiguration : OMI_BaseResource -{ - [Key, Description("Specifies name of the existing storage account.")] string StorageAccountName; - - [Write, Description("Specifies whether the supplied Configuration is Present or Absent in Azure Storage"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - - [Write, Description("Specifies the name of the Container in the Azure Storage Account.")] string ContainerName; - - [Required, Description("Specifies location of the Dsc Configuration document")] string ConfigurationPath; - - [Write, Description("Specifies the name of the Azure subscription that should be set to Current.")] string AzureSubscriptionName; - [Write, Description("Specifies the location of the Publish Settings file for the Azure Subscription.")] string AzurePublishSettingsPath; - - [Read, Description("Absolute Uri of the Blob")] string BlobUri; -}; - diff --git a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVMDscExtension/MSFT_xAzureVMDscExtension.psm1 b/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVMDscExtension/MSFT_xAzureVMDscExtension.psm1 deleted file mode 100644 index e5e9c9fc..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVMDscExtension/MSFT_xAzureVMDscExtension.psm1 +++ /dev/null @@ -1,156 +0,0 @@ -#region GET FUNCTION - -function Get-TargetResource { -[CmdletBinding()] -[OutputType([Hashtable])] -param ( -[Parameter(Mandatory)][string]$VMName, -[Parameter(Mandatory)][string]$ServiceName, -[Parameter(Mandatory)][string]$ConfigurationArchive, -[Parameter(Mandatory)][string]$StorageAccountName -) - - $CurrentSubscription = Get-AzureSubscription -Current - $VM = Get-AzureVM -ServiceName $ServiceName -Name $VMName - $AgentDSCStatus = ($VM.ResourceExtensionStatusList | Where {$_.HandlerName -eq 'Microsoft.PowerShell.DSC'}) - $DscExtensionStatus = $VM | Get-AzureVMDscExtension -ErrorAction SilentlyContinue - - # Returning StorageAccountName input for troubleshooting purposes - return @{ - VMName = $VM.Name - ServiceName = $VM.ServiceName - ConfigurationArchive = $DscExtensionStatus.ModulesUrl - StorageAccountName = $StorageAccountName - Version = $AgentDSCStatus.Version - Timestamp = $AgentDSCStatus.ExtensionSettingStatus.TimestampUtc - Status = $AgentDSCStatus.ExtensionSettingStatus.Status - Code = $AgentDSCStatus.ExtensionSettingStatus.Code - Message = $AgentDSCStatus.ExtensionSettingStatus.FormattedMessage.Message - } - - } - -# Expectation is a hashtable with properties of the DSC Extension, if it exists. - -#endregion - - - -#region SET FUNCTION - -function Set-TargetResource { -[CmdletBinding()] -param( -[Parameter(Mandatory)][string]$VMName, -[Parameter(Mandatory)][string]$ServiceName, -[Parameter(Mandatory)][string]$ConfigurationArchive, -[Parameter(Mandatory)][string]$StorageAccountName, -[Microsoft.Management.Infrastructure.CimInstance[]]$ConfigurationArgument, -[string]$ConfigurationDataPath, -[string]$Configuration, -[string]$ContainerName, -[bool]$Force, -[string]$ReferenceName, -[string]$StorageEndpointSuffix, -[string]$Version -) - - $CurrentSubscription = Get-AzureSubscription -Current - $StorageKey = Get-AzureStorageKey -StorageAccountName $StorageAccountName - $AzureStorageContext = New-AzureStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $StorageKey.Primary -Protocol https - - $ExtensionParams = $PSBoundParameters - $ExtensionParams.Add('ConfigurationName',$Configuration) - If ($ConfigurationArgument) {$ExensionParams.ConfigurationArgument = Convert-KeyValuePairArrayToHashtable $ConfigurationArgument} - $ExtensionParams.Add('StorageContext',$AzureStorageContext) - $ExtensionParams.Remove('Configuration') - $ExtensionParams.Remove('StorageAccountName') - $ExtensionParams.Remove('VMName') - $ExtensionParams.Remove('ServiceName') - - Write-Verbose "The Azure subscription ID is $($CurrentSubscription.SubscriptionID)" - Write-Verbose "The Azure storage context is $AzureStorageContext" - - $VM = Get-AzureVM -ServiceName $ServiceName -Name $VMName - - Try { - $VM | Set-AzureVMDscExtension @ExtensionParams - } - Catch { - throw "Setting the DSC Extension failed with error: $_" - } - - $VM | Update-AzureVM - } - -# Expectation is the DSC script will be executed on the target VM - -#endregion - - - -#region TEST FUNCTION - -function Test-TargetResource { -[CmdletBinding()] -[OutputType([Boolean])] -param( -[Parameter(Mandatory)][string]$VMName, -[Parameter(Mandatory)][string]$ServiceName, -[Parameter(Mandatory)][string]$ConfigurationArchive, -[Parameter(Mandatory)][string]$StorageAccountName, -[Microsoft.Management.Infrastructure.CimInstance[]]$ConfigurationArgument, -[string]$ConfigurationDataPath, -[string]$Configuration, -[string]$ContainerName, -[bool]$Force, -[string]$ReferenceName, -[string]$StorageEndpointSuffix, -[string]$Version -) - - $Get = Get-TargetResource -VMName $VMName -ServiceName $ServiceName -ConfigurationArchive $ConfigurationArchive -StorageAccountName $StorageAccountName - - if ($Get.ConfigurationArchive) { - $Archive = $Get.ConfigurationArchive.Split('/')[$Get.ConfigurationArchive.Split('/').count-1] - } - - if ($Archive -eq $ConfigurationArchive -AND $Get.Status -eq 'Success') { - Write-Verbose 'The DSC configuration is already applied to the VM.' - return $true - } - - write-verbose 'The VM does not have the DSC Extension enabled.' - return $false - } - -# Expectation is True or False based on whether the VM has been deployed, depending on Present/Absent. - -#endregion - - - -#region HELPER FUNCTIONS - -# Converts CimInstance array of type KeyValuePair to hashtable -function Convert-KeyValuePairArrayToHashtable -{ -param ( - [parameter(Mandatory = $true)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $array -) - - $hashtable = @{} - foreach($item in $array) - { - $hashtable += @{$item.Key = $item.Value} - } - - return $hashtable - } - -#endregion - - -Export-ModuleMember -function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVMDscExtension/MSFT_xAzureVMDscExtension.schema.mof b/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVMDscExtension/MSFT_xAzureVMDscExtension.schema.mof deleted file mode 100644 index a3f4aca6..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/DSCResources/MSFT_xAzureVMDscExtension/MSFT_xAzureVMDscExtension.schema.mof +++ /dev/null @@ -1,22 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xAzureVMDscExtension")] -class MSFT_xAzureVMDscExtension : OMI_BaseResource -{ - [Key, Description("Specifies name of the VM. This is used together with ServiceName to construct a persistent vm object.")] string VMName; - [Required, Description("Specifies name of the Service where the VM is deployed.")] string ServiceName; - [Required, Description("The name of the configuration package .zip file that was previously uploaded by Publish-AzureVMDscConfiguration. This parameter must specify only the name of the file, without any path.")] string ConfigurationArchive; - [Required, Description("Specifies the name of the Storage Account used to create the Storage Context. The Azure Storage Context provides the security settings used to access the configuration script. This context should provide read access to the container specified by ContainerName.")] string StorageAccountName; - [Write, EmbeddedInstance("MSFT_KeyValuePair"), Description("A hashtable specifying the arguments to the configuration function. The keys correspond to the parameter names and the values to the parameter values.")] string ConfigurationArgument; - [Write, Description("The path to a .psd1 file that specifies the data for the configuration function.")] string ConfigurationDataPath; - [Write, Description("Name of the configuration script or module that will be invoked by the DSC Extension.")] string Configuration; - [Write, Description("Name of the Azure Storage Container where the ConfigurationArchive is located.")] string ContainerName; - [Write, Description("By default Set-AzureVMDscExtension will not overwrite any existing blobs. Use -Force to overwrite them.")] boolean Force; - [Write, Description("The Extension Reference Name")] string ReferenceName; - [Write, Description("The DNS endpoint suffix for all storage services, e.g. core.windows.net")] string StorageEndpointSuffix; - [Write, Description("The specific version of the DSC Extension to use. If not given, it will default to 1.*")] string Version; - [Read, Description("Returns the timestamp of the last DSC Extension execution.")] string TimeStamp; - [Read, Description("Returns the message code for the latest oepration by the DSC Extension.")] string Code; - [Read, Description("Returns the formatted message string for the latest operation by the DSC Extension.")] string Message; - [Read, Description("Returns the state of the DSC Extension from Azure.")] string Status; -}; - diff --git a/lib/puppet_x/dsc_resources/xAzure/LICENSE b/lib/puppet_x/dsc_resources/xAzure/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xAzure/ResourceDesignerScripts/GenerateXAzureSqlDatabase.ps1 b/lib/puppet_x/dsc_resources/xAzure/ResourceDesignerScripts/GenerateXAzureSqlDatabase.ps1 deleted file mode 100644 index b5b89464..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/ResourceDesignerScripts/GenerateXAzureSqlDatabase.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$Name = New-xDscResourceProperty -Name Name -Type String -Attribute Key -Description 'Name of the database' -$ServerName = New-xDscResourceProperty -Name ServerName -Type String -Attribute Key -Description 'Name of the database server in which database should be created' -$MaximumSizeInGB = New-xDscResourceProperty -Name MaximumSizeInGB -Type UInt32 -Attribute Write -Description 'Maximum size of the database in GB' -$Collation = New-xDscResourceProperty -Name Collation -Type String -Attribute Write -Description 'Collation of the database' -$Edition = New-xDscResourceProperty -Name Edition -Type String -Attribute Write -Description 'Edition of the database' -$ServerCredential = New-xDscResourceProperty -Name ServerCredential -Type PSCredential -Attribute Required -Description 'Credential to the database server' -$AzureSubscriptionName = New-xDscResourceProperty -Name AzureSubscriptionName -Type String -Attribute Write -Description 'Specifies the name of the Azure subscription that should be set to Current' -$AzurePublishSettingsFile = New-xDscResourceProperty -Name AzurePublishSettingsFile -Type String -Attribute Write -Description 'Specifies the location of the Publish Settings file for the Azure Subscription' -$Ensure = New-xDscResourceProperty -Name Ensure -Type String -Attribute Write -ValidateSet "Present", "Absent" -Description 'Ensure that database is present or absent' -New-xDscResource -Name MSFT_xAzureSqlDatabase -Property @($Name, $ServerName, $MaximumSizeInGB, $Collation, $Edition, $ServerCredential, $AzureSubscriptionName, $AzurePublishSettingsFile, $Ensure) -ModuleName xAzure -FriendlyName xAzureSqlDatabase diff --git a/lib/puppet_x/dsc_resources/xAzure/ResourceDesignerScripts/GenerateXAzureSqlDatabaseServerFirewallRule.ps1 b/lib/puppet_x/dsc_resources/xAzure/ResourceDesignerScripts/GenerateXAzureSqlDatabaseServerFirewallRule.ps1 deleted file mode 100644 index 437c3040..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/ResourceDesignerScripts/GenerateXAzureSqlDatabaseServerFirewallRule.ps1 +++ /dev/null @@ -1,9 +0,0 @@ -$Name = New-xDscResourceProperty -Name RuleName -Type String -Attribute Key -Description 'Name of the firewall rule' -$ServerName = New-xDscResourceProperty -Name ServerName -Type String -Attribute Key -Description 'Name of the database server for which firewall rule should be created' -$StartIPAddress = New-xDscResourceProperty -Name StartIPAddress -Type String -Attribute Required -Description 'Start IP address of the firewall rule' -$EndIPAddress = New-xDscResourceProperty -Name EndIPAddress -Type String -Attribute Required -Description 'End IP address of the firewall rule' -$AzureSubscriptionName = New-xDscResourceProperty -Name AzureSubscriptionName -Type String -Attribute Write -Description 'Specifies the name of the Azure subscription that should be set to Current' -$AzurePublishSettingsFile = New-xDscResourceProperty -Name AzurePublishSettingsFile -Type String -Attribute Write -Description 'Specifies the location of the Publish Settings file for the Azure Subscription' -$Ensure = New-xDscResourceProperty -Name Ensure -Type String -Attribute Write -ValidateSet "Present", "Absent" -Description 'Ensure that firewall rule is present or absent' -New-xDscResource -Name MSFT_xAzureSqlDatabaseServerFirewallRule -Property @($Name, $ServerName, $StartIPAddress, $EndIPAddress, $AzureSubscriptionName, $AzurePublishSettingsFile, $Ensure) -ModuleName xAzure -FriendlyName xAzureSqlDatabaseServerFirewallRule - diff --git a/lib/puppet_x/dsc_resources/xAzure/xAzure.psd1 b/lib/puppet_x/dsc_resources/xAzure/xAzure.psd1 deleted file mode 100644 index acb0573a..00000000 --- a/lib/puppet_x/dsc_resources/xAzure/xAzure.psd1 +++ /dev/null @@ -1,31 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '0.2.0.0' - -# ID used to uniquely identify this module -GUID = '40179489-2ad9-46f7-b34f-b55e30650700' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module with DSC Resources for Azure Resources' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' -} diff --git a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackAdmin/MSFT_xAzurePackAdmin.psm1 b/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackAdmin/MSFT_xAzurePackAdmin.psm1 deleted file mode 100644 index 04f8498b..00000000 --- a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackAdmin/MSFT_xAzurePackAdmin.psm1 +++ /dev/null @@ -1,170 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present', - - [parameter(Mandatory = $true)] - [System.String] - $Principal, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AzurePackAdminCredential, - - [parameter(Mandatory = $true)] - [System.String] - $SQLServer, - - [System.String] - $SQLInstance = 'MSSQLSERVER', - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $dbUser - ) - - $ConnectionString = Get-SQLConnectionString -SQLServer $SQLServer -SQLInstance $SQLInstance -dbUser $dbUser - - $Ensure = - if(Get-MgmtSvcAdminUser -Principal $Principal -ConnectionString $ConnectionString) - { - 'Present' - } - else - { - 'Absent' - } - - $returnValue = @{ - Ensure = $Ensure - Principal = $Principal - SQLServer = $SQLServer - SQLInstance = $SQLInstance - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present', - - [parameter(Mandatory = $true)] - [System.String] - $Principal, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AzurePackAdminCredential, - - [parameter(Mandatory = $true)] - [System.String] - $SQLServer, - - [System.String] - $SQLInstance = 'MSSQLSERVER', - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $dbUser - ) - - $ConnectionString = Get-SQLConnectionString -SQLServer $SQLServer -SQLInstance $SQLInstance -dbUser $dbUser - - switch($Ensure) - { - 'Present' - { - if(!(Get-MgmtSvcAdminUser -Principal $Principal -ConnectionString $ConnectionString)) - { - Add-MgmtSvcAdminUser -Principal $Principal -ConnectionString $ConnectionString - } - } - 'Absent' - { - if(Get-MgmtSvcAdminUser -Principal $Principal -ConnectionString $ConnectionString) - { - Remove-MgmtSvcAdminUser -Principal $Principal -ConnectionString $ConnectionString - } - } - } - - if(!(Test-TargetResource @PSBoundParameters)) - { - throw 'Set-TargetResouce failed' - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present', - - [parameter(Mandatory = $true)] - [System.String] - $Principal, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AzurePackAdminCredential, - - [parameter(Mandatory = $true)] - [System.String] - $SQLServer, - - [System.String] - $SQLInstance = 'MSSQLSERVER', - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $dbUser - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - -Function Get-SQLConnectionString -{ - param( - [parameter(Mandatory = $true)] - [String]$SQLServer, - - [parameter(Mandatory = $true)] - [String]$SQLInstance, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $dbUser - ) - - if($SQLInstance -eq 'MSSQLSERVER') - { - return "Data Source=$SQLServer;Initial Catalog=Microsoft.MgmtSvc.Store;User ID=$($dbUser.UserName);Password=$($dbUser.GetNetworkCredential().password)" - } - else - { - return "Data Source=$SQLServer\$SQLInstance;Initial Catalog=Microsoft.MgmtSvc.Store;User ID=$($dbUser.UserName);Password=$($dbUser.GetNetworkCredential().password)" - } -} - - -Export-ModuleMember -Function *-TargetResource \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackAdmin/MSFT_xAzurePackAdmin.schema.mof b/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackAdmin/MSFT_xAzurePackAdmin.schema.mof deleted file mode 100644 index 8cdc8878..00000000 --- a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackAdmin/MSFT_xAzurePackAdmin.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xAzurePackAdmin")] -class MSFT_xAzurePackAdmin : OMI_BaseResource -{ - [Write, Description("An enumerated value that describes if the principal is an Azure Pack admin.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Key, Description("The Azure Pack admin principal.")] String Principal; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String AzurePackAdminCredential; - [Key, Description("Database server for the Azure Pack databases.")] String SQLServer; - [Write, Description("Database instance for the Azure Pack databases.")] String SQLInstance; - [Required, EmbeddedInstance("MSFT_Credential"), Description("SQL user to be used to create the database if the SetupCredential cannot be used.")] String dbUser; -}; diff --git a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackDatabaseSetting/MSFT_xAzurePackDatabaseSetting.psm1 b/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackDatabaseSetting/MSFT_xAzurePackDatabaseSetting.psm1 deleted file mode 100644 index 9ebdb42e..00000000 --- a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackDatabaseSetting/MSFT_xAzurePackDatabaseSetting.psm1 +++ /dev/null @@ -1,149 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("AdminSite","TenantSite")] - [System.String] - $Namespace, - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Value, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AzurePackAdminCredential, - - [parameter(Mandatory = $true)] - [System.String] - $SQLServer, - - [System.String] - $SQLInstance = "MSSQLSERVER", - - [System.Management.Automation.PSCredential] - $dbUser - ) - - if($SQLInstance -eq "MSSQLSERVER") - { - $ConnectionString = "Data Source=$SQLServer;Initial Catalog=Microsoft.MgmtSvc.PortalConfigStore;User ID=$($dbUser.UserName);Password=$($dbUser.GetNetworkCredential().password)"; - } - else - { - $ConnectionString = "Data Source=$SQLServer\$SQLInstance;Initial Catalog=Microsoft.MgmtSvc.PortalConfigStore;User ID=$($dbUser.UserName);Password=$($dbUser.GetNetworkCredential().password)"; - } - - $Value = (Get-MgmtSvcDatabaseSetting -Namespace $Namespace -Name $Name -ConnectionString $ConnectionString).Value - - $returnValue = @{ - Name = $Name - Value = $Value - SQLServer = $SQLServer - SQLInstance = $SQLInstance - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("AdminSite","TenantSite")] - [System.String] - $Namespace, - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Value, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AzurePackAdminCredential, - - [parameter(Mandatory = $true)] - [System.String] - $SQLServer, - - [System.String] - $SQLInstance = "MSSQLSERVER", - - [System.Management.Automation.PSCredential] - $dbUser - ) - - - if($SQLInstance -eq "MSSQLSERVER") - { - $ConnectionString = "Data Source=$SQLServer;Initial Catalog=Microsoft.MgmtSvc.PortalConfigStore;User ID=$($dbUser.UserName);Password=$($dbUser.GetNetworkCredential().password)"; - } - else - { - $ConnectionString = "Data Source=$SQLServer\$SQLInstance;Initial Catalog=Microsoft.MgmtSvc.PortalConfigStore;User ID=$($dbUser.UserName);Password=$($dbUser.GetNetworkCredential().password)"; - } - - Set-MgmtSvcDatabaseSetting -Namespace $Namespace -Name $Name -Value $Value -ConnectionString $ConnectionString -Force - - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("AdminSite","TenantSite")] - [System.String] - $Namespace, - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Value, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AzurePackAdminCredential, - - [parameter(Mandatory = $true)] - [System.String] - $SQLServer, - - [System.String] - $SQLInstance = "MSSQLSERVER", - - [System.Management.Automation.PSCredential] - $dbUser - ) - - $result = ((Get-TargetResource @PSBoundParameters).Value -eq $Value) - - $result -} - - -Export-ModuleMember -Function *-TargetResource \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackDatabaseSetting/MSFT_xAzurePackDatabaseSetting.schema.mof b/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackDatabaseSetting/MSFT_xAzurePackDatabaseSetting.schema.mof deleted file mode 100644 index 270d219d..00000000 --- a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackDatabaseSetting/MSFT_xAzurePackDatabaseSetting.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xAzurePackDatabaseSetting")] -class MSFT_xAzurePackDatabaseSetting : OMI_BaseResource -{ - [Key, Description("Specifies the namespace."),ValueMap{"AdminSite","TenantSite"}, Values{"AdminSite","TenantSite"}] String Namespace; - [Key, Description("Specifies the name of the setting.")] String Name; - [Required, Description("Specifies the value of the setting.")] String Value; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String AzurePackAdminCredential; - [Key, Description("Database server for the Azure Pack databases.")] String SQLServer; - [Write, Description("Database instance for the Azure Pack databases.")] String SQLInstance; - [Write, EmbeddedInstance("MSFT_Credential"), Description("SQL user to be used to create the database if the SetupCredential cannot be used.")] String dbUser; -}; diff --git a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackFQDN/MSFT_xAzurePackFQDN.psm1 b/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackFQDN/MSFT_xAzurePackFQDN.psm1 deleted file mode 100644 index 232374f7..00000000 --- a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackFQDN/MSFT_xAzurePackFQDN.psm1 +++ /dev/null @@ -1,194 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("AdminSite","AuthSite","TenantSite","WindowsAuthSite")] - [System.String] - $Namespace, - - [parameter(Mandatory = $true)] - [System.String] - $FullyQualifiedDomainName, - - [System.UInt16] - $Port, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AzurePackAdminCredential, - - [parameter(Mandatory = $true)] - [System.String] - $SQLServer, - - [System.String] - $SQLInstance = "MSSQLSERVER", - - [System.Management.Automation.PSCredential] - $dbUser - ) - - if($SQLInstance -eq "MSSQLSERVER") - { - $ConnectionString = "Data Source=$SQLServer;Initial Catalog=Microsoft.MgmtSvc.Store;User ID=$($dbUser.UserName);Password=$($dbUser.GetNetworkCredential().password)"; - } - else - { - $ConnectionString = "Data Source=$SQLServer\$SQLInstance;Initial Catalog=Microsoft.MgmtSvc.Store;User ID=$($dbUser.UserName);Password=$($dbUser.GetNetworkCredential().password)"; - } - - $FQDN = Get-MgmtSvcFQDN -Namespace $Namespace -ConnectionString $ConnectionString - - $returnValue = @{ - Namespace = $Namespace - FullyQualifiedDomainName = $FQDN.FullyQualifiedDomainName - Port = $FQDN.Port - SQLServer = $SQLServer - SQLInstance = $SQLInstance - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("AdminSite","AuthSite","TenantSite","WindowsAuthSite")] - [System.String] - $Namespace, - - [parameter(Mandatory = $true)] - [System.String] - $FullyQualifiedDomainName, - - [System.UInt16] - $Port, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AzurePackAdminCredential, - - [parameter(Mandatory = $true)] - [System.String] - $SQLServer, - - [System.String] - $SQLInstance = "MSSQLSERVER", - - [System.Management.Automation.PSCredential] - $dbUser - ) - - if($Port -eq 0) - { - Switch($Namespace) - { - "AdminSite" - { - $Port = 30091 - } - "AuthSite" - { - $Port = 30071 - } - "TenantSite" - { - $Port = 30081 - } - "WindowsAuthSite" - { - $Port = 30072 - } - } - } - - if($SQLInstance -eq "MSSQLSERVER") - { - $ConnectionString = "Data Source=$SQLServer;Initial Catalog=Microsoft.MgmtSvc.Store;User ID=$($dbUser.UserName);Password=$($dbUser.GetNetworkCredential().password)"; - } - else - { - $ConnectionString = "Data Source=$SQLServer\$SQLInstance;Initial Catalog=Microsoft.MgmtSvc.Store;User ID=$($dbUser.UserName);Password=$($dbUser.GetNetworkCredential().password)"; - } - - Set-MgmtSvcFQDN -Namespace $Namespace -FullyQualifiedDomainName $FullyQualifiedDomainName -Port $Port -ConnectionString $ConnectionString - - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("AdminSite","AuthSite","TenantSite","WindowsAuthSite")] - [System.String] - $Namespace, - - [parameter(Mandatory = $true)] - [System.String] - $FullyQualifiedDomainName, - - [System.UInt16] - $Port, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AzurePackAdminCredential, - - [parameter(Mandatory = $true)] - [System.String] - $SQLServer, - - [System.String] - $SQLInstance = "MSSQLSERVER", - - [System.Management.Automation.PSCredential] - $dbUser - ) - - if($Port -eq 0) - { - Switch($Namespace) - { - "AdminSite" - { - $Port = 30091 - } - "AuthSite" - { - $Port = 30071 - } - "TenantSite" - { - $Port = 30081 - } - "WindowsAuthSite" - { - $Port = 30072 - } - } - } - - $FQDN = Get-TargetResource @PSBoundParameters - - $result = (($FQDN.FullyQualifiedDomainName -eq $FullyQualifiedDomainName) -and ($FQDN.Port -eq $Port)) - - $result -} - - -Export-ModuleMember -Function *-TargetResource \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackFQDN/MSFT_xAzurePackFQDN.schema.mof b/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackFQDN/MSFT_xAzurePackFQDN.schema.mof deleted file mode 100644 index ccf203af..00000000 --- a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackFQDN/MSFT_xAzurePackFQDN.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xAzurePackFQDN")] -class MSFT_xAzurePackFQDN : OMI_BaseResource -{ - [Key, Description("Specifies a namespace."), ValueMap{"AdminSite","AuthSite","TenantSite","WindowsAuthSite"}, Values{"AdminSite","AuthSite","TenantSite","WindowsAuthSite"}] String Namespace; - [Required, Description("Specifies a Fully Qualified Domain Name (FQDN).")] String FullyQualifiedDomainName; - [Write, Description("Specifies a port number.")] Uint16 Port; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String AzurePackAdminCredential; - [Required, Description("Database server for the Azure Pack databases.")] String SQLServer; - [Write, Description("Database instance for the Azure Pack databases.")] String SQLInstance; - [Write, EmbeddedInstance("MSFT_Credential"), Description("SQL user to be used to create the database if the SetupCredential cannot be used.")] String dbUser; -}; diff --git a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackIdentityProvider/MSFT_xAzurePackIdentityProvider.psm1 b/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackIdentityProvider/MSFT_xAzurePackIdentityProvider.psm1 deleted file mode 100644 index 08c1539e..00000000 --- a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackIdentityProvider/MSFT_xAzurePackIdentityProvider.psm1 +++ /dev/null @@ -1,196 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Membership","Windows")] - [System.String] - $Target, - - [parameter(Mandatory = $true)] - [System.String] - $FullyQualifiedDomainName, - - [System.UInt16] - $Port, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AzurePackAdminCredential, - - [parameter(Mandatory = $true)] - [System.String] - $SQLServer, - - [System.String] - $SQLInstance = "MSSQLSERVER", - - [System.Management.Automation.PSCredential] - $dbUser - ) - - if($SQLInstance -eq "MSSQLSERVER") - { - $ConnectionString = "Data Source=$SQLServer;Initial Catalog=Microsoft.MgmtSvc.PortalConfigStore;User ID=$($dbUser.UserName);Password=$($dbUser.GetNetworkCredential().password)"; - } - else - { - $ConnectionString = "Data Source=$SQLServer\$SQLInstance;Initial Catalog=Microsoft.MgmtSvc.PortalConfigStore;User ID=$($dbUser.UserName);Password=$($dbUser.GetNetworkCredential().password)"; - } - - switch($Target) - { - "Membership" - { - $Namespace = "AuthSite" - } - "Windows" - { - $Namespace = "WindowsAuthSite" - } - } - $FQDN = ((ConvertFrom-Json (Get-MgmtSvcDatabaseSetting -Namespace $Namespace -Name Authentication.RelyingParty.Primary -ConnectionString $ConnectionString).Value).ReplyTo).Split("/")[2] - - $returnValue = @{ - Target = $Target - FullyQualifiedDomainName = $FQDN.Split(":")[0] - Port = $FQDN.Split(":")[1] - SQLServer = $SQLServer - SQLInstance = $SQLInstance - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Membership","Windows")] - [System.String] - $Target, - - [parameter(Mandatory = $true)] - [System.String] - $FullyQualifiedDomainName, - - [System.UInt16] - $Port, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AzurePackAdminCredential, - - [parameter(Mandatory = $true)] - [System.String] - $SQLServer, - - [System.String] - $SQLInstance = "MSSQLSERVER", - - [System.Management.Automation.PSCredential] - $dbUser - ) - - if($Port -eq 0) - { - Switch($Target) - { - "Windows" - { - $Port = 30091 - } - "Membership" - { - $Port = 30081 - } - } - } - - if($SQLInstance -eq "MSSQLSERVER") - { - $PortalConnectionString = "Data Source=$SQLServer;Initial Catalog=Microsoft.MgmtSvc.PortalConfigStore;User ID=$($dbUser.UserName);Password=$($dbUser.GetNetworkCredential().password)"; - $ManagementConnectionString = "Data Source=$SQLServer;Initial Catalog=Microsoft.MgmtSvc.Store;User ID=$($dbUser.UserName);Password=$($dbUser.GetNetworkCredential().password)"; - } - else - { - $PortalConnectionString = "Data Source=$SQLServer\$SQLInstance;Initial Catalog=Microsoft.MgmtSvc.PortalConfigStore;User ID=$($dbUser.UserName);Password=$($dbUser.GetNetworkCredential().password)"; - $ManagementConnectionString = "Data Source=$SQLServer\$SQLInstance;Initial Catalog=Microsoft.MgmtSvc.Store;User ID=$($dbUser.UserName);Password=$($dbUser.GetNetworkCredential().password)"; - } - - Set-MgmtSvcIdentityProviderSettings -Target $Target -MetadataEndpoint "https://$FullyQualifiedDomainName`:$Port/FederationMetadata/2007-06/FederationMetadata.xml" -PortalConnectionString $PortalConnectionString -ManagementConnectionString $ManagementConnectionString -DisableCertificateValidation; - - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Membership","Windows")] - [System.String] - $Target, - - [parameter(Mandatory = $true)] - [System.String] - $FullyQualifiedDomainName, - - [System.UInt16] - $Port, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AzurePackAdminCredential, - - [parameter(Mandatory = $true)] - [System.String] - $SQLServer, - - [System.String] - $SQLInstance = "MSSQLSERVER", - - [System.Management.Automation.PSCredential] - $dbUser - ) - - if($Port -eq 0) - { - Switch($Target) - { - "Windows" - { - $Port = 30091 - } - "Membership" - { - $Port = 30081 - } - } - } - - $FQDN = Get-TargetResource @PSBoundParameters - - if ($Port -ne 443) - { - $TestPort = $Port - } - - $result = (($FQDN.FullyQualifiedDomainName -eq $FullyQualifiedDomainName) -and ($FQDN.Port -eq $TestPort)) - - $result -} - - -Export-ModuleMember -Function *-TargetResource \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackIdentityProvider/MSFT_xAzurePackIdentityProvider.schema.mof b/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackIdentityProvider/MSFT_xAzurePackIdentityProvider.schema.mof deleted file mode 100644 index 3e086044..00000000 --- a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackIdentityProvider/MSFT_xAzurePackIdentityProvider.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xAzurePackIdentityProvider")] -class MSFT_xAzurePackIdentityProvider : OMI_BaseResource -{ - [Key, Description("Specifies the target site."), ValueMap{"Membership","Windows"}, Values{"Membership","Windows"}] String Target; - [Required, Description("Specifies a Fully Qualified Domain Name (FQDN).")] String FullyQualifiedDomainName; - [Write, Description("Specifies a port number.")] Uint16 Port; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String AzurePackAdminCredential; - [Required, Description("Database server for the Azure Pack databases.")] String SQLServer; - [Write, Description("Database instance for the Azure Pack databases.")] String SQLInstance; - [Write, EmbeddedInstance("MSFT_Credential"), Description("SQL user to be used to create the database if the SetupCredential cannot be used.")] String dbUser; -}; diff --git a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackRelyingParty/MSFT_xAzurePackRelyingParty.psm1 b/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackRelyingParty/MSFT_xAzurePackRelyingParty.psm1 deleted file mode 100644 index aead3830..00000000 --- a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackRelyingParty/MSFT_xAzurePackRelyingParty.psm1 +++ /dev/null @@ -1,193 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Admin","Tenant")] - [System.String] - $Target, - - [parameter(Mandatory = $true)] - [System.String] - $FullyQualifiedDomainName, - - [System.UInt16] - $Port, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AzurePackAdminCredential, - - [parameter(Mandatory = $true)] - [System.String] - $SQLServer, - - [System.String] - $SQLInstance = "MSSQLSERVER", - - [System.Management.Automation.PSCredential] - $dbUser - ) - - if($SQLInstance -eq "MSSQLSERVER") - { - $ConnectionString = "Data Source=$SQLServer;Initial Catalog=Microsoft.MgmtSvc.PortalConfigStore;User ID=$($dbUser.UserName);Password=$($dbUser.GetNetworkCredential().password)"; - } - else - { - $ConnectionString = "Data Source=$SQLServer\$SQLInstance;Initial Catalog=Microsoft.MgmtSvc.PortalConfigStore;User ID=$($dbUser.UserName);Password=$($dbUser.GetNetworkCredential().password)"; - } - - switch($Target) - { - "Admin" - { - $Namespace = "AdminSite" - } - "Tenant" - { - $Namespace = "TenantSite" - } - } - - $FQDN = ((ConvertFrom-Json (Get-MgmtSvcDatabaseSetting -Namespace $Namespace -Name Authentication.IdentityProvider -ConnectionString $ConnectionString).Value).Endpoint).Split("/")[2] - - - $returnValue = @{ - Target = $Target - FullyQualifiedDomainName = $FQDN.Split(":")[0] - Port = $FQDN.Split(":")[1] - SQLServer = $SQLServer - SQLInstance = $SQLInstance - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Admin","Tenant")] - [System.String] - $Target, - - [parameter(Mandatory = $true)] - [System.String] - $FullyQualifiedDomainName, - - [System.UInt16] - $Port, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AzurePackAdminCredential, - - [parameter(Mandatory = $true)] - [System.String] - $SQLServer, - - [System.String] - $SQLInstance = "MSSQLSERVER", - - [System.Management.Automation.PSCredential] - $dbUser - ) - - if($Port -eq 0) - { - Switch($Target) - { - "Admin" - { - $Port = 30072 - } - "Tenant" - { - $Port = 30071 - } - } - } - - if($SQLInstance -eq "MSSQLSERVER") - { - $PortalConnectionString = "Data Source=$SQLServer;Initial Catalog=Microsoft.MgmtSvc.PortalConfigStore;User ID=$($dbUser.UserName);Password=$($dbUser.GetNetworkCredential().password)"; - $ManagementConnectionString = "Data Source=$SQLServer;Initial Catalog=Microsoft.MgmtSvc.Store;User ID=$($dbUser.UserName);Password=$($dbUser.GetNetworkCredential().password)"; - } - else - { - $PortalConnectionString = "Data Source=$SQLServer\$SQLInstance;Initial Catalog=Microsoft.MgmtSvc.PortalConfigStore;User ID=$($dbUser.UserName);Password=$($dbUser.GetNetworkCredential().password)"; - $ManagementConnectionString = "Data Source=$SQLServer\$SQLInstance;Initial Catalog=Microsoft.MgmtSvc.Store;User ID=$($dbUser.UserName);Password=$($dbUser.GetNetworkCredential().password)"; - } - - Set-MgmtSvcRelyingPartySettings -Target $Target -MetadataEndpoint "https://$FullyQualifiedDomainName`:$Port/FederationMetadata/2007-06/FederationMetadata.xml" -PortalConnectionString $PortalConnectionString -ManagementConnectionString $ManagementConnectionString -DisableCertificateValidation; - - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Admin","Tenant")] - [System.String] - $Target, - - [parameter(Mandatory = $true)] - [System.String] - $FullyQualifiedDomainName, - - [System.UInt16] - $Port, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AzurePackAdminCredential, - - [parameter(Mandatory = $true)] - [System.String] - $SQLServer, - - [System.String] - $SQLInstance = "MSSQLSERVER", - - [System.Management.Automation.PSCredential] - $dbUser - ) - - if($Port -eq 0) - { - Switch($Target) - { - "Admin" - { - $Port = 30072 - } - "Tenant" - { - $Port = 30071 - } - } - } - - $FQDN = Get-TargetResource @PSBoundParameters - - $result = (($FQDN.FullyQualifiedDomainName -eq $FullyQualifiedDomainName) -and ($FQDN.Port -eq $Port)) - - $result -} - - -Export-ModuleMember -Function *-TargetResource \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackRelyingParty/MSFT_xAzurePackRelyingParty.schema.mof b/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackRelyingParty/MSFT_xAzurePackRelyingParty.schema.mof deleted file mode 100644 index e23c11c9..00000000 --- a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackRelyingParty/MSFT_xAzurePackRelyingParty.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xAzurePackRelyingParty")] -class MSFT_xAzurePackRelyingParty : OMI_BaseResource -{ - [Key, Description("Specifies the target site."), ValueMap{"Admin","Tenant"}, Values{"Admin","Tenant"}] String Target; - [Key, Description("Specifies a Fully Qualified Domain Name (FQDN).")] String FullyQualifiedDomainName; - [Write, Description("Specifies a port number.")] Uint16 Port; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String AzurePackAdminCredential; - [Required, Description("Database server for the Azure Pack databases.")] String SQLServer; - [Write, Description("Database instance for the Azure Pack databases.")] String SQLInstance; - [Write, EmbeddedInstance("MSFT_Credential"), Description("SQL user to be used to create the database if the SetupCredential cannot be used.")] String dbUser; -}; diff --git a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackResourceProvider/MSFT_xAzurePackResourceProvider.psm1 b/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackResourceProvider/MSFT_xAzurePackResourceProvider.psm1 deleted file mode 100644 index e2985569..00000000 --- a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackResourceProvider/MSFT_xAzurePackResourceProvider.psm1 +++ /dev/null @@ -1,764 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $AuthenticationSite, - - [parameter(Mandatory = $true)] - [System.String] - $AdminUri, - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AzurePackAdminCredential, - - [System.String] - $DisplayName, - - [System.Boolean] - $Enabled = $true, - - [System.Boolean] - $PassthroughEnabled, - - [System.Boolean] - $AllowAnonymousAccess, - - [System.Boolean] - $AllowMultipleInstances, - - [System.String] - $AdminForwardingAddress, - - [System.String] - [ValidateSet("None","Basic","Windows")] - $AdminAuthenticationMode, - - [System.Management.Automation.PSCredential] - $AdminAuthenticationUser, - - [System.String] - $TenantForwardingAddress, - - [System.String] - [ValidateSet("None","Basic","Windows")] - $TenantAuthenticationMode, - - [System.Management.Automation.PSCredential] - $TenantAuthenticationUser, - - [System.String] - $TenantSourceUriTemplate, - - [System.String] - $TenantTargetUriTemplate, - - [System.String] - $UsageForwardingAddress, - - [System.String] - [ValidateSet("None","Basic","Windows")] - $UsageAuthenticationMode, - - [System.Management.Automation.PSCredential] - $UsageAuthenticationUser, - - [System.String] - $HealthCheckForwardingAddress, - - [System.String] - [ValidateSet("None","Basic","Windows")] - $HealthCheckAuthenticationMode, - - [System.Management.Automation.PSCredential] - $HealthCheckAuthenticationUser, - - [System.String] - $NotificationForwardingAddress, - - [System.String] - [ValidateSet("None","Basic","Windows")] - $NotificationAuthenticationMode, - - [System.Management.Automation.PSCredential] - $NotificationAuthenticationUser, - - [System.String] - $InstanceId, - - [System.String] - $InstanceDisplayName, - - [System.String] - $MaxQuotaUpdateBatchSize, - - [System.String] - $SubscriptionStatusPollingInterval, - - [System.String] - [ValidateSet("Standard","UsageProvider","CloudServiceProvider")] - $Type - ) - - $RP = Invoke-Command -ComputerName . -Credential $AzurePackAdminCredential -Authentication Credssp { - $AuthenticationSite = $args[0] - $AdminUri = $args[1] - $Name = $args[2] - $RP = Get-MgmtSvcResourceProviderConfiguration -Name $Name; - @{ - AuthenticationSite = $AuthenticationSite - AdminUri = $AdminUri - Name = $Name - DisplayName = $RP.DisplayName - Enabled = $RP.Enabled - PassthroughEnabled = $RP.PassthroughEnabled - AllowAnonymousAccess = $RP.AllowAnonymousAccess - AllowMultipleInstances = $RP.AllowMultipleInstances - AdminForwardingAddress = $RP.AdminEndpoint.ForwardingAddress.AbsoluteUri - AdminAuthenticationMode = $RP.AdminEndpoint.AuthenticationMode - AdminAuthenticationUsername = $RP.AdminEndpoint.AuthenticationUsername - TenantForwardingAddress = $RP.TenantEndpoint.ForwardingAddress.AbsoluteUri - TenantAuthenticationMode = $RP.TenantEndpoint.AuthenticationMode - TenantAuthenticationUsername = $RP.TenantEndpoint.AuthenticationUsername - TenantSourceUriTemplate = $RP.TenantEndpoint.SourceUriTemplate - TenantTargetUriTemplate = $RP.TenantEndpoint.TargetUriTemplate - UsageForwardingAddress = $RP.UsageEndpoint.ForwardingAddress.AbsoluteUri - UsageAuthenticationMode = $RP.UsageEndpoint.AuthenticationMode - UsageAuthenticationUsername = $RP.UsageEndpoint.AuthenticationUsername - HealthCheckForwardingAddress = $RP.HealthCheckEndpoint.ForwardingAddress.AbsoluteUri - HealthCheckAuthenticationMode = $RP.HealthCheckEndpoint.AuthenticationMode - HealthCheckAuthenticationUsername = $RP.HealthCheckEndpoint.AuthenticationUsername - NotificationForwardingAddress = $RP.NotificationEndpoint.ForwardingAddress.AbsoluteUri - NotificationAuthenticationMode = $RP.NotificationEndpoint.AuthenticationMode - NotificationAuthenticationUsername = $RP.NotificationEndpoint.AuthenticationUsername - InstanceId = $RP.InstanceId - InstanceDisplayName = $RP.InstanceDisplayName - MaxQuotaUpdateBatchSize = $RP.MaxQuotaUpdateBatchSize - SubscriptionStatusPollingInterval = $RP.SubscriptionStatusPollingInterval - Type = $RP.Type - } - } -ArgumentList @($AuthenticationSite,$AdminUri,$Name) - - $returnValue = $RP - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $AuthenticationSite, - - [parameter(Mandatory = $true)] - [System.String] - $AdminUri, - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AzurePackAdminCredential, - - [System.String] - $DisplayName, - - [System.Boolean] - $Enabled = $true, - - [System.Boolean] - $PassthroughEnabled, - - [System.Boolean] - $AllowAnonymousAccess, - - [System.Boolean] - $AllowMultipleInstances, - - [System.String] - $AdminForwardingAddress, - - [System.String] - [ValidateSet("None","Basic","Windows")] - $AdminAuthenticationMode, - - [System.Management.Automation.PSCredential] - $AdminAuthenticationUser, - - [System.String] - $TenantForwardingAddress, - - [System.String] - [ValidateSet("None","Basic","Windows")] - $TenantAuthenticationMode, - - [System.Management.Automation.PSCredential] - $TenantAuthenticationUser, - - [System.String] - $TenantSourceUriTemplate, - - [System.String] - $TenantTargetUriTemplate, - - [System.String] - $UsageForwardingAddress, - - [System.String] - [ValidateSet("None","Basic","Windows")] - $UsageAuthenticationMode, - - [System.Management.Automation.PSCredential] - $UsageAuthenticationUser, - - [System.String] - $HealthCheckForwardingAddress, - - [System.String] - [ValidateSet("None","Basic","Windows")] - $HealthCheckAuthenticationMode, - - [System.Management.Automation.PSCredential] - $HealthCheckAuthenticationUser, - - [System.String] - $NotificationForwardingAddress, - - [System.String] - [ValidateSet("None","Basic","Windows")] - $NotificationAuthenticationMode, - - [System.Management.Automation.PSCredential] - $NotificationAuthenticationUser, - - [System.String] - $InstanceId, - - [System.String] - $InstanceDisplayName, - - [System.String] - $MaxQuotaUpdateBatchSize, - - [System.String] - $SubscriptionStatusPollingInterval, - - [System.String] - [ValidateSet("Standard","UsageProvider","CloudServiceProvider")] - $Type - ) - - Invoke-Command -ComputerName . -Credential $AzurePackAdminCredential -Authentication Credssp { - $AuthenticationSite = $args[0] - $AdminUri = $args[1] - $Name = $args[2] - $AzurePackAdminCredential = $args[3] - $DisplayName = $args[4] - $Enabled = $args[5] - $PassthroughEnabled = $args[6] - $AllowAnonymousAccess = $args[7] - $AllowMultipleInstances = $args[8] - $AdminForwardingAddress = $args[9] - $AdminAuthenticationMode = $args[10] - $AdminAuthenticationUser = $args[11] - $TenantForwardingAddress = $args[12] - $TenantAuthenticationMode = $args[13] - $TenantAuthenticationUser = $args[14] - $TenantSourceUriTemplate = $args[15] - $TenantTargetUriTemplate = $args[16] - $UsageForwardingAddress = $args[17] - $UsageAuthenticationMode = $args[18] - $UsageAuthenticationUser = $args[19] - $HealthCheckForwardingAddress = $args[20] - $HealthCheckAuthenticationMode = $args[21] - $HealthCheckAuthenticationUser = $args[22] - $NotificationForwardingAddress = $args[23] - $NotificationAuthenticationMode = $args[24] - $NotificationAuthenticationUser = $args[25] - $InstanceId = $args[26] - $InstanceDisplayName = $args[27] - $MaxQuotaUpdateBatchSize = $args[28] - $SubscriptionStatusPollingInterval = $args[29] - $Type = $args[30] - - Import-Module -Name MgmtSvcConfig - - $TokenTry = 0 - While (!($Token) -and ($TokenTry -lt 5)) { - $Token = Get-MgmtSvcToken -Type Windows -AuthenticationSite $AuthenticationSite -ClientRealm 'http://azureservices/AdminSite' -User $AzurePackAdminCredential -DisableCertificateValidation - If (!($Token)) { - Start-Sleep 5 - $TokenTry++ - } - } - - if($Token) - { - if(Get-MgmtSvcResourceProviderConfiguration -Name $Name) - { - $RP = Get-MgmtSvcResourceProviderConfiguration -Name $Name - $Vars = @( - "DisplayName", - "Enabled", - "PassthroughEnabled", - "AllowAnonymousAccess", - "AllowMultipleInstances", - "AdminForwardingAddress", - "AdminAuthenticationMode", - "AdminAuthenticationUser", - "TenantForwardingAddress", - "TenantAuthenticationMode", - "TenantAuthenticationUser", - "TenantSourceUriTemplate", - "TenantTargetUriTemplate", - "UsageForwardingAddress", - "UsageAuthenticationMode", - "UsageAuthenticationUser", - "HealthCheckForwardingAddress", - "HealthCheckAuthenticationMode", - "HealthCheckAuthenticationUser", - "NotificationForwardingAddress", - "NotificationAuthenticationMode", - "NotificationAuthenticationUser", - "InstanceId", - "InstanceDisplayName", - "MaxQuotaUpdateBatchSize", - "SubscriptionStatusPollingInterval", - "Type" - ) - foreach($Var in $Vars) - { - if(!([String]::IsNullOrEmpty((Get-Variable -Name $Var).Value))) - { - if( - (($Var.Contains("User")) -and ((Get-Variable -Name $Var).Value.Username -ne $RP.($Var + "name"))) -or - (!($Var.Contains("User")) -and ((Get-Variable -Name $Var).Value -ne $RP.$Var)) - ) - { - switch($Var) - { - "AdminForwardingAddress" - { - $RP.AdminEndpoint.ForwardingAddress = (Get-Variable -Name $Var).Value - } - "AdminAuthenticationMode" - { - $RP.AdminEndpoint.AuthenticationMode = (Get-Variable -Name $Var).Value - } - "AdminAuthenticationUser" - { - $RP.AdminEndpoint.AuthenticationUsername = (Get-Variable -Name $Var).Value.Username - $RP.AdminEndpoint.AuthenticationPassword = (Get-Variable -Name $Var).Value.GetNetworkCredential().Password - } - "TenantForwardingAddress" - { - $RP.TenantEndpoint.ForwardingAddress = (Get-Variable -Name $Var).Value - } - "TenantAuthenticationMode" - { - $RP.TenantEndpoint.AuthenticationMode = (Get-Variable -Name $Var).Value - } - "TenantAuthenticationUser" - { - $RP.TenantEndpoint.AuthenticationUsername = (Get-Variable -Name $Var).Value.Username - $RP.AdminEndpoint.AuthenticationPassword = (Get-Variable -Name $Var).Value.GetNetworkCredential().Password - } - "TenantSourceUriTemplate" - { - $RP.TenantEndpoint.SourceUriTemplate = (Get-Variable -Name $Var).Value - } - "TenantTargetUriTemplate" - { - $RP.TenantEndpoint.TargetUriTemplate = (Get-Variable -Name $Var).Value - } - "UsageForwardingAddress" - { - $RP.UsageEndpoint.ForwardingAddress = (Get-Variable -Name $Var).Value - } - "UsageAuthenticationMode" - { - $RP.UsageEndpoint.AuthenticationMode = (Get-Variable -Name $Var).Value - } - "UsageAuthenticationUser" - { - $RP.UsageEndpoint.AuthenticationUsername = (Get-Variable -Name $Var).Value.Username - $RP.AdminEndpoint.AuthenticationPassword = (Get-Variable -Name $Var).Value.GetNetworkCredential().Password - } - "HealthCheckForwardingAddress" - { - $RP.HealthCheckEndpoint.ForwardingAddress = (Get-Variable -Name $Var).Value - } - "HealthCheckAuthenticationMode" - { - $RP.HealthCheckEndpoint.AuthenticationMode = (Get-Variable -Name $Var).Value - } - "HealthCheckAuthenticationUser" - { - $RP.HealthCheckEndpoint.AuthenticationUsername = (Get-Variable -Name $Var).Value.Username - $RP.HealthCheckEndpoint.AuthenticationPassword = (Get-Variable -Name $Var).Value.GetNetworkCredential().Password - } - "NotificationForwardingAddress" - { - $RP.NotificationEndpoint.ForwardingAddress = (Get-Variable -Name $Var).Value - } - "NotificationAuthenticationMode" - { - $RP.NotificationEndpoint.AuthenticationMode = (Get-Variable -Name $Var).Value - } - "NotificationAuthenticationUser" - { - $RP.NotificationEndpoint.AuthenticationUsername = (Get-Variable -Name $Var).Value.Username - $RP.NotificationEndpoint.AuthenticationPassword = (Get-Variable -Name $Var).Value.GetNetworkCredential().Password - } - "SubscriptionStatusPollingInterval" - { - $RP.NotificationEndpoint.AuthenticationUsername = New-TimeSpan -Seconds ((Get-Variable -Name $Var).Value) - } - - Default - { - $RP.$Var = (Get-Variable -Name $Var).Value - } - } - } - } - } - Set-MgmtSvcResourceProvider -AdminUri $AdminUri -Token $Token -ResourceProvider $RP -DisableCertificateValidation -Confirm:$false - } - else - { - $RPParams = @{} - $Vars = @( - "Name", - "DisplayName", - "AdminForwardingAddress", - "AdminAuthenticationMode", - "AdminAuthenticationUser", - "TenantForwardingAddress", - "TenantAuthenticationMode", - "TenantAuthenticationUser", - "TenantSourceUriTemplate", - "TenantTargetUriTemplate", - "UsageForwardingAddress", - "UsageAuthenticationMode", - "UsageAuthenticationUser", - "HealthCheckForwardingAddress", - "HealthCheckAuthenticationMode", - "HealthCheckAuthenticationUser", - "NotificationForwardingAddress", - "NotificationAuthenticationMode", - "NotificationAuthenticationUser", - "InstanceId", - "InstanceDisplayName", - "MaxQuotaUpdateBatchSize", - "SubscriptionStatusPollingInterval", - "Type" - ) - foreach($Var in $Vars) - { - if(!([String]::IsNullOrEmpty((Get-Variable -Name $Var).Value))) - { - if($Var.Contains("User")) - { - $RPParams.Add(($Var + "name"),(Get-Variable -Name $Var).Value.UserName) - $RPParams.Add(($Var.Replace("User","Password")),(Get-Variable -Name $Var).Value.GetNetworkCredential().Password) - } - else - { - $RPParams.Add($Var,(Get-Variable -Name $Var).Value) - } - } - } - $RP = New-MgmtSvcResourceProviderConfiguration @RPParams - $Vars = @( - "Enabled", - "PassthroughEnabled", - "AllowAnonymousAccess", - "AllowMultipleInstances" - ) - foreach($Var in $Vars) - { - if(!([String]::IsNullOrEmpty((Get-Variable -Name $Var).Value))) - { - $RP.$Var = (Get-Variable -Name $Var).Value - } - } - Add-MgmtSvcResourceProvider -AdminUri $AdminUri -Token $Token -ResourceProvider $RP -DisableCertificateValidation -Confirm:$false - } - } - } -ArgumentList @($AuthenticationSite,$AdminUri,$Name,$AzurePackAdminCredential,$DisplayName,$Enabled,$PassthroughEnabled,$AllowAnonymousAccess,$AllowMultipleInstances,$AdminForwardingAddress,$AdminAuthenticationMode,$AdminAuthenticationUser,$TenantForwardingAddress,$TenantAuthenticationMode,$TenantAuthenticationUser,$TenantSourceUriTemplate,$TenantTargetUriTemplate,$UsageForwardingAddress,$UsageAuthenticationMode,$UsageAuthenticationUser,$HealthCheckForwardingAddress,$HealthCheckAuthenticationMode,$HealthCheckAuthenticationUser,$NotificationForwardingAddress,$NotificationAuthenticationMode,$NotificationAuthenticationUser,$InstanceId,$InstanceDisplayName,$MaxQuotaUpdateBatchSize,$SubscriptionStatusPollingInterval,$Type) - - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $AuthenticationSite, - - [parameter(Mandatory = $true)] - [System.String] - $AdminUri, - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AzurePackAdminCredential, - - [System.String] - $DisplayName, - - [System.Boolean] - $Enabled = $true, - - [System.Boolean] - $PassthroughEnabled, - - [System.Boolean] - $AllowAnonymousAccess, - - [System.Boolean] - $AllowMultipleInstances, - - [System.String] - $AdminForwardingAddress, - - [System.String] - [ValidateSet("None","Basic","Windows")] - $AdminAuthenticationMode, - - [System.Management.Automation.PSCredential] - $AdminAuthenticationUser, - - [System.String] - $TenantForwardingAddress, - - [System.String] - [ValidateSet("None","Basic","Windows")] - $TenantAuthenticationMode, - - [System.Management.Automation.PSCredential] - $TenantAuthenticationUser, - - [System.String] - $TenantSourceUriTemplate, - - [System.String] - $TenantTargetUriTemplate, - - [System.String] - $UsageForwardingAddress, - - [System.String] - [ValidateSet("None","Basic","Windows")] - $UsageAuthenticationMode, - - [System.Management.Automation.PSCredential] - $UsageAuthenticationUser, - - [System.String] - $HealthCheckForwardingAddress, - - [System.String] - [ValidateSet("None","Basic","Windows")] - $HealthCheckAuthenticationMode, - - [System.Management.Automation.PSCredential] - $HealthCheckAuthenticationUser, - - [System.String] - $NotificationForwardingAddress, - - [System.String] - [ValidateSet("None","Basic","Windows")] - $NotificationAuthenticationMode, - - [System.Management.Automation.PSCredential] - $NotificationAuthenticationUser, - - [System.String] - $InstanceId, - - [System.String] - $InstanceDisplayName, - - [System.String] - $MaxQuotaUpdateBatchSize, - - [System.String] - $SubscriptionStatusPollingInterval, - - [System.String] - [ValidateSet("Standard","UsageProvider","CloudServiceProvider")] - $Type - ) - - $RP = Get-TargetResource @PSBoundParameters - - if($RP.InstanceId) - { - $result = $true - - $Vars = @( - "DisplayName", - "Enabled", - "PassthroughEnabled", - "AllowAnonymousAccess", - "AllowMultipleInstances", - "AdminForwardingAddress", - "AdminAuthenticationMode", - "TenantForwardingAddress", - "TenantAuthenticationMode", - "TenantSourceUriTemplate", - "TenantTargetUriTemplate", - "UsageForwardingAddress", - "UsageAuthenticationMode", - "HealthCheckForwardingAddress", - "HealthCheckAuthenticationMode", - "NotificationForwardingAddress", - "NotificationAuthenticationMode", - "InstanceId", - "InstanceDisplayName", - "MaxQuotaUpdateBatchSize", - "SubscriptionStatusPollingInterval", - "Type" - ) - foreach($Var in $Vars) - { - if($result -and !([String]::IsNullOrEmpty((Get-Variable -Name $Var).Value))) - { - if($Var.Contains("AuthenticationMode") -or ($Var -eq "Type") -or ($Var -eq "SubscriptionStatusPollingInterval")) - { - if($Var -eq "SubscriptionStatusPollingInterval") - { - if((New-TimeSpan -Seconds ((Get-Variable -Name $Var).Value)) -ne $RP.$Var) - { - Write-Verbose ("$Var is " + $RP.$Var + " and should be " + ((Get-Variable -Name $Var).Value)) - $result = $false - } - } - else - { - switch((Get-Variable -Name $Var).Value) - { - "None" - { - if(((Get-Variable -Name $Var).Value -ne $RP.$Var) -and (0 -ne $RP.$Var)) - { - Write-Verbose ("$Var is " + $RP.$Var + " and should be " + ((Get-Variable -Name $Var).Value)) - $result = $false - } - } - "Basic" - { - if(((Get-Variable -Name $Var).Value -ne $RP.$Var) -and (1 -ne $RP.$Var)) - { - Write-Verbose ("$Var is " + $RP.$Var + " and should be " + ((Get-Variable -Name $Var).Value)) - $result = $false - } - } - "Windows" - { - if(((Get-Variable -Name $Var).Value -ne $RP.$Var) -and (2 -ne $RP.$Var)) - { - Write-Verbose ("$Var is " + $RP.$Var + " and should be " + ((Get-Variable -Name $Var).Value)) - $result = $false - } - } - "Standard" - { - if(((Get-Variable -Name $Var).Value -ne $RP.$Var) -and (0 -ne $RP.$Var)) - { - Write-Verbose ("$Var is " + $RP.$Var + " and should be " + ((Get-Variable -Name $Var).Value)) - $result = $false - } - } - "UsageProvider" - { - if(((Get-Variable -Name $Var).Value -ne $RP.$Var) -and (1 -ne $RP.$Var)) - { - Write-Verbose ("$Var is " + $RP.$Var + " and should be " + ((Get-Variable -Name $Var).Value)) - $result = $false - } - } - "CloudServiceProvider" - { - if(((Get-Variable -Name $Var).Value -ne $RP.$Var) -and (2 -ne $RP.$Var)) - { - Write-Verbose ("$Var is " + $RP.$Var + " and should be " + ((Get-Variable -Name $Var).Value)) - $result = $false - } - } - } - } - } - else - { - if((Get-Variable -Name $Var).Value -ne $RP.$Var) - { - Write-Verbose ("$Var is " + $RP.$Var + " and should be " + ((Get-Variable -Name $Var).Value)) - $result = $false - } - } - } - } - - if($result) - { - $Vars = @( - "NotificationAuthenticationUser", - "AdminAuthenticationUser", - "TenantAuthenticationUser", - "UsageAuthenticationUser", - "HealthCheckAuthenticationUser" - ) - foreach($Var in $Vars) - { - if($result -and !([String]::IsNullOrEmpty((Get-Variable -Name $Var).Value))) - { - if((Get-Variable -Name $Var).Value.UserName -ne $RP.($Var + "name")) - { - Write-Verbose ("$Var is " + $RP.($Var + "name") + " and should be " + ((Get-Variable -Name $Var).Value.UserName)) - $result = $false - } - } - } - } - } - else - { - Write-Verbose "Resource provider $name does not exist" - $result = $false - } - - $result -} - - -Export-ModuleMember -Function *-TargetResource \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackResourceProvider/MSFT_xAzurePackResourceProvider.schema.mof b/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackResourceProvider/MSFT_xAzurePackResourceProvider.schema.mof deleted file mode 100644 index 0fb31ab0..00000000 --- a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackResourceProvider/MSFT_xAzurePackResourceProvider.schema.mof +++ /dev/null @@ -1,40 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xAzurePackResourceProvider")] -class MSFT_xAzurePackResourceProvider : OMI_BaseResource -{ - [Required, Description("URL of the authentication site.")] String AuthenticationSite; - [Required, Description("Specifies the URI of the Windows Azure Pack administrator API.")] String AdminUri; - [Key, Description("Specifies the name of a resource provider.")] String Name; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String AzurePackAdminCredential; - [Write, Description("Specifies the display name of a resource provider.")] String DisplayName; - [Write, Description("Enables the resource provider.")] Boolean Enabled; - [Write, Description("Indicates whether the resource provider supports API pass-through.")] Boolean PassthroughEnabled; - [Write, Description("Specifies the URI of the Windows Azure Pack administrator API.")] Boolean AllowAnonymousAccess; - [Write, Description("Indicates that the cmdlet allows multiple instances of the resource provider.")] Boolean AllowMultipleInstances; - [Write, Description("Specifies an administrative forwarding address for a resource provider.")] String AdminForwardingAddress; - [Write, Description("Specifies the administrative authentication mode for a resource provider."), ValueMap{"None","Basic","Windows"}, Values{"None","Basic","Windows"}] String AdminAuthenticationMode; - [Write, EmbeddedInstance("MSFT_Credential"), Description("Specifies, as a PSCredential object, an administrative user name and password to connect to a resource provider.")] String AdminAuthenticationUser; - [Read, Description("Output for the administrative user name.")] String AdminAuthenticationUsername; - [Write, Description("Specifies the tenant forwarding address of a resource provider.")] String TenantForwardingAddress; - [Write, Description("Specifies the tenant authentication mode for a resource provider."), ValueMap{"None","Basic","Windows"}, Values{"None","Basic","Windows"}] String TenantAuthenticationMode; - [Write, EmbeddedInstance("MSFT_Credential"), Description("Specifies, as a PSCredential object, a tenant user name and password to connect to a resource provider.")] String TenantAuthenticationUser; - [Read, Description("Output for the tenant user name.")] String TenantAuthenticationUsername; - [Write, Description("Specifies the tenant source URI template of a resource provider.")] String TenantSourceUriTemplate; - [Write, Description("Specifies the tenant target URI template of a resource provider.")] String TenantTargetUriTemplate; - [Write, Description("Specifies the tenant forwarding address of a resource provider.")] String UsageForwardingAddress; - [Write, Description("Specifies the usage authentication mode for a resource provider."), ValueMap{"None","Basic","Windows"}, Values{"None","Basic","Windows"}] String UsageAuthenticationMode; - [Write, EmbeddedInstance("MSFT_Credential"), Description("Specifies, as a PSCredential object, a usage user name and password to connect to a resource provider.")] String UsageAuthenticationUser; - [Read, Description("Output for the usage user name.")] String UsageAuthenticationUsername; - [Write, Description("Specifies the health check forwarding address for a resource provider.")] String HealthCheckForwardingAddress; - [Write, Description("Specifies the health check authentication mode for a resource provider."), ValueMap{"None","Basic","Windows"}, Values{"None","Basic","Windows"}] String HealthCheckAuthenticationMode; - [Write, EmbeddedInstance("MSFT_Credential"), Description("Specifies, as a PSCredential object, a health check user name and password to connect to a resource provider.")] String HealthCheckAuthenticationUser; - [Read, Description("Output for the health check user name.")] String HealthCheckAuthenticationUsername; - [Write, Description("Specifies the notification forwarding address of a resource provider.")] String NotificationForwardingAddress; - [Write, Description("Specifies the notification authentication mode for a resource provider."), ValueMap{"None","Basic","Windows"}, Values{"None","Basic","Windows"}] String NotificationAuthenticationMode; - [Write, EmbeddedInstance("MSFT_Credential"), Description("Specifies, as a PSCredential object, a notification user name and password to connect to a resource provider.")] String NotificationAuthenticationUser; - [Read, Description("Output for the notification user name.")] String NotificationAuthenticationUsername; - [Write, Description("Specifies an ID for an instance of a resource provider.")] String InstanceId; - [Write, Description("Specifies a display name for an instance of a resource provider.")] String InstanceDisplayName; - [Write, Description("Specifies the number of subscriptions that can be updated in a single request.")] String MaxQuotaUpdateBatchSize; - [Write, Description("Specifies the time interval at which the management service polls the resource provider for subscription status updates.")] String SubscriptionStatusPollingInterval; - [Write, Description("Specifies the type of the resource provider."), ValueMap{"Standard","UsageProvider","CloudServiceProvider"}, Values{"Standard","UsageProvider","CloudServiceProvider"}] String Type; -}; diff --git a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackSetup/MSFT_xAzurePackSetup.psm1 b/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackSetup/MSFT_xAzurePackSetup.psm1 deleted file mode 100644 index ea4fe069..00000000 --- a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackSetup/MSFT_xAzurePackSetup.psm1 +++ /dev/null @@ -1,670 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet('Admin API','Tenant API','Tenant Public API','SQL Server Extension','MySQL Extension','Admin Site','Admin Authentication Site','Tenant Site','Tenant Authentication Site')] - [System.String] - $Role, - - [parameter(Mandatory = $true)] - [ValidateSet('Install','Initialize')] - [System.String] - $Action, - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = '\WindowsAzurePack2013', - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.Management.Automation.PSCredential] - $Passphrase = $SetupCredential, - - [System.String] - $SQLServer = 'localhost', - - [System.String] - $SQLInstance = 'MSSQLSERVER', - - [System.Management.Automation.PSCredential] - $dbUser, - - [System.String] - $EnableCeip = 'No' - ) - - $returnValue = @{ - Role = $Role - Action = $Action - SourcePath = $SourcePath - SourceFolder = $SourceFolder - SQLServer = $SQLServer - SQLInstance = $SQLInstance - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet('Admin API','Tenant API','Tenant Public API','SQL Server Extension','MySQL Extension','Admin Site','Admin Authentication Site','Tenant Site','Tenant Authentication Site')] - [System.String] - $Role, - - [parameter(Mandatory = $true)] - [ValidateSet('Install','Initialize')] - [System.String] - $Action, - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = '\WindowsAzurePack2013', - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.Management.Automation.PSCredential] - $Passphrase = $SetupCredential, - - [System.String] - $SQLServer = 'localhost', - - [System.String] - $SQLInstance = 'MSSQLSERVER', - - [System.Management.Automation.PSCredential] - $dbUser, - - [System.String] - $EnableCeip = 'No' - ) - - switch($Action) - { - 'Install' - { - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = 'msiexec.exe' - $Path = ResolvePath $Path - Write-Verbose "Path: $Path" - - $TempPath = [IO.Path]::GetTempPath().TrimEnd('\') - $Products = (Get-WmiObject -Class Win32_Product).IdentifyingNumber - $Components = GetWAPComponents -Role $Role - foreach($Component in $Components) - { - $ComponentInstalled = $true - if($ComponentInstalled) - { - $IdentifyingNumbers = GetWAPComponentIdentifyingNumbers -Component $Component - $ComponentInstalled = GetComponentInstalled -Products $Products -IdentifyingNumbers $IdentifyingNumbers - if(!$ComponentInstalled) - { - $MSIPath = ResolvePath "$SourcePath\$SourceFolder\$Component.msi" - Copy-Item -Path $MSIPath -Destination $TempPath - $Arguments = "/q /lv $TempPath\$Component.log /i $TempPath\$Component.msi ALLUSERS=2" - Write-Verbose "Arguments: $Arguments" - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - Remove-Item -Path "$TempPath\$Component.msi" - $ComponentInstalled = GetComponentInstalled -Products $Products -IdentifyingNumbers $IdentifyingNumbers - } - } - } - } - 'Initialize' - { - if($EnableCeip -ne 'Yes') - { - $EnableCeip = 'No' - } - $Features = GetWAPFeatures -Role $Role - $ConfigStorePassphrase = $Passphrase.GetNetworkCredential().Password - foreach($Feature in $Features) - { - Write-Verbose "Feature: $Feature" - if (!(Get-MgmtSvcFeature -Name $Feature).Configured) - { - if($SQLInstance -eq 'MSSQLSERVER') - { - $Server = $SQLServer - } - else - { - $Server = "$SQLServer\$SQLInstance" - } - Initialize-MgmtSvcFeature -Name $Feature -Passphrase "$ConfigStorePassphrase" -EnableCeip $EnableCeip -Server $Server -UserName $dbUser.UserName -Password $dbUser.GetNetworkCredential().Password - } - } - } - } - - if((Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction SilentlyContinue) -ne $null) - { - $global:DSCMachineStatus = 1 - } - else - { - if(!(Test-TargetResource @PSBoundParameters)) - { - throw 'Set-TargetResouce failed' - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet('Admin API','Tenant API','Tenant Public API','SQL Server Extension','MySQL Extension','Admin Site','Admin Authentication Site','Tenant Site','Tenant Authentication Site')] - [System.String] - $Role, - - [parameter(Mandatory = $true)] - [ValidateSet('Install','Initialize')] - [System.String] - $Action, - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = '\WindowsAzurePack2013', - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.Management.Automation.PSCredential] - $Passphrase = $SetupCredential, - - [System.String] - $SQLServer = 'localhost', - - [System.String] - $SQLInstance = 'MSSQLSERVER', - - [System.Management.Automation.PSCredential] - $dbUser, - - [System.String] - $EnableCeip = 'No' - ) - - switch($Action) - { - 'Install' - { - $result = $true - $Products = (Get-WmiObject -Class Win32_Product).IdentifyingNumber - $Components = GetWAPComponents -Role $Role - foreach($Component in $Components) - { - if($result) - { - $IdentifyingNumbers = GetWAPComponentIdentifyingNumbers -Component $Component - $ComponentInstalled = GetComponentInstalled -Products $Products -IdentifyingNumbers $IdentifyingNumbers - if(!$ComponentInstalled) - { - $result = $false - } - } - } - } - 'Initialize' - { - $result = $true - $Features = GetWAPFeatures -Role $Role - foreach($Feature in $Features) - { - if($result) - { - Write-Verbose "Feature: $Feature" -verbose - $result = (Get-MgmtSvcFeature -Name $Feature).Configured - Write-Verbose "Configured: $result" -Verbose - } - } - } - } - - $result -} - - -function GetWAPComponents -{ - param - ( - [String] - $Role - ) - - switch($Role) - { - 'Admin API' - { - return @( - 'MgmtSvc-PowerShellAPI', - 'MgmtSvc-WebAppGallery', - 'MgmtSvc-Monitoring', - 'MgmtSvc-Usage', - 'MgmtSvc-AdminAPI', - 'MgmtSvc-ConfigSite' - ) - } - 'Tenant API' - { - return @( - 'MgmtSvc-PowerShellAPI', - 'MgmtSvc-TenantAPI', - 'MgmtSvc-ConfigSite' - ) - } - 'Tenant Public API' - { - return @( - 'MgmtSvc-PowerShellAPI', - 'MgmtSvc-TenantPublicAPI', - 'MgmtSvc-ConfigSite' - ) - } - 'SQL Server Extension' - { - return @( - 'MgmtSvc-PowerShellAPI', - 'MgmtSvc-SQLServer', - 'MgmtSvc-ConfigSite' - ) - } - 'MySQL Extension' - { - return @( - 'MgmtSvc-PowerShellAPI', - 'MgmtSvc-MySQL', - 'MgmtSvc-ConfigSite' - ) - } - 'Admin Site' - { - return @( - 'MgmtSvc-PowerShellAPI', - 'MgmtSvc-AdminSite', - 'MgmtSvc-ConfigSite' - ) - } - 'Admin Authentication Site' - { - return @( - 'MgmtSvc-PowerShellAPI', - 'MgmtSvc-WindowsAuthSite', - 'MgmtSvc-ConfigSite' - ) - } - 'Tenant Site' - { - return @( - 'MgmtSvc-PowerShellAPI', - 'MgmtSvc-TenantSite', - 'MgmtSvc-ConfigSite' - ) - } - 'Tenant Authentication Site' - { - return @( - 'MgmtSvc-PowerShellAPI', - 'MgmtSvc-AuthSite', - 'MgmtSvc-ConfigSite' - ) - } - } -} - - -function GetWAPComponentIdentifyingNumbers -{ - param - ( - [String] - $Component - ) - - switch($Component) - { - 'MgmtSvc-PowerShellAPI' - { - return @( - '{09AAA3CE-A0B6-4B5D-AE51-43DF1C3EB192}', - '{C5C97081-9A6A-4FCA-BA98-F01DE7B6BAEE}', - '{43A453AF-BE0A-4C4B-9C6C-57FFE693AFCC}', - '{48EF1B2C-1DA3-4887-8D3D-263C2047DE20}', - '{16487D2C-F851-450D-AB52-1163D8057D9A}', - '{9AF631FF-CE1F-481F-9B05-D88D5BDE6CF3}', #Update Rollup 6 - '{AD89FCD8-868C-4FDA-910F-9F888BF687FD}', #Update Rollup 7 - '{567EE4F8-35CA-4111-A2F9-9AFE911959B1}', #Update Rollup 8 - '{F525AB73-3F65-4AF7-AE32-C6E732B9A7E0}' #Update Rollup 9.1 - ) - } - 'MgmtSvc-WebAppGallery' - { - return @( - '{AC29E1CB-2F30-475E-ADD8-B039DDA7DFE4}', - '{F78A7C67-DAD0-4219-9563-DA69021F3425}', - '{D001C96D-B5D8-47F1-A57D-0993949E086D}', - '{A72F27D3-C1DD-4BF3-B837-45B2457E9206}', - '{E33E0D2B-D289-4300-B431-CA51052E1507}', - '{C4E6A478-2DCD-47C2-BE94-CD29FBD3C7E8}', #Update Rollup 6 - '{7B69C3FB-1789-4F6F-9737-61785B3A190C}', #Update Rollup 7 - '{95BD63BE-88C5-4F43-9CC8-31A1903C3D75}', #Update Rollup 8 - '{9C9D2734-902A-4F41-8C56-AC21E216745F}' #Update Rollup 9.1 - - ) - } - 'MgmtSvc-Monitoring' - { - return @( - '{0A45C3A5-2265-4C0F-968D-EA0AE95B6D3D}', - '{7AFA9F9B-B776-409B-A073-43A5F2005782}', - '{48EA248F-E9FA-48CF-9B11-65F73631BE80}', - '{08F8076E-46A3-4A26-93EC-7EE48FD693FF}', - '{EAB7C0A2-17C0-46DC-8DD5-3167FCCA3471}', - '{53C0310D-097D-46CA-A766-C3E87931ECF4}', #Update Rollup 6 - '{7759F5CB-0DE5-4AE9-BF29-EF6F2D1D214A}', #Update Rollup 7 - '{BD31C44E-1E91-4C61-8955-CC4386EB31CB}', #Update Rollup 8 - '{649E3CE3-4F85-4F49-B850-1A4B00BDF944}' #Update Rollup 9.1 - - ) - } - 'MgmtSvc-Usage' - { - return @( - '{6939C616-4589-4115-B0F9-A43164936EC4}', - '{E214B687-AF1B-40FE-B1CF-702395ED138D}', - '{49DAC463-8658-4163-8ED6-4C1AE2A7AE99}', - '{09B94677-ED88-4633-AD07-DF16115E3E13}', - '{9DCEAFF9-7499-47D4-98E8-EF6877E7D5CF}', - '{3F4E4AED-6955-4690-B7EF-FFBBDB7CB471}', #Update Rollup 6 - '{CD94B684-BF21-45B7-BBB2-A05478AB05F7}', #Update Rollup 7 - '{D8AFA6F8-7CF5-4C6F-BE6E-5EBEB9A5EE3D}', #Update Rollup 8 - '{946B0B96-13AF-404E-98F0-D38BF3828E8E}' #Update Rollup 9.1 - - ) - } - 'MgmtSvc-AdminAPI' - { - return @( - '{D52908B7-6A78-4BC7-8451-490C7BF88395}', - '{E82D6570-E501-4CF1-B1C7-ECB62AB90694}', - '{5002046F-645B-4316-BC6A-86AB1DF1C3FB}', - '{5C578A41-64DD-43DC-9772-8A2EDDCA8B3A}', - '{7A18CA60-6275-463A-A28F-15B3DECE9167}', - '{1675BB48-4805-4FF0-B973-64D75292C410}', - '{1675BB48-4805-4FF0-B973-64D75292C410}', #Update Rollup 6 - '{E00081AD-CE78-4F2A-9CD2-8833C15F490B}', #Update Rollup 7 - '{7CA2FE56-D216-431D-AD9B-96F2EFA0060F}', #Update Rollup 8 - '{DAB5A87F-32D0-4E96-B7FD-47DBDC6EAEED}' #Update Rollup 9.1 - - - ) - } - 'MgmtSvc-TenantAPI' - { - return @( - '{763C3BFE-6A60-4D5D-AF6C-F167A5CF47DF}', - '{F1E998DF-0018-49E6-947F-AF7A00CE2404}', - '{A3DD0B04-3A0D-4211-9CE4-ED71544D2ED6}', - '{5F2419BD-ED3D-4645-AC00-9D85F428465F}', - '{57AAAF80-FED1-4574-B8A5-D67C3347B7F3}', - '{A0F1EB25-B0A7-4774-8556-D42CC9C274C0}', #Update Rollup 6 - '{66D13937-01D3-413B-89EA-9C38FC8EEDE6}', #Update Rollup 7 - '{5FB651B3-5247-450F-B459-903602EF90AB}', #Update Rollup 8 - '{CF41308C-9BC3-46C1-8B39-135D00E491E8}' #Update Rollup 9.1 - - ) - } - 'MgmtSvc-TenantPublicAPI' - { - return @( - '{4D0102B7-74CD-4563-B475-45C7EC09E18C}', - '{9BD35794-7F08-4979-A741-91E681A42DC9}', - '{5D0CA554-B0B3-4C30-894A-D08D8543FE90}', - '{0A29836B-8F77-4A99-8D50-925D7DA3E04B}', - '{91EEF0F7-E4CA-4162-AF4F-D4D67CBFADAE}', - '{6F996F63-3332-4356-9CCF-5E22653796BC}', #Update Rollup 6 - '{E741DC5B-3DBF-4882-A029-6E089FA76B71}', #Update Rollup 7 - '{90C2701B-6410-4C6D-B595-30D19DD8BD48}', #Update Rollup 8 - '{7442368E-A20A-4B4A-9304-104B7191CD82}' #Update Rollup 9.1 - - ) - } - 'MgmtSvc-SQLServer' - { - return @( - '{F16B58A7-106E-4859-929C-519F45C2423F}', - '{FF4E91C5-9B03-427A-89B0-2FB44567CA36}', - '{84E267A7-461F-497B-B6D5-42A8DFADD3B4}', - '{298A4DBF-9D1D-4DEF-95C6-34DD48EAD26F}', - '{71C55DAA-0C85-4186-A1E9-5064C5CC686D}', - '{59360F27-E25F-467C-BA58-FC3D9ADA9C1B}', #Update Rollup 6 - '{6D0C8DE3-B386-4D13-B5C7-4B513CF272AF}', #Update Rollup 7 - '{24AB07BB-750C-4CC4-959A-69D68F03B672}', #Update Rollup 8 - '{FFE3B7AD-BED4-4F9C-98CC-D75E64B770EE}' #Update Rollup 9.1 - - ) - } - 'MgmtSvc-MySQL' - { - return @( - '{A559BC28-C942-4A1F-AEE3-8D6143EBF635}', - '{AF2FFFAE-987A-4026-9500-768FA17F16CA}', - '{90F5754A-2836-46FA-9B36-7014337B26A1}', - '{1206E655-0171-4835-9A6B-91B4C2E385B8}', - '{ED962FFD-1998-4F03-9165-B0B0E27AF0C5}', - '{5593C408-CEC3-4E60-88DF-672DC14311AB}', #Update Rollup 6 - '{7D37EA03-C7CE-406A-8B15-5D722F7F0F7D}', #Update Rollup 7 - '{6FF0D21B-C7CC-4881-9463-4CFFFA5143F9}', #Update Rollup 8 - '{038DEB00-87C2-483D-B303-3732A6CE6280}' #Update Rollup 9.1 - - ) - } - 'MgmtSvc-AdminSite' - { - return @( - '{2F31F894-4AC3-4A7F-9F18-D50A9B327123}', - '{D96559C2-0C06-42D1-9D5A-27437F814191}', - '{B349A781-813C-44E7-8A10-9055F375B3D5}', - '{7424D4D1-A1E0-4147-88A1-739E0B51C01A}', - '{265EE8DB-FE0B-4532-AAD3-6787D6B4D91B}', - '{78E55590-A6C7-4D4A-A7FA-640242F19EF3}', #Update Rollup 6 - '{7C76D912-7CC3-4644-BC36-E2715D14C7FC}', #Update Rollup 7 - '{713C3A58-010A-4DA4-8FA3-E1012C844F6C}', #Update Rollup 8 - '{8DFE1C24-EF33-4DE8-A8F2-192C7E1FECE0}' #Update Rollup 9.1 - - ) - } - 'MgmtSvc-WindowsAuthSite' - { - return @( - '{85EF5065-777C-410C-857A-041B386D476C}', - '{40A83017-F95A-49A5-AE0D-C106298E5898}', - '{F47FFCA3-AE68-48FB-9A9E-AC4469D675E2}', - '{FEC02487-C505-4227-A9D4-8B160BB156FE}', - '{9381CC0F-A0B5-4DDE-8141-6E725B95919C}', - '{7BD73C40-4276-4C9D-9C00-B2B591FF87A8}', #Update Rollup 6 - '{9B74B70D-9D6F-4531-AC74-0A10329B0E45}', #Update Rollup 7 - '{C36C12EA-71F5-46EB-8BAB-F32C53161B2E}', #Update Rollup 8 - '{42A86301-91AA-4CF2-95AB-C305052ECEFD}' #Update Rollup 9.1 - - ) - } - 'MgmtSvc-TenantSite' - { - return @( - '{CAF63E4C-6859-4EF1-B531-1FFED6DEB9B5}', - '{8FC72370-FBF0-40BB-9398-E45FB9263C51}', - '{57382D8D-7C0D-4D8B-85DB-261363B70C3E}', - '{A72F27D3-C1DD-4BF3-B837-45B2457E9206}', - '{348B0395-AD2A-45A6-BFFA-BB502F59ABC0}', - '{7756023B-9368-46CC-AB7D-304655031F75}', #Update Rollup 6 - '{E71A1932-C6DC-4522-B93A-131A3C7AB347}', #Update Rollup 7 - '{FC2F4900-7DEF-4314-B838-1A47B4DB09DD}', #Update Rollup 8 - '{78E38778-C952-4B53-96D8-A65DB9683269}' #Update Rollup 9.1 - - ) - } - 'MgmtSvc-AuthSite' - { - return @( - '{D3AE936A-C357-4B66-870F-415FF6248424}', - '{20141108-1261-4285-9818-9FA493FFD0D3}', - '{A3B5F452-94AC-4138-BE55-5F78F91AFC0B}', - '{9FA55C04-8F44-4047-9482-C359ACA91D19}', - '{6D4ABA37-50DB-4FA5-B833-D152370A4121}', - '{5A064009-39C2-4694-A92F-FFF1473CC978}', #Update Rollup 6 - '{C45CE895-84AD-4B9C-AEE3-F3112381FB17}', #Update Rollup 7 - '{9AD3BB15-3471-4A0F-A0CD-BB1408F598B8}', #Update Rollup 8 - '{B2D82054-D973-4447-BDDF-AE7D11E86585}' #Update Rollup 9.1 - - ) - } - 'MgmtSvc-ConfigSite' - { - return @( - '{32C316B4-3E22-4E4F-BF4C-BF76D38459D4}', - '{4950C7DA-C2FC-4FC5-8E47-76B742E8E630}', - '{E78CDA83-404D-4C32-A09D-B58F2C1C7BF2}', - '{91D917FC-E486-4040-8764-A2AF83776142}', - '{72BA84F9-BAA5-4451-AFA5-89841CFDA170}', - '{282F6FAA-E6F1-4910-8A64-F20453944ACA}', #Update Rollup 6 - '{FA421F0C-4E2C-4721-B190-0AED841503D3}', #Update Rollup 7 - '{A3A5D3F7-C18E-4BE9-B792-9699B3B334DE}', #Update Rollup 8 - '{53DA6693-27E7-438C-A4C1-BE2FCA1811DC}' #Update Rollup 9.1 - ) - } - } -} - - -function GetComponentInstalled -{ - param - ( - [String[]] - $Products, - - [String[]] - $IdentifyingNumbers - ) - - $ComponentInstalled = $false - foreach($IdentifyingNumber in $IdentifyingNumbers) - { - if(!$ComponentInstalled) - { - if($Products | Where-Object {$_ -eq $IdentifyingNumber}) - { - $ComponentInstalled = $true - } - } - } - - return $ComponentInstalled -} - - -function GetWAPFeatures -{ - param - ( - [String] - $Role - ) - - switch($Role) - { - 'Admin API' - { - return @( - 'AdminAPI', - 'WebAppGallery', - 'Monitoring', - 'UsageCollector', - 'UsageService' - ) - } - 'Tenant API' - { - return @( - 'TenantAPI' - ) - } - 'Tenant Public API' - { - return @( - 'TenantPublicAPI' - ) - } - 'SQL Server Extension' - { - return @( - 'SQLServer' - ) - } - 'MySQL Extension' - { - return @( - 'MySQL' - ) - } - 'Admin Site' - { - return @( - 'AdminSite' - ) - } - 'Admin Authentication Site' - { - return @( - 'WindowsAuthSite' - ) - } - 'Tenant Site' - { - return @( - 'TenantSite' - ) - } - 'Tenant Authentication Site' - { - return @( - 'AuthSite' - ) - } - } -} - - -Export-ModuleMember -Function *-TargetResource \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackSetup/MSFT_xAzurePackSetup.schema.mof b/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackSetup/MSFT_xAzurePackSetup.schema.mof deleted file mode 100644 index 175c4f69..00000000 --- a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackSetup/MSFT_xAzurePackSetup.schema.mof +++ /dev/null @@ -1,14 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xAzurePackSetup")] -class MSFT_xAzurePackSetup : OMI_BaseResource -{ - [Key, Description("The Azure Pack role to be installed or initialized."), ValueMap{"Admin API","Tenant API","Tenant Public API","SQL Server Extension","MySQL Extension","Admin Site","Admin Authentication Site","Tenant Site","Tenant Authentication Site"}, Values{"Admin API","Tenant API","Tenant Public API","SQL Server Extension","MySQL Extension","Admin Site","Admin Authentication Site","Tenant Site","Tenant Authentication Site"}] String Role; - [Key, Description("Install or initialize."), ValueMap{"Install","Initialize"}, Values{"Install","Initialize"}] String Action; - [Required, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; - [Write, EmbeddedInstance("MSFT_Credential"), Description("Passphrase for the Azure Pack deployment.")] String Passphrase; - [Write, Description("Database server for the Azure Pack databases.")] String SQLServer; - [Write, Description("Database instance for the Azure Pack databases.")] String SQLInstance; - [Write, EmbeddedInstance("MSFT_Credential"), Description("SQL user to be used to create the database if the SetupCredential cannot be used.")] String dbUser; - [Write, Description("Enable Customer Experience Improvement Program.")] String EnableCeip; -}; diff --git a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackUpdate/MSFT_xAzurePackUpdate.psm1 b/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackUpdate/MSFT_xAzurePackUpdate.psm1 deleted file mode 100644 index edec3dc8..00000000 --- a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackUpdate/MSFT_xAzurePackUpdate.psm1 +++ /dev/null @@ -1,372 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet('Admin API','Tenant API','Tenant Public API','SQL Server Extension','MySQL Extension','Admin Site','Admin Authentication Site','Tenant Site','Tenant Authentication Site')] - [System.String] - $Role, - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = '\WindowsAzurePack2013\Updates', - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $returnValue = @{ - Role = $Role - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet('Admin API','Tenant API','Tenant Public API','SQL Server Extension','MySQL Extension','Admin Site','Admin Authentication Site','Tenant Site','Tenant Authentication Site')] - [System.String] - $Role, - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = '\WindowsAzurePack2013\Updates', - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = 'msiexec.exe' - $Path = ResolvePath $Path - Write-Verbose "Path: $Path" - - $TempPath = [IO.Path]::GetTempPath().TrimEnd('\') - $Products = (Get-WmiObject -Class Win32_Product).IdentifyingNumber - $Components = GetWAPComponents -Role $Role - foreach($Component in $Components) - { - $ComponentInstalled = $true - if($ComponentInstalled) - { - $IdentifyingNumbers = GetWAPComponentIdentifyingNumbers -Component $Component - $ComponentInstalled = GetComponentInstalled -Products $Products -IdentifyingNumbers $IdentifyingNumbers - if(!$ComponentInstalled) - { - $MSIPath = ResolvePath "$SourcePath\$SourceFolder\$Component.msi" - Copy-Item -Path $MSIPath -Destination $TempPath - $Arguments = "/q /lv $TempPath\$Component.log /i $TempPath\$Component.msi ALLUSERS=2" - Write-Verbose "Arguments: $Arguments" - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - Remove-Item -Path "$TempPath\$Component.msi" - $ComponentInstalled = GetComponentInstalled -Products $Products -IdentifyingNumbers $IdentifyingNumbers - } - } - } - - if((Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction SilentlyContinue) -ne $null) - { - $global:DSCMachineStatus = 1 - } - else - { - if(!(Test-TargetResource @PSBoundParameters)) - { - throw 'Set-TargetResouce failed' - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet('Admin API','Tenant API','Tenant Public API','SQL Server Extension','MySQL Extension','Admin Site','Admin Authentication Site','Tenant Site','Tenant Authentication Site')] - [System.String] - $Role, - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = '\WindowsAzurePack2013\Updates', - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $result = $true - $Products = (Get-WmiObject -Class Win32_Product).IdentifyingNumber - $Components = GetWAPComponents -Role $Role - foreach($Component in $Components) - { - if($result) - { - $IdentifyingNumbers = GetWAPComponentIdentifyingNumbers -Component $Component - $ComponentInstalled = GetComponentInstalled -Products $Products -IdentifyingNumbers $IdentifyingNumbers - if(!$ComponentInstalled) - { - $result = $false - } - } - } - - $result -} - - -function GetWAPComponents -{ - param - ( - [String] - $Role - ) - - switch($Role) - { - 'Admin API' - { - return @( - 'MgmtSvc-PowerShellAPI', - 'MgmtSvc-WebAppGallery', - 'MgmtSvc-Monitoring', - 'MgmtSvc-Usage', - 'MgmtSvc-AdminAPI', - 'MgmtSvc-ConfigSite' - ) - } - 'Tenant API' - { - return @( - 'MgmtSvc-PowerShellAPI', - 'MgmtSvc-TenantAPI', - 'MgmtSvc-ConfigSite' - ) - } - 'Tenant Public API' - { - return @( - 'MgmtSvc-PowerShellAPI', - 'MgmtSvc-TenantPublicAPI', - 'MgmtSvc-ConfigSite' - ) - } - 'SQL Server Extension' - { - return @( - 'MgmtSvc-PowerShellAPI', - 'MgmtSvc-SQLServer', - 'MgmtSvc-ConfigSite' - ) - } - 'MySQL Extension' - { - return @( - 'MgmtSvc-PowerShellAPI', - 'MgmtSvc-MySQL', - 'MgmtSvc-ConfigSite' - ) - } - 'Admin Site' - { - return @( - 'MgmtSvc-PowerShellAPI', - 'MgmtSvc-AdminSite', - 'MgmtSvc-ConfigSite' - ) - } - 'Admin Authentication Site' - { - return @( - 'MgmtSvc-PowerShellAPI', - 'MgmtSvc-WindowsAuthSite', - 'MgmtSvc-ConfigSite' - ) - } - 'Tenant Site' - { - return @( - 'MgmtSvc-PowerShellAPI', - 'MgmtSvc-TenantSite', - 'MgmtSvc-ConfigSite' - ) - } - 'Tenant Authentication Site' - { - return @( - 'MgmtSvc-PowerShellAPI', - 'MgmtSvc-AuthSite', - 'MgmtSvc-ConfigSite' - ) - } - } -} - - -function GetWAPComponentIdentifyingNumbers -{ - param - ( - [String] - $Component - ) - - switch($Component) - { - 'MgmtSvc-PowerShellAPI' - { - return @( - '{F525AB73-3F65-4AF7-AE32-C6E732B9A7E0}' - - ) - } - 'MgmtSvc-WebAppGallery' - { - return @( - '{9C9D2734-902A-4F41-8C56-AC21E216745F}' - - ) - } - 'MgmtSvc-Monitoring' - { - return @( - '{649E3CE3-4F85-4F49-B850-1A4B00BDF944}' - - ) - } - 'MgmtSvc-Usage' - { - return @( - '{946B0B96-13AF-404E-98F0-D38BF3828E8E}' - - ) - } - 'MgmtSvc-AdminAPI' - { - return @( - '{DAB5A87F-32D0-4E96-B7FD-47DBDC6EAEED}' - - ) - } - 'MgmtSvc-TenantAPI' - { - return @( - '{CF41308C-9BC3-46C1-8B39-135D00E491E8}' - - ) - } - 'MgmtSvc-TenantPublicAPI' - { - return @( - '{7442368E-A20A-4B4A-9304-104B7191CD82}' - - ) - } - 'MgmtSvc-SQLServer' - { - return @( - '{FFE3B7AD-BED4-4F9C-98CC-D75E64B770EE}' - - ) - } - 'MgmtSvc-MySQL' - { - return @( - '{038DEB00-87C2-483D-B303-3732A6CE6280}' - - ) - } - 'MgmtSvc-AdminSite' - { - return @( - '{8DFE1C24-EF33-4DE8-A8F2-192C7E1FECE0}' - - ) - } - 'MgmtSvc-WindowsAuthSite' - { - return @( - '{42A86301-91AA-4CF2-95AB-C305052ECEFD}' - - ) - } - 'MgmtSvc-TenantSite' - { - return @( - '{78E38778-C952-4B53-96D8-A65DB9683269}' - - ) - } - 'MgmtSvc-AuthSite' - { - return @( - '{B2D82054-D973-4447-BDDF-AE7D11E86585}' - - ) - } - 'MgmtSvc-ConfigSite' - { - return @( - '{53DA6693-27E7-438C-A4C1-BE2FCA1811DC}' - - ) - } - } -} - - -function GetComponentInstalled -{ - param - ( - [String[]] - $Products, - - [String[]] - $IdentifyingNumbers - ) - - $ComponentInstalled = $false - foreach($IdentifyingNumber in $IdentifyingNumbers) - { - if(!$ComponentInstalled) - { - if($Products | Where-Object {$_ -eq $IdentifyingNumber}) - { - $ComponentInstalled = $true - } - } - } - - return $ComponentInstalled -} - - -Export-ModuleMember -Function *-TargetResource \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackUpdate/MSFT_xAzurePackUpdate.schema.mof b/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackUpdate/MSFT_xAzurePackUpdate.schema.mof deleted file mode 100644 index e8425ec0..00000000 --- a/lib/puppet_x/dsc_resources/xAzurePack/DSCResources/MSFT_xAzurePackUpdate/MSFT_xAzurePackUpdate.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xAzurePackUpdate")] -class MSFT_xAzurePackUpdate : OMI_BaseResource -{ - [Key, Description("The Azure Pack role to be updated."), ValueMap{"Admin API","Tenant API","Tenant Public API","SQL Server Extension","MySQL Extension","Admin Site","Admin Authentication Site","Tenant Site","Tenant Authentication Site"}, Values{"Admin API","Tenant API","Tenant Public API","SQL Server Extension","MySQL Extension","Admin Site","Admin Authentication Site","Tenant Site","Tenant Authentication Site"}] String Role; - [Required, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; -}; diff --git a/lib/puppet_x/dsc_resources/xAzurePack/LICENSE b/lib/puppet_x/dsc_resources/xAzurePack/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xAzurePack/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xAzurePack/en-US/xPDT.strings.psd1 b/lib/puppet_x/dsc_resources/xAzurePack/en-US/xPDT.strings.psd1 deleted file mode 100644 index e3145612..00000000 --- a/lib/puppet_x/dsc_resources/xAzurePack/en-US/xPDT.strings.psd1 +++ /dev/null @@ -1,10 +0,0 @@ -ConvertFrom-StringData @' -FileNotFound=File not found in the environment path -AbsolutePathOrFileName=Absolute path or file name expected -InvalidArgument=Invalid argument: '{0}' with value: '{1}' -InvalidArgumentAndMessage={0} {1} -ErrorStarting=Failure starting process matching path '{0}'. Message: {1} -FailureWaitingForProcessesToStart=Failed to wait for processes to start -ProcessStarted=Process matching path '{0}' started in process ID {1} -ProcessAlreadyStarted=Process matching path '{0}' already started in process ID {1} -'@ diff --git a/lib/puppet_x/dsc_resources/xAzurePack/xAzurePack.psd1 b/lib/puppet_x/dsc_resources/xAzurePack/xAzurePack.psd1 deleted file mode 100644 index 03041675..00000000 --- a/lib/puppet_x/dsc_resources/xAzurePack/xAzurePack.psd1 +++ /dev/null @@ -1,55 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '1.4.0.0' - -# ID used to uniquely identify this module -GUID = 'bd5e20f0-d520-48ec-84c7-c43c66007db7' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module with DSC Resources for deployment and configuration of Microsoft Windows Azure Pack.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xAzurePack/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xAzurePack' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - # ReleaseNotes = '' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} diff --git a/lib/puppet_x/dsc_resources/xAzurePack/xPDT.psm1 b/lib/puppet_x/dsc_resources/xAzurePack/xPDT.psm1 deleted file mode 100644 index c90beaa1..00000000 --- a/lib/puppet_x/dsc_resources/xAzurePack/xPDT.psm1 +++ /dev/null @@ -1,708 +0,0 @@ -data LocalizedData -{ - ConvertFrom-StringData @' - -FileNotFound=File not found in the environment path -AbsolutePathOrFileName=Absolute path or file name expected -InvalidArgument=Invalid argument: '{0}' with value: '{1}' -InvalidArgumentAndMessage={0} {1} -ErrorStarting=Failure starting process matching path '{0}'. Message: {1} -FailureWaitingForProcessesToStart=Failed to wait for processes to start -ProcessStarted=Process matching path '{0}' started in process ID {1} -ProcessAlreadyStarted=Process matching path '{0}' already started in process ID {1} -'@ -} - -Import-LocalizedData LocalizedData -filename xPDT.strings.psd1 - -function ThrowInvalidArgumentError -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $errorId, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $errorMessage - ) - - $errorCategory=[System.Management.Automation.ErrorCategory]::InvalidArgument - $exception = New-Object System.ArgumentException $errorMessage; - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - throw $errorRecord -} - -function ResolvePath -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Path - ) - - $Path = [Environment]::ExpandEnvironmentVariables($Path) - if(IsRootedPath $Path) - { - if(!(Test-Path $Path -PathType Leaf)) - { - ThrowInvalidArgumentError "CannotFindRootedPath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) - } - return $Path - } - if([string]::IsNullOrEmpty($env:Path)) - { - ThrowInvalidArgumentError "EmptyEnvironmentPath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) - } - if((Split-Path $Path -Leaf) -ne $Path) - { - ThrowInvalidArgumentError "NotAbsolutePathOrFileName" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.AbsolutePathOrFileName) - } - foreach($rawSegment in $env:Path.Split(";")) - { - $segment = [Environment]::ExpandEnvironmentVariables($rawSegment) - $segmentRooted = $false - try - { - $segmentRooted=[IO.Path]::IsPathRooted($segment) - } - catch {} - if(!$segmentRooted) - { - continue - } - $candidate = join-path $segment $Path - if(Test-Path $candidate -PathType Leaf) - { - return $candidate - } - } - ThrowInvalidArgumentError "CannotFindRelativePath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) -} - -function IsRootedPath -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path - ) - - try - { - return [IO.Path]::IsPathRooted($Path) - } - catch - { - ThrowInvalidArgumentError "CannotGetIsPathRooted" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $_.Exception.Message) - } -} - -function ExtractArguments -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - $functionBoundParameters, - - [parameter(Mandatory = $true)] - [string[]] - $argumentNames, - - [string[]] - $newArgumentNames - ) - - $returnValue=@{} - - for($i=0;$i -lt $argumentNames.Count;$i++) - { - $argumentName = $argumentNames[$i] - - if($newArgumentNames -eq $null) - { - $newArgumentName = $argumentName - } - else - { - $newArgumentName = $newArgumentNames[$i] - } - - if($functionBoundParameters.ContainsKey($argumentName)) - { - $null = $returnValue.Add($newArgumentName,$functionBoundParameters[$argumentName]) - } - } - - return $returnValue -} - -function CallPInvoke -{ - $script:ProgramSource = @" -using System; -using System.Collections.Generic; -using System.Text; -using System.Security; -using System.Runtime.InteropServices; -using System.Diagnostics; -using System.Security.Principal; -using System.ComponentModel; -using System.IO; - -namespace Source -{ - [SuppressUnmanagedCodeSecurity] - public static class NativeMethods - { - //The following structs and enums are used by the various Win32 API's that are used in the code below - - [StructLayout(LayoutKind.Sequential)] - public struct STARTUPINFO - { - public Int32 cb; - public string lpReserved; - public string lpDesktop; - public string lpTitle; - public Int32 dwX; - public Int32 dwY; - public Int32 dwXSize; - public Int32 dwXCountChars; - public Int32 dwYCountChars; - public Int32 dwFillAttribute; - public Int32 dwFlags; - public Int16 wShowWindow; - public Int16 cbReserved2; - public IntPtr lpReserved2; - public IntPtr hStdInput; - public IntPtr hStdOutput; - public IntPtr hStdError; - } - - [StructLayout(LayoutKind.Sequential)] - public struct PROCESS_INFORMATION - { - public IntPtr hProcess; - public IntPtr hThread; - public Int32 dwProcessID; - public Int32 dwThreadID; - } - - [Flags] - public enum LogonType - { - LOGON32_LOGON_INTERACTIVE = 2, - LOGON32_LOGON_NETWORK = 3, - LOGON32_LOGON_BATCH = 4, - LOGON32_LOGON_SERVICE = 5, - LOGON32_LOGON_UNLOCK = 7, - LOGON32_LOGON_NETWORK_CLEARTEXT = 8, - LOGON32_LOGON_NEW_CREDENTIALS = 9 - } - - [Flags] - public enum LogonProvider - { - LOGON32_PROVIDER_DEFAULT = 0, - LOGON32_PROVIDER_WINNT35, - LOGON32_PROVIDER_WINNT40, - LOGON32_PROVIDER_WINNT50 - } - [StructLayout(LayoutKind.Sequential)] - public struct SECURITY_ATTRIBUTES - { - public Int32 Length; - public IntPtr lpSecurityDescriptor; - public bool bInheritHandle; - } - - public enum SECURITY_IMPERSONATION_LEVEL - { - SecurityAnonymous, - SecurityIdentification, - SecurityImpersonation, - SecurityDelegation - } - - public enum TOKEN_TYPE - { - TokenPrimary = 1, - TokenImpersonation - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - internal struct TokPriv1Luid - { - public int Count; - public long Luid; - public int Attr; - } - - public const int GENERIC_ALL_ACCESS = 0x10000000; - public const int CREATE_NO_WINDOW = 0x08000000; - internal const int SE_PRIVILEGE_ENABLED = 0x00000002; - internal const int TOKEN_QUERY = 0x00000008; - internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; - internal const string SE_INCRASE_QUOTA = "SeIncreaseQuotaPrivilege"; - - [DllImport("kernel32.dll", - EntryPoint = "CloseHandle", SetLastError = true, - CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] - public static extern bool CloseHandle(IntPtr handle); - - [DllImport("advapi32.dll", - EntryPoint = "CreateProcessAsUser", SetLastError = true, - CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] - public static extern bool CreateProcessAsUser( - IntPtr hToken, - string lpApplicationName, - string lpCommandLine, - ref SECURITY_ATTRIBUTES lpProcessAttributes, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - bool bInheritHandle, - Int32 dwCreationFlags, - IntPtr lpEnvrionment, - string lpCurrentDirectory, - ref STARTUPINFO lpStartupInfo, - ref PROCESS_INFORMATION lpProcessInformation - ); - - [DllImport("advapi32.dll", EntryPoint = "DuplicateTokenEx")] - public static extern bool DuplicateTokenEx( - IntPtr hExistingToken, - Int32 dwDesiredAccess, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - Int32 ImpersonationLevel, - Int32 dwTokenType, - ref IntPtr phNewToken - ); - - [DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)] - public static extern Boolean LogonUser( - String lpszUserName, - String lpszDomain, - String lpszPassword, - LogonType dwLogonType, - LogonProvider dwLogonProvider, - out IntPtr phToken - ); - - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern bool AdjustTokenPrivileges( - IntPtr htok, - bool disall, - ref TokPriv1Luid newst, - int len, - IntPtr prev, - IntPtr relen - ); - - [DllImport("kernel32.dll", ExactSpelling = true)] - internal static extern IntPtr GetCurrentProcess(); - - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern bool OpenProcessToken( - IntPtr h, - int acc, - ref IntPtr phtok - ); - - [DllImport("advapi32.dll", SetLastError = true)] - internal static extern bool LookupPrivilegeValue( - string host, - string name, - ref long pluid - ); - - public static void CreateProcessAsUser(string strCommand, string strDomain, string strName, string strPassword) - { - var hToken = IntPtr.Zero; - var hDupedToken = IntPtr.Zero; - TokPriv1Luid tp; - var pi = new PROCESS_INFORMATION(); - var sa = new SECURITY_ATTRIBUTES(); - sa.Length = Marshal.SizeOf(sa); - Boolean bResult = false; - try - { - bResult = LogonUser( - strName, - strDomain, - strPassword, - LogonType.LOGON32_LOGON_BATCH, - LogonProvider.LOGON32_PROVIDER_DEFAULT, - out hToken - ); - if (!bResult) - { - throw new Win32Exception("The user could not be logged on. Ensure that the user has an existing profile on the machine and that correct credentials are provided. Logon error #" + Marshal.GetLastWin32Error().ToString()); - } - IntPtr hproc = GetCurrentProcess(); - IntPtr htok = IntPtr.Zero; - bResult = OpenProcessToken( - hproc, - TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, - ref htok - ); - if(!bResult) - { - throw new Win32Exception("Open process token error #" + Marshal.GetLastWin32Error().ToString()); - } - tp.Count = 1; - tp.Luid = 0; - tp.Attr = SE_PRIVILEGE_ENABLED; - bResult = LookupPrivilegeValue( - null, - SE_INCRASE_QUOTA, - ref tp.Luid - ); - if(!bResult) - { - throw new Win32Exception("Error in looking up privilege of the process. This should not happen if DSC is running as LocalSystem Lookup privilege error #" + Marshal.GetLastWin32Error().ToString()); - } - bResult = AdjustTokenPrivileges( - htok, - false, - ref tp, - 0, - IntPtr.Zero, - IntPtr.Zero - ); - if(!bResult) - { - throw new Win32Exception("Token elevation error #" + Marshal.GetLastWin32Error().ToString()); - } - - bResult = DuplicateTokenEx( - hToken, - GENERIC_ALL_ACCESS, - ref sa, - (int)SECURITY_IMPERSONATION_LEVEL.SecurityIdentification, - (int)TOKEN_TYPE.TokenPrimary, - ref hDupedToken - ); - if(!bResult) - { - throw new Win32Exception("Duplicate Token error #" + Marshal.GetLastWin32Error().ToString()); - } - var si = new STARTUPINFO(); - si.cb = Marshal.SizeOf(si); - si.lpDesktop = ""; - bResult = CreateProcessAsUser( - hDupedToken, - null, - strCommand, - ref sa, - ref sa, - false, - 0, - IntPtr.Zero, - null, - ref si, - ref pi - ); - if(!bResult) - { - throw new Win32Exception("The process could not be created. Create process as user error #" + Marshal.GetLastWin32Error().ToString()); - } - } - finally - { - if (pi.hThread != IntPtr.Zero) - { - CloseHandle(pi.hThread); - } - if (pi.hProcess != IntPtr.Zero) - { - CloseHandle(pi.hProcess); - } - if (hDupedToken != IntPtr.Zero) - { - CloseHandle(hDupedToken); - } - } - } - } -} - -"@ - Add-Type -TypeDefinition $ProgramSource -ReferencedAssemblies "System.ServiceProcess" -} - -function GetWin32Process -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential - ) - - $fileName = [io.path]::GetFileNameWithoutExtension($Path) - $GetProcesses = @(Get-Process -Name $fileName -ErrorAction SilentlyContinue) - $Processes = foreach($process in $GetProcesses) - { - if($Process.Path -ieq $Path) - { - try - { - [wmi]"Win32_Process.Handle='$($Process.Id)'" - } - catch - { - } - } - } - if($PSBoundParameters.ContainsKey('Credential')) - { - $Processes = $Processes | Where-Object {(GetWin32ProcessOwner $_) -eq $Credential.UserName} - } - if($Arguments -eq $null) {$Arguments = ""} - $Processes = $Processes | Where-Object {(GetWin32ProcessArgumentsFromCommandLine $_.CommandLine) -eq $Arguments} - - return $Processes -} - -function GetWin32ProcessOwner -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNull()] - $Process - ) - - try - { - $Owner = $Process.GetOwner() - } - catch - {} - if($owner.Domain -ne $null) - { - return $Owner.Domain + "\" + $Owner.User - } - else - { - return $Owner.User - } -} - -function GetWin32ProcessArgumentsFromCommandLine -{ - param - ( - [String] - $commandLine - ) - - if($commandLine -eq $null) - { - return "" - } - $commandLine=$commandLine.Trim() - if($commandLine.Length -eq 0) - { - return "" - } - if($commandLine[0] -eq '"') - { - $charToLookfor=[char]'"' - } - else - { - $charToLookfor=[char]' ' - } - $endOfCommand=$commandLine.IndexOf($charToLookfor ,1) - if($endOfCommand -eq -1) - { - return "" - } - return $commandLine.Substring($endOfCommand+1).Trim() -} - -function StartWin32Process -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential, - - [Switch] - $AsTask - ) - - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - $Processes = @(GetWin32Process @getArguments) - if ($processes.Count -eq 0) - { - if($PSBoundParameters.ContainsKey("Credential")) - { - if($AsTask) - { - $ActionArguments = ExtractArguments $PSBoundParameters ` - ("Path", "Arguments") ` - ("Execute", "Argument") - if([string]::IsNullOrEmpty($Arguments)) - { - $null = $ActionArguments.Remove("Argument") - } - $TaskGuid = [guid]::NewGuid().ToString() - $Action = New-ScheduledTaskAction @ActionArguments - $null = Register-ScheduledTask -TaskName "xPDT $TaskGuid" -Action $Action -User $Credential.UserName -Password $Credential.GetNetworkCredential().Password -RunLevel Highest - $err = Start-ScheduledTask -TaskName "xPDT $TaskGuid" - } - else - { - try - { - CallPInvoke - [Source.NativeMethods]::CreateProcessAsUser(("$Path " + $Arguments),$Credential.GetNetworkCredential().Domain,$Credential.GetNetworkCredential().UserName,$Credential.GetNetworkCredential().Password) - } - catch - { - $exception = New-Object System.ArgumentException $_ - $errorCategory = [System.Management.Automation.ErrorCategory]::OperationStopped - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, "Win32Exception", $errorCategory, $null - $err = $errorRecord - } - } - } - else - { - $StartArguments = ExtractArguments $PSBoundParameters ` - ("Path", "Arguments", "Credential") ` - ("FilePath", "ArgumentList", "Credential") - if([string]::IsNullOrEmpty($Arguments)) - { - $null = $StartArguments.Remove("ArgumentList") - } - $err = Start-Process @StartArguments - } - if($err -ne $null) - { - throw $err - } - if (!(WaitForWin32ProcessStart @GetArguments)) - { - ThrowInvalidArgumentError "FailureWaitingForProcessesToStart" ($LocalizedData.ErrorStarting -f $Path,$LocalizedData.FailureWaitingForProcessesToStart) - } - } - else - { - return ($LocalizedData.ProcessAlreadyStarted -f $Path,$Processes.ProcessId) - } - $Processes = @(GetWin32Process @getArguments) - return ($LocalizedData.ProcessStarted -f $Path,$Processes.ProcessId) -} - -function WaitForWin32ProcessStart -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential - ) - - $start = [DateTime]::Now - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - do - { - $value = @(GetWin32Process @GetArguments).Count -ge 1 - } while(!$value -and ([DateTime]::Now - $start).TotalMilliseconds -lt 60000) - - return $value -} - -function WaitForWin32ProcessEnd -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential - ) - - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - While (WaitForWin32ProcessStart @GetArguments) - { - Start-Sleep 1 - } - Get-ScheduledTask | Where-Object {($_.TaskName.Length -ge 4) -and ($_.TaskName.Substring(0,4) -eq "xPDT") -and ($_.Actions.Execute -eq $Path) -and ($_.Actions.Arguments -eq $Arguments)} | Where-Object {$_ -ne $null} | Unregister-ScheduledTask -Confirm:$false -} - -function NetUse -{ - param - ( - [parameter(Mandatory)] - [string] - $SourcePath, - - [parameter(Mandatory)] - [PSCredential] - $Credential, - - [string] - $Ensure = "Present" - ) - - if(($SourcePath.Length -ge 2) -and ($SourcePath.Substring(0,2) -eq "\\")) - { - - if ($Ensure -eq "Absent") - { - $cmd = "net.exe use $SourcePath /del" - } - else - { - $cmd = "net.exe use $SourcePath $($Credential.GetNetworkCredential().Password) /user:$($Credential.GetNetworkCredential().Domain)\$($Credential.GetNetworkCredential().UserName)" - } - Invoke-Expression $cmd - } -} - -Export-ModuleMember ResolvePath,StartWin32Process,WaitForWin32ProcessEnd,NetUse diff --git a/lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLAutoBitlocker/MSFT_xBLAutoBitlocker.psm1 b/lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLAutoBitlocker/MSFT_xBLAutoBitlocker.psm1 deleted file mode 100644 index 74a1d6b2..00000000 --- a/lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLAutoBitlocker/MSFT_xBLAutoBitlocker.psm1 +++ /dev/null @@ -1,398 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Fixed","Removable")] - [System.String] - $DriveType, - - [System.Int32] - $MinDiskCapacityGB, - - [ValidateSet("PasswordProtector","RecoveryPasswordProtector","StartupKeyProtector","TpmProtector")] - [parameter(Mandatory = $true)] - [System.String] - $PrimaryProtector, - - [System.String] - $AdAccountOrGroup, - - [System.Boolean] - $AdAccountOrGroupProtector, - - [System.Boolean] - $AutoUnlock = $false, - - [ValidateSet("Aes128","Aes256")] - [System.String] - $EncryptionMethod, - - [System.Boolean] - $HardwareEncryption, - - [System.Management.Automation.PSCredential] - $Password, - - [System.Boolean] - $PasswordProtector, - - [System.Management.Automation.PSCredential] - $Pin, - - [System.String] - $RecoveryKeyPath, - - [System.Boolean] - $RecoveryKeyProtector, - - [System.Boolean] - $RecoveryPasswordProtector, - - [System.Boolean] - $Service, - - [System.Boolean] - $SkipHardwareTest, - - [System.String] - $StartupKeyPath, - - [System.Boolean] - $StartupKeyProtector, - - [System.Boolean] - $TpmProtector, - - [System.Boolean] - $UsedSpaceOnly - ) - - #Load helper module Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xBitlockerCommon.psm1" -Verbose:0 - - CheckForPreReqs - - $returnValue = @{ - DriveType = $DriveType - } - - $returnValue -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Fixed","Removable")] - [System.String] - $DriveType, - - [System.Int32] - $MinDiskCapacityGB, - - [ValidateSet("PasswordProtector","RecoveryPasswordProtector","StartupKeyProtector","TpmProtector")] - [parameter(Mandatory = $true)] - [System.String] - $PrimaryProtector, - - [System.String] - $AdAccountOrGroup, - - [System.Boolean] - $AdAccountOrGroupProtector, - - [System.Boolean] - $AutoUnlock = $false, - - [ValidateSet("Aes128","Aes256")] - [System.String] - $EncryptionMethod, - - [System.Boolean] - $HardwareEncryption, - - [System.Management.Automation.PSCredential] - $Password, - - [System.Boolean] - $PasswordProtector, - - [System.Management.Automation.PSCredential] - $Pin, - - [System.String] - $RecoveryKeyPath, - - [System.Boolean] - $RecoveryKeyProtector, - - [System.Boolean] - $RecoveryPasswordProtector, - - [System.Boolean] - $Service, - - [System.Boolean] - $SkipHardwareTest, - - [System.String] - $StartupKeyPath, - - [System.Boolean] - $StartupKeyProtector, - - [System.Boolean] - $TpmProtector, - - [System.Boolean] - $UsedSpaceOnly - ) - - #Load helper module Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xBitlockerCommon.psm1" -Verbose:0 - - CheckForPreReqs - - $autoBlVols = GetAutoBitlockerStatus @PSBoundParameters - - if ($autoBlVols -eq $null) - { - throw "No Auto Bitlocker volumes were found" - } - else - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "DriveType","MinDiskCapacityGB" - AddParameters -PSBoundParametersIn $PSBoundParameters -ParamsToAdd @{"MountPoint" = ""} - - #Loop through each potential AutoBitlocker volume, see whether they are enabled for Bitlocker, and if not, enable it - foreach ($key in $autoBlVols.Keys) - { - $PSBoundParameters["MountPoint"] = $key - - $testResult = TestBitlocker @PSBoundParameters - - if ($testResult -eq $false) - { - EnableBitlocker @PSBoundParameters -VerbosePreference $VerbosePreference - } - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Fixed","Removable")] - [System.String] - $DriveType, - - [System.Int32] - $MinDiskCapacityGB, - - [ValidateSet("PasswordProtector","RecoveryPasswordProtector","StartupKeyProtector","TpmProtector")] - [parameter(Mandatory = $true)] - [System.String] - $PrimaryProtector, - - [System.String] - $AdAccountOrGroup, - - [System.Boolean] - $AdAccountOrGroupProtector, - - [System.Boolean] - $AutoUnlock = $false, - - [ValidateSet("Aes128","Aes256")] - [System.String] - $EncryptionMethod, - - [System.Boolean] - $HardwareEncryption, - - [System.Management.Automation.PSCredential] - $Password, - - [System.Boolean] - $PasswordProtector, - - [System.Management.Automation.PSCredential] - $Pin, - - [System.String] - $RecoveryKeyPath, - - [System.Boolean] - $RecoveryKeyProtector, - - [System.Boolean] - $RecoveryPasswordProtector, - - [System.Boolean] - $Service, - - [System.Boolean] - $SkipHardwareTest, - - [System.String] - $StartupKeyPath, - - [System.Boolean] - $StartupKeyProtector, - - [System.Boolean] - $TpmProtector, - - [System.Boolean] - $UsedSpaceOnly - ) - - #Load helper module Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xBitlockerCommon.psm1" -Verbose:0 - - CheckForPreReqs - - $autoBlVols = GetAutoBitlockerStatus @PSBoundParameters - - if ($autoBlVols -eq $null) - { - return $false - } - else - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "DriveType","MinDiskCapacityGB" - AddParameters -PSBoundParametersIn $PSBoundParameters -ParamsToAdd @{"MountPoint" = ""} - - #Check whether any potential AutoBitlocker volume is not currently enabled for Bitlocker, or doesn't have the correct settings - foreach ($key in $autoBlVols.Keys) - { - $PSBoundParameters["MountPoint"] = $key - - $testResult = TestBitlocker @PSBoundParameters -VerbosePreference $VerbosePreference - - if ($testResult -eq $false) - { - return $testResult - } - } - } - - return $true -} - -function GetAutoBitlockerStatus -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Fixed","Removable")] - [System.String] - $DriveType, - - [System.Int32] - $MinDiskCapacityGB, - - [ValidateSet("PasswordProtector","RecoveryPasswordProtector","StartupKeyProtector","TpmProtector")] - [parameter(Mandatory = $true)] - [System.String] - $PrimaryProtector, - - [System.String] - $AdAccountOrGroup, - - [System.Boolean] - $AdAccountOrGroupProtector, - - [System.Boolean] - $AutoUnlock = $false, - - [ValidateSet("Aes128","Aes256")] - [System.String] - $EncryptionMethod, - - [System.Boolean] - $HardwareEncryption, - - [System.Management.Automation.PSCredential] - $Password, - - [System.Boolean] - $PasswordProtector, - - [System.Management.Automation.PSCredential] - $Pin, - - [System.String] - $RecoveryKeyPath, - - [System.Boolean] - $RecoveryKeyProtector, - - [System.Boolean] - $RecoveryPasswordProtector, - - [System.Boolean] - $Service, - - [System.Boolean] - $SkipHardwareTest, - - [System.String] - $StartupKeyPath, - - [System.Boolean] - $StartupKeyProtector, - - [System.Boolean] - $TpmProtector, - - [System.Boolean] - $UsedSpaceOnly - ) - - #First get all Bitlocker Volumes of type Data - $allBlvs = Get-BitLockerVolume | where {$_.VolumeType -eq "Data"} - - #Filter on size if it was specified - if ($PSBoundParameters.ContainsKey("MinDiskCapacityGB")) - { - $allBlvs = $allBlvs | where {$_.CapacityGB -ge $MinDiskCapacityGB} - } - - #Now find disks of the appropriate drive type, and add them to the collection - if ($allBlvs -ne $null) - { - [Hashtable]$returnValue = @{} - - foreach ($blv in $allBlvs) - { - $vol = $null - $vol = Get-Volume -Path $blv.MountPoint -ErrorAction SilentlyContinue | where {$_.DriveType -like $DriveType} - - if ($vol -ne $null) - { - [Hashtable]$props = @{ - VolumeStatus = $blv.VolumeStatus - KeyProtectors = $blv.KeyProtector - EncryptionMethod = $blv.EncryptionMethod - } - - $returnValue.Add($blv.MountPoint, $props) - } - } - } - - $returnValue -} - -Export-ModuleMember -Function *-TargetResource - - diff --git a/lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLAutoBitlocker/MSFT_xBLAutoBitlocker.schema.mof b/lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLAutoBitlocker/MSFT_xBLAutoBitlocker.schema.mof deleted file mode 100644 index 419b8398..00000000 --- a/lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLAutoBitlocker/MSFT_xBLAutoBitlocker.schema.mof +++ /dev/null @@ -1,32 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xBLAutoBitlocker")] -class MSFT_xBLAutoBitlocker : OMI_BaseResource -{ - //Used to automatically enable Bitlocker on drives of type Fixed or Removable. Does not work on Operating System drives. - - [Key, ValueMap{"Fixed","Removable"}, Values{"Fixed","Removable"}] String DriveType; //The type of volume, as reported by Get-Volume, to auto apply Bitlocker to - [Write] Sint32 MinDiskCapacityGB; //If specified, only disks this size or greater will auto apply Bitlocker - [Required, ValueMap{"PasswordProtector","RecoveryPasswordProtector","StartupKeyProtector","TpmProtector"}, Values{"PasswordProtector","RecoveryPasswordProtector","StartupKeyProtector","TpmProtector"}] String PrimaryProtector; - [Write] Boolean AutoUnlock; //Whether volumes should be enabled for auto unlock using Enable-BitlockerAutoUnlock - - //Remaing properties correspond directly to Enable-Bitlocker parameters - //http://technet.microsoft.com/en-us/library/jj649837.aspx - [Write] String AdAccountOrGroup; - [Write] Boolean AdAccountOrGroupProtector; - [Write, ValueMap{"Aes128","Aes256"}, Values{"Aes128","Aes256"}] String EncryptionMethod; - [Write] Boolean HardwareEncryption; - [Write, EmbeddedInstance("MSFT_Credential")] String Password; //NOTE: Username doesn't matter for the credential. Just put the Password in the Password field - [Write] Boolean PasswordProtector; - [Write, EmbeddedInstance("MSFT_Credential")] String Pin; //NOTE: Username doesn't matter for the credential. Just put the Pin in the Password field - [Write] String RecoveryKeyPath; - [Write] Boolean RecoveryKeyProtector; - [Write] Boolean RecoveryPasswordProtector; - [Write] Boolean Service; - [Write] Boolean SkipHardwareTest; - [Write] String StartupKeyPath; - [Write] Boolean StartupKeyProtector; - [Write] Boolean TpmProtector; - [Write] Boolean UsedSpaceOnly; -}; - - diff --git a/lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLBitlocker/MSFT_xBLBitlocker.psm1 b/lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLBitlocker/MSFT_xBLBitlocker.psm1 deleted file mode 100644 index 295a4b5b..00000000 --- a/lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLBitlocker/MSFT_xBLBitlocker.psm1 +++ /dev/null @@ -1,243 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $MountPoint, - - [ValidateSet("PasswordProtector","RecoveryPasswordProtector","StartupKeyProtector","TpmProtector")] - [parameter(Mandatory = $true)] - [System.String] - $PrimaryProtector, - - [System.String] - $AdAccountOrGroup, - - [System.Boolean] - $AdAccountOrGroupProtector, - - [System.Boolean] - $AllowImmediateReboot = $false, - - [System.Boolean] - $AutoUnlock = $false, - - [ValidateSet("Aes128","Aes256")] - [System.String] - $EncryptionMethod, - - [System.Boolean] - $HardwareEncryption, - - [System.Management.Automation.PSCredential] - $Password, - - [System.Boolean] - $PasswordProtector, - - [System.Management.Automation.PSCredential] - $Pin, - - [System.String] - $RecoveryKeyPath, - - [System.Boolean] - $RecoveryKeyProtector, - - [System.Boolean] - $RecoveryPasswordProtector, - - [System.Boolean] - $Service, - - [System.Boolean] - $SkipHardwareTest, - - [System.String] - $StartupKeyPath, - - [System.Boolean] - $StartupKeyProtector, - - [System.Boolean] - $TpmProtector, - - [System.Boolean] - $UsedSpaceOnly - ) - - #Load helper module Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xBitlockerCommon.psm1" -Verbose:0 - - CheckForPreReqs - - $returnValue = @{ - MountPoint = $MountPoint - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $MountPoint, - - [ValidateSet("PasswordProtector","RecoveryPasswordProtector","StartupKeyProtector","TpmProtector")] - [parameter(Mandatory = $true)] - [System.String] - $PrimaryProtector, - - [System.String] - $AdAccountOrGroup, - - [System.Boolean] - $AdAccountOrGroupProtector, - - [System.Boolean] - $AllowImmediateReboot = $false, - - [System.Boolean] - $AutoUnlock = $false, - - [ValidateSet("Aes128","Aes256")] - [System.String] - $EncryptionMethod, - - [System.Boolean] - $HardwareEncryption, - - [System.Management.Automation.PSCredential] - $Password, - - [System.Boolean] - $PasswordProtector, - - [System.Management.Automation.PSCredential] - $Pin, - - [System.String] - $RecoveryKeyPath, - - [System.Boolean] - $RecoveryKeyProtector, - - [System.Boolean] - $RecoveryPasswordProtector, - - [System.Boolean] - $Service, - - [System.Boolean] - $SkipHardwareTest, - - [System.String] - $StartupKeyPath, - - [System.Boolean] - $StartupKeyProtector, - - [System.Boolean] - $TpmProtector, - - [System.Boolean] - $UsedSpaceOnly - ) - - #Load helper module Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xBitlockerCommon.psm1" -Verbose:0 - - CheckForPreReqs - - EnableBitlocker @PSBoundParameters -VerbosePreference $VerbosePreference -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $MountPoint, - - [ValidateSet("PasswordProtector","RecoveryPasswordProtector","StartupKeyProtector","TpmProtector")] - [parameter(Mandatory = $true)] - [System.String] - $PrimaryProtector, - - [System.String] - $AdAccountOrGroup, - - [System.Boolean] - $AdAccountOrGroupProtector, - - [System.Boolean] - $AllowImmediateReboot = $false, - - [System.Boolean] - $AutoUnlock = $false, - - [ValidateSet("Aes128","Aes256")] - [System.String] - $EncryptionMethod, - - [System.Boolean] - $HardwareEncryption, - - [System.Management.Automation.PSCredential] - $Password, - - [System.Boolean] - $PasswordProtector, - - [System.Management.Automation.PSCredential] - $Pin, - - [System.String] - $RecoveryKeyPath, - - [System.Boolean] - $RecoveryKeyProtector, - - [System.Boolean] - $RecoveryPasswordProtector, - - [System.Boolean] - $Service, - - [System.Boolean] - $SkipHardwareTest, - - [System.String] - $StartupKeyPath, - - [System.Boolean] - $StartupKeyProtector, - - [System.Boolean] - $TpmProtector, - - [System.Boolean] - $UsedSpaceOnly - ) - - #Load helper module Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xBitlockerCommon.psm1" -Verbose:0 - - CheckForPreReqs - - $testResult = TestBitlocker @PSBoundParameters -VerbosePreference $VerbosePreference - - return $testResult -} - -Export-ModuleMember -Function *-TargetResource - - diff --git a/lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLBitlocker/MSFT_xBLBitlocker.schema.mof b/lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLBitlocker/MSFT_xBLBitlocker.schema.mof deleted file mode 100644 index 1ca2f91e..00000000 --- a/lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLBitlocker/MSFT_xBLBitlocker.schema.mof +++ /dev/null @@ -1,30 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xBLBitlocker")] -class MSFT_xBLBitlocker : OMI_BaseResource -{ - [Key] String MountPoint; //The MountPoint name as reported in Get-BitLockerVolume - [Required, ValueMap{"PasswordProtector","RecoveryPasswordProtector","StartupKeyProtector","TpmProtector"}, Values{"PasswordProtector","RecoveryPasswordProtector","StartupKeyProtector","TpmProtector"}] String PrimaryProtector; //The type of key protector that will be used as the primary key protector - [Write] Boolean AutoUnlock; //Whether volumes should be enabled for auto unlock using Enable-BitlockerAutoUnlock - [Write] Boolean AllowImmediateReboot; //Whether the computer can be immediately rebooted after enabling Bitlocker on an OS drive. Defaults to false. - - //Remaing properties correspond directly to Enable-Bitlocker parameters - //http://technet.microsoft.com/en-us/library/jj649837.aspx - [Write] String AdAccountOrGroup; - [Write] Boolean AdAccountOrGroupProtector; - [Write, ValueMap{"Aes128","Aes256"}, Values{"Aes128","Aes256"}] String EncryptionMethod; - [Write] Boolean HardwareEncryption; - [Write, EmbeddedInstance("MSFT_Credential")] String Password; //NOTE: Username doesn't matter for the credential. Just put the Password in the Password field - [Write] Boolean PasswordProtector; - [Write, EmbeddedInstance("MSFT_Credential")] String Pin; //NOTE: Username doesn't matter for the credential. Just put the Pin in the Password field - [Write] String RecoveryKeyPath; - [Write] Boolean RecoveryKeyProtector; - [Write] Boolean RecoveryPasswordProtector; - [Write] Boolean Service; - [Write] Boolean SkipHardwareTest; - [Write] String StartupKeyPath; - [Write] Boolean StartupKeyProtector; - [Write] Boolean TpmProtector; - [Write] Boolean UsedSpaceOnly; -}; - - diff --git a/lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLTpm/MSFT_xBLTpm.psm1 b/lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLTpm/MSFT_xBLTpm.psm1 deleted file mode 100644 index 4ba56274..00000000 --- a/lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLTpm/MSFT_xBLTpm.psm1 +++ /dev/null @@ -1,118 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity - ) - - #Load helper module Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xBitlockerCommon.psm1" -Verbose:0 - - CheckForPreReqs - - $tpm = Get-Tpm - - if ($tpm -ne $null) - { - $returnValue = @{ - Identity = $Identity - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [System.Boolean] - $AllowClear, - - [System.Boolean] - $AllowPhysicalPresence, - - [System.Boolean] - $AllowImmediateReboot = $false - ) - - #Load helper module Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xBitlockerCommon.psm1" -Verbose:0 - - CheckForPreReqs - - $PSBoundParameters.Remove("Identity") | Out-Null - $PSBoundParameters.Remove("AllowImmediateReboot") | Out-Null - - $tpm = Initialize-Tpm @PSBoundParameters - - if ($tpm -ne $null) - { - if ($tpm.RestartRequired -eq $true) - { - $global:DSCMachineStatus = 1 - - if ($AllowImmediateReboot -eq $true) - { - Write-Verbose "Forcing an immediate reboot of the computer in 30 seconds" - - Start-Sleep -Seconds 30 - Restart-Computer -Force - } - } - } - else - { - throw "Failed to initialize TPM" - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [System.Boolean] - $AllowClear, - - [System.Boolean] - $AllowPhysicalPresence, - - [System.Boolean] - $AllowImmediateReboot = $false - ) - - #Load helper module Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xBitlockerCommon.psm1" -Verbose:0 - - CheckForPreReqs - - $tpm = Get-Tpm - - if ($tpm -eq $null) - { - return $false - } - else - { - return $tpm.TpmReady - } -} - - -Export-ModuleMember -Function *-TargetResource - - diff --git a/lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLTpm/MSFT_xBLTpm.schema.mof b/lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLTpm/MSFT_xBLTpm.schema.mof deleted file mode 100644 index 383c7bc5..00000000 --- a/lib/puppet_x/dsc_resources/xBitlocker/DSCResources/MSFT_xBLTpm/MSFT_xBLTpm.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xBLTpm")] -class MSFT_xBLTpm : OMI_BaseResource -{ - [Key] String Identity; //Not actually used, so could be anything - [Write] Boolean AllowClear; //Indicates that the provisioning process clears the TPM, if necessary, to move the TPM closer to complying with Windows Server® 2012 standards - [Write] Boolean AllowPhysicalPresence; //Indicates that the provisioning process may send physical presence commands that require a user to be present in order to continue. - [Write] Boolean AllowImmediateReboot; //Whether the computer can rebooted immediately after initializing the TPM -}; - - diff --git a/lib/puppet_x/dsc_resources/xBitlocker/LICENSE b/lib/puppet_x/dsc_resources/xBitlocker/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xBitlocker/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xBitlocker/Misc/xBitlockerCommon.psm1 b/lib/puppet_x/dsc_resources/xBitlocker/Misc/xBitlockerCommon.psm1 deleted file mode 100644 index a89d9e03..00000000 --- a/lib/puppet_x/dsc_resources/xBitlocker/Misc/xBitlockerCommon.psm1 +++ /dev/null @@ -1,516 +0,0 @@ -#A common function used to enable Bitlocker on a disk. -function EnableBitlocker -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $MountPoint, - - [ValidateSet("PasswordProtector","RecoveryPasswordProtector","StartupKeyProtector","TpmProtector")] - [parameter(Mandatory = $true)] - [System.String] - $PrimaryProtector, - - [System.String] - $AdAccountOrGroup, - - [System.Boolean] - $AdAccountOrGroupProtector, - - [System.Boolean] - $AllowImmediateReboot = $false, - - [System.Boolean] - $AutoUnlock = $false, - - [ValidateSet("Aes128","Aes256")] - [System.String] - $EncryptionMethod, - - [System.Boolean] - $HardwareEncryption, - - [System.Management.Automation.PSCredential] - $Password, - - [System.Boolean] - $PasswordProtector, - - [System.Management.Automation.PSCredential] - $Pin, - - [System.String] - $RecoveryKeyPath, - - [System.Boolean] - $RecoveryKeyProtector, - - [System.Boolean] - $RecoveryPasswordProtector, - - [System.Boolean] - $Service, - - [System.Boolean] - $SkipHardwareTest, - - [System.String] - $StartupKeyPath, - - [System.Boolean] - $StartupKeyProtector, - - [System.Boolean] - $TpmProtector, - - [System.Boolean] - $UsedSpaceOnly, - - $VerbosePreference - ) - - Write-Verbose "Beginning processing of MountPoint: $($MountPoint)" - - $blv = Get-BitLockerVolume -MountPoint $MountPoint -ErrorAction SilentlyContinue - - if ($blv -ne $null) - { - if ($PSBoundParameters.ContainsKey("TpmProtector") -and $PrimaryProtector -ne "TpmProtector") - { - throw "If TpmProtector is used, it must be the PrimaryProtector." - } - - if ($PSBoundParameters.ContainsKey("Pin") -and !($PSBoundParameters.ContainsKey("TpmProtector"))) - { - throw "A TpmProtector must be used if Pin is used." - } - - if ($PSBoundParameters.ContainsKey("AdAccountOrGroupProtector") -and $PrimaryProtector -notlike "AdAccountOrGroupProtector" -and !(ContainsKeyProtector -Type "AdAccountOrGroup" -KeyProtectorCollection $blv.KeyProtector)) - { - Write-Verbose "Adding AdAccountOrGroupProtector" - Add-BitLockerKeyProtector -MountPoint $MountPoint -AdAccountOrGroupProtector -AdAccountOrGroup $AdAccountOrGroup - } - - if ($PSBoundParameters.ContainsKey("PasswordProtector") -and $PrimaryProtector -notlike "PasswordProtector" -and !(ContainsKeyProtector -Type "Password" -KeyProtectorCollection $blv.KeyProtector)) - { - Write-Verbose "Adding PasswordProtector" - Add-BitLockerKeyProtector -MountPoint $MountPoint -PasswordProtector -Password $Password.Password - } - - if ($PSBoundParameters.ContainsKey("RecoveryKeyProtector") -and $PrimaryProtector -notlike "RecoveryKeyProtector" -and !(ContainsKeyProtector -Type "ExternalKey" -KeyProtectorCollection $blv.KeyProtector)) - { - Write-Verbose "Adding RecoveryKeyProtector" - Add-BitLockerKeyProtector -MountPoint $MountPoint -RecoveryKeyProtector -RecoveryKeyPath $RecoveryKeyPath - } - - if ($PSBoundParameters.ContainsKey("RecoveryPasswordProtector") -and $PrimaryProtector -notlike "RecoveryPasswordProtector" -and !(ContainsKeyProtector -Type "RecoveryPassword" -KeyProtectorCollection $blv.KeyProtector)) - { - Write-Verbose "Adding RecoveryPasswordProtector" - Add-BitLockerKeyProtector -MountPoint $MountPoint -RecoveryPasswordProtector - } - - if ($PSBoundParameters.ContainsKey("StartupKeyProtector") -and $PrimaryProtector -notlike "TpmProtector" -and $PrimaryProtector -notlike "StartupKeyProtector" -and !(ContainsKeyProtector -Type "ExternalKey" -KeyProtectorCollection $blv.KeyProtector)) - { - Write-Verbose "Adding StartupKeyProtector" - Add-BitLockerKeyProtector -MountPoint $MountPoint -StartupKeyProtector -StartupKeyPath $StartupKeyPath - } - - if ($PSBoundParameters.ContainsKey("TpmProtector") -and $PrimaryProtector -notlike "TpmProtector" -and !(ContainsKeyProtector -Type "Tpm" -KeyProtectorCollection $blv.KeyProtector -StartsWith $true)) - { - Write-Verbose "Adding TpmProtector" - Add-BitLockerKeyProtector -MountPoint $MountPoint -TpmProtector $TpmProtector - } - - #Now enable Bitlocker with the primary key protector - if ($blv.VolumeStatus -eq "FullyDecrypted") - { - #First add non-key related parameters - $params = @{} - $params.Add("MountPoint", $MountPoint) - - if ($PSBoundParameters.ContainsKey("EncryptionMethod")) - { - $params.Add("EncryptionMethod", $EncryptionMethod) - } - - if ($PSBoundParameters.ContainsKey("HardwareEncryption")) - { - $params.Add("HardwareEncryption", $true) - } - - if ($PSBoundParameters.ContainsKey("Service")) - { - $params.Add("Service", $true) - } - - if ($PSBoundParameters.ContainsKey("SkipHardwareTest")) - { - $params.Add("SkipHardwareTest", $true) - } - - if ($PSBoundParameters.ContainsKey("UsedSpaceOnly")) - { - $params.Add("UsedSpaceOnly", $true) - } - - #Now add the primary protector - $handledTpmAlready = $false - - #Deal with a couple one off cases - if ($PSBoundParameters.ContainsKey("Pin")) - { - $handledTpmAlready = $true - - $params.Add("Pin", $Pin.Password) - - if ($PSBoundParameters.ContainsKey("StartupKeyProtector")) - { - $params.Add("TpmAndPinAndStartupKeyProtector", $true) - $params.Add("StartupKeyPath", $StartupKeyPath) - } - else - { - $params.Add("TpmAndPinProtector", $true) - } - } - - if ($PSBoundParameters.ContainsKey("StartupKeyProtector") -and $PrimaryProtector -like "TpmProtector" -and $handledTpmAlready -eq $false) - { - $handledTpmAlready = $true - - $params.Add("TpmAndStartupKeyProtector", $true) - $params.Add("StartupKeyPath", $StartupKeyPath) - } - - - #Now deal with the standard primary protectors - if ($PrimaryProtector -like "PasswordProtector") - { - $params.Add("PasswordProtector", $true) - $params.Add("Password", $Password.Password) - } - elseif ($PrimaryProtector -like "RecoveryPasswordProtector") - { - $params.Add("RecoveryPasswordProtector", $true) - } - elseif ($PrimaryProtector -like "StartupKeyProtector") - { - $params.Add("StartupKeyProtector", $true) - $params.Add("StartupKeyPath", $StartupKeyPath) - } - elseif ($PrimaryProtector -like "TpmProtector" -and $handledTpmAlready -eq $false) - { - $params.Add("TpmProtector", $true) - } - - #Run Enable-Bitlocker - Write-Verbose "Running Enable-Bitlocker" - - $newBlv = Enable-Bitlocker @params - - #Check if the Enable succeeded - if ($newBlv -ne $null) - { - if ($blv.VolumeType -eq "OperatingSystem") #Only initiate reboot if this is an OS drive - { - $global:DSCMachineStatus = 1 - - if ($AllowImmediateReboot -eq $true) - { - Write-Verbose "Forcing an immediate reboot of the computer in 30 seconds" - - Start-Sleep -Seconds 30 - Restart-Computer -Force - } - } - } - else - { - throw "Failed to successfully enable Bitlocker on MountPoint $($MountPoint)" - } - - #Finally, enable AutoUnlock if requested - if ($AutoUnlock -eq $true -and $blv.VolumeType -ne "OperatingSystem") - { - Enable-BitlockerAutoUnlock -MountPoint $MountPoint - } - } - } - else - { - throw "Unable to find Bitlocker Volume associated with Mount Point '$($MountPoint)'" - } -} - -#A common function used to test if Bitlocker is enabled on a disk with the appropriate settings -function TestBitlocker -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $MountPoint, - - [ValidateSet("PasswordProtector","RecoveryPasswordProtector","StartupKeyProtector","TpmProtector")] - [parameter(Mandatory = $true)] - [System.String] - $PrimaryProtector, - - [System.String] - $AdAccountOrGroup, - - [System.Boolean] - $AdAccountOrGroupProtector, - - [System.Boolean] - $AllowImmediateReboot = $false, - - [System.Boolean] - $AutoUnlock = $false, - - [ValidateSet("Aes128","Aes256")] - [System.String] - $EncryptionMethod, - - [System.Boolean] - $HardwareEncryption, - - [System.Management.Automation.PSCredential] - $Password, - - [System.Boolean] - $PasswordProtector, - - [System.Management.Automation.PSCredential] - $Pin, - - [System.String] - $RecoveryKeyPath, - - [System.Boolean] - $RecoveryKeyProtector, - - [System.Boolean] - $RecoveryPasswordProtector, - - [System.Boolean] - $Service, - - [System.Boolean] - $SkipHardwareTest, - - [System.String] - $StartupKeyPath, - - [System.Boolean] - $StartupKeyProtector, - - [System.Boolean] - $TpmProtector, - - [System.Boolean] - $UsedSpaceOnly, - - $VerbosePreference - ) - - $blv = Get-BitLockerVolume -MountPoint $MountPoint -ErrorAction SilentlyContinue - - if ($blv -eq $null) - { - Write-Verbose "Unable to locate MountPoint: $($MountPoint)" - return $false - } - elseif ($blv.KeyProtector -eq $null -or $blv.KeyProtector.Count -eq 0) - { - Write-Verbose "No key protectors on MountPoint: $($MountPoint)" - return $false - } - elseif ($AutoUnlock -eq $true -and $blv.AutoUnlockEnabled -ne $true) - { - Write-Verbose "AutoUnlock is not enabled for MountPoint: $($MountPoint)" - return $false - } - else - { - if ($PSBoundParameters.ContainsKey("AdAccountOrGroupProtector") -and !(ContainsKeyProtector -Type "AdAccountOrGroup" -KeyProtectorCollection $blv.KeyProtector)) - { - Write-Verbose "MountPoint '$($MountPoint) 'does not have AdAccountOrGroupProtector (AdAccountOrGroup)" - return $false - } - - if ($PSBoundParameters.ContainsKey("PasswordProtector") -and !(ContainsKeyProtector -Type "Password" -KeyProtectorCollection $blv.KeyProtector)) - { - Write-Verbose "MountPoint '$($MountPoint) 'does not have PasswordProtector (Password)" - return $false - } - - if ($PSBoundParameters.ContainsKey("Pin") -and !(ContainsKeyProtector -Type "TpmPin" -KeyProtectorCollection $blv.KeyProtector -StartsWith $true)) - { - Write-Verbose "MountPoint '$($MountPoint) 'does not have TpmPin assigned." - return $false - } - - if ($PSBoundParameters.ContainsKey("RecoveryKeyProtector") -and !(ContainsKeyProtector -Type "ExternalKey" -KeyProtectorCollection $blv.KeyProtector)) - { - Write-Verbose "MountPoint '$($MountPoint) 'does not have RecoveryKeyProtector (ExternalKey)" - return $false - } - - if ($PSBoundParameters.ContainsKey("RecoveryPasswordProtector") -and !(ContainsKeyProtector -Type "RecoveryPassword" -KeyProtectorCollection $blv.KeyProtector)) - { - Write-Verbose "MountPoint '$($MountPoint) 'does not have RecoveryPasswordProtector (RecoveryPassword)" - return $false - } - - if ($PSBoundParameters.ContainsKey("StartupKeyProtector")) - { - if ($PrimaryProtector -notlike "TpmProtector") - { - if (!(ContainsKeyProtector -Type "ExternalKey" -KeyProtectorCollection $blv.KeyProtector)) - { - Write-Verbose "MountPoint '$($MountPoint) 'does not have StartupKeyProtector (ExternalKey)" - return $false - } - } - else #TpmProtector is primary - { - if(!(ContainsKeyProtector -Type "Tpm" -KeyProtectorCollection $blv.KeyProtector -StartsWith $true) -and !(ContainsKeyProtector -Type "StartupKey" -KeyProtectorCollection $blv.KeyProtector -Contains $true)) - { - Write-Verbose "MountPoint '$($MountPoint) 'does not have TPM + StartupKey protector." - return $false - } - } - } - - if ($PSBoundParameters.ContainsKey("TpmProtector") -and !(ContainsKeyProtector -Type "Tpm" -KeyProtectorCollection $blv.KeyProtector -StartsWith $true)) - { - Write-Verbose "MountPoint '$($MountPoint) 'does not have TpmProtector" - return $false - } - } - - return $true -} - -#Ensures that required Bitlocker prereqs are installed -function CheckForPreReqs -{ - $hasAllPreReqs = $true - - $blFeature = Get-WindowsFeature BitLocker - $blAdminToolsFeature = Get-WindowsFeature RSAT-Feature-Tools-BitLocker - $blAdminToolsRemoteFeature = Get-WindowsFeature RSAT-Feature-Tools-BitLocker-RemoteAdminTool - - if ($blFeature.InstallState -ne "Installed") - { - $hasAllPreReqs = $false - - Write-Error "The Bitlocker feature needs to be installed before the xBitlocker module can be used" - } - - if ($blAdminToolsFeature.InstallState -ne "Installed") - { - $hasAllPreReqs = $false - - Write-Error "The RSAT-Feature-Tools-BitLocker feature needs to be installed before the xBitlocker module can be used" - } - - if ($blAdminToolsRemoteFeature.InstallState -ne "Installed") - { - $hasAllPreReqs = $false - - Write-Error "The RSAT-Feature-Tools-BitLocker-RemoteAdminTool feature needs to be installed before the xBitlocker module can be used" - } - - if ($hasAllPreReqs -eq $false) - { - throw "Required Bitlocker features need to be installed before xBitlocker can be used" - } -} - -#Checks whether the KeyProtectorCollection returned from Get-BitlockerVolume contains the specified key protector type -function ContainsKeyProtector -{ - param([string]$Type, $KeyProtectorCollection, [bool]$StartsWith = $false, [bool]$EndsWith = $false, [bool]$Contains = $false) - - if ($KeyProtectorCollection -ne $null) - { - foreach ($keyProtector in $KeyProtectorCollection) - { - if ($keyProtector.KeyProtectorType -eq $Type) - { - return $true - } - elseif ($StartsWith -eq $true -and $keyProtector.KeyProtectorType.ToString().StartsWith($Type)) - { - return $true - } - elseif ($EndsWith -eq $true -and $keyProtector.KeyProtectorType.ToString().EndsWith($Type)) - { - return $true - } - elseif ($Contains -eq $true -and $keyProtector.KeyProtectorType.ToString().Contains($Type)) - { - return $true - } - } - } - - return $false -} - -#Takes $PSBoundParameters from another function and adds in the keys and values from the given Hashtable -function AddParameters -{ - param($PSBoundParametersIn, [Hashtable]$ParamsToAdd) - - foreach ($key in $ParamsToAdd.Keys) - { - if (!($PSBoundParametersIn.ContainsKey($key))) #Key doesn't exist, so add it with value - { - $PSBoundParametersIn.Add($key, $ParamsToAdd[$key]) | Out-Null - } - else #Key already exists, so just replace the value - { - $PSBoundParametersIn[$key] = $ParamsToAdd[$key] - } - } -} - -#Takes $PSBoundParameters from another function. If ParamsToRemove is specified, it will remove each param. -#If ParamsToKeep is specified, everything but those params will be removed. If both ParamsToRemove and ParamsToKeep -#are specified, only ParamsToKeep will be used. -function RemoveParameters -{ - param($PSBoundParametersIn, [string[]]$ParamsToKeep, [string[]]$ParamsToRemove) - - if ($ParamsToKeep -ne $null -and $ParamsToKeep.Count -gt 0) - { - [string[]]$ParamsToRemove = @() - - $lowerParamsToKeep = StringArrayToLower -Array $ParamsToKeep - - foreach ($key in $PSBoundParametersIn.Keys) - { - if (!($lowerParamsToKeep.Contains($key.ToLower()))) - { - $ParamsToRemove += $key - } - } - } - - if ($ParamsToRemove -ne $null -and $ParamsToRemove.Count -gt 0) - { - foreach ($param in $ParamsToRemove) - { - $PSBoundParametersIn.Remove($param) | Out-Null - } - } -} - -Export-ModuleMember -Function * diff --git a/lib/puppet_x/dsc_resources/xBitlocker/xBitlocker.psd1 b/lib/puppet_x/dsc_resources/xBitlocker/xBitlocker.psd1 deleted file mode 100644 index 50e5cbcb..00000000 --- a/lib/puppet_x/dsc_resources/xBitlocker/xBitlocker.psd1 +++ /dev/null @@ -1,118 +0,0 @@ -# -# Module manifest for module 'xBitlocker' -# -# Generated by: Mike Hendrickson -# -# Generated on: 8/29/2014 -# - -@{ - -# Script module or binary module file associated with this manifest. -# RootModule = '' - -# Version number of this module. -ModuleVersion = '1.1.0.0' - -# ID used to uniquely identify this module -GUID = 'dc4f3fd0-4e1d-4916-84f8-d0bb89d52507' - -# Author of this module -Author = 'Mike Hendrickson' - -# Company or vendor of this module -CompanyName = 'Microsoft' - -# Copyright statement for this module -Copyright = '(c) 2014 administrator. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'This DSC Module allows you to configure Bitlocker on a single disk, configure a TPM chip, or automatically enable Bitlocker on multiple disks.' - -# Minimum version of the Windows PowerShell engine required by this module -# PowerShellVersion = '' - -# Name of the Windows PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the Windows PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module -# DotNetFrameworkVersion = '' - -# Minimum version of the common language runtime (CLR) required by this module -# CLRVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -# RequiredModules = @() - -# Assemblies that must be loaded prior to importing this module -# RequiredAssemblies = @() - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -# FormatsToProcess = @() - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -# NestedModules = @() - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Variables to export from this module -VariablesToExport = '*' - -# Aliases to export from this module -AliasesToExport = '*' - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xBitlocker/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xBitlocker' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - # ReleaseNotes = '' - - } # End of PSData hashtable - -} # End of PrivateData hashtable - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - -} - - diff --git a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertReq/MSFT_xCertReq.psm1 b/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertReq/MSFT_xCertReq.psm1 deleted file mode 100644 index 9b58fdee..00000000 --- a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertReq/MSFT_xCertReq.psm1 +++ /dev/null @@ -1,941 +0,0 @@ -#Requires -Version 4.0 - -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Certificate Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'CertificateDsc.Common' ` - -ChildPath 'CertificateDsc.Common.psm1')) - -# Import the Certificate Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'CertificateDsc.ResourceHelper' ` - -ChildPath 'CertificateDsc.ResourceHelper.psm1')) - -# Import the Certificate PDT Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'CertificateDsc.PDT' ` - -ChildPath 'CertificateDsc.PDT.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xCertReq' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current state of the certificate that may need to be requested. - - .PARAMETER Subject - Provide the text string to use as the subject of the certificate. - - .PARAMETER CAServerFQDN - The FQDN of the Active Directory Certificate Authority on the local area network. - - .PARAMETER CARootName - The name of the certificate authority, by default this will be in format domain-servername-ca. - - .PARAMETER KeyLength - The bit length of the encryption key to be used. - - .PARAMETER Exportable - The option to allow the certificate to be exportable, by default it will be true. - - .PARAMETER ProviderName - The selection of provider for the type of encryption to be used. - - .PARAMETER OID - The Object Identifier that is used to name the object. - - .PARAMETER KeyUsage - The Keyusage is a restriction method that determines what a certificate can be used for. - - .PARAMETER CertificateTemplate - The template used for the definiton of the certificate. - - .PARAMETER SubjectAltName - The subject alternative name used to createthe certificate. - - .PARAMETER Credential - The credentials that will be used to access the template in the Certificate Authority. - - .PARAMETER AutoRenew - Determines if the resource will also renew a certificate within 7 days of expiration. - - .PARAMETER CAType - The type of CA in use, Standalone/Enterprise. - - .PARAMETER CepURL - The URL to the Certification Enrollment Policy Service. - - .PARAMETER CesURL - The URL to the Certification Enrollment Service. - - .PARAMETER UseMachineContext - Determines if the machine should be impersonated for a request. Used for templates like Domain Controller Authentication - - .PARAMETER FriendlyName - Specifies a friendly name for the certificate. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Subject, - - [Parameter()] - [System.String] - $CAServerFQDN, - - [Parameter()] - [System.String] - $CARootName, - - [Parameter()] - [ValidateSet("1024", "2048", "4096", "8192")] - [System.String] - $KeyLength = '2048', - - [Parameter()] - [System.Boolean] - $Exportable = $true, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $ProviderName = '"Microsoft RSA SChannel Cryptographic Provider"', - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $OID = '1.3.6.1.5.5.7.3.1', - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $KeyUsage = '0xa0', - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $CertificateTemplate = 'WebServer', - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $SubjectAltName, - - [Parameter()] - [System.Management.Automation.PSCredential] - $Credential, - - [Parameter()] - [System.Boolean] - $AutoRenew, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $CAType = 'Enterprise', - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $CepURL, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $CesURL, - - [Parameter()] - [System.Boolean] - $UseMachineContext, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $FriendlyName - ) - - # The certificate authority, accessible on the local area network - if ([string]::IsNullOrWhiteSpace($CAServerFQDN) -or [string]::IsNullOrWhiteSpace($CARootName)) - { - $caObject = Find-CertificateAuthority - $CARootName = $caObject.CARootName - $CAServerFQDN = $caObject.CAServerFQDN - } - - $ca = "$CAServerFQDN\$CARootName" - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.GettingCertReqStatusMessage -f $Subject, $CA) - ) -join '' ) - - $cert = Get-Childitem -Path Cert:\LocalMachine\My | - Where-Object -FilterScript { - $_.Subject -eq "CN=$Subject" -and ` - $_.Issuer.split(',')[0] -eq "CN=$CARootName" - } - - # If multiple certs have the same subject and were issued by the CA, return the newest - $cert = $cert | - Sort-Object -Property NotBefore -Descending | - Select-Object -First 1 - - if ($cert) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.CertificateExistsMessage -f $Subject, $ca, $cert.Thumbprint) - ) -join '' ) - - $returnValue = @{ - Subject = $Cert.Subject.split(',')[0].replace('CN=', '') - CAServerFQDN = $caObject.CAServerFQDN - CARootName = $Cert.Issuer.split(',')[0].replace('CN=', '') - KeyLength = $Cert.Publickey.Key.KeySize - Exportable = $Cert.PrivateKey.CspKeyContainerInfo.Exportable - ProviderName = $Cert.PrivateKey.CspKeyContainerInfo.ProviderName - OID = $null # This value can't be determined from the cert - KeyUsage = $null # This value can't be determined from the cert - CertificateTemplate = Get-CertificateTemplateName -Certificate $Cert - SubjectAltName = Get-CertificateSan -Certificate $Cert - FriendlyName = $Cert.FriendlyName - } - } - else - { - $returnValue = @{} - } - - $returnValue -} # end function Get-TargetResource - -<# - .SYNOPSIS - Requests a new certificate based on the parameters provided. - - .PARAMETER Subject - Provide the text string to use as the subject of the certificate. - - .PARAMETER CAServerFQDN - The FQDN of the Active Directory Certificate Authority on the local area network. - - .PARAMETER CARootName - The name of the certificate authority, by default this will be in format domain-servername-ca. - - .PARAMETER KeyLength - The bit length of the encryption key to be used. - - .PARAMETER Exportable - The option to allow the certificate to be exportable, by default it will be true. - - .PARAMETER ProviderName - The selection of provider for the type of encryption to be used. - - .PARAMETER OID - The Object Identifier that is used to name the object. - - .PARAMETER KeyUsage - The Keyusage is a restriction method that determines what a certificate can be used for. - - .PARAMETER CertificateTemplate - The template used for the definiton of the certificate. - - .PARAMETER SubjectAltName - The subject alternative name used to createthe certificate. - - .PARAMETER Credential - The credentials that will be used to access the template in the Certificate Authority. - - .PARAMETER AutoRenew - Determines if the resource will also renew a certificate within 7 days of expiration. - - .PARAMETER CAType - The type of CA in use, Standalone/Enterprise. - - .PARAMETER CepURL - The URL to the Certification Enrollment Policy Service. - - .PARAMETER CesURL - The URL to the Certification Enrollment Service. - - .PARAMETER UseMachineContext - Determines if the machine should be impersonated for a request. Used for templates like Domain Controller Authentication - - .PARAMETER FriendlyName - Specifies a friendly name for the certificate. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Subject, - - [Parameter()] - [System.String] - $CAServerFQDN, - - [Parameter()] - [System.String] - $CARootName, - - [Parameter()] - [ValidateSet("1024", "2048", "4096", "8192")] - [System.String] - $KeyLength = '2048', - - [Parameter()] - [System.Boolean] - $Exportable = $true, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $ProviderName = '"Microsoft RSA SChannel Cryptographic Provider"', - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $OID = '1.3.6.1.5.5.7.3.1', - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $KeyUsage = '0xa0', - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $CertificateTemplate = 'WebServer', - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $SubjectAltName, - - [Parameter()] - [System.Management.Automation.PSCredential] - $Credential, - - [Parameter()] - [System.Boolean] - $AutoRenew, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $CAType = 'Enterprise', - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $CepURL, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $CesURL, - - [Parameter()] - [System.Boolean] - $UseMachineContext, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $FriendlyName - ) - - # The certificate authority, accessible on the local area network - if ([string]::IsNullOrWhiteSpace($CAServerFQDN) -or [string]::IsNullOrWhiteSpace($CARootName)) - { - $caObject = Find-CertificateAuthority - $CARootName = $caObject.CARootName - $CAServerFQDN = $caObject.CAServerFQDN - } - - $ca = "$CAServerFQDN\$CARootName" - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.StartingCertReqMessage -f $Subject, $ca) - ) -join '' ) - - # If the Subject does not contain a full X500 path, construct just the CN - if (($Subject.split('=').Count) -eq 1) - { - $Subject = "CN=$Subject" - } # if - - # If we should look for renewals, check for existing certs - if ($AutoRenew) - { - $certs = Get-Childitem -Path Cert:\LocalMachine\My | - Where-Object -FilterScript { - $_.Subject -eq $Subject -and ` - $_.Issuer.split(',')[0] -eq "CN=$CARootName" -and ` - $_.NotAfter -lt (Get-Date).AddDays(30) - } - - # If multiple certs have the same subject and were issued by the CA and are 30 days from expiration, return the newest - $firstCert = $certs | - Sort-Object -Property NotBefore -Descending | - Select-Object -First 1 - $thumbprint = $firstCert | - ForEach-Object -Process { $_.Thumbprint } - } # if - - <# - Information that will be used in the INF file to generate the certificate request - In future versions, select variables from the list below could be moved to parameters! - #> - $Subject = "`"$Subject`"" - $keySpec = '1' - $machineKeySet = 'TRUE' - $smime = 'FALSE' - $privateKeyArchive = 'FALSE' - $userProtected = 'FALSE' - $useExistingKeySet = 'FALSE' - $providerType = '12' - $requestType = 'CMC' - - # A unique identifier for temporary files that will be used when interacting with the command line utility - $guid = [system.guid]::NewGuid().guid - $workingPath = Join-Path -Path $env:Temp -ChildPath "xCertReq-$guid" - $infPath = [System.IO.Path]::ChangeExtension($workingPath, '.inf') - $reqPath = [System.IO.Path]::ChangeExtension($workingPath, '.req') - $cerPath = [System.IO.Path]::ChangeExtension($workingPath, '.cer') - $rspPath = [System.IO.Path]::ChangeExtension($workingPath, '.rsp') - - # Create INF file - $requestDetails = @" -[NewRequest] -Subject = $Subject -KeySpec = $keySpec -KeyLength = $KeyLength -Exportable = $($Exportable.ToString().ToUpper()) -MachineKeySet = $MachineKeySet -SMIME = $smime -PrivateKeyArchive = $privateKeyArchive -UserProtected = $userProtected -UseExistingKeySet = $useExistingKeySet -ProviderName = $ProviderName -ProviderType = $providerType -RequestType = $requestType -KeyUsage = $KeyUsage -"@ - if ($FriendlyName) - { - $requestDetails += @" - -FriendlyName = "$FriendlyName" -"@ - } - $requestDetails += @" - -[RequestAttributes] -CertificateTemplate = $CertificateTemplate -[EnhancedKeyUsageExtension] -OID = $OID -"@ - # If a standalone CA is used certificate templates are not used. - if ($CAType -ne 'Enterprise') - { - $requestDetails = $requestDetails.Replace(@" -[RequestAttributes] -CertificateTemplate = $CertificateTemplate -[EnhancedKeyUsageExtension] -"@, '[EnhancedKeyUsageExtension]') - } - - if ($PSBoundParameters.ContainsKey('SubjectAltName')) - { - # If a Subject Alt Name was specified, add it. - $requestDetails += @" - -[Extensions] -2.5.29.17 = `"{text}$SubjectAltName`" -"@ - } - if ($thumbprint) - { - $requestDetails += @" - -RenewalCert = $Thumbprint -"@ - } - Set-Content -Path $infPath -Value $requestDetails - - <# - Certreq.exe is used to handle the request of the new certificate - because of the lack of native PowerShell Certificate cmdlets. - Syntax: https://technet.microsoft.com/en-us/library/cc736326.aspx - Reference: https://support2.microsoft.com/default.aspx?scid=kb;EN-US;321051 - #> - - # NEW: Create a new request as directed by PolicyFileIn - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.CreateRequestCertificateMessage -f $infPath, $reqPath) - ) -join '' ) - - <# - If enrollment server is specified the request will be towards - the specified URLs instead, using credentials for authentication. - #> - if ($Credential -and $CepURL -and $CesURL) - { - $credPW = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($Credential.Password) - $createRequest = & certreq.exe @( - '-new', '-q', - '-username', $Credential.UserName, - '-p', [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($credPW), - '-PolicyServer', $CepURL, - '-config', $CesURL, - $infPath, - $reqPath - ) - } - else - { - $createRequest = & certreq.exe @('-new', '-q', $infPath, $reqPath) - } # if - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.CreateRequestResultCertificateMessage -f ($createRequest | Out-String)) - ) -join '' ) - - <# - SUBMIT: Submit a request to a Certification Authority. - DSC runs in the context of LocalSystem, which uses the Computer account in Active Directory - to authenticate to network resources - The Credential paramter with PDT is used to impersonate a user making the request - #> - if (Test-Path -Path $reqPath) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.SubmittingRequestCertificateMessage -f $reqPath, $cerPath, $ca) - ) -join '' ) - - if ($Credential) - { - <# - If enrollment server is specified the request will be towards - the specified URLs instead, using credentials for authentication. - #> - if ($CepURL -and $CesURL) - { - $credPW = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($Credential.Password) - $submitRequest = & certreq.exe @( - '-submit', '-q', - '-username', $Credential.UserName, - '-p', [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($credPW), - '-PolicyServer', $CepURL, - '-config', $CesURL, - $ReqPath, - $CerPath - ) - } - else - { - <# - Assemble the command and arguments to pass to the powershell process that - will request the certificate - #> - $certReqOutPath = [System.IO.Path]::ChangeExtension($workingPath, '.out') - $command = "$PSHOME\PowerShell.exe" - - if ($UseMachineContext) - { - $arguments = "-Command ""& $env:SystemRoot\system32\certreq.exe" + ` - " @('-submit','-q','-adminforcemachine','-config','$ca','$reqPath','$cerPath')" + ` - " | Set-Content -Path '$certReqOutPath'""" - } - else - { - $arguments = "-Command ""& $env:SystemRoot\system32\certreq.exe" + ` - " @('-submit','-q','-config','$ca','$reqPath','$cerPath')" + ` - " | Set-Content -Path '$certReqOutPath'""" - } - - <# - This may output a win32-process object, but it often does not because of - a timing issue in PDT (the process has often completed before the - process can be read in). - #> - $null = Start-Win32Process ` - -Path $command ` - -Arguments $arguments ` - -Credential $Credential - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.SubmittingRequestProcessCertificateMessage) - ) -join '' ) - - $null = Wait-Win32ProcessStop ` - -Path $command ` - -Arguments $arguments ` - -Credential $Credential - - if (Test-Path -Path $certReqOutPath) - { - $submitRequest = Get-Content -Path $certReqOutPath - Remove-Item -Path $certReqOutPath -Force - } - else - { - New-InvalidOperationException ` - -Message ($LocalizedData.CertReqOutNotFoundError -f $certReqOutPath) - } # if - } # if - } - else - { - $submitRequest = & certreq.exe @('-submit', '-q', '-config', $CA, $ReqPath, $CerPath) - } # if - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.SubmittingRequestResultCertificateMessage -f ($submitRequest | Out-String)) - ) -join '' ) - } - else - { - New-InvalidOperationException ` - -Message ($LocalizedData.CertificateReqNotFoundError -f $reqPath) - } # if - - # ACCEPT: Accept the request - if (Test-Path -Path $cerPath) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.AcceptingRequestCertificateMessage -f $cerPath, $ca) - ) -join '' ) - - $acceptRequest = & certreq.exe @('-accept', '-machine', '-q', $cerPath) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.AcceptingRequestResultCertificateMessage -f ($acceptRequest | Out-String)) - ) -join '' ) - } - else - { - New-InvalidOperationException ` - -Message ($LocalizedData.CertificateCerNotFoundError -f $cerPath) - } # if - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.CleaningUpRequestFilesMessage -f "$($workingPath).*") - ) -join '' ) - Remove-Item -Path "$($workingPath).*" -Force -} # end function Set-TargetResource - -<# - .SYNOPSIS - Tests if a new certificate should be requested. - - .PARAMETER Subject - Provide the text string to use as the subject of the certificate. - - .PARAMETER CAServerFQDN - The FQDN of the Active Directory Certificate Authority on the local area network. - - .PARAMETER CARootName - The name of the certificate authority, by default this will be in format domain-servername-ca. - - .PARAMETER KeyLength - The bit length of the encryption key to be used. - - .PARAMETER Exportable - The option to allow the certificate to be exportable, by default it will be true. - - .PARAMETER ProviderName - The selection of provider for the type of encryption to be used. - - .PARAMETER OID - The Object Identifier that is used to name the object. - - .PARAMETER KeyUsage - The Keyusage is a restriction method that determines what a certificate can be used for. - - .PARAMETER CertificateTemplate - The template used for the definiton of the certificate. - - .PARAMETER SubjectAltName - The subject alternative name used to createthe certificate. - - .PARAMETER Credential - The credentials that will be used to access the template in the Certificate Authority. - - .PARAMETER AutoRenew - Determines if the resource will also renew a certificate within 7 days of expiration. - - .PARAMETER CAType - The type of CA in use, Standalone/Enterprise. - - .PARAMETER CepURL - The URL to the Certification Enrollment Policy Service. - - .PARAMETER CesURL - The URL to the Certification Enrollment Service. - - .PARAMETER UseMachineContext - Determines if the machine should be impersonated for a request. Used for templates like Domain Controller Authentication - - .PARAMETER FriendlyName - Specifies a friendly name for the certificate. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Subject, - - [Parameter()] - [System.String] - $CAServerFQDN, - - [Parameter()] - [System.String] - $CARootName, - - [Parameter()] - [ValidateSet("1024", "2048", "4096", "8192")] - [System.String] - $KeyLength = '2048', - - [Parameter()] - [System.Boolean] - $Exportable = $true, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $ProviderName = '"Microsoft RSA SChannel Cryptographic Provider"', - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $OID = '1.3.6.1.5.5.7.3.1', - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $KeyUsage = '0xa0', - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $CertificateTemplate = 'WebServer', - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $SubjectAltName, - - [Parameter()] - [System.Management.Automation.PSCredential] - $Credential, - - [Parameter()] - [System.Boolean] - $AutoRenew, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $CAType = 'Enterprise', - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $CepURL, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $CesURL, - - [Parameter()] - [System.Boolean] - $UseMachineContext, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $FriendlyName - ) - - # The certificate authority, accessible on the local area network - if ([string]::IsNullOrWhiteSpace($CAServerFQDN) -or [string]::IsNullOrWhiteSpace($CARootName)) - { - $caObject = Find-CertificateAuthority - $CARootName = $caObject.CARootName - $CAServerFQDN = $caObject.CAServerFQDN - } - - $ca = "$CAServerFQDN\$CARootName" - - # If the Subject does not contain a full X500 path, construct just the CN - if (($Subject.split('=').count) -eq 1) - { - $Subject = "CN=$Subject" - } - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.TestingCertReqStatusMessage -f $Subject, $ca) - ) -join '' ) - - # Exception for standard template DomainControllerAuthentication - $cert = Get-Childitem -Path Cert:\LocalMachine\My | - Where-Object -FilterScript { - $_.Subject -eq $Subject -and ` - $_.Issuer.split(',')[0] -eq "CN=$CARootName" - } - - if ($CertificateTemplate -eq 'DomainControllerAuthentication') - { - $cert = Get-Childitem -Path Cert:\LocalMachine\My | - Where-Object -FilterScript { - (Get-CertificateTemplateName -Certificate $PSItem) -eq $CertificateTemplate -and ` - $_.Issuer.split(',')[0] -eq "CN=$CARootName" - } - } - - # If multiple certs have the same subject and were issued by the CA, return the newest - $cert = $cert | - Sort-Object -Property NotBefore -Descending | - Select-Object -First 1 - - if ($cert) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.CertificateExistsMessage -f $Subject, $ca, $cert.Thumbprint) - ) -join '' ) - - if ($AutoRenew) - { - if ($Cert.NotAfter -le (Get-Date).AddDays(-30)) - { - # The certificate was found but it is expiring within 30 days or has expired - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ExpiringCertificateMessage -f $Subject, $ca, $cert.Thumbprint) - ) -join '' ) - return $false - } # if - } - else - { - if ($cert.NotAfter -le (Get-Date)) - { - # The certificate has expired - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ExpiredCertificateMessage -f $Subject, $ca, $cert.Thumbprint) - ) -join '' ) - return $false - } # if - } # if - - if ($PSBoundParameters.ContainsKey('SubjectAltName')) - { - # Split the desired SANs into an array - $sanList = $SubjectAltName.Split('&') - $correctDNS = @() - - foreach ($san in $sanList) - { - if ($san -like 'dns*') - { - # This SAN is a DNS name - $correctDNS += $san.split('=')[1] - } - } - - # Find out what SANs are on the current cert - if ($cert.Extensions.Count -gt 0) - { - $currentSanList = ($cert.Extensions | Where-Object {$_.oid.FriendlyName -match 'Subject Alternative Name'}).Format(1).split("`n").TrimEnd() - $currentDNS = @() - foreach ($san in $currentSanList) - { - if ($san -like 'dns*') - { - # This SAN is a DNS name - $currentDNS += $san.split('=')[1] - } - } - - # Do the cert's DNS SANs and the desired DNS SANs match? - if (@(Compare-Object -ReferenceObject $currentDNS -DifferenceObject $correctDNS).Count -gt 0) - { - return $false - } - } - else - { - # There are no SANs and there should be - return $false - } - } - - if ($CertificateTemplate -ne (Get-CertificateTemplateName -Certificate $cert)) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.CertTemplateMismatch -f $Subject, $ca, $cert.Thumbprint, (Get-CertificateTemplateName -Certificate $cert)) - ) -join '' ) - return $false - } # if - - # Check the friendly name of the certificate matches - if ($FriendlyName -ne $cert.FriendlyName) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.CertFriendlyNameMismatch -f $Subject, $ca, $cert.Thumbprint, $cert.FriendlyName) - ) -join '' ) - return $false - } # if - - # The certificate was found and is OK - so no change required. - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ValidCertificateExistsMessage -f $Subject, $ca, $cert.Thumbprint) - ) -join '' ) - return $true - } # if - - # A valid certificate was not found - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NoValidCertificateMessage -f $Subject, $ca) - ) -join '' ) - return $false -} # end function Test-TargetResource diff --git a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertReq/MSFT_xCertReq.schema.mof b/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertReq/MSFT_xCertReq.schema.mof deleted file mode 100644 index 133a57f1..00000000 --- a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertReq/MSFT_xCertReq.schema.mof +++ /dev/null @@ -1,21 +0,0 @@ -[ClassVersion("0.1.0.0"), FriendlyName("xCertReq")] -class MSFT_xCertReq : OMI_BaseResource -{ - [Key, Description("Provide the text string to use as the subject of the certificate.")] String Subject; - [Write, Description("The type of CA in use, Standalone/Enterprise.")] String CAType; - [Write, Description("The FQDN of the Active Directory Certificate Authority on the local area network. Leave empty to automatically locate.")] String CAServerFQDN; - [Write, Description("The name of the certificate authority, by default this will be in format domain-servername-ca. Leave empty to automatically locate.")] String CARootName; - [Write, Description("The bit length of the encryption key to be used. Defaults to 2048."), ValueMap{"1024","2048","4096","8192"}, Values{"1024","2048","4096","8192"}] String KeyLength; - [Write, Description("The option to allow the certificate to be exportable, by default it will be true.")] Boolean Exportable; - [Write, Description("The selection of provider for the type of encryption to be used.")] String ProviderName; - [Write, Description("The Object Identifier that is used to name the object.")] String OID; - [Write, Description("The Keyusage is a restriction method that determines what a certificate can be used for.")] String KeyUsage; - [Write, Description("The template used for the definition of the certificate.")] String CertificateTemplate; - [Write, Description("The subject alternative name used to create the certificate.")] String SubjectAltName; - [Write, Description("The credentials that will be used to access the template in the Certificate Authority."), EmbeddedInstance("MSFT_Credential")] String Credential; - [Write, Description("Determines if the resource will also renew a certificate within 7 days of expiration.")] Boolean AutoRenew; - [Write, Description("The URL to the Certification Enrollment Policy Service.")] String CepURL; - [Write, Description("The URL to the Certification Enrollment Service.")] String CesURL; - [Write, Description("Indicates whether or not the flag -adminforcemachine will be used when requesting certificates. Necessary for certain templates like e.g. DomainControllerAuthentication")] Boolean UseMachineContext; - [Write, Description("Specifies a friendly name for the certificate.")] String FriendlyName; -}; diff --git a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertReq/en-us/MSFT_xCertReq.strings.psd1 b/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertReq/en-us/MSFT_xCertReq.strings.psd1 deleted file mode 100644 index 89dbe23c..00000000 --- a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertReq/en-us/MSFT_xCertReq.strings.psd1 +++ /dev/null @@ -1,24 +0,0 @@ -ConvertFrom-StringData @' - GettingCertReqStatusMessage = Getting Certificate with Subject '{0}' issued by {1}. - CertificateExistsMessage = Certificate with Subject '{0}' issued by {1} found with thumbprint '{2}'. - StartingCertReqMessage = Starting Certificate request with Subject '{0}' issued by {1}. - CreateRequestCertificateMessage = Creating certificate request '{1}' from '{0}'. - CreateRequestResultCertificateMessage = Create certificate request result: {0} - SubmittingRequestCertificateMessage = Submitting certificate request '{0}' returning '{1}' issued by {2}. - SubmittingRequestProcessCertificateMessage = Submitting certificate request using separate process. - SubmittingRequestResultCertificateMessage = Submitting certificate request result: {0} - AcceptingRequestCertificateMessage = Accepting certificate '{1}' issued by {0}. - AcceptingRequestResultCertificateMessage = Accepting certificate result: {0} - CleaningUpRequestFilesMessage = Cleaning up certificate request files '{0}'. - TestingCertReqStatusMessage = Testing Certificate with Subject '{0}' issued by {1}. - ExpiringCertificateMessage = The certificate found with subject '{0}' issued by {1} with thumbprint '{2}' is about to expire. - NoValidCertificateMessage = No valid certificate found with subject '{0}' issued by {1}. - ExpiredCertificateMessage = The certificate found with subject '{0}' issued by {1} with thumbprint '{2}' has expired. - InvalidCertificateMessage = The certificate found with subject '{0}' issued by {1} with thumbprint '{2}' is inavlid. - ValidCertificateExistsMessage = Valid certificate '{2}' found with subject '{0}' issued by {1}. - CertificateReqNotFoundError = Certificate Request file '{0}' not found. - CertificateCerNotFoundError = Certificate file '{0}' not found. - CertReqOutNotFoundError = CertReq.exe output file '{0}' not found. - CertTemplateMismatch = The certificate with subject '{0}' issued by '{1}' with thumbprint {2} has the wrong template {3}. - CertFriendlyNameMismatch = The certificate with subject '{0}' issued by '{1}' with thumbprint {2} has the wrong friendly name '{3}'. -'@ diff --git a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateExport/MSFT_xCertificateExport.psm1 b/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateExport/MSFT_xCertificateExport.psm1 deleted file mode 100644 index 1b1d9f68..00000000 --- a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateExport/MSFT_xCertificateExport.psm1 +++ /dev/null @@ -1,487 +0,0 @@ -#Requires -Version 4.0 - -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Certificate Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'CertificateDsc.Common' ` - -ChildPath 'CertificateDsc.Common.psm1')) - -# Import the Certificate Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'CertificateDsc.ResourceHelper' ` - -ChildPath 'CertificateDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xCertificateExport' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current state of the exported certificate. - - .PARAMETER Path - The path to the file you that will contain the exported certificate. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Path - ) - - Write-Verbose -Message ( - @( - "$($MyInvocation.MyCommand): ", - $($LocalizedData.GettingCertificateExportMessage -f $Path) - ) -join '' ) - - $result = @{ - Path = $Path - IsExported = (Test-Path -Path $Path) - } - - return $result -} # end function Get-TargetResource - -<# - .SYNOPSIS - Exports the certificate. - - .PARAMETER Path - The path to the file you that will contain the exported certificate. - - .PARAMETER Thumbprint - The thumbprint of the certificate to export. - Certificate selector parameter. - - .PARAMETER FriendlyName - The friendly name of the certificate to export. - Certificate selector parameter. - - .PARAMETER Subject - The subject of the certificate to export. - Certificate selector parameter. - - .PARAMETER DNSName - The subject alternative name of the certificate to export must contain these values. - Certificate selector parameter. - - .PARAMETER Issuer - The issuer of the certificate to export. - Certificate selector parameter. - - .PARAMETER KeyUsage - The key usage of the certificate to export must contain these values. - Certificate selector parameter. - - .PARAMETER EnhancedKeyUsage - The enhanced key usage of the certificate to export must contain these values. - Certificate selector parameter. - - .PARAMETER Store - The Windows Certificate Store Name to search for the certificate to export from. - Certificate selector parameter. - Defaults to 'My'. - - .PARAMETER AllowExpired - Allow an expired certificate to be exported. - Certificate selector parameter. - - .PARAMETER MatchSource - Causes an existing exported certificate to be compared with the certificate identified for - export and re-exported if it does not match. - - .PARAMETER Type - Specifies the type of certificate to export. - Defaults to 'Cert'. - - .PARAMETER ChainOption - Specifies the options for building a chain when exporting a PFX certificate. - Defaults to 'BuildChain'. - - .PARAMETER Password - Specifies the password used to protect an exported PFX file. - - .PARAMETER ProtectTo - Specifies an array of strings for the username or group name that can access the private - key of an exported PFX file without any password. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Path, - - [Parameter()] - [System.String] - $Thumbprint, - - [Parameter()] - [System.String] - $FriendlyName, - - [Parameter()] - [System.String] - $Subject, - - [Parameter()] - [System.String[]] - $DNSName, - - [Parameter()] - [System.String] - $Issuer, - - [Parameter()] - [System.String[]] - $KeyUsage, - - [Parameter()] - [System.String[]] - $EnhancedKeyUsage, - - [Parameter()] - [System.String] - $Store = 'My', - - [Parameter()] - [System.Boolean] - $AllowExpired, - - [Parameter()] - [System.Boolean] - $MatchSource, - - [Parameter()] - [ValidateSet("Cert", "P7B", "SST", "PFX")] - [System.String] - $Type = 'Cert', - - [Parameter()] - [ValidateSet("BuildChain", "EndEntityCertOnly")] - [System.String] - $ChainOption = 'BuildChain', - - [Parameter()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Password, - - [Parameter()] - [System.String[]] - $ProtectTo - ) - - Write-Verbose -Message ( - @( - "$($MyInvocation.MyCommand): ", - $($LocalizedData.SettingCertificateExportMessage -f $Path) - ) -join '' ) - - $findCertificateParameters = @{} + $PSBoundParameters - $null = $findCertificateParameters.Remove('Path') - $null = $findCertificateParameters.Remove('MatchSource') - $null = $findCertificateParameters.Remove('Type') - $null = $findCertificateParameters.Remove('ChainOption') - $null = $findCertificateParameters.Remove('Password') - $null = $findCertificateParameters.Remove('ProtectTo') - $foundCertificates = @(Find-Certificate @findCertificateParameters) - - if ($foundCertificates.Count -eq 0) - { - # A certificate matching the specified certificate selector parameters could not be found - Write-Verbose -Message ( - @( - "$($MyInvocation.MyCommand): ", - $($LocalizedData.CertificateToExportNotFound -f $Path, $Type, $Store) - ) -join '' ) - } - else - { - $certificateToExport = $foundCertificates[0] - $certificateThumbprintToExport = $certificateToExport.Thumbprint - - Write-Verbose -Message ( - @( - "$($MyInvocation.MyCommand): ", - $($LocalizedData.CertificateToExportFound -f $certificateThumbprintToExport, $Path) - ) -join '' ) - - # Export the certificate - $exportCertificateParameters = @{ - FilePath = $Path - Cert = $certificateToExport - Force = $true - } - - if ($Type -in @('Cert', 'P7B', 'SST')) - { - $exportCertificateParameters += @{ - Type = $Type - } - Export-Certificate @exportCertificateParameters - } - elseif ($Type -eq 'PFX') - { - $exportCertificateParameters += @{ - Password = $Password.Password - ChainOption = $ChainOption - } - - if ($PSBoundParameters.ContainsKey('ProtectTo')) - { - $exportCertificateParameters += @{ - ProtectTo = $ProtectTo - } - } # if - Export-PfxCertificate @exportCertificateParameters - } # if - - Write-Verbose -Message ( - @( - "$($MyInvocation.MyCommand): ", - $($LocalizedData.CertificateExported -f $certificateThumbprintToExport, $Path, $Type) - ) -join '' ) - } # if -} # end function Set-TargetResource - -<# - .SYNOPSIS - Tests the state of the currently exported certificate. - - .PARAMETER Path - The path to the file you that will contain the exported certificate. - - .PARAMETER Thumbprint - The thumbprint of the certificate to export. - Certificate selector parameter. - - .PARAMETER FriendlyName - The friendly name of the certificate to export. - Certificate selector parameter. - - .PARAMETER Subject - The subject of the certificate to export. - Certificate selector parameter. - - .PARAMETER DNSName - The subject alternative name of the certificate to export must contain these values. - Certificate selector parameter. - - .PARAMETER Issuer - The issuer of the certificate to export. - Certificate selector parameter. - - .PARAMETER KeyUsage - The key usage of the certificate to export must contain these values. - Certificate selector parameter. - - .PARAMETER EnhancedKeyUsage - The enhanced key usage of the certificate to export must contain these values. - Certificate selector parameter. - - .PARAMETER Store - The Windows Certificate Store Name to search for the certificate to export from. - Certificate selector parameter. - Defaults to 'My'. - - .PARAMETER AllowExpired - Allow an expired certificate to be exported. - Certificate selector parameter. - - .PARAMETER MatchSource - Causes an existing exported certificate to be compared with the certificate identified for - export and re-exported if it does not match. - - .PARAMETER Type - Specifies the type of certificate to export. - Defaults to 'Cert'. - - .PARAMETER ChainOption - Specifies the options for building a chain when exporting a PFX certificate. - Defaults to 'BuildChain'. - - .PARAMETER Password - Specifies the password used to protect an exported PFX file. - - .PARAMETER ProtectTo - Specifies an array of strings for the username or group name that can access the private - key of an exported PFX file without any password. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Path, - - [Parameter()] - [System.String] - $Thumbprint, - - [Parameter()] - [System.String] - $FriendlyName, - - [Parameter()] - [System.String] - $Subject, - - [Parameter()] - [System.String] - $Issuer, - - [Parameter()] - [System.String[]] - $DNSName, - - [Parameter()] - [System.String[]] - $KeyUsage, - - [Parameter()] - [System.String[]] - $EnhancedKeyUsage, - - [Parameter()] - [System.String] - $Store = 'My', - - [Parameter()] - [System.Boolean] - $AllowExpired, - - [Parameter()] - [System.Boolean] - $MatchSource, - - [Parameter()] - [ValidateSet("Cert", "P7B", "SST", "PFX")] - [System.String] - $Type = 'Cert', - - [Parameter()] - [ValidateSet("BuildChain", "EndEntityCertOnly")] - [System.String] - $ChainOption = 'BuildChain', - - [Parameter()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Password, - - [Parameter()] - [System.String[]] - $ProtectTo - ) - - Write-Verbose -Message ( - @( - "$($MyInvocation.MyCommand): ", - $($LocalizedData.TestingCertificateExportMessage -f $Path) - ) -join '' ) - - $findCertificateParameters = @{} + $PSBoundParameters - $null = $findCertificateParameters.Remove('Path') - $null = $findCertificateParameters.Remove('MatchSource') - $null = $findCertificateParameters.Remove('Type') - $null = $findCertificateParameters.Remove('ChainOption') - $null = $findCertificateParameters.Remove('Password') - $null = $findCertificateParameters.Remove('ProtectTo') - $foundCertificates = @(Find-Certificate @findCertificateParameters) - - if ($foundCertificates.Count -eq 0) - { - # A certificate matching the specified certificate selector parameters could not be found - Write-Verbose -Message ( - @( - "$($MyInvocation.MyCommand): ", - $($LocalizedData.CertificateToExportNotFound -f $Path, $Type, $Store) - ) -join '' ) - - return $true - } - else - { - $certificateToExport = $foundCertificates[0] - $certificateThumbprintToExport = $certificateToExport.Thumbprint - - Write-Verbose -Message ( - @( - "$($MyInvocation.MyCommand): ", - $($LocalizedData.CertificateToExportFound -f $certificateThumbprintToExport, $Path) - ) -join '' ) - - if (Test-Path -Path $Path) - { - if ($MatchSource) - { - # The certificate has already been exported, but we need to make sure it matches - Write-Verbose -Message ( - @( - "$($MyInvocation.MyCommand): ", - $($LocalizedData.CertificateAlreadyExportedMatchSource -f $certificateThumbprintToExport, $Path) - ) -join '' ) - - # Need to now compare the existing exported cert content with the found cert - $exportedCertificate = New-Object -TypeName 'System.Security.Cryptography.X509Certificates.X509Certificate2Collection' - if ($Type -in @('Cert', 'P7B', 'SST')) - { - $exportedCertificate.Import($Path) - } - elseif ($Type -eq 'PFX') - { - $exportedCertificate.Import($Path, $Password, [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::PersistKeySet) - } # if - - if ($certificateThumbprintToExport -notin $exportedCertificate.Thumbprint) - { - Write-Verbose -Message ( - @( - "$($MyInvocation.MyCommand): ", - $($LocalizedData.CertificateAlreadyExportedNotMatchSource -f $certificateThumbprintToExport, $Path) - ) -join '' ) - - return $false - } # if - } - else - { - # This certificate is already exported and we don't want to check it is - # the right certificate. - Write-Verbose -Message ( - @( - "$($MyInvocation.MyCommand): ", - $($LocalizedData.CertificateAlreadyExported -f $certificateThumbprintToExport, $Path) - ) -join '' ) - } # if - - return $true - } - else - { - # The found certificate has not been exported yet - Write-Verbose -Message ( - @( - "$($MyInvocation.MyCommand): ", - $($LocalizedData.CertificateNotExported -f $certificateThumbprintToExport, $Path) - ) -join '' ) - - return $false - } # if - } # if -} # end function Test-TargetResource - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateExport/MSFT_xCertificateExport.schema.mof b/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateExport/MSFT_xCertificateExport.schema.mof deleted file mode 100644 index bca02e37..00000000 --- a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateExport/MSFT_xCertificateExport.schema.mof +++ /dev/null @@ -1,20 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xCertificateExport")] -class MSFT_xCertificateExport : OMI_BaseResource -{ - [Key,Description("The path to the file you that will contain the exported certificate.")] string Path; - [Write,Description("The thumbprint of the certificate to export. Certificate selector parameter.")] string Thumbprint; - [Write,Description("The friendly name of the certificate to export. Certificate selector parameter.")] string FriendlyName; - [Write,Description("The subject of the certificate to export. Certificate selector parameter.")] string Subject; - [Write,Description("The subject alternative name of the certificate to export must contain these values. Certificate selector parameter.")] string DNSName[]; - [Write,Description("The issuer of the certificate to export. Certificate selector parameter.")] string Issuer; - [Write,Description("The key usage of the certificate to export must contain these values. Certificate selector parameter.")] string KeyUsage[]; - [Write,Description("The enhanced key usage of the certificate to export must contain these values. Certificate selector parameter.")] string EnhancedKeyUsage[]; - [Write,Description("The Windows Certificate Store Name to search for the certificate to export from. Certificate selector parameter. Defaults to 'My'.")] string Store; - [Write,Description("Allow an expired certificate to be exported. Certificate selector parameter.")] boolean AllowExpired; - [Write,Description("Causes an existing exported certificate to be compared with the certificate identified for export and re-exported if it does not match.")] boolean MatchSource; - [Write,Description("Specifies the type of certificate to export."),ValueMap{"Cert", "P7B", "SST", "PFX"},Values{"Cert", "P7B", "SST", "PFX"}] string Type; - [Write,Description("Specifies the options for building a chain when exporting a PFX certificate."),ValueMap{"BuildChain","EndEntityCertOnly"},Values{"BuildChain","EndEntityCertOnly"}] string ChainOption; - [Write,Description("Specifies the password used to protect an exported PFX file."),EmbeddedInstance("MSFT_Credential")] String Password; - [Write,Description("Specifies an array of strings for the username or group name that can access the private key of an exported PFX file without any password.")] string ProtectTo[]; - [Read,Description("Returns true if the certificate file already exists and therefore has been exported.")] boolean IsExported; -}; diff --git a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateExport/en-us/MSFT_xCertificateExport.strings.psd1 b/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateExport/en-us/MSFT_xCertificateExport.strings.psd1 deleted file mode 100644 index 572932f8..00000000 --- a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateExport/en-us/MSFT_xCertificateExport.strings.psd1 +++ /dev/null @@ -1,12 +0,0 @@ -ConvertFrom-StringData @' - GettingCertificateExportMessage = Getting certificate export status to '{0}'. - SettingCertificateExportMessage = Setting certificate export status to '{0}'. - TestingCertificateExportMessage = Testing certificate export status to '{0}'. - CertificateToExportNotFound = Could not find certificate to Export to '{0}' as '{1}' in LocalMachine '{2}' store. - CertificateToExportFound = Certificate to export with thumbprint '{0}' found to export to '{1}'. - CertificateAlreadyExported = Certificate to export with thumbprint '{0}' has already been exported to '{1}'. MatchSource set to false so not checking content match. Will not export. - CertificateAlreadyExportedMatchSource = Certificate to Export with thumbprint '{0}' has already been exported to '{1}'. MatchSource set to true so checking content match. - CertificateAlreadyExportedNotMatchSource = Certificate to Export with thumbprint '{0}' has already been exported to '{1}'. but exported certificate does not contain expected thumbprint. Will export. - CertificateNotExported = Certificate to export with thumbprint '{0}' has not yet been exported to '{1}'. Will export. - CertificateExported = Certificate to export as '{2}' with thumbprint '{0}' was exported to '{1}'. -'@ diff --git a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateImport/MSFT_xCertificateImport.psm1 b/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateImport/MSFT_xCertificateImport.psm1 deleted file mode 100644 index 92ad255e..00000000 --- a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateImport/MSFT_xCertificateImport.psm1 +++ /dev/null @@ -1,272 +0,0 @@ -#Requires -Version 4.0 - -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Certificate Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'CertificateDsc.Common' ` - -ChildPath 'CertificateDsc.Common.psm1')) - -# Import the Certificate Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'CertificateDsc.ResourceHelper' ` - -ChildPath 'CertificateDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xCertificateImport' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current state of the CER Certificte file that should be imported. - - .PARAMETER Thumbprint - The thumbprint (unique identifier) of the certificate you're importing. - - .PARAMETER Path - The path to the CER file you want to import. - - .PARAMETER Location - The Windows Certificate Store Location to import the certificate to. - - .PARAMETER Store - The Windows Certificate Store Name to import the certificate to. - - .PARAMETER Ensure - Specifies whether the certificate should be present or absent. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateScript( { $_ | Test-Thumbprint } )] - [System.String] - $Thumbprint, - - [Parameter(Mandatory = $true)] - [ValidateScript( { $_ | Test-CertificatePath } )] - [System.String] - $Path, - - [Parameter(Mandatory = $true)] - [ValidateSet('CurrentUser', 'LocalMachine')] - [System.String] - $Location, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Store, - - [Parameter()] - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present' - ) - - $certificateStore = 'Cert:' | - Join-Path -ChildPath $Location | - Join-Path -ChildPath $Store - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.GettingCertificateStatusMessage -f $Thumbprint,$certificateStore) - ) -join '' ) - - if ((Test-Path $certificateStore) -eq $false) - { - New-InvalidArgumentException ` - -Message ($LocalizedData.CertificateStoreNotFoundError -f $certificateStore) ` - -ArgumentName 'Store' - } - - $checkEnsure = [Bool] ( - $certificateStore | - Get-ChildItem | - Where-Object -FilterScript { $_.Thumbprint -ieq $Thumbprint } - ) - if ($checkEnsure) - { - $Ensure = 'Present' - } - else - { - $Ensure = 'Absent' - } - - @{ - Thumbprint = $Thumbprint - Path = $Path - Location = $Location - Store = $Store - Ensure = $Ensure - } -} # end function Get-TargetResource - -<# - .SYNOPSIS - Tests if the CER Certificate file needs to be imported or removed. - - .PARAMETER Thumbprint - The thumbprint (unique identifier) of the certificate you're importing. - - .PARAMETER Path - The path to the CER file you want to import. - - .PARAMETER Location - The Windows Certificate Store Location to import the certificate to. - - .PARAMETER Store - The Windows Certificate Store Name to import the certificate to. - - .PARAMETER Ensure - Specifies whether the certificate should be present or absent. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateScript( { $_ | Test-Thumbprint } )] - [System.String] - $Thumbprint, - - [Parameter(Mandatory = $true)] - [ValidateScript( { $_ | Test-CertificatePath } )] - [System.String] - $Path, - - [Parameter(Mandatory = $true)] - [ValidateSet('CurrentUser', 'LocalMachine')] - [System.String] - $Location, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Store, - - [Parameter()] - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present' - ) - - $result = @(Get-TargetResource @PSBoundParameters) - - $certificateStore = 'Cert:' | - Join-Path -ChildPath $Location | - Join-Path -ChildPath $Store - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.TestingCertificateStatusMessage -f $Thumbprint,$CertificateStore) - ) -join '' ) - - if ($Ensure -ne $result.Ensure) - { - return $false - } - return $true -} # end function Test-TargetResource - -<# - .SYNOPSIS - Imports or removes the specified CER Certifiicate file. - - .PARAMETER Thumbprint - The thumbprint (unique identifier) of the certificate you're importing. - - .PARAMETER Path - The path to the CER file you want to import. - - .PARAMETER Location - The Windows Certificate Store Location to import the certificate to. - - .PARAMETER Store - The Windows Certificate Store Name to import the certificate to. - - .PARAMETER Ensure - Specifies whether the certificate should be present or absent. -#> -function Set-TargetResource -{ - [CmdletBinding(SupportsShouldProcess)] - param - ( - [Parameter(Mandatory = $true)] - [ValidateScript( { $_ | Test-Thumbprint } )] - [System.String] - $Thumbprint, - - [Parameter(Mandatory = $true)] - [ValidateScript( { $_ | Test-CertificatePath } )] - [System.String] - $Path, - - [Parameter(Mandatory = $true)] - [ValidateSet('CurrentUser', 'LocalMachine')] - [System.String] - $Location, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Store, - - [Parameter()] - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present' - ) - - $certificateStore = 'Cert:' | - Join-Path -ChildPath $Location | - Join-Path -ChildPath $Store - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.SettingCertificateStatusMessage -f $Thumbprint,$certificateStore) - ) -join '' ) - - if ($Ensure -ieq 'Present') - { - if ($PSCmdlet.ShouldProcess(($LocalizedData.ImportingCertificateShould ` - -f $Path,$certificateStore))) - { - # Import the certificate into the Store - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ImportingCertficateMessage -f $Path,$certificateStore) - ) -join '' ) - - $param = @{ - CertStoreLocation = $certificateStore - FilePath = $Path - Verbose = $VerbosePreference - } - - Import-Certificate @param - } - } - elseif ($Ensure -ieq 'Absent') - { - # Remove the certificate from the Store - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.RemovingCertficateMessage -f $Thumbprint,$certificateStore) - ) -join '' ) - - Get-ChildItem -Path $certificateStore | - Where-Object { $_.Thumbprint -ieq $Thumbprint } | - Remove-Item -Force - } -} # end function Test-TargetResource - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateImport/MSFT_xCertificateImport.schema.mof b/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateImport/MSFT_xCertificateImport.schema.mof deleted file mode 100644 index a2b538d9..00000000 --- a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateImport/MSFT_xCertificateImport.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0"), FriendlyName("xCertificateImport")] -class MSFT_xCertificateImport : OMI_BaseResource -{ - [Key,Description("The thumbprint (unique identifier) of the certificate you're importing.")] string Thumbprint; - [Required,Description("The path to the CER file you want to import.")] string Path; - [Key,Description("The Windows Certificate Store Location to import the certificate to."),ValueMap{"LocalMachine", "CurrentUser"},Values{"LocalMachine", "CurrentUser"}] string Location; - [Key,Description("The Windows Certificate Store Name to import the certificate to.")] string Store; - [Write,Description("Specifies whether the certificate should be present or absent."),ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] string Ensure; -}; diff --git a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateImport/en-us/MSFT_xCertificateImport.strings.psd1 b/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateImport/en-us/MSFT_xCertificateImport.strings.psd1 deleted file mode 100644 index 13b0ef2d..00000000 --- a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xCertificateImport/en-us/MSFT_xCertificateImport.strings.psd1 +++ /dev/null @@ -1,11 +0,0 @@ -ConvertFrom-StringData @' - GettingCertificateStatusMessage = Getting Certificate existence '{0}' in '{1}'. - TestingCertificateStatusMessage = Testing Certificate '{0}' existence in '{1}'. - SettingCertificateStatusMessage = Setting Certificate '{0}' existence in '{1}'. - ImportingCertficateMessage = Importing Certificate '{0}' into '{1}'. - RemovingCertficateMessage = Removing Certificate '{0}' from '{1}'. - - CertificateStoreNotFoundError = Certificate Store '{0}' not found. - - ImportingCertificateShould = Importing certificate '{0}' into '{1}' -'@ diff --git a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xPfxImport/MSFT_xPfxImport.psm1 b/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xPfxImport/MSFT_xPfxImport.psm1 deleted file mode 100644 index 7e247d9a..00000000 --- a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xPfxImport/MSFT_xPfxImport.psm1 +++ /dev/null @@ -1,319 +0,0 @@ -#Requires -Version 4.0 - -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Certificate Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'CertificateDsc.Common' ` - -ChildPath 'CertificateDsc.Common.psm1')) - -# Import the Certificate Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'CertificateDsc.ResourceHelper' ` - -ChildPath 'CertificateDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xPfxImport' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current state of the PFX Certificte file that should be imported. - - .PARAMETER Thumbprint - The thumbprint (unique identifier) of the PFX file you're importing. - - .PARAMETER Path - The Windows Certificate Store Location to import the PFX file to. - - .PARAMETER Location - The Windows Certificate Store Location to import the PFX file to. - - .PARAMETER Store - The Windows Certificate Store Name to import the PFX file to. - - .PARAMETER Exportable - Determines whether the private key is exportable from the machine after it has been imported. - - .PARAMETER Credential - A [PSCredential] object that is used to decrypt the PFX file. Only the password is used, so any user name is valid. - - .PARAMETER Ensure - Specifies whether the PFX file should be present or absent. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateScript( { $_ | Test-Thumbprint } )] - [System.String] - $Thumbprint, - - [Parameter(Mandatory = $true)] - [ValidateScript( { $_ | Test-CertificatePath } )] - [System.String] - $Path, - - [Parameter(Mandatory = $true)] - [ValidateSet('CurrentUser', 'LocalMachine')] - [System.String] - $Location, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Store, - - [Parameter()] - [Boolean] - $Exportable = $false, - - [Parameter()] - [PSCredential] - $Credential, - - [Parameter()] - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present' - ) - - $certificateStore = 'Cert:' | - Join-Path -ChildPath $Location | - Join-Path -ChildPath $Store - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.GettingPfxStatusMessage -f $Thumbprint, $certificateStore) - ) -join '' ) - - if ((Test-Path $certificateStore) -eq $false) - { - New-InvalidArgumentException ` - -Message ($LocalizedData.CertificateStoreNotFoundError -f $certificateStore) ` - -ArgumentName 'Store' - } - - $checkEnsure = [Bool]( - $certificateStore | - Get-ChildItem | - Where-Object -FilterScript {$_.Thumbprint -ieq $Thumbprint} - ) - if ($checkEnsure) - { - $Ensure = 'Present' - } - else - { - $Ensure = 'Absent' - } - - @{ - Thumbprint = $Thumbprint - Path = $Path - Location = $Location - Store = $Store - Exportable = $Exportable - Ensure = $Ensure - } -} # end function Get-TargetResource - -<# - .SYNOPSIS - Tests if the PFX Certificate file needs to be imported or removed. - - .PARAMETER Thumbprint - The thumbprint (unique identifier) of the PFX file you're importing. - - .PARAMETER Path - The Windows Certificate Store Location to import the PFX file to. - - .PARAMETER Location - The Windows Certificate Store Location to import the PFX file to. - - .PARAMETER Store - The Windows Certificate Store Name to import the PFX file to. - - .PARAMETER Exportable - Determines whether the private key is exportable from the machine after it has been imported. - - .PARAMETER Credential - A [PSCredential] object that is used to decrypt the PFX file. Only the password is used, so any user name is valid. - - .PARAMETER Ensure - Specifies whether the PFX file should be present or absent. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateScript( { $_ | Test-Thumbprint } )] - [System.String] - $Thumbprint, - - [Parameter(Mandatory = $true)] - [ValidateScript( { $_ | Test-CertificatePath } )] - [System.String] - $Path, - - [Parameter(Mandatory = $true)] - [ValidateSet('CurrentUser', 'LocalMachine')] - [System.String] - $Location, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Store, - - [Parameter()] - [Boolean] - $Exportable = $false, - - [Parameter()] - [PSCredential] - $Credential, - - [Parameter()] - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present' - ) - - $result = @(Get-TargetResource @PSBoundParameters) - - $certificateStore = 'Cert:' | - Join-Path -ChildPath $Location | - Join-Path -ChildPath $Store - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.TestingPfxStatusMessage -f $Thumbprint, $certificateStore) - ) -join '' ) - - - if ($Ensure -ne $result.Ensure) - { - return $false - } - return $true -} # end function Test-TargetResource - -<# - .SYNOPSIS - Imports or removes the specified PFX Certifiicate file. - - .PARAMETER Thumbprint - The thumbprint (unique identifier) of the PFX file you're importing. - - .PARAMETER Path - The Windows Certificate Store Location to import the PFX file to. - - .PARAMETER Location - The Windows Certificate Store Location to import the PFX file to. - - .PARAMETER Store - The Windows Certificate Store Name to import the PFX file to. - - .PARAMETER Exportable - Determines whether the private key is exportable from the machine after it has been imported. - - .PARAMETER Credential - A [PSCredential] object that is used to decrypt the PFX file. Only the password is used, so any user name is valid. - - .PARAMETER Ensure - Specifies whether the PFX file should be present or absent. -#> -function Set-TargetResource -{ - [CmdletBinding(SupportsShouldProcess)] - param - ( - [Parameter(Mandatory = $true)] - [ValidateScript( { $_ | Test-Thumbprint } )] - [System.String] - $Thumbprint, - - [Parameter(Mandatory = $true)] - [ValidateScript( { $_ | Test-CertificatePath } )] - [System.String] - $Path, - - [Parameter(Mandatory = $true)] - [ValidateSet('CurrentUser', 'LocalMachine')] - [System.String] - $Location, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Store, - - [Parameter()] - [Boolean] - $Exportable = $false, - - [Parameter()] - [PSCredential] - $Credential, - - [Parameter()] - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present' - ) - - $certificateStore = 'Cert:' | - Join-Path -ChildPath $Location | - Join-Path -ChildPath $Store - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.SettingPfxStatusMessage -f $Thumbprint, $certificateStore) - ) -join '' ) - - if ($Ensure -ieq 'Present') - { - if ($PSCmdlet.ShouldProcess(($LocalizedData.ImportingPfxShould ` - -f $Path, $certificateStore))) - { - # Import the certificate into the Store - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ImportingPfxMessage -f $Path, $certificateStore) - ) -join '' ) - - $param = @{ - Exportable = $Exportable - CertStoreLocation = $certificateStore - FilePath = $Path - } - if ($Credential) - { - $param['Password'] = $Credential.Password - } - Import-PfxCertificate @param - } - } - elseif ($Ensure -ieq 'Absent') - { - # Remove the certificate from the Store - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.RemovingPfxMessage -f $Thumbprint, $certificateStore) - ) -join '' ) - - Get-ChildItem -Path $certificateStore | - Where-Object { $_.Thumbprint -ieq $thumbprint } | - Remove-Item -Force - } -} # end function Set-TargetResource - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xPfxImport/MSFT_xPfxImport.schema.mof b/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xPfxImport/MSFT_xPfxImport.schema.mof deleted file mode 100644 index 761c4ede..00000000 --- a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xPfxImport/MSFT_xPfxImport.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0"), FriendlyName("xPfxImport")] -class MSFT_xPfxImport : OMI_BaseResource -{ - [Key,Description("The thumbprint (unique identifier) of the PFX file you're importing.")] string Thumbprint; - [Required,Description("The path to the PFX file you want to import.")] string Path; - [Key,Description("The Windows Certificate Store Location to import the PFX file to."),ValueMap{"LocalMachine", "CurrentUser"},Values{"LocalMachine", "CurrentUser"}] string Location; - [Key,Description("The Windows Certificate Store Name to import the PFX file to.")] string Store; - [write,Description("Determines whether the private key is exportable from the machine after it has been imported")] boolean Exportable; - [write,Description("A [PSCredential] object that is used to decrypt the PFX file."),EmbeddedInstance("MSFT_Credential")] string Credential; - [Write,Description("Specifies whether the PFX file should be present or absent."),ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] string Ensure; -}; diff --git a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xPfxImport/en-us/MSFT_xPfxImport.strings.psd1 b/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xPfxImport/en-us/MSFT_xPfxImport.strings.psd1 deleted file mode 100644 index 4fe8418d..00000000 --- a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xPfxImport/en-us/MSFT_xPfxImport.strings.psd1 +++ /dev/null @@ -1,11 +0,0 @@ -ConvertFrom-StringData @' - GettingPfxStatusMessage = Getting Pfx existence '{0}' in '{1}'. - TestingPfxStatusMessage = Testing Pfx '{0}' existence in '{1}'. - SettingPfxStatusMessage = Setting Pfx '{0}' existence in '{1}'. - ImportingPfxMessage = Importing Pfx '{0}' into '{1}'. - RemovingPfxMessage = Removing Pfx '{0}' from '{1}'. - - CertificateStoreNotFoundError = Certificate Store '{0}' not found. - - ImportingPfxShould = Importing Pfx '{0}' into '{1}' -'@ diff --git a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xWaitForCertificateServices/MSFT_xWaitForCertificateServices.psm1 b/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xWaitForCertificateServices/MSFT_xWaitForCertificateServices.psm1 deleted file mode 100644 index 57cfc217..00000000 --- a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xWaitForCertificateServices/MSFT_xWaitForCertificateServices.psm1 +++ /dev/null @@ -1,242 +0,0 @@ -# Suppressed as per PSSA Rule Severity guidelines for unit/integration tests: -# https://github.com/PowerShell/DscResources/blob/master/PSSARuleSeverities.md -#Requires -Version 4.0 - -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Certificate Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'CertificateDsc.Common' ` - -ChildPath 'CertificateDsc.Common.psm1')) - -# Import the Certificate Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'CertificateDsc.ResourceHelper' ` - -ChildPath 'CertificateDsc.ResourceHelper.psm1')) - -# Import the Certificate PDT Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'CertificateDsc.PDT' ` - -ChildPath 'CertificateDsc.PDT.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xWaitForCertificateServices' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current state of the wait for Active Directory Certificate - Service Certificate Authority resource. - - .PARAMETER CAServerFQDN - The FQDN of the Active Directory Certificate Service Certificate Authority to wait - for. Leave empty to automatically detect. - - .PARAMETER CARootName - The name of the Active Directory Certificate Service Certificate Authority to wait - for. Leave empty to automatically detect. - - .PARAMETER RetryIntervalSeconds - Specifies the number of seconds to wait for the Active Directory Certificate - Service Certificate Authority to become available. Defaults to 10 seconds. - - .PARAMETER RetryCount - The number of times to loop the retry interval while waiting for the Active - Directory Certificate Service Certificate Authority. Defaults to 60 retries. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $CAServerFQDN, - - [Parameter(Mandatory = $true)] - [System.String] - $CARootName, - - [Parameter()] - [System.UInt32] - $RetryIntervalSeconds = 10, - - [Parameter()] - [System.UInt32] - $RetryCount = 60 - ) - - $certificateAuthorityFullName = "$CAServerFQDN\$CARootName" - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.GettingWaitForCertificateAuthorityStatusMessage -f $certificateAuthorityFullName) - ) -join '' ) - - $returnValue = @{ - CAServerFQDN = $CAServerFQDN - CARootName = $CARootName - RetryIntervalSeconds = $RetryIntervalSeconds - RetryCount = $RetryCount - } - return $returnValue -} # function Get-TargetResource - -<# - .SYNOPSIS - Waits for the Active Directory Certificate Service Certificate Authority to become - available or times out. - - .PARAMETER CAServerFQDN - The FQDN of the Active Directory Certificate Service Certificate Authority to wait - for. Leave empty to automatically detect. - - .PARAMETER CARootName - The name of the Active Directory Certificate Service Certificate Authority to wait - for. Leave empty to automatically detect. - - .PARAMETER RetryIntervalSeconds - Specifies the number of seconds to wait for the Active Directory Certificate - Service Certificate Authority to become available. Defaults to 10 seconds. - - .PARAMETER RetryCount - The number of times to loop the retry interval while waiting for the Active - Directory Certificate Service Certificate Authority. Defaults to 60 retries. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $CAServerFQDN, - - [Parameter(Mandatory = $true)] - [System.String] - $CARootName, - - [Parameter()] - [System.UInt32] - $RetryIntervalSeconds = 10, - - [Parameter()] - [System.UInt32] - $RetryCount = 60 - ) - - $certificateAuthorityFullName = "$CAServerFQDN\$CARootName" - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.CheckingForCertificateAuthorityStatusMessage -f $certificateAuthorityFullName) - ) -join '' ) - - $certificateAuthorityFound = $false - - for ($count = 0; $count -lt $RetryCount; $count++) - { - if (Test-CertificateAuthority ` - -CAServerFQDN $CAServerFQDN ` - -CARootName $CARootName) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.CertificateAuthorityFoundMessage -f $certificateAuthorityFullName) - ) -join '' ) - - $certificateAuthorityFound = $true - break - } - else - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.CertificateAuthorityNotFoundRetryingMessage -f $certificateAuthorityFullName, $RetryIntervalSeconds) - ) -join '' ) - - Start-Sleep -Seconds $RetryIntervalSeconds - } # if - } # for - - if (-not $certificateAuthorityFound) - { - New-InvalidOperationException ` - -Message $($localizedData.CertificateAuthorityNotFoundAfterError -f $certificateAuthorityFullName, $RetryCount) - } # if -} # function Set-TargetResource - -<# - .SYNOPSIS - Waits for the Active Directory Certificate Service Certificate Authority to - become available or times out. - - .PARAMETER CAServerFQDN - The FQDN of the Active Directory Certificate Service Certificate Authority to wait - for. Leave empty to automatically detect. - - .PARAMETER CARootName - The name of the Active Directory Certificate Service Certificate Authority to wait - for. Leave empty to automatically detect. - - .PARAMETER RetryIntervalSeconds - Specifies the number of seconds to wait for the Active Directory Certificate - Service Certificate Authority to become available. Defaults to 10 seconds. - - .PARAMETER RetryCount - The number of times to loop the retry interval while waiting for the Active - Directory Certificate Service Certificate Authority. Defaults to 60 retries. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $CAServerFQDN, - - [Parameter(Mandatory = $true)] - [System.String] - $CARootName, - - [Parameter()] - [System.UInt32] - $RetryIntervalSeconds = 10, - - [Parameter()] - [System.UInt32] - $RetryCount = 60 - ) - - $certificateAuthorityFullName = "$CAServerFQDN\$CARootName" - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.CheckingForCertificateAuthorityStatusMessage -f $certificateAuthorityFullName) - ) -join '' ) - - if (Test-CertificateAuthority ` - -CAServerFQDN $CAServerFQDN ` - -CARootName $CARootName) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.CertificateAuthorityFoundMessage -f $certificateAuthorityFullName) - ) -join '' ) - - return $true - } - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.CertificateAuthorityNotFoundMessage -f $certificateAuthorityFullName) - ) -join '' ) - - return $false -} # function Test-TargetResource - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xWaitForCertificateServices/MSFT_xWaitForCertificateServices.schema.mof b/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xWaitForCertificateServices/MSFT_xWaitForCertificateServices.schema.mof deleted file mode 100644 index d793a606..00000000 --- a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xWaitForCertificateServices/MSFT_xWaitForCertificateServices.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xWaitForCertificateServices")] -class MSFT_xWaitForCertificateServices : OMI_BaseResource -{ - [Key, Description("The FQDN of the Active Directory Certificate Service Certificate Authority to wait for.")] String CAServerFQDN; - [Key, Description("The name of the Active Directory Certificate Service Certificate Authority to wait for.")] String CARootName; - [Write, Description("Specifies the number of seconds to wait for the Active Directory Certificate Service Certificate Authority to become available. Defaults to 10 seconds.")] Uint32 RetryIntervalSeconds; - [Write, Description("The number of times to loop the retry interval while waiting for the Active Directory Certificate Service Certificate Authority. Defaults to 60 retries.")] Uint32 RetryCount; -}; diff --git a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xWaitForCertificateServices/en-us/MSFT_xWaitForCertificateServices.strings.psd1 b/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xWaitForCertificateServices/en-us/MSFT_xWaitForCertificateServices.strings.psd1 deleted file mode 100644 index 7106d629..00000000 --- a/lib/puppet_x/dsc_resources/xCertificate/DSCResources/MSFT_xWaitForCertificateServices/en-us/MSFT_xWaitForCertificateServices.strings.psd1 +++ /dev/null @@ -1,8 +0,0 @@ -ConvertFrom-StringData @' - GettingWaitForCertificateAuthorityStatusMessage = Getting Wait for status of Active Directory Certificate Services Certificate Authority '{0}'. - CheckingForCertificateAuthorityStatusMessage = Checking for Active Directory Certificate Services Certificate Authority '{0}' status. - CertificateAuthorityFoundMessage = Found Active Directory Certificate Services Certificate Authority '{0}'. - CertificateAuthorityNotFoundMessage = Active Directory Certificate Services Certificate Authority '{0}' not found. - CertificateAuthorityNotFoundRetryingMessage = Active Directory Certificate Services Certificate Authority '{0}' not found, retrying in {1} seconds. - CertificateAuthorityNotFoundAfterError = Active Directory Certificate Services Certificate Authority '{0}' not found after {1} tries. -'@ diff --git a/lib/puppet_x/dsc_resources/xCertificate/LICENSE b/lib/puppet_x/dsc_resources/xCertificate/LICENSE deleted file mode 100644 index 38c4c5d2..00000000 --- a/lib/puppet_x/dsc_resources/xCertificate/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Microsoft Corporation - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/lib/puppet_x/dsc_resources/xCertificate/Modules/CertificateDsc.Common/CertificateDSc.Common.psm1 b/lib/puppet_x/dsc_resources/xCertificate/Modules/CertificateDsc.Common/CertificateDSc.Common.psm1 deleted file mode 100644 index c53fa345..00000000 --- a/lib/puppet_x/dsc_resources/xCertificate/Modules/CertificateDsc.Common/CertificateDSc.Common.psm1 +++ /dev/null @@ -1,587 +0,0 @@ -# Import the Networking Resource Helper Module -Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) ` - -ChildPath (Join-Path -Path 'CertificateDsc.ResourceHelper' ` - -ChildPath 'CertificateDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'CertificateDsc.Common' ` - -ResourcePath $PSScriptRoot - -<# - .SYNOPSIS - Validates the existence of a file at a specific path. - - .PARAMETER Path - The location of the file. Supports any path that Test-Path supports. - - .PARAMETER Quiet - Returns $false if the file does not exist. By default this function throws an exception if the - file is missing. - - .EXAMPLE - Test-CertificatePath -Path '\\server\share\Certificates\mycert.cer' - - .EXAMPLE - Test-CertificatePath -Path 'C:\certs\my_missing.cer' -Quiet - - .EXAMPLE - 'D:\CertRepo\a_cert.cer' | Test-CertificatePath - - .EXAMPLE - Get-ChildItem -Path D:\CertRepo\*.cer | - Test-CertificatePath -#> -function Test-CertificatePath -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true, - ValueFromPipeline)] - [String[]] - $Path, - - [Parameter()] - [Switch] - $Quiet - ) - - Process - { - foreach ($pathNode in $Path) - { - if ($pathNode | Test-Path -PathType Leaf) - { - $true - } - elseif ($Quiet) - { - $false - } - else - { - New-InvalidArgumentException ` - -Message ($LocalizedData.FileNotFoundError -f $pathNode) ` - -ArgumentName 'Path' - } - } - } -} # end function Test-CertificatePath - -<# - .SYNOPSIS - Validates whether a given certificate is valid based on the hash algoritms available on the - system. - - .PARAMETER Thumbprint - One or more thumbprints to Test. - - .PARAMETER Quiet - Returns $false if the thumbprint is not valid. By default this function throws an exception if - validation fails. - - .EXAMPLE - Test-Thumbprint fd94e3a5a7991cb6ed3cd5dd01045edf7e2284de - - .EXAMPLE - Test-Thumbprint ` - -Thumbprint fd94e3a5a7991cb6ed3cd5dd01045edf7e2284de,0000e3a5a7991cb6ed3cd5dd01045edf7e220000 ` - -Quiet - - .EXAMPLE - Get-ChildItem -Path Cert:\LocalMachine -Recurse | - Where-Object -FilterScript { $_.Thumbprint } | - Select-Object -Expression Thumbprint | - Test-Thumbprint -Verbose -#> -function Test-Thumbprint -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true, - ValueFromPipeline)] - [ValidateNotNullOrEmpty()] - [String[]] - $Thumbprint, - - [Parameter()] - [Switch] - $Quiet - ) - - Begin - { - # Get a list of Hash Providers - $hashProviders = [System.AppDomain]::CurrentDomain.GetAssemblies().GetTypes() | - Where-Object -FilterScript { - $_.BaseType.BaseType -eq [System.Security.Cryptography.HashAlgorithm] -and - ($_.Name -cmatch 'Managed$' -or $_.Name -cmatch 'Provider$') - } - - # Get a list of all Valid Hash types and lengths into an array - $validHashes = @() - foreach ($hashProvider in $hashProviders) - { - $bitSize = ( New-Object -TypeName $hashProvider ).HashSize - $validHash = New-Object ` - -TypeName PSObject ` - -Property @{ - Hash = $hashProvider.BaseType.Name - BitSize = $bitSize - HexLength = $bitSize / 4 - } - $validHashes += @( $validHash ) - } - } - - Process - { - foreach ($hash in $Thumbprint) - { - $isValid = $false - - foreach ($algorithm in $validHashes) - { - if ($hash -cmatch "^[a-fA-F0-9]{$($algorithm.HexLength)}$") - { - Write-Verbose ` - -Message ($LocalizedData.InvalidHashError -f $hash,$algorithm.Hash) ` - -Verbose - - $isValid = $true - } - } - - if ($Quiet -or $isValid) - { - $isValid - } - else - { - New-InvalidOperationException ` - -Message ($LocalizedData.InvalidHashError -f $hash) - } - } - } -} # end function Test-Thumbprint - -<# - .SYNOPSIS - Locates one or more certificates using the passed certificate selector parameters. - - If more than one certificate is found matching the selector criteria, they will be - returned in order of descending expiration date. - - .PARAMETER Thumbprint - The thumbprint of the certificate to find. - - .PARAMETER FriendlyName - The friendly name of the certificate to find. - - .PARAMETER Subject - The subject of the certificate to find. - - .PARAMETER DNSName - The subject alternative name of the certificate to export must contain these values. - - .PARAMETER Issuer - The issuer of the certificate to find. - - .PARAMETER KeyUsage - The key usage of the certificate to find must contain these values. - - .PARAMETER EnhancedKeyUsage - The enhanced key usage of the certificate to find must contain these values. - - .PARAMETER Store - The Windows Certificate Store Name to search for the certificate in. - Defaults to 'My'. - - .PARAMETER AllowExpired - Allows expired certificates to be returned. - -#> -function Find-Certificate -{ - [CmdletBinding()] - [OutputType([System.Security.Cryptography.X509Certificates.X509Certificate2[]])] - param - ( - [Parameter()] - [String] - $Thumbprint, - - [Parameter()] - [String] - $FriendlyName, - - [Parameter()] - [String] - $Subject, - - [Parameter()] - [String[]] - $DNSName, - - [Parameter()] - [String] - $Issuer, - - [Parameter()] - [String[]] - $KeyUsage, - - [Parameter()] - [String[]] - $EnhancedKeyUsage, - - [Parameter()] - [String] - $Store = 'My', - - [Parameter()] - [Boolean] - $AllowExpired = $false - ) - - $certPath = Join-Path -Path 'Cert:\LocalMachine' -ChildPath $Store - - if (-not (Test-Path -Path $certPath)) - { - # The Certificte Path is not valid - New-InvalidArgumentException ` - -Message ($LocalizedData.CertificatePathError -f $certPath) ` - -ArgumnentName 'Store' - } # if - - # Assemble the filter to use to select the certificate - $certFilters = @() - if ($PSBoundParameters.ContainsKey('Thumbprint')) - { - $certFilters += @('($_.Thumbprint -eq $Thumbprint)') - } # if - - if ($PSBoundParameters.ContainsKey('FriendlyName')) - { - $certFilters += @('($_.FriendlyName -eq $FriendlyName)') - } # if - - if ($PSBoundParameters.ContainsKey('Subject')) - { - $certFilters += @('($_.Subject -eq $Subject)') - } # if - - if ($PSBoundParameters.ContainsKey('Issuer')) - { - $certFilters += @('($_.Issuer -eq $Issuer)') - } # if - - if (-not $AllowExpired) - { - $certFilters += @('(((Get-Date) -le $_.NotAfter) -and ((Get-Date) -ge $_.NotBefore))') - } # if - - if ($PSBoundParameters.ContainsKey('DNSName')) - { - $certFilters += @('(@(Compare-Object -ReferenceObject $_.DNSNameList.Unicode -DifferenceObject $DNSName | Where-Object -Property SideIndicator -eq "=>").Count -eq 0)') - } # if - - if ($PSBoundParameters.ContainsKey('KeyUsage')) - { - $certFilters += @('(@(Compare-Object -ReferenceObject ($_.Extensions.KeyUsages -split ", ") -DifferenceObject $KeyUsage | Where-Object -Property SideIndicator -eq "=>").Count -eq 0)') - } # if - - if ($PSBoundParameters.ContainsKey('EnhancedKeyUsage')) - { - $certFilters += @('(@(Compare-Object -ReferenceObject ($_.EnhancedKeyUsageList.FriendlyName) -DifferenceObject $EnhancedKeyUsage | Where-Object -Property SideIndicator -eq "=>").Count -eq 0)') - } # if - - # Join all the filters together - $certFilterScript = '(' + ($certFilters -join ' -and ') + ')' - - Write-Verbose ` - -Message ($LocalizedData.SearchingForCertificateUsingFilters -f $store,$certFilterScript) ` - -Verbose - - $certs = Get-ChildItem -Path $certPath | - Where-Object -FilterScript ([ScriptBlock]::Create($certFilterScript)) - - # Sort the certificates - if ($certs.count -gt 1) - { - $certs = $certs | Sort-Object -Descending -Property 'NotAfter' - } # if - - return $certs -} # end function Find-Certificate - -<# -.SYNOPSIS - Get CDP container - -.DESCRIPTION - Gets the configuration data partition from the active directory configuration naming context - -.PARAMETER DomainName - The domain name -#> -function Get-CdpContainer -{ - [cmdletBinding()] - [OutputType([psobject])] - param( - [Parameter()] - [String] - $DomainName - ) - - if (-not $DomainName) - { - $configContext = ([ADSI]'LDAP://RootDSE').configurationNamingContext - - if (-not $configContext) - { - # The computer is not domain joined - New-InvalidOperationException ` - -Message ($LocalizedData.DomainNotJoinedError) - } - } - else - { - $ctx = New-Object -TypeName System.DirectoryServices.ActiveDirectory.DirectoryContext('Domain', $DomainName) - $configContext = 'CN=Configuration,{0}' -f ([System.DirectoryServices.ActiveDirectory.Domain]::GetDomain($ctx).GetDirectoryEntry().distinguishedName[0]) - } - - Write-Verbose ` - -Message ($LocalizedData.ConfigurationNamingContext -f $configContext.toString()) ` - -Verbose - - $cdpContainer = [ADSI]('LDAP://CN=CDP,CN=Public Key Services,CN=Services,{0}' -f $configContext.toString()) - - return $cdpContainer -} # end function Get-CdpContainer - -<# -.SYNOPSIS - Automatically locate a certificate authority in Active Directory - -.DESCRIPTION - Automatically locates a certificate autority in Active Directory environments by leveraging ADSI to look inside the container CDP and - subsequently trying to certutil -ping every located CA until one is found. - -.PARAMETER DomainName - The domain name of the domain that will be used to locate the CA. Can be left empty to use the current domain. -#> -function Find-CertificateAuthority -{ - [cmdletBinding()] - [OutputType([psobject])] - param( - [Parameter()] - [String] - $DomainName - ) - - Write-Verbose ` - -Message ($LocalizedData.StartLocateCAMessage) ` - -Verbose - - $cdpContainer = Get-CdpContainer @PSBoundParameters -ErrorAction Stop - - $caFound = $false - foreach ($item in $cdpContainer.Children) - { - if (-not $caFound) - { - $caServerFQDN = ($item.distinguishedName -split '=|,')[1] - $caRootName = ($item.Children.distinguishedName -split '=|,')[1] - - $certificateAuthority = [PSObject] @{ - CARootName = $caRootName - CAServerFQDN = $caServerFQDN - } - - if (Test-CertificateAuthority ` - -CARootName $caRootName ` - -CAServerFQDN $caServerFQDN) - { - $caFound = $true - break - } - } - } - - if ($caFound) - { - Write-Verbose ` - -Message ($LocalizedData.CaFoundMessage -f $certificateAuthority.CAServerFQDN, $certificateAuthority.CARootName) ` - -Verbose - - return $certificateAuthority - } - else - { - New-InvalidOperationException ` - -Message ($LocalizedData.NoCaFoundError) - } -} # end function Find-CertificateAuthority - -<# -.SYNOPSIS - Test to see if the specified ADCS CA is available. - -.PARAMETER CAServerFQDN - The FQDN of the ADCS CA to test for availability. - -.PARAMETER CARootName - The name of the ADCS CA to test for availability. -#> -function Test-CertificateAuthority -{ - [cmdletBinding()] - [OutputType([Boolean])] - param( - [Parameter()] - [System.String] - $CAServerFQDN, - - [Parameter()] - [System.String] - $CARootName - ) - - Write-Verbose ` - -Message ($LocalizedData.StartPingCAMessage) ` - -Verbose - - $locatorInfo = New-Object -TypeName System.Diagnostics.ProcessStartInfo - $locatorInfo.FileName = 'certutil.exe' - $locatorInfo.Arguments = ('-ping "{0}\{1}"' -f $CAServerFQDN,$CARootName) - - # Certutil does not make use of standard error stream - $locatorInfo.RedirectStandardError = $false - $locatorInfo.RedirectStandardOutput = $true - $locatorInfo.UseShellExecute = $false - $locatorInfo.CreateNoWindow = $true - - $locatorProcess = New-Object -TypeName System.Diagnostics.Process - $locatorProcess.StartInfo = $locatorInfo - - $null = $locatorProcess.Start() - $locatorOut = $locatorProcess.StandardOutput.ReadToEnd() - $null = $locatorProcess.WaitForExit() - - Write-Verbose ` - -Message ($LocalizedData.CaPingMessage -f $locatorProcess.ExitCode, $locatorOut) ` - -Verbose - - if ($locatorProcess.ExitCode -eq 0) - { - Write-Verbose ` - -Message ($LocalizedData.CaOnlineMessage -f $CAServerFQDN, $CARootName) ` - -Verbose - - return $true - } - else - { - Write-Verbose ` - -Message ($LocalizedData.CaOfflineMessage -f $CAServerFQDN, $CARootName) ` - -Verbose - - return $false - } -} # end function Test-CertificateAuthority - -<# -.SYNOPSIS - Get a certificate template name - -.DESCRIPTION - Gets the name of the template used for the certificate that is passed to this cmdlet by translating the OIDs "1.3.6.1.4.1.311.21.7" or "1.3.6.1.4.1.311.20.2" - -.PARAMETER Certificate - The certificate object the template name is needed for -#> -function Get-CertificateTemplateName -{ - [cmdletBinding()] - [OutputType([System.String])] - param - ( - # The certificate for which a template is needed - [Parameter(Mandatory = $true)] - [object] - $Certificate - ) - - if ($Certificate -isnot [System.Security.Cryptography.X509Certificates.X509Certificate2]) - { - return - } - - # Test the different OIDs - if ('1.3.6.1.4.1.311.21.7' -in $Certificate.Extensions.oid.Value) - { - $temp = $Certificate.Extensions | Where-Object { $PSItem.Oid.Value -eq '1.3.6.1.4.1.311.21.7' } - $null = $temp.Format(0) -match 'Template=(?.*)\(' - $templateName = $Matches.TemplateName -replace ' ' - } - - if ('1.3.6.1.4.1.311.20.2' -in $Certificate.Extensions.oid.Value) - { - $templateName = ($Certificate.Extensions | Where-Object { $PSItem.Oid.Value -eq '1.3.6.1.4.1.311.20.2' }).Format(0) - } - - return $templateName -} - -<# -.SYNOPSIS - Get certificate SAN - -.DESCRIPTION - Gets the first subject alternative name for the certificate that is passed to this cmdlet - -.PARAMETER Certificate - The certificate object the subject alternative name is needed for -#> -function Get-CertificateSan -{ - [cmdletBinding()] - [OutputType([System.String])] - param - ( - # The certificate for which the subject alternative names are needed - [Parameter(Mandatory = $true)] - [object] - $Certificate - ) - - if ($Certificate -isnot [System.Security.Cryptography.X509Certificates.X509Certificate2]) - { - return - } - - $subjectAlternativeName = $null - - $sanExtension = $Certificate.Extensions | Where-Object { $_.Oid.FriendlyName -match 'subject alternative name' } - - if ($null -eq $sanExtension) - { - return $subjectAlternativeName - } - - $sanObjects = New-Object -ComObject X509Enrollment.CX509ExtensionAlternativeNames - $altNamesStr = [System.Convert]::ToBase64String($sanExtension.RawData) - $sanObjects.InitializeDecode(1, $altNamesStr) - - if ($sanObjects.AlternativeNames.Count -gt 0) - { - $subjectAlternativeName = $sanObjects.AlternativeNames[0].strValue - } - - return $subjectAlternativeName -} diff --git a/lib/puppet_x/dsc_resources/xCertificate/Modules/CertificateDsc.Common/en-us/CertificateDsc.Common.strings.psd1 b/lib/puppet_x/dsc_resources/xCertificate/Modules/CertificateDsc.Common/en-us/CertificateDsc.Common.strings.psd1 deleted file mode 100644 index bca33123..00000000 --- a/lib/puppet_x/dsc_resources/xCertificate/Modules/CertificateDsc.Common/en-us/CertificateDsc.Common.strings.psd1 +++ /dev/null @@ -1,17 +0,0 @@ -ConvertFrom-StringData @' - FileNotFoundError = File '{0}' not found. - InvalidHashError = '{0}' is not a valid hash. - CertificatePathError = Certificate Path '{0}' is not valid. - SearchingForCertificateUsingFilters = Looking for certificate in Store '{0}' using filter '{1}'. - ConfigurationNamingContext = Using the following container to look for CA candidates: 'LDAP://CN=CDP,CN=Public Key Services,CN=Services,{0}' - ValidHashMessage = '{0}' is a valid {1} hash. - DomainNotJoinedError = The computer is not joined to a domain. - DomainContactError = The domain '{0}' could not be contacted. The following error was received: '{1}' - StartLocateCAMessage = Starting to locate CA. - StartPingCAMessage = Starting to ping CA. - NoCaFoundError = No Certificate Authority could be found. - CaPingMessage = certutil exited with code {0} and the following output: {1} - CaFoundMessage = Found certificate authority '{0}\{1}'. - CaOnlineMessage = Certificate authority '{0}\{1}' is online. - CaOfflineMessage = Certificate authority '{0}\{1}' is offline. -'@ diff --git a/lib/puppet_x/dsc_resources/xCertificate/Modules/CertificateDsc.PDT/CertificateDsc.PDT.psm1 b/lib/puppet_x/dsc_resources/xCertificate/Modules/CertificateDsc.PDT/CertificateDsc.PDT.psm1 deleted file mode 100644 index 58f15187..00000000 --- a/lib/puppet_x/dsc_resources/xCertificate/Modules/CertificateDsc.PDT/CertificateDsc.PDT.psm1 +++ /dev/null @@ -1,744 +0,0 @@ -# Import the Networking Resource Helper Module -Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) ` - -ChildPath (Join-Path -Path 'CertificateDsc.ResourceHelper' ` - -ChildPath 'CertificateDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'CertificateDsc.PDT' ` - -ResourcePath $PSScriptRoot - -<# - .SYNOPSIS - Extracts an array of arguments that were found in the Arguments list passed in. - It also optionally maps the arguments to a new name. - - .PARAMETER FunctionBoundParameters - The parameters that were passed to the calling function. - - .PARAMETER ArgumentNames - The array of arguments that should be extracted. - - .PARAMETER NewArgumentNames - An array of argument names to rename each argument to. -#> -function Get-Arguments -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - $FunctionBoundParameters, - - [Parameter(Mandatory = $true)] - [System.String[]] - $ArgumentNames, - - [Parameter()] - [System.String[]] - $NewArgumentNames - ) - - $returnValue=@{} - - for ($i=0;$i -lt $ArgumentNames.Count;$i++) - { - $argumentName = $ArgumentNames[$i] - - if ($NewArgumentNames -eq $null) - { - $newArgumentName = $argumentName - } - else - { - $newArgumentName = $NewArgumentNames[$i] - } - - if ($FunctionBoundParameters.ContainsKey($argumentName)) - { - $null = $returnValue.Add($NewArgumentName,$FunctionBoundParameters[$argumentName]) - } - } - - return $returnValue -} # end function Get-Arguments - -<# - .SYNOPSIS - Initialize the Win32 PInvoke wrapper. -#> -function Initialize-PInvoke -{ - $script:ProgramSource = @" -using System; -using System.Collections.Generic; -using System.Text; -using System.Security; -using System.Runtime.InteropServices; -using System.Diagnostics; -using System.Security.Principal; -using System.ComponentModel; -using System.IO; - -namespace Source -{ - [SuppressUnmanagedCodeSecurity] - public static class NativeMethods - { - //The following structs and enums are used by the various Win32 API's that are used in the code below - - [StructLayout(LayoutKind.Sequential)] - public struct STARTUPINFO - { - public Int32 cb; - public string lpReserved; - public string lpDesktop; - public string lpTitle; - public Int32 dwX; - public Int32 dwY; - public Int32 dwXSize; - public Int32 dwXCountChars; - public Int32 dwYCountChars; - public Int32 dwFillAttribute; - public Int32 dwFlags; - public Int16 wShowWindow; - public Int16 cbReserved2; - public IntPtr lpReserved2; - public IntPtr hStdInput; - public IntPtr hStdOutput; - public IntPtr hStdError; - } - - [StructLayout(LayoutKind.Sequential)] - public struct PROCESS_INFORMATION - { - public IntPtr hProcess; - public IntPtr hThread; - public Int32 dwProcessID; - public Int32 dwThreadID; - } - - [Flags] - public enum LogonType - { - LOGON32_LOGON_INTERACTIVE = 2, - LOGON32_LOGON_NETWORK = 3, - LOGON32_LOGON_BATCH = 4, - LOGON32_LOGON_SERVICE = 5, - LOGON32_LOGON_UNLOCK = 7, - LOGON32_LOGON_NETWORK_CLEARTEXT = 8, - LOGON32_LOGON_NEW_CREDENTIALS = 9 - } - - [Flags] - public enum LogonProvider - { - LOGON32_PROVIDER_DEFAULT = 0, - LOGON32_PROVIDER_WINNT35, - LOGON32_PROVIDER_WINNT40, - LOGON32_PROVIDER_WINNT50 - } - [StructLayout(LayoutKind.Sequential)] - public struct SECURITY_ATTRIBUTES - { - public Int32 Length; - public IntPtr lpSecurityDescriptor; - public bool bInheritHandle; - } - - public enum SECURITY_IMPERSONATION_LEVEL - { - SecurityAnonymous, - SecurityIdentification, - SecurityImpersonation, - SecurityDelegation - } - - public enum TOKEN_TYPE - { - TokenPrimary = 1, - TokenImpersonation - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - internal struct TokPriv1Luid - { - public int Count; - public long Luid; - public int Attr; - } - - public const int GENERIC_ALL_ACCESS = 0x10000000; - public const int CREATE_NO_WINDOW = 0x08000000; - internal const int SE_PRIVILEGE_ENABLED = 0x00000002; - internal const int TOKEN_QUERY = 0x00000008; - internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; - internal const string SE_INCRASE_QUOTA = "SeIncreaseQuotaPrivilege"; - - [DllImport("kernel32.dll", - EntryPoint = "CloseHandle", SetLastError = true, - CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] - public static extern bool CloseHandle(IntPtr handle); - - [DllImport("advapi32.dll", - EntryPoint = "CreateProcessAsUser", SetLastError = true, - CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] - public static extern bool CreateProcessAsUser( - IntPtr hToken, - string lpApplicationName, - string lpCommandLine, - ref SECURITY_ATTRIBUTES lpProcessAttributes, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - bool bInheritHandle, - Int32 dwCreationFlags, - IntPtr lpEnvrionment, - string lpCurrentDirectory, - ref STARTUPINFO lpStartupInfo, - ref PROCESS_INFORMATION lpProcessInformation - ); - - [DllImport("advapi32.dll", EntryPoint = "DuplicateTokenEx")] - public static extern bool DuplicateTokenEx( - IntPtr hExistingToken, - Int32 dwDesiredAccess, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - Int32 ImpersonationLevel, - Int32 dwTokenType, - ref IntPtr phNewToken - ); - - [DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)] - public static extern Boolean LogonUser( - String lpszUserName, - String lpszDomain, - String lpszPassword, - LogonType dwLogonType, - LogonProvider dwLogonProvider, - out IntPtr phToken - ); - - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern bool AdjustTokenPrivileges( - IntPtr htok, - bool disall, - ref TokPriv1Luid newst, - int len, - IntPtr prev, - IntPtr relen - ); - - [DllImport("kernel32.dll", ExactSpelling = true)] - internal static extern IntPtr GetCurrentProcess(); - - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern bool OpenProcessToken( - IntPtr h, - int acc, - ref IntPtr phtok - ); - - [DllImport("advapi32.dll", SetLastError = true)] - internal static extern bool LookupPrivilegeValue( - string host, - string name, - ref long pluid - ); - - public static void CreateProcessAsUser(string strCommand, string strDomain, string strName, string strPassword) - { - var hToken = IntPtr.Zero; - var hDupedToken = IntPtr.Zero; - TokPriv1Luid tp; - var pi = new PROCESS_INFORMATION(); - var sa = new SECURITY_ATTRIBUTES(); - sa.Length = Marshal.SizeOf(sa); - Boolean bResult = false; - try - { - bResult = LogonUser( - strName, - strDomain, - strPassword, - LogonType.LOGON32_LOGON_BATCH, - LogonProvider.LOGON32_PROVIDER_DEFAULT, - out hToken - ); - if (!bResult) - { - throw new Win32Exception("The user could not be logged on. Ensure that the user has an existing profile on the machine and that correct credentials are provided. Logon error #" + Marshal.GetLastWin32Error().ToString()); - } - IntPtr hproc = GetCurrentProcess(); - IntPtr htok = IntPtr.Zero; - bResult = OpenProcessToken( - hproc, - TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, - ref htok - ); - if(!bResult) - { - throw new Win32Exception("Open process token error #" + Marshal.GetLastWin32Error().ToString()); - } - tp.Count = 1; - tp.Luid = 0; - tp.Attr = SE_PRIVILEGE_ENABLED; - bResult = LookupPrivilegeValue( - null, - SE_INCRASE_QUOTA, - ref tp.Luid - ); - if(!bResult) - { - throw new Win32Exception("Error in looking up privilege of the process. This should not happen if DSC is running as LocalSystem Lookup privilege error #" + Marshal.GetLastWin32Error().ToString()); - } - bResult = AdjustTokenPrivileges( - htok, - false, - ref tp, - 0, - IntPtr.Zero, - IntPtr.Zero - ); - if(!bResult) - { - throw new Win32Exception("Token elevation error #" + Marshal.GetLastWin32Error().ToString()); - } - - bResult = DuplicateTokenEx( - hToken, - GENERIC_ALL_ACCESS, - ref sa, - (int)SECURITY_IMPERSONATION_LEVEL.SecurityIdentification, - (int)TOKEN_TYPE.TokenPrimary, - ref hDupedToken - ); - if(!bResult) - { - throw new Win32Exception("Duplicate Token error #" + Marshal.GetLastWin32Error().ToString()); - } - var si = new STARTUPINFO(); - si.cb = Marshal.SizeOf(si); - si.lpDesktop = ""; - bResult = CreateProcessAsUser( - hDupedToken, - null, - strCommand, - ref sa, - ref sa, - false, - 0, - IntPtr.Zero, - null, - ref si, - ref pi - ); - if(!bResult) - { - throw new Win32Exception("The process could not be created. Create process as user error #" + Marshal.GetLastWin32Error().ToString()); - } - } - finally - { - if (pi.hThread != IntPtr.Zero) - { - CloseHandle(pi.hThread); - } - if (pi.hProcess != IntPtr.Zero) - { - CloseHandle(pi.hProcess); - } - if (hDupedToken != IntPtr.Zero) - { - CloseHandle(hDupedToken); - } - } - } - } -} - -"@ - Add-Type -TypeDefinition $ProgramSource -ReferencedAssemblies "System.ServiceProcess" -} # end function Initialize-PInvoke - -<# - .SYNOPSIS - Gets a Win32 process that matches the path, arguments and is user. - - .PARAMETER Path - The path to the executable running the process. - - .PARAMETER Arguments - The arguments of the running process to find. - - .PARAMETER Credential - The credentials of the account that the process is running under. -#> -function Get-Win32Process -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [Parameter()] - [String] - $Arguments, - - [Parameter()] - [PSCredential] - $Credential - ) - - $fileName = [io.path]::GetFileNameWithoutExtension($Path) - $getProcesses = @(Get-Process -Name $fileName -ErrorAction SilentlyContinue) - $processes = foreach ($process in $GetProcesses) - { - if ($process.Path -ieq $Path) - { - try - { - [wmi]"Win32_Process.Handle='$($process.Id)'" - } - catch - { - } - } - } - if ($PSBoundParameters.ContainsKey('Credential')) - { - $processes = $processes | - Where-Object -FilterScript { - (Get-Win32ProcessOwner $_) -eq $Credential.UserName - } - } - if ($Arguments -eq $null) - { - $Arguments = "" - } - $processes = $processes | - Where-Object -FilterScript { - (Get-Win32ProcessArgumentsFromCommandLine $_.CommandLine) -eq $Arguments - } - - return $processes -} # end function Get-Win32Process - -<# - .SYNOPSIS - Returns the Owner of a Win32 Process. - - .PARAMETER Process - The Win32 WMI process to get the owner for. -#> -function Get-Win32ProcessOwner -{ - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - $Process - ) - - try - { - $owner = $Process.GetOwner() - } - catch - { - } - if ($owner.Domain -ne $null) - { - return $owner.Domain + "\" + $owner.User - } - else - { - return $owner.User - } -} # end function Get-Win32ProcessOwner - -<# - .SYNOPSIS - Extracts the arguments from a complete command line - - .PARAMETER CommandLine - The complete command line to extract the arguments from. -#> -function Get-Win32ProcessArgumentsFromCommandLine -{ - param - ( - [Parameter()] - [String] - $CommandLine - ) - - if ($commandLine -eq $null) - { - return "" - } - $commandLine = $commandLine.Trim() - if ($commandLine.Length -eq 0) - { - return "" - } - if ($commandLine[0] -eq '"') - { - $charToLookfor = [char]'"' - } - else - { - $charToLookfor = [char]' ' - } - $endOfCommand = $commandLine.IndexOf($charToLookfor ,1) - if ($endOfCommand -eq -1) - { - return "" - } - return $commandLine.Substring($endOfCommand+1).Trim() -} # end funcion Get-Win32ProcessArgumentsFromCommandLine - -<# - .SYNOPSIS - Starts a Win32 Process using PInvoke. - - .PARAMETER Path - The full path to the executable to start the process with. - - .PARAMETER Arguments - The arguments to pass to the executable when starting the process. - - .PARAMETER Credential - The user account to start the process under. -#> -function Start-Win32Process -{ - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [Parameter()] - [String] - $Arguments, - - [Parameter()] - [PSCredential] - $Credential - ) - - $getArguments = Get-Arguments $PSBoundParameters ("Path","Arguments","Credential") - $processes = @(Get-Win32Process @getArguments) - if ($processes.Count -eq 0) - { - if($PSBoundParameters.ContainsKey("Credential")) - { - try - { - Initialize-PInvoke - [Source.NativeMethods]::CreateProcessAsUser(` - ("$Path " + $Arguments),` - $Credential.GetNetworkCredential().Domain,` - $Credential.GetNetworkCredential().UserName,` - $Credential.GetNetworkCredential().Password) - } - catch - { - try - { - Initialize-PInvoke - [Source.NativeMethods]::CreateProcessAsUser(` - ("$Path " + $Arguments),` - $Credential.GetNetworkCredential().Domain,` - $Credential.GetNetworkCredential().UserName,` - $Credential.GetNetworkCredential().Password) - } - catch - { - $exception = New-Object System.ArgumentException $_ - $errorCategory = [System.Management.Automation.ErrorCategory]::OperationStopped - $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord $exception, "Win32Exception", $errorCategory, $null - $err = $errorRecord - } - } - } - else - { - $startArguments = Get-Arguments $PSBoundParameters ` - ("Path", "Arguments", "Credential") ` - ("FilePath", "ArgumentList", "Credential") - if([string]::IsNullOrEmpty($Arguments)) - { - $null = $startArguments.Remove("ArgumentList") - } - $err = Start-Process @StartArguments - } - if($err -ne $null) - { - throw $err - } - Wait-Win32ProcessStart @GetArguments - } - else - { - return ($LocalizedData.ProcessAlreadyStarted -f $Path,$processes.ProcessId) - } - $processes = @(Get-Win32Process @getArguments) - return ($LocalizedData.ProcessStarted -f $Path,$processes.ProcessId) -} # end function Start-Win32Process - -<# - .SYNOPSIS - Wait for a Win32 process to start. - - .PARAMETER Path - The full path to the executable of the process to wait for. - - .PARAMETER Arguments - The arguments passed to the executable of the process to wait for. - - .PARAMETER Credential - The user account the process will be running under. - - .PARAMETER Timeout - The milliseconds to wait for the process to start. -#> -function Wait-Win32ProcessStart -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [Parameter()] - [String] - $Arguments, - - [Parameter()] - [PSCredential] - $Credential, - - [Parameter()] - [Int] - $Timeout = 5000 - ) - - $start = [DateTime]::Now - $getArguments = Get-Arguments $PSBoundParameters ("Path","Arguments","Credential") - $started = (@(Get-Win32Process @GetArguments).Count -ge 1) - While (-not $started -and ([DateTime]::Now - $start).TotalMilliseconds -lt $Timeout) - { - Start-Sleep -Seconds 1 - $started = @(Get-Win32Process @GetArguments).Count -ge 1 - } - return $started -} # end function Wait-Win32ProcessStart - -<# - .SYNOPSIS - Wait for a Win32 process to stop. This assumes the process was aleady confirmed to have been started by first - calling Wait-Win32ProcessStart. - - .PARAMETER Path - The full path to the executable of the process to wait for. - - .PARAMETER Arguments - The arguments passed to the executable of the process to wait for. - - .PARAMETER Credential - The user account the process will be running under. - - .PARAMETER Timeout - The milliseconds to wait for the process to stop. -#> -function Wait-Win32ProcessStop -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [Parameter()] - [String] - $Arguments, - - [Parameter()] - [PSCredential] - $Credential, - - [Parameter()] - [Int] - $Timeout = 30000 - ) - - $start = [DateTime]::Now - $getArguments = Get-Arguments $PSBoundParameters ("Path","Arguments","Credential") - $stopped = (@(Get-Win32Process @GetArguments).Count -eq 0) - While (-not $stopped -and ([DateTime]::Now - $start).TotalMilliseconds -lt $Timeout) - { - Start-Sleep -Seconds 1 - $stopped = (@(Get-Win32Process @GetArguments).Count -eq 0) - } - return $stopped -} # end function Wait-Win32ProcessStop - -<# - .SYNOPSIS - Wait for a Win32 process to complete. - - .PARAMETER Path - The full path to the executable of the process to wait for. - - .PARAMETER Arguments - The arguments passed to the executable of the process to wait for. - - .PARAMETER Credential - The user account the process will be running under. - - .PARAMETER Timeout - The amount of time to wait for the process to end. -#> -function Wait-Win32ProcessEnd -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [Parameter()] - [String] - $Arguments, - - [Parameter()] - [PSCredential] - $Credential - ) - - $getArguments = Get-Arguments $PSBoundParameters ("Path","Arguments","Credential") - # Wait for the process to start - if (-not (Wait-Win32ProcessStart @getArguments)) - { - New-InvalidOperationException ` - -Message ($LocalizedData.ProcessFailedToStartError -f $Path,$Arguments) - } - if (-not (Wait-Win32ProcessStop @getArguments)) - { - # The process did not stop. - New-InvalidOperationException ` - -Message ($LocalizedData.ProcessFailedToStopError -f $Path,$Arguments) - } -} # end function Wait-Win32ProcessEnd - -Export-ModuleMember Start-Win32Process,Wait-Win32ProcessStart,Wait-Win32ProcessStop,Wait-Win32ProcessEnd diff --git a/lib/puppet_x/dsc_resources/xCertificate/Modules/CertificateDsc.PDT/en-us/CertificateDsc.PDT.strings.psd1 b/lib/puppet_x/dsc_resources/xCertificate/Modules/CertificateDsc.PDT/en-us/CertificateDsc.PDT.strings.psd1 deleted file mode 100644 index 0e78778d..00000000 --- a/lib/puppet_x/dsc_resources/xCertificate/Modules/CertificateDsc.PDT/en-us/CertificateDsc.PDT.strings.psd1 +++ /dev/null @@ -1,10 +0,0 @@ -ConvertFrom-StringData @' - FileNotFound = File not found in the environment path - AbsolutePathOrFileName = Absolute path or file name expected - InvalidArgument = Invalid argument: '{0}' with value: '{1}' - InvalidArgumentAndMessage = {0} {1} - ProcessFailedToStartError = The process '{0}' with arguments '{1}' failed to start within the specified timeout. - ProcessStarted = Process matching path '{0}' started in process ID {1} - ProcessAlreadyStarted = Process matching path '{0}' already started in process ID {1} - ProcessFailedToStopError = The process '{0}' with arguments '{1}' failed to stop within the specified timeout. -'@ diff --git a/lib/puppet_x/dsc_resources/xCertificate/Modules/CertificateDsc.ResourceHelper/CertificateDsc.ResourceHelper.psm1 b/lib/puppet_x/dsc_resources/xCertificate/Modules/CertificateDsc.ResourceHelper/CertificateDsc.ResourceHelper.psm1 deleted file mode 100644 index 642687be..00000000 --- a/lib/puppet_x/dsc_resources/xCertificate/Modules/CertificateDsc.ResourceHelper/CertificateDsc.ResourceHelper.psm1 +++ /dev/null @@ -1,174 +0,0 @@ -<# - .SYNOPSIS - Tests if the current machine is a Nano server. -#> -function Test-IsNanoServer -{ - if (Test-Command -Name Get-ComputerInfo) - { - $computerInfo = Get-ComputerInfo - - if ("Server" -eq $computerInfo.OsProductType ` - -and "NanoServer" -eq $computerInfo.OsServerLevel) - { - return $true - } - } - - return $false -} - -<# - .SYNOPSIS - Tests if the the specified command is found. -#> -function Test-Command -{ - param - ( - [Parameter()] - [String] - $Name - ) - - return ($null -ne (Get-Command -Name $Name -ErrorAction Continue 2> $null)) -} - -<# - .SYNOPSIS - Creates and throws an invalid argument exception - - .PARAMETER Message - The message explaining why this error is being thrown - - .PARAMETER ArgumentName - The name of the invalid argument that is causing this error to be thrown -#> -function New-InvalidArgumentException -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Message, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ArgumentName - ) - - $argumentException = New-Object -TypeName 'ArgumentException' -ArgumentList @( $Message, - $ArgumentName ) - $newObjectParams = @{ - TypeName = 'System.Management.Automation.ErrorRecord' - ArgumentList = @( $argumentException, $ArgumentName, 'InvalidArgument', $null ) - } - $errorRecord = New-Object @newObjectParams - - throw $errorRecord -} - -<# - .SYNOPSIS - Creates and throws an invalid operation exception - - .PARAMETER Message - The message explaining why this error is being thrown - - .PARAMETER ErrorRecord - The error record containing the exception that is causing this terminating error -#> -function New-InvalidOperationException -{ - [CmdletBinding()] - param - ( - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $Message, - - [Parameter()] - [ValidateNotNull()] - [System.Management.Automation.ErrorRecord] - $ErrorRecord - ) - - if ($null -eq $Message) - { - $invalidOperationException = New-Object -TypeName 'InvalidOperationException' - } - elseif ($null -eq $ErrorRecord) - { - $invalidOperationException = - New-Object -TypeName 'InvalidOperationException' -ArgumentList @( $Message ) - } - else - { - $invalidOperationException = - New-Object -TypeName 'InvalidOperationException' -ArgumentList @( $Message, - $ErrorRecord.Exception ) - } - - $newObjectParams = @{ - TypeName = 'System.Management.Automation.ErrorRecord' - ArgumentList = @( $invalidOperationException.ToString(), 'MachineStateIncorrect', - 'InvalidOperation', $null ) - } - $errorRecordToThrow = New-Object @newObjectParams - throw $errorRecordToThrow -} - -<# - .SYNOPSIS - Retrieves the localized string data based on the machine's culture. - Falls back to en-US strings if the machine's culture is not supported. - - .PARAMETER ResourceName - The name of the resource as it appears before '.strings.psd1' of the localized string file. - - For example: - For WindowsOptionalFeature: MSFT_xWindowsOptionalFeature - For Service: MSFT_xServiceResource - For Registry: MSFT_xRegistryResource - - .PARAMETER ResourcePath - The path the resource file is located in. -#> -function Get-LocalizedData -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ResourceName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ResourcePath - ) - - $localizedStringFileLocation = Join-Path -Path $ResourcePath -ChildPath $PSUICulture - - if (-not (Test-Path -Path $localizedStringFileLocation)) - { - # Fallback to en-US - $localizedStringFileLocation = Join-Path -Path $ResourcePath -ChildPath 'en-US' - } - - Import-LocalizedData ` - -BindingVariable 'localizedData' ` - -FileName "$ResourceName.strings.psd1" ` - -BaseDirectory $localizedStringFileLocation - - return $localizedData -} - -Export-ModuleMember -Function @( 'Test-IsNanoServer', 'New-InvalidArgumentException', - 'New-InvalidOperationException', 'Get-LocalizedData' ) diff --git a/lib/puppet_x/dsc_resources/xCertificate/xCertificate.psd1 b/lib/puppet_x/dsc_resources/xCertificate/xCertificate.psd1 deleted file mode 100644 index 36efb8c1..00000000 --- a/lib/puppet_x/dsc_resources/xCertificate/xCertificate.psd1 +++ /dev/null @@ -1,84 +0,0 @@ -@{ - # Version number of this module. - ModuleVersion = '3.0.0.0' - - # ID used to uniquely identify this module - GUID = '1b8d785e-79ae-4d95-ae58-b2460aec1031' - - # Author of this module - Author = 'Microsoft Corporation' - - # Company or vendor of this module - CompanyName = 'Microsoft Corporation' - - # Copyright statement for this module - Copyright = '(c) 2017 Microsoft Corporation. All rights reserved.' - - # Description of the functionality provided by this module - Description = 'This module includes DSC resources that simplify administration of certificates on a Windows Server' - - # Minimum version of the Windows PowerShell engine required by this module - PowerShellVersion = '4.0' - - # Minimum version of the common language runtime (CLR) required by this module - CLRVersion = '4.0' - - # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess - # NestedModules = @() - - # Functions to export from this module - FunctionsToExport = '*' - - # Cmdlets to export from this module - CmdletsToExport = '*' - - # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. - PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xCertificate/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xCertificate' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '- Add CodeCov.io code coverage reporting. -- Opted into "Common Tests - Validate Example Files". -- Fixed bugs in examples. -- Updated License and Manifest Copyright info to be 2017 Microsoft Corporation. -- xCertReq: - - BREAKING CHANGE: Changed default Keylength to 2048 bits to meet - [Microsoft Security Advisory](https://support.microsoft.com/en-us/help/2661254/microsoft-security-advisory-update-for-minimum-certificate-key-length). - - Fixed spelling mistakes in MOF files. -- Added .github support files: - - CONTRIBUTING.md - - ISSUE_TEMPLATE.md - - PULL_REQUEST_TEMPLATE.md -- Opted into Common Tests "Validate Module Files" and "Validate Script Files". -- Converted files with UTF8 with BOM over to UTF8 - fixes [Issue 87](https://github.com/PowerShell/xCertificate/issues/87). -- Converted to use auto-documentation/wiki format - fixes [Issue 84](https://github.com/PowerShell/xCertificate/issues/84). - -' - - } # End of PSData hashtable - - } # End of PrivateData hashtable - -} - - - - - - - - - diff --git a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/CommonResourceHelper.psm1 b/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/CommonResourceHelper.psm1 deleted file mode 100644 index 7cdf9306..00000000 --- a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/CommonResourceHelper.psm1 +++ /dev/null @@ -1,425 +0,0 @@ -<# - .SYNOPSIS - Retrieves the localized string data based on the machine's culture. - Falls back to en-US strings if the machine's culture is not supported. - - .PARAMETER ResourceName - The name of the resource as it appears before '.strings.psd1' of the localized string file. - For example: - xSQLServerEndpoint: MSFT_xSQLServerEndpoint - xSQLServerConfiguration: MSFT_xSQLServerConfiguration - xSQLServerRole: MSFT_xSQLServerRole -#> -function Get-LocalizedData -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ResourceName - ) - - $resourceDirectory = Join-Path -Path $PSScriptRoot -ChildPath $ResourceName - $localizedStringFileLocation = Join-Path -Path $resourceDirectory -ChildPath $PSUICulture - - if (-not (Test-Path -Path $localizedStringFileLocation)) - { - # Fallback to en-US - $localizedStringFileLocation = Join-Path -Path $resourceDirectory -ChildPath 'en-US' - } - - Import-LocalizedData ` - -BindingVariable 'localizedData' ` - -FileName "$ResourceName.strings.psd1" ` - -BaseDirectory $localizedStringFileLocation - - return $localizedData -} - -<# -.SYNOPSIS - Removes common parameters from a hashtable -.DESCRIPTION - This function serves the purpose of removing common parameters and option common parameters from a parameter hashtable -.PARAMETER Hashtable - The parameter hashtable that should be pruned -#> -function Remove-CommonParameter -{ - [OutputType([System.Collections.Hashtable])] - [cmdletbinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.Collections.Hashtable] - $Hashtable - ) - - $inputClone = $Hashtable.Clone() - $commonParameters = [System.Management.Automation.PSCmdlet]::CommonParameters - $commonParameters += [System.Management.Automation.PSCmdlet]::OptionalCommonParameters - - $Hashtable.Keys | Where-Object { $_ -in $commonParameters } | ForEach-Object { - $inputClone.Remove($_) - } - - return $inputClone -} - -<# -.SYNOPSIS - Tests the status of DSC resource parameters -.DESCRIPTION - This function tests the parameter status of DSC resource parameters against the current values present on the system -.PARAMETER CurrentValues - A hashtable with the current values on the system, obtained by e.g. Get-TargetResource -.PARAMETER DesiredValues - The hashtable of desired values -.PARAMETER ValuesToCheck - The values to check if not all values should be checked -.PARAMETER TurnOffTypeChecking - Indicates that the type of the parameter should not be checked -#> -function Test-DscParameterState -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.Collections.Hashtable] - $CurrentValues, - - [Parameter(Mandatory = $true)] - [object] - $DesiredValues, - - [Parameter()] - [string[]] - $ValuesToCheck, - - [Parameter()] - [switch] - $TurnOffTypeChecking - ) - - $returnValue = $true - - $types = 'System.Management.Automation.PSBoundParametersDictionary', 'System.Collections.Hashtable', 'Microsoft.Management.Infrastructure.CimInstance' - - if ($DesiredValues.GetType().FullName -notin $types) - { - throw ("Property 'DesiredValues' in Test-DscParameterState must be either a Hashtable or CimInstance. Type detected was $($DesiredValues.GetType().FullName)") - } - - if ($DesiredValues -is [Microsoft.Management.Infrastructure.CimInstance] -and -not $ValuesToCheck) - { - throw ("If 'DesiredValues' is a CimInstance then property 'ValuesToCheck' must contain a value") - } - - $desiredValuesClean = Remove-CommonParameter -Hashtable $DesiredValues - - if (-not $ValuesToCheck) - { - $keyList = $desiredValuesClean.Keys - } - else - { - $keyList = $ValuesToCheck - } - - foreach ($key in $keyList) - { - if ($null -ne $desiredValuesClean.$key) - { - $desiredType = $desiredValuesClean.$key.GetType() - } - else - { - $desiredType = [psobject]@{ - Name = 'Unknown' - } - } - - if ($null -ne $CurrentValues.$key) - { - $currentType = $CurrentValues.$key.GetType() - } - else - { - $currentType = [psobject]@{ - Name = 'Unknown' - } - } - - if ($currentType.Name -ne 'Unknown' -and $desiredType.Name -eq 'PSCredential') - { - # This is a credential object. Compare only the user name - if ($currentType.Name -eq 'PSCredential' -and $CurrentValues.$key.UserName -eq $desiredValuesClean.$key.UserName) - { - Write-Verbose -Message ('MATCH: PSCredential username match. Current state is {0} and desired state is {1}' -f $CurrentValues.$key.UserName, $desiredValuesClean.$key.UserName) - continue - } - else - { - Write-Verbose -Message ('NOTMATCH: PSCredential username mismatch. Current state is {0} and desired state is {1}' -f $CurrentValues.$key.UserName, $desiredValuesClean.$key.UserName) - $returnValue = $false - } - - # Assume the string is our username when the matching desired value is actually a credential - if ($currentType.Name -eq 'string' -and $CurrentValues.$key -eq $desiredValuesClean.$key.UserName) - { - Write-Verbose -Message ('MATCH: PSCredential username match. Current state is {0} and desired state is {1}' -f $CurrentValues.$key, $desiredValuesClean.$key.UserName) - continue - } - else - { - Write-Verbose -Message ('NOTMATCH: PSCredential username mismatch. Current state is {0} and desired state is {1}' -f $CurrentValues.$key, $desiredValuesClean.$key.UserName) - $returnValue = $false - } - } - - if (-not $TurnOffTypeChecking) - { - if (($desiredType.Name -ne 'Unknown' -and $currentType.Name -ne 'Unknown') -and - $desiredType.FullName -ne $currentType.FullName) - { - Write-Verbose -Message "NOTMATCH: Type mismatch for property '$key' Current state type is '$($currentType.Name)' and desired type is '$($desiredType.Name)'" - continue - } - } - - if ($CurrentValues.$key -eq $desiredValuesClean.$key -and -not $desiredType.IsArray) - { - Write-Verbose -Message "MATCH: Value (type $($desiredType.Name)) for property '$key' does match. Current state is '$($CurrentValues.$key)' and desired state is '$($desiredValuesClean.$key)'" - continue - } - - if ($desiredValuesClean.GetType().Name -in 'HashTable', 'PSBoundParametersDictionary') - { - $checkDesiredValue = $desiredValuesClean.ContainsKey($key) - } - else - { - $checkDesiredValue = Test-DSCObjectHasProperty -Object $desiredValuesClean -PropertyName $key - } - - if (-not $checkDesiredValue) - { - Write-Verbose -Message "MATCH: Value (type $($desiredType.Name)) for property '$key' does match. Current state is '$($CurrentValues.$key)' and desired state is '$($desiredValuesClean.$key)'" - continue - } - - if ($desiredType.IsArray) - { - Write-Verbose -Message "Comparing values in property '$key'" - if (-not $CurrentValues.ContainsKey($key) -or -not $CurrentValues.$key) - { - Write-Verbose -Message "NOTMATCH: Value (type $($desiredType.Name)) for property '$key' does not match. Current state is '$($CurrentValues.$key)' and desired state is '$($desiredValuesClean.$key)'" - $returnValue = $false - continue - } - elseif ($CurrentValues.$key.Count -ne $DesiredValues.$key.Count) - { - Write-Verbose -Message "NOTMATCH: Value (type $($desiredType.Name)) for property '$key' does have a different count. Current state count is '$($CurrentValues.$key.Count)' and desired state count is '$($desiredValuesClean.$key.Count)'" - $returnValue = $false - continue - } - else - { - $desiredArrayValues = $DesiredValues.$key - $currentArrayValues = $CurrentValues.$key - - for ($i = 0; $i -lt $desiredArrayValues.Count; $i++) - { - if ($null -ne $desiredArrayValues[$i]) - { - $desiredType = $desiredArrayValues[$i].GetType() - } - else - { - $desiredType = [psobject]@{ - Name = 'Unknown' - } - } - - if ($null -ne $currentArrayValues[$i]) - { - $currentType = $currentArrayValues[$i].GetType() - } - else - { - $currentType = [psobject]@{ - Name = 'Unknown' - } - } - - if (-not $TurnOffTypeChecking) - { - if (($desiredType.Name -ne 'Unknown' -and $currentType.Name -ne 'Unknown') -and - $desiredType.FullName -ne $currentType.FullName) - { - Write-Verbose -Message "`tNOTMATCH: Type mismatch for property '$key' Current state type of element [$i] is '$($currentType.Name)' and desired type is '$($desiredType.Name)'" - $returnValue = $false - continue - } - } - - if ($desiredArrayValues[$i] -ne $currentArrayValues[$i]) - { - Write-Verbose -Message "`tNOTMATCH: Value [$i] (type $($desiredType.Name)) for property '$key' does match. Current state is '$($currentArrayValues[$i])' and desired state is '$($desiredArrayValues[$i])'" - $returnValue = $false - continue - } - else - { - Write-Verbose -Message "`tMATCH: Value [$i] (type $($desiredType.Name)) for property '$key' does match. Current state is '$($currentArrayValues[$i])' and desired state is '$($desiredArrayValues[$i])'" - continue - } - } - - } - } - else - { - if ($desiredValuesClean.$key -ne $CurrentValues.$key) - { - Write-Verbose -Message "NOTMATCH: Value (type $($desiredType.Name)) for property '$key' does not match. Current state is '$($CurrentValues.$key)' and desired state is '$($desiredValuesClean.$key)'" - $returnValue = $false - } - - } - } - - Write-Verbose -Message "Result is '$returnValue'" - return $returnValue -} - -<# -.SYNOPSIS - Tests of an object has a property -.PARAMETER Object - The object to test -.PARAMETER PropertyName - The property name -#> -function Test-DSCObjectHasProperty -{ - [CmdletBinding()] - [OutputType([bool])] - param - ( - [Parameter(Mandatory = $true)] - [object] - $Object, - - [Parameter(Mandatory = $true)] - [string] - $PropertyName - ) - - if ($Object.PSObject.Properties.Name -contains $PropertyName) - { - return [bool] $Object.$PropertyName - } - - return $false -} - -<# - .SYNOPSIS - Creates and throws an invalid argument exception - - .PARAMETER Message - The message explaining why this error is being thrown - - .PARAMETER ArgumentName - The name of the invalid argument that is causing this error to be thrown -#> -function New-InvalidArgumentException -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Message, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ArgumentName - ) - - $argumentException = New-Object -TypeName 'ArgumentException' ` - -ArgumentList @($Message, $ArgumentName) - $newObjectParams = @{ - TypeName = 'System.Management.Automation.ErrorRecord' - ArgumentList = @($argumentException, $ArgumentName, 'InvalidArgument', $null) - } - $errorRecord = New-Object @newObjectParams - - throw $errorRecord -} - -<# - .SYNOPSIS - Creates and throws an invalid operation exception - - .PARAMETER Message - The message explaining why this error is being thrown - - .PARAMETER ErrorRecord - The error record containing the exception that is causing this terminating error -#> -function New-InvalidOperationException -{ - [CmdletBinding()] - param - ( - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $Message, - - [Parameter()] - [ValidateNotNull()] - [System.Management.Automation.ErrorRecord] - $ErrorRecord - ) - - if ($null -eq $Message) - { - $invalidOperationException = New-Object -TypeName 'InvalidOperationException' - } - elseif ($null -eq $ErrorRecord) - { - $invalidOperationException = New-Object -TypeName 'InvalidOperationException' ` - -ArgumentList @($Message) - } - else - { - $invalidOperationException = New-Object -TypeName 'InvalidOperationException' ` - -ArgumentList @($Message, $ErrorRecord.Exception) - } - - $newObjectParams = @{ - TypeName = 'System.Management.Automation.ErrorRecord' - ArgumentList = @( $invalidOperationException.ToString(), 'MachineStateIncorrect', - 'InvalidOperation', $null ) - } - - $errorRecordToThrow = New-Object @newObjectParams - throw $errorRecordToThrow -} - -Export-ModuleMember -Function @( - 'Get-LocalizedData' - 'Remove-CommonParameter' - 'Test-DscParameterState' - 'Test-DSCObjectHasProperty' - 'New-InvalidOperationException' - 'New-InvalidArgumentException' -) diff --git a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xComputer/MSFT_xComputer.psm1 b/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xComputer/MSFT_xComputer.psm1 deleted file mode 100644 index 772885c5..00000000 --- a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xComputer/MSFT_xComputer.psm1 +++ /dev/null @@ -1,386 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidGlobalVars", "", Scope = "Function")] -param -( -) - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateLength(1, 15)] - [ValidateScript( {$_ -inotmatch '[\/\\:*?"<>|]' })] - [System.String] - $Name, - - [Parameter()] - [System.String] - $DomainName, - - [Parameter()] - [System.String] - $JoinOU, - - [Parameter()] - [System.Management.Automation.PSCredential] - $Credential, - - [Parameter()] - [System.Management.Automation.PSCredential] - $UnjoinCredential, - - [Parameter()] - [System.String] - $WorkGroupName - ) - - Write-Verbose -Message "Getting computer state for '$($Name)'." - - $convertToCimCredential = New-CimInstance ` - -ClassName MSFT_Credential ` - -Property @{ - Username = [System.String] $Credential.UserName - Password = [System.String] $null - } ` - -Namespace root/microsoft/windows/desiredstateconfiguration ` - -ClientOnly - - $convertToCimUnjoinCredential = New-CimInstance ` - -ClassName MSFT_Credential ` - -Property @{ - Username = [System.String] $UnjoinCredential.UserName - Password = [System.String]$null - } ` - -Namespace root/microsoft/windows/desiredstateconfiguration ` - -ClientOnly - - $returnValue = @{ - Name = $env:COMPUTERNAME - DomainName = Get-ComputerDomain - JoinOU = $JoinOU - CurrentOU = Get-ComputerOU - Credential = [ciminstance]$convertToCimCredential - UnjoinCredential = [ciminstance]$convertToCimUnjoinCredential - WorkGroupName = (Get-CimInstance -Class 'Win32_ComputerSystem').Workgroup - } - - $returnValue -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateLength(1, 15)] - [ValidateScript( {$_ -inotmatch '[\/\\:*?"<>|]' })] - [System.String] - $Name, - - [Parameter()] - [System.String] - $DomainName, - - [Parameter()] - [System.String] - $JoinOU, - - [Parameter()] - [System.Management.Automation.PSCredential] - $Credential, - - [Parameter()] - [System.Management.Automation.PSCredential] - $UnjoinCredential, - - [Parameter()] - [System.String] - $WorkGroupName - ) - - Assert-DomainOrWorkGroup -DomainName $DomainName -WorkGroupName $WorkGroupName - - if ($Name -eq 'localhost') - { - $Name = $env:COMPUTERNAME - } - - if ($Credential) - { - if ($DomainName) - { - if ($DomainName -eq (Get-ComputerDomain)) - { - # Rename the computer, but stay joined to the domain. - Rename-Computer -NewName $Name -DomainCredential $Credential -Force - Write-Verbose -Message "Renamed computer to '$($Name)'." - } - else - { - if ($Name -ne $env:COMPUTERNAME) - { - # Rename the computer, and join it to the domain. - if ($UnjoinCredential) - { - Add-Computer -DomainName $DomainName -Credential $Credential -NewName $Name -UnjoinDomainCredential $UnjoinCredential -Force - } - else - { - if ($JoinOU) - { - Add-Computer -DomainName $DomainName -Credential $Credential -NewName $Name -OUPath $JoinOU -Force - } - else - { - Add-Computer -DomainName $DomainName -Credential $Credential -NewName $Name -Force - } - } - Write-Verbose -Message "Renamed computer to '$($Name)' and added to the domain '$($DomainName)." - } - else - { - # Same computer name, and join it to the domain. - if ($UnjoinCredential) - { - Add-Computer -DomainName $DomainName -Credential $Credential -UnjoinDomainCredential $UnjoinCredential -Force - } - else - { - if ($JoinOU) - { - Add-Computer -DomainName $DomainName -Credential $Credential -OUPath $JoinOU -Force - } - else - { - Add-Computer -DomainName $DomainName -Credential $Credential -Force - } - } - Write-Verbose -Message "Added computer to domain '$($DomainName)." - } - } - } - elseif ($WorkGroupName) - { - if ($WorkGroupName -eq (Get-CimInstance -Class 'Win32_ComputerSystem').Workgroup) - { - # Rename the computer, but stay in the same workgroup. - Rename-Computer -NewName $Name - Write-Verbose -Message "Renamed computer to '$($Name)'." - } - else - { - if ($Name -ne $env:COMPUTERNAME) - { - # Rename the computer, and join it to the workgroup. - Add-Computer -NewName $Name -Credential $Credential -WorkgroupName $WorkGroupName -Force - Write-Verbose -Message "Renamed computer to '$($Name)' and addded to workgroup '$($WorkGroupName)'." - } - else - { - # Same computer name, and join it to the workgroup. - Add-Computer -WorkGroupName $WorkGroupName -Credential $Credential -Force - Write-Verbose -Message "Added computer to workgroup '$($WorkGroupName)'." - } - } - } - elseif ($Name -ne $env:COMPUTERNAME) - { - if (Get-ComputerDomain) - { - Rename-Computer -NewName $Name -DomainCredential $Credential -Force - Write-Verbose -Message "Renamed computer to '$($Name)'." - } - else - { - Rename-Computer -NewName $Name -Force - Write-Verbose -Message "Renamed computer to '$($Name)'." - } - } - } - else - { - if ($DomainName) - { - throw 'Missing domain join credentials.' - } - if ($WorkGroupName) - { - - if ($WorkGroupName -eq (Get-CimInstance -Class 'Win32_ComputerSystem').Workgroup) - { - # Same workgroup, new computer name - Rename-Computer -NewName $Name -force - Write-Verbose -Message "Renamed computer to '$($Name)'." - } - else - { - if ($name -ne $env:COMPUTERNAME) - { - # New workgroup, new computer name - Add-Computer -WorkgroupName $WorkGroupName -NewName $Name - Write-Verbose -Message "Renamed computer to '$($Name)' and added to workgroup '$($WorkGroupName)'." - } - else - { - # New workgroup, same computer name - Add-Computer -WorkgroupName $WorkGroupName - Write-Verbose -Message "Added computer to workgroup '$($WorkGroupName)'." - } - } - } - else - { - if ($Name -ne $env:COMPUTERNAME) - { - Rename-Computer -NewName $Name - Write-Verbose -Message "Renamed computer to '$($Name)'." - } - } - } - - $global:DSCMachineStatus = 1 -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateLength(1, 15)] - [ValidateScript( {$_ -inotmatch '[\/\\:*?"<>|]' })] - [System.String] - $Name, - - [Parameter()] - [System.String] - $JoinOU, - - [Parameter()] - [System.Management.Automation.PSCredential] - $Credential, - - [Parameter()] - [System.Management.Automation.PSCredential] - $UnjoinCredential, - - [Parameter()] - [System.String] - $DomainName, - - [Parameter()] - [System.String] - $WorkGroupName - ) - - Write-Verbose -Message 'Validate desired Name is a valid name' - - Write-Verbose -Message 'Checking if computer name is correct' - if (($Name -ne 'localhost') -and ($Name -ne $env:COMPUTERNAME)) - { - return $false - } - - Assert-DomainOrWorkGroup -DomainName $DomainName -WorkGroupName $WorkGroupName - - if ($DomainName) - { - if (-not ($Credential)) - { - throw 'Need to specify credentials with domain' - } - - try - { - Write-Verbose "Checking if the machine is a member of $DomainName." - - if ($DomainName.Contains('.')) - { - $getComputerDomainParameters = @{ - netbios = $false - } - } - else - { - $getComputerDomainParameters = @{ - netbios = $true - } - } - - return ($DomainName -eq (Get-ComputerDomain @getComputerDomainParameters)) - } - catch - { - Write-Verbose 'The machine is not a domain member.' - - return $false - } - } - elseif ($WorkGroupName) - { - Write-Verbose -Message "Checking if workgroup name is $WorkGroupName" - - return ($WorkGroupName -eq (Get-CimInstance -Class 'Win32_ComputerSystem').Workgroup) - } - else - { - # No Domain or Workgroup specified and computer name is correct - return $true - } -} - -function Assert-DomainOrWorkGroup($DomainName, $WorkGroupName) -{ - if ($DomainName -and $WorkGroupName) - { - throw 'Only DomainName or WorkGroupName can be specified at once.' - } -} - -function Get-ComputerDomain -{ - [CmdletBinding()] - param - ( - [Parameter()] - [Switch] - $NetBios - ) - - try - { - if ($NetBios) - { - $domainName = $ENV:USERDOMAIN - } - else - { - $domainName = ([System.DirectoryServices.ActiveDirectory.Domain]::GetComputerDomain()).Name - } - return $domainName - } - catch [System.Management.Automation.MethodInvocationException] - { - Write-Debug 'This machine is not a domain member.' - } -} - -function Get-ComputerOU -{ - $ou = $null - - if (Get-ComputerDomain) - { - $dn = $null - $dn = ([adsisearcher]"(&(objectCategory=computer)(objectClass=computer)(cn=$env:COMPUTERNAME))").FindOne().Properties.distinguishedname - $ou = $dn -replace '^(CN=.*?(?<=,))', '' - } - - return $ou -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xComputer/MSFT_xComputer.schema.mof b/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xComputer/MSFT_xComputer.schema.mof deleted file mode 100644 index 44bc6b97..00000000 --- a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xComputer/MSFT_xComputer.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.1.0"), FriendlyName("xComputer")] -class MSFT_xComputer : OMI_BaseResource -{ - [key] string Name; - [write] string DomainName; - [write] string JoinOU; - [read] string CurrentOU; - [write,EmbeddedInstance("MSFT_Credential")] String Credential; - [write,EmbeddedInstance("MSFT_Credential")] String UnjoinCredential; - [write] string WorkGroupName; -}; diff --git a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xOfflineDomainJoin/MSFT_xOfflineDomainJoin.psm1 b/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xOfflineDomainJoin/MSFT_xOfflineDomainJoin.psm1 deleted file mode 100644 index 820f4925..00000000 --- a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xOfflineDomainJoin/MSFT_xOfflineDomainJoin.psm1 +++ /dev/null @@ -1,224 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidGlobalVars", "", Scope="Function")] -param -( -) - -Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) ` - -ChildPath 'CommonResourceHelper.psm1') -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xOfflineDomainJoin' - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [System.String] - $IsSingleInstance, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $RequestFile - ) - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.GettingOfflineDomainJoinMessage) - ) -join '') - - <# - It is not possible to read the ODJ file that was used to join a domain - So it has to always be returned as blank. - #> - $returnValue = @{ - IsSingleInstance = 'Yes' - RequestFile = '' - } - - return $returnValue -} # Get-TargetResource - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [System.String] - $IsSingleInstance, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $RequestFile - ) - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.ApplyingOfflineDomainJoinMessage) - ) -join '') - - # Check the ODJ Request file exists - if (-not (Test-Path -Path $RequestFile)) - { - $errorId = 'RequestFileNotFoundError' - $errorCategory = [System.Management.Automation.ErrorCategory]::ObjectNotFound - $errorMessage = $($script:localizedData.RequestFileNotFoundError) ` - -f $RequestFile - $exception = New-Object -TypeName System.ArgumentException ` - -ArgumentList $errorMessage - $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord ` - -ArgumentList $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord) - } # if - - <# - Don't need to check if the domain is already joined because - Set-TargetResource wouldn't fire unless it wasn't. - #> - Join-Domain -RequestFile $RequestFile -} # Set-TargetResource - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [System.String] - $IsSingleInstance, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $RequestFile - ) - - # Flag to signal whether settings are correct - [System.Boolean] $desiredConfigurationMatch = $true - - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($script:localizedData.CheckingOfflineDomainJoinMessage) - ) -join '') - - # Check the ODJ Request file exists - if (-not (Test-Path -Path $RequestFile)) - { - $errorId = 'RequestFileNotFoundError' - $errorCategory = [System.Management.Automation.ErrorCategory]::ObjectNotFound - $errorMessage = $($script:localizedData.RequestFileNotFoundError) ` - -f $RequestFile - $exception = New-Object -TypeName System.ArgumentException ` - -ArgumentList $errorMessage - $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord ` - -ArgumentList $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord) - } # if - - $CurrentDomainName = Get-DomainName - - if($CurrentDomainName) - { - # Domain is already joined. - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($script:localizedData.DomainAlreadyJoinedMessage) ` - -f $CurrentDomainName ` - ) -join '' ) - } - else - { - # Domain is not joined, so change is required. - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($script:localizedData.DomainNotJoinedMessage) - ) -join '') - - $desiredConfigurationMatch = $false - } # if - return $desiredConfigurationMatch -} # Test-TargetResource - -<# - .SYNOPSIS - Uses DJoin.exe to join a Domain using a ODJ Request File. -#> -function Join-Domain { - [CmdletBinding()] - param( - [Parameter(Mandatory=$true)] - [System.String] - $RequestFile - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($script:localizedData.AttemptingDomainJoinMessage) ` - -f $RequestFile ` - ) -join '' ) - - $Result = & djoin.exe @( - '/REQUESTODJ' - '/LOADFILE' - $RequestFile - '/WINDOWSPATH' - $ENV:SystemRoot - '/LOCALOS') - - if ($LASTEXITCODE -eq 0) - { - # Notify DSC that a reboot is required. - $global:DSCMachineStatus = 1 - } - else - { - Write-Verbose -Message $Result - - $errorId = 'DjoinError' - $errorCategory = [System.Management.Automation.ErrorCategory]::ObjectNotFound - $errorMessage = $($script:localizedData.DjoinError) ` - -f $LASTEXITCODE - $exception = New-Object -TypeName System.ArgumentException ` - -ArgumentList $errorMessage - $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord ` - -ArgumentList $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord) - } # if - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($script:localizedData.DomainJoinedMessage) ` - -f $RequestFile ` - ) -join '' ) -} # function Join-Domain - -<# - .SYNOPSIS - Returns the name of the Domain the computer is joined to or - $null if not domain joined. -#> -function Get-DomainName -{ - [CmdletBinding()] - [OutputType([System.String])] - param() - - # Use CIM to detect the domain name so that this will work on Nano Server. - $computerSystem = Get-CimInstance -ClassName 'Win32_ComputerSystem' -Namespace root\cimv2 - if ($computerSystem.Workgroup) - { - return $null - } - else - { - $computerSystem.Domain - } -} # function Get-DomainName - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xOfflineDomainJoin/MSFT_xOfflineDomainJoin.schema.mof b/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xOfflineDomainJoin/MSFT_xOfflineDomainJoin.schema.mof deleted file mode 100644 index 2ffc8b06..00000000 --- a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xOfflineDomainJoin/MSFT_xOfflineDomainJoin.schema.mof +++ /dev/null @@ -1,6 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xOfflineDomainJoin")] -class MSFT_xOfflineDomainJoin : OMI_BaseResource -{ - [Key, Description("Specifies the resource is a single instance, the value must be 'Yes'"), ValueMap{"Yes"}, Values{"Yes"}] String IsSingleInstance; - [Required, Description("The full path to the Offline Domain Join Request file to use.")] String RequestFile; -}; diff --git a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xOfflineDomainJoin/en-us/MSFT_xOfflineDomainJoin.strings.psd1 b/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xOfflineDomainJoin/en-us/MSFT_xOfflineDomainJoin.strings.psd1 deleted file mode 100644 index 75a4c4ee..00000000 --- a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xOfflineDomainJoin/en-us/MSFT_xOfflineDomainJoin.strings.psd1 +++ /dev/null @@ -1,11 +0,0 @@ -ConvertFrom-StringData @' - GettingOfflineDomainJoinMessage=Getting the Offline Domain Join State. - ApplyingOfflineDomainJoinMessage=Applying the Offline Domain Join State. - AttemptingDomainJoinMessage=Attempting domain join using ODJ Request file '{0}'. - DomainJoinedMessage=Domain joined using ODJ Request file '{0}'. Reboot will be required. - CheckingOfflineDomainJoinMessage=Checking the Offline Domain Join State. - DomainAlreadyJoinedMessage=The computer is already joined to a domain '{0}'. Change not required. - DomainNotJoinedMessage=The computer is not joined to a domain. Change required. - RequestFileNotFoundError=The ODJ Request file '{0}' does not exist. - DjoinError=Error {0} occured requesting the Offline Domain Join. -'@ diff --git a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xPowerPlan/MSFT_xPowerPlan.psm1 b/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xPowerPlan/MSFT_xPowerPlan.psm1 deleted file mode 100644 index f94c5561..00000000 --- a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xPowerPlan/MSFT_xPowerPlan.psm1 +++ /dev/null @@ -1,176 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) ` - -ChildPath 'CommonResourceHelper.psm1') -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xPowerPlan' - -<# - .SYNOPSIS - Returns the current state of the power plan. - - .PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. - - .PARAMETER Name - Specifies the name of the power plan to assign to the node. - - .EXAMPLE - Get-TargetResource -IsSingleInstance 'Yes' -Name 'High performance' -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - # This is best practice when writing a single-instance DSC resource. - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [System.String] - $IsSingleInstance, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name - ) - - $arguments = @{ - Name = 'root\cimv2\power' - Class = 'Win32_PowerPlan' - Filter = "ElementName = '$Name'" - } - - try - { - $plan = Get-CimInstance @arguments - } - catch - { - throw ($script:localizedData.PowerPlanCIMError -f $($arguments.Class) ) - } - - if ($plan) - { - if ($plan.IsActive) - { - Write-Verbose -Message ($script:localizedData.PowerPlanIsActive -f $Name) - $activePlanName = $Name - } - else - { - Write-Verbose -Message ($script:localizedData.PowerPlanIsNotActive -f $Name) - $activePlanName = $null - } - } - else - { - throw ($script:localizedData.PowerPlanNotFound -f $Name) - } - - return @{ - IsSingleInstance = $IsSingleInstance - Name = $activePlanName - } -} - -<# - .SYNOPSIS - Assign the power plan to the node. - - .PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. - - .PARAMETER Name - Specifies the name of the power plan to assign to the node. - - .EXAMPLE - Set-TargetResource -IsSingleInstance 'Yes' -Name 'High performance' -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - # This is best practice when writing a single-instance DSC resource. - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [System.String] - $IsSingleInstance, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name - ) - - Write-Verbose -Message ($script:localizedData.PowerPlanIsBeingActivated -f $Name) - - $arguments = @{ - Name = 'root\cimv2\power' - Class = 'Win32_PowerPlan' - Filter = "ElementName = '$Name'" - } - - try - { - $plan = Get-CimInstance @arguments - } - catch - { - throw ($script:localizedData.PowerPlanCIMError -f $($arguments.Class) ) - } - - try - { - $plan | Invoke-CimMethod -MethodName Activate - } - catch - { - throw ($script:localizedData.PowerPlanWasUnableToBeSet -f $Name, $($_.Exception.Message)) - } -} - -<# - .SYNOPSIS - Tests if the power plan is assigned to the node. - - .PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. - - .PARAMETER Name - Specifies the name of the power plan to assign to the node. - - .EXAMPLE - Test-TargetResource -IsSingleInstance 'Yes' -Name 'High performance' -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - # This is best practice when writing a single-instance DSC resource. - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [System.String] - $IsSingleInstance, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name - ) - - $returnValue = $false - - Write-Verbose -Message ($script:localizedData.PowerPlanIsBeingValidated -f $Name) - - $getTargetResourceResult = Get-TargetResource -IsSingleInstance $IsSingleInstance -Name $Name - if ($getTargetResourceResult.Name -eq $Name) - { - $returnValue = $true - } - - return $returnValue -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xPowerPlan/MSFT_xPowerPlan.schema.mof b/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xPowerPlan/MSFT_xPowerPlan.schema.mof deleted file mode 100644 index 1bc57781..00000000 --- a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xPowerPlan/MSFT_xPowerPlan.schema.mof +++ /dev/null @@ -1,6 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xPowerPlan")] -class MSFT_xPowerPlan : OMI_BaseResource -{ - [Key, Description("Specifies the resource is a single instance, the value must be 'Yes'"), ValueMap{"Yes"}, Values{"Yes"}] String IsSingleInstance; - [Required, Description("The name of the power plan to activate.")] String Name; -}; diff --git a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xPowerPlan/en-US/MSFT_xPowerPlan.schema.mfl b/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xPowerPlan/en-US/MSFT_xPowerPlan.schema.mfl deleted file mode 100644 index 7151bc9d..00000000 --- a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xPowerPlan/en-US/MSFT_xPowerPlan.schema.mfl +++ /dev/null @@ -1,6 +0,0 @@ -[Description("This resource is used to activate a power plan.") : Amended,AMENDMENT, LOCALE("MS_409")] -class MSFT_xPowerPlan : OMI_BaseResource -{ - [Key, Description("Specifies the resource is a single instance, the value must be 'Yes'") : Amended] String IsSingleInstance; - [Description("The name of the power plan to activate.") : Amended] String Name; -}; diff --git a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xPowerPlan/en-US/MSFT_xPowerPlan.strings.psd1 b/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xPowerPlan/en-US/MSFT_xPowerPlan.strings.psd1 deleted file mode 100644 index 88dda318..00000000 --- a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xPowerPlan/en-US/MSFT_xPowerPlan.strings.psd1 +++ /dev/null @@ -1,11 +0,0 @@ -# Localized resources for WindowsOptionalFeature - -ConvertFrom-StringData @' - PowerPlanIsActive = The power plan '{0}' is the active plan. - PowerPlanIsNotActive = The power plan '{0}' is not the active plan. - PowerPlanNotFound = Unable to find the power plan '{0}'. - PowerPlanIsBeingActivated = Activating power plan '{0}' - PowerPlanIsBeingValidated = Validating power plan '{0}' - PowerPlanWasUnableToBeSet = Unable to set the power plan '{0}' to the active plan. Error message: {1} - PowerPlanCIMError = Could not get the Common Information Model (CIM) instances of class {0} -'@ diff --git a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xScheduledTask/MSFT_xScheduledTask.psm1 b/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xScheduledTask/MSFT_xScheduledTask.psm1 deleted file mode 100644 index 1d3c4f0e..00000000 --- a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xScheduledTask/MSFT_xScheduledTask.psm1 +++ /dev/null @@ -1,1361 +0,0 @@ -Add-Type -TypeDefinition @' -namespace xScheduledTask -{ - public enum DaysOfWeek - { - Sunday = 1, - Monday = 2, - Tuesday = 4, - Wednesday = 8, - Thursday = 16, - Friday = 32, - Saturday = 64 - } -} -'@ - -Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -ChildPath 'CommonResourceHelper.psm1') - -<# -.SYNOPSIS - Gets the current resource state -.PARAMETER TaskName - The name of the task -.PARAMETER TaskPath - The path to the task - defaults to the root directory -.PARAMETER Description - The task description -.PARAMETER ActionExecutable - The path to the .exe for this task -.PARAMETER ActionArguments - The arguments to pass the executable -.PARAMETER ActionWorkingPath - The working path to specify for the executable -.PARAMETER ScheduleType - When should the task be executed -.PARAMETER RepeatInterval - How many units (minutes, hours, days) between each run of this task? -.PARAMETER StartTime - The time of day this task should start at - defaults to 12:00 AM. Not valid for AtLogon and AtStartup tasks -.PARAMETER Ensure - Present if the task should exist, Absent if it should be removed -.PARAMETER Enable - True if the task should be enabled, false if it should be disabled -.PARAMETER ExecuteAsCredential - The credential this task should execute as. If not specified defaults to running as the local system account -.PARAMETER DaysInterval - Specifies the interval between the days in the schedule. An interval of 1 produces a daily schedule. An interval of 2 produces an every-other day schedule. -.PARAMETER RandomDelay - Specifies a random amount of time to delay the start time of the trigger. The delay time is a random time between the time the task triggers and the time that you specify in this setting. -.PARAMETER RepetitionDuration - Specifies how long the repetition pattern repeats after the task starts. -.PARAMETER DaysOfWeek - Specifies an array of the days of the week on which Task Scheduler runs the task. -.PARAMETER WeeksInterval - Specifies the interval between the weeks in the schedule. An interval of 1 produces a weekly schedule. An interval of 2 produces an every-other week schedule. -.PARAMETER User - Specifies the identifier of the user for a trigger that starts a task when a user logs on. -.PARAMETER DisallowDemandStart - Indicates whether the task is prohibited to run on demand or not. Defaults to $false -.PARAMETER DisallowHardTerminate - Indicates whether the task is prohibited to be terminated or not. Defaults to $false -.PARAMETER Compatibility - The task compatibility level. Defaults to Vista. -.PARAMETER AllowStartIfOnBatteries - Indicates whether the task should start if the machine is on batteries or not. Defaults to $false -.PARAMETER Hidden - Indicates that the task is hidden in the Task Scheduler UI. -.PARAMETER RunOnlyIfIdle - Indicates that Task Scheduler runs the task only when the computer is idle. -.PARAMETER IdleWaitTimeout - Specifies the amount of time that Task Scheduler waits for an idle condition to occur. -.PARAMETER NetworkName - Specifies the name of a network profile that Task Scheduler uses to determine if the task can run. - The Task Scheduler UI uses this setting for display purposes. Specify a network name if you specify the RunOnlyIfNetworkAvailable parameter. -.PARAMETER DisallowStartOnRemoteAppSession - Indicates that the task does not start if the task is triggered to run in a Remote Applications Integrated Locally (RAIL) session. -.PARAMETER StartWhenAvailable - Indicates that Task Scheduler can start the task at any time after its scheduled time has passed. -.PARAMETER DontStopIfGoingOnBatteries - Indicates that the task does not stop if the computer switches to battery power. -.PARAMETER WakeToRun - Indicates that Task Scheduler wakes the computer before it runs the task. -.PARAMETER IdleDuration - Specifies the amount of time that the computer must be in an idle state before Task Scheduler runs the task. -.PARAMETER RestartOnIdle - Indicates that Task Scheduler restarts the task when the computer cycles into an idle condition more than once. -.PARAMETER DontStopOnIdleEnd - Indicates that Task Scheduler does not terminate the task if the idle condition ends before the task is completed. -.PARAMETER ExecutionTimeLimit - Specifies the amount of time that Task Scheduler is allowed to complete the task. -.PARAMETER MultipleInstances - Specifies the policy that defines how Task Scheduler handles multiple instances of the task. -.PARAMETER Priority - Specifies the priority level of the task. Priority must be an integer from 0 (highest priority) to 10 (lowest priority). - The default value is 7. Priority levels 7 and 8 are used for background tasks. Priority levels 4, 5, and 6 are used for interactive tasks. -.PARAMETER RestartCount - Specifies the number of times that Task Scheduler attempts to restart the task. -.PARAMETER RestartInterval - Specifies the amount of time that Task Scheduler attempts to restart the task. -.PARAMETER RunOnlyIfNetworkAvailable - Indicates that Task Scheduler runs the task only when a network is available. Task Scheduler uses the NetworkID - parameter and NetworkName parameter that you specify in this cmdlet to determine if the network is available. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $TaskName, - - [Parameter()] - [System.String] - $TaskPath = '\', - - [Parameter()] - [System.String] - $Description, - - [Parameter(Mandatory = $true)] - [System.String] - $ActionExecutable, - - [Parameter()] - [System.String] - $ActionArguments, - - [Parameter()] - [System.String] - $ActionWorkingPath, - - [Parameter(Mandatory = $true)] - [System.String] - [ValidateSet('Once', 'Daily', 'Weekly', 'AtStartup', 'AtLogOn')] - $ScheduleType, - - [Parameter()] - [System.DateTime] - $RepeatInterval = [System.DateTime] '00:00:00', - - [Parameter()] - [System.DateTime] - $StartTime = [System.DateTime]::Today, - - [Parameter()] - [System.String] - [ValidateSet('Present', 'Absent')] - $Ensure = 'Present', - - [Parameter()] - [System.Boolean] - $Enable = $true, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ExecuteAsCredential, - - [Parameter()] - [System.UInt32] - $DaysInterval = 1, - - [Parameter()] - [System.DateTime] - $RandomDelay = [System.DateTime] '00:00:00', - - [Parameter()] - [System.DateTime] - $RepetitionDuration = [System.DateTime] '00:00:00', - - [Parameter()] - [System.String[]] - $DaysOfWeek, - - [Parameter()] - [System.UInt32] - $WeeksInterval = 1, - - [Parameter()] - [System.String] - $User, - - [Parameter()] - [System.Boolean] - $DisallowDemandStart = $false, - - [Parameter()] - [System.Boolean] - $DisallowHardTerminate = $false, - - [Parameter()] - [ValidateSet('AT', 'V1', 'Vista', 'Win7', 'Win8')] - [System.String] - $Compatibility = 'Vista', - - [Parameter()] - [System.Boolean] - $AllowStartIfOnBatteries = $false, - - [Parameter()] - [System.Boolean] - $Hidden = $false, - - [Parameter()] - [System.Boolean] - $RunOnlyIfIdle = $false, - - [Parameter()] - [System.DateTime] - $IdleWaitTimeout = [System.DateTime] '02:00:00', - - [Parameter()] - [System.String] - $NetworkName, - - [Parameter()] - [System.Boolean] - $DisallowStartOnRemoteAppSession = $false, - - [Parameter()] - [System.Boolean] - $StartWhenAvailable = $false, - - [Parameter()] - [System.Boolean] - $DontStopIfGoingOnBatteries = $false, - - [Parameter()] - [System.Boolean] - $WakeToRun = $false, - - [Parameter()] - [System.DateTime] - $IdleDuration = [System.DateTime] '01:00:00', - - [Parameter()] - [System.Boolean] - $RestartOnIdle = $false, - - [Parameter()] - [System.Boolean] - $DontStopOnIdleEnd = $false, - - [Parameter()] - [System.DateTime] - $ExecutionTimeLimit = [System.DateTime] '8:00:00', - - [Parameter()] - [ValidateSet('IgnoreNew', 'Parallel', 'Queue')] - [System.String] - $MultipleInstances = 'Queue', - - [Parameter()] - [System.UInt32] - $Priority = 7, - - [Parameter()] - [System.UInt32] - $RestartCount = 0, - - [Parameter()] - [System.DateTime] - $RestartInterval = [System.DateTime] '00:00:00', - - [Parameter()] - [System.Boolean] - $RunOnlyIfNetworkAvailable = $false - ) - - $TaskPath = ConvertTo-NormalizedTaskPath -TaskPath $TaskPath - - Write-Verbose -Message ('Retrieving existing task ({0} in {1})' -f $TaskName, $TaskPath) - - $task = Get-ScheduledTask -TaskName $TaskName -TaskPath $TaskPath -ErrorAction SilentlyContinue - - if ($null -eq $task) - { - Write-Verbose -Message ('No task found. returning empty task {0} with Ensure = "Absent"' -f $Taskname) - return @{ - TaskName = $TaskName - ActionExecutable = $ActionExecutable - Ensure = 'Absent' - ScheduleType = $ScheduleType - } - } - else - { - Write-Verbose -Message ('Task {0} found in {1}. Retrieving settings, first action, first trigger and repetition settings' -f $TaskName, $TaskPath) - $action = $task.Actions | Select-Object -First 1 - $trigger = $task.Triggers | Select-Object -First 1 - $settings = $task.Settings - $returnScheduleType = 'Unknown' - $returnInveral = 0 - - switch ($trigger.CimClass.CimClassName) - { - 'MSFT_TaskTimeTrigger' - { - $returnScheduleType = 'Once' - break - } - 'MSFT_TaskDailyTrigger' - { - $returnScheduleType = 'Daily' - break - } - - 'MSFT_TaskWeeklyTrigger' - { - $returnScheduleType = 'Weekly' - break - } - - 'MSFT_TaskBootTrigger' - { - $returnScheduleType = 'AtStartup' - break - } - - 'MSFT_TaskLogonTrigger' - { - $returnScheduleType = 'AtLogon' - break - } - - default - { - New-InvalidArgumentException -Message "Trigger type $_ not recognized." -ArgumentName CimClassName - } - } - - Write-Verbose -Message ('Detected schedule type {0} for first trigger' -f $returnScheduleType) - - Write-Verbose -Message 'Calculating timespans/datetimes from trigger repetition settings' - - $repInterval = $trigger.Repetition.Interval - $Days = $Hours = $Minutes = $Seconds = 0 - - if ($repInterval -match 'P(?\d{0,3})D') - { - $Days = $matches.Days - } - - if ($repInterval -match '(?\d{0,2})H') - { - $Hours = $matches.Hours - } - - if ($repInterval -match '(?\d{0,2})M') - { - $Minutes = $matches.Minutes - } - - if ($repInterval -match '(?\d{0,2})S') - { - $Seconds = $matches.Seconds - } - - $returnInveral = New-TimeSpan -Days $Days -Hours $Hours -Minutes $Minutes -Seconds $seconds - - $repDuration = $trigger.Repetition.Duration - $Days = $Hours = $Minutes = $Seconds = 0 - - if ($repDuration -match 'P(?\d{0,3})D') - { - $Days = $matches.Days - } - - if ($repDuration -match '(?\d{0,2})H') - { - $Hours = $matches.Hours - } - - if ($repDuration -match '(?\d{0,2})M') - { - $Minutes = $matches.Minutes - } - - if ($repDuration -match '(?\d{0,2})S') - { - $Seconds = $matches.Seconds - } - - $repetitionDurationReturn = New-TimeSpan -Days $Days -Hours $Hours -Minutes $Minutes -Seconds $seconds - - $resInterval = $settings.RestartInterval - $Days = $Hours = $Minutes = $Seconds = 0 - - if ($resInterval -match 'P(?\d{0,3})D') - { - $Days = $matches.Days - } - - if ($resInterval -match '(?\d{0,2})H') - { - $Hours = $matches.Hours - } - - if ($resInterval -match '(?\d{0,2})M') - { - $Minutes = $matches.Minutes - } - - if ($resInterval -match '(?\d{0,2})S') - { - $Seconds = $matches.Seconds - } - - $restartIntervalReturn = New-TimeSpan -Days $Days -Hours $Hours -Minutes $Minutes -Seconds $seconds - - $exeLim = $settings.ExecutionTimeLimit - $Days = $Hours = $Minutes = $Seconds = 0 - - if ($exeLim -match 'P(?\d{0,3})D') - { - $Days = $matches.Days - } - - if ($exeLim -match '(?\d{0,2})H') - { - $Hours = $matches.Hours - } - - if ($exeLim -match '(?\d{0,2})M') - { - $Minutes = $matches.Minutes - } - - if ($exeLim -match '(?\d{0,2})S') - { - $Seconds = $matches.Seconds - } - - $executionTimeLimitReturn = New-TimeSpan -Days $Days -Hours $Hours -Minutes $Minutes -Seconds $seconds - - $idleDur = $settings.IdleSettings.IdleDuration - $Days = $Hours = $Minutes = $Seconds = 0 - - if ($idleDur -match 'P(?\d{0,3})D') - { - $Days = $matches.Days - } - - if ($idleDur -match '(?\d{0,2})H') - { - $Hours = $matches.Hours - } - - if ($idleDur -match '(?\d{0,2})M') - { - $Minutes = $matches.Minutes - } - - if ($idleDur -match '(?\d{0,2})S') - { - $Seconds = $matches.Seconds - } - - $idleDurationReturn = New-TimeSpan -Days $Days -Hours $Hours -Minutes $Minutes -Seconds $seconds - - $idleWait = $settings.IdleSettings.IdleWaitTimeout - $Days = $Hours = $Minutes = $Seconds = 0 - - if ($idleWait -match 'P(?\d{0,3})D') - { - $Days = $matches.Days - } - - if ($idleWait -match '(?\d{0,2})H') - { - $Hours = $matches.Hours - } - - if ($idleWait -match '(?\d{0,2})M') - { - $Minutes = $matches.Minutes - } - - if ($idleWait -match '(?\d{0,2})S') - { - $Seconds = $matches.Seconds - } - - $idleWaitTimeoutReturn = New-TimeSpan -Days $Days -Hours $Hours -Minutes $Minutes -Seconds $seconds - - $rndDelay = $trigger.RandomDelay - $Days = $Hours = $Minutes = $Seconds = 0 - - if ($rndDelay -match 'P(?\d{0,3})D') - { - $Days = $matches.Days - } - - if ($rndDelay -match '(?\d{0,2})H') - { - $Hours = $matches.Hours - } - - if ($rndDelay -match '(?\d{0,2})M') - { - $Minutes = $matches.Minutes - } - - if ($rndDelay -match '(?\d{0,2})S') - { - $Seconds = $matches.Seconds - } - - $randomDelayReturn = New-TimeSpan -Days $Days -Hours $Hours -Minutes $Minutes -Seconds $seconds - - $DaysOfWeek = @() - foreach ($binaryAdductor in 1, 2, 4, 8, 16, 32, 64) - { - $Day = $trigger.DaysOfWeek -band $binaryAdductor - if ($Day -ne 0) - { - $DaysOfWeek += [xScheduledTask.DaysOfWeek] $Day - } - } - - $startAt = $trigger.StartBoundary - - if ($startAt) - { - $startAt = [System.DateTime] $startAt - } - else - { - $startAt = $StartTime - } - - return @{ - TaskName = $task.TaskName - TaskPath = $task.TaskPath - StartTime = $startAt - Ensure = 'Present' - Description = $task.Description - ActionExecutable = $action.Execute - ActionArguments = $action.Arguments - ActionWorkingPath = $action.WorkingDirectory - ScheduleType = $returnScheduleType - RepeatInterval = [System.DateTime]::Today.Add($returnInveral) - ExecuteAsCredential = $task.Principal.UserId - Enable = $settings.Enabled - DaysInterval = $trigger.DaysInterval - RandomDelay = [System.DateTime]::Today.Add($randomDelayReturn) - RepetitionDuration = [System.DateTime]::Today.Add($repetitionDurationReturn) - DaysOfWeek = $DaysOfWeek - WeeksInterval = $trigger.WeeksInterval - User = $task.Principal.UserId - DisallowDemandStart = -not $settings.AllowDemandStart - DisallowHardTerminate = -not $settings.AllowHardTerminate - Compatibility = $settings.Compatibility - AllowStartIfOnBatteries = -not $settings.DisallowStartIfOnBatteries - Hidden = $settings.Hidden - RunOnlyIfIdle = $settings.RunOnlyIfIdle - IdleWaitTimeout = $idleWaitTimeoutReturn - NetworkName = $settings.NetworkSettings.Name - DisallowStartOnRemoteAppSession = $settings.DisallowStartOnRemoteAppSession - StartWhenAvailable = $settings.StartWhenAvailable - DontStopIfGoingOnBatteries = -not $settings.StopIfGoingOnBatteries - WakeToRun = $settings.WakeToRun - IdleDuration = [System.DateTime]::Today.Add($idleDurationReturn) - RestartOnIdle = $settings.IdleSettings.RestartOnIdle - DontStopOnIdleEnd = -not $settings.IdleSettings.StopOnIdleEnd - ExecutionTimeLimit = [System.DateTime]::Today.Add($executionTimeLimitReturn) - MultipleInstances = $settings.MultipleInstances - Priority = $settings.Priority - RestartCount = $settings.RestartCount - RestartInterval = [System.DateTime]::Today.Add($restartIntervalReturn) - RunOnlyIfNetworkAvailable = $settings.RunOnlyIfNetworkAvailable - } - } -} - -<# -.SYNOPSIS - Applies the desired resource state -.PARAMETER TaskName - The name of the task -.PARAMETER TaskPath - The path to the task - defaults to the root directory -.PARAMETER Description - The task description -.PARAMETER ActionExecutable - The path to the .exe for this task -.PARAMETER ActionArguments - The arguments to pass the executable -.PARAMETER ActionWorkingPath - The working path to specify for the executable -.PARAMETER ScheduleType - When should the task be executed -.PARAMETER RepeatInterval - How many units (minutes, hours, days) between each run of this task? -.PARAMETER StartTime - The time of day this task should start at - defaults to 12:00 AM. Not valid for AtLogon and AtStartup tasks -.PARAMETER Ensure - Present if the task should exist, Absent if it should be removed -.PARAMETER Enable - True if the task should be enabled, false if it should be disabled -.PARAMETER ExecuteAsCredential - The credential this task should execute as. If not specified defaults to running as the local system account -.PARAMETER DaysInterval - Specifies the interval between the days in the schedule. An interval of 1 produces a daily schedule. An interval of 2 produces an every-other day schedule. -.PARAMETER RandomDelay - Specifies a random amount of time to delay the start time of the trigger. The delay time is a random time between the time the task triggers and the time that you specify in this setting. -.PARAMETER RepetitionDuration - Specifies how long the repetition pattern repeats after the task starts. -.PARAMETER DaysOfWeek - Specifies an array of the days of the week on which Task Scheduler runs the task. -.PARAMETER WeeksInterval - Specifies the interval between the weeks in the schedule. An interval of 1 produces a weekly schedule. An interval of 2 produces an every-other week schedule. -.PARAMETER User - Specifies the identifier of the user for a trigger that starts a task when a user logs on. -.PARAMETER DisallowDemandStart - Indicates whether the task is prohibited to run on demand or not. Defaults to $false -.PARAMETER DisallowHardTerminate - Indicates whether the task is prohibited to be terminated or not. Defaults to $false -.PARAMETER Compatibility - The task compatibility level. Defaults to Vista. -.PARAMETER AllowStartIfOnBatteries - Indicates whether the task should start if the machine is on batteries or not. Defaults to $false -.PARAMETER Hidden - Indicates that the task is hidden in the Task Scheduler UI. -.PARAMETER RunOnlyIfIdle - Indicates that Task Scheduler runs the task only when the computer is idle. -.PARAMETER IdleWaitTimeout - Specifies the amount of time that Task Scheduler waits for an idle condition to occur. -.PARAMETER NetworkName - Specifies the name of a network profile that Task Scheduler uses to determine if the task can run. - The Task Scheduler UI uses this setting for display purposes. Specify a network name if you specify the RunOnlyIfNetworkAvailable parameter. -.PARAMETER DisallowStartOnRemoteAppSession - Indicates that the task does not start if the task is triggered to run in a Remote Applications Integrated Locally (RAIL) session. -.PARAMETER StartWhenAvailable - Indicates that Task Scheduler can start the task at any time after its scheduled time has passed. -.PARAMETER DontStopIfGoingOnBatteries - Indicates that the task does not stop if the computer switches to battery power. -.PARAMETER WakeToRun - Indicates that Task Scheduler wakes the computer before it runs the task. -.PARAMETER IdleDuration - Specifies the amount of time that the computer must be in an idle state before Task Scheduler runs the task. -.PARAMETER RestartOnIdle - Indicates that Task Scheduler restarts the task when the computer cycles into an idle condition more than once. -.PARAMETER DontStopOnIdleEnd - Indicates that Task Scheduler does not terminate the task if the idle condition ends before the task is completed. -.PARAMETER ExecutionTimeLimit - Specifies the amount of time that Task Scheduler is allowed to complete the task. -.PARAMETER MultipleInstances - Specifies the policy that defines how Task Scheduler handles multiple instances of the task. -.PARAMETER Priority - Specifies the priority level of the task. Priority must be an integer from 0 (highest priority) to 10 (lowest priority). - The default value is 7. Priority levels 7 and 8 are used for background tasks. Priority levels 4, 5, and 6 are used for interactive tasks. -.PARAMETER RestartCount - Specifies the number of times that Task Scheduler attempts to restart the task. -.PARAMETER RestartInterval - Specifies the amount of time that Task Scheduler attempts to restart the task. -.PARAMETER RunOnlyIfNetworkAvailable - Indicates that Task Scheduler runs the task only when a network is available. Task Scheduler uses the NetworkID - parameter and NetworkName parameter that you specify in this cmdlet to determine if the network is available. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $TaskName, - - [Parameter()] - [System.String] - $TaskPath = '\', - - [Parameter()] - [System.String] - $Description, - - [Parameter(Mandatory = $true)] - [System.String] - $ActionExecutable, - - [Parameter()] - [System.String] - $ActionArguments, - - [Parameter()] - [System.String] - $ActionWorkingPath, - - [Parameter(Mandatory = $true)] - [System.String] - [ValidateSet('Once', 'Daily', 'Weekly', 'AtStartup', 'AtLogOn')] - $ScheduleType, - - [Parameter()] - [System.DateTime] - $RepeatInterval = [System.DateTime] '00:00:00', - - [Parameter()] - [System.DateTime] - $StartTime = [System.DateTime]::Today, - - [Parameter()] - [System.String] - [ValidateSet('Present', 'Absent')] - $Ensure = 'Present', - - [Parameter()] - [System.Boolean] - $Enable = $true, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ExecuteAsCredential, - - [Parameter()] - [System.UInt32] - $DaysInterval = 1, - - [Parameter()] - [System.DateTime] - $RandomDelay = [System.DateTime] '00:00:00', - - [Parameter()] - [System.DateTime] - $RepetitionDuration = [System.DateTime] '00:00:00', - - [Parameter()] - [System.String[]] - $DaysOfWeek, - - [Parameter()] - [System.UInt32] - $WeeksInterval = 1, - - [Parameter()] - [System.String] - $User, - - [Parameter()] - [System.Boolean] - $DisallowDemandStart = $false, - - [Parameter()] - [System.Boolean] - $DisallowHardTerminate = $false, - - [Parameter()] - [ValidateSet('AT', 'V1', 'Vista', 'Win7', 'Win8')] - [System.String] - $Compatibility = 'Vista', - - [Parameter()] - [System.Boolean] - $AllowStartIfOnBatteries = $false, - - [Parameter()] - [System.Boolean] - $Hidden = $false, - - [Parameter()] - [System.Boolean] - $RunOnlyIfIdle = $false, - - [Parameter()] - [System.DateTime] - $IdleWaitTimeout = [System.DateTime] '02:00:00', - - [Parameter()] - [System.String] - $NetworkName, - - [Parameter()] - [System.Boolean] - $DisallowStartOnRemoteAppSession = $false, - - [Parameter()] - [System.Boolean] - $StartWhenAvailable = $false, - - [Parameter()] - [System.Boolean] - $DontStopIfGoingOnBatteries = $false, - - [Parameter()] - [System.Boolean] - $WakeToRun = $false, - - [Parameter()] - [System.DateTime] - $IdleDuration = [System.DateTime] '01:00:00', - - [Parameter()] - [System.Boolean] - $RestartOnIdle = $false, - - [Parameter()] - [System.Boolean] - $DontStopOnIdleEnd = $false, - - [Parameter()] - [System.DateTime] - $ExecutionTimeLimit = [System.DateTime] '8:00:00', - - [Parameter()] - [ValidateSet('IgnoreNew', 'Parallel', 'Queue')] - [System.String] - $MultipleInstances = 'Queue', - - [Parameter()] - [System.UInt32] - $Priority = 7, - - [Parameter()] - [System.UInt32] - $RestartCount = 0, - - [Parameter()] - [System.DateTime] - $RestartInterval = [System.DateTime] '00:00:00', - - [Parameter()] - [System.Boolean] - $RunOnlyIfNetworkAvailable = $false - ) - - $TaskPath = ConvertTo-NormalizedTaskPath -TaskPath $TaskPath - - Write-Verbose -Message ('Entering Set-TargetResource for {0} in {1}' -f $TaskName, $TaskPath) - $currentValues = Get-TargetResource @PSBoundParameters - - if ($Ensure -eq 'Present') - { - if ($RepetitionDuration.TimeOfDay -lt $RepeatInterval.TimeOfDay) - { - $exceptionMessage = 'Repetition duration {0} is less than repetition interval {1}. Please set RepeatInterval to a value lower or equal to RepetitionDuration' -f $RepetitionDuration.TimeOfDay, $RepeatInterval.TimeOfDay - New-InvalidArgumentException -Message $exceptionMessage -ArgumentName RepeatInterval - } - - if ($ScheduleType -eq 'Daily' -and $DaysInterval -eq 0) - { - $exceptionMessage = 'Schedules of the type Daily must have a DaysInterval greater than 0 (value entered: {0})' -f $DaysInterval - New-InvalidArgumentException -Message $exceptionMessage -ArgumentName DaysInterval - } - - if ($ScheduleType -eq 'Weekly' -and $WeeksInterval -eq 0) - { - $exceptionMessage = 'Schedules of the type Weekly must have a WeeksInterval greater than 0 (value entered: {0})' -f $WeeksInterval - New-InvalidArgumentException -Message $exceptionMessage -ArgumentName WeeksInterval - } - - if ($ScheduleType -eq 'Weekly' -and $DaysOfWeek.Count -eq 0) - { - $exceptionMessage = 'Schedules of the type Weekly must have at least one weekday selected' - New-InvalidArgumentException -Message $exceptionMessage -ArgumentName DaysOfWeek - } - - $actionArgs = @{ - Execute = $ActionExecutable - } - - if ($ActionArguments) - { - $actionArgs.Add('Argument', $ActionArguments) - } - - if ($ActionWorkingPath) - { - $actionArgs.Add('WorkingDirectory', $ActionWorkingPath) - } - - $action = New-ScheduledTaskAction @actionArgs - - $settingArgs = @{ - DisallowDemandStart = $DisallowDemandStart - DisallowHardTerminate = $DisallowHardTerminate - Compatibility = $Compatibility - AllowStartIfOnBatteries = $AllowStartIfOnBatteries - Disable = -not $Enable - Hidden = $Hidden - RunOnlyIfIdle = $RunOnlyIfIdle - DisallowStartOnRemoteAppSession = $DisallowStartOnRemoteAppSession - StartWhenAvailable = $StartWhenAvailable - DontStopIfGoingOnBatteries = $DontStopIfGoingOnBatteries - WakeToRun = $WakeToRun - RestartOnIdle = $RestartOnIdle - DontStopOnIdleEnd = $DontStopOnIdleEnd - MultipleInstances = $MultipleInstances - Priority = $Priority - RestartCount = $RestartCount - RunOnlyIfNetworkAvailable = $RunOnlyIfNetworkAvailable - } - - if ($IdleDuration.TimeOfDay -gt [System.TimeSpan] '00:00:00') - { - $settingArgs.Add('IdleDuration', $IdleDuration.TimeOfDay) - } - - if ($IdleWaitTimeout.TimeOfDay -gt [System.TimeSpan] '00:00:00') - { - $settingArgs.Add('IdleWaitTimeout', $IdleWaitTimeout.TimeOfDay) - } - - if ($ExecutionTimeLimit.TimeOfDay -gt [System.TimeSpan] '00:00:00') - { - $settingArgs.Add('ExecutionTimeLimit', $ExecutionTimeLimit.TimeOfDay) - } - - if ($RestartInterval.TimeOfDay -gt [System.TimeSpan] '00:00:00') - { - $settingArgs.Add('RestartInterval', $RestartInterval.TimeOfDay) - } - - if (-not [System.String]::IsNullOrWhiteSpace($NetworkName)) - { - $setting.Add('NetworkName', $NetworkName) - } - $setting = New-ScheduledTaskSettingsSet @settingArgs - - $triggerArgs = @{} - if ($RandomDelay.TimeOfDay -gt [System.TimeSpan]::FromSeconds(0)) - { - $triggerArgs.Add('RandomDelay', $RandomDelay.TimeOfDay) - } - - switch ($ScheduleType) - { - 'Once' - { - $triggerArgs.Add('Once', $true) - $triggerArgs.Add('At', $StartTime) - break - } - 'Daily' - { - $triggerArgs.Add('Daily', $true) - $triggerArgs.Add('At', $StartTime) - $triggerArgs.Add('DaysInterval', $DaysInterval) - break - } - 'Weekly' - { - $triggerArgs.Add('Weekly', $true) - $triggerArgs.Add('At', $StartTime) - if ($DaysOfWeek.Count -gt 0) - { - $triggerArgs.Add('DaysOfWeek', $DaysOfWeek) - } - - if ($WeeksInterval -gt 0) - { - $triggerArgs.Add('WeeksInterval', $WeeksInterval) - } - break - } - 'AtStartup' - { - $triggerArgs.Add('AtStartup', $true) - break - } - 'AtLogOn' - { - $triggerArgs.Add('AtLogOn', $true) - if (-not [System.String]::IsNullOrWhiteSpace($User)) - { - $triggerArgs.Add('User', $User) - } - break - } - } - - $trigger = New-ScheduledTaskTrigger @triggerArgs -ErrorAction SilentlyContinue - if (-not $trigger) - { - New-InvalidOperationException -Message 'Error creating new scheduled task trigger' -ErrorRecord $_ - } - - # To overcome the issue of not being able to set the task repetition for tasks with a schedule type other than Once - if ($RepeatInterval.TimeOfDay -gt (New-TimeSpan -Seconds 0) -and $PSVersionTable.PSVersion.Major -gt 4) - { - if ($RepetitionDuration.TimeOfDay -le $RepeatInterval.TimeOfDay) - { - $exceptionMessage = 'Repetition interval is set to {0} but repetition duration is {1}' -f $RepeatInterval.TimeOfDay, $RepetitionDuration.TimeOfDay - New-InvalidArgumentException -Message $exceptionMessage -ArgumentName RepetitionDuration - } - - $tempTrigger = New-ScheduledTaskTrigger -Once -At 6:6:6 -RepetitionInterval $RepeatInterval.TimeOfDay -RepetitionDuration $RepetitionDuration.TimeOfDay - Write-Verbose -Message 'PS V5 Copying values from temporary trigger to property Repetition of $trigger.Repetition' - - try - { - $trigger.Repetition = $tempTrigger.Repetition - } - catch - { - $triggerRepetitionFailed = $true - } - } - - if ($currentValues.Ensure -eq 'Present') - { - Write-Verbose -Message ('Removing previous scheduled task {0}' -f $TaskName) - $null = Unregister-ScheduledTask -TaskName $TaskName -TaskPath $TaskPath -Confirm:$false - } - - Write-Verbose -Message ('Creating new scheduled task {0}' -f $TaskName) - - $scheduledTask = New-ScheduledTask -Action $action -Trigger $trigger -Settings $setting - - if ($RepeatInterval.TimeOfDay -gt (New-TimeSpan -Seconds 0) -and ($PSVersionTable.PSVersion.Major -eq 4 -or $triggerRepetitionFailed)) - { - if ($RepetitionDuration.TimeOfDay -le $RepeatInterval.TimeOfDay) - { - $exceptionMessage = 'Repetition interval is set to {0} but repetition duration is {1}' -f $RepeatInterval.TimeOfDay, $RepetitionDuration.TimeOfDay - New-InvalidArgumentException -Message $exceptionMessage -ArgumentName RepetitionDuration - } - - $tempTrigger = New-ScheduledTaskTrigger -Once -At 6:6:6 -RepetitionInterval $RepeatInterval.TimeOfDay -RepetitionDuration $RepetitionDuration.TimeOfDay - $tempTask = New-ScheduledTask -Trigger $tempTrigger -Action $action - Write-Verbose -Message 'PS V4 Copying values from temporary trigger to property Repetition of $trigger.Repetition' - - $scheduledTask.Triggers[0].Repetition = $tempTask.Triggers[0].Repetition - } - - if (-not [System.String]::IsNullOrWhiteSpace($Description)) - { - $scheduledTask.Description = $Description - } - - $registerArgs = @{ - TaskName = $TaskName - TaskPath = $TaskPath - InputObject = $scheduledTask - } - - if ($PSBoundParameters.ContainsKey('ExecuteAsCredential') -eq $true) - { - $registerArgs.Add('User', $ExecuteAsCredential.UserName) - $registerArgs.Add('Password', $ExecuteAsCredential.GetNetworkCredential().Password) - } - else - { - $registerArgs.Add('User', 'NT AUTHORITY\SYSTEM') - } - - $null = Register-ScheduledTask @registerArgs - } - - if ($Ensure -eq 'Absent') - { - Write-Verbose -Message ('Removing scheduled task {0}' -f $TaskName) - Unregister-ScheduledTask -TaskName $TaskName -TaskPath $TaskPath -Confirm:$false - } -} - -<# -.SYNOPSIS - Tests if the current resource state matches the desired resource state -.PARAMETER TaskName - The name of the task -.PARAMETER TaskPath - The path to the task - defaults to the root directory -.PARAMETER Description - The task description -.PARAMETER ActionExecutable - The path to the .exe for this task -.PARAMETER ActionArguments - The arguments to pass the executable -.PARAMETER ActionWorkingPath - The working path to specify for the executable -.PARAMETER ScheduleType - When should the task be executed -.PARAMETER RepeatInterval - How many units (minutes, hours, days) between each run of this task? -.PARAMETER StartTime - The time of day this task should start at - defaults to 12:00 AM. Not valid for AtLogon and AtStartup tasks -.PARAMETER Ensure - Present if the task should exist, Absent if it should be removed -.PARAMETER Enable - True if the task should be enabled, false if it should be disabled -.PARAMETER ExecuteAsCredential - The credential this task should execute as. If not specified defaults to running as the local system account -.PARAMETER DaysInterval - Specifies the interval between the days in the schedule. An interval of 1 produces a daily schedule. An interval of 2 produces an every-other day schedule. -.PARAMETER RandomDelay - Specifies a random amount of time to delay the start time of the trigger. The delay time is a random time between the time the task triggers and the time that you specify in this setting. -.PARAMETER RepetitionDuration - Specifies how long the repetition pattern repeats after the task starts. -.PARAMETER DaysOfWeek - Specifies an array of the days of the week on which Task Scheduler runs the task. -.PARAMETER WeeksInterval - Specifies the interval between the weeks in the schedule. An interval of 1 produces a weekly schedule. An interval of 2 produces an every-other week schedule. -.PARAMETER User - Specifies the identifier of the user for a trigger that starts a task when a user logs on. -.PARAMETER DisallowDemandStart - Indicates whether the task is prohibited to run on demand or not. Defaults to $false -.PARAMETER DisallowHardTerminate - Indicates whether the task is prohibited to be terminated or not. Defaults to $false -.PARAMETER Compatibility - The task compatibility level. Defaults to Vista. -.PARAMETER AllowStartIfOnBatteries - Indicates whether the task should start if the machine is on batteries or not. Defaults to $false -.PARAMETER Hidden - Indicates that the task is hidden in the Task Scheduler UI. -.PARAMETER RunOnlyIfIdle - Indicates that Task Scheduler runs the task only when the computer is idle. -.PARAMETER IdleWaitTimeout - Specifies the amount of time that Task Scheduler waits for an idle condition to occur. -.PARAMETER NetworkName - Specifies the name of a network profile that Task Scheduler uses to determine if the task can run. - The Task Scheduler UI uses this setting for display purposes. Specify a network name if you specify the RunOnlyIfNetworkAvailable parameter. -.PARAMETER DisallowStartOnRemoteAppSession - Indicates that the task does not start if the task is triggered to run in a Remote Applications Integrated Locally (RAIL) session. -.PARAMETER StartWhenAvailable - Indicates that Task Scheduler can start the task at any time after its scheduled time has passed. -.PARAMETER DontStopIfGoingOnBatteries - Indicates that the task does not stop if the computer switches to battery power. -.PARAMETER WakeToRun - Indicates that Task Scheduler wakes the computer before it runs the task. -.PARAMETER IdleDuration - Specifies the amount of time that the computer must be in an idle state before Task Scheduler runs the task. -.PARAMETER RestartOnIdle - Indicates that Task Scheduler restarts the task when the computer cycles into an idle condition more than once. -.PARAMETER DontStopOnIdleEnd - Indicates that Task Scheduler does not terminate the task if the idle condition ends before the task is completed. -.PARAMETER ExecutionTimeLimit - Specifies the amount of time that Task Scheduler is allowed to complete the task. -.PARAMETER MultipleInstances - Specifies the policy that defines how Task Scheduler handles multiple instances of the task. -.PARAMETER Priority - Specifies the priority level of the task. Priority must be an integer from 0 (highest priority) to 10 (lowest priority). - The default value is 7. Priority levels 7 and 8 are used for background tasks. Priority levels 4, 5, and 6 are used for interactive tasks. -.PARAMETER RestartCount - Specifies the number of times that Task Scheduler attempts to restart the task. -.PARAMETER RestartInterval - Specifies the amount of time that Task Scheduler attempts to restart the task. -.PARAMETER RunOnlyIfNetworkAvailable - Indicates that Task Scheduler runs the task only when a network is available. Task Scheduler uses the NetworkID - parameter and NetworkName parameter that you specify in this cmdlet to determine if the network is available. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $TaskName, - - [Parameter()] - [System.String] - $TaskPath = '\', - - [Parameter()] - [System.String] - $Description, - - [Parameter(Mandatory = $true)] - [System.String] - $ActionExecutable, - - [Parameter()] - [System.String] - $ActionArguments, - - [Parameter()] - [System.String] - $ActionWorkingPath, - - [Parameter(Mandatory = $true)] - [System.String] - [ValidateSet('Once', 'Daily', 'Weekly', 'AtStartup', 'AtLogOn')] - $ScheduleType, - - [Parameter()] - [System.DateTime] - $RepeatInterval = [System.DateTime] '00:00:00', - - [Parameter()] - [System.DateTime] - $StartTime = [System.DateTime]::Today, - - [Parameter()] - [System.String] - [ValidateSet('Present', 'Absent')] - $Ensure = 'Present', - - [Parameter()] - [System.Boolean] - $Enable = $true, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ExecuteAsCredential, - - [Parameter()] - [System.UInt32] - $DaysInterval = 1, - - [Parameter()] - [System.DateTime] - $RandomDelay = [System.DateTime] '00:00:00', - - [Parameter()] - [System.DateTime] - $RepetitionDuration = [System.DateTime] '00:00:00', - - [Parameter()] - [System.String[]] - $DaysOfWeek, - - [Parameter()] - [System.UInt32] - $WeeksInterval = 1, - - [Parameter()] - [System.String] - $User, - - [Parameter()] - [System.Boolean] - $DisallowDemandStart = $false, - - [Parameter()] - [System.Boolean] - $DisallowHardTerminate = $false, - - [Parameter()] - [ValidateSet('AT', 'V1', 'Vista', 'Win7', 'Win8')] - [System.String] - $Compatibility = 'Vista', - - [Parameter()] - [System.Boolean] - $AllowStartIfOnBatteries = $false, - - [Parameter()] - [System.Boolean] - $Hidden = $false, - - [Parameter()] - [System.Boolean] - $RunOnlyIfIdle = $false, - - [Parameter()] - [System.DateTime] - $IdleWaitTimeout = [System.DateTime] '02:00:00', - - [Parameter()] - [System.String] - $NetworkName, - - [Parameter()] - [System.Boolean] - $DisallowStartOnRemoteAppSession = $false, - - [Parameter()] - [System.Boolean] - $StartWhenAvailable = $false, - - [Parameter()] - [System.Boolean] - $DontStopIfGoingOnBatteries = $false, - - [Parameter()] - [System.Boolean] - $WakeToRun = $false, - - [Parameter()] - [System.DateTime] - $IdleDuration = [System.DateTime] '01:00:00', - - [Parameter()] - [System.Boolean] - $RestartOnIdle = $false, - - [Parameter()] - [System.Boolean] - $DontStopOnIdleEnd = $false, - - [Parameter()] - [System.DateTime] - $ExecutionTimeLimit = [System.DateTime] '8:00:00', - - [Parameter()] - [ValidateSet('IgnoreNew', 'Parallel', 'Queue')] - [System.String] - $MultipleInstances = 'Queue', - - [Parameter()] - [System.UInt32] - $Priority = 7, - - [Parameter()] - [System.UInt32] - $RestartCount = 0, - - [Parameter()] - [System.DateTime] - $RestartInterval = [System.DateTime] '00:00:00', - - [Parameter()] - [System.Boolean] - $RunOnlyIfNetworkAvailable = $false - ) - - $TaskPath = ConvertTo-NormalizedTaskPath -TaskPath $TaskPath - - Write-Verbose -Message ('Testing scheduled task {0}' -f $TaskName) - - $CurrentValues = Get-TargetResource @PSBoundParameters - - Write-Verbose -Message 'Current values retrieved' - - if ($Ensure -eq 'Absent' -and $CurrentValues.Ensure -eq 'Absent') - { - return $true - } - - if ($null -eq $CurrentValues) - { - Write-Verbose -Message 'Current values were null' - return $false - } - - $desiredValues = $PSBoundParameters - $desiredValues.TaskPath = $TaskPath - - Write-Verbose -Message 'Testing DSC parameter state' - return Test-DscParameterState -CurrentValues $CurrentValues -DesiredValues $desiredValues -} - -<# -.SYNOPSIS -Helper function to convert TaskPath to the right form - -.PARAMETER TaskPath -The path to the task -#> - -function ConvertTo-NormalizedTaskPath -{ - [CmdletBinding()] - [OutputType([System.String])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $TaskPath - ) - - $pathArray = $TaskPath.Split('\').Where( {$_}) - if ($pathArray.Count -gt 0) - { - $TaskPath = "\$($pathArray -join '\')\" - } - - return $TaskPath -} diff --git a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xScheduledTask/MSFT_xScheduledTask.schema.mof b/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xScheduledTask/MSFT_xScheduledTask.schema.mof deleted file mode 100644 index 3f1e1a69..00000000 --- a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xScheduledTask/MSFT_xScheduledTask.schema.mof +++ /dev/null @@ -1,43 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xScheduledTask")] -class MSFT_xScheduledTask : OMI_BaseResource -{ - [Key, Description("The name of the task")] string TaskName; - [Write, Description("The path to the task - defaults to the root directory")] string TaskPath; - [Write, Description("The task description")] string Description; - [Required, Description("The path to the .exe for this task")] string ActionExecutable; - [Write, Description("The arguments to pass the executable")] string ActionArguments; - [Write, Description("The working path to specify for the executable")] string ActionWorkingPath; - [Required, Description("When should the task be executed"), ValueMap{"Once", "Daily", "Weekly", "AtStartup", "AtLogOn"}, Values{"Once", "Daily", "Weekly", "AtStartup", "AtLogOn"}] string ScheduleType; - [Write, Description("How many units (minutes, hours, days) between each run of this task?")] DateTime RepeatInterval; - [Write, Description("The time of day this task should start at - defaults to 12:00 AM. Not valid for AtLogon and AtStartup tasks")] DateTime StartTime; - [Write, Description("Present if the task should exist, Absent if it should be removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; - [Write, Description("True if the task should be enabled, false if it should be disabled")] boolean Enable; - [Write, Description("The credential this task should execute as. If not specified defaults to running as the local system account"), EmbeddedInstance("MSFT_Credential")] string ExecuteAsCredential; - [Write, Description("Specifies the interval between the days in the schedule. An interval of 1 produces a daily schedule. An interval of 2 produces an every-other day schedule.")] Uint32 DaysInterval; - [Write, Description("Specifies a random amount of time to delay the start time of the trigger. The delay time is a random time between the time the task triggers and the time that you specify in this setting.")] DateTime RandomDelay; - [Write, Description("Specifies how long the repetition pattern repeats after the task starts.")] DateTime RepetitionDuration; - [Write, Description("Specifies an array of the days of the week on which Task Scheduler runs the task.")] String DaysOfWeek[]; - [Write, Description("Specifies the interval between the weeks in the schedule. An interval of 1 produces a weekly schedule. An interval of 2 produces an every-other week schedule.")] Uint32 WeeksInterval; - [Write, Description("Specifies the identifier of the user for a trigger that starts a task when a user logs on.")] String User; - [Write, Description("Indicates whether the task is prohibited to run on demand or not. Defaults to $false")] Boolean DisallowDemandStart; - [Write, Description("Indicates whether the task is prohibited to be terminated or not. Defaults to $false")] Boolean DisallowHardTerminate; - [Write, Description("The task compatibility level. Defaults to Vista."), ValueMap{"AT","V1","Vista","Win7","Win8"}, Values{"AT","V1","Vista","Win7","Win8"}] String Compatibility; - [Write, Description("Indicates whether the task should start if the machine is on batteries or not. Defaults to $false")] Boolean AllowStartIfOnBatteries; - [Write, Description("Indicates that the task is hidden in the Task Scheduler UI.")] Boolean Hidden; - [Write, Description("Indicates that Task Scheduler runs the task only when the computer is idle.")] Boolean RunOnlyIfIdle; - [Write, Description("Specifies the amount of time that Task Scheduler waits for an idle condition to occur.")] DateTime IdleWaitTimeout; - [Write, Description("Specifies the name of a network profile that Task Scheduler uses to determine if the task can run. The Task Scheduler UI uses this setting for display purposes. Specify a network name if you specify the RunOnlyIfNetworkAvailable parameter.")] String NetworkName; - [Write, Description("Indicates that the task does not start if the task is triggered to run in a Remote Applications Integrated Locally (RAIL) session.")] Boolean DisallowStartOnRemoteAppSession; - [Write, Description("Indicates that Task Scheduler can start the task at any time after its scheduled time has passed.")] Boolean StartWhenAvailable; - [Write, Description("Indicates that the task does not stop if the computer switches to battery power.")] Boolean DontStopIfGoingOnBatteries; - [Write, Description("Indicates that Task Scheduler wakes the computer before it runs the task.")] Boolean WakeToRun; - [Write, Description("Specifies the amount of time that the computer must be in an idle state before Task Scheduler runs the task.")] DateTime IdleDuration; - [Write, Description("Indicates that Task Scheduler restarts the task when the computer cycles into an idle condition more than once.")] Boolean RestartOnIdle; - [Write, Description("Indicates that Task Scheduler does not terminate the task if the idle condition ends before the task is completed.")] Boolean DontStopOnIdleEnd; - [Write, Description("Specifies the amount of time that Task Scheduler is allowed to complete the task.")] DateTime ExecutionTimeLimit; - [Write, Description("Specifies the policy that defines how Task Scheduler handles multiple instances of the task."), ValueMap{"IgnoreNew","Parallel","Queue"}, Values{"IgnoreNew","Parallel","Queue"}] String MultipleInstances; - [Write, Description("Specifies the priority level of the task. Priority must be an integer from 0 (highest priority) to 10 (lowest priority). The default value is 7. Priority levels 7 and 8 are used for background tasks. Priority levels 4, 5, and 6 are used for interactive tasks.")] Uint32 Priority; - [Write, Description("Specifies the number of times that Task Scheduler attempts to restart the task.")] Uint32 RestartCount; - [Write, Description("Specifies the amount of time that Task Scheduler attempts to restart the task.")] DateTime RestartInterval; - [Write, Description("Indicates that Task Scheduler runs the task only when a network is available. Task Scheduler uses the NetworkID parameter and NetworkName parameter that you specify in this cmdlet to determine if the network is available.")] Boolean RunOnlyIfNetworkAvailable; -}; diff --git a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xVirtualMemory/MSFT_xVirtualMemory.psm1 b/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xVirtualMemory/MSFT_xVirtualMemory.psm1 deleted file mode 100644 index 78515d07..00000000 --- a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xVirtualMemory/MSFT_xVirtualMemory.psm1 +++ /dev/null @@ -1,428 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidGlobalVars", "", Scope = "Function")] -param -( -) - -<# - .SYNOPSIS - Returns the current state of the virtual memory configuration - - .PARAMETER Drive - The drive for which the virtual memory configuration needs to be returned - - .PARAMETER Type - The type of the virtual memory configuration -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Drive, - - [Parameter(Mandatory = $true)] - [ValidateSet('AutoManagePagingFile', 'CustomSize', 'SystemManagedSize', 'NoPagingFile')] - [System.String] - $Type - ) - - Write-Verbose -Message 'Getting current page file settings' - - $returnValue = @{ - Drive = [string]::Empty - Type = [string]::Empty - InitialSize = 0 - MaximumSize = 0 - } - - [bool] $isSystemManaged = (Get-CimInstance -ClassName Win32_ComputerSystem).AutomaticManagedPagefile - - if ($isSystemManaged) - { - $returnValue.Type = 'AutoManagePagingFile' - return $returnValue - } - - $driveItem = [System.IO.DriveInfo] $Drive - - Write-Verbose -Message "Pagefile was not automatically managed. Retrieving detailed page file settings with query Select * from Win32_PageFileSetting where SettingID='pagefile.sys @ $($driveItem.Name.Substring(0,2))'" - - # Find existing page file settings by drive letter - $virtualMemoryInstance = Get-CimInstance -Namespace root\cimv2 -Query "Select * from Win32_PageFileSetting where SettingID='pagefile.sys @ $($driveItem.Name.Substring(0,2))'" - - if (-not $virtualMemoryInstance) - { - $returnValue.Type = 'NoPagingFile' - return $returnValue - } - - if ($virtualMemoryInstance.InitialSize -eq 0 -and $virtualMemoryInstance.MaximumSize -eq 0) - { - $returnValue.Type = 'SystemManagedSize' - } - else - { - $returnValue.Type = 'CustomSize' - } - - $returnValue.Drive = $virtualMemoryInstance.Name.Substring(0, 3) - $returnValue.InitialSize = $virtualMemoryInstance.InitialSize - $returnValue.MaximumSize = $virtualMemoryInstance.MaximumSize - - $returnValue -} - -<# - .SYNOPSIS - Sets the virtual memory settings based on the parameters supplied - - .PARAMETER Drive - The drive for which the virtual memory configuration should be set. - - .PARAMETER Type - The paging type. When set to AutoManagePagingFile, drive letters are ignored - - .PARAMETER InitialSize - The initial page file size in megabyte - - .PARAMETER MaximumSize - The maximum page file size in megabyte. May not be smaller than InitialSize -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Drive, - - [Parameter(Mandatory = $true)] - [ValidateSet('AutoManagePagingFile', 'CustomSize', 'SystemManagedSize', 'NoPagingFile')] - [System.String] - $Type, - - [Parameter()] - [System.Int64] - $InitialSize, - - [Parameter()] - [System.Int64] - $MaximumSize - ) - - Write-Verbose -Message 'Setting page file' - - $SystemInfo = Get-CimInstance -Class Win32_ComputerSystem - - switch ($Type) - { - 'AutoManagePagingFile' - { - $setParams = @{ - Namespace = 'root\cimv2' - Query = 'Select * from Win32_ComputerSystem' - Property = @{AutomaticManagedPageFile = $true} - } - - Write-Verbose -Message 'Enabling AutoManagePagingFile' - - $null = Set-CimInstance @setParams - $global:DSCMachineStatus = 1 - break - } - - 'CustomSize' - { - if ($SystemInfo.AutomaticManagedPageFile) - { - # First set AutomaticManagedPageFile to $false to be able to set a custom one later - - $setParams = @{ - Namespace = 'root\cimv2' - Query = 'Select * from Win32_ComputerSystem' - Property = @{AutomaticManagedPageFile = $false} - } - - Write-Verbose -Message 'Disabling AutoManagePagingFile' - - $null = Set-CimInstance @setParams - } - - $driveInfo = [System.IO.DriveInfo] $Drive - - if (-not $driveInfo.IsReady) - { - throw "Drive $($driveInfo.Name) is not ready. Please ensure that the drive exists and is available" - } - - $pageFileName = Join-Path -Path $driveInfo.Name -ChildPath 'pagefile.sys' - - Write-Verbose -Message ('Checking if a paging file already exists at {0}' -f $pageFileName) - $existingPageFileSetting = Get-CimInstance ` - -Namespace root\cimv2 ` - -Query "Select * from Win32_PageFileSetting where SettingID='pagefile.sys @ $($driveInfo.Name.Substring(0,2))'" - - if (-not $existingPageFileSetting) - { - $null = New-CimInstance -Namespace 'root\cimv2' -ClassName 'Win32_PageFileSetting' -Property @{Name = $pageFileName} - } - - <# - New-CimInstance does not support properties InitialSize and MaximumSize. Therefore, create - a New-CimInstance with the page file name only if it does not exist and Set-CimInstance on the instance - #> - $setParams = @{ - Namespace = 'root\cimv2' - Query = "Select * from Win32_PageFileSetting where SettingID='pagefile.sys @ $($driveInfo.Name.Substring(0,2))'" - Property = @{ - InitialSize = $InitialSize - MaximumSize = $MaximumSize - } - } - - Write-Verbose -Message ("Setting page file to {0}. Initial size {1}MB, maximum size {2}MB" -f $pageFileName, $InitialSize, $MaximumSize) - - $null = Set-CimInstance @setParams - $global:DSCMachineStatus = 1 - break - } - - 'SystemManagedSize' - { - if ($SystemInfo.AutomaticManagedPageFile) - { - $setParams = @{ - Namespace = 'root\cimv2' - Query = 'Select * from Win32_ComputerSystem' - Property = @{AutomaticManagedPageFile = $false} - } - - Write-Verbose -Message 'Disabling AutoManagePagingFile' - - $null = Set-CimInstance @setParams - } - - $driveInfo = [System.IO.DriveInfo] $Drive - - if (-not $driveInfo.IsReady) - { - throw "Drive $($driveInfo.Name) is not ready. Please ensure that the drive exists and is available" - } - - $pageFileName = Join-Path -Path $driveInfo.Name -ChildPath 'pagefile.sys' - - Write-Verbose -Message ('Checking if a paging file already exists at {0}' -f $pageFileName) - - $existingPageFileSetting = Get-CimInstance ` - -Namespace root\cimv2 ` - -Query "Select * from Win32_PageFileSetting where SettingID='pagefile.sys @ $($driveInfo.Name.Substring(0,2))'" - - if (-not $existingPageFileSetting) - { - $null = New-CimInstance -Namespace 'root\cimv2' -ClassName 'Win32_PageFileSetting' -Property @{Name = $pageFileName} - } - - $setParams = @{ - Namespace = 'root\cimv2' - Query = "Select * from Win32_PageFileSetting where SettingID='pagefile.sys @ $($driveInfo.Name.Substring(0,2))'" - Property = @{ - InitialSize = 0 - MaximumSize = 0 - } - } - - Write-Verbose -Message "Enabling system-managed page file on $pageFileName" - - $null = Set-CimInstance @setParams - $global:DSCMachineStatus = 1 - break - } - - 'NoPagingFile' - { - if ($SystemInfo.AutomaticManagedPageFile) - { - $setParams = @{ - Namespace = 'root\cimv2' - Query = 'Select * from Win32_ComputerSystem' - Property = @{AutomaticManagedPageFile = $false} - } - - $null = Set-CimInstance @setParams - } - - $driveInfo = [System.IO.DriveInfo] $Drive - - if (-not $driveInfo.IsReady) - { - throw "Drive $($driveInfo.Name) is not ready. Please ensure that the drive exists and is available" - } - - $existingPageFileSetting = Get-CimInstance ` - -Namespace root\cimv2 ` - -Query "Select * from Win32_PageFileSetting where SettingID='pagefile.sys @ $($driveInfo.Name.Substring(0,2))'" - - if ($existingPageFileSetting) - { - Write-Verbose -Message "Removing existing page file $($existingPageFileSetting.Name)" - $null = Remove-CimInstance -InputObject $existingPageFileSetting - $global:DSCMachineStatus = 1 - } - - Write-Verbose -Message "Disabled page file for drive $Drive" - - break - } - - default - { - throw "A wrong type '$Type' has been selected." - } - } -} - -<# - .SYNOPSIS - Tests if virtual memory settings need to be applied based on the parameters supplied - - .PARAMETER Drive - The drive letter that should be tested - - .PARAMETER Type - The type of the virtual memory configuration - - .PARAMETER InitialSize - The initial page file size in megabyte - - .PARAMETER MaximumSize - The maximum page file size in megabyte -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Drive, - - [Parameter(Mandatory = $true)] - [ValidateSet('AutoManagePagingFile', 'CustomSize', 'SystemManagedSize', 'NoPagingFile')] - [System.String] - $Type, - - [Parameter()] - [System.Int64] - $InitialSize, - - [Parameter()] - [System.Int64] - $MaximumSize - ) - - Write-Verbose -Message 'Testing page file' - - $systemInfo = Get-CimInstance -Class Win32_ComputerSystem - $result = $false - - switch ($Type) - { - 'AutoManagePagingFile' - { - $result = $systemInfo.AutomaticManagedPagefile - break - } - - 'CustomSize' - { - if ($systemInfo.AutomaticManagedPageFile) - { - $result = $false - break - } - - $driveInfo = [System.IO.DriveInfo] $Drive - - $pageFile = Get-CimInstance -Class Win32_PageFileSetting -Filter "SettingID='pagefile.sys @ $($driveInfo.Name.Substring(0,2))'" - - if (-not $pageFile) - { - $result = $false - break - } - - if (-not ($pageFile.InitialSize -eq $InitialSize -and $pageFile.MaximumSize -eq $MaximumSize)) - { - $result = $false - break - } - - $result = $true - break - } - - 'SystemManagedSize' - { - if ($SystemInfo.AutomaticManagedPageFile) - { - $result = $false - break - } - - $driveInfo = [System.IO.DriveInfo] $Drive - - $pageFile = Get-CimInstance -Class Win32_PageFileSetting -Filter "SettingID='pagefile.sys @ $($driveInfo.Name.Substring(0,2))'" - - if (-not $pageFile) - { - $result = $false - break - } - - if (-not ($pageFile.InitialSize -eq 0 -and $pageFile.MaximumSize -eq 0)) - { - $result = $false - break - } - - $result = $true - break - } - - 'NoPagingFile' - { - if ($SystemInfo.AutomaticManagedPageFile) - { - $result = $false - break - } - - $driveInfo = [System.IO.DriveInfo] $Drive - - $pageFile = Get-CimInstance -Class Win32_PageFileSetting -Filter "SettingID='pagefile.sys @ $($driveInfo.Name.Substring(0,2))'" - - if ($pageFile) - { - $result = $false - break - } - - $result = $true - break - } - - default - { - break - } - } - - return $result -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xVirtualMemory/MSFT_xVirtualMemory.schema.mof b/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xVirtualMemory/MSFT_xVirtualMemory.schema.mof deleted file mode 100644 index 38651f9d..00000000 --- a/lib/puppet_x/dsc_resources/xComputerManagement/DSCResources/MSFT_xVirtualMemory/MSFT_xVirtualMemory.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xVirtualMemory")] -class MSFT_xVirtualMemory : OMI_BaseResource -{ - [Key, Description("The drive letter for which paging settings should be set. Can be letter only, letter and colon or letter with colon and trailing slash.")] String Drive; - [Key, Description("The type of the paging setting to use. If set to AutoManagePagingFile, the drive letter will be ignored. If set to SystemManagedSize, the values for InitialSize and MaximumSize will be ignored"), ValueMap{"AutoManagePagingFile","CustomSize","SystemManagedSize","NoPagingFile"}, Values{"AutoManagePagingFile","CustomSize","SystemManagedSize","NoPagingFile"}] String Type; - [Write, Description("The initial size of the page file in Megabyte")] Sint64 InitialSize; - [Write, Description("The maximum size of the page file in Megabyte")] Sint64 MaximumSize; -}; - diff --git a/lib/puppet_x/dsc_resources/xComputerManagement/LICENSE b/lib/puppet_x/dsc_resources/xComputerManagement/LICENSE deleted file mode 100644 index a1d2d916..00000000 --- a/lib/puppet_x/dsc_resources/xComputerManagement/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/puppet_x/dsc_resources/xComputerManagement/xComputerManagement.psd1 b/lib/puppet_x/dsc_resources/xComputerManagement/xComputerManagement.psd1 deleted file mode 100644 index f6061013..00000000 --- a/lib/puppet_x/dsc_resources/xComputerManagement/xComputerManagement.psd1 +++ /dev/null @@ -1,95 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '2.1.0.0' - -# ID used to uniquely identify this module -GUID = 'B5004952-489E-43EA-999C-F16A25355B89' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2017 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'The xComputerManagement module is originally part of the Windows PowerShell Desired State Configuration (DSC) Resource Kit. This version has been modified for use in Azure. This module contains the xComputer and xDisk resources. These DSC Resources allow you to perform computer management tasks, like joining a domain or initializing disks. - -All of the resources in the DSC Resource Kit are provided AS IS, and are not supported through any Microsoft standard support program or service.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xComputerManagement/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xComputerManagement' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* xComputer: Changed comparison that validates if we are in the correct AD - Domain to work correctly if FQDN wasn"t used. -* Updated AppVeyor.yml to use AppVeyor.psm1 module in DSCResource.Tests. -* Removed Markdown.md errors. -* Added CodeCov.io support. -* xScheduledTask - * Fixed incorrect TaskPath handling - [Issue 45](https://github.com/PowerShell/xComputerManagement/issues/45) -* Change examples to meet HQRM standards and optin to Example validation - tests. -* Replaced examples in README.MD to links to Example files. -* Added the VS Code PowerShell extension formatting settings that cause PowerShell - files to be formatted as per the DSC Resource kit style guidelines - [Issue 91](https://github.com/PowerShell/xComputerManagement/issues/91). -* Opted into Common Tests "Validate Module Files" and "Validate Script Files". -* Converted files with UTF8 with BOM over to UTF8 - fixes [Issue 90](https://github.com/PowerShell/xComputerManagement/issues/90). -* Updated Year to 2017 in License and Manifest - fixes [Issue 87](https://github.com/PowerShell/xComputerManagement/issues/87). -* Added .github support files - fixes [Issue 88](https://github.com/PowerShell/xComputerManagement/issues/88): - * CONTRIBUTING.md - * ISSUE_TEMPLATE.md - * PULL_REQUEST_TEMPLATE.md -* Resolved all PSScriptAnalyzer warnings and style guide warnings. -* xOfflineDomainJoin: - * Changed to use CommonResourceHelper to load localization strings. - * Renamed en-US to be correct case so that localization strings can be loaded. - * Suppress PSScriptAnalyzer rule PSAvoidGlobalVars for - `$global:DSCMachineStatus = 1`. -* xComputer: - * Suppress PSScriptAnalyzer rule PSAvoidGlobalVars for - `$global:DSCMachineStatus = 1`. -* xVirtualMemory: - * Suppress PSScriptAnalyzer rule PSAvoidGlobalVars for - `$global:DSCMachineStatus = 1`. - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - - - - - - diff --git a/lib/puppet_x/dsc_resources/xCredSSP/DSCResources/MSFT_xCredSSP/MSFT_xCredSSP.psm1 b/lib/puppet_x/dsc_resources/xCredSSP/DSCResources/MSFT_xCredSSP/MSFT_xCredSSP.psm1 deleted file mode 100644 index 11a9c7a7..00000000 --- a/lib/puppet_x/dsc_resources/xCredSSP/DSCResources/MSFT_xCredSSP/MSFT_xCredSSP.psm1 +++ /dev/null @@ -1,324 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Server","Client")] - [System.String] - $Role - ) - - #Check if GPO policy has been set - switch($Role) - { - "Server" - { - $RegKey = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service" - } - "Client" - { - $RegKey = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client" - } - } - $RegValueName = "AllowCredSSP" - - if (Test-RegistryValue -Path $RegKey -Name $RegValueName) - { - Write-Verbose -Message "CredSSP is configured via Group Policies" - } - else - { - # Check regular values - switch($Role) - { - "Server" - { - $RegKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WSMAN\Service" - } - "Client" - { - $RegKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WSMAN\Client" - } - } - $RegValueName = "auth_credssp" - } - - if(Test-RegistryValue -Path $RegKey -Name $RegValueName) - { - $Setting = (Get-ItemProperty -Path $RegKey -Name $RegValueName).$RegValueName - } - else - { - $Setting = 0 - } - - switch($Role) - { - "Server" - { - switch($Setting) - { - 1 - { - $returnValue = @{ - Ensure = "Present"; - Role = "Server" - } - } - 0 - { - $returnValue = @{ - Ensure = "Absent"; - Role = "Server" - } - } - } - } - "Client" - { - switch($Setting) - { - 1 - { - $key = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation\AllowFreshCredentials" - - $DelegateComputers = @() - - - Get-Item -Path $key -ErrorAction SilentlyContinue | - Select-Object -ExpandProperty Property | - ForEach-Object { - $DelegateComputer = ((Get-ItemProperty -Path $key -Name $_).$_).Split("/")[1] - $DelegateComputers += $DelegateComputer - } - $DelegateComputers = $DelegateComputers | Sort-Object -Unique - - $returnValue = @{ - Ensure = "Present"; - Role = "Client"; - DelegateComputers = @($DelegateComputers) - } - } - 0 - { - $returnValue = @{ - Ensure = "Absent"; - Role = "Client" - } - } - } - } - } - - return $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [ValidateSet("Server","Client")] - [System.String] - $Role, - - [System.String[]] - $DelegateComputers, - - [System.Boolean] - $SuppressReboot = $false - ) - - if ($Role -eq "Server" -and ($DelegateComputers)) - { - throw ("Cannot use the Role=Server parameter together with " + ` - "the DelegateComputers parameter") - } - - #Check if policy has been set - switch($Role) - { - "Server" - { - $RegKey = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WinRM\Service" - } - "Client" - { - $RegKey = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client" - } - } - $RegValueName = "AllowCredSSP" - - if (Test-RegistryValue -Path $RegKey -Name $RegValueName) - { - Throw "Cannot configure CredSSP. CredSSP is configured via Group Policies" - } - - switch($Role) - { - "Server" - { - switch($Ensure) - { - "Present" - { - Enable-WSManCredSSP -Role Server -Force | Out-Null - if ($SuppressReboot -eq $false) - { - $global:DSCMachineStatus = 1 - } - } - "Absent" - { - Disable-WSManCredSSP -Role Server | Out-Null - } - } - } - "Client" - { - switch($Ensure) - { - "Present" - { - if($DelegateComputers) - { - $key = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation\AllowFreshCredentials" - - if (!(test-path $key)) - { - New-Item $key -Force | out-null - } - - $CurrentDelegateComputers = @() - - Get-Item -Path $key | - Select-Object -ExpandProperty Property | - ForEach-Object { - $CurrentDelegateComputer = ((Get-ItemProperty -Path $key -Name $_).$_).Split("/")[1] - $CurrentDelegateComputers += $CurrentDelegateComputer - } - $CurrentDelegateComputers = $CurrentDelegateComputers | Sort-Object -Unique - - foreach($DelegateComputer in $DelegateComputers) - { - if(($CurrentDelegateComputers -eq $NULL) -or (!$CurrentDelegateComputers.Contains($DelegateComputer))) - { - Enable-WSManCredSSP -Role Client -DelegateComputer $DelegateComputer -Force | Out-Null - if ($SuppressReboot -eq $false) - { - $global:DSCMachineStatus = 1 - } - } - } - } - else - { - Throw "DelegateComputers is required!" - } - } - "Absent" - { - Disable-WSManCredSSP -Role Client | Out-Null - } - } - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [ValidateSet("Server","Client")] - [System.String] - $Role, - - [System.String[]] - $DelegateComputers, - - [System.Boolean] - $SuppressReboot = $false - ) - - if ($Role -eq "Server" -and $PSBoundParameters.ContainsKey("DelegateComputers")) - { - Write-Verbose -Message ("Cannot use the Role=Server parameter together with " + ` - "the DelegateComputers parameter") - } - - $CredSSP = Get-TargetResource -Role $Role - - switch($Role) - { - "Server" - { - return ($CredSSP.Ensure -eq $Ensure) - } - "Client" - { - switch($Ensure) - { - "Present" - { - $CorrectDelegateComputers = $true - if($DelegateComputers) - { - foreach($DelegateComputer in $DelegateComputers) - { - if(!($CredSSP.DelegateComputers | Where-Object {$_ -eq $DelegateComputer})) - { - $CorrectDelegateComputers = $false - } - } - } - $result = (($CredSSP.Ensure -eq $Ensure) -and $CorrectDelegateComputers) - } - "Absent" - { - $result = ($CredSSP.Ensure -eq $Ensure) - } - } - } - } - - return $result -} - - -Export-ModuleMember -Function *-TargetResource - - -function Test-RegistryValue -{ - param ( - [Parameter(Mandatory = $true)] - [String]$Path - , - [Parameter(Mandatory = $true)] - [String]$Name - ) - - if ($null -eq $Path) - { - return $false - } - - $itemProperties = Get-ItemProperty -Path $Path -ErrorAction SilentlyContinue - return ($null -ne $itemProperties -and $null -ne $itemProperties.$Name) -} diff --git a/lib/puppet_x/dsc_resources/xCredSSP/DSCResources/MSFT_xCredSSP/MSFT_xCredSSP.schema.mof b/lib/puppet_x/dsc_resources/xCredSSP/DSCResources/MSFT_xCredSSP/MSFT_xCredSSP.schema.mof deleted file mode 100644 index 80b73547..00000000 --- a/lib/puppet_x/dsc_resources/xCredSSP/DSCResources/MSFT_xCredSSP/MSFT_xCredSSP.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xCredSSP")] -class MSFT_xCredSSP : OMI_BaseResource -{ - [Key, Description("Specifies the CredSSP role.\nServer \nClient \n"), ValueMap{"Server","Client"}, Values{"Server","Client"}] String Role; - [Write, Description("An enumerated value that describes if the role is expected to be enabled on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("Specifies the array of computers that CredSSP client can delegate to.")] String DelegateComputers[]; - [Write, Description("Specifies if a reboot should be supressed. Default is False")] Boolean SuppressReboot; -}; - diff --git a/lib/puppet_x/dsc_resources/xCredSSP/LICENSE b/lib/puppet_x/dsc_resources/xCredSSP/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xCredSSP/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xCredSSP/xCredSSP.psd1 b/lib/puppet_x/dsc_resources/xCredSSP/xCredSSP.psd1 deleted file mode 100644 index 5ceaf441..00000000 --- a/lib/puppet_x/dsc_resources/xCredSSP/xCredSSP.psd1 +++ /dev/null @@ -1,60 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '1.3.0.0' - -# ID used to uniquely identify this module -GUID = '38e1ad0f-9b30-490a-a2b6-cc77765af4ec' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module with DSC Resources for WSMan CredSSP.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xCredSSP/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xCredSSP' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* Added a fix to enable credSSP with a fresh server installation - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - - - diff --git a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceFolder/MSFT_xDFSNamespaceFolder.psm1 b/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceFolder/MSFT_xDFSNamespaceFolder.psm1 deleted file mode 100644 index 7888191b..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceFolder/MSFT_xDFSNamespaceFolder.psm1 +++ /dev/null @@ -1,696 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Certificate Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'DFSDsc.ResourceHelper' ` - -ChildPath 'DFSDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xDFSNamespaceFolder' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current state of a DFS Namespace Folder. - - .PARAMETER Path - Specifies a path for the root of a DFS namespace. - - .PARAMETER TargetPath - Specifies a path for a root target of the DFS namespace. - - .PARAMETER Ensure - Specifies if the DFS Namespace root should exist. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Path, - - [Parameter(Mandatory = $true)] - [System.String] - $TargetPath, - - [Parameter(Mandatory = $true)] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.GettingNamespaceFolderMessage) ` - -f $Path,$TargetPath - ) -join '' ) - - # Generate the return object assuming absent. - $returnValue = @{ - Path = $Path - TargetPath = $TargetPath - Ensure = 'Absent' - } - - # Lookup the existing Namespace Folder - $folder = Get-Folder ` - -Path $Path - - if ($folder) - { - # The namespace folder exists - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceFolderExistsMessage) ` - -f $Path - ) -join '' ) - } - else - { - # The namespace folder does not exist - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceFolderDoesNotExistMessage) ` - -f $Path - ) -join '' ) - return $returnValue - } # if - - $returnValue += @{ - TimeToLiveSec = $folder.TimeToLiveSec - State = $folder.State - Description = $folder.Description - EnableInsiteReferrals = ($folder.Flags -contains 'Insite Referrals') - EnableTargetFailback = ($folder.Flags -contains 'Target Failback') - } - - # DFS Folder exists but does target exist? - $targetFolder = Get-FolderTarget ` - -Path $Path ` - -TargetPath $TargetPath - - if ($targetFolder) - { - # The target exists in this namespace - $returnValue.Ensure = 'Present' - $returnValue += @{ - ReferralPriorityClass = $targetFolder.ReferralPriorityClass - ReferralPriorityRank = $targetFolder.ReferralPriorityRank - } - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceFolderTargetExistsMessage) ` - -f $Path,$TargetPath - ) -join '' ) - } - else - { - # The target does not exist in this namespace - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceFolderTargetDoesNotExistMessage) ` - -f $Path,$TargetPath - ) -join '' ) - } # if - - return $returnValue -} # Get-TargetResource - -<# - .SYNOPSIS - Sets the current state of a DFS Namespace Folder. - - .PARAMETER Path - Specifies a path for the root of a DFS namespace. - - .PARAMETER TargetPath - Specifies a path for a root target of the DFS namespace. - - .PARAMETER Ensure - Specifies if the DFS Namespace root should exist. - - .PARAMETER Description - The description of the DFS Namespace. - - .PARAMETER TimeToLiveSec - Specifies a TTL interval, in seconds, for referrals. - - .PARAMETER EnableInsiteReferrals - Indicates whether a DFS namespace server provides a client only with referrals that are in the same site as the client. - - .PARAMETER EnableTargetFailback - Indicates whether a DFS namespace uses target failback. - - .PARAMETER ReferralPriorityClass - Specifies the target priority class for a DFS namespace root. - - .PARAMETER ReferralPriorityRank - Specifies the priority rank, as an integer, for a root target of the DFS namespace. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Path, - - [Parameter(Mandatory = $true)] - [System.String] - $TargetPath, - - [Parameter(Mandatory = $true)] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure, - - [Parameter()] - [System.String] - $Description, - - [Parameter()] - [System.UInt32] - $TimeToLiveSec, - - [Parameter()] - [System.Boolean] - $EnableInsiteReferrals, - - [Parameter()] - [System.Boolean] - $EnableTargetFailback, - - [Parameter()] - [ValidateSet('Global-High','SiteCost-High','SiteCost-Normal','SiteCost-Low','Global-Low')] - [System.String] - $ReferralPriorityClass, - - [Parameter()] - [System.UInt32] - $ReferralPriorityRank - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.SettingNamespaceFolderMessage) ` - -f $Path,$TargetPath - ) -join '' ) - - # Lookup the existing Namespace Folder - $folder = Get-Folder ` - -Path $Path - - if ($Ensure -eq 'Present') - { - # Set desired Configuration - if ($folder) - { - # Does the Folder need to be updated? - [System.Boolean] $folderChange = $false - - # The Folder properties that will be updated - $folderProperties = @{ - State = 'online' - } - - if (($Description) ` - -and ($folder.Description -ne $Description)) - { - $folderProperties += @{ - Description = $Description - } - $folderChange = $true - } - - if (($TimeToLiveSec) ` - -and ($folder.TimeToLiveSec -ne $TimeToLiveSec)) - { - $folderProperties += @{ - TimeToLiveSec = $TimeToLiveSec - } - $folderChange = $true - } - - if (($null -ne $EnableInsiteReferrals) ` - -and (($folder.Flags -contains 'Insite Referrals') -ne $EnableInsiteReferrals)) - { - $folderProperties += @{ - EnableInsiteReferrals = $EnableInsiteReferrals - } - $folderChange = $true - } - - if (($null -ne $EnableTargetFailback) ` - -and (($folder.Flags -contains 'Target Failback') -ne $EnableTargetFailback)) - { - $folderProperties += @{ - EnableTargetFailback = $EnableTargetFailback - } - $folderChange = $true - } - - if ($folderChange) - { - # Update Folder settings - $null = Set-DfsnFolder ` - -Path $Path ` - @FolderProperties ` - -ErrorAction Stop - - $folderProperties.GetEnumerator() | ForEach-Object -Process { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceFolderUpdateParameterMessage) ` - -f $Path,$_.name, $_.value - ) -join '' ) - } - } - - # Get target - $targetFolder = Get-FolderTarget ` - -Path $Path ` - -TargetPath $TargetPath - - # Does the target need to be updated? - [System.Boolean] $targetChange = $false - - # The Target properties that will be updated - $targetProperties = @{} - - # Check the target properties - if (($ReferralPriorityClass) ` - -and ($targetFolder.ReferralPriorityClass -ne $ReferralPriorityClass)) - { - $targetProperties += @{ - ReferralPriorityClass = ($ReferralPriorityClass -replace '-','') - } - $targetChange = $true - } - - if (($ReferralPriorityRank) ` - -and ($targetFolder.ReferralPriorityRank -ne $ReferralPriorityRank)) - { - $targetProperties += @{ - ReferralPriorityRank = $ReferralPriorityRank - } - $targetChange = $true - } - - # Is the target a member of the namespace? - if ($targetFolder) - { - # Does the target need to be changed? - if ($targetChange) - { - # Update target settings - $null = Set-DfsnFolderTarget ` - -Path $Path ` - -TargetPath $TargetPath ` - @TargetProperties ` - -ErrorAction Stop - } - } - else - { - # Add target to Namespace - $null = New-DfsnFolderTarget ` - -Path $Path ` - -TargetPath $TargetPath ` - @TargetProperties ` - -ErrorAction Stop - } - - # Output the target parameters that were changed/set - $targetProperties.GetEnumerator() | ForEach-Object -Process { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceFolderTargetUpdateParameterMessage) ` - -f $Path,$TargetPath,$_.name, $_.value - ) -join '' ) - } - } - else - { - <# - Prepare to use the PSBoundParameters as a splat to created - The new DFS Namespace Folder. - #> - $null = $PSBoundParameters.Remove('Ensure') - - # Correct the ReferralPriorityClass field - if ($ReferralPriorityClass) - { - $PSBoundParameters.ReferralPriorityClass = ($ReferralPriorityClass -replace '-','') - } - - # Create New-DfsnFolder - $null = New-DfsnFolder ` - @PSBoundParameters ` - -ErrorAction Stop - - $PSBoundParameters.GetEnumerator() | ForEach-Object -Process { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceFolderUpdateParameterMessage) ` - -f $Path,$TargetPath,$_.name, $_.value - ) -join '' ) - } - } - } - else - { - # The Namespace Folder Target should not exist - - # Get Folder target - $targetFolder = Get-FolderTarget ` - -Path $Path ` - -TargetPath $TargetPath - - if ($targetFolder) - { - # Remove the target from the Namespace Folder - $null = Remove-DfsnFolderTarget ` - -Path $Path ` - -TargetPath $TargetPath ` - -Confirm:$false ` - -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceFolderTargetRemovedMessage) ` - -f $Path,$TargetPath - ) -join '' ) - } - } -} # Set-TargetResource - -<# - .SYNOPSIS - Tests the current state of a DFS Namespace Folder. - - .PARAMETER Path - Specifies a path for the root of a DFS namespace. - - .PARAMETER TargetPath - Specifies a path for a root target of the DFS namespace. - - .PARAMETER Ensure - Specifies if the DFS Namespace root should exist. - - .PARAMETER Description - The description of the DFS Namespace. - - .PARAMETER TimeToLiveSec - Specifies a TTL interval, in seconds, for referrals. - - .PARAMETER EnableInsiteReferrals - Indicates whether a DFS namespace server provides a client only with referrals that are in the same site as the client. - - .PARAMETER EnableTargetFailback - Indicates whether a DFS namespace uses target failback. - - .PARAMETER ReferralPriorityClass - Specifies the target priority class for a DFS namespace root. - - .PARAMETER ReferralPriorityRank - Specifies the priority rank, as an integer, for a root target of the DFS namespace. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Path, - - [Parameter(Mandatory = $true)] - [System.String] - $TargetPath, - - [Parameter(Mandatory = $true)] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure, - - [Parameter()] - [System.String] - $Description, - - [Parameter()] - [System.UInt32] - $TimeToLiveSec, - - [Parameter()] - [System.Boolean] - $EnableInsiteReferrals, - - [Parameter()] - [System.Boolean] - $EnableTargetFailback, - - [Parameter()] - [ValidateSet('Global-High','SiteCost-High','SiteCost-Normal','SiteCost-Low','Global-Low')] - [System.String] - $ReferralPriorityClass, - - [Parameter()] - [System.UInt32] - $ReferralPriorityRank - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.TestingNamespaceFolderMessage) ` - -f $Path,$TargetPath - ) -join '' ) - - # Flag to signal whether settings are correct - [System.Boolean] $desiredConfigurationMatch = $true - - # Lookup the existing Namespace Folder - $folder = Get-Folder ` - -Path $Path - - if ($Ensure -eq 'Present') - { - # The Namespace Folder should exist - if ($folder) - { - # The Namespace Folder exists and should - - # Check the Namespace parameters - if (($Description) ` - -and ($folder.Description -ne $Description)) { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceFolderParameterNeedsUpdateMessage) ` - -f $Path,'Description' - ) -join '' ) - $desiredConfigurationMatch = $false - } - - if (($TimeToLiveSec) ` - -and ($folder.TimeToLiveSec -ne $TimeToLiveSec)) { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceFolderParameterNeedsUpdateMessage) ` - -f $Path,'TimeToLiveSec' - ) -join '' ) - $desiredConfigurationMatch = $false - } - - if (($null -ne $EnableInsiteReferrals) ` - -and (($folder.Flags -contains 'Insite Referrals') -ne $EnableInsiteReferrals)) { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceFolderParameterNeedsUpdateMessage) ` - -f $Path,'EnableInsiteReferrals' - ) -join '' ) - $desiredConfigurationMatch = $false - } - - if (($null -ne $EnableTargetFailback) ` - -and (($folder.Flags -contains 'Target Failback') -ne $EnableTargetFailback)) { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceFolderParameterNeedsUpdateMessage) ` - -f $Path,'EnableTargetFailback' - ) -join '' ) - $desiredConfigurationMatch = $false - } - - $targetFolder = Get-FolderTarget ` - -Path $Path ` - -TargetPath $TargetPath - - if ($targetFolder) - { - if (($ReferralPriorityClass) ` - -and ($targetFolder.ReferralPriorityClass -ne $ReferralPriorityClass)) { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceFolderTargetParameterNeedsUpdateMessage) ` - -f $Path,$TargetPath,'ReferralPriorityClass' - ) -join '' ) - $desiredConfigurationMatch = $false - } - - if (($ReferralPriorityRank) ` - -and ($targetFolder.ReferralPriorityRank -ne $ReferralPriorityRank)) { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceFolderTargetParameterNeedsUpdateMessage) ` - -f $Path,$TargetPath,'ReferralPriorityRank' - ) -join '' ) - $desiredConfigurationMatch = $false - } - } - else - { - # The Folder target does not exist but should - change required - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceFolderTargetDoesNotExistButShouldMessage) ` - -f $Path,$TargetPath - ) -join '' ) - $desiredConfigurationMatch = $false - } - } - else - { - # Ths Namespace Folder doesn't exist but should - change required - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceFolderDoesNotExistButShouldMessage) ` - -f $Path - ) -join '' ) - $desiredConfigurationMatch = $false - } - } - else - { - # The Namespace target should not exist - if ($folder) - { - $targetFolder = Get-FolderTarget ` - -Path $Path ` - -TargetPath $TargetPath - - if ($targetFolder) - { - # The Folder target exists but should not - change required - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceFolderTargetExistsButShouldNotMessage) ` - -f $Path,$TargetPath - ) -join '' ) - $desiredConfigurationMatch = $false - } - else - { - # The Namespace exists but the target doesn't - change not required - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceFolderTargetDoesNotExistAndShouldNotMessage) ` - -f $Path,$TargetPath - ) -join '' ) - } - } - else - { - # The Namespace does not exist (so neither does the target) - change not required - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceFolderDoesNotExistAndShouldNotMessage) ` - -f $Path - ) -join '' ) - } - } # if - - return $desiredConfigurationMatch - -} # Test-TargetResource - -<# - .SYNOPSIS - Lookup the DFSN Folder. - - .PARAMETER Path - Specifies a path for the root of a DFS namespace. -#> -Function Get-Folder -{ - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Path - ) - - try - { - $dfsnFolder = Get-DfsnFolder ` - -Path $Path ` - -ErrorAction Stop - } - catch [Microsoft.Management.Infrastructure.CimException] - { - $dfsnFolder = $null - } - catch - { - throw $_ - } - return $dfsnFolder -} - -<# - .SYNOPSIS - Lookup the DFSN Folder Target in a namespace. - - .PARAMETER Path - Specifies a path for the root of a DFS namespace. - - .PARAMETER TargetPath - Specifies a path for a root target of the DFS namespace. -#> -Function Get-FolderTarget -{ - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Path, - - [Parameter(Mandatory = $true)] - [System.String] - $TargetPath - ) - - try - { - $dfsnTarget = Get-DfsnFolderTarget ` - -Path $Path ` - -TargetPath $TargetPath ` - -ErrorAction Stop - } - catch [Microsoft.Management.Infrastructure.CimException] - { - $dfsnTarget = $null - } - catch - { - throw $_ - } - return $dfsnTarget -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceFolder/MSFT_xDFSNamespaceFolder.schema.mof b/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceFolder/MSFT_xDFSNamespaceFolder.schema.mof deleted file mode 100644 index ae786a9b..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceFolder/MSFT_xDFSNamespaceFolder.schema.mof +++ /dev/null @@ -1,14 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xDFSNamespaceFolder")] -class MSFT_xDFSNamespaceFolder : OMI_BaseResource -{ - [Key, Description("Specifies a path for the root of a DFS namespace.")] String Path; - [Key, Description("Specifies a path for a root target of the DFS namespace.")] String TargetPath; - [Required, Description("Specifies if the DFS Namespace root should exist."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("The description of the DFS Namespace.")] String Description; - [Write, Description("Indicates whether a DFS namespace server provides a client only with referrals that are in the same site as the client.")] Boolean EnableInsiteReferrals; - [Write, Description("Indicates whether a DFS namespace uses target failback.")] Boolean EnableTargetFailback; - [Write, Description("Specifies the target priority class for a DFS namespace root."), ValueMap{"Global-High","SiteCost-High","SiteCost-Normal","SiteCost-Low","Global-Low"}, Values{"Global-High","SiteCost-High","SiteCost-Normal","SiteCost-Low","Global-Low"}] String ReferralPriorityClass; - [Write, Description("Specifies the priority rank, as an integer, for a root target of the DFS namespace.")] Uint32 ReferralPriorityRank; - [Write, Description("Specifies a TTL interval, in seconds, for referrals.")] Uint32 TimeToLiveSec; - [Read] String State; -}; diff --git a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceFolder/en-us/MSFT_xDFSNamespaceFolder.strings.psd1 b/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceFolder/en-us/MSFT_xDFSNamespaceFolder.strings.psd1 deleted file mode 100644 index 71c77903..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceFolder/en-us/MSFT_xDFSNamespaceFolder.strings.psd1 +++ /dev/null @@ -1,19 +0,0 @@ -ConvertFrom-StringData @' - GettingNamespaceFolderMessage = Getting DFS Namespace Folder "{0}" on target "{1}". - NamespaceFolderExistsMessage = DFS Namespace Folder "{0}" exists. - NamespaceFolderDoesNotExistMessage = DFS Namespace Folder "{0}" does not exist. - NamespaceFolderTargetExistsMessage = DFS Namespace Folder "{0}" on target "{1}" exists. - NamespaceFolderTargetDoesNotExistMessage = DFS Namespace Folder "{0}" on target "{1}" does not exist. - SettingNamespaceFolderMessage = Setting DFS Namespace Folder "{0}" on target "{1}". - NamespaceFolderUpdateParameterMessage = Setting DFS Namespace Folder "{0}" parameter {1} to "{2}". - NamespaceFolderTargetUpdateParameterMessage = Setting DFS Namespace Folder "{0}" on target "{1}" parameter {2} to "{3}". - NamespaceFolderTargetRemovedMessage = DFS Namespace Folder "{0}" on target "{1}" removed. - TestingNamespaceFolderMessage = Testing DFS Namespace Folder "{0}" on target "{1}". - NamespaceFolderParameterNeedsUpdateMessage = DFS Namespace Folder "{0}" parameter {1} is different. Change required. - NamespaceFolderTargetParameterNeedsUpdateMessage = DFS Namespace Folder "{0}" on target "{1}" parameter {2} is different. Change required. - NamespaceFolderDoesNotExistButShouldMessage = DFS Namespace Folder "{0}" does not exist but should. Change required. - NamespaceFolderTargetExistsButShouldNotMessage = DFS Namespace Folder "{0}" on target "{1}" exists but should not. Change required. - NamespaceFolderTargetDoesNotExistButShouldMessage = DFS Namespace Folder "{0}" on target "{1}" does not exist but should. Change required. - NamespaceFolderDoesNotExistAndShouldNotMessage = DFS Namespace Folder "{0}" does not exist and should not. Change not required. - NamespaceFolderTargetDoesNotExistAndShouldNotMessage = DFS Namespace Folder "{0}" on target "{1}" does not exist and should not. Change not required. -'@ diff --git a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceRoot/MSFT_xDFSNamespaceRoot.psm1 b/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceRoot/MSFT_xDFSNamespaceRoot.psm1 deleted file mode 100644 index cb21e41e..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceRoot/MSFT_xDFSNamespaceRoot.psm1 +++ /dev/null @@ -1,840 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Certificate Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'DFSDsc.ResourceHelper' ` - -ChildPath 'DFSDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xDFSNamespaceRoot' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current state of a DFS Namespace Root. - - .PARAMETER Path - Specifies a path for the root of a DFS namespace. - - .PARAMETER TargetPath - Specifies a path for a root target of the DFS namespace. - - .PARAMETER Ensure - Specifies if the DFS Namespace root should exist. - - .PARAMETER Type - Specifies the type of a DFS namespace as a Type object. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Path, - - [Parameter(Mandatory = $true)] - [System.String] - $TargetPath, - - [Parameter(Mandatory = $true)] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure, - - [Parameter(Mandatory = $true)] - [ValidateSet('Standalone','DomainV1','DomainV2')] - [System.String] - $Type - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.GettingNamespaceRootMessage) ` - -f $Type,$Path,$TargetPath - ) -join '' ) - - # Generate the return object assuming absent. - $returnValue = @{ - Path = $Path - TargetPath = $TargetPath - Ensure = 'Absent' - Type = $Type - } - - # Lookup the existing Namespace root - $root = Get-Root ` - -Path $Path - - if ($root) - { - # The namespace exists - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceRootExistsMessage) ` - -f $Type,$Path - ) -join '' ) - } - else - { - # The namespace does not exist - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceRootDoesNotExistMessage) ` - -f $Type,$Path - ) -join '' ) - return $returnValue - } # if - - $returnValue += @{ - TimeToLiveSec = $root.TimeToLiveSec - State = $root.State - Description = $root.Description - EnableSiteCosting = ($root.Flags -contains 'Site Costing') - EnableInsiteReferrals = ($root.Flags -contains 'Insite Referrals') - EnableAccessBasedEnumeration = ($root.Flags -contains 'AccessBased Enumeration') - EnableRootScalability = ($root.Flags -contains 'Root Scalability') - EnableTargetFailback = ($root.Flags -contains 'Target Failback') - } - - # DFS Root exists but does target exist? - $target = Get-RootTarget ` - -Path $Path ` - -TargetPath $TargetPath - - if ($target) - { - # The target exists in this namespace - $returnValue.Ensure = 'Present' - $returnValue += @{ - ReferralPriorityClass = $target.ReferralPriorityClass - ReferralPriorityRank = $target.ReferralPriorityRank - } - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceRootTargetExistsMessage) ` - -f $Type,$Path,$TargetPath - ) -join '' ) - } - else - { - # The target does not exist in this namespace - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceRootTargetDoesNotExistMessage) ` - -f $Type,$Path,$TargetPath - ) -join '' ) - } # if - - return $returnValue -} # Get-TargetResource - -<# - .SYNOPSIS - Sets the current state of a DFS Namespace Folder. - - .PARAMETER Path - Specifies a path for the root of a DFS namespace. - - .PARAMETER TargetPath - Specifies a path for a root target of the DFS namespace. - - .PARAMETER Ensure - Specifies if the DFS Namespace root should exist. - - .PARAMETER Type - Specifies the type of a DFS namespace as a Type object. - - .PARAMETER Description - The description of the DFS Namespace. - - .PARAMETER TimeToLiveSec - Specifies a TTL interval, in seconds, for referrals. - - .PARAMETER EnableSiteCosting - Indicates whether a DFS namespace uses cost-based selection. - - .PARAMETER EnableInsiteReferrals - Indicates whether a DFS namespace server provides a client only with referrals that are in the same site as the client. - - .PARAMETER EnableAccessBasedEnumeration - Indicates whether a DFS namespace uses access-based enumeration. - - .PARAMETER EnableRootScalability - Indicates whether a DFS namespace uses root scalability mode. - - .PARAMETER EnableTargetFailback - Indicates whether a DFS namespace uses target failback. - - .PARAMETER ReferralPriorityClass - Specifies the target priority class for a DFS namespace root. - - .PARAMETER ReferralPriorityRank - Specifies the priority rank, as an integer, for a root target of the DFS namespace. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Path, - - [Parameter(Mandatory = $true)] - [System.String] - $TargetPath, - - [Parameter(Mandatory = $true)] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure, - - [Parameter(Mandatory = $true)] - [ValidateSet('Standalone','DomainV1','DomainV2')] - [System.String] - $Type, - - [Parameter()] - [System.String] - $Description, - - [Parameter()] - [System.UInt32] - $TimeToLiveSec, - - [Parameter()] - [System.Boolean] - $EnableSiteCosting, - - [Parameter()] - [System.Boolean] - $EnableInsiteReferrals, - - [Parameter()] - [System.Boolean] - $EnableAccessBasedEnumeration, - - [Parameter()] - [System.Boolean] - $EnableRootScalability, - - [Parameter()] - [System.Boolean] - $EnableTargetFailback, - - [Parameter()] - [ValidateSet('Global-High','SiteCost-High','SiteCost-Normal','SiteCost-Low','Global-Low')] - [System.String] - $ReferralPriorityClass, - - [Parameter()] - [System.UInt32] - $ReferralPriorityRank - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.SettingNamespaceRootMessage) ` - -f $Type,$Path,$TargetPath - ) -join '' ) - - # Lookup the existing Namespace root - $root = Get-Root ` - -Path $Path - - if ($Ensure -eq 'Present') - { - # Set desired Configuration - if ($root) - { - # Does the root need to be updated? - [System.Boolean] $rootChange = $false - - # The root properties that will be updated - $rootProperties = @{ - State = 'online' - } - - if (($Description) ` - -and ($root.Description -ne $Description)) - { - $rootProperties += @{ - Description = $Description - } - $rootChange = $true - } # if - - if (($TimeToLiveSec) ` - -and ($root.TimeToLiveSec -ne $TimeToLiveSec)) - { - $rootProperties += @{ - TimeToLiveSec = $TimeToLiveSec - } - $rootChange = $true - } # if - - if (($null -ne $EnableSiteCosting) ` - -and (($root.Flags -contains 'Site Costing') -ne $EnableSiteCosting)) - { - $rootProperties += @{ - EnableSiteCosting = $EnableSiteCosting - } - $rootChange = $true - } # if - - if (($null -ne $EnableInsiteReferrals) ` - -and (($root.Flags -contains 'Insite Referrals') -ne $EnableInsiteReferrals)) - { - $rootProperties += @{ - EnableInsiteReferrals = $EnableInsiteReferrals - } - $rootChange = $true - } # if - - if (($null -ne $EnableAccessBasedEnumeration) ` - -and (($root.Flags -contains 'AccessBased Enumeration') -ne $EnableAccessBasedEnumeration)) - { - $rootProperties += @{ - EnableAccessBasedEnumeration = $EnableAccessBasedEnumeration - } - $rootChange = $true - } # if - - if (($null -ne $EnableRootScalability) ` - -and (($root.Flags -contains 'Root Scalability') -ne $EnableRootScalability)) - { - $rootProperties += @{ - EnableRootScalability = $EnableRootScalability - } - $rootChange = $true - } # if - - if (($null -ne $EnableTargetFailback) ` - -and (($root.Flags -contains 'Target Failback') -ne $EnableTargetFailback)) - { - $rootProperties += @{ - EnableTargetFailback = $EnableTargetFailback - } - $rootChange = $true - } # if - - if ($rootChange) - { - # Update root settings - $null = Set-DfsnRoot ` - -Path $Path ` - @RootProperties ` - -ErrorAction Stop - - $rootProperties.GetEnumerator() | ForEach-Object -Process { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceRootUpdateParameterMessage) ` - -f $Type,$Path,$_.name, $_.value - ) -join '' ) - } - } # if - - # Get target - $target = Get-RootTarget ` - -Path $Path ` - -TargetPath $TargetPath - - # Does the target need to be updated? - [System.Boolean] $targetChange = $false - - # The Target properties that will be updated - $targetProperties = @{} - - # Check the target properties - if (($ReferralPriorityClass) ` - -and ($target.ReferralPriorityClass -ne $ReferralPriorityClass)) - { - $targetProperties += @{ - ReferralPriorityClass = ($ReferralPriorityClass -replace '-','') - } - $targetChange = $true - } # if - - if (($ReferralPriorityRank) ` - -and ($target.ReferralPriorityRank -ne $ReferralPriorityRank)) - { - $targetProperties += @{ - ReferralPriorityRank = $ReferralPriorityRank - } - $targetChange = $true - } # if - - # Is the target a member of the namespace? - if ($target) - { - # Does the target need to be changed? - if ($targetChange) - { - # Update target settings - $null = Set-DfsnRootTarget ` - -Path $Path ` - -TargetPath $TargetPath ` - @TargetProperties ` - -ErrorAction Stop - } - } - else - { - # Add target to Namespace - $null = New-DfsnRootTarget ` - -Path $Path ` - -TargetPath $TargetPath ` - @TargetProperties ` - -ErrorAction Stop - } # if - - # Output the target parameters that were changed/set - $targetProperties.GetEnumerator() | ForEach-Object -Process { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceRootTargetUpdateParameterMessage) ` - -f $Type,$Path,$TargetPath,$_.name, $_.value - ) -join '' ) - } - } - else - { - <# - Prepare to use the PSBoundParameters as a splat to created - The new DFS Namespace root. - #> - $null = $PSBoundParameters.Remove('Ensure') - - # Correct the ReferralPriorityClass field - if ($ReferralPriorityClass) - { - $PSBoundParameters.ReferralPriorityClass = ($ReferralPriorityClass -replace '-','') - } # if - - # Create New-DfsnRoot - $null = New-DfsnRoot ` - @PSBoundParameters ` - -ErrorAction Stop - - $PSBoundParameters.GetEnumerator() | ForEach-Object -Process { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceRootUpdateParameterMessage) ` - -f $Type,$Path,$_.name, $_.value - ) -join '' ) - } - } # if - } - else - { - <# - The Namespace Target should not exist - Get root target - #> - $target = Get-RootTarget ` - -Path $Path ` - -TargetPath $TargetPath - - if ($target) - { - # Remove the target from the namespace - $null = Remove-DfsnRootTarget ` - -Path $Path ` - -TargetPath $TargetPath ` - -Confirm:$false ` - -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceRootTargetRemovedMessage) ` - -f $Type,$Path,$TargetPath - ) -join '' ) - } # if - } # if -} # Set-TargetResource - -<# - .SYNOPSIS - Tests the current state of a DFS Namespace Folder. - - .PARAMETER Path - Specifies a path for the root of a DFS namespace. - - .PARAMETER TargetPath - Specifies a path for a root target of the DFS namespace. - - .PARAMETER Ensure - Specifies if the DFS Namespace root should exist. - - .PARAMETER Type - Specifies the type of a DFS namespace as a Type object. - - .PARAMETER Description - The description of the DFS Namespace. - - .PARAMETER TimeToLiveSec - Specifies a TTL interval, in seconds, for referrals. - - .PARAMETER EnableSiteCosting - Indicates whether a DFS namespace uses cost-based selection. - - .PARAMETER EnableInsiteReferrals - Indicates whether a DFS namespace server provides a client only with referrals that are in the same site as the client. - - .PARAMETER EnableAccessBasedEnumeration - Indicates whether a DFS namespace uses access-based enumeration. - - .PARAMETER EnableRootScalability - Indicates whether a DFS namespace uses root scalability mode. - - .PARAMETER EnableTargetFailback - Indicates whether a DFS namespace uses target failback. - - .PARAMETER ReferralPriorityClass - Specifies the target priority class for a DFS namespace root. - - .PARAMETER ReferralPriorityRank - Specifies the priority rank, as an integer, for a root target of the DFS namespace. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Path, - - [Parameter(Mandatory = $true)] - [System.String] - $TargetPath, - - [Parameter(Mandatory = $true)] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure, - - [Parameter(Mandatory = $true)] - [ValidateSet('Standalone','DomainV1','DomainV2')] - [System.String] - $Type, - - [Parameter()] - [System.String] - $Description, - - [Parameter()] - [System.UInt32] - $TimeToLiveSec, - - [Parameter()] - [System.Boolean] - $EnableSiteCosting, - - [Parameter()] - [System.Boolean] - $EnableInsiteReferrals, - - [Parameter()] - [System.Boolean] - $EnableAccessBasedEnumeration, - - [Parameter()] - [System.Boolean] - $EnableRootScalability, - - [Parameter()] - [System.Boolean] - $EnableTargetFailback, - - [Parameter()] - [ValidateSet('Global-High','SiteCost-High','SiteCost-Normal','SiteCost-Low','Global-Low')] - [System.String] - $ReferralPriorityClass, - - [Parameter()] - [System.UInt32] - $ReferralPriorityRank - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.TestingNamespaceRootMessage) ` - -f $Type,$Path,$TargetPath - ) -join '' ) - - # Flag to signal whether settings are correct - [System.Boolean] $desiredConfigurationMatch = $true - - # Lookup the existing Namespace root - $root = Get-Root ` - -Path $Path - - if ($Ensure -eq 'Present') - { - # The Namespace root should exist - if ($root) - { - <# - The Namespace root exists and should - Changing the namespace type is not possible - the namespace - can only be recreated if the type should change. - #> - if (($root.Type -replace ' ','') -ne $Type) - { - New-InvalidOperationException ` - -Message ($($LocalizedData.NamespaceRootTypeConversionError) ` - -f $Type,($root.Type -replace ' ','')) - } # if - - # Check the Namespace parameters - if (($Description) ` - -and ($root.Description -ne $Description)) { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceRootParameterNeedsUpdateMessage) ` - -f $Type,$Path,'Description' - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - - if (($TimeToLiveSec) ` - -and ($root.TimeToLiveSec -ne $TimeToLiveSec)) { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceRootParameterNeedsUpdateMessage) ` - -f $Type,$Path,'TimeToLiveSec' - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - - if (($null -ne $EnableSiteCosting) ` - -and (($root.Flags -contains 'Site Costing') -ne $EnableSiteCosting)) { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceRootParameterNeedsUpdateMessage) ` - -f $Type,$Path,'EnableSiteCosting' - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - - if (($null -ne $EnableInsiteReferrals) ` - -and (($root.Flags -contains 'Insite Referrals') -ne $EnableInsiteReferrals)) { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceRootParameterNeedsUpdateMessage) ` - -f $Type,$Path,'EnableInsiteReferrals' - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - - if (($null -ne $EnableAccessBasedEnumeration) ` - -and (($root.Flags -contains 'AccessBased Enumeration') -ne $EnableAccessBasedEnumeration)) { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceRootParameterNeedsUpdateMessage) ` - -f $Type,$Path,'EnableAccessBasedEnumeration' - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - - if (($null -ne $EnableRootScalability) ` - -and (($root.Flags -contains 'Root Scalability') -ne $EnableRootScalability)) { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceRootParameterNeedsUpdateMessage) ` - -f $Type,$Path,'EnableRootScalability' - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - - if (($null -ne $EnableTargetFailback) ` - -and (($root.Flags -contains 'Target Failback') -ne $EnableTargetFailback)) { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceRootParameterNeedsUpdateMessage) ` - -f $Type,$Path,'EnableTargetFailback' - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - - $target = Get-RootTarget ` - -Path $Path ` - -TargetPath $TargetPath - - if ($target) - { - if (($ReferralPriorityClass) ` - -and ($target.ReferralPriorityClass -ne $ReferralPriorityClass)) { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceRootTargetParameterNeedsUpdateMessage) ` - -f $Type,$Path,$TargetPath,'ReferralPriorityClass' - ) -join '' ) - $desiredConfigurationMatch = $false - } # if - - if (($ReferralPriorityRank) ` - -and ($target.ReferralPriorityRank -ne $ReferralPriorityRank)) { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceRootTargetParameterNeedsUpdateMessage) ` - -f $Type,$Path,$TargetPath,'ReferralPriorityRank' - ) -join '' ) - $desiredConfigurationMatch = $false - } # if - } - else - { - # The Root target does not exist but should - change required - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceRootTargetDoesNotExistButShouldMessage) ` - -f $Type,$Path,$TargetPath - ) -join '' ) - $desiredConfigurationMatch = $false - } # if - } - else - { - # Ths Namespace root doesn't exist but should - change required - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceRootDoesNotExistButShouldMessage) ` - -f $Type,$Path - ) -join '' ) - $desiredConfigurationMatch = $false - } # if - } - else - { - # The Namespace target should not exist - if ($root) - { - $target = Get-RootTarget ` - -Path $Path ` - -TargetPath $TargetPath - - if ($target) - { - # The Root target exists but should not - change required - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceRootTargetExistsButShouldNotMessage) ` - -f $Type,$Path,$TargetPath - ) -join '' ) - $desiredConfigurationMatch = $false - } - else - { - # The Namespace exists but the target doesn't - change not required - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceRootTargetDoesNotExistAndShouldNotMessage) ` - -f $Type,$Path,$TargetPath - ) -join '' ) - } # if - } - else - { - # The Namespace does not exist (so neither does the target) - change not required - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceRootDoesNotExistAndShouldNotMessage) ` - -f $Type,$Path - ) -join '' ) - } # if - } # if - - return $desiredConfigurationMatch -} # Test-TargetResource - -<# - .SYNOPSIS - Lookup the DFSN Root. - - .PARAMETER Path - Specifies a path for the root of a DFS namespace. -#> -Function Get-Root -{ - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Path - ) - - try - { - $dfsnRoot = Get-DfsnRoot ` - -Path $Path ` - -ErrorAction Stop - } - catch [Microsoft.Management.Infrastructure.CimException] - { - $dfsnRoot = $null - } - catch - { - throw $_ - } - return $dfsnRoot -} - -<# - .SYNOPSIS - Lookup the DFSN Root Target in a namespace. - - .PARAMETER Path - Specifies a path for the root of a DFS namespace. - - .PARAMETER TargetPath - Specifies a path for a root target of the DFS namespace. -#> -Function Get-RootTarget -{ - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Path, - - [Parameter(Mandatory = $true)] - [System.String] - $TargetPath - ) - - try - { - $dfsnTarget = Get-DfsnRootTarget ` - -Path $Path ` - -TargetPath $TargetPath ` - -ErrorAction Stop - } - catch [Microsoft.Management.Infrastructure.CimException] - { - $dfsnTarget = $null - } - catch - { - throw $_ - } - return $dfsnTarget -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceRoot/MSFT_xDFSNamespaceRoot.schema.mof b/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceRoot/MSFT_xDFSNamespaceRoot.schema.mof deleted file mode 100644 index 98435b89..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceRoot/MSFT_xDFSNamespaceRoot.schema.mof +++ /dev/null @@ -1,18 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xDFSNamespaceRoot")] -class MSFT_xDFSNamespaceRoot : OMI_BaseResource -{ - [Key, Description("Specifies a path for the root of a DFS namespace.")] String Path; - [Key, Description("Specifies a path for a root target of the DFS namespace.")] String TargetPath; - [Required, Description("Specifies if the DFS Namespace root should exist."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("Specifies the type of a DFS namespace as a Type object."), ValueMap{"Standalone","DomainV1","DomainV2"}, Values{"Standalone","DomainV1","DomainV2"}] String Type; - [Write, Description("The description of the DFS Namespace.")] String Description; - [Write, Description("Indicates whether a DFS namespace uses cost-based selection.")] Boolean EnableSiteCosting; - [Write, Description("Indicates whether a DFS namespace server provides a client only with referrals that are in the same site as the client.")] Boolean EnableInsiteReferrals; - [Write, Description("Indicates whether a DFS namespace uses access-based enumeration.")] Boolean EnableAccessBasedEnumeration; - [Write, Description("Indicates whether a DFS namespace uses root scalability mode.")] Boolean EnableRootScalability; - [Write, Description("Indicates whether a DFS namespace uses target failback.")] Boolean EnableTargetFailback; - [Write, Description("Specifies the target priority class for a DFS namespace root."), ValueMap{"Global-High","SiteCost-High","SiteCost-Normal","SiteCost-Low","Global-Low"}, Values{"Global-High","SiteCost-High","SiteCost-Normal","SiteCost-Low","Global-Low"}] String ReferralPriorityClass; - [Write, Description("Specifies the priority rank, as an integer, for a root target of the DFS namespace.")] Uint32 ReferralPriorityRank; - [Write, Description("Specifies a TTL interval, in seconds, for referrals.")] Uint32 TimeToLiveSec; - [Read] String State; -}; diff --git a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceRoot/en-us/MSFT_xDFSNamespaceRoot.strings.psd1 b/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceRoot/en-us/MSFT_xDFSNamespaceRoot.strings.psd1 deleted file mode 100644 index c5b5066e..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceRoot/en-us/MSFT_xDFSNamespaceRoot.strings.psd1 +++ /dev/null @@ -1,20 +0,0 @@ -ConvertFrom-StringData @' - GettingNamespaceRootMessage = Getting {0} DFS Namespace Root "{1}" on target "{2}". - NamespaceRootExistsMessage = {0} DFS Namespace Root "{1}" exists. - NamespaceRootDoesNotExistMessage = {0} DFS Namespace Root "{1}" does not exist. - NamespaceRootTargetExistsMessage = {0} DFS Namespace Root "{1}" on target "{2}" exists. - NamespaceRootTargetDoesNotExistMessage = {0} DFS Namespace Root "{1}" on target "{2}" does not exist. - SettingNamespaceRootMessage = Setting {0} DFS Namespace Root "{1}" on target "{2}". - NamespaceRootUpdateParameterMessage = Setting {0} DFS Namespace Root "{1}" parameter {2} to "{3}". - NamespaceRootTargetUpdateParameterMessage = Setting {0} DFS Namespace Root "{1}" on target "{2}" parameter {3} to "{4}". - NamespaceRootTargetRemovedMessage = {0} DFS Namespace Root "{1}" on target "{2}" removed. - TestingNamespaceRootMessage = Testing {0} DFS Namespace Root "{1}" on target "{2}". - NamespaceRootTypeConversionError = Error {0} DFS Namespace can not be added to a {1} DFS Namespace. - NamespaceRootParameterNeedsUpdateMessage = {0} DFS Namespace Root "{1}" parameter {2} is different. Change required. - NamespaceRootTargetParameterNeedsUpdateMessage = {0} DFS Namespace Root "{1}" on target "{2}" parameter {3} is different. Change required. - NamespaceRootDoesNotExistButShouldMessage = {0} DFS Namespace Root "{1}" does not exist but should. Change required. - NamespaceRootTargetExistsButShouldNotMessage = {0} DFS Namespace Root "{1}" on target "{2}" exists but should not. Change required. - NamespaceRootTargetDoesNotExistButShouldMessage = {0} DFS Namespace Root "{1}" on target "{2}" does not exist but should. Change required. - NamespaceRootDoesNotExistAndShouldNotMessage = {0} DFS Namespace Root "{1}" does not exist and should not. Change not required. - NamespaceRootTargetDoesNotExistAndShouldNotMessage = {0} DFS Namespace Root "{1}" on target "{2}" does not exist and should not. Change not required. -'@ diff --git a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceServerConfiguration/MSFT_xDFSNamespaceServerConfiguration.psm1 b/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceServerConfiguration/MSFT_xDFSNamespaceServerConfiguration.psm1 deleted file mode 100644 index cd8c171d..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceServerConfiguration/MSFT_xDFSNamespaceServerConfiguration.psm1 +++ /dev/null @@ -1,267 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Certificate Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'DFSDsc.ResourceHelper' ` - -ChildPath 'DFSDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xDFSNamespaceServerConfiguration' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - This is an array of all the parameters used by this resource. - If the property Restart is true then when this property is updated the service - will be restarted. -#> -data parameterList -{ - @( - @{ - Name = 'LdapTimeoutSec' - Type = 'Uint32' - }, - @{ - Name = 'SyncIntervalSec' - Type = 'String' - }, - @{ - Name = 'UseFQDN' - Type = 'Uint32' - Restart = $True - } - ) -} - -<# - .SYNOPSIS - Returns the current state of a DFS Namespace Server Configuration. - - .PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes' -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [System.String] - $IsSingleInstance - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.GettingNamespaceServerConfigurationMessage) - ) -join '' ) - - # Get the current DFSN Server Configuration - $serverConfiguration = Get-DfsnServerConfiguration ` - -ComputerName $env:COMPUTERNAME ` - -ErrorAction Stop - - # Generate the return object. - $returnValue = @{ - IsSingleInstance = 'Yes' - } - - foreach ($parameter in $parameterList) - { - $returnValue += @{ - $parameter.Name = $serverConfiguration.$($parameter.name) - } - } # foreach - - return $returnValue -} # Get-TargetResource - -<# - .SYNOPSIS - Sets the DFS Namespace Server Configuration. - - .PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. - - .PARAMETER LdapTimeoutSec - Specifies a time-out value, in seconds, for Lightweight Directory - Access Protocol (LDAP) requests for the DFS namespace server. - - .PARAMETER SyncIntervalSec - This interval controls how often domain-based DFS namespace root - servers and domain controllers connect to the PDC emulator to get - updates of DFS namespace metadata. - - .PARAMETER UseFQDN - Indicates whether a DFS namespace server uses FQDNs in referrals. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [System.String] - $IsSingleInstance, - - [Parameter()] - [System.UInt32] - $LdapTimeoutSec, - - [Parameter()] - [System.UInt32] - $SyncIntervalSec, - - [Parameter()] - [System.Boolean] - $UseFQDN - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.SettingNamespaceServerConfigurationMessage) - ) -join '' ) - - # Get the current DFSN Server Configuration - $serverConfiguration = Get-DfsnServerConfiguration ` - -ComputerName $env:COMPUTERNAME ` - -ErrorAction Stop - - # Generate a list of parameters that will need to be changed. - $changeParameters = @{} - $restart = $False - - foreach ($parameter in $parameterList) - { - $parameterSource = $serverConfiguration.$($parameter.name) - $parameterNew = (Get-Variable -Name ($parameter.name)).Value - if ($PSBoundParameters.ContainsKey($parameter.Name) ` - -and ($parameterSource -ne $parameterNew)) - { - $changeParameters += @{ - $($parameter.name) = $parameterNew - } - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceServerConfigurationUpdateParameterMessage) ` - -f $parameter.Name,$parameterNew - ) -join '' ) - - if ($parameter.Restart) - { - $restart = $True - } # if - } # if - } # foreach - - if ($changeParameters.Count -gt 0) - { - # Update any parameters that were identified as different - $null = Set-DfsnServerConfiguration ` - -ComputerName $env:COMPUTERNAME ` - @changeParameters ` - -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceServerConfigurationUpdatedMessage) - ) -join '' ) - - if ($restart) - { - # Restart the DFS Service - $null = Restart-Service ` - -Name DFS ` - -Force ` - -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceServerConfigurationServiceRestartedMessage) - ) -join '' ) - } - } # if -} # Set-TargetResource - -<# - .SYNOPSIS - Tests the DFS Namespace Server Configuration. - - .PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. - - .PARAMETER LdapTimeoutSec - Specifies a time-out value, in seconds, for Lightweight Directory - Access Protocol (LDAP) requests for the DFS namespace server. - - .PARAMETER SyncIntervalSec - This interval controls how often domain-based DFS namespace root - servers and domain controllers connect to the PDC emulator to get - updates of DFS namespace metadata. - - .PARAMETER UseFQDN - Indicates whether a DFS namespace server uses FQDNs in referrals. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [System.String] - $IsSingleInstance, - - [Parameter()] - [System.UInt32] - $LdapTimeoutSec, - - [Parameter()] - [System.UInt32] - $SyncIntervalSec, - - [Parameter()] - [System.Boolean] - $UseFQDN - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.TestingNamespaceServerConfigurationMessage) - ) -join '' ) - - # Flag to signal whether settings are correct - [System.Boolean] $desiredConfigurationMatch = $true - - # Get the current DFSN Server Configuration - $serverConfiguration = Get-DfsnServerConfiguration ` - -ComputerName $env:COMPUTERNAME ` - -ErrorAction Stop - - # Check each parameter - foreach ($parameter in $parameterList) - { - $parameterSource = $serverConfiguration.$($parameter.name) - $parameterNew = (Get-Variable -Name ($parameter.name)).Value - - if ($PSBoundParameters.ContainsKey($parameter.Name) ` - -and ($parameterSource -ne $parameterNew)) { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NamespaceServerConfigurationParameterNeedsUpdateMessage) ` - -f $parameter.Name,$parameterSource,$parameterNew - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - } # foreach - - return $desiredConfigurationMatch -} # Test-TargetResource - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceServerConfiguration/MSFT_xDFSNamespaceServerConfiguration.schema.mof b/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceServerConfiguration/MSFT_xDFSNamespaceServerConfiguration.schema.mof deleted file mode 100644 index be71d22b..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceServerConfiguration/MSFT_xDFSNamespaceServerConfiguration.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xDFSNamespaceServerConfiguration")] -class MSFT_xDFSNamespaceServerConfiguration : OMI_BaseResource -{ - [Key, Description("Specifies the resource is a single instance, the value must be 'Yes'."), ValueMap{"Yes"}, Values{"Yes"}] String IsSingleInstance; - [Write, Description("Specifies a time-out value, in seconds, for Lightweight Directory Access Protocol (LDAP) requests for the DFS namespace server.")] Uint32 LdapTimeoutSec; - [Write, Description("This interval controls how often domain-based DFS namespace root servers and domain controllers connect to the PDC emulator to get updates of DFS namespace metadata.")] Uint32 SyncIntervalSec; - [Write, Description("Indicates whether a DFS namespace server uses FQDNs in referrals.")] Boolean UseFQDN; -}; diff --git a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceServerConfiguration/en-us/MSFT_xDFSNamespaceServerConfiguration.strings.psd1 b/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceServerConfiguration/en-us/MSFT_xDFSNamespaceServerConfiguration.strings.psd1 deleted file mode 100644 index deab384d..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSNamespaceServerConfiguration/en-us/MSFT_xDFSNamespaceServerConfiguration.strings.psd1 +++ /dev/null @@ -1,9 +0,0 @@ -ConvertFrom-StringData @' - GettingNamespaceServerConfigurationMessage = Getting DFS Namespace Server Configuration. - SettingNamespaceServerConfigurationMessage = Setting DFS Namespace Server Configuration. - NamespaceServerConfigurationUpdateParameterMessage = Setting DFS Namespace Server Configuration parameter {0} to "{1}". - NamespaceServerConfigurationUpdatedMessage = Setting DFS Namespace Server Configuration updated. - NamespaceServerConfigurationServiceRestartedMessage = DFS Namespace Server restarted. - TestingNamespaceServerConfigurationMessage = Testing DFS Namespace Server Configuration. - NamespaceServerConfigurationParameterNeedsUpdateMessage = DFS Namespace Server Configuration parameter "{0}" is "{1}" but should be "{2}". Change required. -'@ diff --git a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroup/MSFT_xDFSReplicationGroup.psm1 b/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroup/MSFT_xDFSReplicationGroup.psm1 deleted file mode 100644 index efb65283..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroup/MSFT_xDFSReplicationGroup.psm1 +++ /dev/null @@ -1,866 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Certificate Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'DFSDsc.ResourceHelper' ` - -ChildPath 'DFSDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xDFSReplicationGroup' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current state of a DFS Replication Group. - - .PARAMETER GroupName - The name of the DFS Replication Group. - - .PARAMETER Ensure - Specifies whether the DSF Replication Group should exist. - - .PARAMETER DomainName - The AD domain the Replication Group should created in. -#> -function Get-TargetResource -{ - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $GroupName, - - [Parameter(Mandatory = $true)] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure, - - [Parameter()] - [System.String] - $DomainName - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.GettingReplicationGroupMessage) ` - -f $GroupName - ) -join '' ) - - # Lookup the existing Replication Group - $replicationGroupParameters = @{ - GroupName = $GroupName - } - - $returnValue = $replicationGroupParameters.Clone() - - if ($DomainName) - { - $replicationGroupParameters += @{ - DomainName = $DomainName - } - } # if - - $replicationGroup = Get-DfsReplicationGroup @replicationGroupParameters ` - -ErrorAction Stop - - if ($replicationGroup) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupExistsMessage) ` - -f $GroupName - ) -join '' ) - - <# - Array paramters are disabled until this issue is resolved: - https://windowsserver.uservoice.com/forums/301869-powershell/suggestions/11088807-get-dscconfiguration-fails-with-embedded-cim-type - When resolved these parameters can be added into return value - Members = @((Get-DfsrMember @replicationGroupParameters -ErrorAction Stop).ComputerName) - Folders = @((Get-DfsReplicatedFolder @replicationGroupParameters -ErrorAction Stop).FolderName) - #> - $returnValue += @{ - Ensure = 'Present' - Description = $replicationGroup.Description - DomainName = $replicationGroup.DomainName - Members = @() - Folders = @() - ContentPaths = @() - } - } - else - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupDoesNotExistMessage) ` - -f $GroupName - ) -join '' ) - - $returnValue += @{ - Ensure = 'Absent' - } - } # if - - return $returnValue -} # Get-TargetResource - -<# - .SYNOPSIS - Sets the current state of a DFS Replication Group. - - .PARAMETER GroupName - The name of the DFS Replication Group. - - .PARAMETER Ensure - Specifies whether the DSF Replication Group should exist. - - .PARAMETER Description - A description for the DFS Replication Group. - - .PARAMETER Members - A list of computers that are members of this Replication Group. - These can be specified using either the ComputerName or FQDN name - for each member. If an FQDN name is used and the DomainName - parameter is set, the FQDN domain name must match. - - .PARAMETER Folders - A list of folders that are replicated in this Replication Group. - - .PARAMETER Topology - This allows a replication topology to assign to the Replication Group. - It defaults to Manual, which will not automatically create a topology. - If set to Fullmesh, a full mesh topology between all members will be - created. - - .PARAMETER ContentPaths - An array of DFS Replication Group Content Paths to use for each of the - Folders. This can have one entry for each Folder in the Folders - parameter and should be set in th same order. If any entry is not blank - then the Content Paths will need to be set manually by - using the xDFSReplicationGroupMembership resource. - - .PARAMETER DomainName - The AD domain the Replication Group should created in. -#> -function Set-TargetResource -{ - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $GroupName, - - [Parameter(Mandatory = $true)] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure, - - [Parameter()] - [System.String] - $Description, - - [Parameter()] - [System.String[]] - $Members, - - [Parameter()] - [System.String[]] - $Folders, - - [Parameter()] - [ValidateSet('Fullmesh','Manual')] - [System.String] - $Topology = 'Manual', - - [Parameter()] - [System.String[]] - $ContentPaths, - - [Parameter()] - [System.String] - $DomainName - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.SettingRegGroupMessage) ` - -f $GroupName - ) -join '' ) - - # Lookup the existing Replication Group - $replicationGroupParameters = @{ - GroupName = $GroupName - } - - if ($DomainName) - { - $replicationGroupParameters += @{ - DomainName = $DomainName - } - } # if - - $replicationGroup = Get-DfsReplicationGroup @replicationGroupParameters ` - -ErrorAction Stop - - if ($Ensure -eq 'Present') - { - # The rep group should exist - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.EnsureReplicationGroupExistsMessage) ` - -f $GroupName - ) -join '' ) - - if ($Description) - { - $replicationGroupParameters += @{ - Description = $Description - } - } # if - - if ($replicationGroup) - { - # The RG exists already - Check the existing RG and members - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupExistsMessage) ` - -f $GroupName - ) -join '' ) - - # Check the description - if (($Description) -and ($replicationGroup.Description -ne $Description)) - { - Set-DfsReplicationGroup @replicationGroupParameters -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupDescriptionUpdatedMessage) ` - -f $GroupName - ) -join '' ) - } # if - } - else - { - # Ths Rep Groups doesn't exist - Create it - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupDoesNotExistMessage) ` - -f $GroupName - ) -join '' ) - - New-DfsReplicationGroup @replicationGroupParameters -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupCreatedMessage) ` - -f $GroupName - ) -join '' ) - } # if - - # Clean up the splat so we can use it in the next cmdlets - $replicationGroupParameters.Remove('Description') - - # Create an array of FQDN Members from the Members Array - $replicationGroupParameters += @{ - ComputerName = '' - } - - foreach ($member in $Members) - { - $replicationGroupParameters.ComputerName = $member - $fqdnMembers += @( - Get-FQDNMemberName @replicationGroupParameters - ) - } # foreach - - $replicationGroupParameters.Remove('ComputerName') - - # Get the existing members of this DFS Rep Group - $existingMembers = (Get-DfsrMember @replicationGroupParameters -ErrorAction Stop).DnsName - - # Add any missing members - foreach ($Member in $fqdnMembers) - { - if ($member -notin $existingMembers) - { - # Member is missing - add it - Add-DfsrMember @replicationGroupParameters ` - -ComputerName $member ` - -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupMemberAddedMessage) ` - -f $GroupName,$member - ) -join '' ) - } # if - } # foreach - - # Remove any members that shouldn't exist - foreach ($existingMember in $existingMembers) - { - if ($existingMember -notin $fqdnMembers) - { - # Member exists but shouldn't - remove it - Remove-DfsrMember @replicationGroupParameters ` - -ComputerName $existingMember ` - -Force ` - -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupMemberRemovedMessage) ` - -f $GroupName,$existingMember - ) -join '' ) - } # if - } # foreach - - # Get the existing folders of this DFS Rep Group - $existingFolders = (Get-DfsReplicatedFolder @replicationGroupParameters -ErrorAction Stop).FolderName - - # Add any missing folders - foreach ($folder in $Folders) - { - if ($folder -notin $existingFolders) - { - # Folder is missing - add it - New-DfsReplicatedFolder @replicationGroupParameters ` - -FolderName $folder ` - -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupFolderAddedMessage) ` - -f $GroupName,$folder - ) -join '' ) - } # if - } # foreach - - # Remove any folders that shouldn't exist - foreach ($existingFolder in $existingFolders) - { - if ($existingFolder -notin $Folders) - { - # Folder exists but shouldn't - remove it - Remove-DfsReplicatedFolder @replicationGroupParameters ` - -Folder $existingFolder ` - -Force ` - -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupFolderRemovedMessage) ` - -f $GroupName,$existingFolder - ) -join '' ) - } # if - } # foreach - - # Set the content paths (if any were passed in the array) - if ($ContentPaths) - { - # Get the current memberships for this rep group - $memberships = Get-DfsrMembership @replicationGroupParameters ` - -ErrorAction Stop - - # Scan through the content paths array - for ($i=0; $i -lt $Folders.Count; $i++) - { - $contentPath = $ContentPaths[$i] - if ($contentPath) - { - foreach ($membership in $memberships) - { - [System.String] $fqdnMemberName = Get-FQDNMemberName ` - @replicationGroupParameters ` - -ComputerName $membership.ComputerName - - [System.Boolean] $primaryMember = ($fqdnMemberName -eq $fqdnMembers[0]) - - if (($membership.FolderName -ne $Folders[$i]) ` - -or (($membership.ContentPath -eq $ContentPath) ` - -and ($membership.PrimaryMember -eq $primaryMember))) - { - # Don't update this membership - continue - } - - # The Content Path for this member needs to be set - Set-DfsrMembership @replicationGroupParameters ` - -FolderName $membership.FolderName ` - -ComputerName $membership.ComputerName ` - -PrimaryMember $primaryMember ` - -ContentPath $ContentPath - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupContentPathUpdatedMessage) ` - -f $GroupName,$membership.ComputerName - ) -join '' ) - } # foreach - } # if - } # foreach - } # if - - # If the topology is not manual, automatically configure the connections - switch ($Topology) - { - 'Fullmesh' - { - $replicationGroupParameters += @{ - SourceComputerName = '' - DestinationComputerName = '' - } - - # Scan through the combination of connections - foreach ($source in $fqdnMembers) - { - foreach ($destination in $fqdnMembers) - { - if ($source -eq $destination) - { - continue - } # if - - $replicationGroupParameters.SourceComputerName = $source - $replicationGroupParameters.DestinationComputerName = $destination - - $replicationGroupConnection = Get-DfsrConnection @replicationGroupParameters ` - -ErrorAction Stop - - if ($replicationGroupConnection) { - if (-not $replicationGroupConnection.Enabled) { - Set-DfsrConnection @replicationGroupParameters ` - -DisableConnection $false ` - -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupFullMeshConnectionUpdatedMessage) ` - -f $GroupName,$source,$destination - ) -join '' ) - } # if - } - else - { - Add-DfsrConnection @replicationGroupParameters ` - -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupFullMeshConnectionAddedMessage) ` - -f $GroupName,$source,$destination - ) -join '' ) - } # if - } # foreach - } # foreach - } # 'Fullmesh' - } # swtich - } - else - { - # The Rep Group should not exist - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.EnsureReplicationGroupDoesNotExistMessage) ` - -f $GroupName - ) -join '' ) - - if ($replicationGroup) - { - # Remove the replication group - Remove-DfsReplicationGroup @replicationGroupParameters ` - -RemoveReplicatedFolders ` - -Force ` - -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupExistsRemovedMessage) ` - -f $GroupName - ) -join '' ) - } - } # if -} # Set-TargetResource - -<# - .SYNOPSIS - Tests the current state of a DFS Replication Group. - - .PARAMETER GroupName - The name of the DFS Replication Group. - - .PARAMETER Ensure - Specifies whether the DSF Replication Group should exist. - - .PARAMETER Description - A description for the DFS Replication Group. - - .PARAMETER Members - A list of computers that are members of this Replication Group. - These can be specified using either the ComputerName or FQDN name - for each member. If an FQDN name is used and the DomainName - parameter is set, the FQDN domain name must match. - - .PARAMETER Folders - A list of folders that are replicated in this Replication Group. - - .PARAMETER Topology - This allows a replication topology to assign to the Replication Group. - It defaults to Manual, which will not automatically create a topology. - If set to Fullmesh, a full mesh topology between all members will be - created. - - .PARAMETER ContentPaths - An array of DFS Replication Group Content Paths to use for each of the - Folders. This can have one entry for each Folder in the Folders - parameter and should be set in th same order. If any entry is not blank - then the Content Paths will need to be set manually by - using the xDFSReplicationGroupMembership resource. - - .PARAMETER DomainName - The AD domain the Replication Group should created in. -#> -function Test-TargetResource -{ - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $GroupName, - - [Parameter(Mandatory = $true)] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure, - - [Parameter()] - [System.String] - $Description, - - [Parameter()] - [System.String[]] - $Members, - - [Parameter()] - [System.String[]] - $Folders, - - [Parameter()] - [ValidateSet('Fullmesh','Manual')] - [System.String] - $Topology = 'Manual', - - [Parameter()] - [System.String[]] - $ContentPaths, - - [Parameter()] - [System.String] - $DomainName - ) - - # Flag to signal whether settings are correct - [System.Boolean] $desiredConfigurationMatch = $true - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.TestingRegGroupMessage) ` - -f $GroupName - ) -join '' ) - - # Lookup the existing Replication Group - $replicationGroupParameters = @{ - GroupName = $GroupName - } - - if ($DomainName) - { - $replicationGroupParameters += @{ - DomainName = $DomainName - } - } # if - - $replicationGroup = Get-DFSReplicationGroup @replicationGroupParameters ` - -ErrorAction Stop - - if ($Ensure -eq 'Present') - { - # The RG should exist - if ($replicationGroup) - { - # The RG exists already - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupExistsMessage) ` - -f $GroupName - ) -join '' ) - - # Check the description - if (($Description) -and ($replicationGroup.Description -ne $Description)) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupDescriptionNeedsUpdateMessage) ` - -f $GroupName - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - - # Create an array of FQDN Members from the Members Array - $replicationGroupParameters += @{ - ComputerName = '' - } - - foreach ($member in $Members) - { - $replicationGroupParameters.ComputerName = $member - $fqdnMembers += @( Get-FQDNMemberName @replicationGroupParameters ) - } # foreach - - $replicationGroupParameters.Remove('ComputerName') - - # Compare the Members - $existingMembers = @((Get-DfsrMember @replicationGroupParameters -ErrorAction Stop).DnsName) - if ((Compare-Object ` - -ReferenceObject $fqdnMembers ` - -DifferenceObject $existingMembers).Count -ne 0) - { - # There is a member different of some kind. - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupMembersNeedUpdateMessage) ` - -f $GroupName - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - - # Compare the Folders - $existingFolders = @((Get-DfsReplicatedFolder @replicationGroupParameters -ErrorAction Stop).FolderName) - - if ((Compare-Object ` - -ReferenceObject $Folders ` - -DifferenceObject $existingFolders).Count -ne 0) - { - # There is a folder different of some kind. - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupFoldersNeedUpdateMessage) ` - -f $GroupName - ) -join '' ) - - $desiredConfigurationMatch = $false - } - - # Get the content paths (if any were passed in the array) - if ($ContentPaths) - { - # Get the current memberships for this rep group - $memberships = Get-DfsrMembership @replicationGroupParameters ` - -ErrorAction Stop - - # Scan through the content paths array - for ($i=0; $i -lt $Folders.Count; $i++) - { - $contentPath = $ContentPaths[$i] - - if ($contentPath) - { - foreach ($membership in $memberships) - { - [System.Boolean] $primaryMember = ($membership.ComputerName -eq $Members[0]) - - if (($membership.FolderName -ne $Folders[$i]) ` - -or (($membership.ContentPath -eq $contentPath) ` - -and ($membership.PrimaryMember -eq $primaryMember))) - { - # This membership is in the correct state. - continue - } - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupContentPathNeedUpdateMessage) ` - -f $GroupName,$membership.ComputerName - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - } # if - } # foreach - } # if - - # If the topology is not manual, check the connections are configured - switch ($Topology) - { - 'Fullmesh' - { - $replicationGroupParameters += @{ - SourceComputerName = '' - DestinationComputerName = '' - } - - # Scan through the combination of connections - foreach ($source in $fqdnMembers) - { - foreach ($destination in $fqdnMembers) - { - if ($source -eq $destination) - { - continue - } # if - - $replicationGroupParameters.SourceComputerName = $source - $replicationGroupParameters.DestinationComputerName = $destination - - $replicationGroupConnection = Get-DfsrConnection @replicationGroupParameters ` - -ErrorAction Stop - - if ($replicationGroupConnection) - { - if (-not $replicationGroupConnection.Enabled) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupFullMeshDisabledConnectionMessage) ` - -f $GroupName,$source,$destination - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - } - else - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupFullMeshMissingConnectionMessage) ` - -f $GroupName,$source,$destination - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - } # foreach - } # foreach - } # 'fullmesh' - } # switch - } - else - { - # Ths RG doesn't exist but should - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupDoesNotExistButShouldMessage) ` - -f $GroupName - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - } - else - { - # The RG should not exist - if ($replicationGroup) - { - # The RG exists but should not - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupExistsButShouldNotMessage) ` - -f $GroupName - ) -join '' ) - - $desiredConfigurationMatch = $false - } - else - { - # The RG does not exist and should not - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupDoesNotExistAndShouldNotMessage) ` - -f $GroupName - ) -join '' ) - } # if - } # if - - return $desiredConfigurationMatch -} # Test-TargetResource - -<# -.SYNOPSIS - Returns the FQDN Member name based on the ComputerName and DomainName that are provided. - - If the ComputerName is already an FQDN but the domain in the FQDN does not match the - value passed in DomainName then throw an exception. - - If the ComputerName is already an FQDN and the domain in the FQDN does match the value - passed in DomainName then the existing ComputerName is returned. - - If the ComputerName is not already an FQDN and the DomainName passed is not empty then - the ComputerName and DomainName are combined and returned. - - If the ComputerName is not already an FQDN and the DomainName passed is empty then - the ComputerName is returned. - - .PARAMETER GroupName - The name of the DFS Replication Group. - - .PARAMETER ComputerName - The computer name of the DFS Replication Group member. - - .PARAMETER DomainName - The AD domain the Replication Group should created in. -#> -function Get-FQDNMemberName -{ - [OutputType([System.String])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $GroupName, - - [Parameter(Mandatory = $true)] - [System.String] - $ComputerName, - - [Parameter()] - [System.String] - $DomainName - ) - - if ($ComputerName.Contains('.')) - { - if (($null -ne $DomainName) -and ($DomainName -ne '')) - { - if ($ComputerName -like "*.$DomainName") - { - return $ComputerName.ToLower() - } - else - { - New-InvalidOperationException ` - -Message ($($LocalizedData.ReplicationGroupDomainMismatchError ` - -f $GroupName,$ComputerName,$DomainName)) - } # if - } - else - { - return $ComputerName.ToLower() - } - } - else - { - if (($null -ne $DomainName) -and ($DomainName -ne '')) - { - return "$ComputerName.$DomainName".ToLower() - } - else - { - return $ComputerName.ToLower() - } # if - } # if -} # Get-FQDNMemberName - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroup/MSFT_xDFSReplicationGroup.schema.mof b/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroup/MSFT_xDFSReplicationGroup.schema.mof deleted file mode 100644 index ba3b60b4..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroup/MSFT_xDFSReplicationGroup.schema.mof +++ /dev/null @@ -1,12 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xDFSReplicationGroup")] -class MSFT_xDFSReplicationGroup : OMI_BaseResource -{ - [Key, Description("The name of the DFS Replication Group.")] String GroupName; - [Required, Description("Specifies whether the DSF Replication Group should exist."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("A description for the DFS Replication Group.")] String Description; - [Write, Description("A list of computers that are members of this Replication Group. These can be specified using either the ComputerName or FQDN name for each member. If an FQDN name is used and the DomainName parameter is set, the FQDN domain name must match.")] String Members[]; - [Write, Description("A list of folders that are replicated in this Replication Group.")] String Folders[]; - [Write, Description("This allows a replication topology to assign to the Replication Group. It defaults to Manual, which will not automatically create a topology. If set to Fullmesh, a full mesh topology between all members will be created."), ValueMap{"Fullmesh","Manual"}, Values{"Fullmesh","Manual"}] String Topology; - [Write, Description("An array of DFS Replication Group Content Paths to use for each of the Folders. This can have one entry for each Folder in the Folders parameter and should be set in th same order. If any entry is not blank then the Content Paths will need to be set manually by using the xDFSReplicationGroupMembership resource.")] String ContentPaths[]; - [Write, Description("The AD domain the Replication Group should created in.")] String DomainName; -}; diff --git a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroup/en-us/MSFT_xDFSReplicationGroup.strings.psd1 b/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroup/en-us/MSFT_xDFSReplicationGroup.strings.psd1 deleted file mode 100644 index 5a18c62f..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroup/en-us/MSFT_xDFSReplicationGroup.strings.psd1 +++ /dev/null @@ -1,29 +0,0 @@ -ConvertFrom-StringData @' - GettingReplicationGroupMessage = Getting DFS Replication Group "{0}". - ReplicationGroupExistsMessage = DFS Replication Group "{0}" exists. - ReplicationGroupDoesNotExistMessage = DFS Replication Group "{0}" does not exist. - SettingRegGroupMessage = Setting DFS Replication Group "{0}". - EnsureReplicationGroupExistsMessage = Ensuring DFS Replication Group "{0}" exists. - EnsureReplicationGroupDoesNotExistMessage = Ensuring DFS Replication Group "{0}" does not exist. - ReplicationGroupCreatedMessage = DFS Replication Group "{0}" has been created. - ReplicationGroupDescriptionUpdatedMessage = DFS Replication Group "{0}" description has been updated. - ReplicationGroupMemberAddedMessage = DFS Replication Group "{0}" added member "{1}". - ReplicationGroupMemberRemovedMessage = DFS Replication Group "{0}" removed member "{1}". - ReplicationGroupFolderAddedMessage = DFS Replication Group "{0}" added folder "{1}". - ReplicationGroupFolderRemovedMessage = DFS Replication Group "{0}" removed folder "{1}". - ReplicationGroupContentPathUpdatedMessage = DFS Replication Group "{0}" Content Path for "{1}" updated. - ReplicationGroupExistsRemovedMessage = DFS Replication Group "{0}" existed, but has been removed. - ReplicationGroupFullMeshConnectionAddedMessage = DFS Replication Group "{0}" Fullmesh Connection from "{1}" to "{2}" added. - ReplicationGroupFullMeshConnectionUpdatedMessage = DFS Replication Group "{0}" Fullmesh Connection from "{1}" to "{2}" updated. - TestingRegGroupMessage = Testing DFS Replication Group "{0}". - ReplicationGroupDescriptionNeedsUpdateMessage = DFS Replication Group "{0}" description is different. Change required. - ReplicationGroupMembersNeedUpdateMessage = DFS Replication Group "{0}" members are different. Change required. - ReplicationGroupFoldersNeedUpdateMessage = DFS Replication Group "{0}" folders are different. Change required. - ReplicationGroupContentPathNeedUpdateMessage = DFS Replication Group "{0}" Content Path for "{1}" is different. Change required. - ReplicationGroupDoesNotExistButShouldMessage = DFS Replication Group "{0}" does not exist but should. Change required. - ReplicationGroupExistsButShouldNotMessage = DFS Replication Group "{0}" exists but should not. Change required. - ReplicationGroupDoesNotExistAndShouldNotMessage = DFS Replication Group "{0}" does not exist and should not. Change not required. - ReplicationGroupFullMeshMissingConnectionMessage = DFS Replication Group "{0}" Fullmesh Connection from "{1}" to "{2}" does not exist. Change required. - ReplicationGroupFullMeshDisabledConnectionMessage = DFS Replication Group "{0}" Fullmesh Connection from "{1}" to "{2}" is disabled. Change required. - ReplicationGroupDomainMismatchError = DFS Replication Group "{0}" Domain name in Member "{1}" does not match DomainName "{2}". Configuration correction required. -'@ diff --git a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupConnection/MSFT_xDFSReplicationGroupConnection.psm1 b/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupConnection/MSFT_xDFSReplicationGroupConnection.psm1 deleted file mode 100644 index 200b424a..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupConnection/MSFT_xDFSReplicationGroupConnection.psm1 +++ /dev/null @@ -1,513 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Certificate Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'DFSDsc.ResourceHelper' ` - -ChildPath 'DFSDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xDFSReplicationGroupConnection' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current state of a DFS Replication Group Connection. - - .PARAMETER GroupName - The name of the DFS Replication Group. - - .PARAMETER SourceComputerName - The name of the Replication Group source computer for the - connection. This can be specified using either the ComputerName - or FQDN name for the member. If an FQDN name is used and the - DomainName parameter is set, the FQDN domain name must match. - - .PARAMETER DestinationComputerName - The name of the Replication Group destination computer for the - connection. This can be specified using either the ComputerName - or FQDN name for the member. If an FQDN name is used and the - DomainName parameter is set, the FQDN domain name must match. - - .PARAMETER Ensure - Specifies whether the DSF Replication Group should exist. - - .PARAMETER DomainName - The name of the AD Domain the DFS Replication Group connection should be in. -#> -function Get-TargetResource -{ - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $GroupName, - - [Parameter(Mandatory = $true)] - [System.String] - $SourceComputerName, - - [Parameter(Mandatory = $true)] - [System.String] - $DestinationComputerName, - - [Parameter(Mandatory = $true)] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure, - - [Parameter()] - [System.String] - $DomainName - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.GettingReplicationGroupConnectionMessage) ` - -f $GroupName,$SourceComputerName,$DestinationComputerName - ) -join '' ) - - # Lookup the existing Replication Group Connection - $connectionParameters = @{ - GroupName = $GroupName - SourceComputerName = $SourceComputerName - DestinationComputerName = $DestinationComputerName - } - - $returnValue = $connectionParameters.Clone() - - if ($PSBoundParameters.ContainsKey('DomainName')) - { - $connectionParameters += @{ - DomainName = $DomainName - } - } # if - - $replicationGroupConnection = Get-DfsrConnection @connectionParameters ` - -ErrorAction Stop - - if ($replicationGroupConnection) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupConnectionExistsMessage) ` - -f $GroupName,$SourceComputerName,$DestinationComputerName - ) -join '' ) - - $returnValue.SourceComputerName = $replicationGroupConnection.SourceComputerName - $returnValue.DestinationComputerName = $replicationGroupConnection.DestinationComputerName - - if ($replicationGroupConnection.Enabled) - { - $ensureEnabled = 'Enabled' - } - else - { - $ensureEnabled = 'Disabled' - } # if - - if ($replicationGroupConnection.RdcEnabled) - { - $ensureRDCEnabled = 'Enabled' - } - else - { - $ensureRDCEnabled = 'Disabled' - } # if - - $returnValue += @{ - Ensure = 'Present' - Description = $replicationGroupConnection.Description - DomainName = $replicationGroupConnection.DomainName - EnsureEnabled = $ensureEnabled - EnsureRDCEnabled = $ensureRDCEnabled - } - } - else - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupConnectionDoesNotExistMessage) ` - -f $GroupName,$SourceComputerName,$DestinationComputerName - ) -join '' ) - - $returnValue += @{ - Ensure = 'Absent' - } - } # if - - return $returnValue -} # Get-TargetResource - -<# - .SYNOPSIS - Sets the current state of a DFS Replication Group Connection. - - .PARAMETER GroupName - The name of the DFS Replication Group. - - .PARAMETER SourceComputerName - The name of the Replication Group source computer for the - connection. This can be specified using either the ComputerName - or FQDN name for the member. If an FQDN name is used and the - DomainName parameter is set, the FQDN domain name must match. - - .PARAMETER DestinationComputerName - The name of the Replication Group destination computer for the - connection. This can be specified using either the ComputerName - or FQDN name for the member. If an FQDN name is used and the - DomainName parameter is set, the FQDN domain name must match. - - .PARAMETER Ensure - Specifies whether the DSF Replication Group should exist. - - .PARAMETER Description - A description for the DFS Replication Group connection. - - .PARAMETER EnsureEnabled - Ensures that connection is either Enabled or Disabled. - - .PARAMETER EnsureRDCEnabled - Ensures remote differential compression is Enabled or Disabled. - - .PARAMETER DomainName - The name of the AD Domain the DFS Replication Group connection should be in. -#> -function Set-TargetResource -{ - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $GroupName, - - [Parameter(Mandatory = $true)] - [System.String] - $SourceComputerName, - - [Parameter(Mandatory = $true)] - [System.String] - $DestinationComputerName, - - [Parameter(Mandatory = $true)] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure, - - [Parameter()] - [System.String] - $Description, - - [Parameter()] - [ValidateSet('Enabled','Disabled')] - [System.String] - $EnsureEnabled = 'Enabled', - - [Parameter()] - [ValidateSet('Enabled','Disabled')] - [System.String] - $EnsureRDCEnabled = 'Enabled', - - [Parameter()] - [System.String] - $DomainName - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.SettingReplicationGroupConnectionMessage) ` - -f $GroupName,$SourceComputerName,$DestinationComputerName - ) -join '' ) - - # Remove Ensure so the PSBoundParameters can be used to splat - $null = $PSBoundParameters.Remove('Ensure') - $null = $PSBoundParameters.Remove('EnsureEnabled') - $null = $PSBoundParameters.Remove('EnsureRDCEnabled') - - # Lookup the existing Replication Group Connection - $connectionParameters = @{ - GroupName = $GroupName - SourceComputerName = $SourceComputerName - DestinationComputerName = $DestinationComputerName - } - - if ($PSBoundParameters.ContainsKey('DomainName')) - { - $connectionParameters += @{ - DomainName = $DomainName - } - } # if - - $replicationGroupConnection = Get-DfsrConnection @connectionParameters -ErrorAction Stop - - if ($Ensure -eq 'Present') - { - # The rep group connection should exist - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.EnsureReplicationGroupConnectionExistsMessage) ` - -f $GroupName,$SourceComputerName,$DestinationComputerName - ) -join '' ) - - $null = $PSBoundParameters.Add('DisableConnection',($EnsureEnabled -eq 'Disabled')) - $null = $PSBoundParameters.Add('DisableRDC',($EnsureRDCEnabled -eq 'Disabled')) - - if ($replicationGroupConnection) - { - # The RG connection exists already - update it - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupConnectionExistsMessage) ` - -f $GroupName,$SourceComputerName,$DestinationComputerName - ) -join '' ) - - Set-DfsrConnection @PSBoundParameters ` - -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupConnectionUpdatedMessage) ` - -f $GroupName,$SourceComputerName,$DestinationComputerName - ) -join '' ) - } - else - { - # Ths Rep Groups doesn't exist - Create it - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupConnectionDoesNotExistMessage) ` - -f $GroupName,$SourceComputerName,$DestinationComputerName - ) -join '' ) - - Add-DfsrConnection @PSBoundParameters ` - -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupConnectionCreatedMessage) ` - -f $GroupName,$SourceComputerName,$DestinationComputerName - ) -join '' ) - } # if - } - else - { - # The Rep Group should not exist - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.EnsureReplicationGroupConnectionDoesNotExistMessage) ` - -f $GroupName,$SourceComputerName,$DestinationComputerName - ) -join '' ) - - if ($replicationGroupConnection) - { - # Remove the replication group - Remove-DfsrConnection @connectionParameters -Force -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupConnectionExistsRemovedMessage) ` - -f $GroupName,$SourceComputerName,$DestinationComputerName - ) -join '' ) - } - } # if -} # Set-TargetResource - -<# - .SYNOPSIS - Tests the current state of a DFS Replication Group Connection. - - .PARAMETER GroupName - The name of the DFS Replication Group. - - .PARAMETER SourceComputerName - The name of the Replication Group source computer for the - connection. This can be specified using either the ComputerName - or FQDN name for the member. If an FQDN name is used and the - DomainName parameter is set, the FQDN domain name must match. - - .PARAMETER DestinationComputerName - The name of the Replication Group destination computer for the - connection. This can be specified using either the ComputerName - or FQDN name for the member. If an FQDN name is used and the - DomainName parameter is set, the FQDN domain name must match. - - .PARAMETER Ensure - Specifies whether the DSF Replication Group should exist. - - .PARAMETER Description - A description for the DFS Replication Group connection. - - .PARAMETER EnsureEnabled - Ensures that connection is either Enabled or Disabled. - - .PARAMETER EnsureRDCEnabled - Ensures remote differential compression is Enabled or Disabled. - - .PARAMETER DomainName - The name of the AD Domain the DFS Replication Group connection should be in. -#> -function Test-TargetResource -{ - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $GroupName, - - [Parameter(Mandatory = $true)] - [System.String] - $SourceComputerName, - - [Parameter(Mandatory = $true)] - [System.String] - $DestinationComputerName, - - [Parameter(Mandatory = $true)] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure, - - [Parameter()] - [System.String] - $Description, - - [Parameter()] - [ValidateSet('Enabled','Disabled')] - [System.String] - $EnsureEnabled = 'Enabled', - - [Parameter()] - [ValidateSet('Enabled','Disabled')] - [System.String] - $EnsureRDCEnabled = 'Enabled', - - [Parameter()] - [System.String] - $DomainName - ) - - # Flag to signal whether settings are correct - [System.Boolean] $desiredConfigurationMatch = $true - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.TestingReplicationGroupConnectionMessage) ` - -f $GroupName,$SourceComputerName,$DestinationComputerName - ) -join '' ) - - # Remove Ensure so the PSBoundParameters can be used to splat - $null = $PSBoundParameters.Remove('Ensure') - - # Lookup the existing Replication Group Connection - $connectionParameters = @{ - GroupName = $GroupName - SourceComputerName = $SourceComputerName - DestinationComputerName = $DestinationComputerName - } - - if ($PSBoundParameters.ContainsKey('DomainName')) - { - $connectionParameters += @{ - DomainName = $DomainName - } - } - - $replicationGroupConnection = Get-DfsrConnection @connectionParameters ` - -ErrorAction Stop - - if ($Ensure -eq 'Present') - { - # The RG should exist - if ($replicationGroupConnection) - { - # The RG exists already - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupConnectionExistsMessage) ` - -f $GroupName,$SourceComputerName,$DestinationComputerName - ) -join '' ) - - # Check if any of the non-key paramaters are different. - if (($PSBoundParameters.ContainsKey('Description')) -and ` - ($replicationGroupConnection.Description -ne $Description)) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupConnectionNeedsUpdateMessage) ` - -f $GroupName,$SourceComputerName,$DestinationComputerName,'Description' - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - - if (($EnsureEnabled -eq 'Enabled') ` - -and (-not $replicationGroupConnection.Enabled) ` - -or ($EnsureEnabled -eq 'Disabled') ` - -and ($replicationGroupConnection.Enabled)) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupConnectionNeedsUpdateMessage) ` - -f $GroupName,$SourceComputerName,$DestinationComputerName,'Enabled' - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - - if (($EnsureRDCEnabled -eq 'Enabled') ` - -and (-not $replicationGroupConnection.RDCEnabled) ` - -or ($EnsureRDCEnabled -eq 'Disabled') ` - -and ($replicationGroupConnection.RDCEnabled)) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupConnectionNeedsUpdateMessage) ` - -f $GroupName,$SourceComputerName,$DestinationComputerName,'RDC Enabled' - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - } - else - { - # Ths RG doesn't exist but should - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupConnectionDoesNotExistButShouldMessage) ` - -f $GroupName,$SourceComputerName,$DestinationComputerName - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - } - else - { - # The RG should not exist - if ($replicationGroupConnection) - { - # The RG exists but should not - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupConnectionExistsButShouldNotMessage) ` - -f $GroupName,$SourceComputerName,$DestinationComputerName - ) -join '' ) - - $desiredConfigurationMatch = $false - } - else - { - # The RG does not exist and should not - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupConnectionDoesNotExistAndShouldNotMessage) ` - -f $GroupName,$SourceComputerName,$DestinationComputerName - ) -join '' ) - } # if - } # if - - return $desiredConfigurationMatch -} # Test-TargetResource - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupConnection/MSFT_xDFSReplicationGroupConnection.schema.mof b/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupConnection/MSFT_xDFSReplicationGroupConnection.schema.mof deleted file mode 100644 index f762c512..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupConnection/MSFT_xDFSReplicationGroupConnection.schema.mof +++ /dev/null @@ -1,12 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xDFSReplicationGroupConnection")] -class MSFT_xDFSReplicationGroupConnection : OMI_BaseResource -{ - [Key, Description("The name of the DFS Replication Group.")] String GroupName; - [Key, Description("The name of the Replication Group source computer for the connection. This can be specified using either the ComputerName or FQDN name for the member. If an FQDN name is used and the DomainName parameter is set, the FQDN domain name must match.")] String SourceComputerName; - [Key, Description("The name of the Replication Group destination computer for the connection. This can be specified using either the ComputerName or FQDN name for the member. If an FQDN name is used and the DomainName parameter is set, the FQDN domain name must match.")] String DestinationComputerName; - [Required, Description("Specifies whether the DSF Replication Group connection should exist."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("A description for the DFS Replication Group connection.")] String Description; - [Write, Description("Ensures that connection is either Enabled or Disabled."),ValueMap{"Enabled","Disabled"}, Values{"Enabled","Disabled"}] String EnsureEnabled; - [Write, Description("Ensures remote differential compression is Enabled or Disabled."),ValueMap{"Enabled","Disabled"}, Values{"Enabled","Disabled"}] String EnsureRDCEnabled; - [Write, Description("The name of the AD Domain the DFS Replication Group connection should be in.")] String DomainName; -}; diff --git a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupConnection/en-us/MSFT_xDFSReplicationGroupConnection.strings.psd1 b/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupConnection/en-us/MSFT_xDFSReplicationGroupConnection.strings.psd1 deleted file mode 100644 index 00d8626b..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupConnection/en-us/MSFT_xDFSReplicationGroupConnection.strings.psd1 +++ /dev/null @@ -1,16 +0,0 @@ -ConvertFrom-StringData @' - GettingReplicationGroupConnectionMessage = Getting DFS Replication Group Connection "{0}" from "{1}" to "{2}". - ReplicationGroupConnectionExistsMessage = DFS Replication Group Connection "{0}" from "{1}" to "{2}" exists. - ReplicationGroupConnectionDoesNotExistMessage = DFS Replication Group Connection "{0}" from "{1}" to "{2}" does not exist. - SettingReplicationGroupConnectionMessage = Setting DFS Replication Group Connection "{0}" from "{1}" to "{2}". - EnsureReplicationGroupConnectionExistsMessage = Ensuring DFS Replication Group "{0}" from "{1}" to "{2}" exists. - EnsureReplicationGroupConnectionDoesNotExistMessage = Ensuring DFS Replication Group "{0}" from "{1}" to "{2}" does not exist. - ReplicationGroupConnectionCreatedMessage = DFS Replication Group Connection "{0}" from "{1}" to "{2}" has been created. - ReplicationGroupConnectionUpdatedMessage = DFS Replication Group Connection "{0}" from "{1}" to "{2}" description has been updated. - ReplicationGroupConnectionExistsRemovedMessage = DFS Replication Group Connection "{0}" from "{1}" to "{2}" existed, but has been removed. - TestingReplicationGroupConnectionMessage = Testing DFS Replication Group Connection "{0}" from "{1}" to "{2}". - ReplicationGroupConnectionNeedsUpdateMessage = DFS Replication Group Connection "{0}" from "{1}" to "{2}" {3} is different. Change required. - ReplicationGroupConnectionDoesNotExistButShouldMessage = DFS Replication Group Connection "{0}" from "{1}" to "{2}" does not exist but should. Change required. - ReplicationGroupConnectionExistsButShouldNotMessage = DFS Replication Group Connection "{0}" from "{1}" to "{2}" exists but should not. Change required. - ReplicationGroupConnectionDoesNotExistAndShouldNotMessage = DFS Replication Group Connection "{0}" from "{1}" to "{2}" does not exist and should not. Change not required. -'@ diff --git a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupFolder/MSFT_xDFSReplicationGroupFolder.psm1 b/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupFolder/MSFT_xDFSReplicationGroupFolder.psm1 deleted file mode 100644 index 1cd1b58f..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupFolder/MSFT_xDFSReplicationGroupFolder.psm1 +++ /dev/null @@ -1,339 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Certificate Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'DFSDsc.ResourceHelper' ` - -ChildPath 'DFSDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xDFSReplicationGroupFolder' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current state of a DFS Replication Group Folder. - - .PARAMETER GroupName - The name of the DFS Replication Group. - - .PARAMETER FolderName - The name of the DFS Replication Group Folder. - - .PARAMETER DomainName - The name of the AD Domain the DFS Replication Group Folder will be in. -#> -function Get-TargetResource -{ - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $GroupName, - - [Parameter(Mandatory = $true)] - [System.String] - $FolderName, - - [Parameter()] - [System.String] - $DomainName - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.GettingReplicationGroupFolderMessage) ` - -f $GroupName,$FolderName - ) -join '' ) - - # Lookup the existing Replication Group - $replicatedFolderParameters = @{ - GroupName = $GroupName - FolderName = $FolderName - } - - $returnValue = $replicatedFolderParameters.Clone() - - if ($DomainName) - { - $replicatedFolderParameters += @{ - DomainName = $DomainName - } - } # if - - $replicationGroupFolder = Get-DfsReplicatedFolder @replicatedFolderParameters ` - -ErrorAction Stop - - if ($replicationGroupFolder) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupFolderExistsMessage) ` - -f $GroupName,$FolderName - ) -join '' ) - - <# - Array paramters are disabled until this issue is resolved: - https://windowsserver.uservoice.com/forums/301869-powershell/suggestions/11088807-get-dscconfiguration-fails-with-embedded-cim-type - FilenameToExclude = $ReplicationGroupFolder.FilenameToExclude - DirectoryNameToExclude = $ReplicationGroupFolder.DirectoryNameToExclude - #> - $returnValue += @{ - Description = $replicationGroupFolder.Description - FilenameToExclude = '' - DirectoryNameToExclude = '' - DfsnPath = $replicationGroupFolder.DfsnPath - DomainName = $replicationGroupFolder.DomainName - } - } - else - { - # The Rep Group folder doesn't exist - New-InvalidOperationException ` - -Message ($($LocalizedData.ReplicationGroupFolderMissingError) ` - -f $GroupName,$FolderName) - } - - return $returnValue -} # Get-TargetResource - -<# - .SYNOPSIS - Sets the current state of a DFS Replication Group Folder. - - .PARAMETER GroupName - The name of the DFS Replication Group. - - .PARAMETER FolderName - The name of the DFS Replication Group Folder. - - .PARAMETER Description - A description for the DFS Replication Group Folder. - - .PARAMETER FileNameToExclude - An array of file names to exclude from replication. - - .PARAMETER DirectoryNameToExclude - An array of directory names to exclude from replication. - - .PARAMETER DfsnPath - The DFS Namespace Path to this Replication Group folder is mapped to. - This does NOT create the Namespace folders, it only sets the name in - the folder object. - - .PARAMETER DomainName - The name of the AD Domain the DFS Replication Group Folder will be in. -#> -function Set-TargetResource -{ - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $GroupName, - - [Parameter(Mandatory = $true)] - [System.String] - $FolderName, - - [Parameter()] - [System.String] - $Description, - - [Parameter()] - [System.String[]] - $FileNameToExclude, - - [Parameter()] - [System.String[]] - $DirectoryNameToExclude, - - [Parameter()] - [System.String] - $DfsnPath, - - [Parameter()] - [System.String] - $DomainName - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.SettingReplicationGroupFolderMessage) ` - -f $GroupName,$FolderName - ) -join '' ) - - # Now apply the changes - Set-DfsReplicatedFolder @PSBoundParameters ` - -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupFolderUpdatedMessage) ` - -f $GroupName,$FolderName - ) -join '' ) -} # Set-TargetResource - -<# - .SYNOPSIS - Tests the current state of a DFS Replication Group Folder. - - .PARAMETER GroupName - The name of the DFS Replication Group. - - .PARAMETER FolderName - The name of the DFS Replication Group Folder. - - .PARAMETER Description - A description for the DFS Replication Group Folder. - - .PARAMETER FileNameToExclude - An array of file names to exclude from replication. - - .PARAMETER DirectoryNameToExclude - An array of directory names to exclude from replication. - - .PARAMETER DfsnPath - The DFS Namespace Path to this Replication Group folder is mapped to. - This does NOT create the Namespace folders, it only sets the name in - the folder object. - - .PARAMETER DomainName - The name of the AD Domain the DFS Replication Group Folder will be in. -#> -function Test-TargetResource -{ - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $GroupName, - - [Parameter(Mandatory = $true)] - [System.String] - $FolderName, - - [Parameter()] - [System.String] - $Description, - - [Parameter()] - [System.String[]] - $FileNameToExclude, - - [Parameter()] - [System.String[]] - $DirectoryNameToExclude, - - [Parameter()] - [System.String] - $DfsnPath, - - [Parameter()] - [System.String] - $DomainName - ) - - # Flag to signal whether settings are correct - [System.Boolean] $desiredConfigurationMatch = $true - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.TestingReplicationGroupFolderMessage) ` - -f $GroupName,$FolderName - ) -join '' ) - - # Lookup the existing Replication Group Folder - $replicatedFolderParameters = @{ - GroupName = $GroupName - FolderName = $FolderName - } - - if ($DomainName) - { - $replicatedFolderParameters += @{ - DomainName = $DomainName - } - } # if - - $replicationGroupFolder = Get-DfsReplicatedFolder @replicatedFolderParameters ` - -ErrorAction Stop - - if ($replicationGroupFolder) - { - # The rep group folder is found - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupFolderExistsMessage) ` - -f $GroupName,$FolderName - ) -join '' ) - - # Check the description - if (($PSBoundParameters.ContainsKey('Description')) ` - -and ($replicationGroupFolder.Description -ne $Description)) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupFolderDescriptionMismatchMessage) ` - -f $GroupName,$FolderName - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - - # Check the FileNameToExclude - if (($PSBoundParameters.ContainsKey('FileNameToExclude')) ` - -and ((Compare-Object ` - -ReferenceObject $replicationGroupFolder.FileNameToExclude ` - -DifferenceObject $FileNameToExclude).Count -ne 0)) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupFolderFileNameToExcludeMismatchMessage) ` - -f $GroupName,$FolderName - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - - # Check the DirectoryNameToExclude - if (($PSBoundParameters.ContainsKey('DirectoryNameToExclude')) ` - -and ((Compare-Object ` - -ReferenceObject $replicationGroupFolder.DirectoryNameToExclude ` - -DifferenceObject $DirectoryNameToExclude).Count -ne 0)) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupFolderDirectoryNameToExcludeMismatchMessage) ` - -f $GroupName,$FolderName - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - - if (($PSBoundParameters.ContainsKey('DfsnPath')) ` - -and ($replicationGroupFolder.DfsnPath -ne $DfsnPath)) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupFolderDfsnPathMismatchMessage) ` - -f $GroupName,$FolderName - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - } - else - { - # The Rep Group folder doesn't exist - New-InvalidOperationException ` - -Message ($($LocalizedData.ReplicationGroupFolderMissingError) ` - -f $GroupName,$FolderName) - } # if - - return $desiredConfigurationMatch -} # Test-TargetResource - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupFolder/MSFT_xDFSReplicationGroupFolder.schema.mof b/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupFolder/MSFT_xDFSReplicationGroupFolder.schema.mof deleted file mode 100644 index 0a8a3132..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupFolder/MSFT_xDFSReplicationGroupFolder.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xDFSReplicationGroupFolder")] -class MSFT_xDFSReplicationGroupFolder : OMI_BaseResource -{ - [Key, Description("The name of the DFS Replication Group.")] String GroupName; - [Key, Description("The name of the DFS Replication Group Folder.")] String FolderName; - [Write, Description("A description for the DFS Replication Group Folder.")] String Description; - [Write, Description("An array of file names to exclude from replication.")] String FilenameToExclude[]; - [Write, Description("An array of directory names to exclude from replication.")] String DirectoryNameToExclude[]; - [Write, Description("The DFS Namespace Path to this Replication Group folder is mapped to. This does NOT create the Namespace folders, it only sets the name in the folder object.")] String DfsnPath; - [Write, Description("The name of the AD Domain the DFS Replication Group Folder will be in.")] String DomainName; -}; diff --git a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupFolder/en-us/MSFT_xDFSReplicationGroupFolder.strings.psd1 b/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupFolder/en-us/MSFT_xDFSReplicationGroupFolder.strings.psd1 deleted file mode 100644 index e4220838..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupFolder/en-us/MSFT_xDFSReplicationGroupFolder.strings.psd1 +++ /dev/null @@ -1,12 +0,0 @@ -ConvertFrom-StringData @' - GettingReplicationGroupFolderMessage = Getting DFS Replication Group "{0}" folder "{1}". - ReplicationGroupFolderExistsMessage = DFS Replication Group "{0}" folder "{1}" exists. - ReplicationGroupFolderMissingError = DFS Replication Group "{0}" folder "{1}" is missing. - SettingReplicationGroupFolderMessage = Setting DFS Replication Group "{0}" folder "{1}". - ReplicationGroupFolderUpdatedMessage = DFS Replication Group "{0}" folder "{1}" has has been updated. - TestingReplicationGroupFolderMessage = Testing DFS Replication Group "{0}" folder "{1}". - ReplicationGroupFolderDescriptionMismatchMessage = DFS Replication Group "{0}" folder "{1}" has incorrect Description. Change required. - ReplicationGroupFolderFileNameToExcludeMismatchMessage = DFS Replication Group "{0}" folder "{1}" has incorrect FileNameToExclude. Change required. - ReplicationGroupFolderDirectoryNameToExcludeMismatchMessage = DFS Replication Group "{0}" folder "{1}" has incorrect DirectoryNameToExclude. Change required. - ReplicationGroupFolderDfsnPathMismatchMessage = DFS Replication Group "{0}" folder "{1}" has incorrect DfsnPath. Change required. -'@ diff --git a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupMembership/MSFT_xDFSReplicationGroupMembership.psm1 b/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupMembership/MSFT_xDFSReplicationGroupMembership.psm1 deleted file mode 100644 index 82583991..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupMembership/MSFT_xDFSReplicationGroupMembership.psm1 +++ /dev/null @@ -1,372 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Certificate Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'DFSDsc.ResourceHelper' ` - -ChildPath 'DFSDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xDFSReplicationGroupMembership' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current state of a DFS Replication Group Membership. - - .PARAMETER GroupName - The name of the DFS Replication Group. - - .PARAMETER FolderName - The name of the DFS Replication Group Folder. - - .PARAMETER ComputerName - The computer name of the Replication Group member. This can be - specified using either the ComputerName or FQDN name for the member. - If an FQDN name is used and the DomainName parameter is set, the FQDN - domain name must match. - - .PARAMETER DomainName - The name of the AD Domain the DFS Replication Group this replication - group is in. -#> -function Get-TargetResource -{ - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $GroupName, - - [Parameter(Mandatory = $true)] - [System.String] - $FolderName, - - [Parameter(Mandatory = $true)] - [System.String] - $ComputerName, - - [Parameter()] - [System.String] - $DomainName - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.GettingReplicationGroupMembershipMessage) ` - -f $GroupName,$FolderName,$ComputerName - ) -join '' ) - - # Lookup the existing Replication Group - $membershipParameters = @{ - GroupName = $GroupName - ComputerName = $ComputerName - } - - $returnValue = $membershipParameters - - if ($DomainName) - { - $membershipParameters += @{ - DomainName = $DomainName - } - } - - $returnValue += @{ - FolderName = $FolderName - } - - $replicationGroupMembership = Get-DfsrMembership @membershipParameters ` - -ErrorAction Stop ` - | Where-Object { $_.FolderName -eq $FolderName } - - if ($replicationGroupMembership) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupMembershipExistsMessage) ` - -f $GroupName,$FolderName,$ComputerName - ) -join '' ) - - $returnValue.ComputerName = $replicationGroupMembership.ComputerName - - $returnValue += @{ - ContentPath = $replicationGroupMembership.ContentPath - StagingPath = $replicationGroupMembership.StagingPath - ConflictAndDeletedPath = $replicationGroupMembership.ConflictAndDeletedPath - ReadOnly = $replicationGroupMembership.ReadOnly - PrimaryMember = $replicationGroupMembership.PrimaryMember - DomainName = $replicationGroupMembership.DomainName - } - } - else - { - # The Rep Group membership doesn't exist - New-InvalidOperationException ` - -Message ($($LocalizedData.ReplicationGroupMembershipMissingError) ` - -f $GroupName,$FolderName,$ComputerName) - } - - return $returnValue -} # Get-TargetResource - -<# - .SYNOPSIS - Sets DFS Replication Group Membership. - - .PARAMETER GroupName - The name of the DFS Replication Group. - - .PARAMETER FolderName - The name of the DFS Replication Group Folder. - - .PARAMETER ComputerName - The computer name of the Replication Group member. This can be - specified using either the ComputerName or FQDN name for the member. - If an FQDN name is used and the DomainName parameter is set, the FQDN - domain name must match. - - .PARAMETER ContentPath - The local content path for the DFS Replication Group Folder. - - .PARAMETER StagingPath - The local staging path for the DFS Replication Group Folder. - - .PARAMETER ReadOnly - Specify if this content path should be read only. - - .PARAMETER PrimaryMember - Used to configure this as the Primary Member. Every folder must - have at least one primary member for initial replication to take - place. - - .PARAMETER DomainName - The name of the AD Domain the DFS Replication Group this replication - group is in. -#> -function Set-TargetResource -{ - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $GroupName, - - [Parameter(Mandatory = $true)] - [System.String] - $FolderName, - - [Parameter(Mandatory = $true)] - [System.String] - $ComputerName, - - [Parameter()] - [System.String] - $ContentPath, - - [Parameter()] - [System.String] - $StagingPath, - - [Parameter()] - [System.Boolean] - $ReadOnly, - - [Parameter()] - [System.Boolean] - $PrimaryMember, - - [Parameter()] - [System.String] - $DomainName - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.SettingRegGroupMembershipMessage) ` - -f $GroupName,$FolderName,$ComputerName - ) -join '' ) - - # Now apply the changes - Set-DfsrMembership @PSBoundParameters ` - -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupMembershipUpdatedMessage) ` - -f $GroupName,$FolderName,$ComputerName - ) -join '' ) -} # Set-TargetResource - -<# - .SYNOPSIS - Tests DFS Replication Group Membership. - - .PARAMETER GroupName - The name of the DFS Replication Group. - - .PARAMETER FolderName - The name of the DFS Replication Group Folder. - - .PARAMETER ComputerName - The computer name of the Replication Group member. This can be - specified using either the ComputerName or FQDN name for the member. - If an FQDN name is used and the DomainName parameter is set, the FQDN - domain name must match. - - .PARAMETER ContentPath - The local content path for the DFS Replication Group Folder. - - .PARAMETER StagingPath - The local staging path for the DFS Replication Group Folder. - - .PARAMETER ReadOnly - Specify if this content path should be read only. - - .PARAMETER PrimaryMember - Used to configure this as the Primary Member. Every folder must - have at least one primary member for initial replication to take - place. - - .PARAMETER DomainName - The name of the AD Domain the DFS Replication Group this replication - group is in. -#> -function Test-TargetResource -{ - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $GroupName, - - [Parameter(Mandatory = $true)] - [System.String] - $FolderName, - - [Parameter(Mandatory = $true)] - [System.String] - $ComputerName, - - [Parameter()] - [System.String] - $ContentPath, - - [Parameter()] - [System.String] - $StagingPath, - - [Parameter()] - [System.Boolean] - $ReadOnly, - - [Parameter()] - [System.Boolean] - $PrimaryMember, - - [Parameter()] - [System.String] - $DomainName - ) - - # Flag to signal whether settings are correct - [System.Boolean] $desiredConfigurationMatch = $true - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.TestingRegGroupMembershipMessage) ` - -f $GroupName,$FolderName,$ComputerName - ) -join '' ) - - # Lookup the existing Replication Group - $membershipParameters = @{ - GroupName = $GroupName - ComputerName = $ComputerName - } - - if ($DomainName) - { - $membershipParameters += @{ - DomainName = $DomainName - } - } - - $replicationGroupMembership = Get-DfsrMembership @membershipParameters ` - -ErrorAction Stop ` - | Where-Object { $_.FolderName -eq $FolderName } - - if ($replicationGroupMembership) - { - # The rep group folder is found - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupMembershipExistsMessage) ` - -f $GroupName,$FolderName,$ComputerName - ) -join '' ) - - # Check the ContentPath - if (($PSBoundParameters.ContainsKey('ContentPath')) ` - -and ($replicationGroupMembership.ContentPath -ne $ContentPath)) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupMembershipContentPathMismatchMessage) ` - -f $GroupName,$FolderName,$ComputerName - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - - # Check the StagingPath - if (($PSBoundParameters.ContainsKey('StagingPath')) ` - -and ($replicationGroupMembership.StagingPath -ne $StagingPath)) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupMembershipStagingPathMismatchMessage) ` - -f $GroupName,$FolderName,$ComputerName - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - - # Check the ReadOnly - if (($PSBoundParameters.ContainsKey('ReadOnly')) ` - -and ($replicationGroupMembership.ReadOnly -ne $ReadOnly)) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupMembershipReadOnlyMismatchMessage) ` - -f $GroupName,$FolderName,$ComputerName - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - - # Check the PrimaryMember - if (($PSBoundParameters.ContainsKey('PrimaryMember')) ` - -and ($replicationGroupMembership.PrimaryMember -ne $PrimaryMember)) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.ReplicationGroupMembershipPrimaryMemberMismatchMessage) ` - -f $GroupName,$FolderName,$ComputerName - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - } - else - { - # The Rep Group membership doesn't exist - New-InvalidOperationException ` - -Message ($($LocalizedData.ReplicationGroupMembershipMissingError) ` - -f $GroupName,$FolderName,$ComputerName) - } # if - - return $desiredConfigurationMatch -} # Test-TargetResource - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupMembership/MSFT_xDFSReplicationGroupMembership.schema.mof b/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupMembership/MSFT_xDFSReplicationGroupMembership.schema.mof deleted file mode 100644 index 89771cc5..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupMembership/MSFT_xDFSReplicationGroupMembership.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xDFSReplicationGroupMembership")] -class MSFT_xDFSReplicationGroupMembership : OMI_BaseResource -{ - [Key, Description("The name of the DFS Replication Group.")] String GroupName; - [Key, Description("The name of the DFS Replication Group Folder.")] String FolderName; - [Key, Description("The computer name of the Replication Group member. This can be specified using either the ComputerName or FQDN name for the member. If an FQDN name is used and the DomainName parameter is set, the FQDN domain name must match.")] String ComputerName; - [Write, Description("The local content path for the DFS Replication Group Folder.")] String ContentPath; - [Write, Description("The local staging path for the DFS Replication Group Folder.")] String StagingPath; - [Read, Description("The local content and deleted path for the DFS Replication Group Folder.")] String ConflictAndDeletedPath; - [Write, Description("Specify if this content path should be read only.")] Boolean ReadOnly; - [Write, Description("Used to configure this as the Primary Member. Every folder must have at least one primary member for initial replication to take place.")] Boolean PrimaryMember; - [Write, Description("The name of the AD Domain the DFS Replication Group this replication group is in.")] String DomainName; -}; diff --git a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupMembership/en-us/MSFT_xDFSReplicationGroupMembership.strings.psd1 b/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupMembership/en-us/MSFT_xDFSReplicationGroupMembership.strings.psd1 deleted file mode 100644 index 120e7809..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/DSCResources/MSFT_xDFSReplicationGroupMembership/en-us/MSFT_xDFSReplicationGroupMembership.strings.psd1 +++ /dev/null @@ -1,12 +0,0 @@ -ConvertFrom-StringData @' - GettingReplicationGroupMembershipMessage = Getting DFS Replication Group "{0}" folder "{1}" on "{2}". - ReplicationGroupMembershipExistsMessage = DFS Replication Group "{0}" folder "{1}" on "{2}" exists. - ReplicationGroupMembershipMissingError = DFS Replication Group "{0}" folder "{1}" on "{2}" is missing. - SettingRegGroupMembershipMessage = Setting DFS Replication Group "{0}" folder "{1}" on "{2}". - ReplicationGroupMembershipUpdatedMessage = DFS Replication Group "{0}" folder "{1}" on "{2}" has has been updated. - TestingRegGroupMembershipMessage = Testing DFS Replication Group "{0}" folder "{1}" on "{2}". - ReplicationGroupMembershipContentPathMismatchMessage = DFS Replication Group "{0}" folder "{1}" on "{2}" has incorrect ContentPath. Change required. - ReplicationGroupMembershipStagingPathMismatchMessage = DFS Replication Group "{0}" folder "{1}" on "{2}" has incorrect StagingPath. Change required. - ReplicationGroupMembershipReadOnlyMismatchMessage = DFS Replication Group "{0}" folder "{1}" on "{2}" has incorrect ReadOnly. Change required. - ReplicationGroupMembershipPrimaryMemberMismatchMessage = DFS Replication Group "{0}" folder "{1}" on "{2}" has incorrect PrimaryMember. Change required. -'@ diff --git a/lib/puppet_x/dsc_resources/xDFS/LICENSE b/lib/puppet_x/dsc_resources/xDFS/LICENSE deleted file mode 100644 index cec380d8..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/puppet_x/dsc_resources/xDFS/Modules/DFSDsc.ResourceHelper/DFSDsc.ResourceHelper.psm1 b/lib/puppet_x/dsc_resources/xDFS/Modules/DFSDsc.ResourceHelper/DFSDsc.ResourceHelper.psm1 deleted file mode 100644 index 5ac299a7..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/Modules/DFSDsc.ResourceHelper/DFSDsc.ResourceHelper.psm1 +++ /dev/null @@ -1,181 +0,0 @@ -<# - .SYNOPSIS - Tests if the current machine is a Nano server. -#> -function Test-IsNanoServer -{ - if (Test-Command -Name Get-ComputerInfo) - { - $computerInfo = Get-ComputerInfo - - if ('Server' -eq $computerInfo.OsProductType ` - -and 'NanoServer' -eq $computerInfo.OsServerLevel) - { - return $true - } - } - - return $false -} - -<# - .SYNOPSIS - Tests if the the specified command is found. - - .PARAMETER Name - The name of the command to find. -#> -function Test-Command -{ - param - ( - [Parameter()] - [System.String] - $Name - ) - - return ($null -ne (Get-Command -Name $Name -ErrorAction Continue 2> $null)) -} - -<# - .SYNOPSIS - Creates and throws an invalid argument exception - - .PARAMETER Message - The message explaining why this error is being thrown - - .PARAMETER ArgumentName - The name of the invalid argument that is causing this error to be thrown -#> -function New-InvalidArgumentException -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Message, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $ArgumentName - ) - - $argumentException = New-Object -TypeName 'ArgumentException' -ArgumentList @( $Message, - $ArgumentName ) - $newObjectParams = @{ - TypeName = 'System.Management.Automation.ErrorRecord' - ArgumentList = @( $argumentException, $ArgumentName, 'InvalidArgument', $null ) - } - $errorRecord = New-Object @newObjectParams - - throw $errorRecord -} - -<# - .SYNOPSIS - Creates and throws an invalid operation exception - - .PARAMETER Message - The message explaining why this error is being thrown - - .PARAMETER ErrorRecord - The error record containing the exception that is causing this terminating error -#> -function New-InvalidOperationException -{ - [CmdletBinding()] - param - ( - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $Message, - - [Parameter()] - [ValidateNotNull()] - [System.Management.Automation.ErrorRecord] - $ErrorRecord - ) - - if ($null -eq $Message) - { - $invalidOperationException = New-Object -TypeName 'InvalidOperationException' - } - elseif ($null -eq $ErrorRecord) - { - $invalidOperationException = - New-Object -TypeName 'InvalidOperationException' -ArgumentList @( $Message ) - } - else - { - $invalidOperationException = - New-Object -TypeName 'InvalidOperationException' -ArgumentList @( $Message, - $ErrorRecord.Exception ) - } - - $newObjectParams = @{ - TypeName = 'System.Management.Automation.ErrorRecord' - ArgumentList = @( $invalidOperationException.ToString(), 'MachineStateIncorrect', - 'InvalidOperation', $null ) - } - $errorRecordToThrow = New-Object @newObjectParams - throw $errorRecordToThrow -} - -<# - .SYNOPSIS - Retrieves the localized string data based on the machine's culture. - Falls back to en-US strings if the machine's culture is not supported. - - .PARAMETER ResourceName - The name of the resource as it appears before '.strings.psd1' of the localized string file. - - For example: - For WindowsOptionalFeature: MSFT_xWindowsOptionalFeature - For Service: MSFT_xServiceResource - For Registry: MSFT_xRegistryResource - - .PARAMETER ResourcePath - The path the resource file is located in. -#> -function Get-LocalizedData -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $ResourceName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $ResourcePath - ) - - $localizedStringFileLocation = Join-Path -Path $ResourcePath -ChildPath $PSUICulture - - if (-not (Test-Path -Path $localizedStringFileLocation)) - { - # Fallback to en-US - $localizedStringFileLocation = Join-Path -Path $ResourcePath -ChildPath 'en-US' - } - - Import-LocalizedData ` - -BindingVariable 'localizedData' ` - -FileName "$ResourceName.strings.psd1" ` - -BaseDirectory $localizedStringFileLocation - - return $localizedData -} - -Export-ModuleMember -Function @( - 'Test-IsNanoServer' - 'New-InvalidArgumentException' - 'New-InvalidOperationException' - 'Get-LocalizedData' - ) diff --git a/lib/puppet_x/dsc_resources/xDFS/xDFS.psd1 b/lib/puppet_x/dsc_resources/xDFS/xDFS.psd1 deleted file mode 100644 index 50f913b4..00000000 --- a/lib/puppet_x/dsc_resources/xDFS/xDFS.psd1 +++ /dev/null @@ -1,75 +0,0 @@ -@{ - # Version number of this module. - ModuleVersion = '3.2.0.0' - - # ID used to uniquely identify this module - GUID = '3bcb9c66-ea0b-4675-bd46-c390a382c388' - - # Author of this module - Author = 'Microsoft Corporation' - - # Company or vendor of this module - CompanyName = 'Microsoft Corporation' - - # Copyright statement for this module - Copyright = '(c) 2015 Microsoft Corporation. All rights reserved.' - - # Description of the functionality provided by this module - Description = 'DSC resources for configuring Distributed File System Replication and Namespaces.' - - # Minimum version of the Windows PowerShell engine required by this module - PowerShellVersion = '5.0' - - # Minimum version of the common language runtime (CLR) required by this module - CLRVersion = '4.0' - - # Processor architecture (None, X86, Amd64) required by this module - ProcessorArchitecture = 'None' - - # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess - # NestedModules = @() - - # Functions to export from this module - FunctionsToExport = '*' - - # Cmdlets to export from this module - CmdletsToExport = '*' - - # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. - PrivateData = @{ - PSData = @{ - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @( 'DSC','DesiredStateConfiguration','DSCResourceKit','DSCResource','DFS','DistributedFileSystem' ) - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xDFS/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xDFS' - - # ReleaseNotes of this module - ReleaseNotes = '- Converted AppVeyor.yml to pull Pester from PSGallery instead of Chocolatey. -- Changed AppVeyor.yml to use default image. -- Converted AppVeyor build process to use AppVeyor.psm1. -- Resolved PSSA violations. -- Resolved Readme.md style violations. -- Converted Integration Tests to use Test Drive and stop using Invoke-Pester. -- Move strings into separate language files. -- Added CodeCov support. -- Clean up manifest file by removing commented out sections. -- Convert Examples to pass tests and meet minimum standards. -- Convert to Wiki and auto-documentation generation. -- Convert to TestHarness test execution method. -- Correct parameter block format to meet guidelines. -- Replaced all type accelerators with full type names. -- Updated Readme.md to contain resource list. -- Fixed xDFSNamespaceServerConfiguration by converting LocalHost to ComputerName - instead. -- Added integration test to test for conflicts with other common resource kit modules. -- Prevented ResourceHelper and Common module cmdlets from being exported to resolve - conflicts with other resource modules. -' - } # End of PSData hashtable - } # End of PrivateData hashtable -} - diff --git a/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDBPackage/MSFT_xDBPackage.psm1 b/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDBPackage/MSFT_xDBPackage.psm1 deleted file mode 100644 index dd2cb8b7..00000000 --- a/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDBPackage/MSFT_xDBPackage.psm1 +++ /dev/null @@ -1,242 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $true)] - [System.String] - $SqlServer, - - [parameter(Mandatory = $true)] - [System.String] - $Path, - - [parameter(Mandatory = $true)] - [ValidateSet("DACPAC","BACPAC")] - [System.String] - $Type, - - [parameter(Mandatory = $true)] - [ValidateSet("2008-R2","2012","2014")] - [System.String] - $SqlServerVersion - ) -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [System.Management.Automation.PSCredential] - $Credentials, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $true)] - [System.String] - $SqlServer, - - [parameter(Mandatory = $true)] - [System.String] - $Path, - - [parameter(Mandatory = $true)] - [ValidateSet("DACPAC","BACPAC")] - [System.String] - $Type, - - [parameter(Mandatory = $true)] - [ValidateSet("2008-R2","2012","2014")] - [System.String] - $SqlServerVersion - ) - - $connectionString = Construct-ConnectionString -sqlServer $SqlServer -credentials $Credentials - - switch($Type) - { - "DACPAC" - { - Extract-DacPacForDb -connectionString $connectionString -sqlServerVersion $SqlServerVersion -databaseName $DatabaseName -dacpacPath $Path - } - "BACPAC" - { - Import-BacPacForDb -connectionString $connectionString -sqlServerVersion $SqlServerVersion -databaseName $DatabaseName -bacpacPath $Path - } - } - -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [System.Management.Automation.PSCredential] - $Credentials, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseName, - - [parameter(Mandatory = $true)] - [System.String] - $SqlServer, - - [parameter(Mandatory = $true)] - [System.String] - $Path, - - [parameter(Mandatory = $true)] - [ValidateSet("DACPAC","BACPAC")] - [System.String] - $Type, - - [parameter(Mandatory = $true)] - [ValidateSet("2008-R2","2012","2014")] - [System.String] - $SqlServerVersion - ) - - $connectionString = Construct-ConnectionString -sqlServer $SqlServer -credentials $Credentials - - $dbExists = CheckIfDbExists -connectionString $connectionString -databaseName $DatabaseName - - if($dbExists) - { - return $false - } - - return $true -} - -function Check-IfDbExists([string]$databaseName, [string]$connectionString) -{ - $connectionString = "$connectionString database=$databaseName;" - - $connection = New-Object system.Data.SqlClient.SqlConnection - - $connection.connectionstring = $connectionString - - try - { - $connection.Open() - } - catch - { - return $false - } - - $connection.Close() - - return $true -} - -function Construct-ConnectionString([string]$sqlServer, [System.Management.Automation.PSCredential]$credentials) -{ - $uid = $credentials.UserName - $pwd = $credentials.GetNetworkCredential().Password - $server = "Server=$sqlServer;" - - if($PSBoundParameters.ContainsKey('credentials')) - { - $integratedSecurity = "Integrated Security=False;" - $userName = "uid=$uid;pwd=$pwd;" - } - else - { - $integratedSecurity = "Integrated Security=SSPI;" - } - - $connectionString = "$server$userName$integratedSecurity" - - return $connectionString -} - -function Extract-DacPacForDb([string]$connectionString, [string]$sqlServerVersion, [string]$databaseName, [string]$dacpacPath) -{ - Load-DacFx -sqlserverVersion $sqlServerVersion - - $dacService = new-object Microsoft.SqlServer.Dac.DacServices($connectionString) - - try - { - $dacService.Extract($dacpacPath, $databaseName, "MyApplication", "1.0.0.0") - } - catch - { - Write-Verbose -Message "Extracting DacPac failed" - } -} - -function Import-BacPacForDb([string]$connectionString, [string]$sqlServerVersion, [string]$databaseName, [string]$bacpacPath) -{ - Write-Verbose "Importing bacpac" - - Load-DacFx -sqlserverVersion $sqlServerVersion - - Write-Verbose $connectionString - - $dacServiceInstance = new-object Microsoft.SqlServer.Dac.DacServices ($connectionString) - - Write-Verbose $dacServiceInstance - - try - { - $dacServiceInstance.ExportBacpac($bacpacPath, $databaseName) - } - catch - { - Write-Verbose -Message "Importing BacPac failed" - } -} - -function Load-DacFx([string]$sqlserverVersion) -{ - $majorVersion = Get-SqlServerMajoreVersion -sqlServerVersion $sqlserverVersion - - $DacFxLocation = "${env:ProgramFiles(x86)}\Microsoft SQL Server\$majorVersion\DAC\bin\Microsoft.SqlServer.Dac.dll" - - try - { - [System.Reflection.Assembly]::LoadFrom($DacFxLocation) | Out-Null - } - catch - { - Throw "Loading DacFx Failed" - } -} - -function Get-SqlServerMajoreVersion([string]$sqlServerVersion) -{ - switch($sqlserverVersion) - { - "2008-R2" - { - $majorVersion = 100 - } - "2012" - { - $majorVersion = 110 - } - "2014" - { - $majorVersion = 120 - } - } - - return $majorVersion -} - -Export-ModuleMember -Function *-TargetResource - - diff --git a/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDBPackage/MSFT_xDBPackage.schema.mof b/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDBPackage/MSFT_xDBPackage.schema.mof deleted file mode 100644 index 808c75e7..00000000 --- a/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDBPackage/MSFT_xDBPackage.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xDBPackage")] -class MSFT_xDBPackage : OMI_BaseResource -{ - [Write, EmbeddedInstance("MSFT_Credential"), Description("Credentials to Connect to the sql server")] String Credentials; - [Key, Description("Name of the Database")] String DatabaseName; - [Required, Description("Sql Server Name")] String SqlServer; - [Required, Description("Path to BacPac/DacPac")] String Path; - [Required, Description("Type for backup(Extract id done for DACPAC and Import for BACPAC)"), ValueMap{"DACPAC","BACPAC"}, Values{"DACPAC","BACPAC"}] String Type; - [Required, ValueMap{"2008-R2","2012","2014"}, Values{"2008-R2","2012","2014"}, Description("Sql Server Version For DacFx")] String SqlServerVersion; -}; - - diff --git a/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabase/MSFT_xDatabase.psm1 b/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabase/MSFT_xDatabase.psm1 deleted file mode 100644 index ade1e057..00000000 --- a/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabase/MSFT_xDatabase.psm1 +++ /dev/null @@ -1,224 +0,0 @@ -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' -DacFxInstallationError=Please ensure that DacFx is installed. -SmoFxInstallationError=Please ensure that Smo is installed. -DacPacExtractionError=Extracting DacPac for Db failed, continuing with Dac Deployment. -'@ -} - -Import-Module -DisableNameChecking $PSScriptRoot\..\xDatabase_Common - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [System.Management.Automation.PSCredential] - $Credentials, - - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [System.String] - $SqlServer, - - [parameter(Mandatory = $true)] - [ValidateSet("2008-R2","2012","2014")] - [System.String] - $SqlServerVersion, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseName - ) - - if($PSBoundParameters.ContainsKey('Credentials')) - { - $ConnectionString = Construct-ConnectionString -sqlServer $SqlServer -credentials $Credentials - } - else - { - $ConnectionString = Construct-ConnectionString -sqlServer $SqlServer - } - - $dbExists = CheckIfDbExists $ConnectionString $DatabaseName - $Ensure = if ($dbExists) { "Present" } else { "Absent" } - - $result = @{ - Ensure = $Ensure - DatabaseName = $DatabaseName - SqlServer = $SqlServer - SqlServerVersion = $SqlServerVersion - } - return $result -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [System.Management.Automation.PSCredential] - $Credentials, - - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [System.String] - $SqlServer, - - [parameter(Mandatory = $true)] - [ValidateSet("2008-R2","2012","2014")] - [System.String] - $SqlServerVersion, - - [System.String] - $BacPacPath, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseName, - - [System.String] - $DacPacPath, - - [System.String] - $DacPacApplicationName, - - [System.String] - $DacPacApplicationVersion - ) - - if($PSBoundParameters.ContainsKey('Credentials')) - { - $ConnectionString = Construct-ConnectionString -sqlServer $SqlServer -credentials $Credentials - } - else - { - $ConnectionString = Construct-ConnectionString -sqlServer $SqlServer - } - - if($Ensure -eq "Present") - { - if($PSBoundParameters.ContainsKey('BacPacPath')) - { - Perform-Restore -DbName $DatabaseName -connectionString $ConnectionString -sqlserverVersion $SqlServerVersion -bacpacFilePath $BacPacPath - } - elseif($PSBoundParameters.ContainsKey('DacPacPath')) - { - if(!$PSBoundParameters.ContainsKey('DacPacApplicationName')) - { - Throw "Application Name Needed for DAC Registration, else upgrade is unsupported" - } - DeployDac -databaseName $DatabaseName -connectionString $ConnectionString -sqlserverVersion $SqlServerVersion -dacpacPath $DacPacPath -dacpacApplicationName $DacPacApplicationName -dacpacApplicationVersion $DacPacApplicationVersion - } - else - { - CreateDb -databaseName $DatabaseName -connectionString $ConnectionString - } - } - else - { - DeleteDb -databaseName $DatabaseName -connectionString $ConnectionString -sqlServerVersion $SqlServerVersion - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [System.Management.Automation.PSCredential] - $Credentials, - - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [System.String] - $SqlServer, - - [parameter(Mandatory = $true)] - [ValidateSet("2008-R2","2012","2014")] - [System.String] - $SqlServerVersion, - - [System.String] - $BacPacPath, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseName, - - [System.String] - $DacPacPath, - - [System.String] - $DacPacApplicationName, - - [System.String] - $DacPacApplicationVersion - ) - - if($PSBoundParameters.ContainsKey('DacPacPath') -and $PSBoundParameters.ContainsKey('BacPacPath')) - { - throw "Specify only one out of dacpac or bacpac" - } - - if($PSBoundParameters.ContainsKey('Credentials')) - { - $ConnectionString = Construct-ConnectionString -sqlServer $SqlServer -credentials $Credentials - } - else - { - $ConnectionString = Construct-ConnectionString -sqlServer $SqlServer - } - - $dbExists = CheckIfDbExists $ConnectionString $DatabaseName - - if($Ensure -eq "Present") - { - if($PSBoundParameters.ContainsKey('BacPacPath')) - { - if($dbExists) - { - return $true - } - - return $false - } - if($dbExists -eq $false) - { - return $false - } - if($dbExists -eq $true -and !$PSBoundParameters.ContainsKey('DacPacPath')) - { - return $true - } - else - { - return $false - } - } - else - { - if($dbExists) - { - return $false - } - - return $true - } -} - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabase/MSFT_xDatabase.schema.mof b/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabase/MSFT_xDatabase.schema.mof deleted file mode 100644 index eb8843c1..00000000 --- a/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabase/MSFT_xDatabase.schema.mof +++ /dev/null @@ -1,16 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xDatabase")] -class MSFT_xDatabase : OMI_BaseResource -{ - [Write, EmbeddedInstance("MSFT_Credential"), Description("Credentials to Connect to the sql server")] String Credentials; - [Required, ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("Sql Server Name")] String SqlServer; - [Required, ValueMap{"2008-R2","2012","2014"}, Values{"2008-R2","2012","2014"}, Description("Sql Server Version For DacFx")] String SqlServerVersion; - [Write, Description("Path to BacPac, if this is specified resore is performed")] String BacPacPath; - [Key, Description("Name of the Database")] String DatabaseName; - [Write, Description("Path to DacPac, if this is specified dacpac deployment is performed")] String DacPacPath; - [Write, Description("DacPac Application Name for Registration")] String DacPacApplicationName; - [Write, Description("DacPac Application Version for Registration")] String DacPacApplicationVersion; -}; - - diff --git a/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabaseLogin/MSFT_xDatabaseLogin.psm1 b/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabaseLogin/MSFT_xDatabaseLogin.psm1 deleted file mode 100644 index eb1e4abb..00000000 --- a/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabaseLogin/MSFT_xDatabaseLogin.psm1 +++ /dev/null @@ -1,239 +0,0 @@ -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' - CreateDatabaseLoginError=Failed to create SQL Login '{0}'. - TestDatabaseLoginError=Failed to test SQL Login '{0}'. - CreateDatabaseLoginSuccess=Success: SQL Login '{0}' either already existed or has been successfully created. - RemoveDatabaseLoginError=Failed to remove SQL Login '{0}'. - RemoveDatabaseLoginSuccess=Success: SQL Login '{0}' either does not existed or has been successfully removed. -'@ -} - -Import-Module $PSScriptRoot\..\xDatabase_Common - -function Get-TargetResource #Not yet working -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $LoginName, - - [System.String] - $LoginPassword, - - [System.Management.Automation.PSCredential] - $SqlConnectionCredential, - - [parameter(Mandatory = $true)] - [string] - [ValidateSet("SQL","Windows")] - $SqlAuthType, - - [parameter(Mandatory = $true)] - [System.String] - $SqlServer - - ) - - if($SqlAuthType -eq "SQL") - { - $ConnectionString = Construct-ConnectionString -sqlServer $SqlServer -credentials $SqlConnectionCredential - } - else - { - $ConnectionString = Construct-ConnectionString -sqlServer $SqlServer - } - - [string]$loginNameQuery = "SELECT * from sys.sql_logins where name='$LoginName'" - - $PresentValue = $false - - if((ReturnSqlQuery -sqlConnection $connectionString -SqlQuery $loginNameQuery)[0] -gt 0) - { - $PresentValue = $true - } - - - $returnValue = @{ - Ensure = $PresentValue - LoginName = $LoginName - SqlServer = $SqlServer - } - - $returnValue - -} - -#TODO: handle absent case. example "DROP Login Toothy" - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $LoginName, - - [System.String] - $LoginPassword, - - [System.Management.Automation.PSCredential] - $SqlConnectionCredential, - - [parameter(Mandatory = $true)] - [string] - [ValidateSet("SQL","Windows")] - $SqlAuthType, - - [parameter(Mandatory = $true)] - [System.String] - $SqlServer - ) - - if($SqlAuthType -eq "SQL") - { - $ConnectionString = Construct-ConnectionString -sqlServer $SqlServer -credentials $SqlConnectionCredential - } - else - { - $ConnectionString = Construct-ConnectionString -sqlServer $SqlServer - } - - if($Ensure -eq "Present") - { - try - { - # Create login if it does not already exist. - [string]$SqlQuery = "if not exists(SELECT name FROM sys.sql_logins WHERE name='$LoginName') Begin create login $LoginName with password='$LoginPassword' END" - - $supressReturn = ExecuteSqlQuery -sqlConnection $connectionString -SqlQuery $SqlQuery - - Write-Verbose $($LocalizedData.CreateDatabaseLoginSuccess -f ${LoginName}) - - } - catch - { - $errorId = "CreateDatabaseLogin"; - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidResult - $errorMessage = $($LocalizedData.CreateDatabaseLoginError -f ${LoginName}) - $exception = New-Object System.InvalidOperationException $errorMessage - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord); - } - } - else # Ensure is absent so remove login. - { - try - { - # Create login if it does not already exist. - [string]$SqlQuery = "if exists(SELECT name FROM sys.sql_logins WHERE name='$LoginName') Begin DROP LOGIN $LoginName END" - - $supressReturn = ExecuteSqlQuery -sqlConnection $connectionString -SqlQuery $SqlQuery - - Write-Verbose $($LocalizedData.RemoveDatabaseLoginSuccess -f ${LoginName}) - } - catch - { - $errorId = "RemoveDatabaseLogin"; - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidResult - $errorMessage = $($LocalizedData.RemoveDatabaseLoginError -f ${LoginName}) - $exception = New-Object System.InvalidOperationException $errorMessage - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord); - } - } -} - - -function Test-TargetResource #Not yet working -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $LoginName, - - [System.String] - $LoginPassword, - - [System.Management.Automation.PSCredential] - $SqlConnectionCredential, - - [parameter(Mandatory = $true)] - [string] - [ValidateSet("SQL","Windows")] - $SqlAuthType, - - [parameter(Mandatory = $true)] - [System.String] - $SqlServer - ) - - try - { - if($SqlAuthType -eq "SQL") - { - $ConnectionString = Construct-ConnectionString -sqlServer $SqlServer -credentials $SqlConnectionCredential - } - else - { - $ConnectionString = Construct-ConnectionString -sqlServer $SqlServer - } - - [string]$SqlQuery = "SELECT * from sys.sql_logins where name='$LoginName'" - - $LoginsReturnedByQuery = (ReturnSqlQuery -sqlConnection $connectionString -SqlQuery $SqlQuery)[0] - - if((($LoginsReturnedByQuery -gt 0) -and ($Ensure -eq "Present")) -or (($LoginsReturnedByQuery -eq 0) -and ($Ensure -eq "absent"))) - { - $result = $true - } - else - { - $result = $false - } - - return $result - - } - catch - { - $errorId = "TestDatabaseLogin"; - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidResult - $errorMessage = $($LocalizedData.TestDatabaseLoginError -f ${LoginName}) - $exception = New-Object System.InvalidOperationException $errorMessage - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord); - } - -} - - -Export-ModuleMember -Function *-TargetResource - - - - diff --git a/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabaseLogin/MSFT_xDatabaseLogin.schema.mof b/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabaseLogin/MSFT_xDatabaseLogin.schema.mof deleted file mode 100644 index 1b74e7eb..00000000 --- a/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabaseLogin/MSFT_xDatabaseLogin.schema.mof +++ /dev/null @@ -1,15 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xDatabaseLogin")] -class MSFT_xDatabaseLogin : OMI_BaseResource -{ - [Write, ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Key] String LoginName; - [Write] String LoginPassword; - [Required, ValueMap{"Windows","SQL"}, Values{"Windows","SQL"}] string SqlAuthType; - [Required, Description("Sql Server Name")] String SqlServer; - [Write, EmbeddedInstance("MSFT_Credential")] String SqlConnectionCredential; -}; - - - - diff --git a/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabaseLogin/MSFT_xDatabaseLoginWithDefaultDB.psm1 b/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabaseLogin/MSFT_xDatabaseLoginWithDefaultDB.psm1 deleted file mode 100644 index 2a8435a9..00000000 --- a/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabaseLogin/MSFT_xDatabaseLoginWithDefaultDB.psm1 +++ /dev/null @@ -1,210 +0,0 @@ -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' - CreateDatabaseLoginError=Failed to create SQL Login '{0}'. - TestDatabaseLoginError=Failed to test SQL Login '{0}'. - CreateDatabaseLoginSuccess=Success: SQL Login '{0}' either already existed or has been successfully created. - AlterDefaultDatabaseLoginSuccess=Successfully set the default database for '{0}' to '{1}'. - RemoveDatabaseLoginError=Failed to remove SQL Login '{0}'. - RemoveDatabaseLoginSuccess=Success: SQL Login '{0}' either does not existed or has been successfully removed. -'@ -} - -Import-Module $PSScriptRoot\..\xDatabase_Common - -function Get-TargetResource #Not yet working -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $LoginName, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SqlConnectionCredentials - ) - - $Connection = Construct-SqlConnection -credentials $SqlConnectionCredentials - - [string]$loginNameQuery = "SELECT * from sys.sql_logins where name='$LoginName'" - [string]$DBNameQuery = "Select default_database_name from sys.sql_logins where name='$LoginName'" - - $PresentValue = $false - - if((ReturnSqlQuery -sqlConnection $connection -SqlQuery $loginNameQuery)[0] -gt 0) - { - $PresentValue = $true - } - - - $returnValue = @{ - Ensure = $PresentValue - LoginName = $LoginName - DefaultDatabaseName = (ReturnSqlQuery -sqlConnection $connection -SqlQuery $DBNameQuery).default_database_name - } - - $returnValue - -} - -#TODO: handle absent case. example "DROP Login Toothy" - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $LoginName, - - [System.String] - $LoginPassword, - - [System.String] - $DefaultDatabaseName, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SqlConnectionCredentials - ) - - $Connection = Construct-SqlConnection -Credentials $SqlConnectionCredentials - - if($Ensure -eq "Present") - { - try - { - # Create login if it does not already exist. - [string]$SqlQuery = "if not exists(SELECT name FROM sys.sql_logins WHERE name='$LoginName') Begin create login $LoginName with password='$LoginPassword' END" - - $supressReturn = ExecuteSqlQuery -sqlConnection $connection -SqlQuery $SqlQuery - - Write-Verbose $($LocalizedData.CreateDatabaseLoginSuccess -f ${LoginName}) - - # Set the default database if it is not already set correctly. - - if($PSBoundParameters.ContainsKey("DefaultDatabaseName")) - { - [string]$SqlQuery = "if not exists(SELECT name FROM sys.sql_logins WHERE name='$LoginName' AND default_database_name='$DefaultDatabaseName') BEGIN ALTER LOGIN $LoginName with default_database=$DefaultDatabaseName End" - - $supressReturn = ExecuteSqlQuery -sqlConnection $connection -SqlQuery $SqlQuery - - Write-Verbose $($LocalizedData.AlterDefaultDatabaseLoginSuccess -f ${LoginName}, ${DefaultDatabaseName}) - } - - } - catch - { - $errorId = "CreateDatabaseLogin"; - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidResult - $errorMessage = $($LocalizedData.CreateDatabaseLoginError -f ${LoginName}) - $exception = New-Object System.InvalidOperationException $errorMessage - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord); - } - } - else # Ensure is absent so remove login. - { - try - { - # Create login if it does not already exist. - [string]$SqlQuery = "if exists(SELECT name FROM sys.sql_logins WHERE name='$LoginName') Begin DROP LOGIN $LoginName END" - - $supressReturn = ExecuteSqlQuery -sqlConnection $connection -SqlQuery $SqlQuery - - Write-Verbose $($LocalizedData.RemoveDatabaseLoginSuccess -f ${LoginName}) - } - catch - { - $errorId = "RemoveDatabaseLogin"; - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidResult - $errorMessage = $($LocalizedData.RemoveDatabaseLoginError -f ${LoginName}) - $exception = New-Object System.InvalidOperationException $errorMessage - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord); - } - } -} - - -function Test-TargetResource #Not yet working -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $LoginName, - - [System.String] - $LoginPassword, - - [System.String] - $DefaultDatabaseName, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SqlConnectionCredentials - ) - - try - { - $Connection = Construct-SqlConnection -Credentials $SqlConnectionCredentials - - [string]$SqlLoginQuery = "SELECT * from sys.sql_logins where name='$LoginName'" - if($PSBoundParameters.ContainsKey("DefaultDatabaseName")) - { - $SqlDBQuery = " AND default_database_name='$DefaultDatabaseName'" - } - - [string]$SqlQuery = "$SqlLoginQuery$SqlDBQuery" - - $LoginsReturnedByQuery = (ReturnSqlQuery -sqlConnection $connection -SqlQuery $SqlQuery)[0] - - if((($LoginsReturnedByQuery -gt 0) -and ($Ensure -eq "Present")) -or (($LoginsReturnedByQuery -eq 0) -and ($Ensure -eq "absent"))) - { - $result = $true - } - else - { - $result = $false - } - - return $result - - } - catch - { - $errorId = "TestDatabaseLogin"; - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidResult - $errorMessage = $($LocalizedData.TestDatabaseLoginError -f ${LoginName}) - $exception = New-Object System.InvalidOperationException $errorMessage - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord); - } - -} - - -Export-ModuleMember -Function *-TargetResource - - - - diff --git a/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabaseServer/MSFT_xDatabaseServer.psm1 b/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabaseServer/MSFT_xDatabaseServer.psm1 deleted file mode 100644 index 5a4db66e..00000000 --- a/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabaseServer/MSFT_xDatabaseServer.psm1 +++ /dev/null @@ -1,155 +0,0 @@ -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' - LoginModeSuccess=Successfully set loginMode to '{0}'. - LoginModeError=Failed to set loginMode to '{0}'. Ensure SQL Server is properly installed. - LoginModeTestError=Failed to find current loginMode. Ensure SQL Server is properly installed. - LoginModeTestTrue=The current LoginMode value '{0}' matches the desired loginMode value '{1}'. - LoginModeTestFalse=The current LoginMode value '{0}' does NOT match the desired loginMode value '{1}'. -'@ -} - -Import-Module $PSScriptRoot\..\xDatabase_Common - - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Windows","Mixed")] - [System.String] - $LoginMode - ) - - try - { - $RegPath = (dir 'HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\' -Recurse | where property -eq "LoginMode").PSPath - $ActualLoginModeValue = (Get-ItemProperty $RegPath -Name LoginMode).LoginMode - $ActualLoginMode = if($ActualLoginModeValue -eq 1){"Windows"}else{"Mixed"} - } - catch - { - $errorId = "LoginModeTest"; - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidResult - $errorMessage = $($LocalizedData.LoginModeTestError) - $exception = New-Object System.InvalidOperationException $errorMessage - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord); - } - - $returnValue = - @{ - LoginMode = $ActualLoginMode - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Windows","Mixed")] - [System.String] - $LoginMode - ) - - - if($PSBoundParameters.ContainsKey('LoginMode')) # Set SQL authentication to Mixed: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQLServer\LoginMode - { - try - { - $RegPath = (dir 'HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\' -Recurse | where property -eq "LoginMode").PSPath - - $LoginModeValue = if($LoginMode -eq "Windows"){1}else{2} - - set-itemproperty $RegPath LoginMode $LoginModeValue - - # restart SQL instance for above to take affect: - net stop MSSQLServer - net start MSSQLServer - - Write-Verbose $($LocalizedData.LoginModeSuccess -f $LoginMode) - } - catch - { - $errorId = "LoginMode"; - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidResult - $errorMessage = $($LocalizedData.LoginModeError) -f ${LoginMode} - $exception = New-Object System.InvalidOperationException $errorMessage - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord); - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Windows","Mixed")] - [System.String] - $LoginMode - ) - - $ReturnValue = $true - - if($PSBoundParameters.ContainsKey('LoginMode')) - { - $LoginModeValue = if($LoginMode -eq "Windows"){1}else{2} - - try - { - $RegPath = (dir 'HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\' -Recurse | where property -eq "LoginMode").PSPath - - $ActualLoginModeValue = (Get-ItemProperty $RegPath -Name LoginMode).LoginMode - - $ActualLoginMode = if($ActualLoginModeValue -eq 1){"Windows"}else{"Mixed"} - - } - catch - { - $errorId = "LoginModeTest"; - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidResult - $errorMessage = $($LocalizedData.LoginModeTestError) - $exception = New-Object System.InvalidOperationException $errorMessage - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord); - } - - if ($ActualLoginModeValue -ne $LoginModeValue) - { - $ReturnValue = $false - - Write-Verbose $($LocalizedData.LoginModeTestFalse -f $ActualLoginMode, $LoginMode) - } - else - { - Write-Verbose $($LocalizedData.LoginModeTestTrue -f $ActualLoginMode, $LoginMode) - } - } - - return $ReturnValue - -} - - -Export-ModuleMember -Function *-TargetResource - - - - diff --git a/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabaseServer/MSFT_xDatabaseServer.schema.mof b/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabaseServer/MSFT_xDatabaseServer.schema.mof deleted file mode 100644 index 387c5ed9..00000000 --- a/lib/puppet_x/dsc_resources/xDatabase/DSCResources/MSFT_xDatabaseServer/MSFT_xDatabaseServer.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xDatabaseServer")] -class MSFT_xDatabaseServer : OMI_BaseResource -{ - [Key, ValueMap{"Windows","Mixed"}, Values{"Windows","Mixed"}] String LoginMode; -}; - - - - diff --git a/lib/puppet_x/dsc_resources/xDatabase/DSCResources/xDatabase_Common/xDatabase_Common.psm1 b/lib/puppet_x/dsc_resources/xDatabase/DSCResources/xDatabase_Common/xDatabase_Common.psm1 deleted file mode 100644 index 86ad0cd2..00000000 --- a/lib/puppet_x/dsc_resources/xDatabase/DSCResources/xDatabase_Common/xDatabase_Common.psm1 +++ /dev/null @@ -1,282 +0,0 @@ -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' -DacFxInstallationError=Please ensure that DacFx is installed. -SmoFxInstallationError=Please ensure that Smo is installed. -'@ -} - -function CheckIfDbExists([string]$connectionString, [string]$databaseName) -{ - Write-Verbose("Inside CheckIfDbExists") - $connectionString = "$connectionString database=$databaseName;" - - $connection = New-Object system.Data.SqlClient.SqlConnection - - $connection.connectionstring = $connectionString - - Write-Verbose($connectionString) - - try - { - $connection.Open() - } - catch - { - Write-Verbose("Db does not exist") - return $false - } - - $connection.Close() - - return $true -} - -function DeployDac([string] $databaseName, [string]$connectionString, [string]$sqlserverVersion, - [string]$dacpacPath, [string]$dacpacApplicationName, [string]$dacpacApplicationVersion) -{ - $defaultDacPacApplicationVersion = "1.0.0.0" - - if($PSBoundParameters.ContainsKey('dacpacApplicationVersion')) - { - $defaultDacPacApplicationVersion = $defaultDacPacApplicationVersion - } - - try - { - Load-DacFx -sqlserverVersion $sqlserverVersion - } - catch - { - Throw "$LocalizedData.DacFxInstallationError" - } - - $dacServicesObject = new-object Microsoft.SqlServer.Dac.DacServices ($connectionString) - - $dacpacInstance = [Microsoft.SqlServer.Dac.DacPackage]::Load($dacpacPath) - - try - { - $dacServicesObject.Deploy($dacpacInstance, $databaseName,$true) - - $dacServicesObject.Register($databaseName, $dacpacApplicationName,$defaultDacPacApplicationVersion) - - Write-Verbose("Dac Deployed") - } - catch - { - $errorMessage = $_.Exception.Message - Write-Verbose('Dac Deploy Failed: ''{0}''' -f $errorMessage) - } -} - -function CreateDb([string] $databaseName, [string]$connectionString) -{ - $sqlConnection = new-object system.data.SqlClient.SQLConnection($connectionString); - - $query = "if not exists(SELECT name FROM sys.databases WHERE name='$databaseName') BEGIN create database $databaseName END" - - ExecuteSqlQuery -sqlConnection $sqlConnection -sqlQuery $query - - $sqlConnection.Close() -} - -function DeleteDb([string] $databaseName, [string]$connectionString, [string]$sqlServerVersion) -{ - <# - Load-SmoAssembly -sqlserverVersion $sqlServerVersion - - $smo = New-Object Microsoft.SqlServer.Management.Smo.Server $sqlConnection.DataSource - - $smo.KillAllProcesses($databaseName) - - $query = "drop database $databaseName" - #> - - $sqlConnection = new-object system.data.SqlClient.SQLConnection($connectionString); - - #Forcibly drop database - $Query = "If EXISTS(SELECT * FROM sys.databases WHERE name='$databaseName') - BEGIN - EXEC msdb.dbo.sp_delete_database_backuphistory @database_name = N'$databaseName' - ALTER DATABASE [$databaseName] SET SINGLE_USER WITH ROLLBACK IMMEDIATE - USE [master] - DROP DATABASE [$databaseName] - END" - - $result = ExecuteSqlQuery -sqlConnection $sqlConnection -sqlQuery $query - - $sqlConnection.Close() -} - -function ExecuteSqlQuery([system.data.SqlClient.SQLConnection]$sqlConnection, [string]$SqlQuery) -{ - $sqlCommand = new-object system.data.sqlclient.sqlcommand($SqlQuery, $sqlConnection); - - $sqlConnection.Open() - $queryResult = $sqlCommand.ExecuteNonQuery() - $sqlConnection.Close() - - if ($queryResult -ne -1) - { - return $true - } - - return $false -} - -function ReturnSqlQuery([system.data.SqlClient.SQLConnection]$sqlConnection, [string]$SqlQuery) -{ - $sqlCommand = new-object system.data.sqlclient.sqlcommand($SqlQuery, $sqlConnection) - $sqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter($sqlCommand) - $dataSet = New-Object System.Data.DataSet - $sqlAdapter.Fill($dataSet) - - return $dataSet.Tables -} - -function Construct-ConnectionString([string]$sqlServer, [System.Management.Automation.PSCredential]$credentials) -{ - - $server = "Server=$sqlServer;" - - if($PSBoundParameters.ContainsKey('credentials')) - { - $uid = $credentials.UserName - $pwd = $credentials.GetNetworkCredential().Password - $integratedSecurity = "Integrated Security=False;" - $userName = "uid=$uid;pwd=$pwd;" - } - else - { - $integratedSecurity = "Integrated Security=SSPI;" - } - - $connectionString = "$server$userName$integratedSecurity" - - return $connectionString -} - -function Perform-Restore([string]$DbName, [string]$connectionString, [string]$sqlserverVersion, [string]$bacpacFilePath) -{ - Load-DacFx -sqlserverVersion $sqlserverVersion - - $dacServiceInstance = new-object Microsoft.SqlServer.Dac.DacServices ($connectionString) - - $bacpacPackageInstance = [Microsoft.SqlServer.Dac.BacPackage]::Load($bacpacFilePath) - - try - { - $dacServiceInstance.ImportBacpac($bacpacPackageInstance, $DbName) - } - catch - { - Throw "Restore Failed Exception: $_" - } -} - -function Load-DacFx([string]$sqlserverVersion) -{ - $majorVersion = Get-SqlServerMajoreVersion -sqlServerVersion $sqlserverVersion - - $DacFxLocation = "${env:ProgramFiles(x86)}\Microsoft SQL Server\$majorVersion\DAC\bin\Microsoft.SqlServer.Dac.dll" - - try - { - [System.Reflection.Assembly]::LoadFrom($DacFxLocation) | Out-Null - } - catch - { - Throw "$LocalizedData.DacFxInstallationError" - } -} - -function Load-SmoAssembly([string]$sqlserverVersion) -{ - $majorVersion = Get-SqlServerMajoreVersion -sqlServerVersion $sqlserverVersion - - $SmoLocation = "${env:ProgramFiles(x86)}\Microsoft SQL Server\$majorVersion\SDK\Assemblies\Microsoft.SqlServer.Smo.dll" - try - { - [System.Reflection.Assembly]::LoadFrom($SmoLocation) | Out-Null - } - catch - { - Throw "$LocalizedData.SmoFxInstallationError" - } -} - -function Get-SqlServerMajoreVersion([string]$sqlServerVersion) -{ - switch($sqlserverVersion) - { - "2008-R2" - { - $majorVersion = 100 - } - "2012" - { - $majorVersion = 110 - } - "2014" - { - $majorVersion = 120 - } - } - - return $majorVersion -} - -function Get-SqlDatabaseOwner([string]$DatabaseName, [string]$connectionString) -{ - - [string]$SqlQuery = "SELECT SUSER_SNAME(owner_sid) [OwnerName] FROM sys.databases where name = '$DatabaseName'" - - $sqlConnection = new-object system.data.SqlClient.SQLConnection($connectionString) - - - return (ReturnSqlQuery -sqlConnection $sqlConnection -SqlQuery $SqlQuery).OwnerName - - -} - -function Extract-DacPacForDb([string]$connectionString, [string]$sqlServerVersion, [string]$databaseName, [string]$dacpacPath) -{ - Load-DacFx -sqlserverVersion $sqlServerVersion - - $dacService = new-object Microsoft.SqlServer.Dac.DacServices($connectionString) - - try - { - $dacService.Extract($dacpacPath, $databaseName, "MyApplication", "1.0.0.0") - } - catch - { - Write-Verbose -Message "Extracting DacPac failed" - } -} - -function Import-BacPacForDb([string]$connectionString, [string]$sqlServerVersion, [string]$databaseName, [string]$bacpacPath) -{ - Write-Verbose "Importing bacpac" - - Load-DacFx -sqlserverVersion $sqlServerVersion - - Write-Verbose $connectionString - - $dacServiceInstance = new-object Microsoft.SqlServer.Dac.DacServices ($connectionString) - - Write-Verbose $dacServiceInstance - - try - { - $dacServiceInstance.ExportBacpac($bacpacPath, $databaseName) - } - catch - { - Write-Verbose -Message "Importing BacPac failed" - } -} - - diff --git a/lib/puppet_x/dsc_resources/xDatabase/LICENSE b/lib/puppet_x/dsc_resources/xDatabase/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xDatabase/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xDatabase/xDatabase.psd1 b/lib/puppet_x/dsc_resources/xDatabase/xDatabase.psd1 deleted file mode 100644 index bd4909f1..00000000 --- a/lib/puppet_x/dsc_resources/xDatabase/xDatabase.psd1 +++ /dev/null @@ -1,68 +0,0 @@ -@{ - -# Script module or binary module file associated with this manifest. -# RootModule = '' - -# Version number of this module. -ModuleVersion = '1.6.0.0' - -# ID used to uniquely identify this module -GUID = '8ad956dd-4a36-4767-9725-ed0466893edb' - -# Author of this module -Author = 'Microsoft' - -# Company or vendor of this module -CompanyName = 'Microsoft' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'This module contains 2 resources. xDatabase allows to create and deploy databases using DAC or connection string, restore a database using BACPAC and delete a database. The xDBPackage resource allows extracting a database to a DACPAC or exporting to a BACPAC' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Variables to export from this module -VariablesToExport = '*' - -# Aliases to export from this module -AliasesToExport = '*' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xDatabase/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xDatabase' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* Moved internal functions to a common helper module - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - - - - diff --git a/lib/puppet_x/dsc_resources/xDefender/DSCResources/MSFT_xMpPreference/MSFT_xMpPreference.psm1 b/lib/puppet_x/dsc_resources/xDefender/DSCResources/MSFT_xMpPreference/MSFT_xMpPreference.psm1 deleted file mode 100644 index 20c642ac..00000000 --- a/lib/puppet_x/dsc_resources/xDefender/DSCResources/MSFT_xMpPreference/MSFT_xMpPreference.psm1 +++ /dev/null @@ -1,702 +0,0 @@ -<# - .SYNOPSIS Get state of the resource - .EXAMPLE - Get-TargetResource -Name DefenderPreferences -HighThreatDefaultAction Quarantine -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [System.String[]] - $ExclusionPath, - - [System.String[]] - $ExclusionExtension, - - [System.String[]] - $ExclusionProcess, - - [ValidateSet("Both","Incoming","Outgoing")] - [System.String] - $RealTimeScanDirection, - - [System.UInt32] - $QuarantinePurgeItemsAfterDelay, - - [ValidateSet("Everyday","Never","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday")] - [System.String] - $RemediationScheduleDay, - - [System.DateTime] - $RemediationScheduleTime, - - [System.UInt32] - $ReportingAdditionalActionTimeOut, - - [System.UInt32] - $ReportingNonCriticalTimeOut, - - [System.UInt32] - $ReportingCriticalFailureTimeOut, - - [System.UInt32] - $ScanAvgCPULoadFactor, - - [System.Boolean] - $CheckForSignaturesBeforeRunningScan, - - [System.UInt32] - $ScanPurgeItemsAfterDelay, - - [System.Boolean] - $ScanOnlyIfIdleEnabled, - - [ValidateSet("FullSCan","QuickScan")] - [System.String] - $ScanParameters, - - [ValidateSet("Everyday","Never","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday")] - [System.String] - $ScanScheduleDay, - - [System.DateTime] - $ScanScheduleQuickScanTime, - - [System.DateTime] - $ScanScheduleTime, - - [System.UInt32] - $SignatureFirstAuGracePeriod, - - [System.UInt32] - $SignatureAuGracePeriod, - - [System.String] - $SignatureDefinitionUpdateFileSharesSources, - - [System.Boolean] - $SignatureDisableUpdateOnStartupWithoutEngine, - - [System.String] - $SignatureFallbackOrder, - - [ValidateSet("Everyday","Never","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday")] - [System.String] - $SignatureScheduleDay, - - [System.DateTime] - $SignatureScheduleTime, - - [System.UInt32] - $SignatureUpdateCatchupInterval, - - [System.UInt32] - $SignatureUpdateInterval, - - [ValidateSet("Advanced","Basic","Disabled")] - [System.String] - $MAPSReporting, - - [System.Boolean] - $DisablePrivacyMode, - - [System.Boolean] - $RandomizeScheduleTaskTimes, - - [System.Boolean] - $DisableBehaviorMonitoring, - - [System.Boolean] - $DisableIntrusionPreventionSystem, - - [System.Boolean] - $DisableIOAVProtection, - - [System.Boolean] - $DisableRealtimeMonitoring, - - [System.Boolean] - $DisableScriptScanning, - - [System.Boolean] - $DisableArchiveScanning, - - [System.Boolean] - $DisableAutoExclusions, - - [System.Boolean] - $DisableCatchupFullScan, - - [System.Boolean] - $DisableCatchupQuickScan, - - [System.Boolean] - $DisableEmailScanning, - - [System.Boolean] - $DisableRemovableDriveScanning, - - [System.Boolean] - $DisableRestorePoint, - - [System.Boolean] - $DisableScanningMappedNetworkDrivesForFullScan, - - [System.Boolean] - $DisableScanningNetworkFiles, - - [System.Boolean] - $UILockdown, - - [System.UInt64] - $ThreatIDDefaultAction_Ids, - - [ValidateSet("Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined")] - [System.String] - $ThreatIDDefaultAction_Actions, - - [ValidateSet("Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined")] - [System.String] - $UnknownThreatDefaultAction, - - [ValidateSet("Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined")] - [System.String] - $LowThreatDefaultAction, - - [ValidateSet("Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined")] - [System.String] - $ModerateThreatDefaultAction, - - [ValidateSet("Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined")] - [System.String] - $HighThreatDefaultAction, - - [ValidateSet("Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined")] - [System.String] - $SevereThreatDefaultAction, - - [ValidateSet("Allways Prompt","Send safe samples automatically","Never send","Send all samples automatically")] - [System.String] - $SubmitSamplesConsent - ) - - $mpp = Get-MpPreference - $exclude = 'PSComputerName','ComputerID' - $MPPreference = $mpp | Get-Member -MemberType Property | ? {$_.Name -notin $exclude} | % Name - - foreach ($pref in $MPPreference) - { - $value = switch ($pref) { - 'RealTimeScanDirection' {Convert-ScanDirectionText $mpp.$pref} - {$_ -in 'RemediationScheduleDay','ScanScheduleDay','SignatureScheduleDay'} {Convert-ScheduleDayText $mpp.$pref} - 'ScanParameters' {Convert-ScanParametersText $mpp.$pref} - 'MAPSReporting' {Convert-ReportingText $mpp.$pref} - 'SubmitSamplesConsent' {Convert-SubmitSamplesConsentText $mpp.$pref} - {$_ -in 'ThreatIDDefaultAction_Actions','UnknownThreatDefaultAction','LowThreatDefaultAction','ModerateThreatDefaultAction','HighThreatDefaultAction','SevereThreatDefaultAction'} {Convert-ActionText $mpp.$pref} - Default {$mpp.$pref} - } - $return += @{$pref = $value} - } - $return += @{Name = $Name} - - $return -} - -<# - .SYNOPSIS Set state of the resource - .EXAMPLE - Set-TargetResource -Name DefenderPreferences -HighThreatDefaultAction Quarantine -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [System.String[]] - $ExclusionPath, - - [System.String[]] - $ExclusionExtension, - - [System.String[]] - $ExclusionProcess, - - [ValidateSet("Both","Incoming","Outgoing")] - [System.String] - $RealTimeScanDirection, - - [System.UInt32] - $QuarantinePurgeItemsAfterDelay, - - [ValidateSet("Everyday","Never","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday")] - [System.String] - $RemediationScheduleDay, - - [System.DateTime] - $RemediationScheduleTime, - - [System.UInt32] - $ReportingAdditionalActionTimeOut, - - [System.UInt32] - $ReportingNonCriticalTimeOut, - - [System.UInt32] - $ReportingCriticalFailureTimeOut, - - [System.UInt32] - $ScanAvgCPULoadFactor, - - [System.Boolean] - $CheckForSignaturesBeforeRunningScan, - - [System.UInt32] - $ScanPurgeItemsAfterDelay, - - [System.Boolean] - $ScanOnlyIfIdleEnabled, - - [ValidateSet("FullSCan","QuickScan")] - [System.String] - $ScanParameters, - - [ValidateSet("Everyday","Never","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday")] - [System.String] - $ScanScheduleDay, - - [System.DateTime] - $ScanScheduleQuickScanTime, - - [System.DateTime] - $ScanScheduleTime, - - [System.UInt32] - $SignatureFirstAuGracePeriod, - - [System.UInt32] - $SignatureAuGracePeriod, - - [System.String] - $SignatureDefinitionUpdateFileSharesSources, - - [System.Boolean] - $SignatureDisableUpdateOnStartupWithoutEngine, - - [System.String] - $SignatureFallbackOrder, - - [ValidateSet("Everyday","Never","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday")] - [System.String] - $SignatureScheduleDay, - - [System.DateTime] - $SignatureScheduleTime, - - [System.UInt32] - $SignatureUpdateCatchupInterval, - - [System.UInt32] - $SignatureUpdateInterval, - - [ValidateSet("Advanced","Basic","Disabled")] - [System.String] - $MAPSReporting, - - [System.Boolean] - $DisablePrivacyMode, - - [System.Boolean] - $RandomizeScheduleTaskTimes, - - [System.Boolean] - $DisableBehaviorMonitoring, - - [System.Boolean] - $DisableIntrusionPreventionSystem, - - [System.Boolean] - $DisableIOAVProtection, - - [System.Boolean] - $DisableRealtimeMonitoring, - - [System.Boolean] - $DisableScriptScanning, - - [System.Boolean] - $DisableArchiveScanning, - - [System.Boolean] - $DisableAutoExclusions, - - [System.Boolean] - $DisableCatchupFullScan, - - [System.Boolean] - $DisableCatchupQuickScan, - - [System.Boolean] - $DisableEmailScanning, - - [System.Boolean] - $DisableRemovableDriveScanning, - - [System.Boolean] - $DisableRestorePoint, - - [System.Boolean] - $DisableScanningMappedNetworkDrivesForFullScan, - - [System.Boolean] - $DisableScanningNetworkFiles, - - [System.Boolean] - $UILockdown, - - [System.UInt64] - $ThreatIDDefaultAction_Ids, - - [ValidateSet("Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined")] - [System.String] - $ThreatIDDefaultAction_Actions, - - [ValidateSet("Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined")] - [System.String] - $UnknownThreatDefaultAction, - - [ValidateSet("Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined")] - [System.String] - $LowThreatDefaultAction, - - [ValidateSet("Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined")] - [System.String] - $ModerateThreatDefaultAction, - - [ValidateSet("Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined")] - [System.String] - $HighThreatDefaultAction, - - [ValidateSet("Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined")] - [System.String] - $SevereThreatDefaultAction, - - [ValidateSet("Allways Prompt","Send safe samples automatically","Never send","Send all samples automatically")] - [System.String] - $SubmitSamplesConsent - ) - - $Params = $PSBoundParameters - $output = $Params.Remove('Name') - $output = $Params.Remove('Debug') - $output = $Params.Remove('Verbose') - - Set-MpPreference @Params -} - -<# - .SYNOPSIS Test state of the resource - .EXAMPLE - Test-TargetResource -Name DefenderPreferences -HighThreatDefaultAction Quarantine -Verbose -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [System.String[]] - $ExclusionPath, - - [System.String[]] - $ExclusionExtension, - - [System.String[]] - $ExclusionProcess, - - [ValidateSet("Both","Incoming","Outgoing")] - [System.String] - $RealTimeScanDirection, - - [System.UInt32] - $QuarantinePurgeItemsAfterDelay, - - [ValidateSet("Everyday","Never","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday")] - [System.String] - $RemediationScheduleDay, - - [System.DateTime] - $RemediationScheduleTime, - - [System.UInt32] - $ReportingAdditionalActionTimeOut, - - [System.UInt32] - $ReportingNonCriticalTimeOut, - - [System.UInt32] - $ReportingCriticalFailureTimeOut, - - [System.UInt32] - $ScanAvgCPULoadFactor, - - [System.Boolean] - $CheckForSignaturesBeforeRunningScan, - - [System.UInt32] - $ScanPurgeItemsAfterDelay, - - [System.Boolean] - $ScanOnlyIfIdleEnabled, - - [ValidateSet("FullSCan","QuickScan")] - [System.String] - $ScanParameters, - - [ValidateSet("Everyday","Never","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday")] - [System.String] - $ScanScheduleDay, - - [System.DateTime] - $ScanScheduleQuickScanTime, - - [System.DateTime] - $ScanScheduleTime, - - [System.UInt32] - $SignatureFirstAuGracePeriod, - - [System.UInt32] - $SignatureAuGracePeriod, - - [System.String] - $SignatureDefinitionUpdateFileSharesSources, - - [System.Boolean] - $SignatureDisableUpdateOnStartupWithoutEngine, - - [System.String] - $SignatureFallbackOrder, - - [ValidateSet("Everyday","Never","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday")] - [System.String] - $SignatureScheduleDay, - - [System.DateTime] - $SignatureScheduleTime, - - [System.UInt32] - $SignatureUpdateCatchupInterval, - - [System.UInt32] - $SignatureUpdateInterval, - - [ValidateSet("Advanced","Basic","Disabled")] - [System.String] - $MAPSReporting, - - [System.Boolean] - $DisablePrivacyMode, - - [System.Boolean] - $RandomizeScheduleTaskTimes, - - [System.Boolean] - $DisableBehaviorMonitoring, - - [System.Boolean] - $DisableIntrusionPreventionSystem, - - [System.Boolean] - $DisableIOAVProtection, - - [System.Boolean] - $DisableRealtimeMonitoring, - - [System.Boolean] - $DisableScriptScanning, - - [System.Boolean] - $DisableArchiveScanning, - - [System.Boolean] - $DisableAutoExclusions, - - [System.Boolean] - $DisableCatchupFullScan, - - [System.Boolean] - $DisableCatchupQuickScan, - - [System.Boolean] - $DisableEmailScanning, - - [System.Boolean] - $DisableRemovableDriveScanning, - - [System.Boolean] - $DisableRestorePoint, - - [System.Boolean] - $DisableScanningMappedNetworkDrivesForFullScan, - - [System.Boolean] - $DisableScanningNetworkFiles, - - [System.Boolean] - $UILockdown, - - [System.UInt64] - $ThreatIDDefaultAction_Ids, - - [ValidateSet("Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined")] - [System.String] - $ThreatIDDefaultAction_Actions, - - [ValidateSet("Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined")] - [System.String] - $UnknownThreatDefaultAction, - - [ValidateSet("Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined")] - [System.String] - $LowThreatDefaultAction, - - [ValidateSet("Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined")] - [System.String] - $ModerateThreatDefaultAction, - - [ValidateSet("Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined")] - [System.String] - $HighThreatDefaultAction, - - [ValidateSet("Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined")] - [System.String] - $SevereThreatDefaultAction, - - [ValidateSet("Allways Prompt","Send safe samples automatically","Never send","Send all samples automatically")] - [System.String] - $SubmitSamplesConsent - ) - $Params = $PSBoundParameters - $output = $Params.Remove('Debug') - $output = $Params.Remove('Verbose') - - $Get = Get-TargetResource @Params - $Keys = $Get.Keys | ? {$_ -in $Params.Keys} - - $return = $True - - foreach ($key in $Keys) { - - $input = $Params.$key - $current = $Get.$key - - if ($input -ne $current){ - $return = $False - Write-Verbose "$input not equal to $current for value $key" - } - - } - - $return -} - -Export-ModuleMember -Function *-TargetResource - - -# Helper Functions - -function Convert-ScanDirectionText { - param( - [parameter(ValueFromPipeline=$true,Mandatory=$true)][Byte]$Num - ) - switch ($Num) - { - 0 {'Both'} - 1 {'Incoming'} - 2 {'Outgoing'} - } -} - -function Convert-ScheduleDayText { - param( - [parameter(ValueFromPipeline=$true,Mandatory=$true)][Byte]$Num - ) - switch ($Num) - { - 0 {'Everyday'} - 1 {'Sunday'} - 2 {'Monday'} - 3 {'Tuesday'} - 4 {'Wednesday'} - 5 {'Thursday'} - 6 {'Friday'} - 7 {'Saturday'} - 8 {'Never'} - } -} - -function Convert-ScanParametersText { - param( - [parameter(ValueFromPipeline=$true,Mandatory=$true)][Byte]$Num - ) - switch ($Num) - { - 1 {'Quick scan'} - 2 {'Full scan'} - } -} - -function Convert-ReportingText { - param( - [parameter(ValueFromPipeline=$true,Mandatory=$true)][Byte]$Num - ) - switch ($Num) - { - 0 {'Disabled'} - 1 {'Basic'} - 2 {'Advanced'} - } -} - -function Convert-SubmitSamplesConsentText { - param( - [parameter(ValueFromPipeline=$true,Mandatory=$true)][Byte]$Num - ) - switch ($Num) - { - 0 {'Always prompt'} - 1 {'Send safe samples automatically'} - 2 {'Never send'} - 3 {'Send all samples automatically'} - } -} - -function Convert-ActionText { - param( - [parameter(ValueFromPipeline=$true,Mandatory=$true)][Byte]$Num - ) - switch ($Num) - { - 1 {'Clean'} - 2 {'Quarantine'} - 3 {'Remove'} - 4 {'Allow'} - 8 {'UserDefined'} - 9 {'NoAction'} - 10 {'Block'} - } -} diff --git a/lib/puppet_x/dsc_resources/xDefender/DSCResources/MSFT_xMpPreference/MSFT_xMpPreference.schema.mof b/lib/puppet_x/dsc_resources/xDefender/DSCResources/MSFT_xMpPreference/MSFT_xMpPreference.schema.mof deleted file mode 100644 index a439a1dd..00000000 --- a/lib/puppet_x/dsc_resources/xDefender/DSCResources/MSFT_xMpPreference/MSFT_xMpPreference.schema.mof +++ /dev/null @@ -1,60 +0,0 @@ - -[ClassVersion("0.1.0.0"), FriendlyName("xMpPreference")] -class MSFT_xMpPreference : OMI_BaseResource -{ - [Key, Description("Provide the text string to uniquely identify this group of settings")] String Name; - [Write, Description("Specifies an array of file paths to exclude from scheduled and real-time scanning. You can specify a folder to exclude all the files under the folder.")] String ExclusionPath[]; - [Write, Description("Specifies an array of file name extensions, such as obj or lib, to exclude from scheduled, custom, and real-time scanning.")] String ExclusionExtension[]; - [Write, Description("Specifies an array of processes, as paths to process images. The cmdlet excludes any files opened by the processes that you specify from scheduled and real-time scanning. Specifying this parameter excludes files opened by executable programs only. The cmdlet does not exclude the processes themselves. To exclude a process, specify it by using the ExclusionPath parameter.")] String ExclusionProcess[]; - [Write, Description("Specifies scanning configuration for incoming and outgoing files on NTFS volumes. Specify a value for this parameter to enhance performance on servers which have a large number of file transfers, but need scanning for either incoming or outgoing files. Evaluate this configuration based on the server role. For non-NTFS volumes, Windows Defender performs full monitoring of file and program activity."), ValueMap{"Both","Incoming","Outgoing"}, Values{"Both","Incoming","Outgoing"}] String RealTimeScanDirection; - [Write, Description("Specifies the number of days to keep items in the Quarantine folder. If you specify a value of zero or do not specify a value for this parameter, items stay in the Quarantine folder indefinitely.")] uint32 QuarantinePurgeItemsAfterDelay; - [Write, Description("Specifies the day of the week on which to perform a scheduled full scan in order to complete remediation. Alternatively, specify everyday for this full scan or never. The default value is Never. If you specify a value of Never or do not specify a value, Windows Defender performs a scheduled full scan to complete remediation by using a default frequency."), ValueMap{"Everyday","Never","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"}, Values{"Everyday","Never","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"}] String RemediationScheduleDay; - [Write, Description("Specifies the time of day, as the number of minutes after midnight, to perform a scheduled scan. The time refers to the local time on the computer. If you do not specify a value for this parameter, a scheduled scan runs at the default time of two hours after midnight.")] DateTime RemediationScheduleTime; - [Write, Description("Specifies the number of minutes before a detection in the additional action state changes to the cleared state.")] uint32 ReportingAdditionalActionTimeOut; - [Write, Description("Specifies the number of minutes before a detection in the non-critically failed state changes to the cleared state.")] uint32 ReportingNonCriticalTimeOut; - [Write, Description("Specifies the number of minutes before a detection in the critically failed state changes to either the additional action state or the cleared state.")] uint32 ReportingCriticalFailureTimeOut; - [Write, Description("Specifies the maxium percentage CPU usage for a scan. The acceptable values for this parameter are: integers from 5 through 100, and the value 0, which disables CPU throttling. Windows Defender does not exceed the percentage of CPU usage that you specify. The default value is 50.")] uint32 ScanAvgCPULoadFactor; - [Write, Description("Indicates whether to check for new virus and spyware definitions before Windows Defender runs a scan. If you specify a value of $True, Windows Defender checks for new definitions. If you specify $False or do not specify a value, the scan begins with existing definitions. This value applies to scheduled scans and to scans that you start from the command line, but it does not affect scans that you start from the user interface.")] boolean CheckForSignaturesBeforeRunningScan; - [Write, Description("Specifies the number of days to keep items in the scan history folder. After this time, Windows Defender removes the items. If you specify a value of zero, Windows Defender does not remove items. If you do not specify a value, Windows Defender removes items from the scan history folder after the default length of time, which is 30 days.")] uint32 ScanPurgeItemsAfterDelay; - [Write, Description("Indicates whether to start scheduled scans only when the computer is not in use. If you specify a value of $True or do not specify a value, Windows Defender runs schedules scans when the computer is on, but not in use.")] boolean ScanOnlyIfIdleEnabled; - [Write, Description("Specifies the scan type to use during a scheduled scan. If you do not specify this parameter, Windows Defender uses the default value of quick scan."), ValueMap{"FullSCan","QuickScan"}, Values{"FullSCan","QuickScan"}] String ScanParameters; - [Write, Description("Specifies the day of the week on which to perform a scheduled scan. Alternatively, specify everyday for a scheduled scan or never. If you specify a value of Never or do not specify a value, Windows Defender performs a scheduled scan by using a default frequency."), ValueMap{"Everyday","Never","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"}, Values{"Everyday","Never","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"}] String ScanScheduleDay; - [Write, Description("Specifies the time of day, as the number of minutes after midnight, to perform a scheduled quick scan. The time refers to the local time on the computer. If you do not specify a value for this parameter, a scheduled quick scan runs at the time specified by the ScanScheduleTime parameter. That parameter has a default time of two hours after midnight.")] DateTime ScanScheduleQuickScanTime; - [Write, Description("Specifies the time of day, as the number of minutes after midnight, to perform a scheduled scan. The time refers to the local time on the computer. If you do not specify a value for this parameter, a scheduled scan runs at a default time of two hours after midnight.")] DateTime ScanScheduleTime; - [Write, Description("Specifies a grace period, in minutes, for the definition. If a definition successfully updates within this period, Windows Defender abandons any service initiated updates. This parameter overrides the value of the CheckForSignaturesBeforeRunningScan parameter.")] uint32 SignatureFirstAuGracePeriod; - [Write, Description("Specifies a grace period, in minutes, for the definition. If a definition successfully updates within this period, Windows Defender abandons any service initiated updates.")] uint32 SignatureAuGracePeriod; - [Write, Description("Specifies file-share sources for definition updates. Specify sources as a bracketed sequence of Universal Naming Convention (UNC) locations, separated by the pipeline symbol. If you specify a value for this parameter, Windows Defender attempts to connect to the shares in the order that you specify. After Windows Defender updates a definition, it stops attempting to connect to shares on the list. If you do not specify a value for this parameter, the list is empty.")] String SignatureDefinitionUpdateFileSharesSources; - [Write, Description("Indicates whether to initiate definition updates even if no antimalware engine is present. If you specify a value of $True or do not specify a value, Windows Defender initiates definition updates on startup. If you specify a value of $False, and if no antimalware engine is present, Windows Defender does not initiate definition updates on startup.")] boolean SignatureDisableUpdateOnStartupWithoutEngine; - [Write, Description("Specifies the order in which to contact different definition update sources. Specify the types of update sources in the order in which you want Windows Defender to contact them, enclosed in braces and separated by the pipeline symbol.")] String SignatureFallbackOrder; - [Write, Description("Specifies the day of the week on which to check for definition updates. Alternatively, specify everyday for a scheduled scan or never. If you specify a value of Never or do not specify a value, Windows Defender checks for definition updates by using a default frequency."), ValueMap{"Everyday","Never","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"}, Values{"Everyday","Never","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"}] String SignatureScheduleDay; - [Write, Description("Specifies the time of day, as the number of minutes after midnight, to check for definition updates. The time refers to the local time on the computer. If you do not specify a value for this parameter, Windows Defender checks for definition updates at the default time of 15 minutes before the scheduled scan time.")] DateTime SignatureScheduleTime; - [Write, Description("Specifies the number of days after which Windows Defender requires a catch-up definition update. If you do not specify a value for this parameter, Windows Defender requires a catch-up definition update after the default value of one day.")] uint32 SignatureUpdateCatchupInterval; - [Write, Description("Specifies the interval, in hours, at which to check for definition updates. The acceptable values for this parameter are: integers from 1 through 24. If you do not specify a value for this parameter, Windows Defender checks at the default interval. You can use this parameter instead of the SignatureScheduleDay parameter and SignatureScheduleTime parameter. ")] uint32 SignatureUpdateInterval; - [Write, Description("Specifies the type of membership in Microsoft Active Protection Service. Microsoft Active Protection Service is an online community that helps you choose how to respond to potential threats. The community also helps prevent the spread of new malicious software. If you join this community, you can choose to automatically send basic or additional information about detected software. Additional information helps Microsoft create new definitions. In some instances, personal information might unintentionally be sent to Microsoft. However, Microsoft will not use this information to identify you or contact you."), ValueMap{"Advanced","Basic","Disabled"}, Values{"Advanced","Basic","Disabled"}] String MAPSReporting; - [Write, Description("Indicates whether to disable privacy mode. Privacy mode prevents users, other than administrators, from displaying threat history.")] boolean DisablePrivacyMode; - [Write, Description("Indicates whether to select a random time for the scheduled start and scheduled update for definitions. If you specify a value of $True or do not specify a value, scheduled tasks begin within 30 minutes, before or after, the scheduled time. If you randomize the start times, it can distribute the impact of scanning. For example, if several virtual machines share the same host, randomized start times prevents all the hosts from starting the scheduled tasks at the same time.")] boolean RandomizeScheduleTaskTimes; - [Write, Description("Indicates whether to enable behavior monitoring. If you specify a value of $True or do not specify a value, Windows Defender enables behavior monitoring")] boolean DisableBehaviorMonitoring; - [Write, Description("Indicates whether to configure network protection against exploitation of known vulnerabilities. If you specify a value of $True or do not specify a value, network protection is enabled")] boolean DisableIntrusionPreventionSystem; - [Write, Description("Indicates whether Windows Defender scans all downloaded files and attachments. If you specify a value of $True or do not specify a value, scanning downloaded files and attachments is enabled. ")] boolean DisableIOAVProtection; - [Write, Description("Indicates whether to use real-time protection. If you specify a value of $True or do not specify a value, Windows Defender uses real-time protection. We recommend that you enable Windows Defender to use real-time protection.")] boolean DisableRealtimeMonitoring; - [Write, Description("Specifies whether to disable the scanning of scripts during malware scans.")] boolean DisableScriptScanning; - [Write, Description("Indicates whether to scan archive files, such as .zip and .cab files, for malicious and unwanted software. If you specify a value of $True or do not specify a value, Windows Defender scans archive files.")] boolean DisableArchiveScanning; - [Write, Description("Indicates whether to disable the Automatic Exclusions feature for the server.")] boolean DisableAutoExclusions; - [Write, Description("Indicates whether Windows Defender runs catch-up scans for scheduled full scans. A computer can miss a scheduled scan, usually because the computer is turned off at the scheduled time. If you specify a value of $True, after the computer misses two scheduled full scans, Windows Defender runs a catch-up scan the next time someone logs on to the computer. If you specify a value of $False or do not specify a value, the computer does not run catch-up scans for scheduled full scans.")] boolean DisableCatchupFullScan; - [Write, Description("Indicates whether Windows Defender runs catch-up scans for scheduled quick scans. A computer can miss a scheduled scan, usually because the computer is off at the scheduled time. If you specify a value of $True, after the computer misses two scheduled quick scans, Windows Defender runs a catch-up scan the next time someone logs onto the computer. If you specify a value of $False or do not specify a value, the computer does not run catch-up scans for scheduled quick scans. ")] boolean DisableCatchupQuickScan; - [Write, Description("Indicates whether Windows Defender parses the mailbox and mail files, according to their specific format, in order to analyze mail bodies and attachments. Windows Defender supports several formats, including .pst, .dbx, .mbx, .mime, and .binhex. If you specify a value of $True, Windows Defender performs email scanning. If you specify a value of $False or do not specify a value, Windows Defender does not perform email scanning. ")] boolean DisableEmailScanning; - [Write, Description("Indicates whether to scan for malicious and unwanted software in removable drives, such as flash drives, during a full scan. If you specify a value of $True, Windows Defender scans removable drives during any type of scan. If you specify a value of $False or do not specify a value, Windows Defender does not scan removable drives during a full scan. Windows Defender can still scan removable drives during quick scans or custom scans.")] boolean DisableRemovableDriveScanning; - [Write, Description("Indicates whether to disable scanning of restore points.")] boolean DisableRestorePoint; - [Write, Description("Indicates whether to scan mapped network drives. If you specify a value of $True, Windows Defender scans mapped network drives. If you specify a value of $False or do not specify a value, Windows Defender does not scan mapped network drives.")] boolean DisableScanningMappedNetworkDrivesForFullScan; - [Write, Description("Indicates whether to scan for network files. If you specify a value of $True, Windows Defender scans network files. If you specify a value of $False or do not specify a value, Windows Defender does not scan network files. We do not recommend that you scan network files.")] boolean DisableScanningNetworkFiles; - [Write, Description("Indicates whether to disable UI lockdown mode. If you specify a value of $True, Windows Defender disables UI lockdown mode. If you specify $False or do not specify a value, UI lockdown mode is enabled.")] boolean UILockdown; - [Write, Description("Specifies an array of the actions to take for the IDs specified by using the ThreatIDDefaultAction_Ids parameter.")] uint64 ThreatIDDefaultAction_Ids; - [Write, Description("Specifies which automatic remediation action to take for an unknonwn level threat."), ValueMap{"Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined"}, Values{"Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined"}] String ThreatIDDefaultAction_Actions; - [Write, Description("Specifies which automatic remediation action to take for a low level threat."), ValueMap{"Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined"}, Values{"Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined"}] String UnknownThreatDefaultAction; - [Write, Description("Specifies which automatic remediation action to take for a low level threat."), ValueMap{"Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined"}, Values{"Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined"}] String LowThreatDefaultAction; - [Write, Description("Specifies which automatic remediation action to take for a moderate level threat."), ValueMap{"Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined"}, Values{"Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined"}] String ModerateThreatDefaultAction; - [Write, Description("Specifies which automatic remediation action to take for a high level threat."), ValueMap{"Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined"}, Values{"Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined"}] String HighThreatDefaultAction; - [Write, Description("Specifies which automatic remediation action to take for a severe level threat."), ValueMap{"Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined"}, Values{"Allow","Block","Clean","NoAction","Quarantine","Remove","UserDefined"}] String SevereThreatDefaultAction; - [Write, Description("Specifies how Windows Defender checks for user consent for certain samples. If consent has previously been granted, Windows Defender submits the samples. Otherwise, if the MAPSReporting parameter does not have a value of Disabled, Windows Defender prompts the user for consent."), ValueMap{"Allways Prompt","Send safe samples automatically","Never send","Send all samples automatically"}, Values{"Allways Prompt","Send safe samples automatically","Never send","Send all samples automatically"}] String SubmitSamplesConsent; -}; - diff --git a/lib/puppet_x/dsc_resources/xDefender/LICENSE b/lib/puppet_x/dsc_resources/xDefender/LICENSE deleted file mode 100644 index 906b0f7ec6c1cab9307b658c87749eedb4d91f8b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2210 zcmai#OHUg?5QO_2DgR;R6G(_Wq+D_{2Fxmc$qxuejJ@EI$)xG0aqD08r zotf_H>Z;!1*UzCn+SD>@TW&+1Et}arJI}WA{iEvS*xuS3|23?%h5fK4kq>0A$vPtE znCC}(Zy)TF;|b@{?m(HdZW2Fr-023X$9ic`;H>zYf%{CPR++O>#+XVOb(SDKQ)_Ay zJ7K4&@G`Or)=_Io}Q^%{DoIqRTWB5*PP8j)bGI~g%O>p(?DIrBlsw{AnTPp z@e1sTKgGTzd&XHX%wVaV7rK*{s(<<3yhN%huL#Zse?oPwn$0)n4i#Kf12cBbo>hEk`Djni@K421^kzAjZQVw2}N@w=B4)^eSU+r zTuU*DcR`f;E8XvyWA!NwT+~!(3gQOPS0>B_9G5#?{?FCZ9Tl$Z0)&Be z?UGyX#_HDhot(YQdaSy3&5d}@?m0U(B6Onjnmcpj_vICFBfmETqfcCi^)0c&&U~%a z7vei$X|^uxtJk;yO{iV!sr#I}w#N;edsRg$r@_vMOuaYRJF6;o$cr0WdAhxW>yZ77 zRrI*eOUO}C+}f=A;9pg&>tN?zUmct{r%Olfc%CvZovr$kPSR~iL<3GOUuk#5ZjZPD zS)qV56yFZ99WeU-Y;rCRQtXrnokg59x~@*-lNh%6OMOYLy6YeZ`WqE9m~^Rq>lK>h zNg>6w+{=hO16lv+axl(#YPIdFgK*qgBj{_)8B>l1?=Ra#T9Ur0mw!6iQ`9$qTL0oJi%a^Oss_PNRzO5|^kb phj-be`A&-e?Q02?G-)Ge@+Zg4m6w0PO!|e>ktueEU*h&#{SDhITFw9f diff --git a/lib/puppet_x/dsc_resources/xDefender/xDefender.psd1 b/lib/puppet_x/dsc_resources/xDefender/xDefender.psd1 deleted file mode 100644 index d62ffe2d..00000000 --- a/lib/puppet_x/dsc_resources/xDefender/xDefender.psd1 +++ /dev/null @@ -1,120 +0,0 @@ -# -# Module manifest for module 'xDefender' -# -# Generated by: PowerShell DSC -# -# Generated on: 6/18/2015 -# - -@{ - -# Script module or binary module file associated with this manifest. -# RootModule = '' - -# Version number of this module. -ModuleVersion = '0.2.0.0' - -# ID used to uniquely identify this module -GUID = '9d8abe0d-ef91-44ca-98e3-0580c595fd6d' - -# Author of this module -Author = 'PowerShell DSC' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '2015' - -# Description of the functionality provided by this module -Description = 'The xDefender allows you to configure Windows Defender preferences.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Name of the Windows PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the Windows PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module -# DotNetFrameworkVersion = '' - -# Minimum version of the common language runtime (CLR) required by this module -# CLRVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -# RequiredModules = @() - -# Assemblies that must be loaded prior to importing this module -# RequiredAssemblies = @() - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -# FormatsToProcess = @() - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -# NestedModules = @() - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Variables to export from this module -VariablesToExport = '*' - -# Aliases to export from this module -AliasesToExport = '*' - -# DSC resources to export from this module -# DscResourcesToExport = @() - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - # Tags = @() - - # A URL to the license for this module. - # LicenseUri = '' - - # A URL to the main website for this project. - # ProjectUri = '' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - # ReleaseNotes = '' - - } # End of PSData hashtable - -} # End of PrivateData hashtable - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - -} - diff --git a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/Helper.psm1 b/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/Helper.psm1 deleted file mode 100644 index 826afac1..00000000 --- a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/Helper.psm1 +++ /dev/null @@ -1,141 +0,0 @@ -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' -RoleNotFound = Please ensure that the PowerShell module for role {0} is installed -InvalidIPAddressFormat = Value of {0} property is not in a valid IP address format. Specify a valid IP address format and try again. -InvalidIPAddressFamily = The IP address {0} is not a valid {1} address. Specify a valid IP addess in {1} format and try again. -InvalidTimeSpanFormat = Value of {0} property is not in a valid timespan format. Specify the timespan in days.hrs:mins:secs format and try again. -'@ -} - -# Internal function to throw terminating error with specified errroCategory, errorId and errorMessage -function New-TerminatingError -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory)] - [String]$errorId, - - [Parameter(Mandatory)] - [String]$errorMessage, - - [Parameter(Mandatory)] - [System.Management.Automation.ErrorCategory]$errorCategory - ) - - $exception = New-Object System.InvalidOperationException $errorMessage - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - throw $errorRecord -} - -# Internal function to translate a string to valid IPAddress format -function Get-ValidIPAddress -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory)] - [string]$ipString, - - [Parameter(Mandatory)] - [ValidateSet('IPv4')] - [String]$AddressFamily, - - [Parameter(Mandatory)] - [string]$parameterName - ) - - $ipAddressFamily = '' - if($AddressFamily -eq 'IPv4') - { - $ipAddressFamily = 'InterNetwork' - } - else - { - $ipAddressFamily = 'InterNetworkV6' - } - - [System.Net.IPAddress]$ipAddress = $null - $result = [System.Net.IPAddress]::TryParse($ipString, [ref]$ipAddress) - if(-not $result) - { - $errorMsg = $($LocalizedData.InvalidIPAddressFormat) -f $parameterName - New-TerminatingError -errorId 'NotValidIPAddress' -errorMessage $errorMsg -errorCategory InvalidType - } - - if($ipAddress.AddressFamily -ne $ipAddressFamily) - { - $errorMsg = $($LocalizedData.InvalidIPAddressFamily) -f $ipAddress,$AddressFamily - New-TerminatingError -errorId 'InvalidIPAddressFamily' -errorMessage $errorMsg -errorCategory SyntaxError - } - - $ipAddress -} - -# Internal function to assert if the role specific module is installed or not -function Assert-Module -{ - [CmdletBinding()] - param - ( - [string]$moduleName = 'DHCPServer' - ) - - if(! (Get-Module -Name $moduleName -ListAvailable)) - { - $errorMsg = $($LocalizedData.RoleNotFound) -f $moduleName - New-TerminatingError -errorId 'ModuleNotFound' -errorMessage $errorMsg -errorCategory ObjectNotFound - } -} - -# Internal function to write verbose messages for collection of properties -function Write-PropertyMessage -{ - param - ( - [Parameter(Mandatory)] - [Hashtable]$Parameters, - - [Parameter(Mandatory)] - [String[]]$KeysToSkip, - - [Parameter(Mandatory)] - [String]$MessageTemplate - ) - - foreach($key in $parameters.keys) - { - if($keysToSkip -notcontains $key) - { - $msg = $MessageTemplate -f $key,$parameters[$key] - Write-Verbose -Message $msg - } - } -} - -# Internal function to translate a string to valid IPAddress format -function Get-ValidTimeSpan -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory)] - [string]$tsString, - - [Parameter(Mandatory)] - [string]$parameterName - ) - - [System.TimeSpan]$timeSpan = New-TimeSpan - $result = [System.TimeSpan]::TryParse($tsString, [ref]$timeSpan) - if(-not $result) - { - $errorMsg = $($LocalizedData.InvalidTimeSpanFormat) -f $parameterName - New-TerminatingError -errorId 'NotValidTimeSpan' -errorMessage $errorMsg -errorCategory InvalidType - } - - $timeSpan -} diff --git a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerAuthorization/MSFT_xDhcpServerAuthorization.psm1 b/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerAuthorization/MSFT_xDhcpServerAuthorization.psm1 deleted file mode 100644 index 71be251b..00000000 --- a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerAuthorization/MSFT_xDhcpServerAuthorization.psm1 +++ /dev/null @@ -1,171 +0,0 @@ -Import-Module $PSScriptRoot\..\Helper.psm1 -Verbose:$false - -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' -ResolvingIPv4Address = Resolving first local IPv4 IP address ... -ResolvingHostname = Resolving local hostname ... -AuthorizingServer = Authorizing DHCP Server '{0}' with IP address '{1}' -UnauthorizingServer = Unauthorizing DHCP Server '{0}' with IP address '{1}' -ServerIsAuthorized = DHCP Server '{0}' with IP address '{1}' IS authorized -ServerNotAuthorized = DHCP Server '{0}' with IP address '{1}' is NOT authorized -IncorrectPropertyValue = Property '{0}' is incorrect. Expected '{1}', actual '{2}' -ResourceInDesiredState = DHCP Server '{0}' is in the desired state -ResourceNotInDesiredState = DHCP Server '{0}' is NOT in the desired state -'@ -} - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory)] - [ValidateSet('Present','Absent')] - [System.String] $Ensure, - - [ValidateNotNullOrEmpty()] - [System.String] $DnsName = ( Get-Hostname ), - - [ValidateNotNullOrEmpty()] - [System.String] $IPAddress = ( Get-IPv4Address | Select-Object -First 1 ) - ) - Assert-Module -ModuleName 'DHCPServer'; - $IPAddress = Get-ValidIPAddress -IPString $IPAddress -AddressFamily 'IPv4' -ParameterName 'IPAddress' - $dhcpServer = Get-DhcpServerInDC | Where-Object { ($_.DnsName -eq $DnsName) -and ($_.IPAddress -eq $IPAddress) } - $targetResource = @{ - DnsName = $dhcpServer.DnsName - IPAddress = $dhcpServer.IPAddress - } - if ($dhcpServer) - { - Write-Verbose ($LocalizedData.ServerIsAuthorized -f $DnsName, $IPAddress) - $targetResource['Ensure'] = 'Present' - } - else - { - Write-Verbose ($LocalizedData.ServerNotAuthorized -f $DnsName, $IPAddress) - $targetResource['Ensure'] = 'Absent' - } - return $targetResource -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory)] - [ValidateSet('Present','Absent')] - [System.String] $Ensure, - - [ValidateNotNullOrEmpty()] - [System.String] $DnsName = ( Get-Hostname ), - - [ValidateNotNullOrEmpty()] - [System.String] $IPAddress = ( Get-IPv4Address | Select-Object -First 1 ) - ) - Assert-Module -ModuleName 'DHCPServer' - $IPAddress = Get-ValidIPAddress -IPString $IPAddress -AddressFamily 'IPv4' -ParameterName 'IPAddress' - if ($Ensure -eq 'Present') - { - Write-Verbose ($LocalizedData.AuthorizingServer -f $DnsName, $IPAddress) - Add-DhcpServerInDc -DnsName $DnsName -IPAddress $IPAddress - } - elseif ($Ensure -eq 'Absent') - { - Write-Verbose ($LocalizedData.UnauthorizingServer -f $DnsName, $IPAddress) - Get-DhcpServerInDC | Where-Object { ($_.DnsName -eq $DnsName) -and ($_.IPAddress -eq $IPAddress) } | Remove-DhcpServerInDc - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory)] - [ValidateSet('Present','Absent')] - [System.String] $Ensure, - - [ValidateNotNullOrEmpty()] - [System.String] $DnsName = ( Get-Hostname ), - - [ValidateNotNullOrEmpty()] - [System.String] $IPAddress = ( Get-IPv4Address | Select-Object -First 1 ) - ) - $targetResource = Get-TargetResource @PSBoundParameters - $isCompliant = $true - - if ($targetResource.Ensure -ne $Ensure) - { - Write-Verbose ($LocalizedData.IncorrectPropertyValue -f 'Ensure', $Ensure, $targetResource.Ensure) - $isCompliant = $false - - } - elseif ($Ensure -eq 'Present') - { - if ($targetResource.DnsName -ne $DnsName) - { - Write-Verbose ($LocalizedData.IncorrectPropertyValue -f 'DnsName', $DnsName, $targetResource.DnsName) - $isCompliant = $false - } - if ($targetResource.IPAddress -ne $IPAddress) - { - Write-Verbose ($LocalizedData.IncorrectPropertyValue -f 'IPAddress', $IPAddress, $targetResource.IPAddress) - $isCompliant = $false - } - } - - if ($isCompliant) - { - Write-Verbose ($LocalizedData.ResourceInDesiredState -f $DnsName) - } - else { - Write-Verbose ($LocalizedData.ResourceNotInDesiredState -f $DnsName) - } - return $isCompliant -} - -## Internal function used to return all IPv4 addresses -function Get-IPv4Address -{ - [CmdletBinding()] - [OutputType([System.String])] - param ( ) - process - { - Write-Verbose $LocalizedData.ResolvingIPv4Address - Get-WmiObject Win32_NetworkAdapterConfiguration -Namespace 'root\CIMV2' | - Where-Object IPEnabled -eq 'True' | - ForEach-Object { - Write-Output ($_.IPAddress -notmatch ':') - } - } #end process -} #end function Get-IPv4Address - -## Internal function used to resolve the local hostname -function Get-Hostname { - [CmdletBinding()] - [OutputType([System.String])] - param ( ) - process - { - Write-Verbose $LocalizedData.ResolvingHostname; - $globalIpProperties = [System.Net.NetworkInformation.IPGlobalProperties]::GetIPGlobalProperties(); - if ($globalIpProperties.DomainName) - { - return '{0}.{1}' -f $globalIpProperties.HostName, $globalIpProperties.DomainName - } - else - { - return $globalIpProperties.HostName - } - } #end process -} #end function Get-Hostname - -Export-ModuleMember -Function *-TargetResource; diff --git a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerAuthorization/MSFT_xDhcpServerAuthorization.schema.mof b/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerAuthorization/MSFT_xDhcpServerAuthorization.schema.mof deleted file mode 100644 index 61b7b64d..00000000 --- a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerAuthorization/MSFT_xDhcpServerAuthorization.schema.mof +++ /dev/null @@ -1,7 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xDhcpServerAuthorization")] -class MSFT_xDhcpServerAuthorization : OMI_BaseResource -{ - [Write, Description("DHCP Server FQDN")] String DnsName; - [Write, Description("DHCP Server IP Address")] String IPAddress; - [Key, Description("Whether the DHCP server should be authorised within Active Directory"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; diff --git a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerClass/MSFT_xDhcpServerClass.psm1 b/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerClass/MSFT_xDhcpServerClass.psm1 deleted file mode 100644 index dfcc9667..00000000 --- a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerClass/MSFT_xDhcpServerClass.psm1 +++ /dev/null @@ -1,187 +0,0 @@ -Import-Module $PSScriptRoot\..\Helper.psm1 -Verbose:$false - -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' - SettingClassIDMessage = Setting DHCP Server Class {0} - AddingClassIDMessage = Adding DHCP Server Class {0} - RemovingClassIDMessage = Removing DHCP Server Class {0} -'@ -} - -function Get-TargetResource -{ - param - ( - [Parameter(Mandatory)][ValidateSet('Present','Absent')] - [System.String] $Ensure, - - [parameter(Mandatory)] [ValidateNotNullOrEmpty()] - [String]$Name, - - [parameter(Mandatory)][ValidateSet('Vendor','User')] - [String]$Type, - - [parameter(Mandatory)][ValidateNotNullOrEmpty()] - [string] $AsciiData, - - [AllowEmptyString()] - [string]$Description = '', - - [parameter(Mandatory)][ValidateSet('IPv4')] - [String]$AddressFamily - ) - -#region Input Validation - - # Check for DhcpServer module/role - Assert-Module -moduleName DHCPServer - -#endregion Input Validation - - $DhcpServerClass = Get-DhcpServerv4Class -Name $Name -ErrorAction SilentlyContinue - - if ($DhcpServerClass) - { - $HashTable = @{ - 'Name'=$DhcpServerClass.Name - 'Type'=$DhcpServerClass.Type - 'AsciiData' = $DhcpServerClass.AsciiData - 'Description' = $DhcpServerClass.Description - 'AddressFamily' = 'IPv4' - } - } - else - { - $HashTable = @{ - 'Name' = '' - 'Type' = '' - 'AsciiData' = '' - 'Description' = '' - 'AddressFamily' = '' - } - } - $HashTable -} - -function Set-TargetResource -{ - param - ( - [Parameter(Mandatory)][ValidateSet('Present','Absent')] - [System.String] $Ensure, - - [parameter(Mandatory)] [ValidateNotNullOrEmpty()] - [String]$Name, - - [parameter(Mandatory)][ValidateSet('Vendor','User')] - [String]$Type, - - [parameter(Mandatory)][ValidateNotNullOrEmpty()] - [string] $AsciiData, - - [AllowEmptyString()] - [string]$Description = '', - - [parameter(Mandatory)][ValidateSet('IPv4')] - [String]$AddressFamily - ) - - $DhcpServerClass = Get-DhcpServerv4Class $Name -ErrorAction SilentlyContinue - - #testing for ensure = present - if ($Ensure -eq 'Present') - { - #testing if class exists - if ($DhcpServerClass) - { - #if it exists we use the set verb - $scopeIDMessage = $($LocalizedData.SettingClassIDMessage) -f $Name - Write-Verbose -Message $scopeIDMessage - set-DhcpServerv4Class -Name $Name -Type $Type -Data $AsciiData -Description $Description - } - - #class not exists - else - { - $scopeIDMessage = $($LocalizedData.AddingClassIDMessage) -f $Name - Write-Verbose -Message $scopeIDMessage - Add-DhcpServerv4Class -Name $Name -Type $Type -Data $AsciiData -Description $Description - } - } - - #ensure = absent - else - { - $scopeIDMessage = $($LocalizedData.RemovingClassIDMessage) -f $Name - Write-Verbose -Message $scopeIDMessage - Remove-DhcpServerv4Class -Name $Name -Type $Type - } -} -function Test-TargetResource -{ - param - ( - [Parameter(Mandatory)][ValidateSet('Present','Absent')] - [System.String] $Ensure, - - [parameter(Mandatory)] [ValidateNotNullOrEmpty()] - [String]$Name, - - [parameter(Mandatory)][ValidateSet('Vendor','User')] - [String]$Type, - - [parameter(Mandatory)][ValidateNotNullOrEmpty()] - [string] $AsciiData, - - [AllowEmptyString()] - [string]$Description = '', - - [parameter(Mandatory)][ValidateSet('IPv4')] - [String]$AddressFamily - ) - - $DhcpServerClass = Get-DhcpServerv4Class -Name $Name -ErrorAction SilentlyContinue - - #testing for ensure = present - if ($Ensure -eq 'Present') - { - #testing if $DhcpServerClass is not null - if ($DhcpServerClass) - { - #since $DhcpServerClass is not null compare the values - if (($DhcpServerClass.Type -eq $Type) -and ($DhcpServerClass.asciiData -eq $AsciiData) -and ($DhcpServerClass.Description -eq $Description)) - { - $result = $true - } - - else - { - $result = $false - } - } - #if $DhcpServerClass return false - else - { - $result = $false - } - } - - #ensure = absent - else - { - #testing if $DhcpServerClass is not null, if it exists return false - if ($DhcpServerClass) - { - $result = $false - } - #if it not exists return true - else - { - $result = $true - } - } - $result -} diff --git a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerClass/MSFT_xDhcpServerClass.schema.mof b/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerClass/MSFT_xDhcpServerClass.schema.mof deleted file mode 100644 index 09cbb37f..00000000 --- a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerClass/MSFT_xDhcpServerClass.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xDhcpServerClass")] -class MSFT_xDhcpServerClass : OMI_BaseResource -{ - [key, Description("Class Name")] String Name; - [key, Description("Class Type, Vendor or User"), ValueMap{"Vendor","User"}, Values{"Vendor","User"}] String Type; - [key, Description("Class Data, in ASCII format")] String AsciiData; - [Write, Description("Class Description")] String Description; - [key, Description("Class address family. Currently needs to be IPv4"), ValueMap{"IPv4"}, Values{"IPv4"}] String AddressFamily; - [Key, Description("Whether the DHCP server Class should exist"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; diff --git a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerOption/MSFT_xDhcpServerOption.psm1 b/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerOption/MSFT_xDhcpServerOption.psm1 deleted file mode 100644 index 34e033e0..00000000 --- a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerOption/MSFT_xDhcpServerOption.psm1 +++ /dev/null @@ -1,428 +0,0 @@ -Import-Module $PSScriptRoot\..\Helper.psm1 -Verbose:$false - -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' -InvalidScopeIDMessage = DHCP server scopeID {0} is not valid. Supply a valid scopeID and try again -CheckScopeIDMessage = Checking DHCP server options for scopeID {0} ... -AddingScopeIDMessage = Adding DHCP server options for scopeID {0} ... -SetScopeIDMessage = DHCP server options is set for scopeID {0}. -FoundScopeIDMessage = Found DHCP server options for scopeID {0} and they should be {1} -NotFoundScopeIDMessage = Can not find DHCP server options for scopeID {0} and they should be {1} -RemovingScopeOptions = Removing DHCP Server options for scopeID {0}... -ScopeOptionsRemoved = DHCP Server options are removed. - -CheckPropertyMessage = Checking {0} option ... -NotDesiredPropertyMessage = {0} is not correct. Expected {1}, actual {2} -DesiredPropertyMessage = {0} option is correct. - -SettingPropertyMessage = Setting {0} option ... -SetPropertyMessage = {0} option is set to {1}. -'@ -} - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [String]$ScopeID, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String[]]$DnsServerIPAddress, - - [Parameter()] [ValidateSet('IPv4')] - [String]$AddressFamily = 'IPv4' - ) - -#region Input Validation - - # Check for DhcpServer module/role - Assert-Module -moduleName DHCPServer - - # Convert the ScopeID to be a valid IPAddress - $ScopeID = (Get-ValidIpAddress -ipString $ScopeID -AddressFamily $AddressFamily -parameterName 'ScopeID').ToString() - - # Test if the ScopeID is valid - $null = Get-DhcpServerv4Scope -ScopeId $ScopeID -ErrorAction SilentlyContinue -ErrorVariable err - if($err) - { - $errorMsg = $($LocalizedData.InvalidScopeIdMessage) -f $ScopeID - New-TerminatingError -errorId ScopeIdNotFound -errorMessage $errorMsg -errorCategory InvalidOperation - } - -#endregion Input Validation - - $ensure = 'Absent' - try - { - $dhcpOption = Get-DhcpServerv4OptionValue -ScopeID $ScopeID - if($dhcpOption) - { - $dnsDomain = (($dhcpOption | Where-Object Name -like 'DNS Domain Name').value)[0] - $ensure = 'Present' - $dnsServerIP = ($dhcpOption | Where-Object Name -like 'DNS Servers').value - $Router = ($dhcpOption | Where-Object OptionId -Like 3).value - } - } - catch - { - } - - @{ - ScopeID = $ScopeID - DnsDomain = $dnsDomain - AddressFamily = 'IPv4' - Ensure = $ensure - DnsServerIPAddress = $dnsServerIP - Router = $Router - } -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [String]$ScopeID, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String[]]$DnsServerIPAddress, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String[]]$Router, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String]$DnsDomain, - - [ValidateSet('IPv4')] - [String]$AddressFamily = 'IPv4', - - [ValidateSet('Present','Absent')] - [String]$Ensure = 'Present' - ) - -#region Input Validation - - # Array of valid IP Address - [String[]]$validDnSServer = @() - - # Convert the ScopeID to be a valid IPAddress - $ScopeID = (Get-ValidIpAddress -ipString $ScopeID -AddressFamily $AddressFamily -parameterName 'ScopeID').ToString() - - # Convert the input to be valid IPAddress - foreach ($dnsServerIp in $DnsServerIPAddress) - { - $validDnSServer += (Get-ValidIpAddress -ipString $dnsServerIp -AddressFamily $AddressFamily -parameterName 'DnsServerIPAddress').ToString() - } - $DnsServerIPAddress = $validDnSServer - - # Array of valid IP Address - [String[]]$validRouter = @() - - # Convert the input to be valid IPAddress - foreach ($routerIp in $Router) - { - $validRouter += (Get-ValidIpAddress -ipString $routerIp -AddressFamily $AddressFamily -parameterName 'Router').ToString() - } - $Router = $validRouter - -#endregion Input Validation - - # Remove $AddressFamily and $debug from PSBoundParameters and pass it to validate-properties helper function - If($PSBoundParameters['Debug']) {$null = $PSBoundParameters.Remove('Debug')} - If($PSBoundParameters['AddressFamily']){$null = $PSBoundParameters.Remove('AddressFamily')} - - ValidateResourceProperties @PSBoundParameters -Apply -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [String]$ScopeID, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String[]]$DnsServerIPAddress, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String[]]$Router, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String]$DnsDomain, - - [ValidateSet('IPv4')] - [String]$AddressFamily = 'IPv4', - - [ValidateSet('Present','Absent')] - [String]$Ensure = 'Present' - ) - -#region Input Validation - - # Array of valid IP Address - [String[]]$validDnSServer = @() - - # Check for DhcpServer module/role - Assert-Module -moduleName DHCPServer - - # Convert the ScopeID to be a valid IPAddress - $ScopeID = (Get-ValidIpAddress -ipString $ScopeID -AddressFamily $AddressFamily -parameterName 'ScopeID').ToString() - - # Array of valid IP Address - [String[]]$validDnSServer = @() - - # Convert the input to be valid IPAddress - foreach ($dnsServerIp in $DnsServerIPAddress) - { - $validDnSServer += (Get-ValidIpAddress -ipString $dnsServerIp -AddressFamily $AddressFamily -parameterName 'DnsServerIPAddress').ToString() - } - $DnsServerIPAddress = $validDnSServer - - # Array of valid IP Address - [String[]]$validRouter = @() - - # Convert the input to be valid IPAddress - foreach ($routerIp in $Router) - { - $validRouter += (Get-ValidIpAddress -ipString $routerIp -AddressFamily $AddressFamily -parameterName 'Router').ToString() - } - $Router = $validRouter - - # Test if the ScopeID is valid - $null = Get-DhcpServerv4Scope -ScopeId $ScopeID -ErrorAction SilentlyContinue -ErrorVariable err - if($err) - { - $errorMsg = $($LocalizedData.InvalidScopeIdMessage) -f $ScopeID - New-TerminatingError -errorId ScopeIdNotFound -errorMessage $errorMsg -errorCategory InvalidOperation - } - -#endregion Input Validation - - # Remove $AddressFamily and $debug from PSBoundParameters and pass it to validateProperties helper function - If($PSBoundParameters['Debug']) {$null = $PSBoundParameters.Remove('Debug')} - If($PSBoundParameters['AddressFamily']){$null = $PSBoundParameters.Remove('AddressFamily')} - - ValidateResourceProperties @PSBoundParameters -} - -#region Helper function - -# Internal function to validate dhcpOptions properties -function ValidateResourceProperties -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory)] - [string]$ScopeID, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String[]]$DnsServerIPAddress, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String]$DnsDomain, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String[]]$Router, - - [ValidateSet('Present','Absent')] - [String]$Ensure = 'Present', - - [switch]$Apply - ) - - $scopeIDMessage = $($LocalizedData.CheckScopeIDMessage) -f $ScopeID - Write-Verbose -Message $scopeIDMessage - - $dhcpOption = Get-DhcpServerv4OptionValue -ScopeID $ScopeID - - # Found DHCPOption - if($dhcpOption) - { - $foundScopeIdMessage = $($LocalizedData.FoundScopeIDMessage) -f $ScopeID, $Ensure - Write-Verbose -Message $foundScopeIdMessage - - # If Options should be present, check other properties - if($Ensure -eq 'Present') - { - - if($PSBoundParameters.ContainsKey('DnsServerIPAddress')) - { - # Test the DNS Server IPs - $checkPropertyMessage = $($LocalizedData.CheckPropertyMessage) -f 'Dns server ip' - Write-Verbose -Message $checkPropertyMessage - - $dnsServerIP = ($DhcpOption | Where-Object OptionId -eq 6).Value - # If comparison return something, they are not equal - if((-not $dnsServerIP) -or (Compare-Object $dnsServerIP $DnsServerIPAddress)) - { - $notDesiredPropertyMessage = $($LocalizedData.NotDesiredPropertyMessage) -f 'DNS server ip', ($DnsServerIPAddress -join ', '), ($dnsServerIP -join ', ') - Write-Verbose -Message $notDesiredPropertyMessage - if($Apply) - { - $settingPropertyMessage = $($LocalizedData.SettingPropertyMessage) -f 'DNS server ip' - Write-Verbose -Message $settingPropertyMessage - - Set-DhcpServerv4OptionValue -ScopeId $ScopeID -DnsServer $DnsServerIPAddress -Force - - $setPropertyMessage = $($LocalizedData.SetPropertyMessage) -f 'DNS server ip', ($DnsServerIPAddress -join ', ') - Write-Verbose -Message $setPropertyMessage - - } # end $Apply - else - { - return $false - } - } # end Compare-object - else - { - $desiredPropertyMessage = $($LocalizedData.DesiredPropertyMessage) -f 'DNS server ip' - Write-Verbose -Message $desiredPropertyMessage - } - } - - # If DNS Domain is specified, test that - if($PSBoundParameters.ContainsKey('DnsDomain')) - { - $checkPropertyMessage = $($LocalizedData.CheckPropertyMessage) -f 'Dns domain name' - Write-Verbose -Message $checkPropertyMessage - - $dnsDomainName = ($DhcpOption | Where-Object OptionId -eq 15).Value - if($dnsDomainName -ne $DnsDomain) - { - $notDesiredPropertyMessage = $($LocalizedData.NotDesiredPropertyMessage) -f 'DNS domain name', $DnsDomain, ($dnsDomainName -join ', ') - Write-Verbose -Message $notDesiredPropertyMessage - - if($Apply) - { - $settingPropertyMessage = $($LocalizedData.SettingPropertyMessage) -f 'DNS domain name' - Write-Verbose -Message $settingPropertyMessage - - Set-DhcpServerv4OptionValue -ScopeId $ScopeID -DnsDomain $DnsDomain - - $setPropertyMessage = $($LocalizedData.SetPropertyMessage) -f 'DNS domain name', ($DnsDomain -join ', ') - Write-Verbose -Message $setPropertyMessage - } # end $Apply - else - { - return $false - } - } # end $dnsDomainName -ne $DnsDomain - else - { - $desiredPropertyMessage = $($LocalizedData.DesiredPropertyMessage) -f 'DNS domain name' - Write-Verbose -Message $desiredPropertyMessage - } - } # end $PSBoundParameters.ContainsKey('DnsDomain') - - # If Router is specified, test that - if($PSBoundParameters.ContainsKey('Router')) - { - $propertyName = 'Router ip addresses' - $checkPropertyMessage = $($LocalizedData.CheckPropertyMessage) -f 'Router ip addresses' - Write-Verbose -Message $checkPropertyMessage - - $routerIP = ($DhcpOption | Where-Object OptionId -eq 3).Value - - if((-not $routerIP) -or (Compare-Object $routerIP $Router)) - { - $notDesiredPropertyMessage = $($LocalizedData.NotDesiredPropertyMessage) -f $propertyName, ($Router -join ', '), ($routerIP -join ', ') - Write-Verbose -Message $notDesiredPropertyMessage - - if($Apply) - { - $settingPropertyMessage = $($LocalizedData.SettingPropertyMessage) -f $propertyName - Write-Verbose -Message $settingPropertyMessage - - Set-DhcpServerv4OptionValue -ScopeId $ScopeID -Router $Router - - $setPropertyMessage = $($LocalizedData.SetPropertyMessage) -f $propertyName, ($Router -join ', ') - Write-Verbose -Message $setPropertyMessage - } # end $Apply - else - { - return $false - } - } # end $routerIP -ne $Router - else - { - $desiredPropertyMessage = $($LocalizedData.DesiredPropertyMessage) -f $propertyName - Write-Verbose -Message $desiredPropertyMessage - } - } # end $PSBoundParameters.ContainsKey('Router') - - if(-not $Apply) - { - return $true - } - } # end $Ensure -eq 'Present' - - # If Options should be absent, return False or remove it - else - { - if($Apply) - { - Write-Verbose -Message ($LocalizedData.RemovingScopeOptions -f $ScopeID) - foreach($option in $dhcpOption.OptionID) - { - Remove-DhcpServerv4OptionValue -ScopeId $ScopeID -OptionId $option - } - Write-Verbose -Message ($LocalizedData.ScopeOptionsRemoved) - } # end if $Apply - else {return $false} - } - } - else - { - $notFoundScopeIdMessage = $($LocalizedData.NotFoundScopeIDMessage) -f $ScopeID, $Ensure - Write-Verbose -Message $notFoundScopeIdMessage - - if($Apply) - { - # If Options should be present, create those - if($Ensure -eq 'Present') - { - $addingScopeIdMessage = $($LocalizedData.AddingScopeIDMessage) -f $ScopeID - Write-Verbose -Message $addingScopeIdMessage - - $parameters = @{ScopeID = $ScopeID;} - - ## If DnsServer(s) specified, pass it - if ($PSBoundParameters.ContainsKey('DnsServerIPAddress')) - { - $parameters['DnsServer'] = $DnsServerIPAddress - } - - # If Dns domain is specified pass it - if($PSBoundParameters.ContainsKey('DnsDomain')) - { - $parameters['DnsDomain'] = $DnsDomain - } - - Set-DhcpServerv4OptionValue @parameters -Force - - $setScopeIdMessage = $($LocalizedData.SetScopeIDMessage) -f $ScopeID - Write-Verbose -Message $setScopeIdMessage - } # end Ensure -eq 'Present - } # end if $Apply - else - { - # If Options should be present, return false else true - return ($Ensure -eq 'Absent') - } - } -} -#endregion Helper function -if($global:DhpcOptionTest -ne $true) -{ - Export-ModuleMember -Function *-TargetResource -} diff --git a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerOption/MSFT_xDhcpServerOption.schema.mof b/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerOption/MSFT_xDhcpServerOption.schema.mof deleted file mode 100644 index 642c9ed5..00000000 --- a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerOption/MSFT_xDhcpServerOption.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xDhcpServerOption")] -class MSFT_xDhcpServerOption : OMI_BaseResource -{ - [Key, Description("ScopeId for which options are set")] String ScopeID; - [Write, Description("IP address of DNS Servers")] String DnsServerIPAddress[]; - [Write, Description("Domain name of DNS Server")] String DnsDomain; - [Write, Description("IP address of the router/default gateway.")] String Router[]; - [Write, Description("Address family type"), ValueMap{"IPv4"}, Values{"IPv4"}] String AddressFamily; - [Write, Description("Whether option should be set or removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; - diff --git a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerOptionDefinition/MSFT_xDhcpServerOptionDefinition.psm1 b/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerOptionDefinition/MSFT_xDhcpServerOptionDefinition.psm1 deleted file mode 100644 index aeecc124..00000000 --- a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerOptionDefinition/MSFT_xDhcpServerOptionDefinition.psm1 +++ /dev/null @@ -1,171 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(mandatory)] [ValidateNotNullOrEmpty()] - [UInt32]$OptionID, - - [Parameter()] [ValidateSet('IPv4')] - [String]$AddressFamily = 'IPv4' - ) - - -#region Input Validation - -#endregion Input Validation - - - $ensure = 'Absent' - - $dhcpServerOptionDefinition = Get-DhcpServerv4OptionDefinition -OptionId $OptionID -ErrorAction SilentlyContinue - - @{ - OptionId = $OptionID - Name = $dhcpServerOptionDefinition.Name - AddressFamily = 'IPv4' - Ensure = $ensure - Description = $dhcpServerOptionDefinition.Description - Type = $dhcpServerOptionDefinition.Type - DefaultValue = $dhcpServerOptionDefinition.DefaultValue - VendorClass = $dhcpServerOptionDefinition.VendorClass - MultiValued = $dhcpServerOptionDefinition.MultiValued - } - -} -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory)] [ValidateNotNullOrEmpty()] - [String]$Name, - - [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] - [UInt32]$OptionID, - - [ValidateSet('Byte','Word','DWord','DWordDWord','IPv4Address','String','BinaryData','EncapsulatedData')] - [String]$Type, - - [ValidateNotNullOrEmpty()] - [string]$Description, - - [switch]$MultiValued, - - [ValidateSet('IPv4')] - [String]$AddressFamily = 'IPv4', - - [ValidateSet('Present','Absent')] - [String]$Ensure = 'Present', - - [ValidateNotNullOrEmpty()] - [string]$Vendorclass - - ) - - #reading the dhcp option - $dhcpServerOptionDefinition = Get-DhcpServerv4OptionDefinition -OptionId $OptionID -ErrorAction SilentlyContinue - - #testing for present - if ($Ensure -eq 'Present') - { - #testing if exists - if ($dhcpServerOptionDefinition) - { - #if it exists and any of multivalued or type is being changed remote then re-add the option - if (($dhcpServerOptionDefinition.type -ne $Type) -or ($dhcpServerOptionDefinition.MultiValued -ne $MultiValued) -or ($dhcpServerOptionDefinition.VendorClass -ne $Vendorclass)) - { - Write-Verbose "Recreating option $OptionID because of changed type or multivalued" - Remove-DhcpServerv4OptionDefinition -OptionId $OptionID - Add-DhcpServerv4OptionDefinition -OptionId $OptionID -name $Name -Type $Type -Description $Description -MultiValued:$MultiValued -VendorClass $Vendorclass - } - else - { - #if option exists we need only to adjust the parameters - Write-Verbose "Modifying DHCP Option Definition $OptionID" - set-DhcpServerv4OptionDefinition -OptionId $OptionID -name $Name -Description $Description - } - } - - #if option does not exist we need to add it - else - { - write-verbose "Adding DHCP Option Definition $OptionID" - Add-DhcpServerv4OptionDefinition -OptionId $OptionID -name $Name -Type $Type -Description $Description -MultiValued:$MultiValued -VendorClass $Vendorclass - } - } - - #testing for 'absent' - else - { - if ($dhcpServerOptionDefinition) - { - Write-Verbose "Removing option $OptionID" - Remove-DhcpServerv4OptionDefinition -OptionId $OptionID - } - - } -} -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter()] [ValidateNotNullOrEmpty()] - [String]$Name, - - [Parameter()] [ValidateNotNullOrEmpty()] - [UInt32]$OptionID, - - [Parameter()] [ValidateSet('Byte,Word,DWord,DWordDWord,IPv4Address,String,BinaryData,EncapsulatedData')] - [String]$Type, - - [Parameter()] - [string]$Description, - - [Parameter()] - [bool]$MultiValued = $false, - - [Parameter()] [ValidateSet('IPv4')] - [String]$AddressFamily = 'IPv4', - - [ValidateSet('Present','Absent')] - [String]$Ensure = 'Present' - ) -#region Input Validation - - # Check for DhcpServer module/role - #Assert-Module -moduleName DHCPServer -#endregion Input Validation - -try -{ - #geting the dhcp option definition - Write-Verbose "Getting DHCP ServerOptionDefinition $OptionID" - $dhcpServerOptionDefinition = Get-DhcpServerv4OptionDefinition -OptionId $OptionID -ErrorAction SilentlyContinue -ErrorVariable err - - #testing for Present - if ($Ensure -eq 'Present') - { - if ($dhcpServerOptionDefinition) - { - #dhcp server option # exists - $Result = $true - } - } - # If option # not exists return false. - else - { - $Result = $false - } - - -} -catch -{ -} - -$Result -} diff --git a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerReservation/MSFT_xDhcpServerReservation.psm1 b/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerReservation/MSFT_xDhcpServerReservation.psm1 deleted file mode 100644 index 640c7b56..00000000 --- a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerReservation/MSFT_xDhcpServerReservation.psm1 +++ /dev/null @@ -1,354 +0,0 @@ -Import-Module $PSScriptRoot\..\Helper.psm1 -Verbose:$false - -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' -InvalidScopeIDMessage = DHCP server scopeID {0} is not valid. Supply a valid scopeID and try again -CheckingReservationMessage = Checking DHCP server reservation in scope id {0} for IP address {1} ... -TestReservationMessage = DHCP server reservation in the given scope id for the IP address is {0} and it should be {1} -RemovingReservationMessage = Removing DHCP server reservation from scope id {0} for MAC address {1} ... -DeleteReservationMessage = DHCP server reservation for the given MAC address is now absent -AddingReservationMessage = Adding DHCP server reservation with the given IP address ... -SetReservationMessage = DHCP server reservation in the given scope id for the IP address {0} is now present - -CheckPropertyMessage = Checking DHCP server reservation {0} for the given ipaddress ... -NotDesiredPropertyMessage = DHCP server reservation for the given ipaddress doesn't have correct {0}. Expected {1}, actual {2} -DesiredPropertyMessage = DHCP server reservation {0} for the given ipaddress is correct. -SetPropertyMessage = DHCP server reservation {0} for the given ipaddress is set. -'@ -} - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory)] - [String]$ScopeID, - - [parameter(Mandatory)] - [String]$ClientMACAddress, - - [parameter(Mandatory)] - [String]$IPAddress, - - [ValidateSet("IPv4")] - [String]$AddressFamily = 'IPv4' - ) - -#region input validation - # Check for DhcpServer module/role - Assert-Module -moduleName DHCPServer - - # Convert the ScopeID to be a valid IPAddress - $ScopeID = (Get-ValidIpAddress -ipString $ScopeID -AddressFamily $AddressFamily -parameterName 'ScopeID').ToString() - - # Test if the ScopeID is valid - $null = Get-DhcpServerv4Scope -ScopeId $ScopeID -ErrorAction SilentlyContinue -ErrorVariable err - if($err) - { - $errorMsg = $($LocalizedData.InvalidScopeIdMessage) -f $ScopeID - New-TerminatingError -errorId ScopeIdNotFound -errorMessage $errorMsg -errorCategory InvalidOperation - } - - # Convert the Start Range to be a valid IPAddress - $IPAddress = (Get-ValidIpAddress -ipString $IPAddress -AddressFamily $AddressFamily -parameterName 'IPAddress').ToString() - -#endregion input validation - - $reservation = Get-DhcpServerv4Reservation -ScopeID $ScopeID | Where-Object IPAddress -eq $IPAddress - - if($reservation) - { - $ensure = 'Present' - } - else - { - $ensure = 'Absent' - } - - @{ - ScopeID = $ScopeID - IPAddress = $IPAddress - ClientMACAddress = $reservation.ClientId - Name = $reservation.Name - AddressFamily = $AddressFamily - Ensure = $Ensure - } - -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory)] - [String]$ScopeID, - - [parameter(Mandatory)] - [String]$ClientMACAddress, - - [parameter(Mandatory)] - [String]$IPAddress, - - [String]$Name, - - [ValidateSet("IPv4")] - [String]$AddressFamily = 'IPv4', - - [ValidateSet("Present","Absent")] - [String]$Ensure = 'Present' - ) - - if($PSBoundParameters.ContainsKey('Debug')){ $null = $PSBoundParameters.Remove('Debug')} - if($PSBoundParameters.ContainsKey('AddressFamily')) {$null = $PSBoundParameters.Remove('AddressFamily')} - - Validate-ResourceProperties @PSBoundParameters -Apply -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory)] - [String]$ScopeID, - - [parameter(Mandatory)] - [String]$ClientMACAddress, - - [parameter(Mandatory)] - [String]$IPAddress, - - [String]$Name, - - [ValidateSet("IPv4")] - [String]$AddressFamily = 'IPv4', - - [ValidateSet("Present","Absent")] - [String]$Ensure = 'Present' - ) - -#region input validation - # Check for DhcpServer module/role - Assert-Module -moduleName DHCPServer - - # Convert the ScopeID to be a valid IPAddress - $ScopeID = (Get-ValidIpAddress -ipString $ScopeID -AddressFamily $AddressFamily -parameterName 'ScopeID').ToString() - - # Test if the ScopeID is valid - $null = Get-DhcpServerv4Scope -ScopeId $ScopeID -ErrorAction SilentlyContinue -ErrorVariable err - if($err) - { - $errorMsg = $($LocalizedData.InvalidScopeIdMessage) -f $ScopeID - New-TerminatingError -errorId ScopeIdNotFound -errorMessage $errorMsg -errorCategory InvalidOperation - } - - # Convert the Start Range to be a valid IPAddress - $IPAddress = (Get-ValidIpAddress -ipString $IPAddress -AddressFamily $AddressFamily -parameterName 'IPAddress').ToString() - - #Convert the MAC Address into normalized form for comparison - $ClientMACAddress = $ClientMACAddress.Replace('-','') - -#endregion input validation - - if($PSBoundParameters.ContainsKey('Debug')){ $null = $PSBoundParameters.Remove('Debug')} - if($PSBoundParameters.ContainsKey('AddressFamily')) {$null = $PSBoundParameters.Remove('AddressFamily')} - - Validate-ResourceProperties @PSBoundParameters -} - -#region Helper function - -# Internal function to validate dhcpOptions properties -function Validate-ResourceProperties -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory)] - [String]$ScopeID, - - [parameter(Mandatory)] - [String]$ClientMACAddress, - - [parameter(Mandatory)] - [String]$IPAddress, - - [String]$Name, - - [ValidateSet("IPv4")] - [String]$AddressFamily = 'IPv4', - - [ValidateSet("Present","Absent")] - [String]$Ensure = 'Present', - - [Switch]$Apply - ) - - $reservationMessage = $($LocalizedData.CheckingReservationMessage) -f $ScopeID, $IPAddress - Write-Verbose -Message $reservationMessage - - $reservation = Get-DhcpServerv4Reservation -ScopeID $ScopeID | Where-Object IPAddress -eq $IPAddress - - # Initialize the parameter collection - if($Apply) - { - $parameters = @{IPAddress = $IPAddress} - } - # Found DHCP reservation - if($reservation) - { - $TestReservationMessage = $($LocalizedData.TestReservationMessage) -f 'present', $Ensure - Write-Verbose -Message $TestReservationMessage - - # if it should be present, test individual properties to match parameter values - if($Ensure -eq 'Present') - { - #Convert the MAC Address into normalized form for comparison - $normalizedClientID = $reservation.ClientId.Replace('-','') - - #region Test MAC address - $checkPropertyMsg = $($LocalizedData.CheckPropertyMessage) -f 'client MAC address' - Write-Verbose -Message $checkPropertyMsg - - if($normalizedClientID -ne $ClientMACAddress) - { - $notDesiredPropertyMsg = $($LocalizedData.NotDesiredPropertyMessage) -f 'client MAC address',$ClientMACAddress,$normalizedClientID - Write-Verbose -Message $notDesiredPropertyMsg - - if($Apply) - { - $parameters['ClientID'] = $ClientMACAddress - } - else - { - return $false - } - } # end ClientID ne ClientMACAddress - else - { - $desiredPropertyMsg = $($LocalizedData.DesiredPropertyMessage) -f 'client MAC address' - Write-Verbose -Message $desiredPropertyMsg - } - #endregion Test MAC address - - #region Test reservation name - $checkPropertyMsg = $($LocalizedData.CheckPropertyMessage) -f 'name' - Write-Verbose -Message $checkPropertyMsg - - if($reservation.Name -ne $Name) - { - $notDesiredPropertyMsg = $($LocalizedData.NotDesiredPropertyMessage) -f 'name',$Name,$($reservation.Name) - Write-Verbose -Message $notDesiredPropertyMsg - - if($Apply) - { - $parameters['Name'] = $Name - } - else - { - return $false - } - } # end reservation.Name -ne Name - else - { - $desiredPropertyMsg = $($LocalizedData.DesiredPropertyMessage) -f 'name' - Write-Verbose -Message $desiredPropertyMsg - } - #endregion Test reservation name - - if($Apply) - { - # If parameters contains more than 1 key, set the DhcpServer reservation - if($parameters.Count -gt 1) - { - Set-DhcpServerv4Reservation @parameters - - Write-PropertyMessage -Parameters $parameters -keysToSkip IPAddress ` - -Message $($LocalizedData.SetPropertyMessage) -Verbose - } - } # end Apply - else - { - return $true - } - } # end ensure -eq present - - # If dhcpreservation should be absent - else - { - if($Apply) - { - $removingReservationMsg = $($LocalizedData.RemovingReservationMessage) -f $ScopeID,$ClientMACAddress - Write-Verbose -Message $removingReservationMsg - - # Remove the reservation - Remove-DhcpServerv4Reservation -ScopeId $ScopeID -ClientId $ClientMACAddress - - $deleteReservationMsg = $LocalizedData.deleteReservationMessage - Write-Verbose -Message $deleteReservationMsg - } - else - { - return $false - } - } # end ensure -eq absent - } # end found resevation - - else - { - $TestReservationMessage = $($LocalizedData.TestReservationMessage) -f 'absent', $Ensure - Write-Verbose -Message $TestReservationMessage - - if($Ensure -eq 'Present') - { - if($Apply) - { - # Add other mandatory parameters - $parameters['ScopeId'] = $ScopeID - $parameters['ClientId'] = $ClientMACAddress - - # Check if reservation name is specified, add to parameter collection - if($PSBoundParameters.ContainsKey('Name')) - { - $parameters['Name'] = $Name - } - - $addingReservationeMessage = $LocalizedData.AddingReservationMessage - Write-Verbose -Message $addingReservationeMessage - - try - { - # Create a new scope with specified properties - Add-DhcpServerv4Reservation @parameters - - $setReservationMessage = $($LocalizedData.SetReservationMessage) -f $Name - Write-Verbose -Message $setReservationMessage - } - catch - { - New-TerminatingError -errorId DhcpServerReservationFailure -errorMessage $_.Exception.Message -errorCategory InvalidOperation - } - }# end Apply - else - { - return $false - } - } # end Ensure -eq Present - else - { - return $true - } - } # end ! reservation -} - -#endregion - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerReservation/MSFT_xDhcpServerReservation.schema.mof b/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerReservation/MSFT_xDhcpServerReservation.schema.mof deleted file mode 100644 index c1d6c0ea..00000000 --- a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerReservation/MSFT_xDhcpServerReservation.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xDhcpServerReservation")] -class MSFT_xDhcpServerReservation : OMI_BaseResource -{ - [Key, Description("ScopeId for which reservations are set")] String ScopeID; - [Key, Description("IP address of the reservation for which the properties are modified")] String IPAddress; - [Required, Description("Client MAC Address to set on the reservation")] String ClientMACAddress; - [Write, Description("Reservation name")] String Name; - [Write, Description("Address family type"), ValueMap{"IPv4"}, Values{"IPv4"}] String AddressFamily; - [Write, Description("Whether option should be set or removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; - diff --git a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerScope/MSFT_xDhcpServerScope.psm1 b/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerScope/MSFT_xDhcpServerScope.psm1 deleted file mode 100644 index eea9a1f8..00000000 --- a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerScope/MSFT_xDhcpServerScope.psm1 +++ /dev/null @@ -1,461 +0,0 @@ -Import-Module $PSScriptRoot\..\Helper.psm1 -Verbose:$false - -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' -AddingScopeMessage = Adding DHCP server scope with the given IP address range ... -CheckScopeMessage = Checking DHCP server scope with the given IP address range ... -SetScopeMessage = DHCP server scope with name '{0}' is now present. -RemovingScopeMessage = Removing DHCP server scope with the given IP address range ... -DeleteScopeMessage = DHCP server scope with the given IP address range is now absent. -TestScopeMessage = DHCP server scope with the given IP address range is '{0}' and it should be '{1}'. - -CheckPropertyMessage = Checking DHCP server scope '{0}' ... -NotDesiredPropertyMessage = DHCP server scope '{0}' is not correct; expected '{1}', actual '{2}'. -DesiredPropertyMessage = DHCP server scope '{0}' is correct. -SetPropertyMessage = DHCP server scope '{0}' is set to '{1}'. -'@ -} - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory)] - [String]$Name, - - [parameter(Mandatory)] - [String]$IPStartRange, - - [parameter(Mandatory)] - [String]$IPEndRange, - - [parameter(Mandatory)] - [String]$SubnetMask, - - [ValidateSet('IPv4')] - [String]$AddressFamily = 'IPv4' - - ) -#region Input Validation - - # Check for DhcpServer module/role - Assert-Module -moduleName DHCPServer - - # Convert the Start Range to be a valid IPAddress - $IPStartRange = (Get-ValidIpAddress -ipString $IPStartRange -AddressFamily $AddressFamily -parameterName 'IPStartRange').ToString() - - # Convert the End Range to be a valid IPAddress - $IPEndRange = (Get-ValidIpAddress -ipString $IPEndRange -AddressFamily $AddressFamily -parameterName 'IPEndRange').ToString() - - # Convert the Subnet Mask to be a valid IPAddress - $SubnetMask = (Get-ValidIpAddress -ipString $SubnetMask -AddressFamily $AddressFamily -parameterName 'SubnetMask').ToString() - - # Check to ensure startRange is smaller than endRange - if($IPEndRange.Address -lt $IPStartRange.Address) - { - $errorMsg = $LocalizedData.InvalidStartAndEndRangeMessage - New-TerminatingError -errorId RangeNotCorrect -errorMessage $errorMsg -errorCategory InvalidArgument - } - -#endregion Input Validation - - $dhcpScope = Get-DhcpServerv4Scope | Where-Object {($_.StartRange -eq $IPStartRange) -and ($_.EndRange -eq $IPEndRange)} - if($dhcpScope) - { - $ensure = 'Present' - } - else - { - $ensure = 'Absent' - } - - return @{ - ScopeID = $dhcpScope.ScopeId - Name = $dhcpScope.Name - IPStartRange = $dhcpScope.StartRane - IPEndRange = $dhcpScope.EndRange - SubnetMask = $dhcpScope.SubnetMask - LeaseDuration = $dhcpScope.LeaseDuration.ToString() - State = $dhcpScope.State - AddressFamily = 'IPv4' - Ensure = $Ensure - } -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory)] - [String]$Name, - - [parameter(Mandatory)] - [String]$IPStartRange, - - [parameter(Mandatory)] - [String]$IPEndRange, - - [parameter(Mandatory)] - [String]$SubnetMask, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String]$LeaseDuration, - - [ValidateSet('IPv4')] - [String]$AddressFamily = 'IPv4', - - [ValidateSet('Active','Inactive')] - [String]$State = 'Active', - - [ValidateSet('Present','Absent')] - [String]$Ensure = 'Present' - ) - - - if($PSBoundParameters.ContainsKey('Debug')){ $null = $PSBoundParameters.Remove('Debug')} - if($PSBoundParameters.ContainsKey('AddressFamily')) {$null = $PSBoundParameters.Remove('AddressFamily')} - - Validate-ResourceProperties @PSBoundParameters -Apply - -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory)] - [String]$Name, - - [parameter(Mandatory)] - [String]$IPStartRange, - - [parameter(Mandatory)] - [String]$IPEndRange, - - [parameter(Mandatory)] - [String]$SubnetMask, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String]$LeaseDuration, - - [ValidateSet('IPv4')] - [String]$AddressFamily = 'IPv4', - - [ValidateSet('Active','Inactive')] - [String]$State = 'Active', - - [ValidateSet('Present','Absent')] - [String]$Ensure = 'Present' - ) - -#region Input Validation - - # Check for DhcpServer module/role - Assert-Module -moduleName DHCPServer - - # Convert the Start Range to be a valid IPAddress - $IPStartRange = (Get-ValidIpAddress -ipString $IPStartRange -AddressFamily $AddressFamily -parameterName 'IPStartRange').ToString() - - # Convert the End Range to be a valid IPAddress - $IPEndRange = (Get-ValidIpAddress -ipString $IPEndRange -AddressFamily $AddressFamily -parameterName 'IPEndRange').ToString() - - # Convert the Subnet Mask to be a valid IPAddress - $SubnetMask = (Get-ValidIpAddress -ipString $SubnetMask -AddressFamily $AddressFamily -parameterName 'SubnetMask').ToString() - - # Check to ensure startRange is smaller than endRange - if($IPEndRange.Address -lt $IPStartRange.Address) - { - $errorMsg = $LocalizedData.InvalidStartAndEndRangeMessage - New-TerminatingError -errorId RangeNotCorrect -errorMessage $errorMsg -errorCategory InvalidArgument - } - -#endregion Input Validation - - if($PSBoundParameters.ContainsKey('Debug')){ $null = $PSBoundParameters.Remove('Debug')} - if($PSBoundParameters.ContainsKey('AddressFamily')) {$null = $PSBoundParameters.Remove('AddressFamily')} - - Validate-ResourceProperties @PSBoundParameters - -} - -function Validate-ResourceProperties -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory)] - [String]$Name, - - [parameter(Mandatory)] - [String]$IPStartRange, - - [parameter(Mandatory)] - [String]$IPEndRange, - - [parameter(Mandatory)] - [String]$SubnetMask, - - [Parameter()] [ValidateNotNullOrEmpty()] - [String]$LeaseDuration, - - [ValidateSet('Active','Inactive')] - [String]$State = 'Active', - - [ValidateSet('Present','Absent')] - [String]$Ensure = 'Present', - - [Switch]$Apply - ) - - # Convert the Lease duration to be a valid timespan - if($LeaseDuration) - { - $LeaseDuration = (Get-ValidTimeSpan -tsString $LeaseDuration -parameterName 'Leaseduration').ToString() - } - - $checkScopeMessage = $LocalizedData.CheckScopeMessage - Write-Verbose -Message $checkScopeMessage - - $dhcpScope = Get-DhcpServerv4Scope | Where-Object {($_.StartRange -eq $IPStartRange) -and ($_.EndRange -eq $IPEndRange)} - # Initialize the parameter collection - if($Apply) - { - $parameters = @{} - } - - # dhcpScope is set - if($dhcpScope) - { - $TestScopeMessage = $($LocalizedData.TestScopeMessage) -f 'present', $Ensure - Write-Verbose -Message $TestScopeMessage - - # if it should be present, test individual properties to match parameter values - if($Ensure -eq 'Present') - { - #region Test the Scope Name - $checkPropertyMsg = $($LocalizedData.CheckPropertyMessage) -f 'name' - Write-Verbose -Message $checkPropertyMsg - - if($dhcpScope.Name -ne $Name) - { - $notDesiredPropertyMsg = $($LocalizedData.NotDesiredPropertyMessage) -f 'name',$Name,$($dhcpScope.Name) - Write-Verbose -Message $notDesiredPropertyMsg - - if($Apply) - { - $parameters['Name'] = $Name - } - else - { - return $false - } - } - else - { - $desiredPropertyMsg = $($LocalizedData.DesiredPropertyMessage) -f 'name' - Write-Verbose -Message $desiredPropertyMsg - } - #endregion scope name - - #region Test the Lease duration - if($PSBoundParameters.ContainsKey('LeaseDuration')) - { - $checkPropertyMsg = $($LocalizedData.CheckPropertyMessage) -f 'lease duration' - Write-Verbose -Message $checkPropertyMsg - - if($dhcpScope.LeaseDuration -ne $LeaseDuration) - { - $notDesiredPropertyMsg = $($LocalizedData.NotDesiredPropertyMessage) -f 'lease duration',$LeaseDuration,$($dhcpScope.LeaseDuration) - Write-Verbose -Message $notDesiredPropertyMsg - - if($Apply) - { - $parameters['LeaseDuration'] = $LeaseDuration - } - else - { - return $false - } - } - else - { - $desiredPropertyMsg = $($LocalizedData.DesiredPropertyMessage) -f 'lease duration' - Write-Verbose -Message $desiredPropertyMsg - } - } - #endregion lease duration - - #region Test the Scope State - if($PSBoundParameters.ContainsKey('State')) - { - $checkPropertyMsg = $($LocalizedData.CheckPropertyMessage) -f 'state' - Write-Verbose -Message $checkPropertyMsg - - if($dhcpScope.State -ne $State) - { - $notDesiredPropertyMsg = $($LocalizedData.NotDesiredPropertyMessage) -f 'state',$State,$($dhcpScope.State) - Write-Verbose -Message $notDesiredPropertyMsg - - if($Apply) - { - $parameters['State'] = $State - } - else - { - return $false - } - } - else - { - $desiredPropertyMsg = $($LocalizedData.DesiredPropertyMessage) -f 'state' - Write-Verbose -Message $desiredPropertyMsg - } - } - #endregion scope state - - #region Test the Subnet Mask - $checkPropertyMsg = $($LocalizedData.CheckPropertyMessage) -f 'subnet mask' - Write-Verbose -Message $checkPropertyMsg - - if($dhcpScope.SubnetMask -ne $SubnetMask) - { - $notDesiredPropertyMsg = $($LocalizedData.NotDesiredPropertyMessage) -f 'subnet mask',$SubnetMask,$($dhcpScope.SubnetMask) - Write-Verbose -Message $notDesiredPropertyMsg - - if($Apply) - { - try - { - # To set the subnet mask scope, the only ways is to remove the old scope and add a new scope - Remove-DhcpServerv4Scope -ScopeId $dhcpScope.ScopeId - ## We can't splat two hashtables and $parameters may be empty, so just clone the existing one - $addDhcpServerv4ScopeParams = $parameters.Clone(); - $addDhcpServerv4ScopeParams['Type'] = 'Dhcp'; - $addDhcpServerv4ScopeParams['StartRange'] = $IPStartRange; - $addDhcpServerv4ScopeParams['EndRange'] = $IPEndRange; - $addDhcpServerv4ScopeParams['Name'] = $Name; - $addDhcpServerv4ScopeParams['SubnetMask'] = $SubnetMask; - Add-DhcpServerv4Scope @addDhcpServerv4ScopeParams; - } - catch - { - New-TerminatingError -errorId DhcpServerScopeFailure -errorMessage $_.Exception.Message -errorCategory InvalidOperation - } - - $setPropertyMsg = $($LocalizedData.SetPropertyMessage) -f 'subnet mask',$SubnetMask - Write-Verbose -Message $setPropertyMsg - } - else - { - return $false - } - } - else - { - $desiredPropertyMsg = $($LocalizedData.DesiredPropertyMessage) -f 'subnet mask' - Write-Verbose -Message $desiredPropertyMsg - } - #endregion subnet mask - - if($Apply) - { - # If parameters contains more than 0 key, set the DhcpServer scope - if($parameters.Count -gt 0) - { - Set-DhcpServerv4Scope @parameters -ScopeId $dhcpScope.ScopeId - Write-PropertyMessage -Parameters $parameters -keysToSkip ScopeId ` - -Message $($LocalizedData.SetPropertyMessage) -Verbose - } - } # end Apply - else - { - return $true - } - } # end ensure eq present - - # If dhcpscope should be absent - else - { - if($Apply) - { - $removingScopeMsg = $LocalizedData.RemovingScopeMessage - Write-Verbose -Message $removingScopeMsg - - # Remove the scope - Remove-DhcpServerv4Scope -ScopeId $dhcpScope.ScopeId - - $deleteScopeMsg = $LocalizedData.deleteScopeMessage - Write-Verbose -Message $deleteScopeMsg - } - else - { - return $false - } - }# end ensure -eq 'Absent' - } # if $dhcpScope - - #If dhcpScope is not set, create it if needed - else - { - $TestScopeMessage = $($LocalizedData.TestScopeMessage) -f 'absent', $Ensure - Write-Verbose -Message $TestScopeMessage - - if($Ensure -eq 'Present') - { - if($Apply) - { - # Add mandatory parameters - $parameters['Name'] = $Name - $parameters['StartRange'] = $IPStartRange - $parameters['EndRange'] = $IPEndRange - $parameters['SubnetMask'] = $SubnetMask - - # Check if Lease duration is specified, add to parameter collection - if($PSBoundParameters.ContainsKey('LeaseDuration')) - { - $parameters['LeaseDuration'] = $LeaseDuration - } - - # Check if State is specified, add to parameter collection - if($PSBoundParameters.ContainsKey('State')) - { - $parameters['State'] = $State - } - - $addingScopeMessage = $LocalizedData.AddingScopeMessage - Write-Verbose -Message $addingScopeMessage - - try - { - # Create a new scope with specified properties - Add-DhcpServerv4Scope @parameters -Type dhcp - - $setScopeMessage = $($LocalizedData.SetScopeMessage) -f $Name - Write-Verbose -Message $setScopeMessage - } - catch - { - New-TerminatingError -errorId DhcpServerScopeFailure -errorMessage $_.Exception.Message -errorCategory InvalidOperation - } - }# end Apply - else - { - return $false - } - } # end Ensure -eq Present - else - { - return $true - } - } # else !dhcpscope -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerScope/MSFT_xDhcpServerScope.schema.mof b/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerScope/MSFT_xDhcpServerScope.schema.mof deleted file mode 100644 index 45c66aab..00000000 --- a/lib/puppet_x/dsc_resources/xDhcpServer/DSCResources/MSFT_xDhcpServerScope/MSFT_xDhcpServerScope.schema.mof +++ /dev/null @@ -1,14 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xDhcpServerScope")] -class MSFT_xDhcpServerScope : OMI_BaseResource -{ - [Key, Description("Starting address to set for this scope")] String IPStartRange; - [Key, Description("Ending address to set for this scope")] String IPEndRange; - [Required, Description("Name of DHCP Scope")] String Name; - [Required, Description("Subnet mask for the scope specified in IP address format")] String SubnetMask; - [Write, Description("Time interval for which an IP address should be leased")] String LeaseDuration; - [Write, Description("Whether scope should be active or inactive"), ValueMap{"Active","Inactive"}, Values{"Active","Inactive"}] String State; - [Write, Description("Address family type"), ValueMap{"IPv4"}, Values{"IPv4"}] String AddressFamily; - [Write, Description("Whether scope should be set or removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Read, Description("ScopeId for the given scope")] String ScopeID; -}; - diff --git a/lib/puppet_x/dsc_resources/xDhcpServer/LICENSE b/lib/puppet_x/dsc_resources/xDhcpServer/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xDhcpServer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xDhcpServer/Misc/New-DhcpServerOptionResource.ps1 b/lib/puppet_x/dsc_resources/xDhcpServer/Misc/New-DhcpServerOptionResource.ps1 deleted file mode 100644 index 678623c5..00000000 --- a/lib/puppet_x/dsc_resources/xDhcpServer/Misc/New-DhcpServerOptionResource.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -$Properties = @{ - DnsServer = New-xDscResourceProperty -Name DnsServerIPAddress -Type String[] -Attribute Required ` - -Description 'IP address of DNS Servers' - Router = New-xDscResourceProperty -Name Router -Type String[] -Attribute Required ` - -Description 'IP address of the router/default gateway.' - DnsDomain = New-xDscResourceProperty -Name DnsDomain -Type String -Attribute Write ` - -Description 'Domain name of DNS Server' - AddressFamily = New-xDscResourceProperty -Name AddressFamily -Type String -Attribute Write ` - -ValidateSet 'IPv4' -Description 'Address family type' - ScopeID = New-xDscResourceProperty -Name ScopeID -Type String -Attribute Key ` - -Description 'ScopeId for which options are set' - Ensure = New-xDscResourceProperty -Name Ensure -Type String -Attribute Write ` - -ValidateSet 'Present','Absent' ` - -Description 'Whether option should be set or removed' -} - -New-xDscResource -Name MSFT_xDhcpServerOption -Property $Properties.Values -ModuleName xDhcpServer -FriendlyName xDhcpServerOption diff --git a/lib/puppet_x/dsc_resources/xDhcpServer/Misc/New-DhcpServerReservationResource.ps1 b/lib/puppet_x/dsc_resources/xDhcpServer/Misc/New-DhcpServerReservationResource.ps1 deleted file mode 100644 index dd0850ce..00000000 --- a/lib/puppet_x/dsc_resources/xDhcpServer/Misc/New-DhcpServerReservationResource.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -$Properties = @{ - ScopeID = New-xDscResourceProperty -Name ScopeID -Type String -Attribute Key ` - -Description 'ScopeId for which reservations are set' - IPAddress = New-xDscResourceProperty -Name IPAddress -Type String -Attribute Required ` - -Description 'IP address of the reservation for which the properties are modified' - ClientMACAddress = New-xDscResourceProperty -Name ClientMACAddress -Type String -Attribute Required ` - -Description 'Client ID to set on the reservation For Windows clients it is the MAC address' - Name = New-xDscResourceProperty -Name Name -Type String -Attribute Write ` - -Description 'Reservation name' - AddressFamily = New-xDscResourceProperty -Name AddressFamily -Type String -Attribute Write ` - -ValidateSet 'IPv4' -Description 'Address family type' - Ensure = New-xDscResourceProperty -Name Ensure -Type String -Attribute Write ` - -ValidateSet 'Present','Absent' ` - -Description 'Whether option should be set or removed' -} - -New-xDscResource -Name MSFT_xDhcpServerReservation -Property $Properties.Values -ModuleName xDhcpServer -FriendlyName xDhcpServerReservation diff --git a/lib/puppet_x/dsc_resources/xDhcpServer/Misc/New-DhcpServerScopeResource.ps1 b/lib/puppet_x/dsc_resources/xDhcpServer/Misc/New-DhcpServerScopeResource.ps1 deleted file mode 100644 index a2eadb00..00000000 --- a/lib/puppet_x/dsc_resources/xDhcpServer/Misc/New-DhcpServerScopeResource.ps1 +++ /dev/null @@ -1,24 +0,0 @@ -$Properties = @{ - ScopeID = New-xDscResourceProperty -Name ScopeID -Type String -Attribute Read ` - -Description 'ScopeId for which properties are set' - Name = New-xDscResourceProperty -Name Name -Type String -Attribute Required ` - -Description 'Name of DHCP Scope' - AddressFamily = New-xDscResourceProperty -Name AddressFamily -Type String -Attribute Write ` - -ValidateSet 'IPv4' -Description 'Address family type' - IPStartRange = New-xDscResourceProperty -Name IPStartRange -Type String -Attribute Key ` - -Description 'Starting address to set for this scope' - IPEndRange = New-xDscResourceProperty -Name IPEndRange -Type String -Attribute Key ` - -Description 'Ending address to set for this scope' - SubnetMask = New-xDscResourceProperty -Name SubnetMask -Type String -Attribute Write ` - -Description 'Subnet mask for the scope specified in IP address format' - LeaseDuration = New-xDscResourceProperty -Name LeaseDuration -Type String -Attribute Write ` - -Description 'Time interval for which an IP address should be leased' - State = New-xDscResourceProperty -Name State -Type String -Attribute Write ` - -ValidateSet 'Active','Inactive' ` - -Description 'Whether scope should be active or inactive' - Ensure = New-xDscResourceProperty -Name Ensure -Type String -Attribute Write ` - -ValidateSet 'Present','Absent' ` - -Description 'Whether scope should be set or removed' -} - -New-xDscResource -Name MSFT_xDhcpServerScope -Property $Properties.Values -ModuleName xDhcpServer -FriendlyName xDhcpServerScope diff --git a/lib/puppet_x/dsc_resources/xDhcpServer/xDhcpServer.psd1 b/lib/puppet_x/dsc_resources/xDhcpServer/xDhcpServer.psd1 deleted file mode 100644 index 47f8982a..00000000 --- a/lib/puppet_x/dsc_resources/xDhcpServer/xDhcpServer.psd1 +++ /dev/null @@ -1,63 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '1.6.0.0' - -# ID used to uniquely identify this module -GUID = '286890c9-a6c3-4605-9cd5-03c8413c8325' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module with DSC Resources for DHCP Server area' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -# CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xDhcpServer/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xDhcpServer' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = 'added xDhcpServerClass - - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - - - - - diff --git a/lib/puppet_x/dsc_resources/xDismFeature/DSCResources/MSFT_xDismFeature/MSFT_xDismFeature.psm1 b/lib/puppet_x/dsc_resources/xDismFeature/DSCResources/MSFT_xDismFeature/MSFT_xDismFeature.psm1 deleted file mode 100644 index fcca07bf..00000000 --- a/lib/puppet_x/dsc_resources/xDismFeature/DSCResources/MSFT_xDismFeature/MSFT_xDismFeature.psm1 +++ /dev/null @@ -1,135 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name - ) - - $DismFeatures = Get-DismFeatures - - if($DismFeatures."$Name" -eq $null) - { - Throw "Unknown feature!" - } - - if($DismFeatures."$Name" -eq "Enabled") - { - $returnValue = @{ - Ensure = "Present" - Name = $Name - } - } - else - { - $returnValue = @{ - Ensure = "Absent" - Name = $Name - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $Source - ) - - switch($Ensure) - { - "Present" - { - $dismParameters = @("/Online", "/Enable-Feature", "/FeatureName:$Name", "/Quiet", "/NoRestart") - - # Include sources directory if present - if ($Source) - { - Write-Verbose "Source location set: ${Source}" - - $dismParameters += "/Source:${Source}" - $dismParameters += "/LimitAccess" - } - - & dism.exe $dismParameters - } - "Absent" - { - & dism.exe /Online /Disable-Feature /FeatureName:$Name /quiet /norestart - } - } - - if(Test-Path -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending') - { - $global:DSCMachineStatus = 1 - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $false)] - [System.String] - $Source = $null - ) - - $result = ((Get-TargetResource -Name $Name).Ensure -eq $Ensure) - - $result -} - - -function Get-DismFeatures -{ - $DismGetFeatures = & dism.exe /Online /Get-Features - $DismFeatures = @{} - foreach($Line in $DismGetFeatures) - { - switch($Line.Split(":")[0].Trim()) - { - "Feature Name" - { - $FeatureName = $Line.Split(":")[1].Trim() - } - "State" - { - $DismFeatures += @{$FeatureName = $Line.Split(":")[1].Trim()} - } - } - } - - $DismFeatures -} - - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xDismFeature/DSCResources/MSFT_xDismFeature/MSFT_xDismFeature.schema.mof b/lib/puppet_x/dsc_resources/xDismFeature/DSCResources/MSFT_xDismFeature/MSFT_xDismFeature.schema.mof deleted file mode 100644 index 1e3ce0e3..00000000 --- a/lib/puppet_x/dsc_resources/xDismFeature/DSCResources/MSFT_xDismFeature/MSFT_xDismFeature.schema.mof +++ /dev/null @@ -1,7 +0,0 @@ -[ClassVersion("1.1.0.0"), FriendlyName("xDismFeature")] -class MSFT_xDismFeature : OMI_BaseResource -{ - [Write, Description("An enumerated value that describes if the feature is expected to be enabled on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Key, Description("Name of the feature.")] String Name; - [Write, Description("Optional location of Source.")] String Source; -}; diff --git a/lib/puppet_x/dsc_resources/xDismFeature/LICENSE b/lib/puppet_x/dsc_resources/xDismFeature/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xDismFeature/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xDismFeature/xDismFeature.psd1 b/lib/puppet_x/dsc_resources/xDismFeature/xDismFeature.psd1 deleted file mode 100644 index d1d99a0a..00000000 --- a/lib/puppet_x/dsc_resources/xDismFeature/xDismFeature.psd1 +++ /dev/null @@ -1,60 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '1.2.0.0' - -# ID used to uniquely identify this module -GUID = '55f4b4c2-eec6-412c-823b-9d6d549a25dc' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module with DSC Resources for Deployment Image Servicing and Management features.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xDismFeature/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xDismFeature' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* xDismFeature: Resource no longer includes the Source parameter when it is not specified -* Converted appveyor.yml to install Pester from PSGallery instead of from Chocolatey. - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - - diff --git a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/Helper.psm1 b/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/Helper.psm1 deleted file mode 100644 index e0b96b98..00000000 --- a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/Helper.psm1 +++ /dev/null @@ -1,45 +0,0 @@ -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' -RoleNotFound = Please ensure that the PowerShell module for role {0} is installed -'@ -} - -# Internal function to throw terminating error with specified errroCategory, errorId and errorMessage -function New-TerminatingError -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory)] - [String]$errorId, - - [Parameter(Mandatory)] - [String]$errorMessage, - - [Parameter(Mandatory)] - [System.Management.Automation.ErrorCategory]$errorCategory - ) - - $exception = New-Object System.InvalidOperationException $errorMessage - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - throw $errorRecord -} - -# Internal function to assert if the role specific module is installed or not -function Assert-Module -{ - [CmdletBinding()] - param - ( - [string]$moduleName = 'DnsServer' - ) - - if(! (Get-Module -Name $moduleName -ListAvailable)) - { - $errorMsg = $($LocalizedData.RoleNotFound) -f $moduleName - New-TerminatingError -errorId 'ModuleNotFound' -errorMessage $errorMsg -errorCategory ObjectNotFound - } -} diff --git a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsARecord/MSFT_xDnsARecord.psm1 b/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsARecord/MSFT_xDnsARecord.psm1 deleted file mode 100644 index 0267c935..00000000 --- a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsARecord/MSFT_xDnsARecord.psm1 +++ /dev/null @@ -1,108 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Zone, - - [parameter(Mandatory = $true)] - [System.String] - $Target, - - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present' - ) - Write-Warning -Message "DSC Resource xDnsARecord has been replaced by xDNSRecord, and will be removed in a future version" - Write-Verbose "Looking up DNS record for $Name in $Zone" - $record = Get-DnsServerResourceRecord -ZoneName $Zone -Name $Name -ErrorAction SilentlyContinue - if ($record -eq $null) { - return @{ - Name = $Name; - Zone = $Zone; - Target = $Target; - Ensure = 'Absent'; - } - } - else { - return @{ - Name = $record.HostName; - Zone = $Zone; - Target = $record.RecordData.IPv4Address.ToString(); - Ensure = 'Present'; - } - } -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Zone, - - [parameter(Mandatory = $true)] - [System.String] - $Target, - - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present' - ) - if ($Ensure -eq 'Present') { - Write-Verbose "Creating for DNS $Target in $Zone" - Add-DnsServerResourceRecordA -IPv4Address $Target -Name $Name -ZoneName $Zone - } - elseif ($Ensure -eq 'Absent') { - Write-Verbose "Removing DNS $Target in $Zone" - Remove-DnsServerResourceRecord -Name $Name -ZoneName $Zone -RRType A - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Zone, - - [parameter(Mandatory = $true)] - [System.String] - $Target, - - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present' - ) - - Write-Verbose "Testing for DNS $Name in $Zone" - $result = @(Get-TargetResource @PSBoundParameters) - if ($Ensure -ne $result.Ensure) { return $false } - elseif ($Ensure -eq 'Present' -and ($result.Target -ne $Target)) { return $false } - return $true -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsARecord/MSFT_xDnsARecord.schema.mof b/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsARecord/MSFT_xDnsARecord.schema.mof deleted file mode 100644 index 8e141c0c..00000000 --- a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsARecord/MSFT_xDnsARecord.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xDnsARecord")] -class MSFT_xDnsARecord : OMI_BaseResource -{ - [Key] string Name; - [Key] string Zone; - [Required] string Target; - [Write, Description("Should this DNS resource record be present or absent"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; - diff --git a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsRecord/MSFT_xDnsRecord.psm1 b/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsRecord/MSFT_xDnsRecord.psm1 deleted file mode 100644 index 24e1bb24..00000000 --- a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsRecord/MSFT_xDnsRecord.psm1 +++ /dev/null @@ -1,190 +0,0 @@ -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' - GettingDnsRecordMessage = Getting DNS record '{0}' ({1}) in zone '{2}'. - CreatingDnsRecordMessage = Creating DNS record '{0}' for target '{1}' in zone '{2}'. - RemovingDnsRecordMessage = Removing DNS record '{0}' for target '{1}' in zone '{2}'. - NotDesiredPropertyMessage = DNS record property '{0}' is not correct. Expected '{1}', actual '{2}' - InDesiredStateMessage = DNS record '{0}' is in the desired state. - NotInDesiredStateMessage = DNS record '{0}' is NOT in the desired state. -'@ -} - - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Zone, - - [parameter(Mandatory = $true)] - [ValidateSet("ARecord", "CName")] - [System.String] - $Type, - - [parameter(Mandatory = $true)] - [System.String] - $Target, - - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present' - ) - - Write-Verbose -Message ($LocalizedData.GettingDnsRecordMessage -f $Name, $Type, $Zone) - $record = Get-DnsServerResourceRecord -ZoneName $Zone -Name $Name -ErrorAction SilentlyContinue - - if ($record -eq $null) - { - return @{ - Name = $Name.HostName; - Zone = $Zone; - Target = $Target; - Ensure = 'Absent'; - } - } - if ($Type -eq "CName") - { - $recordData = ($record.RecordData.hostnamealias).TrimEnd('.') - } - if ($Type -eq "ARecord") - { - $recordData = $record.RecordData.IPv4address.IPAddressToString - } - - return @{ - Name = $record.HostName; - Zone = $Zone; - Target = $recordData; - Ensure = 'Present'; - } -} #end function Get-TargetResource - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Zone, - - [parameter(Mandatory = $true)] - [ValidateSet("ARecord", "CName")] - [System.String] - $Type, - - [parameter(Mandatory = $true)] - [System.String] - $Target, - - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present' - ) - - $DNSParameters = @{ Name = $Name; ZoneName = $Zone; } - - if ($Ensure -eq 'Present') - { - if ($Type -eq "ARecord") - { - $DNSParameters.Add('A',$true) - $DNSParameters.Add('IPv4Address',$target) - } - if ($Type -eq "CName") - { - $DNSParameters.Add('CName',$true) - $DNSParameters.Add('HostNameAlias',$Target) - } - Write-Verbose -Message ($LocalizedData.CreatingDnsRecordMessage -f $Type, $Target, $Zone) - Add-DnsServerResourceRecord @DNSParameters - } - elseif ($Ensure -eq 'Absent') - { - - $DNSParameters.Add('Computername','localhost') - $DNSParameters.Add('Force',$true) - - if ($Type -eq "ARecord") - { - $DNSParameters.Add('RRType','A') - } - if ($Type -eq "CName") - { - $DNSParameters.Add('RRType','CName') - } - Write-Verbose -Message ($LocalizedData.RemovingDnsRecordMessage -f $Type, $Target, $Zone) - Remove-DnsServerResourceRecord @DNSParameters - } -} #end function Set-TargetResource - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Zone, - - [parameter(Mandatory = $true)] - [ValidateSet("ARecord", "CName")] - [System.String] - $Type, - - [parameter(Mandatory = $true)] - [System.String] - $Target, - - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present' - ) - - $result = @(Get-TargetResource @PSBoundParameters) - if ($Ensure -ne $result.Ensure) - { - Write-Verbose -Message ($LocalizedData.NotDesiredPropertyMessage -f 'Ensure', $Ensure, $result.Ensure) - Write-Verbose -Message ($LocalizedData.NotInDesiredStateMessage -f $Name) - return $false - } - elseif ($Ensure -eq 'Present') - { - if ($result.Target -notcontains $Target) - { - $resultTargetString = $result.Target - if ($resultTargetString -is [System.Array]) - { - ## We have an array, create a single string for verbose output - $resultTargetString = $result.Target -join ',' - } - Write-Verbose -Message ($LocalizedData.NotDesiredPropertyMessage -f 'Target', $Target, $resultTargetString) - Write-Verbose -Message ($LocalizedData.NotInDesiredStateMessage -f $Name) - return $false - } - } - Write-Verbose -Message ($LocalizedData.InDesiredStateMessage -f $Name) - return $true -} #end function Test-TargetResource - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsRecord/MSFT_xDnsRecord.schema.mof b/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsRecord/MSFT_xDnsRecord.schema.mof deleted file mode 100644 index aef202aa..00000000 --- a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsRecord/MSFT_xDnsRecord.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xDnsRecord")] -class MSFT_xDnsRecord : OMI_BaseResource -{ - [Key] string Name; - [Key] string Zone; - [Required, ValueMap{"ARecord","CName"}, Values{"ARecord","CName"}] string Type; - [Key] string Target; - [Write, Description("Should this DNS resource record be present or absent"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; - diff --git a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerADZone/Helper.psm1 b/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerADZone/Helper.psm1 deleted file mode 100644 index e0b96b98..00000000 --- a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerADZone/Helper.psm1 +++ /dev/null @@ -1,45 +0,0 @@ -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' -RoleNotFound = Please ensure that the PowerShell module for role {0} is installed -'@ -} - -# Internal function to throw terminating error with specified errroCategory, errorId and errorMessage -function New-TerminatingError -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory)] - [String]$errorId, - - [Parameter(Mandatory)] - [String]$errorMessage, - - [Parameter(Mandatory)] - [System.Management.Automation.ErrorCategory]$errorCategory - ) - - $exception = New-Object System.InvalidOperationException $errorMessage - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - throw $errorRecord -} - -# Internal function to assert if the role specific module is installed or not -function Assert-Module -{ - [CmdletBinding()] - param - ( - [string]$moduleName = 'DnsServer' - ) - - if(! (Get-Module -Name $moduleName -ListAvailable)) - { - $errorMsg = $($LocalizedData.RoleNotFound) -f $moduleName - New-TerminatingError -errorId 'ModuleNotFound' -errorMessage $errorMsg -errorCategory ObjectNotFound - } -} diff --git a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerADZone/MSFT_xDnsServerADZone.psm1 b/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerADZone/MSFT_xDnsServerADZone.psm1 deleted file mode 100644 index 859b1671..00000000 --- a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerADZone/MSFT_xDnsServerADZone.psm1 +++ /dev/null @@ -1,221 +0,0 @@ -Import-Module $PSScriptRoot\Helper.psm1 -Verbose:$false - -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' -CheckingZoneMessage = Checking DNS server zone with name '{0}' is '{1}'... -AddingZoneMessage = Adding DNS server zone '{0}' ... -RemovingZoneMessage = Removing DNS server zone '{0}' ... - -CheckPropertyMessage = Checking DNS server zone property '{0}' ... -NotDesiredPropertyMessage = DNS server zone property '{0}' is not correct. Expected '{1}', actual '{2}' -SetPropertyMessage = DNS server zone property '{0}' is set -'@ -} - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [System.String]$Name, - - [ValidateSet('None','NonsecureAndSecure','Secure')] - [System.String]$DynamicUpdate = 'Secure', - - [Parameter(Mandatory)] - [ValidateSet('Custom','Domain','Forest','Legacy')] - [System.String]$ReplicationScope, - - [System.String]$DirectoryPartitionName, - - [System.String]$ComputerName, - - [pscredential]$Credential, - - [ValidateSet('Present','Absent')] - [System.String]$Ensure = 'Present' - ) - Assert-Module -ModuleName 'DNSServer' - Write-Verbose ($LocalizedData.CheckingZoneMessage -f $Name, $Ensure) - $cimSessionParams = @{ErrorAction = 'SilentlyContinue'} - if ($ComputerName) - { - $cimSessionParams += @{ComputerName = $ComputerName} - } - else - { - $cimSessionParams += @{ComputerName = $env:COMPUTERNAME} - } - if ($Credential) - { - $cimSessionParams += @{Credential = $Credential} - } - $cimSession = New-CimSession @cimSessionParams - $getParams = @{ - Name = $Name - CimSession = $cimSession - ErrorAction = 'SilentlyContinue' - } - $dnsServerZone = Get-DnsServerZone @getParams - $targetResource = @{ - Name = $dnsServerZone.ZoneName - DynamicUpdate = $dnsServerZone.DynamicUpdate - ReplicationScope = $dnsServerZone.ReplicationScope - DirectoryPartitionName = $dnsServerZone.DirectoryPartitionName - Ensure = if ($dnsServerZone -eq $null) { 'Absent' } else { 'Present' } - } - return $targetResource -} #end function Get-TargetResource - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [System.String]$Name, - - [ValidateSet('None','NonsecureAndSecure','Secure')] - [System.String]$DynamicUpdate = 'Secure', - - [Parameter(Mandatory)] - [ValidateSet('Custom','Domain','Forest','Legacy')] - [System.String]$ReplicationScope, - - [System.String]$DirectoryPartitionName, - - [System.String]$ComputerName, - - [pscredential]$Credential, - - [ValidateSet('Present','Absent')] - [System.String]$Ensure = 'Present' - ) - $targetResource = Get-TargetResource @PSBoundParameters - $targetResourceInCompliance = $true - if ($Ensure -eq 'Present') - { - if ($targetResource.Ensure -eq 'Present') - { - if ($targetResource.DynamicUpdate -ne $DynamicUpdate) - { - Write-Verbose ($LocalizedData.NotDesiredPropertyMessage -f 'DynamicUpdate', $DynamicUpdate, $targetResource.DynamicUpdate) - $targetResourceInCompliance = $false - } - if ($targetResource.ReplicationScope -ne $ReplicationScope) - { - Write-Verbose ($LocalizedData.NotDesiredPropertyMessage -f 'ReplicationScope', $ReplicationScope, $targetResource.ReplicationScope) - $targetResourceInCompliance = $false - } - if ($DirectoryPartitionName -and $targetResource.DirectoryPartitionName -ne $DirectoryPartitionName) - { - Write-Verbose ($LocalizedData.NotDesiredPropertyMessage -f 'DirectoryPartitionName', $DirectoryPartitionName, $targetResource.DirectoryPartitionName) - $targetResourceInCompliance = $false - } - } - else - { - # Dns zone is present and needs removing - Write-Verbose ($LocalizedData.NotDesiredPropertyMessage -f 'Ensure', 'Present', 'Absent') - $targetResourceInCompliance = $false - } - } - else - { - if ($targetResource.Ensure -eq 'Present') - { - ## Dns zone is absent and should be present - Write-Verbose ($LocalizedData.NotDesiredPropertyMessage -f 'Ensure', 'Absent', 'Present') - $targetResourceInCompliance = $false - } - } - return $targetResourceInCompliance -} #end function Test-TargetResource - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [System.String]$Name, - - [ValidateSet('None','NonsecureAndSecure','Secure')] - [System.String]$DynamicUpdate = 'Secure', - - [Parameter(Mandatory)] - [ValidateSet('Custom','Domain','Forest','Legacy')] - [System.String]$ReplicationScope, - - [System.String]$DirectoryPartitionName, - - [System.String]$ComputerName, - - [pscredential]$Credential, - - [ValidateSet('Present','Absent')] - [System.String]$Ensure = 'Present' - ) - Assert-Module -ModuleName 'DNSServer' - $targetResource = Get-TargetResource @PSBoundParameters - if ($Ensure -eq 'Present') - { - if ($targetResource.Ensure -eq 'Present') - { - ## Update the existing zone - $updateParams = @{ - Name = $targetResource.Name - CimSession = $targetResource.CimSession - } - if ($targetResource.DynamicUpdate -ne $DynamicUpdate) - { - $updateParams += @{DynamicUpdate = $DynamicUpdate} - Write-Verbose ($LocalizedData.SetPropertyMessage -f 'DynamicUpdate') - } - if ($targetResource.ReplicationScope -ne $ReplicationScope) - { - $updateParams += @{ReplicationScope = $ReplicationScope} - Write-Verbose ($LocalizedData.SetPropertyMessage -f 'ReplicationScope') - } - if ($DirectoryPartitionName -and $targetResource.DirectoryPartitionName -ne $DirectoryPartitionName) - { - $updateParams += @{DirectoryPartitionName = $DirectoryPartitionName} - Write-Verbose ($LocalizedData.SetPropertyMessage -f 'DirectoryPartitionName') - } - Set-DnsServerPrimaryZone @updateParams - } - elseif ($targetResource.Ensure -eq 'Absent') - { - ## Create the zone - Write-Verbose ($LocalizedData.AddingZoneMessage -f $targetResource.Name) - $addParams = @{ - Name = $Name - DynamicUpdate = $DynamicUpdate - ReplicationScope = $ReplicationScope - CimSession = $targetResource.CimSession - } - if ($DirectoryPartitionName) - { - $addParams += @{ - DirectoryPartitionName = $DirectoryPartitionName - } - } - Add-DnsServerPrimaryZone @addParams - } - } - elseif ($Ensure -eq 'Absent') - { - # Remove the DNS Server zone - Write-Verbose ($LocalizedData.RemovingZoneMessage -f $targetResource.Name) - Remove-DnsServerZone -Name $targetResource.Name -ComputerName $ComputerName -Force - } -} #end function Set-TargetResource diff --git a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerADZone/MSFT_xDnsServerADZone.schema.mof b/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerADZone/MSFT_xDnsServerADZone.schema.mof deleted file mode 100644 index e5f68745..00000000 --- a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerADZone/MSFT_xDnsServerADZone.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xDnsServerADZone")] -class MSFT_xDnsServerADZone : OMI_BaseResource -{ - [Key, Description("DNS Server zone name")] String Name; - [Write, Description("Dynamic zone update option"), ValueMap{"None","NonsecureAndSecure","Secure"}, Values{"None","NonsecureAndSecure","Secure"}] String DynamicUpdate; - [Required, Description("Replication scope option"), ValueMap{"Custom","Domain","Forest","Legacy"}, Values{"Custom","Domain","Forest","Legacy"}] String ReplicationScope; - [Write, Description("Directory partition name")] String DirectoryPartitionName; - [Write, Description("DNS Server name")] String ComputerName; - [Write, Description("Credential used to set zone"), EmbeddedInstance("MSFT_Credential")] String Credential; - [Write, Description("Whether the DNS zone should be available or removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; diff --git a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerForwarder/MSFT_xDnsServerForwarder.psm1 b/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerForwarder/MSFT_xDnsServerForwarder.psm1 deleted file mode 100644 index 636d6d87..00000000 --- a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerForwarder/MSFT_xDnsServerForwarder.psm1 +++ /dev/null @@ -1,69 +0,0 @@ -function Get-TargetResource -{ - [OutputType([Hashtable])] - param - ( - [Parameter(Mandatory)] - [ValidateSet('Yes')] - [string]$IsSingleInstance, - [string[]]$IPAddresses - ) - Write-Verbose 'Getting current DNS forwarders.' - [array]$currentIPs = (Get-CimInstance -Namespace root\MicrosoftDNS -ClassName microsoftdns_server).Forwarders - $targetResource = @{ - IsSingleInstance = $IsSingleInstance - IPAddresses = @() - } - if ($currentIPs) - { - $targetResource.IPAddresses = $currentIPs - } - Write-Output $targetResource -} - -function Set-TargetResource -{ - param - ( - [Parameter(Mandatory)] - [ValidateSet('Yes')] - [string]$IsSingleInstance, - [string[]]$IPAddresses - ) - if (!$IPAddresses) - { - $IPAddresses = @() - } - Write-Verbose 'Setting DNS forwarders.' - $setParams = @{ - Namespace = 'root\MicrosoftDNS' - Query = 'select * from microsoftdns_server' - Property = @{Forwarders = $IPAddresses} - } - Set-CimInstance @setParams -} - -function Test-TargetResource -{ - [OutputType([Bool])] - param - ( - [Parameter(Mandatory)] - [ValidateSet('Yes')] - [string]$IsSingleInstance, - [string[]]$IPAddresses - ) - [array]$currentIPs = (Get-TargetResource @PSBoundParameters).IPAddresses - if ($currentIPs.Count -ne $IPAddresses.Count) - { - return $false - } - foreach ($ip in $IPAddresses) - { - if ($ip -notin $currentIPs) - { - return $false - } - } - return $true -} diff --git a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerForwarder/MSFT_xDnsServerForwarder.schema.mof b/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerForwarder/MSFT_xDnsServerForwarder.schema.mof deleted file mode 100644 index 1afe74ba..00000000 --- a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerForwarder/MSFT_xDnsServerForwarder.schema.mof +++ /dev/null @@ -1,6 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("xDnsServerForwarder")] -class MSFT_xDnsServerForwarder : OMI_BaseResource -{ - [Key, Description("Specifies the resource is a single instance, the value must be 'Yes'"), ValueMap{"Yes"}, Values{"Yes"}] String IsSingleInstance; - [Write] String IPAddresses[]; -}; diff --git a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerPrimaryZone/MSFT_xDnsServerPrimaryZone.psm1 b/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerPrimaryZone/MSFT_xDnsServerPrimaryZone.psm1 deleted file mode 100644 index e6c940a1..00000000 --- a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerPrimaryZone/MSFT_xDnsServerPrimaryZone.psm1 +++ /dev/null @@ -1,164 +0,0 @@ -Import-Module $PSScriptRoot\..\Helper.psm1 -Verbose:$false - -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' -CheckingZoneMessage = Checking DNS server zone with name '{0}' is '{1}'... -AddingZoneMessage = Adding DNS server zone '{0}' ... -RemovingZoneMessage = Removing DNS server zone '{0}' ... - -CheckPropertyMessage = Checking DNS server zone property '{0}' ... -NotDesiredPropertyMessage = DNS server zone property '{0}' is not correct. Expected '{1}', actual '{2}' -SetPropertyMessage = DNS server zone property '{0}' is set -'@ -} - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [System.String]$Name, - - [ValidateNotNullOrEmpty()] - [System.String]$ZoneFile = "$Name.dns", - - [ValidateSet('None','NonsecureAndSecure')] - [System.String]$DynamicUpdate = 'None', - - [ValidateSet('Present','Absent')] - [System.String]$Ensure = 'Present' - ) - - Assert-Module -ModuleName 'DNSServer'; - Write-Verbose ($LocalizedData.CheckingZoneMessage -f $Name, $Ensure); - $dnsServerZone = Get-DnsServerZone -Name $Name -ErrorAction SilentlyContinue; - - $targetResource = @{ - Name = $dnsServerZone.Name; - ZoneFile = $dnsServerZone.ZoneFile; - DynamicUpdate = $dnsServerZone.DynamicUpdate; - Ensure = if ($dnsServerZone -eq $null) { 'Absent' } else { 'Present' }; - } - - return $targetResource; - -} #end function Get-TargetResource - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [System.String]$Name, - - [ValidateNotNullOrEmpty()] - [System.String]$ZoneFile = "$Name.dns", - - [ValidateSet('None','NonsecureAndSecure')] - [System.String]$DynamicUpdate = 'None', - - [ValidateSet('Present','Absent')] - [System.String]$Ensure = 'Present' - ) - - $targetResource = Get-TargetResource @PSBoundParameters; - $targetResourceInCompliance = $true; - - if ($Ensure -eq 'Present') - { - if ($targetResource.Ensure -eq 'Present') - { - if ($targetResource.ZoneFile -ne $ZoneFile) - { - Write-Verbose ($LocalizedData.NotDesiredPropertyMessage -f 'ZoneFile', $targetResource.ZoneFile, $ZoneFile); - $targetResourceInCompliance = $false; - } - elseif ($targetResource.DynamicUpdate -ne $DynamicUpdate) - { - Write-Verbose ($LocalizedData.NotDesiredPropertyMessage -f 'DynamicUpdate', $targetResource.DynamicUpdate, $DynamicUpdate); - $targetResourceInCompliance = $false; - } - } - else - { - # Dns zone is present and needs removing - Write-Verbose ($LocalizedData.NotDesiredPropertyMessage -f 'Ensure', 'Absent', 'Present'); - $targetResourceInCompliance = $false; - } - } - else - { - if ($targetResource.Ensure -eq 'Present') - { - ## Dns zone is absent and should be present - Write-Verbose ($LocalizedData.NotDesiredPropertyMessage -f 'Ensure', 'Absent', 'Present'); - $targetResourceInCompliance = $false; - } - } - - return $targetResourceInCompliance; - -} #end function Test-TargetResource - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [System.String]$Name, - - [ValidateNotNullOrEmpty()] - [System.String]$ZoneFile = "$Name.dns", - - [ValidateSet('None','NonsecureAndSecure')] - [System.String]$DynamicUpdate = 'None', - - [ValidateSet('Present','Absent')] - [System.String]$Ensure = 'Present' - ) - - Assert-Module -ModuleName 'DNSServer'; - - if ($Ensure -eq 'Present') { - Write-Verbose ($LocalizedData.CheckingZoneMessage -f $Name, $Ensure); - $dnsServerZone = Get-DnsServerZone -Name $Name -ErrorAction SilentlyContinue; - if ($dnsServerZone) - { - ## Update the existing zone - if ($dnsServerZone.ZoneFile -ne $ZoneFile) - { - $dnsServerZone | Set-DnsServerPrimaryZone -ZoneFile $ZoneFile; - Write-Verbose ($LocalizedData.SetPropertyMessage -f 'ZoneFile'); - } - if ($dnsServerZone.DynamicUpdate -ne $DynamicUpdate) - { - $dnsServerZone | Set-DnsServerPrimaryZone -DynamicUpdate $DynamicUpdate; - Write-Verbose ($LocalizedData.SetPropertyMessage -f 'DynamicUpdate'); - } - } - elseif (-not $dnsServerZone) - { - ## Create the zone - Write-Verbose ($LocalizedData.AddingZoneMessage -f $Name); - Add-DnsServerPrimaryZone -Name $Name -ZoneFile $ZoneFile -DynamicUpdate $DynamicUpdate; - } - } - elseif ($Ensure -eq 'Absent') - { - # Remove the DNS Server zone - Write-Verbose ($LocalizedData.RemovingZoneMessage -f $Name); - Get-DnsServerZone -Name $Name | Remove-DnsServerZone -Force; - } - -} #end function Set-TargetResource diff --git a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerPrimaryZone/MSFT_xDnsServerPrimaryZone.schema.mof b/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerPrimaryZone/MSFT_xDnsServerPrimaryZone.schema.mof deleted file mode 100644 index a7dd56bc..00000000 --- a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerPrimaryZone/MSFT_xDnsServerPrimaryZone.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xDnsServerPrimaryZone")] -class MSFT_xDnsServerPrimaryZone : OMI_BaseResource -{ - [Key, Description("DNS Server primary zone name")] String Name; - [Write, Description("DNS Server primary zone file")] String ZoneFile; - [Write, Description("Dynamic zone update option"), ValueMap{"None","NonsecureAndSecure"}, Values{"None","NonsecureAndSecure"}] String DynamicUpdate; - [Write, Description("Whether the DNS zone should be available or removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; - - diff --git a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerSecondaryZone/MSFT_xDnsServerSecondaryZone.psm1 b/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerSecondaryZone/MSFT_xDnsServerSecondaryZone.psm1 deleted file mode 100644 index c1d6ad7a..00000000 --- a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerSecondaryZone/MSFT_xDnsServerSecondaryZone.psm1 +++ /dev/null @@ -1,271 +0,0 @@ -Import-Module $PSScriptRoot\..\Helper.psm1 -Verbose:$false - -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' -CheckingZoneMessage = Checking DNS server zone with name {0} ... -TestZoneMessage = Named DNS server zone is {0} and it should be {1} -RemovingZoneMessage = Removing DNS server zone ... -DeleteZoneMessage = DNS server zone {0} is now absent - -CheckingSecondaryZoneMessage = Checking if the DNS server zone is a secondary zone ... -AlreadySecondaryZoneMessage = DNS server zone {0} is already a secondary zone -NotSecondaryZoneMessage = DNS server zone {0} is not a secondary zone but {1} zone -AddingSecondaryZoneMessage = Adding secondary DNS server zone ... -NewSecondaryZoneMessage = DNS server secondary zone {0} is now present -SetSecondaryZoneMessage = DNS server zone {0} is now a secondary zone - -CheckPropertyMessage = Checking DNS secondary server {0} ... -NotDesiredPropertyMessage = DNS server secondary zone {0} is not correct. Expected {1}, actual {2} -DesiredPropertyMessage = DNS server secondary zone {0} is correct -SetPropertyMessage = DNS server secondary zone {0} is set -'@ -} - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory)] - [String]$Name, - - [parameter(Mandatory)] - [String[]]$MasterServers - ) - -#region Input Validation - - # Check for DnsServer module/role - Assert-Module -moduleName DnsServer - -#endregion - - $dnsZone = Get-DnsServerZone -Name $Name -ErrorAction SilentlyContinue - if($dnsZone) - { - $Ensure = 'Present' - } - else - { - $Ensure = 'Absent' - } - - @{ - Name = $Name - Ensure = $Ensure - MasterServers = [string[]]$($dnsZone.MasterServers.IPAddressToString) - Type = $dnsZone.ZoneType - } -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory)] - [String]$Name, - - [parameter(Mandatory)] - [String[]]$MasterServers, - - [ValidateSet("Present","Absent")] - [String]$Ensure = 'Present' - ) - - if($PSBoundParameters.ContainsKey('Debug')){$null = $PSBoundParameters.Remove('Debug')} - Validate-ResourceProperties @PSBoundParameters -Apply - - # Restart the DNS service - Restart-Service DNS -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory)] - [String]$Name, - - [parameter(Mandatory)] - [String[]]$MasterServers, - - [ValidateSet("Present","Absent")] - [String]$Ensure = 'Present' - ) - -#region Input Validation - - # Check for DnsServer module/role - Assert-Module -moduleName DnsServer - -#endregion - - if($PSBoundParameters.ContainsKey('Debug')){$null = $PSBoundParameters.Remove('Debug')} - Validate-ResourceProperties @PSBoundParameters - -} - -#region Helper Functions -function Validate-ResourceProperties -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory)] - [String]$Name, - - [parameter(Mandatory)] - [String[]]$MasterServers, - - [ValidateSet("Present","Absent")] - [String]$Ensure = 'Present', - - [Switch]$Apply - ) - - $zoneMessage = $($LocalizedData.CheckingZoneMessage) -f $Name - Write-Verbose -Message $zoneMessage - - $dnsZone = Get-DnsServerZone -Name $Name -ErrorAction SilentlyContinue - - # Found DNS Zone - if($dnsZone) - { - $testZoneMessage = $($LocalizedData.TestZoneMessage) -f 'present', $Ensure - Write-Verbose -Message $testZoneMessage - - # If the zone should be present - if($Ensure -eq 'Present') - { - # Check if the zone is secondary - $secondaryZoneMessage = $LocalizedData.CheckingSecondaryZoneMessage - Write-Verbose -Message $secondaryZoneMessage - - # If the zone is already secondary zone - if($dnsZone.ZoneType -eq "Secondary") - { - $correctZoneMessage = $($LocalizedData.AlreadySecondaryZoneMessage) -f $Name - Write-Verbose -Message $correctZoneMessage - - # Check the master server property - $checkPropertyMessage = $($LocalizedData.CheckPropertyMessage) -f 'master servers' - Write-Verbose -Message $checkPropertyMessage - - # Compare the master server property - if((-not $dnsZone.MasterServers) -or (Compare-Object $($dnsZone.MasterServers.IPAddressToString) $MasterServers)) - { - $notDesiredPropertyMessage = $($LocalizedData.NotDesiredPropertyMessage) -f 'master servers',$MasterServers,$dnsZone.MasterServers - Write-Verbose -Message $notDesiredPropertyMessage - - if($Apply) - { - Set-DnsServerSecondaryZone -Name $Name -MasterServers $MasterServers - - $setPropertyMessage = $($LocalizedData.SetPropertyMessage) -f 'master servers' - Write-Verbose -Message $setPropertyMessage - } - else - { - return $false - } - } # end master server mismatch - else - { - $desiredPropertyMessage = $($LocalizedData.DesiredPropertyMessage) -f 'master servers' - Write-Verbose -Message $desiredPropertyMessage - if(-not $Apply) - { - return $true - } - } # end master servers match - - } # end zone is already secondary - - # If the zone is not secondary, make it so - else - { - $notCorrectZoneMessage = $($LocalizedData.NotSecondaryZoneMessage) -f $Name,$dnsZone.ZoneType - Write-Verbose -Message $notCorrectZoneMessage - - # Convert the zone to Secondary zone - if($Apply) - { - ConvertTo-DnsServerSecondaryZone -Name $Name -MasterServers $MasterServers -ZoneFile $Name -Force - - $setZoneMessage = $($LocalizedData.SetSecondaryZoneMessage) -f $Name - Write-Verbose -Message $setZoneMessage - } - else - { - return $false - } - } # end zone is not secondary - - }# end ensure -eq present - - # If zone should be absent - else - { - if($Apply) - { - $removingZoneMessage = $LocalizedData.RemovingZoneMessage - Write-Verbose -Message $removingZoneMessage - - Remove-DnsServerZone -Name $Name -Force - - $deleteZoneMessage = $($LocalizedData.DeleteZoneMessage) -f $Name - Write-Verbose -Message $deleteZoneMessage - } - else - { - return $false - } - } # end ensure -eq absent - - } # end found dns zone - - # Not found DNS Zone - else - { - $testZoneMessage = $($LocalizedData.TestZoneMessage) -f 'absent', $Ensure - Write-Verbose -Message $testZoneMessage - - if($Ensure -eq 'Present') - { - if($Apply) - { - $addingSecondaryZoneMessage = $LocalizedData.AddingSecondaryZoneMessage - Write-Verbose -Message $addingSecondaryZoneMessage - - # Add the zone and start the transfer - Add-DnsServerSecondaryZone -Name $Name -MasterServers $MasterServers -ZoneFile $Name - Start-DnsServerZoneTransfer -Name $Name -FullTransfer - - $newSecondaryZoneMessage = $($LocalizedData.NewSecondaryZoneMessage) -f $Name - Write-Verbose -Message $newSecondaryZoneMessage - } - else - { - return $false - } - } # end ensure -eq Present - else - { - if(-not $Apply) - { - return $true - } - } # end ensure -eq Absent - } -} -#endregion - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerSecondaryZone/MSFT_xDnsServerSecondaryZone.schema.mof b/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerSecondaryZone/MSFT_xDnsServerSecondaryZone.schema.mof deleted file mode 100644 index f7e6213d..00000000 --- a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerSecondaryZone/MSFT_xDnsServerSecondaryZone.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xDnsServerSecondaryZone")] -class MSFT_xDnsServerSecondaryZone : OMI_BaseResource -{ - [Key, Description("Name of the secondary zone")] String Name; - [Required, Description("IP address or DNS name of the secondary DNS servers")] String MasterServers[]; - [Write, Description("Should this resource be present or absent"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Read, Description("Type of the DNS server zone")] String Type; -}; - diff --git a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerZoneTransfer/MSFT_xDnsServerZoneTransfer.psm1 b/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerZoneTransfer/MSFT_xDnsServerZoneTransfer.psm1 deleted file mode 100644 index 35278ca0..00000000 --- a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerZoneTransfer/MSFT_xDnsServerZoneTransfer.psm1 +++ /dev/null @@ -1,232 +0,0 @@ -Import-Module $PSScriptRoot\..\Helper.psm1 -Verbose:$false - -# Allow transfer to any server use 0, to one in name tab 1, specific one 2, no transfer 3 -$XferId2Name= @('Any','Named','Specific','None') - -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' -CheckingZoneMessage = Checking the current zone transfer for DNS server zone {0} ... -DesiredZoneMessage = Current zone transfer settings for the given DNS server zone is correctly set to {0} -NotDesiredZoneMessage = DNS server zone transfer settings is not correct. Expected {0}, actual {1} -SetZoneMessage = Current zone transfer setting for DNS server zone {0} is set to {1} - -NotDesiredPropertyMessage = DNS server zone transfer secondary servers are not correct. Expected {0}, actual {1} -SettingPropertyMessage = Setting DNS server zone transfer secondary servers to {0} ... -SetPropertyMessage = DNS server zone transfer secondary servers are set -'@ -} - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory)] - [String]$Name, - - [parameter(Mandatory)] - [ValidateSet("None","Any","Named","Specific")] - [String]$Type - ) - -#region Input Validation - - # Check for DnsServer module/role - Assert-Module -moduleName DnsServer - -#endregion - - $currentZone = Get-CimInstance ` - -ClassName MicrosoftDNS_Zone ` - -Namespace root\MicrosoftDNS ` - -Verbose:$false | Where-Object {$_.Name -eq $Name} - - @{ - Name = $Name - Type = $XferId2Name[$currentZone.SecureSecondaries] - SecondaryServer = $currentZone.SecondaryServers - } -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory)] - [String]$Name, - - [parameter(Mandatory)] - [ValidateSet("None","Any","Named","Specific")] - [String]$Type, - - [String[]]$SecondaryServer - ) - - if($PSBoundParameters.ContainsKey('Debug')) - { - $null = $PSBoundParameters.Remove('Debug') - } - Validate-ResourceProperties @PSBoundParameters -Apply - - # Restart the DNS service - Restart-Service -Name DNS -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory)] - [String]$Name, - - [parameter(Mandatory)] - [ValidateSet("None","Any","Named","Specific")] - [String]$Type, - - [String[]]$SecondaryServer - ) - -#region Input Validation - - # Check for DnsServer module/role - Assert-Module -moduleName DnsServer - -#endregion - - if($PSBoundParameters.ContainsKey('Debug')) - { - $null = $PSBoundParameters.Remove('Debug') - } - Validate-ResourceProperties @PSBoundParameters -} - -function Validate-ResourceProperties -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory)] - [String]$Name, - - [parameter(Mandatory)] - [ValidateSet("None","Any","Named","Specific")] - [String]$Type, - - [String[]]$SecondaryServer, - - [Switch]$Apply - ) - - $checkZoneMessage = $($LocalizedData.CheckingZoneMessage) ` - -f $Name - Write-Verbose -Message $checkZoneMessage - - # Get the current value of transfer zone - $currentZone = Get-CimInstance ` - -ClassName MicrosoftDNS_Zone ` - -Namespace root\MicrosoftDNS ` - -Verbose:$false | Where-Object {$_.Name -eq $Name} - $currentZoneTransfer = $currentZone.SecureSecondaries - - # Hashtable with 2 keys: SecureSecondaries,SecondaryServers - $Arguments = @{} - - switch ($Type) - { - 'None' - { - $Arguments['SecureSecondaries'] = 3 - } - 'Any' - { - $Arguments['SecureSecondaries'] = 0 - } - 'Named' - { - $Arguments['SecureSecondaries'] = 1 - } - 'Specific' - { - $Arguments['SecureSecondaries'] = 2 - $Arguments['SecondaryServers']=$SecondaryServer - } - } - - # Check the current value against expected value - if($currentZoneTransfer -eq $Arguments.SecureSecondaries) - { - $desiredZoneMessage = ($LocalizedData.DesiredZoneMessage) ` - -f $XferId2Name[$currentZoneTransfer] - Write-Verbose -Message $desiredZoneMessage - - # If the Type is specific, and SecondaryServer doesn't match - if(($currentZoneTransfer -eq 2) ` - -and (Compare-Object $currentZone.SecondaryServers $SecondaryServer)) - { - $notDesiredPropertyMessage = ($LocalizedData.NotDesiredPropertyMessage) ` - -f ($SecondaryServer -join ','),($currentZone.SecondaryServers -join ',') - Write-Verbose -Message $notDesiredPropertyMessage - - # Set the SecondaryServer property - if($Apply) - { - $settingPropertyMessage = ($LocalizedData.SettingPropertyMessage) ` - -f ($SecondaryServer -join ',') - Write-Verbose -Message $settingPropertyMessage - - $null = Invoke-CimMethod ` - -InputObject $currentZone ` - -MethodName ResetSecondaries ` - -Arguments $Arguments ` - -Verbose:$false - - $setPropertyMessage = $LocalizedData.SetPropertyMessage - Write-Verbose -Message $setPropertyMessage - } - else - { - return $false - } - } # end SecondaryServer match - - if(-not $Apply) - { - return $true - } - } # end currentZoneTransfer -eq ExpectedZoneTransfer - else - { - $notDesiredZoneMessage = $($LocalizedData.NotDesiredZoneMessage) ` - -f $XferId2Name[$Arguments.SecureSecondaries], ` - $XferId2Name[$currentZoneTransfer] - Write-Verbose -Message $notDesiredZoneMessage - - if($Apply) - { - $null = Invoke-CimMethod ` - -InputObject $currentZone ` - -MethodName ResetSecondaries ` - -Arguments $Arguments ` - -Verbose:$false - - $setZoneMessage = $($LocalizedData.SetZoneMessage) ` - -f $Name,$XferId2Name[$Arguments.SecureSecondaries] - Write-Verbose -Message $setZoneMessage - } - else - { - return $false - } - } # end currentZoneTransfer -ne ExpectedZoneTransfer -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerZoneTransfer/MSFT_xDnsServerZoneTransfer.schema.mof b/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerZoneTransfer/MSFT_xDnsServerZoneTransfer.schema.mof deleted file mode 100644 index 64a53ddf..00000000 --- a/lib/puppet_x/dsc_resources/xDnsServer/DSCResources/MSFT_xDnsServerZoneTransfer/MSFT_xDnsServerZoneTransfer.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xDnsServerZoneTransfer")] -class MSFT_xDnsServerZoneTransfer : OMI_BaseResource -{ - [Key, Description("Name of the DNS zone")] String Name; - [Required, Description("Type of transfer allowed"), ValueMap{"None","Any","Named","Specific"}, Values{"None","Any","Named","Specific"}] String Type; - [Write, Description("IP address or DNS name of DNS servers where zone information can be transfered")] String SecondaryServer[]; -}; - diff --git a/lib/puppet_x/dsc_resources/xDnsServer/LICENSE b/lib/puppet_x/dsc_resources/xDnsServer/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xDnsServer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xDnsServer/Misc/New-DnsServerSecondaryZone.ps1 b/lib/puppet_x/dsc_resources/xDnsServer/Misc/New-DnsServerSecondaryZone.ps1 deleted file mode 100644 index 3ba12e24..00000000 --- a/lib/puppet_x/dsc_resources/xDnsServer/Misc/New-DnsServerSecondaryZone.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$Properties = @{ - Name = New-xDscResourceProperty -Name Name -Type String -Attribute Key ` - -Description 'Name of the secondary zone' - DnsServer = New-xDscResourceProperty -Name MasterServerIPAddress -Type String[] -Attribute Required ` - -Description 'IP address of secondary DNS servers' - Ensure = New-xDscResourceProperty -Name Ensure -Type String -Attribute Write -ValidateSet 'Present','Absent' ` - -Description 'Should this resource be present or absent' - - } -New-xDscResource -Name MSFT_xDnsServerSecondaryZone -Property $Properties.Values -Path . -ModuleName xDnsServer -FriendlyName xDnsServerSecondaryZone -Force diff --git a/lib/puppet_x/dsc_resources/xDnsServer/Misc/New-DnsServerZoneTransfer.ps1 b/lib/puppet_x/dsc_resources/xDnsServer/Misc/New-DnsServerZoneTransfer.ps1 deleted file mode 100644 index df45e3c6..00000000 --- a/lib/puppet_x/dsc_resources/xDnsServer/Misc/New-DnsServerZoneTransfer.ps1 +++ /dev/null @@ -1,12 +0,0 @@ -$Properties = @{ - Name = New-xDscResourceProperty -Name Name -Type String -Attribute Key ` - -Description 'Name of the secondary zone' - Type = New-xDscResourceProperty -Name Type -Type String -Attribute Required -ValidateSet 'Any', 'Named', 'Specific' ` - -Description 'Type of transfer allowed' - SecondaryServer = New-xDscResourceProperty -Name SecondaryServerIPAddress -Type String[] -Attribute Write ` - -Description 'IP address of DNS servers where zone information can be sent' - Ensure = New-xDscResourceProperty -Name Ensure -Type String -Attribute Write -ValidateSet 'Present','Absent' ` - -Description 'Should this resource be present or absent' - - } -New-xDscResource -Name MSFT_xDnsServerZoneTransfer -Property $Properties.Values -Path . -ModuleName xDnsServer -FriendlyName xDnsServerZoneTransfer -Force diff --git a/lib/puppet_x/dsc_resources/xDnsServer/xDnsServer.psd1 b/lib/puppet_x/dsc_resources/xDnsServer/xDnsServer.psd1 deleted file mode 100644 index 50d6c6ae..00000000 --- a/lib/puppet_x/dsc_resources/xDnsServer/xDnsServer.psd1 +++ /dev/null @@ -1,62 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '1.8.0.0' - -# ID used to uniquely identify this module -GUID = '5f70e6a1-f1b2-4ba0-8276-8967d43a7ec2' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module with DSC Resources for DNS Server area' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -# CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xDnsServer/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xDnsServer' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* Converted AppVeyor.yml to pull Pester from PSGallery instead of Chocolatey -* Fixed bug in xDnsServerADZone causing Get-TargetResource to fail with an extra property. - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchActiveSyncVirtualDirectory/MSFT_xExchActiveSyncVirtualDirectory.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchActiveSyncVirtualDirectory/MSFT_xExchActiveSyncVirtualDirectory.psm1 deleted file mode 100644 index ea00d037..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchActiveSyncVirtualDirectory/MSFT_xExchActiveSyncVirtualDirectory.psm1 +++ /dev/null @@ -1,663 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $AutoCertBasedAuth = $false, - - [System.String] - $AutoCertBasedAuthThumbprint, - - [System.String[]] - $AutoCertBasedAuthHttpsBindings = @("0.0.0.0:443", "127.0.0.1:443"), - - [System.Boolean] - $BasicAuthEnabled, - - [ValidateSet("Ignore", "Accepted", "Required")] - [System.String] - $ClientCertAuth, - - [System.Boolean] - $CompressionEnabled, - - [System.String] - $DomainController, - - [System.String[]] - $ExternalAuthenticationMethods, - - [System.String] - $ExternalUrl, - - [System.String[]] - $InternalAuthenticationMethods, - - [System.String] - $InternalUrl, - - [System.Boolean] - $WindowsAuthEnabled - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad 'Get-ActiveSyncVirtualDirectory' -VerbosePreference $VerbosePreference - - $easVdir = Get-ActiveSyncVirtualDirectoryInternal @PSBoundParameters - - if ($null -ne $easVdir) - { - $returnValue = @{ - Identity = $Identity - InternalUrl = $easVdir.InternalUrl.AbsoluteUri - ExternalUrl = $easVdir.ExternalUrl.AbsoluteUri - BasicAuthEnabled = $easVdir.BasicAuthEnabled - WindowsAuthEnabled = $easVdir.WindowsAuthEnabled - CompressionEnabled = $easVdir.CompressionEnabled - ClientCertAuth = $easVdir.ClientCertAuth - } - } - - $returnValue -} - -function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "")] - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $AutoCertBasedAuth = $false, - - [System.String] - $AutoCertBasedAuthThumbprint, - - [System.String[]] - $AutoCertBasedAuthHttpsBindings = @("0.0.0.0:443", "127.0.0.1:443"), - - [System.Boolean] - $BasicAuthEnabled, - - [ValidateSet("Ignore", "Accepted", "Required")] - [System.String] - $ClientCertAuth, - - [System.Boolean] - $CompressionEnabled, - - [System.String] - $DomainController, - - [System.String[]] - $ExternalAuthenticationMethods, - - [System.String] - $ExternalUrl, - - [System.String[]] - $InternalAuthenticationMethods, - - [System.String] - $InternalUrl, - - [System.Boolean] - $WindowsAuthEnabled - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad 'Set-ActiveSyncVirtualDirectory' -VerbosePreference $VerbosePreference - - #Ensure an empty string is $null and not a string - SetEmptyStringParamsToNull -PSBoundParametersIn $PSBoundParameters - - #Remove Credential and AllowServiceRestart because those parameters do not exist on Set-ActiveSyncVirtualDirectory - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'Credential','AllowServiceRestart','AutoCertBasedAuth','AutoCertBasedAuthThumbprint','AutoCertBasedAuthHttpsBindings' - - #Configure everything but CBA - Set-ActiveSyncVirtualDirectory @PSBoundParameters - - if ($AutoCertBasedAuth) #Need to configure CBA - { - Test-PreReqsForCertBasedAuth - - if (-not ([string]::IsNullOrEmpty($AutoCertBasedAuthThumbprint))) - { - Enable-CertBasedAuth -AutoCertBasedAuthThumbprint $AutoCertBasedAuthThumbprint -AutoCertBasedAuthHttpsBindings $AutoCertBasedAuthHttpsBindings - } - else - { - throw "AutoCertBasedAuthThumbprint must be specified when AutoCertBasedAuth is set to `$true" - } - - if($AllowServiceRestart) #Need to restart all of IIS for auth settings to stick - { - Write-Verbose "Restarting IIS" - - iisreset /noforce /timeout:300 - } - else - { - Write-Warning "The configuration will not take effect until 'IISReset /noforce' is run." - } - } - - #Only bounce the app pool if we didn't already restart IIS for CBA - if (-not $AutoCertBasedAuth) - { - if($AllowServiceRestart) - { - Write-Verbose "Recycling MSExchangeSyncAppPool" - - RestartAppPoolIfExists -Name MSExchangeSyncAppPool - } - else - { - Write-Warning "The configuration will not take effect until MSExchangeSyncAppPool is manually recycled." - } - } -} - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $AutoCertBasedAuth = $false, - - [System.String] - $AutoCertBasedAuthThumbprint, - - [System.String[]] - $AutoCertBasedAuthHttpsBindings = @("0.0.0.0:443", "127.0.0.1:443"), - - [System.Boolean] - $BasicAuthEnabled, - - [ValidateSet("Ignore", "Accepted", "Required")] - [System.String] - $ClientCertAuth, - - [System.Boolean] - $CompressionEnabled, - - [System.String] - $DomainController, - - [System.String[]] - $ExternalAuthenticationMethods, - - [System.String] - $ExternalUrl, - - [System.String[]] - $InternalAuthenticationMethods, - - [System.String] - $InternalUrl, - - [System.Boolean] - $WindowsAuthEnabled - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad 'Get-ActiveSyncVirtualDirectory' -VerbosePreference $VerbosePreference - - #Ensure an empty string is $null and not a string - SetEmptyStringParamsToNull -PSBoundParametersIn $PSBoundParameters - - $easVdir = Get-ActiveSyncVirtualDirectoryInternal @PSBoundParameters - - if ($null -eq $easVdir) - { - return $false - } - else - { - if (-not (VerifySetting -Name "InternalUrl" -Type "String" -ExpectedValue $InternalUrl -ActualValue $easVdir.InternalUrl.AbsoluteUri -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (-not (VerifySetting -Name "ExternalUrl" -Type "String" -ExpectedValue $ExternalUrl -ActualValue $easVdir.ExternalUrl.AbsoluteUri -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (-not (VerifySetting -Name "BasicAuthEnabled" -Type "Boolean" -ExpectedValue $BasicAuthEnabled -ActualValue $easVdir.BasicAuthEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (-not (VerifySetting -Name "WindowsAuthEnabled" -Type "Boolean" -ExpectedValue $WindowsAuthEnabled -ActualValue $easVdir.WindowsAuthEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (-not (VerifySetting -Name "CompressionEnabled" -Type "Boolean" -ExpectedValue $CompressionEnabled -ActualValue $easVdir.CompressionEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (-not (VerifySetting -Name "ClientCertAuth" -Type "String" -ExpectedValue $ClientCertAuth -ActualValue $easVdir.ClientCertAuth -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (-not (VerifySetting -Name "ExternalAuthenticationMethods" -Type "Array" -ExpectedValue $ExternalAuthenticationMethods -ActualValue $easVdir.ExternalAuthenticationMethods -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (-not (VerifySetting -Name "InternalAuthenticationMethods" -Type "Array" -ExpectedValue $InternalAuthenticationMethods -ActualValue $easVdir.InternalAuthenticationMethods -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if ($AutoCertBasedAuth) - { - Test-PreReqsForCertBasedAuth - - if ([string]::IsNullOrEmpty($AutoCertBasedAuthThumbprint)) - { - ReportBadSetting -SettingName "AutoCertBasedAuthThumbprint" -ExpectedValue "Not null or empty" -ActualValue "" -VerbosePreference $VerbosePreference - return $false - } - elseif ($null -eq $AutoCertBasedAuthHttpsBindings -or $AutoCertBasedAuthHttpsBindings.Count -eq 0) - { - ReportBadSetting -SettingName "AutoCertBasedAuthHttpsBindings" -ExpectedValue "Not null or empty" -ActualValue "" -VerbosePreference $VerbosePreference - return $false - } - elseif ((Test-CertBasedAuth -AutoCertBasedAuthThumbprint $AutoCertBasedAuthThumbprint -AutoCertBasedAuthHttpsBindings $AutoCertBasedAuthHttpsBindings) -eq $false) - { - ReportBadSetting -SettingName "TestCertBasedAuth" -ExpectedValue $true -ActualValue $false -VerbosePreference $VerbosePreference - return $false - } - } - } - - #If the code got to this point, all conditions are true - return $true -} - -function Get-ActiveSyncVirtualDirectoryInternal -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $AutoCertBasedAuth = $false, - - [System.String] - $AutoCertBasedAuthThumbprint, - - [System.String[]] - $AutoCertBasedAuthHttpsBindings = @("0.0.0.0:443", "127.0.0.1:443"), - - [System.Boolean] - $BasicAuthEnabled, - - [ValidateSet("Ignore", "Accepted", "Required")] - [System.String] - $ClientCertAuth, - - [System.Boolean] - $CompressionEnabled, - - [System.String] - $DomainController, - - [System.String[]] - $ExternalAuthenticationMethods, - - [System.String] - $ExternalUrl, - - [System.String[]] - $InternalAuthenticationMethods, - - [System.String] - $InternalUrl, - - [System.Boolean] - $WindowsAuthEnabled - ) - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - return (Get-ActiveSyncVirtualDirectory @PSBoundParameters) -} - -function Enable-CertBasedAuth -{ - param - ( - [System.String] - $AutoCertBasedAuthThumbprint, - - [System.String[]] - $AutoCertBasedAuthHttpsBindings = @("0.0.0.0:443", "127.0.0.1:443") - ) - - $appCmdExe = "$($env:SystemRoot)\System32\inetsrv\appcmd.exe" - - #Enable cert auth in IIS, and require SSL on the AS vdir - $output = &$appCmdExe set config -section:system.webServer/security/authentication/clientCertificateMappingAuthentication /enabled:"True" /commit:apphost - Write-Verbose "$output" - - $output = &$appCmdExe set config "Default Web Site" -section:system.webServer/security/authentication/clientCertificateMappingAuthentication /enabled:"True" /commit:apphost - Write-Verbose "$output" - - $output = &$appCmdExe set config "Default Web Site/Microsoft-Server-ActiveSync" /section:access /sslFlags:"Ssl, SslNegotiateCert, SslRequireCert, Ssl128" /commit:apphost - Write-Verbose "$output" - - $output = &$appCmdExe set config "Default Web Site/Microsoft-Server-ActiveSync" -section:system.webServer/security/authentication/clientCertificateMappingAuthentication /enabled:"True" /commit:apphost - Write-Verbose "$output" - - #Set DSMapperUsage to enabled on all the required SSL bindings - $appId = "{4dc3e181-e14b-4a21-b022-59fc669b0914}" #The appId of all IIS applications - - foreach ($binding in $AutoCertBasedAuthHttpsBindings) - { - Enable-DSMapperUsage -IpPortCombo $binding -CertThumbprint $AutoCertBasedAuthThumbprint -AppId $appId - } -} - -function Test-CertBasedAuth -{ - param - ( - [System.String] - $AutoCertBasedAuthThumbprint, - - [System.String[]] - $AutoCertBasedAuthHttpsBindings = @("0.0.0.0:443", "127.0.0.1:443") - ) - - $appCmdExe = "$($env:SystemRoot)\System32\inetsrv\appcmd.exe" - - $serverWideClientCertMappingAuth = &$appCmdExe list config -section:system.webServer/security/authentication/clientCertificateMappingAuthentication - - if (-not (Test-AppCmdOutputContainsString -AppCmdOutput $serverWideClientCertMappingAuth -SearchString "clientCertificateMappingAuthentication enabled=`"true`"")) - { - return $false - } - - $clientCertMappingAuth = &$appCmdExe list config "Default Web Site" -section:system.webServer/security/authentication/clientCertificateMappingAuthentication - - if (-not (Test-AppCmdOutputContainsString -AppCmdOutput $clientCertMappingAuth -SearchString "clientCertificateMappingAuthentication enabled=`"true`"")) - { - return $false - } - - $asClientCertMappingAuth = &$appCmdExe list config "Default Web Site/Microsoft-Server-ActiveSync" -section:system.webServer/security/authentication/clientCertificateMappingAuthentication - - if (-not (Test-AppCmdOutputContainsString -appCmdOutput $asClientCertMappingAuth -searchString "clientCertificateMappingAuthentication enabled=`"true`"")) - { - return $false - } - - $sslFlags = &$appCmdExe list config "Default Web Site/Microsoft-Server-ActiveSync" /section:access - - if (-not (Test-AppCmdOutputContainsString -appCmdOutput $sslFlags -searchString "access sslFlags=`"Ssl, SslNegotiateCert, SslRequireCert, Ssl128`"")) - { - return $false - } - - $netshOutput = netsh http show sslcert - - foreach ($binding in $AutoCertBasedAuthHttpsBindings) - { - if (-not (Test-NetshSslCertSetting -IpPort $binding -NetshSslCertOutput $netshOutput -SettingName "DS Mapper Usage" -SettingValue "Enabled")) - { - return $false - } - - if (-not (Test-NetshSslCertSetting -IpPort $binding -NetshSslCertOutput $netshOutput -SettingName "Certificate Hash" -SettingValue $AutoCertBasedAuthThumbprint)) - { - return $false - } - - if (-not (Test-NetshSslCertSetting -IpPort $binding -NetshSslCertOutput $netshOutput -SettingName "Certificate Store Name" -SettingValue "MY")) - { - return $false - } - } - - return $true -} - -function Test-IsSslBinding -{ - param - ( - $NetshOutput - ) - - if ($null -ne $NetshOutput -and $NetshOutput.GetType().Name -eq "Object[]") - { - for ($i = 0; $i -lt $NetshOutput.Count; $i++) - { - if ($NetshOutput[$i].Contains("IP:port")) - { - return $true - } - } - } - - return $false -} - -function Enable-DSMapperUsage -{ - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $IpPortCombo, - - [Parameter(Mandatory = $true)] - [System.String] - $CertThumbprint, - - [Parameter(Mandatory = $true)] - [System.String] - $AppId - ) - #See if a binding already exists, and if so, delete it - $bindingOutput = netsh http show sslcert ipport=$($IpPortCombo) - - if (Test-IsSslBinding $bindingOutput) - { - $output = netsh http delete sslcert ipport=$($IpPortCombo) - Write-Verbose "$output" - } - - #Add the binding back with new settings - $output = netsh http add sslcert ipport=$($IpPortCombo) certhash=$($CertThumbprint) appid=$($AppId) dsmapperusage=enable certstorename=MY - Write-Verbose "$output" -} - -function Test-AppCmdOutputContainsString -{ - param - ( - $AppCmdOutput, - - [Parameter(Mandatory = $true)] - [System.String] - $SearchString - ) - - if ($null -ne $AppCmdOutput -and $AppCmdOutput.GetType().Name -eq "Object[]") - { - foreach ($line in $AppCmdOutput) - { - if ($line.ToLower().Contains($SearchString.ToLower())) - { - return $true - } - } - } - - return $false -} - -function Test-NetshSslCertSetting -{ - param - ( - $NetshSslCertOutput, - - [Parameter(Mandatory = $true)] - [System.String] - $IpPort, - - [Parameter(Mandatory = $true)] - [System.String] - $SettingName, - - [Parameter(Mandatory = $true)] - [System.String] - $SettingValue - ) - - $SettingName = $SettingName.ToLower() - $SettingValue = $SettingValue.ToLower() - - if ($null -ne $NetshSslCertOutput -and $NetshSslCertOutput.GetType().Name -eq "Object[]") - { - $foundSetting = $false - for ($i = 0; $i -lt $NetshSslCertOutput.Count -and -not $foundSetting; $i++) - { - if ($NetshSslCertOutput[$i].ToLower().Contains("ip:port") -and $NetshSslCertOutput[$i].Contains($IpPort)) - { - $i++ - - while (-not $NetshSslCertOutput[$i].ToLower().Contains("ip:port") -and -not $foundSetting) - { - if ($NetshSslCertOutput[$i].ToLower().Contains($SettingName)) - { - $foundSetting = $true - - if ($NetshSslCertOutput[$i].ToLower().Contains($SettingValue)) - { - return $true - } - } - - $i++ - } - } - } - } - - return $false -} - -#Ensures that required uto Certification Based Authentication prereqs are installed -function Test-PreReqsForCertBasedAuth -{ - $hasAllPreReqs = $true - - $webClientAuth = Get-WindowsFeature Web-Client-Auth - $webCertAuth = Get-WindowsFeature Web-Cert-Auth - - if ($webClientAuth.InstallState -ne "Installed") - { - $hasAllPreReqs = $false - - Write-Error "The Web-Client-Auth feature needs to be installed before the Auto Certification Based Authentication feature can be used" - } - - if ($webCertAuth.InstallState -ne "Installed") - { - $hasAllPreReqs = $false - - Write-Error "The Web-Cert-Auth feature needs to be installed before the Auto Certification Based Authentication feature can be used" - } - - if ($hasAllPreReqs -eq $false) - { - throw "Required Windows features need to be installed before the Auto Certification Based Authentication feature can be used" - } -} - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchActiveSyncVirtualDirectory/MSFT_xExchActiveSyncVirtualDirectory.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchActiveSyncVirtualDirectory/MSFT_xExchActiveSyncVirtualDirectory.schema.mof deleted file mode 100644 index a2ee0daa..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchActiveSyncVirtualDirectory/MSFT_xExchActiveSyncVirtualDirectory.schema.mof +++ /dev/null @@ -1,25 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchActiveSyncVirtualDirectory")] -class MSFT_xExchActiveSyncVirtualdirectory : OMI_BaseResource -{ - [Key] String Identity; //The Identity of the ActiveSync Virtual Directory - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - [Write] Boolean AllowServiceRestart; //Whether it is OK to recycle the app pool, or restart IIS after making changes. Defaults to $true. - [Write] Boolean AutoCertBasedAuth; //Automates the IIS configuration portion of certificate based authentication. Only works against the Default Web Site. Does not configure ClientCertAuth parameter, which must be specified separately. Does not install ‘Client Certificate Mapping Authentication’ or ‘IIS Client Certificate Mapping Authentication’ roles of IIS, which also must be configured separately. - [Write] String AutoCertBasedAuthThumbprint; //The thumbprint of the in use Exchange certificate for IIS - [Write] String AutoCertBasedAuthHttpsBindings[]; //The (IP:PORT)'s of the HTTPS bindings on the Default Web Site. Defaults to "0.0.0.0:443","127.0.0.1:443" - - //Remaining properties correspond directly to Set-ActiveSyncVirtualDirectory parameters - //http://technet.microsoft.com/en-us/library/bb123679(v=exchg.150).aspx - [Write] Boolean BasicAuthEnabled; - [Write, ValueMap{"Ignore","Accepted","Required"}, Values{"Ignore","Accepted","Required"}] String ClientCertAuth; - [Write] Boolean CompressionEnabled; - [Write] String DomainController; - [Write] String ExternalAuthenticationMethods[]; - [Write] String ExternalUrl; - [Write] String InternalAuthenticationMethods[]; - [Write] String InternalUrl; - [Write] Boolean WindowsAuthEnabled; -}; - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAntiMalwareScanning/MSFT_xExchAntiMalwareScanning.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAntiMalwareScanning/MSFT_xExchAntiMalwareScanning.psm1 deleted file mode 100644 index 1f764f3b..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAntiMalwareScanning/MSFT_xExchAntiMalwareScanning.psm1 +++ /dev/null @@ -1,145 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.Boolean] - $Enabled, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Enabled" = $Enabled} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad 'Get-TransportAgent' -VerbosePreference $VerbosePreference - - $agent = Get-TransportAgent -Identity "Malware Agent" - - if ($null -ne $agent) - { - $returnValue = @{ - Enabled = $agent.Enabled - } - } - - $returnValue -} - -function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.Boolean] - $Enabled, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Enabled" = $Enabled} -VerbosePreference $VerbosePreference - - $scriptsRoot = Join-Path -Path ((Get-ItemProperty HKLM:\SOFTWARE\Microsoft\ExchangeServer\v15\Setup).MsiInstallPath) -ChildPath "Scripts" - - - if ($Enabled -eq $true) - { - $scriptPath = Join-Path -Path "$($scriptsRoot)" -ChildPath "Enable-AntimalwareScanning.ps1" - } - else - { - $scriptPath = Join-Path -Path "$($scriptsRoot)" -ChildPath "Disable-AntimalwareScanning.ps1" - } - - #Override Write-Host, as it is used by the target scripts, and causes a DSC error since the session is not interactive - New-Alias Write-Host Write-Verbose - - if($AllowServiceRestart -eq $true) - { - . $scriptPath -ForceRestart - } - else - { - . $scriptPath - - Write-Warning "The configuration will not take effect until the MSExchangeTransport service is manually restarted." - } - - Remove-Item Alias:Write-Host -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.Boolean] - $Enabled, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Enabled" = $Enabled} -VerbosePreference $VerbosePreference - - $agentStatus = Get-TargetResource @PSBoundParameters - - if ($null -eq $agentStatus) - { - return $false - } - else - { - if (!(VerifySetting -Name "Enabled" -Type "Boolean" -ExpectedValue $Enabled -ActualValue $agentStatus.Enabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - } - - #If the code made it this for all properties are in a desired state - return $true -} - -Export-ModuleMember -Function *-TargetResource - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAntiMalwareScanning/MSFT_xExchAntiMalwareScanning.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAntiMalwareScanning/MSFT_xExchAntiMalwareScanning.schema.mof deleted file mode 100644 index 5cf64ef2..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAntiMalwareScanning/MSFT_xExchAntiMalwareScanning.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchAntiMalwareScanning")] -class MSFT_xExchAntiMalwareScanning : OMI_BaseResource -{ - [Key, Description("Whether Exchange Anti-malware scanning should be Enabled")] Boolean Enabled; - [Required, Description("Credentials used to establish a remote Powershell session to Exchange"), EmbeddedInstance("MSFT_Credential")] String Credential; - [Write, Description("Whether the Transport services should be automatically restarted after a status change")] Boolean AllowServiceRestart; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAutoMountPoint/MSFT_xExchAutoMountPoint.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAutoMountPoint/MSFT_xExchAutoMountPoint.psm1 deleted file mode 100644 index 28b239dd..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAutoMountPoint/MSFT_xExchAutoMountPoint.psm1 +++ /dev/null @@ -1,918 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.String] - $AutoDagDatabasesRootFolderPath, - - [parameter(Mandatory = $true)] - [System.String] - $AutoDagVolumesRootFolderPath, - - [parameter(Mandatory = $true)] - [System.String[]] - $DiskToDBMap, - - [parameter(Mandatory = $true)] - [System.UInt32] - $SpareVolumeCount, - - [System.Boolean] - $EnsureExchangeVolumeMountPointIsLast = $false, - - [System.Boolean] - $CreateSubfolders = $false, - - [ValidateSet("NTFS","REFS")] - [System.String] - $FileSystem = "NTFS", - - [System.String] - $MinDiskSize = "", - - [ValidateSet("MBR","GPT")] - [System.String] - $PartitioningScheme = "GPT", - - [System.String] - $UnitSize = "64K", - - [System.String] - $VolumePrefix = "EXVOL" - ) - - #Load helper modules - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeDiskPart.psm1" -Verbose:0 - - LogFunctionEntry -VerbosePreference $VerbosePreference - - GetDiskInfo - - $dbMap = GetDiskToDBMap -AutoDagDatabasesRootFolderPath $AutoDagDatabasesRootFolderPath - - $returnValue = @{ - Identity = $Identity - DiskToDBMap = $dbMap - SpareVolumeCount = $SpareVolumeCount - AutoDagDatabasesRootFolderPath = $AutoDagDatabasesRootFolderPath - AutoDagVolumesRootFolderPath = $AutoDagVolumesRootFolderPath - VolumePrefix = $VolumePrefix - MinDiskSize = $MinDiskSize - UnitSize = $UnitSize - PartitioningScheme = $PartitioningScheme - FileSystem = $FileSystem - } - - $returnValue -} - -function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.String] - $AutoDagDatabasesRootFolderPath, - - [parameter(Mandatory = $true)] - [System.String] - $AutoDagVolumesRootFolderPath, - - [parameter(Mandatory = $true)] - [System.String[]] - $DiskToDBMap, - - [parameter(Mandatory = $true)] - [System.UInt32] - $SpareVolumeCount, - - [System.Boolean] - $EnsureExchangeVolumeMountPointIsLast = $false, - - [System.Boolean] - $CreateSubfolders = $false, - - [ValidateSet("NTFS","REFS")] - [System.String] - $FileSystem = "NTFS", - - [System.String] - $MinDiskSize = "", - - [ValidateSet("MBR","GPT")] - [System.String] - $PartitioningScheme = "GPT", - - [System.String] - $UnitSize = "64K", - - [System.String] - $VolumePrefix = "EXVOL" - ) - - #Load helper modules - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeDiskPart.psm1" -Verbose:0 - - LogFunctionEntry -VerbosePreference $VerbosePreference - - #First see if we need to assign any disks to ExVol's - GetDiskInfo - - $exVolCount = GetInUseMountPointCount -RootFolder $AutoDagVolumesRootFolderPath - $requiredVolCount = $DiskToDBMap.Count + $SpareVolumeCount - - if ($exVolCount -lt $requiredVolCount) - { - CreateMissingExVolumes @PSBoundParameters -CurrentVolCount $exVolCount -RequiredVolCount $requiredVolCount - } - - #Now see if we need any DB mount points - GetDiskInfo - - $exDbCount = GetInUseMountPointCount -RootFolder $AutoDagDatabasesRootFolderPath - $requiredDbCount = GetDesiredDatabaseCount -DiskToDBMap $DiskToDBMap - - if ($exDbCount -lt $requiredDbCount) - { - CreateMissingExDatabases @PSBoundParameters - } - - #Now see if any Mount Points are ordered incorrectly. Jetstress wants ExchangeDatabase mount points to be listed before ExchangeVolume mount points - GetDiskInfo - - if ($EnsureExchangeVolumeMountPointIsLast -eq $true) - { - while($true) - { - $volNum = VolumeMountPointNotLastInList -AutoDagVolumesRootFolderPath $AutoDagVolumesRootFolderPath - - if ($volNum -ne -1) - { - SendVolumeMountPointToEndOfList -AutoDagVolumesRootFolderPath $AutoDagVolumesRootFolderPath -VolumeNumber $volNum - - #Update DiskInfo for next iteration - GetDiskInfo - } - else - { - break - } - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.String] - $AutoDagDatabasesRootFolderPath, - - [parameter(Mandatory = $true)] - [System.String] - $AutoDagVolumesRootFolderPath, - - [parameter(Mandatory = $true)] - [System.String[]] - $DiskToDBMap, - - [parameter(Mandatory = $true)] - [System.UInt32] - $SpareVolumeCount, - - [System.Boolean] - $EnsureExchangeVolumeMountPointIsLast = $false, - - [System.Boolean] - $CreateSubfolders = $false, - - [ValidateSet("NTFS","REFS")] - [System.String] - $FileSystem = "NTFS", - - [System.String] - $MinDiskSize = "", - - [ValidateSet("MBR","GPT")] - [System.String] - $PartitioningScheme = "GPT", - - [System.String] - $UnitSize = "64K", - - [System.String] - $VolumePrefix = "EXVOL" - ) - - #Load helper modules - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeDiskPart.psm1" -Verbose:0 - - LogFunctionEntry -VerbosePreference $VerbosePreference - - GetDiskInfo - - #Check if the number of assigned EXVOL's is less than the requested number of DB disks plus spares - $mountPointCount = GetInUseMountPointCount -RootFolder $AutoDagVolumesRootFolderPath - - if ($mountPointCount -lt ($DiskToDBMap.Count + $SpareVolumeCount)) - { - ReportBadSetting -SettingName "MountPointCount" -ExpectedValue ($DiskToDBMap.Count + $SpareVolumeCount) -ActualValue $mountPointCount -VerbosePreference $VerbosePreference - return $false - } - else #Loop through all requested DB's and see if they have a mount point yet - { - foreach ($value in $DiskToDBMap) - { - foreach ($db in $value.Split(',')) - { - if ((DBHasMountPoint -AutoDagDatabasesRootFolderPath $AutoDagDatabasesRootFolderPath -DB $db) -eq $false) - { - ReportBadSetting -SettingName "DB '$($db)' Has Mount Point" -ExpectedValue $true -ActualValue $false -VerbosePreference $VerbosePreference - return $false - } - } - } - } - - #Now check if any ExchangeVolume mount points are higher ordered than ExchangeDatabase mount points. ExchangeDatabase MP's must be listed first for logical disk counters to function properly - if ($EnsureExchangeVolumeMountPointIsLast -eq $true -and (VolumeMountPointNotLastInList -AutoDagVolumesRootFolderPath $AutoDagVolumesRootFolderPath) -ne -1) - { - Write-Verbose "One or more volumes have an $($AutoDagVolumesRootFolderPath) mount point ordered before a $($AutoDagDatabasesRootFolderPath) mount point" - return $false - } - - return $true -} - -#Creates mount points for any Exchange Volumes we are missing -function CreateMissingExVolumes -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.String] - $AutoDagDatabasesRootFolderPath, - - [parameter(Mandatory = $true)] - [System.String] - $AutoDagVolumesRootFolderPath, - - [parameter(Mandatory = $true)] - [System.String[]] - $DiskToDBMap, - - [parameter(Mandatory = $true)] - [System.UInt32] - $SpareVolumeCount, - - [System.Boolean] - $CreateSubfolders = $false, - - [ValidateSet("NTFS","REFS")] - [System.String] - $FileSystem = "NTFS", - - [System.String] - $MinDiskSize = "", - - [ValidateSet("MBR","GPT")] - [System.String] - $PartitioningScheme = "GPT", - - [System.String] - $UnitSize = "64K", - - [System.String] - $VolumePrefix = "EXVOL", - - [System.Int32] - $CurrentVolCount, - - [System.Int32] - $RequiredVolCount - ) - - for ($i = $CurrentVolCount; $i -lt $RequiredVolCount; $i++) - { - if ($i -ne $CurrentVolCount) #Need to update disk info if we've gone through the loop already - { - GetDiskInfo - } - - $firstDisk = FindFirstAvailableDisk -MinDiskSize $MinDiskSize - - if ($firstDisk -ne -1) - { - $firstVolume = FindFirstAvailableVolumeNumber -AutoDagVolumesRootFolderPath $AutoDagVolumesRootFolderPath -VolumePrefix $VolumePrefix - - if ($firstVolume -ne -1) - { - $volPath = Join-Path -Path "$($AutoDagVolumesRootFolderPath)" -ChildPath "$($VolumePrefix)$($firstVolume)" - - PrepareVolume -DiskNumber $firstDisk -Folder $volPath -FileSystem $FileSystem -UnitSize $UnitSize -PartitioningScheme $PartitioningScheme -Label "$($VolumePrefix)$($firstVolume)" - } - else - { - throw "Unable to find a free volume number to use when naming the volume folder" - } - } - else - { - throw "No available disks to assign an Exchange Volume mount point to" - } - } -} - -#Looks for databases that have never had a mount point created, and gives them a mount point -function CreateMissingExDatabases -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.String] - $AutoDagDatabasesRootFolderPath, - - [parameter(Mandatory = $true)] - [System.String] - $AutoDagVolumesRootFolderPath, - - [parameter(Mandatory = $true)] - [System.String[]] - $DiskToDBMap, - - [parameter(Mandatory = $true)] - [System.UInt32] - $SpareVolumeCount, - - [System.Boolean] - $CreateSubfolders = $false, - - [ValidateSet("NTFS","REFS")] - [System.String] - $FileSystem = "NTFS", - - [System.String] - $MinDiskSize = "", - - [ValidateSet("MBR","GPT")] - [System.String] - $PartitioningScheme = "GPT", - - [System.String] - $UnitSize = "64K", - - [System.String] - $VolumePrefix = "EXVOL" - ) - - for ($i = 0; $i -lt $DiskToDBMap.Count; $i++) - { - if ($i -gt 0) #Need to refresh current disk info - { - GetDiskInfo - } - - [string[]]$dbsNeedingMountPoints = @() - - [string[]]$allDBsRequestedForDisk = $DiskToDBMap[$i].Split(',') - - for ($j = 0; $j -lt $allDBsRequestedForDisk.Count; $j++) - { - $current = $allDBsRequestedForDisk[$j] - - $path = Join-Path -Path "$($AutoDagDatabasesRootFolderPath)" -ChildPath "$($current)" - - #We only want to touch datases who have never had a mount point created. After that, AutoReseed will handle it. - if ((Test-Path -Path "$($path)") -eq $false) - { - $dbsNeedingMountPoints += $current - } - else #Since the folder already exists, need to check and error if the mount point doesn't - { - if ((MountPointExists -Path $path) -eq -1) - { - throw "Database '$($current)' already has a folder on disk at '$($path)', but does not have a mount point. This must be manually corrected for xAutoMountPoint to proceed." - } - } - } - - if ($dbsNeedingMountPoints.Count -eq $allDBsRequestedForDisk.Count) #No DB mount points for this disk have been created yet - { - $targetVolume = GetExchangeVolume -AutoDagDatabasesRootFolderPath $AutoDagDatabasesRootFolderPath -AutoDagVolumesRootFolderPath $AutoDagVolumesRootFolderPath -DBsPerDisk $allDBsRequestedForDisk.Count -VolumePrefix $VolumePrefix - } - elseif ($dbsNeedingMountPoints.Count -gt 0) #We just need to create some mount points - { - $existingDB = "" - - #Find a DB that's already had its mount point created - foreach ($db in $allDBsRequestedForDisk) - { - if (($dbsNeedingMountPoints.Contains($db) -eq $false)) - { - $existingDB = $db - break - } - } - - if ($existingDB -ne "") - { - $targetVolume = GetExchangeVolume -AutoDagDatabasesRootFolderPath $AutoDagDatabasesRootFolderPath -AutoDagVolumesRootFolderPath $AutoDagVolumesRootFolderPath -ExistingDB $existingDB -DBsPerDisk $allDBsRequestedForDisk.Count -DBsToCreate $dbsNeedingMountPoints.Count -VolumePrefix $VolumePrefix - } - } - else #All DB's requested for this disk are good. Just continue on in the loop - { - continue - } - - if ($null -ne $targetVolume) - { - if ($targetVolume -ne -1) - { - foreach ($db in $dbsNeedingMountPoints) - { - $path = Join-Path -Path "$($AutoDagDatabasesRootFolderPath)" -ChildPath "$($db)" - - AddMountPoint -VolumeNumber $targetVolume -Folder $path - - if ($CreateSubfolders -eq $true) - { - $dbFolder = Join-Path -Path "$($path)" -ChildPath "$($db).db" - $logFolder = Join-Path -Path "$($path)" -ChildPath "$($db).log" - - if ((Test-Path -LiteralPath "$($dbFolder)") -eq $false) - { - mkdir -Path "$($dbFolder)" - } - - if ((Test-Path -LiteralPath "$($logFolder)") -eq $false) - { - mkdir -Path "$($logFolder)" - } - } - } - } - else - { - throw "Unable to find a volume to place mount points for the following databases: '$($dbsNeedingMountPoints)'" - } - } - } -} - -#Builds a map of the DBs that already exist on disk -function GetDiskToDBMap -{ - param([string]$AutoDagDatabasesRootFolderPath) - - #Get the DB path to a point where we know there will be a trailing \ - $dbpath = Join-Path -Path "$($AutoDagDatabasesRootFolderPath)" -ChildPath "" - - #Will be the return value for DiskToDBMap - [string[]]$dbMap = @() - - #Loop through all existing mount points and figure out which ones are for DB's - foreach ($key in $global:VolumeToMountPointMap.Keys) - { - [string]$mountPoints = "" - - foreach ($mountPoint in $global:VolumeToMountPointMap[$key]) - { - if ($mountPoint.StartsWith($dbpath)) - { - $startIndex = $dbpath.Length - $endIndex = $mountPoint.IndexOf("\", $startIndex) - $dbName = $mountPoint.Substring($startIndex, $endIndex - $startIndex) - - if ($mountPoints -eq "") - { - $mountPoints = $dbName - } - else - { - $mountPoints += ",$($dbName)" - } - } - } - - if ($mountPoints.Length -gt 0) - { - $dbMap += $mountPoints - } - } - - return $dbMap -} - -#Looks for a volume where an Exchange Volume or Database mount point can be added. -#If ExistingDB is not specified, looks for a spare volume that has no mount points yet. -#If ExistingDB is specified, finds the volume number where that DB exists, only if there is room to -#create the requested database mount points. -function GetExchangeVolume -{ - param([string]$AutoDagDatabasesRootFolderPath, [string]$AutoDagVolumesRootFolderPath, [string]$ExistingDB = "", [Uint32]$DBsPerDisk, [Uint32]$DBsToCreate, [string]$VolumePrefix = "EXVOL") - - $targetVol = -1 #Our return variable - - [object[]]$keysSorted = GetSortedExchangeVolumeKeys -AutoDagDatabasesRootFolderPath $AutoDagDatabasesRootFolderPath -AutoDagVolumesRootFolderPath $AutoDagVolumesRootFolderPath -VolumePrefix $VolumePrefix - - #Loop through every volume - foreach ($key in $keysSorted) - { - [int]$intKey = $key - - #Get mount points for this volume - [string[]]$mountPoints = $global:VolumeToMountPointMap[$intKey] - - $hasExVol = $false #Whether any ExVol mount points exist on this disk - $hasExDb = $false #Whether any ExDB mount points exist on this disk - $hasExistingDB = $false #Whether $ExistingDB exists as a mount point on this disk - - #Inspect each individual mount point - foreach($mountPoint in $mountPoints) - { - if ($mountPoint.StartsWith($AutoDagVolumesRootFolderPath)) - { - $hasExVol = $true - } - elseif ($mountPoint.StartsWith($AutoDagDatabasesRootFolderPath)) - { - $hasExDb = $true - - $path = Join-Path -Path "$($AutoDagDatabasesRootFolderPath)" -ChildPath "$($ExistingDB)" - - if ($mountPoint.StartsWith($path)) - { - $hasExistingDB = $true - } - } - } - - if ($ExistingDB -eq "") - { - if ($hasExVol -eq $true -and $hasExDb -eq $false) - { - $targetVol = $intKey - break - } - } - else - { - if ($hasExVol -eq $true -and $hasExistingDB -eq $true) - { - if (($mountPoints.Count + $DBsToCreate) -le ($DBsPerDisk + 1)) - { - $targetVol = $intKey - } - - break - } - } - } - - return $targetVol -} - -function GetSortedExchangeVolumeKeys -{ - param([string]$AutoDagDatabasesRootFolderPath, [string]$AutoDagVolumesRootFolderPath, [string]$VolumePrefix = "EXVOL") - - [string[]]$sortedKeys = @() #The return value - - [string]$pathBeforeVolumeNumber = Join-Path -Path $AutoDagVolumesRootFolderPath -ChildPath $VolumePrefix - - #First extract the actual volume number as an Int from the volume path, then add it to a new hashtable with the same key value - [Hashtable]$tempVolumeToMountPointMap = @{} - - foreach ($key in $global:VolumeToMountPointMap.Keys) - { - $volPath = "" - - #Loop through each mount point on this volume and find the EXVOL mount point - foreach ($value in $VolumeToMountPointMap[$key]) - { - if ($value.StartsWith($pathBeforeVolumeNumber)) - { - $volPath = $value - break - } - } - - if ($volPath.StartsWith($pathBeforeVolumeNumber)) - { - if ($volPath.EndsWith("\") -or $volPath.EndsWith("/")) - { - [string]$exVolNumberStr = $volPath.Substring($pathBeforeVolumeNumber.Length, ($volPath.Length - $pathBeforeVolumeNumber.Length - 1)) - } - else - { - [string]$exVolNumberStr = $volPath.Substring($pathBeforeVolumeNumber.Length, ($volPath.Length - $pathBeforeVolumeNumber.Length)) - } - - [int]$exVolNumber = [int]::Parse($exVolNumberStr) - $tempVolumeToMountPointMap.Add($key, $exVolNumber) - } - } - - #Now go through the volume numbers, and add the keys to the return array in sorted value order - while ($tempVolumeToMountPointMap.Count -gt 0) - { - [object[]]$keys = $tempVolumeToMountPointMap.Keys - [int]$lowestKey = $keys[0] - [int]$lowestValue = $tempVolumeToMountPointMap[$keys[0]] - - for ($i = 1; $i -lt $tempVolumeToMountPointMap.Count; $i++) - { - [int]$currentValue = $tempVolumeToMountPointMap[$keys[$i]] - - if ($currentValue -lt $lowestValue) - { - $lowestKey = $keys[$i] - $lowestValue = $currentValue - } - } - - $sortedKeys += $lowestKey - $tempVolumeToMountPointMap.Remove($lowestKey) - } - - return $sortedKeys -} - -#Finds the lowest disk number that doesn't have any volumes associated, and is larger than the requested size -function FindFirstAvailableDisk -{ - param([string]$MinDiskSize = "") - - $diskNum = -1 - - foreach ($key in $global:DiskToVolumeMap.Keys) - { - if ($global:DiskToVolumeMap[$key].Count -eq 0 -and ($key -lt $diskNum -or $diskNum -eq -1)) - { - if ($MinDiskSize -ne "") - { - [Uint64]$minSize = 0 + $MinDiskSize.Replace(" ", "") - [Uint64]$actualSize = 0 + $global:DiskSizeMap[$key].Replace(" ", "") - - if ($actualSize -gt $minSize) - { - $diskNum = $key - } - } - else - { - $diskNum = $key - } - } - } - - return $diskNum -} - -#Looks in the volumes root folder and finds the first number we can give to a volume folder -#based off of what folders have already been created -function FindFirstAvailableVolumeNumber -{ - param([string]$AutoDagVolumesRootFolderPath, [string]$VolumePrefix) - - if((Test-Path -LiteralPath "$($AutoDagVolumesRootFolderPath)") -eq $false) #If the ExVol folder doesn't already exist, then we can start with 1 - { - return 1 - } - - $currentFolders = Get-ChildItem -LiteralPath "$($AutoDagVolumesRootFolderPath)" | Where-Object {$_.GetType().Name -eq "DirectoryInfo"} | Sort-Object - - for ($i = 1; $i -lt 999; $i++) - { - $existing = $null - $existing = $currentFolders | Where-Object {$_.Name -eq "$($VolumePrefix)$($i)"} - - if ($null -eq $existing) - { - return $i - } - } - - return -1 -} - -#Counts and returns the number of DB's in the disk to db map -function GetDesiredDatabaseCount -{ - param([string[]]$DiskToDBMap) - - $count = 0 - - foreach ($value in $DiskToDBMap) - { - $count += $value.Split(',').Count - } - - return $count -} - -#Checks if a database already has a mountpoint created -function DBHasMountPoint -{ - param([string]$AutoDagDatabasesRootFolderPath, [string]$DB) - - $dbPath = Join-Path -Path "$($AutoDagDatabasesRootFolderPath)" -ChildPath "$($DB)" - - foreach ($key in $global:VolumeToMountPointMap.Keys) - { - foreach ($mountPoint in $global:VolumeToMountPointMap[$key]) - { - if ($mountPoint.StartsWith($dbPath)) - { - return $true - } - } - } - - return $false -} - -#Gets the count of in use mount points matching the given critera -function GetInUseMountPointCount -{ - param([string]$RootFolder) - - $count = 0 - - foreach ($key in $global:VolumeToMountPointMap.Keys) - { - foreach ($mountPoint in $global:VolumeToMountPointMap[$key]) - { - if ($mountPoint.StartsWith($RootFolder)) - { - $count++ - } - } - } - - return $count -} - -#Checks all volumes, and sees if any of them have ExchangeVolume mount points that show up before other (like ExchangeDatabase) mount points. -#If so, it returns the volume number. If not, it returns -1 -function VolumeMountPointNotLastInList -{ - param([string]$AutoDagVolumesRootFolderPath) - - foreach ($key in $global:VolumeToMountPointMap.Keys) - { - $values = $global:VolumeToMountPointMap[$key] - - if ($null -ne $values) - { - for ($i = 0; $i -lt $values.Count; $i++) - { - if ($values[$i].StartsWith($AutoDagVolumesRootFolderPath) -eq $true -and $i -lt ($values.Count - 1)) - { - return $key - } - } - } - } - - return -1 -} - -#For volumes that have multiple mount points including an ExchangeVolume mount point, sends removes and re-adds the ExchangeVolume -#mount point so that it is at the end of the list of mount points -function SendVolumeMountPointToEndOfList -{ - [CmdletBinding()] - param([string]$AutoDagVolumesRootFolderPath, [Int32]$VolumeNumber) - - $values = $global:VolumeToMountPointMap[$VolumeNumber] - - foreach ($folderName in $values) - { - if ($folderName.StartsWith($AutoDagVolumesRootFolderPath)) - { - if ($folderName.EndsWith("\")) - { - $folderName = $folderName.Substring(0, $folderName.Length - 1) - } - - StartDiskpart -Commands "select volume $($VolumeNumber)","remove mount=`"$($folderName)`"","assign mount=`"$($folderName)`"" -VerbosePreference $VerbosePreference | Out-Null - break - } - } -} - -#Takes an empty disk, initalizes and formats it, and gives it an ExchangeVolume mount point -function PrepareVolume -{ - [CmdletBinding()] - param([int]$DiskNumber, [string]$Folder, [ValidateSet("NTFS","REFS")][string]$FileSystem = "NTFS", [string]$UnitSize, [string]$PartitioningScheme, [string]$Label) - - #Initialize the disk and put in MBR format - StartDiskpart -Commands "select disk $($DiskNumber)","clean" -VerbosePreference $VerbosePreference | Out-Null - StartDiskpart -Commands "select disk $($DiskNumber)","online disk" -VerbosePreference $VerbosePreference | Out-Null - StartDiskpart -Commands "select disk $($DiskNumber)","attributes disk clear readonly","convert MBR" -VerbosePreference $VerbosePreference | Out-Null - StartDiskpart -Commands "select disk $($DiskNumber)","offline disk" -VerbosePreference $VerbosePreference | Out-Null - - #Online the disk - StartDiskpart -Commands "select disk $($DiskNumber)","attributes disk clear readonly","online disk" -VerbosePreference $VerbosePreference | Out-Null - - #Convert to GPT if requested - if ($PartitioningScheme -eq "GPT") - { - StartDiskpart -Commands "select disk $($DiskNumber)","convert GPT noerr" -VerbosePreference $VerbosePreference | Out-Null - } - - #Create the directory if it doesn't exist - if ((Test-Path $Folder) -eq $False) - { - mkdir -Path "$($Folder)" | Out-Null - } - - #Create the partition and format the drive - if ($FileSystem -eq "NTFS") - { - $formatString = "Format FS=$($FileSystem) UNIT=$($UnitSize) Label=$($Label) QUICK" - - StartDiskpart -Commands "select disk $($DiskNumber)","create partition primary","$($formatString)","assign mount=`"$($Folder)`"" -VerbosePreference $VerbosePreference | Out-Null - } - else #if ($FileSystem -eq "REFS") - { - StartDiskpart -Commands "select disk $($DiskNumber)","create partition primary" -VerbosePreference $VerbosePreference | Out-Null - - if ($UnitSize.ToLower().EndsWith("k")) - { - $UnitSizeBytes = [UInt64]::Parse($UnitSize.Substring(0, $UnitSize.Length - 1)) * 1024 - } - else - { - $UnitSizeBytes = $UnitSize - } - - Write-Verbose "Sleeping for 15 seconds after partition creation." - - Start-Sleep -Seconds 15 - - Get-Partition -DiskNumber $DiskNumber -PartitionNumber 2| Format-Volume -AllocationUnitSize $UnitSizeBytes -FileSystem REFS -NewFileSystemLabel $Label -SetIntegrityStreams:$false -Confirm:$false - Add-PartitionAccessPath -DiskNumber $DiskNumber -PartitionNumber 2 -AccessPath $Folder -PassThru | Set-Partition -NoDefaultDriveLetter $true - } -} - -#Adds a mount point to an existing volume -function AddMountPoint -{ - [CmdletBinding()] - param([int]$VolumeNumber, [string]$Folder) - - #Create the directory if it doesn't exist - if ((Test-Path $Folder) -eq $False) - { - mkdir -Path "$($Folder)" | Out-Null - } - - StartDiskpart -Commands "select volume $($VolumeNumber)","assign mount=`"$($Folder)`"" -VerbosePreference $VerbosePreference | Out-Null -} - - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAutoMountPoint/MSFT_xExchAutoMountPoint.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAutoMountPoint/MSFT_xExchAutoMountPoint.schema.mof deleted file mode 100644 index 75555379..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAutoMountPoint/MSFT_xExchAutoMountPoint.schema.mof +++ /dev/null @@ -1,20 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchAutoMountPoint")] -class MSFT_xExchAutoMountPoint : OMI_BaseResource -{ - [Key] String Identity; //The name of the server. Not actually used for anything - [Required] String AutoDagDatabasesRootFolderPath; //The parent folder for Exchange database mount point folders - [Required] String AutoDagVolumesRootFolderPath; //The parent folder for Exchange volume mount point folders - [Required] String DiskToDBMap[]; //An array of strings containing the databases for each disk. Databases on the same disk should be in the same string, and comma separated. Example: "DB1,DB2","DB3,DB4". This puts DB1 and DB2 on one disk, and DB3 and DB4 on another. - [Required] Uint32 SpareVolumeCount; //How many spare volumes will be available - [Write] Boolean EnsureExchangeVolumeMountPointIsLast; - [Write] Boolean CreateSubfolders; //Defaults to $false. If $true, specifies that DBNAME.db and DBNAME.log subfolders should be automatically created underneath the ExchangeDatabase mount points - [Write, ValueMap{"NTFS","REFS"}, Values{"NTFS","REFS"}] String FileSystem; //The file system to use when formatting the volume. Defaults to NTFS. - [Write] String MinDiskSize; //The minimum size of a disk to consider using. Defaults to none. Should be in a format like "1024MB" or "1TB". - [Write, ValueMap{"MBR","GPT"}, Values{"MBR","GPT"}] String PartitioningScheme; //The partitioning scheme for the volume. Defaults to GPT. - [Write] String UnitSize; //The unit size to use when formatting the disk. Defaults to 64k. - [Write] String VolumePrefix; //The prefix to give to Exchange Volume folders. Defaults to EXVOL -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAutodiscoverVirtualDirectory/MSFT_xExchAutodiscoverVirtualDirectory.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAutodiscoverVirtualDirectory/MSFT_xExchAutodiscoverVirtualDirectory.psm1 deleted file mode 100644 index b460f6e6..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAutodiscoverVirtualDirectory/MSFT_xExchAutodiscoverVirtualDirectory.psm1 +++ /dev/null @@ -1,246 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Identity, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $BasicAuthentication, - - [System.Boolean] - $DigestAuthentication, - - [System.String] - $DomainController, - - [System.Boolean] - $WindowsAuthentication, - - [System.Boolean] - $WSSecurityAuthentication - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad 'Get-AutodiscoverVirtualDirectory' -VerbosePreference $VerbosePreference - - $autoDVdir = Get-AutodiscoverVirtualDirectoryWithCorrectParams @PSBoundParameters - - if ($null -ne $autoDVdir) - { - $returnValue = @{ - Identity = $Identity - BasicAuthentication = $autoDVdir.BasicAuthentication - DigestAuthentication = $autoDVdir.DigestAuthentication - WindowsAuthentication = $autoDVdir.WindowsAuthentication - WSSecurityAuthentication = $autoDVdir.WSSecurityAuthentication - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "")] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Identity, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $BasicAuthentication, - - [System.Boolean] - $DigestAuthentication, - - [System.String] - $DomainController, - - [System.Boolean] - $WindowsAuthentication, - - [System.Boolean] - $WSSecurityAuthentication - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad 'Set-AutodiscoverVirtualDirectory' -VerbosePreference $VerbosePreference - - #Ensure an empty string is $null and not a string - SetEmptyStringParamsToNull -PSBoundParametersIn $PSBoundParameters - - #Remove Credential parameter does not exist on Set-OwaVirtualDirectory - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'Credential','AllowServiceRestart' - - Set-AutodiscoverVirtualDirectory @PSBoundParameters - - if ($AllowServiceRestart) - { - Write-Verbose "Recycling MSExchangeAutodiscoverAppPool" - RestartAppPoolIfExists -Name MSExchangeAutodiscoverAppPool - } - else - { - Write-Warning "The configuration will not take effect until MSExchangeAutodiscoverAppPool is manually recycled." - } -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Identity, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $BasicAuthentication, - - [System.Boolean] - $DigestAuthentication, - - [System.String] - $DomainController, - - [System.Boolean] - $WindowsAuthentication, - - [System.Boolean] - $WSSecurityAuthentication - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad 'Get-AutodiscoverVirtualDirectory' -VerbosePreference $VerbosePreference - - #Ensure an empty string is $null and not a string - SetEmptyStringParamsToNull -PSBoundParametersIn $PSBoundParameters - - $autoDVdir = Get-AutodiscoverVirtualDirectoryWithCorrectParams @PSBoundParameters - - if ($null -eq $autoDVdir) - { - return $false - } - else - { - if (!(VerifySetting -Name "BasicAuthentication" -Type "Boolean" -ExpectedValue $BasicAuthentication -ActualValue $autoDVdir.BasicAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "DigestAuthentication" -Type "Boolean" -ExpectedValue $DigestAuthentication -ActualValue $autoDVdir.DigestAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "WindowsAuthentication" -Type "Boolean" -ExpectedValue $WindowsAuthentication -ActualValue $autoDVdir.WindowsAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "WSSecurityAuthentication" -Type "Boolean" -ExpectedValue $WSSecurityAuthentication -ActualValue $autoDVdir.WSSecurityAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - } - - #If the code made it this far all properties are in a desired state - return $true -} - -function Get-AutodiscoverVirtualDirectoryWithCorrectParams -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseSingularNouns", "")] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Identity, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $BasicAuthentication, - - [System.Boolean] - $DigestAuthentication, - - [System.String] - $DomainController, - - [System.Boolean] - $WindowsAuthentication, - - [System.Boolean] - $WSSecurityAuthentication - ) - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - return (Get-AutodiscoverVirtualDirectory @PSBoundParameters) -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAutodiscoverVirtualDirectory/MSFT_xExchAutodiscoverVirtualDirectory.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAutodiscoverVirtualDirectory/MSFT_xExchAutodiscoverVirtualDirectory.schema.mof deleted file mode 100644 index 0746340c..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchAutodiscoverVirtualDirectory/MSFT_xExchAutodiscoverVirtualDirectory.schema.mof +++ /dev/null @@ -1,19 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchAutodiscoverVirtualDirectory")] -class MSFT_xExchAutodiscoverVirtualDirectory : OMI_BaseResource -{ - [Key] String Identity; //The Identity of the Autodiscover Virtual Directory - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - [Write] Boolean AllowServiceRestart; //Whether it is OK to recycle the app pool after making changes. Defaults to $true. - - //Remaining properties correspond directly to Set-AutodiscoverVirtualDirectory parameters - //http://technet.microsoft.com/en-us/library/aa998601(v=exchg.150).aspx - [Write] Boolean BasicAuthentication; - [Write] Boolean DigestAuthentication; - [Write] String DomainController; - [Write] Boolean WindowsAuthentication; - [Write] Boolean WSSecurityAuthentication; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchClientAccessServer/MSFT_xExchClientAccessServer.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchClientAccessServer/MSFT_xExchClientAccessServer.psm1 deleted file mode 100644 index 561e158c..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchClientAccessServer/MSFT_xExchClientAccessServer.psm1 +++ /dev/null @@ -1,291 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - [ValidateNotNullOrEmpty()] - $AlternateServiceAccountCredential, - - [System.String] - $AutoDiscoverServiceInternalUri, - - [System.String[]] - $AutoDiscoverSiteScope, - - [System.Boolean] - $CleanUpInvalidAlternateServiceAccountCredentials, - - [System.String] - $DomainController, - - [System.Boolean] - $RemoveAlternateServiceAccountCredentials - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-ClientAccessServ*" -VerbosePreference $VerbosePreference - - $cas = GetClientAccessServer @PSBoundParameters - - if ($null -ne $cas) - { - if ($null -ne $cas.AutoDiscoverSiteScope) - { - $sites = $cas.AutoDiscoverSiteScope.ToArray() - } - $returnValue = @{ - Identity = $Identity - AutoDiscoverServiceInternalUri = $cas.AutoDiscoverServiceInternalUri - AutoDiscoverSiteScope = $sites - CleanUpInvalidAlternateServiceAccountCredentials = $CleanUpInvalidAlternateServiceAccountCredentials - DomainController = $DomainController - RemoveAlternateServiceAccountCredentials = $RemoveAlternateServiceAccountCredentials - } - if ($cas.AlternateServiceAccountConfiguration.EffectiveCredentials.Count -gt 0) - { - $UserName = ($cas.AlternateServiceAccountConfiguration.EffectiveCredentials | sort WhenAddedUTC | select -Last 1).Credential.UserName - $PassWord = ($cas.AlternateServiceAccountConfiguration.EffectiveCredentials | sort WhenAddedUTC | select -Last 1).Credential.GetNetworkCredential().Password - $returnValue.Add("AlternateServiceAccountCredential","UserName:$UserName Password:$PassWord") - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - [ValidateNotNullOrEmpty()] - $AlternateServiceAccountCredential, - - [System.String] - $AutoDiscoverServiceInternalUri, - - [System.String[]] - $AutoDiscoverSiteScope, - - [System.Boolean] - $CleanUpInvalidAlternateServiceAccountCredentials, - - [System.String] - $DomainController, - - [System.Boolean] - $RemoveAlternateServiceAccountCredentials - ) - - #check for ambiguous parameter - if (($AlternateServiceAccountCredential -and $RemoveAlternateServiceAccountCredentials) -or ($CleanUpInvalidAlternateServiceAccountCredentials -and $RemoveAlternateServiceAccountCredentials)) - { - throw "Ambiguous parameter detected! Don't combine AlternateServiceAccountCredential with RemoveAlternateServiceAccountCredentials or CleanUpInvalidAlternateServiceAccountCredentials with RemoveAlternateServiceAccountCredentials!" - } - #check if credentials are in correct format DOMAIN\USERNAME - $parts = @($AlternateServiceAccountCredential.Username.Split('\')) - if ($parts.Count -ne 2 -or $parts[0] -eq '') - { - throw "The username must be fully qualified!" - } - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Set-ClientAccessServ*" -VerbosePreference $VerbosePreference - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Credential" - - SetEmptyStringParamsToNull -PSBoundParametersIn $PSBoundParameters - - $serverVersion = GetExchangeVersion -ThrowIfUnknownVersion $true - - if ($serverVersion -eq "2016") - { - Set-ClientAccessService @PSBoundParameters - } - elseif ($serverVersion -eq "2013") - { - Set-ClientAccessServer @PSBoundParameters - } -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - [ValidateNotNullOrEmpty()] - $AlternateServiceAccountCredential, - - [System.String] - $AutoDiscoverServiceInternalUri, - - [System.String[]] - $AutoDiscoverSiteScope, - - [System.Boolean] - $CleanUpInvalidAlternateServiceAccountCredentials, - - [System.String] - $DomainController, - - [System.Boolean] - $RemoveAlternateServiceAccountCredentials - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-ClientAccessServ*" -VerbosePreference $VerbosePreference - - $cas = GetClientAccessServer @PSBoundParameters - - $serverVersion = GetExchangeVersion -ThrowIfUnknownVersion $true - - if ($null -eq $cas) - { - return $false - } - else - { - if (!(VerifySetting -Name "AutoDiscoverServiceInternalUri" -Type "String" -ExpectedValue $AutoDiscoverServiceInternalUri -ActualValue $cas.AutoDiscoverServiceInternalUri.AbsoluteUri -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "AutoDiscoverSiteScope" -Type "Array" -ExpectedValue $AutoDiscoverSiteScope -ActualValue $cas.AutoDiscoverSiteScope -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "AlternateServiceAccountCredential" -Type "PSCredential" -ExpectedValue $AlternateServiceAccountCredential -ActualValue ($cas.AlternateServiceAccountConfiguration.EffectiveCredentials | sort WhenAddedUTC | select -Last 1).Credential $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - if ($CleanUpInvalidAlternateServiceAccountCredentials) - { - return $false - } - if ($RemoveAlternateServiceAccountCredentials -and ($cas.AlternateServiceAccountConfiguration.EffectiveCredentials.Count -gt 0)) - { - return $false - } - } - - return $true -} - -#Runs Get-ClientAcccessServer, only specifying Identity, and optionally DomainController -function GetClientAccessServer -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - [ValidateNotNullOrEmpty()] - $AlternateServiceAccountCredential, - - [System.String] - $AutoDiscoverServiceInternalUri, - - [System.String[]] - $AutoDiscoverSiteScope, - - [System.Boolean] - $CleanUpInvalidAlternateServiceAccountCredentials, - - [System.String] - $DomainController, - - [System.Boolean] - $RemoveAlternateServiceAccountCredentials - ) - - #Remove params we don't want to pass into the next command - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - $serverVersion = GetExchangeVersion -ThrowIfUnknownVersion $true - if (($null -ne $AlternateServiceAccountCredential) -or ($RemoveAlternateServiceAccountCredentials)) - { - $PSBoundParameters.Add('IncludeAlternateServiceAccountCredentialPassword',$true) - } - - if ($serverVersion -eq "2016") - { - return (Get-ClientAccessService @PSBoundParameters) - } - elseif ($serverVersion -eq "2013") - { - return (Get-ClientAccessServer @PSBoundParameters) - } -} - - -Export-ModuleMember -Function *-TargetResource - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchClientAccessServer/MSFT_xExchClientAccessServer.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchClientAccessServer/MSFT_xExchClientAccessServer.schema.mof deleted file mode 100644 index bf9e8415..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchClientAccessServer/MSFT_xExchClientAccessServer.schema.mof +++ /dev/null @@ -1,19 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchClientAccessServer")] -class MSFT_xExchClientAccessServer : OMI_BaseResource -{ - [Key] String Identity; //The hostname of the Client Access Server - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - - //Remaining properties correspond directly to Set-ClientAccessServer parameters - //http://technet.microsoft.com/en-us/library/bb125157(v=exchg.150).aspx - [Write] String AutoDiscoverServiceInternalUri; - [Write] String AutoDiscoverSiteScope[]; - [Write] String DomainController; - [Write, EmbeddedInstance("MSFT_Credential")] String AlternateServiceAccountCredential; - [Write] Boolean CleanUpInvalidAlternateServiceAccountCredentials; - [Write] Boolean RemoveAlternateServiceAccountCredentials; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroup/MSFT_xExchDatabaseAvailabilityGroup.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroup/MSFT_xExchDatabaseAvailabilityGroup.psm1 deleted file mode 100644 index 940a3f35..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroup/MSFT_xExchDatabaseAvailabilityGroup.psm1 +++ /dev/null @@ -1,675 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [System.Int32] - $AutoDagTotalNumberOfServers, - - [System.String] - $AlternateWitnessDirectory, - - [System.String] - $AlternateWitnessServer, - - [System.Boolean] - $AutoDagAutoRedistributeEnabled, - - [System.Boolean] - $AutoDagAutoReseedEnabled, - - [System.Int32] - $AutoDagDatabaseCopiesPerDatabase, - - [System.Int32] - $AutoDagDatabaseCopiesPerVolume, - - [System.String] - $AutoDagDatabasesRootFolderPath, - - [System.Boolean] - $AutoDagDiskReclaimerEnabled, - - [System.Int32] - $AutoDagTotalNumberOfDatabases, - - [System.String] - $AutoDagVolumesRootFolderPath, - - [System.String[]] - $DatabaseAvailabilityGroupIpAddresses, - - [ValidateSet("Off","DagOnly")] - [System.String] - $DatacenterActivationMode, - - [System.String] - $DomainController, - - [ValidateSet("NTFS","ReFS")] - [System.String] - $FileSystem, - - [System.Boolean] - $ManualDagNetworkConfiguration, - - [ValidateSet("Disabled","Enabled","InterSubnetOnly","SeedOnly")] - [System.String] - $NetworkCompression, - - [ValidateSet("Disabled","Enabled","InterSubnetOnly","SeedOnly")] - [System.String] - $NetworkEncryption, - - [System.String] - $PreferenceMoveFrequency, - - [System.Boolean] - $ReplayLagManagerEnabled, - - [System.UInt16] - $ReplicationPort, - - [System.Boolean] - $SkipDagValidation, - - [System.String] - $WitnessDirectory, - - [System.String] - $WitnessServer - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Name" = $Name} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-DatabaseAvailabilityGroup" -VerbosePreference $VerbosePreference - - $dag = GetDatabaseAvailabilityGroup @PSBoundParameters - - if ($null -ne $dag) - { - $returnValue = @{ - Name = $Name - AlternateWitnessDirectory = $dag.AlternateWitnessDirectory - AlternateWitnessServer = $dag.AlternateWitnessServer - AutoDagAutoReseedEnabled = $dag.AutoDagAutoReseedEnabled - AutoDagDatabaseCopiesPerDatabase = $dag.AutoDagDatabaseCopiesPerDatabase - AutoDagDatabaseCopiesPerVolume = $dag.AutoDagDatabaseCopiesPerVolume - AutoDagDatabasesRootFolderPath = $dag.AutoDagDatabasesRootFolderPath - AutoDagDiskReclaimerEnabled = $dag.AutoDagDiskReclaimerEnabled - AutoDagTotalNumberOfDatabases = $dag.AutoDagTotalNumberOfDatabases - AutoDagTotalNumberOfServers = $dag.AutoDagTotalNumberOfServers - AutoDagVolumesRootFolderPath = $dag.AutoDagVolumesRootFolderPath - DatabaseAvailabilityGroupIpAddresses = $dag.DatabaseAvailabilityGroupIpAddresses - DatacenterActivationMode = $dag.DatacenterActivationMode - ManualDagNetworkConfiguration = $dag.ManualDagNetworkConfiguration - NetworkCompression = $dag.NetworkCompression - NetworkEncryption = $dag.NetworkEncryption - ReplayLagManagerEnabled = $dag.ReplayLagManagerEnabled - ReplicationPort = $dag.ReplicationPort - WitnessDirectory = $dag.WitnessDirectory - WitnessServer = $dag.WitnessServer - } - - $serverVersion = GetExchangeVersion - - if ($serverVersion -eq "2016") - { - $returnValue.Add("AutoDagAutoRedistributeEnabled", $dag.AutoDagAutoRedistributeEnabled) - $returnValue.Add("FileSystem", $dag.FileSystem) - $returnValue.Add("PreferenceMoveFrequency", $dag.PreferenceMoveFrequency) - } - } - - $returnValue -} - -function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [System.Int32] - $AutoDagTotalNumberOfServers, - - [System.String] - $AlternateWitnessDirectory, - - [System.String] - $AlternateWitnessServer, - - [System.Boolean] - $AutoDagAutoRedistributeEnabled, - - [System.Boolean] - $AutoDagAutoReseedEnabled, - - [System.Int32] - $AutoDagDatabaseCopiesPerDatabase, - - [System.Int32] - $AutoDagDatabaseCopiesPerVolume, - - [System.String] - $AutoDagDatabasesRootFolderPath, - - [System.Boolean] - $AutoDagDiskReclaimerEnabled, - - [System.Int32] - $AutoDagTotalNumberOfDatabases, - - [System.String] - $AutoDagVolumesRootFolderPath, - - [System.String[]] - $DatabaseAvailabilityGroupIpAddresses, - - [ValidateSet("Off","DagOnly")] - [System.String] - $DatacenterActivationMode, - - [System.String] - $DomainController, - - [ValidateSet("NTFS","ReFS")] - [System.String] - $FileSystem, - - [System.Boolean] - $ManualDagNetworkConfiguration, - - [ValidateSet("Disabled","Enabled","InterSubnetOnly","SeedOnly")] - [System.String] - $NetworkCompression, - - [ValidateSet("Disabled","Enabled","InterSubnetOnly","SeedOnly")] - [System.String] - $NetworkEncryption, - - [System.String] - $PreferenceMoveFrequency, - - [System.Boolean] - $ReplayLagManagerEnabled, - - [System.UInt16] - $ReplicationPort, - - [System.Boolean] - $SkipDagValidation, - - [System.String] - $WitnessDirectory, - - [System.String] - $WitnessServer - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Name" = $Name} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-DatabaseAvailabilityGroup","Set-DatabaseAvailabilityGroup","New-DatabaseAvailabilityGroup" -VerbosePreference $VerbosePreference - - #create array of Exchange 2016 only parameters - [array]$Exchange2016Only = 'AutoDagAutoRedistributeEnabled','FileSystem','PreferenceMoveFrequency' - - $serverVersion = GetExchangeVersion - - if ($serverVersion -eq '2013') - { - foreach ($Exchange2016Parameter in $Exchange2016Only) - { - #Check for non-existent parameters in Exchange 2013 - RemoveVersionSpecificParameters -PSBoundParametersIn $PSBoundParameters -ParamName "$($Exchange2016Parameter)" -ResourceName "xExchDatabaseAvailabilityGroup" -ParamExistsInVersion "2016" - } - } - elseif ($serverVersion -eq '2016') - { - Write-Verbose -Message "No need to remove parameters" - } - else - { - Write-Verbose -Message "Could not detect Exchange version" - } - - SetEmptyStringParamsToNull -PSBoundParametersIn $PSBoundParameters - - $dag = GetDatabaseAvailabilityGroup @PSBoundParameters - - #We need to create the DAG - if ($null -eq $dag) - { - #Create a copy of the original parameters - $originalPSBoundParameters = @{} + $PSBoundParameters - - #Remove parameters that don't exist in New-DatabaseAvailabilityGroup - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Name","DatabaseAvailabilityGroupIpAddresses","WitnessDirectory","WitnessServer","DomainController" - - #Create the DAG - $dag = New-DatabaseAvailabilityGroup @PSBoundParameters - - if ($null -ne $dag) - { - #Add original props back - AddParameters -PSBoundParametersIn $PSBoundParameters -ParamsToAdd $originalPSBoundParameters - } - else - { - throw "Failed to create new DAG." - } - } - - #Modify existing DAG - if ($null -ne $dag) - { - #convert Name to Identity, and Remove Credential - AddParameters -PSBoundParametersIn $PSBoundParameters -ParamsToAdd @{"Identity" = $PSBoundParameters["Name"]} - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Name","Credential" - - #If not all members are in DAG yet, remove params that require them to be - if ($dag.Servers.Count -lt $AutoDagTotalNumberOfServers) - { - if ($PSBoundParameters.ContainsKey("DatacenterActivationMode") -and $DatacenterActivationMode -like "DagOnly") - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "DatacenterActivationMode" - } - } - - Set-DatabaseAvailabilityGroup @PSBoundParameters - } -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [System.Int32] - $AutoDagTotalNumberOfServers, - - [System.String] - $AlternateWitnessDirectory, - - [System.String] - $AlternateWitnessServer, - - [System.Boolean] - $AutoDagAutoRedistributeEnabled, - - [System.Boolean] - $AutoDagAutoReseedEnabled, - - [System.Int32] - $AutoDagDatabaseCopiesPerDatabase, - - [System.Int32] - $AutoDagDatabaseCopiesPerVolume, - - [System.String] - $AutoDagDatabasesRootFolderPath, - - [System.Boolean] - $AutoDagDiskReclaimerEnabled, - - [System.Int32] - $AutoDagTotalNumberOfDatabases, - - [System.String] - $AutoDagVolumesRootFolderPath, - - [System.String[]] - $DatabaseAvailabilityGroupIpAddresses, - - [ValidateSet("Off","DagOnly")] - [System.String] - $DatacenterActivationMode, - - [System.String] - $DomainController, - - [ValidateSet("NTFS","ReFS")] - [System.String] - $FileSystem, - - [System.Boolean] - $ManualDagNetworkConfiguration, - - [ValidateSet("Disabled","Enabled","InterSubnetOnly","SeedOnly")] - [System.String] - $NetworkCompression, - - [ValidateSet("Disabled","Enabled","InterSubnetOnly","SeedOnly")] - [System.String] - $NetworkEncryption, - - [System.String] - $PreferenceMoveFrequency, - - [System.Boolean] - $ReplayLagManagerEnabled, - - [System.UInt16] - $ReplicationPort, - - [System.Boolean] - $SkipDagValidation, - - [System.String] - $WitnessDirectory, - - [System.String] - $WitnessServer - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Name" = $Name} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-DatabaseAvailabilityGroup" -VerbosePreference $VerbosePreference - - #create array of Exchange 2016 only parameters - [array]$Exchange2016Only = 'AutoDagAutoRedistributeEnabled','FileSystem','PreferenceMoveFrequency' - - $serverVersion = GetExchangeVersion - - if ($serverVersion -eq '2013') - { - foreach ($Exchange2016Parameter in $Exchange2016Only) - { - #Check for non-existent parameters in Exchange 2013 - RemoveVersionSpecificParameters -PSBoundParametersIn $PSBoundParameters -ParamName "$($Exchange2016Parameter)" -ResourceName "xExchDatabaseAvailabilityGroup" -ParamExistsInVersion "2016" - } - } - elseif ($serverVersion -eq '2016') - { - Write-Verbose -Message "No need to remove parameters" - } - else - { - Write-Verbose -Message "Could not detect Exchange version" - } - - $dag = GetDatabaseAvailabilityGroup @PSBoundParameters - - if ($null -eq $dag) - { - return $false - } - else - { - if (!(VerifySetting -Name "AlternateWitnessDirectory" -Type "String" -ExpectedValue $AlternateWitnessDirectory -ActualValue $dag.AlternateWitnessDirectory -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "AlternateWitnessServer" -Type "String" -ExpectedValue $AlternateWitnessServer -ActualValue $dag.AlternateWitnessServer -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "AutoDagAutoRedistributeEnabled" -Type "Boolean" -ExpectedValue $AutoDagAutoRedistributeEnabled -ActualValue $dag.AutoDagAutoRedistributeEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "AutoDagAutoReseedEnabled" -Type "Boolean" -ExpectedValue $AutoDagAutoReseedEnabled -ActualValue $dag.AutoDagAutoReseedEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "AutoDagDatabaseCopiesPerDatabase" -Type "Int" -ExpectedValue $AutoDagDatabaseCopiesPerDatabase -ActualValue $dag.AutoDagDatabaseCopiesPerDatabase -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "AutoDagDatabaseCopiesPerVolume" -Type "Int" -ExpectedValue $AutoDagDatabaseCopiesPerVolume -ActualValue $dag.AutoDagDatabaseCopiesPerVolume -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "AutoDagDatabasesRootFolderPath" -Type "String" -ExpectedValue $AutoDagDatabasesRootFolderPath -ActualValue $dag.AutoDagDatabasesRootFolderPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "AutoDagDiskReclaimerEnabled" -Type "Boolean" -ExpectedValue $AutoDagDiskReclaimerEnabled -ActualValue $dag.AutoDagDiskReclaimerEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "AutoDagTotalNumberOfDatabases" -Type "Int" -ExpectedValue $AutoDagTotalNumberOfDatabases -ActualValue $dag.AutoDagTotalNumberOfDatabases -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "AutoDagTotalNumberOfServers" -Type "Int" -ExpectedValue $AutoDagTotalNumberOfServers -ActualValue $dag.AutoDagTotalNumberOfServers -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "AutoDagVolumesRootFolderPath" -Type "String" -ExpectedValue $AutoDagVolumesRootFolderPath -ActualValue $dag.AutoDagVolumesRootFolderPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "DatabaseAvailabilityGroupIpAddresses" -Type "Array" -ExpectedValue $DatabaseAvailabilityGroupIpAddresses -ActualValue $dag.DatabaseAvailabilityGroupIpAddresses -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "FileSystem" -Type "String" -ExpectedValue $FileSystem -ActualValue $dag.FileSystem -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ManualDagNetworkConfiguration" -Type "Boolean" -ExpectedValue $ManualDagNetworkConfiguration -ActualValue $dag.ManualDagNetworkConfiguration -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "NetworkCompression" -Type "String" -ExpectedValue $NetworkCompression -ActualValue $dag.NetworkCompression -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "NetworkEncryption" -Type "String" -ExpectedValue $NetworkEncryption -ActualValue $dag.NetworkEncryption -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "NetworkEncryption" -Type "String" -ExpectedValue $NetworkEncryption -ActualValue $dag.NetworkEncryption -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "PreferenceMoveFrequency" -Type "Timespan" -ExpectedValue $PreferenceMoveFrequency -ActualValue $dag.PreferenceMoveFrequency -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - #Replication port only comes back correctly from Get-DatabaseAvailabilityGroup if it has been set when there is 1 or more servers in the DAG - if ($dag.Servers.Count -gt 0) - { - if (!(VerifySetting -Name "ReplicationPort" -Type "Int" -ExpectedValue $ReplicationPort -ActualValue $dag.ReplicationPort -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - } - - if (!(VerifySetting -Name "WitnessDirectory" -Type "String" -ExpectedValue $WitnessDirectory -ActualValue $dag.WitnessDirectory -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "WitnessServer" -Type "String" -ExpectedValue $WitnessServer -ActualValue $dag.WitnessServer -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - #Verify these props only if all members are in the DAG - if ($dag.Servers.Count -ge $AutoDagTotalNumberOfServers) - { - if (!(VerifySetting -Name "DatacenterActivationMode" -Type "String" -ExpectedValue $DatacenterActivationMode -ActualValue $dag.DatacenterActivationMode -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - } - } - - return $true -} - -#Runs Get-DatabaseAvailabilityGroup, only specifying Identity, ErrorAction, and optionally DomainController -function GetDatabaseAvailabilityGroup -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [System.Int32] - $AutoDagTotalNumberOfServers, - - [System.String] - $AlternateWitnessDirectory, - - [System.String] - $AlternateWitnessServer, - - [System.Boolean] - $AutoDagAutoRedistributeEnabled, - - [System.Boolean] - $AutoDagAutoReseedEnabled, - - [System.Int32] - $AutoDagDatabaseCopiesPerDatabase, - - [System.Int32] - $AutoDagDatabaseCopiesPerVolume, - - [System.String] - $AutoDagDatabasesRootFolderPath, - - [System.Boolean] - $AutoDagDiskReclaimerEnabled, - - [System.Int32] - $AutoDagTotalNumberOfDatabases, - - [System.String] - $AutoDagVolumesRootFolderPath, - - [System.String[]] - $DatabaseAvailabilityGroupIpAddresses, - - [ValidateSet("Off","DagOnly")] - [System.String] - $DatacenterActivationMode, - - [System.String] - $DomainController, - - [ValidateSet("NTFS","ReFS")] - [System.String] - $FileSystem, - - [System.Boolean] - $ManualDagNetworkConfiguration, - - [ValidateSet("Disabled","Enabled","InterSubnetOnly","SeedOnly")] - [System.String] - $NetworkCompression, - - [ValidateSet("Disabled","Enabled","InterSubnetOnly","SeedOnly")] - [System.String] - $NetworkEncryption, - - [System.String] - $PreferenceMoveFrequency, - - [System.Boolean] - $ReplayLagManagerEnabled, - - [System.UInt16] - $ReplicationPort, - - [System.Boolean] - $SkipDagValidation, - - [System.String] - $WitnessDirectory, - - [System.String] - $WitnessServer - ) - - AddParameters -PSBoundParametersIn $PSBoundParameters -ParamsToAdd @{"Identity" = $PSBoundParameters["Name"]; "ErrorAction" = "SilentlyContinue"} - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","ErrorAction","DomainController" - - return (Get-DatabaseAvailabilityGroup @PSBoundParameters -Status) -} - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroup/MSFT_xExchDatabaseAvailabilityGroup.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroup/MSFT_xExchDatabaseAvailabilityGroup.schema.mof deleted file mode 100644 index d482cef4..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroup/MSFT_xExchDatabaseAvailabilityGroup.schema.mof +++ /dev/null @@ -1,37 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchDatabaseAvailabilityGroup")] -class MSFT_xExchDatabaseAvailabilityGroup : OMI_BaseResource -{ - [Key] String Name; //The name of the DAG - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - - //Remaining properties correspond directly to Set-DatabaseAvailabilityGroup parameters - //http://technet.microsoft.com/en-us/library/dd297934(v=exchg.150).aspx - [Required] SInt32 AutoDagTotalNumberOfServers; //Required so that we can determine when all DAG members have been added - [Write] String AlternateWitnessDirectory; - [Write] String AlternateWitnessServer; - [Write] Boolean AutoDagAutoRedistributeEnabled; - [Write] Boolean AutoDagAutoReseedEnabled; - [Write] SInt32 AutoDagDatabaseCopiesPerDatabase; - [Write] SInt32 AutoDagDatabaseCopiesPerVolume; - [Write] String AutoDagDatabasesRootFolderPath; - [Write] Boolean AutoDagDiskReclaimerEnabled; - [Write] SInt32 AutoDagTotalNumberOfDatabases; - [Write] String AutoDagVolumesRootFolderPath; - [Write] String DatabaseAvailabilityGroupIpAddresses[]; - [Write, ValueMap{"Off","DagOnly"}, Values{"Off","DagOnly"}] String DatacenterActivationMode; - [Write] String DomainController; - [Write, ValueMap{"NTFS","ReFS"}, Values{"NTFS","ReFS"}] String FileSystem; - [Write] Boolean ManualDagNetworkConfiguration; - [Write, ValueMap{"Disabled","Enabled","InterSubnetOnly","SeedOnly"}, Values{"Disabled","Enabled","InterSubnetOnly","SeedOnly"}] String NetworkCompression; - [Write, ValueMap{"Disabled","Enabled","InterSubnetOnly","SeedOnly"}, Values{"Disabled","Enabled","InterSubnetOnly","SeedOnly"}] String NetworkEncryption; - [Write] String PreferenceMoveFrequency; - [Write] Boolean ReplayLagManagerEnabled; - [Write] Uint16 ReplicationPort; - [Write] Boolean SkipDagValidation; - [Write] String WitnessDirectory; - [Write] String WitnessServer; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroupMember/MSFT_xExchDatabaseAvailabilityGroupMember.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroupMember/MSFT_xExchDatabaseAvailabilityGroupMember.psm1 deleted file mode 100644 index 1ff49bcd..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroupMember/MSFT_xExchDatabaseAvailabilityGroupMember.psm1 +++ /dev/null @@ -1,178 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $MailboxServer, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [System.String] - $DAGName, - - [System.String] - $DomainController, - - [System.Boolean] - $SkipDagValidation - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"MailboxServer" = $MailboxServer;"DAGName" = $DAGName} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-DatabaseAvailabilityGroup" -VerbosePreference $VerbosePreference - - #Setup params - AddParameters -PSBoundParametersIn $PSBoundParameters -ParamsToAdd @{"Identity" = $PSBoundParameters["DAGName"]} - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - $dag = Get-DatabaseAvailabilityGroup @PSBoundParameters -Status -ErrorAction SilentlyContinue - - if ($null -ne $dag -and $null -ne $dag.Servers) - { - #See if this server is already in the DAG - $server = $dag.Servers | Where-Object {$_.Name -eq "$($MailboxServer)"} - - if ($null -ne $server) - { - $returnValue = @{ - MailboxServer = $MailboxServer - DAGName = $dag.Name - } - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $MailboxServer, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [System.String] - $DAGName, - - [System.String] - $DomainController, - - [System.Boolean] - $SkipDagValidation - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"MailboxServer" = $MailboxServer;"DAGName" = $DAGName} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Add-DatabaseAvailabilityGroupServer" -VerbosePreference $VerbosePreference - - #Setup params - AddParameters -PSBoundParametersIn $PSBoundParameters -ParamsToAdd @{"Identity" = $PSBoundParameters["DAGName"]} - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "DAGName","Credential" - - $failoverClusteringRole = Get-WindowsFeature -Name Failover-Clustering -ErrorAction SilentlyContinue - - #Make sure the Failover-Clustering role is installed before trying to add the member to the DAG - if ($null -eq $failoverClusteringRole -or !$failoverClusteringRole.Installed) - { - Write-Error "The Failover-Clustering role must be fully installed before the server can be added to the cluster." - return - } - #Force a reboot if the cluster is in an InstallPending state - elseif ($failoverClusteringRole.InstallState -like "InstallPending") - { - Write-Warning "A reboot is required to finish installing the Failover-Clustering role. This must occur before the server can be added to the DAG." - $global:DSCMachineStatus = 1 - return - } - - Add-DatabaseAvailabilityGroupServer @PSBoundParameters -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $MailboxServer, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [System.String] - $DAGName, - - [System.String] - $DomainController, - - [System.Boolean] - $SkipDagValidation - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"MailboxServer" = $MailboxServer;"DAGName" = $DAGName} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-DatabaseAvailabilityGroup" -VerbosePreference $VerbosePreference - - #Setup params - AddParameters -PSBoundParametersIn $PSBoundParameters -ParamsToAdd @{"Identity" = $PSBoundParameters["DAGName"]} - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - $dag = Get-DatabaseAvailabilityGroup @PSBoundParameters -Status -ErrorAction SilentlyContinue - - if ($null -ne $dag -and $dag.Name -like "$($DAGName)") - { - $server = $dag.Servers | Where-Object {$_.Name -eq "$($MailboxServer)"} - - return ($null -ne $server) - } - - return $false -} - - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroupMember/MSFT_xExchDatabaseAvailabilityGroupMember.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroupMember/MSFT_xExchDatabaseAvailabilityGroupMember.schema.mof deleted file mode 100644 index bb42164f..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroupMember/MSFT_xExchDatabaseAvailabilityGroupMember.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchDatabaseAvailabilityGroupMember")] -class MSFT_xExchDatabaseAvailabilityGroupMember : OMI_BaseResource -{ - [Key] String MailboxServer; //Must be Hostname of Server, not FQDN - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - [Required] String DAGName; //Name of DAG to add member to - [Write] String DomainController; //Domain controller to talk to when running Add-DatabaseAvailabilityGroupMember - [Write] Boolean SkipDagValidation; //Whether SkipDagValidation should be passed to Add-DatabaseAvailabilityGroupMember -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroupNetwork/MSFT_xExchDatabaseAvailabilityGroupNetwork.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroupNetwork/MSFT_xExchDatabaseAvailabilityGroupNetwork.psm1 deleted file mode 100644 index c6be4a4a..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroupNetwork/MSFT_xExchDatabaseAvailabilityGroupNetwork.psm1 +++ /dev/null @@ -1,312 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseAvailabilityGroup, - - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [System.String] - $DomainController, - - [System.Boolean] - $IgnoreNetwork, - - [System.Boolean] - $ReplicationEnabled, - - [System.String[]] - $Subnets - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Name" = $Name; "DatabaseAvailabilityGroup" = $DatabaseAvailabilityGroup} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-DatabaseAvailabilityGroupNetwork" -VerbosePreference $VerbosePreference - - $dagNet = GetDatabaseAvailabilityGroupNetwork @PSBoundParameters - - if ($null -ne $dagNet) - { - $returnValue = @{ - Name = $Name - DatabaseAvailabilityGroup = $DatabaseAvailabilityGroup - IgnoreNetwork = $dagNet.IgnoreNetwork - ReplicationEnabled = $dagNet.ReplicationEnabled - Subnets = $dagNet.Subnets - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseAvailabilityGroup, - - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [System.String] - $DomainController, - - [System.Boolean] - $IgnoreNetwork, - - [System.Boolean] - $ReplicationEnabled, - - [System.String[]] - $Subnets - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Name" = $Name; "DatabaseAvailabilityGroup" = $DatabaseAvailabilityGroup} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "*DatabaseAvailabilityGroup*" -VerbosePreference $VerbosePreference - - $dagId = "$($DatabaseAvailabilityGroup)\$($Name)" - - $dagNet = GetDatabaseAvailabilityGroupNetwork @PSBoundParameters - - if ($Ensure -eq "Absent") - { - #Only try to remove the network if it has 0 associated subnets - if ($null -ne $dagNet) - { - if ($null -eq $dagNet.Subnets -or $dagNet.Subnets.Count -eq 0) - { - Remove-DatabaseAvailabilityGroupNetwork -Identity "$($dagId)" -Confirm:$false - } - else - { - throw "Unable to remove network, as it still has associated subnets." - } - } - } - else - { - #Remove Credential and Ensure so we don't pass it into the next command - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Credential","Ensure" - - SetEmptyStringParamsToNull -PSBoundParametersIn $PSBoundParameters - - if ($null -eq $dagNet) #Need to create a new network - { - $dagNet = New-DatabaseAvailabilityGroupNetwork @PSBoundParameters - Set-DatabaseAvailabilityGroup -Identity $DatabaseAvailabilityGroup -DiscoverNetworks - } - else #Set props on the existing network - { - AddParameters -PSBoundParametersIn $PSBoundParameters -ParamsToAdd @{"Identity" = $dagId} - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Name","DatabaseAvailabilityGroup" - - Set-DatabaseAvailabilityGroupNetwork @PSBoundParameters - } - } -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseAvailabilityGroup, - - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [System.String] - $DomainController, - - [System.Boolean] - $IgnoreNetwork, - - [System.Boolean] - $ReplicationEnabled, - - [System.String[]] - $Subnets - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Name" = $Name; "DatabaseAvailabilityGroup" = $DatabaseAvailabilityGroup} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-DatabaseAvailabilityGroupNetwork" -VerbosePreference $VerbosePreference - - $dagNet = GetDatabaseAvailabilityGroupNetwork @PSBoundParameters - - if ($null -eq $dagNet) - { - if ($Ensure -eq "Present") - { - ReportBadSetting -SettingName "Ensure" -ExpectedValue "Present" -ActualValue "Absent" -VerbosePreference $VerbosePreference - return $false - } - else - { - return $true - } - } - else - { - if ($Ensure -eq "Absent") - { - ReportBadSetting -SettingName "Ensure" -ExpectedValue "Absent" -ActualValue "Present" -VerbosePreference $VerbosePreference - return $false - } - else - { - if (!(VerifySetting -Name "IgnoreNetwork" -Type "Boolean" -ExpectedValue $IgnoreNetwork -ActualValue $dagNet.IgnoreNetwork -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ReplicationEnabled" -Type "Boolean" -ExpectedValue $ReplicationEnabled -ActualValue $dagNet.ReplicationEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "Subnets" -Type "Array" -ExpectedValue $Subnets -ActualValue (SubnetsToArray -Subnets $dagNet.Subnets) -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - } - } - - #If we made it here, all tests passed - return $true -} - -#Runs Get-DatabaseAvailabilityGroupNetwork, only specifying Identity, and optionally DomainController -function GetDatabaseAvailabilityGroupNetwork -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseAvailabilityGroup, - - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [System.String] - $DomainController, - - [System.Boolean] - $IgnoreNetwork, - - [System.Boolean] - $ReplicationEnabled, - - [System.String[]] - $Subnets - ) - - AddParameters -PSBoundParametersIn $PSBoundParameters -ParamsToAdd @{"Identity" = "$($DatabaseAvailabilityGroup)\$($Name)"; "ErrorAction" = "SilentlyContinue"} - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","ErrorAction","DomainController" - - return (Get-DatabaseAvailabilityGroupNetwork @PSBoundParameters) -} - - -#Takes an array of Microsoft.Exchange.Data.DatabaseAvailabilityGroupNetworkSubnet objects and converts the SubnetId props to a string[] -function SubnetsToArray -{ - param ($Subnets) - - if ($null -ne $Subnets -and $Subnets.Count -gt 0) - { - [string[]]$SubnetsOut = $Subnets[0].SubnetId - - for ($i = 1; $i -lt $Subnets.Count; $i++) - { - $SubnetsOut += $Subnets[$i].SubnetId - } - } - - return $SubnetsOut -} - - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroupNetwork/MSFT_xExchDatabaseAvailabilityGroupNetwork.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroupNetwork/MSFT_xExchDatabaseAvailabilityGroupNetwork.schema.mof deleted file mode 100644 index c9ee17ae..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchDatabaseAvailabilityGroupNetwork/MSFT_xExchDatabaseAvailabilityGroupNetwork.schema.mof +++ /dev/null @@ -1,19 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchDatabaseAvailabilityGroupNetwork")] -class MSFT_xExchDatabaseAvailabilityGroupNetwork : OMI_BaseResource -{ - [Key] String Name; //The name of the DAG network - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - [Required] String DatabaseAvailabilityGroup; //The DAG where the network will live - [Required, ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; //Whethe the DAG network should exist or not - - //Remaining properties correspond directly to Set-DatabaseAvailabilityGroupNetwork parameters - //http://technet.microsoft.com/en-us/library/dd298008(v=exchg.150).aspx - [Write] String DomainController; - [Write] Boolean IgnoreNetwork; - [Write] Boolean ReplicationEnabled; - [Write] String Subnets[]; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchEcpVirtualDirectory/MSFT_xExchEcpVirtualDirectory.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchEcpVirtualDirectory/MSFT_xExchEcpVirtualDirectory.psm1 deleted file mode 100644 index e9c67cda..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchEcpVirtualDirectory/MSFT_xExchEcpVirtualDirectory.psm1 +++ /dev/null @@ -1,321 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $AdfsAuthentication, - - [System.Boolean] - $BasicAuthentication, - - [System.Boolean] - $DigestAuthentication, - - [System.String] - $DomainController, - - [System.String[]] - $ExternalAuthenticationMethods, - - [System.String] - $ExternalUrl, - - [System.Boolean] - $FormsAuthentication, - - [System.String] - $InternalUrl, - - [System.Boolean] - $WindowsAuthentication - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad 'Get-EcpVirtualDirectory' -VerbosePreference $VerbosePreference - - $EcpVdir = GetEcpVirtualDirectory @PSBoundParameters - - if ($null -ne $EcpVdir) - { - $returnValue = @{ - DigestAuthentication = $EcpVdir.DigestAuthentication - AdfsAuthentication = $EcpVdir.AdfsAuthentication - ExternalAuthenticationMethods = $EcpVdir.ExternalAuthenticationMethods - Identity = $Identity - InternalUrl = $EcpVdir.InternalUrl - ExternalUrl = $EcpVdir.ExternalUrl - FormsAuthentication = $EcpVdir.FormsAuthentication - WindowsAuthentication = $EcpVdir.WindowsAuthentication - BasicAuthentication = $EcpVdir.BasicAuthentication - - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $AdfsAuthentication, - - [System.Boolean] - $BasicAuthentication, - - [System.Boolean] - $DigestAuthentication, - - [System.String] - $DomainController, - - [System.String[]] - $ExternalAuthenticationMethods, - - [System.String] - $ExternalUrl, - - [System.Boolean] - $FormsAuthentication, - - [System.String] - $InternalUrl, - - [System.Boolean] - $WindowsAuthentication - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad 'Set-EcpVirtualDirectory' -VerbosePreference $VerbosePreference - - #Ensure an empty string is $null and not a string - SetEmptyStringParamsToNull -PSBoundParametersIn $PSBoundParameters - - #Remove Credential and AllowServiceRestart because those parameters do not exist on Set-OwaVirtualDirectory - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'Credential','AllowServiceRestart' - - Set-EcpVirtualDirectory @PSBoundParameters - - If($AllowServiceRestart -eq $true) - { - Write-Verbose "Recycling MSExchangeECPAppPool" - - RestartAppPoolIfExists -Name MSExchangeECPAppPool - } - else - { - Write-Warning "The configuration will not take effect until MSExchangeECPAppPool is manually recycled." - } -} - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $AdfsAuthentication, - - [System.Boolean] - $BasicAuthentication, - - [System.Boolean] - $DigestAuthentication, - - [System.String] - $DomainController, - - [System.String[]] - $ExternalAuthenticationMethods, - - [System.String] - $ExternalUrl, - - [System.Boolean] - $FormsAuthentication, - - [System.String] - $InternalUrl, - - [System.Boolean] - $WindowsAuthentication - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad 'Get-EcpVirtualDirectory' -VerbosePreference $VerbosePreference - - #Ensure an empty string is $null and not a string - SetEmptyStringParamsToNull -PSBoundParametersIn $PSBoundParameters - - $EcpVdir = GetEcpVirtualDirectory @PSBoundParameters - - if ($null -eq $EcpVdir) - { - return $false - } - else - { - if (!(VerifySetting -Name "InternalUrl" -Type "String" -ExpectedValue $InternalUrl -ActualValue $EcpVdir.InternalUrl.AbsoluteUri -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExternalUrl" -Type "String" -ExpectedValue $ExternalUrl -ActualValue $EcpVdir.ExternalUrl.AbsoluteUri -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "FormsAuthentication" -Type "Boolean" -ExpectedValue $FormsAuthentication -ActualValue $EcpVdir.FormsAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "WindowsAuthentication" -Type "Boolean" -ExpectedValue $WindowsAuthentication -ActualValue $EcpVdir.WindowsAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "BasicAuthentication" -Type "Boolean" -ExpectedValue $BasicAuthentication -ActualValue $EcpVdir.BasicAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "DigestAuthentication" -Type "Boolean" -ExpectedValue $DigestAuthentication -ActualValue $EcpVdir.DigestAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "AdfsAuthentication" -Type "Boolean" -ExpectedValue $AdfsAuthentication -ActualValue $EcpVdir.AdfsAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExternalAuthenticationMethods" -Type "Array" -ExpectedValue $ExternalAuthenticationMethods -ActualValue $EcpVdir.ExternalAuthenticationMethods -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - } - - #If the code made it this for all properties are in a desired state - return $true -} - -function GetEcpVirtualDirectory -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $AdfsAuthentication, - - [System.Boolean] - $BasicAuthentication, - - [System.Boolean] - $DigestAuthentication, - - [System.String] - $DomainController, - - [System.String[]] - $ExternalAuthenticationMethods, - - [System.String] - $ExternalUrl, - - [System.Boolean] - $FormsAuthentication, - - [System.String] - $InternalUrl, - - [System.Boolean] - $WindowsAuthentication - ) - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - return (Get-EcpVirtualDirectory @PSBoundParameters) -} - - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchEcpVirtualDirectory/MSFT_xExchEcpVirtualDirectory.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchEcpVirtualDirectory/MSFT_xExchEcpVirtualDirectory.schema.mof deleted file mode 100644 index 4ffd73ea..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchEcpVirtualDirectory/MSFT_xExchEcpVirtualDirectory.schema.mof +++ /dev/null @@ -1,23 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchEcpVirtualDirectory")] -class MSFT_xExchEcpVirtualDirectory : OMI_BaseResource -{ - [Key] String Identity; //The Identity of the ECP Virtual Directory - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - [Write] Boolean AllowServiceRestart; //Whether it is OK to recycle the app pool after making changes. Defaults to $true. - - //Remaining properties correspond directly to Set-EcpVirtualDirectory parameters - //http://technet.microsoft.com/en-us/library/dd297991(v=exchg.150).aspx - [Write] Boolean AdfsAuthentication; - [Write] Boolean BasicAuthentication; - [Write] Boolean DigestAuthentication; - [Write] String DomainController; - [Write] String ExternalAuthenticationMethods[]; - [Write] Boolean FormsAuthentication; - [Write] String ExternalUrl; - [Write] String InternalUrl; - [Write] Boolean WindowsAuthentication; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchEventLogLevel/MSFT_xExchEventLogLevel.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchEventLogLevel/MSFT_xExchEventLogLevel.psm1 deleted file mode 100644 index 1ee3762f..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchEventLogLevel/MSFT_xExchEventLogLevel.psm1 +++ /dev/null @@ -1,133 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [ValidateSet("Lowest","Low","Medium","High","Expert")] - [System.String] - $Level - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-EventLogLevel" -VerbosePreference $VerbosePreference - - $eventLogLevel = Get-EventLogLevel -Identity "$($env:COMPUTERNAME)\$($Identity)" - - if ($null -ne $eventLogLevel) - { - $returnValue = @{ - Identity = $Identity - Level = $eventLogLevel.EventLevel - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [ValidateSet("Lowest","Low","Medium","High","Expert")] - [System.String] - $Level - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Set-EventLogLevel" -VerbosePreference $VerbosePreference - - Set-EventLogLevel -Identity "$($env:COMPUTERNAME)\$($Identity)" -Level $Level -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [ValidateSet("Lowest","Low","Medium","High","Expert")] - [System.String] - $Level - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-EventLogLevel" -VerbosePreference $VerbosePreference - - $eventLogLevel = Get-EventLogLevel -Identity "$($env:COMPUTERNAME)\$($Identity)" - - if ($null -eq $eventLogLevel) - { - Write-Error "Failed to retrieve any objects with specified Identity." - - return $false - } - else - { - if (!(VerifySetting -Name "Level" -Type "String" -ExpectedValue $Level -ActualValue $eventLogLevel.EventLevel -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - } - - return $true -} - - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchEventLogLevel/MSFT_xExchEventLogLevel.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchEventLogLevel/MSFT_xExchEventLogLevel.schema.mof deleted file mode 100644 index b0b755d6..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchEventLogLevel/MSFT_xExchEventLogLevel.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchEventLogLevel")] -class MSFT_xExchEventLogLevel : OMI_BaseResource -{ - [Key, Description("The Identity parameter specifies the name of the event logging category for which you want to set the event logging level.")] String Identity; - [Required, Description("Credentials used to establish a remote Powershell session to Exchange"), EmbeddedInstance("MSFT_Credential")] String Credential; - [Required, Description("The Level parameter specifies the log level for the specific event logging category."), ValueMap{"Lowest","Low","Medium","High","Expert"}, Values{"Lowest","Low","Medium","High","Expert"}] String Level; -}; - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchExchangeCertificate/MSFT_xExchExchangeCertificate.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchExchangeCertificate/MSFT_xExchExchangeCertificate.psm1 deleted file mode 100644 index 74c67bee..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchExchangeCertificate/MSFT_xExchExchangeCertificate.psm1 +++ /dev/null @@ -1,349 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Thumbprint, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - #Only used by Test-TargetResource - [System.Boolean] - $AllowExtraServices = $false, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $CertCreds, - - [System.String] - $CertFilePath, - - [System.String] - $DomainController, - - [System.String[]] - $Services - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Thumbprint" = $Thumbprint} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-ExchangeCertificate" -VerbosePreference $VerbosePreference - - $cert = GetExchangeCertificate @PSBoundParameters - - if ($null -ne $cert) - { - $returnValue = @{ - Thumbprint = $Thumbprint - Services = $cert.Services.ToString() - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "")] - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Thumbprint, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - #Only used by Test-TargetResource - [System.Boolean] - $AllowExtraServices = $false, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $CertCreds, - - [System.String] - $CertFilePath, - - [System.String] - $DomainController, - - [System.String[]] - $Services - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Thumbprint" = $Thumbprint} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "*ExchangeCertificate" -VerbosePreference $VerbosePreference - - $cert = GetExchangeCertificate @PSBoundParameters - - #Check whether any UM services are being enabled, and if they weren't enable before. If so, we should stop those services, enable the cert, then start them up - $needUMServiceReset = $false - $needUMCallRouterServiceReset = $false - - if ($null -ne $cert) - { - $currentServices = StringToArray -StringIn $cert.Services -Separator ',' - } - - if ((Array2ContainsArray1Contents -Array2 $Services -Array1 "UM" -IgnoreCase $true) -eq $true) - { - if ($null -eq $cert -or (Array2ContainsArray1Contents -Array2 $currentServices -Array1 "UM" -IgnoreCase $true) -eq $false) - { - $needUMServiceReset = $true - } - } - - if ((Array2ContainsArray1Contents -Array2 $Services -Array1 "UMCallRouter" -IgnoreCase $true) -eq $true) - { - if ($null -eq $cert -or (Array2ContainsArray1Contents -Array2 $currentServices -Array1 "UMCallRouter" -IgnoreCase $true) -eq $false) - { - $needUMCallRouterServiceReset = $true - } - } - - #Stop required services before working with the cert - if ($needUMServiceReset -eq $true) - { - Write-Verbose "Stopping service MSExchangeUM before enabling the UM service on the certificate" - Stop-Service -Name MSExchangeUM -Confirm:$false - } - - if ($needUMCallRouterServiceReset -eq $true) - { - Write-Verbose "Stopping service MSExchangeUMCR before enabling the UMCallRouter service on the certificate" - Stop-Service -Name MSExchangeUMCR -Confirm:$false - } - - #The desired cert is not present. Deal with that scenario. - if ($null -eq $cert) - { - #If the cert is null and it's supposed to be present, then we need to import one - if ($Ensure -eq "Present") - { - $cert = Import-ExchangeCertificate -FileData ([Byte[]]$(Get-Content -Path "$($CertFilePath)" -Encoding Byte -ReadCount 0)) -Password:$CertCreds.Password -Server $env:COMPUTERNAME - } - } - else - { - #cert is present and it shouldn't be. Remove it - if ($Ensure -eq "Absent") - { - Remove-ExchangeCertificate -Thumbprint $Thumbprint -Confirm:$false -Server $env:COMPUTERNAME - } - } - - #Cert is present. Set props on it - if ($Ensure -eq "Present") - { - if ($null -ne $cert) - { - NotePreviousError - - Enable-ExchangeCertificate -Thumbprint $Thumbprint -Services $Services -Force -Server $env:COMPUTERNAME - - ThrowIfNewErrorsEncountered -CmdletBeingRun "Enable-ExchangeCertificate" -VerbosePreference $VerbosePreference - } - else - { - Write-Error "Failed to install certificate" - } - } - - #Start UM services that we started - if ($needUMServiceReset -eq $true) - { - Write-Verbose "Starting service MSExchangeUM" - Start-Service -Name MSExchangeUM -Confirm:$false - } - - if ($needUMCallRouterServiceReset -eq $true) - { - Write-Verbose "Starting service MSExchangeUMCR" - Start-Service -Name MSExchangeUMCR -Confirm:$false - } -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Thumbprint, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - #Only used by Test-TargetResource - [System.Boolean] - $AllowExtraServices = $false, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $CertCreds, - - [System.String] - $CertFilePath, - - [System.String] - $DomainController, - - [System.String[]] - $Services - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Thumbprint" = $Thumbprint} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-ExchangeCertificate" -VerbosePreference $VerbosePreference - - $cert = GetExchangeCertificate @PSBoundParameters - - $result = $false - - if ($null -ne $cert) - { - if ($Ensure -eq "Present") - { - $result = CompareCertServices -ServicesActual $cert.Services -ServicesDesired $Services -AllowExtraServices $AllowExtraServices - } - } - elseif ($Ensure -eq "Absent") - { - $result = $true - } - - $result -} - -#Runs Get-ExchangeCertificate, only specifying Thumbprint, ErrorAction, and optionally DomainController -function GetExchangeCertificate -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Thumbprint, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - #Only used by Test-TargetResource - [System.Boolean] - $AllowExtraServices = $false, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $CertCreds, - - [System.String] - $CertFilePath, - - [System.String] - $DomainController, - - [System.String[]] - $Services - ) - - #Remove params we don't want to pass into the next command - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Thumbprint","DomainController" - - return (Get-ExchangeCertificate @PSBoundParameters -ErrorAction SilentlyContinue -Server $env:COMPUTERNAME) -} - -<# -.Synopsis -Compares whether services from a certificate object match the services that were requested. -If AllowsExtraServices is true, it is OK for more services to be on the cert than were requested, -as long as the requested services are present. -#> - -function CompareCertServices -{ - param([string]$ServicesActual, [string[]]$ServicesDesired, [boolean]$AllowExtraServices) - - $actual = StringToArray -StringIn $ServicesActual -Separator ',' - - if ($AllowExtraServices -eq $true) - { - if (!([string]::IsNullOrEmpty($ServicesDesired)) -and $ServicesDesired.Contains("NONE")) - { - $result = $true - } - else - { - $result = Array2ContainsArray1Contents -Array1 $ServicesDesired -Array2 $actual -IgnoreCase - } - } - else - { - $result = CompareArrayContents -Array1 $actual -Array2 $ServicesDesired -IgnoreCase - } - - return $result -} - - -Export-ModuleMember -Function *-TargetResource -Export-ModuleMember -Function CompareCertServices - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchExchangeCertificate/MSFT_xExchExchangeCertificate.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchExchangeCertificate/MSFT_xExchExchangeCertificate.schema.mof deleted file mode 100644 index 6d8e2d6b..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchExchangeCertificate/MSFT_xExchExchangeCertificate.schema.mof +++ /dev/null @@ -1,16 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchExchangeCertificate")] -class MSFT_xExchExchangeCertificate : OMI_BaseResource -{ - [Key] String Thumbprint; //Thumbprint of the certificate to work on - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - [Required, ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; //Whether the certificate should be present or not - [Write] Boolean AllowExtraServices; //Get-ExchangeCertificate sometimes displays more services than are actually enabled. Setting this to true allows tests to pass in that situation as long as the requested services are present. - [Write, EmbeddedInstance("MSFT_Credential")] String CertCreds; //Credentials containing the password to the .pfx file in CertFilePath - [Write] String CertFilePath; //The file path to the certificate .pfx file that should be imported - [Write] String DomainController; //Domain Controller to talk to - [Write] String Services[]; //Services to enable on the certificate. See: http://technet.microsoft.com/en-us/library/aa997231(v=exchg.150).aspx -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchExchangeServer/MSFT_xExchExchangeServer.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchExchangeServer/MSFT_xExchExchangeServer.psm1 deleted file mode 100644 index 395fac16..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchExchangeServer/MSFT_xExchExchangeServer.psm1 +++ /dev/null @@ -1,309 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $CustomerFeedbackEnabled, - - [System.String] - $DomainController, - - [System.String] - $InternetWebProxy, - - [System.String] - $MonitoringGroup, - - [System.String] - $ProductKey, - - [System.String] - $WorkloadManagementPolicy - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-ExchangeServer","Set-ExchangeServer" -VerbosePreference $VerbosePreference - - if ($PSBoundParameters.ContainsKey("WorkloadManagementPolicy") -and (CheckForCmdletParameter -CmdletName "Set-ExchangeServer" -ParameterName "WorkloadManagementPolicy") -eq $false) - { - Write-Warning "WorkloadManagementPolicy has been removed from the Set-ExchangeServer cmdlet. This parameter will be ignored." - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "WorkloadManagementPolicy" - } - - $server = GetExchangeServer @PSBoundParameters - - if ($null -ne $server) - { - #There's no way to read the product key that was sent in, so just mark it is "Licensed" if it is - if ($server.IsExchangeTrialEdition -eq $false) - { - $ProductKey = "Licensed" - } - else - { - $ProductKey = "" - } - - $returnValue = @{ - Identity = $Identity - CustomerFeedbackEnabled = $server.CustomerFeedbackEnabled - InternetWebProxy = $server.InternetWebProxy.AbsoluteUri - MonitoringGroup = $server.MonitoringGroup - ProductKey = $ProductKey - WorkloadManagementPolicy = $server.WorkloadManagementPolicy - } - } - - $returnValue -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $CustomerFeedbackEnabled, - - [System.String] - $DomainController, - - [System.String] - $InternetWebProxy, - - [System.String] - $MonitoringGroup, - - [System.String] - $ProductKey, - - [System.String] - $WorkloadManagementPolicy - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-ExchangeServer","Set-ExchangeServer" -VerbosePreference $VerbosePreference - - if ($PSBoundParameters.ContainsKey("WorkloadManagementPolicy") -and (CheckForCmdletParameter -CmdletName "Set-ExchangeServer" -ParameterName "WorkloadManagementPolicy") -eq $false) - { - Write-Warning "WorkloadManagementPolicy has been removed from the Set-ExchangeServer cmdlet. This parameter will be ignored." - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "WorkloadManagementPolicy" - } - - #Check existing config first to see if we are currently licensing a server - $server = GetExchangeServer @PSBoundParameters - - $needRestart = $false - - if ($PSBoundParameters.ContainsKey("ProductKey") -and !([string]::IsNullOrEmpty($ProductKey)) -and $null -ne $server -and $server.IsExchangeTrialEdition -eq $true) - { - $needRestart = $true - } - - #Setup params for next command - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Credential","AllowServiceRestart" - - SetEmptyStringParamsToNull -PSBoundParametersIn $PSBoundParameters - - Set-ExchangeServer @PSBoundParameters - - #Restart service if needed - if ($needRestart) - { - if ($AllowServiceRestart -eq $true) - { - Write-Verbose "Restarting Information Store" - - Restart-Service MSExchangeIS - } - else - { - Write-Warning "The configuration will not take effect until MSExchangeIS is manually restarted." - } - } -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $CustomerFeedbackEnabled, - - [System.String] - $DomainController, - - [System.String] - $InternetWebProxy, - - [System.String] - $MonitoringGroup, - - [System.String] - $ProductKey, - - [System.String] - $WorkloadManagementPolicy - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-ExchangeServer","Set-ExchangeServer" -VerbosePreference $VerbosePreference - - if ($PSBoundParameters.ContainsKey("WorkloadManagementPolicy") -and (CheckForCmdletParameter -CmdletName "Set-ExchangeServer" -ParameterName "WorkloadManagementPolicy") -eq $false) - { - Write-Warning "WorkloadManagementPolicy has been removed from the Set-ExchangeServer cmdlet. This parameter will be ignored." - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "WorkloadManagementPolicy" - } - - $server = GetExchangeServer @PSBoundParameters - - if ($null -eq $server) #Couldn't find the server, which is bad - { - return $false - } - else #Validate server params - { - if (!(VerifySetting -Name "CustomerFeedbackEnabled" -Type "Boolean" -ExpectedValue $CustomerFeedbackEnabled -ActualValue $server.CustomerFeedbackEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if ($PSBoundParameters.ContainsKey("InternetWebProxy") -and !(CompareStrings -String1 $InternetWebProxy -String2 $server.InternetWebProxy.AbsoluteUri -IgnoreCase)) - { - #The AbsolueUri that comes back from the server can have a trailing slash. Check if the AbsoluteUri at least contains the requested Uri - if (($null -ne $server.InternetWebProxy -and $null -ne $server.InternetWebProxy.AbsoluteUri -and $server.InternetWebProxy.AbsoluteUri.Contains($InternetWebProxy)) -eq $false) - { - ReportBadSetting -SettingName "InternetWebProxy" -ExpectedValue $InternetWebProxy -ActualValue $server.InternetWebProxy -VerbosePreference $VerbosePreference - return $false - } - } - - if (!(VerifySetting -Name "MonitoringGroup" -Type "String" -ExpectedValue $MonitoringGroup -ActualValue $server.MonitoringGroup -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if ($PSBoundParameters.ContainsKey("ProductKey") -and !([string]::IsNullOrEmpty($ProductKey)) -and $server.IsExchangeTrialEdition -eq $true) - { - ReportBadSetting -SettingName "ProductKey" -ExpectedValue $ProductKey -ActualValue $server.ProductKey -VerbosePreference $VerbosePreference - return $false - } - - if (!(VerifySetting -Name "WorkloadManagementPolicy" -Type "String" -ExpectedValue $WorkloadManagementPolicy -ActualValue $server.WorkloadManagementPolicy -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - } - - return $true -} - -#Runs Get-ExchangeServer, only specifying Identity, and optionally DomainController -function GetExchangeServer -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [System.Boolean] - $CustomerFeedbackEnabled, - - [System.String] - $DomainController, - - [System.String] - $InternetWebProxy, - - [System.String] - $MonitoringGroup, - - [System.String] - $ProductKey, - - [System.String] - $WorkloadManagementPolicy, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false - ) - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - return (Get-ExchangeServer @PSBoundParameters) -} - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchExchangeServer/MSFT_xExchExchangeServer.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchExchangeServer/MSFT_xExchExchangeServer.schema.mof deleted file mode 100644 index d8092614..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchExchangeServer/MSFT_xExchExchangeServer.schema.mof +++ /dev/null @@ -1,20 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchExchangeServer")] -class MSFT_xExchExchangeServer : OMI_BaseResource -{ - [Key] String Identity; //The hostname of the Exchange Server to configure - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - [Write] Boolean AllowServiceRestart; - - //Remaining properties correspond directly to Set-ExchangeServer parameters - //http://technet.microsoft.com/en-us/library/bb123716(v=exchg.150).aspx - [Write] Boolean CustomerFeedbackEnabled; - [Write] String DomainController; - [Write] String InternetWebProxy; - [Write] String MonitoringGroup; - [Write] String ProductKey; - [Write] String WorkloadManagementPolicy; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchImapSettings/MSFT_xExchImapSettings.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchImapSettings/MSFT_xExchImapSettings.psm1 deleted file mode 100644 index 83bbad2b..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchImapSettings/MSFT_xExchImapSettings.psm1 +++ /dev/null @@ -1,228 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Server, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.String] - $DomainController, - - [ValidateSet("PlainTextLogin","PlainTextAuthentication","SecureLogin")] - [System.String] - $LoginType, - - [System.String[]] - $ExternalConnectionSettings, - - [System.String] - $X509CertificateName - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Server" = $Server} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-ImapSettings" -VerbosePreference $VerbosePreference - - $imap = GetImapSettings @PSBoundParameters - - if ($null -ne $imap) - { - $returnValue = @{ - Server = $Identity - LoginType = $imap.LoginType - ExternalConnectionSettings = $imap.ExternalConnectionSettings - X509CertificateName = $imap.X509CertificateName - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Server, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.String] - $DomainController, - - [ValidateSet("PlainTextLogin","PlainTextAuthentication","SecureLogin")] - [System.String] - $LoginType, - - [System.String[]] - $ExternalConnectionSettings, - - [System.String] - $X509CertificateName - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Server" = $Server} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Set-ImapSettings" -VerbosePreference $VerbosePreference - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Credential","AllowServiceRestart" - - Set-ImapSettings @PSBoundParameters - - if ($AllowServiceRestart -eq $true) - { - Write-Verbose "Restarting IMAP Services" - - Get-Service MSExchangeIMAP4* | Restart-Service - } - else - { - Write-Warning "The configuration will not take effect until MSExchangeIMAP4 services are manually restarted." - } -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Server, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.String] - $DomainController, - - [ValidateSet("PlainTextLogin","PlainTextAuthentication","SecureLogin")] - [System.String] - $LoginType, - - [System.String[]] - $ExternalConnectionSettings, - - [System.String] - $X509CertificateName - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Server" = $Server} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-ImapSettings" -VerbosePreference $VerbosePreference - - SetEmptyStringParamsToNull -PSBoundParametersIn $PSBoundParameters - - $imap = GetImapSettings @PSBoundParameters - - if ($null -eq $imap) - { - return $false - } - else - { - if (!(VerifySetting -Name "LoginType" -Type "String" -ExpectedValue $LoginType -ActualValue $imap.LoginType -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExternalConnectionSettings" -Type "Array" -ExpectedValue $ExternalConnectionSettings -ActualValue $imap.ExternalConnectionSettings -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "X509CertificateName" -Type "String" -ExpectedValue $X509CertificateName -ActualValue $imap.X509CertificateName -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - } - - return $true -} - -function GetImapSettings -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Server, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.String] - $DomainController, - - [ValidateSet("PlainTextLogin","PlainTextAuthentication","SecureLogin")] - [System.String] - $LoginType, - - [System.String[]] - $ExternalConnectionSettings, - - [System.String] - $X509CertificateName - ) - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Server","DomainController" - - return (Get-ImapSettings @PSBoundParameters) -} - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchImapSettings/MSFT_xExchImapSettings.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchImapSettings/MSFT_xExchImapSettings.schema.mof deleted file mode 100644 index 98b6d6d2..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchImapSettings/MSFT_xExchImapSettings.schema.mof +++ /dev/null @@ -1,15 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchImapSettings")] -class MSFT_xExchImapSettings : OMI_BaseResource -{ - [Key] String Server; //The IMAP server to configure - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - [Write] Boolean AllowServiceRestart; //Whether it is OK to restart the IMAP services after making changes. Defaults to $false. - [Write] String DomainController; //Optional Domain Controller to connect to - [Write, ValueMap{"PlainTextLogin","PlainTextAuthentication","SecureLogin"}, Values{"PlainTextLogin","PlainTextAuthentication","SecureLogin"}] String LoginType; //The LoginType to be used for IMAP - [Write] String ExternalConnectionSettings[]; //Specifies the host name, port, and encryption type that Exchange uses when IMAP clients connect to their email from the outside - [Write] String X509CertificateName; //Specifies the host name in the SSL certificate from the Associated Subject field. -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchInstall/MSFT_xExchInstall.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchInstall/MSFT_xExchInstall.psm1 deleted file mode 100644 index 67273dab..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchInstall/MSFT_xExchInstall.psm1 +++ /dev/null @@ -1,282 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory=$true)] - [System.String] - $Path, - - [Parameter(Mandatory=$true)] - [System.String] - $Arguments, - - [Parameter(Mandatory=$true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Path" = $Path; "Arguments" = $Arguments} -VerbosePreference $VerbosePreference - - $returnValue = @{ - Path = $Path - Arguments = $Arguments - } - - $returnValue -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory=$true)] - [System.String] - $Path, - - [Parameter(Mandatory=$true)] - [System.String] - $Arguments, - - [Parameter(Mandatory=$true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Path" = $Path; "Arguments" = $Arguments} -VerbosePreference $VerbosePreference - - $installStatus = GetInstallStatus -Arguments $Arguments - - if ($installStatus.ShouldStartInstall -eq $true) - { - #Check if WSMan needs to be configured, as it will require an immediate reboot - $needReboot = CheckWSManConfig - - if ($needReboot -eq $true) - { - Write-Warning "Server needs a reboot before the installation of Exchange can begin." - return - } - - Write-Verbose "Initiating Exchange Setup. Command: $($Path) $($Arguments)" - - StartScheduledTask -Path "$($Path)" -Arguments "$($Arguments)" -Credential $Credential -TaskName "Install Exchange" -VerbosePreference $VerbosePreference - - $detectedExsetup = $false - - Write-Verbose "Waiting up to 60 seconds before exiting to give time for ExSetup.exe to start" - - for ($i = 0; $i -lt 60; $i++) - { - if ($null -eq (Get-Process -Name ExSetup -ErrorAction SilentlyContinue)) - { - Start-Sleep -Seconds 1 - } - else - { - Write-Verbose "Detected that ExSetup.exe is running" - $detectedExsetup = $true - break - } - } - - if ($detectedExsetup -eq $false) - { - throw "Waited 60 seconds, but was unable to detect that ExSetup.exe was started" - } - - #Now wait for setup to finish - while ($null -ne (Get-Process -Name ExSetup -ErrorAction SilentlyContinue)) - { - Write-Verbose "Setup is still running at $([DateTime]::Now). Sleeping for 1 minute." - Start-Sleep -Seconds 60 - } - } - else - { - if ($installStatus.SetupComplete) - { - Write-Verbose "Exchange setup has already successfully completed." - } - else - { - Write-Verbose "Exchange setup is already in progress." - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory=$true)] - [System.String] - $Path, - - [Parameter(Mandatory=$true)] - [System.String] - $Arguments, - - [Parameter(Mandatory=$true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Path" = $Path; "Arguments" = $Arguments} -VerbosePreference $VerbosePreference - - $installStatus = GetInstallStatus -Arguments $Arguments - - if ($installStatus.ShouldStartInstall -eq $true) - { - if($installStatus.ShouldInstallLanguagePack -eq $true) - { - Write-Verbose "Language pack will be installed" - } - else - { - Write-Verbose "Exchange is either not installed, or a previous install only partially completed." - } - } - else - { - if ($installStatus.SetupComplete) - { - Write-Verbose "Exchange setup has already successfully completed." - } - else - { - Write-Verbose "Exchange setup is already in progress." - } - } - - return (!($installStatus.ShouldStartInstall)) -} - -#Checks for the exact status of Exchange setup and returns the results in a Hashtable -function GetInstallStatus -{ - param - ( - $Arguments - ) - - $shouldStartInstall = $false - - $shouldInstallLanguagePack = ShouldInstallLanguagePack -Arguments $Arguments - $setupRunning = IsSetupRunning - $setupComplete = IsSetupComplete - $exchangePresent = IsExchangePresent - $setupPartiallyComplete = IsSetupPartiallyCompleted - - if ($setupRunning -eq $true -or $setupComplete -eq $true) - { - if($shouldInstallLanguagePack -eq $true -and $setupComplete -eq $true) - { - $shouldStartInstall = $true - } - else - { - #Do nothing. Either Install is already running, or it's already finished successfully - } - } - elseif ($exchangePresent -eq $false -or $setupPartiallyComplete -eq $true) - { - $shouldStartInstall = $true - } - - $returnValue = @{ - ShouldInstallLanguagePack = $shouldInstallLanguagePack - SetupRunning = $setupRunning - SetupComplete = $setupComplete - ExchangePresent = $exchangePresent - SetupPartiallyComplete = $setupPartiallyComplete - ShouldStartInstall = $shouldStartInstall - } - - $returnValue -} - -#Check for missing registry keys that may cause Exchange setup to try to restart WinRM mid setup , which will in turn cause the DSC resource to fail -#If any required keys are missing, configure WinRM, then force a reboot -function CheckWSManConfig -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseDeclaredVarsMoreThanAssignments", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - () - - $needReboot = $false - - $wsmanKey = Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WSMAN" -ErrorAction SilentlyContinue - - if ($null -ne $wsmanKey) - { - if ($null -eq $wsmanKey.UpdatedConfig) - { - $needReboot = $true - - Write-Verbose "Value 'UpdatedConfig' missing from registry key HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WSMAN. Running: winrm i restore winrm/config" - - Set-Location "$($env:windir)\System32\inetsrv" - Invoke-Expression -Command "winrm i restore winrm/config" | Out-Null - - Write-Verbose "Machine needs to be rebooted before Exchange setup can proceed" - - $global:DSCMachineStatus = 1 - } - } - else - { - throw "Unable to find registry key: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WSMAN" - } - - return $needReboot -} - -function ShouldInstallLanguagePack -{ - param - ( - [System.String] - $Arguments - ) - - if($Arguments -match '(?<=/AddUMLanguagePack:)(([a-z]{2}-[A-Z]{2},?)+)(?=\s)') - { - $Cultures = $Matches[0] - Write-Verbose "AddUMLanguagePack parameters detected: $Cultures" - $Cultures = $Cultures -split "," - - foreach($Culture in $Cultures) - { - if((IsUMLanguagePackInstalled -Culture $Culture) -eq $false) - { - Write-Verbose "UM Language Pack: $Culture is not installed" - return $true - } - } - } - return $false -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchInstall/MSFT_xExchInstall.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchInstall/MSFT_xExchInstall.schema.mof deleted file mode 100644 index 82fdc55e..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchInstall/MSFT_xExchInstall.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("xExchInstall")] -class MSFT_xExchInstall : OMI_BaseResource -{ - [Key, Description("Full path to setup.exe in the Exchange 2013 setup directory")] String Path; - [Key, Description("Command line arguments to pass to setup.exe")] String Arguments; - [Required, Description("The credentials to use to perform the installation"), EmbeddedInstance("MSFT_Credential")] String Credential; -}; - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchJetstress/MSFT_xExchJetstress.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchJetstress/MSFT_xExchJetstress.psm1 deleted file mode 100644 index cf450fcc..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchJetstress/MSFT_xExchJetstress.psm1 +++ /dev/null @@ -1,399 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Performance","Stress","DatabaseBackup","SoftRecovery")] - [System.String] - $Type, - - [parameter(Mandatory = $true)] - [System.String] - $JetstressPath, - - [parameter(Mandatory = $true)] - [System.String] - $JetstressParams, - - [System.UInt32] - $MaxWaitMinutes = 0, - - [System.UInt32] - $MinAchievedIOPS = 0 - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"JetstressPath" = $JetstressPath; "JetstressParams" = $JetstressParams} -VerbosePreference $VerbosePreference - - $returnValue = @{ - Type = $Type - JetstressPath = $JetstressPath - JetstressParams = $JetstressParams - MaxWaitMinutes = $MaxWaitMinutes - } - - $returnValue -} - -function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseDeclaredVarsMoreThanAssignments", "")] - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Performance","Stress","DatabaseBackup","SoftRecovery")] - [System.String] - $Type, - - [parameter(Mandatory = $true)] - [System.String] - $JetstressPath, - - [parameter(Mandatory = $true)] - [System.String] - $JetstressParams, - - [System.UInt32] - $MaxWaitMinutes = 0, - - [System.UInt32] - $MinAchievedIOPS = 0 - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"JetstressPath" = $JetstressPath; "JetstressParams" = $JetstressParams} -VerbosePreference $VerbosePreference - - $jetstressRunning = IsJetstressRunning - $jetstressSuccessful = JetstressTestSuccessful @PSBoundParameters - - if ($jetstressSuccessful -eq $false -and (Get-ChildItem -LiteralPath "$($JetstressPath)" | Where-Object {$null -ne $_.Name -like "$($Type)*.html"})) - { - throw "Jetstress was previously executed and resulted in a failed run. Clean up any $($Type)*.html files in the Jetstress install directory before trying to run this resource again." - } - - if ($jetstressRunning -eq $false) #Jetstress isn't running. Kick it off - { - $initializingESE = $false - - #If the ESE counters haven't been registered for Perfmon, Jetstress is going to need to initialize ESE and restart the process. - if ((Test-Path -LiteralPath "$($env:SystemRoot)\Inf\ESE\eseperf.ini") -eq $false) - { - $initializingESE = $true - } - - #Create and start the Jetstress scheduled task - StartJetstress @PSBoundParameters - - #Give an additional 60 seconds if ESE counters were just initialized. - if ($initializingESE -eq $true) - { - Write-Verbose "Jetstress has never initialized performance counters for ESE. Waiting a full 60 seconds for this to occurr" - - Start-Sleep -Seconds 5 - - for ($i = 55; $i -gt 0; $i--) - { - $jetstressRunning = IsJetstressRunning - - if ($jetstressRunning -eq $false) - { - break - } - else - { - Start-Sleep -Seconds 1 - } - } - - #I've found that Jetstress doesn't always restart after loading ESE when running as local system in a scheduled task in the background - #If Jetstress isn't running at this point, but the perf counters were registered, we probably need to reboot the server - #If Jetstress isn't running and ESE is not registered, something failed. - if ($jetstressRunning -eq $false) - { - if ((Test-Path -LiteralPath "$($env:SystemRoot)\Inf\ESE\eseperf.ini") -eq $true) - { - Write-Verbose "ESE performance counters were registered. Need to reboot server." - - $global:DSCMachineStatus = 1 - return - } - else - { - throw "Jetstress failed to register MSExchange Database performance counters" - } - } - else - { - #Looks like Jetstress restarted itself successfully. Let's let it run. - } - } - else - { - $jetstressRunning = IsJetstressRunning - } - - #Wait up to a minute for Jetstress to start. If it hasn't started by then, something went wrong - $checkMaxTime = [DateTime]::Now.AddMinutes(1) - - while ($jetstressRunning -eq $false -and $checkMaxTime -gt [DateTime]::Now) - { - $jetstressRunning = IsJetstressRunning - - if ($jetstressRunning -eq $false) - { - Start-Sleep -Seconds 1 - } - } - - if ($jetstressRunning -eq $false) - { - throw "Waited 60 seconds after launching the Jetstress scheduled task, but failed to detect that JetstressCmd.exe is running" - } - } - - while ($jetstressRunning -eq $true) - { - Write-Verbose "Jetstress is still running at '$([DateTime]::Now)'." - - #Wait for 5 minutes before logging to the screen again, but actually check every 5 seconds whether Jetstress has completed. - for ($i = 0; $i -lt 300 -and $jetstressRunning -eq $true; $i += 5) - { - $jetstressRunning = IsJetstressRunning - - if ($jetstressRunning -eq $true) - { - Start-Sleep -Seconds 5 - } - } - } - - #Check the final status on the Jetstress run - if ($jetstressRunning -eq $false) - { - Write-Verbose "Jetstress testing finished at '$([DateTime]::Now)'." - - $overallTestSuccessful = JetstressTestSuccessful @PSBoundParameters - - if ($overallTestSuccessful -eq $false) - { - throw "Jetstress finished running, but the test did not complete successfully" - } - else - { - Write-Verbose "Jetstress finished, and the configured test passed" - } - } - else - { - throw "Jetstress is still running after waiting $($MaxWaitMinutes) minutes" - } -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Performance","Stress","DatabaseBackup","SoftRecovery")] - [System.String] - $Type, - - [parameter(Mandatory = $true)] - [System.String] - $JetstressPath, - - [parameter(Mandatory = $true)] - [System.String] - $JetstressParams, - - [System.UInt32] - $MaxWaitMinutes = 0, - - [System.UInt32] - $MinAchievedIOPS = 0 - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"JetstressPath" = $JetstressPath; "JetstressParams" = $JetstressParams} -VerbosePreference $VerbosePreference - - $jetstressRunning = IsJetstressRunning -MaximumWaitSeconds 1 - - if ($jetstressRunning -eq $true) - { - return $false - } - else - { - $jetstressSuccessful = JetstressTestSuccessful @PSBoundParameters - - return $jetstressSuccessful - } -} - -#Checks whether the JetstressCmd.exe process is currently running -function IsJetstressRunning -{ - $process = Get-Process -Name JetstressCmd -ErrorAction SilentlyContinue - - return ($null -ne $process) -} - -#Used to create a scheduled task which will initiate the Jetstress run -function StartJetstress -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Performance","Stress","DatabaseBackup","SoftRecovery")] - [System.String] - $Type, - - [parameter(Mandatory = $true)] - [System.String] - $JetstressPath, - - [parameter(Mandatory = $true)] - [System.String] - $JetstressParams, - - [System.UInt32] - $MaxWaitMinutes = 0, - - [System.UInt32] - $MinAchievedIOPS = 0 - ) - - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - $fullPath = Join-Path -Path "$($JetstressPath)" -ChildPath "JetstressCmd.exe" - - StartScheduledTask -Path "$($fullPath)" -Arguments "$($JetstressParams)" -WorkingDirectory "$($JetstressPath)" -TaskName "Jetstress" -MaxWaitMinutes $MaxWaitMinutes -VerbosePreference $VerbosePreference -TaskPriority 1 -} - -#Looks in the latest Type*.html file to determine whether the last Jetstress run passed -function JetstressTestSuccessful -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Performance","Stress","DatabaseBackup","SoftRecovery")] - [System.String] - $Type, - - [parameter(Mandatory = $true)] - [System.String] - $JetstressPath, - - [parameter(Mandatory = $true)] - [System.String] - $JetstressParams, - - [System.UInt32] - $MaxWaitMinutes = 0, - - [System.UInt32] - $MinAchievedIOPS = 0 - ) - - $overallTestSuccessful = $false - $achievedIOPSTarget = $false - - $outputFiles = Get-ChildItem -LiteralPath "$($JetstressPath)" | Where-Object {$_.Name -like "$($Type)*.html"} - - if ($null -ne $outputFiles -and $outputFiles.Count -ge 1) - { - $outputFiles = $outputFiles | Sort-Object -Property LastWriteTime -Descending - - $latest = $outputFiles[0] - - $content = Get-Content -LiteralPath "$($latest.FullName)" - - $foundOverallResults = $false - $foundAchievedIOPS = $false - - for ($i = 0; $i -lt $content.Length -and ($foundOverallResults -eq $false -or $foundAchievedIOPS -eq $false); $i++) - { - if ($content[$i].Contains("Overall Test Result") -or $content[$i].Contains("Achieved Transactional I/O per Second")) - { - $resultStart = $content[$i + 1].IndexOf('>') + 1 - $resultEnd = $content[$i + 1].LastIndexOf('<') - - $result = $content[$i + 1].Substring($resultStart, $resultEnd - $resultStart) - - if ($content[$i].Contains("Overall Test Result")) - { - $foundOverallResults = $true - - Write-Verbose "File $($latest.FullName)'' has an 'Overall Test Result' of '$($result)'" - - if ($result -like "Pass") - { - $overallTestSuccessful = $true - } - } - else - { - $foundAchievedIOPS = $true - - if ([string]::IsNullOrEmpty($result) -eq $false) - { - Write-Verbose "File $($latest.FullName)'' has an 'Achieved Transactional I/O per Second' value of '$($result)'" - - [Decimal]$decResult = [Decimal]::Parse($result) - - if ($decResult -ge $MinAchievedIOPS) - { - $achievedIOPSTarget = $true - } - } - else - { - Write-Verbose "Value for 'Achieved Transactional I/O per Second' is empty" - } - } - } - } - - if ($foundOverallResults -eq $false) - { - Write-Verbose "Unable to find 'Overall Test Result' in file '$($latest.FullName)'" - } - - if ($foundAchievedIOPS -eq $false) - { - Write-Verbose "Unable to find 'Achieved Transactional I/O per Second' in file '$($latest.FullName)'" - } - } - else - { - Write-Verbose "Unable to find any files matching '$($Type)*.html' in folder '$($JetstressPath)'" - } - - return ($overallTestSuccessful -eq $true -and $achievedIOPSTarget -eq $true) -} - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchJetstress/MSFT_xExchJetstress.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchJetstress/MSFT_xExchJetstress.schema.mof deleted file mode 100644 index cf7d002d..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchJetstress/MSFT_xExchJetstress.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchJetstress")] -class MSFT_xExchJetstress : OMI_BaseResource -{ - [Key, Description("Specifies the Type which was defined in the JetstressConfig.xml file. Valid values are Performance, Stress, DatabaseBackup, or SoftRecovery. Defaults to Performance."), ValueMap{"Performance","Stress","DatabaseBackup","SoftRecovery"}, Values{"Performance","Stress","DatabaseBackup","SoftRecovery"}] String Type; - [Required, Description("The path to the folder where Jetstress is installed, and which contains JetstressCmd.exe")] String JetstressPath; - [Required, Description("Command line parameters to pass into JetstressCmd.exe")] String JetstressParams; - [Write, Description("The maximum amount of time that the Scheduled Task which runs Jetstress can execute for. Defaults to 0, which means there is no time limit.")] Uint32 MaxWaitMinutes; - [Write, Description("The minimum value reported in the Achieved Transactional I/O per Second section of the Jetstress report for the run to be considered successful. Defaults to 0.")] Uint32 MinAchievedIOPS; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchJetstressCleanup/MSFT_xExchJetstressCleanup.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchJetstressCleanup/MSFT_xExchJetstressCleanup.psm1 deleted file mode 100644 index 73a5056d..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchJetstressCleanup/MSFT_xExchJetstressCleanup.psm1 +++ /dev/null @@ -1,440 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $JetstressPath, - - [System.String] - $ConfigFilePath, - - [System.String[]] - $DatabasePaths, - - [System.Boolean] - $DeleteAssociatedMountPoints, - - [System.String[]] - $LogPaths, - - [System.String] - $OutputSaveLocation, - - [System.Boolean] - $RemoveBinaries - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"JetstressPath" = $JetstressPath} -VerbosePreference $VerbosePreference - - $returnValue = @{ - JetstressPath = $JetstressPath - } - - $returnValue -} - -function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseDeclaredVarsMoreThanAssignments", "")] - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $JetstressPath, - - [System.String] - $ConfigFilePath, - - [System.String[]] - $DatabasePaths, - - [System.Boolean] - $DeleteAssociatedMountPoints, - - [System.String[]] - $LogPaths, - - [System.String] - $OutputSaveLocation, - - [System.Boolean] - $RemoveBinaries - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeDiskPart.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"JetstressPath" = $JetstressPath} -VerbosePreference $VerbosePreference - - VerifyParameters @PSBoundParameters - - $jetstressInstalled = IsJetstressInstalled - - if ($jetstressInstalled) - { - throw "Jetstress must be uninstalled before using the xExchJetstressCleanup resource" - } - - #If a config file was specified, pull the database and log paths out and put them into $DatabasePaths and $LogPaths - if ($PSBoundParameters.ContainsKey("ConfigFilePath")) - { - [xml]$configFile = LoadConfigXml -ConfigFilePath "$($ConfigFilePath)" - - [string[]]$DatabasePaths = $configFile.configuration.ExchangeProfile.EseInstances.EseInstance.DatabasePaths.Path - [string[]]$LogPaths = $configFile.configuration.ExchangeProfile.EseInstances.EseInstance.LogPath - } - - [string[]]$FoldersToRemove = $DatabasePaths + $LogPaths - - #Now delete the specified directories - [Hashtable]$ParentFoldersToRemove = @{} #Only used if $DeleteAssociatedMountPoints is $true - - foreach ($path in $FoldersToRemove) - { - #Get the parent folder for the specified path - $parent = GetParentFolderFromString -Folder "$($path)" - - if (([string]::IsNullOrEmpty($parent) -eq $false -and $ParentFoldersToRemove.ContainsKey($parent) -eq $false)) - { - $ParentFoldersToRemove.Add($parent, $null) - } - - RemoveFolder -Path "$($path)" - } - - #Delete associated mount points if requested - if ($DeleteAssociatedMountPoints -eq $true -and $ParentFoldersToRemove.Count -gt 0) - { - GetDiskInfo - - foreach ($parent in $ParentFoldersToRemove.Keys) - { - if ($null -eq (Get-ChildItem -LiteralPath "$($parent)" -ErrorAction SilentlyContinue)) - { - $volNum = MountPointExists -Path "$($parent)" - - if ($volNum -ge 0) - { - StartDiskpart -Commands "select volume $($volNum)","remove mount=`"$($parent)`"" -VerbosePreference $VerbosePreference | Out-Null - - RemoveFolder -Path "$($parent)" - } - else - { - Write-Warning "Folder '$($parent)' does not have an associated mount point." - } - } - else - { - Write-Warning "Folder '$($parent)' still has child items. Skipping removing mount point." - } - } - } - - #Clean up binaries if requested - if ($RemoveBinaries -eq $true -and (Test-Path -LiteralPath "$($JetstressPath)") -eq $true) - { - #Move output files if requested - if ([string]::IsNullOrEmpty($OutputSaveLocation) -eq $false) - { - if ((Test-Path -LiteralPath "$($OutputSaveLocation)") -eq $false) - { - mkdir -Path "$($OutputSaveLocation)" - } - - $outputFiles = Get-ChildItem -LiteralPath "$($JetstressPath)" | ` - Where-Object {$_.Name -like "Performance*" -or $_.Name -like "Stress*" -or $_.Name -like "DBChecksum*" -or $_.Name -like "XmlConfig*" -or $_.Name -like "*.evt" -or $_.Name -like "*.log"} - - $outputFiles | Move-Item -Destination "$($OutputSaveLocation)" -Confirm:$false -Force - } - - #Now remove the Jetstress folder - - #If the config file is in the Jetstress directory, remove everything but the config file, or else running Test-TargetResource after removing the directory will fail - if ((GetFolderNoTrailingSlash -Folder "$($JetstressPath)") -like (GetParentFolderFromString -Folder "$($ConfigFilePath)")) - { - Get-ChildItem -LiteralPath "$($JetstressPath)" | Where-Object {$_.FullName -notlike "$($ConfigFilePath)"} | Remove-Item -Recurse -Confirm:$false -Force - } - else #No config file in this directory. Remove the whole thing - { - RemoveFolder -Path "$($JetstressPath)" - } - } - - #Test if we successfully cleaned up Jetstress. If so, flag or initiate a reboot - $cleanedUp = Test-TargetResource @PSBoundParameters - - if ($cleanedUp -eq $true) - { - Write-Verbose "Jetstress was successfully cleaned up. A reboot must occur to finish the cleanup." - - $global:DSCMachineStatus = 1 - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $JetstressPath, - - [System.String] - $ConfigFilePath, - - [System.String[]] - $DatabasePaths, - - [System.Boolean] - $DeleteAssociatedMountPoints, - - [System.String[]] - $LogPaths, - - [System.String] - $OutputSaveLocation, - - [System.Boolean] - $RemoveBinaries - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeDiskPart.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"JetstressPath" = $JetstressPath} -VerbosePreference $VerbosePreference - - VerifyParameters @PSBoundParameters - - $jetstressInstalled = IsJetstressInstalled - - if ($jetstressInstalled) - { - Write-Verbose "Jetstress is still installed" - return $false - } - else - { - #If a config file was specified, pull the database and log paths out and put them into $DatabasePaths and $LogPaths - if ($PSBoundParameters.ContainsKey("ConfigFilePath")) - { - [xml]$configFile = LoadConfigXml -ConfigFilePath "$($ConfigFilePath)" - - [string[]]$FoldersToRemove = $configFile.configuration.ExchangeProfile.EseInstances.EseInstance.DatabasePaths.Path + $configFile.configuration.ExchangeProfile.EseInstances.EseInstance.LogPath - } - else - { - [string[]]$FoldersToRemove = $DatabasePaths + $LogPaths - } - - #First make sure DB and log folders were cleaned up - GetDiskInfo - - foreach ($folder in $FoldersToRemove) - { - #If DeleteAssociatedMountPoints was requested, make sure the parent folder doesn't have a mount point - if ($DeleteAssociatedMountPoints -eq $true) - { - $parent = GetParentFolderFromString -Folder "$($folder)" - - if ((MountPointExists -Path "$($parent)") -ge 0) - { - Write-Verbose "Folder '$($parent)' still has a mount point associated with it." - return $false - } - } - - #Now check the folder itself - if ((Test-Path -LiteralPath "$($folder)") -eq $true) - { - Write-Verbose "Folder '$($folder)' still exists." - return $false - } - } - - #Now check for binaries - if ($RemoveBinaries -eq $true -and (Test-Path -LiteralPath "$($JetstressPath)") -eq $true) - { - if ((GetFolderNoTrailingSlash -Folder "$($JetstressPath)") -like (GetParentFolderFromString -Folder "$($ConfigFilePath)")) - { - $items = Get-ChildItem -LiteralPath "$($JetstressPath)" | Where-Object {$_.FullName -notlike "$($ConfigFilePath)"} - - if ($null -ne $items -or $items.Count -gt 0) - { - Write-Verbose "Folder '$($JetstressPath)' still exists and contains items that are not the config file." - return $false - } - } - else - { - Write-Verbose "Folder '$($JetstressPath)' still exists." - return $false - } - } - } - - Write-Verbose "Jetstress has been successfully cleaned up." - - return $true -} - -#Verifies that parameters for Jetstress were passed in correctly. Throws an exception if not. -function VerifyParameters -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $JetstressPath, - - [System.String] - $ConfigFilePath, - - [System.String[]] - $DatabasePaths, - - [System.Boolean] - $DeleteAssociatedMountPoints, - - [System.String[]] - $LogPaths, - - [System.String] - $OutputSaveLocation, - - [System.Boolean] - $RemoveBinaries - ) - - if ($PSBoundParameters.ContainsKey("ConfigFilePath") -eq $false -and ($PSBoundParameters.ContainsKey("DatabasePaths") -eq $false -or $PSBoundParameters.ContainsKey("LogPaths") -eq $false)) - { - throw "Either the ConfigFilePath parameter must be specified, or DatabasePaths and LogPaths must be specified." - } - - if ($PSBoundParameters.ContainsKey("ConfigFilePath") -eq $true) - { - if ([string]::IsNullOrEmpty($ConfigFilePath) -or ((Test-Path -LiteralPath "$($ConfigFilePath)") -eq $false)) - { - throw "The path specified for ConfigFilePath, '$($ConfigFilePath)', is either invalid or inaccessible" - } - } - else - { - if ($null -eq $DatabasePaths -or $DatabasePaths.Count -eq 0) - { - throw "No paths were specified in the DatabasePaths parameter" - } - - if ($null -eq $LogPaths -or $LogPaths.Count -eq 0) - { - throw "No paths were specified in the LogPaths parameter" - } - } -} - -#Get a string for a folder without the trailing slash -function GetFolderNoTrailingSlash -{ - param([string]$Folder) - - if ($Folder.EndsWith('\')) - { - $Folder = $Folder.Substring(0, $Folder.Length - 1) - } - - return $Folder -} - -#Simple string parsing method to determine what the parent folder of a folder is given the child folder's path -function GetParentFolderFromString -{ - param([string]$Folder) - - $Folder = GetFolderNoTrailingSlash -Folder "$($Folder)" - - $parent = $Folder.Substring(0, $Folder.LastIndexOf('\')) - - return $parent -} - -#Removes the specified folder, if it exists, and all subdirectories -function RemoveFolder -{ - [CmdletBinding()] - param([string]$Path) - - if ((Test-Path -LiteralPath "$($Path)") -eq $true) - { - Write-Verbose "Attempting to remove folder '$($Path)' and all subfolders" - Remove-Item -LiteralPath "$($Path)" -Recurse -Confirm:$false -Force - } - else - { - Write-Verbose "Folder '$($Path)' does not exist. Skipping." - } -} - -#Loads the specified JetstressConfig.xml file and puts it into an [xml] variable -function LoadConfigXml -{ - [CmdletBinding()] - [OutputType([Xml])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $ConfigFilePath - ) - - [xml]$configFile = Get-Content -LiteralPath "$($ConfigFilePath)" - - if ($null -ne $configFile) - { - [string[]]$DatabasePaths = $configFile.configuration.ExchangeProfile.EseInstances.EseInstance.DatabasePaths.Path - [string[]]$LogPaths = $configFile.configuration.ExchangeProfile.EseInstances.EseInstance.LogPath - - if ($null -eq $DatabasePaths -or $DatabasePaths.Count -eq 0) - { - throw "Failed to read any database paths out of config file '$($ConfigFilePath)'" - } - elseif ($null -eq $LogPaths -or $LogPaths.Count -eq 0) - { - throw "Failed to read any log paths out of config file '$($ConfigFilePath)'" - } - } - else - { - throw "Failed to read config file at '$($ConfigFilePath)'" - } - - return $configFile -} - -#Checks whether Jetstress is installed by looking for Jetstress 2013's Product GUID -function IsJetstressInstalled -{ - return ($null -ne (Get-CimInstance -ClassName Win32_Product -Filter "IdentifyingNumber = '{75189587-0D84-4404-8F02-79C39728FA64}'")) -} - - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchJetstressCleanup/MSFT_xExchJetstressCleanup.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchJetstressCleanup/MSFT_xExchJetstressCleanup.schema.mof deleted file mode 100644 index e3224b0d..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchJetstressCleanup/MSFT_xExchJetstressCleanup.schema.mof +++ /dev/null @@ -1,15 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchJetstressCleanup")] -class MSFT_xExchJetstressCleanup : OMI_BaseResource -{ - [Key, Description("The path to the folder where Jetstress is installed, and which contains JetstressCmd.exe")] String JetstressPath; - [Write, Description("Either ConfigFilePath, or DatabasePaths AND LogPaths MUST be specified. ConfigFilePath takes precedence. This is the full path to the JetstressConfig.xml file. If ConfigFilePath is specified, the config file will be used to determine the database and log folders that need to be removed")] String ConfigFilePath; - [Write, Description("Either ConfigFilePath, or DatabasePaths AND LogPaths MUST be specified. DatabasePaths specifies the paths to database directories that should be cleaned up.")] String DatabasePaths[]; - [Write, Description("Defaults to $false. If specified, indicates that mount points associated with the Jetstress database and log paths should be removed")] Boolean DeleteAssociatedMountPoints; - [Write, Description("Either ConfigFilePath, or DatabasePaths AND LogPaths MUST be specified. LogPaths specifies the paths to log directories that should be cleaned up.")] String LogPaths[]; - [Write, Description("If RemoveBinaries is set to $true and Jetstress output was saved to the default location (the installation path of Jetstress), specifies the folder path to copy the Jetstress output files to.")] String OutputSaveLocation; - [Write, Description("Specifies that the files in the Jetstress installation directory should be removed")] Boolean RemoveBinaries; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxDatabase/MSFT_xExchMailboxDatabase.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxDatabase/MSFT_xExchMailboxDatabase.psm1 deleted file mode 100644 index 6895f852..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxDatabase/MSFT_xExchMailboxDatabase.psm1 +++ /dev/null @@ -1,992 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [System.UInt32] - $DatabaseCopyCount, - - [parameter(Mandatory = $true)] - [System.String] - $EdbFilePath, - - [parameter(Mandatory = $true)] - [System.String] - $LogFolderPath, - - [parameter(Mandatory = $true)] - [System.String] - $Server, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $AutoDagExcludeFromMonitoring, - - [System.Boolean] - $BackgroundDatabaseMaintenance, - - [System.String] - $CalendarLoggingQuota, - - [System.Boolean] - $CircularLoggingEnabled, - - [ValidateSet("None","SecondCopy","SecondDatacenter","AllDatacenters","AllCopies")] - [System.String] - $DataMoveReplicationConstraint, - - [System.String] - $DeletedItemRetention, - - [System.String] - $DomainController, - - [System.String] - $EventHistoryRetentionPeriod, - - [System.Boolean] - $IndexEnabled, - - [System.Boolean] - $IsExcludedFromProvisioning, - - [System.String] - $IsExcludedFromProvisioningReason, - - [System.String] - $IssueWarningQuota, - - [System.Boolean] - $IsSuspendedFromProvisioning, - - [System.String] - $JournalRecipient, - - [System.String] - $MailboxRetention, - - [System.Boolean] - $MountAtStartup, - - [System.String] - $OfflineAddressBook, - - [System.String] - $ProhibitSendQuota, - - [System.String] - $ProhibitSendReceiveQuota, - - [System.String] - $RecoverableItemsQuota, - - [System.String] - $RecoverableItemsWarningQuota, - - [System.Boolean] - $RetainDeletedItemsUntilBackup, - - [System.String] - $AdServerSettingsPreferredServer, - - [System.Boolean] - $SkipInitialDatabaseMount - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Name" = $Name} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-MailboxDatabase","Set-AdServerSettings" -VerbosePreference $VerbosePreference - - if ($PSBoundParameters.ContainsKey("AdServerSettingsPreferredServer") -and ![string]::IsNullOrEmpty($AdServerSettingsPreferredServer)) - { - Set-ADServerSettings –PreferredServer "$($AdServerSettingsPreferredServer)" - } - - $db = GetMailboxDatabase @PSBoundParameters - - if ($null -ne $db) - { - $returnValue = @{ - Name = $Name - Server = $Server - EdbFilePath = $EdbFilePath - LogFolderPath = $LogFolderPath - DatabaseCopyCount = $DatabaseCopyCount - AutoDagExcludeFromMonitoring = $db.AutoDagExcludeFromMonitoring - BackgroundDatabaseMaintenance = $db.BackgroundDatabaseMaintenance - CalendarLoggingQuota = $db.CalendarLoggingQuota - CircularLoggingEnabled = $db.CircularLoggingEnabled - DataMoveReplicationConstraint = $db.DataMoveReplicationConstraint - DeletedItemRetention = $db.DeletedItemRetention - EventHistoryRetentionPeriod = $db.EventHistoryRetentionPeriod - IndexEnabled = $db.IndexEnabled - IsExcludedFromProvisioning = $db.IsExcludedFromProvisioning - IssueWarningQuota = $db.IssueWarningQuota - IsSuspendedFromProvisioning = $db.IsSuspendedFromProvisioning - JournalRecipient = $db.JournalRecipient - MailboxRetention = $db.MailboxRetention - MountAtStartup = $db.MountAtStartup - OfflineAddressBook = $db.OfflineAddressBook - ProhibitSendQuota = $db.ProhibitSendQuota - ProhibitSendReceiveQuota = $db.ProhibitSendReceiveQuota - RecoverableItemsQuota = $db.RecoverableItemsQuota - RecoverableItemsWarningQuota = $db.RecoverableItemsWarningQuota - RetainDeletedItemsUntilBackup = $db.RetainDeletedItemsUntilBackup - } - - $serverVersion = GetExchangeVersion - - if ($serverVersion -eq "2016") - { - $returnValue.Add("IsExcludedFromProvisioningReason", $db.IsExcludedFromProvisioningReason) - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [System.UInt32] - $DatabaseCopyCount, - - [parameter(Mandatory = $true)] - [System.String] - $EdbFilePath, - - [parameter(Mandatory = $true)] - [System.String] - $LogFolderPath, - - [parameter(Mandatory = $true)] - [System.String] - $Server, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $AutoDagExcludeFromMonitoring, - - [System.Boolean] - $BackgroundDatabaseMaintenance, - - [System.String] - $CalendarLoggingQuota, - - [System.Boolean] - $CircularLoggingEnabled, - - [ValidateSet("None","SecondCopy","SecondDatacenter","AllDatacenters","AllCopies")] - [System.String] - $DataMoveReplicationConstraint, - - [System.String] - $DeletedItemRetention, - - [System.String] - $DomainController, - - [System.String] - $EventHistoryRetentionPeriod, - - [System.Boolean] - $IndexEnabled, - - [System.Boolean] - $IsExcludedFromProvisioning, - - [System.String] - $IsExcludedFromProvisioningReason, - - [System.String] - $IssueWarningQuota, - - [System.Boolean] - $IsSuspendedFromProvisioning, - - [System.String] - $JournalRecipient, - - [System.String] - $MailboxRetention, - - [System.Boolean] - $MountAtStartup, - - [System.String] - $OfflineAddressBook, - - [System.String] - $ProhibitSendQuota, - - [System.String] - $ProhibitSendReceiveQuota, - - [System.String] - $RecoverableItemsQuota, - - [System.String] - $RecoverableItemsWarningQuota, - - [System.Boolean] - $RetainDeletedItemsUntilBackup, - - [System.String] - $AdServerSettingsPreferredServer, - - [System.Boolean] - $SkipInitialDatabaseMount - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Name" = $Name} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "*MailboxDatabase","Move-DatabasePath","Mount-Database","Set-AdServerSettings" -VerbosePreference $VerbosePreference - - #Check for non-existent parameters in Exchange 2013 - RemoveVersionSpecificParameters -PSBoundParametersIn $PSBoundParameters -ParamName "IsExcludedFromProvisioningReason" -ResourceName "xExchMailboxDatabase" -ParamExistsInVersion "2016" - - if ($PSBoundParameters.ContainsKey("AdServerSettingsPreferredServer") -and ![string]::IsNullOrEmpty($AdServerSettingsPreferredServer)) - { - Set-ADServerSettings –PreferredServer "$($AdServerSettingsPreferredServer)" - } - - $db = GetMailboxDatabase @PSBoundParameters - - if ($null -eq $db) #Need to create a new DB - { - #Create a copy of the original parameters - $originalPSBoundParameters = @{} + $PSBoundParameters - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Name","Server","EdbFilePath","LogFolderPath","DomainController" - - #Create the database - $db = New-MailboxDatabase @PSBoundParameters - - if ($null -ne $db) - { - #Add original props back - AddParameters -PSBoundParametersIn $PSBoundParameters -ParamsToAdd $originalPSBoundParameters - - if ($AllowServiceRestart -eq $true) - { - Write-Verbose "Restarting Information Store" - - Restart-Service MSExchangeIS - } - else - { - Write-Warning "The configuration will not take effect until MSExchangeIS is manually restarted." - } - - #If MountAtStartup is not explicitly set to $false, mount the new database - if ($PSBoundParameters.ContainsKey("SkipInitialDatabaseMount") -eq $true -and $SkipInitialDatabaseMount -eq $true) - { - #Don't mount the DB, regardless of what else is set. - } - elseif ($PSBoundParameters.ContainsKey("MountAtStartup") -eq $false -or $MountAtStartup -eq $true) - { - Write-Verbose "Attempting to mount database." - - MountDatabase @PSBoundParameters - } - } - else - { - throw "Failed to create new Mailbox Database" - } - } - - if ($null -ne $db) #Set props on existing DB - { - #First check if a DB or log move is required - if (($PSBoundParameters.ContainsKey("EdbFilePath") -and (CompareStrings -String1 $db.EdbFilePath.PathName -String2 $EdbFilePath -IgnoreCase) -eq $false) -or - ($PSBoundParameters.ContainsKey("LogFolderPath") -and (CompareStrings -String1 $db.LogFolderPath.PathName -String2 $LogFolderPath -IgnoreCase) -eq $false)) - { - if ($db.DatabaseCopies.Count -le 1) - { - Write-Verbose "Moving database and/or log path" - - MoveDatabaseOrLogPath @PSBoundParameters - } - else - { - throw "Database must have only a single copy for the DB path or log path to be moved" - } - } - - #setup params - AddParameters -PSBoundParametersIn $PSBoundParameters -ParamsToAdd @{"Identity" = $Name} - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Name","Server","DatabaseCopyCount","AllowServiceRestart","EdbFilePath","LogFolderPath","Credential","AdServerSettingsPreferredServer","SkipInitialDatabaseMount" - - #Remove parameters that depend on all copies being added - if ($db.DatabaseCopies.Count -lt $DatabaseCopyCount) - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "CircularLoggingEnabled","DataMoveReplicationConstraint" - } - - Set-MailboxDatabase @PSBoundParameters - } -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [System.UInt32] - $DatabaseCopyCount, - - [parameter(Mandatory = $true)] - [System.String] - $EdbFilePath, - - [parameter(Mandatory = $true)] - [System.String] - $LogFolderPath, - - [parameter(Mandatory = $true)] - [System.String] - $Server, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $AutoDagExcludeFromMonitoring, - - [System.Boolean] - $BackgroundDatabaseMaintenance, - - [System.String] - $CalendarLoggingQuota, - - [System.Boolean] - $CircularLoggingEnabled, - - [ValidateSet("None","SecondCopy","SecondDatacenter","AllDatacenters","AllCopies")] - [System.String] - $DataMoveReplicationConstraint, - - [System.String] - $DeletedItemRetention, - - [System.String] - $DomainController, - - [System.String] - $EventHistoryRetentionPeriod, - - [System.Boolean] - $IndexEnabled, - - [System.Boolean] - $IsExcludedFromProvisioning, - - [System.String] - $IsExcludedFromProvisioningReason, - - [System.String] - $IssueWarningQuota, - - [System.Boolean] - $IsSuspendedFromProvisioning, - - [System.String] - $JournalRecipient, - - [System.String] - $MailboxRetention, - - [System.Boolean] - $MountAtStartup, - - [System.String] - $OfflineAddressBook, - - [System.String] - $ProhibitSendQuota, - - [System.String] - $ProhibitSendReceiveQuota, - - [System.String] - $RecoverableItemsQuota, - - [System.String] - $RecoverableItemsWarningQuota, - - [System.Boolean] - $RetainDeletedItemsUntilBackup, - - [System.String] - $AdServerSettingsPreferredServer, - - [System.Boolean] - $SkipInitialDatabaseMount - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Name" = $Name} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-MailboxDatabase","Get-Mailbox","Set-AdServerSettings" -VerbosePreference $VerbosePreference - - #Check for non-existent parameters in Exchange 2013 - RemoveVersionSpecificParameters -PSBoundParametersIn $PSBoundParameters -ParamName "IsExcludedFromProvisioningReason" -ResourceName "xExchMailboxDatabase" -ParamExistsInVersion "2016" - - if ($PSBoundParameters.ContainsKey("AdServerSettingsPreferredServer") -and ![string]::IsNullOrEmpty($AdServerSettingsPreferredServer)) - { - Set-ADServerSettings –PreferredServer "$($AdServerSettingsPreferredServer)" - } - - $db = GetMailboxDatabase @PSBoundParameters - - if ($null -eq $db) - { - return $false - } - else - { - if (!(VerifySetting -Name "AutoDagExcludeFromMonitoring" -Type "Boolean" -ExpectedValue $AutoDagExcludeFromMonitoring -ActualValue $db.AutoDagExcludeFromMonitoring -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "BackgroundDatabaseMaintenance" -Type "Boolean" -ExpectedValue $BackgroundDatabaseMaintenance -ActualValue $db.BackgroundDatabaseMaintenance -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "CalendarLoggingQuota" -Type "Unlimited" -ExpectedValue $CalendarLoggingQuota -ActualValue $db.CalendarLoggingQuota -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - #Only check these if all copies have been added - if ($db.DatabaseCopies.Count -ge $DatabaseCopyCount) - { - if (!(VerifySetting -Name "CircularLoggingEnabled" -Type "Boolean" -ExpectedValue $CircularLoggingEnabled -ActualValue $db.CircularLoggingEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "DataMoveReplicationConstraint" -Type "Boolean" -ExpectedValue $DataMoveReplicationConstraint -ActualValue $db.DataMoveReplicationConstraint -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - } - - if (!(VerifySetting -Name "DeletedItemRetention" -Type "Timespan" -ExpectedValue $DeletedItemRetention -ActualValue $db.DeletedItemRetention -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "EdbFilePath" -Type "String" -ExpectedValue $EdbFilePath -ActualValue $db.EdbFilePath.PathName -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "EventHistoryRetentionPeriod" -Type "Timespan" -ExpectedValue $EventHistoryRetentionPeriod -ActualValue $db.EventHistoryRetentionPeriod -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "IndexEnabled" -Type "Boolean" -ExpectedValue $IndexEnabled -ActualValue $db.IndexEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "IsExcludedFromProvisioning" -Type "Boolean" -ExpectedValue $IsExcludedFromProvisioning -ActualValue $db.IsExcludedFromProvisioning -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "IssueWarningQuota" -Type "Unlimited" -ExpectedValue $IssueWarningQuota -ActualValue $db.IssueWarningQuota -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "IsSuspendedFromProvisioning" -Type "Boolean" -ExpectedValue $IsSuspendedFromProvisioning -ActualValue $db.IsSuspendedFromProvisioning -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "JournalRecipient" -Type "ADObjectID" -ExpectedValue $JournalRecipient -ActualValue $db.JournalRecipient -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "LogFolderPath" -Type "String" -ExpectedValue $LogFolderPath -ActualValue $db.LogFolderPath.PathName -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MailboxRetention" -Type "Timespan" -ExpectedValue $MailboxRetention -ActualValue $db.MailboxRetention -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MountAtStartup" -Type "Boolean" -ExpectedValue $MountAtStartup -ActualValue $db.MountAtStartup -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - #Strip leading slash off the OAB now so it's easier to check - if ($PSBoundParameters.ContainsKey("OfflineAddressBook")) - { - if ($OfflineAddressBook.StartsWith('\')) - { - $OfflineAddressBook = $OfflineAddressBook.Substring(1) - } - - if ($db.OfflineAddressBook.Name.StartsWith('\')) - { - $dbOab = $db.OfflineAddressBook.Name.Substring(1) - } - else - { - $dbOab = $db.OfflineAddressBook.Name - } - } - - if (!(VerifySetting -Name "OfflineAddressBook" -Type "String" -ExpectedValue $OfflineAddressBook -ActualValue $dbOab -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ProhibitSendQuota" -Type "Unlimited" -ExpectedValue $ProhibitSendQuota -ActualValue $db.ProhibitSendQuota -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ProhibitSendReceiveQuota" -Type "Unlimited" -ExpectedValue $ProhibitSendReceiveQuota -ActualValue $db.ProhibitSendReceiveQuota -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "RecoverableItemsQuota" -Type "Unlimited" -ExpectedValue $RecoverableItemsQuota -ActualValue $db.RecoverableItemsQuota -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "RecoverableItemsWarningQuota" -Type "Unlimited" -ExpectedValue $RecoverableItemsWarningQuota -ActualValue $db.RecoverableItemsWarningQuota -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "RetainDeletedItemsUntilBackup" -Type "Boolean" -ExpectedValue $RetainDeletedItemsUntilBackup -ActualValue $db.RetainDeletedItemsUntilBackup -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - } - - return $true -} - -#Runs Get-MailboxDatabase, only specifying Identity and optionally DomainController -function GetMailboxDatabase -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [System.UInt32] - $DatabaseCopyCount, - - [parameter(Mandatory = $true)] - [System.String] - $EdbFilePath, - - [parameter(Mandatory = $true)] - [System.String] - $LogFolderPath, - - [parameter(Mandatory = $true)] - [System.String] - $Server, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $AutoDagExcludeFromMonitoring, - - [System.Boolean] - $BackgroundDatabaseMaintenance, - - [System.String] - $CalendarLoggingQuota, - - [System.Boolean] - $CircularLoggingEnabled, - - [ValidateSet("None","SecondCopy","SecondDatacenter","AllDatacenters","AllCopies")] - [System.String] - $DataMoveReplicationConstraint, - - [System.String] - $DeletedItemRetention, - - [System.String] - $DomainController, - - [System.String] - $EventHistoryRetentionPeriod, - - [System.Boolean] - $IndexEnabled, - - [System.Boolean] - $IsExcludedFromProvisioning, - - [System.String] - $IsExcludedFromProvisioningReason, - - [System.String] - $IssueWarningQuota, - - [System.Boolean] - $IsSuspendedFromProvisioning, - - [System.String] - $JournalRecipient, - - [System.String] - $MailboxRetention, - - [System.Boolean] - $MountAtStartup, - - [System.String] - $OfflineAddressBook, - - [System.String] - $ProhibitSendQuota, - - [System.String] - $ProhibitSendReceiveQuota, - - [System.String] - $RecoverableItemsQuota, - - [System.String] - $RecoverableItemsWarningQuota, - - [System.Boolean] - $RetainDeletedItemsUntilBackup, - - [System.String] - $AdServerSettingsPreferredServer, - - [System.Boolean] - $SkipInitialDatabaseMount - ) - - AddParameters -PSBoundParametersIn $PSBoundParameters -ParamsToAdd @{"Identity" = $Name} - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - return (Get-MailboxDatabase @PSBoundParameters -ErrorAction SilentlyContinue) -} - -#Moves the database or log path. Doesn't validate that the DB is in a good condition to move. Caller should do that. -function MoveDatabaseOrLogPath -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [System.UInt32] - $DatabaseCopyCount, - - [parameter(Mandatory = $true)] - [System.String] - $EdbFilePath, - - [parameter(Mandatory = $true)] - [System.String] - $LogFolderPath, - - [parameter(Mandatory = $true)] - [System.String] - $Server, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $AutoDagExcludeFromMonitoring, - - [System.Boolean] - $BackgroundDatabaseMaintenance, - - [System.String] - $CalendarLoggingQuota, - - [System.Boolean] - $CircularLoggingEnabled, - - [ValidateSet("None","SecondCopy","SecondDatacenter","AllDatacenters","AllCopies")] - [System.String] - $DataMoveReplicationConstraint, - - [System.String] - $DeletedItemRetention, - - [System.String] - $DomainController, - - [System.String] - $EventHistoryRetentionPeriod, - - [System.Boolean] - $IndexEnabled, - - [System.Boolean] - $IsExcludedFromProvisioning, - - [System.String] - $IsExcludedFromProvisioningReason, - - [System.String] - $IssueWarningQuota, - - [System.Boolean] - $IsSuspendedFromProvisioning, - - [System.String] - $JournalRecipient, - - [System.String] - $MailboxRetention, - - [System.Boolean] - $MountAtStartup, - - [System.String] - $OfflineAddressBook, - - [System.String] - $ProhibitSendQuota, - - [System.String] - $ProhibitSendReceiveQuota, - - [System.String] - $RecoverableItemsQuota, - - [System.String] - $RecoverableItemsWarningQuota, - - [System.Boolean] - $RetainDeletedItemsUntilBackup, - - [System.String] - $AdServerSettingsPreferredServer, - - [System.Boolean] - $SkipInitialDatabaseMount - ) - - AddParameters -PSBoundParametersIn $PSBoundParameters -ParamsToAdd @{"Identity" = $Name} - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController","EdbFilePath","LogFolderPath" - - Move-DatabasePath @PSBoundParameters -Confirm:$false -Force -} - -#Mounts the specified database -function MountDatabase -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [System.UInt32] - $DatabaseCopyCount, - - [parameter(Mandatory = $true)] - [System.String] - $EdbFilePath, - - [parameter(Mandatory = $true)] - [System.String] - $LogFolderPath, - - [parameter(Mandatory = $true)] - [System.String] - $Server, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $AutoDagExcludeFromMonitoring, - - [System.Boolean] - $BackgroundDatabaseMaintenance, - - [System.String] - $CalendarLoggingQuota, - - [System.Boolean] - $CircularLoggingEnabled, - - [ValidateSet("None","SecondCopy","SecondDatacenter","AllDatacenters","AllCopies")] - [System.String] - $DataMoveReplicationConstraint, - - [System.String] - $DeletedItemRetention, - - [System.String] - $DomainController, - - [System.String] - $EventHistoryRetentionPeriod, - - [System.Boolean] - $IndexEnabled, - - [System.Boolean] - $IsExcludedFromProvisioning, - - [System.String] - $IsExcludedFromProvisioningReason, - - [System.String] - $IssueWarningQuota, - - [System.Boolean] - $IsSuspendedFromProvisioning, - - [System.String] - $JournalRecipient, - - [System.String] - $MailboxRetention, - - [System.Boolean] - $MountAtStartup, - - [System.String] - $OfflineAddressBook, - - [System.String] - $ProhibitSendQuota, - - [System.String] - $ProhibitSendReceiveQuota, - - [System.String] - $RecoverableItemsQuota, - - [System.String] - $RecoverableItemsWarningQuota, - - [System.Boolean] - $RetainDeletedItemsUntilBackup, - - [System.String] - $AdServerSettingsPreferredServer, - - [System.Boolean] - $SkipInitialDatabaseMount - ) - - AddParameters -PSBoundParametersIn $PSBoundParameters -ParamsToAdd @{"Identity" = $Name} - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - NotePreviousError - - Mount-Database @PSBoundParameters - - ThrowIfNewErrorsEncountered -CmdletBeingRun "Mount-Database" -VerbosePreference $VerbosePreference -} - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxDatabase/MSFT_xExchMailboxDatabase.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxDatabase/MSFT_xExchMailboxDatabase.schema.mof deleted file mode 100644 index 67b6f980..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxDatabase/MSFT_xExchMailboxDatabase.schema.mof +++ /dev/null @@ -1,42 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchMailboxDatabase")] -class MSFT_xExchMailboxDatabase : OMI_BaseResource -{ - [Key] String Name; //Name of the database - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - [Required] Uint32 DatabaseCopyCount; //The number of copies that the database will have once fully configured - [Required] String Server; //Server to create the database on - [Required] String EdbFilePath; //Full path to where the database file will be located - [Required] String LogFolderPath; //Folder where logs for the DB will exist - [Write] String AdServerSettingsPreferredServer; //An optional domain controller to pass to Set-AdServerSettings -PreferredServer - [Write] Boolean SkipInitialDatabaseMount; //Whether the initial mount of databases should be skipped after database creation - - //Remaining props correspond to Set-MailboxDatabase parameters - //http://technet.microsoft.com/en-us/library/bb123971%28v=exchg.150%29.aspx - [Write] Boolean AllowServiceRestart; - [Write] Boolean AutoDagExcludeFromMonitoring; - [Write] Boolean BackgroundDatabaseMaintenance; - [Write] String CalendarLoggingQuota; - [Write] Boolean CircularLoggingEnabled; //Will not be enabled until all copies have been added - [Write, ValueMap{"None","SecondCopy","SecondDatacenter","AllDatacenters","AllCopies"}, Values{"None","SecondCopy","SecondDatacenter","AllDatacenters","AllCopies"}] String DataMoveReplicationConstraint; - [Write] String DeletedItemRetention; - [Write] String DomainController; - [Write] String EventHistoryRetentionPeriod; - [Write] Boolean IndexEnabled; - [Write] Boolean IsExcludedFromProvisioning; - [Write] String IsExcludedFromProvisioningReason; - [Write] String IssueWarningQuota; - [Write] Boolean IsSuspendedFromProvisioning; - [Write] String JournalRecipient; - [Write] String MailboxRetention; - [Write] Boolean MountAtStartup; - [Write] String OfflineAddressBook; - [Write] String ProhibitSendQuota; - [Write] String ProhibitSendReceiveQuota; - [Write] String RecoverableItemsQuota; - [Write] String RecoverableItemsWarningQuota; - [Write] Boolean RetainDeletedItemsUntilBackup; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxDatabaseCopy/MSFT_xExchMailboxDatabaseCopy.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxDatabaseCopy/MSFT_xExchMailboxDatabaseCopy.psm1 deleted file mode 100644 index 3105adf5..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxDatabaseCopy/MSFT_xExchMailboxDatabaseCopy.psm1 +++ /dev/null @@ -1,383 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [System.String] - $MailboxServer, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.UInt32] - $ActivationPreference, - - [System.String] - $DomainController, - - [System.String] - $ReplayLagTime, - - [System.Boolean] - $SeedingPostponed, - - [System.String] - $TruncationLagTime, - - [System.String] - $AdServerSettingsPreferredServer - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-MailboxDatabase","*DatabaseCopy*","Set-AdServerSettings" -VerbosePreference $VerbosePreference - - if ($PSBoundParameters.ContainsKey("AdServerSettingsPreferredServer") -and ![string]::IsNullOrEmpty($AdServerSettingsPreferredServer)) - { - Set-ADServerSettings –PreferredServer "$($AdServerSettingsPreferredServer)" - } - - $db = GetMailboxDatabase @PSBoundParameters - - $serverHasCopy = $false - - #First figure out if this server has a copy - foreach ($copy in $db.DatabaseCopies) - { - if ($copy.HostServerName -like $MailboxServer) - { - $serverHasCopy = $true - break - } - } - - #If we have a copy, parse out the values - if ($serverHasCopy -eq $true) - { - foreach ($pref in $db.ActivationPreference) - { - if ($pref.Key.Name -like $MailboxServer) - { - $ActivationPreference = $pref.Value - break - } - } - - foreach ($rlt in $db.ReplayLagTimes) - { - if ($rlt.Key.Name -like $MailboxServer) - { - $ReplayLagTime = $rlt.Value - break - } - } - - foreach ($tlt in $db.TruncationLagTimes) - { - if ($tlt.Key.Name -like $MailboxServer) - { - $TruncationLagTime = $tlt.Value - break - } - } - - $returnValue = @{ - Identity = $Identity - MailboxServer = $MailboxServer - ActivationPreference = $ActivationPreference - ReplayLagTime = $ReplayLagTime - TruncationLagTime = $TruncationLagTime - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [System.String] - $MailboxServer, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.UInt32] - $ActivationPreference, - - [System.String] - $DomainController, - - [System.String] - $ReplayLagTime, - - [System.Boolean] - $SeedingPostponed, - - [System.String] - $TruncationLagTime, - - [System.String] - $AdServerSettingsPreferredServer - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Don't need to establish remote session, as Get-TargetResource will do it - $copy = Get-TargetResource @PSBoundParameters - - $copyCount = 0 - $existingDb = GetMailboxDatabase @PSBoundParameters -ErrorAction SilentlyContinue - - if ($null -ne $existingDb) - { - $copyCount = $existingDb.DatabaseCopies.Count - } - - if ($null -eq $copy) #We need to add a new copy - { - Write-Verbose "A copy of database '$($Identity)' does not exist on server '$($MailboxServer)'. Adding." - - #Increment the copy count to what it will be when this copy is added - $copyCount++ - - #Create a copy of the original parameters - $originalPSBoundParameters = @{} + $PSBoundParameters - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Credential","AllowServiceRestart","AdServerSettingsPreferredServer" - - #Only send in ActivationPreference if it is less than or equal to the future copy count after adding this copy - if ($PSBoundParameters.ContainsKey("ActivationPreference") -and $ActivationPreference -gt $copyCount) - { - Write-Warning "Desired activation preference '$($ActivationPreference)' is higher than the future copy count '$($copyCount)'. Skipping setting ActivationPreference at this point." - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "ActivationPreference" - } - - #If SeedingPostponed was passed, turn it into a switch parameter instead of a bool - if ($PSBoundParameters.ContainsKey("SeedingPostponed")) - { - if ($SeedingPostponed -eq $true) - { - $PSBoundParameters.Remove("SeedingPostponed") - $PSBoundParameters.Add("SeedingPostponed", $null) - } - else - { - $PSBoundParameters.Remove("SeedingPostponed") - } - } - - #Create the database - NotePreviousError - - Add-MailboxDatabaseCopy @PSBoundParameters - - ThrowIfNewErrorsEncountered -CmdletBeingRun "Add-MailboxDatabaseCopy" -VerbosePreference $VerbosePreference - - #Increment the copy count, as if we made it here, we didn't fail - $copyCount++ - - #Add original props back - AddParameters -PSBoundParametersIn $PSBoundParameters -ParamsToAdd $originalPSBoundParameters - - #See if we can find the new copy - $copy = Get-TargetResource @PSBoundParameters - - if ($null -ne $copy) - { - #Again, add original props back - AddParameters -PSBoundParametersIn $PSBoundParameters -ParamsToAdd $originalPSBoundParameters - - if ($AllowServiceRestart -eq $true) - { - Write-Verbose "Restarting Information Store" - - Restart-Service MSExchangeIS - } - else - { - Write-Warning "The configuration will not take effect until MSExchangeIS is manually restarted." - } - } - else - { - throw "Failed to find database copy after running Add-MailboxDatabaseCopy" - } - } - else #($null -ne $copy) #Need to set props on copy - { - AddParameters -PSBoundParametersIn $PSBoundParameters -ParamsToAdd @{"Identity" = "$($Identity)\$($MailboxServer)"} - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Credential","AllowServiceRestart","MailboxServer","AdServerSettingsPreferredServer","SeedingPostponed" - - if ($PSBoundParameters.ContainsKey("ActivationPreference") -and $ActivationPreference -gt $copyCount) - { - Write-Warning "Desired activation preference '$($ActivationPreference)' is higher than current copy count '$($copyCount)'. Skipping setting ActivationPreference at this point." - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "ActivationPreference" - } - - Set-MailboxDatabaseCopy @PSBoundParameters - } -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [System.String] - $MailboxServer, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.UInt32] - $ActivationPreference, - - [System.String] - $DomainController, - - [System.String] - $ReplayLagTime, - - [System.Boolean] - $SeedingPostponed, - - [System.String] - $TruncationLagTime, - - [System.String] - $AdServerSettingsPreferredServer - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Don't need to establish remote session, as Get-TargetResource will do it - $copy = Get-TargetResource @PSBoundParameters - - if ($null -eq $copy) - { - return $false - } - else - { - if (!(VerifySetting -Name "ActivationPreference" -Type "Int" -ExpectedValue $ActivationPreference -ActualValue $copy.ActivationPreference -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ReplayLagTime" -Type "Timespan" -ExpectedValue $ReplayLagTime -ActualValue $copy.ReplayLagTime -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "TruncationLagTime" -Type "Timespan" -ExpectedValue $TruncationLagTime -ActualValue $copy.TruncationLagTime -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - } - - return $true -} - -function GetMailboxDatabase -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [System.String] - $MailboxServer, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.UInt32] - $ActivationPreference, - - [System.String] - $DomainController, - - [System.String] - $ReplayLagTime, - - [System.Boolean] - $SeedingPostponed, - - [System.String] - $TruncationLagTime, - - [System.String] - $AdServerSettingsPreferredServer - ) - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - return (Get-MailboxDatabase @PSBoundParameters -Status -ErrorAction SilentlyContinue) -} - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxDatabaseCopy/MSFT_xExchMailboxDatabaseCopy.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxDatabaseCopy/MSFT_xExchMailboxDatabaseCopy.schema.mof deleted file mode 100644 index e2d05a85..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxDatabaseCopy/MSFT_xExchMailboxDatabaseCopy.schema.mof +++ /dev/null @@ -1,21 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchMailboxDatabaseCopy")] -class MSFT_xExchMailboxDatabaseCopy : OMI_BaseResource -{ - [Key] String Identity; //Name of database - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - [Required] String MailboxServer; //Server to add copy to. Should be the host name, not the FQDN. - [Write] String AdServerSettingsPreferredServer; //An optional domain controller to pass to Set-AdServerSettings -PreferredServer - [Write] Boolean AllowServiceRestart; //Whether it is OK to restart Information Store after adding copy - - //Remaing props, and some of the above, correspond directly to Add-MailboxDatabaseCopy parameters - //http://technet.microsoft.com/en-us/library/dd298105(v=exchg.150).aspx - [Write] Uint32 ActivationPreference; - [Write] String DomainController; - [Write] String ReplayLagTime; - [Write] Boolean SeedingPostponed; - [Write] String TruncationLagTime; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxServer/MSFT_xExchMailboxServer.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxServer/MSFT_xExchMailboxServer.psm1 deleted file mode 100644 index 3bf9f078..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxServer/MSFT_xExchMailboxServer.psm1 +++ /dev/null @@ -1,1072 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [ValidateSet("BestAvailability","GoodAvailability","Lossless")] - [System.String] - $AutoDatabaseMountDial, - - [System.Int32] - $CalendarRepairIntervalEndWindow, - - [System.String] - $CalendarRepairLogDirectorySizeLimit, - - [System.Boolean] - $CalendarRepairLogEnabled, - - [System.String] - $CalendarRepairLogFileAgeLimit, - - [System.String] - $CalendarRepairLogPath, - - [System.Boolean] - $CalendarRepairLogSubjectLoggingEnabled, - - [System.Boolean] - $CalendarRepairMissingItemFixDisabled, - - [ValidateSet("ValidateOnly","RepairAndValidate")] - [System.String] - $CalendarRepairMode, - - [System.String] - $CalendarRepairWorkCycle, - - [System.String] - $CalendarRepairWorkCycleCheckpoint, - - [System.Boolean] - $DatabaseCopyActivationDisabledAndMoveNow, - - [ValidateSet("Blocked","IntrasiteOnly","Unrestricted")] - [System.String] - $DatabaseCopyAutoActivationPolicy, - - [System.String] - $DomainController, - - [System.Boolean] - $FolderLogForManagedFoldersEnabled, - - [System.Boolean] - $ForceGroupMetricsGeneration, - - [System.Boolean] - $IsExcludedFromProvisioning, - - [System.Boolean] - $JournalingLogForManagedFoldersEnabled, - - [System.String[]] - $Locale, - - [System.String] - $LogDirectorySizeLimitForManagedFolders, - - [System.String] - $LogFileAgeLimitForManagedFolders, - - [System.String] - $LogFileSizeLimitForManagedFolders, - - [System.String] - $LogPathForManagedFolders, - - [System.String] - $MailboxProcessorWorkCycle, - - [System.String[]] - $ManagedFolderAssistantSchedule, - - [System.String] - $ManagedFolderWorkCycle, - - [System.String] - $ManagedFolderWorkCycleCheckpoint, - - [System.Boolean] - $MAPIEncryptionRequired, - - [System.String] - $MaximumActiveDatabases, - - [System.String] - $MaximumPreferredActiveDatabases, - - [System.String] - $OABGeneratorWorkCycle, - - [System.String] - $OABGeneratorWorkCycleCheckpoint, - - [System.String] - $PublicFolderWorkCycle, - - [System.String] - $PublicFolderWorkCycleCheckpoint, - - [System.Boolean] - $RetentionLogForManagedFoldersEnabled, - - [System.String[]] - $SharingPolicySchedule, - - [System.String] - $SharingPolicyWorkCycle, - - [System.String] - $SharingPolicyWorkCycleCheckpoint, - - [System.String] - $SharingSyncWorkCycle, - - [System.String] - $SharingSyncWorkCycleCheckpoint, - - [System.String] - $SiteMailboxWorkCycle, - - [System.String] - $SiteMailboxWorkCycleCheckpoint, - - [System.Boolean] - $SubjectLogForManagedFoldersEnabled, - - [System.String] - $TopNWorkCycle, - - [System.String] - $TopNWorkCycleCheckpoint, - - [System.String] - $UMReportingWorkCycle, - - [System.String] - $UMReportingWorkCycleCheckpoint, - - [System.String] - $WacDiscoveryEndpoint - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-MailboxServer" -VerbosePreference $VerbosePreference - - $server = GetMailboxServer @PSBoundParameters - - if ($null -ne $server) - { - $returnValue = @{ - Identity = $Identity - AutoDatabaseMountDial = $server.AutoDatabaseMountDial - CalendarRepairIntervalEndWindow = $server.CalendarRepairIntervalEndWindow - CalendarRepairLogDirectorySizeLimit = $server.CalendarRepairLogDirectorySizeLimit - CalendarRepairLogEnabled = $server.CalendarRepairLogEnabled - CalendarRepairLogFileAgeLimit = $server.CalendarRepairLogFileAgeLimit - CalendarRepairLogPath = $server.CalendarRepairLogPath - CalendarRepairLogSubjectLoggingEnabled = $server.CalendarRepairLogSubjectLoggingEnabled - CalendarRepairMissingItemFixDisabled = $server.CalendarRepairMissingItemFixDisabled - CalendarRepairMode = $server.CalendarRepairMode - FolderLogForManagedFoldersEnabled = $server.FolderLogForManagedFoldersEnabled - ForceGroupMetricsGeneration = $server.ForceGroupMetricsGeneration - IsExcludedFromProvisioning = $server.IsExcludedFromProvisioning - JournalingLogForManagedFoldersEnabled = $server.JournalingLogForManagedFoldersEnabled - Locale = $Server.Locale - LogDirectorySizeLimitForManagedFolders = $server.LogDirectorySizeLimitForManagedFolders - LogFileAgeLimitForManagedFolders = $server.LogFileAgeLimitForManagedFolders - LogFileSizeLimitForManagedFolders = $server.LogFileSizeLimitForManagedFolders - LogPathForManagedFolders = $server.LogPathForManagedFolders - DatabaseCopyActivationDisabledAndMoveNow = $server.DatabaseCopyActivationDisabledAndMoveNow - DatabaseCopyAutoActivationPolicy = $server.DatabaseCopyAutoActivationPolicy - MAPIEncryptionRequired = $server.MAPIEncryptionRequired - MaximumActiveDatabases = $server.MaximumActiveDatabases - MaximumPreferredActiveDatabases = $server.MaximumPreferredActiveDatabases - RetentionLogForManagedFoldersEnabled = $server.RetentionLogForManagedFoldersEnabled - SharingPolicySchedule = $server.SharingPolicySchedule - SubjectLogForManagedFoldersEnabled = $server.SubjectLogForManagedFoldersEnabled - } - - $serverVersion = GetExchangeVersion - - if ($serverVersion -eq "2016") - { - $returnValue.Add("WacDiscoveryEndpoint", $server.WacDiscoveryEndpoint) - } - elseif ($serverVersion -eq "2013") - { - $returnValue.Add("CalendarRepairWorkCycle", $server.CalendarRepairWorkCycle) - $returnValue.Add("CalendarRepairWorkCycleCheckpoint", $server.CalendarRepairWorkCycleCheckpoint) - $returnValue.Add("MailboxProcessorWorkCycle", $server.MailboxProcessorWorkCycle) - $returnValue.Add("ManagedFolderAssistantSchedule", $server.ManagedFolderAssistantSchedule) - $returnValue.Add("ManagedFolderWorkCycle", $server.ManagedFolderWorkCycle) - $returnValue.Add("ManagedFolderWorkCycleCheckpoint", $server.ManagedFolderWorkCycleCheckpoint) - $returnValue.Add("OABGeneratorWorkCycle", $server.OABGeneratorWorkCycle) - $returnValue.Add("OABGeneratorWorkCycleCheckpoint", $server.OABGeneratorWorkCycleCheckpoint) - $returnValue.Add("PublicFolderWorkCycle", $server.PublicFolderWorkCycle) - $returnValue.Add("PublicFolderWorkCycleCheckpoint", $server.PublicFolderWorkCycleCheckpoint) - $returnValue.Add("SharingPolicyWorkCycle", $server.SharingPolicyWorkCycle) - $returnValue.Add("SharingPolicyWorkCycleCheckpoint", $server.SharingPolicyWorkCycleCheckpoint) - $returnValue.Add("SharingSyncWorkCycle", $server.SharingSyncWorkCycle) - $returnValue.Add("SharingSyncWorkCycleCheckpoint", $server.SharingSyncWorkCycleCheckpoint) - $returnValue.Add("SiteMailboxWorkCycle", $server.SiteMailboxWorkCycle) - $returnValue.Add("SiteMailboxWorkCycleCheckpoint", $server.SiteMailboxWorkCycleCheckpoint) - $returnValue.Add("TopNWorkCycle", $server.TopNWorkCycle) - $returnValue.Add("TopNWorkCycleCheckpoint", $server.TopNWorkCycleCheckpoint) - $returnValue.Add("UMReportingWorkCycle", $server.UMReportingWorkCycle) - $returnValue.Add("UMReportingWorkCycleCheckpoint", $server.UMReportingWorkCycleCheckpoint) - } - else - { - Write-Verbose -Message "Could not detect Exchange version" - } - } - - $returnValue -} - -function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [ValidateSet("BestAvailability","GoodAvailability","Lossless")] - [System.String] - $AutoDatabaseMountDial, - - [System.Int32] - $CalendarRepairIntervalEndWindow, - - [System.String] - $CalendarRepairLogDirectorySizeLimit, - - [System.Boolean] - $CalendarRepairLogEnabled, - - [System.String] - $CalendarRepairLogFileAgeLimit, - - [System.String] - $CalendarRepairLogPath, - - [System.Boolean] - $CalendarRepairLogSubjectLoggingEnabled, - - [System.Boolean] - $CalendarRepairMissingItemFixDisabled, - - [ValidateSet("ValidateOnly","RepairAndValidate")] - [System.String] - $CalendarRepairMode, - - [System.String] - $CalendarRepairWorkCycle, - - [System.String] - $CalendarRepairWorkCycleCheckpoint, - - [System.Boolean] - $DatabaseCopyActivationDisabledAndMoveNow, - - [ValidateSet("Blocked","IntrasiteOnly","Unrestricted")] - [System.String] - $DatabaseCopyAutoActivationPolicy, - - [System.String] - $DomainController, - - [System.Boolean] - $FolderLogForManagedFoldersEnabled, - - [System.Boolean] - $ForceGroupMetricsGeneration, - - [System.Boolean] - $IsExcludedFromProvisioning, - - [System.Boolean] - $JournalingLogForManagedFoldersEnabled, - - [System.String[]] - $Locale, - - [System.String] - $LogDirectorySizeLimitForManagedFolders, - - [System.String] - $LogFileAgeLimitForManagedFolders, - - [System.String] - $LogFileSizeLimitForManagedFolders, - - [System.String] - $LogPathForManagedFolders, - - [System.String] - $MailboxProcessorWorkCycle, - - [System.String[]] - $ManagedFolderAssistantSchedule, - - [System.String] - $ManagedFolderWorkCycle, - - [System.String] - $ManagedFolderWorkCycleCheckpoint, - - [System.Boolean] - $MAPIEncryptionRequired, - - [System.String] - $MaximumActiveDatabases, - - [System.String] - $MaximumPreferredActiveDatabases, - - [System.String] - $OABGeneratorWorkCycle, - - [System.String] - $OABGeneratorWorkCycleCheckpoint, - - [System.String] - $PublicFolderWorkCycle, - - [System.String] - $PublicFolderWorkCycleCheckpoint, - - [System.Boolean] - $RetentionLogForManagedFoldersEnabled, - - [System.String[]] - $SharingPolicySchedule, - - [System.String] - $SharingPolicyWorkCycle, - - [System.String] - $SharingPolicyWorkCycleCheckpoint, - - [System.String] - $SharingSyncWorkCycle, - - [System.String] - $SharingSyncWorkCycleCheckpoint, - - [System.String] - $SiteMailboxWorkCycle, - - [System.String] - $SiteMailboxWorkCycleCheckpoint, - - [System.Boolean] - $SubjectLogForManagedFoldersEnabled, - - [System.String] - $TopNWorkCycle, - - [System.String] - $TopNWorkCycleCheckpoint, - - [System.String] - $UMReportingWorkCycle, - - [System.String] - $UMReportingWorkCycleCheckpoint, - - [System.String] - $WacDiscoveryEndpoint - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Set-MailboxServer" -VerbosePreference $VerbosePreference - - #Setup params for next command - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Credential" - - #create array of Exchange 2013 only parameters - [array]$Exchange2013Only = 'CalendarRepairWorkCycle','CalendarRepairWorkCycleCheckpoint','MailboxProcessorWorkCycle','ManagedFolderAssistantSchedule','ManagedFolderWorkCycle', - 'ManagedFolderWorkCycleCheckpoint','OABGeneratorWorkCycle','OABGeneratorWorkCycleCheckpoint','PublicFolderWorkCycle','PublicFolderWorkCycleCheckpoint','SharingPolicyWorkCycle', - 'SharingPolicyWorkCycleCheckpoint','SharingSyncWorkCycle','SharingSyncWorkCycleCheckpoint','SiteMailboxWorkCycle','SiteMailboxWorkCycleCheckpoint','TopNWorkCycle','TopNWorkCycleCheckpoint', - 'UMReportingWorkCycle','UMReportingWorkCycleCheckpoint' - - $serverVersion = GetExchangeVersion - if ($serverVersion -eq '2013') - { - #Check for non-existent parameters in Exchange 2013 - RemoveVersionSpecificParameters -PSBoundParametersIn $PSBoundParameters -ParamName "WacDiscoveryEndpoint" -ResourceName "xExchMailboxServer" -ParamExistsInVersion "2016" - } - elseif ($serverVersion -eq '2016') - { - foreach ($Exchange2013Parameter in $Exchange2013Only) - { - #Check for non-existent parameters in Exchange 2016 - RemoveVersionSpecificParameters -PSBoundParametersIn $PSBoundParameters -ParamName "$($Exchange2013Parameter)" -ResourceName "xExchMailboxServer" -ParamExistsInVersion "2013" - } - } - else - { - Write-Verbose -Message "Could not detect Exchange version" - } - - #Ensure an empty string is $null and not a string - SetEmptyStringParamsToNull -PSBoundParametersIn $PSBoundParameters - - Set-MailboxServer @PSBoundParameters - -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [ValidateSet("BestAvailability","GoodAvailability","Lossless")] - [System.String] - $AutoDatabaseMountDial, - - [System.Int32] - $CalendarRepairIntervalEndWindow, - - [System.String] - $CalendarRepairLogDirectorySizeLimit, - - [System.Boolean] - $CalendarRepairLogEnabled, - - [System.String] - $CalendarRepairLogFileAgeLimit, - - [System.String] - $CalendarRepairLogPath, - - [System.Boolean] - $CalendarRepairLogSubjectLoggingEnabled, - - [System.Boolean] - $CalendarRepairMissingItemFixDisabled, - - [ValidateSet("ValidateOnly","RepairAndValidate")] - [System.String] - $CalendarRepairMode, - - [System.String] - $CalendarRepairWorkCycle, - - [System.String] - $CalendarRepairWorkCycleCheckpoint, - - [System.Boolean] - $DatabaseCopyActivationDisabledAndMoveNow, - - [ValidateSet("Blocked","IntrasiteOnly","Unrestricted")] - [System.String] - $DatabaseCopyAutoActivationPolicy, - - [System.String] - $DomainController, - - [System.Boolean] - $FolderLogForManagedFoldersEnabled, - - [System.Boolean] - $ForceGroupMetricsGeneration, - - [System.Boolean] - $IsExcludedFromProvisioning, - - [System.Boolean] - $JournalingLogForManagedFoldersEnabled, - - [System.String[]] - $Locale, - - [System.String] - $LogDirectorySizeLimitForManagedFolders, - - [System.String] - $LogFileAgeLimitForManagedFolders, - - [System.String] - $LogFileSizeLimitForManagedFolders, - - [System.String] - $LogPathForManagedFolders, - - [System.String] - $MailboxProcessorWorkCycle, - - [System.String[]] - $ManagedFolderAssistantSchedule, - - [System.String] - $ManagedFolderWorkCycle, - - [System.String] - $ManagedFolderWorkCycleCheckpoint, - - [System.Boolean] - $MAPIEncryptionRequired, - - [System.String] - $MaximumActiveDatabases, - - [System.String] - $MaximumPreferredActiveDatabases, - - [System.String] - $OABGeneratorWorkCycle, - - [System.String] - $OABGeneratorWorkCycleCheckpoint, - - [System.String] - $PublicFolderWorkCycle, - - [System.String] - $PublicFolderWorkCycleCheckpoint, - - [System.Boolean] - $RetentionLogForManagedFoldersEnabled, - - [System.String[]] - $SharingPolicySchedule, - - [System.String] - $SharingPolicyWorkCycle, - - [System.String] - $SharingPolicyWorkCycleCheckpoint, - - [System.String] - $SharingSyncWorkCycle, - - [System.String] - $SharingSyncWorkCycleCheckpoint, - - [System.String] - $SiteMailboxWorkCycle, - - [System.String] - $SiteMailboxWorkCycleCheckpoint, - - [System.Boolean] - $SubjectLogForManagedFoldersEnabled, - - [System.String] - $TopNWorkCycle, - - [System.String] - $TopNWorkCycleCheckpoint, - - [System.String] - $UMReportingWorkCycle, - - [System.String] - $UMReportingWorkCycleCheckpoint, - - [System.String] - $WacDiscoveryEndpoint - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-MailboxServer","Set-MailboxServer" -VerbosePreference $VerbosePreference - - #create array of Exchange 2013 only parameters - [array]$Exchange2013Only = 'CalendarRepairWorkCycle','CalendarRepairWorkCycleCheckpoint','MailboxProcessorWorkCycle','ManagedFolderAssistantSchedule','ManagedFolderWorkCycle', - 'ManagedFolderWorkCycleCheckpoint','OABGeneratorWorkCycle','OABGeneratorWorkCycleCheckpoint','PublicFolderWorkCycle','PublicFolderWorkCycleCheckpoint','SharingPolicyWorkCycle', - 'SharingPolicyWorkCycleCheckpoint','SharingSyncWorkCycle','SharingSyncWorkCycleCheckpoint','SiteMailboxWorkCycle','SiteMailboxWorkCycleCheckpoint','TopNWorkCycle','TopNWorkCycleCheckpoint', - 'UMReportingWorkCycle','UMReportingWorkCycleCheckpoint' - - $serverVersion = GetExchangeVersion - if ($serverVersion -eq '2013') - { - #Check for non-existent parameters in Exchange 2013 - RemoveVersionSpecificParameters -PSBoundParametersIn $PSBoundParameters -ParamName "WacDiscoveryEndpoint" -ResourceName "xExchMailboxServer" -ParamExistsInVersion "2016" - } - elseif ($serverVersion -eq '2016') - { - foreach ($Exchange2013Parameter in $Exchange2013Only) - { - #Check for non-existent parameters in Exchange 2016 - RemoveVersionSpecificParameters -PSBoundParametersIn $PSBoundParameters -ParamName "$($Exchange2013Parameter)" -ResourceName "xExchMailboxServer" -ParamExistsInVersion "2013" - } - } - else - { - Write-Verbose -Message "Could not detect Exchange version" - } - - $server = GetMailboxServer @PSBoundParameters - - if ($null -eq $server) #Couldn't find the server, which is bad - { - return $false - } - else #Validate server params - { - if (!(VerifySetting -Name "AutoDatabaseMountDial" -Type "String" -ExpectedValue $AutoDatabaseMountDial -ActualValue $server.AutoDatabaseMountDial -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "CalendarRepairIntervalEndWindow" -Type "Int" -ExpectedValue $CalendarRepairIntervalEndWindow -ActualValue $server.CalendarRepairIntervalEndWindow -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "CalendarRepairLogDirectorySizeLimit" -Type "Unlimited" -ExpectedValue $CalendarRepairLogDirectorySizeLimit -ActualValue $server.CalendarRepairLogDirectorySizeLimit -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - - if (!(VerifySetting -Name "CalendarRepairLogEnabled" -Type "Boolean" -ExpectedValue $CalendarRepairLogEnabled -ActualValue $server.CalendarRepairLogEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - - if (!(VerifySetting -Name "CalendarRepairLogFileAgeLimit" -Type "TimeSpan" -ExpectedValue $CalendarRepairLogFileAgeLimit -ActualValue $server.CalendarRepairLogFileAgeLimit -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "CalendarRepairLogPath" -Type "String" -ExpectedValue $CalendarRepairLogPath -ActualValue $server.CalendarRepairLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "CalendarRepairLogSubjectLoggingEnabled" -Type "Boolean" -ExpectedValue $CalendarRepairLogSubjectLoggingEnabled -ActualValue $server.CalendarRepairLogSubjectLoggingEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "CalendarRepairMissingItemFixDisabled" -Type "Boolean" -ExpectedValue $CalendarRepairMissingItemFixDisabled -ActualValue $server.CalendarRepairMissingItemFixDisabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "CalendarRepairMode" -Type "String" -ExpectedValue $CalendarRepairMode -ActualValue $server.CalendarRepairMode -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "CalendarRepairWorkCycle" -Type "TimeSpan" -ExpectedValue $CalendarRepairWorkCycle -ActualValue $server.CalendarRepairWorkCycle -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "CalendarRepairWorkCycleCheckpoint" -Type "TimeSpan" -ExpectedValue $CalendarRepairWorkCycleCheckpoint -ActualValue $server.CalendarRepairWorkCycleCheckpoint -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "DatabaseCopyActivationDisabledAndMoveNow" -Type "Boolean" -ExpectedValue $DatabaseCopyActivationDisabledAndMoveNow -ActualValue $server.DatabaseCopyActivationDisabledAndMoveNow -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "DatabaseCopyAutoActivationPolicy" -Type "String" -ExpectedValue $DatabaseCopyAutoActivationPolicy -ActualValue $server.DatabaseCopyAutoActivationPolicy -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "FolderLogForManagedFoldersEnabled" -Type "Boolean" -ExpectedValue $FolderLogForManagedFoldersEnabled -ActualValue $server.FolderLogForManagedFoldersEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ForceGroupMetricsGeneration" -Type "Boolean" -ExpectedValue $ForceGroupMetricsGeneration -ActualValue $server.ForceGroupMetricsGeneration -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "IsExcludedFromProvisioning" -Type "Boolean" -ExpectedValue $IsExcludedFromProvisioning -ActualValue $server.IsExcludedFromProvisioning -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "JournalingLogForManagedFoldersEnabled" -Type "Boolean" -ExpectedValue $JournalingLogForManagedFoldersEnabled -ActualValue $server.JournalingLogForManagedFoldersEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "Locale" -Type "Array" -ExpectedValue $Locale -ActualValue $server.Locale -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "LogDirectorySizeLimitForManagedFolders" -Type "Unlimited" -ExpectedValue $LogDirectorySizeLimitForManagedFolders -ActualValue $server.LogDirectorySizeLimitForManagedFolders -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "LogFileAgeLimitForManagedFolders" -Type "TimeSpan" -ExpectedValue $LogFileAgeLimitForManagedFolders -ActualValue $server.LogFileAgeLimitForManagedFolders -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "LogFileSizeLimitForManagedFolders" -Type "Unlimited" -ExpectedValue $LogFileSizeLimitForManagedFolders -ActualValue $server.LogFileSizeLimitForManagedFolders -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "LogPathForManagedFolders" -Type "String" -ExpectedValue $LogPathForManagedFolders -ActualValue $server.LogPathForManagedFolders -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MailboxProcessorWorkCycle" -Type "TimeSpan" -ExpectedValue $MailboxProcessorWorkCycle -ActualValue $server.MailboxProcessorWorkCycle -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ManagedFolderAssistantSchedule" -Type "Array" -ExpectedValue $ManagedFolderAssistantSchedule -ActualValue $server.ManagedFolderAssistantSchedule -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ManagedFolderWorkCycle" -Type "TimeSpan" -ExpectedValue $ManagedFolderWorkCycle -ActualValue $server.ManagedFolderWorkCycle -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ManagedFolderWorkCycleCheckpoint" -Type "TimeSpan" -ExpectedValue $ManagedFolderWorkCycleCheckpoint -ActualValue $server.ManagedFolderWorkCycleCheckpoint -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MAPIEncryptionRequired" -Type "Boolean" -ExpectedValue $MAPIEncryptionRequired -ActualValue $server.MAPIEncryptionRequired -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MaximumActiveDatabases" -Type "String" -ExpectedValue $MaximumActiveDatabases -ActualValue $server.MaximumActiveDatabases -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MaximumPreferredActiveDatabases" -Type "String" -ExpectedValue $MaximumPreferredActiveDatabases -ActualValue $server.MaximumPreferredActiveDatabases -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "OABGeneratorWorkCycle" -Type "TimeSpan" -ExpectedValue $OABGeneratorWorkCycle -ActualValue $server.OABGeneratorWorkCycle -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "OABGeneratorWorkCycleCheckpoint" -Type "TimeSpan" -ExpectedValue $OABGeneratorWorkCycleCheckpoint -ActualValue $server.OABGeneratorWorkCycleCheckpoint -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "PublicFolderWorkCycle" -Type "TimeSpan" -ExpectedValue $PublicFolderWorkCycle -ActualValue $server.PublicFolderWorkCycle -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "PublicFolderWorkCycleCheckpoint" -Type "TimeSpan" -ExpectedValue $PublicFolderWorkCycleCheckpoint -ActualValue $server.PublicFolderWorkCycleCheckpoint -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "RetentionLogForManagedFoldersEnabled" -Type "Boolean" -ExpectedValue $RetentionLogForManagedFoldersEnabled -ActualValue $server.RetentionLogForManagedFoldersEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "SharingPolicySchedule" -Type "Array" -ExpectedValue $SharingPolicySchedule -ActualValue $server.SharingPolicySchedule -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "SharingPolicyWorkCycle" -Type "TimeSpan" -ExpectedValue $SharingPolicyWorkCycle -ActualValue $server.SharingPolicyWorkCycle -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "SharingPolicyWorkCycleCheckpoint" -Type "TimeSpan" -ExpectedValue $SharingPolicyWorkCycleCheckpoint -ActualValue $server.SharingPolicyWorkCycleCheckpoint -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "SharingSyncWorkCycle" -Type "TimeSpan" -ExpectedValue $SharingSyncWorkCycle -ActualValue $server.SharingSyncWorkCycle -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "SharingSyncWorkCycleCheckpoint" -Type "TimeSpan" -ExpectedValue $SharingSyncWorkCycleCheckpoint -ActualValue $server.SharingSyncWorkCycleCheckpoint -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "SiteMailboxWorkCycle" -Type "TimeSpan" -ExpectedValue $SiteMailboxWorkCycle -ActualValue $server.SiteMailboxWorkCycle -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "SiteMailboxWorkCycleCheckpoint" -Type "TimeSpan" -ExpectedValue $SiteMailboxWorkCycleCheckpoint -ActualValue $server.SiteMailboxWorkCycleCheckpoint -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "SubjectLogForManagedFoldersEnabled" -Type "Boolean" -ExpectedValue $SubjectLogForManagedFoldersEnabled -ActualValue $server.SubjectLogForManagedFoldersEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "TopNWorkCycle" -Type "TimeSpan" -ExpectedValue $TopNWorkCycle -ActualValue $server.TopNWorkCycle -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "TopNWorkCycleCheckpoint" -Type "TimeSpan" -ExpectedValue $TopNWorkCycleCheckpoint -ActualValue $server.TopNWorkCycleCheckpoint -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "UMReportingWorkCycle" -Type "TimeSpan" -ExpectedValue $UMReportingWorkCycle -ActualValue $server.UMReportingWorkCycle -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "UMReportingWorkCycleCheckpoint" -Type "TimeSpan" -ExpectedValue $UMReportingWorkCycleCheckpoint -ActualValue $server.UMReportingWorkCycleCheckpoint -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "WacDiscoveryEndpoint" -Type "String" -ExpectedValue $WacDiscoveryEndpoint -ActualValue $server.WacDiscoveryEndpoint -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - } - - return $true -} - -#Runs Get-MailboxServer, only specifying Identity, and optionally DomainController -function GetMailboxServer -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [ValidateSet("BestAvailability","GoodAvailability","Lossless")] - [System.String] - $AutoDatabaseMountDial, - - [System.Int32] - $CalendarRepairIntervalEndWindow, - - [System.String] - $CalendarRepairLogDirectorySizeLimit, - - [System.Boolean] - $CalendarRepairLogEnabled, - - [System.String] - $CalendarRepairLogFileAgeLimit, - - [System.String] - $CalendarRepairLogPath, - - [System.Boolean] - $CalendarRepairLogSubjectLoggingEnabled, - - [System.Boolean] - $CalendarRepairMissingItemFixDisabled, - - [ValidateSet("ValidateOnly","RepairAndValidate")] - [System.String] - $CalendarRepairMode, - - [System.String] - $CalendarRepairWorkCycle, - - [System.String] - $CalendarRepairWorkCycleCheckpoint, - - [System.Boolean] - $DatabaseCopyActivationDisabledAndMoveNow, - - [ValidateSet("Blocked","IntrasiteOnly","Unrestricted")] - [System.String] - $DatabaseCopyAutoActivationPolicy, - - [System.String] - $DomainController, - - [System.Boolean] - $FolderLogForManagedFoldersEnabled, - - [System.Boolean] - $ForceGroupMetricsGeneration, - - [System.Boolean] - $IsExcludedFromProvisioning, - - [System.Boolean] - $JournalingLogForManagedFoldersEnabled, - - [System.String[]] - $Locale, - - [System.String] - $LogDirectorySizeLimitForManagedFolders, - - [System.String] - $LogFileAgeLimitForManagedFolders, - - [System.String] - $LogFileSizeLimitForManagedFolders, - - [System.String] - $LogPathForManagedFolders, - - [System.String] - $MailboxProcessorWorkCycle, - - [System.String[]] - $ManagedFolderAssistantSchedule, - - [System.String] - $ManagedFolderWorkCycle, - - [System.String] - $ManagedFolderWorkCycleCheckpoint, - - [System.Boolean] - $MAPIEncryptionRequired, - - [System.String] - $MaximumActiveDatabases, - - [System.String] - $MaximumPreferredActiveDatabases, - - [System.String] - $OABGeneratorWorkCycle, - - [System.String] - $OABGeneratorWorkCycleCheckpoint, - - [System.String] - $PublicFolderWorkCycle, - - [System.String] - $PublicFolderWorkCycleCheckpoint, - - [System.Boolean] - $RetentionLogForManagedFoldersEnabled, - - [System.String[]] - $SharingPolicySchedule, - - [System.String] - $SharingPolicyWorkCycle, - - [System.String] - $SharingPolicyWorkCycleCheckpoint, - - [System.String] - $SharingSyncWorkCycle, - - [System.String] - $SharingSyncWorkCycleCheckpoint, - - [System.String] - $SiteMailboxWorkCycle, - - [System.String] - $SiteMailboxWorkCycleCheckpoint, - - [System.Boolean] - $SubjectLogForManagedFoldersEnabled, - - [System.String] - $TopNWorkCycle, - - [System.String] - $TopNWorkCycleCheckpoint, - - [System.String] - $UMReportingWorkCycle, - - [System.String] - $UMReportingWorkCycleCheckpoint, - - [System.String] - $WacDiscoveryEndpoint - ) - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - return (Get-MailboxServer @PSBoundParameters) -} - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxServer/MSFT_xExchMailboxServer.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxServer/MSFT_xExchMailboxServer.schema.mof deleted file mode 100644 index 995432dc..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxServer/MSFT_xExchMailboxServer.schema.mof +++ /dev/null @@ -1,56 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchMailboxServer")] -class MSFT_xExchMailboxServer : OMI_BaseResource -{ - [Key, Description("The Identity parameter specifies the Mailbox server that you want to modify.")] String Identity; - [Required, Description("Credentials used to establish a remote Powershell session to Exchange"), EmbeddedInstance("MSFT_Credential")] String Credential; - [Write, Description("The AutoDatabaseMountDial parameter specifies the automatic database mount behavior for a continuous replication environment after a database failover."), ValueMap{"BestAvailability","GoodAvailability","Lossless"}, Values{"BestAvailability","GoodAvailability","Lossless"}] String AutoDatabaseMountDial; - [Write, Description("The CalendarRepairIntervalEndWindow parameter specifies the number of days into the future to repair calendars. For example, if this parameter is set to 90, the Calendar Repair Assistant repairs calendars on this Mailbox server 90 days from now.")] SInt32 CalendarRepairIntervalEndWindow; - [Write, Description("The CalendarRepairLogDirectorySizeLimit parameter specifies the size limit for all log files for the Calendar Repair Assistant. After the limit is reached, the oldest files are deleted.")] String CalendarRepairLogDirectorySizeLimit; - [Write, Description("The CalendarRepairLogEnabled parameter specifies whether the Calendar Repair Attendant logs items that it repairs. The repair log doesn't contain failed repair attempts.")] Boolean CalendarRepairLogEnabled; - [Write, Description("The CalendarRepairLogFileAgeLimit parameter specifies how long to retain calendar repair logs. Log files that exceed the maximum retention period are deleted.")] String CalendarRepairLogFileAgeLimit; - [Write, Description("The CalendarRepairLogPath parameter specifies the location of the calendar repair log files on the Mailbox server.")] String CalendarRepairLogPath; - [Write, Description("The CalendarRepairLogSubjectLoggingEnabled parameter specifies that the subject of the repaired calendar item is logged in the calendar repair log.")] Boolean CalendarRepairLogSubjectLoggingEnabled; - [Write, Description("The CalendarRepairMissingItemFixDisabled parameter specifies that the Calendar Repair Assistant won't fix missing attendee calendar items for mailboxes homed on this Mailbox server.")] Boolean CalendarRepairMissingItemFixDisabled; - [Write, Description("The CalendarRepairMode parameter specifies the mode that the Calendar Repair Assistant will run in."), ValueMap{"ValidateOnly","RepairAndValidate"}, Values{"ValidateOnly","RepairAndValidate"}] String CalendarRepairMode; - [Write, Description("The CalendarRepairWorkCycle parameter specifies the time span in which all mailboxes on the specified server will be scanned by the Calendar Repair Assistant. Calendars that have inconsistencies will be flagged and repaired according to the interval specified by the CalendarRepairWorkCycleCheckpoint parameter.")] String CalendarRepairWorkCycle; - [Write, Description("The CalendarRepairWorkCycleCheckpoint parameter specifies the time span at which all mailboxes will be identified as needing work completed on them.")] String CalendarRepairWorkCycleCheckpoint; - [Write, Description("The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to Active Directory.")] String DomainController; - [Write, Description("The DatabaseCopyActivationDisabledAndMoveNow parameter specifies whether to prevent databases from being mounted on this Mailbox server if there are other healthy copies of the databases on other Mailbox servers. It will also immediately move any mounted databases on the server to other servers if copies exist and are healthy.")] Boolean DatabaseCopyActivationDisabledAndMoveNow; - [Write, Description("The DatabaseCopyAutoActivationPolicy parameter specifies the type of automatic activation available for mailbox database copies on the specified Mailbox server. Valid values are Blocked, IntrasiteOnly, and Unrestricted."), ValueMap{"Blocked","IntrasiteOnly","Unrestricted"}, Values{"Blocked","IntrasiteOnly","Unrestricted"}] String DatabaseCopyAutoActivationPolicy; - [Write, Description("The FolderLogForManagedFoldersEnabled parameter specifies whether the folder log for managed folders is enabled for messages that were moved to managed folders.")] Boolean FolderLogForManagedFoldersEnabled; - [Write, Description("The ForceGroupMetricsGeneration parameter specifies that group metrics information must be generated on the Mailbox server regardless of whether that server generates an offline address book (OAB). By default, group metrics are generated only on servers that generate OABs. Group metrics information is used by MailTips to inform senders about how many recipients their messages will be sent to. You need to use this parameter if your organization doesn't generate OABs and you want the group metrics data to be available.")] Boolean ForceGroupMetricsGeneration; - [Write, Description("The IsExcludedFromProvisioning parameter specifies that the Mailbox server isn't considered by the OAB provisioning load balancer. If the IsExcludedFromProvisioning parameter is set to $true, the server won't be used for provisioning a new OAB or for moving existing OABs.")] Boolean IsExcludedFromProvisioning; - [Write, Description("The JournalingLogForManagedFoldersEnabled parameter specifies whether the log for managed folders is enabled for journaling. The two possible values for this parameter are $true or $false. If you specify $true, information about messages that were journaled is logged. The logs are located at the location you specify with the LogPathForManagedFolders parameter.")] Boolean JournalingLogForManagedFoldersEnabled; - [Write, Description("The Locale parameter specifies the locale. A locale is a collection of language-related user preferences such as writing system, calendar, and date format.")] String Locale []; - [Write, Description("The LogDirectorySizeLimitForManagedFolders parameter specifies the size limit for all managed folder log files from a single message database. After the limit is reached for a set of managed folder log files from a message database, the oldest files are deleted to make space for new files.")] String LogDirectorySizeLimitForManagedFolders; - [Write, Description("The LogFileAgeLimitForManagedFolders parameter specifies how long to retain managed folder logs. Log files that exceed the maximum retention period are deleted.")] String LogFileAgeLimitForManagedFolders; - [Write, Description("The LogFileSizeLimitForManagedFolders parameter specifies the maximum size for each managed folder log file. When the log file size limit is reached, a new log file is created.")] String LogFileSizeLimitForManagedFolders; - [Write, Description("The LogPathForManagedFolders parameter specifies the path to the directory that stores the managed folder log files.")] String LogPathForManagedFolders; - [Write, Description("The MailboxProcessorWorkCycle parameter specifies how often to scan for locked mailboxes.")] String MailboxProcessorWorkCycle; - [Write, Description("The ManagedFolderAssistantSchedule parameter specifies the intervals each week during which the Managed Folder Assistant applies messaging records management (MRM) settings to managed folders. The format is StartDay.Time-EndDay.")] String ManagedFolderAssistantSchedule[]; - [Write, Description("The ManagedFolderWorkCycle parameter specifies the time span in which all mailboxes on the specified server will be processed by the Managed Folder Assistant. The Managed Folder Assistant applies retention policies according to the ManagedFolderWorkCycleCheckpoint interval.")] String ManagedFolderWorkCycle; - [Write, Description("The ManagedFolderWorkCycleCheckpoint parameter specifies the time span at which to refresh the list of mailboxes so that new mailboxes that have been created or moved will be part of the work queue. Also, as mailboxes are prioritized, existing mailboxes that haven't been successfully processed for a long time will be placed higher in the queue and will have a greater chance of being processed again in the same work cycle.")] String ManagedFolderWorkCycleCheckpoint; - [Write, Description("The MAPIEncryptionRequired parameter specifies whether Exchange blocks MAPI clients that don't use encrypted remote procedure calls (RPCs).")] Boolean MAPIEncryptionRequired; - [Write, Description("The MaximumActiveDatabases parameter specifies the number of databases that can be mounted on this Mailbox server. This parameter accepts numeric values.")] String MaximumActiveDatabases; - [Write, Description("The MaximumPreferredActiveDatabases parameter specifies a preferred maximum number of databases that a server should have. This value is different from the actual maximum, which is configured using the MaximumActiveDatabases parameter. The value of MaximumPreferredActiveDatabases is only honored during best copy and server selection, database and server switchovers, and when rebalancing the DAG.")] String MaximumPreferredActiveDatabases; - [Write, Description("The OABGeneratorWorkCycle parameter specifies the time span in which the OAB generation on the specified server will be processed.")] String OABGeneratorWorkCycle; - [Write, Description("The OABGeneratorWorkCycleCheckpoint parameter specifies the time span at which to run OAB generation.")] String OABGeneratorWorkCycleCheckpoint; - [Write, Description("The PublicFolderWorkCycle parameter is used by the public folder assistant to determine how often the mailboxes in a database are processed by the assistant.")] String PublicFolderWorkCycle; - [Write, Description("The PublicFolderWorkCycleCheckpoint determines how often the mailbox list for a database is evaluated. The processing speed is also calculated.")] String PublicFolderWorkCycleCheckpoint; - [Write, Description("The RetentionLogForManagedFoldersEnabled parameter specifies whether the Managed Folder Assistant logs information about messages that have reached their retention limits.")] Boolean RetentionLogForManagedFoldersEnabled; - [Write, Description("The SharingPolicySchedule parameter specifies the intervals each week during which the sharing policy runs. The Sharing Policy Assistant checks permissions on shared calendar items and contact folders in users' mailboxes against the assigned sharing policy. The assistant lowers or removes permissions according to the policy. The format is StartDay.Time-EndDay.Time.")] String SharingPolicySchedule[]; - [Write, Description("The SharingPolicyWorkCycle parameter specifies the time span in which all mailboxes on the specified server will be scanned by the Sharing Policy Assistant. The Sharing Policy Assistant scans all mailboxes and enables or disables sharing polices according to the interval specified by the SharingPolicyWorkCycle.")] String SharingPolicyWorkCycle; - [Write, Description("The SharingPolicyWorkCycleCheckpoint parameter specifies the time span at which to refresh the list of mailboxes so that new mailboxes that have been created or moved will be part of the work queue. Also, as mailboxes are prioritized, existing mailboxes that haven't been successfully processed for a long time will be placed higher in the queue and will have a greater chance of being processed again in the same work cycle.")] String SharingPolicyWorkCycleCheckpoint; - [Write, Description("The SharingSyncWorkCycle parameter specifies the time span in which all mailboxes on the specified server will be synced to the cloud-based service by the Sharing Sync Assistant. Mailboxes that require syncing will be synced according to the interval specified by the SharingSyncWorkCycleCheckpoint parameter.")] String SharingSyncWorkCycle; - [Write, Description("The SharingSyncWorkCycleCheckpoint parameter specifies the time span at which to refresh the list of mailboxes so that new mailboxes that have been created or moved will be part of the work queue. Also, as mailboxes are prioritized, existing mailboxes that haven't been successfully processed for a long time will be placed higher in the queue and will have a greater chance of being processed again in the same work cycle.")] String SharingSyncWorkCycleCheckpoint; - [Write, Description("The SiteMailboxWorkCycle parameter specifies the time span in which the site mailbox information on the specified server will be processed.")] String SiteMailboxWorkCycle; - [Write, Description("The SiteMailboxWorkCycleCheckpoint parameter specifies the time span at which to refresh the site mailbox workcycle.")] String SiteMailboxWorkCycleCheckpoint; - [Write, Description("The SubjectLogForManagedFoldersEnabled parameter specifies whether the subject of messages is displayed in managed folder logs.")] Boolean SubjectLogForManagedFoldersEnabled; - [Write, Description("The TopNWorkCycle parameter specifies the time span in which all mailboxes that have Unified Messaging on the specified server will be scanned by the TopN Words Assistant. The TopN Words Assistant scans voice mail for the most frequently used words to aid in transcription.")] String TopNWorkCycle; - [Write, Description("The TopNWorkCycleCheckpoint parameter specifies the time span at which to refresh the list of mailboxes so that new mailboxes that have been created or moved will be part of the work queue. Also, as mailboxes are prioritized, existing mailboxes that haven't been successfully processed for a long time will be placed higher in the queue and will have a greater chance of being processed again in the same work cycle.")] String TopNWorkCycleCheckpoint; - [Write, Description("The UMReportingWorkCycle parameter specifies the time span in which the arbitration mailbox named SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9} on the specified server will be scanned by the Unified Messaging Reporting Assistant. The Unified Messaging Reporting Assistant updates the Call Statistics reports by reading Unified Messaging call data records for an organization on a regular basis.")] String UMReportingWorkCycle; - [Write, Description("The UMReportingWorkCycleCheckpoint parameter specifies the time span at which the arbitration mailbox named SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9} will be marked by processing.")] String UMReportingWorkCycleCheckpoint; - [Write, Description("The WacDiscoveryEndpoint parameter specifies the Office Online Server endpoint to use. Exchange 2016 only.")] String WacDiscoveryEndpoint; -}; - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxTransportService/MSFT_xExchMailboxTransportService.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxTransportService/MSFT_xExchMailboxTransportService.psm1 deleted file mode 100644 index 666185fa..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxTransportService/MSFT_xExchMailboxTransportService.psm1 +++ /dev/null @@ -1,450 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Identity, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $ConnectivityLogEnabled, - - [System.String] - $ConnectivityLogMaxAge, - - [System.String] - $ConnectivityLogMaxDirectorySize, - - [System.String] - $ConnectivityLogMaxFileSize, - - [System.String] - $ConnectivityLogPath, - - [System.Boolean] - $ContentConversionTracingEnabled, - - [System.Int32] - $MaxConcurrentMailboxDeliveries, - - [System.Int32] - $MaxConcurrentMailboxSubmissions, - - [System.Boolean] - $PipelineTracingEnabled, - - [System.String] - $PipelineTracingPath, - - [System.String] - $PipelineTracingSenderAddress, - - [System.String] - $ReceiveProtocolLogMaxAge, - - [System.String] - $ReceiveProtocolLogMaxDirectorySize, - - [System.String] - $ReceiveProtocolLogMaxFileSize, - - [System.String] - $ReceiveProtocolLogPath, - - [System.String] - $RoutingTableLogMaxAge, - - [System.String] - $RoutingTableLogMaxDirectorySize, - - [System.String] - $RoutingTableLogPath, - - [System.String] - $SendProtocolLogMaxAge, - - [System.String] - $SendProtocolLogMaxDirectorySize, - - [System.String] - $SendProtocolLogMaxFileSize, - - [System.String] - $SendProtocolLogPath - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath $PSScriptRoot).Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-MailboxTransportService" -VerbosePreference $VerbosePreference - - #Remove Credential and Ensure so we don't pass it into the next command - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Credential","AllowServiceRestart" - - $mbxTransportService = Get-MailboxTransportService $Identity -ErrorAction SilentlyContinue - - if ($null -ne $mbxTransportService) - { - $returnValue = @{ - Identity = $Identity - ConnectivityLogEnabled = $mbxTransportService.ConnectivityLogEnabled - ConnectivityLogMaxAge = $mbxTransportService.ConnectivityLogMaxAge - ConnectivityLogMaxDirectorySize = $mbxTransportService.ConnectivityLogMaxDirectorySize - ConnectivityLogMaxFileSize = $mbxTransportService.ConnectivityLogMaxFileSize - ConnectivityLogPath = $mbxTransportService.ConnectivityLogPath - ContentConversionTracingEnabled = $mbxTransportService.ContentConversionTracingEnabled - MaxConcurrentMailboxDeliveries = $mbxTransportService.MaxConcurrentMailboxDeliveries - MaxConcurrentMailboxSubmissions = $mbxTransportService.MaxConcurrentMailboxSubmissions - PipelineTracingEnabled = $mbxTransportService.PipelineTracingEnabled - PipelineTracingPath = $mbxTransportService.PipelineTracingPath - PipelineTracingSenderAddress = $mbxTransportService.PipelineTracingSenderAddress - ReceiveProtocolLogMaxAge = $mbxTransportService.ReceiveProtocolLogMaxAge - ReceiveProtocolLogMaxDirectorySize = $mbxTransportService.ReceiveProtocolLogMaxDirectorySize - ReceiveProtocolLogMaxFileSize = $mbxTransportService.ReceiveProtocolLogMaxFileSize - ReceiveProtocolLogPath = $mbxTransportService.ReceiveProtocolLogPath - SendProtocolLogMaxAge = $mbxTransportService.SendProtocolLogMaxAge - SendProtocolLogMaxDirectorySize = $mbxTransportService.SendProtocolLogMaxDirectorySize - SendProtocolLogMaxFileSize = $mbxTransportService.SendProtocolLogMaxFileSize - SendProtocolLogPath = $mbxTransportService.SendProtocolLogPath - } - } - - $returnValue -} - -function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "")] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Identity, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $ConnectivityLogEnabled, - - [System.String] - $ConnectivityLogMaxAge, - - [System.String] - $ConnectivityLogMaxDirectorySize, - - [System.String] - $ConnectivityLogMaxFileSize, - - [System.String] - $ConnectivityLogPath, - - [System.Boolean] - $ContentConversionTracingEnabled, - - [System.Int32] - $MaxConcurrentMailboxDeliveries, - - [System.Int32] - $MaxConcurrentMailboxSubmissions, - - [System.Boolean] - $PipelineTracingEnabled, - - [System.String] - $PipelineTracingPath, - - [System.String] - $PipelineTracingSenderAddress, - - [System.String] - $ReceiveProtocolLogMaxAge, - - [System.String] - $ReceiveProtocolLogMaxDirectorySize, - - [System.String] - $ReceiveProtocolLogMaxFileSize, - - [System.String] - $ReceiveProtocolLogPath, - - [System.String] - $RoutingTableLogMaxAge, - - [System.String] - $RoutingTableLogMaxDirectorySize, - - [System.String] - $RoutingTableLogPath, - - [System.String] - $SendProtocolLogMaxAge, - - [System.String] - $SendProtocolLogMaxDirectorySize, - - [System.String] - $SendProtocolLogMaxFileSize, - - [System.String] - $SendProtocolLogPath - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath $PSScriptRoot).Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Set-MailboxTransportService" -VerbosePreference $VerbosePreference - - #Remove Credential and Ensure so we don't pass it into the next command - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Credential","AllowServiceRestart" - - #if PipelineTracingSenderAddress exists and is empty, set it to $null so Set-MailboxTransportService nulls out the stored value - if ($PSBoundParameters.ContainsKey('PipelineTracingSenderAddress') -and [string]::IsNullOrEmpty($PipelineTracingSenderAddress)) - { - $PSBoundParameters['PipelineTracingSenderAddress'] = $null - } - - Set-MailboxTransportService @PSBoundParameters - - if ($AllowServiceRestart -eq $true) - { - Write-Verbose "Restart service MSExchangeDelivery" - Restart-Service -Name MSExchangeDelivery -WarningAction SilentlyContinue - - Write-Verbose "Restart service MSExchangeSubmission" - Restart-Service -Name MSExchangeSubmission -WarningAction SilentlyContinue - } - else - { - Write-Warning "The configuration will not take effect until the MSExchangeDelivery and/or MSExchangeSubmission services are manually restarted." - } -} - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Identity, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $ConnectivityLogEnabled, - - [System.String] - $ConnectivityLogMaxAge, - - [System.String] - $ConnectivityLogMaxDirectorySize, - - [System.String] - $ConnectivityLogMaxFileSize, - - [System.String] - $ConnectivityLogPath, - - [System.Boolean] - $ContentConversionTracingEnabled, - - [System.Int32] - $MaxConcurrentMailboxDeliveries, - - [System.Int32] - $MaxConcurrentMailboxSubmissions, - - [System.Boolean] - $PipelineTracingEnabled, - - [System.String] - $PipelineTracingPath, - - [System.String] - $PipelineTracingSenderAddress, - - [System.String] - $ReceiveProtocolLogMaxAge, - - [System.String] - $ReceiveProtocolLogMaxDirectorySize, - - [System.String] - $ReceiveProtocolLogMaxFileSize, - - [System.String] - $ReceiveProtocolLogPath, - - [System.String] - $RoutingTableLogMaxAge, - - [System.String] - $RoutingTableLogMaxDirectorySize, - - [System.String] - $RoutingTableLogPath, - - [System.String] - $SendProtocolLogMaxAge, - - [System.String] - $SendProtocolLogMaxDirectorySize, - - [System.String] - $SendProtocolLogMaxFileSize, - - [System.String] - $SendProtocolLogPath - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath $PSScriptRoot).Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-MailboxTransportService" -VerbosePreference $VerbosePreference - - $mbxTransportService = Get-MailboxTransportService $Identity -ErrorAction SilentlyContinue - - if ($null -ne $mbxTransportService) - { - if (!(VerifySetting -Name "ConnectivityLogEnabled" -Type "Boolean" -ExpectedValue $ConnectivityLogEnabled -ActualValue $mbxTransportService.ConnectivityLogEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ConnectivityLogMaxAge" -Type "Timespan" -ExpectedValue $ConnectivityLogMaxAge -ActualValue $mbxTransportService.ConnectivityLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ConnectivityLogMaxDirectorySize" -Type "Unlimited" -ExpectedValue $ConnectivityLogMaxDirectorySize -ActualValue $mbxTransportService.ConnectivityLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ConnectivityLogMaxFileSize" -Type "Unlimited" -ExpectedValue $ConnectivityLogMaxFileSize -ActualValue $mbxTransportService.ConnectivityLogMaxFileSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ConnectivityLogPath" -Type "String" -ExpectedValue $ConnectivityLogPath -ActualValue $mbxTransportService.ConnectivityLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ContentConversionTracingEnabled" -Type "Boolean" -ExpectedValue $ContentConversionTracingEnabled -ActualValue $mbxTransportService.ContentConversionTracingEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MaxConcurrentMailboxDeliveries" -Type "Int" -ExpectedValue $MaxConcurrentMailboxDeliveries -ActualValue $mbxTransportService.MaxConcurrentMailboxDeliveries -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MaxConcurrentMailboxSubmissions" -Type "Int" -ExpectedValue $MaxConcurrentMailboxSubmissions -ActualValue $mbxTransportService.MaxConcurrentMailboxSubmissions -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "PipelineTracingEnabled" -Type "Boolean" -ExpectedValue $PipelineTracingEnabled -ActualValue $mbxTransportService.PipelineTracingEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "PipelineTracingPath" -Type "String" -ExpectedValue $PipelineTracingPath -ActualValue $mbxTransportService.PipelineTracingPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "PipelineTracingSenderAddress" -Type "SMTPAddress" -ExpectedValue $PipelineTracingSenderAddress -ActualValue $mbxTransportService.PipelineTracingSenderAddress -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ReceiveProtocolLogMaxAge" -Type "TimeSpan" -ExpectedValue $ReceiveProtocolLogMaxAge -ActualValue $mbxTransportService.ReceiveProtocolLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ReceiveProtocolLogMaxDirectorySize" -Type "Unlimited" -ExpectedValue $ReceiveProtocolLogMaxDirectorySize -ActualValue $mbxTransportService.ReceiveProtocolLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ReceiveProtocolLogMaxFileSize" -Type "Unlimited" -ExpectedValue $ReceiveProtocolLogMaxFileSize -ActualValue $mbxTransportService.ReceiveProtocolLogMaxFileSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ReceiveProtocolLogPath" -Type "String" -ExpectedValue $ReceiveProtocolLogPath -ActualValue $mbxTransportService.ReceiveProtocolLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "SendProtocolLogMaxAge" -Type "TimeSpan" -ExpectedValue $SendProtocolLogMaxAge -ActualValue $mbxTransportService.SendProtocolLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "SendProtocolLogMaxDirectorySize" -Type "Unlimited" -ExpectedValue $SendProtocolLogMaxDirectorySize -ActualValue $mbxTransportService.SendProtocolLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "SendProtocolLogMaxFileSize" -Type "Unlimited" -ExpectedValue $SendProtocolLogMaxFileSize -ActualValue $mbxTransportService.SendProtocolLogMaxFileSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "SendProtocolLogPath" -Type "String" -ExpectedValue $SendProtocolLogPath -ActualValue $mbxTransportService.SendProtocolLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - } - else - { - return $false - } - - return $true -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxTransportService/MSFT_xExchMailboxTransportService.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxTransportService/MSFT_xExchMailboxTransportService.schema.mof deleted file mode 100644 index 43804b5a..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMailboxTransportService/MSFT_xExchMailboxTransportService.schema.mof +++ /dev/null @@ -1,29 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xExchMailboxTransportService")] -class MSFT_xExchMailboxTransportService : OMI_BaseResource -{ - [Key] String Identity; //Exchange server - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - [Write] Boolean AllowServiceRestart; //Whether it is OK to restart service MSExchangeTransport; - [Write] Boolean ConnectivityLogEnabled; - [Write] String ConnectivityLogMaxAge; - [Write] String ConnectivityLogMaxDirectorySize; - [Write] String ConnectivityLogMaxFileSize; - [Write] String ConnectivityLogPath; - [Write] Boolean ContentConversionTracingEnabled; - [Write] SInt32 MaxConcurrentMailboxDeliveries; - [Write] SInt32 MaxConcurrentMailboxSubmissions; - [Write] Boolean PipelineTracingEnabled; - [Write] String PipelineTracingPath; - [Write] String PipelineTracingSenderAddress; - [Write] String ReceiveProtocolLogMaxAge; - [Write] String ReceiveProtocolLogMaxDirectorySize; - [Write] String ReceiveProtocolLogMaxFileSize; - [Write] String ReceiveProtocolLogPath; - [Write] String RoutingTableLogMaxAge; - [Write] String RoutingTableLogMaxDirectorySize; - [Write] String RoutingTableLogPath; - [Write] String SendProtocolLogMaxAge; - [Write] String SendProtocolLogMaxDirectorySize; - [Write] String SendProtocolLogMaxFileSize; - [Write] String SendProtocolLogPath; -}; diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMaintenanceMode/MSFT_xExchMaintenanceMode.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMaintenanceMode/MSFT_xExchMaintenanceMode.psm1 deleted file mode 100644 index ef8ec8c4..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMaintenanceMode/MSFT_xExchMaintenanceMode.psm1 +++ /dev/null @@ -1,1286 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.Boolean] - $Enabled, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.String[]] - $AdditionalComponentsToActivate, - - [System.String] - $DomainController, - - [System.Boolean] - $MovePreferredDatabasesBack = $false, - - [System.Boolean] - $SetInactiveComponentsFromAnyRequesterToActive = $false, - - [System.String] - $UpgradedServerVersion - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Enabled" = $Enabled} -VerbosePreference $VerbosePreference - - #Load TransportMaintenanceMode Helper - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)"))\TransportMaintenance.psm1" -Verbose:0 - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-*" -VerbosePreference $VerbosePreference - - $maintenanceModeStatus = GetMaintenanceModeStatus -EnteringMaintenanceMode $Enabled -DomainController $DomainController - $atDesiredVersion = IsExchangeAtDesiredVersion -DomainController $DomainController -UpgradedServerVersion $UpgradedServerVersion - - if ($null -ne $maintenanceModeStatus) - { - #Determine which components are Active - $activeComponents = $MaintenanceModeStatus.ServerComponentState | Where-Object {$_.State -eq "Active"} - - [string[]]$activeComponentsList = @() - - if ($null -ne $activeComponents) - { - foreach ($activeComponent in $activeComponents) - { - $activeComponentsList += $activeComponent.Component - } - } - - $activeComponentCount = $activeComponentsList.Count - - - #Figure out what our Enabled state should really be in case UpgradedServerVersion was passed - $isEnabled = $Enabled - - if ($Enabled -eq $true -and $atDesiredVersion -eq $true) - { - $isEnabled = $false - } - - - $returnValue = @{ - Enabled = $isEnabled - ActiveComponentCount = $activeComponentCount - ActiveComponentsList = $activeComponentsList - ActiveDBCount = GetActiveDBCount -MaintenanceModeStatus $maintenanceModeStatus -DomainController $DomainController - ActiveUMCallCount = GetUMCallCount -MaintenanceModeStatus $maintenanceModeStatus -DomainController $DomainController - ClusterState = $maintenanceModeStatus.ClusterNode.State - QueuedMessageCount = GetQueueMessageCount -MaintenanceModeStatus $maintenanceModeStatus - } - } - - $returnValue -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.Boolean] - $Enabled, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.String[]] - $AdditionalComponentsToActivate, - - [System.String] - $DomainController, - - [System.Boolean] - $MovePreferredDatabasesBack = $false, - - [System.Boolean] - $SetInactiveComponentsFromAnyRequesterToActive = $false, - - [System.String] - $UpgradedServerVersion - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Enabled" = $Enabled} -VerbosePreference $VerbosePreference - - #Load TransportMaintenanceMode Helper - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)"))\TransportMaintenance.psm1" -Verbose:0 - - #Get ready for calling DAG maintenance scripts later - $scriptsFolder = Join-Path -Path ((Get-ItemProperty HKLM:\SOFTWARE\Microsoft\ExchangeServer\v15\Setup).MsiInstallPath) -ChildPath "Scripts" - $startDagServerMaintenanceScript = Join-Path -Path "$($scriptsFolder)" -ChildPath "StartDagServerMaintenance.ps1" - $stopDagServerMaintenanceScript = Join-Path -Path "$($scriptsFolder)" -ChildPath "StopDagServerMaintenance.ps1" - - #Override Write-Host, as it is used by the target scripts, and causes a DSC error since the session is not interactive - New-Alias Write-Host Write-Verbose - - #Check if setup is running. - $setupRunning = IsSetupRunning - - if ($setupRunning -eq $true) - { - Write-Verbose "Exchange Setup is currently running. Skipping maintenance mode checks." - return - } - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "*" -VerbosePreference $VerbosePreference - - #If the request is to put the server in maintenance mode, make sure we aren't already at the (optional) requested Exchange Server version - $atDesiredVersion = IsExchangeAtDesiredVersion -DomainController $DomainController -UpgradedServerVersion $UpgradedServerVersion - - if ($Enabled -eq $true -and $atDesiredVersion -eq $true) - { - Write-Verbose "Server is already at or above the desired upgrade version of '$($UpgradedServerVersion)'. Skipping putting server into maintenance mode." - return - } - - #Continue on with setting the maintenance mode state - $maintenanceModeStatus = GetMaintenanceModeStatus -EnteringMaintenanceMode $Enabled -DomainController $DomainController - - if ($null -ne $maintenanceModeStatus) - { - #Set vars relevant to both 'Enabled' code paths - $htStatus = $MaintenanceModeStatus.ServerComponentState | Where-Object {$_.Component -eq "HubTransport"} - $haStatus = $MaintenanceModeStatus.ServerComponentState | Where-Object {$_.Component -eq "HubTransport"} - - #Put the server into maintenance mode - if ($Enabled -eq $true) - { - #Block DB activation on this server - if ($maintenanceModeStatus.MailboxServer.DatabaseCopyAutoActivationPolicy -ne "Blocked") - { - Write-Verbose "Setting DatabaseCopyAutoActivationPolicy to Blocked" - SetMailboxServer -Identity $env:COMPUTERNAME -DomainController $DomainController -AdditionalParams @{"DatabaseCopyAutoActivationPolicy" = "Blocked"} - } - - #Set UM to draining before anything else - $changedUM = ChangeComponentState -Component "UMCallRouter" -Requester "Maintenance" -ServerComponentState $maintenanceModeStatus.ServerComponentState -State "Draining" -SetInactiveComponentsFromAnyRequesterToActive $SetInactiveComponentsFromAnyRequesterToActive -DomainController $DomainController - - #Start HT maintenance if required - if ($htStatus.State -ne "Inactive") - { - Write-Verbose "Entering Transport Maintenance" - [string[]]$transportExclusions = GetMessageRedirectionExclusions -DomainController $DomainController - Start-TransportMaintenance -LoadLocalShell $false -MessageRedirectExclusions $transportExclusions -Verbose - } - - #Wait for remaining UM calls to drain - if ($changedUM) - { - WaitForUMToDrain -DomainController $DomainController - } - - #Run StartDagServerMaintenance script to put cluster offline and failover DB's - if ($maintenanceModeStatus.ClusterNode.State -eq "Up" -or - $maintenanceModeStatus.MailboxServer.DatabaseCopyAutoActivationPolicy -ne "Blocked" -or - (GetActiveDBCount -MaintenanceModeStatus $maintenanceModeStatus -DomainController $DomainController) -ne 0) - { - Write-Verbose "Running StartDagServerMaintenance.ps1" - - $dagMemberCount = GetDAGMemberCount - - if ($dagMemberCount -ne 0 -and $dagMemberCount -le 2) - { - . $startDagServerMaintenanceScript -serverName $env:COMPUTERNAME -overrideMinimumTwoCopies -Verbose - } - else - { - . $startDagServerMaintenanceScript -serverName $env:COMPUTERNAME -Verbose - } - } - - #Set remaining components to offline - $changedState = ChangeComponentState -Component "ServerWideOffline" -Requester "Maintenance" -ServerComponentState $maintenanceModeStatus.ServerComponentState -State "Inactive" -SetInactiveComponentsFromAnyRequesterToActive $SetInactiveComponentsFromAnyRequesterToActive -DomainController $DomainController - - #Check whether we are actually in maintenance mode - $testResults = Test-TargetResource @PSBoundParameters - - if ($testResults -eq $false) - { - throw "Server is not fully in maintenance mode after running through steps to enable maintenance mode." - } - } - #Take the server out of maintenance mode - else - { - #Bring ServerWideOffline and UMCallRouter back online - $changedState = ChangeComponentState -Component "ServerWideOffline" -Requester "Maintenance" -ServerComponentState $maintenanceModeStatus.ServerComponentState -State "Active" -SetInactiveComponentsFromAnyRequesterToActive $SetInactiveComponentsFromAnyRequesterToActive -DomainController $DomainController - $changedState = ChangeComponentState -Component "UMCallRouter" -Requester "Maintenance" -ServerComponentState $maintenanceModeStatus.ServerComponentState -State "Active" -SetInactiveComponentsFromAnyRequesterToActive $SetInactiveComponentsFromAnyRequesterToActive -DomainController $DomainController - - #Run StopDagServerMaintenance.ps1 if required - if ($maintenanceModeStatus.ClusterNode.State -ne "Up" -or ` - $maintenanceModeStatus.MailboxServer.DatabaseCopyAutoActivationPolicy -ne "Unrestricted" -or` - $haStatus.State -ne "Active") - { - Write-Verbose "Running StopDagServerMaintenance.ps1" - - #Run StopDagServerMaintenance.ps1 in try/catch, so if an exception occurs, we can at least finish - #doing the rest of the steps to take the server out of maintenance mode - try - { - . $stopDagServerMaintenanceScript -serverName $env:COMPUTERNAME -Verbose - } - catch - { - Write-Error "Caught exception running StopDagServerMaintenance.ps1: $($_.Exception.Message)" - } - } - - #End Transport Maintenance - if ($htStatus.State -ne "Active") - { - Write-Verbose "Ending Transport Maintenance" - Stop-TransportMaintenance -LoadLocalShell $false -Verbose - } - - #Bring components online that may have been taken offline by a failed setup run - $changedState = ChangeComponentState -Component "Monitoring" -Requester "Functional" -ServerComponentState $maintenanceModeStatus.ServerComponentState -State "Active" -SetInactiveComponentsFromAnyRequesterToActive $SetInactiveComponentsFromAnyRequesterToActive -DomainController $DomainController - $changedState = ChangeComponentState -Component "RecoveryActionsEnabled" -Requester "Functional" -ServerComponentState $maintenanceModeStatus.ServerComponentState -State "Active" -SetInactiveComponentsFromAnyRequesterToActive $SetInactiveComponentsFromAnyRequesterToActive -DomainController $DomainController - - #Bring online any specifically requested components - if ($null -ne $AdditionalComponentsToActivate) - { - foreach ($component in $AdditionalComponentsToActivate) - { - if ((IsComponentCheckedByDefault -ComponentName $component) -eq $false) - { - $status = $null - $status = $MaintenanceModeStatus.ServerComponentState | Where-Object {$_.Component -like "$($component)"} - - $changedState = ChangeComponentState -Component $component -Requester "Functional" -ServerComponentState $maintenanceModeStatus.ServerComponentState -State "Active" -SetInactiveComponentsFromAnyRequesterToActive $SetInactiveComponentsFromAnyRequesterToActive -DomainController $DomainController - } - } - } - - if ($MovePreferredDatabasesBack -eq $true) - { - MovePrimaryDatabasesBack -DomainController $DomainController - } - } - } - else - { - throw "Failed to retrieve maintenance mode status of server." - } - - Remove-Item Alias:Write-Host -ErrorAction SilentlyContinue -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.Boolean] - $Enabled, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.String[]] - $AdditionalComponentsToActivate, - - [System.String] - $DomainController, - - [System.Boolean] - $MovePreferredDatabasesBack = $false, - - [System.Boolean] - $SetInactiveComponentsFromAnyRequesterToActive = $false, - - [System.String] - $UpgradedServerVersion - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Enabled" = $Enabled} -VerbosePreference $VerbosePreference - - #Load TransportMaintenanceMode Helper - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)"))\TransportMaintenance.psm1" -Verbose:0 - - $setupRunning = IsSetupRunning - - if ($setupRunning -eq $true) - { - Write-Verbose "Exchange Setup is currently running. Skipping maintenance mode checks." - return $true - } - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-*" -VerbosePreference $VerbosePreference - - $maintenanceModeStatus = GetMaintenanceModeStatus -EnteringMaintenanceMode $Enabled -DomainController $DomainController - - if ($null -ne $maintenanceModeStatus) - { - #Make sure server is fully in maintenance mode - if ($Enabled -eq $true) - { - $atDesiredVersion = IsExchangeAtDesiredVersion -DomainController $DomainController -UpgradedServerVersion $UpgradedServerVersion - - if ($atDesiredVersion -eq $true) - { - Write-Verbose "Server is already at or above the desired upgrade version of '$($UpgradedServerVersion)'. Skipping putting server into maintenance mode." - return $true - } - else - { - if ($maintenanceModeStatus.MailboxServer.DatabaseCopyAutoActivationPolicy -ne "Blocked") - { - Write-Verbose "DatabaseCopyAutoActivationPolicy is not set to Blocked" - return $false - } - - if ($null -ne ($MaintenanceModeStatus.ServerComponentState | Where-Object {$_.State -ne "Inactive" -and $_.Component -ne "Monitoring" -and $_.Component -ne "RecoveryActionsEnabled"})) - { - Write-Verbose "One or more components have a status other than Inactive" - return $false - } - - if ($maintenanceModeStatus.ClusterNode.State -eq "Up") - { - Write-Verbose "Cluster node has a status of Up" - return $false - } - - if ((IsServerPAM -DomainController $DomainController) -eq $true) - { - Write-Verbose "Server still has the Primary Active Manager role" - return $false - } - - - [int]$messagesQueued = GetQueueMessageCount -MaintenanceModeStatus $maintenanceModeStatus - - if ($messagesQueued -gt 0) - { - Write-Verbose "Found $($messagesQueued) messages still in queue" - return $false - } - - - [int]$activeDBCount = GetActiveDBCount -MaintenanceModeStatus $maintenanceModeStatus -DomainController $DomainController - - if ($activeDBCount -gt 0) - { - Write-Verbose "Found $($activeDBCount) replicated databases still activated on this server" - return $false - } - - - [int]$umCallCount = GetUMCallCount -MaintenanceModeStatus $maintenanceModeStatus -DomainController $DomainController - - if ($umCallCount -gt 0) - { - Write-Verbose "Found $($umCallCount) active UM calls on this server" - return $false - } - } - } - #Make sure the server is fully out of maintenance mode - else - { - $activeComponents = $MaintenanceModeStatus.ServerComponentState | Where-Object {$_.State -eq "Active"} - - if ($null -eq $activeComponents) - { - Write-Verbose "No Components found with a status of Active" - return $false - } - - if ($null -eq ($activeComponents | Where-Object {$_.Component -eq "ServerWideOffline"})) - { - Write-Verbose "Component ServerWideOffline is not Active" - return $false - } - - if ($null -eq ($activeComponents | Where-Object {$_.Component -eq "UMCallRouter"})) - { - Write-Verbose "Component UMCallRouter is not Active" - return $false - } - - if ($null -eq ($activeComponents | Where-Object {$_.Component -eq "HubTransport"})) - { - Write-Verbose "Component HubTransport is not Active" - return $false - } - - if ($maintenanceModeStatus.ClusterNode.State -ne "Up") - { - Write-Verbose "Cluster node has a status of $($maintenanceModeStatus.ClusterNode.State)" - return $false - } - - if ($maintenanceModeStatus.MailboxServer.DatabaseCopyAutoActivationPolicy -ne "Unrestricted") - { - Write-Verbose "DatabaseCopyAutoActivationPolicy is set to $($maintenanceModeStatus.MailboxServer.DatabaseCopyAutoActivationPolicy)" - return $false - } - - if ($null -eq ($activeComponents | Where-Object {$_.Component -eq "Monitoring"})) - { - Write-Verbose "Component Monitoring is not Active" - return $false - } - - if ($null -eq ($activeComponents | Where-Object {$_.Component -eq "RecoveryActionsEnabled"})) - { - Write-Verbose "Component RecoveryActionsEnabled is not Active" - return $false - } - - if ($null -ne $AdditionalComponentsToActivate) - { - foreach ($component in $AdditionalComponentsToActivate) - { - if ((IsComponentCheckedByDefault -ComponentName $component) -eq $false) - { - $status = $null - $status = $MaintenanceModeStatus.ServerComponentState | Where-Object {$_.Component -like "$($component)"} - - if ($null -ne $status -and $Status.State -ne "Active") - { - Write-Verbose "Component $($component) is not set to Active" - return $false - } - } - } - } - } - } - else - { - throw "Failed to retrieve maintenance mode status for server." - } - - return $true -} - -#Gets a Hashtable containing various objects from Exchange that will be used to determine maintenance mode status -function GetMaintenanceModeStatus -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [System.String] - $DomainController, - - [System.Boolean] - $EnteringMaintenanceMode = $true - ) - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep 'DomainController' - - $serverComponentState = GetServerComponentState -Identity $env:COMPUTERNAME -DomainController $DomainController - $clusterNode = Get-ClusterNode -Name $env:COMPUTERNAME - $dbCopyStatus = GetMailboxDatabaseCopyStatus -Server $env:COMPUTERNAME -DomainController $DomainController - $umCalls = GetUMActiveCalls -Server $env:COMPUTERNAME -DomainController $DomainController - $mailboxServer = GetMailboxServer -Identity $env:COMPUTERNAME -DomainController $DomainController - $queues = Get-Queue -Server $env:COMPUTERNAME -ErrorAction SilentlyContinue - - #If we're checking queues too soon after restarting Transport, Get-Queue may fail. Wait for bootloader to be active and try again. - if ($null -eq $queues -and $EnteringMaintenanceMode -eq $true) - { - $endTime = [DateTime]::Now.AddMinutes(5) - - Write-Verbose "Waiting up to 5 minutes for the Transport Bootloader to be ready before running Get-Queue. Wait started at $([DateTime]::Now)." - - while ($null -eq $queues -and [DateTime]::Now -lt $endTime) - { - Wait-BootLoaderReady -Server $env:COMPUTERNAME -TimeOut (New-TimeSpan -Seconds 15) -PollingFrequency (New-TimeSpan -Seconds 1) | Out-Null - $queues = Get-Queue -Server $env:COMPUTERNAME -ErrorAction SilentlyContinue - } - } - - [System.Collections.Hashtable]$returnValue = @{ - ServerComponentState = $serverComponentState - ClusterNode = $clusterNode - Queues = $queues - DBCopyStatus = $dbCopyStatus - UMActiveCalls = $umCalls - MailboxServer = $mailboxServer - } - - return $returnValue -} - -#Gets a count of messages in queues on the local server -function GetQueueMessageCount -{ - [CmdletBinding()] - [OutputType([System.UInt32])] - param - ( - [parameter(Mandatory = $true)] - [System.Collections.Hashtable] - $MaintenanceModeStatus - ) - - [Uint32]$messageCount = 0 - - if ($null -ne $MaintenanceModeStatus.Queues) - { - foreach ($queue in $MaintenanceModeStatus.Queues | Where-Object {$_.Identity -notlike "*\Shadow\*"}) - { - Write-Verbose "Found queue '$($queue.Identity)' with a message count of '$($queue.MessageCount)'." - $messageCount += $queue.MessageCount - } - } - else - { - Write-Warning "No Transport Queues were detected on this server. This can occur if the MSExchangeTransport service is not started, or if Get-Queue was run too quickly after restarting the service." - } - - return $messageCount -} - -#Gets a count of database that are replication enabled, and are still activated on the local server (even if they are dismounted) -function GetActiveDBCount -{ - [CmdletBinding()] - [OutputType([System.UInt32])] - param - ( - [parameter(Mandatory = $true)] - [System.Collections.Hashtable] - $MaintenanceModeStatus, - - [System.String] - $DomainController - ) - - [Uint32]$activeDBCount = 0 - - #Get DB's with a status of Mounted, Mounting, Dismounted, or Dismounting - $localDBs = $MaintenanceModeStatus.DBCopyStatus | Where-Object {$_.Status -like "Mount*" -or $_.Status -like "Dismount*"} - - #Ensure that any DB's we found actually have copies - foreach ($db in $localDBs) - { - $dbProps = GetMailboxDatabase -Identity "$($db.DatabaseName)" -DomainController $DomainController - - if ($dbProps.ReplicationType -ne "None") - { - Write-Verbose "Found database '$($db.DatabaseName)' with a replication type of '$($dbProps.ReplicationType)' and a status of '$($db.Status)'." - $activeDBCount++ - } - } - - return $activeDBCount -} - -#Gets a count of active UM calls on the local server -function GetUMCallCount -{ - [CmdletBinding()] - [OutputType([System.UInt32])] - param - ( - [parameter(Mandatory = $true)] - [System.Collections.Hashtable] - $MaintenanceModeStatus, - - [System.String] - $DomainController - ) - - [Uint32]$umCallCount = 0 - - $umCalls = GetUMActiveCalls -Server $env:COMPUTERNAME -DomainController $DomainController - - if ($null -ne $umCalls) - { - if ($null -eq $umCalls.Count) - { - $umCallCount = 1 - } - else - { - $umCallCount = $umCalls.Count - } - } - - return $umCallCount -} - -#Gets a list of servers in the DAG with HubTransport not set to Active, or DatabaseCopyAutoActivationPolicy set to Blocked -function GetMessageRedirectionExclusions -{ - [CmdletBinding()] - [OutputType([System.String[]])] - param - ( - [System.String] - $DomainController - ) - - [string[]]$exclusions = @() - - $mbxServer = GetMailboxServer -Identity $env:COMPUTERNAME -DomainController $DomainController - - if ($null -ne $mbxServer) - { - $dag = GetDatabaseAvailabilityGroup -Identity $($mbxServer.DatabaseAvailabilityGroup) -DomainController $DomainController - - if ($null -ne $dag) - { - foreach ($server in $dag.Servers) - { - if ($server.Name -notlike $env:COMPUTERNAME) - { - $serverName = $server.Name.ToLower() - - #Check whether HubTransport is active on the specified server - $htState = $null - $htState = GetServerComponentState -Identity $server.Name -Component "HubTransport" -DomainController $DomainController - - if ($null -ne $htState -and $htState.State -notlike "Active") - { - if (($exclusions.Contains($serverName) -eq $false)) - { - $exclusions += $serverName - continue - } - } - - #Check whether the server is already blocked from database activation - $currentMbxServer = $null - $currentMbxServer = GetMailboxServer -Identity $server.Name -DomainController $DomainController - - if ($null -ne $currentMbxServer -and $currentMbxServer.DatabaseCopyAutoActivationPolicy -like "Blocked") - { - if (($exclusions.Contains($serverName) -eq $false)) - { - $exclusions += $serverName - continue - } - } - } - } - } - } - - return $exclusions -} - -#If UpgradedServerVersion was specified, checks to see whether the server is already at the desired version -function IsExchangeAtDesiredVersion -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [System.String] - $DomainController, - - [System.String] - $UpgradedServerVersion - ) - - $atDesiredVersion = $false - - if (!([string]::IsNullOrEmpty($UpgradedServerVersion))) - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep 'DomainController' - - $server = GetExchangeServer -Identity $env:COMPUTERNAME -DomainController $DomainController - - if ($null -ne $server) - { - [string[]]$versionParts = $UpgradedServerVersion.Split('.') - - if ($null -ne $versionParts -and $versionParts.Length -eq 4) - { - if (([int]::Parse($server.AdminDisplayVersion.Major) -ge [int]::Parse($versionParts[0])) -and - ([int]::Parse($server.AdminDisplayVersion.Minor) -ge [int]::Parse($versionParts[1])) -and - ([int]::Parse($server.AdminDisplayVersion.Build) -ge [int]::Parse($versionParts[2])) -and - ([int]::Parse($server.AdminDisplayVersion.Revision) -ge [int]::Parse($versionParts[3]))) - { - $atDesiredVersion = $true - } - else - { - Write-Verbose "Desired server version '$($UpgradedServerVersion)' is greater than the actual server version '$($server.AdminDisplayVersion)'" - } - } - else - { - throw "Invalid version format for `$UpgradedServerVersion. Should be in the format ##.#.####.#" - } - } - } - - return $atDesiredVersion -} - -#Checks to see whether the specified component is one that is already checked by default -function IsComponentCheckedByDefault -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [string] - $ComponentName - ) - - [boolean]$checkedByDefault = $false - - if ($ComponentName -like "ServerWideOffline" -or $ComponentName -like "UMCallRouter" -or $ComponentName -like "HubTransport" -or $ComponentName -like "Monitoring" -or $ComponentName -like "RecoveryActionsEnabled") - { - $checkedByDefault = $true - } - - return $checkedByDefault -} - -#Gets a count of members in this servers DAG -function GetDAGMemberCount -{ - [CmdletBinding()] - [OutputType([System.Int32])] - param( - [System.String] - $DomainController - ) - - [System.Int32]$count = 0 - - $server = GetMailboxServer -Identity $env:COMPUTERNAME -DomainController $DomainController - - if ($null -ne $server -and ![string]::IsNullOrEmpty($server.DatabaseAvailabilityGroup)) - { - $dag = GetDatabaseAvailabilityGroup -Identity "$($server.DatabaseAvailabilityGroup)" -DomainController $DomainController - - if ($null -ne $dag) - { - $count = $dag.Servers.Count - } - } - - return $count -} - -function IsServerPAM -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param( - [System.String] - $DomainController - ) - - $isPAM = $false - - $server = GetMailboxServer -Identity $env:COMPUTERNAME -DomainController $DomainController - - if ($null -ne $server -and ![string]::IsNullOrEmpty($server.DatabaseAvailabilityGroup)) - { - $dag = GetDatabaseAvailabilityGroup -Identity "$($server.DatabaseAvailabilityGroup)" -DomainController $DomainController - - if ($null -ne $dag -and $dag.PrimaryActiveManager -like $env:COMPUTERNAME) - { - $isPAM = $true - } - } - - return $isPAM -} - -#Waits up the the specified WaitMinutes for existing UM calls to finish. Returns True if no more UM calls are active. -function WaitForUMToDrain -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [System.String] - $DomainController, - - [System.UInt32] - $SleepSeconds = 15, - - [System.UInt32] - $WaitMinutes = 5 - ) - - [boolean]$umDrained = $false - - $endTime = [DateTime]::Now.AddMinutes($WaitMinutes) - - Write-Verbose "Waiting up to $($WaitMinutes) minutes for active UM calls to finish" - - while ($fullyInMaintenanceMode -eq $false -and [DateTime]::Now -lt $endTime) - { - Write-Verbose "Checking whether all UM calls are finished at $([DateTime]::Now)." - - $umCalls = $null - - GetUMActiveCalls -Server $env:COMPUTERNAME -DomainController $DomainController - - if ($null -eq $umCalls -or $umCalls.Count -eq 0) - { - $umDrained = $true - } - else - { - Write-Verbose "There are still active UM calls as of $([DateTime]::Now). Sleeping for $($SleepSeconds) seconds. Will continue checking until $($endTime)." - Start-Sleep -Seconds $SleepSeconds - } - } - - return $umDrained -} - -#Checks whether a Component is at the specified State, if not, changes the component to the state. -#Returns whether a change was made to the component state -function ChangeComponentState -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Component, - - [parameter(Mandatory = $true)] - [System.String] - $Requester, - - [parameter(Mandatory = $true)] - $ServerComponentState, - - [parameter(Mandatory = $true)] - [System.String] - $State, - - [System.String] - $DomainController, - - [System.Boolean] - $SetInactiveComponentsFromAnyRequesterToActive = $false - ) - - [boolean]$madeChange = $false - - $componentState = $MaintenanceModeStatus.ServerComponentState | Where-Object {$_.Component -like "$($Component)"} - - if ($null -ne $componentState) - { - #If we're already Inactive don't bother setting to Draining. - if ($State -like "Draining" -and $componentState.State -like "Inactive") - { - return $false - } - elseif ($componentState.State -notlike "$($State)") - { - Write-Verbose "Setting $($componentState.Component) component to $($State) for requester $($Requester)" - - SetServerComponentState -Component $componentState.Component -State $State -Requester $Requester -DomainController $DomainController - - $madeChange = $true - - if ($State -eq "Active" -and $SetInactiveComponentsFromAnyRequesterToActive -eq $true) - { - $additionalRequesters = $null - $additionalRequesters = $componentState.LocalStates | Where-Object {$_.Requester -notlike "$($Requester)" -and $_.State -notlike "Active"} - - if ($null -ne $additionalRequesters) - { - foreach ($additionalRequester in $additionalRequesters) - { - Write-Verbose "Setting $($componentState.Component) component to Active for requester $($additionalRequester.Requester)" - - SetServerComponentState -Component $componentState.Component -State Active -Requester $additionalRequester.Requester -DomainController $DomainController - } - } - } - } - } - - return $madeChange -} - -#Finds any databases which have an Activation Preference of 1 for this server, which are not currently hosted on this server, and moves them back -function MovePrimaryDatabasesBack -{ - [CmdletBinding()] - param - ( - [System.String] - $DomainController - ) - - $databases = GetMailboxDatabase -Server $env:COMPUTERNAME -Status -DomainController $DomainController - - [string[]]$databasesWithActivationPrefOneNotOnThisServer = @() - - if ($null -ne $databases) - { - foreach ($database in $databases) - { - if ($null -ne $database.ActivationPreference) - { - foreach ($ap in $database.ActivationPreference) - { - if ($ap.Key.Name -like $env:COMPUTERNAME -and $ap.Value -eq 1) - { - $copyStatus = $null - $copyStatus = GetMailboxDatabaseCopyStatus -Identity "$($database.Name)\$($env:COMPUTERNAME)" -DomainController $DomainController - - if ($null -ne $copyStatus -and $copyStatus.Status -eq "Healthy") - { - $databasesWithActivationPrefOneNotOnThisServer += $database.Name - } - } - } - } - } - } - - if ($databasesWithActivationPrefOneNotOnThisServer.Count -gt 0) - { - Write-Verbose "Found $($databasesWithActivationPrefOneNotOnThisServer.Count) Healthy databases with Activation Preference 1 that should be moved to this server." - - foreach ($database in $databasesWithActivationPrefOneNotOnThisServer) - { - Write-Verbose "Attempting to move database '$($database)' back to this server." - - #Do the move in a try/catch block so we can log the error, but not have it prevent other databases from attempting to move - try - { - MoveActiveMailboxDatabase -Identity $database -ActivateOnServer $env:COMPUTERNAME -DomainController $DomainController - } - catch - { - Write-Error "$($_.Exception.Message)" - } - } - } - else - { - Write-Verbose "Found 0 Healthy databases with Activation Preference 1 for this server that are currently not hosted on this server" - } -} - -#region Exchange Cmdlet Wrappers -function GetExchangeServer -{ - [CmdletBinding()] - param( - [parameter(Mandatory = $true)] - [System.String] - $Identity = $env:COMPUTERNAME, - - [System.String] - $DomainController - ) - - if ([string]::IsNullOrEmpty($DomainController)) - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'DomainController' - } - - return (Get-ExchangeServer @PSBoundParameters) -} - -function GetDatabaseAvailabilityGroup -{ - [CmdletBinding()] - param( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [System.String] - $DomainController - ) - - if ([string]::IsNullOrEmpty($DomainController)) - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'DomainController' - } - - return (Get-DatabaseAvailabilityGroup @PSBoundParameters -Status) -} - -function GetServerComponentState -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity = $env:COMPUTERNAME, - - [System.String] - $Component, - - [System.String] - $DomainController - ) - - if ([string]::IsNullOrEmpty($Component)) - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'Component' - } - - if ([string]::IsNullOrEmpty($DomainController)) - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'DomainController' - } - - return (Get-ServerComponentState @PSBoundParameters) -} - -function SetServerComponentState -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Component, - - [parameter(Mandatory = $true)] - [System.String] - $Requester, - - [parameter(Mandatory = $true)] - [System.String] - $State, - - [System.String] - $DomainController - ) - - if ([string]::IsNullOrEmpty($DomainController)) - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'DomainController' - } - - Set-ServerComponentState -Identity $env:COMPUTERNAME @PSBoundParameters -} - -function GetMailboxDatabase -{ - [CmdletBinding()] - param - ( - [System.String] - $Identity, - - [System.String] - $DomainController, - - [System.String] - $Server, - - [switch] - $Status - ) - - if ([string]::IsNullOrEmpty($Identity)) - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'Identity' - } - - if ([string]::IsNullOrEmpty($DomainController)) - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'DomainController' - } - - if ([string]::IsNullOrEmpty($Server)) - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'Server' - } - - return (Get-MailboxDatabase @PSBoundParameters) -} - -function GetMailboxDatabaseCopyStatus -{ - [CmdletBinding()] - param - ( - [System.String] - $Identity, - - [System.String] - $DomainController, - - [System.String] - $Server - ) - - if ([string]::IsNullOrEmpty($Identity)) - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'Identity' - } - - if ([string]::IsNullOrEmpty($DomainController)) - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'DomainController' - } - - if ([string]::IsNullOrEmpty($Server)) - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'Server' - } - - return (Get-MailboxDatabaseCopyStatus @PSBoundParameters) -} - -function GetMailboxServer -{ - [CmdletBinding()] - param( - [parameter(Mandatory = $true)] - [System.String] - $Identity = $env:COMPUTERNAME, - - [System.String] - $DomainController - ) - - if ([string]::IsNullOrEmpty($DomainController)) - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'DomainController' - } - - return (Get-MailboxServer @PSBoundParameters) -} - -function SetMailboxServer -{ - [CmdletBinding()] - param( - [parameter(Mandatory = $true)] - [System.String] - $Identity = $env:COMPUTERNAME, - - [System.String] - $DomainController, - - [System.Collections.Hashtable] - $AdditionalParams - ) - - if ([string]::IsNullOrEmpty($DomainController)) - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'DomainController' - } - - AddParameters -PSBoundParametersIn $PSBoundParameters -ParamsToAdd $AdditionalParams - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'AdditionalParams' - - Set-MailboxServer @PSBoundParameters -} - -function GetUMActiveCalls -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Server = $env:COMPUTERNAME, - - [System.String] - $DomainController - ) - - if ([string]::IsNullOrEmpty($DomainController)) - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'DomainController' - } - - return (Get-UMActiveCalls @PSBoundParameters) -} - -function MoveActiveMailboxDatabase -{ - [CmdletBinding()] - param - ( - [System.String] - $ActivateOnServer, - - [System.String] - $Identity, - - [System.String] - $DomainController, - - [System.String] - $MoveComment, - - [System.String] - $Server = $env:COMPUTERNAME - ) - - if ([string]::IsNullOrEmpty($ActivateOnServer)) - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'ActivateOnServer' - } - - if ([string]::IsNullOrEmpty($DomainController)) - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'DomainController' - } - - if ([string]::IsNullOrEmpty($Identity)) - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'Identity' - } - - if ([string]::IsNullOrEmpty($MoveComment)) - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'MoveComment' - } - - if ([string]::IsNullOrEmpty($Server)) - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'Server' - } - - Move-ActiveMailboxDatabase @PSBoundParameters -Confirm:$false -ErrorAction Stop -} -#endregion - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMaintenanceMode/MSFT_xExchMaintenanceMode.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMaintenanceMode/MSFT_xExchMaintenanceMode.schema.mof deleted file mode 100644 index 95555a2c..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMaintenanceMode/MSFT_xExchMaintenanceMode.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchMaintenanceMode")] -class MSFT_xExchMaintenanceMode : OMI_BaseResource -{ - [Key, Description("Whether the server should be put into Maintenance Mode. When Enabled is set to True, the server will be put in Maintenance Mode. If False, the server will be taken out of Maintenance Mode.")] Boolean Enabled; - [Required, Description("Credentials used to establish a remote Powershell session to Exchange"), EmbeddedInstance("MSFT_Credential")] String Credential; - [Write, Description("When taking a server out of Maintenance Mode, the following components will be set to Active by default: ServerWideOffline, UMCallRouter, HighAvailability, Monitoring, RecoveryActionsEnabled. This parameter specifies an additional list of components to set to Active.")] String AdditionalComponentsToActivate[]; - [Write, Description("The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to Active Directory.")] String DomainController; - [Write, Description("Whether to move back databases with an Activation Preference of one for this server after taking the server out of Maintenance Mode. Defaults to False.")] Boolean MovePreferredDatabasesBack; - [Write, Description("Whether components that were set to Inactive by outside Requesters should also be set to Active when exiting Maintenance Mode. Defaults to False.")] Boolean SetInactiveComponentsFromAnyRequesterToActive; - [Write, Description("Optional string to specify what the server version will be after applying a Cumulative Update. If the server is already at this version, requests to put the server in Maintenance Mode will be ignored. Version should be in the format ##.#.####.#, as in 15.0.1104.5.")] String UpgradedServerVersion; -}; - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMaintenanceMode/TransportMaintenance.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMaintenanceMode/TransportMaintenance.psm1 deleted file mode 100644 index 1d6c7a1f..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMaintenanceMode/TransportMaintenance.psm1 +++ /dev/null @@ -1,2648 +0,0 @@ -#region Globals from all three scripts -# Service Names -$TransportServiceName = "MsExchangeTransport" -$MessageTracing = "MSMessageTracingClient" -$EdgeSync = "MsExchangeEdgeSync" -$Script:OriginalPref = $ErrorActionPreference - -$Script:ExchangeServer = $null -$Script:TransportService = $null -$Script:HubTransport = $null -$Script:Entered = $false - -$Component = "HubTransport" -$Requester = "Maintenance" - -$Target = $env:COMPUTERNAME - -$Script:LogFileName = $null -$Script:TransportMaintenanceLogPrefix = 'TransportMaintenance' -$Script:TransportMaintenanceLogNameFormat = "{0}\TransportMaintenance-{1}-{2}.log" -$Script:ServerInMM = "ServerInMM" -$Script:AllotedTimeExceeded = "AllotedTimeExceeded" -$Script:NoProgressTimeout = "NoProgressTimeout" -$Script:UnredirectedMessageEventId = 100 -$Script:UndrainedDiscardEventEventId = 101 -$Script:MaxWaitForOtherWorkflow = New-TimeSpan -Minutes 30 -$Script:TransportMaintenanceSync = $null -$Script:ExchangeVersion = "" - -$ServiceState = $null -#endregion - -#region New Code or Wrappers -<# -.DESCRIPTION -Begin maintenance script for HUB components. - -.PARAMETER Target -The name of the machine being put into maintenance. - -#> -function Start-TransportMaintenance -{ - [CmdletBinding()] - param( - [Parameter(Mandatory = $false)] - [string]$Target = $env:COMPUTERNAME, - - [switch]$ExcludeLocalSiteFromMessageRedirect, - - [boolean]$LoadLocalShell = $false, - - [string[]]$MessageRedirectExclusions - ) - - if ($LoadLocalShell -eq $true) - { - AddExchangeSnapinIfRequired - } - - $Script:LogInfo = @{ - Target = $Target - } - - try - { - Write-Verbose "Starting non-fatal Transport maintenance tasks for '$Target' on $($env:ComputerName)" - if(-not (Initialize-TransportMaintenance -Target $Target)) - { - return - } - - # Log the BeginTM/start event - $beginTMLog = New-LogEntry -Source $Target -Stage BeginTM - Write-EventOfEntry -Event Start -Entry $beginTMLog -Reason $Script:LogInfo - - Invoke-RemoteMaintenance -Target $Target -MessageRedirectExclusions $MessageRedirectExclusions -ExcludeLocalSiteFromMessageRedirect:$ExcludeLocalSiteFromMessageRedirect - - } - catch - { - Write-Warning "At least one non-fatal tasked failed. Ignoring and continuing deployment. Error was $_" - } - finally - { - if($beginTMLog) - { - Write-EventOfEntry -Event Completed -Entry $beginTMLog -Reason $Script:LogInfo - } - } -} - -<# -.DESCRIPTION -Performs End Maintenance of HubTransport - -#> -function Stop-TransportMaintenance -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseDeclaredVarsMoreThanAssignments", "")] - [CmdletBinding()] - param( - [boolean]$LoadLocalShell = $false - ) - - if ($LoadLocalShell -eq $true) - { - AddExchangeSnapinIfRequired - } - - $ServiceState = "Online" - - Start-HUBEndMaintenance -} - -function AddExchangeSnapinIfRequired -{ - if ($null -eq (Get-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 -ErrorAction SilentlyContinue)) - { - Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 -ErrorAction SilentlyContinue - } -} -#endregion - -#region From TransportBeginMaintenance.ps1 -# .DESCRIPTION -# Initializes logging, validates if the current server -# -# .PARAMETER Target -# Target server for the operation. -# -# .RETURN -# True if the initialization is successful and caller should continue the MM process. -# Else, returns false and caller should NOT continue with the MM. -function Initialize-TransportMaintenance -{ - param( - [Parameter(Mandatory = $true)] - [string]$Target - ) - - $ErrorActionPreference = "Stop" - $Error.Clear() - - Initialize-TransportMaintenanceLog -Server $Target - - $Script:ExchangeServer = Get-ExchangeServer $Target - if(-not $Script:ExchangeServer) - { - Write-Verbose "$Target is not an exchange server" - - $Script:LogInfo.Add('ExchangeServer', 'False') - Write-SkippedEvent -Source $Target -Stage BeginTM -Reason $Script:LogInfo - - return $false - } - - $Script:TransportService = Get-Service ` - -ComputerName $Script:ExchangeServer.Fqdn ` - -Name $TransportServiceName ` - -ErrorAction SilentlyContinue - - if(-not $Script:TransportService) - { - Write-Verbose "MSExchangeTransport service is not found on $Target" - - $Script:LogInfo.Add($TransportServiceName, 'NotFound') - Write-SkippedEvent -Source $Target -Stage BeginTM -Reason $Script:LogInfo - - return $false - } - - $Script:HubTransport = Get-ComponentState -Server $Target - if(-not $Script:HubTransport) - { - Write-Verbose "Unable to find HubTransport's ServerComponentState from $($env:ComputerName) for $Target." - - $Script:LogInfo.Add('HubTransport', 'NotFound') - Write-SkippedEvent -Source $Target -Stage BeginTM -Reason $Script:LogInfo - - return $false - } - - $Script:Entered = $true - return $true -} - -# .DESCRIPTION -# Fully drains the Transport and put HubTransport component state to Inactive -# -# .PARAMETER Target -# Target server for the operation. -# -# .RETURN -# None -function Invoke-FullyDrainTransport -{ - param( - [Parameter(Mandatory = $false)] - [string]$Target = $env:COMPUTERNAME, - - [switch]$ExcludeLocalSiteFromMessageRedirect, - - [string[]]$MessageRedirectExclusions) - - #drain active messages - Clear-ActiveMessage -Server $Target -TransportService $script:TransportService - - # redirect the remaining messages - $activeServers = Send-MessagesToNewServer -Server $Target -MessageRedirectExclusions $MessageRedirectExclusions -ExcludeLocalSite:$ExcludeLocalSiteFromMessageRedirect - - # Drain the discard events - if($activeServers) - { - Clear-DiscardEvent -Primary $Target -ShadowServers $activeServers | out-null - } - else - { - Write-Verbose "Unable to find other active servers in this DAG. Skip draining of discard event." - } - - Write-Verbose "Setting HubTransport component state to Inactive" - Set-ComponentState -Server $Target -State Inactive - Log-InfoEvent -Source $Target -Stage RestartTransport -Reason @{ComponentState = 'Inactive'} -} - -# .DESCRIPTION -# Perform the Remote Maintenance stage -# -# .PARAMETER Target -# Target server for the operation. -# -function Invoke-RemoteMaintenance -{ - param( - [Parameter(Mandatory = $false)] - [string]$Target = $env:COMPUTERNAME, - - [switch]$ExcludeLocalSiteFromMessageRedirect, - - [string[]]$MessageRedirectExclusions - ) - - if(($Script:TransportService.Status -ne "Running") -or ` - ($Script:HubTransport.State -ne "Active")) - { - $Script:LogInfo.Add('MsExchangeTransport', $Script:TransportService.Status) - $Script:LogInfo.Add('HubTransport', $Script:HubTransport.State) - $Script:LogInfo.Add('Reason', 'Skipped') - } - else - { - Invoke-FullyDrainTransport -Target $Target -MessageRedirectExclusions $MessageRedirectExclusions -ExcludeLocalSiteFromMessageRedirect:$ExcludeLocalSiteFromMessageRedirect - } -} - - -#endregion - -#region From TransportEndMaintenance.ps1 -# Main entry point for the script. -function Start-HUBEndMaintenance -{ - $reasons = @{ - ServiceState = $ServiceState - } - try - { - Initialize-TransportMaintenanceLog -Server $Target - - $TransportService = get-service $TransportServiceName -errorAction silentlyContinue - if(-not $TransportService) - { - Write-Verbose 'MSExchangeTransport service is not found' - - $reasons.Add('MsExchangeTransport', 'NotFound') - Write-SkippedEvent -Source $Target -Stage EndTM -Reason $reasons - return; - } - - $endMMLog = New-LogEntry -Source $Target -Stage EndTM - - Write-EventOfEntry -Event Start -Entry $endMMLog -Reason $reasons - - if($ServiceState -eq "Online") - { - Set-TransportActive - return - } - - # All other parameter combinations indicate 'Inactive' state. - Set-TransportInactive - } - finally - { - if($endMMLog) - { - Write-EventOfEntry -Event Completed -Entry $endMMLog -Reason $reasons - } - } -} - -# checks and enable the submission queue if needed. This should be successful in -# the first iteration. However, we allow the service to have up to 5 minutes to return -# the submission queue. -function Enable-SubmissionQueue -{ - param( - [Parameter(Mandatory = $false)] - [TimeSpan] $PollingFrequency = (New-TimeSpan -Seconds 10), - - [Parameter(Mandatory = $false)] - [TimeSpan] $Timeout = (New-TimeSpan -Minutes 5) - ) - - $endTime = (Get-Date) + $Timeout - $submissionQName = $env:COMPUTERNAME + "\Submission" - - while ($true) - { - $submissionQ = Get-Queue $submissionQName -ErrorAction 'SilentlyContinue' - if ($submissionQ) - { - if($submissionQ.Status -eq 'Suspended') - { - try - { - Resume-Queue $submissionQName -confirm:$false - Log-InfoEvent -source $env:COMPUTERNAME -stage SubmissionQueueCheck -Reason @{EnableSubmissionQueue = 'Succeeded'} - return $true - } - catch - { - Log-InfoEvent -source $env:COMPUTERNAME -stage SubmissionQueueCheck -Reason @{EnableSubmissionQueue = 'Failed'} - return $false - } - } - - Write-SkippedEvent -source $env:COMPUTERNAME -stage SubmissionQueueCheck -Reason @{EnableSubmissionQueue = $submissionQ.Status} - return $true - } - - if ((Get-Date) -gt $endTime) - { - Log-InfoEvent -source $env:COMPUTERNAME -stage SubmissionQueueCheck -Reason @{EnableSubmissionQueue = 'QueueNotFound'} - return $false - } - else - { - Start-Sleep -Seconds $PollingFrequency.Seconds - } - } -} - -# Sets the Transport Component State to 'Active' and starts the appropriate services. -function Set-TransportActive -{ - Write-Output "Enter [Set-TransportActive]" - - $currentServerComponentState = Get-ServerComponentState -Identity $env:COMPUTERNAME -Component $Component - $transportService = Get-CimInstance -ClassName win32_service -filter "name = 'MSExchangeTransport'" - - if($currentServerComponentState.State -eq "Active" ` - -and $null -ne $transportService ` - -and $transportService.StartMode -eq "Auto" ` - -and $transportService.State -eq "Running") - { - Write-SkippedEvent -Source $env:COMPUTERNAME -Stage StartTransport -Reason @{ComponentState = 'Active'} - } - else - { - # Set component state to 'Active' - Set-ComponentState -Component $Component -State "Active" -Requester $Requester | out-null - - # Restart transport - Set-ServiceState -ServiceName $TransportServiceName -State "Stopped" -LoggingStage StopTransport -StartMode "Auto" -ThrowOnFailure - Set-ServiceState -ServiceName $TransportServiceName -State "Running" -LoggingStage StartTransport -ThrowOnFailure - } - - # Enable the submission queue if needed. In case of failure, we will have to put - # the service back to inactive - if (-not (Enable-SubmissionQueue)) - { - Set-TransportInactive - return - } - - # Set MSExchangeEdgeSync service start mode to Auto and restart. - Set-ServiceState -ServiceName $EdgeSync -State "Stopped" -LoggingStage StopEdgeSync -StartMode "Auto" - Set-ServiceState -ServiceName $EdgeSync -State "Running" -LoggingStage StartEdgeSync - - # Do not change the start mode for MSMessageTracingClient - # MSMessageTracingClient service is disabled in some test topologies - # so only start the service, if it is NOT Disabled. - Set-ServiceState -ServiceName $MessageTracing -State "Running" -LoggingStage StartMessageTrace - - Write-Output "Exit [Set-TransportActive]" -} - -# Sets the Transport Component State to 'Inactive' and starts the appropriate services. -function Set-TransportInactive -{ - Write-Output "Enter [Set-TransportInactive]" - - $currentServerComponentState = Get-ServerComponentState -Identity $env:COMPUTERNAME -Component $Component - $transportService = Get-CimInstance -ClassName win32_service -filter "name = 'MSExchangeTransport'" - - if($currentServerComponentState.State -eq "Inactive" ` - -and $null -ne $transportService ` - -and $transportService.StartMode -eq "Auto" ` - -and $transportService.State -eq "Running") - { - Write-SkippedEvent -Source $env:COMPUTERNAME -Stage StartTransport -Reason @{ComponentState = 'Inactive'} - } - else - { - # Set component state to 'Inactive' - Set-ComponentState -Component $Component -State "Inactive" -Requester $Requester | out-null - Set-ServiceState -ServiceName $TransportServiceName -State "Running" -LoggingStage StopTransport -StartMode "Auto" -ThrowOnFailure - } - - Write-Output "Exit [Set-TransportInactive]" -} -#endregion - -#region From DatacenterDeploymentTransportLibrary.ps1 - -# .DESCRIPTION -# Get servers in the dag that contains the specified server -# -# .PARAMETER server -# Server whose dag's members is retrieving. -# -# .PARAMETER ExcludeLocalSite -# Whether to exclude the servers on the same site -# -# .RETURN -# array of servers in the dag. -# -function Get-ServersInDag -{ - param( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String]$server, - - [Parameter(Mandatory = $true)] - [Switch]$ExcludeLocalSite, - - [string[]]$AdditionalExclusions - ) - - Write-Verbose "$server - Retrieving the DAG for the target server" - $exchangeServer = (Get-ExchangeServer $server) - if ($null -eq $exchangeServer) - { - Write-Warning "Could not get the exchange server. Skipping redirect." - return $null - } - - if ($exchangeServer.IsMailboxServer -eq $false) - { - Write-Warning "Could not find the mailbox server. Skipping redirect." - return $null - } - - $dag = (Get-MailboxServer $server).DatabaseAvailabilityGroup - if ($null -eq $dag) - { - Write-Warning "Could not find the DAG for the target server. Skipping redirect." - return $null - } - - Write-Verbose "$server - Retrieving other hub transport servers in the DAG - $dag" - - $dagServers = @((Get-DatabaseAvailabilityGroup $dag).Servers | ForEach-Object {if($_.Name){$_.Name}else{$_}} | Where-Object {$_ -ne $server}) - - if($null -ne $dagServers) - { - #Filter out servers who are in the local site, if $ExcludeLocalSite - if ($ExcludeLocalSite) - { - for ($i = $dagServers.Count - 1; $i -ge 0; $i--) - { - $dagServerProps = $null - $dagServerProps = Get-ExchangeServer $dagServers[$i] - - if ($null -ne $dagServerProps -and $dagServerProps.Site -eq $exchangeServer.Site) - { - $dagServers = $dagServers | Where-Object {$_ -ne $dagServers[$i]} - } - } - } - - #Filter out additional exclusions - if ($null -ne $AdditionalExclusions) - { - foreach ($exclusion in $AdditionalExclusions) - { - $dagServers = $dagServers | Where-Object {$_ -notlike $exclusion} - } - } - } - - if (-not $dagServers) - { - Write-Warning "Could not find servers in the DAG that do not meeting exclusion criteria." - } - - return $dagServers -} - -# .DESCRIPTION -# Selects the active servers from the specified array of servers. -# Active servers are those that have EdgeTransport running. -# -# .PARAMETER $Servers -# Array of servers -# -# .RETURN -# Array of active servers -function Get-ActiveServer -{ - param( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String[]]$Servers - ) - - $activeServers = $Servers | ` - Where-Object{(Get-ServerComponentState -Identity $_ -Component HubTransport).State -eq 'Active' } | ` - ForEach-Object { ` - $xml = [xml](Get-ExchangeDiagnosticInfo -Process "EdgeTransport" -server $_ -erroraction SilentlyContinue) - if($xml -and $xml.Diagnostics.ProcessInfo) - { - Write-Output $_ - } - } - - return $activeServers -} - -# .DESCRIPTION -# Get version for exchange installed on the server -# -# .PARAMETER server -# Server whose version is being retrieved. -# -# .RETURN -# version string. -# -function Get-ExchangeVersion -{ - param( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String]$server - ) - - Write-Verbose "$server - Retrieving version for the target server" - - $serverVersion = (Get-ExchangeServer $server).AdminDisplayVersion - - if ($null -eq $serverVersion) - { - Write-Warning "Could not find exchange version." - return $null - } - - $versionString = [string]::Format("{0}.{1}.{2}.{3}", ` - $serverVersion.Major.ToString("D2"), ` - $serverVersion.Minor.ToString("D2"), ` - $serverVersion.Build.ToString("D4"), ` - $serverVersion.Revision.ToString("D3")) - return $versionString -} - -# .DESCRIPTION -# Get the list of files that are in the Maintenance Log folder -# -# .PARAMETER $TransportService -# Transport Service object retrieved from Get-TransportService of the current server -# This object holds configuration and size limits of the Maintenance Log folder -# -# .PARAMETER $LogPath -# The path to the log folder adjusted for remote logging. -# -# .RETURN -# Array of file objects of files that are in the Maintenance Log folder -function Get-TransportMaintenanceLogFileList() -{ - param( - [Parameter(Mandatory = $true)] - [Object] $TransportService, - - [Parameter(Mandatory = $true)] - [string] $LogPath - ) - - $logFilesMatch = "{0}\{1}*.log" -f $LogPath, $Script:TransportMaintenanceLogPrefix - return @(Get-Item $logFilesMatch -ErrorAction SilentlyContinue) -} - -# .DESCRIPTION -# Ensures the current Maintenance log file stay within the limit specified in the TransportService object. -# Creates and initializes the log file to be ready for accepting logs. -# -# .PARAMETER $LogPath -# The path to the log folder adjusted for remote logging. -# -# .PARAMETER $TransportService -# Transport Service object retrieved from Get-TransportService of the current server -# This object holds configuration and size limits of the Maintenance Log folder -function Register-TransportMaintenanceLog -{ - param( - [Parameter(Mandatory = $true)] - [Object] $TransportService, - - [Parameter(Mandatory = $true)] - [string] $LogPath - ) - - $maxFileSize = $TransportService.TransportMaintenanceLogMaxFileSize.Value.ToBytes() - - if($Script:LogFileName -and $Script:LogStream) - { - if((Get-Item $Script:LogFileName).Length -lt $maxFileSize) - { - return - } - else - { - $Script:LogFileName = $null - $newestLog = $null - } - } - else - { - $newestLog = Get-TransportMaintenanceLogFileList -TransportService $TransportService -LogPath $LogPath | ` - Sort-Object LastWriteTime -Descending | ` - Select-Object -First 1 - } - - if(-not $newestLog -or $newestLog.Length -ge $maxFileSize) - { - $instance = 0 - while($true) - { - $newLogFileName = $Script:TransportMaintenanceLogNameFormat -f ` - $LogPath, ` - [System.DateTime]::Now.ToString("yyyyMMdd"), $instance - - $existedLogFile = Get-Item -Path $newLogFileName -ErrorAction SilentlyContinue - if(-not $existedLogFile) - { - break; - } - $instance++ - } - } - else - { - $newLogFileName = $newestLog.FullName - } - - $Script:LogFileName = $newLogFileName -} - -# .DESCRIPTION -# Removes old log files from the Maintenance Log directory to stay within the age limit specified -# in the TransportService object -# -# .PARAMETER $LogPath -# The path to the log folder adjusted for remote logging. -# -# .PARAMETER $TransportService -# Transport Service object retrieved from Get-TransportService of the current server -# This object holds configuration and size limits of the Maintenance Log folder -function Remove-TransportMaintenanceLogsOverMaxAge -{ - param( - [Parameter(Mandatory = $true)] - [Object] $TransportService, - - [Parameter(Mandatory = $true)] - [string] $LogPath - ) - - $maxLogAge = [TimeSpan]$TransportService.TransportMaintenanceLogMaxAge - [DateTime]$rolloutTime = (Get-Date) - $maxLogAge - - Get-TransportMaintenanceLogFileList -TransportService $TransportService -LogPath $LogPath | ` - Where-Object {$_.LastWriteTime -lt $rolloutTime} | ` - ForEach-Object {Remove-Item -Path $_.FullName} -} - -# .DESCRIPTION -# Removes old log files from the Maintenance Log directory to stay within total size limit specified -# in the TransportService object -# -# .PARAMETER $LogPath -# The path to the log folder adjusted for remote logging. -# -# .PARAMETER $TransportService -# Transport Service object retrieved from Get-TransportService of the current server -# This object holds configuration and size limits of the Maintenance Log folder -function Remove-TransportMaintenanceLogsOverMaxDirectorySize -{ - param( - [Parameter(Mandatory = $true)] - [Object] $TransportService, - - [Parameter(Mandatory = $true)] - [string] $LogPath - ) - - $maxDirectorySize = $TransportService.TransportMaintenanceLogMaxDirectorySize.Value.ToBytes() - $maxFileSize = $TransportService.TransportMaintenanceLogMaxFileSize.Value.ToBytes() - - $files = Get-TransportMaintenanceLogFileList -TransportService $TransportService -LogPath $LogPath | Sort-Object LastWriteTime - $directorySize = $files | Measure-Object Length -Sum | ForEach-Object { $_.Sum } - - $i = 0 - $desiredSize = $maxDirectorySize - $maxFileSize - while ($directorySize -ge $desiredSize) - { - try - { - if($files[$i].FullName -ne $Script:LogFileName) - { - $directorySize -= $files[$i].Length - Remove-Item -Path $files[$i].FullName - $i++ - } - } - catch - { - continue - } - } -} - -# .DESCRIPTION -# Get the adjusted logging path for remote or local logging. -# -# .PARAMETER $TransportService -# Transport Service object retrieved from Get-TransportService of the current server -# This object holds configuration and size limits of the Maintenance Log folder -# -# .PARAMETER $Server -# Server name of the log folder -# -# .RETURN -# The path to the log folder adjusted for remote or local logging depending on the specified $Server. -function Get-MaintenanceLogPath -{ - param( - [Parameter(Mandatory = $true)] - [Object] $TransportService, - - [Parameter(Mandatory = $false)] - [String] $Server = $env:ComputerName - ) - - if(-not $TransportService.TransportMaintenanceLogPath) - { - $logPath = Join-Path (Split-Path ($TransportService.QueueLogPath) -Parent) "TransportMaintenance" - } - else - { - $logPath = $TransportService.TransportMaintenanceLogPath.PathName - } - - if($server -eq $env:ComputerName) - { - return $logPath - } - - $drive = [IO.Path]::GetPathRoot($logPath) - $share = Get-CimInstance -ClassName Win32_Share -ComputerName $server -Filter "Path = '$drive\'" -ErrorAction SilentlyContinue - if($share) - { - $remotePath = "\\{0}\{1}\{2}" -f ` - $server, ` - $share.Name, ` - $logPath.SubString($drive.Length) - return $remotePath - } - else - { - return $logPath - } -} - -# .DESCRIPTION -# Initializes the Maintenance Log and ensures the log directory conforms with limits -# set in Transport Service. This function must be called by Begin/End MM script before -# performing any MM tasks to ensure log file is created properly. -# -# .PARAMETER Server -# Name of Server to write the maintenance log to -function Initialize-TransportMaintenanceLog() -{ - param( - [Parameter(Mandatory = $false)] - [String] $Server = $env:ComputerName - ) - - #read MM log limits - $transportService = Get-TransportService -Identity $Server - - # only configure the logging if we have the setting from Transport Service - $hasMaintenanceSettings = $transportService.PsObject.Properties.Match('TransportMaintenance*') - if($hasMaintenanceSettings.Count -gt 0) - { - if(-not $transportService.TransportMaintenanceLogEnabled) - { - $Script:LogFileName = $null - return - } - - $logPath = Get-MaintenanceLogPath -Server $Server -TransportService $transportService - - if(Test-Path $logPath) - { - Remove-TransportMaintenanceLogsOverMaxAge -TransportService $transportService -LogPath $logPath - Remove-TransportMaintenanceLogsOverMaxDirectorySize -TransportService $transportService -LogPath $logPath - } - else - { - try - { - New-Item $logPath -Item Directory -ErrorAction Stop | Out-Null - } - catch - { - Write-Verbose $_.Exception.Message - $Script:LogFileName = $null - return - } - } - - $Script:ExchangeVersion = Get-ExchangeVersion $Server - Register-TransportMaintenanceLog -TransportService $transportService -LogPath $logPath - } -} - -# .DESCRIPTION -# Change the running state of a service -# -# .PARAMETER $ServiceName -# Name of the service to change the state of -# -# .PARAMETER $Server -# Server where the service is running on -# -# .PARAMETER $State -# New state of the service, can be Stopped, Running, Paused, or NoChange -# -# .PARAMETER $StartMode -# Change the startMode if necessary before changing its running state -# -# .PARAMETER $WaitTime -# Maximum wait time for the service to change its state -# -# .PARAMETER $LoggingStage -# If provide, a log entry is added to MM log on start and complete of the state change -# -# .PARAMETER $ThrowOnFailure -# Whether to throw on failures -# -# .RETURN -# True if successful, false otherwise. -function Set-ServiceState -{ - param( - [Parameter(Mandatory = $true)] - [string]$ServiceName, - - [Parameter(Mandatory = $false)] - [string]$Server = $env:COMPUTERNAME, - - [Parameter(Mandatory = $false)] - [ValidateSet("NoChange", "Stopped", "Running", "Paused")] - [string]$State = "NoChange", - - [Parameter(Mandatory = $false)] - [ValidateSet("NoChange", "Auto", "Automatic", "Manual", "Disabled")] - [string]$StartMode = "NoChange", - - [Parameter(Mandatory = $false)] - [TimeSpan] $WaitTime = (New-TimeSpan -Minutes 5), - - [Parameter(Mandatory = $false)] - [string] $LoggingStage, - - [Parameter(Mandatory = $false)] - [Switch] $ThrowOnFailure - ) - - $service = Get-CimInstance -ClassName win32_service -filter "name = '$ServiceName'" -ComputerName $Server - - if(-not $service) - { - if($LoggingStage) - { - Write-SkippedEvent -Source $Server -Stage $LoggingStage -Reason @{$ServiceName = 'NotFound'} - } - - if($ThrowOnFailure) - { - throw "Service $ServiceName not found on $Server." - } - return - } - - # Check and change the StartMode if necessary - if($StartMode -eq "Auto") - { - $StartMode = "Automatic" - } - - if(($StartMode -ne "NoChange") -and ($service.StartMode -ne $StartMode)) - { - $service.ChangeStartMode($StartMode) | Out-Null - - if($StartMode -eq "Disabled") - { - $State = "Stopped" - } - } - - # Determine if the start/stop/restart action is needed - if($State -eq "NoChange" -or $service.State -eq $State) - { - return - } - - if($LoggingStage) - { - $logEntry = New-LogEntry -Source $Server -Stage $LoggingStage - Write-EventOfEntry -Event Start -Entry $logEntry - } - - switch($State) - { - "Stopped" - { - $service.StopService() | Out-Null - } - - "Running" - { - if($service.State -eq "Paused") - { - $service.ResumeService() | Out-Null - } - else - { - $service.StartService()| Out-Null - } - } - - "Paused" - { - if($service.State -eq "Running") - { - $service.PauseService() | Out-Null - } - else - { - # service is stopped, start it up first - $service.StartService() | Out-Null - - if($WaitTime -eq [TimeSpan]::Zero) - { - $startupWaitTime = New-TimeSpan -Minutes 5 - } - else - { - $startupWaitTime = $WaitTime - } - - Wait-ServiceState ` - -ServiceName $ServiceName ` - -Server $Server ` - -State "Running" ` - -WaitTime $startupWaitTime ` - -ThrowOnFailure:$ThrowOnFailure - - # pause now - $service.PauseService() | Out-Null - } - } - } - - if($WaitTime -gt [TimeSpan]::Zero) - { - Wait-ServiceState ` - -ServiceName $ServiceName ` - -Server $Server ` - -State $State ` - -WaitTime $WaitTime ` - -ThrowOnFailure:$ThrowOnFailure - } - - if($LoggingStage) - { - Write-EventOfEntry -Event Completed -Entry $logEntry -reason @{'MaxWaitMinutes' = $WaitTime.TotalMinutes} - } -} - -# .DESCRIPTION -# Create a log entry object to be used in logging with various events and reasons -# -# .PARAMETER Source -# Name of the computer that originates this logging -# -# .PARAMETER Stage -# Logging stage -# -# .PARAMETER Id -# Id of this log entry -# -# .PARAMETER Count -# Value for the count column, meaning of this count varies with id and stage -# -# .RETURN -# Log Entry object which can be use Write-EventOfEntry & Write-SkippedEvent -function New-LogEntry -{ - param( - [Parameter(Mandatory = $true)] - [String] $Source, - - [Parameter(Mandatory = $true)] - [string] $Stage, - - [Parameter(Mandatory = $false)] - [string] $Id, - - [Parameter(Mandatory = $false)] - [int] $Count = -1 - ) - - $logProps = @{ - Source = $Source - Stage = $Stage - Id = $Id - Count = $Count - Created = Get-Date - } - - return New-Object PsObject -Property $logProps -} - -# .DESCRIPTION -# Add a log entry of certain event to the current log file -# -# .PARAMETER Event -# Event to be logged. For Completed event, the duration is automatically -# computed from the time LogEntry was created -# -# .PARAMETER Entry -# Log Entry, created by New-LogEntry -# -# .PARAMETER Reason -# Reason of this event -function Write-EventOfEntry -{ - param( - [Parameter(Mandatory = $true)] - [string] $Event, - - [Parameter(Mandatory = $true)] - [Object] $Entry, - - [Parameter(Mandatory = $false)] - [hashtable] $Reason - ) - - if($Event -eq "Completed") - { - $duration = (Get-Date) - $Entry.Created - } - - if($Reason) - { - $Reason.GetEnumerator() | ` - Sort-Object Key | ForEach-Object { - if($ReasonStr) - { - $ReasonStr += '; ' - } - - $ReasonStr += "{0}={1}" -f $_.Name,$_.Value - } - } - - $msg = [string]::Format("{0},{1},{2},{3},{4},{5:g},{6},{7},{8}", ` - (Get-Date), ` - $Entry.Source, ` - $Entry.Stage, ` - $Event, ` - $Entry.Id, ` - $duration, ` - $(if($Entry.Count -ne -1){$Entry.Count} else {""}), ` - $ReasonStr, ` - $Script:ExchangeVersion) - - Write-Verbose $msg - - if(-not $Script:LogFileName) - { - return - } - - $maxTries = 3 - while($maxTries -gt 0) - { - try - { - Add-Content -Path $Script:LogFileName -Value $msg -ErrorAction Stop - return - } - catch [IO.DriveNotFoundException] - { - # we stop logging if log causes exception - $Script:LogFileName = $null - Write-Verbose $_.Exception.Message - return - } - catch - { - # we may have other MM workflow accessing the log file - # delay 1 sec and try again - Start-Sleep -Seconds 1 - $maxTries-- - } - } -} - -# .DESCRIPTION -# Log a Skipped event to the current log file -# -# .PARAMETER Source -# Name of the computer that originates this logging -# -# .PARAMETER Stage -# Logging stage -# -# .PARAMETER Id -# Id of this log entry -# -# .PARAMETER Count -# Value for the count column, meaning of this count varies with id and stage -# -# .PARAMETER Reason -# Reason of this event - -function Write-SkippedEvent -{ - param( - [Parameter(Mandatory = $true)] - [String] $Source, - - [Parameter(Mandatory = $true)] - [string] $Stage, - - [Parameter(Mandatory = $false)] - [string] $Id, - - [Parameter(Mandatory = $false)] - [int] $Count, - - [Parameter(Mandatory = $false)] - [hashtable] $Reason - ) - - $entry = New-LogEntry -Source $Source -Stage $Stage -Id $Id -Count $Count - Write-EventOfEntry -Event Skipped -Entry $entry -Reason $Reason -} - -# .DESCRIPTION -# Log an Info event to the current log file -# -# .PARAMETER Source -# Name of the computer that originates this logging -# -# .PARAMETER Stage -# Logging stage -# -# .PARAMETER Id -# Id of this log entry -# -# .PARAMETER Count -# Value for the count column, meaning of this count varies with id and stage -# -# .PARAMETER Reason -# Reason of this event - -function Log-InfoEvent -{ - param( - [Parameter(Mandatory = $true)] - [String] $Source, - - [Parameter(Mandatory = $true)] - [string] $Stage, - - [Parameter(Mandatory = $false)] - [string] $Id, - - [Parameter(Mandatory = $false)] - [int] $Count, - - [Parameter(Mandatory = $false)] - [hashtable] $Reason - ) - - $entry = New-LogEntry -Source $Source -Stage $Stage -Id $Id -Count $Count - Write-EventOfEntry -Event Info -Entry $entry -Reason $Reason -} - -# .DESCRIPTION -# Used by Wait-EmptyEntriesCompletion. -# Takes a hash table by the entry's id. Remove any entry that's not found in ActiveEntries. -# -# .PARAMETER ActiveEntries -# Array of active entries -# -# .PARAMETER DetailLogging -# Whether to log progress of each entry. -# -# .PARAMETER Tracker -# Tracking hash table to be updated -# -# .RETURN -# returns True if at least an entry removed. Otherwise returns False. -function Remove-CompletedEntriesFromHashtable -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseDeclaredVarsMoreThanAssignments", "")] - param ( - [Parameter(Mandatory = $true)] - [HashTable] $Tracker, - - [Parameter(Mandatory = $false)] - [Object[]] $ActiveEntries = @(), - - [Parameter(Mandatory = $false)] - [Switch] $DetailLogging = $true - ) - - $progressMade = $false - - $activeIds = $ActiveEntries | ForEach-Object {$_.Id} - $completedKeys = $tracker.Keys | Where-Object {$activeIds -notcontains $_} - $completedKeys | ForEach-Object { - # update entry - $entry = $Tracker[$_] - $entry.LogEntry.Count = 0 - - if($DetailLogging) - { - Write-EventOfEntry -Event Completed -Entry $entry.LogEntry - } - - # remove completed entry from tracking - $Tracker.Remove($_) - $progressMade = $true - } - - return $progressMade -} - -# .DESCRIPTION -# Used by Wait-EmptyEntriesCompletion. -# Takes a hash table by the entry's id. Adds/Updates any entry that's found in ActiveEntries. -# -# .PARAMETER Tracker -# Tracking hash table to be updated -# -# .PARAMETER Source -# Name of server, for logging purpose, which GetEntries Scriptblock is retrieving data from -# -# .PARAMETER Stage -# Name of the Stage of the overall BeginMM process, for logging purpose -# -# .PARAMETER DetailLogging -# Whether to log progress of each entry. -# -# .PARAMETER ActiveEntries -# Array of active entries -# -# .RETURN -# Returns True if at least an entry is updated or created. Otherwise returns False. -function Update-EntriesTracker -{ - param ( - [Parameter(Mandatory = $true)] - [HashTable] $Tracker, - - [Parameter(Mandatory = $true)] - [string] $Source, - - [Parameter(Mandatory = $true)] - [string] $Stage, - - [Parameter(Mandatory = $false)] - [Switch] $DetailLogging = $true, - - [Parameter(Mandatory = $false)] - [Object[]] $ActiveEntries = @() - ) - - $progressMade = $false - - # Update the tracker hash table; Create new entries as needed - $ActiveEntries | ForEach-Object { - if(-not $tracker.ContainsKey($_.Id)) - { - $logEntry = New-LogEntry -Source $Source -Stage $Stage -Id $_.Id -Count $_.Count - - $trackEnty = New-Object PsObject -Property @{ - LogEntry = $logEntry - LastUpdated = Get-Date - } - - $tracker.Add($_.Id, $trackEnty) - - if($DetailLogging) - { - Write-EventOfEntry -Event Start -Entry $logEntry - } - - $progressMade = $true - } - else - { - $trackingEntry = $tracker[$_.Id] - $drainRateProp = $_.PsObject.Properties.Match('DrainRate') - if((($drainRateProp.count -gt 0) -and ($_.DrainRate -gt 0)) -or ` - (($drainRateProp.count -eq 0) -and ($trackingEntry.LogEntry.Count -ne $_.Count))) - { - $trackingEntry.LogEntry.Count = $_.Count - $trackingEntry.LastUpdated = Get-Date - $progressMade = $true - } - } - } - - return $progressMade -} - -# .DESCRIPTION -# Implements a generic wait function for entries returned by a scriptblock to go -# to zero or abort when time allow exceed or no progress was made. -# Each entry is tracked individually. -# -# .PARAMETER GetEntries -# ScriptBlock to be called every PollingFrequency interval with GetScriptArgs arguments -# to retrieve an array of entries with count -# -# .PARAMETER Stage -# Name of the Stage of the overall BeginMM process, for logging purpose -# -# .PARAMETER DetailLogging -# Whether to log progress of each entry. -# -# .PARAMETER GetEntriesAgrs -# Parameters for the GetEntries script block -# -# .PARAMETER Source -# Name of server, for logging purpose, which GetEntries Scriptblock is retrieving data from -# -# .PARAMETER PollingFrequency -# Frequency of polling queues for status -# -# .PARAMETER Timeout -# Timeout not to exceed -# -# .PARAMETER NoProgressTimeout -# Timeout for when no progress is made -# -# .PARAMETER ThrowOnTimeout -# Whether to throw error on timeout -# -# .RETURN -# Returns the remaining count of messages in the queues. When the wait ends with overall timeout -# or no progress timeout, this function returns a non-zero value. -function Wait-EmptyEntriesCompletion -{ - Param ( - [Parameter(Mandatory = $true)] - [ScriptBlock] $GetEntries, - - [Parameter(Mandatory = $true)] - [string] $Stage, - - [Parameter(Mandatory = $false)] - [Switch] $DetailLogging = $true, - - [Parameter(Mandatory = $false)] - [object[]] $GetEntriesArgs = @(), - - [Parameter(Mandatory = $false)] - [string] $Source = $env:COMPUTERNAME, - - [Parameter(Mandatory = $false)] - [TimeSpan] $PollingFrequency = (New-TimeSpan -Seconds 10), - - [Parameter(Mandatory = $false)] - [TimeSpan] $Timeout = (New-TimeSpan -Minutes 5), - - [Parameter(Mandatory = $false)] - [TimeSpan] $NoProgressTimeout = (New-TimeSpan -Minutes 1), - - [Parameter(Mandatory = $false)] - [Switch] $ThrowOnTimeout - ) - - $tracker = @{} - $endTime = (Get-Date) + $Timeout - $summaryLog = $null - $firstTime = $true - - while($true) - { - $activeEntries = Invoke-Command -ScriptBlock $GetEntries -ArgumentList $GetEntriesArgs | Where-Object {$_.Count -gt 0} - - if($firstTime) - { - if($DetailLogging -and -not $ActiveEntries) - { - Write-SkippedEvent -Source $Source -Stage $Stage -Reason @{Reason = 'Not needed'} - } - else - { - $startCount = 0 - $startCount += $activeEntries | Measure-Object -Sum -Property Count | ForEach-Object {$_.Sum} - - $summaryLog = New-LogEntry -Source $Source -Stage $Stage -Count $startCount - Write-EventOfEntry -Event Start -Entry $summaryLog - } - - $firstTime = $false - } - - $foundCompleted = Remove-CompletedEntriesFromHashtable ` - -Tracker $tracker ` - -ActiveEntries $activeEntries ` - -DetailLogging:$DetailLogging - - if(-not $activeEntries) - { - break; - } - - $foundUpdate = Update-EntriesTracker ` - -Tracker $tracker ` - -ActiveEntries $activeEntries ` - -Source $Source ` - -Stage $Stage ` - -DetailLogging:$DetailLogging - - if((Get-Date) -gt $endTime) - { - Write-Verbose "$Source - $Stage Time-out occurred. Wait aborted!" - $Reason = $Script:AllotedTimeExceeded - break; - } - elseif($foundCompleted -or $foundUpdate) - { - $remaningCount = $activeEntries | Measure-Object -Sum -Property Count | ForEach-Object {$_.Sum} - Write-Verbose "$Source - $Stage Progress made. $remaningCount items remain." - } - else - { - # checking if it's been too long since progress was made - $recentEntries = $tracker.Values | Where-Object {((Get-Date) - $_.LastUpdated) -lt $NoProgressTimeout} - if(-not $recentEntries) - { - Write-Verbose "$Source - $Stage NoProgressTimeout occurred. Wait aborted!" - $Reason = $Script:NoProgressTimeout - break; - } - } - - Start-Sleep -Seconds $PollingFrequency.Seconds - } - - $remainingCount = 0 - $remainingCount += $activeEntries | Measure-Object -Sum -Property Count | ForEach-Object {$_.Sum} - - if($DetailLogging) - { - $tracker.Values | ForEach-Object { Write-EventOfEntry -Event Completed -Entry $_.LogEntry -Reason @{Reason = $reason} } - } - else - { - $summaryLog.Count = $remainingCount - - if($reason) - { - Write-EventOfEntry -Event Completed -Entry $summaryLog -Reason @{Reason = $reason} - } - else - { - Write-EventOfEntry -Event Completed -Entry $summaryLog - } - } - - if($ThrowOnTimeout) - { - throw New-Object System.TimeoutException "Time-out reached." - } - - return $remainingCount -} - -# .SYNOPSIS -# Waits for the draining of Remote SMTP Relay queues, MapiDelivery queues and Submission queue. -# -# .DESCRIPTION -# Monitors and waits for all messages to be drained before returning. Will throw -# TimeoutException if time-out is reached or if no progress is made in NoProgressTimeout. -# -# .PARAMETER Server -# Target server for the operation. -# -# .PARAMETER QueueTypes -# Array of DeliveryTypes defined in: -# http://technet.microsoft.com/en-us/library/bb125022(v=exchg.150).aspx#NextHopSolutionKey. -# If null specified, all queue types are included in the wait. This function implicitly -# includes Submission queue and excludes Poison queue. -# -# .PARAMETER ActiveMsgOnly -# Whether to wait for active messages or all messages. -# -# .PARAMETER Stage -# Whether the wait is for the natural draining or the redirection -# -# .PARAMETER PollingFrequency -# Frequency of polling queues for status -# -# .PARAMETER Timeout -# Timeout not to exceed -# -# .PARAMETER NoProgressTimeout -# Timeout for when no progress is made -# -# .PARAMETER ThrowOnTimeout -# Whether to throw error on timeout -# -# .RETURN -# Returns the remaining count of messages in the queues. When the wait ends with overall timeout or no progress timeout, -# this function returns a non-zero value. -function Wait-EmptyQueuesCompletion -{ - Param ( - [Parameter(Mandatory = $true)] - [string]$Server = $null, - - [Parameter(Mandatory = $false)] - [String[]] $QueueTypes = $null, - - [Parameter(Mandatory = $false)] - [bool] $ActiveMsgOnly = $false, - - [Parameter(Mandatory = $false)] - [string]$Stage = "QueueDrain", - - [Parameter(Mandatory = $false)] - [TimeSpan] $PollingFrequency = (New-TimeSpan -Seconds 10), - - [Parameter(Mandatory = $false)] - [TimeSpan] $Timeout = (New-TimeSpan -Minutes 5), - - [Parameter(Mandatory = $false)] - [TimeSpan] $NoProgressTimeout = (New-TimeSpan -Minutes 1), - - [Parameter(Mandatory = $false)] - [Switch] $ThrowOnTimeout - ) - - $getQueueEntries = ` - { - param( - [Parameter(Mandatory = $true)] - [string]$Server = $null, - - [Parameter(Mandatory = $true)] - [string[]]$QueueTypes, - - [Parameter(Mandatory = $true)] - [bool]$ActiveMsgOnly - ) - - $filter = "{MessageCount -gt 0 -and DeliveryType -ne 'ShadowRedundancy' -and NextHopDomain -ne 'Poison Message'}" - $queues = get-queue -server $Server -ErrorAction SilentlyContinue -filter $filter | ` - Where-Object{ $null -eq $QueueTypes -or $QueueTypes -contains $_.DeliveryType } - - $entries = $queues | ForEach-Object { - if($ActiveMsgOnly) - { - $count = $_.MessageCountsPerPriority | Measure-Object -Sum | ForEach-Object {$_.Sum} - } - else - { - $count = $_.MessageCount - } - - $queueInfo = ` - @{ - Id = $_.Identity - Count = $count - DrainRate = $_.OutgoingRate - } - New-Object PsObject -Property $queueInfo - } - - return $entries - } - - Write-Verbose "$Server - Start waiting for $Stage..." - - $remaining = Wait-EmptyEntriesCompletion ` - -GetEntries $getQueueEntries ` - -GetEntriesArgs $Server,$queueTypes,$ActiveMsgOnly ` - -Source $Server ` - -Stage $Stage ` - -DetailLogging:$false ` - -PollingFrequency $PollingFrequency ` - -TimeOut $TimeOut ` - -NoProgressTimeout $NoProgressTimeout ` - -ThrowOnTimeout:$ThrowOnTimeout - - Write-Verbose "$Server - Wait for $Stage ended with $remaining items remain." - - return $remaining -} - -# .DESCRIPTION -# returns the pending discard events from a specified server -# -# .PARAMETER Server -# Target server for the operation. -# -# .PARAMETER Detail -# If detail is specified, Discard Ids are included in the discard information returned. -# -# .RETURN -# Returns array of discard events count of each shadow server. When -Detail present, -# DiscardIDs of each shadow server are also returned. -function Get-DiscardInfo -{ - param( - [Parameter(Mandatory = $true)] - [string]$Server, - [Parameter(Mandatory = $false)] - [switch]$Detail - ) - - if($Detail) - { - $argument = 'verbose' - } - else - { - $argument = 'basic' - } - - $shadowInfo = [xml](Get-ExchangeDiagnosticInfo -Server $Server -Process edgetransport -Component ShadowRedundancy -argument $argument) - - $discardInfo = $shadowInfo.Diagnostics.Components.ShadowRedundancy.ShadowServerCollection.ShadowServer | ` - Where-Object {$_.ShadowServerInfo.discardEventsCount -gt 0 } | - ForEach-Object { - $infoProps = ` - @{ - Id = [System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String($_.Context)) - Count = $_.ShadowServerInfo.discardEventsCount - DiscardIds = @() - } - if($Detail) - { - $infoProps.DiscardIds = $_.ShadowServerInfo.discardEventMessageId - } - - new-object psobject -Property $infoProps - } - - return $discardInfo -} - -# .SYNOPSIS -# Waits for discard events to be consumed by shadow servers -# -# .DESCRIPTION -# Monitors and waits for all discard events to be consumed by shadow servers before returned. -# Will throw TimeoutException if timeout is reached or if no progress is made in NoProgressTimeout. -# -# .PARAMETER Server -# Target server for the operation. -# -# .PARAMETER ActiveServers -# Array of active servers whose discard events are waiting to be drained -# -# .PARAMETER PollingFrequency -# Frequency of polling queues for status -# -# .PARAMETER Timeout -# Timeout not to exceed -# -# .PARAMETER NoProgressTimeout -# Timeout for when no progress is made -# -# .PARAMETER ThrowOnTimeout -# Whether to throw error on timeout -# -# .RETURN -# Returns the remaining count of discard events. When the wait ends with timeout exceeded or no progress -# this functions returns a non-zero value. -function Wait-EmptyDiscardsCompletion -{ - Param ( - [Parameter(Mandatory = $true)] - [string]$Server = $null, - - [Parameter(Mandatory = $true)] - [string[]]$ActiveServers = $null, - - [Parameter(Mandatory = $false)] - [TimeSpan] $PollingFrequency = (New-TimeSpan -Seconds 10), - - [Parameter(Mandatory = $false)] - [TimeSpan] $Timeout = (New-TimeSpan -Minutes 5), - - [Parameter(Mandatory = $false)] - [TimeSpan] $NoProgressTimeout = (New-TimeSpan -Minutes 1), - - [Parameter(Mandatory = $false)] - [Switch] $ThrowOnTimeout - ) - - Write-Verbose "$Server - Start waiting for ShadowDiscardDrain..." - - # log the undrainable entries - $discardInfo = Get-DiscardInfo -server $Server - $discardInfo | Where-Object {$ActiveServers -notcontains $_.Id.Split('.')[0]} | ForEach-Object { - Write-SkippedEvent -Source $Server -Stage ShadowDiscardDrain -Id $_.Id ` - -Count $_.Count -Reason @{Reason = $Script:ServerInMM} - } - - # wait for discard events to be drained - $getDiscardInfo = ` - { - param ( - [Parameter(Mandatory = $true)] - [string]$Server = $null, - - [Parameter(Mandatory = $true)] - [string[]]$ActiveServers = $null - ) - - $discardInfo = Get-DiscardInfo -server $Server - $discardInfo | Where-Object {$ActiveServers -contains $_.Id.Split('.')[0]} - } - - $remaining = Wait-EmptyEntriesCompletion ` - -GetEntries $getDiscardInfo ` - -GetEntriesArgs $Server,$ActiveServers ` - -Source $Server ` - -Stage ShadowDiscardDrain ` - -PollingFrequency $PollingFrequency ` - -TimeOut $TimeOut ` - -NoProgressTimeout $NoProgressTimeout ` - -ThrowOnTimeout:$ThrowOnTimeout - - Write-Verbose "$Server - ShadowDiscardDrain ended with $remaining items remain." - - return $remaining -} - -# .DESCRIPTION -# Waits for the event log StartScanForMessages (id = 17008) to be logged to Windows Event Log -# This tells that the bootscanner had completed counting for the outstanding items and -# start boot-scanning messages -# -# .PARAMETER ServerFqdn -# Fqdn of the server -# -# .PARAMETER PollingFrequency -# Frequency of polling for event -# -# .PARAMETER Timeout -# Timeout not to exceed -# -# .PARAMETER NoProgressTimeout -# Timeout for when no progress is made -# -# .PARAMETER ThrowOnTimeout -# Whether to throw error on timeout -# -# .RETURN -# none -function Wait-BootLoaderCountCheck -{ - Param ( - [Parameter(Mandatory = $true)] - [string]$ServerFqdn, - - [Parameter(Mandatory = $false)] - [TimeSpan] $PollingFrequency = (New-TimeSpan -Seconds 10), - - [Parameter(Mandatory = $false)] - [TimeSpan] $Timeout = (New-TimeSpan -Minutes 5), - - [Parameter(Mandatory = $false)] - [TimeSpan] $NoProgressTimeout = (New-TimeSpan -Minutes 1), - - [Parameter(Mandatory = $false)] - [Switch] $ThrowOnTimeout - ) - - $waitBootScanningEvent = - { - param( - [Parameter(Mandatory = $true)] - [string]$fqdn = $null, - - [Parameter(Mandatory = $true)] - [DateTime]$StartTime = $null - ) - - $bootScanningEvent = @{ - LogName = 'Application' - ProviderName = 'MsExchangeTransport' - Id = 17008 - StartTime = $StartTime - } - - $event = Get-WinEvent -ComputerName $ServerFqdn -FilterHashtable $bootScanningEvent -ErrorAction SilentlyContinue - - if($event) - { - # return null to complete the wait - return $null - } - else - { - $bootScanningEvent = ` - @{ - Id = "TransportQueueDatabase" - Count = 1 - } - New-Object PsObject -Property $bootScanningEvent - } - } - - $server = $ServerFqdn.split('.')[0] - $xml = [xml](Get-ExchangeDiagnosticInfo -Process "EdgeTransport" -server $server -erroraction SilentlyContinue) - if($xml) - { - $processStartTime = [DateTime]($xml.Diagnostics.ProcessInfo.StartTime) - Wait-EmptyEntriesCompletion ` - -GetEntries $waitBootScanningEvent ` - -GetEntriesArgs $ServerFqdn,$processStartTime ` - -Source $server ` - -Stage BootLoaderCountCheck ` - -PollingFrequency $PollingFrequency ` - -TimeOut $Timeout ` - -NoProgressTimeout $NoProgressTimeout ` - -ThrowOnTimeout:$ThrowOnTimeout - } -} - -# .DESCRIPTION -# Waits for the 'BootLoader Outstanding Items' perfcounter to go down to 0 -# -# .PARAMETER ServerFqdn -# Fqdn of the server -# -# .PARAMETER PollingFrequency -# Frequency of polling for event -# -# .PARAMETER Timeout -# Timeout not to exceed -# -# .PARAMETER NoProgressTimeout -# Timeout for when no progress is made -# -# .PARAMETER ThrowOnTimeout -# Whether to throw error on timeout -# -# .RETURN -# none -function Wait-BootLoaderSubmitCheck -{ - Param ( - [Parameter(Mandatory = $true)] - [string] $ServerFqdn, - - [Parameter(Mandatory = $false)] - [TimeSpan] $PollingFrequency = (New-TimeSpan -Seconds 10), - - [Parameter(Mandatory = $false)] - [TimeSpan] $Timeout = (New-TimeSpan -Minutes 5), - - [Parameter(Mandatory = $false)] - [TimeSpan] $NoProgressTimeout = (New-TimeSpan -Minutes 1), - - [Parameter(Mandatory = $false)] - [Switch] $ThrowOnTimeout - ) - - $getOutstandingItems = - { - param( - [Parameter(Mandatory = $true)] - [string]$fqdn = $null - ) - - $counter = Get-Counter ` - -Counter "\MSExchangeTransport Database(other*)\BootLoader Outstanding Items" ` - -ComputerName $fqdn ` - -ErrorAction SilentlyContinue - try - { - $counterInfo = ` - @{ - Id = "BootLoaderOutstandingItems" - Count = $counter.CounterSamples[0].RawValue - } - } - catch - { - $counterInfo = ` - @{ - Id = "BootLoaderOutstandingItems" - Count = 1 - } - } - - return New-Object PsObject -Property $counterInfo - } - - $server = $ServerFqdn.split('.')[0] - $remaining = Wait-EmptyEntriesCompletion ` - -GetEntries $getOutstandingItems ` - -GetEntriesArgs $ServerFqdn ` - -Source $server ` - -Stage BootLoaderSubmitCheck ` - -PollingFrequency $PollingFrequency ` - -TimeOut $Timeout ` - -NoProgressTimeout $NoProgressTimeout ` - -ThrowOnTimeout:$ThrowOnTimeout - - return $remaining -} - -# .DESCRIPTION -# If the process has been running for more than 30 mins, then this function returns immediately. -# Otherwise, wait for the bootscanner to complete up to 30 minutes or the specified timeout, whichever -# less. -# -# .PARAMETER Server -# Target server for the operation. -# -# .PARAMETER MaxBootLoaderProcessTimeout -# Max time for the BootLoader to completely bootscanning all the unprocessed messages. -# -# .PARAMETER PollingFrequency -# Frequency of polling queues for status -# -# .PARAMETER Timeout -# Timeout not to exceed -# -# .PARAMETER NoProgressTimeout -# Timeout for when no progress is made -# -# .PARAMETER ThrowOnTimeout -# Whether to throw error on timeout -# -# .RETURN -# Returns the remaining count of the outstanding items in the BootLoader. When the wait ends with -# timeout exceeded or no progress, this function returns a non-zero value. -function Wait-BootLoaderReady -{ - Param ( - [Parameter(Mandatory = $true)] - [string]$Server = $null, - - [Parameter(Mandatory = $false)] - [TimeSpan]$MaxBootLoaderProcessTimeout = (New-TimeSpan -Minutes 30), - - [Parameter(Mandatory = $false)] - [TimeSpan] $PollingFrequency = (New-TimeSpan -Seconds 10), - - [Parameter(Mandatory = $false)] - [TimeSpan] $Timeout = (New-TimeSpan -Minutes 5), - - [Parameter(Mandatory = $false)] - [TimeSpan] $NoProgressTimeout = (New-TimeSpan -Minutes 1), - - [Parameter(Mandatory = $false)] - [Switch] $ThrowOnTimeout - ) - - Write-Verbose "$Server - Waiting for BootLoader to be ready..." - - $exchangeServer = Get-ExchangeServer $Server - if(-not $exchangeServer) - { - Write-Warning "Could not get the exchange server. Skip waiting for BootLoader." - return 0 - } - - $retry = 5 - while ($true) - { - try - { - $xml = [xml](Get-ExchangeDiagnosticInfo -Process "EdgeTransport" -server $Server -erroraction SilentlyContinue) - $processLifeTime = [TimeSpan]($xml.Diagnostics.ProcessInfo.LifeTime) - $processStartTime = [DateTime]($xml.Diagnostics.ProcessInfo.StartTime) - break - } - catch - { - if($retry -gt 0) - { - Write-Verbose "$Server - Can not read the process lifetime. Sleep 20 to retry..." - Start-Sleep 20 - $retry-- - } - else - { - break - } - } - } - - - if(-not $processLifeTime -or -not $processStartTime) - { - # EdgeTransport isn't running or Server isn't a HubTransport, nothing to wait here - Write-SkippedEvent -Source $Server -Stage BootLoaderCountCheck -Reason @{Reason = 'EdgeTransportUnreachable'} - Write-SkippedEvent -Source $Server -Stage BootLoaderSubmitCheck -Reason @{Reason = 'EdgeTransportUnreachable'} - - Write-Warning "$Server - EdgeTransport is not running or server $server is unreachable. Skipping waiting for BootLoader." - return 0 - } - - if($processLifeTime -gt $MaxBootLoaderProcessTimeout) - { - Write-SkippedEvent -Source $Server -Stage BootLoaderCountCheck -Reason @{ProcessLifeTime = $processLifeTime} - Write-SkippedEvent -Source $Server -Stage BootLoaderSubmitCheck -Reason @{ProcessLifeTime = $processLifeTime} - - Write-Verbose "$Server - EdgeTransport has been running for $processLifeTime. BootLoader is ready" - return 0 - } - elseif ($MaxBootLoaderProcessTimeout - $processLifeTime -gt $Timeout) - { - $waitTime = $Timeout - } - else - { - $waitTime = $MaxBootLoaderProcessTimeout - $processLifeTime - } - - $msg = "$Server EdgeTransport has been running for $processLifeTime! Let's give BootLoader $waitTime to complete." - Write-Verbose $msg - - $stopWatch = [System.Diagnostics.Stopwatch]::StartNew() - - Wait-BootLoaderCountCheck ` - -ServerFqdn ($exchangeServer.fqdn) ` - -PollingFrequency $PollingFrequency ` - -TimeOut $waitTime ` - -NoProgressTimeout $waitTime ` - -ThrowOnTimeout:$ThrowOnTimeout - - $stopWatch.Stop() - $elapsed = $stopWatch.Elapsed - $waitTime = $waitTime - $elapsed - - Wait-BootLoaderSubmitCheck ` - -ServerFqdn ($exchangeServer.fqdn) ` - -PollingFrequency $PollingFrequency ` - -TimeOut $waitTime ` - -NoProgressTimeout $NoProgressTimeout ` - -ThrowOnTimeout:$ThrowOnTimeout - - Write-Verbose "$Server - BootLoader ended with $remaining items remain" - return $remaining -} - -# .DESCRIPTION -# Put the MsExchangeTransport/EdgeTransport on the specified server to Draining -# mode WITHOUT changing the server component state. This is done by pausing the service. -# -# .PARAMETER Server -# Server to drain the active messages from -# -# .PARAMETER TransportService -# Optional MsExchangeTransport service object. -function Clear-ActiveMessage -{ - param( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] $Server = $env:COMPUTERNAME, - - [Parameter(Mandatory = $false)] - [object] $TransportService - ) - - Wait-BootLoaderReady -Server $Server - - if(-not $TransportService) - { - $exServer = Get-ExchangeServer $Server - Write-Verbose "$Server - Pausing the MsExchangeTransport service to stop accepting new traffic" - $TransportService = get-service -ComputerName $exServer.Fqdn -Name MSExchangeTransport -errorAction silentlyContinue - } - - if($TransportService) - { - $TransportService.Pause() | Out-Null - } - - $queueTypes = @("SmtpDeliveryToMailbox", "SmtpRelayToRemoteAdSite", "SmtpRelayToDag", "SmtpRelayToServers", "Undefined") - Wait-EmptyQueuesCompletion -Server $server -QueueTypes $queueTypes -ActiveMsgOnly $true -Stage QueueDrain -Timeout 00:01:30 -} - -# .DESCRIPTION -# Redirecting messages from the specified server to all other servers in its dag -# -# .PARAMETER server -# Server whose messages are being redirecting -# -# .PARAMETER ExcludeLocalSite -# Whether to redirect messages to servers at the same site -# -# .PARAMETER LogIfRemain -# Whether to write to window event log if there remaining message that can not be redirected -# -# .RETURN -# Returns active servers in the dag -# -function Send-MessagesToNewServer -{ - param( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] $Server, - - [Parameter(Mandatory = $false)] - [switch] $ExcludeLocalSite, - - [Parameter(Mandatory = $false)] - [switch] $LogIfRemain = $true, - - [string[]]$MessageRedirectExclusions - ) - - # get domain name of the server - $fqdn = Get-ExchangeServer $Server | ForEach-Object {$_.Fqdn} - $domainIndex = $fqdn.Indexof(".") - $domain = $fqdn.SubString($domainIndex) - - $serversInDag = Get-ServersInDag -server $Server -ExcludeLocalSite:$ExcludeLocalSite -AdditionalExclusions $MessageRedirectExclusions - if (-not $serversInDag -or $serversInDag.count -eq 0) - { - Write-Warning "$Server - Could not find servers in the DAG to redirect messages to that do not meeting exclusion criteria. Skipping redirect." - return $null - } - - $serversInDag = Get-ActiveServer $serversInDag - $hubFqdns = $serversInDag | Where-Object { $_ -ne $Server } | ForEach-Object { $_ + $domain } - - $verboseMessage = "$Server - Redirecting messages to " + [string]::Join(", ", $hubFqdns) - Write-Verbose $verboseMessage - - Redirect-Message -Target $hubFqdns -Server $Server -Confirm:$false -ErrorAction SilentlyContinue - - $timeOut = (New-TimeSpan -Minutes 8) - $remaining = Wait-EmptyQueuesCompletion -Server $Server -Stage Redirect -Timeout $timeOut - - if($remaining -and $LogIfRemain) - { - $message = "Transport service is going to Maintenance with $messageCount messages in its queues." - Log-WindowsEvent -EventId $Script:UnredirectedMessageEventId -Message $message - } - - return $serversInDag -} - -# .DESCRIPTION -# Forcing heartbeats from other shadow servers in the dag to the primary -# Wait for all discard events to be drained by its shadow servers -# -# .PARAMETER primary -# Primary server -# -# .PARAMETER shadowServers -# Array of shadow servers -# -# .PARAMETER LogIfRemain -# Whether to log a windows event log if there is remains discard event that can't be drained. -# -# .RETURN -# none -# -function Clear-DiscardEvent -{ - param( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] $Primary, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String[]] $ShadowServers, - - [Parameter(Mandatory = $false)] - [switch] $LogIfRemain = $true - ) - - $filter = "{DeliveryType -eq 'ShadowRedundancy' -and NextHopDomain -like '$Primary*'}" - $ShadowServers | ForEach-Object { - Write-Verbose "$Primary - Forcing heart-beat on server $_" - Retry-Queue -server $_ -Filter $filter -ErrorAction SilentlyContinue - } - - Write-Verbose "$Primary - Waiting for the heartbeats to complete processing" - $remaining = Wait-EmptyDiscardsCompletion -Server $Primary -ActiveServers $ShadowServers -NoProgressTimeout (New-TimeSpan -Minutes 2) - - if($remaining -and $LogIfRemain) - { - $message = "Transport service is going to Maintenance with $remaining unacknowledged discard events." - Log-WindowsEvent -EventId $Script:UndrainedDiscardEventEventId -Message $message - } -} - -function Unblock-SubmissionQueue -{ - Write-Verbose "Getting handles for Transport worker process and service" - $TransportWorkerProcess=(get-process EdgeTransport) - $TransportServiceProcess=(get-process MSExchangeTransport) - $TransportService=(get-service MSExchangeTransport) - - ## Create the dump - Write-Output "Sending trouble signal (204) to Transport Service" - try { $TransportService.ExecuteCommand(204) } ## This could fail and its ok. - catch { Write-Verbose ("Sending trouble signal (204) to Transport Service issued an error:"+$Error[0].ToString()) } - - Write-Verbose "Waiting 90s for the worker process to exit(Watson dump being created)" - if ($TransportWorkerProcess.WaitForExit(90000)) - { - Write-Output "Worker process exited" - } - else - { - Write-Warning "Worker process hasn't exited." - } - - ##Stop transport, one way or another - Write-Output "Stopping Transport." - try { $TransportService.Stop() } ## This could timeout and it's ok. - catch { Write-Verbose ("Stopping Transport issued an error:"+$Error[0].ToString()) } - - Write-Verbose "Waiting for Transport to stop completely" - while (-not $TransportServiceProcess.WaitForExit(30000)) - { - if(-not $TransportWorkerProcess.HasExited) - { - Write-Warning "Transport worker process didn't stop yet. Killing the process" - $TransportWorkerProcess.Kill() - } - else - { - Write-Warning "Transport service didnt stop yet. Killing the process" - $TransportServiceProcess.Kill() - } - } - $TransportService.WaitForStatus("Stopped") ## If it never stops the workflow will timeout and we should wake some people up. - Write-Output "Transport is stopped." - - ## Starting transport will cause the dependencies to start. - Write-Output "Starting Transport" - try { $TransportService.Start() } ## This could timeout and its ok. - catch { Write-Verbose ("Starting Transport issued an error:"+$Error[0].ToString()) } - - $TransportService.WaitForStatus("Running") ## If it never starts the workflow will timeout and we should wake some people up. - - Write-Output "Transport restarted." -} - -# .DESCRIPTION -# Sets specified component to state requested. -# -# .PARAMETER $State -# Requested state for the component. -# -# .PARAMETER $Component -# Component to set. -# -# .PARAMETER $Requester -# Requester who set the state. -# -# .PARAMETER Server -# The server to change the component state -# -function Set-ComponentState -{ - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet("Active", "Inactive")] - [string]$State, - - [Parameter(Mandatory = $false)] - [string]$Component = "HubTransport", - - [Parameter(Mandatory = $false)] - [string]$Requester = "Maintenance", - - [Parameter(Mandatory = $false)] - [string]$Server = $env:COMPUTERNAME - ) - - Write-Verbose "Setting $Component state to $State" - Set-ServerComponentState ` - -Identity $Server ` - -Component $Component ` - -Requester $Requester ` - -State $State ` - -ErrorAction SilentlyContinue -} - -# .DESCRIPTION -# Gets state of the specified component of an exchange server -# -# .PARAMETER $Server -# Server to retrieve component state of -# -# .PARAMETER $Component -# Component to get. -# -function Get-ComponentState -{ - param - ( - [Parameter(Mandatory = $false)] - [string]$Server = $env:COMPUTERNAME, - - [Parameter(Mandatory = $false)] - [string]$Component = "HubTransport" - ) - - Write-Verbose "Getting $Component state of $Server" - $serverComponentState = Get-ServerComponentState ` - -Identity $Server ` - -Component $Component ` - -ErrorAction SilentlyContinue - Write-Verbose "ServerComponentState of $Component is '$($serverComponentState.State)'" - - return $serverComponentState -} - -# .DESCRIPTION -# Change the running state of a service -# -# .PARAMETER $ServiceName -# Name of the service to change the state of -# -# .PARAMETER $Server -# Server where the service is running on -# -# .PARAMETER $State -# New state of the service, can be Stopped, Running, Paused, or NoChange -# -# .PARAMETER $StartMode -# Change the startMode if necessary before changing its running state -# -# .PARAMETER $WaitTime -# Maximum wait time for the service to change its state -# -# .PARAMETER $LoggingStage -# If provide, a log entry is added to MM log on start and complete of the state change -# -# .PARAMETER $ThrowOnFailure -# Whether to throw on failures -# -# .RETURN -# True if successful, false otherwise. -function Set-ServiceState -{ - param( - [Parameter(Mandatory = $true)] - [string]$ServiceName, - - [Parameter(Mandatory = $false)] - [string]$Server = $env:COMPUTERNAME, - - [Parameter(Mandatory = $false)] - [ValidateSet("NoChange", "Stopped", "Running", "Paused")] - [string]$State = "NoChange", - - [Parameter(Mandatory = $false)] - [ValidateSet("NoChange", "Auto", "Automatic", "Manual", "Disabled")] - [string]$StartMode = "NoChange", - - [Parameter(Mandatory = $false)] - [TimeSpan] $WaitTime = (New-TimeSpan -Minutes 5), - - [Parameter(Mandatory = $false)] - [string] $LoggingStage, - - [Parameter(Mandatory = $false)] - [Switch] $ThrowOnFailure - ) - - $service = Get-CimInstance -ClassName win32_service -filter "name = '$ServiceName'" -ComputerName $Server - - if(-not $service) - { - if($LoggingStage) - { - Write-SkippedEvent -Source $Server -Stage $LoggingStage -Reason @{$ServiceName = 'NotFound'} - } - - if($ThrowOnFailure) - { - throw "Service $ServiceName not found on $Server." - } - return - } - - # Check and change the StartMode if necessary - if($StartMode -eq "Auto") - { - $StartMode = "Automatic" - } - - if(($StartMode -ne "NoChange") -and ($service.StartMode -ne $StartMode)) - { - $service.ChangeStartMode($StartMode) | Out-Null - - if($StartMode -eq "Disabled") - { - $State = "Stopped" - } - } - - # Determine if the start/stop/restart action is needed - if($State -eq "NoChange" -or $service.State -eq $State) - { - return - } - - if($LoggingStage) - { - $logEntry = New-LogEntry -Source $Server -Stage $LoggingStage - Write-EventOfEntry -Event Start -Entry $logEntry - } - - switch($State) - { - "Stopped" - { - $service.StopService() | Out-Null - } - - "Running" - { - if($service.State -eq "Paused") - { - $service.ResumeService() | Out-Null - } - else - { - $service.StartService()| Out-Null - } - } - - "Paused" - { - if($service.State -eq "Running") - { - $service.PauseService() | Out-Null - } - else - { - # service is stopped, start it up first - $service.StartService() | Out-Null - - if($WaitTime -eq [TimeSpan]::Zero) - { - $startupWaitTime = New-TimeSpan -Minutes 5 - } - else - { - $startupWaitTime = $WaitTime - } - - Wait-ServiceState ` - -ServiceName $ServiceName ` - -Server $Server ` - -State "Running" ` - -WaitTime $startupWaitTime ` - -ThrowOnFailure:$ThrowOnFailure - - # pause now - $service.PauseService() | Out-Null - } - } - } - - if($WaitTime -gt [TimeSpan]::Zero) - { - Wait-ServiceState ` - -ServiceName $ServiceName ` - -Server $Server ` - -State $State ` - -WaitTime $WaitTime ` - -ThrowOnFailure:$ThrowOnFailure - } - - if($LoggingStage) - { - Write-EventOfEntry -Event Completed -Entry $logEntry -reason @{'MaxWaitMinutes' = $WaitTime.TotalMinutes} - } -} - -# .DESCRIPTION -# Wait for the state of a service to change to the specified state -# -# .PARAMETER $ServiceName -# Name of the service to wait for -# -# .PARAMETER $Server -# Server where the service is running on -# -# .PARAMETER $State -# State to wait for -# -# .PARAMETER $WaitTime -# Maximum wait time for the service to change its state -# -# .PARAMETER $ThrowOnFailure -# Whether to throw on failures -# -# .RETURN -# None -function Wait-ServiceState -{ - param( - [Parameter(Mandatory = $true)] - [string]$ServiceName, - - [Parameter(Mandatory = $false)] - [string]$Server = $env:COMPUTERNAME, - - [Parameter(Mandatory = $True)] - [ValidateSet("Stopped", "Running", "Paused")] - [string]$State, - - [Parameter(Mandatory = $false)] - [TimeSpan] $WaitTime = (New-TimeSpan -Minutes 5), - - [Parameter(Mandatory = $false)] - [Switch] $ThrowOnFailure - ) - - $service = Get-Service -ComputerName $Server -ServiceName $ServiceName - - if(-not $service) - { - if($ThrowOnFailure) - { - throw "Service $ServiceName not found on $Server." - } - return - } - - try - { - $service.WaitForStatus($State, $WaitTime) | Out-Null - } - catch - { - if($ThrowOnFailure) - { - throw $_ - } - } -} - -# .DESCRIPTION -# Function to stop a service by killing the underlying process -# -# .PARAMETER $ServiceName -# Name of the service to stop -# -# .PARAMETER $StartMode -# Service startup mode to set after killing the service, default to 'Auto' -function Stop-ServiceForcefully -{ - param - ( - [ValidateNotNullOrEmpty()] - [string]$ServiceName = $(throw "ServiceName required."), - - [ValidateSet("Auto", "Manual", "Disabled")] - [string]$StartMode = "Auto" - ) - - Write-Verbose "Stopping $ServiceName Service" - Set-ServiceState -ServiceName $ServiceName -StartMode Disabled -WaitTime ([TimeSpan]::Zero) - # Wait in case it needs time to take effect - Wait-Event -Timeout 5 - - $processFullPath = (Get-CimInstance -query "SELECT PathName FROM Win32_Service WHERE Name = '$ServiceName'").PathName.Replace('"','') - $processName = (Split-Path $processFullPath -Leaf).Replace('.exe','') - - $process = Get-Process -Name $processName -ErrorAction SilentlyContinue - if ($null -ne $process) - { - Stop-Process $process -Force - # we wait so that the next statement that sets the startup type back to automatic does not - # take effect while the process is still being killed and cause SCM to start the service back up - Wait-Event -Timeout 5 - } - else - { - Write-Verbose 'The service process was not running' - } - - Set-ServiceState -ServiceName $ServiceName -StartMode $StartMode -WaitTime ([TimeSpan]::Zero) -} -#endregion - -Export-ModuleMember -Function Start-TransportMaintenance -Export-ModuleMember -Function Stop-TransportMaintenance -Export-ModuleMember -Function Wait-BootLoaderReady diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMapiVirtualDirectory/MSFT_xExchMapiVirtualDirectory.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMapiVirtualDirectory/MSFT_xExchMapiVirtualDirectory.psm1 deleted file mode 100644 index 8d00018f..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMapiVirtualDirectory/MSFT_xExchMapiVirtualDirectory.psm1 +++ /dev/null @@ -1,231 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.String] - $DomainController, - - [System.String] - $ExternalUrl, - - [parameter(Mandatory = $true)] - [System.String[]] - $IISAuthenticationMethods, - - [System.String] - $InternalUrl - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-MapiVirtualDirectory" -VerbosePreference $VerbosePreference - - $vdir = GetMapiVirtualDirectory @PSBoundParameters - - if ($null -ne $vdir) - { - $returnValue = @{ - Identity = $Identity - IISAuthenticationMethods = $vdir.IISAuthenticationMethods - ExternalUrl = $vdir.ExternalUrl.AbsoluteUri - InternalUrl = $vdir.InternalUrl.AbsoluteUri - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.String] - $DomainController, - - [System.String] - $ExternalUrl, - - [parameter(Mandatory = $true)] - [System.String[]] - $IISAuthenticationMethods, - - [System.String] - $InternalUrl - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Set-MapiVirtualDirectory" -VerbosePreference $VerbosePreference - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Credential","AllowServiceRestart" - - SetEmptyStringParamsToNull -PSBoundParametersIn $PSBoundParameters - - Set-MapiVirtualDirectory @PSBoundParameters - - if ($AllowServiceRestart -eq $true) - { - Write-Verbose "Recycling MSExchangeMapiFrontEndAppPool and MSExchangeMapiMailboxAppPool" - - RestartAppPoolIfExists -Name MSExchangeMapiFrontEndAppPool - RestartAppPoolIfExists -Name MSExchangeMapiMailboxAppPool - } - else - { - Write-Warning "The configuration will not take effect until MSExchangeMapiFrontEndAppPool and MSExchangeMapiMailboxAppPool are manually recycled." - } -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.String] - $DomainController, - - [System.String] - $ExternalUrl, - - [parameter(Mandatory = $true)] - [System.String[]] - $IISAuthenticationMethods, - - [System.String] - $InternalUrl - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-MapiVirtualDirectory" -VerbosePreference $VerbosePreference - - $vdir = GetMapiVirtualDirectory @PSBoundParameters - - if ($null -eq $vdir) - { - return $false - } - else - { - if (!(VerifySetting -Name "IISAuthenticationMethods" -Type "Array" -ExpectedValue $IISAuthenticationMethods -ActualValue $vdir.IISAuthenticationMethods -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExternalUrl" -Type "String" -ExpectedValue $ExternalUrl -ActualValue $vdir.ExternalUrl.AbsoluteUri -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "InternalUrl" -Type "String" -ExpectedValue $InternalUrl -ActualValue $vdir.InternalUrl.AbsoluteUri -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - } - - return $true -} - -function GetMapiVirtualDirectory -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.String] - $DomainController, - - [System.String] - $ExternalUrl, - - [parameter(Mandatory = $true)] - [System.String[]] - $IISAuthenticationMethods, - - [System.String] - $InternalUrl - ) - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - return (Get-MapiVirtualDirectory @PSBoundParameters) -} - - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMapiVirtualDirectory/MSFT_xExchMapiVirtualDirectory.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMapiVirtualDirectory/MSFT_xExchMapiVirtualDirectory.schema.mof deleted file mode 100644 index ef250ab6..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchMapiVirtualDirectory/MSFT_xExchMapiVirtualDirectory.schema.mof +++ /dev/null @@ -1,18 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchMapiVirtualDirectory")] -class MSFT_xExchMapiVirtualDirectory : OMI_BaseResource -{ - [Key] String Identity; //Identity of Mapi Vdir. Should be in the format 'SERVERNAME\Vdir', as in 'SERVER\mapi (Default Web Site)' - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - [Write] Boolean AllowServiceRestart; //Whether it is Ok to recycle the Mapi App Pools after making changes - - //Remaining props correspond directly to Set-MapiVirtualDirectory parameters - //http://technet.microsoft.com/en-US/library/dn595082%28v=exchg.150%29.aspx - [Write] String DomainController; - [Write] String ExternalUrl; - [Required] String IISAuthenticationMethods[]; - [Write] String InternalUrl; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOabVirtualDirectory/MSFT_xExchOabVirtualDirectory.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOabVirtualDirectory/MSFT_xExchOabVirtualDirectory.psm1 deleted file mode 100644 index 6963393e..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOabVirtualDirectory/MSFT_xExchOabVirtualDirectory.psm1 +++ /dev/null @@ -1,405 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.String[]] - $OABsToDistribute, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $BasicAuthentication, - - [System.String] - $DomainController, - - [System.String[]] - $ExtendedProtectionFlags, - - [System.String[]] - $ExtendedProtectionSPNList, - - [ValidateSet("None","Allow","Require")] - [System.String] - $ExtendedProtectionTokenChecking, - - [System.String] - $ExternalUrl, - - [System.String] - $InternalUrl, - - [System.Int32] - $PollInterval, - - [System.Boolean] - $RequireSSL, - - [System.Boolean] - $WindowsAuthentication - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-OabVirtualDirectory","Set-OabVirtualDirectory","Get-OfflineAddressBook","Set-OfflineAddressBook" -VerbosePreference $VerbosePreference - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - $vdir = Get-OabVirtualDirectory @PSBoundParameters - - if ($null -ne $vdir) - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "DomainController" - - #Get all OAB's which this VDir distributes for, and add their names to an array - $oabs = Get-OfflineAddressBook @PSBoundParameters | Where-Object {$_.VirtualDirectories -like "*$($Identity)*"} - - [string[]]$oabNames = @() - - if ($null -ne $oabs) - { - foreach ($oab in $oabs) - { - $oabNames += $oab.Name - } - } - - $returnValue = @{ - Identity = $Identity - OABsToDistribute = $oabNames - BasicAuthentication = $vdir.BasicAuthentication - ExtendedProtectionFlags = $vdir.ExtendedProtectionFlags - ExtendedProtectionSPNList = $vdir.ExtendedProtectionSPNList - ExtendedProtectionTokenChecking = $vdir.ExtendedProtectionTokenChecking - ExternalUrl = $vdir.ExternalUrl - InternalUrl = $vdir.InternalUrl - PollInterval = $vdir.PollInterval - RequireSSL = $vdir.RequireSSL - WindowsAuthentication = $vdir.WindowsAuthentication - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.String[]] - $OABsToDistribute, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $BasicAuthentication, - - [System.String] - $DomainController, - - [System.String[]] - $ExtendedProtectionFlags, - - [System.String[]] - $ExtendedProtectionSPNList, - - [ValidateSet("None","Allow","Require")] - [System.String] - $ExtendedProtectionTokenChecking, - - [System.String] - $ExternalUrl, - - [System.String] - $InternalUrl, - - [System.Int32] - $PollInterval, - - [System.Boolean] - $RequireSSL, - - [System.Boolean] - $WindowsAuthentication - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - if ($PSBoundParameters.ContainsKey("OABsToDistribute")) - { - #Get existing Vdir props so we can tell if we need to add OAB distribution points - $vdir = Get-TargetResource @PSBoundParameters - - foreach ($oab in $OABsToDistribute) - { - #If we aren't currently distributing an OAB, add it - if ((Array2ContainsArray1Contents -Array1 $oab -Array2 $vdir.OABsToDistribute -IgnoreCase) -eq $false) - { - AddOabDistributionPoint @PSBoundParameters -TargetOabName "$($oab)" - } - } - } - else - { - #Need to establish a remote Powershell session since it wasn't done in Get-TargetResource above - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Set-OabVirtualDirectory" - } - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Credential","AllowServiceRestart","OABsToDistribute" - - SetEmptyStringParamsToNull -PSBoundParametersIn $PSBoundParameters - - Set-OabVirtualDirectory @PSBoundParameters - - if ($AllowServiceRestart -eq $true) - { - Write-Verbose "Recycling MSExchangeOABAppPool" - - RestartAppPoolIfExists -Name MSExchangeOABAppPool - } - else - { - Write-Warning "The configuration will not take effect until MSExchangeOABAppPool is manually recycled." - } -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.String[]] - $OABsToDistribute, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $BasicAuthentication, - - [System.String] - $DomainController, - - [System.String[]] - $ExtendedProtectionFlags, - - [System.String[]] - $ExtendedProtectionSPNList, - - [ValidateSet("None","Allow","Require")] - [System.String] - $ExtendedProtectionTokenChecking, - - [System.String] - $ExternalUrl, - - [System.String] - $InternalUrl, - - [System.Int32] - $PollInterval, - - [System.Boolean] - $RequireSSL, - - [System.Boolean] - $WindowsAuthentication - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - $vdir = Get-TargetResource @PSBoundParameters - - if ($null -eq $vdir) - { - return $false - } - else - { - if ($PSBoundParameters.ContainsKey("OABsToDistribute") -and (Array2ContainsArray1Contents -Array1 $OABsToDistribute -Array2 $vdir.OABsToDistribute -IgnoreCase) -eq $false) - { - ReportBadSetting -SettingName "OABsToDistribute" -ExpectedValue $OABsToDistribute -ActualValue $vdir.OABsToDistribute -VerbosePreference $VerbosePreference - } - - if (!(VerifySetting -Name "BasicAuthentication" -Type "Boolean" -ExpectedValue $BasicAuthentication -ActualValue $vdir.BasicAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExtendedProtectionFlags" -Type "Array" -ExpectedValue $ExtendedProtectionFlags -ActualValue $vdir.ExtendedProtectionFlags -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExtendedProtectionSPNList" -Type "Array" -ExpectedValue $ExtendedProtectionSPNList -ActualValue $vdir.ExtendedProtectionSPNList -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExtendedProtectionTokenChecking" -Type "String" -ExpectedValue $ExtendedProtectionTokenChecking -ActualValue $vdir.ExtendedProtectionTokenChecking -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExternalUrl" -Type "String" -ExpectedValue $ExternalUrl -ActualValue $vdir.ExternalUrl.AbsoluteUri -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "InternalUrl" -Type "String" -ExpectedValue $InternalUrl -ActualValue $vdir.InternalUrl.AbsoluteUri -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "PollInterval" -Type "Int" -ExpectedValue $PollInterval -ActualValue $vdir.PollInterval -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "RequireSSL" -Type "Boolean" -ExpectedValue $RequireSSL -ActualValue $vdir.RequireSSL -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "WindowsAuthentication" -Type "Boolean" -ExpectedValue $WindowsAuthentication -ActualValue $vdir.WindowsAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - } - - return $true -} - -#Adds a specified OAB vdir to the distribution points for an OAB -function AddOabDistributionPoint -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.String[]] - $OABsToDistribute, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $BasicAuthentication, - - [System.String] - $DomainController, - - [System.String[]] - $ExtendedProtectionFlags, - - [System.String[]] - $ExtendedProtectionSPNList, - - [ValidateSet("None","Allow","Require")] - [System.String] - $ExtendedProtectionTokenChecking, - - [System.String] - $ExternalUrl, - - [System.String] - $InternalUrl, - - [System.Int32] - $PollInterval, - - [System.Boolean] - $RequireSSL, - - [System.Boolean] - $WindowsAuthentication, - - [parameter(Mandatory = $true)] #Extra parameter added just for this function - [System.String] - $TargetOabName - ) - - #Keep track of the OAB vdir to add - $vdirIdentity = $Identity - - #Setup params for Get-OfflineAddressBook - AddParameters -PSBoundParametersIn $PSBoundParameters -ParamsToAdd @{"Identity" = $TargetOabName} - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - $oab = Get-OfflineAddressBook @PSBoundParameters if ($null -ne $oab) { #Assemble the list of existing Virtual Directories [string[]]$allVdirs = @() foreach ($vdir in $oab.VirtualDirectories) { $oabServer = ServerFromOABVdirDN -OabVdirDN $vdir.DistinguishedName [string]$entry = $oabServer + "\" + $vdir.Name $allVdirs += $entry } #Add desired vdir to existing list $allVdirs += $vdirIdentity - - #Set back to the OAB - Set-OfflineAddressBook @PSBoundParameters -VirtualDirectories $allVdirs - } - else - { - throw "Unable to find OAB '$($TargetOabName)'" - } -} - -#Gets just the server netbios name from an OAB virtual directory distinguishedName function ServerFromOABVdirDN($OabVdirDN) { $startString = "CN=Protocols,CN=" $endString = ",CN=Servers" $startIndex = $OabVdirDN.IndexOf($startString) + $startString.Length $length = $OabVdirDN.IndexOf($endString) - $startIndex $serverName = $OabVdirDN.Substring($startIndex, $length) return $serverName } - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOabVirtualDirectory/MSFT_xExchOabVirtualDirectory.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOabVirtualDirectory/MSFT_xExchOabVirtualDirectory.schema.mof deleted file mode 100644 index d91236e1..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOabVirtualDirectory/MSFT_xExchOabVirtualDirectory.schema.mof +++ /dev/null @@ -1,25 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchOabVirtualDirectory")] -class MSFT_xExchOabVirtualDirectory : OMI_BaseResource -{ - [Key] String Identity; //Identity of OAB Vdir. Should be in the format 'SERVERNAME\Vdir', as in 'SERVER\OAB (Default Web Site)' - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - [Write] String OABsToDistribute[]; //An array of names of Offline Address Books that this virtual directory should be added as a distribution point for. - [Write] Boolean AllowServiceRestart; //Whether it is OK to recycle the app pool after making changes. Defaults to $true. - - //Remaining props correspond directly to Set-OabVirtualDirectory parameters - //http://technet.microsoft.com/en-us/library/bb124707(v=exchg.150).aspx - [Write] Boolean BasicAuthentication; - [Write] String DomainController; - [Write] String ExtendedProtectionFlags[]; - [Write] String ExtendedProtectionSPNList[]; - [Write, ValueMap{"None","Allow","Require"}, Values{"None","Allow","Require"}] String ExtendedProtectionTokenChecking; - [Write] String ExternalUrl; - [Write] String InternalUrl; - [Write] Sint32 PollInterval; - [Write] Boolean RequireSSL; - [Write] Boolean WindowsAuthentication; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOutlookAnywhere/MSFT_xExchOutlookAnywhere.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOutlookAnywhere/MSFT_xExchOutlookAnywhere.psm1 deleted file mode 100644 index 1dd4f184..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOutlookAnywhere/MSFT_xExchOutlookAnywhere.psm1 +++ /dev/null @@ -1,387 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.String] - $DomainController, - - [System.String[]] - $ExtendedProtectionFlags, - - [System.String[]] - $ExtendedProtectionSPNList, - - [ValidateSet("Allow","None","Require")] - [System.String] - $ExtendedProtectionTokenChecking, - - [ValidateSet("Ntlm","Basic","Negotiate")] - [System.String] - $ExternalClientAuthenticationMethod, - - [System.Boolean] - $ExternalClientsRequireSsl, - - [System.String] - $ExternalHostname, - - [System.String[]] - $IISAuthenticationMethods, - - [ValidateSet("Ntlm","Basic","Negotiate")] - [System.String] - $InternalClientAuthenticationMethod, - - [System.String] - $InternalHostname, - - [System.Boolean] - $InternalClientsRequireSsl, - - [System.Boolean] - $SSLOffloading - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad 'Get-OutlookAnywhere' -VerbosePreference $VerbosePreference - - $RpcVdir = GetOutlookAnywhere @PSBoundParameters - - if ($null -ne $RpcVdir) - { - $returnValue = @{ - Identity = $Identity - InternalHostname = $RpcVdir.InternalHostname.HostnameString - ExternalHostname = $RpcVdir.ExternalHostname.HostnameString - InternalClientAuthenticationMethod = $RpcVdir.InternalClientAuthenticationMethod - ExternalClientAuthenticationMethod = $RpcVdir.ExternalClientAuthenticationMethod - IISAuthenticationMethods = $RpcVdir.IISAuthenticationMethods - ExtendedProtectionFlags = $RpcVdir.ExtendedProtectionFlags - ExtendedProtectionSPNList = $RpcVdir.ExtendedProtectionSPNList - ExtendedProtectionTokenChecking = $RpcVdir.ExtendedProtectionTokenChecking - ExternalClientsRequireSsl = $RpcVdir.ExternalClientsRequireSsl - InternalClientsRequireSsl = $RpcVdir.InternalClientsRequireSsl - SSLOffloading = $RpcVdir.SSLOffloading - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.String] - $DomainController, - - [System.String[]] - $ExtendedProtectionFlags, - - [System.String[]] - $ExtendedProtectionSPNList, - - [ValidateSet("Allow","None","Require")] - [System.String] - $ExtendedProtectionTokenChecking, - - [ValidateSet("Ntlm","Basic","Negotiate")] - [System.String] - $ExternalClientAuthenticationMethod, - - [System.Boolean] - $ExternalClientsRequireSsl, - - [System.String] - $ExternalHostname, - - [System.String[]] - $IISAuthenticationMethods, - - [ValidateSet("Ntlm","Basic","Negotiate")] - [System.String] - $InternalClientAuthenticationMethod, - - [System.String] - $InternalHostname, - - [System.Boolean] - $InternalClientsRequireSsl, - - [System.Boolean] - $SSLOffloading - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad 'Set-OutlookAnywhere' -VerbosePreference $VerbosePreference - - #Ensure an empty string is $null and not a string - SetEmptyStringParamsToNull -PSBoundParametersIn $PSBoundParameters - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'Credential','AllowServiceRestart' - - Set-OutlookAnywhere @PSBoundParameters - - if($AllowServiceRestart -eq $true) - { - Write-Verbose "Recycling MSExchangeRpcProxyAppPool and MSExchangeRpcProxyFrontEndAppPool" - - RestartAppPoolIfExists -Name MSExchangeRpcProxyAppPool - RestartAppPoolIfExists -Name MSExchangeRpcProxyFrontEndAppPool - } - else - { - Write-Warning "The configuration will not take effect until MSExchangeRpcProxyAppPool and MSExchangeRpcProxyFrontEndAppPool are manually recycled." - } -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.String] - $DomainController, - - [System.String[]] - $ExtendedProtectionFlags, - - [System.String[]] - $ExtendedProtectionSPNList, - - [ValidateSet("Allow","None","Require")] - [System.String] - $ExtendedProtectionTokenChecking, - - [ValidateSet("Ntlm","Basic","Negotiate")] - [System.String] - $ExternalClientAuthenticationMethod, - - [System.Boolean] - $ExternalClientsRequireSsl, - - [System.String] - $ExternalHostname, - - [System.String[]] - $IISAuthenticationMethods, - - [ValidateSet("Ntlm","Basic","Negotiate")] - [System.String] - $InternalClientAuthenticationMethod, - - [System.String] - $InternalHostname, - - [System.Boolean] - $InternalClientsRequireSsl, - - [System.Boolean] - $SSLOffloading - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad 'Get-OutlookAnywhere' -VerbosePreference $VerbosePreference - - #Ensure an empty string is $null and not a string - SetEmptyStringParamsToNull -PSBoundParametersIn $PSBoundParameters - - $RpcVdir = GetOutlookAnywhere @PSBoundParameters - - if ($null -eq $RpcVdir) - { - return $false - } - else - { - if (!(VerifySetting -Name "InternalHostname" -Type "String" -ExpectedValue $InternalHostname -ActualValue $RpcVdir.InternalHostname.HostnameString -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExternalHostname" -Type "String" -ExpectedValue $ExternalHostname -ActualValue $RpcVdir.ExternalHostname.HostnameString -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "InternalClientAuthenticationMethod" -Type "String" -ExpectedValue $InternalClientAuthenticationMethod -ActualValue $RpcVdir.InternalClientAuthenticationMethod -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExternalClientAuthenticationMethod" -Type "String" -ExpectedValue $ExternalClientAuthenticationMethod -ActualValue $RpcVdir.ExternalClientAuthenticationMethod -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExtendedProtectionTokenChecking" -Type "String" -ExpectedValue $ExtendedProtectionTokenChecking -ActualValue $RpcVdir.ExtendedProtectionTokenChecking -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - #ExternalClientsRequireSsl will only actually return as $true if ExternalHostname was also set - if (![string]::IsNullOrEmpty($ExternalHostname) -and !(VerifySetting -Name "ExternalClientsRequireSsl" -Type "Boolean" -ExpectedValue $ExternalClientsRequireSsl -ActualValue $RpcVdir.ExternalClientsRequireSsl -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "InternalClientsRequireSsl" -Type "Boolean" -ExpectedValue $InternalClientsRequireSsl -ActualValue $RpcVdir.InternalClientsRequireSsl -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "SSLOffloading" -Type "Boolean" -ExpectedValue $SSLOffloading -ActualValue $RpcVdir.SSLOffloading -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "IISAuthenticationMethods" -Type "Array" -ExpectedValue $IISAuthenticationMethods -ActualValue $RpcVdir.IISAuthenticationMethods -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExtendedProtectionFlags" -Type "Array" -ExpectedValue $ExtendedProtectionFlags -ActualValue $RpcVdir.ExtendedProtectionFlags -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExtendedProtectionSPNList" -Type "Array" -ExpectedValue $ExtendedProtectionSPNList -ActualValue $RpcVdir.ExtendedProtectionSPNList -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - } - - #If the code made it this far all properties are in a desired state - return $true -} - -function GetOutlookAnywhere -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.String] - $DomainController, - - [System.String[]] - $ExtendedProtectionFlags, - - [System.String[]] - $ExtendedProtectionSPNList, - - [ValidateSet("Allow","None","Require")] - [System.String] - $ExtendedProtectionTokenChecking, - - [ValidateSet("Ntlm","Basic","Negotiate")] - [System.String] - $ExternalClientAuthenticationMethod, - - [System.Boolean] - $ExternalClientsRequireSsl, - - [System.String] - $ExternalHostname, - - [System.String[]] - $IISAuthenticationMethods, - - [ValidateSet("Ntlm","Basic","Negotiate")] - [System.String] - $InternalClientAuthenticationMethod, - - [System.String] - $InternalHostname, - - [System.Boolean] - $InternalClientsRequireSsl, - - [System.Boolean] - $SSLOffloading - ) - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - return (Get-OutlookAnywhere @PSBoundParameters) -} - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOutlookAnywhere/MSFT_xExchOutlookAnywhere.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOutlookAnywhere/MSFT_xExchOutlookAnywhere.schema.mof deleted file mode 100644 index bcbf4979..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOutlookAnywhere/MSFT_xExchOutlookAnywhere.schema.mof +++ /dev/null @@ -1,26 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchOutlookAnywhere")] -class MSFT_xExchOutlookAnywhere : OMI_BaseResource -{ - [Key] String Identity; //The Identity of the OAB Virtual Directory - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - [Write] Boolean AllowServiceRestart; //Whether it is OK to recycle the app pool after making changes. Defaults to $true. - - //Remaining props correspond directly to Set-OutlookAnywhere parameters - //http://technet.microsoft.com/en-us/library/bb123545(v=exchg.150).aspx - [Write] String DomainController; - [Write] Boolean ExternalClientsRequireSsl; - [Write] String ExtendedProtectionFlags[]; - [Write] String ExtendedProtectionSPNList[]; - [Write, ValueMap{"Allow","None","Require"}, Values{"Allow","None","Require"}] String ExtendedProtectionTokenChecking; - [Write, ValueMap{"Ntlm","Basic","Negotiate"}, Values{"Ntlm","Basic","Negotiate"}] String ExternalClientAuthenticationMethod; - [Write] String ExternalHostname; - [Write] String IISAuthenticationMethods[]; - [Write, ValueMap{"Ntlm","Basic","Negotiate"}, Values{"Ntlm","Basic","Negotiate"}] String InternalClientAuthenticationMethod; - [Write] Boolean InternalClientsRequireSsl; - [Write] String InternalHostname; - [Write] Boolean SSLOffloading; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOwaVirtualDirectory/MSFT_xExchOwaVirtualDirectory.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOwaVirtualDirectory/MSFT_xExchOwaVirtualDirectory.psm1 deleted file mode 100644 index 180ccd3f..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOwaVirtualDirectory/MSFT_xExchOwaVirtualDirectory.psm1 +++ /dev/null @@ -1,488 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $AdfsAuthentication, - - [System.Boolean] - $BasicAuthentication, - - [System.Boolean] - $ChangePasswordEnabled, - - [System.Boolean] - $DigestAuthentication, - - [System.String] - $DomainController, - - [System.String[]] - $ExternalAuthenticationMethods, - - [System.String] - $ExternalUrl, - - [System.Boolean] - $FormsAuthentication, - - [System.Boolean] - $InstantMessagingEnabled, - - [System.String] - $InstantMessagingCertificateThumbprint, - - [System.String] - $InstantMessagingServerName, - - [ValidateSet("None","Ocs")] - [System.String] - $InstantMessagingType, - - [System.String] - $InternalUrl, - - [System.Boolean] - $LogonPagePublicPrivateSelectionEnabled, - - [System.Boolean] - $LogonPageLightSelectionEnabled, - - [System.Boolean] - $WindowsAuthentication, - - [ValidateSet("FullDomain","UserName","PrincipalName")] - [System.String] - $LogonFormat, - - [System.String] - $DefaultDomain - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad 'Get-OwaVirtualDirectory' -VerbosePreference $VerbosePreference - - $OwaVdir = GetOwaVirtualDirectory @PSBoundParameters - - if ($null -ne $OwaVdir) - { - $returnValue = @{ - Identity = $Identity - InternalUrl = $OwaVdir.InternalUrl.AbsoluteUri - ExternalUrl = $OwaVdir.ExternalUrl.AbsoluteUri - FormsAuthentication = $OwaVdir.FormsAuthentication - WindowsAuthentication = $OwaVdir.WindowsAuthentication - BasicAuthentication = $OwaVdir.BasicAuthentication - ChangePasswordEnabled = $OwaVdir.ChangePasswordEnabled - DigestAuthentication = $OwaVdir.DigestAuthentication - AdfsAuthentication = $OwaVdir.AdfsAuthentication - InstantMessagingType = $OwaVdir.InstantMessagingType - InstantMessagingEnabled = $OwaVdir.InstantMessagingEnabled - InstantMessagingServerName = $OwaVdir.InstantMessagingServerName - InstantMessagingCertificateThumbprint = $OwaVdir.InstantMessagingCertificateThumbprint - LogonPagePublicPrivateSelectionEnabled = $OwaVdir.LogonPagePublicPrivateSelectionEnabled - LogonPageLightSelectionEnabled = $OwaVdir.LogonPageLightSelectionEnabled - ExternalAuthenticationMethods = $OwaVdir.ExternalAuthenticationMethods - LogonFormat = $OwaVdir.LogonFormat - DefaultDomain = $OwaVdir.DefaultDomain - } - } - - $returnValue -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $AdfsAuthentication, - - [System.Boolean] - $BasicAuthentication, - - [System.Boolean] - $ChangePasswordEnabled, - - [System.Boolean] - $DigestAuthentication, - - [System.String] - $DomainController, - - [System.String[]] - $ExternalAuthenticationMethods, - - [System.String] - $ExternalUrl, - - [System.Boolean] - $FormsAuthentication, - - [System.Boolean] - $InstantMessagingEnabled, - - [System.String] - $InstantMessagingCertificateThumbprint, - - [System.String] - $InstantMessagingServerName, - - [ValidateSet("None","Ocs")] - [System.String] - $InstantMessagingType, - - [System.String] - $InternalUrl, - - [System.Boolean] - $LogonPagePublicPrivateSelectionEnabled, - - [System.Boolean] - $LogonPageLightSelectionEnabled, - - [System.Boolean] - $WindowsAuthentication, - - [ValidateSet("FullDomain","UserName","PrincipalName")] - [System.String] - $LogonFormat, - - [System.String] - $DefaultDomain - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad 'Set-OwaVirtualDirectory' -VerbosePreference $VerbosePreference - - #Ensure an empty string is $null and not a string - SetEmptyStringParamsToNull -PSBoundParametersIn $PSBoundParameters - - #Remove Credential and AllowServiceRestart because those parameters do not exist on Set-OwaVirtualDirectory - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'Credential','AllowServiceRestart' - - Set-OwaVirtualDirectory @PSBoundParameters - - if($AllowServiceRestart -eq $true) - { - Write-Verbose "Recycling MSExchangeOWAAppPool" - RestartAppPoolIfExists -Name MSExchangeOWAAppPool - } - else - { - Write-Warning "The configuration will not take effect until MSExchangeOWAAppPool is manually recycled." - } -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $AdfsAuthentication, - - [System.Boolean] - $BasicAuthentication, - - [System.Boolean] - $ChangePasswordEnabled, - - [System.Boolean] - $DigestAuthentication, - - [System.String] - $DomainController, - - [System.String[]] - $ExternalAuthenticationMethods, - - [System.String] - $ExternalUrl, - - [System.Boolean] - $FormsAuthentication, - - [System.Boolean] - $InstantMessagingEnabled, - - [System.String] - $InstantMessagingCertificateThumbprint, - - [System.String] - $InstantMessagingServerName, - - [ValidateSet("None","Ocs")] - [System.String] - $InstantMessagingType, - - [System.String] - $InternalUrl, - - [System.Boolean] - $LogonPagePublicPrivateSelectionEnabled, - - [System.Boolean] - $LogonPageLightSelectionEnabled, - - [System.Boolean] - $WindowsAuthentication, - - [ValidateSet("FullDomain","UserName","PrincipalName")] - [System.String] - $LogonFormat, - - [System.String] - $DefaultDomain - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad 'Get-OwaVirtualDirectory' -VerbosePreference $VerbosePreference - - #Ensure an empty string is $null and not a string - SetEmptyStringParamsToNull -PSBoundParametersIn $PSBoundParameters - - $OwaVdir = GetOwaVirtualDirectory @PSBoundParameters - - if ($null -eq $OwaVdir) - { - return $false - } - else - { - if (!(VerifySetting -Name "InternalUrl" -Type "String" -ExpectedValue $InternalUrl -ActualValue $OwaVdir.InternalUrl.AbsoluteUri -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExternalUrl" -Type "String" -ExpectedValue $ExternalUrl -ActualValue $OwaVdir.ExternalUrl.AbsoluteUri -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "FormsAuthentication" -Type "Boolean" -ExpectedValue $FormsAuthentication -ActualValue $OwaVdir.FormsAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "WindowsAuthentication" -Type "Boolean" -ExpectedValue $WindowsAuthentication -ActualValue $OwaVdir.WindowsAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "BasicAuthentication" -Type "Boolean" -ExpectedValue $BasicAuthentication -ActualValue $OwaVdir.BasicAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ChangePasswordEnabled" -Type "Boolean" -ExpectedValue $ChangePasswordEnabled -ActualValue $OwaVdir.ChangePasswordEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "DigestAuthentication" -Type "Boolean" -ExpectedValue $DigestAuthentication -ActualValue $OwaVdir.DigestAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "AdfsAuthentication" -Type "Boolean" -ExpectedValue $AdfsAuthentication -ActualValue $OwaVdir.AdfsAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "InstantMessagingType" -Type "String" -ExpectedValue $InstantMessagingType -ActualValue $OwaVdir.InstantMessagingType -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "InstantMessagingEnabled" -Type "Boolean" -ExpectedValue $InstantMessagingEnabled -ActualValue $OwaVdir.InstantMessagingEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "InstantMessagingCertificateThumbprint" -Type "String" -ExpectedValue $InstantMessagingCertificateThumbprint -ActualValue $OwaVdir.InstantMessagingCertificateThumbprint -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "InstantMessagingServerName" -Type "String" -ExpectedValue $InstantMessagingServerName -ActualValue $OwaVdir.InstantMessagingServerName -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "LogonPagePublicPrivateSelectionEnabled" -Type "Boolean" -ExpectedValue $LogonPagePublicPrivateSelectionEnabled -ActualValue $OwaVdir.LogonPagePublicPrivateSelectionEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "LogonPageLightSelectionEnabled" -Type "Boolean" -ExpectedValue $LogonPageLightSelectionEnabled -ActualValue $OwaVdir.LogonPageLightSelectionEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExternalAuthenticationMethods" -Type "Array" -ExpectedValue $ExternalAuthenticationMethods -ActualValue $OwaVdir.ExternalAuthenticationMethods -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "LogonFormat" -Type "String" -ExpectedValue $LogonFormat -ActualValue $OwaVdir.LogonFormat -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "DefaultDomain" -Type "String" -ExpectedValue $DefaultDomain -ActualValue $OwaVdir.DefaultDomain -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - } - - #If the code made it this for all properties are in a desired state - return $true -} - -function GetOwaVirtualDirectory -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $AdfsAuthentication, - - [System.Boolean] - $BasicAuthentication, - - [System.Boolean] - $ChangePasswordEnabled, - - [System.Boolean] - $DigestAuthentication, - - [System.String] - $DomainController, - - [System.String[]] - $ExternalAuthenticationMethods, - - [System.String] - $ExternalUrl, - - [System.Boolean] - $FormsAuthentication, - - [System.Boolean] - $InstantMessagingEnabled, - - [System.String] - $InstantMessagingCertificateThumbprint, - - [System.String] - $InstantMessagingServerName, - - [ValidateSet("None","Ocs")] - [System.String] - $InstantMessagingType, - - [System.String] - $InternalUrl, - - [System.Boolean] - $LogonPagePublicPrivateSelectionEnabled, - - [System.Boolean] - $LogonPageLightSelectionEnabled, - - [System.Boolean] - $WindowsAuthentication, - - [ValidateSet("FullDomain","UserName","PrincipalName")] - [System.String] - $LogonFormat, - - [System.String] - $DefaultDomain - ) - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - return (Get-OwaVirtualDirectory @PSBoundParameters) -} - - -Export-ModuleMember -Function *-TargetResource - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOwaVirtualDirectory/MSFT_xExchOwaVirtualDirectory.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOwaVirtualDirectory/MSFT_xExchOwaVirtualDirectory.schema.mof deleted file mode 100644 index aadfd211..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchOwaVirtualDirectory/MSFT_xExchOwaVirtualDirectory.schema.mof +++ /dev/null @@ -1,32 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchOwaVirtualDirectory")] -class MSFT_xExchOwaVirtualDirectory : OMI_BaseResource -{ - [Key] String Identity; //The Identity of the OWA Virtual Directory - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - - //Remaining props correspond directly to Set-OwaVirtualDirectory parameters - //http://technet.microsoft.com/en-us/library/bb123515(v=exchg.150).aspx - [Write] Boolean AdfsAuthentication; - [Write] Boolean AllowServiceRestart; - [Write] Boolean BasicAuthentication; - [Write] Boolean ChangePasswordEnabled; - [Write] Boolean DigestAuthentication; - [Write] String DomainController; - [Write] String ExternalAuthenticationMethods[]; - [Write] String ExternalUrl; - [Write] Boolean FormsAuthentication; - [Write] String InternalUrl; - [Write] Boolean InstantMessagingEnabled; - [Write] String InstantMessagingCertificateThumbprint; - [Write] String InstantMessagingServerName; - [Write, ValueMap{"None","Ocs"}, Values{"None","Ocs"}] String InstantMessagingType; - [Write] Boolean LogonPagePublicPrivateSelectionEnabled; - [Write] Boolean LogonPageLightSelectionEnabled; - [Write] Boolean WindowsAuthentication; - [Write, ValueMap{"FullDomain","UserName","PrincipalName"}, Values{"FullDomain","UserName","PrincipalName"}] String LogonFormat; - [Write] String DefaultDomain; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchPopSettings/MSFT_xExchPopSettings.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchPopSettings/MSFT_xExchPopSettings.psm1 deleted file mode 100644 index bffec3b0..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchPopSettings/MSFT_xExchPopSettings.psm1 +++ /dev/null @@ -1,228 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Server, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.String] - $DomainController, - - [ValidateSet("PlainTextLogin","PlainTextAuthentication","SecureLogin")] - [System.String] - $LoginType, - - [System.String[]] - $ExternalConnectionSettings, - - [System.String] - $X509CertificateName - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Server" = $Server} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-PopSettings" -VerbosePreference $VerbosePreference - - $pop = GetPopSettings @PSBoundParameters - - if ($null -ne $pop) - { - $returnValue = @{ - Server = $Identity - LoginType = $pop.LoginType - ExternalConnectionSettings = $pop.ExternalConnectionSettings - X509CertificateName = $pop.X509CertificateName - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Server, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.String] - $DomainController, - - [ValidateSet("PlainTextLogin","PlainTextAuthentication","SecureLogin")] - [System.String] - $LoginType, - - [System.String[]] - $ExternalConnectionSettings, - - [System.String] - $X509CertificateName - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Server" = $Server} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Set-PopSettings" -VerbosePreference $VerbosePreference - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Credential","AllowServiceRestart" - - Set-PopSettings @PSBoundParameters - - if ($AllowServiceRestart -eq $true) - { - Write-Verbose "Restarting POP Services" - - Get-Service MSExchangePOP4* | Restart-Service - } - else - { - Write-Warning "The configuration will not take effect until MSExchangePOP services are manually restarted." - } -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Server, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.String] - $DomainController, - - [ValidateSet("PlainTextLogin","PlainTextAuthentication","SecureLogin")] - [System.String] - $LoginType, - - [System.String[]] - $ExternalConnectionSettings, - - [System.String] - $X509CertificateName - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Server" = $Server} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-PopSettings" -VerbosePreference $VerbosePreference - - SetEmptyStringParamsToNull -PSBoundParametersIn $PSBoundParameters - - $pop = GetPopSettings @PSBoundParameters - - if ($null -eq $pop) - { - return $false - } - else - { - if (!(VerifySetting -Name "LoginType" -Type "String" -ExpectedValue $LoginType -ActualValue $pop.LoginType -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExternalConnectionSettings" -Type "Array" -ExpectedValue $ExternalConnectionSettings -ActualValue $pop.ExternalConnectionSettings -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "X509CertificateName" -Type "String" -ExpectedValue $X509CertificateName -ActualValue $pop.X509CertificateName -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - } - - return $true -} - -function GetPopSettings -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Server, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.String] - $DomainController, - - [ValidateSet("PlainTextLogin","PlainTextAuthentication","SecureLogin")] - [System.String] - $LoginType, - - [System.String[]] - $ExternalConnectionSettings, - - [System.String] - $X509CertificateName - ) - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Server","DomainController" - - return (Get-PopSettings @PSBoundParameters) -} - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchPopSettings/MSFT_xExchPopSettings.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchPopSettings/MSFT_xExchPopSettings.schema.mof deleted file mode 100644 index 944c6723..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchPopSettings/MSFT_xExchPopSettings.schema.mof +++ /dev/null @@ -1,15 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchPopSettings")] -class MSFT_xExchPopSettings : OMI_BaseResource -{ - [Key] String Server; //The POP server to configure - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - [Write] Boolean AllowServiceRestart; //Whether it is OK to restart the POP services after making changes. Defaults to $false. - [Write] String DomainController; //Optional Domain Controller to connect to - [Write, ValueMap{"PlainTextLogin","PlainTextAuthentication","SecureLogin"}, Values{"PlainTextLogin","PlainTextAuthentication","SecureLogin"}] String LoginType; //The LoginType to be used for POP - [Write] String ExternalConnectionSettings[]; //Specifies the host name, port, and encryption type that Exchange uses when POP3 clients connect to their email from the outside - [Write] String X509CertificateName; //Specifies the host name in the SSL certificate from the Associated Subject field. -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchPowershellVirtualDirectory/MSFT_xExchPowerShellVirtualDirectory.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchPowershellVirtualDirectory/MSFT_xExchPowerShellVirtualDirectory.psm1 deleted file mode 100644 index cd0d9fe7..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchPowershellVirtualDirectory/MSFT_xExchPowerShellVirtualDirectory.psm1 +++ /dev/null @@ -1,282 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $BasicAuthentication, - - [System.Boolean] - $CertificateAuthentication, - - [System.String] - $DomainController, - - [System.String] - $ExternalUrl, - - [System.String] - $InternalUrl, - - [System.Boolean] - $RequireSSL, - - [System.Boolean] - $WindowsAuthentication - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-PowerShellVirtualDirectory" -VerbosePreference $VerbosePreference - - $vdir = GetPowerShellVirtualDirectory @PSBoundParameters - - if ($null -ne $vdir) - { - $returnValue = @{ - Identity = $Identity - BasicAuthentication = $vdir.BasicAuthentication - CertificateAuthentication = $vdir.CertificateAuthentication - ExternalUrl = $vdir.ExternalUrl.AbsoluteUri - InternalUrl = $vdir.InternalUrl.AbsoluteUri - RequireSSL = $vdir.RequireSSL - WindowsAuthentication = $vdir.WindowsAuthentication - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $BasicAuthentication, - - [System.Boolean] - $CertificateAuthentication, - - [System.String] - $DomainController, - - [System.String] - $ExternalUrl, - - [System.String] - $InternalUrl, - - [System.Boolean] - $RequireSSL, - - [System.Boolean] - $WindowsAuthentication - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Set-PowerShellVirtualDirectory" -VerbosePreference $VerbosePreference - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Credential","AllowServiceRestart" - - SetEmptyStringParamsToNull -PSBoundParametersIn $PSBoundParameters - - Set-PowerShellVirtualDirectory @PSBoundParameters - - if ($AllowServiceRestart -eq $true) - { - #Remove existing PS sessions, as we're about to break them - RemoveExistingRemoteSession -VerbosePreference $VerbosePreference - - Write-Verbose "Recycling MSExchangePowerShellAppPool and MSExchangePowerShellFrontEndAppPool" - - RestartAppPoolIfExists -Name MSExchangePowerShellAppPool - RestartAppPoolIfExists -Name MSExchangePowerShellFrontEndAppPool - } - else - { - Write-Warning "The configuration will not take effect until MSExchangePowerShellAppPool and MSExchangePowerShellFrontEndAppPool are manually recycled." - } -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $BasicAuthentication, - - [System.Boolean] - $CertificateAuthentication, - - [System.String] - $DomainController, - - [System.String] - $ExternalUrl, - - [System.String] - $InternalUrl, - - [System.Boolean] - $RequireSSL, - - [System.Boolean] - $WindowsAuthentication - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-PowerShellVirtualDirectory" -VerbosePreference $VerbosePreference - - $vdir = GetPowerShellVirtualDirectory @PSBoundParameters - - if ($null -eq $vdir) - { - return $false - } - else - { - if (!(VerifySetting -Name "BasicAuthentication" -Type "Boolean" -ExpectedValue $BasicAuthentication -ActualValue $vdir.BasicAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "CertificateAuthentication" -Type "Boolean" -ExpectedValue $CertificateAuthentication -ActualValue $vdir.CertificateAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExternalUrl" -Type "String" -ExpectedValue $ExternalUrl -ActualValue $vdir.ExternalUrl.AbsoluteUri -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "InternalUrl" -Type "String" -ExpectedValue $InternalUrl -ActualValue $vdir.InternalUrl.AbsoluteUri -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "RequireSSL" -Type "Boolean" -ExpectedValue $RequireSSL -ActualValue $vdir.RequireSSL -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "WindowsAuthentication" -Type "Boolean" -ExpectedValue $WindowsAuthentication -ActualValue $vdir.WindowsAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - } - - return $true -} - -function GetPowerShellVirtualDirectory -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $BasicAuthentication, - - [System.Boolean] - $CertificateAuthentication, - - [System.String] - $DomainController, - - [System.String] - $ExternalUrl, - - [System.String] - $InternalUrl, - - [System.Boolean] - $RequireSSL, - - [System.Boolean] - $WindowsAuthentication - ) - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - return (Get-PowerShellVirtualDirectory @PSBoundParameters) -} - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchPowershellVirtualDirectory/MSFT_xExchPowerShellVirtualDirectory.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchPowershellVirtualDirectory/MSFT_xExchPowerShellVirtualDirectory.schema.mof deleted file mode 100644 index 895d94da..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchPowershellVirtualDirectory/MSFT_xExchPowerShellVirtualDirectory.schema.mof +++ /dev/null @@ -1,21 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchPowerShellVirtualDirectory")] -class MSFT_xExchPowerShellVirtualDirectory : OMI_BaseResource -{ - [Key] String Identity; //Identity of PS Vdir. Should be in the format 'SERVERNAME\Vdir', as in 'SERVER\PowerShell (Default Web Site)' - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - [Write] Boolean AllowServiceRestart; //Whether it is OK to recycle the app pool after making changes. Defaults to $true. - - //Remaining props correspond directly to Set-PowershellVirtualDirectory parameters - //http://technet.microsoft.com/en-us/library/dd298108(v=exchg.150).aspx - [Write] Boolean BasicAuthentication; - [Write] Boolean CertificateAuthentication; - [Write] String DomainController; - [Write] String ExternalUrl; - [Write] String InternalUrl; - [Write] Boolean RequireSSL; - [Write] Boolean WindowsAuthentication; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchReceiveConnector/MSFT_xExchReceiveConnector.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchReceiveConnector/MSFT_xExchReceiveConnector.psm1 deleted file mode 100644 index 59578053..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchReceiveConnector/MSFT_xExchReceiveConnector.psm1 +++ /dev/null @@ -1,1245 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [Microsoft.Management.Infrastructure.CimInstance[]] - $ExtendedRightAllowEntries, - - [Microsoft.Management.Infrastructure.CimInstance[]] - $ExtendedRightDenyEntries, - - [System.Boolean] - $AdvertiseClientSettings, - - [System.String[]] - $AuthMechanism, - - [System.String] - $Banner, - - [System.Boolean] - $BareLinefeedRejectionEnabled, - - [System.Boolean] - $BinaryMimeEnabled, - - [System.String[]] - $Bindings, - - [System.Boolean] - $ChunkingEnabled, - - [System.String] - $Comment, - - [System.String] - $ConnectionInactivityTimeout, - - [System.String] - $ConnectionTimeout, - - [System.String] - $DefaultDomain, - - [System.String] - $DomainController, - - [System.Boolean] - $DeliveryStatusNotificationEnabled, - - [System.Boolean] - $DomainSecureEnabled, - - [System.Boolean] - $EightBitMimeEnabled, - - [System.Boolean] - $EnableAuthGSSAPI, - - [System.Boolean] - $Enabled, - - [System.Boolean] - $EnhancedStatusCodesEnabled, - - [ValidateSet("None","Allow","Require")] - [System.String] - $ExtendedProtectionPolicy, - - [System.String] - $Fqdn, - - [System.Boolean] - $LongAddressesEnabled, - - [System.String] - $MaxAcknowledgementDelay, - - [System.String] - $MaxHeaderSize, - - [System.Int32] - $MaxHopCount, - - [System.String] - $MaxInboundConnection, - - [System.Int32] - $MaxInboundConnectionPercentagePerSource, - - [System.String] - $MaxInboundConnectionPerSource, - - [System.Int32] - $MaxLocalHopCount, - - [System.Int32] - $MaxLogonFailures, - - [System.String] - $MaxMessageSize, - - [System.String] - $MaxProtocolErrors, - - [System.Int32] - $MaxRecipientsPerMessage, - - [System.String] - $MessageRateLimit, - - [ValidateSet("None","IPAddress","User","All")] - [System.String] - $MessageRateSource, - - [System.Boolean] - $OrarEnabled, - - [System.String[]] - $PermissionGroups, - - [System.Boolean] - $PipeliningEnabled, - - [ValidateSet("None","Verbose")] - [System.String] - $ProtocolLoggingLevel, - - [System.String[]] - $RemoteIPRanges, - - [System.Boolean] - $RequireEHLODomain, - - [System.Boolean] - $RequireTLS, - - [System.String] - $ServiceDiscoveryFqdn, - - [ValidateSet("Enabled","Disabled","EnabledWithoutValue")] - [System.String] - $SizeEnabled, - - [System.Boolean] - $SuppressXAnonymousTls, - - [System.String] - $TarpitInterval, - - [System.String] - $TlsCertificateName, - - [System.String[]] - $TlsDomainCapabilities, - - [ValidateSet("FrontendTransport","HubTransport")] - [System.String] - $TransportRole, - - [ValidateSet("Client","Internal","Internet","Partner","Custom")] - [System.String] - $Usage - ) - - ValidateIdentity -Identity $Identity - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-ReceiveConnector" -VerbosePreference $VerbosePreference - - $connector = GetReceiveConnector @PSBoundParameters - - if ($null -ne $connector) - { - $returnValue = @{ - Identity = $Identity - AdvertiseClientSettings = $connector.AdvertiseClientSettings - AuthMechanism = $connector.AuthMechanism - Banner = $connector.Banner - BareLinefeedRejectionEnabled = $connector.BareLinefeedRejectionEnabled - BinaryMimeEnabled = $connector.BinaryMimeEnabled - Bindings = $connector.Bindings - ChunkingEnabled = $connector.ChunkingEnabled - Comment = $connector.Comment - ConnectionInactivityTimeout = $connector.ConnectionInactivityTimeout - ConnectionTimeout = $connector.ConnectionTimeout - DefaultDomain = $connector.DefaultDomain - DeliveryStatusNotificationEnabled = $connector.DeliveryStatusNotificationEnabled - DomainSecureEnabled = $connector.DomainSecureEnabled - EightBitMimeEnabled = $connector.EightBitMimeEnabled - EnableAuthGSSAPI = $connector.EnableAuthGSSAPI - Enabled = $connector.Enabled - EnhancedStatusCodesEnabled = $connector.EnhancedStatusCodesEnabled - ExtendedProtectionPolicy = $connector.ExtendedProtectionPolicy - ExtendedRightAllowEntries = $ExtendedRightAllowEntries | ForEach-Object {"$($_.key)=$($_.Value)"} - ExtendedRightDenyEntries = $ExtendedRightDenyEntries | ForEach-Object {"$($_.key)=$($_.Value)"} - Fqdn = $connector.Fqdn - LongAddressesEnabled = $connector.LongAddressesEnabled - MaxAcknowledgementDelay = $connector.MaxAcknowledgementDelay - MaxHeaderSize = $connector.MaxHeaderSize - MaxHopCount = $connector.MaxHopCount - MaxInboundConnection = $connector.MaxInboundConnection - MaxInboundConnectionPercentagePerSource = $connector.MaxInboundConnectionPercentagePerSource - MaxInboundConnectionPerSource = $connector.MaxInboundConnectionPerSource - MaxLocalHopCount = $connector.MaxLocalHopCount - MaxLogonFailures = $connector.MaxLogonFailures - MaxMessageSize = $connector.MaxMessageSize - MaxProtocolErrors = $connector.MaxProtocolErrors - MaxRecipientsPerMessage = $connector.MaxRecipientsPerMessage - MessageRateLimit = $connector.MessageRateLimit - MessageRateSource = $connector.MessageRateSource - OrarEnabled = $connector.OrarEnabled - PermissionGroups = $connector.PermissionGroups - PipeliningEnabled = $connector.PipeliningEnabled - ProtocolLoggingLevel = $connector.ProtocolLoggingLevel - RemoteIPRanges = $connector.RemoteIPRanges - RequireEHLODomain = $connector.RequireEHLODomain - RequireTLS = $connector.RequireTLS - ServiceDiscoveryFqdn = $connector.ServiceDiscoveryFqdn - SizeEnabled = $connector.SizeEnabled - SuppressXAnonymousTls = $connector.SuppressXAnonymousTls - TarpitInterval = $connector.TarpitInterval - TlsCertificateName = $connector.TlsCertificateName - TlsDomainCapabilities = $connector.TlsDomainCapabilities - TransportRole = $connector.TransportRole - } - } - - $returnValue -} - -function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [Microsoft.Management.Infrastructure.CimInstance[]] - $ExtendedRightAllowEntries, - - [Microsoft.Management.Infrastructure.CimInstance[]] - $ExtendedRightDenyEntries, - - [System.Boolean] - $AdvertiseClientSettings, - - [System.String[]] - $AuthMechanism, - - [System.String] - $Banner, - - [System.Boolean] - $BareLinefeedRejectionEnabled, - - [System.Boolean] - $BinaryMimeEnabled, - - [System.String[]] - $Bindings, - - [System.Boolean] - $ChunkingEnabled, - - [System.String] - $Comment, - - [System.String] - $ConnectionInactivityTimeout, - - [System.String] - $ConnectionTimeout, - - [System.String] - $DefaultDomain, - - [System.String] - $DomainController, - - [System.Boolean] - $DeliveryStatusNotificationEnabled, - - [System.Boolean] - $DomainSecureEnabled, - - [System.Boolean] - $EightBitMimeEnabled, - - [System.Boolean] - $EnableAuthGSSAPI, - - [System.Boolean] - $Enabled, - - [System.Boolean] - $EnhancedStatusCodesEnabled, - - [ValidateSet("None","Allow","Require")] - [System.String] - $ExtendedProtectionPolicy, - - [System.String] - $Fqdn, - - [System.Boolean] - $LongAddressesEnabled, - - [System.String] - $MaxAcknowledgementDelay, - - [System.String] - $MaxHeaderSize, - - [System.Int32] - $MaxHopCount, - - [System.String] - $MaxInboundConnection, - - [System.Int32] - $MaxInboundConnectionPercentagePerSource, - - [System.String] - $MaxInboundConnectionPerSource, - - [System.Int32] - $MaxLocalHopCount, - - [System.Int32] - $MaxLogonFailures, - - [System.String] - $MaxMessageSize, - - [System.String] - $MaxProtocolErrors, - - [System.Int32] - $MaxRecipientsPerMessage, - - [System.String] - $MessageRateLimit, - - [ValidateSet("None","IPAddress","User","All")] - [System.String] - $MessageRateSource, - - [System.Boolean] - $OrarEnabled, - - [System.String[]] - $PermissionGroups, - - [System.Boolean] - $PipeliningEnabled, - - [ValidateSet("None","Verbose")] - [System.String] - $ProtocolLoggingLevel, - - [System.String[]] - $RemoteIPRanges, - - [System.Boolean] - $RequireEHLODomain, - - [System.Boolean] - $RequireTLS, - - [System.String] - $ServiceDiscoveryFqdn, - - [ValidateSet("Enabled","Disabled","EnabledWithoutValue")] - [System.String] - $SizeEnabled, - - [System.Boolean] - $SuppressXAnonymousTls, - - [System.String] - $TarpitInterval, - - [System.String] - $TlsCertificateName, - - [System.String[]] - $TlsDomainCapabilities, - - [ValidateSet("FrontendTransport","HubTransport")] - [System.String] - $TransportRole, - - [ValidateSet("Client","Internal","Internet","Partner","Custom")] - [System.String] - $Usage - ) - - ValidateIdentity -Identity $Identity - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "*ReceiveConnector","*ADPermission" -VerbosePreference $VerbosePreference - - $connector = GetReceiveConnector @PSBoundParameters - - if ($Ensure -eq "Absent") - { - if ($null -ne $connector) - { - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - Remove-ReceiveConnector @PSBoundParameters -Confirm:$false - } - } - else - { - #Remove Credential and Ensure so we don't pass it into the next command - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Credential","Ensure" - - SetEmptyStringParamsToNull -PSBoundParametersIn $PSBoundParameters - - #We need to create the new connector - if ($null -eq $connector) - { - #Create a copy of the original parameters - $originalPSBoundParameters = @{} + $PSBoundParameters - - #The following aren't valid for New-ReceiveConnector - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Identity","BareLinefeedRejectionEnabled","ExtendedRightAllowEntries","ExtendedRightDenyEntries" - - #Parse out the server name and connector name from the given Identity - $serverName = $Identity.Substring(0, $Identity.IndexOf("\")) - $connectorName = $Identity.Substring($Identity.IndexOf("\") + 1) - - #Add in server and name parameters - AddParameters -PSBoundParametersIn $PSBoundParameters -ParamsToAdd @{"Server" = $serverName; "Name" = $connectorName} - - #Create the connector - $connector = New-ReceiveConnector @PSBoundParameters - - #Ensure the connector exists, and if so, set us up so we can run Set-ReceiveConnector next - if ($null -ne $connector) - { - #Remove the two props we added - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Server","Name" - - #Add original props back - AddParameters -PSBoundParametersIn $PSBoundParameters -ParamsToAdd $originalPSBoundParameters - } - else - { - throw "Failed to create new Receive Connector." - } - } - - #The connector already exists, so use Set-ReceiveConnector - if ($null -ne $connector) - { - #Usage is not a valid command for Set-ReceiveConnector - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Usage","ExtendedRightAllowEntries","ExtendedRightDenyEntries" - - Set-ReceiveConnector @PSBoundParameters - - #set AD permissions - if ($ExtendedRightAllowEntries) - { - foreach ($ExtendedRightAllowEntry in $ExtendedRightAllowEntries) { - foreach ($Value in $($ExtendedRightAllowEntry.Value.Split(","))) { - $connector | Add-ADPermission -User $ExtendedRightAllowEntry.Key -ExtendedRights $Value - } - } - } - - if ($ExtendedRightDenyEntries) - { - foreach ($ExtendedRightDenyEntry in $ExtendedRightDenyEntries) { - foreach ($Value in $($ExtendedRightDenyEntry.Value.Split(","))) { - $connector | Remove-ADPermission -User $ExtendedRightDenyEntry.Key -ExtendedRights $Value -Confirm:$false - } - } - } - } - } -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [Microsoft.Management.Infrastructure.CimInstance[]] - $ExtendedRightAllowEntries, - - [Microsoft.Management.Infrastructure.CimInstance[]] - $ExtendedRightDenyEntries, - - [System.Boolean] - $AdvertiseClientSettings, - - [System.String[]] - $AuthMechanism, - - [System.String] - $Banner, - - [System.Boolean] - $BareLinefeedRejectionEnabled, - - [System.Boolean] - $BinaryMimeEnabled, - - [System.String[]] - $Bindings, - - [System.Boolean] - $ChunkingEnabled, - - [System.String] - $Comment, - - [System.String] - $ConnectionInactivityTimeout, - - [System.String] - $ConnectionTimeout, - - [System.String] - $DefaultDomain, - - [System.Boolean] - $DeliveryStatusNotificationEnabled, - - [System.String] - $DomainController, - - [System.Boolean] - $DomainSecureEnabled, - - [System.Boolean] - $EightBitMimeEnabled, - - [System.Boolean] - $EnableAuthGSSAPI, - - [System.Boolean] - $Enabled, - - [System.Boolean] - $EnhancedStatusCodesEnabled, - - [ValidateSet("None","Allow","Require")] - [System.String] - $ExtendedProtectionPolicy, - - [System.String] - $Fqdn, - - [System.Boolean] - $LongAddressesEnabled, - - [System.String] - $MaxAcknowledgementDelay, - - [System.String] - $MaxHeaderSize, - - [System.Int32] - $MaxHopCount, - - [System.String] - $MaxInboundConnection, - - [System.Int32] - $MaxInboundConnectionPercentagePerSource, - - [System.String] - $MaxInboundConnectionPerSource, - - [System.Int32] - $MaxLocalHopCount, - - [System.Int32] - $MaxLogonFailures, - - [System.String] - $MaxMessageSize, - - [System.String] - $MaxProtocolErrors, - - [System.Int32] - $MaxRecipientsPerMessage, - - [System.String] - $MessageRateLimit, - - [ValidateSet("None","IPAddress","User","All")] - [System.String] - $MessageRateSource, - - [System.Boolean] - $OrarEnabled, - - [System.String[]] - $PermissionGroups, - - [System.Boolean] - $PipeliningEnabled, - - [ValidateSet("None","Verbose")] - [System.String] - $ProtocolLoggingLevel, - - [System.String[]] - $RemoteIPRanges, - - [System.Boolean] - $RequireEHLODomain, - - [System.Boolean] - $RequireTLS, - - [System.String] - $ServiceDiscoveryFqdn, - - [ValidateSet("Enabled","Disabled","EnabledWithoutValue")] - [System.String] - $SizeEnabled, - - [System.Boolean] - $SuppressXAnonymousTls, - - [System.String] - $TarpitInterval, - - [System.String] - $TlsCertificateName, - - [System.String[]] - $TlsDomainCapabilities, - - [ValidateSet("FrontendTransport","HubTransport")] - [System.String] - $TransportRole, - - [ValidateSet("Client","Internal","Internet","Partner","Custom")] - [System.String] - $Usage - ) - - ValidateIdentity -Identity $Identity - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-ReceiveConnector","Get-ADPermission" -VerbosePreference $VerbosePreference - - $connector = GetReceiveConnector @PSBoundParameters - - #get AD permissions if necessary - if (($ExtendedRightAllowEntries) -or ($ExtendedRightDenyEntries)) - { - $ADPermissions = $connector | Get-ADPermission | Where-Object {$_.IsInherited -eq $false} - } - - if ($null -eq $connector) - { - if ($Ensure -eq "Present") - { - return $false - } - else - { - return $true - } - } - else - { - if ($Ensure -eq "Absent") - { - return $false - } - else - { - #remove "Custom" from PermissionGroups - $connector.PermissionGroups = ($connector.PermissionGroups -split "," ) -notmatch "Custom" -join "," - - if (!(VerifySetting -Name "AdvertiseClientSettings" -Type "Boolean" -ExpectedValue $AdvertiseClientSettings -ActualValue $connector.AdvertiseClientSettings -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "AuthMechanism" -Type "Array" -ExpectedValue $AuthMechanism -ActualValue (StringToArray -StringIn "$($connector.AuthMechanism)" -Separator ',') -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "Banner" -Type "String" -ExpectedValue $Banner -ActualValue $connector.Banner -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "BareLinefeedRejectionEnabled" -Type "Boolean" -ExpectedValue $BareLinefeedRejectionEnabled -ActualValue $connector.BareLinefeedRejectionEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "BinaryMimeEnabled" -Type "Boolean" -ExpectedValue $BinaryMimeEnabled -ActualValue $connector.BinaryMimeEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "Bindings" -Type "Array" -ExpectedValue $Bindings -ActualValue $connector.Bindings -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ChunkingEnabled" -Type "Boolean" -ExpectedValue $ChunkingEnabled -ActualValue $connector.ChunkingEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "Comment" -Type "String" -ExpectedValue $Comment -ActualValue $connector.Comment -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ConnectionInactivityTimeout" -Type "Timespan" -ExpectedValue $ConnectionInactivityTimeout -ActualValue $connector.ConnectionInactivityTimeout -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ConnectionTimeout" -Type "Timespan" -ExpectedValue $ConnectionTimeout -ActualValue $connector.ConnectionTimeout -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "DefaultDomain" -Type "String" -ExpectedValue $DefaultDomain -ActualValue $connector.DefaultDomain -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "DeliveryStatusNotificationEnabled" -Type "Boolean" -ExpectedValue $DeliveryStatusNotificationEnabled -ActualValue $connector.DeliveryStatusNotificationEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "DomainSecureEnabled" -Type "Boolean" -ExpectedValue $DomainSecureEnabled -ActualValue $connector.DomainSecureEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "EightBitMimeEnabled" -Type "Boolean" -ExpectedValue $EightBitMimeEnabled -ActualValue $connector.EightBitMimeEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "EnableAuthGSSAPI" -Type "Boolean" -ExpectedValue $EnableAuthGSSAPI -ActualValue $connector.EnableAuthGSSAPI -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "Enabled" -Type "Boolean" -ExpectedValue $Enabled -ActualValue $connector.Enabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "EnhancedStatusCodesEnabled" -Type "Boolean" -ExpectedValue $EnhancedStatusCodesEnabled -ActualValue $connector.EnhancedStatusCodesEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExtendedProtectionPolicy" -Type "String" -ExpectedValue $ExtendedProtectionPolicy -ActualValue $connector.ExtendedProtectionPolicy -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "Fqdn" -Type "String" -ExpectedValue $Fqdn -ActualValue $connector.Fqdn -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "LongAddressesEnabled" -Type "Boolean" -ExpectedValue $LongAddressesEnabled -ActualValue $connector.LongAddressesEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MaxHopCount" -Type "Int" -ExpectedValue $MaxHopCount -ActualValue $connector.MaxHopCount -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MaxAcknowledgementDelay" -Type "Timespan" -ExpectedValue $MaxAcknowledgementDelay -ActualValue $connector.MaxAcknowledgementDelay -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MaxInboundConnection" -Type "String" -ExpectedValue $MaxInboundConnection -ActualValue $connector.MaxInboundConnection -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MaxInboundConnectionPercentagePerSource" -Type "Int" -ExpectedValue $MaxInboundConnectionPercentagePerSource -ActualValue $connector.MaxInboundConnectionPercentagePerSource -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MaxInboundConnectionPerSource" -Type "String" -ExpectedValue $MaxInboundConnectionPerSource -ActualValue $connector.MaxInboundConnectionPerSource -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MaxHeaderSize" -Type "ByteQuantifiedSize" -ExpectedValue $MaxHeaderSize -ActualValue $connector.MaxHeaderSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MaxLocalHopCount" -Type "Int" -ExpectedValue $MaxLocalHopCount -ActualValue $connector.MaxLocalHopCount -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MaxLogonFailures" -Type "Int" -ExpectedValue $MaxLogonFailures -ActualValue $connector.MaxLogonFailures -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MaxMessageSize" -Type "ByteQuantifiedSize" -ExpectedValue $MaxMessageSize -ActualValue $connector.MaxMessageSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MaxProtocolErrors" -Type "String" -ExpectedValue $MaxProtocolErrors -ActualValue $connector.MaxProtocolErrors -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MaxRecipientsPerMessage" -Type "Int" -ExpectedValue $MaxRecipientsPerMessage -ActualValue $connector.MaxRecipientsPerMessage -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MessageRateLimit" -Type "String" -ExpectedValue $MessageRateLimit -ActualValue $connector.MessageRateLimit -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MessageRateSource" -Type "String" -ExpectedValue $MessageRateSource -ActualValue $connector.MessageRateSource -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "OrarEnabled" -Type "Boolean" -ExpectedValue $OrarEnabled -ActualValue $connector.OrarEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "PermissionGroups" -Type "Array" -ExpectedValue $PermissionGroups -ActualValue (StringToArray -StringIn $connector.PermissionGroups -Separator ',') -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "PipeliningEnabled" -Type "Boolean" -ExpectedValue $PipeliningEnabled -ActualValue $connector.PipeliningEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ProtocolLoggingLevel" -Type "String" -ExpectedValue $ProtocolLoggingLevel -ActualValue $connector.ProtocolLoggingLevel -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "RemoteIPRanges" -Type "Array" -ExpectedValue $RemoteIPRanges -ActualValue $connector.RemoteIPRanges -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "RequireEHLODomain" -Type "Boolean" -ExpectedValue $RequireEHLODomain -ActualValue $connector.RequireEHLODomain -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "RequireTLS" -Type "Boolean" -ExpectedValue $RequireTLS -ActualValue $connector.RequireTLS -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ServiceDiscoveryFqdn" -Type "String" -ExpectedValue $ServiceDiscoveryFqdn -ActualValue $connector.ServiceDiscoveryFqdn -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "SizeEnabled" -Type "String" -ExpectedValue $SizeEnabled -ActualValue $connector.SizeEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "SuppressXAnonymousTls" -Type "Boolean" -ExpectedValue $SuppressXAnonymousTls -ActualValue $connector.SuppressXAnonymousTls -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "TarpitInterval" -Type "Timespan" -ExpectedValue $TarpitInterval -ActualValue $connector.TarpitInterval -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "TlsCertificateName" -Type "String" -ExpectedValue $TlsCertificateName -ActualValue $connector.TlsCertificateName -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "TlsDomainCapabilities" -Type "Array" -ExpectedValue $TlsDomainCapabilities -ActualValue $connector.TlsDomainCapabilities -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "TransportRole" -Type "String" -ExpectedValue $TransportRole -ActualValue $connector.TransportRole -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - #check AD permissions if necessary - if ($ExtendedRightAllowEntries) - { - if (!(ExtendedRightExists -ADPermissions $ADPermissions -ExtendedRights $ExtendedRightAllowEntries -ShouldbeTrue:$True -VerbosePreference $VerbosePreference)) - { - return $false - } - } - - if ($ExtendedRightDenyEntries) - { - if (ExtendedRightExists -ADPermissions $ADPermissions -ExtendedRights $ExtendedRightDenyEntries -ShouldbeTrue:$false -VerbosePreference $VerbosePreference) - { - return $false - } - } - } - } - - #If we made it here, all tests passed - return $true -} - -#Runs Get-ReceiveConnector, only specifying Identity, ErrorAction, and optionally DomainController -function GetReceiveConnector -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [Microsoft.Management.Infrastructure.CimInstance[]] - $ExtendedRightAllowEntries, - - [Microsoft.Management.Infrastructure.CimInstance[]] - $ExtendedRightDenyEntries, - - [System.Boolean] - $AdvertiseClientSettings, - - [System.String[]] - $AuthMechanism, - - [System.String] - $Banner, - - [System.Boolean] - $BareLinefeedRejectionEnabled, - - [System.Boolean] - $BinaryMimeEnabled, - - [System.String[]] - $Bindings, - - [System.Boolean] - $ChunkingEnabled, - - [System.String] - $Comment, - - [System.String] - $ConnectionInactivityTimeout, - - [System.String] - $ConnectionTimeout, - - [System.String] - $DefaultDomain, - - [System.Boolean] - $DeliveryStatusNotificationEnabled, - - [System.Boolean] - $DomainSecureEnabled, - - [System.Boolean] - $EightBitMimeEnabled, - - [System.Boolean] - $EnableAuthGSSAPI, - - [System.Boolean] - $Enabled, - - [System.Boolean] - $EnhancedStatusCodesEnabled, - - [ValidateSet("None","Allow","Require")] - [System.String] - $ExtendedProtectionPolicy, - - [System.String] - $Fqdn, - - [System.Boolean] - $LongAddressesEnabled, - - [System.String] - $MaxAcknowledgementDelay, - - [System.String] - $MaxHeaderSize, - - [System.Int32] - $MaxHopCount, - - [System.String] - $MaxInboundConnection, - - [System.Int32] - $MaxInboundConnectionPercentagePerSource, - - [System.String] - $MaxInboundConnectionPerSource, - - [System.Int32] - $MaxLocalHopCount, - - [System.Int32] - $MaxLogonFailures, - - [System.String] - $MaxMessageSize, - - [System.String] - $MaxProtocolErrors, - - [System.Int32] - $MaxRecipientsPerMessage, - - [System.String] - $MessageRateLimit, - - [ValidateSet("None","IPAddress","User","All")] - [System.String] - $MessageRateSource, - - [System.Boolean] - $OrarEnabled, - - [System.String[]] - $PermissionGroups, - - [System.Boolean] - $PipeliningEnabled, - - [ValidateSet("None","Verbose")] - [System.String] - $ProtocolLoggingLevel, - - [System.String[]] - $RemoteIPRanges, - - [System.Boolean] - $RequireEHLODomain, - - [System.Boolean] - $RequireTLS, - - [System.String] - $ServiceDiscoveryFqdn, - - [ValidateSet("Enabled","Disabled","EnabledWithoutValue")] - [System.String] - $SizeEnabled, - - [System.Boolean] - $SuppressXAnonymousTls, - - [System.String] - $TarpitInterval, - - [System.String] - $TlsCertificateName, - - [System.String[]] - $TlsDomainCapabilities, - - [ValidateSet("FrontendTransport","HubTransport")] - [System.String] - $TransportRole, - - [ValidateSet("Client","Internal","Internet","Partner","Custom")] - [System.String] - $Usage - ) - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - return (Get-ReceiveConnector @PSBoundParameters -ErrorAction SilentlyContinue) -} - -#Ensure that a connector Identity is in the proper form -function ValidateIdentity -{ - param([string]$Identity) - - if ([string]::IsNullOrEmpty($Identity) -or !($Identity.Contains("\"))) - { - throw "Identity must be in the format: 'SERVERNAME\Connector Name' (No quotes)" - } -} - -#check a connector for specific extended rights -function ExtendedRightExists -{ - [cmdletbinding()] - [OutputType([System.Boolean])] - param( - $ADPermissions, - [Microsoft.Management.Infrastructure.CimInstance[]]$ExtendedRights, - [boolean]$ShouldbeTrue, - $VerbosePreference - ) - $returnvalue = $false - foreach ($Right in $ExtendedRights) - { - foreach ($Value in $($Right.Value.Split(","))) - { - if ($null -ne ($ADPermissions | Where-Object {($_.User.RawIdentity -eq $Right.Key) -and ($_.ExtendedRights.RawIdentity -eq $Value)})) - { - $returnvalue = $true - if (!($ShouldbeTrue)) - { - Write-Verbose "Should report exist!" - ReportBadSetting -SettingName "ExtendedRight" -ExpectedValue "User:$($Right.Key) Value:$($Value)" -ActualValue "Present" -VerbosePreference $VerbosePreference - return $returnvalue - exit; - } - } - else - { - $returnvalue = $false - if ($ShouldbeTrue) - { - ReportBadSetting -SettingName "ExtendedRight" -ExpectedValue "User:$($Right.Key) Value:$($Value)" -ActualValue "Absent" -VerbosePreference $VerbosePreference - return $returnvalue - exit; - } - } - } - } -return $returnvalue -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchReceiveConnector/MSFT_xExchReceiveConnector.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchReceiveConnector/MSFT_xExchReceiveConnector.schema.mof deleted file mode 100644 index 372de2c2..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchReceiveConnector/MSFT_xExchReceiveConnector.schema.mof +++ /dev/null @@ -1,63 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchReceiveConnector")] -class MSFT_xExchReceiveConnector : OMI_BaseResource -{ - [Key] String Identity; //Identity of the Receive Connector. Needs to be in format 'SERVERNAME\CONNECTORNAME' (no quotes) - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - [Required, ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; //Whether the connector should be present or not - - //Remaining properties correspond directly to Set-ReceiveConnector parameters - //http://technet.microsoft.com/en-us/library/bb125140(v=exchg.150).aspx - [Write] Boolean AdvertiseClientSettings; - [Write] String AuthMechanism[]; - [Write] String Banner; - [Write] Boolean BareLinefeedRejectionEnabled; - [Write] Boolean BinaryMimeEnabled; - [Write] String Bindings[]; - [Write] Boolean ChunkingEnabled; - [Write] String Comment; - [Write] String ConnectionInactivityTimeout; - [Write] String ConnectionTimeout; - [Write] String DefaultDomain; - [Write] Boolean DeliveryStatusNotificationEnabled; - [Write] String DomainController; - [Write] Boolean DomainSecureEnabled; - [Write] Boolean EightBitMimeEnabled; - [Write] Boolean EnableAuthGSSAPI; - [Write] Boolean Enabled; - [Write] Boolean EnhancedStatusCodesEnabled; - [Write, EmbeddedInstance("MSFT_KeyValuePair")] String ExtendedRightAllowEntries[]; - [Write, EmbeddedInstance("MSFT_KeyValuePair")] String ExtendedRightDenyEntries[]; - [Write, ValueMap{"None","Allow","Require"}, Values{"None","Allow","Require"}] String ExtendedProtectionPolicy; - [Write] String Fqdn; - [Write] Boolean LongAddressesEnabled; - [Write] String MaxAcknowledgementDelay; - [Write] String MaxHeaderSize; - [Write] Sint32 MaxHopCount; - [Write] String MaxInboundConnection; - [Write] Sint32 MaxInboundConnectionPercentagePerSource; - [Write] String MaxInboundConnectionPerSource; - [Write] Sint32 MaxLocalHopCount; - [Write] Sint32 MaxLogonFailures; - [Write] String MaxMessageSize; - [Write] String MaxProtocolErrors; - [Write] Sint32 MaxRecipientsPerMessage; - [Write] String MessageRateLimit; - [Write, ValueMap{"None","IPAddress","User","All"}, Values{"None","IPAddress","User","All"}] String MessageRateSource; - [Write] Boolean OrarEnabled; - [Write] String PermissionGroups[]; - [Write] Boolean PipeliningEnabled; - [Write, ValueMap{"None","Verbose"}, Values{"None","Verbose"}] String ProtocolLoggingLevel; - [Write] String RemoteIPRanges[]; - [Write] Boolean RequireEHLODomain; - [Write] Boolean RequireTLS; - [Write] String ServiceDiscoveryFqdn; - [Write, ValueMap{"Enabled","Disabled","EnabledWithoutValue"}, Values{"Enabled","Disabled","EnabledWithoutValue"}] String SizeEnabled; - [Write] Boolean SuppressXAnonymousTls; - [Write] String TarpitInterval; - [Write] String TlsCertificateName; - [Write] String TlsDomainCapabilities[]; - [Write, ValueMap{"FrontendTransport","HubTransport"}, Values{"FrontendTransport","HubTransport"}] String TransportRole; - [Write, ValueMap{"Client","Internal","Internet","Partner","Custom"}, Values{"Client","Internal","Internet","Partner","Custom"}] String Usage; -}; - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchTransportService/MSFT_xExchTransportService.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchTransportService/MSFT_xExchTransportService.psm1 deleted file mode 100644 index 57b0b2d5..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchTransportService/MSFT_xExchTransportService.psm1 +++ /dev/null @@ -1,1562 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.String] - $ActiveUserStatisticsLogMaxAge, - - [System.String] - $ActiveUserStatisticsLogMaxDirectorySize, - - [System.String] - $ActiveUserStatisticsLogMaxFileSize, - - [System.String] - $ActiveUserStatisticsLogPath, - - [System.Boolean] - $AgentLogEnabled, - - [System.String] - $AgentLogMaxAge, - - [System.String] - $AgentLogMaxDirectorySize, - - [System.String] - $AgentLogMaxFileSize, - - [System.String] - $AgentLogPath, - - [System.Boolean] - $ConnectivityLogEnabled, - - [System.String] - $ConnectivityLogMaxAge, - - [System.String] - $ConnectivityLogMaxDirectorySize, - - [System.String] - $ConnectivityLogMaxFileSize, - - [System.String] - $ConnectivityLogPath, - - [System.Boolean] - $ContentConversionTracingEnabled, - - [System.String] - $DelayNotificationTimeout, - - [System.Boolean] - $DnsLogEnabled, - - [System.String] - $DnsLogMaxAge, - - [System.String] - $DnsLogMaxDirectorySize, - - [System.String] - $DnsLogMaxFileSize, - - [System.String] - $DnsLogPath, - - [System.Boolean] - $ExternalDNSAdapterEnabled, - - [System.String] - $ExternalDNSAdapterGuid, - - [ValidateSet("Any","UseTcpOnly","UseUdpOnly")] - [System.String] - $ExternalDNSProtocolOption, - - [System.String[]] - $ExternalDNSServers, - - [System.String] - $ExternalIPAddress, - - [System.Boolean] - $InternalDNSAdapterEnabled, - - [System.String] - $InternalDNSAdapterGuid, - - [ValidateSet("Any","UseTcpOnly","UseUdpOnly")] - [System.String] - $InternalDNSProtocolOption, - - [System.String[]] - $InternalDNSServers, - - [ValidateSet("None","Verbose")] - [System.String] - $IntraOrgConnectorProtocolLoggingLevel, - - [System.Int32] - $IntraOrgConnectorSmtpMaxMessagesPerConnection, - - [System.Boolean] - $IrmLogEnabled, - - [System.String] - $IrmLogMaxAge, - - [System.String] - $IrmLogMaxDirectorySize, - - [System.String] - $IrmLogMaxFileSize, - - [System.String] - $IrmLogPath, - - [System.Int32] - $MaxConcurrentMailboxDeliveries, - - [System.Int32] - $MaxConcurrentMailboxSubmissions, - - [System.Int32] - $MaxConnectionRatePerMinute, - - [ValidateRange(1,2147483647)] - [System.String] - $MaxOutboundConnections, - - [ValidateRange(1,2147483647)] - [System.String] - $MaxPerDomainOutboundConnections, - - [System.String] - $MessageExpirationTimeout, - - [System.String] - $MessageRetryInterval, - - [System.Boolean] - $MessageTrackingLogEnabled, - - [System.String] - $MessageTrackingLogMaxAge, - - [System.String] - $MessageTrackingLogMaxDirectorySize, - - [System.String] - $MessageTrackingLogMaxFileSize, - - [System.String] - $MessageTrackingLogPath, - - [System.Boolean] - $MessageTrackingLogSubjectLoggingEnabled, - - [System.String] - $OutboundConnectionFailureRetryInterval, - - [System.String] - $PickupDirectoryMaxHeaderSize, - - [ValidateRange(1,20000)] - [System.Int32] - $PickupDirectoryMaxMessagesPerMinute, - - [ValidateRange(1,10000)] - [System.Int32] - $PickupDirectoryMaxRecipientsPerMessage, - - [System.String] - $PickupDirectoryPath, - - [System.Boolean] - $PipelineTracingEnabled, - - [System.String] - $PipelineTracingPath, - - [System.String] - $PipelineTracingSenderAddress, - - [System.Boolean] - $PoisonMessageDetectionEnabled, - - [ValidateRange(1,10)] - [System.Int32] - $PoisonThreshold, - - [System.String] - $QueueLogMaxAge, - - [System.String] - $QueueLogMaxDirectorySize, - - [System.String] - $QueueLogMaxFileSize, - - [System.String] - $QueueLogPath, - - [System.String] - $QueueMaxIdleTime, - - [System.String] - $ReceiveProtocolLogMaxAge, - - [System.String] - $ReceiveProtocolLogMaxDirectorySize, - - [System.String] - $ReceiveProtocolLogMaxFileSize, - - [System.String] - $ReceiveProtocolLogPath, - - [System.Boolean] - $RecipientValidationCacheEnabled, - - [System.String] - $ReplayDirectoryPath, - - [System.String] - $RootDropDirectoryPath, - - [System.String] - $RoutingTableLogMaxAge, - - [System.String] - $RoutingTableLogMaxDirectorySize, - - [System.String] - $RoutingTableLogPath, - - [System.String] - $SendProtocolLogMaxAge, - - [System.String] - $SendProtocolLogMaxDirectorySize, - - [System.String] - $SendProtocolLogMaxFileSize, - - [System.String] - $SendProtocolLogPath, - - [System.String] - $ServerStatisticsLogMaxAge, - - [System.String] - $ServerStatisticsLogMaxDirectorySize, - - [System.String] - $ServerStatisticsLogMaxFileSize, - - [System.String] - $ServerStatisticsLogPath, - - [ValidateRange(1,15)] - [System.Int32] - $TransientFailureRetryCount, - - [System.String] - $TransientFailureRetryInterval, - - [System.Boolean] - $UseDowngradedExchangeServerAuth - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-TransportService" -VerbosePreference $VerbosePreference - - #Remove Credential and Ensure so we don't pass it into the next command - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Credential","AllowServiceRestart" - - $TransportService = Get-TransportService $Identity -ErrorAction SilentlyContinue - if ($null -ne $TransportService) - { - $returnValue = @{ - Identity = $Identity - ActiveUserStatisticsLogMaxAge = $TransportService.ActiveUserStatisticsLogMaxAge - ActiveUserStatisticsLogMaxDirectorySize = $TransportService.ActiveUserStatisticsLogMaxDirectorySize - ActiveUserStatisticsLogMaxFileSize = $TransportService.ActiveUserStatisticsLogMaxFileSize - ActiveUserStatisticsLogPath = $TransportService.ActiveUserStatisticsLogPath - AgentLogEnabled = $TransportService.AgentLogEnabled - AgentLogMaxAge = $TransportService.AgentLogMaxAge - AgentLogMaxDirectorySize = $TransportService.AgentLogMaxDirectorySize - AgentLogMaxFileSize = $TransportService.AgentLogMaxFileSize - AgentLogPath = $TransportService.AgentLogPath - ConnectivityLogEnabled = $TransportService.ConnectivityLogEnabled - ConnectivityLogMaxAge = $TransportService.ConnectivityLogMaxAge - ConnectivityLogMaxDirectorySize = $TransportService.ConnectivityLogMaxDirectorySize - ConnectivityLogMaxFileSize = $TransportService.ConnectivityLogMaxFileSize - ConnectivityLogPath = $TransportService.ConnectivityLogPath - ContentConversionTracingEnabled = $TransportService.ContentConversionTracingEnabled - DelayNotificationTimeout = $TransportService.DelayNotificationTimeout - DnsLogEnabled = $TransportService.DnsLogEnabled - DnsLogMaxAge = $TransportService.DnsLogMaxAge - DnsLogMaxDirectorySize = $TransportService.DnsLogMaxDirectorySize - DnsLogMaxFileSize = $TransportService.DnsLogMaxFileSize - DnsLogPath = $TransportService.DnsLogPath - ExternalDNSAdapterEnabled = $TransportService.ExternalDNSAdapterEnabled - ExternalDNSAdapterGuid = $TransportService.ExternalDNSAdapterGuid - ExternalDNSProtocolOption = $TransportService.ExternalDNSProtocolOption - ExternalDNSServers = $TransportService.ExternalDNSServers.IPAddressToString - ExternalIPAddress = $TransportService.ExternalIPAddress - InternalDNSAdapterEnabled = $TransportService.InternalDNSAdapterEnabled - InternalDNSAdapterGuid = $TransportService.InternalDNSAdapterGuid - InternalDNSProtocolOption = $TransportService.InternalDNSProtocolOption - InternalDNSServers = $TransportService.InternalDNSServers.IPAddressToString - IntraOrgConnectorProtocolLoggingLevel = $TransportService.IntraOrgConnectorProtocolLoggingLevel - IntraOrgConnectorSmtpMaxMessagesPerConnection = $TransportService.IntraOrgConnectorSmtpMaxMessagesPerConnection - IrmLogEnabled = $TransportService.IrmLogEnabled - IrmLogMaxAge = $TransportService.IrmLogMaxAge - IrmLogMaxDirectorySize = $TransportService.IrmLogMaxDirectorySize - IrmLogMaxFileSize = $TransportService.IrmLogMaxFileSize - IrmLogPath = $TransportService.IrmLogPath - MaxConcurrentMailboxDeliveries = $TransportService.MaxConcurrentMailboxDeliveries - MaxConcurrentMailboxSubmissions = $TransportService.MaxConcurrentMailboxSubmissions - MaxConnectionRatePerMinute = $TransportService.MaxConnectionRatePerMinute - MaxOutboundConnections = $TransportService.MaxOutboundConnections - MaxPerDomainOutboundConnections = $TransportService.MaxPerDomainOutboundConnections - MessageExpirationTimeout = $TransportService.MessageExpirationTimeout - MessageRetryInterval = $TransportService.MessageRetryInterval - MessageTrackingLogEnabled = $TransportService.MessageTrackingLogEnabled - MessageTrackingLogMaxAge = $TransportService.MessageTrackingLogMaxAge - MessageTrackingLogMaxDirectorySize = $TransportService.MessageTrackingLogMaxDirectorySize - MessageTrackingLogMaxFileSize = $TransportService.MessageTrackingLogMaxFileSize - MessageTrackingLogPath = $TransportService.MessageTrackingLogPath - MessageTrackingLogSubjectLoggingEnabled = $TransportService.MessageTrackingLogSubjectLoggingEnabled - OutboundConnectionFailureRetryInterval = $TransportService.OutboundConnectionFailureRetryInterval - PickupDirectoryMaxHeaderSize = $TransportService.PickupDirectoryMaxHeaderSize - PickupDirectoryMaxMessagesPerMinute = $TransportService.PickupDirectoryMaxMessagesPerMinute - PickupDirectoryMaxRecipientsPerMessage = $TransportService.PickupDirectoryMaxRecipientsPerMessage - PickupDirectoryPath = $TransportService.PickupDirectoryPath - PipelineTracingEnabled = $TransportService.PipelineTracingEnabled - PipelineTracingPath = $TransportService.PipelineTracingPath - PipelineTracingSenderAddress = $TransportService.PipelineTracingSenderAddress - PoisonMessageDetectionEnabled = $TransportService.PoisonMessageDetectionEnabled - PoisonThreshold = $TransportService.PoisonThreshold - QueueLogMaxAge = $TransportService.QueueLogMaxAge - QueueLogMaxDirectorySize = $TransportService.QueueLogMaxDirectorySize - QueueLogMaxFileSize = $TransportService.QueueLogMaxFileSize - QueueLogPath = $TransportService.QueueLogPath - QueueMaxIdleTime = $TransportService.QueueMaxIdleTime - ReceiveProtocolLogMaxAge = $TransportService.ReceiveProtocolLogMaxAge - ReceiveProtocolLogMaxDirectorySize = $TransportService.ReceiveProtocolLogMaxDirectorySize - ReceiveProtocolLogMaxFileSize = $TransportService.ReceiveProtocolLogMaxFileSize - ReceiveProtocolLogPath = $TransportService.ReceiveProtocolLogPath - RecipientValidationCacheEnabled = $TransportService.RecipientValidationCacheEnabled - ReplayDirectoryPath = $TransportService.ReplayDirectoryPath - RootDropDirectoryPath = $TransportService.RootDropDirectoryPath - RoutingTableLogMaxAge = $TransportService.RoutingTableLogMaxAge - RoutingTableLogMaxDirectorySize = $TransportService.RoutingTableLogMaxDirectorySize - RoutingTableLogPath = $TransportService.RoutingTableLogPath - SendProtocolLogMaxAge = $TransportService.SendProtocolLogMaxAge - SendProtocolLogMaxDirectorySize = $TransportService.SendProtocolLogMaxDirectorySize - SendProtocolLogMaxFileSize = $TransportService.SendProtocolLogMaxFileSize - SendProtocolLogPath = $TransportService.SendProtocolLogPath - ServerStatisticsLogMaxAge = $TransportService.ServerStatisticsLogMaxAge - ServerStatisticsLogMaxDirectorySize = $TransportService.ServerStatisticsLogMaxDirectorySize - ServerStatisticsLogMaxFileSize = $TransportService.ServerStatisticsLogMaxFileSize - ServerStatisticsLogPath = $TransportService.ServerStatisticsLogPath - TransientFailureRetryCount = $TransportService.TransientFailureRetryCount - TransientFailureRetryInterval = $TransportService.TransientFailureRetryInterval.ToString() - UseDowngradedExchangeServerAuth = $TransportService.UseDowngradedExchangeServerAuth - } - } - $returnValue -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.String] - $ActiveUserStatisticsLogMaxAge, - - [System.String] - $ActiveUserStatisticsLogMaxDirectorySize, - - [System.String] - $ActiveUserStatisticsLogMaxFileSize, - - [System.String] - $ActiveUserStatisticsLogPath, - - [System.Boolean] - $AgentLogEnabled, - - [System.String] - $AgentLogMaxAge, - - [System.String] - $AgentLogMaxDirectorySize, - - [System.String] - $AgentLogMaxFileSize, - - [System.String] - $AgentLogPath, - - [System.Boolean] - $ConnectivityLogEnabled, - - [System.String] - $ConnectivityLogMaxAge, - - [System.String] - $ConnectivityLogMaxDirectorySize, - - [System.String] - $ConnectivityLogMaxFileSize, - - [System.String] - $ConnectivityLogPath, - - [System.Boolean] - $ContentConversionTracingEnabled, - - [System.String] - $DelayNotificationTimeout, - - [System.Boolean] - $DnsLogEnabled, - - [System.String] - $DnsLogMaxAge, - - [System.String] - $DnsLogMaxDirectorySize, - - [System.String] - $DnsLogMaxFileSize, - - [System.String] - $DnsLogPath, - - [System.Boolean] - $ExternalDNSAdapterEnabled, - - [System.String] - $ExternalDNSAdapterGuid, - - [ValidateSet("Any","UseTcpOnly","UseUdpOnly")] - [System.String] - $ExternalDNSProtocolOption, - - [System.String[]] - $ExternalDNSServers, - - [System.String] - $ExternalIPAddress, - - [System.Boolean] - $InternalDNSAdapterEnabled, - - [System.String] - $InternalDNSAdapterGuid, - - [ValidateSet("Any","UseTcpOnly","UseUdpOnly")] - [System.String] - $InternalDNSProtocolOption, - - [System.String[]] - $InternalDNSServers, - - [ValidateSet("None","Verbose")] - [System.String] - $IntraOrgConnectorProtocolLoggingLevel, - - [System.Int32] - $IntraOrgConnectorSmtpMaxMessagesPerConnection, - - [System.Boolean] - $IrmLogEnabled, - - [System.String] - $IrmLogMaxAge, - - [System.String] - $IrmLogMaxDirectorySize, - - [System.String] - $IrmLogMaxFileSize, - - [System.String] - $IrmLogPath, - - [System.Int32] - $MaxConcurrentMailboxDeliveries, - - [System.Int32] - $MaxConcurrentMailboxSubmissions, - - [System.Int32] - $MaxConnectionRatePerMinute, - - [ValidateRange(1,2147483647)] - [System.String] - $MaxOutboundConnections, - - [ValidateRange(1,2147483647)] - [System.String] - $MaxPerDomainOutboundConnections, - - [System.String] - $MessageExpirationTimeout, - - [System.String] - $MessageRetryInterval, - - [System.Boolean] - $MessageTrackingLogEnabled, - - [System.String] - $MessageTrackingLogMaxAge, - - [System.String] - $MessageTrackingLogMaxDirectorySize, - - [System.String] - $MessageTrackingLogMaxFileSize, - - [System.String] - $MessageTrackingLogPath, - - [System.Boolean] - $MessageTrackingLogSubjectLoggingEnabled, - - [System.String] - $OutboundConnectionFailureRetryInterval, - - [System.String] - $PickupDirectoryMaxHeaderSize, - - [ValidateRange(1,20000)] - [System.Int32] - $PickupDirectoryMaxMessagesPerMinute, - - [ValidateRange(1,10000)] - [System.Int32] - $PickupDirectoryMaxRecipientsPerMessage, - - [System.String] - $PickupDirectoryPath, - - [System.Boolean] - $PipelineTracingEnabled, - - [System.String] - $PipelineTracingPath, - - [System.String] - $PipelineTracingSenderAddress, - - [System.Boolean] - $PoisonMessageDetectionEnabled, - - [ValidateRange(1,10)] - [System.Int32] - $PoisonThreshold, - - [System.String] - $QueueLogMaxAge, - - [System.String] - $QueueLogMaxDirectorySize, - - [System.String] - $QueueLogMaxFileSize, - - [System.String] - $QueueLogPath, - - [System.String] - $QueueMaxIdleTime, - - [System.String] - $ReceiveProtocolLogMaxAge, - - [System.String] - $ReceiveProtocolLogMaxDirectorySize, - - [System.String] - $ReceiveProtocolLogMaxFileSize, - - [System.String] - $ReceiveProtocolLogPath, - - [System.Boolean] - $RecipientValidationCacheEnabled, - - [System.String] - $ReplayDirectoryPath, - - [System.String] - $RootDropDirectoryPath, - - [System.String] - $RoutingTableLogMaxAge, - - [System.String] - $RoutingTableLogMaxDirectorySize, - - [System.String] - $RoutingTableLogPath, - - [System.String] - $SendProtocolLogMaxAge, - - [System.String] - $SendProtocolLogMaxDirectorySize, - - [System.String] - $SendProtocolLogMaxFileSize, - - [System.String] - $SendProtocolLogPath, - - [System.String] - $ServerStatisticsLogMaxAge, - - [System.String] - $ServerStatisticsLogMaxDirectorySize, - - [System.String] - $ServerStatisticsLogMaxFileSize, - - [System.String] - $ServerStatisticsLogPath, - - [ValidateRange(1,15)] - [System.Int32] - $TransientFailureRetryCount, - - [System.String] - $TransientFailureRetryInterval, - - [System.Boolean] - $UseDowngradedExchangeServerAuth - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Set-TransportService" -VerbosePreference $VerbosePreference - - #Remove Credential and Ensure so we don't pass it into the next command - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Credential","AllowServiceRestart" - - try - { - - #if PipelineTracingSenderAddress exists and is $null remove it from $PSBoundParameters and add argument - if ($PSBoundParameters.ContainsKey('PipelineTracingSenderAddress')) - { - if ([string]::IsNullOrEmpty($PipelineTracingSenderAddress)) - { - Write-Verbose "PipelineTracingSenderAddress is NULL" - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "PipelineTracingSenderAddress" - $Arguments += '-PipelineTracingSenderAddress $null ' - } - } - - #if ExternalIPAddress exists and is $null remove it from $PSBoundParameters and add argument - if ($PSBoundParameters.ContainsKey('ExternalIPAddress')) - { - if ([string]::IsNullOrEmpty($ExternalIPAddress)) - { - Write-Verbose "ExternalIPAddress is NULL" - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "ExternalIPAddress" - $Arguments += '-ExternalIPAddress $null ' - } - } - - #if InternalDNSServers exists and is $null remove it from $PSBoundParameters and add argument - if ($PSBoundParameters.ContainsKey('InternalDNSServers')) - { - if ([string]::IsNullOrEmpty($InternalDNSServers)) - { - Write-Verbose "InternalDNSServers is NULL" - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "InternalDNSServers" - $Arguments += '-InternalDNSServers $null ' - } - } - - #if ExternalDNSServers exists and is $null remove it from $PSBoundParameters and add argument - if ($PSBoundParameters.ContainsKey('ExternalDNSServers')) - { - if ([string]::IsNullOrEmpty($ExternalDNSServers)) - { - Write-Verbose "ExternalDNSServers is NULL" - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "ExternalDNSServers" - $Arguments += '-ExternalDNSServers $null ' - } - } - - if ($arguments) - { - $expression = 'Set-TransportService @PSBoundParameters '+$Arguments - Invoke-Expression $expression - } - else - { - Set-TransportService @PSBoundParameters - } - } - catch - { - Write-Verbose "The following exception was thrown:$($_.Exception.Message)" - } - - if ($AllowServiceRestart -eq $true) - { - Write-Verbose "Restart service MSExchangeTransport" - Restart-Service -Name MSExchangeTransport -WarningAction SilentlyContinue - } - Else - { - Write-Warning "The configuration will not take effect until the MSExchangeTransport service is manually restarted." - } - -} - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.String] - $ActiveUserStatisticsLogMaxAge, - - [System.String] - $ActiveUserStatisticsLogMaxDirectorySize, - - [System.String] - $ActiveUserStatisticsLogMaxFileSize, - - [System.String] - $ActiveUserStatisticsLogPath, - - [System.Boolean] - $AgentLogEnabled, - - [System.String] - $AgentLogMaxAge, - - [System.String] - $AgentLogMaxDirectorySize, - - [System.String] - $AgentLogMaxFileSize, - - [System.String] - $AgentLogPath, - - [System.Boolean] - $ConnectivityLogEnabled, - - [System.String] - $ConnectivityLogMaxAge, - - [System.String] - $ConnectivityLogMaxDirectorySize, - - [System.String] - $ConnectivityLogMaxFileSize, - - [System.String] - $ConnectivityLogPath, - - [System.Boolean] - $ContentConversionTracingEnabled, - - [System.String] - $DelayNotificationTimeout, - - [System.Boolean] - $DnsLogEnabled, - - [System.String] - $DnsLogMaxAge, - - [System.String] - $DnsLogMaxDirectorySize, - - [System.String] - $DnsLogMaxFileSize, - - [System.String] - $DnsLogPath, - - [System.Boolean] - $ExternalDNSAdapterEnabled, - - [System.String] - $ExternalDNSAdapterGuid, - - [ValidateSet("Any","UseTcpOnly","UseUdpOnly")] - [System.String] - $ExternalDNSProtocolOption, - - [System.String[]] - $ExternalDNSServers, - - [System.String] - $ExternalIPAddress, - - [System.Boolean] - $InternalDNSAdapterEnabled, - - [System.String] - $InternalDNSAdapterGuid, - - [ValidateSet("Any","UseTcpOnly","UseUdpOnly")] - [System.String] - $InternalDNSProtocolOption, - - [System.String[]] - $InternalDNSServers, - - [ValidateSet("None","Verbose")] - [System.String] - $IntraOrgConnectorProtocolLoggingLevel, - - [System.Int32] - $IntraOrgConnectorSmtpMaxMessagesPerConnection, - - [System.Boolean] - $IrmLogEnabled, - - [System.String] - $IrmLogMaxAge, - - [System.String] - $IrmLogMaxDirectorySize, - - [System.String] - $IrmLogMaxFileSize, - - [System.String] - $IrmLogPath, - - [System.Int32] - $MaxConcurrentMailboxDeliveries, - - [System.Int32] - $MaxConcurrentMailboxSubmissions, - - [System.Int32] - $MaxConnectionRatePerMinute, - - [ValidateRange(1,2147483647)] - [System.String] - $MaxOutboundConnections, - - [ValidateRange(1,2147483647)] - [System.String] - $MaxPerDomainOutboundConnections, - - [System.String] - $MessageExpirationTimeout, - - [System.String] - $MessageRetryInterval, - - [System.Boolean] - $MessageTrackingLogEnabled, - - [System.String] - $MessageTrackingLogMaxAge, - - [System.String] - $MessageTrackingLogMaxDirectorySize, - - [System.String] - $MessageTrackingLogMaxFileSize, - - [System.String] - $MessageTrackingLogPath, - - [System.Boolean] - $MessageTrackingLogSubjectLoggingEnabled, - - [System.String] - $OutboundConnectionFailureRetryInterval, - - [System.String] - $PickupDirectoryMaxHeaderSize, - - [ValidateRange(1,20000)] - [System.Int32] - $PickupDirectoryMaxMessagesPerMinute, - - [ValidateRange(1,10000)] - [System.Int32] - $PickupDirectoryMaxRecipientsPerMessage, - - [System.String] - $PickupDirectoryPath, - - [System.Boolean] - $PipelineTracingEnabled, - - [System.String] - $PipelineTracingPath, - - [System.String] - $PipelineTracingSenderAddress, - - [System.Boolean] - $PoisonMessageDetectionEnabled, - - [ValidateRange(1,10)] - [System.Int32] - $PoisonThreshold, - - [System.String] - $QueueLogMaxAge, - - [System.String] - $QueueLogMaxDirectorySize, - - [System.String] - $QueueLogMaxFileSize, - - [System.String] - $QueueLogPath, - - [System.String] - $QueueMaxIdleTime, - - [System.String] - $ReceiveProtocolLogMaxAge, - - [System.String] - $ReceiveProtocolLogMaxDirectorySize, - - [System.String] - $ReceiveProtocolLogMaxFileSize, - - [System.String] - $ReceiveProtocolLogPath, - - [System.Boolean] - $RecipientValidationCacheEnabled, - - [System.String] - $ReplayDirectoryPath, - - [System.String] - $RootDropDirectoryPath, - - [System.String] - $RoutingTableLogMaxAge, - - [System.String] - $RoutingTableLogMaxDirectorySize, - - [System.String] - $RoutingTableLogPath, - - [System.String] - $SendProtocolLogMaxAge, - - [System.String] - $SendProtocolLogMaxDirectorySize, - - [System.String] - $SendProtocolLogMaxFileSize, - - [System.String] - $SendProtocolLogPath, - - [System.String] - $ServerStatisticsLogMaxAge, - - [System.String] - $ServerStatisticsLogMaxDirectorySize, - - [System.String] - $ServerStatisticsLogMaxFileSize, - - [System.String] - $ServerStatisticsLogPath, - - [ValidateRange(1,15)] - [System.Int32] - $TransientFailureRetryCount, - - [System.String] - $TransientFailureRetryInterval, - - [System.Boolean] - $UseDowngradedExchangeServerAuth - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-TransportService" -VerbosePreference $VerbosePreference - - $TransportService = Get-TransportService $Identity -ErrorAction SilentlyContinue - - if ($null -ne $TransportService) - { - - if (!(VerifySetting -Name "ActiveUserStatisticsLogMaxAge" -Type "Timespan" -ExpectedValue $ActiveUserStatisticsLogMaxAge -ActualValue $TransportService.ActiveUserStatisticsLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ActiveUserStatisticsLogMaxDirectorySize" -Type "ByteQuantifiedSize" -ExpectedValue $ActiveUserStatisticsLogMaxDirectorySize -ActualValue $TransportService.ActiveUserStatisticsLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ActiveUserStatisticsLogMaxFileSize" -Type "ByteQuantifiedSize" -ExpectedValue $ActiveUserStatisticsLogMaxFileSize -ActualValue $TransportService.ActiveUserStatisticsLogMaxFileSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ActiveUserStatisticsLogPath" -Type "String" -ExpectedValue $ActiveUserStatisticsLogPath -ActualValue $TransportService.ActiveUserStatisticsLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "AgentLogEnabled" -Type "Boolean" -ExpectedValue $AgentLogEnabled -ActualValue $TransportService.AgentLogEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "AgentLogMaxAge" -Type "Timespan" -ExpectedValue $AgentLogMaxAge -ActualValue $TransportService.AgentLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "AgentLogMaxDirectorySize" -Type "Unlimited" -ExpectedValue $AgentLogMaxDirectorySize -ActualValue $TransportService.AgentLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "AgentLogMaxFileSize" -Type "Unlimited" -ExpectedValue $AgentLogMaxFileSize -ActualValue $TransportService.AgentLogMaxFileSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "AgentLogPath" -Type "String" -ExpectedValue $AgentLogPath -ActualValue $TransportService.AgentLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ConnectivityLogEnabled" -Type "Boolean" -ExpectedValue $ConnectivityLogEnabled -ActualValue $TransportService.ConnectivityLogEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ConnectivityLogMaxAge" -Type "Timespan" -ExpectedValue $ConnectivityLogMaxAge -ActualValue $TransportService.ConnectivityLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ConnectivityLogMaxDirectorySize" -Type "Unlimited" -ExpectedValue $ConnectivityLogMaxDirectorySize -ActualValue $TransportService.ConnectivityLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ConnectivityLogMaxFileSize" -Type "Unlimited" -ExpectedValue $ConnectivityLogMaxFileSize -ActualValue $TransportService.ConnectivityLogMaxFileSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ConnectivityLogPath" -Type "String" -ExpectedValue $ConnectivityLogPath -ActualValue $TransportService.ConnectivityLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ContentConversionTracingEnabled" -Type "Boolean" -ExpectedValue $ContentConversionTracingEnabled -ActualValue $TransportService.ContentConversionTracingEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "DelayNotificationTimeout" -Type "TimeSpan" -ExpectedValue $DelayNotificationTimeout -ActualValue $TransportService.DelayNotificationTimeout -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "DnsLogEnabled" -Type "Boolean" -ExpectedValue $DnsLogEnabled -ActualValue $TransportService.DnsLogEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "DnsLogMaxAge" -Type "TimeSpan" -ExpectedValue $DnsLogMaxAge -ActualValue $TransportService.DnsLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "DnsLogMaxDirectorySize" -Type "Unlimited" -ExpectedValue $DnsLogMaxDirectorySize -ActualValue $TransportService.DnsLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "DnsLogMaxFileSize" -Type "Unlimited" -ExpectedValue $DnsLogMaxFileSize -ActualValue $TransportService.DnsLogMaxFileSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "DnsLogPath" -Type "String" -ExpectedValue $DnsLogPath -ActualValue $TransportService.DnsLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExternalDNSAdapterEnabled" -Type "Boolean" -ExpectedValue $ExternalDNSAdapterEnabled -ActualValue $TransportService.ExternalDNSAdapterEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExternalDNSAdapterGuid" -Type "String" -ExpectedValue $ExternalDNSAdapterGuid -ActualValue $TransportService.ExternalDNSAdapterGuid -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExternalDNSProtocolOption" -Type "String" -ExpectedValue $ExternalDNSProtocolOption -ActualValue $TransportService.ExternalDNSProtocolOption -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExternalDNSServers" -Type "IPAddresses" -ExpectedValue $ExternalDNSServers -ActualValue $TransportService.ExternalDNSServers.IPAddressToString -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExternalIPAddress" -Type "IPAddress" -ExpectedValue $ExternalIPAddress -ActualValue $TransportService.ExternalIPAddress -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "InternalDNSAdapterEnabled" -Type "Boolean" -ExpectedValue $InternalDNSAdapterEnabled -ActualValue $TransportService.InternalDNSAdapterEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "InternalDNSAdapterGuid" -Type "String" -ExpectedValue $InternalDNSAdapterGuid -ActualValue $TransportService.InternalDNSAdapterGuid -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "InternalDNSProtocolOption" -Type "String" -ExpectedValue $InternalDNSProtocolOption -ActualValue $TransportService.InternalDNSProtocolOption -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "InternalDNSServers" -Type "IPAddresses" -ExpectedValue $InternalDNSServers -ActualValue $TransportService.InternalDNSServers.IPAddressToString -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "IntraOrgConnectorProtocolLoggingLevel" -Type "String" -ExpectedValue $IntraOrgConnectorProtocolLoggingLevel -ActualValue $TransportService.IntraOrgConnectorProtocolLoggingLevel -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "IntraOrgConnectorSmtpMaxMessagesPerConnection" -Type "Int" -ExpectedValue $IntraOrgConnectorSmtpMaxMessagesPerConnection -ActualValue $TransportService.IntraOrgConnectorSmtpMaxMessagesPerConnection -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "IrmLogEnabled" -Type "Boolean" -ExpectedValue $IrmLogEnabled -ActualValue $TransportService.IrmLogEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "IrmLogMaxAge" -Type "TimeSpan" -ExpectedValue $IrmLogMaxAge -ActualValue $TransportService.IrmLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "IrmLogMaxDirectorySize" -Type "Unlimited" -ExpectedValue $IrmLogMaxDirectorySize -ActualValue $TransportService.IrmLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "IrmLogMaxFileSize" -Type "ByteQuantifiedSize" -ExpectedValue $IrmLogMaxFileSize -ActualValue $TransportService.IrmLogMaxFileSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "IrmLogPath" -Type "String" -ExpectedValue $IrmLogPath -ActualValue $TransportService.IrmLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MaxConcurrentMailboxDeliveries" -Type "Int" -ExpectedValue $MaxConcurrentMailboxDeliveries -ActualValue $TransportService.MaxConcurrentMailboxDeliveries -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MaxConcurrentMailboxSubmissions" -Type "Int" -ExpectedValue $MaxConcurrentMailboxSubmissions -ActualValue $TransportService.MaxConcurrentMailboxSubmissions -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MaxConnectionRatePerMinute" -Type "Int" -ExpectedValue $MaxConnectionRatePerMinute -ActualValue $TransportService.MaxConnectionRatePerMinute -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MaxOutboundConnections" -Type "Unlimited" -ExpectedValue $MaxOutboundConnections -ActualValue $TransportService.MaxOutboundConnections -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MaxPerDomainOutboundConnections" -Type "Unlimited" -ExpectedValue $MaxPerDomainOutboundConnections -ActualValue $TransportService.MaxPerDomainOutboundConnections -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MessageExpirationTimeout" -Type "TimeSpan" -ExpectedValue $MessageExpirationTimeout -ActualValue $TransportService.MessageExpirationTimeout -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MessageRetryInterval" -Type "TimeSpan" -ExpectedValue $MessageRetryInterval -ActualValue $TransportService.MessageRetryInterval -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MessageTrackingLogEnabled" -Type "Boolean" -ExpectedValue $MessageTrackingLogEnabled -ActualValue $TransportService.MessageTrackingLogEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MessageTrackingLogMaxAge" -Type "TimeSpan" -ExpectedValue $MessageTrackingLogMaxAge -ActualValue $TransportService.MessageTrackingLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MessageTrackingLogMaxDirectorySize" -Type "Unlimited" -ExpectedValue $MessageTrackingLogMaxDirectorySize -ActualValue $TransportService.MessageTrackingLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MessageTrackingLogMaxFileSize" -Type "ByteQuantifiedSize" -ExpectedValue $MessageTrackingLogMaxFileSize -ActualValue $TransportService.MessageTrackingLogMaxFileSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MessageTrackingLogPath" -Type "String" -ExpectedValue $MessageTrackingLogPath -ActualValue $TransportService.MessageTrackingLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "MessageTrackingLogSubjectLoggingEnabled" -Type "Boolean" -ExpectedValue $MessageTrackingLogSubjectLoggingEnabled -ActualValue $TransportService.MessageTrackingLogSubjectLoggingEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "OutboundConnectionFailureRetryInterval" -Type "TimeSpan" -ExpectedValue $OutboundConnectionFailureRetryInterval -ActualValue $TransportService.OutboundConnectionFailureRetryInterval -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "PickupDirectoryMaxHeaderSize" -Type "ByteQuantifiedSize" -ExpectedValue $PickupDirectoryMaxHeaderSize -ActualValue $TransportService.PickupDirectoryMaxHeaderSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "PickupDirectoryMaxMessagesPerMinute" -Type "Int" -ExpectedValue $PickupDirectoryMaxMessagesPerMinute -ActualValue $TransportService.PickupDirectoryMaxMessagesPerMinute -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "PickupDirectoryMaxRecipientsPerMessage" -Type "Int" -ExpectedValue $PickupDirectoryMaxRecipientsPerMessage -ActualValue $TransportService.PickupDirectoryMaxRecipientsPerMessage -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "PickupDirectoryPath" -Type "String" -ExpectedValue $PickupDirectoryPath -ActualValue $TransportService.PickupDirectoryPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "PipelineTracingEnabled" -Type "Boolean" -ExpectedValue $PipelineTracingEnabled -ActualValue $TransportService.PipelineTracingEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "PipelineTracingPath" -Type "String" -ExpectedValue $PipelineTracingPath -ActualValue $TransportService.PipelineTracingPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - - if (!(VerifySetting -Name "PipelineTracingSenderAddress" -Type "SMTPAddress" -ExpectedValue $PipelineTracingSenderAddress -ActualValue $TransportService.PipelineTracingSenderAddress -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "PoisonMessageDetectionEnabled" -Type "Boolean" -ExpectedValue $PoisonMessageDetectionEnabled -ActualValue $TransportService.PoisonMessageDetectionEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "PoisonThreshold" -Type "Int" -ExpectedValue $PoisonThreshold -ActualValue $TransportService.PoisonThreshold -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "QueueLogMaxAge" -Type "TimeSpan" -ExpectedValue $QueueLogMaxAge -ActualValue $TransportService.QueueLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "QueueLogMaxDirectorySize" -Type "Unlimited" -ExpectedValue $QueueLogMaxDirectorySize -ActualValue $TransportService.QueueLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "QueueLogMaxFileSize" -Type "Unlimited" -ExpectedValue $QueueLogMaxFileSize -ActualValue $TransportService.QueueLogMaxFileSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "QueueLogPath" -Type "String" -ExpectedValue $QueueLogPath -ActualValue $TransportService.QueueLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "QueueMaxIdleTime" -Type "TimeSpan" -ExpectedValue $QueueMaxIdleTime -ActualValue $TransportService.QueueMaxIdleTime -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ReceiveProtocolLogMaxAge" -Type "TimeSpan" -ExpectedValue $ReceiveProtocolLogMaxAge -ActualValue $TransportService.ReceiveProtocolLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ReceiveProtocolLogMaxDirectorySize" -Type "Unlimited" -ExpectedValue $ReceiveProtocolLogMaxDirectorySize -ActualValue $TransportService.ReceiveProtocolLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ReceiveProtocolLogMaxFileSize" -Type "Unlimited" -ExpectedValue $ReceiveProtocolLogMaxFileSize -ActualValue $TransportService.ReceiveProtocolLogMaxFileSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ReceiveProtocolLogPath" -Type "String" -ExpectedValue $ReceiveProtocolLogPath -ActualValue $TransportService.ReceiveProtocolLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "RecipientValidationCacheEnabled" -Type "Boolean" -ExpectedValue $RecipientValidationCacheEnabled -ActualValue $TransportService.RecipientValidationCacheEnabled -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - if (!(VerifySetting -Name "ReplayDirectoryPath" -Type "String" -ExpectedValue $ReplayDirectoryPath -ActualValue $TransportService.ReplayDirectoryPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "RootDropDirectoryPath" -Type "String" -ExpectedValue $RootDropDirectoryPath -ActualValue $TransportService.RootDropDirectoryPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "RoutingTableLogMaxAge" -Type "TimeSpan" -ExpectedValue $RoutingTableLogMaxAge -ActualValue $TransportService.RoutingTableLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "RoutingTableLogMaxDirectorySize" -Type "Unlimited" -ExpectedValue $RoutingTableLogMaxDirectorySize -ActualValue $TransportService.RoutingTableLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "RoutingTableLogPath" -Type "String" -ExpectedValue $RoutingTableLogPath -ActualValue $TransportService.RoutingTableLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "SendProtocolLogMaxAge" -Type "TimeSpan" -ExpectedValue $SendProtocolLogMaxAge -ActualValue $TransportService.SendProtocolLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "SendProtocolLogMaxDirectorySize" -Type "Unlimited" -ExpectedValue $SendProtocolLogMaxDirectorySize -ActualValue $TransportService.SendProtocolLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "SendProtocolLogMaxFileSize" -Type "Unlimited" -ExpectedValue $SendProtocolLogMaxFileSize -ActualValue $TransportService.SendProtocolLogMaxFileSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "SendProtocolLogPath" -Type "String" -ExpectedValue $SendProtocolLogPath -ActualValue $TransportService.SendProtocolLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ServerStatisticsLogMaxAge" -Type "TimeSpan" -ExpectedValue $ServerStatisticsLogMaxAge -ActualValue $TransportService.ServerStatisticsLogMaxAge -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ServerStatisticsLogMaxDirectorySize" -Type "ByteQuantifiedSize" -ExpectedValue $ServerStatisticsLogMaxDirectorySize -ActualValue $TransportService.ServerStatisticsLogMaxDirectorySize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ServerStatisticsLogMaxFileSize" -Type "ByteQuantifiedSize" -ExpectedValue $ServerStatisticsLogMaxFileSize -ActualValue $TransportService.ServerStatisticsLogMaxFileSize -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ServerStatisticsLogPath" -Type "String" -ExpectedValue $ServerStatisticsLogPath -ActualValue $TransportService.ServerStatisticsLogPath -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "TransientFailureRetryCount" -Type "Int" -ExpectedValue $TransientFailureRetryCount -ActualValue $TransportService.TransientFailureRetryCount -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "TransientFailureRetryInterval" -Type "TimeSpan" -ExpectedValue $TransientFailureRetryInterval -ActualValue $TransportService.TransientFailureRetryInterval -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "UseDowngradedExchangeServerAuth" -Type "Boolean" -ExpectedValue $UseDowngradedExchangeServerAuth -ActualValue $TransportService.UseDowngradedExchangeServerAuth -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - } - else - { - return $false - } - return $true -} - -function CompareIPAddressewithString -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param([System.Net.IPAddress]$IPAddress, [String]$String) - if (($null -eq $IPAddress -and !([string]::IsNullOrEmpty($String))) -or ($null -ne $IPAddress -and [string]::IsNullOrEmpty($String))) - { - $returnValue = $false - } - elseif ($null -eq $IPAddress -and [string]::IsNullOrEmpty($String)) - { - $returnValue = $true - } - else - { - $returnValue =($IPAddress.Equals([System.Net.IPAddress]::Parse($string))) - } - - if ($returnValue -eq $false) - { - ReportBadSetting -SettingName $IPAddress -ExpectedValue $ExpectedValue -ActualValue $IPAddress -VerbosePreference $VerbosePreference - } - return $returnValue -} - -function CompareSmtpAdresswithString -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param($SmtpAddress,[String]$String) - if (($null -eq $SmtpAddress) -and ([string]::IsNullOrEmpty($String))) - { - Write-Verbose "Expected and actual value is empty, therefore equal!" - return $true - } - elseif (($null -eq $SmtpAddress) -and -not ([string]::IsNullOrEmpty($String))) - { - return $false - } - elseif ($SmtpAddress.Gettype() -eq [Microsoft.Exchange.Data.SmtpAddress]) - { - if ([string]::IsNullOrEmpty($String)) - { - return $false - } - else - { - return($SmtpAddress.Equals([Microsoft.Exchange.Data.SmtpAddress]::Parse($string))) - } - } - else - { - Write-Verbose "No type of [Microsoft.Exchange.Data.SmtpAddress]!" - return $false - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchTransportService/MSFT_xExchTransportService.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchTransportService/MSFT_xExchTransportService.schema.mof deleted file mode 100644 index d49936a4..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchTransportService/MSFT_xExchTransportService.schema.mof +++ /dev/null @@ -1,93 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xExchTransportService")] -class MSFT_xExchTransportService : OMI_BaseResource -{ - [Key] String Identity; //Exchange server - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - [Write] Boolean AllowServiceRestart; //Whether it is OK to restart service MSExchangeTransport; - [Write] String ActiveUserStatisticsLogMaxAge; - [Write] String ActiveUserStatisticsLogMaxDirectorySize; - [Write] String ActiveUserStatisticsLogMaxFileSize; - [Write] String ActiveUserStatisticsLogPath; - [Write] Boolean AgentLogEnabled; - [Write] String AgentLogMaxAge; - [Write] String AgentLogMaxDirectorySize; - [Write] String AgentLogMaxFileSize; - [Write] String AgentLogPath; - [Write] Boolean ConnectivityLogEnabled; - [Write] String ConnectivityLogMaxAge; - [Write] String ConnectivityLogMaxDirectorySize; - [Write] String ConnectivityLogMaxFileSize; - [Write] String ConnectivityLogPath; - [Write] Boolean ContentConversionTracingEnabled; - [Write] String DelayNotificationTimeout; - [Write] Boolean DnsLogEnabled; - [Write] String DnsLogMaxAge; - [Write] String DnsLogMaxDirectorySize; - [Write] String DnsLogMaxFileSize; - [Write] String DnsLogPath; - [Write] Boolean ExternalDNSAdapterEnabled; - [Write] String ExternalDNSAdapterGuid; - [Write,ValueMap{"Any","UseTcpOnly","UseUdpOnly"}, Values{"Any","UseTcpOnly","UseUdpOnly"}] String ExternalDNSProtocolOption; - [Write] String ExternalDNSServers[]; - [Write] String ExternalIPAddress; - [Write] Boolean InternalDNSAdapterEnabled; - [Write] String InternalDNSAdapterGuid; - [Write,ValueMap{"Any","UseTcpOnly","UseUdpOnly"}, Values{"Any","UseTcpOnly","UseUdpOnly"}] String InternalDNSProtocolOption; - [Write] String InternalDNSServers[]; - [Write,ValueMap{"None","Verbose"}, Values{"None","Verbose"}] String IntraOrgConnectorProtocolLoggingLevel; - [Write] SInt32 IntraOrgConnectorSmtpMaxMessagesPerConnection; - [Write] Boolean IrmLogEnabled; - [Write] String IrmLogMaxAge; - [Write] String IrmLogMaxDirectorySize; - [Write] String IrmLogMaxFileSize; - [Write] String IrmLogPath; - [Write] SInt32 MaxConcurrentMailboxDeliveries; - [Write] SInt32 MaxConcurrentMailboxSubmissions; - [Write] SInt32 MaxConnectionRatePerMinute; - [Write] String MaxOutboundConnections; - [Write] String MaxPerDomainOutboundConnections; - [Write] String MessageExpirationTimeout; - [Write] String MessageRetryInterval; - [Write] Boolean MessageTrackingLogEnabled; - [Write] String MessageTrackingLogMaxAge; - [Write] String MessageTrackingLogMaxDirectorySize; - [Write] String MessageTrackingLogMaxFileSize; - [Write] String MessageTrackingLogPath; - [Write] Boolean MessageTrackingLogSubjectLoggingEnabled; - [Write] String OutboundConnectionFailureRetryInterval; - [Write] String PickupDirectoryMaxHeaderSize; - [Write] SInt32 PickupDirectoryMaxMessagesPerMinute; - [Write] SInt32 PickupDirectoryMaxRecipientsPerMessage; - [Write] String PickupDirectoryPath; - [Write] Boolean PipelineTracingEnabled; - [Write] String PipelineTracingPath; - [Write] String PipelineTracingSenderAddress; - [Write] Boolean PoisonMessageDetectionEnabled; - [Write] SInt32 PoisonThreshold; - [Write] String QueueLogMaxAge; - [Write] String QueueLogMaxDirectorySize; - [Write] String QueueLogMaxFileSize; - [Write] String QueueLogPath; - [Write] String QueueMaxIdleTime; - [Write] String ReceiveProtocolLogMaxAge; - [Write] String ReceiveProtocolLogMaxDirectorySize; - [Write] String ReceiveProtocolLogMaxFileSize; - [Write] String ReceiveProtocolLogPath; - [Write] Boolean RecipientValidationCacheEnabled; - [Write] String ReplayDirectoryPath; - [Write] String RootDropDirectoryPath; - [Write] String RoutingTableLogMaxAge; - [Write] String RoutingTableLogMaxDirectorySize; - [Write] String RoutingTableLogPath; - [Write] String SendProtocolLogMaxAge; - [Write] String SendProtocolLogMaxDirectorySize; - [Write] String SendProtocolLogMaxFileSize; - [Write] String SendProtocolLogPath; - [Write] String ServerStatisticsLogMaxAge; - [Write] String ServerStatisticsLogMaxDirectorySize; - [Write] String ServerStatisticsLogMaxFileSize; - [Write] String ServerStatisticsLogPath; - [Write] SInt32 TransientFailureRetryCount; - [Write] String TransientFailureRetryInterval; - [Write] Boolean UseDowngradedExchangeServerAuth; -}; diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchUMCallRouterSettings/MSFT_xExchUMCallRouterSettings.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchUMCallRouterSettings/MSFT_xExchUMCallRouterSettings.psm1 deleted file mode 100644 index 3be3782b..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchUMCallRouterSettings/MSFT_xExchUMCallRouterSettings.psm1 +++ /dev/null @@ -1,143 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Server, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [ValidateSet("TCP","TLS","Dual")] - [System.String] - $UMStartupMode, - - [System.String] - $DomainController - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Server" = $Server} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "*UMCallRouterSettings" -VerbosePreference $VerbosePreference - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Server","DomainController" - - $umService = Get-UMCallRouterSettings @PSBoundParameters - - if ($null -ne $umService) - { - $returnValue = @{ - Server = $Server - UMStartupMode = $umService.UMStartupMode - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Server, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [ValidateSet("TCP","TLS","Dual")] - [System.String] - $UMStartupMode, - - [System.String] - $DomainController - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Server" = $Server} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "*UMCallRouterSettings" -VerbosePreference $VerbosePreference - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Credential" - - Set-UMCallRouterSettings @PSBoundParameters -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Server, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [ValidateSet("TCP","TLS","Dual")] - [System.String] - $UMStartupMode, - - [System.String] - $DomainController - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Server" = $Server} -VerbosePreference $VerbosePreference - - $umService = Get-TargetResource @PSBoundParameters - - if ($null -eq $umService) - { - return $false - } - else - { - if (!(VerifySetting -Name "UMStartupMode" -Type "String" -ExpectedValue $UMStartupMode -ActualValue $umService.UMStartupMode -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - } - - return $true -} - - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchUMCallRouterSettings/MSFT_xExchUMCallRouterSettings.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchUMCallRouterSettings/MSFT_xExchUMCallRouterSettings.schema.mof deleted file mode 100644 index 5e24123f..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchUMCallRouterSettings/MSFT_xExchUMCallRouterSettings.schema.mof +++ /dev/null @@ -1,12 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchUMCallRouterSettings")] -class MSFT_xExchUMCallRouterSettings : OMI_BaseResource -{ - [Key, Description("Hostname of the UM server to configure")] String Server; - [Required, Description("Credentials used to establish a remote Powershell session to Exchange"), EmbeddedInstance("MSFT_Credential")] String Credential; - [Required, Description("UMStartupMode for the UM call router"), ValueMap{"TCP","TLS","Dual"}, Values{"TCP","TLS","Dual"}] String UMStartupMode; - [Write, Description("Optional Domain Controller to connect to")] String DomainController; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchUMService/MSFT_xExchUMService.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchUMService/MSFT_xExchUMService.psm1 deleted file mode 100644 index a2ae3620..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchUMService/MSFT_xExchUMService.psm1 +++ /dev/null @@ -1,154 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [ValidateSet("TCP","TLS","Dual")] - [System.String] - $UMStartupMode, - - [System.String[]] - $DialPlans, - - [System.String] - $DomainController - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "*UMService" -VerbosePreference $VerbosePreference - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - $umService = Get-UMService @PSBoundParameters - - if ($null -ne $umService) - { - $returnValue = @{ - Identity = $Identity - UMStartupMode = $umService.UMStartupMode - DialPlans = $umService.DialPlans.Name - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [ValidateSet("TCP","TLS","Dual")] - [System.String] - $UMStartupMode, - - [System.String[]] - $DialPlans, - - [System.String] - $DomainController - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "*UMService" -VerbosePreference $VerbosePreference - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove "Credential" - - Set-UMService @PSBoundParameters -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [parameter(Mandatory = $true)] - [ValidateSet("TCP","TLS","Dual")] - [System.String] - $UMStartupMode, - - [System.String[]] - $DialPlans, - - [System.String] - $DomainController - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - $umService = Get-TargetResource @PSBoundParameters - - if ($null -eq $umService) - { - return $false - } - else - { - if (!(VerifySetting -Name "UMStartupMode" -Type "String" -ExpectedValue $UMStartupMode -ActualValue $umService.UMStartupMode -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - if (!(VerifySetting -Name "DialPlans" -Type "Array" -ExpectedValue $DialPlans -ActualValue $umService.DialPlans -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - } - - return $true -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchUMService/MSFT_xExchUMService.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchUMService/MSFT_xExchUMService.schema.mof deleted file mode 100644 index 93e3afc2..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchUMService/MSFT_xExchUMService.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchUMService")] -class MSFT_xExchUMService : OMI_BaseResource -{ - [Key] String Identity; //Hostname of the UM server to configure - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - [Required, ValueMap{"TCP","TLS","Dual"}, Values{"TCP","TLS","Dual"}] String UMStartupMode; //UMStartupMode for the UM server - [Write] String DialPlans[]; //Specifies all dial plans that the Unified Messaging service handles incoming calls for - [Write] String DomainController; //Optional Domain Controller to connect to -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForADPrep/MSFT_xExchWaitForADPrep.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForADPrep/MSFT_xExchWaitForADPrep.psm1 deleted file mode 100644 index a5bb52f8..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForADPrep/MSFT_xExchWaitForADPrep.psm1 +++ /dev/null @@ -1,416 +0,0 @@ -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Int32] - $SchemaVersion, - - [System.Int32] - $OrganizationVersion, - - [System.Int32] - $DomainVersion, - - [System.String[]] - $ExchangeDomains, - - [System.UInt32] - $RetryIntervalSec = 60, - - [System.UInt32] - $RetryCount = 30 - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -VerbosePreference $VerbosePreference - - $dse = GetADRootDSE -Credential $Credential - - if ($PSBoundParameters.ContainsKey("SchemaVersion")) - { - #Check for existence of schema object - $schemaObj = GetADObject -Credential $credential -DistinguishedName "CN=ms-Exch-Schema-Version-Pt,$($dse.schemaNamingContext)" -Properties "rangeUpper" - - if ($null -ne $schemaObj) - { - $currentSchemaVersion = $schemaObj.rangeUpper - } - else - { - Write-Warning "Unable to find schema object 'CN=ms-Exch-Schema-Version-Pt,$($dse.schemaNamingContext)'. This is either because Exchange /PrepareSchema has not been run, or because the configured account does not have permissions to access this object." - } - } - - if ($PSBoundParameters.ContainsKey("OrganizationVersion")) - { - $exchangeContainer = GetADObject -Credential $credential -DistinguishedName "CN=Microsoft Exchange,CN=Services,$($dse.configurationNamingContext)" -Properties "rangeUpper" - - if ($null -ne $exchangeContainer) - { - $orgContainer = GetADObject -Credential $Credential -Searching $true -DistinguishedName "CN=Microsoft Exchange,CN=Services,$($dse.configurationNamingContext)" -Properties "objectVersion" -Filter "objectClass -like 'msExchOrganizationContainer'" -SearchScope "OneLevel" - - if ($null -ne $orgContainer) - { - $currentOrganizationVersion = $orgContainer.objectVersion - } - else - { - Write-Warning "Unable to find any objects of class msExchOrganizationContainer under 'CN=Microsoft Exchange,CN=Services,$($dse.configurationNamingContext)'. This is either because Exchange /PrepareAD has not been run, or because the configured account does not have permissions to access this object." - } - } - else - { - Write-Warning "Unable to find Exchange Configuration Container at 'CN=Microsoft Exchange,CN=Services,$($dse.configurationNamingContext)'. This is either because Exchange /PrepareAD has not been run, or because the configured account does not have permissions to access this object." - } - } - - if ($PSBoundParameters.ContainsKey("DomainVersion")) - { - #Get this server's domain - [string]$machineDomain = (Get-CimInstance -ClassName Win32_ComputerSystem).Domain.ToLower() - - #Figure out all domains we need to inspect - [string[]]$targetDomains = @() - $targetDomains += $machineDomain - - if ($null -ne $ExchangeDomains) - { - foreach ($domain in $ExchangeDomains) - { - $domainLower = $domain.ToLower() - - if ($targetDomains.Contains($domainLower) -eq $false) - { - $targetDomains += $domainLower - } - } - } - - #Populate the return value in a hashtable of domains and versions - [Hashtable]$currentDomainVersions = @{} - - foreach ($domain in $targetDomains) - { - $domainDn = DomainDNFromFQDN -Fqdn $domain - - $mesoContainer = GetADObject -Credential $Credential -DistinguishedName "CN=Microsoft Exchange System Objects,$($domainDn)" -Properties "objectVersion" - - $mesoVersion = $null - - if ($null -ne $mesoContainer) - { - $mesoVersion = $mesoContainer.objectVersion - } - else - { - Write-Warning "Unable to find object with DN 'CN=Microsoft Exchange System Objects,$($domainDn)'. This is either because Exchange /PrepareDomain has not been run for this domain, or because the configured account does not have permissions to access this object." - } - - if ($null -eq $currentDomainVersions) - { - $currentDomainVersions = @{$domain = $mesoVersion} - } - else - { - $currentDomainVersions.Add($domain, $mesoVersion) - } - } - } - - $returnValue = @{ - SchemaVersion = $currentSchemaVersion - OrganizationVersion = $currentOrganizationVersion - DomainVersion = $currentDomainVersions - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Int32] - $SchemaVersion, - - [System.Int32] - $OrganizationVersion, - - [System.Int32] - $DomainVersion, - - [System.String[]] - $ExchangeDomains, - - [System.UInt32] - $RetryIntervalSec = 60, - - [System.UInt32] - $RetryCount = 30 - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -VerbosePreference $VerbosePreference - - $testResults = Test-TargetResource @PSBoundParameters - - for ($i = 0; $i -lt $RetryCount; $i++) - { - if ($testResults -eq $false) - { - Write-Verbose "AD has still not been fully prepped as of $([DateTime]::Now). Sleeping for $($RetryIntervalSec) seconds." - Start-Sleep -Seconds $RetryIntervalSec - - $testResults = Test-TargetResource @PSBoundParameters - } - else - { - break - } - } - - if ($testResults -eq $false) - { - throw "AD has still not been prepped after the maximum amount of retries." - } -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Int32] - $SchemaVersion, - - [System.Int32] - $OrganizationVersion, - - [System.Int32] - $DomainVersion, - - [System.String[]] - $ExchangeDomains, - - [System.UInt32] - $RetryIntervalSec = 60, - - [System.UInt32] - $RetryCount = 30 - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -VerbosePreference $VerbosePreference - - $adStatus = Get-TargetResource @PSBoundParameters - - $returnValue = $true - - if ($null -eq $adStatus) - { - $returnValue = $false - } - else - { - if (!(VerifySetting -Name "SchemaVersion" -Type "Int" -ExpectedValue $SchemaVersion -ActualValue $adStatus.SchemaVersion -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - $returnValue = $false - } - - if (!(VerifySetting -Name "OrganizationVersion" -Type "Int" -ExpectedValue $OrganizationVersion -ActualValue $adStatus.OrganizationVersion -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - $returnValue = $false - } - - if ($PSBoundParameters.ContainsKey("DomainVersion")) - { - #Get this server's domain - [string]$machineDomain = (Get-CimInstance -ClassName Win32_ComputerSystem).Domain.ToLower() - - #Figure out all domains we need to inspect - [string[]]$targetDomains = @() - $targetDomains += $machineDomain - - if ($null -ne $ExchangeDomains) - { - foreach ($domain in $ExchangeDomains) - { - $domainLower = $domain.ToLower() - - if ($targetDomains.Contains($domainLower) -eq $false) - { - $targetDomains += $domainLower - } - } - } - - #Compare the desired DomainVersion with the actual version of each domain - foreach ($domain in $targetDomains) - { - if (!(VerifySetting -Name "DomainVersion" -Type "Int" -ExpectedValue $DomainVersion -ActualValue $adStatus.DomainVersion[$domain] -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - $returnValue = $false - } - } - } - } - - return $returnValue -} - -function GetADRootDSE -{ - param - ( - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - if ($null -eq $Credential) - { - $dse = Get-ADRootDSE -ErrorAction SilentlyContinue -ErrorVariable errVar - } - else - { - $dse = Get-ADRootDSE -Credential $Credential -ErrorAction SilentlyContinue -ErrorVariable errVar - } - - return $dse -} - -function GetADObject -{ - param - ( - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [boolean] - $Searching = $false, - - [string] - $DistinguishedName, - - [string[]] - $Properties, - - [string] - $Filter, - - [string] - $SearchScope - ) - - if ($Searching -eq $false) - { - $getAdObjParams = @{"Identity" = $DistinguishedName} - } - else - { - $getAdObjParams = @{"SearchBase" = $DistinguishedName} - - if ([string]::IsNullOrEmpty($Filter) -eq $false) - { - $getAdObjParams.Add("Filter", $Filter) - } - - if ([string]::IsNullOrEmpty($SearchScope) -eq $false) - { - $getAdObjParams.Add("SearchScope", $SearchScope) - } - } - - if ($null -ne $Credential) - { - $getAdObjParams.Add("Credential", $Credential) - } - - if ([string]::IsNullOrEmpty($Properties) -eq $false) - { - $getAdObjParams.Add("Properties", $Properties) - } - - #ErrorAction SilentlyContinue doesn't seem to work with Get-ADObject. Doing in Try/Catch instead - try - { - $object = Get-ADObject @getAdObjParams - } - catch - { - Write-Warning "Failed to find object at '$DistinguishedName' using Get-ADObject." - } - - return $object -} - -function DomainDNFromFQDN -{ - param([string]$Fqdn) - - if ($Fqdn.Contains('.')) - { - $domainParts = $Fqdn.Split('.') - - $domainDn = "DC=$($domainParts[0])" - - for ($i = 1; $i -lt $domainParts.Count; $i++) - { - $domainDn = "$($domainDn),DC=$($domainParts[$i])" - } - } - elseif ($Fqdn.Length -gt 0) - { - $domainDn = "DC=$($Fqdn)" - } - else - { - throw "Empty value specified for domain name" - } - - return $domainDn -} - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForADPrep/MSFT_xExchWaitForADPrep.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForADPrep/MSFT_xExchWaitForADPrep.schema.mof deleted file mode 100644 index 88a19a41..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForADPrep/MSFT_xExchWaitForADPrep.schema.mof +++ /dev/null @@ -1,20 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchWaitForADPrep")] -class MSFT_xExchWaitForADPrep : OMI_BaseResource -{ - [Key, Description("Not actually used. Enter anything, as long as it's not null")] String Identity; - [Write, Description("Credentials used to perform Active Directory lookups against the Schema, Configuration, and Domain naming contexts"), EmbeddedInstance("MSFT_Credential")] String Credential; - - //To find appropriate values for the next three properties, consult the 'Exchange 2013 Active Directory versions' setion - //of the following article: - //Prepare Active Directory and domains - //http://technet.microsoft.com/en-us/library/bb125224(v=exchg.150).aspx - [Write, Description("Specifies that the Active Directory schema should have been prepared using Exchange 2013 'setup /PrepareSchema', and should be at the specified version")] Sint32 SchemaVersion; - [Write, Description("Specifies that the Exchange Organization should have been prepared using Exchange 2013 'setup /PrepareAD', and should be at the specified version")] Sint32 OrganizationVersion; - [Write, Description("Specifies that the domain containing the target Exchange 2013 server was prepared using setup /PrepareAD, /PrepareDomain, or /PrepareAllDomains, and should be at the specified version")] Sint32 DomainVersion; - - [Write, Description("The FQDN's of domains that should be checked for DomainVersion in addition to the domain that this Exchange server belongs to")] String ExchangeDomains[]; - [Write, Description("How many seconds to wait between retries when checking whether AD has been prepped. Defaults to 60.")] Uint32 RetryIntervalSec; - [Write, Description("How many retry attempts should be made to see if AD has been prepped before an exception is thrown. Defaults to 30.")] Uint32 RetryCount; -}; - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForDAG/MSFT_xExchWaitForDAG.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForDAG/MSFT_xExchWaitForDAG.psm1 deleted file mode 100644 index 21c1128d..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForDAG/MSFT_xExchWaitForDAG.psm1 +++ /dev/null @@ -1,176 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.String] - $DomainController, - - [System.UInt32] - $RetryIntervalSec = 60, - - [System.UInt32] - $RetryCount = 5 - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-DatabaseAvailabilityGroup" -VerbosePreference $VerbosePreference - - $dag = GetDatabaseAvailabilityGroup @PSBoundParameters - - if ($null -ne $dag) - { - $returnValue = @{ - Identity = $Identity - } - - } - - $returnValue -} - - -function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.String] - $DomainController, - - [System.UInt32] - $RetryIntervalSec = 60, - - [System.UInt32] - $RetryCount = 5 - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-DatabaseAvailabilityGroup" -VerbosePreference $VerbosePreference - - $dag = GetDatabaseAvailabilityGroup @PSBoundParameters - - for ($i = 0; $i -lt $RetryCount; $i++) - { - if ($null -eq $dag) - { - Write-Warning "DAG '$($Identity)' does not yet exist. Sleeping for $($RetryIntervalSec) seconds." - Start-Sleep -Seconds $RetryIntervalSec - - $dag = GetDatabaseAvailabilityGroup @PSBoundParameters - } - else - { - break - } - } - - if ($null -eq $dag) - { - throw "DAG '$($Identity)' does not yet exist. This will prevent resources that are dependant on this resource from executing. If you are running the DSC configuration in push mode, you will need to re-run the configuration once the database has been created." - } -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.String] - $DomainController, - - [System.UInt32] - $RetryIntervalSec = 60, - - [System.UInt32] - $RetryCount = 5 - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-DatabaseAvailabilityGroup" -VerbosePreference $VerbosePreference - - $dag = GetDatabaseAvailabilityGroup @PSBoundParameters - - return ($null -ne $dag) -} - -function GetDatabaseAvailabilityGroup -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.String] - $DomainController - ) - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - return (Get-DatabaseAvailabilityGroup @PSBoundParameters -ErrorAction SilentlyContinue) -} - - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForDAG/MSFT_xExchWaitForDAG.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForDAG/MSFT_xExchWaitForDAG.schema.mof deleted file mode 100644 index 6f42d01f..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForDAG/MSFT_xExchWaitForDAG.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchWaitForDAG")] -class MSFT_xExchWaitForDAG : OMI_BaseResource -{ - [Key] String Identity; //The name of the DAG - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - [Write] String DomainController; //Domain controller to talk to when running Get-DatabaseAvailabilityGroup - [Write] Uint32 RetryIntervalSec; //How many seconds to wait between retries when checking whether the DAG exists. Defaults to 60. - [Write] Uint32 RetryCount; //Mount many retry attempts should be made to find the DAG before an exception is thrown. Defaults to 5. -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForMailboxDatabase/MSFT_xExchWaitForMailboxDatabase.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForMailboxDatabase/MSFT_xExchWaitForMailboxDatabase.psm1 deleted file mode 100644 index 0c742b87..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForMailboxDatabase/MSFT_xExchWaitForMailboxDatabase.psm1 +++ /dev/null @@ -1,208 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.String] - $DomainController, - - [System.UInt32] - $RetryIntervalSec = 60, - - [System.UInt32] - $RetryCount = 5, - - [System.String] - $AdServerSettingsPreferredServer - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-MailboxDatabase","Set-AdServerSettings" -VerbosePreference $VerbosePreference - - if ($PSBoundParameters.ContainsKey("AdServerSettingsPreferredServer") -and ![string]::IsNullOrEmpty($AdServerSettingsPreferredServer)) - { - Set-ADServerSettings -PreferredServer "$($AdServerSettingsPreferredServer)" - } - - $db = GetMailboxDatabase @PSBoundParameters - - if ($null -ne $db) - { - $returnValue = @{ - Identity = $Identity - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.String] - $DomainController, - - [System.UInt32] - $RetryIntervalSec = 60, - - [System.UInt32] - $RetryCount = 5, - - [System.String] - $AdServerSettingsPreferredServer - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-MailboxDatabase","Set-AdServerSettings" -VerbosePreference $VerbosePreference - - if ($PSBoundParameters.ContainsKey("AdServerSettingsPreferredServer") -and ![string]::IsNullOrEmpty($AdServerSettingsPreferredServer)) - { - Set-ADServerSettings -PreferredServer "$($AdServerSettingsPreferredServer)" - } - - $db = GetMailboxDatabase @PSBoundParameters - - for ($i = 0; $i -lt $RetryCount; $i++) - { - if ($null -eq $db) - { - Write-Warning "Database '$($Identity)' does not yet exist. Sleeping for $($RetryIntervalSec) seconds." - Start-Sleep -Seconds $RetryIntervalSec - - $db = GetMailboxDatabase @PSBoundParameters - } - else - { - break - } - } - - if ($null -eq $db) - { - throw "Database '$($Identity)' does not yet exist. This will prevent resources that are dependant on this resource from executing. If you are running the DSC configuration in push mode, you will need to re-run the configuration once the database has been created." - } -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.String] - $DomainController, - - [System.UInt32] - $RetryIntervalSec = 60, - - [System.UInt32] - $RetryCount = 5, - - [System.String] - $AdServerSettingsPreferredServer - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad "Get-MailboxDatabase","Set-AdServerSettings" -VerbosePreference $VerbosePreference - - if ($PSBoundParameters.ContainsKey("AdServerSettingsPreferredServer") -and ![string]::IsNullOrEmpty($AdServerSettingsPreferredServer)) - { - Set-ADServerSettings -PreferredServer "$($AdServerSettingsPreferredServer)" - } - - $db = GetMailboxDatabase @PSBoundParameters - - return ($null -ne $db) -} - -function GetMailboxDatabase -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.String] - $DomainController, - - [System.UInt32] - $RetryIntervalSec = 60, - - [System.UInt32] - $RetryCount = 5, - - [System.String] - $AdServerSettingsPreferredServer - ) - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - return (Get-MailboxDatabase @PSBoundParameters -ErrorAction SilentlyContinue) -} - - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForMailboxDatabase/MSFT_xExchWaitForMailboxDatabase.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForMailboxDatabase/MSFT_xExchWaitForMailboxDatabase.schema.mof deleted file mode 100644 index 84300a3b..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWaitForMailboxDatabase/MSFT_xExchWaitForMailboxDatabase.schema.mof +++ /dev/null @@ -1,14 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchWaitForMailboxDatabase")] -class MSFT_xExchWaitForMailboxDatabase : OMI_BaseResource -{ - [Key] String Identity; //The name of the Mailbox Database - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - [Write] String AdServerSettingsPreferredServer; //An optional domain controller to pass to Set-AdServerSettings -PreferredServer - [Write] String DomainController; //Domain controller to talk to when running Get-MailboxDatabase - [Write] Uint32 RetryIntervalSec; //How many seconds to wait between retries when checking whether the database exists. Defaults to 60. - [Write] Uint32 RetryCount; //Mount many retry attempts should be made to find the database before an exception is thrown. Defaults to 5. -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWebServicesVirtualDirectory/MSFT_xExchWebServicesVirtualDirectory.psm1 b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWebServicesVirtualDirectory/MSFT_xExchWebServicesVirtualDirectory.psm1 deleted file mode 100644 index 2ea78206..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWebServicesVirtualDirectory/MSFT_xExchWebServicesVirtualDirectory.psm1 +++ /dev/null @@ -1,343 +0,0 @@ -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscTestsPresent", "")] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCDscExamplesPresent", "")] -[CmdletBinding()] -param() - -function Get-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $BasicAuthentication, - - [System.Boolean] - $CertificateAuthentication, - - [System.Boolean] - $DigestAuthentication, - - [System.String] - $DomainController, - - [System.String] - $ExternalUrl, - - [System.String] - $InternalNLBBypassUrl, - - [System.String] - $InternalUrl, - - [System.Boolean] - $OAuthAuthentication, - - [System.Boolean] - $WindowsAuthentication, - - [System.Boolean] - $WSSecurityAuthentication - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad 'Get-WebServicesVirtualDirectory' -VerbosePreference $VerbosePreference - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - $EwsVdir = Get-WebServicesVirtualDirectory @PSBoundParameters - - if ($null -ne $EwsVdir) - { - $returnValue = @{ - EwsVirtualDirectoryIdentity = $Identity - InternalUrl = $EwsVdir.InternalUrl.AbsoluteUri - ExternalUrl = $EwsVdir.InternalUrl.AbsoluteUri - BasicAuthentication = $EwsVdir.BasicAuthentication - CertificateAuthentication = $EwsVdir.CertificateAuthentication - DigestAuthentication = $EwsVdir.DigestAuthentication - OAuthAuthentication = $EwsVdir.OAuthAuthentication - WSSecurityAuthentication = $EwsVdir.WSSecurityAuthentication - InternalNLBBypassUrl = $EwsVdir.InternalNLBBypassUrl - WindowsAuthentication = $EwsVdir.WindowsAuthentication - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "")] - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $BasicAuthentication, - - [System.Boolean] - $CertificateAuthentication, - - [System.Boolean] - $DigestAuthentication, - - [System.String] - $DomainController, - - [System.String] - $ExternalUrl, - - [System.String] - $InternalNLBBypassUrl, - - [System.String] - $InternalUrl, - - [System.Boolean] - $OAuthAuthentication, - - [System.Boolean] - $WindowsAuthentication, - - [System.Boolean] - $WSSecurityAuthentication - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad 'Set-WebServicesVirtualDirectory' -VerbosePreference $VerbosePreference - - #Ensure an empty string is $null and not a string - SetEmptyStringParamsToNull -PSBoundParametersIn $PSBoundParameters - - #Remove Credential and AllowServiceRestart because those parameters do not exist on Set-WebServicesVirtualDirectory - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToRemove 'Credential','AllowServiceRestart' - - #Need to do -Force and -Confirm:$false here or else an unresolvable URL will prompt for confirmation - Set-WebServicesVirtualDirectory @PSBoundParameters -Force -Confirm:$false - - if($AllowServiceRestart -eq $true) - { - Write-Verbose "Recycling MSExchangeServicesAppPool" - RestartAppPoolIfExists -Name MSExchangeServicesAppPool - } - else - { - Write-Warning "The configuration will not take effect until MSExchangeServicesAppPool is manually recycled." - } -} - - -function Test-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $BasicAuthentication, - - [System.Boolean] - $CertificateAuthentication, - - [System.Boolean] - $DigestAuthentication, - - [System.String] - $DomainController, - - [System.String] - $ExternalUrl, - - [System.String] - $InternalNLBBypassUrl, - - [System.String] - $InternalUrl, - - [System.Boolean] - $OAuthAuthentication, - - [System.Boolean] - $WindowsAuthentication, - - [System.Boolean] - $WSSecurityAuthentication - ) - - #Load helper module - Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.Parent.FullName)\Misc\xExchangeCommon.psm1" -Verbose:0 - - LogFunctionEntry -Parameters @{"Identity" = $Identity} -VerbosePreference $VerbosePreference - - #Establish remote Powershell session - GetRemoteExchangeSession -Credential $Credential -CommandsToLoad 'Get-WebServicesVirtualDirectory' -VerbosePreference $VerbosePreference - - #Ensure an empty string is $null and not a string - SetEmptyStringParamsToNull -PSBoundParametersIn $PSBoundParameters - - $EwsVdir = GetWebServicesVirtualDirectory @PSBoundParameters - - if ($null -eq $EwsVdir) - { - return $false - } - else - { - if (!(VerifySetting -Name "InternalUrl" -Type "String" -ExpectedValue $InternalUrl -ActualValue $EwsVdir.InternalUrl.AbsoluteUri -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "ExternalUrl" -Type "String" -ExpectedValue $ExternalUrl -ActualValue $EwsVdir.ExternalUrl.AbsoluteUri -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "BasicAuthentication" -Type "Boolean" -ExpectedValue $BasicAuthentication -ActualValue $EwsVdir.BasicAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "CertificateAuthentication" -Type "Boolean" -ExpectedValue $CertificateAuthentication -ActualValue $EwsVdir.CertificateAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "DigestAuthentication" -Type "Boolean" -ExpectedValue $DigestAuthentication -ActualValue $EwsVdir.DigestAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "OAuthAuthentication" -Type "Boolean" -ExpectedValue $OAuthAuthentication -ActualValue $EwsVdir.OAuthAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "WindowsAuthentication" -Type "Boolean" -ExpectedValue $WindowsAuthentication -ActualValue $EwsVdir.WindowsAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "WSSecurityAuthentication" -Type "Boolean" -ExpectedValue $WSSecurityAuthentication -ActualValue $EwsVdir.WSSecurityAuthentication -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - - if (!(VerifySetting -Name "InternalNLBBypassUrl" -Type "String" -ExpectedValue $InternalNLBBypassUrl -ActualValue $EwsVdir.InternalNLBBypassUrl.AbsoluteUri -PSBoundParametersIn $PSBoundParameters -VerbosePreference $VerbosePreference)) - { - return $false - } - } - - #If the code made it this for all properties are in a desired state - return $true -} - -function GetWebServicesVirtualDirectory -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Identity, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.Boolean] - $AllowServiceRestart = $false, - - [System.Boolean] - $BasicAuthentication, - - [System.Boolean] - $CertificateAuthentication, - - [System.Boolean] - $DigestAuthentication, - - [System.String] - $DomainController, - - [System.String] - $ExternalUrl, - - [System.String] - $InternalNLBBypassUrl, - - [System.String] - $InternalUrl, - - [System.Boolean] - $OAuthAuthentication, - - [System.Boolean] - $WindowsAuthentication, - - [System.Boolean] - $WSSecurityAuthentication - ) - - RemoveParameters -PSBoundParametersIn $PSBoundParameters -ParamsToKeep "Identity","DomainController" - - return (Get-WebServicesVirtualDirectory @PSBoundParameters) -} - - -Export-ModuleMember -Function *-TargetResource - - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWebServicesVirtualDirectory/MSFT_xExchWebServicesVirtualDirectory.schema.mof b/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWebServicesVirtualDirectory/MSFT_xExchWebServicesVirtualDirectory.schema.mof deleted file mode 100644 index d306b1e7..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/DSCResources/MSFT_xExchWebServicesVirtualDirectory/MSFT_xExchWebServicesVirtualDirectory.schema.mof +++ /dev/null @@ -1,24 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xExchWebServicesVirtualDirectory")] -class MSFT_xExchWebServicesVirtualDirectory : OMI_BaseResource -{ - [Key] String Identity; //The Identity of the EWS Virtual Directory - [Required, EmbeddedInstance("MSFT_Credential")] String Credential; //Credentials used to establish a remote Powershell session to Exchange - [Write] Boolean AllowServiceRestart; //Whether it is OK to recycle the app pool after making changes. Defaults to $true. - - //Remaining props correspond directly to Set-WebServicesVirtualDirectory parameters - //http://technet.microsoft.com/en-us/library/aa997233(v=exchg.150).aspx - [Write] Boolean BasicAuthentication; - [Write] Boolean CertificateAuthentication; - [Write] Boolean DigestAuthentication; - [Write] String DomainController; - [Write] String ExternalUrl; - [Write] String InternalNLBBypassUrl; - [Write] String InternalUrl; - [Write] Boolean OAuthAuthentication; - [Write] Boolean WindowsAuthentication; - [Write] Boolean WSSecurityAuthentication; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xExchange/LICENSE b/lib/puppet_x/dsc_resources/xExchange/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xExchange/Misc/xExchangeCommon.psm1 b/lib/puppet_x/dsc_resources/xExchange/Misc/xExchangeCommon.psm1 deleted file mode 100644 index 48921fd3..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/Misc/xExchangeCommon.psm1 +++ /dev/null @@ -1,991 +0,0 @@ -#Gets the existing Remote PowerShell session to Exchange, if it exists -function GetExistingExchangeSession -{ - return (Get-PSSession -Name "DSCExchangeSession" -ErrorAction SilentlyContinue) -} - -#Establishes a Exchange remote powershell session to the local server. Reuses the session if it already exists. -function GetRemoteExchangeSession -{ - [CmdletBinding()] - param - ( - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [string[]] - $CommandsToLoad, - - $VerbosePreference, - - $SetupProcessName = "ExSetup*" - ) - - #Check if Exchange Setup is running. If so, we need to throw an exception, as a running Exchange DSC resource will block Exchange Setup from working properly. - if (IsSetupRunning -SetupProcessName $SetupProcessName) - { - throw "Exchange Setup is currently running. Preventing creation of new Remote PowerShell session to Exchange." - } - - #See if the session already exists - $Session = GetExistingExchangeSession - - #Attempt to reuse the session if we found one - if ($null -ne $Session) - { - if ($Session.State -eq "Opened") - { - Write-Verbose "Reusing existing Remote Powershell Session to Exchange" - } - else #Session is in an unexpected state. Remove it so we can rebuild it - { - RemoveExistingRemoteSession - $Session = $null - } - } - - #Either the session didn't exist, or it was broken and we nulled it out. Create a new one - if ($null -eq $Session) - { - #First make sure we are on a valid server version, and that Exchange is fully installed - VerifyServerVersion -VerbosePreference $VerbosePreference - - Write-Verbose "Creating new Remote Powershell session to Exchange" - - #Get local server FQDN - $machineDomain = (Get-CimInstance -ClassName Win32_ComputerSystem).Domain.ToLower() - $serverName = $env:computername.ToLower() - $serverFQDN = $serverName + "." + $machineDomain - - #Override chatty banner, because chatty - New-Alias Get-ExBanner Out-Null - New-Alias Get-Tip Out-Null - - #Load built in Exchange functions, and create session - $exbin = Join-Path -Path ((Get-ItemProperty HKLM:\SOFTWARE\Microsoft\ExchangeServer\v15\Setup).MsiInstallPath) -ChildPath "bin" - $remoteExchange = Join-Path -Path "$($exbin)" -ChildPath "RemoteExchange.ps1" - . $remoteExchange - $Session = _NewExchangeRunspace -fqdn $serverFQDN -credential $Credential -UseWIA $false -AllowRedirection $false - - #Remove the aliases we created earlier - Remove-Item Alias:Get-ExBanner - Remove-Item Alias:Get-Tip - - if ($null -ne $Session) - { - $Session.Name = "DSCExchangeSession" - } - } - - #If the session is still null here, things went wrong. Throw exception - if ($null -eq $Session) - { - throw "Failed to establish remote Powershell session to FQDN: $($serverFQDN)" - } - else #Import the session globally - { - #Temporarily set Verbose to SilentlyContinue so the Session and Module import isn't noisy - $oldVerbose = $VerbosePreference - $VerbosePreference = "SilentlyContinue" - - if ($CommandsToLoad.Count -gt 0) - { - $moduleInfo = Import-PSSession $Session -WarningAction SilentlyContinue -DisableNameChecking -AllowClobber -CommandName $CommandsToLoad -Verbose:0 - } - else - { - $moduleInfo = Import-PSSession $Session -WarningAction SilentlyContinue -DisableNameChecking -AllowClobber -Verbose:0 - } - - Import-Module $moduleInfo -Global -DisableNameChecking - - #Set Verbose back - $VerbosePreference = $oldVerbose - } -} - -#Removes any Remote Sessions that have been setup by us -function RemoveExistingRemoteSession -{ - [CmdletBinding()] - param($VerbosePreference) - - $sessions = GetExistingExchangeSession - - if ($null -ne $sessions) - { - Write-Verbose "Removing existing remote Powershell sessions" - - GetExistingExchangeSession | Remove-PSSession - } -} - -#Ensures that Exchange is installed, and that it is the correct version (2013 or 2016) -function VerifyServerVersion -{ - [CmdletBinding()] - param($VerbosePreference) - - $unsupportedMsg = "A supported version of Exchange is either not present, or not fully installed on this machine." - - if ($Global:ServerVersionGood -eq $true) - { - #Do nothing - } - elseif ($Global:ServerVersionGood -eq $false) - { - throw $unsupportedMsg - } - else - { - $setupComplete = IsSetupComplete - - if ($setupComplete -eq $false) - { - $Global:ServerVersionGood = $false - - throw $unsupportedMsg - } - else - { - $Global:ServerVersionGood = $true - } - } -} - -#Gets the WMI object corresponding to the Exchange Product -function GetExchangeProduct -{ - if ($null -eq $Global:CheckedExchangeProduct -or $Global:CheckedExchangeProduct -eq $false) - { - $Global:ExchangeProduct = Get-CimInstance -ClassName Win32_Product -Filter 'Name like "Microsoft Exchange Server"' - - $Global:CheckedExchangeProduct = $true - } - - return $Global:ExchangeProduct -} - -#Checks whether a supported version of Exchange is at least partially installed by looking for Exchange's product GUID -function IsExchangePresent -{ - $version = GetExchangeVersion - - if ($version -eq "2013" -or $version -eq "2016") - { - return $true - } - else - { - return $false - } -} - -#Gets the installed Exchange Version, and returns the number as a string. -#Returns N/A if the version cannot be found, and will optionally throw an exception -#if ThrowIfUnknownVersion was set to $true. -function GetExchangeVersion -{ - param ([bool]$ThrowIfUnknownVersion = $false) - - $version = "N/A" - - $product = GetExchangeProduct - - if ($null -ne $product) - { - if ($product.IdentifyingNumber -eq '{4934D1EA-BE46-48B1-8847-F1AF20E892C1}') #Exchange 2013 - { - return "2013" - } - elseif($product.IdentifyingNumber -eq '{CD981244-E9B8-405A-9026-6AEB9DCEF1F1}') #Exchange 2016 - { - return "2016" - } - } - - if ($version -eq "N/A" -and $ThrowIfUnknownVersion) - { - throw "Failed to discover a known Exchange Version" - } -} - -#Checks whether Setup fully completed -function IsSetupComplete -{ - $exchangePresent = IsExchangePresent - $setupPartiallyCompleted = IsSetupPartiallyCompleted - - if ($exchangePresent -eq $true -and $setupPartiallyCompleted -eq $false) - { - $isSetupComplete = $true - } - else - { - $isSetupComplete = $false - } - - return $isSetupComplete -} - -#Checks whether any Setup watermark keys exist which means that a previous installation of setup had already started but not completed -function IsSetupPartiallyCompleted -{ - $isPartiallyCompleted = $false - - #Now check if setup actually completed successfully - [string[]]$roleKeys = "CafeRole","ClientAccessRole","FrontendTransportRole","HubTransportRole","MailboxRole","UnifiedMessagingRole" - - foreach ($key in $roleKeys) - { - $values = $null - $values = Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\ExchangeServer\v15\$($key)" -ErrorAction SilentlyContinue - - if ($null -ne $values) - { - if ($null -ne $values.UnpackedVersion) - { - #If ConfiguredVersion is missing, or Action or Watermark or present, setup needs to be resumed - if ($null -eq $values.ConfiguredVersion -or $null -ne $values.Action -or $null -ne $values.Watermark) - { - $isPartiallyCompleted = $true - break - } - } - } - } - - return $isPartiallyCompleted -} - -#Checks whether setup is running by looking for if the ExSetup.exe process currently exists -function IsSetupRunning -{ - param([string]$SetupProcessName = "ExSetup*") - - return ($null -ne (Get-Process -Name $SetupProcessName -ErrorAction SilentlyContinue)) -} - -#Checks if two strings are equal, or are both either null or empty -function CompareStrings -{ - param([string]$String1, [string]$String2, [switch]$IgnoreCase) - - if (([string]::IsNullOrEmpty($String1) -and [string]::IsNullOrEmpty($String2))) - { - return $true - } - else - { - if ($IgnoreCase -eq $true) - { - return ($String1 -like $String2) - } - else - { - return ($String1 -clike $String2) - } - } -} - -#Checks if two bools are equal, or are both either null or false -function CompareBools($Bool1, $Bool2) -{ - if($Bool1 -ne $Bool2) - { - if (!(($null -eq $Bool1 -and $Bool2 -eq $false) -or ($null -eq $Bool2 -and $Bool1 -eq $false))) - { - return $false - } - } - - return $true -} - -#Takes a string which should be in timespan format, and compares it to an actual EnhancedTimeSpan object. Returns true if they are equal -function CompareTimespanWithString -{ - param([Microsoft.Exchange.Data.EnhancedTimeSpan]$TimeSpan, [string]$String) - - try - { - $converted = [Microsoft.Exchange.Data.EnhancedTimeSpan]::Parse($String) - - return ($TimeSpan.Equals($converted)) - } - catch - { - throw "String '$($String)' is not in a valid format for an EnhancedTimeSpan" - } - - return $false -} - -#Takes a string which should be in ByteQuantifiedSize format, and compares it to an actual ByteQuantifiedSize object. Returns true if they are equal -function CompareByteQuantifiedSizeWithString -{ - param([Microsoft.Exchange.Data.ByteQuantifiedSize]$ByteQuantifiedSize, [string]$String) - - try - { - $converted = [Microsoft.Exchange.Data.ByteQuantifiedSize]::Parse($String) - - return ($ByteQuantifiedSize.Equals($converted)) - } - catch - { - throw "String '$($String)' is not in a valid format for a ByteQuantifiedSize" - } -} - -#Takes a string which should be in Microsoft.Exchange.Data.Unlimited format, and compares with an actual Unlimited object. Returns true if they are equal. -function CompareUnlimitedWithString -{ - param($Unlimited, [string]$String) - - if ($Unlimited.IsUnlimited) - { - return (CompareStrings -String1 "Unlimited" -String2 $String -IgnoreCase) - } - elseif ($Unlimited.Value.GetType() -ne [Microsoft.Exchange.Data.ByteQuantifiedSize]) - { - return (CompareStrings -String1 $Unlimited -String2 $String -IgnoreCase) - } - else - { - return (CompareByteQuantifiedSizeWithString -ByteQuantifiedSize $Unlimited -String $String) - } -} - -#Takes an ADObjectId, gets a mailbox from it, and checks if it's EmailAddresses property contains the given string. -#The Get-Mailbox cmdlet must be loaded for this function to succeed. -function CompareADObjectIdWithEmailAddressString -{ - param([Microsoft.Exchange.Data.Directory.ADObjectId]$ADObjectId, [string]$String) - - if ($null -ne (Get-Command Get-Mailbox -ErrorAction SilentlyContinue)) - { - $mailbox = $ADObjectId | Get-Mailbox -ErrorAction SilentlyContinue - - return ($mailbox.EmailAddresses.Contains($String)) - } - else - { - Write-Error "CompareADObjectIdWithEmailAddressString requires the Get-Mailbox cmdlert" - - return $false - } -} - -#Takes a string containing a given separator, and breaks it into a string array -function StringToArray -{ - param([string]$StringIn, [char]$Separator) - - [string[]]$array = $StringIn.Split($Separator) - - for ($i = 0; $i -lt $array.Length; $i++) - { - $array[$i] = $array[$i].Trim() - } - - return $array -} - -#Takes an array of strings and converts all elements to lowercase -function StringArrayToLower -{ - param([string[]]$Array) - - for ($i = 0; $i -lt $Array.Count; $i++) - { - if (!([string]::IsNullOrEmpty($Array[$i]))) - { - $Array[$i] = $Array[$i].ToLower() - } - } - - return $Array -} - -#Checks whether two arrays have the same contents, where element order doesn't matter -function CompareArrayContents -{ - param([string[]]$Array1, [string[]]$Array2, [switch]$IgnoreCase) - - $hasSameContents = $true - - if ($Array1.Length -ne $Array2.Length) - { - $hasSameContents = $false - } - elseif ($Array1.Count -gt 0 -and $Array2.Count -gt 0) - { - if ($IgnoreCase -eq $true) - { - $Array1 = StringArrayToLower -Array $Array1 - $Array2 = StringArrayToLower -Array $Array2 - } - - foreach ($str in $Array1) - { - if (!($Array2.Contains($str))) - { - $hasSameContents = $false - break - } - } - } - - return $hasSameContents -} - -#Checks whether Array2 contains all elements of Array1 (Array2 may be larger than Array1) -function Array2ContainsArray1Contents -{ - param([string[]]$Array1, [string[]]$Array2, [switch]$IgnoreCase) - - $hasContents = $true - - if ($Array1.Length -eq 0) #Do nothing, as Array2 at a minimum contains nothing - {} - elseif ($Array2.Length -eq 0) #Array2 is empty and Array1 is not. Return false - { - $hasContents = $false - } - else - { - if ($IgnoreCase -eq $true) - { - $Array1 = StringArrayToLower -Array $Array1 - $Array2 = StringArrayToLower -Array $Array2 - } - - foreach ($str in $Array1) - { - if (!($Array2.Contains($str))) - { - $hasContents = $false - break - } - } - } - - return $hasContents -} - -#Takes $PSBoundParameters from another function and adds in the keys and values from the given Hashtable -function AddParameters -{ - param($PSBoundParametersIn, [Hashtable]$ParamsToAdd) - - foreach ($key in $ParamsToAdd.Keys) - { - if (!($PSBoundParametersIn.ContainsKey($key))) #Key doesn't exist, so add it with value - { - $PSBoundParametersIn.Add($key, $ParamsToAdd[$key]) | Out-Null - } - else #Key already exists, so just replace the value - { - $PSBoundParametersIn[$key] = $ParamsToAdd[$key] - } - } -} - -#Takes $PSBoundParameters from another function. If ParamsToRemove is specified, it will remove each param. -#If ParamsToKeep is specified, everything but those params will be removed. If both ParamsToRemove and ParamsToKeep -#are specified, only ParamsToKeep will be used. -function RemoveParameters -{ - param($PSBoundParametersIn, [string[]]$ParamsToKeep, [string[]]$ParamsToRemove) - - if ($ParamsToKeep.Count -gt 0) - { - [string[]]$ParamsToRemove = @() - - $lowerParamsToKeep = StringArrayToLower -Array $ParamsToKeep - - foreach ($key in $PSBoundParametersIn.Keys) - { - if (!($lowerParamsToKeep.Contains($key.ToLower()))) - { - $ParamsToRemove += $key - } - } - } - - if ($ParamsToRemove.Count -gt 0) - { - foreach ($param in $ParamsToRemove) - { - $PSBoundParametersIn.Remove($param) | Out-Null - } - } -} - -function RemoveVersionSpecificParameters -{ - param($PSBoundParametersIn, [string]$ParamName, [string]$ResourceName, [ValidateSet("2013","2016")][string]$ParamExistsInVersion) - - if ($PSBoundParametersIn.ContainsKey($ParamName)) - { - $serverVersion = GetExchangeVersion - - if ($serverVersion -ne $ParamExistsInVersion) - { - Write-Warning "$($ParamName) is not a valid parameter for $($ResourceName) in Exchange $($serverVersion). Skipping usage." - RemoveParameters -PSBoundParametersIn $PSBoundParametersIn -ParamsToRemove $ParamName - } - } -} - -function SetEmptyStringParamsToNull -{ - param($PSBoundParametersIn) - - [string[]] $emptyStringKeys = @() - - #First find all parameters that are a string, and are an empty string ("") - foreach ($key in $PSBoundParametersIn.Keys) - { - if ($null -ne $PSBoundParametersIn[$key] -and $PSBoundParametersIn[$key].GetType().Name -eq "String" -and $PSBoundParametersIn[$key] -eq "") - { - $emptyStringKeys += $key - } - } - - #Now that we have the keys, set their values to null - foreach ($key in $emptyStringKeys) - { - $PSBoundParametersIn[$key] = $null - } -} - -function VerifySetting -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param([string]$Name, [string]$Type, $ExpectedValue, $ActualValue, $PSBoundParametersIn, $VerbosePreference) - - $returnValue = $true - - if ($PSBoundParametersIn.ContainsKey($Name)) - { - if ($Type -like "String") - { - if ((CompareStrings -String1 $ExpectedValue -String2 $ActualValue -IgnoreCase) -eq $false) - { - $returnValue = $false - } - } - elseif ($Type -like "Boolean") - { - if ((CompareBools -Bool1 $ExpectedValue -Bool2 $ActualValue) -eq $false) - { - $returnValue = $false - } - } - elseif ($Type -like "Array") - { - if ((CompareArrayContents -Array1 $ExpectedValue -Array2 $ActualValue -IgnoreCase) -eq $false) - { - $returnValue = $false - } - } - elseif ($Type -like "Int") - { - if ($ExpectedValue -ne $ActualValue) - { - $returnValue = $false - } - } - elseif ($Type -like "Unlimited") - { - if ((CompareUnlimitedWithString -Unlimited $ActualValue -String $ExpectedValue) -eq $false) - { - $returnValue = $false - } - } - elseif ($Type -like "Timespan") - { - if ((CompareTimespanWithString -TimeSpan $ActualValue -String $ExpectedValue) -eq $false) - { - $returnValue = $false - } - } - elseif ($Type -like "ADObjectID") - { - if ((CompareADObjectIdWithEmailAddressString -ADObjectId $ActualValue -String $ExpectedValue) -eq $false) - { - $returnValue = $false - } - } - elseif ($Type -like "ByteQuantifiedSize") - { - if ((CompareByteQuantifiedSizeWithString -ByteQuantifiedSize $ActualValue -String $ExpectedValue) -eq $false) - { - $returnValue = $false - } - } - elseif ($Type -like "IPAddress") - { - if ((CompareIPAddresseWithString -IPAddress $ActualValue -String $ExpectedValue) -eq $false) - { - $returnValue = $false - } - } - elseif ($Type -like "IPAddresses") - { - if ((CompareIPAddressesWithArray -IPAddresses $ActualValue -Array $ExpectedValue) -eq $false) - { - $returnValue = $false - } - } - elseif ($Type -like "SMTPAddress") - { - if ((CompareSmtpAdressWithString -SmtpAddress $ActualValue -String $ExpectedValue) -eq $false) - { - $returnValue = $false - } - } - elseif ($Type -like "PSCredential") - { - if ((Compare-PSCredential -Cred1 $ActualValue -Cred2 $ExpectedValue ) -eq $false) - { - $returnValue = $false - } - } - else - { - throw "Type not found: $($Type)" - } - } - - if ($returnValue -eq $false) - { - ReportBadSetting -SettingName $Name -ExpectedValue $ExpectedValue -ActualValue $ActualValue -VerbosePreference $VerbosePreference - } - - return $returnValue -} - -function ReportBadSetting -{ - param($SettingName, $ExpectedValue, $ActualValue, $VerbosePreference) - - Write-Verbose "Invalid setting '$($SettingName)'. Expected value: '$($ExpectedValue)'. Actual value: '$($ActualValue)'" -} - -function LogFunctionEntry -{ - param([Hashtable]$Parameters, $VerbosePreference) - - $callingFunction = (Get-PSCallStack)[1].FunctionName - - if ($Parameters.Count -gt 0) - { - $parametersString = "" - - foreach ($key in $Parameters.Keys) - { - $value = $Parameters[$key] - - if ($parametersString -ne "") - { - $parametersString += ", " - } - - $parametersString += "$($key) = '$($value)'" - } - - Write-Verbose "Entering function '$($callingFunction)'. Notable parameters: $($parametersString)" - } - else - { - Write-Verbose "Entering function '$($callingFunction)'." - } -} - -function StartScheduledTask -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Path, - - [System.String] - $Arguments, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.String] - $TaskName, - - [System.String] - $WorkingDirectory, - - [System.UInt32] - $MaxWaitMinutes = 0, - - [System.UInt32] - $TaskPriority = 4, - - $VerbosePreference - ) - - $tName = "$([guid]::NewGuid().ToString())" - - if ($PSBoundParameters.ContainsKey("TaskName")) - { - $tName = "$($TaskName) $($tName)" - } - - $action = New-ScheduledTaskAction -Execute "$($Path)" -Argument "$($Arguments)" - - if ($PSBoundParameters.ContainsKey("WorkingDirectory")) - { - $action.WorkingDirectory = $WorkingDirectory - } - - Write-Verbose "Created Scheduled Task with name: $($tName)" - Write-Verbose "Task Action: $($Path) $($Arguments)" - - #Use 'NT AUTHORITY\SYSTEM' as the run as account unless a specific Credential was provided - $credParams = @{User = "NT AUTHORITY\SYSTEM"} - - if ($PSBoundParameters.ContainsKey("Credential")) - { - $credParams["User"] = $Credential.UserName - $credParams.Add("Password", $Credential.GetNetworkCredential().Password) - } - - $task = Register-ScheduledTask @credParams -TaskName "$($tName)" -Action $action -RunLevel Highest -ErrorVariable errRegister -ErrorAction SilentlyContinue - - if (0 -lt $errRegister.Count) - { - throw $errRegister[0] - } - elseif ($null -ne $task -and $task.State -eq "Ready") - { - #Set a time limit on the task - $taskSettings = $task.Settings - $taskSettings.ExecutionTimeLimit = "PT$($MaxWaitMinutes)M" - $taskSettings.Priority = $TaskPriority - Set-ScheduledTask @credParams -TaskName "$($task.TaskName)" -Settings $taskSettings - - Write-Verbose "Starting task at: $([DateTime]::Now)" - - $task | Start-ScheduledTask - } - else - { - throw "Failed to register Scheduled Task" - } -} - -function CheckForCmdletParameter -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param([string]$CmdletName, [string]$ParameterName) - - [bool]$hasParameter = $false - - $command = Get-Command -Name "$($CmdletName)" -ErrorAction SilentlyContinue - - if ($null -ne $command -and $null -ne $command.Parameters) - { - if ($command.Parameters.ContainsKey($ParameterName)) - { - $hasParameter = $true - } - } - - return $hasParameter -} - -function NotePreviousError -{ - $Global:previousError = $null - - if ($Global:error.Count -gt 0) - { - $Global:previousError = $Global:error[0] - } -} - -function ThrowIfNewErrorsEncountered -{ - [CmdletBinding()] - param([string]$CmdletBeingRun, $VerbosePreference) - - #Throw an exception if errors were encountered - if ($Global:error.Count -gt 0 -and $Global:previousError -ne $Global:error[0]) - { - [string]$errorMsg = "Failed to run $($CmdletBeingRun) with: " + $Global:error[0] - Write-Error $errorMsg - throw $errorMsg - } -} - -function RestartAppPoolIfExists -{ - [CmdletBinding()] - param([string]$Name) - - $state = Get-WebAppPoolState -Name $Name -ErrorAction SilentlyContinue - - if ($null -ne $state) - { - Restart-WebAppPool -Name $Name - } - else - { - Write-Verbose "Application pool with name '$($Name)' does not exist. Skipping application pool restart." - } -} - -#Checks if the UM language pack for the specified culture is installed -function IsUMLanguagePackInstalled -{ - Param - ( - [ValidateNotNullOrEmpty()] - [System.String] - $Culture - ) - - return [bool](Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\ExchangeServer\v15\UnifiedMessagingRole\LanguagePacks').$Culture -} - -#Compares a single IPAddress with a string -function CompareIPAddresseWithString -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param([System.Net.IPAddress]$IPAddress, [String]$String) - if (($null -eq $IPAddress -and !([string]::IsNullOrEmpty($String))) -or ($null -ne $IPAddress -and [string]::IsNullOrEmpty($String))) - { - $returnValue = $false - } - elseif ($null -eq $IPAddress -and [string]::IsNullOrEmpty($String)) - { - $returnValue = $true - } - else - { - $returnValue =($IPAddress.Equals([System.Net.IPAddress]::Parse($string))) - } - - if ($returnValue -eq $false) - { - ReportBadSetting -SettingName $IPAddress -ExpectedValue $ExpectedValue -ActualValue $IPAddress -VerbosePreference $VerbosePreference - } - return $returnValue -} - -#Compares a SMTP address with a string -function CompareSmtpAdressWithString -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param($SmtpAddress,[String]$String) - if (($null -eq $SmtpAddress) -and ([string]::IsNullOrEmpty($String))) - { - Write-Verbose "Expected and actual value is empty, therefore equal!" - return $true - } - elseif (($null -eq $SmtpAddress) -and -not ([string]::IsNullOrEmpty($String))) - { - return $false - } - elseif ($SmtpAddress.Gettype() -eq [Microsoft.Exchange.Data.SmtpAddress]) - { - if ([string]::IsNullOrEmpty($String)) - { - return $false - } - else - { - return($SmtpAddress.Equals([Microsoft.Exchange.Data.SmtpAddress]::Parse($string))) - } - } - else - { - Write-Verbose "No type of [Microsoft.Exchange.Data.SmtpAddress]!" - return $false - } -} - -#Compares IPAddresses with an array -function CompareIPAddressesWithArray -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param($IPAddresses, [Array]$Array) - if (([string]::IsNullOrEmpty($IPAddresses)) -and ([string]::IsNullOrEmpty($Array))) - { - $returnValue = $true - } - elseif ((([string]::IsNullOrEmpty($IPAddresses)) -and !(([string]::IsNullOrEmpty($Array)))) -or (!(([string]::IsNullOrEmpty($IPAddresses))) -and ([string]::IsNullOrEmpty($Array)))) - { - $returnValue = $false - } - else - { - CompareArrayContents -Array1 $IPAddresses -Array2 $Array - } - if ($returnValue -eq $false) - { - ReportBadSetting -SettingName $IPAddresses -ExpectedValue $ExpectedValue -ActualValue $IPAddress -VerbosePreference $VerbosePreference - } - return $returnValue -} - -#Compares two give PSCredential -function Compare-PSCredential -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param ( - #[System.Management.Automation.PSCredential] - #[System.Management.Automation.Credential()] - $Cred1, - - #[System.Management.Automation.PSCredential] - #[System.Management.Automation.Credential()] - $Cred2 - ) -Begin { - $returnValue = $false - if ($null -ne $Cred1) { - $Cred1User = $Cred1.UserName - $Cred1Password = $Cred1.GetNetworkCredential().Password - } - if ($null -ne $Cred2) { - $Cred2User = $Cred2.UserName - $Cred2Password = $Cred2.GetNetworkCredential().Password - } -} -Process { - if (($Cred1User -ceq $Cred2User) -and ($Cred1Password -ceq $Cred2Password)){ - Write-Verbose "Credentials match" - $returnValue = $true - } - else{ - Write-Verbose "Credentials don't match" - Write-Verbose "Cred1:$($Cred1User) Cred2:$($Cred2User)" - Write-Verbose "Cred1:$($Cred1Password) Cred2:$($Cred2Password)" - } -} -End { - return $returnValue -} -} - -Export-ModuleMember -Function * diff --git a/lib/puppet_x/dsc_resources/xExchange/Misc/xExchangeDiskPart.psm1 b/lib/puppet_x/dsc_resources/xExchange/Misc/xExchangeDiskPart.psm1 deleted file mode 100644 index d6715254..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/Misc/xExchangeDiskPart.psm1 +++ /dev/null @@ -1,217 +0,0 @@ -#Adds the array of commands to a single temp file, and has disk part execute the temp file -function StartDiskpart -{ - [CmdletBinding()] - [OutputType([System.String])] - Param ([Array]$Commands, [Boolean]$ShowOutput = $true, $VerbosePreference) - - $Tempfile = [System.IO.Path]::GetTempFileName() - - foreach ($Com in $Commands) - { - $CMDLine = $CMDLine + $Com + ", " - Add-Content $Tempfile $Com - } - - $Output = DiskPart /s $Tempfile - - if ($ShowOutput) - { - Write-Verbose "Executed Diskpart commands: $(StringArrayToCommaSeparatedString -Array $Commands). Result:" - Write-Verbose "$($Output)" - } - - Remove-Item $Tempfile - - return $Output -} - -#Uses diskpart to obtain information on the disks and volumes that already exist on the system -function GetDiskInfo -{ - [Hashtable]$global:DiskToVolumeMap = @{} - [Hashtable]$global:VolumeToMountPointMap = @{} - [Hashtable]$global:DiskSizeMap = @{} - [int[]]$diskNums = @() - - $diskList = StartDiskpart -Commands "List Disk" -ShowOutput $false - - $foundDisks = $false - - #First parse out the list of disks - foreach ($line in $diskList) - { - if ($foundDisks -eq $true) - { - if ($line.Contains("Disk ")) - { - #First find the disk number - $startIndex = " Disk ".Length - $endIndex = " -------- ".Length - $diskNumStr = $line.Substring($startIndex, $endIndex - $startIndex).Trim() - - if ($diskNumStr.Length -gt 0) - { - $diskNum = [int]::Parse($diskNumStr) - $diskNums += $diskNum - } - - #Now find the disk size - $startIndex = " -------- ------------- ".Length - $endIndex = " -------- ------------- ------- ".Length - $diskSize = $line.Substring($startIndex, $endIndex - $startIndex).Trim() - - if ($diskSize.Length -gt 0 -and $null -ne $diskNum) - { - $DiskSizeMap.Add($diskNum, $diskSize) - } - } - } - elseif ($line.Contains("-------- ------------- ------- ------- --- ---")) #Scroll forward until we find the where the list of disks starts - { - $foundDisks = $true - } - } - - #Now get info on the disks - foreach ($diskNum in $diskNums) - { - $diskDetails = StartDiskpart -Commands "Select Disk $($diskNum)","Detail Disk" -ShowOutput $false - - $foundVolumes = $false - - for ($i = 0; $i -lt $diskDetails.Count; $i++) - { - $line = $diskDetails[$i] - - if ($foundVolumes -eq $true) - { - if ($line.StartsWith(" Volume ")) - { - #First find the volume number - $volStart = " Volume ".Length - $volEnd = " ---------- ".Length - $volStr = $line.Substring($volStart, $volEnd - $volStart).Trim() - - if ($volStr.Length -gt 0) - { - $volNum = [int]::Parse($volStr) - - AddObjectToMapOfObjectArrays -Map $DiskToVolumeMap -Key $diskNum -Value $volNum - - #Now parse out the drive letter if it's set - $letterStart = " ---------- ".Length - $letterEnd = $line.IndexOf(" ---------- --- ") + " ---------- --- ".Length - $letter = $line.Substring($letterStart, $letterEnd - $letterStart).Trim() - - if ($letter.Length -eq 1) - { - AddObjectToMapOfObjectArrays -Map $VolumeToMountPointMap -Key $volNum -Value $letter - } - - #Now find all the mount points - do - { - $line = $diskDetails[++$i] - - if ($null -eq $line -or $line.StartsWith(" Volume ") -or $line.Trim().Length -eq 0) #We've hit the next volume, or the end of all info - { - $i-- #Move $i back one as we may have overrun the start of the next volume info - break - } - else - { - $mountPoint = $line.Trim() - - AddObjectToMapOfObjectArrays -Map $VolumeToMountPointMap -Key $volNum -Value $mountPoint - } - - } while ($i -lt $diskDetails.Count) - - } - } - } - elseif ($line.Contains("There are no volumes.")) - { - [string[]]$emptyArray = @() - $DiskToVolumeMap[$diskNum] = $emptyArray - - break - } - elseif ($line.Contains("---------- --- ----------- ----- ---------- ------- --------- --------")) - { - $foundVolumes = $true - } - } - } -} - -function StringArrayToCommaSeparatedString -{ - param([string[]]$Array) - - $string = "" - - if ($null -ne $Array -and $Array.Count -gt 0) - { - $string = $Array[0] - - for ($i = 1; $i -lt $Array.Count; $i++) - { - $string += ",$($Array[$i])" - } - } - - return $string -} - -#Takes a hashtable, and adds the given key and value. -function AddObjectToMapOfObjectArrays -{ - Param([Hashtable]$Map, $Key, $Value) - - if ($Map.ContainsKey($Key)) - { - $Map[$Key] += $Value - } - else - { - [object[]]$Array = $Value - $Map[$Key] = $Array - } -} - -#Checks whether the mount point specified in the given path already exists as a mount point -#Returns the volume number if it does exist, else -1 -function MountPointExists -{ - param([string]$Path) - - foreach ($key in $global:VolumeToMountPointMap.Keys) - { - foreach ($value in $global:VolumeToMountPointMap[$key]) - { - #Make sure both paths end with the same character - if (($value.EndsWith("\")) -eq $false) - { - $value += "\" - } - - if (($Path.EndsWith("\")) -eq $false) - { - $Path += "\" - } - - #Do the comparison - if ($value -like $Path) - { - return $key - } - } - } - - return -1 -} - - -Export-ModuleMember -Function * diff --git a/lib/puppet_x/dsc_resources/xExchange/xExchange.psd1 b/lib/puppet_x/dsc_resources/xExchange/xExchange.psd1 deleted file mode 100644 index a43e2b60..00000000 --- a/lib/puppet_x/dsc_resources/xExchange/xExchange.psd1 +++ /dev/null @@ -1,129 +0,0 @@ -# -# Module manifest for module 'xExchange' -# -# Generated by: Mike Hendrickson -# -# Generated on: 7/23/2014 -# - -@{ - -# Script module or binary module file associated with this manifest. -# RootModule = '' - -# Version number of this module. -ModuleVersion = '1.16.0.0' - -# ID used to uniquely identify this module -GUID = '9a908ca3-8a67-485c-a014-66ba37fcc2a4' - -# Author of this module -Author = 'Mike Hendrickson, Jason Walker, Michael Greene' - -# Company or vendor of this module -CompanyName = 'Microsoft' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'This DSC Module allows you to configure many different properties of Exchange 2013 servers, including individual server properties, databases and mount points, and Database Availability Groups.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Name of the Windows PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the Windows PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module -# DotNetFrameworkVersion = '' - -# Minimum version of the common language runtime (CLR) required by this module -# CLRVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -# RequiredModules = @() - -# Assemblies that must be loaded prior to importing this module -# RequiredAssemblies = @() - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -# FormatsToProcess = @() - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -# NestedModules = @() - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Variables to export from this module -VariablesToExport = '*' - -# Aliases to export from this module -AliasesToExport = '*' - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xExchange/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xExchange' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* Add missing parameters to xExchClientAccessServer - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - -} - - - - - - - - - - - diff --git a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/CommonResourceHelper.psm1 b/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/CommonResourceHelper.psm1 deleted file mode 100644 index 61e4f767..00000000 --- a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/CommonResourceHelper.psm1 +++ /dev/null @@ -1,265 +0,0 @@ -<# - .SYNOPSIS - Creates and throws an invalid argument exception. - - .PARAMETER Message - The message explaining why this error is being thrown. - - .PARAMETER ArgumentName - The name of the invalid argument that is causing this error to be thrown. -#> -function New-InvalidArgumentException -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Message, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $ArgumentName - ) - - $argumentException = New-Object -TypeName 'ArgumentException' ` - -ArgumentList @($Message, $ArgumentName) - - $newObjectParameters = @{ - TypeName = 'System.Management.Automation.ErrorRecord' - ArgumentList = @($argumentException, $ArgumentName, 'InvalidArgument', $null) - } - - $errorRecord = New-Object @newObjectParameters - - throw $errorRecord -} - -<# - .SYNOPSIS - Creates and throws an invalid operation exception. - - .PARAMETER Message - The message explaining why this error is being thrown. - - .PARAMETER ErrorRecord - The error record containing the exception that is causing this terminating error. -#> -function New-InvalidOperationException -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Message, - - [Parameter()] - [ValidateNotNull()] - [System.Management.Automation.ErrorRecord] - $ErrorRecord - ) - - if ($null -eq $ErrorRecord) - { - $invalidOperationException = New-Object -TypeName 'InvalidOperationException' ` - -ArgumentList @($Message) - } - else - { - $invalidOperationException = New-Object -TypeName 'InvalidOperationException' ` - -ArgumentList @($Message, $ErrorRecord.Exception) - } - - $newObjectParameters = @{ - TypeName = 'System.Management.Automation.ErrorRecord' - ArgumentList = @( - $invalidOperationException.ToString(), - 'MachineStateIncorrect', - 'InvalidOperation', - $null - ) - } - - $errorRecordToThrow = New-Object @newObjectParameters - - throw $errorRecordToThrow -} - -<# - .SYNOPSIS - Creates and throws an object not found exception. - - .PARAMETER Message - The message explaining why this error is being thrown. - - .PARAMETER ErrorRecord - The error record containing the exception that is causing this terminating error. -#> -function New-ObjectNotFoundException -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Message, - - [Parameter()] - [ValidateNotNull()] - [System.Management.Automation.ErrorRecord] - $ErrorRecord - ) - - if ($null -eq $ErrorRecord) - { - $exception = New-Object -TypeName 'System.Exception' ` - -ArgumentList @($Message) - } - else - { - $exception = New-Object -TypeName 'System.Exception' ` - -ArgumentList @($Message, $ErrorRecord.Exception) - } - - $newObjectParameters = @{ - TypeName = 'System.Management.Automation.ErrorRecord' - ArgumentList = @( - $exception.ToString(), - 'MachineStateIncorrect', - 'ObjectNotFound', - $null - ) - } - - $errorRecordToThrow = New-Object @newObjectParameters - - throw $errorRecordToThrow -} - -<# - .SYNOPSIS - Creates and throws an invalid result exception. - - .PARAMETER Message - The message explaining why this error is being thrown. - - .PARAMETER ErrorRecord - The error record containing the exception that is causing this terminating error. -#> -function New-InvalidResultException -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Message, - - [Parameter()] - [ValidateNotNull()] - [System.Management.Automation.ErrorRecord] - $ErrorRecord - ) - - if ($null -eq $ErrorRecord) - { - $exception = New-Object -TypeName 'System.Exception' ` - -ArgumentList @($Message) - } - else - { - $exception = New-Object -TypeName 'System.Exception' ` - -ArgumentList @($Message, $ErrorRecord.Exception) - } - - $newObjectParameters = @{ - TypeName = 'System.Management.Automation.ErrorRecord' - ArgumentList = @( - $exception.ToString(), - 'MachineStateIncorrect', - 'InvalidResult', - $null - ) - } - - $errorRecordToThrow = New-Object @newObjectParameters - - throw $errorRecordToThrow -} - -<# - .SYNOPSIS - Retrieves the localized string data based on the machine's culture. - Falls back to en-US strings if the machine's culture is not supported. - - .PARAMETER ResourceName - The name of the resource as it appears before '.strings.psd1' of the localized string file. - For example: - For WindowsOptionalFeature: MSFT_WindowsOptionalFeature - For Service: MSFT_ServiceResource - For Registry: MSFT_RegistryResource - For Helper: xSQLServerHelper - - .PARAMETER ScriptRoot - Optional. The root path where to expect to find the culture folder. This is only needed - for localization in helper modules. This should not normally be used for resources. -#> -function Get-LocalizedData -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $ResourceName, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $ScriptRoot - ) - - if ( -not $ScriptRoot ) - { - $resourceDirectory = Join-Path -Path $PSScriptRoot -ChildPath $ResourceName - $localizedStringFileLocation = Join-Path -Path $resourceDirectory -ChildPath $PSUICulture - } - else - { - $localizedStringFileLocation = Join-Path -Path $ScriptRoot -ChildPath $PSUICulture - } - - if (-not (Test-Path -Path $localizedStringFileLocation)) - { - # Fallback to en-US - if ( -not $ScriptRoot ) - { - $localizedStringFileLocation = Join-Path -Path $resourceDirectory -ChildPath 'en-US' - } - else - { - $localizedStringFileLocation = Join-Path -Path $ScriptRoot -ChildPath 'en-US' - } - } - - Import-LocalizedData ` - -BindingVariable 'localizedData' ` - -FileName "$ResourceName.strings.psd1" ` - -BaseDirectory $localizedStringFileLocation - - return $localizedData -} - -Export-ModuleMember -Function @( - 'New-InvalidArgumentException', - 'New-InvalidOperationException', - 'New-ObjectNotFoundException', - 'New-InvalidResultException', - 'Get-LocalizedData' ) diff --git a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xCluster/MSFT_xCluster.psm1 b/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xCluster/MSFT_xCluster.psm1 deleted file mode 100644 index 66494aeb..00000000 --- a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xCluster/MSFT_xCluster.psm1 +++ /dev/null @@ -1,413 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) ` - -ChildPath 'CommonResourceHelper.psm1') - -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xCluster' - -<# - .SYNOPSIS - Returns the current state of the failover cluster. - - .PARAMETER Name - Name of the failover cluster. - - .PARAMETER StaticIPAddress - Static IP Address of the failover cluster. - - .PARAMETER DomainAdministratorCredential - Credential used to create the failover cluster in Active Directory. -#> -function Get-TargetResource -{ - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [System.String] - $StaticIPAddress, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $DomainAdministratorCredential - ) - - Write-Verbose -Message ($script:localizedData.GetClusterInformation -f $Name) - - $computerInformation = Get-CimInstance -ClassName Win32_ComputerSystem - if (($null -eq $computerInformation) -or ($null -eq $computerInformation.Domain)) - { - $errorMessage = $script:localizedData.TargetNodeDomainMissing - New-InvalidOperationException -Message $errorMessage - } - - try - { - ($oldToken, $context, $newToken) = Set-ImpersonateAs -Credential $DomainAdministratorCredential - - $cluster = Get-Cluster -Name $Name -Domain $computerInformation.Domain - if ($null -eq $cluster) - { - $errorMessage = $script:localizedData.ClusterNameNotFound -f $Name - New-ObjectNotFoundException -Message $errorMessage - } - - $address = Get-ClusterGroup -Cluster $Name -Name 'Cluster IP Address' | Get-ClusterParameter -Name 'Address' - } - finally - { - if ($context) - { - $context.Undo() - $context.Dispose() - Close-UserToken -Token $newToken - } - } - - @{ - Name = $Name - StaticIPAddress = $address.Value - DomainAdministratorCredential = $DomainAdministratorCredential - } -} - -<# - .SYNOPSIS - Creates the failover cluster and adds a node to the failover cluster. - - .PARAMETER Name - Name of the failover cluster. - - .PARAMETER StaticIPAddress - Static IP Address of the failover cluster. - - .PARAMETER DomainAdministratorCredential - Credential used to create the failover cluster in Active Directory. - - .NOTES - If the cluster does not exist, it will be created in the domain and the - static IP address will be assigned to the cluster. - When the cluster exist (either it was created or already existed), it - will add the target node ($env:COMPUTERNAME) to the cluster. - If the target node already is a member of the failover cluster but has - status down, it will be removed and then added again to the failover - cluster. -#> -function Set-TargetResource -{ - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [System.String] - $StaticIPAddress, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $DomainAdministratorCredential - ) - - $bCreate = $true - - Write-Verbose -Message ($script:localizedData.CheckClusterPresent -f $Name) - - $computerInformation = Get-CimInstance -ClassName Win32_ComputerSystem - if (($null -eq $computerInformation) -or ($null -eq $computerInformation.Domain)) - { - $errorMessage = $script:localizedData.TargetNodeDomainMissing - New-InvalidOperationException -Message $errorMessage - } - - try - { - $cluster = Get-Cluster -Name $Name -Domain $computerInformation.Domain - - if ($cluster) - { - $bCreate = $false - } - } - catch - { - $bCreate = $true - } - - try - { - ($oldToken, $context, $newToken) = Set-ImpersonateAs -Credential $DomainAdministratorCredential - - if ($bCreate) - { - Write-Verbose -Message ($script:localizedData.ClusterAbsent -f $Name) - - New-Cluster -Name $Name -Node $env:COMPUTERNAME -StaticAddress $StaticIPAddress -NoStorage -Force -ErrorAction Stop - - if ( -not (Get-Cluster)) - { - $errorMessage = $script:localizedData.FailedCreatingCluster - New-InvalidOperationException -Message $errorMessage - } - - Write-Verbose -Message ($script:localizedData.ClusterCreated -f $Name) - } - else - { - $targetNodeName = $env:COMPUTERNAME - - Write-Verbose -Message ($script:localizedData.AddNodeToCluster -f $targetNodeName, $Name) - - $list = Get-ClusterNode -Cluster $Name - foreach ($node in $list) - { - if ($node.Name -eq $targetNodeName) - { - if ($node.State -eq 'Down') - { - Write-Verbose -Message ($script:localizedData.RemoveOfflineNodeFromCluster -f $targetNodeName, $Name) - - Remove-ClusterNode -Name $targetNodeName -Cluster $Name -Force - } - } - } - - Add-ClusterNode -Name $targetNodeName -Cluster $Name -NoStorage - - Write-Verbose -Message ($script:localizedData.AddNodeToClusterSuccessful -f $targetNodeName, $Name) - } - } - finally - { - if ($context) - { - $context.Undo() - $context.Dispose() - Close-UserToken -Token $newToken - } - } -} - -<# - .SYNOPSIS - Test the failover cluster exist and that the node is a member of the - failover cluster. - - .PARAMETER Name - Name of the failover cluster. - - .PARAMETER StaticIPAddress - Static IP Address of the failover cluster. - - .PARAMETER DomainAdministratorCredential - Credential used to create the failover cluster in Active Directory. - - .NOTES - The code will check the following in order: - - 1. Is target node a member of the Active Directory domain? - 2. Does the failover cluster exist in the Active Directory domain? - 3. Is the target node a member of the failover cluster? - 4. Does the cluster node have the status UP? - - If the first return false an error will be thrown. If either of the - other return $false, then the cluster will be created, if it does not - exist and then the node will be added to the failover cluster. -#> -function Test-TargetResource -{ - [OutputType([Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [System.String] - $StaticIPAddress, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $DomainAdministratorCredential - ) - - $returnValue = $false - - Write-Verbose -Message ($script:localizedData.CheckClusterPresent -f $Name) - - $ComputerInfo = Get-CimInstance -ClassName Win32_ComputerSystem - if (($null -eq $ComputerInfo) -or ($null -eq $ComputerInfo.Domain)) - { - $errorMessage = $script:localizedData.TargetNodeDomainMissing - New-InvalidOperationException -Message $errorMessage - } - - try - { - ($oldToken, $context, $newToken) = Set-ImpersonateAs -Credential $DomainAdministratorCredential - - $cluster = Get-Cluster -Name $Name -Domain $ComputerInfo.Domain - - Write-Verbose -Message ($script:localizedData.ClusterPresent -f $Name) - - if ($cluster) - { - $targetNodeName = $env:COMPUTERNAME - - Write-Verbose -Message ($script:localizedData.CheckClusterNodeIsUp -f $targetNodeName, $Name) - - $allNodes = Get-ClusterNode -Cluster $Name - - foreach ($node in $allNodes) - { - if ($node.Name -eq $targetNodeName) - { - if ($node.State -eq 'Up') - { - $returnValue = $true - } - else - { - Write-Verbose -Message ($script:localizedData.ClusterNodeIsDown -f $targetNodeName, $Name) - } - - break - } - } - - if ($returnValue) - { - Write-Verbose -Message ($script:localizedData.ClusterNodePresent -f $targetNodeName, $Name) - } - else - { - Write-Verbose -Message ($script:localizedData.ClusterNodeAbsent -f $targetNodeName, $Name) - } - } - } - catch - { - Write-Verbose -Message ($script:localizedData.ClusterAbsentWithError -f $Name, $_.Message) - } - finally - { - if ($context) - { - $context.Undo() - $context.Dispose() - - Close-UserToken -Token $newToken - } - } - - $returnValue -} - -<# - .SYNOPSIS - Loads and returns a reference to the impersonation library. - -#> -function Get-ImpersonateLib -{ - if ($script:ImpersonateLib) - { - return $script:ImpersonateLib - } - - $sig = @' -[DllImport("advapi32.dll", SetLastError = true)] -public static extern bool LogonUser(string lpszUsername, string lpszDomain, string lpszPassword, int dwLogonType, int dwLogonProvider, ref IntPtr phToken); - -[DllImport("kernel32.dll")] -public static extern Boolean CloseHandle(IntPtr hObject); -'@ - $script:ImpersonateLib = Add-Type -PassThru -Namespace 'Lib.Impersonation' -Name ImpersonationLib -MemberDefinition $sig - - return $script:ImpersonateLib -} - -<# - .SYNOPSIS - Starts to impersonate the credentials provided in parameter Credential on the current user context. - - .PARAMETER Credential - The credentials that should be impersonated. - - .OUTPUTS - Returns three values. - - First value: The current user token before impersonation. - Second value: The impersonation context returned when impersonation is started. - Third value: The impersonated user token. - - .NOTES - LogonUser function - https://msdn.microsoft.com/en-us/library/windows/desktop/aa378184(v=vs.85).aspx - - WindowsIdentity.Impersonate Method () - https://msdn.microsoft.com/en-us/library/w070t6ka(v=vs.110).aspx -#> -function Set-ImpersonateAs -{ - param - ( - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $Credential - ) - - [IntPtr] $userToken = [Security.Principal.WindowsIdentity]::GetCurrent().Token - $userToken - $ImpersonateLib = Get-ImpersonateLib - - $bLogin = $ImpersonateLib::LogonUser($Credential.GetNetworkCredential().UserName, $Credential.GetNetworkCredential().Domain, $Credential.GetNetworkCredential().Password, - 9, 0, [ref]$userToken) - - if ($bLogin) - { - $Identity = New-Object -TypeName Security.Principal.WindowsIdentity -ArgumentList $userToken - $context = $Identity.Impersonate() - } - else - { - $errorMessage = $script:localizedData.UnableToImpersonateUser -f $Credential.GetNetworkCredential().UserName - New-InvalidOperationException -Message $errorMessage - } - - $context, $userToken -} - -<# - .SYNOPSIS - Closes a (impersonation) user token. - - .PARAMETER Token - The user token to close. - - .NOTES - CloseHandle function - https://msdn.microsoft.com/en-us/library/windows/desktop/ms724211(v=vs.85).aspx -#> -function Close-UserToken -{ - param - ( - [Parameter(Mandatory = $true)] - [System.IntPtr] - $Token - ) - - $ImpersonateLib = Get-ImpersonateLib - - $bLogin = $ImpersonateLib::CloseHandle($Token) - if (-not $bLogin) - { - $errorMessage = $script:localizedData.UnableToCloseToken -f $Token.ToString() - New-InvalidOperationException -Message $errorMessage - } -} diff --git a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xCluster/MSFT_xCluster.schema.mof b/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xCluster/MSFT_xCluster.schema.mof deleted file mode 100644 index ea908a61..00000000 --- a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xCluster/MSFT_xCluster.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -#pragma namespace("\\\\.\\root\\microsoft\\windows\\DesiredStateConfiguration") - -[ClassVersion("1.0.0"), FriendlyName("xCluster")] -class MSFT_xCluster : OMI_BaseResource -{ - [key, Description("Name of the Cluster")] string Name; - [required, Description("StaticIPAddress of the Cluster")] string StaticIPAddress; - - [required, EmbeddedInstance("MSFT_Credential"), Description("Credential to create the cluster")] - String DomainAdministratorCredential; -}; diff --git a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xCluster/en-US/MSFT_xCluster.strings.psd1 b/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xCluster/en-US/MSFT_xCluster.strings.psd1 deleted file mode 100644 index 353c2d48..00000000 --- a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xCluster/en-US/MSFT_xCluster.strings.psd1 +++ /dev/null @@ -1,22 +0,0 @@ -# Localized resources for xCluster - -ConvertFrom-StringData @' - CheckClusterPresent = Checking if cluster {0} is present. - ClusterPresent = Cluster {0} is present. - ClusterAbsent = Cluster {0} is NOT present. - ClusterCreated = Created cluster {0}. - AddNodeToCluster = Adding node {0} to cluster {1}. - RemoveOfflineNodeFromCluster = Node {0} is down, need to remove it from the cluster {1}. - AddNodeToClusterSuccessful = Added node {0} to cluster {1}. - CheckClusterNodeIsUp = Checking if the node {0} is a member of the cluster {1}, and so that node status is 'Up'. - ClusterNodeIsDown = Node {0} is in the cluster {1} but the status is not 'Up'. Node will be treated as NOT being a member of the cluster {1}. - ClusterNodePresent = Cluster node {0} is a member of cluster {1}. - ClusterNodeAbsent = Cluster node {0} is NOT a member of cluster {1}. - ClusterAbsentWithError = Cluster {0} is NOT present with error: {1} - TargetNodeDomainMissing = Can't find the target node's domain name. - ClusterNameNotFound = Can't find the cluster {0}. - FailedCreatingCluster = Cluster creation failed. Please verify output of 'Get-Cluster' command. - UnableToImpersonateUser = Can't logon as user {0}. - UnableToCloseToken = Can't close impersonation token {0}. - GetClusterInformation = Retrieving information for cluster {0}. -'@ diff --git a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterDisk/MSFT_xClusterDisk.psm1 b/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterDisk/MSFT_xClusterDisk.psm1 deleted file mode 100644 index 0cfcd56d..00000000 --- a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterDisk/MSFT_xClusterDisk.psm1 +++ /dev/null @@ -1,185 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) ` - -ChildPath 'CommonResourceHelper.psm1') - -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xClusterDisk' - -<# - .SYNOPSIS - Returns the current state of the failover cluster disk resource. - - .PARAMETER Number - The disk number of the cluster disk. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Number - ) - - Write-Verbose -Message ($script:localizedData.GetClusterDiskInformation -f $Number) - - if ($null -ne ($diskInstance = Get-CimInstance -ClassName MSCluster_Disk -Namespace 'Root\MSCluster' -Filter "Number = $Number")) - { - $diskResource = Get-ClusterResource | - Where-Object -FilterScript { $_.ResourceType -eq 'Physical Disk' } | - Where-Object -FilterScript { ($_ | Get-ClusterParameter -Name DiskIdGuid).Value -eq $diskInstance.Id } - - @{ - Number = $Number - Ensure = 'Present' - Label = $diskResource.Name - } - } - else - { - @{ - Number = $Number - Ensure = 'Absent' - Label = '' - } - } -} - -<# - .SYNOPSIS - Adds or removed the failover cluster disk resource from the failover cluster. - - .PARAMETER Number - The disk number of the cluster disk. - - .PARAMETER Ensure - Define if the cluster disk should be added (Present) or removed (Absent). - Default value is 'Present'. - - .PARAMETER Label - The disk label that should be assigned to the disk on the Failover Cluster - disk resource. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Number, - - [Parameter()] - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present', - - [Parameter()] - [System.String] - $Label - ) - - $getTargetResourceResult = Get-TargetResource -Number $Number - - if ($Ensure -eq 'Present') - { - if ($getTargetResourceResult.Ensure -ne $Ensure) - { - Write-Verbose -Message ($script:localizedData.AddDiskToCluster -f $Number) - - Get-ClusterAvailableDisk | Where-Object -FilterScript { - $_.Number -eq $Number - } | Add-ClusterDisk - } - - if ($getTargetResourceResult.Label -ne $Label) - { - Write-Verbose -Message ($script:localizedData.SetDiskLabel -f $Number, $Label) - - $diskInstance = Get-CimInstance -ClassName MSCluster_Disk -Namespace 'Root\MSCluster' -Filter "Number = $Number" - - $diskResource = Get-ClusterResource | - Where-Object -FilterScript { $_.ResourceType -eq 'Physical Disk' } | - Where-Object -FilterScript { - ($_ | Get-ClusterParameter -Name DiskIdGuid).Value -eq $diskInstance.Id - } - - # Set the label of the cluster disk - $diskResource.Name = $Label - $diskResource.Update() - } - } - else - { - if ($getTargetResourceResult.Ensure -eq 'Present' -and $Ensure -eq 'Absent') - { - Write-Verbose -Message ($script:localizedData.RemoveDiskFromCluster -f $Number) - - $diskInstance = Get-CimInstance -ClassName MSCluster_Disk -Namespace 'Root\MSCluster' -Filter "Number = $Number" - - $diskResource = Get-ClusterResource | - Where-Object -FilterScript { $_.ResourceType -eq 'Physical Disk' } | - Where-Object -FilterScript { - ($_ | Get-ClusterParameter -Name DiskIdGuid).Value -eq $diskInstance.Id - } - - # Remove the cluster disk - $diskResource | Remove-ClusterResource -Force - } - } -} - -<# - .SYNOPSIS - Tests that the failover cluster disk resource exist in the failover cluster, - and that is has the correct label. - - .PARAMETER Number - The disk number of the cluster disk. - - .PARAMETER Ensure - Define if the cluster disk should be added (Present) or removed (Absent). - Default value is 'Present'. - - .PARAMETER Label - The disk label that should be assigned to the disk on the Failover Cluster - disk resource. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Number, - - [Parameter()] - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present', - - [Parameter()] - [System.String] - $Label - ) - - Write-Verbose -Message ($script:localizedData.EvaluatingClusterDiskInformation -f $Number) - - $getTargetResourceResult = Get-TargetResource -Number $Number - - if($Ensure -eq 'Present') - { - return ( - ($Ensure -eq $getTargetResourceResult.Ensure) -and - (($Label -eq $getTargetResourceResult.Label) -or (-not $PSBoundParameters.ContainsKey('Label'))) - ) - } - else - { - return $Ensure -eq $getTargetResourceResult.Ensure - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterDisk/MSFT_xClusterDisk.schema.mof b/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterDisk/MSFT_xClusterDisk.schema.mof deleted file mode 100644 index d199f533..00000000 --- a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterDisk/MSFT_xClusterDisk.schema.mof +++ /dev/null @@ -1,7 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xClusterDisk")] -class MSFT_xClusterDisk : OMI_BaseResource -{ - [Key, Description("The disk number of the cluster disk.")] String Number; - [Write, Description("Define if the cluster disk should be added (Present) or removed (Absent). Default value is 'Present'."),ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] string Ensure; - [Write, Description("The disk label that should be assigned to the disk on the Failover Cluster disk resource.")] String Label; -}; diff --git a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterDisk/en-US/MSFT_xClusterDisk.strings.psd1 b/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterDisk/en-US/MSFT_xClusterDisk.strings.psd1 deleted file mode 100644 index 761c7123..00000000 --- a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterDisk/en-US/MSFT_xClusterDisk.strings.psd1 +++ /dev/null @@ -1,9 +0,0 @@ -# Localized resources for xClusterDisk - -ConvertFrom-StringData @' - AddDiskToCluster = Add the disk {0} to the cluster. - SetDiskLabel = Set the disk label for the disk {0} to '{1}'. - RemoveDiskFromCluster = Remove the disk {0} from the cluster. - GetClusterDiskInformation = Retrieving information for cluster disk {0}. - EvaluatingClusterDiskInformation = Evaluating state of cluster disk {0}. -'@ diff --git a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterNetwork/MSFT_xClusterNetwork.psm1 b/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterNetwork/MSFT_xClusterNetwork.psm1 deleted file mode 100644 index 494be5a8..00000000 --- a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterNetwork/MSFT_xClusterNetwork.psm1 +++ /dev/null @@ -1,236 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) ` - -ChildPath 'CommonResourceHelper.psm1') - -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xClusterNetwork' - -<# - .SYNOPSIS - Returns the current state of the failover cluster network resource. - - .PARAMETER Address - The address for the cluster network in the format '10.0.0.0'. - - .PARAMETER AddressMask - The address mask for the cluster network in the format '255.255.255.0'. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Address, - - [Parameter(Mandatory = $true)] - [System.String] - $AddressMask - ) - - Write-Verbose -Message ($script:localizedData.GetClusterNetworkInformation -f $Name) - - $NetworkResource = Get-ClusterNetwork | Where-Object -FilterScript { - $_.Address -eq $Address -and $_.AddressMask -eq $AddressMask - } - - @{ - Address = $Address - AddressMask = $AddressMask - Name = $NetworkResource.Name - Role = $NetworkResource.Role - Metric = $NetworkResource.Metric - } -} - -<# - .SYNOPSIS - Configures the properties Name, Role and Metric of the failover cluster - network resource. - - .PARAMETER Address - The address for the cluster network in the format '10.0.0.0'. - - .PARAMETER AddressMask - The address mask for the cluster network in the format '255.255.255.0'. - - .PARAMETER Name - The name of the cluster network. If the cluster network name is not in - desired state it will be renamed to match this name. - - .PARAMETER Role - The role of the cluster network. If the cluster network role is not in - desired state it will change to match this role. - - The cluster network role can be set to either the value 0, 1 or 3. - - 0 = Do not allow cluster network communication - 1 = Allow cluster network communication only - 3 = Allow cluster network communication and client connectivity - - See this article for more information about cluster network role values; - https://technet.microsoft.com/en-us/library/dn550728(v=ws.11).aspx - - .PARAMETER Metric - The metric number for the cluster network. If the cluster network metric - number is not in desired state it will be changed to match this metric - number. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Address, - - [Parameter(Mandatory = $true)] - [System.String] - $AddressMask, - - [Parameter()] - [System.String] - $Name, - - [Parameter()] - [ValidateSet('0', '1', '3')] - [System.String] - $Role, - - [Parameter()] - [System.String] - $Metric - ) - - $getTargetResourceResult = Get-TargetResource -Address $Address -AddressMask $AddressMask - - if ($PSBoundParameters.ContainsKey('Name') -and $getTargetResourceResult.Name -ne $Name) - { - Write-Verbose -Message ($script:localizedData.ChangeNetworkName -f $Address, $AddressMask, $Name) - - $clusterNetworkResource = Get-ClusterNetwork | Where-Object -FilterScript { - $_.Address -eq $Address -and $_.AddressMask -eq $AddressMask - } - $clusterNetworkResource.Name = $Name - $clusterNetworkResource.Update() - } - - if ($PSBoundParameters.ContainsKey('Role') -and $getTargetResourceResult.Role -ne $Role) - { - Write-Verbose -Message ($script:localizedData.ChangeNetworkRole -f $Address, $AddressMask, $Role) - - $clusterNetworkResource = Get-ClusterNetwork | Where-Object -FilterScript { - $_.Address -eq $Address -and $_.AddressMask -eq $AddressMask - } - $clusterNetworkResource.Role = $Role - $clusterNetworkResource.Update() - } - - if ($PSBoundParameters.ContainsKey('Metric') -and $getTargetResourceResult.Metric -ne $Metric) - { - Write-Verbose -Message ($script:localizedData.ChangeNetworkMetric -f $Address, $AddressMask, $Metric) - - $clusterNetworkResource = Get-ClusterNetwork | Where-Object -FilterScript { - $_.Address -eq $Address -and $_.AddressMask -eq $AddressMask - } - $clusterNetworkResource.Metric = $Metric - $clusterNetworkResource.Update() - } -} - -<# - .SYNOPSIS - Tests that the failover cluster network resource exist and has the correct - values for the properties Name, Role and Metric. - - .PARAMETER Address - The address for the cluster network in the format '10.0.0.0'. - - .PARAMETER AddressMask - The address mask for the cluster network in the format '255.255.255.0'. - - .PARAMETER Name - The name of the cluster network. If the cluster network name is not in - desired state it will be renamed to match this name. - - .PARAMETER Role - The role of the cluster network. If the cluster network role is not in - desired state it will change to match this role. - - The cluster network role can be set to either the value 0, 1 or 3. - - 0 = Do not allow cluster network communication - 1 = Allow cluster network communication only - 3 = Allow cluster network communication and client connectivity - - See this article for more information about cluster network role values; - https://technet.microsoft.com/en-us/library/dn550728(v=ws.11).aspx - - .PARAMETER Metric - The metric number for the cluster network. If the cluster network metric - number is not in desired state it will be changed to match this metric - number. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Address, - - [Parameter(Mandatory = $true)] - [System.String] - $AddressMask, - - [Parameter()] - [System.String] - $Name, - - [Parameter()] - [ValidateSet('0', '1', '3')] - [System.String] - $Role, - - [Parameter()] - [System.String] - $Metric - ) - - Write-Verbose -Message ($script:localizedData.EvaluatingClusterNetworkInformation -f $Name) - - $getTargetResourceResult = Get-TargetResource -Address $Address -AddressMask $AddressMask - - $testTargetResourceReturnValue = $true - - if ($PSBoundParameters.ContainsKey('Name')) - { - if ($Name -ne $getTargetResourceResult.Name) - { - $testTargetResourceReturnValue = $false - } - } - - if ($PSBoundParameters.ContainsKey('Role')) - { - if ($Role -ne $getTargetResourceResult.Role) - { - $testTargetResourceReturnValue = $false - } - } - - if ($PSBoundParameters.ContainsKey('Metric')) - { - if ($Metric -ne $getTargetResourceResult.Metric) - { - $testTargetResourceReturnValue = $false - } - } - - $testTargetResourceReturnValue -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterNetwork/MSFT_xClusterNetwork.schema.mof b/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterNetwork/MSFT_xClusterNetwork.schema.mof deleted file mode 100644 index 63945b7e..00000000 --- a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterNetwork/MSFT_xClusterNetwork.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xClusterNetwork")] -class MSFT_xClusterNetwork : OMI_BaseResource -{ - [Key, Description("The address for the cluster network in the format '10.0.0.0'.")] String Address; - [Key, Description("The address mask for the cluster network in the format '255.255.255.0'.")] String AddressMask; - [Write, Description("The name of the cluster network. If the cluster network name is not in desired state it will be renamed to match this name.")] String Name; - [Write, Description("he role of the cluster network. If the cluster network role is not in desired state it will change to match this role."), ValueMap{"0","1","3"}, Values{"0","1","3"}] String Role; - [Write, Description("The metric number for the cluster network. If the cluster network metric number is not in desired state it will be changed to match this metric number.")] String Metric; -}; diff --git a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterNetwork/en-US/MSFT_xClusterNetwork.strings.psd1 b/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterNetwork/en-US/MSFT_xClusterNetwork.strings.psd1 deleted file mode 100644 index 06a0a884..00000000 --- a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterNetwork/en-US/MSFT_xClusterNetwork.strings.psd1 +++ /dev/null @@ -1,9 +0,0 @@ -# Localized resources for xClusterNetwork - -ConvertFrom-StringData @' - ChangeNetworkName = Changing the name of the network {0}/{1} to '{2}'. - ChangeNetworkRole = Changing the role of the network {0}/{1} to '{2}'. - ChangeNetworkMetric = Changing the metric of the network {0}/{1} to '{2}'. - GetClusterNetworkInformation = Retrieving information for cluster network {0}. - EvaluatingClusterNetworkInformation = Evaluating state of cluster network {0}. -'@ diff --git a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterPreferredOwner/MSFT_xClusterPreferredOwner.psm1 b/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterPreferredOwner/MSFT_xClusterPreferredOwner.psm1 deleted file mode 100644 index 18a68131..00000000 --- a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterPreferredOwner/MSFT_xClusterPreferredOwner.psm1 +++ /dev/null @@ -1,314 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) ` - -ChildPath 'CommonResourceHelper.psm1') - -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xClusterPreferredOwner' - -<# - .SYNOPSIS - Returns the current state of the failover cluster group and cluster - resource preferred owners. - - .PARAMETER ClusterGroup - Name of the cluster group. - - .PARAMETER ClusterName - Name of the cluster. - - .PARAMETER Nodes - The nodes to set as owners. - - .PARAMETER ClusterResources - The resources to set preferred owners on. - - .PARAMETER Ensure - If the preferred owners should be present or absent. Default value is - 'Present'. -#> -function Get-TargetResource -{ - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $ClusterGroup, - - [Parameter(Mandatory = $true)] - [System.String] - $ClusterName, - - [Parameter(Mandatory = $true)] - [System.String[]] - $Nodes, - - [Parameter()] - [System.String[]] - $ClusterResources, - - [Parameter()] - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present' - ) - - Write-Verbose -Message ($script:localizedData.GetOwnerInformationForCluster -f $ClusterName) - - $ownerNodes = @( - Write-Verbose -Message ($script:localizedData.GetOwnerInformationForClusterGroup -f $ClusterGroup) - ((Get-ClusterGroup -Cluster $ClusterName | Where-Object -FilterScript { - $_.Name -like $ClusterGroup - } | Get-ClusterOwnerNode).OwnerNodes).Name - - if ($ClusterResources) - { - foreach ($resource in $ClusterResources) - { - Write-Verbose -Message ($script:localizedData.GetOwnerInformationForClusterResource -f $resource) - ((Get-ClusterResource -Cluster $ClusterName | Where-Object -FilterScript { - $_.Name -like $resource - } | Get-ClusterOwnerNode).OwnerNodes).Name - } - } - ) - - $ownerNodes = $ownerNodes | Select-Object -Unique - - @{ - ClusterGroup = $ClusterGroup - ClusterName = $ClusterName - Nodes = $ownerNodes - ClusterResources = $ClusterResources - Ensure = $Ensure - } -} - -<# - .SYNOPSIS - Configures the desired preferred owners on the failover cluster group and cluster - resource. - - .PARAMETER ClusterGroup - Name of the cluster group. - - .PARAMETER ClusterName - Name of the cluster. - - .PARAMETER Nodes - The nodes to set as owners. - - .PARAMETER ClusterResources - The resources to set preferred owners on. - - .PARAMETER Ensure - If the preferred owners should be present or absent. Default value is - 'Present'. -#> -function Set-TargetResource -{ - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $ClusterGroup, - - [Parameter(Mandatory = $true)] - [System.String] - $ClusterName, - - [Parameter(Mandatory = $true)] - [System.String[]] - $Nodes, - - [Parameter()] - [System.String[]] - $ClusterResources, - - [Parameter()] - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present' - ) - - Write-Verbose -Message ($script:localizedData.GetAllNodesOfCluster -f $ClusterName) - $allNodes = (Get-ClusterNode -Cluster $ClusterName).Name - - if ($Ensure -eq 'Present') - { - Write-Verbose -Message ($script:localizedData.SetOwnerForClusterGroup -f $ClusterGroup, $Nodes) - $null = Get-ClusterGroup -Cluster $ClusterName | Where-Object -FilterScript { - $_.Name -like $ClusterGroup - } | Set-ClusterOwnerNode -Owners $Nodes - - $null = Get-ClusterResource | Where-Object { - $_.OwnerGroup -like $ClusterGroup - } | Set-ClusterOwnerNode -Owners $allNodes - - Write-Verbose -Message ($script:localizedData.MoveClusterGroup -f $ClusterGroup, $Nodes[0]) - $null = Get-ClusterGroup -Cluster $ClusterName | Where-Object -FilterScript { - $_.name -like $ClusterGroup - } | Move-ClusterGroup -Node $Nodes[0] - - foreach ($resource in $ClusterResources) - { - Write-Verbose -Message ($script:localizedData.SetOwnerForClusterResource -f $resource, $Nodes) - $null = Get-ClusterResource -Cluster $ClusterName | Where-Object -FilterScript { - $_.Name -like $resource - } | Set-ClusterOwnerNode -Owners $Nodes - } - } - - if ($Ensure -eq 'Absent') - { - Write-Verbose -Message ($script:localizedData.GetOwnerInformationForClusterGroup -f $ClusterGroup) - $currentOwners = ((Get-ClusterGroup -Cluster $ClusterName | Where-Object -FilterScript { - $_.Name -like $ClusterGroup - } | Get-ClusterOwnerNode).OwnerNodes).Name | Sort-Object -Unique - - $newOwners = @( - foreach ($currentOwner in $currentOwners) - { - if ($Nodes -notcontains $currentOwner) - { - $currentOwner - } - } - ) - - Write-Verbose -Message ($script:localizedData.RemoveOwnerFromClusterGroup -f $ClusterGroup, $Nodes) - $null = Get-ClusterGroup -Cluster $ClusterName | Where-Object -FilterScript { - $_.Name -like $ClusterGroup - } | Set-ClusterOwnerNode $newOwners - - Write-Verbose -Message ($script:localizedData.SetOwnerForClusterGroup -f $ClusterGroup, $newOwners) - $null = Get-ClusterResource | Where-Object -FilterScript { - $_.OwnerGroup -like $ClusterGroup - } | Set-ClusterOwnerNode $allNodes - - Write-Verbose -Message ($script:localizedData.MoveClusterGroup -f $ClusterGroup, $newOwners[0]) - $null = Get-ClusterGroup -Cluster $ClusterName | Where-Object -FilterScript { - $_.Name -like $ClusterGroup - } | Move-ClusterGroup -Node $newOwners[0] - - foreach ($resource in $ClusterResources) - { - Write-Verbose -Message ($script:localizedData.GetOwnerInformationForClusterResource -f $resource) - $currentOwners = ((Get-ClusterResource -Cluster $ClusterName | Where-Object -FilterScript { - $_.Name -like $resource - } | Get-ClusterOwnerNode).OwnerNodes).Name | Sort-Object -Unique - - $newOwners = @( - foreach ($currentOwner in $currentOwners) - { - if ($Nodes -notcontains $currentOwner) - { - $currentOwner - } - } - ) - - Write-Verbose -Message ($script:localizedData.SetOwnerForClusterResource -f $resource, $newOwners) - $null = Get-ClusterResource -Cluster $ClusterName | Where-Object -FilterScript { - $_.Name -like $resource - } | Set-ClusterOwnerNode -Owners $newOwners - } - } -} - -<# - .SYNOPSIS - Tests so that the desired preferred owners on the failover cluster group - and cluster resource are in desired state. - - .PARAMETER ClusterGroup - Name of the cluster group. - - .PARAMETER ClusterName - Name of the cluster. - - .PARAMETER Nodes - The nodes to set as owners. - - .PARAMETER ClusterResources - The resources to set preferred owners on. - - .PARAMETER Ensure - If the preferred owners should be present or absent. Default value is - 'Present'. -#> - -function Test-TargetResource -{ - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $ClusterGroup, - - [Parameter(Mandatory = $true)] - [System.String] - $ClusterName, - - [Parameter(Mandatory = $true)] - [System.String[]] - $Nodes, - - [Parameter()] - [System.String[]] - $ClusterResources, - - [Parameter()] - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present' - ) - - Write-Verbose -Message ($script:localizedData.TestOwnerInformationForCluster -f $ClusterName) - - $getTargetResourceResult = (Get-TargetResource @PSBoundParameters).Nodes - $result = $true - - if ($Ensure -eq 'Present') - { - foreach ($object in $getTargetResourceResult) - { - if ($Nodes -notcontains $object) - { - Write-Verbose -Message ($script:localizedData.WasNotFoundAsPossibleOwner -f $object) - $result = $false - } - } - - foreach ($object in $Nodes) - { - if ($getTargetResourceResult -notcontains $object) - { - Write-Verbose -Message ($script:localizedData.WasNotFoundAsPossibleOwner -f $object) - $result = $false - } - } - } - - if ($Ensure -eq 'Absent') - { - foreach ($object in $getTargetResourceResult) - { - if ($Nodes -contains $object) - { - Write-Verbose -Message ($script:localizedData.WasFoundAsPossibleOwner -f $object) - $result = $false - } - } - - foreach ($object in $Nodes) - { - if ($getTargetResourceResult -contains $object) - { - Write-Verbose -Message ($script:localizedData.WasFoundAsPossibleOwner -f $object) - $result = $false - } - } - } - - $result -} diff --git a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterPreferredOwner/MSFT_xClusterPreferredOwner.schema.mof b/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterPreferredOwner/MSFT_xClusterPreferredOwner.schema.mof deleted file mode 100644 index da074de0..00000000 --- a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterPreferredOwner/MSFT_xClusterPreferredOwner.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xClusterPreferredOwner")] -class MSFT_xClusterPreferredOwner : OMI_BaseResource -{ - [Key, Description("Name of the cluster group.")] String ClusterGroup; - [Key, Description("Name of the cluster.")] String ClusterName; - [Required, Description("The nodes to set as owners.")] String Nodes[]; - [Write, Description("he resources to set preferred owners on.")] String ClusterResources[]; - [Write, Description("If the preferred owners should be present or absent. Default value is 'Present'."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; diff --git a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterPreferredOwner/en-US/MSFT_xClusterPreferredOwner.strings.psd1 b/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterPreferredOwner/en-US/MSFT_xClusterPreferredOwner.strings.psd1 deleted file mode 100644 index c481da37..00000000 --- a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterPreferredOwner/en-US/MSFT_xClusterPreferredOwner.strings.psd1 +++ /dev/null @@ -1,15 +0,0 @@ -# Localized resources for xClusterPreferredOwner - -ConvertFrom-StringData @' - GetOwnerInformationForCluster = Retrieving owner information for cluster {0}. - GetOwnerInformationForClusterGroup = Retrieving owner information for cluster role/group {0}. - GetOwnerInformationForClusterResource = Retrieving owner information for cluster resource {0}. - GetAllNodesOfCluster = Retrieving all nodes from cluster {0}. - SetOwnerForClusterGroup = Setting owners for cluster role/group {0} to {1}. - SetOwnerForClusterResource = Setting owners for cluster resource {0} to {1}. - MoveClusterGroup = Moving cluster role/group {0} to node {1}. - RemoveOwnerFromClusterGroup = Removing owners {1} from cluster role/group {0}. - TestOwnerInformationForCluster = Testing Owner information for cluster {0}. - WasFoundAsPossibleOwner = {0} was found as possible owner. - WasNotFoundAsPossibleOwner = {0} was NOT found as possible owner. -'@ diff --git a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterQuorum/MSFT_xClusterQuorum.psm1 b/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterQuorum/MSFT_xClusterQuorum.psm1 deleted file mode 100644 index 4967de05..00000000 --- a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterQuorum/MSFT_xClusterQuorum.psm1 +++ /dev/null @@ -1,210 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) ` --ChildPath 'CommonResourceHelper.psm1') - -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xClusterQuorum' - -<# - .SYNOPSIS - Returns the current state of the failover cluster quorum. - - .PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [System.String] - $IsSingleInstance - ) - - Write-Verbose -Message $script:localizedData.GetClusterQuorumInformation - - $getClusterQuorumResult = Get-ClusterQuorum - - switch ($getClusterQuorumResult.QuorumType) - { - # WS2016 only - 'Majority' - { - if ($null -eq $getClusterQuorumResult.QuorumResource) - { - $clusterQuorumType = 'NodeMajority' - } - elseif ($getClusterQuorumResult.QuorumResource.ResourceType.DisplayName -eq 'Physical Disk') - { - $clusterQuorumType = 'NodeAndDiskMajority' - } - elseif ($getClusterQuorumResult.QuorumResource.ResourceType.DisplayName -eq 'File Share Witness') - { - $clusterQuorumType = 'NodeAndFileShareMajority' - } - else - { - throw "Unknown quorum resource: $($getClusterQuorumResult.QuorumResource)" - } - } - - # WS2012R2 only - 'NodeMajority' - { - $clusterQuorumType = 'NodeMajority' - } - - 'NodeAndDiskMajority' - { - $clusterQuorumType = 'NodeAndDiskMajority' - } - - 'NodeAndFileShareMajority' - { - $clusterQuorumType = 'NodeAndFileShareMajority' - } - - # All - 'DiskOnly' - { - $clusterQuorumType = 'DiskOnly' - } - - # Default - default - { - throw "Unknown quorum type: $($getClusterQuorumResult.QuorumType)" - } - } - - if ($clusterQuorumType -eq 'NodeAndFileShareMajority') - { - $clusterQuorumResource = $getClusterQuorumResult.QuorumResource | - Get-ClusterParameter -Name SharePath | - Select-Object -ExpandProperty Value - } - else - { - $clusterQuorumResource = [String] $getClusterQuorumResult.QuorumResource.Name - } - - @{ - IsSingleInstance = $IsSingleInstance - Type = $clusterQuorumType - Resource = $clusterQuorumResource - } -} - -<# - .SYNOPSIS - Configures the failover cluster quorum. - - .PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. - - .PARAMETER Type - Quorum type to use. Can be set to either NodeMajority, NodeAndDiskMajority, - NodeAndFileShareMajority or DiskOnly. - - .PARAMETER Resource - The name of the disk or file share resource to use as witness. This parameter - is optional if the quorum type is set to NodeMajority. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [System.String] - $IsSingleInstance, - - [Parameter()] - [ValidateSet('NodeMajority', 'NodeAndDiskMajority', 'NodeAndFileShareMajority', 'DiskOnly')] - [System.String] - $Type, - - [Parameter()] - [System.String] - $Resource - ) - - Write-Verbose -Message ($script:localizedData.SetClusterQuorum -f $Type) - - switch ($Type) - { - 'NodeMajority' - { - Set-ClusterQuorum -NoWitness - } - - 'NodeAndDiskMajority' - { - Set-ClusterQuorum -DiskWitness $Resource - } - - 'NodeAndFileShareMajority' - { - Set-ClusterQuorum -FileShareWitness $Resource - } - - 'DiskOnly' - { - Set-ClusterQuorum -DiskOnly $Resource - } - } -} - -<# - .SYNOPSIS - Tests the current state of the failover cluster quorum. - - .PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. - - .PARAMETER Type - Quorum type to use. Can be set to either NodeMajority, NodeAndDiskMajority, - NodeAndFileShareMajority or DiskOnly. - - .PARAMETER Resource - The name of the disk or file share resource to use as witness. This parameter - is optional if the quorum type is set to NodeMajority. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [System.String] - $IsSingleInstance, - - [Parameter()] - [ValidateSet('NodeMajority', 'NodeAndDiskMajority', 'NodeAndFileShareMajority', 'DiskOnly')] - [System.String] - $Type, - - [Parameter()] - [System.String] - $Resource - ) - - Write-Verbose -Message $script:localizedData.EvaluatingClusterQuorumInformation - - $getGetTargetResourceResult = Get-TargetResource -IsSingleInstance $IsSingleInstance - - $testTargetResourceReturnValue = $false - - if ($getGetTargetResourceResult.Type -eq $Type -and $getGetTargetResourceResult.Resource -eq $Resource) - { - $testTargetResourceReturnValue = $true - } - - $testTargetResourceReturnValue -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterQuorum/MSFT_xClusterQuorum.schema.mof b/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterQuorum/MSFT_xClusterQuorum.schema.mof deleted file mode 100644 index 0e22d071..00000000 --- a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterQuorum/MSFT_xClusterQuorum.schema.mof +++ /dev/null @@ -1,7 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xClusterQuorum")] -class MSFT_xClusterQuorum : OMI_BaseResource -{ - [Key, Description("Specifies the resource is a single instance, the value must be 'Yes'."), ValueMap{"Yes"}, Values{"Yes"}] string IsSingleInstance; - [Write, Description("Quorum type to use. Can be set to either NodeMajority, NodeAndDiskMajority, NodeAndFileShareMajority or DiskOnly."), ValueMap{"NodeMajority", "NodeAndDiskMajority", "NodeAndFileShareMajority", "DiskOnly"}, Values{"NodeMajority", "NodeAndDiskMajority", "NodeAndFileShareMajority", "DiskOnly"}] string Type; - [Write, Description("The name of the disk or file share resource to use as witness. This parameter is optional if the quorum type is set to NodeMajority.")] String Resource; -}; diff --git a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterQuorum/en-US/MSFT_xClusterQuorum.strings.psd1 b/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterQuorum/en-US/MSFT_xClusterQuorum.strings.psd1 deleted file mode 100644 index 26d01cde..00000000 --- a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xClusterQuorum/en-US/MSFT_xClusterQuorum.strings.psd1 +++ /dev/null @@ -1,7 +0,0 @@ -# Localized resources for xClusterQuorum - -ConvertFrom-StringData @' - GetClusterQuorumInformation = Retrieving quorum information for cluster. - SetClusterQuorum = Setting quorum to type '{0}'. - EvaluatingClusterQuorumInformation = Evaluating state of quorum for cluster. -'@ diff --git a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xWaitForCluster/MSFT_xWaitForCluster.psm1 b/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xWaitForCluster/MSFT_xWaitForCluster.psm1 deleted file mode 100644 index b8336313..00000000 --- a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xWaitForCluster/MSFT_xWaitForCluster.psm1 +++ /dev/null @@ -1,183 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) ` --ChildPath 'CommonResourceHelper.psm1') - -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xWaitForCluster' - -<# - .SYNOPSIS - Get the values for which failover cluster and for how long to wait for the - cluster to exist. - - .PARAMETER Name - Name of the cluster to wait for. - - .PARAMETER RetryIntervalSec - Interval to check for cluster existence. Default values is 10 seconds. - - .PARAMETER RetryCount - Maximum number of retries to check for cluster existence. Default value - is 50 retries. -#> -function Get-TargetResource -{ - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter()] - [System.UInt64] - $RetryIntervalSec = 10, - - [Parameter()] - [System.UInt32] - $RetryCount = 50 - ) - - Write-Verbose -Message $script:localizedData.ReturnParameterValues - - @{ - Name = $Name - RetryIntervalSec = $RetryIntervalSec - RetryCount = $RetryCount - } -} - -<# - .SYNOPSIS - Waits for the specific failover cluster to exist. It will throw an error if the - cluster has not been detected during the timeout period. - - .PARAMETER Name - Name of the cluster to wait for. - - .PARAMETER RetryIntervalSec - Interval to check for cluster existence. Default values is 10 seconds. - - .PARAMETER RetryCount - Maximum number of retries to check for cluster existence. Default value - is 50 retries. -#> -function Set-TargetResource -{ - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter()] - [System.UInt64] - $RetryIntervalSec = 10, - - [Parameter()] - [System.UInt32] - $RetryCount = 50 - ) - - $clusterFound = $false - Write-Verbose -Message ($script:localizedData.CheckClusterPresent -f $Name) - - for ($count = 0; $count -lt $RetryCount; $count++) - { - try - { - $computerObject = Get-CimInstance -ClassName Win32_ComputerSystem - if ($null -eq $computerObject -or $null -eq $computerObject.Domain) - { - Write-Verbose -Message $script:localizedData.TargetNodeDomainMissing - break - } - - $cluster = Get-Cluster -Name $Name -Domain $computerObject.Domain - - if ($null -ne $cluster) - { - Write-Verbose -Message ($script:localizedData.ClusterPresent -f $Name) - $clusterFound = $true - break - } - } - catch - { - Write-Verbose -Message ($script:localizedData.ClusterAbsent -f $Name, $RetryIntervalSec) - } - - Write-Verbose -Message ($script:localizedData.ClusterAbsent -f $Name, $RetryIntervalSec) - Start-Sleep -Seconds $RetryIntervalSec - } - - if (-not $clusterFound) - { - $errorMessage = $script:localizedData.ClusterAbsentAfterTimeOut -f $Name, $count, $RetryIntervalSec - New-InvalidOperationException -Message $errorMessage - } -} - -<# - .SYNOPSIS - Test if the specific failover cluster exist. - - .PARAMETER Name - Name of the cluster to wait for. - - .PARAMETER RetryIntervalSec - Interval to check for cluster existence. Default values is 10 seconds. - - .PARAMETER RetryCount - Maximum number of retries to check for cluster existence. Default value - is 50 retries. -#> -function Test-TargetResource -{ - [OutputType([Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter()] - [System.UInt64] - $RetryIntervalSec = 10, - - [Parameter()] - [System.UInt32] - $RetryCount = 50 - ) - - Write-Verbose -Message ($script:localizedData.EvaluatingClusterPresent -f $Name) - - $testTargetResourceReturnValue = $false - - try - { - $computerObject = Get-CimInstance -ClassName Win32_ComputerSystem - if ($null -eq $computerObject -or $null -eq $computerObject.Domain) - { - Write-Verbose -Message $script:localizedData.TargetNodeDomainMissing - } - else - { - $cluster = Get-Cluster -Name $Name -Domain $computerObject.Domain - if ($null -eq $cluster) - { - Write-Verbose -Message ($script:localizedData.ClusterAbsentWithDomain -f $Name, $computerObject.Domain) - } - else - { - Write-Verbose -Message ($script:localizedData.ClusterPresent -f $Name) - $testTargetResourceReturnValue = $true - } - } - } - catch - { - Write-Verbose -Message ($script:localizedData.ClusterAbsentWithError -f $Name, $_.Message) - } - - $testTargetResourceReturnValue -} - diff --git a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xWaitForCluster/MSFT_xWaitForCluster.schema.mof b/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xWaitForCluster/MSFT_xWaitForCluster.schema.mof deleted file mode 100644 index 6da3968d..00000000 --- a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xWaitForCluster/MSFT_xWaitForCluster.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -#pragma namespace("\\\\.\\root\\microsoft\\windows\\DesiredStateConfiguration") - -[ClassVersion("1.0.0"), FriendlyName("xWaitForCluster")] -class MSFT_xWaitForCluster : OMI_BaseResource -{ - [Key, Description("Name of the cluster to wait for.")] string Name; - [Write, Description("Interval to check for cluster existence. Default values is 10 seconds.")] Uint64 RetryIntervalSec; - [Write, Description("Maximum number of retries to check for cluster existence. Default value is 50 retries.")] Uint32 RetryCount; -}; - - diff --git a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xWaitForCluster/en-US/MSFT_xWaitForCluster.strings.psd1 b/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xWaitForCluster/en-US/MSFT_xWaitForCluster.strings.psd1 deleted file mode 100644 index 60e652f4..00000000 --- a/lib/puppet_x/dsc_resources/xFailOverCluster/DSCResources/MSFT_xWaitForCluster/en-US/MSFT_xWaitForCluster.strings.psd1 +++ /dev/null @@ -1,13 +0,0 @@ -# Localized resources for xWaitForCluster - -ConvertFrom-StringData @' - ReturnParameterValues = Returning the values passed as parameters. - CheckClusterPresent = Checking if cluster {0} is present. - TargetNodeDomainMissing = Can't find the target node's domain name. - ClusterPresent = Cluster {0} is present. - ClusterAbsent = Cluster {0} is NOT present. Will retry again after {1} seconds. - ClusterAbsentWithDomain = Cluster {0} is NOT present in Active Directory domain '{1}'. - ClusterAbsentWithError = Cluster {0} is NOT present with error: {1} - ClusterAbsentAfterTimeOut = Failover cluster {0} was not found after {1} attempts with {2} seconds interval. - EvaluatingClusterPresent = Evaluating if cluster {0} is present. -'@ diff --git a/lib/puppet_x/dsc_resources/xFailOverCluster/LICENSE b/lib/puppet_x/dsc_resources/xFailOverCluster/LICENSE deleted file mode 100644 index a1d2d916..00000000 --- a/lib/puppet_x/dsc_resources/xFailOverCluster/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/puppet_x/dsc_resources/xFailOverCluster/xFailOverCluster.psd1 b/lib/puppet_x/dsc_resources/xFailOverCluster/xFailOverCluster.psd1 deleted file mode 100644 index 73e91f66..00000000 --- a/lib/puppet_x/dsc_resources/xFailOverCluster/xFailOverCluster.psd1 +++ /dev/null @@ -1,114 +0,0 @@ -@{ - -ModuleVersion = '1.8.0.0' - -GUID = '026e7fd8-06dd-41bc-b373-59366ab18679' - -Author = 'Microsoft Corporation' - -CompanyName = 'Microsoft Corporation' - -Copyright = '(c) 2017 Microsoft Corporation. All rights reserved.' - -Description = 'Module containing DSC resources used to configure Failover Clusters.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xFailOverCluster/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xFailOverCluster' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '- Changes to xFailOverCluster - - Added a common resource helper module with helper functions for localization. - - Added helper functions; Get-LocalizedData, New-InvalidResultException, - New-ObjectNotFoundException, New-InvalidOperationException and - New-InvalidArgumentException. - - Fixed lint error MD034 and fixed typos in README.md. - - Opt-in for module files common tests ([issue 119](https://github.com/PowerShell/xFailOverCluster/issues/119)). - - Removed Byte Order Mark (BOM) from the files; CommonResourceHelper.psm1 and FailoverClusters.stubs.psm1. - - Opt-in for script files common tests ([issue 121](https://github.com/PowerShell/xFailOverCluster/issues/121)). - - Removed Byte Order Mark (BOM) from the files; CommonResourceHelper.Tests.ps1, - MSFT\_xCluster.Tests.ps1, MSFT\_xClusterDisk.Tests.ps1, - MSFT\_xClusterPreferredOwner.Tests.ps1, MSFT_xWaitForCluster.Tests.ps1. - - Added common test helper functions to help test the throwing of localized error strings. - - Get-InvalidArgumentRecord - - Get-InvalidOperationRecord - - Get-ObjectNotFoundException - - Get-InvalidResultException. - - Updated year to 2017 in license file and module manifest ([issue 131](https://github.com/PowerShell/xFailOverCluster/issues/131)). -- Changes to xClusterDisk - - Enabled localization for all strings ([issue 84](https://github.com/PowerShell/xFailOverCluster/issues/84)). - - Fixed the OutputType data type that was not fully qualified. - - Minor style changes. - - Fixed Script Analyzer warnings for Write-Verbose. -- Changes to xClusterNetwork - - Replaced the URL for the parameter Role in README.md. The new URL is a more - generic description of the possible settings for the Role parameter. The - previous URL was still correct but focused on Hyper-V in particular. - - Fixed typos in parameter descriptions in README.md, comment-based help and schema.mof. - - Enabled localization for all strings ([issue 85](https://github.com/PowerShell/xFailOverCluster/issues/85)). - - Minor style changes. - - Fixed Script Analyzer warnings for Write-Verbose. -- Changes to xCluster - - Resolved Script Analyzer rule warnings by changing Get-WmiObject to - Get-CimInstance ([issue 49](https://github.com/PowerShell/xFailOverCluster/issues/49)). - - Minor style change in tests. Removed "-" in front of "-Be", "-Not", "-Throw", - etc. - - Enabled localization for all strings ([issue 83](https://github.com/PowerShell/xFailOverCluster/issues/83)). - - Added tests to improve code coverage. - - Fixed random problem with tests failing with error "Invalid token for - impersonation - it cannot be duplicated." ([issue 133](https://github.com/PowerShell/xFailOverCluster/issues/133)). - - Minor style changes. - - Fixed Script Analyzer warnings for Write-Verbose. -- Changes to xWaitForCluster - - Refactored the unit test for this resource to use stubs and increase coverage - ([issue 78](https://github.com/PowerShell/xFailOverCluster/issues/78)). - - Now the Test-TargetResource correctly returns false if the domain name cannot - be evaluated ([issue 107](https://github.com/PowerShell/xFailOverCluster/issues/107)). - - Changed the code to be more aligned with the style guideline. - - Updated parameter description in the schema.mof. - - Resolved Script Analyzer warnings ([issue 54](https://github.com/PowerShell/xFailOverCluster/issues/54)). - - Enabled localization for all strings ([issue 88](https://github.com/PowerShell/xFailOverCluster/issues/88)). - - Minor style changes. -- Changes to xClusterQuorum - - Refactored the unit test for this resource to use stubs and increase coverage - ([issue 77](https://github.com/PowerShell/xFailOverCluster/issues/77)). - - Changed the code to be more aligned with the style guideline. - - Updated parameter description in the schema.mof. - - Added example ([issue 47](https://github.com/PowerShell/xFailOverCluster/issues/47)) - - 1-SetQuorumToNodeMajority.ps1 - - 2-SetQuorumToNodeAndDiskMajority.ps1 - - 3-SetQuorumToNodeAndFileShareMajority.ps1 - - 4-SetQuorumToDiskOnly.ps1 - - Added links to examples from README.md. - - Minor style changes. - - Enabled localization for all strings ([issue 87](https://github.com/PowerShell/xFailOverCluster/issues/87)). -- Changes to xClusterPreferredOwner - - Enabled localization for all strings ([issue 86](https://github.com/PowerShell/xFailOverCluster/issues/86)). - - Fixed typo in the returned hash table from Get-TargetResource. - - Minor style changes. - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - - - diff --git a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/HyperVCommon/HyperVCommon.psm1 b/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/HyperVCommon/HyperVCommon.psm1 deleted file mode 100644 index 42978cd5..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/HyperVCommon/HyperVCommon.psm1 +++ /dev/null @@ -1,407 +0,0 @@ -#region localizeddata -if (Test-Path "${PSScriptRoot}\${PSUICulture}") -{ - Import-LocalizedData ` - -BindingVariable LocalizedData ` - -Filename HyperVCommon.strings.psd1 ` - -BaseDirectory "${PSScriptRoot}\${PSUICulture}" -} -else -{ - # fallback to en-US - Import-LocalizedData ` - -BindingVariable LocalizedData ` - -Filename HyperVCommon.strings.psd1 ` - -BaseDirectory "${PSScriptRoot}\en-US" -} -#endregion - -<# - .SYNOPSIS - Throws an InvalidOperation custom exception. - - .PARAMETER ErrorId - The error Id of the exception. - - .PARAMETER ErrorMessage - The error message text to set in the exception. -#> -function New-InvalidOperationError -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $ErrorId, - - [Parameter(Mandatory = $true)] - [System.String] - $ErrorMessage - ) - - $exception = New-Object -TypeName System.InvalidOperationException ` - -ArgumentList $ErrorMessage - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidOperation - $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord ` - -ArgumentList $exception, $ErrorId, $errorCategory, $null - throw $errorRecord -} # end function New-InvalidOperationError - -<# - .SYNOPSIS - Throws an InvalidArgument custom exception. - - .PARAMETER ErrorId - The error Id of the exception. - - .PARAMETER ErrorMessage - The error message text to set in the exception. -#> -function New-InvalidArgumentError -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $ErrorId, - - [Parameter(Mandatory = $true)] - [System.String] - $ErrorMessage - ) - - $exception = New-Object -TypeName System.ArgumentException ` - -ArgumentList $ErrorMessage - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidArgument - $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord ` - -ArgumentList $exception, $ErrorId, $errorCategory, $null - throw $errorRecord -} # end function New-InvalidArgumentError - -<# - .SYNOPSIS - Sets one or more virtual machine properties, powering the VM - off if required. - - .PARAMETER Name - Name of the virtual machine to apply the changes to. - - .PARAMETER VMName - Name of the virtual machine to apply the changes to. - - .PARAMETER VMCommand - The Hyper-V cmdlet name to call to enact the changes. - - .PARAMETER ChangeProperty - The collection of cmdlet parameter names and values to pass to the command. - - .PARAMETER WaitForIP - Waits for the virtual machine to report an IP address when transitioning - into a running state. - - .PARAMETER RestartIfNeeded - Power cycle the virtual machine if changes are required. -#> -function Set-VMProperty -{ - [CmdletBinding(DefaultParameterSetName = 'Name')] - param - ( - [Parameter(Mandatory = $true, ParameterSetName = 'Name')] - [System.String] - $Name, - - [Parameter(Mandatory = $true, ParameterSetName = 'VMName')] - [System.String] - $VMName, - - [Parameter(Mandatory = $true)] - [System.String] - $VMCommand, - - [Parameter(Mandatory = $true)] - [System.Collections.Hashtable] - $ChangeProperty, - - [Parameter()] - [System.Boolean] - $WaitForIP, - - [Parameter()] - [System.Boolean] - $RestartIfNeeded - ) - - if ($PSBoundParameters.ContainsKey('VMName')) - { - # Add the -Name property to the ChangeProperty hashtable for splatting - $ChangeProperty['VMName'] = $VMName - - # Set the common parameters for splatting against Get-VM and Set-VMState - $vmCommonProperty = @{ Name = $VMName; } - - # Ensure that the name parameter is set for verbose messages - $Name = $VMName - } - else - { - # Add the -Name property to the ChangeProperty hashtable for splatting - $ChangeProperty['Name'] = $Name - - # Set the common parameters for splatting against Get-VM and Set-VMState - $vmCommonProperty = @{ Name = $Name; } - } - - $vmObject = Get-VM @vmCommonProperty - $vmOriginalState = $vmObject.State - - if ($vmOriginalState -ne 'Off' -and $RestartIfNeeded) - { - # Turn the vm off to make changes - Set-VMState @vmCommonProperty -State Off - - Write-Verbose -Message ($localizedData.UpdatingVMProperties -f $Name) - # Make changes using the passed hashtable - & $VMCommand @ChangeProperty - - # Cannot move an off VM to a paused state - only to running state - if ($vmOriginalState -eq 'Running') - { - Set-VMState @vmCommonProperty -State Running -WaitForIP $WaitForIP - } - - Write-Verbose -Message ($localizedData.VMPropertiesUpdated -f $Name) - - # Cannot restore a vm to a paused state - if ($vmOriginalState -eq 'Paused') - { - Write-Warning -Message ($localizedData.VMStateWillBeOffWarning -f $Name) - } - } - elseif ($vmOriginalState -eq 'Off') - { - Write-Verbose -Message ($localizedData.UpdatingVMProperties -f $Name) - & $VMCommand @ChangeProperty - Write-Verbose -Message ($localizedData.VMPropertiesUpdated -f $Name) - } - else - { - $errorMessage = $localizedData.CannotUpdatePropertiesOnlineError -f $Name, $vmOriginalState - New-InvalidOperationError -ErrorId RestartRequired -ErrorMessage $errorMessage - } -} #end function - -<# - .SYNOPSIS - Sets one or more virtual machine properties, powering the VM - off if required. - - .PARAMETER Name - Name of the virtual machine to apply the changes to. - - .PARAMETER State - The target power state of the virtual machine. - - .PARAMETER ChangeProperty - The collection of cmdlet parameter names and values to pass to the command. - - .PARAMETER WaitForIP - Waits for the virtual machine to be report an IP address when transitioning - into a running state. -#> -function Set-VMState -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [Alias('VMName')] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateSet('Running','Paused','Off')] - [System.String] - $State, - - [Parameter()] - [System.Boolean] - $WaitForIP - ) - - switch ($State) - { - 'Running' { - $vmCurrentState = (Get-VM -Name $Name).State - if ($vmCurrentState -eq 'Paused') - { - # If VM is in paused state, use resume-vm to make it running - Write-Verbose -Message ($localizedData.ResumingVM -f $Name) - Resume-VM -Name $Name - } - elseif ($vmCurrentState -eq 'Off') - { - # If VM is Off, use start-vm to make it running - Write-Verbose -Message ($localizedData.StartingVM -f $Name) - Start-VM -Name $Name - } - - if ($WaitForIP) - { - Wait-VMIPAddress -Name $Name -Verbose - } - } - 'Paused' { - if ($vmCurrentState -ne 'Off') - { - Write-Verbose -Message ($localizedData.SuspendingVM -f $Name) - Suspend-VM -Name $Name - } - } - 'Off' { - if ($vmCurrentState -ne 'Off') - { - Write-Verbose -Message ($localizedData.StoppingVM -f $Name) - Stop-VM -Name $Name -Force -WarningAction SilentlyContinue - } - } - } -} #end function - -<# - .SYNOPSIS - Waits for a virtual machine to be assigned an IP address. - - .PARAMETER Name - Name of the virtual machine to apply the changes to. - - .PARAMETER Timeout - Number of seconds to wait before timing out. Defaults to 300 (5 minutes). -#> -function Wait-VMIPAddress -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [Alias('VMName')] - [System.String] - $Name, - - [Parameter()] - [System.Int32] - $Timeout = 300 - ) - - [System.Int32] $elapsedSeconds = 0 - while ((Get-VMNetworkAdapter -VMName $Name).IpAddresses.Count -lt 2) - { - Write-Verbose -Message ($localizedData.WaitingForVMIPAddress -f $Name) - Start-Sleep -Seconds 3; - - $elapsedSeconds += 3 - if ($elapsedSeconds -gt $Timeout) - { - $errorMessage = $localizedData.WaitForVMIPAddressTimeoutError -f $Name, $Timeout - New-InvalidOperationError -ErrorId 'WaitVmTimeout' -ErrorMessage $errorMessage - } - } -} #end function - -<# - .SYNOPSIS - Ensures that the specified PowerShell module(s) are installed. - - .PARAMETER Name - Name of the PowerShell module to check is installed. -#> -function Assert-Module -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String[]] - $Name - ) - - if (-not (Get-Module -Name $Name -ListAvailable )) - { - $errorMessage = $localizedData.RoleMissingError -f $Name - New-InvalidOperationError -ErrorId MissingRole -ErrorMessage $errorMessage - } -} #end function - -<# - .SYNOPSIS - Converts a number of seconds, minutes, hours or days into a System.TimeSpan object. - - .PARAMETER TimeInterval - The total number of seconds, minutes, hours or days to convert. - - .PARAMETER TimeSpanType - Convert using specified interval type. -#> -function ConvertTo-TimeSpan -{ - [CmdletBinding()] - [OutputType([System.TimeSpan])] - param - ( - [Parameter(Mandatory = $true)] - [System.UInt32] - $TimeInterval, - - [Parameter(Mandatory = $true)] - [ValidateSet('Seconds','Minutes','Hours','Days')] - [System.String] - $TimeIntervalType - ) - - $newTimeSpanParams = @{ } - switch ($TimeIntervalType) - { - 'Seconds' { $newTimeSpanParams['Seconds'] = $TimeInterval } - 'Minutes' { $newTimeSpanParams['Minutes'] = $TimeInterval } - 'Hours' { $newTimeSpanParams['Hours'] = $TimeInterval } - 'Days' { $newTimeSpanParams['Days'] = $TimeInterval } - } - return (New-TimeSpan @newTimeSpanParams) -} #end function ConvertTo-TimeSpan - -<# - .SYNOPSIS - Converts a System.TimeSpan into the number of seconds, minutes, hours or days. - - .PARAMETER TimeSpan - TimeSpan to convert into an integer - - .PARAMETER TimeSpanType - Convert timespan into the total number of seconds, minutes, hours or days. -#> -function ConvertFrom-TimeSpan -{ - [CmdletBinding()] - [OutputType([System.Int32])] - param - ( - [Parameter(Mandatory = $true)] - [System.TimeSpan] - $TimeSpan, - - [Parameter(Mandatory = $true)] - [ValidateSet('Seconds','Minutes','Hours','Days')] - [System.String] - $TimeSpanType - ) - - switch ($TimeSpanType) - { - 'Seconds' { return $TimeSpan.TotalSeconds -as [System.UInt32] } - 'Minutes' { return $TimeSpan.TotalMinutes -as [System.UInt32] } - 'Hours' { return $TimeSpan.TotalHours -as [System.UInt32] } - 'Days' { return $TimeSpan.TotalDays -as [System.UInt32] } - } -} #end function ConvertFrom-TimeSpan diff --git a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/HyperVCommon/en-us/HyperVCommon.strings.psd1 b/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/HyperVCommon/en-us/HyperVCommon.strings.psd1 deleted file mode 100644 index d1cdd761..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/HyperVCommon/en-us/HyperVCommon.strings.psd1 +++ /dev/null @@ -1,15 +0,0 @@ -ConvertFrom-StringData @' - UpdatingVMProperties = Updating VM '{0}' properties. - VMPropertiesUpdated = VM '{0}' properties have been updated. - WaitingForVMIPAddress = Waiting for IP Address for VM '{0}' ... - StoppingVM = Stopping VM '{0}'. - SuspendingVM = Suspending VM '{0}'. - StartingVM = Starting VM '{0}'. - ResumingVM = Resuming VM '{0}'. - - VMStateWillBeOffWarning = VM '{0}' state will be 'OFF' and not 'Paused'. - - CannotUpdatePropertiesOnlineError = Can not change properties for VM '{0}' in '{1}' state unless 'RestartIfNeeded' is set to true. - WaitForVMIPAddressTimeoutError = Waiting for VM '{0}' IP address timed out after {1} seconds. - RoleMissingError = Please ensure that '{0}' role is installed with its PowerShell module. -'@ diff --git a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVHD/MSFT_xVHD.psm1 b/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVHD/MSFT_xVHD.psm1 deleted file mode 100644 index f1e769cf..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVHD/MSFT_xVHD.psm1 +++ /dev/null @@ -1,381 +0,0 @@ -<# -.SYNOPSIS - Gets MSFT_xVHD resource current state. - -.PARAMETER Name - The desired VHD file name. - -.PARAMETER Path - The desired Path where the VHD will be created. - -.PARAMETER Generation - Virtual disk format. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [String] - $Path, - - [Parameter()] - [ValidateSet("Vhd","Vhdx")] - [String] - $Generation = "Vhd" - ) - - # Check if Hyper-V module is present for Hyper-V cmdlets - if (!(Get-Module -ListAvailable -Name Hyper-V)) - { - Throw 'Please ensure that Hyper-V role is installed with its PowerShell module' - } - - # Construct the full path for the vhdFile - $vhdName = GetNameWithExtension -Name $Name -Generation $Generation - $vhdFilePath = Join-Path -Path $Path -ChildPath $vhdName - Write-Verbose -Message "Vhd full path is $vhdFilePath" - - $vhd = Get-VHD -Path $vhdFilePath -ErrorAction SilentlyContinue - - $ensure = 'Absent' - if ($vhd) - { - $ensure = 'Present' - } - - @{ - Name = $Name - Path = $Path - ParentPath = $vhd.ParentPath - Generation = $vhd.VhdFormat - Ensure = $ensure - ID = $vhd.DiskIdentifier - Type = $vhd.VhdType - FileSizeBytes = $vhd.FileSize - MaximumSizeBytes = $vhd.Size - IsAttached = $vhd.Attached - } -} - -<# -.SYNOPSIS - Configures MSFT_xVHD resource state. - -.PARAMETER Name - The desired VHD file name. - -.PARAMETER Path - The desired Path where the VHD will be created. - -.PARAMETER ParentPath - Parent VHD file path, for differencing disk. - -.PARAMETER MaximumSizeBytes - Maximum size of VHD to be created. - -.PARAMETER Type - Virtual disk type. - -.PARAMETER Generation - Virtual disk format. - -.PARAMETER Ensure - Ensures that the VHD is Present or Absent. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [String] - $Path, - - [Parameter()] - [String] - $ParentPath, - - [Parameter()] - [Uint64] - $MaximumSizeBytes, - - [Parameter()] - [ValidateSet('Dynamic', 'Fixed', 'Differencing')] - [String] - $Type = 'Dynamic', - - [Parameter()] - [ValidateSet('Vhd', 'Vhdx')] - [String] - $Generation = 'Vhd', - - [Parameter()] - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present' - ) - - # Construct the full path for the vhdFile - $vhdName = GetNameWithExtension -Name $Name -Generation $Generation - $vhdFilePath = Join-Path -Path $Path -ChildPath $vhdName - Write-Verbose -Message "Vhd full path is $vhdFilePath" - - Write-Verbose -Message "Checking if $vhdFilePath is $Ensure ..." - - # If vhd should be absent, delete it - if ($Ensure -eq 'Absent') - { - if (Test-Path -Path $vhdFilePath) - { - Write-Verbose -Message "$vhdFilePath is not $Ensure" - Remove-Item -Path $vhdFilePath -Force -ErrorAction Stop - } - Write-Verbose -Message "$vhdFilePath is $Ensure" - } - - else - { - # Check if the Vhd is present - try - { - $vhd = Get-VHD -Path $vhdFilePath -ErrorAction Stop - - # If this is a differencing disk, check the parent path - if ($ParentPath) - { - Write-Verbose -Message "Checking if $vhdFilePath parent path is $ParentPath ..." - - # If the parent path is not set correct, fix it - if ($vhd.ParentPath -ne $ParentPath) - { - Write-Verbose -Message "$vhdFilePath parent path is not $ParentPath." - Set-VHD -Path $vhdFilePath -ParentPath $ParentPath - Write-Verbose -Message "$vhdFilePath parent path is now $ParentPath." - } - else - { - Write-Verbose -Message "$vhdFilePath is $Ensure and parent path is set to $ParentPath." - } - } - - # This is a fixed disk, check the size - elseif ($PSBoundParameters.ContainsKey('MaximumSizeBytes')) - { - Write-Verbose -Message "Checking if $vhdFilePath size is $MaximumSizeBytes ..." - - # If the size is not correct, fix it - if ($vhd.Size -ne $MaximumSizeBytes) - { - Write-Verbose -Message "$vhdFilePath size is not $MaximumSizeBytes." - Resize-VHD -Path $vhdFilePath -SizeBytes $MaximumSizeBytes - Write-Verbose -Message "$vhdFilePath size is now $MaximumSizeBytes." - } - else - { - Write-Verbose -Message "$vhdFilePath is $Ensure and size is $MaximumSizeBytes." - } - } - - if ($vhd.Type -ne $Type) - { - Write-Verbose -Message 'This module can''t convert disk types' - } - } - - # Vhd file is not present - catch - { - Write-Verbose -Message "$vhdFilePath is not $Ensure" - if ($ParentPath) - { - $null = New-VHD -Path $vhdFilePath -ParentPath $ParentPath - } - else - { - $params = @{ - Path = $vhdFilePath - SizeBytes = $MaximumSizeBytes - $Type = $True - } - $null = New-VHD @params - } - - Write-Verbose -Message "$vhdFilePath is now $Ensure" - } - } -} - -<# -.SYNOPSIS - Tests if MSFT_xVHD resource state is in the desired state or not. - -.PARAMETER Name - The desired VHD file name. - -.PARAMETER Path - The desired Path where the VHD will be created. - -.PARAMETER ParentPath - Parent VHD file path, for differencing disk. - -.PARAMETER MaximumSizeBytes - Maximum size of VHD to be created. - -.PARAMETER Type - Virtual disk type. - -.PARAMETER Generation - Virtual disk format. - -.PARAMETER Ensure - Ensures that the VHD is Present or Absent. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [String] - $Path, - - [Parameter()] - [String] - $ParentPath, - - [Parameter()] - [Uint64] - $MaximumSizeBytes, - - [Parameter()] - [ValidateSet('Vhd', 'Vhdx')] - [String] - $Generation = 'Vhd', - - [Parameter()] - [ValidateSet('Dynamic', 'Fixed', 'Differencing')] - [String] - $Type = 'Dynamic', - - [Parameter()] - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present' - ) - - # Check if Hyper-V module is present for Hyper-V cmdlets - if (!(Get-Module -ListAvailable -Name Hyper-V)) - { - Throw "Please ensure that Hyper-V role is installed with its PowerShell module" - } - - # input validation - if ($Type -ne 'Differencing' -and -not $MaximumSizeBytes) - { - Throw 'Specify MaximumSizeBytes property for Fixed and Dynamic VHDs.' - } - - if ($ParentPath -and $Type -ne 'Differencing') - { - Throw 'Parent path is only supported for Differencing disks' - } - - if (-not $ParentPath -and $Type -eq 'Differencing') - { - Throw 'Differencing requires a parent path' - } - - if ($ParentPath) - { - if (!(Test-Path -Path $ParentPath)) - { - Throw "$ParentPath does not exists" - } - - # Check if the generation matches parenting disk - if ($Generation -and ($ParentPath.Split('.')[-1] -ne $Generation)) - { - Throw "Generation $Generation should match ParentPath extension $($ParentPath.Split('.')[-1])" - } - } - - if (!(Test-Path -Path $Path)) - { - Throw "$Path does not exists" - } - - # Construct the full path for the vhdFile - $vhdName = GetNameWithExtension -Name $Name -Generation $Generation - $vhdFilePath = Join-Path -Path $Path -ChildPath $vhdName - Write-Verbose -Message "Vhd full path is $vhdFilePath" - - # Add the logic here and at the end return either $true or $false. - $result = Test-VHD -Path $vhdFilePath -ErrorAction SilentlyContinue - Write-Verbose -Message "Vhd $vhdFilePath is present:$result and Ensure is $Ensure" - return ($result -and ($Ensure -eq "Present")) -} - -<# -.SYNOPSIS - Appends generation appropriate file extension if not already specified. - -.PARAMETER Name - The desired VHD file name. - -.PARAMETER Generation - Virtual disk format. -#> -function GetNameWithExtension -{ - param - ( - [Parameter(Mandatory = $true)] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [String] - $Generation = 'Vhd' - ) - - # If the name ends with vhd or vhdx don't append the generation to the vhdname. - if ($Name -like '*.vhd' -or $Name -like '*.vhdx') - { - $extension = $Name.Split('.')[-1] - if ($Generation -ne $extension) - { - throw "the extension $extension on the name does not match the generation $Generation" - } - else - { - Write-Verbose -Message "Vhd full name is $vhdName" - $vhdName = $Name - } - } - else - { - # Append generation to the name - $vhdName = "$Name.$Generation" - Write-Verbose -Message "Vhd full name is $vhdName" - } - - $vhdName -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVHD/MSFT_xVHD.schema.mof b/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVHD/MSFT_xVHD.schema.mof deleted file mode 100644 index f41e9d2a..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVHD/MSFT_xVHD.schema.mof +++ /dev/null @@ -1,15 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("xVHD")] -class MSFT_xVHD : OMI_BaseResource -{ - [Key, Description("Name of the VHD File")] String Name; - [Key, Description("Folder where the VHD will be created")] String Path; - [Write, Description("Parent VHD file path, for differencing disk")] String ParentPath; - [Write, Description("Maximum size of Vhd to be created")] Uint64 MaximumSizeBytes; - [Write, Description("Virtual disk format - Vhd or Vhdx"), ValueMap{"Vhd","Vhdx"}, Values{"Vhd","Vhdx"}] String Generation; - [Write, Description("Should the VHD be created or deleted"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Read, Description("Virtual Disk Identifier")] String ID; - [Write, Description("Type of Vhd - Dynamic, Fixed, Differencing"), ValueMap{"Dynamic","Fixed","Differencing"}, Values{"Dynamic","Fixed","Differencing"}] String Type; - [Read, Description("Current size of the VHD")] Uint64 FileSizeBytes; - [Read, Description("Is the VHD attached to a VM or not")] Boolean IsAttached; -}; - diff --git a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMDvdDrive/MSFT_xVMDvdDrive.psm1 b/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMDvdDrive/MSFT_xVMDvdDrive.psm1 deleted file mode 100644 index fd7e010d..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMDvdDrive/MSFT_xVMDvdDrive.psm1 +++ /dev/null @@ -1,437 +0,0 @@ -#region localizeddata -if (Test-Path "${PSScriptRoot}\${PSUICulture}") -{ - Import-LocalizedData ` - -BindingVariable LocalizedData ` - -Filename MSFT_xVMDvdDrive.strings.psd1 ` - -BaseDirectory "${PSScriptRoot}\${PSUICulture}" -} -else -{ - #fallback to en-US - Import-LocalizedData ` - -BindingVariable LocalizedData ` - -Filename MSFT_xVMDvdDrive.strings.psd1 ` - -BaseDirectory "${PSScriptRoot}\en-US" -} -#endregion - -# Import the common HyperV functions -Import-Module -Name ( Join-Path ` - -Path (Split-Path -Path $PSScriptRoot -Parent) ` - -ChildPath '\HyperVCommon\HyperVCommon.psm1' ) - -<# - .SYNOPSIS - Returns the current status of the VM DVD Drive. - - .PARAMETER VMName - Specifies the name of the virtual machine to which the DVD drive is to be added. - - .PARAMETER ControllerNumber - Specifies the number of the controller to which the DVD drive is to be added. - - .PARAMETER ControllerLocation - Specifies the number of the location on the controller at which the DVD drive is to be added. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $VMName, - - [parameter(Mandatory = $true)] - [System.Uint32] - $ControllerNumber, - - [parameter(Mandatory = $true)] - [System.Uint32] - $ControllerLocation - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.GettingVMDVDDriveMessage ` - -f $VMName,$ControllerNumber,$ControllerLocation) - ) -join '' ) - - Test-ParameterValid @PSBoundParameters - - $dvdDrive = Get-VMDvdDrive @PSBoundParameters - - if ($dvdDrive) - { - $returnValue = @{ - VMName = $VMName - ControllerLocation = $ControllerLocation - ControllerNumber = $ControllerNumber - Path = $dvdDrive.Path - Ensure = 'Present' - } - } - else - { - $returnValue = @{ - VMName = $VMName - ControllerLocation = $ControllerLocation - ControllerNumber = $ControllerNumber - Path = '' - Ensure = 'Absent' - } - } # if - - $returnValue -} # Get-TargetResource - -<# - .SYNOPSIS - Adds, removes or changes the mounted ISO on a VM DVD Drive. - - .PARAMETER VMName - Specifies the name of the virtual machine to which the DVD drive is to be added. - - .PARAMETER ControllerNumber - Specifies the number of the controller to which the DVD drive is to be added. - - .PARAMETER ControllerLocation - Specifies the number of the location on the controller at which the DVD drive is to be added. - - .PARAMETER Path - Specifies the full path to the virtual hard disk file or physical hard disk volume for the - added DVD drive. - - .PARAMETER Ensure - Specifies if the DVD Drive should exist or not. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $VMName, - - [parameter(Mandatory = $true)] - [System.Uint32] - $ControllerLocation, - - [parameter(Mandatory = $true)] - [System.Uint32] - $ControllerNumber, - - [System.String] - $Path, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = 'Present' - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.SettingVMDVDDriveMessage ` - -f $VMName,$ControllerNumber,$ControllerLocation) - ) -join '' ) - - $null = $PSBoundParameters.Remove('Path') - $null = $PSBoundParameters.Remove('Ensure') - - # Get the current status of the VM DVD Drive - $dvdDrive = Get-TargetResource @PSBoundParameters - - if ($Ensure -eq 'Present') - { - # The DVD Drive should exist - if ($dvdDrive.Ensure -eq 'Present') - { - # The DVD Drive already exists - if (-not [String]::IsNullOrWhiteSpace($Path) ` - -and ($Path -ne $dvdDrive.Path)) - { - # The current path assigned to the DVD Drive needs to be changed. - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.VMDVDDriveChangePathMessage) ` - -f $VMName,$ControllerNumber,$ControllerLocation,$Path ` - ) -join '' ) - - Set-VMDvdDrive @PSBoundParameters -Path $Path - } - } - else - { - # The DVD Drive does not exist but should. Change required. - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.VMDVDDriveAddMessage) ` - -f $VMName,$ControllerNumber,$ControllerLocation,$Path ` - ) -join '' ) - - if (-not [String]::IsNullOrWhiteSpace($Path)) { - $PSBoundParameters.Add('Path',$Path) - } # if - - Add-VMDvdDrive @PSBoundParameters - } # if - } - else - { - # The DVD Drive should not exist - if ($dvdDrive.Ensure -eq 'Present') - { - # The DVD Drive does exist, but should not. Change required. - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.VMDVDDriveRemoveMessage) ` - -f $VMName,$ControllerNumber,$ControllerLocation ` - ) -join '' ) - - Remove-VMDvdDrive @PSBoundParameters - } # if - } # if -} # Set-TargetResource - -<# - .SYNOPSIS - Tests the state of a VM DVD Drive and the mounted ISO. - - .PARAMETER VMName - Specifies the name of the virtual machine to which the DVD drive is to be added. - - .PARAMETER ControllerNumber - Specifies the number of the controller to which the DVD drive is to be added. - - .PARAMETER ControllerLocation - Specifies the number of the location on the controller at which the DVD drive is to be added. - - .PARAMETER Path - Specifies the full path to the virtual hard disk file or physical hard disk volume for the - added DVD drive. - - .PARAMETER Ensure - Specifies if the DVD Drive should exist or not. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $VMName, - - [parameter(Mandatory = $true)] - [System.Uint32] - $ControllerLocation, - - [parameter(Mandatory = $true)] - [System.Uint32] - $ControllerNumber, - - [System.String] - $Path, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = 'Present' - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.TestingVMDVDDriveMessage ` - -f $VMName,$ControllerNumber,$ControllerLocation) - ) -join '' ) - - $null = $PSBoundParameters.Remove('Path') - $null = $PSBoundParameters.Remove('Ensure') - - # Get the current status of the VM DVD Drive - $dvdDrive = Get-TargetResource @PSBoundParameters - - # Flag to signal whether settings are correct - [Boolean] $desiredConfigurationMatch = $true - - if ($Ensure -eq 'Present') - { - # The DVD Drive should exist - if ($dvdDrive.Ensure -eq 'Present') - { - # The DVD Drive already exists - if (-not [String]::IsNullOrWhiteSpace($Path) ` - -and ($Path -ne $dvdDrive.Path)) - { - # The current path assigned to the DVD drive is wrong. Change required. - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.VMDVDDriveExistsAndShouldPathMismatchMessage) ` - -f $VMName,$ControllerNumber,$ControllerLocation,$Path,$dvdDrive.Path ` - ) -join '' ) - - $desiredConfigurationMatch = $false - } - else - { - # The DVD drive exists and should. Change not required. - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.VMDVDDriveExistsAndShouldMessage) ` - -f $VMName,$ControllerNumber,$ControllerLocation,$Path ` - ) -join '' ) - } # if - } - else - { - # The DVD Drive does not exist but should. Change required. - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.VMDVDDriveDoesNotExistButShouldMessage) ` - -f $VMName,$ControllerNumber,$ControllerLocation ` - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - } - else - { - # The DVD Drive should not exist - if ($dvdDrive.Ensure -eq 'Present') - { - # The DVD Drive does exist, but should not. Change required. - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.VMDVDDriveDoesExistButShouldNotMessage) ` - -f $VMName,$ControllerNumber,$ControllerLocation ` - ) -join '' ) - - $desiredConfigurationMatch = $false - } - else - { - # The DVD Drive does not exist and should not. Change not required. - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.VMDVDDriveDoesNotExistAndShouldNotMessage) ` - -f $VMName,$ControllerNumber,$ControllerLocation ` - ) -join '' ) - } # if - } # if - - return $desiredConfigurationMatch -} # Test-TargetResource - -<# - .SYNOPSIS - Validates that the parameters passed are valid. If the parameter combination - is invalid then an exception will be thrown. The following items are validated: - - The VM exists. - - A disk mount point at the controller number/location exists. - - A hard disk is not already mounted at the controller number/location. - - The Path if required is valid. - - .PARAMETER VMName - Specifies the name of the virtual machine to which the DVD drive is to be added. - - .PARAMETER ControllerNumber - Specifies the number of the controller to which the DVD drive is to be added. - - .PARAMETER ControllerLocation - Specifies the number of the location on the controller at which the DVD drive is to be added. - - .PARAMETER Path - Specifies the full path to the virtual hard disk file or physical hard disk volume for the - added DVD drive. - - .PARAMETER Ensure - Specifies if the DVD Drive should exist or not. - - .OUTPUTS - Returns true if the parameters are valid, but will throw a specific error if not. -#> -function Test-ParameterValid -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $VMName, - - [parameter(Mandatory = $true)] - [System.Uint32] - $ControllerLocation, - - [parameter(Mandatory = $true)] - [System.Uint32] - $ControllerNumber, - - [System.String] - $Path, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = 'Present' - ) - - # Check if Hyper-V module is present for Hyper-V cmdlets - if(-not (Get-Module -ListAvailable -Name Hyper-V)) - { - New-InvalidArgumentError ` - -ErrorId 'RoleMissingError' ` - -ErrorMessage ($LocalizedData.RoleMissingError -f ` - 'Hyper-V') - } # if - - # Does the VM exist? - $null = Get-VM -Name $VMName - - # Does the controller exist? - if (-not (Get-VMScsiController -VMName $VMName -ControllerNumber $ControllerNumber) ` - -and -not (Get-VMIdeController -VMName $VMName -ControllerNumber $ControllerNumber)) - { - # No it does not - New-InvalidArgumentError ` - -ErrorId 'VMControllerDoesNotExistError' ` - -ErrorMessage ($LocalizedData.VMControllerDoesNotExistError -f ` - $VMName,$ControllerNumber) - } # if - - # Is a Hard Drive assigned to this controller location/number? - if (Get-VMHardDiskDrive ` - -VMName $VMName ` - -ControllerLocation $ControllerLocation ` - -ControllerNumber $ControllerNumber) - { - # Yes, so don't even try and touch this - New-InvalidArgumentError ` - -ErrorId 'ControllerConflictError' ` - -ErrorMessage ($LocalizedData.ControllerConflictError -f ` - $VMName,$ControllerNumber,$ControllerLocation) - } # if - - if ($Ensure -eq 'Present') - { - # If the path is not blank does it exist? - if (-not ([String]::IsNullOrWhiteSpace($Path))) - { - if (-not (Test-Path -Path $Path)) - { - # Path does not exist - New-InvalidArgumentError ` - -ErrorId 'PathDoesNotExistError' ` - -ErrorMessage ($LocalizedData.PathDoesNotExistError -f ` - $Path) - } # if - } # if - } # if - - return $true -} # Test-ParameterValid - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMDvdDrive/MSFT_xVMDvdDrive.schema.mof b/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMDvdDrive/MSFT_xVMDvdDrive.schema.mof deleted file mode 100644 index 04e3c4ad..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMDvdDrive/MSFT_xVMDvdDrive.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xVMDvdDrive")] -class MSFT_xVMDvdDrive : OMI_BaseResource -{ - [Key, Description("Specifies the name of the virtual machine to which the DVD drive is to be added.")] String VMName; - [Key, Description("Specifies the number of the controller to which the DVD drive is to be added.")] Uint32 ControllerNumber; - [Key, Description("Specifies the number of the location on the controller at which the DVD drive is to be added.")] Uint32 ControllerLocation; - [Write, Description("Specifies the full path to the virtual hard disk file or physical hard disk volume for the added DVD drive.")] String Path; - [Write, Description("Specifies if the DVD Drive should exist or not."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; diff --git a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMDvdDrive/en-us/MSFT_xVMDvdDrive.strings.psd1 b/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMDvdDrive/en-us/MSFT_xVMDvdDrive.strings.psd1 deleted file mode 100644 index 2c29d24c..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMDvdDrive/en-us/MSFT_xVMDvdDrive.strings.psd1 +++ /dev/null @@ -1,20 +0,0 @@ -ConvertFrom-StringData @' - GettingVMDVDDriveMessage = Getting VM DVD Drive for VM '{0}' controller number {1} location {2}. - - SettingVMDVDDriveMessage = Setting VM DVD Drive for VM '{0}' controller number {1} location {2}. - VMDVDDriveChangePathMessage = VM '{0}' DVD Drive on controller number {1} location {2} already exists, changing the Path to '{3}'. - VMDVDDriveAddMessage = Adding VM '{0}' DVD Drive on controller number {1} location {2} with path '{3}'. - VMDVDDriveRemoveMessage = Removing VM '{0}' DVD Drive on controller number {1} location {2}. - - TestingVMDVDDriveMessage = Testing VM DVD Drive for VM '{0}' controller number {1} location {2}. - VMDVDDriveExistsAndShouldPathMismatchMessage = VM '{0}' DVD Drive on controller number {1} location {2} exists and should but the desired path '{3}' does not match '{4}'. Change required. - VMDVDDriveExistsAndShouldMessage = VM '{0}' DVD Drive on controller number {1} location {2} exists and should and the path '{3}' matches. Change not required. - VMDVDDriveDoesNotExistButShouldMessage = VM '{0}' DVD Drive on controller number {1} location {2} does not exist but should. Change required. - VMDVDDriveDoesExistButShouldNotMessage = VM '{0}' DVD Drive on controller number {1} location {2} exists but should not. Change required. - VMDVDDriveDoesNotExistAndShouldNotMessage = VM '{0}' DVD Drive on controller number {1} location {2} does not exist and should not. Change not required. - - RoleMissingError = Please ensure that '{0}' role is installed with its PowerShell module. - VMControllerDoesNotExistError = The controller number {1} does not exist on VM '{0}'. - PathDoesNotExistError = The path '{0}' does not exist. - ControllerConflictError = The Controller number {1} location {2} already has a hard drive attached on VM '{0}'. -'@ diff --git a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMHost/MSFT_xVMHost.psm1 b/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMHost/MSFT_xVMHost.psm1 deleted file mode 100644 index 140a5895..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMHost/MSFT_xVMHost.psm1 +++ /dev/null @@ -1,409 +0,0 @@ -#region localizeddata -if (Test-Path "${PSScriptRoot}\${PSUICulture}") -{ - Import-LocalizedData -BindingVariable localizedData -Filename MSFT_xVMHost.psd1 ` - -BaseDirectory "${PSScriptRoot}\${PSUICulture}" -} -else -{ - # fallback to en-US - Import-LocalizedData -BindingVariable localizedData -Filename MSFT_xVMHost.psd1 ` - -BaseDirectory "${PSScriptRoot}\en-US" -} -#endregion - -# Import the common HyperV functions -Import-Module -Name ( Join-Path ` - -Path (Split-Path -Path $PSScriptRoot -Parent) ` - -ChildPath '\HyperVCommon\HyperVCommon.psm1' ) - -<# -.SYNOPSIS - Gets MSFT_xVMHost resource current state. - -.PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [System.String] - $IsSingleInstance - ) - - Assert-Module -Name 'Hyper-V' - - Write-Verbose -Message $localizedData.QueryingVMHost - $vmHost = Get-VMHost - - # Convert the current TimeSpan into minutes - $convertFromTimeSpanParams = @{ - TimeSpan = $vmHost.ResourceMeteringSaveInterval - TimeSpanType = 'Minutes' - } - $resourceMeteringSaveInterval = ConvertFrom-TimeSpan @convertFromTimeSpanParams - - $configuration = @{ - IsSingleInstance = $IsSingleInstance - EnableEnhancedSessionMode = $vmHost.EnableEnhancedSessionMode - FibreChannelWwnn = $vmHost.FibreChannelWwnn - FibreChannelWwpnMaximum = $vmHost.FibreChannelWwpnMaximum - FibreChannelWwpnMinimum = $vmHost.FibreChannelWwpnMinimum - MacAddressMaximum = $vmHost.MacAddressMaximum - MacAddressMinimum = $vmHost.MacAddressMinimum - MaximumStorageMigrations = $vmHost.MaximumStorageMigrations - MaximumVirtualMachineMigrations = $vmHost.MaximumVirtualMachineMigrations - NumaSpanningEnabled = $vmHost.NumaSpanningEnabled - ResourceMeteringSaveIntervalMinute = $resourceMeteringSaveInterval - UseAnyNetworkForMigration = $vmHost.UseAnyNetworkForMigration - VirtualHardDiskPath = $vmHost.VirtualHardDiskPath - VirtualMachineMigrationAuthenticationType = $vmHost.VirtualMachineMigrationAuthenticationType - VirtualMachineMigrationPerformanceOption = $vmHost.VirtualMachineMigrationPerformanceOption - VirtualMachinePath = $vmHost.VirtualMachinePath - } - - return $configuration -} - -<# -.SYNOPSIS - Tests if MSFT_xVMHost resource state is in the desired state or not. - -.PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. - -.PARAMETER EnableEnhancedSessionMode - Indicates whether users can use enhanced mode when they connect to virtual machines on this - server by using Virtual Machine Connection. - -.PARAMETER FibreChannelWwnn - Specifies the default value of the World Wide Node Name on the Hyper-V host. - -.PARAMETER FibreChannelWwpnMaximum - Specifies the maximum value that can be used to generate World Wide Port Names on the Hyper-V - host. Use with the FibreChannelWwpnMinimum parameter to establish a range of WWPNs that the - specified Hyper-V host can assign to virtual Fibre Channel adapters. - -.PARAMETER FibreChannelWwpnMinimum - Specifies the minimum value that can be used to generate the World Wide Port Names on the - Hyper-V host. Use with the FibreChannelWwpnMaximum parameter to establish a range of WWPNs that - the specified Hyper-V host can assign to virtual Fibre Channel adapters. - -.PARAMETER MacAddressMaximum - Specifies the maximum MAC address using a valid hexadecimal value. Use with the - MacAddressMinimum parameter to establish a range of MAC addresses that the specified Hyper-V - host can assign to virtual machines configured to receive dynamic MAC addresses. - -.PARAMETER MacAddressMinimum - Specifies the minimum MAC address using a valid hexadecimal value. Use with the - MacAddressMaximum parameter to establish a range of MAC addresses that the specified Hyper-V - host can assign to virtual machines configured to receive dynamic MAC addresses. - -.PARAMETER MaximumStorageMigrations - Specifies the maximum number of storage migrations that can be performed at the same time on - the Hyper-V host. - -.PARAMETER MaximumVirtualMachineMigrations - Specifies the maximum number of live migrations that can be performed at the same time on the - Hyper-V host. - -.PARAMETER NumaSpanningEnabled - Specifies whether virtual machines on the Hyper-V host can use resources from more than one - NUMA node. - -.PARAMETER ResourceMeteringSaveIntervalMinute - Specifies how often the Hyper-V host saves the data that tracks resource usage. The range is a - minimum of 60 minutes to a maximum 1440 minutes (24 hours). - -.PARAMETER UseAnyNetworkForMigration - Specifies how networks are selected for incoming live migration traffic. If set to $True, any - available network on the host can be used for this traffic. If set to $False, incoming live - migration traffic is transmitted only on the networks specified in the MigrationNetworks - property of the host. - -.PARAMETER VirtualHardDiskPath - Specifies the default folder to store virtual hard disks on the Hyper-V host. - -.PARAMETER VirtualMachineMigrationAuthenticationType - Specifies the type of authentication to be used for live migrations. The acceptable values for - this parameter are 'Kerberos' and 'CredSSP'. - -.PARAMETER VirtualMachineMigrationPerformanceOption - Specifies the performance option to use for live migration. The acceptable values for this - parameter are 'TCPIP', 'Compression' and 'SMB'. - -.PARAMETER VirtualMachinePath - Specifies the default folder to store virtual machine configuration files on the Hyper-V host. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [System.String] - $IsSingleInstance, - - [Parameter()] - [System.Boolean] - $EnableEnhancedSessionMode, - - [Parameter()] - [System.String] - $FibreChannelWwnn, - - [Parameter()] - [System.String] - $FibreChannelWwpnMaximum, - - [Parameter()] - [System.String] - $FibreChannelWwpnMinimum, - - [Parameter()] - [System.String] - $MacAddressMaximum, - - [Parameter()] - [System.String] - $MacAddressMinimum, - - [Parameter()] - [System.UInt32] - $MaximumStorageMigrations, - - [Parameter()] - [System.UInt32] - $MaximumVirtualMachineMigrations, - - [Parameter()] - [System.Boolean] - $NumaSpanningEnabled, - - [Parameter()] - [System.UInt32] - $ResourceMeteringSaveIntervalMinute, - - [Parameter()] - [System.Boolean] - $UseAnyNetworkForMigration, - - [Parameter()] - [System.String] - $VirtualHardDiskPath, - - [Parameter()] - [ValidateSet('Kerberos','CredSSP')] - [System.String] - $VirtualMachineMigrationAuthenticationType, - - [Parameter()] - [ValidateSet('TCPIP','Compression','SMB')] - [System.String] - $VirtualMachineMigrationPerformanceOption, - - [Parameter()] - [System.String] - $VirtualMachinePath - ) - - Assert-Module -Name 'Hyper-V' - - $targetResource = Get-TargetResource -IsSingleInstance $IsSingleInstance - $isTargetResourceCompliant = $true - - foreach ($parameter in $PSBoundParameters.GetEnumerator()) - { - if (($targetResource.ContainsKey($parameter.Key)) -and - ($parameter.Value -ne $targetResource[$parameter.Key])) - { - $isTargetResourceCompliant = $false - Write-Verbose -Message ($localizedData.PropertyMismatch -f $parameter.Key, - $parameter.Value, $targetResource[$parameter.Key]) - } - } - - if ($isTargetResourceCompliant) - { - Write-Verbose -Message $localizedData.VMHostInDesiredState - } - else - { - Write-Verbose -Message $localizedData.VMHostNotInDesiredState - } - - return $isTargetResourceCompliant -} #end function - -<# -.SYNOPSIS - Configures MSFT_xVMHost resource state. - -.PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. - -.PARAMETER EnableEnhancedSessionMode - Indicates whether users can use enhanced mode when they connect to virtual machines on this - server by using Virtual Machine Connection. - -.PARAMETER FibreChannelWwnn - Specifies the default value of the World Wide Node Name on the Hyper-V host. - -.PARAMETER FibreChannelWwpnMaximum - Specifies the maximum value that can be used to generate World Wide Port Names on the Hyper-V - host. Use with the FibreChannelWwpnMinimum parameter to establish a range of WWPNs that the - specified Hyper-V host can assign to virtual Fibre Channel adapters. - -.PARAMETER FibreChannelWwpnMinimum - Specifies the minimum value that can be used to generate the World Wide Port Names on the - Hyper-V host. Use with the FibreChannelWwpnMaximum parameter to establish a range of WWPNs that - the specified Hyper-V host can assign to virtual Fibre Channel adapters. - -.PARAMETER MacAddressMaximum - Specifies the maximum MAC address using a valid hexadecimal value. Use with the - MacAddressMinimum parameter to establish a range of MAC addresses that the specified Hyper-V - host can assign to virtual machines configured to receive dynamic MAC addresses. - -.PARAMETER MacAddressMinimum - Specifies the minimum MAC address using a valid hexadecimal value. Use with the - MacAddressMaximum parameter to establish a range of MAC addresses that the specified Hyper-V - host can assign to virtual machines configured to receive dynamic MAC addresses. - -.PARAMETER MaximumStorageMigrations - Specifies the maximum number of storage migrations that can be performed at the same time on - the Hyper-V host. - -.PARAMETER MaximumVirtualMachineMigrations - Specifies the maximum number of live migrations that can be performed at the same time on the - Hyper-V host. - -.PARAMETER NumaSpanningEnabled - Specifies whether virtual machines on the Hyper-V host can use resources from more than one - NUMA node. - -.PARAMETER ResourceMeteringSaveIntervalMinute - Specifies how often the Hyper-V host saves the data that tracks resource usage. The range is a - minimum of 60 minutes to a maximum 1440 minutes (24 hours). - -.PARAMETER UseAnyNetworkForMigration - Specifies how networks are selected for incoming live migration traffic. If set to $True, any - available network on the host can be used for this traffic. If set to $False, incoming live - migration traffic is transmitted only on the networks specified in the MigrationNetworks - property of the host. - -.PARAMETER VirtualHardDiskPath - Specifies the default folder to store virtual hard disks on the Hyper-V host. - -.PARAMETER VirtualMachineMigrationAuthenticationType - Specifies the type of authentication to be used for live migrations. The acceptable values for - this parameter are 'Kerberos' and 'CredSSP'. - -.PARAMETER VirtualMachineMigrationPerformanceOption - Specifies the performance option to use for live migration. The acceptable values for this - parameter are 'TCPIP', 'Compression' and 'SMB'. - -.PARAMETER VirtualMachinePath - Specifies the default folder to store virtual machine configuration files on the Hyper-V host. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [System.String] - $IsSingleInstance, - - [Parameter()] - [System.Boolean] - $EnableEnhancedSessionMode, - - [Parameter()] - [System.String] - $FibreChannelWwnn, - - [Parameter()] - [System.String] - $FibreChannelWwpnMaximum, - - [Parameter()] - [System.String] - $FibreChannelWwpnMinimum, - - [Parameter()] - [System.String] - $MacAddressMaximum, - - [Parameter()] - [System.String] - $MacAddressMinimum, - - [Parameter()] - [System.UInt32] - $MaximumStorageMigrations, - - [Parameter()] - [System.UInt32] - $MaximumVirtualMachineMigrations, - - [Parameter()] - [System.Boolean] - $NumaSpanningEnabled, - - [Parameter()] - [System.UInt32] - $ResourceMeteringSaveIntervalMinute, - - [Parameter()] - [System.Boolean] - $UseAnyNetworkForMigration, - - [Parameter()] - [System.String] - $VirtualHardDiskPath, - - [Parameter()] - [ValidateSet('Kerberos','CredSSP')] - [System.String] - $VirtualMachineMigrationAuthenticationType, - - [Parameter()] - [ValidateSet('TCPIP','Compression','SMB')] - [System.String] - $VirtualMachineMigrationPerformanceOption, - - [Parameter()] - [System.String] - $VirtualMachinePath - ) - - Assert-Module -Name 'Hyper-V' - - $null = $PSBoundParameters.Remove('IsSingleInstance') - - if ($PSBoundParameters.ContainsKey('ResourceMeteringSaveIntervalMinute')) - { - # Need to convert the specified minutes into a TimeSpan object first - $convertToTimeSpanParams = @{ - TimeInterval = $PSBoundParameters['ResourceMeteringSaveIntervalMinute'] - TimeIntervalType = 'Minutes' - } - $resourceMeteringSaveInterval = ConvertTo-TimeSpan @convertToTimeSpanParams - - # Remove the existing UInt32 explicit type and add the TimeSpan type parameter - $null = $PSBoundParameters.Remove('ResourceMeteringSaveIntervalMinute') - $PSBoundParameters['ResourceMeteringSaveInterval'] = $resourceMeteringSaveInterval - } - - Write-Verbose -Message $localizedData.UpdatingVMHostProperties - Set-VMHost @PSBoundParameters - Write-Verbose -Message $localizedData.VMHostPropertiesUpdated -} #end function diff --git a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMHost/MSFT_xVMHost.schema.mof b/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMHost/MSFT_xVMHost.schema.mof deleted file mode 100644 index f2131669..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMHost/MSFT_xVMHost.schema.mof +++ /dev/null @@ -1,20 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xVMHost")] -class MSFT_xVMHost : OMI_BaseResource -{ - [Key, Description("Specifies the resource is a single instance, the value must be 'Yes'."), ValueMap{"Yes"}, Values{"Yes"}] String IsSingleInstance; - [Write, Description("Indicates whether users can use enhanced mode when they connect to virtual machines on this server by using Virtual Machine Connection.")] Boolean EnableEnhancedSessionMode; - [Write, Description("Specifies the default value of the World Wide Node Name on the Hyper-V host.")] String FibreChannelWwnn; - [Write, Description("Specifies the maximum value that can be used to generate World Wide Port Names on the Hyper-V host.")] String FibreChannelWwpnMaximum; - [Write, Description("Specifies the minimum value that can be used to generate the World Wide Port Names on the Hyper-V host.")] String FibreChannelWwpnMinimum; - [Write, Description("Specifies the maximum MAC address using a valid hexadecimal value.")] String MacAddressMaximum; - [Write, Description("Specifies the minimum MAC address using a valid hexadecimal value.")] String MacAddressMinimum; - [Write, Description("Specifies the maximum number of storage migrations that can be performed at the same time on the Hyper-V host.")] Uint32 MaximumStorageMigrations; - [Write, Description("Specifies the maximum number of live migrations that can be performed at the same time on the Hyper-V host.")] Uint32 MaximumVirtualMachineMigrations; - [Write, Description("Specifies whether virtual machines on the Hyper-V host can use resources from more than one NUMA node.")] Boolean NumaSpanningEnabled; - [Write, Description("Specifies how often the Hyper-V host saves the data that tracks resource usage. The range is a minimum of 60 minutes to a maximum of 1440 (24 hours).")] Uint32 ResourceMeteringSaveIntervalMinute; - [Write, Description("Specifies how networks are selected for incoming live migration traffic.")] Boolean UseAnyNetworkForMigration; - [Write, Description("Specifies the default folder to store virtual hard disks on the Hyper-V host.")] String VirtualHardDiskPath; - [Write, Description("Specifies the type of authentication to be used for live migrations. The acceptable values for this parameter are 'Kerberos' and 'CredSSP'."), ValueMap{"CredSSP","Kerberos"}, Values{"CredSSP","Kerberos"}] String VirtualMachineMigrationAuthenticationType; - [Write, Description("Specifies the performance option to use for live migration. The acceptable values for this parameter are 'TCPIP', 'Compression' and 'SMB'."), ValueMap{"TCPIP","Compression","SMB"}, Values{"TCPIP","Compression","SMB"}] String VirtualMachineMigrationPerformanceOption; - [Write, Description("Specifies the default folder to store virtual machine configuration files on the Hyper-V host.")] String VirtualMachinePath; -}; diff --git a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMHost/en-US/MSFT_xVMHost.psd1 b/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMHost/en-US/MSFT_xVMHost.psd1 deleted file mode 100644 index 6a9ae594..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMHost/en-US/MSFT_xVMHost.psd1 +++ /dev/null @@ -1,8 +0,0 @@ -ConvertFrom-StringData @' - QueryingVMHost = Querying VM host configuration. - PropertyMismatch = Property '{0}' mismatch; expected value '{1}', but was '{2}'. - VMHostInDesiredState = VM host in desired state. - VMHostNotInDesiredState = VM host not in desired state. - UpdatingVMHostProperties = Updating VM host properties. - VMHostPropertiesUpdated = VM host properties have been updated. -'@ diff --git a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMHyperV/MSFT_xVMHyperV.psm1 b/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMHyperV/MSFT_xVMHyperV.psm1 deleted file mode 100644 index 69262e5c..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMHyperV/MSFT_xVMHyperV.psm1 +++ /dev/null @@ -1,785 +0,0 @@ -# Fallback message strings in en-US -DATA localizedData -{ - # culture = "en-US" - ConvertFrom-StringData @' - RoleMissingError = Please ensure that '{0}' role is installed with its PowerShell module. - MoreThanOneVMExistsError = More than one VM with the name '{0}' exists. - PathDoesNotExistError = Path '{0}' does not exist. - VhdPathDoesNotExistError = Vhd '{0}' does not exist. - MinMemGreaterThanStartupMemError = MinimumMemory '{0}' should not be greater than StartupMemory '{1}' - MinMemGreaterThanMaxMemError = MinimumMemory '{0}' should not be greater than MaximumMemory '{1}' - StartUpMemGreaterThanMaxMemError = StartupMemory '{0}' should not be greater than MaximumMemory '{1}'. - VhdUnsupportedOnGen2VMError = Generation 2 virtual machines do not support the .VHD virtual disk extension. - CannotUpdatePropertiesOnlineError = Can not change properties for VM '{0}' in '{1}' state unless 'RestartIfNeeded' is set to true. - - AdjustingGreaterThanMemoryWarning = VM {0} '{1}' is greater than {2} '{3}'. Adjusting {0} to be '{3}'. - AdjustingLessThanMemoryWarning = VM {0} '{1}' is less than {2} '{3}'. Adjusting {0} to be '{3}'. - VMStateWillBeOffWarning = VM '{0}' state will be 'OFF' and not 'Paused'. - - CheckingVMExists = Checking if VM '{0}' exists ... - VMExists = VM '{0}' exists. - VMDoesNotExist = VM '{0}' does not exist. - CreatingVM = Creating VM '{0}' ... - VMCreated = VM '{0}' created. - VMPropertyShouldBe = VM property '{0}' should be '{1}', actual '{2}'. - VMPropertySet = VM property '{0}' is '{1}'. - VMPropertiesUpdated = VM '{0}' properties have been updated. - WaitingForVMIPAddress = Waiting for IP Address for VM '{0}' ... -'@ -} - -# Import the common HyperV functions -Import-Module -Name ( Join-Path ` - -Path (Split-Path -Path $PSScriptRoot -Parent) ` - -ChildPath '\HyperVCommon\HyperVCommon.psm1' ) - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [System.String] - $VhdPath - ) - - # Check if Hyper-V module is present for Hyper-V cmdlets - if(!(Get-Module -ListAvailable -Name Hyper-V)) - { - Throw ($localizedData.RoleMissingError -f 'Hyper-V') - } - - $vmobj = Get-VM -Name $Name -ErrorAction SilentlyContinue - - # Check if 1 or 0 VM with name = $name exist - if($vmobj.count -gt 1) - { - Throw ($localizedData.MoreThanOneVMExistsError -f $Name) - } - - # Retrieve the Vhd hierarchy to ensure we enumerate snapshots/differencing disks - # Fixes #28 - $vhdChain = @(Get-VhdHierarchy -VhdPath ($vmObj.HardDrives[0].Path)) - - $vmSecureBootState = $false - if ($vmobj.Generation -eq 2) - { - # Retrieve secure boot status (can only be enabled on Generation 2 VMs) and convert to a boolean. - $vmSecureBootState = ($vmobj | Get-VMFirmware).SecureBoot -eq 'On' - } - - $guestServiceId = 'Microsoft:{0}\6C09BB55-D683-4DA0-8931-C9BF705F6480' -f $vmObj.Id - - @{ - Name = $Name - ## Return the Vhd specified if it exists in the Vhd chain - VhdPath = if ($vhdChain -contains $VhdPath) { $VhdPath }; - SwitchName = $vmObj.NetworkAdapters.SwitchName - State = $vmobj.State - Path = $vmobj.Path - Generation = $vmobj.Generation - SecureBoot = $vmSecureBootState - StartupMemory = $vmobj.MemoryStartup - MinimumMemory = $vmobj.MemoryMinimum - MaximumMemory = $vmobj.MemoryMaximum - MACAddress = $vmObj.NetWorkAdapters.MacAddress - ProcessorCount = $vmobj.ProcessorCount - Ensure = if($vmobj){"Present"}else{"Absent"} - ID = $vmobj.Id - Status = $vmobj.Status - CPUUsage = $vmobj.CPUUsage - MemoryAssigned = $vmobj.MemoryAssigned - Uptime = $vmobj.Uptime - CreationTime = $vmobj.CreationTime - HasDynamicMemory = $vmobj.DynamicMemoryEnabled - NetworkAdapters = $vmobj.NetworkAdapters.IPAddresses - EnableGuestService = ($vmobj | Get-VMIntegrationService | Where-Object -FilterScript {$_.Id -eq $guestServiceId}).Enabled - } -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - # Name of the VM - [Parameter(Mandatory = $true)] - [String] - $Name, - - # VHD associated with the VM - [Parameter(Mandatory = $true)] - [String] - $VhdPath, - - # Virtual switch associated with the VM - [Parameter()] - [String[]] - $SwitchName, - - # State of the VM - [Parameter()] - [ValidateSet('Running','Paused','Off')] - [String] - $State, - - # Folder where the VM data will be stored - [Parameter()] - [String] - $Path, - - # Virtual machine generation - [Parameter()] - [ValidateRange(1,2)] - [UInt32] - $Generation = 1, - - # Startup RAM for the VM - [Parameter()] - [ValidateRange(32MB,65536MB)] - [UInt64] - $StartupMemory, - - # Minimum RAM for the VM. This enables dynamic memory - [Parameter()] - [ValidateRange(32MB,65536MB)] - [UInt64] - $MinimumMemory, - - # Maximum RAM for the VM. This enables dynamic memory - [Parameter()] - [ValidateRange(32MB,1048576MB)] - [UInt64] - $MaximumMemory, - - # MAC address of the VM - [Parameter()] - [String[]] - $MACAddress, - - # Processor count for the VM - [Parameter()] - [UInt32] - $ProcessorCount, - - # Waits for VM to get valid IP address - [Parameter()] - [Boolean] - $WaitForIP, - - # If specified, shutdowns and restarts the VM as needed for property changes - [Parameter()] - [Boolean] - $RestartIfNeeded, - - # Should the VM be created or deleted - [Parameter()] - [ValidateSet('Present','Absent')] - [String] - $Ensure = 'Present', - - [Parameter()] - [System.String] - $Notes, - - # Enable secure boot for Generation 2 VMs - [Parameter()] - [Boolean] - $SecureBoot = $true, - - # Enable Guest Services - [Parameter()] - [Boolean] - $EnableGuestService = $false - ) - - # Check if Hyper-V module is present for Hyper-V cmdlets - if(!(Get-Module -ListAvailable -Name Hyper-V)) - { - Throw ($localizedData.RoleMissingError -f 'Hyper-V') - } - - Write-Verbose -Message ($localizedData.CheckingVMExists -f $Name) - $vmObj = Get-VM -Name $Name -ErrorAction SilentlyContinue - - # VM already exists - if($vmObj) - { - Write-Verbose -Message ($localizedData.VMExists -f $Name) - - # If VM shouldn't be there, stop it and remove it - if($Ensure -eq "Absent") - { - Write-Verbose -Message ($localizedData.VMPropertyShouldBe -f 'Ensure', $Ensure, 'Present') - Get-VM $Name | Stop-VM -Force -Passthru -WarningAction SilentlyContinue | Remove-VM -Force - Write-Verbose -Message ($localizedData.VMPropertySet -f 'Ensure', $Ensure) - } - - # If VM is present, check its state, startup memory, minimum memory, maximum memory,processor countand mac address - # One cannot set the VM's vhdpath, path, generation and switchName after creation - else - { - # If state has been specified and the VM is not in right state, set it to right state - if($State -and ($vmObj.State -ne $State)) - { - Write-Verbose -Message ($localizedData.VMPropertyShouldBe -f 'State', $State, $vmObj.State) - Set-VMState -Name $Name -State $State -WaitForIP $WaitForIP - Write-Verbose -Message ($localizedData.VMPropertySet -f 'State', $State) - } - - $changeProperty = @{} - # If the VM does not have the right startup memory - if($StartupMemory -and ($vmObj.MemoryStartup -ne $StartupMemory)) - { - Write-Verbose -Message ($localizedData.VMPropertyShouldBe -f 'MemoryStartup', $StartupMemory, $vmObj.MemoryStartup) - $changeProperty["MemoryStartup"]=$StartupMemory - } - elseif($MinimumMemory -and ($vmObj.MemoryStartup -lt $MinimumMemory)) - { - Write-Verbose -Message ($localizedData.AdjustingLessThanMemoryWarning -f 'StartupMemory', $vmObj.MemoryStartup, 'MinimumMemory', $MinimumMemory) - $changeProperty["MemoryStartup"]=$MinimumMemory - } - elseif($MaximumMemory -and ($vmObj.MemoryStartup -gt $MaximumMemory)) - { - Write-Verbose -Message ($localizedData.AdjustingGreaterThanMemoryWarning -f 'StartupMemory', $vmObj.MemoryStartup, 'MaximumMemory', $MaximumMemory) - $changeProperty["MemoryStartup"]=$MaximumMemory - } - - # If the VM does not have the right minimum or maximum memory, stop the VM, set the right memory, start the VM - if($MinimumMemory -or $MaximumMemory) - { - $changeProperty["DynamicMemory"]=$true - - if($MinimumMemory -and ($vmObj.Memoryminimum -ne $MinimumMemory)) - { - Write-Verbose -Message ($localizedData.VMPropertyShouldBe -f 'MinimumMemory', $MinimumMemory, $vmObj.MemoryMinimum) - $changeProperty["MemoryMinimum"]=$MinimumMemory - } - if($MaximumMemory -and ($vmObj.Memorymaximum -ne $MaximumMemory)) - { - Write-Verbose -Message ($localizedData.VMPropertyShouldBe -f 'MaximumMemory', $MaximumMemory, $vmObj.MemoryMaximum) - $changeProperty["MemoryMaximum"]=$MaximumMemory - } - } - - # If the VM does not have the right processor count, stop the VM, set the right memory, start the VM - if($ProcessorCount -and ($vmObj.ProcessorCount -ne $ProcessorCount)) - { - Write-Verbose -Message ($localizedData.VMPropertyShouldBe -f 'ProcessorCount', $ProcessorCount, $vmObj.ProcessorCount) - $changeProperty["ProcessorCount"]=$ProcessorCount - } - - # Stop the VM, set the right properties, start the VM only if there are properties to change - if ($changeProperty.Count -gt 0) - { - Set-VMProperty -Name $Name -VMCommand "Set-VM" -ChangeProperty $changeProperty -WaitForIP $WaitForIP -RestartIfNeeded $RestartIfNeeded - Write-Verbose -Message ($localizedData.VMPropertiesUpdated -f $Name) - } - - ## Set VM network switches. This can be done while the VM is running. - for ($i = 0; $i -lt $SwitchName.Count; $i++) - { - $switch = $SwitchName[$i] - $nic = $vmObj.NetworkAdapters[$i] - if ($nic) { - ## We cannot change the MAC address whilst the VM is running.. This is changed later - if ($nic.SwitchName -ne $switch) { - Write-Verbose -Message ($localizedData.VMPropertyShouldBe -f 'NIC', $switch, $nic.SwitchName) - $nic | Connect-VMNetworkAdapter -SwitchName $switch - Write-Verbose -Message ($localizedData.VMPropertySet -f 'NIC', $switch) - } - } - else { - Write-Verbose -Message ($localizedData.VMPropertyShouldBe -f 'NIC', $switch, '') - if ($MACAddress -and (-not [System.String]::IsNullOrEmpty($MACAddress[$i]))) - { - Add-VMNetworkAdapter -VMName $Name -SwitchName $switch -StaticMacAddress $MACAddress[$i] - Write-Verbose -Message ($localizedData.VMPropertySet -f 'NIC', $switch) - } - else - { - Add-VMNetworkAdapter -VMName $Name -SwitchName $switch - Write-Verbose -Message ($localizedData.VMPropertySet -f 'NIC', $switch) - } - ## Refresh the NICs after we've added one - $vmObj = Get-VM -Name $Name -ErrorAction SilentlyContinue - } - } - - # If the VM does not have the right MACAddress, stop the VM, set the right MACAddress, start the VM - for ($i = 0; $i -lt $MACAddress.Count; $i++) - { - $address = $MACAddress[$i] - $nic = $vmObj.NetworkAdapters[$i] - if ($nic.MacAddress -ne $address) - { - Write-Verbose -Message ($localizedData.VMPropertyShouldBe -f 'MACAddress', $address, $nic.MacAddress) - Set-VMMACAddress -Name $Name -NICIndex $i -MACAddress $address -WaitForIP $WaitForIP -RestartIfNeeded $RestartIfNeeded - } - } - - if ($Generation -eq 2) - { - # Retrive the current secure boot state - $vmSecureBoot = Test-VMSecureBoot -Name $Name - if ($SecureBoot -ne $vmSecureBoot) - { - Write-Verbose -Message ($localizedData.VMPropertyShouldBe -f 'SecureBoot', $SecureBoot, $vmSecureBoot) - - if (-not $SecureBoot) - { - $enableSecureBoot = 'On' - } - else - { - $enableSecureBoot = 'Off' - } - # Cannot change the secure boot state whilst the VM is powered on. - $setVMPropertyParams = @{ - VMName = $Name - VMCommand = 'Set-VMFirmware' - ChangeProperty = @{ EnableSecureBoot = $enableSecureBoot } - RestartIfNeeded = $RestartIfNeeded - } - Set-VMProperty @setVMPropertyParams - Write-Verbose -Message ($localizedData.VMPropertySet -f 'SecureBoot', $SecureBoot) - } - } - - if($Notes -ne $null) - { - # If the VM notes do not match the desire notes, update them. This can be done while the VM is running. - if($vmObj.Notes -ne $Notes) - { - Set-Vm -Name $Name -Notes $Notes - } - } - - # If the VM doesn't have Guest Service Interface correctly configured, update it. - $guestServiceId = 'Microsoft:{0}\6C09BB55-D683-4DA0-8931-C9BF705F6480' -f $vmObj.Id - - $guestService = $vmObj | Get-VMIntegrationService | Where-Object -FilterScript {$_.Id -eq $guestServiceId} - if ($guestService.Enabled -eq $false -and $EnableGuestService) - { - Write-Verbose -Message ($localizedData.VMPropertyShouldBe -f 'EnableGuestService', $EnableGuestService, $guestService.Enabled) - $guestService | Enable-VMIntegrationService - Write-Verbose -Message ($localizedData.VMPropertySet -f 'EnableGuestService', $EnableGuestService) - } - elseif ($guestService.Enabled -and -not $EnableGuestService) - { - Write-Verbose -Message ($localizedData.VMPropertyShouldBe -f 'EnableGuestService', $EnableGuestService, $guestService.Enabled) - $guestService | Disable-VMIntegrationService - Write-Verbose -Message ($localizedData.VMPropertySet -f 'EnableGuestService', $EnableGuestService) - } - } - } - - # VM is not present, create one - else - { - Write-Verbose -Message ($localizedData.VMDoesNotExist -f $Name) - if($Ensure -eq "Present") - { - Write-Verbose -Message ($localizedData.CreatingVM -f $Name) - - $parameters = @{} - $parameters["Name"] = $Name - $parameters["VHDPath"] = $VhdPath - $parameters["Generation"] = $Generation - - # Optional parameters - if($SwitchName) - { - $parameters["SwitchName"]=$SwitchName[0] - } - if($Path){$parameters["Path"]=$Path} - $defaultStartupMemory = 512MB - if($StartupMemory){$parameters["MemoryStartupBytes"]=$StartupMemory} - elseif($MinimumMemory -and $defaultStartupMemory -lt $MinimumMemory){$parameters["MemoryStartupBytes"]=$MinimumMemory} - elseif($MaximumMemory -and $defaultStartupMemory -gt $MaximumMemory){$parameters["MemoryStartupBytes"]=$MaximumMemory} - $null = New-VM @parameters - - $parameters = @{} - $parameters["Name"] = $Name - if($MinimumMemory -or $MaximumMemory) - { - $parameters["DynamicMemory"]=$true - if($MinimumMemory){$parameters["MemoryMinimumBytes"]=$MinimumMemory} - if($MaximumMemory){$parameters["MemoryMaximumBytes"]=$MaximumMemory} - } - - if($Notes) - { - $parameters["Notes"] = $Notes - } - - if($ProcessorCount) - { - $parameters["ProcessorCount"]=$ProcessorCount - } - - $null = Set-VM @parameters - - ## There's always a NIC added with New-VM - if($MACAddress) - { - Set-VMNetworkAdapter -VMName $Name -StaticMacAddress $MACAddress[0] - } - - ## Add additional NICs - for ($i = 1; $i -lt $SwitchName.Count; $i++) - { - $addVMNetworkAdapterParams = @{ - VMName = $Name; - SwitchName = $SwitchName[$i] - } - if ($MACAddress -and (-not [System.String]::IsNullOrEmpty($MACAddress[$i]))) - { - $addVMNetworkAdapterParams['StaticMacAddress'] = $MACAddress[$i] - } - Add-VMNetworkAdapter @addVMNetworkAdapterParams - Write-Verbose -Message ($localizedData.VMPropertySet -f 'NIC', $SwitchName[$i]) - } - - if ($Generation -eq 2) { - # Secure boot is only applicable to Generation 2 VMs and it defaults to on. - # Therefore, we only need to explicitly set it to off if specified. - if ($SecureBoot -eq $false) - { - Set-VMFirmware -VMName $Name -EnableSecureBoot Off - } - } - - if ($EnableGuestService) - { - $guestServiceId = 'Microsoft:{0}\6C09BB55-D683-4DA0-8931-C9BF705F6480' -f (Get-VM -Name $Name).Id - Get-VMIntegrationService -VMName $Name | Where-Object -FilterScript {$_.Id -eq $guestServiceId} | Enable-VMIntegrationService - } - - Write-Verbose -Message ($localizedData.VMCreated -f $Name) - - if ($State) - { - Set-VMState -Name $Name -State $State -WaitForIP $WaitForIP - Write-Verbose -Message ($localizedData.VMPropertySet -f 'State', $State) - } - - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - # Name of the VM - [Parameter(Mandatory = $true)] - [String] - $Name, - - # VHD associated with the VM - [Parameter(Mandatory = $true)] - [String] - $VhdPath, - - # Virtual switch associated with the VM - [Parameter()] - [String[]] - $SwitchName, - - # State of the VM - [Parameter()] - [ValidateSet('Running','Paused','Off')] - [String] - $State, - - # Folder where the VM data will be stored - [Parameter()] - [String] - $Path, - - # Virtual machine generation - [Parameter()] - [ValidateRange(1,2)] - [UInt32] - $Generation = 1, - - # Startup RAM for the VM - [Parameter()] - [ValidateRange(32MB,65536MB)] - [UInt64] - $StartupMemory, - - # Minimum RAM for the VM. This enables dynamic memory - [Parameter()] - [ValidateRange(32MB,65536MB)] - [UInt64] - $MinimumMemory, - - # Maximum RAM for the VM. This enables dynamic memory - [Parameter()] - [ValidateRange(32MB,1048576MB)] - [UInt64] - $MaximumMemory, - - # MAC address of the VM - [Parameter()] - [String[]] - $MACAddress, - - # Processor count for the VM - [Parameter()] - [UInt32] - $ProcessorCount, - - # Waits for VM to get valid IP address - [Parameter()] - [Boolean] - $WaitForIP, - - # If specified, shutdowns and restarts the VM as needed for property changes - [Parameter()] - [Boolean] - $RestartIfNeeded, - - # Should the VM be created or deleted - [Parameter()] - [ValidateSet('Present','Absent')] - [String] - $Ensure = 'Present', - - [Parameter()] - [System.String] - $Notes, - - # Enable secure boot for Generation 2 VMs - [Parameter()] - [Boolean] - $SecureBoot = $true, - - [Parameter()] - [Boolean] - $EnableGuestService = $false - ) - - #region input validation - - # Check if Hyper-V module is present for Hyper-V cmdlets - if(!(Get-Module -ListAvailable -Name Hyper-V)) - { - Throw ($localizedData.RoleMissingError -f 'Hyper-V') - } - - # Check if 1 or 0 VM with name = $name exist - if((Get-VM -Name $Name -ErrorAction SilentlyContinue).count -gt 1) - { - Throw ($localizedData.MoreThanOneVMExistsError -f $Name) - } - - # Check if $VhdPath exist - if(!(Test-Path $VhdPath)) - { - Throw ($localizedData.VhdPathDoesNotExistError -f $VhdPath) - } - - # Check if Minimum memory is less than StartUpmemory - if($StartupMemory -and $MinimumMemory -and ($MinimumMemory -gt $StartupMemory)) - { - Throw ($localizedData.MinMemGreaterThanStartupMemError -f $MinimumMemory, $StartupMemory) - } - - # Check if Minimum memory is greater than Maximummemory - if($MaximumMemory -and $MinimumMemory -and ($MinimumMemory -gt $MaximumMemory)) - { - Throw ($localizedData.MinMemGreaterThanMaxMemError -f $MinimumMemory, $MaximumMemory) - } - - # Check if Startup memory is greater than Maximummemory - if($MaximumMemory -and $StartupMemory -and ($StartupMemory -gt $MaximumMemory)) - { - Throw ($localizedData.StartUpMemGreaterThanMaxMemError -f $StartupMemory, $MaximumMemory) - } - - <# VM Generation has no direct relation to the virtual hard disk format and cannot be changed - after the virtual machine has been created. Generation 2 VMs do not support .VHD files. #> - if(($Generation -eq 2) -and ($VhdPath.Split('.')[-1] -eq 'vhd')) - { - Throw ($localizedData.VhdUnsupportedOnGen2VMError) - } - - # Check if $Path exist - if($Path -and !(Test-Path -Path $Path)) - { - Throw ($localizedData.PathDoesNotExistError -f $Path) - } - - #endregion - - try - { - $vmObj = Get-VM -Name $Name -ErrorAction Stop - if($Ensure -eq "Present") - { - $vhdChain = @(Get-VhdHierarchy -VhdPath ($vmObj.HardDrives[0].Path)) - if($vhdChain -notcontains $VhdPath) - { - Write-Verbose -Message ($localizedData.VMPropertyShouldBe -f 'VhdPath', $VhdPath, ($vhdChain -join ',')) - return $false - } - if($state -and ($vmObj.State -ne $State)){return $false} - if($StartupMemory -and ($vmObj.MemoryStartup -ne $StartupMemory)){return $false} - if($vmObj.HardDrives.Path -notcontains $VhdPath){return $false} - for ($i = 0; $i -lt $SwitchName.Count; $i++) - { - if ($vmObj.NetworkAdapters[$i].SwitchName -ne $SwitchName[$i]) - { - Write-Verbose -Message ($localizedData.VMPropertyShouldBe -f 'SwitchName', $SwitchName[$i], $vmObj.NetworkAdapters[$i].SwitchName) - return $false - } - } - if($state -and ($vmObj.State -ne $State)){return $false} - if($StartupMemory -and ($vmObj.MemoryStartup -ne $StartupMemory)){return $false} - for ($i = 0; $i -lt $MACAddress.Count; $i++) - { - if ($vmObj.NetworkAdapters[$i].MACAddress -ne $MACAddress[$i]) - { - Write-Verbose -Message ($localizedData.VMPropertyShouldBe -f 'MACAddress', $MACAddress[$i], $vmObj.NetworkAdapters[$i].MACAddress) - return $false - } - } - - ## $Generation always exists, only check if parameter has been explicitly specified - if($PSBoundParameters.ContainsKey('Generation') -and ($Generation -ne $vmObj.Generation)){return $false} - - if($ProcessorCount -and ($vmObj.ProcessorCount -ne $ProcessorCount)){return $false} - if($MaximumMemory -and ($vmObj.MemoryMaximum -ne $MaximumMemory)){return $false} - if($MinimumMemory -and ($vmObj.MemoryMinimum -ne $MinimumMemory)){return $false} - - if($vmObj.Generation -eq 2) { - $vmSecureBoot = Test-VMSecureBoot -Name $Name - if ($SecureBoot -ne $vmSecureBoot) - { - Write-Verbose -Message ($localizedData.VMPropertyShouldBe -f 'SecureBoot', $SecureBoot, $vmSecureBoot) - return $false - } - } - $guestServiceId = 'Microsoft:{0}\6C09BB55-D683-4DA0-8931-C9BF705F6480' -f $vmObj.Id - $guestService = $vmObj | Get-VMIntegrationService | Where-Object -FilterScript {$_.Id -eq $guestServiceId} - if ($guestService.Enabled -ne $EnableGuestService) - { - Write-Verbose -Message ($localizedData.VMPropertyShouldBe -f 'EnableGuestService', $EnableGuestService, $guestService.Enabled) - return $false - } - return $true - } - else - { - return $false - } - } - catch [System.Management.Automation.ActionPreferenceStopException] - { - ($Ensure -eq 'Absent') - } -} - -#region Helper function - -<# Returns VM VHDs, including snapshots and differencing disks #> -function Get-VhdHierarchy -{ - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $VhdPath - ) - - $vmVhdPath = Get-VHD -Path $VhdPath - Write-Output -InputObject $vmVhdPath.Path - while(-not [System.String]::IsNullOrEmpty($vmVhdPath.ParentPath)) - { - $vmVhdPath.ParentPath - $vmVhdPath = (Get-VHD -Path $vmVhdPath.ParentPath) - } -} - -# The 'Set-VMProperty' method cannot be used as it cannot deal with piped -# command in it's current implementation -function Set-VMMACAddress -{ - param - ( - [Parameter(Mandatory = $true)] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [String] - $MACAddress, - - [Parameter(Mandatory = $true)] - [Int] - $NICIndex, - - [Parameter()] - [Boolean] - $WaitForIP, - - [Parameter()] - [Boolean] - $RestartIfNeeded - ) - $vmObj = Get-VM -Name $Name - $originalState = $vmObj.state - if($originalState -ne "Off" -and $RestartIfNeeded) - { - Set-VMState -Name $Name -State Off - $vmObj.NetworkAdapters[$NICIndex] | Set-VMNetworkAdapter -StaticMacAddress $MACAddress - - # Can not move a off VM to paused, but only to running state - if($originalState -eq "Running") - { - Set-VMState -Name $Name -State Running -WaitForIP $WaitForIP - } - - # Cannot make a paused VM to go back to Paused state after turning Off - if($originalState -eq "Paused") - { - Write-Warning -Message ($localizedData.VMStateWillBeOffWarning -f $Name) - } - } - elseif($originalState -eq "Off") - { - $vmObj.NetworkAdapters[$NICIndex] | Set-VMNetworkAdapter -StaticMacAddress $MACAddress - Write-Verbose -Message ($localizedData.VMPropertySet -f 'MACAddress', $MACAddress) - } - else - { - Write-Error -Message ($localizedData.CannotUpdatePropertiesOnlineError -f $Name, $vmObj.State) - } -} - -function Test-VMSecureBoot -{ - param - ( - [Parameter(Mandatory = $true)] - [string] - $Name - ) - $vm = Get-VM -Name $Name - return (Get-VMFirmware -VM $vm).SecureBoot -eq 'On' -} - -#endregion - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMHyperV/MSFT_xVMHyperV.schema.mof b/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMHyperV/MSFT_xVMHyperV.schema.mof deleted file mode 100644 index d76bd193..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMHyperV/MSFT_xVMHyperV.schema.mof +++ /dev/null @@ -1,29 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("xVMHyperV")] -class MSFT_xVMHyperV : OMI_BaseResource -{ - [Key, Description("Name of the VM")] String Name; - [Required, Description("VHD associated with the VM")] String VhdPath; - [Write, Description("Virtual switch(es) associated with the VM")] String SwitchName[]; - [Write, Description("State of the VM."), ValueMap{"Running","Paused","Off"}, Values{"Running","Paused","Off"}] String State; - [Write, Description("Folder where the VM data will be stored")] String Path; - [Write, Description("Virtual machine generation")] Uint32 Generation; - [Write, Description("Startup RAM for the VM.")] Uint64 StartupMemory; - [Write, Description("Minimum RAM for the VM. This enables dynamic memory.")] Uint64 MinimumMemory; - [Write, Description("Maximum RAM for the VM. This enable dynamic memory.")] Uint64 MaximumMemory; - [Write, Description("MAC address(es) of the VM NICs.")] String MACAddress[]; - [Write, Description("Processor count for the VM")] Uint32 ProcessorCount; - [Write, Description("Waits for VM to get valid IP address.")] Boolean WaitForIP; - [Write, Description("If specified, shutdowns and restarts the VM as needed for property changes")] Boolean RestartIfNeeded; - [Write, Description("Should the VM be created or deleted"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("Notes about the VM.")] String Notes; - [Write, Description("Enable secure boot for Generation 2 VMs.")] Boolean SecureBoot; - [Write, Description("Enable Guest Service Interface for the VM.")] Boolean EnableGuestService; - [Read, Description("VM unique ID")] String ID; - [Read, Description("Status of the VM")] String Status; - [Read, Description("CPU Usage of the VM")] Uint32 CPUUsage; - [Read, Description("Memory assigned to the VM")] Uint64 MemoryAssigned; - [Read, Description("Uptime of the VM")] String Uptime; - [Read, Description("Creation time of the VM")] DateTime CreationTime; - [Read, Description("Does VM has dynamic memory enabled")] Boolean HasDynamicMemory; - [Read, Description("Network adapters' IP addresses of the VM")] String NetworkAdapters[]; -}; diff --git a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMNetworkAdapter/MSFT_xVMNetworkAdapter.psm1 b/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMNetworkAdapter/MSFT_xVMNetworkAdapter.psm1 deleted file mode 100644 index e1b67129..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMNetworkAdapter/MSFT_xVMNetworkAdapter.psm1 +++ /dev/null @@ -1,373 +0,0 @@ -#region localizeddata -if (Test-Path "${PSScriptRoot}\${PSUICulture}") -{ - Import-LocalizedData -BindingVariable LocalizedData -filename MSFT_xVMNetworkAdapter.psd1 ` - -BaseDirectory "${PSScriptRoot}\${PSUICulture}" -} -else -{ - #fallback to en-US - Import-LocalizedData -BindingVariable LocalizedData -filename MSFT_xVMNetworkAdapter.psd1 ` - -BaseDirectory "${PSScriptRoot}\en-US" -} -#endregion - -<# -.SYNOPSIS - Gets MSFT_xVMNetworkAdapter resource current state. - -.PARAMETER Id - Specifies an unique identifier for the network adapter. - -.PARAMETER Name - Specifies a name for the network adapter that needs to be connected to a VM or management OS. - -.PARAMETER SwitchName - Specifies the name of the switch to which the new VM network adapter will be connected. - -.PARAMETER VMName - Specifies the name of the VM to which the network adapter will be connected. - Specify VMName as ManagementOS if you wish to connect the adapter to host OS. -#> -Function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - Param ( - [Parameter(Mandatory)] - [String] $Id, - - [Parameter(Mandatory)] - [String] $Name, - - [Parameter(Mandatory)] - [String] $SwitchName, - - [Parameter(Mandatory)] - [String] $VMName - ) - - $configuration = @{ - Id = $Id - Name = $Name - SwitchName = $SwitchName - VMName = $VMName - } - - $arguments = @{ - Name = $Name - } - - if ($VMName -ne 'ManagementOS') - { - $arguments.Add('VMName',$VMName) - } - else - { - $arguments.Add('ManagementOS', $true) - $arguments.Add('SwitchName', $SwitchName) - } - - Write-Verbose -Message $localizedData.GetVMNetAdapter - $netAdapter = Get-VMNetworkAdapter @arguments -ErrorAction SilentlyContinue - - if ($netAdapter) - { - Write-Verbose -Message $localizedData.FoundVMNetAdapter - if ($VMName -eq 'ManagementOS') - { - $configuration.Add('MacAddress', $netAdapter.MacAddress) - $configuration.Add('DynamicMacAddress', $false) - } - elseif ($netAdapter.VMName) - { - $configuration.Add('MacAddress', $netAdapter.MacAddress) - $configuration.Add('DynamicMacAddress', $netAdapter.DynamicMacAddressEnabled) - } - $configuration.Add('Ensure','Present') - } - else - { - Write-Verbose -Message $localizedData.NoVMNetAdapterFound - $configuration.Add('Ensure','Absent') - } - - return $configuration -} - -<# -.SYNOPSIS - Sets MSFT_xVMNetworkAdapter resource state. - -.PARAMETER Id - Specifies an unique identifier for the network adapter. - -.PARAMETER Name - Specifies a name for the network adapter that needs to be connected to a VM or management OS. - -.PARAMETER SwitchName - Specifies the name of the switch to which the new VM network adapter will be connected. - -.PARAMETER VMName - Specifies the name of the VM to which the network adapter will be connected. - Specify VMName as ManagementOS if you wish to connect the adapter to host OS. - -.PARAMETER MacAddress - Specifies the MAC address for the network adapter. This is not applicable if VMName - is set to ManagementOS. Use this parameter to specify a static MAC address. - -.PARAMETER Ensure - Specifies if the network adapter should be Present or Absent. -#> -Function Set-TargetResource -{ - [CmdletBinding()] - Param ( - [Parameter(Mandatory)] - [String] $Id, - - [Parameter(Mandatory)] - [String] $Name, - - [Parameter(Mandatory)] - [String] $SwitchName, - - [Parameter(Mandatory)] - [String] $VMName, - - [Parameter()] - [String] $MacAddress, - - [Parameter()] - [ValidateSet('Present','Absent')] - [String] $Ensure='Present' - ) - - $arguments = @{ - Name = $Name - } - - if ($VMName -ne 'ManagementOS') - { - $arguments.Add('VMName',$VMName) - } - else - { - $arguments.Add('ManagementOS', $true) - $arguments.Add('SwitchName', $SwitchName) - } - - Write-Verbose -Message $localizedData.GetVMNetAdapter - $netAdapterExists = Get-VMNetworkAdapter @arguments -ErrorAction SilentlyContinue - - if ($Ensure -eq 'Present') - { - if ($netAdapterExists) - { - Write-Verbose -Message $localizedData.FoundVMNetAdapter - if (($VMName -ne 'ManagementOS')) - { - if ($MacAddress) - { - if ($netAdapterExists.DynamicMacAddressEnabled) - { - Write-Verbose -Message $localizedData.EnableStaticMacAddress - $updateMacAddress = $true - } - elseif ($MacAddress -ne $netAdapterExists.StaicMacAddress) - { - Write-Verbose -Message $localizedData.EnableStaticMacAddress - $updateMacAddress = $true - } - } - else - { - if (-not $netAdapterExists.DynamicMacAddressEnabled) - { - Write-Verbose -Message $localizedData.EnableDynamicMacAddress - $updateMacAddress = $true - } - } - - if ($netAdapterExists.SwitchName -ne $SwitchName) - { - Write-Verbose -Message $localizedData.PerformSwitchConnect - Connect-VMNetworkAdapter -VMNetworkAdapter $netAdapterExists -SwitchName $SwitchName -ErrorAction Stop -Verbose - } - - if (($updateMacAddress)) - { - Write-Verbose -Message $localizedData.PerformVMNetModify - - $setArguments = @{ } - $setArguments.Add('VMNetworkAdapter',$netAdapterExists) - if ($MacAddress) - { - $setArguments.Add('StaticMacAddress',$MacAddress) - } - else - { - $setArguments.Add('DynamicMacAddress', $true) - } - Set-VMNetworkAdapter @setArguments -ErrorAction Stop - } - } - } - else - { - if ($VMName -ne 'ManagementOS') - { - if (-not $MacAddress) - { - $arguments.Add('DynamicMacAddress',$true) - } - else - { - $arguments.Add('StaticMacAddress',$MacAddress) - } - $arguments.Add('SwitchName',$SwitchName) - } - Write-Verbose -Message $localizedData.AddVMNetAdapter - Add-VMNetworkAdapter @arguments -ErrorAction Stop - } - } - else - { - Write-Verbose -Message $localizedData.RemoveVMNetAdapter - Remove-VMNetworkAdapter @arguments -ErrorAction Stop - } -} - -<# -.SYNOPSIS - Tests if MSFT_xVMNetworkAdapter resource state is indeed desired state or not. - -.PARAMETER Id - Specifies an unique identifier for the network adapter. - -.PARAMETER Name - Specifies a name for the network adapter that needs to be connected to a VM or management OS. - -.PARAMETER SwitchName - Specifies the name of the switch to which the new VM network adapter will be connected. - -.PARAMETER VMName - Specifies the name of the VM to which the network adapter will be connected. - Specify VMName as ManagementOS if you wish to connect the adapter to host OS. - -.PARAMETER MacAddress - Specifies the MAC address for the network adapter. This is not applicable if VMName - is set to ManagementOS. Use this parameter to specify a static MAC address. - -.PARAMETER Ensure - Specifies if the network adapter should be Present or Absent. -#> -Function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - Param ( - [Parameter(Mandatory)] - [String] $Id, - - [Parameter(Mandatory)] - [String] $Name, - - [Parameter(Mandatory)] - [String] $SwitchName, - - [Parameter(Mandatory)] - [String] $VMName, - - [Parameter()] - [String] $MacAddress, - - [Parameter()] - [ValidateSet('Present','Absent')] - [String] $Ensure='Present' - ) - - $arguments = @{ - Name = $Name - } - - if ($VMName -ne 'ManagementOS') - { - $arguments.Add('VMName',$VMName) - } - else - { - $arguments.Add('ManagementOS', $true) - $arguments.Add('SwitchName', $SwitchName) - } - - Write-Verbose -Message $localizedData.GetVMNetAdapter - $netAdapterExists = Get-VMNetworkAdapter @arguments -ErrorAction SilentlyContinue - - if ($Ensure -eq 'Present') - { - if ($netAdapterExists) - { - if ($VMName -ne 'ManagementOS') - { - if ($MacAddress) - { - if ($netAdapterExists.DynamicMacAddressEnabled) - { - Write-Verbose -Message $localizedData.EnableStaticMacAddress - return $false - } - elseif ($netAdapterExists.MacAddress -ne $MacAddress) - { - Write-Verbose -Message $localizedData.StaticAddressDoesNotMatch - return $false - } - } - else - { - if (-not $netAdapterExists.DynamicMacAddressEnabled) - { - Write-Verbose -Message $localizedData.EnableDynamicMacAddress - return $false - } - } - - if ($netAdapterExists.SwitchName -ne $SwitchName) - { - Write-Verbose -Message $localizedData.SwitchIsDifferent - return $false - } - else - { - Write-Verbose -Message $localizedData.VMNetAdapterExistsNoActionNeeded - return $true - } - } - else - { - Write-Verbose -Message $localizedData.VMNetAdapterExistsNoActionNeeded - return $true - } - } - else - { - Write-Verbose -Message $localizedData.VMNetAdapterDoesNotExistShouldAdd - return $false - } - } - else - { - if ($netAdapterExists) - { - Write-Verbose -Message $localizedData.VMNetAdapterExistsShouldRemove - return $false - } - else - { - Write-Verbose -Message $localizedData.VMNetAdapterDoesNotExistNoActionNeeded - return $true - } - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMNetworkAdapter/MSFT_xVMNetworkAdapter.schema.mof b/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMNetworkAdapter/MSFT_xVMNetworkAdapter.schema.mof deleted file mode 100644 index 2d7ed1d3..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMNetworkAdapter/MSFT_xVMNetworkAdapter.schema.mof +++ /dev/null @@ -1,12 +0,0 @@ - -[ClassVersion("2.0.0.0"), FriendlyName("xVMNetworkAdapter")] -class MSFT_xVMNetworkAdapter : OMI_BaseResource -{ - [Key] String Id; - [Required] String Name; - [Required] String SwitchName; - [Required] String VMName; - [Write] String MacAddress; - [Write, ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Read] Boolean DynamicMacAddress; -}; diff --git a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMNetworkAdapter/en-US/MSFT_xVMNetworkAdapter.psd1 b/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMNetworkAdapter/en-US/MSFT_xVMNetworkAdapter.psd1 deleted file mode 100644 index c60f3ff9..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMNetworkAdapter/en-US/MSFT_xVMNetworkAdapter.psd1 +++ /dev/null @@ -1,23 +0,0 @@ -ConvertFrom-StringData @' - VMNameAndManagementTogether=VMName cannot be provided when ManagementOS is set to True. - MustProvideVMName=Must provide VMName parameter when ManagementOS is set to False. - GetVMNetAdapter=Getting VM Network Adapter information. - FoundVMNetAdapter=Found VM Network Adapter. - NoVMNetAdapterFound=No VM Network Adapter found. - StaticMacAddressChosen=Static MAC Address has been specified. - StaticAddressDoesNotMatch=Staic MAC address on the VM Network Adapter does not match. - ModifyVMNetAdapter=VM Network Adapter exists with different configuration. This will be modified. - EnableDynamicMacAddress=VM Network Adapter exists but without Dynamic MAC address setting. - EnableStaticMacAddress=VM Network Adapter exists but without static MAC address setting. - PerformVMNetModify=Performing VM Network Adapter configuration changes. - CannotChangeHostAdapterMacAddress=VM Network adapter in configuration is a host adapter. Its configuration cannot be modified. - AddVMNetAdapter=Adding VM Network Adapter. - RemoveVMNetAdapter=Removing VM Network Adapter. - VMNetAdapterExistsNoActionNeeded=VM Network Adapter exists with requested configuration. No action needed. - VMNetAdapterDoesNotExistShouldAdd=VM Network Adapter does not exist. It will be added. - VMNetAdapterExistsShouldRemove=VM Network Adapter Exists. It will be removed. - VMNetAdapterDoesNotExistNoActionNeeded=VM Network adapter does not exist. No action needed. - StaticMacExists=StaicMacAddress configuration exists as desired. - SwitchIsDifferent=Net Adapter is not connected to the requested switch. - PerformSwitchConnect=Connecting VM Net adapter to the right switch. -'@ diff --git a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMProcessor/MSFT_xVMProcessor.psm1 b/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMProcessor/MSFT_xVMProcessor.psm1 deleted file mode 100644 index 79cd09cc..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMProcessor/MSFT_xVMProcessor.psm1 +++ /dev/null @@ -1,443 +0,0 @@ -#region localizeddata -if (Test-Path "${PSScriptRoot}\${PSUICulture}") -{ - Import-LocalizedData -BindingVariable localizedData -Filename MSFT_xVMProcessor.psd1 ` - -BaseDirectory "${PSScriptRoot}\${PSUICulture}" -} -else -{ - # fallback to en-US - Import-LocalizedData -BindingVariable localizedData -Filename MSFT_xVMProcessor.psd1 ` - -BaseDirectory "${PSScriptRoot}\en-US" -} -#endregion - -# Import the common HyperV functions -Import-Module -Name ( Join-Path ` - -Path (Split-Path -Path $PSScriptRoot -Parent) ` - -ChildPath '\HyperVCommon\HyperVCommon.psm1' ) - -<# -.SYNOPSIS - Gets MSFT_xVMProcessor resource current state. - -.PARAMETER VMName - Specifies the name of the virtual machine on which the processor is to be configured. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $VMName - ) - - Assert-Module -Name 'Hyper-V' - Write-Verbose -Message ($localizedData.QueryingVMProcessor -f $VMName) - $vmProcessor = Get-VMProcessor -VMName $VMName -ErrorAction Stop - $configuration = @{ - VMName = $VMName - EnableHostResourceProtection = $vmProcessor.EnableHostResourceProtection - ExposeVirtualizationExtensions = $vmProcessor.ExposeVirtualizationExtensions - HwThreadCountPerCore = $vmProcessor.HwThreadCountPerCore - Maximum = $vmProcessor.Maximum - MaximumCountPerNumaNode = $vmProcessor.MaximumCountPerNumaNode - MaximumCountPerNumaSocket = $vmProcessor.MaximumCountPerNumaSocket - RelativeWeight = $vmProcessor.RelativeWeight - Reserve = $vmProcessor.Reserve - ResourcePoolName = $vmProcessor.ResourcePoolName - CompatibilityForMigrationEnabled = $vmProcessor.CompatibilityForMigrationEnabled - CompatibilityForOlderOperatingSystemsEnabled = $vmProcessor.CompatibilityForOlderOperatingSystemsEnabled - RestartIfNeeded = $false - } - return $configuration -} - -<# -.SYNOPSIS - Tests if MSFT_xVMProcessor resource state is in the desired state or not. - -.PARAMETER VMName - Specifies the name of the virtual machine on which the processor is to be configured. - -.PARAMETER EnableHostResourceProtection - Specifies whether to enable host resource protection. - NOTE: Only supported on Windows 10 and Server 2016. - -.PARAMETER ExposeVirtualizationExtensions - Specifies whether nested virtualization is enabled. - NOTE: Only supported on Windows 10 and Server 2016. - -.PARAMETER HwThreadCountPerCore - Specifies the maximum thread core per processor core. - NOTE: Only supported on Windows 10 and Server 2016. - -.PARAMETER Maximum - Specifies the maximum percentage of resources available to the virtual machine - processor to be configured. Allowed values range from 0 to 100. - -.PARAMETER MaximumCountPerNumaNode - Specifies the maximum number of processors per NUMA node to be configured for - the virtual machine. - -.PARAMETER MaximumCountPerNumaSocket - Specifies the maximum number of sockets per NUMA node to be configured for - the virtual machine. - -.PARAMETER RelativeWeight - Specifies the priority for allocating the physical computer's processing - power to this virtual machine relative to others. Allowed values range - from 1 to 10000. - -.PARAMETER Reserve - Specifies the percentage of processor resources to be reserved for this - virtual machine. Allowed values range from 0 to 100. - -.PARAMETER ResourcePoolName - Specifies the name of the processor resource pool to be used. - -.PARAMETER CompatibilityForMigrationEnabled - Specifies whether the virtual processors features are to be limited - for compatibility when migrating the virtual machine to another host. - -.PARAMETER CompatibilityForOlderOperatingSystemsEnabled - Specifies whether the virtual processor’s features are to be limited - for compatibility with older operating systems. - -.PARAMETER RestartIfNeeded - If specified, shutdowns and restarts the VM if needed for property - changes. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $VMName, - - [Parameter()] - [System.Boolean] - $EnableHostResourceProtection, - - [Parameter()] - [System.Boolean] - $ExposeVirtualizationExtensions, - - [Parameter()] - [System.UInt64] - $HwThreadCountPerCore, - - [Parameter()] - [ValidateRange(0,100)] - [System.UInt64] - $Maximum, - - [Parameter()] - [System.UInt32] - $MaximumCountPerNumaNode, - - [Parameter()] - [System.UInt32] - $MaximumCountPerNumaSocket, - - [Parameter()] - [ValidateRange(0,10000)] - [System.UInt32] - $RelativeWeight, - - [Parameter()] - [ValidateRange(0,100)] - [System.UInt64] - $Reserve, - - [Parameter()] - [System.String] - $ResourcePoolName, - - [Parameter()] - [System.Boolean] - $CompatibilityForMigrationEnabled, - - [Parameter()] - [System.Boolean] - $CompatibilityForOlderOperatingSystemsEnabled, - - [Parameter()] - [System.Boolean] - $RestartIfNeeded - ) - - Assert-Module -Name 'Hyper-V' - Assert-TargetResourceParameter @PSBoundParameters - - $targetResource = Get-TargetResource -VMName $VMName - $excludedTestParameters = @('RestartIfNeeded') - $isTargetResourceCompliant = $true - - foreach ($parameter in $PSBoundParameters.GetEnumerator()) - { - if (($targetResource.ContainsKey($parameter.Key)) -and - ($parameter.Key -notin $excludedTestParameters) -and - ($parameter.Value -ne $targetResource[$parameter.Key])) - { - $isTargetResourceCompliant = $false - Write-Verbose -Message ($localizedData.PropertyMismatch -f $parameter.Key, - $parameter.Value, $targetResource[$parameter.Key]) - } - } - - if ($isTargetResourceCompliant) - { - Write-Verbose -Message ($localizedData.VMProcessorInDesiredState -f $VMName) - } - else - { - Write-Verbose -Message ($localizedData.VMProcessorNotInDesiredState -f $VMName) - } - - return $isTargetResourceCompliant -} #end function - -<# -.SYNOPSIS - Configures MSFT_xVMProcessor resource state. - -.PARAMETER VMName - Specifies the name of the virtual machine on which the processor is to be configured. - -.PARAMETER EnableHostResourceProtection - Specifies whether to enable host resource protection. - NOTE: Only supported on Windows 10 and Server 2016. - -.PARAMETER ExposeVirtualizationExtensions - Specifies whether nested virtualization is enabled. - NOTE: Only supported on Windows 10 and Server 2016. - -.PARAMETER HwThreadCountPerCore - Specifies the maximum thread core per processor core - NOTE: Only supported on Windows 10 and Server 2016. - -.PARAMETER Maximum - Specifies the maximum percentage of resources available to the virtual machine - processor to be configured. Allowed values range from 0 to 100. - -.PARAMETER MaximumCountPerNumaNode - Specifies the maximum number of processors per NUMA node to be configured for - the virtual machine. - -.PARAMETER MaximumCountPerNumaSocket - Specifies the maximum number of sockets per NUMA node to be configured for - the virtual machine. - -.PARAMETER RelativeWeight - Specifies the priority for allocating the physical computer's processing - power to this virtual machine relative to others. Allowed values range - from 1 to 10000. - -.PARAMETER Reserve - Specifies the percentage of processor resources to be reserved for this - virtual machine. Allowed values range from 0 to 100. - -.PARAMETER ResourcePoolName - Specifies the name of the processor resource pool to be used. - -.PARAMETER CompatibilityForMigrationEnabled - Specifies whether the virtual processors features are to be limited - for compatibility when migrating the virtual machine to another host. - -.PARAMETER CompatibilityForOlderOperatingSystemsEnabled - Specifies whether the virtual processor’s features are to be limited - for compatibility with older operating systems. - -.PARAMETER RestartIfNeeded - If specified, shutdowns and restarts the VM if needed for property - changes. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $VMName, - - [Parameter()] - [System.Boolean] - $EnableHostResourceProtection, - - [Parameter()] - [System.Boolean] - $ExposeVirtualizationExtensions, - - [Parameter()] - [System.UInt64] - $HwThreadCountPerCore, - - [Parameter()] - [ValidateRange(0,100)] - [System.UInt64] - $Maximum, - - [Parameter()] - [System.UInt32] - $MaximumCountPerNumaNode, - - [Parameter()] - [System.UInt32] - $MaximumCountPerNumaSocket, - - [Parameter()] - [ValidateRange(0,10000)] - [System.UInt32] - $RelativeWeight, - - [Parameter()] - [ValidateRange(0,100)] - [System.UInt64] - $Reserve, - - [Parameter()] - [System.String] - $ResourcePoolName, - - [Parameter()] - [System.Boolean] - $CompatibilityForMigrationEnabled, - - [Parameter()] - [System.Boolean] - $CompatibilityForOlderOperatingSystemsEnabled, - - [Parameter()] - [System.Boolean] - $RestartIfNeeded - ) - - Assert-Module -Name 'Hyper-V' - Assert-TargetResourceParameter @PSBoundParameters - - # Parameters requiring shutdown. - $restartRequiredParameterNames = @( - 'ExposeVirtualizationExtensions', - 'CompatibilityForMigrationEnabled', - 'CompatibilityForOlderOperatingSystemsEnabled', - 'HwThreadCountPerCore', - 'MaximumCountPerNumaNode', - 'MaximumCountPerNumaSocket', - 'ResourcePoolName' - ) - $isRestartRequired = $false - $vmObject = Get-VM -Name $VMName - - # Only check for restart required parameters if VM is not off - if ($vmObject.State -ne 'Off') - { - foreach ($parameterName in $restartRequiredParameterNames) - { - if ($PSBoundParameters.ContainsKey($parameterName)) - { - if (-not $RestartIfNeeded) - { - $errorMessage = $localized.CannotUpdateVmOnlineError -f $parameterName - New-InvalidOperationError -ErrorId InvalidState -ErrorMessage $errorMessage - } - else - { - $isRestartRequired = $true - } - } - } #end foreach parameter - } - - $null = $PSBoundParameters.Remove('RestartIfNeeded') - $null = $PSBoundParameters.Remove('VMName') - - if (-not $isRestartRequired) - { - # No parameter specified that requires a restart, so disable the restart flag - Write-Verbose -Message ($localizedData.UpdatingVMProperties -f $VMName) - Set-VMProcessor -VMName $VMName @PSBoundParameters - Write-Verbose -Message ($localizedData.VMPropertiesUpdated -f $VMName) - } - else - { - # Restart is required and that requires turning VM off - $setVMPropertyParameters = @{ - VMName = $VMName - VMCommand = 'Set-VMProcessor' - ChangeProperty = $PSBoundParameters - RestartIfNeeded = $true - Verbose = $Verbose - } - Set-VMProperty @setVMPropertyParameters - } -} #end function - -<# -.SYNOPSIS - Ensures OS supports the supplied parameters. - -.PARAMETER EnableHostResourceProtection - Specifies whether to enable host resource protection. - NOTE: Only supported on Windows 10, Server 2016 and Nano. - -.PARAMETER ExposeVirtualizationExtensions - Specifies whether nested virtualization is enabled. - NOTE: Only supported on Windows 10, Server 2016 and Nano. - -.PARAMETER HwThreadCountPerCore - Specifies the maximum thread core per processor core - NOTE: Only supported on Windows 10, Server 2016 and Nano. - -.PARAMETER RemainingArgument - Catch all to enable splatting of remaining parameters. -#> -function Assert-TargetResourceParameter -{ - [CmdletBinding()] - param - ( - [Parameter()] - [System.Boolean] - $EnableHostResourceProtection, - - [Parameter()] - [System.Boolean] - $ExposeVirtualizationExtensions, - - [Parameter()] - [System.UInt64] - $HwThreadCountPerCore, - - [Parameter(ValueFromRemainingArguments)] - [System.Object[]] - $RemainingArguments - ) - - # Get-CimInstance returns build number as a string - $win32OperatingSystem = Get-CimInstance -ClassName Win32_OperatingSystem -Verbose:$false - $osBuildNumber = $win32OperatingSystem.BuildNumber -as [System.Int64] - $build14393RequiredParameterNames = @( - 'EnableHostResourceProtection', - 'ExposeVirtualizationExtensions', - 'HwThreadCountPerCore' - ) - - foreach ($parameterName in $build14393RequiredParameterNames) - { - if (($PSBoundParameters.ContainsKey($parameterName)) -and ($osBuildNumber -lt 14393)) - { - $errorMessage = $localizedData.UnsupportedSystemError -f $parameterName, 14393 - New-InvalidArgumentError -ErrorId SystemUnsupported -ErrorMessage $errorMessage - } - } -} #end function - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMProcessor/MSFT_xVMProcessor.schema.mof b/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMProcessor/MSFT_xVMProcessor.schema.mof deleted file mode 100644 index 0b3c1746..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMProcessor/MSFT_xVMProcessor.schema.mof +++ /dev/null @@ -1,17 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xVMProcessor")] -class MSFT_xVMProcessor : OMI_BaseResource -{ - [Key, Description("Specifies the name of the virtual machine on which the processor is to be configured.")] String VMName; - [Write, Description("Specifies whether to enable host resource protection.")] Boolean EnableHostResourceProtection; - [Write, Description("Specifies whether nested virtualization is enabled.")] Boolean ExposeVirtualizationExtensions; - [Write, Description("Specifies the maximum thread core per processor core.")] Uint64 HwThreadCountPerCore; - [Write, Description("Specifies the maximum percentage of resources available to the virtual machine processor to be configured. Allowed values range from 0 to 100.")] Uint64 Maximum; - [Write, Description("Specifies the maximum number of processors per NUMA node to be configured for the virtual machine.")] Uint32 MaximumCountPerNumaNode; - [Write, Description("Specifies the maximum number of sockets per NUMA node to be configured for the virtual machine.")] Uint32 MaximumCountPerNumaSocket; - [Write, Description("Specifies the priority for allocating the physical computer's processing power to this virtual machine relative to others. Allowed values range from 1 to 10000.")] Uint32 RelativeWeight; - [Write, Description("Specifies the percentage of processor resources to be reserved for this virtual machine. Allowed values range from 0 to 100.")] Uint64 Reserve; - [Write, Description("Specifies the name of the processor resource pool to be used.")] String ResourcePoolName; - [Write, Description("Specifies whether the virtual processors features are to be limited for compatibility when migrating the virtual machine to another host.")] Boolean CompatibilityForMigrationEnabled; - [Write, Description("Specifies whether the virtual processor’s features are to be limited for compatibility with older operating systems.")] Boolean CompatibilityForOlderOperatingSystemsEnabled; - [Write, Description("If specified, shutdowns and restarts the VM if needed for property changes.")] Boolean RestartIfNeeded; -}; diff --git a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMProcessor/en-US/MSFT_xVMProcessor.psd1 b/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMProcessor/en-US/MSFT_xVMProcessor.psd1 deleted file mode 100644 index fa6eab6f..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMProcessor/en-US/MSFT_xVMProcessor.psd1 +++ /dev/null @@ -1,12 +0,0 @@ -ConvertFrom-StringData @' - QueryingVMProcessor = Querying VM '{0}' processor(s). - PropertyMismatch = Property '{0}' mismatch; expected value '{1}', but was '{2}'. - VMProcessorInDesiredState = VM '{0}' processor(s) in desired state. - VMProcessorNotInDesiredState = VM '{0}' processor(s) not in desired state. - UpdatingVMProperties = Updating VM '{0}' properties. - VMPropertiesUpdated = VM '{0}' properties have been updated. - - VMNotFoundError = VM '{0}' was not found. - UnsupportedSystemError = Parameter '{0}' is not supported on operating system builds earlier than '{1}'. - CannotUpdateVmOnlineError = Cannot change online property '{0}' unless 'RestartIfNeeded' is set to true. -'@ diff --git a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMSwitch/MSFT_xVMSwitch.psm1 b/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMSwitch/MSFT_xVMSwitch.psm1 deleted file mode 100644 index a9ee5839..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMSwitch/MSFT_xVMSwitch.psm1 +++ /dev/null @@ -1,566 +0,0 @@ -#region localizeddata -if (Test-Path "${PSScriptRoot}\${PSUICulture}") -{ - Import-LocalizedData ` - -BindingVariable LocalizedData ` - -Filename MSFT_xVMSwitch.strings.psd1 ` - -BaseDirectory "${PSScriptRoot}\${PSUICulture}" -} -else -{ - #fallback to en-US - Import-LocalizedData ` - -BindingVariable LocalizedData ` - -Filename MSFT_xVMSwitch.strings.psd1 ` - -BaseDirectory "${PSScriptRoot}\en-US" -} -#endregion - -# Import the common HyperV functions -Import-Module -Name ( Join-Path ` - -Path (Split-Path -Path $PSScriptRoot -Parent) ` - -ChildPath '\HyperVCommon\HyperVCommon.psm1' ) - -<# -.SYNOPSIS - Gets MSFT_xVMSwitch resource current state. - -.PARAMETER Name - Name of the VM Switch. - -.PARAMETER Type - Type of switch. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateSet("External","Internal","Private")] - [String] - $Type - ) - - Write-Verbose -Message "Getting settings for VM Switch '$Name'" - - # Check if Hyper-V module is present for Hyper-V cmdlets - if (!(Get-Module -ListAvailable -Name Hyper-V)) - { - New-InvalidOperationError ` - -ErrorId 'HyperVNotInstalledError' ` - -ErrorMessage $LocalizedData.HyperVNotInstalledError - } - - $switch = Get-VMSwitch -Name $Name -SwitchType $Type -ErrorAction SilentlyContinue - - if ($null -ne $switch) - { - $ensure = 'Present' - if ($switch.SwitchType -eq 'External') - { - if ($switch.EmbeddedTeamingEnabled -ne $true) - { - $netAdapterName = (Get-NetAdapter -InterfaceDescription $switch.NetAdapterInterfaceDescription -ErrorAction SilentlyContinue).Name - $description = $switch.NetAdapterInterfaceDescription - } - else - { - $netAdapterName = (Get-NetAdapter -InterfaceDescription $switch.NetAdapterInterfaceDescriptions).Name - $description = $switch.NetAdapterInterfaceDescriptions - } - } - else - { - $netAdapterName = $null - $description = $null - } - } - else - { - $ensure = 'Absent' - } - - $returnValue = @{ - Name = $switch.Name - Type = $switch.SwitchType - NetAdapterName = [string[]]$netAdapterName - AllowManagementOS = $switch.AllowManagementOS - EnableEmbeddedTeaming = $switch.EmbeddedTeamingEnabled - Ensure = $ensure - Id = $switch.Id - NetAdapterInterfaceDescription = $description - } - - if ($null -ne $switch.BandwidthReservationMode) - { - $returnValue['BandwidthReservationMode'] = $switch.BandwidthReservationMode - } - else - { - $returnValue['BandwidthReservationMode'] = 'NA' - } - - return $returnValue -} - -<# -.SYNOPSIS - Configures MSFT_xVMSwitch resource state. - -.PARAMETER Name - Name of the VM Switch. - -.PARAMETER Type - Type of switch. - -.PARAMETER NetAdapterName - Network adapter name(s) for external switch type. - -.PARAMETER AllowManagementOS - Specify if the VM host has access to the physical NIC. - -.PARAMETER EnableEmbeddedTeaming - Should embedded NIC teaming be used (Windows Server 2016 only). - -.PARAMETER BandwidthReservationMode - Type of Bandwidth Reservation Mode to use for the switch. - -.PARAMETER Ensure - Whether switch should be present or absent. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateSet("External","Internal","Private")] - [String] - $Type, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String[]] - $NetAdapterName, - - [Parameter()] - [Boolean] - $AllowManagementOS = $false, - - [Parameter()] - [Boolean] - $EnableEmbeddedTeaming = $false, - - [Parameter()] - [ValidateSet("Default","Weight","Absolute","None","NA")] - [String] - $BandwidthReservationMode = "NA", - - [Parameter()] - [ValidateSet("Present","Absent")] - [String] - $Ensure = "Present" - ) - - # Check if Hyper-V module is present for Hyper-V cmdlets - if (!(Get-Module -ListAvailable -Name Hyper-V)) - { - New-InvalidOperationError ` - -ErrorId 'HyperVNotInstalledError' ` - -ErrorMessage $LocalizedData.HyperVNotInstalledError - } - - # Check to see if the BandwidthReservationMode chosen is supported in the OS - elseif (($BandwidthReservationMode -ne "NA") -and ((Get-OSVersion) -lt [version]'6.2.0')) - { - New-InvalidArgumentError ` - -ErrorId 'BandwidthReservationModeError' ` - -ErrorMessage $LocalizedData.BandwidthReservationModeError - } - - if ($EnableEmbeddedTeaming -eq $true -and (Get-OSVersion).Major -lt 10) - { - New-InvalidArgumentError ` - -ErrorId 'SETServer2016Error' ` - -ErrorMessage $LocalizedData.SETServer2016Error - } - - if ($Ensure -eq 'Present') - { - $switch = (Get-VMSwitch -Name $Name -SwitchType $Type -ErrorAction SilentlyContinue) - - # If switch is present and it is external type, that means it doesn't have right properties (TEST code ensures that) - if ($switch -and ($switch.SwitchType -eq 'External')) - { - $removeReaddSwitch = $false - - Write-Verbose -Message ($LocalizedData.CheckingSwitchMessage -f $Name) - if ($switch.EmbeddedTeamingEnabled -eq $false -or $null -eq $switch.EmbeddedTeamingEnabled) - { - if ((Get-NetAdapter -Name $NetAdapterName).InterfaceDescription -ne $switch.NetAdapterInterfaceDescription) - { - Write-Verbose -Message ($LocalizedData.NetAdapterInterfaceIncorrectMessage -f $Name) - $removeReaddSwitch = $true - } - } - else - { - $adapters = (Get-NetAdapter -InterfaceDescription $switch.NetAdapterInterfaceDescriptions -ErrorAction SilentlyContinue).Name - if ($null -ne (Compare-Object -ReferenceObject $adapters -DifferenceObject $NetAdapterName)) - { - Write-Verbose -Message ($LocalizedData.SwitchIncorrectNetworkAdapters -f $Name) - $removeReaddSwitch = $true - } - } - - if (($BandwidthReservationMode -ne "NA") -and ($switch.BandwidthReservationMode -ne $BandwidthReservationMode)) - { - Write-Verbose -Message ($LocalizedData.BandwidthReservationModeIncorrect -f $Name) - $removeReaddSwitch = $true - } - - if ($null -ne $switch.EmbeddedTeamingEnabled -and - $switch.EmbeddedTeamingEnabled -ne $EnableEmbeddedTeaming) - { - Write-Verbose -Message ($LocalizedData.EnableEmbeddedTeamingIncorrect -f $Name) - $removeReaddSwitch = $true - } - - if ($removeReaddSwitch) - { - Write-Verbose -Message ($LocalizedData.RemoveAndReaddSwitchMessage -f $Name) - $switch | Remove-VMSwitch -Force - $parameters = @{} - $parameters["Name"] = $Name - $parameters["NetAdapterName"] = $NetAdapterName - - if ($BandwidthReservationMode -ne "NA") - { - $parameters["MinimumBandwidthMode"] = $BandwidthReservationMode - } - - if ($PSBoundParameters.ContainsKey("AllowManagementOS")) - { - $parameters["AllowManagementOS"] = $AllowManagementOS - } - - if ($PSBoundParameters.ContainsKey("EnableEmbeddedTeaming")) - { - $parameters["EnableEmbeddedTeaming"] = $EnableEmbeddedTeaming - } - - $null = New-VMSwitch @parameters - Write-Verbose -Message "Switch $Name has right netadapter $NetAdapterName" - # Since the switch is recreated, the $switch variable is stale and needs to be reassigned - $switch = (Get-VMSwitch -Name $Name -SwitchType $Type -ErrorAction SilentlyContinue) - } - else - { - Write-Verbose -Message ($LocalizedData.SwitchCorrectNetAdapterAndBandwidthMode -f $Name, $NetAdapterName, $BandwidthReservationMode) - } - - Write-Verbose -Message ($LocalizedData.CheckAllowManagementOS -f $Name) - if ($PSBoundParameters.ContainsKey("AllowManagementOS") -and ($switch.AllowManagementOS -ne $AllowManagementOS)) - { - Write-Verbose -Message ($LocalizedData.AllowManagementOSIncorrect -f $Name) - $switch | Set-VMSwitch -AllowManagementOS $AllowManagementOS - Write-Verbose -Message ($LocalizedData.AllowManagementOSUpdated -f $Name, $AllowManagementOS) - } - else - { - Write-Verbose -Message ($LocalizedData.AllowManagementOSCorrect -f $Name) - } - } - - # If the switch is not present, create one - else - { - Write-Verbose -Message ($LocalizedData.PresentNotCorrect -f $Name, $Ensure) - Write-Verbose -Message $LocalizedData.CreatingSwitch - $parameters = @{} - $parameters["Name"] = $Name - - if ($BandwidthReservationMode -ne "NA") - { - $parameters["MinimumBandwidthMode"] = $BandwidthReservationMode - } - - if ($NetAdapterName) - { - $parameters["NetAdapterName"] = $NetAdapterName - if ($PSBoundParameters.ContainsKey("AllowManagementOS")) - { - $parameters["AllowManagementOS"] = $AllowManagementOS - } - } - else - { - $parameters["SwitchType"] = $Type - } - - if ($PSBoundParameters.ContainsKey("EnableEmbeddedTeaming")) - { - $parameters["EnableEmbeddedTeaming"] = $EnableEmbeddedTeaming - } - - $null = New-VMSwitch @parameters - Write-Verbose -Message ($LocalizedData.PresentCorrect -f $Name, $Ensure) - } - } - # Ensure is set to "Absent", remove the switch - else - { - Get-VMSwitch $Name -ErrorAction SilentlyContinue | Remove-VMSwitch -Force - } -} - -<# -.SYNOPSIS - Tests if MSFT_xVMSwitch resource state is in the desired state or not. - -.PARAMETER Name - Name of the VM Switch. - -.PARAMETER Type - Type of switch. - -.PARAMETER NetAdapterName - Network adapter name(s) for external switch type. - -.PARAMETER AllowManagementOS - Specify if the VM host has access to the physical NIC. - -.PARAMETER EnableEmbeddedTeaming - Should embedded NIC teaming be used (Windows Server 2016 only). - -.PARAMETER BandwidthReservationMode - Type of Bandwidth Reservation Mode to use for the switch. - -.PARAMETER Ensure - Whether switch should be present or absent. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateSet("External","Internal","Private")] - [String] - $Type, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String[]] - $NetAdapterName, - - [Parameter()] - [Boolean] - $AllowManagementOS = $false, - - [Parameter()] - [Boolean] - $EnableEmbeddedTeaming = $false, - - [Parameter()] - [ValidateSet("Default","Weight","Absolute","None","NA")] - [String] - $BandwidthReservationMode = "NA", - - [Parameter()] - [ValidateSet("Present","Absent")] - [String] - $Ensure = "Present" - ) - - # Check if Hyper-V module is present for Hyper-V cmdlets - if (!(Get-Module -ListAvailable -Name Hyper-V)) - { - New-InvalidOperationError ` - -ErrorId 'HyperVNotInstalledError' ` - -ErrorMessage $LocalizedData.HyperVNotInstalledError - } - - #region input validation - if ($Type -eq 'External' -and !($NetAdapterName)) - { - New-InvalidArgumentError ` - -ErrorId 'NetAdapterNameRequiredError' ` - -ErrorMessage $LocalizedData.NetAdapterNameRequiredError - } - - if ($Type -ne 'External' -and $NetAdapterName) - { - New-InvalidArgumentError ` - -ErrorId 'NetAdapterNameNotRequiredError' ` - -ErrorMessage $LocalizedData.NetAdapterNameNotRequiredError - } - - if (($BandwidthReservationMode -ne "NA") -and ((Get-OSVersion) -lt [version]'6.2.0')) - { - New-InvalidArgumentError ` - -ErrorId 'BandwidthReservationModeError' ` - -ErrorMessage $LocalizedData.BandwidthReservationModeError - } - - if ($EnableEmbeddedTeaming -eq $true -and (Get-OSVersion).Major -lt 10) - { - New-InvalidArgumentError ` - -ErrorId 'SETServer2016Error' ` - -ErrorMessage $LocalizedData.SETServer2016Error - } - #endregion - - try - { - # Check if switch exists - Write-Verbose -Message ($LocalizedData.PresentChecking -f $Name, $Ensure) - $switch = Get-VMSwitch -Name $Name -SwitchType $Type -ErrorAction Stop - - # If switch exists - if ($null -ne $switch) - { - Write-Verbose -Message ($LocalizedData.SwitchPresent -f $Name) - # If switch should be present, check the switch type - if ($Ensure -eq 'Present') - { - ## Only check the BandwidthReservationMode if specified - if ($PSBoundParameters.ContainsKey('BandwidthReservationMode')) - { - # If the BandwidthReservationMode is correct, or if $switch.BandwidthReservationMode is $null which means it isn't supported on the OS - Write-Verbose -Message ($LocalizedData.CheckingBandwidthReservationMode -f $Name) - if ($switch.BandwidthReservationMode -eq $BandwidthReservationMode -or $null -eq $switch.BandwidthReservationMode) - { - Write-Verbose -Message ($LocalizedData.BandwidthReservationModeCorrect -f $Name) - } - else - { - Write-Verbose -Message ($LocalizedData.BandwidthReservationModeIncorrect -f $Name) - return $false - } - } - - # If switch is the external type, check additional propeties - if ($Type -eq 'External') - { - if ($EnableEmbeddedTeaming -eq $false) - { - Write-Verbose -Message ($LocalizedData.CheckingNetAdapterInterface -f $Name) - $adapter = $null - try - { - $adapter = Get-NetAdapter -Name $NetAdapterName -ErrorAction SilentlyContinue - } - catch - { - # There are scenarios where the SilentlyContinue error action is not honoured, - # so this block serves to handle those and the write-verbose message is here - # to ensure that script analyser doesn't see an empty catch block to throw an - # error - Write-Verbose -Message $LocalizedData.NetAdapterNotFound - } - - if ($adapter.InterfaceDescription -ne $switch.NetAdapterInterfaceDescription) - { - return $false - } - else - { - Write-Verbose -Message ($LocalizedData.NetAdapterInterfaceCorrect -f $Name) - } - } - else - { - Write-Verbose -Message ($LocalizedData.CheckingNetAdapterInterfaces -f $Name) - if ($null -ne $switch.NetAdapterInterfaceDescriptions) - { - $adapters = (Get-NetAdapter -InterfaceDescription $switch.NetAdapterInterfaceDescriptions -ErrorAction SilentlyContinue).Name - if ($null -ne (Compare-Object -ReferenceObject $adapters -DifferenceObject $NetAdapterName)) - { - Write-Verbose -Message ($LocalizedData.IncorrectNetAdapterInterfaces -f $Name) - return $false - } - else - { - Write-Verbose -Message ($LocalizedData.CorrectNetAdapterInterfaces -f $Name) - } - } - else - { - Write-Verbose -Message ($LocalizedData.IncorrectNetAdapterInterfaces -f $Name) - return $false - } - } - - if ($PSBoundParameters.ContainsKey("AllowManagementOS")) - { - Write-Verbose -Message ($LocalizedData.CheckAllowManagementOS -f $Name) - if (($switch.AllowManagementOS -ne $AllowManagementOS)) - { - return $false - } - else - { - Write-Verbose -Message ($LocalizedData.AllowManagementOSCorrect -f $Name) - } - } - } - - # Only check embedded teaming if specified - if ($PSBoundParameters.ContainsKey("EnableEmbeddedTeaming") -eq $true) - { - Write-Verbose -Message ($LocalizedData.CheckEnableEmbeddedTeaming -f $Name) - if ($switch.EmbeddedTeamingEnabled -eq $EnableEmbeddedTeaming -or $null -eq $switch.EmbeddedTeamingEnabled) - { - Write-Verbose -Message ($LocalizedData.EnableEmbeddedTeamingCorrect -f $Name) - } - else - { - Write-Verbose -Message ($LocalizedData.EnableEmbeddedTeamingIncorrect -f $Name) - return $false - } - } - - return $true - } - # If switch should be absent, but is there, return $false - else - { - return $false - } - } - } - - # If no switch was present - catch [System.Management.Automation.ActionPreferenceStopException] - { - Write-Verbose -Message ($LocalizedData.SwitchNotPresent -f $Name) - return ($Ensure -eq 'Absent') - } -} - -<# -.SYNOPSIS -Returns the OS version -#> -function Get-OSVersion -{ - [Environment]::OSVersion.Version -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMSwitch/MSFT_xVMSwitch.schema.mof b/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMSwitch/MSFT_xVMSwitch.schema.mof deleted file mode 100644 index 711a1980..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMSwitch/MSFT_xVMSwitch.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xVMSwitch")] -class MSFT_xVMSwitch : OMI_BaseResource -{ - [Key, Description("Name of the VM Switch")] String Name; - [Key, Description("Type of switch"), ValueMap{"External","Internal","Private"}, Values{"External","Internal","Private"}] String Type; - [Write, Description("Network adapter name(s) for external switch type")] String NetAdapterName[]; - [Write, Description("Specify if the VM host has access to the physical NIC")] Boolean AllowManagementOS; - [Write, Description("Should embedded NIC teaming be used (Windows Server 2016 only)")] Boolean EnableEmbeddedTeaming; - [Write, Description("Type of Bandwidth Reservation Mode to use for the switch"), ValueMap{"Default","Weight","Absolute","None","NA"}, Values{"Default","Weight","Absolute","None","NA"}] String BandwidthReservationMode; - [Write, Description("Whether switch should be present or absent"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Read, Description("Unique ID for the switch")] String Id; - [Read, Description("Description of the network interface")] String NetAdapterInterfaceDescription; -}; diff --git a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMSwitch/en-us/MSFT_xVMSwitch.strings.psd1 b/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMSwitch/en-us/MSFT_xVMSwitch.strings.psd1 deleted file mode 100644 index 2f59fb8c..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVMSwitch/en-us/MSFT_xVMSwitch.strings.psd1 +++ /dev/null @@ -1,35 +0,0 @@ -ConvertFrom-StringData @' - CheckingSwitchMessage = Checking switch '{0}' NetAdapterInterface and BandwidthReservationMode ... - NetAdapterInterfaceIncorrectMessage = The switch '{0}' NetAdapterInterface is incorrect ... - SwitchIncorrectNetworkAdapters = Switch '{0}' has an incorrect list of network adapters... - BandwidthReservationModeIncorrect = The switch '{0}' BandwidthReservationMode is incorrect ... - EnableEmbeddedTeamingIncorrect = The switch '{0}' EnableEmbeddedTeaming is incorrect ... - RemoveAndReaddSwitchMessage = Removing switch '{0}' and creating with the correct properties ... - SwitchCorrectNetAdapterAndBandwidthMode = Switch '{0}' has right netadapter '{1}' and BandwidthReservationMode '{2}' - CheckAllowManagementOS = Checking switch '{0}' AllowManagementOS ... - AllowManagementOSIncorrect = Switch '{0}' AllowManagementOS property is not correct - AllowManagementOSUpdated = Switch '{0}' AllowManagementOS property is set to '{1}' - AllowManagementOSCorrect = Switch '{0}' AllowManagementOS is correctly set - PresentNotCorrect = Switch '{0}' is not '{1}'. - CreatingSwitch = Creating Switch ...Checking - PresentCorrect = Switch '{0}' is now '{1}'. - PresentChecking = Checking if Switch '{0}' is '{1}' ... - SwitchPresent = Switch '{0}' is Present - SwitchNotPresent = Switch '{0}' is Absent - CheckingBandwidthReservationMode = Checking if Switch '{0}' has correct BandwidthReservationMode ... - BandwidthReservationModeCorrect = Switch '{0}' has correct BandwidthReservationMode or it does not apply to this OS - CheckingNetAdapterInterface = Checking if Switch '{0}' has correct NetAdapterInterface ... - NetAdapterNotFound = Network adapter not found - NetAdapterInterfaceCorrect = Switch '{0}' has correct NetAdapterInterface - CheckingNetAdapterInterfaces = Checking if Switch '{0}' has correct NetAdapterInterfaces ... - IncorrectNetAdapterInterfaces = Switch '{0}' has an incorrect list of network adapters - CorrectNetAdapterInterfaces = Switch '{0}' has a correct list of network adapters - CheckEnableEmbeddedTeaming = Checking if Switch '{0}' has correct EnableEmbeddedTeaming ... - EnableEmbeddedTeamingCorrect = Switch '{0}' has correct EnableEmbeddedTeaming or it does not apply to this OS - - SETServer2016Error = Embedded teaming is only supported on Windows Server 2016 - HyperVNotInstalledError = Please ensure that the Hyper-V role is installed with its PowerShell module - BandwidthReservationModeError = The BandwidthReservationMode cannot be set on a Hyper-V version lower than 2012 - NetAdapterNameRequiredError = For external switch type, NetAdapterName must be specified - NetAdapterNameNotRequiredError = For Internal or Private switch type, NetAdapterName should not be specified -'@ diff --git a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVhdFileDirectory/MSFT_xVhdFileDirectory.psm1 b/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVhdFileDirectory/MSFT_xVhdFileDirectory.psm1 deleted file mode 100644 index 400bee59..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVhdFileDirectory/MSFT_xVhdFileDirectory.psm1 +++ /dev/null @@ -1,482 +0,0 @@ - -<# -# Get the current configuration of the machine -# This function is called when you do Get-DscConfiguration after the configuration is set. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $VhdPath, - - [parameter(Mandatory = $true)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $FileDirectory, - - [ValidateSet('ModifiedDate','SHA-1','SHA-256','SHA-512')] - [System.String] - $CheckSum = 'ModifiedDate' - ) - - if ( -not (Test-path $VhdPath)) - { - $item = New-CimInstance -ClassName MSFT_FileDirectoryConfiguration -Property @{DestinationPath = $VhdPath; Ensure = "Absent"} -Namespace root/microsoft/windows/desiredstateconfiguration -ClientOnly - - Return @{ - VhdPath = $VhdPath - FileDirectory = $item - } - } - - # Mount VHD. - $mountVHD = EnsureVHDState -Mounted -vhdPath $vhdPath - - $itemsFound = foreach($Item in $FileDirectory) - { - $item = GetItemToCopy -item $item - $mountedDrive = $mountVHD | Get-Disk | Get-Partition | Get-Volume - $letterDrive = (-join $mountedDrive.DriveLetter) + ":\" - - # show the drive letters. - Get-PSDrive | Write-Verbose - - $finalPath = Join-Path $letterDrive $item.DestinationPath - - Write-Verbose "Getting the current value at $finalPath ..." - - if (Test-Path $finalPath) - { - New-CimInstance -ClassName MSFT_FileDirectoryConfiguration -Property @{DestinationPath = $finalPath; Ensure = "Present"} -Namespace root/microsoft/windows/desiredstateconfiguration -ClientOnly - } - else - { - New-CimInstance -ClassName MSFT_FileDirectoryConfiguration -Property @{DestinationPath = $finalPath ; Ensure = "Absent"} -Namespace root/microsoft/windows/desiredstateconfiguration -ClientOnly - } - } - - # Dismount VHD. - EnsureVHDState -Dismounted -vhdPath $VhdPath - - # Return the result. - Return @{ - VhdPath = $VhdPath - FileDirectory = $itemsFound - } -} - - -# This is a resource method that gets called if the Test-TargetResource returns false. -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $VhdPath, - - [parameter(Mandatory = $true)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $FileDirectory, - - [ValidateSet('ModifiedDate','SHA-1','SHA-256','SHA-512')] - [System.String] - $CheckSum = 'ModifiedDate' - ) - - if (-not (Test-Path $VhdPath)) { throw "Specified destination path $VhdPath does not exist!"} - - # mount the VHD. - $mountedVHD = EnsureVHDState -Mounted -vhdPath $VhdPath - - try - { - # show the drive letters. - Get-PSDrive | Write-Verbose - - $mountedDrive = $mountedVHD | Get-Disk | Get-Partition | Get-Volume - - foreach ($item in $FileDirectory) - { - $itemToCopy = GetItemToCopy -item $item - $letterDrive = (-join $mountedDrive.DriveLetter) + ":\" - $finalDestinationPath = $letterDrive - $finalDestinationPath = Join-Path $letterDrive $itemToCopy.DestinationPath - - # if the destination should be removed - if (-not($itemToCopy.Ensure)) - { - if (Test-Path $finalDestinationPath) - { - SetVHDFile -destinationPath $finalDestinationPath -ensure:$false -recurse:($itemToCopy.Recurse) - } - } - else - { - # Copy Scenario - if ($itemToCopy.SourcePath) - { - SetVHDFile -sourcePath $itemToCopy.SourcePath -destinationPath $finalDestinationPath -recurse:($itemToCopy.Recurse) -force:($itemToCopy.Force) - } - elseif ($itemToCopy.Content) - { - "Writing a content to a file" - - # if the type is not specified assume it is a file. - if (-not ($itemToCopy.Type)) - { - $itemToCopy.Type = 'File' - } - - # Create file/folder scenario - SetVHDFile -destinationPath $finalDestinationPath -type $itemToCopy.Type -force:($itemToCopy.Force) -content $itemToCopy.Content - } - - # Set Attribute scenario - if ($itemToCopy.Attributes) - { - SetVHDFile -destinationPath $finalDestinationPath -attribute $itemToCopy.Attributes -force:($itemToCopy.Force) - } - } - - } - } - finally - { - EnsureVHDState -Dismounted -vhdPath $VhdPath - } -} - -# This function returns if the current configuration of the machine is the same as the desired configration for this resource. -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $VhdPath, - - [parameter(Mandatory = $true)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $FileDirectory, - - [ValidateSet('ModifiedDate','SHA-1','SHA-256','SHA-512')] - [System.String] - $CheckSum = 'ModifiedDate' - ) - - # If the VHD path does not exist throw an error and stop. - if ( -not (Test-Path $VhdPath)) - { - throw "VHD does not exist in the specified path $VhdPath" - } - - # mount the vhd. - $mountedVHD = EnsureVHDState -Mounted -vhdPath $VhdPath - - try - { - # Show the drive letters after mount - Get-PSDrive | Write-Verbose - - $mountedDrive = $mountedVHD | Get-Disk | Get-Partition | Get-Volume - $letterDrive = (-join $mountedDrive.DriveLetter) + ":\" - Write-Verbose $letterDrive - - # return test result equal to true unless one of the tests in the loop below fails. - $result = $true - - foreach ($item in $FileDirectory) - { - $itemToCopy = GetItemToCopy -item $item - $destination = $itemToCopy.DestinationPath - Write-Verbose ("Testing the file with relative VHD destination $destination") - $destination = $itemToCopy.DestinationPath - $finalDestinationPath = $letterDrive - $finalDestinationPath = Join-Path $letterDrive $destination - - if (Test-Path $finalDestinationPath) - { - if( -not ($itemToCopy.Ensure)) - { - $result = $false - break; - } - else - { - $itemToCopyIsFile = Test-Path $itemToCopy.SourcePath -PathType Leaf - $destinationIsFolder = Test-Path $finalDestinationPath -PathType Container - - if ($itemToCopyIsFile -and $destinationIsFolder) - { - # Verify if the file exist inside the folder - $fileName = Split-Path $itemToCopy.SourcePath -Leaf - Write-Verbose "Checking if $fileName exist under $finalDestinationPath" - $fileExistInDestination = Test-Path (Join-Path $finalDestinationPath $fileName) - - # Report if the file exist on the destination folder. - Write-Verbose "File exist on the destination under $finalDestinationPath :- $fileExistInDestination" - $result = $fileExistInDestination - $result = $result -and -not(ItemHasChanged -sourcePath $itemToCopy.SourcePath -destinationPath (Join-Path $finalDestinationPath $fileName) -CheckSum $CheckSum) - } - - if (($itemToCopy.Type -eq "Directory") -and ($itemToCopy.Recurse)) - { - $result = $result -and -not(ItemHasChanged -sourcePath $itemToCopy.SourcePath -destinationPath $finalDestinationPath -CheckSum $CheckSum) - - if (-not ($result)) - { - break; - } - } - } - } - else - { - # If Ensure is specified as Present or if Ensure is not specified at all. - if(($itemToCopy.Ensure)) - { - $result = $false - break; - } - } - - # Check the attribute - if ($itemToCopy.Attributes) - { - $currentAttribute = @(Get-ItemProperty -Path $finalDestinationPath |% Attributes) - $result = $currentAttribute.Contains($itemToCopy.Attributes) - } - } - } - finally - { - EnsureVHDState -Dismounted -vhdPath $VhdPath - } - - - Write-Verbose "Test returned $result" - return $result; -} - -# Assert the state of the VHD. -function EnsureVHDState -{ - [CmdletBinding(DefaultParametersetName="Mounted")] - param( - - [parameter(Mandatory=$false,ParameterSetName = "Mounted")] - [switch]$Mounted, - [parameter(Mandatory=$false,ParameterSetName = "Dismounted")] - [switch]$Dismounted, - [parameter(Mandatory=$true)] - $vhdPath - ) - - if ( -not ( Get-Module -ListAvailable Hyper-v)) - { - throw "Hyper-v-Powershell Windows Feature is required to run this resource. Please install Hyper-v feature and try again" - } - if ($PSCmdlet.ParameterSetName -eq 'Mounted') - { - # Try mounting the VHD. - $mountedVHD = Mount-VHD -Path $vhdPath -Passthru -ErrorAction SilentlyContinue -ErrorVariable var - - # If mounting the VHD failed. Dismount the VHD and mount it again. - if ($var) - { - Write-Verbose "Mounting Failed. Attempting to dismount and mount it back" - Dismount-VHD $vhdPath - $mountedVHD = Mount-VHD -Path $vhdPath -Passthru -ErrorAction SilentlyContinue - - return $mountedVHD - } - else - { - return $mountedVHD - } - } - else - { - Dismount-VHD $vhdPath -ea SilentlyContinue - - } -} - -# Change the Cim Instance objects in to a hash table containing property value pair. -function GetItemToCopy -{ - param([Microsoft.Management.Infrastructure.CimInstance] $item) - - $returnValue = @{ - SourcePath = $item.CimInstanceProperties["SourcePath"].Value - DestinationPath = $item.CimInstanceProperties["DestinationPath"].Value - Ensure = $item.CimInstanceProperties["Ensure"].Value - Recurse = $item.CimInstanceProperties["Recurse"].Value - Force = $item.CimInstanceProperties["Force"].Value - Content = $item.CimInstanceProperties["Content"].Value - Attributes = @($item.CimInstanceProperties["Attributes"].Value) - Type = $item.CimInstanceProperties["Type"].Value - } - - # Assign Default values, if they are not specified. - if ($returnValue.Ensure -eq $null) - { - $returnValue.Ensure = "Present" - } - - if ($returnValue.Force -eq $null) - { - $returnValue.Force = "True" - } - - if ($returnValue.Recurse -eq $null) - { - $returnValue.Recurse = "True" - } - if ($returnValue.Type -eq $null) - { - if (Test-Path $returnValue.SourcePath -PathType Leaf ) - { - $returnValue.Type = 'File' - } - else - { - $returnValue.Type = 'Directory' - } - } - - # Convert string "True" or "False" to boolean for ease of programming. - $returnValue.Force = $returnValue.Force -eq "True" - $returnValue.Recurse = $returnValue.Recurse -eq "True" - $returnValue.Ensure = $returnValue.Ensure -eq "Present" - $returnValue.Keys | %{ Write-Verbose "$_ => $($returnValue[$_])"} - - return $returnValue -} - - -# This is the main function that gets called after the file is mounted to perform copy, set or new operations on the mounted drive. -function SetVHDFile -{ - [CmdletBinding(DefaultParametersetName="Copy")] - param( - [parameter(Mandatory=$true,ParameterSetName = "Copy")] - $sourcePath, - [switch]$recurse, - [switch]$force, - [parameter(Mandatory=$false,ParameterSetName = "New")] - $type, - [parameter(Mandatory=$false,ParameterSetName = "New")] - $content, - [parameter(Mandatory=$true)] - $destinationPath, - [parameter(Mandatory=$true,ParameterSetName = "Set")] - $attribute, - [parameter(Mandatory=$true,ParameterSetName = "Delete")] - [switch]$ensure - ) - - Write-Verbose "Setting the VHD file $($PSCmdlet.ParameterSetName)" - if ($PSCmdlet.ParameterSetName -eq 'Copy') - { - New-Item -Path (Split-Path $destinationPath) -ItemType Directory -ErrorAction SilentlyContinue - Copy-Item -Path $sourcePath -Destination $destinationPath -Force:$force -Recurse:$recurse -ErrorAction SilentlyContinue - } - elseif ($PSCmdlet.ParameterSetName -eq 'New') - { - If ($type -eq 'Directory') - { - New-Item -Path $destinationPath -ItemType $type - } - else - { - New-Item -Path $destinationPath -ItemType $type - $content | Out-File $destinationPath - } - - } - elseif ($PSCmdlet.ParameterSetName -eq 'Set') - { - Write-Verbose "Attempting to change the attribute of the file $destinationPath to value $attribute" - Set-ItemProperty -Path $destinationPath -Name Attributes -Value $attribute - } - elseif (!($ensure)) - { - Remove-Item -Path $destinationPath -Force:$force -Recurse:$recurse - } -} - -# Detect if the item to be copied is modified version of the orginal. -function ItemHasChanged -{ - param( - [parameter(Mandatory=$true)] - [ValidateScript({Test-Path $_})] - $sourcePath, - [parameter(Mandatory=$true)] - [ValidateScript({Test-Path $_})] - $destinationPath, - [parameter(Mandatory=$false)] - [ValidateSet('ModifiedDate','SHA-1','SHA-256','SHA-512')] - $CheckSum = 'ModifiedDate' - ) - - $itemIsFolder = Test-Path $sourcePath -Type Container - $sourceItems = $null; - $destinationItems = $null; - - if ($itemIsFolder) - { - $sourceItems = Get-ChildItem "$sourcePath\*.*" -Recurse - $destinationItems = Get-ChildItem "$destinationPath\*.*" -Recurse - - } - else - { - $sourceItems = Get-ChildItem $sourcePath - $destinationItems = Get-ChildItem $destinationPath - - } - - if ( -not ($destinationItems)) - { - return $true; - } - - # Compute the difference using the algorithem specified. - $difference = $null - - switch ($CheckSum) - { - - 'ModifiedDate' - { - $difference = Compare-Object -ReferenceObject $sourceItems -DifferenceObject $destinationItems -Property LastWriteTime - } - 'SHA-1' - { - $difference = Compare-Object -ReferenceObject ($sourceItems | Get-FileHash -Algorithm SHA1) -DifferenceObject ($destinationItems | Get-FileHash -Algorithm SHA1) -Property Hash - } - 'SHA-256' - { - $difference = Compare-Object -ReferenceObject ($sourceItems | Get-FileHash -Algorithm SHA256) -DifferenceObject ($destinationItems | Get-FileHash -Algorithm SHA256) -Property Hash - } - 'SHA-512' - { - $difference = Compare-Object -ReferenceObject ($sourceItems | Get-FileHash -Algorithm SHA512) -DifferenceObject ($destinationItems | Get-FileHash -Algorithm SHA512) -Property Hash - } - } - # If there are object difference between the item at the source and Items at the distenation. - return ($null -ne $difference) - -} - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVhdFileDirectory/MSFT_xVhdFileDirectory.schema.mof b/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVhdFileDirectory/MSFT_xVhdFileDirectory.schema.mof deleted file mode 100644 index b221b4b4..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/DSCResources/MSFT_xVhdFileDirectory/MSFT_xVhdFileDirectory.schema.mof +++ /dev/null @@ -1,24 +0,0 @@ - -[ClassVersion("1.0.0.0")] -Class MSFT_xFileDirectory -{ - [Required] string DestinationPath; - [Write] string SourcePath; - [Write,ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] string Ensure; - [Write,ValueMap{"File", "Directory"},Values{"File", "Directory"}] string Type; - [Write] boolean Recurse; - [Write] boolean Force ; - [write] string Content; - [Write,ValueMap{"ReadOnly", "Hidden", "System", "Archive"},Values{"ReadOnly", "Hidden", "System", "Archive"}] string Attributes[]; -}; - -[ClassVersion("1.0.0.0"), FriendlyName("xVhdFile")] -class MSFT_xVhdFileDirectory : OMI_BaseResource -{ - [Key, Description("Path to the VHD")] String VhdPath; - [Required, EmbeddedInstance("MSFT_xFileDirectory"), Description("The FileDirectory objects to copy to the VHD")] String FileDirectory[]; - [Write,ValueMap{"ModifiedDate","SHA-1","SHA-256","SHA-512"},Values{"ModifiedDate","SHA-1","SHA-256","SHA-512"}] string CheckSum; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xHyper-V/LICENSE b/lib/puppet_x/dsc_resources/xHyper-V/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xHyper-V/Misc/VHDResourceGenerator.ps1 b/lib/puppet_x/dsc_resources/xHyper-V/Misc/VHDResourceGenerator.ps1 deleted file mode 100644 index 1a009581..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/Misc/VHDResourceGenerator.ps1 +++ /dev/null @@ -1,13 +0,0 @@ - $name = New-DscResourceProperty -Name Name -Type String -Attribute Key -Description "Name of the VHD File" - $path = New-DscResourceProperty -Name Path -Type String -Attribute Key -Description "Folder where the VHD will be created" - $parentPath = New-DscResourceProperty -Name ParentPath -Type String -Attribute Write -Description "Parent VHD file path, for differencing disk" - $generation = New-DscResourceProperty -Name Generation -Type String -Attribute Write -ValidateSet "Vhd","Vhdx" -Description "Virtual disk format - Vhd or Vhdx" - $ensure = New-DscResourceProperty -Name Ensure -Type String -Attribute Write -ValidateSet "Present","Absent" -Description "Should the VHD be created or deleted" - $MaximumSizeBytes = New-DscResourceProperty -Name MaximumSizeBytes -Type Uint32 -Attribute Write -Description "Maximum size of Vhd to be created" - - $id = New-DscResourceProperty -Name ID -Type String -Attribute Read -Description "Virtual Disk Identifier" - $type = New-DscResourceProperty -Name Type -Type String -Attribute Read -Description "Type of Vhd - Dynamic, Fixed, Differencing" - $FileSizeBytes = New-DscResourceProperty -Name FileSizeBytes -Type Uint32 -Attribute Read -Description "Current size of the VHD" - $IsAttached = New-DscResourceProperty -Name IsAttached -Type Boolean -Attribute Read -Description "Is the VHD attached to a VM or not" - - New-DscResource -Name MSFT_xVHD -Properties $name,$path,$parentPath,$generation,$ensure,$id,$type,$MaximumSizeBytes,$FileSizeBytes,$IsAttached -Path . -ClassVersion 1.0.0 -FriendlyName xVHD diff --git a/lib/puppet_x/dsc_resources/xHyper-V/Misc/VMResourceGenerator.ps1 b/lib/puppet_x/dsc_resources/xHyper-V/Misc/VMResourceGenerator.ps1 deleted file mode 100644 index 41d24510..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/Misc/VMResourceGenerator.ps1 +++ /dev/null @@ -1,26 +0,0 @@ - $name = New-xDscResourceProperty -Name Name -Type String -Attribute Key -Description "Name of the VM" - $vhdPath = New-xDscResourceProperty -Name VhdPath -Type String -Attribute Required -Description "VHD associated with the VM" - $switchName = New-xDscResourceProperty -Name SwitchName -Type String -Attribute Write -Description "Virtual switch associated with the VM" - $path = New-xDscResourceProperty -Name Path -Type String -Attribute Write -Description "Folder where the VM data will be stored" - $generation = New-xDscResourceProperty -Name Generation -Type String -Attribute Write -ValidateSet "Vhd","Vhdx" -Description "Associated Virtual disk format - Vhd or Vhdx" - $ensure = New-xDscResourceProperty -Name Ensure -Type String -Attribute Write -ValidateSet "Present","Absent" -Description "Should the VM be created or deleted" - $startupMem = New-xDscResourceProperty -Name StartupMemory -Type Uint64 -Attribute Write -Description "Startup RAM for the VM." - $minMem = New-xDscResourceProperty -Name MinimumMemory -Type Uint64 -Attribute Write -Description "Minimum RAM for the VM. This enables dynamic memory." - $maxMem = New-xDscResourceProperty -Name MaximumMemory -Type Uint64 -Attribute Write -Description "Maximum RAM for the VM. This enable dynamic memory." - $macAddress = New-xDscResourceProperty -Name MACAddress -Type String -Attribute Write -Description "MAC address of the VM." - $waitForIP = New-xDscResourceProperty -Name WaitForIP -Type Boolean -Attribute Write -Description "Waits for VM to get valid IP address." - $state = New-xDscResourceProperty -Name State -Type String -Attribute Write -ValidateSet "Running","Paused","Off" -Description "State of the VM." - $notes = New-xDscResourceProperty -Name Notes -Type String -Attribute Write -Description "Notes about the VM." - $procCount = New-xDscResourceProperty -Name ProcessorCount -Type Uint32 -Attribute Write -Description "Processor count for the VM" - $restartIfNeeded = New-xDscResourceProperty -Name RestartIfNeeded -Type Boolean -Attribute Write -Description "If specified, shutsdown and restarts the VM if needed for resource change" - - $id = New-xDscResourceProperty -Name ID -Type String -Attribute Read -Description "VM unique ID" - $status = New-xDscResourceProperty -Name Status -Type String -Attribute Read -Description "Status of the VM" - $CPUUsage = New-xDscResourceProperty -Name CPUUsage -Type Uint32 -Attribute Read -Description "CPU Usage of the VM" - $memAssigned = New-xDscResourceProperty -Name MemoryAssigned -Type Uint64 -Attribute Read -Description "Memory assigned to the VM" - $uptime = New-xDscResourceProperty -Name Uptime -Type String -Attribute Read -Description "Uptime of the VM" - $creationTime = New-xDscResourceProperty -Name CreationTime -Type DateTime -Attribute Read -Description "Creation time of the VM" - $hasDynamicMemory = New-xDscResourceProperty -Name HasDynamicMemory -Type Boolean -Attribute Read -Description "Does VM has dynamic memory enabled" - $networkAdapters = New-xDscResourceProperty -Name NetworkAdapters -Type String[] -Attribute Read -Description "Network adapters of the VM" - - New-xDscResource -Name MSFT_xVMHyperV -Property @($name,$vhdPath,$switchName,$state,$path,$generation,$startupMem,$minMem,$maxMem,$macAddress,$procCount,$waitForIP,$restartIfNeeded,$ensure, $notes,$id,$status,$CPUUsage,$memAssigned,$uptime,$creationTime,$hasDynamicMemory,$networkAdapters) -Path . -ClassVersion 1.0.0 -FriendlyName xVMHyperV diff --git a/lib/puppet_x/dsc_resources/xHyper-V/Misc/VMSwitchGenerator.ps1 b/lib/puppet_x/dsc_resources/xHyper-V/Misc/VMSwitchGenerator.ps1 deleted file mode 100644 index 4d27ea99..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/Misc/VMSwitchGenerator.ps1 +++ /dev/null @@ -1,8 +0,0 @@ - $name = New-DscResourceProperty -Name Name -Type String -Attribute Key -Description "Name of the VM Switch" - $type = New-DscResourceProperty -Name Type -Type String -Attribute Key -ValidateSet "Internal","Private" -Description "Type of switch" - $netAdapter = New-DscResourceProperty -Name NetAdapterName -Type String -Attribute Write -Description "Network adapter name for external switch type" - $allowManagementOS = New-DscResourceProperty -Name AllowManagementOS -Type Boolean -Attribute Write -Description "Specify is the VM host has access to the physical NIC" - $ensure = New-DscResourceProperty -Name Ensure -Type String -Attribute Write -ValidateSet "Present","Absent" -Description "Whether switch should be present or absent" - $id = New-DscResourceProperty -Name Id -Type String -Attribute Read -Description "Unique ID for the switch" - $netDescription = New-DscResourceProperty -Name NetAdapterInterfaceDescription -Type String -Attribute Read -Description "Description of the network interface" - New-DscResource -Name MSFT_xVMSwitch -Path . -Properties $name,$type,$netAdapter,$allowManagementOS,$ensure,$id,$netDescription -ClassVersion 1.0.0.0 -FriendlyName xVMSwitch diff --git a/lib/puppet_x/dsc_resources/xHyper-V/xHyper-V.psd1 b/lib/puppet_x/dsc_resources/xHyper-V/xHyper-V.psd1 deleted file mode 100644 index bb051dcd..00000000 --- a/lib/puppet_x/dsc_resources/xHyper-V/xHyper-V.psd1 +++ /dev/null @@ -1,101 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '3.9.0.0' - -# ID used to uniquely identify this module -GUID = 'f5a5f169-7026-4053-932a-19a7c37b1ca5' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2013 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module with DSC Resources for Hyper-V area' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xHyper-V/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xHyper-V' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* MSFT_xVMHyperV: - * Increased xVMHyperV StartupMemory and MinimumMemory limits from 17GB to 64GB. - * EnableGuestService works on localized OS (language independent). - * Adds missing Hyper-V-PowerShell feature in examples. -* Added the following resources: - * MSFT_xVMProcessor to manage virtual machine processor options. - * MSFT_xVMHost to managing Hyper-V host settings. -* MSFT_xVMSwitch: - * Added support for Switch Embedded Teaming (SET) in Server 2016. - * Fixed a bug where Get-TargetResource threw an error if a non External switch - is used. - * Updated unit tests to use template version 1.2.0. - * Style fixes. - * Added support for Localization. -* xHyper-V module: - * Added vs code formatting rule settings. - * Fix Markdown rule violations in Readme.md. - * Added .MetaTestOptIn.json for Markdown common test to be included. - * Added Appveyor badge for Dev branch in Readme.md and moved to Branches section. - * Added missing properties for all resources in Readme.md. - * Added and corrected missing / wrong DataTypes and Dsc attributes in Readme.md. - * Updated Readme to match DscResources style. - * Created change log and linked to it from Readme. - * Removed version info from Readme. - * Updated appveyor.yml to use Appveyor module. - * Examples: - * Removed code from Readme and linked to example files instead. - * Moved code to new example files where there was only code in Readme. - * Codecov: - * Updated appveyor.yml to include codecov. - * Added .codecov.yml. - * Added codecov badges to Readme. -* MSFT_xVHD: - * Support setting the disk type. - * Added unit tests. - * Added example Sample\_xVHD\_FixedVHD.ps1 - * Style fixes - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - - - - - - - - diff --git a/lib/puppet_x/dsc_resources/xInternetExplorerHomePage/DSCResources/xInternetExplorerHomePage/xInternetExplorerHomePage.psm1 b/lib/puppet_x/dsc_resources/xInternetExplorerHomePage/DSCResources/xInternetExplorerHomePage/xInternetExplorerHomePage.psm1 deleted file mode 100644 index e41fa522..00000000 --- a/lib/puppet_x/dsc_resources/xInternetExplorerHomePage/DSCResources/xInternetExplorerHomePage/xInternetExplorerHomePage.psm1 +++ /dev/null @@ -1,241 +0,0 @@ -#--------------------------------------------------------------------------------- #The sample scripts are not supported under any Microsoft standard support #program or service. The sample scripts are provided AS IS without warranty #of any kind. Microsoft further disclaims all implied warranties including, #without limitation, any implied warranties of merchantability or of fitness for #a particular purpose. The entire risk arising out of the use or performance of #the sample scripts and documentation remains with you. In no event shall #Microsoft, its authors, or anyone else involved in the creation, production, or #delivery of the scripts be liable for any damages whatsoever (including, #without limitation, damages for loss of business profits, business interruption, #loss of business information, or other pecuniary loss) arising out of the use #of or inability to use the sample scripts or documentation, even if Microsoft #has been advised of the possibility of such damages #--------------------------------------------------------------------------------- - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [String] - $StartPage, - - [String] - $SecondaryStartPages - ) - - $IEMainReg = 'HKLM:\Software\Microsoft\Internet Explorer\Main' - - Write-Verbose "Detecting the start page of Internet Explorer." - $StartPageReg = (Get-ItemProperty -Path $IEMainReg).'Start Page' - - Write-Verbose "Detecting the secondary start pages of Internet Explorer." - $SecondaryStartPagesReg = (Get-ItemProperty -Path $IEMainReg).'Secondary Start Pages' - - - $returnValue = @{ - #Verify that the value exists, if it does not exist, the value of output is "NULL". - StartPage = $(If($StartPageReg){$StartPageReg}Else{"NULL"}) - SecondaryStartPages = $(If($SecondaryStartPagesReg){$SecondaryStartPagesReg}Else{"NULL"}) - } - - If($SecondaryStartPages) - { - If($($StartPage -eq $StartPageReg) -and $($SecondaryStartPages -eq $SecondaryStartPagesReg)) - { - $returnValue.Ensure = "Present" - } - Else - { - $returnValue.Ensure = "Absent" - } - } - Else - { - If($StartPage -eq $StartPageReg) - { - $returnValue.Ensure = "Present" - } - Else - { - $returnValue.Ensure = "Absent" - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding(SupportsShouldProcess=$true)] - param - ( - [parameter(Mandatory = $true)] - [String] - $StartPage, - - [String] - $SecondaryStartPages, - - [ValidateSet("Present","Absent")] - [String] - $Ensure = 'Present' - ) - - $IEMainReg = 'HKLM:\Software\Microsoft\Internet Explorer\Main' - - Switch($Ensure) - { - #Set the home page of IE - 'Present' - { - If($SecondaryStartPages) - { - If($PSCmdlet.ShouldProcess("Internet Explorer","Set the start page and secondary start page")) - { - Try - { - Write-Verbose "Setting the start page of Internet Explorer." - Set-ItemProperty -Path $IEMainReg -Name "Start Page" -Value "$StartPage" -ErrorAction Stop - - Write-Verbose "Setting the secondary start page of Internete Explorer." - Set-ItemProperty -Path $IEMainReg -Name "Secondary Start Pages" -Value "$SecondaryStartPages" -ErrorAction Stop - } - Catch - { - $ErrorMsg = $_.Exception.Message Write-Verbose $ErrorMsg - } - } - } - Else - { - If($PSCmdlet.ShouldProcess("Internet Explorer","Set the start page")) - { - Try - { - Write-Verbose "Setting the start page of Internet Explorer." - Set-ItemProperty -Path $IEMainReg -Name "Start Page" -Value "$StartPage" -ErrorAction Stop - - } - Catch - { - $ErrorMsg = $_.Exception.Message Write-Verbose $ErrorMsg - } - } - } - } - - #Remove the home page of IE - 'Absent' - { - If($SecondaryStartPages) - { - If($PSCmdlet.ShouldProcess("Internet Explorer","Remove the start page and secondary start page")) - { - Try - { - Write-Verbose "Removing the start page of Internete Explorer." - Set-ItemProperty -Path $IEMainReg -Name "Start Page" -Value "" -ErrorAction Stop - - Write-Verbose "Removing the secondary start page of Internete Explorer." - Set-ItemProperty -Path $IEMainReg -Name "Secondary Start pages" -Value "" -ErrorAction Stop - } - Catch - { - $ErrorMsg = $_.Exception.Message Write-Verbose $ErrorMsg - } - } - } - Else - { - If($PSCmdlet.ShouldProcess("Internet Explorer","Remove the start page")) - { - Try - { - Write-Verbose "Removing the start page of Internete Explorer." - Set-ItemProperty -Path $IEMainReg -Name "Start Page" -Value "" -ErrorAction Stop - } - Catch - { - $ErrorMsg = $_.Exception.Message Write-Verbose $ErrorMsg - } - } - } - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [parameter(Mandatory = $true)] - [String] - $StartPage, - - [String] - $SecondaryStartPages, - - [ValidateSet("Present","Absent")] - [String] - $Ensure = 'Present' - ) - - - #Output the result of Get-TargetResource function. - $Get = Get-TargetResource -StartPage $StartPage -SecondaryStartPages $SecondaryStartPages - - Switch($Ensure) - { - 'Present' - { - If($SecondaryStartPages) - { - If($StartPage -eq $Get.StartPage -and $SecondaryStartPages -eq $Get.SecondaryStartPages) - { - return $true - } - Else - { - return $false - } - } - Else - { - If($StartPage -eq $Get.StartPage -and $SecondaryStartPages -eq $Get.SecondaryStartPages) - { - return $true - } - Else - { - return $false - } - } - } - - 'Absent' - { - If($SecondaryStartPages) - { - If($Get.StartPage -eq "NULL" -and $Get.SecondaryStartPages -eq "NULL") - { - return $true - } - Else - { - return $false - } - } - Else - { - If($Get.StartPage -eq "NULL") - { - return $true - } - Else - { - return $false - } - } - } - } -} - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xInternetExplorerHomePage/DSCResources/xInternetExplorerHomePage/xInternetExplorerHomePage.schema.mof b/lib/puppet_x/dsc_resources/xInternetExplorerHomePage/DSCResources/xInternetExplorerHomePage/xInternetExplorerHomePage.schema.mof deleted file mode 100644 index b150e594..00000000 --- a/lib/puppet_x/dsc_resources/xInternetExplorerHomePage/DSCResources/xInternetExplorerHomePage/xInternetExplorerHomePage.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xInternetExplorerHomePage")] -class xInternetExplorerHomePage : OMI_BaseResource -{ - [Key, Description("Specifies the URL for the home page of Internet Explorer.")] String StartPage; - [Write, Description("Specifies the URL for the secondary home pages of Internet Explorer.")] String SecondaryStartPages; - [Write, Description("Should the IE home page is configured or unconfigured."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xInternetExplorerHomePage/LICENSE b/lib/puppet_x/dsc_resources/xInternetExplorerHomePage/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xInternetExplorerHomePage/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xInternetExplorerHomePage/xInternetExplorerHomePage.psd1 b/lib/puppet_x/dsc_resources/xInternetExplorerHomePage/xInternetExplorerHomePage.psd1 deleted file mode 100644 index b9bb8243..00000000 --- a/lib/puppet_x/dsc_resources/xInternetExplorerHomePage/xInternetExplorerHomePage.psd1 +++ /dev/null @@ -1,37 +0,0 @@ -@{ - -# Version number of this module. -ModuleVersion = '1.0.0' - -# ID used to uniquely identify this module -GUID = 'b7261a23-14b6-4524-b194-04513563e920' - -# Author of this module -Author = 'OneScript Team' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'This DSC Resources can easily set an URL for the home page of Internet Explorer' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = 'Get-TargetResource', 'Test-TargetResource', 'Set-TargetResource' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Variables to export from this module -VariablesToExport = '*' - -# Aliases to export from this module -AliasesToExport = '*' - -} - diff --git a/lib/puppet_x/dsc_resources/xJea/DSCResources/Library/Helper.psm1 b/lib/puppet_x/dsc_resources/xJea/DSCResources/Library/Helper.psm1 deleted file mode 100644 index b9914216..00000000 --- a/lib/puppet_x/dsc_resources/xJea/DSCResources/Library/Helper.psm1 +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright © 2014, Microsoft Corporation. All rights reserved. -# Internal function to throw terminating error with specified errorCategory, errorId and errorMessage -function New-TerminatingError -{ - param - ( - [Parameter(Mandatory)] - [String]$errorId, - - [Parameter(Mandatory)] - [String]$errorMessage, - - [Parameter(Mandatory)] - [System.Management.Automation.ErrorCategory]$errorCategory - ) - - $exception = New-Object System.InvalidOperationException $errorMessage - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - throw $errorRecord -} - - diff --git a/lib/puppet_x/dsc_resources/xJea/DSCResources/Library/JeaAccount.psm1 b/lib/puppet_x/dsc_resources/xJea/DSCResources/Library/JeaAccount.psm1 deleted file mode 100644 index 81920cd6..00000000 --- a/lib/puppet_x/dsc_resources/xJea/DSCResources/Library/JeaAccount.psm1 +++ /dev/null @@ -1,330 +0,0 @@ -# Copyright © 2014, Microsoft Corporation. All rights reserved. -Import-Module $PSScriptRoot\..\Library\Helper.psm1 -Import-Module $PSScriptRoot\..\Library\JeaDir.psm1 - -<# -.Synopsis - Creates a random password. -.DESCRIPTION - Creates a random password by generating a array of characters and passing it to Get-Random -.EXAMPLE -PS> New-RandomPassword -g0dIDojsRGcV -.EXAMPLE -PS> New-RandomPassword -Length 3 -dyN -.EXAMPLE -PS> New-RandomPassword -Length 30 -UseSpecialCharacters -r5Lhs1K9n*joZl$u^NDO&TkWvPCf2c -#> -function New-RandomPassword -{ - [CmdletBinding()] - [OutputType([String])] - Param - ( - # Length of the password - [Parameter(Mandatory=$False, Position=0)] - [ValidateRange(12, 127)] - $Length=12, - - # Includes the characters !@#$%^&*-+ in the password - [switch]$UseSpecialCharacters - ) - - [char[]]$allowedCharacters = ([Char]'a'..[char]'z') + ([char]'A'..[char]'Z') + ([byte][char]'0'..[byte][char]'9') - if ($UseSpecialCharacters) - { - foreach ($c in '!','@','#','$','%','^','&','*','-','+') - { - $allowedCharacters += [char]$c - } - } - - $characters = 1..$Length | % { - $characterIndex = Get-Random -Minimum 0 -Maximum $allowedCharacters.Count - $allowedCharacters[$characterIndex] - } - - return (-join $characters) -} - -Set-Alias New-RandomString New-RandomPassword - -<# -.Synopsis - Create a User Account with a random name -.DESCRIPTION - -.EXAMPLE - Example of how to use this cmdlet -.EXAMPLE - Another example of how to use this cmdlet -#> -function New-JeaSessionAccount -{ - [CmdletBinding(DefaultParameterSetName='UserNamePrefix')] - Param - ( - #******************************************************************************** - # A random username is generated. This parameter gives you the opportunity to - # to prefix that name with a string to help identify the account - [Parameter(Mandatory=$false, ParameterSetName='UserNamePrefix')] - [ValidateLength(0,12)] - $UserNamePrefix = 'JSA-', - - [Parameter(Mandatory=$true, ParameterSetName='UserName')] - $UserName, - - [string] - $ComputerName = $Env:COMPUTERNAME, - - [string] - $Description = "JEA Service Account created by $($env:UserDomain + '\' + $ENV:Username) at $(Get-Date)", - - [string[]] - $Group='Administrators' - ) - - if (!($PSCmdlet.ParameterSetName -eq 'UserName')) - { - $MaxWindowsUserLength = 20 - $Templength = $MaxWindowsUserLength - $UserNamePrefix.Length - $UserName = $UserNamePrefix + (New-RandomString -Length $TempLength) - } - - $Computer = [ADSI]"WinNT://$COMPUTERNAME,Computer" - - Write-Verbose "New [JeaSessionAccount]$UserName" - $User = $Computer.Create('User', $UserName) - $password = New-RandomPassword -Length 127 -UseSpecialCharacters - $cred = new-object pscredential $username, (convertto-securestring $password -asplaintext -force) - - $null = $( - $User.SetPassword($password) - $User.SetInfo() - $User.FullName = 'Jea Session Account' - $User.SetInfo() - $User.Description = $Description - $User.SetInfo() - $User.UserFlags = 64 # ADS_UF_PASSWD_CANT_CHANGE http://msdn.microsoft.com/en-us/library/aa772300(v=vs.85).aspx - $User.SetInfo() - ) - - foreach ($item in $group) - { - Write-Verbose " [JeaSessionAccount]$UserName ADD [Group]$item" - $gobj = [ADSI]"WinNT://$COMPUTERNAME/$item,group" - $null = $gobj.add("WinNT://$ComputerName/$UserName") - } - return $cred -} - -function Remove-JeaAccount -{ - Param - ( - - [Parameter(Mandatory=$true)] - $UserName, - - [string] - $ComputerName = $Env:COMPUTERNAME - ) - - $Computer = [ADSI]"WinNT://$COMPUTERNAME,Computer" - $computer.delete('user',$userName) -} - - -function Test-JeaSessionAccount -{ - [CmdletBinding()] - [OutputType([Boolean])] - Param - ( - [Parameter(Mandatory=$true, Position=0)] - $UserName, - - $ComputerName = $Env:COMPUTERNAME - - ) - - $oldDebugPrefernce = $DebugPreference; $oldVerbosePreference = $VerbosePreference - $DebugPreference = $VerbosePreference = 'SilentlyContinue' - $user = Get-CimInstance -Query "select * from Win32_UserAccount Where Name=""$UserName"" AND LocalAccount=""TRUE""" -ComputerName $ComputerName -Verbose:0 - $DebugPreference = $oldDebugPrefernce; $VerbosePreference = $oldVerbosePreference - return [Boolean]$user -} - - -function Reset-JeaSessionAccountPassword -{ - [CmdletBinding()] - Param - ( - #******************************************************************************** - # A random username is generated. This parameter gives you the opportunity to - # to prefix that name with a string to help identify the account - [Parameter(Mandatory=$true, Position=0)] - $UserName, - - $ComputerName = $Env:COMPUTERNAME - - ) - - $user = [ADSI]"WinNT://$computerName/$username,user" - $password = New-RandomPassword -Length 127 -UseSpecialCharacters - $null = $user.setpassword($password) - $null = $user.SetInfo() - $cred = new-object pscredential $username, (convertto-securestring $password -asplaintext -force) - return $cred -} - -function Assert-JeaAdminAccount -{ - $cred = $null - if (!(Test-JeaSessionAccount -UserName JeaSchTaskAccount)) - { - Write-Verbose 'New [JeaScheduledTaskAccount]' - $cred = New-JeaSessionAccount -UserName JeaSchTaskAccount -Group Administrators -Description "This is a special Jea account to run the ResetJeaSessionAccountPasswords Scheduled task" - } - Assert-ScheduledScripts - Assert-ScheduledTasks $cred -} - -$ResetScript = @' - #This resets the passwords for all the RUnas - [char[]]$pwChars = ([Char]'a'..[char]'z') + ([char]'A'..[char]'Z') + ([byte][char]'0'..[byte][char]'9') - foreach ($c in '!','@','#','$','%','^','&','*','-','+') - { - $pwChars += [char]$c - } - - $endpoint = Get-PSSessionConfiguration |where {$_.RunAsUser -like 'JSA-*'} - if ($endpoint) - { - foreach ($ep in $endpoint) - { - $user = [ADSI]"WinNT://$($env:computerName)/$($ep.RunAsUser),user" - $password = (( $pwChars |Get-Random -Count 127 | % {[char]$_}) -join '') - $null = $user.setpassword($password) - $null = $user.SetInfo() - $cred = new-object pscredential ($ep.RunAsUser), (convertto-securestring $password -asplaintext -force) - Set-PSSessionConfiguration -Name $($ep.Name) -RunAsCredential $cred -Force - } - Restart-Service Winrm -Force - } -'@ - -$RestartWinRM = @' -#requires -Version 5 -<# -If you restart the WinRM service while DSC is running, it puts WinRM in a bad state -so this script waits for DSC to finish it's work and then restarts WinRM -#> -if ((Get-DscLocalConfigurationManager).LocalConfigurationManagerState) -{ $property = "LocalConfigurationManagerState" -}else -{ $property = "LCMState" -} -While ((Get-DscLocalConfigurationManager).$property -ne 'Ready') -{ - Start-Sleep -Seconds 2 -} -start-sleep -seconds 20 -Restart-Service winrm -Force -'@ - -function Assert-ScheduledScripts -{ - $UtilDir = Get-JeaUtilDir - if (!(Test-Path $UtilDir)) - { - Write-Verbose "New [JeaDirectory]$utildir" - mkdir -Force -Path $UtilDir - } - - $ResetPS1 = Join-Path $UtilDir 'ScheduledPasswordReset.ps1' - if (!(Test-Path $ResetPs1) -or - (cat $resetPS1 -Delimiter "None") -ne $resetscript) - { - Write-Verbose 'Reset [JeaScheduledPasswordResetScript]' - $resetScript > $ResetPS1 - } - - $RestartWinRMPS1 = Join-Path $UtilDir 'RestartWinrm.ps1' - if (!(Test-Path $restartWinRMPS1) -or - (Get-Content $restartWinRMPS1 -Delimiter 'None') -ne $RestartWinRM) - { - Write-Verbose 'Reset [JeaScheduledPasswordreStartWinRMScript]' - $RestartWinRM > $restartWinRMPS1 - } -} - -function Assert-ScheduledTasks -{ -param( -[Parameter()] -$cred -) - - $UtilDir = Get-JeaUtilDir - $wd = "`"$UtilDir`"" - $ResetPS1 = Join-Path $UtilDir 'ScheduledPasswordReset.ps1' - $file = "`"$ResetPS1`"" - $cmdPath = (get-command Powershell.exe).Source - $Arguments = "-nologo -executionPolicy ByPass -NoProfile -NonInteractive -file $file -WorkingDirectory $wd -WindowStyle hidden" - $s = Get-ScheduledTask -TaskPath \Microsoft\Windows\Jea\ -TaskName ResetJeaSessionAccountPasswords -ErrorAction SilentlyContinue - Write-Verbose "Test [JEAScheduledTask]ResetJeaSessionAccountPasswords $([Bool]$s)" - if (!($s) -or - $s.Actions.Count -ne 1 -or - $s.Actions[0].Execute -ne $cmdPath -or - $s.Actions[0].Arguments -ne $Arguments) - { - if ($s) {Unregister-ScheduledTask -TaskPath \Microsoft\Windows\Jea\ -TaskName ResetJeaSessionAccountPasswords -ErrorAction SilentlyContinue } - $action = New-ScheduledTaskAction -Execute $cmdPath -Argument $arguments - $trigger = New-ScheduledTaskTrigger -Daily -At 1:00 - if (!$Cred) - { - Write-Verbose 'Register [JEAScheduledTask]ResetJeaSessionAccountPasswords' - $cred = Reset-JeaSessionAccountPassword -UserName JeaSchTaskAccount - } - $setting = New-ScheduledTaskSettingsSet -MultipleInstances IgnoreNew -StartWhenAvailable - Write-Verbose 'Register [JEAScheduledTask]ResetJeaSessionAccountPasswords' - Register-ScheduledTask -TaskName ResetJeaSessionAccountPasswords -Action $action ` - -TaskPath \Microsoft\Windows\Jea\ -Description 'Reset Jea Session Account Passwords' ` - -Settings $setting ` - -Trigger $trigger ` - -User $cred.UserName -Password $cred.GetNetworkCredential().Password - - } - - - $RestartWinRMPS1 = Join-Path $UtilDir 'RestartWinrm.ps1' - $file = "`"$RestartWinrmPS1`"" - $Arguments = "-nologo -executionPolicy ByPass -NoProfile -NonInteractive -file $file -WorkingDirectory $wd -WindowStyle hidden" - $s = Get-ScheduledTask -TaskPath \Microsoft\Windows\Jea\ -TaskName RestartWinRM -ErrorAction SilentlyContinue - Write-Verbose "Test [JEAScheduledTask]RestartWinRM $([Bool]$s)" - if (!($s) -or - $s.Actions.Count -ne 1 -or - $s.Actions[0].Execute -ne $cmdPath -or - $s.Actions[0].Arguments -ne $Arguments) - { - if ($s) {Unregister-ScheduledTask -TaskPath \Microsoft\Windows\Jea\ -TaskName RestartWinRM -ErrorAction SilentlyContinue } - $action = New-ScheduledTaskAction -Execute $cmdPath -Argument $arguments - if (!$Cred) - { - Write-Verbose 'Register [JEAScheduledTask]JeaSchTaskAccount' - $cred = Reset-JeaSessionAccountPassword -UserName JeaSchTaskAccount - } - $settings = New-ScheduledTaskSettingsSet -MultipleInstances IgnoreNew - Write-Verbose 'Register [JEAScheduledTask]RestartWinRM' - Register-ScheduledTask -TaskName RestartWinRM -Action $action ` - -TaskPath \Microsoft\Windows\Jea\ -Description 'Restart WinRM after current DSC cycle is complete' ` - -Settings $settings ` - -User $cred.UserName -Password $cred.GetNetworkCredential().Password - - } -} - diff --git a/lib/puppet_x/dsc_resources/xJea/DSCResources/Library/JeaDir.psm1 b/lib/puppet_x/dsc_resources/xJea/DSCResources/Library/JeaDir.psm1 deleted file mode 100644 index e2b2f988..00000000 --- a/lib/puppet_x/dsc_resources/xJea/DSCResources/Library/JeaDir.psm1 +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright © 2014, Microsoft Corporation. All rights reserved. - -function Get-JeaDir { Join-Path $env:ProgramFiles 'Jea' } -function Get-JeaToolKitDir { Join-Path (Get-JeaDir) 'Toolkit'} -function Get-JeaUtilDir { Join-Path (Get-JeaDir) 'Util'} -function Get-JeaStartupScriptDir { Join-Path (Get-JeaDir) 'StartupScript'} -function Get-JeaActivityDir { Join-Path (Get-JeaDir) 'Activity'} -function Get-JeaMotdDir { Join-Path (Get-JeaDir) 'Motd'} -function Assert-JeaDirectory -{ - $ToolkitDir = Get-JeaToolKitDir - $UtilDir = Get-JeaUtilDir - $StartupScriptDir = Get-JeaStartupScriptDir - $ActivityDir = Get-JeaActivityDir - $MotdDir = Get-JeaMotdDir - foreach ($dir in $ToolKitDir, $UtilDir, $StartupScriptDir, $ActivityDir, $MotdDir) - { - if (!(Test-Path $Dir)) - { - Write-Verbose -Message "New [JeaDirectory]$Dir" - mkdir $Dir -Force - } - } - $SafeProxyfile = Join-path $UtilDir 'SafeProxy.psm1' - if (!(test-path $SafeProxyfile)) - { - $sourcePS1 = Resolve-Path (Join-Path $PSScriptRoot '..\..\Util\SafeProxy.psm1') - Copy-Item $sourcePS1 -Destination $SafeProxyfile -Verbose - } - $initfile = Join-path $UtilDir 'Initialize-Toolkit.ps1' - if (!(test-path $initfile)) - { - $sourcePS1 = Resolve-Path (Join-Path $PSScriptRoot '..\..\Util\Initialize-ToolKit.ps1') - Copy-Item $sourcePS1 -Destination $initfile -Verbose - } -} - - - diff --git a/lib/puppet_x/dsc_resources/xJea/DSCResources/Library/JeaInitFile.psm1 b/lib/puppet_x/dsc_resources/xJea/DSCResources/Library/JeaInitFile.psm1 deleted file mode 100644 index b610ad1d..00000000 --- a/lib/puppet_x/dsc_resources/xJea/DSCResources/Library/JeaInitFile.psm1 +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright © 2014, Microsoft Corporation. All rights reserved. -function New-InitializationFile -{ - [CmdletBinding()] - [Alias()] - [OutputType([int])] - Param - ( - [Parameter(Mandatory=$true, - Position=0)] - $Path, - - [Parameter(Position=1)] - $Toolkit - ) -Write-Verbose "New [InitializationFile]$path" -''> $path -$toolkitNames = @() -foreach ($t in $toolkit) -{ - $toolkitNames += ("$t" +'-Toolkit') -} - -@" -<# -This is a auto-generated JEA startup file -Generated At: $(Get-date) -Generated On: $(hostname) -Generated By: $($env:UserDomain + '\' + $env:UserName) -#> -function whoami {`$PSSenderInfo} - -`$Init = (Join-Path `$env:ProgramFiles 'Jea\Util\Initialize-Toolkit.ps1') -. `$Init -toolkit $($Toolkitnames -join ',') - -"@ > $path - -} - diff --git a/lib/puppet_x/dsc_resources/xJea/DSCResources/Library/JeaProxy.psm1 b/lib/puppet_x/dsc_resources/xJea/DSCResources/Library/JeaProxy.psm1 deleted file mode 100644 index c88b7ed8..00000000 --- a/lib/puppet_x/dsc_resources/xJea/DSCResources/Library/JeaProxy.psm1 +++ /dev/null @@ -1,429 +0,0 @@ -# Copyright © 2014, Microsoft Corporation. All rights reserved. -Import-Module $PSScriptRoot\..\Library\Helper.psm1 -Import-Module $PSScriptRoot\..\Library\JeaDir.psm1 - -Add-Type @' - namespace Jea - { - using System.Collections; - using System.Collections.Generic; - using System.Globalization; - public class Parameter - { - public string ValidatePattern; - public string ValidateSet; - public string ParameterType; - public string Mandatory; - } - public class Proxy - { - public string Module; - public string Name; - public Hashtable Parameter; - public Proxy() - { - Parameter = new Hashtable(System.StringComparer.InvariantCultureIgnoreCase); - } - } - } -'@ - - - - -function ConvertTo-CSpec -{ - [CmdletBinding()] - Param - ( - [Parameter(Mandatory=$true, - ValueFromPipeline=$true, - Position=0)] - $In - ) - - Begin - { - } - Process - { - if ($In.Module -or $In.Name) - { - new-object psobject -Property @{ - Module = $(if ($In.Module ) {$In.module.Trim() }) - Name = $(if ($In.Name ) {$In.Name.Trim() }else {'*'}) - Parameter = $(if ($In.Parameter ) {$In.Parameter.Trim() }else {'*'}) - ValidateSet = $(if ($In.ValidateSet ) {$In.ValidateSet.Trim() }) - ValidatePattern = $(if ($In.ValidatePattern) {$In.ValidatePattern.Trim()}) - ParameterType = $(if ($In.ParameterType ) {$In.ParameterType.Trim() }) - Mandatory = $In.Mandatory - } - } - } - End - { - } -} - -function Get-JeaProxy -{ -param( - [Parameter(Mandatory=$true,Position=0)] - [ValidateNotNull()] - $Name, - [Parameter(Mandatory=$true,Position=1)] - [ValidateNotNull()] - $Parameter -) - #Names may specify specific commands or have wildcards to specify sets of commands - if (!$CommandsToGenerate.$Name -and $Parameter) - { - $CommandsToGenerate.$Name = New-Object Jea.Proxy - } - return $CommandsToGenerate.$Name -} - -function Add-ParametersToProxy -{ -param( - [Parameter(Mandatory=$true,Position=0)] - [ValidateNotNull()] - $Proxy, - [Parameter(Mandatory=$true,Position=1)] - [ValidateNotNull()] - $CSpec, - [Parameter(Mandatory=$true,Position=2)] - [ValidateNotNull()] - $CmdInfo -) - - if ($CSpec.Parameter -eq '*') - { - foreach ($ParameterName in $CmdInfo.Parameters.Keys) - { - $p = $proxy.parameter.($ParameterName) - if (!$p) - { - $p = new-object Jea.Parameter - $proxy.parameter.Add($ParameterName, $p) - } - } - } - else - { - $p = $proxy.parameter.$($CSpec.Parameter) - if (!$p) - { - $p = new-object Jea.Parameter - $proxy.parameter.Add($CSpec.Parameter.ToLower(), $p) - } - if ($CSpec.ValidateSet) - { - $p.ValidateSet =$CSpec.ValidateSet.Tolower() - } - if ($CSpec.ValidatePattern) - { - $p.ValidatePattern = $CSpec.ValidatePattern - } - if ($CSpec.ParameterType) - { - $p.ParameterType = $CSpec.ParameterType - } - if ($CSpec.Mandatory) - { - $p.Mandatory = $CSpec.Mandatory - } - } -} - -function ConvertTo-CommandsToGenerate -{ -param( - [Parameter(Mandatory=$true, - ValueFromPipeline=$true, - Position=0)] - [ValidateNotNull()] - $CSpec -) - Begin - { - $CommandsToGenerate = @{} - } - Process - { - $module = $CSpec.Module - if ($module -match "\.dll$") - { - $module = ((split-path $module -Leaf) -split '.dll')[0] - } - foreach ($CmdInfo in Get-Command -Module $Module -Name $CSpec.Name -CommandType Function,Cmdlet) - { - $proxy = Get-JeaProxy -Name $CmdInfo.Name -Parameter $CSpec.Parameter - Add-ParametersToProxy -Proxy $proxy -CSpec $CSpec -CmdInfo $cmdInfo - } - } - End - { - return $CommandsToGenerate - } -} -function New-ToolKitPremable -{ - param - ( - [Parameter(Mandatory)] - [String]$Name, - - [String] - $CommandSpecs, - - [System.String[]] - $Applications - ) - # Now we generate the File -@" -<# -This is a auto-generated module containing proxy cmdlets. -Generated At: $(Get-date) -Generated On: $(hostname) -Generated By: $($env:UserDomain + '\' + $env:UserName) - -#region OrginalCSVFile -******************** START Original Source file *********************** -$CommandSpecs -******************** END Original Source file *********************** -#endRegion - -#> - -$( - $list = @() - foreach ($a in $Applications) - { - $list += """$a""" - } - if ($list.count) - { -'$ExportedApplications = ' + ($list -join ',') - } - ) -"@ -} - -# Some of these are dangerous and other get in the way of the runspace working -$forbiddenProxy = @( - 'Exit-Pssession','Format-Table','Format-List','Format-Custom','Format-Wide', - 'Get-Command','Get-Help','Get-Formatdata','Get-Member','Group-Object', - 'Import-Module','Measure-Object','New-Object','Out-Default','Select-Object', - 'TabExpansion2','Where-Object','Write-Debug','Write-Error','Write-Host', - 'Write-Output','Write-Verbose','Write-Warning' -) - -function ConvertTo-ProxyFunctions -{ - [CmdletBinding()] - Param - ( - # Param1 help description - [Parameter(Mandatory=$true, - ValueFromPipeline=$true, - Position=0)] - $CmdName - - ) - - Begin - { - # Proxy Modules are typically going to be used in constrained runspaces where best - # practice will be to turn of ModuleAutoloading so the proxy needs to load whatever - # modules it will proxy - $modulesToImport = @{'Microsoft.PowerShell.Core'=1 } - $exportCmdlet = @() - } - Process - { - $Cmd = Get-Command -Name $CmdName -CommandType Cmdlet,Function -ErrorAction Stop - if (!$cmd) - { - Throw "No such Object [$CmdName :$CommandType]" - } - <# - TODO: Need to do some flavor of analsys of MANDATORY PARAMETERS in SETs - #> - foreach ($c in $cmd |where {$_.Name -notIn $forbiddenProxy}) - { - if ($c.Module) {import-module -Name $c.module -ErrorAction Ignore -Verbose:0} - if ($c.CommandType -eq 'function') - { - rename-item function:$($c.Name) $($c.Name + '-Original') - $c = Get-command -name ($cmdName + '-Original') -CommandType Function -ErrorAction Stop - } - $Parameter = $CommandsToGenerate.$CmdName.Parameter.Keys - $MetaData = New-Object System.Management.Automation.CommandMetaData $c - $metaData.Name = $CmdName - - foreach ($p in @($MetaData.Parameters.Keys)) - { - $p = $p.Tolower() - if ($p -notin $Parameter) - { - $null = $MetaData.Parameters.Remove($p) - } - else - { - $v = $CommandsToGenerate.$CmdName.Parameter.$p.ValidateSet - if ($v) - { - $MetaData.Parameters.$p.attributes.Add( $(New-Object System.Management.Automation.ValidateSetAttribute $($v -split ';'))) - } - $v = $CommandsToGenerate.$CmdName.Parameter.$p.ValidatePattern - if ($v) - { - $MetaData.Parameters.$p.attributes.Add( $(New-Object System.Management.Automation.ValidatePatternAttribute $v)) - } - $v = $CommandsToGenerate.$CmdName.Parameter.$p.ParameterType - if ($v) - { - $type = [System.AppDomain]::CurrentDomain.GetAssemblies().GetTypes() | where {$_.fullname -match $ParameterType} - if ($type) - { - $MetaData.Parameters.$p.ParameterType = $type[0].FullName - } - } - $v = $CommandsToGenerate.$CmdName.Parameter.$p.Mandatory - if ($v) - { - foreach($ps in $MetaData.Parameters.$p.Parametersets.Keys) - { - $MetaData.Parameters.$p.Parametersets.$PS.IsMandatory=$true - } - } - }#end - }#foreach - - if ($c.Module) - { - $RealModule = $c.module - if (!$modulesToImport.$RealModule) - { - $modulesToImport.$RealModule = 'Already imported' -@" -Import-Module $($RealModule) -Scope Global -"@ - } - - } -@" - -#region $cmdname -$( -if ($c.CommandType -eq 'function') -{ -"rename-item function:$cmdName $($cmdName+ '-Original')" -} -) -function $cmdName -{ -"@ - [System.Management.Automation.ProxyCommand]::create($MetaData) - -@" -} # $cmdName -#endregion - - -"@ - $exportCmdlet += $CmdName - - } #foreach $cmd - - } - End - { -@" -Export-ModuleMember -Function $(($exportCmdlet | sort -Unique) -join ',') -#EOF -"@ - - } -} - -function Test-Schema -{ -param( - [Parameter(Mandatory)] - $CSVs -) - $allowed = 'Module','Name','Parameter','ValidateSet','ValidatePattern','ParameterType','Mandatory' - $mismatch = $CSVs |Get-Member -MemberType Properties | where Name -notIn $Allowed - if ($mismatch) - { - $errorMsg = "Incorrect CommandSpec schema: $($Mismatch.Name -join ',')" - Write-Verbose $errorMsg - throw $errorMsg - } -} -<# -.Synopsis - Use a CSV-formated string to drive creation of a JeaProxy module -.DESCRIPTION - JeaProxy modules provide fine grain control over what a user can invoke. - It accomplishes this by manipulating the command parsing information and - generating a proxy function. This process is driven off a CommandSpecs which - is a CSV formated string using the schema: - Module,Name,Parameter,ValidateSet,ValidatePattern,ParameterType - - If only a name is specified, the cmdlet is surfaced in whole - If a Name and a parameter are specified, then only those parameters will be - surfaced for that cmdlet. Since it is a CSV format, only one parameter - can be specified on a line so we need to process all the lines and - consolidate the information before we create the proxies. - If a Name, a parameter and a Validate is specified, we add a VALIDATESET - attribute with the values of the Validate field. - The values need to be seperated with a ';'. - - Applications can also be specified. Applications are non-PowerShell - native executables (e.g. Ping.exe or IPconfig.exe) -.EXAMPLE - Export-JeaProxy -Name GeneralAdmin -Applications "ping.exe","ipconfig.exe" -CommandSpecs @` -Module,Name,Parameter,ValidateSet,ValidatePattern,ParameterType -,Get-Process -,Stop-Process,Name,calc;notepad -,get-service -,Stop-Service,Name,,^SQL -`@ -.OUTPUTS - Two files are created in the ($env:ProgramFiles)\Jea\Toolkit directory - 1) $Name-Toolkit.psm1 # The proxy module - 2) $Name-CommandSpecs.csv # For diagnostics -.NOTES - General notes -#> -function Export-JeaProxy -{ - param - ( - [Parameter(Mandatory)] - [String]$Name, - - [String] - $CommandSpecs, - - [System.String[]] - $Applications - ) - - $CommandSpecs > (Join-Path (Get-JeaToolKitDir) "$($Name)-CommandSpecs.csv") - Write-Verbose "New [JeaDirectory.CSV]$($Name)-CommandSpecs.csv" - - $CSVs = $CommandsToGenerate = $CommandSpecs.ToLower() | ConvertFrom-Csv - Test-Schema $CSVs - $CommandsToGenerate = $CSVs | ConvertTo-CSPec | ConvertTo-CommandsToGenerate - - $toolkit = (Join-Path (Get-JeaToolKitDir) "$($Name)-ToolKit.psm1") - New-ToolKitPremable @PSBoundParameters > $toolkit - $CommandsToGenerate.Keys |Sort {($_ -split '-')[1]},{($_ -split '-')[0]} | ConvertTo-ProxyFunctions >> $toolkit - Write-Verbose "New [JeaDirectory.Module]$toolkit" - -} #Export-JeaProxy - diff --git a/lib/puppet_x/dsc_resources/xJea/DSCResources/MSFT_xJeaEndpoint/MSFT_xJeaEndpoint.psm1 b/lib/puppet_x/dsc_resources/xJea/DSCResources/MSFT_xJeaEndpoint/MSFT_xJeaEndpoint.psm1 deleted file mode 100644 index 4c07d984..00000000 --- a/lib/puppet_x/dsc_resources/xJea/DSCResources/MSFT_xJeaEndpoint/MSFT_xJeaEndpoint.psm1 +++ /dev/null @@ -1,272 +0,0 @@ -#requires -version 5 -# Copyright © 2014, Microsoft Corporation. All rights reserved. -#region Helper -Import-Module $PSScriptRoot\..\Library\Helper.psm1 -Import-Module $PSScriptRoot\..\Library\JeaDir.psm1 -Import-Module $PSScriptRoot\..\Library\JeaAccount.psm1 -Import-Module $PSScriptRoot\..\Library\JeaInitFile.psm1 - - -#endregion - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name - ) - - try - { - write-Verbose "$((get-date).GetDateTimeFormats()[112]) Start Get [EndPoint]$Name" - $endpoint = Get-PSSessionConfiguration -Name $Name -ErrorAction SilentlyContinue -Verbose:0 - - if ($endpoint) - { - $returnValue = @{ - Name = [System.String]$Name - Toolkit = [System.String[]]"TODO: GET TOOLKITS" - Ensure = [System.String]'Present' - SecurityDescriptorSddl = [System.String]$endpoint.SecurityDescriptorSddl - Group = [String[]]$( - "TODO: Get Groups" - ) - } - } - else - { - $returnValue = @{ - Name = [System.String]$Name - Ensure = [System.String]'Absent' - } - } - $returnValue - }catch - { - write-Debug "ERROR: $($_|fl * -force|out-string)" - New-TerminatingError -errorId 'GetJeaEndpointFailed' -errorMessage $_.Exception -errorCategory InvalidOperation - }finally - { - write-Verbose "$((get-date).GetDateTimeFormats()[112]) Done Get [EndPoint]$Name" - } -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [System.String[]] - $Toolkit, - - [System.String] - $SecurityDescriptorSddl='O:NSG:BAD:P(A;;GA;;;BA)(A;;GA;;;RM)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)', - - [System.String[]] - $Group = @('Administrators'), - - [System.Boolean] - $CleanAll, - - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present' - ) - try - { - write-Verbose "$((get-date).GetDateTimeFormats()[112]) Start Set [EndPoint]$Name" - if ($CleanAll) - { - #region Remove non-default endpoints - Write-Verbose 'Remove [JeaEndpoints] *' - $defaultEndpoints = 'microsoft.powershell','microsoft.powershell.workflow','microsoft.powershell32','microsoft.windows.servermanagerworkflows' - Get-PSSessionConfiguration -Verbose:0 |where Name -NotIn $defaultEndpoints | % { - Write-Verbose "Remove [PSEndPoint] $($_.Name)" - Unregister-PSSessionConfiguration -NoServiceRestart -Force -Verbose:0 -Name $_.Name - } - #endregion - - #region Remove the JSA UserAccounts - Write-Verbose 'Remove [JSAUserAccount]*' - [ADSI]$Server="WinNT://$($Env:COMPUTERNAME)" - foreach ($account in (Get-CimInstance -Query 'select * from Win32_UserAccount Where Name Like "JSA-%" AND LocalAccount="TRUE"').Name) - { - Write-Verbose "Remove [JSAUserAccount] $account" - $server.Delete('user',$account) - } - if (Get-CimInstance -Query 'select * from Win32_UserAccount Where Name = "JeaSchTaskAccount" AND LocalAccount="TRUE"') - { - Write-Verbose "Remove [JSAUserAccount]JeaSchTaskAccount" - $server.Delete('user','JeaSchTaskAccount') - } - #endregion - - #region remove StartupFiles - if (test-path (Get-JeaStartupScriptDir)) - { - Write-Verbose 'Remove [JeaStartupFile] *' - Remove-Item (Join-Path (Get-JeaStartupScriptDir) *) -Recurse -Verbose - } - #endregion - - #region Remove JeaScheduled Tasks - write-verbose "Remove [ScheduleTask]RestartWinRM" - Unregister-ScheduledTask -TaskPath \Microsoft\Windows\Jea\ -TaskName RestartWinRM -ErrorAction Ignore - write-verbose "Remove [ScheduleTask]ResetJeaSessionAccountPasswords" - Unregister-ScheduledTask -TaskPath \Microsoft\Windows\Jea\ -TaskName ResetJeaSessionAccountPasswords -ErrorAction Ignore - #endregion - - } - else - { - JeaAccount\Assert-JeaAdminAccount - - $endPointName = $Name - $endPoint = Get-PSSessionConfiguration -Name $Name -Verbose:0 -ErrorAction SilentlyContinue - $account = "JSA-$Name" - if ($Ensure -AND !($endPoint)) - { - #region ACCOUNT - Write-Verbose "Test [JeaSessionAccount]$account" - if (Test-JeaSessionAccount -UserName $account) - { - Write-Verbose " [JeaSessionAccount]$account = `$true; Reset-JeaSessionAccountPassword" - $cred = Reset-JeaSessionAccountPassword -UserName $account - }else - { - Write-Verbose "New [JeaSessionAccount]$account" - $cred = New-JeaSessionAccount -UserName $account -Description 'PowerShell Session Acount' -Group $group - } - #endregion - - #region InitializationFile - $startupfile = Join-Path (Get-JeaStartupScriptDir) "Initialize-$($Name).ps1" - Write-Verbose "New [JeaStartupFile] $StartupFile -> [Jeatoolkit]$Toolkit" - New-InitializationFile -Path $StartupFile -Toolkit $Toolkit - #endregion - - #region EndPoint - Write-Verbose "New [JeaEndPoint] $Name" - try - { - # Set the following preference so the functions inside Unregister-PSSessionConfig doesn't get these settings - $oldDebugPrefernce = $DebugPreference; $oldVerbosePreference = $VerbosePreference - $DebugPreference = $VerbosePreference = 'SilentlyContinue' - - $null = Register-PSSessionConfiguration -Name $Name -StartupScript $startupfile -RunAsCredential $cred -NoServiceRestart -Verbose:0 -Force -SecurityDescriptorSddl $SecurityDescriptorSddl - # Reset the following preference to older values - $DebugPreference = $oldDebugPrefernce; $VerbosePreference = $oldVerbosePreference - - Start-ScheduledTask -TaskName RestartWinRM -TaskPath \Microsoft\Windows\Jea\ - } - catch - { - write-Debug "ERROR: $($_|fl * -force|out-string)" - New-TerminatingError -errorId 'JeaEndpointConfigurationFailed' -errorMessage $_.Exception -errorCategory InvalidOperation - } - - #endregion - }elseif (!($Ensure) -And $EndPoint) - { - Write-Verbose "Unregister [JeaEndPoint] $Name" - Unregister-PSSessionConfiguration -Name $Name -Force -Verbose:0 - Start-ScheduledTask -TaskName RestartWinRM -TaskPath \Microsoft\Windows\Jea\ - if (Test-JeaSessionAccount -UserName $account) - { - [ADSI]$Server="WinNT://$($Env:COMPUTERNAME)" - $server.Delete('user',$account) - } - } - } - }catch - { - write-Debug "ERROR: $($_|fl * -force|out-string)" - New-TerminatingError -errorId 'SetJeaEndpointFailed' -errorMessage $_.Exception -errorCategory InvalidOperation - - }finally - { - write-Verbose "$((get-date).GetDateTimeFormats()[112]) Done Set [EndPoint]$Name" - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [System.String[]] - $Toolkit, - - [System.String] - $SecurityDescriptorSddl, - - [System.String[]] - $Group, - - [System.Boolean] - $CleanAll, - - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present' - ) - - try - { - write-Verbose "$((get-date).GetDateTimeFormats()[112]) Start Test [EndPoint]$Name" - - if ($Cleanall) - { - return $false - }else - { - Write-Verbose "Test [JeaEndPoint] $name" - - $endPoint = Get-PSSessionConfiguration -Name $Name -Verbose:0 -ErrorAction Stop - $namePresentMessage = " [JeaEndPoint] $name Present" - Write-Verbose -Message $namePresentMessage - if ($Ensure -eq 'Absent') - { - return $false - } - else - { - Write-Verbose 'TEST SecurityDescriptorSddl' - if ($SecurityDescriptorSddl -and ($endPoint.SecurityDescriptorSddl -ne $SecurityDescriptorSddl)) - { - Write-Verbose ' SecurityDescriptorSddl MISMATCH' - return $false - } - Write-Verbose ' TODO: Check for Toolkits, StartupScript and UserAccount' - return $true - } - } - }catch - { - Write-Verbose " [JeaEndPoint] $Name Absent" - return ($Ensure -eq 'Absent') - }finally - { - write-Verbose "$((get-date).GetDateTimeFormats()[112]) Done Test [EndPoint]$Name" - } -} - - -Export-ModuleMember -Function *-TargetResource - - diff --git a/lib/puppet_x/dsc_resources/xJea/DSCResources/MSFT_xJeaEndpoint/MSFT_xJeaEndpoint.schema.mof b/lib/puppet_x/dsc_resources/xJea/DSCResources/MSFT_xJeaEndpoint/MSFT_xJeaEndpoint.schema.mof deleted file mode 100644 index 4e203223..00000000 --- a/lib/puppet_x/dsc_resources/xJea/DSCResources/MSFT_xJeaEndpoint/MSFT_xJeaEndpoint.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xJeaEndPoint")] -class MSFT_xJeaEndpoint : OMI_BaseResource -{ - [Key, Description("Name of the JEA toolkit to be generated")] String Name; - [Write, Description("List of Jea Toolkits to make available via this endpoint")] String Toolkit[]; - [Write, Description("Sddl to define who can access this JeaEndpoint")] String SecurityDescriptorSddl; - [Write, Description("List of local groups that this Endpoints JeaSessionAccount should be a member of")] String Group[]; - [Write, ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write] Boolean CleanAll; -}; - - diff --git a/lib/puppet_x/dsc_resources/xJea/DSCResources/MSFT_xJeaToolkit/MSFT_xJeaToolkit.psm1 b/lib/puppet_x/dsc_resources/xJea/DSCResources/MSFT_xJeaToolkit/MSFT_xJeaToolkit.psm1 deleted file mode 100644 index 7b28f008..00000000 --- a/lib/puppet_x/dsc_resources/xJea/DSCResources/MSFT_xJeaToolkit/MSFT_xJeaToolkit.psm1 +++ /dev/null @@ -1,161 +0,0 @@ -#requires -version 5 -# Copyright © 2014, Microsoft Corporation. All rights reserved. -#region HelperFunctions -Import-Module $PSScriptRoot\..\Library\Helper.psm1 -Import-Module $PSScriptRoot\..\Library\JeaDir.psm1 -Import-Module $PSScriptRoot\..\Library\JeaProxy.psm1 -# Internal function to throw terminating error with specified errroCategory, errorId and errorMessage - - - - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name - ) - - try - { - write-Verbose "$((get-date).GetDateTimeFormats()[112]) Start Get [Toolkit]$Name" - - $modulePath = (Join-Path (Join-Path (Get-JeaDir) 'Toolkit') "$($name)-ToolKit.psm1") - Write-Verbose "Importing [JeaToolKit]$modulePath" - Import-Module $modulePath -Force -DisableNameChecking -Verbose:0 - - $module = Microsoft.PowerShell.Core\Get-Module -Name "$name-Toolkit" - Write-Verbose "Module= $module " - $returnValue = @{ - Name = [System.String]"$name-Toolkit" - CommandSpecs = [String]$( - $csvPath = (Join-Path (Join-Path (Get-JeaDir) 'Toolkit') "$($name)-CommandSpecs.csv") - if (test-path $csvPath) - { - Microsoft.PowerShell.Management\get-content -Path $csvPath -Raw - } - ) - Applications = [System.String[]] $( - &$Module{$ExportedApplications} - ) - Ensure = [System.String]'Present' - - } - Microsoft.PowerShell.Core\remove-module "$Name-Toolkit" -Verbose:0 - $returnValue - }catch - { - write-Debug "ERROR: $($_|fl * -force|out-string)" - New-TerminatingError -errorId 'GetToolkitFailed' -errorMessage $_.Exception -errorCategory InvalidOperation - }finally - { - write-Verbose "$((get-date).GetDateTimeFormats()[112]) Done Get [JeaToolkit]$name" - } -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [String] - $CommandSpecs, - - [System.String[]] - $Applications, - - [System.String[]] - $ScriptDirectory, - - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present' - ) - - try - { - write-Verbose "$((get-date).GetDateTimeFormats()[112]) Start Set [Toolkit]$Name" - Assert-JeaDirectory - Export-JEAProxy -Name $name -CommandSpecs $CommandSpecs -Applications $Applications - } - catch - { - Write-Debug $($_ |fl * -force |Out-String) - New-TerminatingError -errorId 'JeaToolKitSet' -ErrorMessage $_.Exception -errorCategory OperationStopped - }finally - { - write-Verbose "$((get-date).GetDateTimeFormats()[112]) Done Set [Toolkit]$Name" - } - return $true -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [String] - $CommandSpecs, - - [System.String[]] - $Applications, - - [System.String[]] - $ScriptDirectory, - - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present' - ) - - try - { - write-Verbose "$((get-date).GetDateTimeFormats()[112]) Start Test [JeaToolkit]$name" - - $toolkit = Join-Path (Get-JeaToolKitDir) "$($Name)-ToolKit.psm1" - $CommandSpec = Join-Path (Get-JeaToolKitDir) "$($Name)-CommandSpecs.csv" - $Exists = ((Test-Path $Toolkit) -AND (Test-Path $CommandSpec)) - if ($Exists) { Write-Verbose " [JeaToolkit]$name Present"} - else { Write-Verbose " [JeaToolkit]$name Absent"} - - - if (($Ensure -eq 'Present' -and !$exists) -or - ($Ensure -eq 'Absent' -And $exists)) - { - return $false - } - if ($Ensure -eq 'Present' -and ($CommandSpecs.Trim() -ne (Get-Content $CommandSpec -Raw).Trim())) - { - return $false - } - return $true - }catch - { - write-Debug "ERROR: $($_|fl * -force|out-string)" - New-TerminatingError -errorId 'TestToolkitFailed' -errorMessage $_.Exception -errorCategory InvalidOperation - }finally - { - write-Verbose "$((get-date).GetDateTimeFormats()[112]) Done Test [JeaToolkit]$name" - } - -} #Test-TargetResource - - -Export-ModuleMember -Function *-TargetResource - - diff --git a/lib/puppet_x/dsc_resources/xJea/DSCResources/MSFT_xJeaToolkit/MSFT_xJeaToolkit.schema.mof b/lib/puppet_x/dsc_resources/xJea/DSCResources/MSFT_xJeaToolkit/MSFT_xJeaToolkit.schema.mof deleted file mode 100644 index bbdf883d..00000000 --- a/lib/puppet_x/dsc_resources/xJea/DSCResources/MSFT_xJeaToolkit/MSFT_xJeaToolkit.schema.mof +++ /dev/null @@ -1,12 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xJeaToolKit")] -class MSFT_xJeaToolkit : OMI_BaseResource -{ - [Key, Description("Name of the JEA toolkit to be generated")] String Name; - [Write, Description("CSV formated list of command specifications")] String CommandSpecs; - [Write, Description("array of script directories that can be run")] String ScriptDirectory[]; - [Write, Description("Array of executables that are allowed to run")] String Applications[]; - [Write, ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; - - diff --git a/lib/puppet_x/dsc_resources/xJea/LICENSE b/lib/puppet_x/dsc_resources/xJea/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xJea/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xJea/Util/Initialize-ToolKit.ps1 b/lib/puppet_x/dsc_resources/xJea/Util/Initialize-ToolKit.ps1 deleted file mode 100644 index 5c836c8f..00000000 --- a/lib/puppet_x/dsc_resources/xJea/Util/Initialize-ToolKit.ps1 +++ /dev/null @@ -1,174 +0,0 @@ -# Copyright © 2014, Microsoft Corporation. All rights reserved. -#InitializeToolKit -param( - [ValidateNotNullOrEmpty()] - $ToolkitName -) - -ipmo (Join-Path $env:ProgramFiles 'Jea\Util\SafeProxy.psm1') -DisableNameChecking -$winrm = Get-Service WinRM - -function Write-ActivityRecord -{ - $JeaDir = Join-Path $env:ProgramFiles 'Jea' - $JeaActivityDir = Join-Path $JeaDir 'Activity' - $Logfile = Join-Path $JeaActivityDir 'ActivityLog.csv' - - $WinRMInfo = winrm enum shell |Select-String "ProcessID = $pid" -Context 5,0 - $winRMID = (($WinRMInfo.Context.PreContext |Select-String 'ShellID = ').Line.trim() -split ' = ')[1] - $record = new-Object PSObject -Property @{ - host = hostname - Datetime = Get-Date; - PID = $PID; - RunSpaceID = $ExecutionContext.Host.Runspace.InstanceId.Guid; - Toolkit = ($ToolkitName -join ';'); - WinRMShellID = $WinRMID; - } - - - $record | Export-Csv $Logfile -Append -} - -#region Show Message Of The Day (MOTD) -function Show-Motd -{ - $motd = (Join-Path $env:ProgramFiles 'Jea\motd.txt') - if (Test-Path $motd) - { - Write-Host (Get-Content $motd -raw) - } - foreach ($t in $toolkitName) - { - $motd = (Join-Path $env:ProgramFiles "Jea\Motd\$t.txt") - if (Test-Path $motd) - { - Write-Host (Get-Content $motd -raw) - } - } -} -#endregion - -function Import-Toolkit -{ - param($ToolkitName) - - foreach ($t in $ToolkitName) - { - $path = (Join-Path $env:ProgramFiles "Jea\toolkit\$($t).psm1") - if (Test-Path $path) - { - Import-Module $path -Force -DisableNameChecking - } - else - { - Write-host -ForegroundColor "Import-Toolkit [ToolKit]$path NotFound" - } - } -} - -function Approve-Command -{ - param([string[]]$name) - - foreach ($n in $name) - { - $approvedCommand.$n = 1 - } -} - -function Approve-RemoteSessionCommand -{ - $iss = [System.Management.Automation.Runspaces.InitialSessionState]::CreateRestricted('RemoteServer') - foreach ($f in $iss.Commands.Where({$_.CommandType -eq 'Function'})) - { - Set-Content "function:\$($f.Name)" -Value $f.definition - Approve-Command $f.name - } -} - - -function Approve-ExportedApplication -{ - $apps = @() - foreach ($m in Get-Module) - { - foreach ($a in &$m{$ExportedApplications}) - { - if ($a) - { - $apps += $(Get-command $a).Definition - } - } - } - $ExecutionContext.SessionState.Applications.Clear() - foreach ($a in $apps) - { - $ExecutionContext.SessionState.Applications.Add($a) - } -} - -function Block-UnauthorizedCommands -{ - param( - ) - - Get-Command | % { - $cmd = $_ - if ($approvedCommand.$($cmd.Name) ) - { - # If a proxy for a command exists, we need to remove the name from the list - # so that we can hide the underlying command - $approvedCommand.Remove($($cmd.Name)) - } - else - { - $cmd.Visibility = 'Private' - } - - } - - #Certain commands are particularly dangerous so make sure that they are not exposed. - foreach ($c in 'Invoke-Expression','Import-module') - { - (Get-Command $c).Visibility = 'Private' - } -} - - -function Enable-CommandLogging -{ - param($Module) - - Get-Module $Module | % { $_.LogPipelineExecutionDetails = $true } -} - -$approvedCommand = @{} - -Write-ActivityRecord -Show-Motd -Import-Toolkit $ToolkitName -Enable-CommandLogging $ToolkitName -Approve-RemoteSessionCommand -Approve-Command -name ` - 'whoami', - 'Get-Alias', - 'Get-History', - 'Get-Member', - 'Get-Module', - 'Group-Object', - 'Format-Table', - 'Format-List', - 'Measure-Object', - 'New-Object', # This needs to be constrained - 'Select-Object', - 'Sort-Object', - 'Get-SerializedCommand', - 'Tabexpansion2', - 'Where-Object' -Approve-Command -name $((Get-Module $ToolkitName ).Exportedfunctions.Values.name) -Block-UnauthorizedCommands -Approve-ExportedApplication - -$ExecutionContext.SessionState.Scripts.Clear() -$global:PSModuleAutoloadingPreference = 'None' -$ExecutionContext.SessionState.LanguageMode='NoLanguage' diff --git a/lib/puppet_x/dsc_resources/xJea/Util/SafeProxy.psm1 b/lib/puppet_x/dsc_resources/xJea/Util/SafeProxy.psm1 deleted file mode 100644 index 7a11471e..00000000 --- a/lib/puppet_x/dsc_resources/xJea/Util/SafeProxy.psm1 +++ /dev/null @@ -1,658 +0,0 @@ -# Copyright © 2014, Microsoft Corporation. All rights reserved. - -<# -This Proxy for Sort-Object Does exactly 1 thing - it strongly types Property to STRING[] -which denudes it of the opportunity for exploits (can't take a scriptblock) -#> -function Sort-Object -{ -[CmdletBinding(HelpUri='http://go.microsoft.com/fwlink/?LinkID=113403', RemotingCapability='None')] -param( - [switch] - ${Descending}, - - [switch] - ${Unique}, - - [Parameter(ValueFromPipeline=$true)] - [psobject] - ${InputObject}, - - [Parameter(Position=0)] - [System.String[]] - ${Property}, - - [string] - ${Culture}, - - [switch] - ${CaseSensitive}) - - begin - { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) - { - $PSBoundParameters['OutBuffer'] = 1 - } - $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand('Sort-Object', [System.Management.Automation.CommandTypes]::Cmdlet) - $scriptCmd = {& $wrappedCmd @PSBoundParameters } - $steppablePipeline = $scriptCmd.GetSteppablePipeline($myInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - throw - } - } - - process - { - try { - $steppablePipeline.Process($_) - } catch { - throw - } - } - - end - { - try { - $steppablePipeline.End() - } catch { - throw - } - } -<# - -.ForwardHelpTargetName Sort-Object -.ForwardHelpCategory Cmdlet - -#> - -} - -function where-object -{ -[CmdletBinding(DefaultParameterSetName='EqualSet', HelpUri='http://go.microsoft.com/fwlink/?LinkID=113423', RemotingCapability='None')] -param( - [Parameter(ValueFromPipeline=$true)] - [psobject] - ${InputObject}, - - [Parameter(ParameterSetName='MatchSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='NotContainsSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='CaseSensitiveNotContainsSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='InSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='CaseSensitiveInSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='NotInSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='CaseSensitiveNotInSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='IsSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='LessOrEqualSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='CaseSensitiveLessOrEqualSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='GreaterOrEqualSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='CaseSensitiveMatchSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='NotMatchSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='CaseSensitiveGreaterOrEqualSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='NotLikeSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='CaseSensitiveContainsSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='LikeSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='CaseSensitiveNotMatchSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='ContainsSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='IsNotSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='CaseSensitiveLikeSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='CaseSensitiveNotLikeSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='EqualSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='CaseSensitiveEqualSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='NotEqualSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='CaseSensitiveNotEqualSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='GreaterThanSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='CaseSensitiveGreaterThanSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='LessThanSet', Mandatory=$true, Position=0)] - [Parameter(ParameterSetName='CaseSensitiveLessThanSet', Mandatory=$true, Position=0)] - [ValidateNotNullOrEmpty()] - [string] - ${Property}, - - [Parameter(ParameterSetName='CaseSensitiveLikeSet', Position=1)] - [Parameter(ParameterSetName='GreaterThanSet', Position=1)] - [Parameter(ParameterSetName='CaseSensitiveMatchSet', Position=1)] - [Parameter(ParameterSetName='NotInSet', Position=1)] - [Parameter(ParameterSetName='LikeSet', Position=1)] - [Parameter(ParameterSetName='CaseSensitiveGreaterThanSet', Position=1)] - [Parameter(ParameterSetName='CaseSensitiveNotInSet', Position=1)] - [Parameter(ParameterSetName='IsSet', Position=1)] - [Parameter(ParameterSetName='NotLikeSet', Position=1)] - [Parameter(ParameterSetName='IsNotSet', Position=1)] - [Parameter(ParameterSetName='LessOrEqualSet', Position=1)] - [Parameter(ParameterSetName='CaseSensitiveNotLikeSet', Position=1)] - [Parameter(ParameterSetName='MatchSet', Position=1)] - [Parameter(ParameterSetName='NotMatchSet', Position=1)] - [Parameter(ParameterSetName='CaseSensitiveNotMatchSet', Position=1)] - [Parameter(ParameterSetName='ContainsSet', Position=1)] - [Parameter(ParameterSetName='CaseSensitiveContainsSet', Position=1)] - [Parameter(ParameterSetName='NotContainsSet', Position=1)] - [Parameter(ParameterSetName='LessThanSet', Position=1)] - [Parameter(ParameterSetName='CaseSensitiveNotContainsSet', Position=1)] - [Parameter(ParameterSetName='CaseSensitiveLessThanSet', Position=1)] - [Parameter(ParameterSetName='InSet', Position=1)] - [Parameter(ParameterSetName='GreaterOrEqualSet', Position=1)] - [Parameter(ParameterSetName='EqualSet', Position=1)] - [Parameter(ParameterSetName='CaseSensitiveLessOrEqualSet', Position=1)] - [Parameter(ParameterSetName='CaseSensitiveEqualSet', Position=1)] - [Parameter(ParameterSetName='CaseSensitiveGreaterOrEqualSet', Position=1)] - [Parameter(ParameterSetName='NotEqualSet', Position=1)] - [Parameter(ParameterSetName='CaseSensitiveNotEqualSet', Position=1)] - [Parameter(ParameterSetName='CaseSensitiveInSet', Position=1)] - [System.Object] - ${Value}, - - [Parameter(ParameterSetName='EqualSet')] - [Alias('IEQ')] - [switch] - ${EQ}, - - [Parameter(ParameterSetName='CaseSensitiveEqualSet', Mandatory=$true)] - [switch] - ${CEQ}, - - [Parameter(ParameterSetName='NotEqualSet', Mandatory=$true)] - [Alias('INE')] - [switch] - ${NE}, - - [Parameter(ParameterSetName='CaseSensitiveNotEqualSet', Mandatory=$true)] - [switch] - ${CNE}, - - [Parameter(ParameterSetName='GreaterThanSet', Mandatory=$true)] - [Alias('IGT')] - [switch] - ${GT}, - - [Parameter(ParameterSetName='CaseSensitiveGreaterThanSet', Mandatory=$true)] - [switch] - ${CGT}, - - [Parameter(ParameterSetName='LessThanSet', Mandatory=$true)] - [Alias('ILT')] - [switch] - ${LT}, - - [Parameter(ParameterSetName='CaseSensitiveLessThanSet', Mandatory=$true)] - [switch] - ${CLT}, - - [Parameter(ParameterSetName='GreaterOrEqualSet', Mandatory=$true)] - [Alias('IGE')] - [switch] - ${GE}, - - [Parameter(ParameterSetName='CaseSensitiveGreaterOrEqualSet', Mandatory=$true)] - [switch] - ${CGE}, - - [Parameter(ParameterSetName='LessOrEqualSet', Mandatory=$true)] - [Alias('ILE')] - [switch] - ${LE}, - - [Parameter(ParameterSetName='CaseSensitiveLessOrEqualSet', Mandatory=$true)] - [switch] - ${CLE}, - - [Parameter(ParameterSetName='LikeSet', Mandatory=$true)] - [Alias('ILike')] - [switch] - ${Like}, - - [Parameter(ParameterSetName='CaseSensitiveLikeSet', Mandatory=$true)] - [switch] - ${CLike}, - - [Parameter(ParameterSetName='NotLikeSet', Mandatory=$true)] - [Alias('INotLike')] - [switch] - ${NotLike}, - - [Parameter(ParameterSetName='CaseSensitiveNotLikeSet', Mandatory=$true)] - [switch] - ${CNotLike}, - - [Parameter(ParameterSetName='MatchSet', Mandatory=$true)] - [Alias('IMatch')] - [switch] - ${Match}, - - [Parameter(ParameterSetName='CaseSensitiveMatchSet', Mandatory=$true)] - [switch] - ${CMatch}, - - [Parameter(ParameterSetName='NotMatchSet', Mandatory=$true)] - [Alias('INotMatch')] - [switch] - ${NotMatch}, - - [Parameter(ParameterSetName='CaseSensitiveNotMatchSet', Mandatory=$true)] - [switch] - ${CNotMatch}, - - [Parameter(ParameterSetName='ContainsSet', Mandatory=$true)] - [Alias('IContains')] - [switch] - ${Contains}, - - [Parameter(ParameterSetName='CaseSensitiveContainsSet', Mandatory=$true)] - [switch] - ${CContains}, - - [Parameter(ParameterSetName='NotContainsSet', Mandatory=$true)] - [Alias('INotContains')] - [switch] - ${NotContains}, - - [Parameter(ParameterSetName='CaseSensitiveNotContainsSet', Mandatory=$true)] - [switch] - ${CNotContains}, - - [Parameter(ParameterSetName='InSet', Mandatory=$true)] - [Alias('IIn')] - [switch] - ${In}, - - [Parameter(ParameterSetName='CaseSensitiveInSet', Mandatory=$true)] - [switch] - ${CIn}, - - [Parameter(ParameterSetName='NotInSet', Mandatory=$true)] - [Alias('INotIn')] - [switch] - ${NotIn}, - - [Parameter(ParameterSetName='CaseSensitiveNotInSet', Mandatory=$true)] - [switch] - ${CNotIn}, - - [Parameter(ParameterSetName='IsSet', Mandatory=$true)] - [switch] - ${Is}, - - [Parameter(ParameterSetName='IsNotSet', Mandatory=$true)] - [switch] - ${IsNot}) - - begin - { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) - { - $PSBoundParameters['OutBuffer'] = 1 - } - $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand('Where-Object', [System.Management.Automation.CommandTypes]::Cmdlet) - $scriptCmd = {& $wrappedCmd @PSBoundParameters } - $steppablePipeline = $scriptCmd.GetSteppablePipeline($myInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - throw - } - } - - process - { - try { - $steppablePipeline.Process($_) - } catch { - throw - } - } - - end - { - try { - $steppablePipeline.End() - } catch { - throw - } - } -<# - -.ForwardHelpTargetName Where-Object -.ForwardHelpCategory Cmdlet - -#> - -} - -function format-table -{ -[CmdletBinding(HelpUri='http://go.microsoft.com/fwlink/?LinkID=113303')] -param( - [switch] - ${AutoSize}, - - [switch] - ${HideTableHeaders}, - - [switch] - ${Wrap}, - - [Parameter(Position=0)] - [string[]] - ${Property}, - - [string[]] - ${GroupBy}, - - [string] - ${View}, - - [switch] - ${ShowError}, - - [switch] - ${DisplayError}, - - [switch] - ${Force}, - - [ValidateSet('CoreOnly','EnumOnly','Both')] - [string] - ${Expand}, - - [Parameter(ValueFromPipeline=$true)] - [psobject] - ${InputObject}) - - begin - { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) - { - $PSBoundParameters['OutBuffer'] = 1 - } - $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand('Format-Table', [System.Management.Automation.CommandTypes]::Cmdlet) - $scriptCmd = {& $wrappedCmd @PSBoundParameters } - $steppablePipeline = $scriptCmd.GetSteppablePipeline($myInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - throw - } - } - - process - { - try { - $steppablePipeline.Process($_) - } catch { - throw - } - } - - end - { - try { - $steppablePipeline.End() - } catch { - throw - } - } -<# - -.ForwardHelpTargetName Format-Table -.ForwardHelpCategory Cmdlet - -#> -} - -function format-list -{ -[CmdletBinding(HelpUri='http://go.microsoft.com/fwlink/?LinkID=113302')] -param( - [Parameter(Position=0)] - [string[]] - ${Property}, - - [string[]] - ${GroupBy}, - - [string] - ${View}, - - [switch] - ${ShowError}, - - [switch] - ${DisplayError}, - - [switch] - ${Force}, - - [ValidateSet('CoreOnly','EnumOnly','Both')] - [string] - ${Expand}, - - [Parameter(ValueFromPipeline=$true)] - [psobject] - ${InputObject}) - - begin - { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) - { - $PSBoundParameters['OutBuffer'] = 1 - } - $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand('Format-List', [System.Management.Automation.CommandTypes]::Cmdlet) - $scriptCmd = {& $wrappedCmd @PSBoundParameters } - $steppablePipeline = $scriptCmd.GetSteppablePipeline($myInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - throw - } - } - - process - { - try { - $steppablePipeline.Process($_) - } catch { - throw - } - } - - end - { - try { - $steppablePipeline.End() - } catch { - throw - } - } -<# - -.ForwardHelpTargetName Format-List -.ForwardHelpCategory Cmdlet - -#> - - -} - -function Group-Object -{ -[CmdletBinding(HelpUri='http://go.microsoft.com/fwlink/?LinkID=113338', RemotingCapability='None')] -param( - [switch] - ${NoElement}, - - [Parameter(ParameterSetName='HashTable')] - [Alias('AHT')] - [switch] - ${AsHashTable}, - - [Parameter(ParameterSetName='HashTable')] - [switch] - ${AsString}, - - [Parameter(ValueFromPipeline=$true)] - [psobject] - ${InputObject}, - - [Parameter(Position=0)] - [string[]] - ${Property}, - - [string] - ${Culture}, - - [switch] - ${CaseSensitive}) - - begin - { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) - { - $PSBoundParameters['OutBuffer'] = 1 - } - $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand('Group-Object', [System.Management.Automation.CommandTypes]::Cmdlet) - $scriptCmd = {& $wrappedCmd @PSBoundParameters } - $steppablePipeline = $scriptCmd.GetSteppablePipeline($myInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - throw - } - } - - process - { - try { - $steppablePipeline.Process($_) - } catch { - throw - } - } - - end - { - try { - $steppablePipeline.End() - } catch { - throw - } - } -<# - -.ForwardHelpTargetName Group-Object -.ForwardHelpCategory Cmdlet - -#> - - -} - -function Select-Object -{ -[CmdletBinding(DefaultParameterSetName='DefaultParameter', HelpUri='http://go.microsoft.com/fwlink/?LinkID=113387', RemotingCapability='None')] -param( - [Parameter(ValueFromPipeline=$true)] - [psobject] - ${InputObject}, - - [Parameter(ParameterSetName='SkipLastParameter', Position=0)] - [Parameter(ParameterSetName='DefaultParameter', Position=0)] - [string[]] - ${Property}, - - [Parameter(ParameterSetName='SkipLastParameter')] - [Parameter(ParameterSetName='DefaultParameter')] - [string[]] - ${ExcludeProperty}, - - [Parameter(ParameterSetName='DefaultParameter')] - [Parameter(ParameterSetName='SkipLastParameter')] - [string[]] - ${ExpandProperty}, - - [switch] - ${Unique}, - - [Parameter(ParameterSetName='DefaultParameter')] - [ValidateRange(0, 2147483647)] - [int] - ${Last}, - - [Parameter(ParameterSetName='DefaultParameter')] - [ValidateRange(0, 2147483647)] - [int] - ${First}, - - [Parameter(ParameterSetName='DefaultParameter')] - [ValidateRange(0, 2147483647)] - [int] - ${Skip}, - - [Parameter(ParameterSetName='SkipLastParameter')] - [ValidateRange(0, 2147483647)] - [int] - ${SkipLast}, - - [Parameter(ParameterSetName='IndexParameter')] - [Parameter(ParameterSetName='DefaultParameter')] - [switch] - ${Wait}, - - [Parameter(ParameterSetName='IndexParameter')] - [ValidateRange(0, 2147483647)] - [int[]] - ${Index}) - - begin - { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) - { - $PSBoundParameters['OutBuffer'] = 1 - } - $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand('Select-Object', [System.Management.Automation.CommandTypes]::Cmdlet) - $scriptCmd = {& $wrappedCmd @PSBoundParameters } - $steppablePipeline = $scriptCmd.GetSteppablePipeline($myInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - throw - } - } - - process - { - try { - $steppablePipeline.Process($_) - } catch { - throw - } - } - - end - { - try { - $steppablePipeline.End() - } catch { - throw - } - } -<# - -.ForwardHelpTargetName Select-Object -.ForwardHelpCategory Cmdlet - -#> -} -Export-ModuleMember Where-Object,Sort-Object,format-table,format-list, group-object, Select-object - - - - diff --git a/lib/puppet_x/dsc_resources/xJea/xJea.psd1 b/lib/puppet_x/dsc_resources/xJea/xJea.psd1 deleted file mode 100644 index 325eacc3..00000000 --- a/lib/puppet_x/dsc_resources/xJea/xJea.psd1 +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright © 2014, Microsoft Corporation. All rights reserved. -@{ -# Version number of this module. -ModuleVersion = '0.3.0.0' - -# ID used to uniquely identify this module -GUID = '1088cfb5-36e8-4e9f-b7e4-d49e8032dde6' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module with DSC Resources for Just Enough Admin (JEA). Jea makes it simple to create custom RBAC solutions using PowerShell.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -NestedModules = ".\xjea.psm1" - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xJea/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xJea' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - # ReleaseNotes = '' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - diff --git a/lib/puppet_x/dsc_resources/xJea/xjea.psm1 b/lib/puppet_x/dsc_resources/xJea/xjea.psm1 deleted file mode 100644 index 06786bcd..00000000 --- a/lib/puppet_x/dsc_resources/xJea/xjea.psm1 +++ /dev/null @@ -1,29 +0,0 @@ -function Show-JeaPresentation -{ - $path = Join-Path $PSScriptRoot 'docs\jea.pptx' - Invoke-item $path -} - -function show-JeaWhitePaper -{ - $path = Join-Path $PSScriptRoot 'docs\Just Enough Administration.docx' - Invoke-item $path -} - -function Show-JeaExamples -{ - $path = Join-Path $PSScriptRoot 'Examples\*' - if ($Host.Name -eq 'Windows PowerShell ISE Host') - { - psedit $path - } - else - { - $files = @() - foreach ($f in dir $path) - { - $files += "$($f.FullName)" - } - PowerShell_ise -file $($files -join ",") - } -} diff --git a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlDatabase/MSFT_xMySqlDatabase.psm1 b/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlDatabase/MSFT_xMySqlDatabase.psm1 deleted file mode 100644 index bfbde59b..00000000 --- a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlDatabase/MSFT_xMySqlDatabase.psm1 +++ /dev/null @@ -1,126 +0,0 @@ -# NOTE: LocalizedData isn't used in this resource as there are no interactive/user visible strings - -$ErrorPath = Join-Path -Path "$env:Temp" -ChildPath "MySQLErrors.txt" - -function Get-TargetResource -{ - [OutputType([Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $DatabaseName, - - [parameter(Mandatory = $true)] - [pscredential] $RootCredential, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $MySqlVersion - ) - - if (Test-Path $ErrorPath) - { - Remove-Item -Path $ErrorPath - } - - $arguments = "--execute=SELECT IF(EXISTS (SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = '$DatabaseName'), 'Yes','No')", ` - "--user=root", "--password=$($RootCredential.GetNetworkCredential().Password)", "--port=$(Get-MySqlPort -MySqlVersion $MySqlVersion)", "--silent" - $result = Invoke-MySqlCommand -CommandPath $(Get-MySqlExe -MySqlVersion $MySqlVersion) -Arguments $arguments 2>$ErrorPath - - Read-ErrorFile -ErrorFilePath $ErrorPath - - if ($result -eq "Yes") - { - $Ensure = "Present" - } - else - { - $Ensure = "Absent" - } - - return @{ - Ensure = $Ensure - DatabaseName = $DatabaseName - } -} - -function Set-TargetResource -{ - param - ( - [ValidateSet("Present", "Absent")] - [string] $Ensure = "Present", - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $DatabaseName, - - [parameter(Mandatory = $true)] - [pscredential] $RootCredential, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $MySqlVersion -) - - if (Test-Path $ErrorPath) - { - Remove-Item -Path $ErrorPath - } - - if($Ensure -eq "Present") - { - Write-Verbose "Creating Database $DatabaseName..." - $arguments = "--execute=CREATE DATABASE $DatabaseName", "--user=root", "--password=$($RootCredential.GetNetworkCredential().Password)", ` - "--port=$(Get-MySqlPort -MySqlVersion $MySqlVersion)", "--silent" - $null = Invoke-MySqlCommand -CommandPath $(Get-MySqlExe -MySqlVersion $MySqlVersion) -Arguments $arguments 2>$ErrorPath - } - else - { - Write-Verbose "Dropping Database $DatabaseName..." - $arguments = "--execute=DROP DATABASE $DatabaseName", "--user=root", "--password=$($RootCredential.GetNetworkCredential().Password)", ` - "--port=$(Get-MySqlPort -MySqlVersion $MySqlVersion)", "--silent" - $null = Invoke-MySqlCommand -CommandPath $(Get-MySqlExe -MySqlVersion $MySqlVersion) -Arguments $arguments 2>$ErrorPath - } - - Read-ErrorFile -ErrorFilePath $ErrorPath -} - -function Test-TargetResource -{ - [OutputType([Boolean])] - [CmdletBinding(SupportsShouldProcess=$true)] - param - ( - [ValidateSet("Present", "Absent")] - [string] $Ensure = "Present", - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $DatabaseName, - - [parameter(Mandatory = $true)] - [pscredential] $RootCredential, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $MySqlVersion - ) - - Write-Verbose "Ensure is $Ensure" - - $status = Get-TargetResource -DatabaseName $DatabaseName -RootCredential $RootCredential -MySqlVersion $MySqlVersion - - if($status['Ensure'] -eq $Ensure) - { - return $true - } - else - { - return $false - } -} - -Export-ModuleMember -function Get-TargetResource, Set-TargetResource, Test-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlDatabase/MSFT_xMySqlDatabase.schema.mof b/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlDatabase/MSFT_xMySqlDatabase.schema.mof deleted file mode 100644 index 2e20434f..00000000 --- a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlDatabase/MSFT_xMySqlDatabase.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0"),FriendlyName("xMySqlDatabase")] -class MSFT_xMySqlDatabase : OMI_BaseResource -{ - [Key, Description("Name of the database.")] String DatabaseName; - [Write, Description("Should the database be present or absent."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("The root credential that is used to install MySql server."), EmbeddedInstance("MSFT_Credential")] String RootCredential; - [Required, Description("MYSql Version Number")] String MySqlVersion; -}; - - diff --git a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlDatabase/xMySqlDatabaseDesigner.ps1 b/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlDatabase/xMySqlDatabaseDesigner.ps1 deleted file mode 100644 index 6f4a4821..00000000 --- a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlDatabase/xMySqlDatabaseDesigner.ps1 +++ /dev/null @@ -1,26 +0,0 @@ -# a Powershell script to create MySqlDatabase resource using xDSCResourceDesigner tool -$friendlyName = "xMySqlDatabase" -$resourceName = "MSFT_$friendlyName" -$classVersion = "1.0.0" - -$scriptRoot = Split-Path $MyInvocation.MyCommand.Path -$originalModuleRoot = join-Path $scriptroot "..\.." -$originalModuleRootPath = Resolve-Path $originalModuleRoot -$moduleRoot = Join-Path $env:temp "$($originalModuleRootPath.path | split-path -Leaf)Temp" - -$resources = @() -$schemaPath = (join-path $scriptRoot "$resourceName.schema.mof") - -#Key properties -$resources += New-xDscResourceProperty -Name Name -Type String -Attribute Key -Description "Name of the database." - -#Write properties -$resources += New-xDscResourceProperty -Name Ensure -Type String -Attribute Write -Description "Should the database be present or absent." -ValidateSet @("Present","Absent") -$resources += New-xDscResourceProperty -Name ConnectionCredential -Type PSCredential -Attribute Write -Description "The user credential that is used to install MySql server." - - -Resource is being created... - - -# Create a New template resource to a temporary folder -New-xDscResource -Property $resources -ClassVersion $classVersion -Name $resourceName -Path $moduleRoot -FriendlyName $friendlyName diff --git a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlGrant/MSFT_xMySqlGrant.psm1 b/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlGrant/MSFT_xMySqlGrant.psm1 deleted file mode 100644 index 22c77832..00000000 --- a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlGrant/MSFT_xMySqlGrant.psm1 +++ /dev/null @@ -1,182 +0,0 @@ -# This module only supports a subset of the possible database privileges -# A global variable that contains localized messages of MySqlGrant. -data LocalizedData -{ -# culture="en-US" -ConvertFrom-StringData @' -GrantCreated=Grant {0} for user {1} created successfully. -GrantRemoved=Grant {0} for user {1} removed successfully. -InvalidUserName=The name {0} does not exist. -InvalidPermissionType=The permission type {0} cannot be used. -GrantExists=A user with the name {0} exists. -GrantDoesNotExist=A user with the name {0} does not exist. -'@ -} - -Import-LocalizedData LocalizedData -FileName MSFT_xMySqlGrant.strings.psd1 - -$ErrorPath = Join-Path -Path "$env:Temp" -ChildPath "MySQLErrors.txt" - -function Get-TargetResource -{ - [OutputType([Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $UserName, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $DatabaseName, - - [parameter(Mandatory = $true)] - [pscredential] $RootCredential, - - [parameter(Mandatory = $true)] - [ValidateSet("ALL PRIVILEGES", "CREATE", "DROP", "DELETE", "INSERT", "SELECT", "UPDATE", "EXECUTE")] - [ValidateNotNullOrEmpty()] - [string] $PermissionType, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $MySqlVersion - ) - - if (Test-Path $ErrorPath) - { - Remove-Item -Path $ErrorPath - } - - $arguments = "--execute=SHOW GRANTS FOR '$UserName'@localhost", "--user=root", "--password=$($RootCredential.GetNetworkCredential().Password)", ` - "--port=$(Get-MySqlPort -MySqlVersion $MySqlVersion)", "--silent" - $results = Invoke-MySqlCommand -CommandPath $(Get-MySqlExe -MySqlVersion $MySqlVersion) -Arguments $arguments 2>$ErrorPath - - Read-ErrorFile -ErrorFilePath $ErrorPath - - $ensureResult = "Absent" - - ForEach ($result in $results) - { - if ($result -match $DatabaseName) - { - if (($result -match $PermissionType) -or ($result -match "ALL PRIVILEGES")) - { - $ensureResult = "Present" - break - } - } - } - - return @{ - UserName = $UserName - DatabaseName = $DatabaseName - Ensure = $ensureResult - PermissionType = $PermissionType - } -} - -function Set-TargetResource -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $UserName, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $DatabaseName, - - [ValidateSet("Present", "Absent")] - [string] $Ensure = "Present", - - [parameter(Mandatory = $true)] - [pscredential] $RootCredential, - - [parameter(Mandatory = $true)] - [ValidateSet("ALL PRIVILEGES", "CREATE", "DROP", "DELETE", "INSERT", "SELECT", "UPDATE", "EXECUTE")] - [ValidateNotNullOrEmpty()] - [string] $PermissionType, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $MySqlVersion - ) - - if (Test-Path $ErrorPath) - { - Remove-Item -Path $ErrorPath - } - - if($Ensure -eq "Present") - { - Write-Verbose "Granting $PermissionType on $DatabaseName to $UserName..." - - $arguments = "--execute=GRANT $PermissionType ON $DatabaseName.* TO '$UserName'@localhost", "--user=root", ` - "--password=$($RootCredential.GetNetworkCredential().Password)", "--port=$(Get-MySqlPort -MySqlVersion $MySqlVersion)", "--silent" - $null = Invoke-MySqlCommand -CommandPath $(Get-MySqlExe -MySqlVersion $MySqlVersion) -Arguments $arguments 2>$ErrorPath - - $msg = $($LocalizedData.GrantCreated) -f $PermissionType, $UserName - } - else - { - Write-Verbose "Revoking $PermissionType on $DatabaseName to $UserName..." - - $arguments = "--execute=REVOKE $PermissionType ON $DatabaseName.* FROM '$UserName'@localhost", "--user=root", ` - "--password=$($RootCredential.GetNetworkCredential().Password)", "--port=$(Get-MySqlPort -MySqlVersion $MySqlVersion)", "--silent" - $null = Invoke-MySqlCommand -CommandPath $(Get-MySqlExe -MySqlVersion $MySqlVersion) -Arguments $arguments 2>$ErrorPath - - $msg = $($LocalizedData.GrantRemoved) -f $PermissionType, $UserName - } - - Read-ErrorFile -ErrorFilePath $ErrorPath - - Write-Verbose -Message $msg -} - -function Test-TargetResource -{ - [OutputType([Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $UserName, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $DatabaseName, - - [ValidateSet("Present", "Absent")] - [string] $Ensure = "Present", - - [parameter(Mandatory = $true)] - [pscredential] $RootCredential, - - [parameter(Mandatory = $true)] - [ValidateSet("ALL PRIVILEGES", "CREATE", "DROP", "DELETE", "INSERT", "SELECT", "UPDATE", "EXECUTE")] - [ValidateNotNullOrEmpty()] - [string] $PermissionType, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $MySqlVersion - ) - - Write-Verbose "Ensure is $Ensure" - - $status = Get-TargetResource -UserName $UserName -DatabaseName $DatabaseName -RootCredential $RootCredential -PermissionType $PermissionType -MySqlVersion $MySqlVersion - - if($status['Ensure'] -eq $Ensure) - { - return $true - } - else - { - return $false - } -} - -Export-ModuleMember -function Get-TargetResource, Set-TargetResource, Test-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlGrant/MSFT_xMySqlGrant.schema.mof b/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlGrant/MSFT_xMySqlGrant.schema.mof deleted file mode 100644 index b978693f..00000000 --- a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlGrant/MSFT_xMySqlGrant.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ - -[ClassVersion("1.0.0"),FriendlyName("xMySqlGrant")] -class MSFT_xMySqlGrant : OMI_BaseResource -{ - [Key, Description("Name of MySQL user.")] String UserName; - [Key, Description("MySql database name to grant permissions.")] String DatabaseName; - [Required, Description("MySql connection credential used for the root."), EmbeddedInstance("MSFT_Credential")] String RootCredential; - [Key, Description("MySql user permission type."), ValueMap{"ALL PRIVILEGES", "CREATE", "DROP", "DELETE", "INSERT", "SELECT", "UPDATE", "EXECUTE"}, Values{"ALL PRIVILEGES", "CREATE", "DROP", "DELETE", "INSERT", "SELECT", "UPDATE", "EXECUTE"}] String PermissionType; - [Write, Description("Ensure given grant to mySql database present or absent."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("MYSql Version Number")] String MySqlVersion; -}; - - diff --git a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlGrant/en-US/MSFT_xMySqlGrant.strings.psd1 b/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlGrant/en-US/MSFT_xMySqlGrant.strings.psd1 deleted file mode 100644 index 22a13c76..00000000 --- a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlGrant/en-US/MSFT_xMySqlGrant.strings.psd1 +++ /dev/null @@ -1,15 +0,0 @@ -# Localized resources for MSFT_xMySqlGrant - -ConvertFrom-StringData @' -###PSLOC -GrantCreated=Grant {0} for user {1} created successfully. -GrantRemoved=Grant {0} for user {1} removed successfully. -InvalidUserName=The name {0} cannot be used. Names may not consist entirely of periods and/or spaces, or contain these characters: {1} -InvalidPermissionType=The permission type {0} cannot be used. -GrantExists=A user with the name {0} exists. -GrantDoesNotExist=A user with the name {0} does not exist -###PSLOC - -'@ - - diff --git a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlGrant/xMySqlGrantDesigner.ps1 b/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlGrant/xMySqlGrantDesigner.ps1 deleted file mode 100644 index bc262b41..00000000 --- a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlGrant/xMySqlGrantDesigner.ps1 +++ /dev/null @@ -1,27 +0,0 @@ -# a Powershell script to create MySqlDatabase resource using xDSCResourceDesigner tool -$friendlyName = "xMySqlGrant" -$resourceName = "MSFT_$friendlyName" -$classVersion = "1.0.0" - -$scriptRoot = Split-Path $MyInvocation.MyCommand.Path -$originalModuleRoot = join-Path $scriptroot "..\.." -$originalModuleRootPath = Resolve-Path $originalModuleRoot -$moduleRoot = Join-Path $env:temp "$($originalModuleRootPath.path | split-path -Leaf)Temp" - -$resources = @() -$schemaPath = (join-path $scriptRoot "$resourceName.schema.mof") - -#Key properties -$resources += New-xDscResourceProperty -Name UserName -Type String -Attribute Key -Description "Name of MySQL user." -$resources += New-xDscResourceProperty -Name DatabaseName -Type String -Attribute Key -Description "MySql database name to grant permissions." - -#Write properties -$resources += New-xDscResourceProperty -Name ConnectionCredential -Type PSCredential -Attribute Write -Description "MySql connection credential used for the root." -$resources += New-xDscResourceProperty -Name PermissionType -Type String -Attribute Write -Description "Ensure given grant to mySql database present or absent." -ValidateSet @("ALL PRIVILEGES", "CREATE", "DROP", "DELETE", "INSERT", "SELECT", "UPDATE", "EXECUTE") -$resources += New-xDscResourceProperty -Name Ensure -Type String -Attribute Write -Description "Ensure given grant to mySql database present or absent." -ValidateSet @("Present","Absent") - - -Write-Host Resource is being created... - -# Create a New template resource to a temporary folder -New-xDscResource -Property $resources -ClassVersion $classVersion -Name $resourceName -Path $moduleRoot -FriendlyName $friendlyName diff --git a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlServer/MSFT_xMySqlServer.psm1 b/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlServer/MSFT_xMySqlServer.psm1 deleted file mode 100644 index 56a9285d..00000000 --- a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlServer/MSFT_xMySqlServer.psm1 +++ /dev/null @@ -1,112 +0,0 @@ -# NOTE: LocalizedData isn't used in this resource as there are no interactive/user visible strings - -function Get-TargetResource -{ - [OutputType([Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $MySqlVersion, - - [parameter(Mandatory = $true)] - [pscredential] $RootPassword - ) - - $MySqlInstalled = (Get-MySqlVersionInstalled -MySqlVersion $MySqlVersion) - - if ($MySqlInstalled) - { - $ensureResult = "Present" - $portResult = (Get-MySqlPort -MySqlVersion $MySqlVersion) - } - else - { - $ensureResult = "Absent" - $portResult = $null - } - - return @{ - Ensure = $ensureResult - MySqlVersion = $MySqlVersion - Port = $portResult - } -} - -function Set-TargetResource -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $MySqlVersion, - - [ValidateSet("Present", "Absent")] - [string] $Ensure = "Present", - - [parameter(Mandatory = $true)] - [pscredential] $RootPassword, - - [string] $Port = "3306" - - ) - - if ($Ensure -eq "Present") - { - $versionsInstalled = Get-MySqlAllInstalled - - if ($versionsInstalled -eq $null) - { - Write-Verbose "Installing MySQL..." - $arguments = "community", "install", ` - "server;$MySqlVersion;$(Get-ArchitectureName):*:servertype=Server;port=$Port;passwd=$($RootPassword.GetNetworkCredential().Password)", "-silent" - $null = Invoke-MySqlCommand -CommandPath $(Get-MySqlInstallerConsole) -Arguments $arguments - } - else - { - Write-Verbose "Updating/Upgrading is not currently implemented" - } - } - else - { - Write-Verbose "Uninstall is not currently implemented" - } - -} - -function Test-TargetResource -{ - [OutputType([Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $MySqlVersion, - - [ValidateSet("Present", "Absent")] - [string] $Ensure = "Present", - - [parameter(Mandatory = $true)] - [pscredential] $RootPassword, - - [string] $Port = "3306" - - ) - - Write-Verbose "Ensure is $Ensure" - - $status = Get-TargetResource -MySqlVersion $MySqlVersion -RootPassword $RootPassword - - # don't yet check if the root password matches - if(($status['Ensure'] -eq $Ensure) -and ($status['Port'] -eq $Port)) - { - return $true - } - else - { - return $false - } -} - -Export-ModuleMember -function Get-TargetResource, Set-TargetResource, Test-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlServer/MSFT_xMySqlServer.schema.mof b/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlServer/MSFT_xMySqlServer.schema.mof deleted file mode 100644 index 8a99d9e0..00000000 --- a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlServer/MSFT_xMySqlServer.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ - -[ClassVersion("1.0.0"),FriendlyName("xMySqlServer")] -class MSFT_xMySqlServer : OMI_BaseResource -{ - [Key, Description("mySql Version Number")] String MySqlVersion; - [Write, ValueMap{"Present", "Absent"},Values{"Present", "Absent"}, Description("Ensure server is present or absent")] String Ensure; - [Required, EmbeddedInstance("MSFT_Credential"), Description("The root credential that is used to install mySql server.")] String RootPassword; - [Write, Description("The port number for the service")] String Port; -}; - - diff --git a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlUser/MSFT_xMySqlUser.psm1 b/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlUser/MSFT_xMySqlUser.psm1 deleted file mode 100644 index 09cc6a4c..00000000 --- a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlUser/MSFT_xMySqlUser.psm1 +++ /dev/null @@ -1,154 +0,0 @@ -# A global variable that contains localized messages of MySqlUser. -data LocalizedData -{ -# culture="en-US" -ConvertFrom-StringData @' -UserCreated=User {0} created successfully. -UserRemoved=User {0} removed successfully. -UserExists=A user with the name {0} exists. -UserDoesNotExist=A user with the name {0} does not exist. -'@ -} - -Import-LocalizedData LocalizedData -FileName MSFT_xMySqlUser.strings.psd1 - -$ErrorPath = Join-Path -Path "$env:Temp" -ChildPath "MySQLErrors.txt" - -function Get-TargetResource -{ - [OutputType([Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $UserName, - - [parameter(Mandatory = $true)] - [pscredential] $UserCredential, - - [parameter(Mandatory = $true)] - [pscredential] $RootCredential, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $MySqlVersion - ) - - if (Test-Path $ErrorPath) - { - Remove-Item -Path $ErrorPath - } - - $arguments = "--execute=SELECT IF(EXISTS (SELECT USER FROM MYSQL.USER WHERE USER = '$UserName' AND HOST = 'localhost'), 'Yes','No')", "--user=root", ` - "--password=$($RootCredential.GetNetworkCredential().Password)", "--port=$(Get-MySqlPort -MySqlVersion $MySqlVersion)", "--silent" - $result = Invoke-MySqlCommand -CommandPath $(Get-MySqlExe -MySqlVersion $MySqlVersion) -Arguments $arguments 2>$ErrorPath - - Read-ErrorFile -ErrorFilePath $ErrorPath - - if($result -ieq "Yes") - { - $msg = $($LocalizedData.UserExists) -f "$UserName" - Write-Verbose -Message $msg - $ensureResult = "Present" - } - else - { - $msg = $($LocalizedData.UserDoesNotExist) -f "$UserName" - Write-Verbose -Message $msg - $ensureResult = "Absent" - } - - return @{ - UserName = $UserName - Ensure = $ensureResult - } -} - -function Set-TargetResource -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $UserName, - - [ValidateSet("Present", "Absent")] - [string] $Ensure = "Present", - - [parameter(Mandatory = $true)] - [pscredential] $UserCredential, - - [parameter(Mandatory = $true)] - [pscredential] $RootCredential, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $MySqlVersion - ) - - if (Test-Path $ErrorPath) - { - Remove-Item -Path $ErrorPath - } - - if($Ensure -eq "Present") - { - Write-Verbose -Message "Adding user $UserName..." - $arguments = "--execute=CREATE USER '$UserName'@'localhost' IDENTIFIED BY '$($UserCredential.GetNetworkCredential().Password)'", "--user=root", ` - "--password=$($RootCredential.GetNetworkCredential().Password)", "--port=$(Get-MySqlPort -MySqlVersion $MySqlVersion)", "--silent" - $null = Invoke-MySqlCommand -CommandPath $(Get-MySqlExe -MySqlVersion $MySqlVersion) -Arguments $arguments 2>$ErrorPath - $msg = $($LocalizedData.UserCreated) -f "$UserName" - Write-Verbose -Message $msg - } - else - { - Write-Verbose "Dropping user $UserName..." - $arguments = "--execute=DROP USER '$UserName'@'localhost'", "--user=root", "--password=$($RootCredential.GetNetworkCredential().Password)", ` - "--port=$(Get-MySqlPort -MySqlVersion $MySqlVersion)", "--silent" - $null = Invoke-MySqlCommand -CommandPath $(Get-MySqlExe -MySqlVersion $MySqlVersion) -Arguments $arguments 2>$ErrorPath - $msg = $($LocalizedData.UserRemoved) -f "$UserName" - Write-Verbose -Message $msg - } - - Read-ErrorFile -ErrorFilePath $ErrorPath -} - -function Test-TargetResource -{ - [OutputType([Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $UserName, - - [ValidateSet("Present", "Absent")] - [string] $Ensure = "Present", - - [parameter(Mandatory = $true)] - [pscredential] $UserCredential, - - [parameter(Mandatory = $true)] - [pscredential] $RootCredential, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $MySqlVersion - ) - - Write-Verbose "Ensure is $Ensure" - - $status = Get-TargetResource -UserName $UserName -UserCredential $UserCredential -RootCredential $RootCredential -MySqlVersion $MySqlVersion - - if($status.Ensure -eq $Ensure) - { - return $true - } - else - { - return $false - } -} - -Export-ModuleMember -function Get-TargetResource, Set-TargetResource, Test-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlUser/MSFT_xMySqlUser.schema.mof b/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlUser/MSFT_xMySqlUser.schema.mof deleted file mode 100644 index 5423b400..00000000 --- a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlUser/MSFT_xMySqlUser.schema.mof +++ /dev/null @@ -1,12 +0,0 @@ - -[ClassVersion("1.0.0"),FriendlyName("xMySqlUser")] -class MSFT_xMySqlUser : OMI_BaseResource -{ - [Key, Description("Name of MySQL user to create or remove.")] String UserName; - [Required, Description("Credential for MySQL user."), EmbeddedInstance("MSFT_Credential")] String UserCredential; - [Required, Description("MySQL root credential used to create a user."), EmbeddedInstance("MSFT_Credential")] String RootCredential; - [Write, Description("Ensure MySQL user is present or absent."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("MySQL Version Number")] String MySqlVersion; -}; - - diff --git a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlUser/en-US/MSFT_xMySqlUser.strings.psd1 b/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlUser/en-US/MSFT_xMySqlUser.strings.psd1 deleted file mode 100644 index 79782f3b..00000000 --- a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlUser/en-US/MSFT_xMySqlUser.strings.psd1 +++ /dev/null @@ -1,14 +0,0 @@ -# Localized resources for MSFT_xMySqlUser - -ConvertFrom-StringData @' -###PSLOC -UserCreated=User {0} created successfully. -UserRemoved=User {0} removed successfully. -InvalidUserName=The name {0} cannot be used. Names may not consist entirely of periods and/or spaces, or contain these characters: {1} -UserExists=A user with the name {0} exists. -UserDoesNotExist=A user with the name {0} does not exist. -###PSLOC - -'@ - - diff --git a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlUser/xMySqlUserDesigner.ps1 b/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlUser/xMySqlUserDesigner.ps1 deleted file mode 100644 index 4bf7b34e..00000000 --- a/lib/puppet_x/dsc_resources/xMySql/DscResources/MSFT_xMySqlUser/xMySqlUserDesigner.ps1 +++ /dev/null @@ -1,26 +0,0 @@ -# a Powershell script to create MySqlDatabase resource using xDSCResourceDesigner tool -$friendlyName = "xMySqlGrant" -$resourceName = "MSFT_$friendlyName" -$classVersion = "1.0.0" - -$scriptRoot = Split-Path $MyInvocation.MyCommand.Path -$originalModuleRoot = join-Path $scriptroot "..\.." -$originalModuleRootPath = Resolve-Path $originalModuleRoot -$moduleRoot = Join-Path $env:temp "$($originalModuleRootPath.path | split-path -Leaf)Temp" - -$resources = @() -$schemaPath = (join-path $scriptRoot "$resourceName.schema.mof") - -#Key properties -$resources += New-xDscResourceProperty -Name Name -Type String -Attribute Key -Description "Name of MySQL user to create or remove." - -#Write properties -$resources += New-xDscResourceProperty -Name Credential -Type PSCredential -Attribute Write -Description "Credential for MySql user." -$resources += New-xDscResourceProperty -Name ConnectionCredential -Type PSCredential -Attribute Write -Description "MySql connection credential used to create a user." -$resources += New-xDscResourceProperty -Name Ensure -Type String -Attribute Write -Description "Ensure mysql user is present or absent." -ValidateSet @("Present","Absent") - - -Write-Host Resource is being created... - -# Create a New template resource to a temporary folder -New-xDscResource -Property $resources -ClassVersion $classVersion -Name $resourceName -Path $moduleRoot -FriendlyName $friendlyName diff --git a/lib/puppet_x/dsc_resources/xMySql/DscResources/xMySqlProvision/xMySqlProvision.Schema.psm1 b/lib/puppet_x/dsc_resources/xMySql/DscResources/xMySqlProvision/xMySqlProvision.Schema.psm1 deleted file mode 100644 index a9fe2644..00000000 --- a/lib/puppet_x/dsc_resources/xMySql/DscResources/xMySqlProvision/xMySqlProvision.Schema.psm1 +++ /dev/null @@ -1,89 +0,0 @@ -# Composite configuration to provision MySql -configuration xMySqlProvision -{ - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $DownloadUri, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] $MySQLVersion, - - [Parameter(Mandatory = $true)] - [PSCredential] $RootCredential, - - [String] $Port, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] $DatabaseName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] $UserName, - - [Parameter(Mandatory = $true)] - [PSCredential] $UserCredential, - - [parameter(Mandatory = $true)] - [ValidateSet("ALL PRIVILEGES", "CREATE", "DROP", "DELETE", "INSERT", "SELECT", "UPDATE", "EXECUTE")] - [ValidateNotNullOrEmpty()] - [string[]] $PermissionType - ) - - # Make sure the MySQL Installer Console is installed - Package mySqlInstaller - { - Ensure = "Present" - Path = $DownloadURI - ProductId = "{5848D524-F8CF-4A46-A3E4-B9BDB979A0FE}" - Name = "MySQL Installer - Community" - } - - # Make sure MySQL is installed with the correct port and root credential - xMySqlServer mySqlServer - { - Ensure = "Present" - MySQLVersion = $MySQLVersion - RootPassword = $RootCredential - Port = $Port - DependsOn = "[Package]mySqlInstaller" - } - - # Make sure the MySQL database exists - xMySqlDatabase mySqlDatabase - { - Ensure = "Present" - DatabaseName = $DatabaseName - RootCredential = $RootCredential - MySQLVersion = $MySQLVersion - DependsOn = "[xMySqlServer]mySqlServer" - } - - # Make sure the MySQL user exists - xMySqlUser mySqlUser - { - Ensure = "Present" - UserName = $UserName - UserCredential = $UserCredential - RootCredential = $RootCredential - MySQLVersion = $MySQLVersion - DependsOn = "[xMySqlDatabase]mySqlDatabase" - } - - # Make sure the MySQL user has access to the MySQL database - xMySqlGrant mySqlGrant - { - Ensure = "Present" - UserName = $UserName - DatabaseName = $DatabaseName - RootCredential = $RootCredential - PermissionType = $PermissionType - MySQLVersion = $MySQLVersion - DependsOn = "[xMySqlUser]mySqlUser" - } -} - - diff --git a/lib/puppet_x/dsc_resources/xMySql/DscResources/xMySqlProvision/xMySqlProvision.psd1 b/lib/puppet_x/dsc_resources/xMySql/DscResources/xMySqlProvision/xMySqlProvision.psd1 deleted file mode 100644 index 53de53f5..00000000 --- a/lib/puppet_x/dsc_resources/xMySql/DscResources/xMySqlProvision/xMySqlProvision.psd1 +++ /dev/null @@ -1,97 +0,0 @@ -# -# Module manifest for module 'xMySqlProvision' -# -# -# Generated on: 6/23/2014 -# - -@{ - -# Script module or binary module file associated with this manifest. -RootModule = 'xMySqlProvision.Schema.psm1' - -# Version number of this module. -ModuleVersion = '1.0' - -# ID used to uniquely identify this module -GUID = '95207390-a91f-484d-9a51-3bbffb1149a6' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -# Description = '' - -# Minimum version of the Windows PowerShell engine required by this module -# PowerShellVersion = '' - -# Name of the Windows PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the Windows PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module -# DotNetFrameworkVersion = '' - -# Minimum version of the common language runtime (CLR) required by this module -# CLRVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -# RequiredModules = @() - -# Assemblies that must be loaded prior to importing this module -# RequiredAssemblies = @() - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -# FormatsToProcess = @() - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -# NestedModules = @() - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Variables to export from this module -VariablesToExport = '*' - -# Aliases to export from this module -AliasesToExport = '*' - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess -# PrivateData = '' - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - -} - - - diff --git a/lib/puppet_x/dsc_resources/xMySql/LICENSE b/lib/puppet_x/dsc_resources/xMySql/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xMySql/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xMySql/MSFT_xMySqlUtilities.psm1 b/lib/puppet_x/dsc_resources/xMySql/MSFT_xMySqlUtilities.psm1 deleted file mode 100644 index 80bfa8ec..00000000 --- a/lib/puppet_x/dsc_resources/xMySql/MSFT_xMySqlUtilities.psm1 +++ /dev/null @@ -1,315 +0,0 @@ -function Invoke-MySqlCommand -{ - <# - .SYNOPSIS - This function runs the given command with the given arguments. This - is done so that the function can be mocked for unit testing. - - .EXAMPLE - Invoke-MySqlCommand -CommandPath "C:\somepath.exe" -Arguments "test", "test2" - - .PARAMETER CommandPath - This is the path to the command you want to run. - - .PARAMETER Arguments - These are the arguments you want to supply to the command. - #> - - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $CommandPath, - - [parameter(Mandatory = $true)] - [string[]] $Arguments - ) - - if (Test-Path -Path $CommandPath) - { - & $CommandPath $Arguments - } - else - { - Throw "$CommandPath does not exist" - } -} - -function Get-MySqlInstallerConsole -{ - <# - .SYNOPSIS - This function returns the path for the MySQL Installer Console. - - .EXAMPLE - Get-MySqlInstallerConsole - C:\Program Files (x86)\MySQL\MySQL Installer for Windows\MySQLInstallerConsole.exe - #> - - $mySqlInstallerConsole = Join-Path -Path "$(${env:ProgramFiles(x86)})\MySQL\MySQL Installer for Windows" -ChildPath "MySQLInstallerConsole.exe" - - # Throw an exception if MySQL Installer for Windows isn't installed - if (-not (Test-Path -Path $mySqlInstallerConsole)) - { - Throw 'Please ensure that MySQL Installer for Windows is installed' - } - - return $mySqlInstallerConsole -} - -function Get-MySqlExe -{ - <# - .SYNOPSIS - This function takes in a version number and returns the path of - mysql.exe for that version. It checks to see if the x64 - version is installed and then if the x86 version is - installed. If neither is installed it throws an error. - - .EXAMPLE - Get-MySqlExe -MySqlVersion "5.6.17" - C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql.exe - - .EXAMPLE - Get-MySqlExe -MySqlVersion "5.6.17" - C:\Program Files (x86)\MySQL\MySQL Server 5.6\bin\mysql.exe - - .PARAMETER MySqlVersion - The version of MySQL you want the mysql.exe path for. - #> - - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $MySqlVersion - ) - - $shortVersion = Get-ShortVersion -MySqlVersion $MySqlVersion - $mySqlExeX64 = Join-Path -Path "$(${env:ProgramFiles})\MySQL\MySQL Server $shortVersion\bin" -ChildPath "mysql.exe" - $mySqlExeX86 = Join-Path -Path "$(${env:ProgramFiles(x86)})\MySQL\MySQL Server $shortVersion\bin" -ChildPath "mysql.exe" - - # Throw an exception if the path doesn't exist - if (Test-Path -Path $mySqlExeX64) - { - return $mySqlExeX64 - } - elseif (Test-Path -Path $mySqlExeX86) - { - return $mySqlExeX86 - } - else - { - Throw "Please ensure that MySQL Version $shortVersion is installed" - } -} - -function Get-MySqlVersionInstalled -{ - <# - .SYNOPSIS - This function takes in a version number and determines if that - version of MySQL is installed. - - .EXAMPLE - Get-MySqlVersionInstalled -MySqlVersion "5.6.17" - True - - .EXAMPLE - Get-MySqlVersionInstalled -MySqlVersion "5.6.17" - False - - .PARAMETER MySqlVersion - The MySQL version you want to know about. - #> - - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $MySqlVersion - ) - - $MySqlInstalled = $false - $arguments = "community", "status" - - $statusResults = (Invoke-MySqlCommand -CommandPath $(Get-MySqlInstallerConsole) -Arguments $arguments) -split "`r`n" - - ForEach ($statusResult in $statusResults) - { - if ($statusResult -eq "MySQL Server $MySqlVersion") - { - $MySqlInstalled = $true - } - } - - return $MySqlInstalled -} - -function Get-MySqlAllInstalled -{ - <# - .SYNOPSIS - This function returns all of the versions of MySQL - that are installed. - - .EXAMPLE - Get-MySqlAllInstalled - 5.6.17 - 5.7.8 - - .EXAMPLE - Get-MySqlAllInstalled - 5.6.17 - #> - - $allVersionsInstalled = @() - $arguments = "community", "status" - - $statusResults = (Invoke-MySqlCommand -CommandPath $(Get-MySqlInstallerConsole) -Arguments $arguments) -split "`r`n" - - ForEach ($statusResult in $statusResults) - { - if ($statusResult -match "^MySQL Server") - { - # get the version number from the $statusResult - $splitStatus = $statusResult.Split(" ") - $allVersionsInstalled += ,$splitStatus[2] - } - } - - return $allVersionsInstalled -} - -function Get-ShortVersion -{ - <# - .SYNOPSIS - This function takes in a version number and returns the shortened - version of it. - - .EXAMPLE - Get-ShortVersion -MySqlVersion "5.6.17" - 5.6 - - .EXAMPLE - Get-ShortVersion -MySqlVersion "5.7.8" - 5.7 - - .PARAMETER MySqlVersion - This is the long version number that you want shortened. - #> - - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $MySqlVersion - ) - - $splitVersion = $MySqlVersion.Split(".") - $shortVersion = [string]::Join(".",$splitVersion,0,2) - - return $shortVersion -} - -function Read-ErrorFile -{ - <# - .SYNOPSIS - This function reads an error file and throws an error if there - is a line that starts off with ERROR. - - .EXAMPLE - Read-ErrorFile -ErrorFilePath "C:\errorfile.txt" - - .PARAMETER ErrorFilePath - This is the path of the error file you want read. - #> - - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $ErrorFilePath - ) - - if (Test-Path -Path $ErrorFilePath) - { - ForEach ($line in (Get-Content $ErrorFilePath)) - { - if ($line -match "^ERROR") - { - Remove-Item -Path $ErrorFilePath - Throw "$line" - } - } - Remove-Item -Path $ErrorFilePath - } -} - -function Get-MySqlPort -{ - <# - .SYNOPSIS - This function looks at the my.ini file of the version passed in - and returns the port number from the file. - - .EXAMPLE - Get-MySqlPort -MySqlVersion "5.6.17" - 3306 - - .PARAMETER MySqlVersion - This is the version you want the port number for. - #> - - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $MySqlVersion - ) - - $myIniLocation = Join-Path "$(${env:ProgramData})\MySQL\MySQL Server $(Get-ShortVersion $MySqlVersion)" -ChildPath "my.ini" - - # Throw an exception if $myIniLocation doesn't exist - if (-not (Test-Path -Path $myIniLocation)) - { - Throw 'The my.ini file does not exist in the standard location' - } - - ForEach ($line in (Get-Content $myIniLocation)) - { - if ($line -match "^port=") - { - $mySqlPort = ($line -split '=')[1] - } - } - return $mySqlPort -} - -function Get-ArchitectureName -{ - <# - .SYNOPSIS - This function returns the architecture of the server. - - .EXAMPLE - Get-ArchitectureName - x64 - - .EXAMPLE - Get-ArchitectureName - x86 - #> - - if($env:PROCESSOR_ARCHITECTURE -eq "AMD64") - { - return "x64" - } - else - { - return "x86" - } -} diff --git a/lib/puppet_x/dsc_resources/xMySql/xMySql.psd1 b/lib/puppet_x/dsc_resources/xMySql/xMySql.psd1 deleted file mode 100644 index f1a9503d..00000000 --- a/lib/puppet_x/dsc_resources/xMySql/xMySql.psd1 +++ /dev/null @@ -1,63 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '2.1.0.0' - -# ID used to uniquely identify this module -GUID = '7c3fee65-807c-4c25-8f60-0dbece96d1bb' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module for installing an instance of mySQL' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Script module or binary module file associated with this manifest. -#RootModule = 'PSWSIISEndpoint.psm1' - -# Modules to import as nested modules of the module specified in ModuleToProcess -NestedModules = 'MSFT_xMySqlUtilities.psm1' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xMySql/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xMySql' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - # ReleaseNotes = '' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - - diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDNSServerAddress/MSFT_xDNSServerAddress.psm1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDNSServerAddress/MSFT_xDNSServerAddress.psm1 deleted file mode 100644 index 3c63d436..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDNSServerAddress/MSFT_xDNSServerAddress.psm1 +++ /dev/null @@ -1,354 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Networking Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.Common' ` - -ChildPath 'NetworkingDsc.Common.psm1')) - -# Import the Networking Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.ResourceHelper' ` - -ChildPath 'NetworkingDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xDNSServerAddress' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current DNS Server Addresses for an interface. - - .PARAMETER InterfaceAlias - Alias of the network interface for which the DNS server address is set. - - .PARAMETER AddressFamily - IP address family. - - .PARAMETER Address - The desired DNS Server address(es). Exclude to enable DHCP. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateSet('IPv4', 'IPv6')] - [String] - $AddressFamily, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String[]] - $Address - ) - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.GettingDNSServerAddressesMessage) - ) -join '') - - # Remove the parameters we don't want to splat - $null = $PSBoundParameters.Remove('Address') - - # Get the current DNS Server Addresses based on the parameters given. - [String[]] $currentAddress = Get-DnsClientServerStaticAddress ` - @PSBoundParameters ` - -ErrorAction Stop - - $returnValue = @{ - Address = $currentAddress - AddressFamily = $AddressFamily - InterfaceAlias = $InterfaceAlias - } - - return $returnValue -} - -<# - .SYNOPSIS - Sets the DNS Server Address for an interface. - - .PARAMETER InterfaceAlias - Alias of the network interface for which the DNS server address is set. - - .PARAMETER AddressFamily - IP address family. - - .PARAMETER Address - The desired DNS Server address(es). Exclude to enable DHCP. - - .PARAMETER Validate - Requires that the DNS Server addresses be validated if they are updated. - It will cause the resource to throw a 'A general error occurred that is not covered by a more - specific error code.' error if set to True and specified DNS Servers are not accessible. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateSet('IPv4', 'IPv6')] - [String] - $AddressFamily, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String[]] - $Address, - - [Parameter()] - [Boolean] - $Validate = $false - ) - - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.ApplyingDNSServerAddressesMessage) - ) -join '') - - # If address not passed, set to an empty array - if (-not $PSBoundParameters.ContainsKey('Address')) - { - [String[]] $Address = @() - } - - # Remove the parameters we don't want to splat - $null = $PSBoundParameters.Remove('Address') - $null = $PSBoundParameters.Remove('Validate') - - # Get the current DNS Server Addresses based on the parameters given. - [String[]] $currentAddress = @(Get-DnsClientServerStaticAddress ` - @PSBoundParameters ` - -ErrorAction Stop) - - # Check if the Server addresses are the same as the desired addresses. - [Boolean] $addressDifferent = (@(Compare-Object ` - -ReferenceObject $currentAddress ` - -DifferenceObject $Address ` - -SyncWindow 0).Length -gt 0) - - if ($addressDifferent) - { - $dnsServerAddressSplat = @{ - InterfaceAlias = $InterfaceAlias - } - - if ($Address.Count -eq 0) - { - # Reset the DNS server address to DHCP - $dnsServerAddressSplat += @{ - ResetServerAddresses = $true - } - - Set-DnsClientServerAddress @dnsServerAddressSplat ` - -ErrorAction Stop - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.DNSServersHaveBeenSetToDHCPMessage) - ) -join '' ) - } - else - { - # Set the DNS server address to static - $dnsServerAddressSplat += @{ - Address = $Address - Validate = $Validate - } - - Set-DnsClientServerAddress @dnsServerAddressSplat ` - -ErrorAction Stop - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.DNSServersHaveBeenSetCorrectlyMessage) - ) -join '' ) - } - } - else - { - # Test will return true in this case - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.DNSServersAlreadySetMessage) - ) -join '' ) - } -} - -<# - .SYNOPSIS - Tests the current state of a DNS Server Address for an interface. - - .PARAMETER InterfaceAlias - Alias of the network interface for which the DNS server address is set. - - .PARAMETER AddressFamily - IP address family. - - .PARAMETER Address - The desired DNS Server address(es). Exclude to enable DHCP. - - .PARAMETER Validate - Requires that the DNS Server addresses be validated if they are updated. - It will cause the resource to throw a 'A general error occurred that is not covered by a more - specific error code.' error if set to True and specified DNS Servers are not accessible. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateSet('IPv4', 'IPv6')] - [String] - $AddressFamily, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String[]] - $Address, - - [Parameter()] - [Boolean] - $Validate = $false - ) - # Flag to signal whether settings are correct - [Boolean] $desiredConfigurationMatch = $true - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.CheckingDNSServerAddressesMessage) - ) -join '' ) - - # Validate the Address passed or set to empty array if not passed - if ($PSBoundParameters.ContainsKey('Address')) - { - foreach ($ServerAddress in $Address) - { - Assert-ResourceProperty ` - -Address $ServerAddress ` - -AddressFamily $AddressFamily ` - -InterfaceAlias $InterfaceAlias - } # foreach - } - else - { - [String[]] $Address = @() - } # if - - # Remove the parameters we don't want to splat - $null = $PSBoundParameters.Remove('Address') - $null = $PSBoundParameters.Remove('Validate') - - # Get the current DNS Server Addresses based on the parameters given. - [String[]] $currentAddress = @(Get-DnsClientServerStaticAddress ` - @PSBoundParameters ` - -ErrorAction Stop) - - # Check if the Server addresses are the same as the desired addresses. - [Boolean] $addressDifferent = (@(Compare-Object ` - -ReferenceObject $currentAddress ` - -DifferenceObject $Address ` - -SyncWindow 0).Length -gt 0) - - if ($addressDifferent) - { - $desiredConfigurationMatch = $false - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.DNSServersNotCorrectMessage) ` - -f ($Address -join ','),($currentAddress -join ',') - ) -join '' ) - } - else - { - # Test will return true in this case - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.DNSServersSetCorrectlyMessage) - ) -join '' ) - } - return $desiredConfigurationMatch -} - -<# - .SYNOPSIS - Checks the Address details are valid and do not conflict with Address family. - Ensures interface exists. If any problems are detected an exception will be thrown. - - .PARAMETER InterfaceAlias - Alias of the network interface for which the DNS server address is set. - - .PARAMETER AddressFamily - IP address family. - - .PARAMETER Address - The desired DNS Server address. Set to empty to enable DHCP. -#> -function Assert-ResourceProperty -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateSet('IPv4', 'IPv6')] - [String] - $AddressFamily, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Address - ) - - if ( -not (Get-NetAdapter | Where-Object -Property Name -EQ $InterfaceAlias )) - { - New-InvalidArgumentException ` - -Message ($LocalizedData.InterfaceNotAvailableError -f $InterfaceAlias) ` - -ArgumentName 'InterfaceAlias' - } - - if ( -not ([System.Net.IPAddress]::TryParse($Address, [ref]0))) - { - New-InvalidArgumentException ` - -Message ($LocalizedData.AddressFormatError -f $Address) ` - -ArgumentName 'Address' - } - - $detectedAddressFamily = ([System.Net.IPAddress]$Address).AddressFamily.ToString() - if (($detectedAddressFamily -eq [System.Net.Sockets.AddressFamily]::InterNetwork.ToString()) ` - -and ($AddressFamily -ne 'IPv4')) - { - New-InvalidArgumentException ` - -Message ($LocalizedData.AddressIPv4MismatchError -f $Address,$AddressFamily) ` - -ArgumentName 'Address' - } - - if (($detectedAddressFamily -eq [System.Net.Sockets.AddressFamily]::InterNetworkV6.ToString()) ` - -and ($AddressFamily -ne 'IPv6')) - { - New-InvalidArgumentException ` - -Message ($LocalizedData.AddressIPv6MismatchError -f $Address,$AddressFamily) ` - -ArgumentName 'Address' - } -} # Assert-ResourceProperty - -Export-ModuleMember -function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDNSServerAddress/MSFT_xDNSServerAddress.schema.mof b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDNSServerAddress/MSFT_xDNSServerAddress.schema.mof deleted file mode 100644 index 2bdda698..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDNSServerAddress/MSFT_xDNSServerAddress.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("xDNSServerAddress")] -class MSFT_xDNSServerAddress : OMI_BaseResource -{ - [Key, Description("Alias of the network interface for which the DNS server address is set.")] string InterfaceAlias; - [Key, Description("IP address family."), ValueMap{"IPv4", "IPv6"},Values{"IPv4", "IPv6"}] string AddressFamily; - [Write, Description("The desired DNS Server address(es). Exclude to enable DHCP.")] string Address[]; - [Write, Description("Requires that the DNS Server addresses be validated if they are updated. It will cause the resource to throw a 'A general error occurred that is not covered by a more specific error code.' error if set to True and specified DNS Servers are not accessible.")] boolean Validate; -}; diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDNSServerAddress/en-US/MSFT_xDNSServerAddress.strings.psd1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDNSServerAddress/en-US/MSFT_xDNSServerAddress.strings.psd1 deleted file mode 100644 index 07ef67b6..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDNSServerAddress/en-US/MSFT_xDNSServerAddress.strings.psd1 +++ /dev/null @@ -1,16 +0,0 @@ -# Localized resources for MSFT_xDNSServerAddress - -ConvertFrom-StringData @' - GettingDNSServerAddressesMessage = Getting the DNS server addresses. - ApplyingDNSServerAddressesMessage = Applying the DNS server addresses. - DNSServersSetCorrectlyMessage = DNS server addresses are set correctly. - DNSServersAlreadySetMessage = DNS server addresses are already set correctly. - CheckingDNSServerAddressesMessage = Checking the DNS server addresses. - DNSServersNotCorrectMessage = DNS server addresses are not correct. Expected "{0}", actual "{1}". - DNSServersHaveBeenSetCorrectlyMessage = DNS server addresses were set to the desired state. - DNSServersHaveBeenSetToDHCPMessage = DNS server addresses were set to the desired state of DHCP. - InterfaceNotAvailableError = Interface "{0}" is not available. Please select a valid interface and try again. - AddressFormatError = Address "{0}" is not in the correct format. Please correct the Address parameter in the configuration and try again. - AddressIPv4MismatchError = Address "{0}" is in IPv4 format, which does not match server address family {1}. Please correct either of them in the configuration and try again. - AddressIPv6MismatchError = Address "{0}" is in IPv6 format, which does not match server address family {1}. Please correct either of them in the configuration and try again. -'@ diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDefaultGatewayAddress/MSFT_xDefaultGatewayAddress.psm1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDefaultGatewayAddress/MSFT_xDefaultGatewayAddress.psm1 deleted file mode 100644 index b25766e9..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDefaultGatewayAddress/MSFT_xDefaultGatewayAddress.psm1 +++ /dev/null @@ -1,346 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Networking Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.Common' ` - -ChildPath 'NetworkingDsc.Common.psm1')) - -# Import the Networking Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.ResourceHelper' ` - -ChildPath 'NetworkingDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$LocalizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xDefaultGatewayAddress' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current state of the Default Gateway for an interface. - - .PARAMETER InterfaceAlias - Alias of the network interface for which the default gateway address is set. - - .PARAMETER AddressFamily - IP address family. - - .PARAMETER Address - The desired default gateway address - if not provided default gateway will be removed. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateSet('IPv4', 'IPv6')] - [String] - $AddressFamily, - - [Parameter()] - [String] - $Address - ) - - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.GettingDefaultGatewayAddressMessage) - ) -join '' ) - - # Use $AddressFamily to select the IPv4 or IPv6 destination prefix - $destinationPrefix = '0.0.0.0/0' - if ($AddressFamily -eq 'IPv6') - { - $destinationPrefix = '::/0' - } - # Get all the default routes - $defaultRoutes = Get-NetRoute -InterfaceAlias $InterfaceAlias -AddressFamily ` - $AddressFamily -ErrorAction Stop | ` - Where-Object { $_.DestinationPrefix -eq $destinationPrefix } - - $returnValue = @{ - AddressFamily = $AddressFamily - InterfaceAlias = $InterfaceAlias - } - # If there is a Default Gateway defined for this interface/address family add it - # to the return value. - if ($defaultRoutes) - { - $returnValue += @{ Address = $defaultRoutes.NextHop } - } - else - { - $returnValue += @{ Address = $null } - } - - $returnValue -} - -<# - .SYNOPSIS - Sets the Default Gateway for an interface. - - .PARAMETER InterfaceAlias - Alias of the network interface for which the default gateway address is set. - - .PARAMETER AddressFamily - IP address family. - - .PARAMETER Address - The desired default gateway address - if not provided default gateway will be removed. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateSet('IPv4', 'IPv6')] - [String] - $AddressFamily, - - [Parameter()] - [String] - $Address - ) - - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.ApplyingDefaultGatewayAddressMessage) - ) -join '' ) - - # Use $AddressFamily to select the IPv4 or IPv6 destination prefix - $destinationPrefix = '0.0.0.0/0' - - if ($AddressFamily -eq 'IPv6') - { - $destinationPrefix = '::/0' - } - - # Get all the default routes - $defaultRoutes = @(Get-NetRoute ` - -InterfaceAlias $InterfaceAlias ` - -AddressFamily $AddressFamily ` - -ErrorAction Stop).Where( { $_.DestinationPrefix -eq $destinationPrefix } ) - - # Remove any existing default route - foreach ($defaultRoute in $defaultRoutes) - { - Remove-NetRoute ` - -DestinationPrefix $defaultRoute.DestinationPrefix ` - -NextHop $defaultRoute.NextHop ` - -InterfaceIndex $defaultRoute.InterfaceIndex ` - -AddressFamily $defaultRoute.AddressFamily ` - -Confirm:$false -ErrorAction Stop - } - - if ($Address) - { - # Set the correct Default Route - # Build parameter hash table - $parameters = @{ - DestinationPrefix = $destinationPrefix - InterfaceAlias = $InterfaceAlias - AddressFamily = $AddressFamily - NextHop = $Address - } - - New-NetRoute @Parameters -ErrorAction Stop - - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.DefaultGatewayAddressSetToDesiredStateMessage) - ) -join '' ) - } - else - { - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.DefaultGatewayRemovedMessage) - ) -join '' ) - } -} - -<# - .SYNOPSIS - Tests the state of the Default Gateway for an interface. - - .PARAMETER InterfaceAlias - Alias of the network interface for which the default gateway address is set. - - .PARAMETER AddressFamily - IP address family. - - .PARAMETER Address - The desired default gateway address - if not provided default gateway will be removed. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateSet('IPv4', 'IPv6')] - [String] - $AddressFamily, - - [Parameter()] - [String] - $Address - ) - - # Flag to signal whether settings are correct - [Boolean] $desiredConfigurationMatch = $true - - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.CheckingDefaultGatewayAddressMessage) - ) -join '' ) - - Assert-ResourceProperty @PSBoundParameters - - # Use $AddressFamily to select the IPv4 or IPv6 destination prefix - $destinationPrefix = '0.0.0.0/0' - if ($AddressFamily -eq 'IPv6') - { - $destinationPrefix = '::/0' - } - - # Get all the default routes - $defaultRoutes = @(Get-NetRoute ` - -InterfaceAlias $InterfaceAlias ` - -AddressFamily $AddressFamily ` - -ErrorAction Stop).Where( { $_.DestinationPrefix -eq $destinationPrefix } ) - - # Test if the Default Gateway passed is equal to the current default gateway - if ($Address) - { - if ($defaultRoutes) - { - if (-not $defaultRoutes.Where( { $_.NextHop -eq $Address } )) - { - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.DefaultGatewayNotMatchMessage) -f $Address, $defaultRoutes.NextHop - ) -join '' ) - $desiredConfigurationMatch = $false - } - else - { - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.DefaultGatewayCorrectMessage) - ) -join '' ) - } - } - else - { - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.DefaultGatewayDoesNotExistMessage) -f $Address - ) -join '' ) - $desiredConfigurationMatch = $false - } - } - else - { - # Is a default gateway address set? - if ($defaultRoutes) - { - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.DefaultGatewayExistsButShouldNotMessage) - ) -join '' ) - $desiredConfigurationMatch = $false - } - else - { - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.DefaultGatewayExistsAndShouldMessage) - 'Default Gateway does not exist which is correct.' - ) -join '' ) - } - } - - return $desiredConfigurationMatch -} - -<# - .SYNOPSIS - Check the Address details are valid and do not conflict with Address family. - Ensures interface exists. If any problems are detected an exception will be thrown. - - .PARAMETER InterfaceAlias - Alias of the network interface for which the default gateway address is set. - - .PARAMETER AddressFamily - IP address family. - - .PARAMETER Address - The desired default gateway address - if not provided default gateway will be removed. -#> -function Assert-ResourceProperty -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $InterfaceAlias, - - [Parameter()] - [ValidateSet('IPv4', 'IPv6')] - [String] - $AddressFamily = 'IPv4', - - [Parameter()] - [String] - $Address - ) - - if (-not (Get-NetAdapter | Where-Object -Property Name -EQ $InterfaceAlias )) - { - New-InvalidOperationException ` - -Message ($LocalizedData.InterfaceNotAvailableError -f $InterfaceAlias) - } - - if ($Address) - { - if (-not ([System.Net.IPAddress]::TryParse($Address, [ref]0))) - { - New-InvalidArgumentException ` - -Message ($LocalizedData.AddressFormatError -f $Address) ` - -ArgumentName 'Address' - } - - $detectedAddressFamily = ([System.Net.IPAddress]$Address).AddressFamily.ToString() - - if (($detectedAddressFamily -eq [System.Net.Sockets.AddressFamily]::InterNetwork.ToString()) ` - -and ($AddressFamily -ne 'IPv4')) - { - New-InvalidArgumentException ` - -Message ($LocalizedData.AddressIPv4MismatchError -f $Address, $AddressFamily) ` - -ArgumentName 'AddressFamily' - } - - if (($detectedAddressFamily -eq [System.Net.Sockets.AddressFamily]::InterNetworkV6.ToString()) ` - -and ($AddressFamily -ne 'IPv6')) - { - New-InvalidArgumentException ` - -Message ($LocalizedData.AddressIPv6MismatchError -f $Address, $AddressFamily) ` - -ArgumentName 'AddressFamily' - } - } -} # Assert-ResourceProperty - -Export-ModuleMember -function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDefaultGatewayAddress/MSFT_xDefaultGatewayAddress.schema.mof b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDefaultGatewayAddress/MSFT_xDefaultGatewayAddress.schema.mof deleted file mode 100644 index 0d7dd188..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDefaultGatewayAddress/MSFT_xDefaultGatewayAddress.schema.mof +++ /dev/null @@ -1,7 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("xDefaultGatewayAddress")] -class MSFT_xDefaultGatewayAddress : OMI_BaseResource -{ - [Key, Description("Alias of the network interface for which the default gateway address is set.")] string InterfaceAlias; - [Key, Description("IP address family."), ValueMap{"IPv4", "IPv6"},Values{"IPv4", "IPv6"}] string AddressFamily; - [Write, Description("The desired default gateway address - if not provided default gateway will be removed.")] string Address; -}; diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDefaultGatewayAddress/en-US/MSFT_xDefaultGatewayAddress.strings.psd1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDefaultGatewayAddress/en-US/MSFT_xDefaultGatewayAddress.strings.psd1 deleted file mode 100644 index 08e6e70f..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDefaultGatewayAddress/en-US/MSFT_xDefaultGatewayAddress.strings.psd1 +++ /dev/null @@ -1,18 +0,0 @@ -# Localized resources for MSFT_xDefaultGatewayAddress - -ConvertFrom-StringData @' - GettingDefaultGatewayAddressMessage = Getting the Default Gateway Address. - ApplyingDefaultGatewayAddressMessage = Applying the Default Gateway Address. - DefaultGatewayAddressSetToDesiredStateMessage = Default Gateway address was set to the desired state. - DefaultGatewayRemovedMessage = Default Gateway address has been removed. - CheckingDefaultGatewayAddressMessage = Checking the Default Gateway Address. - DefaultGatewayNotMatchMessage = Default gateway does NOT match desired state. Expected "{0}", actual "{1}". - DefaultGatewayCorrectMessage = Default gateway is correct. - DefaultGatewayDoesNotExistMessage = Default gateway does not exist. Expected "{0}". - DefaultGatewayExistsButShouldNotMessage = Default gateway exists but it should not. - DefaultGatewayExistsAndShouldMessage = Default Gateway does not exist which is correct. - InterfaceNotAvailableError = Interface "{0}" is not available. Please select a valid interface and try again. - AddressFormatError = Address "{0}" is not in the correct format. Please correct the Address parameter in the configuration and try again. - AddressIPv4MismatchError = Address "{0}" is in IPv4 format, which does not match server address family {1}. Please correct either of them in the configuration and try again. - AddressIPv6MismatchError = Address "{0}" is in IPv6 format, which does not match server address family {1}. Please correct either of them in the configuration and try again. -'@ diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDhcpClient/MSFT_xDhcpClient.psm1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDhcpClient/MSFT_xDhcpClient.psm1 deleted file mode 100644 index bc0fba3e..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDhcpClient/MSFT_xDhcpClient.psm1 +++ /dev/null @@ -1,233 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Networking Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.Common' ` - -ChildPath 'NetworkingDsc.Common.psm1')) - -# Import the Networking Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.ResourceHelper' ` - -ChildPath 'NetworkingDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$LocalizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xDhcpClient' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current state of the DHCP Client for an interface. - - .PARAMETER InterfaceAlias - Alias of the network interface for which the DHCP Client is set. - - .PARAMETER AddressFamily - IP address family. - - .PARAMETER State - The desired state of the DHCP Client. -#> -function Get-TargetResource -{ - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateSet('IPv4', 'IPv6')] - [System.String] - $AddressFamily, - - [Parameter(Mandatory = $true)] - [ValidateSet('Enabled', 'Disabled')] - [System.String] - $State - ) - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.GettingDHCPClientMessage) ` - -f $InterfaceAlias, $AddressFamily ` - ) -join '') - - Assert-ResourceProperty @PSBoundParameters - - $currentDHCPClient = Get-NetIPInterface ` - -InterfaceAlias $InterfaceAlias ` - -AddressFamily $AddressFamily - - $returnValue = @{ - State = $currentDHCPClient.Dhcp - AddressFamily = $AddressFamily - InterfaceAlias = $InterfaceAlias - } - - return $returnValue -} - -<# - .SYNOPSIS - Sets the DHCP Client for an interface. - - .PARAMETER InterfaceAlias - Alias of the network interface for which the DHCP Client is set. - - .PARAMETER AddressFamily - IP address family. - - .PARAMETER State - The desired state of the DHCP Client. -#> -function Set-TargetResource -{ - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateSet('IPv4', 'IPv6')] - [System.String] - $AddressFamily, - - [Parameter(Mandatory = $true)] - [ValidateSet('Enabled', 'Disabled')] - [System.String] - $State - ) - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.ApplyingDHCPClientMessage) ` - -f $InterfaceAlias, $AddressFamily ` - ) -join '') - - Assert-ResourceProperty @PSBoundParameters - - $null = Get-NetIPInterface ` - -InterfaceAlias $InterfaceAlias ` - -AddressFamily $AddressFamily - - # The DHCP Client is in a different state - so change it. - Set-NetIPInterface ` - -InterfaceAlias $InterfaceAlias ` - -AddressFamily $AddressFamily ` - -Dhcp $State ` - -ErrorAction Stop - - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.DHCPClientSetStateMessage) ` - -f $InterfaceAlias, $AddressFamily, $State ` - ) -join '' ) - -} # Set-TargetResource - -<# - .SYNOPSIS - Tests the state of the DHCP Client for an interface. - - .PARAMETER InterfaceAlias - Alias of the network interface for which the DHCP Client is set. - - .PARAMETER AddressFamily - IP address family. - - .PARAMETER State - The desired state of the DHCP Client. -#> -function Test-TargetResource -{ - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateSet('IPv4', 'IPv6')] - [System.String] - $AddressFamily, - - [Parameter(Mandatory = $true)] - [ValidateSet('Enabled', 'Disabled')] - [System.String] - $State - ) - - # Flag to signal whether settings are correct - [System.Boolean] $desiredConfigurationMatch = $true - - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.CheckingDHCPClientMessage) ` - -f $InterfaceAlias, $AddressFamily ` - ) -join '') - - Assert-ResourceProperty @PSBoundParameters - - $currentDHCPClient = Get-NetIPInterface ` - -InterfaceAlias $InterfaceAlias ` - -AddressFamily $AddressFamily - - # The DHCP Client is in a different state - so change it. - if ($currentDHCPClient.DHCP -ne $State) - { - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.DHCPClientDoesNotMatchMessage) ` - -f $InterfaceAlias, $AddressFamily, $State ` - ) -join '' ) - $desiredConfigurationMatch = $false - } - - return $desiredConfigurationMatch -} # Test-TargetResource - -<# - .SYNOPSIS - Function will check the interface exists. - If any problems are detected an exception will be thrown. - - .PARAMETER InterfaceAlias - Alias of the network interface for which the DHCP Client is set. - - .PARAMETER AddressFamily - IP address family. - - .PARAMETER State - The desired state of the DHCP Client. -#> -function Assert-ResourceProperty -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateSet('IPv4', 'IPv6')] - [System.String] - $AddressFamily, - - [Parameter(Mandatory = $true)] - [ValidateSet('Enabled', 'Disabled')] - [System.String] - $State - ) - - if (-not (Get-NetAdapter | Where-Object -Property Name -EQ $InterfaceAlias )) - { - New-InvalidOperationException ` - -Message ($LocalizedData.InterfaceNotAvailableError -f $InterfaceAlias) - } -} # Assert-ResourceProperty - -Export-ModuleMember -function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDhcpClient/MSFT_xDhcpClient.schema.mof b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDhcpClient/MSFT_xDhcpClient.schema.mof deleted file mode 100644 index 528ae867..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDhcpClient/MSFT_xDhcpClient.schema.mof +++ /dev/null @@ -1,7 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("xDHCPClient")] -class MSFT_xDHCPClient : OMI_BaseResource -{ - [Key, Description("Alias of the network interface for which the DHCP Client is set.")] string InterfaceAlias; - [Key, Description("IP address family."), ValueMap{"IPv4", "IPv6"}, Values{"IPv4", "IPv6"}] string AddressFamily; - [Required, Description("The desired state of the DHCP Client."), ValueMap{"Enabled", "Disabled"}, Values{"Enabled", "Disabled"}] string State; -}; diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDhcpClient/en-US/MSFT_xDhcpClient.strings.psd1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDhcpClient/en-US/MSFT_xDhcpClient.strings.psd1 deleted file mode 100644 index 83ff0141..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDhcpClient/en-US/MSFT_xDhcpClient.strings.psd1 +++ /dev/null @@ -1,10 +0,0 @@ -# Localized resources for MSFT_xDhcpClient - -ConvertFrom-StringData @' - GettingDHCPClientMessage = Getting the DHCP Client on {1} interface "{0}". - ApplyingDHCPClientMessage = Applying the DHCP Client on {1} interface "{0}". - DHCPClientSetStateMessage = DHCP Client was set to the desired state {2} on {1} interface "{0}". - CheckingDHCPClientMessage = Checking the DHCP Client on {1} interface "{0}". - DHCPClientDoesNotMatchMessage = DHCP Client is not in the desired state {2} on {1} interface "{0}". - InterfaceNotAvailableError = Interface "{0}" is not available. Please select a valid interface and try again. -'@ diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsClientGlobalSetting/MSFT_xDnsClientGlobalSetting.data.psd1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsClientGlobalSetting/MSFT_xDnsClientGlobalSetting.data.psd1 deleted file mode 100644 index de52aeb0..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsClientGlobalSetting/MSFT_xDnsClientGlobalSetting.data.psd1 +++ /dev/null @@ -1,16 +0,0 @@ -@{ - ParameterList = @( - @{ - Name = 'SuffixSearchList' - Type = 'String' - }, - @{ - Name = 'UseDevolution' - Type = 'Boolean' - }, - @{ - Name = 'DevolutionLevel' - Type = 'Uint32' - } - ) -} diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsClientGlobalSetting/MSFT_xDnsClientGlobalSetting.psm1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsClientGlobalSetting/MSFT_xDnsClientGlobalSetting.psm1 deleted file mode 100644 index abdc4093..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsClientGlobalSetting/MSFT_xDnsClientGlobalSetting.psm1 +++ /dev/null @@ -1,232 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Networking Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.Common' ` - -ChildPath 'NetworkingDsc.Common.psm1')) - -# Import the Networking Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.ResourceHelper' ` - -ChildPath 'NetworkingDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$LocalizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xDnsClientGlobalSetting' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - This is an array of all the parameters used by this resource. -#> -$resourceData = Import-LocalizedData ` - -BaseDirectory $PSScriptRoot ` - -FileName 'MSFT_xDnsClientGlobalSetting.data.psd1' - -# This must be a script parameter so that it is accessible -$script:parameterList = $resourceData.ParameterList - -<# - .SYNOPSIS - Returns the current DNS Client Global Settings. - - .PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [System.String] - $IsSingleInstance - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.GettingDnsClientGlobalSettingsMessage) - ) -join '' ) - - # Get the current Dns Client Global Settings - $dnsClientGlobalSetting = Get-DnsClientGlobalSetting ` - -ErrorAction Stop - - # Generate the return object. - $returnValue = @{ - IsSingleInstance = 'Yes' - } - - foreach ($parameter in $script:parameterList) - { - $returnValue += @{ - $parameter.Name = $dnsClientGlobalSetting.$($parameter.name) - } - } # foreach - - return $returnValue -} # Get-TargetResource - -<# - .SYNOPSIS - Sets the DNS Client Global Settings. - - .PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. - - .PARAMETER SuffixSearchList - Specifies a list of global suffixes that can be used in the specified order by the DNS client - for resolving the IP address of the computer name. - - .PARAMETER UseDevolution. - Specifies that devolution is activated. - - .PARAMETER DevolutionLevel - Specifies the number of labels up to which devolution should occur. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [System.String] - $IsSingleInstance, - - [Parameter()] - [System.String[]] - $SuffixSearchList, - - [Parameter()] - [System.Boolean] - $UseDevolution, - - [Parameter()] - [System.Uint32] - $DevolutionLevel - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.SettingDnsClientGlobalSettingMessage) - ) -join '' ) - - # Get the current Dns Client Global Settings - $dnsClientGlobalSetting = Get-DnsClientGlobalSetting ` - -ErrorAction Stop - - # Generate a list of parameters that will need to be changed. - $changeParameters = @{} - - foreach ($parameter in $script:parameterList) - { - $parameterSourceValue = $dnsClientGlobalSetting.$($parameter.name) - $parameterNewValue = (Get-Variable -Name ($parameter.name)).Value - - if ($PSBoundParameters.ContainsKey($parameter.Name) ` - -and (Compare-Object -ReferenceObject $parameterSourceValue -DifferenceObject $parameterNewValue -SyncWindow 0)) - { - $changeParameters += @{ - $($parameter.name) = $parameterNewValue - } - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.DnsClientGlobalSettingUpdateParameterMessage) ` - -f $parameter.Name,$parameterNewValue - ) -join '' ) - } # if - } # foreach - - if ($changeParameters.Count -gt 0) - { - # Update any parameters that were identified as different - $null = Set-DnsClientGlobalSetting ` - @ChangeParameters ` - -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.DnsClientGlobalSettingUpdatedMessage) - ) -join '' ) - } # if -} # Set-TargetResource - -<# - .SYNOPSIS - Tests the state of DNS Client Global Settings. - - .PARAMETER IsSingleInstance - Specifies the resource is a single instance, the value must be 'Yes'. - - .PARAMETER SuffixSearchList - Specifies a list of global suffixes that can be used in the specified order by the DNS client - for resolving the IP address of the computer name. - - .PARAMETER UseDevolution. - Specifies that devolution is activated. - - .PARAMETER DevolutionLevel - Specifies the number of labels up to which devolution should occur. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [System.String] - $IsSingleInstance, - - [Parameter()] - [System.String[]] - $SuffixSearchList, - - [Parameter()] - [System.Boolean] - $UseDevolution, - - [Parameter()] - [System.Uint32] - $DevolutionLevel - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.TestingDnsClientGlobalSettingMessage) - ) -join '' ) - - # Flag to signal whether settings are correct - [Boolean] $desiredConfigurationMatch = $true - - # Get the current Dns Client Global Settings - $dnsClientGlobalSetting = Get-DnsClientGlobalSetting ` - -ErrorAction Stop - - # Check each parameter - foreach ($parameter in $script:parameterList) - { - $parameterSourceValue = $dnsClientGlobalSetting.$($parameter.name) - $parameterNewValue = (Get-Variable -Name ($parameter.name)).Value - - if ($PSBoundParameters.ContainsKey($parameter.Name) ` - -and (Compare-Object -ReferenceObject $parameterSourceValue -DifferenceObject $parameterNewValue -SyncWindow 0)) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.DnsClientGlobalSettingParameterNeedsUpdateMessage) ` - -f $parameter.Name,$parameterSourceValue,$parameterNewValue - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - } # foreach - - return $desiredConfigurationMatch -} # Test-TargetResource - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsClientGlobalSetting/MSFT_xDnsClientGlobalSetting.schema.mof b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsClientGlobalSetting/MSFT_xDnsClientGlobalSetting.schema.mof deleted file mode 100644 index 6dfa2e49..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsClientGlobalSetting/MSFT_xDnsClientGlobalSetting.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xDnsClientGlobalSetting")] -class MSFT_xDnsClientGlobalSetting : OMI_BaseResource -{ - [Key, Description("Specifies the resource is a single instance, the value must be 'Yes'."), ValueMap{"Yes"}, Values{"Yes"}] String IsSingleInstance; - [Write, Description("Specifies a list of global suffixes that can be used in the specified order by the DNS client for resolving the IP address of the computer name.")] String SuffixSearchList[]; - [Write, Description("Specifies that devolution is activated.")] Boolean UseDevolution; - [Write, Description("Specifies the number of labels up to which devolution should occur.")] Uint32 DevolutionLevel; -}; diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsClientGlobalSetting/en-US/MSFT_xDnsClientGlobalSetting.strings.psd1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsClientGlobalSetting/en-US/MSFT_xDnsClientGlobalSetting.strings.psd1 deleted file mode 100644 index 9d280fd4..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsClientGlobalSetting/en-US/MSFT_xDnsClientGlobalSetting.strings.psd1 +++ /dev/null @@ -1,10 +0,0 @@ -# Localized resources for MSFT_xDnsClientGlobalSetting - -ConvertFrom-StringData @' - GettingDnsClientGlobalSettingMessage = Getting DNS Client Global Settings. - SettingDnsClientGlobalSettingMessage = Setting DNS Client Global Settings. - DnsClientGlobalSettingUpdateParameterMessage = Setting DNS Client Global Settings parameter {0} to "{1}". - DnsClientGlobalSettingUpdatedMessage = Setting DNS Client Global Settings updated. - TestingDnsClientGlobalSettingMessage = Testing DNS Client Global Settings. - DnsClientGlobalSettingParameterNeedsUpdateMessage = DNS Client Global Setting "{0}" is "{1}" but should be "{2}". Change required. -'@ diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsConnectionSuffix/MSFT_xDnsConnectionSuffix.psm1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsConnectionSuffix/MSFT_xDnsConnectionSuffix.psm1 deleted file mode 100644 index 17328e56..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsConnectionSuffix/MSFT_xDnsConnectionSuffix.psm1 +++ /dev/null @@ -1,273 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Networking Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.Common' ` - -ChildPath 'NetworkingDsc.Common.psm1')) - -# Import the Networking Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.ResourceHelper' ` - -ChildPath 'NetworkingDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$LocalizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xDnsConnectionSuffix' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current DNS Connection Suffix for an interface. - - .PARAMETER InterfaceAlias - Alias of the network interface for which the DNS server address is set. - - .PARAMETER ConnectionSpecificSuffix - DNS connection-specific suffix to assign to the network interface. - - .PARAMETER RegisterThisConnectionsAddress - Specifies that the IP address for this connection is to be registered. - - .PARAMETER UseSuffixWhenRegistering - Specifies that this host name and the connection specific suffix for this connection are to - be registered. - - .PARAMETER Ensure - Ensure that the network interface connection-specific suffix is present or not. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $ConnectionSpecificSuffix, - - [Parameter()] - [System.Boolean] - $RegisterThisConnectionsAddress = $true, - - [Parameter()] - [System.Boolean] - $UseSuffixWhenRegistering = $false, - - [Parameter()] - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present' - ) - - $dnsClient = Get-DnsClient -InterfaceAlias $InterfaceAlias -ErrorAction SilentlyContinue - - $targetResource = @{ - InterfaceAlias = $dnsClient.InterfaceAlias - ConnectionSpecificSuffix = $dnsClient.ConnectionSpecificSuffix - RegisterThisConnectionsAddress = $dnsClient.RegisterThisConnectionsAddress - UseSuffixWhenRegistering = $dnsClient.UseSuffixWhenRegistering - } - - if ($Ensure -eq 'Present') - { - # Test to see if the connection-specific suffix matches - Write-Verbose -Message ($LocalizedData.CheckingConnectionSuffix -f $ConnectionSpecificSuffix) - - if ($dnsClient.ConnectionSpecificSuffix -eq $ConnectionSpecificSuffix) - { - $Ensure = 'Present' - } - else - { - $Ensure = 'Absent' - } - } - else - { - # ($Ensure -eq 'Absent'). Test to see if there is a connection-specific suffix - Write-Verbose -Message ($LocalizedData.CheckingConnectionSuffix -f '') - - if ([System.String]::IsNullOrEmpty($dnsClient.ConnectionSpecificSuffix)) - { - $Ensure = 'Absent' - } - else - { - $Ensure = 'Present' - } - } - - $targetResource['Ensure'] = $Ensure - - return $targetResource -} - -<# - .SYNOPSIS - Sets the DNS Connection Suffix for an interface. - - .PARAMETER InterfaceAlias - Alias of the network interface for which the DNS server address is set. - - .PARAMETER ConnectionSpecificSuffix - DNS connection-specific suffix to assign to the network interface. - - .PARAMETER RegisterThisConnectionsAddress - Specifies that the IP address for this connection is to be registered. - - .PARAMETER UseSuffixWhenRegistering - Specifies that this host name and the connection specific suffix for this connection are to - be registered. - - .PARAMETER Ensure - Ensure that the network interface connection-specific suffix is present or not. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $ConnectionSpecificSuffix, - - [Parameter()] - [System.Boolean] - $RegisterThisConnectionsAddress = $true, - - [Parameter()] - [System.Boolean] - $UseSuffixWhenRegistering = $false, - - [Parameter()] - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present' - ) - - $setDnsClientParams = @{ - InterfaceAlias = $InterfaceAlias - RegisterThisConnectionsAddress = $RegisterThisConnectionsAddress - UseSuffixWhenRegistering = $UseSuffixWhenRegistering - } - - if ($Ensure -eq 'Present') - { - $setDnsClientParams['ConnectionSpecificSuffix'] = $ConnectionSpecificSuffix - - Write-Verbose -Message ($LocalizedData.SettingConnectionSuffix ` - -f $ConnectionSpecificSuffix, $InterfaceAlias) - } - else - { - $setDnsClientParams['ConnectionSpecificSuffix'] = '' - - Write-Verbose -Message ($LocalizedData.RemovingConnectionSuffix ` - -f $ConnectionSpecificSuffix, $InterfaceAlias) - } - - Set-DnsClient @setDnsClientParams -} - -<# - .SYNOPSIS - Tests the current state of a DNS Connection Suffix for an interface. - - .PARAMETER InterfaceAlias - Alias of the network interface for which the DNS server address is set. - - .PARAMETER ConnectionSpecificSuffix - DNS connection-specific suffix to assign to the network interface. - - .PARAMETER RegisterThisConnectionsAddress - Specifies that the IP address for this connection is to be registered. - - .PARAMETER UseSuffixWhenRegistering - Specifies that this host name and the connection specific suffix for this connection are to - be registered. - - .PARAMETER Ensure - Ensure that the network interface connection-specific suffix is present or not. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $ConnectionSpecificSuffix, - - [Parameter()] - [System.Boolean] - $RegisterThisConnectionsAddress = $true, - - [Parameter()] - [System.Boolean] - $UseSuffixWhenRegistering = $false, - - [Parameter()] - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present' - ) - - $targetResource = Get-TargetResource @PSBoundParameters - $inDesiredState = $true - - if ($targetResource.Ensure -ne $Ensure) - { - Write-Verbose -Message ($LocalizedData.PropertyMismatch ` - -f 'Ensure', $Ensure, $targetResource.Ensure) - - $inDesiredState = $false - } - - if ($targetResource.RegisterThisConnectionsAddress -ne $RegisterThisConnectionsAddress) - { - Write-Verbose -Message ($LocalizedData.PropertyMismatch ` - -f 'RegisterThisConnectionsAddress', $RegisterThisConnectionsAddress, $targetResource.RegisterThisConnectionsAddress) - - $inDesiredState = $false - } - - if ($targetResource.UseSuffixWhenRegistering -ne $UseSuffixWhenRegistering) - { - Write-Verbose -Message ($LocalizedData.PropertyMismatch ` - -f 'UseSuffixWhenRegistering', $UseSuffixWhenRegistering, $targetResource.UseSuffixWhenRegistering) - - $inDesiredState = $false - } - - if ($inDesiredState) - { - Write-Verbose -Message $LocalizedData.ResourceInDesiredState - } - else - { - Write-Verbose -Message $LocalizedData.ResourceNotInDesiredState - } - - return $inDesiredState -} - -Export-ModuleMember -function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsConnectionSuffix/MSFT_xDnsConnectionSuffix.schema.mof b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsConnectionSuffix/MSFT_xDnsConnectionSuffix.schema.mof deleted file mode 100644 index 8a5fdb15..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsConnectionSuffix/MSFT_xDnsConnectionSuffix.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("xDnsConnectionSuffix")] -class MSFT_xDnsConnectionSuffix : OMI_BaseResource -{ - [Key, Description("Alias of the network interface for which the DNS server address is set.")] String InterfaceAlias; - [Required, Description("DNS connection-specific suffix to assign to the network interface.")] String ConnectionSpecificSuffix; - [Write, Description("Specifies that the IP address for this connection is to be registered.")] Boolean RegisterThisConnectionsAddress; - [Write, Description("Specifies that this host name and the connection specific suffix for this connection are to be registered.")] Boolean UseSuffixWhenRegistering; - [Write, Description("Ensure that the network interface connection-specific suffix is present or not."), ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] String Ensure; -}; diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsConnectionSuffix/en-US/MSFT_xDnsConnectionSuffix.strings.psd1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsConnectionSuffix/en-US/MSFT_xDnsConnectionSuffix.strings.psd1 deleted file mode 100644 index 6e99d7ca..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xDnsConnectionSuffix/en-US/MSFT_xDnsConnectionSuffix.strings.psd1 +++ /dev/null @@ -1,10 +0,0 @@ -# Localized resources for MSFT_xDnsConnectionSuffix - -ConvertFrom-StringData @' - PropertyMismatch = Property '{0}' does NOT match. Expected '{1}', actual '{2}'. - CheckingConnectionSuffix = Checking connection suffix matches '{0}'. - ResourceInDesiredState = Resource is in the desired state. - ResourceNotInDesiredState = Resource is NOT in the desired state. - SettingConnectionSuffix = Setting connection suffix '{0}' on interface '{1}'. - RemovingConnectionSuffix = Removing connection suffix '{0}' on interface '{1}'. -'@ diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewall/MSFT_xFirewall.Schema.mof b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewall/MSFT_xFirewall.Schema.mof deleted file mode 100644 index d2eaf03a..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewall/MSFT_xFirewall.Schema.mof +++ /dev/null @@ -1,37 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("xFirewall")] -class MSFT_xFirewall : OMI_BaseResource -{ - [Key, Description("Name of the Firewall Rule")] String Name; - [Write, Description("Localized, user-facing name of the Firewall Rule being created")] String DisplayName; - [Write, Description("Name of the Firewall Group where we want to put the Firewall Rule")] string Group; - [Write, Description("Ensure the presence/absence of the resource"), ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] String Ensure; - [Write, Description("Enable or disable the supplied configuration"), ValueMap{"True", "False"},Values{"True", "False"}] string Enabled; - [Write, Description("Allow or Block the supplied configuration"), ValueMap{"NotConfigured", "Allow", "Block"}, Values{"NotConfigured", "Allow", "Block"}] String Action; - [Write, Description("Specifies one or more profiles to which the rule is assigned")] String Profile[]; - [Write, Description("Direction of the connection"), ValueMap{"Inbound","Outbound"}, Values{"Inbound","Outbound"}] String Direction; - [Write, Description("Specific Port used for filter. Specified by port number, range, or keyword")] String RemotePort[]; - [Write, Description("Local Port used for the filter")] String LocalPort[]; - [Write, Description("Specific Protocol for filter. Specified by name, number, or range")] String Protocol; - [Write, Description("Documentation for the Rule.")] String Description; - [Write, Description("Path and file name of the program for which the rule is applied")] String Program; - [Write, Description("Specifies the short name of a Windows service to which the firewall rule applies")] String Service; - [Write, Description("Specifies that authentication is required on firewall rules"), ValueMap{"NotRequired", "Required", "NoEncap"}, Values{"NotRequired", "Required", "NoEncap"}] String Authentication; - [Write, Description("Specifies that encryption in authentication is required on firewall rules"), ValueMap{"NotRequired", "Required", "Dynamic"}, Values{"NotRequired", "Required", "Dynamic"}] String Encryption; - [Write, Description("Specifies the alias of the interface that applies to the traffic")] String InterfaceAlias[]; - [Write, Description("Specifies that only network connections made through the indicated interface types are subject to the requirements of this rule"), ValueMap{"Any", "Wired", "Wireless", "RemoteAccess"}, Values{"Any", "Wired", "Wireless", "RemoteAccess"}] String InterfaceType; - [Write, Description("Specifies that network packets with matching IP addresses match this rule")] String LocalAddress[]; - [Write, Description("Specifies the principals to which network traffic this firewall rule applies")] String LocalUser; - [Write, Description("Specifies the Windows Store application to which the firewall rule applies")] String Package; - [Write, Description("Specifies which version of Windows the associated rule applies")] String Platform[]; - [Write, Description("Specifies that network packets with matching IP addresses match this rule")] String RemoteAddress[]; - [Write, Description("Specifies that matching IPsec rules of the indicated computer accounts are created")] String RemoteMachine; - [Write, Description("Specifies that matching IPsec rules of the indicated user accounts are created")] String RemoteUser; - [Write, Description("Specifies a dynamic transport"), ValueMap{"Any","ProximityApps","ProximitySharing","WifiDirectPrinting","WifiDirectDisplay","WifiDirectDevices"},Values{"Any","ProximityApps","ProximitySharing","WifiDirectPrinting","WifiDirectDisplay","WifiDirectDevices"}] String DynamicTransport; - [Write, Description("Specifies that matching firewall rules of the indicated edge traversal policy are created"), ValueMap{"Block","Allow","DeferToUser","DeferToApp"},Values{"Block","Allow","DeferToUser","DeferToApp"}] String EdgeTraversalPolicy; - [Write, Description("Specifies the ICMP type codes")] String IcmpType[]; - [Write, Description("Indicates that matching firewall rules of the indicated value are created")] Boolean LocalOnlyMapping; - [Write, Description("Indicates that matching firewall rules of the indicated value are created")] Boolean LooseSourceMapping; - [Write, Description("Indicates that matching network traffic that would otherwise be blocked are allowed")] Boolean OverrideBlockRules; - [Write, Description("Specifies that matching firewall rules of the indicated owner are created")] String Owner; - [Read, Description("The current value of the Display Group of the Firewall Rule")] string DisplayGroup; -}; diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewall/MSFT_xFirewall.data.psd1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewall/MSFT_xFirewall.data.psd1 deleted file mode 100644 index 73bc7daa..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewall/MSFT_xFirewall.data.psd1 +++ /dev/null @@ -1,36 +0,0 @@ -@{ - ParameterList = @( - @{ Name = 'Name'; Variable = 'FirewallRule'; Type = 'String' } - @{ Name = 'DisplayName'; Variable = 'FirewallRule'; Type = 'String' } - @{ Name = 'Group'; Variable = 'FirewallRule'; Type = 'String' } - @{ Name = 'DisplayGroup'; Variable = 'FirewallRule'; Type = '' } - @{ Name = 'Enabled'; Variable = 'FirewallRule'; Type = 'String' } - @{ Name = 'Action'; Variable = 'FirewallRule'; Type = 'String' } - @{ Name = 'Profile'; Variable = 'FirewallRule'; Type = 'Array'; Delimiter = ', ' } - @{ Name = 'Direction'; Variable = 'FirewallRule'; Type = 'String' } - @{ Name = 'Description'; Variable = 'FirewallRule'; Type = 'String' } - @{ Name = 'RemotePort'; Variable = 'properties'; Property = 'PortFilters'; Type = 'Array' } - @{ Name = 'LocalPort'; Variable = 'properties'; Property = 'PortFilters'; Type = 'Array' } - @{ Name = 'Protocol'; Variable = 'properties'; Property = 'PortFilters'; Type = 'String' } - @{ Name = 'Program'; Variable = 'properties'; Property = 'ApplicationFilters'; Type = 'String' } - @{ Name = 'Service'; Variable = 'properties'; Property = 'ServiceFilters'; Type = 'String' } - @{ Name = 'Authentication'; Variable = 'properties'; Property = 'SecurityFilters'; Type = 'String' } - @{ Name = 'Encryption'; Variable = 'properties'; Property = 'SecurityFilters'; Type = 'String' } - @{ Name = 'InterfaceAlias'; Variable = 'properties'; Property = 'InterfaceFilters'; Type = 'Array' } - @{ Name = 'InterfaceType'; Variable = 'properties'; Property = 'InterfaceTypeFilters'; Type = 'String' } - @{ Name = 'LocalAddress'; Variable = 'properties'; Property = 'AddressFilters'; Type = 'ArrayIP' } - @{ Name = 'LocalUser'; Variable = 'properties'; Property = 'SecurityFilters'; Type = 'String' } - @{ Name = 'Package'; Variable = 'properties'; Property = 'ApplicationFilters'; Type = 'String' } - @{ Name = 'Platform'; Variable = 'FirewallRule'; Type = 'Array' } - @{ Name = 'RemoteAddress'; Variable = 'properties'; Property = 'AddressFilters'; Type = 'ArrayIP' } - @{ Name = 'RemoteMachine'; Variable = 'properties'; Property = 'SecurityFilters'; Type = 'String' } - @{ Name = 'RemoteUser'; Variable = 'properties'; Property = 'SecurityFilters'; Type = 'String' } - @{ Name = 'DynamicTransport'; Variable = 'properties'; Property = 'PortFilters'; Type = 'String' } - @{ Name = 'EdgeTraversalPolicy'; Variable = 'FirewallRule'; Type = 'String' } - @{ Name = 'IcmpType'; Variable = 'properties'; Property = 'PortFilters'; Type = 'Array' } - @{ Name = 'LocalOnlyMapping'; Variable = 'FirewallRule'; Type = 'Boolean' } - @{ Name = 'LooseSourceMapping'; Variable = 'FirewallRule'; Type = 'Boolean' } - @{ Name = 'OverrideBlockRules'; Variable = 'properties'; Property = 'SecurityFilters'; Type = 'Boolean' } - @{ Name = 'Owner'; Variable = 'FirewallRule'; Type = 'String' } - ) -} diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewall/MSFT_xFirewall.psm1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewall/MSFT_xFirewall.psm1 deleted file mode 100644 index e11b29c4..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewall/MSFT_xFirewall.psm1 +++ /dev/null @@ -1,1352 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Networking Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.Common' ` - -ChildPath 'NetworkingDsc.Common.psm1')) - -# Import the Networking Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.ResourceHelper' ` - -ChildPath 'NetworkingDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xFirewall' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - This is an array of all the parameters used by this resource - It can be used by several of the functions to reduce the amount of code required - Each element contains 3 properties: - Name: The parameter name - Source: The source where the existing parameter can be pulled from - Type: This is the content type of the paramater (it is either array or string or blank) - A blank type means it will not be compared - data ParameterList - Delimiter: Only required for Profile parameter, because Get-NetFirewall rule doesn't - return the profile as an array, but a comma delimited string. Setting this value causes - the functions to first split the parameter into an array. -#> -$script:resourceData = Import-LocalizedData ` - -BaseDirectory $PSScriptRoot ` - -FileName 'MSFT_xFirewall.data.psd1' -$script:parameterList = $script:resourceData.ParameterList - -<# - .SYNOPSIS - Returns the current state of the Firewall Rule. - - .PARAMETER Name - Name of the firewall rule. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - # Name of the Firewall Rule - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name - ) - - $ErrorActionPreference = 'Stop' - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.GettingFirewallRuleMessage) -f $Name - ) -join '') - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.FindFirewallRuleMessage) -f $Name - ) -join '') - - $firewallRule = Get-FirewallRule -Name $Name - - if (-not $firewallRule) - { - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.FirewallRuleDoesNotExistMessage) -f $Name - ) -join '') - return @{ - Ensure = 'Absent' - Name = $Name - } - } - - $properties = Get-FirewallRuleProperty -FirewallRule $firewallRule - - $result = @{ - Ensure = 'Present' - } - - <# - Populate the properties for get target resource by looping through - the parameter array list and adding the values to - #> - foreach ($parameter in $script:parameterList) - { - if ($parameter.Type -in @('Array', 'ArrayIP')) - { - $parameterValue = @(Get-FirewallPropertyValue ` - -FirewallRule $firewallRule ` - -Properties $properties ` - -Parameter $parameter) - if ($parameter.Delimiter) - { - $parameterValue = $parameterValue -split $parameter.Delimiter - } - - $result += @{ - $parameter.Name = $parameterValue - } - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.FirewallParameterValueMessage) -f ` - $Name, $parameter.Name, ($parameterValue -join ',') - ) -join '') - } - else - { - $parameterValue = Get-FirewallPropertyValue ` - -FirewallRule $firewallRule ` - -Properties $properties ` - -Parameter $parameter - - $result += @{ - $parameter.Name = $parameterValue - } - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.FirewallParameterValueMessage) -f ` - $Name, $parameter.Name, $parameterValue - ) -join '') - } - } - return $result -} - -<# - .SYNOPSIS - Create, update or delete the Firewall Rule. - - .PARAMETER Name - Name of the firewall rule. - - .PARAMETER DisplayName - Localized, user-facing name of the firewall rule being created. - - .PARAMETER Group - Name of the firewall group where we want to put the firewall rule. - - .PARAMETER Ensure - Ensure that the firewall rule exists. - - .PARAMETER Enabled - Enable or Disable the supplied configuration. - - .PARAMETER Action - Allow or Block the supplied configuration. - - .PARAMETER Profile - Specifies one or more profiles to which the rule is assigned. - - .PARAMETER Direction - Direction of the connection. - - .PARAMETER RemotePort - Specific port used for filter. Specified by port number, range, or keyword. - - .PARAMETER LocalPort - Local port used for the filter. - - .PARAMETER Protocol - Specific protocol for filter. Specified by name, number, or range. - - .PARAMETER Description - Documentation for the rule. - - .PARAMETER Program - Path and filename of the program for which the rule is applied. - - .PARAMETER Service - Specifies the short name of a Windows service to which the firewall rule applies. - - .PARAMETER Authentication - Specifies that authentication is required on firewall rules. - - .PARAMETER Encryption - Specifies that encryption in authentication is required on firewall rules. - - .PARAMETER InterfaceAlias - Specifies the alias of the interface that applies to the traffic. - - .PARAMETER InterfaceType - Specifies that only network connections made through the indicated interface types are subject - to the requirements of this rule. - - .PARAMETER LocalAddress - Specifies that network packets with matching IP addresses match this rule. This parameter value - is the first end point of an IPsec rule and specifies the computers that are subject to the - requirements of this rule. This parameter value is an IPv4 or IPv6 address, hostname, subnet, - range, or the following keyword: Any. - - .PARAMETER LocalUser - Specifies the principals to which network traffic this firewall rule applies. The principals, - represented by security identifiers (SIDs) in the security descriptor definition language (SDDL) - string, are services, users, application containers, or any SID to which network traffic is - associated. - - .PARAMETER Package - Specifies the Windows Store application to which the firewall rule applies. This parameter is - specified as a security identifier (SID). - - .PARAMETER Platform - Specifies which version of Windows the associated rule applies. - - .PARAMETER RemoteAddress - Specifies that network packets with matching IP addresses match this rule. This parameter value - is the second end point of an IPsec rule and specifies the computers that are subject to the - requirements of this rule. This parameter value is an IPv4 or IPv6 address, hostname, subnet, - range, or the following keyword: Any - - .PARAMETER RemoteMachine - Specifies that matching IPsec rules of the indicated computer accounts are created. This - parameter specifies that only network packets that are authenticated as incoming from or - outgoing to a computer identified in the list of computer accounts (SID) match this rule. - This parameter value is specified as an SDDL string. - - .PARAMETER RemoteUser - Specifies that matching IPsec rules of the indicated user accounts are created. This parameter - specifies that only network packets that are authenticated as incoming from or outgoing to a - user identified in the list of user accounts match this rule. This parameter value is specified - as an SDDL string. - - .PARAMETER DynamicTransport - Specifies a dynamic transport. - - .PARAMETER EdgeTraversalPolicy - Specifies that matching firewall rules of the indicated edge traversal policy are created. - - .PARAMETER IcmpType - Specifies the ICMP type codes. - - .PARAMETER LocalOnlyMapping - Indicates that matching firewall rules of the indicated value are created. - - .PARAMETER LooseSourceMapping - Indicates that matching firewall rules of the indicated value are created. - - .PARAMETER OverrideBlockRules - Indicates that matching network traffic that would otherwise be blocked are allowed. - - .PARAMETER Owner - Specifies that matching firewall rules of the indicated owner are created. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $DisplayName, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $Group, - - [Parameter()] - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [Parameter()] - [ValidateSet('True', 'False')] - [String] - $Enabled, - - [Parameter()] - [ValidateSet('NotConfigured', 'Allow', 'Block')] - [String] - $Action, - - [Parameter()] - [String[]] - $Profile, - - [Parameter()] - [ValidateSet('Inbound', 'Outbound')] - [String] - $Direction, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String[]] - $RemotePort, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String[]] - $LocalPort, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $Protocol, - - [Parameter()] - [String] - $Description, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $Program, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $Service, - - [Parameter()] - [ValidateSet('NotRequired', 'Required', 'NoEncap')] - [String] - $Authentication, - - [Parameter()] - [ValidateSet('NotRequired', 'Required', 'Dynamic')] - [String] - $Encryption, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String[]] - $InterfaceAlias, - - [Parameter()] - [ValidateSet('Any', 'Wired', 'Wireless', 'RemoteAccess')] - [String] - $InterfaceType, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String[]] - $LocalAddress, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $LocalUser, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $Package, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String[]] - $Platform, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String[]] - $RemoteAddress, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $RemoteMachine, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $RemoteUser, - - [Parameter()] - [ValidateSet('Any', 'ProximityApps', 'ProximitySharing', 'WifiDirectPrinting', 'WifiDirectDisplay', 'WifiDirectDevices')] - [String] - $DynamicTransport, - - [Parameter()] - [ValidateSet('Block', 'Allow', 'DeferToUser', 'DeferToApp')] - [String] - $EdgeTraversalPolicy, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String[]] - $IcmpType, - - [Parameter()] - [Boolean] - $LocalOnlyMapping, - - [Parameter()] - [Boolean] - $LooseSourceMapping, - - [Parameter()] - [Boolean] - $OverrideBlockRules, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $Owner - ) - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.ApplyingFirewallRuleMessage) -f $Name - ) -join '') - - # Remove any parameters not used in Splats - $null = $PSBoundParameters.Remove('Ensure') - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.FindFirewallRuleMessage) -f $Name - ) -join '') - $firewallRule = Get-FirewallRule -Name $Name - - $exists = ($null -ne $firewallRule) - - if ($Ensure -eq 'Present') - { - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.FirewallRuleShouldExistMessage) -f $Name, $Ensure - ) -join '') - - if ($exists) - { - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.FirewallRuleShouldExistAndDoesMessage) -f $Name - ) -join '') - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.CheckFirewallRuleParametersMessage) -f $Name - ) -join '') - - if (-not (Test-RuleProperties -FirewallRule $firewallRule @PSBoundParameters)) - { - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.UpdatingExistingFirewallMessage) -f $Name - ) -join '') - - # If the Group is being changed the the rule needs to be recreated - if ($PSBoundParameters.ContainsKey('Group') ` - -and ($Group -ne $FirewallRule.Group)) - { - Remove-NetFirewallRule -Name $Name - - <# - Merge the existing rule values into the PSBoundParameters - so that it can be splatted. - #> - $properties = Get-FirewallRuleProperty -FirewallRule $firewallRule - - <# - Loop through each possible property and if it is not passed as a parameter - then set the PSBoundParameter property to the exiting rule value. - #> - foreach ($parameter in $ParametersList) - { - if (-not $PSBoundParameters.ContainsKey($parameter.Name)) - { - $parameterValue = Get-FirewallPropertyValue ` - -FirewallRule $firewallRule ` - -Properties $properties ` - -Parameter $parameter - - if ($ParameterValue) - { - $null = $PSBoundParameters.Add($parameter.Name, $ParameterValue) - } - } - } - - New-NetFirewallRule @PSBoundParameters - } - else - { - <# - If the DisplayName is provided then need to remove it - And change it to NewDisplayName if it is different. - #> - if ($PSBoundParameters.ContainsKey('DisplayName')) - { - $null = $PSBoundParameters.Remove('DisplayName') - if ($DisplayName -ne $FirewallRule.DisplayName) - { - $null = $PSBoundParameters.Add('NewDisplayName', $DisplayName) - } - } - - # Set the existing Firewall rule based on specified parameters - Set-NetFirewallRule @PSBoundParameters - } - } - } - else - { - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.FirewallRuleShouldExistAndDoesNotMessage) -f $Name - ) -join '') - - # Set any default parameter values - if (-not $DisplayName) - { - if (-not $PSBoundParameters.ContainsKey('DisplayName')) - { - $null = $PSBoundParameters.Add('DisplayName', $Name) - } - else - { - $PSBoundParameters.DisplayName = $Name - } - } - - # Add the new Firewall rule based on specified parameters - New-NetFirewallRule @PSBoundParameters - } - } - else - { - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.FirewallRuleShouldNotExistMessage) -f $Name, $Ensure - ) -join '') - - if ($exists) - { - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.FirewallRuleShouldNotExistButDoesMessage) -f $Name - ) -join '') - - # Remove the existing Firewall rule - Remove-NetFirewallRule -Name $Name - } - else - { - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.FirewallRuleShouldNotExistAndDoesNotMessage) -f $Name - ) -join '') - # Do Nothing - } - } -} - -<# - .SYNOPSIS - Test if Firewall Rule is in the required state. - - .PARAMETER Name - Name of the firewall rule. - - .PARAMETER DisplayName - Localized, user-facing name of the firewall rule being created. - - .PARAMETER Group - Name of the firewall group where we want to put the firewall rule. - - .PARAMETER Ensure - Ensure that the firewall rule exists. - - .PARAMETER Enabled - Enable or Disable the supplied configuration. - - .PARAMETER Action - Allow or Block the supplied configuration. - - .PARAMETER Profile - Specifies one or more profiles to which the rule is assigned. - - .PARAMETER Direction - Direction of the connection. - - .PARAMETER RemotePort - Specific port used for filter. Specified by port number, range, or keyword. - - .PARAMETER LocalPort - Local port used for the filter. - - .PARAMETER Protocol - Specific protocol for filter. Specified by name, number, or range. - - .PARAMETER Description - Documentation for the rule. - - .PARAMETER Program - Path and filename of the program for which the rule is applied. - - .PARAMETER Service - Specifies the short name of a Windows service to which the firewall rule applies. - - .PARAMETER Authentication - Specifies that authentication is required on firewall rules. - - .PARAMETER Encryption - Specifies that encryption in authentication is required on firewall rules. - - .PARAMETER InterfaceAlias - Specifies the alias of the interface that applies to the traffic. - - .PARAMETER InterfaceType - Specifies that only network connections made through the indicated interface types are subject - to the requirements of this rule. - - .PARAMETER LocalAddress - Specifies that network packets with matching IP addresses match this rule. This parameter value - is the first end point of an IPsec rule and specifies the computers that are subject to the - requirements of this rule. This parameter value is an IPv4 or IPv6 address, hostname, subnet, - range, or the following keyword: Any. - - .PARAMETER LocalUser - Specifies the principals to which network traffic this firewall rule applies. The principals, - represented by security identifiers (SIDs) in the security descriptor definition language (SDDL) - string, are services, users, application containers, or any SID to which network traffic is - associated. - - .PARAMETER Package - Specifies the Windows Store application to which the firewall rule applies. This parameter is - specified as a security identifier (SID). - - .PARAMETER Platform - Specifies which version of Windows the associated rule applies. - - .PARAMETER RemoteAddress - Specifies that network packets with matching IP addresses match this rule. This parameter value - is the second end point of an IPsec rule and specifies the computers that are subject to the - requirements of this rule. This parameter value is an IPv4 or IPv6 address, hostname, subnet, - range, or the following keyword: Any - - .PARAMETER RemoteMachine - Specifies that matching IPsec rules of the indicated computer accounts are created. This - parameter specifies that only network packets that are authenticated as incoming from or - outgoing to a computer identified in the list of computer accounts (SID) match this rule. - This parameter value is specified as an SDDL string. - - .PARAMETER RemoteUser - Specifies that matching IPsec rules of the indicated user accounts are created. This parameter - specifies that only network packets that are authenticated as incoming from or outgoing to a - user identified in the list of user accounts match this rule. This parameter value is specified - as an SDDL string. - - .PARAMETER DynamicTransport - Specifies a dynamic transport. - - .PARAMETER EdgeTraversalPolicy - Specifies that matching firewall rules of the indicated edge traversal policy are created. - - .PARAMETER IcmpType - Specifies the ICMP type codes. - - .PARAMETER LocalOnlyMapping - Indicates that matching firewall rules of the indicated value are created. - - .PARAMETER LooseSourceMapping - Indicates that matching firewall rules of the indicated value are created. - - .PARAMETER OverrideBlockRules - Indicates that matching network traffic that would otherwise be blocked are allowed. - - .PARAMETER Owner - Specifies that matching firewall rules of the indicated owner are created. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $DisplayName, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $Group, - - [Parameter()] - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [Parameter()] - [ValidateSet('True', 'False')] - [String] - $Enabled, - - [Parameter()] - [ValidateSet('NotConfigured', 'Allow', 'Block')] - [String] - $Action, - - [Parameter()] - [String[]] - $Profile, - - [Parameter()] - [ValidateSet('Inbound', 'Outbound')] - [String] - $Direction, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String[]] - $RemotePort, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String[]] - $LocalPort, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $Protocol, - - [Parameter()] - [String] - $Description, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $Program, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $Service, - - [Parameter()] - [ValidateSet('NotRequired', 'Required', 'NoEncap')] - [String] - $Authentication, - - [Parameter()] - [ValidateSet('NotRequired', 'Required', 'Dynamic')] - [String] - $Encryption, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String[]] - $InterfaceAlias, - - [Parameter()] - [ValidateSet('Any', 'Wired', 'Wireless', 'RemoteAccess')] - [String] - $InterfaceType, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String[]] - $LocalAddress, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $LocalUser, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $Package, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String[]] - $Platform, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String[]] - $RemoteAddress, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $RemoteMachine, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $RemoteUser, - - [Parameter()] - [ValidateSet('Any', 'ProximityApps', 'ProximitySharing', 'WifiDirectPrinting', 'WifiDirectDisplay', 'WifiDirectDevices')] - [String] - $DynamicTransport, - - [Parameter()] - [ValidateSet('Block', 'Allow', 'DeferToUser', 'DeferToApp')] - [String] - $EdgeTraversalPolicy, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String[]] - $IcmpType, - - [Parameter()] - [Boolean] - $LocalOnlyMapping, - - [Parameter()] - [Boolean] - $LooseSourceMapping, - - [Parameter()] - [Boolean] - $OverrideBlockRules, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $Owner - ) - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.CheckingFirewallRuleMessage) -f $Name - ) -join '') - - # Remove any parameters not used in Splats - $null = $PSBoundParameters.Remove('Ensure') - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.FindFirewallRuleMessage) -f $Name - ) -join '') - - $firewallRule = Get-FirewallRule -Name $Name - - $exists = ($null -ne $firewallRule) - - if (-not $exists) - { - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.FirewallRuleDoesNotExistMessage) -f $Name - ) -join '') - - # Returns whether complies with $Ensure - $returnValue = ($false -eq ($Ensure -eq 'Present')) - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.CheckingFirewallReturningMessage) -f $Name, $returnValue - ) -join '') - - return $returnValue - } - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.CheckFirewallRuleParametersMessage) -f $Name - ) -join '') - - $desiredConfigurationMatch = Test-RuleProperties -FirewallRule $firewallRule @PSBoundParameters - - # Returns whether or not $exists complies with $Ensure - $returnValue = ($desiredConfigurationMatch -and $exists -eq ($Ensure -eq 'Present')) - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.CheckingFirewallReturningMessage) -f $Name, $returnValue - ) -join '') - - return $returnValue -} - -#region HelperFunctions -<# - .SYNOPSIS - Tests if the properties in the supplied Firewall Rule match the expected parameters passed. - - .PARAMETER FirewallRule - The firewall rule object to compare the properties of. - - .PARAMETER Name - Name of the firewall rule. - - .PARAMETER DisplayName - Localized, user-facing name of the firewall rule being created. - - .PARAMETER Group - Name of the firewall group where we want to put the firewall rule. - - .PARAMETER Ensure - Ensure that the firewall rule exists. - - .PARAMETER Enabled - Enable or Disable the supplied configuration. - - .PARAMETER Action - Allow or Block the supplied configuration. - - .PARAMETER Profile - Specifies one or more profiles to which the rule is assigned. - - .PARAMETER Direction - Direction of the connection. - - .PARAMETER RemotePort - Specific port used for filter. Specified by port number, range, or keyword. - - .PARAMETER LocalPort - Local port used for the filter. - - .PARAMETER Protocol - Specific protocol for filter. Specified by name, number, or range. - - .PARAMETER Description - Documentation for the rule. - - .PARAMETER Program - Path and filename of the program for which the rule is applied. - - .PARAMETER Service - Specifies the short name of a Windows service to which the firewall rule applies. - - .PARAMETER Authentication - Specifies that authentication is required on firewall rules. - - .PARAMETER Encryption - Specifies that encryption in authentication is required on firewall rules. - - .PARAMETER InterfaceAlias - Specifies the alias of the interface that applies to the traffic. - - .PARAMETER InterfaceType - Specifies that only network connections made through the indicated interface types are subject - to the requirements of this rule. - - .PARAMETER LocalAddress - Specifies that network packets with matching IP addresses match this rule. This parameter value - is the first end point of an IPsec rule and specifies the computers that are subject to the - requirements of this rule. This parameter value is an IPv4 or IPv6 address, hostname, subnet, - range, or the following keyword: Any. - - .PARAMETER LocalUser - Specifies the principals to which network traffic this firewall rule applies. The principals, - represented by security identifiers (SIDs) in the security descriptor definition language (SDDL) - string, are services, users, application containers, or any SID to which network traffic is - associated. - - .PARAMETER Package - Specifies the Windows Store application to which the firewall rule applies. This parameter is - specified as a security identifier (SID). - - .PARAMETER Platform - Specifies which version of Windows the associated rule applies. - - .PARAMETER RemoteAddress - Specifies that network packets with matching IP addresses match this rule. This parameter value - is the second end point of an IPsec rule and specifies the computers that are subject to the - requirements of this rule. This parameter value is an IPv4 or IPv6 address, hostname, subnet, - range, or the following keyword: Any - - .PARAMETER RemoteMachine - Specifies that matching IPsec rules of the indicated computer accounts are created. This - parameter specifies that only network packets that are authenticated as incoming from or - outgoing to a computer identified in the list of computer accounts (SID) match this rule. - This parameter value is specified as an SDDL string. - - .PARAMETER RemoteUser - Specifies that matching IPsec rules of the indicated user accounts are created. This parameter - specifies that only network packets that are authenticated as incoming from or outgoing to a - user identified in the list of user accounts match this rule. This parameter value is specified - as an SDDL string. - - .PARAMETER DynamicTransport - Specifies a dynamic transport. - - .PARAMETER EdgeTraversalPolicy - Specifies that matching firewall rules of the indicated edge traversal policy are created. - - .PARAMETER IcmpType - Specifies the ICMP type codes. - - .PARAMETER LocalOnlyMapping - Indicates that matching firewall rules of the indicated value are created. - - .PARAMETER LooseSourceMapping - Indicates that matching firewall rules of the indicated value are created. - - .PARAMETER OverrideBlockRules - Indicates that matching network traffic that would otherwise be blocked are allowed. - - .PARAMETER Owner - Specifies that matching firewall rules of the indicated owner are created. -#> -function Test-RuleProperties -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - $FirewallRule, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [Parameter()] - [String] - $DisplayName, - - [Parameter()] - [String] - $Group, - - [Parameter()] - [String] - $DisplayGroup, - - [Parameter()] - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [Parameter()] - [ValidateSet('True', 'False')] - [String] - $Enabled, - - [Parameter()] - [ValidateSet('NotConfigured', 'Allow', 'Block')] - [String] - $Action, - - [Parameter()] - [String[]] - $Profile, - - [Parameter()] - [ValidateSet('Inbound', 'Outbound')] - [String] - $Direction, - - [Parameter()] - [String[]] - $RemotePort, - - [Parameter()] - [String[]] - $LocalPort, - - [Parameter()] - [String] - $Protocol, - - [Parameter()] - [String] - $Description, - - [Parameter()] - [String] - $Program, - - [Parameter()] - [String] - $Service, - - [Parameter()] - [ValidateSet('NotRequired', 'Required', 'NoEncap')] - [String] - $Authentication, - - [Parameter()] - [ValidateSet('NotRequired', 'Required', 'Dynamic')] - [String] - $Encryption, - - [Parameter()] - [String[]] - $InterfaceAlias, - - [Parameter()] - [ValidateSet('Any', 'Wired', 'Wireless', 'RemoteAccess')] - [String] - $InterfaceType, - - [Parameter()] - [String[]] - $LocalAddress, - - [Parameter()] - [String] - $LocalUser, - - [Parameter()] - [String] - $Package, - - [Parameter()] - [String[]] - $Platform, - - [Parameter()] - [String[]] - $RemoteAddress, - - [Parameter()] - [String] - $RemoteMachine, - - [Parameter()] - [String] - $RemoteUser, - - [Parameter()] - [ValidateSet('Any', 'ProximityApps', 'ProximitySharing', 'WifiDirectPrinting', 'WifiDirectDisplay', 'WifiDirectDevices')] - [String] - $DynamicTransport, - - [Parameter()] - [ValidateSet('Block', 'Allow', 'DeferToUser', 'DeferToApp')] - [String] - $EdgeTraversalPolicy, - - [Parameter()] - [String[]] - $IcmpType, - - [Parameter()] - [Boolean] - $LocalOnlyMapping, - - [Parameter()] - [Boolean] - $LooseSourceMapping, - - [Parameter()] - [Boolean] - $OverrideBlockRules, - - [Parameter()] - [String] - $Owner - ) - - $properties = Get-FirewallRuleProperty -FirewallRule $FirewallRule - - $desiredConfigurationMatch = $true - - # Loop through the $script:parameterList array and compare the source - # with the value of each parameter. If different then - # set $desiredConfigurationMatch to false. - foreach ($parameter in $script:parameterList) - { - $parameterValue = Get-FirewallPropertyValue ` - -FirewallRule $firewallRule ` - -Properties $properties ` - -Parameter $parameter - - $parameterNew = (Get-Variable -Name ($parameter.Name)).Value - - switch -Wildcard ($parameter.Type) - { - 'String' - { - # Perform a plain string comparison. - if ($parameterNew -and ($parameterValue -ne $parameterNew)) - { - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.PropertyNoMatchMessage) ` - -f $parameter.Name, $parameterValue, $parameterNew - ) -join '') - - $desiredConfigurationMatch = $false - } - } - - 'Boolean' - { - # Perform a boolean comparison. - if ($parameterNew -and ($parameterValue -ne $parameterNew)) - { - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.PropertyNoMatchMessage) ` - -f $parameter.Name, $parameterValue, $parameterNew - ) -join '') - $desiredConfigurationMatch = $false - } - } - - 'Array*' - { - # Array comparison uses Compare-Object - if ($null -eq $parameterValue) - { - $parameterValue = @() - } - - if ($parameter.Delimiter) - { - $parameterValue = $parameterValue -split $parameter.Delimiter - } - - if ($parameter.Type -eq 'IPArray') - { - <# - IPArray comparison uses Compare-Object, except needs to convert any IP addresses - that use CIDR notation to use Subnet Mask notification because this is the - format that the Get-NetFirewallAddressFilter will return the IP addresses in - even if they were set using CIDR notation. - #> - $parameterNew = Convert-CIDRToSubhetMask -Address $parameterNew - } - - if ($parameterNew ` - -and ((Compare-Object ` - -ReferenceObject $parameterValue ` - -DifferenceObject $parameterNew).Count -ne 0)) - { - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.PropertyNoMatchMessage) ` - -f $parameter.Name, ($parameterValue -join ','), ($parameterNew -join ',') - ) -join '') - $desiredConfigurationMatch = $false - } - } - } - } - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.TestFirewallRuleReturningMessage) -f $Name, $desiredConfigurationMatch - ) -join '') - return $desiredConfigurationMatch -} - -<# - .SYNOPSIS - Returns a Firewall object matching the specified name. - - .PARAMETER Name - The name of the Firewall Rule to Retrieve. -#> -function Get-FirewallRule -{ - [CmdletBinding()] - [OutputType([Microsoft.Management.Infrastructure.CimInstance])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name - ) - - $firewallRule = @(Get-NetFirewallRule -Name $Name -ErrorAction SilentlyContinue) - - if (-not $firewallRule) - { - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.FirewallRuleNotFoundMessage) -f $Name - ) -join '') - return $null - } - - <# - If more than one rule is returned for a name, then throw an exception - because this should not be possible. - #> - if ($firewallRule.Count -gt 1) - { - New-InvalidOperationException ` - -Message ($LocalizedData.RuleNotUniqueError -f $firewallRule.Count, $Name) - } - - # The array will only contain a single rule so only return the first one (not the array) - return $firewallRule[0] -} - -<# - .SYNOPSIS - Returns a Hashtable containing the component Firewall objects for the specified Firewall Rule. - - .PARAMETER FirewallRule - The firewall rule object to pull the additional firewall objects for. -#> -function Get-FirewallRuleProperty -{ - [CmdletBinding()] - [OutputType([HashTable])] - param - ( - [Parameter(Mandatory = $true)] - $FirewallRule - ) - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($script:localizedData.GetAllPropertiesMessage) - ) -join '') - - return @{ - AddressFilters = @(Get-NetFirewallAddressFilter -AssociatedNetFirewallRule $FirewallRule) - ApplicationFilters = @(Get-NetFirewallApplicationFilter -AssociatedNetFirewallRule $FirewallRule) - InterfaceFilters = @(Get-NetFirewallInterfaceFilter -AssociatedNetFirewallRule $FirewallRule) - InterfaceTypeFilters = @(Get-NetFirewallInterfaceTypeFilter -AssociatedNetFirewallRule $FirewallRule) - PortFilters = @(Get-NetFirewallPortFilter -AssociatedNetFirewallRule $FirewallRule) - Profile = @(Get-NetFirewallProfile -AssociatedNetFirewallRule $FirewallRule) - SecurityFilters = @(Get-NetFirewallSecurityFilter -AssociatedNetFirewallRule $FirewallRule) - ServiceFilters = @(Get-NetFirewallServiceFilter -AssociatedNetFirewallRule $FirewallRule) - } -} - -<# - .SYNOPSIS - Looks up a Firewall Property value using the specified parameterList entry. - - .PARAMETER FirewallRule - The firewall rule object to pull the property from. - - .PARAMETER Properties - The additional firewall objects to pull the property from. - - .PARAMETER Parameter - The entry from the ParameterList table used to retireve the parameter for. -#> -function Get-FirewallPropertyValue -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - $FirewallRule, - - [Parameter(Mandatory = $true)] - $Properties, - - [Parameter(Mandatory = $true)] - $Parameter - ) - - if ($Parameter.Property) - { - return (Get-Variable ` - -Name ($Parameter.Variable)).value.$($Parameter.Property).$($Parameter.Name) - } - else - { - return (Get-Variable ` - -Name ($Parameter.Variable)).value.$($Parameter.Name) - } -} -#endregion - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewall/en-US/MSFT_xFirewall.strings.psd1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewall/en-US/MSFT_xFirewall.strings.psd1 deleted file mode 100644 index fac797cd..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewall/en-US/MSFT_xFirewall.strings.psd1 +++ /dev/null @@ -1,24 +0,0 @@ -# Localized resources for MSFT_xFirewall - -ConvertFrom-StringData @' - GettingFirewallRuleMessage = Getting firewall rule with Name '{0}'. - FirewallRuleDoesNotExistMessage = Firewall rule with Name '{0}' does not exist. - FirewallParameterValueMessage = Firewall rule with Name '{0}' parameter {1} is '{2}'. - ApplyingFirewallRuleMessage = Applying settings for firewall rule with Name '{0}'. - FindFirewallRuleMessage = Find firewall rule with Name '{0}'. - FirewallRuleShouldExistMessage = We want the firewall rule with Name '{0}' to exist since Ensure is set to {1}. - FirewallRuleShouldExistAndDoesMessage = We want the firewall rule with Name '{0}' to exist and it does. Check for valid properties. - CheckFirewallRuleParametersMessage = Check each defined parameter against the existing firewall rule with Name '{0}'. - UpdatingExistingFirewallMessage = Updating existing firewall rule with Name '{0}'. - FirewallRuleShouldExistAndDoesNotMessage = We want the firewall rule with Name '{0}' to exist, but it does not. - FirewallRuleShouldNotExistMessage = We do not want the firewall rule with Name '{0}' to exist since Ensure is set to {1}. - FirewallRuleShouldNotExistButDoesMessage = We do not want the firewall rule with Name '{0}' to exist, but it does. Removing it. - FirewallRuleShouldNotExistAndDoesNotMessage = We do not want the firewall rule with Name '{0}' to exist, and it does not. - CheckingFirewallRuleMessage = Checking settings for firewall rule with Name '{0}'. - CheckingFirewallReturningMessage = Check Firewall rule with Name '{0}' returning {1}. - PropertyNoMatchMessage = {0} property value '{1}' does not match desired state '{2}'. - TestFirewallRuleReturningMessage = Test Firewall rule with Name '{0}' returning {1}. - FirewallRuleNotFoundMessage = No Firewall Rule found with Name '{0}'. - GetAllPropertiesMessage = Get all the properties and add filter info to rule map. - RuleNotUniqueError = {0} Firewall Rules with the Name '{1}' were found. Only one expected. -'@ diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewallProfile/MSFT_xFirewallProfile.data.psd1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewallProfile/MSFT_xFirewallProfile.data.psd1 deleted file mode 100644 index 6c012129..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewallProfile/MSFT_xFirewallProfile.data.psd1 +++ /dev/null @@ -1,72 +0,0 @@ -@{ - ParameterList = @( - @{ - Name = 'AllowInboundRules' - Type = 'String' - }, - @{ - Name = 'AllowLocalFirewallRules' - Type = 'String' - }, - @{ - Name = 'AllowLocalIPsecRules' - Type = 'String' - }, - @{ - Name = 'AllowUnicastResponseToMulticast' - Type = 'String' - }, - @{ - Name = 'AllowUserApps' - Type = 'String' - }, - @{ - Name = 'AllowUserPorts' - Type = 'String' - }, - @{ - Name = 'DefaultInboundAction' - Type = 'String' - }, - @{ - Name = 'DefaultOutboundAction' - Type = 'String' - }, - @{ - Name = 'DisabledInterfaceAliases' - Type = 'Array' - }, - @{ - Name = 'Enabled' - Type = 'String' - }, - @{ - Name = 'EnableStealthModeForIPsec' - Type = 'String' - }, - @{ - Name = 'LogAllowed' - Type = 'String' - }, - @{ - Name = 'LogBlocked' - Type = 'String' - }, - @{ - Name = 'LogFileName' - Type = 'String' - }, - @{ - Name = 'LogIgnored' - Type = 'String' - }, - @{ - Name = 'LogMaxSizeKilobytes' - Type = 'Uint64' - } - @{ - Name = 'NotifyOnListen' - Type = 'String' - } - ) -} diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewallProfile/MSFT_xFirewallProfile.psm1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewallProfile/MSFT_xFirewallProfile.psm1 deleted file mode 100644 index c0bb011a..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewallProfile/MSFT_xFirewallProfile.psm1 +++ /dev/null @@ -1,475 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Networking Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.Common' ` - -ChildPath 'NetworkingDsc.Common.psm1')) - -# Import the Networking Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.ResourceHelper' ` - -ChildPath 'NetworkingDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$LocalizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xFirewallProfile' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - This is an array of all the parameters used by this resource. -#> -$resourceData = Import-LocalizedData ` - -BaseDirectory $PSScriptRoot ` - -FileName 'MSFT_xFirewallProfile.data.psd1' - -# This must be a script parameter so that it is accessible -$script:parameterList = $resourceData.ParameterList - -<# - .SYNOPSIS - Returns the current Firewall Profile. - - .PARAMETER Name - The name of the firewall profile to configure. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Domain', 'Public', 'Private')] - [System.String] - $Name - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.GettingFirewallProfileMessage) ` - -f $Name - ) -join '' ) - - # Get the current Dns Client Global Settings - $netFirewallProfile = Get-NetFirewallProfile -Name $Name ` - -ErrorAction Stop - - # Generate the return object. - $returnValue = @{ - Name = $Name - } - - foreach ($parameter in $script:parameterList) - { - $returnValue += @{ - $parameter.Name = $netFirewallProfile.$($parameter.name) - } - } # foreach - - return $returnValue -} # Get-TargetResource - - -<# - .SYNOPSIS - Sets the Firewall Profile. - - .PARAMETER Name - The name of the firewall profile to configure. - - .PARAMETER AllowInboundRules - Specifies that the firewall blocks inbound traffic. - - .PARAMETER AllowLocalFirewallRules - Specifies that the local firewall rules should be merged into the effective policy - along with Group Policy settings. - - .PARAMETER AllowLocalIPsecRules - Specifies that the local IPsec rules should be merged into the effective policy - along with Group Policy settings. - - .PARAMETER AllowUnicastResponseToMulticast - Allows unicast responses to multi-cast traffic. - - .PARAMETER AllowUserApps - Specifies that traffic from local user applications is allowed through the firewall. - - .PARAMETER AllowUserPorts - Specifies that traffic is allowed through local user ports. - - .PARAMETER DefaultInboundAction - Specifies how to filter inbound traffic. - - .PARAMETER DefaultOutboundAction - Specifies how to filter outbound traffic. - - .PARAMETER DisabledInterfaceAliases - Specifies a list of interfaces on which firewall settings are excluded. - - .PARAMETER Enabled - Specifies that devolution is activated. - - .PARAMETER EnableStealthModeForIPsec - Enables stealth mode for IPsec traffic. - - .PARAMETER LogAllowed - Specifies how to log the allowed packets in the location specified by the - LogFileName parameter. - - .PARAMETER LogBlocked - Specifies how to log the dropped packets in the location specified by the - LogFileName parameter. - - .PARAMETER LogFileName - Specifies the path and filename of the file to which Windows Server writes log entries. - - .PARAMETER LogIgnored - Specifies how to log the ignored packets in the location specified by the LogFileName - parameter. - - .PARAMETER LogMaxSizeKilobytes - Specifies the maximum file size of the log, in kilobytes. The acceptable values for - this parameter are: 1 through 32767. - - .PARAMETER NotifyOnListen - Allows the notification of listening for inbound connections by a service. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Domain', 'Public', 'Private')] - [System.String] - $Name, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $AllowInboundRules, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $AllowLocalFirewallRules, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $AllowLocalIPsecRules, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $AllowUnicastResponseToMulticast, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $AllowUserApps, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $AllowUserPorts, - - [Parameter()] - [ValidateSet('Block', 'Allow', 'NotConfigured')] - [System.String] - $DefaultInboundAction, - - [Parameter()] - [ValidateSet('Block', 'Allow', 'NotConfigured')] - [System.String] - $DefaultOutboundAction, - - [Parameter()] - [System.String[]] - $DisabledInterfaceAliases, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $Enabled, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $EnableStealthModeForIPsec, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $LogAllowed, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $LogBlocked, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $LogFileName, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $LogIgnored, - - [Parameter()] - [ValidateRange(1,32767)] - [System.Uint64] - $LogMaxSizeKilobytes, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $NotifyOnListen - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.SettingFirewallProfileMessage) ` - -f $Name - ) -join '' ) - - # Get the current Firewall Profile Settings - $netFirewallProfile = Get-NetFirewallProfile -Name $Name ` - -ErrorAction Stop - - # Generate a list of parameters that will need to be changed. - $changeParameters = @{} - - foreach ($parameter in $script:parameterList) - { - $parameterSourceValue = $netFirewallProfile.$($parameter.name) - $parameterNewValue = (Get-Variable -Name ($parameter.name)).Value - - if ($PSBoundParameters.ContainsKey($parameter.Name) ` - -and (Compare-Object -ReferenceObject $parameterSourceValue -DifferenceObject $parameterNewValue -SyncWindow 0)) - { - $changeParameters += @{ - $($parameter.name) = $parameterNewValue - } - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.FirewallProfileUpdateParameterMessage) ` - -f $Name,$parameter.Name,$parameterNewValue - ) -join '' ) - } # if - } # foreach - - if ($changeParameters.Count -gt 0) - { - # Update any parameters that were identified as different - $null = Set-NetFirewallProfile -Name $Name ` - @ChangeParameters ` - -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.FirewallProfileUpdatedMessage) ` - -f $Name - ) -join '' ) - } # if -} # Set-TargetResource - -<# - .SYNOPSIS - Tests the state of Firewall Profile. - - .PARAMETER Name - The name of the firewall profile to configure. - - .PARAMETER AllowInboundRules - Specifies that the firewall blocks inbound traffic. - - .PARAMETER AllowLocalFirewallRules - Specifies that the local firewall rules should be merged into the effective policy - along with Group Policy settings. - - .PARAMETER AllowLocalIPsecRules - Specifies that the local IPsec rules should be merged into the effective policy - along with Group Policy settings. - - .PARAMETER AllowUnicastResponseToMulticast - Allows unicast responses to multi-cast traffic. - - .PARAMETER AllowUserApps - Specifies that traffic from local user applications is allowed through the firewall. - - .PARAMETER AllowUserPorts - Specifies that traffic is allowed through local user ports. - - .PARAMETER DefaultInboundAction - Specifies how to filter inbound traffic. - - .PARAMETER DefaultOutboundAction - Specifies how to filter outbound traffic. - - .PARAMETER DisabledInterfaceAliases - Specifies a list of interfaces on which firewall settings are excluded. - - .PARAMETER Enabled - Specifies that devolution is activated. - - .PARAMETER EnableStealthModeForIPsec - Enables stealth mode for IPsec traffic. - - .PARAMETER LogAllowed - Specifies how to log the allowed packets in the location specified by the - LogFileName parameter. - - .PARAMETER LogBlocked - Specifies how to log the dropped packets in the location specified by the - LogFileName parameter. - - .PARAMETER LogFileName - Specifies the path and filename of the file to which Windows Server writes log entries. - - .PARAMETER LogIgnored - Specifies how to log the ignored packets in the location specified by the LogFileName - parameter. - - .PARAMETER LogMaxSizeKilobytes - Specifies the maximum file size of the log, in kilobytes. The acceptable values for - this parameter are: 1 through 32767. - - .PARAMETER NotifyOnListen - Allows the notification of listening for inbound connections by a service. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Domain', 'Public', 'Private')] - [System.String] - $Name, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $AllowInboundRules, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $AllowLocalFirewallRules, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $AllowLocalIPsecRules, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $AllowUnicastResponseToMulticast, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $AllowUserApps, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $AllowUserPorts, - - [Parameter()] - [ValidateSet('Block', 'Allow', 'NotConfigured')] - [System.String] - $DefaultInboundAction, - - [Parameter()] - [ValidateSet('Block', 'Allow', 'NotConfigured')] - [System.String] - $DefaultOutboundAction, - - [Parameter()] - [System.String[]] - $DisabledInterfaceAliases, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $Enabled, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $EnableStealthModeForIPsec, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $LogAllowed, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $LogBlocked, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $LogFileName, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $LogIgnored, - - [Parameter()] - [ValidateRange(1,32767)] - [System.Uint64] - $LogMaxSizeKilobytes, - - [Parameter()] - [ValidateSet('True', 'False', 'NotConfigured')] - [System.String] - $NotifyOnListen - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.TestingFirewallProfileMessage) ` - -f $Name - ) -join '' ) - - # Flag to signal whether settings are correct - [Boolean] $desiredConfigurationMatch = $true - - # Get the current Dns Client Global Settings - $netFirewallProfile = Get-NetFirewallProfile -Name $Name ` - -ErrorAction Stop - - # Check each parameter - foreach ($parameter in $script:parameterList) - { - $parameterSourceValue = $netFirewallProfile.$($parameter.name) - $parameterNewValue = (Get-Variable -Name ($parameter.name)).Value - - if ($PSBoundParameters.ContainsKey($parameter.Name) ` - -and (Compare-Object -ReferenceObject $parameterSourceValue -DifferenceObject $parameterNewValue -SyncWindow 0)) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.FirewallProfileParameterNeedsUpdateMessage) ` - -f $Name,$parameter.Name,$parameterSourceValue,$parameterNewValue - ) -join '' ) - - $desiredConfigurationMatch = $false - } # if - } # foreach - - return $desiredConfigurationMatch -} # Test-TargetResource - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewallProfile/MSFT_xFirewallProfile.schema.mof b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewallProfile/MSFT_xFirewallProfile.schema.mof deleted file mode 100644 index cea96009..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewallProfile/MSFT_xFirewallProfile.schema.mof +++ /dev/null @@ -1,22 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xFirewallProfile")] -class MSFT_xFirewallProfile : OMI_BaseResource -{ - [Key, Description("The name of the firewall profile to configure."), ValueMap{"Domain", "Public", "Private"}, Values{"Domain", "Public", "Private"}] String Name; - [Write, Description("Specifies that the firewall blocks inbound traffic."), ValueMap{"True", "False", "NotConfigured"}, Values{"True", "False", "NotConfigured"}] String AllowInboundRules; - [Write, Description("Specifies that the local firewall rules should be merged into the effective policy along with Group Policy settings."), ValueMap{"True", "False", "NotConfigured"}, Values{"True", "False", "NotConfigured"}] String AllowLocalFirewallRules; - [Write, Description("Specifies that the local IPsec rules should be merged into the effective policy along with Group Policy settings."), ValueMap{"True", "False", "NotConfigured"}, Values{"True", "False", "NotConfigured"}] String AllowLocalIPsecRules; - [Write, Description("Allows unicast responses to multi-cast traffic."), ValueMap{"True", "False", "NotConfigured"}, Values{"True", "False", "NotConfigured"}] String AllowUnicastResponseToMulticast; - [Write, Description("Specifies that traffic from local user applications is allowed through the firewall."), ValueMap{"True", "False", "NotConfigured"}, Values{"True", "False", "NotConfigured"}] String AllowUserApps; - [Write, Description("Specifies that traffic is allowed through local user ports."), ValueMap{"True", "False", "NotConfigured"}, Values{"True", "False", "NotConfigured"}] String AllowUserPorts; - [Write, Description("Specifies how to filter inbound traffic."), ValueMap{"Block", "Allow", "NotConfigured"}, Values{"Block", "Allow", "NotConfigured"}] String DefaultInboundAction; - [Write, Description("Specifies how to filter outbound traffic."), ValueMap{"Block", "Allow", "NotConfigured"}, Values{"Block", "Allow", "NotConfigured"}] String DefaultOutboundAction; - [Write, Description("Specifies a list of interfaces on which firewall settings are excluded.")] String DisabledInterfaceAliases[]; - [Write, Description("Specifies that devolution is activated."), ValueMap{"True", "False", "NotConfigured"}, Values{"True", "False", "NotConfigured"}] String Enabled; - [Write, Description("Enables stealth mode for IPsec traffic."), ValueMap{"True", "False", "NotConfigured"}, Values{"True", "False", "NotConfigured"}] String EnableStealthModeForIPsec; - [Write, Description("Specifies how to log the allowed packets in the location specified by the LogFileName parameter."), ValueMap{"True", "False", "NotConfigured"}, Values{"True", "False", "NotConfigured"}] String LogAllowed; - [Write, Description("Specifies how to log the dropped packets in the location specified by the LogFileName parameter."), ValueMap{"True", "False", "NotConfigured"}, Values{"True", "False", "NotConfigured"}] String LogBlocked; - [Write, Description("Specifies the path and filename of the file to which Windows Server writes log entries.")] String LogFileName; - [Write, Description("Specifies how to log the ignored packets in the location specified by the LogFileName parameter."), ValueMap{"True", "False", "NotConfigured"}, Values{"True", "False", "NotConfigured"}] String LogIgnored; - [Write, Description("Specifies the maximum file size of the log, in kilobytes. The acceptable values for this parameter are: 1 through 32767.")] UInt64 LogMaxSizeKilobytes; - [Write, Description("Allows the notification of listening for inbound connections by a service."), ValueMap{"True", "False", "NotConfigured"}, Values{"True", "False", "NotConfigured"}] String NotifyOnListen; -}; diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewallProfile/en-US/MSFT_xFirewallProfile.strings.psd1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewallProfile/en-US/MSFT_xFirewallProfile.strings.psd1 deleted file mode 100644 index 7ce3dbee..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xFirewallProfile/en-US/MSFT_xFirewallProfile.strings.psd1 +++ /dev/null @@ -1,10 +0,0 @@ -# Localized resources for MSFT_xFirewallProfile - -ConvertFrom-StringData @' - GettingFirewallProfileMessage = Getting Firewall {0} Profile. - SettingFirewallProfileMessage = Setting Firewall {0} Profile. - FirewallProfileUpdateParameterMessage = Setting Firewall {0} Profile parameter {1} to "{1}". - FirewallProfileUpdatedMessage = Setting Firewall {0} Profile updated. - TestingFirewallProfileMessage = Testing Firewall {0} Profile. - FirewallProfileParameterNeedsUpdateMessage = Firewall {0} Profile "{1}" is "{2}" but should be "{3}". Change required. -'@ diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xHostsFile/MSFT_xHostsFile.psm1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xHostsFile/MSFT_xHostsFile.psm1 deleted file mode 100644 index 38acb9e7..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xHostsFile/MSFT_xHostsFile.psm1 +++ /dev/null @@ -1,266 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Networking Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.Common' ` - -ChildPath 'NetworkingDsc.Common.psm1')) - -# Import the Networking Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.ResourceHelper' ` - -ChildPath 'NetworkingDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xHostsFile' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current state of a hosts file entry. - - .PARAMETER HostName - Specifies the name of the computer that will be mapped to an IP address. - - .PARAMETER IPAddress - Specifies the IP Address that should be mapped to the host name. - - .PARAMETER Ensure - Specifies if the hosts file entry should be created or deleted. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $HostName, - - [System.String] - $IPAddress, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present" - ) - - Write-Verbose -Message ($LocalizedData.StartingGet -f $HostName) - - $result = Get-HostEntry -HostName $HostName - - if ($null -ne $result) - { - return @{ - HostName = $result.HostName - IPAddress = $result.IPAddress - Ensure = "Present" - } - } - else - { - return @{ - HostName = $HostName - IPAddress = $null - Ensure = "Absent" - } - } -} - -<# - .SYNOPSIS - Adds, updates or removes a hosts file entry. - - .PARAMETER HostName - Specifies the name of the computer that will be mapped to an IP address. - - .PARAMETER IPAddress - Specifies the IP Address that should be mapped to the host name. - - .PARAMETER Ensure - Specifies if the hosts file entry should be created or deleted. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $HostName, - - [System.String] - $IPAddress, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present" - ) - - $hostPath = "$env:windir\System32\drivers\etc\hosts" - $currentValues = Get-TargetResource @PSBoundParameters - - Write-Verbose -Message ($LocalizedData.StartingSet -f $HostName) - - if ($Ensure -eq "Present" -and $PSBoundParameters.ContainsKey("IPAddress") -eq $false) - { - New-InvalidArgumentException ` - -Message $($($LocalizedData.UnableToEnsureWithoutIP) -f $Address,$AddressFamily) ` - -ArgumentName 'IPAddress' - } - - if ($currentValues.Ensure -eq "Absent" -and $Ensure -eq "Present") - { - Write-Verbose -Message ($LocalizedData.CreateNewEntry -f $HostName) - Add-Content -Path $hostPath -Value "`r`n$IPAddress`t$HostName" - } - else - { - $hosts = Get-Content -Path $hostPath - $replace = $hosts | Where-Object { - [System.String]::IsNullOrEmpty($_) -eq $false -and $_.StartsWith('#') -eq $false - } | Where-Object { $_ -like "*$HostName*" } - - $multiLineEntry = $false - $data = $replace -split '\s+' - if ($data.Length -gt 2) - { - $multiLineEntry = $true - } - - if ($Ensure -eq "Present") - { - Write-Verbose -Message ($LocalizedData.UpdateExistingEntry -f $HostName) - if ($multiLineEntry -eq $true) - { - $newReplaceLine = $replace -replace $HostName, "" - $hosts = $hosts -replace $replace, $newReplaceLine - $hosts += "$IPAddress`t$HostName" - } - else - { - $hosts = $hosts -replace $replace, "$IPAddress`t$HostName" - } - } - else - { - Write-Verbose -Message ($LocalizedData.RemoveEntry -f $HostName) - if ($multiLineEntry -eq $true) - { - $newReplaceLine = $replace -replace $HostName, "" - $hosts = $hosts -replace $replace, $newReplaceLine - } - else - { - $hosts = $hosts -replace $replace, "" - } - } - - Set-Content -Path $hostPath -Value $hosts - } -} - -<# - .SYNOPSIS - Tests the current state of a hosts file entry. - - .PARAMETER HostName - Specifies the name of the computer that will be mapped to an IP address. - - .PARAMETER IPAddress - Specifies the IP Address that should be mapped to the host name. - - .PARAMETER Ensure - Specifies if the hosts file entry should be created or deleted. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $HostName, - - [System.String] - $IPAddress, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present" - ) - - $currentValues = Get-TargetResource @PSBoundParameters - Write-Verbose -Message ($LocalizedData.StartingTest -f $HostName) - - if ($Ensure -ne $currentValues.Ensure) - { - return $false - } - - if ($Ensure -eq "Present" -and $IPAddress -ne $currentValues.IPAddress) - { - return $false - } - return $true -} - -function Get-HostEntry -{ - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $HostName - ) - - $allHosts = Get-Content -Path "$env:windir\System32\drivers\etc\hosts" | - Where-Object { [System.String]::IsNullOrEmpty($_) -eq $false -and $_.StartsWith('#') -eq $false } - foreach ($hosts in $allHosts) - { - $data = $hosts -split '\s+' - if ($data.Length -gt 2) - { - # Account for host entries that have multiple entries on a single line - $result = @() - $array = @() - for ($i = 1; $i -lt $data.Length; $i++) - { - <# - Filter commments on the line. - Example: 0.0.0.0 s.gateway.messenger.live.com # breaks Skype GH-183 - becomes: - 0.0.0.0 s.gateway.messenger.live.com - #> - if ($data[$i] -eq '#') - { - break - } - - $array += $data[$i] - } - - $result = @{ - Host = $array - IPAddress = $data[0] - } - } - else - { - $result = @{ - Host = $data[1] - IPAddress = $data[0] - } - } - - if ($result.Host -eq $HostName) - { - return @{ - HostName = $result.Host - IPAddress = $result.IPAddress - } - } - } -} diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xHostsFile/MSFT_xHostsFile.schema.mof b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xHostsFile/MSFT_xHostsFile.schema.mof deleted file mode 100644 index 8fa95fe7..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xHostsFile/MSFT_xHostsFile.schema.mof +++ /dev/null @@ -1,7 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xHostsFile")] -class MSFT_xHostsFile : OMI_BaseResource -{ - [Key, Description("Specifies the name of the computer that will be mapped to an IP address.")] string HostName; - [Write, Description("Specifies the IP Address that should be mapped to the host name.")] string IPAddress; - [Write, Description("Specifies if the hosts file entry should be created or deleted."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; -}; diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xHostsFile/en-US/MSFT_xHostsFile.strings.psd1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xHostsFile/en-US/MSFT_xHostsFile.strings.psd1 deleted file mode 100644 index c836abf7..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xHostsFile/en-US/MSFT_xHostsFile.strings.psd1 +++ /dev/null @@ -1,11 +0,0 @@ -# Localized resources for MSFT_xHostFile - -ConvertFrom-StringData @' - UnableToEnsureWithoutIP = Unable to ensure a host entry is present without a corresponding IP address. Please add the IPAddress property and run this resource again. - CreateNewEntry = Creating new host entry for {0} - UpdateExistingEntry = Updating existing host entry for {0} - RemoveEntry = Removing host entry for {0} - StartingGet = Looking up host entry for {0} - StartingSet = Setting host entry for {0} - StartingTest = Testing host entry for {0} -'@ diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xIPAddress/MSFT_xIPAddress.psm1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xIPAddress/MSFT_xIPAddress.psm1 deleted file mode 100644 index 89a57145..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xIPAddress/MSFT_xIPAddress.psm1 +++ /dev/null @@ -1,476 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Networking Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.Common' ` - -ChildPath 'NetworkingDsc.Common.psm1')) - -# Import the Networking Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.ResourceHelper' ` - -ChildPath 'NetworkingDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedDataSplat = @{ - ResourceName = 'MSFT_xIPAddress' - ResourcePath = (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) -} -$localizedData = Get-LocalizedData @localizedDataSplat - -<# - .SYNOPSIS - Returns the current state of an IP address assigned to an interface. - - .PARAMETER IPAddress - The desired IP address. - - .PARAMETER InterfaceAlias - Alias of the network interface for which the IP address should be set. - - .PARAMETER AddressFamily - IP address family. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter()] - [ValidateNotNullOrEmpty()] - [String[]] - $IPAddress, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $InterfaceAlias, - - [Parameter(Mandatory = $True)] - [ValidateSet('IPv4', 'IPv6')] - [String] - $AddressFamily = 'IPv4' - ) - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.GettingIPAddressMessage) - ) -join '') - - $GetNetIPAddressSplat = @{ - InterfaceAlias = $InterfaceAlias - AddressFamily = $AddressFamily - } - $currentIPAddress = Get-NetIPAddress @GetNetIPAddressSplat - - $currentIPAddressWithPrefix = $currentIPAddress | - Foreach-Object { "$($_.IPAddress)/$($_.prefixLength)" } - - $returnValue = @{ - IPAddress = @($currentIPAddressWithPrefix) - AddressFamily = $AddressFamily - InterfaceAlias = $InterfaceAlias - } - - $returnValue -} - -<# - .SYNOPSIS - Sets an IP address on an interface. - - .PARAMETER IPAddress - The desired IP address. - - .PARAMETER InterfaceAlias - Alias of the network interface for which the IP address should be set. - - .PARAMETER AddressFamily - IP address family. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter()] - [ValidateNotNullOrEmpty()] - [String[]] - $IPAddress, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $InterfaceAlias, - - [Parameter(Mandatory = $True)] - [ValidateSet('IPv4', 'IPv6')] - [String] - $AddressFamily = 'IPv4' - ) - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.ApplyingIPAddressMessage) - ) -join '') - - # Use $AddressFamily to select the IPv4 or IPv6 destination prefix - $DestinationPrefix = '0.0.0.0/0' - if ($AddressFamily -eq 'IPv6') - { - $DestinationPrefix = '::/0' - $prefixLength = 64 - } - - # Get all the default routes - this has to be done in case the IP Address is - # being Removed - $GetNetRouteSplat = @{ - InterfaceAlias = $InterfaceAlias - AddressFamily = $AddressFamily - ErrorAction = 'Stop' - } - $defaultRoutes = @(Get-NetRoute @GetNetRouteSplat).Where( { $_.DestinationPrefix -eq $DestinationPrefix } ) - - # Remove any default routes on the specified interface -- it is important to do - # this *before* removing the IP address, particularly in the case where the IP - # address was auto-configured by DHCP - if ($defaultRoutes) - { - foreach ($defaultRoute in $defaultRoutes) - { - $RemoveNetRouteSplat = @{ - DestinationPrefix = $defaultRoute.DestinationPrefix - NextHop = $defaultRoute.NextHop - InterfaceIndex = $defaultRoute.InterfaceIndex - AddressFamily = $defaultRoute.AddressFamily - Confirm = $false - ErrorAction = 'Stop' - } - Remove-NetRoute @RemoveNetRouteSplat - } - } - - # Get the current IP Address based on the parameters given. - $GetNetIPAddressSplat = @{ - InterfaceAlias = $InterfaceAlias - AddressFamily = $AddressFamily - ErrorAction = 'Stop' - } - $currentIPs = @(Get-NetIPAddress @GetNetIPAddressSplat) - - # Remove any IP addresses on the specified interface - if ($currentIPs) - { - foreach ($CurrentIP in $CurrentIPs) - { - $RemoveIP = $False - if ($CurrentIP.IPAddress -notin ($IPAddress -replace '\/\S*','')) - { - $RemoveIP = $True - } - elseif ($CurrentIP.IPAddress -in ($IPAddress -replace '\/\S*','')) - { - $ExistingIP = $IPAddress | Where-Object {$_ -match $CurrentIP.IPAddress} - if ($ExistingIP -ne "$($CurrentIP.IPAddress)/$($CurrentIP.prefixLength)") - { - $RemoveIP = $True - } - } - - if ($RemoveIP) - { - $RemoveNetIPAddressSplat = @{ - IPAddress = $CurrentIP.IPAddress - InterfaceIndex = $CurrentIP.InterfaceIndex - AddressFamily = $CurrentIP.AddressFamily - prefixLength = $CurrentIP.prefixLength - Confirm = $false - ErrorAction = 'Stop' - } - - Remove-NetIPAddress @RemoveNetIPAddressSplat - } - } - } - - $ipAddressObject = Get-IPAddressPrefix -IPAddress $IPAddress -AddressFamily $AddressFamily - - foreach ($singleIP in $ipAddressObject) - { - $prefixLength = $singleIP.prefixLength - - # Build parameter hash table - $Parameters = @{ - IPAddress = $singleIP.IPAddress - prefixLength = $prefixLength - InterfaceAlias = $InterfaceAlias - } - - # Apply the specified IP configuration - $null = New-NetIPAddress @Parameters -ErrorAction Stop - - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.IPAddressSetStateMessage) - ) -join '' ) - } -} # Set-TargetResource - -<# - .SYNOPSIS - Tests the IP address on the interface. - - .PARAMETER IPAddress - The desired IP address. - - .PARAMETER InterfaceAlias - Alias of the network interface for which the IP address should be set. - - .PARAMETER AddressFamily - IP address family. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter()] - [ValidateNotNullOrEmpty()] - [String[]] - $IPAddress, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $InterfaceAlias, - - [Parameter(Mandatory = $True)] - [ValidateSet('IPv4', 'IPv6')] - [String] - $AddressFamily = 'IPv4' - ) - - # Flag to signal whether settings are correct - [Boolean] $desiredConfigurationMatch = $true - - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.CheckingIPAddressMessage) - ) -join '') - - Assert-ResourceProperty @PSBoundParameters - - # Get the current IP Address based on the parameters given. - # First make sure that adapter is available - [Boolean] $adapterBindingReady = $false - [DateTime] $startTime = Get-Date - - while (-not $adapterBindingReady -and (((Get-Date) - $startTime).TotalSeconds) -lt 30) - { - $GetNetIPAddressSplat = @{ - InterfaceAlias = $InterfaceAlias - AddressFamily = $AddressFamily - ErrorAction = 'SilentlyContinue' - } - - $currentIPs = @(Get-NetIPAddress @GetNetIPAddressSplat) - - if ($currentIPs) - { - $adapterBindingReady = $true - } - else - { - Start-Sleep -Milliseconds 200 - } - } # while - - $ipAddressObject = Get-IPAddressPrefix -IPAddress $IPAddress -AddressFamily $AddressFamily - # Test if the IP Address passed is present - foreach ($singleIP in $ipAddressObject) - { - $prefixLength = $singleIP.prefixLength - if ($singleIP.IPAddress -notin $currentIPs.IPAddress) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.IPAddressDoesNotMatchMessage) -f $singleIP,$currentIPs.IPAddress - ) -join '' ) - $desiredConfigurationMatch = $false - } - else - { - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.IPAddressMatchMessage) - ) -join '') - - # Filter the IP addresses for the IP address to check - $filterIP = $currentIPs.Where( { $_.IPAddress -eq $singleIP.IPAddress } ) - - # Only test the Prefix Length if the IP address is present - if (-not $filterIP.prefixLength.Equals([byte]$prefixLength)) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.prefixLengthDoesNotMatchMessage) -f $prefixLength,$currentIPs.prefixLength - ) -join '' ) - $desiredConfigurationMatch = $false - } - else - { - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.prefixLengthMatchMessage) - ) -join '' ) - } - } - } - return $desiredConfigurationMatch -} # Test-TargetResource - -<# - .SYNOPSIS - Check the IP Address details are valid and do not conflict with Address family. - Also checks the prefix length and ensures the interface exists. - If any problems are detected an exception will be thrown. - - .PARAMETER IPAddress - The desired IP address. - - .PARAMETER InterfaceAlias - Alias of the network interface for which the IP address should be set. - - .PARAMETER AddressFamily - IP address family. -#> -function Assert-ResourceProperty -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String[]] - $IPAddress, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $InterfaceAlias, - - [Parameter()] - [ValidateSet('IPv4', 'IPv6')] - [String] - $AddressFamily = 'IPv4' - ) - - $prefixLengthArray = ($IPAddress -split '/')[1] - If ($prefixLengthArray.Count -ne $IPAddress.Count) - { - $prefixLengthArray = $IPAddress | Foreach-Object { - if ($_ -match '\/\d{1,3}') - { - ($_ -split '/')[1] - } - else - { - if ($_.split('.')[0] -in (0..127)) - { - $Value = 8 - } - elseif ($_.split('.')[0] -in (128..191)) - { - $Value = 16 - } - elseif ($_.split('.')[0] -in (192..223)) - { - $Value = 24 - } - if ($AddressFamily -eq 'IPv6') - { - $value = 64 - } - $value - } - } - } - - if (-not (Get-NetAdapter | Where-Object -Property Name -EQ $InterfaceAlias )) - { - $errorId = 'InterfaceNotAvailable' - $errorCategory = [System.Management.Automation.ErrorCategory]::DeviceError - $errorMessage = $($LocalizedData.InterfaceNotAvailableError) -f $InterfaceAlias - $exception = New-Object -TypeName System.InvalidOperationException ` - -ArgumentList $errorMessage - $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord ` - -ArgumentList $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord) - } - foreach ($singleIPAddress in $IPAddress) - { - $singleIP = ($singleIPAddress -split '/')[0] - - if (-not ([System.Net.Ipaddress]::TryParse($singleIP, [ref]0))) - { - $errorId = 'AddressFormatError' - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidArgument - $errorMessage = $($LocalizedData.AddressFormatError) -f $singleIPAddress - $exception = New-Object -TypeName System.InvalidOperationException ` - -ArgumentList $errorMessage - $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord ` - -ArgumentList $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord) - } - - $detectedAddressFamily = ([System.Net.IPAddress]$singleIP).AddressFamily.ToString() - if (($detectedAddressFamily -eq [System.Net.Sockets.AddressFamily]::InterNetwork.ToString()) ` - -and ($AddressFamily -ne 'IPv4')) - { - $errorId = 'AddressMismatchError' - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidArgument - $errorMessage = $($LocalizedData.AddressIPv4MismatchError) -f $singleIPAddress,$AddressFamily - $exception = New-Object -TypeName System.InvalidOperationException ` - -ArgumentList $errorMessage - $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord ` - -ArgumentList $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord) - } - - if (($detectedAddressFamily -eq [System.Net.Sockets.AddressFamily]::InterNetworkV6.ToString()) ` - -and ($AddressFamily -ne 'IPv6')) - { - $errorId = 'AddressMismatchError' - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidArgument - $errorMessage = $($LocalizedData.AddressIPv6MismatchError) -f $singleIPAddress,$AddressFamily - $exception = New-Object -TypeName System.InvalidOperationException ` - -ArgumentList $errorMessage - $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord ` - -ArgumentList $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord) - } - } - foreach ($prefixLength in $prefixLengthArray) - { - $prefixLength = [uint32]::Parse($prefixLength) - if (( - ($AddressFamily -eq 'IPv4') ` - -and (($prefixLength -lt [uint32]0) -or ($prefixLength -gt [uint32]32)) - ) -or ( - ($AddressFamily -eq 'IPv6') ` - -and (($prefixLength -lt [uint32]0) -or ($prefixLength -gt [uint32]128)) - )) - { - $errorId = 'prefixLengthError' - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidArgument - $errorMessage = $($LocalizedData.prefixLengthError) -f $prefixLength,$AddressFamily - $exception = New-Object -TypeName System.InvalidOperationException ` - -ArgumentList $errorMessage - $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord ` - -ArgumentList $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord) - } - } -} # Assert-ResourceProperty - -Export-ModuleMember -function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xIPAddress/MSFT_xIPAddress.schema.mof b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xIPAddress/MSFT_xIPAddress.schema.mof deleted file mode 100644 index dc6b1359..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xIPAddress/MSFT_xIPAddress.schema.mof +++ /dev/null @@ -1,7 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xIPAddress")] -class MSFT_xIPAddress : OMI_BaseResource -{ - [Write, Description("The desired IP address, optionally including prefix length using CIDR notation.")] string IPAddress[]; - [Key, Description("Alias of the network interface for which the IP address should be set.")] string InterfaceAlias; - [Key, Description("IP address family.") ,ValueMap{"IPv4", "IPv6"},Values{"IPv4", "IPv6"}] string AddressFamily; -}; diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xIPAddress/en-US/MSFT_xIPAddress.strings.psd1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xIPAddress/en-US/MSFT_xIPAddress.strings.psd1 deleted file mode 100644 index 67956dcd..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xIPAddress/en-US/MSFT_xIPAddress.strings.psd1 +++ /dev/null @@ -1,20 +0,0 @@ -# Localized resources for MSFT_xIPAddress - -ConvertFrom-StringData @' - GettingIPAddressMessage = Getting the IP Address. - ApplyingIPAddressMessage = Applying the IP Address. - IPAddressSetStateMessage = IP Interface was set to the desired state. - CheckingIPAddressMessage = Checking the IP Address. - IPAddressDoesNotMatchMessage = IP Address does NOT match desired state. Expected {0}, actual {1}. - IPAddressMatchMessage = IP Address is in desired state. - PrefixLengthDoesNotMatchMessage = Prefix Length does NOT match desired state. Expected {0}, actual {1}. - PrefixLengthMatchMessage = Prefix Length is in desired state. - DHCPIsNotDisabledMessage = DHCP is NOT disabled. - DHCPIsAlreadyDisabledMessage = DHCP is already disabled. - DHCPIsNotTestedMessage = DHCP status is ignored when Address Family is IPv6. - InterfaceNotAvailableError = Interface "{0}" is not available. Please select a valid interface and try again. - AddressFormatError = Address "{0}" is not in the correct format. Please correct the Address parameter in the configuration and try again. - AddressIPv4MismatchError = Address "{0}" is in IPv4 format, which does not match server address family {1}. Please correct either of them in the configuration and try again. - AddressIPv6MismatchError = Address "{0}" is in IPv6 format, which does not match server address family {1}. Please correct either of them in the configuration and try again. - PrefixLengthError = A Prefix Length of {0} is not valid for {1} addresses. Please correct the Prefix Length and try again. -'@ diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterBinding/MSFT_xNetAdapterBinding.psm1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterBinding/MSFT_xNetAdapterBinding.psm1 deleted file mode 100644 index daf7beae..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterBinding/MSFT_xNetAdapterBinding.psm1 +++ /dev/null @@ -1,281 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Networking Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.Common' ` - -ChildPath 'NetworkingDsc.Common.psm1')) - -# Import the Networking Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.ResourceHelper' ` - -ChildPath 'NetworkingDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xNetAdapterBinding' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current state of an Adapter Binding on an interface. - - .PARAMETER InterfaceAlias - Specifies the alias of a network interface. Supports the use of '*'. - - .PARAMETER ComponentId - Specifies the underlying name of the transport or filter in the following - form - ms_xxxx, such as ms_tcpip. - - .PARAMETER Ensure - Specifies if the component ID for the Interface should be Enabled or Disabled. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ComponentId, - - [ValidateSet('Enabled', 'Disabled')] - [String] - $State = 'Enabled' - ) - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.GettingNetAdapterBindingMessage -f ` - $InterfaceAlias,$ComponentId) - ) -join '') - - $currentNetAdapterBinding = Get-Binding @PSBoundParameters - - $adapterState = $currentNetAdapterBinding.Enabled | - Sort-Object -Unique - - if ( $adapterState.Count -eq 2) - { - $currentEnabled = 'Mixed' - } - elseif ( $adapterState -eq $true ) - { - $currentEnabled = 'Enabled' - } - else - { - $currentEnabled = 'Disabled' - } - - $returnValue = @{ - InterfaceAlias = $InterfaceAlias - ComponentId = $ComponentId - State = $State - CurrentState = $currentEnabled - } - - return $returnValue -} # Get-TargetResource - -<# - .SYNOPSIS - Sets the Adapter Binding on a specific interface. - - .PARAMETER InterfaceAlias - Specifies the alias of a network interface. Supports the use of '*'. - - .PARAMETER ComponentId - Specifies the underlying name of the transport or filter in the following - form - ms_xxxx, such as ms_tcpip. - - .PARAMETER Ensure - Specifies if the component ID for the Interface should be Enabled or Disabled. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ComponentId, - - [ValidateSet('Enabled', 'Disabled')] - [String] - $State = 'Enabled' - ) - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.ApplyingNetAdapterBindingMessage -f ` - $InterfaceAlias,$ComponentId) - ) -join '') - - $currentNetAdapterBinding = Get-Binding @PSBoundParameters - - # Remove the State so we can splat - $null = $PSBoundParameters.Remove('State') - - if ($State -eq 'Enabled') - { - Enable-NetAdapterBinding @PSBoundParameters - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.NetAdapterBindingEnabledMessage -f ` - $InterfaceAlias,$ComponentId) - ) -join '' ) - } - else - { - Disable-NetAdapterBinding @PSBoundParameters - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.NetAdapterBindingDisabledMessage -f ` - $InterfaceAlias,$ComponentId) - ) -join '' ) - } # if -} # Set-TargetResource - -<# - .SYNOPSIS - Tests the current state of an Adapter Binding on an interface. - - .PARAMETER InterfaceAlias - Specifies the alias of a network interface. Supports the use of '*'. - - .PARAMETER ComponentId - Specifies the underlying name of the transport or filter in the following - form - ms_xxxx, such as ms_tcpip. - - .PARAMETER Ensure - Specifies if the component ID for the Interface should be Enabled or Disabled. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ComponentId, - - [ValidateSet('Enabled', 'Disabled')] - [String] - $State = 'Enabled' - ) - - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.CheckingNetAdapterBindingMessage -f ` - $InterfaceAlias,$ComponentId) - ) -join '') - - $currentNetAdapterBinding = Get-Binding @PSBoundParameters - - $adapterState = $currentNetAdapterBinding.Enabled | - Sort-Object -Unique - - if ( $adapterState.Count -eq 2) - { - $currentEnabled = 'Mixed' - } - elseif ( $adapterState -eq $true ) - { - $currentEnabled = 'Enabled' - } - else - { - $currentEnabled = 'Disabled' - } - - # Test if the binding is in the correct state - if ($currentEnabled -ne $State) - { - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.NetAdapterBindingDoesNotMatchMessage -f ` - $InterfaceAlias,$ComponentId,$State,$currentEnabled) - ) -join '' ) - return $false - } - else - { - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.NetAdapterBindingMatchMessage -f ` - $InterfaceAlias,$ComponentId) - ) -join '' ) - return $true - } # if -} # Test-TargetResource - -<# - .SYNOPSIS - Ensures the interface and component Id exists and returns the Net Adapter binding object. - - .PARAMETER InterfaceAlias - Specifies the alias of a network interface. Supports the use of '*'. - - .PARAMETER ComponentId - Specifies the underlying name of the transport or filter in the following - form - ms_xxxx, such as ms_tcpip. - - .PARAMETER Ensure - Specifies if the component ID for the Interface should be Enabled or Disabled. -#> -function Get-Binding -{ - [CmdletBinding()] - [OutputType([Microsoft.Management.Infrastructure.CimInstance])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ComponentId, - - [ValidateSet('Enabled', 'Disabled')] - [String] - $State = 'Enabled' - ) - - if (-not (Get-NetAdapter -Name $InterfaceAlias -ErrorAction SilentlyContinue)) - { - $errorId = 'InterfaceNotAvailable' - $errorCategory = [System.Management.Automation.ErrorCategory]::DeviceError - $errorMessage = $($LocalizedData.InterfaceNotAvailableError) -f $InterfaceAlias - $exception = New-Object -TypeName System.InvalidOperationException ` - -ArgumentList $errorMessage - $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord ` - -ArgumentList $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord) - } # if - - $binding = Get-NetAdapterBinding ` - -InterfaceAlias $InterfaceAlias ` - -ComponentId $ComponentId ` - -ErrorAction Stop - - return $binding -} # Get-Binding - -Export-ModuleMember -function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterBinding/MSFT_xNetAdapterBinding.schema.mof b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterBinding/MSFT_xNetAdapterBinding.schema.mof deleted file mode 100644 index 343aeaf8..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterBinding/MSFT_xNetAdapterBinding.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("xNetAdapterBinding")] -class MSFT_xNetAdapterBinding : OMI_BaseResource -{ - [Key, Description("Specifies the alias of a network interface. Supports the use of '*'.")] string InterfaceAlias; - [Key, Description("Specifies the underlying name of the transport or filter in the following form - ms_xxxx, such as ms_tcpip.")] string ComponentId; - [Write, Description("Specifies if the component ID for the Interface should be Enabled or Disabled."), ValueMap{"Enabled", "Disabled"}, Values{"Enabled", "Disabled"}] string State; - [Read, Description("Returns the current state of the component ID for the Interfaces."), ValueMap{"Enabled", "Disabled","Mixed"}, Values{"Enabled", "Disabled","Mixed"}] string CurrentState; -}; diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterBinding/en-US/MSFT_xNetAdapterBinding.strings.psd1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterBinding/en-US/MSFT_xNetAdapterBinding.strings.psd1 deleted file mode 100644 index 27c9e51c..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterBinding/en-US/MSFT_xNetAdapterBinding.strings.psd1 +++ /dev/null @@ -1,13 +0,0 @@ -# Localized resources for MSFT_xNetAdapterBinding - -ConvertFrom-StringData @' - GettingNetAdapterBindingMessage = Getting the '{0}' Inerface '{1}' Binding. - ApplyingNetAdapterBindingMessage = Applying the '{0}' Inerface '{1}' Binding. - NetAdapterBindingEnabledMessage = '{0}' Inerface '{1}' Binding was Enabled. - NetAdapterBindingDisabledMessage = '{0}' Inerface '{1}' Binding was Disabled. - CheckingNetAdapterBindingMessage = Checking the '{0}' Inerface '{1}' Binding. - NetAdapterBindingDoesNotMatchMessage = '{0}' Inerface '{1}' Binding does NOT match desired state. Expected {2}, actual {3}. - NetAdapterBindingMatchMessage = '{0}' Inerface '{1}' Binding is in desired state. - InterfaceNotAvailableError = Interface '{0}' is not available. Please select a valid interface and try again. - ComponentIdNotAvailableError = Inerface '{0}' does not have '{1}' bound to it. Please select a bound component Id and try again. -'@ diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterLso/MSFT_xNetAdapterLso.psm1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterLso/MSFT_xNetAdapterLso.psm1 deleted file mode 100644 index 73ee69b7..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterLso/MSFT_xNetAdapterLso.psm1 +++ /dev/null @@ -1,237 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Networking Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.Common' ` - -ChildPath 'NetworkingDsc.Common.psm1')) - -# Import the Networking Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.ResourceHelper' ` - -ChildPath 'NetworkingDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xNetAdapterLso' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# -.SYNOPSIS - Gets the current state of NetAdapterLso for a adapter. - -.PARAMETER Name - Specifies the name of the network adapter to check. - -.PARAMETER Protocol - Specifies which protocol to target. - -.PARAMETER State - Specifies the LSO state for the protocol. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [String] - $Name, - - [parameter(Mandatory = $true)] - [ValidateSet("V1IPv4","IPv4","IPv6")] - [String] - $Protocol, - - [parameter(Mandatory = $true)] - [Boolean] - $State - ) - - try - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $localizedData.CheckingNetAdapterMessage - ) -join '') - - $netAdapter = Get-NetAdapterLso -Name $Name -ErrorAction Stop - - if ($netAdapter) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NetAdapterTestingStateMessage -f $Name, $Protocol) - ) -join '') - - $result = @{ - Name = $Name - Protocol = $Protocol - } - switch ($Protocol) { - "V1IPv4" { $result.add('State', $netAdapter.V1IPv4Enabled) } - "IPv4" { $result.add('State', $netAdapter.IPv4Enabled) } - "IPv6" { $result.add('State', $netAdapter.IPv6Enabled) } - Default {"Should not be called."} - } - return $result - } - } - catch - { - throw $localizedData.NetAdapterNotFoundMessage - } - -} - -<# -.SYNOPSIS - Sets the NetAdapterLso resource state. - -.PARAMETER Name - Specifies the name of the network adapter to check. - -.PARAMETER Protocol - Specifies which protocol to target. - -.PARAMETER State - Specifies the LSO state for the protocol. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [String] - $Name, - - [parameter(Mandatory = $true)] - [ValidateSet("V1IPv4","IPv4","IPv6")] - [String] - $Protocol, - - [parameter(Mandatory = $true)] - [Boolean] - $State - ) - - try - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $localizedData.CheckingNetAdapterMessage - ) -join '') - - $netAdapter = Get-NetAdapterLso -Name $Name -ErrorAction Stop - - if ($netAdapter) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NetAdapterTestingStateMessage -f $Name, $Protocol) - ) -join '') - - if ($Protocol -eq "V1IPv4" -and $State -ne $netAdapter.V1IPv4Enabled) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NetAdapterApplyingChangesMessage -f ` - $Name, $Protocol, $($netAdapter.V1IPv4Enabled.ToString()), $($State.ToString()) ) - ) -join '') - - Set-NetAdapterLso -Name $Name -V1IPv4Enabled $State - } - elseif ($Protocol -eq "IPv4" -and $State -ne $netAdapter.IPv4Enabled) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NetAdapterApplyingChangesMessage -f ` - $Name, $Protocol, $($netAdapter.IPv4Enabled.ToString()), $($State.ToString()) ) - ) -join '') - - Set-NetAdapterLso -Name $Name -IPv4Enabled $State - } - elseif ($Protocol -eq "IPv6" -and $State -ne $netAdapter.IPv6Enabled) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.NetAdapterApplyingChangesMessage -f ` - $Name, $Protocol, $($netAdapter.IPv6Enabled.ToString()), $($State.ToString()) ) - ) -join '') - - Set-NetAdapterLso -Name $Name -IPv6Enabled $State - } - } - } - catch - { - throw $LocalizedData.NetAdapterNotFoundMessage - } - -} - -<# -.SYNOPSIS - Tests if the NetAdapterLso resource state is desired state. - -.PARAMETER Name - Specifies the name of the network adapter to check. - -.PARAMETER Protocol - Specifies which protocol to target. - -.PARAMETER State - Specifies the LSO state for the protocol. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [String] - $Name, - - [parameter(Mandatory = $true)] - [ValidateSet("V1IPv4","IPv4","IPv6")] - [String] - $Protocol, - - [parameter(Mandatory = $true)] - [Boolean] - $State - ) - - try - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $localizedData.CheckingNetAdapterMessage - ) -join '') - - $netAdapter = Get-NetAdapterLso -Name $Name -ErrorAction Stop - - if ($netAdapter) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $localizedData.NetAdapterTestingStateMessage -f ` - $Name, $Protocol - ) -join '') - - switch ($Protocol) { - "V1IPv4" { return ($State -eq $netAdapter.V1IPv4Enabled) } - "IPv4" { return ($State -eq $netAdapter.IPv4Enabled) } - "IPv6" { return ($State -eq $netAdapter.IPv6Enabled) } - Default {"Should not be called."} - } - } - } - catch - { - throw $LocalizedData.NetAdapterNotFoundMessage - } - -} diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterLso/MSFT_xNetAdapterLso.schema.mof b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterLso/MSFT_xNetAdapterLso.schema.mof deleted file mode 100644 index 7a4dc219..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterLso/MSFT_xNetAdapterLso.schema.mof +++ /dev/null @@ -1,7 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xNetAdapterLso")] -class MSFT_xNetAdapterLso : OMI_BaseResource -{ - [Key, Description("Specifies the name of network adapter.")] String Name; - [Required, Description("Specifies which protocol to make changes to."), ValueMap{"V1IPv4","IPv4","IPv6"}, Values{"V1IPv4","IPv4","IPv6"}] String Protocol; - [Required, Description("Specifies whether LSO should be enabled or disabled.")] Boolean State; -}; diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterLso/en-US/MSFT_xNetAdapterLso.strings.psd1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterLso/en-US/MSFT_xNetAdapterLso.strings.psd1 deleted file mode 100644 index 65f0c682..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterLso/en-US/MSFT_xNetAdapterLso.strings.psd1 +++ /dev/null @@ -1,9 +0,0 @@ -# Localized resources for MSFT_xNetAdapterLso - -ConvertFrom-StringData @' - CheckingNetAdapterMessage = Checking if network adapter exists or not. - NetAdapterNotFoundMessage = Network adapter not found - NetAdapterTestingStateMessage = Checking if adapter {0} {1} is in desired state. - NetAdapterIsInDesiredStateMessage = Network adapter {0} {1} is in desired state {2}. - NetAdapterApplyingChangesMessage = Network adapter {0} {1} was {2}, should be {3}, applying changes. -'@ diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterName/MSFT_xNetAdapterName.psm1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterName/MSFT_xNetAdapterName.psm1 deleted file mode 100644 index 3d207318..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterName/MSFT_xNetAdapterName.psm1 +++ /dev/null @@ -1,399 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Networking Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.Common' ` - -ChildPath 'NetworkingDsc.Common.psm1')) - -# Import the Networking Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.ResourceHelper' ` - -ChildPath 'NetworkingDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xNetAdapterName' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - This function will get the network adapter based on the provided - parameters. - - .PARAMETER NewName - Specifies the new name of the network adapter. - - .PARAMETER Name - This is the name of the network adapter to find. - - .PARAMETER PhysicalMediaType - This is the media type of the network adapter to find. - - .PARAMETER Status - This is the status of the network adapter to find. - - .PARAMETER MacAddress - This is the MAC address of the network adapter to find. - - .PARAMETER InterfaceDescription - This is the interface description of the network adapter to find. - - .PARAMETER InterfaceIndex - This is the interface index of the network adapter to find. - - .PARAMETER InterfaceGuid - This is the interface GUID of the network adapter to find. - - .PARAMETER DriverDescription - This is the driver description of the network adapter. - - .PARAMETER InterfaceNumber - This is the interface number of the network adapter if more than one - are returned by the parameters. - - .PARAMETER IgnoreMultipleMatchingAdapters - This switch will suppress an error occurring if more than one matching - adapter matches the parameters passed. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $NewName, - - [ValidateNotNullOrEmpty()] - [System.String] - $Name, - - [Parameter()] - [System.String] - $PhysicalMediaType, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [ValidateSet('Up','Disconnected','Disabled')] - [System.String] - $Status = 'Up', - - [Parameter()] - [System.String] - $MacAddress, - - [Parameter()] - [System.String] - $InterfaceDescription, - - [Parameter()] - [System.UInt32] - $InterfaceIndex, - - [Parameter()] - [System.String] - $InterfaceGuid, - - [Parameter()] - [System.String] - $DriverDescription, - - [Parameter()] - [System.UInt32] - $InterfaceNumber = 1, - - [Parameter()] - [System.Boolean] - $IgnoreMultipleMatchingAdapters = $false - ) - - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.GettingNetAdapterNameMessage -f $NewName) - ) -join '') - - $adapter = Find-NetworkAdapter ` - -Name $NewName ` - -ErrorAction SilentlyContinue - - if (-not $adapter) - { - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.FindNetAdapterMessage) - ) -join '') - - $null = $PSBoundParameters.Remove('NewName') - - $adapter = Find-NetworkAdapter ` - @PSBoundParameters ` - -ErrorAction Stop - } - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.NetAdapterNameFoundMessage -f $adapter.Name) - ) -join '') - - $returnValue = @{ - Name = $adapter.Name - PhysicalMediaType = $adapter.PhysicalMediaType - Status = $adapter.Status - MacAddress = $adapter.MacAddress - InterfaceDescription = $adapter.InterfaceDescription - InterfaceIndex = $adapter.InterfaceIndex - InterfaceGuid = $adapter.InterfaceGuid - DriverDescription = $adapter.DriverDescription - InterfaceNumber = $InterfaceNumber - IgnoreMultipleMatchingAdapters = $IgnoreMultipleMatchingAdapters - } - - return $returnValue -} # Get-TargetResource - -<# - .SYNOPSIS - This function will rename a network adapter that matches the parameters. - - .PARAMETER NewName - Specifies the new name of the network adapter. - - .PARAMETER Name - This is the name of the network adapter to find. - - .PARAMETER PhysicalMediaType - This is the media type of the network adapter to find. - - .PARAMETER Status - This is the status of the network adapter to find. - - .PARAMETER MacAddress - This is the MAC address of the network adapter to find. - - .PARAMETER InterfaceDescription - This is the interface description of the network adapter to find. - - .PARAMETER InterfaceIndex - This is the interface index of the network adapter to find. - - .PARAMETER InterfaceGuid - This is the interface GUID of the network adapter to find. - - .PARAMETER DriverDescription - This is the driver description of the network adapter. - - .PARAMETER InterfaceNumber - This is the interface number of the network adapter if more than one - are returned by the parameters. - - .PARAMETER IgnoreMultipleMatchingAdapters - This switch will suppress an error occurring if more than one matching - adapter matches the parameters passed. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $NewName, - - [ValidateNotNullOrEmpty()] - [System.String] - $Name, - - [Parameter()] - [System.String] - $PhysicalMediaType, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [ValidateSet('Up','Disconnected','Disabled')] - [System.String] - $Status = 'Up', - - [Parameter()] - [System.String] - $MacAddress, - - [Parameter()] - [System.String] - $InterfaceDescription, - - [Parameter()] - [System.UInt32] - $InterfaceIndex, - - [Parameter()] - [System.String] - $InterfaceGuid, - - [Parameter()] - [System.String] - $DriverDescription, - - [Parameter()] - [System.UInt32] - $InterfaceNumber = 1, - - [Parameter()] - [System.Boolean] - $IgnoreMultipleMatchingAdapters = $false - ) - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.SettingNetAdapterNameMessage -f $NewName) - ) -join '') - - $null = $PSBoundParameters.Remove('NewName') - - $adapter = Find-NetworkAdapter ` - @PSBoundParameters ` - -ErrorAction Stop - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.RenamingNetAdapterNameMessage -f $adapter.Name,$NewName) - ) -join '') - - $adapter | Rename-NetAdapter -NewName $NewName - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.NetAdapterNameRenamedMessage -f $NewName) - ) -join '') -} # Set-TargetResource - -<# - .SYNOPSIS - This will check if the network adapter that matches the parameters needs - to be returned. - - .PARAMETER NewName - Specifies the new name of the network adapter. - - .PARAMETER Name - This is the name of the network adapter to find. - - .PARAMETER PhysicalMediaType - This is the media type of the network adapter to find. - - .PARAMETER Status - This is the status of the network adapter to find. - - .PARAMETER MacAddress - This is the MAC address of the network adapter to find. - - .PARAMETER InterfaceDescription - This is the interface description of the network adapter to find. - - .PARAMETER InterfaceIndex - This is the interface index of the network adapter to find. - - .PARAMETER InterfaceGuid - This is the interface GUID of the network adapter to find. - - .PARAMETER DriverDescription - This is the driver description of the network adapter. - - .PARAMETER InterfaceNumber - This is the interface number of the network adapter if more than one - are returned by the parameters. - - .PARAMETER IgnoreMultipleMatchingAdapters - This switch will suppress an error occurring if more than one matching - adapter matches the parameters passed. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $NewName, - - [ValidateNotNullOrEmpty()] - [System.String] - $Name, - - [Parameter()] - [System.String] - $PhysicalMediaType, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [ValidateSet('Up','Disconnected','Disabled')] - [System.String] - $Status = 'Up', - - [Parameter()] - [System.String] - $MacAddress, - - [Parameter()] - [System.String] - $InterfaceDescription, - - [Parameter()] - [System.UInt32] - $InterfaceIndex, - - [Parameter()] - [System.String] - $InterfaceGuid, - - [Parameter()] - [System.String] - $DriverDescription, - - [Parameter()] - [System.UInt32] - $InterfaceNumber = 1, - - [Parameter()] - [System.Boolean] - $IgnoreMultipleMatchingAdapters = $false - ) - - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.TestingNetAdapterNameMessage -f $NewName) - ) -join '') - - $null = $PSBoundParameters.Remove('NewName') - - # Can an adapter be found with the new name? - $adapterWithNewName = Find-NetworkAdapter ` - -Name $NewName ` - -Verbose:$Verbose ` - -ErrorAction SilentlyContinue - - if ($adapterWithNewName) - { - # An adapter was found matching the new name - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.NetAdapterWithNewNameExistsMessage -f $adapterWithNewName.Name) - ) -join '') - return $true - } - else - { - # Find an adapter matching the parameters - throw if none can be found - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.FindNetAdapterMessage) - ) -join '') - - $adapter = Find-NetworkAdapter ` - @PSBoundParameters ` - -ErrorAction Stop - - # An adapter was found that needs to be changed to the new name - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.NetAdapterNameNotMatchMessage -f $adapter.Name,$NewName) - ) -join '') - return $false - } # if -} # Test-TargetResource - -Export-ModuleMember -function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterName/MSFT_xNetAdapterName.schema.mof b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterName/MSFT_xNetAdapterName.schema.mof deleted file mode 100644 index 0beae1e3..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterName/MSFT_xNetAdapterName.schema.mof +++ /dev/null @@ -1,15 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("xNetAdapterName")] -class MSFT_xNetAdapterName : OMI_BaseResource -{ - [Key, Description("Specifies the new name of the network adapter.")] String NewName; - [Write, Description("This is the name of the network adapter to find.")] String Name; - [Write, Description("This is the media type of the network adapter to find.")] String PhysicalMediaType; - [Write, Description("This is the status of the network adapter to find."), ValueMap{"Up", "Disconnected", "Disabled"}, Values{"Up", "Disconnected", "Disabled"}] String Status; - [Write, Description("This is the MAC address of the network adapter to find.")] String MacAddress; - [Write, Description("This is the interface description of the network adapter to find.")] String InterfaceDescription; - [Write, Description("This is the interface index of the network adapter to find.")] UInt32 InterfaceIndex; - [Write, Description("This is the interface GUID of the network adapter to find.")] String InterfaceGuid; - [Write, Description("This is the driver description of the network adapter.")] String DriverDescription; - [Write, Description("This is the interface number of the network adapter if more than one are returned by the parameters.")] UInt32 InterfaceNumber; - [Write, Description("This switch will suppress an error occurring if more than one matching adapter matches the parameters passed.")] Boolean IgnoreMultipleMatchingAdapters; -}; diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterName/en-us/MSFT_xNetAdapterName.strings.psd1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterName/en-us/MSFT_xNetAdapterName.strings.psd1 deleted file mode 100644 index 5c925d65..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterName/en-us/MSFT_xNetAdapterName.strings.psd1 +++ /dev/null @@ -1,11 +0,0 @@ -ConvertFrom-StringData @' - GettingNetAdapterNameMessage = Getting the network adapter Name '{0}'. - FindNetAdapterMessage = Finding network adapter matching search criteria. - NetAdapterNameFoundMessage = network adapter '{0}' found. - SettingNetAdapterNameMessage = Setting the network adapter Name '{0}'. - RenamingNetAdapterNameMessage = Renaming network adapter '{0}' to '{1}'. - NetAdapterNameRenamedMessage = network adapter renamed to '{0}'. - TestingNetAdapterNameMessage = Testing the network adapter Name '{0}'. - NetAdapterWithNewNameExistsMessage = A network adapter was found with the intended new name '{0}' of the Adapter. No rename required. - NetAdapterNameNotMatchMessage = network adapter Name '{0}' does not match the adapter '{1}' that was found. Rename required. -'@ diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterRDMA/MSFT_xNetAdapterRDMA.psm1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterRDMA/MSFT_xNetAdapterRDMA.psm1 deleted file mode 100644 index 144d1104..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterRDMA/MSFT_xNetAdapterRDMA.psm1 +++ /dev/null @@ -1,156 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Networking Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.Common' ` - -ChildPath 'NetworkingDsc.Common.psm1')) - -# Import the Networking Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.ResourceHelper' ` - -ChildPath 'NetworkingDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xNetAdapterRDMA' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# -.SYNOPSIS - Gets MSFT_xVMNetAdapterRDMA resource current state. - -.PARAMETER Name - Specifies the name of the network adapter for which the RDMA configuration needs to be retrieved. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [String] - $Name - ) - - $configuration = @{ - Name = $Name - } - - try - { - Write-Verbose -Message $localizedData.CheckNetAdapter - $netAdapter = Get-NetAdapterRdma -Name $Name -ErrorAction Stop - if ($netAdapter) - { - Write-Verbose -Message $localizedData.CheckNetAdapterRDMA - $configuration.Add('Enabled',$netAdapter.Enabled) - return $configuration - } - } - catch - { - throw $localizedData.NetAdapterNotFound - } -} - -<# -.SYNOPSIS - Sets MSFT_xVMNetAdapterRDMA resource state. - -.PARAMETER Name - Specifies the name of the network adapter for which the - RDMA configuration needs to be retrieved. - -.PARAMETER Enabled - Specifies if the RDMA configuration should be enabled or disabled. - This is a boolean value and the default is $true. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [String] - $Name, - - [Boolean] - $Enabled = $true - ) - - $configuration = @{ - Name = $Name - } - - try - { - Write-Verbose -Message $localizedData.CheckNetAdapter - $netAdapter = Get-NetAdapterRdma -Name $Name -ErrorAction Stop - if ($netAdapter) - { - Write-Verbose -Message $localizedData.CheckNetAdapterRDMA - if ($netAdapter.Enabled -ne $Enabled) - { - Write-Verbose -Message $localizedData.NetAdapterRDMADifferent - Write-Verbose -Message $localizedData.SetNetAdapterRDMA - Set-NetAdapterRdma -Name $Name -Enabled $Enabled - } - } - } - catch - { - throw $localizedData.NetAdapterNotFound - } -} - -<# -.SYNOPSIS - Tests if MSFT_xVMNetAdapterRDMA resource state is indeed desired state or not. - -.PARAMETER Name - Specifies the name of the network adapter for which the - RDMA configuration needs to be retrieved. - -.PARAMETER Enabled - Specifies if the RDMA configuration should be enabled or disabled. - This is a boolean value and the default is $true. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [String] - $Name, - - [Boolean] - $Enabled = $true - ) - - try - { - Write-Verbose -Message $localizedData.CheckNetAdapter - $netAdapter = Get-NetAdapterRdma -Name $Name -ErrorAction Stop - if ($netAdapter) - { - Write-Verbose -Message $localizedData.CheckNetAdapterRDMA - if ($netAdapter.Enabled -ne $Enabled) - { - Write-Verbose -Message $localizedData.NetAdapterRDMADifferent - return $false - } - else - { - Write-Verbose -Message $localizedData.NetAdapterRDMAMatches - return $true - } - } - } - catch - { - throw $localizedData.NetAdapterNotFound - } -} diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterRDMA/MSFT_xNetAdapterRDMA.schema.mof b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterRDMA/MSFT_xNetAdapterRDMA.schema.mof deleted file mode 100644 index 8883f754..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterRDMA/MSFT_xNetAdapterRDMA.schema.mof +++ /dev/null @@ -1,6 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xNetAdapterRDMA")] -class MSFT_xNetAdapterRDMA : OMI_BaseResource -{ - [Key, Description("Specifies the name of network adapter for which RDMA needs to be configured.")] String Name; - [Write, Description("Specifies whether RDMA is enabled or disabled.")] Boolean Enabled; -}; diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterRDMA/en-US/MSFT_xNetAdapterRDMA.strings.psd1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterRDMA/en-US/MSFT_xNetAdapterRDMA.strings.psd1 deleted file mode 100644 index db6e32d3..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetAdapterRDMA/en-US/MSFT_xNetAdapterRDMA.strings.psd1 +++ /dev/null @@ -1,10 +0,0 @@ -# Localized resources for MSFT_xNetAdapterRDMA - -ConvertFrom-StringData @' - CheckNetAdapter = Checking if network adapter exists or not. - CheckNetAdapterRDMA = Checking if RDMA is enabled and in desired state for this adapter. - NetAdapterNotFound = Network Adapter not found. - NetAdapterRDMADifferent = Network adapter RDMA setting is not in desired state. This will be configured. - SetNetAdapterRDMA = Setting network adapter RDMA configuration to desired state. - NetAdapterRDMAMatches = Network adapter RDMA configuration is in desired state. No action needed. -'@ diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetBIOS/MSFT_xNetBIOS.psm1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetBIOS/MSFT_xNetBIOS.psm1 deleted file mode 100644 index 290716ee..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetBIOS/MSFT_xNetBIOS.psm1 +++ /dev/null @@ -1,196 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Networking Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.Common' ` - -ChildPath 'NetworkingDsc.Common.psm1')) - -# Import the Networking Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.ResourceHelper' ` - -ChildPath 'NetworkingDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xNetBIOS' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -#region check NetBIOSSetting enum loaded, if not load -try -{ - [void][reflection.assembly]::GetAssembly([NetBIOSSetting]) -} -catch -{ - Add-Type -TypeDefinition @' - public enum NetBiosSetting - { - Default, - Enable, - Disable - } -'@ -} -#endregion - -<# - .SYNOPSIS - Returns the current state of the Net Bios on an interface. - - .PARAMETER InterfaceAlias - Specifies the alias of a network interface. Supports the use of '*'. - - .PARAMETER Setting - Default - Use NetBios settings from the DHCP server. If static IP, Enable NetBIOS. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $InterfaceAlias, - - [parameter(Mandatory = $true)] - [ValidateSet("Default","Enable","Disable")] - [System.String] - $Setting - ) - - Write-Verbose -Message ($LocalizedData.GettingNetBiosSetting -f $InterfaceAlias) - - $netadapterparams = @{ - ClassName = 'Win32_NetworkAdapter' - Filter = 'NetConnectionID="{0}"' -f $InterfaceAlias - } - - $netAdapterConfig = Get-CimInstance @netadapterparams -ErrorAction Stop | - Get-CimAssociatedInstance ` - -ResultClassName Win32_NetworkAdapterConfiguration ` - -ErrorAction Stop - - return @{ - InterfaceAlias = $InterfaceAlias - Setting = $([NETBIOSSetting].GetEnumValues()[$netAdapterConfig.TcpipNetbiosOptions]) - } -} - -<# - .SYNOPSIS - Sets the state of the Net Bios on an interface. - - .PARAMETER InterfaceAlias - Specifies the alias of a network interface. Supports the use of '*'. - - .PARAMETER Setting - Default - Use NetBios settings from the DHCP server. If static IP, Enable NetBIOS. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $InterfaceAlias, - - [parameter(Mandatory = $true)] - [ValidateSet("Default","Enable","Disable")] - [System.String] - $Setting - ) - - $netadapterparams = @{ - ClassName = 'Win32_NetworkAdapter' - Filter = 'NetConnectionID="{0}"' -f $InterfaceAlias - } - $netAdapterConfig = Get-CimInstance @netadapterparams -ErrorAction Stop | - Get-CimAssociatedInstance ` - -ResultClassName Win32_NetworkAdapterConfiguration ` - -ErrorAction Stop - - if ($Setting -eq [NETBIOSSetting]::Default) - { - Write-Verbose -Message $LocalizedData.ResetToDefaut - #If DHCP is not enabled, settcpipnetbios CIM Method won't take 0 so overwrite registry entry instead. - $regParam = @{ - Path = "HKLM:\SYSTEM\CurrentControlSet\Services\NetBT\Parameters\Interfaces\Tcpip_$($NetAdapterConfig.SettingID)" - Name = 'NetbiosOptions' - Value = 0 - } - $null = Set-ItemProperty @regParam - } - else - { - Write-Verbose -Message ($LocalizedData.SetNetBIOS -f $Setting) - $null = $netAdapterConfig | - Invoke-CimMethod -MethodName SetTcpipNetbios -ErrorAction Stop -Arguments @{ - TcpipNetbiosOptions = [uint32][NETBIOSSetting]::$Setting.value__ - } - } -} - -<# - .SYNOPSIS - Tests the current state the Net Bios on an interface. - - .PARAMETER InterfaceAlias - Specifies the alias of a network interface. Supports the use of '*'. - - .PARAMETER Setting - Default - Use NetBios settings from the DHCP server. If static IP, Enable NetBIOS. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $InterfaceAlias, - - [parameter(Mandatory = $true)] - [ValidateSet("Default","Enable","Disable")] - [System.String] - $Setting - ) - - $nic = Get-CimInstance ` - -ClassName Win32_NetworkAdapter ` - -Filter "NetConnectionID=`"$InterfaceAlias`"" - if ($null -ne $nic) - { - Write-Verbose -Message ($LocalizedData.InterfaceDetected -f $InterfaceAlias,$nic.InterfaceIndex) - } - else - { - $errorParam = @{ - Message = ($LocalizedData.NICNotFound -f $InterfaceAlias) - ArgumentName = 'InterfaceAlias' - } - New-InvalidArgumentException @errorParam - } - - $nicConfig = $NIC | Get-CimAssociatedInstance -ResultClassName Win32_NetworkAdapterConfiguration - - Write-Verbose -Message ($LocalizedData.CurrentNetBiosSetting -f [NETBIOSSetting].GetEnumValues()[$NICConfig.TcpipNetbiosOptions]) - - $desiredSetting = ([NETBIOSSetting]::$($Setting)).value__ - Write-Verbose -Message ($LocalizedData.DesiredSetting -f $Setting) - - if ($nicConfig.TcpipNetbiosOptions -eq $desiredSetting) - { - Write-Verbose -Message $LocalizedData.InDesiredState - return $true - } - else - { - Write-Verbose -Message $LocalizedData.NotInDesiredState - return $false - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetBIOS/MSFT_xNetBIOS.schema.mof b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetBIOS/MSFT_xNetBIOS.schema.mof deleted file mode 100644 index d9e516a0..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetBIOS/MSFT_xNetBIOS.schema.mof +++ /dev/null @@ -1,7 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xNetBIOS")] -class MSFT_xNetBIOS : OMI_BaseResource -{ - [Key, Description("Specifies the alias of a network interface.")] String InterfaceAlias; - [Required, Description("Default - Use NetBios settings from the DHCP server. If static IP, Enable NetBIOS."), ValueMap{"Default","Enable","Disable"}, Values{"Default","Enable","Disable"}] String Setting; -}; diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetBIOS/en-US/MSFT_xNetBIOS.strings.psd1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetBIOS/en-US/MSFT_xNetBIOS.strings.psd1 deleted file mode 100644 index e5e3db0b..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetBIOS/en-US/MSFT_xNetBIOS.strings.psd1 +++ /dev/null @@ -1,13 +0,0 @@ -# Localized resources for MSFT_xNetBIOS - -ConvertFrom-StringData @' - GettingNetBiosSetting = Getting NetBIOS Configuration for Interface {0}. - InterfaceDetected = Interface {0} detected with Index number: {1}. - CurrentNetBiosSetting = Current NetBIOS Configuration: {0}. - DesiredSetting = Desired NetBIOS Configuration: {0}. - InDesiredState = NetBIOS configuration is in desired state. - NotInDesiredState = NetBIOS configuration is not in desired state. - ResetToDefaut = NetBIOS configuration will be reset to default. - SetNetBIOS = NetBIOS configuration will be set to: {0}. - NICNotFound = Interface {0} was not found. -'@ diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetConnectionProfile/MSFT_xNetConnectionProfile.psm1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetConnectionProfile/MSFT_xNetConnectionProfile.psm1 deleted file mode 100644 index 2c50ef60..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetConnectionProfile/MSFT_xNetConnectionProfile.psm1 +++ /dev/null @@ -1,232 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Networking Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.Common' ` - -ChildPath 'NetworkingDsc.Common.psm1')) - -# Import the Networking Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.ResourceHelper' ` - -ChildPath 'NetworkingDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xNetConnectionProfile' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current Networking Connection Profile for the specified interface. - - .PARAMETER InterfaceAlias - Specifies the alias for the Interface that is being changed. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Position = 0, Mandatory = $true)] - [string] - $InterfaceAlias - ) - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.GettingNetConnectionProfile) -f $InterfaceAlias - ) -join '') - - $result = Get-NetConnectionProfile -InterfaceAlias $InterfaceAlias - - return @{ - InterfaceAlias = $result.InterfaceAlias - NetworkCategory = $result.NetworkCategory - IPv4Connectivity = $result.IPv4Connectivity - IPv6Connectivity = $result.IPv6Connectivity - } -} - -<# - .SYNOPSIS - Sets the Network Connection Profile for a specified interface. - - .PARAMETER InterfaceAlias - Specifies the alias for the Interface that is being changed. - - .PARAMETER IPv4Connectivity - Specifies the IPv4 Connection Value. - - .PARAMETER IPv6Connectivity - Specifies the IPv6 Connection Value. - - .PARAMETER NetworkCategory - Sets the Network Category for the interface -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [string] - $InterfaceAlias, - - [ValidateSet('Disconnected', 'NoTraffic', 'Subnet', 'LocalNetwork', 'Internet')] - [string] - $IPv4Connectivity, - - [ValidateSet('Disconnected', 'NoTraffic', 'Subnet', 'LocalNetwork', 'Internet')] - [string] - $IPv6Connectivity, - - [ValidateSet('Public', 'Private')] - [string] - $NetworkCategory - ) - - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.SetNetConnectionProfile) -f $InterfaceAlias - ) -join '') - - Assert-ResourceProperty @PSBoundParameters - - Set-NetConnectionProfile @PSBoundParameters -} - -<# - .SYNOPSIS - Tests is the Network Connection Profile for the specified interface is in the correct state. - - .PARAMETER InterfaceAlias - Specifies the alias for the Interface that is being changed. - - .PARAMETER IPv4Connectivity - Specifies the IPv4 Connection Value. - - .PARAMETER IPv6Connectivity - Specifies the IPv6 Connection Value. - - .PARAMETER NetworkCategory - Sets the NetworkCategory for the interface -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [string] - $InterfaceAlias, - - [Parameter()] - [ValidateSet('Disconnected', 'NoTraffic', 'Subnet', 'LocalNetwork', 'Internet')] - [string] - $IPv4Connectivity, - - [Parameter()] - [ValidateSet('Disconnected', 'NoTraffic', 'Subnet', 'LocalNetwork', 'Internet')] - [string] - $IPv6Connectivity, - - [Parameter()] - [ValidateSet('Public', 'Private')] - [string] - $NetworkCategory - ) - - Assert-ResourceProperty @PSBoundParameters - - $current = Get-TargetResource -InterfaceAlias $InterfaceAlias - - if (-not [String]::IsNullOrEmpty($IPv4Connectivity) -and ` - ($IPv4Connectivity -ne $current.IPv4Connectivity)) - { - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.TestIPv4Connectivity) -f $IPv4Connectivity, $current.IPv4Connectivity - ) -join '') - - return $false - } - - if (-not [String]::IsNullOrEmpty($IPv6Connectivity) -and ` - ($IPv6Connectivity -ne $current.IPv6Connectivity)) - { - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.TestIPv6Connectivity) -f $IPv6Connectivity, $current.IPv6Connectivity - ) -join '') - - return $false - } - - if (-not [String]::IsNullOrEmpty($NetworkCategory) -and ` - ($NetworkCategory -ne $current.NetworkCategory)) - { - Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): " - $($LocalizedData.TestNetworkCategory) -f $NetworkCategory, $current.NetworkCategory - ) -join '') - - return $false - } - - return $true -} - -<# - .SYNOPSIS - Check the parameter combination that was passed was valid. - Ensures interface exists. If any problems are detected an - exception will be thrown. - - .PARAMETER InterfaceAlias - Specifies the alias for the Interface that is being changed. - - .PARAMETER IPv4Connectivity - Specifies the IPv4 Connection Value. - - .PARAMETER IPv6Connectivity - Specifies the IPv6 Connection Value. - - .PARAMETER NetworkCategory - Sets the NetworkCategory for the interface -#> -function Assert-ResourceProperty -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [string] - $InterfaceAlias, - - [Parameter()] - [ValidateSet('Disconnected', 'NoTraffic', 'Subnet', 'LocalNetwork', 'Internet')] - [string] - $IPv4Connectivity, - - [Parameter()] - [ValidateSet('Disconnected', 'NoTraffic', 'Subnet', 'LocalNetwork', 'Internet')] - [string] - $IPv6Connectivity, - - [Parameter()] - [ValidateSet('Public', 'Private')] - [string] - $NetworkCategory - ) - - if (-not (Get-NetAdapter | Where-Object -Property Name -EQ $InterfaceAlias )) - { - New-InvalidOperationException ` - -Message ($LocalizedData.InterfaceNotAvailableError -f $InterfaceAlias) - } - - if ([String]::IsNullOrEmpty($IPv4Connectivity) -and ` - [String]::IsNullOrEmpty($IPv6Connectivity) -and ` - [String]::IsNullOrEmpty($NetworkCategory)) - { - New-InvalidOperationException ` - -Message ($LocalizedData.ParameterCombinationError) - } -} # Assert-ResourceProperty diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetConnectionProfile/MSFT_xNetConnectionProfile.schema.mof b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetConnectionProfile/MSFT_xNetConnectionProfile.schema.mof deleted file mode 100644 index 71442f7d..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetConnectionProfile/MSFT_xNetConnectionProfile.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0"), FriendlyName("xNetConnectionProfile")] -class MSFT_xNetConnectionProfile : OMI_BaseResource -{ - [Key, Description("Specifies the alias for the Interface that is being changed.")] string InterfaceAlias; - [Write, Description("Sets the Network Category for the interface."), ValueMap{"Disconnected", "NoTraffic", "Subnet", "LocalNetwork", "Internet"}, Values{"Disconnected", "NoTraffic", "Subnet", "LocalNetwork", "Internet"}] string IPv4Connectivity; - [Write, Description("Specifies the IPv4 Connection Value."), ValueMap{"Disconnected", "NoTraffic", "Subnet", "LocalNetwork", "Internet"}, Values{"Disconnected", "NoTraffic", "Subnet", "LocalNetwork", "Internet"}] string IPv6Connectivity; - [Write, Description("Specifies the IPv6 Connection Value."), ValueMap{"Public", "Private"}, Values{"Public", "Private"}] string NetworkCategory; -}; diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetConnectionProfile/en-US/MSFT_xNetConnectionProfile.strings.psd1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetConnectionProfile/en-US/MSFT_xNetConnectionProfile.strings.psd1 deleted file mode 100644 index 5a07b0e8..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetConnectionProfile/en-US/MSFT_xNetConnectionProfile.strings.psd1 +++ /dev/null @@ -1,11 +0,0 @@ -# Localized resources for MSFT_xNetConnectionProfile - -ConvertFrom-StringData @' - GettingNetConnectionProfile = Getting NetConnectionProfile from interface '{0}'. - TestIPv4Connectivity = IPv4Connectivity '{0}' does not match set IPv4Connectivity '{1}' - TestIPv6Connectivity = IPv6Connectivity '{0}' does not match set IPv6Connectivity '{1}' - TestNetworkCategory = NetworkCategory '{0}' does not match set NetworkCategory '{1}' - SetNetConnectionProfile = Setting NetConnectionProfile on interface '{0}' - InterfaceNotAvailableError = Interface "{0}" is not available. Please select a valid interface and try again. - ParameterCombinationError = At least one of the parameters IPv4Connectivity, IPv6Connectivity or NetworkCategory must be set. -'@ diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeam/MSFT_xNetworkTeam.psm1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeam/MSFT_xNetworkTeam.psm1 deleted file mode 100644 index 310dc602..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeam/MSFT_xNetworkTeam.psm1 +++ /dev/null @@ -1,306 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Networking Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.Common' ` - -ChildPath 'NetworkingDsc.Common.psm1')) - -# Import the Networking Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.ResourceHelper' ` - -ChildPath 'NetworkingDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xNetworkTeam' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current state of a Network Team. - - .PARAMETER Name - Specifies the name of the network team to create. - - .PARAMETER TeamMembers - Specifies the network interfaces that should be a part of the network team. - This is a comma-separated list. -#> -Function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - Param - ( - [Parameter(Mandatory = $true)] - [string] - $Name, - - [Parameter(Mandatory = $true)] - [String[]] - $TeamMembers - ) - - $configuration = @{ - name = $Name - teamMembers = $TeamMembers - } - - Write-Verbose -Message ($localizedData.GetTeamInfo -f $Name) - $networkTeam = Get-NetLBFOTeam -Name $Name -ErrorAction SilentlyContinue - - if ($networkTeam) - { - Write-Verbose -Message ($localizedData.FoundTeam -f $Name) - if ($null -eq (Compare-Object -ReferenceObject $TeamMembers -DifferenceObject $networkTeam.Members)) - { - Write-Verbose -Message ($localizedData.teamMembersExist -f $Name) - $configuration.Add('loadBalancingAlgorithm', $networkTeam.loadBalancingAlgorithm) - $configuration.Add('teamingMode', $networkTeam.teamingMode) - $configuration.Add('ensure','Present') - } - } - else - { - Write-Verbose -Message ($localizedData.TeamNotFound -f $Name) - $configuration.Add('ensure','Absent') - } - - return $configuration -} - -<# - .SYNOPSIS - Adds, updates or removes a Network Team. - - .PARAMETER Name - Specifies the name of the network team to create. - - .PARAMETER TeamMembers - Specifies the network interfaces that should be a part of the network team. - This is a comma-separated list. - - .PARAMETER TeamingMode - Specifies the teaming mode configuration. - - .PARAMETER LoadBalancingAlgorithm - Specifies the load balancing algorithm for the network team. - - .PARAMETER Ensure - Specifies if the network team should be created or deleted. -#> -Function Set-TargetResource -{ - [CmdletBinding()] - Param - ( - [Parameter(Mandatory = $true)] - [string] - $Name, - - [Parameter(Mandatory = $true)] - [String[]] - $TeamMembers, - - [Parameter()] - [ValidateSet("SwitchIndependent", "LACP", "Static")] - [String] - $TeamingMode = "SwitchIndependent", - - [Parameter()] - [ValidateSet("Dynamic", "HyperVPort", "IPAddresses", "MacAddresses", "TransportPorts")] - [String] - $LoadBalancingAlgorithm = "HyperVPort", - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present' - ) - Write-Verbose -Message ($localizedData.GetTeamInfo -f $Name) - $networkTeam = Get-NetLBFOTeam -Name $Name -ErrorAction SilentlyContinue - - if ($Ensure -eq 'Present') - { - if ($networkTeam) - { - Write-Verbose -Message ($localizedData.foundTeam -f $Name) - $setArguments = @{ - 'name' = $Name - } - - if ($networkTeam.loadBalancingAlgorithm -ne $LoadBalancingAlgorithm) - { - Write-Verbose -Message ($localizedData.lbAlgoDifferent -f $LoadBalancingAlgorithm) - $setArguments.Add('loadBalancingAlgorithm', $LoadBalancingAlgorithm) - $isNetModifyRequired = $true - } - - if ($networkTeam.TeamingMode -ne $TeamingMode) - { - Write-Verbose -Message ($localizedData.teamingModeDifferent -f $TeamingMode) - $setArguments.Add('teamingMode', $TeamingMode) - $isNetModifyRequired = $true - } - - if ($isNetModifyRequired) - { - Write-Verbose -Message ($localizedData.modifyTeam -f $Name) - Set-NetLbfoTeam @setArguments -ErrorAction Stop -Confirm:$false - } - - $netTeamMembers = Compare-Object ` - -ReferenceObject $TeamMembers ` - -DifferenceObject $networkTeam.Members - if ($null -ne $netTeamMembers) - { - Write-Verbose -Message ($localizedData.membersDifferent -f $Name) - $membersToRemove = ($netTeamMembers | Where-Object {$_.SideIndicator -eq '=>'}).InputObject - if ($membersToRemove) - { - Write-Verbose -Message ($localizedData.removingMembers -f ($membersToRemove -join ',')) - $null = Remove-NetLbfoTeamMember -Name $membersToRemove ` - -Team $Name ` - -ErrorAction Stop ` - -Confirm:$false - } - - $membersToAdd = ($netTeamMembers | Where-Object {$_.SideIndicator -eq '<='}).InputObject - if ($membersToAdd) - { - Write-Verbose -Message ($localizedData.addingMembers -f ($membersToAdd -join ',')) - $null = Add-NetLbfoTeamMember -Name $membersToAdd ` - -Team $Name ` - -ErrorAction Stop ` - -Confirm:$false - } - } - - } - else - { - Write-Verbose -Message ($localizedData.createTeam -f $Name) - try - { - $null = New-NetLbfoTeam ` - -Name $Name ` - -TeamMembers $teamMembers ` - -TeamingMode $TeamingMode ` - -LoadBalancingAlgorithm $loadBalancingAlgorithm ` - -ErrorAction Stop ` - -Confirm:$false - Write-Verbose -Message $localizedData.createdNetTeam - } - - catch - { - $errorId = 'TeamCreateError' - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidOperation - $errorMessage = $localizedData.failedToCreateTeam - $exception = New-Object -TypeName System.InvalidOperationException ` - -ArgumentList $errorMessage - $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord ` - -ArgumentList $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord) - } - } - } - else - { - Write-Verbose -Message ($localizedData.removeTeam -f $Name) - $null = Remove-NetLbfoTeam -Name $name -ErrorAction Stop -Confirm:$false - } -} - -<# - .SYNOPSIS - Tests is a specified Network Team is in the correct state. - - .PARAMETER Name - Specifies the name of the network team to create. - - .PARAMETER TeamMembers - Specifies the network interfaces that should be a part of the network team. - This is a comma-separated list. - - .PARAMETER TeamingMode - Specifies the teaming mode configuration. - - .PARAMETER LoadBalancingAlgorithm - Specifies the load balancing algorithm for the network team. - - .PARAMETER Ensure - Specifies if the network team should be created or deleted. -#> -Function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - Param - ( - [Parameter(Mandatory = $true)] - [string] - $Name, - - [Parameter(Mandatory = $true)] - [String[]] - $TeamMembers, - - [Parameter()] - [ValidateSet("SwitchIndependent", "LACP", "Static")] - [String] - $TeamingMode = "SwitchIndependent", - - [Parameter()] - [ValidateSet("Dynamic", "HyperVPort", "IPAddresses", "MacAddresses", "TransportPorts")] - [String] - $LoadBalancingAlgorithm = "HyperVPort", - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present' - ) - - Write-Verbose -Message ($localizedData.GetTeamInfo -f $Name) - $networkTeam = Get-NetLbfoTeam -Name $Name -ErrorAction SilentlyContinue - - if ($ensure -eq 'Present') - { - if ($networkTeam) - { - Write-Verbose -Message ($localizedData.foundTeam -f $Name) - if ( - ($networkTeam.LoadBalancingAlgorithm -eq $LoadBalancingAlgorithm) -and - ($networkTeam.teamingMode -eq $TeamingMode) -and - ($null -eq (Compare-Object -ReferenceObject $TeamMembers -DifferenceObject $networkTeam.Members)) - ) - { - Write-Verbose -Message ($localizedData.teamExistsNoAction -f $Name) - return $true - } - else - { - Write-Verbose -Message ($localizedData.teamExistsWithDifferentConfig -f $Name) - return $false - } - } - else - { - Write-Verbose -Message ($localizedData.teamDoesNotExistShouldCreate -f $Name) - return $false - } - } - else - { - if ($networkTeam) - { - Write-Verbose -Message ($localizedData.teamExistsShouldRemove -f $Name) - return $false - } - else - { - Write-Verbose -Message ($localizedData.teamDoesNotExistNoAction -f $Name) - return $true - } - } -} diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeam/MSFT_xNetworkTeam.schema.mof b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeam/MSFT_xNetworkTeam.schema.mof deleted file mode 100644 index b5d6df48..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeam/MSFT_xNetworkTeam.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.1"), FriendlyName("xNetworkTeam")] -class MSFT_xNetworkTeam : OMI_BaseResource -{ - [Key, Description("Specifies the name of the network team to create.")] String Name; - [Required, Description("Specifies the network interfaces that should be a part of the network team. This is a comma-separated list.")] String TeamMembers[]; - [Write, Description("Specifies the teaming mode configuration."), ValueMap{"SwitchIndependent","LACP","Static"}, Values{"SwitchIndependent","LACP","Static"}] String TeamingMode; - [Write, Description("Specifies the load balancing algorithm for the network team."), ValueMap{"Dynamic","HyperVPort","IPAddresses","MacAddresses","TransportPorts"}, Values{"Dynamic","HyperVPort","IPAddresses","MacAddresses","TransportPorts"}] String LoadBalancingAlgorithm; - [Write, Description("Specifies if the network team should be created or deleted."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeam/en-US/MSFT_xNetworkTeam.strings.psd1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeam/en-US/MSFT_xNetworkTeam.strings.psd1 deleted file mode 100644 index a4a4b3b2..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeam/en-US/MSFT_xNetworkTeam.strings.psd1 +++ /dev/null @@ -1,24 +0,0 @@ -# Localized resources for MSFT_xNetworkTeam - -ConvertFrom-StringData @' - getTeamInfo = Getting network team information for {0}. - foundTeam = Found a network team with name {0}. - teamMembersExist = Members in the network team {0} exist as per the configuration. - teamNotFound = Network team with name {0} not found. - lbAlgoDifferent = Load Balancing Algo is different from the requested {0} algo. - teamingModeDifferent = Teaming mode is different from the requested {0} mode. - modifyTeam = Modifying the network team named {0}. - membersDifferent = Members within the team named {0} are different from that requested in the configuration. - removingMembers = Removing members {0} not specified in the configuration. - addingMembers = Adding members {0} that are not a part of the team configuration. - createTeam = Creating a network team with the name {0}. - removeTeam = Removing a network team with the name {0}. - teamExistsNoAction = Network team with name {0} exists. No action needed. - teamExistsWithDifferentConfig = Network team with name {0} exists but with different configuration. This will be modified. - teamDoesNotExistShouldCreate = Network team with name {0} does not exist. It will be created. - teamExistsShouldRemove = Network team with name {0} exists. It will be removed. - teamDoesNotExistNoAction = Network team with name {0} does not exist. No action needed. - waitingForTeam = Waiting for network team status to change to up. - createdNetTeam = Network Team was created successfully. - failedToCreateTeam = Failed to create the network team with specific configuration. -'@ diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeamInterface/MSFT_xNetworkTeamInterface.psm1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeamInterface/MSFT_xNetworkTeamInterface.psm1 deleted file mode 100644 index 4a681dda..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeamInterface/MSFT_xNetworkTeamInterface.psm1 +++ /dev/null @@ -1,245 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Networking Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.Common' ` - -ChildPath 'NetworkingDsc.Common.psm1')) - -# Import the Networking Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.ResourceHelper' ` - -ChildPath 'NetworkingDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xNetworkTeamInterface' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current state of a Network Team Interface in a Network Team. - - .PARAMETER Name - Specifies the name of the network team interface to create. - - .PARAMETER TeamName - Specifies the name of the network team on which this particular interface should exist. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $TeamName - ) - - $configuration = @{ - name = $Name - teamName = $TeamName - } - - Write-Verbose -Message ($localizedData.GetTeamNicInfo -f $Name) - $teamNic = Get-NetLbfoTeamNic -Name $Name -Team $TeamName -ErrorAction SilentlyContinue - - if ($teamNic) - { - Write-Verbose -Message ($localizedData.FoundTeamNic -f $Name) - $configuration.Add("vlanID", $teamNic.VlanID) - $configuration.Add("ensure", "Present") - } - else - { - Write-Verbose -Message ($localizedData.TeamNicNotFound -f $Name) - $configuration.Add("ensure", "Absent") - } - - return $configuration -} - -<# - .SYNOPSIS - Adds, updates or removes a Network Team Interface from a Network Team. - - .PARAMETER Name - Specifies the name of the network team interface to create. - - .PARAMETER TeamName - Specifies the name of the network team on which this particular interface should exist. - - .PARAMETER VlanID - Specifies VlanID to be set on network team interface. - - .PARAMETER Ensure - Specifies if the network team interface should be created or deleted. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $TeamName, - - [System.UInt32] - $VlanID, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present" - ) - - Write-Verbose -Message ($LocalizedData.GetTeamNicInfo -f $Name) - $teamNic = Get-NetLbfoTeamNic -Name $Name -Team $TeamName -ErrorAction SilentlyContinue - - if ($Ensure -eq "Present") - { - if ($teamNic) - { - Write-Verbose -Message ($LocalizedData.FoundTeamNic -f $Name) - if ($teamNic.VlanID -ne $VlanID) - { - Write-Verbose -Message ($LocalizedData.TeamNicVlanMismatch -f $VlanID) - $isNetModifyRequired = $true - } - - if ($isNetModifyRequired) - { - Write-Verbose -Message ($LocalizedData.ModifyTeamNic -f $Name) - if ($VlanID -eq 0) - { - Set-NetLbfoTeamNic -Name $Name -Team $TeamName -Default ` - -ErrorAction Stop -Confirm:$false - } - else - { - # Required in case of primary interface, whose name gets changed - # to include VLAN ID, if specified - Set-NetLbfoTeamNic -Name $Name -Team $TeamName -VlanID $VlanID ` - -ErrorAction Stop -Confirm:$false -PassThru ` - | Rename-NetAdapter -NewName $Name ` - -ErrorAction SilentlyContinue ` - -Confirm:$false - } - } - } - else - { - Write-Verbose -Message ($LocalizedData.CreateTeamNic -f $Name) - if ($VlanID -ne 0) - { - $null = Add-NetLbfoTeamNic -Name $Name -Team $TeamName -VlanID $VlanID ` - -ErrorAction Stop -Confirm:$false - Write-Verbose -Message ($LocalizedData.CreatedNetTeamNic -f $Name) - } - else - { - $errorId = "TeamNicCreateError" - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidOperation - $errorMessage = $LocalizedData.FailedToCreateTeamNic - $exception = New-Object -TypeName System.InvalidOperationException ` - -ArgumentList $errorMessage - $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord ` - -ArgumentList $exception, $errorId, $errorCategory, $null - $PSCmdlet.ThrowTerminatingError($errorRecord) - } - } - } - else - { - Write-Verbose -Message ($LocalizedData.RemoveTeamNic -f $Name) - $null = Remove-NetLbfoTeamNic -Team $teamNic.Team -VlanID $teamNic.VlanID ` - -ErrorAction Stop -Confirm:$false - } -} - -<# - .SYNOPSIS - Tests is a specified Network Team Interface is in the correct state. - - .PARAMETER Name - Specifies the name of the network team interface to create. - - .PARAMETER TeamName - Specifies the name of the network team on which this particular interface should exist. - - .PARAMETER VlanID - Specifies VlanID to be set on network team interface. - - .PARAMETER Ensure - Specifies if the network team interface should be created or deleted. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $TeamName, - - [System.UInt32] - $VlanID, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present" - ) - - Write-Verbose -Message ($LocalizedData.GetTeamNicInfo -f $Name) - $teamNic = Get-NetLbfoTeamNic -Name $Name -Team $TeamName -ErrorAction SilentlyContinue - - if ($Ensure -eq "Present") - { - if ($teamNic) - { - Write-Verbose -Message ($LocalizedData.FoundTeamNic -f $Name) - if ($teamNic.VlanID -eq $VlanID) - { - Write-Verbose -Message ($LocalizedData.TeamNicExistsNoAction -f $Name) - return $true - } - else - { - Write-Verbose -Message ($LocalizedData.TeamNicExistsWithDifferentConfig -f $Name) - return $false - } - } - else - { - Write-Verbose -Message ($LocalizedData.TeamNicDoesNotExistShouldCreate -f $Name) - return $false - } - } - else - { - if ($teamNic) - { - Write-Verbose -Message ($LocalizedData.TeamNicExistsShouldRemove -f $Name) - return $false - } - else - { - Write-Verbose -Message ($LocalizedData.TeamNicExistsNoAction -f $Name) - return $true - } - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeamInterface/MSFT_xNetworkTeamInterface.schema.mof b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeamInterface/MSFT_xNetworkTeamInterface.schema.mof deleted file mode 100644 index 82967f02..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeamInterface/MSFT_xNetworkTeamInterface.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ - -[ClassVersion("1.0"), FriendlyName("xNetworkTeamInterface")] -class MSFT_xNetworkTeamInterface : OMI_BaseResource -{ - [Key, Description("Specifies the name of the network team interface to create.")] String Name; - [Required, Description("Specifies the name of the network team on which this particular interface should exist.")] String TeamName; - [Write, Description("Specifies VlanID to be set on network team interface.")] Uint32 VlanID; - [Write, Description("Specifies if the network team interface should be created or deleted."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeamInterface/en-US/MSFT_xNetworkTeamInterface.strings.psd1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeamInterface/en-US/MSFT_xNetworkTeamInterface.strings.psd1 deleted file mode 100644 index 136cce2e..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xNetworkTeamInterface/en-US/MSFT_xNetworkTeamInterface.strings.psd1 +++ /dev/null @@ -1,19 +0,0 @@ -# Localized resources for MSFT_xNetwrkTeamInterface - -ConvertFrom-StringData @" - getTeamNicInfo = Getting network team interface information for {0}. - foundTeamNic = Found a network team interface with name {0}. - teamNicNotFound = Network team interface with name {0} not found. - teamNicVlanMismatch = Vlan ID is different from the requested ID of {0}. - modifyTeamNic = Modifying the network team interface named {0}. - createTeamNic = Creating a network team interface with the name {0}. - removeTeamNic = Removing a network team interface with the name {0}. - teamNicExistsNoAction = Network team interface with name {0} exists. No action needed. - teamNicExistsWithDifferentConfig = Network team interface with name {0} exists but with different configuration. This will be modified. - teamNicDoesNotExistShouldCreate = Network team interface with name {0} does not exist. It will be created. - teamNicExistsShouldRemove = Network team interface with name {0} exists. It will be removed. - teamNicDoesNotExistNoAction = Network team interface with name {0} does not exist. No action needed. - waitingForTeamNic = Waiting for network team interface status to change to up. - createdNetTeamNic = Network Team Interface was created successfully. - failedToCreateTeamNic = Failed to create the network team interface with specific configuration. -"@ diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xRoute/MSFT_xRoute.psm1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xRoute/MSFT_xRoute.psm1 deleted file mode 100644 index 0dedecd8..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xRoute/MSFT_xRoute.psm1 +++ /dev/null @@ -1,675 +0,0 @@ -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Networking Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.Common' ` - -ChildPath 'NetworkingDsc.Common.psm1')) - -# Import the Networking Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'NetworkingDsc.ResourceHelper' ` - -ChildPath 'NetworkingDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xRoute' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current state of a Route for an interface. - - .PARAMETER InterfaceAlias - Specifies the alias of a network interface. - - .PARAMETER AddressFamily - Specify the IP address family. - - .PARAMETER DestinationPrefix - Specifies a destination prefix of an IP route. - A destination prefix consists of an IP address prefix and a prefix length, separated by a slash (/). - - .PARAMETER NextHop - Specifies the next hop for the IP route. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateSet('IPv4', 'IPv6')] - [String] $AddressFamily, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] $DestinationPrefix, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] $NextHop - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.GettingRouteMessage) ` - -f $AddressFamily,$InterfaceAlias,$DestinationPrefix,$NextHop ` - ) -join '' ) - - # Lookup the existing Route - $route = Get-Route @PSBoundParameters - - $returnValue = @{ - InterfaceAlias = $InterfaceAlias - AddressFamily = $AddressFamily - DestinationPrefix = $DestinationPrefix - NextHop = $NextHop - } - if ($route) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.RouteExistsMessage) ` - -f $AddressFamily,$InterfaceAlias,$DestinationPrefix,$NextHop ` - ) -join '' ) - - $returnValue += @{ - Ensure = 'Present' - RouteMetric = [Uint16] $route.RouteMetric - Publish = $route.Publish - PreferredLifetime = [Double] $route.PreferredLifetime.TotalSeconds - } - } - else - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.RouteDoesNotExistMessage) ` - -f $AddressFamily,$InterfaceAlias,$DestinationPrefix,$NextHop ` - ) -join '' ) - - $returnValue += @{ - Ensure = 'Absent' - } - } - - $returnValue -} # Get-TargetResource - -<# - .SYNOPSIS - Sets a Route for an interface. - - .PARAMETER InterfaceAlias - Specifies the alias of a network interface. - - .PARAMETER AddressFamily - Specify the IP address family. - - .PARAMETER DestinationPrefix - Specifies a destination prefix of an IP route. - A destination prefix consists of an IP address prefix and a prefix length, separated by a slash (/). - - .PARAMETER NextHop - Specifies the next hop for the IP route. - - .PARAMETER Ensure - Specifies whether the route should exist. - - .PARAMETER RouteMetric - Specifies an integer route metric for an IP route. - - .PARAMETER Publish - Specifies the publish setting of an IP route. - - .PARAMETER PreferredLifetime - Specifies a preferred lifetime in seconds of an IP route. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateSet('IPv4', 'IPv6')] - [String] - $AddressFamily, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $DestinationPrefix, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $NextHop, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [Uint16] - $RouteMetric = 256, - - [ValidateSet('No', 'Yes', 'Age')] - [String] - $Publish = 'No', - - [Double] - $PreferredLifetime - ) - - # Remove any parameters that can't be splatted. - $null = $PSBoundParameters.Remove('Ensure') - - # Lookup the existing Route - $route = Get-Route @PSBoundParameters - - if ($Ensure -eq 'Present') - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.EnsureRouteExistsMessage) ` - -f $AddressFamily,$InterfaceAlias,$DestinationPrefix,$NextHop ` - ) -join '' ) - - if ($route) - { - # The Route exists - update it - Set-NetRoute @PSBoundParameters ` - -Confirm:$false ` - -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.RouteUpdatedMessage) ` - -f $AddressFamily,$InterfaceAlias,$DestinationPrefix,$NextHop ` - ) -join '' ) - } - else - { - # The Route does not exit - create it - New-NetRoute @PSBoundParameters ` - -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.RouteCreatedMessage) ` - -f $AddressFamily,$InterfaceAlias,$DestinationPrefix,$NextHop ` - ) -join '' ) - } - } - else - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.EnsureRouteDoesNotExistMessage) ` - -f $AddressFamily,$InterfaceAlias,$DestinationPrefix,$NextHop ` - ) -join '' ) - - if ($route) - { - <# - The Route exists - remove it - Use the parameters passed to Set-TargetResource to delete the appropriate route. - Clear the Publish and PreferredLifetime parameters so they aren't passed to the - Remove-NetRoute cmdlet. - #> - - $null = $PSBoundParameters.Remove('Publish') - $null = $PSBoundParameters.Remove('PreferredLifetime') - - Remove-NetRoute @PSBoundParameters ` - -Confirm:$false ` - -ErrorAction Stop - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.RouteRemovedMessage) ` - -f $AddressFamily,$InterfaceAlias,$DestinationPrefix,$NextHop ` - ) -join '' ) - } # if - } # if -} # Set-TargetResource - -<# - .SYNOPSIS - Tests the state of a Route on an interface. - - .PARAMETER InterfaceAlias - Specifies the alias of a network interface. - - .PARAMETER AddressFamily - Specify the IP address family. - - .PARAMETER DestinationPrefix - Specifies a destination prefix of an IP route. - A destination prefix consists of an IP address prefix and a prefix length, separated by a slash (/). - - .PARAMETER NextHop - Specifies the next hop for the IP route. - - .PARAMETER Ensure - Specifies whether the route should exist. - - .PARAMETER RouteMetric - Specifies an integer route metric for an IP route. - - .PARAMETER Publish - Specifies the publish setting of an IP route. - - .PARAMETER PreferredLifetime - Specifies a preferred lifetime in seconds of an IP route. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateSet('IPv4', 'IPv6')] - [String] - $AddressFamily, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $DestinationPrefix, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $NextHop, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [Uint16] - $RouteMetric = 256, - - [ValidateSet('No', 'Yes', 'Age')] - [String] - $Publish = 'No', - - [Double] - $PreferredLifetime - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.TestingRouteMessage) ` - -f $AddressFamily,$InterfaceAlias,$DestinationPrefix,$NextHop ` - ) -join '' ) - - # Flag to signal whether settings are correct - [Boolean] $desiredConfigurationMatch = $true - - # Remove any parameters that can't be splatted. - $null = $PSBoundParameters.Remove('Ensure') - - # Check the parameters - Assert-ResourceProperty @PSBoundParameters - - # Lookup the existing Route - $route = Get-Route @PSBoundParameters - - if ($Ensure -eq 'Present') - { - # The route should exist - if ($route) - { - # The route exists and does - but check the parameters - if (($PSBoundParameters.ContainsKey('RouteMetric')) ` - -and ($route.RouteMetric -ne $RouteMetric)) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.RoutePropertyNeedsUpdateMessage) ` - -f $AddressFamily,$InterfaceAlias,$DestinationPrefix,$NextHop,'RouteMetric' ` - ) -join '' ) - $desiredConfigurationMatch = $false - } - - if (($PSBoundParameters.ContainsKey('Publish')) ` - -and ($route.Publish -ne $Publish)) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.RoutePropertyNeedsUpdateMessage) ` - -f $AddressFamily,$InterfaceAlias,$DestinationPrefix,$NextHop,'Publish' ` - ) -join '' ) - $desiredConfigurationMatch = $false - } - - if (($PSBoundParameters.ContainsKey('PreferredLifetime')) ` - -and ($route.PreferredLifetime.TotalSeconds -ne $PreferredLifetime)) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.RoutePropertyNeedsUpdateMessage) ` - -f $AddressFamily,$InterfaceAlias,$DestinationPrefix,$NextHop,'PreferredLifetime' ` - ) -join '' ) - $desiredConfigurationMatch = $false - } - } - else - { - # The route doesn't exist but should - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.RouteDoesNotExistButShouldMessage) ` - -f $AddressFamily,$InterfaceAlias,$DestinationPrefix,$NextHop ` - ) -join '' ) - $desiredConfigurationMatch = $false - } - } - else - { - # The route should not exist - if ($route) - { - # The route exists but should not - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.RouteExistsButShouldNotMessage) ` - -f $AddressFamily,$InterfaceAlias,$DestinationPrefix,$NextHop ` - ) -join '' ) - $desiredConfigurationMatch = $false - } - else - { - # The route does not exist and should not - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($LocalizedData.RouteDoesNotExistAndShouldNotMessage) ` - -f $AddressFamily,$InterfaceAlias,$DestinationPrefix,$NextHop ` - ) -join '' ) - } - } # if - return $desiredConfigurationMatch -} # Test-TargetResource - -<# - .SYNOPSIS - This function looks up the route using the parameters and returns - it. If the route is not found $null is returned. - - .PARAMETER InterfaceAlias - Specifies the alias of a network interface. - - .PARAMETER AddressFamily - Specify the IP address family. - - .PARAMETER DestinationPrefix - Specifies a destination prefix of an IP route. - A destination prefix consists of an IP address prefix and a prefix length, separated by a slash (/). - - .PARAMETER NextHop - Specifies the next hop for the IP route. - - .PARAMETER Ensure - Specifies whether the route should exist. - - .PARAMETER RouteMetric - Specifies an integer route metric for an IP route. - - .PARAMETER Publish - Specifies the publish setting of an IP route. - - .PARAMETER PreferredLifetime - Specifies a preferred lifetime in seconds of an IP route. - -#> -Function Get-Route -{ - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateSet('IPv4', 'IPv6')] - [String] - $AddressFamily, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $DestinationPrefix, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $NextHop, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [Uint16] - $RouteMetric = 256, - - [ValidateSet('No', 'Yes', 'Age')] - [String] - $Publish = 'No', - - [Double] - $PreferredLifetime - ) - - try - { - $route = Get-NetRoute ` - -InterfaceAlias $InterfaceAlias ` - -AddressFamily $AddressFamily ` - -DestinationPrefix $DestinationPrefix ` - -NextHop $NextHop ` - -ErrorAction Stop - } - catch [Microsoft.PowerShell.Cmdletization.Cim.CimJobException] - { - $route = $null - } - catch - { - Throw $_ - } - Return $route -} - -<# - .SYNOPSIS - This function validates the parameters passed. Called by Test-Resource. - Will throw an error if any parameters are invalid. - - .PARAMETER InterfaceAlias - Specifies the alias of a network interface. - - .PARAMETER AddressFamily - Specify the IP address family. - - .PARAMETER DestinationPrefix - Specifies a destination prefix of an IP route. - A destination prefix consists of an IP address prefix and a prefix length, separated by a slash (/). - - .PARAMETER NextHop - Specifies the next hop for the IP route. - - .PARAMETER Ensure - Specifies whether the route should exist. - - .PARAMETER RouteMetric - Specifies an integer route metric for an IP route. - - .PARAMETER Publish - Specifies the publish setting of an IP route. - - .PARAMETER PreferredLifetime - Specifies a preferred lifetime in seconds of an IP route. -#> -Function Assert-ResourceProperty -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateSet('IPv4', 'IPv6')] - [String] - $AddressFamily, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $DestinationPrefix, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $NextHop, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [Uint16] - $RouteMetric = 256, - - [ValidateSet('No', 'Yes', 'Age')] - [String] - $Publish = 'No', - - [Double] - $PreferredLifetime - ) - - # Validate the Adapter exists - if (-not (Get-NetAdapter | Where-Object -Property Name -EQ $InterfaceAlias )) - { - $errorId = 'InterfaceNotAvailable' - $errorCategory = [System.Management.Automation.ErrorCategory]::DeviceError - $errorMessage = $($LocalizedData.InterfaceNotAvailableError) -f $InterfaceAlias - $exception = New-Object -TypeName System.InvalidOperationException ` - -ArgumentList $errorMessage - $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord ` - -ArgumentList $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord) - } - - # Validate the DestinationPrefix Parameter - $Components = $DestinationPrefix -split '/' - $Prefix = $Components[0] - $Subnet = $Components[1] - - if (-not ([System.Net.Ipaddress]::TryParse($Prefix, [ref]0))) - { - $errorId = 'AddressFormatError' - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidArgument - $errorMessage = $($LocalizedData.AddressFormatError) -f $Prefix - $exception = New-Object -TypeName System.InvalidOperationException ` - -ArgumentList $errorMessage - $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord ` - -ArgumentList $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord) - } - - $detectedAddressFamily = ([System.Net.IPAddress] $Prefix).AddressFamily.ToString() - if (($detectedAddressFamily -eq [System.Net.Sockets.AddressFamily]::InterNetwork.ToString()) ` - -and ($AddressFamily -ne 'IPv4')) - { - $errorId = 'AddressMismatchError' - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidArgument - $errorMessage = $($LocalizedData.AddressIPv4MismatchError) -f $Prefix,$AddressFamily - $exception = New-Object -TypeName System.InvalidOperationException ` - -ArgumentList $errorMessage - $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord ` - -ArgumentList $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord) - } - - if (($detectedAddressFamily -eq [System.Net.Sockets.AddressFamily]::InterNetworkV6.ToString()) ` - -and ($AddressFamily -ne 'IPv6')) - { - $errorId = 'AddressMismatchError' - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidArgument - $errorMessage = $($LocalizedData.AddressIPv6MismatchError) -f $Prefix,$AddressFamily - $exception = New-Object -TypeName System.InvalidOperationException ` - -ArgumentList $errorMessage - $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord ` - -ArgumentList $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord) - } - - # Validate the NextHop Parameter - if (-not ([System.Net.Ipaddress]::TryParse($NextHop, [ref]0))) - { - $errorId = 'AddressFormatError' - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidArgument - $errorMessage = $($LocalizedData.AddressFormatError) -f $NextHop - $exception = New-Object -TypeName System.InvalidOperationException ` - -ArgumentList $errorMessage - $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord ` - -ArgumentList $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord) - } - - $detectedAddressFamily = ([System.Net.IPAddress] $NextHop).AddressFamily.ToString() - if (($detectedAddressFamily -eq [System.Net.Sockets.AddressFamily]::InterNetwork.ToString()) ` - -and ($AddressFamily -ne 'IPv4')) - { - $errorId = 'AddressMismatchError' - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidArgument - $errorMessage = $($LocalizedData.AddressIPv4MismatchError) -f $NextHop,$AddressFamily - $exception = New-Object -TypeName System.InvalidOperationException ` - -ArgumentList $errorMessage - $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord ` - -ArgumentList $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord) - } - - if (($detectedAddressFamily -eq [System.Net.Sockets.AddressFamily]::InterNetworkV6.ToString()) ` - -and ($AddressFamily -ne 'IPv6')) - { - $errorId = 'AddressMismatchError' - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidArgument - $errorMessage = $($LocalizedData.AddressIPv6MismatchError) -f $NextHop,$AddressFamily - $exception = New-Object -TypeName System.InvalidOperationException ` - -ArgumentList $errorMessage - $errorRecord = New-Object -TypeName System.Management.Automation.ErrorRecord ` - -ArgumentList $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord) - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xRoute/MSFT_xRoute.schema.mof b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xRoute/MSFT_xRoute.schema.mof deleted file mode 100644 index 3d3e1429..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xRoute/MSFT_xRoute.schema.mof +++ /dev/null @@ -1,12 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xRoute")] -class MSFT_xRoute : OMI_BaseResource -{ - [Key, Description("Specifies the alias of a network interface.")] string InterfaceAlias; - [Key, Description("Specifies the IP address family."), ValueMap{"IPv4", "IPv6"},Values{"IPv4", "IPv6"}] string AddressFamily; - [Key, Description("Specifies a destination prefix of an IP route. A destination prefix consists of an IP address prefix and a prefix length, separated by a slash (/).")] String DestinationPrefix; - [Key, Description("Specifies the next hop for the IP route.")] String NextHop; - [Write, Description("Specifies whether the route should exist."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("Specifies an integer route metric for an IP route.")] Uint16 RouteMetric; - [Write, Description("Specifies the publish setting of an IP route."), ValueMap{"No","Yes","Age"}, Values{"No","Yes","Age"}] String Publish; - [Write, Description("Specifies a preferred lifetime in seconds of an IP route.")] Real64 PreferredLifetime; -}; diff --git a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xRoute/en-US/MSFT_xRoute.strings.psd1 b/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xRoute/en-US/MSFT_xRoute.strings.psd1 deleted file mode 100644 index e767619e..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/DSCResources/MSFT_xRoute/en-US/MSFT_xRoute.strings.psd1 +++ /dev/null @@ -1,22 +0,0 @@ -# Localized resources for MSFT_xRoute - -ConvertFrom-StringData @' - GettingRouteMessage = Getting {0} Route on "{1}" dest {2} nexthop {3}. - RouteExistsMessage = {0} Route on "{1}" dest {2} nexthop {3} exists. - RouteDoesNotExistMessage = {0} Route on "{1}" dest {2} nexthop {3} does not exist. - SettingRouteMessage = Setting {0} Route on "{1}" dest {2} nexthop {3}. - EnsureRouteExistsMessage = Ensuring {0} Route on "{1}" dest {2} nexthop {3} exists. - EnsureRouteDoesNotExistMessage = Ensuring {0} Route on "{1}" dest {2} nexthop {3} does not exist. - RouteCreatedMessage = {0} Route on "{1}" dest {2} nexthop {3} has been created. - RouteUpdatedMessage = {0} Route on "{1}" dest {2} nexthop {3} has been updated. - RouteRemovedMessage = {0} Route on "{1}" dest {2} nexthop {3} has been removed. - TestingRouteMessage = Testing {0} Route on "{1}" dest {2} nexthop {3}. - RoutePropertyNeedsUpdateMessage = {4} property on {0} Route on "{1}" dest {2} nexthop {3} is different. Change required. - RouteDoesNotExistButShouldMessage = {0} Route on "{1}" dest {2} nexthop {3} does not exist but should. Change required. - RouteExistsButShouldNotMessage = {0} Route on "{1}" dest {2} nexthop {3} exists but should not. Change required. - RouteDoesNotExistAndShouldNotMessage = {0} Route on "{1}" dest {2} nexthop {3} does not exist and should not. Change not required. - InterfaceNotAvailableError = Interface "{0}" is not available. Please select a valid interface and try again. - AddressFormatError = Address "{0}" is not in the correct format. Please correct the Address parameter in the configuration and try again. - AddressIPv4MismatchError = Address "{0}" is in IPv4 format, which does not match address family {1}. Please correct either of them in the configuration and try again. - AddressIPv6MismatchError = Address "{0}" is in IPv6 format, which does not match address family {1}. Please correct either of them in the configuration and try again. -'@ diff --git a/lib/puppet_x/dsc_resources/xNetworking/LICENSE b/lib/puppet_x/dsc_resources/xNetworking/LICENSE deleted file mode 100644 index a1d2d916..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/lib/puppet_x/dsc_resources/xNetworking/Modules/NetworkingDsc.Common/NetworkingDsc.Common.psm1 b/lib/puppet_x/dsc_resources/xNetworking/Modules/NetworkingDsc.Common/NetworkingDsc.Common.psm1 deleted file mode 100644 index 5b7521ff..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/Modules/NetworkingDsc.Common/NetworkingDsc.Common.psm1 +++ /dev/null @@ -1,428 +0,0 @@ -# Import the Networking Resource Helper Module -Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) ` - -ChildPath (Join-Path -Path 'NetworkingDsc.ResourceHelper' ` - -ChildPath 'NetworkingDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$script:localizedData = Get-LocalizedData ` - -ResourceName 'NetworkingDsc.Common' ` - -ResourcePath $PSScriptRoot - -<# - .SYNOPSIS - Converts any IP Addresses containing CIDR notation filters in an array to use Subnet Mask - notation. - - .PARAMETER Address - The array of addresses to that need to be converted. -#> -function Convert-CIDRToSubhetMask -{ - [CmdletBinding()] - [OutputType([ Microsoft.Management.Infrastructure.CimInstance])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String[]] $Address - ) - - $Results = @() - foreach ($Entry in $Address) - { - if (-not $Entry.Contains(':') -and -not $Entry.Contains('-')) - { - $EntrySplit = $Entry -split '/' - if (-not [String]::IsNullOrEmpty($EntrySplit[1])) - { - # There was a / so this contains a Subnet Mask or CIDR - $Prefix = $EntrySplit[0] - $Postfix = $EntrySplit[1] - if ($Postfix -match '^[0-9]*$') - { - # The postfix contains CIDR notation so convert this to Subnet Mask - $Cidr = [Int] $Postfix - $SubnetMaskInt64 = ([convert]::ToInt64(('1' * $Cidr + '0' * (32 - $Cidr)), 2)) - $SubnetMask = @( - ([math]::Truncate($SubnetMaskInt64 / 16777216)) - ([math]::Truncate(($SubnetMaskInt64 % 16777216) / 65536)) - ([math]::Truncate(($SubnetMaskInt64 % 65536)/256)) - ([math]::Truncate($SubnetMaskInt64 % 256)) - ) - } - else - { - $SubnetMask = $Postfix -split '\.' - } - # Apply the Subnet Mast to the IP Address so that we end up with a correctly - # masked IP Address that will match what the Firewall rule returns. - $MaskedIp = $Prefix -split '\.' - for ([int] $Octet = 0; $Octet -lt 4; $Octet++) - { - $MaskedIp[$Octet] = $MaskedIp[$Octet] -band $SubnetMask[$Octet] - } - $Entry = '{0}/{1}' -f ($MaskedIp -join '.'),($SubnetMask -join '.') - } - } - $Results += $Entry - } - return $Results -} # Convert-CIDRToSubhetMask - -<# - .SYNOPSIS - This function will find a network adapter based on the provided - search parameters. - - .PARAMETER Name - This is the name of network adapter to find. - - .PARAMETER PhysicalMediaType - This is the media type of the network adapter to find. - - .PARAMETER Status - This is the status of the network adapter to find. - - .PARAMETER MacAddress - This is the MAC address of the network adapter to find. - - .PARAMETER InterfaceDescription - This is the interface description of the network adapter to find. - - .PARAMETER InterfaceIndex - This is the interface index of the network adapter to find. - - .PARAMETER InterfaceGuid - This is the interface GUID of the network adapter to find. - - .PARAMETER DriverDescription - This is the driver description of the network adapter. - - .PARAMETER InterfaceNumber - This is the interface number of the network adapter if more than one - are returned by the parameters. - - .PARAMETER IgnoreMultipleMatchingAdapters - This switch will suppress an error occurring if more than one matching - adapter matches the parameters passed. -#> -function Find-NetworkAdapter -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter()] - [System.String] - $Name, - - [Parameter()] - [System.String] - $PhysicalMediaType, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [ValidateSet('Up','Disconnected','Disabled')] - [System.String] - $Status = 'Up', - - [Parameter()] - [System.String] - $MacAddress, - - [Parameter()] - [System.String] - $InterfaceDescription, - - [Parameter()] - [System.UInt32] - $InterfaceIndex, - - [Parameter()] - [System.String] - $InterfaceGuid, - - [Parameter()] - [System.String] - $DriverDescription, - - [Parameter()] - [System.UInt32] - $InterfaceNumber = 1, - - [Parameter()] - [System.Boolean] - $IgnoreMultipleMatchingAdapters = $false - ) - - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.FindingNetAdapterMessage) - ) -join '') - - $adapterFilters = @() - if($PSBoundParameters.ContainsKey('Name')) - { - $adapterFilters += @('($_.Name -eq $Name)') - } # if - - if($PSBoundParameters.ContainsKey('PhysicalMediaType')) - { - $adapterFilters += @('($_.PhysicalMediaType -eq $PhysicalMediaType)') - } # if - - if($PSBoundParameters.ContainsKey('Status')) { - $adapterFilters += @('($_.Status -eq $Status)') - } # if - - if($PSBoundParameters.ContainsKey('MacAddress')) - { - $adapterFilters += @('($_.MacAddress -eq $MacAddress)') - } # if - - if($PSBoundParameters.ContainsKey('InterfaceDescription')) - { - $adapterFilters += @('($_.InterfaceDescription -eq $InterfaceDescription)') - } # if - - if($PSBoundParameters.ContainsKey('InterfaceIndex')) - { - $adapterFilters += @('($_.InterfaceIndex -eq $InterfaceIndex)') - } # if - - if($PSBoundParameters.ContainsKey('InterfaceGuid')) - { - $adapterFilters += @('($_.InterfaceGuid -eq $InterfaceGuid)') - } # if - - if($PSBoundParameters.ContainsKey('DriverDescription')) - { - $adapterFilters += @('($_.DriverDescription -eq $DriverDescription)') - } # if - - if ($adapterFilters.Count -eq 0) - { - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.AllNetAdaptersFoundMessage) - ) -join '') - - $matchingAdapters = @(Get-NetAdapter) - } - else - { - # Join all the filters together - $adapterFilterScript = '(' + ($adapterFilters -join ' -and ') + ')' - $matchingAdapters = @(Get-NetAdapter | - Where-Object -FilterScript ([ScriptBlock]::Create($adapterFilterScript))) - } - - # Were any adapters found matching the criteria? - if ($matchingAdapters.Count -eq 0) - { - New-InvalidOperationException ` - -Message ($LocalizedData.NetAdapterNotFoundError) - - # Return a null so that ErrorAction SilentlyContinue works correctly - return $null - } - else - { - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.NetAdapterFoundMessage -f $matchingAdapters.Count) - ) -join '') - - if ($matchingAdapters.Count -gt 1) - { - if ($IgnoreMultipleMatchingAdapters) - { - # Was the number of matching adapters found matching the adapter number? - if (($InterfaceNumber -gt 1) -and ($InterfaceNumber -gt $matchingAdapters.Count)) - { - New-InvalidOperationException ` - -Message ($LocalizedData.InvalidNetAdapterNumberError ` - -f $matchingAdapters.Count,$InterfaceNumber) - - # Return a null so that ErrorAction SilentlyContinue works correctly - return $null - } # if - } - else - { - New-InvalidOperationException ` - -Message ($LocalizedData.MultipleMatchingNetAdapterFound ` - -f $matchingAdapters.Count) - - # Return a null so that ErrorAction SilentlyContinue works correctly - return $null - } # if - } # if - } # if - - # Identify the exact adapter from the adapters that match - $exactAdapter = $matchingAdapters[$InterfaceNumber - 1] - - $returnValue = [PSCustomObject] @{ - Name = $exactAdapter.Name - PhysicalMediaType = $exactAdapter.PhysicalMediaType - Status = $exactAdapter.Status - MacAddress = $exactAdapter.MacAddress - InterfaceDescription = $exactAdapter.InterfaceDescription - InterfaceIndex = $exactAdapter.InterfaceIndex - InterfaceGuid = $exactAdapter.InterfaceGuid - MatchingAdapterCount = $matchingAdapters.Count - } - - return $returnValue -} # Find-NetworkAdapter - -<# - .SYNOPSIS - Returns the DNS Client Server static address that are assigned to a network - adapter. This is required because Get-DnsClientServerAddress always returns - the currently assigned server addresses whether regardless if they were - assigned as static or by DHCP. - - The only way that could be found to do this is to query the registry. - - .PARAMETER InterfaceAlias - Alias of the network interface to get the static DNS Server addresses from. - - .PARAMETER AddressFamily - IP address family. -#> -function Get-DnsClientServerStaticAddress -{ - [CmdletBinding()] - [OutputType([String[]])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $InterfaceAlias, - - [Parameter(Mandatory = $true)] - [ValidateSet('IPv4', 'IPv6')] - [String] - $AddressFamily - ) - - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.GettingDNSServerStaticAddressMessage) -f $AddressFamily,$InterfaceAlias - ) -join '') - - # Look up the interface Guid - $adapter = Get-NetAdapter ` - -InterfaceAlias $InterfaceAlias ` - -ErrorAction SilentlyContinue - - if (-not $adapter) - { - New-InvalidOperationException ` - -Message ($LocalizedData.InterfaceAliasNotFoundError ` - -f $InterfaceAlias) - - # Return null to support ErrorAction Silently Continue - return $null - } # if - - $interfaceGuid = $adapter.InterfaceGuid.ToLower() - - if ($AddressFamily -eq 'IPv4') - { - $interfaceRegKeyPath = "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\$interfaceGuid\" - } - else - { - $interfaceRegKeyPath = "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\Interfaces\$interfaceGuid\" - } # if - - - $interfaceInformation = Get-ItemProperty ` - -Path $interfaceRegKeyPath ` - -ErrorAction SilentlyContinue - $nameServerAddressString = $interfaceInformation.NameServer - - # Are any statically assigned addresses for this adapter? - if ([String]::IsNullOrWhiteSpace($nameServerAddressString)) - { - # Static DNS Server addresses not found so return empty array - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.DNSServerStaticAddressNotSetMessage) -f $AddressFamily,$InterfaceAlias - ) -join '') - - return $null - } - else - { - # Static DNS Server addresses found so split them into an array using comma - Write-Verbose -Message ( @("$($MyInvocation.MyCommand): " - $($LocalizedData.DNSServerStaticAddressFoundMessage) -f $AddressFamily,$InterfaceAlias,$nameServerAddressString - ) -join '') - - return @($nameServerAddressString -split ',') - } # if -} # Get-DnsClientServerStaticAddress - -<# -.SYNOPSIS - Gets the IP Address prefix from a provided IP Address in CIDR notation. - -.PARAMETER IPAddress - IP Address to get prefix for, can be in CIDR notation. - -.PARAMETER AddressFamily - Address family for provided IP Address, defaults to IPv4. - -#> -function Get-IPAddressPrefix -{ - [cmdletbinding()] - param - ( - [parameter(Mandatory=$True, ValueFromPipeline)] - [string[]]$IPAddress, - - [parameter()] - [ValidateSet('IPv4','IPv6')] - [string]$AddressFamily = 'IPv4' - ) - - process - { - foreach ($singleIP in $IPAddress) - { - $prefixLength = ($singleIP -split '/')[1] - - If (-not ($prefixLength) -and $AddressFamily -eq 'IPv4') - { - if ($singleIP.split('.')[0] -in (0..127)) - { - $prefixLength = 8 - } - elseif ($singleIP.split('.')[0] -in (128..191)) - { - $prefixLength = 16 - } - elseif ($singleIP.split('.')[0] -in (192..223)) - { - $prefixLength = 24 - } - } - elseif (-not ($prefixLength) -and $AddressFamily -eq 'IPv6') - { - $prefixLength = 64 - } - - [PSCustomObject]@{ - IPAddress = $singleIP.split('/')[0] - prefixLength = $prefixLength - } - } - } -} - -Export-ModuleMember -Function ` - Convert-CIDRToSubhetMask, ` - Find-NetworkAdapter, - Get-DnsClientServerStaticAddress, - Get-IPAddressPrefix diff --git a/lib/puppet_x/dsc_resources/xNetworking/Modules/NetworkingDsc.Common/en-us/NetworkingDsc.Common.strings.psd1 b/lib/puppet_x/dsc_resources/xNetworking/Modules/NetworkingDsc.Common/en-us/NetworkingDsc.Common.strings.psd1 deleted file mode 100644 index d9d14cd7..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/Modules/NetworkingDsc.Common/en-us/NetworkingDsc.Common.strings.psd1 +++ /dev/null @@ -1,12 +0,0 @@ -ConvertFrom-StringData @' - FindingNetAdapterMessage = Finding network adapters matching the parameters. - AllNetAdaptersFoundMessage = Found all network adapters because no filter parameters provided. - NetAdapterFoundMessage = {0} network adapters were found matching the parameters. - NetAdapterNotFoundError = A network adapter matching the parameters was not found. Please correct the properties and try again. - InterfaceAliasNotFoundError = A network adapter with the alias '{0}' could not be found. - MultipleMatchingNetAdapterFound = Please adjust the parameters or specify IgnoreMultipleMatchingAdapters to only use the first and try again. - InvalidNetAdapterNumberError = network adapter interface number {0} was specified but only {1} was found. Please correct the interface number and try again. - GettingDNSServerStaticAddressMessage = Getting staticly assigned DNS server {0} address for interface alias '{1}'. - DNSServerStaticAddressNotSetMessage = Statically assigned DNS server {0} address for interface alias '{1}' is not set. - DNSServerStaticAddressFoundMessage = Statically assigned DNS server {0} address for interface alias '{1}' is '{2}'. -'@ diff --git a/lib/puppet_x/dsc_resources/xNetworking/Modules/NetworkingDsc.ResourceHelper/NetworkingDsc.ResourceHelper.psm1 b/lib/puppet_x/dsc_resources/xNetworking/Modules/NetworkingDsc.ResourceHelper/NetworkingDsc.ResourceHelper.psm1 deleted file mode 100644 index 75700854..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/Modules/NetworkingDsc.ResourceHelper/NetworkingDsc.ResourceHelper.psm1 +++ /dev/null @@ -1,173 +0,0 @@ -<# - .SYNOPSIS - Tests if the specified command can be found. - - .PARAMETER name - The name of the command to test. -#> -function Test-Command -{ - param - ( - [String] $Name - ) - - return ($null -ne (Get-Command -Name $Name -ErrorAction Continue 2> $null)) -} - -<# - .SYNOPSIS - Tests if the current machine is a Nano server. -#> -function Test-IsNanoServer -{ - if(Test-Command -Name Get-ComputerInfo) - { - $computerInfo = Get-ComputerInfo - - if("Server" -eq $computerInfo.OsProductType ` - -and "NanoServer" -eq $computerInfo.OsServerLevel) - { - return $true - } - } - - return $false -} - -<# - .SYNOPSIS - Creates and throws an invalid argument exception - - .PARAMETER Message - The message explaining why this error is being thrown - - .PARAMETER ArgumentName - The name of the invalid argument that is causing this error to be thrown -#> -function New-InvalidArgumentException -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Message, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ArgumentName - ) - - $argumentException = New-Object -TypeName 'ArgumentException' -ArgumentList @( $Message, - $ArgumentName ) - $newObjectParams = @{ - TypeName = 'System.Management.Automation.ErrorRecord' - ArgumentList = @( $argumentException, $ArgumentName, 'InvalidArgument', $null ) - } - $errorRecord = New-Object @newObjectParams - - throw $errorRecord -} - -<# - .SYNOPSIS - Creates and throws an invalid operation exception - - .PARAMETER Message - The message explaining why this error is being thrown - - .PARAMETER ErrorRecord - The error record containing the exception that is causing this terminating error -#> -function New-InvalidOperationException -{ - [CmdletBinding()] - param - ( - [ValidateNotNullOrEmpty()] - [String] - $Message, - - [ValidateNotNull()] - [System.Management.Automation.ErrorRecord] - $ErrorRecord - ) - - if ($null -eq $Message) - { - $invalidOperationException = New-Object -TypeName 'InvalidOperationException' - } - elseif ($null -eq $ErrorRecord) - { - $invalidOperationException = - New-Object -TypeName 'InvalidOperationException' -ArgumentList @( $Message ) - } - else - { - $invalidOperationException = - New-Object -TypeName 'InvalidOperationException' -ArgumentList @( $Message, - $ErrorRecord.Exception ) - } - - $newObjectParams = @{ - TypeName = 'System.Management.Automation.ErrorRecord' - ArgumentList = @( $invalidOperationException.ToString(), 'MachineStateIncorrect', - 'InvalidOperation', $null ) - } - $errorRecordToThrow = New-Object @newObjectParams - throw $errorRecordToThrow -} - -<# - .SYNOPSIS - Retrieves the localized string data based on the machine's culture. - Falls back to en-US strings if the machine's culture is not supported. - - .PARAMETER ResourceName - The name of the resource as it appears before '.strings.psd1' of the localized string file. - - For example: - For WindowsOptionalFeature: MSFT_xWindowsOptionalFeature - For Service: MSFT_xServiceResource - For Registry: MSFT_xRegistryResource -#> -function Get-LocalizedData -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ResourceName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ResourcePath - ) - - $localizedStringFileLocation = Join-Path -Path $ResourcePath -ChildPath $PSUICulture - - if (-not (Test-Path -Path $localizedStringFileLocation)) - { - # Fallback to en-US - $localizedStringFileLocation = Join-Path -Path $ResourcePath -ChildPath 'en-US' - } - - Import-LocalizedData ` - -BindingVariable 'localizedData' ` - -FileName "$ResourceName.strings.psd1" ` - -BaseDirectory $localizedStringFileLocation - - return $localizedData -} - -Export-ModuleMember -Function ` - Test-IsNanoServer, ` - New-InvalidArgumentException, ` - New-InvalidOperationException, ` - Get-LocalizedData diff --git a/lib/puppet_x/dsc_resources/xNetworking/PSScriptAnalyzerSettings.psd1 b/lib/puppet_x/dsc_resources/xNetworking/PSScriptAnalyzerSettings.psd1 deleted file mode 100644 index ba07a45a..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/PSScriptAnalyzerSettings.psd1 +++ /dev/null @@ -1,10 +0,0 @@ -@{ - ExcludeRules=@('PSDSCDscExamplesPresent', - 'PSDSCDscTestsPresent', - 'PSUseBOMForUnicodeEncodedFile', - 'PSUseShouldProcessForStateChangingFunctions', - 'PSUseSingularNouns', - 'PSUseToExportFieldsInManifest', - 'PSUseUTF8EncodingForHelpFile', - 'PSUseDeclaredVarsMoreThanAssignments') -} diff --git a/lib/puppet_x/dsc_resources/xNetworking/xNetworking.psd1 b/lib/puppet_x/dsc_resources/xNetworking/xNetworking.psd1 deleted file mode 100644 index 4650ee86..00000000 --- a/lib/puppet_x/dsc_resources/xNetworking/xNetworking.psd1 +++ /dev/null @@ -1,112 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '5.1.0.0' - -# ID used to uniquely identify this module -GUID = 'e6647cc3-ce9c-4c86-9eb8-2ee8919bf358' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2017 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module with DSC Resources for Networking area' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -# NestedModules = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xNetworking/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xNetworking' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '- MSFT_xDhcpClient: - - Corrected style and formatting to meet HQRM guidelines. - - Converted exceptions to use ResourceHelper functions. -- README.MD: - - Cleaned up badges by putting them into a table. -- MSFT_xDnsConnectionSuffix: - - Corrected style and formatting to meet HQRM guidelines. - - Converted exceptions to use ResourceHelper functions. -- README.MD: - - Converted badges to use branch header as used in xSQLServer. -- Added standard .markdownlint.json to configure rules to run on - Markdown files. -- MSFT_xDnsClientGlobalSetting: - - Corrected style and formatting to meet HQRM guidelines. - - Converted exceptions to use ResourceHelper functions. -- Updated year to 2017 in LICENSE and module manifest. -- MSFT_xDnsServerAddress: - - Fix error when setting address on adapter where NameServer - Property does not exist in registry for interface - see - [issue 237](https://github.com/PowerShell/xNetworking/issues/237). - - Corrected style and formatting to meet HQRM guidelines. -- MSFT_xIPAddress: - - Improved examples to clarify how to set IP Address prefix - - see [issue 239](https://github.com/PowerShell/xNetworking/issues/239). -- MSFT_xFirewall: - - Fixed bug with DisplayName not being set correctly in some - situations - see [issue 234](https://github.com/PowerShell/xNetworking/issues/234). - - Corrected style and formatting to meet HQRM guidelines. - - Converted exceptions to use ResourceHelper functions. -- Added .github support files: - - CONTRIBUTING.md - - ISSUE_TEMPLATE.md - - PULL_REQUEST_TEMPLATE.md -- Opted into Common Tests "Validate Module Files" and "Validate Script Files". -- Converted files with UTF8 with BOM over to UTF8 - fixes [Issue 250](https://github.com/PowerShell/xNetworking/issues/250). -- MSFT_xFirewallProfile: - - Created new resource configuring firewall profiles. -- MSFT_xNetConnectionProfile: - - Corrected style and formatting to meet HQRM guidelines. - - Added validation for provided parameters. - - Prevent testing parameter values of connection that aren"t set in resource - - fixes [Issue 254](https://github.com/PowerShell/xNetworking/issues/254). - - Improved unit test coverage for this resource. - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - - - - - - - - - - diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCPullServerSetup/PublishModulesAndMofsToPullServer.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCPullServerSetup/PublishModulesAndMofsToPullServer.psm1 deleted file mode 100644 index b53d9f90..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCPullServerSetup/PublishModulesAndMofsToPullServer.psm1 +++ /dev/null @@ -1,302 +0,0 @@ -<# -.Synopsis - Package DSC modules and mof configuration document and publish them on an enterprise DSC pull server in the required format. -.DESCRIPTION - Uses Publish-DSCModulesAndMof function to package DSC modules into zip files with the version info. - Publishes the zip modules on "$env:ProgramFiles\WindowsPowerShell\DscService\Modules". - Publishes all mof configuration documents that are present in the $Source folder on "$env:ProgramFiles\WindowsPowerShell\DscService\Configuration"- - Use $Force to overwrite the version of the module that exists in the PowerShell module path with the version from the $source folder. - Use $ModuleNameList to specify the names of the modules to be published if the modules do not exist in $Source folder. -.EXAMPLE - $ModuleList = @("xWebAdministration", "xPhp") - Publish-DSCModuleAndMof -Source C:\LocalDepot -ModuleNameList $ModuleList -.EXAMPLE - Publish-DSCModuleAndMof -Source C:\LocalDepot -Force - -#> - -# Tools to use to package DSC modules and mof configuration document and publish them on enterprise DSC pull server in the required format -function Publish-DSCModuleAndMof -{ - [CmdletBinding()] - param( - # The folder that contains the configuration mof documents and modules to be published on Pull server. - # Everything in this folder will be packaged and published. - [Parameter(Mandatory=$True)] - [string]$Source = $pwd, - - # Switch to overwrite the module in PSModulePath with the version provided in $Sources. - [switch]$Force, - - # Package and publish the modules listed in $ModuleNameList based on PowerShell module path content. - [string[]]$ModuleNameList - ) - - # Create working directory - $tempFolder = "$pwd\temp" - New-Item -Path $tempFolder -ItemType Directory -Force -ErrorAction SilentlyContinue - - # Copy the mof documents from the $Source to working dir - Copy-Item -Path "$Source\*.mof" -Destination $tempFolder -Force -Verbose - - # Start Deployment! - Log -Scope $MyInvocation -Message 'Start Deployment' - CreateZipFromPSModulePath -ListModuleNames $ModuleNameList -Destination $tempFolder - CreateZipFromSource -Source $Source -Destination $tempFolder - # Generate the checkSum file for all the zip and mof files. - New-DSCCheckSum -Path $tempFolder -Force - # Publish mof and modules to pull server repositories - PublishModulesAndChecksum -Source $tempFolder - PublishMofDocuments -Source $tempFolder - # Deployment is complete! - Remove-Item -Path $tempFolder -Recurse -Force -ErrorAction SilentlyContinue - Log -Scope $MyInvocation -Message 'End Deployment' - -} - -#Package the modules using powershell module path -function CreateZipFromPSModulePath -{ - param($ListModuleNames, $Destination) - - # Move all required modules from powershell module path to a temp folder and package them - if ([string]::IsNullOrEmpty($ListModuleNames)) - { - Log -Scope $MyInvocation -Message "No additional modules are specified to be packaged." - } - - foreach ($module in $ListModuleNames) - { - $allVersions = Get-Module -Name $module -ListAvailable -Verbose - # Package all versions of the module - foreach ($moduleVersion in $allVersions) - { - $name = $moduleVersion.Name - $source = "$Destination\$name" - # Create package zip - $path = $moduleVersion.ModuleBase - $version = $moduleVersion.Version.ToString() - Log -Scope $MyInvocation -Message "Zipping $name ($version)" - Compress-Archive -Path "$path\*" -DestinationPath "$source.zip" -Verbose -Force - $newName = "$Destination\$name" + "_" + "$version" + ".zip" - # Rename the module folder to contain the version info. - if (Test-Path $newName) - { - Remove-Item $newName -Recurse -Force - } - Rename-Item -Path "$source.zip" -NewName $newName -Force - } - } - -} - -# Function to package modules using a given folder after installing to psmodule path. -function CreateZipFromSource -{ - param($Source, $Destination) - # for each module under $Source folder create a zip package that has the same name as the folder. - $allModulesInSource = Get-ChildItem -Path $Source -Directory - $modules = @() - - foreach ($item in $allModulesInSource) - { - $name = $Item.Name - $alreadyExists = Get-Module -Name $name -ListAvailable -Verbose - if (($alreadyExists -eq $null) -or ($Force)) - { - # Install the modules into PowerShell module path and overwrite the content - Copy-Item -Path $item.FullName -Recurse -Force -Destination "$env:ProgramFiles\WindowsPowerShell\Modules" -Verbose - } - else - { - Write-Warning "Skipping module overwrite. Module with the name $name already exists." - Write-Warning "Please specify -Force to overwrite the module with the local version of the module located in $Source or list names of the modules in ModuleNameList parameter to be packaged from PowerShell module pat instead and remove them from $Source folder" - } - $modules += @("$name") - } - # Package the module in $destination - CreateZipFromPSModulePath -ListModuleNames $modules -Destination $Destination -} - - -# Deploy modules to the Pull sever repository. -function PublishModulesAndChecksum -{ - param($Source) - # Check if the current machine is a server sku. - $moduleRepository = "$env:ProgramFiles\WindowsPowerShell\DscService\Modules" - if ((Get-Module ServerManager -ListAvailable) -and (Test-Path $moduleRepository)) - { - Log -Scope $MyInvocation -Message "Copying modules and checksums to [$moduleRepository]." - Copy-Item -Path "$Source\*.zip*" -Destination $moduleRepository -Force -Verbose - } - else - { - Write-Warning "Copying modules to Pull server module repository skipped because the machine is not a server sku or Pull server endpoint is not deployed." - } - -} - -# function deploy configuration and their checksums. -function PublishMofDocuments -{ - param($Source) - # Check if the current machine is a server sku. - $mofRepository = "$env:ProgramFiles\WindowsPowerShell\DscService\Configuration" - if ((Get-Module ServerManager -ListAvailable) -and (Test-Path $mofRepository)) - { - Log -Scope $MyInvocation -Message "Copying mofs and checksums to [$mofRepository]." - Copy-Item -Path "$Source\*.mof*" -Destination $mofRepository -Force -Verbose - } - else - { - Write-Warning "Copying configuration(s) to Pull server configuration repository skipped because the machine is not a server sku or Pull server endpoint is not deployed." - } -} - -Function Log -{ - Param( - $Date = $(Get-Date), - $Scope, - $Message - ) - - Write-Verbose "$Date [$($Scope.MyCommand)] :: $Message" -} - - -<# -.Synopsis - Deploy DSC modules to the pullserver. -.DESCRIPTION - Publish DSC module using Module Info object as an input. - The cmdlet will figure out the location of the module repository using web.config of the pullserver. -.EXAMPLE - Get-Module | Publish-ModuleToPullServer -#> -function Publish-ModuleToPullServer -{ - [CmdletBinding()] - [Alias("pmp")] - [OutputType([void])] - Param - ( - # Name of the module. - [Parameter(Mandatory=$true, - ValueFromPipelineByPropertyName=$true, - Position=0)] - $Name, - - # This is the location of the base of the module. - [Parameter(Mandatory=$true, - ValueFromPipelineByPropertyName=$true, - Position=1)] - $ModuleBase, - - # This is the version of the module - [Parameter(Mandatory=$true, - ValueFromPipelineByPropertyName=$true, - Position=2)] - $Version, - - $PullServerWebConfig = "$env:SystemDrive\inetpub\wwwroot\PSDSCPullServer\web.config", - - $OutputFolderPath = $null - ) - - Begin - { - if (-not($OutputFolderPath)) - { - if ( -not(Test-Path $PullServerWebConfig)) - { - throw "Web.Config of the pullserver does not exist on the default path $PullServerWebConfig. Please provide the location of your pullserver web configuration using the parameter -PullServerWebConfig or an alternate path where you want to publish the pullserver modules to" - } - else - { - # Pull Server exist figure out the module path of the pullserver and use this value as output folder path. - $webConfigXml = [xml](cat $PullServerWebConfig) - $moduleXElement = $webConfigXml.SelectNodes("//appSettings/add[@key = 'ModulePath']") - $OutputFolderPath = $moduleXElement.Value - } - } - } - Process - { - Write-Verbose "Name: $Name , ModuleBase : $ModuleBase ,Version: $Version" - $targetPath = Join-Path $OutputFolderPath "$($Name)_$($Version).zip" - - if (Test-Path $targetPath) - { - Compress-Archive -DestinationPath $targetPath -Path "$($ModuleBase)\*" -Update -Verbose - } - else - { - Compress-Archive -DestinationPath $targetPath -Path "$($ModuleBase)\*" -Verbose - } - } - End - { - # Now that all the modules are published generate thier checksum. - New-DscChecksum -Path $OutputFolderPath - - } -} - -<# -.Synopsis - Deploy DSC Configuration document to the pullserver. -.DESCRIPTION - Publish Mof file to the pullserver. It takes File Info object as pipeline input. It also auto detects the location of the configuration repository using the web.config of the pullserver. -.EXAMPLE - Dir \*.mof | Publish-MOFToPullServer -#> -function Publish-MOFToPullServer -{ - [CmdletBinding()] - [Alias("pcp")] - [OutputType([void])] - Param - ( - # Mof file Name - [Parameter(Mandatory=$true, - ValueFromPipelineByPropertyName=$true, - Position=0)] - $FullName, - - $PullServerWebConfig = "$env:SystemDrive\inetpub\wwwroot\PSDSCPullServer\web.config" - ) - - Begin - { - $webConfigXml = [xml](cat $PullServerWebConfig) - $configXElement = $webConfigXml.SelectNodes("//appSettings/add[@key = 'ConfigurationPath']") - $OutputFolderPath = $configXElement.Value - } - Process - { - $fileInfo = [System.IO.FileInfo]::new($FullName) - if ($fileInfo.Extension -eq '.mof') - { - if (Test-Path $FullName) - { - copy $FullName $OutputFolderPath -Verbose -Force - } - else - { - Throw "File not found at $FullName" - } - } - else - { - throw "Invalid file $FullName. Only mof files can be copied to the pullserver configuration repository" - } - } - End - { - New-DscChecksum -Path $OutputFolderPath -Force - } -} - -Export-ModuleMember -Function Publish-* diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/CommonResourceHelper.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/CommonResourceHelper.psm1 deleted file mode 100644 index b51d2f74..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/CommonResourceHelper.psm1 +++ /dev/null @@ -1,178 +0,0 @@ -<# - .SYNOPSIS - Tests if the current machine is a Nano server. -#> -function Test-IsNanoServer -{ - [OutputType([Boolean])] - [CmdletBinding()] - param () - - $isNanoServer = $false - - if (Test-CommandExists -Name 'Get-ComputerInfo') - { - $computerInfo = Get-ComputerInfo - - $computerIsServer = 'Server' -ieq $computerInfo.OsProductType - - if ($computerIsServer) - { - $isNanoServer = 'NanoServer' -ieq $computerInfo.OsServerLevel - } - } - - return $isNanoServer -} - -<# - .SYNOPSIS - Tests whether or not the command with the specified name exists. - - .PARAMETER Name - The name of the command to test for. -#> -function Test-CommandExists -{ - [OutputType([Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name - ) - - $command = Get-Command -Name $Name -ErrorAction 'SilentlyContinue' - return ($null -ne $command) -} - -<# - .SYNOPSIS - Creates and throws an invalid argument exception - - .PARAMETER Message - The message explaining why this error is being thrown - - .PARAMETER ArgumentName - The name of the invalid argument that is causing this error to be thrown -#> -function New-InvalidArgumentException -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Message, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ArgumentName - ) - - $argumentException = New-Object -TypeName 'ArgumentException' ` - -ArgumentList @($Message, $ArgumentName) - $newObjectParams = @{ - TypeName = 'System.Management.Automation.ErrorRecord' - ArgumentList = @($argumentException, $ArgumentName, 'InvalidArgument', $null) - } - $errorRecord = New-Object @newObjectParams - - throw $errorRecord -} - -<# - .SYNOPSIS - Creates and throws an invalid operation exception - - .PARAMETER Message - The message explaining why this error is being thrown - - .PARAMETER ErrorRecord - The error record containing the exception that is causing this terminating error -#> -function New-InvalidOperationException -{ - [CmdletBinding()] - param - ( - [ValidateNotNullOrEmpty()] - [String] - $Message, - - [ValidateNotNull()] - [System.Management.Automation.ErrorRecord] - $ErrorRecord - ) - - if ($null -eq $Message) - { - $invalidOperationException = New-Object -TypeName 'InvalidOperationException' - } - elseif ($null -eq $ErrorRecord) - { - $invalidOperationException = New-Object -TypeName 'InvalidOperationException' ` - -ArgumentList @($Message) - } - else - { - $invalidOperationException = New-Object -TypeName 'InvalidOperationException' ` - -ArgumentList @($Message, $ErrorRecord.Exception) - } - - $newObjectParams = @{ - TypeName = 'System.Management.Automation.ErrorRecord' - ArgumentList = @( $invalidOperationException.ToString(), 'MachineStateIncorrect', - 'InvalidOperation', $null ) - } - - $errorRecordToThrow = New-Object @newObjectParams - throw $errorRecordToThrow -} - -<# - .SYNOPSIS - Retrieves the localized string data based on the machine's culture. - Falls back to en-US strings if the machine's culture is not supported. - - .PARAMETER ResourceName - The name of the resource as it appears before '.strings.psd1' of the localized string file. - For example: - For xWindowsOptionalFeature: MSFT_xWindowsOptionalFeature - For xService: MSFT_xServiceResource - For xRegistry: MSFT_xRegistryResource -#> -function Get-LocalizedData -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ResourceName - ) - - $resourceDirectory = Join-Path -Path $PSScriptRoot -ChildPath $ResourceName - $localizedStringFileLocation = Join-Path -Path $resourceDirectory -ChildPath $PSUICulture - - if (-not (Test-Path -Path $localizedStringFileLocation)) - { - # Fallback to en-US - $localizedStringFileLocation = Join-Path -Path $resourceDirectory -ChildPath 'en-US' - } - - Import-LocalizedData ` - -BindingVariable 'localizedData' ` - -FileName "$ResourceName.strings.psd1" ` - -BaseDirectory $localizedStringFileLocation - - return $localizedData -} - -Export-ModuleMember -Function @( 'Test-IsNanoServer', 'New-InvalidArgumentException', - 'New-InvalidOperationException', 'Get-LocalizedData' ) diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xArchive/MSFT_xArchive.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xArchive/MSFT_xArchive.psm1 deleted file mode 100644 index 192de024..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xArchive/MSFT_xArchive.psm1 +++ /dev/null @@ -1,1604 +0,0 @@ -$errorActionPreference = 'Stop' -Set-StrictMode -Version 'Latest' - -<# - Import CommonResourceHelper for: - Get-LocalizedData, - Test-IsNanoServer, - New-InvalidOperationException, - New-InvalidArgumentException -#> -$script:dscResourcesFolderFilePath = Split-Path $PSScriptRoot -Parent -$script:commonResourceHelperFilePath = Join-Path -Path $script:dscResourcesFolderFilePath -ChildPath 'CommonResourceHelper.psm1' -Import-Module -Name $script:commonResourceHelperFilePath - -# Localized messages for verbose and error statements in this resource -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xArchive' - -Add-Type -AssemblyName 'System.IO.Compression' - -# This resource has not yet been tested on a Nano server. -if (-not (Test-IsNanoServer)) -{ - Add-Type -AssemblyName 'System.IO.Compression.FileSystem' -} - -<# - .SYNOPSIS - Retrieves the current state of the archive resource with the specified path and - destination. - - The returned object provides the following properties: - Path: The specified path. - Destination: The specified destination. - Ensure: Present if the archive at the specified path is expanded at the specified - destination. Absent if the archive at the specified path is not expanded at the - specified destination. - - .PARAMETER Path - The path to the archive file that should or should not be expanded at the specified - destination. - - .PARAMETER Destination - The path where the archive file should or should not be expanded. - - .PARAMETER Validate - Specifies whether or not to validate that a file at the destination with the same name as a - file in the archive actually matches that corresponding file in the archive by the - specified checksum method. - - If a file does not match it will be considered not present. - - The default value is false. - - .PARAMETER Checksum - The Checksum method to use to validate whether or not a file at the destination with the - same name as a file in the archive actually matches that corresponding file in the archive. - - An invalid argument exception will be thrown if Checksum is specified while Validate is - specified as false. - - ModifiedDate will check that the LastWriteTime property of the file at the destination - matches the LastWriteTime property of the file in the archive. - CreatedDate will check that the CreationTime property of the file at the destination - matches the CreationTime property of the file in the archive. - SHA-1, SHA-256, and SHA-512 will check that the hash of the file at the destination by the - specified SHA method matches the hash of the file in the archive by the specified SHA - method. - - The default value is ModifiedDate. - - .PARAMETER Credential - The credential of a user account with permissions to access the specified archive path and - destination if needed. -#> -function Get-TargetResource -{ - [OutputType([Hashtable])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Destination, - - [Parameter()] - [Boolean] - $Validate = $false, - - [Parameter()] - [ValidateSet('SHA-1', 'SHA-256', 'SHA-512', 'CreatedDate', 'ModifiedDate')] - [String] - $Checksum = 'ModifiedDate', - - [Parameter()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - if ($PSBoundParameters.ContainsKey('Checksum') -and -not $Validate) - { - $errorMessage = $script:localizedData.ChecksumSpecifiedAndValidateFalse -f $Checksum, $Path, $Destination - New-InvalidArgumentException -ArgumentName 'Checksum or Validate' -Message $errorMessage - } - - $archiveState = @{ - Path = $Path - Destination = $Destination - } - - # In case an error occurs, we assume that the archive is not expanded at the destination - $archiveExpandedAtDestination = $false - - $psDrive = $null - - if ($PSBoundParameters.ContainsKey('Credential')) - { - $psDrive = Mount-PSDriveWithCredential -Path $Path -Credential $Credential - } - - try - { - Assert-PathExistsAsLeaf -Path $Path - Assert-DestinationDoesNotExistAsFile -Destination $Destination - - Write-Verbose -Message ($script:localizedData.RetrievingArchiveState -f $Path, $Destination) - - $testArchiveExistsAtDestinationParameters = @{ - ArchiveSourcePath = $Path - Destination = $Destination - } - - if ($Validate) - { - $testArchiveExistsAtDestinationParameters['Checksum'] = $Checksum - } - - if (Test-Path -LiteralPath $Destination) - { - Write-Verbose -Message ($script:localizedData.DestinationExists -f $Destination) - - $archiveExpandedAtDestination = Test-ArchiveExistsAtDestination @testArchiveExistsAtDestinationParameters - } - else - { - Write-Verbose -Message ($script:localizedData.DestinationDoesNotExist -f $Destination) - } - } - finally - { - if ($null -ne $psDrive) - { - Write-Verbose -Message ($script:localizedData.RemovingPSDrive -f $psDrive.Root) - - $null = Remove-PSDrive -Name $psDrive -Force -ErrorAction 'SilentlyContinue' - } - } - - if ($archiveExpandedAtDestination) - { - $archiveState['Ensure'] = 'Present' - } - else - { - $archiveState['Ensure'] = 'Absent' - } - - return $archiveState -} - -<# - .SYNOPSIS - Expands the archive (.zip) file at the specified path to the specified destination or - removes the expanded archive (.zip) file at the specified path from the specified - destination. - - .PARAMETER Path - The path to the archive file that should be expanded to or removed from the specified - destination. - - .PARAMETER Destination - The path where the specified archive file should be expanded to or removed from. - - .PARAMETER Ensure - Specifies whether or not the expanded content of the archive file at the specified path - should exist at the specified destination. - - To update the specified destination to have the expanded content of the archive file at the - specified path, specify this property as Present. - To remove the expanded content of the archive file at the specified path from the specified - destination, specify this property as Absent. - - The default value is Present. - - .PARAMETER Validate - Specifies whether or not to validate that a file at the destination with the same name as a - file in the archive actually matches that corresponding file in the archive by the - specified checksum method. - - If the file does not match and Ensure is specified as Present and Force is not specified, - the resource will throw an error that the file at the destination cannot be overwritten. - If the file does not match and Ensure is specified as Present and Force is specified, the - file at the destination will be overwritten. - If the file does not match and Ensure is specified as Absent, the file at the destination - will not be removed. - - The default value is false. - - .PARAMETER Checksum - The Checksum method to use to validate whether or not a file at the destination with the - same name as a file in the archive actually matches that corresponding file in the archive. - - An invalid argument exception will be thrown if Checksum is specified while Validate is - specified as false. - - ModifiedDate will check that the LastWriteTime property of the file at the destination - matches the LastWriteTime property of the file in the archive. - CreatedDate will check that the CreationTime property of the file at the destination - matches the CreationTime property of the file in the archive. - SHA-1, SHA-256, and SHA-512 will check that the hash of the file at the destination by the - specified SHA method matches the hash of the file in the archive by the specified SHA - method. - - The default value is ModifiedDate. - - .PARAMETER Credential - The credential of a user account with permissions to access the specified archive path and - destination if needed. - - .PARAMETER Force - Specifies whether or not any existing files or directories at the destination with the same - name as a file or directory in the archive should be overwritten to match the file or - directory in the archive. - - When this property is false, an error will be thrown if an item at the destination needs to - be overwritten. - - The default value is false. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Destination, - - [Parameter()] - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [Parameter()] - [Boolean] - $Validate = $false, - - [Parameter()] - [ValidateSet('SHA-1', 'SHA-256', 'SHA-512', 'CreatedDate', 'ModifiedDate')] - [String] - $Checksum = 'ModifiedDate', - - [Parameter()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [Parameter()] - [Boolean] - $Force = $false - ) - - if ($PSBoundParameters.ContainsKey('Checksum') -and -not $Validate) - { - $errorMessage = $script:localizedData.ChecksumSpecifiedAndValidateFalse -f $Checksum, $Path, $Destination - New-InvalidArgumentException -ArgumentName 'Checksum or Validate' -Message $errorMessage - } - - $psDrive = $null - - if ($PSBoundParameters.ContainsKey('Credential')) - { - $psDrive = Mount-PSDriveWithCredential -Path $Path -Credential $Credential - } - - try - { - Assert-PathExistsAsLeaf -Path $Path - Assert-DestinationDoesNotExistAsFile -Destination $Destination - - Write-Verbose -Message ($script:localizedData.SettingArchiveState -f $Path, $Destination) - - $expandArchiveToDestinationParameters = @{ - ArchiveSourcePath = $Path - Destination = $Destination - Force = $Force - } - - $removeArchiveFromDestinationParameters = @{ - ArchiveSourcePath = $Path - Destination = $Destination - } - - if ($Validate) - { - $expandArchiveToDestinationParameters['Checksum'] = $Checksum - $removeArchiveFromDestinationParameters['Checksum'] = $Checksum - } - - if (Test-Path -LiteralPath $Destination) - { - Write-Verbose -Message ($script:localizedData.DestinationExists -f $Destination) - - if ($Ensure -eq 'Present') - { - Expand-ArchiveToDestination @expandArchiveToDestinationParameters - } - else - { - Remove-ArchiveFromDestination @removeArchiveFromDestinationParameters - } - } - else - { - Write-Verbose -Message ($script:localizedData.DestinationDoesNotExist -f $Destination) - - if ($Ensure -eq 'Present') - { - Write-Verbose -Message ($script:localizedData.CreatingDirectoryAtDestination -f $Destination) - - $null = New-Item -Path $Destination -ItemType 'Directory' - Expand-ArchiveToDestination @expandArchiveToDestinationParameters - } - } - - Write-Verbose -Message ($script:localizedData.ArchiveStateSet -f $Path, $Destination) - } - finally - { - if ($null -ne $psDrive) - { - Write-Verbose -Message ($script:localizedData.RemovingPSDrive -f $psDrive.Root) - - $null = Remove-PSDrive -Name $psDrive -Force -ErrorAction 'SilentlyContinue' - } - } -} - -<# - .SYNOPSIS - Tests whether or not the archive (.zip) file at the specified path is expanded at the - specified destination. - - .PARAMETER Path - The path to the archive file that should or should not be expanded at the specified - destination. - - .PARAMETER Destination - The path where the archive file should or should not be expanded. - - .PARAMETER Ensure - Specifies whether or not the archive file should be expanded to the specified destination. - - To test whether the archive file is expanded at the specified destination, specify this - property as Present. - To test whether the archive file is not expanded at the specified destination, specify this - property as Absent. - - The default value is Present. - - .PARAMETER Validate - Specifies whether or not to validate that a file at the destination with the same name as a - file in the archive actually matches that corresponding file in the archive by the - specified checksum method. - - If a file does not match it will be considered not present. - - The default value is false. - - .PARAMETER Checksum - The Checksum method to use to validate whether or not a file at the destination with the - same name as a file in the archive actually matches that corresponding file in the archive. - - An invalid argument exception will be thrown if Checksum is specified while Validate is - specified as false. - - ModifiedDate will check that the LastWriteTime property of the file at the destination - matches the LastWriteTime property of the file in the archive. - CreatedDate will check that the CreationTime property of the file at the destination - matches the CreationTime property of the file in the archive. - SHA-1, SHA-256, and SHA-512 will check that the hash of the file at the destination by the - specified SHA method matches the hash of the file in the archive by the specified SHA - method. - - The default value is ModifiedDate. - - .PARAMETER Credential - The credential of a user account with permissions to access the specified archive path and - destination if needed. - - .PARAMETER Force - Not used in Test-TargetResource. -#> -function Test-TargetResource -{ - [OutputType([Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Destination, - - [Parameter()] - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [Parameter()] - [Boolean] - $Validate = $false, - - [Parameter()] - [ValidateSet('SHA-1', 'SHA-256', 'SHA-512', 'CreatedDate', 'ModifiedDate')] - [String] - $Checksum = 'ModifiedDate', - - [Parameter()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [Parameter()] - [Boolean] - $Force = $false - ) - - $getTargetResourceParameters = @{ - Path = $Path - Destination = $Destination - } - - $optionalGetTargetResourceParameters = @( 'Validate', 'Checksum', 'Credential' ) - - foreach ($optionalGetTargetResourceParameter in $optionalGetTargetResourceParameters) - { - if ($PSBoundParameters.ContainsKey($optionalGetTargetResourceParameter)) - { - $getTargetResourceParameters[$optionalGetTargetResourceParameter] = $PSBoundParameters[$optionalGetTargetResourceParameter] - } - } - - $archiveResourceState = Get-TargetResource @getTargetResourceParameters - - Write-Verbose -Message ($script:localizedData.TestingArchiveState -f $Path, $Destination) - - $archiveInDesiredState = $archiveResourceState.Ensure -ieq $Ensure - - return $archiveInDesiredState -} - -<# - .SYNOPSIS - Creates a new GUID. - This is a wrapper function for unit testing. -#> -function New-Guid -{ - [OutputType([Guid])] - [CmdletBinding()] - param () - - return [Guid]::NewGuid() -} - -<# - .SYNOPSIS - Invokes the cmdlet New-PSDrive with the specified parameters. - This is a wrapper function for unit testing due to a bug in Pester. - Issue has been filed here: https://github.com/pester/Pester/issues/728 - - .PARAMETER Parameters - A hashtable of parameters to splat to New-PSDrive. -#> -function Invoke-NewPSDrive -{ - [OutputType([System.Management.Automation.PSDriveInfo])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [Hashtable] - $Parameters - ) - - return New-PSDrive @Parameters -} - -<# - .SYNOPSIS - Mounts a PSDrive to access the specified path with the permissions granted by the specified - credential. - - .PARAMETER Path - The path to which to mount a PSDrive. - - .PARAMETER Credential - The credential of the user account with permissions to access the specified path. -#> -function Mount-PSDriveWithCredential -{ - [OutputType([System.Management.Automation.PSDriveInfo])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - $newPSDrive = $null - - if (Test-Path -LiteralPath $Path -ErrorAction 'SilentlyContinue') - { - Write-Verbose -Message ($script:localizedData.PathAccessiblePSDriveNotNeeded -f $Path) - } - else - { - $pathIsADirectory = $Path.EndsWith('\') - - if ($pathIsADirectory) - { - $pathToPSDriveRoot = $Path - } - else - { - $lastIndexOfBackslash = $Path.LastIndexOf('\') - $pathDoesNotContainADirectory = $lastIndexOfBackslash -eq -1 - - if ($pathDoesNotContainADirectory) - { - $errorMessage = $script:localizedData.PathDoesNotContainValidPSDriveRoot -f $Path - New-InvalidArgumentException -ArgumentName 'Path' -Message $errorMessage - } - else - { - $pathToPSDriveRoot = $Path.Substring(0, $lastIndexOfBackslash) - } - } - - $newPSDriveParameters = @{ - Name = New-Guid - PSProvider = 'FileSystem' - Root = $pathToPSDriveRoot - Scope = 'Script' - Credential = $Credential - } - - try - { - Write-Verbose -Message ($script:localizedData.CreatingPSDrive -f $pathToPSDriveRoot, $Credential.UserName) - $newPSDrive = Invoke-NewPSDrive -Parameters $newPSDriveParameters - } - catch - { - $errorMessage = $script:localizedData.ErrorCreatingPSDrive -f $pathToPSDriveRoot, $Credential.UserName - New-InvalidOperationException -Message $errorMessage -ErrorRecord $_ - } - } - - return $newPSDrive -} - -<# - .SYNOPSIS - Throws an invalid argument exception if the specified path does not exist or is not a path - leaf. - - .PARAMETER Path - The path to assert. -#> -function Assert-PathExistsAsLeaf -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path - ) - - $pathExistsAsLeaf = Test-Path -LiteralPath $Path -PathType 'Leaf' -ErrorAction 'SilentlyContinue' - - if (-not $pathExistsAsLeaf) - { - $errorMessage = $script:localizedData.PathDoesNotExistAsLeaf -f $Path - New-InvalidArgumentException -ArgumentName 'Path' -Message $errorMessage - } -} - -<# - .SYNOPSIS - Throws an invalid argument exception if the specified destination path already exists as a - file. - - .PARAMETER Destination - The destination path to assert. -#> -function Assert-DestinationDoesNotExistAsFile -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Destination - ) - - $itemAtDestination = Get-Item -LiteralPath $Destination -ErrorAction 'SilentlyContinue' - - $itemAtDestinationExists = $null -ne $itemAtDestination - $itemAtDestinationIsFile = $itemAtDestination -is [System.IO.FileInfo] - - if ($itemAtDestinationExists -and $itemAtDestinationIsFile) - { - $errorMessage = $script:localizedData.DestinationExistsAsFile -f $Destination - New-InvalidArgumentException -ArgumentName 'Destination' -Message $errorMessage - } -} - -<# - .SYNOPSIS - Opens the archive at the given path. - This is a wrapper function for unit testing. - - .PARAMETER Path - The path to the archive to open. -#> -function Open-Archive -{ - [OutputType([System.IO.Compression.ZipArchive])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path - ) - - Write-Verbose -Message ($script:localizedData.OpeningArchive -f $Path) - - try - { - $archive = [System.IO.Compression.ZipFile]::OpenRead($Path) - } - catch - { - $errorMessage = $script:localizedData.ErrorOpeningArchive -f $Path - New-InvalidOperationException -Message $errorMessage -ErrorRecord $_ - } - - return $archive -} - -<# - .SYNOPSIS - Closes the specified archive. - This is a wrapper function for unit testing. - - .PARAMETER Archive - The archive to close. -#> -function Close-Archive -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.IO.Compression.ZipArchive] - $Archive - ) - - Write-Verbose -Message ($script:localizedData.ClosingArchive -f $Path) - $null = $Archive.Dispose() -} - -<# - .SYNOPSIS - Retrieves the archive entries from the specified archive. - This is a wrapper function for unit testing. - - .PARAMETER Archive - The archive of which to retrieve the archive entries. -#> -function Get-ArchiveEntries -{ - [OutputType([System.IO.Compression.ZipArchiveEntry[]])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.IO.Compression.ZipArchive] - $Archive - ) - - return $Archive.Entries -} - -<# - .SYNOPSIS - Retrieves the full name of the specified archive entry. - This is a wrapper function for unit testing. - - .PARAMETER ArchiveEntry - The archive entry to retrieve the full name of. -#> -function Get-ArchiveEntryFullName -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.IO.Compression.ZipArchiveEntry] - $ArchiveEntry - ) - - return $ArchiveEntry.FullName -} - -<# - .SYNOPSIS - Opens the specified archive entry. - This is a wrapper function for unit testing. - - .PARAMETER ArchiveEntry - The archive entry to open. -#> -function Open-ArchiveEntry -{ - [OutputType([System.IO.Stream])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.IO.Compression.ZipArchiveEntry] - $ArchiveEntry - ) - - Write-Verbose -Message ($script:localizedData.OpeningArchiveEntry -f $ArchiveEntry.FullName) - return $ArchiveEntry.Open() -} - -<# - .SYNOPSIS - Closes the specified stream. - This is a wrapper function for unit testing. - - .PARAMETER Stream - The stream to close. -#> -function Close-Stream -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.IO.Stream] - $Stream - ) - - $null = $Stream.Dispose() -} - -<# - .SYNOPSIS - Tests if the given checksum method name is the name of a SHA checksum method. - - .PARAMETER Checksum - The name of the checksum method to test. -#> -function Test-ChecksumIsSha -{ - [OutputType([Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Checksum - ) - - return ($Checksum.Length -ge 'SHA'.Length) -and ($Checksum.Substring(0, 3) -ieq 'SHA') -} - -<# - .SYNOPSIS - Converts the specified DSC hash algorithm name (with a hyphen) to a PowerShell hash - algorithm name (without a hyphen). The in-box PowerShell Get-FileHash cmdlet will only hash - algorithm names without hypens. - - .PARAMETER DscHashAlgorithmName - The DSC hash algorithm name to convert. -#> -function ConvertTo-PowerShellHashAlgorithmName -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $DscHashAlgorithmName - ) - - return $DscHashAlgorithmName.Replace('-', '') -} - -<# - .SYNOPSIS - Tests if the hash of the specified file matches the hash of the specified archive entry - using the specified hash algorithm. - - .PARAMETER FilePath - The path to the file to test the hash of. - - .PARAMETER CacheEntry - The cache entry to test the hash of. - - .PARAMETER HashAlgorithmName - The name of the hash algorithm to use to retrieve the hashes of the file and archive entry. -#> -function Test-FileHashMatchesArchiveEntryHash -{ - [OutputType([Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $FilePath, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.IO.Compression.ZipArchiveEntry] - $ArchiveEntry, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $HashAlgorithmName - ) - - $archiveEntryFullName = Get-ArchiveEntryFullName -ArchiveEntry $ArchiveEntry - - Write-Verbose -Message ($script:localizedData.ComparingHashes -f $FilePath, $archiveEntryFullName, $HashAlgorithmName) - - $fileHashMatchesArchiveEntryHash = $false - - $powerShellHashAlgorithmName = ConvertTo-PowerShellHashAlgorithmName -DscHashAlgorithmName $HashAlgorithmName - - $openStreams = @() - - try - { - $archiveEntryStream = Open-ArchiveEntry -ArchiveEntry $ArchiveEntry - $openStreams += $archiveEntryStream - - # The Open mode will open the file for reading without modifying the file - $fileStreamMode = [System.IO.FileMode]::Open - - $fileStream = New-Object -TypeName 'System.IO.FileStream' -ArgumentList @( $FilePath, $fileStreamMode ) - $openStreams += $fileStream - - $fileHash = Get-FileHash -InputStream $fileStream -Algorithm $powerShellHashAlgorithmName - $archiveEntryHash = Get-FileHash -InputStream $archiveEntryStream -Algorithm $powerShellHashAlgorithmName - - $hashAlgorithmsMatch = $fileHash.Algorithm -eq $archiveEntryHash.Algorithm - $hashesMatch = $fileHash.Hash -eq $archiveEntryHash.Hash - - $fileHashMatchesArchiveEntryHash = $hashAlgorithmsMatch -and $hashesMatch - } - catch - { - $errorMessage = $script:localizedData.ErrorComparingHashes -f $FilePath, $archiveEntryFullName, $HashAlgorithmName - New-InvalidOperationException -Message $errorMessage -ErrorRecord $_ - } - finally - { - foreach ($openStream in $openStreams) - { - Close-Stream -Stream $openStream - } - } - - return $fileHashMatchesArchiveEntryHash -} - -<# - .SYNOPSIS - Retrieves the timestamp of the specified file for the specified checksum method. - - .PARAMETER File - The file to retrieve the timestamp of. - - .PARAMETER Checksum - The checksum method to retrieve the timestamp for. - - .NOTES - The returned date is normalized to the General (G) date format. - https://technet.microsoft.com/en-us/library/ee692801.aspx -#> -function Get-TimestampForChecksum -{ - [OutputType([System.DateTime])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.IO.FileInfo] - $File, - - [Parameter(Mandatory = $true)] - [ValidateSet('CreatedDate', 'ModifiedDate')] - [String] - $Checksum - ) - - $relevantTimestamp = $null - - if ($Checksum -ieq 'CreatedDate') - { - $relevantTimestamp = Get-Date -Date $File.CreationTime.DateTime -Format 'G' - } - elseif ($Checksum -ieq 'ModifiedDate') - { - $relevantTimestamp = Get-Date -Date $File.LastWriteTime.DateTime -Format 'G' - } - - return $relevantTimestamp -} - -<# - .SYNOPSIS - Retrieves the last write time of the specified archive entry. - This is a wrapper function for unit testing. - - .PARAMETER ArchiveEntry - The archive entry to retrieve the last write time of. - - .NOTES - The returned date is normalized to the General (G) date format. - https://technet.microsoft.com/en-us/library/ee692801.aspx -#> -function Get-ArchiveEntryLastWriteTime -{ - [OutputType([System.DateTime])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.IO.Compression.ZipArchiveEntry] - $ArchiveEntry - ) - - return (Get-Date -Date $ArchiveEntry.LastWriteTime.DateTime -Format 'G') -} - -<# - .SYNOPSIS - Tests if the specified file matches the specified archive entry based on the specified - checksum method. - - .PARAMETER File - The file to test against the specified archive entry. - - .PARAMETER ArchiveEntry - The archive entry to test against the specified file. - - .PARAMETER Checksum - The checksum method to use to determine whether or not the specified file matches the - specified archive entry. -#> -function Test-FileMatchesArchiveEntryByChecksum -{ - [OutputType([Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.IO.FileInfo] - $File, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.IO.Compression.ZipArchiveEntry] - $ArchiveEntry, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Checksum - ) - - $archiveEntryFullName = Get-ArchiveEntryFullName -ArchiveEntry $ArchiveEntry - - Write-Verbose -Message ($script:localizedData.TestingIfFileMatchesArchiveEntryByChecksum -f $File.FullName, $archiveEntryFullName, $Checksum) - - $fileMatchesArchiveEntry = $false - - if (Test-ChecksumIsSha -Checksum $Checksum) - { - $fileHashMatchesArchiveEntryHash = Test-FileHashMatchesArchiveEntryHash -FilePath $File.FullName -ArchiveEntry $ArchiveEntry -HashAlgorithmName $Checksum - - if ($fileHashMatchesArchiveEntryHash) - { - Write-Verbose -Message ($script:localizedData.FileMatchesArchiveEntryByChecksum -f $File.FullName, $archiveEntryFullName, $Checksum) - - $fileMatchesArchiveEntry = $true - } - else - { - Write-Verbose -Message ($script:localizedData.FileDoesNotMatchArchiveEntryByChecksum -f $File.FullName, $archiveEntryFullName, $Checksum) - } - } - else - { - $fileTimestampForChecksum = Get-TimestampForChecksum -File $File -Checksum $Checksum - - $archiveEntryLastWriteTime = Get-ArchiveEntryLastWriteTime -ArchiveEntry $ArchiveEntry - - if ($fileTimestampForChecksum.Equals($archiveEntryLastWriteTime)) - { - Write-Verbose -Message ($script:localizedData.FileMatchesArchiveEntryByChecksum -f $File.FullName, $archiveEntryFullName, $Checksum) - - $fileMatchesArchiveEntry = $true - } - else - { - Write-Verbose -Message ($script:localizedData.FileDoesNotMatchArchiveEntryByChecksum -f $File.FullName, $archiveEntryFullName, $Checksum) - } - } - - return $fileMatchesArchiveEntry -} - -<# - .SYNOPSIS - Tests if the specified archive exists in its expanded form at the destination. - - .PARAMETER Archive - The archive to test for existence at the specified destination. - - .PARAMETER Destination - The path to the destination to check for the presence of the expanded form of the specified - archive. - - .PARAMETER Checksum - The checksum method to use to determine whether a file in the archive matches a file at the - destination. - - If not provided, only the existence of the items in the archive will be checked. -#> -function Test-ArchiveExistsAtDestination -{ - [OutputType([Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ArchiveSourcePath, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Destination, - - [Parameter()] - [ValidateSet('SHA-1', 'SHA-256', 'SHA-512', 'CreatedDate', 'ModifiedDate')] - [String] - $Checksum - ) - - Write-Verbose -Message ($script:localizedData.TestingIfArchiveExistsAtDestination -f $Destination) - - $archiveExistsAtDestination = $true - - $archive = Open-Archive -Path $ArchiveSourcePath - - try - { - $archiveEntries = Get-ArchiveEntries -Archive $archive - - foreach ($archiveEntry in $archiveEntries) - { - $archiveEntryFullName = Get-ArchiveEntryFullName -ArchiveEntry $archiveEntry - $archiveEntryPathAtDestination = Join-Path -Path $Destination -ChildPath $archiveEntryFullName - - $archiveEntryItemAtDestination = Get-Item -LiteralPath $archiveEntryPathAtDestination -ErrorAction 'SilentlyContinue' - - if ($null -eq $archiveEntryItemAtDestination) - { - Write-Verbose -Message ($script:localizedData.ItemWithArchiveEntryNameDoesNotExist -f $archiveEntryPathAtDestination) - - $archiveExistsAtDestination = $false - break - } - else - { - Write-Verbose -Message ($script:localizedData.ItemWithArchiveEntryNameExists -f $archiveEntryPathAtDestination) - - if ($archiveEntryFullName.EndsWith('\')) - { - if (-not ($archiveEntryItemAtDestination -is [System.IO.DirectoryInfo])) - { - Write-Verbose -Message ($script:localizedData.ItemWithArchiveEntryNameIsNotDirectory -f $archiveEntryPathAtDestination) - - $archiveExistsAtDestination = $false - break - } - } - else - { - if ($archiveEntryItemAtDestination -is [System.IO.FileInfo]) - { - if ($PSBoundParameters.ContainsKey('Checksum')) - { - if (-not (Test-FileMatchesArchiveEntryByChecksum -File $archiveEntryItemAtDestination -ArchiveEntry $archiveEntry -Checksum $Checksum)) - { - $archiveExistsAtDestination = $false - break - } - } - } - else - { - Write-Verbose -Message ($script:localizedData.ItemWithArchiveEntryNameIsNotFile -f $archiveEntryPathAtDestination) - - $archiveExistsAtDestination = $false - break - } - } - } - } - } - finally - { - Close-Archive -Archive $archive - } - - if ($archiveExistsAtDestination) - { - Write-Verbose -Message ($script:localizedData.ArchiveExistsAtDestination -f $ArchiveSourcePath, $Destination) - } - else - { - Write-Verbose -Message ($script:localizedData.ArchiveDoesNotExistAtDestination -f $ArchiveSourcePath, $Destination) - } - - return $archiveExistsAtDestination -} - -<# - .SYNOPSIS - Copies the contents of the specified source stream to the specified destination stream. - This is a wrapper function for unit testing. - - .PARAMETER SourceStream - The stream to copy from. - - .PARAMETER DestinationStream - The stream to copy to. -#> -function Copy-FromStreamToStream -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.IO.Stream] - $SourceStream, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.IO.Stream] - $DestinationStream - ) - - $null = $SourceStream.CopyTo($DestinationStream) -} - -<# - .SYNOPSIS - Copies the specified archive entry to the specified destination path. - - .PARAMETER ArchiveEntry - The archive entry to copy to the destination. - - .PARAMETER DestinationPath - The destination file path to copy the archive entry to. -#> -function Copy-ArchiveEntryToDestination -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.IO.Compression.ZipArchiveEntry] - $ArchiveEntry, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $DestinationPath - ) - - Write-Verbose -Message ($script:localizedData.CopyingArchiveEntryToDestination -f $DestinationPath) - - $archiveEntryFullName = Get-ArchiveEntryFullName -ArchiveEntry $ArchiveEntry - - if ($archiveEntryFullName.EndsWith('\')) - { - $null = New-Item -Path $DestinationPath -ItemType 'Directory' - } - else - { - $openStreams = @() - - try - { - $archiveEntryStream = Open-ArchiveEntry -ArchiveEntry $ArchiveEntry - $openStreams += $archiveEntryStream - - # The Create mode will create a new file if it does not exist or overwrite the file if it already exists - $destinationStreamMode = [System.IO.FileMode]::Create - - $destinationStream = New-Object -TypeName 'System.IO.FileStream' -ArgumentList @( $DestinationPath, $destinationStreamMode ) - $openStreams += $destinationStream - - Copy-FromStreamToStream -SourceStream $archiveEntryStream -DestinationStream $destinationStream - } - catch - { - $errorMessage = $script:localizedData.ErrorCopyingFromArchiveToDestination -f $DestinationPath - New-InvalidOperationException -Message $errorMessage -ErrorRecord $_ - } - finally - { - foreach ($openStream in $openStreams) - { - Close-Stream -Stream $openStream - } - } - - $newArchiveFileInfo = New-Object -TypeName 'System.IO.FileInfo' -ArgumentList @( $DestinationPath ) - - $updatedTimestamp = Get-ArchiveEntryLastWriteTime -ArchiveEntry $ArchiveEntry - - $null = Set-ItemProperty -LiteralPath $DestinationPath -Name 'LastWriteTime' -Value $updatedTimestamp - $null = Set-ItemProperty -LiteralPath $DestinationPath -Name 'LastAccessTime' -Value $updatedTimestamp - $null = Set-ItemProperty -LiteralPath $DestinationPath -Name 'CreationTime' -Value $updatedTimestamp - } -} - -<# - .SYNOPSIS - Expands the archive at the specified source path to the specified destination path. - - .PARAMETER ArchiveSourcePath - The source path of the archive to expand to the specified destination path. - - .PARAMETER Destination - The destination path at which to expand the archive at the specified source path. - - .PARAMETER Checksum - The checksum method to use to determine if a file at the destination already matches a file - in the archive. - - .PARAMETER Force - Specifies whether or not to overwrite files that exist at the destination but do not match - the file of the same name in the archive based on the specified checksum method. -#> -function Expand-ArchiveToDestination -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ArchiveSourcePath, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Destination, - - [Parameter()] - [ValidateSet('SHA-1', 'SHA-256', 'SHA-512', 'CreatedDate', 'ModifiedDate')] - [String] - $Checksum, - - [Parameter()] - [Boolean] - $Force = $false - ) - - Write-Verbose -Message ($script:localizedData.ExpandingArchiveToDestination -f $ArchiveSourcePath, $Destination) - - $archive = Open-Archive -Path $ArchiveSourcePath - - try - { - $archiveEntries = Get-ArchiveEntries -Archive $archive - - foreach ($archiveEntry in $archiveEntries) - { - $archiveEntryFullName = Get-ArchiveEntryFullName -ArchiveEntry $archiveEntry - $archiveEntryPathAtDestination = Join-Path -Path $Destination -ChildPath $archiveEntryFullName - - $archiveEntryIsDirectory = $archiveEntryFullName.EndsWith('\') - - $archiveEntryItemAtDestination = Get-Item -LiteralPath $archiveEntryPathAtDestination -ErrorAction 'SilentlyContinue' - - if ($null -eq $archiveEntryItemAtDestination) - { - Write-Verbose -Message ($script:localizedData.ItemWithArchiveEntryNameDoesNotExist -f $archiveEntryPathAtDestination) - - if (-not $archiveEntryIsDirectory) - { - $parentDirectory = Split-Path -Path $archiveEntryPathAtDestination -Parent - - if (-not (Test-Path -Path $parentDirectory)) - { - Write-Verbose -Message ($script:localizedData.CreatingParentDirectory -f $parentDirectory) - - $null = New-Item -Path $parentDirectory -ItemType 'Directory' - } - } - - Copy-ArchiveEntryToDestination -ArchiveEntry $archiveEntry -DestinationPath $archiveEntryPathAtDestination - } - else - { - Write-Verbose -Message ($script:localizedData.ItemWithArchiveEntryNameExists -f $archiveEntryPathAtDestination) - - $overwriteArchiveEntry = $true - - if ($archiveEntryIsDirectory) - { - $overwriteArchiveEntry = -not ($archiveEntryItemAtDestination -is [System.IO.DirectoryInfo]) - } - elseif ($archiveEntryItemAtDestination -is [System.IO.FileInfo]) - { - if ($PSBoundParameters.ContainsKey('Checksum')) - { - $overwriteArchiveEntry = -not (Test-FileMatchesArchiveEntryByChecksum -File $archiveEntryItemAtDestination -ArchiveEntry $archiveEntry -Checksum $Checksum) - } - else - { - $overwriteArchiveEntry = $false - } - } - - if ($overwriteArchiveEntry) - { - if ($Force) - { - Write-Verbose -Message ($script:localizedData.OverwritingItem -f $archiveEntryPathAtDestination) - - $null = Remove-Item -LiteralPath $archiveEntryPathAtDestination - Copy-ArchiveEntryToDestination -ArchiveEntry $archiveEntry -DestinationPath $archiveEntryPathAtDestination - } - else - { - New-InvalidOperationException -Message ($script:localizedData.ForceNotSpecifiedToOverwriteItem -f $archiveEntryPathAtDestination, $archiveEntryFullName) - } - } - } - } - } - finally - { - Close-Archive -Archive $archive - } -} - -<# - .SYNOPSIS - Removes the specified directory from the specified destination path. - - .PARAMETER Directory - The partial path under the destination path of the directory to remove. - - .PARAMETER Destination - The destination from which to remove the directory. -#> -function Remove-DirectoryFromDestination -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String[]] - $Directory, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Destination - ) - - # Sort-Object requires the use of a pipe to function properly - $Directory = $Directory | Sort-Object -Descending -Unique - - foreach ($directoryToRemove in $Directory) - { - $directoryPathAtDestination = Join-Path -Path $Destination -ChildPath $directoryToRemove - $directoryExists = Test-Path -LiteralPath $directoryPathAtDestination -PathType 'Container' - - if ($directoryExists) - { - $directoryChildItems = Get-ChildItem -LiteralPath $directoryPathAtDestination -ErrorAction 'SilentlyContinue' - $directoryIsEmpty = $null -eq $directoryChildItems - - if ($directoryIsEmpty) - { - Write-Verbose -Message ($script:localizedData.RemovingDirectory -f $directoryPathAtDestination) - - $null = Remove-Item -LiteralPath $directoryPathAtDestination - } - else - { - Write-Verbose -Message ($script:localizedData.DirectoryIsNotEmpty -f $directoryPathAtDestination) - } - } - } -} - -<# - .SYNOPSIS - Removes the specified archive from the specified destination. - - .PARAMETER Archive - The archive to remove from the specified destination. - - .PARAMETER Destination - The path to the destination to remove the specified archive from. - - .PARAMETER Checksum - The checksum method to use to determine whether a file in the archive matches a file at the - destination. - - If not provided, only the existence of the items in the archive will be checked. -#> -function Remove-ArchiveFromDestination -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ArchiveSourcePath, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Destination, - - [Parameter()] - [ValidateSet('SHA-1', 'SHA-256', 'SHA-512', 'CreatedDate', 'ModifiedDate')] - [String] - $Checksum - ) - - Write-Verbose -Message ($script:localizedData.RemovingArchiveFromDestination -f $Destination) - - $archive = Open-Archive -Path $ArchiveSourcePath - - try - { - $directoriesToRemove = @() - - $archiveEntries = Get-ArchiveEntries -Archive $archive - - foreach ($archiveEntry in $archiveEntries) - { - $archiveEntryFullName = Get-ArchiveEntryFullName -ArchiveEntry $archiveEntry - $archiveEntryPathAtDestination = Join-Path -Path $Destination -ChildPath $archiveEntryFullName - - $archiveEntryIsDirectory = $archiveEntryFullName.EndsWith('\') - - $itemAtDestination = Get-Item -LiteralPath $archiveEntryPathAtDestination -ErrorAction 'SilentlyContinue' - - if ($null -eq $itemAtDestination) - { - Write-Verbose -Message ($script:localizedData.ItemWithArchiveEntryNameDoesNotExist -f $archiveEntryPathAtDestination) - } - else - { - Write-Verbose -Message ($script:localizedData.ItemWithArchiveEntryNameExists -f $archiveEntryPathAtDestination) - - $itemAtDestinationIsDirectory = $itemAtDestination -is [System.IO.DirectoryInfo] - $itemAtDestinationIsFile = $itemAtDestination -is [System.IO.FileInfo] - - $removeArchiveEntry = $false - - if ($archiveEntryIsDirectory -and $itemAtDestinationIsDirectory) - { - $removeArchiveEntry = $true - $directoriesToRemove += $archiveEntryFullName - - } - elseif ((-not $archiveEntryIsDirectory) -and $itemAtDestinationIsFile) - { - $removeArchiveEntry = $true - - if ($PSBoundParameters.ContainsKey('Checksum')) - { - $removeArchiveEntry = Test-FileMatchesArchiveEntryByChecksum -File $itemAtDestination -ArchiveEntry $archiveEntry -Checksum $Checksum - } - - if ($removeArchiveEntry) - { - Write-Verbose -Message ($script:localizedData.RemovingFile -f $archiveEntryPathAtDestination) - $null = Remove-Item -LiteralPath $archiveEntryPathAtDestination - } - } - else - { - Write-Verbose -Message ($script:localizedData.CouldNotRemoveItemOfIncorrectType -f $archiveEntryPathAtDestination, $archiveEntryFullName) - } - - if ($removeArchiveEntry) - { - $parentDirectory = Split-Path -Path $archiveEntryFullName -Parent - - while (-not [String]::IsNullOrEmpty($parentDirectory)) - { - $directoriesToRemove += $parentDirectory - $parentDirectory = Split-Path -Path $parentDirectory -Parent - } - } - } - } - - if ($directoriesToRemove.Count -gt 0) - { - $null = Remove-DirectoryFromDestination -Directory $directoriesToRemove -Destination $Destination - } - - Write-Verbose -Message ($script:localizedData.ArchiveRemovedFromDestination -f $Destination) - - } - finally - { - Close-Archive -Archive $archive - } -} diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xArchive/MSFT_xArchive.schema.mof b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xArchive/MSFT_xArchive.schema.mof deleted file mode 100644 index 1acddc30..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xArchive/MSFT_xArchive.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"),FriendlyName("xArchive")] -class MSFT_xArchive : OMI_BaseResource -{ - [Key, Description("The path to the archive file that should be expanded to or removed from the specified destination.")] String Path; - [Key, Description("The path where the specified archive file should be expanded to or removed from.")] String Destination; - [Write, Description("Specifies whether or not the expanded content of the archive file at the specified path should exist at the specified destination. To update the specified destination to have the expanded content of the archive file at the specified path, specify this property as Present. To remove the expanded content of the archive file at the specified path from the specified destination, specify this property as Absent. The default value is Present."), ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}] String Ensure; - [Write, Description("Specifies whether or not to validate that a file at the destination with the same name as a file in the archive actually matches that corresponding file in the archive by the specified checksum method. If the file does not match and Ensure is specified as Present and Force is not specified, the resource will throw an error that the file at the desintation cannot be overwritten. If the file does not match and Ensure is specified as Present and Force is specified, the file at the desintation will be overwritten. If the file does not match and Ensure is specified as Absent, the file at the desintation will not be removed. The default value is false.")] Boolean Validate; - [Write, Description("The Checksum method to use to validate whether or not a file at the destination with the same name as a file in the archive actually matches that corresponding file in the archive. An invalid argument exception will be thrown if Checksum is specified while Validate is specified as false. ModifiedDate will check that the LastWriteTime property of the file at the destination matches the LastWriteTime property of the file in the archive. CreatedDate will check that the CreationTime property of the file at the destination matches the CreationTime property of the file in the archive. SHA-1, SHA-256, and SHA-512 will check that the hash of the file at the destination by the specified SHA method matches the hash of the file in the archive by the specified SHA method. The default value is ModifiedDate.") ,ValueMap{"SHA-1", "SHA-256", "SHA-512", "CreatedDate", "ModifiedDate"}, Values{"SHA-1", "SHA-256", "SHA-512", "CreatedDate", "ModifiedDate"}] String Checksum; - [Write, Description("The credential of a user account with permissions to access the specified archive path and destination if needed.") ,EmbeddedInstance("MSFT_Credential")] String Credential; - [Write, Description("Specifies whether or not any existing files or directories at the destination with the same name as a file or directory in the archive should be overwritten to match the file or directory in the archive. When this property is false, an error will be thrown if an item at the destination needs to be overwritten. The default value is false.")] Boolean Force; -}; diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xArchive/en-US/MSFT_xArchive.schema.mfl b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xArchive/en-US/MSFT_xArchive.schema.mfl deleted file mode 100644 index fc681d9170f4ba9cbe228bd9d4b5f745801434c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5900 zcmdT|+fEcg5Upnu|6$^jCQ6iuiTbqMA`!*78+jnaEW3kDTz1G_Kw|uL^_;3{dwQn&uH^JD6Byuh>#$Mrn4>NW!x~?l?`G}FJq%zmJvC8|d zpAlvs$XkqGLYGaQH^8h!&SZwqRK}`P4?9r$86?i|JHltGpZ30A(Bc?tN4kQuxh8@J zC#u6phIl&C(HIs`<{0l{eQ$D8$cykF%PH2-GOjtsn-p)jyX`y0>KOJX7)!EQlr+VR z1X8)PS+Sy68a^G!i2v+)2zg!1qt#>if~OCem9MXf(S>SBE1ET~NAKn^TgHC#gCc@? zH0nL2TR0K=tKnd0#&fmP9pjsR;m)$`3j@p;W1MHjnJG@$&#y<#{LRU&@)7UHA;Q!l zQSXT|uWgc2=V=kRNp{SE#Zcw6c|f%!+DbWOkg?loa~oJOR^_q0%+7*%F*1;wWa9){ zbBxi7T%!L^vol=58^b2gZGWb>Vb}HI%GFTmApV7zSUjU290R#Iq9;B69KT0+qW>7q zMLd}y7K>_IV9``_KrDZc%k)>%Iw|9L{se z*^Wm~Zr zDE{V^ZqKqT^21qdk-*m>%nYm(M%f%jkPG~#wh^QgZ_5>w5c-O@JbZ6H#B-SG3d{Zx zFr`$dr&S+TSxm4ebN>u~%rtiw;{+-|O>*5S1&X2$Ask$lp1J{~R>eVtw#jWL1jvRZ@r#66WGaB~e7M$IZl6{|tx zE_vzs{Xa%!vb_V=Ga8O_nTt_qf^J}*^$N_!tWFs9d~cMGV8$XMVsXr5vSKZtphe9x zpRHDQy;IR|+9P(}L)j-XYxv%16E-o%<+b)1$IdZ4`(3PHFSVaV$QadIl4ag<#TVA+ z&5SMklh0Q^_fprJ(V;0b(+4(SA^A#thUkQsMar+YjPvhtx(N;1Q0mGXu;qz7)0+$T zv?^=zLf^PL!;P$A=IRpu#w^c{tk~-<>r3sGmT4H)SA62R8z)@-M;~n0s|h*YcDQbd z(yDl0r4RkmWr6nWRLAz_TovAY6eHDgnTj_@WRLah39w{kXHkI}X0ExDHvp`>Sy9gs za~WBEg>N0?DWVMTx{OP963lY8j`1OXI#qZUYklAGJ0G=5u^fjOFWFbbnJugm7Vol* zg&_uuq1e^#+23W+!nUkER=@JM7W6{iU^%`}hE>qa13VpeJbc5BgQH=*ufxQj5A&P( zuIX;&7-#p-m4ma9=HEHmB{Dxy!lF-uwK^+LfLb v_A$kpyQ*5SRqRK2`?=@|Ie#@?kSk4?Ef-n5Rn1H&*1f(@GzR?0?j3#uHD4NC diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xArchive/en-US/MSFT_xArchive.strings.psd1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xArchive/en-US/MSFT_xArchive.strings.psd1 deleted file mode 100644 index f82caed1..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xArchive/en-US/MSFT_xArchive.strings.psd1 +++ /dev/null @@ -1,57 +0,0 @@ -# Localized MSFT_xArchive.strings.psd1 - -ConvertFrom-StringData @' - RetrievingArchiveState = Retrieving the state of the archive with path {0} and destination {1}... - SettingArchiveState = Setting the state of the archive with path {0} and destination {1}... - ArchiveStateSet = The state of the archive with path {0} and destination {1} has been set. - TestingArchiveState = Testing whether or not the state of the archive with path {0} and destination {1} matches the desired state... - - PathAccessiblePSDriveNotNeeded = The path {0} is accessible. A new PSDrive is not needed. - CreatingPSDrive = Creating a PSDrive to access the path {0} with permissions from the user {1}... - RemovingPSDrive = Removing the mounted PSDrive {0}... - - DestinationExists = A directory already exists at the destination path {0}. - DestinationDoesNotExist = A directory does not exist at the destination path {0}. - CreatingDirectoryAtDestination = Creating the root directory at the destination path {0}... - - TestingIfArchiveExistsAtDestination = Testing if the archive at the destination path {0} exists... - ArchiveExistsAtDestination = The archive at path {0} exists at the destination {1}. - ArchiveDoesNotExistAtDestination = The archive at path {0} does not exist at the destination {1}. - - OpeningArchive = Opening the archive at path {0}... - ClosingArchive = Closing the archive at path {0}... - - OpeningArchiveEntry = Opening the archive entry {0}... - - ItemWithArchiveEntryNameExists = An item with the same name as the archive entry exists at the destination path {0}. - ItemWithArchiveEntryNameDoesNotExist = An item with the same name as the archive entry does not exist at the destination path {0}. - ItemWithArchiveEntryNameIsNotDirectory = The item at the destination path {0} has the same name as a directory archive entry but is not a directory. - ItemWithArchiveEntryNameIsNotFile = The item at the destination path {0} has the same name as a file archive entry but is not a file. - - TestingIfFileMatchesArchiveEntryByChecksum = Testing if the file at {0} matches the archive entry at {1} by the checksum method {2}... - ComparingHashes = Comparing the hash of the file at {0} to the hash of the archive entry at {1} with the hash algorithm {2}... - FileMatchesArchiveEntryByChecksum = The file at {0} matches the archive entry at {1} by the checksum method {2}. - FileDoesNotMatchArchiveEntryByChecksum = The file at {0} does not match the archive entry at {1} by the checksum method {2}. - - ExpandingArchiveToDestination = Expanding the archive at {0} to the destination {1}... - CreatingParentDirectory = Creating an archive entry parent directory at the path {0}... - OverwritingItem = Overwriting the item at the path {0}... - CopyingArchiveEntryToDestination = Copying the corresponding archive entry to the path {0}... - - RemovingArchiveFromDestination = Removing archive from the destination path {0}... - RemovingDirectory = Removing the directory at path {0}... - RemovingFile = Removing the file at path {0}... - CouldNotRemoveItemOfIncorrectType = The file at {0} does not match the item type (file, directory, or other) or the archive entry at {1}, so it will not be removed. - ArchiveRemovedFromDestination = Archive removed from the destination path {0}. - - ChecksumSpecifiedAndValidateFalse = The Checksum parameter was specified as {0} but the Validate parameter is set to false for the archive with path {1} and destination {2}. Please specify the Validate parameter as true to use the Checksum parameter. - PathDoesNotContainValidPSDriveRoot = The path {0} cannot be accessed because it does not contain any directories to use as the root of a PSDrive. - ErrorCreatingPSDrive = An error occurred while attempting to create a PSDrive to access the path {0} under the user {1}. - PathDoesNotExistAsLeaf = The path {0} does not exist or is not a path leaf. - DestinationExistsAsFile = A file exists at the desintation path {0}. - ErrorOpeningArchive = An error occurred while attempting to open the archive at path {0}. - ErrorCopyingFromArchiveToDestination = An error occurred while attempting copy from the archive to the destination path {0}. - DirectoryIsNotEmpty = The directory at path {0} is not empty, so it will not be removed. - ErrorComparingHashes = An error occurred while comparing the hash of the file at {0} to the archive entry {1} with the hash algorithm {2}. - ForceNotSpecifiedToOverwriteItem = An item already exists at {0} that does not match the item in the archive at {1}, but the Force parameter has not been specified to overwrite this item. -'@ diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xDSCWebService/MSFT_xDSCWebService.Schema.mof b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xDSCWebService/MSFT_xDSCWebService.Schema.mof deleted file mode 100644 index 19faeb18..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xDSCWebService/MSFT_xDSCWebService.Schema.mof +++ /dev/null @@ -1,19 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("xDSCWebService")] -class MSFT_xDSCWebService : OMI_BaseResource -{ - [Key] string EndpointName; - [required, Description("Can take the value AllowUnencryptedTraffic for setting up a non SSL based endpoint")] - string CertificateThumbPrint; - [write] uint32 Port; - [write] string PhysicalPath; - [write,ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] string Ensure; - [write,ValueMap{"Started","Stopped"},Values{"Started", "Stopped"}] string State; - [write] string DatabasePath; - [write] string ModulePath; - [write] string ConfigurationPath; - [read] string DSCServerUrl; - [write] string RegistrationKeyPath; - [write] boolean AcceptSelfSignedCertificates; - [required, Description("This property will ensure that the Pull Server is created with the most secure practices")] boolean UseSecurityBestPractices; - [write,ValueMap{"SecureTLSProtocols"},Values{"SecureTLSProtocols"}] string DisableSecurityBestPractices []; -}; diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xDSCWebService/MSFT_xDSCWebService.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xDSCWebService/MSFT_xDSCWebService.psm1 deleted file mode 100644 index 048d9475..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xDSCWebService/MSFT_xDSCWebService.psm1 +++ /dev/null @@ -1,691 +0,0 @@ -# Import the helper functions -Import-Module $PSScriptRoot\PSWSIISEndpoint.psm1 -Verbose:$false -Import-Module $PSScriptRoot\UseSecurityBestPractices.psm1 -Verbose:$false - -# The Get-TargetResource cmdlet. -function Get-TargetResource -{ - [OutputType([Hashtable])] - param - ( - # Prefix of the WCF SVC File - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string]$EndpointName, - - # Thumbprint of the Certificate in CERT:\LocalMachine\MY\ for Pull Server - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string]$CertificateThumbPrint, - - # Pull Server is created with the most secure practices - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [bool]$UseSecurityBestPractices, - - # Exceptions of security best practices - [ValidateSet("SecureTLSProtocols")] - [string[]] $DisableSecurityBestPractices - ) - - $webSite = Get-Website -Name $EndpointName - - if ($webSite) - { - $Ensure = 'Present' - $AcceptSelfSignedCertificates = $false - - # Get Full Path for Web.config file - $webConfigFullPath = Join-Path $website.physicalPath "web.config" - - # Get module and configuration path - $modulePath = Get-WebConfigAppSetting -WebConfigFullPath $webConfigFullPath -AppSettingName "ModulePath" - $ConfigurationPath = Get-WebConfigAppSetting -WebConfigFullPath $webConfigFullPath -AppSettingName "ConfigurationPath" - $RegistrationKeyPath = Get-WebConfigAppSetting -WebConfigFullPath $webConfigFullPath -AppSettingName "RegistrationKeyPath" - - # Get database path - switch ((Get-WebConfigAppSetting -WebConfigFullPath $webConfigFullPath -AppSettingName "dbprovider")) - { - "ESENT" { - $databasePath = Get-WebConfigAppSetting -WebConfigFullPath $webConfigFullPath -AppSettingName "dbconnectionstr" | Split-Path -Parent - } - - "System.Data.OleDb" { - $connectionString = Get-WebConfigAppSetting -WebConfigFullPath $webConfigFullPath -AppSettingName "dbconnectionstr" - if ($connectionString -match 'Data Source=(.*)\\Devices\.mdb') - { - $databasePath = $Matches[0] - } - } - } - - $UrlPrefix = $website.bindings.Collection[0].protocol + "://" - - $fqdn = $env:COMPUTERNAME - if ($env:USERDNSDOMAIN) - { - $fqdn = $env:COMPUTERNAME + "." + $env:USERDNSDOMAIN - } - - $iisPort = $website.bindings.Collection[0].bindingInformation.Split(":")[1] - - $svcFileName = (Get-ChildItem -Path $website.physicalPath -Filter "*.svc").Name - - $serverUrl = $UrlPrefix + $fqdn + ":" + $iisPort + "/" + $svcFileName - - $webBinding = Get-WebBinding -Name $EndpointName - - # This is the 64 bit module - $certNativeModule = Get-WebConfigModulesSetting -WebConfigFullPath $webConfigFullPath -ModuleName "IISSelfSignedCertModule" - if($certNativeModule) - { - $AcceptSelfSignedCertificates = $true - } - - # This is the 32 bit module - $certNativeModule = Get-WebConfigModulesSetting -WebConfigFullPath $webConfigFullPath -ModuleName "IISSelfSignedCertModule(32bit)" - if($certNativeModule) - { - $AcceptSelfSignedCertificates = $true - } - } - else - { - $Ensure = 'Absent' - } - - @{ - EndpointName = $EndpointName - CertificateThumbPrint = if($CertificateThumbPrint -eq 'AllowUnencryptedTraffic'){$CertificateThumbPrint} else {(Get-WebBinding -Name $EndpointName).CertificateHash} - Port = $iisPort - PhysicalPath = $website.physicalPath - State = $webSite.state - DatabasePath = $databasePath - ModulePath = $modulePath - ConfigurationPath = $ConfigurationPath - DSCServerUrl = $serverUrl - Ensure = $Ensure - RegistrationKeyPath = $RegistrationKeyPath - AcceptSelfSignedCertificates = $AcceptSelfSignedCertificates - UseSecurityBestPractices = $UseSecurityBestPractices - DisableSecurityBestPractices = $DisableSecurityBestPractices - } -} - -# The Set-TargetResource cmdlet. -function Set-TargetResource -{ - param - ( - # Prefix of the WCF SVC File - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string]$EndpointName, - - # Port number of the DSC Pull Server IIS Endpoint - [Uint32]$Port = 8080, - - # Physical path for the IIS Endpoint on the machine (usually under inetpub) - [string]$PhysicalPath = "$env:SystemDrive\inetpub\$EndpointName", - - # Thumbprint of the Certificate in CERT:\LocalMachine\MY\ for Pull Server - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string]$CertificateThumbPrint, - - [ValidateSet("Present", "Absent")] - [string]$Ensure = "Present", - - [ValidateSet("Started", "Stopped")] - [string]$State = "Started", - - # Location on the disk where the database is stored - [ValidateNotNullOrEmpty()] - [System.String] - $DatabasePath = "$env:PROGRAMFILES\WindowsPowerShell\DscService", - - # Location on the disk where the Modules are stored - [string]$ModulePath = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Modules", - - # Location on the disk where the Configuration is stored - [string]$ConfigurationPath = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Configuration", - - # Location on the disk where the RegistrationKeys file is stored - [string]$RegistrationKeyPath = "$env:PROGRAMFILES\WindowsPowerShell\DscService", - - # Add the IISSelfSignedCertModule native module to prevent self-signed certs being rejected. - [boolean]$AcceptSelfSignedCertificates = $true, - - # Pull Server is created with the most secure practices - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [bool]$UseSecurityBestPractices, - - # Exceptions of security best practices - [ValidateSet("SecureTLSProtocols")] - [string[]] $DisableSecurityBestPractices - ) - - # Check parameter values - if ($UseSecurityBestPractices -and ($CertificateThumbPrint -eq "AllowUnencryptedTraffic")) - { - throw "Error: Cannot use best practice security settings with unencrypted traffic. Please set UseSecurityBestPractices to `$false or use a certificate to encrypt pull server traffic." - # No need to proceed any more - return - } - - # Initialize with default values - $script:appCmd = "$env:windir\system32\inetsrv\appcmd.exe" - - $pathPullServer = "$pshome\modules\PSDesiredStateConfiguration\PullServer" - $jet4provider = "System.Data.OleDb" - $jet4database = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=$DatabasePath\Devices.mdb;" - $eseprovider = "ESENT"; - $esedatabase = "$DatabasePath\Devices.edb"; - - $culture = Get-Culture - $language = $culture.TwoLetterISOLanguageName - # the two letter iso languagename is not actually implemented in the source path, it's always 'en' - if (-not (Test-Path $pathPullServer\$language\Microsoft.Powershell.DesiredStateConfiguration.Service.Resources.dll)) { - $language = 'en' - } - - $os = [System.Environment]::OSVersion.Version - $IsBlue = $false; - if($os.Major -eq 6 -and $os.Minor -eq 3) - { - $IsBlue = $true; - } - - $isDownlevelOfBlue = $false; - if($os.Major -eq 6 -and $os.Minor -lt 3) - { - $isDownlevelOfBlue= $true; - } - - # Use Pull Server values for defaults - $webConfigFileName = "$pathPullServer\PSDSCPullServer.config" - $svcFileName = "$pathPullServer\PSDSCPullServer.svc" - $pswsMofFileName = "$pathPullServer\PSDSCPullServer.mof" - $pswsDispatchFileName = "$pathPullServer\PSDSCPullServer.xml" - - # ============ Absent block to remove existing site ========= - if(($Ensure -eq "Absent")) - { - $website = Get-Website -Name $EndpointName - if($website -ne $null) - { - # there is a web site, but there shouldn't be one - Write-Verbose "Removing web site $EndpointName" - PSWSIISEndpoint\Remove-PSWSEndpoint -SiteName $EndpointName - } - - # we are done here, all stuff below is for 'Present' - return - } - # =========================================================== - - Write-Verbose "Create the IIS endpoint" - PSWSIISEndpoint\New-PSWSEndpoint -site $EndpointName ` - -path $PhysicalPath ` - -cfgfile $webConfigFileName ` - -port $Port ` - -applicationPoolIdentityType LocalSystem ` - -app $EndpointName ` - -svc $svcFileName ` - -mof $pswsMofFileName ` - -dispatch $pswsDispatchFileName ` - -asax "$pathPullServer\Global.asax" ` - -dependentBinaries "$pathPullServer\Microsoft.Powershell.DesiredStateConfiguration.Service.dll" ` - -language $language ` - -dependentMUIFiles "$pathPullServer\$language\Microsoft.Powershell.DesiredStateConfiguration.Service.Resources.dll" ` - -certificateThumbPrint $CertificateThumbPrint ` - -EnableFirewallException $true -Verbose - - Update-LocationTagInApplicationHostConfigForAuthentication -WebSite $EndpointName -Authentication "anonymous" - Update-LocationTagInApplicationHostConfigForAuthentication -WebSite $EndpointName -Authentication "basic" - Update-LocationTagInApplicationHostConfigForAuthentication -WebSite $EndpointName -Authentication "windows" - - if ($IsBlue) - { - Write-Verbose "Set values into the web.config that define the repository for BLUE OS" - PSWSIISEndpoint\Set-AppSettingsInWebconfig -path $PhysicalPath -key "dbprovider" -value $eseprovider - PSWSIISEndpoint\Set-AppSettingsInWebconfig -path $PhysicalPath -key "dbconnectionstr"-value $esedatabase - Set-BindingRedirectSettingInWebConfig -path $PhysicalPath - } - else - { - if($isDownlevelOfBlue) - { - Write-Verbose "Set values into the web.config that define the repository for non-BLUE Downlevel OS" - $repository = Join-Path "$DatabasePath" "Devices.mdb" - Copy-Item "$pathPullServer\Devices.mdb" $repository -Force - - PSWSIISEndpoint\Set-AppSettingsInWebconfig -path $PhysicalPath -key "dbprovider" -value $jet4provider - PSWSIISEndpoint\Set-AppSettingsInWebconfig -path $PhysicalPath -key "dbconnectionstr" -value $jet4database - } - else - { - Write-Verbose "Set values into the web.config that define the repository later than BLUE OS" - Write-Verbose "Only ESENT is supported on Windows Server 2016" - - PSWSIISEndpoint\Set-AppSettingsInWebconfig -path $PhysicalPath -key "dbprovider" -value $eseprovider - PSWSIISEndpoint\Set-AppSettingsInWebconfig -path $PhysicalPath -key "dbconnectionstr"-value $esedatabase - } - } - - Write-Verbose "Pull Server: Set values into the web.config that indicate the location of repository, configuration, modules" - - # Create the application data directory calculated above - $null = New-Item -path $DatabasePath -itemType "directory" -Force - - $null = New-Item -path "$ConfigurationPath" -itemType "directory" -Force - - PSWSIISEndpoint\Set-AppSettingsInWebconfig -path $PhysicalPath -key "ConfigurationPath" -value $ConfigurationPath - - $null = New-Item -path "$ModulePath" -itemType "directory" -Force - - PSWSIISEndpoint\Set-AppSettingsInWebconfig -path $PhysicalPath -key "ModulePath" -value $ModulePath - - $null = New-Item -path "$RegistrationKeyPath" -itemType "directory" -Force - - PSWSIISEndpoint\Set-AppSettingsInWebconfig -path $PhysicalPath -key "RegistrationKeyPath" -value $RegistrationKeyPath - - if($AcceptSelfSignedCertificates) - { - Copy-Item "$pathPullServer\IISSelfSignedCertModule.dll" $env:windir\System32\inetsrv -Force - Copy-Item "$env:windir\SysWOW64\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PullServer\IISSelfSignedCertModule.dll" $env:windir\SysWOW64\inetsrv -Force - - & $script:appCmd install module /name:"IISSelfSignedCertModule(32bit)" /image:$env:windir\SysWOW64\inetsrv\IISSelfSignedCertModule.dll /add:false /lock:false /preCondition:bitness32 - & $script:appCmd add module /name:"IISSelfSignedCertModule(32bit)" /app.name:"PSDSCPullServer/" - } - else - { - if($AcceptSelfSignedCertificates -and ($AcceptSelfSignedCertificates -eq $false)) - { - & $script:appCmd delete module /name:"IISSelfSignedCertModule(32bit)" /app.name:"PSDSCPullServer/" - } - } - - if($UseSecurityBestPractices) - { - UseSecurityBestPractices\Set-UseSecurityBestPractices -DisableSecurityBestPractices $DisableSecurityBestPractices - } -} - -# The Test-TargetResource cmdlet. -function Test-TargetResource -{ - [OutputType([Boolean])] - param - ( - # Prefix of the WCF SVC File - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string]$EndpointName, - - # Port number of the DSC Pull Server IIS Endpoint - [Uint32]$Port = 8080, - - # Physical path for the IIS Endpoint on the machine (usually under inetpub) - [string]$PhysicalPath = "$env:SystemDrive\inetpub\$EndpointName", - - # Thumbprint of the Certificate in CERT:\LocalMachine\MY\ for Pull Server - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string]$CertificateThumbPrint = "AllowUnencryptedTraffic", - - [ValidateSet("Present", "Absent")] - [string]$Ensure = "Present", - - [ValidateSet("Started", "Stopped")] - [string]$State = "Started", - - # Location on the disk where the database is stored - [ValidateNotNullOrEmpty()] - [System.String] - $DatabasePath = "$env:PROGRAMFILES\WindowsPowerShell\DscService", - - # Location on the disk where the Modules are stored - [string]$ModulePath = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Modules", - - # Location on the disk where the Configuration is stored - [string]$ConfigurationPath = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Configuration", - - # Location on the disk where the RegistrationKeys file is stored - [string]$RegistrationKeyPath, - - # Are self-signed certs being accepted for client auth. - [boolean]$AcceptSelfSignedCertificates, - - # Pull Server is created with the most secure practices - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [bool]$UseSecurityBestPractices, - - # Exceptions of security best practices - [ValidateSet("SecureTLSProtocols")] - [string[]] $DisableSecurityBestPractices - ) - - $desiredConfigurationMatch = $true; - - $website = Get-Website -Name $EndpointName - $stop = $true - - Do - { - Write-Verbose "Check Ensure" - if(($Ensure -eq "Present" -and $website -eq $null)) - { - $DesiredConfigurationMatch = $false - Write-Verbose "The Website $EndpointName is not present" - break - } - if(($Ensure -eq "Absent" -and $website -ne $null)) - { - $DesiredConfigurationMatch = $false - Write-Verbose "The Website $EndpointName is present but should not be" - break - } - if(($Ensure -eq "Absent" -and $website -eq $null)) - { - $DesiredConfigurationMatch = $true - Write-Verbose "The Website $EndpointName is not present as requested" - break - } - # the other case is: Ensure and exist, we continue with more checks - - Write-Verbose "Check Port" - $actualPort = $website.bindings.Collection[0].bindingInformation.Split(":")[1] - if ($Port -ne $actualPort) - { - $DesiredConfigurationMatch = $false - Write-Verbose "Port for the Website $EndpointName does not match the desired state." - break - } - - Write-Verbose "Check Physical Path property" - if(Test-WebsitePath -EndpointName $EndpointName -PhysicalPath $PhysicalPath) - { - $DesiredConfigurationMatch = $false - Write-Verbose "Physical Path of Website $EndpointName does not match the desired state." - break - } - - Write-Verbose "Check State" - if($website.state -ne $State -and $State -ne $null) - { - $DesiredConfigurationMatch = $false - Write-Verbose "The state of Website $EndpointName does not match the desired state." - break - } - - Write-Verbose "Get Full Path for Web.config file" - $webConfigFullPath = Join-Path $website.physicalPath "web.config" - if ($IsComplianceServer -eq $false) - { - Write-Verbose "Check DatabasePath" - switch ((Get-WebConfigAppSetting -WebConfigFullPath $webConfigFullPath -AppSettingName "dbprovider")) - { - "ESENT" { - $expectedConnectionString = "$DatabasePath\Devices.edb" - } - "System.Data.OleDb" { - $expectedConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=$DatabasePath\Devices.mdb;" - } - default { - $expectedConnectionString = [System.String]::Empty - } - } - if (([System.String]::IsNullOrEmpty($expectedConnectionString))) - { - $DesiredConfigurationMatch = $false - Write-Verbose "The DB provider does not have a valid value: 'ESENT' or 'System.Data.OleDb'" - break - } - - if (-not (Test-WebConfigAppSetting -WebConfigFullPath $webConfigFullPath -AppSettingName "dbconnectionstr" -ExpectedAppSettingValue $expectedConnectionString)) - { - $DesiredConfigurationMatch = $false - break - } - - Write-Verbose "Check ModulePath" - if ($ModulePath) - { - if (-not (Test-WebConfigAppSetting -WebConfigFullPath $webConfigFullPath -AppSettingName "ModulePath" -ExpectedAppSettingValue $ModulePath)) - { - $DesiredConfigurationMatch = $false - break - } - } - - Write-Verbose "Check ConfigurationPath" - if ($ConfigurationPath) - { - if (-not (Test-WebConfigAppSetting -WebConfigFullPath $webConfigFullPath -AppSettingName "ConfigurationPath" -ExpectedAppSettingValue $ConfigurationPath)) - { - $DesiredConfigurationMatch = $false - break - } - } - - Write-Verbose "Check RegistrationKeyPath" - if ($RegistrationKeyPath) - { - if (-not (Test-WebConfigAppSetting -WebConfigFullPath $webConfigFullPath -AppSettingName "RegistrationKeyPath" -ExpectedAppSettingValue $RegistrationKeyPath)) - { - $DesiredConfigurationMatch = $false - break - } - } - - Write-Verbose "Check AcceptSelfSignedCertificates" - if ($AcceptSelfSignedCertificates) - { - if (-not (Test-WebConfigModulesSetting -WebConfigFullPath $webConfigFullPath -ModuleName "IISSelfSignedCertModule(32bit)" -ExpectedInstallationStatus $AcceptSelfSignedCertificates)) - { - $DesiredConfigurationMatch = $false - break - } - } - } - - Write-Verbose "Check UseSecurityBestPractices" - if ($UseSecurityBestPractices) - { - if (-not (UseSecurityBestPractices\Test-UseSecurityBestPractices -DisableSecurityBestPractices $DisableSecurityBestPractices)) - { - $desiredConfigurationMatch = $false; - Write-Verbose "The state of security settings does not match the desired state." - break - } - } - $stop = $false - } - While($stop) - - $desiredConfigurationMatch; -} - -# Helper function used to validate website path -function Test-WebsitePath -{ - param - ( - [string] $EndpointName, - [string] $PhysicalPath - ) - - $pathNeedsUpdating = $false - - if((Get-ItemProperty "IIS:\Sites\$EndpointName" -Name physicalPath) -ne $PhysicalPath) - { - $pathNeedsUpdating = $true - } - - $pathNeedsUpdating -} - -# Helper function to Test the specified Web.Config App Setting -function Test-WebConfigAppSetting -{ - param - ( - [string] $WebConfigFullPath, - [string] $AppSettingName, - [string] $ExpectedAppSettingValue - ) - - $returnValue = $true - - if (Test-Path $WebConfigFullPath) - { - $webConfigXml = [xml](get-content $WebConfigFullPath) - $root = $webConfigXml.get_DocumentElement() - - foreach ($item in $root.appSettings.add) - { - if( $item.key -eq $AppSettingName ) - { - break - } - } - - if($item.value -ne $ExpectedAppSettingValue) - { - $returnValue = $false - Write-Verbose "The state of Web.Config AppSetting $AppSettingName does not match the desired state." - } - - } - $returnValue -} - -# Helper function to Get the specified Web.Config App Setting -function Get-WebConfigAppSetting -{ - param - ( - [string] $WebConfigFullPath, - [string] $AppSettingName - ) - - $appSettingValue = "" - if (Test-Path $WebConfigFullPath) - { - $webConfigXml = [xml](get-content $WebConfigFullPath) - $root = $webConfigXml.get_DocumentElement() - - foreach ($item in $root.appSettings.add) - { - if( $item.key -eq $AppSettingName ) - { - $appSettingValue = $item.value - break - } - } - } - - $appSettingValue -} - -# Helper function to Test the specified Web.Config Modules Setting -function Test-WebConfigModulesSetting -{ - param - ( - [string] $WebConfigFullPath, - [string] $ModuleName, - [boolean] $ExpectedInstallationStatus - ) - - $returnValue = $false - - if (Test-Path $WebConfigFullPath) - { - $webConfigXml = [xml](get-content $WebConfigFullPath) - $root = $webConfigXml.get_DocumentElement() - - foreach ($item in $root."system.webServer".modules.add) - { - if( $item.name -eq $ModuleName ) - { - if($ExpectedInstallationStatus -eq $true) - { - $returnValue = $true - } - break - } - } - } - - if(($ExpectedInstallationStatus -eq $false) -and ($returnValue -eq $false)) - { - $returnValue = $true - } - - $returnValue -} - -# Helper function to Get the specified Web.Config Modules Setting -function Get-WebConfigModulesSetting -{ - param - ( - [string] $WebConfigFullPath, - [string] $ModuleName - ) - - $moduleValue = "" - if (Test-Path $WebConfigFullPath) - { - $webConfigXml = [xml](get-content $WebConfigFullPath) - $root = $webConfigXml.get_DocumentElement() - - foreach ($item in $root."system.webServer".modules.add) - { - if( $item.name -eq $ModuleName ) - { - $moduleValue = $item.name - break - } - } - } - - $moduleValue -} - -# Helper to get current script Folder -function Get-ScriptFolder -{ - $Invocation = (Get-Variable MyInvocation -Scope 1).Value - Split-Path $Invocation.MyCommand.Path -} - -# Allow this Website to enable/disable specific Auth Schemes by adding tag in applicationhost.config -function Update-LocationTagInApplicationHostConfigForAuthentication -{ - param ( - # Name of the WebSite - [String] $WebSite, - - # Authentication Type - [ValidateSet('anonymous', 'basic', 'windows')] - [String] $Authentication - ) - - [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Web.Administration") | Out-Null - - $webAdminSrvMgr = [Microsoft.Web.Administration.ServerManager]::OpenRemote("127.0.0.1") - - $appHostConfig = $webAdminSrvMgr.GetApplicationHostConfiguration() - - $authenticationType = $Authentication + "Authentication" - $appHostConfigSection = $appHostConfig.GetSection("system.webServer/security/authentication/$authenticationType", $WebSite) - $appHostConfigSection.OverrideMode="Allow" - $webAdminSrvMgr.CommitChanges() -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xDSCWebService/PSWSIISEndpoint.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xDSCWebService/PSWSIISEndpoint.psm1 deleted file mode 100644 index 11cb3c74..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xDSCWebService/PSWSIISEndpoint.psm1 +++ /dev/null @@ -1,709 +0,0 @@ -# This module file contains a utility to perform PSWS IIS Endpoint setup -# Module exports New-PSWSEndpoint function to perform the endpoint setup -# -#Copyright (c) Microsoft Corporation, 2014 -# - -# name and description for the Firewall rules. Used in multiple locations -$FireWallRuleDisplayName = "Desired State Configuration - Pull Server Port:{0}" -$FireWallRuleDescription = "Inbound traffic for IIS site on Port:{0} for DSC pull server. Created by DSCWebService resource" - -# Validate supplied configuration to setup the PSWS Endpoint -# Function checks for the existence of PSWS Schema files, IIS config -# Also validate presence of IIS on the target machine -# -function Initialize-Endpoint -{ - param ( - $site, - $path, - $cfgfile, - $port, - $app, - $applicationPoolIdentityType, - $svc, - $mof, - $dispatch, - $asax, - $dependentBinaries, - $language, - $dependentMUIFiles, - $psFiles, - $removeSiteFiles = $false, - $certificateThumbPrint) - - if (!(Test-Path $cfgfile)) - { - throw "ERROR: $cfgfile does not exist" - } - - if (!(Test-Path $svc)) - { - throw "ERROR: $svc does not exist" - } - - if (!(Test-Path $mof)) - { - throw "ERROR: $mof does not exist" - } - - if (!(Test-Path $asax)) - { - throw "ERROR: $asax does not exist" - } - - if ($certificateThumbPrint -ne "AllowUnencryptedTraffic") - { - Write-Verbose "Verify that the certificate with the provided thumbprint exists in CERT:\LocalMachine\MY\" - $certificate = Get-childItem CERT:\LocalMachine\MY\ | Where {$_.Thumbprint -eq $certificateThumbPrint} - if (!$Certificate) - { - throw "ERROR: Certificate with thumbprint $certificateThumbPrint does not exist in CERT:\LocalMachine\MY\" - } - } - - Test-IISInstall - - $appPool = "PSWS" - - - Write-Verbose "Delete the App Pool if it exists" - Remove-AppPool -apppool $appPool - - Write-Verbose "Remove the site if it already exists" - Update-Site -siteName $site -siteAction Remove - - # check for existing binding, there should be no binding with the same port - if ((Get-WebBinding | where bindingInformation -eq "*:$($port):").count -gt 0) - { - throw "ERROR: Port $port is already used, please review existing sites and change the port to be used." - } - - if ($removeSiteFiles) - { - if(Test-Path $path) - { - Remove-Item -Path $path -Recurse -Force - } - } - - Copy-Files -path $path -cfgfile $cfgfile -svc $svc -mof $mof -dispatch $dispatch -asax $asax -dependentBinaries $dependentBinaries -language $language -dependentMUIFiles $dependentMUIFiles -psFiles $psFiles - - New-IISWebSite -site $site -path $path -port $port -app $app -apppool $appPool -applicationPoolIdentityType $applicationPoolIdentityType -certificateThumbPrint $certificateThumbPrint -} - -# Validate if IIS and all required dependencies are installed on the target machine -# -function Test-IISInstall -{ - Write-Verbose "Checking IIS requirements" - $iisVersion = (Get-ItemProperty HKLM:\SOFTWARE\Microsoft\InetStp -ErrorAction silentlycontinue).MajorVersion - - if ($iisVersion -lt 7) - { - throw "ERROR: IIS Version detected is $iisVersion , must be running higher than 7.0" - } - - $wsRegKey = (Get-ItemProperty hklm:\SYSTEM\CurrentControlSet\Services\W3SVC -ErrorAction silentlycontinue).ImagePath - if ($wsRegKey -eq $null) - { - throw "ERROR: Cannot retrive W3SVC key. IIS Web Services may not be installed" - } - - if ((Get-Service w3svc).Status -ne "running") - { - throw "ERROR: service W3SVC is not running" - } -} - -# Verify if a given IIS Site exists -# -function Test-IISSiteExists -{ - param ($siteName) - - if (Get-Website -Name $siteName) - { - return $true - } - - return $false -} - -# Perform an action (such as stop, start, delete) for a given IIS Site -# -function Update-Site -{ - param ( - [Parameter(ParameterSetName = 'SiteName', Mandatory, Position = 0)] - [ValidateNotNullOrEmpty()] - [String]$siteName, - - [Parameter(ParameterSetName = 'Site', Mandatory, Position = 0)] - $site, - - [Parameter(ParameterSetName = 'SiteName', Mandatory, Position = 1)] - [Parameter(ParameterSetName = 'Site', Mandatory, Position = 1)] - [String]$siteAction) - - [String]$name = $null - if ($PSCmdlet.ParameterSetName -eq 'SiteName') - { - $name = $siteName - } - elseif ($PSCmdlet.ParameterSetName -eq 'Site') - { - $name = $site.Name - } - - if (Test-IISSiteExists -siteName $name) - { - switch ($siteAction) - { - "Start" {Start-Website -Name "$name"} - "Stop" {Stop-Website -Name "$name" -ErrorAction SilentlyContinue} - "Remove" {Remove-Website -Name "$name"} - } - Write-Verbose "p11" - } -} - -# Delete the given IIS Application Pool -# This is required to cleanup any existing conflicting apppools before setting up the endpoint -# -function Remove-AppPool -{ - param ($appPool) - - # without this tests we may get a breaking error here, despite SilentlyContinue - if (Test-Path "IIS:\AppPools\$appPool") - { - Remove-WebAppPool -Name $appPool -ErrorAction SilentlyContinue - } -} - -# Generate an IIS Site Id while setting up the endpoint -# The Site Id will be the max available in IIS config + 1 -# -function New-SiteID -{ - return ((Get-Website | % { $_.Id } | Measure-Object -Maximum).Maximum + 1) -} - -# Validate the PSWS config files supplied and copy to the IIS endpoint in inetpub -# -function Copy-Files -{ - param ( - $path, - $cfgfile, - $svc, - $mof, - $dispatch, - $asax, - $dependentBinaries, - $language, - $dependentMUIFiles, - $psFiles) - - if (!(Test-Path $cfgfile)) - { - throw "ERROR: $cfgfile does not exist" - } - - if (!(Test-Path $svc)) - { - throw "ERROR: $svc does not exist" - } - - if (!(Test-Path $mof)) - { - throw "ERROR: $mof does not exist" - } - - if (!(Test-Path $asax)) - { - throw "ERROR: $asax does not exist" - } - - if (!(Test-Path $path)) - { - $null = New-Item -ItemType container -Path $path - } - - foreach ($dependentBinary in $dependentBinaries) - { - if (!(Test-Path $dependentBinary)) - { - throw "ERROR: $dependentBinary does not exist" - } - } - - foreach ($dependentMUIFile in $dependentMUIFiles) - { - if (!(Test-Path $dependentMUIFile)) - { - throw "ERROR: $dependentMUIFile does not exist" - } - } - - Write-Verbose "Create the bin folder for deploying custom dependent binaries required by the endpoint" - $binFolderPath = Join-Path $path "bin" - $null = New-Item -path $binFolderPath -itemType "directory" -Force - Copy-Item $dependentBinaries $binFolderPath -Force - - if ($language) - { - $muiPath = Join-Path $binFolderPath $language - - if (!(Test-Path $muiPath)) - { - $null = New-Item -ItemType container $muiPath - } - Copy-Item $dependentMUIFiles $muiPath -Force - } - - foreach ($psFile in $psFiles) - { - if (!(Test-Path $psFile)) - { - throw "ERROR: $psFile does not exist" - } - - Copy-Item $psFile $path -Force - } - - Copy-Item $cfgfile (Join-Path $path "web.config") -Force - Copy-Item $svc $path -Force - Copy-Item $mof $path -Force - - if ($dispatch) - { - Copy-Item $dispatch $path -Force - } - - if ($asax) - { - Copy-Item $asax $path -Force - } -} - -# Setup IIS Apppool, Site and Application -# -function New-IISWebSite -{ - param ( - $site, - $path, - $port, - $app, - $appPool, - $applicationPoolIdentityType, - $certificateThumbPrint) - - $siteID = New-SiteID - - Write-Verbose "Adding App Pool" - $null = New-WebAppPool -Name $appPool - - Write-Verbose "Set App Pool Properties" - $appPoolIdentity = 4 - if ($applicationPoolIdentityType) - { - # LocalSystem = 0, LocalService = 1, NetworkService = 2, SpecificUser = 3, ApplicationPoolIdentity = 4 - if ($applicationPoolIdentityType -eq "LocalSystem") - { - $appPoolIdentity = 0 - } - elseif ($applicationPoolIdentityType -eq "LocalService") - { - $appPoolIdentity = 1 - } - elseif ($applicationPoolIdentityType -eq "NetworkService") - { - $appPoolIdentity = 2 - } - } - - $appPoolItem = Get-Item IIS:\AppPools\$appPool - $appPoolItem.managedRuntimeVersion = "v4.0" - $appPoolItem.enable32BitAppOnWin64 = $true - $appPoolItem.processModel.identityType = $appPoolIdentity - $appPoolItem | Set-Item - - Write-Verbose "Add and Set Site Properties" - if ($certificateThumbPrint -eq "AllowUnencryptedTraffic") - { - $webSite = New-WebSite -Name $site -Id $siteID -Port $port -IPAddress "*" -PhysicalPath $path -ApplicationPool $appPool - } - else - { - $webSite = New-WebSite -Name $site -Id $siteID -Port $port -IPAddress "*" -PhysicalPath $path -ApplicationPool $appPool -Ssl - - # Remove existing binding for $port - Remove-Item IIS:\SSLBindings\0.0.0.0!$port -ErrorAction Ignore - - # Create a new binding using the supplied certificate - $null = Get-Item CERT:\LocalMachine\MY\$certificateThumbPrint | New-Item IIS:\SSLBindings\0.0.0.0!$port - } - - Update-Site -siteName $site -siteAction Start -} - -# Allow Clients outsite the machine to access the setup endpoint on a User Port -# -function New-FirewallRule -{ - param ($firewallPort) - - $script:netsh = "$env:windir\system32\netsh.exe" - - Write-Verbose "Disable Inbound Firewall Notification" - & $script:netsh advfirewall set currentprofile settings inboundusernotification disable - - # remove all existing rules with that displayName - & $script:netsh advfirewall firewall delete rule name=DSCPullServer_IIS_Port protocol=tcp localport=$firewallPort | Out-Null - - Write-Verbose "Add Firewall Rule for port $firewallPort" - & $script:netsh advfirewall firewall add rule name=DSCPullServer_IIS_Port dir=in action=allow protocol=TCP localport=$firewallPort -} - -# Enable & Clear PSWS Operational/Analytic/Debug ETW Channels -# -function Enable-PSWSETW -{ - # Disable Analytic Log - & $script:wevtutil sl Microsoft-Windows-ManagementOdataService/Analytic /e:false /q | Out-Null - - # Disable Debug Log - & $script:wevtutil sl Microsoft-Windows-ManagementOdataService/Debug /e:false /q | Out-Null - - # Clear Operational Log - & $script:wevtutil cl Microsoft-Windows-ManagementOdataService/Operational | Out-Null - - # Enable/Clear Analytic Log - & $script:wevtutil sl Microsoft-Windows-ManagementOdataService/Analytic /e:true /q | Out-Null - - # Enable/Clear Debug Log - & $script:wevtutil sl Microsoft-Windows-ManagementOdataService/Debug /e:true /q | Out-Null -} - -<# -.Synopsis - Create PowerShell WebServices IIS Endpoint -.DESCRIPTION - Creates a PSWS IIS Endpoint by consuming PSWS Schema and related dependent files -.EXAMPLE - New a PSWS Endpoint [@ http://Server:39689/PSWS_Win32Process] by consuming PSWS Schema Files and any dependent scripts/binaries - New-PSWSEndpoint -site Win32Process -path $env:SystemDrive\inetpub\PSWS_Win32Process -cfgfile Win32Process.config -port 39689 -app Win32Process -svc PSWS.svc -mof Win32Process.mof -dispatch Win32Process.xml -dependentBinaries ConfigureProcess.ps1, Rbac.dll -psFiles Win32Process.psm1 -#> -function New-PSWSEndpoint -{ -[CmdletBinding()] - param ( - - # Unique Name of the IIS Site - [String] $site = "PSWS", - - # Physical path for the IIS Endpoint on the machine (under inetpub) - [String] $path = "$env:SystemDrive\inetpub\PSWS", - - # Web.config file - [String] $cfgfile = "web.config", - - # Port # for the IIS Endpoint - [Int] $port = 8080, - - # IIS Application Name for the Site - [String] $app = "PSWS", - - # IIS App Pool Identity Type - must be one of LocalService, LocalSystem, NetworkService, ApplicationPoolIdentity - [ValidateSet('LocalService', 'LocalSystem', 'NetworkService', 'ApplicationPoolIdentity')] - [String] $applicationPoolIdentityType, - - # WCF Service SVC file - [String] $svc = "PSWS.svc", - - # PSWS Specific MOF Schema File - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [String] $mof, - - # PSWS Specific Dispatch Mapping File [Optional] - [ValidateNotNullOrEmpty()] - [String] $dispatch, - - # Global.asax file [Optional] - [ValidateNotNullOrEmpty()] - [String] $asax, - - # Any dependent binaries that need to be deployed to the IIS endpoint, in the bin folder - [ValidateNotNullOrEmpty()] - [String[]] $dependentBinaries, - - # MUI Language [Optional] - [ValidateNotNullOrEmpty()] - [String] $language, - - # Any dependent binaries that need to be deployed to the IIS endpoint, in the bin\mui folder [Optional] - [ValidateNotNullOrEmpty()] - [String[]] $dependentMUIFiles, - - # Any dependent PowerShell Scipts/Modules that need to be deployed to the IIS endpoint application root - [ValidateNotNullOrEmpty()] - [String[]] $psFiles, - - # True to remove all files for the site at first, false otherwise - [Boolean]$removeSiteFiles = $false, - - # Enable Firewall Exception for the supplied port - [Boolean] $EnableFirewallException, - - # Enable and Clear PSWS ETW - [switch] $EnablePSWSETW, - - # Thumbprint of the Certificate in CERT:\LocalMachine\MY\ for Pull Server - [String] $certificateThumbPrint = "AllowUnencryptedTraffic") - - $script:wevtutil = "$env:windir\system32\Wevtutil.exe" - - $svcName = Split-Path $svc -Leaf - $protocol = "https:" - if ($certificateThumbPrint -eq "AllowUnencryptedTraffic") - { - $protocol = "http:" - } - - # Get Machine Name - $cimInstance = Get-CimInstance -ClassName Win32_ComputerSystem -Verbose:$false - - Write-Verbose ("Setting up endpoint at - $protocol//" + $cimInstance.Name + ":" + $port + "/" + $svcName) - Initialize-Endpoint -site $site -path $path -cfgfile $cfgfile -port $port -app $app ` - -applicationPoolIdentityType $applicationPoolIdentityType -svc $svc -mof $mof ` - -dispatch $dispatch -asax $asax -dependentBinaries $dependentBinaries ` - -language $language -dependentMUIFiles $dependentMUIFiles -psFiles $psFiles ` - -removeSiteFiles $removeSiteFiles -certificateThumbPrint $certificateThumbPrint - - if ($EnableFirewallException -eq $true) - { - Write-Verbose "Enabling firewall exception for port $port" - $null = New-FirewallRule $port - } - - if ($EnablePSWSETW) - { - Enable-PSWSETW - } -} - -<# -.Synopsis - Removes a DSC WebServices IIS Endpoint -.DESCRIPTION - Removes a PSWS IIS Endpoint -.EXAMPLE - Remove the endpoint with the specified name - Remove-PSWSEndpoint -siteName PSDSCPullServer -#> -function Remove-PSWSEndpoint -{ -[CmdletBinding()] - param ( - # Unique Name of the IIS Site - [String] $siteName - ) - - # get the site to remove - $site = Get-Item -Path "IIS:\sites\$siteName" - # and the pool it is using - $pool = $site.applicationPool - - # get the path so we can delete the files - $filePath = $site.PhysicalPath - # get the port number for the Firewall rule - $bindings = (Get-WebBinding -Name $siteName).bindingInformation - $port = [regex]::match($bindings,':(\d+):').Groups[1].Value - - # remove the actual site. - Remove-Website -Name $siteName - # there may be running requests, wait a little - # I had an issue where the files were still in use - # when I tried to delete them - Start-Sleep -Milliseconds 200 - - # remove the files for the site - If (Test-Path $filePath) - { - Get-ChildItem $filePath -Recurse | Remove-Item -Recurse - Remove-Item $filePath - } - - # find out whether any other site is using this pool - $filter = "/system.applicationHost/sites/site/application[@applicationPool='" + $pool + "']" - $apps = (Get-WebConfigurationProperty -Filter $filter -PSPath "machine/webroot/apphost" -name path).ItemXPath - if ($apps.count -eq 1) - { - # if we are the only site in the pool, remove the pool as well. - Remove-WebAppPool -Name $pool - } - - - # remove all rules with that name - $ruleName = ($($FireWallRuleDisplayName) -f $port) - Get-NetFirewallRule | Where-Object DisplayName -eq "$ruleName" | Remove-NetFirewallRule - -} - -<# -.Synopsis - Set the option into the web.config for an endpoint -.DESCRIPTION - Set the options into the web.config for an endpoint allowing customization. -.EXAMPLE -#> -function Set-AppSettingsInWebconfig -{ - param ( - - # Physical path for the IIS Endpoint on the machine (possibly under inetpub) - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [String] $path, - - # Key to add/update - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [String] $key, - - # Value - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [String] $value - - ) - - $webconfig = Join-Path $path "web.config" - [bool] $Found = $false - - if (Test-Path $webconfig) - { - $xml = [xml](get-content $webconfig) - $root = $xml.get_DocumentElement() - - foreach( $item in $root.appSettings.add) - { - if( $item.key -eq $key ) - { - $item.value = $value; - $Found = $true; - } - } - - if( -not $Found) - { - $newElement = $xml.CreateElement("add") - $nameAtt1 = $xml.CreateAttribute("key") - $nameAtt1.psbase.value = $key; - $null = $newElement.SetAttributeNode($nameAtt1) - - $nameAtt2 = $xml.CreateAttribute("value") - $nameAtt2.psbase.value = $value; - $null = $newElement.SetAttributeNode($nameAtt2) - - $null = $xml.configuration["appSettings"].AppendChild($newElement) - } - } - - $xml.Save($webconfig) -} - -<# -.Synopsis - Set the binding redirect setting in the web.config to redirect 10.0.0.0 version of microsoft.isam.esent.interop to 6.3.0.0. -.DESCRIPTION - This function creates the following section in the web.config: - - - - - - - - -#> -function Set-BindingRedirectSettingInWebConfig -{ - param ( - - # Physical path for the IIS Endpoint on the machine (possibly under inetpub) - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [String] $path, - - # old version of the assembly - [String] $oldVersion = "10.0.0.0", - - # new version to redirect to - [String] $newVersion = "6.3.0.0" - - ) - - $webconfig = Join-Path $path "web.config" - - if (Test-Path $webconfig) - { - $xml = [xml](get-content $webconfig) - - if(-not($xml.get_DocumentElement().runtime)) - { - # Create the section - $runtimeSetting = $xml.CreateElement("runtime") - - # Create the section - $assemblyBindingSetting = $xml.CreateElement("assemblyBinding") - $xmlnsAttribute = $xml.CreateAttribute("xmlns") - $xmlnsAttribute.Value = "urn:schemas-microsoft-com:asm.v1" - $assemblyBindingSetting.Attributes.Append($xmlnsAttribute) - - # The section goes inside - $null = $runtimeSetting.AppendChild($assemblyBindingSetting) - - # Create the section - $dependentAssemblySetting = $xml.CreateElement("dependentAssembly") - - #The section goes inside - $null = $assemblyBindingSetting.AppendChild($dependentAssemblySetting) - - # Create the section - $assemblyIdentitySetting = $xml.CreateElement("assemblyIdentity") - $nameAttribute = $xml.CreateAttribute("name") - $nameAttribute.Value = "microsoft.isam.esent.interop" - $publicKeyTokenAttribute = $xml.CreateAttribute("publicKeyToken") - $publicKeyTokenAttribute.Value = "31bf3856ad364e35" - $null = $assemblyIdentitySetting.Attributes.Append($nameAttribute) - $null = $assemblyIdentitySetting.Attributes.Append($publicKeyTokenAttribute) - - # section goes inside - $dependentAssemblySetting.AppendChild($assemblyIdentitySetting) - - # Create the section - $bindingRedirectSetting = $xml.CreateElement("bindingRedirect") - $oldVersionAttribute = $xml.CreateAttribute("oldVersion") - $newVersionAttribute = $xml.CreateAttribute("newVersion") - $oldVersionAttribute.Value = $oldVersion - $newVersionAttribute.Value = $newVersion - $null = $bindingRedirectSetting.Attributes.Append($oldVersionAttribute) - $null = $bindingRedirectSetting.Attributes.Append($newVersionAttribute) - - # The section goes inside section - $dependentAssemblySetting.AppendChild($bindingRedirectSetting) - - # The section goes inside section - $xml.configuration.AppendChild($runtimeSetting) - - $xml.Save($webconfig) - } - } -} - -Export-ModuleMember -function New-PSWSEndpoint, Set-AppSettingsInWebconfig, Set-BindingRedirectSettingInWebConfig, Remove-PSWSEndpoint diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xDSCWebService/SecureTLSProtocols.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xDSCWebService/SecureTLSProtocols.psm1 deleted file mode 100644 index 5029ff8a..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xDSCWebService/SecureTLSProtocols.psm1 +++ /dev/null @@ -1,48 +0,0 @@ -# This module file contains a utility to test and set TLS protocol according best practices -# -# Copyright (c) Microsoft Corporation, 2016 -# - -# ============ Best Practice Security Settings Block ========= -$insecureProtocols = @("SSL 2.0", "SSL 3.0", "TLS 1.0", "PCT 1.0", "Multi-Protocol Unified Hello") -$secureProtocols = @("TLS 1.1", "TLS 1.2") - -# =========================================================== - -function Test-SChannelProtocol -{ - foreach ($protocol in $insecureProtocols) - { - $registryPath = "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\$protocol\Server" - if ((Test-Path $registryPath) -and ($null -ne (Get-ItemProperty -Path $registryPath)) -and ((Get-ItemProperty -Path $registryPath).Enabled -ne 0)) - { - return $false - } - } - foreach ($protocol in $secureProtocols) - { - $registryPath = "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\$protocol\Server" - if ((-not (Test-Path $registryPath)) -or ($null -eq (Get-ItemProperty -Path $registryPath)) -or ((Get-ItemProperty -Path $registryPath).Enabled -eq 0)) - { - return $false - } - } - return $true -} - -function Set-SChannelProtocol -{ - foreach ($protocol in $insecureProtocols) - { - $registryPath = "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\$protocol\Server" - New-Item -Path $registryPath -Force | Out-Null - New-ItemProperty -Path $registryPath -Name Enabled -Value 0 -PropertyType 'DWord' -Force | Out-Null - } - foreach ($protocol in $secureProtocols) - { - $registryPath = "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\$protocol\Server" - New-Item -Path $registryPath -Force | Out-Null - New-ItemProperty -Path $registryPath -Name Enabled -Value '0xffffffff' -PropertyType 'DWord' -Force | Out-Null - New-ItemProperty -Path $registryPath -Name DisabledByDefault -Value 0 -PropertyType 'DWord' -Force | Out-Null - } -} diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xDSCWebService/UseSecurityBestPractices.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xDSCWebService/UseSecurityBestPractices.psm1 deleted file mode 100644 index a9dc7a7c..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xDSCWebService/UseSecurityBestPractices.psm1 +++ /dev/null @@ -1,38 +0,0 @@ -# This module file contains a utility to switch on/off the security best practices -# -# Copyright (c) Microsoft Corporation, 2016 -# - -Import-Module $PSScriptRoot\SecureTLSProtocols.psm1 -Verbose:$false - -# This list corresponds to the ValueMap definition of DisableSecurityBestPractices parameter defined in MSFT_xDSCWebService.Schema.mof -$SecureTLSProtocols = "SecureTLSProtocols"; - -<# - .SYNOPSIS - This function tests whether the node uses security best practices for non-disabled items -#> -function Test-UseSecurityBestPractices -{ - param([string[]] $DisableSecurityBestPractices) - - $usedProtocolsBestPractices = ($DisableSecurityBestPractices -icontains $SecureTLSProtocols) -or (Test-SChannelProtocol) - - return $usedProtocolsBestPractices -} - -<# - .SYNOPSIS - This function sets the node to use security best practices for non-disabled items -#> -function Set-UseSecurityBestPractices -{ - param([string[]] $DisableSecurityBestPractices) - - if (-not ($DisableSecurityBestPractices -icontains $SecureTLSProtocols)) - { - Set-SChannelProtocol - } -} - -Export-ModuleMember -function *-UseSecurityBestPractices diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xEnvironmentResource/MSFT_xEnvironmentResource.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xEnvironmentResource/MSFT_xEnvironmentResource.psm1 deleted file mode 100644 index 52f9bfa8..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xEnvironmentResource/MSFT_xEnvironmentResource.psm1 +++ /dev/null @@ -1,1145 +0,0 @@ -$errorActionPreference = 'Stop' -Set-StrictMode -Version 'Latest' - -# Import CommonResourceHelper for Get-LocalizedData -$script:dscResourcesFolderFilePath = Split-Path $PSScriptRoot -Parent -$script:commonResourceHelperFilePath = Join-Path -Path $script:dscResourcesFolderFilePath -ChildPath 'CommonResourceHelper.psm1' -Import-Module -Name $script:commonResourceHelperFilePath - -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xEnvironmentResource' - -$script:envVarRegPathMachine = 'HKLM:\System\CurrentControlSet\Control\Session Manager\Environment' -$script:envVarRegPathUser = 'HKCU:\Environment' - -$script:maxSystemEnvVariableLength = 1024 -$script:maxUserEnvVariableLength = 255 - -<# - .SYNOPSIS - Retrieves the state of the environment variable. If both Machine and Process Target are - specified, only the machine value will be returned. - - .PARAMETER Name - The name of the environment variable to retrieve. - - .PARAMETER Target - Indicates where to retrieve the variable: The machine or the process. If both are indicated - then only the value from the machine is returned. - The default is both since that is the default for the rest of the resource. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [ValidateSet('Process', 'Machine')] - [ValidateNotNullOrEmpty()] - [String[]] - $Target = ('Process', 'Machine') - ) - - $valueToReturn = $null - - if ($Target -contains 'Machine') - { - $environmentVaraible = Get-EnvironmentVariableWithoutExpanding -Name $Name -ErrorAction 'SilentlyContinue' - - if ($null -ne $environmentVaraible) - { - $valueToReturn = $environmentVaraible.$Name - } - } - else - { - $valueToReturn = Get-ProcessEnvironmentVariable -Name $Name - } - - $environmentResource = @{ - Name = $Name - Value = $null - Ensure = 'Absent' - } - - if ($null -eq $valueToReturn) - { - Write-Verbose -Message ($script:localizedData.EnvVarNotFound -f $Name) - } - else - { - Write-Verbose -Message ($script:localizedData.EnvVarFound -f $Name, $valueToReturn) - $environmentResource.Ensure = 'Present' - $environmentResource.Value = $valueToReturn - } - - return $environmentResource -} - -<# - .SYNOPSIS - Creates, modifies, or removes an environment variable. - - .PARAMETER Name - The name of the environment variable to create, modify, or remove. - - .PARAMETER Value - The value to set the environment variable to. - If a value is not provided, the variable cannot be created. - If Ensure is set to Present, the variable does not already exist, and a value is not - specified, an error will be thrown indicating that the variable cannot be created without - a specified value. If Ensure is set to Present, the variable already exists, and no value - is specified, nothing will be changed. - - .PARAMETER Ensure - Specifies whether the variable should exist or not. - To ensure that the variable or value does exist, set this property to Present. - To ensure that the variable or value does not exist, set this property to Absent. - The default value is Present. - - .PARAMETER Path - Indicates whether or not this is a path variable. If this property is set to True, - the value provided through the Value property will be appended to (or removed from if - Ensure is set to Absent) the existing value. - If this property is set to False, the existing value will be replaced by the new Value. - The default value is False. - - .PARAMETER Target - Indicates where to set the environment variable: The machine, the process, or both. - The default is both: ('Process', 'Machine') -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [ValidateNotNull()] - [String] - $Value = [String]::Empty, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [Boolean] - $Path = $false, - - [ValidateSet('Process', 'Machine')] - [ValidateNotNullOrEmpty()] - [String[]] - $Target = ('Process', 'Machine') - ) - - $valueSpecified = ($Value -ne [String]::Empty) - $currentValueFromMachine = $null - $currentValueFromProcess = $null - $currentPropertiesFromMachine = $null - - $setMachineVariable = ($Target -contains 'Machine') - $setProcessVariable = ($Target -contains 'Process') - - if ($setMachineVariable) - { - if ($Path) - { - $currentPropertiesFromMachine = Get-EnvironmentVariableWithoutExpanding -Name $Name -ErrorAction 'SilentlyContinue' - - if ($null -ne $currentPropertiesFromMachine) - { - $currentValueFromMachine = $currentPropertiesFromMachine.$Name - } - } - else - { - $currentPropertiesFromMachine = Get-ItemProperty -Path $script:envVarRegPathMachine -Name $Name -ErrorAction 'SilentlyContinue' - $currentValueFromMachine = Get-EnvironmentVariable -Name $Name -Target 'Machine' - } - } - - if ($setProcessVariable) - { - $currentValueFromProcess = Get-EnvironmentVariable -Name $Name -Target 'Process' - } - - # A different value of the environment variable needs to be displayed depending on the Target - $currentValueToDisplay = '' - if ($setMachineVariable -and $setProcessVariable) - { - $currentValueToDisplay = "Machine: $currentValueFromMachine, Process: $currentValueFromProcess" - } - elseif ($setMachineVariable) - { - $currentValueToDisplay = $currentValueFromMachine - } - else - { - $currentValueToDisplay = $currentValueFromProcess - } - - if ($Ensure -eq 'Present') - { - $createMachineVariable = ((-not $setMachineVariable) -or ($null -eq $currentPropertiesFromMachine) -or ($currentValueFromMachine -eq [String]::Empty)) - $createProcessVariable = ((-not $setProcessVariable) -or ($null -eq $currentValueFromProcess) -or ($currentValueFromProcess -eq [String]::Empty)) - - if ($createMachineVariable -and $createProcessVariable) - { - - if (-not $valueSpecified) - { - <# - If the environment variable doesn't exist and no value is passed in - then there is nothing to set - so throw an error. - #> - - New-InvalidOperationException -Message ($script:localizedData.CannotSetValueToEmpty -f $Name) - } - - <# - Given the specified $Name environment variable hasn't been created or set - simply create one with the specified value and return. - Both path and non-path cases are covered by this. - #> - - Set-EnvironmentVariable -Name $Name -Value $Value -Target $Target - - Write-Verbose -Message ($script:localizedData.EnvVarCreated -f $Name, $Value) - return - } - - if (-not $valueSpecified) - { - <# - Given no $Value was specified to be set and the variable exists, - we'll leave the existing variable as is. - This covers both path and non-path variables. - #> - - Write-Verbose -Message ($script:localizedData.EnvVarUnchanged -f $Name, $currentValueToDisplay) - return - } - - # Check if an empty, whitespace or semi-colon only string has been specified. If yes, return unchanged. - $trimmedValue = $Value.Trim(';').Trim() - - if ([String]::IsNullOrEmpty($trimmedValue)) - { - Write-Verbose -Message ($script:localizedData.EnvVarPathUnchanged -f $Name, $currentValueToDisplay) - return - } - - if (-not $Path) - { - # For non-path variables, simply set the specified $Value as the new value of the specified - # variable $Name for the given $Target - - if (($setMachineVariable -and ($Value -cne $currentValueFromMachine)) -or ` - ($setProcessVariable -and ($Value -cne $currentValueFromProcess))) - { - Set-EnvironmentVariable -Name $Name -Value $Value -Target $Target - Write-Verbose -Message ($script:localizedData.EnvVarUpdated -f $Name, $currentValueToDisplay, $Value) - } - else - { - Write-Verbose -Message ($script:localizedData.EnvVarUnchanged -f $Name, $currentValueToDisplay) - } - - return - } - - # If the control reaches here, the specified variable exists, it is a path variable, and a value has been specified to be set. - - if ($setMachineVariable) - { - $valueUnchanged = Test-PathsInValue -ExistingPaths $currentValueFromMachine -QueryPaths $trimmedValue -FindCriteria 'All' - - if ($currentValueFromMachine -and -not $valueUnchanged) - { - $updatedValue = Add-PathsToValue -CurrentValue $currentValueFromMachine -NewValue $trimmedValue - Set-EnvironmentVariable -Name $Name -Value $updatedValue -Target @('Machine') - Write-Verbose -Message ($script:localizedData.EnvVarPathUpdated -f $Name, $currentValueFromMachine, $updatedValue) - } - else - { - Write-Verbose -Message ($script:localizedData.EnvVarPathUnchanged -f $Name, $currentValueFromMachine) - } - } - - if ($setProcessVariable) - { - $valueUnchanged = Test-PathsInValue -ExistingPaths $currentValueFromProcess -QueryPaths $trimmedValue -FindCriteria 'All' - - if ($currentValueFromProcess -and -not $valueUnchanged) - { - $updatedValue = Add-PathsToValue -CurrentValue $currentValueFromProcess -NewValue $trimmedValue - Set-EnvironmentVariable -Name $Name -Value $updatedValue -Target @('Process') - Write-Verbose -Message ($script:localizedData.EnvVarPathUpdated -f $Name, $currentValueFromProcess, $updatedValue) - } - else - { - Write-Verbose -Message ($script:localizedData.EnvVarPathUnchanged -f $Name, $currentValueFromProcess) - } - } - } - - # Ensure = 'Absent' - else - { - $machineVariableRemoved = ((-not $setMachineVariable) -or ($null -eq $currentPropertiesFromMachine)) - $processVariableRemoved = ((-not $setProcessVariable) -or ($null -eq $currentValueFromProcess)) - - if ($machineVariableRemoved -and $processVariableRemoved) - { - # Variable not found, condition is satisfied and there is nothing to set/remove, return - Write-Verbose -Message ($script:localizedData.EnvVarNotFound -f $Name) - return - } - - if ((-not $ValueSpecified) -or (-not $Path)) - { - <# - If $Value is not specified or if $Value is a non-path variable, - simply remove the environment variable. - #> - - Remove-EnvironmentVariable -Name $Name -Target $Target - - Write-Verbose -Message ($script:localizedData.EnvVarRemoved -f $Name) - return - } - - # Check if an empty string or semi-colon only string has been specified as $Value. If yes, return unchanged as we don't need to remove anything. - $trimmedValue = $Value.Trim(';').Trim() - - if ([String]::IsNullOrEmpty($trimmedValue)) - { - Write-Verbose -Message ($script:localizedData.EnvVarPathUnchanged -f $Name, $currentValueToDisplay) - return - } - - # If the control reaches here: target variable is an existing environment path-variable and a specified $Value needs be removed from it - - if ($setMachineVariable) - { - $finalPath = $null - - if ($currentValueFromMachine) - { - <# - If this value returns $null or an empty string, than the entire path should be removed. - If it returns the same value as the path that was passed in, than nothing needs to be - updated, otherwise, only the specified paths were removed but there are still others - that need to be left in, so the path variable is updated to remove only the specified paths. - #> - $finalPath = Remove-PathsFromValue -CurrentValue $currentValueFromMachine -PathsToRemove $trimmedValue - } - - if ([String]::IsNullOrEmpty($finalPath)) - { - Remove-EnvironmentVariable -Name $Name -Target @('Machine') - Write-Verbose -Message ($script:localizedData.EnvVarRemoved -f $Name) - } - elseif ($finalPath -ceq $currentValueFromMachine) - { - Write-Verbose -Message ($script:localizedData.EnvVarPathUnchanged -f $Name, $currentValueFromMachine) - } - else - { - Set-EnvironmentVariable -Name $Name -Value $finalPath -Target @('Machine') - Write-Verbose -Message ($script:localizedData.EnvVarPathUpdated -f $Name, $currentValueFromMachine, $finalPath) - } - } - - if ($setProcessVariable) - { - $finalPath = $null - - if ($currentValueFromProcess) - { - <# - If this value returns $null or an empty string, than the entire path should be removed. - If it returns the same value as the path that was passed in, than nothing needs to be - updated, otherwise, only the specified paths were removed but there are still others - that need to be left in, so the path variable is updated to remove only the specified paths. - #> - $finalPath = Remove-PathsFromValue -CurrentValue $currentValueFromProcess -PathsToRemove $trimmedValue - } - - if ([String]::IsNullOrEmpty($finalPath)) - { - Remove-EnvironmentVariable -Name $Name -Target @('Process') - Write-Verbose -Message ($script:localizedData.EnvVarRemoved -f $Name) - } - elseif ($finalPath -ceq $currentValueFromProcess) - { - Write-Verbose -Message ($script:localizedData.EnvVarPathUnchanged -f $Name, $currentValueFromProcess) - } - else - { - Set-EnvironmentVariable -Name $Name -Value $finalPath -Target @('Process') - Write-Verbose -Message ($script:localizedData.EnvVarPathUpdated -f $Name, $currentValueFromProcess, $finalPath) - } - } - } -} - -<# - .SYNOPSIS - Tests if the environment variable is in the desired state. - - .PARAMETER Name - The name of the environment variable to test. - - .PARAMETER Value - The value of the environment variable to test. If no value is specified then only the - existence of the variable will be checked. - - .PARAMETER Ensure - Specifies whether the variable should exist or not. - To test that the variable does exist, set this property to Present. - To test that the variable does not exist, set this property to Absent. - The default value is Present. - - .PARAMETER Path - Indicates whether or not this is a path variable. If this property is set to True, - the value(s) provided through the Value property will be checked against all existing - values already set in this variable. - If this property is set to False, the value will be compared directly to the existing value. - The default value is False. - - .PARAMETER Target - Indicates where to test the environment variable: The machine, the process, or both. - The default is both: ('Process', 'Machine') -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [ValidateNotNull()] - [String] - $Value, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [Boolean] - $Path = $false, - - [ValidateSet('Process', 'Machine')] - [ValidateNotNullOrEmpty()] - [String[]] - $Target = ('Process', 'Machine') - ) - - $valueSpecified = $PSBoundParameters.ContainsKey('Value') -and ($Value -ne [String]::Empty) - $currentValueFromMachine = $null - $currentValueFromProcess = $null - $currentPropertiesFromMachine = $null - - $checkMachineTarget = ($Target -contains 'Machine') - $checkProcessTarget = ($Target -contains 'Process') - - if ($checkMachineTarget) - { - if ($Path) - { - $currentPropertiesFromMachine = Get-EnvironmentVariableWithoutExpanding -Name $Name -ErrorAction 'SilentlyContinue' - - if ($null -ne $currentPropertiesFromMachine) - { - $currentValueFromMachine = $currentPropertiesFromMachine.$Name - } - } - else - { - $currentPropertiesFromMachine = Get-ItemProperty -Path $script:envVarRegPathMachine -Name $Name -ErrorAction 'SilentlyContinue' - $currentValueFromMachine = Get-EnvironmentVariable -Name $Name -Target 'Machine' - } - } - - if ($checkProcessTarget) - { - $currentValueFromProcess = Get-EnvironmentVariable -Name $Name -Target 'Process' - } - - # A different value of the environment variable needs to be displayed depending on the Target - $currentValueToDisplay = '' - if ($checkMachineTarget -and $checkProcessTarget) - { - $currentValueToDisplay = "Machine: $currentValueFromMachine, Process: $currentValueFromProcess" - } - elseif ($checkMachineTarget) - { - $currentValueToDisplay = $currentValueFromMachine - } - else - { - $currentValueToDisplay = $currentValueFromProcess - } - - if (($checkMachineTarget -and ($null -eq $currentPropertiesFromMachine)) -or ($checkProcessTarget -and ($null -eq $currentValueFromProcess))) - { - # Variable not found - Write-Verbose ($script:localizedData.EnvVarNotFound -f $Name) - return ($Ensure -eq 'Absent') - } - - if (-not $valueSpecified) - { - Write-Verbose ($script:localizedData.EnvVarFound -f $Name, $currentValueToDisplay) - return ($Ensure -eq 'Present') - } - - if (-not $Path) - { - # For this non-path variable, make sure that the specified $Value matches the current value. - - if (($checkMachineTarget -and ($Value -cne $currentValueFromMachine)) -or ` - ($checkProcessTarget -and ($Value -cne $currentValueFromProcess))) - { - Write-Verbose ($script:localizedData.EnvVarFoundWithMisMatchingValue -f $Name, $currentValueToDisplay, $Value) - return ($Ensure -eq 'Absent') - } - else - { - Write-Verbose ($script:localizedData.EnvVarFound -f $Name, $currentValueToDisplay) - return ($Ensure -eq 'Present') - } - } - - # If the control reaches here, the expected environment variable exists, it is a path variable and a $Value is specified to test against - if ($Ensure -eq 'Present') - { - if ($checkMachineTarget) - { - if (-not (Test-PathsInValue -ExistingPaths $currentValueFromMachine -QueryPaths $Value -FindCriteria 'All')) - { - # If the control reached here some part of the specified path ($Value) was not found in the existing variable, return failure - Write-Verbose ($script:localizedData.EnvVarFoundWithMisMatchingValue -f $Name, $currentValueToDisplay, $Value) - return $false - } - } - - if ($checkProcessTarget) - { - if (-not (Test-PathsInValue -ExistingPaths $currentValueFromProcess -QueryPaths $Value -FindCriteria 'All')) - { - # If the control reached here some part of the specified path ($Value) was not found in the existing variable, return failure - Write-Verbose ($script:localizedData.EnvVarFoundWithMisMatchingValue -f $Name, $currentValueToDisplay, $Value) - return $false - } - } - - # The specified path was completely present in the existing environment variable, return success - Write-Verbose ($script:localizedData.EnvVarFound -f $Name, $currentValueToDisplay) - return $true - } - # Ensure = 'Absent' - else - { - if ($checkMachineTarget) - { - if (Test-PathsInValue -ExistingPaths $currentValueFromMachine -QueryPaths $Value -FindCriteria 'Any') - { - # One of the specified paths in $Value exists in the environment variable path, thus the test fails - Write-Verbose ($script:localizedData.EnvVarFound -f $Name, $currentValueFromMachine) - return $false - } - } - - if ($checkProcessTarget) - { - if (Test-PathsInValue -ExistingPaths $currentValueFromProcess -QueryPaths $Value -FindCriteria 'Any') - { - # One of the specified paths in $Value exists in the environment variable path, thus the test fails - Write-Verbose ($script:localizedData.EnvVarFound -f $Name, $currentValueFromProcess) - return $false - } - } - - # If the control reached here, none of the specified paths were found in the existing path-variable, return success - Write-Verbose ($script:localizedData.EnvVarFoundWithMisMatchingValue -f $Name, $currentValueToDisplay, $Value) - return $true - } -} - -<# - .SYNOPSIS - Retrieves the value of the environment variable from the given Target. - - .PARAMETER Name - The name of the environment variable to retrieve the value from. - - .PARAMETER Target - Indicates where to retrieve the environment variable from. Currently, only - Process and Machine are being used, but User is included for future extension - of this resource. -#> -function Get-EnvironmentVariable -{ - [CmdletBinding()] - [OutputType([String])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateSet('Process', 'Machine')] - [String] - $Target - ) - - $valueToReturn = $null - - if ($Target -eq 'Process') - { - $valueToReturn = Get-ProcessEnvironmentVariable -Name $Name - } - elseif ($Target -eq 'Machine') - { - $retrievedProperty = Get-ItemProperty -Path $script:envVarRegPathMachine -Name $Name -ErrorAction 'SilentlyContinue' - - if ($null -ne $retrievedProperty) - { - $valueToReturn = $retrievedProperty.$Name - } - } - elseif ($Target -eq 'User') - { - $retrievedProperty = Get-ItemProperty -Path $script:envVarRegPathUser -Name $Name -ErrorAction 'SilentlyContinue' - - if ($null -ne $retrievedProperty) - { - $valueToReturn = $retrievedProperty.$Name - } - } - - return $valueToReturn -} - -<# - .SYNOPSIS - Wrapper function to retrieve an environment variable from the current process. - - .PARAMETER Name - The name of the variable to retrieve - -#> -function Get-ProcessEnvironmentVariable -{ - [CmdletBinding()] - [OutputType([String])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name - ) - - return [System.Environment]::GetEnvironmentVariable($Name) -} - -<# - .SYNOPSIS - If there are any paths in NewPaths that aren't in CurrentValue they will be added - to the current paths value and a String will be returned containing all old paths - and new paths. Otherwise the original value will be returned unchanged. - - .PARAMETER CurrentValue - A semicolon-separated String containing the current path values. - - .PARAMETER NewPaths - A semicolon-separated String containing any paths that should be added to - the current value. If CurrentValue already contains a path, it will not be added. -#> -function Add-PathsToValue -{ - [CmdletBinding()] - [OutputType([String])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $CurrentValue, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $NewValue - ) - - $finalValue = $CurrentValue + ';' - $currentPaths = $CurrentValue -split ';' - $newPaths = $NewValue -split ';' - - foreach ($path in $newPaths) - { - if ($currentPaths -notcontains $path) - { - <# - If the control reached here, we didn't find this $specifiedPath in the $currentPaths, - so add it. - #> - - $finalValue += ($path + ';') - } - } - - # Remove any extraneous ';' at the end (and potentially start - as a side-effect) of the value to be set - return $finalValue.Trim(';') -} - -<# - .SYNOPSIS - If there are any paths in PathsToRemove that aren't in CurrentValue they will be removed - from the current paths value and either the new value will be returned if there are still - paths that remain, or an empty string will be returned if all paths were removed. - If none of the paths in PathsToRemove are in CurrentValue then this function will - return CurrentValue since nothing needs to be changed. - - .PARAMETER CurrentValue - A semicolon-separated String containing the current path values. - - .PARAMETER PathsToRemove - A semicolon-separated String containing any paths that should be removed from - the current value. -#> -function Remove-PathsFromValue -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $CurrentValue, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $PathsToRemove - ) - - $finalPath = '' - $specifiedPaths = $PathsToRemove -split ';' - $currentPaths = $CurrentValue -split ';' - $varAltered = $false - - foreach ($subpath in $currentPaths) - { - if ($specifiedPaths -contains $subpath) - { - <# - Found this $subpath as one of the $specifiedPaths, skip adding this to the final - value/path of this variable and mark the variable as altered. - #> - $varAltered = $true - } - else - { - # the current $subpath was not part of the $specifiedPaths (to be removed) so keep this $subpath in the finalPath - $finalPath += $subpath + ';' - } - } - - # Remove any extraneous ';' at the end (and potentially start - as a side-effect) of the $finalPath - $finalPath = $finalPath.Trim(';') - - if ($varAltered) - { - return $finalPath - } - else - { - return $CurrentValue - } -} - -<# - .SYNOPSIS - Sets the value of the environment variable with the given name if a value is specified. - If no value is specified, then the environment variable will be removed. - - .PARAMETER Name - The name of the environment variable to set or remove. - - .PARAMETER Value - The value to set the environment variable to. If not provided, then the variable will - be removed. - - .PARAMETER Target - Indicates where to set or remove the environment variable: The machine, the process, or both. - The logic for User is also included here for future expansion of this resource. -#> -function Set-EnvironmentVariable -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [String] - $Value, - - [Parameter(Mandatory = $true)] - [ValidateSet('Process', 'Machine')] - [String[]] - $Target - ) - - $valueSpecified = $PSBoundParameters.ContainsKey('Value') - - try - { - # If the Value is set to [String]::Empty then nothing should be updated for the process - if (($Target -contains 'Process') -and (-not $valueSpecified -or ($Value -ne [String]::Empty))) - { - if (-not $valueSpecified) - { - Set-ProcessEnvironmentVariable -Name $Name -Value $null - } - else - { - Set-ProcessEnvironmentVariable -Name $Name -Value $Value - } - } - - if ($Target -contains 'Machine') - { - if ($Name.Length -ge $script:maxSystemEnvVariableLength) - { - New-InvalidArgumentException -Message $script:localizedData.ArgumentTooLong -ArgumentName $Name - } - - $path = $script:envVarRegPathMachine - - if (-not $valueSpecified) - { - $environmentKey = Get-ItemProperty -Path $path -Name $Name -ErrorAction 'SilentlyContinue' - - if ($environmentKey) - { - Remove-ItemProperty -Path $path -Name $Name - } - else - { - $message = ($script:localizedData.RemoveNonExistentVarError -f $Name) - New-InvalidArgumentException -Message $message -ArgumentName $Name - } - } - else - { - Set-ItemProperty -Path $path -Name $Name -Value $Value - $environmentKey = Get-ItemProperty -Path $path -Name $Name -ErrorAction 'SilentlyContinue' - - if ($null -eq $environmentKey) - { - $message = ($script:localizedData.GetItemPropertyFailure -f $Name, $path) - New-InvalidArgumentException -Message $message -ArgumentName $Name - } - } - } - - # The User feature of this resource is not yet implemented. - if ($Target -contains 'User') - { - if ($Name.Length -ge $script:maxUserEnvVariableLength) - { - New-InvalidArgumentException -Message $script:localizedData.ArgumentTooLong -ArgumentName $Name - } - - $path = $script:envVarRegPathUser - - if (-not $valueSpecified) - { - $environmentKey = Get-ItemProperty -Path $path -Name $Name -ErrorAction 'SilentlyContinue' - - if ($environmentKey) - { - Remove-ItemProperty -Path $path -Name $Name - } - else - { - $message = ($script:localizedData.RemoveNonExistentVarError -f $Name) - New-InvalidArgumentException -Message $message -ArgumentName $Name - } - } - else - { - Set-ItemProperty -Path $path -Name $Name -Value $Value - $environmentKey = Get-ItemProperty -Path $path -Name $Name -ErrorAction 'SilentlyContinue' - - if ($null -eq $environmentKey) - { - $message = ($script:localizedData.GetItemPropertyFailure -f $Name, $path) - New-InvalidArgumentException -Message $message -ArgumentName $Name - } - } - } - } - catch - { - New-InvalidOperationException -Message ($script:localizedData.EnvVarSetError -f $Name, $Value) ` - -ErrorRecord $_ - } - -} - -<# - .SYNOPSIS - Wrapper function to set an environment variable for the current process. - - .PARAMETER Name - The name of the environment variable to set. - - .PARAMETER Value - The value to set the environment variable to. - -#> -function Set-ProcessEnvironmentVariable -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [String] - $Value = [String]::Empty - ) - - [System.Environment]::SetEnvironmentVariable($Name, $Value) -} - -<# - .SYNOPSIS - Removes an environment variable from the given target(s) by calling Set-EnvironmentVariable - with no Value specified. - - .PARAMETER Name - The name of the environment variable to remove. - - .PARAMETER Target - Indicates where to remove the environment variable from: The machine, the process, or both. -#> -function Remove-EnvironmentVariable -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateSet('Process', 'Machine')] - [String[]] - $Target - ) - - try - { - Set-EnvironmentVariable -Name $Name -Target $Target - } - catch - { - New-InvalidOperationException -Message ($script:localizedData.EnvVarRemoveError -f $Name) ` - -ErrorRecord $_ - } -} - -<# - .SYNOPSIS - Tests all of the paths in QueryPaths against those in ExistingPaths. - If FindCriteria is set to 'All' then it will only return True if all of the - paths in QueryPaths are in ExistingPaths, otherwise it will return False. - If FindCriteria is set to 'Any' then it will return True if any of the paths - in QueryPaths are in ExistingPaths, otherwise it will return False. - - .PARAMETER ExistingPaths - A semicolon-separated String containing the path values to test against. - - .PARAMETER QueryPaths - A semicolon-separated String containing the path values to ensure are either - included or not included in ExistingPaths. - - .PARAMETER FindCriteria - Set to either 'All' or 'Any' to indicate whether all of the paths in QueryPaths - should be included in ExistingPaths or any of them. -#> -function Test-PathsInValue -{ - [OutputType([Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] - $ExistingPaths, - - [Parameter(Mandatory = $true)] - [String] - $QueryPaths, - - [Parameter(Mandatory = $true)] - [ValidateSet('Any', 'All')] - [String] - $FindCriteria - ) - - $existingPathList = $ExistingPaths -split ';' - $queryPathList = $QueryPaths -split ';' - - switch ($FindCriteria) - { - 'Any' - { - foreach ($queryPath in $queryPathList) - { - if ($existingPathList -contains $queryPath) - { - # Found this $queryPath in the existing paths, return $true - return $true - } - } - - # If the control reached here, none of the QueryPaths were found in ExistingPaths - return $false - } - - 'All' - { - foreach ($queryPath in $queryPathList) - { - if ($queryPath) - { - if ($existingPathList -notcontains $queryPath) - { - # The current $queryPath wasn't found in any of the $existingPathList, return false - return $false - } - } - } - - # If the control reached here, all of the QueryPaths were found in ExistingPaths - return $true - } - } -} - -<# - .SYNOPSIS - Retrieves the Environment variable with the given name from the registry on the machine. - It returns the result as an object containing a Hashtable with the environment variable - name and its current value on the machine. This is to most closely represent what the - actual API call returns. If an environment variable with the given name is not found, then - $null will be returned. - - .PARAMETER Name - The name of the environment variable to retrieve the value of. -#> -function Get-EnvironmentVariableWithoutExpanding -{ - [OutputType([System.Management.Automation.PSObject])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [String] - $Name - ) - - $path = $script:envVarRegPathMachine - $pathTokens = $path.Split('\',[System.StringSplitOptions]::RemoveEmptyEntries) - $entry = $pathTokens[1..($pathTokens.Count - 1)] -join '\' - - # Since the target registry path coming to this function is hardcoded for local machine - $hive = [Microsoft.Win32.Registry]::LocalMachine - - $noteProperties = @{} - - try - { - $key = $hive.OpenSubKey($entry) - - $valueNames = $key.GetValueNames() - if ($valueNames -inotcontains $Name) - { - return $null - } - - [String] $value = Get-KeyValue -Name $Name -Key $key - $noteProperties.Add($Name, $value) - } - finally - { - if ($key) - { - $key.Close() - } - } - - [System.Management.Automation.PSObject] $propertyResults = New-Object -TypeName System.Management.Automation.PSObject -Property $noteProperties - - return $propertyResults -} - -<# - .SYNOPSIS - Wrapper function to get the value of the environment variable with the given name - from the specified registry key. - - .PARAMETER Name - The name of the environment variable to retrieve the value of. - - .PARAMETER Key - The key to retrieve the environment variable from. -#> -function Get-KeyValue -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [Microsoft.Win32.RegistryKey] - $Key - ) - - return $Key.GetValue($Name, $null, [Microsoft.Win32.RegistryValueOptions]::DoNotExpandEnvironmentNames) -} diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xEnvironmentResource/MSFT_xEnvironmentResource.schema.mof b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xEnvironmentResource/MSFT_xEnvironmentResource.schema.mof deleted file mode 100644 index bcb2fb70..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xEnvironmentResource/MSFT_xEnvironmentResource.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("xEnvironment")] -class MSFT_xEnvironmentResource : OMI_BaseResource -{ - [Key, Description("The name of the environment variable for which you want to ensure a specific state.")] String Name; - [Write, Description("The desired value for the environment variable.")] String Value; - [Write, Description("Specifies if the environment varaible should exist."), ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}] String Ensure; - [Write, Description("Indicates whether or not the environment variable is the Path variable.")] Boolean Path; - [Write, Description("Indicates the target where the environment variable should be set."), ValueMap{"Process", "Machine"}, Values{"Process", "Machine"}] String Target[]; -}; diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xEnvironmentResource/en-US/MSFT_xEnvironmentResource.schema.mfl b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xEnvironmentResource/en-US/MSFT_xEnvironmentResource.schema.mfl deleted file mode 100644 index d3524d3cde9ee1448a670422970838095d667845..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1522 zcmbVMT}#4X7(LfP|KX*pf{HG>sjjjNB+W?aMntBr6m*K4Rz!cjI_G(3PAQ!cZSHxW zuk*2eeKv575HUKKppP*UUPp+qk3H1U=v-D&x#>q3F~yCSb%4%)|2x3jDGut0tkC8G+88h^#xXZP zVCQrGU)tozcIo1f&lO_1BW8cEGv-i66<0hf^GvuasG)^ZoZ!rQHJP)E9d0(@oS1*k za&E{_>rZwbY?~}M+NjFP5~~W0xxgeM83f2$&PYs`^~5q;pO zkH>M5;bAj+?>Bigq~4Bx4XD@D_?Y9`mXU3?e*Br2Z|~X?TXL>5=JM(mFxz`xJoikc zfgum+NxfysR;(8@dgen=VnvseI;qA&Am@aftgD>l{S@);o#VeK`5h@73r6m3l3cm^ z-mh1x!1*KlKFGrk^FIH_Id_u$J+ZHs@Okud;9}?eSeI37TbJ0_T#s(~?Wt!rYM=>^ I@gu!|1Aqz%BLDyZ diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xEnvironmentResource/en-US/MSFT_xEnvironmentResource.strings.psd1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xEnvironmentResource/en-US/MSFT_xEnvironmentResource.strings.psd1 deleted file mode 100644 index d1d097fc..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xEnvironmentResource/en-US/MSFT_xEnvironmentResource.strings.psd1 +++ /dev/null @@ -1,21 +0,0 @@ -# Localized resources for MSFT_xEnvironmentResource - -ConvertFrom-StringData @' - ArgumentTooLong = Argument is too long. - CannotSetValueToEmpty = Cannot create environment variable with an empty value. Set Ensure = Absent to remove environment variable '{0}'. - EnvVarCreated = Environment variable '{0}' created with value '{1}'. - EnvVarSetError = Failed to set environment variable '{0}' to value '{1}'. - EnvVarPathSetError = Failed to add path '{0}' to environment variable '{1}' holding value '{2}'. - EnvVarRemoveError = Failed to remove environment variable '{0}' holding value '{1}'. - EnvVarPathRemoveError = Failed to remove path '{0}' from variable '{1}' holding value '{2}'. - EnvVarUnchanged = Environment variable '{0}' with value '{1}' was not updated. - EnvVarUpdated = Environment variable '{0}' updated from value '{1}' to value '{2}'. - EnvVarPathUnchanged = Path environment variable '{0}' with value '{1}' was not updated. - EnvVarPathUpdated = Environment variable '{0}' updated from value '{1}' to value '{2}'. - EnvVarNotFound = Environment variable '{0}' does not exist. - EnvVarFound = Environment variable '{0}' with value '{1}' was successfully found. - EnvVarFoundWithMisMatchingValue = Environment variable '{0}' with value '{1}' mismatched the specified value '{2}'. - EnvVarRemoved = Environment variable '{0}' removed. - GetItemPropertyFailure = Failed to get the item property for variable '{0}' with path '{1}'. - RemoveNonExistentVarError = Environment variable '{0}' cannot be removed because it does not exist. -'@ diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xGroupResource/MSFT_xGroupResource.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xGroupResource/MSFT_xGroupResource.psm1 deleted file mode 100644 index 9f7f3835..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xGroupResource/MSFT_xGroupResource.psm1 +++ /dev/null @@ -1,2572 +0,0 @@ -<# - Implementatation Notes - - Managing Disposable Objects - The types PrincipalContext, Principal, and DirectoryEntry are used througout the code and - all are disposable. However, in many cases, disposing the object immediately causes - subsequent operations to fail or duplicate disposes calls to occur. - - To simplify management of these disposables, each public entry point defines a $disposables - ArrayList variable and passes it to secondary functions that may need to create disposable - objects. The public entry point is then required to dispose the contents of the list in a - finally block. - - Managing PrincipalContext Instances - To use the AccountManagement APIs to connect to the local machine or a domain, a - PrincipalContext is needed. - - For the local groups and users, a PrincipalContext reflecting the current user can be - created. - - For the default domain, the domain where the machine is joined, explicit credentials are - needed since the default user context is SYSTEM which has no rights to the domain. - - Additional PrincipalContext instances may be needed when the machine is in a domain that is - part of a multi-domain forest. For example, Microsoft uses a multi-domain forest that - includes domains such as ntdev, redmond, wingroup and a group may have members that - span multiple domains. Unless the enterprise implements the Global Catalog, - something that Microsoft does not do, a unique PrincipalContext is needed to resolve - accounts in each of the domains. - - To manage the use of PrincipalContext across domains, public entry points define a - $principalContextCache hashtable and pass it to support functions that need to resolve a group - or group member. Consumers of a PrincipalContext call Get-PrincipalContext with a scope - (domain name or machine name). Get-PrincipalContext returns an existing hashtable entry or - creates a new entry. Note that a PrincipalContext to a target domain requires connecting - to the domain. The hashtable avoids subsequent connection calls. Also note that - Get-PrincipalContext takes a Credential parameter for the case where a new PrincipalContext - is needed. The implicit assumption is that the credential provided for the primary domain - also has rights to resolve accounts in any of the other domains. - - Resolving Group Members - The original implementation assumed that group members could be resolved using the machine - PrincipalContext or the logged on user. In practice this is not reliable since the resource - is typically run under the SYSTEM account and this account is not guaranteed to have rights - to resolve domain accounts. Additionally, the APIs for enumerating group members do not - provide a facility for passing additional credentials resulting in domain members failing - to resolve. - - To address this, group members are enumerated by first converting the GroupPrincipal to a - DirectoryEntry and enumerating its child members. The returned DirectoryEntry instances are - then resolved to Principal objects using a PrincipalContext appropriate for the target - domain. - - Handling Stale Group Members - A group may have stale members if the machine was moved from one domain to a another - foreign domain or when accounts are deleted (domain or local). At this point, members that - were defined in the original domain or were deleted are now stale and cannot be resolved - using Principal::FindByIdentity. The original implementation failed at this point - preventing any operations against the group. The current implementation calls Write-Warning - with the associated SID of the member that cannot be resolved then continues the operation. -#> - -$errorActionPreference = 'Stop' -Set-StrictMode -Version 'Latest' - -# Import CommonResourceHelper for Test-IsNanoServer -$script:dscResourcesFolderFilePath = Split-Path $PSScriptRoot -Parent -$script:commonResourceHelperFilePath = Join-Path -Path $script:dscResourcesFolderFilePath -ChildPath 'CommonResourceHelper.psm1' -Import-Module -Name $script:commonResourceHelperFilePath - -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xGroupResource' - -if (-not (Test-IsNanoServer)) -{ - Add-Type -AssemblyName 'System.DirectoryServices.AccountManagement' -} - -<# - .SYNOPSIS - Retrieves the current state of the group with the specified name. - - .PARAMETER GroupName - The name of the group to retrieve the current state of. - - .PARAMETER Credential - A credential to resolve non-local group members. -#> -function Get-TargetResource -{ - [OutputType([Hashtable])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $GroupName, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - Assert-GroupNameValid -GroupName $GroupName - - if (Test-IsNanoServer) - { - Write-Verbose -Message ($script:localizedData.InvokingFunctionForGroup -f 'Get-TargetResourceOnNanoServer', $GroupName) - return Get-TargetResourceOnNanoServer @PSBoundParameters - } - else - { - Write-Verbose -Message ($script:localizedData.InvokingFunctionForGroup -f 'Get-TargetResourceOnFullSKU', $GroupName) - return Get-TargetResourceOnFullSKU @PSBoundParameters - } -} - -<# - .SYNOPSIS - Creates, modifies, or removes a group. - - .PARAMETER GroupName - The name of the group to create, modify, or remove. - - .PARAMETER Ensure - Specifies whether the group should exist or not. - - To ensure that the group does exist, set this property to present. - To ensure that the group does not exist, set this property to Absent. - - The default value is Present. - - .PARAMETER Description - The description the group should have. - - .PARAMETER Members - The members the group should have. - - This property will replace all the current group members with the specified members. - - Members should be specified as strings in the format of their domain qualified name - (domain\username), their UPN (username@domainname), their distinguished name (CN=username,DC=...), - or their username (for local machine accounts). - - Using either the MembersToExclude or MembersToInclude properties in the same configuration - as this property will generate an error. - - .PARAMETER MembersToInclude - The members the group should include. - - This property will only add members to a group. - - Members should be specified as strings in the format of their domain qualified name - (domain\username), their UPN (username@domainname), their distinguished name (CN=username,DC=...), - or their username (for local machine accounts). - - Using the Members property in the same configuration as this property will generate an error. - - .PARAMETER MembersToExclude - The members the group should exclude. - - This property will only remove members from a group. - - Members should be specified as strings in the format of their domain qualified name - (domain\username), their UPN (username@domainname), their distinguished name (CN=username,DC=...), - or their username (for local machine accounts). - - Using the Members property in the same configuration as this property will generate an error. - - .PARAMETER Credential - A credential to resolve and add non-local group members. - - An error will occur if this account does not have the appropriate Active Directory permissions to add all - non-local accounts to the group. - - .NOTES - ShouldProcess PSSA rule is suppressed because Set-TargetResourceOnFullSKU and - Set-TargetResourceOnNanoServer call ShouldProcess. -#> -function Set-TargetResource -{ - [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '')] - [CmdletBinding(SupportsShouldProcess = $true)] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $GroupName, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [String] - $Description, - - [String[]] - $Members, - - [String[]] - $MembersToInclude, - - [String[]] - $MembersToExclude, - - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - Write-Verbose ($script:localizedData.SetTargetResourceStartMessage -f $GroupName) - - Assert-GroupNameValid -GroupName $GroupName - - if (Test-IsNanoServer) - { - Set-TargetResourceOnNanoServer @PSBoundParameters - } - else - { - Set-TargetResourceOnFullSKU @PSBoundParameters - } - - Write-Verbose ($script:localizedData.SetTargetResourceEndMessage -f $GroupName) -} - -<# - .SYNOPSIS - Tests if the group with the specified name is in the desired state. - - .PARAMETER GroupName - The name of the group to test the state of. - - .PARAMETER Ensure - Indicates if the group should exist or not. - - Set this property to "Absent" to test that the group does not exist. - Setting it to "Present" (the default value) tests that the group exists. - - .PARAMETER Description - The description of the group to test for. - - .PARAMETER Members - The list of members the group should have. - - The value of this property is an array of strings of the formats domain qualified name - (domain\username), UPN (username@domainname), distinguished name (CN=username,DC=...) and/or - a unqualified (username) for local machine accounts. - - If you set this property in a configuration, do not use either the MembersToExclude or - MembersToInclude property. Doing so will generate an error. - - .PARAMETER MembersToInclude - A list of members that should be in the group. - - The value of this property is an array of strings of the formats domain qualified name - (domain\username), UPN (username@domainname), distinguished name (CN=username,DC=...) and/or - a unqualified (username) for local machine accounts. - - If you set this property in a configuration, do not use the Members property. - Doing so will generate an error. - - .PARAMETER MembersToExclude - A list of members that should not be in the group. - - The value of this property is an array of strings of the formats domain qualified name - (domain\username), UPN (username@domainname), distinguished name (CN=username,DC=...) and/or - a unqualified (username) for local machine accounts. - - If you set this property in a configuration, do not use the Members property. - Doing so will generate an error. - - .PARAMETER Credential - The credentials required to resolve non-local group members -#> -function Test-TargetResource -{ - [OutputType([Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $GroupName, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [String] - $Description, - - [String[]] - $Members, - - [String[]] - $MembersToInclude, - - [String[]] - $MembersToExclude, - - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - Assert-GroupNameValid -GroupName $GroupName - - if (Test-IsNanoServer) - { - Write-Verbose ($script:localizedData.InvokingFunctionForGroup -f 'Test-TargetResourceOnNanoServer', $GroupName) - return Test-TargetResourceOnNanoServer @PSBoundParameters - } - else - { - Write-Verbose ($script:localizedData.InvokingFunctionForGroup -f 'Test-TargetResourceOnFullSKU', $GroupName) - return Test-TargetResourceOnFullSKU @PSBoundParameters - } -} - -<# - .SYNOPSIS - Retrieves the current state of the group with the specified name on a full server. - - .PARAMETER GroupName - The name of the group to retrieve the current state of. - - .PARAMETER Credential - A credential to resolve non-local group members. -#> -function Get-TargetResourceOnFullSKU -{ - [OutputType([Hashtable])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $GroupName, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - $principalContextCache = @{} - $disposables = New-Object -TypeName 'System.Collections.ArrayList' - - try - { - $principalContext = Get-PrincipalContext ` - -PrincipalContextCache $principalContextCache ` - -Disposables $Disposables ` - -Scope $env:COMPUTERNAME - - $group = Get-Group -GroupName $GroupName -PrincipalContext $principalContext - - if ($null -ne $group) - { - $null = $disposables.Add($group) - - # The group was found. Find the group members. - $members = Get-MembersOnFullSKU -Group $group -PrincipalContextCache $principalContextCache ` - -Credential $Credential -Disposables $disposables - - return @{ - GroupName = $group.Name - Ensure = 'Present' - Description = $group.Description - Members = $members - } - } - else - { - # The group was not found. - return @{ - GroupName = $GroupName - Ensure = 'Absent' - } - } - } - finally - { - Remove-DisposableObject -Disposables $disposables - } -} - -<# - .SYNOPSIS - Retrieves the current state of the group with the specified name on Nano Server. - - .PARAMETER GroupName - The name of the group to retrieve the current state of. - - .PARAMETER Credential - A credential to resolve non-local group members. -#> -function Get-TargetResourceOnNanoServer -{ - [OutputType([Hashtable])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $GroupName, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - try - { - $group = Get-LocalGroup -Name $GroupName -ErrorAction 'Stop' - } - catch - { - if ($_.CategoryInfo.Reason -eq 'GroupNotFoundException') - { - # The group was not found. - return @{ - GroupName = $GroupName - Ensure = 'Absent' - } - } - - New-InvalidOperationException -ErrorRecord $_ - } - - # The group was found. Find the group members. - $members = Get-MembersOnNanoServer -Group $group - - return @{ - GroupName = $group.Name - Ensure = 'Present' - Description = $group.Description - Members = $members - } -} - -<# - .SYNOPSIS - The Set-TargetResource cmdlet on a full server. - - .PARAMETER GroupName - The name of the group for which you want to ensure a specific state. - - .PARAMETER Ensure - Indicates if the group should exist or not. - - Set this property to Present to ensure that the group exists. - Set this property to Absent to ensure that the group does not exist. - - The default value is Present. - - .PARAMETER Description - The description of the group. - - .PARAMETER Members - Use this property to replace the current group membership with the specified members. - - The value of this property is an array of strings of the formats domain qualified name - (domain\username), UPN (username@domainname), distinguished name (CN=username,DC=...) and/or - an unqualified (username) for local machine accounts. - - If you set this property in a configuration, do not use either the MembersToExclude or - MembersToInclude property. Doing so will generate an error. - - .PARAMETER MembersToInclude - Use this property to add members to the existing membership of the group. - - The value of this property is an array of strings of the formats domain qualified name - (domain\username), UPN (username@domainname), distinguished name (CN=username,DC=...) and/or - a unqualified (username) for local machine accounts. - - If you set this property in a configuration, do not use the Members property. - Doing so will generate an error. - - .PARAMETER MembersToExclude - Use this property to remove members from the existing membership of the group. - - The value of this property is an array of strings of the formats domain qualified name - (domain\username), UPN (username@domainname), distinguished name (CN=username,DC=...) and/or - a unqualified (username) for local machine accounts. - - If you set this property in a configuration, do not use the Members property. - Doing so will generate an error. - - .PARAMETER Credential - The credentials required to access remote resources. Note: This account must have the - appropriate Active Directory permissions to add all non-local accounts to the group. - Otherwise, an error will occur. -#> -function Set-TargetResourceOnFullSKU -{ - [CmdletBinding(SupportsShouldProcess = $true)] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $GroupName, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [String] - $Description, - - [String[]] - $Members, - - [String[]] - $MembersToInclude, - - [String[]] - $MembersToExclude, - - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - $principalContextCache = @{} - $disposables = New-Object -TypeName 'System.Collections.ArrayList' - - try - { - $principalContext = Get-PrincipalContext ` - -PrincipalContextCache $principalContextCache ` - -Disposables $disposables ` - -Scope $env:computerName - - # Try to find a group by its name. - $group = Get-Group -GroupName $GroupName -PrincipalContext $principalContext - $groupOriginallyExists = $null -ne $group - - if ($Ensure -eq 'Present') - { - $shouldProcessTarget = $script:localizedData.GroupWithName -f $GroupName - if ($groupOriginallyExists) - { - $null = $disposables.Add($group) - $whatIfShouldProcess = $PSCmdlet.ShouldProcess($shouldProcessTarget, $script:localizedData.SetOperation) - } - else - { - $whatIfShouldProcess = $PSCmdlet.ShouldProcess($shouldProcessTarget, $script:localizedData.AddOperation) - } - - if ($whatIfShouldProcess) - { - $saveChanges = $false - - if (-not $groupOriginallyExists) - { - $localPrincipalContext = Get-PrincipalContext -PrincipalContextCache $principalContextCache ` - -Disposables $disposables -Scope $env:COMPUTERNAME - - $group = New-Object -TypeName 'System.DirectoryServices.AccountManagement.GroupPrincipal' ` - -ArgumentList @( $localPrincipalContext ) - $null = $disposables.Add($group) - - $group.Name = $GroupName - $saveChanges = $true - } - - # Set group properties. - - if ($PSBoundParameters.ContainsKey('Description') -and $Description -ne $group.Description) - { - $group.Description = $Description - $saveChanges = $true - } - - $actualMembersAsPrincipals = $null - - <# - Group members can be updated in two ways: - 1. Supplying the Members parameter - this causes the membership to be replaced - with the members defined in Members. - - NOTE: If Members is empty, the group membership is cleared. - - 2. Providing MembersToInclude and/or MembersToExclude - - this adds/removes members from the list. - - If Members is mutually exclusive with MembersToInclude and MembersToExclude - If Members is not defined then MembersToInclude or MembersToExclude - must contain at least one entry. - #> - if ($PSBoundParameters.ContainsKey('Members')) - { - foreach ($incompatibleParameterName in @( 'MembersToInclude', 'MembersToExclude' )) - { - if ($PSBoundParameters.ContainsKey($incompatibleParameterName)) - { - New-InvalidArgumentException -ArgumentName $incompatibleParameterName ` - -Message ($script:localizedData.MembersAndIncludeExcludeConflict -f 'Members', $incompatibleParameterName) - } - } - - if ($groupOriginallyExists) - { - $actualMembersAsPrincipals = @( Get-MembersAsPrincipalsList ` - -Group $group ` - -PrincipalContextCache $principalContextCache ` - -Disposables $disposables ` - -Credential $Credential - ) - } - - if ($Members.Count -eq 0 -and $null -ne $actualMembersAsPrincipals -and $actualMembersAsPrincipals.Count -ne 0) - { - Clear-GroupMembers -Group $group - $saveChanges = $true - } - elseif ($Members.Count -ne 0) - { - # Remove duplicate names as strings. - $uniqueMembers = $Members | Select-Object -Unique - - # Resolve the names to actual principal objects. - $membersAsPrincipals = @( ConvertTo-UniquePrincipalsList ` - -MemberNames $uniqueMembers ` - -PrincipalContextCache $principalContextCache ` - -Disposables $disposables ` - -Credential $Credential ) - - if ($null -ne $actualMembersAsPrincipals -and $actualMembersAsPrincipals.Count -gt 0) - { - foreach ($memberAsPrincipal in $membersAsPrincipals) - { - if ($actualMembersAsPrincipals -notcontains $memberAsPrincipal) - { - Add-GroupMember -Group $group -MemberAsPrincipal $memberAsPrincipal - $saveChanges = $true - } - } - - foreach ($actualMemberAsPrincipal in $actualMembersAsPrincipals) - { - if ($membersAsPrincipals -notcontains $actualMemberAsPrincipal) - { - Remove-GroupMember -Group $group -MemberAsPrincipal $actualMemberAsPrincipal - $saveChanges = $true - } - } - } - else - { - # Set the members of the group - foreach ($memberAsPrincipal in $membersAsPrincipals) - { - Add-GroupMember -Group $group -MemberAsPrincipal $memberAsPrincipal - } - - $saveChanges = $true - } - } - else - { - Write-Verbose -Message ($script:localizedData.GroupAndMembersEmpty -f $GroupName) - } - } - elseif ($PSBoundParameters.ContainsKey('MembersToInclude') -or $PSBoundParameters.ContainsKey('MembersToExclude')) - { - if ($groupOriginallyExists) - { - $actualMembersAsPrincipals = @( Get-MembersAsPrincipalsList ` - -Group $group ` - -PrincipalContextCache $principalContextCache ` - -Disposables $disposables ` - -Credential $Credential - ) - } - - $membersToIncludeAsPrincipals = $null - $uniqueMembersToInclude = $MembersToInclude | Select-Object -Unique - - if ($null -eq $uniqueMembersToInclude) - { - Write-Verbose -Message $script:localizedData.MembersToIncludeEmpty - } - else - { - # Resolve the names to actual principal objects. - $membersToIncludeAsPrincipals = @( ConvertTo-UniquePrincipalsList ` - -MemberNames $uniqueMembersToInclude ` - -PrincipalContextCache $principalContextCache ` - -Disposables $disposables ` - -Credential $Credential - ) - } - - $membersToExcludeAsPrincipals = $null - $uniqueMembersToExclude = $MembersToExclude | Select-Object -Unique - - if ($null -eq $uniqueMembersToExclude) - { - Write-Verbose -Message $script:localizedData.MembersToExcludeEmpty - } - else - { - # Resolve the names to actual principal objects. - $membersToExcludeAsPrincipals = @( ConvertTo-UniquePrincipalsList ` - -MemberNames $uniqueMembersToExclude ` - -PrincipalContextCache $principalContextCache ` - -Disposables $disposables ` - -Credential $Credential - ) - } - - foreach ($includedPrincipal in $membersToIncludeAsPrincipals) - { - <# - Throw an error if any common principals were provided in MembersToInclude - and MembersToExclude. - #> - if ($membersToExcludeAsPrincipals -contains $includedPrincipal) - { - New-InvalidArgumentException -ArgumentName 'MembersToInclude and MembersToExclude' ` - -Message ($script:localizedData.IncludeAndExcludeConflict -f $includedPrincipal.SamAccountName, - 'MembersToInclude', 'MembersToExclude') - } - - if ($actualMembersAsPrincipals -notcontains $includedPrincipal) - { - Add-GroupMember -Group $group -MemberAsPrincipal $includedPrincipal - $saveChanges = $true - } - } - - foreach ($excludedPrincipal in $membersToExcludeAsPrincipals) - { - if ($actualMembersAsPrincipals -contains $excludedPrincipal) - { - Remove-GroupMember -Group $group -MemberAsPrincipal $excludedPrincipal - $saveChanges = $true - } - } - } - - if ($saveChanges) - { - Save-Group -Group $group - - # Send an operation success verbose message. - if ($groupOriginallyExists) - { - Write-Verbose -Message ($script:localizedData.GroupUpdated -f $GroupName) - } - else - { - Write-Verbose -Message ($script:localizedData.GroupCreated -f $GroupName) - } - } - else - { - Write-Verbose -Message ($script:localizedData.NoConfigurationRequired -f $GroupName) - } - } - } - else - { - if ($groupOriginallyExists) - { - if ($PSCmdlet.ShouldProcess(($script:localizedData.GroupWithName -f $GroupName), $script:localizedData.RemoveOperation)) - { - # Don't add group to $disposables since Delete also disposes. - Remove-Group -Group $group - Write-Verbose -Message ($script:localizedData.GroupRemoved -f $GroupName) - } - else - { - $null = $disposables.Add($group) - } - } - else - { - Write-Verbose -Message ($script:localizedData.NoConfigurationRequiredGroupDoesNotExist -f $GroupName) - } - } - } - finally - { - Remove-DisposableObject -Disposables $disposables - } -} - -<# - .SYNOPSIS - The Set-TargetResource cmdlet on Nano Server. - - .PARAMETER GroupName - The name of the group for which you want to ensure a specific state. - - .PARAMETER Ensure - Indicates if the group should exist or not. - - Set this property to Present to ensure that the group exists. - Set this property to Absent to ensure that the group does not exist. - - The default value is Present. - - .PARAMETER Description - The description of the group. - - .PARAMETER Members - Use this property to replace the current group membership with the specified members. - - The value of this property is an array of strings of the formats domain qualified name - (domain\username), UPN (username@domainname), distinguished name (CN=username,DC=...) and/or - a unqualified (username) for local machine accounts. - - If you set this property in a configuration, do not use either the MembersToExclude or - MembersToInclude property. Doing so will generate an error. - - .PARAMETER MembersToInclude - Use this property to add members to the existing membership of the group. - - The value of this property is an array of strings of the formats domain qualified name - (domain\username), UPN (username@domainname), distinguished name (CN=username,DC=...) and/or - a unqualified (username) for local machine accounts. - - If you set this property in a configuration, do not use the Members property. - Doing so will generate an error. - - .PARAMETER MembersToExclude - Use this property to remove members from the existing membership of the group. - - The value of this property is an array of strings of the formats domain qualified name - (domain\username), UPN (username@domainname), distinguished name (CN=username,DC=...) and/or - a unqualified (username) for local machine accounts. - - If you set this property in a configuration, do not use the Members property. - Doing so will generate an error. - - .PARAMETER Credential - Not used on Nano Server. - Only local users are accessible from the resource. -#> -function Set-TargetResourceOnNanoServer -{ - [CmdletBinding(SupportsShouldProcess = $true)] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $GroupName, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [String] - $Description, - - [String[]] - $Members, - - [String[]] - $MembersToInclude, - - [String[]] - $MembersToExclude, - - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - try - { - $group = Get-LocalGroup -Name $GroupName -ErrorAction 'Stop' - $groupOriginallyExists = $true - } - catch [System.Exception] - { - if ($_.CategoryInfo.Reason -eq 'GroupNotFoundException') - { - # A group with the provided name does not exist. - Write-Verbose -Message ($script:localizedData.GroupDoesNotExist -f $GroupName) - $groupOriginallyExists = $false - } - else - { - New-InvalidOperationException -ErrorRecord $_ - } - } - - if ($Ensure -eq 'Present') - { - $whatIfShouldProcess = - if ($groupOriginallyExists) - { - $PSCmdlet.ShouldProcess(($script:localizedData.GroupWithName -f $GroupName), - $script:localizedData.SetOperation) - } - else - { - $PSCmdlet.ShouldProcess(($script:localizedData.GroupWithName -f $GroupName), - $script:localizedData.AddOperation) - } - - if ($whatIfShouldProcess) - { - if (-not $groupOriginallyExists) - { - $group = New-LocalGroup -Name $GroupName - Write-Verbose -Message ($script:localizedData.GroupCreated -f $GroupName) - } - - # Set the group properties. - if ($PSBoundParameters.ContainsKey('Description') -and - ((-not $groupOriginallyExists) -or ($Description -ne $group.Description))) - { - Set-LocalGroup -Name $GroupName -Description $Description - } - - if ($PSBoundParameters.ContainsKey('Members')) - { - foreach ($incompatibleParameterName in @( 'MembersToInclude', 'MembersToExclude' )) - { - if ($PSBoundParameters.ContainsKey($incompatibleParameterName)) - { - New-InvalidArgumentException -ArgumentName $incompatibleParameterName ` - -Message ($script:localizedData.MembersAndIncludeExcludeConflict -f 'Members', $incompatibleParameterName) - } - } - - $groupMembers = Get-MembersOnNanoServer -Group $group - - # Remove duplicate names as strings. - $uniqueMembers = $Members | Select-Object -Unique - - # Remove unspecified members - foreach ($groupMember in $groupMembers) - { - if ($uniqueMembers -notcontains $groupMember) - { - Remove-LocalGroupMember -Group $GroupName -Member $groupMember - } - } - - # Add specified missing members - foreach ($uniqueMember in $uniqueMembers) - { - if ($groupMembers -notcontains $uniqueMember) - { - Add-LocalGroupMember -Group $GroupName -Member $uniqueMember - } - } - } - elseif ($PSBoundParameters.ContainsKey('MembersToInclude') -or $PSBoundParameters.ContainsKey('MembersToExclude')) - { - [array]$groupMembers = Get-MembersOnNanoServer -Group $group - - $uniqueMembersToInclude = $MembersToInclude | Select-Object -Unique - $uniqueMembersToExclude = $MembersToExclude | Select-Object -Unique - - <# - Both MembersToInclude and MembersToExclude were provided. - Check if they have common principals. - #> - foreach ($includedMember in $uniqueMembersToInclude) - { - foreach($excludedMember in $uniqueMembersToExclude) - { - if ($includedMember -eq $excludedMember) - { - New-InvalidArgumentException -ArgumentName 'MembersToInclude and MembersToExclude' ` - -Message ($script:localizedData.IncludeAndExcludeConflict -f $includedMember, 'MembersToInclude', - 'MembersToExclude') - } - } - } - - foreach ($includedMember in $uniqueMembersToInclude) - { - if ($groupMembers -notcontains $includedMember) - { - Add-LocalGroupMember -Group $GroupName -Member $includedMember - } - } - - foreach($excludedMember in $uniqueMembersToExclude) - { - if ($groupMembers -contains $excludedMember) - { - Remove-LocalGroupMember -Group $GroupName -Member $excludedMember - } - } - } - } - } - else - { - # Ensure is set to "Absent". - if ($groupOriginallyExists) - { - $whatIfShouldProcess = $PSCmdlet.ShouldProcess( - ($script:localizedData.GroupWithName -f $GroupName), $script:localizedData.RemoveOperation) - if ($whatIfShouldProcess) - { - # The group exists. Remove the group by the provided name. - Remove-LocalGroup -Name $GroupName - Write-Verbose -Message ($script:localizedData.GroupRemoved -f $GroupName) - } - } - else - { - Write-Verbose -Message ($script:localizedData.NoConfigurationRequiredGroupDoesNotExist -f $GroupName) - } - } -} - -<# - .SYNOPSIS - The Test-TargetResource cmdlet on a full server. - Tests if the group being managed is in the desired state. - - .PARAMETER GroupName - The name of the group for which you want to test a specific state. - - .PARAMETER Ensure - Indicates if the group should exist or not. - - Set this property to Present to ensure that the group exists. - Set this property to Absent to ensure that the group does not exist. - - The default value is Present. - - .PARAMETER Description - The description of the group to test for. - - .PARAMETER Members - Use this property to test if the existing membership of the group matches - the list provided. - - The value of this property is an array of strings of the formats domain qualified name - (domain\username), UPN (username@domainname), distinguished name (CN=username,DC=...) and/or - a unqualified (username) for local machine accounts. - - If you set this property in a configuration, do not use either the MembersToExclude or - MembersToInclude property. Doing so will generate an error. - - .PARAMETER MembersToInclude - Use this property to test if members need to be added to the existing membership - of the group. - - The value of this property is an array of strings of the formats domain qualified name - (domain\username), UPN (username@domainname), distinguished name (CN=username,DC=...) and/or - a unqualified (username) for local machine accounts. - - If you set this property in a configuration, do not use the Members property. - Doing so will generate an error. - - .PARAMETER MembersToExclude - Use this property to test if members need to removed from the existing membership - of the group. - - The value of this property is an array of strings of the formats domain qualified name - (domain\username), UPN (username@domainname), distinguished name (CN=username,DC=...) and/or - a unqualified (username) for local machine accounts. - - If you set this property in a configuration, do not use the Members property. - Doing so will generate an error. - - .PARAMETER Credential - The credentials required to resolve non-local group members -#> -function Test-TargetResourceOnFullSKU -{ - [OutputType([Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $GroupName, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [String] - $Description, - - [String[]] - $Members, - - [String[]] - $MembersToInclude, - - [String[]] - $MembersToExclude, - - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - $principalContextCache = @{} - $disposables = New-Object -TypeName 'System.Collections.ArrayList' - - try - { - $principalContext = Get-PrincipalContext ` - -PrincipalContextCache $PrincipalContextCache ` - -Disposables $disposables ` - -Scope $env:computerName - - $group = Get-Group -GroupName $GroupName -PrincipalContext $principalContext - - if ($null -eq $group) - { - Write-Verbose -Message ($script:localizedData.GroupDoesNotExist -f $GroupName) - return $Ensure -eq 'Absent' - } - - $null = $disposables.Add($group) - Write-Verbose -Message ($script:localizedData.GroupExists -f $GroupName) - - # Validate separate properties. - if ($Ensure -eq 'Absent') - { - Write-Verbose -Message ($script:localizedData.PropertyMismatch -f 'Ensure', 'Absent', 'Present') - return $false - } - - if ($PSBoundParameters.ContainsKey('Description') -and $Description -ne $group.Description) - { - Write-Verbose -Message ($script:localizedData.PropertyMismatch -f 'Description', $Description, $group.Description) - return $false - } - - if ($PSBoundParameters.ContainsKey('Members')) - { - foreach ($incompatibleParameterName in @( 'MembersToInclude', 'MembersToExclude' )) - { - if ($PSBoundParameters.ContainsKey($incompatibleParameterName)) - { - New-InvalidArgumentException -ArgumentName $incompatibleParameterName ` - -Message ($script:localizedData.MembersAndIncludeExcludeConflict -f 'Members', $incompatibleParameterName) - } - } - - $actualMembersAsPrincipals = @( Get-MembersAsPrincipalsList ` - -Group $group ` - -PrincipalContextCache $principalContextCache ` - -Disposables $disposables ` - -Credential $Credential - ) - - $uniqueMembers = $Members | Select-Object -Unique - - if ($null -eq $uniqueMembers) - { - return ($null -eq $actualMembersAsPrincipals -or $actualMembersAsPrincipals.Count -eq 0) - } - else - { - if ($null -eq $actualMembersAsPrincipals -or $actualMembersAsPrincipals.Count -eq 0) - { - return $false - } - - # Resolve the names to actual principal objects. - $expectedMembersAsPrincipals = @( ConvertTo-UniquePrincipalsList ` - -MemberNames $uniqueMembers ` - -PrincipalContextCache $principalContextCache ` - -Disposables $disposables ` - -Credential $Credential - ) - - if ($expectedMembersAsPrincipals.Count -ne $actualMembersAsPrincipals.Count) - { - Write-Verbose -Message ($script:localizedData.MembersNumberMismatch -f 'Members', - $expectedMembersAsPrincipals.Count, $actualMembersAsPrincipals.Count) - return $false - } - - # Compare the two member lists. - foreach ($expectedMemberAsPrincipal in $expectedMembersAsPrincipals) - { - if ($actualMembersAsPrincipals -notcontains $expectedMemberAsPrincipal) - { - Write-Verbose -Message ($script:localizedData.MembersMemberMismatch -f $expectedMemberAsPrincipal.SamAccountName, - 'Members', $group.SamAccountName) - return $false - } - } - } - } - elseif ($PSBoundParameters.ContainsKey('MembersToInclude') -or $PSBoundParameters.ContainsKey('MembersToExclude')) - { - $actualMembersAsPrincipals = @( Get-MembersAsPrincipalsList ` - -Group $group ` - -PrincipalContextCache $principalContextCache ` - -Disposables $disposables ` - -Credential $Credential - ) - - $membersToIncludeAsPrincipals = $null - $uniqueMembersToInclude = $MembersToInclude | Select-Object -Unique - - if ($null -eq $uniqueMembersToInclude) - { - Write-Verbose -Message $script:localizedData.MembersToIncludeEmpty - } - else - { - # Resolve the names to actual principal objects. - $membersToIncludeAsPrincipals = @( ConvertTo-UniquePrincipalsList ` - -MemberNames $uniqueMembersToInclude ` - -PrincipalContextCache $principalContextCache ` - -Disposables $disposables ` - -Credential $Credential - ) - } - - $membersToExcludeAsPrincipals = $null - $uniqueMembersToExclude = $MembersToExclude | Select-Object -Unique - - if ($null -eq $uniqueMembersToExclude) - { - Write-Verbose -Message $script:localizedData.MembersToExcludeEmpty - } - else - { - # Resolve the names to actual principal objects. - $membersToExcludeAsPrincipals = @( ConvertTo-UniquePrincipalsList ` - -MemberNames $uniqueMembersToExclude ` - -PrincipalContextCache $principalContextCache ` - -Disposables $disposables ` - -Credential $Credential - ) - } - - foreach ($includedPrincipal in $membersToIncludeAsPrincipals) - { - <# - Throw an error if any common principals were provided in MembersToInclude - and MembersToExclude. - #> - if ($membersToExcludeAsPrincipals -contains $includedPrincipal) - { - New-InvalidArgumentException -ArgumentName 'MembersToInclude and MembersToExclude' ` - -Message ($script:localizedData.IncludeAndExcludeConflict -f $includedPrincipal.SamAccountName, - 'MembersToInclude', 'MembersToExclude') - } - - if ($actualMembersAsPrincipals -notcontains $includedPrincipal) - { - return $false - } - } - - foreach ($excludedPrincipal in $membersToExcludeAsPrincipals) - { - if ($actualMembersAsPrincipals -contains $excludedPrincipal) - { - return $false - } - } - } - } - finally - { - Remove-DisposableObject -Disposables $disposables - } - - return $true -} - -<# - .SYNOPSIS - The Test-TargetResource cmdlet on a Nano server - Tests if the group being managed is in the desired state. - - .PARAMETER GroupName - The name of the group for which you want to test a specific state. - - .PARAMETER Ensure - Indicates if the group should exist or not. - - Set this property to Present to ensure that the group exists. - Set this property to Absent to ensure that the group does not exist. - - The default value is Present. - - .PARAMETER Description - The description of the group to test for. - - .PARAMETER Members - Use this property to test if the existing membership of the group matches - the list provided. - - The value of this property is an array of strings of the formats domain qualified name - (domain\username), UPN (username@domainname), distinguished name (CN=username,DC=...) and/or - a unqualified (username) for local machine accounts. - - If you set this property in a configuration, do not use either the MembersToExclude or - MembersToInclude property. Doing so will generate an error. - - .PARAMETER MembersToInclude - Use this property to test if members need to be added to the existing membership - of the group. - - The value of this property is an array of strings of the formats domain qualified name - (domain\username), UPN (username@domainname), distinguished name (CN=username,DC=...) and/or - a unqualified (username) for local machine accounts. - - If you set this property in a configuration, do not use the Members property. - Doing so will generate an error. - - .PARAMETER MembersToExclude - Use this property to test if members need to removed from the existing membership - of the group. - - The value of this property is an array of strings of the formats domain qualified name - (domain\username), UPN (username@domainname), distinguished name (CN=username,DC=...) and/or - a unqualified (username) for local machine accounts. - - If you set this property in a configuration, do not use the Members property. - Doing so will generate an error. - - .PARAMETER Credential - The credentials required to resolve non-local group members -#> -function Test-TargetResourceOnNanoServer -{ - [OutputType([Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $GroupName, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [String] - $Description, - - [String[]] - $Members, - - [String[]] - $MembersToInclude, - - [String[]] - $MembersToExclude, - - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - try - { - $group = Get-LocalGroup -Name $GroupName -ErrorAction Stop - } - catch [System.Exception] - { - if ($_.CategoryInfo.Reason -eq 'GroupNotFoundException') - { - # A group with the provided name does not exist. - Write-Verbose -Message ($script:localizedData.GroupDoesNotExist -f $GroupName) - - return ($Ensure -eq 'Absent') - } - - New-InvalidOperationException -ErrorRecord $_ - } - - # A group with the provided name exists. - Write-Verbose -Message ($script:localizedData.GroupExists -f $GroupName) - - # Validate separate properties. - if ($Ensure -eq 'Absent') - { - Write-Verbose -Message ($script:localizedData.PropertyMismatch -f 'Ensure', 'Absent', 'Present') - return $false - } - - if ($PSBoundParameters.ContainsKey('Description') -and $Description -ne $group.Description) - { - Write-Verbose -Message ($script:localizedData.PropertyMismatch -f 'Description', $Description, $group.Description) - return $false - } - - if ($PSBoundParameters.ContainsKey('Members')) - { - foreach ($incompatibleParameterName in @( 'MembersToInclude', 'MembersToExclude' )) - { - if ($PSBoundParameters.ContainsKey($incompatibleParameterName)) - { - New-InvalidArgumentException -ArgumentName $incompatibleParameterName ` - -Message ($script:localizedData.MembersAndIncludeExcludeConflict -f 'Members', $incompatibleParameterName) - } - } - - [array]$groupMembers = Get-MembersOnNanoServer -Group $group - - # Remove duplicate names as strings. - $uniqueMembers = $Members | Select-Object -Unique - - if ($null -eq $uniqueMembers) - { - return ($null -eq $groupMembers -or $groupMembers.Count -eq 0) - } - else - { - if ($null -eq $groupMembers -or $uniqueMembers.Count -ne $groupMembers.Count) - { - return $false - } - - foreach ($groupMember in $groupMembers) - { - if ($uniqueMembers -notcontains $groupMember) - { - return $false - } - } - } - } - elseif ($PSBoundParameters.ContainsKey('MembersToInclude') -or $PSBoundParameters.ContainsKey('MembersToExclude')) - { - $groupMembers = Get-MembersOnNanoServer -Group $group - - $uniqueMembersToInclude = $MembersToInclude | Select-Object -Unique - $uniqueMembersToExclude = $MembersToExclude | Select-Object -Unique - - <# - Both MembersToInclude and MembersToExclude were provided. - Check if they have common principals. - #> - foreach ($includedMember in $uniqueMembersToInclude) - { - foreach($excludedMember in $uniqueMembersToExclude) - { - if ($includedMember -eq $excludedMember) - { - New-InvalidArgumentException -ArgumentName 'MembersToInclude and MembersToExclude' ` - -Message ($script:localizedData.IncludeAndExcludeConflict -f $includedMember, 'MembersToInclude', - 'MembersToExclude') - } - } - } - - foreach ($includedMember in $uniqueMembersToInclude) - { - if ($groupMembers -notcontains $includedMember) - { - return $false - } - } - - foreach($excludedMember in $uniqueMembersToExclude) - { - if ($groupMembers -contains $excludedMember) - { - return $false - } - } - } - - # All properties match. Return $true. - return $true -} - -<# - .SYNOPSIS - Retrieves the members of a group on a Nano server. - - .PARAMETER Group - The LocalGroup Object to retrieve members for. -#> -function Get-MembersOnNanoServer -{ - [OutputType([System.String[]])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [Microsoft.PowerShell.Commands.LocalGroup] - $Group - ) - - $memberNames = New-Object -TypeName 'System.Collections.ArrayList' - - # Get the group members. - $groupMembers = Get-LocalGroupMember -Group $Group - - foreach ($groupMember in $groupMembers) - { - if ($groupMember.PrincipalSource -ieq 'Local') - { - $localMemberName = $groupMember.Name.Substring($groupMember.Name.IndexOf('\') + 1) - $null = $memberNames.Add($localMemberName) - } - else - { - Write-Verbose -Message ($script:localizedData.MemberIsNotALocalUser -f $groupMember.Name,$groupMember.PrincipalSource) - $domainMemberName = $groupMember.Name - $null = $memberNames.Add($domainMemberName) - } - } - - return $memberNames.ToArray() -} - -<# - .SYNOPSIS - Retrieves the members of the given a group on a full server. - - .PARAMETER Group - The GroupPrincipal Object to retrieve members for. - - .PARAMETER PrincipalContextCache - A hashtable cache of PrincipalContext instances for each scope. - This is used to cache PrincipalContext instances for cases where it is used multiple times. - - .PARAMETER Disposables - The ArrayList of disposable objects to which to add any objects that need to be disposed. - - .PARAMETER Credential - The network credential to use when explicit credentials are needed for the target domain. -#> -function Get-MembersOnFullSKU -{ - [OutputType([System.String[]])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [System.DirectoryServices.AccountManagement.GroupPrincipal] - $Group, - - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [Hashtable] - [AllowEmptyCollection()] - $PrincipalContextCache, - - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [System.Collections.ArrayList] - [AllowEmptyCollection()] - $Disposables, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - $members = New-Object -TypeName 'System.Collections.ArrayList' - - $membersAsPrincipals = @( Get-MembersAsPrincipalsList ` - -Group $Group ` - -PrincipalContextCache $PrincipalContextCache ` - -Disposables $Disposables ` - -Credential $Credential - ) - - foreach ($memberAsPrincipal in $membersAsPrincipals) - { - if ($memberAsPrincipal.ContextType -eq [System.DirectoryServices.AccountManagement.ContextType]::Domain) - { - # Select only the first part of the full domain name. - $domainName = $memberAsPrincipal.Context.Name - - $domainNameDotIndex = $domainName.IndexOf('.') - if ($domainNameDotIndex -ne -1) - { - $domainName = $domainName.Substring(0, $domainNameDotIndex) - } - - if ($memberAsPrincipal.StructuralObjectClass -ieq 'computer') - { - $null = $members.Add($domainName + '\' + $memberAsPrincipal.Name) - } - else - { - $null = $members.Add($domainName + '\' + $memberAsPrincipal.SamAccountName) - } - } - else - { - $null = $members.Add($memberAsPrincipal.Name) - } - } - - return $members.ToArray() -} - -<# - .SYNOPSIS - Retrieves the members of a group as Principal instances. - - .PARAMETER Group - The group to retrieve members for. - - .PARAMETER PrincipalContextCache - A hashtable cache of PrincipalContext instances for each scope. - This is used to cache PrincipalContext instances for cases where it is used multiple times. - - .PARAMETER Disposables - The ArrayList of disposable objects to which to add any objects that need to be disposed. - - .PARAMETER Credential - The network credential to use when explicit credentials are needed for the target domain. -#> -function Get-MembersAsPrincipalsList -{ - [OutputType([System.DirectoryServices.AccountManagement.Principal[]])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [System.DirectoryServices.AccountManagement.GroupPrincipal] - $Group, - - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [Hashtable] - [AllowEmptyCollection()] - $PrincipalContextCache, - - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [System.Collections.ArrayList] - [AllowEmptyCollection()] - $Disposables, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - $principals = New-Object -TypeName 'System.Collections.ArrayList' - - <# - This logic enumerates the group members using the underlying DirectoryEntry API. This is - needed because enumerating the group members as principal instances causes a resolve to - occur. Since there is no facility for passing credentials to perform the resolution, any - members that cannot be resolved using the current user will fail (such as when this - resource runs as SYSTEM). Dropping down to the underyling DirectoryEntry API allows us to - access the account's SID which can then be used to resolve the associated principal using - explicit credentials. - #> - $groupDirectoryMembers = Get-GroupMembersFromDirectoryEntry -Group $Group - - foreach ($groupDirectoryMember in $groupDirectoryMembers) - { - # Extract the ObjectSid from the underlying DirectoryEntry - $memberDirectoryEntry = New-Object -TypeName 'System.DirectoryServices.DirectoryEntry' ` - -ArgumentList @( $groupDirectoryMember ) - $null = $disposables.Add($memberDirectoryEntry) - - $memberDirectoryEntryPathParts = $memberDirectoryEntry.Path.Split('/') - - if ($memberDirectoryEntryPathParts.Count -eq 4) - { - # Parsing WinNT://domainname/accountname or WinNT://machinename/accountname - $scope = $memberDirectoryEntryPathParts[2] - $accountName = $memberDirectoryEntryPathParts[3] - } - elseif ($memberDirectoryEntryPathParts.Count -eq 5) - { - # Parsing WinNT://domainname/machinename/accountname - $scope = $memberDirectoryEntryPathParts[3] - $accountName = $memberDirectoryEntryPathParts[4] - } - else - { - <# - The account is stale either becuase it was deleted or the machine was moved to a - new domain without removing the domain members from the group. If we consider this - a fatal error, the group is no longer managable by the DSC resource. Writing a - warning allows the operation to complete while leaving the stale member in the - group. - #> - Write-Warning -Message ($script:localizedData.MemberNotValid -f $memberDirectoryEntry.Path) - continue - } - - $principalContext = Get-PrincipalContext ` - -Scope $scope ` - -Credential $Credential ` - -PrincipalContextCache $PrincipalContextCache ` - -Disposables $Disposables - - # If local machine qualified, get the PrincipalContext for the local machine - if (Test-IsLocalMachine -Scope $scope) - { - Write-Verbose -Message ($script:localizedData.ResolvingLocalAccount -f $accountName) - } - # The account is domain qualified - credential required to resolve it. - elseif ($null -ne $principalContext) - { - Write-Verbose -Message ($script:localizedData.ResolvingDomainAccount -f $accountName, $scope) - } - else - { - <# - The provided name is not scoped to the local machine and no credential was - provided. This is an unsupported use case. A credential is required to resolve - off-box. - #> - New-InvalidArgumentException -ArgumentName 'Credential' ` - -Message ($script:localizedData.DomainCredentialsRequired -f $accountName) - } - - # Create a SID to enable comparison againt the expected member's SID. - $memberSidBytes = $memberDirectoryEntry.Properties['ObjectSid'].Value - $memberSid = New-Object -TypeName 'System.Security.Principal.SecurityIdentifier' ` - -ArgumentList @( $memberSidBytes, 0 ) - - $principal = Resolve-SidToPrincipal -PrincipalContext $principalContext -Sid $memberSid -Scope $scope - $null = $disposables.Add($principal) - - $null = $principals.Add($principal) - } - - return $principals.ToArray() -} - -<# - .SYNOPSIS - Throws an error if a group name contains invalid characters. - - .PARAMETER GroupName - The group name to test. -#> -function Assert-GroupNameValid -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $GroupName - ) - - $invalidCharacters = @( '\', '/', '"', '[', ']', ':', '|', '<', '>', '+', '=', ';', ',', '?', '*', '@' ) - - if ($GroupName.IndexOfAny($invalidCharacters) -ne -1) - { - New-InvalidArgumentException -ArgumentName 'GroupName' ` - -Message ($script:localizedData.InvalidGroupName -f $GroupName, [String]::Join(' ', $invalidCharacters)) - } - - $nameContainsOnlyWhitspaceOrDots = $true - - # Check if the name consists of only periods and/or white spaces. - for ($groupNameIndex = 0; $groupNameIndex -lt $GroupName.Length; $groupNameIndex++) - { - if (-not [Char]::IsWhiteSpace($GroupName, $groupNameIndex) -and $GroupName[$groupNameIndex] -ne '.') - { - $nameContainsOnlyWhitspaceOrDots = $false - break - } - } - - if ($nameContainsOnlyWhitspaceOrDots) - { - New-InvalidArgumentException -ArgumentName 'GroupName' ` - -Message ($script:localizedData.InvalidGroupName -f $GroupName, [String]::Join(' ', $invalidCharacters)) - } -} - -<# - .SYNOPSIS - Resolves an array of member names to Principal instances. - - .PARAMETER MemberNames - The member names to convert to Principal instances. - - .PARAMETER PrincipalContextCache - A hashtable cache of PrincipalContext instances for each scope. - This is used to cache PrincipalContext instances for cases where it is used multiple times. - - .PARAMETER Disposables - The ArrayList of disposable objects to which to add any objects that need to be disposed. - - .PARAMETER Credential - The network credential to use when explicit credentials are needed for the target domain. -#> -function ConvertTo-UniquePrincipalsList -{ - [OutputType([System.DirectoryServices.AccountManagement.Principal[]])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String[]] - $MemberNames, - - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [Hashtable] - [AllowEmptyCollection()] - $PrincipalContextCache, - - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [System.Collections.ArrayList] - [AllowEmptyCollection()] - $Disposables, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - $principals = @() - - foreach ($memberName in $MemberNames) - { - $principal = ConvertTo-Principal ` - -MemberName $memberName ` - -PrincipalContextCache $PrincipalContextCache ` - -Disposables $Disposables ` - -Credential $Credential - - if ($null -ne $principal) - { - # Do not add duplicate entries - if ($principal.ContextType -eq [System.DirectoryServices.AccountManagement.ContextType]::Domain) - { - $duplicatePrincipal = $principals | Where-Object -FilterScript { $_.DistinguishedName -ieq $principal.DistinguishedName } - - if ($null -eq $duplicatePrincipal) - { - $principals += $principal - } - } - else - { - $duplicatePrincipal = $principals | Where-Object -FilterScript { $_.SamAccountName -ieq $principal.SamAccountName } - - if ($null -eq $duplicatePrincipal) - { - $principals += $principal - } - } - } - } - - return $principals -} - -<# - .SYNOPSIS - Resolves a member name to a Principal instance. - - .PARAMETER MemberName - The member name to convert to a Principal instance. - - .PARAMETER PrincipalContextCache - A hashtable cache of PrincipalContext instances for each scope. - This is used to cache PrincipalContext instances for cases where it is used multiple times. - - .PARAMETER Disposables - The ArrayList of disposable objects to which to add any objects that need to be disposed. - - .PARAMETER Credential - The network credential to use when explicit credentials are needed for the target domain. - - .NOTES - ConvertTo-Principal will fail if a machine name is specified as domainname\machinename. It - will succeed if the machine name is specified as the SAM name (domainname\machinename$) or - as the unqualified machine name. - - Split-MemberName splits the scope and account name to avoid this problem. -#> -function ConvertTo-Principal -{ - [OutputType([System.DirectoryServices.AccountManagement.Principal])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [String] - $MemberName, - - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [Hashtable] - [AllowEmptyCollection()] - $PrincipalContextCache, - - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [System.Collections.ArrayList] - [AllowEmptyCollection()] - $Disposables, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - # The scope of the the object name when in the form of scope\name, UPN, or DN - $scope, $identityValue = Split-MemberName -MemberName $MemberName - - if (Test-IsLocalMachine -Scope $scope) - { - # If local machine qualified, get the PrincipalContext for the local machine - Write-Verbose -Message ($script:localizedData.ResolvingLocalAccount -f $identityValue) - } - elseif ($null -ne $Credential) - { - # The account is domain qualified - a credential is provided to resolve it. - Write-Verbose -Message ($script:localizedData.ResolvingDomainAccount -f $identityValue, $scope) - } - else - { - <# - The provided name is not scoped to the local machine and no credentials were provided. - If the object is a domain qualified name, we can try to resolve the user with domain - trust, if setup. When using domain trust, we use the object name to resolve. Object - name can be in different formats such as a domain qualified name, UPN, or a - distinguished name for the scope - #> - - Write-Verbose -Message ($script:localizedData.ResolvingDomainAccountWithTrust -f $MemberName) - $identityValue = $MemberName - } - - $principalContext = Get-PrincipalContext ` - -Scope $scope ` - -PrincipalContextCache $PrincipalContextCache ` - -Disposables $Disposables ` - -Credential $Credential - - try - { - $principal = Find-Principal -PrincipalContext $principalContext -IdentityValue $identityValue - } - catch [System.Runtime.InteropServices.COMException] - { - New-InvalidArgumentException -ArgumentName $MemberName ` - -Message ( $script:localizedData.UnableToResolveAccount -f $MemberName, $_.Exception.Message, $_.Exception.HResult ) - } - - if ($null -eq $principal) - { - New-InvalidArgumentException -ArgumentName $MemberName -Message ($script:localizedData.CouldNotFindPrincipal -f $MemberName) - } - - return $principal -} - -<# - .SYNOPSIS - Resolves a SID to a principal. - - .PARAMETER Sid - The security identifier to resolve to a Principal. - - .PARAMETER PrincipalContext - The PrincipalContext to use to resolve the Principal. - - .PARAMETER Scope - The scope of the PrincipalContext. -#> -function Resolve-SidToPrincipal -{ - [OutputType([System.DirectoryServices.AccountManagement.Principal])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [System.Security.Principal.SecurityIdentifier] - $Sid, - - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [System.DirectoryServices.AccountManagement.PrincipalContext] - $PrincipalContext, - - [Parameter(Mandatory = $true)] - [String] - $Scope - ) - - $principal = Find-Principal -PrincipalContext $PrincipalContext -IdentityValue $Sid.Value -IdentityType ([System.DirectoryServices.AccountManagement.IdentityType]::Sid) - - if ($null -eq $principal) - { - if (Test-IsLocalMachine -Scope $Scope) - { - New-InvalidArgumentException -ArgumentName 'Members, MembersToInclude, or MembersToExclude' -Message ($script:localizedData.CouldNotFindPrincipal -f $Sid.Value) - } - else - { - New-InvalidArgumentException -ArgumentName 'Members, MembersToInclude, MembersToExclude, or Credential' -Message ($script:localizedData.CouldNotFindPrincipal -f $Sid.Value) - } - } - - return $principal -} - -<# - .SYNOPSIS - Retrieves a PrincipalContext to use to resolve an object in the given scope. - - .PARAMETER Scope - The scope to retrieve the principal context for. - - .PARAMETER Credential - The network credential to use when explicit credentials are needed for the target domain. - - .PARAMETER PrincipalContextCache - A hashtable cache of PrincipalContext instances for each scope. - This is used to cache PrincipalContext instances for cases where it is used multiple times. - - .PARAMETER Disposables - The ArrayList of disposable objects to which to add any objects that need to be disposed. - - .NOTES - When a new PrincipalContext is created, it is added to the Disposables list - as well as the PrincipalContextCache. -#> -function Get-PrincipalContext -{ - [OutputType([System.DirectoryServices.AccountManagement.PrincipalContext])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Scope, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [Hashtable] - [AllowEmptyCollection()] - $PrincipalContextCache, - - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [System.Collections.ArrayList] - [AllowEmptyCollection()] - $Disposables - ) - - $principalContext = $null - - if (Test-IsLocalMachine -Scope $Scope) - { - # Check for a cached PrincipalContext for the local machine. - if ($PrincipalContextCache.ContainsKey($env:computerName)) - { - $principalContext = $PrincipalContextCache[$env:computerName] - } - else - { - # Create a PrincipalContext for the local machine - $principalContext = New-Object -TypeName 'System.DirectoryServices.AccountManagement.PrincipalContext' ` - -ArgumentList @( [System.DirectoryServices.AccountManagement.ContextType]::Machine ) - - # Cache the PrincipalContext for this scope for subsequent calls. - $null = $PrincipalContextCache.Add($env:computerName, $principalContext) - $null = $Disposables.Add($principalContext) - } - } - elseif ($PrincipalContextCache.ContainsKey($Scope)) - { - $principalContext = $PrincipalContextCache[$Scope] - } - elseif ($null -ne $Credential) - { - # Create a PrincipalContext targeting $Scope using the network credentials that were passed in. - $credentialDomain = $Credential.GetNetworkCredential().Domain - $credentialUserName = $Credential.GetNetworkCredential().UserName - if ($credentialDomain -ne [String]::Empty) - { - $principalContextName = "$credentialDomain\$credentialUserName" - } - else - { - $principalContextName = $credentialUserName - } - - $principalContext = New-Object -TypeName 'System.DirectoryServices.AccountManagement.PrincipalContext' ` - -ArgumentList @( [System.DirectoryServices.AccountManagement.ContextType]::Domain, $Scope, - $principalContextName, $Credential.GetNetworkCredential().Password ) - - # Cache the PrincipalContext for this scope for subsequent calls. - $null = $PrincipalContextCache.Add($Scope, $principalContext) - $null = $Disposables.Add($principalContext) - } - else - { - # Get a PrincipalContext for the current user in the target domain (even for local System account). - $principalContext = New-Object -TypeName 'System.DirectoryServices.AccountManagement.PrincipalContext' ` - -ArgumentList @( [System.DirectoryServices.AccountManagement.ContextType]::Domain, $Scope ) - - # Cache the PrincipalContext for this scope for subsequent calls. - $null = $PrincipalContextCache.Add($Scope, $principalContext) - $null = $Disposables.Add($principalContext) - } - - return $principalContext -} - -<# - .SYNOPSIS - Determines if a scope represents the current machine. - - .PARAMETER Scope - The scope to test. -#> -function Test-IsLocalMachine -{ - [OutputType([Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Scope - ) - - $localMachineScopes = @( '.', $env:computerName, 'localhost', '127.0.0.1', 'NT Authority', 'NT Service', 'BuiltIn' ) - - if ($localMachineScopes -icontains $Scope) - { - return $true - } - - <# - Determine if we have an ip address that matches an ip address on one of the network - adapters. This is likely overkill. Consider removing it. - #> - if ($Scope.Contains('.')) - { - $win32NetworkAdapterConfigurations = @( Get-CimInstance -ClassName 'Win32_NetworkAdapterConfiguration' ) - foreach ($win32NetworkAdapterConfiguration in $win32NetworkAdapterConfigurations) - { - if ($null -ne $win32NetworkAdapterConfiguration.IPAddress) - { - foreach ($ipAddress in $win32NetworkAdapterConfiguration.IPAddress) - { - if ($ipAddress -eq $Scope) - { - return $true - } - } - } - } - } - - return $false -} - -<# - .SYNOPSIS - Splits a member name into the scope and the account name. - - - .DESCRIPTION - The returned $scope is used to determine where to perform the resolution, the local machine - or a target domain. The returned $accountName is the name of the account to resolve. - - The following details the formats that are handled as well as how the values are - determined: - - Domain Qualified Names: (domainname\username) - - The value is split on the first '\' character with the left hand side returned as the scope - and the right hand side returned as the account name. - - UPN: (username@domainname) - - The value is split on the first '@' character with the left hand side returned as the - account name and the right hand side returned as the scope. - - Distinguished Name: - - The value at the first occurance of 'DC=' is used to extract the unqualified domain name. - The incoming string is returned, as is, for the account name. - - Unqualified Account Names: - - The incoming string is returned as the account name and the local machine name is returned - as the scope. Note that values that do not fall into the above categories are interpreted - as unqualified account names. - - .PARAMETER MemberName - The full name of the member to split. - - .NOTES - ConvertTo-Principal will fail if a machine name is specified as domainname\machinename. It - will succeed if the machine name is specified as the SAM name (domainname\machinename$) or - as the unqualified machine name. - - Split-MemberName splits the scope and account name to avoid this problem. -#> -function Split-MemberName -{ - [OutputType([System.String[]])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $MemberName - ) - - # Assume no scope is defined or $FullName is a DistinguishedName - $scope = $env:computerName - $accountName = $MemberName - - # Parse domain or machine qualified account name - $separatorIndex = $MemberName.IndexOf('\') - if ($separatorIndex -ne -1) - { - $scope = $MemberName.Substring(0, $separatorIndex) - - if (Test-IsLocalMachine -Scope $scope) - { - $scope = $env:computerName - } - - $accountName = $MemberName.Substring($separatorIndex + 1) - - return [System.String[]] @( $scope, $accountName ) - } - - # Parse UPN for the scope - $separatorIndex = $MemberName.IndexOf('@') - if ($separatorIndex -ne -1) - { - $scope = $MemberName.Substring($separatorIndex + 1) - $accountName = $MemberName.Substring(0, $separatorIndex) - - return [System.String[]] @( $scope, $accountName ) - } - - # Parse distinguished name for the scope - $distinguishedNamePrefix = 'DC=' - - $separatorIndex = $MemberName.IndexOf($distinguishedNamePrefix, [System.StringComparison]::OrdinalIgnoreCase) - if ($separatorIndex -ne -1) - { - <# - For member names in the distinguished name format, the account name returned should be - the entire distinguished name. - See the initialization of $accountName above. - #> - - $startScopeIndex = $separatorIndex + $distinguishedNamePrefix.Length - $endScopeIndex = $MemberName.IndexOf(',', $startScopeIndex) - - if ($endScopeIndex -gt $startScopeIndex) - { - $scopeLength = $endScopeIndex - $separatorIndex - $distinguishedNamePrefix.Length - $scope = $MemberName.Substring($startScopeIndex, $scopeLength) - - return [System.String[]] @( $scope, $accountName ) - } - } - - return [System.String[]] @( $scope, $accountName ) -} - -<# - .SYNOPSIS - Finds a principal by identity. - Wrapper function for testing. - - .PARAMETER PrincipalContext - The principal context to find the principal in. - - .PARAMETER IdentityValue - The identity value to find the principal by (e.g. username). - - .PARAMETER IdentityType - The identity type of the principal to find. -#> -function Find-Principal -{ - [OutputType([System.DirectoryServices.AccountManagement.Principal])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.DirectoryServices.AccountManagement.PrincipalContext] - $PrincipalContext, - - [Parameter(Mandatory = $true)] - [String] - $IdentityValue, - - [System.DirectoryServices.AccountManagement.IdentityType] - $IdentityType - ) - - if ($PSBoundParameters.ContainsKey('IdentityType')) - { - return [System.DirectoryServices.AccountManagement.Principal]::FindByIdentity($PrincipalContext, $IdentityType, $IdentityValue) - } - else - { - return [System.DirectoryServices.AccountManagement.Principal]::FindByIdentity($PrincipalContext, $IdentityValue) - } - -} - -<# - .SYNOPSIS - Retrieves a local Windows group. - - .PARAMETER GroupName - The name of the group to retrieve. - - .PARAMETER Disposables - The ArrayList of disposable objects to which to add any objects that need to be disposed. - - .PARAMETER PrincipalContextCache - A hashtable cache of PrincipalContext instances for each scope. - This is used to cache PrincipalContext instances for cases where it is used multiple times. - - .NOTES - The returned value is NOT added to the $disposables list because the caller may need to - call $group.Delete() which also disposes it. -#> -function Get-Group -{ - [OutputType([System.DirectoryServices.AccountManagement.GroupPrincipal])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $GroupName, - - [Parameter(Mandatory = $true)] - [System.DirectoryServices.AccountManagement.PrincipalContext] - $PrincipalContext - ) - - $principalContext = Get-PrincipalContext ` - -PrincipalContextCache $PrincipalContextCache ` - -Disposables $Disposables ` - -Scope $env:COMPUTERNAME - - try - { - $group = [System.DirectoryServices.AccountManagement.GroupPrincipal]::FindByIdentity($PrincipalContext, $GroupName) - } - catch - { - $group = $null - } - - return $group -} - -<# - .SYNOPSIS - Retrieves the members of a group from the underlying directory entry. - - .PARAMETER Group - The group to retrieve the members of. -#> -function Get-GroupMembersFromDirectoryEntry -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [System.DirectoryServices.AccountManagement.GroupPrincipal] - $Group - ) - - $groupDirectoryEntry = $Group.GetUnderlyingObject() - return $groupDirectoryEntry.Invoke('Members') -} - -<# - .SYNOPSIS - Clears the members of the specified group. - This is a wrapper function for testing purposes. - - .PARAMETER Group - The group to clear the members of. -#> -function Clear-GroupMembers -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [System.DirectoryServices.AccountManagement.GroupPrincipal] - $Group - ) - - $Group.Members.Clear() -} - -<# - .SYNOPSIS - Adds the specified member to the specified group. - This is a wrapper function for testing purposes. - - .PARAMETER Group - The group to add the member to. - - .PARAMETER MemberAsPrincipal - The member to add to the group as a principal. -#> -function Add-GroupMember -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [System.DirectoryServices.AccountManagement.GroupPrincipal] - $Group, - - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [System.DirectoryServices.AccountManagement.Principal] - $MemberAsPrincipal - ) - - $Group.Members.Add($MemberAsPrincipal) -} - -<# - .SYNOPSIS - Removes the specified member from the specified group. - This is a wrapper function for testing purposes. - - .PARAMETER Group - The group to remove the member from. - - .PARAMETER MemberAsPrincipal - The member to remove from the group as a principal. -#> -function Remove-GroupMember -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [System.DirectoryServices.AccountManagement.GroupPrincipal] - $Group, - - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [System.DirectoryServices.AccountManagement.Principal] - $MemberAsPrincipal - ) - - $Group.Members.Remove($MemberAsPrincipal) -} - -<# - .SYNOPSIS - Deletes the specified group. - This is a wrapper function for testing purposes. - - .PARAMETER Group - The group to delete. -#> -function Remove-Group -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [System.DirectoryServices.AccountManagement.GroupPrincipal] - $Group - ) - - $Group.Delete() -} - -<# - .SYNOPSIS - Saves the specified group. - This is a wrapper function for testing purposes. - - .PARAMETER Group - The group to save. -#> -function Save-Group -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [System.DirectoryServices.AccountManagement.GroupPrincipal] - $Group - ) - - $Group.Save() -} - -<# - .SYNOPSIS - Disposes of the contents of an array list containing IDisposable objects. - - .PARAMETER Disosables - The array list of IDisposable Objects to dispose of. -#> -function Remove-DisposableObject -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [System.Collections.ArrayList] - [AllowEmptyCollection()] - $Disposables - ) - - foreach ($disposable in $Disposables) - { - if ($disposable -is [System.IDisposable]) - { - $disposable.Dispose() - } - } -} diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xGroupResource/MSFT_xGroupResource.schema.mof b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xGroupResource/MSFT_xGroupResource.schema.mof deleted file mode 100644 index 7bb15eeb..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xGroupResource/MSFT_xGroupResource.schema.mof +++ /dev/null @@ -1,12 +0,0 @@ - -[ClassVersion("1.0.0"),FriendlyName("xGroup")] -class MSFT_xGroupResource : OMI_BaseResource -{ - [Key, Description("The name of the group to create, modify, or remove.")] String GroupName; - [Write, ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}, Description("Indicates if the group should exist or not.")] String Ensure; - [Write, Description("The description the group should have.")] String Description; - [Write, Description("The members the group should have.")] String Members[]; - [Write, Description("The members the group should include.")] String MembersToInclude[]; - [Write, Description("The members the group should exclude.")] String MembersToExclude[]; - [Write, EmbeddedInstance("MSFT_Credential"), Description("A credential to resolve non-local group members.")] String Credential; -}; diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xGroupResource/en-US/MSFT_xGroupResource.schema.mfl b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xGroupResource/en-US/MSFT_xGroupResource.schema.mfl deleted file mode 100644 index a9784482fc0f6c7b93239de11cca847fdc6be7a7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1694 zcmcgsO;5r=6r8h(|Do}ui5d@H)Dt2aA|HuzBZMFzlC*`igLT_I>Ll@kN@PaUBoEa$7Y=}vS&6A z9i9gK-(`jlvke&$@GN1REIR98V9`F$y4?A+41Vjx+zE$b9EyZKk;NoD4QW-ibK*SV z{+i!{)eP;thg0sWD51s<-EV_u9xAA#NLz(Aby>wT+PK68t}Iszhd3Z2pY>vXJoC6G z8|@SmPuA-y55iEVcbT5I7Tw3XmvVnt1&`iMJTl8WaqYeZF(yvM%PZFfFH6oA{OT_I z^iH^{ -function Get-TargetResource -{ - [OutputType([Hashtable])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ProductId, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path - ) - - $identifyingNumber = Convert-ProductIdToIdentifyingNumber -ProductId $ProductId - - $packageResourceResult = @{} - - $productEntry = Get-ProductEntry -IdentifyingNumber $identifyingNumber - - if ($null -eq $productEntry) - { - $packageResourceResult = @{ - Ensure = 'Absent' - ProductId = $identifyingNumber - } - - Write-Verbose -Message ($script:localizedData.GetTargetResourceNotFound -f $ProductId) - } - else - { - $packageResourceResult = Get-ProductEntryInfo -ProductEntry $productEntry - $packageResourceResult['ProductId'] = $identifyingNumber - $packageResourceResult['Ensure'] = 'Present' - - Write-Verbose -Message ($script:localizedData.GetTargetResourceFound -f $ProductId) - } - - return $packageResourceResult -} - -<# - .SYNOPSIS - Installs or uninstalls the MSI file at the given path. - - .PARAMETER ProductId - The identifying number used to find the package, usually a GUID. - - .PARAMETER Path - The path to the MSI file to install or uninstall. - - .PARAMETER Ensure - Indicates whether the given MSI file should be installed or uninstalled. - Set this property to Present to install the MSI, and Absent to uninstall - the MSI. - - .PARAMETER Arguments - The arguments to pass to the MSI package during installation or uninstallation - if needed. - - .PARAMETER Credential - The credential of a user account to be used to mount a UNC path if needed. - - .PARAMETER LogPath - The path to the log file to log the output from the MSI execution. - - .PARAMETER FileHash - The expected hash value of the MSI file at the given path. - - .PARAMETER HashAlgorithm - The algorithm used to generate the given hash value. - - .PARAMETER SignerSubject - The subject that should match the signer certificate of the digital signature of the MSI file. - - .PARAMETER SignerThumbprint - The certificate thumbprint that should match the signer certificate of the digital signature of the MSI file. - - .PARAMETER ServerCertificateValidationCallback - PowerShell code to be used to validate SSL certificates for paths using HTTPS. - - .PARAMETER RunAsCredential - The credential of a user account under which to run the installation or uninstallation of the MSI package. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ProductId, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [String] - $Arguments, - - [PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [String] - $LogPath, - - [String] - $FileHash, - - [ValidateSet('SHA1', 'SHA256', 'SHA384', 'SHA512', 'MD5', 'RIPEMD160')] - [String] - $HashAlgorithm = 'SHA256', - - [String] - $SignerSubject, - - [String] - $SignerThumbprint, - - [String] - $ServerCertificateValidationCallback, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $RunAsCredential - ) - - $uri = Convert-PathToUri -Path $Path - $identifyingNumber = Convert-ProductIdToIdentifyingNumber -ProductId $ProductId - - # Ensure that the actual file extension is checked if a query string is passed in - if ($null -ne $uri.LocalPath) - { - $uriLocalPath = (Split-Path -Path $uri.LocalPath -Leaf) - Assert-PathExtensionValid -Path $uriLocalPath - } - else - { - Assert-PathExtensionValid -Path $Path - } - - <# - Path gets overwritten in the download code path. Retain the user's original Path so as - to provide a more descriptive error message in case the install succeeds but the named - package can't be found on the system afterward. - #> - $originalPath = $Path - - Write-Verbose -Message $script:localizedData.PackageConfigurationStarting - - $psDrive = $null - $downloadedFileName = $null - - $exitCode = 0 - - try - { - if ($PSBoundParameters.ContainsKey('LogPath')) - { - New-LogFile -LogPath $LogPath - } - - # Download or mount file as necessary - if ($Ensure -eq 'Present') - { - $localPath = $Path - - if ($null -ne $uri.LocalPath) - { - $localPath = $uri.LocalPath - } - - if ($uri.IsUnc) - { - $psDriveArgs = @{ - Name = [Guid]::NewGuid() - PSProvider = 'FileSystem' - Root = Split-Path -Path $localPath - } - - if ($PSBoundParameters.ContainsKey('Credential')) - { - $psDriveArgs['Credential'] = $Credential - } - - $psDrive = New-PSDrive @psDriveArgs - $Path = Join-Path -Path $psDrive.Root -ChildPath (Split-Path -Path $localPath -Leaf) - } - elseif (@( 'http', 'https' ) -contains $uri.Scheme) - { - $outStream = $null - - try - { - if (-not (Test-Path -Path $script:packageCacheLocation -PathType 'Container')) - { - Write-Verbose -Message ($script:localizedData.CreatingCacheLocation) - $null = New-Item -Path $script:packageCacheLocation -ItemType 'Directory' - } - - $destinationPath = Join-Path -Path $script:packageCacheLocation -ChildPath (Split-Path -Path $localPath -Leaf) - - try - { - Write-Verbose -Message ($script:localizedData.CreatingTheDestinationCacheFile) - $outStream = New-Object -TypeName 'System.IO.FileStream' -ArgumentList @( $destinationPath, 'Create' ) - } - catch - { - # Should never happen since we own the cache directory - New-InvalidOperationException -Message ($script:localizedData.CouldNotOpenDestFile -f $destinationPath) -ErrorRecord $_ - } - - try - { - $responseStream = Get-WebRequestResponse -Uri $uri -ServerCertificateValidationCallback $ServerCertificateValidationCallback - - Copy-ResponseStreamToFileStream -ResponseStream $responseStream -FileStream $outStream - } - finally - { - if ($null -ne $responseStream) - { - Close-Stream -Stream $responseStream - } - } - } - finally - { - if ($null -ne $outStream) - { - Close-Stream -Stream $outStream - } - } - - Write-Verbose -Message ($script:localizedData.RedirectingPackagePathToCacheFileLocation) - $Path = $destinationPath - $downloadedFileName = $destinationPath - } - - # At this point the Path should be valid if this is an install case - if (-not (Test-Path -Path $Path -PathType 'Leaf')) - { - New-InvalidOperationException -Message ($script:localizedData.PathDoesNotExist -f $Path) - } - - Assert-FileValid -Path $Path -HashAlgorithm $HashAlgorithm -FileHash $FileHash -SignerSubject $SignerSubject -SignerThumbprint $SignerThumbprint - - # Check if the MSI package specifies the ProductCode, and if so make sure they match - $productCode = Get-MsiProductCode -Path $Path - - if ((-not [String]::IsNullOrEmpty($identifyingNumber)) -and ($identifyingNumber -ne $productCode)) - { - New-InvalidArgumentException -ArgumentName 'ProductId' -Message ($script:localizedData.InvalidId -f $identifyingNumber, $productCode) - } - } - - $exitCode = Start-MsiProcess -IdentifyingNumber $identifyingNumber -Path $Path -Ensure $Ensure -Arguments $Arguments -LogPath $LogPath -RunAsCredential $RunAsCredential - } - finally - { - if ($null -ne $psDrive) - { - $null = Remove-PSDrive -Name $psDrive -Force - } - } - - if ($null -ne $downloadedFileName) - { - <# - This is deliberately not in the finally block because we want to leave the downloaded - file on disk if an error occurred as a debugging aid for the user. - #> - $null = Remove-Item -Path $downloadedFileName - } - - <# - Check if a reboot is required, if so notify CA. The MSFT_ServerManagerTasks provider is - missing on some client SKUs (worked on both Server and Client Skus in Windows 10). - #> - $serverFeatureData = Invoke-CimMethod -Name 'GetServerFeature' ` - -Namespace 'root\microsoft\windows\servermanager' ` - -Class 'MSFT_ServerManagerTasks' ` - -Arguments @{ BatchSize = 256 } ` - -ErrorAction 'Ignore' - - $registryData = Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction 'Ignore' - - $rebootRequired = (($exitcode -eq 3010) -or ($exitcode -eq 1641) -or ($null -ne $registryData)) - - if (($serverFeatureData -and $serverFeatureData.RequiresReboot) -or $rebootRequired) - { - Write-Verbose $script:localizedData.MachineRequiresReboot - $global:DSCMachineStatus = 1 - } - elseif ($Ensure -eq 'Present') - { - $productEntry = Get-ProductEntry -IdentifyingNumber $identifyingNumber - - if ($null -eq $productEntry) - { - New-InvalidOperationException -Message ($script:localizedData.PostValidationError -f $originalPath) - } - } - - if ($Ensure -eq 'Present') - { - Write-Verbose -Message $script:localizedData.PackageInstalled - } - else - { - Write-Verbose -Message $script:localizedData.PackageUninstalled - } -} - -<# - .SYNOPSIS - Tests if the MSI file with the given product ID is installed or uninstalled. - - .PARAMETER ProductId - The identifying number used to find the package, usually a GUID. - - .PARAMETER Path - Not Used in Test-TargetResource - - .PARAMETER Ensure - Indicates whether the MSI file should be installed or uninstalled. - Set this property to Present if the MSI file should be installed. Set - this property to Absent if the MSI file should be uninstalled. - - .PARAMETER Arguments - Not Used in Test-TargetResource - - .PARAMETER Credential - Not Used in Test-TargetResource - - .PARAMETER LogPath - Not Used in Test-TargetResource - - .PARAMETER FileHash - Not Used in Test-TargetResource - - .PARAMETER HashAlgorithm - Not Used in Test-TargetResource - - .PARAMETER SignerSubject - Not Used in Test-TargetResource - - .PARAMETER SignerThumbprint - Not Used in Test-TargetResource - - .PARAMETER ServerCertificateValidationCallback - Not Used in Test-TargetResource - - .PARAMETER RunAsCredential - Not Used in Test-TargetResource -#> -function Test-TargetResource -{ - [OutputType([Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ProductId, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [String] - $Arguments, - - [PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [String] - $LogPath, - - [String] - $FileHash, - - [ValidateSet('SHA1', 'SHA256', 'SHA384', 'SHA512', 'MD5', 'RIPEMD160')] - [String] - $HashAlgorithm = 'SHA256', - - [String] - $SignerSubject, - - [String] - $SignerThumbprint, - - [String] - $ServerCertificateValidationCallback, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $RunAsCredential - ) - - $identifyingNumber = Convert-ProductIdToIdentifyingNumber -ProductId $ProductId - - $productEntry = Get-ProductEntry -IdentifyingNumber $identifyingNumber - - if ($null -ne $productEntry) - { - $displayName = Get-ProductEntryValue -ProductEntry $productEntry -Property 'DisplayName' - Write-Verbose -Message ($script:localizedData.PackageAppearsInstalled -f $displayName) - } - else - { - Write-Verbose -Message ($script:localizedData.PackageDoesNotAppearInstalled -f $ProductId) - } - - return (($null -ne $productEntry -and $Ensure -eq 'Present') -or ($null -eq $productEntry -and $Ensure -eq 'Absent')) -} - -<# - .SYNOPSIS - Asserts that the path extension is '.msi' - - .PARAMETER Path - The path to the file to validate the extension of. -#> -function Assert-PathExtensionValid -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path - ) - - $pathExtension = [System.IO.Path]::GetExtension($Path) - Write-Verbose -Message ($script:localizedData.ThePathExtensionWasPathExt -f $pathExtension) - - if ($pathExtension.ToLower() -ne '.msi') - { - New-InvalidArgumentException -ArgumentName 'Path' -Message ($script:localizedData.InvalidBinaryType -f $Path) - } -} - -<# - .SYNOPSIS - Converts the given path to a URI and returns the URI object. - Throws an exception if the path's scheme as a URI is not valid. - - .PARAMETER Path - The path to the file to retrieve as a URI. -#> -function Convert-PathToUri -{ - [OutputType([Uri])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path - ) - - try - { - $uri = [Uri]$Path - } - catch - { - New-InvalidArgumentException -ArgumentName 'Path' -Message ($script:localizedData.InvalidPath -f $Path) - } - - $validUriSchemes = @( 'file', 'http', 'https' ) - - if ($validUriSchemes -notcontains $uri.Scheme) - { - Write-Verbose -Message ($script:localizedData.TheUriSchemeWasUriScheme -f $uri.Scheme) - New-InvalidArgumentException -ArgumentName 'Path' -Message ($script:localizedData.InvalidPath -f $Path) - } - - return $uri -} - -<# - .SYNOPSIS - Converts the product ID to the identifying number format. - - .PARAMETER ProductId - The product ID to convert to an identifying number. -#> -function Convert-ProductIdToIdentifyingNumber -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ProductId - ) - - try - { - Write-Verbose -Message ($script:localizedData.ParsingProductIdAsAnIdentifyingNumber -f $ProductId) - $identifyingNumber = '{{{0}}}' -f [Guid]::Parse($ProductId).ToString().ToUpper() - - Write-Verbose -Message ($script:localizedData.ParsedProductIdAsIdentifyingNumber -f $ProductId, $identifyingNumber) - return $identifyingNumber - } - catch - { - New-InvalidArgumentException -ArgumentName 'ProductId' -Message ($script:localizedData.InvalidIdentifyingNumber -f $ProductId) - } -} - - -<# - .SYNOPSIS - Retrieves the product entry for the package with the given identifying number. - - .PARAMETER IdentifyingNumber - The identifying number of the product entry to retrieve. -#> -function Get-ProductEntry -{ - [OutputType([Microsoft.Win32.RegistryKey])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] - $IdentifyingNumber - ) - - $uninstallRegistryKey = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall' - $uninstallRegistryKeyWow64 = 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall' - - $productEntry = $null - - if (-not [String]::IsNullOrEmpty($IdentifyingNumber)) - { - $productEntryKeyLocation = Join-Path -Path $uninstallRegistryKey -ChildPath $IdentifyingNumber - $productEntry = Get-Item -Path $productEntryKeyLocation -ErrorAction 'SilentlyContinue' - - if ($null -eq $productEntry) - { - $productEntryKeyLocation = Join-Path -Path $uninstallRegistryKeyWow64 -ChildPath $IdentifyingNumber - $productEntry = Get-Item $productEntryKeyLocation -ErrorAction 'SilentlyContinue' - } - } - - return $productEntry -} - -<# - .SYNOPSIS - Retrieves the information for the given product entry and returns it as a hashtable. - - .PARAMETER ProductEntry - The product entry to retrieve the information for. -#> -function Get-ProductEntryInfo -{ - [OutputType([Hashtable])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [Microsoft.Win32.RegistryKey] - $ProductEntry - ) - - $installDate = Get-ProductEntryValue -ProductEntry $ProductEntry -Property 'InstallDate' - - if ($null -ne $installDate) - { - try - { - $installDate = '{0:d}' -f [DateTime]::ParseExact($installDate, 'yyyyMMdd',[System.Globalization.CultureInfo]::CurrentCulture).Date - } - catch - { - $installDate = $null - } - } - - $publisher = Get-ProductEntryValue -ProductEntry $ProductEntry -Property 'Publisher' - - $estimatedSizeInKB = Get-ProductEntryValue -ProductEntry $ProductEntry -Property 'EstimatedSize' - - if ($null -ne $estimatedSizeInKB) - { - $estimatedSizeInMB = $estimatedSizeInKB / 1024 - } - - $displayVersion = Get-ProductEntryValue -ProductEntry $ProductEntry -Property 'DisplayVersion' - - $comments = Get-ProductEntryValue -ProductEntry $ProductEntry -Property 'Comments' - - $displayName = Get-ProductEntryValue -ProductEntry $ProductEntry -Property 'DisplayName' - - $installSource = Get-ProductEntryValue -ProductEntry $ProductEntry -Property 'InstallSource' - - return @{ - Name = $displayName - InstallSource = $installSource - InstalledOn = $installDate - Size = $estimatedSizeInMB - Version = $displayVersion - PackageDescription = $comments - Publisher = $publisher - } -} - -<# - .SYNOPSIS - Retrieves the value of the given property for the given product entry. - This is a wrapper for unit testing. - - .PARAMETER ProductEntry - The product entry object to retrieve the property value from. - - .PARAMETER Property - The property to retrieve the value of from the product entry. -#> -function Get-ProductEntryValue -{ - [OutputType([Object])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [Microsoft.Win32.RegistryKey] - $ProductEntry, - - [Parameter(Mandatory = $true)] - [String] - $Property - ) - - return $ProductEntry.GetValue($Property) -} - -<# - .SYNOPSIS - Removes the file at the given path if it exists and creates a new file - to be written to. - - .PARAMETER LogPath - The path where the log file should be created. -#> -function New-LogFile -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] - $LogPath - ) - - try - { - <# - Pre-verify the log path exists and is writable ahead of time so the user won't - have to detect why the MSI log path doesn't exist. - #> - if (Test-Path -Path $LogPath) - { - $null = Remove-Item -Path $LogPath - } - - $null = New-Item -Path $LogPath -Type 'File' - } - catch - { - New-InvalidOperationException -Message ($script:localizedData.CouldNotOpenLog -f $LogPath) -ErrorRecord $_ - } -} - -<# - .SYNOPSIS - Retrieves the WebRequest response as a stream for the MSI file with the given URI. - - .PARAMETER Uri - The Uri to retrieve the WebRequest from. - - .PARAMETER ServerCertificationValidationCallback - The callback code to validate the SSL certificate for HTTPS URI schemes. -#> -function Get-WebRequestResponse -{ - [OutputType([System.IO.Stream])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [Uri] - $Uri, - - [String] - $ServerCertificateValidationCallback - ) - - try - { - $uriScheme = $Uri.Scheme - - Write-Verbose -Message ($script:localizedData.CreatingTheSchemeStream -f $uriScheme) - $webRequest = Get-WebRequest -Uri $Uri - - Write-Verbose -Message ($script:localizedData.SettingDefaultCredential) - $webRequest.Credentials = [System.Net.CredentialCache]::DefaultCredentials - $webRequest.AuthenticationLevel = [System.Net.Security.AuthenticationLevel]::None - - if ($uriScheme -eq 'http') - { - # Default value is MutualAuthRequested, which applies to the https scheme - Write-Verbose -Message ($script:localizedData.SettingAuthenticationLevel) - $webRequest.AuthenticationLevel = [System.Net.Security.AuthenticationLevel]::None - } - elseif ($uriScheme -eq 'https' -and -not [String]::IsNullOrEmpty($ServerCertificateValidationCallback)) - { - Write-Verbose -Message $script:localizedData.SettingCertificateValidationCallback - $webRequest.ServerCertificateValidationCallBack = (Get-ScriptBlock -FunctionName $ServerCertificateValidationCallback) - } - - Write-Verbose -Message ($script:localizedData.GettingTheSchemeResponseStream -f $uriScheme) - $responseStream = Get-WebRequestResponseStream -WebRequest $webRequest - - return $responseStream - } - catch - { - New-InvalidOperationException -Message ($script:localizedData.CouldNotGetResponseFromWebRequest -f $uriScheme, $Uri.OriginalString) -ErrorRecord $_ - } -} - -<# - .SYNOPSIS - Creates a WebRequst object based on the given Uri and returns it. - This is a wrapper for unit testing - - .PARAMETER Uri - The URI object to create the WebRequest from -#> -function Get-WebRequest -{ - [OutputType([System.Net.WebRequest])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [Uri] - $Uri - ) - - return [System.Net.WebRequest]::Create($Uri) -} - -<# - .SYNOPSIS - Retrieves the response stream from the given WebRequest object. - This is a wrapper for unit testing. - - .PARAMETER WebRequest - The WebRequest object to retrieve the response stream from. -#> -function Get-WebRequestResponseStream -{ - [OutputType([System.IO.Stream])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.Net.WebRequest] - $WebRequest - ) - - return (([System.Net.HttpWebRequest]$WebRequest).GetResponse()).GetResponseStream() -} - -<# - .SYNOPSIS - Converts the given function into a script block and returns it. - This is a wrapper for unit testing - - .PARAMETER Function - The name of the function to convert to a script block -#> -function Get-ScriptBlock -{ - [OutputType([ScriptBlock])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] - $FunctionName - ) - - return [ScriptBlock]::Create($FunctionName) -} - -<# - .SYNOPSIS - Copies the given response stream to the given file stream. - - .PARAMETER ResponseStream - The response stream to copy over. - - .PARAMETER FileStream - The file stream to copy to. -#> -function Copy-ResponseStreamToFileStream -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.IO.Stream] - $ResponseStream, - - [Parameter(Mandatory = $true)] - [System.IO.Stream] - $FileStream - ) - - try - { - Write-Verbose -Message ($script:localizedData.CopyingTheSchemeStreamBytesToTheDiskCache) - $null = $ResponseStream.CopyTo($FileStream) - $null = $ResponseStream.Flush() - $null = $FileStream.Flush() - } - catch - { - New-InvalidOperationException -Message ($script:localizedData.ErrorCopyingDataToFile) -ErrorRecord $_ - } -} - -<# - .SYNOPSIS - Closes the given stream. - Wrapper function for unit testing. - - .PARAMETER Stream - The stream to close. -#> -function Close-Stream -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.IO.Stream] - $Stream - ) - - $null = $Stream.Close() -} - -<# - .SYNOPSIS - Asserts that the file at the given path has a valid hash, signer thumbprint, and/or - signer subject. If only Path is provided, then this function will never throw. - If FileHash is provided and HashAlgorithm is not, then Sha-256 will be used as the hash - algorithm by default. - - .PARAMETER Path - The path to the file to check. - - .PARAMETER FileHash - The hash that should match the hash of the file. - - .PARAMETER HashAlgorithm - The algorithm to use to retrieve the file hash. - - .PARAMETER SignerThumbprint - The certificate thumbprint that should match the file's signer certificate. - - .PARAMETER SignerSubject - The certificate subject that should match the file's signer certificate. -#> -function Assert-FileValid -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] - $Path, - - [String] - $FileHash, - - [String] - $HashAlgorithm = 'SHA256', - - [String] - $SignerThumbprint, - - [String] - $SignerSubject - ) - - if (-not [String]::IsNullOrEmpty($FileHash)) - { - Assert-FileHashValid -Path $Path -Hash $FileHash -Algorithm $HashAlgorithm - } - - if (-not [String]::IsNullOrEmpty($SignerThumbprint) -or -not [String]::IsNullOrEmpty($SignerSubject)) - { - Assert-FileSignatureValid -Path $Path -Thumbprint $SignerThumbprint -Subject $SignerSubject - } -} - -<# - .SYNOPSIS - Asserts that the hash of the file at the given path matches the given hash. - - .PARAMETER Path - The path to the file to check the hash of. - - .PARAMETER Hash - The hash to check against. - - .PARAMETER Algorithm - The algorithm to use to retrieve the file's hash. - Default is 'Sha256' -#> -function Assert-FileHashValid -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] - $Path, - - [Parameter(Mandatory = $true)] - [String] - $Hash, - - [String] - $Algorithm = 'SHA256' - ) - - Write-Verbose -Message ($script:localizedData.CheckingFileHash -f $Path, $Hash, $Algorithm) - - $fileHash = Get-FileHash -LiteralPath $Path -Algorithm $Algorithm - - if ($fileHash.Hash -ne $Hash) - { - New-InvalidArgumentException -ArgumentName 'FileHash' -Message ($script:localizedData.InvalidFileHash -f $Path, $Hash, $Algorithm) - } -} - -<# - .SYNOPSIS - Asserts that the signature of the file at the given path is valid. - - .PARAMETER Path - The path to the file to check the signature of - - .PARAMETER Thumbprint - The certificate thumbprint that should match the file's signer certificate. - - .PARAMETER Subject - The certificate subject that should match the file's signer certificate. -#> -function Assert-FileSignatureValid -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] - $Path, - - [String] - $Thumbprint, - - [String] - $Subject - ) - - Write-Verbose -Message ($script:localizedData.CheckingFileSignature -f $Path) - - $signature = Get-AuthenticodeSignature -LiteralPath $Path - - if ($signature.Status -ne [System.Management.Automation.SignatureStatus]::Valid) - { - New-InvalidArgumentException -ArgumentName 'Path' -Message ($script:localizedData.InvalidFileSignature -f $Path, $signature.Status) - } - else - { - Write-Verbose -Message ($script:localizedData.FileHasValidSignature -f $Path, $signature.SignerCertificate.Thumbprint, $signature.SignerCertificate.Subject) - } - - if (-not [String]::IsNullOrEmpty($Subject) -and ($signature.SignerCertificate.Subject -notlike $Subject)) - { - New-InvalidArgumentException -ArgumentName 'SignerSubject' -Message ($script:localizedData.WrongSignerSubject -f $Path, $Subject) - } - - if (-not [String]::IsNullOrEmpty($Thumbprint) -and ($signature.SignerCertificate.Thumbprint -ne $Thumbprint)) - { - New-InvalidArgumentException -ArgumentName 'SignerThumbprint' -Message ($script:localizedData.WrongSignerThumbprint -f $Path, $Thumbprint) - } -} - -<# - .SYNOPSIS - Starts the given MSI installation or uninstallation either as a process or - under a user credential if RunAsCredential is specified. - - .PARAMETER IdentifyingNumber - The identifying number used to find the package. - - .PARAMETER Path - The path to the MSI file to install or uninstall. - - .PARAMETER Ensure - Indicates whether the given MSI file should be installed or uninstalled. - - .PARAMETER Arguments - The arguments to pass to the MSI package. - - .PARAMETER LogPath - The path to the log file to log the output from the MSI execution. - - .PARAMETER RunAsCredential - The credential of a user account under which to run the installation or uninstallation. -#> -function Start-MsiProcess -{ - [OutputType([Int32])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $IdentifyingNumber, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [String] - $Arguments, - - [String] - $LogPath, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $RunAsCredential - ) - - $startInfo = New-Object -TypeName 'System.Diagnostics.ProcessStartInfo' - - # Necessary for I/O redirection - $startInfo.UseShellExecute = $false - - $startInfo.FileName = "$env:winDir\system32\msiexec.exe" - - if ($Ensure -eq 'Present') - { - $startInfo.Arguments = '/i "{0}"' -f $Path - } - # Ensure -eq 'Absent' - else - { - $productEntry = Get-ProductEntry -IdentifyingNumber $identifyingNumber - - $id = Split-Path -Path $productEntry.Name -Leaf - $startInfo.Arguments = ('/x{0}' -f $id) - } - - if (-not [String]::IsNullOrEmpty($LogPath)) - { - $startInfo.Arguments += (' /log "{0}"' -f $LogPath) - } - - $startInfo.Arguments += ' /quiet /norestart' - - if (-not [String]::IsNullOrEmpty($Arguments)) - { - # Append any specified arguments with a space - $startInfo.Arguments += (' {0}' -f $Arguments) - } - - Write-Verbose -Message ($script:localizedData.StartingWithStartInfoFileNameStartInfoArguments -f $startInfo.FileName, $startInfo.Arguments) - - $exitCode = 0 - - try - { - if (-not [String]::IsNullOrEmpty($RunAsCredential)) - { - $commandLine = ('"{0}" {1}' -f $startInfo.FileName, $startInfo.Arguments) - $exitCode = Invoke-PInvoke -CommandLine $commandLine -RunAsCredential $RunAsCredential - } - else - { - $process = New-Object -TypeName 'System.Diagnostics.Process' - $process.StartInfo = $startInfo - $exitCode = Invoke-Process -Process $process - } - } - catch - { - New-InvalidOperationException -Message ($script:localizedData.CouldNotStartProcess -f $Path) -ErrorRecord $_ - } - - return $exitCode -} - -<# - .SYNOPSIS - Runs a process as the specified user via PInvoke. Returns the exitCode that - PInvoke returns. - - .PARAMETER CommandLine - The command line (including arguments) of the process to start. - - .PARAMETER RunAsCredential - The user credential to start the process as. -#> -function Invoke-PInvoke -{ - [OutputType([System.Int32])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] - $CommandLine, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $RunAsCredential - ) - - Register-PInvoke - [System.Int32] $exitCode = 0 - - $null = [Source.NativeMethods]::CreateProcessAsUser($CommandLine, ` - $RunAsCredential.GetNetworkCredential().Domain, ` - $RunAsCredential.GetNetworkCredential().UserName, ` - $RunAsCredential.GetNetworkCredential().Password, ` - [ref] $exitCode - ) - - return $exitCode -} - -<# - .SYNOPSIS - Starts and waits for a process. - - .PARAMETER Process - The System.Diagnositics.Process object to start. -#> -function Invoke-Process -{ - [OutputType([System.Int32])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.Diagnostics.Process] - $Process - ) - - $null = $Process.Start() - - $null = $Process.WaitForExit() - return $Process.ExitCode -} - -<# - .SYNOPSIS - Retrieves product code from the MSI at the given path. - - .PARAMETER Path - The path to the MSI to retrieve the product code from. -#> -function Get-MsiProductCode -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path - ) - - $msiTools = Get-MsiTool - - $productCode = $msiTools::GetProductCode($Path) - - return $productCode -} - -<# - .SYNOPSIS - Retrieves the MSI tools type. -#> -function Get-MsiTool -{ - [OutputType([System.Type])] - [CmdletBinding()] - param () - - # Check if the variable is already defined - if ($null -ne $script:msiTools) - { - return $script:msiTools - } - - $msiToolsCodeDefinition = @' - [DllImport("msi.dll", CharSet = CharSet.Unicode, PreserveSig = true, SetLastError = true, ExactSpelling = true)] - private static extern UInt32 MsiOpenPackageExW(string szPackagePath, int dwOptions, out IntPtr hProduct); - [DllImport("msi.dll", CharSet = CharSet.Unicode, PreserveSig = true, SetLastError = true, ExactSpelling = true)] - private static extern uint MsiCloseHandle(IntPtr hAny); - [DllImport("msi.dll", CharSet = CharSet.Unicode, PreserveSig = true, SetLastError = true, ExactSpelling = true)] - private static extern uint MsiGetPropertyW(IntPtr hAny, string name, StringBuilder buffer, ref int bufferLength); - private static string GetPackageProperty(string msi, string property) - { - IntPtr MsiHandle = IntPtr.Zero; - try - { - var res = MsiOpenPackageExW(msi, 1, out MsiHandle); - if (res != 0) - { - return null; - } - int length = 256; - var buffer = new StringBuilder(length); - res = MsiGetPropertyW(MsiHandle, property, buffer, ref length); - return buffer.ToString(); - } - finally - { - if (MsiHandle != IntPtr.Zero) - { - MsiCloseHandle(MsiHandle); - } - } - } - public static string GetProductCode(string msi) - { - return GetPackageProperty(msi, "ProductCode"); - } - public static string GetProductName(string msi) - { - return GetPackageProperty(msi, "ProductName"); - } -'@ - - # Check if the the type is already defined - if (([System.Management.Automation.PSTypeName]'Microsoft.Windows.DesiredStateConfiguration.xPackageResource.MsiTools').Type) - { - $script:msiTools = ([System.Management.Automation.PSTypeName]'Microsoft.Windows.DesiredStateConfiguration.xPackageResource.MsiTools').Type - } - else - { - $script:msiTools = Add-Type ` - -Namespace 'Microsoft.Windows.DesiredStateConfiguration.xPackageResource' ` - -Name 'MsiTools' ` - -Using 'System.Text' ` - -MemberDefinition $msiToolsCodeDefinition ` - -PassThru - } - - return $script:msiTools -} - -<# - .SYNOPSIS - Registers PInvoke to run a process as a user. -#> -function Register-PInvoke -{ - [CmdletBinding()] - param () - - $programSource = @' - using System; - using System.Collections.Generic; - using System.Text; - using System.Security; - using System.Runtime.InteropServices; - using System.Diagnostics; - using System.Security.Principal; - using System.ComponentModel; - using System.IO; - namespace Source - { - [SuppressUnmanagedCodeSecurity] - public static class NativeMethods - { - //The following structs and enums are used by the various Win32 API's that are used in the code below - [StructLayout(LayoutKind.Sequential)] - public struct STARTUPINFO - { - public Int32 cb; - public string lpReserved; - public string lpDesktop; - public string lpTitle; - public Int32 dwX; - public Int32 dwY; - public Int32 dwXSize; - public Int32 dwXCountChars; - public Int32 dwYCountChars; - public Int32 dwFillAttribute; - public Int32 dwFlags; - public Int16 wShowWindow; - public Int16 cbReserved2; - public IntPtr lpReserved2; - public IntPtr hStdInput; - public IntPtr hStdOutput; - public IntPtr hStdError; - } - [StructLayout(LayoutKind.Sequential)] - public struct PROCESS_INFORMATION - { - public IntPtr hProcess; - public IntPtr hThread; - public Int32 dwProcessID; - public Int32 dwThreadID; - } - [Flags] - public enum LogonType - { - LOGON32_LOGON_INTERACTIVE = 2, - LOGON32_LOGON_NETWORK = 3, - LOGON32_LOGON_BATCH = 4, - LOGON32_LOGON_SERVICE = 5, - LOGON32_LOGON_UNLOCK = 7, - LOGON32_LOGON_NETWORK_CLEARTEXT = 8, - LOGON32_LOGON_NEW_CREDENTIALS = 9 - } - [Flags] - public enum LogonProvider - { - LOGON32_PROVIDER_DEFAULT = 0, - LOGON32_PROVIDER_WINNT35, - LOGON32_PROVIDER_WINNT40, - LOGON32_PROVIDER_WINNT50 - } - [StructLayout(LayoutKind.Sequential)] - public struct SECURITY_ATTRIBUTES - { - public Int32 Length; - public IntPtr lpSecurityDescriptor; - public bool bInheritHandle; - } - public enum SECURITY_IMPERSONATION_LEVEL - { - SecurityAnonymous, - SecurityIdentification, - SecurityImpersonation, - SecurityDelegation - } - public enum TOKEN_TYPE - { - TokenPrimary = 1, - TokenImpersonation - } - [StructLayout(LayoutKind.Sequential, Pack = 1)] - internal struct TokPriv1Luid - { - public int Count; - public long Luid; - public int Attr; - } - public const int GENERIC_ALL_ACCESS = 0x10000000; - public const int CREATE_NO_WINDOW = 0x08000000; - internal const int SE_PRIVILEGE_ENABLED = 0x00000002; - internal const int TOKEN_QUERY = 0x00000008; - internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; - internal const string SE_INCRASE_QUOTA = "SeIncreaseQuotaPrivilege"; - [DllImport("kernel32.dll", - EntryPoint = "CloseHandle", SetLastError = true, - CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] - public static extern bool CloseHandle(IntPtr handle); - [DllImport("advapi32.dll", - EntryPoint = "CreateProcessAsUser", SetLastError = true, - CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] - public static extern bool CreateProcessAsUser( - IntPtr hToken, - string lpApplicationName, - string lpCommandLine, - ref SECURITY_ATTRIBUTES lpProcessAttributes, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - bool bInheritHandle, - Int32 dwCreationFlags, - IntPtr lpEnvrionment, - string lpCurrentDirectory, - ref STARTUPINFO lpStartupInfo, - ref PROCESS_INFORMATION lpProcessInformation - ); - [DllImport("advapi32.dll", EntryPoint = "DuplicateTokenEx")] - public static extern bool DuplicateTokenEx( - IntPtr hExistingToken, - Int32 dwDesiredAccess, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - Int32 ImpersonationLevel, - Int32 dwTokenType, - ref IntPtr phNewToken - ); - [DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)] - public static extern Boolean LogonUser( - String lpszUserName, - String lpszDomain, - String lpszPassword, - LogonType dwLogonType, - LogonProvider dwLogonProvider, - out IntPtr phToken - ); - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern bool AdjustTokenPrivileges( - IntPtr htok, - bool disall, - ref TokPriv1Luid newst, - int len, - IntPtr prev, - IntPtr relen - ); - [DllImport("kernel32.dll", ExactSpelling = true)] - internal static extern IntPtr GetCurrentProcess(); - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern bool OpenProcessToken( - IntPtr h, - int acc, - ref IntPtr phtok - ); - [DllImport("kernel32.dll", ExactSpelling = true)] - internal static extern int WaitForSingleObject( - IntPtr h, - int milliseconds - ); - [DllImport("kernel32.dll", ExactSpelling = true)] - internal static extern bool GetExitCodeProcess( - IntPtr h, - out int exitcode - ); - [DllImport("advapi32.dll", SetLastError = true)] - internal static extern bool LookupPrivilegeValue( - string host, - string name, - ref long pluid - ); - public static void CreateProcessAsUser(string strCommand, string strDomain, string strName, string strPassword, ref int ExitCode ) - { - var hToken = IntPtr.Zero; - var hDupedToken = IntPtr.Zero; - TokPriv1Luid tp; - var pi = new PROCESS_INFORMATION(); - var sa = new SECURITY_ATTRIBUTES(); - sa.Length = Marshal.SizeOf(sa); - Boolean bResult = false; - try - { - bResult = LogonUser( - strName, - strDomain, - strPassword, - LogonType.LOGON32_LOGON_BATCH, - LogonProvider.LOGON32_PROVIDER_DEFAULT, - out hToken - ); - if (!bResult) - { - throw new Win32Exception("Logon error #" + Marshal.GetLastWin32Error().ToString()); - } - IntPtr hproc = GetCurrentProcess(); - IntPtr htok = IntPtr.Zero; - bResult = OpenProcessToken( - hproc, - TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, - ref htok - ); - if(!bResult) - { - throw new Win32Exception("Open process token error #" + Marshal.GetLastWin32Error().ToString()); - } - tp.Count = 1; - tp.Luid = 0; - tp.Attr = SE_PRIVILEGE_ENABLED; - bResult = LookupPrivilegeValue( - null, - SE_INCRASE_QUOTA, - ref tp.Luid - ); - if(!bResult) - { - throw new Win32Exception("Lookup privilege error #" + Marshal.GetLastWin32Error().ToString()); - } - bResult = AdjustTokenPrivileges( - htok, - false, - ref tp, - 0, - IntPtr.Zero, - IntPtr.Zero - ); - if(!bResult) - { - throw new Win32Exception("Token elevation error #" + Marshal.GetLastWin32Error().ToString()); - } - bResult = DuplicateTokenEx( - hToken, - GENERIC_ALL_ACCESS, - ref sa, - (int)SECURITY_IMPERSONATION_LEVEL.SecurityIdentification, - (int)TOKEN_TYPE.TokenPrimary, - ref hDupedToken - ); - if(!bResult) - { - throw new Win32Exception("Duplicate Token error #" + Marshal.GetLastWin32Error().ToString()); - } - var si = new STARTUPINFO(); - si.cb = Marshal.SizeOf(si); - si.lpDesktop = ""; - bResult = CreateProcessAsUser( - hDupedToken, - null, - strCommand, - ref sa, - ref sa, - false, - 0, - IntPtr.Zero, - null, - ref si, - ref pi - ); - if(!bResult) - { - throw new Win32Exception("Create process as user error #" + Marshal.GetLastWin32Error().ToString()); - } - int status = WaitForSingleObject(pi.hProcess, -1); - if(status == -1) - { - throw new Win32Exception("Wait during create process failed user error #" + Marshal.GetLastWin32Error().ToString()); - } - bResult = GetExitCodeProcess(pi.hProcess, out ExitCode); - if(!bResult) - { - throw new Win32Exception("Retrieving status error #" + Marshal.GetLastWin32Error().ToString()); - } - } - finally - { - if (pi.hThread != IntPtr.Zero) - { - CloseHandle(pi.hThread); - } - if (pi.hProcess != IntPtr.Zero) - { - CloseHandle(pi.hProcess); - } - if (hDupedToken != IntPtr.Zero) - { - CloseHandle(hDupedToken); - } - } - } - } - } -'@ - $null = Add-Type -TypeDefinition $programSource -ReferencedAssemblies 'System.ServiceProcess' -} diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xMsiPackage/MSFT_xMsiPackage.schema.mof b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xMsiPackage/MSFT_xMsiPackage.schema.mof deleted file mode 100644 index 314ba8fd..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xMsiPackage/MSFT_xMsiPackage.schema.mof +++ /dev/null @@ -1,23 +0,0 @@ -[ClassVersion("1.0.0"),FriendlyName("xMsiPackage")] -class MSFT_xMsiPackage : OMI_BaseResource -{ - [Key, Description("The identifying number used to find the package, usually a GUID.")] String ProductId; - [Required, Description("The path to the MSI file that should be installed or uninstalled.")] String Path; - [Write, Description("Specifies whether or not the MSI file should be installed or uninstalled."), ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}] String Ensure; - [Write, Description("The arguments to be passed to the MSI package during installation or uninstallation.")] String Arguments; - [Write, Description("The credential of a user account to be used to mount a UNC path if needed."), EmbeddedInstance("MSFT_Credential")] String Credential; - [Write, Description("The path to the log file to log the output from the MSI execution.")] String LogPath; - [Write, Description("The expected hash value of the MSI file at the given path.")] String FileHash; - [Write, Description("The algorithm used to generate the given hash value."), ValueMap{"SHA1", "SHA256", "SHA384", "SHA512", "MD5", "RIPEMD160"}, Values{"SHA1", "SHA256", "SHA384", "SHA512", "MD5", "RIPEMD160"}] String HashAlgorithm; - [Write, Description("The subject that should match the signer certificate of the digital signature of the MSI file.")] String SignerSubject; - [Write, Description("The certificate thumbprint that should match the signer certificate of the digital signature of the MSI file.")] String SignerThumbprint; - [Write, Description("PowerShell code that should be used to validate SSL certificates for paths using HTTPS.")] String ServerCertificateValidationCallback; - [Write, Description("The credential of a user account under which to run the installation or uninstallation of the MSI package."), EmbeddedInstance("MSFT_Credential")] String RunAsCredential; - [Read, Description("The display name of the MSI package.")] String Name; - [Read, Description("The path to the MSI package.")] String InstallSource; - [Read, Description("The date that the MSI package was installed on or serviced on, whichever is later.")] String InstalledOn; - [Read, Description("The size of the MSI package in MB.")] UInt32 Size; - [Read, Description("The version number of the MSI package.")] String Version; - [Read, Description("The description of the MSI package.")] String PackageDescription; - [Read, Description("The publisher of the MSI package.")] String Publisher; -}; diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xMsiPackage/en-US/MSFT_xMsiPackage.schema.mfl b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xMsiPackage/en-US/MSFT_xMsiPackage.schema.mfl deleted file mode 100644 index 79cf61d24e274f2c05fa4abd0461103be74c4768..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4568 zcmc(jNpBND5QXcE#D5rZ3Q~j+n*^Lp5=2BoEbPDmp~#7s7`!odSjArl-q$tFcn#B_ z2q9;d?yi3I>Q!|OKYzTjUF+D?&MddSO>CyWV;k9)-LR&eYb>+RcBmPBt6NL+-s^8K zywAhRv0Z5GS$NaeyiCtiJ+*Z=lda5#S~2>)>d+dtueV)U90UuuwAW3&d8A)WvpbsI z4i>icd}w?2LMZ*(v~A5gup`^i*n!4Cip>+dXSeNPu=Q4RuG=-C8ff2XK*gM=^66xw zKkR=bTl<>xB&_S$%Yd--5v$*V?M$=Z*mI445vD)0*bhF90>fRc>C4NWY>dR$&`xD1 z*V8h07aH%|2fgpemoJ*JYzLOl^%mwQLS05^6RWV(&?+MC80xwo3*UuS&*XpG9?$vs zXW!Tt6vXCOoE_*o4*nb~b~^tmG#y_6bi=^2h=1&J)c%utMcl;?v4A8RW}(>$f3 z;f2SfA9g2J^WK)()-7TNQgRM2JU62Et4iL|oUSakq~eKubA6rauA_QZJ^OanAWic% z=3n$~ATOvb5j#H3gpt3*1=MlO>v46o2f=n-USlB*XGgVnB6g@UuCR02naWO9=z}`9 zj4+-QoEaV+&KBZRdJ*wtVt-uZxu0a4PnXradMc|#?^%H=%{%nn)9&O1+zf@URG90I zlXIkB9{7tjhU@a)^Nifmcoxo>vVN3WZU}G9?$~{Mkf6HgV{HX>n%7jzQ+p?$h^j}# zYvwR`&pSGRnZ~{Td*!F2=oMUK8iNzEj%dd^y{rW4OHaR<>PUCBnrzpldfr+r9ZkXegf)AMcKYUiN4D$>% z*LYKnr+N{cTs;a(AztW%{)7lFXOy2SbVaCu84dlT16j{BYVZp9Ox<8pr*I=!&BH$4 zEk>I|oP`HpEgy~===ulMDz%5?0P;a&W8d==sycTPi1MOyv8hpWwNDtTEC hcGn_E^MbybuAeGJC8Ea0?}@9)|N6>~j`(|_?qBd+6#4)F diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xMsiPackage/en-US/MSFT_xMsiPackage.strings.psd1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xMsiPackage/en-US/MSFT_xMsiPackage.strings.psd1 deleted file mode 100644 index ccb92120..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xMsiPackage/en-US/MSFT_xMsiPackage.strings.psd1 +++ /dev/null @@ -1,44 +0,0 @@ -# Localized resources for MSFT_xMsiPackage - -ConvertFrom-StringData @' - CheckingFileHash = Checking file '{0}' for expected {2} hash value of {1} - CheckingFileSignature = Checking file '{0}' for valid digital signature - CopyingTheSchemeStreamBytesToTheDiskCache = Copying the stream bytes to the disk cache - CouldNotGetResponseFromWebRequest = An error occurred while trying to get the {0} response for file {1} - CouldNotOpenDestFile = Could not open the file {0} for writing - CouldNotOpenLog = The specified LogPath ({0}) could not be opened - CouldNotStartProcess = The process {0} could not be started - CreatingCacheLocation = Creating cache location - CreatingTheDestinationCacheFile = Creating the destination cache file - CreatingTheSchemeStream = Creating the {0} stream - ErrorCopyingDataToFile = Encountered an error while copying the response to the output stream - FileHasValidSignature = File '{0}' contains a valid digital signature. Signer Thumbprint: {1}, Subject: {2} - GetTargetResourceFound = Successfully retrieved package {0} - GetTargetResourceNotFound = Unable to find package: {0} - GettingTheSchemeResponseStream = Getting the {0} response stream - InvalidBinaryType = The specified Path ({0}) does not appear to specify an MSI file and as such is not supported - InvalidFileHash = File '{0}' does not match expected {2} hash value of {1} - InvalidFileSignature = File '{0}' does not have a valid Authenticode signature. Status: {1} - InvalidId = The specified IdentifyingNumber ({0}) does not match the IdentifyingNumber ({1}) in the MSI file - InvalidIdentifyingNumber = The specified IdentifyingNumber ({0}) is not a valid GUID - InvalidPath = The specified Path ({0}) is not in a valid format. Valid formats are local paths, UNC, HTTP, and HTTPS - MachineRequiresReboot = The machine requires a reboot - PackageAppearsInstalled = The package {0} is installed - PackageConfigurationStarting = Package configuration starting - PackageDoesNotAppearInstalled = The package {0} is not installed - PathDoesNotExist = The given Path ({0}) could not be found - PackageInstalled = Package has been installed - PackageUninstalled = Package has been uninstalled - ParsedProductIdAsIdentifyingNumber = Parsed {0} as {1} - ParsingProductIdAsAnIdentifyingNumber = Parsing {0} as an identifyingNumber - PostValidationError = Package from {0} was installed, but the specified ProductId does not match package details - RedirectingPackagePathToCacheFileLocation = Redirecting package path to cache file location - SettingAuthenticationLevel = Setting authentication level to None - SettingCertificateValidationCallback = Assigning user-specified certificate verification callback - SettingDefaultCredential = Setting default credential - StartingWithStartInfoFileNameStartInfoArguments = Starting {0} with {1} - ThePathExtensionWasPathExt = The path extension was {0} - TheUriSchemeWasUriScheme = The uri scheme was {0} - WrongSignerSubject = File '{0}' was not signed by expected signer subject '{1}' - WrongSignerThumbprint = File '{0}' was not signed by expected signer certificate thumbprint '{1}' -'@ diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPSSessionConfiguration/MSFT_xPSSessionConfiguration.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPSSessionConfiguration/MSFT_xPSSessionConfiguration.psm1 deleted file mode 100644 index f9539faf..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPSSessionConfiguration/MSFT_xPSSessionConfiguration.psm1 +++ /dev/null @@ -1,796 +0,0 @@ -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' -CheckEndpointMessage = Checking if session configuration {0} exists ... -EndpointNameMessage = Session configuration {0} is {1} - -CheckPropertyMessage = Checking if session configuration {0} is {1} ... -NotDesiredPropertyMessage = Session configuration {0} is NOT {1}, but {2} -DesiredPropertyMessage = Session configuration {0} is {1} -SetPropertyMessage = Session configuration {0} is now {1} - -WhitespacedStringMessage = The session configuration {0} should not be white-spaced string -StartupPathNotFoundMessage = Startup path {0} not found -EmptyCredentialMessage = The value of RunAsCredential can not be an empty credential -WrongStartupScriptExtensionMessage = The startup script should have a 'ps1' extension, and not '{0}' - -GetTargetResourceStartMessage = Begin executing Get functionality on the session configuration {0}. -GetTargetResourceEndMessage = End executing Get functionality on the session configuration {0}. -SetTargetResourceStartMessage = Begin executing Set functionality on the session configuration {0}. -SetTargetResourceEndMessage = End executing Set functionality on the session configuration {0}. -TestTargetResourceStartMessage = Begin executing Test functionality on the session configuration {0}. -TestTargetResourceEndMessage = End executing Test functionality on the session configuration {0}. - -EnsureSessionConfigurationMessage = Ensure the specified session configuration is "{0}" -'@ -} - -<# - .SYNOPSIS - Returns the current state of the specified PSSessionConfiguration - - .PARAMETER Name - Specifies the name of the session configuration. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [String] - $Name - ) - - Write-Verbose ($LocalizedData.GetTargetResourceStartMessage -f $Name) - - # Try getting the specified endpoint - $endpoint = Get-PSSessionConfiguration -Name $Name -ErrorAction SilentlyContinue -Verbose:$false - - # If endpoint is null, it is absent - if ($null -eq $endpoint) - { - $ensure = 'Absent' - } - - # If endpoint is present, check other properties - else - { - $ensure = 'Present' - - # If runAsUser is specified, return only the username in the credential property - if ($endpoint.RunAsUser) - { - $newCimInstanceParams = @{ - ClassName = 'MSFT_Credential' - Property = @{ - Username = [String] $endpoint.RunAsUser - Password = [String] $null - } - Namespace = 'root/microsoft/windows/desiredstateconfiguration' - ClientOnly = $true - } - $convertToCimCredential = New-CimInstance @newCimInstanceParams - } - $accessMode = Get-EndpointAccessMode -Endpoint $endpoint - } - - @{ - Name = $Name - RunAsCredential = [CimInstance]$convertToCimCredential - SecurityDescriptorSDDL = $endpoint.Permission - StartupScript = $endpoint.StartupScript - AccessMode = $accessMode - Ensure = $ensure - } - - Write-Verbose ($LocalizedData.GetTargetResourceEndMessage -f $Name) -} - -<# - .SYNOPSIS - Ensures the specified PSSessionConfiguration is in its desired state - - .PARAMETER Name - Specifies the name of the session configuration. - - .PARAMETER StartupScript - Specifies the startup script for the configuration. - Enter the fully qualified path of a Windows PowerShell script. - - .PARAMETER RunAsCredential - Specifies the credential for commands of this session configuration. - - .PARAMETER SecurityDescriptorSDDL - Specifies the Security Descriptor Definition Language (SDDL) string for the configuration. - - .PARAMETER AccessMode - Enables and disables the session configuration and determines whether it can be used for - remote or local sessions on the computer. - - The acceptable values for this parameter are: - - Disabled - - Local - - Remote - - The default value is "Remote". - - .PARAMETER Ensure - Indicates if the session configuration should exist. - - To ensure that it does, set this property to "Present". - To ensure that it does not exist, set the property to "Absent". - - The default value is "Present". -#> -function Set-TargetResource -{ - [CmdletBinding(SupportsShouldProcess = $true)] - [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidGlobalVars','')] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [AllowEmptyString()] - [String] - $StartupScript, - - [PSCredential] - $RunAsCredential, - - [String] - $SecurityDescriptorSDDL, - - [ValidateSet('Local','Remote', 'Disabled')] - [String] - $AccessMode = 'Remote', - - [ValidateSet('Present','Absent')] - [String] - $Ensure = 'Present' - ) - - Write-Verbose ($LocalizedData.SetTargetResourceStartMessage -f $Name) - - #Check if the session configuration exists - Write-Verbose -Message ($LocalizedData.CheckEndpointMessage -f $Name) - - # Try to get a named session configuration - $endpoint = Get-PSSessionConfiguration -Name $Name -ErrorAction SilentlyContinue -Verbose:$false - - if ($PSCmdlet.ShouldProcess(($LocalizedData.EnsureSessionConfigurationMessage -f $Ensure))) - { - # If endpoint is present, set ensure correctly - if ($endpoint) - { - Write-Verbose -Message ($LocalizedData.EndpointNameMessage -f $Name, 'present') - - # If the endpoint should be absent, delete the endpoint - if ($Ensure -eq 'Absent') - { - try - { - <# - Set the following preference so the functions inside Unregister-PSSessionConfig - doesn't get these settings - #> - $oldDebugPrefernce = $DebugPreference - $oldVerbosePreference = $VerbosePreference - $DebugPreference = $VerbosePreference = "SilentlyContinue" - - $unregisterPSSessionConfigParams = @{ - Name = $Name - Force = $true - NoServiceRestart = $true - ErrorAction = 'Stop' - } - $null = Unregister-PSSessionConfiguration @unregisterPSSessionConfigParams - - # Reset the following preference to older values - $DebugPreference = $oldDebugPrefernce - $VerbosePreference = $oldVerbosePreference - - Write-Verbose -Message ($LocalizedData.EndpointNameMessage -f $Name, 'absent') - - $restartNeeded = $true - } - catch - { - $invokeThrowErrorHelperParams = @{ - ErrorId = 'UnregisterPSSessionConfigurationFailed' - ErrorMessage = $_.Exception - ErrorCategory = 'InvalidOperation' - } - Invoke-ThrowErrorHelper @invokeThrowErrorHelperParams - } - - } - - # else validate endpoint properties and return the result - else - { - # Remove Name and Ensure from the bound Parameters for splatting - if ($PSBoundParameters.ContainsKey('Name')) - { - $null = $PSBoundParameters.Remove('Name') - } - if ($PSBoundParameters.ContainsKey('Ensure')) - { - $null = $PSBoundParameters.Remove('Ensure') - } - - [Hashtable]$validatedProperties = ( - Get-ValidatedResourcePropertyTable -Endpoint $endpoint @PSBoundParameters -Apply) - $null = $validatedProperties.Add('Name',$Name) - - # If the $validatedProperties contain more than 1 key, something needs to be changed - if ($validatedProperties.count -gt 1) - { - try - { - $setPSSessionConfigurationParams = $validatedProperties.psobject.Copy() - $setPSSessionConfigurationParams['Force'] = $true - $setPSSessionConfigurationParams['NoServiceRestart'] = $true - $setPSSessionConfigurationParams['Verbose'] = $false - $null = Set-PSSessionConfiguration @setPSSessionConfigurationParams - $restartNeeded = $true - - # Write verbose message for all the properties, except Name, that are changing - Write-EndpointMessage -Parameters $validatedProperties -keysToSkip 'Name' - } - catch - { - $invokeThrowErrorHelperParams = @{ - ErrorId = 'SetPSSessionConfigurationFailed' - ErrorMessage = $_.Exception - ErrorCategory = 'InvalidOperation' - } - Invoke-ThrowErrorHelper @invokeThrowErrorHelperParams - } - } - } - } - else - { - # Named session configuration is absent - Write-Verbose -Message ($LocalizedData.EndpointNameMessage -f $Name, 'absent') - - # If the endpoint should have been present, create it - if ($Ensure -eq 'Present') - { - # Remove Ensure,Verbose,Debug from the bound Parameters for splatting - foreach ($key in @('Ensure', 'Verbose', 'Debug')) - { - if ($PSBoundParameters.ContainsKey($key)) - { - $null = $PSBoundParameters.Remove($key) - } - } - - # Register the endpoint with specified properties - try - { - <# - Set the following preference so the functions inside - Unregister-PSSessionConfig doesn't get these settings - #> - $oldDebugPrefernce = $DebugPreference - $oldVerbosePreference = $VerbosePreference - $DebugPreference = $VerbosePreference = "SilentlyContinue" - - $null = Register-PSSessionConfiguration @PSBoundParameters -Force -NoServiceRestart - - # Reset the following preference to older values - $DebugPreference = $oldDebugPrefernce - $VerbosePreference = $oldVerbosePreference - - # If access mode is specified, set it on the endpoint - if ($PSBoundParameters.ContainsKey('AccessMode') -and $AccessMode -ne 'Remote') - { - $setPSSessionConfigurationParams = @{ - Name = $Name - AccessMode = $AccessMode - Force = $true - NoServiceRestart = $true - Verbose = $false - } - $null = Set-PSSessionConfiguration @setPSSessionConfigurationParams - } - - $restartNeeded = $true - - Write-Verbose -Message ($LocalizedData.EndpointNameMessage -f $Name,'present') - } - catch - { - $invokeThrowErrorHelperParams = @{ - ErrorId = 'RegisterOrSetPSSessionConfigurationFailed' - ErrorMessage = $_.Exception - ErrorCategory = 'InvalidOperation' - } - Invoke-ThrowErrorHelper @invokeThrowErrorHelperParams - } - } - } - - <# - Any change to existing endpoint or creating new endpoint requires WinRM restart. - Since DSC(CIM) uses WSMan as well it will stop responding. - Hence telling the DSC Engine to restart the machine - #> - if ($restartNeeded) - { - $global:DscMachineStatus = 1 - } - } - - Write-Verbose ($LocalizedData.SetTargetResourceEndMessage -f $Name) -} - -<# - .SYNOPSIS - Tests if the specified PSSessionConfiguration is in its desired state - - .PARAMETER Name - Specifies the name of the session configuration. - - .PARAMETER StartupScript - Specifies the startup script for the configuration. - Enter the fully qualified path of a Windows PowerShell script. - - .PARAMETER RunAsCredential - Specifies the credential for commands of this session configuration. - - .PARAMETER SecurityDescriptorSDDL - Specifies the Security Descriptor Definition Language (SDDL) string for the configuration. - - .PARAMETER AccessMode - Enables and disables the session configuration and determines whether it can be used for - remote or local sessions on the computer. - - The acceptable values for this parameter are: - - Disabled - - Local - - Remote - - The default value is "Remote". - - .PARAMETER Ensure - Indicates if the session configuration should exist. - - To test that it does, set this property to "Present". - To test that it does not exist, set the property to "Absent". - - The default value is "Present". -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [String]$Name, - - [AllowEmptyString()] - [String]$StartupScript, - - [PSCredential]$RunAsCredential, - - [String]$SecurityDescriptorSDDL, - - [ValidateSet('Local','Remote', 'Disabled')] - [String]$AccessMode = 'Remote', - - [ValidateSet('Present','Absent')] - [String]$Ensure = 'Present' - ) - - Write-Verbose ($LocalizedData.TestTargetResourceStartMessage -f $Name) - -#region Input Validation - # Check if the endpoint name is blank/whitespaced string - if ([String]::IsNullOrWhiteSpace($Name)) - { - $invokeThrowErrorHelperParams = @{ - ErrorId = 'BlankString' - ErrorMessage = $LocalizedData.WhitespacedStringMessage -f 'name' - ErrorCategory = 'SyntaxError' - } - Invoke-ThrowErrorHelper @invokeThrowErrorHelperParams - } - - # Check for Startup script path and extension - if ($PSBoundParameters.ContainsKey('StartupScript')) - { - # Check if startup script path is valid - if (!(Test-Path $StartupScript)) - { - $invokeThrowErrorHelperParams = @{ - ErrorId = 'PathNotFound' - ErrorMessage = $LocalizedData.StartupPathNotFoundMessage -f $StartupScript - ErrorCategory = 'ObjectNotFound' - } - Invoke-ThrowErrorHelper @invokeThrowErrorHelperParams - } - - # Check the startup script extension - $startupScriptFileExtension = $StartupScript.Split('.')[-1] - if ($startupScriptFileExtension -ne 'ps1') - { - $invokeThrowErrorHelperParams = @{ - ErrorId = 'WrongFileExtension' - ErrorMessage = - $LocalizedData.WrongStartupScriptExtensionMessage -f $startupScriptFileExtension - ErrorCategory = 'InvalidData' - } - Invoke-ThrowErrorHelper @invokeThrowErrorHelperParams - } - } - - # Check if SecurityDescriptorSDDL is whitespaced - if ($PSBoundParameters.ContainsKey('SecurityDescriptorSDDL') -and - [String]::IsNullOrWhiteSpace($SecurityDescriptorSDDL)) - { - $invokeThrowErrorHelperParams = @{ - ErrorId = 'BlankString' - ErrorMessage = $LocalizedData.WhitespacedStringMessage -f 'securityDescriptorSddl' - ErrorCategory = 'SyntaxError' - } - Invoke-ThrowErrorHelper @invokeThrowErrorHelperParams - } - - # Check if the RunAsCredential is not empty - if ($PSBoundParameters.ContainsKey('RunAsCredential') -and - ($RunAsCredential -eq [PSCredential]::Empty)) - { - $invokeThrowErrorHelperParams = @{ - ErrorId = 'EmptyCredential' - ErrorMessage = $LocalizedData.EmptyCredentialMessage - ErrorCategory = 'InvalidArgument' - } - Invoke-ThrowErrorHelper @invokeThrowErrorHelperParams - } -#endregion - - #Check if the session configuration exists - Write-Verbose -Message ($LocalizedData.CheckEndpointMessage -f $Name) - - try - { - # Try to get a named session configuration - $endpoint = Get-PSSessionConfiguration -Name $Name -ErrorAction Stop -Verbose:$false - - Write-Verbose -Message ($LocalizedData.EndpointNameMessage -f $Name,'present') - - # If the endpoint shouldn't be present, return false - if ($Ensure -eq 'Absent') - { - return $false - } - # else validate endpoint properties and return the result - else - { - # Remove Name and Ensure from the bound Parameters for splatting - if ($PSBoundParameters.ContainsKey('Name')) - { - $null = $PSBoundParameters.Remove('Name') - } - if ($PSBoundParameters.ContainsKey('Ensure')) - { - $null = $PSBoundParameters.Remove('Ensure') - } - - return (Get-ValidatedResourcePropertyTable -Endpoint $endpoint @PSBoundParameters) - } - } - catch [Microsoft.PowerShell.Commands.WriteErrorException] - { - Write-Verbose -Message ($LocalizedData.EndpointNameMessage -f $Name,'absent') - - return ($Ensure -eq 'Absent') - } - - Write-Verbose ($LocalizedData.TestTargetResourceEndMessage -f $Name) -} - -<# - .SYNOPSIS - Helper function to translate the endpoint's accessmode - to the "Disabled","Local","Remote" values - - .PARAMETER Endpoint - Specifies a valid session configuration endpoint object -#> -function Get-EndpointAccessMode -{ - param - ( - [Parameter(Mandatory)] - $Endpoint - ) - - if (-not $endpoint.Enabled) - { - return 'Disabled' - } - elseif ($endpoint.Permission -and - ($endpoint.Permission).contains('NT AUTHORITY\NETWORK AccessDenied')) - { - return 'Local' - } - else - { - return 'Remote' - } -} - -<# - .SYNOPSIS - Helper function to write verbose messages for collection of properties - - .PARAMETER Parameters - Specifies a properties Hashtable. - - .PARAMETER KeysToSkip - Specifies an array of Hashtable keys to ignore. - -#> -function Write-EndpointMessage -{ - param - ( - [Parameter(Mandatory)] - [Hashtable] - $Parameters, - - [Parameter(Mandatory)] - [String[]] - $KeysToSkip - ) - - foreach($key in $Parameters.keys) - { - if ($KeysToSkip -notcontains $key) - { - Write-Verbose -Message ($LocalizedData.SetPropertyMessage -f $key, $Parameters[$key]) - } - } -} - -<# - .SYNOPSIS - Helper function to get a Hashtable of validated endpoint properties - - .PARAMETER Endpoint - Specifies a valid session configuration endpoint. - - .PARAMETER StartupScript - Specifies the startup script for the configuration. - Enter the fully qualified path of a Windows PowerShell script. - - .PARAMETER RunAsCredential - Specifies the credential for commands of this session configuration. - - .PARAMETER SecurityDescriptorSDDL - Specifies the Security Descriptor Definition Language (SDDL) string for the configuration. - - .PARAMETER AccessMode - Enables and disables the session configuration and determines whether it can be used for - remote or local sessions on the computer. - - The acceptable values for this parameter are: - - Disabled - - Local - - Remote - - .PARAMETER Apply - Indicates that this function should return a hashtable of validated endpoint properties. - By default, this function returns the value $false. -#> -function Get-ValidatedResourcePropertyTable -{ - param - ( - [Parameter(Mandatory)] - $Endpoint, - - [String] - $StartupScript, - - [PSCredential] - $RunAsCredential, - - [String] - $SecurityDescriptorSDDL, - - [ValidateSet('Local','Remote','Disabled')] - [String] - $AccessMode, - - [Switch] - $Apply - ) - - if ($Apply) - { - $validatedProperties = @{} - } - - # Check if the SDDL is same as specified - if ($PSBoundParameters.ContainsKey('SecurityDescriptorSDDL')) - { - $querySDDLMessage = $LocalizedData.CheckPropertyMessage -f 'SDDL', - $SecurityDescriptorSDDL - Write-Verbose -Message $querySDDLMessage - - # If endpoint SDDL is not same as specified - if ($endpoint.SecurityDescriptorSddl -and - ($endpoint.SecurityDescriptorSddl -ne $SecurityDescriptorSDDL)) - { - $notDesiredSDDLMessage = $LocalizedData.NotDesiredPropertyMessage -f 'SDDL', - $SecurityDescriptorSDDL, $endpoint.SecurityDescriptorSddl - Write-Verbose -Message $notDesiredSDDLMessage - - if ($Apply) - { - $validatedProperties['SecurityDescriptorSddl'] = $SecurityDescriptorSDDL - } - else - { - return $false - } - } - # If endpoint SDDL is same as specified - else - { - Write-Verbose -Message ($LocalizedData.DesiredPropertyMessage -f 'SDDL', - $SecurityDescriptorSDDL) - } - } - - # Check the RunAs user is same as specified - if ($PSBoundParameters.ContainsKey('RunAsCredential')) - { - Write-Verbose -Message ($LocalizedData.CheckPropertyMessage -f 'RunAs user', - $RunAsCredential.UserName) - - # If endpoint RunAsUser is not same as specified - if ($endpoint.RunAsUser -ne $RunAsCredential.UserName) - { - Write-Verbose -Message ($LocalizedData.NotDesiredPropertyMessage -f 'RunAs user', - $RunAsCredential.UserName, $endpoint.RunAsUser) - - if ($Apply) - { - $validatedProperties['RunAsCredential'] = $RunAsCredential - } - else - { - return $false - } - } - # If endpoint RunAsUser is same as specified - else - { - Write-Verbose -Message ($LocalizedData.DesiredPropertyMessage -f 'RunAs user', - $RunAsCredential.UserName) - } - } - - # Check if the StartupScript is same as specified - if ($PSBoundParameters.ContainsKey('StartupScript')) - { - Write-Verbose -Message ($LocalizedData.CheckPropertyMessage -f 'startup script', - $StartupScript) - - # If endpoint StartupScript is not same as specified - if ($endpoint.StartupScript -ne $StartupScript) - { - Write-Verbose -Message ($LocalizedData.NotDesiredPropertyMessage -f 'startup script', - $StartupScript, $endpoint.StartupScript) - - if ($Apply) - { - $validatedProperties['StartupScript'] = $StartupScript - } - else - { - return $false - } - } - # If endpoint StartupScript is same as specified - else - { - Write-Verbose -Message ($LocalizedData.DesiredPropertyMessage -f 'startup script', - $StartupScript) - } - } - - # Check if AccessMode is same as specified - if ($PSBoundParameters.ContainsKey('AccessMode')) - { - Write-Verbose -Message ($LocalizedData.CheckPropertyMessage -f 'acess mode', $AccessMode) - - $curAccessMode = Get-EndpointAccessMode -Endpoint $Endpoint - - # If endpoint access mode is not same as specified - if ($curAccessMode -ne $AccessMode) - { - Write-Verbose -Message ($LocalizedData.NotDesiredPropertyMessage -f 'access mode', - $AccessMode, $curAccessMode) - - if ($Apply) - { - $validatedProperties['AccessMode'] = $AccessMode - } - else - { - return $false - } - } - # If endpoint access mode is same as specified - else - { - Write-Verbose -Message ($LocalizedData.DesiredPropertyMessage -f 'access mode', - $AccessMode) - } - } - - if ($Apply) - { - return $validatedProperties - } - else - { - return ($Ensure -eq 'Present') - } -} - -<# - .SYNOPSIS - Invoke this helper function to throw a terminating error. - - .PARAMETER ErrorId - Specifies a developer-defined identifier of the error. - This identifier must be a non-localized string for a specific error type. - - .PARAMETER ExceptionMessage - Specifies the message that describes the error. - - .PARAMETER ErrorCategory - Specifies the category of the error. -#> -function Invoke-ThrowErrorHelper -{ - param - ( - [Parameter(Mandatory)] - [String] - $ErrorId, - - [Parameter(Mandatory)] - [String] - $ErrorMessage, - - [Parameter(Mandatory)] - [System.Management.Automation.ErrorCategory] - $ErrorCategory - ) - - $exception = New-Object System.InvalidOperationException $ErrorMessage - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $ErrorId, - $ErrorCategory, $null - - throw $errorRecord -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPSSessionConfiguration/MSFT_xPSSessionConfiguration.schema.mof b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPSSessionConfiguration/MSFT_xPSSessionConfiguration.schema.mof deleted file mode 100644 index 3240aa79..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPSSessionConfiguration/MSFT_xPSSessionConfiguration.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xPSEndpoint")] -class MSFT_xPSSessionConfiguration : OMI_BaseResource -{ - [Key, Description("Name of the PS Remoting Endpoint")] String Name; - [Write, Description("Whether to create the endpoint or delete it"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("Path for the startup script")] String StartupScript; - [Write, EmbeddedInstance("MSFT_Credential"), Description("Credential for Running under different user context")] String RunAsCredential; - [Write, Description("SDDL for allowed users to connect to this endpoint")] String SecurityDescriptorSDDL; - [Write, Description("Whether the endpoint is remotely accessible or has local access only or no access"), ValueMap{"Local","Remote", "Disabled"}, Values{"Local","Remote","Disabled"}] String AccessMode; -}; - diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.psm1 deleted file mode 100644 index 565acd17..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.psm1 +++ /dev/null @@ -1,1970 +0,0 @@ -# Suppress Global Vars PSSA Error because $global:DSCMachineStatus must be allowed -[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidGlobalVars', '')] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')] -param() - -$errorActionPreference = 'Stop' -Set-StrictMode -Version 'Latest' - -# Import CommonResourceHelper for Get-LocalizedData -$script:dscResourcesFolderFilePath = Split-Path $PSScriptRoot -Parent -$script:commonResourceHelperFilePath = Join-Path -Path $script:dscResourcesFolderFilePath -ChildPath 'CommonResourceHelper.psm1' -Import-Module -Name $script:commonResourceHelperFilePath - -# Localized messages for verbose and error statements in this resource -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xPackageResource' - -$script:packageCacheLocation = "$env:programData\Microsoft\Windows\PowerShell\Configuration\BuiltinProvCache\MSFT_xPackageResource" -$script:msiTools = $null - -function Get-TargetResource -{ - [OutputType([Hashtable])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [AllowEmptyString()] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [Parameter(Mandatory = $true)] - [AllowEmptyString()] - [String] - $ProductId, - - [Boolean] - $CreateCheckRegValue = $false, - - [ValidateSet('LocalMachine','CurrentUser')] - [String] - $InstalledCheckRegHive = 'LocalMachine', - - [String] - $InstalledCheckRegKey, - - [String] - $InstalledCheckRegValueName, - - [String] - $InstalledCheckRegValueData - ) - - Assert-PathExtensionValid -Path $Path - $uri = Convert-PathToUri -Path $Path - $identifyingNumber = [String]::Empty - - if (-not [String]::IsNullOrEmpty($ProductId)) - { - $identifyingNumber = Convert-ProductIdToIdentifyingNumber -ProductId $ProductId - } - - $packageResourceResult = @{} - - $getProductEntryParameters = @{ - Name = $Name - IdentifyingNumber = $identifyingNumber - } - - $checkRegistryValueParameters = @{ - CreateCheckRegValue = $CreateCheckRegValue - InstalledCheckRegHive = $InstalledCheckRegHive - InstalledCheckRegKey = $InstalledCheckRegKey - InstalledCheckRegValueName = $InstalledCheckRegValueName - InstalledCheckRegValueData = $InstalledCheckRegValueData - } - - if ($CreateCheckRegValue) - { - Assert-RegistryParametersValid -InstalledCheckRegKey $InstalledCheckRegKey -InstalledCheckRegValueName $InstalledCheckRegValueName -InstalledCheckRegValueData $InstalledCheckRegValueData - - $getProductEntryParameters += $checkRegistryValueParameters - $packageResourceResult += $checkRegistryValueParameters - } - - $productEntry = Get-ProductEntry @getProductEntryParameters - - if ($null -eq $productEntry) - { - $packageResourceResult += @{ - Ensure = 'Absent' - Name = $Name - ProductId = $identifyingNumber - Path = $Path - Installed = $false - } - - return $packageResourceResult - } - elseif ($CreateCheckRegValue) - { - $packageResourceResult += @{ - Ensure = 'Present' - Name = $Name - ProductId = $identifyingNumber - Path = $Path - Installed = $true - } - - return $packageResourceResult - } - - <# - Identifying number can still be null here (e.g. remote MSI with Name specified, local EXE). - If the user gave a product ID just pass it through, otherwise get it from the product. - #> - if ($null -eq $identifyingNumber -and $null -ne $productEntry.Name) - { - $identifyingNumber = Split-Path -Path $productEntry.Name -Leaf - } - - $installDate = $productEntry.GetValue('InstallDate') - - if ($null -ne $installDate) - { - try - { - $installDate = '{0:d}' -f [DateTime]::ParseExact($installDate, 'yyyyMMdd',[System.Globalization.CultureInfo]::CurrentCulture).Date - } - catch - { - $installDate = $null - } - } - - $publisher = Get-LocalizedRegistryKeyValue -RegistryKey $productEntry -ValueName 'Publisher' - - $estimatedSize = $productEntry.GetValue('EstimatedSize') - - if ($null -ne $estimatedSize) - { - $estimatedSize = $estimatedSize / 1024 - } - - $displayVersion = $productEntry.GetValue('DisplayVersion') - - $comments = $productEntry.GetValue('Comments') - - $displayName = Get-LocalizedRegistryKeyValue -RegistryKey $productEntry -ValueName 'DisplayName' - - $packageResourceResult += @{ - Ensure = 'Present' - Name = $displayName - Path = $Path - InstalledOn = $installDate - ProductId = $identifyingNumber - Size = $estimatedSize - Installed = $true - Version = $displayVersion - PackageDescription = $comments - Publisher = $publisher - } - - return $packageResourceResult -} - -function Set-TargetResource -{ - [CmdletBinding(SupportsShouldProcess = $true)] - param - ( - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [Parameter(Mandatory = $true)] - [AllowEmptyString()] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [Parameter(Mandatory = $true)] - [AllowEmptyString()] - [String] - $ProductId, - - [String] - $Arguments, - - [PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - # Return codes 1641 and 3010 indicate success when a restart is requested per installation - [ValidateNotNullOrEmpty()] - [UInt32[]] - $ReturnCode = @( 0, 1641, 3010 ), - - [String] - $LogPath, - - [String] - $FileHash, - - [ValidateSet('SHA1', 'SHA256', 'SHA384', 'SHA512', 'MD5', 'RIPEMD160')] - [String] - $HashAlgorithm, - - [String] - $SignerSubject, - - [String] - $SignerThumbprint, - - [String] - $ServerCertificateValidationCallback, - - [Boolean] - $CreateCheckRegValue = $false, - - [ValidateSet('LocalMachine','CurrentUser')] - [String] - $InstalledCheckRegHive = 'LocalMachine', - - [String] - $InstalledCheckRegKey, - - [String] - $InstalledCheckRegValueName, - - [String] - $InstalledCheckRegValueData, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.CredentialAttribute()] - $RunAsCredential - ) - - $ErrorActionPreference = 'Stop' - - if (Test-TargetResource @PSBoundParameters) - { - return - } - - Assert-PathExtensionValid -Path $Path - $uri = Convert-PathToUri -Path $Path - - if (-not [String]::IsNullOrEmpty($ProductId)) - { - $identifyingNumber = Convert-ProductIdToIdentifyingNumber -ProductId $ProductId - } - else - { - $identifyingNumber = $ProductId - } - - $productEntry = Get-ProductEntry -Name $Name -IdentifyingNumber $identifyingNumber - - <# - Path gets overwritten in the download code path. Retain the user's original Path in case - the install succeeded but the named package wasn't present on the system afterward so we - can give a better error message. - #> - $originalPath = $Path - - Write-Verbose -Message $script:localizedData.PackageConfigurationStarting - - $logStream = $null - $psDrive = $null - $downloadedFileName = $null - - try - { - $fileExtension = [System.IO.Path]::GetExtension($Path).ToLower() - if (-not [String]::IsNullOrEmpty($LogPath)) - { - try - { - if ($fileExtension -eq '.msi') - { - <# - We want to pre-verify the log path exists and is writable ahead of time - even in the MSI case, as detecting WHY the MSI log path doesn't exist would - be rather problematic for the user. - #> - if ((Test-Path -Path $LogPath) -and $PSCmdlet.ShouldProcess($script:localizedData.RemoveExistingLogFile, $null, $null)) - { - Remove-Item -Path $LogPath - } - - if ($PSCmdlet.ShouldProcess($script:localizedData.CreateLogFile, $null, $null)) - { - New-Item -Path $LogPath -Type 'File' | Out-Null - } - } - elseif ($PSCmdlet.ShouldProcess($script:localizedData.CreateLogFile, $null, $null)) - { - $logStream = New-Object -TypeName 'System.IO.StreamWriter' -ArgumentList @( $LogPath, $false ) - } - } - catch - { - New-InvalidOperationException -Message ($script:localizedData.CouldNotOpenLog -f $LogPath) -ErrorRecord $_ - } - } - - # Download or mount file as necessary - if (-not ($fileExtension -eq '.msi' -and $Ensure -eq 'Absent')) - { - if ($uri.IsUnc -and $PSCmdlet.ShouldProcess($script:localizedData.MountSharePath, $null, $null)) - { - $psDriveArgs = @{ - Name = [Guid]::NewGuid() - PSProvider = 'FileSystem' - Root = Split-Path -Path $uri.LocalPath - } - - # If we pass a null for Credential, a dialog will pop up. - if ($null -ne $Credential) - { - $psDriveArgs['Credential'] = $Credential - } - - $psDrive = New-PSDrive @psDriveArgs - $Path = Join-Path -Path $psDrive.Root -ChildPath (Split-Path -Path $uri.LocalPath -Leaf) - } - elseif (@( 'http', 'https' ) -contains $uri.Scheme -and $Ensure -eq 'Present' -and $PSCmdlet.ShouldProcess($script:localizedData.DownloadHTTPFile, $null, $null)) - { - $uriScheme = $uri.Scheme - $outStream = $null - $responseStream = $null - - try - { - Write-Verbose -Message ($script:localizedData.CreatingCacheLocation) - - if (-not (Test-Path -Path $script:packageCacheLocation -PathType 'Container')) - { - New-Item -Path $script:packageCacheLocation -ItemType 'Directory' | Out-Null - } - - $destinationPath = Join-Path -Path $script:packageCacheLocation -ChildPath (Split-Path -Path $uri.LocalPath -Leaf) - - Write-Verbose -Message ($script:localizedData.NeedtodownloadfilefromschemedestinationwillbedestName -f $uriScheme, $destinationPath) - - try - { - Write-Verbose -Message ($script:localizedData.CreatingTheDestinationCacheFile) - $outStream = New-Object -TypeName 'System.IO.FileStream' -ArgumentList @( $destinationPath, 'Create' ) - } - catch - { - # Should never happen since we own the cache directory - New-InvalidOperationException -Message ($script:localizedData.CouldNotOpenDestFile -f $destinationPath) -ErrorRecord $_ - } - - try - { - Write-Verbose -Message ($script:localizedData.CreatingTheSchemeStream -f $uriScheme) - $webRequest = [System.Net.WebRequest]::Create($uri) - - Write-Verbose -Message ($script:localizedData.SettingDefaultCredential) - $webRequest.Credentials = [System.Net.CredentialCache]::DefaultCredentials - - if ($uriScheme -eq 'http') - { - # Default value is MutualAuthRequested, which applies to the https scheme - Write-Verbose -Message ($script:localizedData.SettingAuthenticationLevel) - $webRequest.AuthenticationLevel = [System.Net.Security.AuthenticationLevel]::None - } - elseif ($uriScheme -eq 'https' -and -not [String]::IsNullOrEmpty($ServerCertificateValidationCallback)) - { - Write-Verbose -Message 'Assigning user-specified certificate verification callback' - $serverCertificateValidationScriptBlock = [ScriptBlock]::Create($ServerCertificateValidationCallback) - $webRequest.ServerCertificateValidationCallBack = $serverCertificateValidationScriptBlock - } - - Write-Verbose -Message ($script:localizedData.Gettingtheschemeresponsestream -f $uriScheme) - $responseStream = (([System.Net.HttpWebRequest]$webRequest).GetResponse()).GetResponseStream() - } - catch - { - Write-Verbose -Message ($script:localizedData.ErrorOutString -f ($_ | Out-String)) - New-InvalidOperationException -Message ($script:localizedData.CouldNotGetHttpStream -f $uriScheme, $Path) -ErrorRecord $_ - } - - try - { - Write-Verbose -Message ($script:localizedData.CopyingTheSchemeStreamBytesToTheDiskCache -f $uriScheme) - $responseStream.CopyTo($outStream) - $responseStream.Flush() - $outStream.Flush() - } - catch - { - New-InvalidOperationException -Message ($script:localizedData.ErrorCopyingDataToFile -f $Path, $destinationPath) -ErrorRecord $_ - } - } - finally - { - if ($null -ne $outStream) - { - $outStream.Close() - } - - if ($null -ne $responseStream) - { - $responseStream.Close() - } - } - - Write-Verbose -Message ($script:localizedData.RedirectingPackagePathToCacheFileLocation) - $Path = $destinationPath - $downloadedFileName = $destinationPath - } - - # At this point the Path ought to be valid unless it's a MSI uninstall case - if (-not (Test-Path -Path $Path -PathType 'Leaf')) - { - New-InvalidOperationException -Message ($script:localizedData.PathDoesNotExist -f $Path) - } - - Assert-FileValid -Path $Path -HashAlgorithm $HashAlgorithm -FileHash $FileHash -SignerSubject $SignerSubject -SignerThumbprint $SignerThumbprint - } - - $startInfo = New-Object -TypeName 'System.Diagnostics.ProcessStartInfo' - - # Necessary for I/O redirection and just generally a good idea - $startInfo.UseShellExecute = $false - - $process = New-Object -TypeName 'System.Diagnostics.Process' - $process.StartInfo = $startInfo - - # Concept only, will never touch disk - $errorLogPath = $LogPath + '.err' - - if ($fileExtension -eq '.msi') - { - $startInfo.FileName = "$env:winDir\system32\msiexec.exe" - - if ($Ensure -eq 'Present') - { - # Check if the MSI package specifies the ProductName and Code - $productName = Get-MsiProductName -Path $Path - $productCode = Get-MsiProductCode -Path $Path - - if ((-not [String]::IsNullOrEmpty($Name)) -and ($productName -ne $Name)) - { - New-InvalidArgumentException -ArgumentName 'Name' -Message ($script:localizedData.InvalidNameOrId -f $Name, $identifyingNumber, $productName, $productCode) - } - - if ((-not [String]::IsNullOrEmpty($identifyingNumber)) -and ($identifyingNumber -ne $productCode)) - { - New-InvalidArgumentException -ArgumentName 'ProductId' -Message ($script:localizedData.InvalidNameOrId -f $Name, $identifyingNumber, $productName, $productCode) - } - - $startInfo.Arguments = '/i "{0}"' -f $Path - } - else - { - $productEntry = Get-ProductEntry -Name $Name -IdentifyingNumber $identifyingNumber - - # We may have used the Name earlier, now we need the actual ID - $id = Split-Path -Path $productEntry.Name -Leaf - $startInfo.Arguments = '/x{0}' -f $id - } - - if ($LogPath) - { - $startInfo.Arguments += ' /log "{0}"' -f $LogPath - } - - $startInfo.Arguments += ' /quiet /norestart' - - if ($Arguments) - { - # Append any specified arguments with a space (#195) - $startInfo.Arguments += ' {0}' -f $Arguments - } - } - else - { - # EXE - Write-Verbose -Message $script:localizedData.TheBinaryIsAnExe - - if ($Ensure -eq 'Present') - { - $startInfo.FileName = $Path - $startInfo.Arguments = $Arguments - - if ($LogPath) - { - Write-Verbose -Message ($script:localizedData.UserHasRequestedLoggingNeedToAttachEventHandlersToTheProcess) - $startInfo.RedirectStandardError = $true - $startInfo.RedirectStandardOutput = $true - - Register-ObjectEvent -InputObject $process -EventName 'OutputDataReceived' -SourceIdentifier $LogPath - Register-ObjectEvent -InputObject $process -EventName 'ErrorDataReceived' -SourceIdentifier $errorLogPath - } - } - else - { - # Absent case - $startInfo.FileName = "$env:winDir\system32\msiexec.exe" - - # We may have used the Name earlier, now we need the actual ID - if ($null -eq $productEntry -or $null -eq $productEntry.Name) - { - $id = $Path - } - else - { - $id = Split-Path -Path $productEntry.Name -Leaf - } - - $startInfo.Arguments = "/x $id /quiet /norestart" - - if ($LogPath) - { - $startInfo.Arguments += ' /log "{0}"' -f $LogPath - } - - if ($Arguments) - { - # Append the specified arguments with a space (#195) - $startInfo.Arguments += ' {0}' -f $Arguments - } - } - } - - Write-Verbose -Message ($script:localizedData.StartingWithStartInfoFileNameStartInfoArguments -f $startInfo.FileName, $startInfo.Arguments) - - if ($PSCmdlet.ShouldProcess(($script:localizedData.StartingProcessMessage -f $startInfo.FileName, $startInfo.Arguments), $null, $null)) - { - try - { - [int] $exitCode = 0 - if($PSBoundParameters.ContainsKey('RunAsCredential')) - { - $commandLine = '"{0}" {1}' -f $startInfo.FileName, $startInfo.Arguments - $exitCode = Invoke-PInvoke -CommandLine $commandLine -Credential $RunAsCredential - } - else - { - $process = Invoke-Process -Process $process -LogStream ($null -ne $logStream) - $exitCode = $process.ExitCode - } - } - catch - { - New-InvalidOperationException -Message ($script:localizedData.CouldNotStartProcess -f $Path) -ErrorRecord $_ - } - - if ($logStream) - { - #We have to re-mux these since they appear to us as different streams - #The underlying Win32 APIs prevent this problem, as would constructing a script - #on the fly and executing it, but the former is highly problematic from PowerShell - #and the latter doesn't let us get the return code for UI-based EXEs - $outputEvents = Get-Event -SourceIdentifier $LogPath - $errorEvents = Get-Event -SourceIdentifier $errorLogPath - $masterEvents = @() + $outputEvents + $errorEvents - $masterEvents = $masterEvents | Sort-Object -Property TimeGenerated - - foreach($event in $masterEvents) - { - $logStream.Write($event.SourceEventArgs.Data); - } - - Remove-Event -SourceIdentifier $LogPath - Remove-Event -SourceIdentifier $errorLogPath - } - - if (-not ($ReturnCode -contains $exitCode)) - { - # Some .exe files do not support uninstall - if ($Ensure -eq 'Absent' -and $fileExtension -eq '.exe' -and $exitCode -eq '1620') - { - Write-Warning -Message ($script:localizedData.ExeCouldNotBeUninstalled -f $Path) - } - else - { - New-InvalidOperationException ($script:localizedData.UnexpectedReturnCode -f $exitCode.ToString()) - } - } - } - } - finally - { - if ($psDrive) - { - Remove-PSDrive -Name $psDrive -Force - } - - if ($logStream) - { - $logStream.Dispose() - } - } - - if ($downloadedFileName -and $PSCmdlet.ShouldProcess($script:localizedData.RemoveDownloadedFile, $null, $null)) - { - <# - This is deliberately not in the finally block because we want to leave the downloaded - file on disk if an error occurred as a debugging aid for the user. - #> - Remove-Item -Path $downloadedFileName - } - - $operationMessageString = $script:localizedData.PackageUninstalled - if ($Ensure -eq 'Present') - { - $operationMessageString = $script:localizedData.PackageInstalled - } - - if ($CreateCheckRegValue) - { - $registryValueString = '{0}\{1}\{2}' -f $InstalledCheckRegHive, $InstalledCheckRegKey, $InstalledCheckRegValueName - if ($Ensure -eq 'Present') - { - Write-Verbose -Message ($script:localizedData.CreatingRegistryValue -f $registryValueString) - Set-RegistryValue -RegistryHive $InstalledCheckRegHive -Key $InstalledCheckRegKey -Value $InstalledCheckRegValueName -Data $InstalledCheckRegValueData - } - else - { - Write-Verbose ($script:localizedData.RemovingRegistryValue -f $registryValueString) - Remove-RegistryValue -RegistryHive $InstalledCheckRegHive -Key $InstalledCheckRegKey -Value $InstalledCheckRegValueName - } - } - - <# - Check if a reboot is required, if so notify CA. The MSFT_ServerManagerTasks provider is - missing on some client SKUs (worked on both Server and Client Skus in Windows 10). - #> - - $serverFeatureData = Invoke-CimMethod -Name 'GetServerFeature' -Namespace 'root\microsoft\windows\servermanager' -Class 'MSFT_ServerManagerTasks' -Arguments @{ BatchSize = 256 } -ErrorAction 'Ignore' - $registryData = Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction 'Ignore' - - if (($serverFeatureData -and $serverFeatureData.RequiresReboot) -or $registryData -or $exitcode -eq 3010 -or $exitcode -eq 1641) - { - Write-Verbose $script:localizedData.MachineRequiresReboot - $global:DSCMachineStatus = 1 - } - elseif ($Ensure -eq 'Present') - { - $getProductEntryParameters = @{ - Name = $Name - IdentifyingNumber = $identifyingNumber - } - - $checkRegistryValueParameters = @{ - CreateCheckRegValue = $CreateCheckRegValue - InstalledCheckRegHive = $InstalledCheckRegHive - InstalledCheckRegKey = $InstalledCheckRegKey - InstalledCheckRegValueName = $InstalledCheckRegValueName - InstalledCheckRegValueData = $InstalledCheckRegValueData - } - - if ($CreateCheckRegValue) - { - $getProductEntryParameters += $checkRegistryValueParameters - } - - $productEntry = Get-ProductEntry @getProductEntryParameters - - if ($null -eq $productEntry) - { - New-InvalidOperationException -Message ($script:localizedData.PostValidationError -f $originalPath) - } - } - - Write-Verbose -Message $operationMessageString - Write-Verbose -Message $script:localizedData.PackageConfigurationComplete -} - -function Test-TargetResource -{ - [OutputType([Boolean])] - [CmdletBinding()] - param - ( - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [Parameter(Mandatory = $true)] - [AllowEmptyString()] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [Parameter(Mandatory = $true)] - [AllowEmptyString()] - [String] - $ProductId, - - [String] - $Arguments, - - [PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - # Return codes 1641 and 3010 indicate success when a restart is requested per installation - [ValidateNotNullOrEmpty()] - [UInt32[]] - $ReturnCode = @( 0, 1641, 3010 ), - - [String] - $LogPath, - - [String] - $FileHash, - - [ValidateSet('SHA1', 'SHA256', 'SHA384', 'SHA512', 'MD5', 'RIPEMD160')] - [String] - $HashAlgorithm, - - [String] - $SignerSubject, - - [String] - $SignerThumbprint, - - [String] - $ServerCertificateValidationCallback, - - [Boolean] - $CreateCheckRegValue = $false, - - [ValidateSet('LocalMachine','CurrentUser')] - [String] - $InstalledCheckRegHive = 'LocalMachine', - - [String] - $InstalledCheckRegKey, - - [String] - $InstalledCheckRegValueName, - - [String] - $InstalledCheckRegValueData, - - [PSCredential] - $RunAsCredential - ) - - Assert-PathExtensionValid -Path $Path - $uri = Convert-PathToUri -Path $Path - $identifyingNumber = $null - - if (-not [String]::IsNullOrEmpty($ProductId)) - { - $identifyingNumber = Convert-ProductIdToIdentifyingNumber -ProductId $ProductId - } - - $getProductEntryParameters = @{ - Name = $Name - IdentifyingNumber = $identifyingNumber - } - - $checkRegistryValueParameters = @{ - CreateCheckRegValue = $CreateCheckRegValue - InstalledCheckRegHive = $InstalledCheckRegHive - InstalledCheckRegKey = $InstalledCheckRegKey - InstalledCheckRegValueName = $InstalledCheckRegValueName - InstalledCheckRegValueData = $InstalledCheckRegValueData - } - - if ($CreateCheckRegValue) - { - Assert-RegistryParametersValid -InstalledCheckRegKey $InstalledCheckRegKey -InstalledCheckRegValueName $InstalledCheckRegValueName -InstalledCheckRegValueData $InstalledCheckRegValueData - $getProductEntryParameters += $checkRegistryValueParameters - } - - $productEntry = Get-ProductEntry @getProductEntryParameters - - Write-Verbose -Message ($script:localizedData.EnsureIsEnsure -f $Ensure) - - if ($null -eq $productEntry) - { - Write-Verbose -Message ($script:localizedData.ProductIsProduct -f $productEntry) - } - else - { - Write-Verbose -Message 'Product installation cannot be determined' - } - - Write-Verbose -Message ($script:localizedData.ProductAsBooleanIs -f [Boolean]$productEntry) - - if ($null -ne $productEntry) - { - if ($CreateCheckRegValue) - { - Write-Verbose -Message ($script:localizedData.PackageAppearsInstalled -f $Name) - } - else - { - $displayName = Get-LocalizedRegistryKeyValue -RegistryKey $productEntry -ValueName 'DisplayName' - Write-Verbose -Message ($script:localizedData.PackageAppearsInstalled -f $displayName) - } - } - else - { - $displayName = $null - - if (-not [String]::IsNullOrEmpty($Name)) - { - $displayName = $Name - } - else - { - $displayName = $ProductId - } - - Write-Verbose -Message ($script:localizedData.PackageDoesNotAppearInstalled -f $displayName) - } - - return ($null -ne $productEntry -and $Ensure -eq 'Present') -or ($null -eq $productEntry -and $Ensure -eq 'Absent') -} - -<# - .SYNOPSIS - Asserts that the path extension is valid - either .msi or .exe. - - .PARAMETER Path - The path to validate the extension of. -#> -function Assert-PathExtensionValid -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path - ) - - $pathExtension = [System.IO.Path]::GetExtension($Path) - Write-Verbose -Message ($script:localizedData.ThePathExtensionWasPathExt -f $pathExtension) - - $validPathExtensions = @( '.msi', '.exe' ) - - if ($validPathExtensions -notcontains $pathExtension.ToLower()) - { - New-InvalidArgumentException -ArgumentName 'Path' -Message ($script:localizedData.InvalidBinaryType -f $Path) - } -} - -<# - .SYNOPSIS - Converts the given path to a URI. - Throws an exception if the path's scheme as a URI is not valid. - - .PARAMETER Path - The path to retrieve as a URI. -#> -function Convert-PathToUri -{ - [OutputType([Uri])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path - ) - - try - { - $uri = [Uri] $Path - } - catch - { - New-InvalidArgumentException -ArgumentName 'Path' -Message ($script:localizedData.InvalidPath -f $Path) - } - - $validUriSchemes = @( 'file', 'http', 'https' ) - - if ($validUriSchemes -notcontains $uri.Scheme) - { - Write-Verbose -Message ($Localized.TheUriSchemeWasUriScheme -f $uri.Scheme) - New-InvalidArgumentException -ArgumentName 'Path' -Message ($script:localizedData.InvalidPath -f $Path) - } - - return $uri -} - -<# - .SYNOPSIS - Retrieves the product ID as an identifying number. - - .PARAMETER ProductId - The product id to retrieve as an identifying number. -#> -function Convert-ProductIdToIdentifyingNumber -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ProductId - ) - - try - { - Write-Verbose -Message ($script:localizedData.ParsingProductIdAsAnIdentifyingNumber -f $ProductId) - $identifyingNumber = '{{{0}}}' -f [Guid]::Parse($ProductId).ToString().ToUpper() - - Write-Verbose -Message ($script:localizedData.ParsedProductIdAsIdentifyingNumber -f $ProductId, $identifyingNumber) - return $identifyingNumber - } - catch - { - New-InvalidArgumentException -ArgumentName 'ProductId' -Message ($script:localizedData.InvalidIdentifyingNumber -f $ProductId) - } -} - -<# - .SYNOPSIS - Asserts that the InstalledCheckRegKey, InstalledCheckRegValueName, and - InstalledCheckRegValueData parameter required for retrieving package installation status - from a registry are not null or empty. - - .PARAMETER InstalledCheckRegKey - The InstalledCheckRegKey parameter to check. - - .PARAMETER InstalledCheckRegValueName - The InstalledCheckRegValueName parameter to check. - - .PARAMETER InstalledCheckRegValueData - The InstalledCheckRegValueData parameter to check. - - .NOTES - This could be done with parameter validation. - It is implemented this way to provide a clearer error message. -#> -function Assert-RegistryParametersValid -{ - [CmdletBinding()] - param - ( - [String] - $InstalledCheckRegKey, - - [String] - $InstalledCheckRegValueName, - - [String] - $InstalledCheckRegValueData - ) - - foreach ($parameter in $PSBoundParameters.Keys) - { - if ([String]::IsNullOrEmpty($PSBoundParameters[$parameter])) - { - New-InvalidArgumentException -ArgumentName $parameter -Message ($script:localizedData.ProvideParameterForRegistryCheck -f $parameter) - } - } -} - -<# - .SYNOPSIS - Retrieves the product entry for the package with the given name and/or identifying number. - - .PARAMETER Name - The name of the product entry to retrieve. - - .PARAMETER CreateCheckRegValue - Indicates whether or not to retrieve the package installation status from a registry. - - .PARAMETER IdentifyingNumber - The identifying number of the product entry to retrieve. - - .PARAMETER InstalledCheckRegHive - The registry hive to check for package installation status. - - .PARAMETER InstalledCheckRegKey - The registry key to open to check for package installation status. - - .PARAMETER InstalledCheckRegValueName - The registry value name to check for package installation status. - - .PARAMETER InstalledCheckRegValueData - The value to compare against the retrieved registry value to check for package installation. -#> -function Get-ProductEntry -{ - [CmdletBinding()] - param - ( - [String] - $Name, - - [String] - $IdentifyingNumber, - - [Switch] - $CreateCheckRegValue, - - [ValidateSet('LocalMachine', 'CurrentUser')] - [String] - $InstalledCheckRegHive = 'LocalMachine', - - [String] - $InstalledCheckRegKey, - - [String] - $InstalledCheckRegValueName, - - [String] - $InstalledCheckRegValueData - ) - - $uninstallRegistryKey = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall' - $uninstallRegistryKeyWow64 = 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall' - - $productEntry = $null - - if (-not [String]::IsNullOrEmpty($IdentifyingNumber)) - { - $productEntryKeyLocation = Join-Path -Path $uninstallRegistryKey -ChildPath $IdentifyingNumber - $productEntry = Get-Item -Path $productEntryKeyLocation -ErrorAction 'SilentlyContinue' - - if ($null -eq $productEntry) - { - $productEntryKeyLocation = Join-Path -Path $uninstallRegistryKeyWow64 -ChildPath $IdentifyingNumber - $productEntry = Get-Item $productEntryKeyLocation -ErrorAction 'SilentlyContinue' - } - } - else - { - foreach ($registryKeyEntry in (Get-ChildItem -Path @( $uninstallRegistryKey, $uninstallRegistryKeyWow64) -ErrorAction 'Ignore' )) - { - if ($Name -eq (Get-LocalizedRegistryKeyValue -RegistryKey $registryKeyEntry -ValueName 'DisplayName')) - { - $productEntry = $registryKeyEntry - break - } - } - } - - if ($null -eq $productEntry) - { - if ($CreateCheckRegValue) - { - $installValue = $null - - $win32OperatingSystem = Get-CimInstance -ClassName 'Win32_OperatingSystem' -ErrorAction 'SilentlyContinue' - - # If 64-bit OS, check 64-bit registry view first - if ($win32OperatingSystem.OSArchitecture -ieq '64-bit') - { - $installValue = Get-RegistryValueWithErrorsIgnored -Key $InstalledCheckRegKey -Value $InstalledCheckRegValueName -RegistryHive $InstalledCheckRegHive -RegistryView 'Registry64' - } - - if ($null -eq $installValue) - { - $installValue = Get-RegistryValueWithErrorsIgnored -Key $InstalledCheckRegKey -Value $InstalledCheckRegValueName -RegistryHive $InstalledCheckRegHive -RegistryView 'Registry32' - } - - if ($null -ne $installValue) - { - if ($InstalledCheckRegValueData -and $installValue -eq $InstalledCheckRegValueData) - { - $productEntry = @{ - Installed = $true - } - } - } - } - } - - return $productEntry -} - -<# - .SYNOPSIS - Retrieves a value from a registry without throwing errors. - - .PARAMETER Key - The key of the registry to get the value from. - - .PARAMETER Value - The name of the value to retrieve. - - .PARAMETER RegistryHive - The registry hive to retrieve the value from. - - .PARAMETER RegistyView - The registry view to retrieve the value from. -#> -function Get-RegistryValueWithErrorsIgnored -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] - $Key, - - [Parameter(Mandatory = $true)] - [String] - $Value, - - [Parameter(Mandatory = $true)] - [Microsoft.Win32.RegistryHive] - $RegistryHive, - - [Parameter(Mandatory = $true)] - [Microsoft.Win32.RegistryView] - $RegistryView - ) - - $registryValue = $null - - try - { - $baseRegistryKey = [Microsoft.Win32.RegistryKey]::OpenBaseKey($RegistryHive, $RegistryView) - $subRegistryKey = $baseRegistryKey.OpenSubKey($Key) - - if ($null -ne $subRegistryKey) - { - $registryValue = $subRegistryKey.GetValue($Value) - } - } - catch - { - $exceptionText = ($_ | Out-String).Trim() - Write-Verbose -Message "An exception occured while attempting to retrieve a registry value: $exceptionText" - } - - return $registryValue -} - -<# - .SYNOPSIS - Retrieves a localized registry key value. - - .PARAMETER RegistryKey - The registry key to retrieve the value from. - - .PARAMETER ValueName - The name of the value to retrieve. -#> -function Get-LocalizedRegistryKeyValue -{ - [CmdletBinding()] - param - ( - [Object] - $RegistryKey, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ValueName - ) - - $localizedRegistryKeyValue = $RegistryKey.GetValue('{0}_Localized' -f $ValueName) - - if ($null -eq $localizedRegistryKeyValue) - { - $localizedRegistryKeyValue = $RegistryKey.GetValue($ValueName) - } - - return $localizedRegistryKeyValue -} - -<# - .SYNOPSIS - Asserts that the file at the given path is valid. - - .PARAMETER Path - The path to the file to check. - - .PARAMETER FileHash - The hash that should match the hash of the file. - - .PARAMETER HashAlgorithm - The algorithm to use to retrieve the file hash. - - .PARAMETER SignerThumbprint - The certificate thumbprint that should match the file's signer certificate. - - .PARAMETER SignerSubject - The certificate subject that should match the file's signer certificate. -#> -function Assert-FileValid -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] - $Path, - - [String] - $FileHash, - - [String] - $HashAlgorithm, - - [String] - $SignerThumbprint, - - [String] - $SignerSubject - ) - - if (-not [String]::IsNullOrEmpty($FileHash)) - { - Assert-FileHashValid -Path $Path -Hash $FileHash -Algorithm $HashAlgorithm - } - - if (-not [String]::IsNullOrEmpty($SignerThumbprint) -or -not [String]::IsNullOrEmpty($SignerSubject)) - { - Assert-FileSignatureValid -Path $Path -Thumbprint $SignerThumbprint -Subject $SignerSubject - } -} - -<# - .SYNOPSIS - Asserts that the hash of the file at the given path matches the given hash. - - .PARAMETER Path - The path to the file to check the hash of. - - .PARAMETER Hash - The hash to check against. - - .PARAMETER Algorithm - The algorithm to use to retrieve the file's hash. -#> -function Assert-FileHashValid -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] - $Path, - - [Parameter(Mandatory)] - [String] - $Hash, - - [String] - $Algorithm = 'SHA256' - ) - - if ([String]::IsNullOrEmpty($Algorithm)) - { - $Algorithm = 'SHA256' - } - - Write-Verbose -Message ($script:localizedData.CheckingFileHash -f $Path, $Hash, $Algorithm) - - $fileHash = Get-FileHash -LiteralPath $Path -Algorithm $Algorithm -ErrorAction 'Stop' - - if ($fileHash.Hash -ne $Hash) - { - throw ($script:localizedData.InvalidFileHash -f $Path, $Hash, $Algorithm) - } -} - -<# - .SYNOPSIS - Asserts that the signature of the file at the given path is valid. - - .PARAMETER Path - The path to the file to check the signature of - - .PARAMETER Thumbprint - The certificate thumbprint that should match the file's signer certificate. - - .PARAMETER Subject - The certificate subject that should match the file's signer certificate. -#> -function Assert-FileSignatureValid -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] - $Path, - - [String] - $Thumbprint, - - [String] - $Subject - ) - - Write-Verbose -Message ($script:localizedData.CheckingFileSignature -f $Path) - - $signature = Get-AuthenticodeSignature -LiteralPath $Path -ErrorAction 'Stop' - - if ($signature.Status -ne [System.Management.Automation.SignatureStatus]::Valid) - { - throw ($script:localizedData.InvalidFileSignature -f $Path, $signature.Status) - } - else - { - Write-Verbose -Message ($script:localizedData.FileHasValidSignature -f $Path, $signature.SignerCertificate.Thumbprint, $signature.SignerCertificate.Subject) - } - - if ($null -ne $Subject -and ($signature.SignerCertificate.Subject -notlike $Subject)) - { - throw ($script:localizedData.WrongSignerSubject -f $Path, $Subject) - } - - if ($null -ne $Thumbprint -and ($signature.SignerCertificate.Thumbprint -ne $Thumbprint)) - { - throw ($script:localizedData.WrongSignerThumbprint -f $Path, $Thumbprint) - } -} - -<# - .SYNOPSIS - Retrieves the name of a product from an msi. - - .PARAMETER Path - The path to the msi to retrieve the name from. -#> -function Get-MsiProductName -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path - ) - - $msiTools = Get-MsiTool - - $productName = $msiTools::GetProductName($Path) - - return $productName -} - -<# - .SYNOPSIS - Retrieves the code of a product from an msi. - - .PARAMETER Path - The path to the msi to retrieve the code from. -#> -function Get-MsiProductCode -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path - ) - - $msiTools = Get-MsiTool - - $productCode = $msiTools::GetProductCode($Path) - - return $productCode -} - -<# - .SYNOPSIS - Retrieves the MSI tools type. -#> -function Get-MsiTool -{ - [OutputType([System.Type])] - [CmdletBinding()] - param () - - if ($null -ne $script:msiTools) - { - return $script:msiTools - } - - $msiToolsCodeDefinition = @' - [DllImport("msi.dll", CharSet = CharSet.Unicode, PreserveSig = true, SetLastError = true, ExactSpelling = true)] - private static extern UInt32 MsiOpenPackageExW(string szPackagePath, int dwOptions, out IntPtr hProduct); - - [DllImport("msi.dll", CharSet = CharSet.Unicode, PreserveSig = true, SetLastError = true, ExactSpelling = true)] - private static extern uint MsiCloseHandle(IntPtr hAny); - - [DllImport("msi.dll", CharSet = CharSet.Unicode, PreserveSig = true, SetLastError = true, ExactSpelling = true)] - private static extern uint MsiGetPropertyW(IntPtr hAny, string name, StringBuilder buffer, ref int bufferLength); - - private static string GetPackageProperty(string msi, string property) - { - IntPtr MsiHandle = IntPtr.Zero; - try - { - var res = MsiOpenPackageExW(msi, 1, out MsiHandle); - if (res != 0) - { - return null; - } - - int length = 256; - var buffer = new StringBuilder(length); - res = MsiGetPropertyW(MsiHandle, property, buffer, ref length); - return buffer.ToString(); - } - finally - { - if (MsiHandle != IntPtr.Zero) - { - MsiCloseHandle(MsiHandle); - } - } - } - public static string GetProductCode(string msi) - { - return GetPackageProperty(msi, "ProductCode"); - } - - public static string GetProductName(string msi) - { - return GetPackageProperty(msi, "ProductName"); - } -'@ - - if (([System.Management.Automation.PSTypeName]'Microsoft.Windows.DesiredStateConfiguration.xPackageResource.MsiTools').Type) - { - $script:msiTools = ([System.Management.Automation.PSTypeName]'Microsoft.Windows.DesiredStateConfiguration.xPackageResource.MsiTools').Type - } - else - { - $script:msiTools = Add-Type ` - -Namespace 'Microsoft.Windows.DesiredStateConfiguration.xPackageResource' ` - -Name 'MsiTools' ` - -Using 'System.Text' ` - -MemberDefinition $msiToolsCodeDefinition ` - -PassThru - } - - return $script:msiTools -} - -<# - .SYNOPSIS - Runs a process as the specified user via PInvoke. - - .PARAMETER CommandLine - The command line (including arguments) of the process to start. - - .PARAMETER Credential - The user credential to start the process as. -#> -function Invoke-PInvoke -{ - [CmdletBinding()] - [OutputType([System.Int32])] - param - ( - [Parameter(Mandatory = $true)] - [String] - $CommandLine, - - [Parameter(Mandatory)] - [PSCredential] - [System.Management.Automation.CredentialAttribute()] - $Credential - ) - - Register-PInvoke - [System.Int32] $exitCode = 0 - - [Source.NativeMethods]::CreateProcessAsUser($CommandLine, ` - $Credential.GetNetworkCredential().Domain, ` - $Credential.GetNetworkCredential().UserName, ` - $Credential.GetNetworkCredential().Password, ` - [ref] $exitCode - ) - - return $exitCode; -} - -<# - .SYNOPSIS - Starts and waits for a process. - - .DESCRIPTION - Allows mocking and testing of process arguments. - - .PARAMETER Process - The System.Diagnositics.Process object to start. - - .PARAMETER LogStream - Redirect STDOUT and STDERR output. -#> -function Invoke-Process -{ - [CmdletBinding()] - [OutputType([System.Diagnostics.Process])] - param ( - [Parameter(Mandatory)] - [System.Diagnostics.Process] - $Process, - - [Parameter()] - [System.Boolean] - $LogStream - ) - - $Process.Start() | Out-Null - - if ($LogStream) - { - $Process.BeginOutputReadLine() - $Process.BeginErrorReadLine() - } - - $Process.WaitForExit() - return $Process -} - -<# - .SYNOPSIS - Sets the value of a registry key to the specified data. - - .PARAMETER Key - The registry key that contains the value to set. - - .PARAMETER Value - The value name of the registry key value to set. - - .PARAMETER RegistryHive - The registry hive that contains the registry key to set. - - .PARAMETER Data - The data to set the registry key value to. -#> -function Set-RegistryValue -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] - $Key, - - [Parameter(Mandatory = $true)] - [String] - $Value, - - [Parameter(Mandatory = $true)] - [Microsoft.Win32.RegistryHive] - $RegistryHive, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Data - ) - - try - { - $baseRegistryKey = [Microsoft.Win32.RegistryKey]::OpenBaseKey($RegistryHive, [Microsoft.Win32.RegistryView]::Default) - - # Opens the subkey with write access - $subRegistryKey = $baseRegistryKey.OpenSubKey($Key, $true) - - if ($null -eq $subRegistryKey) - { - Write-Verbose "Key: '$Key'" - $subRegistryKey = $baseRegistryKey.CreateSubKey($Key) - } - - $subRegistryKey.SetValue($Value, $Data) - $subRegistryKey.Close() - } - catch - { - New-InvalidOperationException -Message ($script:localizedData.ErrorSettingRegistryValue -f $Key, $Value, $Data) -ErrorRecord $_ - } -} - -<# - .SYNOPSIS - Removes the specified value of a registry key. - - .PARAMETER Key - The registry key that contains the value to remove. - - .PARAMETER Value - The value name of the registry key value to remove. - - .PARAMETER RegistryHive - The registry hive that contains the registry key to remove. -#> -function Remove-RegistryValue -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] - $Key, - - [Parameter(Mandatory = $true)] - [String] - $Value, - - [Parameter(Mandatory = $true)] - [Microsoft.Win32.RegistryHive] - $RegistryHive - ) - - try - { - $baseRegistryKey = [Microsoft.Win32.RegistryKey]::OpenBaseKey($RegistryHive, [Microsoft.Win32.RegistryView]::Default) - - $subRegistryKey = $baseRegistryKey.OpenSubKey($Key, $true) - $subRegistryKey.DeleteValue($Value) - $subRegistryKey.Close() - } - catch - { - New-InvalidOperationException -Message ($script:localizedData.ErrorRemovingRegistryValue -f $Key, $Value) -ErrorRecord $_ - } -} - -<# - .SYNOPSIS - Registers PInvoke to run a process as a user. -#> -function Register-PInvoke -{ - $programSource = @' - using System; - using System.Collections.Generic; - using System.Text; - using System.Security; - using System.Runtime.InteropServices; - using System.Diagnostics; - using System.Security.Principal; - using System.ComponentModel; - using System.IO; - - namespace Source - { - [SuppressUnmanagedCodeSecurity] - public static class NativeMethods - { - //The following structs and enums are used by the various Win32 API's that are used in the code below - - [StructLayout(LayoutKind.Sequential)] - public struct STARTUPINFO - { - public Int32 cb; - public string lpReserved; - public string lpDesktop; - public string lpTitle; - public Int32 dwX; - public Int32 dwY; - public Int32 dwXSize; - public Int32 dwXCountChars; - public Int32 dwYCountChars; - public Int32 dwFillAttribute; - public Int32 dwFlags; - public Int16 wShowWindow; - public Int16 cbReserved2; - public IntPtr lpReserved2; - public IntPtr hStdInput; - public IntPtr hStdOutput; - public IntPtr hStdError; - } - - [StructLayout(LayoutKind.Sequential)] - public struct PROCESS_INFORMATION - { - public IntPtr hProcess; - public IntPtr hThread; - public Int32 dwProcessID; - public Int32 dwThreadID; - } - - [Flags] - public enum LogonType - { - LOGON32_LOGON_INTERACTIVE = 2, - LOGON32_LOGON_NETWORK = 3, - LOGON32_LOGON_BATCH = 4, - LOGON32_LOGON_SERVICE = 5, - LOGON32_LOGON_UNLOCK = 7, - LOGON32_LOGON_NETWORK_CLEARTEXT = 8, - LOGON32_LOGON_NEW_CREDENTIALS = 9 - } - - [Flags] - public enum LogonProvider - { - LOGON32_PROVIDER_DEFAULT = 0, - LOGON32_PROVIDER_WINNT35, - LOGON32_PROVIDER_WINNT40, - LOGON32_PROVIDER_WINNT50 - } - [StructLayout(LayoutKind.Sequential)] - public struct SECURITY_ATTRIBUTES - { - public Int32 Length; - public IntPtr lpSecurityDescriptor; - public bool bInheritHandle; - } - - public enum SECURITY_IMPERSONATION_LEVEL - { - SecurityAnonymous, - SecurityIdentification, - SecurityImpersonation, - SecurityDelegation - } - - public enum TOKEN_TYPE - { - TokenPrimary = 1, - TokenImpersonation - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - internal struct TokPriv1Luid - { - public int Count; - public long Luid; - public int Attr; - } - - public const int GENERIC_ALL_ACCESS = 0x10000000; - public const int CREATE_NO_WINDOW = 0x08000000; - internal const int SE_PRIVILEGE_ENABLED = 0x00000002; - internal const int TOKEN_QUERY = 0x00000008; - internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; - internal const string SE_INCRASE_QUOTA = "SeIncreaseQuotaPrivilege"; - - [DllImport("kernel32.dll", - EntryPoint = "CloseHandle", SetLastError = true, - CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] - public static extern bool CloseHandle(IntPtr handle); - - [DllImport("advapi32.dll", - EntryPoint = "CreateProcessAsUser", SetLastError = true, - CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] - public static extern bool CreateProcessAsUser( - IntPtr hToken, - string lpApplicationName, - string lpCommandLine, - ref SECURITY_ATTRIBUTES lpProcessAttributes, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - bool bInheritHandle, - Int32 dwCreationFlags, - IntPtr lpEnvrionment, - string lpCurrentDirectory, - ref STARTUPINFO lpStartupInfo, - ref PROCESS_INFORMATION lpProcessInformation - ); - - [DllImport("advapi32.dll", EntryPoint = "DuplicateTokenEx")] - public static extern bool DuplicateTokenEx( - IntPtr hExistingToken, - Int32 dwDesiredAccess, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - Int32 ImpersonationLevel, - Int32 dwTokenType, - ref IntPtr phNewToken - ); - - [DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)] - public static extern Boolean LogonUser( - String lpszUserName, - String lpszDomain, - String lpszPassword, - LogonType dwLogonType, - LogonProvider dwLogonProvider, - out IntPtr phToken - ); - - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern bool AdjustTokenPrivileges( - IntPtr htok, - bool disall, - ref TokPriv1Luid newst, - int len, - IntPtr prev, - IntPtr relen - ); - - [DllImport("kernel32.dll", ExactSpelling = true)] - internal static extern IntPtr GetCurrentProcess(); - - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern bool OpenProcessToken( - IntPtr h, - int acc, - ref IntPtr phtok - ); - - [DllImport("kernel32.dll", ExactSpelling = true)] - internal static extern int WaitForSingleObject( - IntPtr h, - int milliseconds - ); - - [DllImport("kernel32.dll", ExactSpelling = true)] - internal static extern bool GetExitCodeProcess( - IntPtr h, - out int exitcode - ); - - [DllImport("advapi32.dll", SetLastError = true)] - internal static extern bool LookupPrivilegeValue( - string host, - string name, - ref long pluid - ); - - public static void CreateProcessAsUser(string strCommand, string strDomain, string strName, string strPassword, ref int ExitCode ) - { - var hToken = IntPtr.Zero; - var hDupedToken = IntPtr.Zero; - TokPriv1Luid tp; - var pi = new PROCESS_INFORMATION(); - var sa = new SECURITY_ATTRIBUTES(); - sa.Length = Marshal.SizeOf(sa); - Boolean bResult = false; - try - { - bResult = LogonUser( - strName, - strDomain, - strPassword, - LogonType.LOGON32_LOGON_BATCH, - LogonProvider.LOGON32_PROVIDER_DEFAULT, - out hToken - ); - if (!bResult) - { - throw new Win32Exception("Logon error #" + Marshal.GetLastWin32Error().ToString()); - } - IntPtr hproc = GetCurrentProcess(); - IntPtr htok = IntPtr.Zero; - bResult = OpenProcessToken( - hproc, - TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, - ref htok - ); - if(!bResult) - { - throw new Win32Exception("Open process token error #" + Marshal.GetLastWin32Error().ToString()); - } - tp.Count = 1; - tp.Luid = 0; - tp.Attr = SE_PRIVILEGE_ENABLED; - bResult = LookupPrivilegeValue( - null, - SE_INCRASE_QUOTA, - ref tp.Luid - ); - if(!bResult) - { - throw new Win32Exception("Lookup privilege error #" + Marshal.GetLastWin32Error().ToString()); - } - bResult = AdjustTokenPrivileges( - htok, - false, - ref tp, - 0, - IntPtr.Zero, - IntPtr.Zero - ); - if(!bResult) - { - throw new Win32Exception("Token elevation error #" + Marshal.GetLastWin32Error().ToString()); - } - - bResult = DuplicateTokenEx( - hToken, - GENERIC_ALL_ACCESS, - ref sa, - (int)SECURITY_IMPERSONATION_LEVEL.SecurityIdentification, - (int)TOKEN_TYPE.TokenPrimary, - ref hDupedToken - ); - if(!bResult) - { - throw new Win32Exception("Duplicate Token error #" + Marshal.GetLastWin32Error().ToString()); - } - var si = new STARTUPINFO(); - si.cb = Marshal.SizeOf(si); - si.lpDesktop = ""; - bResult = CreateProcessAsUser( - hDupedToken, - null, - strCommand, - ref sa, - ref sa, - false, - 0, - IntPtr.Zero, - null, - ref si, - ref pi - ); - if(!bResult) - { - throw new Win32Exception("Create process as user error #" + Marshal.GetLastWin32Error().ToString()); - } - - int status = WaitForSingleObject(pi.hProcess, -1); - if(status == -1) - { - throw new Win32Exception("Wait during create process failed user error #" + Marshal.GetLastWin32Error().ToString()); - } - - bResult = GetExitCodeProcess(pi.hProcess, out ExitCode); - if(!bResult) - { - throw new Win32Exception("Retrieving status error #" + Marshal.GetLastWin32Error().ToString()); - } - } - finally - { - if (pi.hThread != IntPtr.Zero) - { - CloseHandle(pi.hThread); - } - if (pi.hProcess != IntPtr.Zero) - { - CloseHandle(pi.hProcess); - } - if (hDupedToken != IntPtr.Zero) - { - CloseHandle(hDupedToken); - } - } - } - } - } -'@ - Add-Type -TypeDefinition $programSource -ReferencedAssemblies 'System.ServiceProcess' -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.schema.mof b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.schema.mof deleted file mode 100644 index 6c7f46ac..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.schema.mof +++ /dev/null @@ -1,29 +0,0 @@ -[ClassVersion("1.0.0"),FriendlyName("xPackage")] -class MSFT_xPackageResource : OMI_BaseResource -{ - [write,ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] string Ensure; - [Key] string Name; - [required] string Path; - [Key] string ProductId; - [write] string Arguments; - [write,EmbeddedInstance("MSFT_Credential")] string Credential; - [write] uint32 ReturnCode[]; - [write] string LogPath; - [read] string PackageDescription; - [read] string Publisher; - [read] string InstalledOn; - [read] uint32 Size; - [read] string Version; - [read] boolean Installed; - [write] string FileHash; - [write,ValueMap{"SHA1","SHA256","SHA384","SHA512","MD5","RIPEMD160"},Values{"SHA1","SHA256","SHA384","SHA512","MD5","RIPEMD160"}] string HashAlgorithm; - [write] string SignerSubject; - [write] string SignerThumbprint; - [write] string ServerCertificateValidationCallback; - [write,ValueMap{"LocalMachine","CurrentUser"},Values{"LocalMachine","CurrentUser"}] string InstalledCheckRegHive; - [write] string InstalledCheckRegKey; - [write] string InstalledCheckRegValueName; - [write] string InstalledCheckRegValueData; - [write] boolean CreateCheckRegValue; - [write,EmbeddedInstance("MSFT_Credential")] string RunAsCredential; -}; diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/en-US/MSFT_xPackageResource.schema.mfl b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/en-US/MSFT_xPackageResource.schema.mfl deleted file mode 100644 index e06b4ad3..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/en-US/MSFT_xPackageResource.schema.mfl +++ /dev/null @@ -1,32 +0,0 @@ -#pragma namespace("\\\\.\\root\\default") -instance of __namespace{ name="MS_409";}; -#pragma namespace("\\\\.\\root\\default\\MS_409") - -[AMENDMENT, LOCALE("MS_409")] -class MSFT_xPackageResource : OMI_BaseResource -{ - [Description("Indicates whether to Ensure that the package is Present or Absent (default Present)") : Amended] string Ensure; - [Key,Description("The name of the package to be added or removed") : Amended] string Name; - [Description("The path, URL or UNC path to the package") : Amended] string Path; - [Key,Description("The identifying number used to uniquely identify this package") : Amended] string ProductId; - [Description("The arguments to be passed to the package during addition or removal") : Amended] string Arguments; - [Description("The credentials to be used for mounting the UNC path (if applicable)") : Amended] string Credential; - [Description("The list of possible valid return codes for this install or removal") : Amended] uint32 ReturnCode[]; - [Description("The path to log the output of the MSI or EXE") : Amended] string LogPath; - [Description("The description of the identified package") : Amended] string PackageDescription; - [Description("The publisher for the identified package") : Amended] string Publisher; - [Description("The date that the identified package was last serviced or its install date, whichever is later") : Amended] string InstalledOn; - [Description("The size of the identified package") : Amended] uint32 Size; - [Description("The version number of the identified package") : Amended] string Version; - [Description("Whether the identified package is installed") : Amended] boolean Installed; - [Description("The credentials under which to run the installation") : Amended] string RunAsCredential; - [Description("The expected hash value of the file found in the Path location.") : Amended] string FileHash; - [Description("The algorithm used to generate the FileHash value. Defaults to SHA256") : Amended] string HashAlgorithm; - [Description("The subject that must match the signer certificate of the digital signature. Wildcards are allowed.") : Amended] string SignerSubject; - [Description("The certificate thumbprint which must match the signer certificate of the digital signature.") : Amended] string SignerThumbprint; - [Description("PowerShell code used to validate SSL certificates of HTTPS url assigned to Path.") : Amended] string ServerCertificateValidationCallback; - [Description("The Registry key to validate the package is installed") : Amended] string InstalledCheckRegKey; - [Description("The Registry value name to validate the package is installed") : Amended] string InstalledCheckRegValueName; - [Description("The Registry value to validate the package is installed") : Amended] string InstalledCheckRegValueData; -}; - diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/en-US/MSFT_xPackageResource.strings.psd1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/en-US/MSFT_xPackageResource.strings.psd1 deleted file mode 100644 index ebd8a560..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/en-US/MSFT_xPackageResource.strings.psd1 +++ /dev/null @@ -1,68 +0,0 @@ -# Localized resources for MSFT_xPackageResource - -ConvertFrom-StringData @' - InvalidIdentifyingNumber = The specified IdentifyingNumber ({0}) is not a valid Guid - InvalidPath = The specified Path ({0}) is not in a valid format. Valid formats are local paths, UNC, and HTTP - InvalidNameOrId = The specified Name ({0}) and IdentifyingNumber ({1}) do not match Name ({2}) and IdentifyingNumber ({3}) in the MSI file - NeedsMoreInfo = Either Name or ProductId is required - InvalidBinaryType = The specified Path ({0}) does not appear to specify an EXE or MSI file and as such is not supported - CouldNotOpenLog = The specified LogPath ({0}) could not be opened - CouldNotStartProcess = The process {0} could not be started - UnexpectedReturnCode = The return code {0} was not expected. Configuration is likely not correct - PathDoesNotExist = The given Path ({0}) could not be found - CouldNotOpenDestFile = Could not open the file {0} for writing - CouldNotGetHttpStream = Could not get the {0} stream for file {1} - ErrorCopyingDataToFile = Encountered error while writing the contents of {0} to {1} - PackageConfigurationComplete = Package configuration finished - PackageConfigurationStarting = Package configuration starting - InstalledPackage = Installed package - UninstalledPackage = Uninstalled package - NoChangeRequired = Package found in desired state, no action required - RemoveExistingLogFile = Remove existing log file - CreateLogFile = Create log file - MountSharePath = Mount share to get media - DownloadHTTPFile = Download the media over HTTP or HTTPS - StartingProcessMessage = Starting process {0} with arguments {1} - RemoveDownloadedFile = Remove the downloaded file - PackageInstalled = Package has been installed - PackageUninstalled = Package has been uninstalled - MachineRequiresReboot = The machine requires a reboot - PackageDoesNotAppearInstalled = The package {0} is not installed - PackageAppearsInstalled = The package {0} is installed - PostValidationError = Package from {0} was installed, but the specified ProductId and/or Name does not match package details - CheckingFileHash = Checking file '{0}' for expected {2} hash value of {1} - InvalidFileHash = File '{0}' does not match expected {2} hash value of {1}. - CheckingFileSignature = Checking file '{0}' for valid digital signature. - FileHasValidSignature = File '{0}' contains a valid digital signature. Signer Thumbprint: {1}, Subject: {2} - InvalidFileSignature = File '{0}' does not have a valid Authenticode signature. Status: {1} - WrongSignerSubject = File '{0}' was not signed by expected signer subject '{1}' - WrongSignerThumbprint = File '{0}' was not signed by expected signer certificate thumbprint '{1}' - CreatingRegistryValue = Creating package registry value of {0}. - RemovingRegistryValue = Removing package registry value of {0}. - ValidateStandardArgumentsPathwasPath = Validate-StandardArguments, Path was {0} - TheurischemewasuriScheme = The uri scheme was {0} - ThepathextensionwaspathExt = The path extension was {0} - ParsingProductIdasanidentifyingNumber = Parsing {0} as an identifyingNumber - ParsedProductIdasidentifyingNumber = Parsed {0} as {1} - EnsureisEnsure = Ensure is {0} - productisproduct = product {0} found - productasbooleanis = product as boolean is {0} - Creatingcachelocation = Creating cache location - NeedtodownloadfilefromschemedestinationwillbedestName = Need to download file from {0}, destination will be {1} - Creatingthedestinationcachefile = Creating the destination cache file - Creatingtheschemestream = Creating the {0} stream - Settingdefaultcredential = Setting default credential - Settingauthenticationlevel = Setting authentication level - Ignoringbadcertificates = Ignoring bad certificates - Gettingtheschemeresponsestream = Getting the {0} response stream - ErrorOutString = Error: {0} - Copyingtheschemestreambytestothediskcache = Copying the {0} stream bytes to the disk cache - Redirectingpackagepathtocachefilelocation = Redirecting package path to cache file location - ThebinaryisanEXE = The binary is an EXE - Userhasrequestedloggingneedtoattacheventhandlerstotheprocess = User has requested logging, need to attach event handlers to the process - StartingwithstartInfoFileNamestartInfoArguments = Starting {0} with {1} - ProvideParameterForRegistryCheck = Please provide the {0} parameter in order to check for installation status from a registry key. - ErrorSettingRegistryValue = An error occured while attempting to set the registry key {0} value {1} to {2} - ErrorRemovingRegistryValue = An error occured while attempting to remove the registry key {0} value {1} - ExeCouldNotBeUninstalled = The .exe file found at {0} could not be uninstalled. The uninstall functionality may not be implemented in this .exe file. -'@ diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRegistryResource/MSFT_xRegistryResource.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRegistryResource/MSFT_xRegistryResource.psm1 deleted file mode 100644 index d7ab657f..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRegistryResource/MSFT_xRegistryResource.psm1 +++ /dev/null @@ -1,1451 +0,0 @@ -$errorActionPreference = 'Stop' -Set-StrictMode -Version 'Latest' - -# Import CommonResourceHelper for Get-LocalizedData -$script:dscResourcesFolderFilePath = Split-Path $PSScriptRoot -Parent -$script:commonResourceHelperFilePath = Join-Path -Path $script:dscResourcesFolderFilePath -ChildPath 'CommonResourceHelper.psm1' -Import-Module -Name $script:commonResourceHelperFilePath - -# Localized messages for verbose and error statements in this resource -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xRegistryResource' - -$script:registryDriveRoots = @{ - 'HKCC' = 'HKEY_CURRENT_CONFIG' - 'HKCR' = 'HKEY_CLASSES_ROOT' - 'HKCU' = 'HKEY_CURRENT_USER' - 'HKLM' = 'HKEY_LOCAL_MACHINE' - 'HKUS' = 'HKEY_USERS' -} - -<# - .SYNOPSIS - Retrieves the current state of the Registry resource with the given Key. - - .PARAMETER Key - The path of the registry key to retrieve the state of. - This path must include the registry hive. - - .PARAMETER ValueName - The name of the registry value to retrieve the state of. - - .PARAMETER ValueData - Used only as a boolean flag (along with ValueType) to determine if the target entity is the - Default Value or the key itself. - - .PARAMETER ValueType - Used only as a boolean flag (along with ValueData) to determine if the target entity is the - Default Value or the key itself. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Key, - - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [String] - [AllowEmptyString()] - $ValueName, - - [String[]] - $ValueData, - - [ValidateSet('String', 'Binary', 'DWord', 'QWord', 'MultiString', 'ExpandString')] - [String] - $ValueType - ) - - Write-Verbose -Message ($script:localizedData.GetTargetResourceStartMessage -f $Key) - - $registryResource = @{ - Key = $Key - Ensure = 'Absent' - ValueName = $null - ValueType = $null - ValueData = $null - } - - # Retrieve the registry key at the specified path - $registryKey = Get-RegistryKey -RegistryKeyPath $Key - - # Check if the registry key exists - if ($null -eq $registryKey) - { - Write-Verbose -Message ($script:localizedData.RegistryKeyDoesNotExist -f $Key) - } - else - { - Write-Verbose -Message ($script:localizedData.RegistryKeyExists -f $Key) - - # Check if the user specified a value name to retrieve - $valueNameSpecified = (-not [String]::IsNullOrEmpty($ValueName)) -or $PSBoundParameters.ContainsKey('ValueType') -or $PSBoundParameters.ContainsKey('ValueData') - - if ($valueNameSpecified) - { - $valueDisplayName = Get-RegistryKeyValueDisplayName -RegistryKeyValueName $ValueName - $registryResource['ValueName'] = $valueDisplayName - - # If a value name was specified, retrieve the value with the specified name from the retrieved registry key - $registryKeyValue = Get-RegistryKeyValue -RegistryKey $registryKey -RegistryKeyValueName $ValueName - - # Check if the registry key value exists - if ($null -eq $registryKeyValue) - { - Write-Verbose -Message ($script:localizedData.RegistryKeyValueDoesNotExist -f $Key, $valueDisplayName) - } - else - { - Write-Verbose -Message ($script:localizedData.RegistryKeyValueExists -f $Key, $valueDisplayName) - - # If the registry key value exists, retrieve its type - $actualValueType = Get-RegistryKeyValueType -RegistryKey $registryKey -RegistryKeyValueName $ValueName - - # If the registry key value exists, convert it to a readable string - $registryKeyValueAsReadableString = @() + (ConvertTo-ReadableString -RegistryKeyValue $registryKeyValue -RegistryKeyValueType $actualValueType) - - $registryResource['Ensure'] = 'Present' - $registryResource['ValueType'] = $actualValueType - $registryResource['ValueData'] = $registryKeyValueAsReadableString - } - } - else - { - $registryResource['Ensure'] = 'Present' - } - } - - Write-Verbose -Message ($script:localizedData.GetTargetResourceEndMessage -f $Key) - - return $registryResource -} - -<# - .SYNOPSIS - Sets the Registry resource with the given Key to the specified state. - - .PARAMETER Key - The path of the registry key to set the state of. - This path must include the registry hive. - - .PARAMETER ValueName - The name of the registry value to set. - - To add or remove a registry key, specify this property as an empty string without - specifying ValueType or ValueData. To modify or remove the default value of a registry key, - specify this property as an empty string while also specifying ValueType or ValueData. - - .PARAMETER Ensure - Specifies whether or not the registry key with the given path and the registry key value with the given name should exist. - - To ensure that the registry key and value exists, set this property to Present. - To ensure that the registry key and value do not exist, set this property to Absent. - - The default value is Present. - - .PARAMETER ValueData - The data to set as the registry key value. - - .PARAMETER ValueType - The type of the value to set. - - The supported types are: - String (REG_SZ) - Binary (REG-BINARY) - Dword 32-bit (REG_DWORD) - Qword 64-bit (REG_QWORD) - Multi-string (REG_MULTI_SZ) - Expandable string (REG_EXPAND_SZ) - - .PARAMETER Hex - Specifies whether or not the value data should be expressed in hexadecimal format. - - If specified, DWORD/QWORD value data is presented in hexadecimal format. - Not valid for other value types. - - The default value is $false. - - .PARAMETER Force - Specifies whether or not to overwrite the registry key with the given path with the new - value if it is already present. -#> -function Set-TargetResource -{ - [CmdletBinding(SupportsShouldProcess = $true)] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Key, - - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [String] - [AllowEmptyString()] - $ValueName, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [ValidateNotNull()] - [String[]] - $ValueData = @(), - - [ValidateSet('String', 'Binary', 'DWord', 'QWord', 'MultiString', 'ExpandString')] - [String] - $ValueType = 'String', - - [Boolean] - $Hex = $false, - - [Boolean] - $Force = $false - ) - - Write-Verbose -Message ($script:localizedData.SetTargetResourceStartMessage -f $Key) - - # Retrieve the registry key at the specified path - $registryKey = Get-RegistryKey -RegistryKeyPath $Key -WriteAccessAllowed - - # Check if the registry key exists - if ($null -eq $registryKey) - { - Write-Verbose -Message ($script:localizedData.RegistryKeyDoesNotExist -f $Key) - - # Check if the user wants the registry key to exist - if ($Ensure -eq 'Present') - { - Write-Verbose -Message ($script:localizedData.CreatingRegistryKey -f $Key) - $registryKey = New-RegistryKey -RegistryKeyPath $Key - } - } - - # Check if the registry key exists - if ($null -ne $registryKey) - { - Write-Verbose -Message ($script:localizedData.RegistryKeyExists -f $Key) - - $valueNameSpecified = (-not [String]::IsNullOrEmpty($ValueName)) -or $PSBoundParameters.ContainsKey('ValueType') -or $PSBoundParameters.ContainsKey('ValueData') - - # Check if the user wants to set a registry key value - if ($valueNameSpecified) - { - # Retrieve the display name of the specified registry key value - $valueDisplayName = Get-RegistryKeyValueDisplayName -RegistryKeyValueName $ValueName - - # Retrieve the existing registry key value - $actualRegistryKeyValue = Get-RegistryKeyValue -RegistryKey $registryKey -RegistryKeyValueName $ValueName - - # Check if the user wants to add/modify or remove the registry key value - if ($Ensure -eq 'Present') - { - # Convert the specified registry key value to the specified type - $expectedRegistryKeyValue = switch ($ValueType) - { - 'Binary' { ConvertTo-Binary -RegistryKeyValue $ValueData; break } - 'DWord' { ConvertTo-DWord -RegistryKeyValue $ValueData -Hex $Hex; break } - 'MultiString' { ConvertTo-MultiString -RegistryKeyValue $ValueData; break } - 'QWord' { ConvertTo-QWord -RegistryKeyValue $ValueData -Hex $Hex; break } - default { ConvertTo-String -RegistryKeyValue $ValueData} - } - - # Retrieve the name of the registry key - $registryKeyName = Get-RegistryKeyName -RegistryKey $registryKey - - # Check if the registry key value exists - if ($null -eq $actualRegistryKeyValue) - { - # If the registry key value does not exist, set the new value - Write-Verbose -Message ($script:localizedData.SettingRegistryKeyValue -f $valueDisplayName, $Key) - $null = Set-RegistryKeyValue -RegistryKeyName $registryKeyName -RegistryKeyValueName $ValueName -RegistryKeyValue $expectedRegistryKeyValue -ValueType $ValueType - } - else - { - # If the registry key value exists, check if the specified registry key value matches the retrieved registry key value - if (Test-RegistryKeyValuesMatch -ExpectedRegistryKeyValue $expectedRegistryKeyValue -ActualRegistryKeyValue $actualRegistryKeyValue -RegistryKeyValueType $ValueType) - { - # If the specified registry key value matches the retrieved registry key value, no change is needed - Write-Verbose -Message ($script:localizedData.RegistryKeyValueAlreadySet -f $valueDisplayName, $Key) - } - else - { - # If the specified registry key value matches the retrieved registry key value, check if the user wants to overwrite the value - if (-not $Force) - { - # If the user does not want to overwrite the value, throw an error - New-InvalidOperationException -Message ($script:localizedData.CannotOverwriteExistingRegistryKeyValueWithoutForce -f $Key, $valueDisplayName) - } - else - { - # If the user does want to overwrite the value, overwrite the value - Write-Verbose -Message ($script:localizedData.OverwritingRegistryKeyValue -f $valueDisplayName, $Key) - $null = Set-RegistryKeyValue -RegistryKeyName $registryKeyName -RegistryKeyValueName $ValueName -RegistryKeyValue $expectedRegistryKeyValue -ValueType $ValueType - } - } - } - } - else - { - # Check if the registry key value exists - if ($null -ne $actualRegistryKeyValue) - { - Write-Verbose -Message ($script:localizedData.RemovingRegistryKeyValue -f $valueDisplayName, $Key) - - # If the specified registry key value exists, check if the user specified a registry key value with a name to remove - if (-not [String]::IsNullOrEmpty($ValueName)) - { - # If the user specified a registry key value with a name to remove, remove the registry key value with the specified name - $null = Remove-ItemProperty -Path $Key -Name $ValueName -Force - } - else - { - # If the user did not specify a registry key value with a name to remove, remove the default registry key value - $null = Remove-DefaultRegistryKeyValue -RegistryKey $registryKey - } - } - } - } - else - { - # Check if the user wants to remove the registry key - if ($Ensure -eq 'Absent') - { - # Retrieve the number of subkeys the registry key has - $registryKeySubKeyCount = Get-RegistryKeySubKeyCount -RegistryKey $registryKey - - # Check if the registry key has subkeys and the user does not want to forcibly remove the registry key - if ($registryKeySubKeyCount -gt 0 -and -not $Force) - { - New-InvalidOperationException -Message ($script:localizedData.CannotRemoveExistingRegistryKeyWithSubKeysWithoutForce -f $Key) - } - else - { - # Remove the registry key - Write-Verbose -Message ($script:localizedData.RemovingRegistryKey -f $Key) - $null = Remove-Item -Path $Key -Recurse -Force - } - } - } - } - - Write-Verbose -Message ($script:localizedData.SetTargetResourceEndMessage -f $Key) -} - -<# - .SYNOPSIS - Tests if the Registry resource with the given key is in the specified state. - - .PARAMETER Key - The path of the registry key to test the state of. - This path must include the registry hive. - - .PARAMETER ValueName - The name of the registry value to check for. - Specify this property as an empty string ('') to check the default value of the registry key. - - .PARAMETER Ensure - Specifies whether or not the registry key and value should exist. - - To test that they exist, set this property to "Present". - To test that they do not exist, set the property to "Absent". - The default value is "Present". - - .PARAMETER ValueData - The data the registry key value should have. - - .PARAMETER ValueType - The type of the value. - - The supported types are: - String (REG_SZ) - Binary (REG-BINARY) - Dword 32-bit (REG_DWORD) - Qword 64-bit (REG_QWORD) - Multi-string (REG_MULTI_SZ) - Expandable string (REG_EXPAND_SZ) - - .PARAMETER Hex - Not used in Test-TargetResource. - - .PARAMETER Force - Not used in Test-TargetResource. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Key, - - [Parameter(Mandatory = $true)] - [AllowEmptyString()] - [ValidateNotNull()] - [String] - $ValueName, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [ValidateNotNull()] - [String[]] - $ValueData = @(), - - [ValidateSet('String', 'Binary', 'DWord', 'QWord', 'MultiString', 'ExpandString')] - [String] - $ValueType = 'String', - - [Boolean] - $Hex = $false, - - [Boolean] - $Force = $false - ) - - Write-Verbose -Message ($script:localizedData.TestTargetResourceStartMessage -f $Key) - - $registryResourceInDesiredState = $false - - $getTargetResourceParameters = @{ - Key = $Key - ValueName = $ValueName - } - - if ($PSBoundParameters.ContainsKey('ValueType')) - { - $getTargetResourceParameters['ValueType'] = $ValueType - } - - if ($PSBoundParameters.ContainsKey('ValueData')) - { - $getTargetResourceParameters['ValueData'] = $ValueData - } - - $registryResource = Get-TargetResource @getTargetResourceParameters - - # Check if the user specified a value name to retrieve - $valueNameSpecified = (-not [String]::IsNullOrEmpty($ValueName)) -or $PSBoundParameters.ContainsKey('ValueType') -or $PSBoundParameters.ContainsKey('ValueData') - - if ($valueNameSpecified) - { - $valueDisplayName = Get-RegistryKeyValueDisplayName -RegistryKeyValueName $ValueName - - if ($registryResource.Ensure -eq 'Absent') - { - Write-Verbose -Message ($script:localizedData.RegistryKeyValueDoesNotExist -f $Key, $valueDisplayName) - $registryResourceInDesiredState = $Ensure -eq 'Absent' - } - else - { - Write-Verbose -Message ($script:localizedData.RegistryKeyValueExists -f $Key, $valueDisplayName) - - if ($Ensure -eq 'Absent') - { - $registryResourceInDesiredState = $false - } - elseif ($PSBoundParameters.ContainsKey('ValueType') -and $ValueType -ne $registryResource.ValueType) - { - Write-Verbose -Message ($script:localizedData.RegistryKeyValueTypeDoesNotMatch -f $valueDisplayName, $Key, $ValueType, $registryResource.ValueType) - - $registryResourceInDesiredState = $false - } - elseif ($PSBoundParameters.ContainsKey('ValueData')) - { - # Need to get the actual registry key value since Get-TargetResource returns - $registryKey = Get-RegistryKey -RegistryKeyPath $Key - $actualRegistryKeyValue = Get-RegistryKeyValue -RegistryKey $registryKey -RegistryKeyValueName $ValueName - - if (-not $PSBoundParameters.ContainsKey('ValueType') -and $null -ne $registryResource.ValueType) - { - $ValueType = $registryResource.ValueType - } - - # Convert the specified registry key value to the specified type - $expectedRegistryKeyValue = switch ($ValueType) - { - 'Binary' { ConvertTo-Binary -RegistryKeyValue $ValueData; break } - 'DWord' { ConvertTo-DWord -RegistryKeyValue $ValueData -Hex $Hex; break } - 'MultiString' { ConvertTo-MultiString -RegistryKeyValue $ValueData; break } - 'QWord' { ConvertTo-QWord -RegistryKeyValue $ValueData -Hex $Hex; break } - default { ConvertTo-String -RegistryKeyValue $ValueData; break } - } - - if (-not (Test-RegistryKeyValuesMatch -ExpectedRegistryKeyValue $expectedRegistryKeyValue -ActualRegistryKeyValue $actualRegistryKeyValue -RegistryKeyValueType $ValueType)) - { - Write-Verbose -Message ($script:localizedData.RegistryKeyValueDoesNotMatch -f $valueDisplayName, $Key, $ValueData, $registryResource.ValueData) - - $registryResourceInDesiredState = $false - } - else - { - $registryResourceInDesiredState = $true - } - } - else - { - $registryResourceInDesiredState = $true - } - } - } - else - { - if ($registryResource.Ensure -eq 'Present') - { - Write-Verbose -Message ($script:localizedData.RegistryKeyExists -f $Key) - $registryResourceInDesiredState = $Ensure -eq 'Present' - } - else - { - Write-Verbose -Message ($script:localizedData.RegistryKeyDoesNotExist -f $Key) - $registryResourceInDesiredState = $Ensure -eq 'Absent' - } - } - - Write-Verbose -Message ($script:localizedData.TestTargetResourceEndMessage -f $Key) - - return $registryResourceInDesiredState -} - -<# - .SYNOPSIS - Retrieves the root of the specified path. - - .PARAMETER Path - The path to retrieve the root of. -#> -function Get-PathRoot -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path - ) - - $pathParent = Split-Path -Path $Path -Parent - $pathRoot = $Path - - while (-not [String]::IsNullOrEmpty($pathParent)) - { - $pathRoot = Split-Path -Path $pathParent -Leaf - $pathParent = Split-Path -Path $pathParent -Parent - } - - return $pathRoot -} - -<# - .SYNOPSIS - Converts the specified registry drive root to its corresponding registry drive name. - - .PARAMETER RegistryDriveRoot - The registry drive root to convert. -#> -function ConvertTo-RegistryDriveName -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $RegistryDriveRoot - ) - - $registryDriveName = $null - - if ($script:registryDriveRoots.ContainsValue($RegistryDriveRoot)) - { - foreach ($registryDriveRootsKey in $script:registryDriveRoots.Keys) - { - if ($script:registryDriveRoots[$registryDriveRootsKey] -ieq $RegistryDriveRoot) - { - $registryDriveName = $registryDriveRootsKey - break - } - } - } - - return $registryDriveName -} - -<# - .SYNOPSIS - Retrieves the name of the registry drive at the root of the the specified registry key path. - - .PARAMETER RegistryKeyPath - The registry key path to retrieve the registry drive name from. -#> -function Get-RegistryDriveName -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $RegistryKeyPath - ) - - $registryKeyPathRoot = Get-PathRoot -Path $RegistryKeyPath - $registryKeyPathRoot = $registryKeyPathRoot.TrimEnd('\') - - if ($registryKeyPathRoot.Contains(':')) - { - $registryDriveName = $registryKeyPathRoot.TrimEnd(':') - - if (-not $script:registryDriveRoots.ContainsKey($registryDriveName)) - { - New-InvalidArgumentException -ArgumentName 'Key' -Message ($script:localizedData.InvalidRegistryDrive -f $registryDriveName) - } - } - else - { - $registryDriveName = ConvertTo-RegistryDriveName -RegistryDriveRoot $registryKeyPathRoot - - if ([String]::IsNullOrEmpty($registryDriveName)) - { - New-InvalidArgumentException -ArgumentName 'Key' -Message ($script:localizedData.InvalidRegistryDrive -f $registryKeyPathRoot) - } - } - - return $registryDriveName -} - -<# - .SYNOPSIS - Mounts the registry drive with the specified name. - - .PARAMETER RegistryKeyName - The name of the registry drive to mount. -#> -function Mount-RegistryDrive -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $RegistryDriveName - ) - - $registryDriveInfo = Get-PSDrive -Name $RegistryDriveName -ErrorAction 'SilentlyContinue' - - if ($null -eq $registryDriveInfo) - { - $newPSDriveParameters = @{ - Name = $RegistryDriveName - Root = $script:registryDriveRoots[$RegistryDriveName] - PSProvider = 'Registry' - Scope = 'Script' - } - - $registryDriveInfo = New-PSDrive @newPSDriveParameters - } - - # Validate that the specified PSDrive is valid - if (($null -eq $registryDriveInfo) -or ($null -eq $registryDriveInfo.Provider) -or ($registryDriveInfo.Provider.Name -ine 'Registry')) - { - New-InvalidOperationException -Message ($script:localizedData.RegistryDriveCouldNotBeMounted -f $RegistryDriveName) - } -} - -<# - .SYNOPSIS - Opens the specified registry sub key under the specified registry parent key. - This is a wrapper function for unit testing. - - .PARAMETER ParentKey - The parent registry key which contains the sub key to open. - - .PARAMETER SubKey - The sub key to open. - - .PARAMETER WriteAccessAllowed - Specifies whether or not to open the sub key with permissions to write to it. -#> -function Open-RegistrySubKey -{ - [OutputType([Microsoft.Win32.RegistryKey])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [Microsoft.Win32.RegistryKey] - $ParentKey, - - [Parameter(Mandatory = $true)] - [String] - [AllowEmptyString()] - $SubKey, - - [Parameter()] - [Switch] - $WriteAccessAllowed - ) - - return $ParentKey.OpenSubKey($SubKey, $WriteAccessAllowed) -} - -<# - .SYNOPSIS - Opens and retrieves the registry key at the specified path. - - .PARAMETER RegistryKeyPath - The path to the registry key to open. - The path must include the registry drive. - - .PARAMETER WriteAccessAllowed - Specifies whether or not to open the key with permissions to write to it. - - .NOTES - This method is used instead of Get-Item so that there is no ambiguity between - forward slashes as path separators vs literal characters in a key name - (which is valid in the registry). - -#> -function Get-RegistryKey -{ - [OutputType([Microsoft.Win32.RegistryKey])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $RegistryKeyPath, - - [Switch] - $WriteAccessAllowed - ) - - # Parse the registry drive from the specified registry key path - $registryDriveName = Get-RegistryDriveName -RegistryKeyPath $RegistryKeyPath - - # Mount the registry drive if needed - Mount-RegistryDrive -RegistryDriveName $registryDriveName - - # Retrieve the registry drive key - $registryDriveKey = Get-Item -LiteralPath ($registryDriveName + ':') - - # Parse the registry drive subkey from the specified registry key path - $indexOfBackSlashInPath = $RegistryKeyPath.IndexOf('\') - if ($indexOfBackSlashInPath -ge 0 -and $indexOfBackSlashInPath -lt ($RegistryKeyPath.Length - 1)) - { - $registryDriveSubKey = $RegistryKeyPath.Substring($RegistryKeyPath.IndexOf('\') + 1) - } - else - { - $registryDriveSubKey = '' - } - - # Open the registry drive subkey - $registryKey = Open-RegistrySubKey -ParentKey $registryDriveKey -SubKey $registryDriveSubKey -WriteAccessAllowed:$WriteAccessAllowed - - # Return the opened registry key - return $registryKey -} - -<# - .SYNOPSIS - Retrieves the display name of the default registry key value if needed. - - .PARAMETER RegistryKeyValueName - The name of the registry key value to retrieve the display name of. -#> -function Get-RegistryKeyValueDisplayName -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] - [AllowNull()] - [AllowEmptyString()] - $RegistryKeyValueName - ) - - $registryKeyValueDisplayName = $RegistryKeyValueName - - if ([String]::IsNullOrEmpty($RegistryKeyValueName)) - { - $registryKeyValueDisplayName = $script:localizedData.DefaultValueDisplayName - } - - return $registryKeyValueDisplayName -} - -<# - .SYNOPSIS - Retrieves the registry key value with the specified name from the specified registry key. - This is a wrapper function for unit testing. - - .PARAMETER RegistryKey - The registry key to retrieve the value from. - - .PARAMETER RegistryKeyValueName - The name of the registry key value to retrieve. -#> -function Get-RegistryKeyValue -{ - [OutputType([Object[]])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [Microsoft.Win32.RegistryKey] - $RegistryKey, - - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [String] - [AllowEmptyString()] - $RegistryKeyValueName - ) - - $registryValueOptions = [Microsoft.Win32.RegistryValueOptions]::DoNotExpandEnvironmentNames - $registryKeyValue = $RegistryKey.GetValue($RegistryKeyValueName, $null, $registryValueOptions) - return ,$registryKeyValue -} - -<# - .SYNOPSIS - Retrieves the type of the registry key value with the specified name from the the specified - registry key. - This is a wrapper function for unit testing. - - .PARAMETER RegistryKey - The registry key to retrieve the type of the value from. - - .PARAMETER RegistryKeyValueName - The name of the registry key value to retrieve the type of. -#> -function Get-RegistryKeyValueType -{ - [OutputType([Type])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [Microsoft.Win32.RegistryKey] - $RegistryKey, - - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [String] - [AllowEmptyString()] - $RegistryKeyValueName - ) - - return $RegistryKey.GetValueKind($RegistryKeyValueName) -} - -<# - .SYNOPSIS - Converts the specified byte array to a hex string. - - .PARAMETER ByteArray - The byte array to convert. -#> -function Convert-ByteArrayToHexString -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [Object[]] - [AllowEmptyCollection()] - $ByteArray - ) - - $hexString = '' - - foreach ($byte in $ByteArray) - { - $hexString += ('{0:x2}' -f $byte) - } - - return $hexString -} - -<# - .SYNOPSIS - Converts the specified registry key value to a readable string. - - .PARAMETER RegistryKeyValue - The registry key value to convert. - - .PARAMETER RegistryKeyValueType - The type of the registry key value to convert. -#> -function ConvertTo-ReadableString -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [Object[]] - [AllowNull()] - [AllowEmptyCollection()] - $RegistryKeyValue, - - [Parameter(Mandatory = $true)] - [ValidateSet('String', 'Binary', 'DWord', 'QWord', 'MultiString', 'ExpandString')] - [String] - $RegistryKeyValueType - ) - - $registryKeyValueAsString = [String]::Empty - - if ($null -ne $RegistryKeyValue) - { - # For Binary type data, convert the received bytes back to a readable hex-string - if ($RegistryKeyValueType -eq 'Binary') - { - $RegistryKeyValue = Convert-ByteArrayToHexString -ByteArray $RegistryKeyValue - } - - if ($RegistryKeyValueType -ne 'MultiString') - { - $RegistryKeyValue = [String[]]@() + $RegistryKeyValue - } - - if ($RegistryKeyValue.Count -eq 1 -and -not [String]::IsNullOrEmpty($RegistryKeyValue[0])) - { - $registryKeyValueAsString = $RegistryKeyValue[0].ToString() - } - elseif ($RegistryKeyValue.Count -gt 1) - { - $registryKeyValueAsString = "($($RegistryKeyValue -join ', '))" - } - } - - return $registryKeyValueAsString -} - -<# - .SYNOPSIS - Creates a new subkey with the specified name under the specified registry key. - This is a wrapper function for unit testing. - - .PARAMETER ParentRegistryKey - The parent registry key to create the new subkey under. - - .PARAMETER SubKeyName - The name of the new subkey to create. -#> -function New-RegistrySubKey -{ - [OutputType([Microsoft.Win32.RegistryKey])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [Microsoft.Win32.RegistryKey] - $ParentRegistryKey, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $SubKeyName - ) - - return $ParentRegistryKey.CreateSubKey($SubKeyName) -} - -<# - .SYNOPSIS - Creates a new registry key at the specified registry key path. - - .PARAMETER RegistryKeyPath - The path at which to create the registry key. - This path must include the registry drive. -#> -function New-RegistryKey -{ - [OutputType([Microsoft.Win32.RegistryKey])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $RegistryKeyPath - ) - - # registry key names can contain forward slashes, so we can't use Split-Path here (it will split on /) - $lastSep = $RegistryKeyPath.LastIndexOf('\') - $parentRegistryKeyPath = $RegistryKeyPath.Substring(0, $lastSep) - $newRegistryKeyName = $RegistryKeyPath.Substring($lastSep + 1) - - $parentRegistryKey = Get-RegistryKey -RegistryKeyPath $parentRegistryKeyPath -WriteAccessAllowed - - if ($null -eq $parentRegistryKey) - { - # If the parent registry key does not exist, create it - $parentRegistryKey = New-RegistryKey -RegistryKeyPath $parentRegistryKeyPath - } - - $newRegistryKey = New-RegistrySubKey -ParentRegistryKey $parentRegistryKey -SubKeyName $newRegistryKeyName - - return $newRegistryKey -} - -<# - .SYNOPSIS - Retrieves the name of the specified registry key. - This is a wrapper function for unit testing. - - .PARAMETER RegistryKey - The registry key to retrieve the name of. -#> -function Get-RegistryKeyName -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [Microsoft.Win32.RegistryKey] - $RegistryKey - ) - - return $RegistryKey.Name -} - -<# - .SYNOPSIS - Converts the specified registry key value to a byte array for the Binary registry type. - - .PARAMETER RegistryKeyValue - The registry key value to convert. -#> -function ConvertTo-Binary -{ - [OutputType([Byte[]])] - [CmdletBinding()] - param - ( - [Parameter()] - [AllowNull()] - [String[]] - [AllowEmptyCollection()] - $RegistryKeyValue - ) - - if (($null -ne $RegistryKeyValue) -and ($RegistryKeyValue.Count -gt 1)) - { - New-InvalidArgumentException -ArgumentName 'ValueData' -Message ($script:localizedData.ArrayNotAllowedForExpectedType -f 'Binary') - } - - $binaryRegistryKeyValue = [Byte[]] @() - - if (($null -ne $RegistryKeyValue) -and ($RegistryKeyValue.Count -eq 1) -and (-not [String]::IsNullOrEmpty($RegistryKeyValue[0]))) - { - $singleRegistryKeyValue = $RegistryKeyValue[0] - - if ($singleRegistryKeyValue.StartsWith('0x')) - { - $singleRegistryKeyValue = $singleRegistryKeyValue.Substring('0x'.Length) - } - - if (($singleRegistryKeyValue.Length % 2) -ne 0) - { - $singleRegistryKeyValue = $singleRegistryKeyValue.PadLeft($singleRegistryKeyValue.Length + 1, '0') - } - - try - { - for ($singleRegistryKeyValueIndex = 0 ; $singleRegistryKeyValueIndex -lt ($singleRegistryKeyValue.Length - 1) ; $singleRegistryKeyValueIndex = $singleRegistryKeyValueIndex + 2) - { - $binaryRegistryKeyValue += [Byte]::Parse($singleRegistryKeyValue.Substring($singleRegistryKeyValueIndex, 2), 'HexNumber') - } - } - catch - { - New-InvalidArgumentException -ArgumentName 'ValueData' -Message ($script:localizedData.BinaryDataNotInHexFormat -f $singleRegistryKeyValue) - } - } - - return $binaryRegistryKeyValue -} - -<# - .SYNOPSIS - Converts the specified registry key value to an Int32 for the DWord registry type. - - .PARAMETER RegistryKeyValue - The registry key value to convert. -#> -function ConvertTo-DWord -{ - [OutputType([System.Int32])] - [CmdletBinding()] - param - ( - [Parameter()] - [AllowNull()] - [String[]] - [AllowEmptyCollection()] - $RegistryKeyValue, - - [Parameter()] - [Boolean] - $Hex = $false - ) - - if (($null -ne $RegistryKeyValue) -and ($RegistryKeyValue.Count -gt 1)) - { - New-InvalidArgumentException -ArgumentName 'ValueData' -Message ($script:localizedData.ArrayNotAllowedForExpectedType -f 'Dword') - } - - $dwordRegistryKeyValue = [System.Int32] 0 - - if (($null -ne $RegistryKeyValue) -and ($RegistryKeyValue.Count -eq 1) -and (-not [String]::IsNullOrEmpty($RegistryKeyValue[0]))) - { - $singleRegistryKeyValue = $RegistryKeyValue[0] - - if ($Hex) - { - if ($singleRegistryKeyValue.StartsWith('0x')) - { - $singleRegistryKeyValue = $singleRegistryKeyValue.Substring('0x'.Length) - } - - $currentCultureInfo = [System.Globalization.CultureInfo]::CurrentCulture - $referenceValue = $null - - if ([System.Int32]::TryParse($singleRegistryKeyValue, 'HexNumber', $currentCultureInfo, [Ref] $referenceValue)) - { - $dwordRegistryKeyValue = $referenceValue - } - else - { - New-InvalidArgumentException -ArgumentName 'ValueData' -Message ($script:localizedData.DWordDataNotInHexFormat -f $singleRegistryKeyValue) - } - } - else - { - $dwordRegistryKeyValue = [System.Int32]::Parse($singleRegistryKeyValue) - } - } - - return $dwordRegistryKeyValue -} - -<# - .SYNOPSIS - Converts the specified registry key value to a string array for the MultiString registry type. - - .PARAMETER RegistryKeyValue - The registry key value to convert. -#> -function ConvertTo-MultiString -{ - [OutputType([String[]])] - [CmdletBinding()] - param - ( - [Parameter()] - [AllowNull()] - [String[]] - [AllowEmptyCollection()] - $RegistryKeyValue - ) - - $multiStringRegistryKeyValue = [String[]] @() - - if (($null -ne $RegistryKeyValue) -and ($RegistryKeyValue.Length -gt 0)) - { - $multiStringRegistryKeyValue = [String[]]$RegistryKeyValue - } - - return $multiStringRegistryKeyValue -} - -<# - .SYNOPSIS - Converts the specified registry key value to an Int64 for the QWord registry type. - - .PARAMETER RegistryKeyValue - The registry key value to convert. -#> -function ConvertTo-QWord -{ - [OutputType([System.Int64])] - [CmdletBinding()] - param - ( - [Parameter()] - [AllowNull()] - [String[]] - [AllowEmptyCollection()] - $RegistryKeyValue, - - [Parameter()] - [Boolean] - $Hex = $false - ) - - if (($null -ne $RegistryKeyValue) -and ($RegistryKeyValue.Count -gt 1)) - { - New-InvalidArgumentException -ArgumentName 'ValueData' -Message ($script:localizedData.ArrayNotAllowedForExpectedType -f 'Qword') - } - - $qwordRegistryKeyValue = [System.Int64] 0 - - if (($null -ne $RegistryKeyValue) -and ($RegistryKeyValue.Count -eq 1) -and (-not [String]::IsNullOrEmpty($RegistryKeyValue[0]))) - { - $singleRegistryKeyValue = $RegistryKeyValue[0] - - if ($Hex) - { - if ($singleRegistryKeyValue.StartsWith('0x')) - { - $singleRegistryKeyValue = $singleRegistryKeyValue.Substring('0x'.Length) - } - - $currentCultureInfo = [System.Globalization.CultureInfo]::CurrentCulture - $referenceValue = $null - - if ([System.Int64]::TryParse($singleRegistryKeyValue, 'HexNumber', $currentCultureInfo, [Ref] $referenceValue)) - { - $qwordRegistryKeyValue = $referenceValue - } - else - { - New-InvalidArgumentException -ArgumentName 'ValueData' -Message ($script:localizedData.QWordDataNotInHexFormat -f $singleRegistryKeyValue) - } - } - else - { - $qwordRegistryKeyValue = [System.Int64]::Parse($singleRegistryKeyValue) - } - } - - return $qwordRegistryKeyValue -} - -<# - .SYNOPSIS - Converts the specified registry key value to a string for the String or ExpandString registry types. - - .PARAMETER RegistryKeyValue - The registry key value to convert. -#> -function ConvertTo-String -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter()] - [AllowNull()] - [String[]] - [AllowEmptyCollection()] - $RegistryKeyValue - ) - - if (($null -ne $RegistryKeyValue) -and ($RegistryKeyValue.Count -gt 1)) - { - New-InvalidArgumentException -ArgumentName 'ValueData' -Message ($script:localizedData.ArrayNotAllowedForExpectedType -f 'String or ExpandString') - } - - $registryKeyValueAsString = [String]::Empty - - if (($null -ne $RegistryKeyValue) -and ($RegistryKeyValue.Count -eq 1)) - { - $registryKeyValueAsString = [String]$RegistryKeyValue[0] - } - - return $registryKeyValueAsString -} - -<# - .SYNOPSIS - Sets the specified registry key value with the specified name to the specified value. - This is a wrapper function for unit testing. - - .PARAMETER RegistryKeyName - The name of the registry key that the value to set is under. - - .PARAMETER RegistryKeyValueName - The name of the registry key value to set. - - .PARAMETER RegistryKeyValue - The new value to set the registry key value to. - - .PARAMETER RegistryKeyValueType - The type of the new value to set the registry key value to. -#> -function Set-RegistryKeyValue -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $RegistryKeyName, - - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [String] - [AllowEmptyString()] - $RegistryKeyValueName, - - [Parameter(Mandatory = $true)] - [Object] - [AllowNull()] - $RegistryKeyValue, - - [Parameter(Mandatory = $true)] - [ValidateSet('String', 'Binary', 'DWord', 'QWord', 'MultiString', 'ExpandString')] - [String] - $ValueType - ) - - if ($ValueType -eq 'Binary') - { - $RegistryKeyValue = [Byte[]]$RegistryKeyValue - } - elseif ($ValueType -eq 'MultiString') - { - $RegistryKeyValue = [String[]]$RegistryKeyValue - } - - $null = [Microsoft.Win32.Registry]::SetValue($RegistryKeyName, $RegistryKeyValueName, $RegistryKeyValue, $ValueType) -} - -<# - .SYNOPSIS - Tests if the actual registry key value matches the expected registry key value. - - .PARAMETER ExpectedRegistryKeyValue - The expected registry key value to test against. - - .PARAMETER ActualRegistryKeyValue - The actual registry key value to test. - - .PARAMETER RegistryKeyValueType - The type of the registry key values. -#> -function Test-RegistryKeyValuesMatch -{ - [OutputType([Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [Object] - [AllowNull()] - $ExpectedRegistryKeyValue, - - [Parameter(Mandatory = $true)] - [Object] - [AllowNull()] - $ActualRegistryKeyValue, - - [Parameter(Mandatory = $true)] - [ValidateSet('String', 'Binary', 'DWord', 'QWord', 'MultiString', 'ExpandString')] - [String] - $RegistryKeyValueType - ) - - $registryKeyValuesMatch = $true - - if ($RegistryKeyValueType -eq 'Multistring' -or $RegistryKeyValueType -eq 'Binary') - { - if ($null -eq $ExpectedRegistryKeyValue) - { - $ExpectedRegistryKeyValue = @() - } - - if ($null -eq $ActualRegistryKeyValue) - { - $ActualRegistryKeyValue = @() - } - - $registryKeyValuesMatch = $null -eq (Compare-Object -ReferenceObject $ExpectedRegistryKeyValue -DifferenceObject $ActualRegistryKeyValue) - } - else - { - if ($null -eq $ExpectedRegistryKeyValue) - { - $ExpectedRegistryKeyValue = '' - } - - if ($null -eq $ActualRegistryKeyValue) - { - $ActualRegistryKeyValue = '' - } - - $registryKeyValuesMatch = $ExpectedRegistryKeyValue -ieq $ActualRegistryKeyValue - } - - return $registryKeyValuesMatch -} - -<# - .SYNOPSIS - Removes the default value of the specified registry key. - This is a wrapper function for unit testing. - - .PARAMETER RegistryKey - The registry key to remove the default value of. -#> -function Remove-DefaultRegistryKeyValue -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [Microsoft.Win32.RegistryKey] - $RegistryKey - ) - - $null = $RegistryKey.DeleteValue('') -} - -<# - .SYNOPSIS - Retrieves the number of subkeys under the specified registry key. - This is a wrapper function for unit testing. - - .PARAMETER RegistryKey - The registry key to retrieve the subkeys of. -#> -function Get-RegistryKeySubKeyCount -{ - [OutputType([Int])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [Microsoft.Win32.RegistryKey] - $RegistryKey - ) - - return $RegistryKey.SubKeyCount -} diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRegistryResource/MSFT_xRegistryResource.schema.mof b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRegistryResource/MSFT_xRegistryResource.schema.mof deleted file mode 100644 index d280b4d7..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRegistryResource/MSFT_xRegistryResource.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("xRegistry")] -class MSFT_xRegistryResource : OMI_BaseResource -{ - [Key, Description("The path of the registry key to add, modify, or remove. This path must include the registry hive/drive.")] String Key; - [Key, Description("The name of the registry value. To add or remove a registry key, specify this property as an empty string without specifying ValueType or ValueData. To modify or remove the default value of a registry key, specify this property as an empty string while also specifying ValueType or ValueData.")] String ValueName; - [Write, Description("The data the specified registry key value should have as a string or an array of strings (MultiString only).")] String ValueData[]; - [Write, Description("The type the specified registry key value should have."), ValueMap{"String", "Binary", "DWord", "QWord", "MultiString", "ExpandString"},Values{"String", "Binary", "DWord", "QWord", "MultiString", "ExpandString"}] String ValueType; - [Write, Description("Specifies whether or not the registry key or value should exist. To add or modify a registry key or value, set this property to Present. To remove a registry key or value, set the property to Absent."), ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] String Ensure; - [Write, Description("Specifies whether or not the specified DWord or QWord registry key data is provided in a hexadecimal format. Not valid for types other than DWord and QWord. The default value is $false.")] Boolean Hex; - [Write, Description("Specifies whether or not to overwrite the specified registry key value if it already has a value or whether or not to delete a registry key that has subkeys. The default value is $false.")] Boolean Force; -}; diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRegistryResource/en-US/MSFT_xRegistryResource.schema.mfl b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRegistryResource/en-US/MSFT_xRegistryResource.schema.mfl deleted file mode 100644 index 6d08b1cd..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRegistryResource/en-US/MSFT_xRegistryResource.schema.mfl +++ /dev/null @@ -1,11 +0,0 @@ -[Description("Provides a mechanism to manage registry keys and values on a target node.") : Amended,AMENDMENT, LOCALE("MS_409")] -class MSFT_xRegistryResource : OMI_BaseResource -{ - [Key,Description("The path of the registry key to add, modify, or remove. This path must include the registry hive/drive.") : Amended] String Key; - [Key,Description("The name of the registry value. To add or remove a registry key, specify this property as an empty string without specifying ValueType or ValueData. To modify or remove the default value of a registry key, specify this property as an empty string while also specifying ValueType or ValueData.") : Amended] String ValueName; - [Description("The data the specified registry key value should have as a string or an array of strings (MultiString only).") : Amended] String ValueData[]; - [Description("The type the specified registry key value should have.") : Amended] String ValueType; - [Description("Specifies whether or not the registry key or value should exist. To add or modify a registry key or value, set this property to Present. To remove a registry key or value, set the property to Absent.") : Amended] String Ensure; - [Description("Specifies whether or not the specified DWord or QWord registry key data is provided in a hexadecimal format. Not valid for types other than DWord and QWord. The default value is $false.") : Amended] Boolean Hex; - [Description("Specifies whether or not to overwrite the specified registry key value if it already has a value or whether or not to delete a registry key that has subkeys. The default value is $false.") : Amended] Boolean Force; -}; diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRegistryResource/en-US/MSFT_xRegistryResource.strings.psd1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRegistryResource/en-US/MSFT_xRegistryResource.strings.psd1 deleted file mode 100644 index e300f3e6..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRegistryResource/en-US/MSFT_xRegistryResource.strings.psd1 +++ /dev/null @@ -1,38 +0,0 @@ -# Localized resources for MSFT_xRegistryResource - -ConvertFrom-StringData @' - DefaultValueDisplayName = (Default) - - GetTargetResourceStartMessage = Get-TargetResource is starting for Registry resource with Key {0} - GetTargetResourceEndMessage = Get-TargetResource has finished for Registry resource with Key {0} - RegistryKeyDoesNotExist = The registry key at path {0} does not exist. - RegistryKeyExists = The registry key at path {0} exists. - RegistryKeyValueDoesNotExist = The registry key at path {0} does not have a value named {1}. - RegistryKeyValueExists = The registry key at path {0} has a value named {1}. - - SetTargetResourceStartMessage = Set-TargetResource is starting for Registry resource with Key {0} - SetTargetResourceEndMessage = Set-TargetResource has finished for Registry resource with Key {0} - CreatingRegistryKey = Creating registry key at path {0}... - SettingRegistryKeyValue = Setting the value {0} under the registry key at path {1}... - OverwritingRegistryKeyValue = Overwriting the value {0} under the registry key at path {1}... - RemovingRegistryKey = Removing registry key at path {0}... - RegistryKeyValueAlreadySet = The value {0} under the registry key at path {1} has already been set to the specified value. - RemovingRegistryKeyValue = Removing the value {0} from the registry key at path {1}... - - TestTargetResourceStartMessage = Test-TargetResource is starting for Registry resource with Key {0} - TestTargetResourceEndMessage = Test-TargetResource has finished for Registry resource with Key {0} - RegistryKeyValueTypeDoesNotMatch = The type of the value {0} under the registry key at path {1} does not match the expected type. Expected {2} but was {3}. - RegistryKeyValueDoesNotMatch = The value {0} under the registry key at path {1} does not match the expected value. Expected {2} but was {3}. - - CannotRemoveExistingRegistryKeyWithSubKeysWithoutForce = The registry key at path {0} has subkeys. To remove this registry key please specifiy the Force parameter as $true. - CannotOverwriteExistingRegistryKeyValueWithoutForce = The registry key at path {0} already has a value with the name {1}. To overwrite this registry key value please specifiy the Force parameter as $true. - CannotRemoveExistingRegistryKeyValueWithoutForce = The registry key at path {0} already has a value with the name {1}. To remove this registry key value please specifiy the Force parameter as $true. - RegistryDriveInvalid = The registry drive specified in the registry key path {0} is missing or invalid. - ArrayNotAllowedForExpectedType = The specified value data has been declared as a string array, but the registry key type {0} cannot be converted from an array. Please declare the value data as only one string or use the registry type MultiString. - DWordDataNotInHexFormat = The specified registry key value data {0} is not in the correct hex format to parse as an Int32 (dword). - QWordDataNotInHexFormat = The specified registry key value data {0} is not in the correct hex format to parse as an Int64 (qword). - BinaryDataNotInHexFormat = The specified registry key value data {0} is not in the correct hex format to parse as a Byte array (Binary). - InvalidRegistryDrive = The registry drive {0} is invalid. Please update the Key parameter to include a valid registry drive. - InvalidRegistryDriveAbbreviation = The registry drive abbreviation {0} is invalid. Please update the Key parameter to include a valid registry drive. - RegistryDriveCouldNotBeMounted = The registry drive with the abbreviation {0} could not be mounted. -'@ diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRemoteFile/MSFT_xRemoteFile.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRemoteFile/MSFT_xRemoteFile.psm1 deleted file mode 100644 index ecf0ec15..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRemoteFile/MSFT_xRemoteFile.psm1 +++ /dev/null @@ -1,586 +0,0 @@ -$moduleRoot = Split-Path ` - -Path $MyInvocation.MyCommand.Path ` - -Parent - -#region LocalizedData -$Culture = 'en-us' -if (Test-Path -Path (Join-Path -Path $moduleRoot -ChildPath $PSUICulture)) -{ - $Culture = $PSUICulture -} -Import-LocalizedData ` - -BindingVariable LocalizedData ` - -Filename MSFT_xRemoteFile.psd1 ` - -BaseDirectory $moduleRoot ` - -UICulture $Culture -#endregion - -# Path where cache will be stored. It's cleared whenever LCM gets new configuration. -$script:cacheLocation = "$env:ProgramData\Microsoft\Windows\PowerShell\Configuration\BuiltinProvCache\MSFT_xRemoteFile" - -<# -.Synopsis -The Get-TargetResource function is used to fetch the status of file specified in DestinationPath on the target machine. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $DestinationPath, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Uri - ) - - # Check whether DestinationPath is existing file - $ensure = "Absent" - $pathItemType = Get-PathItemType -path $DestinationPath - switch($pathItemType) - { - "File" - { - Write-Verbose -Message $($LocalizedData.DestinationPathIsExistingFile ` - -f ${DestinationPath}) - $ensure = "Present" - } - - "Directory" - { - Write-Verbose -Message $($LocalizedData.DestinationPathIsExistingPath ` - -f ${DestinationPath}) - - # If it's existing directory, let's check whether expectedDestinationPath exists - $uriFileName = Split-Path $Uri -Leaf - $expectedDestinationPath = Join-Path $DestinationPath $uriFileName - if (Test-Path $expectedDestinationPath) - { - Write-Verbose -Message $($LocalizedData.FileExistsInDestinationPath ` - -f ${uriFileName}) - $ensure = "Present" - } - } - - "Other" - { - Write-Verbose -Message $($LocalizedData.DestinationPathUnknownType ` - -f ${DestinationPath},${pathItemType}) - } - - "NotExists" - { - Write-Verbose -Message $($LocalizedData.DestinationPathDoesNotExist ` - -f ${DestinationPath}) - } - } - - $returnValue = @{ - DestinationPath = $DestinationPath - Uri = $Uri - Ensure = $ensure - } - - $returnValue -} - -<# -.Synopsis -The Set-TargetResource function is used to download file found under Uri location to DestinationPath -Additional parameters can be specified to configure web request -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $DestinationPath, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Uri, - - [System.String] - $UserAgent, - - [Microsoft.Management.Infrastructure.CimInstance[]] - $Headers, - - [System.Management.Automation.PSCredential] - $Credential, - - [parameter(Mandatory = $false)] - [System.Boolean] - $MatchSource = $true, - - [Uint32] - $TimeoutSec, - - [System.String] - $Proxy, - - [System.Management.Automation.PSCredential] - $ProxyCredential - ) - - # Validate Uri - if (-not (Test-UriScheme -uri $Uri -scheme "http|https|file")) - { - $errorMessage = $($LocalizedData.InvalidWebUriError) ` - -f ${Uri} - New-InvalidDataException ` - -errorId "UriValidationFailure" ` - -errorMessage $errorMessage - } - - # Validate DestinationPath scheme - if (-not (Test-UriScheme -uri $DestinationPath -scheme "file")) - { - $errorMessage = $($LocalizedData.InvalidDestinationPathSchemeError ` - -f ${DestinationPath}) - New-InvalidDataException ` - -errorId "DestinationPathSchemeValidationFailure" ` - -errorMessage $errorMessage - } - - # Validate DestinationPath is not UNC path - if ($DestinationPath.StartsWith("\\")) - { - $errorMessage = $($LocalizedData.DestinationPathIsUncError ` - -f ${DestinationPath}) - New-InvalidDataException ` - -errorId "DestinationPathIsUncFailure" ` - -errorMessage $errorMessage - } - - # Validate DestinationPath does not contain invalid characters - @('*','?','"','<','>','|') | % { - if ($DestinationPath.Contains($_) ){ - $errorMessage = $($LocalizedData.DestinationPathHasInvalidCharactersError ` - -f ${DestinationPath}) - New-InvalidDataException ` - -errorId "DestinationPathHasInvalidCharactersError" ` - -errorMessage $errorMessage - } - } - - # Validate DestinationPath does not end with / or \ (Invoke-WebRequest requirement) - if ($DestinationPath.EndsWith('/') -or $DestinationPath.EndsWith('\')){ - $errorMessage = $($LocalizedData.DestinationPathEndsWithInvalidCharacterError ` - -f ${DestinationPath}) - New-InvalidDataException ` - -errorId "DestinationPathEndsWithInvalidCharacterError" ` - -errorMessage $errorMessage - } - - # Check whether DestinationPath's parent directory exists. Create if it doesn't. - $destinationPathParent = Split-Path $DestinationPath -Parent - if (-not (Test-Path $destinationPathParent)) - { - $null = New-Item -ItemType Directory -Path $destinationPathParent -Force - } - - # Check whether DestinationPath's leaf is an existing folder - $uriFileName = Split-Path $Uri -Leaf - if (Test-Path $DestinationPath -PathType Container) - { - $DestinationPath = Join-Path $DestinationPath $uriFileName - } - - # Remove DestinationPath and MatchSource from parameters as they are not parameters of Invoke-WebRequest - $null = $PSBoundParameters.Remove("DestinationPath") - $null = $PSBoundParameters.Remove("MatchSource") - - # Convert headers to hashtable - $null = $PSBoundParameters.Remove("Headers") - $headersHashtable = $null - - if ($Headers -ne $null) - { - $headersHashtable = Convert-KeyValuePairArrayToHashtable -array $Headers - } - - # Invoke web request - try - { - Write-Verbose -Message $($LocalizedData.DownloadingURI ` - -f ${DestinationPath},${URI}) - Invoke-WebRequest @PSBoundParameters -Headers $headersHashtable -outFile $DestinationPath - } - catch [System.OutOfMemoryException] - { - $errorMessage = $($LocalizedData.DownloadOutOfMemoryException ` - -f $_) - New-InvalidDataException ` - -errorId "SystemOutOfMemoryException" ` - -errorMessage $errorMessage - } - catch [System.Exception] - { - $errorMessage = $($LocalizedData.DownloadException ` - -f $_) - New-InvalidDataException ` - -errorId "SystemException" ` - -errorMessage $errorMessage - } - - # Update cache - if (Test-Path -Path $DestinationPath) - { - $downloadedFile = Get-Item -Path $DestinationPath - $lastWriteTime = $downloadedFile.LastWriteTimeUtc - $filesize = $downloadedFile.Length - $inputObject = @{} - $inputObject["LastWriteTime"] = $lastWriteTime - $inputObject["FileSize"] = $filesize - Update-Cache -DestinationPath $DestinationPath -Uri $Uri -InputObject $inputObject - } -} - -<# -.Synopsis -The Test-TargetResource function is used to validate if the DestinationPath exists on the machine. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $DestinationPath, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Uri, - - [System.String] - $UserAgent, - - [Microsoft.Management.Infrastructure.CimInstance[]] - $Headers, - - [System.Management.Automation.PSCredential] - $Credential, - - [parameter(Mandatory = $false)] - [System.Boolean] - $MatchSource = $true, - - [Uint32] - $TimeoutSec, - - [System.String] - $Proxy, - - [System.Management.Automation.PSCredential] - $ProxyCredential - ) - - # Check whether DestinationPath points to existing file or directory - $fileExists = $false - $uriFileName = Split-Path $Uri -Leaf - $pathItemType = Get-PathItemType -Path $DestinationPath - switch($pathItemType) - { - "File" - { - Write-Verbose -Message $($LocalizedData.DestinationPathIsExistingFile ` - -f ${DestinationPath}) - - if ($MatchSource) { - $file = Get-Item -Path $DestinationPath - # Getting cache. It's cleared every time user runs Start-DscConfiguration - $cache = Get-Cache -DestinationPath $DestinationPath -Uri $Uri - - if ($cache -ne $null ` - -and ($cache.LastWriteTime -eq $file.LastWriteTimeUtc) ` - -and ($cache.FileSize -eq $file.Length)) - { - Write-Verbose -Message $($LocalizedData.CacheReflectsCurrentState) - $fileExists = $true - } - else - { - Write-Verbose -Message $($LocalizedData.CacheIsEmptyOrNotMatchCurrentState) - } - } - else - { - Write-Verbose -Message $($LocalizedData.MatchSourceFalse) - $fileExists = $true - } - } - - "Directory" - { - Write-Verbose -Message $($LocalizedData.DestinationPathIsExistingPath ` - -f ${DestinationPath}) - - $expectedDestinationPath = Join-Path -Path $DestinationPath -ChildPath $uriFileName - - if (Test-Path -Path $expectedDestinationPath) - { - if ($MatchSource) - { - $file = Get-Item -Path $expectedDestinationPath - $cache = Get-Cache -DestinationPath $expectedDestinationPath -Uri $Uri - if ($cache -ne $null -and ($cache.LastWriteTime -eq $file.LastWriteTimeUtc)) - { - Write-Verbose -Message $($LocalizedData.CacheReflectsCurrentState) - $fileExists = $true - } - else - { - Write-Verbose -Message $($LocalizedData.CacheIsEmptyOrNotMatchCurrentState) - } - } - else - { - Write-Verbose -Message $($LocalizedData.MatchSourceFalse) - $fileExists = $true - } - } - } - - "Other" - { - Write-Verbose -Message $($LocalizedData.DestinationPathUnknownType ` - -f ${DestinationPath},${pathItemType}) - } - - "NotExists" - { - Write-Verbose -Message $($LocalizedData.DestinationPathDoesNotExist ` - -f ${DestinationPath}) - } - } - - $result = $fileExists - - $result -} - -<# -.Synopsis -Throws terminating error of category InvalidData with specified errorId and errorMessage -#> -function New-InvalidDataException -{ - param( - [parameter(Mandatory = $true)] - [System.String] - $errorId, - - [parameter(Mandatory = $true)] - [System.String] - $errorMessage - ) - - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidData - $exception = New-Object ` - -TypeName System.InvalidOperationException ` - -ArgumentList $errorMessage - $errorRecord = New-Object ` - -TypeName System.Management.Automation.ErrorRecord ` - -ArgumentList $exception, $errorId, $errorCategory, $null - throw $errorRecord -} - -<# -.Synopsis -Checks whether given URI represents specific scheme -.Description -Most common schemes: file, http, https, ftp -We can also specify logical expressions like: [http|https] -#> -function Test-UriScheme -{ - param ( - [parameter(Mandatory = $true)] - [System.String] - $uri, - - [parameter(Mandatory = $true)] - [System.String] - $scheme - ) - $newUri = $uri -as [System.URI] - $newUri.AbsoluteURI -ne $null -and $newUri.Scheme -match $scheme -} - -<# -.Synopsis -Gets type of the item which path points to. -.Outputs -File, Directory, Other or NotExists -#> -function Get-PathItemType -{ - param ( - [parameter(Mandatory = $true)] - [System.String] - $path - ) - - $type = $null - - # Check whether path exists - if (Test-Path $path) - { - # Check type of the path - $pathItem = Get-Item -Path $path - $pathItemType = $pathItem.GetType().Name - if ($pathItemType -eq "FileInfo") - { - $type = "File" - } - elseif ($pathItemType -eq "DirectoryInfo") - { - $type = "Directory" - } - else - { - $type = "Other" - } - } - else - { - $type = "NotExists" - } - - return $type -} - -<# -.Synopsis -Converts CimInstance array of type KeyValuePair to hashtable -#> -function Convert-KeyValuePairArrayToHashtable -{ - param ( - [parameter(Mandatory = $true)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $array - ) - - $hashtable = @{} - foreach($item in $array) - { - $hashtable += @{$item.Key = $item.Value} - } - - return $hashtable -} - -<# -.Synopsis -Gets cache for specific DestinationPath and Uri -#> -function Get-Cache -{ - param ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $DestinationPath, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Uri - ) - - $cacheContent = $null - $key = Get-CacheKey -DestinationPath $DestinationPath -Uri $Uri - $path = Join-Path -Path $script:cacheLocation -ChildPath $key - - Write-Verbose -Message $($LocalizedData.CacheLookingForPath ` - -f ${Path}) - - if(-not (Test-Path -Path $path)) - { - Write-Verbose -Message $($LocalizedData.CacheNotFoundForPath ` - -f ${DestinationPath},${Uri},${Key}) - - $cacheContent = $null - } - else - { - $cacheContent = Import-CliXml -Path $path - Write-Verbose -Message $($LocalizedData.CacheFoundForPath ` - -f ${DestinationPath},${Uri},${Key}) - } - - return $cacheContent -} - -<# -.Synopsis -Creates or updates cache for specific DestinationPath and Uri -#> -function Update-Cache -{ - param ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $DestinationPath, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Uri, - - [parameter(Mandatory = $true)] - [Object] - $InputObject - ) - - $key = Get-CacheKey -DestinationPath $DestinationPath -Uri $Uri - $path = Join-Path -Path $script:cacheLocation -ChildPath $key - - if(-not (Test-Path -Path $script:cacheLocation)) - { - $null = New-Item -ItemType Directory -Path $script:cacheLocation - } - - Write-Verbose -Message $($LocalizedData.UpdatingCache ` - -f ${DestinationPath},${Uri},${Key}) - - Export-CliXml -Path $path -InputObject $InputObject -Force -} - -<# -.Synopsis -Returns cache key for given parameters -#> -function Get-CacheKey -{ - param ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $DestinationPath, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Uri - ) - return [string]::Join("", @($DestinationPath, $Uri)).GetHashCode().ToString() -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRemoteFile/MSFT_xRemoteFile.schema.mof b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRemoteFile/MSFT_xRemoteFile.schema.mof deleted file mode 100644 index 623ac347..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRemoteFile/MSFT_xRemoteFile.schema.mof +++ /dev/null @@ -1,18 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xRemoteFile")] -class MSFT_xRemoteFile : OMI_BaseResource -{ - [Key, Description("Path under which downloaded or copied file should be accessible after operation.")] String DestinationPath; - [Required, Description("Uri of a file which should be copied or downloaded. This parameter supports HTTP and HTTPS values.")] String Uri; - [Write, Description("User agent for the web request.")] String UserAgent; - [Write, EmbeddedInstance("MSFT_KeyValuePair"), Description("Headers of the web request.")] String Headers[]; - [Write, EmbeddedInstance("MSFT_Credential"), Description("Specifies a user account that has permission to send the request.")] String Credential; - [Write, Description("A boolean value to indicate whether the remote file should be re-downloaded if the file in the DestinationPath was modified locally.")] Boolean MatchSource; - [Write, Description("Specifies how long the request can be pending before it times out.")] Uint32 TimeoutSec; - [Write, Description("Uses a proxy server for the request, rather than connecting directly to the Internet resource. Should be the URI of a network proxy server (e.g 'http://10.20.30.1').")] String Proxy; - [Write, EmbeddedInstance("MSFT_Credential"), Description("Specifies a user account that has permission to use the proxy server that is specified by the Proxy parameter.")] String ProxyCredential; - [Read, ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}, Description("Says whether DestinationPath exists on the machine")] String Ensure; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRemoteFile/en-us/MSFT_xRemoteFile.psd1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRemoteFile/en-us/MSFT_xRemoteFile.psd1 deleted file mode 100644 index da903d7d..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xRemoteFile/en-us/MSFT_xRemoteFile.psd1 +++ /dev/null @@ -1,22 +0,0 @@ -ConvertFrom-StringData @' - DestinationPathIsExistingFile=DestinationPath '{0}' is existing file on the machine. - DestinationPathIsExistingPath=DestinationPath '{0}' is existing directory on the machine. - FileExistsInDestinationPath=File '{0}' exists in DestinationPath. - DestinationPathUnknownType=DestinationPath '{0}' has unknown type '{1}'. - DestinationPathDoesNotExist=DestinationPath '{0}' doesn't exist on the machine. - InvalidWebUriError=Specified URI is not valid: "{0}". Only http, https or file paths are accepted. - InvalidDestinationPathSchemeError=Specified DestinationPath is not valid: "{0}". DestinationPath should be absolute path. - DestinationPathIsUncError=Specified DestinationPath is not valid: "{0}". DestinationPath should be local path instead of UNC path. - DestinationPathHasInvalidCharactersError=Specified DestinationPath is not valid: "{0}". DestinationPath should be contains following characters: * ? " < > | - DestinationPathEndsWithInvalidCharacterError=Specified DestinationPath is not valid: "{0}". DestinationPath should not end with / or \\ - DownloadOutOfMemoryException=Invoking web request failed with OutOfMemoryException- Possible cause is the requested file being too big. {0} - DownloadException=Invoking web request failed with error. {0} - DownloadingURI=Downloading '{1}' to '{0}'. - CacheReflectsCurrentState=Cache reflects current state. No need for downloading file. - CacheIsEmptyOrNotMatchCurrentState=Cache is empty or it doesn't reflect current state. File will be downloaded. - MatchSourceFalse=MatchSource is false. No need for downloading file. - CacheLookingForPath=Looking for cache path '{0}'. - CacheNotFoundForPath=No cache found for DestinationPath '{0}' and Uri '{1}' CacheKey '{2}'. - CacheFoundForPath=Found cache found for DestinationPath '{0}' and Uri '{1}' CacheKey '{2}'. - UpdatingCache=Updating cache for DestinationPath '{0}' and Uri '{1}' CacheKey '{2}'. -'@ diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xScriptResource/MSFT_xScriptResource.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xScriptResource/MSFT_xScriptResource.psm1 deleted file mode 100644 index 441449a9..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xScriptResource/MSFT_xScriptResource.psm1 +++ /dev/null @@ -1,283 +0,0 @@ -$errorActionPreference = 'Stop' -Set-StrictMode -Version 'Latest' - -# Import CommonResourceHelper for Get-LocalizedData -$script:dscResourcesFolderFilePath = Split-Path $PSScriptRoot -Parent -$script:commonResourceHelperFilePath = Join-Path -Path $script:dscResourcesFolderFilePath -ChildPath 'CommonResourceHelper.psm1' -Import-Module -Name $script:commonResourceHelperFilePath - -# Localized messages for verbose and error statements in this resource -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xScriptResource' - -<# - .SYNOPSIS - Runs the given get script. - Should return a hashtable. - - .PARAMETER GetScript - The script to retrieve the current state of the resource. - - .PARAMETER SetScript - Not used in Get-TargetResource. - - .PARAMETER TestScript - Not used in Get-TargetResource. - - .PARAMETER Credential - The Credential to run the get script under if needed. -#> -function Get-TargetResource -{ - [OutputType([Hashtable])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $GetScript, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $SetScript, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $TestScript, - - [Parameter()] - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - Write-Verbose -Message $script:localizedData.GetTargetResourceStartVerboseMessage - - $invokeScriptParameters = @{ - ScriptBlock = [ScriptBlock]::Create($GetScript) - } - - if ($PSBoundParameters.ContainsKey('Credential')) - { - $invokeScriptParameters['Credential'] = $Credential - } - - $invokeScriptResult = Invoke-Script @invokeScriptParameters - - if ($invokeScriptResult -is [System.Management.Automation.ErrorRecord]) - { - New-InvalidOperationException -Message $script:localizedData.GetScriptThrewError -ErrorRecord $invokeScriptResult - } - - $invokeScriptResultAsHashTable = $invokeScriptResult -as [Hashtable] - - if ($null -eq $invokeScriptResultAsHashTable) - { - New-InvalidArgumentException -ArgumentName 'TestScript' -Message $script:localizedData.GetScriptDidNotReturnHashtable - } - - Write-Verbose -Message $script:localizedData.GetTargetResourceEndVerboseMessage - - return $invokeScriptResultAsHashTable -} - -<# - .SYNOPSIS - Runs the given set script. - Should not return. - - .PARAMETER GetScript - Not used in Set-TargetResource. - - .PARAMETER SetScript - The script to set the resource to the desired state. - - .PARAMETER TestScript - Not used in Set-TargetResource. - - .PARAMETER Credential - The Credential to run the set script under if needed. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $GetScript, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $SetScript, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $TestScript, - - [Parameter()] - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - Write-Verbose -Message $script:localizedData.SetTargetResourceStartVerboseMessage - - $invokeScriptParameters = @{ - ScriptBlock = [ScriptBlock]::Create($SetScript) - } - - if ($PSBoundParameters.ContainsKey('Credential')) - { - $invokeScriptParameters['Credential'] = $Credential - } - - $invokeScriptResult = Invoke-Script @invokeScriptParameters - - if ($invokeScriptResult -is [System.Management.Automation.ErrorRecord]) - { - New-InvalidOperationException -Message $script:localizedData.SetScriptThrewError -ErrorRecord $invokeScriptResult - } - - Write-Verbose -Message $script:localizedData.SetTargetResourceEndVerboseMessage -} - -<# - .SYNOPSIS - Runs the given test script. - Should return true if the resource is in the desired state and false otherwise. - - .PARAMETER GetScript - Not used in Test-TargetResource. - - .PARAMETER SetScript - Not used in Test-TargetResource. - - .PARAMETER TestScript - The script to validate whether or not the resource is in the desired state. - - .PARAMETER Credential - The Credential to run the test script under if needed. -#> -function Test-TargetResource -{ - [OutputType([Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $GetScript, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $SetScript, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $TestScript, - - [Parameter()] - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - Write-Verbose -Message $script:localizedData.TestTargetResourceStartVerboseMessage - - $invokeScriptParameters = @{ - ScriptBlock = [ScriptBlock]::Create($TestScript) - } - - if ($PSBoundParameters.ContainsKey('Credential')) - { - $invokeScriptParameters['Credential'] = $Credential - } - - $invokeScriptResult = Invoke-Script @invokeScriptParameters - - # If the script is returing multiple objects, then we consider the last object to be the result of the script execution. - if ($invokeScriptResult -is [Object[]] -and $invokeScriptResult.Count -gt 0) - { - $invokeScriptResult = $invokeScriptResult[$invokeScriptResult.Count - 1] - } - - if ($invokeScriptResult -is [System.Management.Automation.ErrorRecord]) - { - New-InvalidOperationException -Message $script:localizedData.TestScriptThrewError -ErrorRecord $invokeScriptResult - } - - if ($null -eq $invokeScriptResult -or -not ($invokeScriptResult -is [Boolean])) - { - New-InvalidArgumentException -ArgumentName 'TestScript' -Message $script:localizedData.TestScriptDidNotReturnBoolean - } - - Write-Verbose -Message $script:localizedData.TestTargetResourceEndVerboseMessage - - return $invokeScriptResult -} - -<# - .SYNOPSIS - Invokes the given script block. - - The output of the script will be returned unless the script throws an error. - If the script throws an error, the ErrorRecord will be returned rather than thrown. - - .PARAMETER ScriptBlock - The script block to invoke. - - .PARAMETER Credential - The credential to run the script under if needed. -#> -function Invoke-Script -{ - [OutputType([Object])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ScriptBlock] - $ScriptBlock, - - [Parameter()] - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - $scriptResult = $null - - try - { - Write-Verbose -Message ($script:localizedData.ExecutingScriptMessage -f $ScriptBlock) - - if ($null -ne $Credential) - { - $scriptResult = Invoke-Command -ScriptBlock $ScriptBlock -Credential $Credential -ComputerName . - } - else - { - $scriptResult = & $ScriptBlock - } - } - catch - { - # Surfacing the error thrown by the execution of the script - $scriptResult = $_ - } - - return $scriptResult -} diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xScriptResource/MSFT_xScriptResource.schema.mof b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xScriptResource/MSFT_xScriptResource.schema.mof deleted file mode 100644 index 321232a0..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xScriptResource/MSFT_xScriptResource.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ - -[ClassVersion("1.0.0"),FriendlyName("xScript")] -class MSFT_xScriptResource : OMI_BaseResource -{ - [Key, Description("A string that can be used to create a PowerShell script block that retrieves the current state of the resource.")] String GetScript; - [Key, Description("A string that can be used to create a PowerShell script block that sets the resource to the desired state.")] String SetScript; - [Key, Description("A string that can be used to create a PowerShell script block that validates whether or not the resource is in the desired state.")] String TestScript; - [Write, EmbeddedInstance("MSFT_Credential"), Description("The credential of the user account to run the script under if needed.")] String Credential; - [Read, Description("The result from the GetScript script block.")] String Result; -}; diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xScriptResource/en-US/MSFT_xScriptResource.schema.mfl b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xScriptResource/en-US/MSFT_xScriptResource.schema.mfl deleted file mode 100644 index 6e031a66d5b6159b85939fcc703cf8a624e63f4b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1936 zcmds&PjAye5XI+=#CKTr1QMz^Z~;!C1%xOR)w#8(GPX-15(oKDON999!0+wEI8HE9 zB`zQ<@$Am{&CHvf*&pA}?br&dEwjqz_SqW#S613RJFuzESk)HL$!29OQidEh`z^bL z<*XaDf$s|}u8=ERvVO_Bu?I*=l!B#T%YMqbMi;Pd*~@-;PHh2tV{3GZMA$Q|1Cb_n z#CsW0Qv1lRuuAOmi08Hy>lW<{-8%w8s(aJxF)$4!#ydT=N9JPwWNRU)mR> zK8iCu4H;G(r`W&3_F4SCuw5&me~mr@)_TtEHArjX8?WmGJ8`dym+<7QrR)SEQiXzj z042cUu)d17z@mxT6pNnUWQ1Q~EvQ0fpRiXg-II_!hQh9q#ZFi0ES@x3l?Op8lg;s!Gj(!ChX&m^!p$*!yK3>!}{nd2ohr!=QKd z|G?li*=z3P8y0jLZ{mq|#wymDYCdgrCOangnf95f-s-LX4&U9>{1fBjeLs!)sK*tv zB2stFW9G_kyRW?Sm2ZlDhE`MB^VT`4;=0eTj;MZvXm0rI)c5mp zN56@6w@c4JPUD=`9ie&9&(+~=rkUpTYN@uexnjMFcU4!<{i!g#FSh5|Z8ABAiJBWy Rcfp#wB#n2B=km?`{S&t%PMZJ# diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xScriptResource/en-US/MSFT_xScriptResource.strings.psd1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xScriptResource/en-US/MSFT_xScriptResource.strings.psd1 deleted file mode 100644 index ade8a719..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xScriptResource/en-US/MSFT_xScriptResource.strings.psd1 +++ /dev/null @@ -1,16 +0,0 @@ -# Localized MSFT_xScriptResource.strings.psd1 - -ConvertFrom-StringData @' - GetTargetResourceStartVerboseMessage = Begin executing get script. - GetScriptThrewError = The get script threw an error. - GetScriptDidNotReturnHashtable = The get script did not return a hashtable. - GetTargetResourceEndVerboseMessage = End executing get script. - SetTargetResourceStartVerboseMessage = Begin executing set script. - SetScriptThrewError = The set script threw an error. - SetTargetResourceEndVerboseMessage = End executing set script. - TestTargetResourceStartVerboseMessage = Begin executing test script. - TestScriptThrewError = The test script threw an error. - TestScriptDidNotReturnBoolean = The test script did not return a boolean. - TestTargetResourceEndVerboseMessage = End executing test script. - ExecutingScriptMessage = Executing script: {0} -'@ diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/MSFT_xServiceResource.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/MSFT_xServiceResource.psm1 deleted file mode 100644 index 846e3182..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/MSFT_xServiceResource.psm1 +++ /dev/null @@ -1,1763 +0,0 @@ -<# - Error codes and their meanings for Invoke-CimMethod on a Win32_Service can be found here: - https://msdn.microsoft.com/en-us/library/aa384901(v=vs.85).aspx -#> - -$errorActionPreference = 'Stop' -Set-StrictMode -Version 'Latest' - -# Import CommonResourceHelper for Get-LocalizedData, Test-IsNanoServer, New-InvalidArgumentException, New-InvalidOperationException -$script:dscResourcesFolderFilePath = Split-Path $PSScriptRoot -Parent -$script:commonResourceHelperFilePath = Join-Path -Path $script:dscResourcesFolderFilePath -ChildPath 'CommonResourceHelper.psm1' -Import-Module -Name $script:commonResourceHelperFilePath - -# Localized messages for verbose and error statements in this resource -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xServiceResource' - -<# - .SYNOPSIS - Retrieves the current status of the service resource with the given name. - - .PARAMETER Name - The name of the service to retrieve the status of. - - This may be different from the service's display name. - To retrieve a list of all services with their names and current states, use the Get-Service - cmdlet. -#> -function Get-TargetResource -{ - [OutputType([Hashtable])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name - ) - - $service = Get-Service -Name $Name -ErrorAction 'SilentlyContinue' - - if ($null -ne $service) - { - Write-Verbose -Message ($script:localizedData.ServiceExists -f $Name) - - $serviceCimInstance = Get-ServiceCimInstance -ServiceName $Name - - $dependencies = @() - - foreach ($serviceDependedOn in $service.ServicesDependedOn) - { - $dependencies += $serviceDependedOn.Name.ToString() - } - - $startupType = ConvertTo-StartupTypeString -StartMode $serviceCimInstance.StartMode - - $builtInAccount = switch ($serviceCimInstance.StartName) - { - 'NT Authority\NetworkService' { 'NetworkService'; break } - 'NT Authority\LocalService' { 'LocalService'; break } - default { $serviceCimInstance.StartName } - } - - $serviceResource = @{ - Name = $Name - Ensure = 'Present' - Path = $serviceCimInstance.PathName - StartupType = $startupType - BuiltInAccount = $builtInAccount - State = $service.Status.ToString() - DisplayName = $service.DisplayName - Description = $serviceCimInstance.Description - DesktopInteract = $serviceCimInstance.DesktopInteract - Dependencies = $dependencies - } - } - else - { - Write-Verbose -Message ($script:localizedData.ServiceDoesNotExist -f $Name) - $serviceResource = @{ - Name = $Name - Ensure = 'Absent' - } - } - - return $serviceResource -} - -<# - .SYNOPSIS - Creates, modifies, or deletes the service with the given name. - - .PARAMETER Name - The name of the service to create, modify, or delete. - - This may be different from the service's display name. - To retrieve a list of all services with their names and current states, use the Get-Service - cmdlet. - - .PARAMETER Ensure - Specifies whether the service should exist or not. - - Set this property to Present to create or modify a service. - Set this property to Absent to delete a service. - - The default value is Present. - - .PARAMETER Path - The path to the executable the service should run. - Required when creating a service. - - The user account specified by BuiltInAccount or Credential must have access to this path in - order to start the service. - - .PARAMETER StartupType - The startup type the service should have. - - .PARAMETER BuiltInAccount - The built-in account the service should start under. - - Cannot be specified at the same time as Credential. - - The user account specified by this property must have access to the service executable path - defined by Path in order to start the service. - - .PARAMETER DesktopInteract - Indicates whether or not the service should be able to communicate with a window on the - desktop. - - Must be false for services not running as LocalSystem. - The default value is false. - - .PARAMETER State - The state the service should be in. - The default value is Running. - - To disregard the state that the service is in, specify this property as Ignore. - - .PARAMETER DisplayName - The display name the service should have. - - .PARAMETER Description - The description the service should have. - - .PARAMETER Dependencies - An array of the names of the dependencies the service should have. - - .PARAMETER StartupTimeout - The time to wait for the service to start in milliseconds. - The default value is 30000 (30 seconds). - - .PARAMETER TerminateTimeout - The time to wait for the service to stop in milliseconds. - The default value is 30000 (30 seconds). - - .PARAMETER Credential - The credential of the user account the service should start under. - - Cannot be specified at the same time as BuiltInAccount. - The user specified by this credential will automatically be granted the Log on as a Service - right. - - The user account specified by this property must have access to the service executable path - defined by Path in order to start the service. - - .NOTES - SupportsShouldProcess is enabled because Invoke-CimMethod calls ShouldProcess. - Here are the paths through which Set-TargetResource calls Invoke-CimMethod: - - Set-TargetResource --> Set-ServicePath --> Invoke-CimMethod - --> Set-ServiceProperty --> Set-ServiceDependencies --> Invoke-CimMethod - --> Set-ServiceAccountProperty --> Invoke-CimMethod - --> Set-ServiceStartupType --> Invoke-CimMethod -#> -function Set-TargetResource -{ - [CmdletBinding(SupportsShouldProcess = $true)] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [ValidateSet('Automatic', 'Manual', 'Disabled')] - [String] - $StartupType, - - [ValidateSet('LocalSystem', 'LocalService', 'NetworkService')] - [String] - $BuiltInAccount, - - [ValidateSet('Running', 'Stopped', 'Ignore')] - [String] - $State = 'Running', - - [Boolean] - $DesktopInteract = $false, - - [ValidateNotNullOrEmpty()] - [String] - $DisplayName, - - [ValidateNotNullOrEmpty()] - [String] - $Description, - - [String[]] - [AllowEmptyCollection()] - $Dependencies, - - [UInt32] - $StartupTimeout = 30000, - - [UInt32] - $TerminateTimeout = 30000, - - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - if ($PSBoundParameters.ContainsKey('StartupType')) - { - Assert-NoStartupTypeStateConflict -ServiceName $Name -StartupType $StartupType -State $State - } - - if ($PSBoundParameters.ContainsKey('BuiltInAccount') -and $PSBoundParameters.ContainsKey('Credential')) - { - $errorMessage = $script:localizedData.BuiltInAccountAndCredentialSpecified -f $Name - New-InvalidArgumentException -ArgumentName 'BuiltInAccount & Credential' -Message $errorMessage - } - - $service = Get-Service -Name $Name -ErrorAction 'SilentlyContinue' - - if ($Ensure -eq 'Absent') - { - if ($null -eq $service) - { - Write-Verbose -Message $script:localizedData.ServiceAlreadyAbsent - } - else - { - Write-Verbose -Message ($script:localizedData.RemovingService -f $Name) - - Stop-ServiceWithTimeout -ServiceName $Name -TerminateTimeout $TerminateTimeout - Remove-ServiceWithTimeout -Name $Name -TerminateTimeout $TerminateTimeout - } - } - else - { - $serviceRestartNeeded = $false - - # Create new service or update the service path if needed - if ($null -eq $service) - { - if ($PSBoundParameters.ContainsKey('Path')) - { - Write-Verbose -Message ($script:localizedData.CreatingService -f $Name, $Path) - $null = New-Service -Name $Name -BinaryPathName $Path - } - else - { - $errorMessage = $script:localizedData.ServiceDoesNotExistPathMissingError -f $Name - New-InvalidArgumentException -ArgumentName 'Path' -Message $errorMessage - } - } - else - { - if ($PSBoundParameters.ContainsKey('Path')) - { - $serviceRestartNeeded = Set-ServicePath -ServiceName $Name -Path $Path - } - } - - # Update the properties of the service if needed - $setServicePropertyParameters = @{} - - $servicePropertyParameterNames = @( 'StartupType', 'BuiltInAccount', 'Credential', 'DesktopInteract', 'DisplayName', 'Description', 'Dependencies' ) - - foreach ($servicePropertyParameterName in $servicePropertyParameterNames) - { - if ($PSBoundParameters.ContainsKey($servicePropertyParameterName)) - { - $setServicePropertyParameters[$servicePropertyParameterName] = $PSBoundParameters[$servicePropertyParameterName] - } - } - - if ($setServicePropertyParameters.Count -gt 0) - { - Write-Verbose -Message ($script:localizedData.EditingServiceProperties -f $Name) - Set-ServiceProperty -ServiceName $Name @setServicePropertyParameters - } - - # Update service state if needed - if ($State -eq 'Stopped') - { - Stop-ServiceWithTimeout -ServiceName $Name -TerminateTimeout $TerminateTimeout - } - elseif ($State -eq 'Running') - { - if ($serviceRestartNeeded) - { - Write-Verbose -Message ($script:localizedData.RestartingService -f $Name) - Stop-ServiceWithTimeout -ServiceName $Name -TerminateTimeout $TerminateTimeout - } - - Start-ServiceWithTimeout -ServiceName $Name -StartupTimeout $StartupTimeout - } - } -} - -<# - .SYNOPSIS - Tests if the service with the given name has the specified property values. - - .PARAMETER Name - The name of the service to test. - - This may be different from the service's display name. - To retrieve a list of all services with their names and current states, use the Get-Service - cmdlet. - - .PARAMETER Ensure - Specifies whether the service should exist or not. - - Set this property to Present to test if a service exists. - Set this property to Absent to test if a service does not exist. - - The default value is Present. - - .PARAMETER Path - The path to the executable the service should be running. - - .PARAMETER StartupType - The startup type the service should have. - - .PARAMETER BuiltInAccount - The account the service should be starting under. - - Cannot be specified at the same time as Credential. - - .PARAMETER DesktopInteract - Indicates whether or not the service should be able to communicate with a window on the - desktop. - - Should be false for services not running as LocalSystem. - The default value is false. - - .PARAMETER State - The state the service should be in. - The default value is Running. - - To disregard the state that the service is in, specify this property as Ignore. - - .PARAMETER DisplayName - The display name the service should have. - - .PARAMETER Description - The description the service should have. - - .PARAMETER Dependencies - An array of the names of the dependencies the service should have. - - .PARAMETER StartupTimeout - Not used in Test-TargetResource. - - .PARAMETER TerminateTimeout - Not used in Test-TargetResource. - - .PARAMETER Credential - The credential the service should be running under. - - Cannot be specified at the same time as BuiltInAccount. -#> -function Test-TargetResource -{ - [OutputType([Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [ValidateSet('Automatic', 'Manual', 'Disabled')] - [String] - $StartupType, - - [ValidateSet('LocalSystem', 'LocalService', 'NetworkService')] - [String] - $BuiltInAccount, - - [Boolean] - $DesktopInteract = $false, - - [ValidateSet('Running', 'Stopped', 'Ignore')] - [String] - $State = 'Running', - - [ValidateNotNull()] - [String] - $DisplayName, - - [String] - [AllowEmptyString()] - $Description, - - [String[]] - [AllowEmptyCollection()] - $Dependencies, - - [UInt32] - $StartupTimeout = 30000, - - [UInt32] - $TerminateTimeout = 30000, - - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - if ($PSBoundParameters.ContainsKey('StartupType')) - { - Assert-NoStartupTypeStateConflict -ServiceName $Name -StartupType $StartupType -State $State - } - - if ($PSBoundParameters.ContainsKey('BuiltInAccount') -and $PSBoundParameters.ContainsKey('Credential')) - { - $errorMessage = $script:localizedData.BuiltInAccountAndCredentialSpecified -f $Name - New-InvalidArgumentException -ArgumentName 'BuiltInAccount & Credential' -Message $errorMessage - } - - $serviceResource = Get-TargetResource -Name $Name - - if ($serviceResource.Ensure -eq 'Absent') - { - Write-Verbose -Message ($script:localizedData.ServiceDoesNotExist -f $Name) - if($StartupType -eq 'Disabled') - { - return $true - } - return ($Ensure -eq 'Absent') - } - else - { - Write-Verbose -Message ($script:localizedData.ServiceExists -f $Name) - - if ($Ensure -eq 'Absent') - { - return $false - } - - # Check the service path - if ($PSBoundParameters.ContainsKey('Path')) - { - $pathsMatch = Test-PathsMatch -ExpectedPath $Path -ActualPath $serviceResource.Path - - if (-not $pathsMatch) - { - Write-Verbose -Message ($script:localizedData.ServicePathDoesNotMatch -f $Name, $Path, $serviceResource.Path) - return $false - } - } - - # Check the service display name - if ($PSBoundParameters.ContainsKey('DisplayName') -and $serviceResource.DisplayName -ine $DisplayName) - { - Write-Verbose -Message ($script:localizedData.ServicePropertyDoesNotMatch -f 'DisplayName', $Name, $DisplayName, $serviceResource.DisplayName) - return $false - } - - # Check the service description - if ($PSBoundParameters.ContainsKey('Description') -and $serviceResource.Description -ine $Description) - { - Write-Verbose -Message ($script:localizedData.ServicePropertyDoesNotMatch -f 'Description', $Name, $Description, $serviceResource.Description) - return $false - } - - # Check the service dependencies - if ($PSBoundParameters.ContainsKey('Dependencies')) - { - $serviceDependenciesDoNotMatch = $false - - if ($null -eq $serviceResource.Dependencies -xor $null -eq $Dependencies) - { - $serviceDependenciesDoNotMatch = $true - } - elseif ($null -ne $serviceResource.Dependencies -and $null -ne $Dependencies) - { - $mismatchedDependencies = Compare-Object -ReferenceObject $serviceResource.Dependencies -DifferenceObject $Dependencies - $serviceDependenciesDoNotMatch = $null -ne $mismatchedDependencies - } - - if ($serviceDependenciesDoNotMatch) - { - $expectedDependenciesString = $Dependencies -join ',' - $actualDependenciesString = $serviceResource.Dependencies -join ',' - - Write-Verbose -Message ($script:localizedData.ServicePropertyDoesNotMatch -f 'Dependencies', $Name, $expectedDependenciesString, $actualDependenciesString) - return $false - } - } - - # Check the service desktop interation setting - if ($PSBoundParameters.ContainsKey('DesktopInteract') -and $serviceResource.DesktopInteract -ine $DesktopInteract) - { - Write-Verbose -Message ($script:localizedData.ServicePropertyDoesNotMatch -f 'DesktopInteract', $Name, $DesktopInteract, $serviceResource.DesktopInteract) - return $false - } - - # Check the service account properties - if ($PSBoundParameters.ContainsKey('BuiltInAccount') -and $serviceResource.BuiltInAccount -ine $BuiltInAccount) - { - Write-Verbose -Message ($script:localizedData.ServicePropertyDoesNotMatch -f 'BuiltInAccount', $Name, $BuiltInAccount, $serviceResource.BuiltInAccount) - return $false - } - elseif ($PSBoundParameters.ContainsKey('Credential')) - { - $expectedStartName = ConvertTo-StartName -Username $Credential.UserName - - if ($serviceResource.BuiltInAccount -ine $expectedStartName) - { - Write-Verbose -Message ($script:localizedData.ServiceCredentialDoesNotMatch -f $Name, $Credential.UserName, $serviceResource.BuiltInAccount) - return $false - } - } - - # Check the service startup type - if ($PSBoundParameters.ContainsKey('StartupType') -and $serviceResource.StartupType -ine $StartupType) - { - Write-Verbose -Message ($script:localizedData.ServicePropertyDoesNotMatch -f 'StartupType', $Name, $StartupType, $serviceResource.StartupType) - return $false - } - - # Check the service state - if ($State -ne 'Ignore' -and $serviceResource.State -ine $State) - { - Write-Verbose -Message ($script:localizedData.ServicePropertyDoesNotMatch -f 'State', $Name, $State, $serviceResource.State) - return $false - } - } - - return $true -} - -<# - .SYNOPSIS - Retrieves the CIM instance of the service with the given name. - - .PARAMETER ServiceName - The name of the service to get the CIM instance of. -#> -function Get-ServiceCimInstance -{ - [OutputType([CimInstance])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullorEmpty()] - $ServiceName - ) - - return Get-CimInstance -ClassName 'Win32_Service' -Filter "Name='$ServiceName'" -} - -<# - .SYNOPSIS - Converts the StartMode value returned in a CIM instance of a service to the format - expected by this resource. - - .PARAMETER StartMode - The StartMode value to convert. -#> -function ConvertTo-StartupTypeString -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Auto', 'Manual', 'Disabled')] - [String] - $StartMode - ) - - if ($StartMode -eq 'Auto') - { - return 'Automatic' - } - - return $StartMode -} - -<# - .SYNOPSIS - Throws an invalid argument error if the given service startup type conflicts with the given - service state. - - .PARAMETER ServiceName - The name of the service for the error message. - - .PARAMETER StartupType - The service startup type to check. - - .PARAMETER State - The service state to check. -#> -function Assert-NoStartupTypeStateConflict -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ServiceName, - - [Parameter(Mandatory = $true)] - [ValidateSet('Automatic', 'Manual', 'Disabled')] - [String] - $StartupType, - - [Parameter(Mandatory = $true)] - [ValidateSet('Running', 'Stopped', 'Ignore')] - [String] - $State - ) - - if ($State -eq 'Stopped') - { - if ($StartupType -eq 'Automatic') - { - # Cannot stop a service and set it to start automatically at the same time - $errorMessage = $script:localizedData.StartupTypeStateConflict -f $ServiceName, $StartupType, $State - New-InvalidArgumentException -ArgumentName 'StartupType and State' -Message $errorMessage - } - } - elseif ($State -eq 'Running') - { - if ($StartupType -eq 'Disabled') - { - # Cannot start a service and disable it at the same time - $errorMessage = $script:localizedData.StartupTypeStateConflict -f $ServiceName, $StartupType, $State - New-InvalidArgumentException -ArgumentName 'StartupType and State' -Message $errorMessage - } - } -} - -<# - .SYNOPSIS - Tests if the two given paths match. - - .PARAMETER ExpectedPath - The expected path to test against. - - .PARAMETER ActualPath - The actual path to test. -#> -function Test-PathsMatch -{ - [OutputType([Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ExpectedPath, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ActualPath - ) - - return (0 -eq [String]::Compare($ExpectedPath, $ActualPath, [System.Globalization.CultureInfo]::CurrentUICulture)) -} - -<# - .SYNOPSIS - Converts the given username to the string version of it that would be expected in a - service's StartName property. - - .PARAMETER Username - The username to convert. -#> -function ConvertTo-StartName -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Username - ) - - $startName = $Username - - if ($Username -ieq 'NetworkService' -or $Username -ieq 'LocalService') - { - $startName = "NT Authority\$Username" - } - elseif (-not $Username.Contains('\') -and -not $Username.Contains('@')) - { - $startName = ".\$Username" - } - elseif ($Username.StartsWith("$env:computerName\")) - { - $startName = $Username.Replace($env:computerName, '.') - } - - return $startName -} - -<# - .SYNOPSIS - Sets the executable path of the service with the given name. - Returns a boolean specifying whether a restart is needed or not. - - .PARAMETER ServiceName - The name of the service to set the path of. - - .PARAMETER Path - The path to set for the service. - - .NOTES - SupportsShouldProcess is enabled because Invoke-CimMethod calls ShouldProcess. - This function calls Invoke-CimMethod directly. -#> -function Set-ServicePath -{ - [OutputType([Boolean])] - [CmdletBinding(SupportsShouldProcess = $true)] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ServiceName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path - ) - - $serviceCimInstance = Get-ServiceCimInstance -ServiceName $ServiceName - - $pathsMatch = Test-PathsMatch -ExpectedPath $Path -ActualPath $serviceCimInstance.PathName - - if ($pathsMatch) - { - Write-Verbose -Message ($script:localizedData.ServicePathMatches -f $ServiceName) - return $false - } - else - { - Write-Verbose -Message ($script:localizedData.ServicePathDoesNotMatch -f $ServiceName) - - $changeServiceArguments = @{ - PathName = $Path - } - - $changeServiceResult = Invoke-CimMethod ` - -InputObject $serviceCimInstance ` - -MethodName 'Change' ` - -Arguments $changeServiceArguments - - if ($changeServiceResult.ReturnValue -ne 0) - { - $serviceChangePropertyString = $changeServiceArguments.Keys -join ', ' - $errorMessage = $script:localizedData.InvokeCimMethodFailed -f 'Change', $ServiceName, $serviceChangePropertyString, $changeServiceResult.ReturnValue - New-InvalidArgumentException -ArgumentName 'Path' -Message $errorMessage - } - - return $true - } -} - -<# - .SYNOPSIS - Sets the dependencies of the service with the given name. - - .PARAMETER ServiceName - The name of the service to set the dependencies of. - - .PARAMETER Dependencies - The names of the dependencies to set for the service. - - .NOTES - SupportsShouldProcess is enabled because Invoke-CimMethod calls ShouldProcess. - This function calls Invoke-CimMethod directly. -#> -function Set-ServiceDependencies -{ - [CmdletBinding(SupportsShouldProcess = $true)] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ServiceName, - - [Parameter(Mandatory = $true)] - [String[]] - [AllowEmptyCollection()] - $Dependencies - ) - - $service = Get-Service -Name $ServiceName -ErrorAction 'SilentlyContinue' - - $serviceDependenciesMatch = $true - - $noActualServiceDependencies = $null -eq $service.ServicesDependedOn -or 0 -eq $service.ServicesDependedOn.Count - $noExpectedServiceDependencies = $null -eq $Dependencies -or 0 -eq $Dependencies.Count - - if ($noActualServiceDependencies -xor $noExpectedServiceDependencies) - { - $serviceDependenciesMatch = $false - } - elseif (-not $noActualServiceDependencies -and -not $noExpectedServiceDependencies) - { - $mismatchedDependencies = Compare-Object -ReferenceObject $service.ServicesDependedOn.Name -DifferenceObject $Dependencies - $serviceDependenciesMatch = $null -eq $mismatchedDependencies - } - - if ($serviceDependenciesMatch) - { - Write-Verbose -Message ($script:localizedData.ServiceDepdenciesMatch -f $ServiceName) - } - else - { - Write-Verbose -Message ($script:localizedData.ServiceDepdenciesDoNotMatch -f $ServiceName) - - $serviceCimInstance = Get-ServiceCimInstance -ServiceName $ServiceName - - $changeServiceArguments = @{ - ServiceDependencies = $Dependencies - } - - $changeServiceResult = Invoke-CimMethod ` - -InputObject $serviceCimInstance ` - -MethodName 'Change' ` - -Arguments $changeServiceArguments - - if ($changeServiceResult.ReturnValue -ne 0) - { - $serviceChangePropertyString = $changeServiceArguments.Keys -join ', ' - $errorMessage = $script:localizedData.InvokeCimMethodFailed -f 'Change', $ServiceName, $serviceChangePropertyString, $changeServiceResult.ReturnValue - New-InvalidArgumentException -Message $errorMessage -ArgumentName 'Dependencies' - } - } -} - -<# - .SYNOPSIS - Grants the 'Log on as a service' right to the user with the given username. - - .PARAMETER Username - The username of the user to grant 'Log on as a service' right to -#> -function Grant-LogOnAsServiceRight -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Username - ) - - $logOnAsServiceText = @" - namespace LogOnAsServiceHelper - { - using Microsoft.Win32.SafeHandles; - using System; - using System.Runtime.ConstrainedExecution; - using System.Runtime.InteropServices; - using System.Security; - - public class NativeMethods - { - #region constants - // from ntlsa.h - private const int POLICY_LOOKUP_NAMES = 0x00000800; - private const int POLICY_CREATE_ACCOUNT = 0x00000010; - private const uint ACCOUNT_ADJUST_SYSTEM_ACCESS = 0x00000008; - private const uint ACCOUNT_VIEW = 0x00000001; - private const uint SECURITY_ACCESS_SERVICE_LOGON = 0x00000010; - - // from LsaUtils.h - private const uint STATUS_OBJECT_NAME_NOT_FOUND = 0xC0000034; - - // from lmcons.h - private const int UNLEN = 256; - private const int DNLEN = 15; - - // Extra characteres for "\","@" etc. - private const int EXTRA_LENGTH = 3; - #endregion constants - - #region interop structures - /// - /// Used to open a policy, but not containing anything meaqningful - /// - [StructLayout(LayoutKind.Sequential)] - private struct LSA_OBJECT_ATTRIBUTES - { - public UInt32 Length; - public IntPtr RootDirectory; - public IntPtr ObjectName; - public UInt32 Attributes; - public IntPtr SecurityDescriptor; - public IntPtr SecurityQualityOfService; - - public void Initialize() - { - this.Length = 0; - this.RootDirectory = IntPtr.Zero; - this.ObjectName = IntPtr.Zero; - this.Attributes = 0; - this.SecurityDescriptor = IntPtr.Zero; - this.SecurityQualityOfService = IntPtr.Zero; - } - } - - /// - /// LSA string - /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] - private struct LSA_UNICODE_STRING - { - internal ushort Length; - internal ushort MaximumLength; - [MarshalAs(UnmanagedType.LPWStr)] - internal string Buffer; - - internal void Set(string src) - { - this.Buffer = src; - this.Length = (ushort)(src.Length * sizeof(char)); - this.MaximumLength = (ushort)(this.Length + sizeof(char)); - } - } - - /// - /// Structure used as the last parameter for LSALookupNames - /// - [StructLayout(LayoutKind.Sequential)] - private struct LSA_TRANSLATED_SID2 - { - public uint Use; - public IntPtr SID; - public int DomainIndex; - public uint Flags; - }; - #endregion interop structures - - #region safe handles - /// - /// Handle for LSA objects including Policy and Account - /// - private class LsaSafeHandle : SafeHandleZeroOrMinusOneIsInvalid - { - [DllImport("advapi32.dll")] - private static extern uint LsaClose(IntPtr ObjectHandle); - - /// - /// Prevents a default instance of the LsaPolicySafeHAndle class from being created. - /// - private LsaSafeHandle(): base(true) - { - } - - /// - /// Calls NativeMethods.CloseHandle(handle) - /// - /// the return of NativeMethods.CloseHandle(handle) - [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] - protected override bool ReleaseHandle() - { - long returnValue = LsaSafeHandle.LsaClose(this.handle); - return returnValue != 0; - - } - } - - /// - /// Handle for IntPtrs returned from Lsa calls that have to be freed with - /// LsaFreeMemory - /// - private class SafeLsaMemoryHandle : SafeHandleZeroOrMinusOneIsInvalid - { - [DllImport("advapi32")] - internal static extern int LsaFreeMemory(IntPtr Buffer); - - private SafeLsaMemoryHandle() : base(true) { } - - private SafeLsaMemoryHandle(IntPtr handle) - : base(true) - { - SetHandle(handle); - } - - private static SafeLsaMemoryHandle InvalidHandle - { - get { return new SafeLsaMemoryHandle(IntPtr.Zero); } - } - - override protected bool ReleaseHandle() - { - return SafeLsaMemoryHandle.LsaFreeMemory(handle) == 0; - } - - internal IntPtr Memory - { - get - { - return this.handle; - } - } - } - #endregion safe handles - - #region interop function declarations - /// - /// Opens LSA Policy - /// - [DllImport("advapi32.dll", SetLastError = true, PreserveSig = true)] - private static extern uint LsaOpenPolicy( - IntPtr SystemName, - ref LSA_OBJECT_ATTRIBUTES ObjectAttributes, - uint DesiredAccess, - out LsaSafeHandle PolicyHandle - ); - - /// - /// Convert the name into a SID which is used in remaining calls - /// - [DllImport("advapi32", CharSet = CharSet.Unicode, SetLastError = true), SuppressUnmanagedCodeSecurityAttribute] - private static extern uint LsaLookupNames2( - LsaSafeHandle PolicyHandle, - uint Flags, - uint Count, - LSA_UNICODE_STRING[] Names, - out SafeLsaMemoryHandle ReferencedDomains, - out SafeLsaMemoryHandle Sids - ); - - /// - /// Opens the LSA account corresponding to the user's SID - /// - [DllImport("advapi32.dll", SetLastError = true, PreserveSig = true)] - private static extern uint LsaOpenAccount( - LsaSafeHandle PolicyHandle, - IntPtr Sid, - uint Access, - out LsaSafeHandle AccountHandle); - - /// - /// Creates an LSA account corresponding to the user's SID - /// - [DllImport("advapi32.dll", SetLastError = true, PreserveSig = true)] - private static extern uint LsaCreateAccount( - LsaSafeHandle PolicyHandle, - IntPtr Sid, - uint Access, - out LsaSafeHandle AccountHandle); - - /// - /// Gets the LSA Account access - /// - [DllImport("advapi32.dll", SetLastError = true, PreserveSig = true)] - private static extern uint LsaGetSystemAccessAccount( - LsaSafeHandle AccountHandle, - out uint SystemAccess); - - /// - /// Sets the LSA Account access - /// - [DllImport("advapi32.dll", SetLastError = true, PreserveSig = true)] - private static extern uint LsaSetSystemAccessAccount( - LsaSafeHandle AccountHandle, - uint SystemAccess); - #endregion interop function declarations - - /// - /// Sets the Log On As A Service Policy for , if not already set. - /// - /// the user name we want to allow logging on as a service - /// If the is null or empty. - /// In the following cases: - /// Failure opening the LSA Policy. - /// The is too large. - /// Failure looking up the user name. - /// Failure opening LSA account (other than account not found). - /// Failure creating LSA account. - /// Failure getting LSA account policy access. - /// Failure setting LSA account policy access. - /// - public static void SetLogOnAsServicePolicy(string userName) - { - if (String.IsNullOrEmpty(userName)) - { - throw new ArgumentNullException("userName"); - } - - LSA_OBJECT_ATTRIBUTES objectAttributes = new LSA_OBJECT_ATTRIBUTES(); - objectAttributes.Initialize(); - - // All handles are delcared in advance so they can be closed on finally - LsaSafeHandle policyHandle = null; - SafeLsaMemoryHandle referencedDomains = null; - SafeLsaMemoryHandle sids = null; - LsaSafeHandle accountHandle = null; - - try - { - uint status = LsaOpenPolicy( - IntPtr.Zero, - ref objectAttributes, - POLICY_LOOKUP_NAMES | POLICY_CREATE_ACCOUNT, - out policyHandle); - - if (status != 0) - { - throw new InvalidOperationException("CannotOpenPolicyErrorMessage"); - } - - // Unicode strings have a maximum length of 32KB. We don't want to create - // LSA strings with more than that. User lengths are much smaller so this check - // ensures userName's length is useful - if (userName.Length > UNLEN + DNLEN + EXTRA_LENGTH) - { - throw new InvalidOperationException("UserNameTooLongErrorMessage"); - } - - LSA_UNICODE_STRING lsaUserName = new LSA_UNICODE_STRING(); - lsaUserName.Set(userName); - - LSA_UNICODE_STRING[] names = new LSA_UNICODE_STRING[1]; - names[0].Set(userName); - - status = LsaLookupNames2( - policyHandle, - 0, - 1, - new LSA_UNICODE_STRING[] { lsaUserName }, - out referencedDomains, - out sids); - - if (status != 0) - { - throw new InvalidOperationException("CannotLookupNamesErrorMessage"); - } - - LSA_TRANSLATED_SID2 sid = (LSA_TRANSLATED_SID2)Marshal.PtrToStructure(sids.Memory, typeof(LSA_TRANSLATED_SID2)); - - status = LsaOpenAccount(policyHandle, - sid.SID, - ACCOUNT_VIEW | ACCOUNT_ADJUST_SYSTEM_ACCESS, - out accountHandle); - - uint currentAccess = 0; - - if (status == 0) - { - status = LsaGetSystemAccessAccount(accountHandle, out currentAccess); - - if (status != 0) - { - throw new InvalidOperationException("CannotGetAccountAccessErrorMessage"); - } - - } - else if (status == STATUS_OBJECT_NAME_NOT_FOUND) - { - status = LsaCreateAccount( - policyHandle, - sid.SID, - ACCOUNT_ADJUST_SYSTEM_ACCESS, - out accountHandle); - - if (status != 0) - { - throw new InvalidOperationException("CannotCreateAccountAccessErrorMessage"); - } - } - else - { - throw new InvalidOperationException("CannotOpenAccountErrorMessage"); - } - - if ((currentAccess & SECURITY_ACCESS_SERVICE_LOGON) == 0) - { - status = LsaSetSystemAccessAccount( - accountHandle, - currentAccess | SECURITY_ACCESS_SERVICE_LOGON); - if (status != 0) - { - throw new InvalidOperationException("CannotSetAccountAccessErrorMessage"); - } - } - } - finally - { - if (policyHandle != null) { policyHandle.Close(); } - if (referencedDomains != null) { referencedDomains.Close(); } - if (sids != null) { sids.Close(); } - if (accountHandle != null) { accountHandle.Close(); } - } - } - } - } -"@ - - try - { - $null = [LogOnAsServiceHelper.NativeMethods] - } - catch - { - $logOnAsServiceText = $logOnAsServiceText.Replace('CannotOpenPolicyErrorMessage', ` - $script:localizedData.CannotOpenPolicyErrorMessage) - $logOnAsServiceText = $logOnAsServiceText.Replace('UserNameTooLongErrorMessage', ` - $script:localizedData.UserNameTooLongErrorMessage) - $logOnAsServiceText = $logOnAsServiceText.Replace('CannotLookupNamesErrorMessage', ` - $script:localizedData.CannotLookupNamesErrorMessage) - $logOnAsServiceText = $logOnAsServiceText.Replace('CannotOpenAccountErrorMessage', ` - $script:localizedData.CannotOpenAccountErrorMessage) - $logOnAsServiceText = $logOnAsServiceText.Replace('CannotCreateAccountAccessErrorMessage', ` - $script:localizedData.CannotCreateAccountAccessErrorMessage) - $logOnAsServiceText = $logOnAsServiceText.Replace('CannotGetAccountAccessErrorMessage', ` - $script:localizedData.CannotGetAccountAccessErrorMessage) - $logOnAsServiceText = $logOnAsServiceText.Replace('CannotSetAccountAccessErrorMessage', ` - $script:localizedData.CannotSetAccountAccessErrorMessage) - $null = Add-Type $logOnAsServiceText -PassThru - } - - if ($Username.StartsWith('.\')) - { - $Username = $Username.Substring(2) - } - - try - { - [LogOnAsServiceHelper.NativeMethods]::SetLogOnAsServicePolicy($Username) - } - catch - { - $errorMessage = $script:localizedData.ErrorSettingLogOnAsServiceRightsForUser -f $Username, $_.Exception.Message - New-InvalidOperationException -Message $errorMessage - } -} - -<# - .SYNOPSIS - Sets the service properties involving the account the service is running under. - (StartName, StartPassword, DesktopInteract) - - .PARAMETER ServiceName - The name of the service to change the start name of. - - .PARAMETER BuiltInAccount - The name of the built-in account to run the service under. - This value will overwrite the Credential value if Credential is also declared. - - .PARAMETER Credential - The user credential to run the service under. - BuiltInAccount will overwrite this value if BuiltInAccount is also declared. - - .PARAMETER DesktopInteract - Indicates whether or not the service should be able to communicate with a window on the - desktop. - - Must be false for services not running as LocalSystem. - - .NOTES - DesktopInteract is included here because it can only be enabled when the service startup - account name is LocalSystem. In order not to run into a conflict where one property has - been updated before the other, both are updated here at the same time. - - SupportsShouldProcess is enabled because Invoke-CimMethod calls ShouldProcess. - This function calls Invoke-CimMethod directly. -#> -function Set-ServiceAccountProperty -{ - [CmdletBinding(SupportsShouldProcess = $true)] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ServiceName, - - [Parameter()] - [String] - [ValidateSet('LocalSystem', 'LocalService', 'NetworkService')] - $BuiltInAccount, - - [Parameter()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [Parameter()] - [Boolean] - $DesktopInteract - ) - - $serviceCimInstance = Get-ServiceCimInstance -ServiceName $ServiceName - - $changeServiceArguments = @{} - - if ($PSBoundParameters.ContainsKey('BuiltInAccount')) - { - $startName = ConvertTo-StartName -Username $BuiltInAccount - - if ($serviceCimInstance.StartName -ine $startName) - { - $changeServiceArguments['StartName'] = $startName - $changeServiceArguments['StartPassword'] = '' - } - } - elseif ($PSBoundParameters.ContainsKey('Credential')) - { - $startName = ConvertTo-StartName -Username $Credential.UserName - - if ($serviceCimInstance.StartName -ine $startName) - { - Grant-LogOnAsServiceRight -Username $startName - - $changeServiceArguments['StartName'] = $startName - $changeServiceArguments['StartPassword'] = $Credential.GetNetworkCredential().Password - } - } - - if ($PSBoundParameters.ContainsKey('DesktopInteract')) - { - if ($serviceCimInstance.DesktopInteract -ne $DesktopInteract) - { - $changeServiceArguments['DesktopInteract'] = $DesktopInteract - } - } - - if ($changeServiceArguments.Count -gt 0) - { - $changeServiceResult = Invoke-CimMethod -InputObject $ServiceCimInstance -MethodName 'Change' -Arguments $changeServiceArguments - - if ($changeServiceResult.ReturnValue -ne 0) - { - $serviceChangePropertyString = $changeServiceArguments.Keys -join ', ' - $errorMessage = $script:localizedData.InvokeCimMethodFailed -f 'Change', $ServiceName, $serviceChangePropertyString, $changeServiceResult.ReturnValue - New-InvalidArgumentException -ArgumentName 'BuiltInAccount, Credential, or DesktopInteract' -Message $errorMessage - } - } -} - -<# - .SYNOPSIS - Sets the startup type of the service with the given name. - - .PARAMETER ServiceName - The name of the service to set the startup type of. - - .PARAMETER StartupType - The startup type value to set for the service. - - .NOTES - SupportsShouldProcess is enabled because Invoke-CimMethod calls ShouldProcess. - This function calls Invoke-CimMethod directly. -#> -function Set-ServiceStartupType -{ - [CmdletBinding(SupportsShouldProcess = $true)] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ServiceName, - - [Parameter(Mandatory = $true)] - [ValidateSet('Automatic', 'Manual', 'Disabled')] - [String] - $StartupType - ) - - $serviceCimInstance = Get-ServiceCimInstance -ServiceName $ServiceName - $serviceStartupType = ConvertTo-StartupTypeString -StartMode $serviceCimInstance.StartMode - - if ($serviceStartupType -ieq $StartupType) - { - Write-Verbose -Message ($script:localizedData.ServiceStartupTypeMatches -f $ServiceName) - } - else - { - Write-Verbose -Message ($script:localizedData.ServiceStartupTypeDoesNotMatch -f $ServiceName) - - $changeServiceArguments = @{ - StartMode = $StartupType - } - - $changeResult = Invoke-CimMethod ` - -InputObject $serviceCimInstance ` - -MethodName 'Change' ` - -Arguments $changeServiceArguments - - if ($changeResult.ReturnValue -ne 0) - { - $serviceChangePropertyString = $changeServiceArguments.Keys -join ', ' - $errorMessage = $script:localizedData.InvokeCimMethodFailed -f 'Change', $ServiceName, $serviceChangePropertyString, $changeResult.ReturnValue - New-InvalidArgumentException -ArgumentName 'StartupType' -Message $errorMessage - } - } -} - -<# - .SYNOPSIS - Sets the service with the given name to have the specified properties. - - .PARAMETER Name - The name of the service to set the properties of. - - .PARAMETER DisplayName - The display name the service should have. - - .PARAMETER Description - The description the service should have. - - .PARAMETER Dependencies - The names of the dependencies the service should have. - - .PARAMETER BuiltInAccount - The built-in account the service should start under. - - Cannot be specified at the same time as Credential. - - .PARAMETER Credential - The credential of the user account the service should start under. - - Cannot be specified at the same time as BuiltInAccount. - The user specified by this credential will automatically be granted the Log on as a Service - right. - - .PARAMETER DesktopInteract - Indicates whether or not the service should be able to communicate with a window on the desktop. - - .PARAMETER StartupType - The startup type the service should have. - - .NOTES - SupportsShouldProcess is enabled because Invoke-CimMethod calls ShouldProcess. - Here are the paths through which Set-ServiceProperty calls Invoke-CimMethod: - - Set-ServiceProperty --> Set-ServiceDependencies --> Invoke-CimMethod - --> Set-ServieceAccountProperty --> Invoke-CimMethod - --> Set-ServiceStartupType --> Invoke-CimMethod -#> -function Set-ServiceProperty -{ - [CmdletBinding(SupportsShouldProcess = $true)] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ServiceName, - - [Parameter()] - [ValidateSet('Automatic', 'Manual', 'Disabled')] - [String] - $StartupType, - - [Parameter()] - [ValidateSet('LocalSystem', 'LocalService', 'NetworkService')] - [String] - $BuiltInAccount, - - [Parameter()] - [Boolean] - $DesktopInteract, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $DisplayName, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [String] - $Description, - - [Parameter()] - [String[]] - [AllowEmptyCollection()] - $Dependencies, - - [Parameter()] - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - # Update display name and/or description if needed - $serviceCimInstance = Get-ServiceCimInstance -ServiceName $ServiceName - - $setServiceParameters = @{} - - if ($PSBoundParameters.ContainsKey('DisplayName') -and $serviceCimInstance.DisplayName -ine $DisplayName) - { - $setServiceParameters['DisplayName'] = $DisplayName - } - - if ($PSBoundParameters.ContainsKey('Description') -and $serviceCimInstance.Description -ine $Description) - { - $setServiceParameters['Description'] = $Description - } - - if ($setServiceParameters.Count -gt 0) - { - $null = Set-Service -Name $ServiceName @setServiceParameters - } - - # Update service dependencies if needed - if ($PSBoundParameters.ContainsKey('Dependencies')) - { - Set-ServiceDependencies -ServiceName $ServiceName -Dependencies $Dependencies - } - - # Update service account properties if needed - $setServiceAccountPropertyParameters = @{} - - if ($PSBoundParameters.ContainsKey('BuiltInAccount')) - { - $setServiceAccountPropertyParameters['BuiltInAccount'] = $BuiltInAccount - } - elseif ($PSBoundParameters.ContainsKey('Credential')) - { - $setServiceAccountPropertyParameters['Credential'] = $Credential - } - - if ($PSBoundParameters.ContainsKey('DesktopInteract')) - { - $setServiceAccountPropertyParameters['DesktopInteract'] = $DesktopInteract - } - - if ($setServiceAccountPropertyParameters.Count -gt 0) - { - Set-ServiceAccountProperty -ServiceName $ServiceName @setServiceAccountPropertyParameters - } - - # Update startup type - if ($PSBoundParameters.ContainsKey('StartupType')) - { - Set-ServiceStartupType -ServiceName $ServiceName -StartupType $StartupType - } -} - -<# - .SYNOPSIS - Deletes the service with the given name. - - This is a wrapper function for unit testing. - - .PARAMETER Name - The name of the service to delete. -#> -function Remove-Service -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name - ) - - & 'sc.exe' 'delete' $Name -} - -<# - .SYNOPSIS - Deletes the service with the given name and waits for the service to be deleted. - - .PARAMETER Name - The name of the service to delete. - - .PARAMETER TerminateTimeout - The time to wait for the service to be deleted in milliseconds. -#> -function Remove-ServiceWithTimeout -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [UInt32] - $TerminateTimeout - ) - - Remove-Service -Name $Name - - $serviceDeleted = $false - $start = [DateTime]::Now - - while (-not $serviceDeleted -and ([DateTime]::Now - $start).TotalMilliseconds -lt $TerminateTimeout) - { - $service = Get-Service -Name $Name -ErrorAction 'SilentlyContinue' - - if ($null -eq $service) - { - $serviceDeleted = $true - } - else - { - Write-Verbose -Message ($script:localizedData.WaitingForServiceDeletion -f $Name) - Start-Sleep -Seconds 1 - } - } - - if ($serviceDeleted) - { - Write-Verbose -Message ($script:localizedData.ServiceDeletionSucceeded -f $Name) - } - else - { - New-InvalidOperationException -Message ($script:localizedData.ServiceDeletionFailed -f $Name) - } -} - -<# - .SYNOPSIS - Waits for the service with the given name to reach the given state within the given time - span. - - This is a wrapper function for unit testing. - - .PARAMETER ServiceName - The name of the service that should be in the given state. - - .PARAMETER State - The state the service should be in. - - .PARAMETER WaitTimeSpan - A time span of how long to wait for the service to reach the desired state. -#> -function Wait-ServiceStateWithTimeout -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ServiceName, - - [Parameter(Mandatory = $true)] - [System.ServiceProcess.ServiceControllerStatus] - $State, - - [Parameter(Mandatory = $true)] - [TimeSpan] - $WaitTimeSpan - ) - - $service = Get-Service -Name $ServiceName -ErrorAction 'SilentlyContinue' - $Service.WaitForStatus($State, $WaitTimeSpan) -} - -<# - .SYNOPSIS - Starts the service with the given name, if it is not already running, and waits for the - service to be running. - - .PARAMETER ServiceName - The name of the service to start. - - .PARAMETER StartupTimeout - The time to wait for the service to be running in milliseconds. -#> -function Start-ServiceWithTimeout -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ServiceName, - - [Parameter(Mandatory = $true)] - [UInt32] - $StartupTimeout - ) - - Start-Service -Name $ServiceName - $waitTimeSpan = New-Object -TypeName 'TimeSpan' -ArgumentList (0, 0, 0, 0, $StartupTimeout) - Wait-ServiceStateWithTimeout -ServiceName $ServiceName -State 'Running' -WaitTimeSpan $waitTimeSpan -} - -<# - .SYNOPSIS - Stops the service with the given name, if it is not already stopped, and waits for the - service to be stopped. - - .PARAMETER ServiceName - The name of the service to stop. - - .PARAMETER TerminateTimeout - The time to wait for the service to be stopped in milliseconds. -#> -function Stop-ServiceWithTimeout -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ServiceName, - - [Parameter(Mandatory = $true)] - [UInt32] - $TerminateTimeout - ) - - Stop-Service -Name $ServiceName - $waitTimeSpan = New-Object -TypeName 'TimeSpan' -ArgumentList (0, 0, 0, 0, $TerminateTimeout) - Wait-ServiceStateWithTimeout -ServiceName $ServiceName -State 'Stopped' -WaitTimeSpan $waitTimeSpan -} diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/MSFT_xServiceResource.schema.mof b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/MSFT_xServiceResource.schema.mof deleted file mode 100644 index 6c12296b..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/MSFT_xServiceResource.schema.mof +++ /dev/null @@ -1,18 +0,0 @@ - -[ClassVersion("1.0.0"),FriendlyName("xService")] -class MSFT_xServiceResource : OMI_BaseResource -{ - [Key,Description("Indicates the service name. Note that sometimes this is different from the display name. You can get a list of the services and their current state with the Get-Service cmdlet.")] String Name; - [Write,Description("Ensures that the service is present or absent. Defaults to Present."),ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] String Ensure; - [Write,Description("The path to the service executable file.")] String Path; - [Write,Description("Indicates the startup type for the service."),ValueMap{"Automatic", "Manual", "Disabled"},Values{"Automatic", "Manual", "Disabled"}] String StartupType; - [Write,Description("Indicates the sign-in account to use for the service."),ValueMap{"LocalSystem", "LocalService", "NetworkService"},Values{"LocalSystem", "LocalService", "NetworkService"}] String BuiltInAccount; - [Write,Description("The credential to run the service under."),EmbeddedInstance("MSFT_Credential")] String Credential; - [Write,Description("The service can create or communicate with a window on the desktop. Must be false for services not running as LocalSystem. Defaults to False.")] Boolean DesktopInteract; - [Write,Description("Indicates the state you want to ensure for the service. Defaults to Running."),ValueMap{"Running", "Stopped", "Ignore"},Values{"Running", "Stopped", "Ignore"}] String State; - [Write,Description("The display name of the service.")] String DisplayName; - [Write,Description("The description of the service.")] String Description; - [Write,Description("An array of strings indicating the names of the dependencies of the service.")] String Dependencies[]; - [Write,Description("The time to wait for the service to start in milliseconds. Defaults to 30000.")] uint32 StartupTimeout; - [Write,Description("The time to wait for the service to stop in milliseconds. Defaults to 30000.")] uint32 TerminateTimeout; -}; diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/en-US/MSFT_xServiceResource.schema.mfl b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/en-US/MSFT_xServiceResource.schema.mfl deleted file mode 100644 index 989970f91ea29d8d244da0130f45bab9104ef19f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2812 zcmc&$U2oGs5S(Wu{)5F6NT}k07vRbLK&q6aRg*d$Y51yZ-s(632*ox78t$(Km`H*%t z#IV{%A$3(ArI^Tcwxaa`zHs$oZ^xq{yQbxas0%!Ce_)nlj#8ej(-oJW@6M?_I9~oG ztIbM~GK41MuNZo;xEv=TV^^%=OLsJ?MLXo2vaFm|930as=iHpL&tpe;HpDV15&aLQ z=0uQK_N6*0NV54TaC5^J~%QvvuoqD|{_?x=@9e4pb4eqFJ%hrbTyecX{g` z$x*{;{UX?{lKyT;iFs=u`MqZP`>kEiJAYyKX-(El>))@{H^t|z-Q#;3IqvngG2?eXPThG`ff?(7G^~uM zOBCioT|`~fRSMS?-8+Dob8i9(ZS|&*8b7)Psm)ZL#PQ!c{JEhJI#;{fJABCgRoSVg V>J6cLUQTG8Q*nyg>E)?>{sO>j=-dDR diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/en-US/MSFT_xServiceResource.strings.psd1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/en-US/MSFT_xServiceResource.strings.psd1 deleted file mode 100644 index 7c79160a..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/en-US/MSFT_xServiceResource.strings.psd1 +++ /dev/null @@ -1,38 +0,0 @@ -<# - Localized resources for MSFT_xServiceResource - Strings underneath the blank line are for Grant-LogOnAsServiceRight. -#> - -ConvertFrom-StringData @' - ServiceExists = Service {0} exists. - ServiceDoesNotExist = Service {0} does not exist. - BuiltInAccountAndCredentialSpecified = Both BuiltInAccount and Credential cannot be specified. Please remove one for service {0}. - ServiceAlreadyAbsent = Service {0} is already absent. No change required. - ServiceDoesNotExistPathMissingError = The service '{0}' does not exist, but Path was not specified. Please specify the path to the executable the service should run to create a new service. - CreatingService = Creating new service {0}... - EditingServiceProperties = Editing the properties of service {0}... - RemovingService = Removing the service {0}... - RestartingService = Restarting the service {0}... - ServicePathMatches = The path of service {0} matches the expected path. - ServicePathDoesNotMatch = The path of service {0} does not match the expected path. - ServiceDepdenciesMatch = The dependencies of service {0} match the expected dependencies. - ServiceDepdenciesDoNotMatch = The dependencies of service {0} do not match the expected dependencies. - ServiceStartupTypeMatches = The start mode of service {0} matches the expected start mode. - ServiceStartupTypeDoesNotMatch = The start mode of service {0} does not match the expected start mode. - ServicePropertyDoesNotMatch = The service property {0} of service {1} does not match the expected value. The expected value is {2}. The actual value is {3}. - ServiceCredentialDoesNotMatch = The start name of service {0} does not match the expected username from the given credential. The expected value is {1}. The actual value is {2}. - ServiceDeletionSucceeded = The service {0} has been successfully deleted. - ServiceDeletionFailed = Failed to delete service {0}. - WaitingForServiceDeletion = Waiting for service {0} to be deleted. - ErrorSettingLogOnAsServiceRightsForUser = Error granting user {0} the right to log on as a service. Error message: '{1}' - StartupTypeStateConflict = Service {0} cannot have a startup type of {1} and a state of {2} at the same time. - InvokeCimMethodFailed = The CIM method {0} failed on service {1} while attempting to update the {2} property(s) with the error code {3}. - - CannotOpenPolicyErrorMessage = Cannot open policy manager. - UserNameTooLongErrorMessage = User name is too long. - CannotLookupNamesErrorMessage = Failed to lookup user name. - CannotOpenAccountErrorMessage = Failed to open policy for user. - CannotCreateAccountAccessErrorMessage = Failed to create policy for user. - CannotGetAccountAccessErrorMessage = Failed to get user policy rights. - CannotSetAccountAccessErrorMessage = Failed to set user policy rights. -'@ diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xUserResource/MSFT_xUserResource.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xUserResource/MSFT_xUserResource.psm1 deleted file mode 100644 index aed7515a..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xUserResource/MSFT_xUserResource.psm1 +++ /dev/null @@ -1,1341 +0,0 @@ -# User name and password needed for this resource and Write-Verbose Used in helper functions -[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingUserNameAndPassWordParams', '')] -[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSDSCUseVerboseMessageInDSCResource', '')] -param () - -Import-Module -Name (Join-Path -Path (Split-Path $PSScriptRoot -Parent) ` - -ChildPath 'CommonResourceHelper.psm1') - -# Localized messages for Write-Verbose statements in this resource -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xUserResource' - -if (-not (Test-IsNanoServer)) -{ - Add-Type -AssemblyName 'System.DirectoryServices.AccountManagement' -} - -<# - .SYNOPSIS - Retrieves the user with the given username - - .PARAMETER UserName - The name of the user to retrieve. -#> -function Get-TargetResource -{ - [OutputType([System.Collections.Hashtable])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $UserName - ) - - if (Test-IsNanoServer) - { - Get-TargetResourceOnNanoServer @PSBoundParameters - } - else - { - Get-TargetResourceOnFullSKU @PSBoundParameters - } -} - -<# - .SYNOPSIS - Creates, modifies, or deletes a user. - - .PARAMETER UserName - The name of the user to create, modify, or delete. - - .PARAMETER Ensure - Specifies whether the user should exist or not. - By default this is set to Present. - - .PARAMETER FullName - The (optional) full name or display name of the user. - If not provided this value will remain blank. - - .PARAMETER Description - Optional description for the user. - - .PARAMETER Password - The desired password for the user. - - .PARAMETER Disabled - Specifies whether the user should be disabled or not. - By default this is set to $false - - .PARAMETER PasswordNeverExpires - Specifies whether the password should ever expire or not. - By default this is set to $false - - .PARAMETER PasswordChangeRequired - Specifies whether the user must reset their password or not. - By default this is set to $false - - .PARAMETER PasswordChangeNotAllowed - Specifies whether the user is allowed to change their password or not. - By default this is set to $false - - .NOTES - If Ensure is set to 'Present' then the password parameter is required. -#> -function Set-TargetResource -{ - # Should process is called in a helper functions but not directly in Set-TargetResource - [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '')] - [CmdletBinding(SupportsShouldProcess = $true)] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $UserName, - - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present', - - [System.String] - $FullName, - - [System.String] - $Description, - - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Password, - - [System.Boolean] - $Disabled, - - [System.Boolean] - $PasswordNeverExpires, - - [System.Boolean] - $PasswordChangeRequired, - - [System.Boolean] - $PasswordChangeNotAllowed - ) - - if (Test-IsNanoServer) - { - Set-TargetResourceOnNanoServer @PSBoundParameters - } - else - { - Set-TargetResourceOnFullSKU @PSBoundParameters - } -} - -<# - .SYNOPSIS - Tests if a user is in the desired state. - - .PARAMETER UserName - The name of the user to test the state of. - - .PARAMETER Ensure - Specifies whether the user should exist or not. - By default this is set to Present - - .PARAMETER FullName - The full name/display name that the user should have. - If not provided, this value will not be tested. - - .PARAMETER Description - The description that the user should have. - If not provided, this value will not be tested. - - .PARAMETER Password - The password the user should have. - - .PARAMETER Disabled - Specifies whether the user account should be disabled or not. - - .PARAMETER PasswordNeverExpires - Specifies whether the password should ever expire or not. - - .PARAMETER PasswordChangeRequired - Not used in Test-TargetResource as there is no easy way to test this value. - - .PARAMETER PasswordChangeNotAllowed - Specifies whether the user should be allowed to change their password or not. -#> -function Test-TargetResource -{ - [OutputType([System.Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $UserName, - - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present', - - [System.String] - $FullName, - - [System.String] - $Description, - - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Password, - - [System.Boolean] - $Disabled, - - [System.Boolean] - $PasswordNeverExpires, - - [System.Boolean] - $PasswordChangeRequired, - - [System.Boolean] - $PasswordChangeNotAllowed - ) - - if (Test-IsNanoServer) - { - Test-TargetResourceOnNanoServer @PSBoundParameters - } - else - { - Test-TargetResourceOnFullSKU @PSBoundParameters - } -} - - -<# - .SYNOPSIS - Retrieves the user with the given username when on a full server - - .PARAMETER UserName - The name of the user to retrieve. -#> -function Get-TargetResourceOnFullSKU -{ - [OutputType([System.Collections.Hashtable])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $UserName - ) - - Set-StrictMode -Version Latest - - Assert-UserNameValid -UserName $UserName - - # Try to find a user by a name - $principalContext = New-Object ` - -TypeName System.DirectoryServices.AccountManagement.PrincipalContext ` - -ArgumentList ([System.DirectoryServices.AccountManagement.ContextType]::Machine) - - try - { - Write-Verbose -Message 'Starting Get-TargetResource on FullSKU' - $user = [System.DirectoryServices.AccountManagement.UserPrincipal]::FindByIdentity($principalContext, $UserName) - if ($null -ne $user) - { - # The user is found. Return all user properties and Ensure='Present'. - $returnValue = @{ - UserName = $user.Name - Ensure = 'Present' - FullName = $user.DisplayName - Description = $user.Description - Disabled = -not $user.Enabled - PasswordNeverExpires = $user.PasswordNeverExpires - PasswordChangeRequired = $null - PasswordChangeNotAllowed = $user.UserCannotChangePassword - } - - return $returnValue - } - - # The user is not found. Return Ensure = Absent. - return @{ - UserName = $UserName - Ensure = 'Absent' - } - } - catch - { - New-ConnectionException -ErrorId 'MultipleMatches' -ErrorMessage ($script:localizedData.MultipleMatches + $_) - } - finally - { - if ($null -ne $user) - { - $user.Dispose() - } - - $principalContext.Dispose() - } -} - -<# - .SYNOPSIS - Creates, modifies, or deletes a user when on a full server. - - .PARAMETER UserName - The name of the user to create, modify, or delete. - - .PARAMETER Ensure - Specifies whether the user should exist or not. - By default this is set to Present - - .PARAMETER FullName - The (optional) full name or display name of the user. - If not provided this value will remain blank. - - .PARAMETER Description - Optional description for the user. - - .PARAMETER Password - The desired password for the user. - - .PARAMETER Disabled - Specifies whether the user should be disabled or not. - By default this is set to $false - - .PARAMETER PasswordNeverExpires - Specifies whether the password should ever expire or not. - By default this is set to $false - - .PARAMETER PasswordChangeRequired - Specifies whether the user must reset their password or not. - By default this is set to $false - - .PARAMETER PasswordChangeNotAllowed - Specifies whether the user is allowed to change their password or not. - By default this is set to $false - - .NOTES - If Ensure is set to 'Present' then the Password parameter is required. -#> -function Set-TargetResourceOnFullSKU -{ - [CmdletBinding(SupportsShouldProcess = $true)] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $UserName, - - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present', - - [System.String] - $FullName, - - [System.String] - $Description, - - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Password, - - [System.Boolean] - $Disabled, - - [System.Boolean] - $PasswordNeverExpires, - - [System.Boolean] - $PasswordChangeRequired, - - [System.Boolean] - $PasswordChangeNotAllowed - ) - - Set-StrictMode -Version Latest - - Write-Verbose -Message ($script:localizedData.ConfigurationStarted -f $UserName) - - Assert-UserNameValid -UserName $UserName - - - # Try to find a user by name. - $principalContext = New-Object ` - -TypeName System.DirectoryServices.AccountManagement.PrincipalContext ` - -ArgumentList ([System.DirectoryServices.AccountManagement.ContextType]::Machine) - - try - { - try - { - $user = [System.DirectoryServices.AccountManagement.UserPrincipal]::FindByIdentity($principalContext, $UserName) - } - catch - { - New-InvalidOperationException -Message ($script:localizedData.MultipleMatches + $_) - } - - if ($Ensure -eq 'Present') - { - $whatIfShouldProcess = $true - $userExists = $false - $saveChanges = $false - - if ($null -eq $user) - { - # A user does not exist. Check WhatIf for adding a user - $whatIfShouldProcess = $pscmdlet.ShouldProcess($script:localizedData.UserWithName -f $UserName, $script:localizedData.AddOperation) - } - else - { - # A user exists - $userExists = $true - - # Check WhatIf for setting a user - $whatIfShouldProcess = $pscmdlet.ShouldProcess($script:localizedData.UserWithName -f $UserName, $script:localizedData.SetOperation) - } - - if ($whatIfShouldProcess) - { - if (-not $userExists) - { - # The user with the provided name does not exist so add a new user - $user = New-Object ` - -TypeName System.DirectoryServices.AccountManagement.UserPrincipal ` - -ArgumentList $principalContext - $user.Name = $UserName - $saveChanges = $true - } - - # Set user properties. - if ($PSBoundParameters.ContainsKey('FullName') -and ((-not $userExists) -or ($FullName -ne $user.DisplayName))) - { - $user.DisplayName = $FullName - $saveChanges = $true - } - else - { - if (-not $userExists) - { - # For a newly created user, set the DisplayName property to an empty string since by default DisplayName is set to user's name - $user.DisplayName = [String]::Empty - } - } - - if ($PSBoundParameters.ContainsKey('Description') -and ((-not $userExists) -or ($Description -ne $user.Description))) - { - $user.Description = $Description - $saveChanges = $true - } - - # Set the password regardless of the state of the user - if ($PSBoundParameters.ContainsKey('Password')) - { - $user.SetPassword($Password.GetNetworkCredential().Password) - $saveChanges = $true - } - - if ($PSBoundParameters.ContainsKey('Disabled') -and ((-not $userExists) -or ($Disabled -eq $user.Enabled))) - { - $user.Enabled = -not $Disabled - $saveChanges = $true - } - - if ($PSBoundParameters.ContainsKey('PasswordNeverExpires') -and ((-not $userExists) -or ($PasswordNeverExpires -ne $user.PasswordNeverExpires))) - { - $user.PasswordNeverExpires = $PasswordNeverExpires - $saveChanges = $true - } - - if ($PSBoundParameters.ContainsKey('PasswordChangeRequired')) - { - if ($PasswordChangeRequired) - { - # Expire the password which will force the user to change the password at the next logon - $user.ExpirePasswordNow() - $saveChanges = $true - } - } - - if ($PSBoundParameters.ContainsKey('PasswordChangeNotAllowed') -and ((-not $userExists) -or ($PasswordChangeNotAllowed -ne $user.UserCannotChangePassword))) - { - $user.UserCannotChangePassword = $PasswordChangeNotAllowed - $saveChanges = $true - - } - - if ($saveChanges) - { - $user.Save() - - # Send an operation success verbose message - if ($userExists) - { - Write-Verbose -Message ($script:localizedData.UserUpdated -f $UserName) - } - else - { - Write-Verbose -Message ($script:localizedData.UserCreated -f $UserName) - } - } - else - { - Write-Verbose -Message ($script:localizedData.NoConfigurationRequired -f $UserName) - } - } - } - else - { - # Ensure is set to 'Absent' - if ($user -ne $null) - { - # The user exists - if ($pscmdlet.ShouldProcess($script:localizedData.UserWithName -f $UserName, $script:localizedData.RemoveOperation)) - { - # Remove the user - $user.Delete() - } - - Write-Verbose -Message ($script:localizedData.UserRemoved -f $UserName) - } - else - { - Write-Verbose -Message ($script:localizedData.NoConfigurationRequiredUserDoesNotExist -f $UserName) - } - } - } - catch - { - New-InvalidOperationException -Message $_ - } - finally - { - if ($null -ne $user) - { - $user.Dispose() - } - - $principalContext.Dispose() - } - - Write-Verbose -Message ($script:localizedData.ConfigurationCompleted -f $UserName) -} - -<# - .SYNOPSIS - Tests if a user is in the desired state when on a full server. - - .PARAMETER UserName - The name of the user to test the state of. - - .PARAMETER Ensure - Specifies whether the user should exist or not. - By default this is set to Present - - .PARAMETER FullName - The full name/display name that the user should have. - If not provided, this value will not be tested. - - .PARAMETER Description - The description that the user should have. - If not provided, this value will not be tested. - - .PARAMETER Password - The password the user should have. - - .PARAMETER Disabled - Specifies whether the user account should be disabled or not. - - .PARAMETER PasswordNeverExpires - Specifies whether the password should ever expire or not. - - .PARAMETER PasswordChangeRequired - Not used in Test-TargetResource as there is no easy way to test this value. - - .PARAMETER PasswordChangeNotAllowed - Specifies whether the user should be allowed to change their password or not. -#> -function Test-TargetResourceOnFullSKU -{ - [OutputType([System.Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $UserName, - - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present', - - [System.String] - $FullName, - - [System.String] - $Description, - - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Password, - - [System.Boolean] - $Disabled, - - [System.Boolean] - $PasswordNeverExpires, - - [System.Boolean] - $PasswordChangeRequired, - - [System.Boolean] - $PasswordChangeNotAllowed - ) - - Set-StrictMode -Version Latest - - Assert-UserNameValid -UserName $UserName - - # Try to find a user by a name - $principalContext = New-Object System.DirectoryServices.AccountManagement.PrincipalContext ` - -ArgumentList ([System.DirectoryServices.AccountManagement.ContextType]::Machine) - - try - { - $user = [System.DirectoryServices.AccountManagement.UserPrincipal]::FindByIdentity($principalContext, $UserName) - if ($null -eq $user) - { - # A user with the provided name does not exist - Write-Verbose -Message ($script:localizedData.UserDoesNotExist -f $UserName) - - if ($Ensure -eq 'Absent') - { - return $true - } - else - { - return $false - } - } - - # A user with the provided name exists - Write-Verbose -Message ($script:localizedData.UserExists -f $UserName) - - # Validate separate properties - if ($Ensure -eq 'Absent') - { - # The Ensure property does not match - Write-Verbose -Message ($script:localizedData.PropertyMismatch -f 'Ensure', 'Absent', 'Present') - return $false - } - - if ($PSBoundParameters.ContainsKey('FullName') -and $FullName -ne $user.DisplayName) - { - # The FullName property does not match - Write-Verbose -Message ($script:localizedData.PropertyMismatch -f 'FullName', $FullName, $user.DisplayName) - return $false - } - - if ($PSBoundParameters.ContainsKey('Description') -and $Description -ne $user.Description) - { - # The Description property does not match - Write-Verbose -Message ($script:localizedData.PropertyMismatch -f 'Description', $Description, $user.Description) - return $false - } - - # Password - if ($PSBoundParameters.ContainsKey('Password')) - { - if (-not $principalContext.ValidateCredentials($UserName, $Password.GetNetworkCredential().Password)) - { - # The Password property does not match - Write-Verbose -Message ($script:localizedData.PasswordPropertyMismatch -f 'Password') - return $false - } - } - - if ($PSBoundParameters.ContainsKey('Disabled') -and $Disabled -eq $user.Enabled) - { - # The Disabled property does not match - Write-Verbose -Message ($script:localizedData.PropertyMismatch -f 'Disabled', $Disabled, $user.Enabled) - return $false - } - - if ($PSBoundParameters.ContainsKey('PasswordNeverExpires') -and $PasswordNeverExpires -ne $user.PasswordNeverExpires) - { - # The PasswordNeverExpires property does not match - Write-Verbose -Message ($script:localizedData.PropertyMismatch -f 'PasswordNeverExpires', $PasswordNeverExpires, $user.PasswordNeverExpires) - return $false - } - - if ($PSBoundParameters.ContainsKey('PasswordChangeNotAllowed') -and $PasswordChangeNotAllowed -ne $user.UserCannotChangePassword) - { - # The PasswordChangeNotAllowed property does not match - Write-Verbose -Message ($script:localizedData.PropertyMismatch -f 'PasswordChangeNotAllowed', $PasswordChangeNotAllowed, $user.UserCannotChangePassword) - return $false - } - } - catch - { - New-ConnectionException -ErrorId 'ConnectionError' -ErrorMessage ($script:localizedData.ConnectionError + $_) - } - - finally - { - if ($null -ne $user) - { - $user.Dispose() - } - - $principalContext.Dispose() - - } - - # All properties match - Write-Verbose -Message ($script:localizedData.AllUserPropertisMatch -f 'User', $UserName) - return $true -} - - -<# - .SYNOPSIS - Retrieves the user with the given username when on Nano Server. - - .PARAMETER UserName - The name of the user to retrieve. -#> -function Get-TargetResourceOnNanoServer -{ - [OutputType([System.Collections.Hashtable])] - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $UserName - ) - - Set-StrictMode -Version Latest - - Assert-UserNameValid -UserName $UserName - - # Try to find a user by a name - try - { - Write-Verbose -Message 'Starting Get-TargetResource on NanoServer' - [Microsoft.PowerShell.Commands.LocalUser] $user = Get-LocalUser -Name $UserName -ErrorAction Stop - } - catch [System.Exception] - { - if ($_.CategoryInfo.ToString().Contains('UserNotFoundException')) - { - # The user is not found - return @{ - UserName = $UserName - Ensure = 'Absent' - } - } - New-InvalidOperationException -ErrorRecord $_ - } - - # The user is found. Return all user properties and Ensure = 'Present'. - $returnValue = @{ - UserName = $user.Name - Ensure = 'Present' - FullName = $user.FullName - Description = $user.Description - Disabled = -not $user.Enabled - PasswordChangeRequired = $null - PasswordChangeNotAllowed = -not $user.UserMayChangePassword - } - - if ($user.PasswordExpires) - { - $returnValue.Add('PasswordNeverExpires', $false) - } - else - { - $returnValue.Add('PasswordNeverExpires', $true) - } - - return $returnValue -} - -<# - .SYNOPSIS - Creates, modifies, or deletes a user when on Nano Server. - - .PARAMETER UserName - The name of the user to create, modify, or delete. - - .PARAMETER Ensure - Specifies whether the user should exist or not. - By default this is set to Present - - .PARAMETER FullName - The (optional) full name or display name of the user. - If not provided this value will remain blank. - - .PARAMETER Description - Optional description for the user. - - .PARAMETER Password - The desired password for the user. - - .PARAMETER Disabled - Specifies whether the user should be disabled or not. - By default this is set to $false - - .PARAMETER PasswordNeverExpires - Specifies whether the password should ever expire or not. - By default this is set to $false - - .PARAMETER PasswordChangeRequired - Specifies whether the user must reset their password or not. - By default this is set to $false - - .PARAMETER PasswordChangeNotAllowed - Specifies whether the user is allowed to change their password or not. - By default this is set to $false - - .NOTES - If Ensure is set to 'Present' then the Password parameter is required. -#> -function Set-TargetResourceOnNanoServer -{ - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $UserName, - - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present', - - [System.String] - $FullName, - - [System.String] - $Description, - - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Password, - - [System.Boolean] - $Disabled, - - [System.Boolean] - $PasswordNeverExpires, - - [System.Boolean] - $PasswordChangeRequired, - - [System.Boolean] - $PasswordChangeNotAllowed - ) - - Set-StrictMode -Version Latest - - Write-Verbose -Message ($script:localizedData.ConfigurationStarted -f $UserName) - - Assert-UserNameValid -UserName $UserName - - # Try to find a user by a name. - $userExists = $false - - try - { - [Microsoft.PowerShell.Commands.LocalUser] $user = Get-LocalUser -Name $UserName -ErrorAction Stop - $userExists = $true - } - catch [System.Exception] - { - if ($_.CategoryInfo.ToString().Contains('UserNotFoundException')) - { - # The user is not found. - Write-Verbose -Message ($script:localizedData.UserDoesNotExist -f $UserName) - } - else - { - New-InvalidOperationException -ErrorRecord $_ - } - } - - if ($Ensure -eq 'Present') - { - # Ensure is set to 'Present' - - if (-not $userExists) - { - # The user with the provided name does not exist so add a new user - New-LocalUser -Name $UserName -NoPassword - Write-Verbose -Message ($script:localizedData.UserCreated -f $UserName) - } - - # Set user properties - if ($PSBoundParameters.ContainsKey('FullName')) - { - if (-not $userExists -or $FullName -ne $user.FullName) - { - if ($FullName -eq $null) - { - Set-LocalUser -Name $UserName -FullName ([String]::Empty) - } - else - { - Set-LocalUser -Name $UserName -FullName $FullName - } - } - } - else - { - if (-not $userExists) - { - # For a newly created user, set the DisplayName property to an empty string since by default DisplayName is set to user's name. - Set-LocalUser -Name $UserName -FullName ([String]::Empty) - } - } - - if ($PSBoundParameters.ContainsKey('Description') -and ((-not $userExists) -or ($Description -ne $user.Description))) - { - if ($null -eq $Description) - { - Set-LocalUser -Name $UserName -Description ([String]::Empty) - } - else - { - Set-LocalUser -Name $UserName -Description $Description - } - } - - # Set the password regardless of the state of the user - if ($PSBoundParameters.ContainsKey('Password')) - { - Set-LocalUser -Name $UserName -Password $Password.Password - } - - if ($PSBoundParameters.ContainsKey('Disabled') -and ((-not $userExists) -or ($Disabled -eq $user.Enabled))) - { - if ($Disabled) - { - Disable-LocalUser -Name $UserName - } - else - { - Enable-LocalUser -Name $UserName - } - } - - $existingUserPasswordNeverExpires = (($userExists) -and ($null -eq $user.PasswordExpires)) - if ($PSBoundParameters.ContainsKey('PasswordNeverExpires') -and ((-not $userExists) -or ($PasswordNeverExpires -ne $existingUserPasswordNeverExpires))) - { - Set-LocalUser -Name $UserName -PasswordNeverExpires:$passwordNeverExpires - } - - if ($PSBoundParameters.ContainsKey('PasswordChangeRequired') -and ($PasswordChangeRequired)) - { - Set-LocalUser -Name $UserName -AccountExpires ([DateTime]::Now) - } - - # NOTE: The parameter name and the property name have opposite meaning. - [System.Boolean] $expected = -not $PasswordChangeNotAllowed - $actual = $expected - - if ($userExists) - { - $actual = $user.UserMayChangePassword - } - - if ($PSBoundParameters.ContainsKey('PasswordChangeNotAllowed') -and ((-not $userExists) -or ($expected -ne $actual))) - { - Set-LocalUser -Name $UserName -UserMayChangePassword $expected - } - } - else - { - # Ensure is set to 'Absent' - if ($userExists) - { - # The user exists - Remove-LocalUser -Name $UserName - - Write-Verbose -Message ($script:localizedData.UserRemoved -f $UserName) - } - else - { - Write-Verbose -Message ($script:localizedData.NoConfigurationRequiredUserDoesNotExist -f $UserName) - } - } - - Write-Verbose -Message ($script:localizedData.ConfigurationCompleted -f $UserName) -} - -<# - .SYNOPSIS - Tests if a user is in the desired state when on Nano Server. - - .PARAMETER UserName - The name of the user to test the state of. - - .PARAMETER Ensure - Specifies whether the user should exist or not. - By default this is set to Present - - .PARAMETER FullName - The full name/display name that the user should have. - If not provided, this value will not be tested. - - .PARAMETER Description - The description that the user should have. - If not provided, this value will not be tested. - - .PARAMETER Password - The password the user should have. - - .PARAMETER Disabled - Specifies whether the user account should be disabled or not. - - .PARAMETER PasswordNeverExpires - Specifies whether the password should ever expire or not. - - .PARAMETER PasswordChangeRequired - Not used in Test-TargetResource as there is no easy way to test this value. - - .PARAMETER PasswordChangeNotAllowed - Specifies whether the user should be allowed to change their password or not. -#> -function Test-TargetResourceOnNanoServer -{ - [OutputType([System.Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $UserName, - - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present', - - [System.String] - $FullName, - - [System.String] - $Description, - - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Password, - - [System.Boolean] - $Disabled, - - [System.Boolean] - $PasswordNeverExpires, - - [System.Boolean] - $PasswordChangeRequired, - - [System.Boolean] - $PasswordChangeNotAllowed - ) - - Set-StrictMode -Version Latest - - Assert-UserNameValid -UserName $UserName - - # Try to find a user by a name - try - { - [Microsoft.PowerShell.Commands.LocalUser] $user = Get-LocalUser -Name $UserName -ErrorAction Stop - } - catch [System.Exception] - { - if ($_.CategoryInfo.ToString().Contains('UserNotFoundException')) - { - # The user is not found - if ($Ensure -eq 'Absent') - { - return $true - } - else - { - return $false - } - } - New-InvalidOperationException -ErrorRecord $_ - } - - # A user with the provided name exists - Write-Verbose -Message ($script:localizedData.UserExists -f $UserName) - - # Validate separate properties - if ($Ensure -eq 'Absent') - { - # The Ensure property does not match - Write-Verbose -Message ($script:localizedData.PropertyMismatch -f 'Ensure', 'Absent', 'Present') - return $false - } - - if ($PSBoundParameters.ContainsKey('FullName') -and $FullName -ne $user.FullName) - { - # The FullName property does not match - Write-Verbose -Message ($script:localizedData.PropertyMismatch -f 'FullName', $FullName, $user.FullName) - return $false - } - - if ($PSBoundParameters.ContainsKey('Description') -and $Description -ne $user.Description) - { - # The Description property does not match - Write-Verbose -Message ($script:localizedData.PropertyMismatch -f 'Description', $Description, $user.Description) - return $false - } - - if ($PSBoundParameters.ContainsKey('Password')) - { - if(-not (Test-CredentialsValidOnNanoServer -UserName $UserName -Password $Password.Password)) - { - # The Password property does not match - Write-Verbose -Message ($script:localizedData.PasswordPropertyMismatch -f 'Password') - return $false - } - } - - if ($PSBoundParameters.ContainsKey('Disabled') -and ($Disabled -eq $user.Enabled)) - { - # The Disabled property does not match - Write-Verbose -Message ($script:localizedData.PropertyMismatch -f 'Disabled', $Disabled, $user.Enabled) - return $false - } - - $existingUserPasswordNeverExpires = ($null -eq $user.PasswordExpires) - if ($PSBoundParameters.ContainsKey('PasswordNeverExpires') -and $PasswordNeverExpires -ne $existingUserPasswordNeverExpires) - { - # The PasswordNeverExpires property does not match - Write-Verbose -Message ($script:localizedData.PropertyMismatch -f 'PasswordNeverExpires', $PasswordNeverExpires, $existingUserPasswordNeverExpires) - return $false - } - - if ($PSBoundParameters.ContainsKey('PasswordChangeNotAllowed') -and $PasswordChangeNotAllowed -ne (-not $user.UserMayChangePassword)) - { - # The PasswordChangeNotAllowed property does not match - Write-Verbose -Message ($script:localizedData.PropertyMismatch -f 'PasswordChangeNotAllowed', $PasswordChangeNotAllowed, (-not $user.UserMayChangePassword)) - return $false - } - - # All properties match. Return $true. - Write-Verbose -Message ($script:localizedData.AllUserPropertisMatch -f 'User', $UserName) - return $true -} - -<# - .SYNOPSIS - Checks that the username does not contain invalid characters. - - .PARAMETER UserName - The username to validate. -#> -function Assert-UserNameValid -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $UserName - ) - - # Check if the name consists of only periods and/or white spaces - $wrongName = $true - - for ($i = 0; $i -lt $UserName.Length; $i++) - { - if (-not [Char]::IsWhiteSpace($UserName, $i) -and $UserName[$i] -ne '.') - { - $wrongName = $false - break - } - } - - $invalidChars = @('\','/','"','[',']',':','|','<','>','+','=',';',',','?','*','@') - - if ($wrongName) - { - New-InvalidArgumentException ` - -Message ($script:localizedData.InvalidUserName -f $UserName, [String]::Join(' ', $invalidChars)) ` - -ArgumentName 'UserName' - } - - if ($UserName.IndexOfAny($invalidChars) -ne -1) - { - New-InvalidArgumentException ` - -Message ($script:localizedData.InvalidUserName -f $UserName, [String]::Join(' ', $invalidChars)) ` - -ArgumentName 'UserName' - } -} - -<# - .SYNOPSIS - Creates a new Connection error record and throws it. - - .PARAMETER ErrorId - The ID for the error record to be thrown. - - .PARAMETER ErrorMessage - Message to be included in the error record to be thrown. -#> -function New-ConnectionException -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $ErrorId, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $ErrorMessage - ) - - $errorCategory = [System.Management.Automation.ErrorCategory]::ConnectionError - $exception = New-Object ` - -TypeName System.ArgumentException ` - -ArgumentList $ErrorMessage - $errorRecord = New-Object ` - -TypeName System.Management.Automation.ErrorRecord ` - -ArgumentList @($exception, $ErrorId, $errorCategory, $null) - throw $errorRecord -} - -<# - .SYNOPSIS - Tests the local user's credentials on the local machine. - - .PARAMETER UserName - The username to validate the credentials of. - - .PARAMETER Password - The password of the given user. -#> -function Test-CredentialsValidOnNanoServer -{ - [OutputType([System.Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $UserName, - - [ValidateNotNullOrEmpty()] - [SecureString] - $Password - ) - - $source = @' - [Flags] - private enum LogonType - { - Logon32LogonInteractive = 2, - Logon32LogonNetwork, - Logon32LogonBatch, - Logon32LogonService, - Logon32LogonUnlock, - Logon32LogonNetworkCleartext, - Logon32LogonNewCredentials - } - - [Flags] - private enum LogonProvider - { - Logon32ProviderDefault = 0, - Logon32ProviderWinnt35, - Logon32ProviderWinnt40, - Logon32ProviderWinnt50 - } - - [DllImport("api-ms-win-security-logon-l1-1-1.dll", CharSet = CharSet.Unicode, SetLastError = true)] - private static extern Boolean LogonUser( - String lpszUserName, - String lpszDomain, - IntPtr lpszPassword, - LogonType dwLogonType, - LogonProvider dwLogonProvider, - out IntPtr phToken - ); - - - [DllImport("api-ms-win-core-handle-l1-1-0.dll", - EntryPoint = "CloseHandle", SetLastError = true, - CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall)] - internal static extern bool CloseHandle(IntPtr handle); - - public static bool ValidateCredentials(string username, SecureString password) - { - IntPtr tokenHandle = IntPtr.Zero; - IntPtr unmanagedPassword = IntPtr.Zero; - - unmanagedPassword = SecureStringMarshal.SecureStringToCoTaskMemUnicode(password); - - try - { - return LogonUser( - username, - null, - unmanagedPassword, - LogonType.Logon32LogonInteractive, - LogonProvider.Logon32ProviderDefault, - out tokenHandle); - } - catch - { - return false; - } - finally - { - if (tokenHandle != IntPtr.Zero) - { - CloseHandle(tokenHandle); - } - if (unmanagedPassword != IntPtr.Zero) { - Marshal.ZeroFreeCoTaskMemUnicode(unmanagedPassword); - } - unmanagedPassword = IntPtr.Zero; - } - } -'@ - - Add-Type -PassThru -Namespace Microsoft.Windows.DesiredStateConfiguration.NanoServer.UserResource ` - -Name CredentialsValidationTool -MemberDefinition $source -Using System.Security -ReferencedAssemblies System.Security.SecureString.dll | Out-Null - return [Microsoft.Windows.DesiredStateConfiguration.NanoServer.UserResource.CredentialsValidationTool]::ValidateCredentials($UserName, $Password) -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xUserResource/MSFT_xUserResource.schema.mof b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xUserResource/MSFT_xUserResource.schema.mof deleted file mode 100644 index 8e6c4fdf..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xUserResource/MSFT_xUserResource.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("xUser")] -class MSFT_xUserResource : OMI_BaseResource -{ - [Key,Description("The name of the User to Create/Modify/Delete")] String UserName; - [Write,Description("An enumerated value that describes if the user is expected to exist on the machine"),ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] String Ensure; - [Write,Description("The display name of the user")] String FullName; - [Write,Description("A description for the user")] String Description; - [Write,Description("The password for the user"),EmbeddedInstance("MSFT_Credential")] String Password; - [Write,Description("Value used to disable/enable a user account")] Boolean Disabled; - [Write,Description("Value used to set whether a user's password expires or not")] Boolean PasswordNeverExpires; - [Write,Description("Value used to require a user to change their password")] Boolean PasswordChangeRequired; - [Write,Description("Value used to set whether a user can/cannot change their password")] Boolean PasswordChangeNotAllowed; -}; diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xUserResource/en-US/MSFT_xUserResource.schema.mfl b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xUserResource/en-US/MSFT_xUserResource.schema.mfl deleted file mode 100644 index 92809e05005678b0cda60bd15d840e353532144a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2418 zcmc&#O;6iE6r6LV{)bgAr4k}N^wRbeQjkzdK!w5qA(S|#jb!Z94p3C_*MXV0b~ZR9 zf}|?4{IR=l-^aY!@%`Niz9L3}2swrrVa#WS6l-YU5WhGo;J7B6443?h`0dL1OU}j^ za6IO!!v%WW+rv+@NjMjAlyJpc=KSh$E;3&!cNN%Rr1zZv%)3PoF+B{->pI6BY@y2> z{reE>wA#fU+FaY^n)2-60B87!5BOxhPVp9R7$ae56wwzDT{Q2>-f+`Un5!$@Tv0J@Yy#B~&N;|JUOq`&m3zskl8A oMSszd)$4TJ@ieOHX8HC#)$IR9qibwxnPO*TskFoM;I@1}0CgvzUjP6A diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xUserResource/en-US/MSFT_xUserResource.strings.psd1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xUserResource/en-US/MSFT_xUserResource.strings.psd1 deleted file mode 100644 index aff537e0..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xUserResource/en-US/MSFT_xUserResource.strings.psd1 +++ /dev/null @@ -1,23 +0,0 @@ -# Localized resources for xUser - -ConvertFrom-StringData @' - UserWithName = User: {0} - RemoveOperation = Remove - AddOperation = Add - SetOperation = Set - ConfigurationStarted = Configuration of user {0} started. - ConfigurationCompleted = Configuration of user {0} completed successfully. - UserCreated = User {0} created successfully. - UserUpdated = User {0} properties updated successfully. - UserRemoved = User {0} removed successfully. - NoConfigurationRequired = User {0} exists on this node with the desired properties. No action required. - NoConfigurationRequiredUserDoesNotExist = User {0} does not exist on this node. No action required. - InvalidUserName = The name {0} cannot be used. Names may not consist entirely of periods and/or spaces, or contain these characters: {1} - UserExists = A user with the name {0} exists. - UserDoesNotExist = A user with the name {0} does not exist. - PropertyMismatch = The value of the {0} property is expected to be {1} but it is {2}. - PasswordPropertyMismatch = The value of the {0} property does not match. - AllUserPropertisMatch = All {0} {1} properties match. - ConnectionError = There could be a possible connection error while trying to use the System.DirectoryServices API's. - MultipleMatches = There could be a possible multiple matches exception while trying to use the System.DirectoryServices API's. -'@ diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsFeature/MSFT_xWindowsFeature.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsFeature/MSFT_xWindowsFeature.psm1 deleted file mode 100644 index 41074694..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsFeature/MSFT_xWindowsFeature.psm1 +++ /dev/null @@ -1,554 +0,0 @@ -# Global needed to indicate if a restart is required -[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidGlobalVars', '')] -param () - -Import-Module -Name (Join-Path -Path (Split-Path $PSScriptRoot -Parent) ` - -ChildPath 'CommonResourceHelper.psm1') - -# Localized messages for verbose and error messages in this resource -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xWindowsFeature' - -<# - .SYNOPSIS - Retrieves the status of the role or feature with the given name on the target machine. - - .PARAMETER Name - The name of the role or feature to retrieve - - .PARAMETER Credential - The credential (if required) to retrieve the role or feature. - Optional. - - .NOTES - If the specified role or feature does not contain any subfeatures then - IncludeAllSubFeature will be set to $false. If the specified feature contains one - or more subfeatures then IncludeAllSubFeature will be set to $true only if all the - subfeatures are installed. Otherwise, IncludeAllSubFeature will be set to $false. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - Write-Verbose -Message ($script:localizedData.GetTargetResourceStartMessage -f $Name) - - Import-ServerManager - - Write-Verbose -Message ($script:localizedData.QueryFeature -f $Name) - - $isWinServer2008R2SP1 = Test-IsWinServer2008R2SP1 - if ($isWinServer2008R2SP1 -and $PSBoundParameters.ContainsKey('Credential')) - { - $feature = Invoke-Command -ScriptBlock { Get-WindowsFeature -Name $Name } ` - -ComputerName . ` - -Credential $Credential ` - } - else - { - $feature = Get-WindowsFeature @PSBoundParameters - } - - Assert-SingleFeatureExists -Feature $feature -Name $Name - - $includeAllSubFeature = $true - - if ($feature.SubFeatures.Count -eq 0) - { - $includeAllSubFeature = $false - } - else - { - foreach ($currentSubFeatureName in $feature.SubFeatures) - { - - $getWindowsFeatureParameters = @{ - Name = $currentSubFeatureName - } - - if ($PSBoundParameters.ContainsKey('Credential')) - { - $getWindowsFeatureParameters['Credential'] = $Credential - } - - if ($isWinServer2008R2SP1 -and $PSBoundParameters.ContainsKey('Credential')) - { - <# - Calling Get-WindowsFeature through Invoke-Command to start a new process with - the given credential since Get-WindowsFeature doesn't support the Credential - attribute on this server. - #> - $subFeature = Invoke-Command -ScriptBlock { Get-WindowsFeature -Name $currentSubFeatureName } ` - -ComputerName . ` - -Credential $Credential ` - } - else - { - $subFeature = Get-WindowsFeature @getWindowsFeatureParameters - } - - Assert-SingleFeatureExists -Feature $subFeature -Name $currentSubFeatureName - - if (-not $subFeature.Installed) - { - $includeAllSubFeature = $false - break - } - } - } - - if ($feature.Installed) - { - $ensureResult = 'Present' - } - else - { - $ensureResult = 'Absent' - } - - Write-Verbose -Message ($script:localizedData.GetTargetResourceEndMessage -f $Name) - - # Add all feature properties to the hash table - return @{ - Name = $Name - DisplayName = $feature.DisplayName - Ensure = $ensureResult - IncludeAllSubFeature = $includeAllSubFeature - } -} - -<# - .SYNOPSIS - Installs or uninstalls the role or feature with the given name on the target machine - with the option of installing or uninstalling all subfeatures as well. - - .PARAMETER Name - The name of the role or feature to install or uninstall. - - .PARAMETER Ensure - Specifies whether the role or feature should be installed ('Present') - or uninstalled ('Absent'). - By default this is set to Present. - - .PARAMETER IncludeAllSubFeature - Specifies whether or not all subfeatures should be installed or uninstalled with - the specified role or feature. Default is false. - If this property is true and Ensure is set to Present, all subfeatures will be installed. - If this property is false and Ensure is set to Present, subfeatures will not be installed or uninstalled. - If Ensure is set to Absent, all subfeatures will be uninstalled. - - .PARAMETER Credential - The credential (if required) to install or uninstall the role or feature. - Optional. - - .PARAMETER LogPath - The custom path to the log file to log this operation. - If not passed in, the default log path will be used (%windir%\logs\ServerManager.log). -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [Boolean] - $IncludeAllSubFeature = $false, - - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [ValidateNotNullOrEmpty()] - [String] - $LogPath - ) - - Write-Verbose -Message ($script:localizedData.SetTargetResourceStartMessage -f $Name) - - Import-ServerManager - - $isWinServer2008R2SP1 = Test-IsWinServer2008R2SP1 - - if ($Ensure -eq 'Present') - { - $addWindowsFeatureParameters = @{ - Name = $Name - IncludeAllSubFeature = $IncludeAllSubFeature - } - - if ($PSBoundParameters.ContainsKey('LogPath')) - { - $addWindowsFeatureParameters['LogPath'] = $LogPath - } - - Write-Verbose -Message ($script:localizedData.InstallFeature -f $Name) - - if ($isWinServer2008R2SP1 -and $PSBoundParameters.ContainsKey('Credential')) - { - <# - Calling Add-WindowsFeature through Invoke-Command to start a new process with - the given credential since Add-WindowsFeature doesn't support the Credential - attribute on this server. - #> - $feature = Invoke-Command -ScriptBlock { Add-WindowsFeature @addWindowsFeatureParameters } ` - -ComputerName . ` - -Credential $Credential - } - else - { - if ($PSBoundParameters.ContainsKey('Credential')) - { - $addWindowsFeatureParameters['Credential'] = $Credential - } - - $feature = Add-WindowsFeature @addWindowsFeatureParameters - } - - if ($null -ne $feature -and $feature.Success) - { - Write-Verbose -Message ($script:localizedData.InstallSuccess -f $Name) - - # Check if reboot is required, if so notify the Local Configuration Manager. - if ($feature.RestartNeeded -eq 'Yes') - { - Write-Verbose -Message $script:localizedData.RestartNeeded - $global:DSCMachineStatus = 1 - } - } - else - { - New-InvalidOperationException -Message ($script:localizedData.FeatureInstallationFailureError -f $Name) - } - } - # Ensure = 'Absent' - else - { - $removeWindowsFeatureParameters = @{ - Name = $Name - } - - if ($PSBoundParameters.ContainsKey('LogPath')) - { - $removeWindowsFeatureParameters['LogPath'] = $LogPath - } - - Write-Verbose -Message ($script:localizedData.UninstallFeature -f $Name) - - if ($isWinServer2008R2SP1 -and $PSBoundParameters.ContainsKey('Credential')) - { - <# - Calling Remove-WindowsFeature through Invoke-Command to start a new process with - the given credential since Remove-WindowsFeature doesn't support the Credential - attribute on this server. - #> - $feature = Invoke-Command -ScriptBlock { Remove-WindowsFeature @removeWindowsFeatureParameters } ` - -ComputerName . ` - -Credential $Credential - } - else - { - if ($PSBoundParameters.ContainsKey('Credential')) - { - $addWindowsFeatureParameters['Credential'] = $Credential - } - - $feature = Remove-WindowsFeature @removeWindowsFeatureParameters - } - - if ($null -ne $feature -and $feature.Success) - { - Write-Verbose ($script:localizedData.UninstallSuccess -f $Name) - - # Check if reboot is required, if so notify the Local Configuration Manager. - if ($feature.RestartNeeded -eq 'Yes') - { - Write-Verbose -Message $script:localizedData.RestartNeeded - $global:DSCMachineStatus = 1 - } - } - else - { - New-InvalidOperationException -Message ($script:localizedData.FeatureUninstallationFailureError -f $Name) - } - } - - Write-Verbose -Message ($script:localizedData.SetTargetResourceEndMessage -f $Name) -} - -<# - .SYNOPSIS - Tests if the role or feature with the given name is in the desired state. - - .PARAMETER Name - The name of the role or feature to test the state of. - - .PARAMETER Ensure - Specifies whether the role or feature should be installed ('Present') - or uninstalled ('Absent'). - By default this is set to Present. - - .PARAMETER IncludeAllSubFeature - Specifies whether the subfeatures of the indicated role or feature should also be checked - to ensure they are in the desired state. If Ensure is set to 'Present' and this is set to - $true then each subfeature is checked to ensure it is installed as well. If Ensure is set to - Absent and this is set to $true, then each subfeature is checked to ensure it is uninstalled. - As of now, this test can't be used to check if a feature is Installed but all of its - subfeatures are uninstalled. - By default this is set to $false. - - .PARAMETER Credential - The Credential (if required) to test the status of the role or feature. - Optional. - - .PARAMETER LogPath - The path to the log file to log this operation. - Not used in Test-TargetResource. - -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [Boolean] - $IncludeAllSubFeature = $false, - - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [ValidateNotNullOrEmpty()] - [String] - $LogPath - - ) - - Write-Verbose -Message ($script:localizedData.TestTargetResourceStartMessage -f $Name) - - Import-ServerManager - - $testTargetResourceResult = $false - - $getWindowsFeatureParameters = @{ - Name = $Name - } - - if ($PSBoundParameters.ContainsKey('Credential')) - { - $getWindowsFeatureParameters['Credential'] = $Credential - } - - Write-Verbose -Message ($script:localizedData.QueryFeature -f $Name) - - $isWinServer2008R2SP1 = Test-IsWinServer2008R2SP1 - if ($isWinServer2008R2SP1 -and $PSBoundParameters.ContainsKey('Credential')) - { - <# - Calling Get-WindowsFeature through Invoke-Command to start a new process with - the given credential since Get-WindowsFeature doesn't support the Credential - attribute on this server. - #> - $feature = Invoke-Command -ScriptBlock { Get-WindowsFeature -Name $Name } ` - -ComputerName . ` - -Credential $Credential - } - else - { - $feature = Get-WindowsFeature @getWindowsFeatureParameters - } - - Assert-SingleFeatureExists -Feature $feature -Name $Name - - # Check if the feature is in the requested Ensure state. - if (($Ensure -eq 'Present' -and $feature.Installed -eq $true) -or ` - ($Ensure -eq 'Absent' -and $feature.Installed -eq $false)) - { - $testTargetResourceResult = $true - - if ($IncludeAllSubFeature) - { - # Check if each subfeature is in the requested state. - foreach ($currentSubFeatureName in $feature.SubFeatures) - { - $getWindowsFeatureParameters['Name'] = $currentSubFeatureName - - if ($isWinServer2008R2SP1 -and $PSBoundParameters.ContainsKey('Credential')) - { - <# - Calling Get-WindowsFeature through Invoke-Command to start a new process with - the given credential since Get-WindowsFeature doesn't support the Credential - attribute on this server. - #> - $subFeature = Invoke-Command -ScriptBlock { Get-WindowsFeature -Name $currentSubFeatureName } ` - -ComputerName . ` - -Credential $Credential - } - else - { - $subFeature = Get-WindowsFeature @getWindowsFeatureParameters - } - - Assert-SingleFeatureExists -Feature $subFeature -Name $currentSubFeatureName - - if (-not $subFeature.Installed -and $Ensure -eq 'Present') - { - $testTargetResourceResult = $false - break - } - - if ($subFeature.Installed -and $Ensure -eq 'Absent') - { - $testTargetResourceResult = $false - break - } - } - } - } - else - { - # Ensure is not in the correct state - $testTargetResourceResult = $false - } - - Write-Verbose -Message ($script:localizedData.TestTargetResourceEndMessage -f $Name) - - return $testTargetResourceResult -} - - -<# - .SYNOPSIS - Asserts that a single instance of the given role or feature exists. - - .PARAMETER Feature - The role or feature object to check. - - .PARAMETER Name - The name of the role or feature to include in any error messages that are thrown. - (Not used to assert validity of the feature). -#> -function Assert-SingleFeatureExists -{ - [CmdletBinding()] - param - ( - [PSObject] - $Feature, - - [String] - $Name - ) - - if ($null -eq $Feature) - { - New-InvalidOperationException -Message ($script:localizedData.FeatureNotFoundError -f $Name) - } - - if ($Feature.Count -gt 1) - { - New-InvalidOperationException -Message ($script:localizedData.MultipleFeatureInstancesError -f $Name) - } -} - -<# - .SYNOPSIS - Sets up the ServerManager module on the target node. - Throws an error if not on a machine running Windows Server. -#> -function Import-ServerManager -{ - param - () - - <# - Enable ServerManager-PSH-Cmdlets feature if OS is WS2008R2 Core. - Datacenter = 12, Standard = 13, Enterprise = 14 - #> - $serverCoreOSCodes = @( 12, 13, 14 ) - - $operatingSystem = Get-CimInstance -Class 'Win32_OperatingSystem' - - # Check if this operating system needs an update to the ServerManager cmdlets - if ($operatingSystem.Version.StartsWith('6.1.') -and ` - $serverCoreOSCodes -contains $operatingSystem.OperatingSystemSKU) - { - Write-Verbose -Message $script:localizedData.EnableServerManagerPSHCmdletsFeature - - <# - ServerManager-PSH-Cmdlets has a depndency on Powershell 2 update: MicrosoftWindowsPowerShell, - so enabling the MicrosoftWindowsPowerShell update. - #> - $null = Dism\online\enable-feature\FeatureName:MicrosoftWindowsPowerShell - $null = Dism\online\enable-feature\FeatureName:ServerManager-PSH-Cmdlets - } - - try - { - Import-Module -Name 'ServerManager' -ErrorAction Stop - } - catch [System.Management.Automation.RuntimeException] { - if ($_.Exception.Message -like "*Some or all identity references could not be translated*") - { - Write-Verbose $_.Exception.Message - } - else - { - Write-Verbose -Message $script:localizedData.ServerManagerModuleNotFoundMessage - New-InvalidOperationException -Message $script:localizedData.SkuNotSupported - } - } - catch - { - Write-Verbose -Message $script:localizedData.ServerManagerModuleNotFoundMessage - New-InvalidOperationException -Message $script:localizedData.SkuNotSupported - } -} - -<# - .SYNOPSIS - Tests if the machine is a Windows Server 2008 R2 SP1 machine. - - .NOTES - Since Assert-PrequisitesValid ensures that ServerManager is available on the machine, - this function only checks the OS version. -#> -function Test-IsWinServer2008R2SP1 -{ - param - () - - return ([Environment]::OSVersion.Version.ToString().Contains('6.1.')) -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsFeature/MSFT_xWindowsFeature.schema.mof b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsFeature/MSFT_xWindowsFeature.schema.mof deleted file mode 100644 index 579850ed..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsFeature/MSFT_xWindowsFeature.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xWindowsFeature")] -class MSFT_xWindowsFeature : OMI_BaseResource -{ - [Key, Description("The name of the role or feature to install or uninstall.")] String Name; - [Write, Description("Specifies whether the role or feature should be installed or uninstalled. To install the feature, set this property to Present. To uninstall the feature, set the property to Absent."), ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}] String Ensure; - [Write, Description("Specifies whether the subfeatures of the main feature should also be installed.")] Boolean IncludeAllSubFeature; - [Write, Description("The path to the log file to log this operation.")] String LogPath; - [Write, Description("A credential, if needed, to install or uninstall the role or feature."), EmbeddedInstance("MSFT_Credential")] String Credential; - [Read, Description("The display name of the retrieved role or feature.")] String DisplayName; -}; diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsFeature/en-US/MSFT_xWindowsFeature.schema.mfl b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsFeature/en-US/MSFT_xWindowsFeature.schema.mfl deleted file mode 100644 index 950c2f25877366cd1d5ae7da9b129c2ff3a22aa1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2160 zcmchYL2uJQ5QXQA#DB0jfmBr-xBw@&NhL%|D-x-Ps;ZLOEs=~95{FVD{yOlzSucr` zI0`*fQ4)K1cIM5@o40>{Us}gc(2&iYRO7vLo4_ku(DvKxtg$B`k8O+=6HO-ZpQh-qa-}dSh?kGh%d!dbgh^C zR-h7sj`i)B|F7JwF5 zD(Of4foXn~Cn0&@Oi3j)2fRLM*vTv4i&WXc?^JL_8YH~9$ zDDZDHZ|xouZ-AF|t}jtEd8_O+BUOzv%+r+YC!X1i9q~WR&w0&takW~BwTWflc;Z4^ zwA4n9EyQY@md&1aK{v1G@+tbNSfj0au*z}ifV#P^9IF3n-=$5Oxdfl8&L#tP^ZSUi zL93)=3G-aKA}m~WQoI+;fDkto;IWk&)Ot51KQTRWC9=K%jV4X=Aq9>5ab0$Sb&+xM z6I6b8rp-z2d7Sea#bdKc!Kb@MvlLi9#$&iEG~?2+yxx^k$84HiYS*UaT -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [String] - $Name - ) - - Write-Verbose -Message ($LocalizedData.GetTargetResourceStartMessage -f $Name) - - Assert-ResourcePrerequisitesValid - - $windowsOptionalFeature = Dism\Get-WindowsOptionalFeature -FeatureName $Name -Online - - <# - $windowsOptionalFeatureProperties and this section of code are needed because an error will be thrown if a property - is not found in WMF 4 instead of returning null. - #> - $windowsOptionalFeatureProperties = @{} - $propertiesNeeded = @( 'LogPath', 'State', 'CustomProperties', 'FeatureName', 'LogLevel', 'Description', 'DisplayName' ) - - foreach ($property in $propertiesNeeded) - { - try - { - $windowsOptionalFeatureProperties[$property] = $windowsOptionalFeature.$property - } - catch - { - $windowsOptionalFeatureProperties[$property] = $null - } - } - - $windowsOptionalFeatureResource = @{ - LogPath = $windowsOptionalFeatureProperties.LogPath - Ensure = Convert-FeatureStateToEnsure -State $windowsOptionalFeatureProperties.State - CustomProperties = - Convert-CustomPropertyArrayToStringArray -CustomProperties $windowsOptionalFeatureProperties.CustomProperties - Name = $windowsOptionalFeatureProperties.FeatureName - LogLevel = $windowsOptionalFeatureProperties.LogLevel - Description = $windowsOptionalFeatureProperties.Description - DisplayName = $windowsOptionalFeatureProperties.DisplayName - } - - Write-Verbose -Message ($script:localizedData.GetTargetResourceEndMessage -f $Name) - - return $windowsOptionalFeatureResource -} - -<# - .SYNOPSIS - Enables or disables a Windows optional feature - - .PARAMETER Name - The name of the feature to enable or disable. - - .PARAMETER Ensure - Specifies whether the feature should be enabled or disabled. - To enable the feature, set this property to Present. - To disable the feature, set the property to Absent. - - .PARAMETER RemoveFilesOnDisable - Specifies that all files associated with the feature should be removed if the feature is - being disabled. - - .PARAMETER NoWindowsUpdateCheck - Specifies whether or not DISM contacts Windows Update (WU) when searching for the source - files to enable the feature. - If $true, DISM will not contact WU. - - .PARAMETER LogPath - The path to the log file to log this operation. - There is no default value, but if not set, the log will appear at - %WINDIR%\Logs\Dism\dism.log. - - .PARAMETER LogLevel - The maximum output level to show in the log. - Accepted values are: "ErrorsOnly" (only errors are logged), "ErrorsAndWarning" (errors and - warnings are logged), and "ErrorsAndWarningAndInformation" (errors, warnings, and debug - information are logged). -#> -function Set-TargetResource -{ - [CmdletBinding(SupportsShouldProcess = $true)] - param - ( - [Parameter(Mandatory = $true)] - [String] - $Name, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [Boolean] - $RemoveFilesOnDisable, - - [Boolean] - $NoWindowsUpdateCheck, - - [String] - $LogPath, - - [ValidateSet('ErrorsOnly', 'ErrorsAndWarning', 'ErrorsAndWarningAndInformation')] - [String] - $LogLevel = 'ErrorsAndWarningAndInformation' - ) - - Write-Verbose -Message ($script:localizedData.SetTargetResourceStartMessage -f $Name) - - Assert-ResourcePrerequisitesValid - - $dismLogLevel = switch ($LogLevel) - { - 'ErrorsOnly' { 'Errors'; break } - 'ErrorsAndWarning' { 'Warnings'; break } - 'ErrorsAndWarningAndInformation' { 'WarningsInfo'; break } - } - - # Construct splatting hashtable for DISM cmdlets - $dismCmdletParameters = @{ - FeatureName = $Name - Online = $true - LogLevel = $dismLogLevel - NoRestart = $true - } - - if ($PSBoundParameters.ContainsKey('LogPath')) - { - $dismCmdletParameters['LogPath'] = $LogPath - } - - if ($Ensure -eq 'Present') - { - if ($PSCmdlet.ShouldProcess($Name, $script:localizedData.ShouldProcessEnableFeature)) - { - if ($NoWindowsUpdateCheck) - { - $dismCmdletParameters['LimitAccess'] = $true - } - - $windowsOptionalFeature = Dism\Enable-WindowsOptionalFeature @dismCmdletParameters - } - - Write-Verbose -Message ($script:localizedData.FeatureInstalled -f $Name) - } - else - { - if ($PSCmdlet.ShouldProcess($Name, $script:localizedData.ShouldProcessDisableFeature)) - { - if ($RemoveFilesOnDisable) - { - $dismCmdletParameters['Remove'] = $true - } - - $windowsOptionalFeature = Dism\Disable-WindowsOptionalFeature @dismCmdletParameters - } - - Write-Verbose -Message ($script:localizedData.FeatureUninstalled -f $Name) - } - - <# - $restartNeeded and this section of code are needed because an error will be thrown if the - RestartNeeded property is not found in WMF 4. - #> - try - { - $restartNeeded = $windowsOptionalFeature.RestartNeeded - } - catch - { - $restartNeeded = $false - } - - # Indicate we need a restart if needed - if ($restartNeeded) - { - Write-Verbose -Message $script:localizedData.RestartNeeded - $global:DSCMachineStatus = 1 - } - - Write-Verbose -Message ($script:localizedData.SetTargetResourceEndMessage -f $Name) -} - -<# - .SYNOPSIS - Tests if a Windows optional feature is in the specified state. - - .PARAMETER Name - The name of the feature to test the state of. - - .PARAMETER Ensure - Specifies whether the feature should be enabled or disabled. - To test if the feature is enabled, set this property to Present. - To test if the feature is disabled, set this property to Absent. - - .PARAMETER RemoveFilesOnDisable - Not used in Test-TargetResource. - - .PARAMETER NoWindowsUpdateCheck - Not used in Test-TargetResource. - - .PARAMETER LogPath - Not used in Test-TargetResource. - - .PARAMETER LogLevel - Not used in Test-TargetResource. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [String] - $Name, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [Boolean] - $RemoveFilesOnDisable, - - [Boolean] - $NoWindowsUpdateCheck, - - [String] - $LogPath, - - [ValidateSet('ErrorsOnly', 'ErrorsAndWarning', 'ErrorsAndWarningAndInformation')] - [String] - $LogLevel = 'ErrorsAndWarningAndInformation' - ) - - Write-Verbose -Message ($script:localizedData.TestTargetResourceStartMessage -f $Name) - - Assert-ResourcePrerequisitesValid - - $windowsOptionalFeature = Dism\Get-WindowsOptionalFeature -FeatureName $Name -Online - - $featureIsInDesiredState = $false - - if ($null -eq $windowsOptionalFeature -or $windowsOptionalFeature.State -eq 'Disabled') - { - $featureIsInDesiredState = $Ensure -eq 'Absent' - } - elseif ($windowsOptionalFeature.State -eq 'Enabled') - { - $featureIsInDesiredState = $Ensure -eq 'Present' - } - - Write-Verbose -Message ($script:localizedData.TestTargetResourceEndMessage -f $Name) - - return $featureIsInDesiredState -} - -<# - .SYNOPSIS - Converts a list of CustomProperty objects into an array of Strings. - - .PARAMETER CustomProperties - The list of CustomProperty objects to be converted. - Each CustomProperty object should have Name, Value, and Path properties. -#> -function Convert-CustomPropertyArrayToStringArray -{ - [CmdletBinding()] - [OutputType([String[]])] - param - ( - [PSCustomObject[]] - $CustomProperties - ) - - $propertiesAsStrings = [String[]] @() - - foreach ($customProperty in $CustomProperties) - { - if ($null -ne $customProperty) - { - $propertiesAsStrings += "Name = $($customProperty.Name), Value = $($customProperty.Value), Path = $($customProperty.Path)" - } - } - - return $propertiesAsStrings -} - -<# - .SYNOPSIS - Converts the string state returned by the DISM Get-WindowsOptionalFeature cmdlet to Present or Absent. - - .PARAMETER State - The state to be converted to either Present or Absent. - Should be either Enabled or Disabled. -#> -function Convert-FeatureStateToEnsure -{ - [CmdletBinding()] - [OutputType([String])] - param - ( - [Parameter(Mandatory = $true)] - [String] - $State - ) - - if ($State -eq 'Disabled') - { - return 'Absent' - } - elseif ($State -eq 'Enabled') - { - return 'Present' - } - else - { - Write-Warning ($script:localizedData.CouldNotConvertFeatureState -f $State) - return $State - } -} - -<# - .SYNOPSIS - Throws errors if the prerequisites for using WindowsOptionalFeature are not met on the - target machine. - - Current prerequisites are: - - Must be running either a Windows client, at least Windows Server 2012, or Nano Server - - Must be running as an administrator - - The DISM PowerShell module must be available for import -#> -function Assert-ResourcePrerequisitesValid -{ - [CmdletBinding()] - param () - - Write-Verbose -Message $script:localizedData.ValidatingPrerequisites - - # Check that we're running on Server 2012 (or later) or on a client SKU - $operatingSystem = Get-CimInstance -ClassName 'Win32_OperatingSystem' - - if (($operatingSystem.ProductType -eq 2) -and ([System.Int32] $operatingSystem.BuildNumber -lt 9600)) - { - New-InvalidOperationException -Message $script:localizedData.NotSupportedSku - } - - # Check that we are running as an administrator - $windowsIdentity = [System.Security.Principal.WindowsIdentity]::GetCurrent() - $windowsPrincipal = New-Object -TypeName 'System.Security.Principal.WindowsPrincipal' -ArgumentList @( $windowsIdentity ) - - $adminRole = [System.Security.Principal.WindowsBuiltInRole]::Administrator - if (-not $windowsPrincipal.IsInRole($adminRole)) - { - New-InvalidOperationException -Message $script:localizedData.ElevationRequired - } - - # Check that Dism PowerShell module is available - Import-Module -Name 'Dism' -ErrorVariable 'errorsFromDismImport' -ErrorAction 'SilentlyContinue' -Force - - if ($errorsFromDismImport.Count -gt 0) - { - New-InvalidOperationException -Message $script:localizedData.DismNotAvailable - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsOptionalFeature/MSFT_xWindowsOptionalFeature.schema.mof b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsOptionalFeature/MSFT_xWindowsOptionalFeature.schema.mof deleted file mode 100644 index 05f30ecb..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsOptionalFeature/MSFT_xWindowsOptionalFeature.schema.mof +++ /dev/null @@ -1,14 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xWindowsOptionalFeature")] -class MSFT_xWindowsOptionalFeature : OMI_BaseResource -{ - [Key, Description("The name of the feature to enable or disable.")] String Name; - [Write, Description("Specifies whether the feature should be enabled or disabled. To enable the feature, set this property to Present. To disable the feature, set the property to Absent."), ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}] String Ensure; - [Write, Description("Specifies that all files associated with the feature should be removed if the feature is being disabled.")] Boolean RemoveFilesOnDisable; - [Write, Description("Specifies whether or not DISM contacts Windows Update (WU) when searching for the source files to enable the feature. If $true, DISM will not contact WU.")] Boolean NoWindowsUpdateCheck; - [Write, Description("The maximum output level to show in the log. Accepted values are: ErrorsOnly (only errors are logged), ErrorsAndWarning (errors and warnings are logged), and ErrorsAndWarningAndInformation (errors, warnings, and debug information are logged)."), ValueMap{"ErrorsOnly", "ErrorsAndWarning", "ErrorsAndWarningAndInformation"}, Values{"ErrorsOnly", "ErrorsAndWarning", "ErrorsAndWarningAndInformation"}] String LogLevel; - [Write, Description("The path to the log file to log this operation.")] String LogPath; - [Read, Description("The custom properties retrieved from the Windows optional feature as an array of strings.")] String CustomProperties[]; - [Read, Description("The description retrieved from the Windows optional feature.")] String Description; - [Read, Description("The display name retrieved from the Windows optional feature.")] String DisplayName; -}; diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsOptionalFeature/en-US/MSFT_xWindowsOptionalFeature.schema.mfl b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsOptionalFeature/en-US/MSFT_xWindowsOptionalFeature.schema.mfl deleted file mode 100644 index dc56b8ac6bd6bd92aafa493b2f184cfe5bc4f19e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3260 zcmcImO>fgc5S=SX{D&3dkV*(~-~yb|HkB&Uq#~&}R8^J6PKj{iD0UhU;;&QQoAF|= z(r^G~kHDSdWe zY=&o!xNsD*)Et8p4Avvy*=*vIyo_LhYFNlEMuWoo$G_NjBOZaL7@W?5ZH_l;XQOBh zGqLPKpJ5%@N>np9>S0w+R8o^S5!B%jwQc=1TcSFs+PuJG3SYuw>M+J{j>vd6&oQPS zM3Pr5)iwP%Ta4N+OI_qmX=j(-x8u_TvaHAyi;;ts>fgQ`Z;BXwVfHyZlOiAI__cUi zwxk+muCn~!Al}^9F23aU4!qwNr%*S$Pq0W)8D5)V6sUxKydA<)s(!FCIn7XS{RC&4 zheOOAW0b*rt7K25d{gfN7|880s>KL3!+}Xw+#L3%crs_g>f_`Bs);lvR8R-=7g`T3 zx9AI%Gl5p8h=FHkhI6YK7glg)sE=t=^=?))bL~{4^a@y4&|O?qG4BnPV5;$+hW^pJ zi|=ZDkDemnN{bTJSI|OUG1Q|3F`bDzia%nwyfdNQlCzlp(@#pj2){_8;r?s zsnP^HZ?!UXfq~tTUDUGT9ySu?h*4#HV(no)ys_S_5I5>A(TdZ-7yr&WYdd*b|0TH7A5v)%P_AX|DEfs zmidlTveX{?d4Zx0@+o-DRM%8~*pYnSrdI79VBE0(&Qz1!<9!XYl37&VA)D@UjIU{p zImGy_@MOQWyA4tKyT`tJ-*z87s`$jN?YX7?*tss{s#SfU{ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateSet('Present', 'Absent')] - [String] - $Ensure, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $SourcePath, - - [ValidateNotNullOrEmpty()] - [String] - $LogPath - ) - - $windowsPackageCab = @{ - Name = $Name - Ensure = 'Present' - SourcePath = $SourcePath - LogPath = $LogPath - } - - $getWindowsPackageParams = @{ - PackageName = $Name - Online = $true - } - - if ($PSBoundParameters.ContainsKey('LogPath')) - { - $getWindowsPackageParams['LogPath'] = $LogPath - } - - Write-Verbose -Message ($script:localizedData.RetrievingPackage -f $Name) - - try - { - $windowsPackageInfo = Dism\Get-WindowsPackage @getWindowsPackageParams - } - catch - { - $windowsPackageInfo = $null - } - - if ($null -eq $windowsPackageInfo -or -not ($windowsPackageInfo.PackageState -in @( 'Installed', 'InstallPending' ))) - { - $windowsPackageCab.Ensure = 'Absent' - } - - Write-Verbose -Message ($script:localizedData.PackageEnsureState -f $Name, $windowsPackageCab.Ensure) - - return $windowsPackageCab -} - -<# - .SYNOPSIS - Installs or uninstalls a package from a windows cabinet (cab) file. - - .PARAMETER Name - The name of the package to install or uninstall. - - .PARAMETER Ensure - Specifies whether the package should be installed or uninstalled. - To install the package, set this property to Present. - To uninstall the package, set the property to Absent. - - .PARAMETER SourcePath - The path to the cab file to install or uninstall the package from. - - .PARAMETER LogPath - The path to a file to log this operation to. - There is no default value, but if not set, the log will appear at %WINDIR%\Logs\Dism\dism.log. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateSet('Present', 'Absent')] - [String] - $Ensure, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $SourcePath, - - [ValidateNotNullOrEmpty()] - [String] - $LogPath - ) - - Write-Verbose -Message ($script:localizedData.SetTargetResourceStarting -f $Name) - - if (-not (Test-Path -Path $SourcePath)) - { - New-InvalidArgumentException -ArgumentName 'SourcePath' -Message ($script:localizedData.SourcePathDoesNotExist -f $SourcePath) - } - - if ($Ensure -ieq 'Present') - { - Write-Verbose -Message ($script:localizedData.AddingPackage -f $SourcePath) - Dism\Add-WindowsPackage -PackagePath $SourcePath -LogPath $LogPath -Online - } - else - { - Write-Verbose -Message ($script:localizedData.RemovingPackage -f $SourcePath) - Dism\Remove-WindowsPackage -PackagePath $SourcePath -LogPath $LogPath -Online - } - - Write-Verbose -Message ($script:localizedData.SetTargetResourceFinished -f $Name) -} - -<# - .SYNOPSIS - Tests whether a package in a windows cabinet (cab) file is installed or uninstalled. - - .PARAMETER Name - The name of the cab package to test for installation. - - .PARAMETER Ensure - Specifies whether to test if the package is installed or uninstalled. - To test if the package is installed, set this property to Present. - To test if the package is uninstalled, set the property to Absent. - - .PARAMETER SourcePath - Not used in Test-TargetResource. - - .PARAMETER LogPath - The path to a file to log this operation to. - There is no default value, but if not set, the log will appear at %WINDIR%\Logs\Dism\dism.log. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateSet('Present', 'Absent')] - [String] - $Ensure, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $SourcePath, - - [ValidateNotNullOrEmpty()] - [String] - $LogPath - ) - - $getTargetResourceParams = @{ - Name = $Name - Ensure = $Ensure - SourcePath = $SourcePath - } - - if ($PSBoundParameters.ContainsKey('LogPath')) - { - $getTargetResourceParams['LogPath'] = $LogPath - } - - $windowsPackageCab = Get-TargetResource @getTargetResourceParams - - if ($windowsPackageCab.Ensure -ieq $Ensure) - { - Write-Verbose -Message ($script:localizedData.EnsureStatesMatch -f $Name) - return $true - } - else - { - Write-Verbose -Message ($script:localizedData.EnsureStatesDoNotMatch -f $Name) - return $false - } -} - -Export-ModuleMember -Function '*-TargetResource' diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsPackageCab/MSFT_xWindowsPackageCab.schema.mof b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsPackageCab/MSFT_xWindowsPackageCab.schema.mof deleted file mode 100644 index cd778302..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsPackageCab/MSFT_xWindowsPackageCab.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xWindowsPackageCab")] -class MSFT_xWindowsPackageCab : OMI_BaseResource -{ - [Key, Description("The name of the package to install or uninstall.")] String Name; - [Required, Description("Specifies whether the package should be installed or uninstalled. To install the package, set this property to Present. To uninstall the package, set the property to Absent."), ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}] String Ensure; - [Required, Description("The path to the cab file to install or uninstall the package from.")] String SourcePath; - [Write, Description("The path to a file to log the operation to.")] String LogPath; -}; diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsPackageCab/en-US/MSFT_xWindowsPackageCab.schema.mfl b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsPackageCab/en-US/MSFT_xWindowsPackageCab.schema.mfl deleted file mode 100644 index 553df028..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsPackageCab/en-US/MSFT_xWindowsPackageCab.schema.mfl +++ /dev/null @@ -1,8 +0,0 @@ -[Description("This resource is used to install or uninstall a package from a windows cabinet (cab) file.") : Amended,AMENDMENT, LOCALE("MS_409")] -class MSFT_xWindowsPackageCab : OMI_BaseResource -{ - [Key, Description("The name of the package to install or uninstall.") : Amended] String Name; - [Description("Specifies whether the package should be installed or uninstalled. To install the package, set this property to Present. To uninstall the package, set the property to Absent.") : Amended] String Ensure; - [Description("The path to the cab file to install or uninstall the package from.") : Amended] String SourcePath; - [Description("The path to a file to log the operation to.") : Amended] String LogPath; -}; diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsPackageCab/en-US/MSFT_xWindowsPackageCab.strings.psd1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsPackageCab/en-US/MSFT_xWindowsPackageCab.strings.psd1 deleted file mode 100644 index 5b9faf70..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsPackageCab/en-US/MSFT_xWindowsPackageCab.strings.psd1 +++ /dev/null @@ -1,13 +0,0 @@ -# Localized resources for xWindowsPackageCab - -ConvertFrom-StringData @' - RetrievingPackage = Retrieving information for the package {0} - PackageEnsureState = The package {0} is currently {1} - SourcePathDoesNotExist = Could not find the source file at path {0} - SetTargetResourceStarting = Starting configuration of the WindowsPackageCab resource {0} - SetTargetResourceFinished = Finished configuration of WindowsPackageCab resource {0} - AddingPackage = Adding a package from the source at path {0} - RemovingPackage = Removing package from the source at path {0} - EnsureStatesMatch = Ensure states match for package {0} - EnsureStatesDoNotMatch = Ensure states do not match for package {0} -'@ diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsProcess/MSFT_xWindowsProcess.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsProcess/MSFT_xWindowsProcess.psm1 deleted file mode 100644 index 0700a6b9..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsProcess/MSFT_xWindowsProcess.psm1 +++ /dev/null @@ -1,1491 +0,0 @@ -$errorActionPreference = 'Stop' -Set-StrictMode -Version 'Latest' - -Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) ` - -ChildPath 'CommonResourceHelper.psm1') - -# Localized messages for verbose and error statements in this resource -$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xWindowsProcess' - -<# - .SYNOPSIS - Retrieves the current state of the Windows process(es) with the specified - executable and arguments. - - If more than one process is found, only the information of the first process is retrieved. - ProcessCount will contain the actual number of processes that were found. - - .PARAMETER Path - The path to the process executable. If this is the file name of the executable - (not the fully qualified path), the DSC resource will search the environment Path variable - ($env:Path) to find the executable file. If the value of this property is a fully qualified - path, DSC will use the given Path variable to find the file. If the path is not found it - will throw an error. Relative paths are not allowed. - - .PARAMETER Arguments - The arguments to the process as a single string. - - .PARAMETER Credential - The credential of the user account to start the process under. -#> -function Get-TargetResource -{ - [OutputType([Hashtable])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [Parameter(Mandatory = $true)] - [AllowEmptyString()] - [String] - $Arguments, - - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - Write-Verbose -Message ($script:localizedData.GetTargetResourceStartMessage -f $Path) - - $Path = Expand-Path -Path $Path - - $getProcessCimInstanceArguments = @{ - Path = $Path - Arguments = $Arguments - } - - if ($PSBoundParameters.ContainsKey('Credential')) - { - $getProcessCimInstanceArguments['Credential'] = $Credential - } - - $processCimInstance = @( Get-ProcessCimInstance @getProcessCimInstanceArguments ) - - $processToReturn = @{} - - if ($processCimInstance.Count -eq 0) - { - $processToReturn = @{ - Path = $Path - Arguments = $Arguments - Ensure ='Absent' - } - } - else - { - $processId = $processCimInstance[0].ProcessId - $getProcessResult = Get-Process -ID $processId - - $processToReturn = @{ - Path = $Path - Arguments = $Arguments - PagedMemorySize = $getProcessResult.PagedMemorySize64 - NonPagedMemorySize = $getProcessResult.NonpagedSystemMemorySize64 - VirtualMemorySize = $getProcessResult.VirtualMemorySize64 - HandleCount = $getProcessResult.HandleCount - Ensure = 'Present' - ProcessId = $processId - ProcessCount = $processCimInstance.Count - } - } - - Write-Verbose -Message ($script:localizedData.GetTargetResourceEndMessage -f $Path) - return $processToReturn -} - -<# - .SYNOPSIS - Sets the Windows process with the specified executable path and arguments - to the specified state. - - If multiple process are found, the specified state will be set for all of them. - - .PARAMETER Path - The path to the process executable. If this is the file name of the executable - (not the fully qualified path), the DSC resource will search the environment Path variable - ($env:Path) to find the executable file. If the value of this property is a fully qualified - path, DSC will use the given Path variable to find the file. If the path is not found it - will throw an error. Relative paths are not allowed. - - .PARAMETER Arguments - The arguments to pass to the process as a single string. - - .PARAMETER Credential - The credential of the user account to start the process under. - - .PARAMETER Ensure - Specifies whether or not the process should exist. - To start or modify a process, set this property to Present. - To stop a process, set this property to Absent. - The default value is Present. - - .PARAMETER StandardOutputPath - The file path to write the standard output to. Any existing file at this path - will be overwritten.This property cannot be specified at the same time as Credential - when running the process as a local user. - - .PARAMETER StandardErrorPath - The file path to write the standard error output to. Any existing file at this path - will be overwritten. - - .PARAMETER StandardInputPath - The file path to get standard input from. This property cannot be specified at the - same time as Credential when running the process as a local user. - - .PARAMETER WorkingDirectory - The file path to use as the working directory for the process. Any existing file - at this path will be overwritten. This property cannot be specified at the same time - as Credential when running the process as a local user. -#> -function Set-TargetResource -{ - [CmdletBinding(SupportsShouldProcess = $true)] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [Parameter(Mandatory = $true)] - [AllowEmptyString()] - [String] - $Arguments, - - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [String] - $StandardOutputPath, - - [String] - $StandardErrorPath, - - [String] - $StandardInputPath, - - [String] - $WorkingDirectory - ) - - Write-Verbose -Message ($script:localizedData.SetTargetResourceStartMessage -f $Path) - - Assert-PsDscContextNotRunAsUser - - $Path = Expand-Path -Path $Path - - $getProcessCimInstanceArguments = @{ - Path = $Path - Arguments = $Arguments - } - - if ($PSBoundParameters.ContainsKey('Credential')) - { - $getProcessCimInstanceArguments['Credential'] = $Credential - } - - $processCimInstance = @( Get-ProcessCimInstance @getProcessCimInstanceArguments ) - - if ($Ensure -eq 'Absent') - { - $assertHashtableParams = @{ - Hashtable = $PSBoundParameters - Key = @( 'StandardOutputPath', - 'StandardErrorPath', - 'StandardInputPath', - 'WorkingDirectory' ) - } - Assert-HashtableDoesNotContainKey @assertHashtableParams - - $whatIfShouldProcess = $PSCmdlet.ShouldProcess($Path, $script:localizedData.StoppingProcessWhatif) - if ($processCimInstance.Count -gt 0 -and $whatIfShouldProcess) - { - # If there are multiple process Ids, all will be included to be stopped - $processIds = $processCimInstance.ProcessId - - # Redirecting error output to standard output while we try to stop the processes - $stopProcessError = Stop-Process -Id $processIds -Force 2>&1 - - if ($null -eq $stopProcessError) - { - Write-Verbose -Message ($script:localizedData.ProcessesStopped -f $Path, ($processIds -join ',')) - } - else - { - $errorMessage = ($script:localizedData.ErrorStopping -f $Path, - ($processIds -join ','), - ($stopProcessError | Out-String)) - - New-InvalidOperationException -Message $errorMessage - } - <# - Before returning from Set-TargetResource we have to ensure a subsequent - Test-TargetResource is going to work - #> - if (-not (Wait-ProcessCount -ProcessSettings $getProcessCimInstanceArguments -ProcessCount 0)) - { - $message = $script:localizedData.ErrorStopping -f $Path, ($processIds -join ','), - $script:localizedData.FailureWaitingForProcessesToStop - - New-InvalidOperationException -Message $message - } - } - else - { - Write-Verbose -Message ($script:localizedData.ProcessAlreadyStopped -f $Path) - } - } - # Ensure = 'Present' - else - { - $shouldBeRootedPathArguments = @( 'StandardInputPath', - 'WorkingDirectory', - 'StandardOutputPath', - 'StandardErrorPath' ) - - foreach ($shouldBeRootedPathArgument in $shouldBeRootedPathArguments) - { - if (-not [String]::IsNullOrEmpty($PSBoundParameters[$shouldBeRootedPathArgument])) - { - $assertPathArgumentRootedParams = @{ - PathArgumentName = $shouldBeRootedPathArgument - PathArgument = $PSBoundParameters[$shouldBeRootedPathArgument] - } - Assert-PathArgumentRooted @assertPathArgumentRootedParams - } - } - - $shouldExistPathArguments = @( 'StandardInputPath', 'WorkingDirectory' ) - - foreach ($shouldExistPathArgument in $shouldExistPathArguments) - { - if (-not [String]::IsNullOrEmpty($PSBoundParameters[$shouldExistPathArgument])) - { - $assertPathArgumentValidParams = @{ - PathArgumentName = $shouldExistPathArgument - PathArgument = $PSBoundParameters[$shouldExistPathArgument] - } - Assert-PathArgumentValid @assertPathArgumentValidParams - } - } - - if ($processCimInstance.Count -eq 0) - { - $startProcessArguments = @{ - FilePath = $Path - } - - $startProcessOptionalArgumentMap = @{ - Credential = 'Credential' - RedirectStandardOutput = 'StandardOutputPath' - RedirectStandardError = 'StandardErrorPath' - RedirectStandardInput = 'StandardInputPath' - WorkingDirectory = 'WorkingDirectory' - } - - foreach ($startProcessOptionalArgumentName in $startProcessOptionalArgumentMap.Keys) - { - $parameterKey = $startProcessOptionalArgumentMap[$startProcessOptionalArgumentName] - $parameterValue = $PSBoundParameters[$parameterKey] - - if (-not [String]::IsNullOrEmpty($parameterValue)) - { - $startProcessArguments[$startProcessOptionalArgumentName] = $parameterValue - } - } - - if (-not [String]::IsNullOrEmpty($Arguments)) - { - $startProcessArguments['ArgumentList'] = $Arguments - } - - if ($PSCmdlet.ShouldProcess($Path, $script:localizedData.StartingProcessWhatif)) - { - <# - Start-Process calls .net Process.Start() - If -Credential is present Process.Start() uses win32 api CreateProcessWithLogonW - http://msdn.microsoft.com/en-us/library/0w4h05yb(v=vs.110).aspx - CreateProcessWithLogonW cannot be called as LocalSystem user. - Details http://msdn.microsoft.com/en-us/library/windows/desktop/ms682431(v=vs.85).aspx - (section Remarks/Windows XP with SP2 and Windows Server 2003) - - In this case we call another api. - #> - if (($PSBoundParameters.ContainsKey('Credential')) -and (Test-IsRunFromLocalSystemUser)) - { - # Throw an exception if any of the below parameters are included with Credential passed - foreach ($key in @('StandardOutputPath','StandardInputPath','WorkingDirectory')) - { - if ($PSBoundParameters.Keys -contains $key) - { - $newInvalidArgumentExceptionParams = @{ - ArgumentName = $key - Message = $script:localizedData.ErrorParametersNotSupportedWithCredential - } - New-InvalidArgumentException @newInvalidArgumentExceptionParams - } - } - try - { - Start-ProcessAsLocalSystemUser -Path $Path -Arguments $Arguments -Credential $Credential - } - catch - { - throw (New-Object -TypeName 'System.Management.Automation.ErrorRecord' ` - -ArgumentList @( $_.Exception, 'Win32Exception', 'OperationStopped', $null )) - } - } - # Credential not passed in or running from a LocalSystem - else - { - try - { - Start-Process @startProcessArguments - } - catch [System.Exception] - { - $errorMessage = ($script:localizedData.ErrorStarting -f $Path, $_.Exception.Message) - - New-InvalidOperationException -Message $errorMessage - } - } - - Write-Verbose -Message ($script:localizedData.ProcessesStarted -f $Path) - - # Before returning from Set-TargetResource we have to ensure a subsequent Test-TargetResource is going to work - if (-not (Wait-ProcessCount -ProcessSettings $getProcessCimInstanceArguments -ProcessCount 1)) - { - $message = $script:localizedData.ErrorStarting -f $Path, - $script:localizedData.FailureWaitingForProcessesToStart - - New-InvalidOperationException -Message $message - } - } - } - else - { - Write-Verbose -Message ($script:localizedData.ProcessAlreadyStarted -f $Path) - } - } - - Write-Verbose -Message ($script:localizedData.SetTargetResourceEndMessage -f $Path) -} - -<# - .SYNOPSIS - Tests if the Windows process with the specified executable path and arguments is in - the specified state. - - .PARAMETER Path - The path to the process executable. If this is the file name of the executable - (not the fully qualified path), the DSC resource will search the environment Path variable - ($env:Path) to find the executable file. If the value of this property is a fully qualified - path, DSC will use the given Path variable to find the file. If the path is not found it - will throw an error. Relative paths are not allowed. - - .PARAMETER Arguments - The arguments to pass to the process as a single string. - - .PARAMETER Credential - The credential of the user account the process should be running under. - - .PARAMETER Ensure - Specifies whether or not the process should exist. - If the process should exist, set this property to Present. - If the process should not exist, set this property to Absent. - The default value is Present. - - .PARAMETER StandardOutputPath - Not used in Test-TargetResource. - - .PARAMETER StandardErrorPath - Not used in Test-TargetResource. - - .PARAMETER StandardInputPath - Not used in Test-TargetResource. - - .PARAMETER WorkingDirectory - Not used in Test-TargetResource. -#> -function Test-TargetResource -{ - [OutputType([Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [Parameter(Mandatory = $true)] - [AllowEmptyString()] - [String] - $Arguments, - - [ValidateNotNullOrEmpty()] - [PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [String] - $StandardOutputPath, - - [String] - $StandardErrorPath, - - [String] - $StandardInputPath, - - [String] - $WorkingDirectory - ) - - Write-Verbose -Message ($script:localizedData.TestTargetResourceStartMessage -f $Path) - - Assert-PsDscContextNotRunAsUser - - $Path = Expand-Path -Path $Path - - $getProcessCimInstanceArguments = @{ - Path = $Path - Arguments = $Arguments - } - - if ($PSBoundParameters.ContainsKey('Credential')) - { - $getProcessCimInstanceArguments['Credential'] = $Credential - } - - $processCimInstances = @( Get-ProcessCimInstance @getProcessCimInstanceArguments ) - - Write-Verbose -Message ($script:localizedData.TestTargetResourceEndMessage -f $Path) - - if ($Ensure -eq 'Absent') - { - return ($processCimInstances.Count -eq 0) - } - else - { - return ($processCimInstances.Count -gt 0) - } -} - -<# - .SYNOPSIS - Expands a relative leaf path into a full, rooted path. Throws an invalid argument exception - if the path is not valid. - - .PARAMETER Path - The relative leaf path to expand. -#> -function Expand-Path -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path - ) - - $Path = [Environment]::ExpandEnvironmentVariables($Path) - - # Check to see if the path is rooted. If so, return it as is. - if ([IO.Path]::IsPathRooted($Path)) - { - if (-not (Test-Path -Path $Path -PathType 'Leaf')) - { - New-InvalidArgumentException -ArgumentName 'Path' -Message ($script:localizedData.FileNotFound -f $Path) - } - - return $Path - } - - # Check to see if the path to the file exists in the current location. If so, return the full rooted path. - $rootedPath = [System.IO.Path]::GetFullPath($Path) - if ([System.IO.File]::Exists($rootedPath)) - { - return $rootedPath - } - - # If the path is not found, throw an exception - New-InvalidArgumentException -ArgumentName 'Path' -Message ($script:localizedData.FileNotFound -f $Path) -} - -<# - .SYNOPSIS - Retrieves any process CIM instance objects that match the given path, arguments, and credential. - - .PARAMETER Path - The executable path of the process to retrieve. - - .PARAMETER Arguments - The arguments of the process to retrieve as a single string. - - .PARAMETER Credential - The credential of the user account of the process to retrieve - - .PARAMETER UseGetCimInstanceThreshold - If the number of processes returned by the Get-Process method is greater than or equal to - this value, this function will retrieve all processes at the executable path. This will - help the function execute faster. Otherwise, this function will retrieve each process - CIM instance with the process IDs retrieved from Get-Process. -#> -function Get-ProcessCimInstance -{ - [OutputType([CimInstance[]])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [ValidateRange(0, [Int]::MaxValue)] - [Int] - $UseGetCimInstanceThreshold = 8 - ) - - $processName = [IO.Path]::GetFileNameWithoutExtension($Path) - - $getProcessResult = @( Get-Process -Name $processName -ErrorAction 'SilentlyContinue' ) - - $processCimInstances = @() - - if ($getProcessResult.Count -ge $UseGetCimInstanceThreshold) - { - - $escapedPathForWqlFilter = ConvertTo-EscapedStringForWqlFilter -FilterString $Path - $wqlFilter = "ExecutablePath = '$escapedPathForWqlFilter'" - - $processCimInstances = Get-CimInstance -ClassName 'Win32_Process' -Filter $wqlFilter - } - else - { - foreach ($process in $getProcessResult) - { - if ($process.Path -ieq $Path) - { - Write-Verbose -Message ($script:localizedData.VerboseInProcessHandle -f $process.Id) - $getCimInstanceParams = @{ - ClassName = 'Win32_Process' - Filter = "ProcessId = $($process.Id)" - ErrorAction = 'SilentlyContinue' - } - $processCimInstances += Get-CimInstance @getCimInstanceParams - } - } - } - - if ($PSBoundParameters.ContainsKey('Credential')) - { - $splitCredentialResult = Split-Credential -Credential $Credential - $domain = $splitCredentialResult.Domain - $userName = $splitCredentialResult.UserName - $processesWithCredential = @() - - foreach ($process in $processCimInstances) - { - if ((Get-ProcessOwner -Process $process) -eq "$domain\$userName") - { - $processesWithCredential += $process - } - } - $processCimInstances = $processesWithCredential - } - - if ($null -eq $Arguments) - { - $Arguments = [String]::Empty - } - - $processesWithMatchingArguments = @() - - foreach ($process in $processCimInstances) - { - if ((Get-ArgumentsFromCommandLineInput -CommandLineInput $process.CommandLine) -eq $Arguments) - { - $processesWithMatchingArguments += $process - } - } - - return $processesWithMatchingArguments -} - -<# - .SYNOPSIS - Converts a string to an escaped string to be used in a WQL filter such as the one passed in - the Filter parameter of Get-WmiObject. - - .PARAMETER FilterString - The string to convert. -#> -function ConvertTo-EscapedStringForWqlFilter -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $FilterString - ) - - return $FilterString.Replace("\","\\").Replace('"','\"').Replace("'","\'") -} - -<# - .SYNOPSIS - Retrieves the owner of a Process. - - .PARAMETER Process - The Process to retrieve the owner of. - - .NOTES - If the process was killed by the time this function is called, this function will throw a - WMIMethodException with the message "Not found". -#> -function Get-ProcessOwner -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [Object] - $Process - ) - - $owner = Get-ProcessOwnerCimInstance -Process $Process -ErrorAction 'SilentlyContinue' - - if ($null -ne $owner) - { - if ($null -ne $owner.Domain) - { - return ($owner.Domain + '\' + $owner.User) - } - else - { - # return the default domain - return ($env:computerName + '\' + $owner.User) - } - } - - return '' -} - -<# - .SYNOPSIS - Wrapper function to retrieve the CIM instance of the owner of a process - - .PARAMETER Process - The process to retrieve the CIM instance of the owner of. - - .NOTES - If the process was killed by the time this function is called, this function will throw a - WMIMethodException with the message "Not found". -#> -function Get-ProcessOwnerCimInstance -{ - [OutputType([CimInstance])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNull()] - [Object] - $Process - ) - - return Invoke-CimMethod -InputObject $Process -MethodName 'GetOwner' -ErrorAction 'SilentlyContinue' -} - -<# - .SYNOPSIS - Retrieves the 'arguments' part of command line input. - - .PARAMETER CommandLineInput - The command line input to retrieve the arguments from. - - .EXAMPLE - Get-ArgumentsFromCommandLineInput -CommandLineInput 'C:\temp\a.exe X Y Z' - Returns 'X Y Z'. -#> -function Get-ArgumentsFromCommandLineInput -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [String] - $CommandLineInput - ) - - if ([String]::IsNullOrWhitespace($CommandLineInput)) - { - return [String]::Empty - } - - $CommandLineInput = $CommandLineInput.Trim() - - if ($CommandLineInput.StartsWith('"')) - { - $endOfCommandChar = [Char]'"' - } - else - { - $endOfCommandChar = [Char]' ' - } - - $endofCommandIndex = $CommandLineInput.IndexOf($endOfCommandChar, 1) - - if ($endofCommandIndex -eq -1) - { - return [String]::Empty - } - - return $CommandLineInput.Substring($endofCommandIndex + 1).Trim() -} - -<# - .SYNOPSIS - Throws an invalid argument exception if the given hashtable contains the given key(s). - - .PARAMETER Hashtable - The hashtable to check the keys of. - - .PARAMETER Key - The key(s) that should not be in the hashtable. -#> -function Assert-HashtableDoesNotContainKey -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [Hashtable] - $Hashtable, - - [Parameter(Mandatory = $true)] - [String[]] - $Key - ) - - foreach ($keyName in $Key) - { - if ($Hashtable.ContainsKey($keyName)) - { - New-InvalidArgumentException -ArgumentName $keyName ` - -Message ($script:localizedData.ParameterShouldNotBeSpecified -f $keyName) - } - } -} - -<# - .SYNOPSIS - Waits for the given amount of time for the given number of processes with the given settings - to be running. If not all processes are running by 'WaitTime', the function returns - false, otherwise it returns true. - - .PARAMETER ProcessSettings - The settings for the running process(es) that we're getting the count of. - - .PARAMETER ProcessCount - The number of processes running to wait for. - - .PARAMETER WaitTime - The amount of milliseconds to wait for all processes to be running. - Default is 2000. -#> -function Wait-ProcessCount -{ - [OutputType([Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [Hashtable] - $ProcessSettings, - - [Parameter(Mandatory = $true)] - [ValidateRange(0, [Int]::MaxValue)] - [Int] - $ProcessCount, - - [Int] - $WaitTime = 200000 - ) - - $startTime = [DateTime]::Now - - do - { - $actualProcessCount = @( Get-ProcessCimInstance @ProcessSettings ).Count - } while ($actualProcessCount -ne $ProcessCount -and ([DateTime]::Now - $startTime).TotalMilliseconds -lt $WaitTime) - - return $actualProcessCount -eq $ProcessCount -} - -<# - .SYNOPSIS - Throws an error if the given path argument is not rooted. - - .PARAMETER PathArgumentName - The name of the path argument that should be rooted. - - .PARAMETER PathArgument - The path arguments that should be rooted. -#> -function Assert-PathArgumentRooted -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $PathArgumentName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $PathArgument - ) - - if (-not ([IO.Path]::IsPathRooted($PathArgument))) - { - $message = $script:localizedData.PathShouldBeAbsolute -f $PathArgumentName, $PathArgument - - New-InvalidArgumentException -ArgumentName 'Path' ` - -Message $message - } -} - -<# - .SYNOPSIS - Throws an error if the given path argument does not exist. - - .PARAMETER PathArgumentName - The name of the path argument that should exist. - - .PARAMETER PathArgument - The path argument that should exist. -#> -function Assert-PathArgumentValid -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $PathArgumentName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $PathArgument - ) - - if (-not (Test-Path -Path $PathArgument)) - { - $message = $script:localizedData.PathShouldExist -f $PathArgument, $PathArgumentName - - New-InvalidArgumentException -ArgumentName 'Path' ` - -Message $message - } -} - -<# - .SYNOPSIS - Tests if the current user is from the local system. -#> -function Test-IsRunFromLocalSystemUser -{ - [OutputType([Boolean])] - [CmdletBinding()] - param () - - $identity = [Security.Principal.WindowsIdentity]::GetCurrent() - $principal = New-Object -TypeName Security.Principal.WindowsPrincipal -ArgumentList $identity - - return $principal.Identity.IsSystem -} - -<# - .SYNOPSIS - Starts the process with the given credential when the user is a local system user. - - .PARAMETER Path - The path to the process executable. - - .PARAMETER Arguments - Indicates a string of arguments to pass to the process as-is. - - .PARAMETER Credential - Indicates the credential for starting the process. -#> -function Start-ProcessAsLocalSystemUser -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [Parameter(Mandatory = $true)] - [AllowEmptyString()] - [String] - $Arguments, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - $splitCredentialResult = Split-Credential -Credential $Credential - - <# - Internally we use win32 api LogonUser() with - dwLogonType == LOGON32_LOGON_NETWORK_CLEARTEXT. - - It grants the process ability for second-hop. - #> - Import-DscNativeMethods - - [PSDesiredStateConfiguration.NativeMethods]::CreateProcessAsUser( "$Path $Arguments", $splitCredentialResult.Domain, - $splitCredentialResult.UserName, $Credential.Password, - $false, [Ref]$null ) -} - -<# - .SYNOPSIS - Splits a credential into a username and domain without calling GetNetworkCredential. - Calls to GetNetworkCredential expose the password as plain text in memory. - - .PARAMETER Credential - The credential to pull the username and domain out of. - - .NOTES - Supported formats: DOMAIN\username, username@domain -#> -function Split-Credential -{ - [OutputType([Hashtable])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - $wrongFormat = $false - - if ($Credential.UserName.Contains('\')) - { - $credentialSegments = $Credential.UserName.Split('\') - - if ($credentialSegments.Length -gt 2) - { - # i.e. domain\user\foo - $wrongFormat = $true - } - else - { - $domain = $credentialSegments[0] - $userName = $credentialSegments[1] - } - } - elseif ($Credential.UserName.Contains('@')) - { - $credentialSegments = $Credential.UserName.Split('@') - - if ($credentialSegments.Length -gt 2) - { - # i.e. user@domain@foo - $wrongFormat = $true - } - else - { - $UserName = $credentialSegments[0] - $Domain = $credentialSegments[1] - } - } - else - { - # support for default domain (localhost) - $domain = $env:computerName - $userName = $Credential.UserName - } - - if ($wrongFormat) - { - $message = $script:localizedData.ErrorInvalidUserName -f $Credential.UserName - - New-InvalidArgumentException -ArgumentName 'Credential' -Message $message - } - - return @{ - Domain = $domain - UserName = $userName - } -} - -<# - .SYNOPSIS - Asserts that the PsDscContext is not run as user. - Throws an invalid argument exception if DSC is running as a specific user - (the PsDscRunAsCredential parameter was provided to DSC). - - .NOTES - Strict mode is turned off for this function since it does not recognize $PsDscContext -#> -function Assert-PsDscContextNotRunAsUser -{ - [CmdletBinding()] - param - () - - Set-StrictMode -Off - - if ($null -ne $PsDscContext.RunAsUser) - { - $newInvalidArgumentExceptionParams = @{ - ArgumentName = 'PsDscRunAsCredential' - Message = ($script:localizedData.ErrorRunAsCredentialParameterNotSupported -f $PsDscContext.RunAsUser) - } - New-InvalidArgumentException @newInvalidArgumentExceptionParams - } -} - -<# - .SYNOPSIS - Imports the DSC native methods so that a process can be started with a credential - for a user from the local system. - Currently Start-Process, which is the command used otherwise, cannot do this. -#> -function Import-DscNativeMethods -{ -$dscNativeMethodsSource = @" - -using System; -using System.Collections.Generic; -using System.Text; -using System.Security; -using System.Runtime.InteropServices; -using System.Diagnostics; -using System.Security.Principal; -#if !CORECLR -using System.ComponentModel; -#endif -using System.IO; - -namespace PSDesiredStateConfiguration -{ -#if !CORECLR - [SuppressUnmanagedCodeSecurity] -#endif - public static class NativeMethods - { - //The following structs and enums are used by the various Win32 API's that are used in the code below - - [StructLayout(LayoutKind.Sequential)] - public struct STARTUPINFO - { - public Int32 cb; - public string lpReserved; - public string lpDesktop; - public string lpTitle; - public Int32 dwX; - public Int32 dwY; - public Int32 dwXSize; - public Int32 dwXCountChars; - public Int32 dwYCountChars; - public Int32 dwFillAttribute; - public Int32 dwFlags; - public Int16 wShowWindow; - public Int16 cbReserved2; - public IntPtr lpReserved2; - public IntPtr hStdInput; - public IntPtr hStdOutput; - public IntPtr hStdError; - } - - [StructLayout(LayoutKind.Sequential)] - public struct PROCESS_INFORMATION - { - public IntPtr hProcess; - public IntPtr hThread; - public Int32 dwProcessID; - public Int32 dwThreadID; - } - - [Flags] - public enum LogonType - { - LOGON32_LOGON_INTERACTIVE = 2, - LOGON32_LOGON_NETWORK = 3, - LOGON32_LOGON_BATCH = 4, - LOGON32_LOGON_SERVICE = 5, - LOGON32_LOGON_UNLOCK = 7, - LOGON32_LOGON_NETWORK_CLEARTEXT = 8, - LOGON32_LOGON_NEW_CREDENTIALS = 9 - } - - [Flags] - public enum LogonProvider - { - LOGON32_PROVIDER_DEFAULT = 0, - LOGON32_PROVIDER_WINNT35, - LOGON32_PROVIDER_WINNT40, - LOGON32_PROVIDER_WINNT50 - } - [StructLayout(LayoutKind.Sequential)] - public struct SECURITY_ATTRIBUTES - { - public Int32 Length; - public IntPtr lpSecurityDescriptor; - public bool bInheritHandle; - } - - public enum SECURITY_IMPERSONATION_LEVEL - { - SecurityAnonymous, - SecurityIdentification, - SecurityImpersonation, - SecurityDelegation - } - - public enum TOKEN_TYPE - { - TokenPrimary = 1, - TokenImpersonation - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - internal struct TokPriv1Luid - { - public int Count; - public long Luid; - public int Attr; - } - - public const int GENERIC_ALL_ACCESS = 0x10000000; - public const int CREATE_NO_WINDOW = 0x08000000; - internal const int SE_PRIVILEGE_ENABLED = 0x00000002; - internal const int TOKEN_QUERY = 0x00000008; - internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; - internal const string SE_INCRASE_QUOTA = "SeIncreaseQuotaPrivilege"; - -#if CORECLR - [DllImport("api-ms-win-core-handle-l1-1-0.dll", -#else - [DllImport("kernel32.dll", -#endif - EntryPoint = "CloseHandle", SetLastError = true, - CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] - public static extern bool CloseHandle(IntPtr handle); - -#if CORECLR - [DllImport("api-ms-win-core-processthreads-l1-1-2.dll", -#else - [DllImport("advapi32.dll", -#endif - EntryPoint = "CreateProcessAsUser", SetLastError = true, - CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] - public static extern bool CreateProcessAsUser( - IntPtr hToken, - string lpApplicationName, - string lpCommandLine, - ref SECURITY_ATTRIBUTES lpProcessAttributes, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - bool bInheritHandle, - Int32 dwCreationFlags, - IntPtr lpEnvrionment, - string lpCurrentDirectory, - ref STARTUPINFO lpStartupInfo, - ref PROCESS_INFORMATION lpProcessInformation - ); - -#if CORECLR - [DllImport("api-ms-win-security-base-l1-1-0.dll", EntryPoint = "DuplicateTokenEx")] -#else - [DllImport("advapi32.dll", EntryPoint = "DuplicateTokenEx")] -#endif - public static extern bool DuplicateTokenEx( - IntPtr hExistingToken, - Int32 dwDesiredAccess, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - Int32 ImpersonationLevel, - Int32 dwTokenType, - ref IntPtr phNewToken - ); - -#if CORECLR - [DllImport("api-ms-win-security-logon-l1-1-1.dll", CharSet = CharSet.Unicode, SetLastError = true)] -#else - [DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)] -#endif - public static extern Boolean LogonUser( - String lpszUserName, - String lpszDomain, - IntPtr lpszPassword, - LogonType dwLogonType, - LogonProvider dwLogonProvider, - out IntPtr phToken - ); - -#if CORECLR - [DllImport("api-ms-win-security-base-l1-1-0.dll", ExactSpelling = true, SetLastError = true)] -#else - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] -#endif - internal static extern bool AdjustTokenPrivileges( - IntPtr htok, - bool disall, - ref TokPriv1Luid newst, - int len, - IntPtr prev, - IntPtr relen - ); - -#if CORECLR - [DllImport("api-ms-win-downlevel-kernel32-l1-1-0.dll", ExactSpelling = true)] -#else - [DllImport("kernel32.dll", ExactSpelling = true)] -#endif - internal static extern IntPtr GetCurrentProcess(); - -#if CORECLR - [DllImport("api-ms-win-downlevel-advapi32-l1-1-1.dll", ExactSpelling = true, SetLastError = true)] -#else - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] -#endif - internal static extern bool OpenProcessToken( - IntPtr h, - int acc, - ref IntPtr phtok - ); - -#if CORECLR - [DllImport("api-ms-win-downlevel-kernel32-l1-1-0.dll", ExactSpelling = true)] -#else - [DllImport("kernel32.dll", ExactSpelling = true)] -#endif - internal static extern int WaitForSingleObject( - IntPtr h, - int milliseconds - ); - -#if CORECLR - [DllImport("api-ms-win-downlevel-kernel32-l1-1-0.dll", ExactSpelling = true)] -#else - [DllImport("kernel32.dll", ExactSpelling = true)] -#endif - internal static extern bool GetExitCodeProcess( - IntPtr h, - out int exitcode - ); - -#if CORECLR - [DllImport("api-ms-win-downlevel-advapi32-l4-1-0.dll", SetLastError = true)] -#else - [DllImport("advapi32.dll", SetLastError = true)] -#endif - internal static extern bool LookupPrivilegeValue( - string host, - string name, - ref long pluid - ); - - internal static void ThrowException( - string message - ) - { -#if CORECLR - throw new Exception(message); -#else - throw new Win32Exception(message); -#endif - } - - public static void CreateProcessAsUser(string strCommand, string strDomain, string strName, SecureString secureStringPassword, bool waitForExit, ref int ExitCode) - { - var hToken = IntPtr.Zero; - var hDupedToken = IntPtr.Zero; - TokPriv1Luid tp; - var pi = new PROCESS_INFORMATION(); - var sa = new SECURITY_ATTRIBUTES(); - sa.Length = Marshal.SizeOf(sa); - Boolean bResult = false; - try - { - IntPtr unmanagedPassword = IntPtr.Zero; - try - { -#if CORECLR - unmanagedPassword = SecureStringMarshal.SecureStringToCoTaskMemUnicode(secureStringPassword); -#else - unmanagedPassword = Marshal.SecureStringToGlobalAllocUnicode(secureStringPassword); -#endif - bResult = LogonUser( - strName, - strDomain, - unmanagedPassword, - LogonType.LOGON32_LOGON_NETWORK_CLEARTEXT, - LogonProvider.LOGON32_PROVIDER_DEFAULT, - out hToken - ); - } - finally - { - Marshal.ZeroFreeGlobalAllocUnicode(unmanagedPassword); - } - if (!bResult) - { - ThrowException("$($script:localizedData.UserCouldNotBeLoggedError)" + Marshal.GetLastWin32Error().ToString()); - } - IntPtr hproc = GetCurrentProcess(); - IntPtr htok = IntPtr.Zero; - bResult = OpenProcessToken( - hproc, - TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, - ref htok - ); - if (!bResult) - { - ThrowException("$($script:localizedData.OpenProcessTokenError)" + Marshal.GetLastWin32Error().ToString()); - } - tp.Count = 1; - tp.Luid = 0; - tp.Attr = SE_PRIVILEGE_ENABLED; - bResult = LookupPrivilegeValue( - null, - SE_INCRASE_QUOTA, - ref tp.Luid - ); - if (!bResult) - { - ThrowException("$($script:localizedData.PrivilegeLookingUpError)" + Marshal.GetLastWin32Error().ToString()); - } - bResult = AdjustTokenPrivileges( - htok, - false, - ref tp, - 0, - IntPtr.Zero, - IntPtr.Zero - ); - if (!bResult) - { - ThrowException("$($script:localizedData.TokenElevationError)" + Marshal.GetLastWin32Error().ToString()); - } - - bResult = DuplicateTokenEx( - hToken, - GENERIC_ALL_ACCESS, - ref sa, - (int)SECURITY_IMPERSONATION_LEVEL.SecurityIdentification, - (int)TOKEN_TYPE.TokenPrimary, - ref hDupedToken - ); - if (!bResult) - { - ThrowException("$($script:localizedData.DuplicateTokenError)" + Marshal.GetLastWin32Error().ToString()); - } - var si = new STARTUPINFO(); - si.cb = Marshal.SizeOf(si); - si.lpDesktop = ""; - bResult = CreateProcessAsUser( - hDupedToken, - null, - strCommand, - ref sa, - ref sa, - false, - 0, - IntPtr.Zero, - null, - ref si, - ref pi - ); - if (!bResult) - { - ThrowException("$($script:localizedData.CouldNotCreateProcessError)" + Marshal.GetLastWin32Error().ToString()); - } - if (waitForExit) { - int status = WaitForSingleObject(pi.hProcess, -1); - if(status == -1) - { - ThrowException("$($script:localizedData.WaitFailedError)" + Marshal.GetLastWin32Error().ToString()); - } - - bResult = GetExitCodeProcess(pi.hProcess, out ExitCode); - if(!bResult) - { - ThrowException("$($script:localizedData.RetriveStatusError)" + Marshal.GetLastWin32Error().ToString()); - } - } - } - finally - { - if (pi.hThread != IntPtr.Zero) - { - CloseHandle(pi.hThread); - } - if (pi.hProcess != IntPtr.Zero) - { - CloseHandle(pi.hProcess); - } - if (hDupedToken != IntPtr.Zero) - { - CloseHandle(hDupedToken); - } - } - } - } -} - -"@ - # if not on Nano: - Add-Type -TypeDefinition $dscNativeMethodsSource -ReferencedAssemblies 'System.ServiceProcess' -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsProcess/MSFT_xWindowsProcess.schema.mof b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsProcess/MSFT_xWindowsProcess.schema.mof deleted file mode 100644 index f9f0e1d5..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsProcess/MSFT_xWindowsProcess.schema.mof +++ /dev/null @@ -1,18 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("xWindowsProcess")] -class MSFT_xWindowsProcess : OMI_BaseResource -{ - [Key, Description("The full path or file name to the process executable to start or stop.")] String Path; - [Key, Description("A string of arguments to pass to the process executable. Pass in an empty string if no arguments are needed.")] String Arguments; - [Write, EmbeddedInstance("MSFT_Credential"), Description("The credential to run the process under.")] String Credential; - [Write, ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}, Description("Indicates whether the process is present (running) or absent (not running).")] String Ensure; - [Write, Description("The path to write the standard output stream to.")] String StandardOutputPath; - [Write, Description("The path to write the standard error stream to.")] String StandardErrorPath; - [Write, Description("The path to receive standard input from.")] String StandardInputPath; - [Write, Description("The directory to run the processes under.")] String WorkingDirectory; - [Read, Description("The amount of paged memory, in bytes, allocated for the process.")] UInt64 PagedMemorySize; - [Read, Description("The amount of nonpaged memory, in bytes, allocated for the process.")] UInt64 NonPagedMemorySize; - [Read, Description("The amount of virtual memory, in bytes, allocated for the process.")] UInt64 VirtualMemorySize; - [Read, Description("The number of handles opened by the process.")] SInt32 HandleCount; - [Read, Description("The unique identifier of the process.")] SInt32 ProcessId; - [Read, Description("The number of instances of the given process that are currently running.")] SInt32 ProcessCount; -}; diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsProcess/en-US/MSFT_xWindowsProcess.schema.mfl b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsProcess/en-US/MSFT_xWindowsProcess.schema.mfl deleted file mode 100644 index 461fd731eb5d66ec4e5b22b6cbb9918dbe4129b3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3574 zcmd6qQBM<55QXR2#Q(7I2@^w%8WZ)Y0!AWGV^JQ^kV;$F*luy#3YGBJ)$`ryrCZuk zwqP`*%l6)xxo2k1%$@%JwQuXzw4NPWZmFGEU(c>(wqg%#*N(N9*qQBVHM53xP9^(Z zvR!GQ*VBF;-nur>8>@-zAn`+5jj)$kU8^0vAIfH3wo++!wAPm#JFM01sGuF~bIPjF zJe1r^eJa5YXqx&w()VrKupRl~|97>P*p^joO?z9~!%7S#9E46J4A_i5z!b!q{gw2(Mz;;rq7`)_NDQ4r0sFLzg35yI|ySm_qtRnTk75{z9D7QCRFz(hKPR|z~X%8@}d zuF9|4XKB*UigwRKTw20O7542ynn{qXOxTU9^Lo>CrEKW5o~&}-&7!t@S=F%*cy>=^ zBNaBUf3JMF3!@u)=6Vths{SNABe$E{jh(j)SE>1;^=iTPtPZf4z2n|i#wQrd?E+uC zTJOrEjZ4dS;}2P;52v~b$5~NL1CsP)ohAMi*^MCUz?H zT0v)Chq}IwK59+?&vVTmep@=4?E;pXko?s5+j~o|g9ZPS&pQDVocx=fGjB4>40I0n z;J?rHrwK&2&vz!@I$|q5knYa3UZ2-(mK0tgVe$`_!Ju!du0Zn}t)> zbh1}iIkuvc+IQ*F4gI%)&n--~MW1HR0oPaAB;Lv2D4RlF4(qH)(<@>R_xU>JAmTle sAM|>9ivI>0&*8{$hx>d>1enRW%Y2?`hfGaQD9d|%HAfdC|M^w&2SZe9TmS$7 diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsProcess/en-US/MSFT_xWindowsProcess.strings.psd1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsProcess/en-US/MSFT_xWindowsProcess.strings.psd1 deleted file mode 100644 index 66d9234c..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xWindowsProcess/en-US/MSFT_xWindowsProcess.strings.psd1 +++ /dev/null @@ -1,36 +0,0 @@ -# Localized resources for MSFT_xWindowsProcess - -ConvertFrom-StringData @' - CouldNotCreateProcessError = Could not create process. Error code: - DuplicateTokenError = Duplicate token. Error code: - FileNotFound = File '{0}' not found in the environment path. - ErrorInvalidUserName = Invalid username: {0}. Username cannot contain multiple '@' or multiple '\' - ErrorParametersNotSupportedWithCredential = Can't specify StandardOutputPath, StandardInputPath or WorkingDirectory when trying to run a process under a local user. - ErrorRunAsCredentialParameterNotSupported = The PsDscRunAsCredential parameter is not supported by the Process resource. To start the process with user '{0}', add the Credential parameter. - ErrorStarting = Failure starting process matching path '{0}'. Message: {1}. - ErrorStopping = Failure stopping processes matching path '{0}' with IDs '({1})'. Message: {2}. - FailureWaitingForProcessesToStart = Failed to wait for processes to start. - FailureWaitingForProcessesToStop = Failed to wait for processes to stop. - GetTargetResourceStartMessage = Begin executing Get functionality for the process {0}. - GetTargetResourceEndMessage = End executing Get functionality for the process {0}. - OpenProcessTokenError = Error while opening process token. Error code: - ParameterShouldNotBeSpecified = Parameter {0} should not be specified. - PathShouldBeAbsolute = The path '{0}' should be absolute for argument '{1}'. - PathShouldExist = The path '{0}' should exist for argument '{1}'. - PrivilegeLookingUpError = Error while looking up privilege. Error code: - ProcessAlreadyStarted = Process matching path '{0}' found running. No action required. - ProcessAlreadyStopped = Process matching path '{0}' not found running. No action required. - ProcessesStarted = Processes matching path '{0}' started. - ProcessesStopped = Processes matching path '{0}' with IDs '({1})' stopped. - RetriveStatusError = Failed to retrieve status. Error code: - SetTargetResourceStartMessage = Begin executing Set functionality for the process {0}. - SetTargetResourceEndMessage = End executing Set functionality for the process {0}. - StartingProcessWhatif = Start-Process. - StoppingProcessWhatIf = Stop-Process. - TestTargetResourceStartMessage = Begin executing Test functionality for the process {0}. - TestTargetResourceEndMessage = End executing Test functionality for the process {0}. - TokenElevationError = Error while getting token elevation. Error code: - UserCouldNotBeLoggedError = User could not be logged. Error code: - WaitFailedError = Failed while waiting for process. Error code: - VerboseInProcessHandle = In process handle {0}. -'@ diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/ResourceSetHelper.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/ResourceSetHelper.psm1 deleted file mode 100644 index 7e1e51f2..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/ResourceSetHelper.psm1 +++ /dev/null @@ -1,248 +0,0 @@ -# This module should not write any verbose or error messages unless a localization file for it is added - -$errorActionPreference = 'Stop' -Set-StrictMode -Version 'Latest' - -<# - .SYNOPSIS - Builds a string of the common parameters shared across all resources in a set. - - .PARAMETER KeyParameterName - The name of the key parameter for the resource. - - .PARAMETER Parameters - The hashtable of all parameters to the resource set (PSBoundParameters). - - .EXAMPLE - $parameters = @{ - KeyParameter = @( 'MyKeyParameter1', 'MyKeyParameter2' ) - CommonParameter1 = 'CommonValue1' - CommonParameter2 = 2 - } - - New-ResourceSetCommonParameterString -KeyParameterName 'KeyParameter' -Parameters $parameters - - OUTPUT (as string): - CommonParameter1 = "CommonValue1"`r`nCommonParameter2 = $CommonParameter2 -#> -function New-ResourceSetCommonParameterString -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $KeyParameterName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [Hashtable] - $Parameters - ) - - $stringBuilder = New-Object -TypeName 'System.Text.StringBuilder' - - foreach ($parameterName in $Parameters.Keys) - { - # All composite resources have an extra parameter 'InstanceName' - if ($parameterName -ine $KeyParameterName -and $parameterName -ine 'InstanceName') - { - $parameterValue = $Parameters[$parameterName] - - if ($null -ne $parameterValue) - { - if ($parameterValue -is [String]) - { - $null = $stringBuilder.AppendFormat('{0} = "{1}"', $parameterName, $parameterValue) - } - else - { - $null = $stringBuilder.Append($parameterName + ' = $' + $parameterName) - } - - $null = $stringBuilder.AppendLine() - } - } - } - - return $stringBuilder.ToString() -} - -<# - .SYNOPSIS - Creates a string representing a configuration script for a set of resources. - - .PARAMETER ResourceName - The name of the resource to create a set of. - - .PARAMETER ModuleName - The name of the module to import the resource from. - - .PARAMETER KeyParameterName - The name of the key parameter that will differentiate each resource. - - .PARAMETER KeyParameterValues - An array of the values of the key parameter that will differentiate each resource. - - .PARAMETER CommonParameterString - A string representing the common parameters for each resource. - Can be retrieved from New-ResourceSetCommonParameterString. - - .EXAMPLE - New-ResourceSetConfigurationString ` - -ResourceName 'xWindowsFeature' ` - -ModuleName 'xPSDesiredStateConfiguration' ` - -KeyParameterName 'Name' ` - -KeyParameterValues @( 'Telnet-Client', 'Web-Server' ) ` - -CommonParameterString 'Ensure = "Present"`r`nIncludeAllSubFeature = $true' - - OUTPUT (as a String): - Import-Module -Name xWindowsFeature -ModuleName xPSDesiredStateConfiguration - - xWindowsFeature Resource0 - { - Name = "Telnet-Client" - Ensure = "Present" - IncludeAllSubFeature = $true - } - - xWindowsFeature Resource1 - { - Name = "Web-Server" - Ensure = "Present" - IncludeAllSubFeature = $true - } -#> -function New-ResourceSetConfigurationString -{ - [OutputType([String])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ResourceName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ModuleName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $KeyParameterName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String[]] - $KeyParameterValues, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $CommonParameterString - ) - - $stringBuilder = New-Object -TypeName 'System.Text.StringBuilder' - - $null = $stringBuilder.AppendFormat('Import-DscResource -Name {0} -ModuleName {1}', $ResourceName, $ModuleName) - $null = $stringBuilder.AppendLine() - - $resourceCount = 0 - foreach ($keyParameterValue in $KeyParameterValues) - { - $null = $stringBuilder.AppendFormat('{0} Resource{1}', $ResourceName, $resourceCount) - $null = $stringBuilder.AppendLine() - $null = $stringBuilder.AppendLine('{') - $null = $stringBuilder.AppendFormat($KeyParameterName + ' = "{0}"', $keyParameterValue) - $null = $stringBuilder.AppendLine() - $null = $stringBuilder.Append($CommonParameterString) - $null = $stringBuilder.AppendLine('}') - - $resourceCount++ - } - - return $stringBuilder.ToString() -} - -<# - .SYNOPSIS - Creates a configuration script block for a set of resources. - - .PARAMETER ResourceName - The name of the resource to create a set of. - - .PARAMETER ModuleName - The name of the module to import the resource from. - - .PARAMETER KeyParameterName - The name of the key parameter that will differentiate each resource. - - .PARAMETER Parameters - The hashtable of all parameters to the resource set (PSBoundParameters). - - .EXAMPLE - # From the xGroupSet composite resource - - $newResourceSetConfigurationParams = @{ - ResourceName = 'xGroup' - ModuleName = 'xPSDesiredStateConfiguration' - KeyParameterName = 'GroupName' - CommonParameterNames = @( 'Ensure', 'MembersToInclude', 'MembersToExclude', 'Credential' ) - Parameters = $PSBoundParameters - } - - $configurationScriptBlock = New-ResourceSetConfigurationScriptBlock @newResourceSetConfigurationParams - - .NOTES - Only allows one key parameter to be defined for each node. - For resources with multiple key parameters, only one key can be different for each resource. - See xProcessSet for an example of a resource set with two key parameters. -#> -function New-ResourceSetConfigurationScriptBlock -{ - [OutputType([ScriptBlock])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ResourceName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ModuleName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $KeyParameterName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [Hashtable] - $Parameters - ) - - $commonParameterString = New-ResourceSetCommonParameterString -KeyParameterName $KeyParameterName -Parameters $Parameters - - $newResourceSetConfigurationStringParams = @{ - ResourceName = $ResourceName - ModuleName = $ModuleName - KeyParameterName = $KeyParameterName - KeyParameterValues = $Parameters[$KeyParameterName] - CommonParameterString = $commonParameterString - } - - $resourceString = New-ResourceSetConfigurationString @newResourceSetConfigurationStringParams - - return [ScriptBlock]::Create($resourceString) -} - -Export-ModuleMember -Function @( 'New-ResourceSetConfigurationScriptBlock' ) diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xFileUpload/xFileUpload.psd1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xFileUpload/xFileUpload.psd1 deleted file mode 100644 index 76adcf9b..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xFileUpload/xFileUpload.psd1 +++ /dev/null @@ -1,89 +0,0 @@ -@{ - -# Script module or binary module file associated with this manifest. -RootModule = 'xFileUpload.schema.psm1' - -# Version number of this module. -ModuleVersion = '1.0' - -# ID used to uniquely identify this module -GUID = '1fbfd112-4272-4fb8-b31c-fb5b417484bc' - -# Author of this module -Author = 'kkaczma' - -# Company or vendor of this module -CompanyName = 'Unknown' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft. All rights reserved.' - -# Description of the functionality provided by this module -# Description = '' - -# Minimum version of the Windows PowerShell engine required by this module -# PowerShellVersion = '' - -# Name of the Windows PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the Windows PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module -# DotNetFrameworkVersion = '' - -# Minimum version of the common language runtime (CLR) required by this module -# CLRVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -# RequiredModules = @() - -# Assemblies that must be loaded prior to importing this module -# RequiredAssemblies = @() - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -# FormatsToProcess = @() - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -# NestedModules = @() - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Variables to export from this module -VariablesToExport = '*' - -# Aliases to export from this module -AliasesToExport = '*' - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess -# PrivateData = '' - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - -} - - diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xFileUpload/xFileUpload.schema.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xFileUpload/xFileUpload.schema.psm1 deleted file mode 100644 index 17c23d33..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xFileUpload/xFileUpload.schema.psm1 +++ /dev/null @@ -1,544 +0,0 @@ -Configuration xFileUpload -{ - <# - .SYNOPSIS - Configuration uploads file or folder to the smb share - .DESCRIPTION - .EXAMPLE - xFileUpload -destinationPath "\\machine\share" -sourcePath "C:\folder\file" -username "domain\user" -password "password" - .PARAMETER destinationPath - Upload destination (has to point to a share or it's existing subfolder) e.g. \\machinename\sharename\destinationfolder - .PARAMETER sourcePath - Upload source e.g. C:\folder\file.txt - .PARAMETER credential - Credentials to access share where file/folder should be uploaded - .PARAMETER certificateThumbprint - Thumbprint of the certificate which should be used for encryption/decryption - .NOTES - #> - - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingConvertToSecureStringWithPlainText", "")] - - param ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $destinationPath, - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $sourcePath, - [PSCredential] - $credential, - [String] - $certificateThumbprint - ) - - $cacheLocation = "$env:ProgramData\Microsoft\Windows\PowerShell\Configuration\BuiltinProvCache\MSFT_xFileUpload" - - if ($credential) - { - $username = $credential.UserName - - # Encrypt password - $password = Invoke-Command -ScriptBlock ([ScriptBlock]::Create($getEncryptedPassword)) -ArgumentList $credential, $certificateThumbprint - - } - - Script FileUpload - { - # Get script is not implemented cause reusing Script resource's schema does not make sense - GetScript = { - $returnValue = @{ - - } - - $returnValue - }; - - SetScript = { - - # Generating credential object if password and username are specified - $credential = $null - if (($using:password) -and ($using:username)) - { - # Validate that certificate thumbprint is specified - if(-not $using:certificateThumbprint) - { - $errorMessage = "Certificate thumbprint has to be specified if credentials are present." - Invoke-Command -ScriptBlock ([ScriptBlock]::Create($using:throwTerminatingError)) -ArgumentList "CertificateThumbprintIsRequired", $errorMessage, "InvalidData" - } - - Write-Debug "Username and password specified." - - # Decrypt password - $decryptedPassword = Invoke-Command -ScriptBlock ([ScriptBlock]::Create($using:getDecryptedPassword)) -ArgumentList $using:password, $using:certificateThumbprint - - # Generate credential - $securePassword = ConvertTo-SecureString $decryptedPassword -AsPlainText -Force - $credential = New-Object System.Management.Automation.PSCredential ($using:username, $securePassword) - } - - # Validate DestinationPath is UNC path - if (!($using:destinationPath -as [System.Uri]).isUnc) - { - $errorMessage = "Destination path $using:destinationPath is not a valid UNC path." - Invoke-Command -ScriptBlock ([ScriptBlock]::Create($using:throwTerminatingError)) -ArgumentList "DestinationPathIsNotUNCFailure", $errorMessage, "InvalidData" - } - - # Verify source is localpath - if (!(($using:sourcePath -as [System.Uri]).Scheme -match "file")) - { - $errorMessage = "Source path $using:sourcePath has to be local path." - Invoke-Command -ScriptBlock ([ScriptBlock]::Create($using:throwTerminatingError)) -ArgumentList "SourcePathIsNotLocalFailure", $errorMessage, "InvalidData" - } - - # Check whether source path is existing file or directory - $sourcePathType = $null - if (!(Test-Path $using:sourcePath)) - { - $errorMessage = "Source path $using:sourcePath does not exist." - Invoke-Command -ScriptBlock ([ScriptBlock]::Create($using:throwTerminatingError)) -ArgumentList "SourcePathDoesNotExistFailure", $errorMessage, "InvalidData" - } - else - { - $item = Get-Item $using:sourcePath - switch ($item.GetType().Name) - { - "FileInfo" { - $sourcePathType = "File" - } - - "DirectoryInfo" { - $sourcePathType = "Directory" - } - } - } - Write-Debug "SourcePath $using:sourcePath is of type: $sourcePathType" - - $psDrive = $null - - # Mount the drive only if credentials are specified and it's currently not accessible - if ($credential) - { - if (Test-Path $using:destinationPath -ErrorAction Ignore) - { - Write-Debug "Destination path $using:destinationPath is already accessible. No mount needed." - } - else - { - $psDriveArgs = @{ Name = ([guid]::NewGuid()); PSProvider = "FileSystem"; Root = $using:destinationPath; Scope = "Private"; Credential = $credential } - try - { - Write-Debug "Create psdrive with destination path $using:destinationPath..." - $psDrive = New-PSDrive @psDriveArgs -ErrorAction Stop - } - catch - { - $errorMessage = "Cannot access destination path $using:destinationPath with given Credential" - Invoke-Command -ScriptBlock ([ScriptBlock]::Create($using:throwTerminatingError)) -ArgumentList "DestinationPathNotAccessibleFailure", $errorMessage, "InvalidData" - } - } - } - - try - { - # Get expected destination path - $expectedDestinationPath = $null - if (!(Test-Path $using:destinationPath)) - { - # DestinationPath has to exist - $errorMessage = "Invalid parameter values: DestinationPath doesn't exist, but has to be existing directory." - Throw-TerminatingError -errorMessage $errorMessage -errorCategory "InvalidData" -errorId "DestinationPathDoesNotExistFailure" - } - else - { - $item = Get-Item $using:destinationPath - switch ($item.GetType().Name) - { - "FileInfo" { - # DestinationPath cannot be file - $errorMessage = "Invalid parameter values: DestinationPath is file, but has to be existing directory." - Invoke-Command -ScriptBlock ([ScriptBlock]::Create($using:throwTerminatingError)) -ArgumentList "DestinationPathCannotBeFileFailure", $errorMessage, "InvalidData" - } - - "DirectoryInfo" { - $expectedDestinationPath = Join-Path $using:destinationPath (Split-Path $using:sourcePath -Leaf) - } - } - Write-Debug "ExpectedDestinationPath is $expectedDestinationPath" - } - - # Copy destination path - try - { - Write-Debug "Copying $using:sourcePath to $using:destinationPath" - Copy-Item -path $using:sourcePath -Destination $using:destinationPath -Recurse -Force -ErrorAction Stop - } - catch - { - $errorMessage = "Couldn't copy source path $using:sourcePath to $using:destinationPath : $($_.Exception)" - Invoke-Command -ScriptBlock ([ScriptBlock]::Create($using:throwTerminatingError)) -ArgumentList "CopyDirectoryOverFileFailure", $errorMessage, "InvalidData" - } - - # Verify whether expectedDestinationPath was created - if (!(Test-Path $expectedDestinationPath)) - { - $errorMessage = "Destination path $using:destinationPath could not be created" - Invoke-Command -ScriptBlock ([ScriptBlock]::Create($using:throwTerminatingError)) -ArgumentList "DestinationPathNotCreatedFailure", $errorMessage, "InvalidData" - } - # If expectedDestinationPath exists - else - { - Write-Verbose "$sourcePathType $expectedDestinationPath has been successfully created" - - # Update cache - $uploadedItem = Get-Item $expectedDestinationPath - $lastWriteTime = $uploadedItem.LastWriteTimeUtc - $inputObject = @{} - $inputObject["LastWriteTimeUtc"] = $lastWriteTime - $key = [string]::Join("", @($using:destinationPath, $using:sourcePath, $expectedDestinationPath)).GetHashCode().ToString() - $path = Join-Path $using:cacheLocation $key - if(-not (Test-Path $using:cacheLocation)) - { - mkdir $using:cacheLocation | Out-Null - } - - Write-Debug "Updating cache for DestinationPath = $using:destinationPath and SourcePath = $using:sourcePath. CacheKey = $key" - Export-CliXml -Path $path -InputObject $inputObject -Force - } - } - finally - { - # Remove PSDrive - if($psDrive) - { - Write-Debug "Removing PSDrive on root $($psDrive.Root)" - Remove-PSDrive $psDrive -Force - } - } - }; - - TestScript = { - - # Generating credential object if password and username are specified - $credential = $null - if (($using:password) -and ($using:username)) - { - # Validate that certificate thumbprint is specified - if(-not $using:certificateThumbprint) - { - $errorMessage = "Certificate thumbprint has to be specified if credentials are present." - Invoke-Command -ScriptBlock ([ScriptBlock]::Create($using:throwTerminatingError)) -ArgumentList "CertificateThumbprintIsRequired", $errorMessage, "InvalidData" - } - - Write-Debug "Username and password specified. Generating credential" - - # Decrypt password - $decryptedPassword = Invoke-Command -ScriptBlock ([ScriptBlock]::Create($using:getDecryptedPassword)) -ArgumentList $using:password, $using:certificateThumbprint - - # Generate credential - $securePassword = ConvertTo-SecureString $decryptedPassword -AsPlainText -Force - $credential = New-Object System.Management.Automation.PSCredential ($using:username, $securePassword) - } - else - { - Write-Debug "No credentials specified" - } - - # Validate DestinationPath is UNC path - if (!($using:destinationPath -as [System.Uri]).isUnc) - { - $errorMessage = "Destination path $using:destinationPath is not a valid UNC path." - Invoke-Command -ScriptBlock ([ScriptBlock]::Create($using:throwTerminatingError)) -ArgumentList "DestinationPathIsNotUNCFailure", $errorMessage, "InvalidData" - - } - - # Check whether source path is existing file or directory (needed for expectedDestinationPath) - $sourcePathType = $null - if (!(Test-Path $using:sourcePath)) - { - $errorMessage = "Source path $using:sourcePath does not exist." - Invoke-Command -ScriptBlock ([ScriptBlock]::Create($using:throwTerminatingError)) -ArgumentList "SourcePathDoesNotExistFailure", $errorMessage, "InvalidData" - } - else - { - $item = Get-Item $using:sourcePath - switch ($item.GetType().Name) - { - "FileInfo" { - $sourcePathType = "File" - } - - "DirectoryInfo" { - $sourcePathType = "Directory" - } - } - } - Write-Debug "SourcePath $using:sourcePath is of type: $sourcePathType" - - $psDrive = $null - - # Mount the drive only if credentials are specified and it's currently not accessible - if ($credential) - { - if (Test-Path $using:destinationPath -ErrorAction Ignore) - { - Write-Debug "Destination path $using:destinationPath is already accessible. No mount needed." - } - else - { - $psDriveArgs = @{ Name = ([guid]::NewGuid()); PSProvider = "FileSystem"; Root = $using:destinationPath; Scope = "Private"; Credential = $credential } - try - { - Write-Debug "Create psdrive with destination path $using:destinationPath..." - $psDrive = New-PSDrive @psDriveArgs -ErrorAction Stop - } - catch - { - $errorMessage = "Cannot access destination path $using:destinationPath with given Credential" - Invoke-Command -ScriptBlock ([ScriptBlock]::Create($using:throwTerminatingError)) -ArgumentList "DestinationPathNotAccessibleFailure", $errorMessage, "InvalidData" - } - } - } - - try - { - # Get expected destination path - $expectedDestinationPath = $null - if (!(Test-Path $using:destinationPath)) - { - # DestinationPath has to exist - $errorMessage = "Invalid parameter values: DestinationPath doesn't exist or is not accessible. DestinationPath has to be existing directory." - Invoke-Command -ScriptBlock ([ScriptBlock]::Create($using:throwTerminatingError)) -ArgumentList "DestinationPathDoesNotExistFailure", $errorMessage, "InvalidData" - } - else - { - $item = Get-Item $using:destinationPath - switch ($item.GetType().Name) - { - "FileInfo" { - # DestinationPath cannot be file - $errorMessage = "Invalid parameter values: DestinationPath is file, but has to be existing directory." - Invoke-Command -ScriptBlock ([ScriptBlock]::Create($using:throwTerminatingError)) -ArgumentList "DestinationPathCannotBeFileFailure", $errorMessage, "InvalidData" - } - - "DirectoryInfo" { - $expectedDestinationPath = Join-Path $using:destinationPath (Split-Path $using:sourcePath -Leaf) - } - } - Write-Debug "ExpectedDestinationPath is $expectedDestinationPath" - } - - # Check whether ExpectedDestinationPath exists and has expected type - $itemExists = $false - if (!(Test-Path $expectedDestinationPath)) - { - Write-Debug "Expected destination path doesn't exist or is not accessible" - } - # If expectedDestinationPath exists - else - { - $expectedItem = Get-Item $expectedDestinationPath - $expectedItemType = $expectedItem.GetType().Name - - # If expectedDestinationPath has same type as sourcePathType, we need to verify cache to determine whether no upload is needed - if ((($expectedItemType -eq "FileInfo") -and ($sourcePathType -eq "File")) -or (($expectedItemType -eq "DirectoryInfo") -and ($sourcePathType -eq "Directory"))) - { - # Get cache - Write-Debug "Getting cache for $expectedDestinationPath" - $cacheContent = $null - $key = [string]::Join("", @($using:destinationPath, $using:sourcePath, $expectedDestinationPath)).GetHashCode().ToString() - $path = Join-Path $using:cacheLocation $key - Write-Debug "Looking for cache under $path" - if (!(Test-Path $path)) - { - Write-Debug "No cache found for DestinationPath = $using:destinationPath and SourcePath = $using:sourcePath. CacheKey = $key" - } - else - { - $cacheContent = Import-CliXml $path - Write-Debug "Found cache for DestinationPath = $using:destinationPath and SourcePath = $using:sourcePath. CacheKey = $key" - } - - # Verify whether cache reflects current state or upload is needed - if ($cacheContent -ne $null -and ($cacheContent.LastWriteTimeUtc -eq $expectedItem.LastWriteTimeUtc)) - { - # No upload needed - Write-Debug "Cache reflects current state. No need for upload." - $itemExists = $true - } - else - { - Write-Debug "Cache is empty or it doesn't reflect current state. Upload will be performed." - } - } - else - { - Write-Debug "Expected destination path: $expectedDestinationPath is of type $expectedItemType, although source path is $sourcePathType" - } - } - } - finally - { - # Remove PSDrive - if($psDrive) - { - Write-Debug "Removing PSDrive on root $($psDrive.Root)" - Remove-PSDrive $psDrive -Force - } - } - - return $itemExists - - }; - } -} - -# Encrypts password using the defined public key -$getEncryptedPassword = @' - param ( - [Parameter(Mandatory = $true)] - [PSCredential] $credential, - [Parameter(Mandatory = $true)] - [String] $certificateThumbprint - ) - - $value = $credential.GetNetworkCredential().Password - - $cert = Invoke-Command -ScriptBlock ([ScriptBlock]::Create($getCertificate)) -ArgumentList $certificateThumbprint - - $encryptedPassword = $null - - if($cert) - { - # Cast the public key correctly - $rsaProvider = [System.Security.Cryptography.RSACryptoServiceProvider]$cert.PublicKey.Key - - if($rsaProvider -eq $null) - { - $errorMessage = "Could not get public key from certificate with thumbprint: $certificateThumbprint . Please verify certificate is valid for encryption." - Invoke-Command -ScriptBlock ([ScriptBlock]::Create($throwTerminatingError)) -ArgumentList "DecryptionCertificateNotFound", $errorMessage, "InvalidOperation" - } - - # Convert to a byte array - $keybytes = [System.Text.Encoding]::UNICODE.GetBytes($value) - - # Add a null terminator to the byte array - $keybytes += 0 - $keybytes += 0 - - # Encrypt using the public key - $encbytes = $rsaProvider.Encrypt($keybytes, $false) - - # Return a string - $encryptedPassword = [Convert]::ToBase64String($encbytes) - } - else - { - $errorMessage = "Could not find certificate which matches thumbprint: $certificateThumbprint . Could not encrypt password" - Invoke-Command -ScriptBlock ([ScriptBlock]::Create($throwTerminatingError)) -ArgumentList "EncryptionCertificateNot", $errorMessage, "InvalidOperation" - } - - return $encryptedPassword -'@ - -# Retrieves certificate by thumbprint -$getCertificate = @' - param( - [Parameter(Mandatory = $true)] - [string] $certificateThumbprint - ) - - $cert = $null - - foreach($certIndex in Get-Childitem cert:\LocalMachine\My) - { - if($certIndex.Thumbprint -match $certificateThumbprint) - { - $cert = $certIndex - break - } - } - - if(-not $cert) - { - $errorMessage = "Error Reading certificate store for {0}. Please verify thumbprint is correct and certificate belongs to cert:\LocalMachine\My store." -f ${certificateThumbprint}; - Invoke-Command -ScriptBlock ([ScriptBlock]::Create($throwTerminatingError)) -ArgumentList "InvalidPathSpecified", $errorMessage, "InvalidOperation" - } - else - { - $cert - } -'@ - -# Throws terminating error specified errorCategory, errorId and errorMessage -$throwTerminatingError = @' - param( - [parameter(Mandatory = $true)] - [System.String] - $errorId, - [parameter(Mandatory = $true)] - [System.String] - $errorMessage, - [parameter(Mandatory = $true)] - $errorCategory - ) - - $exception = New-Object System.InvalidOperationException $errorMessage - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - throw $errorRecord -'@ - -# Decrypts password using the defined private key -$getDecryptedPassword = @' - param ( - [Parameter(Mandatory = $true)] - [String] $value, - [Parameter(Mandatory = $true)] - [String] $certificateThumbprint - ) - - $cert = $null - - foreach($certIndex in Get-Childitem cert:\LocalMachine\My) - { - if($certIndex.Thumbprint -match $certificateThumbprint) - { - $cert = $certIndex - break - } - } - - if(-not $cert) - { - $errorMessage = "Error Reading certificate store for {0}. Please verify thumbprint is correct and certificate belongs to cert:\LocalMachine\My store." -f ${certificateThumbprint}; - $exception = New-Object System.InvalidOperationException $errorMessage - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, "InvalidPathSpecified", "InvalidOperation", $null - throw $errorRecord - } - - $decryptedPassword = $null - - # Get RSA provider - $rsaProvider = [System.Security.Cryptography.RSACryptoServiceProvider]$cert.PrivateKey - - if($rsaProvider -eq $null) - { - $errorMessage = "Could not get private key from certificate with thumbprint: $certificateThumbprint . Please verify certificate is valid for decryption." - $exception = New-Object System.InvalidOperationException $errorMessage - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, "DecryptionCertificateNotFound", "InvalidOperation", $null - throw $errorRecord - } - - # Convert to bytes array - $encBytes = [Convert]::FromBase64String($value) - - # Decrypt bytes - $decryptedBytes = $rsaProvider.Decrypt($encBytes, $false) - - # Convert to string - $decryptedPassword = [System.Text.Encoding]::Unicode.GetString($decryptedBytes) - - return $decryptedPassword -'@ diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xGroupSet/xGroupSet.psd1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xGroupSet/xGroupSet.psd1 deleted file mode 100644 index f206dedf..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xGroupSet/xGroupSet.psd1 +++ /dev/null @@ -1,27 +0,0 @@ -@{ - -# Script module or binary module file associated with this manifest. -RootModule = 'xGroupSet.schema.psm1' - -# Version number of this module. -ModuleVersion = '0.1.0.0' - -# ID used to uniquely identify this module -GUID = 'c5e227b5-52dc-4653-b08f-6d94e06bb90b' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2016 Microsoft. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Configures multiple xGroup resources with common settings but different names.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -} diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xGroupSet/xGroupSet.schema.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xGroupSet/xGroupSet.schema.psm1 deleted file mode 100644 index a5d15433..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xGroupSet/xGroupSet.schema.psm1 +++ /dev/null @@ -1,68 +0,0 @@ -$errorActionPreference = 'Stop' -Set-StrictMode -Version 'Latest' - -# Import ResourceSetHelper for New-ResourceSetConfigurationScriptBlock -$script:dscResourcesFolderFilePath = Split-Path -Path $PSScriptRoot -Parent -$script:resourceSetHelperFilePath = Join-Path -Path $script:dscResourcesFolderFilePath -ChildPath 'ResourceSetHelper.psm1' -Import-Module -Name $script:resourceSetHelperFilePath - -<# - .SYNOPSIS - A composite DSC resource to configure a set of similar xGroup resources. - - .PARAMETER GroupName - An array of the names of the groups to configure. - - .PARAMETER Ensure - Specifies whether or not the set of groups should exist. - - Set this property to Present to create or modify a set of groups. - Set this property to Absent to remove a set of groups. - - .PARAMETER MembersToInclude - The members that should be included in each group in the set. - - .PARAMETER MembersToExclude - The members that should be excluded from each group in the set. - - .PARAMETER Credential - The credential to resolve all groups and user accounts. -#> -Configuration xGroupSet -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String[]] - $GroupName, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure, - - [String[]] - $MembersToInclude, - - [String[]] - $MembersToExclude, - - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - $newResourceSetConfigurationParams = @{ - ResourceName = 'xGroup' - ModuleName = 'xPSDesiredStateConfiguration' - KeyParameterName = 'GroupName' - Parameters = $PSBoundParameters - } - - $configurationScriptBlock = New-ResourceSetConfigurationScriptBlock @newResourceSetConfigurationParams - - # This script block must be run directly in this configuration in order to resolve variables - . $configurationScriptBlock -} diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xProcessSet/xProcessSet.psd1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xProcessSet/xProcessSet.psd1 deleted file mode 100644 index 222858a1..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xProcessSet/xProcessSet.psd1 +++ /dev/null @@ -1,27 +0,0 @@ -@{ - -# Script module or binary module file associated with this manifest. -RootModule = 'xProcessSet.schema.psm1' - -# Version number of this module. -ModuleVersion = '0.1.0.0' - -# ID used to uniquely identify this module -GUID = '0cb71def-366f-4f3b-88a9-b9b37d266dd6' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2016 Microsoft. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Provides a mechanism to configure and manage multiple xWindowsProcess resources on a target node.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -} diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xProcessSet/xProcessSet.schema.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xProcessSet/xProcessSet.schema.psm1 deleted file mode 100644 index 803ceef9..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xProcessSet/xProcessSet.schema.psm1 +++ /dev/null @@ -1,96 +0,0 @@ -$errorActionPreference = 'Stop' -Set-StrictMode -Version 'Latest' - -# Import ResourceSetHelper for New-ResourceSetConfigurationScriptBlock -$script:dscResourcesFolderFilePath = Split-Path -Path $PSScriptRoot -Parent -$script:resourceSetHelperFilePath = Join-Path -Path $script:dscResourcesFolderFilePath -ChildPath 'ResourceSetHelper.psm1' -Import-Module -Name $script:resourceSetHelperFilePath - -<# - .SYNOPSIS - A composite DSC resource to configure a set of similar xWindowsProcess resources. - No arguments can be passed into these xWindowsProcess resources. - - .PARAMETER Path - The file paths to the executables of the processes to start or stop. Only the names of the - files may be specified if they are all accessible through the environment path. Relative - paths are not supported. - - .PARAMETER Ensure - Specifies whether or not the processes should exist. - - To start processes, set this property to Present. - To stop processes, set this property to Absent. - - .PARAMETER Credential - The credential of the user account to start the processes under. - - .PARAMETER StandardOutputPath - The file path to write the standard output to. Any existing file at this path - will be overwritten.This property cannot be specified at the same time as Credential - when running the processes as a local user. - - .PARAMETER StandardErrorPath - The file path to write the standard error output to. Any existing file at this path - will be overwritten. - - .PARAMETER StandardInputPath - The file path to get standard input from. This property cannot be specified at the - same time as Credential when running the processes as a local user. - - .PARAMETER WorkingDirectory - The file path to use as the working directory for the processes. Any existing file - at this path will be overwritten. This property cannot be specified at the same time - as Credential when running the processes as a local user. -#> -Configuration xProcessSet -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String[]] - $Path, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure, - - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [ValidateNotNullOrEmpty()] - [String] - $StandardOutputPath, - - [ValidateNotNullOrEmpty()] - [String] - $StandardErrorPath, - - [ValidateNotNullOrEmpty()] - [String] - $StandardInputPath, - - [ValidateNotNullOrEmpty()] - [String] - $WorkingDirectory - ) - - $newResourceSetConfigurationParams = @{ - ResourceName = 'xWindowsProcess' - ModuleName = 'xPSDesiredStateConfiguration' - KeyParameterName = 'Path' - Parameters = $PSBoundParameters - } - - # Arguments is a key parameter in xWindowsProcess resource. Adding it as a common parameter with an empty value string - $newResourceSetConfigurationParams['Parameters']['Arguments'] = '' - - $configurationScriptBlock = New-ResourceSetConfigurationScriptBlock @newResourceSetConfigurationParams - - # This script block must be run directly in this configuration in order to resolve variables - . $configurationScriptBlock -} diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xServiceSet/xServiceSet.psd1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xServiceSet/xServiceSet.psd1 deleted file mode 100644 index d848273f..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xServiceSet/xServiceSet.psd1 +++ /dev/null @@ -1,27 +0,0 @@ -@{ - -# Script module or binary module file associated with this manifest. -RootModule = 'xServiceSet.schema.psm1' - -# Version number of this module. -ModuleVersion = '0.1.0.0' - -# ID used to uniquely identify this module -GUID = 'c3ac5e1f-c1fd-4ed0-be24-b271c7062484' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2016 Microsoft. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Allows starting, stopping and change in state or account type for a group of services.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -} diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xServiceSet/xServiceSet.schema.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xServiceSet/xServiceSet.schema.psm1 deleted file mode 100644 index b3f2bec6..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xServiceSet/xServiceSet.schema.psm1 +++ /dev/null @@ -1,89 +0,0 @@ -$errorActionPreference = 'Stop' -Set-StrictMode -Version 'Latest' - -# Import ResourceSetHelper for New-ResourceSetConfigurationScriptBlock -$script:dscResourcesFolderFilePath = Split-Path -Path $PSScriptRoot -Parent -$script:resourceSetHelperFilePath = Join-Path -Path $script:dscResourcesFolderFilePath -ChildPath 'ResourceSetHelper.psm1' -Import-Module -Name $script:resourceSetHelperFilePath - -<# - .SYNOPSIS - A composite DSC resource to configure a set of similar xService resources. - - .PARAMETER Name - An array of the names of the services to configure. - - .PARAMETER Ensure - Specifies whether or not the set of services should exist. - - Set this property to Present to modify a set of services. - Set this property to Absent to remove a set of services. - - .PARAMETER StartupType - The startup type each service in the set should have. - - .PARAMETER BuiltInAccount - The built-in account each service in the set should start under. - - Cannot be specified at the same time as Credential. - - The user account specified by this property must have access to the service - executable paths in order to start the services. - - .PARAMETER State - The state each service in the set should be in. - From the default value defined in xService, the default will be Running. - - .PARAMETER Credential - The credential of the user account each service in the set should start under. - - Cannot be specified at the same time as BuiltInAccount. - - The user specified by this credential will automatically be granted the Log on as a Service - right. The user account specified by this property must have access to the service - executable paths in order to start the services. -#> -Configuration xServiceSet -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String[]] - $Name, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure, - - [ValidateSet('Automatic', 'Manual', 'Disabled')] - [String] - $StartupType, - - [ValidateSet('LocalSystem', 'LocalService', 'NetworkService')] - [String] - $BuiltInAccount, - - [ValidateSet('Running', 'Stopped', 'Ignore')] - [String] - $State, - - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential - ) - - $newResourceSetConfigurationParams = @{ - ResourceName = 'xService' - ModuleName = 'xPSDesiredStateConfiguration' - KeyParameterName = 'Name' - Parameters = $PSBoundParameters - } - - $configurationScriptBlock = New-ResourceSetConfigurationScriptBlock @newResourceSetConfigurationParams - - # This script block must be run directly in this configuration in order to resolve variables - . $configurationScriptBlock -} diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xWindowsFeatureSet/xWindowsFeatureSet.psd1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xWindowsFeatureSet/xWindowsFeatureSet.psd1 deleted file mode 100644 index 6849d994..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xWindowsFeatureSet/xWindowsFeatureSet.psd1 +++ /dev/null @@ -1,27 +0,0 @@ -@{ - -# Script module or binary module file associated with this manifest. -RootModule = 'xWindowsFeatureSet.schema.psm1' - -# Version number of this module. -ModuleVersion = '0.1.0.0' - -# ID used to uniquely identify this module -GUID = 'b18a27e2-f710-4a4a-92b8-6cd076970eb2' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2016 Microsoft. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Provides a mechanism to configure and manage multiple xWindowsFeature resources on a target node.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -} diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xWindowsFeatureSet/xWindowsFeatureSet.schema.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xWindowsFeatureSet/xWindowsFeatureSet.schema.psm1 deleted file mode 100644 index 017b3a66..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xWindowsFeatureSet/xWindowsFeatureSet.schema.psm1 +++ /dev/null @@ -1,78 +0,0 @@ -$errorActionPreference = 'Stop' -Set-StrictMode -Version 'Latest' - -# Import ResourceSetHelper for New-ResourceSetConfigurationScriptBlock -$script:dscResourcesFolderFilePath = Split-Path -Path $PSScriptRoot -Parent -$script:resourceSetHelperFilePath = Join-Path -Path $script:dscResourcesFolderFilePath -ChildPath 'ResourceSetHelper.psm1' -Import-Module -Name $script:resourceSetHelperFilePath - -<# - .SYNOPSIS - A composite DSC resource to configure a set of similar xWindowsFeature resources. - - .PARAMETER Name - The name of the roles or features to install or uninstall. - - .PARAMETER Ensure - Specifies whether the roles or features should be installed or uninstalled. - - To install the features, set this property to Present. - To uninstall the features, set this property to Absent. - - .PARAMETER IncludeAllSubFeature - Specifies whether or not all subfeatures should be installed or uninstalled alongside the specified roles or features. - - If this property is true and Ensure is set to Present, all subfeatures will be installed. - If this property is false and Ensure is set to Present, subfeatures will not be installed or uninstalled. - If Ensure is set to Absent, all subfeatures will be uninstalled. - - .PARAMETER Credential - The credential of the user account under which to install or uninstall the roles or features. - - .PARAMETER LogPath - The custom file path to which to log this operation. - If not passed in, the default log path will be used (%windir%\logs\ServerManager.log). -#> -Configuration xWindowsFeatureSet -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String[]] - $Name, - - [ValidateSet('Present', 'Absent')] - [String] - $Ensure, - - [ValidateNotNullOrEmpty()] - [String] - $Source, - - [Boolean] - $IncludeAllSubFeature, - - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [ValidateNotNullOrEmpty()] - [String] - $LogPath - ) - - $newResourceSetConfigurationParams = @{ - ResourceName = 'xWindowsFeature' - ModuleName = 'xPSDesiredStateConfiguration' - KeyParameterName = 'Name' - Parameters = $PSBoundParameters - } - - $configurationScriptBlock = New-ResourceSetConfigurationScriptBlock @newResourceSetConfigurationParams - - # This script block must be run directly in this configuration in order to resolve variables - . $configurationScriptBlock -} diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xWindowsOptionalFeatureSet/xWindowsOptionalFeatureSet.psd1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xWindowsOptionalFeatureSet/xWindowsOptionalFeatureSet.psd1 deleted file mode 100644 index 4a4942fc..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xWindowsOptionalFeatureSet/xWindowsOptionalFeatureSet.psd1 +++ /dev/null @@ -1,27 +0,0 @@ -@{ - -# Script module or binary module file associated with this manifest. -RootModule = 'xWindowsOptionalFeatureSet.schema.psm1' - -# Version number of this module. -ModuleVersion = '0.1.0.0' - -# ID used to uniquely identify this module -GUID = 'a88c1458-db46-402c-947b-7d43ab57e27a' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2016 Microsoft. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Provides a mechanism to configure and manage multiple xWindowsOptionalFeature resources on a target node.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -} diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xWindowsOptionalFeatureSet/xWindowsOptionalFeatureSet.schema.psm1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xWindowsOptionalFeatureSet/xWindowsOptionalFeatureSet.schema.psm1 deleted file mode 100644 index 6e1b65d6..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/DSCResources/xWindowsOptionalFeatureSet/xWindowsOptionalFeatureSet.schema.psm1 +++ /dev/null @@ -1,77 +0,0 @@ -$errorActionPreference = 'Stop' -Set-StrictMode -Version 'Latest' - -# Import ResourceSetHelper for New-ResourceSetConfigurationScriptBlock -$script:dscResourcesFolderFilePath = Split-Path -Path $PSScriptRoot -Parent -$script:resourceSetHelperFilePath = Join-Path -Path $script:dscResourcesFolderFilePath -ChildPath 'ResourceSetHelper.psm1' -Import-Module -Name $script:resourceSetHelperFilePath - -<# - .SYNOPSIS - A composite DSC resource to configure a set of similar xWindowsOptionalFeature resources. - - .PARAMETER Name - The names of the Windows optional features to enable or disable. - - .PARAMETER Ensure - Specifies whether the features should be enabled or disabled. - - To enable a set of features, set this property to Present. - To disable a set of features, set this property to Absent. - - .PARAMETER RemoveFilesOnDisable - Specifies whether or not to remove all files associated with the features when they are - disabled. - - .PARAMETER NoWindowsUpdateCheck - Specifies whether or not DISM should contact Windows Update (WU) when searching for the - source files to restore Windows optional features on an online image. - - .PARAMETER LogPath - The file path to which to log the opertation. - - .PARAMETER LogLevel - The level of detail to include in the log. -#> -Configuration xWindowsOptionalFeatureSet -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String[]] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateSet('Present', 'Absent')] - [String] - $Ensure, - - [Boolean] - $RemoveFilesOnDisable, - - [Boolean] - $NoWindowsUpdateCheck, - - [ValidateNotNullOrEmpty()] - [String] - $LogPath, - - [ValidateSet('ErrorsOnly', 'ErrorsAndWarning', 'ErrorsAndWarningAndInformation')] - [String] - $LogLevel - ) - - $newResourceSetConfigurationParams = @{ - ResourceName = 'xWindowsOptionalFeature' - ModuleName = 'xPSDesiredStateConfiguration' - KeyParameterName = 'Name' - Parameters = $PSBoundParameters - } - - $configurationScriptBlock = New-ResourceSetConfigurationScriptBlock @newResourceSetConfigurationParams - - # This script block must be run directly in this configuration in order to resolve variables - . $configurationScriptBlock -} diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/LICENSE b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/ResourceDesignerScripts/GenerateXRemoteFileSchema.ps1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/ResourceDesignerScripts/GenerateXRemoteFileSchema.ps1 deleted file mode 100644 index 6ba3a5ff..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/ResourceDesignerScripts/GenerateXRemoteFileSchema.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$DestinationPath = New-xDscResourceProperty -Name DestinationPath -Type String -Attribute Key -Description 'Path under which downloaded or copied file should be accessible after operation.' -$Uri = New-xDscResourceProperty -Name Uri -Type String -Attribute Required -Description 'Uri of a file which should be copied or downloaded. This parameter supports HTTP and HTTPS values.' -$Headers = New-xDscResourceProperty -Name Headers -Type Hashtable[] -Attribute Write -Description 'Headers of the web request.' -$UserAgent = New-xDscResourceProperty -Name UserAgent -Type String -Attribute Write -Description 'User agent for the web request.' -$Ensure = New-xDscResourceProperty -Name Ensure -Type String -Attribute Read -ValidateSet "Present", "Absent" -Description 'Says whether DestinationPath exists on the machine' -$Credential = New-xDscResourceProperty -Name Credential -Type PSCredential -Attribute Write -Description 'Specifies a user account that has permission to send the request.' -#$CertificateThumbprint = New-xDscResourceProperty -Name CertificateThumbprint -Type String -Attribute Write -Description 'Digital public key certificate that is used to send the request.' - -New-xDscResource -Name MSFT_xRemoteFile -Property @($DestinationPath, $Uri, $Headers, $UserAgent, $Ensure, $Credential, $CertificateThumbprint) -ModuleName xPSDesiredStateConfiguration2 -FriendlyName xRemoteFile - diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/ResourceDesignerScripts/New-PSSessionConfigurationResource.ps1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/ResourceDesignerScripts/New-PSSessionConfigurationResource.ps1 deleted file mode 100644 index 629a8a21..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/ResourceDesignerScripts/New-PSSessionConfigurationResource.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -Import-Module -Name 'xDSCResourceDesigner' - -$resProperties = @{ - Name = New-xDscResourceProperty -Description 'Name of the PS Remoting Endpoint' ` - -Name Name -Type String -Attribute Key - RunAsCred = New-xDscResourceProperty -Description 'Credential for Running under different user context' ` - -Name RunAsCredential -Type PSCredential -Attribute Write - SDDL = New-xDscResourceProperty -Description 'SDDL for allowed users to connect to this endpoint. 'Default' means the default SDDL' ` - -Name SecurityDescriptorSDDL -Type String -Attribute Write - StartupScript = New-xDscResourceProperty -Description 'Path for the startup script. Empty string clears the value'` - -Name StartupScriptPath -Type String -Attribute Write - Ensure = New-xDscResourceProperty -Description 'Whether to create the endpoint or delete it' ` - -Name Ensure -Type String -Attribute Write -ValidateSet 'Present','Absent' - AccessMode = New-xDscResourceProperty -Description 'Whether the endpoint is remotely accessible or has local access only or no access' ` - -Name AccessMode -Type String -Attribute Write -ValidateSet 'Local','Remote', 'Disabled' -} - -New-xDscResource -Name MSFT_xPSSessionConfiguration -Property $resProperties.Values -Path $home\desktop -ModuleName xPSDesiredStateConfiguration -FriendlyName xPSEndpoint -Force diff --git a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/xPSDesiredStateConfiguration.psd1 b/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/xPSDesiredStateConfiguration.psd1 deleted file mode 100644 index d99d7005..00000000 --- a/lib/puppet_x/dsc_resources/xPSDesiredStateConfiguration/xPSDesiredStateConfiguration.psd1 +++ /dev/null @@ -1,79 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '7.0.0.0' - -# ID used to uniquely identify this module -GUID = 'cc8dc021-fa5f-4f96-8ecf-dfd68a6d9d48' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'The xPSDesiredStateConfiguration module is a part of the Windows PowerShell Desired State Configuration (DSC) Resource Kit, which is a collection of DSC Resources produced by the PowerShell Team. This module contains the xDscWebService, xWindowsProcess, xService, xPackage, xArchive, xRemoteFile, xPSEndpoint and xWindowsOptionalFeature resources. Please see the Details section for more information on the functionalities provided by these resources. - -All of the resources in the DSC Resource Kit are provided AS IS, and are not supported through any Microsoft standard support program or service. The "x" in xPSDesiredStateConfiguration stands for experimental, which means that these resources will be fix forward and monitored by the module owner(s).' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -#Root module -RootModule = 'DSCPullServerSetup\PublishModulesAndMofsToPullServer.psm1' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xPSDesiredStateConfiguration/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xPSDesiredStateConfiguration' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* xService - * BREAKING CHANGE: The service will now return as compliant if the service is not installed and the StartupType is set to Disabled regardless of the value of the Ensure property. -* Fixed misnamed certificate thumbprint variable in example Sample_xDscWebServiceRegistrationWithSecurityBestPractices - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - - - - - - - - - - - - - - - diff --git a/lib/puppet_x/dsc_resources/xPendingReboot/DSCResources/MSFT_xPendingReboot/MSFT_xPendingReboot.psm1 b/lib/puppet_x/dsc_resources/xPendingReboot/DSCResources/MSFT_xPendingReboot/MSFT_xPendingReboot.psm1 deleted file mode 100644 index 2b2695d4..00000000 --- a/lib/puppet_x/dsc_resources/xPendingReboot/DSCResources/MSFT_xPendingReboot/MSFT_xPendingReboot.psm1 +++ /dev/null @@ -1,135 +0,0 @@ -Function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([Hashtable])] - param - ( - [Parameter(Mandatory=$true)] - [string]$Name, - - [Parameter()] - [bool]$SkipCcmClientSDK - ) - - $ComponentBasedServicingKeys = (Get-ChildItem 'hklm:SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\').Name - if ($ComponentBasedServicingKeys) - { - $ComponentBasedServicing = $ComponentBasedServicingKeys.Split("\") -contains "RebootPending" - } - else - { - $ComponentBasedServicing = $false - } - - $WindowsUpdateKeys = (Get-ChildItem 'hklm:SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\').Name - if ($WindowsUpdateKeys) - { - $WindowsUpdate = $WindowsUpdateKeys.Split("\") -contains "RebootRequired" - } - else - { - $WindowsUpdate = $false - } - - $PendingFileRename = (Get-ItemProperty 'hklm:\SYSTEM\CurrentControlSet\Control\Session Manager\').PendingFileRenameOperations.Length -gt 0 - $ActiveComputerName = (Get-ItemProperty 'hklm:\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName').ComputerName - $PendingComputerName = (Get-ItemProperty 'hklm:\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName').ComputerName - $PendingComputerRename = $ActiveComputerName -ne $PendingComputerName - - - - if (-not $SkipCcmClientSDK) - { - $CCMSplat = @{ - NameSpace='ROOT\ccm\ClientSDK' - Class='CCM_ClientUtilities' - Name='DetermineIfRebootPending' - ErrorAction='Stop' - } - - Try { - $CCMClientSDK = Invoke-WmiMethod @CCMSplat - } - Catch - { - Write-Warning "Unable to query CCM_ClientUtilities: $_" - } - } - - $SCCMSDK = ($CCMClientSDK.ReturnValue -eq 0) -and ($CCMClientSDK.IsHardRebootPending -or $CCMClientSDK.RebootPending) - - return @{ - Name = $Name - ComponentBasedServicing = $ComponentBasedServicing - WindowsUpdate = $WindowsUpdate - PendingFileRename = $PendingFileRename - PendingComputerRename = $PendingComputerRename - CcmClientSDK = $SCCMSDK - } -} - -Function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory=$true)] - [string]$Name, - [bool]$SkipComponentBasedServicing, - [bool]$SkipWindowsUpdate, - [bool]$SkipPendingFileRename, - [bool]$SkipPendingComputerRename, - [bool]$SkipCcmClientSDK - ) - - $global:DSCMachineStatus = 1 -} - -Function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [Parameter(Mandatory=$true)] - [string]$Name, - [bool]$SkipComponentBasedServicing, - [bool]$SkipWindowsUpdate, - [bool]$SkipPendingFileRename, - [bool]$SkipPendingComputerRename, - [bool]$SkipCcmClientSDK - ) - - $status = Get-TargetResource $Name -SkipCcmClientSDK $SkipCcmClientSDK - - if(-not $SkipComponentBasedServicing -and $status.ComponentBasedServicing) - { - Write-Verbose 'Pending component based servicing reboot found.' - return $false - } - - if(-not $SkipWindowsUpdate -and $status.WindowsUpdate) - { - Write-Verbose 'Pending Windows Update reboot found.' - return $false - } - - if(-not $SkipPendingFileRename -and $status.PendingFileRename) - { - Write-Verbose 'Pending file rename found.' - return $false - } - - if(-not $SkipPendingComputerRename -and $status.PendingComputerRename) - { - Write-Verbose 'Pending computer rename found.' - return $false - } - - Write-Verbose 'No pending reboots found.' - return $true -} - -Export-ModuleMember -Function *-TargetResource - -$regRebootLocations = $null diff --git a/lib/puppet_x/dsc_resources/xPendingReboot/DSCResources/MSFT_xPendingReboot/MSFT_xPendingReboot.schema.mof b/lib/puppet_x/dsc_resources/xPendingReboot/DSCResources/MSFT_xPendingReboot/MSFT_xPendingReboot.schema.mof deleted file mode 100644 index 9e358692..00000000 --- a/lib/puppet_x/dsc_resources/xPendingReboot/DSCResources/MSFT_xPendingReboot/MSFT_xPendingReboot.schema.mof +++ /dev/null @@ -1,20 +0,0 @@ -[ClassVersion("0.1.0.0"), FriendlyName("xPendingReboot")] -class MSFT_xPendingReboot : OMI_BaseResource -{ - [key, Description("Name of this pending reboot check")] string Name; - [write, Description("Specifies whether to skip reboots triggered by the Component-Based Servicing component")] boolean SkipComponentBasedServicing; - [read, Description("A value indicating whether the Component-Based Servicing component requested a reboot")] boolean ComponentBasedServicing; - - [write, Description("Specifies whether to skip reboots triggered by Windows Update")] boolean SkipWindowsUpdate; - [read, Description("A value indicating whether Windows Update requested a reboot")] boolean WindowsUpdate; - - [write, Description("Specifies whether to skip pending file rename reboots")] boolean SkipPendingFileRename; - [read, Description("A value indicating whether a pending file rename triggered a reboot")] boolean PendingFileRename; - - [write, Description("Specifies whether to skip reboots triggered by a pending computer rename")] boolean SkipPendingComputerRename; - [read, Description("A value indicating whether a pending computer rename triggered a reboot")] boolean PendingComputerRename; - - [write, Description("Specifies whether to skip reboots triggered by the ConfigMgr client")] boolean SkipCcmClientSDK; - [read, Description("A value indicating whether the ConfigMgr client triggered a reboot")] boolean CcmClientSDK; -}; - diff --git a/lib/puppet_x/dsc_resources/xPendingReboot/LICENSE b/lib/puppet_x/dsc_resources/xPendingReboot/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xPendingReboot/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xPendingReboot/xPendingReboot.psd1 b/lib/puppet_x/dsc_resources/xPendingReboot/xPendingReboot.psd1 deleted file mode 100644 index 421a09a4..00000000 --- a/lib/puppet_x/dsc_resources/xPendingReboot/xPendingReboot.psd1 +++ /dev/null @@ -1,57 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '0.3.0.0' - -# ID used to uniquely identify this module -GUID = '21430f59-750c-4c3c-bb93-4633b5b784c8' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'This module identifies pending reboots in Windows Server and acts on them.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xPendingReboot/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xPendingReboot' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - # ReleaseNotes = '' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - - diff --git a/lib/puppet_x/dsc_resources/xPhp/DscResources/xPhpProvision/xPhpProvision.Schema.psm1 b/lib/puppet_x/dsc_resources/xPhp/DscResources/xPhpProvision/xPhpProvision.Schema.psm1 deleted file mode 100644 index 6b21ace8..00000000 --- a/lib/puppet_x/dsc_resources/xPhp/DscResources/xPhpProvision/xPhpProvision.Schema.psm1 +++ /dev/null @@ -1,140 +0,0 @@ -# Composite configuration to install the IIS pre-requisites for php -Configuration IisPreReqs_php -{ - param - ( - [Parameter(Mandatory = $true)] - [Validateset("Present","Absent")] - [String] - $Ensure - ) - - foreach ($Feature in @("Web-Server","Web-Mgmt-Tools","web-Default-Doc","Web-Dir-Browsing","Web-Http-Errors","Web-Static-Content",` - "Web-Http-Logging","web-Stat-Compression","web-Filtering",` - "web-CGI","web-ISAPI-Ext","web-ISAPI-Filter")) - { - WindowsFeature "$Feature$Number" - { - Ensure = $Ensure - Name = $Feature - } - } -} - -# Composite configuration to install PHP on IIS -configuration xPhpProvision -{ - param( - [Parameter(Mandatory = $true)] - [switch] $installMySqlExt, - - [string] $PackageFolder = 'c:\package', - - [Parameter(Mandatory = $true)] - [string] $DownloadUri, - - [string] $Vc2012RedistDownloadUri = 'http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe', - - [String] $DestinationPath = 'C:\php', - - [Parameter(Mandatory = $true)] - [string] $ConfigurationPath - ) - Import-DscResource -module xPsDesiredStateConfiguration - Import-DscResource -module xWebAdministration - - # Make sure the IIS Prerequisites for PHP are present - IisPreReqs_php Iis - { - Ensure = "Present" - - # Removed because this dependency does not work in Windows Server 2012 R2 and below - # This should work in WMF v5 and above - # DependsOn = "[File]PackagesFolder" - } - - # Download and install Visual C Redist2012 from chocolatey.org - Package vcRedist - { - Path = $Vc2012RedistDownloadUri - ProductId = "{CF2BEA3C-26EA-32F8-AA9B-331F7E34BA97}" - Name = "Microsoft Visual C++ 2012 x64 Minimum Runtime - 11.0.61030" - Arguments = "/install /passive /norestart" - } - - $phpZip = Join-Path $PackageFolder "php.zip" - - $phpDownloadUri = New-Object -TypeName System.Uri $DownloadURI - $archiveDependsOn = @() - if($phpDownloadUri.scheme -ieq "http") - { - # Make sure the PHP archine is in the package folder - xRemoteFile phpArchive - { - uri = $DownloadURI - DestinationPath = $phpZip - } - $archiveDependsOn += "[xRemoteFile]phpArchive" - } - else - { - $phpZip = $DownloadURI - } - - # Make sure the content of the PHP archine are in the PHP path - Archive php - { - Path = $phpZip - Destination = $DestinationPath - DependsOn = $archiveDependsOn - } - - if ($installMySqlExt ) - { - # Make sure the MySql extention for PHP is in the main PHP path - File phpMySqlExt - { - SourcePath = "$($DestinationPath)\ext\php_mysql.dll" - DestinationPath = "$($DestinationPath)\php_mysql.dll" - Ensure = "Present" - DependsOn = @("[Archive]PHP") - MatchSource = $true - } - } - - - # Make sure the php.ini is in the Php folder - File PhpIni - { - SourcePath = $ConfigurationPath - DestinationPath = "$($DestinationPath)\php.ini" - DependsOn = @("[Archive]PHP") - MatchSource = $true - } - - - # Make sure the php cgi module is registered with IIS - xIisModule phpHandler - { - Name = "phpFastCgi" - Path = "$($DestinationPath)\php-cgi.exe" - RequestPath = "*.php" - Verb = "*" - Ensure = "Present" - DependsOn = @("[Package]vcRedist","[File]PhpIni") - - # Removed because this dependency does not work in Windows Server 2012 R2 and below - # This should work in WMF v5 and above - # "[IisPreReqs_php]Iis" - } - - # Make sure the php binary folder is in the path - Environment PathPhp - { - Name = "Path" - Value = ";$($DestinationPath)" - Ensure = "Present" - Path = $true - DependsOn = "[Archive]PHP" - } -} diff --git a/lib/puppet_x/dsc_resources/xPhp/DscResources/xPhpProvision/xPhpProvision.psd1 b/lib/puppet_x/dsc_resources/xPhp/DscResources/xPhpProvision/xPhpProvision.psd1 deleted file mode 100644 index 8a07ca4d..00000000 --- a/lib/puppet_x/dsc_resources/xPhp/DscResources/xPhpProvision/xPhpProvision.psd1 +++ /dev/null @@ -1,94 +0,0 @@ -# -# Module manifest for module 'xPhpProvision' -# -# Generated on: 6/23/2014 -# - -@{ - -# Script module or binary module file associated with this manifest. -RootModule = 'xPhpProvision.Schema.psm1' - -# Version number of this module. -ModuleVersion = '1.0' - -# ID used to uniquely identify this module -GUID = 'fa278449-b3b6-49be-a776-558674ea02d0' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft. All rights reserved.' - -# Description of the functionality provided by this module -# Description = '' - -# Minimum version of the Windows PowerShell engine required by this module -# PowerShellVersion = '' - -# Name of the Windows PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the Windows PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module -# DotNetFrameworkVersion = '' - -# Minimum version of the common language runtime (CLR) required by this module -# CLRVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -# RequiredModules = @() - -# Assemblies that must be loaded prior to importing this module -# RequiredAssemblies = @() - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -# FormatsToProcess = @() - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -# NestedModules = @() - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Variables to export from this module -VariablesToExport = '*' - -# Aliases to export from this module -AliasesToExport = '*' - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess -# PrivateData = '' - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - -} - diff --git a/lib/puppet_x/dsc_resources/xPhp/LICENSE b/lib/puppet_x/dsc_resources/xPhp/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xPhp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xPhp/xPhp.psd1 b/lib/puppet_x/dsc_resources/xPhp/xPhp.psd1 deleted file mode 100644 index 80247edb..00000000 --- a/lib/puppet_x/dsc_resources/xPhp/xPhp.psd1 +++ /dev/null @@ -1,97 +0,0 @@ -# -# Module manifest for module 'xPhp' -# -# -# Generated on: 6/23/2014 -# - -@{ - -# Script module or binary module file associated with this manifest. -#RootModule = '' - -# Version number of this module. -ModuleVersion = '1.1.0.0' - -# ID used to uniquely identify this module -GUID = 'a7e316cc-d538-4c67-b72c-c89c8fc013cd' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module for configuring PHP' - -# Minimum version of the Windows PowerShell engine required by this module -# PowerShellVersion = '' - -# Name of the Windows PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the Windows PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module -# DotNetFrameworkVersion = '' - -# Minimum version of the common language runtime (CLR) required by this module -# CLRVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -# RequiredModules = @() - -# Assemblies that must be loaded prior to importing this module -# RequiredAssemblies = @() - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -# FormatsToProcess = @() - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -# NestedModules = @() - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Variables to export from this module -VariablesToExport = '*' - -# Aliases to export from this module -AliasesToExport = '*' - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess -# PrivateData = '' - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - -} - - - diff --git a/lib/puppet_x/dsc_resources/xPowerShellExecutionPolicy/DSCResources/MSFT_xPowerShellExecutionPolicy/MSFT_xPowerShellExecutionPolicy.psm1 b/lib/puppet_x/dsc_resources/xPowerShellExecutionPolicy/DSCResources/MSFT_xPowerShellExecutionPolicy/MSFT_xPowerShellExecutionPolicy.psm1 deleted file mode 100644 index 0779375f..00000000 --- a/lib/puppet_x/dsc_resources/xPowerShellExecutionPolicy/DSCResources/MSFT_xPowerShellExecutionPolicy/MSFT_xPowerShellExecutionPolicy.psm1 +++ /dev/null @@ -1,78 +0,0 @@ -#--------------------------------------------------------------------------------- #The sample scripts are not supported under any Microsoft standard support #program or service. The sample scripts are provided AS IS without warranty #of any kind. Microsoft further disclaims all implied warranties including, #without limitation, any implied warranties of merchantability or of fitness for #a particular purpose. The entire risk arising out of the use or performance of #the sample scripts and documentation remains with you. In no event shall #Microsoft, its authors, or anyone else involved in the creation, production, or #delivery of the scripts be liable for any damages whatsoever (including, #without limitation, damages for loss of business profits, business interruption, #loss of business information, or other pecuniary loss) arising out of the use #of or inability to use the sample scripts or documentation, even if Microsoft #has been advised of the possibility of such damages #--------------------------------------------------------------------------------- - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Bypass","Restricted","AllSigned","RemoteSigned","Unrestricted")] - [System.String] - $ExecutionPolicy - ) - - #Gets the execution policies for the current session. - $returnValue = @{ExecutionPolicy = $(Get-ExecutionPolicy)} - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding(SupportsShouldProcess=$true)] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Bypass","Restricted","AllSigned","RemoteSigned","Unrestricted")] - [System.String] - $ExecutionPolicy - ) - - If($PSCmdlet.ShouldProcess("$ExecutionPolicy","Set-ExecutionPolicy")) - { - Try - { - Write-Verbose "Setting the execution policy of PowerShell." - Set-ExecutionPolicy -ExecutionPolicy $ExecutionPolicy -Force -ErrorAction Stop - } - Catch - { - if($_.toString() -like "Windows PowerShell updated your execution policy successfully*") # trap this error, it set correctlly. - { - Write-Verbose "$_" - } - else - { - throw - } - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Bypass","Restricted","AllSigned","RemoteSigned","Unrestricted")] - [System.String] - $ExecutionPolicy - ) - - If($(Get-ExecutionPolicy) -eq $ExecutionPolicy) - { - return $true - } - else - { - return $false - } -} - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xPowerShellExecutionPolicy/DSCResources/MSFT_xPowerShellExecutionPolicy/MSFT_xPowerShellExecutionPolicy.schema.mof b/lib/puppet_x/dsc_resources/xPowerShellExecutionPolicy/DSCResources/MSFT_xPowerShellExecutionPolicy/MSFT_xPowerShellExecutionPolicy.schema.mof deleted file mode 100644 index 9e8a35a4..00000000 --- a/lib/puppet_x/dsc_resources/xPowerShellExecutionPolicy/DSCResources/MSFT_xPowerShellExecutionPolicy/MSFT_xPowerShellExecutionPolicy.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xPowerShellExecutionPolicy")] -class MSFT_xPowerShellExecutionPolicy : OMI_BaseResource -{ - [Key, Description("Changes the user preference for the Windows PowerShell execution policy."), ValueMap{"Bypass","Restricted","AllSigned","RemoteSigned","Unrestricted"}, Values{"Bypass","Restricted","AllSigned","RemoteSigned","Unrestricted"}] String ExecutionPolicy; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xPowerShellExecutionPolicy/LICENSE b/lib/puppet_x/dsc_resources/xPowerShellExecutionPolicy/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xPowerShellExecutionPolicy/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xPowerShellExecutionPolicy/xPowerShellExecutionPolicy.psd1 b/lib/puppet_x/dsc_resources/xPowerShellExecutionPolicy/xPowerShellExecutionPolicy.psd1 deleted file mode 100644 index d3b4f6a8..00000000 --- a/lib/puppet_x/dsc_resources/xPowerShellExecutionPolicy/xPowerShellExecutionPolicy.psd1 +++ /dev/null @@ -1,61 +0,0 @@ -@{ -# Script module or binary module file associated with this manifest. - -# Version number of this module. -ModuleVersion = '1.1.0.0' - -# ID used to uniquely identify this module -GUID = 'ee440155-d4cc-4ec8-9822-2a9bd7d8c82f' - -# Author of this module -Author = 'OneScript Team' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'This DSC Resources can change the user preference for the Windows PowerShell execution policy.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = 'Get-TargetResource', 'Test-TargetResource', 'Set-TargetResource' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Variables to export from this module -VariablesToExport = '*' - -# Aliases to export from this module -AliasesToExport = '*' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xPowerShellExecutionPolicy/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xPowerShellExecutionPolicy' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - # ReleaseNotes = '' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - diff --git a/lib/puppet_x/dsc_resources/xRemoteDesktopAdmin/DSCResources/xRemoteDesktopAdmin/xRemoteDesktopAdmin.psm1 b/lib/puppet_x/dsc_resources/xRemoteDesktopAdmin/DSCResources/xRemoteDesktopAdmin/xRemoteDesktopAdmin.psm1 deleted file mode 100644 index 7c4f41a3..00000000 --- a/lib/puppet_x/dsc_resources/xRemoteDesktopAdmin/DSCResources/xRemoteDesktopAdmin/xRemoteDesktopAdmin.psm1 +++ /dev/null @@ -1,157 +0,0 @@ -<# -This sample DSC Resource allows you to configure the Remote Desktop settings (under Remote Settings). -Leveraging the xFirewall resource (included in MSFT_xNetworking), firewall rules can also be configured. -Leveraging the Group resource (included in Windows), the "Remote Desktop Users" group can also be configured. -This sample has been tested with Windows Server 2012 R2 and WMF 5.0 Preview -Author: Tiander Turpijn, Microsoft Corporation - -Used parameters: -Ensure [string] translates to reg value fDenyTSConnections [Int] - Allow RDP connection: Present = 0 "Enabled", Absent = 1 "Disabled" -UserAuthentication [string] translates to reg value UserAuthentication [Int] - Allow only Network Level Authentication - connections: Secure = 1 "Secure", NonSecure = 0 "NonSecure" -#> - -#region GET RDP Settings -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory)] - [ValidateSet("Present","Absent")] - [System.String]$Ensure, - - [ValidateSet("NonSecure", "Secure")] - [System.String]$UserAuthentication - ) - - switch ($Ensure) { - "Present" {[System.Byte]$fDenyTSConnections = 0} - "Absent" {[System.Byte]$fDenyTSConnections = 1} - } - - switch ($UserAuthentication) { - "NonSecure" {[System.Byte]$UserAuthentication = 0} - "Secure" {[System.Byte]$UserAuthentication = 1} - } - - $GetDenyTSConnections = Get-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" - $GetUserAuth = Get-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication" - - $returnValue = @{ - Ensure = switch ($GetDenyTSConnections.fDenyTSConnections) { - 0 {"Present"} - 1 {"Absent"} - } - UserAuthentication = switch ($GetUserAuth.UserAuthentication) { - 0 {"NonSecure"} - 1 {"Secure"} - } - } - - $returnValue - } - -# Get-TargetResource 'Present' 'Secure' -Verbose -# Expectation is a hashtable with configuration of the machine. - -#endregion - -#region SET RDP Settings -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory)] - [ValidateSet("Present","Absent")] - [System.String]$Ensure, - - [ValidateSet("NonSecure", "Secure")] - [System.String]$UserAuthentication - ) - - switch ($Ensure) { - "Present" {[System.Byte]$fDenyTSConnections = 0} - "Absent" {[System.Byte]$fDenyTSConnections = 1} - } - - switch ($UserAuthentication) { - "NonSecure" {[System.Byte]$UserAuthentication = 0} - "Secure" {[System.Byte]$UserAuthentication = 1} - } - - $GetEnsure = (Get-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections").fDenyTSConnections - $GetUserAuthentiation = (Get-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication").UserAuthentication - - #The make it so section - if ($fDenyTSConnections -ne $GetEnsure) { - Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value $fDenyTSConnections - } - if ($UserAuthentication -ne $GetUserAuthentication) { - Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication" -Value $UserAuthentication - } - } - -# Set-TargetResource 'Present' 'Secure' -Verbose -# Expectation is the computer will be configured to accept secure RDP connections. To verify, right click on the Windows button and open System - Remote Settings. - -#endregion - -#region TEST RDP Settings -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory)] - [ValidateSet("Present","Absent")] - [System.String]$Ensure, - - [ValidateSet("NonSecure", "Secure")] - [System.String]$UserAuthentication - ) - - switch ($Ensure) { - "Present" {[System.Byte]$fDenyTSConnections = 0} - "Absent" {[System.Byte]$fDenyTSConnections = 1} - } - - switch ($UserAuthentication) { - "NonSecure" {[System.Byte]$UserAuthentication = 0} - "Secure" {[System.Byte]$UserAuthentication = 1} - } - - $GetfDenyTSConnections = (Get-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections").fDenyTSConnections - $GetUserAuthentiation = (Get-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication").UserAuthentication - - $bool = $false - - if ($fDenyTSConnections -eq $GetfDenyTSConnections -and $UserAuthentication -eq $GetUserAuthentiation) - { - Write-Verbose "RDP settings are matching the desired state" - $bool = $true - } - else - { - Write-Verbose "RDP settings are Non-Compliant!" - if ($fDenyTSConnections -ne $GetfDenyTSConnections) { - Write-Verbose "DenyTSConnections settings are non-compliant, Value should be $fDenyTSConnections - Detected value is: $GetfDenyTSConnections" - } - if ($UserAuthentication -ne $GetUserAuthentiation) { - Write-Verbose "UserAuthentication settings are non-compliant, Value should be $UserAuthentication - Detected value is: $GetUserAuthentiation" - } - } - - $bool - } - -# Test-TargetResource 'Present' 'Secure' -Verbose -# Expectation is a true/false output based on whether the machine matches the declared configuration. - -#endregion - - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xRemoteDesktopAdmin/DSCResources/xRemoteDesktopAdmin/xRemoteDesktopAdmin.schema.mof b/lib/puppet_x/dsc_resources/xRemoteDesktopAdmin/DSCResources/xRemoteDesktopAdmin/xRemoteDesktopAdmin.schema.mof deleted file mode 100644 index 7b883568..00000000 --- a/lib/puppet_x/dsc_resources/xRemoteDesktopAdmin/DSCResources/xRemoteDesktopAdmin/xRemoteDesktopAdmin.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xRemoteDesktopAdmin")] -class xRemoteDesktopAdmin : OMI_BaseResource -{ - [Key, Description("Determines whether or not the computer should accept remote connections. Present sets the value to Enabled and Absent sets the value to Disabled."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("User Authentication. Setting this value to Secure configures the machine to require NLA."), ValueMap{"Secure","NonSecure"}, Values{"Secure","NonSecure"}] String UserAuthentication; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xRemoteDesktopAdmin/LICENSE b/lib/puppet_x/dsc_resources/xRemoteDesktopAdmin/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xRemoteDesktopAdmin/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xRemoteDesktopAdmin/xRemoteDesktopAdmin.psd1 b/lib/puppet_x/dsc_resources/xRemoteDesktopAdmin/xRemoteDesktopAdmin.psd1 deleted file mode 100644 index 6bbcc3c7..00000000 --- a/lib/puppet_x/dsc_resources/xRemoteDesktopAdmin/xRemoteDesktopAdmin.psd1 +++ /dev/null @@ -1,32 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '1.1.0.0' - -# ID used to uniquely identify this module -GUID = '244cd1ea-c609-45b9-9538-a260c0930769' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2013 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module with DSC Resources for enabling adminsitrative Remote Desktop Connections' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' -} - diff --git a/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDRemoteApp/MSFT_xRDRemoteApp.psm1 b/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDRemoteApp/MSFT_xRDRemoteApp.psm1 deleted file mode 100644 index c3ff64f3..00000000 --- a/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDRemoteApp/MSFT_xRDRemoteApp.psm1 +++ /dev/null @@ -1,133 +0,0 @@ -Import-Module -Name "$PSScriptRoot\..\..\xRemoteDesktopSessionHostCommon.psm1" -if (!(Test-xRemoteDesktopSessionHostOsRequirement)) { Throw "The minimum OS requirement was not met."} -Import-Module RemoteDesktop -$localhost = [System.Net.Dns]::GetHostByName((hostname)).HostName - -####################################################################### -# The Get-TargetResource cmdlet. -####################################################################### -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory)] - [ValidateLength(1,15)] - [string] $CollectionName = "Tenant", - [parameter(Mandatory)] - [string] $DisplayName = "Calculator", - [parameter(Mandatory)] - [string] $FilePath = "C:\Windows\System32\calc.exe", - [parameter(Mandatory)] - [string] $Alias = "calc", - [string] $FileVirtualPath, - [string] $FolderName, - [string] $CommandLineSetting, - [string] $RequiredCommandLine, - [uint32] $IconIndex, - [string] $IconPath, - [string] $UserGroups, - [boolean] $ShowInWebAccess - ) - Write-Verbose "Getting published RemoteApp program $DisplayName, if one exists." - $CollectionName = Get-RDSessionCollection | % {Get-RDSessionHost $_.CollectionName} | ? {$_.SessionHost -ieq $localhost} | % {$_.CollectionName} - $remoteApp = Get-RDRemoteApp -CollectionName $CollectionName -DisplayName $DisplayName -Alias $Alias - - @{ - "CollectionName" = $remoteApp.CollectionName; - "DisplayName" = $remoteApp.DisplayName; - "FilePath" = $remoteApp.FilePath; - "Alias" = $remoteApp.Alias; - "FileVirtualPath" = $remoteApp.FileVirtualPath; - "FolderName" = $remoteApp.FolderName; - "CommandLineSetting" = $remoteApp.CommandLineSetting; - "RequiredCommandLine" = $remoteApp.RequiredCommandLine; - "IconIndex" = $remoteApp.IconIndex; - "IconPath" = $remoteApp.IconPath; - "UserGroups" = $remoteApp.UserGroups; - "ShowInWebAccess" = $remoteApp.ShowInWebAccess; - } -} - - -######################################################################## -# The Set-TargetResource cmdlet. -######################################################################## -function Set-TargetResource - -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory)] - [ValidateLength(1,15)] - [string] $CollectionName, - [parameter(Mandatory)] - [string] $DisplayName, - [parameter(Mandatory)] - [string] $FilePath, - [parameter(Mandatory)] - [string] $Alias, - [string] $FileVirtualPath, - [string] $FolderName, - [string] $CommandLineSetting, - [string] $RequiredCommandLine, - [uint32] $IconIndex, - [string] $IconPath, - [string] $UserGroups, - [boolean] $ShowInWebAccess - ) - Write-Verbose "Making updates to RemoteApp." - $CollectionName = Get-RDSessionCollection | % {Get-RDSessionHost $_.CollectionName} | ? {$_.SessionHost -ieq $localhost} | % {$_.CollectionName} - $PSBoundParameters.collectionName = $CollectionName - if (!$(Get-RDRemoteApp -Alias $Alias)) { - New-RDRemoteApp @PSBoundParameters - } - else { - Set-RDRemoteApp @PSBoundParameters - } -} - - -####################################################################### -# The Test-TargetResource cmdlet. -####################################################################### -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory)] - [ValidateLength(1,15)] - [string] $CollectionName, - [parameter(Mandatory)] - [string] $DisplayName, - [parameter(Mandatory)] - [string] $FilePath, - [parameter(Mandatory)] - [string] $Alias, - [string] $FileVirtualPath, - [string] $FolderName, - [string] $CommandLineSetting, - [string] $RequiredCommandLine, - [uint32] $IconIndex, - [string] $IconPath, - [string] $UserGroups, - [boolean] $ShowInWebAccess - ) - Write-Verbose "Testing if RemoteApp is published." - $collectionName = Get-RDSessionCollection | % {Get-RDSessionHost $_.CollectionName} | ? {$_.SessionHost -ieq $localhost} | % {$_.CollectionName} - $PSBoundParameters.Remove("Verbose") | out-null - $PSBoundParameters.Remove("Debug") | out-null - $PSBoundParameters.Remove("ConnectionBroker") | out-null - $Check = $true - - $Get = Get-TargetResource -CollectionName $CollectionName -DisplayName $DisplayName -FilePath $FilePath -Alias $Alias - $PSBoundParameters.keys | % {if ($PSBoundParameters[$_] -ne $Get[$_]) {$Check = $false} } - $Check -} - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDRemoteApp/MSFT_xRDRemoteApp.schema.mof b/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDRemoteApp/MSFT_xRDRemoteApp.schema.mof deleted file mode 100644 index e167c280..00000000 --- a/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDRemoteApp/MSFT_xRDRemoteApp.schema.mof +++ /dev/null @@ -1,19 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xRDRemoteApp")] -class MSFT_xRDRemoteApp : OMI_BaseResource -{ - [key, Description("Specifies an alias for the RemoteApp program.")] string Alias; - [key, Description("Specifies the name of the personal virtual desktop collection or session collection. The cmdlet publishes the RemoteApp program to this collection. ")] string CollectionName; - [key, Description("Specifies a name to display to users for the RemoteApp program.")] string DisplayName; - [key, Description("Specifies a path for the executable file for the application. Do not include any environment variables.")] string FilePath; - [write, Description("Specifies a path for the application executable file. This path resolves to the same location as the value of the FilePath parameter, but it can include environment variables. ")] string FileVirtualPath; - [write, Description("Specifies the name of the folder that the RemoteApp program appears in on the Remote Desktop Web Access (RD Web Access) webpage and in the Start menu for subscribed RemoteApp and Desktop Connections. ")] string FolderName; - [write, Description("Specifies whether the RemoteApp program accepts command-line arguments from the client at connection time. The acceptable values for this parameter are: Allow, DoNotAllow, Require")] string CommandLineSetting; - [write, Description("Specifies a string that contains command-line arguments that the client can use at connection time with the RemoteApp program. ")] string RequiredCommandLine; - [write, Description("Specifies the index within the icon file (specified by the IconPath parameter) where the RemoteApp program's icon can be found.")] uint32 IconIndex; - [write, Description("Specifies the path to a file containing the icon to display for the RemoteApp program identified by the Alias parameter.")] string IconPath; - [write, Description("Specifies a domain group that can view the RemoteApp in RD Web Access, and in RemoteApp and Desktop Connections. To allow all users to see a RemoteApp program, provide a value of Null.")] string UserGroups; - [write, Description("Specifies whether to show the RemoteApp program in the RD Web Access server, and in RemoteApp and Desktop Connections that the user subscribes to. ")] boolean ShowInWebAccess; -}; - - diff --git a/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionCollection/MSFT_xRDSessionCollection.psm1 b/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionCollection/MSFT_xRDSessionCollection.psm1 deleted file mode 100644 index 12845d51..00000000 --- a/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionCollection/MSFT_xRDSessionCollection.psm1 +++ /dev/null @@ -1,85 +0,0 @@ -Import-Module -Name "$PSScriptRoot\..\..\xRemoteDesktopSessionHostCommon.psm1" -if (!(Test-xRemoteDesktopSessionHostOsRequirement)) { Throw "The minimum OS requirement was not met."} -Import-Module RemoteDesktop -$localhost = [System.Net.Dns]::GetHostByName((hostname)).HostName - -####################################################################### -# The Get-TargetResource cmdlet. -####################################################################### -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory)] - [ValidateLength(1,15)] - [string] $CollectionName, - [parameter(Mandatory)] - [string] $SessionHost, - [string] $CollectionDescription, - [string] $ConnectionBroker - ) - Write-Verbose "Getting information about RDSH collection." - $Collection = Get-RDSessionCollection -ErrorAction SilentlyContinue - @{ - "CollectionName" = $Collection.CollectionName; - "CollectionDescription" = $Collection.CollectionDescription - "SessionHost" = $localhost - "ConnectionBroker" = $ConnectionBroker - } -} - - -######################################################################## -# The Set-TargetResource cmdlet. -######################################################################## -function Set-TargetResource - -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory)] - [ValidateLength(1,15)] - [string] $CollectionName, - [parameter(Mandatory)] - [string] $SessionHost, - [string] $CollectionDescription, - [string] $ConnectionBroker - ) - Write-Verbose "Creating a new RDSH collection." - if ($localhost -eq $ConnectionBroker) { - New-RDSessionCollection @PSBoundParameters - } - else { - $PSBoundParameters.Remove("Description") - Add-RDSessionHost @PSBoundParameters - } -} - - -####################################################################### -# The Test-TargetResource cmdlet. -####################################################################### -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory)] - [ValidateLength(1,15)] - [string] $CollectionName, - [parameter(Mandatory)] - [string] $SessionHost, - [string] $CollectionDescription, - [string] $ConnectionBroker - ) - Write-Verbose "Checking for existance of RDSH collection." - (Get-TargetResource @PSBoundParameters).CollectionName -ne $null -} - - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionCollection/MSFT_xRDSessionCollection.schema.mof b/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionCollection/MSFT_xRDSessionCollection.schema.mof deleted file mode 100644 index 68330c36..00000000 --- a/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionCollection/MSFT_xRDSessionCollection.schema.mof +++ /dev/null @@ -1,12 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xRDSessionCollection")] -class MSFT_xRDSessionCollection : OMI_BaseResource -{ - [key, Description("Specifies a name for the session collection. ")] string CollectionName; - [key, Description("Specifies an RD Session Host server to include in the session collection. ")] string SessionHost; - [write, Description("Specifies a description for the collection.")] string CollectionDescription; - [write, Description("Specifies the Remote Desktop Connection Broker (RD Connection Broker) server for a Remote Desktop deployment.")] string ConnectionBroker; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionCollectionConfiguration/MSFT_xRDSessionCollectionConfiguration.psm1 b/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionCollectionConfiguration/MSFT_xRDSessionCollectionConfiguration.psm1 deleted file mode 100644 index bdb56f0e..00000000 --- a/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionCollectionConfiguration/MSFT_xRDSessionCollectionConfiguration.psm1 +++ /dev/null @@ -1,152 +0,0 @@ -Import-Module -Name "$PSScriptRoot\..\..\xRemoteDesktopSessionHostCommon.psm1" -if (!(Test-xRemoteDesktopSessionHostOsRequirement)) { Throw "The minimum OS requirement was not met."} -Import-Module RemoteDesktop -$localhost = [System.Net.Dns]::GetHostByName((hostname)).HostName - - -####################################################################### -# The Get-TargetResource cmdlet. -####################################################################### -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory)] - [ValidateLength(1,15)] - [string] $CollectionName, - [uint32] $ActiveSessionLimitMin, - [boolean] $AuthenticateUsingNLA, - [boolean] $AutomaticReconnectionEnabled, - [string] $BrokenConnectionAction, - [string] $ClientDeviceRedirectionOptions, - [boolean] $ClientPrinterAsDefault, - [boolean] $ClientPrinterRedirected, - [string] $CollectionDescription, - [string] $ConnectionBroker, - [string] $CustomRdpProperty, - [uint32] $DisconnectedSessionLimitMin, - [string] $EncryptionLevel, - [uint32] $IdleSessionLimitMin, - [uint32] $MaxRedirectedMonitors, - [boolean] $RDEasyPrintDriverEnabled, - [string] $SecurityLayer, - [boolean] $TemporaryFoldersDeletedOnExit, - [string] $UserGroup - ) - Write-Verbose "Getting currently configured RDSH Collection properties" - $collectionName = Get-RDSessionCollection | % {Get-RDSessionHost $_.CollectionName} | ? {$_.SessionHost -ieq $localhost} | % {$_.CollectionName} - - $collectionGeneral = Get-RDSessionCollectionConfiguration -CollectionName $CollectionName - $collectionClient = Get-RDSessionCollectionConfiguration -CollectionName $CollectionName -Client - $collectionConnection = Get-RDSessionCollectionConfiguration -CollectionName $CollectionName -Connection - $collectionSecurity = Get-RDSessionCollectionConfiguration -CollectionName $CollectionName -Security - $collectionUserGroup = Get-RDSessionCollectionConfiguration -CollectionName $CollectionName -UserGroup - @{ - "CollectionName" = $collectionGeneral.CollectionName; - "ActiveSessionLimitMin" = $collectionConnection.ActiveSessionLimitMin; - "AuthenticateUsingNLA" = $collectionSecurity.AuthenticateUsingNLA; - "AutomaticReconnectionEnabled" = $collectionConnection.AutomaticReconnectionEnabled; - "BrokenConnectionAction" = $collectionConnection.BrokenConnectionAction; - "ClientDeviceRedirectionOptions" = $collectionClient.ClientDeviceRedirectionOptions; - "ClientPrinterAsDefault" = $collectionClient.ClientPrinterAsDefault; - "ClientPrinterRedirected" = $collectionClient.ClientPrinterRedirected; - "CollectionDescription" = $collectionGeneral.CollectionDescription; - "CustomRdpProperty" = $collectionGeneral.CustomRdpProperty; - "DisconnectedSessionLimitMin" = $collectionGeneral.DisconnectedSessionLimitMin; - "EncryptionLevel" = $collectionSecurity.EncryptionLevel; - "IdleSessionLimitMin" = $collectionConnection.IdleSessionLimitMin; - "MaxRedirectedMonitors" = $collectionClient.MaxRedirectedMonitors; - "RDEasyPrintDriverEnabled" = $collectionClient.RDEasyPrintDriverEnabled; - "SecurityLayer" = $collectionSecurity.SecurityLayer; - "TemporaryFoldersDeletedOnExit" = $collectionConnection.TemporaryFoldersDeletedOnExit; - "UserGroup" = $collectionUserGroup.UserGroup; - } -} - - -######################################################################## -# The Set-TargetResource cmdlet. -######################################################################## -function Set-TargetResource - -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory)] - [ValidateLength(1,15)] - [string] $CollectionName, - [uint32] $ActiveSessionLimitMin, - [boolean] $AuthenticateUsingNLA, - [boolean] $AutomaticReconnectionEnabled, - [string] $BrokenConnectionAction, - [string] $ClientDeviceRedirectionOptions, - [boolean] $ClientPrinterAsDefault, - [boolean] $ClientPrinterRedirected, - [string] $CollectionDescription, - [string] $ConnectionBroker, - [string] $CustomRdpProperty, - [uint32] $DisconnectedSessionLimitMin, - [string] $EncryptionLevel, - [uint32] $IdleSessionLimitMin, - [uint32] $MaxRedirectedMonitors, - [boolean] $RDEasyPrintDriverEnabled, - [string] $SecurityLayer, - [boolean] $TemporaryFoldersDeletedOnExit, - [string] $UserGroup - ) - Write-Verbose "Setting DSC collection properties" - $discoveredCollectionName = Get-RDSessionCollection | % {Get-RDSessionHost $_.CollectionName} | ? {$_.SessionHost -ieq $localhost} | % {$_.CollectionName} - if ($collectionName -ne $discoveredCollectionName) {$PSBoundParameters.collectionName = $discoveredCollectionName} - Set-RDSessionCollectionConfiguration @PSBoundParameters -} - - -####################################################################### -# The Test-TargetResource cmdlet. -####################################################################### -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory)] - [ValidateLength(1,15)] - [string] $CollectionName, - [uint32] $ActiveSessionLimitMin, - [boolean] $AuthenticateUsingNLA, - [boolean] $AutomaticReconnectionEnabled, - [string] $BrokenConnectionAction, - [string] $ClientDeviceRedirectionOptions, - [boolean] $ClientPrinterAsDefault, - [boolean] $ClientPrinterRedirected, - [string] $CollectionDescription, - [string] $ConnectionBroker, - [string] $CustomRdpProperty, - [uint32] $DisconnectedSessionLimitMin, - [string] $EncryptionLevel, - [uint32] $IdleSessionLimitMin, - [uint32] $MaxRedirectedMonitors, - [boolean] $RDEasyPrintDriverEnabled, - [string] $SecurityLayer, - [boolean] $TemporaryFoldersDeletedOnExit, - [string] $UserGroup - ) - - Write-Verbose "Testing DSC collection properties" - $collectionName = Get-RDSessionCollection | % {Get-RDSessionHost $_.CollectionName} | ? {$_.SessionHost -ieq $localhost} | % {$_.CollectionName} - $PSBoundParameters.Remove("Verbose") | out-null - $PSBoundParameters.Remove("Debug") | out-null - $PSBoundParameters.Remove("ConnectionBroker") | out-null - $Check = $true - - $Get = Get-TargetResource -CollectionName $CollectionName - $PSBoundParameters.keys | % {if ($PSBoundParameters[$_] -ne $Get[$_]) {$Check = $false} } - $Check -} - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionCollectionConfiguration/MSFT_xRDSessionCollectionConfiguration.schema.mof b/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionCollectionConfiguration/MSFT_xRDSessionCollectionConfiguration.schema.mof deleted file mode 100644 index 43f3a4ef..00000000 --- a/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionCollectionConfiguration/MSFT_xRDSessionCollectionConfiguration.schema.mof +++ /dev/null @@ -1,33 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xRDSessionCollectionConfiguration")] -class MSFT_xRDSessionCollectionConfiguration : OMI_BaseResource -{ - [key, Description("Specifies the name of a session collection. ")] string CollectionName; - [write, Description("Specifies the maximum time, in minutes, an active session runs. After this period, the RD Session Host server ends the session. ")] uint32 ActiveSessionLimitMin; - [write, Description("Indicates whether to use Network Level Authentication (NLA). If this value is $True, Remote Desktop uses NLA to authenticate a user before the user sees a logon screen. ")] boolean AuthenticateUsingNLA; - [write, Description("Indicates whether the Remote Desktop client attempts to reconnect after a connection interruption. ")] boolean AutomaticReconnectionEnabled; - [write, Description("Specifies an action for an RD Session Host server to take after a connection interruption. The acceptable values for this parameter are: None, Disconnect, LogOff.")] string BrokenConnectionAction; - [write, Description("Specifies a type of client device to be redirected to an RD Session Host server in this session collection. The acceptable values for this parameter are: None, AudioVideoPlayBack, AudioRecording, COMPort, PlugAndPlayDevice, SmartCard, Clipboard, LPTPort, Drive, TimeZone. You can use binary-or to combine two or more values of this enum to specify multiple client device types.")] string ClientDeviceRedirectionOptions; - [write, Description("Indicates whether to use the client printer or server printer as the default printer. If this value is $True, use the client printer as default. If this value is $False, use the server as default.")] boolean ClientPrinterAsDefault; - [write, Description("Indicates whether to use client printer redirection, which routes print jobs from the Remote Desktop session to a printer attached to the client computer.")] boolean ClientPrinterRedirected; - [write, Description("Specifies a description of the session collection. ")] string CollectionDescription; - [write, Description("Specifies the Remote Desktop Connection Broker (RD Connection Broker) server for a Remote Desktop deployment.")] string ConnectionBroker; - [write, Description("Specifies Remote Desktop Protocol (RDP) settings to include in the .rdp files for all Windows Server 2012 RemoteApp programs and remote desktops published in this collection. ")] string CustomRdpProperty; - [write, Description("Specifies a length of time, in minutes. After client disconnection from a session for this period, the RD Session Host ends the session.")] uint32 DisconnectedSessionLimitMin; - [write, Description("Specifies the level of data encryption used for a Remote Desktop session. The acceptable values for this parameter are: Low, ClientCompatible, High, FipsCompliant. The default value is ClientCompatible.")] string EncryptionLevel; - [write, Description("Specifies the length of time, in minutes, to wait before an RD Session Host logs off or disconnects an idle session. The BrokenConnectionAction parameter determines whether to log off or disconnect. ")] uint32 IdleSessionLimitMin; - [write, Description("Specifies the maximum number of client monitors that an RD Session Host server can redirect to a remote session. The highest value for this parameter is 16.")] uint32 MaxRedirectedMonitors; - [write, Description("Specifies whether to enable the Remote Desktop Easy Print driver.")] boolean RDEasyPrintDriverEnabled; - [write, Description("Specifies which security protocol to use. The acceptable values for this parameter are: RDP, Negotiate, SSL. The default value is Negotiate.")] string SecurityLayer; - [write, Description("Specifies whether to delete temporary folders from the RD Session Host server for a disconnected session. ")] boolean TemporaryFoldersDeletedOnExit; - [write, Description("Specifies a domain group authorized to connect to the RD Session Host servers in a session collection. ")] string UserGroup; -}; - - - - - - - - - diff --git a/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionDeployment/MSFT_xRDSessionDeployment.psm1 b/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionDeployment/MSFT_xRDSessionDeployment.psm1 deleted file mode 100644 index 87ff0c68..00000000 --- a/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionDeployment/MSFT_xRDSessionDeployment.psm1 +++ /dev/null @@ -1,76 +0,0 @@ -Import-Module -Name "$PSScriptRoot\..\..\xRemoteDesktopSessionHostCommon.psm1" -if (!(Test-xRemoteDesktopSessionHostOsRequirement)) { Throw "The minimum OS requirement was not met."} -Import-Module RemoteDesktop - -####################################################################### -# The Get-TargetResource cmdlet. -####################################################################### -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory)] - [string] $SessionHost, - [parameter(Mandatory)] - [string] $ConnectionBroker, - [parameter(Mandatory)] - [string] $WebAccessServer - ) - Write-Verbose "Getting list of RD Server roles." - $Deployed = Get-RDServer -ErrorAction SilentlyContinue - @{ - "SessionHost" = $Deployed | ? Roles -contains "RDS-RD-SERVER" | % Server; - "ConnectionBroker" = $Deployed | ? Roles -contains "RDS-CONNECTION-BROKER" | % Server; - "WebAccessServer" = $Deployed | ? Roles -contains "RDS-WEB-ACCESS" | % Server; - } -} - - -######################################################################## -# The Set-TargetResource cmdlet. -######################################################################## -function Set-TargetResource - -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory)] - [string] $SessionHost, - [parameter(Mandatory)] - [string] $ConnectionBroker, - [parameter(Mandatory)] - [string] $WebAccessServer - ) - - Write-Verbose "Initiating new RDSH deployment." - New-RDSessionDeployment @PSBoundParameters - $global:DSCMachineStatus = 1 -} - - -####################################################################### -# The Test-TargetResource cmdlet. -####################################################################### -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory)] - [string] $SessionHost, - [parameter(Mandatory)] - [string] $ConnectionBroker, - [parameter(Mandatory)] - [string] $WebAccessServer - ) - Write-Verbose "Checking RDSH role is deployed on this node." - (Get-TargetResource @PSBoundParameters).SessionHost -ieq $SessionHost -} - - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionDeployment/MSFT_xRDSessionDeployment.schema.mof b/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionDeployment/MSFT_xRDSessionDeployment.schema.mof deleted file mode 100644 index ad5beaf0..00000000 --- a/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionDeployment/MSFT_xRDSessionDeployment.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xRDSessionDeployment")] -class MSFT_xRDSessionDeployment : OMI_BaseResource -{ - [key, Description("Specifies the FQDN of a server to host the RD Session Host role service. ")] string SessionHost; - [key, Description("Specifies the FQDN of a server to host the RD Connection Broker role service.")] string ConnectionBroker; - [key, Description("Specifies the FQDN of a server to host the RD Web Access role service. ")] string WebAccessServer; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/LICENSE b/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/xRemoteDesktopSessionHost.psd1 b/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/xRemoteDesktopSessionHost.psd1 deleted file mode 100644 index 2eb6bb36..00000000 --- a/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/xRemoteDesktopSessionHost.psd1 +++ /dev/null @@ -1,61 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '1.4.0.0' - -# ID used to uniquely identify this module -GUID = 'b42ff085-bd2b-4232-90ba-02b4c780e2d9' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module with DSC Resources for Remote Desktop Session Host' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -RootModule = 'xRemoteDesktopSessionHostCommon.psm1' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xRemoteDesktopSessionHost/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xRemoteDesktopSessionHost' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* Updated CollectionName parameter to validate length between 1 and 15 characters, and added tests to verify. - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - - diff --git a/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/xRemoteDesktopSessionHostCommon.psm1 b/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/xRemoteDesktopSessionHostCommon.psm1 deleted file mode 100644 index 83aab734..00000000 --- a/lib/puppet_x/dsc_resources/xRemoteDesktopSessionHost/xRemoteDesktopSessionHostCommon.psm1 +++ /dev/null @@ -1,12 +0,0 @@ -function Test-xRemoteDesktopSessionHostOsRequirement -{ - return (Get-OsVersion) -ge (new-object 'Version' 6,2,9200,0) -} - -function Get-OsVersion -{ - return [Environment]::OSVersion.Version -} -Export-ModuleMember -Function @( - 'Test-xRemoteDesktopSessionHostOsRequirement' -) diff --git a/lib/puppet_x/dsc_resources/xRobocopy/DSCResources/MSFT_xRobocopy/MSFT_xRobocopy.psm1 b/lib/puppet_x/dsc_resources/xRobocopy/DSCResources/MSFT_xRobocopy/MSFT_xRobocopy.psm1 deleted file mode 100644 index 2b4df647..00000000 --- a/lib/puppet_x/dsc_resources/xRobocopy/DSCResources/MSFT_xRobocopy/MSFT_xRobocopy.psm1 +++ /dev/null @@ -1,301 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Source, - - [parameter(Mandatory = $true)] - [System.String] - $Destination, - - [System.String] - $Files, - - [System.UInt32] - $Retry, - - [System.UInt32] - $Wait, - - [System.Boolean] - $SubdirectoriesIncludingEmpty = $False, - - [System.Boolean] - $Restartable = $False, - - [System.Boolean] - $MultiThreaded = $False, - - [System.String] - $ExcludeFiles, - - [System.String] - $LogOutput, - - [System.Boolean] - $AppendLog = $False, - - [System.String[]] - $AdditionalArgs - ) - - $result = Test-TargetResource $Source $Destination $Files $Retry $Wait $SubdirectoriesIncludingEmpty $Restartable $MultiThreaded $ExcludeFiles $LogOutput $AppendLog $AdditionalArgs - $ensure = 'Absent' - if($result -eq $true) - { - $ensure = 'Present' - } - - $returnValue = @{ - Source = $Source - Destination = $Destination - Files = $Files - Retry = $Retry - Wait = $Wait - SubdirectoriesIncludingEmpty = $SubdirectoriesIncludingEmpty - Restartable = $Restartable - MultiThreaded = $MultiThreaded - ExcludeFiles = $ExcludeFiles - LogOutput = $LogOutput - AppendLog = $AppendLog - AdditionalArgs = $AdditionalArgs - Ensure = $ensure - } - - return $returnValue -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Source, - - [parameter(Mandatory = $true)] - [System.String] - $Destination, - - [System.String] - $Files, - - [System.UInt32] - $Retry, - - [System.UInt32] - $Wait, - - [System.Boolean] - $SubdirectoriesIncludingEmpty = $False, - - [System.Boolean] - $Restartable = $False, - - [System.Boolean] - $MultiThreaded = $False, - - [System.String] - $ExcludeFiles, - - [System.String] - $LogOutput, - - [System.Boolean] - $AppendLog = $False, - - [System.String[]] - $AdditionalArgs - ) - - $arguments = Get-RobocopyArguments $Source $Destination $Files $Retry $Wait $SubdirectoriesIncludingEmpty $Restartable $MultiThreaded $ExcludeFiles $LogOutput $AppendLog $AdditionalArgs - - Write-Verbose "Executing robocopy.exe with: $arguments" - &robocopy $arguments | Out-Null - if($LASTEXITCODE -ge 8) - { - throw "robocopy returned with errors! Exit code: $LASTEXITCODE! More info here:https://support.microsoft.com/en-us/kb/954404" - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Source, - - [parameter(Mandatory = $true)] - [System.String] - $Destination, - - [System.String] - $Files, - - [System.UInt32] - $Retry, - - [System.UInt32] - $Wait, - - [System.Boolean] - $SubdirectoriesIncludingEmpty = $False, - - [System.Boolean] - $Restartable = $False, - - [System.Boolean] - $MultiThreaded = $False, - - [System.String] - $ExcludeFiles, - - [System.String] - $LogOutput, - - [System.Boolean] - $AppendLog = $False, - - [System.String[]] - $AdditionalArgs - ) - - $arguments = Get-RobocopyArguments $Source $Destination $Files $Retry $Wait $SubdirectoriesIncludingEmpty $Restartable $MultiThreaded $ExcludeFiles $LogOutput $AppendLog $AdditionalArgs - - if(!$arguments.Contains('/L') -and !$arguments.Contains('/l')) - { - $arguments += '/L' - } - - &robocopy $arguments | Out-Null - - # https://support.microsoft.com/en-us/kb/954404 - # ROBOCOPY $LASTEXITCODE is a bitflag: - # 0: Source and destination are completely synchronized - # 1: One or more files were copied successfully (new files present) - # 2: extra files/directories detected - # 4: mismatched files/directories - # 8: copy errors and retries exceeded - # 16: serious error - if ($LASTEXITCODE -ge 1 -and $LASTEXITCODE -lt 8) - { - Write-Verbose "Source and destination are out of sync" - $result = $false - } - elseif ($LASTEXITCODE -eq 0) - { - Write-Verbose "Source and destination are completely synchronized" - $result = $true - } - else - { - throw "robocopy returned with errors! Exit code: $result! More info here:https://support.microsoft.com/en-us/kb/954404" - } - - return $result -} - -# Helper Functions -function Get-RobocopyArguments -{ - [CmdletBinding()] - [OutputType([System.String[]])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Source, - - [parameter(Mandatory = $true)] - [System.String] - $Destination, - - [System.String] - $Files, - - [System.UInt32] - $Retry, - - [System.UInt32] - $Wait, - - [System.Boolean] - $SubdirectoriesIncludingEmpty, - - [System.Boolean] - $Restartable, - - [System.Boolean] - $MultiThreaded, - - [System.String] - $ExcludeFiles, - - [System.String] - $LogOutput, - - [System.Boolean] - $AppendLog, - - [System.String[]] - $AdditionalArgs - ) - - [System.String[]]$arguments = @($Source, $Destination) - if($Files) - { - $arguments += $Files - } - if ($Retry) - { - $arguments += "/R:$Retry" - } - if ($Wait) - { - $arguments += "/W:$Wait" - } - if ($SubdirectoriesIncludingEmpty) - { - $arguments += '/E' - } - if ($Restartable) - { - $arguments += '/Z' - } - if ($MultiThreaded) - { - $arguments += '/MT' - } - if ($ExcludeFiles) - { - $arguments += @('/XF', $ExcludeFiles) - } - if ($ExcludeDirs) - { - $arguments += @('/XD', $ExcludeDirs) - } - if ($LogOutput -AND $AppendLog) - { - $arguments += "/LOG+:$LogOutput" - } - if ($LogOutput -AND !$AppendLog) - { - $arguments += "/LOG:$LogOutput" - } - if ($AdditionalArgs) - { - $arguments += $AdditionalArgs - } - - return $arguments -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xRobocopy/DSCResources/MSFT_xRobocopy/MSFT_xRobocopy.schema.mof b/lib/puppet_x/dsc_resources/xRobocopy/DSCResources/MSFT_xRobocopy/MSFT_xRobocopy.schema.mof deleted file mode 100644 index e1e278e7..00000000 --- a/lib/puppet_x/dsc_resources/xRobocopy/DSCResources/MSFT_xRobocopy/MSFT_xRobocopy.schema.mof +++ /dev/null @@ -1,18 +0,0 @@ -[ClassVersion("0.1.0.0"), FriendlyName("xRobocopy")] -class MSFT_xRobocopy : OMI_BaseResource -{ - [Key, Description("Source Directory, Drive or UNC path.")] String Source; - [Key, Description("Destination Dir, Drive or UNC path.")] String Destination; - [Write, Description("File(s) to copy (names/wildcards: default is all files).")] String Files; - [Write, Description("Number of Retries on failed copies: default 1 million.")] UInt32 Retry; - [Write, Description("Wait time between retries: default is 30 seconds.")] UInt32 Wait; - [Write, Description("Copy subdirectories, including Empty ones.")] Boolean SubdirectoriesIncludingEmpty; - [Write, Description("Copy files in restartable mode.")] Boolean Restartable; - [Write, Description("Do multi-threaded copies with n threads (default 8). N must be at least 1 and not greater than 128. This option is incompatible with the /IPG and /EFSRAW options. Redirect output using /LOG option for better performance.")] Boolean MultiThreaded; - [Write, Description("Exclude Files matching given names/paths/wildcards.")] String ExcludeFiles; - [Write, Description("Output status to LOG file.")] String LogOutput; - [Write, Description("Determine whether to overwrite log file or append.")] Boolean AppendLog; - [Write, Description("Robocopy has MANY configuration options. Too many to present them all as DSC parameters effectively. Use this option to set additional parameters. Each parameter should be a separate array member. This array will be combined with main argument array. For a list of options run Robocopy /??? in a shell window.")] String AdditionalArgs[]; - [Read, ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}, Description("Will indicate whether Destination is in sync with Source")] String Ensure; -}; - diff --git a/lib/puppet_x/dsc_resources/xRobocopy/LICENSE b/lib/puppet_x/dsc_resources/xRobocopy/LICENSE deleted file mode 100644 index 5f178f93..00000000 --- a/lib/puppet_x/dsc_resources/xRobocopy/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Michael Greene - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/lib/puppet_x/dsc_resources/xRobocopy/Resources/xDscResourceDesigner_CreateScript.ps1 b/lib/puppet_x/dsc_resources/xRobocopy/Resources/xDscResourceDesigner_CreateScript.ps1 deleted file mode 100644 index a85abd93..00000000 --- a/lib/puppet_x/dsc_resources/xRobocopy/Resources/xDscResourceDesigner_CreateScript.ps1 +++ /dev/null @@ -1,162 +0,0 @@ -$modules = 'C:\Program Files\WindowsPowerShell\Modules\' -$modulename = 'xRobocopy' -$Description = 'This module is used to facilitate large file copies with complex requirements such as multithreading, restarts, and exclusions when recursing content.' - -if (!(test-path (join-path $modules $modulename))) { - - $modulefolder = mkdir (join-path $modules $modulename) - New-ModuleManifest -Path (join-path $modulefolder "$modulename.psd1") -Guid $([system.guid]::newguid().guid) -Author 'PowerShell DSC' -CompanyName 'Microsoft Corporation' -Copyright '2015' -ModuleVersion '0.1.0.0' -Description $Description -PowerShellVersion '4.0' - - $standard = @{ModuleName = $modulename - ClassVersion = '0.1.0.0' - Path = $modules - } - $P1 = @() - $P1 += New-xDscResourceProperty -Name Source -Type String -Attribute Key -Description 'Source Directory, Drive or UNC path.' - $P1 += New-xDscResourceProperty -Name Destination -Type String -Attribute Key -Description 'Destination Dir, Drive or UNC path.' - $P1 += New-xDscResourceProperty -Name Files -Type String -Attribute Write -Description 'File(s) to copy (names/wildcards: default is all files).' - $P1 += New-xDscResourceProperty -Name Retry -Type UInt32 -Attribute Write -Description 'Number of Retries on failed copies: default 1 million.' - $P1 += New-xDscResourceProperty -Name Wait -Type UInt32 -Attribute Write -Description 'Wait time between retries: default is 30 seconds.' - $P1 += New-xDscResourceProperty -Name SubdirectoriesIncludingEmpty -Type Boolean -Attribute Write -Description 'Copy subdirectories, including Empty ones.' - $P1 += New-xDscResourceProperty -Name Restartable -Type Boolean -Attribute Write -Description 'Copy files in restartable mode.' - $P1 += New-xDscResourceProperty -Name MultiThreaded -Type Boolean -Attribute Write -Description 'Do multi-threaded copies with n threads (default 8). N must be at least 1 and not greater than 128. This option is incompatible with the /IPG and /EFSRAW options. Redirect output using /LOG option for better performance.' - $P1 += New-xDscResourceProperty -Name ExcludeFiles -Type String -Attribute Write -Description 'Exclude Files matching given names/paths/wildcards.' - $P1 += New-xDscResourceProperty -Name LogOutput -Type String -Attribute Write -Description 'Output status to LOG file.' - $P1 += New-xDscResourceProperty -Name AppendLog -Type Boolean -Attribute Write -Description 'Determine whether to overwrite log file or append.' - $P1 += New-xDscResourceProperty -Name AdditionalArgs -Type String -Attribute Write -Description 'Robocopy has MANY configuration options. Too many to present them all as DSC parameters effectively. Use this option to set additional parameters. The string will be appended to the arguements list. For a list of options run Robocopy /??? in a shell window.' - New-xDscResource -Name MSFT_xRobocopy -Property $P1 -FriendlyName xRobocopy @standard -} - - -# Markdown Generator # -# This is a first draft. Expected to become 100% efficient in future version. Loop resources, import example from script, etc. - -if (!(test-path "$modules\$modulename\Resources\")){mkdir "$modules\$modulename\Resources\"} - -$MD = @" -Introduction -============ - -The **$ModuleName** module is a part of the Windows PowerShell Desired State Configuration (DSC) Resource Kit, which is a collection of DSC Resources. $Description, with simple declarative language. - -**All of the resources in the DSC Resource Kit are provided AS IS, and are not supported through any Microsoft standard support program or service. The "x" in $ModuleName stands for experimental**, which means that these resources will be **fix forward** and monitored by the module owner(s). - -Please leave comments, feature requests, and bug reports in the Q & A tab for -this module. - -If you would like to modify the **$ModuleName** module, feel free. When modifying, please update the module name, resource friendly name, and MOF class name (instructions below). As specified in the license, you may copy or modify this resource as long as they are used on the Windows Platform. - -For more information about Windows PowerShell Desired State Configuration, check out the blog posts on the [PowerShell Blog](http://blogs.msdn.com/b/powershell/) ([this](http://blogs.msdn.com/b/powershell/archive/2013/11/01/configuration-in-a-devops-world-windows-powershell-desired-state-configuration.aspx) is a good starting point). There are also great community resources, such as [PowerShell.org](http://powershell.org/wp/tag/dsc/), or [PowerShell Magazine](http://www.powershellmagazine.com/tag/dsc/). For more information on the DSC Resource Kit, checkout [this blog post](http://go.microsoft.com/fwlink/?LinkID=389546). - -Installation ------------- - -To install **$ModuleName** module - -- If you are using WMF4 / PowerShell Version 4: Unzip the content under the $env:ProgramFiles\WindowsPowerShell\Modules folder - -- If you are using WMF5 Preview: From an elevated PowerShell session run "Install-Module $ModuleName" - -To confirm installation - -- Run Get-DSCResource to see that the resources listed above are among the DSC Resources displayed - -Requirements ------------- - -This module requires the latest version of PowerShell (v4.0, which ships in -Windows 8.1 or Windows Server 2012R2). To easily use PowerShell 4.0 on older -operating systems, install WMF 4.0. Please read the installation instructions -that are present on both the download page and the release notes for WMF 4.0. - -Details -------- -**$Resource1** resource has following properties - -"@ -foreach ($res in $P1) {$MD += @" -- **$($res.Name)**: $($res.Description) - -"@ -} -$MD += @" - -Renaming Requirements ---------------------- - -When making changes to these resources, we suggest the following practice - -1. Update the following names by replacing MSFT with your company/community name -and replacing the **"x" with **"c" (short for "Community") or another prefix of your -choice - - Module name (ex: xModule becomes cModule) - - Resource folder (ex: MSFT\_xResource becomes Contoso\_xResource) - - Resource Name (ex: MSFT\_xResource becomes Contoso\_cResource) - - Resource Friendly Name (ex: xResource becomes cResource) - - MOF class name (ex: MSFT\_xResource becomes Contoso\_cResource) - - Filename for the .schema.mof (ex: MSFT\_xResource.schema.mof becomes Contoso\_cResource.schema.mof) - -2. Update module and metadata information in the module manifest -3. Update any configuration that use these resources - -We reserve resource and module names without prefixes ("x" or "c") for future use (e.g. "MSFT_Resource"). If the next version of Windows Server ships with a "WindowsEventForwarding" resource, we don't want to break any configurations that use any community modifications. Please keep a prefix such as "c" on all community modifications. - -Versions --------- - -**0.1.0.0** - -- Initial release with the following resources -"@ -foreach ($res in $P1) {$MD += @" - - $($res.Name) - -"@ - } -$MD += @' - -Examples --------- - -**Example 1**: Copy a directory from one location to another with multithreading and restartable mode. Note that this example is using PSRunAsCredential which is a common parameter only available in WMF5 and later. -```powershell - configuration DeployContent - { - param ( - [Parameter(Mandatory=$true)] - [ValidateNotNullorEmpty()] - [PsCredential] $Credential - ) - - Import-DscResource -ModuleName xRobocopy - Node 'localhost' - { - xRobocopy Content - { - Source = '\\server\share\ReleaseVersion' - Destination = 'C:\inetpub\wwwroot\sitename' - Multithread = $true - Restartable = $true - PSRunAsCredential = $Credential - } - } - } - $configData = @{ - AllNodes = @( - @{ - NodeName = 'localhost'; - CertificateId = 'Your Certificate thumbprint here' - } - ) - } - DeployContent -ConfigurationData $configData -Credential (get-credential) -OutputPath 'c:\DSC' - Start-DscConfiguration -Wait -Force -Verbose -Path 'c:\DSC' - - # Validate results - Get-ChildItem C:\inetpub\wwwroot\sitename -``` - -## Contributing -Please check out common DSC Resources [contributing guidelines](https://github.com/PowerShell/DscResource.Kit/blob/master/CONTRIBUTING.md). -'@ -$MD | Out-File "$modules\$modulename\Resources\ReadMe.md" diff --git a/lib/puppet_x/dsc_resources/xRobocopy/xRobocopy.psd1 b/lib/puppet_x/dsc_resources/xRobocopy/xRobocopy.psd1 deleted file mode 100644 index e67917ac..00000000 --- a/lib/puppet_x/dsc_resources/xRobocopy/xRobocopy.psd1 +++ /dev/null @@ -1,126 +0,0 @@ -# -# Module manifest for module 'xRobocopy' -# -# Generated by: PowerShell DSC -# -# Generated on: 6/15/2015 -# - -@{ - -# Script module or binary module file associated with this manifest. -# RootModule = '' - -# Version number of this module. -ModuleVersion = '2.0.0.0' - -# ID used to uniquely identify this module -GUID = '3c743236-35b8-4225-b76b-5e6117c0e477' - -# Author of this module -Author = 'PowerShell DSC' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '2015' - -# Description of the functionality provided by this module -Description = 'This module is used to facilitate large file copies with complex requirements such as multithreading, restarts, and exclusions when recursing content.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Name of the Windows PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the Windows PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module -# DotNetFrameworkVersion = '' - -# Minimum version of the common language runtime (CLR) required by this module -# CLRVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -# RequiredModules = @() - -# Assemblies that must be loaded prior to importing this module -# RequiredAssemblies = @() - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -# FormatsToProcess = @() - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -# NestedModules = @() - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Variables to export from this module -VariablesToExport = '*' - -# Aliases to export from this module -AliasesToExport = '*' - -# DSC resources to export from this module -# DscResourcesToExport = @() - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xRobocopy/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xRobocopy' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* Improved Test-TargetResource method to run robocopy with the same parameters as in Set-TargetResource -* Bug fix in Test-TargetResource when evaluating return code from robocopy -* Updated example to use correct PsDscRunAsCredential parameter -* **Breaking Change:** Changed AditionalArgs parameter to Array of String -* Added additional examples with different copy options. - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - -} - diff --git a/lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMConsoleSetup/MSFT_xSCDPMConsoleSetup.psm1 b/lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMConsoleSetup/MSFT_xSCDPMConsoleSetup.psm1 deleted file mode 100644 index d4dac30c..00000000 --- a/lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMConsoleSetup/MSFT_xSCDPMConsoleSetup.psm1 +++ /dev/null @@ -1,184 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\DataProtectionManager", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "SCDPM\setup.exe" - if(!(Test-Path -Path $Path)) - { - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "setup.exe" - } - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - - switch($Version) - { - "4.2.1205.0" - { - $IdentifyingNumber = "{DFF93860-2113-4207-A7AC-3901ABCE8002}" - } - "4.3.1012.0" - { - $IdentifyingNumber = "{846183DF-CF1D-4310-BA7A-EF5EFE46616A}" - } - Default - { - throw "Unknown version of Data Protection Manager!" - } - } - - if(Get-WmiObject -Class Win32_Product | Where-Object {$_.IdentifyingNumber -eq $IdentifyingNumber}) - { - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - else - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\DataProtectionManager", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "SCDPM\setup.exe" - if(!(Test-Path -Path $Path)) - { - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "setup.exe" - } - $Path = ResolvePath $Path - - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - - switch($Version) - { - "4.2.1205.0" - { - $IdentifyingNumber = "{DFF93860-2113-4207-A7AC-3901ABCE8002}" - } - "4.3.1012.0" - { - $IdentifyingNumber = "{846183DF-CF1D-4310-BA7A-EF5EFE46616A}" - } - Default - { - throw "Unknown version of Data Protection Manager!" - } - } - - $Path = ResolvePath "msiexec.exe" - switch($Ensure) - { - "Present" - { - $MSIPath = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "\SCDPM\DPM2012\dpmcli\dpmui.msi" - $Arguments = "/q /i $MSIPath ALLUSERS=2 BOOTSTRAPPED=1" - } - "Absent" - { - $Arguments = "" - } - } - - Write-Verbose "Path: $Path" - Write-Verbose "Arguments: $Arguments" - - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - - if(Test-Path -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations') - { - $global:DSCMachineStatus = 1 - } - else - { - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\DataProtectionManager", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMConsoleSetup/MSFT_xSCDPMConsoleSetup.schema.mof b/lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMConsoleSetup/MSFT_xSCDPMConsoleSetup.schema.mof deleted file mode 100644 index 0d6cb703..00000000 --- a/lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMConsoleSetup/MSFT_xSCDPMConsoleSetup.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCDPMConsoleSetup")] -class MSFT_xSCDPMConsoleSetup : OMI_BaseResource -{ - [Key, Description("An enumerated value that describes if the DPM console is expected to be installed on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; -}; diff --git a/lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMDatabaseServerSetup/MSFT_xSCDPMDatabaseServerSetup.psm1 b/lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMDatabaseServerSetup/MSFT_xSCDPMDatabaseServerSetup.psm1 deleted file mode 100644 index a459d969..00000000 --- a/lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMDatabaseServerSetup/MSFT_xSCDPMDatabaseServerSetup.psm1 +++ /dev/null @@ -1,178 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\DataProtectionManager", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "SCDPM\SQLPrepInstaller\SQLPrepInstaller_x64.exe" - if(!(Test-Path -Path $Path)) - { - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "SQLPrepInstaller\SQLPrepInstaller_x64.exe" - } - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.FileVersion - - switch($Version) - { - "4.2.1205.0" - { - $IdentifyingNumber = "{1CAEC48E-A90B-4AA2-BB81-ACAA3795430D}" - } - "4.3.1012.0" - { - $IdentifyingNumber = "{47FC5EEB-8197-4D77-8131-3FBA29508825}" - } - Default - { - throw "Unknown version of Data Protection Manager!" - } - } - - if(Get-WmiObject -Class Win32_Product | Where-Object {$_.IdentifyingNumber -eq $IdentifyingNumber}) - { - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - else - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\DataProtectionManager", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "SCDPM\SQLPrepInstaller\SQLPrepInstaller_x64.exe" - if(!(Test-Path -Path $Path)) - { - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "SQLPrepInstaller\SQLPrepInstaller_x64.exe" - } - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.FileVersion - - switch($Version) - { - "4.2.1205.0" - { - $IdentifyingNumber = "{1CAEC48E-A90B-4AA2-BB81-ACAA3795430D}" - } - "4.3.1012.0" - { - $IdentifyingNumber = "{47FC5EEB-8197-4D77-8131-3FBA29508825}" - } - Default - { - throw "Unknown version of Data Protection Manager!" - } - } - - switch($Ensure) - { - "Present" - { - $Arguments = "/q" - } - "Absent" - { - $Path = "msiexec.exe" - $Path = ResolvePath $Path - - $Arguments = "/qn /x $IdentifyingNumber" - } - } - - Write-Verbose "Path: $Path" - Write-Verbose "Arguments: $Arguments" - - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - - if(Test-Path -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations') - { - $global:DSCMachineStatus = 1 - } - else - { - if(!(Test-TargetResource -SourcePath $SourcePath -SourceFolder $SourceFolder -SetupCredential $SetupCredential)) - { - throw "Set-TargetResouce failed" - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\DataProtectionManager", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - - $result = ((Get-TargetResource -SourcePath $SourcePath -SourceFolder $SourceFolder -SetupCredential $SetupCredential).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMDatabaseServerSetup/MSFT_xSCDPMDatabaseServerSetup.schema.mof b/lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMDatabaseServerSetup/MSFT_xSCDPMDatabaseServerSetup.schema.mof deleted file mode 100644 index 6f572211..00000000 --- a/lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMDatabaseServerSetup/MSFT_xSCDPMDatabaseServerSetup.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCDPMDatabaseServerSetup")] -class MSFT_xSCDPMDatabaseServerSetup : OMI_BaseResource -{ - [Write, Description("An enumerated value that describes if the DPM database support files are expected to be installed on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Key, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; -}; diff --git a/lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMServerSetup/MSFT_xSCDPMServerSetup.psm1 b/lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMServerSetup/MSFT_xSCDPMServerSetup.psm1 deleted file mode 100644 index a1e3f44c..00000000 --- a/lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMServerSetup/MSFT_xSCDPMServerSetup.psm1 +++ /dev/null @@ -1,373 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\DataProtectionManager", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.String] - $UserName, - - [System.String] - $CompanyName, - - [System.String] - $ProductKey, - - [System.String] - $ProgramFiles, - - [parameter(Mandatory = $true)] - [System.String] - $YukonMachineName, - - [parameter(Mandatory = $true)] - [System.String] - $YukonInstanceName, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $YukonMachineCredential, - - [parameter(Mandatory = $true)] - [System.String] - $ReportingMachineName, - - [parameter(Mandatory = $true)] - [System.String] - $ReportingInstanceName, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $ReportingMachineCredential - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "SCDPM\setup.exe" - if(!(Test-Path -Path $Path)) - { - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "setup.exe" - } - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - - switch($Version) - { - "4.2.1205.0" - { - $IdentifyingNumber = "{99EFD904-A89C-4116-91C9-80FD7FD40DA7}" - } - "4.3.1012.0" - { - $IdentifyingNumber = "{F8CD20E6-186D-4F7D-AAAB-5A3190DA8356}" - } - Default - { - throw "Unknown version of Data Protection Manager!" - } - } - - if(Get-WmiObject -Class Win32_Product | Where-Object {$_.IdentifyingNumber -eq $IdentifyingNumber}) - { - $UserName = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft Data Protection Manager\Setup" -Name "RegisteredUserName").RegisteredUserName - $CompanyName = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft Data Protection Manager\Setup" -Name "RegisteredOrgName").RegisteredOrgName - $ProgramFiles = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft Data Protection Manager\Setup" -Name "InstallPath").InstallPath - $YukonMachineName = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft Data Protection Manager\DB" -Name "SqlServer").SqlServer - $YukonInstanceName = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft Data Protection Manager\DB" -Name "InstanceName").InstanceName - $ReportingMachineName = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft Data Protection Manager\DB" -Name "ReportingServer").ReportingServer - $ReportingInstanceName = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft Data Protection Manager\DB" -Name "ReportingInstanceName").ReportingInstanceName - - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - UserName = $UserName - CompanyName = $CompanyName - ProgramFiles = $ProgramFiles - YukonMachineName = $YukonMachineName - YukonInstanceName = $YukonInstanceName - ReportingMachineName = $ReportingMachineName - ReportingInstanceName = $ReportingInstanceName - } - } - else - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\DataProtectionManager", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.String] - $UserName = "UserName", - - [System.String] - $CompanyName = "CompanyName", - - [System.String] - $ProductKey, - - [System.String] - $ProgramFiles, - - [parameter(Mandatory = $true)] - [System.String] - $YukonMachineName, - - [parameter(Mandatory = $true)] - [System.String] - $YukonInstanceName, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $YukonMachineCredential, - - [parameter(Mandatory = $true)] - [System.String] - $ReportingMachineName, - - [parameter(Mandatory = $true)] - [System.String] - $ReportingInstanceName, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $ReportingMachineCredential - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "SCDPM\setup.exe" - if(!(Test-Path -Path $Path)) - { - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "setup.exe" - } - $Path = ResolvePath $Path - - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - - switch($Version) - { - "4.2.1205.0" - { - $IdentifyingNumber = "{99EFD904-A89C-4116-91C9-80FD7FD40DA7}" - } - "4.3.1012.0" - { - $IdentifyingNumber = "{F8CD20E6-186D-4F7D-AAAB-5A3190DA8356}" - } - Default - { - throw "Unknown version of Data Protection Manager!" - } - } - - if ($PSBoundParameters.ContainsKey("ProgramFiles") -and (!($ProgramFiles -contains "%ProgramFiles%"))) - { - $ProgramFiles = $ProgramFiles.Replace("\Microsoft System Center 2012 R2\DPM","") - } - else - { - $ProgramFiles = [Environment]::ExpandEnvironmentVariables($ProgramFiles) - } - if($PSBoundParameters.ContainsKey("ProductKey")) - { - $autorun = Get-Content (Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "autorun.inf") - if ($autorun -contains "sku=evaluation") - { - Throw "ProductKey cannot be used with evaluation media!" - } - } - $TempFile = [IO.Path]::GetTempFileName() - $INIFile = @() - $INIFile += "[Options]" - $INIFileVars = @( - "UserName", - "CompanyName", - "ProductKey", - "ProgramFiles", - "YukonInstanceName", - "ReportingInstanceName" - ) - foreach($INIFileVar in $INIFileVars) - { - if((Get-Variable -Name $INIFileVar).Value -ne "") - { - $INIFile += "$INIFileVar=" + (Get-Variable -Name $INIFileVar).Value - } - } - $INIFileVars = @( - "YukonMachineName", - "ReportingMachineName" - ) - foreach($INIFileVar in $INIFileVars) - { - if((Get-Variable -Name $INIFileVar).Value -ne "") - { - $INIFile += "$INIFileVar=" + (Get-Variable -Name $INIFileVar).Value.Split(".")[0] - } - } - $AccountVars = @("YukonMachineCredential","ReportingMachineCredential") - foreach($AccountVar in $AccountVars) - { - $INIFile += $AccountVar.Replace("Credential","UserName") + "=" + (Get-Variable -Name $AccountVar).Value.GetNetworkCredential().UserName - $INIFile += $AccountVar.Replace("Credential","Password") + "=" + (Get-Variable -Name $AccountVar).Value.GetNetworkCredential().Password - $INIFile += $AccountVar.Replace("Credential","DomainName") + "=" + (Get-Variable -Name $AccountVar).Value.GetNetworkCredential().Domain - } - Write-Verbose "INIFile: $TempFile" - foreach($Line in $INIFile) - { - Add-Content -Path $TempFile -Value $Line -Encoding Ascii - # Replace sensitive values for verbose output - $LogLine = $Line - if($ProductKey -ne "") - { - $LogLine = $LogLine.Replace($ProductKey,"*****-*****-*****-*****-*****") - } - $LogVars = @("YukonMachineCredential","ReportingMachineCredential") - foreach($LogVar in $LogVars) - { - if((Get-Variable -Name $LogVar).Value -ne "") - { - $LogLine = $LogLine.Replace((Get-Variable -Name $LogVar).Value.GetNetworkCredential().Password,"********") - } - } - Write-Verbose $LogLine - } - - switch($Ensure) - { - "Present" - { - $Arguments = " /i /f $TempFile /q" - } - "Absent" - { - $Arguments = " /x /f $TempFile /q" - } - } - - Write-Verbose "Path: $Path" - Write-Verbose "Arguments: $Arguments" - - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - - Remove-Item $TempFile - - if(Test-Path -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations') - { - $global:DSCMachineStatus = 1 - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\DataProtectionManager", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.String] - $UserName, - - [System.String] - $CompanyName, - - [System.String] - $ProductKey, - - [System.String] - $ProgramFiles, - - [parameter(Mandatory = $true)] - [System.String] - $YukonMachineName, - - [parameter(Mandatory = $true)] - [System.String] - $YukonInstanceName, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $YukonMachineCredential, - - [parameter(Mandatory = $true)] - [System.String] - $ReportingMachineName, - - [parameter(Mandatory = $true)] - [System.String] - $ReportingInstanceName, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $ReportingMachineCredential - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMServerSetup/MSFT_xSCDPMServerSetup.schema.mof b/lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMServerSetup/MSFT_xSCDPMServerSetup.schema.mof deleted file mode 100644 index da346ef2..00000000 --- a/lib/puppet_x/dsc_resources/xSCDPM/DSCResources/MSFT_xSCDPMServerSetup/MSFT_xSCDPMServerSetup.schema.mof +++ /dev/null @@ -1,18 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCDPMServerSetup")] -class MSFT_xSCDPMServerSetup : OMI_BaseResource -{ - [Key, Description("An enumerated value that describes if the DPM server is expected to be installed on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("UNC path to the root of the source filesfor installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; - [Write, Description("User name that the software will be registered to.")] String UserName; - [Write, Description("Company name that the software will be registered to.")] String CompanyName; - [Write, Description("Product key for licensed installations.")] String ProductKey; - [Write, Description("Installation path for the software.")] String ProgramFiles; - [Required, Description("Name of the SQL server for the DPM database.")] String YukonMachineName; - [Required, Description("SQL instance for the DPM database.")] String YukonInstanceName; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to access the SQL instance for DPM at installation time.")] String YukonMachineCredential; - [Required, Description("Name of the SQL server for reporting.")] String ReportingMachineName; - [Required, Description("SQL instance for reporting.")] String ReportingInstanceName; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to access SQL reporting for DPM at installation time.")] String ReportingMachineCredential; -}; diff --git a/lib/puppet_x/dsc_resources/xSCDPM/LICENSE b/lib/puppet_x/dsc_resources/xSCDPM/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xSCDPM/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xSCDPM/en-US/xPDT.strings.psd1 b/lib/puppet_x/dsc_resources/xSCDPM/en-US/xPDT.strings.psd1 deleted file mode 100644 index 11f213c1..00000000 --- a/lib/puppet_x/dsc_resources/xSCDPM/en-US/xPDT.strings.psd1 +++ /dev/null @@ -1,10 +0,0 @@ -ConvertFrom-StringData @' -FileNotFound=File not found in the environment path -AbsolutePathOrFileName=Absolute path or file name expected -InvalidArgument=Invalid argument: '{0}' with value: '{1}' -InvalidArgumentAndMessage={0} {1} -ErrorStarting=Failure starting process matching path '{0}'. Message: {1} -FailureWaitingForProcessesToStart=Failed to wait for processes to start -ProcessStarted=Process matching path '{0}' started in process ID {1} -ProcessAlreadyStarted=Process matching path '{0}' already started in process ID {1} -'@ diff --git a/lib/puppet_x/dsc_resources/xSCDPM/xPDT.psm1 b/lib/puppet_x/dsc_resources/xSCDPM/xPDT.psm1 deleted file mode 100644 index c90beaa1..00000000 --- a/lib/puppet_x/dsc_resources/xSCDPM/xPDT.psm1 +++ /dev/null @@ -1,708 +0,0 @@ -data LocalizedData -{ - ConvertFrom-StringData @' - -FileNotFound=File not found in the environment path -AbsolutePathOrFileName=Absolute path or file name expected -InvalidArgument=Invalid argument: '{0}' with value: '{1}' -InvalidArgumentAndMessage={0} {1} -ErrorStarting=Failure starting process matching path '{0}'. Message: {1} -FailureWaitingForProcessesToStart=Failed to wait for processes to start -ProcessStarted=Process matching path '{0}' started in process ID {1} -ProcessAlreadyStarted=Process matching path '{0}' already started in process ID {1} -'@ -} - -Import-LocalizedData LocalizedData -filename xPDT.strings.psd1 - -function ThrowInvalidArgumentError -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $errorId, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $errorMessage - ) - - $errorCategory=[System.Management.Automation.ErrorCategory]::InvalidArgument - $exception = New-Object System.ArgumentException $errorMessage; - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - throw $errorRecord -} - -function ResolvePath -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Path - ) - - $Path = [Environment]::ExpandEnvironmentVariables($Path) - if(IsRootedPath $Path) - { - if(!(Test-Path $Path -PathType Leaf)) - { - ThrowInvalidArgumentError "CannotFindRootedPath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) - } - return $Path - } - if([string]::IsNullOrEmpty($env:Path)) - { - ThrowInvalidArgumentError "EmptyEnvironmentPath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) - } - if((Split-Path $Path -Leaf) -ne $Path) - { - ThrowInvalidArgumentError "NotAbsolutePathOrFileName" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.AbsolutePathOrFileName) - } - foreach($rawSegment in $env:Path.Split(";")) - { - $segment = [Environment]::ExpandEnvironmentVariables($rawSegment) - $segmentRooted = $false - try - { - $segmentRooted=[IO.Path]::IsPathRooted($segment) - } - catch {} - if(!$segmentRooted) - { - continue - } - $candidate = join-path $segment $Path - if(Test-Path $candidate -PathType Leaf) - { - return $candidate - } - } - ThrowInvalidArgumentError "CannotFindRelativePath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) -} - -function IsRootedPath -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path - ) - - try - { - return [IO.Path]::IsPathRooted($Path) - } - catch - { - ThrowInvalidArgumentError "CannotGetIsPathRooted" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $_.Exception.Message) - } -} - -function ExtractArguments -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - $functionBoundParameters, - - [parameter(Mandatory = $true)] - [string[]] - $argumentNames, - - [string[]] - $newArgumentNames - ) - - $returnValue=@{} - - for($i=0;$i -lt $argumentNames.Count;$i++) - { - $argumentName = $argumentNames[$i] - - if($newArgumentNames -eq $null) - { - $newArgumentName = $argumentName - } - else - { - $newArgumentName = $newArgumentNames[$i] - } - - if($functionBoundParameters.ContainsKey($argumentName)) - { - $null = $returnValue.Add($newArgumentName,$functionBoundParameters[$argumentName]) - } - } - - return $returnValue -} - -function CallPInvoke -{ - $script:ProgramSource = @" -using System; -using System.Collections.Generic; -using System.Text; -using System.Security; -using System.Runtime.InteropServices; -using System.Diagnostics; -using System.Security.Principal; -using System.ComponentModel; -using System.IO; - -namespace Source -{ - [SuppressUnmanagedCodeSecurity] - public static class NativeMethods - { - //The following structs and enums are used by the various Win32 API's that are used in the code below - - [StructLayout(LayoutKind.Sequential)] - public struct STARTUPINFO - { - public Int32 cb; - public string lpReserved; - public string lpDesktop; - public string lpTitle; - public Int32 dwX; - public Int32 dwY; - public Int32 dwXSize; - public Int32 dwXCountChars; - public Int32 dwYCountChars; - public Int32 dwFillAttribute; - public Int32 dwFlags; - public Int16 wShowWindow; - public Int16 cbReserved2; - public IntPtr lpReserved2; - public IntPtr hStdInput; - public IntPtr hStdOutput; - public IntPtr hStdError; - } - - [StructLayout(LayoutKind.Sequential)] - public struct PROCESS_INFORMATION - { - public IntPtr hProcess; - public IntPtr hThread; - public Int32 dwProcessID; - public Int32 dwThreadID; - } - - [Flags] - public enum LogonType - { - LOGON32_LOGON_INTERACTIVE = 2, - LOGON32_LOGON_NETWORK = 3, - LOGON32_LOGON_BATCH = 4, - LOGON32_LOGON_SERVICE = 5, - LOGON32_LOGON_UNLOCK = 7, - LOGON32_LOGON_NETWORK_CLEARTEXT = 8, - LOGON32_LOGON_NEW_CREDENTIALS = 9 - } - - [Flags] - public enum LogonProvider - { - LOGON32_PROVIDER_DEFAULT = 0, - LOGON32_PROVIDER_WINNT35, - LOGON32_PROVIDER_WINNT40, - LOGON32_PROVIDER_WINNT50 - } - [StructLayout(LayoutKind.Sequential)] - public struct SECURITY_ATTRIBUTES - { - public Int32 Length; - public IntPtr lpSecurityDescriptor; - public bool bInheritHandle; - } - - public enum SECURITY_IMPERSONATION_LEVEL - { - SecurityAnonymous, - SecurityIdentification, - SecurityImpersonation, - SecurityDelegation - } - - public enum TOKEN_TYPE - { - TokenPrimary = 1, - TokenImpersonation - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - internal struct TokPriv1Luid - { - public int Count; - public long Luid; - public int Attr; - } - - public const int GENERIC_ALL_ACCESS = 0x10000000; - public const int CREATE_NO_WINDOW = 0x08000000; - internal const int SE_PRIVILEGE_ENABLED = 0x00000002; - internal const int TOKEN_QUERY = 0x00000008; - internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; - internal const string SE_INCRASE_QUOTA = "SeIncreaseQuotaPrivilege"; - - [DllImport("kernel32.dll", - EntryPoint = "CloseHandle", SetLastError = true, - CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] - public static extern bool CloseHandle(IntPtr handle); - - [DllImport("advapi32.dll", - EntryPoint = "CreateProcessAsUser", SetLastError = true, - CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] - public static extern bool CreateProcessAsUser( - IntPtr hToken, - string lpApplicationName, - string lpCommandLine, - ref SECURITY_ATTRIBUTES lpProcessAttributes, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - bool bInheritHandle, - Int32 dwCreationFlags, - IntPtr lpEnvrionment, - string lpCurrentDirectory, - ref STARTUPINFO lpStartupInfo, - ref PROCESS_INFORMATION lpProcessInformation - ); - - [DllImport("advapi32.dll", EntryPoint = "DuplicateTokenEx")] - public static extern bool DuplicateTokenEx( - IntPtr hExistingToken, - Int32 dwDesiredAccess, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - Int32 ImpersonationLevel, - Int32 dwTokenType, - ref IntPtr phNewToken - ); - - [DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)] - public static extern Boolean LogonUser( - String lpszUserName, - String lpszDomain, - String lpszPassword, - LogonType dwLogonType, - LogonProvider dwLogonProvider, - out IntPtr phToken - ); - - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern bool AdjustTokenPrivileges( - IntPtr htok, - bool disall, - ref TokPriv1Luid newst, - int len, - IntPtr prev, - IntPtr relen - ); - - [DllImport("kernel32.dll", ExactSpelling = true)] - internal static extern IntPtr GetCurrentProcess(); - - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern bool OpenProcessToken( - IntPtr h, - int acc, - ref IntPtr phtok - ); - - [DllImport("advapi32.dll", SetLastError = true)] - internal static extern bool LookupPrivilegeValue( - string host, - string name, - ref long pluid - ); - - public static void CreateProcessAsUser(string strCommand, string strDomain, string strName, string strPassword) - { - var hToken = IntPtr.Zero; - var hDupedToken = IntPtr.Zero; - TokPriv1Luid tp; - var pi = new PROCESS_INFORMATION(); - var sa = new SECURITY_ATTRIBUTES(); - sa.Length = Marshal.SizeOf(sa); - Boolean bResult = false; - try - { - bResult = LogonUser( - strName, - strDomain, - strPassword, - LogonType.LOGON32_LOGON_BATCH, - LogonProvider.LOGON32_PROVIDER_DEFAULT, - out hToken - ); - if (!bResult) - { - throw new Win32Exception("The user could not be logged on. Ensure that the user has an existing profile on the machine and that correct credentials are provided. Logon error #" + Marshal.GetLastWin32Error().ToString()); - } - IntPtr hproc = GetCurrentProcess(); - IntPtr htok = IntPtr.Zero; - bResult = OpenProcessToken( - hproc, - TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, - ref htok - ); - if(!bResult) - { - throw new Win32Exception("Open process token error #" + Marshal.GetLastWin32Error().ToString()); - } - tp.Count = 1; - tp.Luid = 0; - tp.Attr = SE_PRIVILEGE_ENABLED; - bResult = LookupPrivilegeValue( - null, - SE_INCRASE_QUOTA, - ref tp.Luid - ); - if(!bResult) - { - throw new Win32Exception("Error in looking up privilege of the process. This should not happen if DSC is running as LocalSystem Lookup privilege error #" + Marshal.GetLastWin32Error().ToString()); - } - bResult = AdjustTokenPrivileges( - htok, - false, - ref tp, - 0, - IntPtr.Zero, - IntPtr.Zero - ); - if(!bResult) - { - throw new Win32Exception("Token elevation error #" + Marshal.GetLastWin32Error().ToString()); - } - - bResult = DuplicateTokenEx( - hToken, - GENERIC_ALL_ACCESS, - ref sa, - (int)SECURITY_IMPERSONATION_LEVEL.SecurityIdentification, - (int)TOKEN_TYPE.TokenPrimary, - ref hDupedToken - ); - if(!bResult) - { - throw new Win32Exception("Duplicate Token error #" + Marshal.GetLastWin32Error().ToString()); - } - var si = new STARTUPINFO(); - si.cb = Marshal.SizeOf(si); - si.lpDesktop = ""; - bResult = CreateProcessAsUser( - hDupedToken, - null, - strCommand, - ref sa, - ref sa, - false, - 0, - IntPtr.Zero, - null, - ref si, - ref pi - ); - if(!bResult) - { - throw new Win32Exception("The process could not be created. Create process as user error #" + Marshal.GetLastWin32Error().ToString()); - } - } - finally - { - if (pi.hThread != IntPtr.Zero) - { - CloseHandle(pi.hThread); - } - if (pi.hProcess != IntPtr.Zero) - { - CloseHandle(pi.hProcess); - } - if (hDupedToken != IntPtr.Zero) - { - CloseHandle(hDupedToken); - } - } - } - } -} - -"@ - Add-Type -TypeDefinition $ProgramSource -ReferencedAssemblies "System.ServiceProcess" -} - -function GetWin32Process -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential - ) - - $fileName = [io.path]::GetFileNameWithoutExtension($Path) - $GetProcesses = @(Get-Process -Name $fileName -ErrorAction SilentlyContinue) - $Processes = foreach($process in $GetProcesses) - { - if($Process.Path -ieq $Path) - { - try - { - [wmi]"Win32_Process.Handle='$($Process.Id)'" - } - catch - { - } - } - } - if($PSBoundParameters.ContainsKey('Credential')) - { - $Processes = $Processes | Where-Object {(GetWin32ProcessOwner $_) -eq $Credential.UserName} - } - if($Arguments -eq $null) {$Arguments = ""} - $Processes = $Processes | Where-Object {(GetWin32ProcessArgumentsFromCommandLine $_.CommandLine) -eq $Arguments} - - return $Processes -} - -function GetWin32ProcessOwner -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNull()] - $Process - ) - - try - { - $Owner = $Process.GetOwner() - } - catch - {} - if($owner.Domain -ne $null) - { - return $Owner.Domain + "\" + $Owner.User - } - else - { - return $Owner.User - } -} - -function GetWin32ProcessArgumentsFromCommandLine -{ - param - ( - [String] - $commandLine - ) - - if($commandLine -eq $null) - { - return "" - } - $commandLine=$commandLine.Trim() - if($commandLine.Length -eq 0) - { - return "" - } - if($commandLine[0] -eq '"') - { - $charToLookfor=[char]'"' - } - else - { - $charToLookfor=[char]' ' - } - $endOfCommand=$commandLine.IndexOf($charToLookfor ,1) - if($endOfCommand -eq -1) - { - return "" - } - return $commandLine.Substring($endOfCommand+1).Trim() -} - -function StartWin32Process -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential, - - [Switch] - $AsTask - ) - - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - $Processes = @(GetWin32Process @getArguments) - if ($processes.Count -eq 0) - { - if($PSBoundParameters.ContainsKey("Credential")) - { - if($AsTask) - { - $ActionArguments = ExtractArguments $PSBoundParameters ` - ("Path", "Arguments") ` - ("Execute", "Argument") - if([string]::IsNullOrEmpty($Arguments)) - { - $null = $ActionArguments.Remove("Argument") - } - $TaskGuid = [guid]::NewGuid().ToString() - $Action = New-ScheduledTaskAction @ActionArguments - $null = Register-ScheduledTask -TaskName "xPDT $TaskGuid" -Action $Action -User $Credential.UserName -Password $Credential.GetNetworkCredential().Password -RunLevel Highest - $err = Start-ScheduledTask -TaskName "xPDT $TaskGuid" - } - else - { - try - { - CallPInvoke - [Source.NativeMethods]::CreateProcessAsUser(("$Path " + $Arguments),$Credential.GetNetworkCredential().Domain,$Credential.GetNetworkCredential().UserName,$Credential.GetNetworkCredential().Password) - } - catch - { - $exception = New-Object System.ArgumentException $_ - $errorCategory = [System.Management.Automation.ErrorCategory]::OperationStopped - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, "Win32Exception", $errorCategory, $null - $err = $errorRecord - } - } - } - else - { - $StartArguments = ExtractArguments $PSBoundParameters ` - ("Path", "Arguments", "Credential") ` - ("FilePath", "ArgumentList", "Credential") - if([string]::IsNullOrEmpty($Arguments)) - { - $null = $StartArguments.Remove("ArgumentList") - } - $err = Start-Process @StartArguments - } - if($err -ne $null) - { - throw $err - } - if (!(WaitForWin32ProcessStart @GetArguments)) - { - ThrowInvalidArgumentError "FailureWaitingForProcessesToStart" ($LocalizedData.ErrorStarting -f $Path,$LocalizedData.FailureWaitingForProcessesToStart) - } - } - else - { - return ($LocalizedData.ProcessAlreadyStarted -f $Path,$Processes.ProcessId) - } - $Processes = @(GetWin32Process @getArguments) - return ($LocalizedData.ProcessStarted -f $Path,$Processes.ProcessId) -} - -function WaitForWin32ProcessStart -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential - ) - - $start = [DateTime]::Now - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - do - { - $value = @(GetWin32Process @GetArguments).Count -ge 1 - } while(!$value -and ([DateTime]::Now - $start).TotalMilliseconds -lt 60000) - - return $value -} - -function WaitForWin32ProcessEnd -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential - ) - - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - While (WaitForWin32ProcessStart @GetArguments) - { - Start-Sleep 1 - } - Get-ScheduledTask | Where-Object {($_.TaskName.Length -ge 4) -and ($_.TaskName.Substring(0,4) -eq "xPDT") -and ($_.Actions.Execute -eq $Path) -and ($_.Actions.Arguments -eq $Arguments)} | Where-Object {$_ -ne $null} | Unregister-ScheduledTask -Confirm:$false -} - -function NetUse -{ - param - ( - [parameter(Mandatory)] - [string] - $SourcePath, - - [parameter(Mandatory)] - [PSCredential] - $Credential, - - [string] - $Ensure = "Present" - ) - - if(($SourcePath.Length -ge 2) -and ($SourcePath.Substring(0,2) -eq "\\")) - { - - if ($Ensure -eq "Absent") - { - $cmd = "net.exe use $SourcePath /del" - } - else - { - $cmd = "net.exe use $SourcePath $($Credential.GetNetworkCredential().Password) /user:$($Credential.GetNetworkCredential().Domain)\$($Credential.GetNetworkCredential().UserName)" - } - Invoke-Expression $cmd - } -} - -Export-ModuleMember ResolvePath,StartWin32Process,WaitForWin32ProcessEnd,NetUse diff --git a/lib/puppet_x/dsc_resources/xSCDPM/xSCDPM.psd1 b/lib/puppet_x/dsc_resources/xSCDPM/xSCDPM.psd1 deleted file mode 100644 index 55003abb..00000000 --- a/lib/puppet_x/dsc_resources/xSCDPM/xSCDPM.psd1 +++ /dev/null @@ -1,31 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '1.2.0.0' - -# ID used to uniquely identify this module -GUID = '321465c3-1ae7-41b7-9ad2-e834140972ad' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module with DSC Resources for deployment and configuration of Microsoft System Center Data Protection Manager.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' -} diff --git a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMAdmin/MSFT_xSCOMAdmin.psm1 b/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMAdmin/MSFT_xSCOMAdmin.psm1 deleted file mode 100644 index f8d946a7..00000000 --- a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMAdmin/MSFT_xSCOMAdmin.psm1 +++ /dev/null @@ -1,147 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $Principal, - - [parameter(Mandatory = $true)] - [System.String] - $UserRole, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SCOMAdminCredential - ) - - $Ensure = Invoke-Command -ComputerName . -Credential $SCOMAdminCredential -Authentication Credssp { - $Ensure = $args[0] - $Principal = $args[1] - $UserRole = $args[2] - $InstallPath = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\System Center Operations Manager\12\Setup" -Name "InstallDirectory").InstallDirectory - if(!(Get-Module -Name OperationsManager)) - { - Import-Module "$InstallPath\PowerShell\OperationsManager" - } - if(Get-Module -Name OperationsManager) - { - if(Get-SCOMUserRole -Name $UserRole | ForEach-Object {$_.Users} | Where-Object {$_ -eq $Principal}) - { - "Present" - } - else - { - "Absent" - } - } - } -ArgumentList @($Ensure,$Principal,$UserRole) - - $returnValue = @{ - Ensure = $Ensure - Principal = $Principal - UserRole = $UserRole - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $Principal, - - [parameter(Mandatory = $true)] - [System.String] - $UserRole, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SCOMAdminCredential - ) - - Invoke-Command -ComputerName . -Credential $SCOMAdminCredential -Authentication Credssp { - $Ensure = $args[0] - $Principal = $args[1] - $UserRole = $args[2] - $InstallPath = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\System Center Operations Manager\12\Setup" -Name "InstallDirectory").InstallDirectory - if(!(Get-Module -Name OperationsManager)) - { - Import-Module "$InstallPath\PowerShell\OperationsManager" - } - if(Get-Module -Name OperationsManager) - { - $UR = Get-SCOMUserRole -Name $UserRole - switch($Ensure) - { - "Present" - { - if(!(Get-SCOMUserRole -Name $UserRole | ForEach-Object {$_.Users} | Where-Object {$_ -eq $Principal})) - { - $NewUsers = ($UR.Users + $Principal) - } - } - "Absent" - { - if(Get-SCOMUserRole -Name $UserRole | ForEach-Object {$_.Users} | Where-Object {$_ -eq $Principal}) - { - $NewUsers = $UR.Users | Where-Object {$_ -ne $Principal} - } - } - } - Set-SCOMUserRole -UserRole $UR -User $NewUsers - } - } -ArgumentList @($Ensure,$Principal,$UserRole) - - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $Principal, - - [parameter(Mandatory = $true)] - [System.String] - $UserRole, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SCOMAdminCredential - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMAdmin/MSFT_xSCOMAdmin.schema.mof b/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMAdmin/MSFT_xSCOMAdmin.schema.mof deleted file mode 100644 index 156222f6..00000000 --- a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMAdmin/MSFT_xSCOMAdmin.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCOMAdmin")] -class MSFT_xSCOMAdmin : OMI_BaseResource -{ - [Write, Description("An enumerated value that describes if the principal is an Operations Manager admin.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Key, Description("The Operations Manager admin principal.")] String Principal; - [Key, Description("The Operations Manager user role.")] String UserRole; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the operations.")] String SCOMAdminCredential; -}; diff --git a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMConsoleSetup/MSFT_xSCOMConsoleSetup.psm1 b/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMConsoleSetup/MSFT_xSCOMConsoleSetup.psm1 deleted file mode 100644 index 70648e4e..00000000 --- a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMConsoleSetup/MSFT_xSCOMConsoleSetup.psm1 +++ /dev/null @@ -1,256 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\OperationsManager.en", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.String] - $InstallPath, - - [System.Byte] - $UseMicrosoftUpdate, - - [System.Byte] - $SendCEIPReports, - - [ValidateSet("Never","Queued","Always")] - [System.String] - $EnableErrorReporting = "Never", - - [System.Byte] - $SendODRReports - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "setup.exe" - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - - switch($Version) - { - "7.1.10226.0" - { - $IdentifyingNumber = "{041C3416-87CE-4B02-918E-6FDC95F241D3}" - $InstallRegVersion = "12" - } - "7.2.10015.0" - { - $IdentifyingNumber = "{F67729BD-18CF-4283-A6FC-F388A463EC01}" - $InstallRegVersion = "12" - } - Default - { - throw "Unknown version of Operations Manager!" - } - } - - if(Get-WmiObject -Class Win32_Product | Where-Object {$_.IdentifyingNumber -eq $IdentifyingNumber}) - { - $InstallPath = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\System Center Operations Manager\$InstallRegVersion\Setup" -Name "InstallDirectory").InstallDirectory - - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - InstallPath = $InstallPath - } - } - else - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\OperationsManager.en", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.String] - $InstallPath, - - [System.Byte] - $UseMicrosoftUpdate, - - [System.Byte] - $SendCEIPReports, - - [ValidateSet("Never","Queued","Always")] - [System.String] - $EnableErrorReporting = "Never", - - [System.Byte] - $SendODRReports - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "setup.exe" - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - - switch($Version) - { - "7.1.10226.0" - { - $IdentifyingNumber = "{041C3416-87CE-4B02-918E-6FDC95F241D3}" - } - "7.2.10015.0" - { - $IdentifyingNumber = "{F67729BD-18CF-4283-A6FC-F388A463EC01}" - } - Default - { - throw "Unknown version of Operations Manager!" - } - } - - switch($Ensure) - { - "Present" - { - # Set defaults, if they couldn't be set in param due to null configdata input - if($UseMicrosoftUpdate -ne 1) - { - $UseMicrosoftUpdate = 0 - } - if($SendCEIPReports -ne 1) - { - $SendCEIPReports = 0 - } - if($SendODRReports -ne 1) - { - $SendODRReports = 0 - } - - # Create install arguments - $Arguments = "/silent /install /AcceptEndUserLicenseAgreement:1 /components:OMConsole" - $ArgumentVars = @( - "InstallPath", - "UseMicrosoftUpdate", - "SendCEIPReports", - "EnableErrorReporting", - "SendODRReports" - ) - foreach($ArgumentVar in $ArgumentVars) - { - if(!([String]::IsNullOrEmpty((Get-Variable -Name $ArgumentVar).Value))) - { - $Arguments += " /$ArgumentVar`:" + [Environment]::ExpandEnvironmentVariables((Get-Variable -Name $ArgumentVar).Value) - } - } - } - "Absent" - { - # Create uninstall arguments - $Arguments = "/silent /uninstall /components:OMConsole" - } - } - - Write-Verbose "Path: $Path" - Write-Verbose "Arguments: $Arguments" - - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential -AsTask - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - - if((Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction SilentlyContinue) -ne $null) - { - $global:DSCMachineStatus = 1 - } - else - { - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\OperationsManager.en", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.String] - $InstallPath, - - [System.Byte] - $UseMicrosoftUpdate, - - [System.Byte] - $SendCEIPReports, - - [ValidateSet("Never","Queued","Always")] - [System.String] - $EnableErrorReporting = "Never", - - [System.Byte] - $SendODRReports - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMConsoleSetup/MSFT_xSCOMConsoleSetup.schema.mof b/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMConsoleSetup/MSFT_xSCOMConsoleSetup.schema.mof deleted file mode 100644 index c37c729b..00000000 --- a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMConsoleSetup/MSFT_xSCOMConsoleSetup.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCOMConsoleSetup")] -class MSFT_xSCOMConsoleSetup : OMI_BaseResource -{ - [Key, Description("An enumerated value that describes if the OM Console is expected to be installed on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; - [Write, Description("Installation path for the software.")] String InstallPath; - [Write, Description("0: Do not opt in to Microsoft Update. 1: Opt in to Microsoft Update.")] UInt8 UseMicrosoftUpdate; - [Write, Description("0: Do not opt in to the Customer Experience Improvement Program (CEIP). 1: Opt in to CEIP.")] UInt8 SendCEIPReports; - [Write, Description("Never: Do not opt in to sending automatic error reports. Queued: Opt in to sending error reports, but queue the reports for review before sending. Always: Opt in to automatically send error reports."), ValueMap{"Never","Queued","Always"}, Values{"Never","Queued","Always"}] String EnableErrorReporting; - [Write, Description("0: Do not opt in to sending operational data reports. 1: opt in to sending operational data reports.")] UInt8 SendODRReports; -}; diff --git a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMConsoleUpdate/MSFT_xSCOMConsoleUpdate.psm1 b/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMConsoleUpdate/MSFT_xSCOMConsoleUpdate.psm1 deleted file mode 100644 index f575544a..00000000 --- a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMConsoleUpdate/MSFT_xSCOMConsoleUpdate.psm1 +++ /dev/null @@ -1,183 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\OperationsManager.en\Updates", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $Version = (Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -eq "System Center Operations Manager 2012 Console"}).Version - - switch($Version) - { - "7.1.10226.0" - { - $ProductCode = "{041C3416-87CE-4B02-918E-6FDC95F241D3}" - $PatchID = "{2BE319B6-DBD6-4F52-9DE1-6EDF1E129F48}" - $Update = "Update Rollup 4" - } - "7.2.10015.0" - { - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - Update = "None" - } - } - $null - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - Default - { - throw "Unknown version of Operations Manager!" - } - } - - if($ProductCode -and $PatchID -and (Get-WmiObject -Class Win32_PatchPackage | Where-Object {($_.ProductCode -eq $ProductCode) -and ($_.PatchID -eq $PatchID)})) - { - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - Update = $Update - } - } - else - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\OperationsManager.en\Updates", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $Version = (Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -eq "System Center Operations Manager 2012 Console"}).Version - - switch($Version) - { - "7.1.10226.0" - { - $UpdateFile = "KB2992020-AMD64-ENU-Console.msp" - } - "7.2.10015.0" - { - Write-Verbose "No update for this version of Operations Manager!" - } - $null - { - Write-Verbose "Operations Manager Console not installed!" - } - Default - { - throw "Unknown version of Operations Manager!" - } - } - - if($UpdateFile) - { - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - $Path = "msiexec.exe" - $Path = ResolvePath $Path - Write-Verbose "Path: $Path" - - $MSPPath = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath $UpdateFile - $MSPPath = ResolvePath $MSPPath - $Arguments = "/update $MSPPath /norestart" - Write-Verbose "Arguments: $Arguments" - - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - } - - if((Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction SilentlyContinue) -ne $null) - { - $global:DSCMachineStatus = 1 - } - else - { - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\OperationsManager.en\Updates", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMConsoleUpdate/MSFT_xSCOMConsoleUpdate.schema.mof b/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMConsoleUpdate/MSFT_xSCOMConsoleUpdate.schema.mof deleted file mode 100644 index 4c538675..00000000 --- a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMConsoleUpdate/MSFT_xSCOMConsoleUpdate.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCOMConsoleUpdate")] -class MSFT_xSCOMConsoleUpdate : OMI_BaseResource -{ - [Key, Description("An enumerated value that describes if the update is expected to be installed on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; - [Read, Description("Display name of the update.")] String Update; -}; diff --git a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementPack/MSFT_xSCOMManagementPack.psm1 b/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementPack/MSFT_xSCOMManagementPack.psm1 deleted file mode 100644 index 511ff29a..00000000 --- a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementPack/MSFT_xSCOMManagementPack.psm1 +++ /dev/null @@ -1,237 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [System.String] - $Version, - - [System.String] - $MinVersion, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SCOMAdminCredential, - - [System.String] - $SourcePath, - - [parameter(Mandatory = $true)] - [System.String] - $SourceFolder, - - [parameter(Mandatory = $true)] - [System.String] - $SourceFile - ) - - $Version = Invoke-Command -ComputerName . -Credential $SCOMAdminCredential { - $Name = $args[0] - Import-Module OperationsManager - [String](Get-SCManagementPack -Name $Name).Version - } -ArgumentList @($Name) - - $returnValue = @{ - Name = $Name - Version = $Version - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [System.String] - $Version, - - [System.String] - $MinVersion, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SCOMAdminCredential, - - [System.String] - $SourcePath, - - [parameter(Mandatory = $true)] - [System.String] - $SourceFolder, - - [parameter(Mandatory = $true)] - [System.String] - $SourceFile - ) - - if([String]::IsNullOrEmpty($SourcePath)) - { - $SourcePath = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\System Center Operations Manager\12\Setup" -Name "InstallDirectory").InstallDirectory - } - $MPFile = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath $SourceFile - - if(Test-Path -Path $MPFile) - { - Write-Verbose "MPFile: $MPFile" - Invoke-Command -ComputerName . -Credential $SCOMAdminCredential -Authentication Credssp { - $MPFile = $args[0] - Import-Module OperationsManager - Import-SCManagementPack $MPFile - } -ArgumentList @($MPFile) - } - - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [System.String] - $Version, - - [System.String] - $MinVersion, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SCOMAdminCredential, - - [System.String] - $SourcePath, - - [parameter(Mandatory = $true)] - [System.String] - $SourceFolder, - - [parameter(Mandatory = $true)] - [System.String] - $SourceFile - ) - - $result = $true - - $MPData = Get-TargetResource @PSBoundParameters - - # Test for MP not installed - if([String]::IsNullOrEmpty($MPData.Version)) - { - $result = $false - } - - if($result) - { - # Test just for MP, no version - if([String]::IsNullOrEmpty($Version) -and [String]::IsNullOrEmpty($MinVersion)) - { - if(![String]::IsNullOrEmpty($MPData.Version)) - { - $result = $true - } - else - { - $result = $false - } - } - - # Test for MP specific version - if(![String]::IsNullOrEmpty($Version)) - { - if($Version -eq $MPData.Version) - { - $result = $true - } - else - { - $result = $false - } - } - # Test for MP minimum version - else - { - $MinVersionArray = $MinVersion.Split(".") - $VersionArray = $MPData.Version.Split(".") - - if($VersionArray[0] -lt $MinVersionArray[0]) - { - $result = $false - } - else - { - if($VersionArray[0] -gt $MinVersionArray[0]) - { - $result = $true - } - else - { - if($VersionArray[1] -lt $MinVersionArray[1]) - { - $result = $false - } - else - { - if($VersionArray[1] -gt $MinVersionArray[1]) - { - $result = $true - } - else - { - if($VersionArray[2] -lt $MinVersionArray[2]) - { - $result = $false - } - else - { - if($VersionArray[2] -gt $MinVersionArray[2]) - { - $result = $true - } - else - { - if($VersionArray[3] -lt $MinVersionArray[3]) - { - $result = $false - } - else - { - if($VersionArray[3] -ge $MinVersionArray[3]) - { - $result = $true - } - } - } - } - } - } - } - } - } - } - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementPack/MSFT_xSCOMManagementPack.schema.mof b/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementPack/MSFT_xSCOMManagementPack.schema.mof deleted file mode 100644 index 5b9bf0ce..00000000 --- a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementPack/MSFT_xSCOMManagementPack.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCOMManagementPack")] -class MSFT_xSCOMManagementPack : OMI_BaseResource -{ - [Key, Description("Name of the Management Pack.")] String Name; - [Write, Description("Specific version of the Management Pack, overrides MinVersion if both set.")] String Version; - [Write, Description("Minimum version of the Management Pack, overridden by Version if both set.")] String MinVersion; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential with admin permissions to Operations Manager.")] String SCOMAdminCredential; - [Write, Description("UNC path to the root of the source files for installation, if omitted the Operations Manager installation folder will be used.")] String SourcePath; - [Required, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, Description("Name of the file in the source folder for the Management Pack.")] String SourceFile; -}; diff --git a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementServerSetup/MSFT_xSCOMManagementServerSetup.psm1 b/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementServerSetup/MSFT_xSCOMManagementServerSetup.psm1 deleted file mode 100644 index 3de2d123..00000000 --- a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementServerSetup/MSFT_xSCOMManagementServerSetup.psm1 +++ /dev/null @@ -1,543 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\OperationsManager.en", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.String] - $ProductKey, - - [System.String] - $InstallPath, - - [parameter(Mandatory = $true)] - [System.String] - $ManagementGroupName, - - [parameter(Mandatory = $true)] - [System.Boolean] - $FirstManagementServer, - - [System.UInt16] - $ManagementServicePort = 5723, - - [System.Management.Automation.PSCredential] - $ActionAccount, - - [System.Management.Automation.PSCredential] - $DASAccount, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $DataReader, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $DataWriter, - - [parameter(Mandatory = $true)] - [System.String] - $SqlServerInstance, - - [System.String] - $DatabaseName = "OperationsManager", - - [System.UInt16] - $DatabaseSize = 1000, - - [parameter(Mandatory = $true)] - [System.String] - $DwSqlServerInstance, - - [System.String] - $DwDatabaseName = "OperationsManagerDW", - - [System.UInt16] - $DwDatabaseSize = 1000, - - [System.Byte] - $UseMicrosoftUpdate, - - [System.Byte] - $SendCEIPReports, - - [ValidateSet("Never","Queued","Always")] - [System.String] - $EnableErrorReporting = "Never", - - [System.Byte] - $SendODRReports - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "setup.exe" - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - - switch($Version) - { - "7.1.10226.0" - { - $IdentifyingNumber = "{C92727BE-BD12-4140-96A6-276BA4F60AC1}" - $InstallRegVersion = "12" - $RegVersion = "3.0" - } - "7.2.10015.0" - { - $IdentifyingNumber = "{43C498CB-D391-4B07-9C03-85C4E8239102}" - $InstallRegVersion = "12" - $RegVersion = "3.0" - } - Default - { - throw "Unknown version of Operations Manager!" - } - } - - if(Get-WmiObject -Class Win32_Product | Where-Object {$_.IdentifyingNumber -eq $IdentifyingNumber}) - { - $InstallPath = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\System Center Operations Manager\$InstallRegVersion\Setup" -Name "InstallDirectory").InstallDirectory - $MGs = Get-ChildItem -Path "HKLM:\SOFTWARE\Microsoft\Microsoft Operations Manager\$RegVersion\Server Management Groups" - foreach($MG in $MGs) - { - $MGReg = $MG.Name.Replace("HKEY_LOCAL_MACHINE\","HKLM:") - if ((Get-ItemProperty -Path $MGReg -Name "IsServer").IsServer -eq 1) - { - $ManagementGroupName = $MG.Name.Split("\")[$MG.Name.Split("\").Count - 1] - $ManagementServicePort = (Get-ItemProperty -Path $MGReg -Name "Port").Port - } - } - $ComputerName = $env:COMPUTERNAME + "." + (Get-WmiObject -Class Win32_ComputerSystem).Domain - if(!(Get-Module -Name OperationsManager)) - { - Import-Module "$InstallPath\PowerShell\OperationsManager" - } - if(Get-Module -Name OperationsManager) - { - $ManagementServer = Get-SCOMManagementServer -Name $ComputerName - $ActionAccountUsername = $ManagementServer.ActionAccountIdentity - $DRA = (Get-SCOMRunAsAccount -Name "Data Warehouse Report Deployment Account") - $DataReaderUsername = $DRA.Domain + "\" + $DRA.UserName - $DWA = (Get-SCOMRunAsAccount -Name "Data Warehouse Action Account") - $DataWriterUsername = $DWA.Domain + "\" + $DWA.UserName - } - $DASAccountUsername = (Get-WmiObject -Class Win32_Service | Where-Object {$_.Name -eq "OMSDK"}).StartName - $SqlServerInstance = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft Operations Manager\$RegVersion\Setup" -Name "DatabaseServerName").DatabaseServerName - $DatabaseName = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft Operations Manager\$RegVersion\Setup" -Name "DatabaseName").DatabaseName - $DwSqlServerInstance = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft Operations Manager\$RegVersion\Setup" -Name "DataWarehouseDBServerName").DataWarehouseDBServerName - $DwDatabaseName = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft Operations Manager\$RegVersion\Setup" -Name "DataWarehouseDBName").DataWarehouseDBName - - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - InstallPath = $InstallPath - ManagementGroupName = $ManagementGroupName - ManagementServicePort = $ManagementServicePort - ActionAccountUsername = $ActionAccountUsername - DASAccountUsername = $DASAccountUsername - DataReaderUsername = $DataReaderUsername - DataWriterUsername = $DataWriterUsername - SqlServerInstance = $SqlServerInstance - DatabaseName = $DatabaseName - DwSqlServerInstance = $DwSqlServerInstance - DwDatabaseName = $DwDatabaseName - } - } - else - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\OperationsManager.en", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.String] - $ProductKey, - - [System.String] - $InstallPath, - - [parameter(Mandatory = $true)] - [System.String] - $ManagementGroupName, - - [parameter(Mandatory = $true)] - [System.Boolean] - $FirstManagementServer, - - [System.UInt16] - $ManagementServicePort = 5723, - - [System.Management.Automation.PSCredential] - $ActionAccount, - - [System.Management.Automation.PSCredential] - $DASAccount, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $DataReader, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $DataWriter, - - [parameter(Mandatory = $true)] - [System.String] - $SqlServerInstance, - - [System.String] - $DatabaseName = "OperationsManager", - - [System.UInt16] - $DatabaseSize = 1000, - - [parameter(Mandatory = $true)] - [System.String] - $DwSqlServerInstance, - - [System.String] - $DwDatabaseName = "OperationsManagerDW", - - [System.UInt16] - $DwDatabaseSize = 1000, - - [System.Byte] - $UseMicrosoftUpdate, - - [System.Byte] - $SendCEIPReports, - - [ValidateSet("Never","Queued","Always")] - [System.String] - $EnableErrorReporting = "Never", - - [System.Byte] - $SendODRReports - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "setup.exe" - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - - switch($Version) - { - "7.1.10226.0" - { - $IdentifyingNumber = "{C92727BE-BD12-4140-96A6-276BA4F60AC1}" - $InstallRegVersion = "12" - } - "7.2.10015.0" - { - $IdentifyingNumber = "{43C498CB-D391-4B07-9C03-85C4E8239102}" - $InstallRegVersion = "12" - } - Default - { - throw "Unknown version of Operations Manager!" - } - } - - switch($Ensure) - { - "Present" - { - # Set defaults, if they couldn't be set in param due to null configdata input - if($ManagementServicePort -eq 0) - { - $ManagementServicePort = 5723 - } - if($DatabaseSize -eq 0) - { - $DatabaseSize = 1000 - } - if($DwDatabaseSize -eq 0) - { - $DwDatabaseSize = 1000 - } - if($UseMicrosoftUpdate -ne 1) - { - $UseMicrosoftUpdate = 0 - } - if($SendCEIPReports -ne 1) - { - $SendCEIPReports = 0 - } - if($SendODRReports -ne 1) - { - $SendODRReports = 0 - } - - # Remove default instance name - $SqlServerInstance = $SqlServerInstance.Replace("\MSSQLSERVER","") - $DwSqlServerInstance = $DwSqlServerInstance.Replace("\MSSQLSERVER","") - - # Create install arguments - $Arguments = "/silent /install /AcceptEndUserLicenseAgreement:1 /components:OMServer" - $ArgumentVars = @( - "InstallPath", - "UseMicrosoftUpdate", - "SendCEIPReports", - "EnableErrorReporting", - "SendODRReports", - "ManagementServicePort", - "SqlServerInstance", - "DatabaseName" - ) - if($FirstManagementServer) - { - $ArgumentVars += @( - "ManagementGroupName", - "DatabaseSize", - "DwSqlServerInstance", - "DwDatabaseName", - "DwDatabaseSize" - ) - } - foreach($ArgumentVar in $ArgumentVars) - { - if(!([String]::IsNullOrEmpty((Get-Variable -Name $ArgumentVar).Value))) - { - $Arguments += " /$ArgumentVar`:" + [Environment]::ExpandEnvironmentVariables((Get-Variable -Name $ArgumentVar).Value) - } - } - $AccountVars = @("ActionAccount","DASAccount","DataReader","DataWriter") - foreach($AccountVar in $AccountVars) - { - if($PSBoundParameters.ContainsKey("ActionAccount") -or $PSBoundParameters.ContainsKey($AccountVar)) - { - $Arguments += " /$AccountVar`User:" + (Get-Variable -Name $AccountVar).Value.UserName - $Arguments += " /$AccountVar`Password:" + (Get-Variable -Name $AccountVar).Value.GetNetworkCredential().Password - } - else - { - if(($AccountVar -eq "ActionAccount") -or ($AccountVar -eq "DASAccount")) - { - $Arguments += " /UseLocalSystem$AccountVar" - } - } - } - - # Replace sensitive values for verbose output - $Log = $Arguments - $LogVars = @("ActionAccount","DASAccount","DataReader","DataWriter") - foreach($LogVar in $LogVars) - { - if((Get-Variable -Name $LogVar).Value -ne "") - { - $Log = $Log.Replace((Get-Variable -Name $LogVar).Value.GetNetworkCredential().Password,"********") - } - } - } - "Absent" - { - # Create uninstall arguments - $Arguments = "/silent /uninstall /components:OMServer" - $Log = $Arguments - } - } - - Write-Verbose "Path: $Path" - Write-Verbose "Arguments: $Log" - - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential -AsTask - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - - # Additional first Management Server "Present" actions - if(($Ensure -eq "Present") -and $FirstManagementServer -and (Get-WmiObject -Class Win32_Product | Where-Object {$_.IdentifyingNumber -eq $IdentifyingNumber})) - { - # Set ProductKey - if($PSBoundParameters.ContainsKey("ProductKey")) - { - Write-Verbose "Set product key" - Invoke-Command -ComputerName . -Credential $SetupCredential -Authentication Credssp -ScriptBlock { - $ProductKey = $args[0] - $InstallRegVersion = $args[1] - $InstallPath = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\System Center Operations Manager\$InstallRegVersion\Setup" -Name "InstallDirectory").InstallDirectory - Import-Module "$([Environment]::ExpandEnvironmentVariables($InstallPath))\Powershell\OperationsManager" - Set-SCOMLicense -ProductID $ProductKey -Confirm:$false - } -ArgumentList @($ProductKey,$InstallRegVersion) - Restart-Service omsdk - Restart-Service cshost - } - # Wait for Management Service - $ErrorActionPreference = "SilentlyContinue" - foreach($Port in @($ManagementServicePort,5724)) - { - $MSOpen = $false - while(!$MSOpen) - { - $Socket = New-Object Net.Sockets.TcpClient - $Socket.Connect("localhost",$Port) - if($Socket.Connected) - { - $MSOpen = $true - } - else - { - Write-Verbose "Wait for Management Server port $Port to open" - Start-Sleep 60 - } - $Socket = $null - } - } - $ErrorActionPreference = "Continue" - # Allow MS to initialize - Start-Sleep 300 - } - - if((Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction SilentlyContinue) -ne $null) - { - $global:DSCMachineStatus = 1 - } - else - { - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\OperationsManager.en", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.String] - $ProductKey, - - [System.String] - $InstallPath, - - [parameter(Mandatory = $true)] - [System.String] - $ManagementGroupName, - - [parameter(Mandatory = $true)] - [System.Boolean] - $FirstManagementServer, - - [System.UInt16] - $ManagementServicePort = 5723, - - [System.Management.Automation.PSCredential] - $ActionAccount, - - [System.Management.Automation.PSCredential] - $DASAccount, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $DataReader, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $DataWriter, - - [parameter(Mandatory = $true)] - [System.String] - $SqlServerInstance, - - [System.String] - $DatabaseName = "OperationsManager", - - [System.UInt16] - $DatabaseSize = 1000, - - [parameter(Mandatory = $true)] - [System.String] - $DwSqlServerInstance, - - [System.String] - $DwDatabaseName = "OperationsManagerDW", - - [System.UInt16] - $DwDatabaseSize = 1000, - - [System.Byte] - $UseMicrosoftUpdate, - - [System.Byte] - $SendCEIPReports, - - [ValidateSet("Never","Queued","Always")] - [System.String] - $EnableErrorReporting = "Never", - - [System.Byte] - $SendODRReports - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementServerSetup/MSFT_xSCOMManagementServerSetup.schema.mof b/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementServerSetup/MSFT_xSCOMManagementServerSetup.schema.mof deleted file mode 100644 index 0128671f..00000000 --- a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementServerSetup/MSFT_xSCOMManagementServerSetup.schema.mof +++ /dev/null @@ -1,31 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCOMManagementServerSetup")] -class MSFT_xSCOMManagementServerSetup : OMI_BaseResource -{ - [Key, Description("An enumerated value that describes if the OM management server is expected to be installed on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; - [Write, Description("Product key for licensed installations.")] String ProductKey; - [Write, Description("Installation path for the software.")] String InstallPath; - [Required, Description("The name of the management group.")] String ManagementGroupName; - [Required, Description("Is this the first Management Server?")] Boolean FirstManagementServer; - [Write, Description("Change the Management Server port on install.")] UInt16 ManagementServicePort; - [Write, EmbeddedInstance("MSFT_Credential"), Description("The domain and user name of the Management server action account.")] String ActionAccount; - [Read, Description("Output username of the Management server action account.")] String ActionAccountUsername; - [Write, EmbeddedInstance("MSFT_Credential"), Description("The domain and user name of the Data Access service account.")] String DASAccount; - [Read, Description("Output username of the Data Access service account.")] String DASAccountUsername; - [Required, EmbeddedInstance("MSFT_Credential"), Description("The domain and user name of the data reader account.")] String DataReader; - [Read, Description("Output username of the data reader account.")] String DataReaderUsername; - [Required, EmbeddedInstance("MSFT_Credential"), Description("The domain and user name of the data Writer account.")] String DataWriter; - [Read, Description("Output username of the data writer account.")] String DataWriterUsername; - [Required, Description("The SQL server and instance.")] String SqlServerInstance; - [Write, Description("The name of the Operational database.")] String DatabaseName; - [Write, Description("The size in MB of the Operational database.")] UInt16 DatabaseSize; - [Required, Description("The data warehouse server and instance.")] String DwSqlServerInstance; - [Write, Description("The name of the data warehouse database.")] String DwDatabaseName; - [Write, Description("The size in MB of the data warehouse database.")] UInt16 DwDatabaseSize; - [Write, Description("0: Do not opt in to Microsoft Update. 1: Opt in to Microsoft Update.")] UInt8 UseMicrosoftUpdate; - [Write, Description("0: Do not opt in to the Customer Experience Improvement Program (CEIP). 1: Opt in to CEIP.")] UInt8 SendCEIPReports; - [Write, Description("Never: Do not opt in to sending automatic error reports. Queued: Opt in to sending error reports, but queue the reports for review before sending. Always: Opt in to automatically send error reports."), ValueMap{"Never","Queued","Always"}, Values{"Never","Queued","Always"}] String EnableErrorReporting; - [Write, Description("0: Do not opt in to sending operational data reports. 1: opt in to sending operational data reports.")] UInt8 SendODRReports; -}; diff --git a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementServerUpdate/MSFT_xSCOMManagementServerUpdate.psm1 b/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementServerUpdate/MSFT_xSCOMManagementServerUpdate.psm1 deleted file mode 100644 index 3c2f3eb0..00000000 --- a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementServerUpdate/MSFT_xSCOMManagementServerUpdate.psm1 +++ /dev/null @@ -1,183 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\OperationsManager.en\Updates", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $Version = (Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -eq "System Center Operations Manager 2012 Server"}).Version - - switch($Version) - { - "7.1.10226.0" - { - $ProductCode = "{C92727BE-BD12-4140-96A6-276BA4F60AC1}" - $PatchID = "{F6930A3E-016D-4F88-9186-440090A836DF}" - $Update = "Update Rollup 4" - } - "7.2.10015.0" - { - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - Update = "None" - } - } - $null - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - Default - { - throw "Unknown version of Operations Manager!" - } - } - - if($ProductCode -and $PatchID -and (Get-WmiObject -Class Win32_PatchPackage | Where-Object {($_.ProductCode -eq $ProductCode) -and ($_.PatchID -eq $PatchID)})) - { - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - Update = $Update - } - } - else - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\OperationsManager.en\Updates", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $Version = (Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -eq "System Center Operations Manager 2012 Server"}).Version - - switch($Version) - { - "7.1.10226.0" - { - $UpdateFile = "KB2992020-AMD64-Server.msp" - } - "7.2.10015.0" - { - Write-Verbose "No update for this version of Operations Manager!" - } - $null - { - Write-Verbose "Operations Manager Management Server not installed!" - } - Default - { - throw "Unknown version of Operations Manager!" - } - } - - if($UpdateFile) - { - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - $Path = "msiexec.exe" - $Path = ResolvePath $Path - Write-Verbose "Path: $Path" - - $MSPPath = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath $UpdateFile - $MSPPath = ResolvePath $MSPPath - $Arguments = "/update $MSPPath /norestart" - Write-Verbose "Arguments: $Arguments" - - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - } - - if((Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction SilentlyContinue) -ne $null) - { - $global:DSCMachineStatus = 1 - } - else - { - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\OperationsManager.en\Updates", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementServerUpdate/MSFT_xSCOMManagementServerUpdate.schema.mof b/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementServerUpdate/MSFT_xSCOMManagementServerUpdate.schema.mof deleted file mode 100644 index a5401c7b..00000000 --- a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMManagementServerUpdate/MSFT_xSCOMManagementServerUpdate.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCOMManagementServerUpdate")] -class MSFT_xSCOMManagementServerUpdate : OMI_BaseResource -{ - [Key, Description("An enumerated value that describes if the update is expected to be installed on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; - [Read, Description("Display name of the update.")] String Update; -}; diff --git a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMReportingServerSetup/MSFT_xSCOMReportingServerSetup.psm1 b/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMReportingServerSetup/MSFT_xSCOMReportingServerSetup.psm1 deleted file mode 100644 index f78e4c07..00000000 --- a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMReportingServerSetup/MSFT_xSCOMReportingServerSetup.psm1 +++ /dev/null @@ -1,333 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\OperationsManager.en", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.String] - $InstallPath, - - [parameter(Mandatory = $true)] - [System.String] - $ManagementServer, - - [parameter(Mandatory = $true)] - [System.String] - $SRSInstance, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $DataReader, - - [System.Byte] - $UseMicrosoftUpdate, - - [System.Byte] - $SendCEIPReports, - - [ValidateSet("Never","Queued","Always")] - [System.String] - $EnableErrorReporting = "Never", - - [System.Byte] - $SendODRReports - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "setup.exe" - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - - switch($Version) - { - "7.1.10226.0" - { - $IdentifyingNumber = "{D6E655E7-6318-4C50-B184-55E70DB179C1}" - $InstallRegVersion = "12" - $RegVersion = "3.0" - } - "7.2.10015.0" - { - $IdentifyingNumber = "{49AD38CD-4502-4CE5-83DE-73A76B28F14B}" - $InstallRegVersion = "12" - $RegVersion = "3.0" - } - Default - { - throw "Unknown version of Operations Manager!" - } - } - - if(Get-WmiObject -Class Win32_Product | Where-Object {$_.IdentifyingNumber -eq $IdentifyingNumber}) - { - $InstallPath = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\System Center Operations Manager\$InstallRegVersion\Setup" -Name "InstallDirectory").InstallDirectory - $ManagementServer = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft Operations Manager\$RegVersion\Reporting" -Name "DefaultSDKServiceMachine").DefaultSDKServiceMachine - $SRSInstance = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft Operations Manager\$RegVersion\Reporting" -Name "SRSInstance").SRSInstance - $InstanceName = $SRSInstance.Split("\")[1] - if(($InstanceName -eq "MSSQLSERVER") -or ($InstanceName -eq $null)) - { - $RSServiceName = "ReportServer" - } - else - { - $RSServiceName = "ReportServer`$$InstanceName" - } - $DataReaderUsername = (Get-WmiObject -Class Win32_Service | Where-Object {$_.Name -eq $RSServiceName}).StartName - - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - InstallPath = $InstallPath - ManagementServer = $ManagementServer - SRSInstance = $SRSInstance - DataReaderUsername = $DataReaderUsername - } - } - else - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\OperationsManager.en", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.String] - $InstallPath, - - [parameter(Mandatory = $true)] - [System.String] - $ManagementServer, - - [parameter(Mandatory = $true)] - [System.String] - $SRSInstance, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $DataReader, - - [System.Byte] - $UseMicrosoftUpdate, - - [System.Byte] - $SendCEIPReports, - - [ValidateSet("Never","Queued","Always")] - [System.String] - $EnableErrorReporting = "Never", - - [System.Byte] - $SendODRReports - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "setup.exe" - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - - switch($Version) - { - "7.1.10226.0" - { - $IdentifyingNumber = "{D6E655E7-6318-4C50-B184-55E70DB179C1}" - $MSIdentifyingNumber = "{C92727BE-BD12-4140-96A6-276BA4F60AC1}" - } - "7.2.10015.0" - { - $IdentifyingNumber = "{49AD38CD-4502-4CE5-83DE-73A76B28F14B}" - $MSIdentifyingNumber = "{43C498CB-D391-4B07-9C03-85C4E8239102}" - } - Default - { - throw "Unknown version of Operations Manager!" - } - } - - switch($Ensure) - { - "Present" - { - # Set defaults, if they couldn't be set in param due to null configdata input - if($UseMicrosoftUpdate -ne 1) - { - $UseMicrosoftUpdate = 0 - } - if($SendCEIPReports -ne 1) - { - $SendCEIPReports = 0 - } - if($SendODRReports -ne 1) - { - $SendODRReports = 0 - } - - # Remove default instance name - $SRSInstance = $SRSInstance.Replace("\MSSQLSERVER","") - - # Create install arguments - $Arguments = "/silent /install /AcceptEndUserLicenseAgreement:1 /components:OMReporting" - $ArgumentVars = @( - "InstallPath", - "UseMicrosoftUpdate", - "SendCEIPReports", - "EnableErrorReporting", - "SendODRReports" - ) - if(!(Get-WmiObject -Class Win32_Product | Where-Object {$_.IdentifyingNumber -eq $MSIdentifyingNumber})) - { - $ArgumentVars += @("ManagementServer") - } - $ArgumentVars += @("SRSInstance") - $Arguments += " /DataReaderUser:" + $DataReader.UserName - $Arguments += " /DataReaderPassword:" + $DataReader.GetNetworkCredential().Password - foreach($ArgumentVar in $ArgumentVars) - { - if(!([String]::IsNullOrEmpty((Get-Variable -Name $ArgumentVar).Value))) - { - $Arguments += " /$ArgumentVar`:" + [Environment]::ExpandEnvironmentVariables((Get-Variable -Name $ArgumentVar).Value) - } - } - - # Replace sensitive values for verbose output - $Log = $Arguments - $LogVars = @("DataReader") - foreach($LogVar in $LogVars) - { - if((Get-Variable -Name $LogVar).Value -ne "") - { - $Log = $Log.Replace((Get-Variable -Name $LogVar).Value.GetNetworkCredential().Password,"********") - } - } - } - "Absent" - { - # Create uninstall arguments - $Arguments = "/silent /uninstall /components:OMReporting" - $Log = $Arguments - } - } - - Write-Verbose "Path: $Path" - Write-Verbose "Arguments: $Log" - - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential -AsTask - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - - if((Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction SilentlyContinue) -ne $null) - { - $global:DSCMachineStatus = 1 - } - else - { - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\OperationsManager.en", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.String] - $InstallPath, - - [parameter(Mandatory = $true)] - [System.String] - $ManagementServer, - - [parameter(Mandatory = $true)] - [System.String] - $SRSInstance, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $DataReader, - - [System.Byte] - $UseMicrosoftUpdate, - - [System.Byte] - $SendCEIPReports, - - [ValidateSet("Never","Queued","Always")] - [System.String] - $EnableErrorReporting = "Never", - - [System.Byte] - $SendODRReports - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMReportingServerSetup/MSFT_xSCOMReportingServerSetup.schema.mof b/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMReportingServerSetup/MSFT_xSCOMReportingServerSetup.schema.mof deleted file mode 100644 index 9cbd21c6..00000000 --- a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMReportingServerSetup/MSFT_xSCOMReportingServerSetup.schema.mof +++ /dev/null @@ -1,17 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCOMReportingServerSetup")] -class MSFT_xSCOMReportingServerSetup : OMI_BaseResource -{ - [Key, Description("An enumerated value that describes if the OM Reporting server is expected to be installed on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; - [Write, Description("Installation path for the software.")] String InstallPath; - [Required, Description("The name of the management server associated with the Reporting server.")] String ManagementServer; - [Required, Description("The reporting server and instance.")] String SRSInstance; - [Required, EmbeddedInstance("MSFT_Credential"), Description("The domain and user name of the data reader account.")] String DataReader; - [Read, Description("Output username of the data reader account.")] String DataReaderUsername; - [Write, Description("0: Do not opt in to Microsoft Update. 1: Opt in to Microsoft Update.")] UInt8 UseMicrosoftUpdate; - [Write, Description("0: Do not opt in to the Customer Experience Improvement Program (CEIP). 1: Opt in to CEIP.")] UInt8 SendCEIPReports; - [Write, Description("Never: Do not opt in to sending automatic error reports. Queued: Opt in to sending error reports, but queue the reports for review before sending. Always: Opt in to automatically send error reports."), ValueMap{"Never","Queued","Always"}, Values{"Never","Queued","Always"}] String EnableErrorReporting; - [Write, Description("0: Do not opt in to sending operational data reports. 1: opt in to sending operational data reports.")] UInt8 SendODRReports; -}; diff --git a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMWebConsoleServerSetup/MSFT_xSCOMWebConsoleServerSetup.psm1 b/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMWebConsoleServerSetup/MSFT_xSCOMWebConsoleServerSetup.psm1 deleted file mode 100644 index 6346f950..00000000 --- a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMWebConsoleServerSetup/MSFT_xSCOMWebConsoleServerSetup.psm1 +++ /dev/null @@ -1,315 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\OperationsManager.en", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.String] - $InstallPath, - - [parameter(Mandatory = $true)] - [System.String] - $ManagementServer, - - [System.String] - $WebSiteName = "Default Web Site", - - [ValidateSet("Mixed","Network")] - [System.String] - $WebConsoleAuthorizationMode = "Mixed", - - [System.Boolean] - $WebConsoleUseSSL = $false, - - [System.Byte] - $UseMicrosoftUpdate, - - [System.Byte] - $SendCEIPReports, - - [ValidateSet("Never","Queued","Always")] - [System.String] - $EnableErrorReporting = "Never", - - [System.Byte] - $SendODRReports - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "setup.exe" - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - - switch($Version) - { - "7.1.10226.0" - { - $IdentifyingNumber = "{B9853D74-E2A7-446C-851D-5B5374671D0B}" - $InstallRegVersion = "12" - } - "7.2.10015.0" - { - $IdentifyingNumber = "{E533B951-2CAA-454F-A186-383F203E591D}" - $InstallRegVersion = "12" - } - Default - { - throw "Unknown version of Operations Manager!" - } - } - - if(Get-WmiObject -Class Win32_Product | Where-Object {$_.IdentifyingNumber -eq $IdentifyingNumber}) - { - $InstallPath = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\System Center Operations Manager\$InstallRegVersion\Setup" -Name "InstallDirectory").InstallDirectory - $ManagementServer = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\System Center Operations Manager\$InstallRegVersion\Setup\WebConsole" -Name "DEFAULT_SERVER").DEFAULT_SERVER - $WebSiteID = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\System Center Operations Manager\$InstallRegVersion\Setup\WebConsole" -Name "WEBSITE_ID").WEBSITE_ID - - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - InstallPath = $InstallPath - ManagementServer = $ManagementServer - } - } - else - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\OperationsManager.en", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.String] - $InstallPath, - - [parameter(Mandatory = $true)] - [System.String] - $ManagementServer, - - [System.String] - $WebSiteName = "Default Web Site", - - [ValidateSet("Mixed","Network")] - [System.String] - $WebConsoleAuthorizationMode = "Mixed", - - [System.Boolean] - $WebConsoleUseSSL = $false, - - [System.Byte] - $UseMicrosoftUpdate, - - [System.Byte] - $SendCEIPReports, - - [ValidateSet("Never","Queued","Always")] - [System.String] - $EnableErrorReporting = "Never", - - [System.Byte] - $SendODRReports - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "setup.exe" - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - - switch($Version) - { - "7.1.10226.0" - { - $IdentifyingNumber = "{B9853D74-E2A7-446C-851D-5B5374671D0B}" - $MSIdentifyingNumber = "{C92727BE-BD12-4140-96A6-276BA4F60AC1}" - } - "7.2.10015.0" - { - $IdentifyingNumber = "{E533B951-2CAA-454F-A186-383F203E591D}" - $MSIdentifyingNumber = "{43C498CB-D391-4B07-9C03-85C4E8239102}" - } - Default - { - throw "Unknown version of Operations Manager!" - } - } - - switch($Ensure) - { - "Present" - { - # Set defaults, if they couldn't be set in param due to null configdata input - if($UseMicrosoftUpdate -ne 1) - { - $UseMicrosoftUpdate = 0 - } - if($SendCEIPReports -ne 1) - { - $SendCEIPReports = 0 - } - if($SendODRReports -ne 1) - { - $SendODRReports = 0 - } - - # Create install arguments - $Arguments = "/silent /install /AcceptEndUserLicenseAgreement:1 /components:OMWebConsole" - $ArgumentVars = @( - "InstallPath", - "UseMicrosoftUpdate", - "SendCEIPReports", - "EnableErrorReporting", - "SendODRReports" - ) - if(!(Get-WmiObject -Class Win32_Product | Where-Object {$_.IdentifyingNumber -eq $MSIdentifyingNumber})) - { - $ArgumentVars += @("ManagementServer") - } - $ArgumentVars += @( - "WebSiteName" - "WebConsoleAuthorizationMode" - ) - if($WebConsoleUseSSL) - { - $Arguments += " /WebConsoleUseSSL" - } - foreach($ArgumentVar in $ArgumentVars) - { - if(!([String]::IsNullOrEmpty((Get-Variable -Name $ArgumentVar).Value))) - { - $Arguments += " /$ArgumentVar`:" + [Environment]::ExpandEnvironmentVariables((Get-Variable -Name $ArgumentVar).Value) - } - } - } - "Absent" - { - # Create uninstall arguments - $Arguments = "/silent /uninstall /components:OMWebConsole" - } - } - - Write-Verbose "Path: $Path" - Write-Verbose "Arguments: $Arguments" - - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential -AsTask - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - - if((Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction SilentlyContinue) -ne $null) - { - $global:DSCMachineStatus = 1 - } - else - { - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\OperationsManager.en", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.String] - $InstallPath, - - [parameter(Mandatory = $true)] - [System.String] - $ManagementServer, - - [System.String] - $WebSiteName = "Default Web Site", - - [ValidateSet("Mixed","Network")] - [System.String] - $WebConsoleAuthorizationMode = "Mixed", - - [System.Boolean] - $WebConsoleUseSSL = $false, - - [System.Byte] - $UseMicrosoftUpdate, - - [System.Byte] - $SendCEIPReports, - - [ValidateSet("Never","Queued","Always")] - [System.String] - $EnableErrorReporting = "Never", - - [System.Byte] - $SendODRReports - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMWebConsoleServerSetup/MSFT_xSCOMWebConsoleServerSetup.schema.mof b/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMWebConsoleServerSetup/MSFT_xSCOMWebConsoleServerSetup.schema.mof deleted file mode 100644 index ab3f22c1..00000000 --- a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMWebConsoleServerSetup/MSFT_xSCOMWebConsoleServerSetup.schema.mof +++ /dev/null @@ -1,17 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCOMWebConsoleServerSetup")] -class MSFT_xSCOMWebConsoleServerSetup : OMI_BaseResource -{ - [Key, Description("An enumerated value that describes if the OM Web Console server is expected to be installed on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; - [Write, Description("Installation path for the software.")] String InstallPath; - [Required, Description("The name of the management server associated with the Reporting server.")] String ManagementServer; - [Write, Description("The name of the website.")] String WebSiteName; - [Write, Description("Mixed: Used for intranet scenarios. Network: Used for extranet scenarios."), ValueMap{"Mixed","Network"}, Values{"Mixed","Network"}] String WebConsoleAuthorizationMode; - [Write, Description("Specify only if your website has Secure Sockets Layer (SSL) activated. ")] Boolean WebConsoleUseSSL; - [Write, Description("0: Do not opt in to Microsoft Update. 1: Opt in to Microsoft Update.")] UInt8 UseMicrosoftUpdate; - [Write, Description("0: Do not opt in to the Customer Experience Improvement Program (CEIP). 1: Opt in to CEIP.")] UInt8 SendCEIPReports; - [Write, Description("Never: Do not opt in to sending automatic error reports. Queued: Opt in to sending error reports, but queue the reports for review before sending. Always: Opt in to automatically send error reports."), ValueMap{"Never","Queued","Always"}, Values{"Never","Queued","Always"}] String EnableErrorReporting; - [Write, Description("0: Do not opt in to sending operational data reports. 1: opt in to sending operational data reports.")] UInt8 SendODRReports; -}; diff --git a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMWebConsoleServerUpdate/MSFT_xSCOMWebConsoleServerUpdate.psm1 b/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMWebConsoleServerUpdate/MSFT_xSCOMWebConsoleServerUpdate.psm1 deleted file mode 100644 index a07c76a8..00000000 --- a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMWebConsoleServerUpdate/MSFT_xSCOMWebConsoleServerUpdate.psm1 +++ /dev/null @@ -1,183 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\OperationsManager.en\Updates", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $Version = (Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -eq "System Center Operations Manager 2012 Web Console"}).Version - - switch($Version) - { - "7.1.10226.0" - { - $ProductCode = "{B9853D74-E2A7-446C-851D-5B5374671D0B}" - $PatchID = "{063BBCA9-4C1D-441A-8BD4-9ACDFF250054}" - $Update = "Update Rollup 4" - } - "7.2.10015.0" - { - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - Update = "None" - } - } - $null - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - Default - { - throw "Unknown version of Operations Manager!" - } - } - - if($ProductCode -and $PatchID -and (Get-WmiObject -Class Win32_PatchPackage | Where-Object {($_.ProductCode -eq $ProductCode) -and ($_.PatchID -eq $PatchID)})) - { - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - Update = $Update - } - } - else - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\OperationsManager.en\Updates", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $Version = (Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -eq "System Center Operations Manager 2012 Web Console"}).Version - - switch($Version) - { - "7.1.10226.0" - { - $UpdateFile = "KB2992020-AMD64-ENU-WebConsole.msp" - } - "7.2.10015.0" - { - Write-Verbose "No update for this version of Operations Manager!" - } - $null - { - Write-Verbose "Operations Manager Web Console Server not installed!" - } - Default - { - throw "Unknown version of Operations Manager!" - } - } - - if($UpdateFile) - { - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - $Path = "msiexec.exe" - $Path = ResolvePath $Path - Write-Verbose "Path: $Path" - - $MSPPath = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath $UpdateFile - $MSPPath = ResolvePath $MSPPath - $Arguments = "/update $MSPPath /norestart" - Write-Verbose "Arguments: $Arguments" - - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - } - - if((Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction SilentlyContinue) -ne $null) - { - $global:DSCMachineStatus = 1 - } - else - { - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\OperationsManager.en\Updates", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMWebConsoleServerUpdate/MSFT_xSCOMWebConsoleServerUpdate.schema.mof b/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMWebConsoleServerUpdate/MSFT_xSCOMWebConsoleServerUpdate.schema.mof deleted file mode 100644 index e04dbb9a..00000000 --- a/lib/puppet_x/dsc_resources/xSCOM/DSCResources/MSFT_xSCOMWebConsoleServerUpdate/MSFT_xSCOMWebConsoleServerUpdate.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCOMWebConsoleServerUpdate")] -class MSFT_xSCOMWebConsoleServerUpdate : OMI_BaseResource -{ - [Key, Description("An enumerated value that describes if the update is expected to be installed on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; - [Read, Description("Display name of the update.")] String Update; -}; diff --git a/lib/puppet_x/dsc_resources/xSCOM/LICENSE b/lib/puppet_x/dsc_resources/xSCOM/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xSCOM/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xSCOM/en-US/xPDT.strings.psd1 b/lib/puppet_x/dsc_resources/xSCOM/en-US/xPDT.strings.psd1 deleted file mode 100644 index 11f213c1..00000000 --- a/lib/puppet_x/dsc_resources/xSCOM/en-US/xPDT.strings.psd1 +++ /dev/null @@ -1,10 +0,0 @@ -ConvertFrom-StringData @' -FileNotFound=File not found in the environment path -AbsolutePathOrFileName=Absolute path or file name expected -InvalidArgument=Invalid argument: '{0}' with value: '{1}' -InvalidArgumentAndMessage={0} {1} -ErrorStarting=Failure starting process matching path '{0}'. Message: {1} -FailureWaitingForProcessesToStart=Failed to wait for processes to start -ProcessStarted=Process matching path '{0}' started in process ID {1} -ProcessAlreadyStarted=Process matching path '{0}' already started in process ID {1} -'@ diff --git a/lib/puppet_x/dsc_resources/xSCOM/xPDT.psm1 b/lib/puppet_x/dsc_resources/xSCOM/xPDT.psm1 deleted file mode 100644 index c90beaa1..00000000 --- a/lib/puppet_x/dsc_resources/xSCOM/xPDT.psm1 +++ /dev/null @@ -1,708 +0,0 @@ -data LocalizedData -{ - ConvertFrom-StringData @' - -FileNotFound=File not found in the environment path -AbsolutePathOrFileName=Absolute path or file name expected -InvalidArgument=Invalid argument: '{0}' with value: '{1}' -InvalidArgumentAndMessage={0} {1} -ErrorStarting=Failure starting process matching path '{0}'. Message: {1} -FailureWaitingForProcessesToStart=Failed to wait for processes to start -ProcessStarted=Process matching path '{0}' started in process ID {1} -ProcessAlreadyStarted=Process matching path '{0}' already started in process ID {1} -'@ -} - -Import-LocalizedData LocalizedData -filename xPDT.strings.psd1 - -function ThrowInvalidArgumentError -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $errorId, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $errorMessage - ) - - $errorCategory=[System.Management.Automation.ErrorCategory]::InvalidArgument - $exception = New-Object System.ArgumentException $errorMessage; - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - throw $errorRecord -} - -function ResolvePath -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Path - ) - - $Path = [Environment]::ExpandEnvironmentVariables($Path) - if(IsRootedPath $Path) - { - if(!(Test-Path $Path -PathType Leaf)) - { - ThrowInvalidArgumentError "CannotFindRootedPath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) - } - return $Path - } - if([string]::IsNullOrEmpty($env:Path)) - { - ThrowInvalidArgumentError "EmptyEnvironmentPath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) - } - if((Split-Path $Path -Leaf) -ne $Path) - { - ThrowInvalidArgumentError "NotAbsolutePathOrFileName" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.AbsolutePathOrFileName) - } - foreach($rawSegment in $env:Path.Split(";")) - { - $segment = [Environment]::ExpandEnvironmentVariables($rawSegment) - $segmentRooted = $false - try - { - $segmentRooted=[IO.Path]::IsPathRooted($segment) - } - catch {} - if(!$segmentRooted) - { - continue - } - $candidate = join-path $segment $Path - if(Test-Path $candidate -PathType Leaf) - { - return $candidate - } - } - ThrowInvalidArgumentError "CannotFindRelativePath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) -} - -function IsRootedPath -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path - ) - - try - { - return [IO.Path]::IsPathRooted($Path) - } - catch - { - ThrowInvalidArgumentError "CannotGetIsPathRooted" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $_.Exception.Message) - } -} - -function ExtractArguments -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - $functionBoundParameters, - - [parameter(Mandatory = $true)] - [string[]] - $argumentNames, - - [string[]] - $newArgumentNames - ) - - $returnValue=@{} - - for($i=0;$i -lt $argumentNames.Count;$i++) - { - $argumentName = $argumentNames[$i] - - if($newArgumentNames -eq $null) - { - $newArgumentName = $argumentName - } - else - { - $newArgumentName = $newArgumentNames[$i] - } - - if($functionBoundParameters.ContainsKey($argumentName)) - { - $null = $returnValue.Add($newArgumentName,$functionBoundParameters[$argumentName]) - } - } - - return $returnValue -} - -function CallPInvoke -{ - $script:ProgramSource = @" -using System; -using System.Collections.Generic; -using System.Text; -using System.Security; -using System.Runtime.InteropServices; -using System.Diagnostics; -using System.Security.Principal; -using System.ComponentModel; -using System.IO; - -namespace Source -{ - [SuppressUnmanagedCodeSecurity] - public static class NativeMethods - { - //The following structs and enums are used by the various Win32 API's that are used in the code below - - [StructLayout(LayoutKind.Sequential)] - public struct STARTUPINFO - { - public Int32 cb; - public string lpReserved; - public string lpDesktop; - public string lpTitle; - public Int32 dwX; - public Int32 dwY; - public Int32 dwXSize; - public Int32 dwXCountChars; - public Int32 dwYCountChars; - public Int32 dwFillAttribute; - public Int32 dwFlags; - public Int16 wShowWindow; - public Int16 cbReserved2; - public IntPtr lpReserved2; - public IntPtr hStdInput; - public IntPtr hStdOutput; - public IntPtr hStdError; - } - - [StructLayout(LayoutKind.Sequential)] - public struct PROCESS_INFORMATION - { - public IntPtr hProcess; - public IntPtr hThread; - public Int32 dwProcessID; - public Int32 dwThreadID; - } - - [Flags] - public enum LogonType - { - LOGON32_LOGON_INTERACTIVE = 2, - LOGON32_LOGON_NETWORK = 3, - LOGON32_LOGON_BATCH = 4, - LOGON32_LOGON_SERVICE = 5, - LOGON32_LOGON_UNLOCK = 7, - LOGON32_LOGON_NETWORK_CLEARTEXT = 8, - LOGON32_LOGON_NEW_CREDENTIALS = 9 - } - - [Flags] - public enum LogonProvider - { - LOGON32_PROVIDER_DEFAULT = 0, - LOGON32_PROVIDER_WINNT35, - LOGON32_PROVIDER_WINNT40, - LOGON32_PROVIDER_WINNT50 - } - [StructLayout(LayoutKind.Sequential)] - public struct SECURITY_ATTRIBUTES - { - public Int32 Length; - public IntPtr lpSecurityDescriptor; - public bool bInheritHandle; - } - - public enum SECURITY_IMPERSONATION_LEVEL - { - SecurityAnonymous, - SecurityIdentification, - SecurityImpersonation, - SecurityDelegation - } - - public enum TOKEN_TYPE - { - TokenPrimary = 1, - TokenImpersonation - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - internal struct TokPriv1Luid - { - public int Count; - public long Luid; - public int Attr; - } - - public const int GENERIC_ALL_ACCESS = 0x10000000; - public const int CREATE_NO_WINDOW = 0x08000000; - internal const int SE_PRIVILEGE_ENABLED = 0x00000002; - internal const int TOKEN_QUERY = 0x00000008; - internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; - internal const string SE_INCRASE_QUOTA = "SeIncreaseQuotaPrivilege"; - - [DllImport("kernel32.dll", - EntryPoint = "CloseHandle", SetLastError = true, - CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] - public static extern bool CloseHandle(IntPtr handle); - - [DllImport("advapi32.dll", - EntryPoint = "CreateProcessAsUser", SetLastError = true, - CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] - public static extern bool CreateProcessAsUser( - IntPtr hToken, - string lpApplicationName, - string lpCommandLine, - ref SECURITY_ATTRIBUTES lpProcessAttributes, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - bool bInheritHandle, - Int32 dwCreationFlags, - IntPtr lpEnvrionment, - string lpCurrentDirectory, - ref STARTUPINFO lpStartupInfo, - ref PROCESS_INFORMATION lpProcessInformation - ); - - [DllImport("advapi32.dll", EntryPoint = "DuplicateTokenEx")] - public static extern bool DuplicateTokenEx( - IntPtr hExistingToken, - Int32 dwDesiredAccess, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - Int32 ImpersonationLevel, - Int32 dwTokenType, - ref IntPtr phNewToken - ); - - [DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)] - public static extern Boolean LogonUser( - String lpszUserName, - String lpszDomain, - String lpszPassword, - LogonType dwLogonType, - LogonProvider dwLogonProvider, - out IntPtr phToken - ); - - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern bool AdjustTokenPrivileges( - IntPtr htok, - bool disall, - ref TokPriv1Luid newst, - int len, - IntPtr prev, - IntPtr relen - ); - - [DllImport("kernel32.dll", ExactSpelling = true)] - internal static extern IntPtr GetCurrentProcess(); - - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern bool OpenProcessToken( - IntPtr h, - int acc, - ref IntPtr phtok - ); - - [DllImport("advapi32.dll", SetLastError = true)] - internal static extern bool LookupPrivilegeValue( - string host, - string name, - ref long pluid - ); - - public static void CreateProcessAsUser(string strCommand, string strDomain, string strName, string strPassword) - { - var hToken = IntPtr.Zero; - var hDupedToken = IntPtr.Zero; - TokPriv1Luid tp; - var pi = new PROCESS_INFORMATION(); - var sa = new SECURITY_ATTRIBUTES(); - sa.Length = Marshal.SizeOf(sa); - Boolean bResult = false; - try - { - bResult = LogonUser( - strName, - strDomain, - strPassword, - LogonType.LOGON32_LOGON_BATCH, - LogonProvider.LOGON32_PROVIDER_DEFAULT, - out hToken - ); - if (!bResult) - { - throw new Win32Exception("The user could not be logged on. Ensure that the user has an existing profile on the machine and that correct credentials are provided. Logon error #" + Marshal.GetLastWin32Error().ToString()); - } - IntPtr hproc = GetCurrentProcess(); - IntPtr htok = IntPtr.Zero; - bResult = OpenProcessToken( - hproc, - TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, - ref htok - ); - if(!bResult) - { - throw new Win32Exception("Open process token error #" + Marshal.GetLastWin32Error().ToString()); - } - tp.Count = 1; - tp.Luid = 0; - tp.Attr = SE_PRIVILEGE_ENABLED; - bResult = LookupPrivilegeValue( - null, - SE_INCRASE_QUOTA, - ref tp.Luid - ); - if(!bResult) - { - throw new Win32Exception("Error in looking up privilege of the process. This should not happen if DSC is running as LocalSystem Lookup privilege error #" + Marshal.GetLastWin32Error().ToString()); - } - bResult = AdjustTokenPrivileges( - htok, - false, - ref tp, - 0, - IntPtr.Zero, - IntPtr.Zero - ); - if(!bResult) - { - throw new Win32Exception("Token elevation error #" + Marshal.GetLastWin32Error().ToString()); - } - - bResult = DuplicateTokenEx( - hToken, - GENERIC_ALL_ACCESS, - ref sa, - (int)SECURITY_IMPERSONATION_LEVEL.SecurityIdentification, - (int)TOKEN_TYPE.TokenPrimary, - ref hDupedToken - ); - if(!bResult) - { - throw new Win32Exception("Duplicate Token error #" + Marshal.GetLastWin32Error().ToString()); - } - var si = new STARTUPINFO(); - si.cb = Marshal.SizeOf(si); - si.lpDesktop = ""; - bResult = CreateProcessAsUser( - hDupedToken, - null, - strCommand, - ref sa, - ref sa, - false, - 0, - IntPtr.Zero, - null, - ref si, - ref pi - ); - if(!bResult) - { - throw new Win32Exception("The process could not be created. Create process as user error #" + Marshal.GetLastWin32Error().ToString()); - } - } - finally - { - if (pi.hThread != IntPtr.Zero) - { - CloseHandle(pi.hThread); - } - if (pi.hProcess != IntPtr.Zero) - { - CloseHandle(pi.hProcess); - } - if (hDupedToken != IntPtr.Zero) - { - CloseHandle(hDupedToken); - } - } - } - } -} - -"@ - Add-Type -TypeDefinition $ProgramSource -ReferencedAssemblies "System.ServiceProcess" -} - -function GetWin32Process -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential - ) - - $fileName = [io.path]::GetFileNameWithoutExtension($Path) - $GetProcesses = @(Get-Process -Name $fileName -ErrorAction SilentlyContinue) - $Processes = foreach($process in $GetProcesses) - { - if($Process.Path -ieq $Path) - { - try - { - [wmi]"Win32_Process.Handle='$($Process.Id)'" - } - catch - { - } - } - } - if($PSBoundParameters.ContainsKey('Credential')) - { - $Processes = $Processes | Where-Object {(GetWin32ProcessOwner $_) -eq $Credential.UserName} - } - if($Arguments -eq $null) {$Arguments = ""} - $Processes = $Processes | Where-Object {(GetWin32ProcessArgumentsFromCommandLine $_.CommandLine) -eq $Arguments} - - return $Processes -} - -function GetWin32ProcessOwner -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNull()] - $Process - ) - - try - { - $Owner = $Process.GetOwner() - } - catch - {} - if($owner.Domain -ne $null) - { - return $Owner.Domain + "\" + $Owner.User - } - else - { - return $Owner.User - } -} - -function GetWin32ProcessArgumentsFromCommandLine -{ - param - ( - [String] - $commandLine - ) - - if($commandLine -eq $null) - { - return "" - } - $commandLine=$commandLine.Trim() - if($commandLine.Length -eq 0) - { - return "" - } - if($commandLine[0] -eq '"') - { - $charToLookfor=[char]'"' - } - else - { - $charToLookfor=[char]' ' - } - $endOfCommand=$commandLine.IndexOf($charToLookfor ,1) - if($endOfCommand -eq -1) - { - return "" - } - return $commandLine.Substring($endOfCommand+1).Trim() -} - -function StartWin32Process -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential, - - [Switch] - $AsTask - ) - - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - $Processes = @(GetWin32Process @getArguments) - if ($processes.Count -eq 0) - { - if($PSBoundParameters.ContainsKey("Credential")) - { - if($AsTask) - { - $ActionArguments = ExtractArguments $PSBoundParameters ` - ("Path", "Arguments") ` - ("Execute", "Argument") - if([string]::IsNullOrEmpty($Arguments)) - { - $null = $ActionArguments.Remove("Argument") - } - $TaskGuid = [guid]::NewGuid().ToString() - $Action = New-ScheduledTaskAction @ActionArguments - $null = Register-ScheduledTask -TaskName "xPDT $TaskGuid" -Action $Action -User $Credential.UserName -Password $Credential.GetNetworkCredential().Password -RunLevel Highest - $err = Start-ScheduledTask -TaskName "xPDT $TaskGuid" - } - else - { - try - { - CallPInvoke - [Source.NativeMethods]::CreateProcessAsUser(("$Path " + $Arguments),$Credential.GetNetworkCredential().Domain,$Credential.GetNetworkCredential().UserName,$Credential.GetNetworkCredential().Password) - } - catch - { - $exception = New-Object System.ArgumentException $_ - $errorCategory = [System.Management.Automation.ErrorCategory]::OperationStopped - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, "Win32Exception", $errorCategory, $null - $err = $errorRecord - } - } - } - else - { - $StartArguments = ExtractArguments $PSBoundParameters ` - ("Path", "Arguments", "Credential") ` - ("FilePath", "ArgumentList", "Credential") - if([string]::IsNullOrEmpty($Arguments)) - { - $null = $StartArguments.Remove("ArgumentList") - } - $err = Start-Process @StartArguments - } - if($err -ne $null) - { - throw $err - } - if (!(WaitForWin32ProcessStart @GetArguments)) - { - ThrowInvalidArgumentError "FailureWaitingForProcessesToStart" ($LocalizedData.ErrorStarting -f $Path,$LocalizedData.FailureWaitingForProcessesToStart) - } - } - else - { - return ($LocalizedData.ProcessAlreadyStarted -f $Path,$Processes.ProcessId) - } - $Processes = @(GetWin32Process @getArguments) - return ($LocalizedData.ProcessStarted -f $Path,$Processes.ProcessId) -} - -function WaitForWin32ProcessStart -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential - ) - - $start = [DateTime]::Now - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - do - { - $value = @(GetWin32Process @GetArguments).Count -ge 1 - } while(!$value -and ([DateTime]::Now - $start).TotalMilliseconds -lt 60000) - - return $value -} - -function WaitForWin32ProcessEnd -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential - ) - - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - While (WaitForWin32ProcessStart @GetArguments) - { - Start-Sleep 1 - } - Get-ScheduledTask | Where-Object {($_.TaskName.Length -ge 4) -and ($_.TaskName.Substring(0,4) -eq "xPDT") -and ($_.Actions.Execute -eq $Path) -and ($_.Actions.Arguments -eq $Arguments)} | Where-Object {$_ -ne $null} | Unregister-ScheduledTask -Confirm:$false -} - -function NetUse -{ - param - ( - [parameter(Mandatory)] - [string] - $SourcePath, - - [parameter(Mandatory)] - [PSCredential] - $Credential, - - [string] - $Ensure = "Present" - ) - - if(($SourcePath.Length -ge 2) -and ($SourcePath.Substring(0,2) -eq "\\")) - { - - if ($Ensure -eq "Absent") - { - $cmd = "net.exe use $SourcePath /del" - } - else - { - $cmd = "net.exe use $SourcePath $($Credential.GetNetworkCredential().Password) /user:$($Credential.GetNetworkCredential().Domain)\$($Credential.GetNetworkCredential().UserName)" - } - Invoke-Expression $cmd - } -} - -Export-ModuleMember ResolvePath,StartWin32Process,WaitForWin32ProcessEnd,NetUse diff --git a/lib/puppet_x/dsc_resources/xSCOM/xSCOM.psd1 b/lib/puppet_x/dsc_resources/xSCOM/xSCOM.psd1 deleted file mode 100644 index 3563d69c..00000000 --- a/lib/puppet_x/dsc_resources/xSCOM/xSCOM.psd1 +++ /dev/null @@ -1,31 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '1.3.3.0' - -# ID used to uniquely identify this module -GUID = '990eecbc-0f40-43cb-89dd-b43c79904f56' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module with DSC Resources for deployment and configuration of Microsoft System Center Operations Manager.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' -} diff --git a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xRunbookDirectory/MSFT_xRunbookDirectory.psm1 b/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xRunbookDirectory/MSFT_xRunbookDirectory.psm1 deleted file mode 100644 index 974e3ba6..00000000 --- a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xRunbookDirectory/MSFT_xRunbookDirectory.psm1 +++ /dev/null @@ -1,250 +0,0 @@ -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData -StringData @' - FindingRunbookDefinition = Finding runbook definition for {0}. - ExistinRunbookDefinition = Existing Runbook definition found. - CreatingTempFile = Creating temp file at {0}. - RunbookFoundMatches = Runbook found matches. No import needed. - RunbookDifferencesFound = Runbook differences found. Import needed. - RemovingTempFile = Removing temp file at {0}. - ImportTwice = Importing all runbooks twice to build all dependencies. - ImportingRunbook = Importing Runbook {0}. - ImportNotRequired = An import is not required. - ImportRequired = An import is required. - ImportCount = Import number {0}. - RemovingRunbook = Removing runbook {0}. - FailedToRemoveRunbook = Failed to remove Runbook {0}. -'@ -} - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Published", "Draft", "Absent")] - [System.String] - $Ensure = "Published", - - [parameter(Mandatory = $true)] - [System.String] - $RunbookPath, - - [parameter(Mandatory = $true)] - [System.String] - $WebServiceEndpoint, - - [Uint32] - $Port = 9090 - ) - - $RunbookPathItems = Get-Item $RunbookPath -Filter *.ps1 - - $ensureStatus = "Absent" - $match = $true - forEach ($RunbookPathItem in $RunbookPathItems) - { - if( $match ) - { - Write-Verbose ( $($LocalizedData.FindingRunbookDefinition) -f $RunbookPathItem.BaseName ) - - # Get runbook definition if one exist - $runbookFound = $false - try - { - if( $Ensure -eq "Published" ) - { - $runbookDefinition = Get-SmaRunbookDefinition -Name $($RunbookPathItem.BaseName) -WebServiceEndpoint $WebServiceEndpoint -Port $port -Type 'Published' -ErrorAction Stop - - $ensureStatus = "Published" - } - else - { - $runbookDefinition = Get-SmaRunbookDefinition -Name $($RunbookPathItem.BaseName) -WebServiceEndpoint $WebServiceEndpoint -Port $port -Type 'Draft' -ErrorAction Stop - - $ensureStatus = "Draft" - } - - $runbookFound = $true - Write-Verbose ( $LocalizedData.ExistinRunbookDefinition ) - } - catch - { - Write-Verbose $_ - $match = $false - } - - if( $runbookFound ) - { - # Can't compare the value of the $runbookDefinition.Content variable to a file, so writing it to a file, then will compare that. - $runbookTempPath = "$env:TEMP\$($RunbookPathItem.BaseName).ps1" - - Write-Verbose ( $($LocalizedData.CreatingTempFile) -f $runbookTempPath) - $runbookDefinition.Content.ToString() | Out-File -FilePath $runbookTempPath - - $compare = Compare-Object -ReferenceObject (Get-Content $RunbookPathItem.FullName) -DifferenceObject (Get-Content $runbookTempPath) - if( $compare -eq $null ) - { - Write-Verbose ( $LocalizedData.RunbookFoundMatches ) - } - Else - { - # Compare-Object sometimes returns new lines as a difference, this can cause repeated re-imports if that new line is at the top of the ps1 - # since SMA will strip this out on import. - - foreach( $difference in $compare ) - { - if( $difference.InputObject -ne "" ) - { - Write-Verbose ( $LocalizedData.RunbookDifferencesFound ) - $match = $false - } - } - - if( $match ) - { - Write-Verbose ( $LocalizedData.RunbookFoundMatches ) - } - } - - Write-Verbose ( $($LocalizedData.RemovingTempFile) -f $runbookTempPath ) - Remove-Item -Path $runbookTempPath - } - } - } - - $returnValue = @{ - Ensure = [System.String]$ensureStatus - RunbookPath = [System.String]$RunbookPath - WebServiceEndpoint = [System.String]$WebServiceEndpoint - Port = [System.String]$Port - Matches = [System.Boolean]$match - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Published", "Draft", "Absent")] - [System.String] - $Ensure = "Published", - - [parameter(Mandatory = $true)] - [System.String] - $RunbookPath, - - [parameter(Mandatory = $true)] - [System.String] - $WebServiceEndpoint, - - [Uint32] - $Port = 9090 - ) - - $RunbookPathItems = Get-Item $RunbookPath -Filter *.ps1 - - if( $Ensure -eq "Absent") - { - forEach ($RunbookPathItem in $RunbookPathItems) - { - try - { - Write-Verbose ( $($LocalizedData.RemovingRunbook) -f $RunbookPathItem.BaseName) - - Remove-SmaRunbook -Name $RunbookPathItem.BaseName -WebServiceEndpoint $WebServiceEndpoint -Port $port -ErrorAction Stop - } - catch - { - Write-Verbose ( $($LocalizedData.FailedToRemoveRunbook) -f $RunbookPathItem.BaseName) - } - } - } - else - { - Write-Verbose ( $LocalizedData.ImportTwice ) - for($k = 1; $k -lt 3; $k++) - { - Write-Verbose ( $($LocalizedData.ImportCount) -f $k ) - forEach ($RunbookPathItem in $RunbookPathItems) - { - # try to edit an existing runbook with the same name, this saves a read to verify that the runbook exist. - # if error, assume the runbook has never been imported - Write-Verbose ( $($LocalizedData.ImportingRunbook) -f $RunbookPathItem.BaseName ) - try - { - Edit-SmaRunbook -Path $RunbookPathItem.FullName -Name $RunbookPathItem.BaseName -WebServiceEndpoint $WebServiceEndpoint -Port $port -Overwrite -ErrorAction Stop - } - catch - { - Import-SmaRunbook -Path $RunbookPathItem.FullName -WebServiceEndpoint $WebServiceEndpoint -Port $port -ErrorAction Stop - } - } - } - - if( $Ensure -eq "Published" ) - { - forEach ($RunbookPathItem in $RunbookPathItems) - { - Publish-SmaRunbook -Name $RunbookPathItem.BaseName -WebServiceEndpoint $WebServiceEndpoint -Port $port -ErrorAction Stop - } - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Published", "Draft", "Absent")] - [System.String] - $Ensure = "Published", - - [parameter(Mandatory = $true)] - [System.String] - $RunbookPath, - - [parameter(Mandatory = $true)] - [System.String] - $WebServiceEndpoint, - - [Uint32] - $Port = 9090 - ) - - $results = Get-TargetResource @PSBoundParameters - - if( ($Ensure -eq "Published") -or ($Ensure -eq "Draft") ) - { - if( ($results.Ensure -eq $Ensure) -and ($results.Matches -eq $true) ) - { - Write-Verbose ( $LocalizedData.ImportNotRequired ) - return $true - } - } - - if( ($results.Ensure -eq "Absent") -and ($Ensure -eq "Absent") ) - { - Write-Verbose ( $LocalizedData.ImportNotRequired ) - return $true - } - - Write-Verbose ( $LocalizedData.ImportRequired ) - return $false -} - - -Export-ModuleMember -Function Get-TargetResource, Set-TargetResource, Test-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xRunbookDirectory/MSFT_xRunbookDirectory.schema.mof b/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xRunbookDirectory/MSFT_xRunbookDirectory.schema.mof deleted file mode 100644 index 1a022477..00000000 --- a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xRunbookDirectory/MSFT_xRunbookDirectory.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("RunbookDirectory")] -class MSFT_xRunbookDirectory : OMI_BaseResource -{ - [Required, Description("The import state of runbooks found at RunbookPath. This can be Published, Draft, or Absent"), ValueMap{"Published","Draft","Absent"}, Values{"Published","Draft","Absent"}] String Ensure; - [Key, Description("Path to Runbook(s) to be imported. Accepts wildcards.")] String RunbookPath; - [Read, Description("Describes the validity of the imported Runbook(s).")] Boolean Matches; - [Key, Description("URL of SMA's web service endpoint.")] String WebServiceEndpoint; - [Write, Description("Port of the SMA web site. Defaults to the SMA default of 9090.")] Uint32 Port; -}; - diff --git a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMAPowerShellSetup/MSFT_xSCSMAPowerShellSetup.psm1 b/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMAPowerShellSetup/MSFT_xSCSMAPowerShellSetup.psm1 deleted file mode 100644 index 433b294e..00000000 --- a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMAPowerShellSetup/MSFT_xSCSMAPowerShellSetup.psm1 +++ /dev/null @@ -1,199 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\Orchestrator", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "\SetupOrchestrator.exe" - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - - switch($Version) - { - "7.2.84.0" - { - $IdentifyingNumber = "{EF2760C1-FED5-45FD-B067-D9419F7DEBEF}" - } - "7.2.503.0" - { - $IdentifyingNumber = "{EF2760C1-FED5-45FD-B067-D9419F7DEBEF}" - } - "7.3.150.0" - { - # System Center Technical Preview 5 - $IdentifyingNumber = "{EF2760C1-FED5-45FD-B067-D9419F7DEBEF}" - } - "7.3.345.0" - { - # System Center 2016 - $IdentifyingNumber = "{EF2760C1-FED5-45FD-B067-D9419F7DEBEF}" - } - Default - { - throw "Unknown version of Service Management Automation!" - } - } - - if(Get-WmiObject -Class Win32_Product -filter "IdentifyingNumber ='$IdentifyingNumber'") - { - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - else - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\Orchestrator", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "\SetupOrchestrator.exe" - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - - switch($Version) - { - "7.2.84.0" - { - $IdentifyingNumber = "{EF2760C1-FED5-45FD-B067-D9419F7DEBEF}" - } - "7.2.503.0" - { - $IdentifyingNumber = "{EF2760C1-FED5-45FD-B067-D9419F7DEBEF}" - } - "7.3.150.0" - { - # System Center Technical Preview 5 - $IdentifyingNumber = "{EF2760C1-FED5-45FD-B067-D9419F7DEBEF}" - } - "7.3.345.0" - { - # System Center 2016 - $IdentifyingNumber = "{EF2760C1-FED5-45FD-B067-D9419F7DEBEF}" - } - Default - { - throw "Unknown version of Service Management Automation!" - } - } - - $Path = "msiexec.exe" - $Path = ResolvePath $Path - Write-Verbose "Path: $Path" - - switch($Ensure) - { - "Present" - { - $MSIPath = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "\SMA\PowerShellModuleInstaller.msi" - $MSIPath = ResolvePath $MSIPath - Write-Verbose "MSIPath: $MSIPath" - $Arguments = "/q /i $MSIPath ALLUSERS=2" - } - "Absent" - { - $Arguments = "/q /x $IdentifyingNumber" - } - } - - Write-Verbose "Arguments: $Arguments" - - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - - if((Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction SilentlyContinue) -ne $null) - { - $global:DSCMachineStatus = 1 - } - else - { - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\Orchestrator", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMAPowerShellSetup/MSFT_xSCSMAPowerShellSetup.schema.mof b/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMAPowerShellSetup/MSFT_xSCSMAPowerShellSetup.schema.mof deleted file mode 100644 index f1efdcbc..00000000 --- a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMAPowerShellSetup/MSFT_xSCSMAPowerShellSetup.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCSMAPowerShellSetup")] -class MSFT_xSCSMAPowerShellSetup : OMI_BaseResource -{ - [Key, Description("An enumerated value that describes if SMA PowerShell is expected to be installed on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; -}; diff --git a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMARunbookWorkerServerSetup/MSFT_xSCSMARunbookWorkerServerSetup.psm1 b/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMARunbookWorkerServerSetup/MSFT_xSCSMARunbookWorkerServerSetup.psm1 deleted file mode 100644 index 2260f722..00000000 --- a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMARunbookWorkerServerSetup/MSFT_xSCSMARunbookWorkerServerSetup.psm1 +++ /dev/null @@ -1,367 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\Orchestrator", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $Service, - - [parameter(Mandatory = $true)] - [System.String] - $SqlServer, - - [parameter(Mandatory = $true)] - [System.String] - $SqlInstance, - - [System.String] - $SqlDatabase = "SMA", - - [System.String] - $InstallFolder, - - [System.String] - $ETWManifest = "Yes", - - [System.String] - $SendCEIPReports = "No", - - [System.String] - $MSUpdate = "No", - - [System.String] - $ProductKey - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "\SMA\WebServiceSetup.exe" - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - - switch($Version) - { - "7.2.1563.0" - { - $IdentifyingNumber = "{B2FA6B22-1DDF-4BD4-8B92-ADF17D48262F}" - } - "7.2.5002.0" - { - $IdentifyingNumber = "{B2FA6B22-1DDF-4BD4-8B92-ADF17D48262F}" - } - "7.3.150.0" - { - # System Center Technical Preview 5 - $IdentifyingNumber = "{B2FA6B22-1DDF-4BD4-8B92-ADF17D48262F}" - } - "7.3.345.0" - { - # System Center 2016 RTM - $IdentifyingNumber = "{B2FA6B22-1DDF-4BD4-8B92-ADF17D48262F}" - } - Default - { - throw "Unknown version of Service Management Automation!" - } - } - - if(Get-WmiObject -Class Win32_Product -Filter "IdentifyingNumber ='$IdentifyingNumber'") - { - $ServiceUsername = (Get-WmiObject -Class Win32_Service -Filter "Name ='rbsvc'").StartName - $SqlServer = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\ServiceManagementAutomation\RunbookWorker" -Name "DatabaseServerName").DatabaseServerName - $SqlInstance = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\ServiceManagementAutomation\RunbookWorker" -Name "DatabaseServerInstance").DatabaseServerInstance - if([String]::IsNullOrEmpty($SqlInstance)) - { - $SqlInstance = "MSSQLSERVER" - } - $SqlDatabase = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\ServiceManagementAutomation\RunbookWorker" -Name "DatabaseName").DatabaseName - $InstallFolder = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\ServiceManagementAutomation\RunbookWorker" -Name "InstallationFolder").InstallationFolder - - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - ServiceUsername = $ServiceUsername - SqlServer = $SqlServer - SqlInstance = $SqlInstance - SqlDatabase = $SqlDatabase - InstallFolder = $InstallFolder - } - } - else - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\Orchestrator", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $Service, - - [parameter(Mandatory = $true)] - [System.String] - $SqlServer, - - [parameter(Mandatory = $true)] - [System.String] - $SqlInstance, - - [System.String] - $SqlDatabase = "SMA", - - [System.String] - $InstallFolder, - - [System.String] - $ETWManifest = "Yes", - - [System.String] - $SendCEIPReports = "No", - - [System.String] - $MSUpdate = "No", - - [System.String] - $ProductKey - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "\SMA\WebServiceSetup.exe" - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - - switch($Version) - { - "7.2.1563.0" - { - $IdentifyingNumber = "{B2FA6B22-1DDF-4BD4-8B92-ADF17D48262F}" - $SCVersion = "System Center 2012 R2" - } - "7.2.5002.0" - { - $IdentifyingNumber = "{B2FA6B22-1DDF-4BD4-8B92-ADF17D48262F}" - $SCVersion = "System Center Technical Preview" - } - "7.3.150.0" - { - $IdentifyingNumber = "{B2FA6B22-1DDF-4BD4-8B92-ADF17D48262F}" - $SCVersion = "System Center Technical Preview 5" - } - "7.3.345.0" - { - # System Center 2016 RTM - $IdentifyingNumber = "{B2FA6B22-1DDF-4BD4-8B92-ADF17D48262F}" - $SCVersion = "System Center 2016" - } - Default - { - throw "Unknown version of Service Management Automation!" - } - } - - $Path = "msiexec.exe" - $Path = ResolvePath $Path - - switch($Ensure) - { - "Present" - { - # Set defaults, if they couldn't be set in param due to null configdata input - foreach($ArgumentVar in ("ETWManifest","SendCEIPReports","MSUpdate")) - { - if((Get-Variable -Name $ArgumentVar).Value -ne "Yes") - { - Set-Variable -Name $ArgumentVar -Value "No" - } - - } - - $MSIPath = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "\SMA\WorkerInstaller.msi" - $MSIPath = ResolvePath $MSIPath - Write-Verbose "MSIPath: $MSIPath" - - # Create install arguments - $Arguments = "/q /i $MSIPath" - if(($PSVersionTable.PSVersion.Major -eq 5) -and ($SCVersion -eq "System Center 2012 R2")) - { - $MSTPath = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "\SMA\WMF5Worker.mst" - $MSTPath = ResolvePath $MSTPath - Write-Verbose "MSTPath: $MSTPath" - $Arguments += " TRANSFORMS=$MSTPath" - } - $Arguments += " ALLUSERS=2 CreateDatabase=No DatabaseAuthentication=Windows" - $ArgumentVars = @( - "SqlServer", - "SqlDatabase", - "InstallFolder", - "ETWManifest" - "SendCEIPReports", - "MSUpdate", - "ProductKey" - ) - if($SQLInstance -ne "MSSQLSERVER") - { - $ArgumentVars += @( - "SqlInstance" - ) - } - foreach($ArgumentVar in $ArgumentVars) - { - if(!([String]::IsNullOrEmpty((Get-Variable -Name $ArgumentVar).Value))) - { - $Arguments += " $ArgumentVar=`"" + [Environment]::ExpandEnvironmentVariables((Get-Variable -Name $ArgumentVar).Value) + "`"" - } - } - $AccountVars = @("Service") - foreach($AccountVar in $AccountVars) - { - $Arguments += " $AccountVar`Account=`"" + (Get-Variable -Name $AccountVar).Value.UserName + "`"" - $Arguments += " $AccountVar`Password=`"" + (Get-Variable -Name $AccountVar).Value.GetNetworkCredential().Password + "`"" - } - - # Replace sensitive values for verbose output - $Log = $Arguments - $LogVars = @("Service") - foreach($LogVar in $LogVars) - { - if((Get-Variable -Name $LogVar).Value -ne "") - { - $Log = $Log.Replace((Get-Variable -Name $LogVar).Value.GetNetworkCredential().Password,"********") - } - } - } - "Absent" - { - $Arguments = "/q /x $IdentifyingNumber" - $Log = $Arguments - } - } - - Write-Verbose "Path: $Path" - Write-Verbose "Arguments: $Log" - - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - - if((Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction SilentlyContinue) -ne $null) - { - $global:DSCMachineStatus = 1 - } - else - { - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\Orchestrator", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $Service, - - [parameter(Mandatory = $true)] - [System.String] - $SqlServer, - - [parameter(Mandatory = $true)] - [System.String] - $SqlInstance, - - [System.String] - $SqlDatabase = "SMA", - - [System.String] - $InstallFolder, - - [System.String] - $ETWManifest = "Yes", - - [System.String] - $SendCEIPReports = "No", - - [System.String] - $MSUpdate = "No", - - [System.String] - $ProductKey - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMARunbookWorkerServerSetup/MSFT_xSCSMARunbookWorkerServerSetup.schema.mof b/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMARunbookWorkerServerSetup/MSFT_xSCSMARunbookWorkerServerSetup.schema.mof deleted file mode 100644 index 4047c75f..00000000 --- a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMARunbookWorkerServerSetup/MSFT_xSCSMARunbookWorkerServerSetup.schema.mof +++ /dev/null @@ -1,18 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCSMARunbookWorkerServerSetup")] -class MSFT_xSCSMARunbookWorkerServerSetup : OMI_BaseResource -{ - [Key, Description("An enumerated value that describes if the SMA Runbook Worker server is expected to be installed on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Service account of the web service application pool.")] String Service; - [Read, Description("Output username of the Service account of the web service application pool.")] String ServiceUserName; - [Required, Description("Name of the SQL Server for the SMA database.")] String SqlServer; - [Required, Description("Name of the SQL Instance for the SMA database.")] String SqlInstance; - [Write, Description("Name of the SMA database.")] String SqlDatabase; - [Write, Description("Installation folder for SMA.")] String InstallFolder; - [Write, Description("Log to ETW.")] String ETWManifest; - [Write, Description("Participate in the Customer Experience Improvement Program.")] String SendCEIPReports; - [Write, Description("Use Microsoft Update.")] String MSUpdate; - [Write, Description("Product key for licensed installations.")] String ProductKey; -}; diff --git a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMAWebServiceServerSetup/MSFT_xSCSMAWebServiceServerSetup.psm1 b/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMAWebServiceServerSetup/MSFT_xSCSMAWebServiceServerSetup.psm1 deleted file mode 100644 index 200cbeee..00000000 --- a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMAWebServiceServerSetup/MSFT_xSCSMAWebServiceServerSetup.psm1 +++ /dev/null @@ -1,505 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\Orchestrator", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [parameter(Mandatory = $true)] - [System.Boolean] - $FirstWebServiceServer, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $ApPool, - - [System.String] - $AdminGroupMembers, - - [parameter(Mandatory = $true)] - [System.String] - $SqlServer, - - [parameter(Mandatory = $true)] - [System.String] - $SqlInstance, - - [System.String] - $SqlDatabase = "SMA", - - [System.String] - $SiteName = "SMA", - - [System.UInt16] - $WebServicePort = 9090, - - [System.String] - $InstallFolder, - - [System.String] - $UseSSL = "Yes", - - [System.String] - $SpecifyCertificate = "No", - - [System.String] - $CertificateName = ($env:COMPUTERNAME + "." + (Get-WmiObject -Class Win32_ComputerSystem).Domain), - - [System.String] - $ETWManifest = "Yes", - - [System.String] - $SendCEIPReports = "No", - - [System.String] - $MSUpdate = "No", - - [System.String] - $ProductKey, - - [System.String[]] - $RunbookWorkerServers - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "\SMA\WorkerSetup.exe" - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - - switch($Version) - { - "7.2.1563.0" - { - $IdentifyingNumber = "{4B76B636-AE9A-47D5-A246-E02909D97CF2}" - } - "7.2.5002.0" - { - $IdentifyingNumber = "{4B76B636-AE9A-47D5-A246-E02909D97CF2}" - } - "7.3.150.0" - { - # System Center Technical Preview 5 - $IdentifyingNumber = "{4B76B636-AE9A-47D5-A246-E02909D97CF2}" - } - "7.3.345.0" - { - # System Center 2016 RTM - $IdentifyingNumber = "{4B76B636-AE9A-47D5-A246-E02909D97CF2}" - } - Default - { - throw "Unknown version of Service Management Automation!" - } - } - - if(Get-WmiObject -Class win32_product -Filter "IdentifyingNumber='$IdentifyingNumber'") - { - $SqlServer = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\ServiceManagementAutomation\WebService" -Name "DatabaseServerName").DatabaseServerName - $SqlInstance = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\ServiceManagementAutomation\WebService" -Name "DatabaseServerInstance").DatabaseServerInstance - if([String]::IsNullOrEmpty($SqlInstance)) - { - $SqlInstance = "MSSQLSERVER" - } - $SqlDatabase = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\ServiceManagementAutomation\WebService" -Name "DatabaseName").DatabaseName - $InstallFolder = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\ServiceManagementAutomation\WebService" -Name "InstallationFolder").InstallationFolder - $SiteName = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\ServiceManagementAutomation\WebService" -Name "IisSiteName").IisSiteName - $ApPoolUsername = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\ServiceManagementAutomation\WebService" -Name "IisAppPoolAccount").IisAppPoolAccount - $AdminGroupMembers = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\ServiceManagementAutomation\WebService" -Name "IisAuthorizationAdminGroupMembers").IisAuthorizationAdminGroupMembers - if(!(Get-Module -Name Microsoft.SystemCenter.ServiceManagementAutomation)) - { - Import-Module -Name Microsoft.SystemCenter.ServiceManagementAutomation - } - $RunbookWorkerServers = (Get-SmaRunbookWorkerDeployment -WebServiceEndpoint https://localhost).ComputerName - - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - ApPoolUsername = $ApPoolUsername - AdminGroupMembers = $AdminGroupMembers - SqlServer = $SqlServer - SqlInstance = $SqlInstance - SqlDatabase = $SqlDatabase - SiteName = $SiteName - InstallFolder = $InstallFolder - RunbookWorkerServers = $RunbookWorkerServers - } - } - else - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\Orchestrator", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [parameter(Mandatory = $true)] - [System.Boolean] - $FirstWebServiceServer, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $ApPool, - - [System.String] - $AdminGroupMembers, - - [parameter(Mandatory = $true)] - [System.String] - $SqlServer, - - [parameter(Mandatory = $true)] - [System.String] - $SqlInstance, - - [System.String] - $SqlDatabase = "SMA", - - [System.String] - $SiteName = "SMA", - - [System.UInt16] - $WebServicePort = 9090, - - [System.String] - $InstallFolder, - - [System.String] - $UseSSL = "Yes", - - [System.String] - $SpecifyCertificate = "No", - - [System.String] - $CertificateName = ($env:COMPUTERNAME + "." + (Get-WmiObject -Class Win32_ComputerSystem).Domain), - - [System.String] - $ETWManifest = "Yes", - - [System.String] - $SendCEIPReports = "No", - - [System.String] - $MSUpdate = "No", - - [System.String] - $ProductKey, - - [System.String[]] - $RunbookWorkerServers - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "\SMA\WorkerSetup.exe" - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - - switch($Version) - { - "7.2.1563.0" - { - $IdentifyingNumber = "{4B76B636-AE9A-47D5-A246-E02909D97CF2}" - $SCVersion = "System Center 2012 R2" - } - "7.2.5002.0" - { - $IdentifyingNumber = "{4B76B636-AE9A-47D5-A246-E02909D97CF2}" - $SCVersion = "System Center Technical Preview" - } - "7.3.150.0" - { - $IdentifyingNumber = "{4B76B636-AE9A-47D5-A246-E02909D97CF2}" - $SCVersion = "System Center Technical Preview 5" - } - "7.3.345.0" - { - # System Center 2016 RTM - $IdentifyingNumber = "{4B76B636-AE9A-47D5-A246-E02909D97CF2}" - $SCVersion = "System Center 2016" - } - Default - { - throw "Unknown version of Service Management Automation!" - } - } - - $Path = "msiexec.exe" - $Path = ResolvePath $Path - - switch($Ensure) - { - "Present" - { - # Set defaults, if they couldn't be set in param due to null configdata input - if($WebServicePort -eq 0) - { - $WebServicePort = 9090 - } - foreach($ArgumentVar in ("UseSSL","SpecifyCertificate","ETWManifest","SendCEIPReports","MSUpdate")) - { - if((Get-Variable -Name $ArgumentVar).Value -ne "Yes") - { - Set-Variable -Name $ArgumentVar -Value "No" - } - } - if([String]::IsNullOrEmpty($AdminGroupMembers)) - { - $AdminGroupMembers = $ApPool.UserName - } - else - { - $AdminGroupMembers = "$AdminGroupMembers,$($ApPool.UserName)" - } - - $MSIPath = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "\SMA\WebServiceInstaller.msi" - $MSIPath = ResolvePath $MSIPath - Write-Verbose "MSIPath: $MSIPath" - - # Create install arguments - $Arguments = "/q /i $MSIPath" - if(($PSVersionTable.PSVersion.Major -eq 5) -and ($SCVersion -eq "System Center 2012 R2")) - { - $MSTPath = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "\SMA\WMF5WebService.mst" - $MSTPath = ResolvePath $MSTPath - Write-Verbose "MSTPath: $MSTPath" - $Arguments += " TRANSFORMS=$MSTPath" - } - $Arguments += " ALLUSERS=2 DatabaseAuthentication=Windows UseSSL=Yes" - $ArgumentVars = @( - "AdminGroupMembers", - "SqlServer", - "SqlDatabase", - "SiteName", - "WebServicePort", - "InstallFolder", - "ETWManifest" - "SendCEIPReports", - "MSUpdate", - "ProductKey" - ) - if($SQLInstance -ne "MSSQLSERVER") - { - $ArgumentVars += @( - "SqlInstance" - ) - } - # If SpecifyCertificate = Yes, get serial number - if($SpecifyCertificate -eq "Yes") - { - $Certificates = @(Get-ChildItem -Path "Cert:\LocalMachine\My" | Where-Object {($_.Subject -eq "CN=$CertificateName") -and ($_.Issuer -ne "CN=$CertificateName")} | Where-Object {$_.EnhancedKeyUsageList.ObjectId -eq "1.3.6.1.5.5.7.3.1"}) - if($Certificates.Count -eq 0) - { - $Certificates = @(Get-ChildItem -Path "Cert:\LocalMachine\My" | Where-Object {$_.Subject -eq "CN=$CertificateName"} | Where-Object {$_.EnhancedKeyUsageList.ObjectId -eq "1.3.6.1.5.5.7.3.1"}) - } - if($Certificates.Count -eq 0) - { - $null = New-SelfSignedCertificate -DnsName $CertificateName -CertStoreLocation "Cert:\LocalMachine\My" - $Certificates = @(Get-ChildItem -Path "Cert:\LocalMachine\My" | Where-Object {$_.Subject -eq "CN=$CertificateName"} | Where-Object {$_.EnhancedKeyUsageList.ObjectId -eq "1.3.6.1.5.5.7.3.1"}) - } - $CertificateSerialNumber = $Certificates[0].SerialNumber - $ArgumentVars += @("CertificateSerialNumber") - } - if($FirstWebServiceServer) - { - $Arguments += " CreateDatabase=Yes" - } - else - { - $Arguments += " CreateDatabase=No" - } - foreach($ArgumentVar in $ArgumentVars) - { - if(!([String]::IsNullOrEmpty((Get-Variable -Name $ArgumentVar).Value))) - { - $Arguments += " $ArgumentVar=`"" + [Environment]::ExpandEnvironmentVariables((Get-Variable -Name $ArgumentVar).Value) + "`"" - } - } - $AccountVars = @("ApPool") - foreach($AccountVar in $AccountVars) - { - $Arguments += " $AccountVar`Account=`"" + (Get-Variable -Name $AccountVar).Value.UserName + "`"" - $Arguments += " $AccountVar`Password=`"" + (Get-Variable -Name $AccountVar).Value.GetNetworkCredential().Password + "`"" - } - - # Replace sensitive values for verbose output - $Log = $Arguments - $LogVars = @("ApPool") - foreach($LogVar in $LogVars) - { - if((Get-Variable -Name $LogVar).Value -ne "") - { - $Log = $Log.Replace((Get-Variable -Name $LogVar).Value.GetNetworkCredential().Password,"********") - } - } - } - "Absent" - { - $Arguments = "/q /x $IdentifyingNumber" - $Log = $Arguments - } - } - - Write-Verbose "Path: $Path" - Write-Verbose "Arguments: $Log" - - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - - # Additional first Web Service Server "Present" actions - if(($Ensure -eq "Present") -and $FirstWebServiceServer -and (Get-WmiObject -Class Win32_Product -Filter "IdentifyingNumber ='$IdentifyingNumber'")) - { - if(!(Get-Module -Name Microsoft.SystemCenter.ServiceManagementAutomation)) - { - Import-Module -Name Microsoft.SystemCenter.ServiceManagementAutomation - $Workers = @() - foreach($RunbookWorkerServer in $RunbookWorkerServers) - { - $Workers += $RunbookWorkerServer.Split(".")[0] - } - New-SmaRunbookWorkerDeployment -WebServiceEndpoint https://localhost -ComputerName $Workers - } - } - - if((Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction SilentlyContinue) -ne $null) - { - $global:DSCMachineStatus = 1 - } - else - { - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\Orchestrator", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [parameter(Mandatory = $true)] - [System.Boolean] - $FirstWebServiceServer, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $ApPool, - - [System.String] - $AdminGroupMembers, - - [parameter(Mandatory = $true)] - [System.String] - $SqlServer, - - [parameter(Mandatory = $true)] - [System.String] - $SqlInstance, - - [System.String] - $SqlDatabase = "SMA", - - [System.String] - $SiteName = "SMA", - - [System.UInt16] - $WebServicePort = 9090, - - [System.String] - $InstallFolder, - - [System.String] - $UseSSL = "Yes", - - [System.String] - $SpecifyCertificate = "No", - - [System.String] - $CertificateName = ($env:COMPUTERNAME + "." + (Get-WmiObject -Class Win32_ComputerSystem).Domain), - - [System.String] - $ETWManifest = "Yes", - - [System.String] - $SendCEIPReports = "No", - - [System.String] - $MSUpdate = "No", - - [System.String] - $ProductKey, - - [System.String[]] - $RunbookWorkerServers - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMAWebServiceServerSetup/MSFT_xSCSMAWebServiceServerSetup.schema.mof b/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMAWebServiceServerSetup/MSFT_xSCSMAWebServiceServerSetup.schema.mof deleted file mode 100644 index 102f4cd1..00000000 --- a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSCSMAWebServiceServerSetup/MSFT_xSCSMAWebServiceServerSetup.schema.mof +++ /dev/null @@ -1,26 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCSMAWebServiceServerSetup")] -class MSFT_xSCSMAWebServiceServerSetup : OMI_BaseResource -{ - [Key, Description("An enumerated value that describes if the SMA Web Service server is expected to be installed on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; - [Required, Description("Is this the first Management Server?")] Boolean FirstWebServiceServer; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Service account of the web service application pool.")] String ApPool; - [Read, Description("Output username of the web service application pool.")] String ApPoolUsername; - [Write, Description("A comma-separated list of users to add to the IIS Administrators group.")] String AdminGroupMembers; - [Required, Description("Name of the SQL Server for the SMA database.")] String SqlServer; - [Required, Description("Name of the SQL Instance for the SMA database.")] String SqlInstance; - [Write, Description("Name of the SMA database.")] String SqlDatabase; - [Write, Description("Name of the SMA web site.")] String SiteName; - [Write, Description("Port of the SMA web site.")] UInt16 WebServicePort; - [Write, Description("Installation folder for SMA.")] String InstallFolder; - [Write, Description("Use SSL?")] String UseSSL; - [Write, Description("Specify an existing certificate for the SMA web site.")] String SpecifyCertificate; - [Write, Description("Name of the existing certificate to use.")] String CertificateName; - [Write, Description("Log to ETW.")] String ETWManifest; - [Write, Description("Send Customer Experience Improvement Program.")] String SendCEIPReports; - [Write, Description("Use Microsoft Update.")] String MSUpdate; - [Write, Description("Product key for licensed installations.")] String ProductKey; - [Write, Description("Array of Runbook Worker servers in this deployment.")] String RunbookWorkerServers[]; -}; diff --git a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSmaCredential/MSFT_xSmaCredential.psm1 b/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSmaCredential/MSFT_xSmaCredential.psm1 deleted file mode 100644 index 3d0c4752..00000000 --- a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSmaCredential/MSFT_xSmaCredential.psm1 +++ /dev/null @@ -1,128 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $credential, - - [System.String] - $Description, - - [parameter(Mandatory = $true)] - [System.String] - $WebServiceEndpoint, - - [System.UInt32] - $Port - ) - - $null = $PSBoundParameters.Remove("credential") - $null = $PSBoundParameters.Remove("Description") - - $SMACredential = Get-SmaCredential @PSBoundParameters -ErrorAction SilentlyContinue - - $foundUserName = $SMACredential.UserName - $foundDescription = $SMACredential.Description - - $returnValue = @{ - Name = [System.String]$Name - Credential = [System.Management.Automation.PSCredential]$credential # return credentials given, because SMA does not return any - Description = [System.String]$foundDescription - WebServiceEndpoint = [System.String]$WebServiceEndpoint - Port = [System.UInt32]$Port - UserName = [System.String]$foundUserName - } - - $returnValue - -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $credential, - - [System.String] - $Description, - - [parameter(Mandatory = $true)] - [System.String] - $WebServiceEndpoint, - - [System.UInt32] - $Port - ) - - $PSBoundParameters.Add("value", $credential) - $PSBoundParameters.Remove("credential") - - Set-SmaCredential @PSBoundParameters -ErrorAction Stop -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $credential, - - [System.String] - $Description, - - [parameter(Mandatory = $true)] - [System.String] - $WebServiceEndpoint, - - [System.UInt32] - $Port - ) - - $results = Get-TargetResource @PSBoundParameters - - # check user name value match - if($results.UserName -ne $credential.UserName) - { - Write-Verbose "SMA credential $Name user name $($results.UserName) expected $($credential.UserName)" - return $false - } - - # check descption match - if($results.Description -ne $Description ) - { - # check description are not supposed to be empty - if( !(($results.Description -eq $null) -and ($Description -eq "")) ) - { - Write-Verbose "SMA credential $Name description $($results.Description) expected $Description" - return $false - } - } - - return $true -} - - -Export-ModuleMember -Function Get-TargetResource, Set-TargetResource, Test-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSmaCredential/MSFT_xSmaCredential.schema.mof b/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSmaCredential/MSFT_xSmaCredential.schema.mof deleted file mode 100644 index 3c62f1ad..00000000 --- a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSmaCredential/MSFT_xSmaCredential.schema.mof +++ /dev/null @@ -1,12 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xSmaCredential")] -class MSFT_xSmaCredential : OMI_BaseResource -{ - [Key, Description("Name of credential.")] String Name; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential object to be imported.")] String credential; - [Write, Description("Description of credential.")] String Description; - [Required, Description("Web service endpoint of SMA instance.")] String WebServiceEndpoint; - [Write, Description("Port to reach the web service endpoint.")] Uint32 Port; - [Read, Description("User name of credential found within SMA")] String UserName; -}; - diff --git a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSmaVariable/MSFT_xSmaVariable.psm1 b/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSmaVariable/MSFT_xSmaVariable.psm1 deleted file mode 100644 index e1fbd253..00000000 --- a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSmaVariable/MSFT_xSmaVariable.psm1 +++ /dev/null @@ -1,173 +0,0 @@ -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData -StringData @' - VariableDoesNotMatch = variable {0} has value {1} expected {2}. - VariableDescriptionDoesNotMatch = variable {0} has description {1} expected {2}. - VariableNotFound = Failed to find variable {0}. -'@ -} - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $value, - - [System.String] - $Description, - - [parameter(Mandatory = $true)] - [System.String] - $WebServiceEndpoint, - - [System.UInt32] - $Port = 9090 - ) - - $Set = $true - try - { - $variable = Get-SmaVariable -Name $Name -WebServiceEndpoint $webserviceendpoint -port $port -ErrorAction Stop - - $Ensure = "Present" - - # check variable value match - if($variable.Value -ne $value) - { - Write-Verbose ( $($LocalizedData.VariableDoesNotMatch) -f $Name, $variable.Value, $value) - $Set = $false - } - - # check description match - if($variable.Description -ne $Description ) - { - # check description are not supposed to be empty - if( !(($variable.Description -eq $null) -and ($Description -eq "")) ) - { - Write-Verbose ( $($LocalizedData.VariableDescriptionDoesNotMatch) -f $Name, $variable.Description, $Description) - $Set = $false - } - } - } - catch - { - Write-Verbose ( $($LocalizedData.VariableNotFound) -f $Name) - $Set = $false - $Ensure = "Absent" - } - - $returnValue = @{ - Ensure = [System.String]$Ensure - Name = [System.String]$variable.Name - value = [System.String]$variable.Value - Description = [System.String]$variable.Description - Set = [System.Boolean]$Set - WebServiceEndpoint = [System.String]$WebServiceEndpoint - Port = [System.UInt32]$Port - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $value, - - [System.String] - $Description, - - [parameter(Mandatory = $true)] - [System.String] - $WebServiceEndpoint, - - [System.UInt32] - $Port = 9090 - ) - - If($Ensure -eq "Present") - { - Set-SmaVariable -Name $Name -Value $value -Description $Description -WebServiceEndpoint $webserviceendpoint -port $port -ErrorAction Stop - } - else - { - Remove-SmaVariable -Name $Name -WebServiceEndpoint $webserviceendpoint -port $port -ErrorAction Stop - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $value, - - [System.String] - $Description, - - [parameter(Mandatory = $true)] - [System.String] - $WebServiceEndpoint, - - [System.UInt32] - $Port = 9090 - ) - - $result = Get-TargetResource @PSBoundParameters - - if( ($Ensure -eq "Present") -and ($result.Ensure -eq "Present") -and ($result.set -eq $true)) - { - return $true - } - elseif( ($result.Ensure -eq "Absent") -and ($Ensure -eq "Absent") ) - { - return $true - } - - return $false -} - - -Export-ModuleMember -Function Get-TargetResource, Set-TargetResource, Test-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSmaVariable/MSFT_xSmaVariable.schema.mof b/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSmaVariable/MSFT_xSmaVariable.schema.mof deleted file mode 100644 index 5c0e698c..00000000 --- a/lib/puppet_x/dsc_resources/xSCSMA/DSCResources/MSFT_xSmaVariable/MSFT_xSmaVariable.schema.mof +++ /dev/null @@ -1,14 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("SmaVariable")] -class MSFT_xSmaVariable : OMI_BaseResource -{ - [Required, Description("Desired state of SMA variable"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Key, Description("Name of SMA variable.")] String Name; - [Required, Description("Value of SMA variable.")] String value; - [Write, Description("Description of SMA variable.")] String Description; - [Read, Description("Set is true if existing SMA variable matches configuration.")] Boolean Set; - [Key, Description("Web service endpoint of SMA instance.")] String WebServiceEndpoint; - [Write, Description("Port to reach the web service endpoint. Defaults to the SMA default of 9090.")] Uint32 Port; -}; - - diff --git a/lib/puppet_x/dsc_resources/xSCSMA/LICENSE b/lib/puppet_x/dsc_resources/xSCSMA/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xSCSMA/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xSCSMA/en-US/xPDT.strings.psd1 b/lib/puppet_x/dsc_resources/xSCSMA/en-US/xPDT.strings.psd1 deleted file mode 100644 index 11f213c1..00000000 --- a/lib/puppet_x/dsc_resources/xSCSMA/en-US/xPDT.strings.psd1 +++ /dev/null @@ -1,10 +0,0 @@ -ConvertFrom-StringData @' -FileNotFound=File not found in the environment path -AbsolutePathOrFileName=Absolute path or file name expected -InvalidArgument=Invalid argument: '{0}' with value: '{1}' -InvalidArgumentAndMessage={0} {1} -ErrorStarting=Failure starting process matching path '{0}'. Message: {1} -FailureWaitingForProcessesToStart=Failed to wait for processes to start -ProcessStarted=Process matching path '{0}' started in process ID {1} -ProcessAlreadyStarted=Process matching path '{0}' already started in process ID {1} -'@ diff --git a/lib/puppet_x/dsc_resources/xSCSMA/xPDT.psm1 b/lib/puppet_x/dsc_resources/xSCSMA/xPDT.psm1 deleted file mode 100644 index c90beaa1..00000000 --- a/lib/puppet_x/dsc_resources/xSCSMA/xPDT.psm1 +++ /dev/null @@ -1,708 +0,0 @@ -data LocalizedData -{ - ConvertFrom-StringData @' - -FileNotFound=File not found in the environment path -AbsolutePathOrFileName=Absolute path or file name expected -InvalidArgument=Invalid argument: '{0}' with value: '{1}' -InvalidArgumentAndMessage={0} {1} -ErrorStarting=Failure starting process matching path '{0}'. Message: {1} -FailureWaitingForProcessesToStart=Failed to wait for processes to start -ProcessStarted=Process matching path '{0}' started in process ID {1} -ProcessAlreadyStarted=Process matching path '{0}' already started in process ID {1} -'@ -} - -Import-LocalizedData LocalizedData -filename xPDT.strings.psd1 - -function ThrowInvalidArgumentError -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $errorId, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $errorMessage - ) - - $errorCategory=[System.Management.Automation.ErrorCategory]::InvalidArgument - $exception = New-Object System.ArgumentException $errorMessage; - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - throw $errorRecord -} - -function ResolvePath -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Path - ) - - $Path = [Environment]::ExpandEnvironmentVariables($Path) - if(IsRootedPath $Path) - { - if(!(Test-Path $Path -PathType Leaf)) - { - ThrowInvalidArgumentError "CannotFindRootedPath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) - } - return $Path - } - if([string]::IsNullOrEmpty($env:Path)) - { - ThrowInvalidArgumentError "EmptyEnvironmentPath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) - } - if((Split-Path $Path -Leaf) -ne $Path) - { - ThrowInvalidArgumentError "NotAbsolutePathOrFileName" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.AbsolutePathOrFileName) - } - foreach($rawSegment in $env:Path.Split(";")) - { - $segment = [Environment]::ExpandEnvironmentVariables($rawSegment) - $segmentRooted = $false - try - { - $segmentRooted=[IO.Path]::IsPathRooted($segment) - } - catch {} - if(!$segmentRooted) - { - continue - } - $candidate = join-path $segment $Path - if(Test-Path $candidate -PathType Leaf) - { - return $candidate - } - } - ThrowInvalidArgumentError "CannotFindRelativePath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) -} - -function IsRootedPath -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path - ) - - try - { - return [IO.Path]::IsPathRooted($Path) - } - catch - { - ThrowInvalidArgumentError "CannotGetIsPathRooted" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $_.Exception.Message) - } -} - -function ExtractArguments -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - $functionBoundParameters, - - [parameter(Mandatory = $true)] - [string[]] - $argumentNames, - - [string[]] - $newArgumentNames - ) - - $returnValue=@{} - - for($i=0;$i -lt $argumentNames.Count;$i++) - { - $argumentName = $argumentNames[$i] - - if($newArgumentNames -eq $null) - { - $newArgumentName = $argumentName - } - else - { - $newArgumentName = $newArgumentNames[$i] - } - - if($functionBoundParameters.ContainsKey($argumentName)) - { - $null = $returnValue.Add($newArgumentName,$functionBoundParameters[$argumentName]) - } - } - - return $returnValue -} - -function CallPInvoke -{ - $script:ProgramSource = @" -using System; -using System.Collections.Generic; -using System.Text; -using System.Security; -using System.Runtime.InteropServices; -using System.Diagnostics; -using System.Security.Principal; -using System.ComponentModel; -using System.IO; - -namespace Source -{ - [SuppressUnmanagedCodeSecurity] - public static class NativeMethods - { - //The following structs and enums are used by the various Win32 API's that are used in the code below - - [StructLayout(LayoutKind.Sequential)] - public struct STARTUPINFO - { - public Int32 cb; - public string lpReserved; - public string lpDesktop; - public string lpTitle; - public Int32 dwX; - public Int32 dwY; - public Int32 dwXSize; - public Int32 dwXCountChars; - public Int32 dwYCountChars; - public Int32 dwFillAttribute; - public Int32 dwFlags; - public Int16 wShowWindow; - public Int16 cbReserved2; - public IntPtr lpReserved2; - public IntPtr hStdInput; - public IntPtr hStdOutput; - public IntPtr hStdError; - } - - [StructLayout(LayoutKind.Sequential)] - public struct PROCESS_INFORMATION - { - public IntPtr hProcess; - public IntPtr hThread; - public Int32 dwProcessID; - public Int32 dwThreadID; - } - - [Flags] - public enum LogonType - { - LOGON32_LOGON_INTERACTIVE = 2, - LOGON32_LOGON_NETWORK = 3, - LOGON32_LOGON_BATCH = 4, - LOGON32_LOGON_SERVICE = 5, - LOGON32_LOGON_UNLOCK = 7, - LOGON32_LOGON_NETWORK_CLEARTEXT = 8, - LOGON32_LOGON_NEW_CREDENTIALS = 9 - } - - [Flags] - public enum LogonProvider - { - LOGON32_PROVIDER_DEFAULT = 0, - LOGON32_PROVIDER_WINNT35, - LOGON32_PROVIDER_WINNT40, - LOGON32_PROVIDER_WINNT50 - } - [StructLayout(LayoutKind.Sequential)] - public struct SECURITY_ATTRIBUTES - { - public Int32 Length; - public IntPtr lpSecurityDescriptor; - public bool bInheritHandle; - } - - public enum SECURITY_IMPERSONATION_LEVEL - { - SecurityAnonymous, - SecurityIdentification, - SecurityImpersonation, - SecurityDelegation - } - - public enum TOKEN_TYPE - { - TokenPrimary = 1, - TokenImpersonation - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - internal struct TokPriv1Luid - { - public int Count; - public long Luid; - public int Attr; - } - - public const int GENERIC_ALL_ACCESS = 0x10000000; - public const int CREATE_NO_WINDOW = 0x08000000; - internal const int SE_PRIVILEGE_ENABLED = 0x00000002; - internal const int TOKEN_QUERY = 0x00000008; - internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; - internal const string SE_INCRASE_QUOTA = "SeIncreaseQuotaPrivilege"; - - [DllImport("kernel32.dll", - EntryPoint = "CloseHandle", SetLastError = true, - CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] - public static extern bool CloseHandle(IntPtr handle); - - [DllImport("advapi32.dll", - EntryPoint = "CreateProcessAsUser", SetLastError = true, - CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] - public static extern bool CreateProcessAsUser( - IntPtr hToken, - string lpApplicationName, - string lpCommandLine, - ref SECURITY_ATTRIBUTES lpProcessAttributes, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - bool bInheritHandle, - Int32 dwCreationFlags, - IntPtr lpEnvrionment, - string lpCurrentDirectory, - ref STARTUPINFO lpStartupInfo, - ref PROCESS_INFORMATION lpProcessInformation - ); - - [DllImport("advapi32.dll", EntryPoint = "DuplicateTokenEx")] - public static extern bool DuplicateTokenEx( - IntPtr hExistingToken, - Int32 dwDesiredAccess, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - Int32 ImpersonationLevel, - Int32 dwTokenType, - ref IntPtr phNewToken - ); - - [DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)] - public static extern Boolean LogonUser( - String lpszUserName, - String lpszDomain, - String lpszPassword, - LogonType dwLogonType, - LogonProvider dwLogonProvider, - out IntPtr phToken - ); - - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern bool AdjustTokenPrivileges( - IntPtr htok, - bool disall, - ref TokPriv1Luid newst, - int len, - IntPtr prev, - IntPtr relen - ); - - [DllImport("kernel32.dll", ExactSpelling = true)] - internal static extern IntPtr GetCurrentProcess(); - - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern bool OpenProcessToken( - IntPtr h, - int acc, - ref IntPtr phtok - ); - - [DllImport("advapi32.dll", SetLastError = true)] - internal static extern bool LookupPrivilegeValue( - string host, - string name, - ref long pluid - ); - - public static void CreateProcessAsUser(string strCommand, string strDomain, string strName, string strPassword) - { - var hToken = IntPtr.Zero; - var hDupedToken = IntPtr.Zero; - TokPriv1Luid tp; - var pi = new PROCESS_INFORMATION(); - var sa = new SECURITY_ATTRIBUTES(); - sa.Length = Marshal.SizeOf(sa); - Boolean bResult = false; - try - { - bResult = LogonUser( - strName, - strDomain, - strPassword, - LogonType.LOGON32_LOGON_BATCH, - LogonProvider.LOGON32_PROVIDER_DEFAULT, - out hToken - ); - if (!bResult) - { - throw new Win32Exception("The user could not be logged on. Ensure that the user has an existing profile on the machine and that correct credentials are provided. Logon error #" + Marshal.GetLastWin32Error().ToString()); - } - IntPtr hproc = GetCurrentProcess(); - IntPtr htok = IntPtr.Zero; - bResult = OpenProcessToken( - hproc, - TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, - ref htok - ); - if(!bResult) - { - throw new Win32Exception("Open process token error #" + Marshal.GetLastWin32Error().ToString()); - } - tp.Count = 1; - tp.Luid = 0; - tp.Attr = SE_PRIVILEGE_ENABLED; - bResult = LookupPrivilegeValue( - null, - SE_INCRASE_QUOTA, - ref tp.Luid - ); - if(!bResult) - { - throw new Win32Exception("Error in looking up privilege of the process. This should not happen if DSC is running as LocalSystem Lookup privilege error #" + Marshal.GetLastWin32Error().ToString()); - } - bResult = AdjustTokenPrivileges( - htok, - false, - ref tp, - 0, - IntPtr.Zero, - IntPtr.Zero - ); - if(!bResult) - { - throw new Win32Exception("Token elevation error #" + Marshal.GetLastWin32Error().ToString()); - } - - bResult = DuplicateTokenEx( - hToken, - GENERIC_ALL_ACCESS, - ref sa, - (int)SECURITY_IMPERSONATION_LEVEL.SecurityIdentification, - (int)TOKEN_TYPE.TokenPrimary, - ref hDupedToken - ); - if(!bResult) - { - throw new Win32Exception("Duplicate Token error #" + Marshal.GetLastWin32Error().ToString()); - } - var si = new STARTUPINFO(); - si.cb = Marshal.SizeOf(si); - si.lpDesktop = ""; - bResult = CreateProcessAsUser( - hDupedToken, - null, - strCommand, - ref sa, - ref sa, - false, - 0, - IntPtr.Zero, - null, - ref si, - ref pi - ); - if(!bResult) - { - throw new Win32Exception("The process could not be created. Create process as user error #" + Marshal.GetLastWin32Error().ToString()); - } - } - finally - { - if (pi.hThread != IntPtr.Zero) - { - CloseHandle(pi.hThread); - } - if (pi.hProcess != IntPtr.Zero) - { - CloseHandle(pi.hProcess); - } - if (hDupedToken != IntPtr.Zero) - { - CloseHandle(hDupedToken); - } - } - } - } -} - -"@ - Add-Type -TypeDefinition $ProgramSource -ReferencedAssemblies "System.ServiceProcess" -} - -function GetWin32Process -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential - ) - - $fileName = [io.path]::GetFileNameWithoutExtension($Path) - $GetProcesses = @(Get-Process -Name $fileName -ErrorAction SilentlyContinue) - $Processes = foreach($process in $GetProcesses) - { - if($Process.Path -ieq $Path) - { - try - { - [wmi]"Win32_Process.Handle='$($Process.Id)'" - } - catch - { - } - } - } - if($PSBoundParameters.ContainsKey('Credential')) - { - $Processes = $Processes | Where-Object {(GetWin32ProcessOwner $_) -eq $Credential.UserName} - } - if($Arguments -eq $null) {$Arguments = ""} - $Processes = $Processes | Where-Object {(GetWin32ProcessArgumentsFromCommandLine $_.CommandLine) -eq $Arguments} - - return $Processes -} - -function GetWin32ProcessOwner -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNull()] - $Process - ) - - try - { - $Owner = $Process.GetOwner() - } - catch - {} - if($owner.Domain -ne $null) - { - return $Owner.Domain + "\" + $Owner.User - } - else - { - return $Owner.User - } -} - -function GetWin32ProcessArgumentsFromCommandLine -{ - param - ( - [String] - $commandLine - ) - - if($commandLine -eq $null) - { - return "" - } - $commandLine=$commandLine.Trim() - if($commandLine.Length -eq 0) - { - return "" - } - if($commandLine[0] -eq '"') - { - $charToLookfor=[char]'"' - } - else - { - $charToLookfor=[char]' ' - } - $endOfCommand=$commandLine.IndexOf($charToLookfor ,1) - if($endOfCommand -eq -1) - { - return "" - } - return $commandLine.Substring($endOfCommand+1).Trim() -} - -function StartWin32Process -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential, - - [Switch] - $AsTask - ) - - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - $Processes = @(GetWin32Process @getArguments) - if ($processes.Count -eq 0) - { - if($PSBoundParameters.ContainsKey("Credential")) - { - if($AsTask) - { - $ActionArguments = ExtractArguments $PSBoundParameters ` - ("Path", "Arguments") ` - ("Execute", "Argument") - if([string]::IsNullOrEmpty($Arguments)) - { - $null = $ActionArguments.Remove("Argument") - } - $TaskGuid = [guid]::NewGuid().ToString() - $Action = New-ScheduledTaskAction @ActionArguments - $null = Register-ScheduledTask -TaskName "xPDT $TaskGuid" -Action $Action -User $Credential.UserName -Password $Credential.GetNetworkCredential().Password -RunLevel Highest - $err = Start-ScheduledTask -TaskName "xPDT $TaskGuid" - } - else - { - try - { - CallPInvoke - [Source.NativeMethods]::CreateProcessAsUser(("$Path " + $Arguments),$Credential.GetNetworkCredential().Domain,$Credential.GetNetworkCredential().UserName,$Credential.GetNetworkCredential().Password) - } - catch - { - $exception = New-Object System.ArgumentException $_ - $errorCategory = [System.Management.Automation.ErrorCategory]::OperationStopped - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, "Win32Exception", $errorCategory, $null - $err = $errorRecord - } - } - } - else - { - $StartArguments = ExtractArguments $PSBoundParameters ` - ("Path", "Arguments", "Credential") ` - ("FilePath", "ArgumentList", "Credential") - if([string]::IsNullOrEmpty($Arguments)) - { - $null = $StartArguments.Remove("ArgumentList") - } - $err = Start-Process @StartArguments - } - if($err -ne $null) - { - throw $err - } - if (!(WaitForWin32ProcessStart @GetArguments)) - { - ThrowInvalidArgumentError "FailureWaitingForProcessesToStart" ($LocalizedData.ErrorStarting -f $Path,$LocalizedData.FailureWaitingForProcessesToStart) - } - } - else - { - return ($LocalizedData.ProcessAlreadyStarted -f $Path,$Processes.ProcessId) - } - $Processes = @(GetWin32Process @getArguments) - return ($LocalizedData.ProcessStarted -f $Path,$Processes.ProcessId) -} - -function WaitForWin32ProcessStart -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential - ) - - $start = [DateTime]::Now - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - do - { - $value = @(GetWin32Process @GetArguments).Count -ge 1 - } while(!$value -and ([DateTime]::Now - $start).TotalMilliseconds -lt 60000) - - return $value -} - -function WaitForWin32ProcessEnd -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential - ) - - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - While (WaitForWin32ProcessStart @GetArguments) - { - Start-Sleep 1 - } - Get-ScheduledTask | Where-Object {($_.TaskName.Length -ge 4) -and ($_.TaskName.Substring(0,4) -eq "xPDT") -and ($_.Actions.Execute -eq $Path) -and ($_.Actions.Arguments -eq $Arguments)} | Where-Object {$_ -ne $null} | Unregister-ScheduledTask -Confirm:$false -} - -function NetUse -{ - param - ( - [parameter(Mandatory)] - [string] - $SourcePath, - - [parameter(Mandatory)] - [PSCredential] - $Credential, - - [string] - $Ensure = "Present" - ) - - if(($SourcePath.Length -ge 2) -and ($SourcePath.Substring(0,2) -eq "\\")) - { - - if ($Ensure -eq "Absent") - { - $cmd = "net.exe use $SourcePath /del" - } - else - { - $cmd = "net.exe use $SourcePath $($Credential.GetNetworkCredential().Password) /user:$($Credential.GetNetworkCredential().Domain)\$($Credential.GetNetworkCredential().UserName)" - } - Invoke-Expression $cmd - } -} - -Export-ModuleMember ResolvePath,StartWin32Process,WaitForWin32ProcessEnd,NetUse diff --git a/lib/puppet_x/dsc_resources/xSCSMA/xSCSMA.psd1 b/lib/puppet_x/dsc_resources/xSCSMA/xSCSMA.psd1 deleted file mode 100644 index 923c136c..00000000 --- a/lib/puppet_x/dsc_resources/xSCSMA/xSCSMA.psd1 +++ /dev/null @@ -1,60 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '1.5.0.0' - -# ID used to uniquely identify this module -GUID = 'dada748e-cf1e-43ed-a4ff-3530c01afd53' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module with DSC Resources for deployment and configuration of Microsoft System Center Service Management Automation.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xSCSMA/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xSCSMA' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* Added $IdentifyingNumber for TP5/RTM and small WMI improvements - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - - - diff --git a/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServer/MSFT_xSCSPFServer.psm1 b/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServer/MSFT_xSCSPFServer.psm1 deleted file mode 100644 index c7e7f775..00000000 --- a/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServer/MSFT_xSCSPFServer.psm1 +++ /dev/null @@ -1,143 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [ValidateSet("VMM","OM","DPM","OMDW","RDGateway","Orchestrator","None")] - [System.String] - $ServerType, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SCSPFAdminCredential - ) - - $Ensure = Invoke-Command -ComputerName . -Credential $SCSPFAdminCredential -Authentication Credssp { - $Name = $args[0] - $ServerType = $args[1] - if(!(Get-Module spfadmin)) - { - Import-Module spfadmin - } - if(Get-Module spfadmin) - { - if(Get-SCSpfServer -Name $Name | Where-Object {$_.ServerType.ToString() -eq $ServerType}) - { - "Present" - } - else - { - "Absent" - } - } - else - { - "Absent" - } - } -ArgumentList @($Name,$ServerType) - - $returnValue = @{ - Ensure = $Ensure - Name = $Name - ServerType = $ServerType - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [ValidateSet("VMM","OM","DPM","OMDW","RDGateway","Orchestrator","None")] - [System.String] - $ServerType, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SCSPFAdminCredential - ) - - Invoke-Command -ComputerName . -Credential $SCSPFAdminCredential -Authentication Credssp { - $Ensure = $args[0] - $Name = $args[1] - $ServerType = $args[2] - if(!(Get-Module spfadmin)) - { - Import-Module spfadmin - } - if(Get-Module spfadmin) - { - switch($Ensure) - { - "Present" - { - New-SCSpfServer -Name $Name -ServerType $ServerType - } - "Absent" - { - Get-SCSpfServer -Name $Name | Remove-SCSPFServer - } - } - } - } -ArgumentList @($Ensure,$Name,$ServerType) - - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [ValidateSet("VMM","OM","DPM","OMDW","RDGateway","Orchestrator","None")] - [System.String] - $ServerType, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SCSPFAdminCredential - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServer/MSFT_xSCSPFServer.schema.mof b/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServer/MSFT_xSCSPFServer.schema.mof deleted file mode 100644 index a2b8ca42..00000000 --- a/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServer/MSFT_xSCSPFServer.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCSPFServer")] -class MSFT_xSCSPFServer : OMI_BaseResource -{ - [Write, Description("An enumerated value that describes if the SPF server exists.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Key, Description("Specifies a name for the server.")] String Name; - [Required, Description("Specifies the type of server."), ValueMap{"VMM","OM","DPM","OMDW","RDGateway","Orchestrator","None"}, Values{"VMM","OM","DPM","OMDW","RDGateway","Orchestrator","None"}] String ServerType; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential with admin permissions to Service Provider Foundation.")] String SCSPFAdminCredential; -}; diff --git a/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServerSetup/MSFT_xSCSPFServerSetup.psm1 b/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServerSetup/MSFT_xSCSPFServerSetup.psm1 deleted file mode 100644 index 97d69f97..00000000 --- a/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServerSetup/MSFT_xSCSPFServerSetup.psm1 +++ /dev/null @@ -1,490 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\Orchestrator", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.String] - $SendCEIPReports = "False", - - [System.String] - $UseMicrosoftUpdate = "False", - - [System.Boolean] - $SpecifyCertificate = $false, - - [System.String] - $CertificateName = ($env:COMPUTERNAME + "." + (Get-WmiObject -Class Win32_ComputerSystem).Domain), - - [Parameter(Mandatory=$true)] - [System.String] - $DatabaseServer, - - [System.UInt16] - $DatabasePortNumber, - - [System.String] - $DatabaseName = "SCSPFDB", - - [System.UInt16] - $WebSitePortNumber = 8090, - - [System.Management.Automation.PSCredential] - $SCVMM, - - [System.Management.Automation.PSCredential] - $SCAdmin = $SCVMM, - - [System.Management.Automation.PSCredential] - $SCProvider = $SCVMM, - - [System.Management.Automation.PSCredential] - $SCUsage = $SCVMM, - - [System.String] - $VMMSecurityGroupUsers, - - [System.String] - $AdminSecurityGroupUsers, - - [System.String] - $ProviderSecurityGroupUsers, - - [System.String] - $UsageSecurityGroupUsers - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "\SPF\setup.exe" - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - - switch($Version) - { - "7.2.1902.0" - { - $IdentifyingNumber = "{69344E86-7183-4384-A230-499E9914BE14}" - } - "7.2.5017.0" - { - $IdentifyingNumber = "{69344E86-7183-4384-A230-499E9914BE14}" - } - Default - { - throw "Unknown version of Service Provider Foundation!" - } - } - - if(Get-WmiObject -Class Win32_Product | Where-Object {$_.IdentifyingNumber -eq $IdentifyingNumber}) - { - $DatabaseServer = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Service Provider Foundation" -Name "DatabaseServer").DatabaseServer - - $DatabasePort = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Service Provider Foundation" -Name "DatabasePort").DatabasePort - if($DatabasePort -eq -1) - { - $DatabasePortNumber = 0 - } - else - { - $DatabasePortNumber = $DatabasePort - } - $DatabaseName = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Service Provider Foundation" -Name "DatabaseName").DatabaseName - $WebSitePortNumber = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Service Provider Foundation" -Name "PortNumber").PortNumber - $SCVMMUsername = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Service Provider Foundation\VMM" -Name "AppPoolDomain").AppPoolDomain + "\" + (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Service Provider Foundation\VMM" -Name "AppPoolUserName").AppPoolUserName - $SCAdminUsername = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Service Provider Foundation\Admin" -Name "AppPoolDomain").AppPoolDomain + "\" + (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Service Provider Foundation\Admin" -Name "AppPoolUserName").AppPoolUserName - $SCProviderUsername = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Service Provider Foundation\Provider" -Name "AppPoolDomain").AppPoolDomain + "\" + (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Service Provider Foundation\Provider" -Name "AppPoolUserName").AppPoolUserName - $SCUsageUsername = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Service Provider Foundation\Usage" -Name "AppPoolDomain").AppPoolDomain + "\" + (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Service Provider Foundation\Usage" -Name "AppPoolUserName").AppPoolUserName - $SPFGroups = @("VMM","Admin","Provider","Usage") - foreach($SPFGroup in $SPFGroups) - { - Set-Variable -Name ($SPFGroup + "SecurityGroupUsers") -Value @() - $Group = "SPF_$SPFGroup" - $ADSIGroup = [ADSI]("WinNT://localhost/$Group,group") - foreach($GroupMember in $ADSIGroup.Members()) - { - $AdsPath = $GroupMember.GetType().InvokeMember('Adspath', 'GetProperty', $Null, $GroupMember, $Null) - $A = $AdsPath.split('/',[StringSplitOptions]::RemoveEmptyEntries) - $Name = $A[2] - $Domain = $A[1] - if(($Domain + "\" + $Name) -ne (Get-Variable -Name ("SC" + $SPFGroup)).Value.Username) - { - Set-Variable -Name ($SPFGroup + "SecurityGroupUsers") -Value ((Get-Variable -Name ($SPFGroup + "SecurityGroupUsers")).Value + @(($Domain + "\" + $Name))) - } - } - } - - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - DatabaseServer = $DatabaseServer - DatabasePortNumber = $DatabasePortNumber - DatabaseName = $DatabaseName - WebSitePortNumber = $WebSitePortNumber - SCVMMUsername = $SCVMMUsername - SCAdminUsername = $SCAdminUsername - SCProviderUsername = $SCProviderUsername - SCUsageUsername = $SCUsageUsername - VMMSecurityGroupUsers = $VMMSecurityGroupUsers - AdminSecurityGroupUsers = $AdminSecurityGroupUsers - ProviderSecurityGroupUsers = $ProviderSecurityGroupUsers - UsageSecurityGroupUsers = $UsageSecurityGroupUsers - } - } - else - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\Orchestrator", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.String] - $SendCEIPReports = "False", - - [System.String] - $UseMicrosoftUpdate = "False", - - [System.Boolean] - $SpecifyCertificate = $false, - - [System.String] - $CertificateName = ($env:COMPUTERNAME + "." + (Get-WmiObject -Class Win32_ComputerSystem).Domain), - - [Parameter(Mandatory=$true)] - [System.String] - $DatabaseServer, - - [System.UInt16] - $DatabasePortNumber, - - [System.String] - $DatabaseName = "SCSPFDB", - - [System.UInt16] - $WebSitePortNumber = 8090, - - [System.Management.Automation.PSCredential] - $SCVMM, - - [System.Management.Automation.PSCredential] - $SCAdmin = $SCVMM, - - [System.Management.Automation.PSCredential] - $SCProvider = $SCVMM, - - [System.Management.Automation.PSCredential] - $SCUsage = $SCVMM, - - [System.String] - $VMMSecurityGroupUsers, - - [System.String] - $AdminSecurityGroupUsers, - - [System.String] - $ProviderSecurityGroupUsers, - - [System.String] - $UsageSecurityGroupUsers - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "\SPF\setup.exe" - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - Write-Verbose "Path: $Path" - - switch($Version) - { - "7.2.1902.0" - { - $IdentifyingNumber = "{69344E86-7183-4384-A230-499E9914BE14}" - } - "7.2.5017.0" - { - $IdentifyingNumber = "{69344E86-7183-4384-A230-499E9914BE14}" - } - Default - { - throw "Unknown version of Service Provider Foundation!" - } - } - - switch($Ensure) - { - "Present" - { - # Set defaults, if they couldn't be set in param due to null configdata input - if($WebSitePortNumber -eq 0) - { - $WebSitePortNumber = 8090 - } - if($SendCEIPReports -ne "True") - { - $SendCEIPReports = "False" - } - if($UseMicrosoftUpdate -ne "True") - { - $UseMicrosoftUpdate = "False" - } - - # Create install arguments - $TempFile = [IO.Path]::GetTempFileName() - $Arguments = "-Silent $TempFile" - $AnswerFile = @() - $AnswerFileVars = @( - "SendCEIPReports", - "UseMicrosoftUpdate", - "DatabaseServer", - "DatabasePortNumber", - "DatabaseName", - "WebSitePortNumber", - "SpecifyCertificate" - ) - # If SpecifyCertificate = True, get serial number - if($SpecifyCertificate) - { - $Certificates = @(Get-ChildItem -Path "Cert:\LocalMachine\My" | Where-Object {($_.Subject -eq "CN=$CertificateName") -and ($_.Issuer -ne "CN=$CertificateName")} | Where-Object {$_.EnhancedKeyUsageList.ObjectId -eq "1.3.6.1.5.5.7.3.1"}) - if($Certificates.Count -eq 0) - { - $Certificates = @(Get-ChildItem -Path "Cert:\LocalMachine\My" | Where-Object {$_.Subject -eq "CN=$CertificateName"} | Where-Object {$_.EnhancedKeyUsageList.ObjectId -eq "1.3.6.1.5.5.7.3.1"}) - } - if($Certificates.Count -eq 0) - { - $null = New-SelfSignedCertificate -DnsName $CertificateName -CertStoreLocation "Cert:\LocalMachine\My" - $Certificates = @(Get-ChildItem -Path "Cert:\LocalMachine\My" | Where-Object {$_.Subject -eq "CN=$CertificateName"} | Where-Object {$_.EnhancedKeyUsageList.ObjectId -eq "1.3.6.1.5.5.7.3.1"}) - } - $CertificateSerialNumber = $Certificates[0].SerialNumber - $AnswerFileVars += @("CertificateSerialNumber") - } - foreach($AnswerFileVar in $AnswerFileVars) - { - if(!([String]::IsNullOrEmpty((Get-Variable -Name $AnswerFileVar).Value)) -and ((Get-Variable -Name $AnswerFileVar).Value -ne 0)) - { - $AnswerFile += "-$AnswerFileVar " + (Get-Variable -Name $AnswerFileVar).Value - } - } - $AccountVars = @("SCVMM","SCAdmin","SCProvider","SCUsage") - foreach($AccountVar in $AccountVars) - { - if($PSBoundParameters.ContainsKey("SCVMM") -or $PSBoundParameters.ContainsKey("$AccountVar")) - { - $AnswerFile += "-$AccountVar`NetworkServiceSelected False" - $AnswerFile += "-$AccountVar`UserName " + (Get-Variable -Name $AccountVar).Value.GetNetworkCredential().UserName - $AnswerFile += "-$AccountVar`Password " + (Get-Variable -Name $AccountVar).Value.GetNetworkCredential().Password - $AnswerFile += "-$AccountVar`Domain " + (Get-Variable -Name $AccountVar).Value.GetNetworkCredential().Domain - $AnswerFile += "-" + $AccountVar.Substring(2) + "SecurityGroupUsers " + (Get-Variable -Name $AccountVar).Value.UserName - } - else - { - $AnswerFile += "-$AccountVar`NetworkServiceSelected True" - } - } - - Write-Verbose "AnswerFile: $TempFile" - foreach($Line in $AnswerFile) - { - Add-Content -Path $TempFile -Value $Line -Encoding Ascii - # Replace sensitive values for verbose output - $LogLine = $Line - if($LogLine.Contains("Password")) - { - $LogLine = $LogLine.Split(" ")[0] + " ********" - } - Write-Verbose $LogLine - } - } - "Absent" - { - # Create uninstall arguments - $Arguments = "-Silent -Uninstall" - } - } - - Write-Verbose "Arguments: $Arguments" - - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - - # Add admins to groups - if(($Ensure -eq "Present") -and (Get-WmiObject -Class Win32_Product | Where-Object {$_.IdentifyingNumber -eq "$IdentifyingNumber"})) - { - $SPFGroups = @("VMM","Admin","Provider","Usage") - foreach($SPFGroup in $SPFGroups) - { - if($PSBoundParameters.ContainsKey("$SPFGroup`SecurityGroupUsers")) - { - $Group = "SPF_$SPFGroup" - $ADSIGroup = [ADSI]("WinNT://localhost/$Group,group") - foreach($User in (Get-Variable -Name "$SPFGroup`SecurityGroupUsers").Value.Split(";")) - { - $IsGroupMember = $false - foreach($GroupMember in $ADSIGroup.Members()) - { - if(!$IsGroupMember) - { - $AdsPath = $GroupMember.GetType().InvokeMember('Adspath', 'GetProperty', $Null, $GroupMember, $Null) - $A = $AdsPath.split('/',[StringSplitOptions]::RemoveEmptyEntries) - $Name = $A[2] - $Domain = $A[1] - if(($Domain -eq $User.Split('\')[0]) -and ($Name -eq $User.Split('\')[1])) - { - $IsGroupMember = $true - } - } - } - if(!$IsGroupMember) - { - $ADSIUser = "WinNT://" + $User.Split("\")[0] + "/" + $User.Split("\")[1] - $ADSIGroup.Add($ADSIUser) - } - } - } - } - } - - # Clean up - if(Test-Path -Path $TempFile) - { - Remove-Item -Path $TempFile - } - - if((Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction SilentlyContinue) -ne $null) - { - $global:DSCMachineStatus = 1 - } - else - { - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\Orchestrator", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.String] - $SendCEIPReports = "False", - - [System.String] - $UseMicrosoftUpdate = "False", - - [System.Boolean] - $SpecifyCertificate = $false, - - [System.String] - $CertificateName = ($env:COMPUTERNAME + "." + (Get-WmiObject -Class Win32_ComputerSystem).Domain), - - [Parameter(Mandatory=$true)] - [System.String] - $DatabaseServer, - - [System.UInt16] - $DatabasePortNumber, - - [System.String] - $DatabaseName = "SCSPFDB", - - [System.UInt16] - $WebSitePortNumber = 8090, - - [System.Management.Automation.PSCredential] - $SCVMM, - - [System.Management.Automation.PSCredential] - $SCAdmin = $SCVMM, - - [System.Management.Automation.PSCredential] - $SCProvider = $SCVMM, - - [System.Management.Automation.PSCredential] - $SCUsage = $SCVMM, - - [System.String] - $VMMSecurityGroupUsers, - - [System.String] - $AdminSecurityGroupUsers, - - [System.String] - $ProviderSecurityGroupUsers, - - [System.String] - $UsageSecurityGroupUsers - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServerSetup/MSFT_xSCSPFServerSetup.schema.mof b/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServerSetup/MSFT_xSCSPFServerSetup.schema.mof deleted file mode 100644 index 1019aa49..00000000 --- a/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServerSetup/MSFT_xSCSPFServerSetup.schema.mof +++ /dev/null @@ -1,28 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCSPFServerSetup")] -class MSFT_xSCSPFServerSetup : OMI_BaseResource -{ - [Key, Description("An enumerated value that describes if SPF server is expected to be installed on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; - [Write, Description("Participate in the Customer Experience Improvement Program.")] String SendCEIPReports; - [Write, Description("Use Microsoft Update.")] String UseMicrosoftUpdate; - [Write, Description("Use an existing certificate.")] Boolean SpecifyCertificate; - [Write, Description("Name of existing certificate to use.")] String CertificateName; - [Required, Description("Name of the database server.")] String DatabaseServer; - [Write, Description("Port of the database server instance.")] UInt16 DatabasePortNumber; - [Write, Description("Name of the SPF database.")] String DatabaseName; - [Write, Description("Port for the SPF web service.")] UInt16 WebSitePortNumber; - [Write,EmbeddedInstance("MSFT_Credential"), Description("Credential for the VMM application pool.")] String SCVMM; - [Read, Description("Output username of the VMM application pool serivce.")] String SCVMMUsername; - [Write,EmbeddedInstance("MSFT_Credential"), Description("Credential for the Admin application pool")] String SCAdmin; - [Read, Description("Output username of the Admin application pool serivce.")] String SCAdminUsername; - [Write,EmbeddedInstance("MSFT_Credential"), Description("Credential for the Provider application pool")] String SCProvider; - [Read, Description("Output username of the Provider application pool serivce.")] String SCProviderUsername; - [Write,EmbeddedInstance("MSFT_Credential"), Description("Credential for the Usage application pool")] String SCUsage; - [Read, Description("Output username of the Usage application pool serivce.")] String SCUsageUsername; - [Write, Description("Administrator of the VMM application pool.")] String VMMSecurityGroupUsers; - [Write, Description("Administrator of the Admin application pool")] String AdminSecurityGroupUsers; - [Write, Description("Administrator of the Provider application pool")] String ProviderSecurityGroupUsers; - [Write, Description("Administrator of the Usage application pool")] String UsageSecurityGroupUsers; -}; diff --git a/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServerUpdate/MSFT_xSCSPFServerUpdate.psm1 b/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServerUpdate/MSFT_xSCSPFServerUpdate.psm1 deleted file mode 100644 index 1caf7b87..00000000 --- a/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServerUpdate/MSFT_xSCSPFServerUpdate.psm1 +++ /dev/null @@ -1,183 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\Orchestrator\SPF\Updates", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $Version = (Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -eq "System Center 2012 R2 Service Provider Foundation MSI"}).Version - - switch($Version) - { - "7.2.1902.0" - { - $ProductCode = "{69344E86-7183-4384-A230-499E9914BE14}" - $PatchID = "{96659A28-25CB-47DA-BB74-9AF19FB14F00}" - $Update = "Update Rollup 4" - } - "7.2.5017.0" - { - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - Update = "None" - } - } - $null - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - Default - { - throw "Unknown version of Service Provider Foundation!" - } - } - - if($ProductCode -and $PatchID -and (Get-WmiObject -Class Win32_PatchPackage | Where-Object {($_.ProductCode -eq $ProductCode) -and ($_.PatchID -eq $PatchID)})) - { - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - Update = $Update - } - } - else - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\Orchestrator\SPF\Updates", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $Version = (Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -eq "System Center 2012 R2 Service Provider Foundation MSI"}).Version - - switch($Version) - { - "7.2.1902.0" - { - $UpdateFile = "kb2992021_Microsoft.SystemCenter.Foundation.Setup_x64.msp" - } - "7.2.5017.0" - { - Write-Verbose "No update for this version of Service Provider Foundation!" - } - $null - { - Write-Verbose "Service Provider Foundation not installed!" - } - Default - { - throw "Unknown version of Service Provider Foundation!" - } - } - - if($UpdateFile) - { - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - $Path = "msiexec.exe" - $Path = ResolvePath $Path - Write-Verbose "Path: $Path" - - $MSPPath = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath $UpdateFile - $MSPPath = ResolvePath $MSPPath - $Arguments = "/update $MSPPath" - Write-Verbose "Arguments: $Arguments" - - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - } - - if((Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction SilentlyContinue) -ne $null) - { - $global:DSCMachineStatus = 1 - } - else - { - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\Orchestrator\SPF\Updates", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServerUpdate/MSFT_xSCSPFServerUpdate.schema.mof b/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServerUpdate/MSFT_xSCSPFServerUpdate.schema.mof deleted file mode 100644 index 57031a86..00000000 --- a/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFServerUpdate/MSFT_xSCSPFServerUpdate.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCSPFServerUpdate")] -class MSFT_xSCSPFServerUpdate : OMI_BaseResource -{ - [Key, Description("An enumerated value that describes if the update is expected to be installed on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; - [Read, Description("Display name of the update.")] String Update; -}; diff --git a/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFSetting/MSFT_xSCSPFSetting.psm1 b/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFSetting/MSFT_xSCSPFSetting.psm1 deleted file mode 100644 index f04aa55e..00000000 --- a/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFSetting/MSFT_xSCSPFSetting.psm1 +++ /dev/null @@ -1,171 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $ServerName, - - [parameter(Mandatory = $true)] - [ValidateSet("DatabaseConnectionString","EndPointConnectionString")] - [System.String] - $SettingType, - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Value, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SCSPFAdminCredential - ) - - $returnValue = Invoke-Command -ComputerName . -Credential $SCSPFAdminCredential -Authentication Credssp { - $ServerName = $args[0] - $Name = $args[1] - $Value = $args[2] - $SettingType = $args[3] - if(!(Get-Module spfadmin)) - { - Import-Module spfadmin - } - if(Get-Module spfadmin) - { - $SpfSetting = Get-SCSpfSetting -ServerName $ServerName -SettingType $SettingType | Where-Object {$_.Name -eq $Name} - if($SpfSetting.Value -eq $Value) - { - $Ensure = "Present" - } - else - { - $Ensure = "Absent" - } - } - else - { - $Ensure = "Absent" - } - @{ - Ensure = $Ensure - ServerName = $ServerName - Name = $Name - Value = $SpfSetting.Value - SettingType = $SettingType - } - } -ArgumentList @($ServerName,$Name,$Value,$SettingType) - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $ServerName, - - [parameter(Mandatory = $true)] - [ValidateSet("DatabaseConnectionString","EndPointConnectionString")] - [System.String] - $SettingType, - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Value, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SCSPFAdminCredential - ) - - Invoke-Command -ComputerName . -Credential $SCSPFAdminCredential -Authentication Credssp { - $Ensure = $args[0] - $ServerName = $args[1] - $Name = $args[2] - $Value = $args[3] - $SettingType = $args[4] - if(!(Get-Module spfadmin)) - { - Import-Module spfadmin - } - if(Get-Module spfadmin) - { - if(Get-SCSpfSetting -ServerName $ServerName -SettingType $SettingType | Where-Object {$_.Name -eq $Name}) - { - Get-SCSpfSetting -ServerName $ServerName -SettingType $SettingType | Where-Object {$_.Name -eq $Name} | Remove-SCSpfSetting - } - if($Ensure -eq "Present") - { - New-SCSpfSetting -ServerName $ServerName -SettingType $SettingType -Name $Name -Value $Value.ToLower() - } - } - } -ArgumentList @($Ensure,$ServerName,$Name,$Value,$SettingType) - - - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $ServerName, - - [parameter(Mandatory = $true)] - [ValidateSet("DatabaseConnectionString","EndPointConnectionString")] - [System.String] - $SettingType, - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Value, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SCSPFAdminCredential - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFSetting/MSFT_xSCSPFSetting.schema.mof b/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFSetting/MSFT_xSCSPFSetting.schema.mof deleted file mode 100644 index c37561c9..00000000 --- a/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFSetting/MSFT_xSCSPFSetting.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCSPFSetting")] -class MSFT_xSCSPFSetting : OMI_BaseResource -{ - [Write, Description("An enumerated value that describes if the SPF setting exists.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Key, Description("Specifies the name of the server the setting is associated with.")] String ServerName; - [Required, Description("Specifies either DatabaseConnectionString or EndPointConnectionString."), ValueMap{"DatabaseConnectionString","EndPointConnectionString"}, Values{"DatabaseConnectionString","EndPointConnectionString"}] String SettingType; - [Key, Description("Specifies a friendly name for the setting.")] String Name; - [Required, Description("Specifies the value for the setting.")] String Value; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential with admin permissions to Service Provider Foundation.")] String SCSPFAdminCredential; -}; diff --git a/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFStamp/MSFT_xSCSPFStamp.psm1 b/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFStamp/MSFT_xSCSPFStamp.psm1 deleted file mode 100644 index 6b4fe1b1..00000000 --- a/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFStamp/MSFT_xSCSPFStamp.psm1 +++ /dev/null @@ -1,180 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String[]] - $Servers, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SCSPFAdminCredential - ) - - $Ensure = Invoke-Command -ComputerName . -Credential $SCSPFAdminCredential -Authentication Credssp { - $Name = $args[0] - if(!(Get-Module spfadmin)) - { - Import-Module spfadmin - } - if(Get-Module spfadmin) - { - if(Get-SCSpfStamp -Name $Name) - { - "Present" - } - else - { - "Absent" - } - } - else - { - "Absent" - } - } -ArgumentList @($Name) - - if($Ensure -eq "Present") - { - $StampServers = Invoke-Command -ComputerName . -Credential $SCSPFAdminCredential -Authentication Credssp { - $Name = $args[0] - if(!(Get-Module spfadmin)) - { - Import-Module spfadmin - } - if(Get-Module spfadmin) - { - (Get-ScSpfStamp -Name $Name | Get-ScSpfServer).Name - } - } -ArgumentList @($Name) - foreach($Server in $Servers) - { - if($Ensure -eq "Present") - { - if(!($StampServers | Where-Object {$_ -eq $Server})) - { - $Ensure = "Absent" - $Servers = $StampServers - } - } - } - } - else - { - $Servers = $null - } - - $returnValue = @{ - Ensure = $Ensure - Name = $Name - Servers = $Servers - } - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String[]] - $Servers, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SCSPFAdminCredential - ) - - Invoke-Command -ComputerName . -Credential $SCSPFAdminCredential -Authentication Credssp { - $Ensure = $args[0] - $Name = $args[1] - $Servers = $args[2] - if(!(Get-Module spfadmin)) - { - Import-Module spfadmin - } - if(Get-Module spfadmin) - { - switch($Ensure) - { - "Present" - { - $StampServers = @() - foreach($Server in $Servers) - { - $StampServers += Get-SCSpfServer -Name $Server - } - if(Get-ScSpfStamp -Name $Name) - { - Set-SCSpfStamp -Stamp (Get-ScSpfStamp -Name $Name) -Servers $StampServers - } - else - { - New-SCSpfStamp -Name $Name -Servers $StampServers - } - } - "Absent" - { - Get-SCSPFStamp -Name $Name | Remove-SCSPFStamp - } - } - } - } -ArgumentList @($Ensure,$Name,$Servers) - - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String[]] - $Servers, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SCSPFAdminCredential - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFStamp/MSFT_xSCSPFStamp.schema.mof b/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFStamp/MSFT_xSCSPFStamp.schema.mof deleted file mode 100644 index 818e105d..00000000 --- a/lib/puppet_x/dsc_resources/xSCSPF/DSCResources/MSFT_xSCSPFStamp/MSFT_xSCSPFStamp.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCSPFStamp")] -class MSFT_xSCSPFStamp : OMI_BaseResource -{ - [Write, Description("An enumerated value that describes if the SPF stamp exists.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Key, Description("Specifies a name for the stamp.")] String Name; - [Required, Description("Specifies the name of one or more server objects to associate with the new stamp.")] String Servers[]; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential with admin permissions to Service Provider Foundation.")] String SCSPFAdminCredential; -}; diff --git a/lib/puppet_x/dsc_resources/xSCSPF/LICENSE b/lib/puppet_x/dsc_resources/xSCSPF/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xSCSPF/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xSCSPF/en-US/xPDT.strings.psd1 b/lib/puppet_x/dsc_resources/xSCSPF/en-US/xPDT.strings.psd1 deleted file mode 100644 index 11f213c1..00000000 --- a/lib/puppet_x/dsc_resources/xSCSPF/en-US/xPDT.strings.psd1 +++ /dev/null @@ -1,10 +0,0 @@ -ConvertFrom-StringData @' -FileNotFound=File not found in the environment path -AbsolutePathOrFileName=Absolute path or file name expected -InvalidArgument=Invalid argument: '{0}' with value: '{1}' -InvalidArgumentAndMessage={0} {1} -ErrorStarting=Failure starting process matching path '{0}'. Message: {1} -FailureWaitingForProcessesToStart=Failed to wait for processes to start -ProcessStarted=Process matching path '{0}' started in process ID {1} -ProcessAlreadyStarted=Process matching path '{0}' already started in process ID {1} -'@ diff --git a/lib/puppet_x/dsc_resources/xSCSPF/xPDT.psm1 b/lib/puppet_x/dsc_resources/xSCSPF/xPDT.psm1 deleted file mode 100644 index c90beaa1..00000000 --- a/lib/puppet_x/dsc_resources/xSCSPF/xPDT.psm1 +++ /dev/null @@ -1,708 +0,0 @@ -data LocalizedData -{ - ConvertFrom-StringData @' - -FileNotFound=File not found in the environment path -AbsolutePathOrFileName=Absolute path or file name expected -InvalidArgument=Invalid argument: '{0}' with value: '{1}' -InvalidArgumentAndMessage={0} {1} -ErrorStarting=Failure starting process matching path '{0}'. Message: {1} -FailureWaitingForProcessesToStart=Failed to wait for processes to start -ProcessStarted=Process matching path '{0}' started in process ID {1} -ProcessAlreadyStarted=Process matching path '{0}' already started in process ID {1} -'@ -} - -Import-LocalizedData LocalizedData -filename xPDT.strings.psd1 - -function ThrowInvalidArgumentError -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $errorId, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $errorMessage - ) - - $errorCategory=[System.Management.Automation.ErrorCategory]::InvalidArgument - $exception = New-Object System.ArgumentException $errorMessage; - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - throw $errorRecord -} - -function ResolvePath -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Path - ) - - $Path = [Environment]::ExpandEnvironmentVariables($Path) - if(IsRootedPath $Path) - { - if(!(Test-Path $Path -PathType Leaf)) - { - ThrowInvalidArgumentError "CannotFindRootedPath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) - } - return $Path - } - if([string]::IsNullOrEmpty($env:Path)) - { - ThrowInvalidArgumentError "EmptyEnvironmentPath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) - } - if((Split-Path $Path -Leaf) -ne $Path) - { - ThrowInvalidArgumentError "NotAbsolutePathOrFileName" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.AbsolutePathOrFileName) - } - foreach($rawSegment in $env:Path.Split(";")) - { - $segment = [Environment]::ExpandEnvironmentVariables($rawSegment) - $segmentRooted = $false - try - { - $segmentRooted=[IO.Path]::IsPathRooted($segment) - } - catch {} - if(!$segmentRooted) - { - continue - } - $candidate = join-path $segment $Path - if(Test-Path $candidate -PathType Leaf) - { - return $candidate - } - } - ThrowInvalidArgumentError "CannotFindRelativePath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) -} - -function IsRootedPath -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path - ) - - try - { - return [IO.Path]::IsPathRooted($Path) - } - catch - { - ThrowInvalidArgumentError "CannotGetIsPathRooted" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $_.Exception.Message) - } -} - -function ExtractArguments -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - $functionBoundParameters, - - [parameter(Mandatory = $true)] - [string[]] - $argumentNames, - - [string[]] - $newArgumentNames - ) - - $returnValue=@{} - - for($i=0;$i -lt $argumentNames.Count;$i++) - { - $argumentName = $argumentNames[$i] - - if($newArgumentNames -eq $null) - { - $newArgumentName = $argumentName - } - else - { - $newArgumentName = $newArgumentNames[$i] - } - - if($functionBoundParameters.ContainsKey($argumentName)) - { - $null = $returnValue.Add($newArgumentName,$functionBoundParameters[$argumentName]) - } - } - - return $returnValue -} - -function CallPInvoke -{ - $script:ProgramSource = @" -using System; -using System.Collections.Generic; -using System.Text; -using System.Security; -using System.Runtime.InteropServices; -using System.Diagnostics; -using System.Security.Principal; -using System.ComponentModel; -using System.IO; - -namespace Source -{ - [SuppressUnmanagedCodeSecurity] - public static class NativeMethods - { - //The following structs and enums are used by the various Win32 API's that are used in the code below - - [StructLayout(LayoutKind.Sequential)] - public struct STARTUPINFO - { - public Int32 cb; - public string lpReserved; - public string lpDesktop; - public string lpTitle; - public Int32 dwX; - public Int32 dwY; - public Int32 dwXSize; - public Int32 dwXCountChars; - public Int32 dwYCountChars; - public Int32 dwFillAttribute; - public Int32 dwFlags; - public Int16 wShowWindow; - public Int16 cbReserved2; - public IntPtr lpReserved2; - public IntPtr hStdInput; - public IntPtr hStdOutput; - public IntPtr hStdError; - } - - [StructLayout(LayoutKind.Sequential)] - public struct PROCESS_INFORMATION - { - public IntPtr hProcess; - public IntPtr hThread; - public Int32 dwProcessID; - public Int32 dwThreadID; - } - - [Flags] - public enum LogonType - { - LOGON32_LOGON_INTERACTIVE = 2, - LOGON32_LOGON_NETWORK = 3, - LOGON32_LOGON_BATCH = 4, - LOGON32_LOGON_SERVICE = 5, - LOGON32_LOGON_UNLOCK = 7, - LOGON32_LOGON_NETWORK_CLEARTEXT = 8, - LOGON32_LOGON_NEW_CREDENTIALS = 9 - } - - [Flags] - public enum LogonProvider - { - LOGON32_PROVIDER_DEFAULT = 0, - LOGON32_PROVIDER_WINNT35, - LOGON32_PROVIDER_WINNT40, - LOGON32_PROVIDER_WINNT50 - } - [StructLayout(LayoutKind.Sequential)] - public struct SECURITY_ATTRIBUTES - { - public Int32 Length; - public IntPtr lpSecurityDescriptor; - public bool bInheritHandle; - } - - public enum SECURITY_IMPERSONATION_LEVEL - { - SecurityAnonymous, - SecurityIdentification, - SecurityImpersonation, - SecurityDelegation - } - - public enum TOKEN_TYPE - { - TokenPrimary = 1, - TokenImpersonation - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - internal struct TokPriv1Luid - { - public int Count; - public long Luid; - public int Attr; - } - - public const int GENERIC_ALL_ACCESS = 0x10000000; - public const int CREATE_NO_WINDOW = 0x08000000; - internal const int SE_PRIVILEGE_ENABLED = 0x00000002; - internal const int TOKEN_QUERY = 0x00000008; - internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; - internal const string SE_INCRASE_QUOTA = "SeIncreaseQuotaPrivilege"; - - [DllImport("kernel32.dll", - EntryPoint = "CloseHandle", SetLastError = true, - CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] - public static extern bool CloseHandle(IntPtr handle); - - [DllImport("advapi32.dll", - EntryPoint = "CreateProcessAsUser", SetLastError = true, - CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] - public static extern bool CreateProcessAsUser( - IntPtr hToken, - string lpApplicationName, - string lpCommandLine, - ref SECURITY_ATTRIBUTES lpProcessAttributes, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - bool bInheritHandle, - Int32 dwCreationFlags, - IntPtr lpEnvrionment, - string lpCurrentDirectory, - ref STARTUPINFO lpStartupInfo, - ref PROCESS_INFORMATION lpProcessInformation - ); - - [DllImport("advapi32.dll", EntryPoint = "DuplicateTokenEx")] - public static extern bool DuplicateTokenEx( - IntPtr hExistingToken, - Int32 dwDesiredAccess, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - Int32 ImpersonationLevel, - Int32 dwTokenType, - ref IntPtr phNewToken - ); - - [DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)] - public static extern Boolean LogonUser( - String lpszUserName, - String lpszDomain, - String lpszPassword, - LogonType dwLogonType, - LogonProvider dwLogonProvider, - out IntPtr phToken - ); - - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern bool AdjustTokenPrivileges( - IntPtr htok, - bool disall, - ref TokPriv1Luid newst, - int len, - IntPtr prev, - IntPtr relen - ); - - [DllImport("kernel32.dll", ExactSpelling = true)] - internal static extern IntPtr GetCurrentProcess(); - - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern bool OpenProcessToken( - IntPtr h, - int acc, - ref IntPtr phtok - ); - - [DllImport("advapi32.dll", SetLastError = true)] - internal static extern bool LookupPrivilegeValue( - string host, - string name, - ref long pluid - ); - - public static void CreateProcessAsUser(string strCommand, string strDomain, string strName, string strPassword) - { - var hToken = IntPtr.Zero; - var hDupedToken = IntPtr.Zero; - TokPriv1Luid tp; - var pi = new PROCESS_INFORMATION(); - var sa = new SECURITY_ATTRIBUTES(); - sa.Length = Marshal.SizeOf(sa); - Boolean bResult = false; - try - { - bResult = LogonUser( - strName, - strDomain, - strPassword, - LogonType.LOGON32_LOGON_BATCH, - LogonProvider.LOGON32_PROVIDER_DEFAULT, - out hToken - ); - if (!bResult) - { - throw new Win32Exception("The user could not be logged on. Ensure that the user has an existing profile on the machine and that correct credentials are provided. Logon error #" + Marshal.GetLastWin32Error().ToString()); - } - IntPtr hproc = GetCurrentProcess(); - IntPtr htok = IntPtr.Zero; - bResult = OpenProcessToken( - hproc, - TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, - ref htok - ); - if(!bResult) - { - throw new Win32Exception("Open process token error #" + Marshal.GetLastWin32Error().ToString()); - } - tp.Count = 1; - tp.Luid = 0; - tp.Attr = SE_PRIVILEGE_ENABLED; - bResult = LookupPrivilegeValue( - null, - SE_INCRASE_QUOTA, - ref tp.Luid - ); - if(!bResult) - { - throw new Win32Exception("Error in looking up privilege of the process. This should not happen if DSC is running as LocalSystem Lookup privilege error #" + Marshal.GetLastWin32Error().ToString()); - } - bResult = AdjustTokenPrivileges( - htok, - false, - ref tp, - 0, - IntPtr.Zero, - IntPtr.Zero - ); - if(!bResult) - { - throw new Win32Exception("Token elevation error #" + Marshal.GetLastWin32Error().ToString()); - } - - bResult = DuplicateTokenEx( - hToken, - GENERIC_ALL_ACCESS, - ref sa, - (int)SECURITY_IMPERSONATION_LEVEL.SecurityIdentification, - (int)TOKEN_TYPE.TokenPrimary, - ref hDupedToken - ); - if(!bResult) - { - throw new Win32Exception("Duplicate Token error #" + Marshal.GetLastWin32Error().ToString()); - } - var si = new STARTUPINFO(); - si.cb = Marshal.SizeOf(si); - si.lpDesktop = ""; - bResult = CreateProcessAsUser( - hDupedToken, - null, - strCommand, - ref sa, - ref sa, - false, - 0, - IntPtr.Zero, - null, - ref si, - ref pi - ); - if(!bResult) - { - throw new Win32Exception("The process could not be created. Create process as user error #" + Marshal.GetLastWin32Error().ToString()); - } - } - finally - { - if (pi.hThread != IntPtr.Zero) - { - CloseHandle(pi.hThread); - } - if (pi.hProcess != IntPtr.Zero) - { - CloseHandle(pi.hProcess); - } - if (hDupedToken != IntPtr.Zero) - { - CloseHandle(hDupedToken); - } - } - } - } -} - -"@ - Add-Type -TypeDefinition $ProgramSource -ReferencedAssemblies "System.ServiceProcess" -} - -function GetWin32Process -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential - ) - - $fileName = [io.path]::GetFileNameWithoutExtension($Path) - $GetProcesses = @(Get-Process -Name $fileName -ErrorAction SilentlyContinue) - $Processes = foreach($process in $GetProcesses) - { - if($Process.Path -ieq $Path) - { - try - { - [wmi]"Win32_Process.Handle='$($Process.Id)'" - } - catch - { - } - } - } - if($PSBoundParameters.ContainsKey('Credential')) - { - $Processes = $Processes | Where-Object {(GetWin32ProcessOwner $_) -eq $Credential.UserName} - } - if($Arguments -eq $null) {$Arguments = ""} - $Processes = $Processes | Where-Object {(GetWin32ProcessArgumentsFromCommandLine $_.CommandLine) -eq $Arguments} - - return $Processes -} - -function GetWin32ProcessOwner -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNull()] - $Process - ) - - try - { - $Owner = $Process.GetOwner() - } - catch - {} - if($owner.Domain -ne $null) - { - return $Owner.Domain + "\" + $Owner.User - } - else - { - return $Owner.User - } -} - -function GetWin32ProcessArgumentsFromCommandLine -{ - param - ( - [String] - $commandLine - ) - - if($commandLine -eq $null) - { - return "" - } - $commandLine=$commandLine.Trim() - if($commandLine.Length -eq 0) - { - return "" - } - if($commandLine[0] -eq '"') - { - $charToLookfor=[char]'"' - } - else - { - $charToLookfor=[char]' ' - } - $endOfCommand=$commandLine.IndexOf($charToLookfor ,1) - if($endOfCommand -eq -1) - { - return "" - } - return $commandLine.Substring($endOfCommand+1).Trim() -} - -function StartWin32Process -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential, - - [Switch] - $AsTask - ) - - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - $Processes = @(GetWin32Process @getArguments) - if ($processes.Count -eq 0) - { - if($PSBoundParameters.ContainsKey("Credential")) - { - if($AsTask) - { - $ActionArguments = ExtractArguments $PSBoundParameters ` - ("Path", "Arguments") ` - ("Execute", "Argument") - if([string]::IsNullOrEmpty($Arguments)) - { - $null = $ActionArguments.Remove("Argument") - } - $TaskGuid = [guid]::NewGuid().ToString() - $Action = New-ScheduledTaskAction @ActionArguments - $null = Register-ScheduledTask -TaskName "xPDT $TaskGuid" -Action $Action -User $Credential.UserName -Password $Credential.GetNetworkCredential().Password -RunLevel Highest - $err = Start-ScheduledTask -TaskName "xPDT $TaskGuid" - } - else - { - try - { - CallPInvoke - [Source.NativeMethods]::CreateProcessAsUser(("$Path " + $Arguments),$Credential.GetNetworkCredential().Domain,$Credential.GetNetworkCredential().UserName,$Credential.GetNetworkCredential().Password) - } - catch - { - $exception = New-Object System.ArgumentException $_ - $errorCategory = [System.Management.Automation.ErrorCategory]::OperationStopped - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, "Win32Exception", $errorCategory, $null - $err = $errorRecord - } - } - } - else - { - $StartArguments = ExtractArguments $PSBoundParameters ` - ("Path", "Arguments", "Credential") ` - ("FilePath", "ArgumentList", "Credential") - if([string]::IsNullOrEmpty($Arguments)) - { - $null = $StartArguments.Remove("ArgumentList") - } - $err = Start-Process @StartArguments - } - if($err -ne $null) - { - throw $err - } - if (!(WaitForWin32ProcessStart @GetArguments)) - { - ThrowInvalidArgumentError "FailureWaitingForProcessesToStart" ($LocalizedData.ErrorStarting -f $Path,$LocalizedData.FailureWaitingForProcessesToStart) - } - } - else - { - return ($LocalizedData.ProcessAlreadyStarted -f $Path,$Processes.ProcessId) - } - $Processes = @(GetWin32Process @getArguments) - return ($LocalizedData.ProcessStarted -f $Path,$Processes.ProcessId) -} - -function WaitForWin32ProcessStart -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential - ) - - $start = [DateTime]::Now - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - do - { - $value = @(GetWin32Process @GetArguments).Count -ge 1 - } while(!$value -and ([DateTime]::Now - $start).TotalMilliseconds -lt 60000) - - return $value -} - -function WaitForWin32ProcessEnd -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential - ) - - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - While (WaitForWin32ProcessStart @GetArguments) - { - Start-Sleep 1 - } - Get-ScheduledTask | Where-Object {($_.TaskName.Length -ge 4) -and ($_.TaskName.Substring(0,4) -eq "xPDT") -and ($_.Actions.Execute -eq $Path) -and ($_.Actions.Arguments -eq $Arguments)} | Where-Object {$_ -ne $null} | Unregister-ScheduledTask -Confirm:$false -} - -function NetUse -{ - param - ( - [parameter(Mandatory)] - [string] - $SourcePath, - - [parameter(Mandatory)] - [PSCredential] - $Credential, - - [string] - $Ensure = "Present" - ) - - if(($SourcePath.Length -ge 2) -and ($SourcePath.Substring(0,2) -eq "\\")) - { - - if ($Ensure -eq "Absent") - { - $cmd = "net.exe use $SourcePath /del" - } - else - { - $cmd = "net.exe use $SourcePath $($Credential.GetNetworkCredential().Password) /user:$($Credential.GetNetworkCredential().Domain)\$($Credential.GetNetworkCredential().UserName)" - } - Invoke-Expression $cmd - } -} - -Export-ModuleMember ResolvePath,StartWin32Process,WaitForWin32ProcessEnd,NetUse diff --git a/lib/puppet_x/dsc_resources/xSCSPF/xSCSPF.psd1 b/lib/puppet_x/dsc_resources/xSCSPF/xSCSPF.psd1 deleted file mode 100644 index 574bcaaa..00000000 --- a/lib/puppet_x/dsc_resources/xSCSPF/xSCSPF.psd1 +++ /dev/null @@ -1,31 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '1.3.1.0' - -# ID used to uniquely identify this module -GUID = '8dbdcdc0-3f1a-46c3-9708-02f15c6679fd' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module with DSC Resources for deployment and configuration of Microsoft System Center Service Provider Foundation.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' -} diff --git a/lib/puppet_x/dsc_resources/xSCSR/DSCResources/MSFT_xSCSRServerSetup/MSFT_xSCSRServerSetup.psm1 b/lib/puppet_x/dsc_resources/xSCSR/DSCResources/MSFT_xSCSRServerSetup/MSFT_xSCSRServerSetup.psm1 deleted file mode 100644 index 69cde96e..00000000 --- a/lib/puppet_x/dsc_resources/xSCSR/DSCResources/MSFT_xSCSRServerSetup/MSFT_xSCSRServerSetup.psm1 +++ /dev/null @@ -1,390 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\Orchestrator", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.String] - [ValidateSet("Yes","No")] - $SendCEIPReports = "No", - - [System.String] - [ValidateSet("Yes","No")] - $UseMicrosoftUpdate = "No", - - [System.String] - $InstallFolder, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServerInstance, - - [System.String] - $RepositoryDatabaseName = "UsageRepositoryDB", - - [System.String] - $StagingDatabaseName = "UsageStagingDB", - - [System.String] - $DWDatabaseName = "UsageWarehouseDB", - - [parameter(Mandatory = $true)] - [System.String] - $AnalysisDatabaseServer, - - [parameter(Mandatory = $true)] - [System.String] - $AnalysisDatabaseServerInstance, - - [System.String] - $AnalysisDatabaseName = "UsageAnalysisDB" - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "\Service Reporting\setup.exe" - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - - switch($Version) - { - "7.2.462.0" - { - $IdentifyingNumber = "{643E2225-E1BB-4586-9CBE-8BC2DED6D12E}" - $SCVersion = "System Center 2012 R2" - } - "7.2.3002.0" - { - $IdentifyingNumber = "{643E2225-E1BB-4586-9CBE-8BC2DED6D12E}" - $SCVersion = "System Center Technical Preview" - } - Default - { - throw "Unknown version of Service Reporting!" - } - } - - if(Get-WmiObject -Class Win32_Product | Where-Object {$_.IdentifyingNumber -eq $IdentifyingNumber}) - { - switch($SCVersion) - { - "System Center 2012 R2" - { - $Reg = "HKLM:\SOFTWARE\Microsoft\System Center Service Reporting\R2" - } - "System Center Technical Preview" - { - $Reg = "HKLM:\SOFTWARE\Microsoft\System Center Service Reporting\R2" - } - } - $InstallFolder = (Get-ItemProperty -Path $Reg -Name "PackageFolder").PackageFolder - $DatabaseServer = (Get-ItemProperty -Path $Reg -Name "DWRepositoryDBHost").DWRepositoryDBHost - if($DatabaseServer.Contains("\")) - { - $DatabaseServerInstance = $DatabaseServer.Split("\")[1] - $DatabaseServer = $DatabaseServer.Split("\")[0] - } - else - { - $DatabaseServerInstance = "MSSQLSERVER" - } - $RepositoryDatabaseName = (Get-ItemProperty -Path $Reg -Name "ETLRepositoryDBName").ETLRepositoryDBName - $StagingDatabaseName = (Get-ItemProperty -Path $Reg -Name "StagingDBName").StagingDBName - $DWDatabaseName = (Get-ItemProperty -Path $Reg -Name "DWRepositoryDBName").DWRepositoryDBName - $AnalysisDatabaseServer = (Get-ItemProperty -Path $Reg -Name "AnalysisDBHost").AnalysisDBHost - if($AnalysisDatabaseServer.Contains("\")) - { - $AnalysisDatabaseServerInstance = $AnalysisDatabaseServer.Split("\")[1] - $AnalysisDatabaseServer = $AnalysisDatabaseServer.Split("\")[0] - } - else - { - $AnalysisDatabaseServerInstance = "MSSQLSERVER" - } - $AnalysisDatabaseName = (Get-ItemProperty -Path $Reg -Name "AnalysisDBName").AnalysisDBName - - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - InstallFolder = $InstallFolder - DatabaseServer = $DatabaseServer - DatabaseServerInstance = $DatabaseServerInstance - RepositoryDatabaseName = $RepositoryDatabaseName - StagingDatabaseName = $StagingDatabaseName - DWDatabaseName = $DWDatabaseName - AnalysisDatabaseServer = $AnalysisDatabaseServer - AnalysisDatabaseServerInstance = $AnalysisDatabaseServerInstance - AnalysisDatabaseName = $AnalysisDatabaseName - } - } - else - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\Orchestrator", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.String] - [ValidateSet("Yes","No")] - $SendCEIPReports = "No", - - [System.String] - [ValidateSet("Yes","No")] - $UseMicrosoftUpdate = "No", - - [System.String] - $InstallFolder, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServerInstance, - - [System.String] - $RepositoryDatabaseName = "UsageRepositoryDB", - - [System.String] - $StagingDatabaseName = "UsageStagingDB", - - [System.String] - $DWDatabaseName = "UsageWarehouseDB", - - [parameter(Mandatory = $true)] - [System.String] - $AnalysisDatabaseServer, - - [parameter(Mandatory = $true)] - [System.String] - $AnalysisDatabaseServerInstance, - - [System.String] - $AnalysisDatabaseName = "UsageAnalysisDB" - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "\Service Reporting\setup.exe" - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - Write-Verbose "Path: $Path" - - switch($Version) - { - "7.2.462.0" - { - $IdentifyingNumber = "{643E2225-E1BB-4586-9CBE-8BC2DED6D12E}" - } - "7.2.3002.0" - { - $IdentifyingNumber = "{643E2225-E1BB-4586-9CBE-8BC2DED6D12E}" - } - Default - { - throw "Unknown version of Service Reporting!" - } - } - - switch($Ensure) - { - "Present" - { - # Create install arguments - $TempFile = [IO.Path]::GetTempFileName() - $Arguments = "-Silent $TempFile" - $AnswerFile = @("-AcceptEULA Yes") - if($DatabaseServerInstance -eq "MSSQLSERVER") - { - $DatabaseServerInstance = $DatabaseServer - } - if($AnalysisDatabaseServerInstance -eq "MSSQLSERVER") - { - $AnalysisDatabaseServerInstance = $AnalysisDatabaseServer - } - $AnswerFileVars = @( - "SendCEIPReports", - "UseMicrosoftUpdate", - "InstallFolder", - "DatabaseServer", - "DatabaseServerInstance", - "RepositoryDatabaseName", - "StagingDatabaseName", - "DWDatabaseName", - "AnalysisDatabaseServer", - "AnalysisDatabaseServerInstance", - "AnalysisDatabaseName" - ) - foreach($AnswerFileVar in $AnswerFileVars) - { - if(!([String]::IsNullOrEmpty((Get-Variable -Name $AnswerFileVar).Value)) -and ((Get-Variable -Name $AnswerFileVar).Value -ne 0)) - { - if([Environment]::ExpandEnvironmentVariables((Get-Variable -Name $AnswerFileVar).Value).Contains(" ")) - { - $AnswerFile += "-$AnswerFileVar `"" + [Environment]::ExpandEnvironmentVariables((Get-Variable -Name $AnswerFileVar).Value) + "`"" - } - else - { - $AnswerFile += "-$AnswerFileVar " + [Environment]::ExpandEnvironmentVariables((Get-Variable -Name $AnswerFileVar).Value) - } - } - } - - Write-Verbose "AnswerFile: $TempFile" - foreach($Line in $AnswerFile) - { - Add-Content -Path $TempFile -Value $Line -Encoding Ascii - Write-Verbose $Line - } - } - "Absent" - { - # Create uninstall arguments - $Arguments = "-Uninstall" - } - } - - Write-Verbose "Arguments: $Arguments" - - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - - # Clean up - if(Test-Path -Path $TempFile) - { - Remove-Item -Path $TempFile - } - - if((Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction SilentlyContinue) -ne $null) - { - $global:DSCMachineStatus = 1 - } - else - { - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\Orchestrator", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.String] - [ValidateSet("Yes","No")] - $SendCEIPReports = "No", - - [System.String] - [ValidateSet("Yes","No")] - $UseMicrosoftUpdate = "No", - - [System.String] - $InstallFolder, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServer, - - [parameter(Mandatory = $true)] - [System.String] - $DatabaseServerInstance, - - [System.String] - $RepositoryDatabaseName = "UsageRepositoryDB", - - [System.String] - $StagingDatabaseName = "UsageStagingDB", - - [System.String] - $DWDatabaseName = "UsageWarehouseDB", - - [parameter(Mandatory = $true)] - [System.String] - $AnalysisDatabaseServer, - - [parameter(Mandatory = $true)] - [System.String] - $AnalysisDatabaseServerInstance, - - [System.String] - $AnalysisDatabaseName = "UsageAnalysisDB" - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCSR/DSCResources/MSFT_xSCSRServerSetup/MSFT_xSCSRServerSetup.schema.mof b/lib/puppet_x/dsc_resources/xSCSR/DSCResources/MSFT_xSCSRServerSetup/MSFT_xSCSRServerSetup.schema.mof deleted file mode 100644 index 0563a759..00000000 --- a/lib/puppet_x/dsc_resources/xSCSR/DSCResources/MSFT_xSCSRServerSetup/MSFT_xSCSRServerSetup.schema.mof +++ /dev/null @@ -1,19 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCSRServerSetup")] -class MSFT_xSCSRServerSetup : OMI_BaseResource -{ - [Key, Description("An enumerated value that describes if the Service Reporting server is expected to be installed on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; - [Write, Description("Participation in Customer Experience Improvement Program (yes or no)."), ValueMap{"Yes","No"}, Values{"Yes","No"}] String SendCEIPReports; - [Write, Description("Participation in Microsoft Update (yes or no)."), ValueMap{"Yes","No"}, Values{"Yes","No"}] String UseMicrosoftUpdate; - [Write, Description("Folder to install to.")] String InstallFolder; - [Required, Description("Name of the server that is running SQL Server where the databases already exist, or where Setup will create them .")] String DatabaseServer; - [Required, Description("Name of the SQL Server database instance to install to.")] String DatabaseServerInstance; - [Write, Description("Name of the usage repository database that already exists, or that Setup will create.")] String RepositoryDatabaseName; - [Write, Description("Name of the usage staging database that already exists, or that Setup will create.")] String StagingDatabaseName; - [Write, Description("Name of the usage data warehouse database that already exists, or that Setup will create.")] String DWDatabaseName; - [Required, Description("Name of the server that is running SQL Server where the analysis database already exists, or where Setup will create it.")] String AnalysisDatabaseServer; - [Required, Description("Name of the SQL Server analysis database instance to install to.")] String AnalysisDatabaseServerInstance; - [Write, Description("Name of the analysis database that already exists, or that Setup will create.")] String AnalysisDatabaseName; -}; diff --git a/lib/puppet_x/dsc_resources/xSCSR/DSCResources/MSFT_xSCSRServerUpdate/MSFT_xSCSRServerUpdate.psm1 b/lib/puppet_x/dsc_resources/xSCSR/DSCResources/MSFT_xSCSRServerUpdate/MSFT_xSCSRServerUpdate.psm1 deleted file mode 100644 index 809ef485..00000000 --- a/lib/puppet_x/dsc_resources/xSCSR/DSCResources/MSFT_xSCSRServerUpdate/MSFT_xSCSRServerUpdate.psm1 +++ /dev/null @@ -1,183 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\Orchestrator\Service Reporting\Updates", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $Version = (Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -eq "System Center 2012 R2 Service Reporting MSI"}).Version - - switch($Version) - { - "7.2.462.0" - { - $ProductCode = "{643E2225-E1BB-4586-9CBE-8BC2DED6D12E}" - $PatchID = "{1C2F9B0C-83D4-4820-8AD9-AEBCE05D6D13}" - $Update = "Update Rollup 4" - } - "7.2.3002.0" - { - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - Update = "None" - } - } - $null - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - Default - { - throw "Unknown version of Service Reporting!" - } - } - - if($ProductCode -and $PatchID -and (Get-WmiObject -Class Win32_PatchPackage | Where-Object {($_.ProductCode -eq $ProductCode) -and ($_.PatchID -eq $PatchID)})) - { - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - Update = $Update - } - } - else - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\Orchestrator\Service Reporting\Updates", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $Version = (Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -eq "System Center 2012 R2 Service Reporting MSI"}).Version - - switch($Version) - { - "7.2.462.0" - { - $UpdateFile = "kb2992025_Microsoft.SystemCenter.SMR.Setup_x64.msp" - } - "7.2.3002.0" - { - Write-Verbose "No update for this version of Service Reporting!" - } - $null - { - Write-Verbose "Service Reporting not installed!" - } - Default - { - throw "Unknown version of Service Reporting!" - } - } - - if($UpdateFile) - { - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - $Path = "msiexec.exe" - $Path = ResolvePath $Path - Write-Verbose "Path: $Path" - - $MSPPath = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath $UpdateFile - $MSPPath = ResolvePath $MSPPath - $Arguments = "/update `"$MSPPath`" /norestart" - Write-Verbose "Arguments: $Arguments" - - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - } - - if((Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction SilentlyContinue) -ne $null) - { - $global:DSCMachineStatus = 1 - } - else - { - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\Orchestrator\Service Reporting\Updates", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCSR/DSCResources/MSFT_xSCSRServerUpdate/MSFT_xSCSRServerUpdate.schema.mof b/lib/puppet_x/dsc_resources/xSCSR/DSCResources/MSFT_xSCSRServerUpdate/MSFT_xSCSRServerUpdate.schema.mof deleted file mode 100644 index 0240be29..00000000 --- a/lib/puppet_x/dsc_resources/xSCSR/DSCResources/MSFT_xSCSRServerUpdate/MSFT_xSCSRServerUpdate.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCSRServerUpdate")] -class MSFT_xSCSRServerUpdate : OMI_BaseResource -{ - [Key, Description("An enumerated value that describes if the update is expected to be installed on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; - [Read, Description("Display name of the update.")] String Update; -}; diff --git a/lib/puppet_x/dsc_resources/xSCSR/LICENSE b/lib/puppet_x/dsc_resources/xSCSR/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xSCSR/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xSCSR/en-US/xPDT.strings.psd1 b/lib/puppet_x/dsc_resources/xSCSR/en-US/xPDT.strings.psd1 deleted file mode 100644 index 11f213c1..00000000 --- a/lib/puppet_x/dsc_resources/xSCSR/en-US/xPDT.strings.psd1 +++ /dev/null @@ -1,10 +0,0 @@ -ConvertFrom-StringData @' -FileNotFound=File not found in the environment path -AbsolutePathOrFileName=Absolute path or file name expected -InvalidArgument=Invalid argument: '{0}' with value: '{1}' -InvalidArgumentAndMessage={0} {1} -ErrorStarting=Failure starting process matching path '{0}'. Message: {1} -FailureWaitingForProcessesToStart=Failed to wait for processes to start -ProcessStarted=Process matching path '{0}' started in process ID {1} -ProcessAlreadyStarted=Process matching path '{0}' already started in process ID {1} -'@ diff --git a/lib/puppet_x/dsc_resources/xSCSR/xPDT.psm1 b/lib/puppet_x/dsc_resources/xSCSR/xPDT.psm1 deleted file mode 100644 index c90beaa1..00000000 --- a/lib/puppet_x/dsc_resources/xSCSR/xPDT.psm1 +++ /dev/null @@ -1,708 +0,0 @@ -data LocalizedData -{ - ConvertFrom-StringData @' - -FileNotFound=File not found in the environment path -AbsolutePathOrFileName=Absolute path or file name expected -InvalidArgument=Invalid argument: '{0}' with value: '{1}' -InvalidArgumentAndMessage={0} {1} -ErrorStarting=Failure starting process matching path '{0}'. Message: {1} -FailureWaitingForProcessesToStart=Failed to wait for processes to start -ProcessStarted=Process matching path '{0}' started in process ID {1} -ProcessAlreadyStarted=Process matching path '{0}' already started in process ID {1} -'@ -} - -Import-LocalizedData LocalizedData -filename xPDT.strings.psd1 - -function ThrowInvalidArgumentError -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $errorId, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $errorMessage - ) - - $errorCategory=[System.Management.Automation.ErrorCategory]::InvalidArgument - $exception = New-Object System.ArgumentException $errorMessage; - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - throw $errorRecord -} - -function ResolvePath -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Path - ) - - $Path = [Environment]::ExpandEnvironmentVariables($Path) - if(IsRootedPath $Path) - { - if(!(Test-Path $Path -PathType Leaf)) - { - ThrowInvalidArgumentError "CannotFindRootedPath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) - } - return $Path - } - if([string]::IsNullOrEmpty($env:Path)) - { - ThrowInvalidArgumentError "EmptyEnvironmentPath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) - } - if((Split-Path $Path -Leaf) -ne $Path) - { - ThrowInvalidArgumentError "NotAbsolutePathOrFileName" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.AbsolutePathOrFileName) - } - foreach($rawSegment in $env:Path.Split(";")) - { - $segment = [Environment]::ExpandEnvironmentVariables($rawSegment) - $segmentRooted = $false - try - { - $segmentRooted=[IO.Path]::IsPathRooted($segment) - } - catch {} - if(!$segmentRooted) - { - continue - } - $candidate = join-path $segment $Path - if(Test-Path $candidate -PathType Leaf) - { - return $candidate - } - } - ThrowInvalidArgumentError "CannotFindRelativePath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) -} - -function IsRootedPath -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path - ) - - try - { - return [IO.Path]::IsPathRooted($Path) - } - catch - { - ThrowInvalidArgumentError "CannotGetIsPathRooted" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $_.Exception.Message) - } -} - -function ExtractArguments -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - $functionBoundParameters, - - [parameter(Mandatory = $true)] - [string[]] - $argumentNames, - - [string[]] - $newArgumentNames - ) - - $returnValue=@{} - - for($i=0;$i -lt $argumentNames.Count;$i++) - { - $argumentName = $argumentNames[$i] - - if($newArgumentNames -eq $null) - { - $newArgumentName = $argumentName - } - else - { - $newArgumentName = $newArgumentNames[$i] - } - - if($functionBoundParameters.ContainsKey($argumentName)) - { - $null = $returnValue.Add($newArgumentName,$functionBoundParameters[$argumentName]) - } - } - - return $returnValue -} - -function CallPInvoke -{ - $script:ProgramSource = @" -using System; -using System.Collections.Generic; -using System.Text; -using System.Security; -using System.Runtime.InteropServices; -using System.Diagnostics; -using System.Security.Principal; -using System.ComponentModel; -using System.IO; - -namespace Source -{ - [SuppressUnmanagedCodeSecurity] - public static class NativeMethods - { - //The following structs and enums are used by the various Win32 API's that are used in the code below - - [StructLayout(LayoutKind.Sequential)] - public struct STARTUPINFO - { - public Int32 cb; - public string lpReserved; - public string lpDesktop; - public string lpTitle; - public Int32 dwX; - public Int32 dwY; - public Int32 dwXSize; - public Int32 dwXCountChars; - public Int32 dwYCountChars; - public Int32 dwFillAttribute; - public Int32 dwFlags; - public Int16 wShowWindow; - public Int16 cbReserved2; - public IntPtr lpReserved2; - public IntPtr hStdInput; - public IntPtr hStdOutput; - public IntPtr hStdError; - } - - [StructLayout(LayoutKind.Sequential)] - public struct PROCESS_INFORMATION - { - public IntPtr hProcess; - public IntPtr hThread; - public Int32 dwProcessID; - public Int32 dwThreadID; - } - - [Flags] - public enum LogonType - { - LOGON32_LOGON_INTERACTIVE = 2, - LOGON32_LOGON_NETWORK = 3, - LOGON32_LOGON_BATCH = 4, - LOGON32_LOGON_SERVICE = 5, - LOGON32_LOGON_UNLOCK = 7, - LOGON32_LOGON_NETWORK_CLEARTEXT = 8, - LOGON32_LOGON_NEW_CREDENTIALS = 9 - } - - [Flags] - public enum LogonProvider - { - LOGON32_PROVIDER_DEFAULT = 0, - LOGON32_PROVIDER_WINNT35, - LOGON32_PROVIDER_WINNT40, - LOGON32_PROVIDER_WINNT50 - } - [StructLayout(LayoutKind.Sequential)] - public struct SECURITY_ATTRIBUTES - { - public Int32 Length; - public IntPtr lpSecurityDescriptor; - public bool bInheritHandle; - } - - public enum SECURITY_IMPERSONATION_LEVEL - { - SecurityAnonymous, - SecurityIdentification, - SecurityImpersonation, - SecurityDelegation - } - - public enum TOKEN_TYPE - { - TokenPrimary = 1, - TokenImpersonation - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - internal struct TokPriv1Luid - { - public int Count; - public long Luid; - public int Attr; - } - - public const int GENERIC_ALL_ACCESS = 0x10000000; - public const int CREATE_NO_WINDOW = 0x08000000; - internal const int SE_PRIVILEGE_ENABLED = 0x00000002; - internal const int TOKEN_QUERY = 0x00000008; - internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; - internal const string SE_INCRASE_QUOTA = "SeIncreaseQuotaPrivilege"; - - [DllImport("kernel32.dll", - EntryPoint = "CloseHandle", SetLastError = true, - CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] - public static extern bool CloseHandle(IntPtr handle); - - [DllImport("advapi32.dll", - EntryPoint = "CreateProcessAsUser", SetLastError = true, - CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] - public static extern bool CreateProcessAsUser( - IntPtr hToken, - string lpApplicationName, - string lpCommandLine, - ref SECURITY_ATTRIBUTES lpProcessAttributes, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - bool bInheritHandle, - Int32 dwCreationFlags, - IntPtr lpEnvrionment, - string lpCurrentDirectory, - ref STARTUPINFO lpStartupInfo, - ref PROCESS_INFORMATION lpProcessInformation - ); - - [DllImport("advapi32.dll", EntryPoint = "DuplicateTokenEx")] - public static extern bool DuplicateTokenEx( - IntPtr hExistingToken, - Int32 dwDesiredAccess, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - Int32 ImpersonationLevel, - Int32 dwTokenType, - ref IntPtr phNewToken - ); - - [DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)] - public static extern Boolean LogonUser( - String lpszUserName, - String lpszDomain, - String lpszPassword, - LogonType dwLogonType, - LogonProvider dwLogonProvider, - out IntPtr phToken - ); - - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern bool AdjustTokenPrivileges( - IntPtr htok, - bool disall, - ref TokPriv1Luid newst, - int len, - IntPtr prev, - IntPtr relen - ); - - [DllImport("kernel32.dll", ExactSpelling = true)] - internal static extern IntPtr GetCurrentProcess(); - - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern bool OpenProcessToken( - IntPtr h, - int acc, - ref IntPtr phtok - ); - - [DllImport("advapi32.dll", SetLastError = true)] - internal static extern bool LookupPrivilegeValue( - string host, - string name, - ref long pluid - ); - - public static void CreateProcessAsUser(string strCommand, string strDomain, string strName, string strPassword) - { - var hToken = IntPtr.Zero; - var hDupedToken = IntPtr.Zero; - TokPriv1Luid tp; - var pi = new PROCESS_INFORMATION(); - var sa = new SECURITY_ATTRIBUTES(); - sa.Length = Marshal.SizeOf(sa); - Boolean bResult = false; - try - { - bResult = LogonUser( - strName, - strDomain, - strPassword, - LogonType.LOGON32_LOGON_BATCH, - LogonProvider.LOGON32_PROVIDER_DEFAULT, - out hToken - ); - if (!bResult) - { - throw new Win32Exception("The user could not be logged on. Ensure that the user has an existing profile on the machine and that correct credentials are provided. Logon error #" + Marshal.GetLastWin32Error().ToString()); - } - IntPtr hproc = GetCurrentProcess(); - IntPtr htok = IntPtr.Zero; - bResult = OpenProcessToken( - hproc, - TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, - ref htok - ); - if(!bResult) - { - throw new Win32Exception("Open process token error #" + Marshal.GetLastWin32Error().ToString()); - } - tp.Count = 1; - tp.Luid = 0; - tp.Attr = SE_PRIVILEGE_ENABLED; - bResult = LookupPrivilegeValue( - null, - SE_INCRASE_QUOTA, - ref tp.Luid - ); - if(!bResult) - { - throw new Win32Exception("Error in looking up privilege of the process. This should not happen if DSC is running as LocalSystem Lookup privilege error #" + Marshal.GetLastWin32Error().ToString()); - } - bResult = AdjustTokenPrivileges( - htok, - false, - ref tp, - 0, - IntPtr.Zero, - IntPtr.Zero - ); - if(!bResult) - { - throw new Win32Exception("Token elevation error #" + Marshal.GetLastWin32Error().ToString()); - } - - bResult = DuplicateTokenEx( - hToken, - GENERIC_ALL_ACCESS, - ref sa, - (int)SECURITY_IMPERSONATION_LEVEL.SecurityIdentification, - (int)TOKEN_TYPE.TokenPrimary, - ref hDupedToken - ); - if(!bResult) - { - throw new Win32Exception("Duplicate Token error #" + Marshal.GetLastWin32Error().ToString()); - } - var si = new STARTUPINFO(); - si.cb = Marshal.SizeOf(si); - si.lpDesktop = ""; - bResult = CreateProcessAsUser( - hDupedToken, - null, - strCommand, - ref sa, - ref sa, - false, - 0, - IntPtr.Zero, - null, - ref si, - ref pi - ); - if(!bResult) - { - throw new Win32Exception("The process could not be created. Create process as user error #" + Marshal.GetLastWin32Error().ToString()); - } - } - finally - { - if (pi.hThread != IntPtr.Zero) - { - CloseHandle(pi.hThread); - } - if (pi.hProcess != IntPtr.Zero) - { - CloseHandle(pi.hProcess); - } - if (hDupedToken != IntPtr.Zero) - { - CloseHandle(hDupedToken); - } - } - } - } -} - -"@ - Add-Type -TypeDefinition $ProgramSource -ReferencedAssemblies "System.ServiceProcess" -} - -function GetWin32Process -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential - ) - - $fileName = [io.path]::GetFileNameWithoutExtension($Path) - $GetProcesses = @(Get-Process -Name $fileName -ErrorAction SilentlyContinue) - $Processes = foreach($process in $GetProcesses) - { - if($Process.Path -ieq $Path) - { - try - { - [wmi]"Win32_Process.Handle='$($Process.Id)'" - } - catch - { - } - } - } - if($PSBoundParameters.ContainsKey('Credential')) - { - $Processes = $Processes | Where-Object {(GetWin32ProcessOwner $_) -eq $Credential.UserName} - } - if($Arguments -eq $null) {$Arguments = ""} - $Processes = $Processes | Where-Object {(GetWin32ProcessArgumentsFromCommandLine $_.CommandLine) -eq $Arguments} - - return $Processes -} - -function GetWin32ProcessOwner -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNull()] - $Process - ) - - try - { - $Owner = $Process.GetOwner() - } - catch - {} - if($owner.Domain -ne $null) - { - return $Owner.Domain + "\" + $Owner.User - } - else - { - return $Owner.User - } -} - -function GetWin32ProcessArgumentsFromCommandLine -{ - param - ( - [String] - $commandLine - ) - - if($commandLine -eq $null) - { - return "" - } - $commandLine=$commandLine.Trim() - if($commandLine.Length -eq 0) - { - return "" - } - if($commandLine[0] -eq '"') - { - $charToLookfor=[char]'"' - } - else - { - $charToLookfor=[char]' ' - } - $endOfCommand=$commandLine.IndexOf($charToLookfor ,1) - if($endOfCommand -eq -1) - { - return "" - } - return $commandLine.Substring($endOfCommand+1).Trim() -} - -function StartWin32Process -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential, - - [Switch] - $AsTask - ) - - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - $Processes = @(GetWin32Process @getArguments) - if ($processes.Count -eq 0) - { - if($PSBoundParameters.ContainsKey("Credential")) - { - if($AsTask) - { - $ActionArguments = ExtractArguments $PSBoundParameters ` - ("Path", "Arguments") ` - ("Execute", "Argument") - if([string]::IsNullOrEmpty($Arguments)) - { - $null = $ActionArguments.Remove("Argument") - } - $TaskGuid = [guid]::NewGuid().ToString() - $Action = New-ScheduledTaskAction @ActionArguments - $null = Register-ScheduledTask -TaskName "xPDT $TaskGuid" -Action $Action -User $Credential.UserName -Password $Credential.GetNetworkCredential().Password -RunLevel Highest - $err = Start-ScheduledTask -TaskName "xPDT $TaskGuid" - } - else - { - try - { - CallPInvoke - [Source.NativeMethods]::CreateProcessAsUser(("$Path " + $Arguments),$Credential.GetNetworkCredential().Domain,$Credential.GetNetworkCredential().UserName,$Credential.GetNetworkCredential().Password) - } - catch - { - $exception = New-Object System.ArgumentException $_ - $errorCategory = [System.Management.Automation.ErrorCategory]::OperationStopped - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, "Win32Exception", $errorCategory, $null - $err = $errorRecord - } - } - } - else - { - $StartArguments = ExtractArguments $PSBoundParameters ` - ("Path", "Arguments", "Credential") ` - ("FilePath", "ArgumentList", "Credential") - if([string]::IsNullOrEmpty($Arguments)) - { - $null = $StartArguments.Remove("ArgumentList") - } - $err = Start-Process @StartArguments - } - if($err -ne $null) - { - throw $err - } - if (!(WaitForWin32ProcessStart @GetArguments)) - { - ThrowInvalidArgumentError "FailureWaitingForProcessesToStart" ($LocalizedData.ErrorStarting -f $Path,$LocalizedData.FailureWaitingForProcessesToStart) - } - } - else - { - return ($LocalizedData.ProcessAlreadyStarted -f $Path,$Processes.ProcessId) - } - $Processes = @(GetWin32Process @getArguments) - return ($LocalizedData.ProcessStarted -f $Path,$Processes.ProcessId) -} - -function WaitForWin32ProcessStart -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential - ) - - $start = [DateTime]::Now - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - do - { - $value = @(GetWin32Process @GetArguments).Count -ge 1 - } while(!$value -and ([DateTime]::Now - $start).TotalMilliseconds -lt 60000) - - return $value -} - -function WaitForWin32ProcessEnd -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential - ) - - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - While (WaitForWin32ProcessStart @GetArguments) - { - Start-Sleep 1 - } - Get-ScheduledTask | Where-Object {($_.TaskName.Length -ge 4) -and ($_.TaskName.Substring(0,4) -eq "xPDT") -and ($_.Actions.Execute -eq $Path) -and ($_.Actions.Arguments -eq $Arguments)} | Where-Object {$_ -ne $null} | Unregister-ScheduledTask -Confirm:$false -} - -function NetUse -{ - param - ( - [parameter(Mandatory)] - [string] - $SourcePath, - - [parameter(Mandatory)] - [PSCredential] - $Credential, - - [string] - $Ensure = "Present" - ) - - if(($SourcePath.Length -ge 2) -and ($SourcePath.Substring(0,2) -eq "\\")) - { - - if ($Ensure -eq "Absent") - { - $cmd = "net.exe use $SourcePath /del" - } - else - { - $cmd = "net.exe use $SourcePath $($Credential.GetNetworkCredential().Password) /user:$($Credential.GetNetworkCredential().Domain)\$($Credential.GetNetworkCredential().UserName)" - } - Invoke-Expression $cmd - } -} - -Export-ModuleMember ResolvePath,StartWin32Process,WaitForWin32ProcessEnd,NetUse diff --git a/lib/puppet_x/dsc_resources/xSCSR/xSCSR.psd1 b/lib/puppet_x/dsc_resources/xSCSR/xSCSR.psd1 deleted file mode 100644 index 891ee3d8..00000000 --- a/lib/puppet_x/dsc_resources/xSCSR/xSCSR.psd1 +++ /dev/null @@ -1,31 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '1.3.0.0' - -# ID used to uniquely identify this module -GUID = '9abb59ff-a2ec-4206-a372-ed16859bb2ef' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module with DSC Resources for deployment and configuration of Microsoft System Center Service Reporting.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' -} diff --git a/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMAdmin/MSFT_xSCVMMAdmin.psm1 b/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMAdmin/MSFT_xSCVMMAdmin.psm1 deleted file mode 100644 index f55c9459..00000000 --- a/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMAdmin/MSFT_xSCVMMAdmin.psm1 +++ /dev/null @@ -1,129 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $Principal, - - [parameter(Mandatory = $true)] - [System.String] - $UserRole, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SCVMMAdminCredential - ) - - $Ensure = Invoke-Command -ComputerName . -Credential $SCVMMAdminCredential { - $Ensure = $args[0] - $Principal = $args[1] - $UserRole = $args[2] - if(Get-SCUserRole -VMMServer $env:COMPUTERNAME -Name $UserRole | ForEach-Object {$_.Members} | Where-Object {$_.Name -eq $Principal}) - { - "Present" - } - else - { - "Absent" - } - } -ArgumentList @($Ensure,$Principal,$UserRole) - - $returnValue = @{ - Ensure = $Ensure - Principal = $Principal - UserRole = $UserRole - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $Principal, - - [parameter(Mandatory = $true)] - [System.String] - $UserRole, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SCVMMAdminCredential - ) - - Invoke-Command -ComputerName . -Credential $SCVMMAdminCredential { - $Ensure = $args[0] - $Principal = $args[1] - $UserRole = $args[2] - switch($Ensure) - { - "Present" - { - if(!(Get-SCUserRole -VMMServer $env:COMPUTERNAME -Name $UserRole | ForEach-Object {$_.Members} | Where-Object {$_.Name -eq $Principal})) - { - Get-SCUserRole -VMMServer $env:COMPUTERNAME -Name $UserRole | Set-SCUserRole -AddMember $Principal - } - } - "Absent" - { - if(Get-SCUserRole -VMMServer $env:COMPUTERNAME -Name $UserRole | ForEach-Object {$_.Members} | Where-Object {$_.Name -eq $Principal}) - { - Get-SCUserRole -VMMServer $env:COMPUTERNAME -Name $UserRole | Set-SCUserRole -RemoveMember $Principal - } - } - } - } -ArgumentList @($Ensure,$Principal,$UserRole) - - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $Principal, - - [parameter(Mandatory = $true)] - [System.String] - $UserRole, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SCVMMAdminCredential - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMAdmin/MSFT_xSCVMMAdmin.schema.mof b/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMAdmin/MSFT_xSCVMMAdmin.schema.mof deleted file mode 100644 index c67e52e5..00000000 --- a/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMAdmin/MSFT_xSCVMMAdmin.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCVMMAdmin")] -class MSFT_xSCVMMAdmin : OMI_BaseResource -{ - [Write, Description("An enumerated value that describes if the principal is an Virtual Machine Manager admin.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Key, Description("The Virtual Machine Manager admin principal.")] String Principal; - [Key, Description("The Virtual Machine Manager user role.")] String UserRole; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the operations.")] String SCVMMAdminCredential; -}; diff --git a/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMConsoleSetup/MSFT_xSCVMMConsoleSetup.psm1 b/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMConsoleSetup/MSFT_xSCVMMConsoleSetup.psm1 deleted file mode 100644 index 94ae262b..00000000 --- a/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMConsoleSetup/MSFT_xSCVMMConsoleSetup.psm1 +++ /dev/null @@ -1,259 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\VirtualMachineManager", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.String] - $ProgramFiles, - - [System.UInt16] - $IndigoTcpPort = 8100, - - [System.Byte] - $MUOptIn - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "setup.exe" - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - - switch($Version) - { - "3.2.7510.0" - { - $IdentifyingNumber = "{CDFB453F-5FA4-4884-B282-F46BDFC06051}" - } - "3.2.9013.0" - { - $IdentifyingNumber = "{CDFB453F-5FA4-4884-B282-F46BDFC06051}" - } - Default - { - throw "Unknown version of Virtual Machine Manager!" - } - } - - if(Get-WmiObject -Class Win32_Product | Where-Object {$_.IdentifyingNumber -eq $IdentifyingNumber}) - { - $IndigoTcpPort = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager Administrator Console\Settings" -Name "IndigoTcpPort").IndigoTcpPort - - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - IndigoTcpPort = $IndigoTcpPort - } - } - else - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\VirtualMachineManager", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.String] - $ProgramFiles, - - [System.UInt16] - $IndigoTcpPort = 8100, - - [System.Byte] - $MUOptIn - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "setup.exe" - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - Write-Verbose "Path: $Path" - - switch($Version) - { - "3.2.7510.0" - { - $IdentifyingNumber = "{CDFB453F-5FA4-4884-B282-F46BDFC06051}" - $MSIdentifyingNumber = "{59518B15-FC64-4CF9-A4D1-0EE1B4A63088}" - } - "3.2.9013.0" - { - $IdentifyingNumber = "{CDFB453F-5FA4-4884-B282-F46BDFC06051}" - $MSIdentifyingNumber = "{59518B15-FC64-4CF9-A4D1-0EE1B4A63088}" - } - Default - { - throw "Unknown version of Virtual Machine Manager!" - } - } - - $TempFile = [IO.Path]::GetTempFileName() - - switch($Ensure) - { - "Present" - { - # Set defaults, if they couldn't be set in param due to null configdata input - if ($IndigoTcpPort -eq 0) - { - $IndigoTcpPort = 8100 - } - if ($MUOptIn -ne 1) - { - $MUOptIn = 0 - } - - # Create INI file - $INIFile = @() - $INIFile += "[Options]" - - $INIFileVars = @( - "ProgramFiles", - "IndigoTcpPort", - "MUOptIn" - ) - - foreach($INIFileVar in $INIFileVars) - { - if(!([String]::IsNullOrEmpty((Get-Variable -Name $INIFileVar).Value))) - { - $INIFile += "$INIFileVar=" + [Environment]::ExpandEnvironmentVariables((Get-Variable -Name $INIFileVar).Value) - } - } - - Write-Verbose "INIFile: $TempFile" - foreach($Line in $INIFile) - { - Add-Content -Path $TempFile -Value $Line -Encoding Ascii - Write-Verbose $Line - } - - # Create install arguments - $Arguments = "/i /IAcceptSCEULA /client /f $TempFile" - $Arguments = "/i /IAcceptSCEULA /client /f $TempFile" - } - "Absent" - { - # Do not remove console from management server - if(!(Get-WmiObject -Class Win32_Product | Where-Object {$_.IdentifyingNumber -eq $MSIdentifyingNumber})) - { - # Create install arguments - $Arguments = "/x /client" - } - else - { - throw "VMM Console should not be removed from a VMM Management Server!" - } - } - } - - Write-Verbose "Arguments: $Arguments" - - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential -AsTask - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - - # Clean up - if(Test-Path -Path $TempFile) - { - Remove-Item -Path $TempFile - } - - if((Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction SilentlyContinue) -ne $null) - { - $global:DSCMachineStatus = 1 - } - else - { - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\VirtualMachineManager", - - [System.String] - $ProgramFiles, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.UInt16] - $IndigoTcpPort = 8100, - - [System.Byte] - $MUOptIn - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMConsoleSetup/MSFT_xSCVMMConsoleSetup.schema.mof b/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMConsoleSetup/MSFT_xSCVMMConsoleSetup.schema.mof deleted file mode 100644 index 825b4784..00000000 --- a/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMConsoleSetup/MSFT_xSCVMMConsoleSetup.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCVMMConsoleSetup")] -class MSFT_xSCVMMConsoleSetup : OMI_BaseResource -{ - [Key, Description("An enumerated value that describes if the DPM server is expected to be installed on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; - [Write, Description("Installation path for the software.")] String ProgramFiles; - [Write, Description("Port for communication with the VMM management server.")] UInt16 IndigoTcpPort; - [Write, Description("0: Do not opt in to Microsoft Update. 1: Opt in to Microsoft Update.")] UInt8 MUOptIn; -}; diff --git a/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMConsoleUpdate/MSFT_xSCVMMConsoleUpdate.psm1 b/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMConsoleUpdate/MSFT_xSCVMMConsoleUpdate.psm1 deleted file mode 100644 index 99ea6ae0..00000000 --- a/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMConsoleUpdate/MSFT_xSCVMMConsoleUpdate.psm1 +++ /dev/null @@ -1,183 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\VirtualMachineManager\Updates", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $Version = (Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -eq "Microsoft System Center Virtual Machine Manager Administrator Console (x64)"}).Version - - switch($Version) - { - "3.2.7510.0" - { - $ProductCode = "{CDFB453F-5FA4-4884-B282-F46BDFC06051}" - $PatchID = "{E424A006-23B8-4403-A413-9EEBFB422FB2}" - $Update = "Update Rollup 4" - } - "3.2.9013.0" - { - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - Update = "None" - } - } - $null - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - Default - { - throw "Unknown version of Virtual Machine Manager!" - } - } - - if($ProductCode -and $PatchID -and (Get-WmiObject -Class Win32_PatchPackage | Where-Object {($_.ProductCode -eq $ProductCode) -and ($_.PatchID -eq $PatchID)})) - { - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - Update = $Update - } - } - else - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\VirtualMachineManager\Updates", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $Version = (Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -eq "Microsoft System Center Virtual Machine Manager Administrator Console (x64)"}).Version - - switch($Version) - { - "3.2.7510.0" - { - $UpdateFile = "kb2992023_AdminConsole_amd64.msp" - } - "3.2.9013.0" - { - Write-Verbose "No update for this version of Virtual Machine Manager!" - } - $null - { - Write-Verbose "Virtual Machine Manager Console not installed!" - } - Default - { - throw "Unknown version of Virtual Machine Manager!" - } - } - - if($UpdateFile) - { - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - $Path = "msiexec.exe" - $Path = ResolvePath $Path - Write-Verbose "Path: $Path" - - $MSPPath = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath $UpdateFile - $MSPPath = ResolvePath $MSPPath - $Arguments = "/update $MSPPath /norestart" - Write-Verbose "Arguments: $Arguments" - - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - } - - if((Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction SilentlyContinue) -ne $null) - { - $global:DSCMachineStatus = 1 - } - else - { - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\VirtualMachineManager\Updates", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMConsoleUpdate/MSFT_xSCVMMConsoleUpdate.schema.mof b/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMConsoleUpdate/MSFT_xSCVMMConsoleUpdate.schema.mof deleted file mode 100644 index 60d67688..00000000 --- a/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMConsoleUpdate/MSFT_xSCVMMConsoleUpdate.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCVMMConsoleUpdate")] -class MSFT_xSCVMMConsoleUpdate : OMI_BaseResource -{ - [Key, Description("An enumerated value that describes if the update is expected to be installed on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; - [Read, Description("Display name of the update.")] String Update; -}; diff --git a/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMManagementServerSetup/MSFT_xSCVMMManagementServerSetup.psm1 b/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMManagementServerSetup/MSFT_xSCVMMManagementServerSetup.psm1 deleted file mode 100644 index 12bc6274..00000000 --- a/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMManagementServerSetup/MSFT_xSCVMMManagementServerSetup.psm1 +++ /dev/null @@ -1,628 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\VirtualMachineManager", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.Management.Automation.PSCredential] - $vmmService, - - [System.String] - $ProductKey, - - [System.String] - $UserName, - - [System.String] - $CompanyName, - - [System.String] - $ProgramFiles, - - [System.Boolean] - $ClusterManagementServer, - - [System.Boolean] - $FirstManagementServer, - - [System.String] - $CreateNewSqlDatabase = "1", - - [parameter(Mandatory = $true)] - [System.String] - $SqlMachineName, - - [parameter(Mandatory = $true)] - [System.String] - $SqlInstanceName, - - [System.String] - $SqlDatabaseName = "VirtualManagerDB", - - [System.UInt16] - $IndigoTcpPort = 8100, - - [System.UInt16] - $IndigoHTTPSPort = 8101, - - [System.UInt16] - $IndigoNETTCPPort = 8102, - - [System.UInt16] - $IndigoHTTPPort = 8103, - - [System.UInt16] - $WSManTcpPort = 5985, - - [System.UInt16] - $BitsTcpPort = 443, - - [System.String] - $CreateNewLibraryShare = "1", - - [System.String] - $LibraryShareName = "MSSCVMMLibrary", - - [System.String] - $LibrarySharePath = "%ProgramData%\Virtual Machine Manager Library Files", - - [System.String] - $LibraryShareDescription = "Virtual Machine Manager Library Files", - - [System.String] - $TopContainerName, - - [System.String] - $VmmServerName, - - [System.String] - $VMMStaticIPAddress, - - [System.Byte] - $RetainSqlDatabase, - - [System.Byte] - $ForceHAVMMUninstall, - - [System.Byte] - $SQMOptIn, - - [System.Byte] - $MUOptIn - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "setup.exe" - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - - switch($Version) - { - "3.2.7510.0" - { - $IdentifyingNumber = "{59518B15-FC64-4CF9-A4D1-0EE1B4A63088}" - } - "3.2.9013.0" - { - $IdentifyingNumber = "{59518B15-FC64-4CF9-A4D1-0EE1B4A63088}" - } - Default - { - throw "Unknown version of Virtual Machine Manager!" - } - } - - if(Get-WmiObject -Class Win32_Product | Where-Object {$_.IdentifyingNumber -eq $IdentifyingNumber}) - { - $vmmServiceUsername = (Get-WmiObject -Class Win32_Service | Where-Object {$_.Name -eq "SCVMMService"}).StartName - $UserName = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager Server\Setup\Registration" -Name "UserName").UserName - $CompanyName = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager Server\Setup\Registration" -Name "CompanyName").CompanyName - $ProgramFiles = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager Server\Setup" -Name "InstallPath").InstallPath - $SqlMachineName = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager Server\Settings\SQL" -Name "MachineFQDN").MachineFQDN - $SqlInstanceName = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager Server\Settings\SQL" -Name "MachineFQDN").MachineFQDN - if($SqlInstanceName -eq $SqlMachineName) - { - $SqlInstanceName = "MSSQLSERVER" - } - $SqlDatabaseName = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager Server\Settings\SQL" -Name "DatabaseName").DatabaseName - foreach($Port in @("IndigoTcpPort","IndigoHTTPSPort","IndigoNETTCPPort","IndigoHTTPPort","WSManTcpPort","BitsTcpPort")) - { - Set-Variable -Name $Port -Value (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager Server\Settings" -Name $Port).$Port - } - $LibraryShareName = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager Server\Settings\Library" -Name "LibraryShareName").LibraryShareName - $LibrarySharePath = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager Server\Settings\Library" -Name "LibrarySharePath").LibrarySharePath - - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - vmmServiceUsername = $vmmServiceUsername - UserName = $UserName - CompanyName = $CompanyName - ProgramFiles = $ProgramFiles - # ClusterManagementServer = [System.Boolean] - SqlMachineName = $SqlMachineName - SqlInstanceName = $SqlInstanceName - SqlDatabaseName = $SqlDatabaseName - IndigoTcpPort = $IndigoTcpPort - IndigoHTTPSPort = $IndigoHTTPSPort - IndigoNETTCPPort = $IndigoNETTCPPort - IndigoHTTPPort = $IndigoHTTPPort - WSManTcpPort = $WSManTcpPort - BitsTcpPort = $BitsTcpPort - LibraryShareName = $LibraryShareName - LibrarySharePath = $LibrarySharePath - # TopContainerName = [System.String] - # VmmServerName = [System.String] - # VMMStaticIPAddress = [System.String] - } - } - else - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\VirtualMachineManager", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.Management.Automation.PSCredential] - $vmmService, - - [System.String] - $ProductKey, - - [System.String] - $UserName, - - [System.String] - $CompanyName, - - [System.String] - $ProgramFiles, - - [System.Boolean] - $ClusterManagementServer, - - [System.Boolean] - $FirstManagementServer, - - [System.String] - $CreateNewSqlDatabase = "1", - - [parameter(Mandatory = $true)] - [System.String] - $SqlMachineName, - - [parameter(Mandatory = $true)] - [System.String] - $SqlInstanceName, - - [System.String] - $SqlDatabaseName = "VirtualManagerDB", - - [System.UInt16] - $IndigoTcpPort = 8100, - - [System.UInt16] - $IndigoHTTPSPort = 8101, - - [System.UInt16] - $IndigoNETTCPPort = 8102, - - [System.UInt16] - $IndigoHTTPPort = 8103, - - [System.UInt16] - $WSManTcpPort = 5985, - - [System.UInt16] - $BitsTcpPort = 443, - - [System.String] - $CreateNewLibraryShare = "1", - - [System.String] - $LibraryShareName = "MSSCVMMLibrary", - - [System.String] - $LibrarySharePath = "%ProgramData%\Virtual Machine Manager Library Files", - - [System.String] - $LibraryShareDescription = "Virtual Machine Manager Library Files", - - [System.String] - $TopContainerName, - - [System.String] - $VmmServerName, - - [System.String] - $VMMStaticIPAddress, - - [System.Byte] - $RetainSqlDatabase, - - [System.Byte] - $ForceHAVMMUninstall, - - [System.Byte] - $SQMOptIn, - - [System.Byte] - $MUOptIn - ) - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "setup.exe" - $Path = ResolvePath $Path - $Version = (Get-Item -Path $Path).VersionInfo.ProductVersion - - switch($Version) - { - "3.2.7510.0" - { - $IdentifyingNumber = "{59518B15-FC64-4CF9-A4D1-0EE1B4A63088}" - } - "3.2.9013.0" - { - $IdentifyingNumber = "{59518B15-FC64-4CF9-A4D1-0EE1B4A63088}" - } - Default - { - throw "Unknown version of Virtual Machine Manager!" - } - } - - # Create INI file - $TempFile = [IO.Path]::GetTempFileName() - $INIFile = @() - $INIFile += "[Options]" - $INIFile += "RemoteDatabaseImpersonation=0" - - switch($Ensure) - { - "Present" - { - # Set defaults, if they couldn't be set in param due to null configdata input - if ($IndigoTcpPort -eq 0) - { - $IndigoTcpPort = 8100 - } - if ($IndigoHTTPSPort -eq 0) - { - $IndigoHTTPSPort = 8101 - } - if ($IndigoNETTCPPort -eq 0) - { - $IndigoNETTCPPort = 8102 - } - if ($IndigoHTTPPort -eq 0) - { - $IndigoHTTPPort = 8103 - } - if ($WSManTcpPort -eq 0) - { - $WSManTcpPort = 5985 - } - if ($BitsTcpPort -eq 0) - { - $BitsTcpPort = 443 - } - if ($SQMOptIn -ne 1) - { - $SQMOptIn = 0 - } - if ($MUOptIn -ne 1) - { - $MUOptIn = 0 - } - - $INIFileVars = @( - "ProductKey", - "UserName", - "CompanyName", - "ProgramFiles", - "SQLInstanceName", - "SQLDatabaseName", - "SQLMachineName", - "IndigoTcpPort", - "IndigoHTTPSPort", - "IndigoNETTCPPort", - "IndigoHTTPPort", - "WSManTcpPort", - "BitsTcpPort", - "SQMOptIn", - "MUOptIn", - "TopContainerName" - ) - if($ClusterManagementServer -and !$FirstManagementServer) - { - $INIFile += "CreateNewSQLDatabase=0" - } - else - { - $INIFileVars += @( - "CreateNewSQLDatabase" - ) - } - if($PSBoundParameters.ContainsKey("vmmService")) - { - $INIFile += "VMMServiceLocalAccount=0" - } - else - { - $INIFile += "VMMServiceLocalAccount=1" - } - if($ClusterManagementServer) - { - $INIFileVars += @( - "VmmServerName", - "VmmStaticIPAddress" - ) - $INIFile += "HighlyAvailable=1" - if($FirstManagementServer) - { - $INIFile += "HighlyAvailable2ndNode=0" - } - else - { - $INIFile += "HighlyAvailable2ndNode=1" - } - } - else - { - $INIFileVars += @( - "CreateNewLibraryShare", - "LibraryShareName", - "LibrarySharePath", - "LibraryShareDescription" - ) - } - - # Create install arguments - $Arguments = "/i /IAcceptSCEULA /server /f $TempFile" - if($PSBoundParameters.ContainsKey("vmmService")) - { - $Arguments += " /vmmServiceDomain " + $vmmService.GetNetworkCredential().Domain - $Arguments += " /vmmServiceUserName " + $vmmService.GetNetworkCredential().UserName - $Arguments += " /vmmServiceUserPassword " + $vmmService.GetNetworkCredential().Password - } - } - "Absent" - { - # Set defaults, if they couldn't be set in param due to null configdata input - if ($RetainSqlDatabase -ne 1) - { - $RetainSqlDatabase = 0 - } - if ($ForceHAVMMUninstall -ne 1) - { - $ForceHAVMMUninstall = 0 - } - - # Create uninstall arguments - $INIFileVars = @( - "RetainSqlDatabase", - "ForceHAVMMUninstall" - ) - - # Create install arguments - $Arguments = "/x /server /f $TempFile" - } - } - - foreach($INIFileVar in $INIFileVars) - { - if(!([String]::IsNullOrEmpty((Get-Variable -Name $INIFileVar).Value))) - { - $INIFile += "$INIFileVar=" + [Environment]::ExpandEnvironmentVariables((Get-Variable -Name $INIFileVar).Value) - } - } - - Write-Verbose "Path: $Path" - Write-Verbose "INIFile: $TempFile" - foreach($Line in $INIFile) - { - Add-Content -Path $TempFile -Value $Line -Encoding Ascii - # Replace sensitive values for verbose output - $LineLog = $Line - if($PSBoundParameters.ContainsKey("ProductKey")) - { - $LineLog = $LineLog.Replace($ProductKey,"*****-*****-*****-*****-*****") - } - Write-Verbose $LineLog - } - - # Replace sensitive values for verbose output - $Log = $Arguments - if($PSBoundParameters.ContainsKey("vmmService")) - { - $Log = $Log.Replace($vmmService.GetNetworkCredential().Password,"********") - } - - Write-Verbose "Arguments: $Log" - - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential -AsTask - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - - # Clean up - if(Test-Path -Path $TempFile) - { - Remove-Item -Path $TempFile - } - - if((Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction SilentlyContinue) -ne $null) - { - $global:DSCMachineStatus = 1 - } - else - { - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\VirtualMachineManager", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.Management.Automation.PSCredential] - $vmmService, - - [System.String] - $ProductKey, - - [System.String] - $UserName, - - [System.String] - $CompanyName, - - [System.String] - $ProgramFiles, - - [System.Boolean] - $ClusterManagementServer, - - [System.Boolean] - $FirstManagementServer, - - [System.String] - $CreateNewSqlDatabase = "1", - - [parameter(Mandatory = $true)] - [System.String] - $SqlMachineName, - - [parameter(Mandatory = $true)] - [System.String] - $SqlInstanceName, - - [System.String] - $SqlDatabaseName = "VirtualManagerDB", - - [System.UInt16] - $IndigoTcpPort = 8100, - - [System.UInt16] - $IndigoHTTPSPort = 8101, - - [System.UInt16] - $IndigoNETTCPPort = 8102, - - [System.UInt16] - $IndigoHTTPPort = 8103, - - [System.UInt16] - $WSManTcpPort = 5985, - - [System.UInt16] - $BitsTcpPort = 443, - - [System.String] - $CreateNewLibraryShare = "1", - - [System.String] - $LibraryShareName = "MSSCVMMLibrary", - - [System.String] - $LibrarySharePath = "%ProgramData%\Virtual Machine Manager Library Files", - - [System.String] - $LibraryShareDescription = "Virtual Machine Manager Library Files", - - [System.String] - $TopContainerName, - - [System.String] - $VmmServerName, - - [System.String] - $VMMStaticIPAddress, - - [System.Byte] - $RetainSqlDatabase, - - [System.Byte] - $ForceHAVMMUninstall, - - [System.Byte] - $SQMOptIn, - - [System.Byte] - $MUOptIn - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMManagementServerSetup/MSFT_xSCVMMManagementServerSetup.schema.mof b/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMManagementServerSetup/MSFT_xSCVMMManagementServerSetup.schema.mof deleted file mode 100644 index bf0dc71a..00000000 --- a/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMManagementServerSetup/MSFT_xSCVMMManagementServerSetup.schema.mof +++ /dev/null @@ -1,37 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCVMMManagementServerSetup")] -class MSFT_xSCVMMManagementServerSetup : OMI_BaseResource -{ - [Key, Description("An enumerated value that describes if the DPM server is expected to be installed on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; - [Write, EmbeddedInstance("MSFT_Credential"), Description("Domain account for the VMM service.")] String vmmService; - [Read, Description("Output username of the VMM service.")] String vmmServiceUsername; - [Write, Description("Product key for licensed installations.")] String ProductKey; - [Write, Description("Display name for the user.")] String UserName; - [Write, Description("Display name for the organization.")] String CompanyName; - [Write, Description("Installation path for the software.")] String ProgramFiles; - [Write, Description("Is this a clustered Management Server?")] Boolean ClusterManagementServer; - [Write, Description("Is this the first Management Server?")] Boolean FirstManagementServer; - [Write, Description("0: Use an existing Microsoft SQL Server database. 1: Create a new SQL Server database.")] String CreateNewSqlDatabase; - [Required, Description("Name of the server that is hosting SQL Server.")] String SqlMachineName; - [Required, Description("Name of the new or existing instance of SQL Server.")] String SqlInstanceName; - [Write, Description("Name of the new or existing SQL Server database.")] String SqlDatabaseName; - [Write, Description("Port for communication with the VMM console.")] UInt16 IndigoTcpPort; - [Write, Description("Port for communication with the Windows Preinstallation Environment agents.")] UInt16 IndigoHTTPSPort; - [Write, Description("Port for communication with Windows Deployment Services.")] UInt16 IndigoNETTCPPort; - [Write, Description("Port for communication with Windows PE agent for time synchronization.")] UInt16 IndigoHTTPPort; - [Write, Description("Port for communication with agents on hosts and library servers.")] UInt16 WSManTcpPort; - [Write, Description("Port for file transfers to agents on hosts and library servers.")] UInt16 BitsTcpPort; - [Write, Description("0: Use an existing library share. 1: Create a new library share.")] String CreateNewLibraryShare; - [Write, Description("Name of the file share to be used or created.")] String LibraryShareName; - [Write, Description("Location of the existing file share or the new file share to be created.")] String LibrarySharePath; - [Write, Description("Description of the share.")] String LibraryShareDescription; - [Write, Description("Container for Distributed Key Management.")] String TopContainerName; - [Write, Description("Clustered service name for a highly available VMM management server.")] String VmmServerName; - [Write, Description("IP address for the clustered service name for a highly available VMM management server, if you are not using Dynamic Host Configuration Protocol (DHCP).")] String VMMStaticIPAddress; - [Write, Description("0: Remove the SQL Server database. 1: Do not remove the SQL Server database.")] UInt8 RetainSqlDatabase; - [Write, Description("0: Do not force uninstallation if setup.exe cannot verify whether this node is the final node of the highly available installation. 1: Force the uninstallation.")] UInt8 ForceHAVMMUninstall; - [Write, Description("0: Do not opt in to the Customer Experience Improvement Program (CEIP). 1: Opt in to CEIP.")] UInt8 SQMOptIn; - [Write, Description("0: Do not opt in to Microsoft Update. 1: Opt in to Microsoft Update.")] UInt8 MUOptIn; -}; diff --git a/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMManagementServerUpdate/MSFT_xSCVMMManagementServerUpdate.psm1 b/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMManagementServerUpdate/MSFT_xSCVMMManagementServerUpdate.psm1 deleted file mode 100644 index 8db99f6d..00000000 --- a/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMManagementServerUpdate/MSFT_xSCVMMManagementServerUpdate.psm1 +++ /dev/null @@ -1,183 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\VirtualMachineManager\Updates", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $Version = (Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -eq "Microsoft System Center Virtual Machine Manager Server (x64)"}).Version - - switch($Version) - { - "3.2.7510.0" - { - $ProductCode = "{59518B15-FC64-4CF9-A4D1-0EE1B4A63088}" - $PatchID = "{59E2363E-A466-4F40-8026-1342C1E26402}" - $Update = "Update Rollup 4" - } - "3.2.9013.0" - { - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - Update = "None" - } - } - $null - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - Default - { - throw "Unknown version of Virtual Machine Manager!" - } - } - - if($ProductCode -and $PatchID -and (Get-WmiObject -Class Win32_PatchPackage | Where-Object {($_.ProductCode -eq $ProductCode) -and ($_.PatchID -eq $PatchID)})) - { - $returnValue = @{ - Ensure = "Present" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - Update = $Update - } - } - else - { - $returnValue = @{ - Ensure = "Absent" - SourcePath = $SourcePath - SourceFolder = $SourceFolder - } - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\VirtualMachineManager\Updates", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $Version = (Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -eq "Microsoft System Center Virtual Machine Manager Server (x64)"}).Version - - switch($Version) - { - "3.2.7510.0" - { - $UpdateFile = "kb2992024_vmmserver_amd64.msp" - } - "3.2.9013.0" - { - Write-Verbose "No update for this version of Virtual Machine Manager!" - } - $null - { - Write-Verbose "Virtual Machine Manager not installed!" - } - Default - { - throw "Unknown version of Virtual Machine Manager!" - } - } - - if($UpdateFile) - { - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - $Path = "msiexec.exe" - $Path = ResolvePath $Path - Write-Verbose "Path: $Path" - - $MSPPath = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath $UpdateFile - $MSPPath = ResolvePath $MSPPath - $Arguments = "/update $MSPPath /norestart" - Write-Verbose "Arguments: $Arguments" - - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - } - - if((Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction SilentlyContinue) -ne $null) - { - $global:DSCMachineStatus = 1 - } - else - { - if(!(Test-TargetResource @PSBoundParameters)) - { - throw "Set-TargetResouce failed" - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present", - - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [System.String] - $SourceFolder = "\SystemCenter2012R2\VirtualMachineManager\Updates", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $result = ((Get-TargetResource @PSBoundParameters).Ensure -eq $Ensure) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMManagementServerUpdate/MSFT_xSCVMMManagementServerUpdate.schema.mof b/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMManagementServerUpdate/MSFT_xSCVMMManagementServerUpdate.schema.mof deleted file mode 100644 index 28ff3d13..00000000 --- a/lib/puppet_x/dsc_resources/xSCVMM/DSCResources/MSFT_xSCVMMManagementServerUpdate/MSFT_xSCVMMManagementServerUpdate.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSCVMMManagementServerUpdate")] -class MSFT_xSCVMMManagementServerUpdate : OMI_BaseResource -{ - [Key, Description("An enumerated value that describes if the update is expected to be installed on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; - [Read, Description("Display name of the update.")] String Update; -}; diff --git a/lib/puppet_x/dsc_resources/xSCVMM/LICENSE b/lib/puppet_x/dsc_resources/xSCVMM/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xSCVMM/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xSCVMM/en-US/xPDT.strings.psd1 b/lib/puppet_x/dsc_resources/xSCVMM/en-US/xPDT.strings.psd1 deleted file mode 100644 index 11f213c1..00000000 --- a/lib/puppet_x/dsc_resources/xSCVMM/en-US/xPDT.strings.psd1 +++ /dev/null @@ -1,10 +0,0 @@ -ConvertFrom-StringData @' -FileNotFound=File not found in the environment path -AbsolutePathOrFileName=Absolute path or file name expected -InvalidArgument=Invalid argument: '{0}' with value: '{1}' -InvalidArgumentAndMessage={0} {1} -ErrorStarting=Failure starting process matching path '{0}'. Message: {1} -FailureWaitingForProcessesToStart=Failed to wait for processes to start -ProcessStarted=Process matching path '{0}' started in process ID {1} -ProcessAlreadyStarted=Process matching path '{0}' already started in process ID {1} -'@ diff --git a/lib/puppet_x/dsc_resources/xSCVMM/xPDT.psm1 b/lib/puppet_x/dsc_resources/xSCVMM/xPDT.psm1 deleted file mode 100644 index c90beaa1..00000000 --- a/lib/puppet_x/dsc_resources/xSCVMM/xPDT.psm1 +++ /dev/null @@ -1,708 +0,0 @@ -data LocalizedData -{ - ConvertFrom-StringData @' - -FileNotFound=File not found in the environment path -AbsolutePathOrFileName=Absolute path or file name expected -InvalidArgument=Invalid argument: '{0}' with value: '{1}' -InvalidArgumentAndMessage={0} {1} -ErrorStarting=Failure starting process matching path '{0}'. Message: {1} -FailureWaitingForProcessesToStart=Failed to wait for processes to start -ProcessStarted=Process matching path '{0}' started in process ID {1} -ProcessAlreadyStarted=Process matching path '{0}' already started in process ID {1} -'@ -} - -Import-LocalizedData LocalizedData -filename xPDT.strings.psd1 - -function ThrowInvalidArgumentError -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $errorId, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $errorMessage - ) - - $errorCategory=[System.Management.Automation.ErrorCategory]::InvalidArgument - $exception = New-Object System.ArgumentException $errorMessage; - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - throw $errorRecord -} - -function ResolvePath -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Path - ) - - $Path = [Environment]::ExpandEnvironmentVariables($Path) - if(IsRootedPath $Path) - { - if(!(Test-Path $Path -PathType Leaf)) - { - ThrowInvalidArgumentError "CannotFindRootedPath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) - } - return $Path - } - if([string]::IsNullOrEmpty($env:Path)) - { - ThrowInvalidArgumentError "EmptyEnvironmentPath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) - } - if((Split-Path $Path -Leaf) -ne $Path) - { - ThrowInvalidArgumentError "NotAbsolutePathOrFileName" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.AbsolutePathOrFileName) - } - foreach($rawSegment in $env:Path.Split(";")) - { - $segment = [Environment]::ExpandEnvironmentVariables($rawSegment) - $segmentRooted = $false - try - { - $segmentRooted=[IO.Path]::IsPathRooted($segment) - } - catch {} - if(!$segmentRooted) - { - continue - } - $candidate = join-path $segment $Path - if(Test-Path $candidate -PathType Leaf) - { - return $candidate - } - } - ThrowInvalidArgumentError "CannotFindRelativePath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) -} - -function IsRootedPath -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path - ) - - try - { - return [IO.Path]::IsPathRooted($Path) - } - catch - { - ThrowInvalidArgumentError "CannotGetIsPathRooted" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $_.Exception.Message) - } -} - -function ExtractArguments -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - $functionBoundParameters, - - [parameter(Mandatory = $true)] - [string[]] - $argumentNames, - - [string[]] - $newArgumentNames - ) - - $returnValue=@{} - - for($i=0;$i -lt $argumentNames.Count;$i++) - { - $argumentName = $argumentNames[$i] - - if($newArgumentNames -eq $null) - { - $newArgumentName = $argumentName - } - else - { - $newArgumentName = $newArgumentNames[$i] - } - - if($functionBoundParameters.ContainsKey($argumentName)) - { - $null = $returnValue.Add($newArgumentName,$functionBoundParameters[$argumentName]) - } - } - - return $returnValue -} - -function CallPInvoke -{ - $script:ProgramSource = @" -using System; -using System.Collections.Generic; -using System.Text; -using System.Security; -using System.Runtime.InteropServices; -using System.Diagnostics; -using System.Security.Principal; -using System.ComponentModel; -using System.IO; - -namespace Source -{ - [SuppressUnmanagedCodeSecurity] - public static class NativeMethods - { - //The following structs and enums are used by the various Win32 API's that are used in the code below - - [StructLayout(LayoutKind.Sequential)] - public struct STARTUPINFO - { - public Int32 cb; - public string lpReserved; - public string lpDesktop; - public string lpTitle; - public Int32 dwX; - public Int32 dwY; - public Int32 dwXSize; - public Int32 dwXCountChars; - public Int32 dwYCountChars; - public Int32 dwFillAttribute; - public Int32 dwFlags; - public Int16 wShowWindow; - public Int16 cbReserved2; - public IntPtr lpReserved2; - public IntPtr hStdInput; - public IntPtr hStdOutput; - public IntPtr hStdError; - } - - [StructLayout(LayoutKind.Sequential)] - public struct PROCESS_INFORMATION - { - public IntPtr hProcess; - public IntPtr hThread; - public Int32 dwProcessID; - public Int32 dwThreadID; - } - - [Flags] - public enum LogonType - { - LOGON32_LOGON_INTERACTIVE = 2, - LOGON32_LOGON_NETWORK = 3, - LOGON32_LOGON_BATCH = 4, - LOGON32_LOGON_SERVICE = 5, - LOGON32_LOGON_UNLOCK = 7, - LOGON32_LOGON_NETWORK_CLEARTEXT = 8, - LOGON32_LOGON_NEW_CREDENTIALS = 9 - } - - [Flags] - public enum LogonProvider - { - LOGON32_PROVIDER_DEFAULT = 0, - LOGON32_PROVIDER_WINNT35, - LOGON32_PROVIDER_WINNT40, - LOGON32_PROVIDER_WINNT50 - } - [StructLayout(LayoutKind.Sequential)] - public struct SECURITY_ATTRIBUTES - { - public Int32 Length; - public IntPtr lpSecurityDescriptor; - public bool bInheritHandle; - } - - public enum SECURITY_IMPERSONATION_LEVEL - { - SecurityAnonymous, - SecurityIdentification, - SecurityImpersonation, - SecurityDelegation - } - - public enum TOKEN_TYPE - { - TokenPrimary = 1, - TokenImpersonation - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - internal struct TokPriv1Luid - { - public int Count; - public long Luid; - public int Attr; - } - - public const int GENERIC_ALL_ACCESS = 0x10000000; - public const int CREATE_NO_WINDOW = 0x08000000; - internal const int SE_PRIVILEGE_ENABLED = 0x00000002; - internal const int TOKEN_QUERY = 0x00000008; - internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; - internal const string SE_INCRASE_QUOTA = "SeIncreaseQuotaPrivilege"; - - [DllImport("kernel32.dll", - EntryPoint = "CloseHandle", SetLastError = true, - CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] - public static extern bool CloseHandle(IntPtr handle); - - [DllImport("advapi32.dll", - EntryPoint = "CreateProcessAsUser", SetLastError = true, - CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] - public static extern bool CreateProcessAsUser( - IntPtr hToken, - string lpApplicationName, - string lpCommandLine, - ref SECURITY_ATTRIBUTES lpProcessAttributes, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - bool bInheritHandle, - Int32 dwCreationFlags, - IntPtr lpEnvrionment, - string lpCurrentDirectory, - ref STARTUPINFO lpStartupInfo, - ref PROCESS_INFORMATION lpProcessInformation - ); - - [DllImport("advapi32.dll", EntryPoint = "DuplicateTokenEx")] - public static extern bool DuplicateTokenEx( - IntPtr hExistingToken, - Int32 dwDesiredAccess, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - Int32 ImpersonationLevel, - Int32 dwTokenType, - ref IntPtr phNewToken - ); - - [DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)] - public static extern Boolean LogonUser( - String lpszUserName, - String lpszDomain, - String lpszPassword, - LogonType dwLogonType, - LogonProvider dwLogonProvider, - out IntPtr phToken - ); - - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern bool AdjustTokenPrivileges( - IntPtr htok, - bool disall, - ref TokPriv1Luid newst, - int len, - IntPtr prev, - IntPtr relen - ); - - [DllImport("kernel32.dll", ExactSpelling = true)] - internal static extern IntPtr GetCurrentProcess(); - - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern bool OpenProcessToken( - IntPtr h, - int acc, - ref IntPtr phtok - ); - - [DllImport("advapi32.dll", SetLastError = true)] - internal static extern bool LookupPrivilegeValue( - string host, - string name, - ref long pluid - ); - - public static void CreateProcessAsUser(string strCommand, string strDomain, string strName, string strPassword) - { - var hToken = IntPtr.Zero; - var hDupedToken = IntPtr.Zero; - TokPriv1Luid tp; - var pi = new PROCESS_INFORMATION(); - var sa = new SECURITY_ATTRIBUTES(); - sa.Length = Marshal.SizeOf(sa); - Boolean bResult = false; - try - { - bResult = LogonUser( - strName, - strDomain, - strPassword, - LogonType.LOGON32_LOGON_BATCH, - LogonProvider.LOGON32_PROVIDER_DEFAULT, - out hToken - ); - if (!bResult) - { - throw new Win32Exception("The user could not be logged on. Ensure that the user has an existing profile on the machine and that correct credentials are provided. Logon error #" + Marshal.GetLastWin32Error().ToString()); - } - IntPtr hproc = GetCurrentProcess(); - IntPtr htok = IntPtr.Zero; - bResult = OpenProcessToken( - hproc, - TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, - ref htok - ); - if(!bResult) - { - throw new Win32Exception("Open process token error #" + Marshal.GetLastWin32Error().ToString()); - } - tp.Count = 1; - tp.Luid = 0; - tp.Attr = SE_PRIVILEGE_ENABLED; - bResult = LookupPrivilegeValue( - null, - SE_INCRASE_QUOTA, - ref tp.Luid - ); - if(!bResult) - { - throw new Win32Exception("Error in looking up privilege of the process. This should not happen if DSC is running as LocalSystem Lookup privilege error #" + Marshal.GetLastWin32Error().ToString()); - } - bResult = AdjustTokenPrivileges( - htok, - false, - ref tp, - 0, - IntPtr.Zero, - IntPtr.Zero - ); - if(!bResult) - { - throw new Win32Exception("Token elevation error #" + Marshal.GetLastWin32Error().ToString()); - } - - bResult = DuplicateTokenEx( - hToken, - GENERIC_ALL_ACCESS, - ref sa, - (int)SECURITY_IMPERSONATION_LEVEL.SecurityIdentification, - (int)TOKEN_TYPE.TokenPrimary, - ref hDupedToken - ); - if(!bResult) - { - throw new Win32Exception("Duplicate Token error #" + Marshal.GetLastWin32Error().ToString()); - } - var si = new STARTUPINFO(); - si.cb = Marshal.SizeOf(si); - si.lpDesktop = ""; - bResult = CreateProcessAsUser( - hDupedToken, - null, - strCommand, - ref sa, - ref sa, - false, - 0, - IntPtr.Zero, - null, - ref si, - ref pi - ); - if(!bResult) - { - throw new Win32Exception("The process could not be created. Create process as user error #" + Marshal.GetLastWin32Error().ToString()); - } - } - finally - { - if (pi.hThread != IntPtr.Zero) - { - CloseHandle(pi.hThread); - } - if (pi.hProcess != IntPtr.Zero) - { - CloseHandle(pi.hProcess); - } - if (hDupedToken != IntPtr.Zero) - { - CloseHandle(hDupedToken); - } - } - } - } -} - -"@ - Add-Type -TypeDefinition $ProgramSource -ReferencedAssemblies "System.ServiceProcess" -} - -function GetWin32Process -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential - ) - - $fileName = [io.path]::GetFileNameWithoutExtension($Path) - $GetProcesses = @(Get-Process -Name $fileName -ErrorAction SilentlyContinue) - $Processes = foreach($process in $GetProcesses) - { - if($Process.Path -ieq $Path) - { - try - { - [wmi]"Win32_Process.Handle='$($Process.Id)'" - } - catch - { - } - } - } - if($PSBoundParameters.ContainsKey('Credential')) - { - $Processes = $Processes | Where-Object {(GetWin32ProcessOwner $_) -eq $Credential.UserName} - } - if($Arguments -eq $null) {$Arguments = ""} - $Processes = $Processes | Where-Object {(GetWin32ProcessArgumentsFromCommandLine $_.CommandLine) -eq $Arguments} - - return $Processes -} - -function GetWin32ProcessOwner -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNull()] - $Process - ) - - try - { - $Owner = $Process.GetOwner() - } - catch - {} - if($owner.Domain -ne $null) - { - return $Owner.Domain + "\" + $Owner.User - } - else - { - return $Owner.User - } -} - -function GetWin32ProcessArgumentsFromCommandLine -{ - param - ( - [String] - $commandLine - ) - - if($commandLine -eq $null) - { - return "" - } - $commandLine=$commandLine.Trim() - if($commandLine.Length -eq 0) - { - return "" - } - if($commandLine[0] -eq '"') - { - $charToLookfor=[char]'"' - } - else - { - $charToLookfor=[char]' ' - } - $endOfCommand=$commandLine.IndexOf($charToLookfor ,1) - if($endOfCommand -eq -1) - { - return "" - } - return $commandLine.Substring($endOfCommand+1).Trim() -} - -function StartWin32Process -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential, - - [Switch] - $AsTask - ) - - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - $Processes = @(GetWin32Process @getArguments) - if ($processes.Count -eq 0) - { - if($PSBoundParameters.ContainsKey("Credential")) - { - if($AsTask) - { - $ActionArguments = ExtractArguments $PSBoundParameters ` - ("Path", "Arguments") ` - ("Execute", "Argument") - if([string]::IsNullOrEmpty($Arguments)) - { - $null = $ActionArguments.Remove("Argument") - } - $TaskGuid = [guid]::NewGuid().ToString() - $Action = New-ScheduledTaskAction @ActionArguments - $null = Register-ScheduledTask -TaskName "xPDT $TaskGuid" -Action $Action -User $Credential.UserName -Password $Credential.GetNetworkCredential().Password -RunLevel Highest - $err = Start-ScheduledTask -TaskName "xPDT $TaskGuid" - } - else - { - try - { - CallPInvoke - [Source.NativeMethods]::CreateProcessAsUser(("$Path " + $Arguments),$Credential.GetNetworkCredential().Domain,$Credential.GetNetworkCredential().UserName,$Credential.GetNetworkCredential().Password) - } - catch - { - $exception = New-Object System.ArgumentException $_ - $errorCategory = [System.Management.Automation.ErrorCategory]::OperationStopped - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, "Win32Exception", $errorCategory, $null - $err = $errorRecord - } - } - } - else - { - $StartArguments = ExtractArguments $PSBoundParameters ` - ("Path", "Arguments", "Credential") ` - ("FilePath", "ArgumentList", "Credential") - if([string]::IsNullOrEmpty($Arguments)) - { - $null = $StartArguments.Remove("ArgumentList") - } - $err = Start-Process @StartArguments - } - if($err -ne $null) - { - throw $err - } - if (!(WaitForWin32ProcessStart @GetArguments)) - { - ThrowInvalidArgumentError "FailureWaitingForProcessesToStart" ($LocalizedData.ErrorStarting -f $Path,$LocalizedData.FailureWaitingForProcessesToStart) - } - } - else - { - return ($LocalizedData.ProcessAlreadyStarted -f $Path,$Processes.ProcessId) - } - $Processes = @(GetWin32Process @getArguments) - return ($LocalizedData.ProcessStarted -f $Path,$Processes.ProcessId) -} - -function WaitForWin32ProcessStart -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential - ) - - $start = [DateTime]::Now - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - do - { - $value = @(GetWin32Process @GetArguments).Count -ge 1 - } while(!$value -and ([DateTime]::Now - $start).TotalMilliseconds -lt 60000) - - return $value -} - -function WaitForWin32ProcessEnd -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential - ) - - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - While (WaitForWin32ProcessStart @GetArguments) - { - Start-Sleep 1 - } - Get-ScheduledTask | Where-Object {($_.TaskName.Length -ge 4) -and ($_.TaskName.Substring(0,4) -eq "xPDT") -and ($_.Actions.Execute -eq $Path) -and ($_.Actions.Arguments -eq $Arguments)} | Where-Object {$_ -ne $null} | Unregister-ScheduledTask -Confirm:$false -} - -function NetUse -{ - param - ( - [parameter(Mandatory)] - [string] - $SourcePath, - - [parameter(Mandatory)] - [PSCredential] - $Credential, - - [string] - $Ensure = "Present" - ) - - if(($SourcePath.Length -ge 2) -and ($SourcePath.Substring(0,2) -eq "\\")) - { - - if ($Ensure -eq "Absent") - { - $cmd = "net.exe use $SourcePath /del" - } - else - { - $cmd = "net.exe use $SourcePath $($Credential.GetNetworkCredential().Password) /user:$($Credential.GetNetworkCredential().Domain)\$($Credential.GetNetworkCredential().UserName)" - } - Invoke-Expression $cmd - } -} - -Export-ModuleMember ResolvePath,StartWin32Process,WaitForWin32ProcessEnd,NetUse diff --git a/lib/puppet_x/dsc_resources/xSCVMM/xSCVMM.psd1 b/lib/puppet_x/dsc_resources/xSCVMM/xSCVMM.psd1 deleted file mode 100644 index 1a9b03b5..00000000 --- a/lib/puppet_x/dsc_resources/xSCVMM/xSCVMM.psd1 +++ /dev/null @@ -1,31 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '1.2.4.0' - -# ID used to uniquely identify this module -GUID = '9e9bcee1-93e5-4b57-96df-9768686b0f2d' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module with DSC Resources for deployment and configuration of Microsoft System Center Virtual Machine Manager.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' -} diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLAOGroupEnsure/MSFT_xSQLAOGroupEnsure.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLAOGroupEnsure/MSFT_xSQLAOGroupEnsure.psm1 deleted file mode 100644 index f9c07c7f..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLAOGroupEnsure/MSFT_xSQLAOGroupEnsure.psm1 +++ /dev/null @@ -1,367 +0,0 @@ -$currentPath = Split-Path -Parent $MyInvocation.MyCommand.Path -Write-Verbose -Message "CurrentPath: $currentPath" - -Import-Module $currentPath\..\..\xSQLServerHelper.psm1 -Verbose:$false -ErrorAction Stop - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure, - - [parameter(Mandatory = $true)] - [System.String] - $AvailabilityGroupName, - - [System.String] - $SQLServer = $env:COMPUTERNAME, - - [ValidateNotNull()] - [System.String] - $SQLInstanceName= 'MSSQLSERVER', - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $sql = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName -SetupCredential $SetupCredential - - $vConfigured = Test-TargetResource -Ensure $Ensure -AvailabilityGroupName $AvailabilityGroupName -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName -SetupCredential $SetupCredential - - $returnValue = @{ - Ensure = $vConfigured - AvailabilityGroupName = $sql.AvailabilityGroups[$AvailabilityGroupName] - AvailabilityGroupNameListener = $sql.AvailabilityGroups[$AvailabilityGroupName].AvailabilityGroupListeners.name - AvailabilityGroupNameIP = $sql.AvailabilityGroups[$AvailabilityGroupName].AvailabilityGroupListeners.availabilitygrouplisteneripaddresses.IPAddress - AvailabilityGroupSubMask = $sql.AvailabilityGroups[$AvailabilityGroupName].AvailabilityGroupListeners.availabilitygrouplisteneripaddresses.SubnetMask - AvailabilityGroupPort = $sql.AvailabilityGroups[$AvailabilityGroupName].AvailabilityGroupListeners.portnumber - AvailabilityGroupNameDatabase = $sql.AvailabilityGroups[$AvailabilityGroupName].AvailabilityDatabases.name - BackupDirectory = '' - SQLServer = $SQLServer - SQLInstanceName = $SQLInstanceName - } - - $returnValue -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure, - - [parameter(Mandatory = $true)] - [System.String] - $AvailabilityGroupName, - - [System.String] - $AvailabilityGroupNameListener = $AvailabilityGroupName, - - [System.String[]] - $AvailabilityGroupNameIP, - - [System.String[]] - $AvailabilityGroupSubMask, - - [System.UInt32] - $AvailabilityGroupPort = '1433', - - [ValidateSet('None', 'ReadOnly', 'ReadIntent')] - [System.String] - $ReadableSecondary = 'ReadOnly', - - [ValidateSet('Primary', 'Secondary')] - [System.String] - $AutoBackupPreference = 'Primary', - - [System.UInt32] - $BackupPriority = '50', - - [System.UInt32] - $EndPointPort = '5022', - - [System.String] - $SQLServer = $env:COMPUTERNAME, - - [System.String] - $SQLInstanceName = 'MSSQLSERVER', - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $null = [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.Smo') - $null = [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SmoExtended') - - $sql = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName -SetupCredential $SetupCredential - - if (($AvailabilityGroupNameIP -and !$AvailabilityGroupSubMask) -or (!$AvailabilityGroupNameIP -and $AvailabilityGroupSubMask)) - { - throw 'AvailabilityGroupNameIP and AvailabilityGroupSubMask must both be passed for Static IP assignment.' - } - - switch ($Ensure) - { - 'Present' - { - Grant-ServerPerms -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName -AuthorizedUser 'NT AUTHORITY\SYSTEM' -SetupCredential $SetupCredential - New-ListenerADObject -AvailabilityGroupNameListener $AvailabilityGroupNameListener -SetupCredential $SetupCredential -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - $FailoverCondition = 3 - $HealthCheckTimeout = 30000 - $ConnectionModeInPrimary = 'AllowAllConnections' - - $ConnectionModeInSecondaryRole = switch ($ReadableSecondary) - { - 'None' - { - 'AllowNoConnections' - } - - 'ReadOnly' - { - 'AllowAllConnections' - } - - 'ReadIntent' - { - 'AllowReadIntentConnectionsOnly' - } - - Default - { - 'AllowAllConnections' - } - } - - # Get Servers participating in the cluster - # First two nodes will account for Syncronous Automatic Failover, Any additional will be Asyncronous - try - { - $nodes = Get-ClusterNode -cluster $sql.ClusterName -Verbose:$false | Select-Object -ExpandProperty name - $syncNodes = $nodes | Select-Object -First 2 - $asyncNodes = $nodes | Select-Object -Skip 2 - $availabilityGroup = New-Object -typename Microsoft.SqlServer.Management.Smo.AvailabilityGroup -ArgumentList $SQL, $AvailabilityGroupName - $availabilityGroup.AutomatedBackupPreference = $AutoBackupPreference - $availabilityGroup.FailureConditionLevel = $FailoverCondition - $availabilityGroup.HealthCheckTimeout = $HealthCheckTimeout - } - catch - { - throw "Failed to connect to Cluster Nodes from $($sql.ClusterName)" - } - - # Loop through Sync nodes Create Replica Object Assign properties and add it to AvailabilityGroup - foreach ($node in $syncNodes) - { - Try - { - $Replica = New-Object -typename Microsoft.SqlServer.Management.Smo.AvailabilityReplica -ArgumentList $availabilityGroup, $node - $Replica.EndpointUrl = "TCP://$($node):$EndPointPort" - $Replica.FailoverMode = [Microsoft.SqlServer.Management.Smo.AvailabilityReplicaFailoverMode]::Automatic - $Replica.AvailabilityMode = [Microsoft.SqlServer.Management.Smo.AvailabilityReplicaAvailabilityMode]::SynchronousCommit - # Backup Priority Gives the ability to set a priority of one secondany over another valid values are from 1 - 100 - $Replica.BackupPriority = $BackupPriority - $Replica.ConnectionModeInPrimaryRole = $ConnectionModeInPrimary - $replica.ConnectionModeInSecondaryRole = $ConnectionModeInSecondaryRole - $availabilityGroup.AvailabilityReplicas.Add($Replica) - } - catch - { - throw "Failed to add $Replica to the Availability Group $AvailabilityGroupName" - } - } - - # Loop through ASync nodes Create Replica Object Assign properties and add it to AvailabilityGroup - foreach ($node in $AsyncNodes) - { - try - { - $asyncReplica = New-Object -typename Microsoft.SqlServer.Management.Smo.AvailabilityReplica -ArgumentList $availabilityGroup, $node - $asyncReplica.EndpointUrl = "TCP://$($node):$EndPointPort" - $asyncReplica.FailoverMode = [Microsoft.SqlServer.Management.Smo.AvailabilityReplicaFailoverMode]::Manual - $asyncReplica.AvailabilityMode = [Microsoft.SqlServer.Management.Smo.AvailabilityReplicaAvailabilityMode]::ASynchronousCommit - $asyncReplica.BackupPriority = $BackupPriority - $asyncReplica.ConnectionModeInPrimaryRole = $ConnectionModeInPrimary - $asyncReplica.ConnectionModeInSecondaryRole = $ConnectionModeInSecondaryRole - $AvailabilityGroup.AvailabilityReplicas.Add($asyncReplica) - } - catch - { - Write-Error "Failed to add $asyncReplica to the Availability Group $AvailabilityGroupName" - } - } - - try - { - $AgListener = New-Object -typename Microsoft.SqlServer.Management.Smo.AvailabilityGroupListener -ArgumentList $AvailabilityGroup, $AvailabilityGroupNameListener - $AgListener.PortNumber =$AvailabilityGroupPort - } - catch - { - Write-Error -Message ('{0}: Failed to Create AG Listener Object' -f ((Get-Date -format yyyy-MM-dd_HH-mm-ss))) - } - - - if ($AvailabilityGroupNameIP) - { - foreach ($IP in $AvailabilityGroupNameIP) - { - $AgListenerIp = New-Object -typename Microsoft.SqlServer.Management.Smo.AvailabilityGroupListenerIPAddress -ArgumentList $AgListener - $AgListenerIp.IsDHCP = $false - $AgListenerIp.IPAddress = $IP - $AgListenerIp.SubnetMask = $AvailabilityGroupSubMask - $AgListener.AvailabilityGroupListenerIPAddresses.Add($AgListenerIp) - New-VerboseMessage -Message "Added Static IP $IP to $AvailabilityGroupNameListener..." - - } - } - else - { - # Utilize Dynamic IP since no Ip was passed - $AgListenerIp = New-Object -typename Microsoft.SqlServer.Management.Smo.AvailabilityGroupListenerIPAddress -ArgumentList $AgListener - $AgListenerIp.IsDHCP = $true - $AgListener.AvailabilityGroupListenerIPAddresses.Add($AgListenerIp) - New-VerboseMessage -Message "Added DynamicIP to $AvailabilityGroupNameListener..." - } - - try - { - $AvailabilityGroup.AvailabilityGroupListeners.Add($AgListener); - } - catch - { - throw "Failed to Add $AvailabilityGroupNameListener to $AvailabilityGroupName..." - } - - # Add Availabilty Group to the SQL connection - try - { - $SQL.AvailabilityGroups.Add($availabilityGroup) - New-VerboseMessage -Message "Added $availabilityGroupName Availability Group to Connection" - } - catch - { - throw "Unable to Add $AvailabilityGroup to $SQLServer\$SQLInstanceName" - } - - # Create Availability Group - try - { - $availabilityGroup.Create() - - New-VerboseMessage -Message "Created Availability Group $availabilityGroupName" - } - catch - { - throw "Unable to Create $AvailabilityGroup on $SQLServer\$SQLInstanceName" - } - } - - 'Absent' - { - try - { - $sql.AvailabilityGroups[$AvailabilityGroupName].Drop() - - New-VerboseMessage -Message "Dropped $AvailabilityGroupName" - } - catch - { - throw "Unable to Drop $AvailabilityGroup on $SQLServer\$SQLInstanceName" - } - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure, - - [parameter(Mandatory = $true)] - [System.String] - $AvailabilityGroupName, - - [System.String] - $AvailabilityGroupNameListener, - - [System.String[]] - $AvailabilityGroupNameIP, - - [System.String[]] - $AvailabilityGroupSubMask, - - [System.UInt32] - $AvailabilityGroupPort, - - [ValidateSet('None', 'ReadOnly', 'ReadIntent')] - [System.String] - $ReadableSecondary ='ReadOnly', - - [ValidateSet('Primary', 'Secondary')] - [System.String] - $AutoBackupPreference = 'Primary', - - [System.UInt32] - $BackupPriority = '50', - - [System.UInt32] - $EndPointPort = '5022', - - [System.String] - $SQLServer = $env:COMPUTERNAME, - - [System.String] - $SQLInstanceName = 'MSSQLSERVER', - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $sql = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName -SetupCredential $SetupCredential - - $result = $false - - switch ($Ensure) - { - 'Present' - { - $availabilityGroupPresent = $sql.AvailabilityGroups.Contains($AvailabilityGroupName) - if ($availabilityGroupPresent) - { - $result = $true - } - } - - 'Absent' - { - if (!$sql.AvailabilityGroups[$AvailabilityGroupName]) - { - $result = $true - } - } - } - - return $result -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLAOGroupEnsure/MSFT_xSQLAOGroupEnsure.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLAOGroupEnsure/MSFT_xSQLAOGroupEnsure.schema.mof deleted file mode 100644 index 0d722dd6..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLAOGroupEnsure/MSFT_xSQLAOGroupEnsure.schema.mof +++ /dev/null @@ -1,17 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLAOGroupEnsure")] -class MSFT_xSQLAOGroupEnsure : OMI_BaseResource -{ - [Key, Description("Determines whether the availability group should be added or removed."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Key, Description("Name for availability group.")] String AvailabilityGroupName; - [Write, Description("Listener name for availability group.")] String AvailabilityGroupNameListener; - [Write, Description("List of IP addresses associated with listener.")] String AvailabilityGroupNameIP[]; - [Write, Description("Network subnetmask for listener.")] String AvailabilityGroupSubMask[]; - [Write, Description("Port availability group should listen on.")] Uint32 AvailabilityGroupPort; - [Write, Description("Mode secondaries should operate under (None, ReadOnly, ReadIntent)."), ValueMap{"None","ReadOnly","ReadIntent"}, Values{"None","ReadOnly","ReadIntent"}] String ReadableSecondary; - [Write, Description("Where backups should be backed up from (Primary, Secondary)."), ValueMap{"Primary","Secondary"}, Values{"Primary","Secondary"}] String AutoBackupPreference; - [Write, Description("The percentage weight for backup prority (default 50).")] Uint32 BackupPriority; - [Write, Description("he TCP port for the SQL AG Endpoint (default 5022).")] Uint32 EndPointPort; - [Write, Description("The SQL Server for the database.")] String SQLServer; - [Write, Description("The SQL instance for the database.")] String SQLInstanceName; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to Grant Permissions on SQL Server, set this to $null to use Windows Authentication.")] String SetupCredential; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLAOGroupJoin/MSFT_xSQLAOGroupJoin.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLAOGroupJoin/MSFT_xSQLAOGroupJoin.psm1 deleted file mode 100644 index a9693ab0..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLAOGroupJoin/MSFT_xSQLAOGroupJoin.psm1 +++ /dev/null @@ -1,227 +0,0 @@ -$script:currentPath = Split-Path -Path $MyInvocation.MyCommand.Path -Parent -Import-Module -Name (Join-Path -Path (Split-Path -Path (Split-Path -Path $script:currentPath -Parent) -Parent) -ChildPath 'xSQLServerHelper.psm1') - -<# - .SYNOPSIS - Returns the current joined state of the Availability Group. - - .PARAMETER Ensure - If the replica should be joined ('Present') to the Availability Group or not joined ('Absent') to the Availability Group. - - .PARAMETER AvailabilityGroupName - The name Availability Group to join. - - .PARAMETER SQLServer - Name of the SQL server to be configured. - - .PARAMETER SQLInstanceName - Name of the SQL instance to be configured. - - .PARAMETER SetupCredential - Credential to be used to Grant Permissions in SQL. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure, - - [Parameter(Mandatory = $true)] - [System.String] - $AvailabilityGroupName, - - [Parameter()] - [System.String] - $SQLServer = $env:COMPUTERNAME, - - [Parameter()] - [System.String] - $SQLInstanceName= 'MSSQLSERVER', - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $sql = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName -SetupCredential $SetupCredential - - if (Test-TargetResource @PSBoundParameters) - { - $ensure = 'Present' - } - else - { - $ensure = 'Absent' - } - - return @{ - Ensure = $ensure - AvailabilityGroupName = $sql.AvailabilityGroups[$AvailabilityGroupName].Name - AvailabilityGroupNameListener = $sql.AvailabilityGroups[$AvailabilityGroupName].AvailabilityGroupListeners.Name - AvailabilityGroupNameIP = $sql.AvailabilityGroups[$AvailabilityGroupName].AvailabilityGroupListeners.AvailabilityGroupListenerIPAddresses.IPAddress - AvailabilityGroupSubMask = $sql.AvailabilityGroups[$AvailabilityGroupName].AvailabilityGroupListeners.AvailabilityGroupListenerIPAddresses.SubnetMask - AvailabilityGroupPort = $sql.AvailabilityGroups[$AvailabilityGroupName].AvailabilityGroupListeners.PortNumber - AvailabilityGroupNameDatabase = $sql.AvailabilityGroups[$AvailabilityGroupName].AvailabilityDatabases.Name - BackupDirectory = "" - SQLServer = $SQLServer - SQLInstanceName = $SQLInstanceName - } -} - -<# - .SYNOPSIS - Join the node to the the Availability Group. - - .PARAMETER Ensure - If the replica should be joined ('Present') to the Availability Group or not joined ('Absent') to the Availability Group. - - .PARAMETER AvailabilityGroupName - The name Availability Group to join. - - .PARAMETER SQLServer - Name of the SQL server to be configured. - - .PARAMETER SQLInstanceName - Name of the SQL instance to be configured. - - .PARAMETER SetupCredential - Credential to be used to Grant Permissions in SQL. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure, - - [Parameter(Mandatory = $true)] - [System.String] - $AvailabilityGroupName, - - [Parameter()] - [System.String] - $SQLServer = $env:COMPUTERNAME, - - [Parameter()] - [System.String] - $SQLInstanceName= 'MSSQLSERVER', - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - Initialize-SqlServerAssemblies - - $sql = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName -SetupCredential $SetupCredential - Grant-ServerPerms -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName -AuthorizedUser "NT AUTHORITY\SYSTEM" -SetupCredential $SetupCredential - - try - { - $sql.JoinAvailabilityGroup($AvailabilityGroupName) - New-VerboseMessage -Message "Joined $SQLServer\$SQLInstanceName to $AvailabilityGroupName" - } - catch - { - throw "Unable to Join $AvailabilityGroupName on $SQLServer\$SQLInstanceName" - } -} - -<# - .SYNOPSIS - Test if the node is joined to the Availability Group. - - .PARAMETER Ensure - If the replica should be joined ('Present') to the Availability Group or not joined ('Absent') to the Availability Group. - - .PARAMETER AvailabilityGroupName - The name Availability Group to join. - - .PARAMETER SQLServer - Name of the SQL server to be configured. - - .PARAMETER SQLInstanceName - Name of the SQL instance to be configured. - - .PARAMETER SetupCredential - Credential to be used to Grant Permissions in SQL. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure, - - [Parameter(Mandatory = $true)] - [System.String] - $AvailabilityGroupName, - - [Parameter()] - [System.String] - $SQLServer = $env:COMPUTERNAME, - - [Parameter()] - [System.String] - $SQLInstanceName= 'MSSQLSERVER', - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $sql = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName -SetupCredential $SetupCredential - - $returnValue = $false - - switch ($Ensure) - { - 'Present' - { - $availabilityGroupPresent = $sql.AvailabilityGroups.Contains($AvailabilityGroupName) - - if ($availabilityGroupPresent) - { - $returnValue = $true - } - } - - "Absent" - { - $availabilityGroupPresent = $sql.AvailabilityGroups.Contains($AvailabilityGroupName) - - if (!$availabilityGroupPresent) - { - $returnValue = $true - } - } - } - - return $returnValue -} - -<# - .SYNOPSIS - Loads the needed assemblies for the resource to be able to use methods. -#> -function Initialize-SqlServerAssemblies -{ - param () - - $null = [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.Smo') - $null = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoExtended") -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLAOGroupJoin/MSFT_xSQLAOGroupJoin.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLAOGroupJoin/MSFT_xSQLAOGroupJoin.schema.mof deleted file mode 100644 index c3a19b5e..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLAOGroupJoin/MSFT_xSQLAOGroupJoin.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLAOGroupJoin")] -class MSFT_xSQLAOGroupJoin : OMI_BaseResource -{ - [Key, Description("If the replica should be joined ('Present') to the Availability Group or not joined ('Absent') to the Availability Group."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Key, Description("The name Availability Group to join.")] String AvailabilityGroupName; - [Write, Description("Name of the SQL server to be configured.")] String SQLServer; - [Write, Description("Name of the SQL instance to be configured.")] String SQLInstanceName; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to Grant Permissions in SQL.")] String SetupCredential; -}; - diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlias/MSFT_xSQLServerAlias.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlias/MSFT_xSQLServerAlias.psm1 deleted file mode 100644 index 550af907..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlias/MSFT_xSQLServerAlias.psm1 +++ /dev/null @@ -1,289 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path (Split-Path $PSScriptRoot -Parent) -Parent) -ChildPath 'xSQLServerHelper.psm1') -Force - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $ServerName - ) - - $returnValue = @{ - Name = [System.String] $Name - Protocol = [System.String] '' - ServerName = [System.String] $ServerName - TcpPort = [System.UInt16] 0 - UseDynamicTcpPort = [System.Boolean] $false - PipeName = [System.String] '' - Ensure = [System.String] 'Absent' - } - - $protocolTcp = 'DBMSSOCN' - $protocolNamedPipes = 'DBNMPNTW' - - Write-Verbose -Message "Getting the SQL Server Client Alias $Name" - $itemValue = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo' ` - -Name $Name ` - -ErrorAction SilentlyContinue - - if (((Get-CimInstance -ClassName win32_OperatingSystem).OSArchitecture) -eq '64-bit') - { - Write-Verbose -Message "64-bit Operating System. Also get the client alias $Name from Wow6432Node" - - $isWow6432Node = $true - $itemValueWow6432Node = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\MSSQLServer\Client\ConnectTo' ` - -Name $Name ` - -ErrorAction SilentlyContinue - } - - if ((-not $isWow6432Node -and $null -ne $itemValue ) -or ` - (($null -ne $itemValue -and $null -ne $itemValueWow6432Node) -and ` - ($isWow6432Node -and $itemValueWow6432Node."$Name" -eq $itemValue."$Name"))) - { - $itemConfig = $itemValue."$Name" | ConvertFrom-Csv -Header 'Protocol','ServerName','TcpPort' - if ($itemConfig) - { - if ($itemConfig.Protocol -eq $protocolTcp) - { - $returnValue.Ensure = 'Present' - $returnValue.Protocol = 'TCP' - $returnValue.ServerName = $itemConfig.ServerName - if ($itemConfig.TcpPort) - { - $returnValue.TcpPort = $itemConfig.TcpPort - $returnValue.UseDynamicTcpPort = $false - } - else - { - $returnValue.UseDynamicTcpPort = $true - $returnValue.TcpPort = 0 - } - } - elseif ($itemConfig.Protocol -eq $protocolNamedPipes) - { - $returnValue.Ensure = 'Present' - $returnValue.Protocol = 'NP' - $returnValue.PipeName = $itemConfig.ServerName - } - } - else - { - $returnValue.Ensure = 'Absent' - } - } - else - { - $returnValue.Ensure = 'Absent' - } - - $returnValue -} - -function Set-TargetResource -{ - [CmdletBinding(SupportsShouldProcess)] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name, - - [Parameter()] - [ValidateSet('TCP','NP')] - [System.String] - $Protocol = 'TCP', - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $ServerName, - - [Parameter()] - [System.UInt16] - $TcpPort = 1433, - - [Parameter()] - [System.Boolean] - $UseDynamicTcpPort = $false, - - [Parameter()] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present' - ) - - Write-Verbose -Message "Setting the SQL Server Client Alias $Name" - - if ($Protocol -eq 'NP') - { - $itemValue = "DBNMPNTW,\\$ServerName\PIPE\sql\query" - } - - if ($Protocol -eq 'TCP') - { - $itemValue = "DBMSSOCN,$ServerName" - if (!$UseDynamicTcpPort) - { - $itemValue += ",$TcpPort" - } - } - - $registryPath = 'HKLM:\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo' - $registryPathWow6432Node = 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\MSSQLServer\Client\ConnectTo' - - if ($Ensure -eq 'Present') - { - Write-Verbose -Message "Adding the SQL Server Client Alias $Name" - - if ($PSCmdlet.ShouldProcess($Name, 'Setting the client alias')) - { - if (!(Test-Path -Path $registryPath)) - { - New-Item -Path $registryPath | Out-Null - } - - Set-ItemProperty -Path $registryPath -Name $Name -Value $itemValue | Out-Null - } - - # If this is a 64-bit OS then also update Wow6432Node - if (((Get-CimInstance -ClassName win32_OperatingSystem).OSArchitecture) -eq '64-bit') - { - if ($PSCmdlet.ShouldProcess($Name, 'Setting the client alias (32-bit)')) - { - if (!(Test-Path -Path $registryPathWow6432Node)) - { - New-Item -Path $registryPathWow6432Node | Out-Null - } - - Set-ItemProperty -Path $registryPathWow6432Node -Name $Name -Value $itemValue | Out-Null - } - } - } - - if ($Ensure -eq 'Absent') - { - Write-Verbose -Message "Removing the SQL Server Client Alias $Name" - - if ($PSCmdlet.ShouldProcess($Name, 'Remove the client alias')) - { - if (Test-Path -Path $registryPath) - { - Remove-ItemProperty -Path $registryPath -Name $Name - } - } - - # If this is a 64-bit OS then also remove from Wow6432Node - if (((Get-CimInstance -ClassName win32_OperatingSystem).OSArchitecture) -eq '64-bit' ` - -and (Test-Path -Path $registryPathWow6432Node)) - { - if ($PSCmdlet.ShouldProcess($Name, 'Remove the client alias (32-bit)')) - { - Remove-ItemProperty -Path $registryPathWow6432Node -Name $Name - } - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name, - - [Parameter()] - [ValidateSet('TCP','NP')] - [System.String] - $Protocol = 'TCP', - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $ServerName, - - [Parameter()] - [System.UInt16] - $TcpPort = 1433, - - [Parameter()] - [System.Boolean] - $UseDynamicTcpPort = $false, - - [Parameter()] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present' - ) - - Write-Verbose -Message "Testing the SQL Server Client Alias $Name" - - $result = $false - - $parameters = @{ - Name = $PSBoundParameters.Name - ServerName = $PSBoundParameters.ServerName - } - - $currentValues = Get-TargetResource @parameters - - if ($Ensure -eq $currentValues.Ensure) - { - if( $Ensure -eq 'Absent' ) - { - $result = $true - } - else - { - Write-Verbose -Message 'Ensure is in the desired state. Verifying values.' - - if ($Protocol -eq $currentValues.Protocol) - { - if ($Protocol -eq 'NP' -and - $currentValues.PipeName -eq "\\$ServerName\PIPE\sql\query") - { - $result = $true - } - elseif ($Protocol -eq 'TCP' -and - $UseDynamicTcpPort -and - $currentValues.ServerName -eq $ServerName) - { - $result = $true - } - elseif ($Protocol -eq 'TCP' -and - -not $UseDynamicTcpPort -and - $currentValues.ServerName -eq $ServerName -and - $currentValues.TcpPort -eq $TcpPort) - { - $result = $true - } - } - } - } - - if ($result) - { - Write-Verbose -Message 'In the desired state' - } - else - { - Write-Verbose -Message 'Not in the desired state' - } - - return $result -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlias/MSFT_xSQLServerAlias.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlias/MSFT_xSQLServerAlias.schema.mof deleted file mode 100644 index bf613ea9..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlias/MSFT_xSQLServerAlias.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerAlias")] -class MSFT_xSQLServerAlias : OMI_BaseResource -{ - [Key, Description("The name of Alias (e.g. svr01\\inst01).")] String Name; - [Write, Description("Protocol to use when connecting. Valid values are 'TCP' or 'NP' (Named Pipes). Default value is 'TCP'."), ValueMap{"TCP","NP"}, Values{"TCP","NP"}] String Protocol; - [Key, Description("The SQL Server you are aliasing (the netbios name or FQDN).")] String ServerName; - [Write, Description("The TCP port SQL is listening on. Only used when protocol is set to 'TCP'. Default value is port 1433.")] UInt16 TcpPort; - [Write, Description("The UseDynamicTcpPort specify that the Net-Library will determine the port dynamically. The port specified in Port number will not be used. Default value is '$false'.")] Boolean UseDynamicTcpPort; - [Read, Description("Named Pipes path from the Get-TargetResource method.")] String PipeName; - [Write, Description("Determines whether the alias should be added or removed. Default value is 'Present'"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnAvailabilityGroup/MSFT_xSQLServerAlwaysOnAvailabilityGroup.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnAvailabilityGroup/MSFT_xSQLServerAlwaysOnAvailabilityGroup.psm1 deleted file mode 100644 index 41b3142c..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnAvailabilityGroup/MSFT_xSQLServerAlwaysOnAvailabilityGroup.psm1 +++ /dev/null @@ -1,758 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path (Split-Path $PSScriptRoot -Parent) -Parent) ` - -ChildPath 'xSQLServerHelper.psm1') ` - -Force - -<# - .SYNOPSIS - Gets the specified Availabilty Group. - - .PARAMETER Name - The name of the availability group. - - .PARAMETER SQLServer - Hostname of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - Name of the SQL instance to be configued. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [String] - $SQLInstanceName - ) - - # Connect to the instance - $serverObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - # Get the endpoint properties - $endpoint = $serverObject.Endpoints | Where-Object { $_.EndpointType -eq 'DatabaseMirroring' } - if ( $endpoint ) - { - $endpointPort = $endpoint.Protocol.Tcp.ListenerPort - } - - # Get the Availability Group - $availabilityGroup = $serverObject.AvailabilityGroups[$Name] - - if ( $availabilityGroup ) - { - # Get all of the properties that can be set using this resource - $alwaysOnAvailabilityGroupResource = @{ - Name = $Name - SQLServer = $SQLServer - SQLInstanceName = $SQLInstanceName - Ensure = 'Present' - AutomatedBackupPreference = $availabilityGroup.AutomatedBackupPreference - AvailabilityMode = $availabilityGroup.AvailabilityReplicas[$serverObject.Name].AvailabilityMode - BackupPriority = $availabilityGroup.AvailabilityReplicas[$serverObject.Name].BackupPriority - ConnectionModeInPrimaryRole = $availabilityGroup.AvailabilityReplicas[$serverObject.Name].ConnectionModeInPrimaryRole - ConnectionModeInSecondaryRole = $availabilityGroup.AvailabilityReplicas[$serverObject.Name].ConnectionModeInSecondaryRole - FailureConditionLevel = $availabilityGroup.FailureConditionLevel - FailoverMode = $availabilityGroup.AvailabilityReplicas[$serverObject.Name].FailoverMode - HealthCheckTimeout = $availabilityGroup.HealthCheckTimeout - EndpointURL = $availabilityGroup.AvailabilityReplicas[$serverObject.Name].EndpointUrl - EndpointPort = $endpointPort - SQLServerNetName = $serverObject.NetName - Version = $serverObject.Version.Major - } - - # Add properties that are only present in SQL 2016 or newer - if ( $serverObject.Version.Major -ge 13 ) - { - $alwaysOnAvailabilityGroupResource.Add('BasicAvailabilityGroup', $availabilityGroup.BasicAvailabilityGroup) - } - } - else - { - # Return the minimum amount of properties showing that the Availabilty Group is absent - $alwaysOnAvailabilityGroupResource = @{ - Name = $Name - SQLServer = $SQLServer - SQLInstanceName = $SQLInstanceName - Ensure = 'Absent' - } - } - - return $alwaysOnAvailabilityGroupResource -} - -<# - .SYNOPSIS - Creates or removes the availability group to in accordance with the desired state. - - .PARAMETER Name - The name of the availability group. - - .PARAMETER SQLServer - Hostname of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - Name of the SQL instance to be configued. - - .PARAMETER Ensure - Specifies if the availability group should be present or absent. Default is Present. - - .PARAMETER AutomatedBackupPreference - Specifies the automated backup preference for the availability group. - - .PARAMETER AvailabilityMode - Specifies the replica availability mode. Default is 'AsynchronousCommit'. - - .PARAMETER BackupPriority - Specifies the desired priority of the replicas in performing backups. The acceptable values for this parameter are integers from 0 through 100. Of the set of replicas which are online and available, the replica that has the highest priority performs the backup. Default is 50. - - .PARAMETER BasicAvailabilityGroup - Specifies the type of availability group is Basic. This is only available is SQL Server 2016 and later and is ignored when applied to previous versions. - - .PARAMETER ConnectionModeInPrimaryRole - Specifies how the availability replica handles connections when in the primary role. - - .PARAMETER ConnectionModeInSecondaryRole - Specifies how the availability replica handles connections when in the secondary role. - - .PARAMETER EndpointHostName - Specifies the hostname or IP address of the availability group replica endpoint. Default is the instance network name. - - .PARAMETER FailureConditionLevel - Specifies the automatic failover behavior of the availability group. - - .PARAMETER HealthCheckTimeout - Specifies the length of time, in milliseconds, after which AlwaysOn availability groups declare an unresponsive server to be unhealthy. Default is 30,000. -#> -function Set-TargetResource -{ - [CmdletBinding()] - Param - ( - [Parameter(Mandatory = $true)] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [String] - $SQLInstanceName, - - [Parameter()] - [ValidateSet('Present','Absent')] - [String] - $Ensure = 'Present', - - [Parameter()] - [ValidateSet('Primary','SecondaryOnly','Secondary','None')] - [String] - $AutomatedBackupPreference = 'None', - - [Parameter()] - [ValidateSet('AsynchronousCommit','SynchronousCommit')] - [String] - $AvailabilityMode = 'AsynchronousCommit', - - [Parameter()] - [ValidateRange(0,100)] - [UInt32] - $BackupPriority = 50, - - [Parameter()] - [bool] - $BasicAvailabilityGroup, - - [Parameter()] - [ValidateSet('AllowAllConnections','AllowReadWriteConnections')] - [String] - $ConnectionModeInPrimaryRole, - - [Parameter()] - [ValidateSet('AllowNoConnections','AllowReadIntentConnectionsOnly','AllowAllConnections')] - [String] - $ConnectionModeInSecondaryRole, - - [Parameter()] - [String] - $EndpointHostName, - - [Parameter()] - [ValidateSet( - 'OnServerDown', - 'OnServerUnresponsive', - 'OnCriticalServerErrors', - 'OnModerateServerErrors', - 'OnAnyQualifiedFailureCondition' - )] - [String] - $FailureConditionLevel, - - [Parameter()] - [ValidateSet('Automatic','Manual')] - [String] - $FailoverMode = 'Manual', - - [Parameter()] - [UInt32] - $HealthCheckTimeout = 30000 - ) - - Import-SQLPSModule - - # Connect to the instance - $serverObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - # Determine if HADR is enabled on the instance. If not, throw an error - if ( -not $serverObject.IsHadrEnabled ) - { - throw New-TerminatingError -ErrorType HadrNotEnabled -FormatArgs $Ensure,$SQLInstanceName -ErrorCategory NotImplemented - } - - $version = $serverObject.Version.Major - - # Get the Availabilty Group if it exists - $availabilityGroup = $serverObject.AvailabilityGroups[$Name] - - switch ($Ensure) - { - Absent - { - # If the AG exists - if ( $availabilityGroup ) - { - # If the primary replica is currently on this instance - if ( $availabilityGroup.PrimaryReplicaServerName -eq $serverObject.Name ) - { - try - { - Remove-SqlAvailabilityGroup -InputObject $availabilityGroup -ErrorAction Stop - } - catch - { - throw New-TerminatingError -ErrorType RemoveAvailabilityGroupFailed -FormatArgs $availabilityGroup.Name,$SQLInstanceName -ErrorCategory ResourceUnavailable - } - } - else - { - throw New-TerminatingError -ErrorType InstanceNotPrimaryReplica -FormatArgs $SQLInstanceName,$availabilityGroup.Name -ErrorCategory ResourceUnavailable - } - } - } - - Present - { - $clusterServiceName = 'NT SERVICE\ClusSvc' - $ntAuthoritySystemName = 'NT AUTHORITY\SYSTEM' - $availabilityGroupManagementPerms = @('Connect SQL','Alter Any Availability Group','View Server State') - $clusterPermissionsPresent = $false - - foreach ( $loginName in @( $clusterServiceName, $ntAuthoritySystemName ) ) - { - if ( $serverObject.Logins[$loginName] ) - { - $testLoginEffectivePermissionsParams = @{ - SQLServer = $SQLServer - SQLInstanceName = $SQLInstanceName - LoginName = $loginName - Permissions = $availabilityGroupManagementPerms - } - - $clusterPermissionsPresent = Test-LoginEffectivePermissions @testLoginEffectivePermissionsParams - - if ( $clusterPermissionsPresent ) - { - # Exit the loop when the script verifies the required cluster permissions are present - break - } - else - { - switch ( $loginName ) - { - $clusterServiceName - { - New-VerboseMessage -Message "The recommended account '$loginName' is missing one or more of the following permissions: $( $availabilityGroupManagementPerms -join ', ' ). Trying with '$ntAuthoritySystemName'." - } - - $ntAuthoritySystemName - { - New-VerboseMessage -Message "'$loginName' is missing one or more of the following permissions: $( $availabilityGroupManagementPerms -join ', ' )" - } - } - } - } - else - { - switch ( $loginName ) - { - $clusterServiceName - { - New-VerboseMessage -Message "The recommended login '$loginName' is not present. Trying with '$ntAuthoritySystemName'." - } - - $ntAuthoritySystemName - { - New-VerboseMessage -Message "The login '$loginName' is not present." - } - } - } - } - - # If neither 'NT SERVICE\ClusSvc' or 'NT AUTHORITY\SYSTEM' have the required permissions, throw an error - if ( -not $clusterPermissionsPresent ) - { - throw New-TerminatingError -ErrorType ClusterPermissionsMissing -FormatArgs $SQLServer,$SQLInstanceName -ErrorCategory SecurityError - } - - $endpoint = $serverObject.Endpoints | Where-Object { $_.EndpointType -eq 'DatabaseMirroring' } - if ( -not $endpoint ) - { - throw New-TerminatingError -ErrorType DatabaseMirroringEndpointNotFound -FormatArgs $SQLServer,$SQLInstanceName -ErrorCategory ObjectNotFound - } - - if ( -not $EndpointHostName ) - { - $EndpointHostName = $serverObject.NetName - } - - # If the availability group does not exist, create it - if ( -not $availabilityGroup ) - { - - # Set up the parameters to create the AG Replica - $newReplicaParams = @{ - Name = $serverObject.Name - Version = $version - AsTemplate = $true - AvailabilityMode = $AvailabilityMode - EndpointUrl = "TCP://$($EndpointHostName):$($endpoint.Protocol.Tcp.ListenerPort)" - FailoverMode = $FailoverMode - } - - if ( $BackupPriority ) - { - $newReplicaParams.Add('BackupPriority',$BackupPriority) - } - - if ( $ConnectionModeInPrimaryRole ) - { - $newReplicaParams.Add('ConnectionModeInPrimaryRole',$ConnectionModeInPrimaryRole) - } - - if ( $ConnectionModeInSecondaryRole ) - { - $newReplicaParams.Add('ConnectionModeInSecondaryRole',$ConnectionModeInSecondaryRole) - } - - # Create the new replica object - try - { - $primaryReplica = New-SqlAvailabilityReplica @newReplicaParams -ErrorAction Stop - } - catch - { - throw New-TerminatingError -ErrorType CreateAvailabilityGroupReplicaFailed -FormatArgs $Ensure,$SQLInstanceName -ErrorCategory OperationStopped - } - - # Set up the parameters for the new availability group - $newAvailabilityGroupParams = @{ - InputObject = $serverObject - Name = $Name - AvailabilityReplica = $primaryReplica - } - - if ( $AutomatedBackupPreference ) - { - $newAvailabilityGroupParams.Add('AutomatedBackupPreference',$AutomatedBackupPreference) - } - - if ( $BasicAvailabilityGroup -and ( $version -ge 13 ) ) - { - $newAvailabilityGroupParams.Add('BasicAvailabilityGroup',$BasicAvailabilityGroup) - } - - if ( $FailureConditionLevel ) - { - $newAvailabilityGroupParams.Add('FailureConditionLevel',$FailureConditionLevel) - } - - if ( $HealthCheckTimeout ) - { - $newAvailabilityGroupParams.Add('HealthCheckTimeout',$HealthCheckTimeout) - } - - # Create the Availabilty Group - try - { - New-SqlAvailabilityGroup @newAvailabilityGroupParams -ErrorAction Stop - } - catch - { - throw New-TerminatingError -ErrorType CreateAvailabilityGroupFailed -FormatArgs $Name,$_.Exception -ErrorCategory OperationStopped - } - } - # Otherwise let's check each of the parameters passed and update the Availability Group accordingly - else - { - # Make sure we're communicating with the primary replica - if ( $availabilityGroup.LocalReplicaRole -ne 'Primary' ) - { - $primaryServerObject = Connect-SQL -SQLServer $availabilityGroup.PrimaryReplicaServerName - $availabilityGroup = $primaryServerObject.AvailabilityGroups[$Name] - } - - if ( $AutomatedBackupPreference -ne $availabilityGroup.AutomatedBackupPreference ) - { - $availabilityGroup.AutomatedBackupPreference = $AutomatedBackupPreference - Update-AvailabilityGroup -AvailabilityGroup $availabilityGroup - } - - if ( $AvailabilityMode -ne $availabilityGroup.AvailabilityReplicas[$serverObject.Name].AvailabilityMode ) - { - $availabilityGroup.AvailabilityReplicas[$serverObject.Name].AvailabilityMode = $AvailabilityMode - Update-AvailabilityGroupReplica -AvailabilityGroupReplica $availabilityGroup.AvailabilityReplicas[$serverObject.Name] - } - - if ( $BackupPriority -ne $availabilityGroup.AvailabilityReplicas[$serverObject.Name].BackupPriority ) - { - $availabilityGroup.AvailabilityReplicas[$serverObject.Name].BackupPriority = $BackupPriority - Update-AvailabilityGroupReplica -AvailabilityGroupReplica $availabilityGroup.AvailabilityReplicas[$serverObject.Name] - } - - if ( $BasicAvailabilityGroup -and ( $version -ge 13 ) -and ( $BasicAvailabilityGroup -ne $availabilityGroup.BasicAvailabilityGroup ) ) - { - $availabilityGroup.BasicAvailabilityGroup = $BasicAvailabilityGroup - Update-AvailabilityGroup -AvailabilityGroup $availabilityGroup - } - - # Make sure ConnectionModeInPrimaryRole has a value in order to avoid false positive matches when the parameter is not defined - if ( ( -not [string]::IsNullOrEmpty($ConnectionModeInPrimaryRole) ) -and ( $ConnectionModeInPrimaryRole -ne $availabilityGroup.AvailabilityReplicas[$serverObject.Name].ConnectionModeInPrimaryRole ) ) - { - $availabilityGroup.AvailabilityReplicas[$serverObject.Name].ConnectionModeInPrimaryRole = $ConnectionModeInPrimaryRole - Update-AvailabilityGroupReplica -AvailabilityGroupReplica $availabilityGroup.AvailabilityReplicas[$serverObject.Name] - } - - # Make sure ConnectionModeInSecondaryRole has a value in order to avoid false positive matches when the parameter is not defined - if ( ( -not [string]::IsNullOrEmpty($ConnectionModeInSecondaryRole) ) -and ( $ConnectionModeInSecondaryRole -ne $availabilityGroup.AvailabilityReplicas[$serverObject.Name].ConnectionModeInSecondaryRole ) ) - { - $availabilityGroup.AvailabilityReplicas[$serverObject.Name].ConnectionModeInSecondaryRole = $ConnectionModeInSecondaryRole - Update-AvailabilityGroupReplica -AvailabilityGroupReplica $availabilityGroup.AvailabilityReplicas[$serverObject.Name] - } - - # Break out the EndpointUrl properties - $currentEndpointProtocol, $currentEndpointHostName, $currentEndpointPort = $availabilityGroup.AvailabilityReplicas[$serverObject.Name].EndpointUrl.Replace('//','').Split(':') - - if ( $endpoint.Protocol.Tcp.ListenerPort -ne $currentEndpointPort ) - { - $newEndpointUrl = $availabilityGroup.AvailabilityReplicas[$serverObject.Name].EndpointUrl.Replace($currentEndpointPort,$endpoint.Protocol.Tcp.ListenerPort) - $availabilityGroup.AvailabilityReplicas[$serverObject.Name].EndpointUrl = $newEndpointUrl - Update-AvailabilityGroupReplica -AvailabilityGroupReplica $availabilityGroup.AvailabilityReplicas[$serverObject.Name] - } - - if ( $EndpointHostName -ne $currentEndpointHostName ) - { - $newEndpointUrl = $availabilityGroup.AvailabilityReplicas[$serverObject.Name].EndpointUrl.Replace($currentEndpointHostName,$EndpointHostName) - $availabilityGroup.AvailabilityReplicas[$serverObject.Name].EndpointUrl = $newEndpointUrl - Update-AvailabilityGroupReplica -AvailabilityGroupReplica $availabilityGroup.AvailabilityReplicas[$serverObject.Name] - } - - if ( $currentEndpointProtocol -ne 'TCP' ) - { - $newEndpointUrl = $availabilityGroup.AvailabilityReplicas[$serverObject.Name].EndpointUrl.Replace($currentEndpointProtocol,'TCP') - $availabilityGroup.AvailabilityReplicas[$serverObject.Name].EndpointUrl = $newEndpointUrl - Update-AvailabilityGroupReplica -AvailabilityGroupReplica $availabilityGroup.AvailabilityReplicas[$serverObject.Name] - } - - # Make sure FailureConditionLevel has a value in order to avoid false positive matches when the parameter is not defined - if ( ( -not [string]::IsNullOrEmpty($FailureConditionLevel) ) -and ( $FailureConditionLevel -ne $availabilityGroup.FailureConditionLevel ) ) - { - $availabilityGroup.FailureConditionLevel = $FailureConditionLevel - Update-AvailabilityGroup -AvailabilityGroup $availabilityGroup - } - - if ( $FailoverMode -ne $availabilityGroup.AvailabilityReplicas[$serverObject.Name].FailoverMode ) - { - $availabilityGroup.AvailabilityReplicas[$serverObject.Name].AvailabilityMode = $FailoverMode - Update-AvailabilityGroupReplica -AvailabilityGroupReplica $availabilityGroup.AvailabilityReplicas[$serverObject.Name] - } - - if ( $HealthCheckTimeout -ne $availabilityGroup.HealthCheckTimeout ) - { - $availabilityGroup.HealthCheckTimeout = $HealthCheckTimeout - Update-AvailabilityGroup -AvailabilityGroup $availabilityGroup - } - } - } - } -} - -<# - .SYNOPSIS - Determines if the availability group is in the desired state. - - .PARAMETER Name - The name of the availability group. - - .PARAMETER SQLServer - Hostname of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - Name of the SQL instance to be configued. - - .PARAMETER Ensure - Specifies if the availability group should be present or absent. Default is Present. - - .PARAMETER AutomatedBackupPreference - Specifies the automated backup preference for the availability group. - - .PARAMETER AvailabilityMode - Specifies the replica availability mode. Default is 'AsynchronousCommit'. - - .PARAMETER BackupPriority - Specifies the desired priority of the replicas in performing backups. The acceptable values for this parameter are integers from 0 through 100. Of the set of replicas which are online and available, the replica that has the highest priority performs the backup. Default is 50. - - .PARAMETER BasicAvailabilityGroup - Specifies the type of availability group is Basic. This is only available is SQL Server 2016 and later and is ignored when applied to previous versions. - - .PARAMETER ConnectionModeInPrimaryRole - Specifies how the availability replica handles connections when in the primary role. - - .PARAMETER ConnectionModeInSecondaryRole - Specifies how the availability replica handles connections when in the secondary role. - - .PARAMETER EndpointHostName - Specifies the hostname or IP address of the availability group replica endpoint. Default is the instance network name. - - .PARAMETER FailureConditionLevel - Specifies the automatic failover behavior of the availability group. - - .PARAMETER HealthCheckTimeout - Specifies the length of time, in milliseconds, after which AlwaysOn availability groups declare an unresponsive server to be unhealthy. Default is 30,000. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - Param - ( - [Parameter(Mandatory = $true)] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [String] - $SQLInstanceName, - - [Parameter()] - [ValidateSet('Present','Absent')] - [String] - $Ensure = 'Present', - - [Parameter()] - [ValidateSet('Primary','SecondaryOnly','Secondary','None')] - [String] - $AutomatedBackupPreference = 'None', - - [Parameter()] - [ValidateSet('AsynchronousCommit','SynchronousCommit')] - [String] - $AvailabilityMode = 'AsynchronousCommit', - - [Parameter()] - [ValidateRange(0,100)] - [UInt32] - $BackupPriority = 50, - - [Parameter()] - [bool] - $BasicAvailabilityGroup, - - [Parameter()] - [ValidateSet('AllowAllConnections','AllowReadWriteConnections')] - [String] - $ConnectionModeInPrimaryRole, - - [Parameter()] - [ValidateSet('AllowNoConnections','AllowReadIntentConnectionsOnly','AllowAllConnections')] - [String] - $ConnectionModeInSecondaryRole, - - [Parameter()] - [String] - $EndpointHostName, - - [Parameter()] - [ValidateSet('OnServerDown','OnServerUnresponsive','OnCriticalServerErrors','OnModerateServerErrors','OnAnyQualifiedFailureCondition')] - [String] - $FailureConditionLevel, - - [Parameter()] - [ValidateSet('Automatic','Manual')] - [String] - $FailoverMode = 'Manual', - - [Parameter()] - [UInt32] - $HealthCheckTimeout = 30000 - ) - - $getTargetResourceParameters = @{ - SQLInstanceName = $SQLInstanceName - SQLServer = $SQLServer - Name = $Name - } - - # Assume this will pass. We will determine otherwise later - $result = $true - - $getTargetResourceResult = Get-TargetResource @getTargetResourceParameters - - switch ($Ensure) - { - 'Absent' - { - if ( $getTargetResourceResult.Ensure -eq 'Absent' ) - { - $result = $true - } - else - { - $result = $false - } - } - - 'Present' - { - $parametersToCheck = @( - 'Name', - 'SQLServer', - 'SQLInstanceName', - 'Ensure', - 'AutomatedBackupPreference', - 'AvailabilityMode', - 'BackupPriority', - 'BasicAvailabilityGroup', - 'ConnectionModeInPrimaryRole', - 'ConnectionModeInSecondaryRole', - 'FailureConditionLevel', - 'FailoverMode', - 'HealthCheckTimeout' - ) - - if ( $getTargetResourceResult.Ensure -eq 'Present' ) - { - # PsBoundParameters won't work here because it doesn't account for default values - foreach ( $parameter in $MyInvocation.MyCommand.Parameters.GetEnumerator() ) - { - $parameterName = $parameter.Key - $parameterValue = Get-Variable -Name $parameterName -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Value - - # Make sure we don't try to validate a common parameter - if ( $parametersToCheck -notcontains $parameterName ) - { - continue - } - - if ( $getTargetResourceResult.($parameterName) -ne $parameterValue ) - { - if ( $parameterName -eq 'BasicAvailabilityGroup' ) - { - # Move on to the next property if the instance is not at least SQL Server 2016 - if ( $getTargetResourceResult.Version -lt 13 ) - { - continue - } - } - - New-VerboseMessage -Message "'$($parameterName)' should be '$($parameterValue)' but is '$($getTargetResourceResult.($parameterName))'" - - $result = $False - } - } - - # Get the Endpoint URL properties - $currentEndpointProtocol, $currentEndpointHostName, $currentEndpointPort = $getTargetResourceResult.EndpointUrl.Replace('//','').Split(':') - - if ( -not $EndpointHostName ) - { - $EndpointHostName = $getTargetResourceResult.SQLServerNetName - } - - # Verify the hostname in the endpoint URL is correct - if ( $EndpointHostName -ne $currentEndpointHostName ) - { - New-VerboseMessage -Message "'EndpointHostName' should be '$EndpointHostName' but is '$currentEndpointHostName'" - $result = $false - } - - # Verify the protocol in the endpoint URL is correct - if ( 'TCP' -ne $currentEndpointProtocol ) - { - New-VerboseMessage -Message "'EndpointProtocol' should be 'TCP' but is '$currentEndpointProtocol'" - $result = $false - } - - # Verify the port in the endpoint URL is correct - if ( $getTargetResourceResult.EndpointPort -ne $currentEndpointPort ) - { - New-VerboseMessage -Message "'EndpointPort' should be '$($getTargetResourceResult.EndpointPort)' but is '$currentEndpointPort'" - $result = $false - } - } - else - { - $result = $false - } - } - } - - return $result -} - -<# - .SYNOPSIS - Executes the alter method on an Availability Group object. - - .PARAMETER AvailabilityGroup - The Availabilty Group object that must be altered. -#> -function Update-AvailabilityGroup -{ - param - ( - [Parameter(Mandatory = $true)] - [Microsoft.SqlServer.Management.Smo.AvailabilityGroup] - $AvailabilityGroup - ) - - try - { - $originalErrorActionPreference = $ErrorActionPreference - $ErrorActionPreference = 'Stop' - $AvailabilityGroup.Alter() - } - catch - { - throw New-TerminatingError -ErrorType AlterAvailabilityGroupFailed -FormatArgs $AvailabilityGroup.Name -ErrorCategory OperationStopped - } - finally - { - $ErrorActionPreference = $originalErrorActionPreference - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnAvailabilityGroup/MSFT_xSQLServerAlwaysOnAvailabilityGroup.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnAvailabilityGroup/MSFT_xSQLServerAlwaysOnAvailabilityGroup.schema.mof deleted file mode 100644 index 07947f4d..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnAvailabilityGroup/MSFT_xSQLServerAlwaysOnAvailabilityGroup.schema.mof +++ /dev/null @@ -1,18 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerAlwaysOnAvailabilityGroup")] -class MSFT_xSQLServerAlwaysOnAvailabilityGroup : OMI_BaseResource -{ - [Key, Description("The name of the availability group.")] String Name; - [Required, Description("Hostname of the SQL Server to be configured.")] String SQLServer; - [Key, Description("Name of the SQL instance to be configued.")] String SQLInstanceName; - [Write, Description("Specifies if the availability group should be present or absent. Default is Present."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("Specifies the automated backup preference for the availability group. Default is None"), ValueMap{"Primary","SecondaryOnly","Secondary","None"}, Values{"Primary","SecondaryOnly","Secondary","None"}] String AutomatedBackupPreference; - [Write, Description("Specifies the replica availability mode. Default is 'AsynchronousCommit'."), ValueMap{"AsynchronousCommit","SynchronousCommit"}, Values{"AsynchronousCommit","SynchronousCommit"}] String AvailabilityMode; - [Write, Description("Specifies the desired priority of the replicas in performing backups. The acceptable values for this parameter are: integers from 0 through 100. Of the set of replicas which are online and available, the replica that has the highest priority performs the backup. Default is 50.")] UInt32 BackupPriority; - [Write, Description("Specifies the type of availability group is Basic. This is only available is SQL Server 2016 and later and is ignored when applied to previous versions.")] Boolean BasicAvailabilityGroup; - [Write, Description("Specifies how the availability replica handles connections when in the primary role."), ValueMap{"AllowAllConnections","AllowReadWriteConnections"}, Values{"AllowAllConnections","AllowReadWriteConnections"}] String ConnectionModeInPrimaryRole; - [Write, Description("Specifies how the availability replica handles connections when in the secondary role."), ValueMap{"AllowNoConnections","AllowReadIntentConnectionsOnly","AllowAllConnections"}, Values{"AllowNoConnections","AllowReadIntentConnectionsOnly","AllowAllConnections"}] String ConnectionModeInSecondaryRole; - [Write, Description("Specifies the hostname or IP address of the availability group replica endpoint. Default is the instance network name.")] String EndpointHostName; - [Write, Description("Specifies the automatic failover behavior of the availability group."), ValueMap{"OnServerDown","OnServerUnresponsive","OnCriticalServerErrors","OnModerateServerErrors","OnAnyQualifiedFailureCondition"}, Values{"OnServerDown","OnServerUnresponsive","OnCriticalServerErrors","OnModerateServerErrors","OnAnyQualifiedFailureCondition"}] String FailureConditionLevel; - [Write, Description("Specifies the failover mode. Default is 'Manual'."), ValueMap{"Automatic","Manual"}, Values{"Automatic","Manual"}] String FailoverMode; - [Write, Description("Specifies the length of time, in milliseconds, after which AlwaysOn availability groups declare an unresponsive server to be unhealthy. Default is 30000.")] UInt32 HealthCheckTimeout; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnAvailabilityGroupReplica/MSFT_xSQLServerAlwaysOnAvailabilityGroupReplica.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnAvailabilityGroupReplica/MSFT_xSQLServerAlwaysOnAvailabilityGroupReplica.psm1 deleted file mode 100644 index 982164cd..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnAvailabilityGroupReplica/MSFT_xSQLServerAlwaysOnAvailabilityGroupReplica.psm1 +++ /dev/null @@ -1,738 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path (Split-Path $PSScriptRoot -Parent) -Parent) ` - -ChildPath 'xSQLServerHelper.psm1') ` - -Force - -<# - .SYNOPSIS - Gets the specified Availabilty Group Replica from the specified Availabilty Group. - - .PARAMETER Name - The name of the availability group replica. - - .PARAMETER AvailabilityGroupName - The name of the availability group. - - .PARAMETER SQLServer - Hostname of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - Name of the SQL instance to be configued. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [String] - $AvailabilityGroupName, - - [Parameter(Mandatory = $true)] - [String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [String] - $SQLInstanceName - ) - - # Connect to the instance - $serverObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - # Get the endpoint properties - $endpoint = $serverObject.Endpoints | Where-Object { $_.EndpointType -eq 'DatabaseMirroring' } - if ( $endpoint ) - { - $endpointPort = $endpoint.Protocol.Tcp.ListenerPort - } - - # Create the return object - $alwaysOnAvailabilityGroupReplicaResource = @{ - Ensure = 'Absent' - Name = '' - AvailabilityGroupName = '' - AvailabilityMode = '' - BackupPriority = '' - ConnectionModeInPrimaryRole = '' - ConnectionModeInSecondaryRole = '' - FailoverMode = '' - EndpointUrl = '' - ReadOnlyRoutingConnectionUrl = '' - ReadOnlyRoutingList = @() - SQLServer = $SQLServer - SQLInstanceName = $SQLInstanceName - EndpointPort = $endpointPort - SQLServerNetName = $serverObject.NetName - } - - # Get the availability group - $availabilityGroup = $serverObject.AvailabilityGroups[$AvailabilityGroupName] - - if ( $availabilityGroup ) - { - # Add the Availability Group name to the results - $alwaysOnAvailabilityGroupReplicaResource.AvailabilityGroupName = $availabilityGroup.Name - - # Try to find the replica - $availabilityGroupReplica = $availabilityGroup.AvailabilityReplicas[$Name] - - if ( $availabilityGroupReplica ) - { - # Add the Availability Group Replica properties to the results - $alwaysOnAvailabilityGroupReplicaResource.Ensure = 'Present' - $alwaysOnAvailabilityGroupReplicaResource.Name = $availabilityGroupReplica.Name - $alwaysOnAvailabilityGroupReplicaResource.AvailabilityMode = $availabilityGroupReplica.AvailabilityMode - $alwaysOnAvailabilityGroupReplicaResource.BackupPriority = $availabilityGroupReplica.BackupPriority - $alwaysOnAvailabilityGroupReplicaResource.ConnectionModeInPrimaryRole = $availabilityGroupReplica.ConnectionModeInPrimaryRole - $alwaysOnAvailabilityGroupReplicaResource.ConnectionModeInSecondaryRole = $availabilityGroupReplica.ConnectionModeInSecondaryRole - $alwaysOnAvailabilityGroupReplicaResource.FailoverMode = $availabilityGroupReplica.FailoverMode - $alwaysOnAvailabilityGroupReplicaResource.EndpointUrl = $availabilityGroupReplica.EndpointUrl - $alwaysOnAvailabilityGroupReplicaResource.ReadOnlyRoutingConnectionUrl = $availabilityGroupReplica.ReadOnlyRoutingConnectionUrl - $alwaysOnAvailabilityGroupReplicaResource.ReadOnlyRoutingList = $availabilityGroupReplica.ReadOnlyRoutingList - } - } - - return $alwaysOnAvailabilityGroupReplicaResource -} - -<# - .SYNOPSIS - Creates or removes the availability group replica in accordance with the desired state. - - .PARAMETER Name - The name of the availability group replica. - - .PARAMETER AvailabilityGroupName - The name of the availability group. - - .PARAMETER SQLServer - Hostname of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - Name of the SQL instance to be configued. - - .PARAMETER PrimaryReplicaSQLServer - Hostname of the SQL Server where the primary replica is expected to be active. If the primary replica is not found here, the resource will attempt to find the host that holds the primary replica and connect to it. - - .PARAMETER PrimaryReplicaSQLInstanceName - Name of the SQL instance where the primary replica lives. - - .PARAMETER Ensure - Specifies if the availability group should be present or absent. Default is Present. - - .PARAMETER AvailabilityMode - Specifies the replica availability mode. Default is 'AsynchronousCommit'. - - .PARAMETER BackupPriority - Specifies the desired priority of the replicas in performing backups. The acceptable values for this parameter are integers from 0 through 100. Of the set of replicas which are online and available, the replica that has the highest priority performs the backup. Default is 50. - - .PARAMETER ConnectionModeInPrimaryRole - Specifies how the availability replica handles connections when in the primary role. - - .PARAMETER ConnectionModeInSecondaryRole - Specifies how the availability replica handles connections when in the secondary role. - - .PARAMETER EndpointHostName - Specifies the hostname or IP address of the availability group replica endpoint. Default is the instance network name which is set in the code because the value can only be determined when connected to the SQL Instance. - - .PARAMETER FailoverMode - Specifies the failover mode. Default is Manual. - - .PARAMETER ReadOnlyRoutingConnectionUrl - Specifies the fully-qualified domain name (FQDN) and port to use when routing to the replica for read only connections. - - .PARAMETER ReadOnlyRoutingList - Specifies an ordered list of replica server names that represent the probe sequence for connection director to use when redirecting read-only connections through this availability replica. This parameter applies if the availability replica is the current primary replica of the availability group. -#> -function Set-TargetResource -{ - [CmdletBinding()] - Param - ( - [Parameter(Mandatory = $true)] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [String] - $AvailabilityGroupName, - - [Parameter(Mandatory = $true)] - [String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [String] - $SQLInstanceName, - - [Parameter()] - [String] - $PrimaryReplicaSQLServer, - - [Parameter()] - [String] - $PrimaryReplicaSQLInstanceName, - - [Parameter()] - [ValidateSet('Present','Absent')] - [String] - $Ensure = 'Present', - - [Parameter()] - [ValidateSet('AsynchronousCommit','SynchronousCommit')] - [String] - $AvailabilityMode = 'AsynchronousCommit', - - [Parameter()] - [ValidateRange(0,100)] - [UInt32] - $BackupPriority = 50, - - [Parameter()] - [ValidateSet('AllowAllConnections','AllowReadWriteConnections')] - [String] - $ConnectionModeInPrimaryRole, - - [Parameter()] - [ValidateSet('AllowNoConnections','AllowReadIntentConnectionsOnly','AllowAllConnections')] - [String] - $ConnectionModeInSecondaryRole, - - [Parameter()] - [String] - $EndpointHostName, - - [Parameter()] - [ValidateSet('Automatic','Manual')] - [String] - $FailoverMode = 'Manual', - - [Parameter()] - [String] - $ReadOnlyRoutingConnectionUrl, - - [Parameter()] - [String[]] - $ReadOnlyRoutingList - ) - - Import-SQLPSModule - - # Connect to the instance - $serverObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - # Determine if HADR is enabled on the instance. If not, throw an error - if ( -not $serverObject.IsHadrEnabled ) - { - throw New-TerminatingError -ErrorType HadrNotEnabled -FormatArgs $Ensure,$SQLInstanceName -ErrorCategory NotImplemented - } - - # Get the Availabilty Group if it exists - $availabilityGroup = $serverObject.AvailabilityGroups[$AvailabilityGroupName] - - # Make sure we're communicating with the primary replica in order to make changes to the replica - if ( $availabilityGroup ) - { - while ( $availabilityGroup.LocalReplicaRole -ne 'Primary' ) - { - $primaryServerObject = Connect-SQL -SQLServer $availabilityGroup.PrimaryReplicaServerName - $availabilityGroup = $primaryServerObject.AvailabilityGroups[$AvailabilityGroupName] - } - } - - switch ( $Ensure ) - { - Absent - { - if ( $availabilityGroup ) - { - $availabilityGroupReplica = $availabilityGroup.AvailabilityReplicas[$Name] - - if ( $availabilityGroupReplica ) - { - try - { - Remove-SqlAvailabilityReplica -InputObject $availabilityGroupReplica -Confirm:$false -ErrorAction Stop - } - catch - { - throw New-TerminatingError -ErrorType RemoveAvailabilityGroupReplicaFailed -FormatArgs $Name, $_.Exception -ErrorCategory ResourceUnavailable - } - } - } - } - - Present - { - $clusterServiceName = 'NT SERVICE\ClusSvc' - $ntAuthoritySystemName = 'NT AUTHORITY\SYSTEM' - $availabilityGroupManagementPerms = @('Connect SQL','Alter Any Availability Group','View Server State') - $clusterPermissionsPresent = $false - - foreach ( $loginName in @( $clusterServiceName, $ntAuthoritySystemName ) ) - { - if ( $serverObject.Logins[$loginName] -and -not $clusterPermissionsPresent ) - { - $testLoginEffectivePermissionsParams = @{ - SQLServer = $SQLServer - SQLInstanceName = $SQLInstanceName - LoginName = $loginName - Permissions = $availabilityGroupManagementPerms - } - - $clusterPermissionsPresent = Test-LoginEffectivePermissions @testLoginEffectivePermissionsParams - - if ( -not $clusterPermissionsPresent ) - { - switch ( $loginName ) - { - $clusterServiceName - { - New-VerboseMessage -Message "The recommended account '$loginName' is missing one or more of the following permissions: $( $availabilityGroupManagementPerms -join ', ' ). Trying with '$ntAuthoritySystemName'." - } - - $ntAuthoritySystemName - { - New-VerboseMessage -Message "'$loginName' is missing one or more of the following permissions: $( $availabilityGroupManagementPerms -join ', ' )" - } - } - } - } - elseif ( -not $clusterPermissionsPresent ) - { - switch ( $loginName ) - { - $clusterServiceName - { - New-VerboseMessage -Message "The recommended login '$loginName' is not present. Trying with '$ntAuthoritySystemName'." - } - - $ntAuthoritySystemName - { - New-VerboseMessage -Message "The login '$loginName' is not present." - } - } - } - } - - # If neither 'NT SERVICE\ClusSvc' or 'NT AUTHORITY\SYSTEM' have the required permissions, throw an error. - if ( -not $clusterPermissionsPresent ) - { - throw New-TerminatingError -ErrorType ClusterPermissionsMissing -FormatArgs $SQLServer,$SQLInstanceName -ErrorCategory SecurityError - } - - # Make sure a database mirroring endpoint exists. - $endpoint = $serverObject.Endpoints | Where-Object { $_.EndpointType -eq 'DatabaseMirroring' } - if ( -not $endpoint ) - { - throw New-TerminatingError -ErrorType DatabaseMirroringEndpointNotFound -FormatArgs $SQLServer,$SQLInstanceName -ErrorCategory ObjectNotFound - } - - # If a hostname for the endpoint was not specified, define it now. - if ( -not $EndpointHostName ) - { - $EndpointHostName = $serverObject.NetName - } - - # Get the endpoint port - $endpointPort = $endpoint.Protocol.Tcp.ListenerPort - - # Determine if the Availabilty Group exists on the instance - if ( $availabilityGroup ) - { - # Make sure the replia exists on the instance. If the availability group exists, the replica should exist. - $availabilityGroupReplica = $availabilityGroup.AvailabilityReplicas[$Name] - if ( $availabilityGroupReplica ) - { - if ( $AvailabilityMode -ne $availabilityGroupReplica.AvailabilityMode ) - { - $availabilityGroupReplica.AvailabilityMode = $AvailabilityMode - Update-AvailabilityGroupReplica -AvailabilityGroupReplica $availabilityGroupReplica - } - - if ( $BackupPriority -ne $availabilityGroupReplica.BackupPriority ) - { - $availabilityGroupReplica.BackupPriority = $BackupPriority - Update-AvailabilityGroupReplica -AvailabilityGroupReplica $availabilityGroupReplica - } - - # Make sure ConnectionModeInPrimaryRole has a value in order to avoid false positive matches when the parameter is not defined - if ( ( -not [string]::IsNullOrEmpty($ConnectionModeInPrimaryRole) ) -and ( $ConnectionModeInPrimaryRole -ne $availabilityGroupReplica.ConnectionModeInPrimaryRole ) ) - { - $availabilityGroupReplica.ConnectionModeInPrimaryRole = $ConnectionModeInPrimaryRole - Update-AvailabilityGroupReplica -AvailabilityGroupReplica $availabilityGroupReplica - } - - # Make sure ConnectionModeInSecondaryRole has a value in order to avoid false positive matches when the parameter is not defined - if ( ( -not [string]::IsNullOrEmpty($ConnectionModeInSecondaryRole) ) -and ( $ConnectionModeInSecondaryRole -ne $availabilityGroupReplica.ConnectionModeInSecondaryRole ) ) - { - $availabilityGroupReplica.ConnectionModeInSecondaryRole = $ConnectionModeInSecondaryRole - Update-AvailabilityGroupReplica -AvailabilityGroupReplica $availabilityGroupReplica - } - - # Break out the EndpointUrl properties - $currentEndpointProtocol, $currentEndpointHostName, $currentEndpointPort = $availabilityGroupReplica.EndpointUrl.Replace('//','').Split(':') - - if ( $endpoint.Protocol.Tcp.ListenerPort -ne $currentEndpointPort ) - { - $newEndpointUrl = $availabilityGroupReplica.EndpointUrl.Replace($currentEndpointPort,$endpoint.Protocol.Tcp.ListenerPort) - $availabilityGroupReplica.EndpointUrl = $newEndpointUrl - Update-AvailabilityGroupReplica -AvailabilityGroupReplica $availabilityGroupReplica - } - - if ( $EndpointHostName -ne $currentEndpointHostName ) - { - $newEndpointUrl = $availabilityGroupReplica.EndpointUrl.Replace($currentEndpointHostName,$EndpointHostName) - $availabilityGroupReplica.EndpointUrl = $newEndpointUrl - Update-AvailabilityGroupReplica -AvailabilityGroupReplica $availabilityGroupReplica - } - - if ( $currentEndpointProtocol -ne 'TCP' ) - { - $newEndpointUrl = $availabilityGroupReplica.EndpointUrl.Replace($currentEndpointProtocol,'TCP') - $availabilityGroupReplica.EndpointUrl = $newEndpointUrl - Update-AvailabilityGroupReplica -AvailabilityGroupReplica $availabilityGroupReplica - } - - if ( $FailoverMode -ne $availabilityGroupReplica.FailoverMode ) - { - $availabilityGroupReplica.FailoverMode = $FailoverMode - Update-AvailabilityGroupReplica -AvailabilityGroupReplica $availabilityGroupReplica - } - - if ( $ReadOnlyRoutingConnectionUrl -ne $availabilityGroupReplica.ReadOnlyRoutingConnectionUrl ) - { - $availabilityGroupReplica.ReadOnlyRoutingConnectionUrl = $ReadOnlyRoutingConnectionUrl - Update-AvailabilityGroupReplica -AvailabilityGroupReplica $availabilityGroupReplica - } - - if ( $ReadOnlyRoutingList -ne $availabilityGroupReplica.ReadOnlyRoutingList ) - { - $availabilityGroupReplica.ReadOnlyRoutingList = $ReadOnlyRoutingList - Update-AvailabilityGroupReplica -AvailabilityGroupReplica $availabilityGroupReplica - } - } - else - { - throw New-TerminatingError -ErrorType ReplicaNotFound -FormatArgs $Name,$SQLInstanceName -ErrorCategory ResourceUnavailable - } - } - else - { - # Connect to the instance that is supposed to house the primary replica - $primaryReplicaServerObject = Connect-SQL -SQLServer $PrimaryReplicaSQLServer -SQLInstanceName $PrimaryReplicaSQLInstanceName - - # Verify the Availability Group exists on the supplied primary replica - $primaryReplicaAvailabilityGroup = $primaryReplicaServerObject.AvailabilityGroups[$AvailabilityGroupName] - if ( $primaryReplicaAvailabilityGroup ) - { - # Make sure the instance defined as the primary replica in the parameters is actually the primary replica - if ( $primaryReplicaAvailabilityGroup.LocalReplicaRole -ne 'Primary' ) - { - New-VerboseMessage -Message "The instance '$PrimaryReplicaSQLServer\$PrimaryReplicaSQLInstanceName' is not currently the primary replica. Connecting to '$($primaryReplicaAvailabilityGroup.PrimaryReplicaServerName)'." - - $primaryReplicaServerObject = Connect-SQL -SQLServer $primaryReplicaAvailabilityGroup.PrimaryReplicaServerName - $primaryReplicaAvailabilityGroup = $primaryReplicaServerObject.AvailabilityGroups[$AvailabilityGroupName] - } - - # Build the endpoint URL - $endpointUrl = "TCP://$($EndpointHostName):$($endpointPort)" - - $newAvailabilityGroupReplicaParams = @{ - Name = $Name - InputObject = $primaryReplicaAvailabilityGroup - AvailabilityMode = $AvailabilityMode - EndpointUrl = $endpointUrl - FailoverMode = $FailoverMode - Verbose = $false - } - - if ( $BackupPriority ) - { - $newAvailabilityGroupReplicaParams.Add('BackupPriority',$BackupPriority) - } - - if ( $ConnectionModeInPrimaryRole ) - { - $newAvailabilityGroupReplicaParams.Add('ConnectionModeInPrimaryRole',$ConnectionModeInPrimaryRole) - } - - if ( $ConnectionModeInSecondaryRole ) - { - $newAvailabilityGroupReplicaParams.Add('ConnectionModeInSecondaryRole',$ConnectionModeInSecondaryRole) - } - - if ( $ReadOnlyRoutingConnectionUrl ) - { - $newAvailabilityGroupReplicaParams.Add('ReadOnlyRoutingConnectionUrl',$ReadOnlyRoutingConnectionUrl) - } - - if ( $ReadOnlyRoutingList ) - { - $newAvailabilityGroupReplicaParams.Add('ReadOnlyRoutingList',$ReadOnlyRoutingList) - } - - # Create the Availability Group Replica - try - { - $availabilityGroupReplica = New-SqlAvailabilityReplica @newAvailabilityGroupReplicaParams - } - catch - { - throw New-TerminatingError -ErrorType CreateAvailabilityGroupReplicaFailed -FormatArgs $Name,$SQLInstanceName -ErrorCategory OperationStopped - } - - # Join the Availability Group Replica to the Availability Group - try - { - $joinAvailabilityGroupResults = Join-SqlAvailabilityGroup -Name $AvailabilityGroupName -InputObject $serverObject - } - catch - { - throw New-TerminatingError -ErrorType JoinAvailabilityGroupFailed -FormatArgs $Name -ErrorCategory OperationStopped - } - } - # The Availability Group doesn't exist on the primary replica - else - { - throw New-TerminatingError -ErrorType AvailabilityGroupNotFound -FormatArgs $Name,$PrimaryReplicaSQLInstanceName -ErrorCategory ResourceUnavailable - } - } - } - } -} - -<# - .SYNOPSIS - Determines if the availability group replica is in the desired state. - - .PARAMETER Name - The name of the availability group replica. - - .PARAMETER AvailabilityGroupName - The name of the availability group. - - .PARAMETER SQLServer - Hostname of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - Name of the SQL instance to be configued. - - .PARAMETER PrimaryReplicaSQLServer - Hostname of the SQL Server where the primary replica is expected to be active. If the primary replica is not found here, the resource will attempt to find the host that holds the primary replica and connect to it. - - .PARAMETER PrimaryReplicaSQLInstanceName - Name of the SQL instance where the primary replica lives. - - .PARAMETER Ensure - Specifies if the availability group should be present or absent. Default is Present. - - .PARAMETER AvailabilityMode - Specifies the replica availability mode. Default is 'AsynchronousCommit'. - - .PARAMETER BackupPriority - Specifies the desired priority of the replicas in performing backups. The acceptable values for this parameter are integers from 0 through 100. Of the set of replicas which are online and available, the replica that has the highest priority performs the backup. Default is 50. - - .PARAMETER ConnectionModeInPrimaryRole - Specifies how the availability replica handles connections when in the primary role. - - .PARAMETER ConnectionModeInSecondaryRole - Specifies how the availability replica handles connections when in the secondary role. - - .PARAMETER EndpointHostName - Specifies the hostname or IP address of the availability group replica endpoint. Default is the instance network name which is set in the code because the value can only be determined when connected to the SQL Instance. - - .PARAMETER FailoverMode - Specifies the failover mode. Default is Manual. - - .PARAMETER ReadOnlyRoutingConnectionUrl - Specifies the fully-qualified domain name (FQDN) and port to use when routing to the replica for read only connections. - - .PARAMETER ReadOnlyRoutingList - Specifies an ordered list of replica server names that represent the probe sequence for connection director to use when redirecting read-only connections through this availability replica. This parameter applies if the availability replica is the current primary replica of the availability group. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - Param - ( - [Parameter(Mandatory = $true)] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [String] - $AvailabilityGroupName, - - [Parameter(Mandatory = $true)] - [String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [String] - $SQLInstanceName, - - [Parameter()] - [String] - $PrimaryReplicaSQLServer, - - [Parameter()] - [String] - $PrimaryReplicaSQLInstanceName, - - [Parameter()] - [ValidateSet('Present','Absent')] - [String] - $Ensure = 'Present', - - [Parameter()] - [ValidateSet('AsynchronousCommit','SynchronousCommit')] - [String] - $AvailabilityMode = 'AsynchronousCommit', - - [Parameter()] - [ValidateRange(0,100)] - [UInt32] - $BackupPriority = 50, - - [Parameter()] - [ValidateSet('AllowAllConnections','AllowReadWriteConnections')] - [String] - $ConnectionModeInPrimaryRole, - - [Parameter()] - [ValidateSet('AllowNoConnections','AllowReadIntentConnectionsOnly','AllowAllConnections')] - [String] - $ConnectionModeInSecondaryRole, - - [Parameter()] - [String] - $EndpointHostName, - - [Parameter()] - [ValidateSet('Automatic','Manual')] - [String] - $FailoverMode = 'Manual', - - [Parameter()] - [String] - $ReadOnlyRoutingConnectionUrl, - - [Parameter()] - [String[]] - $ReadOnlyRoutingList - ) - - $getTargetResourceParameters = @{ - SQLInstanceName = $SQLInstanceName - SQLServer = $SQLServer - Name = $Name - AvailabilityGroupName = $AvailabilityGroupName - } - - # Assume this will pass. We will determine otherwise later - $result = $true - - $getTargetResourceResult = Get-TargetResource @getTargetResourceParameters - - switch ($Ensure) - { - 'Absent' - { - if ( $getTargetResourceResult.Ensure -eq 'Absent' ) - { - $result = $true - } - else - { - $result = $false - } - } - - 'Present' - { - $parametersToCheck = @( - 'Name', - 'AvailabilityGroupName', - 'SQLServer', - 'SQLInstanceName', - 'Ensure', - 'AvailabilityMode', - 'BackupPriority', - 'ConnectionModeInPrimaryRole', - 'ConnectionModeInSecondaryRole', - 'FailoverMode', - 'ReadOnlyRoutingConnectionUrl', - 'ReadOnlyRoutingList' - ) - - if ( $getTargetResourceResult.Ensure -eq 'Present' ) - { - # PsBoundParameters won't work here because it doesn't account for default values - foreach ( $parameter in $MyInvocation.MyCommand.Parameters.GetEnumerator() ) - { - $parameterName = $parameter.Key - $parameterValue = Get-Variable -Name $parameterName -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Value - - # Make sure we don't try to validate a common parameter - if ( $parametersToCheck -contains $parameterName ) - { - # If the parameter is Null, a value wasn't provided - if ( -not [string]::IsNullOrEmpty($parameterValue) ) - { - if ( $getTargetResourceResult.($parameterName) -ne $parameterValue ) - { - New-VerboseMessage -Message "'$($parameterName)' should be '$($parameterValue)' but is '$($getTargetResourceResult.($parameterName))'" - - $result = $false - } - } - } - } - - # Get the Endpoint URL properties - $currentEndpointProtocol, $currentEndpointHostName, $currentEndpointPort = $getTargetResourceResult.EndpointUrl.Replace('//','').Split(':') - - if ( -not $EndpointHostName ) - { - $EndpointHostName = $getTargetResourceResult.SQLServerNetName - } - - # Verify the hostname in the endpoint URL is correct - if ( $EndpointHostName -ne $currentEndpointHostName ) - { - New-VerboseMessage -Message "'EndpointHostName' should be '$EndpointHostName' but is '$currentEndpointHostName'" - $result = $false - } - - # Verify the protocol in the endpoint URL is correct - if ( 'TCP' -ne $currentEndpointProtocol ) - { - New-VerboseMessage -Message "'EndpointProtocol' should be 'TCP' but is '$currentEndpointProtocol'" - $result = $false - } - - # Verify the port in the endpoint URL is correct - if ( $getTargetResourceResult.EndpointPort -ne $currentEndpointPort ) - { - New-VerboseMessage -Message "'EndpointPort' should be '$($getTargetResourceResult.EndpointPort)' but is '$currentEndpointPort'" - $result = $false - } - } - else - { - $result = $false - } - } - } - - return $result -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnAvailabilityGroupReplica/MSFT_xSQLServerAlwaysOnAvailabilityGroupReplica.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnAvailabilityGroupReplica/MSFT_xSQLServerAlwaysOnAvailabilityGroupReplica.schema.mof deleted file mode 100644 index 358c7d33..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnAvailabilityGroupReplica/MSFT_xSQLServerAlwaysOnAvailabilityGroupReplica.schema.mof +++ /dev/null @@ -1,20 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerAlwaysOnAvailabilityGroupReplica")] -class MSFT_xSQLServerAlwaysOnAvailabilityGroupReplica : OMI_BaseResource -{ - [Key, Description("The name of the availability group replica.")] String Name; - [Key, Description("The name of the availability group.")] String AvailabilityGroupName; - [Required, Description("Hostname of the SQL Server to be configured.")] String SQLServer; - [Key, Description("Name of the SQL instance to be configued.")] String SQLInstanceName; - [Write, Description("Hostname of the SQL Server where the primary replica is expected to be active. If the primary replica is not found here, the resource will attempt to find the host that holds the primary replica and connect to it.")] String PrimaryReplicaSQLServer; - [Write, Description("Name of the SQL instance where the primary replica lives.")] String PrimaryReplicaSQLInstanceName; - [Write, Description("Specifies if the availability group replica should be present or absent. Default is Present."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("Specifies the replica availability mode. Default is 'AsynchronousCommit'."), ValueMap{"AsynchronousCommit","SynchronousCommit"}, Values{"AsynchronousCommit","SynchronousCommit"}] String AvailabilityMode; - [Write, Description("Specifies the desired priority of the replicas in performing backups. The acceptable values for this parameter are: integers from 0 through 100. Of the set of replicas which are online and available, the replica that has the highest priority performs the backup. Default is 50.")] UInt32 BackupPriority; - [Write, Description("Specifies how the availability replica handles connections when in the primary role."), ValueMap{"AllowAllConnections","AllowReadWriteConnections"}, Values{"AllowAllConnections","AllowReadWriteConnections"}] String ConnectionModeInPrimaryRole; - [Write, Description("Specifies how the availability replica handles connections when in the secondary role."), ValueMap{"AllowNoConnections","AllowReadIntentConnectionsOnly","AllowAllConnections"}, Values{"AllowNoConnections","AllowReadIntentConnectionsOnly","AllowAllConnections"}] String ConnectionModeInSecondaryRole; - [Write, Description("Specifies the hostname or IP address of the availability group replica endpoint. Default is the instance network name which is set in the code because the value can only be determined when connected to the SQL Instance.")] String EndpointHostName; - [Write, Description("Specifies the failover mode. Default is 'Manual'."), ValueMap{"Automatic","Manual"}, Values{"Automatic","Manual"}] String FailoverMode; - [Write, Description("Specifies the fully-qualified domain name (FQDN) and port to use when routing to the replica for read only connections.")] String ReadOnlyRoutingConnectionUrl; - [Write, Description("Specifies an ordered list of replica server names that represent the probe sequence for connection director to use when redirecting read-only connections through this availability replica. This parameter applies if the availability replica is the current primary replica of the availability group.")] String ReadOnlyRoutingList[]; - [Read, Description("Output the NetName property from the SQL Server object. Used by Get-TargetResource")] String SqlServerNetName; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnService/MSFT_xSQLServerAlwaysOnService.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnService/MSFT_xSQLServerAlwaysOnService.psm1 deleted file mode 100644 index 85f07426..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnService/MSFT_xSQLServerAlwaysOnService.psm1 +++ /dev/null @@ -1,186 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path (Split-Path $PSScriptRoot -Parent) -Parent) ` - -ChildPath 'xSQLServerHelper.psm1') ` - -Force - -<# - .SYNOPSIS - Gets the current value of the SQL Server HADR property. - - .PARAMETER Ensure - *** Not used in this function *** - HADR is Present (enabled) or Absent (disabled). - - .PARAMETER SQLServer - Hostname of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - Name of the SQL instance to be configued. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure, - - [Parameter(Mandatory = $true)] - [System.String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [System.String] - $SQLInstanceName - ) - - $sql = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - New-VerboseMessage -Message ( 'SQL Always On is {0} on "{1}\{2}".' -f @{$false='disabled'; $true='enabled'}[$sql.IsHadrEnabled],$SQLServer,$SQLInstanceName ) - - return @{ IsHadrEnabled = $sql.IsHadrEnabled } -} - -<# - .SYNOPSIS - Sets the current value of the SQL Server HADR property. - - .PARAMETER Ensure - HADR is Present (enabled) or Absent (disabled). - - .PARAMETER SQLServer - Hostname of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - Name of the SQL instance to be configued. - - .PARAMETER RestartTimeout - The length of time, in seconds, to wait for the service to restart. Default is 120 seconds. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure, - - [Parameter(Mandatory = $true)] - [System.String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [System.String] - $SQLInstanceName, - - [Parameter()] - [Int32] - $RestartTimeout = 120 - ) - - # Build the instance name to allow the Enable/Disable-AlwaysOn to connect to the instance - if($SQLInstanceName -eq "MSSQLSERVER") - { - $serverInstance = $SQLServer - } - else - { - $serverInstance = "$SQLServer\$SQLInstanceName" - } - - Import-SQLPSModule - - switch ($Ensure) - { - 'Absent' - { - # Disable Always On without restarting the services. - New-VerboseMessage -Message "Disabling Always On for the instance $serverInstance" - Disable-SqlAlwaysOn -ServerInstance $serverInstance -NoServiceRestart - } - 'Present' - { - # Enable Always On without restarting the services. - New-VerboseMessage -Message "Enabling Always On for the instance $serverInstance" - Enable-SqlAlwaysOn -ServerInstance $serverInstance -NoServiceRestart - } - } - - New-VerboseMessage -Message ( 'SQL Always On has been {0} on "{1}\{2}". Restarting the service.' -f @{Absent='disabled'; Present='enabled'}[$Ensure],$SQLServer,$SQLInstanceName ) - - # Now restart the SQL service so that all dependent services are also returned to their previous state - Restart-SqlService -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName -Timeout $RestartTimeout - - # Verify always on was set - if( -not ( Test-TargetResource @PSBoundParameters ) ) - { - throw New-TerminatingError -ErrorType AlterAlwaysOnServiceFailed -FormatArgs $Ensure,$serverInstance -ErrorCategory InvalidResult - } -} - -<# - .SYNOPSIS - Determines whether the current value of the SQL Server HADR property is properly set. - - .PARAMETER Ensure - HADR is Present (enabled) or Absent (disabled). - - .PARAMETER SQLServer - Hostname of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - Name of the SQL instance to be configued. - - .PARAMETER RestartTimeout - *** Not used in this function *** - The length of time, in seconds, to wait for the service to restart. Default is 120 seconds. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure, - - [Parameter(Mandatory = $true)] - [System.String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [System.String] - $SQLInstanceName, - - [Parameter()] - [Int32] - $RestartTimeout = 120 - ) - - # Determine the current state of Always On - $params = @{ - Ensure = $Ensure - SQLServer = $SQLServer - SQLInstanceName = $SQLInstanceName - } - - $state = Get-TargetResource @params - - # Determine what the desired state of Always On is - $hadrDesiredState = @{ 'Present' = $true; 'Absent' = $false }[$Ensure] - - # Determine whether the value matches the desired state - $desiredStateMet = $state.IsHadrEnabled -eq $hadrDesiredState - - New-VerboseMessage -Message ( 'SQL Always On is in the desired state for "{0}\{1}": {2}.' -f $SQLServer,$SQLInstanceName,$desiredStateMet ) - - return $desiredStateMet -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnService/MSFT_xSQLServerAlwaysOnService.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnService/MSFT_xSQLServerAlwaysOnService.schema.mof deleted file mode 100644 index 083ef2a0..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAlwaysOnService/MSFT_xSQLServerAlwaysOnService.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerAlwaysOnService")] -class MSFT_xSQLServerAlwaysOnService : OMI_BaseResource -{ - [Required, Description("HADR is Present (enabled) or Absent (disabled)"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Key, Description("The hostname of the SQL Server to be configured")] String SQLServer; - [Key, Description("Name of the SQL instance to be configured.")] String SQLInstanceName; - [Write, Description("The length of time, in seconds, to wait for the service to restart. Default is 120 seconds.")] Sint32 RestartTimeout; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAvailabilityGroupListener/MSFT_xSQLServerAvailabilityGroupListener.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAvailabilityGroupListener/MSFT_xSQLServerAvailabilityGroupListener.psm1 deleted file mode 100644 index 87933a80..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAvailabilityGroupListener/MSFT_xSQLServerAvailabilityGroupListener.psm1 +++ /dev/null @@ -1,494 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path (Split-Path $PSScriptRoot -Parent) -Parent) ` - -ChildPath 'xSQLServerHelper.psm1') ` - -Force -<# - .SYNOPSIS - Returns the current state of the Availabilty Group listener. - - .PARAMETER InstanceName - The SQL Server instance name of the primary replica. Default value is 'MSSQLSERVER'. - - .PARAMETER NodeName - The host name or FQDN of the primary replica. - - .PARAMETER Name - The name of the availability group listener, max 15 characters. This name will be used as the Virtual Computer Object (VCO). - - .PARAMETER AvailabilityGroup - The name of the availability group to which the availability group listener is or will be connected. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [Parameter(Mandatory = $true)] - [System.String] - $NodeName, - - [Parameter(Mandatory = $true)] - [ValidateLength(1,15)] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [System.String] - $AvailabilityGroup - ) - - try - { - $availabilityGroupListener = Get-SQLAlwaysOnAvailabilityGroupListener -Name $Name -AvailabilityGroup $AvailabilityGroup -NodeName $NodeName -InstanceName $InstanceName - - if ($null -ne $availabilityGroupListener) - { - New-VerboseMessage -Message "Listener $Name exist." - - $ensure = 'Present' - $port = [uint16]( $availabilityGroupListener | Select-Object -ExpandProperty PortNumber ) - - $presentIpAddress = $availabilityGroupListener.AvailabilityGroupListenerIPAddresses - $dhcp = [bool]( $presentIpAddress | Select-Object -First 1 -ExpandProperty IsDHCP ) - - $ipAddress = @() - foreach ($currentIpAddress in $presentIpAddress) - { - $ipAddress += "$($currentIpAddress.IPAddress)/$($currentIpAddress.SubnetMask)" - } - } - else - { - New-VerboseMessage -Message "Listener $Name does not exist" - - $ensure = 'Absent' - $port = 0 - $dhcp = $false - $ipAddress = $null - } - } - catch - { - throw New-TerminatingError -ErrorType AvailabilityGroupListenerNotFound -FormatArgs @($Name) -ErrorCategory ObjectNotFound -InnerException $_.Exception - } - - return @{ - InstanceName = [System.String] $InstanceName - NodeName = [System.String] $NodeName - Name = [System.String] $Name - Ensure = [System.String] $ensure - AvailabilityGroup = [System.String] $AvailabilityGroup - IpAddress = [System.String[]] $ipAddress - Port = [System.UInt16] $port - DHCP = [System.Boolean] $dhcp - } -} - -<# - .SYNOPSIS - Creates the Availability Group listener. - - .PARAMETER InstanceName - The SQL Server instance name of the primary replica. Default value is 'MSSQLSERVER'. - - .PARAMETER NodeName - The host name or FQDN of the primary replica. - - .PARAMETER Name - The name of the availability group listener, max 15 characters. This name will be used as the Virtual Computer Object (VCO). - - .PARAMETER Ensure - If the availability group listener should be present or absent. - - .PARAMETER AvailabilityGroup - The name of the availability group to which the availability group listener is or will be connected. - - .PARAMETER IpAddress - The IP address used for the availability group listener, in the format 192.168.10.45/255.255.252.0. If using DCHP, set to the first IP-address of the DHCP subnet, in the format 192.168.8.1/255.255.252.0. Must be valid in the cluster-allowed IP range. - - .PARAMETER Port - The port used for the availability group listener. - - .PARAMETER DHCP - If DHCP should be used for the availability group listener instead of static IP address. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [Parameter(Mandatory = $true)] - [System.String] - $NodeName, - - [Parameter(Mandatory = $true)] - [ValidateLength(1,15)] - [System.String] - $Name, - - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present', - - [Parameter(Mandatory = $true)] - [System.String] - $AvailabilityGroup, - - [System.String[]] - $IpAddress, - - [System.UInt16] - $Port, - - [System.Boolean] - $DHCP - ) - - $parameters = @{ - InstanceName = [System.String] $InstanceName - NodeName = [System.String] $NodeName - Name = [System.String] $Name - AvailabilityGroup = [System.String] $AvailabilityGroup - } - - $availabilityGroupListenerState = Get-TargetResource @parameters - if ($null -ne $availabilityGroupListenerState) - { - if ($Ensure -ne '' -and $availabilityGroupListenerState.Ensure -ne $Ensure) - { - if ($Ensure -eq 'Present') - { - New-VerboseMessage -Message "Create listener on $AvailabilityGroup" - - $sqlServerObject = Connect-SQL -SQLServer $NodeName -SQLInstanceName $InstanceName - - $availabilityGroupObject = $sqlServerObject.AvailabilityGroups[$AvailabilityGroup] - if ($availabilityGroupObject) - { - $newListenerParams = @{ - Name = $Name - InputObject = $availabilityGroupObject - } - - if ($Port) - { - New-VerboseMessage -Message "Listener port set to $Port" - $newListenerParams += @{ - Port = $Port - } - } - - if ($DHCP -and $IpAddress.Count -gt 0) - { - New-VerboseMessage -Message "Listener set to DHCP with subnet $IpAddress" - $newListenerParams += @{ - DhcpSubnet = [string]$IpAddress - } - } - elseif (-not $DHCP -and $IpAddress.Count -gt 0) - { - New-VerboseMessage -Message "Listener set to static IP-address(es); $($IpAddress -join ', ')" - $newListenerParams += @{ - StaticIp = $IpAddress - } - } - else - { - New-VerboseMessage -Message 'Listener using DHCP with server default subnet' - } - - New-SqlAvailabilityGroupListener @newListenerParams -ErrorAction Stop | Out-Null - } - else - { - throw New-TerminatingError -ErrorType AvailabilityGroupNotFound -FormatArgs @($AvailabilityGroup,$InstanceName) -ErrorCategory ObjectNotFound - } - } - else - { - New-VerboseMessage -Message "Remove listener from $AvailabilityGroup" - - $sqlServerObject = Connect-SQL -SQLServer $NodeName -SQLInstanceName $InstanceName - - $availabilityGroupObject = $sqlServerObject.AvailabilityGroups[$AvailabilityGroup] - if ($availabilityGroupObject) - { - $availabilityGroupListenerObject = $availabilityGroupObject.AvailabilityGroupListeners[$Name] - if ($availabilityGroupListenerObject) - { - $availabilityGroupListenerObject.Drop() - } - else - { - throw New-TerminatingError -ErrorType AvailabilityGroupListenerNotFound -ErrorCategory ObjectNotFound - } - } - else - { - throw New-TerminatingError -ErrorType AvailabilityGroupNotFound -FormatArgs @($AvailabilityGroup,$InstanceName) -ErrorCategory ObjectNotFound - } - } - } - else - { - if ($Ensure -ne '') - { - New-VerboseMessage -Message "State is already $Ensure" - } - - if ($availabilityGroupListenerState.Ensure -eq 'Present') - { - if (-not $DHCP -and $availabilityGroupListenerState.IpAddress.Count -lt $IpAddress.Count) # Only able to add a new IP-address, not change existing ones. - { - New-VerboseMessage -Message 'Found at least one new IP-address.' - $ipAddressEqual = $false - } - else - { - # No new IP-address - if ($null -eq $IpAddress -or -not ( Compare-Object -ReferenceObject $IpAddress -DifferenceObject $availabilityGroupListenerState.IpAddress)) - { - $ipAddressEqual = $true - } - else - { - throw New-TerminatingError -ErrorType AvailabilityGroupListenerIPChangeError -FormatArgs @($($IpAddress -join ', '),$($availabilityGroupListenerState.IpAddress -join ', ')) -ErrorCategory InvalidOperation - } - } - - if ($($PSBoundParameters.ContainsKey('DHCP')) -and $availabilityGroupListenerState.DHCP -ne $DHCP) - { - throw New-TerminatingError -ErrorType AvailabilityGroupListenerDHCPChangeError -FormatArgs @( $DHCP, $($availabilityGroupListenerState.DHCP) ) -ErrorCategory InvalidOperation - } - - $sqlServerObject = Connect-SQL -SQLServer $NodeName -SQLInstanceName $InstanceName - - $availabilityGroupObject = $sqlServerObject.AvailabilityGroups[$AvailabilityGroup] - if ($availabilityGroupObject) - { - $availabilityGroupListenerObject = $availabilityGroupObject.AvailabilityGroupListeners[$Name] - if ($availabilityGroupListenerObject) - { - if ($availabilityGroupListenerState.Port -ne $Port -or -not $ipAddressEqual) - { - New-VerboseMessage -Message 'Listener differ in configuration.' - - if ($availabilityGroupListenerState.Port -ne $Port) - { - New-VerboseMessage -Message 'Changing port configuration' - - $setListenerParams = @{ - InputObject = $availabilityGroupListenerObject - Port = $Port - } - - Set-SqlAvailabilityGroupListener @setListenerParams -ErrorAction Stop | Out-Null - } - - if (-not $ipAddressEqual) - { - New-VerboseMessage -Message 'Adding IP-address(es)' - - $newIpAddress = @() - - foreach ($currentIpAddress in $IpAddress) - { - if (-not ( $availabilityGroupListenerState.IpAddress -contains $currentIpAddress)) - { - $newIpAddress += $currentIpAddress - } - } - - $setListenerParams = @{ - InputObject = $availabilityGroupListenerObject - StaticIp = $newIpAddress - } - - Add-SqlAvailabilityGroupListenerStaticIp @setListenerParams -ErrorAction Stop | Out-Null - } - } - else - { - New-VerboseMessage -Message 'Listener configuration is already correct.' - } - } - else - { - throw New-TerminatingError -ErrorType AvailabilityGroupListenerNotFound -ErrorCategory ObjectNotFound - } - } - else - { - throw New-TerminatingError -ErrorType AvailabilityGroupNotFound -FormatArgs @($AvailabilityGroup,$InstanceName) -ErrorCategory ObjectNotFound - } - } - } - } - else - { - throw New-TerminatingError -ErrorType UnexpectedErrorFromGet -ErrorCategory InvalidResult - } -} - -<# - .SYNOPSIS - Tests if the the Availability Group listener is in desired state. - - .PARAMETER InstanceName - The SQL Server instance name of the primary replica. Default value is 'MSSQLSERVER'. - - .PARAMETER NodeName - The host name or FQDN of the primary replica. - - .PARAMETER Name - The name of the availability group listener, max 15 characters. This name will be used as the Virtual Computer Object (VCO). - - .PARAMETER Ensure - If the availability group listener should be present or absent. - - .PARAMETER AvailabilityGroup - The name of the availability group to which the availability group listener is or will be connected. - - .PARAMETER IpAddress - The IP address used for the availability group listener, in the format 192.168.10.45/255.255.252.0. If using DCHP, set to the first IP-address of the DHCP subnet, in the format 192.168.8.1/255.255.252.0. Must be valid in the cluster-allowed IP range. - - .PARAMETER Port - The port used for the availability group listener. - - .PARAMETER DHCP - If DHCP should be used for the availability group listener instead of static IP address. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [Parameter(Mandatory = $true)] - [System.String] - $NodeName, - - [Parameter(Mandatory = $true)] - [ValidateLength(1,15)] - [System.String] - $Name, - - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present', - - [Parameter(Mandatory = $true)] - [System.String] - $AvailabilityGroup, - - [System.String[]] - $IpAddress, - - [System.UInt16] - $Port, - - [System.Boolean] - $DHCP - ) - - $parameters = @{ - InstanceName = [System.String] $InstanceName - NodeName = [System.String] $NodeName - Name = [System.String] $Name - AvailabilityGroup = [System.String] $AvailabilityGroup - } - - New-VerboseMessage -Message "Testing state of listener $Name" - - $availabilityGroupListenerState = Get-TargetResource @parameters - if ($null -ne $availabilityGroupListenerState) - { - if ($null -eq $IpAddress -or ($null -ne $availabilityGroupListenerState.IpAddress -and -not ( Compare-Object -ReferenceObject $IpAddress -DifferenceObject $availabilityGroupListenerState.IpAddress))) - { - $ipAddressEqual = $true - } - else - { - $ipAddressEqual = $false - } - - [System.Boolean] $result = $false - if ($availabilityGroupListenerState.Ensure -eq $Ensure) - { - if ($Ensure -eq 'Absent') - { - $result = $true - } - } - - if (-not $($PSBoundParameters.ContainsKey('Ensure')) -or $Ensure -eq 'Present') - { - if (($Port -eq "" -or $availabilityGroupListenerState.Port -eq $Port) -and - $ipAddressEqual -and - (-not $($PSBoundParameters.ContainsKey('DHCP')) -or $availabilityGroupListenerState.DHCP -eq $DHCP)) - { - $result = $true - } - } - } - else - { - throw New-TerminatingError -ErrorType UnexpectedErrorFromGet -ErrorCategory InvalidResult - } - - return $result -} - -function Get-SQLAlwaysOnAvailabilityGroupListener -{ - [CmdletBinding()] - [OutputType()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [System.String] - $AvailabilityGroup, - - [Parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [Parameter(Mandatory = $true)] - [System.String] - $NodeName - ) - - Write-Debug "Connecting to availability group $Name as $([System.Security.Principal.WindowsIdentity]::GetCurrent().Name)" - - $sqlServerObject = Connect-SQL -SQLServer $NodeName -SQLInstanceName $InstanceName - - $availabilityGroupObject = $sqlServerObject.AvailabilityGroups[$AvailabilityGroup] - if ($availabilityGroupObject) - { - $availabilityGroupListener = $availabilityGroupObject.AvailabilityGroupListeners[$Name] - } - else - { - throw New-TerminatingError -ErrorType AvailabilityGroupNotFound -FormatArgs @($AvailabilityGroup,$InstanceName) -ErrorCategory ObjectNotFound - } - - return $availabilityGroupListener -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAvailabilityGroupListener/MSFT_xSQLServerAvailabilityGroupListener.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAvailabilityGroupListener/MSFT_xSQLServerAvailabilityGroupListener.schema.mof deleted file mode 100644 index 41b7db59..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerAvailabilityGroupListener/MSFT_xSQLServerAvailabilityGroupListener.schema.mof +++ /dev/null @@ -1,14 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerAvailabilityGroupListener")] -class MSFT_xSQLServerAvailabilityGroupListener : OMI_BaseResource -{ - [Key, Description("The SQL Server instance name of the primary replica.")] String InstanceName; - [Required, Description("The host name or FQDN of the primary replica.")] String NodeName; - [Required, Description("The name of the availability group listener, max 15 characters. This name will be used as the Virtual Computer Object (VCO).")] String Name; - [Write, Description("If the availability group listener should be present or absent. Default value is 'Present'."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Key, Description("The name of the availability group to which the availability group listener is or will be connected.")] String AvailabilityGroup; - [Write, Description("The IP address used for the availability group listener, in the format 192.168.10.45/255.255.252.0. If using DCHP, set to the first IP-address of the DHCP subnet, in the format 192.168.8.1/255.255.252.0. Must be valid in the cluster-allowed IP range.")] String IpAddress[]; - [Write, Description("The port used for the availability group listener")] UInt16 Port; - [Write, Description("If DHCP should be used for the availability group listener instead of static IP address.")] Boolean DHCP; -}; - diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerConfiguration/MSFT_xSQLServerConfiguration.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerConfiguration/MSFT_xSQLServerConfiguration.psm1 deleted file mode 100644 index 4a646724..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerConfiguration/MSFT_xSQLServerConfiguration.psm1 +++ /dev/null @@ -1,213 +0,0 @@ -# Load Common Code -Import-Module -Name (Join-Path -Path (Split-Path (Split-Path $PSScriptRoot -Parent) -Parent) ` - -ChildPath 'xSQLServerHelper.psm1') ` - -Force -<# - .SYNOPSIS - Gets the current value of a SQL configuration option - - .PARAMETER SQLServer - Hostname of the SQL Server to be configured - - .PARAMETER SQLInstanceName - Name of the SQL instance to be configued. Default is 'MSSQLSERVER' - - .PARAMETER OptionName - The name of the SQL configuration option to be checked - - .PARAMETER OptionValue - The desired value of the SQL configuration option - - .PARAMETER RestartService - *** Not used in this function *** - Determines whether the instance should be restarted after updating the configuration option. - - .PARAMETER RestartTimeout - *** Not used in this function *** - The length of time, in seconds, to wait for the service to restart. Default is 120 seconds. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([Hashtable])] - param( - [Parameter(Mandatory = $true)] - [String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [String] - $SQLInstanceName, - - [Parameter(Mandatory = $true)] - [String] - $OptionName, - - [Parameter(Mandatory = $true)] - [Int32] - $OptionValue, - - [Boolean] - $RestartService = $false, - - [Int32] - $RestartTimeout = 120 - ) - - $sql = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - ## get the configuration option - $option = $sql.Configuration.Properties | Where-Object { $_.DisplayName -eq $OptionName } - - if(!$option) - { - throw New-TerminatingError -ErrorType "ConfigurationOptionNotFound" -FormatArgs $OptionName -ErrorCategory InvalidArgument - } - - return @{ - SqlServer = $SQLServer - SQLInstanceName = $SQLInstanceName - OptionName = $option.DisplayName - OptionValue = $option.ConfigValue - RestartService = $RestartService - RestartTimeout = $RestartTimeout - } -} - -<# - .SYNOPSIS - Sets the value of a SQL configuration option - - .PARAMETER SQLServer - Hostname of the SQL Server to be configured - - .PARAMETER SQLInstanceName - Name of the SQL instance to be configued. Default is 'MSSQLSERVER' - - .PARAMETER OptionName - The name of the SQL configuration option to be set - - .PARAMETER OptionValue - The desired value of the SQL configuration option - - .PARAMETER RestartService - Determines whether the instance should be restarted after updating the configuration option - - .PARAMETER RestartTimeout - The length of time, in seconds, to wait for the service to restart. Default is 120 seconds. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [String] - $SQLInstanceName, - - [Parameter(Mandatory = $true)] - [String] - $OptionName, - - [Parameter(Mandatory = $true)] - [Int32] - $OptionValue, - - [Boolean] - $RestartService = $false, - - [Int32] - $RestartTimeout = 120 - ) - - $sql = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - ## get the configuration option - $option = $sql.Configuration.Properties | Where-Object { $_.DisplayName -eq $OptionName } - - if(!$option) - { - throw New-TerminatingError -ErrorType "ConfigurationOptionNotFound" -FormatArgs $OptionName -ErrorCategory InvalidArgument - } - - $option.ConfigValue = $OptionValue - $sql.Configuration.Alter() - - if ($option.IsDynamic -eq $true) - { - New-VerboseMessage -Message 'Configuration option has been updated.' - } - elseif (($option.IsDynamic -eq $false) -and ($RestartService -eq $true)) - { - New-VerboseMessage -Message 'Configuration option has been updated, restarting instance...' - Restart-SqlService -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName -Timeout $RestartTimeout - } - else - { - New-WarningMessage -WarningType 'ConfigurationRestartRequired' -FormatArgs $OptionName - } -} - -<# - .SYNOPSIS - Determines whether a SQL configuration option value is properly set - - .PARAMETER SQLServer - Hostname of the SQL Server to be configured - - .PARAMETER SQLInstanceName - Name of the SQL instance to be configued. Default is 'MSSQLSERVER' - - .PARAMETER OptionName - The name of the SQL configuration option to be tested - - .PARAMETER OptionValue - The desired value of the SQL configuration option - - .PARAMETER RestartService - *** Not used in this function *** - Determines whether the instance should be restarted after updating the configuration option - - .PARAMETER RestartTimeout - *** Not used in this function *** - The length of time, in seconds, to wait for the service to restart. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([Boolean])] - param( - [Parameter(Mandatory = $true)] - [String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [String] - $SQLInstanceName, - - [Parameter(Mandatory = $true)] - [String] - $OptionName, - - [Parameter(Mandatory = $true)] - [Int32] - $OptionValue, - - [Boolean] - $RestartService = $false, - - [Int32] - $RestartTimeout = 120 - ) - - ## Get the current state of the configuration item - $state = Get-TargetResource @PSBoundParameters - - ## return whether the value matches the desired state - return ($state.OptionValue -eq $OptionValue) -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerConfiguration/MSFT_xSQLServerConfiguration.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerConfiguration/MSFT_xSQLServerConfiguration.schema.mof deleted file mode 100644 index e90976a7..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerConfiguration/MSFT_xSQLServerConfiguration.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerConfiguration")] -class MSFT_xSQLServerConfiguration : OMI_BaseResource -{ - [Key, Description("The hostname of the SQL Server to be configured.")] String SQLServer; - [Key, Description("Name of the SQL instance to be configured.")] String SQLInstanceName; - [Key, Description("The name of the SQL configuration option to be checked.")] String OptionName; - [Required, Description("The desired value of the SQL configuration option.")] Sint32 OptionValue; - [Write, Description("Determines whether the instance should be restarted after updating the configuration option.")] Boolean RestartService; - [Write, Description("The length of time, in seconds, to wait for the service to restart. Default is 120 seconds.")] Sint32 RestartTimeout; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabase/MSFT_xSQLServerDatabase.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabase/MSFT_xSQLServerDatabase.psm1 deleted file mode 100644 index ca523ffb..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabase/MSFT_xSQLServerDatabase.psm1 +++ /dev/null @@ -1,245 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path (Split-Path $PSScriptRoot -Parent) -Parent) ` - -ChildPath 'xSQLServerHelper.psm1') ` - -Force -<# - .SYNOPSIS - This function gets the sql database. - - .PARAMETER Ensure - When set to 'Present', the database will be created. - When set to 'Absent', the database will be dropped. - - .PARAMETER Name - The name of database to be created or dropped. - - .PARAMETER SQLServer - The host name of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - The name of the SQL instance to be configured. -#> - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter()] - [ValidateSet('Present','Absent')] - [ValidateNotNullOrEmpty()] - [System.String] - $Ensure = 'Present', - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLInstanceName - ) - - $sqlServerObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - if ($sqlServerObject) - { - Write-Verbose -Message 'Getting SQL Databases' - # Check database exists - $sqlDatabaseObject = $sqlServerObject.Databases[$Name] - - if ($sqlDatabaseObject) - { - Write-Verbose -Message "SQL Database name $Name is present" - $Ensure = 'Present' - } - else - { - Write-Verbose -Message "SQL Database name $Name is absent" - $Ensure = 'Absent' - } - } - - $returnValue = @{ - Name = $Name - Ensure = $Ensure - SQLServer = $SQLServer - SQLInstanceName = $SQLInstanceName - } - - $returnValue -} - -<# - .SYNOPSIS - This function create or delete a database in the SQL Server instance provided. - - .PARAMETER Ensure - When set to 'Present', the database will be created. - When set to 'Absent', the database will be dropped. - - .PARAMETER Name - The name of database to be created or dropped. - - .PARAMETER SQLServer - The host name of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - The name of the SQL instance to be configured. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter()] - [ValidateSet('Present','Absent')] - [ValidateNotNullOrEmpty()] - [System.String] - $Ensure = 'Present', - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLInstanceName - ) - - $sqlServerObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - if ($sqlServerObject) - { - if ($Ensure -eq 'Present') - { - try - { - $sqlDatabaseObjectToCreate = New-Object -TypeName Microsoft.SqlServer.Management.Smo.Database -ArgumentList $sqlServerObject,$Name - if ($sqlDatabaseObjectToCreate) - { - Write-Verbose -Message "Adding to SQL the database $Name" - $sqlDatabaseObjectToCreate.Create() - New-VerboseMessage -Message "Created Database $Name" - } - } - catch - { - throw New-TerminatingError -ErrorType CreateDatabaseSetError ` - -FormatArgs @($SQLServer,$SQLInstanceName,$Name) ` - -ErrorCategory InvalidOperation ` - -InnerException $_.Exception - } - } - else - { - try - { - $sqlDatabaseObjectToDrop = $sqlServerObject.Databases[$Name] - if ($sqlDatabaseObjectToDrop) - { - Write-Verbose -Message "Deleting to SQL the database $Name" - $sqlDatabaseObjectToDrop.Drop() - New-VerboseMessage -Message "Dropped Database $Name" - } - } - catch - { - throw New-TerminatingError -ErrorType DropDatabaseSetError ` - -FormatArgs @($SQLServer,$SQLInstanceName,$Name) ` - -ErrorCategory InvalidOperation ` - -InnerException $_.Exception - } - } - } -} - -<# - .SYNOPSIS - This function tests if the sql database is already created or dropped. - - .PARAMETER Ensure - When set to 'Present', the database will be created. - When set to 'Absent', the database will be dropped. - - .PARAMETER Name - The name of database to be created or dropped. - - .PARAMETER SQLServer - The host name of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - The name of the SQL instance to be configured. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter()] - [ValidateSet('Present','Absent')] - [ValidateNotNullOrEmpty()] - [System.String] - $Ensure = 'Present', - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLInstanceName - ) - - Write-Verbose -Message "Checking if database named $Name is present or absent" - - $getTargetResourceResult = Get-TargetResource @PSBoundParameters - $isDatabaseInDesiredState = $true - - switch ($Ensure) - { - 'Absent' - { - if ($getTargetResourceResult.Ensure -ne 'Absent') - { - New-VerboseMessage -Message "Ensure is set to Absent. The database $Name should be dropped" - $isDatabaseInDesiredState = $false - } - } - - 'Present' - { - if ($getTargetResourceResult.Ensure -ne 'Present') - { - New-VerboseMessage -Message "Ensure is set to Present. The database $Name should be created" - $isDatabaseInDesiredState = $false - } - } - } - - $isDatabaseInDesiredState -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabase/MSFT_xSQLServerDatabase.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabase/MSFT_xSQLServerDatabase.schema.mof deleted file mode 100644 index 442e02a0..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabase/MSFT_xSQLServerDatabase.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerDatabase")] -class MSFT_xSQLServerDatabase : OMI_BaseResource -{ - [Key, Description("The name of the SQL database.")] String Name; - [Write, Description("An enumerated value that describes if the database is added (Present) or dropped (Absent). Valid values are 'Present' or 'Absent'. Default Value is 'Present'."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Key, Description("The host name of the SQL Server to be configured.")] String SQLServer; - [Key, Description("The name of the SQL instance to be configured.")] String SQLInstanceName; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseOwner/MSFT_xSQLServerDatabaseOwner.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseOwner/MSFT_xSQLServerDatabaseOwner.psm1 deleted file mode 100644 index db4a63ed..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseOwner/MSFT_xSQLServerDatabaseOwner.psm1 +++ /dev/null @@ -1,208 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path (Split-Path $PSScriptRoot -Parent) -Parent) ` - -ChildPath 'xSQLServerHelper.psm1') ` - -Force -<# - .SYNOPSIS - This function gets the owner of the desired sql database. - - .PARAMETER Database - The name of database to be configured. - - .PARAMETER Name - The name of the login that will become a owner of the desired sql database. - - .PARAMETER SQLServer - The host name of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - The name of the SQL instance to be configured. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Database, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLServer = $env:COMPUTERNAME, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLInstanceName = 'MSSQLSERVER' - ) - - Write-Verbose -Message "Getting owner of database $Database" - $sqlServerObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - if ($sqlServerObject) - { - # Check database exists - if ( -not ($sqlDatabaseObject = $sqlServerObject.Databases[$Database]) ) - { - throw New-TerminatingError -ErrorType NoDatabase ` - -FormatArgs @($Database, $SQLServer, $SQLInstanceName) ` - -ErrorCategory ObjectNotFound - } - - try - { - $sqlDatabaseOwner = $sqlDatabaseObject.Owner - New-VerboseMessage -Message "Owner for SQL Database name $Database is $sqlDatabaseOwner" - } - catch - { - throw New-TerminatingError -ErrorType FailedToGetOwnerDatabase ` - -FormatArgs @($Database, $SQLServer, $SQLInstanceName) ` - -ErrorCategory InvalidOperation - } - } - - $returnValue = @{ - Database = $Database - Name = $sqlDatabaseOwner - SQLServer = $SQLServer - SQLInstanceName = $SQLInstanceName - } - - $returnValue -} - -<# - .SYNOPSIS - This function sets the owner of the desired sql database. - - .PARAMETER Database - The name of database to be configured. - - .PARAMETER Name - The name of the login that will become a owner of the desired sql database. - - .PARAMETER SQLServer - The host name of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - The name of the SQL instance to be configured. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Database, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLServer = $env:COMPUTERNAME, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLInstanceName = 'MSSQLSERVER' - ) - - Write-Verbose -Message "Setting owner $Name of database $Database" - $sqlServerObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - if($sqlServerObject) - { - # Check database exists - if ( -not ($sqlDatabaseObject = $sqlServerObject.Databases[$Database]) ) - { - throw New-TerminatingError -ErrorType NoDatabase -FormatArgs @($Database, $SQLServer, $SQLInstanceName) -ErrorCategory ObjectNotFound - } - - # Check login exists - if ( -not ($sqlServerObject.Logins[$Name]) ) - { - throw New-TerminatingError -ErrorType LoginNotFound -FormatArgs @($Name, $SQLServer, $SQLInstanceName) -ErrorCategory ObjectNotFound - } - - try - { - $sqlDatabaseObject.SetOwner($Name) - New-VerboseMessage -Message "Owner of SQL Database name $Database is now $Name" - } - catch - { - throw New-TerminatingError -ErrorType FailedToSetOwnerDatabase ` - -FormatArgs @($Name, $Database, $SQLServer, $SQLInstanceName) ` - -ErrorCategory InvalidOperation ` - -InnerException $_.Exception - } - } -} - -<# - .SYNOPSIS - This function tests the owner of the desired sql database. - - .PARAMETER Database - The name of database to be configured. - - .PARAMETER Name - The name of the login that will become a owner of the desired sql database. - - .PARAMETER SQLServer - The host name of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - The name of the SQL instance to be configured. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Database, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLServer = $env:COMPUTERNAME, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLInstanceName = 'MSSQLSERVER' - ) - - Write-Verbose -Message "Testing owner $Name of database $Database" - - $currentValues = Get-TargetResource @PSBoundParameters - return Test-SQLDscParameterState -CurrentValues $CurrentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @('Name', 'Database') -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseOwner/MSFT_xSQLServerDatabaseOwner.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseOwner/MSFT_xSQLServerDatabaseOwner.schema.mof deleted file mode 100644 index 552d2262..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseOwner/MSFT_xSQLServerDatabaseOwner.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerDatabaseOwner")] -class MSFT_xSQLServerDatabaseOwner : OMI_BaseResource -{ - [Key, Description("The name of database to be configured.")] String Database; - [Required, Description("The name of the login that will become a owner of the desired sql database.")] String Name; - [Write, Description("The host name of the SQL Server to be configured.")] String SQLServer; - [Write, Description("The name of the SQL instance to be configured.")] String SQLInstanceName; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabasePermission/MSFT_xSQLServerDatabasePermission.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabasePermission/MSFT_xSQLServerDatabasePermission.psm1 deleted file mode 100644 index f0614f32..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabasePermission/MSFT_xSQLServerDatabasePermission.psm1 +++ /dev/null @@ -1,278 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path (Split-Path $PSScriptRoot -Parent) -Parent) -ChildPath 'xSQLServerHelper.psm1') -Force - -<# - .SYNOPSIS - Returns the current permissions for the user in the database - - .PARAMETER Ensure - This is The Ensure if the permission should be granted (Present) or revoked (Absent) - Not used in Get-TargetResource - - .PARAMETER Database - This is the SQL database - - .PARAMETER Name - This is the name of the SQL login for the permission set - - .PARAMETER PermissionState - This is the state of permission set. Valid values are 'Grant' or 'Deny' - - .PARAMETER Permissions - This is a list that represents a SQL Server set of database permissions - - .PARAMETER SQLServer - This is the SQL Server for the database - - .PARAMETER SQLInstanceName - This is the SQL instance for the database -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [ValidateSet('Present','Absent')] - [System.String] - $Ensure, - - [parameter(Mandatory = $true)] - [System.String] - $Database, - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [ValidateSet('Grant','Deny')] - [System.String] - $PermissionState, - - [parameter(Mandatory = $true)] - [System.String[]] - $Permissions, - - [parameter(Mandatory = $true)] - [System.String] - $SQLServer = $env:COMPUTERNAME, - - [parameter(Mandatory = $true)] - [System.String] - $SQLInstanceName = 'MSSQLSERVER' - ) - - $sqlServerObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - if ($sqlServerObject) - { - Write-Verbose -Message "Getting permissions for user '$Name' in database '$Database'" - $getSqlDatabasePermissionResult = Get-SqlDatabasePermission -SqlServerObject $sqlServerObject ` - -Name $Name ` - -Database $Database ` - -PermissionState $PermissionState - - if ($getSqlDatabasePermissionResult) - { - $resultOfPermissionCompare = Compare-Object -ReferenceObject $Permissions ` - -DifferenceObject $getSqlDatabasePermissionResult - if ($null -eq $resultOfPermissionCompare) - { - $Ensure = 'Present' - } - else - { - $Ensure = 'Absent' - } - } - else - { - $Ensure = 'Absent' - } - } - else - { - throw New-TerminatingError -ErrorType ConnectSQLError ` - -FormatArgs @($SQLServer,$SQLInstanceName) ` - -ErrorCategory InvalidOperation - } - - $returnValue = @{ - Ensure = $Ensure - Database = $Database - Name = $Name - PermissionState = $PermissionState - Permissions = $getSqlDatabasePermissionResult - SQLServer = $SQLServer - SQLInstanceName = $SQLInstanceName - } - - $returnValue -} - -<# - .SYNOPSIS - Sets the permissions for the user in the database. - - .PARAMETER Ensure - This is The Ensure if the permission should be granted (Present) or revoked (Absent) - - .PARAMETER Database - This is the SQL database - - .PARAMETER Name - This is the name of the SQL login for the permission set - - .PARAMETER PermissionState - This is the state of permission set. Valid values are 'Grant' or 'Deny' - - .PARAMETER Permissions - This is a list that represents a SQL Server set of database permissions - - .PARAMETER SQLServer - This is the SQL Server for the database - - .PARAMETER SQLInstanceName - This is the SQL instance for the database -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present', - - [parameter(Mandatory = $true)] - [System.String] - $Database, - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [ValidateSet('Grant','Deny')] - [System.String] - $PermissionState, - - [parameter(Mandatory = $true)] - [System.String[]] - $Permissions, - - [parameter(Mandatory = $true)] - [System.String] - $SQLServer = $env:COMPUTERNAME, - - [parameter(Mandatory = $true)] - [System.String] - $SQLInstanceName = 'MSSQLSERVER' - ) - - $sqlServerObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - if ($sqlServerObject) - { - Write-Verbose -Message "Setting permissions of database '$Database' for login '$Name'" - - if ($Ensure -eq 'Present') - { - Add-SqlDatabasePermission -SqlServerObject $sqlServerObject ` - -Name $Name ` - -Database $Database ` - -PermissionState $PermissionState ` - -Permissions $Permissions - - New-VerboseMessage -Message "$PermissionState - SQL Permissions for $Name, successfullly added in $Database" - } - else - { - Remove-SqlDatabasePermission -SqlServerObject $sqlServerObject ` - -Name $Name ` - -Database $Database ` - -PermissionState $PermissionState ` - -Permissions $Permissions - - New-VerboseMessage -Message "$PermissionState - SQL Permissions for $Name, successfullly removed in $Database" - } - } - else - { - throw New-TerminatingError -ErrorType ConnectSQLError ` - -FormatArgs @($SQLServer,$SQLInstanceName) ` - -ErrorCategory InvalidOperation - } -} - -<# - .SYNOPSIS - Tests if the permissions is set for the user in the database - - .PARAMETER Ensure - This is The Ensure if the permission should be granted (Present) or revoked (Absent) - - .PARAMETER Database - This is the SQL database - - .PARAMETER Name - This is the name of the SQL login for the permission set - - .PARAMETER PermissionState - This is the state of permission set. Valid values are 'Grant' or 'Deny' - - .PARAMETER Permissions - This is a list that represents a SQL Server set of database permissions - - .PARAMETER SQLServer - This is the SQL Server for the database - - .PARAMETER SQLInstanceName - This is the SQL instance for the database -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present', - - [parameter(Mandatory = $true)] - [System.String] - $Database, - - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [ValidateSet('Grant','Deny')] - [System.String] - $PermissionState, - - [parameter(Mandatory = $true)] - [System.String[]] - $Permissions, - - [parameter(Mandatory = $true)] - [System.String] - $SQLServer = $env:COMPUTERNAME, - - [parameter(Mandatory = $true)] - [System.String] - $SQLInstanceName = 'MSSQLSERVER' - ) - - Write-Verbose -Message "Evaluating permissions for user '$Name' in database '$Database'." - - $getTargetResourceResult = Get-TargetResource @PSBoundParameters - - return Test-SQLDscParameterState -CurrentValues $getTargetResourceResult ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @('Name', 'Ensure', 'PermissionState', 'Permissions') -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabasePermission/MSFT_xSQLServerDatabasePermission.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabasePermission/MSFT_xSQLServerDatabasePermission.schema.mof deleted file mode 100644 index 5d58b58a..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabasePermission/MSFT_xSQLServerDatabasePermission.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerDatabasePermission")] -class MSFT_xSQLServerDatabasePermission : OMI_BaseResource -{ - [Write, Description("If the values should be present or absent. Valid values are 'Present' or 'Absent'."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Key, Description("The name of the database.")] String Database; - [Key, Description("The name of the user that should be granted or denied the permission.")] String Name; - [Key, Description("The state of the permission. Valid values are 'Grant' or 'Deny'."), ValueMap{"Grant","Deny"}, Values{"Grant","Deny"}] String PermissionState; - [Required, Description("The set of permissions for the SQL database.")] String Permissions[]; - [Key, Description("The host name of the SQL Server to be configured.")] String SQLServer; - [Key, Description("The name of the SQL instance to be configured.")] String SQLInstanceName; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseRecoveryModel/MSFT_xSQLServerDatabaseRecoveryModel.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseRecoveryModel/MSFT_xSQLServerDatabaseRecoveryModel.psm1 deleted file mode 100644 index 0c377d6b..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseRecoveryModel/MSFT_xSQLServerDatabaseRecoveryModel.psm1 +++ /dev/null @@ -1,199 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path (Split-Path $PSScriptRoot -Parent) -Parent) ` - -ChildPath 'xSQLServerHelper.psm1') ` - -Force -<# - .SYNOPSIS - This function gets all Key properties defined in the resource schema file - - .PARAMETER Database - This is the SQL database - - .PARAMETER RecoveryModel - This is the RecoveryModel of the SQL database - - .PARAMETER SQLServer - This is a the SQL Server for the database - - .PARAMETER SQLInstanceName - This is a the SQL instance for the database -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Full','Simple','BulkLogged')] - [ValidateNotNullOrEmpty()] - [System.String] - $RecoveryModel, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLInstanceName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name - ) - - $sqlServerObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - if ($sqlServerObject) - { - Write-Verbose -Message "Getting RecoveryModel of SQL database '$Name'" - $sqlDatabaseObject = $sqlServerObject.Databases[$Name] - - if ($sqlDatabaseObject) - { - $sqlDatabaseRecoveryModel = $sqlDatabaseObject.RecoveryModel - New-VerboseMessage -Message "The current recovery model used by database $Name is '$sqlDatabaseRecoveryModel'" - } - else - { - throw New-TerminatingError -ErrorType NoDatabase ` - -FormatArgs @($Name,$sqlServer,$sqlInstanceName) ` - -ErrorCategory InvalidResult - } - } - - $returnValue = @{ - Name = $Name - RecoveryModel = $sqlDatabaseRecoveryModel - SQLServer = $SQLServer - SQLInstanceName = $SQLInstanceName - } - - $returnValue -} - -<# - .SYNOPSIS - This function gets all Key properties defined in the resource schema file - - .PARAMETER Database - This is the SQL database - - .PARAMETER RecoveryModel - This is the RecoveryModel of the SQL database - - .PARAMETER SQLServer - This is a the SQL Server for the database - - .PARAMETER SQLInstanceName - This is a the SQL instance for the database -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Full','Simple','BulkLogged')] - [ValidateNotNullOrEmpty()] - [System.String] - $RecoveryModel, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLInstanceName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name - ) - - $sqlServerObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - if ($sqlServerObject) - { - Write-Verbose -Message "Setting RecoveryModel of SQL database '$Name'" - $sqlDatabaseObject = $sqlServerObject.Databases[$Name] - - if ($sqlDatabaseObject) - { - if($sqlDatabaseObject.RecoveryModel -ne $RecoveryModel) - { - $sqlDatabaseObject.RecoveryModel = $RecoveryModel - $sqlDatabaseObject.Alter() - New-VerboseMessage -Message "The recovery model for the database $Name is changed to '$RecoveryModel'." - } - } - else - { - throw New-TerminatingError -ErrorType NoDatabase ` - -FormatArgs @($Name,$sqlServer,$sqlInstanceName) ` - -ErrorCategory InvalidResult - } - } -} - -<# - .SYNOPSIS - This function gets all Key properties defined in the resource schema file - - .PARAMETER Database - This is the SQL database - - .PARAMETER RecoveryModel - This is the RecoveryModel of the SQL database - - .PARAMETER SQLServer - This is a the SQL Server for the database - - .PARAMETER SQLInstanceName - This is a the SQL instance for the database -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateSet('Full','Simple','BulkLogged')] - [ValidateNotNullOrEmpty()] - [System.String] - $RecoveryModel, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLInstanceName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name - ) - - Write-Verbose -Message "Testing RecoveryModel of database '$Name'" - - $currentValues = Get-TargetResource @PSBoundParameters - - return Test-SQLDscParameterState -CurrentValues $currentValues ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @('Name','RecoveryModel') -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseRecoveryModel/MSFT_xSQLServerDatabaseRecoveryModel.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseRecoveryModel/MSFT_xSQLServerDatabaseRecoveryModel.schema.mof deleted file mode 100644 index 0ffb09a9..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseRecoveryModel/MSFT_xSQLServerDatabaseRecoveryModel.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0"), FriendlyName("xSQLServerDatabaseRecoveryModel")] -class MSFT_xSQLServerDatabaseRecoveryModel : OMI_BaseResource -{ - [Key, Description("The SQL database name")] String Name; - [Required, Description("The recovery model to use for the database."), ValueMap{"Full","Simple","BulkLogged"}, Values{"Full","Simple","BulkLogged"}] String RecoveryModel; - [Key, Description("The host name of the SQL Server to be configured.")] String SQLServer; - [Key, Description("The name of the SQL instance to be configured.")] String SQLInstanceName; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseRole/MSFT_xSQLServerDatabaseRole.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseRole/MSFT_xSQLServerDatabaseRole.psm1 deleted file mode 100644 index c9c67b0b..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseRole/MSFT_xSQLServerDatabaseRole.psm1 +++ /dev/null @@ -1,377 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path (Split-Path $PSScriptRoot -Parent) -Parent) ` - -ChildPath 'xSQLServerHelper.psm1') ` - -Force - -<# - .SYNOPSIS - Returns the current state of the user memberships in the role(s). - - .PARAMETER Ensure - Specifies the desired state of the membership of the role(s). - - .PARAMETER Name - Specifies the name of the login that evaluated if it is member of the role(s). - - .PARAMETER SQLServer - Specifies the SQL server on which the instance exist. - - .PARAMETER SQLInstanceName - Specifies the SQL instance in which the database exist. - - .PARAMETER Database - Specifies the database in which the login (user) and role(s) exist. - - .PARAMETER Role - Specifies one or more roles to which the login (user) will be evaluated if it should be added or removed. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLInstanceName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Database, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String[]] - $Role - ) - - Write-Verbose -Message "Getting SQL Database role for $Name" - - $sqlServerObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - if ($sqlServerObject) - { - # Check database exists - if ( -not ($sqlDatabaseObject = $sqlServerObject.Databases[$Database]) ) - { - throw New-TerminatingError -ErrorType NoDatabase ` - -FormatArgs @($Database, $SQLServer, $SQLInstanceName) ` - -ErrorCategory ObjectNotFound - } - - # Check role exists - foreach ($currentRole in $Role) - { - if( -not ($sqlDatabaseObject.Roles[$currentRole]) ) - { - throw New-TerminatingError -ErrorType RoleNotFound ` - -FormatArgs @($currentRole, $Database, $SQLServer, $SQLInstanceName) ` - -ErrorCategory ObjectNotFound - } - } - - # Check login exists - if ( -not ($sqlServerObject.Logins[$Name]) ) - { - throw New-TerminatingError -ErrorType LoginNotFound ` - -FormatArgs @($Name, $SQLServer, $SQLInstanceName) ` - -ErrorCategory ObjectNotFound - } - - $ensure = 'Absent' - $grantedRole = @() - - if ($sqlDatabaseUser = $sqlDatabaseObject.Users[$Name] ) - { - foreach ($currentRole in $Role) - { - if ($sqlDatabaseUser.IsMember($currentRole)) - { - New-VerboseMessage -Message ("The login '$Name' is a member of the role '$currentRole' on the " + ` - "database '$Database', on the instance $SQLServer\$SQLInstanceName") - - $grantedRole += $currentRole - } - else - { - New-VerboseMessage -Message ("The login '$Name' is not a member of the role '$currentRole' on the " + ` - "database '$Database', on the instance $SQLServer\$SQLInstanceName") - } - } - - if ( -not (Compare-Object -ReferenceObject $Role -DifferenceObject $grantedRole) ) - { - $ensure = 'Present' - } - } - else - { - New-VerboseMessage -Message ("The login '$Name' is not a user of the database " + ` - "'$Database' on the instance $SQLServer\$SQLInstanceName") - } - } - - $returnValue = @{ - Ensure = $ensure - Name = $Name - SQLServer = $SQLServer - SQLInstanceName = $SQLInstanceName - Database = $Database - Role = $grantedRole - } - - $returnValue -} - -<# - .SYNOPSIS - Adds the login (user) to each of the provided roles when Ensure is set to 'Present'. - When Ensure is set to 'Absent' the login (user) will be removed from each of the provided roles. - If the login does not exist as a user in the database, then the user will be created in the database using the login. - - .PARAMETER Ensure - Specifies the desired state of the membership of the role(s). - - .PARAMETER Name - Specifies the name of the login that evaluated if it is member of the role(s), if it is not it will be added. - If the login does not exist as a user, a user will be created using the login. - - .PARAMETER SQLServer - Specifies the SQL server on which the instance exist. - - .PARAMETER SQLInstanceName - Specifies the SQL instance in which the database exist. - - .PARAMETER Database - Specifies the database in which the login (user) and role(s) exist. - - .PARAMETER Role - Specifies one or more roles to which the login (user) will be added or removed. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter()] - [ValidateSet('Present','Absent')] - [ValidateNotNullOrEmpty()] - [System.String] - $Ensure = 'Present', - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLInstanceName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Database, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String[]] - $Role - ) - - Write-Verbose -Message "Setting SQL Database role for $Name" - - $sqlServerObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - if ($sqlServerObject) - { - $sqlDatabaseObject = $sqlServerObject.Databases[$Database] - - switch ($Ensure) - { - 'Present' - { - # Adding database user if it does not exist. - if ( -not ($sqlDatabaseObject.Users[$Name]) ) - { - try - { - New-VerboseMessage -Message ("Adding the login '$Name' as a user of the database " + ` - "'$Database', on the instance $SQLServer\$SQLInstanceName") - - $sqlDatabaseUser = New-Object -TypeName Microsoft.SqlServer.Management.Smo.User ` - -ArgumentList $SQLDatabase, $Name - $sqlDatabaseUser.Login = $Name - $sqlDatabaseUser.Create() - } - catch - { - throw New-TerminatingError -ErrorType AddLoginDatabaseSetError ` - -FormatArgs @($SQLServer,$SQLInstanceName,$Name,$Database) ` - -ErrorCategory InvalidOperation ` - -InnerException $_.Exception - } - } - - # Adding database user to the role. - foreach ($currentRole in $Role) - { - try - { - New-VerboseMessage -Message ("Adding the login '$Name' to the role '$currentRole' on the " + ` - "database '$Database', on the instance $SQLServer\$SQLInstanceName") - - $sqlDatabaseRole = $sqlDatabaseObject.Roles[$currentRole] - $sqlDatabaseRole.AddMember($Name) - } - catch - { - throw New-TerminatingError -ErrorType AddMemberDatabaseSetError ` - -FormatArgs @($SQLServer,$SQLInstanceName,$Name,$Role,$Database) ` - -ErrorCategory InvalidOperation ` - -InnerException $_.Exception - } - } - } - - 'Absent' - { - try - { - foreach ($currentRole in $Role) - { - New-VerboseMessage -Message ("Removing the login '$Name' to the role '$currentRole' on the " + ` - "database '$Database', on the instance $SQLServer\$SQLInstanceName") - - $sqlDatabaseRole = $sqlDatabaseObject.Roles[$currentRole] - $sqlDatabaseRole.DropMember($Name) - } - } - catch - { - throw New-TerminatingError -ErrorType DropMemberDatabaseSetError ` - -FormatArgs @($SQLServer,$SQLInstanceName,$Name,$Role,$Database) ` - -ErrorCategory InvalidOperation ` - -InnerException $_.Exception - } - } - } - } -} - -<# - .SYNOPSIS - Tests if the login (user) has the desired state in each of the provided roles. - - .PARAMETER Ensure - Specifies the desired state of the membership of the role(s). - - .PARAMETER Name - Specifies the name of the login that evaluated if it is member of the role(s). - - .PARAMETER SQLServer - Specifies the SQL server on which the instance exist. - - .PARAMETER SQLInstanceName - Specifies the SQL instance in which the database exist. - - .PARAMETER Database - Specifies the database in which the login (user) and role(s) exist. - - .PARAMETER Role - Specifies one or more roles to which the login (user) will be tested if it should added or removed. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter()] - [ValidateSet('Present','Absent')] - [ValidateNotNullOrEmpty()] - [System.String] - $Ensure = 'Present', - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLInstanceName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Database, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String[]] - $Role - ) - - Write-Verbose -Message "Testing SQL Database role for $Name" - - $getTargetResourceParameters = @{ - SQLInstanceName = $PSBoundParameters.SQLInstanceName - SQLServer = $PSBoundParameters.SQLServer - Role = $PSBoundParameters.Role - Database = $PSBoundParameters.Database - Name = $PSBoundParameters.Name - } - - $getTargetResourceResult = Get-TargetResource @getTargetResourceParameters - - $isDatabaseRoleInDesiredState = $true - - switch ($Ensure) - { - 'Absent' - { - if ($getTargetResourceResult.Ensure -ne 'Absent') - { - New-VerboseMessage -Message "Ensure is set to Absent. The existing role for $Name should be dropped" - $isDatabaseRoleInDesiredState = $false - } - } - - 'Present' - { - if ($getTargetResourceResult.Ensure -ne 'Present') - { - New-VerboseMessage -Message "Ensure is set to Present. The missing role for $Name should be added" - $isDatabaseRoleInDesiredState = $false - } - } - } - - $isDatabaseRoleInDesiredState -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseRole/MSFT_xSQLServerDatabaseRole.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseRole/MSFT_xSQLServerDatabaseRole.schema.mof deleted file mode 100644 index ef07952f..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerDatabaseRole/MSFT_xSQLServerDatabaseRole.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerDatabaseRole")] -class MSFT_xSQLServerDatabaseRole : OMI_BaseResource -{ - [Write, Description("If 'Present' (the default value) then the login (user) will be added to the role(s). If 'Absent' then the login (user) will be removed from the role(s)."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Key, Description("The name of the login that will become a member, or removed as a member, of the role(s).")] String Name; - [Key, Description("The host name of the SQL Server to be configured.")] String SQLServer; - [Key, Description("The name of the SQL instance to be configured.")] String SQLInstanceName; - [Key, Description("The database in which the login (user) and role(s) exist.")] String Database; - [Required, Description("One or more roles to which the login (user) will be added or removed.")] String Role[]; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpoint/MSFT_xSQLServerEndpoint.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpoint/MSFT_xSQLServerEndpoint.psm1 deleted file mode 100644 index e72954b2..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpoint/MSFT_xSQLServerEndpoint.psm1 +++ /dev/null @@ -1,281 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path (Split-Path $PSScriptRoot -Parent) -Parent) ` - -ChildPath 'xSQLServerHelper.psm1') ` - -Force -<# - .SYNOPSIS - Returns the current state of the endpoint. - - .PARAMETER EndpointName - The name of the endpoint. - - .PARAMETER SQLServer - The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME. - - .PARAMETER SQLInstanceName - The name of the SQL instance to be configured. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $EndpointName, - - [Parameter()] - [System.String] - $SQLServer = $env:COMPUTERNAME, - - [Parameter(Mandatory = $true)] - [System.String] - $SQLInstanceName - ) - - $getTargetResourceReturnValues = @{ - SQLServer = $SQLServer - SQLInstanceName = $SQLInstanceName - Ensure = 'Absent' - EndpointName = '' - Port = '' - IpAddress = '' - } - - $sqlServerObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - if ($sqlServerObject) - { - Write-Verbose -Message ('Connected to {0}\{1}' -f $SQLServer, $SQLInstanceName) - - $endpointObject = $sqlServerObject.Endpoints[$EndpointName] - if ($endpointObject.Name -eq $EndpointName) - { - if ($sqlServerObject.Endpoints[$EndPointName].EndpointType -ne 'DatabaseMirroring') - { - throw New-TerminatingError -ErrorType EndpointFoundButWrongType ` - -FormatArgs @($EndpointName) ` - -ErrorCategory InvalidOperation - } - - $getTargetResourceReturnValues.Ensure = 'Present' - $getTargetResourceReturnValues.EndpointName = $endpointObject.Name - $getTargetResourceReturnValues.Port = $endpointObject.Protocol.Tcp.ListenerPort - $getTargetResourceReturnValues.IpAddress = $endpointObject.Protocol.Tcp.ListenerIPAddress - } - else - { - $getTargetResourceReturnValues.Ensure = 'Absent' - $getTargetResourceReturnValues.EndpointName = '' - $getTargetResourceReturnValues.Port = '' - $getTargetResourceReturnValues.IpAddress = '' - } - } - else - { - throw New-TerminatingError -ErrorType NotConnectedToInstance ` - -FormatArgs @($SQLServer,$SQLInstanceName) ` - -ErrorCategory InvalidOperation - } - - return $getTargetResourceReturnValues -} - -<# - .SYNOPSIS - Create, changes or drops an endpoint. - - .PARAMETER EndpointName - The name of the endpoint. - - .PARAMETER Ensure - If the endpoint should be present or absent. Default values is 'Present'. - - .PARAMETER Port - The network port the endpoint is listening on. Default value is 5022. - - .PARAMETER SQLServer - The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME. - - .PARAMETER SQLInstanceName - The name of the SQL instance to be configured. - - .PARAMETER IpAddress - The network IP address the endpoint is listening on. Defaults to '0.0.0.0' which means listen on any valid IP address. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $EndpointName, - - [Parameter()] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present', - - [Parameter()] - [System.UInt16] - $Port = 5022, - - [Parameter()] - [System.String] - $SQLServer = $env:COMPUTERNAME, - - [Parameter(Mandatory = $true)] - [System.String] - $SQLInstanceName, - - [Parameter()] - [System.String] - $IpAddress = '0.0.0.0' - ) - - $getTargetResourceResult = Get-TargetResource -EndpointName $EndpointName -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - $sqlServerObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - if ($sqlServerObject) - { - if ($Ensure -eq 'Present' -and $getTargetResourceResult.Ensure -eq 'Absent') - { - Write-Verbose -Message ('Creating endpoint {0}.' -f $EndpointName) - - $endpointObject = New-Object -TypeName Microsoft.SqlServer.Management.Smo.Endpoint -ArgumentList $sqlServerObject, $EndpointName - $endpointObject.EndpointType = [Microsoft.SqlServer.Management.Smo.EndpointType]::DatabaseMirroring - $endpointObject.ProtocolType = [Microsoft.SqlServer.Management.Smo.ProtocolType]::Tcp - $endpointObject.Protocol.Tcp.ListenerPort = $Port - $endpointObject.Protocol.Tcp.ListenerIPAddress = $IpAddress - $endpointObject.Payload.DatabaseMirroring.ServerMirroringRole = [Microsoft.SqlServer.Management.Smo.ServerMirroringRole]::All - $endpointObject.Payload.DatabaseMirroring.EndpointEncryption = [Microsoft.SqlServer.Management.Smo.EndpointEncryption]::Required - $endpointObject.Payload.DatabaseMirroring.EndpointEncryptionAlgorithm = [Microsoft.SqlServer.Management.Smo.EndpointEncryptionAlgorithm]::Aes - $endpointObject.Create() - $endpointObject.Start() - } - elseif ($Ensure -eq 'Present' -and $getTargetResourceResult.Ensure -eq 'Present') - { - # The endpoint already exist, verifying supported endpoint properties so they are in desired state. - $endpointObject = $sqlServerObject.Endpoints[$EndpointName] - if ($endpointObject) - { - if ($endpointObject.Protocol.Tcp.ListenerIPAddress -ne $IpAddress) - { - Write-Verbose -Message ('Updating endpoint {0} IP address to {1}.' -f $EndpointName, $IpAddress) - $endpointObject.Protocol.Tcp.ListenerIPAddress = $IpAddress - $endpointObject.Alter() - } - - if ($endpointObject.Protocol.Tcp.ListenerPort -ne $Port) - { - Write-Verbose -Message ('Updating endpoint {0} port to {1}.' -f $EndpointName, $Port) - $endpointObject.Protocol.Tcp.ListenerPort = $Port - $endpointObject.Alter() - } - } - else - { - throw New-TerminatingError -ErrorType EndpointNotFound -FormatArgs @($EndpointName) -ErrorCategory ObjectNotFound - } - } - elseif ($Ensure -eq 'Absent' -and $getTargetResourceResult.Ensure -eq 'Present') - { - Write-Verbose -Message ('Dropping endpoint {0}.' -f $EndpointName) - - $endpointObject = $sqlServerObject.Endpoints[$EndpointName] - if ($endpointObject) - { - $endpointObject.Drop() - } - else - { - throw New-TerminatingError -ErrorType EndpointNotFound -FormatArgs @($EndpointName) -ErrorCategory ObjectNotFound - } - } - } - else - { - throw New-TerminatingError -ErrorType NotConnectedToInstance ` - -FormatArgs @($SQLServer,$SQLInstanceName) ` - -ErrorCategory InvalidOperation - } -} - -<# - .SYNOPSIS - Tests if the principal (login) has the desired permissions. - - .PARAMETER EndpointName - The name of the endpoint. - - .PARAMETER Ensure - If the endpoint should be present or absent. Default values is 'Present'. - - .PARAMETER Port - The network port the endpoint is listening on. Default value is 5022. - - .PARAMETER SQLServer - The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME. - - .PARAMETER SQLInstanceName - The name of the SQL instance to be configured. - - .PARAMETER IpAddress - The network IP address the endpoint is listening on. Defaults to '0.0.0.0' which means listen on any valid IP address. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $EndpointName, - - [Parameter()] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present', - - [Parameter()] - [System.UInt16] - $Port = 5022, - - [Parameter()] - [System.String] - $SQLServer = $env:COMPUTERNAME, - - [Parameter(Mandatory = $true)] - [System.String] - $SQLInstanceName, - - [Parameter()] - [System.String] - $IpAddress = '0.0.0.0' - ) - - $getTargetResourceResult = Get-TargetResource -EndpointName $EndpointName -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - if ($getTargetResourceResult.Ensure -eq $Ensure) - { - $result = $true - - if ($getTargetResourceResult.Ensure -eq 'Present' ` - -and ( - $getTargetResourceResult.Port -ne $Port ` - -or $getTargetResourceResult.IpAddress -ne $IpAddress - ) - ) - { - $result = $false - } - } - else - { - $result = $false - } - - return $result -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpoint/MSFT_xSQLServerEndpoint.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpoint/MSFT_xSQLServerEndpoint.schema.mof deleted file mode 100644 index 737bb8db..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpoint/MSFT_xSQLServerEndpoint.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerEndpoint")] -class MSFT_xSQLServerEndpoint : OMI_BaseResource -{ - [Key, Description("The name of the endpoint.")] String EndpointName; - [Write, Description("If the endpoint should be present or absent. Default values is 'Present'."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("The network port the endpoint is listening on. Default value is 5022.")] Uint16 Port; - [Write, Description("The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME.")] String SQLServer; - [Key, Description("The name of the SQL instance to be configured.")] String SQLInstanceName; - [Write, Description("The network IP address the endpoint is listening on. Default the endpoint will listen on any valid IP address.")] String IpAddress; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpointPermission/MSFT_xSQLServerEndpointPermission.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpointPermission/MSFT_xSQLServerEndpointPermission.psm1 deleted file mode 100644 index bfdd1f18..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpointPermission/MSFT_xSQLServerEndpointPermission.psm1 +++ /dev/null @@ -1,249 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path (Split-Path $PSScriptRoot -Parent) -Parent) ` - -ChildPath 'xSQLServerHelper.psm1') ` - -Force -<# - .SYNOPSIS - Returns the current state of the permissions for the principal (login). - - .PARAMETER InstanceName - The name of the SQL instance to be configured. - - .PARAMETER NodeName - The host name of the SQL Server to be configured. - - .PARAMETER Name - The name of the endpoint. - - .PARAMETER Principal - The login to which permission will be set. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [Parameter(Mandatory = $true)] - [System.String] - $NodeName, - - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [System.String] - $Principal - ) - - try - { - $sqlServerObject = Connect-SQL -SQLServer $NodeName -SQLInstanceName $InstanceName - - $endpointObject = $sqlServerObject.Endpoints[$Name] - if( $null -ne $endpointObject ) - { - New-VerboseMessage -Message "Enumerating permissions for endpoint $Name" - - $permissionSet = New-Object -Property @{ Connect = $True } -TypeName Microsoft.SqlServer.Management.Smo.ObjectPermissionSet - - $endpointPermission = $endpointObject.EnumObjectPermissions( $permissionSet ) | Where-Object { $_.PermissionState -eq "Grant" -and $_.Grantee -eq $Principal } - if ($endpointPermission.Count -ne 0) - { - $Ensure = 'Present' - $Permission = 'CONNECT' - } - else - { - $Ensure = 'Absent' - $Permission = '' - } - } - else - { - throw New-TerminatingError -ErrorType EndpointNotFound -FormatArgs @($Name) -ErrorCategory ObjectNotFound - } - } - catch - { - throw New-TerminatingError -ErrorType UnexpectedErrorFromGet -FormatArgs @($Name) -ErrorCategory ObjectNotFound -InnerException $_.Exception - } - - return @{ - InstanceName = [System.String] $InstanceName - NodeName = [System.String] $NodeName - Ensure = [System.String] $Ensure - Name = [System.String] $Name - Principal = [System.String] $Principal - Permission = [System.String] $Permission - } -} - -<# - .SYNOPSIS - Grants or revokes the permission for the the principal (login). - - .PARAMETER InstanceName - The name of the SQL instance to be configured. - - .PARAMETER NodeName - The host name of the SQL Server to be configured. - - .PARAMETER Ensure - If the permission should be present or absent. Default value is 'Present'. - - .PARAMETER Name - The name of the endpoint. - - .PARAMETER Permission - The permission to set for the login. Valid value for permission are only CONNECT. - - .PARAMETER Principal - The permission to set for the login. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [Parameter(Mandatory = $true)] - [System.String] - $NodeName, - - [Parameter()] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present', - - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [System.String] - $Principal, - - [Parameter()] - [ValidateSet('CONNECT')] - [System.String] - $Permission - ) - - $parameters = @{ - InstanceName = [System.String] $InstanceName - NodeName = [System.String] $NodeName - Name = [System.String] $Name - Principal = [System.String] $Principal - } - - $getTargetResourceResult = Get-TargetResource @parameters - if ($getTargetResourceResult.Ensure -ne $Ensure) - { - $sqlServerObject = Connect-SQL -SQLServer $NodeName -SQLInstanceName $InstanceName - - $endpointObject = $sqlServerObject.Endpoints[$Name] - if ($null -ne $endpointObject) - { - $permissionSet = New-Object -Property @{ Connect = $True } -TypeName Microsoft.SqlServer.Management.Smo.ObjectPermissionSet - - if ($Ensure -eq 'Present') - { - New-VerboseMessage -Message "Grant permission to $Principal on endpoint $Name" - - $endpointObject.Grant($permissionSet, $Principal) - } - else - { - New-VerboseMessage -Message "Revoke permission to $Principal on endpoint $Name" - $endpointObject.Revoke($permissionSet, $Principal) - } - } - else - { - throw New-TerminatingError -ErrorType EndpointNotFound -FormatArgs @($Name) -ErrorCategory ObjectNotFound - } - } - else - { - New-VerboseMessage -Message "State is already $Ensure" - } -} - -<# - .SYNOPSIS - Tests if the principal (login) has the desired permissions. - - .PARAMETER InstanceName - The name of the SQL instance to be configured. - - .PARAMETER NodeName - The host name of the SQL Server to be configured. - - .PARAMETER Ensure - If the permission should be present or absent. Default value is 'Present'. - - .PARAMETER Name - The name of the endpoint. - - .PARAMETER Permission - The permission to set for the login. Valid value for permission are only CONNECT. - - .PARAMETER Principal - The permission to set for the login. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [Parameter(Mandatory = $true)] - [System.String] - $NodeName, - - [Parameter()] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present', - - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [System.String] - $Principal, - - [Parameter()] - [ValidateSet('CONNECT')] - [System.String] - $Permission - ) - - $parameters = @{ - InstanceName = [System.String] $InstanceName - NodeName = [System.String] $NodeName - Name = [System.String] $Name - Principal = [System.String] $Principal - } - - New-VerboseMessage -Message "Testing state of endpoint permission for $Principal" - - $getTargetResourceResult = Get-TargetResource @parameters - - return $getTargetResourceResult.Ensure -eq $Ensure -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpointPermission/MSFT_xSQLServerEndpointPermission.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpointPermission/MSFT_xSQLServerEndpointPermission.schema.mof deleted file mode 100644 index d5070709..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpointPermission/MSFT_xSQLServerEndpointPermission.schema.mof +++ /dev/null @@ -1,12 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerEndpointPermission")] -class MSFT_xSQLServerEndpointPermission : OMI_BaseResource -{ - [Key, Description("The name of the SQL instance to be configured.")] String InstanceName; - [Required, Description("The host name of the SQL Server to be configured.")] String NodeName; - [Write, Description("If the permission should be present or absent. Default value is 'Present'."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("The name of the endpoint.")] String Name; - [Key, Description("The login to which permission will be set.")] String Principal; - [Write, Description("The permission to set for the login. Valid value for permission are only CONNECT."), ValueMap{"CONNECT"}, Values{"CONNECT"}] String Permission; -}; - diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpointState/MSFT_xSQLServerEndpointState.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpointState/MSFT_xSQLServerEndpointState.psm1 deleted file mode 100644 index 55a630c1..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpointState/MSFT_xSQLServerEndpointState.psm1 +++ /dev/null @@ -1,205 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path (Split-Path $PSScriptRoot -Parent) -Parent) ` - -ChildPath 'xSQLServerHelper.psm1') ` - -Force -<# - .SYNOPSIS - Returns the current state of an endpoint. - - .PARAMETER InstanceName - The name of the SQL instance to be configured. - - .PARAMETER NodeName - The host name of the SQL Server to be configured. - - .PARAMETER Name - The name of the endpoint. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [Parameter()] - [System.String] - $NodeName = $env:COMPUTERNAME, - - [Parameter(Mandatory = $true)] - [System.String] - $Name - ) - - New-VerboseMessage -Message "Getting state of endpoint $Name" - - try - { - $sqlServerObject = Connect-SQL -SQLServer $NodeName -SQLInstanceName $InstanceName - - $endpointObject = $sqlServerObject.Endpoints[$Name] - if ($null -ne $endpointObject) - { - $currentState = $endpointObject.EndpointState - } - else - { - throw New-TerminatingError -ErrorType EndpointNotFound -FormatArgs @($Name) -ErrorCategory ObjectNotFound - } - } - catch - { - throw New-TerminatingError -ErrorType EndpointErrorVerifyExist -FormatArgs @($Name) -ErrorCategory ObjectNotFound -InnerException $_.Exception - } - - return @{ - InstanceName = [System.String] $InstanceName - NodeName = [System.String] $NodeName - Name = [System.String] $Name - State = [System.String] $currentState - } -} - -<# - .SYNOPSIS - Changes the state of an endpoint. - - .PARAMETER InstanceName - The name of the SQL instance to be configured. - - .PARAMETER NodeName - The host name of the SQL Server to be configured. - - .PARAMETER Name - The name of the endpoint. - - .PARAMETER State - The state of the endpoint. Valid states are Started, Stopped or Disabled. Default value is 'Started'. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [Parameter()] - [System.String] - $NodeName = $env:COMPUTERNAME, - - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter()] - [ValidateSet('Started','Stopped','Disabled')] - [System.String] - $State = 'Started' - ) - - $parameters = @{ - InstanceName = [System.String] $InstanceName - NodeName = [System.String] $NodeName - Name = [System.String] $Name - } - - $getTargetResourceResult = Get-TargetResource @parameters - if ($null -ne $getTargetResourceResult) - { - if ($getTargetResourceResult.State -ne $State) - { - New-VerboseMessage -Message ('Changing state of endpoint ''{0}''' -f $Name) - - $sqlServerObject = Connect-SQL -SQLServer $NodeName -SQLInstanceName $InstanceName - - $endpointObject = $sqlServerObject.Endpoints[$Name] - - $setEndpointParams = @{ - InputObject = $endpointObject - State = $State - } - - Set-SqlHADREndpoint @setEndpointParams -ErrorAction Stop | Out-Null - } - else - { - New-VerboseMessage -Message ('Endpoint ''{0}'' state is already correct.' -f $Name) - } - } - else - { - throw New-TerminatingError -ErrorType UnexpectedErrorFromGet -ErrorCategory InvalidResult - } -} - -<# - .SYNOPSIS - Tests the state of an endpoint if it is in desired state. - - .PARAMETER InstanceName - The name of the SQL instance to be configured. - - .PARAMETER NodeName - The host name of the SQL Server to be configured. - - .PARAMETER Name - The name of the endpoint. - - .PARAMETER State - The state of the endpoint. Valid states are Started, Stopped or Disabled. Default value is 'Started'. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [Parameter()] - [System.String] - $NodeName = $env:COMPUTERNAME, - - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter()] - [ValidateSet('Started','Stopped','Disabled')] - [System.String] - $State = 'Started' - ) - - $parameters = @{ - InstanceName = $InstanceName - NodeName = $NodeName - Name = $Name - } - - New-VerboseMessage -Message "Testing state $State on endpoint '$Name'" - - $getTargetResourceResult = Get-TargetResource @parameters - if ($null -ne $getTargetResourceResult) - { - $result = $false - - if ($getTargetResourceResult.State -eq $State) - { - $result = $true - } - } - else - { - throw New-TerminatingError -ErrorType UnexpectedErrorFromGet -ErrorCategory InvalidResult - } - - return $result -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpointState/MSFT_xSQLServerEndpointState.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpointState/MSFT_xSQLServerEndpointState.schema.mof deleted file mode 100644 index 14edfab0..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerEndpointState/MSFT_xSQLServerEndpointState.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerEndpointState")] -class MSFT_xSQLServerEndpointState : OMI_BaseResource -{ - [Key, Description("The name of the SQL instance to be configured.")] String InstanceName; - [Write, Description("The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME.")] String NodeName; - [Key, Description("The name of the endpoint.")] String Name; - [Write, Description("The state of the endpoint. Valid states are Started, Stopped or Disabled. Default value is 'Started'."), ValueMap{"Started","Stopped","Disabled"}, Values{"Started","Stopped","Disabled"}] String State; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerFailoverClusterSetup/MSFT_xSQLServerFailoverClusterSetup.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerFailoverClusterSetup/MSFT_xSQLServerFailoverClusterSetup.psm1 deleted file mode 100644 index 832a1fac..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerFailoverClusterSetup/MSFT_xSQLServerFailoverClusterSetup.psm1 +++ /dev/null @@ -1,1038 +0,0 @@ -# NOTE: This resource requires WMF5 and PsDscRunAsCredential - -$currentPath = Split-Path -Parent $MyInvocation.MyCommand.Path -Write-Debug -Message "CurrentPath: $currentPath" - -# Load Common Code -Import-Module $currentPath\..\..\xSQLServerHelper.psm1 -Verbose:$false -ErrorAction Stop - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Prepare","Complete")] - [System.String] - $Action, - - [System.String] - $SourcePath = "$PSScriptRoot\..\..\", - - [System.String] - $SourceFolder = "Source", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.Management.Automation.PSCredential] - $SourceCredential, - - [System.Boolean] - $SuppressReboot, - - [System.Boolean] - $ForceReboot, - - [parameter(Mandatory = $true)] - [System.String] - $Features, - - [parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [System.String] - $InstanceID = $InstanceName, - - [System.String] - $PID, - - [System.String] - $UpdateEnabled = $True, - - [System.String] - $UpdateSource = ".\Updates", - - [System.String] - $SQMReporting, - - [System.String] - $ErrorReporting, - - [System.String] - $FailoverClusterGroup = "SQL Server ($InstanceName)", - - [parameter(Mandatory = $true)] - [System.String] - $FailoverClusterNetworkName, - - [System.String] - $FailoverClusterIPAddress, - - [System.String] - $InstallSharedDir, - - [System.String] - $InstallSharedWOWDir, - - [System.String] - $InstanceDir, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SQLSvcAccount, - - [System.Management.Automation.PSCredential] - $AgtSvcAccount = $SQLSvcAccount, - - [System.String] - $SQLCollation, - - [System.String[]] - $SQLSysAdminAccounts, - - [System.String] - $SecurityMode, - - [System.Management.Automation.PSCredential] - $SAPwd = $SetupCredential, - - [System.String] - $InstallSQLDataDir, - - [System.String] - $SQLUserDBDir, - - [System.String] - $SQLUserDBLogDir, - - [System.String] - $SQLTempDBDir, - - [System.String] - $SQLTempDBLogDir, - - [System.String] - $SQLBackupDir, - - [System.Management.Automation.PSCredential] - $ASSvcAccount = $SQLSvcAccount, - - [System.String] - $ASCollation, - - [System.String[]] - $ASSysAdminAccounts, - - [System.String] - $ASDataDir, - - [System.String] - $ASLogDir, - - [System.String] - $ASBackupDir, - - [System.String] - $ASTempDir, - - [System.String] - $ASConfigDir, - - [System.Management.Automation.PSCredential] - $ISSvcAccount = $SQLSvcAccount, - - [System.String] - $ISFileSystemFolder - ) - - $InstanceName = $InstanceName.ToUpper() - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - if($SourceCredential) - { - NetUse -SourcePath $SourcePath -Credential $SourceCredential -Ensure "Present" - } - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "setup.exe" - $Path = ResolvePath $Path - Write-Verbose "Path: $Path" - $SQLVersion = GetSQLVersion -Path $Path - if($SourceCredential) - { - NetUse -SourcePath $SourcePath -Credential $SourceCredential -Ensure "Absent" - } - - if($InstanceName -eq "MSSQLSERVER") - { - $DBServiceName = "MSSQLSERVER" - $AgtServiceName = "SQLSERVERAGENT" - $ASServiceName = "MSSQLServerOLAPService" - } - else - { - $DBServiceName = "MSSQL`$$InstanceName" - $AgtServiceName = "SQLAgent`$$InstanceName" - $ASServiceName = "MSOLAP`$$InstanceName" - } - $ISServiceName = "MsDtsServer" + $SQLVersion + "0" - - if(Get-WmiObject -Namespace root/mscluster -Class MSCluster_ResourceGroup -ErrorAction SilentlyContinue | Where-Object {$_.Name -eq $FailoverClusterGroup}) - { - $Complete = $true - $FailoverClusterNetworkName = (Get-ClusterGroup -Name $FailoverClusterGroup | Get-ClusterResource | Where-Object {$_.ResourceType -eq "Network Name"} | Get-ClusterParameter -Name "Name").Value - $FailoverClusterIPAddress = (Get-ClusterGroup -Name $FailoverClusterGroup | Get-ClusterResource | Where-Object {$_.ResourceType -eq "IP Address"} | Get-ClusterParameter -Name "Address").Value - } - else - { - $FailoverClusterGroup = $null - $FailoverClusterNetworkName = $null - $FailoverClusterIPAddress = $null - $Complete = $false - } - - $Services = Get-Service - $Features = "" - if($Services | Where-Object {$_.Name -eq $DBServiceName}) - { - $Features += "SQLENGINE," - $SQLSvcAccountUsername = (Get-WmiObject -Class Win32_Service | Where-Object {$_.Name -eq $DBServiceName}).StartName - $AgtSvcAccountUsername = (Get-WmiObject -Class Win32_Service | Where-Object {$_.Name -eq $AgtServiceName}).StartName - $InstanceID = ((Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL' -Name $InstanceName).$InstanceName).Split(".")[1] - $FullInstanceID = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL' -Name $InstanceName).$InstanceName - $InstanceID = $FullInstanceID.Split(".")[1] - $InstanceDir = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\$FullInstanceID\Setup" -Name 'SqlProgramDir').SqlProgramDir.Trim("\") - } - if($Services | Where-Object {$_.Name -eq $ASServiceName}) - { - $Features += "AS," - $ASSvcAccountUsername = (Get-WmiObject -Class Win32_Service | Where-Object {$_.Name -eq $ASServiceName}).StartName - } - if($Services | Where-Object {$_.Name -eq $ISServiceName}) - { - $Features += "IS," - $ISSvcAccountUsername = (Get-WmiObject -Class Win32_Service | Where-Object {$_.Name -eq $ISServiceName}).StartName - } - $Products = Get-WmiObject -Class Win32_Product - switch($SQLVersion) - { - "11" - { - $IdentifyingNumber = "{A7037EB2-F953-4B12-B843-195F4D988DA1}" - } - "12" - { - $IdentifyingNumber = "{75A54138-3B98-4705-92E4-F619825B121F}" - } - } - if($Products | Where-Object {$_.IdentifyingNumber -eq $IdentifyingNumber}) - { - $Features += "SSMS," - } - switch($SQLVersion) - { - "11" - { - $IdentifyingNumber = "{7842C220-6E9A-4D5A-AE70-0E138271F883}" - } - "12" - { - $IdentifyingNumber = "{B5ECFA5C-AC4F-45A4-A12E-A76ABDD9CCBA}" - } - } - if($Products | Where-Object {$_.IdentifyingNumber -eq $IdentifyingNumber}) - { - $Features += "ADV_SSMS," - } - $Features = $Features.Trim(",") - if($Features -ne "") - { - switch($SQLVersion) - { - "11" - { - $InstallSharedDir = (GetFirstItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components" -Name "FEE2E540D20152D4597229B6CFBC0A69") - $InstallSharedWOWDir = (GetFirstItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components" -Name "A79497A344129F64CA7D69C56F5DD8B4") - } - "12" - { - $InstallSharedDir = (GetFirstItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components" -Name "FEE2E540D20152D4597229B6CFBC0A69") - $InstallSharedWOWDir = (GetFirstItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components" -Name "C90BFAC020D87EA46811C836AD3C507F") - } - "13" - { - $InstallSharedDir = (GetFirstItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components" -Name "FEE2E540D20152D4597229B6CFBC0A69") - $InstallSharedWOWDir = (GetFirstItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components" -Name "A79497A344129F64CA7D69C56F5DD8B4") - } - } - } - - $returnValue = @{ - Action = $Action - SourcePath = $SourcePath - SourceFolder = $SourceFolder - Features = $Features - InstanceName = $InstanceName - InstanceID = $InstanceID - FailoverClusterGroup = $FailoverClusterGroup - FailoverClusterNetworkName = $FailoverClusterNetworkName - FailoverClusterIPAddress = $FailoverClusterIPAddress - InstallSharedDir = $InstallSharedDir - InstallSharedWOWDir = $InstallSharedWOWDir - InstanceDir = $InstanceDir - SQLSvcAccountUsername = $SQLSvcAccountUsername - AgtSvcAccountUsername = $AgtSvcAccountUsername - ASSvcAccountUsername = $ASSvcAccountUsername - ISSvcAccountUsername = $ISSvcAccountUsername - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Prepare","Complete")] - [System.String] - $Action, - - [System.String] - $SourcePath = "$PSScriptRoot\..\..\", - - [System.String] - $SourceFolder = "Source", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.Management.Automation.PSCredential] - $SourceCredential, - - [System.Boolean] - $SuppressReboot, - - [System.Boolean] - $ForceReboot, - - [parameter(Mandatory = $true)] - [System.String] - $Features, - - [parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [System.String] - $InstanceID = $InstanceName, - - [System.String] - $PID, - - [System.String] - $UpdateEnabled = $True, - - [System.String] - $UpdateSource = ".\Updates", - - [System.String] - $SQMReporting, - - [System.String] - $ErrorReporting, - - [System.String] - $FailoverClusterGroup = "SQL Server ($InstanceName)", - - [parameter(Mandatory = $true)] - [System.String] - $FailoverClusterNetworkName, - - [System.String] - $FailoverClusterIPAddress, - - [System.String] - $InstallSharedDir, - - [System.String] - $InstallSharedWOWDir, - - [System.String] - $InstanceDir, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SQLSvcAccount, - - [System.Management.Automation.PSCredential] - $AgtSvcAccount = $SQLSvcAccount, - - [System.String] - $SQLCollation, - - [System.String[]] - $SQLSysAdminAccounts, - - [System.String] - $SecurityMode, - - [System.Management.Automation.PSCredential] - $SAPwd = $SetupCredential, - - [System.String] - $InstallSQLDataDir, - - [System.String] - $SQLUserDBDir, - - [System.String] - $SQLUserDBLogDir, - - [System.String] - $SQLTempDBDir, - - [System.String] - $SQLTempDBLogDir, - - [System.String] - $SQLBackupDir, - - [System.Management.Automation.PSCredential] - $ASSvcAccount = $SQLSvcAccount, - - [System.String] - $ASCollation, - - [System.String[]] - $ASSysAdminAccounts, - - [System.String] - $ASDataDir, - - [System.String] - $ASLogDir, - - [System.String] - $ASBackupDir, - - [System.String] - $ASTempDir, - - [System.String] - $ASConfigDir, - - [System.Management.Automation.PSCredential] - $ISSvcAccount = $SQLSvcAccount, - - [System.String] - $ISFileSystemFolder - ) - - $InstanceName = $InstanceName.ToUpper() - - Import-Module $PSScriptRoot\..\..\xPDT.psm1 - - if($SourceCredential) - { - NetUse -SourcePath $SourcePath -Credential $SourceCredential -Ensure "Present" - $TempFolder = [IO.Path]::GetTempPath() - & robocopy.exe (Join-Path -Path $SourcePath -ChildPath $SourceFolder) (Join-Path -Path $TempFolder -ChildPath $SourceFolder) /e - $SourcePath = $TempFolder - NetUse -SourcePath $SourcePath -Credential $SourceCredential -Ensure "Absent" - } - $Path = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $SourceFolder) -ChildPath "setup.exe" - $Path = ResolvePath $Path - $SQLVersion = GetSQLVersion -Path $Path - - foreach($feature in $Features.Split(",")) - { - if(($SQLVersion -eq "13") -and (($feature -eq "SSMS") -or ($feature -eq "ADV_SSMS"))) - { - Throw New-TerminatingError -ErrorType FeatureNotSupported -FormatArgs @($feature) -ErrorCategory InvalidData - } - } - - switch($Action) - { - "Prepare" - { - # If SQL shared components already installed, clear InstallShared*Dir variables - switch($SQLVersion) - { - "11" - { - if((Get-Variable -Name "InstallSharedDir" -ErrorAction SilentlyContinue) -and (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\30AE1F084B1CF8B4797ECB3CCAA3B3B6" -ErrorAction SilentlyContinue)) - { - Set-Variable -Name "InstallSharedDir" -Value "" - } - if((Get-Variable -Name "InstallSharedWOWDir" -ErrorAction SilentlyContinue) -and (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\A79497A344129F64CA7D69C56F5DD8B4" -ErrorAction SilentlyContinue)) - { - Set-Variable -Name "InstallSharedWOWDir" -Value "" - } - } - "12" - { - if((Get-Variable -Name "InstallSharedDir" -ErrorAction SilentlyContinue) -and (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\FEE2E540D20152D4597229B6CFBC0A69" -ErrorAction SilentlyContinue)) - { - Set-Variable -Name "InstallSharedDir" -Value "" - } - if((Get-Variable -Name "InstallSharedWOWDir" -ErrorAction SilentlyContinue) -and (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\C90BFAC020D87EA46811C836AD3C507F" -ErrorAction SilentlyContinue)) - { - Set-Variable -Name "InstallSharedWOWDir" -Value "" - } - } - "13" - { - if((Get-Variable -Name "InstallSharedDir" -ErrorAction SilentlyContinue) -and (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\FEE2E540D20152D4597229B6CFBC0A69" -ErrorAction SilentlyContinue)) - { - Set-Variable -Name "InstallSharedDir" -Value "" - } - if((Get-Variable -Name "InstallSharedWOWDir" -ErrorAction SilentlyContinue) -and (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\A79497A344129F64CA7D69C56F5DD8B4" -ErrorAction SilentlyContinue)) - { - Set-Variable -Name "InstallSharedWOWDir" -Value "" - } - } - } - - # Create install arguments - $Arguments = "/SkipRules=`"Cluster_VerifyForErrors`" /Quiet=`"True`" /IAcceptSQLServerLicenseTerms=`"True`" /Action=`"PrepareFailoverCluster`"" - $ArgumentVars = @( - "InstanceName", - "InstanceID", - "UpdateEnabled", - "UpdateSource", - "Features", - "PID", - "SQMReporting", - "ErrorReporting", - "InstallSharedDir", - "InstallSharedWOWDir", - "InstanceDir" - ) - foreach($ArgumentVar in $ArgumentVars) - { - if((Get-Variable -Name $ArgumentVar).Value -ne "") - { - $Arguments += " /$ArgumentVar=`"" + (Get-Variable -Name $ArgumentVar).Value + "`"" - } - } - if($Features.Contains("SQLENGINE")) - { - $Arguments += " /AgtSvcAccount=`"" + $AgtSvcAccount.UserName + "`"" - $Arguments += " /AgtSvcPassword=`"" + $AgtSvcAccount.GetNetworkCredential().Password + "`"" - $Arguments += " /SQLSvcAccount=`"" + $SQLSvcAccount.UserName + "`"" - $Arguments += " /SQLSvcPassword=`"" + $SQLSvcAccount.GetNetworkCredential().Password + "`"" - } - if($Features.Contains("AS")) - { - $Arguments += " /ASSvcAccount=`"" + $ASSvcAccount.UserName + "`"" - $Arguments += " /ASSvcPassword=`"" + $ASSvcAccount.GetNetworkCredential().Password + "`"" - } - if($Features.Contains("IS")) - { - $Arguments += " /ISSvcAccount=`"" + $ISSvcAccount.UserName + "`"" - $Arguments += " /ISSvcPassword=`"" + $ISSvcAccount.GetNetworkCredential().Password + "`"" - } - } - "Complete" - { - # Remove trailing "\" from paths - foreach($Var in @("InstallSQLDataDir","SQLUserDBDir","SQLUserDBLogDir","SQLTempDBDir","SQLTempDBLogDir","SQLBackupDir","ASDataDir","ASLogDir","ASBackupDir","ASTempDir","ASConfigDir","ISFileSystemFolder")) - { - if(Get-Variable -Name $Var -ErrorAction SilentlyContinue) - { - Set-Variable -Name $Var -Value (Get-Variable -Name $Var).Value.TrimEnd("\") - } - } - - # Discover which cluster disks need to be added to this cluster group - $Drives = @() - foreach($Var in @("InstallSQLDataDir","SQLUserDBDir","SQLUserDBLogDir","SQLTempDBDir","SQLTempDBLogDir","SQLBackupDir","ASDataDir","ASLogDir","ASBackupDir","ASTempDir","ASConfigDir","ISFileSystemFolder")) - { - if( - (Get-Variable -Name $Var -ErrorAction SilentlyContinue) -and ` - ((Get-Variable -Name $Var).Value.Length -ge 2) -and ` - ((Get-Variable -Name $Var).Value.Substring(1,1) -eq ":") - ) - { - $Drives += (Get-Variable -Name $Var).Value.Substring(0,2) - } - } - $Drives = $Drives | Sort-Object -Unique - $FailoverClusterDisks = @() - $DiskResources = Get-WmiObject -Class MSCluster_Resource -Namespace root/mscluster | Where-Object {$_.Type -eq "Physical Disk"} - foreach($DiskResource in $DiskResources) - { - $Disks = Get-WmiObject -Namespace root/mscluster -Query "Associators of {$DiskResource} Where ResultClass=MSCluster_Disk" - foreach($Disk in $Disks) - { - $Partitions = Get-WmiObject -Namespace root/mscluster -Query "Associators of {$Disk} Where ResultClass=MSCluster_DiskPartition" - foreach($Partition in $Partitions) - { - foreach($Drive in $Drives) - { - if($Partition.Path -eq $Drive) - { - $FailoverClusterDisks += $DiskResource.Name - } - } - } - } - } - - # Discover which cluster network to use for this cluster group - $ClusterNetworks = @(Get-WmiObject -Namespace root/mscluster -Class MSCluster_Network) - if([String]::IsNullOrEmpty($FailoverClusterIPAddress)) - { - $FailoverClusterIPAddresses = "IPv4;DHCP;" + $ClusterNetwork[0].Name - } - else - { - $FailoverClusterIPAddressDecimal = ConvertDecimalIP -IPAddress $FailoverClusterIPAddress - foreach($ClusterNetwork in $ClusterNetworks) - { - $ClusterNetworkAddressDecimal = ConvertDecimalIP -IPAddress $ClusterNetwork.Address - $ClusterNetworkAddressMaskDecimal = ConvertDecimalIP -IPAddress $ClusterNetwork.AddressMask - if(($FailoverClusterIPAddressDecimal -band $ClusterNetworkAddressMaskDecimal) -eq ($ClusterNetworkAddressDecimal -band $ClusterNetworkAddressMaskDecimal)) - { - $FailoverClusterIPAddresses = "IPv4;$FailoverClusterIPAddress;" + $ClusterNetwork.Name + ";" + $ClusterNetwork.AddressMask - } - } - } - - # Create install arguments - $Arguments = "/SkipRules=`"Cluster_VerifyForErrors`" /Quiet=`"True`" /IAcceptSQLServerLicenseTerms=`"True`" /Action=`"CompleteFailoverCluster`"" - $ArgumentVars = @( - "InstanceName", - "FailoverClusterGroup", - "FailoverClusterNetworkName", - "FailoverClusterIPAddresses" - ) - if($Features.Contains("SQLENGINE")) - { - $ArgumentVars += @( - "SecurityMode", - "SQLCollation", - "InstallSQLDataDir", - "SQLUserDBDir", - "SQLUserDBLogDir", - "SQLTempDBDir", - "SQLTempDBLogDir", - "SQLBackupDir" - ) - } - if($Features.Contains("AS")) - { - $ArgumentVars += @( - "ASCollation", - "ASDataDir", - "ASLogDir", - "ASBackupDir", - "ASTempDir", - "ASConfigDir" - ) - } - foreach($ArgumentVar in $ArgumentVars) - { - if((Get-Variable -Name $ArgumentVar).Value -ne "") - { - $Arguments += " /$ArgumentVar=`"" + (Get-Variable -Name $ArgumentVar).Value + "`"" - } - } - if($FailoverClusterDisks.Count -ne 0) - { - $Arguments += " /FailoverClusterDisks=" - foreach($FailoverClusterDisk in $FailoverClusterDisks) - { - $Arguments +="`"$FailoverClusterDisk`" " - } - $Arguments = $Arguments.Trim() - } - if($Features.Contains("SQLENGINE")) - { - $Arguments += " /SQLSysAdminAccounts=`"" + $SetupCredential.UserName + "`"" - if($PSBoundParameters.ContainsKey("SQLSysAdminAccounts")) - { - foreach($AdminAccount in $SQLSysAdminAccounts) - { - $Arguments += " `"$AdminAccount`"" - } - } - if($SecurityMode -eq "SQL") - { - $Arguments += " /SAPwd=`"" + $SAPwd.GetNetworkCredential().Password + "`"" - } - } - if($Features.Contains("AS")) - { - $Arguments += " /ASSysAdminAccounts=`"" + $SetupCredential.UserName + "`"" - if($PSBoundParameters.ContainsKey("ASSysAdminAccounts")) - { - foreach($AdminAccount in $ASSysAdminAccounts) - { - $Arguments += " `"$AdminAccount`"" - } - } - } - } - } - - # Replace sensitive values for verbose output - $Log = $Arguments - if($PID -ne "") - { - $Log = $Log.Replace($PID,"*****-*****-*****-*****-*****") - } - if($SecurityMode -eq "SQL") - { - $Log = $Log.Replace($SAPwd.GetNetworkCredential().Password,"********") - } - $LogVars = @("AgtSvcAccount","SQLSvcAccount","ASSvcAccount","ISSvcAccount") - foreach($LogVar in $LogVars) - { - if((Get-Variable -Name $LogVar).Value -ne "") - { - $Log = $Log.Replace((Get-Variable -Name $LogVar).Value.GetNetworkCredential().Password,"********") - } - } - - Write-Verbose "Path: $Path" - Write-Verbose "Arguments: $Log" - - switch($Action) - { - 'Prepare' - { - $Process = StartWin32Process -Path $Path -Arguments $Arguments -Credential $SetupCredential -AsTask - } - 'Complete' - { - $Process = StartWin32Process -Path $Path -Arguments $Arguments - } - } - Write-Verbose $Process - WaitForWin32ProcessEnd -Path $Path -Arguments $Arguments -Credential $SetupCredential - - # Additional "Prepare" actions - if($Action -eq "Prepare") - { - # Configure integration services - if($Features.Contains("IS")) - { - $MsDtsSrvrPath = (Get-ItemProperty -Path ("HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\" + $SQLVersion + "0\SSIS\ServiceConfigFile") -Name '(default)').'(default)' - if(Test-Path $MsDtsSrvrPath) - { - $MsDtsSrvr = [XML](Get-Content $MsDtsSrvrPath) - if($FailoverClusterNetworkName -eq "") - { - $FailoverClusterNetworkName = "." - } - if($InstanceName -eq "MSSQLSERVER") - { - $MsDtsSrvr.DtsServiceConfiguration.TopLevelFolders.Folder | Where-Object {$_.type -eq "SqlServerFolder"} | ForEach-Object {$_.ServerName = "$FailoverClusterNetworkName"} - } - else - { - $MsDtsSrvr.DtsServiceConfiguration.TopLevelFolders.Folder | Where-Object {$_.type -eq "SqlServerFolder"} | ForEach-Object {$_.ServerName = "$FailoverClusterNetworkName\$InstanceName"} - } - $MsDtsSrvr.Save($MsDtsSrvrPath) - Restart-Service -Name ("MsDtsServer" + $SQLVersion + "0") - } - } - } - - # Additional "Complete" actions - if($Action -eq "Complete") - { - # Workaround for Analysis Services IPv6 issue, see KB2658571 - if($Features.Contains("AS")) - { - $msmredirpath = [Environment]::ExpandEnvironmentVariables("%ProgramFiles(x86)%\Microsoft SQL Server\90\Shared\ASConfig\msmdredir.ini") - if(Test-Path ($msmredirpath)) - { - $msmdredir = [XML](Get-Content $msmredirpath) - if($msmdredir.ConfigurationSettings.Instances.Instance | Where-Object {$_.Name -eq $InstanceName} | ForEach-Object {$_.PortIPv6}) - { - $Entry = $msmdredir.ConfigurationSettings.Instances.Instance | Where-Object {$_.Name -eq $InstanceName} | ForEach-Object {$_.SelectSingleNode('PortIPv6')} - $msmdredir.ConfigurationSettings.Instances.Instance | Where-Object {$_.Name -eq $InstanceName} | ForEach-Object {$_.RemoveChild($Entry)} - $msmdredir.Save($msmredirpath) - Stop-ClusterGroup -Name $FailoverClusterGroup - Start-ClusterGroup -Name $FailoverClusterGroup - } - } - } - - # Create path for Integration Services - if($Features.Contains("IS") -and ($ISFileSystemFolder -ne "")) - { - if(($ISFileSystemFolder.Length -ge 2) -and ($ISFileSystemFolder.Substring(1,1) -eq ":")) - { - Invoke-Command -ScriptBlock { - $ISFileSystemFolder = $args[0] - if((Test-Path -Path $ISFileSystemFolder.Substring(0,2)) -and !(Test-Path -Path $ISFileSystemFolder)) - { - New-Item -Path $ISFileSystemFolder -ItemType Directory - } - } -ComputerName . -ArgumentList @($ISFileSystemFolder) - } - } - } - - if($ForceReboot -or ((Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction SilentlyContinue) -ne $null)) - { - if(!($SuppressReboot)) - { - $global:DSCMachineStatus = 1 - } - else - { - Write-Verbose "Suppressing reboot" - } - } - - if(!(Test-TargetResource @PSBoundParameters)) - { - throw New-TerminatingError -ErrorType TestFailedAfterSet -ErrorCategory InvalidResult - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Prepare","Complete")] - [System.String] - $Action, - - [System.String] - $SourcePath = "$PSScriptRoot\..\..\", - - [System.String] - $SourceFolder = "Source", - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [System.Management.Automation.PSCredential] - $SourceCredential, - - [System.Boolean] - $SuppressReboot, - - [System.Boolean] - $ForceReboot, - - [parameter(Mandatory = $true)] - [System.String] - $Features, - - [parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [System.String] - $InstanceID = $InstanceName, - - [System.String] - $PID, - - [System.String] - $UpdateEnabled = $True, - - [System.String] - $UpdateSource = ".\Updates", - - [System.String] - $SQMReporting, - - [System.String] - $ErrorReporting, - - [System.String] - $FailoverClusterGroup = "SQL Server ($InstanceName)", - - [parameter(Mandatory = $true)] - [System.String] - $FailoverClusterNetworkName, - - [System.String] - $FailoverClusterIPAddress, - - [System.String] - $InstallSharedDir, - - [System.String] - $InstallSharedWOWDir, - - [System.String] - $InstanceDir, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SQLSvcAccount, - - [System.Management.Automation.PSCredential] - $AgtSvcAccount = $SQLSvcAccount, - - [System.String] - $SQLCollation, - - [System.String[]] - $SQLSysAdminAccounts, - - [System.String] - $SecurityMode, - - [System.Management.Automation.PSCredential] - $SAPwd = $SetupCredential, - - [System.String] - $InstallSQLDataDir, - - [System.String] - $SQLUserDBDir, - - [System.String] - $SQLUserDBLogDir, - - [System.String] - $SQLTempDBDir, - - [System.String] - $SQLTempDBLogDir, - - [System.String] - $SQLBackupDir, - - [System.Management.Automation.PSCredential] - $ASSvcAccount = $SQLSvcAccount, - - [System.String] - $ASCollation, - - [System.String[]] - $ASSysAdminAccounts, - - [System.String] - $ASDataDir, - - [System.String] - $ASLogDir, - - [System.String] - $ASBackupDir, - - [System.String] - $ASTempDir, - - [System.String] - $ASConfigDir, - - [System.Management.Automation.PSCredential] - $ISSvcAccount = $SQLSvcAccount, - - [System.String] - $ISFileSystemFolder - ) - - switch($Action) - { - "Prepare" - { - $SQLData = Get-TargetResource @PSBoundParameters - - $result = $true - foreach($Feature in $Features.Split(",")) - { - if(!($SQLData.Features.Contains($Feature))) - { - $result = $false - } - } - } - "Complete" - { - if(Get-WmiObject -Namespace root/mscluster -Class MSCluster_ResourceGroup -ErrorAction SilentlyContinue | Where-Object {$_.Name -eq $FailoverClusterGroup}) - { - $result = $true - } - else - { - $result = $false - } - } - } - - $result -} - - -function GetSQLVersion -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory=$true)] - [String] - $Path - ) - - (Get-Item -Path $Path).VersionInfo.ProductVersion.Split(".")[0] -} - - -function GetFirstItemPropertyValue -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory=$true)] - [String] - $Path, - - [Parameter(Mandatory=$true)] - [String] - $Name - ) - - if(Get-ItemProperty -Path "$Path\$Name" -ErrorAction SilentlyContinue) - { - $FirstName = ((Get-ItemProperty -Path "$Path\$Name") | Get-Member -MemberType NoteProperty | Where-Object {$_.Name.Substring(0,2) -ne "PS"}).Name[0] - (Get-ItemProperty -Path "$Path\$Name" -Name $FirstName).$FirstName.TrimEnd("\") - } -} - - -function ConvertDecimalIP -{ - [CmdLetBinding()] - param( - [Parameter(Mandatory = $true)] - [Net.IPAddress] - $IPAddress - ) - - $i = 3 - $DecimalIP = 0 - $IPAddress.GetAddressBytes() | ForEach-Object { - $DecimalIP += $_ * [Math]::Pow(256,$i) - $i-- - } - - return [UInt32]$DecimalIP -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerFailoverClusterSetup/MSFT_xSQLServerFailoverClusterSetup.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerFailoverClusterSetup/MSFT_xSQLServerFailoverClusterSetup.schema.mof deleted file mode 100644 index 1de6c331..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerFailoverClusterSetup/MSFT_xSQLServerFailoverClusterSetup.schema.mof +++ /dev/null @@ -1,51 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerFailoverClusterSetup")] -class MSFT_xSQLServerFailoverClusterSetup : OMI_BaseResource -{ - [Key, Description("Prepare or Complete."), ValueMap{"Prepare","Complete"}, Values{"Prepare","Complete"}] String Action; - [Write, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Write, Description("Folder within the source path containing the source files for installation.")] String SourceFolder; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; - [Write, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to access SourcePath.")] String SourceCredential; - [Write, Description("Suppress reboot.")] Boolean SuppressReboot; - [Write, Description("Force reboot.")] Boolean ForceReboot; - [Required, Description("SQL features to be installed.")] String Features; - [Key, Description("SQL instance to be installed.")] String InstanceName; - [Write, Description("SQL instance ID, if different from InstanceName.")] String InstanceID; - [Write, Description("Product key for licensed installations.")] String PID; - [Write, Description("Enabled updates during installation.")] String UpdateEnabled; - [Write, Description("Source of updates to be applied during installation.")] String UpdateSource; - [Write, Description("Enable customer experience reporting.")] String SQMReporting; - [Write, Description("Enable error reporting.")] String ErrorReporting; - [Write, Description("Name of the resource group to be used for the SQL Server failover cluster.")] String FailoverClusterGroup; - [Required, Description("Network name for the SQL Server failover cluster.")] String FailoverClusterNetworkName; - [Write, Description("IPv4 address for the SQL Server failover cluster.")] String FailoverClusterIPAddress; - [Write, Description("Installation path for shared SQL files.")] String InstallSharedDir; - [Write, Description("Installation path for x86 shared SQL files.")] String InstallSharedWOWDir; - [Write, Description("Installation path for SQL instance files.")] String InstanceDir; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Service account for the SQL service.")] String SQLSvcAccount; - [Read, Description("Output username for the SQL service.")] String SQLSvcAccountUsername; - [Write, EmbeddedInstance("MSFT_Credential"), Description("Service account for the SQL Agent service.")] String AgtSvcAccount; - [Read, Description("Output username for the SQL Agent service.")] String AgtSvcAccountUsername; - [Write, Description("Collation for SQL.")] String SQLCollation; - [Write, Description("Array of accounts to be made SQL administrators.")] String SQLSysAdminAccounts[]; - [Write, Description("Security mode.")] String SecurityMode; - [Write, EmbeddedInstance("MSFT_Credential"), Description("SA password, if SecurityMode=SQL")] String SAPwd; - [Write, Description("Root path for SQL database files.")] String InstallSQLDataDir; - [Write, Description("Path for SQL database files.")] String SQLUserDBDir; - [Write, Description("Path for SQL log files.")] String SQLUserDBLogDir; - [Write, Description("Path for SQL TempDB files.")] String SQLTempDBDir; - [Write, Description("Path for SQL TempDB log files.")] String SQLTempDBLogDir; - [Write, Description("Path for SQL backup files.")] String SQLBackupDir; - [Write, EmbeddedInstance("MSFT_Credential"), Description("Service account for Analysus Services service.")] String ASSvcAccount; - [Read, Description("Output username for the Analysis Services service.")] String ASSvcAccountUsername; - [Write, Description("Collation for Analysis Services.")] String ASCollation; - [Write, Description("Array of accounts to be made Analysis Services admins.")] String ASSysAdminAccounts[]; - [Write, Description("Path for Analysis Services data files.")] String ASDataDir; - [Write, Description("Path for Analysis Services log files.")] String ASLogDir; - [Write, Description("Path for Analysis Services backup files.")] String ASBackupDir; - [Write, Description("Path for Analysis Services temp files.")] String ASTempDir; - [Write, Description("Path for Analysis Services config.")] String ASConfigDir; - [Write, EmbeddedInstance("MSFT_Credential"), Description("Service account for Integration Services service.")] String ISSvcAccount; - [Read, Description("Output username for the Integration Services service.")] String ISSvcAccountUsername; - [Write, Description("File system folder for Integration Services.")] String ISFileSystemFolder; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerFirewall/MSFT_xSQLServerFirewall.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerFirewall/MSFT_xSQLServerFirewall.psm1 deleted file mode 100644 index c7b6f20d..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerFirewall/MSFT_xSQLServerFirewall.psm1 +++ /dev/null @@ -1,806 +0,0 @@ -$script:currentPath = Split-Path -Path $MyInvocation.MyCommand.Path -Parent -Import-Module -Name (Join-Path -Path (Split-Path -Path (Split-Path -Path $script:currentPath -Parent) -Parent) -ChildPath 'xSQLServerHelper.psm1') - -<# - .SYNOPSIS - Returns the current state of the firewall rules. - - .PARAMETER SourcePath - The path to the root of the source files for installation. I.e and UNC path to a shared resource. Environment variables can be used in the path. - - .PARAMETER Features - One or more SQL feature to create default firewall rules for. Each feature should be seperated with a comma, i.e. 'SQLEngine,IS,RS'. - - .PARAMETER SourceCredential - Credentials used to access the path set in the parameter `SourcePath`. - - .PARAMETER InstanceName - Name of the instance to get firewall rules for. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter()] - [System.String] - $SourcePath, - - [Parameter(Mandatory = $true)] - [System.String] - $Features, - - [Parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [Parameter()] - [System.Management.Automation.PSCredential] - $SourceCredential - ) - - $InstanceName = $InstanceName.ToUpper() - - $SourcePath = [Environment]::ExpandEnvironmentVariables($SourcePath) - - if ($SourceCredential) - { - $newSmbMappingParameters = @{ - RemotePath = $SourcePath - UserName = "$($SourceCredential.GetNetworkCredential().Domain)\$($SourceCredential.GetNetworkCredential().UserName)" - Password = $($SourceCredential.GetNetworkCredential().Password) - } - - $null = New-SmbMapping @newSmbMappingParameters - } - - $pathToSetupExecutable = Join-Path -Path $SourcePath -ChildPath 'setup.exe' - - New-VerboseMessage -Message "Using path: $pathToSetupExecutable" - - $sqlVersion = Get-SqlMajorVersion -Path $pathToSetupExecutable - - if ($SourceCredential) - { - Remove-SmbMapping -RemotePath $SourcePath -Force - } - - if($InstanceName -eq 'MSSQLSERVER') - { - $databaseServiceName = 'MSSQLSERVER' - $reportServiceName = 'ReportServer' - $analysisServiceName = 'MSSQLServerOLAPService' - } - else - { - $databaseServiceName = 'MSSQL${0}' -f $InstanceName - $reportServiceName = 'ReportServer${0}' -f $InstanceName - $analysisServiceName = 'MSOLAP${0}' -f $InstanceName - } - - $integrationServiceName = 'MsDtsServer{0}0' -f $sqlVersion - $browserServiceName = 'SQLBrowser' - - $ensure = 'Present' - $featuresInstalled = '' - - $services = Get-Service - - foreach ($currentFeature in $Features.Split(',')) - { - switch ($currentFeature) - { - 'SQLENGINE' - { - if ($services | Where-Object {$_.Name -eq $databaseServiceName}) - { - $featuresInstalled += "$_," - - $pathToDatabaseEngineExecutable = Join-Path -Path (Get-SQLPath -Feature $_ -InstanceName $InstanceName) -ChildPath 'sqlservr.exe' - $databaseEngineFirewallRuleDisplayName = "SQL Server Database Engine instance $InstanceName" - - $databaseEngineFirewallRuleParameters = @{ - DisplayName = $databaseEngineFirewallRuleDisplayName - Program = $pathToDatabaseEngineExecutable - Enabled = 'True' - Profile = 'Any' - Direction = 'Inbound' - } - - if (Test-IsFirewallRuleInDesiredState @databaseEngineFirewallRuleParameters) - { - $databaseEngineFirewall = $true - } - else - { - $databaseEngineFirewall = $false - } - - $browserFirewallRuleDisplayName = 'SQL Server Browser' - - $browserFirewallRuleParameters = @{ - DisplayName = $browserFirewallRuleDisplayName - Service = $browserServiceName - Enabled = 'True' - Profile = 'Any' - Direction = 'Inbound' - } - - if (Test-IsFirewallRuleInDesiredState @browserFirewallRuleParameters) - { - $browserFirewall = $true - } - else - { - $browserFirewall = $false - } - } - } - - 'RS' - { - if ($services | Where-Object {$_.Name -eq $reportServiceName}) - { - $featuresInstalled += "$_," - - $reportingServicesNoSslProtocol = 'TCP' - $reportingServicesNoSslLocalPort = '80' - $reportingServicesNoSslFirewallRuleDisplayName = 'SQL Server Reporting Services 80' - - $reportingServicesNoSslFirewallRuleParameters = @{ - DisplayName = $reportingServicesNoSslFirewallRuleDisplayName - Protocol = $reportingServicesNoSslProtocol - LocalPort = $reportingServicesNoSslLocalPort - Enabled = 'True' - Profile = 'Any' - Direction = 'Inbound' - } - - $reportingServicesSslProtocol = 'TCP' - $reportingServicesSslLocalPort = '443' - $reportingServicesSslFirewallRuleDisplayName = 'SQL Server Reporting Services 443' - - $reportingServicesSslFirewallRuleParameters = @{ - DisplayName = $reportingServicesSslFirewallRuleDisplayName - Protocol = $reportingServicesSslProtocol - LocalPort = $reportingServicesSslLocalPort - Enabled = 'True' - Profile = 'Any' - Direction = 'Inbound' - } - - if ((Test-IsFirewallRuleInDesiredState @reportingServicesNoSslFirewallRuleParameters) ` - -and (Test-IsFirewallRuleInDesiredState @reportingServicesSslFirewallRuleParameters)) - { - $reportingServicesFirewall = $true - } - else - { - $reportingServicesFirewall = $false - } - } - } - - 'AS' - { - if ($services | Where-Object {$_.Name -eq $analysisServiceName}) - { - $featuresInstalled += "$_," - - $analysisServicesFirewallRuleDisplayName = "SQL Server Analysis Services instance $InstanceName" - - $analysisServicesFirewallRuleParameters = @{ - DisplayName = $analysisServicesFirewallRuleDisplayName - Service = $analysisServiceName - Enabled = 'True' - Profile = 'Any' - Direction = 'Inbound' - } - - if (Test-IsFirewallRuleInDesiredState @analysisServicesFirewallRuleParameters) - { - $analysisServicesFirewall = $true - } - else - { - $analysisServicesFirewall = $false - } - - $browserFirewallRuleDisplayName = 'SQL Server Browser' - - $browserFirewallRuleParameters = @{ - DisplayName = $browserFirewallRuleDisplayName - Service = $browserServiceName - Enabled = 'True' - Profile = 'Any' - Direction = 'Inbound' - } - - if (Test-IsFirewallRuleInDesiredState @browserFirewallRuleParameters) - { - $browserFirewall = $true - } - else - { - $browserFirewall = $false - } - } - } - - 'IS' - { - if ($services | Where-Object {$_.Name -eq $integrationServiceName}) - { - $featuresInstalled += "$_," - - $integrationServicesRuleApplicationDisplayName = 'SQL Server Integration Services Application' - $pathToIntegrationServicesExecutable = (Join-Path -Path (Join-Path -Path (Get-SQLPath -Feature 'IS' -SQLVersion $sqlVersion) -ChildPath 'Binn') -ChildPath 'MsDtsSrvr.exe') - - $integrationServicesFirewallRuleApplicationParameters = @{ - DisplayName = $integrationServicesRuleApplicationDisplayName - Program = $pathToIntegrationServicesExecutable - Enabled = 'True' - Profile = 'Any' - Direction = 'Inbound' - } - - $integrationServicesProtocol = 'TCP' - $integrationServicesLocalPort = '135' - $integrationServicesFirewallRuleDisplayName = 'SQL Server Integration Services Port' - - $integrationServicesFirewallRulePortParameters = @{ - DisplayName = $integrationServicesFirewallRuleDisplayName - Protocol = $integrationServicesProtocol - LocalPort = $integrationServicesLocalPort - Enabled = 'True' - Profile = 'Any' - Direction = 'Inbound' - } - - if ((Test-IsFirewallRuleInDesiredState @integrationServicesFirewallRuleApplicationParameters) ` - -and (Test-IsFirewallRuleInDesiredState @integrationServicesFirewallRulePortParameters)) - { - $integrationServicesFirewall = $true - } - else - { - $integrationServicesFirewall = $false - } - } - } - } - } - - if ( - ($Features -match 'SQLENGINE' -and -not ($databaseEngineFirewall -and $browserFirewall)) ` - -or ($Features -match 'RS' -and -not $reportingServicesFirewall) ` - -or ($Features -match 'AS' -and -not ($analysisServicesFirewall -and $browserFirewall)) ` - -or ($Features -match 'IS' -and -not $integrationServicesFirewall) - ) - { - $ensure = 'Absent' - } - - - $featuresInstalled = $featuresInstalled.Trim(',') - - return @{ - Ensure = $ensure - SourcePath = $SourcePath - Features = $featuresInstalled - InstanceName = $InstanceName - DatabaseEngineFirewall = $databaseEngineFirewall - BrowserFirewall = $browserFirewall - ReportingServicesFirewall = $reportingServicesFirewall - AnalysisServicesFirewall = $analysisServicesFirewall - IntegrationServicesFirewall = $integrationServicesFirewall - } -} - -<# - .SYNOPSIS - Creates, updates or remove the firewall rules. - - .PARAMETER Ensure - If the firewall rules should be present ('Present') or absent ('Absent'). The default value is 'Present'. - - .PARAMETER SourcePath - The path to the root of the source files for installation. I.e and UNC path to a shared resource. Environment variables can be used in the path. - - .PARAMETER Features - One or more SQL feature to create default firewall rules for. Each feature should be seperated with a comma, i.e. 'SQLEngine,IS,RS'. - - .PARAMETER SourceCredential - Credentials used to access the path set in the parameter `SourcePath`. - - .PARAMETER InstanceName - Name of the instance to get firewall rules for. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter()] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present', - - [Parameter()] - [System.String] - $SourcePath, - - [Parameter(Mandatory = $true)] - [System.String] - $Features, - - [Parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [Parameter()] - [System.Management.Automation.PSCredential] - $SourceCredential - ) - - $InstanceName = $InstanceName.ToUpper() - - $SourcePath = [Environment]::ExpandEnvironmentVariables($SourcePath) - - if ($SourceCredential) - { - $newSmbMappingParameters = @{ - RemotePath = $SourcePath - UserName = "$($SourceCredential.GetNetworkCredential().Domain)\$($SourceCredential.GetNetworkCredential().UserName)" - Password = $($SourceCredential.GetNetworkCredential().Password) - } - - $null = New-SmbMapping @newSmbMappingParameters - } - - $path = Join-Path -Path $SourcePath -ChildPath 'setup.exe' - - New-VerboseMessage -Message "Using path: $path" - - $sqlVersion = Get-SqlMajorVersion -Path $path - - if ($SourceCredential) - { - Remove-SmbMapping -RemotePath $SourcePath -Force - } - - if ($InstanceName -eq 'MSSQLSERVER') - { - $analysisServiceName = 'MSSQLServerOLAPService' - } - else - { - $analysisServiceName = 'MSOLAP${0}' -f $InstanceName - } - - $browserServiceName = 'SQLBrowser' - - $getTargetResourceResult = Get-TargetResource -SourcePath $SourcePath -Features $Features -InstanceName $InstanceName - - foreach ($currentFeature in $getTargetResourceResult.Features.Split(',')) - { - switch ($currentFeature) - { - 'SQLENGINE' - { - if (-not ($getTargetResourceResult.DatabaseEngineFirewall)) - { - $pathToDatabaseEngineExecutable = Join-Path -Path (Get-SQLPath -Feature $_ -InstanceName $InstanceName) -ChildPath 'sqlservr.exe' - $databaseEngineFirewallRuleDisplayName = "SQL Server Database Engine instance $InstanceName" - - $databaseEngineFirewallRuleParameters = @{ - DisplayName = $databaseEngineFirewallRuleDisplayName - Program = $pathToDatabaseEngineExecutable - Enabled = 'True' - Profile = 'Any' - Direction = 'Inbound' - } - - if (-not (Test-IsFirewallRuleInDesiredState @databaseEngineFirewallRuleParameters)) - { - New-NetFirewallRule @databaseEngineFirewallRuleParameters - } - } - - if (-not ($getTargetResourceResult.BrowserFirewall)) - { - $browserFirewallRuleDisplayName = 'SQL Server Browser' - - $browserFirewallRuleParameters = @{ - DisplayName = $browserFirewallRuleDisplayName - Service = $browserServiceName - Enabled = 'True' - Profile = 'Any' - Direction = 'Inbound' - } - - if (-not (Test-IsFirewallRuleInDesiredState @browserFirewallRuleParameters)) - { - New-NetFirewallRule @browserFirewallRuleParameters - } - } - } - - 'RS' - { - if (-not ($getTargetResourceResult.ReportingServicesFirewall)) - { - $reportingServicesNoSslProtocol = 'TCP' - $reportingServicesNoSslLocalPort = '80' - $reportingServicesNoSslFirewallRuleDisplayName = 'SQL Server Reporting Services 80' - - $reportingServicesNoSslFirewallRuleParameters = @{ - DisplayName = $reportingServicesNoSslFirewallRuleDisplayName - Protocol = $reportingServicesNoSslProtocol - LocalPort = $reportingServicesNoSslLocalPort - Enabled = 'True' - Profile = 'Any' - Direction = 'Inbound' - } - - if (-not (Test-IsFirewallRuleInDesiredState @reportingServicesNoSslFirewallRuleParameters)) - { - New-NetFirewallRule @reportingServicesNoSslFirewallRuleParameters - } - - $reportingServicesSslProtocol = 'TCP' - $reportingServicesSslLocalPort = '443' - $reportingServicesSslFirewallRuleDisplayName = 'SQL Server Reporting Services 443' - - $reportingServicesSslFirewallRuleParameters = @{ - DisplayName = $reportingServicesSslFirewallRuleDisplayName - Protocol = $reportingServicesSslProtocol - LocalPort = $reportingServicesSslLocalPort - Enabled = 'True' - Profile = 'Any' - Direction = 'Inbound' - } - - if (-not (Test-IsFirewallRuleInDesiredState @reportingServicesSslFirewallRuleParameters)) - { - New-NetFirewallRule @reportingServicesSslFirewallRuleParameters - } - } - } - - 'AS' - { - if (-not ($getTargetResourceResult.AnalysisServicesFirewall)) - { - $analysisServicesFirewallRuleDisplayName = "SQL Server Analysis Services instance $InstanceName" - - $analysisServicesFirewallRuleParameters = @{ - DisplayName = $analysisServicesFirewallRuleDisplayName - Service = $analysisServiceName - Enabled = 'True' - Profile = 'Any' - Direction = 'Inbound' - } - - if(-not (Test-IsFirewallRuleInDesiredState @analysisServicesFirewallRuleParameters)) - { - New-NetFirewallRule @analysisServicesFirewallRuleParameters - } - } - - if (-not ($getTargetResourceResult.BrowserFirewall)) - { - $browserFirewallRuleDisplayName = 'SQL Server Browser' - - $browserFirewallRuleParameters = @{ - DisplayName = $browserFirewallRuleDisplayName - Service = $browserServiceName - Enabled = 'True' - Profile = 'Any' - Direction = 'Inbound' - } - - if (-not (Test-IsFirewallRuleInDesiredState @browserFirewallRuleParameters)) - { - New-NetFirewallRule @browserFirewallRuleParameters - } - } - } - - 'IS' - { - if (!($getTargetResourceResult.IntegrationServicesFirewall)) - { - $integrationServicesRuleApplicationDisplayName = 'SQL Server Integration Services Application' - $pathToIntegrationServicesExecutable = (Join-Path -Path (Join-Path -Path (Get-SQLPath -Feature 'IS' -SQLVersion $sqlVersion) -ChildPath 'Binn') -ChildPath 'MsDtsSrvr.exe') - - $integrationServicesFirewallRuleApplicationParameters = @{ - DisplayName = $integrationServicesRuleApplicationDisplayName - Program = $pathToIntegrationServicesExecutable - Enabled = 'True' - Profile = 'Any' - Direction = 'Inbound' - } - - if (-not (Test-IsFirewallRuleInDesiredState @integrationServicesFirewallRuleApplicationParameters)) - { - New-NetFirewallRule @integrationServicesFirewallRuleApplicationParameters - } - - $integrationServicesProtocol = 'TCP' - $integrationServicesLocalPort = '135' - $integrationServicesFirewallRuleDisplayName = 'SQL Server Integration Services Port' - - $integrationServicesFirewallRulePortParameters = @{ - DisplayName = $integrationServicesFirewallRuleDisplayName - Protocol = $integrationServicesProtocol - LocalPort = $integrationServicesLocalPort - Enabled = 'True' - Profile = 'Any' - Direction = 'Inbound' - } - - if (-not (Test-IsFirewallRuleInDesiredState @integrationServicesFirewallRulePortParameters)) - { - New-NetFirewallRule @integrationServicesFirewallRulePortParameters - } - } - } - } - } - - if (-not (Test-TargetResource -SourcePath $SourcePath -Features $Features -InstanceName $InstanceName)) - { - throw New-TerminatingError -ErrorType TestFailedAfterSet -ErrorCategory InvalidResult - } -} - -<# - .SYNOPSIS - Test if the firewall rules are in desired state. - - .PARAMETER Ensure - If the firewall rules should be present ('Present') or absent ('Absent'). The default value is 'Present'. - - .PARAMETER SourcePath - The path to the root of the source files for installation. I.e and UNC path to a shared resource. Environment variables can be used in the path. - - .PARAMETER Features - One or more SQL feature to create default firewall rules for. Each feature should be seperated with a comma, i.e. 'SQLEngine,IS,RS'. - - .PARAMETER SourceCredential - Credentials used to access the path set in the parameter `SourcePath`. - - .PARAMETER InstanceName - Name of the instance to get firewall rules for. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter()] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present', - - [Parameter()] - [System.String] - $SourcePath, - - [Parameter(Mandatory = $true)] - [System.String] - $Features, - - [Parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [Parameter()] - [System.Management.Automation.PSCredential] - $SourceCredential - ) - - $getTargetResourceResult = Get-TargetResource -SourcePath $SourcePath -Features $Features -InstanceName $InstanceName - - return ($getTargetResourceResult.Ensure -eq $Ensure) -} - -<# - .SYNOPSIS - Get the path to SQL Server executables. - - .PARAMETER Feature - String containing the feature name for which to get the path. - - .PARAMETER InstanceName - String containing the name of the instance for which to get the path. - - .PARAMETER SQLVersion - String containing the major version of the SQL server to get the path for. - This is used to evaluate the Integration Services version number. -#> -function Get-SQLPath -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory=$true)] - [String] - $Feature, - - [Parameter()] - [String] - $InstanceName, - - [Parameter()] - [String] - $SQLVersion - ) - - if (($Feature -eq 'SQLENGINE') -or ($Feature -eq 'AS')) - { - switch ($Feature) - { - 'SQLENGINE' - { - $productinstanceId = 'SQL' - } - - 'AS' - { - $productinstanceId = 'OLAP' - } - } - - $instanceId = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\$($productinstanceId)" -Name $InstanceName).$InstanceName - $path = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\$($instanceId)\setup" -Name 'SQLBinRoot').SQLBinRoot - } - - if ($Feature -eq 'IS') - { - $path = (Get-ItemProperty -Path ("HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\$($SQLVersion)0\DTS\setup") -Name 'SQLPath').SQLPath - } - - return $path -} - -<# - .SYNOPSIS - Evaluates if the firewall rule is in desired state. - - .PARAMETER DisplayName - String containing the display name for the firewall rule. - - .PARAMETER Enabled - String containing either 'True' or 'False' meaning if the firewall rule should be active or not. - - .PARAMETER Profile - String containing one or more profiles to which the firewall rule is assigned. - - .PARAMETER Direction - String containing the direction of traffic for the the firewall rule. It can be either 'Inbound' or 'Outbound'. - - .PARAMETER Program - String containing the path to an executable. This paramater is optional. - - .PARAMETER Service - String containing the name of a service for the firewall rule. This parameter is optional. - - .PARAMETER Protocol - String containing the protocol for the local port parameter. This parameter is optional. - - .PARAMETER LocalPort - String containing the local port for the firewall rule. This parameter is optional, with the exception that if - the parameter Protocol is specified this parameter must also be specified. -#> -function Test-IsFirewallRuleInDesiredState -{ - [OutputType([System.Boolean])] - [CmdletBinding()] - param - ( - [Parameter(Mandatory=$true)] - [String] - $DisplayName, - - [Parameter(Mandatory=$true)] - [ValidateSet('True','False')] - [String] - $Enabled, - - [Parameter(Mandatory=$true)] - [String[]] - [ValidateSet('Any','Domain','Private','Public','NotApplicable')] - $Profile, - - [Parameter(Mandatory=$true)] - [ValidateSet('Inbound','Outbound')] - [String] - $Direction, - - [Parameter()] - [String] - $Program, - - [Parameter()] - [String] - $Service, - - [Parameter()] - [ValidateSet('TCP','UDP','ICMPv4','ICMPv6')] - [String] - $Protocol, - - [Parameter()] - [String] - $LocalPort - ) - - $isRuleInDesiredState = $false - - if ($firewallRule = Get-NetFirewallRule -DisplayName $DisplayName -ErrorAction SilentlyContinue) - { - if (($firewallRule.Enabled -eq $Enabled) -and ($firewallRule.Profile -eq $Profile) -and ($firewallRule.Direction -eq $Direction)) - { - if ($PSBoundParameters.ContainsKey('Program')) - { - if ($firewallApplicationFilter = Get-NetFirewallApplicationFilter -AssociatedNetFirewallRule $firewallRule -ErrorAction SilentlyContinue) - { - if ($firewallApplicationFilter.Program -eq $Program) - { - $isRuleInDesiredState = $true - } - } - } - - if ($PSBoundParameters.ContainsKey('Service')) - { - if ($firewallServiceFilter = Get-NetFirewallServiceFilter -AssociatedNetFirewallRule $firewallRule -ErrorAction SilentlyContinue) - { - if ($firewallServiceFilter.Service -eq $Service) - { - $isRuleInDesiredState = $true - } - } - } - - if ($PSBoundParameters.ContainsKey('Protocol') -and $PSBoundParameters.ContainsKey('LocalPort')) - { - if ($firewallPortFilter = Get-NetFirewallPortFilter -AssociatedNetFirewallRule $firewallRule -ErrorAction SilentlyContinue) - { - if ($firewallPortFilter.Protocol -eq $Protocol -and $firewallPortFilter.LocalPort -eq $LocalPort) - { - $isRuleInDesiredState = $true - } - } - } - } - } - - return $isRuleInDesiredState -} - -<# - .SYNOPSIS - Returns the SQL Server major version from the setup.exe executable provided in the Path parameter. - - .PARAMETER Path - String containing the path to the SQL Server setup.exe executable. -#> -function Get-SqlMajorVersion -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory=$true)] - [String] - $path - ) - - (Get-Item -Path $path).VersionInfo.ProductVersion.Split('.')[0] -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerFirewall/MSFT_xSQLServerFirewall.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerFirewall/MSFT_xSQLServerFirewall.schema.mof deleted file mode 100644 index 8879b045..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerFirewall/MSFT_xSQLServerFirewall.schema.mof +++ /dev/null @@ -1,14 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerFirewall")] -class MSFT_xSQLServerFirewall : OMI_BaseResource -{ - [Write, Description("An enumerated value that describes if the SQL firewall rules are is expected to be enabled on the machine.\nPresent {default} \nAbsent \n"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("UNC path to the root of the source files for installation.")] String SourcePath; - [Key, Description("SQL features to enable firewall rules for.")] String Features; - [Key, Description("SQL instance to enable firewall rules for.")] String InstanceName; - [Read, Description("Is the firewall rule for the Database Engine enabled?")] boolean DatabaseEngineFirewall; - [Read, Description("Is the firewall rule for the Browser enabled?")] boolean BrowserFirewall; - [Read, Description("Is the firewall rule for Reporting Services enabled?")] boolean ReportingServicesFirewall; - [Read, Description("Is the firewall rule for Analysis Services enabled?")] boolean AnalysisServicesFirewall; - [Read, Description("Is the firewall rule for the Integration Services enabled?")] boolean IntegrationServicesFirewall; - [Write, EmbeddedInstance("MSFT_Credential"), Description("Credentials used to access the path set in the parameter 'SourcePath'.")] String SourceCredential; - }; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerLogin/MSFT_xSQLServerLogin.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerLogin/MSFT_xSQLServerLogin.psm1 deleted file mode 100644 index 3bbd95ae..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerLogin/MSFT_xSQLServerLogin.psm1 +++ /dev/null @@ -1,615 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path (Split-Path $PSScriptRoot -Parent) -Parent) ` - -ChildPath 'xSQLServerHelper.psm1') ` - -Force - -<# - .SYNOPSIS - Gets the specified login by name. - - .PARAMETER Name - The name of the login to retrieve. - - .PARAMETER SQLServer - Hostname of the SQL Server to retrieve the login from. - - .PARAMETER SQLInstanceName - Name of the SQL instance to retrieve the login from. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [System.String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [System.String] - $SQLInstanceName - ) - - $serverObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - Write-Verbose 'Getting SQL logins' - New-VerboseMessage -Message "Getting the login '$Name' from '$SQLServer\$SQLInstanceName'" - - $login = $serverObject.Logins[$Name] - - if ( $login ) - { - $Ensure = 'Present' - } - else - { - $Ensure = 'Absent' - } - - New-VerboseMessage -Message "The login '$Name' is $ensure from the '$SQLServer\$SQLInstanceName' instance." - - $returnValue = @{ - Ensure = $Ensure - Name = $Name - LoginType = $login.LoginType - SQLServer = $SQLServer - SQLInstanceName = $SQLInstanceName - } - - if ( $login.LoginType -eq 'SqlLogin' ) - { - $returnValue.Add('LoginMustChangePassword',$login.MustChangePassword) - $returnValue.Add('LoginPasswordExpirationEnabled',$login.PasswordExpirationEnabled) - $returnValue.Add('LoginPasswordPolicyEnforced',$login.PasswordPolicyEnforced) - } - - return $returnValue -} - -<# - .SYNOPSIS - Creates a login. - - .PARAMETER Ensure - Specifies if the login to exist. Default is 'Present'. - - .PARAMETER Name - The name of the login to retrieve. - - .PARAMETER LoginType - The type of login to create. Default is 'WindowsUser' - - .PARAMETER SQLServer - Hostname of the SQL Server to create the login on. - - .PARAMETER SQLInstanceName - Name of the SQL instance to create the login on. - - .PARAMETER LoginCredential - The credential containing the password for a SQL Login. Only applies if the login type is SqlLogin. - - .PARAMETER LoginMustChangePassword - Specifies if the login is required to have its password change on the next login. Only applies to SQL Logins. Default is $true. - - .PARAMETER LoginPasswordExpirationEnabled - Specifies if the login password is required to expire in accordance to the operating system security policy. Only applies to SQL Logins. Default is $true. - - .PARAMETER LoginPasswordPolicyEnforced - Specifies if the login password is required to conform to the password policy specified in the system security policy. Only applies to SQL Logins. Default is $true. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter()] - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present', - - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter()] - [ValidateSet( - 'WindowsUser', - 'WindowsGroup', - 'SqlLogin', - 'Certificate', - 'AsymmetricKey', - 'ExternalUser', - 'ExternalGroup' - )] - [System.String] - $LoginType = 'WindowsUser', - - [Parameter(Mandatory = $true)] - [System.String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [System.String] - $SQLInstanceName, - - [Parameter()] - [System.Management.Automation.PSCredential] - $LoginCredential, - - [Parameter()] - [bool] - $LoginMustChangePassword = $true, - - [Parameter()] - [bool] - $LoginPasswordExpirationEnabled = $true, - - [Parameter()] - [bool] - $LoginPasswordPolicyEnforced = $true - ) - - $serverObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - switch ( $Ensure ) - { - 'Present' - { - if ( $serverObject.Logins[$Name] ) - { - $login = $serverObject.Logins[$Name] - - if ( $login.LoginType -eq 'SqlLogin' ) - { - - - if ( $login.PasswordExpirationEnabled -ne $LoginPasswordExpirationEnabled ) - { - New-VerboseMessage -Message "Setting PasswordExpirationEnabled to '$LoginPasswordExpirationEnabled' for the login '$Name' on the '$SQLServer\$SQLInstanceName' instance." - $login.PasswordExpirationEnabled = $LoginPasswordExpirationEnabled - Update-SQLServerLogin -Login $login - } - - if ( $login.PasswordPolicyEnforced -ne $LoginPasswordPolicyEnforced ) - { - New-VerboseMessage -Message "Setting PasswordPolicyEnforced to '$LoginPasswordPolicyEnforced' for the login '$Name' on the '$SQLServer\$SQLInstanceName' instance." - $login.PasswordPolicyEnforced = $LoginPasswordPolicyEnforced - Update-SQLServerLogin -Login $login - } - - # Set the password if it is specified - if ( $LoginCredential ) - { - Set-SQLServerLoginPassword -Login $login -SecureString $LoginCredential.Password - } - } - } - else - { - # Some login types need additional work. These will need to be fleshed out more in the future - if ( @('Certificate','AsymmetricKey','ExternalUser','ExternalGroup') -contains $LoginType ) - { - throw New-TerminatingError -ErrorType LoginTypeNotImplemented -FormatArgs $LoginType -ErrorCategory NotImplemented - } - - if ( ( $LoginType -eq 'SqlLogin' ) -and ( -not $LoginCredential ) ) - { - throw New-TerminatingError -ErrorType LoginCredentialNotFound -FormatArgs $Name -ErrorCategory ObjectNotFound - } - - New-VerboseMessage -Message "Adding the login '$Name' to the '$SQLServer\$SQLInstanceName' instance." - - $login = New-Object -TypeName Microsoft.SqlServer.Management.Smo.Login -ArgumentList $serverObject,$Name - $login.LoginType = $LoginType - - switch ($LoginType) - { - SqlLogin - { - # Verify the instance is in Mixed authentication mode - if ( $serverObject.LoginMode -notmatch 'Mixed|Integrated' ) - { - throw New-TerminatingError -ErrorType IncorrectLoginMode -FormatArgs $SQLServer,$SQLInstanceName,$serverObject.LoginMode -ErrorCategory NotImplemented - } - - $login.PasswordPolicyEnforced = $LoginPasswordPolicyEnforced - $login.PasswordExpirationEnabled = $LoginPasswordExpirationEnabled - if ( $LoginMustChangePassword ) - { - $LoginCreateOptions = [Microsoft.SqlServer.Management.Smo.LoginCreateOptions]::MustChange - } - else - { - $LoginCreateOptions = [Microsoft.SqlServer.Management.Smo.LoginCreateOptions]::None - } - - New-SQLServerLogin -Login $login -LoginCreateOptions $LoginCreateOptions -SecureString $LoginCredential.Password -ErrorAction Stop - } - - default - { - New-SQLServerLogin -Login $login - } - } - } - } - - 'Absent' - { - if ( $serverObject.Logins[$Name] ) - { - New-VerboseMessage -Message "Dropping the login '$Name' from the '$SQLServer\$SQLInstanceName' instance." - Remove-SQLServerLogin -Login $serverObject.Logins[$Name] - } - } - } -} - -<# - .SYNOPSIS - Tests to verify the login exists and the properties are correctly set. - - .PARAMETER Ensure - Specifies if the login is supposed to exist. Default is 'Present'. - - .PARAMETER Name - The name of the login. - - .PARAMETER LoginType - The type of login. Default is 'WindowsUser' - - .PARAMETER SQLServer - Hostname of the SQL Server. - - .PARAMETER SQLInstanceName - Name of the SQL instance. - - .PARAMETER LoginCredential - The credential containing the password for a SQL Login. Only applies if the login type is SqlLogin. - - .PARAMETER LoginMustChangePassword - Specifies if the login is required to have its password change on the next login. Only applies to SQL Logins. Default is $true. - - .PARAMETER LoginPasswordExpirationEnabled - Specifies if the login password is required to expire in accordance to the operating system security policy. Only applies to SQL Logins. Default is $true. - - .PARAMETER LoginPasswordPolicyEnforced - Specifies if the login password is required to conform to the password policy specified in the system security policy. Only applies to SQL Logins. Default is $true. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter()] - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present', - - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter()] - [ValidateSet('WindowsUser', - 'WindowsGroup', - 'SqlLogin', - 'Certificate', - 'AsymmetricKey', - 'ExternalUser', - 'ExternalGroup' - )] - [System.String] - $LoginType = 'WindowsUser', - - [Parameter(Mandatory = $true)] - [System.String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [System.String] - $SQLInstanceName, - - [Parameter()] - [System.Management.Automation.PSCredential] - $LoginCredential, - - [Parameter()] - [bool] - $LoginMustChangePassword = $true, - - [Parameter()] - [bool] - $LoginPasswordExpirationEnabled = $true, - - [Parameter()] - [bool] - $LoginPasswordPolicyEnforced = $true - ) - - # Assume the test will pass - $testPassed = $true - - $getParams = @{ - Name = $Name - SQLServer = $SQLServer - SQLInstanceName = $SQLInstanceName - } - - $loginInfo = Get-TargetResource @getParams - - if ( $Ensure -ne $loginInfo.Ensure ) - { - New-VerboseMessage -Message "The login '$Name' on the instance '$SQLServer\$SQLInstanceName' is $($loginInfo.Ensure) rather than $Ensure" - $testPassed = $false - } - - if ( $Ensure -eq 'Present' ) - { - if ( $LoginType -ne $loginInfo.LoginType ) - { - New-VerboseMessage -Message "The login '$Name' on the instance '$SQLServer\$SQLInstanceName' is a $($loginInfo.LoginType) rather than $LoginType" - $testPassed = $false - } - - if ( $LoginType -eq 'SqlLogin' ) - { - if ( $LoginPasswordExpirationEnabled -ne $loginInfo.LoginPasswordExpirationEnabled ) - { - New-VerboseMessage -Message "The login '$Name' on the instance '$SQLServer\$SQLInstanceName' has PasswordExpirationEnabled set to $($loginInfo.LoginPasswordExpirationEnabled) rather than $LoginPasswordExpirationEnabled" - $testPassed = $false - } - - if ( $LoginPasswordPolicyEnforced -ne $loginInfo.LoginPasswordPolicyEnforced ) - { - New-VerboseMessage -Message "The login '$Name' on the instance '$SQLServer\$SQLInstanceName' has PasswordPolicyEnforced set to $($loginInfo.LoginPasswordPolicyEnforced) rather than $LoginPasswordPolicyEnforced" - $testPassed = $false - } - - # If testPassed is still true and a login credential was specified, test the password - if ( $testPassed -and $LoginCredential ) - { - $userCred = [System.Management.Automation.PSCredential]::new($Name, $LoginCredential.Password) - - try - { - $serverObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName -SetupCredential $userCred - } - catch - { - New-VerboseMessage -Message "Password validation failed for the login '$Name'." - $testPassed = $false - } - } - } - } - - return $testPassed -} - -<# - .SYNOPSIS - Alters a login. - - .PARAMETER Login - The Login object to alter. - - .NOTES - This function allows us to more easily write mocks. -#> -function Update-SQLServerLogin -{ - param - ( - [Parameter(Mandatory = $true)] - [Microsoft.SqlServer.Management.Smo.Login] - $Login - ) - - try - { - $originalErrorActionPreference = $ErrorActionPreference - $ErrorActionPreference = 'Stop' - - $Login.Alter() - } - catch - { - throw New-TerminatingError -ErrorType AlterLoginFailed -FormatArgs $Login.Name -ErrorCategory NotSpecified - } - finally - { - $ErrorActionPreference = $originalErrorActionPreference - } -} - -<# - .SYNOPSIS - Creates a login. - - .PARAMETER Login - The Login object to create. - - .PARAMETER LoginCreateOptions - The LoginCreateOptions object to use when creating a SQL login. - - .PARAMETER SecureString - The SecureString object that contains the password for a SQL login. - - .EXAMPLE - CreateLogin -Login $login -LoginCreateOptions $LoginCreateOptions -SecureString $LoginCredential.Password -ErrorAction Stop - - .EXAMPLE - CreateLogin -Login $login - - .NOTES - This function allows us to more easily write mocks. -#> -function New-SQLServerLogin -{ - [CmdletBinding(DefaultParameterSetName = 'WindowsLogin')] - param - ( - [Parameter(Mandatory = $true, ParameterSetName = 'WindowsLogin')] - [Parameter(Mandatory = $true, ParameterSetName = 'SqlLogin')] - [Microsoft.SqlServer.Management.Smo.Login] - $Login, - - [Parameter(Mandatory = $true, ParameterSetName = 'SqlLogin')] - [Microsoft.SqlServer.Management.Smo.LoginCreateOptions] - $LoginCreateOptions, - - [Parameter(Mandatory = $true, ParameterSetName = 'SqlLogin')] - [System.Security.SecureString] - $SecureString - ) - - switch ( $PSCmdlet.ParameterSetName ) - { - 'SqlLogin' - { - try - { - $originalErrorActionPreference = $ErrorActionPreference - $ErrorActionPreference = 'Stop' - - $login.Create($SecureString,$LoginCreateOptions) - } - catch [Microsoft.SqlServer.Management.Smo.FailedOperationException] - { - if ( $_.Exception.InnerException.InnerException.InnerException -match 'Password validation failed' ) - { - throw New-TerminatingError -ErrorType PasswordValidationFailed -FormatArgs $Name,$_.Exception.InnerException.InnerException.InnerException -ErrorCategory SecurityError - } - else - { - throw New-TerminatingError -ErrorType LoginCreationFailedFailedOperation -FormatArgs $Name -ErrorCategory NotSpecified - } - } - catch - { - throw New-TerminatingError -ErrorType LoginCreationFailedSqlNotSpecified -FormatArgs $Name -ErrorCategory NotSpecified - } - finally - { - $ErrorActionPreference = $originalErrorActionPreference - } - } - - 'WindowsLogin' - { - try - { - $originalErrorActionPreference = $ErrorActionPreference - $ErrorActionPreference = 'Stop' - - $login.Create() - } - catch - { - throw New-TerminatingError -ErrorType LoginCreationFailedWindowsNotSpecified -FormatArgs $Name -ErrorCategory NotSpecified - } - finally - { - $ErrorActionPreference = $originalErrorActionPreference - } - } - } -} - -<# - .SYNOPSIS - Drops a login. - - .PARAMETER Login - The Login object to drop. - - .NOTES - This function allows us to more easily write mocks. -#> -function Remove-SQLServerLogin -{ - param - ( - [Parameter(Mandatory = $true)] - [Microsoft.SqlServer.Management.Smo.Login] - $Login - ) - - try - { - $originalErrorActionPreference = $ErrorActionPreference - $ErrorActionPreference = 'Stop' - - $Login.Drop() - } - catch - { - throw New-TerminatingError -ErrorType DropLoginFailed -FormatArgs $Login.Name -ErrorCategory NotSpecified - } - finally - { - $ErrorActionPreference = $originalErrorActionPreference - } -} - -<# - .SYNOPSIS - Changes the password of a SQL Login. - - .PARAMETER Login - The Login object to change the password on. - - .PARAMETER SecureString - The SecureString object that contains the password for a SQL login. - - .NOTES - This function allows us to more easily write mocks. -#> -function Set-SQLServerLoginPassword -{ - param - ( - [Parameter(Mandatory = $true)] - [Microsoft.SqlServer.Management.Smo.Login] - $Login, - - [Parameter(Mandatory = $true)] - [System.Security.SecureString] - $SecureString - ) - - try - { - $originalErrorActionPreference = $ErrorActionPreference - $ErrorActionPreference = 'Stop' - - $Login.ChangePassword($SecureString) - } - catch [Microsoft.SqlServer.Management.Smo.FailedOperationException] - { - if ( $_.Exception.InnerException.InnerException.InnerException -match 'Password validation failed' ) - { - throw New-TerminatingError -ErrorType PasswordValidationFailed -FormatArgs $Name,$_.Exception.InnerException.InnerException.InnerException -ErrorCategory SecurityError - } - else - { - throw New-TerminatingError -ErrorType PasswordChangeFailed -FormatArgs $Name -ErrorCategory NotSpecified - } - } - catch - { - throw New-TerminatingError -ErrorType PasswordChangeFailed -FormatArgs $Name -ErrorCategory NotSpecified - } - finally - { - $ErrorActionPreference = $originalErrorActionPreference - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerLogin/MSFT_xSQLServerLogin.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerLogin/MSFT_xSQLServerLogin.schema.mof deleted file mode 100644 index a8866341..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerLogin/MSFT_xSQLServerLogin.schema.mof +++ /dev/null @@ -1,15 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerLogin")] -class MSFT_xSQLServerLogin : OMI_BaseResource -{ - [Write, Description("The specified login is Present or Absent. Default is Present."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Key, Description("The name of the login.")] String Name; - [Write, Description("The type of login to be created. If LoginType is 'WindowsUser' or 'WindowsGroup' then provide the name in the format DOMAIN\name. Default is WindowsUser. Unsupported login types are Certificate, AsymmetricKey, ExternalUser, and ExternalGroup."), - ValueMap{"WindowsUser","WindowsGroup","SqlLogin","Certificate","AsymmetricKey","ExternalUser","ExternalGroup"}, - Values{"WindowsUser","WindowsGroup","SqlLogin","Certificate","AsymmetricKey","ExternalUser","ExternalGroup"}] String LoginType; - [Key, Description("The hostname of the SQL Server to be configured.")] String SQLServer; - [Key, Description("Name of the SQL instance to be configured.")] String SQLInstanceName; - [Write, EmbeddedInstance("MSFT_Credential"), Description("If LoginType is 'SqlLogin' then a PSCredential is needed for the password to the login.")] String LoginCredential; - [Write, Description("Specifies if the login is required to have its password change on the next login. Only applies to SQL Logins. Default is $true.")] Boolean LoginMustChangePassword; - [Write, Description("Specifies if the login password is required to expire in accordance to the operating system security policy. Only applies to SQL Logins. Default is $true.")] Boolean LoginPasswordExpirationEnabled; - [Write, Description("Specifies if the login password is required to conform to the password policy specified in the system security policy. Only applies to SQL Logins. Default is $true.")] Boolean LoginPasswordPolicyEnforced; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerMaxDop/MSFT_xSQLServerMaxDop.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerMaxDop/MSFT_xSQLServerMaxDop.psm1 deleted file mode 100644 index 06a1a7ca..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerMaxDop/MSFT_xSQLServerMaxDop.psm1 +++ /dev/null @@ -1,282 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path (Split-Path $PSScriptRoot -Parent) -Parent) ` - -ChildPath 'xSQLServerHelper.psm1') ` - -Force -<# - .SYNOPSIS - This function gets the max degree of parallelism server configuration option. - - .PARAMETER SQLServer - The host name of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - The name of the SQL instance to be configured. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLInstanceName, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLServer = $env:COMPUTERNAME - ) - - $sqlServerObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - if ($sqlServerObject) - { - Write-Verbose -Message 'Getting the max degree of parallelism server configuration option' - $currentMaxDop = $sqlServerObject.Configuration.MaxDegreeOfParallelism.ConfigValue - } - - $returnValue = @{ - SQLInstanceName = $SQLInstanceName - SQLServer = $SQLServer - MaxDop = $currentMaxDop - } - - $returnValue -} - -<# - .SYNOPSIS - This function sets the max degree of parallelism server configuration option. - - .PARAMETER SQLServer - The host name of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - The name of the SQL instance to be configured. - - .PARAMETER Ensure - When set to 'Present' then max degree of parallelism will be set to either the value in parameter MaxDop or dynamically configured when parameter DynamicAlloc is set to $true. - When set to 'Absent' max degree of parallelism will be set to 0 which means no limit in number of processors used in parallel plan execution. - - .PARAMETER DynamicAlloc - If set to $true then max degree of parallelism will be dynamically configured. - When this is set parameter is set to $true, the parameter MaxDop must be set to $null or not be configured. - - .PARAMETER MaxDop - A numeric value to limit the number of processors used in parallel plan execution. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLInstanceName, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLServer = $env:COMPUTERNAME, - - [Parameter()] - [ValidateSet('Present','Absent')] - [ValidateNotNullOrEmpty()] - [System.String] - $Ensure = 'Present', - - [Parameter()] - [System.Boolean] - $DynamicAlloc, - - [Parameter()] - [System.Int32] - $MaxDop - ) - - $sqlServerObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - if ($sqlServerObject) - { - Write-Verbose -Message 'Setting the max degree of parallelism server configuration option' - switch ($Ensure) - { - 'Present' - { - if ($DynamicAlloc) - { - if ($MaxDop) - { - throw New-TerminatingError -ErrorType MaxDopParamMustBeNull ` - -FormatArgs @( $SQLServer,$SQLInstanceName ) ` - -ErrorCategory InvalidArgument - } - - $targetMaxDop = Get-SqlDscDynamicMaxDop -SqlServerObject $sqlServerObject - New-VerboseMessage -Message "Dynamic MaxDop is $targetMaxDop." - } - else - { - $targetMaxDop = $MaxDop - } - } - - 'Absent' - { - $targetMaxDop = 0 - New-VerboseMessage -Message 'Desired state should be absent - MAXDOP is reset to the default value.' - } - } - - try - { - $sqlServerObject.Configuration.MaxDegreeOfParallelism.ConfigValue = $targetMaxDop - $sqlServerObject.Alter() - New-VerboseMessage -Message "Setting MAXDOP value to $targetMaxDop." - } - catch - { - throw New-TerminatingError -ErrorType MaxDopSetError ` - -FormatArgs @($SQLServer,$SQLInstanceName,$targetMaxDop) ` - -ErrorCategory InvalidOperation ` - -InnerException $_.Exception - } - } -} - -<# - .SYNOPSIS - This function tests the max degree of parallelism server configuration option. - - .PARAMETER SQLServer - The host name of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - The name of the SQL instance to be configured. - - .PARAMETER Ensure - When set to 'Present' then max degree of parallelism will be set to either the value in parameter MaxDop or dynamically configured when parameter DynamicAlloc is set to $true. - When set to 'Absent' max degree of parallelism will be set to 0 which means no limit in number of processors used in parallel plan execution. - - .PARAMETER DynamicAlloc - If set to $true then max degree of parallelism will be dynamically configured. - When this is set parameter is set to $true, the parameter MaxDop must be set to $null or not be configured. - - .PARAMETER MaxDop - A numeric value to limit the number of processors used in parallel plan execution. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLInstanceName, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLServer = $env:COMPUTERNAME, - - [Parameter()] - [ValidateSet('Present','Absent')] - [ValidateNotNullOrEmpty()] - [System.String] - $Ensure = 'Present', - - [Parameter()] - [System.Boolean] - $DynamicAlloc, - - [Parameter()] - [System.Int32] - $MaxDop - ) - - Write-Verbose -Message 'Testing the max degree of parallelism server configuration option' - - $parameters = @{ - SQLInstanceName = $PSBoundParameters.SQLInstanceName - SQLServer = $PSBoundParameters.SQLServer - } - - $currentValues = Get-TargetResource @parameters - $getMaxDop = $currentValues.MaxDop - $isMaxDopInDesiredState = $true - - switch ($Ensure) - { - 'Absent' - { - if ($getMaxDop -ne 0) - { - New-VerboseMessage -Message "Current MaxDop is $getMaxDop should be updated to 0" - $isMaxDopInDesiredState = $false - } - } - 'Present' - { - if ($DynamicAlloc) - { - if ($MaxDop) - { - throw New-TerminatingError -ErrorType MaxDopParamMustBeNull ` - -FormatArgs @( $SQLServer,$SQLInstanceName ) ` - -ErrorCategory InvalidArgument - } - - $dynamicMaxDop = Get-SqlDscDynamicMaxDop - New-VerboseMessage -Message "Dynamic MaxDop is $dynamicMaxDop." - - if ($getMaxDop -ne $dynamicMaxDop) - { - New-VerboseMessage -Message "Current MaxDop is $getMaxDop should be updated to $dynamicMaxDop" - $isMaxDopInDesiredState = $false - } - } - else - { - if ($getMaxDop -ne $MaxDop) - { - New-VerboseMessage -Message "Current MaxDop is $getMaxDop should be updated to $MaxDop" - $isMaxDopInDesiredState = $false - } - } - } - } - - $isMaxDopInDesiredState -} - -<# - .SYNOPSIS - This cmdlet is used to return the dynamic max degree of parallelism -#> -function Get-SqlDscDynamicMaxDop -{ - $cimInstanceProc = Get-CimInstance -ClassName Win32_Processor - $numProcs = (Measure-Object -InputObject $cimInstanceProc -Property NumberOfLogicalProcessors -Sum).Sum - $numCores = (Measure-Object -InputObject $cimInstanceProc -Property NumberOfCores -Sum).Sum - - if ($numProcs -eq 1) - { - $dynamicMaxDop = [Math]::Round($numCores / 2, [System.MidpointRounding]::AwayFromZero) - } - elseif ($numCores -ge 8) - { - $dynamicMaxDop = 8 - } - else - { - $dynamicMaxDop = $numCores - } - - $dynamicMaxDop -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerMaxDop/MSFT_xSQLServerMaxDop.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerMaxDop/MSFT_xSQLServerMaxDop.schema.mof deleted file mode 100644 index 0ca9038a..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerMaxDop/MSFT_xSQLServerMaxDop.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerMaxDop")] -class MSFT_xSQLServerMaxDop : OMI_BaseResource -{ - [Write, Description("An enumerated value that describes if MaxDop is configured (Present) or reset to default value (Absent)"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("Flag to Dynamically allocate Maxdop based on Best Practices")] Boolean DynamicAlloc; - [Write, Description("Numeric value to configure Maxdop to")] Sint32 MaxDop; - [Write, Description("The host name of the SQL Server to be configured. Default value is '$env:COMPUTERNAME'.")] String SQLServer; - [Key, Description("The name of the SQL instance to be configured.")] String SQLInstanceName; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerMemory/MSFT_xSQLServerMemory.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerMemory/MSFT_xSQLServerMemory.psm1 deleted file mode 100644 index 9814ef45..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerMemory/MSFT_xSQLServerMemory.psm1 +++ /dev/null @@ -1,366 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path (Split-Path $PSScriptRoot -Parent) -Parent) -ChildPath 'xSQLServerHelper.psm1') -Force - -<# - .SYNOPSIS - This function gets the value of the min and max memory server configuration option. - - .PARAMETER SQLServer - The host name of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - The name of the SQL instance to be configured. -#> - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLInstanceName, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLServer = $env:COMPUTERNAME - ) - - $sqlServerObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - if ($sqlServerObject) - { - Write-Verbose -Message 'Getting the value for minimum and maximum SQL server memory.' - $minMemory = $sqlServerObject.Configuration.MinServerMemory.ConfigValue - $maxMemory = $sqlServerObject.Configuration.MaxServerMemory.ConfigValue - } - - $returnValue = @{ - SQLInstanceName = $SQLInstanceName - SQLServer = $SQLServer - MinMemory = $minMemory - MaxMemory = $maxMemory - } - - $returnValue -} - -<# - .SYNOPSIS - This function sets the value for the min and max memory server configuration option. - - .PARAMETER SQLServer - The host name of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - The name of the SQL instance to be configured. - - .PARAMETER Ensure - When set to 'Present' then min and max memory will be set to either the value in parameter MinMemory and MaxMemory or dynamically configured when parameter DynamicAlloc is set to $true. - When set to 'Absent' min and max memory will be set to default values. - - .PARAMETER DynamicAlloc - If set to $true then max memory will be dynamically configured. - When this is set parameter is set to $true, the parameter MaxMemory must be set to $null or not be configured. - - .PARAMETER MinMemory - This is the minimum amount of memory, in MB, in the buffer pool used by the instance of SQL Server. - - .PARAMETER MaxMemory - This is the maximum amount of memory, in MB, in the buffer pool used by the instance of SQL Server. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLInstanceName, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLServer = $env:COMPUTERNAME, - - [Parameter()] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present', - - [Parameter()] - [System.Boolean] - $DynamicAlloc = $false, - - [Parameter()] - [System.Int32] - $MinMemory, - - [Parameter()] - [System.Int32] - $MaxMemory - ) - - $sqlServerObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - if ($sqlServerObject) - { - Write-Verbose -Message 'Setting the minimum and maximum memory used by the instance.' - switch ($Ensure) - { - 'Present' - { - if ($DynamicAlloc) - { - if ($MaxMemory) - { - throw New-TerminatingError -ErrorType MaxMemoryParamMustBeNull ` - -FormatArgs @( $SQLServer,$SQLInstanceName ) ` - -ErrorCategory InvalidArgument - } - - $MaxMemory = Get-SqlDscDynamicMaxMemory - New-VerboseMessage -Message "Dynamic maximum memory has been calculated to $($MaxMemory)MB." - } - else - { - if (-not $MaxMemory) - { - throw New-TerminatingError -ErrorType MaxMemoryParamMustNotBeNull ` - -FormatArgs @( $SQLServer,$SQLInstanceName ) ` - -ErrorCategory InvalidArgument - } - } - - $sqlServerObject.Configuration.MaxServerMemory.ConfigValue = $MaxMemory - New-VerboseMessage -Message "Maximum memory used by the instance has been limited to $($MaxMemory)MB." - } - - 'Absent' - { - $sqlServerObject.Configuration.MaxServerMemory.ConfigValue = 2147483647 - $sqlServerObject.Configuration.MinServerMemory.ConfigValue = 0 - New-VerboseMessage -Message ('Ensure is set to absent. Minimum and maximum server memory' + ` - 'values used by the instance are reset to the default values.') - } - } - - try - { - if ($MinMemory) - { - $sqlServerObject.Configuration.MinServerMemory.ConfigValue = $MinMemory - New-VerboseMessage -Message "Minimum memory used by the instance is set to $($MinMemory)MB." - } - - $sqlServerObject.Alter() - } - catch - { - throw New-TerminatingError -ErrorType AlterServerMemoryFailed ` - -FormatArgs @($SQLServer,$SQLInstanceName) ` - -ErrorCategory InvalidOperation ` - -InnerException $_.Exception - } - } -} - -<# - .SYNOPSIS - This function tests the value of the min and max memory server configuration option. - - .PARAMETER SQLServer - The host name of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - The name of the SQL instance to be configured. - - .PARAMETER Ensure - When set to 'Present' then min and max memory will be set to either the value in parameter MinMemory and MaxMemory or dynamically configured when parameter DynamicAlloc is set to $true. - When set to 'Absent' min and max memory will be set to default values. - - .PARAMETER DynamicAlloc - If set to $true then max memory will be dynamically configured. - When this is set parameter is set to $true, the parameter MaxMemory must be set to $null or not be configured. - - .PARAMETER MinMemory - This is the minimum amount of memory, in MB, in the buffer pool used by the instance of SQL Server. - - .PARAMETER MaxMemory - This is the maximum amount of memory, in MB, in the buffer pool used by the instance of SQL Server. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLInstanceName, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLServer = $env:COMPUTERNAME, - - [Parameter()] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = 'Present', - - [Parameter()] - [System.Boolean] - $DynamicAlloc = $false, - - [Parameter()] - [System.Int32] - $MinMemory, - - [Parameter()] - [System.Int32] - $MaxMemory - ) - - Write-Verbose -Message 'Testing the values of the minimum and maximum memory server configuration option set to be used by the instance.' - - $getTargetResourceParameters = @{ - SQLInstanceName = $PSBoundParameters.SQLInstanceName - SQLServer = $PSBoundParameters.SQLServer - } - - $getTargetResourceResult = Get-TargetResource @getTargetResourceParameters - - $currentMinMemory = $getTargetResourceResult.MinMemory - $currentMaxMemory = $getTargetResourceResult.MaxMemory - $isServerMemoryInDesiredState = $true - - switch ($Ensure) - { - 'Absent' - { - if ($currentMaxMemory -ne 2147483647) - { - New-VerboseMessage -Message "Current maximum server memory used by the instance is $($currentMaxMemory)MB. Expected 2147483647MB." - $isServerMemoryInDesiredState = $false - } - - if ($currentMinMemory -ne 0) - { - New-VerboseMessage -Message "Current minimum server memory used by the instance is $($currentMinMemory)MB. Expected 0MB." - $isServerMemoryInDesiredState = $false - } - } - - 'Present' - { - if ($DynamicAlloc) - { - if ($MaxMemory) - { - throw New-TerminatingError -ErrorType MaxMemoryParamMustBeNull ` - -FormatArgs @( $SQLServer,$SQLInstanceName ) ` - -ErrorCategory InvalidArgument - } - - $MaxMemory = Get-SqlDscDynamicMaxMemory - New-VerboseMessage -Message "Dynamic maximum memory has been calculated to $($MaxMemory)MB." - } - else - { - if (-not $MaxMemory) - { - throw New-TerminatingError -ErrorType MaxMemoryParamMustNotBeNull ` - -FormatArgs @( $SQLServer,$SQLInstanceName ) ` - -ErrorCategory InvalidArgument - } - } - - if ($MaxMemory -ne $currentMaxMemory) - { - New-VerboseMessage -Message ("Current maximum server memory used by the instance " + ` - "is $($currentMaxMemory)MB. Expected $($MaxMemory)MB.") - $isServerMemoryInDesiredState = $false - } - - if ($MinMemory) - { - if ($MinMemory -ne $currentMinMemory) - { - New-VerboseMessage -Message ("Current minimum server memory used by the instance " + ` - "is $($currentMinMemory)MB. Expected $($MinMemory)MB.") - $isServerMemoryInDesiredState = $false - } - } - } - } - - return $isServerMemoryInDesiredState -} - -<# - .SYNOPSIS - This cmdlet is used to return the Dynamic MaxMemory of a SQL Instance -#> -function Get-SqlDscDynamicMaxMemory -{ - try - { - $physicalMemory = ((Get-CimInstance -ClassName Win32_PhysicalMemory).Capacity | Measure-Object -Sum).Sum - $physicalMemoryInMegaBytes = [Math]::Round($physicalMemory / 1MB) - - # Find how much to save for OS: 20% of total ram for under 15GB / 12.5% for over 20GB - if ($physicalMemoryInMegaBytes -ge 20480) - { - $reservedOperatingSystemMemory = [Math]::Round((0.125 * $physicalMemoryInMegaBytes)) - } - else - { - $reservedOperatingSystemMemory = [Math]::Round((0.2 * $physicalMemoryInMegaBytes)) - } - - $numberOfCores = (Get-CimInstance -ClassName Win32_Processor | Measure-Object -Property NumberOfCores -Sum).Sum - - # Get the number of SQL threads. - if ($numberOfCores -ge 4) - { - $numberOfSqlThreads = 256 + ($numberOfCores - 4) * 8 - } - else - { - $numberOfSqlThreads = 0 - } - - $operatingSystemArchitecture = (Get-CimInstance -ClassName Win32_operatingsystem).OSArchitecture - - # Find threadStackSize 1MB x86/ 2MB x64/ 4MB IA64 - if ($operatingSystemArchitecture -eq '32-bit') - { - $threadStackSize = 1 - } - elseif ($operatingSystemArchitecture -eq '64-bit') - { - $threadStackSize = 2 - } - else - { - $threadStackSize = 4 - } - - $maxMemory = $physicalMemoryInMegaBytes - $reservedOperatingSystemMemory - ($numberOfSqlThreads * $threadStackSize) - (1024 * [System.Math]::Ceiling($numberOfCores / 4)) - } - catch - { - throw New-TerminatingError -ErrorType ErrorGetDynamicMaxMemory ` - -ErrorCategory InvalidOperation ` - -InnerException $_.Exception - } - - $maxMemory -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerMemory/MSFT_xSQLServerMemory.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerMemory/MSFT_xSQLServerMemory.schema.mof deleted file mode 100644 index ef3ca5c8..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerMemory/MSFT_xSQLServerMemory.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerMemory")] -class MSFT_xSQLServerMemory : OMI_BaseResource -{ - [Key, Description("The name of the SQL instance to be configured.")] String SQLInstanceName; - [Write, Description("The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME.")] String SQLServer; - [Write, Description("When set to 'Present' then min and max memory will be set to either the value in parameter MinMemory and MaxMemory or dynamically configured when parameter DynamicAlloc is set to $true. When set to 'Absent' min and max memory will be set to default values. Default value is Present."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("If set to $true then max memory will be dynamically configured. When this is set parameter is set to $true, the parameter MaxMemory must be set to $null or not be configured. Default value is $false.")] Boolean DynamicAlloc; - [Write, Description("Minimum amount of memory, in MB, in the buffer pool used by the instance of SQL Server.")] Sint32 MinMemory; - [Write, Description("Maximum amount of memory, in MB, in the buffer pool used by the instance of SQL Server.")] Sint32 MaxMemory; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerNetwork/MSFT_xSQLServerNetwork.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerNetwork/MSFT_xSQLServerNetwork.psm1 deleted file mode 100644 index 5c8fb2e2..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerNetwork/MSFT_xSQLServerNetwork.psm1 +++ /dev/null @@ -1,287 +0,0 @@ -Function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param( - [parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - # for now support is just for tcp protocol - # possible future feature to support additional protocols - [parameter(Mandatory = $true)] - [ValidateSet("tcp")] - [System.String] - $ProtocolName - ) - - Write-Verbose "xSQLServerNetwork.Get-TargetResourece ..." - Write-Verbose "Parameters: InstanceName = $InstanceName; ProtocolName = $ProtocolName" - - # create isolated appdomain to load version specific libs, this needed if you have multiple versions of SQL server in the same configuration - $dom_get = [System.AppDomain]::CreateDomain("xSQLServerNetwork_Get_$InstanceName") - - Try - { - $version = GetVersion -InstanceName $InstanceName - - if([string]::IsNullOrEmpty($version)) - { - throw "Unable to resolve SQL version for instance" - } - - $smo = $dom_get.Load("Microsoft.SqlServer.Smo, Version=$version.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91") - $sqlWmiManagement = $dom_get.Load("Microsoft.SqlServer.SqlWmiManagement, Version=$version.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91") - - Write-Verbose "Creating [Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer] object" - $wmi = new-object $sqlWmiManagement.GetType("Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer") - - Write-Verbose "Getting [$ProtocolName] network protocol for [$InstanceName] SQL instance" - $tcp = $wmi.ServerInstances[$InstanceName].ServerProtocols[$ProtocolName] - - Write-Verbose "Reading state values:" - $returnValue = @{ - InstanceName = $InstanceName - ProtocolName = $ProtocolName - IsEnabled = $tcp.IsEnabled - TCPDynamicPorts = $tcp.IPAddresses["IPAll"].IPAddressProperties["TcpDynamicPorts"].Value - TCPPort = $tcp.IPAddresses["IPAll"].IPAddressProperties["TcpPort"].Value - } - - $returnValue.Keys | % { Write-Verbose "$_ = $($returnValue[$_])" } - - } - Finally - { - [System.AppDomain]::Unload($dom_get) - } - - return $returnValue -} - -Function Set-TargetResource -{ - [CmdletBinding()] - param( - [parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [parameter(Mandatory = $true)] - [ValidateSet("tcp")] - [System.String] - $ProtocolName, - - [System.Boolean] - $IsEnabled, - - [ValidateSet("0")] - [System.String] - $TCPDynamicPorts, - - [System.String] - $TCPPort, - - [System.Boolean] - $RestartService = $false - ) - - Write-Verbose "xSQLServerNetwork.Set-TargetResource ..." - Write-Verbose "Parameters: InstanceName = $InstanceName; ProtocolName = $ProtocolName; IsEnabled=$IsEnabled; TCPDynamicPorts = $TCPDynamicPorts; TCPPort = $TCPPort; RestartService=$RestartService;" - - Write-Verbose "Calling xSQLServerNetwork.Get-TargetResource ..." - $currentState = Get-TargetResource -InstanceName $InstanceName -ProtocolName $ProtocolName - - # create isolated appdomain to load version specific libs, this needed if you have multiple versions of SQL server in the same configuration - $dom_set = [System.AppDomain]::CreateDomain("xSQLServerNetwork_Set_$InstanceName") - - Try - { - $version = GetVersion -InstanceName $InstanceName - - if([string]::IsNullOrEmpty($version)) - { - throw "Unable to resolve SQL version for instance" - } - - $smo = $dom_set.Load("Microsoft.SqlServer.Smo, Version=$version.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91") - $sqlWmiManagement = $dom_set.Load("Microsoft.SqlServer.SqlWmiManagement, Version=$version.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91") - - $desiredState = @{ - InstanceName = $InstanceName - ProtocolName = $ProtocolName - IsEnabled = $IsEnabled - TCPDynamicPorts = $TCPDynamicPorts - TCPPort = $TCPPort - } - - Write-Verbose "Creating [Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer] object" - $wmi = new-object $sqlWmiManagement.GetType("Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer") - - Write-Verbose "Getting [$ProtocolName] network protocol for [$InstanceName] SQL instance" - $tcp = $wmi.ServerInstances[$InstanceName].ServerProtocols[$ProtocolName] - - Write-Verbose "Checking [IsEnabled] property ..." - if($desiredState["IsEnabled"] -ine $currentState["IsEnabled"]) - { - Write-Verbose "Updating [IsEnabled] from $($currentState["IsEnabled"]) to $($desiredState["IsEnabled"])" - $tcp.IsEnabled = $desiredState["IsEnabled"] - } - - Write-Verbose "Checking [TCPDynamicPorts] property ..." - if($desiredState["TCPDynamicPorts"] -ine $currentState["TCPDynamicPorts"]) - { - Write-Verbose "Updating [TCPDynamicPorts] from $($currentState["TCPDynamicPorts"]) to $($desiredState["TCPDynamicPorts"])" - $tcp.IPAddresses["IPAll"].IPAddressProperties["TcpDynamicPorts"].Value = $desiredState["TCPDynamicPorts"] - } - - Write-Verbose "Checking [TCPPort property] ..." - if($desiredState["TCPPort"] -ine $currentState["TCPPort"]) - { - Write-Verbose "Updating [TCPPort] from $($currentState["TCPPort"]) to $($desiredState["TCPPort"])" - $tcp.IPAddresses["IPAll"].IPAddressProperties["TcpPort"].Value = $desiredState["TCPPort"] - } - - Write-Verbose "Saving changes ..." - $tcp.Alter() - - if($RestartService) - { - Write-Verbose "SQL Service will be restarted ..." - if($InstanceName -eq "MSSQLSERVER") - { - $dbServiceName = "MSSQLSERVER" - $agtServiceName = "SQLSERVERAGENT" - } - else - { - $dbServiceName = "MSSQL`$$InstanceName" - $agtServiceName = "SQLAgent`$$InstanceName" - } - - $sqlService = $wmi.Services[$dbServiceName] - $agentService = $wmi.Services[$agtServiceName] - $startAgent = ($agentService.ServiceState -eq "Running") - - if ($sqlService -eq $null) - { - throw "$dbServiceName service was not found, restart service failed" - } - - Write-Verbose "Stopping [$dbServiceName] service ..." - $sqlService.Stop() - - while($sqlService.ServiceState -ne "Stopped") - { - Start-Sleep -Milliseconds 500 - $sqlService.Refresh() - } - Write-Verbose "[$dbServiceName] service stopped" - - Write-Verbose "Starting [$dbServiceName] service ..." - $sqlService.Start() - - while($sqlService.ServiceState -ne "Running") - { - Start-Sleep -Milliseconds 500 - $sqlService.Refresh() - } - Write-Verbose "[$dbServiceName] service started" - - if ($startAgent) - { - Write-Verbose "Staring [$agtServiceName] service ..." - $agentService.Start() - while($agentService.ServiceState -ne "Running") - { - Start-Sleep -Milliseconds 500 - $agentService.Refresh() - } - Write-Verbose "[$agtServiceName] service started" - } - } - } - Finally - { - [System.AppDomain]::Unload($dom_set) - } -} - -Function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param( - [parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [parameter(Mandatory = $true)] - [ValidateSet("tcp")] - [System.String] - $ProtocolName, - - [System.Boolean] - $IsEnabled, - - [ValidateSet("0")] - [System.String] - $TCPDynamicPorts, - - [System.String] - $TCPPort, - - [System.Boolean] - $RestartService = $false - ) - - Write-Verbose "xSQLServerNetwork.Test-TargetResource ..." - Write-Verbose "Parameters: InstanceName = $InstanceName; ProtocolName = $ProtocolName; IsEnabled=$IsEnabled; TCPDynamicPorts = $TCPDynamicPorts; TCPPort = $TCPPort; RestartService=$RestartService;" - - $desiredState = @{ - InstanceName = $InstanceName - ProtocolName = $ProtocolName - IsEnabled = $IsEnabled - TCPDynamicPorts = $TCPDynamicPorts - TCPPort = $TCPPort - } - - Write-Verbose "Calling xSQLServerNetwork.Get-TargetResource ..." - $currentState = Get-TargetResource -InstanceName $InstanceName -ProtocolName $ProtocolName - - Write-Verbose "Comparing desiredState with currentSate ..." - foreach($key in $desiredState.Keys) - { - if($currentState.Keys -eq $key) - { - if($desiredState[$key] -ine $currentState[$key] ) - { - Write-Verbose "$key is different: desired = $($desiredState[$key]); current = $($currentState[$key])" - return $false - } - } - else - { - Write-Verbose "$key is missing" - return $false - } - } - - Write-Verbose "States match" - return $true -} - -Function GetVersion -{ - param( - [parameter(Mandatory = $true)] - [System.String] - $InstanceName - ) - - $instanceId = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL").$InstanceName - $sqlVersion = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\$instanceId\Setup").Version - $sqlVersion.Split(".")[0] -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerNetwork/MSFT_xSQLServerNetwork.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerNetwork/MSFT_xSQLServerNetwork.schema.mof deleted file mode 100644 index cf1be7c2..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerNetwork/MSFT_xSQLServerNetwork.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerNetwork")] -class MSFT_xSQLServerNetwork : OMI_BaseResource -{ - [Key, Description("SQL Server instance name of which network protocol should be configured")] String InstanceName; - [Required, Description("Network protocol name that should be configured"), ValueMap{"tcp"}, Values{"tcp"}] String ProtocolName; - [Write, Description("Is network protocol should be enabled or disabled")] Boolean IsEnabled; - [Write, Description("If dynamic ports are used should be set to 0, otherwise leave empty"), ValueMap{"0"}, Values{"0"}] String TCPDynamicPorts; - [Write, Description("Sets static port for TCP/IP")] String TCPPort; - [Write, Description("Controls if affected SQL Service should be restarted automatically")] Boolean RestartService; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerPermission/MSFT_xSQLServerPermission.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerPermission/MSFT_xSQLServerPermission.psm1 deleted file mode 100644 index 5a75b2f3..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerPermission/MSFT_xSQLServerPermission.psm1 +++ /dev/null @@ -1,252 +0,0 @@ -$ErrorActionPreference = "Stop" - -$script:currentPath = Split-Path -Parent $MyInvocation.MyCommand.Path -Import-Module $script:currentPath\..\..\xSQLServerHelper.psm1 -ErrorAction Stop - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $InstanceName = "DEFAULT", - - [Parameter(Mandatory = $true)] - [System.String] - $NodeName, - - [Parameter(Mandatory = $true)] - [System.String] - $Principal, - - [ValidateSet('AlterAnyAvailabilityGroup','ViewServerState','AlterAnyEndPoint')] - [System.String[]] - $Permission - ) - - New-VerboseMessage -Message "Enumerating permissions for $Principal" - - try { - $instance = Get-SQLPSInstance -NodeName $NodeName -InstanceName $InstanceName - - $permissionSet = Get-SQLServerPermissionSet -Permission $Permission - $enumeratedPermission = $instance.EnumServerPermissions( $Principal, $permissionSet ) | Where-Object { $_.PermissionState -eq "Grant" } - if( $null -ne $enumeratedPermission) { - $grantedPermissionSet = Get-SQLServerPermissionSet -PermissionSet $enumeratedPermission.PermissionType - if( -not ( Compare-Object -ReferenceObject $permissionSet -DifferenceObject $grantedPermissionSet -Property $Permission ) ) { - $ensure = "Present" - } else { - $ensure = "Absent" - } - - $grantedPermission = Get-SQLPermission -ServerPermissionSet $grantedPermissionSet - } else { - $ensure = "Absent" - $grantedPermission = "" - } - } catch { - throw New-TerminatingError -ErrorType PermissionGetError -FormatArgs @($Principal) -ErrorCategory InvalidOperation -InnerException $_.Exception - } - - $returnValue = @{ - InstanceName = [System.String] $InstanceName - NodeName = [System.String] $NodeName - Ensure = [System.String] $ensure - Principal = [System.String] $Principal - Permission = [System.String[]] $grantedPermission - } - - return $returnValue -} - -function Set-TargetResource -{ - [CmdletBinding(SupportsShouldProcess)] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $InstanceName = "DEFAULT", - - [Parameter(Mandatory = $true)] - [System.String] - $NodeName, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [Parameter(Mandatory = $true)] - [System.String] - $Principal, - - [ValidateSet('AlterAnyAvailabilityGroup','ViewServerState','AlterAnyEndPoint')] - [System.String[]] - $Permission - ) - - $parameters = @{ - InstanceName = [System.String] $InstanceName - NodeName = [System.String] $NodeName - Principal = [System.String] $Principal - Permission = [System.String[]] $Permission - } - - $permissionState = Get-TargetResource @parameters - if( $null -ne $permissionState ) { - if( $Ensure -ne "" ) { - if( $permissionState.Ensure -ne $Ensure ) { - $instance = Get-SQLPSInstance -NodeName $NodeName -InstanceName $InstanceName - if( $null -ne $instance ) { - $permissionSet = Get-SQLServerPermissionSet -Permission $Permission - - if( $Ensure -eq "Present") { - if( ( $PSCmdlet.ShouldProcess( $Principal, "Grant permission" ) ) ) { - $instance.Grant($permissionSet, $Principal ) - } - } else { - if( ( $PSCmdlet.ShouldProcess( $Principal, "Revoke permission" ) ) ) { - $instance.Revoke($permissionSet, $Principal ) - } - } - } else { - throw New-TerminatingError -ErrorType PrincipalNotFound -FormatArgs @($Principal) -ErrorCategory ObjectNotFound - } - } else { - New-VerboseMessage -Message "State is already $Ensure" - } - } else { - throw New-TerminatingError -ErrorType PermissionMissingEnsure -FormatArgs @($Principal) -ErrorCategory InvalidOperation - } - } else { - throw New-TerminatingError -ErrorType UnexpectedErrorFromGet -ErrorCategory InvalidResult - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $InstanceName = "DEFAULT", - - [Parameter(Mandatory = $true)] - [System.String] - $NodeName, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [Parameter(Mandatory = $true)] - [System.String] - $Principal, - - [ValidateSet('AlterAnyAvailabilityGroup','ViewServerState','AlterAnyEndPoint')] - [System.String[]] - $Permission - ) - - $parameters = @{ - InstanceName = [System.String] $InstanceName - NodeName = [System.String] $NodeName - Principal = [System.String] $Principal - Permission = [System.String[]] $Permission - } - - New-VerboseMessage -Message "Testing state of permissions for $Principal" - - $permissionState = Get-TargetResource @parameters - if( $null -ne $permissionState ) { - [System.Boolean] $result = $false - if( $permissionState.Ensure -eq $Ensure) { - $result = $true - } - } else { - throw New-TerminatingError -ErrorType UnexpectedErrorFromGet -ErrorCategory InvalidResult - } - - return $result -} - -function Get-SQLPermission -{ - [CmdletBinding()] - [OutputType([String[]])] - param ( - [Parameter(Mandatory,ParameterSetName="ServerPermissionSet",HelpMessage="Takes a PermissionSet which will be enumerated to return a string array.")] - [Microsoft.SqlServer.Management.Smo.ServerPermissionSet] - [ValidateNotNullOrEmpty()] - $ServerPermissionSet - ) - - [String[]] $permission = @() - - if( $ServerPermissionSet ) { - foreach( $Property in $($ServerPermissionSet | Get-Member -Type Property) ) { - if( $ServerPermissionSet.$($Property.Name) ) { - $permission += $Property.Name - } - } - } - - return [String[]] $permission -} - -function Get-SQLServerPermissionSet -{ - [CmdletBinding()] - [OutputType([Object])] - param - ( - [Parameter(Mandatory,ParameterSetName="Permission",HelpMessage="Takes an array of strings which will be concatenated to a single ServerPermissionSet.")] - [System.String[]] - [ValidateNotNullOrEmpty()] - $Permission, - - [Parameter(Mandatory,ParameterSetName="ServerPermissionSet",HelpMessage="Takes an array of ServerPermissionSet which will be concatenated to a single ServerPermissionSet.")] - [Microsoft.SqlServer.Management.Smo.ServerPermissionSet[]] - [ValidateNotNullOrEmpty()] - $PermissionSet - ) - - if( $Permission ) { - [Microsoft.SqlServer.Management.Smo.ServerPermissionSet] $permissionSet = New-Object -TypeName Microsoft.SqlServer.Management.Smo.ServerPermissionSet - - foreach( $currentPermission in $Permission ) { - $permissionSet.$($currentPermission) = $true - } - } else { - $permissionSet = Merge-SQLPermissionSet -Object $PermissionSet - } - - return $permissionSet -} - -function Merge-SQLPermissionSet { - param ( - [Parameter(Mandatory)] - [Microsoft.SqlServer.Management.Smo.ServerPermissionSet[]] - [ValidateNotNullOrEmpty()] - $Object - ) - - $baseObject = New-Object -TypeName ($Object[0].GetType()) - - foreach ( $currentObject in $Object ) { - foreach( $Property in $($currentObject | Get-Member -Type Property) ) { - if( $currentObject.$($Property.Name) ) { - $baseObject.$($Property.Name) = $currentObject.$($Property.Name) - } - } - } - - return $baseObject -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerPermission/MSFT_xSQLServerPermission.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerPermission/MSFT_xSQLServerPermission.schema.mof deleted file mode 100644 index d92f251a..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerPermission/MSFT_xSQLServerPermission.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerPermission")] -class MSFT_xSQLServerPermission : OMI_BaseResource -{ - [Key, Description("The SQL Server instance name.")] String InstanceName; - [Required, Description("The host name or FQDN.")] String NodeName; - [Write, Description("If the permission should be present or absent."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("The login to which permission will be set.")] String Principal; - [Write, Description("The permission to set for the login."), ValueMap{"AlterAnyAvailabilityGroup","ViewServerState","AlterAnyEndPoint"}, Values{"AlterAnyAvailabilityGroup","ViewServerState","AlterAnyEndPoint"}] String Permission[]; -}; - diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRSConfig/MSFT_xSQLServerRSConfig.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRSConfig/MSFT_xSQLServerRSConfig.psm1 deleted file mode 100644 index 6265f171..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRSConfig/MSFT_xSQLServerRSConfig.psm1 +++ /dev/null @@ -1,229 +0,0 @@ -$currentPath = Split-Path -Parent $MyInvocation.MyCommand.Path -Write-Debug -Message "CurrentPath: $currentPath" - -# Load Common Code -Import-Module $currentPath\..\..\xSQLServerHelper.psm1 -Verbose:$false -ErrorAction Stop - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [parameter(Mandatory = $true)] - [System.String] - $RSSQLServer, - - [parameter(Mandatory = $true)] - [System.String] - $RSSQLInstanceName, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SQLAdminCredential - ) - - if(Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\RS" -Name $InstanceName -ErrorAction SilentlyContinue) - { - $InstanceKey = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\RS" -Name $InstanceName).$InstanceName - $SQLVersion = ((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\$InstanceKey\Setup" -Name "Version").Version).Split(".")[0] - $RSConfig = Invoke-Command -ComputerName . -Credential $SQLAdminCredential -ScriptBlock { - $SQLVersion = $args[0] - $InstanceName = $args[1] - $RSConfig = Get-WmiObject -Class MSReportServer_ConfigurationSetting -Namespace "root\Microsoft\SQLServer\ReportServer\RS_$InstanceName\v$SQLVersion\Admin" - $RSConfig - } -ArgumentList @($SQLVersion,$InstanceName) - if($RSConfig.DatabaseServerName.Contains("\")) - { - $RSSQLServer = $RSConfig.DatabaseServerName.Split("\")[0] - $RSSQLInstanceName = $RSConfig.DatabaseServerName.Split("\")[1] - } - else - { - $RSSQLServer = $RSConfig.DatabaseServerName - $RSSQLInstanceName = "MSSQLSERVER" - } - $IsInitialized = $RSConfig.IsInitialized - } - else - { - throw New-TerminatingError -ErrorType SSRSNotFound -FormatArgs @($InstanceName) -ErrorCategory ObjectNotFound - } - - $returnValue = @{ - InstanceName = $InstanceName - RSSQLServer = $RSSQLServer - RSSQLInstanceName = $RSSQLInstanceName - IsInitialized = $IsInitialized - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [parameter(Mandatory = $true)] - [System.String] - $RSSQLServer, - - [parameter(Mandatory = $true)] - [System.String] - $RSSQLInstanceName, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SQLAdminCredential - ) - - if(Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\RS" -Name $InstanceName -ErrorAction SilentlyContinue) - { - Invoke-Command -ComputerName . -Credential $SQLAdminCredential -Authentication Credssp -ScriptBlock { - $InstanceName = $args[0] - $RSSQLServer = $args[1] - $RSSQLInstanceName = $args[2] - $InstanceKey = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\RS" -Name $InstanceName).$InstanceName - $SQLVersion = ((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\$InstanceKey\Setup" -Name "Version").Version).Split(".")[0] - $DBCreateFile = [IO.Path]::GetTempFileName() - $DBRightsFile = [IO.Path]::GetTempFileName() - if($InstanceName -eq "MSSQLSERVER") - { - $RSServiceName = "ReportServer" - $RSVirtualDirectory = "ReportServer" - $RMVirtualDirectory = "Reports" - $RSDatabase = "ReportServer" - } - else - { - $RSServiceName = "ReportServer`$$InstanceName" - $RSVirtualDirectory = "ReportServer_$InstanceName" - $RMVirtualDirectory = "Reports_$InstanceName" - $RSDatabase = "ReportServer`$$InstanceName" - } - if($RSSQLInstanceName -eq "MSSQLSERVER") - { - $RSConnection = "$RSSQLServer" - } - else - { - $RSConnection = "$RSSQLServer\$RSSQLInstanceName" - } - $Language = (Get-WMIObject -Class Win32_OperatingSystem -Namespace root/cimv2 -ErrorAction SilentlyContinue).OSLanguage - $RSConfig = Get-WmiObject -Class MSReportServer_ConfigurationSetting -Namespace "root\Microsoft\SQLServer\ReportServer\RS_$InstanceName\v$SQLVersion\Admin" - if($RSConfig.VirtualDirectoryReportServer -ne $RSVirtualDirectory) - { - $RSConfig.SetVirtualDirectory("ReportServerWebService",$RSVirtualDirectory,$Language) - $RSConfig.ReserveURL("ReportServerWebService","http://+:80",$Language) - } - if($RSConfig.VirtualDirectoryReportManager -ne $RMVirtualDirectory) - { - $RSConfig.SetVirtualDirectory("ReportManager",$RMVirtualDirectory,$Language) - $RSConfig.ReserveURL("ReportManager","http://+:80",$Language) - } - $RSScript = $RSConfig.GenerateDatabaseCreationScript($RSDatabase,$Language,$false) - $RSScript.Script | Out-File $DBCreateFile - - # Determine RS service account - $RSSvcAccountUsername = (Get-WmiObject -Class Win32_Service | Where-Object {$_.Name -eq $RSServiceName}).StartName - if(($RSSvcAccountUsername -eq "LocalSystem") -or (($RSSvcAccountUsername.Length -ge 10) -and ($RSSvcAccountUsername.SubString(0,10) -eq "NT Service"))) - { - $RSSvcAccountUsername = $RSConfig.MachineAccountIdentity - } - $RSScript = $RSConfig.GenerateDatabaseRightsScript($RSSvcAccountUsername,$RSDatabase,$false,$true) - $RSScript.Script | Out-File $DBRightsFile - - # Get path to sqlcmd.exe - $SQLCmdLocations = @( - @{ - Key = "4B5EB208A08862C4C9A0A2924D2613FF" - Name = "BAF8FF4572ED7814281FBEEAA6EE68A9" - } - @{ - Key = "4B5EB208A08862C4C9A0A2924D2613FF" - Name = "2BE7307A359F21B48B3491F5D489D81A" - } - @{ - Key = "4B5EB208A08862C4C9A0A2924D2613FF" - Name = "17E375D97701E7C44BBDE4225A2D4BB8" - } - @{ - Key = "A4A2A5C7B23E40145A6AFA7667643E85" - Name = "8B035CCA4B6B6D045BB9514286FC740D" - } - ) - $SQLCmdPath = "" - foreach($SQLCmdLocation in $SQLCmdLocations) - { - if($SQLCmdPath -eq "") - { - if(Get-ItemProperty -Path ("HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\" + $SQLCmdLocation.Key) -Name $SQLCmdLocation.Name -ErrorAction SilentlyContinue) - { - - if(Test-Path -Path (Get-ItemProperty -Path ("HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\" + $SQLCmdLocation.Key) -Name $SQLCmdLocation.Name).($SQLCmdLocation.Name)) - { - $SQLCmdPath = (Get-ItemProperty -Path ("HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\" + $SQLCmdLocation.Key) -Name $SQLCmdLocation.Name).($SQLCmdLocation.Name) - } - } - } - } - if($SQLCmdPath -ne "") - { - & "$SQLCmdPath" -S $RSConnection -i $DBCreateFile - & "$SQLCmdPath" -S $RSConnection -i $DBRightsFile - $RSConfig.SetDatabaseConnection($RSConnection,$RSDatabase,2,"","") - $RSConfig.InitializeReportServer($RSConfig.InstallationID) - } - - Remove-Item -Path $DBCreateFile - Remove-Item -Path $DBRightsFile - } -ArgumentList @($InstanceName,$RSSQLServer,$RSSQLInstanceName) - } - - if(!(Test-TargetResource @PSBoundParameters)) - { - throw New-TerminatingError -ErrorType TestFailedAfterSet -ErrorCategory InvalidResult - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [parameter(Mandatory = $true)] - [System.String] - $RSSQLServer, - - [parameter(Mandatory = $true)] - [System.String] - $RSSQLInstanceName, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SQLAdminCredential - ) - - $result = (Get-TargetResource @PSBoundParameters).IsInitialized - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRSConfig/MSFT_xSQLServerRSConfig.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRSConfig/MSFT_xSQLServerRSConfig.schema.mof deleted file mode 100644 index 5891a288..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRSConfig/MSFT_xSQLServerRSConfig.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerRSConfig")] -class MSFT_xSQLServerRSConfig : OMI_BaseResource -{ - [Key, Description("Name of the SQL Server Reporting Services instance to be configured.")] String InstanceName; - [Required, Description("Name of the SQL Server to host the Reporting Service database.")] String RSSQLServer; - [Required, Description("Name of the SQL Server instance to host the Reporting Service database.")] String RSSQLInstanceName; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the configuration.")] String SQLAdminCredential; - [Read, Description("Is the Reporting Services instance initialized.")] Boolean IsInitialized; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRSSecureConnectionLevel/MSFT_xSQLServerRSSecureConnectionLevel.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRSSecureConnectionLevel/MSFT_xSQLServerRSSecureConnectionLevel.psm1 deleted file mode 100644 index 6771f2ad..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRSSecureConnectionLevel/MSFT_xSQLServerRSSecureConnectionLevel.psm1 +++ /dev/null @@ -1,114 +0,0 @@ -$currentPath = Split-Path -Parent $MyInvocation.MyCommand.Path -Write-Debug -Message "CurrentPath: $currentPath" - -# Load Common Code -Import-Module $currentPath\..\..\xSQLServerHelper.psm1 -Verbose:$false -ErrorAction Stop - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [parameter(Mandatory = $true)] - [System.UInt16] - $SecureConnectionLevel, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SQLAdminCredential - ) - - if(Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\RS" -Name $InstanceName -ErrorAction SilentlyContinue) - { - $InstanceKey = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\RS" -Name $InstanceName).$InstanceName - $SQLVersion = ((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\$InstanceKey\Setup" -Name "Version").Version).Split(".")[0] - $SecureConnectionLevel = Invoke-Command -ComputerName . -Credential $SQLAdminCredential -ScriptBlock { - $SQLVersion = $args[0] - $InstanceName = $args[1] - $RSConfig = Get-WmiObject -Class MSReportServer_ConfigurationSetting -Namespace "root\Microsoft\SQLServer\ReportServer\RS_$InstanceName\v$SQLVersion\Admin" - $RSConfig.SecureConnectionLevel - } -ArgumentList @($SQLVersion,$InstanceName) - } - else - { - throw New-TerminatingError -ErrorType SSRSNotFound -FormatArgs @($InstanceName) -ErrorCategory ObjectNotFound - } - - $returnValue = @{ - InstanceName = $InstanceName - SecureConnectionLevel = $SecureConnectionLevel - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [parameter(Mandatory = $true)] - [System.UInt16] - $SecureConnectionLevel, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SQLAdminCredential - ) - - if(Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\RS" -Name $InstanceName -ErrorAction SilentlyContinue) - { - $InstanceKey = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\RS" -Name $InstanceName).$InstanceName - $SQLVersion = ((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\$InstanceKey\Setup" -Name "Version").Version).Split(".")[0] - Invoke-Command -ComputerName . -Credential $SQLAdminCredential -ScriptBlock { - $SQLVersion = $args[0] - $InstanceName = $args[1] - $SecureConnectionLevel = $args[2] - $RSConfig = Get-WmiObject -Class MSReportServer_ConfigurationSetting -Namespace "root\Microsoft\SQLServer\ReportServer\RS_$InstanceName\v$SQLVersion\Admin" - $RSConfig.SetSecureConnectionLevel($SecureConnectionLevel) - } -ArgumentList @($SQLVersion,$InstanceName,$SecureConnectionLevel) - } - - if(!(Test-TargetResource @PSBoundParameters)) - { - throw New-TerminatingError -ErrorType TestFailedAfterSet -ErrorCategory InvalidResult - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [parameter(Mandatory = $true)] - [System.UInt16] - $SecureConnectionLevel, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SQLAdminCredential - ) - - $result = ((Get-TargetResource @PSBoundParameters).SecureConnectionLevel -eq $SecureConnectionLevel) - - $result -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRSSecureConnectionLevel/MSFT_xSQLServerRSSecureConnectionLevel.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRSSecureConnectionLevel/MSFT_xSQLServerRSSecureConnectionLevel.schema.mof deleted file mode 100644 index 9539097e..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRSSecureConnectionLevel/MSFT_xSQLServerRSSecureConnectionLevel.schema.mof +++ /dev/null @@ -1,7 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerRSSecureConnectionLevel")] -class MSFT_xSQLServerRSSecureConnectionLevel : OMI_BaseResource -{ - [Key, Description("SQL instance to set secure connection level for.")] String InstanceName; - [Key, Description("SQL Server Reporting Service secure connection level.")] Uint16 SecureConnectionLevel; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential with administrative permissions to the SQL instance.")] String SQLAdminCredential; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerReplication/MSFT_xSQLServerReplication.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerReplication/MSFT_xSQLServerReplication.psm1 deleted file mode 100644 index 252d651b..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerReplication/MSFT_xSQLServerReplication.psm1 +++ /dev/null @@ -1,505 +0,0 @@ -$dom = [AppDomain]::CreateDomain('xSQLServerReplication') - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param( - [parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present', - - [parameter(Mandatory = $true)] - [ValidateSet('Local', 'Remote')] - [System.String] - $DistributorMode, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AdminLinkCredentials, - - [System.String] - $DistributionDBName = 'distribution', - - [System.String] - $RemoteDistributor, - - [parameter(Mandatory = $true)] - [System.String] - $WorkingDirectory, - - [System.Boolean] - $UseTrustedConnection = $true, - - [System.Boolean] - $UninstallWithForce = $true - ) - - $Ensure = 'Absent' - - $sqlMajorVersion = Get-SqlServerMajorVersion -InstanceName $InstanceName - $localSqlName = Get-SqlLocalServerName -InstanceName $InstanceName - - $localServerConnection = New-ServerConnection -SqlMajorVersion $sqlMajorVersion -SqlServerName $localSqlName - $localReplicationServer = New-ReplicationServer -SqlMajorVersion $sqlMajorVersion -ServerConnection $localServerConnection - - if($localReplicationServer.IsDistributor -eq $true) - { - $Ensure = 'Present' - $DistributorMode = 'Local' - } - elseif($localReplicationServer.IsPublisher -eq $true) - { - $Ensure = 'Present' - $DistributorMode = 'Remote' - } - - if($Ensure -eq 'Present') - { - $DistributionDBName = $localReplicationServer.DistributionDatabase - $RemoteDistributor = $localReplicationServer.DistributionServer - $WorkingDirectory = $localReplicationServer.WorkingDirectory - } - - $returnValue = @{ - InstanceName = $InstanceName - Ensure = $Ensure - DistributorMode = $DistributorMode - DistributionDBName = $DistributionDBName - RemoteDistributor = $RemoteDistributor - WorkingDirectory = $WorkingDirectory - } - - return $returnValue -} - -function Set-TargetResource -{ - [CmdletBinding()] - param( - [parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present', - - [parameter(Mandatory = $true)] - [ValidateSet('Local', 'Remote')] - [System.String] - $DistributorMode, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AdminLinkCredentials, - - [System.String] - $DistributionDBName = 'distribution', - - [System.String] - $RemoteDistributor, - - [parameter(Mandatory = $true)] - [System.String] - $WorkingDirectory, - - [System.Boolean] - $UseTrustedConnection = $true, - - [System.Boolean] - $UninstallWithForce = $true - ) - - if(($DistributorMode -eq 'Remote') -and (-not $RemoteDistributor)) - { - throw "RemoteDistributor parameter cannot be empty when DistributorMode = 'Remote'!" - } - - $sqlMajorVersion = Get-SqlServerMajorVersion -InstanceName $InstanceName - $localSqlName = Get-SqlLocalServerName -InstanceName $InstanceName - - $localServerConnection = New-ServerConnection -SqlMajorVersion $sqlMajorVersion -SqlServerName $localSqlName - $localReplicationServer = New-ReplicationServer -SqlMajorVersion $sqlMajorVersion -ServerConnection $localServerConnection - - if($Ensure -eq 'Present') - { - if($DistributorMode -eq 'Local' -and $localReplicationServer.IsDistributor -eq $false) - { - Write-Verbose "Local distribution will be configured ..." - - $distributionDB = New-DistributionDatabase ` - -SqlMajorVersion $sqlMajorVersion ` - -DistributionDBName $DistributionDBName ` - -ServerConnection $localServerConnection - - Install-LocalDistributor ` - -ReplicationServer $localReplicationServer ` - -AdminLinkCredentials $AdminLinkCredentials ` - -DistributionDB $distributionDB - - Register-DistributorPublisher ` - -SqlMajorVersion $sqlMajorVersion ` - -PublisherName $localSqlName ` - -ServerConnection $localServerConnection ` - -DistributionDBName $DistributionDBName ` - -WorkingDirectory $WorkingDirectory ` - -UseTrustedConnection $UseTrustedConnection - } - - if($DistributorMode -eq 'Remote' -and $localReplicationServer.IsPublisher -eq $false) - { - Write-Verbose "Remote distribution will be configured ..." - - $remoteConnection = New-ServerConnection -SqlMajorVersion $sqlMajorVersion -SqlServerName $RemoteDistributor - - Register-DistributorPublisher ` - -SqlMajorVersion $sqlMajorVersion ` - -PublisherName $localSqlName ` - -ServerConnection $remoteConnection ` - -DistributionDBName $DistributionDBName ` - -WorkingDirectory $WorkingDirectory ` - -UseTrustedConnection $UseTrustedConnection - - Install-RemoteDistributor ` - -ReplicationServer $localReplicationServer ` - -RemoteDistributor $RemoteDistributor ` - -AdminLinkCredentials $AdminLinkCredentials - } - } - else #'Absent' - { - if($localReplicationServer.IsDistributor -eq $true -or $localReplicationServer.IsPublisher -eq $true) - { - Write-Verbose "Distribution will be removed ..." - Uninstall-Distributor -ReplicationServer $localReplicationServer -UninstallWithForce $UninstallWithForce - } - else - { - Write-Verbose "Distribution is not configured on this instance." - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param( - [parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [ValidateSet('Present', 'Absent')] - [System.String] - $Ensure = 'Present', - - [parameter(Mandatory = $true)] - [ValidateSet('Local', 'Remote')] - [System.String] - $DistributorMode, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AdminLinkCredentials, - - [System.String] - $DistributionDBName = 'distribution', - - [System.String] - $RemoteDistributor, - - [parameter(Mandatory = $true)] - [System.String] - $WorkingDirectory, - - [System.Boolean] - $UseTrustedConnection = $true, - - [System.Boolean] - $UninstallWithForce = $true - ) - - $result = $false - $state = Get-TargetResource @PSBoundParameters - - if($Ensure -eq 'Absent' -and $state.Ensure -eq 'Absent') - { - $result = $true - } - elseif($Ensure -eq 'Present' -and $state.Ensure -eq 'Present' -and $state.DistributorMode -eq $DistributorMode) - { - $result = $true - } - - return $result -} - -#region helper functions -function New-ServerConnection -{ - [CmdletBinding()] - [OutputType([System.Object])] - param( - [parameter(Mandatory = $true)] - [System.String] - $SqlMajorVersion, - - [parameter(Mandatory = $true)] - [System.String] - $SqlServerName - ) - - $connInfo = Get-ConnectionInfoAssembly -SqlMajorVersion $SqlMajorVersion - $serverConnection = New-Object $connInfo.GetType('Microsoft.SqlServer.Management.Common.ServerConnection') $SqlServerName - - return $serverConnection -} - -function New-ReplicationServer -{ - [CmdletBinding()] - [OutputType([System.Object])] - param( - [parameter(Mandatory = $true)] - [System.String] - $SqlMajorVersion, - - [parameter(Mandatory = $true)] - [System.Object] - $ServerConnection - ) - - $rmo = Get-RmoAssembly -SqlMajorVersion $SqlMajorVersion - $localReplicationServer = New-Object $rmo.GetType('Microsoft.SqlServer.Replication.ReplicationServer') $ServerConnection - - return $localReplicationServer; -} - -function New-DistributionDatabase -{ - [CmdletBinding()] - [OutputType([System.Object])] - param( - [parameter(Mandatory = $true)] - [System.String] - $SqlMajorVersion, - - [parameter(Mandatory = $true)] - [System.String] - $DistributionDBName, - - [parameter(Mandatory = $true)] - [System.Object] - $ServerConnection - ) - - $rmo = Get-RmoAssembly -SqlMajorVersion $SqlMajorVersion - Write-Verbose "Creating DistributionDatabase object $DistributionDBName" - $distributionDB = New-Object $rmo.GetType('Microsoft.SqlServer.Replication.DistributionDatabase') $DistributionDBName, $ServerConnection - - return $distributionDB -} - -function New-DistributionPublisher -{ - [CmdletBinding()] - [OutputType([System.Object])] - param( - [parameter(Mandatory = $true)] - [System.String] - $SqlMajorVersion, - - [parameter(Mandatory = $true)] - [System.String] - $PublisherName, - - [parameter(Mandatory = $true)] - [System.Object] - $ServerConnection - ) - - $rmo = Get-RmoAssembly -SqlMajorVersion $SqlMajorVersion - $distributorPublisher = New-object $rmo.GetType('Microsoft.SqlServer.Replication.DistributionPublisher') $PublisherName, $ServerConnection - - return $distributorPublisher -} - -function Install-RemoteDistributor -{ - [CmdletBinding()] - param( - [parameter(Mandatory = $true)] - [System.Object] - $ReplicationServer, - - [parameter(Mandatory = $true)] - [System.String] - $RemoteDistributor, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AdminLinkCredentials - ) - - Write-Verbose "Calling InstallDistributor with RemoteDistributor = $RemoteDistributor" - $ReplicationServer.InstallDistributor($RemoteDistributor, $AdminLinkCredentials.Password) -} - -function Install-LocalDistributor -{ - [CmdletBinding()] - param( - [parameter(Mandatory = $true)] - [System.Object] - $ReplicationServer, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AdminLinkCredentials, - - [parameter(Mandatory = $true)] - [System.Object] - $DistributionDB - ) - - Write-Verbose "Calling InstallDistributor with DistributionDB" - $ReplicationServer.InstallDistributor($AdminLinkCredentials.Password, $DistributionDB) -} - -function Uninstall-Distributor -{ - [CmdletBinding()] - param( - [parameter(Mandatory = $true)] - [System.Object] - $ReplicationServer, - - [parameter(Mandatory = $true)] - [System.Boolean] - $UninstallWithForce - ) - Write-Verbose 'Calling UnistallDistributor method on ReplicationServer object' - $ReplicationServer.UninstallDistributor($UninstallWithForce) -} - -function Register-DistributorPublisher -{ - [CmdletBinding()] - param( - [parameter(Mandatory = $true)] - [System.String] - $SqlMajorVersion, - - [parameter(Mandatory = $true)] - [System.String] - $PublisherName, - - [parameter(Mandatory = $true)] - [System.Object] - $ServerConnection, - - [parameter(Mandatory = $true)] - [System.String] - $DistributionDBName, - - [parameter(Mandatory = $true)] - [System.String] - $WorkingDirectory, - - [parameter(Mandatory = $true)] - [System.Boolean] - $UseTrustedConnection - ) - - Write-Verbose "Creating DistributorPublisher $PublisherName on $($ServerConnection.ServerInstance)" - - $distributorPublisher = New-DistributionPublisher ` - -SqlMajorVersion $SqlMajorVersion ` - -PublisherName $PublisherName ` - -ServerConnection $ServerConnection - - $distributorPublisher.DistributionDatabase = $DistributionDBName - $distributorPublisher.WorkingDirectory = $WorkingDirectory - $distributorPublisher.PublisherSecurity.WindowsAuthentication = $UseTrustedConnection - $distributorPublisher.Create() -} - -function Get-ConnectionInfoAssembly -{ - [CmdletBinding()] - [OutputType([System.Object])] - param( - [parameter(Mandatory = $true)] - [System.String] - $SqlMajorVersion - ) - - $connInfo = $dom.Load("Microsoft.SqlServer.ConnectionInfo, Version=$SqlMajorVersion.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91") - Write-Verbose "Loaded assembly: $($connInfo.FullName)" - - return $connInfo -} - -function Get-RmoAssembly -{ - [CmdletBinding()] - [OutputType([System.Object])] - param( - [parameter(Mandatory = $true)] - [System.String] - $SqlMajorVersion - ) - - $rmo = $dom.Load("Microsoft.SqlServer.Rmo, Version=$SqlMajorVersion.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91") - Write-Verbose "Loaded assembly: $($rmo.FullName)" - - return $rmo -} - -function Get-SqlServerMajorVersion -{ - [CmdletBinding()] - [OutputType([System.String])] - param( - [parameter(Mandatory = $true)] - [System.String] - $InstanceName - ) - - $instanceId = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL").$InstanceName - $sqlVersion = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\$instanceId\Setup").Version - $sqlMajorVersion = $sqlVersion.Split(".")[0] - if (-not $sqlMajorVersion) - { - throw "Unable to detect version for sql server instance: $InstanceName!" - } - return $sqlMajorVersion -} - -function Get-SqlLocalServerName -{ - [CmdletBinding()] - [OutputType([System.String])] - param( - [parameter(Mandatory = $true)] - [System.String] - $InstanceName - ) - - if($InstanceName -eq "MSSQLSERVER") - { - return $env:COMPUTERNAME - } - else - { - return "$($env:COMPUTERNAME)\$InstanceName" - } -} -#endregion - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerReplication/MSFT_xSQLServerReplication.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerReplication/MSFT_xSQLServerReplication.schema.mof deleted file mode 100644 index 609bc1aa..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerReplication/MSFT_xSQLServerReplication.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerReplication")] -class MSFT_xSQLServerReplication : OMI_BaseResource -{ - [Key, Description("SQL Server instance name where replication distribution will be configured")] String InstanceName; - [Write, ValueMap{"Present", "Absent"}, Values{"Present", "Absent"}] String Ensure; - [Required, ValueMap{"Local", "Remote"}, Values{"Local", "Remote"}] String DistributorMode; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Distributor administration link password")] String AdminLinkCredentials; - [Write, Description("Distribution database name")] String DistributionDBName; - [Write, Description("Distributor server name if configuring publisher with remote distributor")] String RemoteDistributor; - [Required, Description("Publisher working directory")] String WorkingDirectory; - [Write, Description("Publisher security mode")] Boolean UseTrustedConnection; - [Write, Description("Force flag for uninstall procedure")] Boolean UninstallWithForce; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRole/MSFT_xSQLServerRole.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRole/MSFT_xSQLServerRole.psm1 deleted file mode 100644 index f618c659..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRole/MSFT_xSQLServerRole.psm1 +++ /dev/null @@ -1,541 +0,0 @@ -Import-Module -Name (Join-Path -Path (Split-Path (Split-Path $PSScriptRoot -Parent) -Parent) ` - -ChildPath 'xSQLServerHelper.psm1') ` - -Force -<# - .SYNOPSIS - This function gets the sql server role properties. - - .PARAMETER Members - The members the server role should have. - - .PARAMETER MembersToInclude - The members the server role should include. - - .PARAMETER MembersToExclude - The members the server role should exclude. - - .PARAMETER ServerRoleName - The name of server role to be created or dropped. - - .PARAMETER SQLServer - The host name of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - The name of the SQL instance to be configured. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter()] - [System.String[]] - $Members, - - [Parameter()] - [System.String[]] - $MembersToInclude, - - [Parameter()] - [System.String[]] - $MembersToExclude, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $ServerRoleName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLInstanceName - ) - - $sqlServerObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - $ensure = 'Present' - - if ($sqlServerObject) - { - Write-Verbose -Message "Getting properties of SQL Server role '$ServerRoleName'." - if ($sqlServerRoleObject = $sqlServerObject.Roles[$ServerRoleName]) - { - try - { - $membersInRole = $sqlServerRoleObject.EnumMemberNames() - } - catch - { - throw New-TerminatingError -ErrorType EnumMemberNamesServerRoleGetError ` - -FormatArgs @($SQLServer,$SQLInstanceName,$ServerRoleName) ` - -ErrorCategory InvalidOperation ` - -InnerException $_.Exception - } - - if ($Members) - { - if ($MembersToInclude -or $MembersToExclude) - { - throw New-TerminatingError -ErrorType MembersToIncludeAndExcludeParamMustBeNull ` - -FormatArgs @($SQLServer,$SQLInstanceName) ` - -ErrorCategory InvalidArgument - } - - if ( $null -ne (Compare-Object -ReferenceObject $membersInRole -DifferenceObject $Members)) - { - New-VerboseMessage -Message "The desired members are not present in server role $ServerRoleName" - $ensure = 'Absent' - } - } - else - { - if ($MembersToInclude) - { - foreach ($memberToInclude in $MembersToInclude) - { - if ( -not ($membersInRole.Contains($memberToInclude))) - { - New-VerboseMessage -Message "The included members are not present in server role $ServerRoleName" - $ensure = 'Absent' - } - } - } - - if ($MembersToExclude) - { - foreach ($memberToExclude in $MembersToExclude) - { - if ($membersInRole.Contains($memberToExclude)) - { - New-VerboseMessage -Message "The excluded members are present in server role $ServerRoleName" - $ensure = 'Absent' - } - } - } - } - } - else - { - $ensure = 'Absent' - } - } - - $returnValue = @{ - Ensure = $ensure - Members = $membersInRole - MembersToInclude = $MembersToInclude - MembersToExclude = $MembersToExclude - ServerRoleName = $ServerRoleName - SQLServer = $SQLServer - SQLInstanceName = $SQLInstanceName - } - $returnValue -} - -<# - .SYNOPSIS - This function sets the sql server role properties. - - .PARAMETER Ensure - When set to 'Present', the server role will be created. - When set to 'Absent', the server role will be dropped. - - .PARAMETER Members - The members the server role should have. - - .PARAMETER MembersToInclude - The members the server role should include. - - .PARAMETER MembersToExclude - The members the server role should exclude. - - .PARAMETER ServerRoleName - The name of server role to be created or dropped. - - .PARAMETER SQLServer - The host name of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - The name of the SQL instance to be configured. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter()] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present', - - [Parameter()] - [System.String[]] - $Members, - - [Parameter()] - [System.String[]] - $MembersToInclude, - - [Parameter()] - [System.String[]] - $MembersToExclude, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $ServerRoleName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLInstanceName - ) - - $sqlServerObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - if ($sqlServerObject) - { - Write-Verbose -Message "Setting properties of SQL Server role '$ServerRoleName'." - - switch ($Ensure) - { - 'Absent' - { - try - { - $sqlServerRoleObjectToDrop = $sqlServerObject.Roles[$ServerRoleName] - if ($sqlServerRoleObjectToDrop) - { - Write-Verbose -Message "Trying to drop the SQL Server role '$ServerRoleName'." - $sqlServerRoleObjectToDrop.Drop() - New-VerboseMessage -Message "Dropped the SQL Server role '$ServerRoleName'." - } - } - catch - { - throw New-TerminatingError -ErrorType DropServerRoleSetError ` - -FormatArgs @($SQLServer,$SQLInstanceName,$ServerRoleName) ` - -ErrorCategory InvalidOperation ` - -InnerException $_.Exception - } - } - - 'Present' - { - if ($null -eq $sqlServerObject.Roles[$ServerRoleName]) - { - try - { - $sqlServerRoleObjectToCreate = New-Object -TypeName Microsoft.SqlServer.Management.Smo.ServerRole ` - -ArgumentList $sqlServerObject,$ServerRoleName - if ($sqlServerRoleObjectToCreate) - { - Write-Verbose -Message "Creating the SQL Server role '$ServerRoleName'." - $sqlServerRoleObjectToCreate.Create() - New-VerboseMessage -Message "Created the SQL Server role '$ServerRoleName'." - } - } - catch - { - throw New-TerminatingError -ErrorType CreateServerRoleSetError ` - -FormatArgs @($SQLServer,$SQLInstanceName,$ServerRoleName) ` - -ErrorCategory InvalidOperation ` - -InnerException $_.Exception - } - } - - if ($Members) - { - if ($MembersToInclude -or $MembersToExclude) - { - throw New-TerminatingError -ErrorType MembersToIncludeAndExcludeParamMustBeNull ` - -FormatArgs @($SQLServer,$SQLInstanceName) ` - -ErrorCategory InvalidArgument - } - - $memberNamesInRoleObject = $sqlServerObject.Roles[$ServerRoleName].EnumMemberNames() - - foreach ($memberName in $memberNamesInRoleObject) - { - if ( -not ($Members.Contains($memberName))) - { - Remove-SqlDscServerRoleMember -SqlServerObject $sqlServerObject ` - -LoginName $memberName ` - -ServerRoleName $ServerRoleName - } - } - - foreach ($memberToAdd in $Members) - { - if ( -not ($memberNamesInRoleObject.Contains($memberToAdd))) - { - Add-SqlDscServerRoleMember -SqlServerObject $sqlServerObject ` - -LoginName $memberToAdd ` - -ServerRoleName $ServerRoleName - } - } - } - else - { - if ($MembersToInclude) - { - $memberNamesInRoleObject = $sqlServerObject.Roles[$ServerRoleName].EnumMemberNames() - - foreach ($memberToInclude in $MembersToInclude) - { - if ( -not ($memberNamesInRoleObject.Contains($memberToInclude))) - { - Add-SqlDscServerRoleMember -SqlServerObject $sqlServerObject ` - -LoginName $memberToInclude ` - -ServerRoleName $ServerRoleName - } - } - } - - if ($MembersToExclude) - { - $memberNamesInRoleObject = $sqlServerObject.Roles[$ServerRoleName].EnumMemberNames() - - foreach ($memberToExclude in $MembersToExclude) - { - if ($memberNamesInRoleObject.Contains($memberToExclude)) - { - Remove-SqlDscServerRoleMember -SqlServerObject $sqlServerObject ` - -LoginName $memberToExclude ` - -ServerRoleName $ServerRoleName - } - } - } - } - } - } - } -} - -<# - .SYNOPSIS - This function tests the sql server role properties. - - .PARAMETER Ensure - When set to 'Present', the server role will be created. - When set to 'Absent', the server role will be dropped. - - .PARAMETER Members - The members the server role should have. - - .PARAMETER MembersToInclude - The members the server role should include. - - .PARAMETER MembersToExclude - The members the server role should exclude. - - .PARAMETER ServerRoleName - The name of server role to be created or dropped. - - .PARAMETER SQLServer - The host name of the SQL Server to be configured. - - .PARAMETER SQLInstanceName - The name of the SQL instance to be configured. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter()] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present', - - [Parameter()] - [System.String[]] - $Members, - - [Parameter()] - [System.String[]] - $MembersToInclude, - - [Parameter()] - [System.String[]] - $MembersToExclude, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $ServerRoleName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLInstanceName - ) - - Write-Verbose -Message "Testing SQL Server role $ServerRoleName properties." - - $getTargetResourceParameters = @{ - SQLInstanceName = $PSBoundParameters.SQLInstanceName - SQLServer = $PSBoundParameters.SQLServer - ServerRoleName = $PSBoundParameters.ServerRoleName - Members = $PSBoundParameters.Members - MembersToInclude = $PSBoundParameters.MembersToInclude - MembersToExclude = $PSBoundParameters.MembersToExclude - } - - $getTargetResourceResult = Get-TargetResource @getTargetResourceParameters - $isServerRoleInDesiredState = $true - - switch ($Ensure) - { - 'Absent' - { - if ($getTargetResourceResult.Ensure -ne 'Absent') - { - New-VerboseMessage -Message "Ensure is set to Absent. The existing role $ServerRoleName should be dropped" - $isServerRoleInDesiredState = $false - } - } - - 'Present' - { - if ($getTargetResourceResult.Ensure -ne 'Present') - { - New-VerboseMessage -Message ("Ensure is set to Present. The missing role $ServerRoleName " + ` - "should be added or members are not correctly configured") - $isServerRoleInDesiredState = $false - } - } - } - - $isServerRoleInDesiredState -} - -<# - .SYNOPSIS - Add a user to a server role in the SQL Server instance provided. - - .PARAMETER SqlServerObject - An object returned from Connect-SQL function. - - .PARAMETER LoginName - String containing the login (user) which should be added as a member to the server role. - - .PARAMETER ServerRoleName - String containing the name of the server role which the user will be added as a member to. -#> -function Add-SqlDscServerRoleMember -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.Object] - $SqlServerObject, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $LoginName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $ServerRoleName - ) - - if ( -not ($SqlServerObject.Logins[$LoginName]) ) - { - throw New-TerminatingError -ErrorType LoginNotFound ` - -FormatArgs @($LoginName, $SQLServer, $SQLInstanceName) ` - -ErrorCategory ObjectNotFound - } - - try - { - Write-Verbose -Message "Adding SQL login $LoginName in role $ServerRoleName" - $SqlServerObject.Roles[$ServerRoleName].AddMember($LoginName) - New-VerboseMessage -Message "SQL Role $ServerRoleName for $LoginName, successfullly added" - } - catch - { - throw New-TerminatingError -ErrorType AddMemberServerRoleSetError ` - -FormatArgs @($SQLServer,$SQLInstanceName,$ServerRoleName,$LoginName) ` - -ErrorCategory InvalidOperation ` - -InnerException $_.Exception - } -} - -<# - .SYNOPSIS - Remove a user in a server role in the SQL Server instance provided. - - .PARAMETER SqlServerObject - An object returned from Connect-SQL function. - - .PARAMETER LoginName - String containing the login (user) which should be removed as a member in the server role. - - .PARAMETER ServerRoleName - String containing the name of the server role for which the user will be removed as a member. -#> -function Remove-SqlDscServerRoleMember -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.Object] - $SqlServerObject, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $LoginName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $ServerRoleName - ) - - if ( -not ($SqlServerObject.Logins[$LoginName]) ) - { - throw New-TerminatingError -ErrorType LoginNotFound ` - -FormatArgs @($LoginName, $SQLServer, $SQLInstanceName) ` - -ErrorCategory ObjectNotFound - } - - try - { - Write-Verbose -Message "Removing SQL login $LoginName from role $ServerRoleName" - $SqlServerObject.Roles[$ServerRoleName].DropMember($LoginName) - New-VerboseMessage -Message "SQL Role $ServerRoleName for $LoginName, successfullly dropped" - } - catch - { - throw New-TerminatingError -ErrorType DropMemberServerRoleSetError ` - -FormatArgs @($SQLServer,$SQLInstanceName,$ServerRoleName,$LoginName) ` - -ErrorCategory InvalidOperation ` - -InnerException $_.Exception - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRole/MSFT_xSQLServerRole.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRole/MSFT_xSQLServerRole.schema.mof deleted file mode 100644 index d7c1a397..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerRole/MSFT_xSQLServerRole.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerRole")] -class MSFT_xSQLServerRole : OMI_BaseResource -{ - [Key, Description("The name of of SQL role to add or remove.")] String ServerRoleName; - [Key, Description("The host name of the SQL Server to be configured.")] String SQLServer; - [Key, Description("The name of the SQL instance to be configured.")] String SQLInstanceName; - [Write, Description("An enumerated value that describes if the server role is added (Present) or dropped (Absent). Default value is 'Present'."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("The members the server role should have. This parameter will replace all the current server role members with the specified members.")] String Members[]; - [Write, Description("The members the server role should include. This parameter will only add members to a server role. Can not be used at the same time as parameter Members.")] String MembersToInclude[]; - [Write, Description("The members the server role should exclude. This parameter will only remove members from a server role. Can only be used when parameter Ensure is set to 'Present'. Can not be used at the same time as parameter Members.")] String MembersToExclude[]; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerScript/MSFT_xSQLServerScript.Schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerScript/MSFT_xSQLServerScript.Schema.mof deleted file mode 100644 index 275ccd78..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerScript/MSFT_xSQLServerScript.Schema.mof +++ /dev/null @@ -1,11 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerScript")] -class MSFT_xSQLServerScript : OMI_BaseResource -{ - [Key, Description("The name of an instance of the Database Engine. For a default instance, only specify the computer name. For a named instance, use the format ComputerName\\InstanceName")] String ServerInstance; - [Key, Description("Path to the T-SQL file that will perform Set action.")] String SetFilePath; - [Key, Description("Path to the T-SQL file that will perform Get action. Any values returned by the T-SQL queries will also be returned by the cmdlet Get-DscConfiguration through the 'GetResult' property.")] String GetFilePath; - [Key, Description("Path to the T-SQL file that will perform Test action. Any script that does not throw an error or returns null is evaluated to true. The cmdlet Invoke-SqlCmd treats T-SQL Print statements as verbose text, and will not cause the test to return false.")] String TestFilePath; - [Write, EmbeddedInstance("MSFT_Credential"), Description("The credentials to authenticate with, using SQL Authentication. To authenticate using Windows Authentication, assign the credentials to the built-in parameter 'PsDscRunAsCredential'. If both parameters 'Credential' and 'PsDscRunAsCredential' are not assigned, then SYSTEM account will be used to authenticate using Windows Authentication.")] String Credential; - [Write, Description("Specifies, as a string array, a sqlcmd scripting variable for use in the sqlcmd script, and sets a value for the variable. Use a Windows PowerShell array to specify multiple variables and their values. For more information how to use this, please go to the help documentation for Invoke-Sqlcmd.")] String Variable[]; - [Read, Description("Contains the values returned from the T-SQL script provided in the parameter 'GetFilePath' when cmdlet Get-DscConfiguration is run.")] String GetResult[]; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerScript/MSFT_xSQLServerScript.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerScript/MSFT_xSQLServerScript.psm1 deleted file mode 100644 index 75b23494..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerScript/MSFT_xSQLServerScript.psm1 +++ /dev/null @@ -1,283 +0,0 @@ -$script:currentPath = Split-Path -Path $MyInvocation.MyCommand.Path -Parent -Import-Module -Name (Join-Path -Path (Split-Path -Path (Split-Path -Path $script:currentPath -Parent) -Parent) -ChildPath 'xSQLServerHelper.psm1') - -<# - .SYNOPSIS - Returns the current state of the SQL Server features. - - .PARAMETER ServerInstance - The name of an instance of the Database Engine. For a default instance, only specify the computer name. For a named instances, - use the format ComputerName\InstanceName. - - .PARAMETER SetFilePath - Path to the T-SQL file that will perform Set action. - - .PARAMETER GetFilePath - Path to the T-SQL file that will perform Get action. - Any values returned by the T-SQL queries will also be returned by the cmdlet Get-DscConfiguration through the `GetResult` property. - - .PARAMETER TestFilePath - Path to the T-SQL file that will perform Test action. - Any script that does not throw an error or returns null is evaluated to true. - The cmdlet Invoke-SqlCmd treats T-SQL Print statements as verbose text, and will not cause the test to return false. - - .PARAMETER Credential - The credentials to authenticate with, using SQL Authentication. To authenticate using Windows Authentication, assign the credentials - to the built-in parameter `PsDscRunAsCredential`. If both parameters `Credential` and `PsDscRunAsCredential` are not assigned, - then SYSTEM account will be used to authenticate using Windows Authentication. - - .PARAMETER Variable - Specifies, as a string array, a sqlcmd scripting variable for use in the sqlcmd script, and sets a value for the variable. - Use a Windows PowerShell array to specify multiple variables and their values. For more information how to use this, - please go to the help documentation for [Invoke-Sqlcmd](https://technet.microsoft.com/en-us/library/mt683370.aspx). - - .OUTPUTS - Hash table containing key 'GetResult' which holds the value of the result from the SQL script that was ran from the parameter 'GetFilePath'. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $ServerInstance, - - [Parameter(Mandatory = $true)] - [System.String] - $SetFilePath, - - [Parameter(Mandatory = $true)] - [System.String] - $GetFilePath, - - [Parameter(Mandatory = $true)] - [System.String] - $TestFilePath, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.String[]] - $Variable - ) - - $result = Invoke-SqlScript -ServerInstance $ServerInstance -SqlScriptPath $GetFilePath ` - -Credential $Credential -Variable $Variable -ErrorAction Stop - - $getResult = Out-String -InputObject $result - - $returnValue = @{ - ServerInstance = [System.String] $ServerInstance - SetFilePath = [System.String] $SetFilePath - GetFilePath = [System.String] $GetFilePath - TestFilePath = [System.String] $TestFilePath - Username = [System.Object] $Credential - Variable = [System.String[]] $Variable - GetResult = [System.String[]] $getresult - } - - $returnValue -} - -<# - .SYNOPSIS - Returns the current state of the SQL Server features. - - .PARAMETER ServerInstance - The name of an instance of the Database Engine. For a default instance, only specify the computer name. For a named instances, - use the format ComputerName\InstanceName. - - .PARAMETER SetFilePath - Path to the T-SQL file that will perform Set action. - - .PARAMETER GetFilePath - Path to the T-SQL file that will perform Get action. - Any values returned by the T-SQL queries will also be returned by the cmdlet Get-DscConfiguration through the `GetResult` property. - - .PARAMETER TestFilePath - Path to the T-SQL file that will perform Test action. - Any script that does not throw an error or returns null is evaluated to true. - The cmdlet Invoke-SqlCmd treats T-SQL Print statements as verbose text, and will not cause the test to return false. - - .PARAMETER Credential - The credentials to authenticate with, using SQL Authentication. To authenticate using Windows Authentication, assign the credentials - to the built-in parameter `PsDscRunAsCredential`. If both parameters `Credential` and `PsDscRunAsCredential` are not assigned, - then SYSTEM account will be used to authenticate using Windows Authentication. - - .PARAMETER Variable - Specifies, as a string array, a sqlcmd scripting variable for use in the sqlcmd script, and sets a value for the variable. - Use a Windows PowerShell array to specify multiple variables and their values. For more information how to use this, - please go to the help documentation for [Invoke-Sqlcmd](https://technet.microsoft.com/en-us/library/mt683370.aspx). -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $ServerInstance, - - [Parameter(Mandatory = $true)] - [System.String] - $SetFilePath, - - [Parameter(Mandatory = $true)] - [System.String] - $GetFilePath, - - [Parameter(Mandatory = $true)] - [System.String] - $TestFilePath, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.String[]] - $Variable - ) - - Invoke-SqlScript -ServerInstance $ServerInstance -SqlScriptPath $SetFilePath ` - -Credential $Credential -Variable $Variable -ErrorAction Stop -} - -<# - .SYNOPSIS - Returns the current state of the SQL Server features. - - .PARAMETER ServerInstance - The name of an instance of the Database Engine. For a default instance, only specify the computer name. For a named instances, - use the format ComputerName\InstanceName. - - .PARAMETER SetFilePath - Path to the T-SQL file that will perform Set action. - - .PARAMETER GetFilePath - Path to the T-SQL file that will perform Get action. - Any values returned by the T-SQL queries will also be returned by the cmdlet Get-DscConfiguration through the `GetResult` property. - - .PARAMETER TestFilePath - Path to the T-SQL file that will perform Test action. - Any script that does not throw an error or returns null is evaluated to true. - The cmdlet Invoke-SqlCmd treats T-SQL Print statements as verbose text, and will not cause the test to return false. - - .PARAMETER Credential - The credentials to authenticate with, using SQL Authentication. To authenticate using Windows Authentication, assign the credentials - to the built-in parameter `PsDscRunAsCredential`. If both parameters `Credential` and `PsDscRunAsCredential` are not assigned, - then SYSTEM account will be used to authenticate using Windows Authentication. - - .PARAMETER Variable - Specifies, as a string array, a sqlcmd scripting variable for use in the sqlcmd script, and sets a value for the variable. - Use a Windows PowerShell array to specify multiple variables and their values. For more information how to use this, - please go to the help documentation for [Invoke-Sqlcmd](https://technet.microsoft.com/en-us/library/mt683370.aspx). - -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $ServerInstance, - - [Parameter(Mandatory = $true)] - [System.String] - $SetFilePath, - - [Parameter(Mandatory = $true)] - [System.String] - $GetFilePath, - - [Parameter(Mandatory = $true)] - [System.String] - $TestFilePath, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.String[]] - $Variable - ) - - try - { - $result = Invoke-SqlScript -ServerInstance $ServerInstance -SqlScriptPath $TestFilePath ` - -Credential $Credential -Variable $Variable -ErrorAction Stop - - if($null -eq $result) - { - return $true - } - else - { - return $false - } - } - catch [Microsoft.SqlServer.Management.PowerShell.SqlPowerShellSqlExecutionException] - { - Write-Verbose $_ - return $false - } -} - -<# - .SYNOPSIS - Execute an SQL script located in a file on disk. - - .PARAMETER ServerInstance - The name of an instance of the Database Engine. - For default instances, only specify the computer name. For named instances, use the format ComputerName\InstanceName. - - .PARAMETER SqlScriptPath - Path to SQL script file that will be executed. - - .PARAMETER Credential - The credentials to use to authenticate using SQL Authentication. To authenticate using Windows Authentication, assing the credentials - to the built-in parameter 'PsDscRunAsCredential'. If both parameters 'Credential' and 'PsDscRunAsCredential' are not assigned, then - the SYSTEM account will be used to authenticate using Windows Authentication. - - .PARAMETER Variable - Creates a sqlcmd scripting variable for use in the sqlcmd script, and sets a value for the variable. -#> -function Invoke-SqlScript -{ - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $ServerInstance, - - [Parameter(Mandatory = $true)] - [System.String] - $SqlScriptPath, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [System.String[]] - $Variable - ) - - Import-SQLPSModule - - if($null -ne $Credential) - { - $null = $PSBoundParameters.Add("Username", $Credential.UserName) - $null = $PSBoundParameters.Add("Password", $Credential.GetNetworkCredential().password) - } - - $null = $PSBoundParameters.Remove("Credential") - $null = $PSBoundParameters.Remove("SqlScriptPath") - - Invoke-Sqlcmd -InputFile $SqlScriptPath @PSBoundParameters -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerSetup/MSFT_xSQLServerSetup.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerSetup/MSFT_xSQLServerSetup.psm1 deleted file mode 100644 index c741bc44..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerSetup/MSFT_xSQLServerSetup.psm1 +++ /dev/null @@ -1,1973 +0,0 @@ -$script:currentPath = Split-Path -Path $MyInvocation.MyCommand.Path -Parent -Import-Module -Name (Join-Path -Path (Split-Path -Path (Split-Path -Path $script:currentPath -Parent) -Parent) -ChildPath 'xSQLServerHelper.psm1') -Import-Module -Name (Join-Path -Path (Split-Path -Path (Split-Path -Path $script:currentPath -Parent) -Parent) -ChildPath 'xPDT.psm1') - -<# - .SYNOPSIS - Returns the current state of the SQL Server features. - - .PARAMETER Action - The action to be performed. Default value is 'Install'. - Possible values are 'Install', 'InstallFailoverCluster', 'AddNode', 'PrepareFailoverCluster', and 'CompleteFailoverCluster' - - .PARAMETER SourcePath - The path to the root of the source files for installation. I.e and UNC path to a shared resource. Environment variables can be used in the path. - - .PARAMETER SetupCredential - Credential to be used to perform the installation. - - .PARAMETER SourceCredential - Credentials used to access the path set in the parameter `SourcePath`. Using this parameter will trigger a copy - of the installation media to a temp folder on the target node. Setup will then be started from the temp folder on the target node. - For any subsequent calls to the resource, the parameter `SourceCredential` is used to evaluate what major version the file 'setup.exe' - has in the path set, again, by the parameter `SourcePath`. - If the path, that is assigned to parameter `SourcePath`, contains a leaf folder, for example '\\server\share\folder', then that leaf - folder will be used as the name of the temporary folder. If the path, that is assigned to parameter `SourcePath`, does not have a - leaf folder, for example '\\server\share', then a unique guid will be used as the name of the temporary folder. - - .PARAMETER InstanceName - Name of the SQL instance to be installed. - - .PARAMETER FailoverClusterNetworkName - Host name to be assigned to the clustered SQL Server instance -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter()] - [ValidateSet('Install','InstallFailoverCluster','AddNode','PrepareFailoverCluster','CompleteFailoverCluster')] - [System.String] - $Action = 'Install', - - [Parameter()] - [System.String] - $SourcePath, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [Parameter()] - [System.Management.Automation.PSCredential] - $SourceCredential, - - [Parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [Parameter()] - [System.String] - $FailoverClusterNetworkName - ) - - if ($Action -in @('CompleteFailoverCluster','InstallFailoverCluster','Addnode')) - { - $sqlHostName = $FailoverClusterNetworkName - } - else - { - $sqlHostName = $env:COMPUTERNAME - } - - $InstanceName = $InstanceName.ToUpper() - - $SourcePath = [Environment]::ExpandEnvironmentVariables($SourcePath) - - if ($SourceCredential) - { - $newSmbMappingParameters = @{ - RemotePath = $SourcePath - UserName = "$($SourceCredential.GetNetworkCredential().Domain)\$($SourceCredential.GetNetworkCredential().UserName)" - Password = $($SourceCredential.GetNetworkCredential().Password) - } - - $null = New-SmbMapping @newSmbMappingParameters - } - - $pathToSetupExecutable = Join-Path -Path $SourcePath -ChildPath 'setup.exe' - - New-VerboseMessage -Message "Using path: $pathToSetupExecutable" - - $sqlVersion = Get-SqlMajorVersion -Path $pathToSetupExecutable - - if ($SourceCredential) - { - Remove-SmbMapping -RemotePath $SourcePath -Force - } - - if ($InstanceName -eq 'MSSQLSERVER') - { - $databaseServiceName = 'MSSQLSERVER' - $agentServiceName = 'SQLSERVERAGENT' - $fullTextServiceName = 'MSSQLFDLauncher' - $reportServiceName = 'ReportServer' - $analysisServiceName = 'MSSQLServerOLAPService' - } - else - { - $databaseServiceName = "MSSQL`$$InstanceName" - $agentServiceName = "SQLAgent`$$InstanceName" - $fullTextServiceName = "MSSQLFDLauncher`$$InstanceName" - $reportServiceName = "ReportServer`$$InstanceName" - $analysisServiceName = "MSOLAP`$$InstanceName" - } - - $integrationServiceName = "MsDtsServer$($sqlVersion)0" - - $features = '' - $clusteredSqlGroupName = '' - $clusteredSqlHostname = '' - $clusteredSqlIPAddress = '' - - $services = Get-Service - if ($services | Where-Object {$_.Name -eq $databaseServiceName}) - { - $features += 'SQLENGINE,' - - $sqlServiceAccountUsername = (Get-CimInstance -ClassName Win32_Service -Filter "Name = '$databaseServiceName'").StartName - $agentServiceAccountUsername = (Get-CimInstance -ClassName Win32_Service -Filter "Name = '$agentServiceName'").StartName - - $fullInstanceId = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL' -Name $InstanceName).$InstanceName - - # Check if Replication sub component is configured for this instance - New-VerboseMessage -Message "Detecting replication feature (HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\$fullInstanceId\ConfigurationState)" - $isReplicationInstalled = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\$fullInstanceId\ConfigurationState").SQL_Replication_Core_Inst - if ($isReplicationInstalled -eq 1) - { - New-VerboseMessage -Message 'Replication feature detected' - $features += 'REPLICATION,' - } - else - { - New-VerboseMessage -Message 'Replication feature not detected' - } - - $clientComponentsFullRegistryPath = "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\$($sqlVersion)0\Tools\Setup\Client_Components_Full" - $registryClientComponentsFullFeatureList = (Get-ItemProperty -Path $clientComponentsFullRegistryPath -ErrorAction SilentlyContinue).FeatureList - - Write-Debug -Message "Detecting Client Connectivity Tools feature ($clientComponentsFullRegistryPath)" - if ($registryClientComponentsFullFeatureList -like '*Connectivity_FNS=3*') - { - New-VerboseMessage -Message 'Client Connectivity Tools feature detected' - $features += 'CONN,' - } - else - { - New-VerboseMessage -Message 'Client Connectivity Tools feature not detected' - } - - Write-Debug -Message "Detecting Client Connectivity Backwards Compatibility Tools feature ($clientComponentsFullRegistryPath)" - if ($registryClientComponentsFullFeatureList -like '*Tools_Legacy_FNS=3*') - { - New-VerboseMessage -Message 'Client Connectivity Tools Backwards Compatibility feature detected' - $features += 'BC,' - } - else - { - New-VerboseMessage -Message 'Client Connectivity Tools Backwards Compatibility feature not detected' - } - - $instanceId = $fullInstanceId.Split('.')[1] - $instanceDirectory = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\$fullInstanceId\Setup" -Name 'SqlProgramDir').SqlProgramDir.Trim("\") - - $databaseServer = Connect-SQL -SQLServer $sqlHostName -SQLInstanceName $InstanceName - - $sqlCollation = $databaseServer.Collation - - $sqlSystemAdminAccounts = @() - foreach ($sqlUser in $databaseServer.Logins) - { - foreach ($sqlRole in $sqlUser.ListMembers()) - { - if ($sqlRole -like 'sysadmin') - { - $sqlSystemAdminAccounts += $sqlUser.Name - } - } - } - - if ($databaseServer.LoginMode -eq 'Mixed') - { - $securityMode = 'SQL' - } - else - { - $securityMode = 'Windows' - } - - $installSQLDataDirectory = $databaseServer.InstallDataDirectory - $sqlUserDatabaseDirectory = $databaseServer.DefaultFile - $sqlUserDatabaseLogDirectory = $databaseServer.DefaultLog - $sqlBackupDirectory = $databaseServer.BackupDirectory - - if ($databaseServer.IsClustered) - { - New-VerboseMessage -Message 'Clustered instance detected' - - $clusteredSqlInstance = Get-CimInstance -Namespace root/MSCluster -ClassName MSCluster_Resource -Filter "Type = 'SQL Server'" | - Where-Object { $_.PrivateProperties.InstanceName -eq $InstanceName } - - if (!$clusteredSqlInstance) - { - throw New-TerminatingError -ErrorType FailoverClusterResourceNotFound -FormatArgs $InstanceName -ErrorCategory 'ObjectNotFound' - } - - New-VerboseMessage -Message 'Clustered SQL Server resource located' - - $clusteredSqlGroup = $clusteredSqlInstance | Get-CimAssociatedInstance -ResultClassName MSCluster_ResourceGroup - $clusteredSqlNetworkName = $clusteredSqlGroup | Get-CimAssociatedInstance -ResultClassName MSCluster_Resource | - Where-Object { $_.Type -eq "Network Name" } - - $clusteredSqlIPAddress = ($clusteredSqlNetworkName | Get-CimAssociatedInstance -ResultClassName MSCluster_Resource | - Where-Object { $_.Type -eq "IP Address" }).PrivateProperties.Address - - # Extract the required values - $clusteredSqlGroupName = $clusteredSqlGroup.Name - $clusteredSqlHostname = $clusteredSqlNetworkName.PrivateProperties.DnsName - } - else - { - New-VerboseMessage -Message 'Clustered instance not detected' - } - } - - if ($services | Where-Object {$_.Name -eq $fullTextServiceName}) - { - $features += 'FULLTEXT,' - $fulltextServiceAccountUsername = (Get-CimInstance -ClassName Win32_Service -Filter "Name = '$fullTextServiceName'").StartName - } - - if ($services | Where-Object {$_.Name -eq $reportServiceName}) - { - $features += 'RS,' - $reportingServiceAccountUsername = (Get-CimInstance -ClassName Win32_Service -Filter "Name = '$reportServiceName'").StartName - } - - if ($services | Where-Object {$_.Name -eq $analysisServiceName}) - { - $features += 'AS,' - $analysisServiceAccountUsername = (Get-CimInstance -ClassName Win32_Service -Filter "Name = '$analysisServiceName'").StartName - - $analysisServer = Connect-SQLAnalysis -SQLServer $sqlHostName -SQLInstanceName $InstanceName - - $analysisCollation = $analysisServer.ServerProperties['CollationName'].Value - $analysisDataDirectory = $analysisServer.ServerProperties['DataDir'].Value - $analysisTempDirectory = $analysisServer.ServerProperties['TempDir'].Value - $analysisLogDirectory = $analysisServer.ServerProperties['LogDir'].Value - $analysisBackupDirectory = $analysisServer.ServerProperties['BackupDir'].Value - - $analysisSystemAdminAccounts = $analysisServer.Roles['Administrators'].Members.Name - - $analysisConfigDirectory = (Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\$analysisServiceName" -Name 'ImagePath').ImagePath.Replace(' -s ',',').Split(',')[1].Trim('"') - } - - if ($services | Where-Object {$_.Name -eq $integrationServiceName}) - { - $features += 'IS,' - $integrationServiceAccountUsername = (Get-CimInstance -ClassName Win32_Service -Filter "Name = '$integrationServiceName'").StartName - } - - $registryUninstallPath = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall' - - # Verify if SQL Server Management Studio 2008 or SQL Server Management Studio 2008 R2 (major version 10) is installed - $installedProductSqlServerManagementStudio2008R2 = Get-ItemProperty -Path ( - Join-Path -Path $registryUninstallPath -ChildPath '{72AB7E6F-BC24-481E-8C45-1AB5B3DD795D}' - ) -ErrorAction SilentlyContinue - - # Verify if SQL Server Management Studio 2012 (major version 11) is installed - $installedProductSqlServerManagementStudio2012 = Get-ItemProperty -Path ( - Join-Path -Path $registryUninstallPath -ChildPath '{A7037EB2-F953-4B12-B843-195F4D988DA1}' - ) -ErrorAction SilentlyContinue - - # Verify if SQL Server Management Studio 2014 (major version 12) is installed - $installedProductSqlServerManagementStudio2014 = Get-ItemProperty -Path ( - Join-Path -Path $registryUninstallPath -ChildPath '{75A54138-3B98-4705-92E4-F619825B121F}' - ) -ErrorAction SilentlyContinue - - if ( - ($sqlVersion -eq 10 -and $installedProductSqlServerManagementStudio2008R2) -or - ($sqlVersion -eq 11 -and $installedProductSqlServerManagementStudio2012) -or - ($sqlVersion -eq 12 -and $installedProductSqlServerManagementStudio2014) - ) - { - $features += 'SSMS,' - } - - # Evaluating if SQL Server Management Studio Advanced 2008 or SQL Server Management Studio Advanced 2008 R2 (major version 10) is installed - $installedProductSqlServerManagementStudioAdvanced2008R2 = Get-ItemProperty -Path ( - Join-Path -Path $registryUninstallPath -ChildPath '{B5FE23CC-0151-4595-84C3-F1DE6F44FE9B}' - ) -ErrorAction SilentlyContinue - - # Evaluating if SQL Server Management Studio Advanced 2012 (major version 11) is installed - $installedProductSqlServerManagementStudioAdvanced2012 = Get-ItemProperty -Path ( - Join-Path -Path $registryUninstallPath -ChildPath '{7842C220-6E9A-4D5A-AE70-0E138271F883}' - ) -ErrorAction SilentlyContinue - - # Evaluating if SQL Server Management Studio Advanced 2014 (major version 12) is installed - $installedProductSqlServerManagementStudioAdvanced2014 = Get-ItemProperty -Path ( - Join-Path -Path $registryUninstallPath -ChildPath '{B5ECFA5C-AC4F-45A4-A12E-A76ABDD9CCBA}' - ) -ErrorAction SilentlyContinue - - if ( - ($sqlVersion -eq 10 -and $installedProductSqlServerManagementStudioAdvanced2008R2) -or - ($sqlVersion -eq 11 -and $installedProductSqlServerManagementStudioAdvanced2012) -or - ($sqlVersion -eq 12 -and $installedProductSqlServerManagementStudioAdvanced2014) - ) - { - $features += 'ADV_SSMS,' - } - - $features = $features.Trim(',') - if ($features -ne '') - { - $registryInstallerComponentsPath = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components' - - switch ($sqlVersion) - { - '10' - { - $registryKeySharedDir = '0D1F366D0FE0E404F8C15EE4F1C15094' - $registryKeySharedWOWDir = 'C90BFAC020D87EA46811C836AD3C507F' - } - - '11' - { - $registryKeySharedDir = 'FEE2E540D20152D4597229B6CFBC0A69' - $registryKeySharedWOWDir = 'A79497A344129F64CA7D69C56F5DD8B4' - } - - '12' - { - $registryKeySharedDir = 'FEE2E540D20152D4597229B6CFBC0A69' - $registryKeySharedWOWDir = 'C90BFAC020D87EA46811C836AD3C507F' - } - - { $_ -in ('13','14') } - { - $registryKeySharedDir = 'FEE2E540D20152D4597229B6CFBC0A69' - $registryKeySharedWOWDir = 'A79497A344129F64CA7D69C56F5DD8B4' - } - } - - if ($registryKeySharedDir) - { - $installSharedDir = Get-FirstItemPropertyValue -Path (Join-Path -Path $registryInstallerComponentsPath -ChildPath $registryKeySharedDir) - } - - if ($registryKeySharedWOWDir) - { - $installSharedWOWDir = Get-FirstItemPropertyValue -Path (Join-Path -Path $registryInstallerComponentsPath -ChildPath $registryKeySharedWOWDir) - } - } - - return @{ - SourcePath = $SourcePath - Features = $features - InstanceName = $InstanceName - InstanceID = $instanceID - InstallSharedDir = $installSharedDir - InstallSharedWOWDir = $installSharedWOWDir - InstanceDir = $instanceDirectory - SQLSvcAccountUsername = $sqlServiceAccountUsername - AgtSvcAccountUsername = $agentServiceAccountUsername - SQLCollation = $sqlCollation - SQLSysAdminAccounts = $sqlSystemAdminAccounts - SecurityMode = $securityMode - InstallSQLDataDir = $installSQLDataDirectory - SQLUserDBDir = $sqlUserDatabaseDirectory - SQLUserDBLogDir = $sqlUserDatabaseLogDirectory - SQLTempDBDir = $null - SQLTempDBLogDir = $null - SQLBackupDir = $sqlBackupDirectory - FTSvcAccountUsername = $fulltextServiceAccountUsername - RSSvcAccountUsername = $reportingServiceAccountUsername - ASSvcAccountUsername = $analysisServiceAccountUsername - ASCollation = $analysisCollation - ASSysAdminAccounts = $analysisSystemAdminAccounts - ASDataDir = $analysisDataDirectory - ASLogDir = $analysisLogDirectory - ASBackupDir = $analysisBackupDirectory - ASTempDir = $analysisTempDirectory - ASConfigDir = $analysisConfigDirectory - ISSvcAccountUsername = $integrationServiceAccountUsername - FailoverClusterGroupName = $clusteredSqlGroupName - FailoverClusterNetworkName = $clusteredSqlHostname - FailoverClusterIPAddress = $clusteredSqlIPAddress - } -} - -<# - .SYNOPSIS - Installs the SQL Server features to the node. - - .PARAMETER Action - The action to be performed. Default value is 'Install'. - Possible values are 'Install', 'InstallFailoverCluster', 'AddNode', 'PrepareFailoverCluster', and 'CompleteFailoverCluster' - - .PARAMETER SourcePath - The path to the root of the source files for installation. I.e and UNC path to a shared resource. Environment variables can be used in the path. - - .PARAMETER SetupCredential - Credential to be used to perform the installation. - - .PARAMETER SourceCredential - Credentials used to access the path set in the parameter `SourcePath`. Using this parameter will trigger a copy - of the installation media to a temp folder on the target node. Setup will then be started from the temp folder on the target node. - For any subsequent calls to the resource, the parameter `SourceCredential` is used to evaluate what major version the file 'setup.exe' - has in the path set, again, by the parameter `SourcePath`. - If the path, that is assigned to parameter `SourcePath`, contains a leaf folder, for example '\\server\share\folder', then that leaf - folder will be used as the name of the temporary folder. If the path, that is assigned to parameter `SourcePath`, does not have a - leaf folder, for example '\\server\share', then a unique guid will be used as the name of the temporary folder. - - .PARAMETER SuppressReboot - Suppressed reboot. - - .PARAMETER ForceReboot - Forces reboot. - - .PARAMETER Features - SQL features to be installed. - - .PARAMETER InstanceName - Name of the SQL instance to be installed. - - .PARAMETER InstanceID - SQL instance ID, if different from InstanceName. - - .PARAMETER ProductKey - Product key for licensed installations. - - .PARAMETER UpdateEnabled - Enabled updates during installation. - - .PARAMETER UpdateSource - Path to the source of updates to be applied during installation. - - .PARAMETER SQMReporting - Enable customer experience reporting. - - .PARAMETER ErrorReporting - Enable error reporting. - - .PARAMETER InstallSharedDir - Installation path for shared SQL files. - - .PARAMETER InstallSharedWOWDir - Installation path for x86 shared SQL files. - - .PARAMETER InstanceDir - Installation path for SQL instance files. - - .PARAMETER SQLSvcAccount - Service account for the SQL service. - - .PARAMETER AgtSvcAccount - Service account for the SQL Agent service. - - .PARAMETER SQLCollation - Collation for SQL. - - .PARAMETER SQLSysAdminAccounts - Array of accounts to be made SQL administrators. - - .PARAMETER SecurityMode - Security mode to apply to the SQL Server instance. - - .PARAMETER SAPwd - SA password, if SecurityMode is set to 'SQL'. - - .PARAMETER InstallSQLDataDir - Root path for SQL database files. - - .PARAMETER SQLUserDBDir - Path for SQL database files. - - .PARAMETER SQLUserDBLogDir - Path for SQL log files. - - .PARAMETER SQLTempDBDir - Path for SQL TempDB files. - - .PARAMETER SQLTempDBLogDir - Path for SQL TempDB log files. - - .PARAMETER SQLBackupDir - Path for SQL backup files. - - .PARAMETER FTSvcAccount - Service account for the Full Text service. - - .PARAMETER RSSvcAccount - Service account for Reporting Services service. - - .PARAMETER ASSvcAccount - Service account for Analysis Services service. - - .PARAMETER ASCollation - Collation for Analysis Services. - - .PARAMETER ASSysAdminAccounts - Array of accounts to be made Analysis Services admins. - - .PARAMETER ASDataDir - Path for Analysis Services data files. - - .PARAMETER ASLogDir - Path for Analysis Services log files. - - .PARAMETER ASBackupDir - Path for Analysis Services backup files. - - .PARAMETER ASTempDir - Path for Analysis Services temp files. - - .PARAMETER ASConfigDir - Path for Analysis Services config. - - .PARAMETER ISSvcAccount - Service account for Integration Services service. - - .PARAMETER BrowserSvcStartupType - Specifies the startup mode for SQL Server Browser service - - .PARAMETER FailoverClusterGroupName - The name of the resource group to create for the clustered SQL Server instance. Default is 'SQL Server (InstanceName)'. - - .PARAMETER FailoverClusterIPAddress - Array of IP Addresses to be assigned to the clustered SQL Server instance - - .PARAMETER FailoverClusterNetworkName - Host name to be assigned to the clustered SQL Server instance -#> -function Set-TargetResource -{ - # Suppressing this rule because $global:DSCMachineStatus is used to trigger a reboot, either by force or when there are pending changes. - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidGlobalVars', '')] - [CmdletBinding()] - param - ( - [Parameter()] - [ValidateSet('Install','InstallFailoverCluster','AddNode','PrepareFailoverCluster','CompleteFailoverCluster')] - [System.String] - $Action = 'Install', - - [Parameter()] - [System.String] - $SourcePath, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [Parameter()] - [System.Management.Automation.PSCredential] - $SourceCredential, - - [Parameter()] - [System.Boolean] - $SuppressReboot, - - [Parameter()] - [System.Boolean] - $ForceReboot, - - [Parameter()] - [System.String] - $Features, - - [Parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [Parameter()] - [System.String] - $InstanceID, - - [Parameter()] - [System.String] - $ProductKey, - - [Parameter()] - [System.String] - $UpdateEnabled, - - [Parameter()] - [System.String] - $UpdateSource, - - [Parameter()] - [System.String] - $SQMReporting, - - [Parameter()] - [System.String] - $ErrorReporting, - - [Parameter()] - [System.String] - $InstallSharedDir, - - [Parameter()] - [System.String] - $InstallSharedWOWDir, - - [Parameter()] - [System.String] - $InstanceDir, - - [Parameter()] - [System.Management.Automation.PSCredential] - $SQLSvcAccount, - - [Parameter()] - [System.Management.Automation.PSCredential] - $AgtSvcAccount, - - [Parameter()] - [System.String] - $SQLCollation, - - [Parameter()] - [System.String[]] - $SQLSysAdminAccounts, - - [Parameter()] - [System.String] - $SecurityMode, - - [Parameter()] - [System.Management.Automation.PSCredential] - $SAPwd, - - [Parameter()] - [System.String] - $InstallSQLDataDir, - - [Parameter()] - [System.String] - $SQLUserDBDir, - - [Parameter()] - [System.String] - $SQLUserDBLogDir, - - [Parameter()] - [System.String] - $SQLTempDBDir, - - [Parameter()] - [System.String] - $SQLTempDBLogDir, - - [Parameter()] - [System.String] - $SQLBackupDir, - - [Parameter()] - [System.Management.Automation.PSCredential] - $FTSvcAccount, - - [Parameter()] - [System.Management.Automation.PSCredential] - $RSSvcAccount, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ASSvcAccount, - - [Parameter()] - [System.String] - $ASCollation, - - [Parameter()] - [System.String[]] - $ASSysAdminAccounts, - - [Parameter()] - [System.String] - $ASDataDir, - - [Parameter()] - [System.String] - $ASLogDir, - - [Parameter()] - [System.String] - $ASBackupDir, - - [Parameter()] - [System.String] - $ASTempDir, - - [Parameter()] - [System.String] - $ASConfigDir, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ISSvcAccount, - - [Parameter()] - [System.String] - [ValidateSet('Automatic', 'Disabled', 'Manual')] - $BrowserSvcStartupType, - - [Parameter()] - [System.String] - $FailoverClusterGroupName = "SQL Server ($InstanceName)", - - [Parameter()] - [System.String[]] - $FailoverClusterIPAddress, - - [Parameter()] - [System.String] - $FailoverClusterNetworkName - ) - - $getTargetResourceParameters = @{ - Action = $Action - SourcePath = $SourcePath - SetupCredential = $SetupCredential - SourceCredential = $SourceCredential - InstanceName = $InstanceName - FailoverClusterNetworkName = $FailoverClusterNetworkName - } - - $getTargetResourceResult = Get-TargetResource @getTargetResourceParameters - - $InstanceName = $InstanceName.ToUpper() - - $parametersToEvaluateTrailingSlash = @( - 'InstanceDir', - 'InstallSharedDir', - 'InstallSharedWOWDir', - 'InstallSQLDataDir', - 'SQLUserDBDir', - 'SQLUserDBLogDir', - 'SQLTempDBDir', - 'SQLTempDBLogDir', - 'SQLBackupDir', - 'ASDataDir', - 'ASLogDir', - 'ASBackupDir', - 'ASTempDir', - 'ASConfigDir' - ) - - # Remove trailing slash ('\') from paths - foreach ($parameterName in $parametersToEvaluateTrailingSlash) - { - if ($PSBoundParameters.ContainsKey($parameterName)) - { - $parameterValue = Get-Variable -Name $parameterName -ValueOnly - - # Trim backslash, but only if the path contains a full path and not just a qualifier. - if ($parameterValue -and $parameterValue -notmatch '^[a-zA-Z]:\\$') - { - Set-Variable -Name $parameterName -Value $parameterValue.TrimEnd('\') - } - - # If the path only contains a qualifier but no backslash ('M:'), then a backslash is added ('M:\'). - if ($parameterValue -match '^[a-zA-Z]:$') - { - Set-Variable -Name $parameterName -Value "$parameterValue\" - } - } - } - - $SourcePath = [Environment]::ExpandEnvironmentVariables($SourcePath) - - if ($SourceCredential) - { - $newSmbMappingParameters = @{ - RemotePath = $SourcePath - UserName = "$($SourceCredential.GetNetworkCredential().Domain)\$($SourceCredential.GetNetworkCredential().UserName)" - Password = $($SourceCredential.GetNetworkCredential().Password) - } - - $null = New-SmbMapping @newSmbMappingParameters - - # Create a destination folder so the media files aren't written to the root of the Temp folder. - $mediaDestinationFolder = Split-Path -Path $SourcePath -Leaf - if (-not $mediaDestinationFolder ) - { - $mediaDestinationFolder = New-Guid | Select-Object -ExpandProperty Guid - } - - $mediaDestinationPath = Join-Path -Path (Get-TemporaryFolder) -ChildPath $mediaDestinationFolder - - New-VerboseMessage -Message "Robocopy is copying media from source '$SourcePath' to destination '$mediaDestinationPath'" - Copy-ItemWithRoboCopy -Path $SourcePath -DestinationPath $mediaDestinationPath - - Remove-SmbMapping -RemotePath $SourcePath -Force - - $SourcePath = $mediaDestinationPath - } - - $pathToSetupExecutable = Join-Path -Path $SourcePath -ChildPath 'setup.exe' - - New-VerboseMessage -Message "Using path: $pathToSetupExecutable" - - $sqlVersion = Get-SqlMajorVersion -Path $pathToSetupExecutable - - # Determine features to install - $featuresToInstall = "" - foreach ($feature in $Features.Split(",")) - { - # Given that all the returned features are uppercase, make sure that the feature to search for is also uppercase - $feature = $feature.ToUpper(); - - if (($sqlVersion -in ('13','14')) -and ($feature -in ('ADV_SSMS','SSMS'))) - { - Throw New-TerminatingError -ErrorType FeatureNotSupported -FormatArgs @($feature) -ErrorCategory InvalidData - } - - if (-not ($getTargetResourceResult.Features.Contains($feature))) - { - $featuresToInstall += "$feature," - } - } - - $Features = $featuresToInstall.Trim(',') - - # If SQL shared components already installed, clear InstallShared*Dir variables - switch ($sqlVersion) - { - '10' - { - if((Get-Variable -Name 'InstallSharedDir' -ErrorAction SilentlyContinue) -and (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\0D1F366D0FE0E404F8C15EE4F1C15094' -ErrorAction SilentlyContinue)) - { - Set-Variable -Name 'InstallSharedDir' -Value '' - } - - if((Get-Variable -Name 'InstallSharedWOWDir' -ErrorAction SilentlyContinue) -and (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\C90BFAC020D87EA46811C836AD3C507F' -ErrorAction SilentlyContinue)) - { - Set-Variable -Name 'InstallSharedWOWDir' -Value '' - } - } - - '11' - { - if((Get-Variable -Name 'InstallSharedDir' -ErrorAction SilentlyContinue) -and (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\30AE1F084B1CF8B4797ECB3CCAA3B3B6' -ErrorAction SilentlyContinue)) - { - Set-Variable -Name 'InstallSharedDir' -Value '' - } - - if((Get-Variable -Name 'InstallSharedWOWDir' -ErrorAction SilentlyContinue) -and (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\A79497A344129F64CA7D69C56F5DD8B4' -ErrorAction SilentlyContinue)) - { - Set-Variable -Name 'InstallSharedWOWDir' -Value '' - } - } - - '12' - { - if((Get-Variable -Name 'InstallSharedDir' -ErrorAction SilentlyContinue) -and (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\FEE2E540D20152D4597229B6CFBC0A69' -ErrorAction SilentlyContinue)) - { - Set-Variable -Name 'InstallSharedDir' -Value '' - } - - if((Get-Variable -Name 'InstallSharedWOWDir' -ErrorAction SilentlyContinue) -and (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\C90BFAC020D87EA46811C836AD3C507F' -ErrorAction SilentlyContinue)) - { - Set-Variable -Name 'InstallSharedWOWDir' -Value '' - } - } - - { $_ -in ('13','14') } - { - if((Get-Variable -Name 'InstallSharedDir' -ErrorAction SilentlyContinue) -and (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\FEE2E540D20152D4597229B6CFBC0A69' -ErrorAction SilentlyContinue)) - { - Set-Variable -Name 'InstallSharedDir' -Value '' - } - - if((Get-Variable -Name 'InstallSharedWOWDir' -ErrorAction SilentlyContinue) -and (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\A79497A344129F64CA7D69C56F5DD8B4' -ErrorAction SilentlyContinue)) - { - Set-Variable -Name 'InstallSharedWOWDir' -Value '' - } - } - } - - $setupArguments = @{} - - if ($Action -in @('PrepareFailoverCluster','CompleteFailoverCluster','InstallFailoverCluster','Addnode')) - { - # This was brought over from the old module. Should be removed (breaking change). - $setupArguments += @{ - SkipRules = 'Cluster_VerifyForErrors' - } - } - - <# - Set the failover cluster group name and failover cluster network name for this clustered instance - if the action is either installing (InstallFailoverCluster) or completing (CompleteFailoverCluster) a cluster. - #> - if ($Action -in @('CompleteFailoverCluster','InstallFailoverCluster')) - { - $setupArguments += @{ - FailoverClusterNetworkName = $FailoverClusterNetworkName - FailoverClusterGroup = $FailoverClusterGroupName - } - } - - # Perform disk mapping for specific cluster installation types - if ($Action -in @('CompleteFailoverCluster','InstallFailoverCluster')) - { - $requiredDrive = @() - - # This is also used to evaluate which cluster shard disks should be used. - $parametersToEvaluateShareDisk = @( - 'InstallSQLDataDir', - 'SQLUserDBDir', - 'SQLUserDBLogDir', - 'SQLTempDBDir', - 'SQLTempDBLogDir', - 'SQLBackupDir', - 'ASDataDir', - 'ASLogDir', - 'ASBackupDir', - 'ASTempDir', - 'ASConfigDir' - ) - - # Get a required listing of drives based on parameters assigned by user. - foreach ($parameterName in $parametersToEvaluateShareDisk) - { - if ($PSBoundParameters.ContainsKey($parameterName)) - { - $parameterValue = Get-Variable -Name $parameterName -ValueOnly - if ($parameterValue) - { - New-VerboseMessage -Message ("Found assigned parameter '{0}'. Adding path '{1}' to list of paths that required cluster drive." -f $parameterName, $parameterValue) - $requiredDrive += $parameterValue - } - } - } - - # Only keep unique paths and add a member to keep track if the path is mapped to a disk. - $requiredDrive = $requiredDrive | Sort-Object -Unique | Add-Member -MemberType NoteProperty -Name IsMapped -Value $false -PassThru - - # Get the disk resources that are available (not assigned to a cluster role) - $availableStorage = Get-CimInstance -Namespace 'root/MSCluster' -ClassName 'MSCluster_ResourceGroup' -Filter "Name = 'Available Storage'" | - Get-CimAssociatedInstance -Association MSCluster_ResourceGroupToResource -ResultClassName MSCluster_Resource | ` - Add-Member -MemberType NoteProperty -Name 'IsPossibleOwner' -Value $false -PassThru - - # First map regular cluster volumes - foreach ($diskResource in $availableStorage) - { - # Determine whether the current node is a possible owner of the disk resource - $possibleOwners = $diskResource | Get-CimAssociatedInstance -Association 'MSCluster_ResourceToPossibleOwner' -KeyOnly | Select-Object -ExpandProperty Name - - if ($possibleOwners -icontains $env:COMPUTERNAME) - { - $diskResource.IsPossibleOwner = $true - } - } - - $failoverClusterDisks = @() - - foreach ($currentRequiredDrive in $requiredDrive) - { - foreach ($diskResource in ($availableStorage | Where-Object {$_.IsPossibleOwner -eq $true})) - { - $partitions = $diskResource | Get-CimAssociatedInstance -ResultClassName 'MSCluster_DiskPartition' | Select-Object -ExpandProperty Path - foreach ($partition in $partitions) - { - if ($currentRequiredDrive -imatch $partition.Replace('\','\\')) - { - $currentRequiredDrive.IsMapped = $true - $failoverClusterDisks += $diskResource.Name - break - } - - if ($currentRequiredDrive.IsMapped) - { - break - } - } - - if ($currentRequiredDrive.IsMapped) - { - break - } - } - } - - # Now we handle cluster shared volumes - $clusterSharedVolumes = Get-CimInstance -ClassName 'MSCluster_ClusterSharedVolume' -Namespace 'root/MSCluster' - - foreach ($clusterSharedVolume in $clusterSharedVolumes) - { - foreach ($currentRequiredDrive in ($requiredDrive | Where-Object {$_.IsMapped -eq $false})) - { - if ($currentRequiredDrive -imatch $clusterSharedVolume.Name.Replace('\','\\')) - { - $diskName = Get-CimInstance -ClassName 'MSCluster_ClusterSharedVolumeToResource' -Namespace 'root/MSCluster' | ` - Where-Object {$_.GroupComponent.Name -eq $clusterSharedVolume.Name} | ` - Select-Object -ExpandProperty PartComponent | ` - Select-Object -ExpandProperty Name - $failoverClusterDisks += $diskName - $currentRequiredDrive.IsMapped = $true - } - } - } - - # Ensure we have a unique listing of disks - $failoverClusterDisks = $failoverClusterDisks | Sort-Object -Unique - - # Ensure we mapped all required drives - $unMappedRequiredDrives = $requiredDrive | Where-Object {$_.IsMapped -eq $false} | Measure-Object - if ($unMappedRequiredDrives.Count -gt 0) - { - throw New-TerminatingError -ErrorType FailoverClusterDiskMappingError -FormatArgs ($failoverClusterDisks -join '; ') -ErrorCategory InvalidResult - } - - # Add the cluster disks as a setup argument - $setupArguments += @{ FailoverClusterDisks = ($failoverClusterDisks | Sort-Object) } - } - - # Determine network mapping for specific cluster installation types - if ($Action -in @('CompleteFailoverCluster','InstallFailoverCluster')) - { - $clusterIPAddresses = @() - - # If no IP Address has been specified, use "DEFAULT" - if ($FailoverClusterIPAddress.Count -eq 0) - { - $clusterIPAddresses += "DEFAULT" - } - else - { - # Get the available client networks - $availableNetworks = @(Get-CimInstance -Namespace root/MSCluster -ClassName MSCluster_Network -Filter 'Role >= 2') - - # Add supplied IP Addresses that are valid for available cluster networks - foreach ($address in $FailoverClusterIPAddress) - { - foreach ($network in $availableNetworks) - { - # Determine whether the IP address is valid for this network - if (Test-IPAddress -IPAddress $address -NetworkID $network.Address -SubnetMask $network.AddressMask) - { - # Add the formatted string to our array - $clusterIPAddresses += "IPv4;$address;$($network.Name);$($network.AddressMask)" - } - } - } - } - - # Ensure we mapped all required networks - $suppliedNetworkCount = $FailoverClusterIPAddress.Count - $mappedNetworkCount = $clusterIPAddresses.Count - - # Determine whether we have mapping issues for the IP Address(es) - if ($mappedNetworkCount -lt $suppliedNetworkCount) - { - throw New-TerminatingError -ErrorType FailoverClusterIPAddressNotValid -ErrorCategory InvalidArgument - } - - # Add the networks to the installation arguments - $setupArguments += @{ FailoverClusterIPAddresses = $clusterIPAddresses } - } - - # Add standard install arguments - $setupArguments += @{ - Quiet = $true - IAcceptSQLServerLicenseTerms = $true - Action = $Action - } - - $argumentVars = @( - 'InstanceName', - 'InstanceID', - 'UpdateEnabled', - 'UpdateSource', - 'ProductKey', - 'SQMReporting', - 'ErrorReporting' - ) - - if ($Action -in @('Install','InstallFailoverCluster','PrepareFailoverCluster','CompleteFailoverCluster')) - { - $argumentVars += @( - 'Features', - 'InstallSharedDir', - 'InstallSharedWOWDir', - 'InstanceDir' - ) - } - - if ($null -ne $BrowserSvcStartupType) - { - $argumentVars += 'BrowserSvcStartupType' - } - - if ($Features.Contains('SQLENGINE')) - { - - if ($PSBoundParameters.ContainsKey('SQLSvcAccount')) - { - $setupArguments += (Get-ServiceAccountParameters -ServiceAccount $SQLSvcAccount -ServiceType 'SQL') - } - - if($PSBoundParameters.ContainsKey('AgtSvcAccount')) - { - $setupArguments += (Get-ServiceAccountParameters -ServiceAccount $AgtSvcAccount -ServiceType 'AGT') - } - - if ($SecurityMode -eq 'SQL') - { - $setupArguments += @{ SAPwd = $SAPwd.GetNetworkCredential().Password } - } - - # Should not be passed when PrepareFailoverCluster is specified - if ($Action -in @('Install','InstallFailoverCluster','CompleteFailoverCluster')) - { - $setupArguments += @{ SQLSysAdminAccounts = @($SetupCredential.UserName) } - if ($PSBoundParameters.ContainsKey('SQLSysAdminAccounts')) - { - $setupArguments['SQLSysAdminAccounts'] += $SQLSysAdminAccounts - } - - $argumentVars += @( - 'SecurityMode', - 'SQLCollation', - 'InstallSQLDataDir', - 'SQLUserDBDir', - 'SQLUserDBLogDir', - 'SQLTempDBDir', - 'SQLTempDBLogDir', - 'SQLBackupDir' - ) - } - - if ($Action -in @('Install')) - { - $setupArguments += @{ AgtSvcStartupType = 'Automatic' } - } - } - - if ($Features.Contains('FULLTEXT')) - { - if ($PSBoundParameters.ContainsKey('FTSvcAccount')) - { - $setupArguments += (Get-ServiceAccountParameters -ServiceAccount $FTSvcAccount -ServiceType 'FT') - } - } - - if ($Features.Contains('RS')) - { - if ($PSBoundParameters.ContainsKey('RSSvcAccount')) - { - $setupArguments += (Get-ServiceAccountParameters -ServiceAccount $RSSvcAccount -ServiceType 'RS') - } - } - - if ($Features.Contains('AS')) - { - $argumentVars += @( - 'ASCollation', - 'ASDataDir', - 'ASLogDir', - 'ASBackupDir', - 'ASTempDir', - 'ASConfigDir' - ) - - if ($PSBoundParameters.ContainsKey('ASSvcAccount')) - { - $setupArguments += (Get-ServiceAccountParameters -ServiceAccount $ASSvcAccount -ServiceType 'AS') - } - - if ($Action -in ('Install','InstallFailoverCluster','CompleteFailoverCluster')) - { - $setupArguments += @{ ASSysAdminAccounts = @($SetupCredential.UserName) } - - if($PSBoundParameters.ContainsKey("ASSysAdminAccounts")) - { - $setupArguments['ASSysAdminAccounts'] += $ASSysAdminAccounts - } - } - } - - if ($Features.Contains('IS')) - { - if ($PSBoundParameters.ContainsKey('ISSvcAccount')) - { - $setupArguments += (Get-ServiceAccountParameters -ServiceAccount $ISSvcAccount -ServiceType 'IS') - } - } - - # Automatically include any additional arguments - foreach ($argument in $argumentVars) - { - if($argument -eq 'ProductKey') - { - $setupArguments += @{ 'PID' = (Get-Variable -Name $argument -ValueOnly) } - } - else - { - $setupArguments += @{ $argument = (Get-Variable -Name $argument -ValueOnly) } - } - } - - # Build the argument string to be passed to setup - $arguments = '' - foreach ($currentSetupArgument in $setupArguments.GetEnumerator()) - { - if ($currentSetupArgument.Value -ne '') - { - # Arrays are handled specially - if ($currentSetupArgument.Value -is [array]) - { - # Sort and format the array - $setupArgumentValue = ($currentSetupArgument.Value | Sort-Object | ForEach-Object { '"{0}"' -f $_ }) -join ' ' - } - elseif ($currentSetupArgument.Value -is [Boolean]) - { - $setupArgumentValue = @{ $true = 'True'; $false = 'False' }[$currentSetupArgument.Value] - $setupArgumentValue = '"{0}"' -f $setupArgumentValue - } - else - { - # Features are comma-separated, no quotes - if ($currentSetupArgument.Key -eq 'Features') - { - $setupArgumentValue = $currentSetupArgument.Value - } - else - { - $setupArgumentValue = '"{0}"' -f $currentSetupArgument.Value - } - } - - $arguments += "/$($currentSetupArgument.Key.ToUpper())=$($setupArgumentValue) " - } - - } - - # Replace sensitive values for verbose output - $log = $arguments - if ($SecurityMode -eq 'SQL') - { - $log = $log.Replace($SAPwd.GetNetworkCredential().Password,"********") - } - - if ($ProductKey -ne "") - { - $log = $log.Replace($ProductKey,"*****-*****-*****-*****-*****") - } - - $logVars = @('AgtSvcAccount', 'SQLSvcAccount', 'FTSvcAccount', 'RSSvcAccount', 'ASSvcAccount','ISSvcAccount') - foreach ($logVar in $logVars) - { - if ($PSBoundParameters.ContainsKey($logVar)) - { - $log = $log.Replace((Get-Variable -Name $logVar).Value.GetNetworkCredential().Password,"********") - } - } - - New-VerboseMessage -Message "Starting setup using arguments: $log" - - $arguments = $arguments.Trim() - $processArguments = @{ - Path = $pathToSetupExecutable - Arguments = $arguments - } - - if ($Action -in @('InstallFailoverCluster','AddNode')) - { - $processArguments.Add('Credential',$SetupCredential) - } - - $process = StartWin32Process @processArguments - - New-VerboseMessage -Message $process - - WaitForWin32ProcessEnd -Path $pathToSetupExecutable -Arguments $arguments - - if ($ForceReboot -or ($null -ne (Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name 'PendingFileRenameOperations' -ErrorAction SilentlyContinue))) - { - if (-not ($SuppressReboot)) - { - $global:DSCMachineStatus = 1 - } - else - { - New-VerboseMessage -Message 'Suppressing reboot' - } - } - - if (-not (Test-TargetResource @PSBoundParameters)) - { - throw New-TerminatingError -ErrorType TestFailedAfterSet -ErrorCategory InvalidResult - } -} - -<# - .SYNOPSIS - Tests if the SQL Server features are installed on the node. - - .PARAMETER Action - The action to be performed. Default value is 'Install'. - Possible values are 'Install', 'InstallFailoverCluster', 'AddNode', 'PrepareFailoverCluster', and 'CompleteFailoverCluster' - - .PARAMETER SourcePath - The path to the root of the source files for installation. I.e and UNC path to a shared resource. Environment variables can be used in the path. - - .PARAMETER SetupCredential - Credential to be used to perform the installation. - - .PARAMETER SourceCredential - Credentials used to access the path set in the parameter `SourcePath`. Using this parameter will trigger a copy - of the installation media to a temp folder on the target node. Setup will then be started from the temp folder on the target node. - For any subsequent calls to the resource, the parameter `SourceCredential` is used to evaluate what major version the file 'setup.exe' - has in the path set, again, by the parameter `SourcePath`. - If the path, that is assigned to parameter `SourcePath`, contains a leaf folder, for example '\\server\share\folder', then that leaf - folder will be used as the name of the temporary folder. If the path, that is assigned to parameter `SourcePath`, does not have a - leaf folder, for example '\\server\share', then a unique guid will be used as the name of the temporary folder. - - .PARAMETER SuppressReboot - Suppresses reboot. - - .PARAMETER ForceReboot - Forces reboot. - - .PARAMETER Features - SQL features to be installed. - - .PARAMETER InstanceName - Name of the SQL instance to be installed. - - .PARAMETER InstanceID - SQL instance ID, if different from InstanceName. - - .PARAMETER ProductKey - Product key for licensed installations. - - .PARAMETER UpdateEnabled - Enabled updates during installation. - - .PARAMETER UpdateSource - Path to the source of updates to be applied during installation. - - .PARAMETER SQMReporting - Enable customer experience reporting. - - .PARAMETER ErrorReporting - Enable error reporting. - - .PARAMETER InstallSharedDir - Installation path for shared SQL files. - - .PARAMETER InstallSharedWOWDir - Installation path for x86 shared SQL files. - - .PARAMETER InstanceDir - Installation path for SQL instance files. - - .PARAMETER SQLSvcAccount - Service account for the SQL service. - - .PARAMETER AgtSvcAccount - Service account for the SQL Agent service. - - .PARAMETER SQLCollation - Collation for SQL. - - .PARAMETER SQLSysAdminAccounts - Array of accounts to be made SQL administrators. - - .PARAMETER SecurityMode - Security mode to apply to the SQL Server instance. - - .PARAMETER SAPwd - SA password, if SecurityMode is set to 'SQL'. - - .PARAMETER InstallSQLDataDir - Root path for SQL database files. - - .PARAMETER SQLUserDBDir - Path for SQL database files. - - .PARAMETER SQLUserDBLogDir - Path for SQL log files. - - .PARAMETER SQLTempDBDir - Path for SQL TempDB files. - - .PARAMETER SQLTempDBLogDir - Path for SQL TempDB log files. - - .PARAMETER SQLBackupDir - Path for SQL backup files. - - .PARAMETER FTSvcAccount - Service account for the Full Text service. - - .PARAMETER RSSvcAccount - Service account for Reporting Services service. - - .PARAMETER ASSvcAccount - Service account for Analysis Services service. - - .PARAMETER ASCollation - Collation for Analysis Services. - - .PARAMETER ASSysAdminAccounts - Array of accounts to be made Analysis Services admins. - - .PARAMETER ASDataDir - Path for Analysis Services data files. - - .PARAMETER ASLogDir - Path for Analysis Services log files. - - .PARAMETER ASBackupDir - Path for Analysis Services backup files. - - .PARAMETER ASTempDir - Path for Analysis Services temp files. - - .PARAMETER ASConfigDir - Path for Analysis Services config. - - .PARAMETER ISSvcAccount - Service account for Integration Services service. - - .PARAMETER BrowserSvcStartupType - Specifies the startup mode for SQL Server Browser service - - .PARAMETER FailoverClusterGroupName - The name of the resource group to create for the clustered SQL Server instance. Default is 'SQL Server (InstanceName)'. - - .PARAMETER FailoverClusterIPAddress - Array of IP Addresses to be assigned to the clustered SQL Server instance - - .PARAMETER FailoverClusterNetworkName - Host name to be assigned to the clustered SQL Server instance -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter()] - [ValidateSet('Install','InstallFailoverCluster','AddNode','PrepareFailoverCluster','CompleteFailoverCluster')] - [System.String] - $Action = 'Install', - - [Parameter()] - [System.String] - $SourcePath, - - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [Parameter()] - [System.Management.Automation.PSCredential] - $SourceCredential, - - [Parameter()] - [System.Boolean] - $SuppressReboot, - - [Parameter()] - [System.Boolean] - $ForceReboot, - - [Parameter()] - [System.String] - $Features, - - [Parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [Parameter()] - [System.String] - $InstanceID, - - [Parameter()] - [System.String] - $ProductKey, - - [Parameter()] - [System.String] - $UpdateEnabled, - - [Parameter()] - [System.String] - $UpdateSource, - - [Parameter()] - [System.String] - $SQMReporting, - - [Parameter()] - [System.String] - $ErrorReporting, - - [Parameter()] - [System.String] - $InstallSharedDir, - - [Parameter()] - [System.String] - $InstallSharedWOWDir, - - [Parameter()] - [System.String] - $InstanceDir, - - [Parameter()] - [System.Management.Automation.PSCredential] - $SQLSvcAccount, - - [Parameter()] - [System.Management.Automation.PSCredential] - $AgtSvcAccount, - - [Parameter()] - [System.String] - $SQLCollation, - - [Parameter()] - [System.String[]] - $SQLSysAdminAccounts, - - [Parameter()] - [System.String] - $SecurityMode, - - [Parameter()] - [System.Management.Automation.PSCredential] - $SAPwd, - - [Parameter()] - [System.String] - $InstallSQLDataDir, - - [Parameter()] - [System.String] - $SQLUserDBDir, - - [Parameter()] - [System.String] - $SQLUserDBLogDir, - - [Parameter()] - [System.String] - $SQLTempDBDir, - - [Parameter()] - [System.String] - $SQLTempDBLogDir, - - [Parameter()] - [System.String] - $SQLBackupDir, - - [Parameter()] - [System.Management.Automation.PSCredential] - $FTSvcAccount, - - [Parameter()] - [System.Management.Automation.PSCredential] - $RSSvcAccount, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ASSvcAccount, - - [Parameter()] - [System.String] - $ASCollation, - - [Parameter()] - [System.String[]] - $ASSysAdminAccounts, - - [Parameter()] - [System.String] - $ASDataDir, - - [Parameter()] - [System.String] - $ASLogDir, - - [Parameter()] - [System.String] - $ASBackupDir, - - [Parameter()] - [System.String] - $ASTempDir, - - [Parameter()] - [System.String] - $ASConfigDir, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ISSvcAccount, - - [Parameter()] - [System.String] - [ValidateSet('Automatic', 'Disabled', 'Manual')] - $BrowserSvcStartupType, - - [Parameter(ParameterSetName = 'ClusterInstall')] - [System.String] - $FailoverClusterGroupName = "SQL Server ($InstanceName)", - - [Parameter(ParameterSetName = 'ClusterInstall')] - [System.String[]] - $FailoverClusterIPAddress, - - [Parameter(ParameterSetName = 'ClusterInstall')] - [System.String] - $FailoverClusterNetworkName - ) - - $getTargetResourceParameters = @{ - Action = $Action - SourcePath = $SourcePath - SetupCredential = $SetupCredential - SourceCredential = $SourceCredential - InstanceName = $InstanceName - FailoverClusterNetworkName = $FailoverClusterNetworkName - } - - $boundParameters = $PSBoundParameters - - $getTargetResourceResult = Get-TargetResource @getTargetResourceParameters - New-VerboseMessage -Message "Features found: '$($getTargetResourceResult.Features)'" - - $result = $true - - if ($getTargetResourceResult.Features ) - { - foreach ($feature in $Features.Split(",")) - { - # Given that all the returned features are uppercase, make sure that the feature to search for is also uppercase - $feature = $feature.ToUpper(); - - if(!($getTargetResourceResult.Features.Contains($feature))) - { - New-VerboseMessage -Message "Unable to find feature '$feature' among the installed features: '$($getTargetResourceResult.Features)'" - $result = $false - } - } - } - else - { - $result = $false - } - - if ($PSCmdlet.ParameterSetName -eq 'ClusterInstall') - { - New-VerboseMessage -Message "Clustered install, checking parameters." - - $boundParameters.Keys | Where-Object {$_ -imatch "^FailoverCluster"} | ForEach-Object { - $variableName = $_ - - if ($getTargetResourceResult.$variableName -ne $boundParameters[$variableName]) { - New-VerboseMessage -Message "$variableName '$($boundParameters[$variableName])' is not in the desired state for this cluster." - $result = $false - } - } - } - - return $result -} - -<# - .SYNOPSIS - Returns the SQL Server major version from the setup.exe executable provided in the Path parameter. - - .PARAMETER Path - String containing the path to the SQL Server setup.exe executable. -#> -function Get-SqlMajorVersion -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory=$true)] - [String] - $Path - ) - - (Get-Item -Path $Path).VersionInfo.ProductVersion.Split('.')[0] -} - -<# - .SYNOPSIS - Returns the first item value in the registry location provided in the Path parameter. - - .PARAMETER Path - String containing the path to the registry. -#> -function Get-FirstItemPropertyValue -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory=$true)] - [String] - $Path - ) - - $registryProperty = Get-Item -Path $Path -ErrorAction SilentlyContinue - if ($registryProperty) - { - $registryProperty = $registryProperty | Select-Object -ExpandProperty Property | Select-Object -First 1 - if ($registryProperty) - { - $registryPropertyValue = (Get-ItemProperty -Path $Path -Name $registryProperty).$registryProperty.TrimEnd('\') - } - } - - return $registryPropertyValue -} - -<# - .SYNOPSIS - Copy folder structure using RoboCopy. Every file and folder, including empty ones are copied. - - .PARAMETER Path - Source path to be copied. - - .PARAMETER DestinationPath - The path to the destination. -#> -function Copy-ItemWithRoboCopy -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $DestinationPath - ) - - $robocopyExecutable = Get-Command -Name "Robocopy.exe" -ErrorAction Stop - - $robocopyArgumentSilent = '/njh /njs /ndl /nc /ns /nfl' - $robocopyArgumentCopySubDirectoriesIncludingEmpty = '/e' - $robocopyArgumentDeletesDestinationFilesAndDirectoriesNotExistAtSource = '/purge' - - if ([System.Version]$robocopyExecutable.FileVersionInfo.ProductVersion -ge [System.Version]'6.3.9600.16384') - { - Write-Verbose "Robocopy is using unbuffered I/O." - $robocopyArgumentUseUnbufferedIO = '/J' - } - else - { - Write-Verbose 'Unbuffered I/O cannot be used due to incompatible version of Robocopy.' - } - - $robocopyArgumentList = '{0} {1} {2} {3} {4} {5}' -f $Path, - $DestinationPath, - $robocopyArgumentCopySubDirectoriesIncludingEmpty, - $robocopyArgumentDeletesDestinationFilesAndDirectoriesNotExistAtSource, - $robocopyArgumentUseUnbufferedIO, - $robocopyArgumentSilent - - $robocopyStartProcessParameters = @{ - FilePath = $robocopyExecutable.Name - ArgumentList = $robocopyArgumentList - } - - Write-Verbose ('Robocopy is started with the following arguments: {0}' -f $robocopyArgumentList ) - $robocopyProcess = Start-Process @robocopyStartProcessParameters -Wait -NoNewWindow -PassThru - - switch ($($robocopyProcess.ExitCode)) - { - {$_ -in 8, 16} - { - throw "Robocopy reported errors when copying files. Error code: $_." - } - - {$_ -gt 7 } - { - throw "Robocopy reported that failures occured when copying files. Error code: $_." - } - - 1 - { - Write-Verbose 'Robocopy copied files sucessfully' - } - - 2 - { - Write-Verbose 'Robocopy found files at the destination path that is not present at the source path, these extra files was remove at the destination path.' - } - - 3 - { - Write-Verbose 'Robocopy copied files to destination sucessfully. Robocopy also found files at the destination path that is not present at the source path, these extra files was remove at the destination path.' - } - - {$_ -eq 0 -or $null -eq $_ } - { - Write-Verbose 'Robocopy reported that all files already present.' - } - } -} - -<# - .SYNOPSIS - Returns the path of the current user's temporary folder. -#> -function Get-TemporaryFolder -{ - [CmdletBinding()] - [OutputType([System.String])] - param() - - return [IO.Path]::GetTempPath() -} - -<# - .SYNOPSIS - Returns the decimal representation of an IP Addresses - - .PARAMETER IPAddress - The IP Address to be converted -#> -function ConvertTo-Decimal -{ - [CmdletBinding()] - [OutputType([System.UInt32])] - param( - [Parameter(Mandatory = $true)] - [System.Net.IPAddress] - $IPAddress - ) - - $i = 3 - $DecimalIP = 0 - $IPAddress.GetAddressBytes() | ForEach-Object { - $DecimalIP += $_ * [Math]::Pow(256,$i) - $i-- - } - - return [UInt32]$DecimalIP -} - -<# - .SYNOPSIS - Determines whether an IP Address is valid for a given network / subnet - - .PARAMETER IPAddress - IP Address to be checked - - .PARAMETER NetworkID - IP Address of the network identifier - - .PARAMETER SubnetMask - Subnet mask of the network to be checked -#> -function Test-IPAddress -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.Net.IPAddress] - $IPAddress, - - [Parameter(Mandatory = $true)] - [System.Net.IPAddress] - $NetworkID, - - [Parameter(Mandatory = $true)] - [System.Net.IPAddress] - $SubnetMask - ) - - # Convert all values to decimal - $IPAddressDecimal = ConvertTo-Decimal -IPAddress $IPAddress - $NetworkDecimal = ConvertTo-Decimal -IPAddress $NetworkID - $SubnetDecimal = ConvertTo-Decimal -IPAddress $SubnetMask - - # Determine whether the IP Address is valid for this network / subnet - return (($IPAddressDecimal -band $SubnetDecimal) -eq ($NetworkDecimal -band $SubnetDecimal)) -} - -<# - .SYNOPSIS - Builds service account parameters for setup - - .PARAMETER ServiceAccount - Credential for the service account - - .PARAMETER ServiceType - Type of service account -#> -function Get-ServiceAccountParameters -{ - [CmdletBinding()] - [OutputType([Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [PSCredential] - $ServiceAccount, - - [Parameter(Mandatory = $true)] - [ValidateSet('SQL','AGT','IS','RS','AS','FT')] - [String] - $ServiceType - ) - - $parameters = @{} - - switch -Regex ($ServiceAccount.UserName.ToUpper()) - { - '^(?:NT ?AUTHORITY\\)?(SYSTEM|LOCALSERVICE|LOCAL SERVICE|NETWORKSERVICE|NETWORK SERVICE)$' - { - $parameters = @{ - "$($ServiceType)SVCACCOUNT" = "NT AUTHORITY\$($Matches[1])" - } - } - - '^(?:NT SERVICE\\)(.*)$' - { - $parameters = @{ - "$($ServiceType)SVCACCOUNT" = "NT SERVICE\$($Matches[1])" - } - } - - '.*\$' - { - $parameters = @{ - "$($ServiceType)SVCACCOUNT" = $ServiceAccount.UserName - } - } - - default - { - $parameters = @{ - "$($ServiceType)SVCACCOUNT" = $ServiceAccount.UserName - "$($ServiceType)SVCPASSWORD" = $ServiceAccount.GetNetworkCredential().Password - } - } - } - - return $parameters -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerSetup/MSFT_xSQLServerSetup.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerSetup/MSFT_xSQLServerSetup.schema.mof deleted file mode 100644 index f30fd559..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xSQLServerSetup/MSFT_xSQLServerSetup.schema.mof +++ /dev/null @@ -1,54 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xSQLServerSetup")] -class MSFT_xSQLServerSetup : OMI_BaseResource -{ - [Write, Description("The action to be performed. Default value is 'Install'."), ValueMap{"Install","InstallFailoverCluster","AddNode","PrepareFailoverCluster","CompleteFailoverCluster"}, Values{"Install","InstallFailoverCluster","AddNode","PrepareFailoverCluster","CompleteFailoverCluster"}] String Action; - [Write, Description("The path to the root of the source files for installation. I.e and UNC path to a shared resource. Environment variables can be used in the path.")] String SourcePath; - [Required, EmbeddedInstance("MSFT_Credential"), Description("Credential to be used to perform the installation.")] String SetupCredential; - [Write, EmbeddedInstance("MSFT_Credential"), Description("Credentials used to access the path set in the parameter 'SourcePath'.")] String SourceCredential; - [Write, Description("Suppresses reboot.")] Boolean SuppressReboot; - [Write, Description("Forces reboot.")] Boolean ForceReboot; - [Write, Description("SQL features to be installed.")] String Features; - [Key, Description("Name of the SQL instance to be installed.")] String InstanceName; - [Write, Description("SQL instance ID, if different from InstanceName.")] String InstanceID; - [Write, Description("Product key for licensed installations.")] String ProductKey; - [Write, Description("Enabled updates during installation.")] String UpdateEnabled; - [Write, Description("Path to the source of updates to be applied during installation.")] String UpdateSource; - [Write, Description("Enable customer experience reporting.")] String SQMReporting; - [Write, Description("Enable error reporting.")] String ErrorReporting; - [Write, Description("Installation path for shared SQL files.")] String InstallSharedDir; - [Write, Description("Installation path for x86 shared SQL files.")] String InstallSharedWOWDir; - [Write, Description("Installation path for SQL instance files.")] String InstanceDir; - [Write, EmbeddedInstance("MSFT_Credential"), Description("Service account for the SQL service.")] String SQLSvcAccount; - [Read, Description("Output username for the SQL service.")] String SQLSvcAccountUsername; - [Write, EmbeddedInstance("MSFT_Credential"), Description("Service account for the SQL Agent service.")] String AgtSvcAccount; - [Read, Description("Output username for the SQL Agent service.")] String AgtSvcAccountUsername; - [Write, Description("Collation for SQL.")] String SQLCollation; - [Write, Description("Array of accounts to be made SQL administrators.")] String SQLSysAdminAccounts[]; - [Write, Description("Security mode to apply to the SQL Server instance.")] String SecurityMode; - [Write, EmbeddedInstance("MSFT_Credential"), Description("SA password, if SecurityMode is set to 'SQL'.")] String SAPwd; - [Write, Description("Root path for SQL database files.")] String InstallSQLDataDir; - [Write, Description("Path for SQL database files.")] String SQLUserDBDir; - [Write, Description("Path for SQL log files.")] String SQLUserDBLogDir; - [Write, Description("Path for SQL TempDB files.")] String SQLTempDBDir; - [Write, Description("Path for SQL TempDB log files.")] String SQLTempDBLogDir; - [Write, Description("Path for SQL backup files.")] String SQLBackupDir; - [Write, EmbeddedInstance("MSFT_Credential"), Description("Service account for the Full Text service.")] String FTSvcAccount; - [Read, Description("Output username for the Full Text service.")] String FTSvcAccountUsername; - [Write, EmbeddedInstance("MSFT_Credential"), Description("Service account for Reporting Services service.")] String RSSvcAccount; - [Read, Description("Output username for the Reporting Services service.")] String RSSvcAccountUsername; - [Write, EmbeddedInstance("MSFT_Credential"), Description("Service account for Analysis Services service.")] String ASSvcAccount; - [Read, Description("Output username for the Analysis Services service.")] String ASSvcAccountUsername; - [Write, Description("Collation for Analysis Services.")] String ASCollation; - [Write, Description("Array of accounts to be made Analysis Services admins.")] String ASSysAdminAccounts[]; - [Write, Description("Path for Analysis Services data files.")] String ASDataDir; - [Write, Description("Path for Analysis Services log files.")] String ASLogDir; - [Write, Description("Path for Analysis Services backup files.")] String ASBackupDir; - [Write, Description("Path for Analysis Services temp files.")] String ASTempDir; - [Write, Description("Path for Analysis Services config.")] String ASConfigDir; - [Write, EmbeddedInstance("MSFT_Credential"), Description("Service account for Integration Services service.")] String ISSvcAccount; - [Read, Description("Output username for the Integration Services service.")] String ISSvcAccountUsername; - [Write, Description("Specifies the startup mode for SQL Server Browser service."), ValueMap{"Automatic", "Disabled", "Manual"}, Values{"Automatic", "Disabled", "Manual"}] String BrowserSvcStartupType; - [Write, Description("The name of the resource group to create for the clustered SQL Server instance. Default is 'SQL Server (InstanceName)'.")] String FailoverClusterGroupName; - [Write, Description("Array of IP Addresses to be assigned to the clustered SQL Server instance.")] String FailoverClusterIPAddress[]; - [Write, Description("Host name to be assigend to the clustered SQL Server instance.")] String FailoverClusterNetworkName; -}; diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xWaitForAvailabilityGroup/MSFT_xWaitForAvailabilityGroup.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xWaitForAvailabilityGroup/MSFT_xWaitForAvailabilityGroup.psm1 deleted file mode 100644 index 323889ed..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xWaitForAvailabilityGroup/MSFT_xWaitForAvailabilityGroup.psm1 +++ /dev/null @@ -1,126 +0,0 @@ -$currentPath = Split-Path -Parent $MyInvocation.MyCommand.Path -Write-Verbose -Message "CurrentPath: $currentPath" - -# Load Common Code -Import-Module $currentPath\..\..\xSQLServerHelper.psm1 -Verbose:$false -ErrorAction Stop - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [UInt64] $RetryIntervalSec = 10, - [UInt32] $RetryCount = 50 - ) - - @{ - Name = $Name - RetryIntervalSec = $RetryIntervalSec - RetryCount = $RetryCount - } -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [System.UInt64] - $RetryIntervalSec =20, - - [System.UInt32] - $RetryCount = 6 - ) - - $AGFound = $false - New-VerboseMessage -Message "Checking for Availaibilty Group $Name ..." - - for ($count = 0; $count -lt $RetryCount; $count++) - { - try - { - $clusterGroup = Get-ClusterGroup -Name $Name -ErrorAction Ignore - - if ($clusterGroup -ne $null) - { - New-VerboseMessage -Message "Found Availability Group $Name" - $AGFound = $true - Start-Sleep -Seconds $RetryIntervalSec - break; - } - - } - catch - { - New-VerboseMessage -Message "Availability Group $Name not found. Will retry again after $RetryIntervalSec sec" - } - - New-VerboseMessage -Message "Availability Group $Name not found. Will retry again after $RetryIntervalSec sec" - Start-Sleep -Seconds $RetryIntervalSec - } - - if (! $AGFound) - { - throw "Availability Group $Name not found after $count attempts with $RetryIntervalSec sec interval" - Exit - } - - -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [System.UInt64] - $RetryIntervalSec = 10, - - [System.UInt32] - $RetryCount = 50 - ) - - New-VerboseMessage -Message "Checking for Availability Group $Name ..." - - try - { - - $clusterGroup = Get-ClusterGroup -Name $Name -ErrorAction Ignore - - if ($clusterGroup -eq $null) - { - New-VerboseMessage -Message "Availability Group $Name not found" - $false - } - else - { - New-VerboseMessage -Message "Found Availabilty Group $Name" - $true - } - } - catch - { - New-VerboseMessage -Message "Availability Group $Name not found" - $false - } -} - - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xWaitForAvailabilityGroup/MSFT_xWaitForAvailabilityGroup.schema.mof b/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xWaitForAvailabilityGroup/MSFT_xWaitForAvailabilityGroup.schema.mof deleted file mode 100644 index 08be8088..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/DSCResources/MSFT_xWaitForAvailabilityGroup/MSFT_xWaitForAvailabilityGroup.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xWaitForAvailabilityGroup")] -class MSFT_xWaitForAvailabilityGroup : OMI_BaseResource -{ - [Key, Description("Availability Group Name")] String Name; - [Write, Description("Interval to check for Availability Group")] Uint64 RetryIntervalSec; - [Write, Description("Maximum number of retries to check Availabilty group creation")] Uint32 RetryCount; -}; - diff --git a/lib/puppet_x/dsc_resources/xSQLServer/LICENSE b/lib/puppet_x/dsc_resources/xSQLServer/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xSQLServer/en-US/xPDT.strings.psd1 b/lib/puppet_x/dsc_resources/xSQLServer/en-US/xPDT.strings.psd1 deleted file mode 100644 index 0411cbba..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/en-US/xPDT.strings.psd1 +++ /dev/null @@ -1,11 +0,0 @@ -ConvertFrom-StringData @' -###PSLOC -FileNotFound=File not found in the environment path -AbsolutePathOrFileName=Absolute path or file name expected -InvalidArgument=Invalid argument: '{0}' with value: '{1}' -InvalidArgumentAndMessage={0} {1} -ErrorStarting=Failure starting process matching path '{0}'. Message: {1} -FailureWaitingForProcessesToStart=Failed to wait for processes to start -ProcessStarted=Process matching path '{0}' started in process ID {1} -ProcessAlreadyStarted=Process matching path '{0}' already started in process ID {1} -'@ diff --git a/lib/puppet_x/dsc_resources/xSQLServer/en-US/xSQLServer.strings.psd1 b/lib/puppet_x/dsc_resources/xSQLServer/en-US/xSQLServer.strings.psd1 deleted file mode 100644 index 5313b446..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/en-US/xSQLServer.strings.psd1 +++ /dev/null @@ -1,114 +0,0 @@ -ConvertFrom-StringData @' -###PSLOC -# Common -NoKeyFound = No Localization key found for ErrorType: '{0}'. -AbsentNotImplemented = Ensure = Absent is not implemented! -TestFailedAfterSet = Test-TargetResource returned false after calling set. -RemoteConnectionFailed = Remote PowerShell connection to Server '{0}' failed. -TODO = ToDo. Work not implemented at this time. -UnexpectedErrorFromGet = Got unexpected result from Get-TargetResource. No change is made. -FailedToImportSqlModule = Failed to import {0} module. -SqlModuleNotFound = Neither SqlServer module or SQLPS module was found. -NotConnectedToInstance = Was unable to connect to the instance '{0}\\{1}' -AlterAvailabilityGroupFailed = Failed to alter the availability group '{0}'. -HadrNotEnabled = HADR is not enabled. -AvailabilityGroupNotFound = Unable to locate the availability group '{0}' on the instance '{1}'. - -# SQLServer -NoDatabase = Database '{0}' does not exist on SQL server '{1}\\{2}'. -SSRSNotFound = SQL Reporting Services instance '{0}' does not exist! -RoleNotFound = Role '{0}' does not exist on database '{1}' on SQL server '{2}\\{3}'." -LoginNotFound = Login '{0}' does not exist on SQL server '{1}\\{2}'." -FailedLogin = Creating a login of type 'SqlLogin' requires LoginCredential -FeatureNotSupported = '{0}' is not a valid value for setting 'FEATURES'. Refer to SQL Help for more information. - -# Database Role -AddLoginDatabaseSetError = Failed adding the login {2} as a user of the database {3}, on the instance {0}\\{1}. -DropMemberDatabaseSetError = Failed removing the login {2} from the role {3} on the database {4}, on the instance {0}\\{1}. -AddMemberDatabaseSetError = Failed adding the login {2} to the role {3} on the database {4}, on the instance {0}\\{1}. - -# AvailabilityGroupListener -AvailabilityGroupListenerNotFound = Trying to make a change to a listener that does not exist. -AvailabilityGroupListenerErrorVerifyExist = Unexpected result when trying to verify existence of listener '{0}'. -AvailabilityGroupListenerIPChangeError = IP-address configuration mismatch. Expecting '{0}' found '{1}'. Resource does not support changing IP-address. Listener needs to be removed and then created again. -AvailabilityGroupListenerDHCPChangeError = IP-address configuration mismatch. Expecting '{0}' found '{1}'. Resource does not support changing between static IP and DHCP. Listener needs to be removed and then created again. - -# Endpoint -EndpointNotFound = Endpoint '{0}' does not exist -EndpointErrorVerifyExist = Unexpected result when trying to verify existence of endpoint '{0}'. -EndpointFoundButWrongType = Endpoint '{0}' does exist, but it is not of type 'DatabaseMirroring'. - -# Permission -PermissionGetError = Unexpected result when trying to get permissions for '{0}'. -PrincipalNotFound = Principal '{0}' does not exist. -PermissionMissingEnsure = Ensure is not set. No change can be made. - -# Configuration -ConfigurationOptionNotFound = Specified option '{0}' could not be found. -ConfigurationRestartRequired = Configuration option '{0}' has been updated, but a manual restart of SQL Server is required for it to take effect. - -# AlwaysOnService -AlterAlwaysOnServiceFailed = Failed to ensure Always On is {0} on the instance '{1}'. - -# Login -PasswordValidationFailed = Creation of the login '{0}' failed due to the following error: {1} -LoginCreationFailedFailedOperation = Creation of the login '{0}' failed due to a failed operation. -LoginCreationFailedSqlNotSpecified = Creation of the SQL login '{0}' failed due to an unspecified error. -LoginCreationFailedWindowsNotSpecified = Creation of the Windows login '{0}' failed due to an unspecified error. -LoginTypeNotImplemented = The login type '{0}' is not implemented in this resource. -IncorrectLoginMode = The instance '{0}\{1}' is currently in '{2}' authentication mode. To create a SQL Login, it must be set to 'Mixed' authentication mode. -LoginCredentialNotFound = The credential for the SQL Login '{0}' was not found. -PasswordChangeFailed = Setting the password failed for the SQL Login '{0}'. -AlterLoginFailed = Altering the login '{0}' failed. -CreateLoginFailed = Creating the login '{0}' failed. -DropLoginFailed = Dropping the login '{0}' failed. - -# Clustered Setup -FailoverClusterDiskMappingError = Unable to map the specified paths to valid cluster storage. Drives mapped: {0} -FailoverClusterIPAddressNotValid = Unable to map the specified IP Address(es) to valid cluster networks. -FailoverClusterResourceNotFound = Could not locate a SQL Server cluster resource for instance {0}. - -# AlwaysOnAvailabilityGroup -AlterAvailabilityGroupReplicaFailed = Failed to alter the avilability group replica '{0}'. -ClusterPermissionsMissing = The cluster does not have permissions to manage the Availability Group on '{0}\\{1}'. Grant 'Connect SQL', 'Alter Any Availability Group', and 'View Server State' to either 'NT SERVICE\\ClusSvc' or 'NT AUTHORITY\\SYSTEM'. -CreateAvailabilityGroupReplicaFailed = Creating the Availability Group Replica failed. -CreateAvailabilityGroupFailed = Creating the availability group '{0}' failed with the error '{1}'. -DatabaseMirroringEndpointNotFound = No database mirroring endpoint was found on '{0}\{1}'. -InstanceNotPrimaryReplica = The instance '{0}' is not the primary replica for the availability group '{1}'. -RemoveAvailabilityGroupFailed = Failed to remove the availabilty group '{0}' from the '{1}' instance. - -# AlwaysOnAvailabilityGroupReplica -JoinAvailabilityGroupFailed = Failed to join the availability group replica '{0}'. -RemoveAvailabilityGroupReplicaFailed = Failed to remove the availability group replica '{0}' with the error '{1}'. -ReplicaNotFound = Unable to find the availability group replica '{0}' on the instance '{1}'. - -# SQLServerHelper -ExecuteQueryWithResultsFailed = Executing query with results failed on database '{0}'. -ExecuteNonQueryFailed = Executing non-query failed on database '{0}'. -AnalysisServicesFailedToConnect = Failed to connect to Analysis Services '{0}'. -AnalysisServicesNoServerObject = Did not get the expected Analysis Services server object. - -# Max degree of parallelism -MaxDopSetError = Unexpected result when trying to configure the max degree of parallelism server configuration option. -MaxDopParamMustBeNull = MaxDop parameter must be set to $null or not assigned if DynamicAlloc parameter is set to $true. - -# Server Memory -MaxMemoryParamMustBeNull = The parameter MaxMemory must be null when DynamicAlloc is set to true. -MaxMemoryParamMustNotBeNull = The parameter MaxMemory must not be null when DynamicAlloc is set to false. -AlterServerMemoryFailed = Failed to alter the server configuration memory for {0}\\{1}. -ErrorGetDynamicMaxMemory = Failed to calculate dynamically the maximum memory. - -# SQLServerDatabase -CreateDatabaseSetError = Failed to create the database named {2} on {0}\\{1}. -DropDatabaseSetError = Failed to drop the database named {2} on {0}\\{1}. -FailedToGetOwnerDatabase = Failed to get owner of the database named {0} on {1}\\{2}. -FailedToSetOwnerDatabase = Failed to set owner named {0} of the database named {1} on {2}\\{3}. - -# SQLServerRole -EnumMemberNamesServerRoleGetError = Failed to enumerate members of the server role named {2} on {0}\\{1}. -MembersToIncludeAndExcludeParamMustBeNull = The parameter MembersToInclude and/or MembersToExclude must not be set, or be set to $null, when parameter Members are used. -CreateServerRoleSetError = Failed to create the server role named {2} on {0}\\{1}. -DropServerRoleSetError = Failed to drop the server role named {2} on {0}\\{1}. -AddMemberServerRoleSetError = Failed to add member {3} to the server role named {2} on {0}\\{1}. -DropMemberServerRoleSetError = Failed to drop member {3} to the server role named {2} on {0}\\{1}. -'@ diff --git a/lib/puppet_x/dsc_resources/xSQLServer/xPDT.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/xPDT.psm1 deleted file mode 100644 index 6334ef1a..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/xPDT.psm1 +++ /dev/null @@ -1,708 +0,0 @@ -Import-LocalizedData LocalizedData -filename xPDT.strings.psd1 - -function ThrowInvalidArgumentError -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $errorId, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $errorMessage - ) - - $errorCategory=[System.Management.Automation.ErrorCategory]::InvalidArgument - $exception = New-Object System.ArgumentException $errorMessage; - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - throw $errorRecord -} - -function ResolvePath -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Path - ) - - $Path = [Environment]::ExpandEnvironmentVariables($Path) - if(IsRootedPath $Path) - { - if(!(Test-Path $Path -PathType Leaf)) - { - ThrowInvalidArgumentError "CannotFindRootedPath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) - } - return $Path - } - else - { - $Path = (Get-Item -Path $Path -ErrorAction SilentlyContinue).FullName - if(!(Test-Path $Path -PathType Leaf)) - { - ThrowInvalidArgumentError "CannotFindRootedPath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) - } - return $Path - } - if([string]::IsNullOrEmpty($env:Path)) - { - ThrowInvalidArgumentError "EmptyEnvironmentPath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) - } - if((Split-Path $Path -Leaf) -ne $Path) - { - ThrowInvalidArgumentError "NotAbsolutePathOrFileName" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.AbsolutePathOrFileName) - } - foreach($rawSegment in $env:Path.Split(";")) - { - $segment = [Environment]::ExpandEnvironmentVariables($rawSegment) - $segmentRooted = $false - try - { - $segmentRooted=[IO.Path]::IsPathRooted($segment) - } - catch {} - if(!$segmentRooted) - { - continue - } - $candidate = join-path $segment $Path - if(Test-Path $candidate -PathType Leaf) - { - return $candidate - } - } - ThrowInvalidArgumentError "CannotFindRelativePath" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $LocalizedData.FileNotFound) -} - -function IsRootedPath -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path - ) - - try - { - return [IO.Path]::IsPathRooted($Path) - } - catch - { - ThrowInvalidArgumentError "CannotGetIsPathRooted" ($LocalizedData.InvalidArgumentAndMessage -f ($LocalizedData.InvalidArgument -f "Path",$Path), $_.Exception.Message) - } -} - -function ExtractArguments -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - $functionBoundParameters, - - [parameter(Mandatory = $true)] - [string[]] - $argumentNames, - - [string[]] - $newArgumentNames - ) - - $returnValue=@{} - - for($i=0;$i -lt $argumentNames.Count;$i++) - { - $argumentName = $argumentNames[$i] - - if($newArgumentNames -eq $null) - { - $newArgumentName = $argumentName - } - else - { - $newArgumentName = $newArgumentNames[$i] - } - - if($functionBoundParameters.ContainsKey($argumentName)) - { - $null = $returnValue.Add($newArgumentName,$functionBoundParameters[$argumentName]) - } - } - - return $returnValue -} - -function CallPInvoke -{ - $script:ProgramSource = @" -using System; -using System.Collections.Generic; -using System.Text; -using System.Security; -using System.Runtime.InteropServices; -using System.Diagnostics; -using System.Security.Principal; -using System.ComponentModel; -using System.IO; - -namespace Source -{ - [SuppressUnmanagedCodeSecurity] - public static class NativeMethods - { - //The following structs and enums are used by the various Win32 API's that are used in the code below - - [StructLayout(LayoutKind.Sequential)] - public struct STARTUPINFO - { - public Int32 cb; - public string lpReserved; - public string lpDesktop; - public string lpTitle; - public Int32 dwX; - public Int32 dwY; - public Int32 dwXSize; - public Int32 dwXCountChars; - public Int32 dwYCountChars; - public Int32 dwFillAttribute; - public Int32 dwFlags; - public Int16 wShowWindow; - public Int16 cbReserved2; - public IntPtr lpReserved2; - public IntPtr hStdInput; - public IntPtr hStdOutput; - public IntPtr hStdError; - } - - [StructLayout(LayoutKind.Sequential)] - public struct PROCESS_INFORMATION - { - public IntPtr hProcess; - public IntPtr hThread; - public Int32 dwProcessID; - public Int32 dwThreadID; - } - - [Flags] - public enum LogonType - { - LOGON32_LOGON_INTERACTIVE = 2, - LOGON32_LOGON_NETWORK = 3, - LOGON32_LOGON_BATCH = 4, - LOGON32_LOGON_SERVICE = 5, - LOGON32_LOGON_UNLOCK = 7, - LOGON32_LOGON_NETWORK_CLEARTEXT = 8, - LOGON32_LOGON_NEW_CREDENTIALS = 9 - } - - [Flags] - public enum LogonProvider - { - LOGON32_PROVIDER_DEFAULT = 0, - LOGON32_PROVIDER_WINNT35, - LOGON32_PROVIDER_WINNT40, - LOGON32_PROVIDER_WINNT50 - } - - [StructLayout(LayoutKind.Sequential)] - public struct SECURITY_ATTRIBUTES - { - public Int32 Length; - public IntPtr lpSecurityDescriptor; - public bool bInheritHandle; - } - - public enum SECURITY_IMPERSONATION_LEVEL - { - SecurityAnonymous, - SecurityIdentification, - SecurityImpersonation, - SecurityDelegation - } - - public enum TOKEN_TYPE - { - TokenPrimary = 1, - TokenImpersonation - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - internal struct TokPriv1Luid - { - public int Count; - public long Luid; - public int Attr; - } - - public const int GENERIC_ALL_ACCESS = 0x10000000; - public const int CREATE_NO_WINDOW = 0x08000000; - internal const int SE_PRIVILEGE_ENABLED = 0x00000002; - internal const int TOKEN_QUERY = 0x00000008; - internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; - internal const string SE_INCRASE_QUOTA = "SeIncreaseQuotaPrivilege"; - - [DllImport("kernel32.dll", - EntryPoint = "CloseHandle", SetLastError = true, - CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] - public static extern bool CloseHandle(IntPtr handle); - - [DllImport("advapi32.dll", - EntryPoint = "CreateProcessAsUser", SetLastError = true, - CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] - public static extern bool CreateProcessAsUser( - IntPtr hToken, - string lpApplicationName, - string lpCommandLine, - ref SECURITY_ATTRIBUTES lpProcessAttributes, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - bool bInheritHandle, - Int32 dwCreationFlags, - IntPtr lpEnvrionment, - string lpCurrentDirectory, - ref STARTUPINFO lpStartupInfo, - ref PROCESS_INFORMATION lpProcessInformation - ); - - [DllImport("advapi32.dll", EntryPoint = "DuplicateTokenEx")] - public static extern bool DuplicateTokenEx( - IntPtr hExistingToken, - Int32 dwDesiredAccess, - ref SECURITY_ATTRIBUTES lpThreadAttributes, - Int32 ImpersonationLevel, - Int32 dwTokenType, - ref IntPtr phNewToken - ); - - [DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)] - public static extern Boolean LogonUser( - String lpszUserName, - String lpszDomain, - String lpszPassword, - LogonType dwLogonType, - LogonProvider dwLogonProvider, - out IntPtr phToken - ); - - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern bool AdjustTokenPrivileges( - IntPtr htok, - bool disall, - ref TokPriv1Luid newst, - int len, - IntPtr prev, - IntPtr relen - ); - - [DllImport("kernel32.dll", ExactSpelling = true)] - internal static extern IntPtr GetCurrentProcess(); - - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern bool OpenProcessToken( - IntPtr h, - int acc, - ref IntPtr phtok - ); - - [DllImport("advapi32.dll", SetLastError = true)] - internal static extern bool LookupPrivilegeValue( - string host, - string name, - ref long pluid - ); - - public static void CreateProcessAsUser(string strCommand, string strDomain, string strName, string strPassword) - { - var hToken = IntPtr.Zero; - var hDupedToken = IntPtr.Zero; - TokPriv1Luid tp; - var pi = new PROCESS_INFORMATION(); - var sa = new SECURITY_ATTRIBUTES(); - sa.Length = Marshal.SizeOf(sa); - Boolean bResult = false; - try - { - bResult = LogonUser( - strName, - strDomain, - strPassword, - LogonType.LOGON32_LOGON_BATCH, - LogonProvider.LOGON32_PROVIDER_DEFAULT, - out hToken - ); - if (!bResult) - { - throw new Win32Exception("The user could not be logged on. Ensure that the user has an existing profile on the machine and that correct credentials are provided. Logon error #" + Marshal.GetLastWin32Error().ToString()); - } - IntPtr hproc = GetCurrentProcess(); - IntPtr htok = IntPtr.Zero; - bResult = OpenProcessToken( - hproc, - TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, - ref htok - ); - if(!bResult) - { - throw new Win32Exception("Open process token error #" + Marshal.GetLastWin32Error().ToString()); - } - tp.Count = 1; - tp.Luid = 0; - tp.Attr = SE_PRIVILEGE_ENABLED; - bResult = LookupPrivilegeValue( - null, - SE_INCRASE_QUOTA, - ref tp.Luid - ); - if(!bResult) - { - throw new Win32Exception("Error in looking up privilege of the process. This should not happen if DSC is running as LocalSystem Lookup privilege error #" + Marshal.GetLastWin32Error().ToString()); - } - bResult = AdjustTokenPrivileges( - htok, - false, - ref tp, - 0, - IntPtr.Zero, - IntPtr.Zero - ); - if(!bResult) - { - throw new Win32Exception("Token elevation error #" + Marshal.GetLastWin32Error().ToString()); - } - - bResult = DuplicateTokenEx( - hToken, - GENERIC_ALL_ACCESS, - ref sa, - (int)SECURITY_IMPERSONATION_LEVEL.SecurityIdentification, - (int)TOKEN_TYPE.TokenPrimary, - ref hDupedToken - ); - if(!bResult) - { - throw new Win32Exception("Duplicate Token error #" + Marshal.GetLastWin32Error().ToString()); - } - var si = new STARTUPINFO(); - si.cb = Marshal.SizeOf(si); - si.lpDesktop = ""; - bResult = CreateProcessAsUser( - hDupedToken, - null, - strCommand, - ref sa, - ref sa, - false, - 0, - IntPtr.Zero, - null, - ref si, - ref pi - ); - if(!bResult) - { - throw new Win32Exception("The process could not be created. Create process as user error #" + Marshal.GetLastWin32Error().ToString()); - } - } - finally - { - if (pi.hThread != IntPtr.Zero) - { - CloseHandle(pi.hThread); - } - if (pi.hProcess != IntPtr.Zero) - { - CloseHandle(pi.hProcess); - } - if (hDupedToken != IntPtr.Zero) - { - CloseHandle(hDupedToken); - } - } - } - } -} - -"@ - Add-Type -TypeDefinition $ProgramSource -ReferencedAssemblies "System.ServiceProcess" -} - -function GetWin32Process -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential - ) - - $fileName = [io.path]::GetFileNameWithoutExtension($Path) - $GetProcesses = @(Get-Process -Name $fileName -ErrorAction SilentlyContinue) - $Processes = foreach($process in $GetProcesses) - { - if($Process.Path -ieq $Path) - { - try - { - [wmi]"Win32_Process.Handle='$($Process.Id)'" - } - catch - { - } - } - } - if($PSBoundParameters.ContainsKey('Credential')) - { - $Processes = $Processes | Where-Object {(GetWin32ProcessOwner $_) -eq $Credential.UserName} - } - if($Arguments -eq $null) {$Arguments = ""} - $Processes = $Processes | Where-Object {(GetWin32ProcessArgumentsFromCommandLine $_.CommandLine) -eq $Arguments} - - return $Processes -} - -function GetWin32ProcessOwner -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNull()] - $Process - ) - - try - { - $Owner = $Process.GetOwner() - } - catch - {} - if(($owner.Domain -ne $null) -and ($owner.Domain -ne $env:COMPUTERNAME)) - { - return $Owner.Domain + "\" + $Owner.User - } - else - { - return $Owner.User - } -} - -function GetWin32ProcessArgumentsFromCommandLine -{ - param - ( - [String] - $commandLine - ) - - if($commandLine -eq $null) - { - return "" - } - $commandLine=$commandLine.Trim() - if($commandLine.Length -eq 0) - { - return "" - } - if($commandLine[0] -eq '"') - { - $charToLookfor=[char]'"' - } - else - { - $charToLookfor=[char]' ' - } - $endOfCommand=$commandLine.IndexOf($charToLookfor ,1) - if($endOfCommand -eq -1) - { - return "" - } - return $commandLine.Substring($endOfCommand+1).Trim() -} - -function StartWin32Process -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential, - - [Switch] - $AsTask - ) - - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - $Processes = @(GetWin32Process @getArguments) - if ($processes.Count -eq 0) - { - if($PSBoundParameters.ContainsKey("Credential")) - { - if($AsTask) - { - $ActionArguments = ExtractArguments $PSBoundParameters ` - ("Path", "Arguments") ` - ("Execute", "Argument") - if([string]::IsNullOrEmpty($Arguments)) - { - $null = $ActionArguments.Remove("Argument") - } - $TaskGuid = [guid]::NewGuid().ToString() - $Action = New-ScheduledTaskAction @ActionArguments - $null = Register-ScheduledTask -TaskName "xPDT $TaskGuid" -Action $Action -User $Credential.UserName -Password $Credential.GetNetworkCredential().Password -RunLevel Highest - $err = Start-ScheduledTask -TaskName "xPDT $TaskGuid" - } - else - { - try - { - CallPInvoke - [Source.NativeMethods]::CreateProcessAsUser(("$Path " + $Arguments),$Credential.GetNetworkCredential().Domain,$Credential.GetNetworkCredential().UserName,$Credential.GetNetworkCredential().Password) - } - catch - { - $exception = New-Object System.ArgumentException $_ - $errorCategory = [System.Management.Automation.ErrorCategory]::OperationStopped - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, "Win32Exception", $errorCategory, $null - $err = $errorRecord - } - } - } - else - { - $StartArguments = ExtractArguments $PSBoundParameters ` - ("Path", "Arguments", "Credential") ` - ("FilePath", "ArgumentList", "Credential") - if([string]::IsNullOrEmpty($Arguments)) - { - $null = $StartArguments.Remove("ArgumentList") - } - $err = Start-Process @StartArguments - } - if($err -ne $null) - { - throw $err - } - if (!(WaitForWin32ProcessStart @GetArguments)) - { -# ThrowInvalidArgumentError "FailureWaitingForProcessesToStart" ($LocalizedData.ErrorStarting -f $Path,$LocalizedData.FailureWaitingForProcessesToStart) - } - } - else - { - return ($LocalizedData.ProcessAlreadyStarted -f $Path,$Processes.ProcessId) - } - $Processes = @(GetWin32Process @getArguments) - return ($LocalizedData.ProcessStarted -f $Path,$Processes.ProcessId) -} - -function WaitForWin32ProcessStart -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential, - - [Int] - $Delay = 60000 - ) - - $start = [DateTime]::Now - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - do - { - $value = @(GetWin32Process @GetArguments).Count -ge 1 - } while(!$value -and ([DateTime]::Now - $start).TotalMilliseconds -lt $Delay) - - return $value -} - -function WaitForWin32ProcessEnd -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Path, - - [String] - $Arguments, - - [PSCredential] - $Credential - ) - - $GetArguments = ExtractArguments $PSBoundParameters ("Path","Arguments","Credential") - While (WaitForWin32ProcessStart @GetArguments -Delay 1000) - { - Start-Sleep 1 - } - Get-ScheduledTask | Where-Object {($_.TaskName.StartsWith("xPDT")) -and ($_.Actions.Execute -eq $Path) -and ($_.Actions.Arguments -eq $Arguments)} | Where-Object {$_ -ne $null} | Unregister-ScheduledTask -Confirm:$false -} - -function NetUse -{ - param - ( - [parameter(Mandatory)] - [string] - $SourcePath, - - [parameter(Mandatory)] - [PSCredential] - $Credential, - - [string] - [ValidateSet("Present","Absent")] - $Ensure = "Present" - ) - - if(($SourcePath.Length -ge 2) -and ($SourcePath.Substring(0,2) -eq "\\")) - { - $args = @() - if ($Ensure -eq "Absent") - { - $args += "use", $SourcePath, "/del" - } - else - { - $args += "use", $SourcePath, $($Credential.GetNetworkCredential().Password), "/user:$($Credential.GetNetworkCredential().Domain)\$($Credential.GetNetworkCredential().UserName)" - } - - &"net" $args - } -} - -Export-ModuleMember ResolvePath,StartWin32Process,WaitForWin32ProcessEnd,NetUse diff --git a/lib/puppet_x/dsc_resources/xSQLServer/xSQLServer.psd1 b/lib/puppet_x/dsc_resources/xSQLServer/xSQLServer.psd1 deleted file mode 100644 index 83be64bb..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/xSQLServer.psd1 +++ /dev/null @@ -1,174 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '7.0.0.0' - -# ID used to uniquely identify this module -GUID = '74e9ddb5-4cbc-4fa2-a222-2bcfb533fd66' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module with DSC Resources for deployment and configuration of Microsoft SQL Server.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xSQLServer/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xSQLServer' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '- Examples - - xSQLServerDatabaseRole - - 1-AddDatabaseRole.ps1 - - 2-RemoveDatabaseRole.ps1 - - xSQLServerRole - - 3-AddMembersToServerRole.ps1 - - 4-MembersToIncludeInServerRole.ps1 - - 5-MembersToExcludeInServerRole.ps1 - - xSQLServerSetup - - 1-InstallDefaultInstanceSingleServer.ps1 - - 2-InstallNamedInstanceSingleServer.ps1 - - 3-InstallNamedInstanceSingleServerFromUncPathUsingSourceCredential.ps1 - - 4-InstallNamedInstanceInFailoverClusterFirstNode.ps1 - - 5-InstallNamedInstanceInFailoverClusterSecondNode.ps1 - - xSQLServerReplication - - 1-ConfigureInstanceAsDistributor.ps1 - - 2-ConfigureInstanceAsPublisher.ps1 - - xSQLServerNetwork - - 1-EnableTcpIpOnCustomStaticPort.ps1 - - xSQLServerAvailabilityGroupListener - - 1-AddAvailabilityGroupListenerWithSameNameAsVCO.ps1 - - 2-AddAvailabilityGroupListenerWithDifferentNameAsVCO.ps1 - - 3-RemoveAvailabilityGroupListenerWithSameNameAsVCO.ps1 - - 4-RemoveAvailabilityGroupListenerWithDifferentNameAsVCO.ps1 - - 5-AddAvailabilityGroupListenerUsingDHCPWithDefaultServerSubnet.ps1 - - 6-AddAvailabilityGroupListenerUsingDHCPWithSpecificSubnet.ps1 - - xSQLServerEndpointPermission - - 1-AddConnectPermission.ps1 - - 2-RemoveConnectPermission.ps1 - - 3-AddConnectPermissionToAlwaysOnPrimaryAndSecondaryReplicaEachWithDifferentSqlServiceAccounts.ps1 - - 4-RemoveConnectPermissionToAlwaysOnPrimaryAndSecondaryReplicaEachWithDifferentSqlServiceAccounts.ps1 - - xSQLServerPermission - - 1-AddServerPermissionForLogin.ps1 - - 2-RemoveServerPermissionForLogin.ps1 - - xSQLServerEndpointState - - 1-MakeSureEndpointIsStarted.ps1 - - 2-MakeSureEndpointIsStopped.ps1 - - xSQLServerConfiguration - - 1-ConfigureTwoInstancesOnTheSameServerToEnableClr.ps1 - - 2-ConfigureInstanceToEnablePriorityBoost.ps1 - - xSQLServerEndpoint - - 1-CreateEndpointWithDefaultValues.ps1 - - 2-CreateEndpointWithSpecificPortAndIPAddress.ps1 - - 3-RemoveEndpoint.ps1 -- Changes to xSQLServerDatabaseRole - - Fixed code style, added updated parameter descriptions to schema.mof and README.md. -- Changes to xSQLServer - - Raised the CodeCov target to 70% which is the minimum and required target for HQRM resource. -- Changes to xSQLServerRole - - **BREAKING CHANGE: The resource has been reworked in it"s entirely.** Below is what has changed. - - The mandatory parameters now also include ServerRoleName. - - The ServerRole parameter was before an array of server roles, now this parameter is renamed to ServerRoleName and can only be set to one server role. - - ServerRoleName are no longer limited to built-in server roles. To add members to a built-in server role, set ServerRoleName to the name of the built-in server role. - - The ServerRoleName will be created when Ensure is set to "Present" (if it does not already exist), or removed if Ensure is set to "Absent". - - Three new parameters are added; Members, MembersToInclude and MembersToExclude. - - Members can be set to one or more logins, and those will _replace all_ the memberships in the server role. - - MembersToInclude and MembersToExclude can be set to one or more logins that will add or remove memberships, respectively, in the server role. MembersToInclude and MembersToExclude _can not_ be used at the same time as parameter Members. But both MembersToInclude and MembersToExclude can be used together at the same time. -- Changes to xSQLServerSetup - - Added a note to the README.md saying that it is not possible to add or remove features from a SQL Server failover cluster (issue 433). - - Changed so that it reports false if the desired state is not correct (issue 432). - - Added a test to make sure we always return false if a SQL Server failover cluster is missing features. - - Helper function Connect-SQLAnalysis - - Now has correct error handling, and throw does not used the unknown named parameter "-Message" (issue 436) - - Added tests for Connect-SQLAnalysis - - Changed to localized error messages. - - Minor changes to error handling. - - This adds better support for Addnode (issue 369). - - Now it skips cluster validation för add node (issue 442). - - Now it ignores parameters that are not allowed for action Addnode (issue 441). - - Added support for vNext CTP 1.4 (issue 472). -- Added new resource - - xSQLServerAlwaysOnAvailabilityGroupReplica -- Changes to xSQLServerDatabaseRecoveryModel - - Fixed code style, removed SQLServerDatabaseRecoveryModel functions from xSQLServerHelper. -- Changes to xSQLServerAlwaysOnAvailabilityGroup - - Fixed the permissions check loop so that it exits the loop after the function determines the required permissions are in place. -- Changes to xSQLServerAvailabilityGroupListener - - Removed the dependency of SQLPS provider (issue 460). - - Cleaned up code. - - Added test for more coverage. - - Fixed PSSA rule warnings (issue 255). - - Parameter Ensure now defaults to "Present" (issue 450). -- Changes to xSQLServerFirewall - - Now it will correctly create rules when the resource is used for two or more instances on the same server (issue 461). -- Changes to xSQLServerEndpointPermission - - Added description to the README.md - - Cleaned up code (issue 257 and issue 231) - - Now the default value for Ensure is "Present". - - Removed dependency of SQLPS provider (issue 483). - - Refactored tests so they use less code. -- Changes to README.md - - Adding deprecated tag to xSQLServerFailoverClusterSetup, xSQLAOGroupEnsure and xSQLAOGroupJoin in README.md so it it more clear that these resources has been replaced by xSQLServerSetup, xSQLServerAlwaysOnAvailabilityGroup and xSQLServerAlwaysOnAvailabilityGroupReplica respectively. -- Changes to xSQLServerEndpoint - - BREAKING CHANGE: Now SQLInstanceName is mandatory, and is a key, so SQLInstanceName has no longer a default value (issue 279). - - BREAKING CHANGE: Parameter AuthorizedUser has been removed (issue 466, issue 275 and issue 80). Connect permissions can be set using the resource xSQLServerEndpointPermission. - - Optional parameter IpAddress has been added. Default is to listen on any valid IP-address. (issue 232) - - Parameter Port now has a default value of 5022. - - Parameter Ensure now defaults to "Present". - - Resource now supports changing IP address and changing port. - - Added unit tests (issue 289) - - Added examples. -- Changes to xSQLServerEndpointState - - Cleaned up code, removed SupportsShouldProcess and fixed PSSA rules warnings (issue 258 and issue 230). - - Now the default value for the parameter State is "Started". - - Updated README.md with a description for the resources and revised the parameter descriptions. - - Removed dependency of SQLPS provider (issue 481). - - The parameter NodeName is no longer mandatory and has now the default value of $env:COMPUTERNAME. - - The parameter Name is now a key so it is now possible to change the state on more than one endpoint on the same instance. _Note: The resource still only supports Database Mirror endpoints at this time._ -- Changes to xSQLServerHelper module - - Removing helper function Get-SQLAlwaysOnEndpoint because there is no resource using it any longer. - - BREAKING CHANGE: Changed helper function Import-SQLPSModule to support SqlServer module (issue 91). The SqlServer module is the preferred module so if it is found it will be used, and if not found an attempt will be done to load SQLPS module instead. -- Changes to xSQLServerScript - - Updated tests for this resource, because they failed when Import-SQLPSModule was updated. -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - - - - - - diff --git a/lib/puppet_x/dsc_resources/xSQLServer/xSQLServerHelper.psm1 b/lib/puppet_x/dsc_resources/xSQLServer/xSQLServerHelper.psm1 deleted file mode 100644 index 110493f9..00000000 --- a/lib/puppet_x/dsc_resources/xSQLServer/xSQLServerHelper.psm1 +++ /dev/null @@ -1,1428 +0,0 @@ -# Load Localization Data -Import-LocalizedData LocalizedData -filename xSQLServer.strings.psd1 -ErrorAction SilentlyContinue -Import-LocalizedData USLocalizedData -filename xSQLServer.strings.psd1 -UICulture en-US -ErrorAction SilentlyContinue - -<# - .SYNOPSIS - Connect to a SQL Server Database Engine and return the server object. - - .PARAMETER SQLServer - String containing the host name of the SQL Server to connect to. - - .PARAMETER SQLInstanceName - String containing the SQL Server Database Engine instance to connect to. - - .PARAMETER SetupCredential - PSCredential object with the credentials to use to impersonate a user when connecting. - If this is not provided then the current user will be used to connect to the SQL Server Database Engine instance. -#> -function Connect-SQL -{ - [CmdletBinding()] - param - ( - [ValidateNotNull()] - [System.String] - $SQLServer = $env:COMPUTERNAME, - - [ValidateNotNull()] - [System.String] - $SQLInstanceName = "MSSQLSERVER", - - [ValidateNotNull()] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - $null = [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.Smo') - - if ($SQLInstanceName -eq "MSSQLSERVER") - { - $connectSql = $SQLServer - } - else - { - $connectSql = "$SQLServer\$SQLInstanceName" - } - - if ($SetupCredential) - { - $sql = New-Object Microsoft.SqlServer.Management.Smo.Server - $sql.ConnectionContext.ConnectAsUser = $true - $sql.ConnectionContext.ConnectAsUserPassword = $SetupCredential.GetNetworkCredential().Password - $sql.ConnectionContext.ConnectAsUserName = $SetupCredential.GetNetworkCredential().UserName - $sql.ConnectionContext.ServerInstance = $connectSQL - $sql.ConnectionContext.connect() - } - else - { - $sql = New-Object Microsoft.SqlServer.Management.Smo.Server $connectSql - } - - if (!$sql) - { - Throw -Message "Failed connecting to SQL $connectSql" - } - - New-VerboseMessage -Message "Connected to SQL $connectSql" - - return $sql -} - -<# - .SYNOPSIS - Connect to a SQL Server Analysis Service and return the server object. - - .PARAMETER SQLServer - String containing the host name of the SQL Server to connect to. - - .PARAMETER SQLInstanceName - String containing the SQL Server Analysis Service instance to connect to. - - .PARAMETER SetupCredential - PSCredential object with the credentials to use to impersonate a user when connecting. - If this is not provided then the current user will be used to connect to the SQL Server Analysis Service instance. -#> -function Connect-SQLAnalysis -{ - [CmdletBinding()] - param - ( - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLServer = $env:COMPUTERNAME, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.String] - $SQLInstanceName = 'MSSQLSERVER', - - [Parameter()] - [ValidateNotNullOrEmpty()] - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $SetupCredential - ) - - $null = [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.AnalysisServices') - - if ($SQLInstanceName -eq 'MSSQLSERVER') - { - $analysisServiceInstance = $SQLServer - } - else - { - $analysisServiceInstance = "$SQLServer\$SQLInstanceName" - } - - if ($SetupCredential) - { - $userName = $SetupCredential.GetNetworkCredential().UserName - $password = $SetupCredential.GetNetworkCredential().Password - - $analysisServicesDataSource = "Data Source=$analysisServiceInstance;User ID=$userName;Password=$password" - } - else - { - $analysisServicesDataSource = "Data Source=$analysisServiceInstance" - } - - try - { - $analysisServicesObject = New-Object -TypeName Microsoft.AnalysisServices.Server - if ($analysisServicesObject) - { - $analysisServicesObject.Connect($analysisServicesDataSource) - } - else - { - throw New-TerminatingError -ErrorType AnalysisServicesNoServerObject -ErrorCategory InvalidResult - } - - Write-Verbose -Message "Connected to Analysis Services $analysisServiceInstance." -Verbose - } - catch - { - throw New-TerminatingError -ErrorType AnalysisServicesFailedToConnect -FormatArgs @($analysisServiceInstance) -ErrorCategory ObjectNotFound -InnerException $_.Exception - } - - return $analysisServicesObject -} - -<# - .SYNOPSIS - Returns a localized error message. - - .PARAMETER ErrorType - String containing the key of the localized error message. - - .PARAMETER FormatArgs - Collection of strings to replace format objects in the error message. - - .PARAMETER ErrorCategory - The category to use for the error message. Default value is 'OperationStopped'. - Valid values are a value from the enumeration System.Management.Automation.ErrorCategory. - - .PARAMETER TargetObject - The object that was being operated on when the error occurred. - - .PARAMETER InnerException - Exception object that was thorwn when the error occured, which will be added to the final error message. -#> -function New-TerminatingError -{ - [CmdletBinding()] - [OutputType([System.Management.Automation.ErrorRecord])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ErrorType, - - [Parameter(Mandatory = $false)] - [String[]] - $FormatArgs, - - [Parameter(Mandatory = $false)] - [System.Management.Automation.ErrorCategory] - $ErrorCategory = [System.Management.Automation.ErrorCategory]::OperationStopped, - - [Parameter(Mandatory = $false)] - [Object] - $TargetObject = $null, - - [Parameter(Mandatory = $false)] - [System.Exception] - $InnerException = $null - ) - - $errorMessage = $LocalizedData.$ErrorType - - if(!$errorMessage) - { - $errorMessage = ($LocalizedData.NoKeyFound -f $ErrorType) - - if(!$errorMessage) - { - $errorMessage = ("No Localization key found for key: {0}" -f $ErrorType) - } - } - - $errorMessage = ($errorMessage -f $FormatArgs) - - if( $InnerException ) - { - $errorMessage += " InnerException: $($InnerException.Message)" - } - - $callStack = Get-PSCallStack - - # Get Name of calling script - if($callStack[1] -and $callStack[1].ScriptName) - { - $scriptPath = $callStack[1].ScriptName - - $callingScriptName = $scriptPath.Split('\')[-1].Split('.')[0] - - $errorId = "$callingScriptName.$ErrorType" - } - else - { - $errorId = $ErrorType - } - - Write-Verbose -Message "$($USLocalizedData.$ErrorType -f $FormatArgs) | ErrorType: $errorId" - - $exception = New-Object System.Exception $errorMessage, $InnerException - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $ErrorCategory, $TargetObject - - return $errorRecord -} - -<# - .SYNOPSIS - Displays a localized warning message. - - .PARAMETER WarningType - String containing the key of the localized warning message. - - .PARAMETER FormatArgs - Collection of strings to replace format objects in warning message. -#> -function New-WarningMessage -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $WarningType, - - [String[]] - $FormatArgs - ) - - ## Attempt to get the string from the localized data - $warningMessage = $LocalizedData.$WarningType - - ## Ensure there is a message present in the localization file - if (!$warningMessage) - { - $errorParams = @{ - ErrorType = 'NoKeyFound' - FormatArgs = $WarningType - ErrorCategory = 'InvalidArgument' - TargetObject = 'New-WarningMessage' - } - - ## Raise an error indicating the localization data is not present - throw New-TerminatingError @errorParams - } - - ## Apply formatting - $warningMessage = $warningMessage -f $FormatArgs - - ## Write the message as a warning - Write-Warning -Message $warningMessage -} - -<# - .SYNOPSIS - Displays a standardized verbose message. - - .PARAMETER Message - String containing the key of the localized warning message. -#> -function New-VerboseMessage -{ - [CmdletBinding()] - [Alias()] - [OutputType([String])] - Param - ( - [Parameter(Mandatory=$true)] - $Message - ) - Write-Verbose -Message ((Get-Date -format yyyy-MM-dd_HH-mm-ss) + ": $Message") -Verbose -} - -<# - .SYNOPSIS - This method is used to compare current and desired values for any DSC resource. - - .PARAMETER CurrentValues - This is hashtable of the current values that are applied to the resource. - - .PARAMETER DesiredValues - This is a PSBoundParametersDictionary of the desired values for the resource. - - .PARAMETER ValuesToCheck - This is a list of which properties in the desired values list should be checked. - If this is empty then all values in DesiredValues are checked. -#> -function Test-SQLDscParameterState -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [HashTable] - $CurrentValues, - - [Parameter(Mandatory = $true)] - [Object] - $DesiredValues, - - [Parameter()] - [Array] - $ValuesToCheck - ) - - $returnValue = $true - - if (($DesiredValues.GetType().Name -ne "HashTable") ` - -and ($DesiredValues.GetType().Name -ne "CimInstance") ` - -and ($DesiredValues.GetType().Name -ne "PSBoundParametersDictionary")) - { - throw "Property 'DesiredValues' in Test-SQLDscParameterState must be either a " + ` - "Hashtable or CimInstance. Type detected was $($DesiredValues.GetType().Name)" - } - - if (($DesiredValues.GetType().Name -eq "CimInstance") -and ($null -eq $ValuesToCheck)) - { - throw "If 'DesiredValues' is a CimInstance then property 'ValuesToCheck' must contain a value" - } - - if (($null -eq $ValuesToCheck) -or ($ValuesToCheck.Count -lt 1)) - { - $keyList = $DesiredValues.Keys - } - else - { - $keyList = $ValuesToCheck - } - - $keyList | ForEach-Object -Process { - if (($_ -ne "Verbose")) - { - if (($CurrentValues.ContainsKey($_) -eq $false) ` - -or ($CurrentValues.$_ -ne $DesiredValues.$_) ` - -or (($DesiredValues.ContainsKey($_) -eq $true) -and ($DesiredValues.$_.GetType().IsArray))) - { - if ($DesiredValues.GetType().Name -eq "HashTable" -or ` - $DesiredValues.GetType().Name -eq "PSBoundParametersDictionary") - { - - $checkDesiredValue = $DesiredValues.ContainsKey($_) - } - else - { - $checkDesiredValue = Test-SPDSCObjectHasProperty $DesiredValues $_ - } - - if ($checkDesiredValue) - { - $desiredType = $DesiredValues.$_.GetType() - $fieldName = $_ - if ($desiredType.IsArray -eq $true) - { - if (($CurrentValues.ContainsKey($fieldName) -eq $false) ` - -or ($null -eq $CurrentValues.$fieldName)) - { - New-VerboseMessage -Message ("Expected to find an array value for " + ` - "property $fieldName in the current " + ` - "values, but it was either not present or " + ` - "was null. This has caused the test method " + ` - "to return false.") - - $returnValue = $false - } - else - { - $arrayCompare = Compare-Object -ReferenceObject $CurrentValues.$fieldName ` - -DifferenceObject $DesiredValues.$fieldName - if ($null -ne $arrayCompare) - { - New-VerboseMessage -Message ("Found an array for property $fieldName " + ` - "in the current values, but this array " + ` - "does not match the desired state. " + ` - "Details of the changes are below.") - $arrayCompare | ForEach-Object -Process { - New-VerboseMessage -Message "$($_.InputObject) - $($_.SideIndicator)" - } - - $returnValue = $false - } - } - } - else - { - switch ($desiredType.Name) - { - "String" { - if (-not [String]::IsNullOrEmpty($CurrentValues.$fieldName) -or ` - -not [String]::IsNullOrEmpty($DesiredValues.$fieldName)) - { - New-VerboseMessage -Message ("String value for property $fieldName does not match. " + ` - "Current state is '$($CurrentValues.$fieldName)' " + ` - "and Desired state is '$($DesiredValues.$fieldName)'") - - $returnValue = $false - } - } - "Int32" { - if (-not ($DesiredValues.$fieldName -eq 0) -or ` - -not ($null -eq $CurrentValues.$fieldName)) - { - New-VerboseMessage -Message ("Int32 value for property " + "$fieldName does not match. " + ` - "Current state is " + "'$($CurrentValues.$fieldName)' " + ` - "and desired state is " + "'$($DesiredValues.$fieldName)'") - - $returnValue = $false - } - } - "Int16" { - if (-not ($DesiredValues.$fieldName -eq 0) -or ` - -not ($null -eq $CurrentValues.$fieldName)) - { - New-VerboseMessage -Message ("Int32 value for property " + "$fieldName does not match. " + ` - "Current state is " + "'$($CurrentValues.$fieldName)' " + ` - "and desired state is " + "'$($DesiredValues.$fieldName)'") - - $returnValue = $false - } - } - default { - New-VerboseMessage -Message ("Unable to compare property $fieldName " + ` - "as the type ($($desiredType.Name)) is " + ` - "not handled by the Test-SQLDscParameterState cmdlet") - - $returnValue = $false - } - } - } - } - } - } - } - - return $returnValue -} - -<# - .SYNOPSIS - Connect to a SQL Server Database Engine and give the server permissions 'AlterAnyAvailabilityGroup' and 'ViewServerState' to the provided user. - - .PARAMETER SQLServer - String containing the host name of the SQL Server to connect to. - - .PARAMETER SQLInstanceName - String containing the SQL Server Database Engine instance to connect to. - - .PARAMETER SetupCredential - PSCredential object with the credentials to use to impersonate a user when connecting. - If this is not provided then the current user will be used to connect to the SQL Server Database Engine instance. - - .PARAMETER AuthorizedUser - String containing the user to give the server permissions 'AlterAnyAvailabilityGroup' and 'ViewServerState'. -#> -function Grant-ServerPerms -{ - [CmdletBinding()] - param - ( - [ValidateNotNull()] - [System.String] - $SQLServer = $env:COMPUTERNAME, - - [ValidateNotNull()] - [System.String] - $SQLInstanceName= "MSSQLSERVER", - - [ValidateNotNullOrEmpty()] - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential, - - [ValidateNotNullOrEmpty()] - [Parameter(Mandatory = $true)] - [System.String] - $AuthorizedUser - ) - - if(!$SQL) - { - $SQL = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName -SetupCredential $SetupCredential - } - Try{ - $sps = New-Object Microsoft.SqlServer.Management.Smo.ServerPermissionSet([Microsoft.SqlServer.Management.Smo.ServerPermission]::AlterAnyAvailabilityGroup) - $sps.Add([Microsoft.SqlServer.Management.Smo.ServerPermission]::ViewServerState) - $SQL.Grant($sps,$AuthorizedUser) - New-VerboseMessage -Message "Granted Permissions to $AuthorizedUser" - } - Catch{ - Write-Error "Failed to grant Permissions to $AuthorizedUser." - } -} - -<# - .SYNOPSIS - Connect to a Active Directory and give the Cluster Name Object all rights on the cluster Virtual Computer Object (VCO). - - .PARAMETER AvailabilityGroupNameListener - String containing the name of the Availabilty Group's Virtual Computer Object (VCO). - - .PARAMETER CNO - String containing the name of the Cluster Name Object (CNO) for the failover cluster. -#> -function Grant-CNOPerms -{ -[CmdletBinding()] - Param - ( - [ValidateNotNullOrEmpty()] - [Parameter(Mandatory = $true)] - [System.String] - $AvailabilityGroupNameListener, - - [ValidateNotNullOrEmpty()] - [Parameter(Mandatory = $true)] - [System.String] - $CNO - ) - - #Verify Active Directory Tools are installed, if they are load if not Throw Error - If (!(Get-Module -ListAvailable | Where-Object {$_.Name -eq "ActiveDirectory"})){ - Throw "Active Directory Module is not installed and is Required." - Exit - } - else{Import-Module ActiveDirectory -ErrorAction Stop -Verbose:$false} - Try{ - $AG = Get-ADComputer $AvailabilityGroupNameListener - - $comp = $AG.DistinguishedName # input AD computer distinguishedname - $acl = Get-Acl "AD:\$comp" - $u = Get-ADComputer $CNO # get the AD user object given full control to computer - $SID = [System.Security.Principal.SecurityIdentifier] $u.SID - - $identity = [System.Security.Principal.IdentityReference] $SID - $adRights = [System.DirectoryServices.ActiveDirectoryRights] "GenericAll" - $type = [System.Security.AccessControl.AccessControlType] "Allow" - $inheritanceType = [System.DirectoryServices.ActiveDirectorySecurityInheritance] "All" - $ace = New-Object System.DirectoryServices.ActiveDirectoryAccessRule $identity,$adRights,$type,$inheritanceType - - $acl.AddAccessRule($ace) - Set-Acl -AclObject $acl "AD:\$comp" - New-VerboseMessage -Message "Granted privileges on $comp to $CNO" - } - Catch{ - Throw "Failed to grant Permissions on $comp." - Exit - } -} - -<# - .SYNOPSIS - Create a new computer object for a Availabilty Group's Virtual Computer Object (VCO). - - .PARAMETER AvailabilityGroupNameListener - String containing the name of the Availabilty Group's Virtual Computer Object (VCO). - - .PARAMETER SQLServer - String containing the host name of the SQL Server to connect to. - - .PARAMETER SQLInstanceName - String containing the SQL Server Database Engine instance to connect to. - - .PARAMETER SetupCredential - PSCredential object with the credentials to use to impersonate a user when connecting. - If this is not provided then the current user will be used to connect to the SQL Server Database Engine instance. -#> -function New-ListenerADObject -{ -[CmdletBinding()] - Param - ( - [ValidateNotNullOrEmpty()] - [Parameter(Mandatory = $true)] - [System.String] - $AvailabilityGroupNameListener, - - [ValidateNotNull()] - [System.String] - $SQLServer = $env:COMPUTERNAME, - - [ValidateNotNull()] - [System.String] - $SQLInstanceName = "MSSQLSERVER", - - [ValidateNotNullOrEmpty()] - [Parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $SetupCredential - ) - - if(!$SQL) - { - $SQL = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName -SetupCredential $SetupCredential - } - - $CNO= $SQL.ClusterName - - #Verify Active Directory Tools are installed, if they are load if not Throw Error - If (!(Get-Module -ListAvailable | Where-Object {$_.Name -eq "ActiveDirectory"})){ - Throw "Active Directory Module is not installed and is Required." - Exit - } - else{Import-Module ActiveDirectory -ErrorAction Stop -Verbose:$false} - try{ - $CNO_OU = Get-ADComputer $CNO - #Accounts for the comma and CN= at the start of Distinguished Name - #We want to remove these plus the ClusterName to get the actual OU Path. - $AdditionalChars = 4 - $Trim = $CNO.Length+$AdditionalChars - $CNOlgth = $CNO_OU.DistinguishedName.Length - $trim - $OUPath = $CNO_OU.ToString().Substring($Trim,$CNOlgth) - } - catch{ - Throw ": Failed to find Computer in AD" - exit - } - - - $m = Get-ADComputer -Filter {Name -eq $AvailabilityGroupNameListener} -Server $env:USERDOMAIN | Select-Object -Property * | Measure-Object - - If ($m.Count -eq 0) - { - Try{ - #Create Computer Object for the AgListenerName - New-ADComputer -Name $AvailabilityGroupNameListener -SamAccountName $AvailabilityGroupNameListener -Path $OUPath -Enabled $false -Credential $SetupCredential - New-VerboseMessage -Message "Created Computer Object $AvailabilityGroupNameListener" - } - Catch{ - Throw "Failed to Create $AvailabilityGroupNameListener in $OUPath" - Exit - } - - $SuccessChk =0 - - #Check for AD Object Validate at least three successful attempts - $i=1 - While ($i -le 5) { - Try{ - $ListChk = Get-ADComputer -filter {Name -like $AvailabilityGroupNameListener} - If ($ListChk){$SuccessChk++} - Start-Sleep -Seconds 10 - If($SuccesChk -eq 3){break} - } - Catch{ - Throw "Failed Validate $AvailabilityGroupNameListener was created in $OUPath" - Exit - } - $i++ - } - } - Try{ - Grant-CNOPerms -AvailabilityGroupNameListener $AvailabilityGroupNameListener -CNO $CNO - } - Catch{ - Throw "Failed Validate grant permissions on $AvailabilityGroupNameListener in location $OUPAth to $CNO" - Exit - } - -} - -<# - .SYNOPSIS - Imports the module SQLPS in a standardized way. -#> -function Import-SQLPSModule -{ - [CmdletBinding()] - param() - - $module = (Get-Module -FullyQualifiedName 'SqlServer' -ListAvailable).Name - if ($module) - { - New-VerboseMessage -Message 'Preferred module SqlServer found.' - } - else - { - New-VerboseMessage -Message 'Module SqlServer not found, trying to use older SQLPS module.' - $module = (Get-Module -FullyQualifiedName 'SQLPS' -ListAvailable).Name - } - - if ($module) - { - try - { - Write-Debug -Message 'SQLPS module changes CWD to SQLSERVER:\ when loading, pushing location to pop it when module is loaded.' - Push-Location - - New-VerboseMessage -Message ('Importing {0} module.' -f $module) - - <# - SQLPS has unapproved verbs, disable checking to ignore Warnings. - Suppressing verbose so all cmdlet is not llsted. - #> - Import-Module -Name $module -DisableNameChecking -Verbose:$False -ErrorAction Stop - - Write-Debug -Message ('Module {0} imported.' -f $module) - } - catch - { - throw New-TerminatingError -ErrorType FailedToImportSqlModule -FormatArgs @($module) -ErrorCategory InvalidOperation -InnerException $_.Exception - } - finally - { - Write-Debug -Message 'Popping location back to what it was before importing SQLPS module.' - Pop-Location - } - } - else - { - throw New-TerminatingError -ErrorType SqlModuleNotFound -ErrorCategory InvalidOperation -InnerException $_.Exception - } -} - -<# - .SYNOPSIS - Returns the SQL Server instance name in the way SQLPS Provider expect it. - - .DESCRIPTION - The SQLPS Provider doesn't use the default instance name of MSSQLSERVER, instead it uses DEFAULT. - This function make sure the correct default instance name is returned. - - .PARAMETER InstanceName - String containing the SQL Server Database Engine instance to validate. -#> -function Get-SQLPSInstanceName -{ - [CmdletBinding()] - [OutputType([String])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $InstanceName - ) - - if( $InstanceName -eq "MSSQLSERVER" ) { - $InstanceName = "DEFAULT" - } - - return $InstanceName -} - -<# - .SYNOPSIS - Returns the SQL Server SQLPS provider server object. - - .PARAMETER InstanceName - String containing the SQL Server Database Engine instance to connect to. - - .PARAMETER NodeName - String containing the host name of the SQL Server to connect to. -#> -function Get-SQLPSInstance -{ - [CmdletBinding()] - [OutputType([String])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $InstanceName, - - [Parameter(Mandatory = $true)] - [System.String] - $NodeName - ) - - $InstanceName = Get-SQLPSInstanceName -InstanceName $InstanceName - $Path = "SQLSERVER:\SQL\$NodeName\$InstanceName" - - New-VerboseMessage -Message "Connecting to $Path as $([System.Security.Principal.WindowsIdentity]::GetCurrent().Name)" - - Import-SQLPSModule - $instance = Get-Item $Path - - return $instance -} - -<# - .SYNOPSIS - Restarts a SQL Server instance and associated services - - .PARAMETER SQLServer - Hostname of the SQL Server to be configured - - .PARAMETER SQLInstanceName - Name of the SQL instance to be configued. Default is 'MSSQLSERVER' - - .PARAMETER Timeout - Timeout value for restarting the SQL services. The default value is 120 seconds. - - .EXAMPLE - Restart-SqlService -SQLServer localhost - - .EXAMPLE - Restart-SqlService -SQLServer localhost -SQLInstanceName 'NamedInstance' - - .EXAMPLE - Restart-SqlService -SQLServer CLU01 -Timeout 300 -#> -function Restart-SqlService -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] - $SQLServer, - - [Parameter()] - [String] - $SQLInstanceName = 'MSSQLSERVER', - - [Parameter()] - [Int32] - $Timeout = 120 - ) - - ## Connect to the instance - $serverObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - if ($serverObject.IsClustered) - { - ## Get the cluster resources - New-VerboseMessage -Message 'Getting cluster resource for SQL Server' - $sqlService = Get-CimInstance -Namespace root/MSCluster -ClassName MSCluster_Resource -Filter "Type = 'SQL Server'" | - Where-Object { $_.PrivateProperties.InstanceName -eq $serverObject.ServiceName } - - New-VerboseMessage -Message 'Getting active cluster resource SQL Server Agent' - $agentService = $sqlService | Get-CimAssociatedInstance -ResultClassName MSCluster_Resource | - Where-Object { ($_.Type -eq "SQL Server Agent") -and ($_.State -eq 2) } - - ## Build a listing of resources being acted upon - $resourceNames = @($sqlService.Name, ($agentService | Select-Object -ExpandProperty Name)) -join "," - - ## Stop the SQL Server and dependent resources - New-VerboseMessage -Message "Bringing the SQL Server resources $resourceNames offline." - $sqlService | Invoke-CimMethod -MethodName TakeOffline -Arguments @{ Timeout = $Timeout } - - ## Start the SQL server resource - New-VerboseMessage -Message 'Bringing the SQL Server resource back online.' - $sqlService | Invoke-CimMethod -MethodName BringOnline -Arguments @{ Timeout = $Timeout } - - ## Start the SQL Agent resource - if ($agentService) - { - New-VerboseMessage -Message 'Bringing the SQL Server Agent resource online.' - $agentService | Invoke-CimMethod -MethodName BringOnline -Arguments @{ Timeout = $Timeout } - } - } - else - { - New-VerboseMessage -Message 'Getting SQL Service information' - $sqlService = Get-Service -DisplayName "SQL Server ($($serverObject.ServiceName))" - - ## Get all dependent services that are running. - ## There are scenarios where an automatic service is stopped and should not be restarted automatically. - $agentService = $sqlService.DependentServices | Where-Object { $_.Status -eq "Running" } - - ## Restart the SQL Server service - New-VerboseMessage -Message 'SQL Server service restarting' - $sqlService | Restart-Service -Force - - ## Start dependent services - $agentService | ForEach-Object { - New-VerboseMessage -Message "Starting $($_.DisplayName)" - $_ | Start-Service - } - } -} - -<# - .SYNOPSIS - This cmdlet is used to return the permission for a user in a database - - .PARAMETER SqlServerObject - This is the Server object returned by Connect-SQL - - .PARAMETER Name - This is the name of the user to get the current permissions for - - .PARAMETER Database - This is the name of the SQL database - - .PARAMETER PermissionState - If the permission should be granted or denied. Valid values are Grant or Deny -#> -function Get-SqlDatabasePermission -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.Object] - $SqlServerObject, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Database, - - [Parameter(Mandatory = $true)] - [ValidateSet('Grant','Deny')] - [ValidateNotNullOrEmpty()] - [System.String] - $PermissionState - ) - - Write-Verbose -Message 'Evaluating database and login.' - $sqlDatabase = $SqlServerObject.Databases[$Database] - $sqlLogin = $SqlServerObject.Logins[$Name] - $sqlInstanceName = $SqlServerObject.InstanceName - $sqlServer = $SqlServerObject.ComputerNamePhysicalNetBIOS - - # Initialize variable permission - [System.String[]] $permission = @() - - if ($sqlDatabase) - { - if ($sqlLogin) - { - Write-Verbose -Message "Getting permissions for user '$Name' in database '$Database'." - - $databasePermissionInfo = $sqlDatabase.EnumDatabasePermissions($Name) - $databasePermissionInfo = $databasePermissionInfo | Where-Object -FilterScript { - $_.PermissionState -eq $PermissionState - } - - foreach ($currentDatabasePermissionInfo in $databasePermissionInfo) - { - $permissionProperty = ($currentDatabasePermissionInfo.PermissionType | Get-Member -MemberType Property).Name - foreach ($currentPermissionProperty in $permissionProperty) - { - if ($currentDatabasePermissionInfo.PermissionType."$currentPermissionProperty") - { - $permission += $currentPermissionProperty - } - } - } - } - else - { - throw New-TerminatingError -ErrorType LoginNotFound ` - -FormatArgs @($Name,$sqlServer,$sqlInstanceName) ` - -ErrorCategory ObjectNotFound - } - } - else - { - throw New-TerminatingError -ErrorType NoDatabase ` - -FormatArgs @($Database,$sqlServer,$sqlInstanceName) ` - -ErrorCategory InvalidResult - } - - $permission -} - -<# - .SYNOPSIS - This cmdlet is used to grant or deny permissions for a user in a database - - .PARAMETER SqlServerObject - This is the Server object returned by Connect-SQL - - .PARAMETER Name - This is the name of the user to get the current permissions for - - .PARAMETER Database - This is the name of the SQL database - - .PARAMETER PermissionState - If the permission should be granted or denied. Valid values are Grant or Deny - - .PARAMETER Permissions - The permissions to be granted or denied for the user in the database. - Valid permissions can be found in the article SQL Server Permissions: - https://msdn.microsoft.com/en-us/library/ms191291.aspx#SQL Server Permissions -#> -function Add-SqlDatabasePermission -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.Object] - $SqlServerObject, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Database, - - [Parameter(Mandatory = $true)] - [ValidateSet('Grant','Deny')] - [ValidateNotNullOrEmpty()] - [System.String] - $PermissionState, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String[]] - $Permissions - ) - - Write-Verbose -Message 'Evaluating database and login.' - $sqlDatabase = $SqlServerObject.Databases[$Database] - $sqlLogin = $SqlServerObject.Logins[$Name] - $sqlInstanceName = $SqlServerObject.InstanceName - $sqlServer = $SqlServerObject.ComputerNamePhysicalNetBIOS - - if ($sqlDatabase) - { - if ($sqlLogin) - { - if (!$sqlDatabase.Users[$Name]) - { - try - { - Write-Verbose -Message ("Adding SQL login $Name as a user of database " + ` - "$Database on $sqlServer\$sqlInstanceName") - $sqlDatabaseUser = New-Object Microsoft.SqlServer.Management.Smo.User $sqlDatabase,$Name - $sqlDatabaseUser.Login = $Name - $sqlDatabaseUser.Create() - } - catch - { - Write-Verbose -Message ("Failed adding SQL login $Name as a user of " + ` - "database $Database on $sqlServer\$sqlInstanceName") - } - } - - if ($sqlDatabase.Users[$Name]) - { - try - { - Write-Verbose -Message ("$PermissionState the permissions '$Permissions' to the " + ` - "database '$Database' on the server $sqlServer$sqlInstanceName") - $permissionSet = New-Object -TypeName Microsoft.SqlServer.Management.Smo.DatabasePermissionSet - - foreach ($permission in $permissions) - { - $permissionSet."$permission" = $true - } - - switch ($PermissionState) - { - 'Grant' - { - $sqlDatabase.Grant($permissionSet,$Name) - } - - 'Deny' - { - $sqlDatabase.Deny($permissionSet,$Name) - } - } - } - catch - { - Write-Verbose -Message ("Failed setting SQL login $Name to permissions $permissions " + ` - "on database $Database on $sqlServer\$sqlInstanceName") - } - } - } - else - { - throw New-TerminatingError -ErrorType LoginNotFound ` - -FormatArgs @($Name,$sqlServer,$sqlInstanceName) ` - -ErrorCategory ObjectNotFound - } - } - else - { - throw New-TerminatingError -ErrorType NoDatabase ` - -FormatArgs @($Database,$sqlServer,$sqlInstanceName) ` - -ErrorCategory InvalidResult - } -} - -<# - .SYNOPSIS - This cmdlet is used to remove (revoke) permissions for a user in a database - - .PARAMETER SqlServerObject - This is the Server object returned by Connect-SQL. - - .PARAMETER Name - This is the name of the user for which permissions will be removed (revoked) - - .PARAMETER Database - This is the name of the SQL database - - .PARAMETER PermissionState - f the permission that should be removed was granted or denied. Valid values are Grant or Deny - - .PARAMETER Permissions - The permissions to be remove (revoked) for the user in the database. - Valid permissions can be found in the article SQL Server Permissions: - https://msdn.microsoft.com/en-us/library/ms191291.aspx#SQL Server Permissions. -#> -function Remove-SqlDatabasePermission -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.Object] - $SqlServerObject, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Database, - - [Parameter(Mandatory = $true)] - [ValidateSet('Grant','Deny')] - [ValidateNotNullOrEmpty()] - [System.String] - $PermissionState, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String[]] - $Permissions - ) - - Write-Verbose -Message 'Evaluating database and login' - $sqlDatabase = $SqlServerObject.Databases[$Database] - $sqlLogin = $SqlServerObject.Logins[$Name] - $sqlInstanceName = $SqlServerObject.InstanceName - $sqlServer = $SqlServerObject.ComputerNamePhysicalNetBIOS - - if ($sqlDatabase) - { - if ($sqlLogin) - { - if (!$sqlDatabase.Users[$Name]) - { - try - { - Write-Verbose -Message ("Adding SQL login $Name as a user of database " + ` - "$Database on $sqlServer\$sqlInstanceName") - $sqlDatabaseUser = New-Object -TypeName Microsoft.SqlServer.Management.Smo.User ` - -ArgumentList $sqlDatabase,$Name - $sqlDatabaseUser.Login = $Name - $sqlDatabaseUser.Create() - } - catch - { - Write-Verbose -Message ("Failed adding SQL login $Name as a user of " + ` - "database $Database on $sqlServer\$sqlInstanceName") - } - } - - if ($sqlDatabase.Users[$Name]) - { - try - { - Write-Verbose -Message ("Revoking $PermissionState permissions '$Permissions' to the " + ` - "database '$Database' on the server $sqlServer$sqlInstanceName") - $permissionSet = New-Object -TypeName Microsoft.SqlServer.Management.Smo.DatabasePermissionSet - - foreach ($permission in $permissions) - { - $permissionSet."$permission" = $false - } - - switch ($PermissionState) - { - 'Grant' - { - $sqlDatabase.Grant($permissionSet,$Name) - } - - 'Deny' - { - $sqlDatabase.Deny($permissionSet,$Name) - } - } - } - catch - { - Write-Verbose -Message ("Failed removing SQL login $Name to permissions $permissions " + ` - "on database $Database on $sqlServer\$sqlInstanceName") - } - } - } - else - { - throw New-TerminatingError -ErrorType LoginNotFound ` - -FormatArgs @($Name,$sqlServer,$sqlInstanceName) ` - -ErrorCategory ObjectNotFound - } - } - else - { - throw New-TerminatingError -ErrorType NoDatabase ` - -FormatArgs @($Database,$sqlServer,$sqlInstanceName) ` - -ErrorCategory InvalidResult - } -} - -<# - .SYNOPSIS - Executes a query on the specified database. - - .PARAMETER SQLServer - The hostname of the server that hosts the SQL instance. - - .PARAMETER SQLInstanceName - The name of the SQL instance that hosts the database. - - .PARAMETER Database - Specify the name of the database to execute the query on. - - .PARAMETER Query - The query string to execute. - - .PARAMETER WithResults - Specifies if the query should return results. - - .EXAMPLE - Invoke-Query -SQLServer Server1 -SQLInstanceName MSSQLSERVER -Database master -Query 'SELECT name FROM sys.databases' -WithResults - - .EXAMPLE - Invoke-Query -SQLServer Server1 -SQLInstanceName MSSQLSERVER -Database master -Query 'RESTORE DATABASE [NorthWinds] WITH RECOVERY' -#> -function Invoke-Query -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [String] - $SQLInstanceName, - - [Parameter(Mandatory = $true)] - [String] - $Database, - - [Parameter(Mandatory = $true)] - [String] - $Query, - - [Parameter()] - [Switch] - $WithResults - ) - - $serverObject = Connect-SQL -SQLServer $SQLServer -SQLInstanceName $SQLInstanceName - - if ( $WithResults ) - { - try - { - $result = $serverObject.Databases[$Database].ExecuteWithResults($Query) - } - catch - { - throw New-TerminatingError -ErrorType ExecuteQueryWithResultsFailed -FormatArgs $Database -ErrorCategory NotSpecified - } - } - else - { - try - { - $serverObject.Databases[$Database].ExecuteNonQuery($Query) - } - catch - { - throw New-TerminatingError -ErrorType ExecuteNonQueryFailed -FormatArgs $Database -ErrorCategory NotSpecified - } - } - - return $result -} - -<# - .SYNOPSIS - Executes the alter method on an Availability Group Replica object. - - .PARAMETER AvailabilityGroupReplica - The Availabilty Group Replica object that must be altered. -#> -function Update-AvailabilityGroupReplica -{ - param - ( - [Parameter(Mandatory = $true)] - [Microsoft.SqlServer.Management.Smo.AvailabilityReplica] - $AvailabilityGroupReplica - ) - - try - { - $originalErrorActionPreference = $ErrorActionPreference - $ErrorActionPreference = 'Stop' - $AvailabilityGroupReplica.Alter() - } - catch - { - throw New-TerminatingError -ErrorType AlterAvailabilityGroupReplicaFailed -FormatArgs $AvailabilityGroupReplica.Name -ErrorCategory OperationStopped - } - finally - { - $ErrorActionPreference = $originalErrorActionPreference - } -} - -function Test-LoginEffectivePermissions -{ - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $SQLServer, - - [Parameter(Mandatory = $true)] - [String] - $SQLInstanceName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] - $LoginName, - - [Parameter(Mandatory = $true)] - [string[]] - $Permissions - ) - - # Assume the permissions are not present - $permissionsPresent = $false - - $invokeQueryParams = @{ - SQLServer = $SQLServer - SQLInstanceName = $SQLInstanceName - Database = 'master' - WithResults = $true - } - - $queryToGetEffectivePermissionsForLogin = " - EXECUTE AS LOGIN = '$LoginName' - SELECT DISTINCT permission_name - FROM fn_my_permissions(null,'SERVER') - REVERT - " - - New-VerboseMessage -Message "Getting the effective permissions for the login '$LoginName' on '$sqlInstanceName'." - - $loginEffectivePermissionsResult = Invoke-Query @invokeQueryParams -Query $queryToGetEffectivePermissionsForLogin - $loginEffectivePermissions = $loginEffectivePermissionsResult.Tables.Rows.permission_name - - if ( $null -ne $loginEffectivePermissions ) - { - $loginMissingPermissions = Compare-Object -ReferenceObject $Permissions -DifferenceObject $loginEffectivePermissions | - Where-Object -FilterScript { $_.SideIndicator -ne '=>' } | - Select-Object -ExpandProperty InputObject - - if ( $loginMissingPermissions.Count -eq 0 ) - { - $permissionsPresent = $true - } - } - - return $permissionsPresent -} diff --git a/lib/puppet_x/dsc_resources/xSmbShare/DscResources/MSFT_xSmbShare/MSFT_xSmbShare.psm1 b/lib/puppet_x/dsc_resources/xSmbShare/DscResources/MSFT_xSmbShare/MSFT_xSmbShare.psm1 deleted file mode 100644 index 642855f6..00000000 --- a/lib/puppet_x/dsc_resources/xSmbShare/DscResources/MSFT_xSmbShare/MSFT_xSmbShare.psm1 +++ /dev/null @@ -1,354 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Path - ) - - $smbShare = Get-SmbShare -Name $Name -ErrorAction SilentlyContinue - $changeAccess = @() - $readAccess = @() - $fullAccess = @() - $noAccess = @() - if ($smbShare -ne $null) - { - $smbShareAccess = Get-SmbShareAccess -Name $Name - $smbShareAccess | % { - $access = $_; - if ($access.AccessRight -eq 'Change' -and $access.AccessControlType -eq 'Allow') - { - $changeAccess += $access.AccountName - } - elseif ($access.AccessRight -eq 'Read' -and $access.AccessControlType -eq 'Allow') - { - $readAccess += $access.AccountName - } - elseif ($access.AccessRight -eq 'Full' -and $access.AccessControlType -eq 'Allow') - { - $fullAccess += $access.AccountName - } - elseif ($access.AccessRight -eq 'Full' -and $access.AccessControlType -eq 'Deny') - { - $noAccess += $access.AccountName - } - } - } - else - { - Write-Verbose "Share with name $Name does not exist" - } - - $returnValue = @{ - Name = $smbShare.Name - Path = $smbShare.Path - Description = $smbShare.Description - ConcurrentUserLimit = $smbShare.ConcurrentUserLimit - EncryptData = $smbShare.EncryptData - FolderEnumerationMode = $smbShare.FolderEnumerationMode - ShareState = $smbShare.ShareState - ShareType = $smbShare.ShareType - ShadowCopy = $smbShare.ShadowCopy - Special = $smbShare.Special - ChangeAccess = $changeAccess - ReadAccess = $readAccess - FullAccess = $fullAccess - NoAccess = $noAccess - Ensure = if($smbShare) {"Present"} else {"Absent"} - } - - $returnValue -} - -function Set-AccessPermission -{ - [CmdletBinding()] - Param - ( - $ShareName, - - [string[]] - $UserName, - - [string] - [ValidateSet("Change","Full","Read","No")] - $AccessPermission - ) - $formattedString = '{0}{1}' -f $AccessPermission,"Access" - Write-Verbose -Message "Setting $formattedString for $UserName" - - if ($AccessPermission -eq "Change" -or $AccessPermission -eq "Read" -or $AccessPermission -eq "Full") - { - Grant-SmbShareAccess -Name $Name -AccountName $UserName -AccessRight $AccessPermission -Force - } - else - { - Block-SmbShareAccess -Name $Name -AccountName $userName -Force - } -} - -function Remove-AccessPermission -{ - [CmdletBinding()] - Param - ( - $ShareName, - - [string[]] - $UserName, - - [string] - [ValidateSet("Change","Full","Read","No")] - $AccessPermission - ) - $formattedString = '{0}{1}' -f $AccessPermission,"Access" - Write-Debug -Message "Removing $formattedString for $UserName" - - if ($AccessPermission -eq "Change" -or $AccessPermission -eq "Read" -or $AccessPermission -eq "Full") - { - Revoke-SmbShareAccess -Name $Name -AccountName $UserName -Force - } - else - { - UnBlock-SmbShareAccess -Name $Name -AccountName $userName -Force - } -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Path, - - [System.String] - $Description, - - [System.String[]] - $ChangeAccess, - - [System.UInt32] - $ConcurrentUserLimit, - - [System.Boolean] - $EncryptData, - - [ValidateSet("AccessBased","Unrestricted")] - [System.String] - $FolderEnumerationMode, - - [System.String[]] - $FullAccess, - - [System.String[]] - $NoAccess, - - [System.String[]] - $ReadAccess, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = 'Present' - ) - - $psboundparameters.Remove("Debug") - - $shareExists = $false - $smbShare = Get-SmbShare -Name $Name -ErrorAction SilentlyContinue - if($smbShare -ne $null) - { - Write-Verbose -Message "Share with name $Name exists" - $shareExists = $true - } - if ($Ensure -eq "Present") - { - if ($shareExists -eq $false) - { - $psboundparameters.Remove("Ensure") - Write-Verbose "Creating share $Name to ensure it is Present" - New-SmbShare @psboundparameters - } - else - { - # Need to call either Set-SmbShare or *ShareAccess cmdlets - if ($psboundparameters.ContainsKey("ChangeAccess")) - { - $changeAccessValue = $psboundparameters["ChangeAccess"] - $psboundparameters.Remove("ChangeAccess") - } - if ($psboundparameters.ContainsKey("ReadAccess")) - { - $readAccessValue = $psboundparameters["ReadAccess"] - $psboundparameters.Remove("ReadAccess") - } - if ($psboundparameters.ContainsKey("FullAccess")) - { - $fullAccessValue = $psboundparameters["FullAccess"] - $psboundparameters.Remove("FullAccess") - } - if ($psboundparameters.ContainsKey("NoAccess")) - { - $noAccessValue = $psboundparameters["NoAccess"] - $psboundparameters.Remove("NoAccess") - } - - # Use Set-SmbShare for performing operations other than changing access - $psboundparameters.Remove("Ensure") - $psboundparameters.Remove("Path") - Set-SmbShare @PSBoundParameters -Force - - # Use *SmbShareAccess cmdlets to change access - $smbshareAccessValues = Get-SmbShareAccess -Name $Name - if ($ChangeAccess -ne $null) - { - # Blow off whatever is in there and replace it with this list - $smbshareAccessValues | ? {$_.AccessControlType -eq 'Allow' -and $_.AccessRight -eq 'Change'} ` - | % { - Remove-AccessPermission -ShareName $Name -UserName $_.AccountName -AccessPermission Change - } - - $changeAccessValue | % { - Set-AccessPermission -ShareName $Name -AccessPermission "Change" -Username $_ - } - } - $smbshareAccessValues = Get-SmbShareAccess -Name $Name - if ($ReadAccess -ne $null) - { - # Blow off whatever is in there and replace it with this list - $smbshareAccessValues | ? {$_.AccessControlType -eq 'Allow' -and $_.AccessRight -eq 'Read'} ` - | % { - Remove-AccessPermission -ShareName $Name -UserName $_.AccountName -AccessPermission Read - } - - $readAccessValue | % { - Set-AccessPermission -ShareName $Name -AccessPermission "Read" -Username $_ - } - } - $smbshareAccessValues = Get-SmbShareAccess -Name $Name - if ($FullAccess -ne $null) - { - # Blow off whatever is in there and replace it with this list - $smbshareAccessValues | ? {$_.AccessControlType -eq 'Allow' -and $_.AccessRight -eq 'Full'} ` - | % { - Remove-AccessPermission -ShareName $Name -UserName $_.AccountName -AccessPermission Full - } - - $fullAccessValue | % { - Set-AccessPermission -ShareName $Name -AccessPermission "Full" -Username $_ - } - } - $smbshareAccessValues = Get-SmbShareAccess -Name $Name - if ($NoAccess -ne $null) - { - # Blow off whatever is in there and replace it with this list - $smbshareAccessValues | ? {$_.AccessControlType -eq 'Deny'} ` - | % { - Remove-AccessPermission -ShareName $Name -UserName $_.AccountName -AccessPermission No - } - $noAccessValue | % { - Set-AccessPermission -ShareName $Name -AccessPermission "No" -Username $_ - } - } - } - } - else - { - Write-Verbose "Removing share $Name to ensure it is Absent" - Remove-SmbShare -name $Name -Force - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name, - - [parameter(Mandatory = $true)] - [System.String] - $Path, - - [System.String] - $Description, - - [System.String[]] - $ChangeAccess, - - [System.UInt32] - $ConcurrentUserLimit, - - [System.Boolean] - $EncryptData, - - [ValidateSet("AccessBased","Unrestricted")] - [System.String] - $FolderEnumerationMode, - - [System.String[]] - $FullAccess, - - [System.String[]] - $NoAccess, - - [System.String[]] - $ReadAccess, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = 'Present' - ) - $testResult = $false; - $share = Get-TargetResource -Name $Name -Path $Path -ErrorAction SilentlyContinue -ErrorVariable ev - if ($Ensure -ne "Absent") - { - if ($share.Ensure -eq "Absent") - { - $testResult = $false - } - elseif ($share.Ensure -eq "Present") - { - $Params = 'Name', 'Path', 'Description', 'ChangeAccess', 'ConcurrentUserLimit', 'EncryptData', 'FolderEnumerationMode', 'FullAccess', 'NoAccess', 'ReadAccess', 'Ensure' - if ($PSBoundParameters.Keys.Where({$_ -in $Params}) | ForEach-Object {Compare-Object -ReferenceObject $PSBoundParameters.$_ -DifferenceObject $share.$_}) - { - $testResult = $false - } - else - { - $testResult = $true - } - } - } - else - { - if ($share.Ensure -eq "Absent") - { - $testResult = $true - } - else - { - $testResult = $false - } - } - - $testResult -} - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xSmbShare/DscResources/MSFT_xSmbShare/MSFT_xSmbShare.schema.mof b/lib/puppet_x/dsc_resources/xSmbShare/DscResources/MSFT_xSmbShare/MSFT_xSmbShare.schema.mof deleted file mode 100644 index 23285d8e..00000000 --- a/lib/puppet_x/dsc_resources/xSmbShare/DscResources/MSFT_xSmbShare/MSFT_xSmbShare.schema.mof +++ /dev/null @@ -1,23 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xSmbShare")] -class MSFT_xSmbShare : OMI_BaseResource -{ - [Key, Description("Name of the SMB Share")] String Name; - [Required, Description("Path to the share")] String Path; - [Write, Description("Description of the share")] String Description; - [Write, Description("Specifies which user will be granted modify permission to access the share")] String ChangeAccess[]; - [Write, Description("Specifies the maximum number of concurrently connected users that the new SMB share may accommodate. If this parameter is set to zero (0), then the number of users is unlimited. The default value is zero (0).")] Uint32 ConcurrentUserLimit; - [Write, Description("Indicates that the share is encrypted.")] Boolean EncryptData; - [Write, Description("Specifies which files and folders in the new SMB share are visible to users."), ValueMap{"AccessBased","Unrestricted"}, Values{"AccessBased","Unrestricted"}] String FolderEnumerationMode; - [Write, Description("Specifies which accounts are granted full permission to access the share.")] String FullAccess[]; - [Write, Description("Specifies which accounts are denied access to the share.")] String NoAccess[]; - [Write, Description("Specifies which user is granted read permission to access the share.")] String ReadAccess[]; - [Write, Description("Specifies if the share should be added or removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Read, Description("Specfies the state of the share")] String ShareState; - [Read, Description("Specfies the type of the share")] String ShareType; - [Read, Description("Specifies if this share is a ShadowCopy")] String ShadowCopy; - [Read, Description("Specifies if this share is a Special Share. Admin share, default shares, IPC$ share are examples.")] String Special; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xSmbShare/LICENSE b/lib/puppet_x/dsc_resources/xSmbShare/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xSmbShare/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xSmbShare/xSmbShare.psd1 b/lib/puppet_x/dsc_resources/xSmbShare/xSmbShare.psd1 deleted file mode 100644 index e3887199..00000000 --- a/lib/puppet_x/dsc_resources/xSmbShare/xSmbShare.psd1 +++ /dev/null @@ -1,62 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '2.0.0.0' - -# ID used to uniquely identify this module -GUID = '8831ca9a-3c47-4a5b-b401-29635dd24381' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2013 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module with DSC Resources for SmbShare area' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xSmbShare/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xSmbShare' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* Converted appveyor.yml to install Pester from PSGallery instead of from Chocolatey. -* Added default value of "Present" for the Ensure parameter. (Note: due to how the module"s logic is written, this is a breaking change; DSC configs that did not specify a value for Ensure would have behaved as though it were set to Present in the Test-TargetResource function, but to absent in Set-TargetResource, removing the share instead of creating it.) - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - - - - diff --git a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlAlias/MSFT_xSqlAlias.psm1 b/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlAlias/MSFT_xSqlAlias.psm1 deleted file mode 100644 index 5ca3f2d5..00000000 --- a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlAlias/MSFT_xSqlAlias.psm1 +++ /dev/null @@ -1,324 +0,0 @@ -# -# xSqlAlias: DSC resource to configure Client Aliases -# - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name - ) - - Write-Verbose -Message 'Get-TargetResource' - - $returnValue = @{ - Name = [System.String] - Protocol = [System.String] - ServerName = [System.String] - TCPPort = [System.Int32] - PipeName = [System.String] - Ensure = [System.String] - } - - if ($null -ne (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo' -Name "$Name" -ErrorAction SilentlyContinue)) - { - $ItemValue = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo' -Name "$Name" - - $returnValue.Name = $Name - $ItemConfig = $ItemValue."$Name" -split ',' - if ($ItemConfig[0] -eq 'DBMSSOCN') - { - $returnValue.Protocol = 'TCP' - $returnValue.ServerName = $ItemConfig[1] - $returnValue.TCPPort = $ItemConfig[2] - } - else - { - $returnValue.Protocol = 'NP' - $returnValue.PipeName = $ItemConfig[1] - } - } - $returnValue -} - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name, - - [ValidateSet("TCP","NP")] - [System.String] - $Protocol, - - [System.String] - $ServerName, - - [System.Int32] - $TCPPort, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure - ) - - Write-Verbose -Message 'Set-TargetResource' - - $ItemValue = [System.String] - - if ($Protocol -eq 'NP') - { - $ItemValue = "DBNMPNTW,\\$ServerName\PIPE\sql\query" - } - - if ($Protocol -eq 'TCP') - { - $ItemValue = "DBMSSOCN,$ServerName,$TCPPort" - } - - # Logic based on Ensure value - if ($Ensure -eq 'Present') - { - # Update the registry - if (Test-Path 'HKLM:\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo') - { - Write-Debug -Message 'Check if value requires changing' - $CurrentValue = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo' -Name "$Name" -ErrorAction SilentlyContinue - if ($ItemValue -ne ($CurrentValue).$Name) - { - Write-Debug -Message 'Set-ItemProperty' - Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo' -Name "$Name" -Value $ItemValue | Out-Null - } - } - else - { - Write-Debug -Message 'New-Item' - New-Item -Path 'HKLM:\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo' | Out-Null - Write-Debug -Message 'New-ItemProperty' - New-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo' -Name "$Name" -Value $ItemValue | Out-Null - } - - Write-Debug -Message 'Check OSArchitecture' - # If this is a 64 bit machine also update Wow6432Node - if ((Get-Wmiobject -class win32_OperatingSystem).OSArchitecture -eq '64-bit') - { - Write-Debug -Message 'Is 64Bit' - if (Test-Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\MSSQLServer\Client\ConnectTo') - { - Write-Debug -Message 'Check if value requires changing' - $CurrentValue = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\MSSQLServer\Client\ConnectTo' -Name "$Name" -ErrorAction SilentlyContinue - if ($ItemValue -ne ($CurrentValue).$Name) - { - Write-Debug -Message 'Set-ItemProperty' - Set-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\MSSQLServer\Client\ConnectTo' -Name "$Name" -Value $ItemValue | Out-Null - } - } - else - { - Write-Debug -Message 'New-Item' - New-Item -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\MSSQLServer\Client\ConnectTo' | Out-Null - Write-Debug -Message 'New-ItemProperty' - New-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\MSSQLServer\Client\ConnectTo' -Name "$Name" -Value $ItemValue | Out-Null - } - } - } - - - # Logic based on Ensure value - if ($Ensure -eq 'Absent') - { - # If the base path doesn't exist then we don't need to do anything - if (Test-Path 'HKLM:\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo') - { - Write-Debug -Message 'Remove-ItemProperty' - Remove-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo' -Name "$Name" | Out-Null - - Write-Debug -Message 'Check OSArchitecture' - # If this is a 64 bit machine also update Wow6432Node - if ((Get-Wmiobject -class win32_OperatingSystem).OSArchitecture -eq '64-bit' -and (Test-Path -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\MSSQLServer\Client\ConnectTo')) - { - Write-Debug -Message 'Remove-ItemProperty Wow6432Node' - Remove-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\MSSQLServer\Client\ConnectTo' -Name "$Name" - } - } - } -} - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Name, - - [ValidateSet("TCP","NP")] - [System.String] - $Protocol, - - [System.String] - $ServerName, - - [System.Int32] - $TCPPort, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure - ) - - Write-Debug -Message 'Test-TargetResource' - - $result = [System.Boolean]$true - - if (Test-Path -Path 'HKLM:\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo') - { - Write-Debug -Message 'Alias registry container exists' - if ($null -ne (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo' -Name "$Name" -ErrorAction SilentlyContinue)) - { - Write-Debug -Message 'Existing alias found' - if ($Ensure -eq 'Present') - { - $ItemValue = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo' -Name "$Name" - - $ItemConfig = $ItemValue."$Name" -split ',' - - if ($Protocol -eq 'NP') - { - Write-Debug -Message 'Named Pipes' - if ($ItemConfig[0] -ne 'DBNMPNTW') - { - $result = $false - } - - if ($ItemConfig[1] -ne "\\$ServerName\PIPE\sql\query") - { - $result = $false - } - } - - if ($Protocol -eq 'TCP') - { - Write-Debug -Message 'TCP' - if ($ItemConfig[0] -ne 'DBMSSOCN') - { - $result = $false - } - - if ($ItemConfig[1] -ne $ServerName) - { - $result = $false - } - - if ($ItemConfig[2] -ne $TCPPort) - { - $result = $false - } - } - - # If this is a 64 bit machine also check Wow6432Node - if ((Get-Wmiobject -class win32_OperatingSystem).OSArchitecture -eq '64-bit') - { - Write-Debug -Message 'Wow6432Node' - if ($null -ne (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\MSSQLServer\Client\ConnectTo' -Name "$Name" -ErrorAction SilentlyContinue)) - { - Write-Debug -Message 'Existing alias found' - $ItemValue = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\MSSQLServer\Client\ConnectTo' -Name "$Name" - - $ItemConfig = $ItemValue."$Name" -split ',' - - if ($Protocol -eq 'NP') - { - Write-Debug -Message 'Named Pipes' - if ($ItemConfig[0] -ne 'DBNMPNTW') - { - $result = $false - } - - if ($ItemConfig[1] -ne "\\$ServerName\PIPE\sql\query") - { - $result = $false - } - } - - if ($Protocol -eq 'TCP') - { - Write-Debug -Message 'TCP' - if ($ItemConfig[0] -ne 'DBMSSOCN') - { - $result = $false - } - - if ($ItemConfig[1] -ne $ServerName) - { - $result = $false - } - - if ($ItemConfig[2] -ne $TCPPort) - { - $result = $false - } - } - } - else - { - $result = $false - } - } - } - else - { - $result = $false - } - } - else - { - if ($Ensure -eq 'Present') - { - $result = $false - } - else - { - $result = $true - } - } - } - else - { - if ($Ensure -eq 'Present') - { - $result = $false - } - else - { - $result = $true - } - } - - Write-Debug -Message "Test-TargetResource Result: $result" - - Return $result - -} - - - - - -Export-ModuleMember -Function *-TargetResource - - - - diff --git a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlAlias/MSFT_xSqlAlias.schema.mof b/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlAlias/MSFT_xSqlAlias.schema.mof deleted file mode 100644 index 87f036ff..00000000 --- a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlAlias/MSFT_xSqlAlias.schema.mof +++ /dev/null @@ -1,12 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xSqlAlias")] -class MSFT_xSqlAlias : OMI_BaseResource -{ - [Key] String Name; - [Write, ValueMap{"TCP","NP"}, Values{"TCP","NP"}] String Protocol; - [Write] String ServerName; - [Write] Sint32 TCPPort; - [Read] String PipeName; - [Write, ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; - diff --git a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAEndPoint/MSFT_xSqlHAEndPoint.psm1 b/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAEndPoint/MSFT_xSqlHAEndPoint.psm1 deleted file mode 100644 index d7a45d02..00000000 --- a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAEndPoint/MSFT_xSqlHAEndPoint.psm1 +++ /dev/null @@ -1,156 +0,0 @@ -# -# xSqlEndPoint: DSC resouce to configure the given instance of Sql High Availability Service to listen port 5022 -# with given name, and to assign $AllowedUser to communicate the service through that endpoint. -# - -# -# The Get-TargetResource cmdlet. -# -function Get-TargetResource -{ - param - ( - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $InstanceName, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $AllowedUser, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $Name, - - [ValidateRange(1000,9999)] - [Uint32] $PortNumber = 5022 - ) - - $bConfigured = Test-TargetResource -InstanceName $InstanceName -AllowedUser $AllowedUser -Name $Name - - $returnValue = @{ - ServerInstance = $InstanceName - AllowedUser = $AllowedUser - EndPointName = $Name - PortNumber = $PortNumber - Configured = $bConfigured - } - - $returnValue -} - -# -# The Set-TargetResource cmdlet. -# -function Set-TargetResource -{ - param - ( - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $InstanceName, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $AllowedUser, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $Name, - - [ValidateRange(1000,9999)] - [Uint32] $PortNumber = 5022 - ) - - Write-Verbose -Message "Set EndPoint $Name on instance $InstanceName ..." - - try - { - $endpoint = New-SqlHadrEndpoint $Name -Port $PortNumber -Path "SQLSERVER:\SQL\$InstanceName" - Set-SqlHadrEndpoint -InputObject $endpoint -State "Started" - - OSQL -S $InstanceName -E -Q "GRANT CONNECT ON ENDPOINT::[$Name] TO [$AllowedUser]" - } - catch { - Write-Verbose -Message "Set EndPoint $Name on instance $InstanceName reached exception." - throw $_ - } - -} - -# -# The Test-TargetResource cmdlet. -# -function Test-TargetResource -{ - param - ( - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $InstanceName, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $AllowedUser, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $Name, - - [ValidateRange(1000,9999)] - [Uint32] $PortNumber = 5022 - ) - - if (!(Check-SqlInstance -InstanceName $InstanceName)) - { - Write-Verbose -Message "Can't find Sql Server instance $InstanceName" - return $false - } - - - Write-Verbose -Message "Test EndPoint $Name on instance $InstanceName ..." - - $endpoint = OSQL -S $InstanceName -E -Q "select count(*) from master.sys.endpoints where name = '$Name'" -h-1 - - return ([bool] [int] $endpoint[0].Trim() ) -} - -function Get-PureInstanceName ($InstanceName) -{ - $list = $InstanceName.Split("\") - if ($list.Count -gt 1) - { - $list[1] - } - else - { - "MSSQLSERVER" - } -} - -function Check-SqlInstance($InstanceName) -{ - $list = Get-Service -Name MSSQL* - $retInstanceName = $null - - $pureInstanceName = Get-PureInstanceName -InstanceName $InstanceName - - if ($pureInstanceName -eq "MSSQLSERVER") - { - if ($list.Name -contains "MSSQLSERVER") - { - $retInstanceName = $InstanceName - } - } - elseif ($list.Name -contains $("MSSQL$" + $pureInstanceName)) - { - Write-Verbose -Message "SQL Instance $InstanceName is present" - $retInstanceName = $pureInstanceName - } - - return ($retInstanceName -ne $null) -} - - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAEndPoint/MSFT_xSqlHAEndPoint.schema.mof b/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAEndPoint/MSFT_xSqlHAEndPoint.schema.mof deleted file mode 100644 index 491b6987..00000000 --- a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAEndPoint/MSFT_xSqlHAEndPoint.schema.mof +++ /dev/null @@ -1,12 +0,0 @@ -#pragma namespace("\\\\.\\root\\microsoft\\windows\\DesiredStateConfiguration") - -[ClassVersion("1.0.0"), FriendlyName("xSqlHAEndPoint")] -class MSFT_xSqlHAEndPoint : OMI_BaseResource -{ - [key, Description("Name of Sql Instance.")] string InstanceName; - - [required, Description("Windows Account that could access the HA database mirroring endpoing.")] string AllowedUser; - [key, Description("Unique name for HA database mirroring endpoint of the sql instance.")] string Name; - [write, Description("The single port number(nnnn) on which the Sql HA to listen to.")] Uint32 PortNumber; -}; - diff --git a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAGroup/MSFT_xSqlHAGroup.psm1 b/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAGroup/MSFT_xSqlHAGroup.psm1 deleted file mode 100644 index f761fc32..00000000 --- a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAGroup/MSFT_xSqlHAGroup.psm1 +++ /dev/null @@ -1,422 +0,0 @@ -# -# xSqlHAGroup: DSC resource to configure a Sql High Availability (HA) Group. If the HA Group does not exist, it will -# create one with given name on given sql instance, it also adds the database(s) to the group. If the HA group -# already exists, it will join sql instance to the group, replicate the database(s) in the group to local instance. -# - -# -# The Get-TargetResource cmdlet. -# -function Get-TargetResource -{ - param - ( - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $Name, - - [parameter(Mandatory)] - [ValidateNotNull()] - [string[]] $Database, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $ClusterName, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $DatabaseBackupPath, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $InstanceName, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $EndpointName, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [PSCredential] $DomainCredential, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [PSCredential] $SqlAdministratorCredential - ) - - if ($Database.Count -lt 1) - { - throw "Parameter Database does not have any database" - } - - $bConfigured = Test-TargetResource -Name $Name -Database $Database -ClusterName $ClusterName -DatabaseBackupPath $DatabaseBackupPath -InstanceName $InstanceName -EndpointName $EndpointName -DomainCredential $DomainCredential -SqlAdministratorCredential $SqlAdministratorCredential - - $returnValue = @{ - - Database = $Database - Name = $Name - ClusterName = $ClusterName - DatabaseBackupPath = $DatabaseBackupPath - InstanceName = $InstanceName - EndpointName = $EndpointName - - DomainCredential = $DomainCredential.UserName - SqlAdministratorCredential = $SqlAdministratorCredential.UserName - - Configured = $bConfigured - } - - $returnValue -} - -# -# The Set-TargetResource cmdlet. -# -function Set-TargetResource -{ - param - ( - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $Name, - - [parameter(Mandatory)] - [ValidateNotNull()] - [string[]] $Database, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $ClusterName, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $DatabaseBackupPath, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $InstanceName, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $EndpointName, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [PSCredential] $DomainCredential, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [PSCredential] $SqlAdministratorCredential - ) - - if ($Database.Count -lt 1) - { - throw "Parameter Database does not have any database" - } - - Write-Verbose -Message "Checking if SQL HAG $Name is present ..." - Write-Verbose -Message "Cluster: $ClusterName, Database: $Database" - - $bHAGExist = $false - $primaryReplica = $InstanceName - - $sa = $SqlAdministratorCredential.UserName - $saPassword = $SqlAdministratorCredential.GetNetworkCredential().Password - - try - { - ($oldToken, $context, $newToken) = ImpersonateAs -cred $DomainCredential - $nodes = Get-ClusterNode -Cluster $ClusterName - } - finally - { - if ($context) - { - $context.Undo() - $context.Dispose() - - CloseUserToken($newToken) - } - } - - foreach ($node in $nodes.Name) - { - $instance = Get-SQLInstanceName -node $node -InstanceName $InstanceName - - $bCheck = Check-SQLHAGroup -InstanceName $instance -Name $Name -sa $sa -saPassword $saPassword - if ($bCheck) - { - Write-Verbose -Message "Found SQL HAG $Name on instance $instance" - $bHAGExist = $true - - # check if it is the primary replica - $bPrimaryCheck = Check-SQLHAGroupPrimaryReplica -InstanceName $instance -Name $Name -sa $sa -saPassword $saPassword - if ($bPrimaryCheck) - { - $primaryReplica = $instance - } - } - } - - if ($bHAGExist) - { - Write-Verbose -Message "Add instance $InstanceName to SQL HAG $Name" - - $bCheckPreviousInstance = Check-SQLHAGroupReplicaExist -InstanceName $InstanceName -Name $Name -PrimaryInstanceName $primaryReplica -sa $sa -saPassword $saPassword - if ($bCheckPreviousInstance) - { - Write-Verbose -Message "SQLHAGroup $Name already has the instance $InstanceName, clean up first" - $query = "alter availability group $Name ` - remove replica on '$InstanceName'" - - Write-Verbose -Message "Query: $query" - osql -S $primaryReplica -U $sa -P $saPassword -Q $query - } - - - # Add this instance to HAG group on instance $primaryInstance - $query = "alter availability group $Name ` - add replica on '$InstanceName' with ` - ( ` - EndPoint_URL = 'TCP://$EndpointName', ` - Availability_Mode = Synchronous_Commit, ` - Failover_Mode = Automatic, ` - Secondary_Role(Allow_connections = ALL) ` - ) " - - Write-Verbose -Message "Query: $query" - osql -S $primaryReplica -U $sa -P $saPassword -Q $query - - # Add this node to HAG - osql -S $InstanceName -U $sa -P $saPassword -Q "ALTER AVAILABILITY GROUP $Name JOIN" - - # restore database - foreach($db in $Database) - { - $query = "restore database $db from disk = '$DatabaseBackupPath\$db.bak' with norecovery" - Write-Verbose -Message "Instance $InstanceName Query: $query" - osql -S $InstanceName -U $sa -P $saPassword -Q $query - - - $query = "restore log $db from disk = '$DatabaseBackupPath\$db.log' with norecovery " - Write-Verbose -Message "Query: $query" - osql -S $InstanceName -U $sa -P $saPassword -Q $query - - # Add database to HAG - osql -S $InstanceName -U $sa -P $saPassword -Q "ALTER DATABASE $db SET HADR AVAILABILITY GROUP = $Name" - } - } - - else # create - { - Write-Verbose -Message "Create SQL HAG $Name and primary instance $InstanceName" - - foreach($db in $Database) - { - Write-Verbose -Message "Create database $db ..." - osql -S $InstanceName -U $sa -P $saPassword -Q "if not exists (select * from master.sys.databases where name = '$db') begin Create database $db end;" - - Write-Verbose -Message "Backup to $DatabaseBackupPath .." - osql -S $InstanceName -U $sa -P $saPassword -Q "backup database $db to disk = '$DatabaseBackupPath\$db.bak' with format" - } - - $dblist = "$Database" -replace " ", ", " - - Write-Verbose -Message "AG: $Name " - $query = "Create Availability Group $Name ` - For Database $Database ` - Replica ON ` - '$InstanceName' with ` - ( ` - ENDPOINT_URL = 'TCP://$EndpointName', ` - Availability_Mode = Synchronous_Commit, ` - Failover_Mode = Automatic ` - )" - - Write-Verbose -Message "Create HAG : $query.." - osql -S $InstanceName -U $sa -P $saPassword -Q $query - - foreach($db in $Database) - { - Write-Verbose -Message "Backup Log to $DatabaseBackupPath .." - osql -S $InstanceName -U $sa -P $saPassword -Q "backup log $db to disk = '$DatabaseBackupPath\$db.log' with NOFormat" - } - } - - -} - -# -# The Test-TargetResource cmdlet. -# -function Test-TargetResource -{ - param - ( - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $Name, - - [parameter(Mandatory)] - [ValidateNotNull()] - [string[]] $Database, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $ClusterName, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $DatabaseBackupPath, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $InstanceName, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $EndpointName, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [PSCredential] $DomainCredential, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [PSCredential] $SqlAdministratorCredential - ) - - if ($Database.Count -lt 1) - { - throw "Parameter Database does not have any database" - } - - Write-Verbose -Message "Checking if SQL HA Group $Name on instance $InstanceName present ..." - - $sa = $SqlAdministratorCredential.UserName - $saPassword = $SqlAdministratorCredential.GetNetworkCredential().Password - - $bFound = Check-SQLHAGroup -InstanceName $InstanceName -Name $Name -sa $sa -saPassword $saPassword - if ($bFound) - { - Write-Verbose -Message "SQL HA Group $Name is present" - $true - } - else - { - Write-Verbose -Message "SQL HA Group $Name not found" - $false - } -} - - -function Check-SQLHAGroup($InstanceName, $Name, $sa, $saPassword) -{ - Write-Verbose -Message "Check HAG $Name including instance $InstanceName ..." - $query = OSQL -S $InstanceName -U $sa -P $saPassword -Q "select count(name) from master.sys.availability_groups where name = '$Name'" -h-1 - - Write-Verbose -Message "SQL: $query" - - [bool] [int] ([String] $query[0]).Trim() -} - - -function Check-SQLHAGroupPrimaryReplica($InstanceName, $Name, $sa, $saPassword) -{ - $query = OSQL -S $InstanceName -U $sa -P $saPassword -Q "select count(replica_id) from sys.dm_hadr_availability_replica_states s ` - inner join sys.availability_groups g on g.group_id = s.group_id ` - where g.name = '$Name' and s.role_desc = 'PRIMARY' and s.is_local = 1" -h-1 - [bool] [int] ([string] $query[0]).Trim() -} - -function Check-SQLHAGroupReplicaExist($InstanceName, $Name, $PrimaryInstanceName, $sa, $saPassword) -{ - $query = OSQL -S $PrimaryInstanceName -U $sa -P $saPassword -Q "select count(replica_id) from sys.availability_replicas r ` - inner join sys.availability_groups g on g.group_id = r.group_id ` - where g.name = '$Name' and r.replica_server_name = '$InstanceName' " -h-1 - [bool] [int] ([string] $query[0]).Trim() - -} - -function Get-PureInstanceName ($InstanceName) -{ - $list = $InstanceName.Split("\") - if ($list.Count -gt 1) - { - $list[1] - } - else - { - "MSSQLSERVER" - } -} - -function Get-SQLInstanceName ($node, $InstanceName) -{ - $pureInstanceName = Get-PureInstanceName -InstanceName $InstanceName - - if ("MSSQLSERVER" -eq $pureInstanceName) - { - $node - } - else - { - $node + "\" + $pureInstanceName - } -} - - -function Get-ImpersonatetLib -{ - if ($script:ImpersonateLib) - { - return $script:ImpersonateLib - } - - $sig = @' -[DllImport("advapi32.dll", SetLastError = true)] -public static extern bool LogonUser(string lpszUsername, string lpszDomain, string lpszPassword, int dwLogonType, int dwLogonProvider, ref IntPtr phToken); - -[DllImport("kernel32.dll")] -public static extern Boolean CloseHandle(IntPtr hObject); -'@ - $script:ImpersonateLib = Add-Type -PassThru -Namespace 'Lib.Impersonation' -Name ImpersonationLib -MemberDefinition $sig - - return $script:ImpersonateLib - -} - -function ImpersonateAs([PSCredential] $cred) -{ - [IntPtr] $userToken = [Security.Principal.WindowsIdentity]::GetCurrent().Token - $userToken - $ImpersonateLib = Get-ImpersonatetLib - - $bLogin = $ImpersonateLib::LogonUser($cred.GetNetworkCredential().UserName, $cred.GetNetworkCredential().Domain, $cred.GetNetworkCredential().Password, - 9, 0, [ref]$userToken) - - if ($bLogin) - { - $Identity = New-Object Security.Principal.WindowsIdentity $userToken - $context = $Identity.Impersonate() - } - else - { - throw "Can't Logon as User $cred.GetNetworkCredential().UserName." - } - $context, $userToken -} - -function CloseUserToken([IntPtr] $token) -{ - $ImpersonateLib = Get-ImpersonatetLib - - $bLogin = $ImpersonateLib::CloseHandle($token) - if (!$bLogin) - { - throw "Can't close token" - } -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAGroup/MSFT_xSqlHAGroup.schema.mof b/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAGroup/MSFT_xSqlHAGroup.schema.mof deleted file mode 100644 index 436e2d2f..00000000 --- a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAGroup/MSFT_xSqlHAGroup.schema.mof +++ /dev/null @@ -1,19 +0,0 @@ -#pragma namespace("\\\\.\\root\\microsoft\\windows\\DesiredStateConfiguration") - -[ClassVersion("1.0.0"), FriendlyName("xSqlHAGroup")] -class MSFT_xSqlHAGroup : OMI_BaseResource -{ - [key, Description("The name of sql availability group")] string Name; - [required, Description("Array of databases on the local sql instance. Each database can belong to only one HA group.")] string Database[]; - [required, Description("The name of windows failover cluster for the availability group")] string ClusterName; - [required, Description("The net share for Sql replication initialization")] string DatabaseBackupPath; - [required, Description("Name of sql instance")] string InstanceName; - [required, Description("Name of EndPoint to access High Availability sql instance.")] string EndPointName; - - [Required, EmbeddedInstance("MSFT_Credential"), Description("Domain credential could get list of cluster nodes.")] - String DomainCredential; - - [Required, EmbeddedInstance("MSFT_Credential"), Description("Sql sa credential.")] - String SqlAdministratorCredential; -}; - diff --git a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAService/MSFT_xSqlHAService.psm1 b/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAService/MSFT_xSqlHAService.psm1 deleted file mode 100644 index 56af5784..00000000 --- a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAService/MSFT_xSqlHAService.psm1 +++ /dev/null @@ -1,223 +0,0 @@ -# -# xSQLService: DSC resource to enable Sql High Availability (HA) service on the given sql instance. -# - - -function RestartSqlServer() -{ - $list = Get-Service -Name MSSQL* - - foreach ($s in $list) - { - Set-Service -Name $s.Name -StartupType Automatic - if ($s.Status -ne "Stopped") - { - $s.Stop() - $s.WaitForStatus("Stopped") - $s.Refresh() - } - if ($s.Status -ne "Running") - { - $s.Start() - $s.WaitForStatus("Running") - $s.Refresh() - } - } -} - -function IsSQLLogin($SqlInstance, $SAPassword, $Login ) -{ - $query = OSQL -S $SqlInstance -U sa -P $SAPassword -Q "select count(name) from master.sys.server_principals where name = '$Login'" -h-1 - return ($query[0].Trim() -eq "1") -} - -function IsSrvRoleMember($SqlInstance, $SAPassword, $Login ) -{ - $query = OSQL -S $SqlInstance -U sa -P $SAPassword -Q "select IS_srvRoleMember('sysadmin', '$Login')" -h-1 - return ($query[0].Trim() -eq "1") -} - -function IsHAEnabled($SqlInstance, $SAPassword) -{ - $query = OSQL -S $SqlInstance -U sa -P $SAPassword -Q "select ServerProperty('IsHadrEnabled')" -h-1 - return ($query[0].Trim() -eq "1") -} - -# -# The Get-TargetResource cmdlet. -# -function Get-TargetResource -{ - param - ( - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $InstanceName, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [PSCredential] $SqlAdministratorCredential, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [PSCredential]$ServiceCredential - ) - - Write-Verbose -Message "Set SQL Service configuration ..." - - $SAPassword = $SqlAdministratorCredential.GetNetworkCredential().Password - - $ServiceAccount = $ServiceCredential.UserName - - - $bServiceAccountInSqlLogin = IsSQLLogin -SqlInstance $InstanceName -SAPassword $SAPassword -Login $ServiceAccount - - $bServiceAccountInSrvRole = IsSrvRoleMember -SqlInstance $InstanceName -SAPassword $SAPassword -Login $ServiceCredential.UserName - - $bSystemAccountInSrvRole = IsSrvRoleMember -SqlInstance $InstanceName -SAPassword $SAPassword -Login "NT AUTHORITY\SYSTEM" - - $bHAEnabled = IsHAEnabled -SqlInstance $InstanceName -SAPassword $SAPassword - - return @{ - ServiceAccount = $ServiceAccount - ServiceAccountInSqlLogin = $bServiceAccountInSqlLogin - ServiceAccountInSrvRole = $bServiceAccountInSrvRole - SystemAccountInSrvRole = $bSystemAccountInSrvRole - HAEnabled = $bHAEnabled - } -} - -# -# The Set-TargetResource cmdlet. -# -function Set-TargetResource -{ - param - ( - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $InstanceName, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [PSCredential] $SqlAdministratorCredential, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [PSCredential]$ServiceCredential - ) - - Write-Verbose -Message "Set SQL Service configuration ..." - - $SAPassword = $SqlAdministratorCredential.GetNetworkCredential().Password - - $ServiceAccount = $ServiceCredential.UserName - $ServicePassword = $ServiceCredential.GetNetworkCredential().Password - - $bCheck = IsSQLLogin -SqlInstance $InstanceName -SAPassword $SAPassword -Login $ServiceAccount - if ($false -eq $bCheck) - { - osql -S $InstanceName -U sa -P $SAPassword -Q "Create Login [$ServiceAccount] From Windows" - } - - $bCheck = IsSrvRoleMember -SqlInstance $InstanceName -SAPassword $SAPassword -Login $ServiceAccount - if ($false -eq $bCheck) - { - osql -S $InstanceName -U sa -P $SAPassword -Q "Exec master.sys.sp_addsrvrolemember '$ServiceAccount', 'sysadmin'" - } - - $bCheck = IsSrvRoleMember -SqlInstance $InstanceName -SAPassword $SAPassword -Login "NT AUTHORITY\SYSTEM" - if ($false -eq $bCheck) - { - osql -S $InstanceName -U sa -P $SAPassword -Q "Exec master.sys.sp_addsrvrolemember 'NT AUTHORITY\SYSTEM', 'sysadmin'" - } - - $serviceName = Get-SqlServiceName -InstanceName $InstanceName - $service = Get-WmiObject Win32_Service | ? { $_.Name -eq $serviceName } - $service.Change($null,$null,$null,$null,$null,$null,$ServiceAccount,$ServicePassword,$null,$null,$null) - - RestartSqlServer - - $bCheck = IsHAEnabled -SqlInstance $InstanceName -SAPassword $SAPassword - if ($false -eq $bCheck) - { - Enable-SqlAlwaysOn -ServerInstance $InstanceName -Force - RestartSqlServer - } - - # Tell the DSC Engine to restart the machine - #$global:DSCMachineStatus = 1 -} - -# -# The Test-TargetResource cmdlet. -# -function Test-TargetResource -{ - param - ( - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $InstanceName, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [PSCredential] $SqlAdministratorCredential, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [PSCredential]$ServiceCredential - ) - - Write-Verbose -Message "Test SQL Service configuration ..." - - $SAPassword = $SqlAdministratorCredential.GetNetworkCredential().Password - $ServiceAccount = $ServiceCredential.UserName - - $ret = IsSQLLogin -SqlInstance $InstanceName -SAPassword $SAPassword -Login $ServiceAccount - if ($false -eq $ret) - { - Write-Verbose -Message "$ServiceAccount is NOT in SqlServer login" - return $false - } - - $ret = IsSrvRoleMember -SqlInstance $InstanceName -SAPassword $SAPassword -Login $ServiceCredential.UserName - if ($false -eq $ret) - { - Write-Verbose -Message "$ServiceCredential.UserName is NOT in admin role" - return $false - } - - $ret = IsSrvRoleMember -SqlInstance $InstanceName -SAPassword $SAPassword -Login "NT AUTHORITY\SYSTEM" - if ($false -eq $ret) - { - Write-Verbose -Message "NT AUTHORITY\SYSTEM is NOT in admin role" - return $false - } - - $ret = IsHAEnabled -SqlInstance $InstanceName -SAPassword $SAPassword - if ($false -eq $ret) - { - Write-Verbose -Message "$InstanceName does NOT enable SQL HA." - return $false - } - - return $ret -} - - -function Get-SqlServiceName ($InstanceName) -{ - $list = $InstanceName.Split("\") - if ($list.Count -gt 1) - { - "MSSQL$" + $list[1] - } - else - { - "MSSQLSERVER" - } -} - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAService/MSFT_xSqlHAService.schema.mof b/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAService/MSFT_xSqlHAService.schema.mof deleted file mode 100644 index b54da508..00000000 --- a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlHAService/MSFT_xSqlHAService.schema.mof +++ /dev/null @@ -1,15 +0,0 @@ -#pragma namespace("\\\\.\\root\\microsoft\\windows\\DesiredStateConfiguration") - -[ClassVersion("1.0.0"), FriendlyName("xSqlHAService")] -class MSFT_xSqlHAService : OMI_BaseResource -{ - [key, Description("The name of Sql instance.")] - string InstanceName; - - [required, EmbeddedInstance("MSFT_Credential"), Description("Sql sa credential")] - string SqlAdministratorCredential; - - [required, EmbeddedInstance("MSFT_Credential"), Description("Domain credential to run sql service")] - String ServiceCredential; -}; - diff --git a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlServerInstall/MSFT_xSqlServerInstall.psm1 b/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlServerInstall/MSFT_xSqlServerInstall.psm1 deleted file mode 100644 index 12209816..00000000 --- a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlServerInstall/MSFT_xSqlServerInstall.psm1 +++ /dev/null @@ -1,337 +0,0 @@ -# -# xSQLServerInstall: DSC resource to install Sql Server Enterprise version. -# - -# Controls the default version identifier in paramters. -$DefaultVersionID = "120"; - -# -# The Get-TargetResource cmdlet. -# -function Get-TargetResource -{ - param - ( - [parameter(Mandatory)] - [string] $InstanceName = "MSSQLSERVER", - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $SourcePath, - - [PSCredential] $SourcePathCredential, - - [string]$VersionID=$DefaultVersionID, - - [string] $Features="SQLEngine,SSMS", - - [PSCredential] $SqlAdministratorCredential, - - [bool] $UpdateEnabled = $false, - [string] $SvcAccount = $NULL, - [string] $SysAdminAccounts = $NULL, - [string] $AgentSvcAccount = $NULL, - [string] $SqlCollation = $NULL, - [string] $InstallSqlDataDir = $NULL, - [string] $SqlTempDBDir = $NULL, - [string] $SqlUserDBDir = $NULL, - [string] $SqlUserDBLogDir = $NULL, - [string] $SqlBackupDir = $NULL - ) - - $list = Get-Service -Name MSSQL* - $retInstanceName = $null - - if ($InstanceName -eq "MSSQLSERVER") - { - if ($list.Name -contains "MSSQLSERVER") - { - $retInstanceName = $InstanceName - } - } - elseif ($list.Name -contains $("MSSQL$" + $InstanceName)) - { - Write-Verbose -Message "SQL Instance $InstanceName is present" - $retInstanceName = $InstanceName - } - - - $returnValue = @{ - InstanceName = $retInstanceName - } - - return $returnValue -} - - -# -# The Set-TargetResource cmdlet. -# -function Set-TargetResource -{ - param - ( - [parameter(Mandatory)] - [string] $InstanceName = "MSSQLSERVER", - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $SourcePath, - - [PSCredential] $SourcePathCredential, - - [string]$VersionID=$DefaultVersionID, - - [string] $Features="SQLEngine,SSMS", - - [PSCredential] $SqlAdministratorCredential, - - [bool] $UpdateEnabled = $false, - [string] $SvcAccount = $NULL, - [string] $SysAdminAccounts = $NULL, - [string] $AgentSvcAccount = $NULL, - [string] $SqlCollation = $NULL, - [string] $InstallSqlDataDir = $NULL, - [string] $SqlTempDBDir = $NULL, - [string] $SqlUserDBDir = $NULL, - [string] $SqlUserDBLogDir = $NULL, - [string] $SqlBackupDir = $NULL - ) - $LogPath = Join-Path $env:SystemDrive -ChildPath "Logs" - - if (!(Test-Path $LogPath)) - { - New-Item $LogPath -ItemType Directory - } - # SQL log from setup cmdline run output - $logFile = Join-Path $LogPath -ChildPath "sqlInstall-log-$($InstanceName).txt" - - # SQL installer path - $cmd = Join-Path $SourcePath -ChildPath "Setup.exe" - - # TCPENABLED- Specifies the state of the TCP protocol for the SQL Server service. - # NPENABLED- Specifies the state of the Named Pipes protocol for the SQL Server service - # tcp/ip and named pipes protocol needs to be enabled for web apps to access db instances. So these are being enabled as a part of default sql server installation - $cmd += " /Q /ACTION=Install /IACCEPTSQLSERVERLICENSETERMS /IndicateProgress " - $cmd += " /FEATURES=$Features /INSTANCENAME=$InstanceName " - - if ($SqlAdministratorCredential) - { - $saPwd = $SqlAdministratorCredential.GetNetworkCredential().Password - $cmd += " /TCPENABLED=1 /NPENABLED=1 /SECURITYMODE=SQL /SAPWD=$saPwd " - } - else - { - $cmd += " /TCPENABLED=1 /NPENABLED=1 " - } - - if ($UpdateEnabled) - { - $cmd += " /updateEnabled=true " - } - else - { - $cmd += " /updateEnabled=false " - } - - if ($SysAdminAccounts) - { - $cmd += " /SQLSYSADMINACCOUNTS=$SysAdminAccounts " - } - else - { - $cmd += " /SQLSYSADMINACCOUNTS=`"builtin\administrators`" " - } - - if ($SvcAccount) - { - $cmd += " /SQLSVCACCOUNT=$SvcAccount " - } - - if ($AgentSvcAccount) - { - $cmd += " /AGTSVCACCOUNT=$AgentSvcAccount " - } - - if ($SqlCollation) - { - $cmd += " /SQLCOLLATION=$SqlCollation " - } - - if ($InstallSqlDataDir) - { - $cmd += " /INSTALLSQLDATADIR=`"$InstallSqlDataDir`" " - } - - if ($SqlTempDBDir) - { - $cmd += " /SQLTEMPDBDIR=`"$SqlTempDBDir`" /SQLTEMPDBLOGDIR=`"$SqlTempDBDir`" " - } - - if ($SqlUserDBDir) - { - $cmd += " /SQLUSERDBDIR=`"$SqlUserDBDir`" " - } - - if ($SqlUserDBLogDir) - { - $cmd += " /SQLUSERDBLOGDIR=`"$SqlUserDBLogDir`" " - } - - if ($SqlBackupDir) - { - $cmd += " /SQLBACKUPDIR=`"$SqlBackupDir`" " - } - - Write-Verbose "SQL install cmdline: $cmd"; - $cmd += " > $logFile 2>&1 " - - NetUse -SharePath $SourcePath -SharePathCredential $SourcePathCredential -Ensure "Present"; - - # check that the sourcepath exists - Write-Verbose "Validating access to $SourcePath"; - if (!(Test-Path $SourcePath)) - { - # Throw an error message indicating SQL Server install media is not valid - $errorId = "InstallMediaNotFound"; - $exceptionStr = "SQL Server install media path was not found."; - $errorCategory = [System.Management.Automation.ErrorCategory]::ObjectNotFound; - $exception = New-Object System.InvalidOperationException $exceptionStr; - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null; - - $PSCmdlet.ThrowTerminatingError($errorRecord); - } - try - { - Invoke-Expression $cmd - } - finally - { - NetUse -SharePath $SourcePath -SharePathCredential $SourcePathCredential -Ensure "Absent" - } - # Check the SQL logs for installation status. - $installStatus = $false - try - { - # SQL Server log folder - $LogPath = Join-Path $env:ProgramFiles "Microsoft SQL Server\$VersionID\Setup Bootstrap\Log" - $sqlLog = Get-Content "$LogPath\summary.txt" - if($sqlLog -ne $null) - { - $message = $sqlLog | fl - if($message -ne $null) - { - # sample report when the install is succesful - # Overall summary: - # Final result: Passed - # Exit code (Decimal): 0 - $finalResult = $message[1] | Out-String - $exitCode = $message[2] | Out-String - - if(($finalResult.Contains("Passed") -eq $True) -and ($exitCode.Contains("0") -eq $True)) - { - $installStatus = $true - } - } - } - } - catch - { - Write-Verbose "SQL Installation did not succeed." - } - if($installStatus -eq $true) - { - # Tell the DSC Engine to restart the machine - $global:DSCMachineStatus = 1 - } - else - { - # Throw an error message indicating failure to install SQL Server install - $errorId = "InValidSQLServerInstall"; - $exceptionStr = "SQL Server installation did not succeed. For more details please refer to the logs under $LogPath folder." - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidResult; - $exception = New-Object System.InvalidOperationException $exceptionStr; - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - - $PSCmdlet.ThrowTerminatingError($errorRecord); - } -} -# -# The Test-TargetResource cmdlet. -# -function Test-TargetResource -{ - param - ( - [parameter(Mandatory)] - [string] $InstanceName = "MSSQLSERVER", - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $SourcePath, - - [PSCredential] $SourcePathCredential, - - [string]$VersionID=$DefaultVersionID, - - [string] $Features="SQLEngine,SSMS", - - [PSCredential] $SqlAdministratorCredential, - - [bool] $UpdateEnabled = $false, - [string] $SvcAccount = $NULL, - [string] $SysAdminAccounts = $NULL, - [string] $AgentSvcAccount = $NULL, - [string] $SqlCollation = $NULL, - [string] $InstallSqlDataDir = $NULL, - [string] $SqlTempDBDir = $NULL, - [string] $SqlUserDBDir = $NULL, - [string] $SqlUserDBLogDir = $NULL, - [string] $SqlBackupDir = $NULL - ) - - $info = Get-TargetResource -InstanceName $InstanceName -SourcePath $SourcePath -SqlAdministratorCredential $SqlAdministratorCredential - - return ($info.InstanceName -eq $InstanceName) -} - - - -function NetUse -{ - param - ( - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $SharePath, - - [PSCredential]$SharePathCredential, - - [string] $Ensure = "Present" - ) - - if ($null -eq $SharePathCredential) - { - return; - } - - Write-Verbose -Message "NetUse set share $SharePath ..." - - if ($Ensure -eq "Absent") - { - $cmd = "net use $SharePath /DELETE" - } - else - { - $cred = $SharePathCredential.GetNetworkCredential() - $pwd = $cred.Password - $user = $cred.Domain + "\" + $cred.UserName - $cmd = "net use $SharePath $pwd /user:$user" - } - - Invoke-Expression $cmd -} - -Export-ModuleMember -Function *-TargetResource - - diff --git a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlServerInstall/MSFT_xSqlServerInstall.schema.mof b/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlServerInstall/MSFT_xSqlServerInstall.schema.mof deleted file mode 100644 index cdc420b2..00000000 --- a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xSqlServerInstall/MSFT_xSqlServerInstall.schema.mof +++ /dev/null @@ -1,30 +0,0 @@ -#pragma namespace("\\\\.\\root\\microsoft\\windows\\DesiredStateConfiguration") - -[ClassVersion("1.0.0"), FriendlyName("xSqlServerInstall")] -class MSFT_xSqlServerInstall : OMI_BaseResource -{ - [key, Description("The name of sql instance.")] string InstanceName; - - [required, Description("The share path of sql server software.")] string SourcePath; - - [write, Description("The numeric version identifier for the instance to be installed")] string VersionID; - - [write,EmbeddedInstance("MSFT_Credential"), - Description("The credential that vm could use to access net share of sql server software.")] - string SourcePathCredential; - - [write, Description("List of names of Sql Server features to install")] string Features; - - [write, EmbeddedInstance("MSFT_Credential"), Description("Sql sa credential")] string SqlAdministratorCredential; - - [write, Description("Specify whether SQL server setup should discover and include product updates.")] boolean UpdateEnabled; - [write, Description("Specify the startup account for the SQL server service.")] string SvcAccount; - [write, Description("Specify logins to be members of the sysadmin role.")] string SysAdminAccounts; - [write, Description("Specify the account for SQL server agent service.")] string AgentSvcAccount; - [write, Description("Specify the default collation for SQL server")] string SqlCollation; - [write, Description("Specify the directory for SQL server system db files")] string InstallSqlDataDir; - [write, Description("Specify the directory for TempDB files.")] string SqlTempDBDir; - [write, Description("Specify the directory for UserDB data files.")] string SqlUserDBDir; - [write, Description("Specify the directory for UserDB log files.")] string SqlUserDBLogDir; - [write, Description("Specify the directory for backup files.")] string SqlBackupDir; -}; diff --git a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xWaitForSqlHAGroup/MSFT_xWaitForSqlHAGroup.psm1 b/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xWaitForSqlHAGroup/MSFT_xWaitForSqlHAGroup.psm1 deleted file mode 100644 index 9a3a5c4e..00000000 --- a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xWaitForSqlHAGroup/MSFT_xWaitForSqlHAGroup.psm1 +++ /dev/null @@ -1,284 +0,0 @@ -# -# xWaitForSqlHAGroup: DSC resource to wait for existency of given name of Sql HA group, it checks the state of -# the HA group with given interval until it exists or the number of retries is reached. -# - - -# -# The Get-TargetResource cmdlet. -# -function Get-TargetResource -{ - param - ( - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $Name, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $ClusterName, - - [UInt64] $RetryIntervalSec = 10, - [UInt32] $RetryCount = 10, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $InstanceName, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [PSCredential]$DomainCredential, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [PSCredential]$SqlAdministratorCredential - ) - - $sa = $SqlAdministratorCredential.UserName - $saPassword = $SqlAdministratorCredential.GetNetworkCredential().Password - - $bFound = Check-SQLHAGroup -InstanceName $InstanceName -Name $Name -sa $sa -saPassword $saPassword - - $returnValue = @{ - Name = $Name - InstanceName = $InstanceName - RetryIntervalSec = $RetryIntervalSec - RetryCount = $RetryCount - - HAGroupExist = $bFound - } - - $returnValue -} - -# -# The Set-TargetResource cmdlet. -# -function Set-TargetResource -{ - param - ( - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $Name, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $ClusterName, - - [UInt64] $RetryIntervalSec = 10, - [UInt32] $RetryCount = 10, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $InstanceName, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [PSCredential]$DomainCredential, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [PSCredential]$SqlAdministratorCredential - ) - - $bFound = $false - Write-Verbose -Message "Checking for SQL HA Group $Name on instance $InstanceName ..." - - $sa = $SqlAdministratorCredential.UserName - $saPassword = $SqlAdministratorCredential.GetNetworkCredential().Password - - for ($count = 0; $count -lt $RetryCount; $count++) - { - $bFound = Check-SQLHAGroupExist -ClusterName $ClusterName -Name $Name -domainCred $DomainCredential -sa $sa -saPassword $saPassword - if ($bFound) - { - Write-Verbose -Message "Found SQL HA Group $Name on instance $InstanceName" - break; - } - else - { - Write-Verbose -Message "SQL HA Group $Name on instance $InstanceName not found. Will retry again after $RetryIntervalSec sec" - Start-Sleep -Seconds $RetryIntervalSec - } - } - - - if (!$bFound) - { - throw "SQL HA Group $Name on instance $InstanceName not found afater $count attempt with $RetryIntervalSec sec interval" - } -} - -# -# The Test-TargetResource cmdlet. -# -function Test-TargetResource -{ - param - ( - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $Name, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $ClusterName, - - [UInt64] $RetryIntervalSec = 10, - [UInt32] $RetryCount = 10, - - [parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [string] $InstanceName, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [PSCredential]$DomainCredential, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [PSCredential]$SqlAdministratorCredential - ) - - Write-Verbose -Message "Checking for SQL HA Group $Name on instance $InstanceName ..." - - $sa = $SqlAdministratorCredential.UserName - $saPassword = $SqlAdministratorCredential.GetNetworkCredential().Password - - $bFound = Check-SQLHAGroup -InstanceName $InstanceName -Name $Name -sa $sa -saPassword $saPassword - if ($bFound) - { - Write-Verbose -Message "Found SQL HA Group $Name on instance $InstanceName" - $true - } - else - { - Write-Verbose -Message "SQL HA Group $Name on instance $InstanceName not found" - $false - } -} - - -function Check-SQLHAGroup($InstanceName, $Name, $sa, $saPassword) -{ - $query = OSQL -S $InstanceName -U $sa -P $saPassword -Q "select count(name) from master.sys.availability_groups where name = '$Name'" -h-1 - [bool] [int] $query[0].Trim() -} - -function Check-SQLHAGroupExist($ClusterName, $Name, $sa, $saPassword, $domainCred) -{ - $bHAGExist = $false - - try - { - ($oldToken, $context, $newToken) = ImpersonateAs -cred $domainCred - $nodes = Get-ClusterNode -Cluster $ClusterName - } - finally - { - if ($context) - { - $context.Undo() - $context.Dispose() - - CloseUserToken($newToken) - } - } - - - foreach ($node in $nodes.Name) - { - $instance = Get-SQLInstanceName -node $node -InstanceName $InstanceName - $bCheck = Check-SQLHAGroup -InstanceName $instance -Name $Name -sa $sa -saPassword $saPassword - if ($bCheck) - { - $bHAGExist = $true - break - } - } - - $bHAGExist -} - -function Get-ImpersonatetLib -{ - if ($script:ImpersonateLib) - { - return $script:ImpersonateLib - } - - $sig = @' -[DllImport("advapi32.dll", SetLastError = true)] -public static extern bool LogonUser(string lpszUsername, string lpszDomain, string lpszPassword, int dwLogonType, int dwLogonProvider, ref IntPtr phToken); - -[DllImport("kernel32.dll")] -public static extern Boolean CloseHandle(IntPtr hObject); -'@ - $script:ImpersonateLib = Add-Type -PassThru -Namespace 'Lib.Impersonation' -Name ImpersonationLib -MemberDefinition $sig - - return $script:ImpersonateLib - -} - -function ImpersonateAs([PSCredential] $cred) -{ - [IntPtr] $userToken = [Security.Principal.WindowsIdentity]::GetCurrent().Token - $userToken - $ImpersonateLib = Get-ImpersonatetLib - - $bLogin = $ImpersonateLib::LogonUser($cred.GetNetworkCredential().UserName, $cred.GetNetworkCredential().Domain, $cred.GetNetworkCredential().Password, - 9, 0, [ref]$userToken) - - if ($bLogin) - { - $Identity = New-Object Security.Principal.WindowsIdentity $userToken - $context = $Identity.Impersonate() - } - else - { - throw "Can't Logon as User $cred.GetNetworkCredential().UserName." - } - $context, $userToken -} - -function CloseUserToken([IntPtr] $token) -{ - $ImpersonateLib = Get-ImpersonatetLib - - $bLogin = $ImpersonateLib::CloseHandle($token) - if (!$bLogin) - { - throw "Can't close token" - } -} - -function Get-PureInstanceName ($InstanceName) -{ - $list = $InstanceName.Split("\") - if ($list.Count -gt 1) - { - $list[1] - } - else - { - "MSSQLSERVER" - } -} - -function Get-SQLInstanceName ($node, $InstanceName) -{ - $pureInstanceName = Get-PureInstanceName -InstanceName $InstanceName - - if ("MSSQLSERVER" -eq $pureInstanceName) - { - $node - } - else - { - $node + "\" + $pureInstanceName - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xWaitForSqlHAGroup/MSFT_xWaitForSqlHAGroup.schema.mof b/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xWaitForSqlHAGroup/MSFT_xWaitForSqlHAGroup.schema.mof deleted file mode 100644 index 1f604c1f..00000000 --- a/lib/puppet_x/dsc_resources/xSqlPs/DSCResources/MSFT_xWaitForSqlHAGroup/MSFT_xWaitForSqlHAGroup.schema.mof +++ /dev/null @@ -1,18 +0,0 @@ -#pragma namespace("\\\\.\\root\\microsoft\\windows\\DesiredStateConfiguration") - -[ClassVersion("1.0.0.0"), FriendlyName("xWaitForSqlHAGroup")] -class MSFT_xWaitForSqlHAGroup : OMI_BaseResource -{ - [Key, Description("The name of Sql High Availability group")] String Name; - [required, Description("The name of windows failover cluster for the availability group.")] string ClusterName; - [Write, Description("Interval to check the HA group existency")] Uint64 RetryIntervalSec; - [Write, Description("Maximum number of retries to check HA group existency")] Uint32 RetryCount; - - [required, Description("The name of sql instance.")] string InstanceName; - - [Required, EmbeddedInstance("MSFT_Credential"), Description("Domain credential could get list of cluster nodes.")] - String DomainCredential; - - [Required, EmbeddedInstance("MSFT_Credential"), Description("Sql sa credential")] - String SqlAdministratorCredential; -}; diff --git a/lib/puppet_x/dsc_resources/xSqlPs/LICENSE b/lib/puppet_x/dsc_resources/xSqlPs/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xSqlPs/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xSqlPs/xSqlPs.psd1 b/lib/puppet_x/dsc_resources/xSqlPs/xSqlPs.psd1 deleted file mode 100644 index 72b7b43e..00000000 --- a/lib/puppet_x/dsc_resources/xSqlPs/xSqlPs.psd1 +++ /dev/null @@ -1,45 +0,0 @@ - - -@{ - - -ModuleVersion = '1.4.0.0' - -GUID = 'abee25c0-d40a-4bf2-a04e-ed059aba377b' - -Author = 'Microsoft Corporation' - -CompanyName = 'Microsoft Corporation' - -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -Description = 'SQL module.' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xSqlPs/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xSqlPs' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* Converted appveyor.yml to install Pester from PSGallery instead of from Chocolatey. -* Fixed bugs in xSqlAlias that prevented the succesful creation of the aliases and caused errors. - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - diff --git a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDisk/MSFT_xDisk.psm1 b/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDisk/MSFT_xDisk.psm1 deleted file mode 100644 index 4b78dccf..00000000 --- a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDisk/MSFT_xDisk.psm1 +++ /dev/null @@ -1,806 +0,0 @@ -# Suppressed as per PSSA Rule Severity guidelines for unit/integration tests: -# https://github.com/PowerShell/DscResources/blob/master/PSSARuleSeverities.md -[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')] -param () - -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Storage Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'StorageDsc.Common' ` - -ChildPath 'StorageDsc.Common.psm1')) - -# Import the Storage Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'StorageDsc.ResourceHelper' ` - -ChildPath 'StorageDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xDisk' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current state of the Disk and Partition. - - .PARAMETER DriveLetter - Specifies the preferred letter to assign to the disk volume. - - .PARAMETER DiskId - Specifies the disk identifier for the disk to modify. - - .PARAMETER DiskIdType - Specifies the identifier type the DiskId contains. Defaults to Number. - - .PARAMETER Size - Specifies the size of new volume (use all available space on disk if not provided). - - .PARAMETER FSLabel - Specifies the volume label to assign to the volume. - - .PARAMETER AllocationUnitSize - Specifies the allocation unit size to use when formatting the volume. - - .PARAMETER FSFormat - Specifies the file system format of the new volume. - - .PARAMETER AllowDestructive - Specifies if potentially destructive operations may occur - - .PARAMETER ClearDisk - Specifies if the disks partition schema should be removed entirely, even if data and oem partitions are present. Only possible with AllowDestructive enabled. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $DriveLetter, - - [Parameter(Mandatory = $true)] - [System.String] - $DiskId, - - [Parameter()] - [ValidateSet('Number', 'UniqueId')] - [System.String] - $DiskIdType = 'Number', - - [Parameter()] - [System.UInt64] - $Size, - - [Parameter()] - [System.String] - $FSLabel, - - [Parameter()] - [System.UInt32] - $AllocationUnitSize, - - [Parameter()] - [ValidateSet('NTFS', 'ReFS')] - [System.String] - $FSFormat = 'NTFS', - - [Parameter()] - [System.Boolean] - $AllowDestructive, - - [Parameter()] - [System.Boolean] - $ClearDisk - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.GettingDiskMessage -f $DiskIdType, $DiskId, $DriveLetter) - ) -join '' ) - - # Validate the DriveLetter parameter - $DriveLetter = Assert-DriveLetterValid -DriveLetter $DriveLetter - - $diskIdParameter = @{ - $DiskIdType = $DiskId - } - - $disk = Get-Disk ` - @diskIdParameter ` - -ErrorAction SilentlyContinue - - $partition = Get-Partition ` - -DriveLetter $DriveLetter ` - -ErrorAction SilentlyContinue - - $volume = Get-Volume ` - -DriveLetter $DriveLetter ` - -ErrorAction SilentlyContinue - - $fileSystem = $volume.FileSystem - $FSLabel = $volume.FileSystemLabel - - $blockSize = (Get-CimInstance ` - -Query "SELECT BlockSize from Win32_Volume WHERE DriveLetter = '$($DriveLetter):'" ` - -ErrorAction SilentlyContinue).BlockSize - - $returnValue = @{ - DiskId = $DiskId - DiskIdType = $DiskIdType - DriveLetter = $partition.DriveLetter - Size = $partition.Size - FSLabel = $FSLabel - AllocationUnitSize = $blockSize - FSFormat = $fileSystem - } - - $returnValue -} # Get-TargetResource - -<# - .SYNOPSIS - Initializes the Disk and Partition and assigns the drive letter. - - .PARAMETER DriveLetter - Specifies the preferred letter to assign to the disk volume. - - .PARAMETER DiskId - Specifies the disk identifier for the disk to modify. - - .PARAMETER DiskIdType - Specifies the identifier type the DiskId contains. Defaults to Number. - - .PARAMETER Size - Specifies the size of new volume (use all available space on disk if not provided). - - .PARAMETER FSLabel - Specifies the volume label to assign to the volume. - - .PARAMETER AllocationUnitSize - Specifies the allocation unit size to use when formatting the volume. - - .PARAMETER FSFormat - Specifies the file system format of the new volume. - - .PARAMETER AllowDestructive - Specifies if potentially destructive operations may occur - - .PARAMETER ClearDisk - Specifies if the disks partition schema should be removed entirely, even if data and oem partitions are present. Only possible with AllowDestructive enabled. -#> -function Set-TargetResource -{ - # Should process is called in a helper functions but not directly in Set-TargetResource - [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '')] - [CmdletBinding(SupportsShouldProcess = $true)] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $DriveLetter, - - [Parameter(Mandatory = $true)] - [System.String] - $DiskId, - - [Parameter()] - [ValidateSet('Number', 'UniqueId')] - [System.String] - $DiskIdType = 'Number', - - [Parameter()] - [System.UInt64] - $Size, - - [Parameter()] - [System.String] - $FSLabel, - - [Parameter()] - [System.UInt32] - $AllocationUnitSize, - - [Parameter()] - [ValidateSet('NTFS', 'ReFS')] - [System.String] - $FSFormat = 'NTFS', - - [Parameter()] - [System.Boolean] - $AllowDestructive, - - [Parameter()] - [System.Boolean] - $ClearDisk - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.SettingDiskMessage -f $DiskIdType, $DiskId, $DriveLetter) - ) -join '' ) - - # Validate the DriveLetter parameter - $DriveLetter = Assert-DriveLetterValid -DriveLetter $DriveLetter - - $diskIdParameter = @{ - $DiskIdType = $DiskId - } - - $disk = Get-Disk ` - @diskIdParameter ` - -ErrorAction Stop - - if ($disk.IsOffline) - { - # Disk is offline, so bring it online - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.SetDiskOnlineMessage -f $DiskIdType, $DiskId) - ) -join '' ) - - $disk | Set-Disk -IsOffline $false - } # if - - if ($disk.IsReadOnly) - { - # Disk is read-only, so make it read/write - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.SetDiskReadWriteMessage -f $DiskIdType, $DiskId) - ) -join '' ) - - $disk | Set-Disk -IsReadOnly $false - } # if - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.CheckingDiskPartitionStyleMessage -f $DiskIdType, $DiskId) - ) -join '' ) - - if ($AllowDestructive -and $ClearDisk -and $disk.PartitionStyle -ne 'RAW') - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.ClearingDisk -f $DiskIdType, $DiskId) - ) -join '' ) - - $disk | Clear-Disk -RemoveData -RemoveOEM -Confirm:$true - $disk = $disk | Get-Disk - } - - switch ($disk.PartitionStyle) - { - 'RAW' - { - # The disk partition table is not yet initialized, so initialize it with GPT - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.InitializingDiskMessage -f $DiskIdType, $DiskId) - ) -join '' ) - - $disk | Initialize-Disk ` - -PartitionStyle 'GPT' - - break - } # 'RAW' - - 'GPT' - { - # The disk partition is already initialized with GPT. - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.DiskAlreadyInitializedMessage -f $DiskIdType, $DiskId) - ) -join '' ) - - break - } # 'GPT' - - default - { - # This disk is initialized but not as GPT - so raise an exception. - New-InvalidOperationException ` - -Message ($localizedData.DiskAlreadyInitializedError -f ` - $DiskIdType, $DiskId, $Disk.PartitionStyle) - } # default - } # switch - - # Get the partitions on the disk - $partition = $disk | Get-Partition -ErrorAction SilentlyContinue - - # Check if the disk has an existing partition assigned to the drive letter - $assignedPartition = $partition | - Where-Object -Property DriveLetter -eq $DriveLetter - - # Check if existing partition already has file system on it - if ($null -eq $assignedPartition) - { - # There is no partiton with this drive letter - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.DriveNotFoundOnPartitionMessage -f $DiskIdType, $DiskId, $DriveLetter) - ) -join '' ) - - # Are there any partitions defined on this disk? - if ($partition) - { - # There are partitions defined - identify if one matches the size required - if ($Size) - { - # Find the first basic partition matching the size - $partition = $partition | - Where-Object -Filter { $_.Type -eq 'Basic' -and $_.Size -eq $Size } | - Select-Object -First 1 - - if ($partition) - { - # A partition matching the required size was found - Write-Verbose -Message ($localizedData.MatchingPartitionFoundMessage -f ` - $DiskIdType, $DiskId, $partition.PartitionNumber) - } - else - { - # A partition matching the required size was not found - Write-Verbose -Message ($localizedData.MatchingPartitionNotFoundMessage -f ` - $DiskIdType, $DiskId) - } # if - } - else - { - # No size specified so no partition can be matched - $partition = $null - } # if - } # if - - # Do we need to create a new partition? - if (-not $partition) - { - # Attempt to create a new partition - $partitionParams = @{ - DriveLetter = $DriveLetter - } - - if ($Size) - { - # Use only a specific size - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.CreatingPartitionMessage ` - -f $DiskIdType, $DiskId, $DriveLetter, "$($Size/1KB) KB") - ) -join '' ) - - $partitionParams['Size'] = $Size - } - else - { - # Use the entire disk - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.CreatingPartitionMessage ` - -f $DiskIdType, $DiskId, $DriveLetter, 'all free space') - ) -join '' ) - - $partitionParams['UseMaximumSize'] = $true - } # if - - # Create the partition. - $partition = $disk | New-Partition @partitionParams - - <# - After creating the partition it can take a few seconds for it to become writeable - Wait for up to 30 seconds for the parition to become writeable - #> - $timeout = (Get-Date) + (New-Timespan -Second 30) - while ($partition.IsReadOnly -and (Get-Date) -lt $timeout) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - ($localizedData.NewPartitionIsReadOnlyMessage ` - -f $DiskIdType, $DiskId, $partition.PartitionNumber) - ) -join '' ) - - Start-Sleep -Seconds 1 - - # Pull the partition details again to check if it is readonly - $partition = $partition | Get-Partition - } # while - } # if - - if ($partition.IsReadOnly) - { - # The partition is still readonly - throw an exception - New-InvalidOperationException ` - -Message ($localizedData.ParitionIsReadOnlyError -f ` - $DiskIdType, $DiskId, $partition.PartitionNumber) - } # if - - $assignDriveLetter = $true - } - else - { - # The disk already has a partition on it that is assigned to the Drive Letter - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.PartitionAlreadyAssignedMessage -f ` - $DriveLetter, $assignedPartition.PartitionNumber) - ) -join '' ) - - $assignDriveLetter = $false - - if ($assignedPartition.Size -ne $Size) - { - if ($AllowDestructive) - { - if ($FSFormat -eq 'ReFS') - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.ResizeRefsNotPossible ` - -f $DriveLetter, $assignedPartition.Size, $Size) - ) -join '' ) - - } - else - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.SizeMismatchCorrection ` - -f $DriveLetter, $assignedPartition.Size, $Size) - ) -join '' ) - - $supportedSize = ($assignedPartition | Get-PartitionSupportedSize) - - if ($size -gt $supportedSize.SizeMax) - { - New-InvalidArgumentException -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.FreeSpaceViolationError ` - -f $DriveLetter, $assignedPartition.Size, $Size, $supportedSize.SizeMax) - ) -join '' ) -ArgumentName 'Size' -ErrorAction Stop - } - - $assignedPartition | Resize-Partition -Size $Size - } - } - } - } - - # Get the Volume on the partition - $volume = $partition | Get-Volume - - # Is the volume already formatted? - if ($volume.FileSystem -eq '') - { - # The volume is not formatted - $volParams = @{ - FileSystem = $FSFormat - Confirm = $false - } - - if ($FSLabel) - { - # Set the File System label on the new volume - $volParams["NewFileSystemLabel"] = $FSLabel - } # if - - if ($AllocationUnitSize) - { - # Set the Allocation Unit Size on the new volume - $volParams["AllocationUnitSize"] = $AllocationUnitSize - } # if - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.FormattingVolumeMessage -f $volParams.FileSystem) - ) -join '' ) - - # Format the volume - $volume = $partition | Format-Volume @VolParams - } - else - { - # The volume is already formatted - if ($PSBoundParameters.ContainsKey('FSFormat')) - { - # Check the filesystem format - $fileSystem = $volume.FileSystem - if ($fileSystem -ne $FSFormat) - { - # The file system format does not match - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.FileSystemFormatMismatch -f ` - $DriveLetter, $fileSystem, $FSFormat) - ) -join '' ) - - if ($AllowDestructive) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.VolumeFormatInProgress -f ` - $DriveLetter, $fileSystem, $FSFormat) - ) -join '' ) - - $formatParam = @{ - FileSystem = $FSFormat - Force = $true - } - - if ($PSBoundParameters.ContainsKey('AllocationUnitSize')) - { - $formatParam.Add('AllocationUnitSize', $AllocationUnitSize) - } - - $Volume | Format-Volume @formatParam - } - } # if - } # if - - # Check the volume label - if ($PSBoundParameters.ContainsKey('FSLabel')) - { - # The volume should have a label assigned - if ($volume.FileSystemLabel -ne $FSLabel) - { - # The volume lable needs to be changed because it is different. - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.ChangingVolumeLabelMessage ` - -f $DriveLetter, $FSLabel) - ) -join '' ) - - $volume | Set-Volume -NewFileSystemLabel $FSLabel - } # if - } # if - } # if - - # Assign the Drive Letter if it isn't assigned - if ($assignDriveLetter -and ($partition.DriveLetter -ne $DriveLetter)) - { - $null = $partition | Set-Partition -NewDriveLetter $DriveLetter - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.SuccessfullyInitializedMessage -f $DriveLetter) - ) -join '' ) - } # if -} # Set-TargetResource - -<# - .SYNOPSIS - Tests if the disk is initialized, the partion exists and the drive letter is assigned. - - .PARAMETER DriveLetter - Specifies the preferred letter to assign to the disk volume. - - .PARAMETER DiskId - Specifies the disk identifier for the disk to modify. - - .PARAMETER DiskIdType - Specifies the identifier type the DiskId contains. Defaults to Number. - - .PARAMETER Size - Specifies the size of new volume (use all available space on disk if not provided). - - .PARAMETER FSLabel - Specifies the volume label to assign to the volume. - - .PARAMETER AllocationUnitSize - Specifies the allocation unit size to use when formatting the volume. - - .PARAMETER FSFormat - Specifies the file system format of the new volume. - - .PARAMETER AllowDestructive - Specifies if potentially destructive operations may occur - - .PARAMETER ClearDisk - Specifies if the disks partition schema should be removed entirely, even if data and oem partitions are present. Only possible with AllowDestructive enabled. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $DriveLetter, - - [Parameter(Mandatory = $true)] - [System.String] - $DiskId, - - [Parameter()] - [ValidateSet('Number', 'UniqueId')] - [System.String] - $DiskIdType = 'Number', - - [Parameter()] - [System.UInt64] - $Size, - - [Parameter()] - [System.String] - $FSLabel, - - [Parameter()] - [System.UInt32] - $AllocationUnitSize, - - [Parameter()] - [ValidateSet('NTFS', 'ReFS')] - [System.String] - $FSFormat = 'NTFS', - - [Parameter()] - [System.Boolean] - $AllowDestructive, - - [Parameter()] - [System.Boolean] - $ClearDisk - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.TestingDiskMessage -f $DiskIdType, $DiskId, $DriveLetter) - ) -join '' ) - - # Validate the DriveLetter parameter - $DriveLetter = Assert-DriveLetterValid -DriveLetter $DriveLetter - - $diskIdParameter = @{ - $DiskIdType = $DiskId - } - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.CheckDiskInitializedMessage -f $DiskIdType, $DiskId) - ) -join '' ) - - $disk = Get-Disk ` - @diskIdParameter ` - -ErrorAction SilentlyContinue - - if (-not $disk) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.DiskNotFoundMessage -f $DiskIdType, $DiskId) - ) -join '' ) - - return $false - } # if - - if ($disk.IsOffline) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.DiskNotOnlineMessage -f $DiskIdType, $DiskId) - ) -join '' ) - - return $false - } # if - - if ($disk.IsReadOnly) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.DiskReadOnlyMessage -f $DiskIdType, $DiskId) - ) -join '' ) - - return $false - } # if - - if ($disk.PartitionStyle -ne 'GPT') - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.DiskNotGPTMessage -f $DiskIdType, $DiskId, $Disk.PartitionStyle) - ) -join '' ) - - return $false - } # if - - $partition = Get-Partition ` - -DriveLetter $DriveLetter ` - -ErrorAction SilentlyContinue - if ($partition.DriveLetter -ne $DriveLetter) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.DriveLetterNotFoundMessage -f $DriveLetter) - ) -join '' ) - - return $false - } # if - - # Drive size - if ($Size) - { - if ($partition.Size -ne $Size) - { - # The partition size mismatches - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.SizeMismatchMessage ` - -f $DriveLetter, $Partition.Size, $Size) - ) -join '' ) - - if ($AllowDestructive) - { - return $false - } - } # if - } # if - - $blockSize = (Get-CimInstance ` - -Query "SELECT BlockSize from Win32_Volume WHERE DriveLetter = '$($DriveLetter):'" ` - -ErrorAction SilentlyContinue).BlockSize - - if ($blockSize -gt 0 -and $AllocationUnitSize -ne 0) - { - if ($AllocationUnitSize -ne $blockSize) - { - # The allocation unit size mismatches - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.AllocationUnitSizeMismatchMessage ` - -f $DriveLetter, $($blockSize.BlockSize / 1KB), $($AllocationUnitSize / 1KB)) - ) -join '' ) - - if ($AllowDestructive) - { - return $false - } - } # if - } # if - - # Get the volume so the properties can be checked - $volume = Get-Volume ` - -DriveLetter $DriveLetter ` - -ErrorAction SilentlyContinue - - if ($PSBoundParameters.ContainsKey('FSFormat')) - { - # Check the filesystem format - $fileSystem = $volume.FileSystem - if ($fileSystem -ne $FSFormat) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.FileSystemFormatMismatch ` - -f $DriveLetter, $fileSystem, $FSFormat) - ) -join '' ) - - if ($AllowDestructive) - { - return $false - } - } # if - } # if - - if ($PSBoundParameters.ContainsKey('FSLabel')) - { - # Check the volume label - $label = $volume.FileSystemLabel - if ($label -ne $FSLabel) - { - # The assigned volume label is different and needs updating - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.DriveLabelMismatch ` - -f $DriveLetter, $label, $FSLabel) - ) -join '' ) - - return $false - } # if - } # if - - return $true -} # Test-TargetResource - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDisk/MSFT_xDisk.schema.mof b/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDisk/MSFT_xDisk.schema.mof deleted file mode 100644 index c4839eed..00000000 --- a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDisk/MSFT_xDisk.schema.mof +++ /dev/null @@ -1,14 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xDisk")] -class MSFT_xDisk : OMI_BaseResource -{ - [Key, Description("Specifies the identifier for which disk to modify.")] String DriveLetter; - [Required, Description("Specifies the disk identifier for the disk to modify.")] String DiskId; - [Write, Description("Specifies the identifier type the DiskId contains. Defaults to Number."), ValueMap{"Number","UniqueId"}, Values{"Number","UniqueId"}] String DiskIdType; - [Write, Description("Specifies the size of new volume. Leave empty to use the remaining free space.")] Uint64 Size; - [Write, Description("Define volume label if required.")] String FSLabel; - [Write, Description("Specifies the allocation unit size to use when formatting the volume.")] Uint32 AllocationUnitSize; - [Write, Description("Specifies the file system format of the new volume."), ValueMap{"NTFS","ReFS"}, Values{"NTFS","ReFS"}] String FSFormat; - [Write, Description("Specifies if potentially destructive operations may occur.")] Boolean AllowDestructive; - [Write, Description("Specifies if the disks partition schema should be removed entirely, even if data and oem partitions are present. Only possible with AllowDestructive enabled.")] Boolean ClearDisk; -}; diff --git a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDisk/en-us/MSFT_xDisk.strings.psd1 b/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDisk/en-us/MSFT_xDisk.strings.psd1 deleted file mode 100644 index 28dfaa96..00000000 --- a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDisk/en-us/MSFT_xDisk.strings.psd1 +++ /dev/null @@ -1,38 +0,0 @@ -ConvertFrom-StringData @' - GettingDiskMessage = Getting disk with {0} '{1}' status for drive letter '{2}'. - SettingDiskMessage = Setting disk with {0} '{1}' status for drive letter '{2}'. - SetDiskOnlineMessage = Setting disk with {0} '{1}' online. - SetDiskReadWriteMessage = Setting disk with {0} '{1}' to read/write. - CheckingDiskPartitionStyleMessage = Checking disk with {0} '{1}' partition style. - InitializingDiskMessage = Initializing disk with {0} '{1}'. - DiskAlreadyInitializedMessage = Disk with {0} '{1}' is already initialized with GPT. - CreatingPartitionMessage = Creating partition on disk with {0} '{1}' with drive letter '{2}' using {3}. - FormattingVolumeMessage = Formatting the volume as '{0}'. - SuccessfullyInitializedMessage = Successfully initialized '{0}'. - ChangingDriveLetterMessage = The volume already exists, changing drive letter '{0}' to '{1}'. - AssigningDriveLetterMessage = Assigning drive letter '{0}'. - ChangingVolumeLabelMessage = Changing volume '{0}' label to '{1}'. - NewPartitionIsReadOnlyMessage = New partition '{2}' on disk with {0} '{1}' is readonly. Waiting for it to become writable. - TestingDiskMessage = Testing disk with {0} '{1}' status for drive letter '{2}'. - CheckDiskInitializedMessage = Checking if disk with {0} '{1}' is initialized. - DiskNotFoundMessage = Disk with {0} '{1}' was not found. - DiskNotOnlineMessage = Disk with {0} '{1}' is not online. - DiskReadOnlyMessage = Disk with {0} '{1}' is readonly. - DiskNotGPTMessage = Disk with {0} '{1}' is initialized with '{2}' partition style. GPT required. - DriveLetterNotFoundMessage = Drive {0} was not found. - SizeMismatchMessage = Partition assigned to drive {0} has size {1}, which does not match expected size {2}. - AllocationUnitSizeMismatchMessage = Volume assigned to drive {0} has allocation unit size {1} KB does not match expected allocation unit size {2} KB. - FileSystemFormatMismatch = Volume assigned to drive {0} filesystem format '{1}' does not match expected format '{2}'. - DriveLabelMismatch = Volume assigned to drive {0} label '{1}' does not match expected label '{2}'. - PartitionAlreadyAssignedMessage = Partition '{1}' is already assigned as drive {0}. - MatchingPartitionNotFoundMessage = Disk with {0} '{1}' already contains partitions, but none match required size. - MatchingPartitionFoundMessage = Disk with {0} '{1}' already contains partitions, and partition '{2}' matches required size. - DriveNotFoundOnPartitionMessage = Disk with {0} '{1}' does not contain a partition assigned to drive letter '{2}'. - ClearingDisk = Clearing disk with {0} '{1}' of all existing partitions and volumes. - DiskAlreadyInitializedError = Disk with {0} '{1}' is already initialized with {2}. - NewParitionIsReadOnlyError = New partition '{2}' on disk with {0} '{1}' did not become writable in the expected time. - VolumeFormatInProgress = Switch AllowDestructive is specified. Attempting to format volume on {0} with '{2}', was '{1}' - SizeMismatchCorrection = Switch AllowDestructive is specified. Attempting to resize partition {0} from {1} to {2} - FreeSpaceViolationError = Attempted to resize partition {0} from {1} to {2} while maximum allowed size was {3} - ResizeRefsNotPossible = Skipping resize of {0} from {1} to {2}. Resizing ReFS partitions is currently not possible. -'@ diff --git a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDiskAccessPath/MSFT_xDiskAccessPath.psm1 b/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDiskAccessPath/MSFT_xDiskAccessPath.psm1 deleted file mode 100644 index a67e9f44..00000000 --- a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDiskAccessPath/MSFT_xDiskAccessPath.psm1 +++ /dev/null @@ -1,682 +0,0 @@ -# Suppressed as per PSSA Rule Severity guidelines for unit/integration tests: -# https://github.com/PowerShell/DscResources/blob/master/PSSARuleSeverities.md -[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')] -param () - -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Storage Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'StorageDsc.Common' ` - -ChildPath 'StorageDsc.Common.psm1')) - -# Import the Storage Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'StorageDsc.ResourceHelper' ` - -ChildPath 'StorageDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xDiskAccessPath' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current state of the Disk and Partition. - - .PARAMETER AccessPath - Specifies the access path folder to the assign the disk volume to - - .PARAMETER DiskId - Specifies the disk identifier for the disk to modify. - - .PARAMETER DiskIdType - Specifies the identifier type the DiskId contains. Defaults to Number. - - .PARAMETER Size - Specifies the size of new volume (use all available space on disk if not provided). - - .PARAMETER FSLabel - Specifies the volume label to assign to the volume. - - .PARAMETER AllocationUnitSize - Specifies the allocation unit size to use when formatting the volume. - - .PARAMETER FSFormat - Specifies the file system format of the new volume. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $AccessPath, - - [Parameter(Mandatory = $true)] - [System.String] - $DiskId, - - [Parameter()] - [ValidateSet('Number','UniqueId')] - [System.String] - $DiskIdType = 'Number', - - [Parameter()] - [System.UInt64] - $Size, - - [Parameter()] - [System.String] - $FSLabel, - - [Parameter()] - [System.UInt32] - $AllocationUnitSize, - - [Parameter()] - [ValidateSet('NTFS','ReFS')] - [System.String] - $FSFormat = 'NTFS' - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.GettingDiskMessage -f $DiskIdType,$DiskId,$AccessPath) - ) -join '' ) - - # Validate the AccessPath parameter adding a trailing slash - $AccessPath = Assert-AccessPathValid -AccessPath $AccessPath -Slash - - $diskIdParameter = @{ - $DiskIdType = $DiskId - } - - $disk = Get-Disk ` - @diskIdParameter ` - -ErrorAction SilentlyContinue - - # Get the partitions on the disk - $partition = $disk | Get-Partition -ErrorAction SilentlyContinue - - # Check if the disk has an existing partition assigned to the access path - $assignedPartition = $partition | - Where-Object -Property AccessPaths -Contains -Value $AccessPath - - $volume = $assignedPartition | Get-Volume - - $fileSystem = $volume.FileSystem - $FSLabel = $volume.FileSystemLabel - - # Prepare the AccessPath used in the CIM query (replaces '\' with '\\') - $queryAccessPath = $AccessPath -replace '\\','\\' - - $blockSize = (Get-CimInstance ` - -Query "SELECT BlockSize from Win32_Volume WHERE Name = '$queryAccessPath'" ` - -ErrorAction SilentlyContinue).BlockSize - - $returnValue = @{ - DiskId = $DiskId - DiskIdType = $DiskIdType - AccessPath = $AccessPath - Size = $assignedPartition.Size - FSLabel = $FSLabel - AllocationUnitSize = $blockSize - FSFormat = $fileSystem - } - $returnValue -} # Get-TargetResource - -<# - .SYNOPSIS - Initializes the Disk and Partition and assigns the access path. - - .PARAMETER AccessPath - Specifies the access path folder to the assign the disk volume to - - .PARAMETER DiskId - Specifies the disk identifier for the disk to modify. - - .PARAMETER DiskIdType - Specifies the identifier type the DiskId contains. Defaults to Number. - - .PARAMETER Size - Specifies the size of new volume (use all available space on disk if not provided). - - .PARAMETER FSLabel - Specifies the volume label to assign to the volume. - - .PARAMETER AllocationUnitSize - Specifies the allocation unit size to use when formatting the volume. - - .PARAMETER FSFormat - Specifies the file system format of the new volume. -#> -function Set-TargetResource -{ - # Should process is called in a helper functions but not directly in Set-TargetResource - [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '')] - [CmdletBinding(SupportsShouldProcess = $true)] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $AccessPath, - - [Parameter(Mandatory = $true)] - [System.String] - $DiskId, - - [Parameter()] - [ValidateSet('Number','UniqueId')] - [System.String] - $DiskIdType = 'Number', - - [Parameter()] - [System.UInt64] - $Size, - - [Parameter()] - [System.String] - $FSLabel, - - [Parameter()] - [System.UInt32] - $AllocationUnitSize, - - [Parameter()] - [ValidateSet('NTFS','ReFS')] - [System.String] - $FSFormat = 'NTFS' - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.SettingDiskMessage -f $DiskIdType,$DiskId,$AccessPath) - ) -join '' ) - - # Validate the AccessPath parameter adding a trailing slash - $AccessPath = Assert-AccessPathValid -AccessPath $AccessPath -Slash - - $diskIdParameter = @{ - $DiskIdType = $DiskId - } - - $disk = Get-Disk ` - @diskIdParameter ` - -ErrorAction Stop - - if ($disk.IsOffline) - { - # Disk is offline, so bring it online - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.SetDiskOnlineMessage -f $DiskIdType,$DiskId) - ) -join '' ) - - $disk | Set-Disk -IsOffline $false - } # if - - if ($disk.IsReadOnly) - { - # Disk is read-only, so make it read/write - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.SetDiskReadWriteMessage -f $DiskIdType,$DiskId) - ) -join '' ) - - $disk | Set-Disk -IsReadOnly $false - } # if - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.CheckingDiskPartitionStyleMessage -f $DiskIdType,$DiskId) - ) -join '' ) - - switch ($disk.PartitionStyle) - { - 'RAW' - { - # The disk partition table is not yet initialized, so initialize it with GPT - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.InitializingDiskMessage -f $DiskIdType,$DiskId) - ) -join '' ) - - $disk | Initialize-Disk ` - -PartitionStyle 'GPT' - break - } # 'RAW' - - 'GPT' - { - # The disk partition is already initialized with GPT. - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.DiskAlreadyInitializedMessage -f $DiskIdType,$DiskId) - ) -join '' ) - break - } # 'GPT' - - default - { - # This disk is initialized but not as GPT - so raise an exception. - New-InvalidOperationException ` - -Message ($localizedData.DiskAlreadyInitializedError -f ` - $DiskIdType,$DiskId,$Disk.PartitionStyle) - } # default - } # switch - - # Get the partitions on the disk - $partition = $disk | Get-Partition -ErrorAction SilentlyContinue - - # Check if the disk has an existing partition assigned to the access path - $assignedPartition = $partition | - Where-Object -Property AccessPaths -Contains -Value $AccessPath - - if ($null -eq $assignedPartition) - { - # There is no partiton with this access path - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.AccessPathNotFoundOnPartitionMessage -f $DiskIdType,$DiskId,$AccessPath) - ) -join '' ) - - # Are there any partitions defined on this disk? - if ($partition) - { - # There are partitions defined - identify if one matches the size required - if ($Size) - { - # Find the first basic partition matching the size - $partition = $partition | - Where-Object -Filter { $_.Type -eq 'Basic' -and $_.Size -eq $Size } | - Select-Object -First 1 - - if ($partition) - { - # A partition matching the required size was found - Write-Verbose -Message ($localizedData.MatchingPartitionFoundMessage -f ` - $DiskIdType,$DiskId,$partition.PartitionNumber) - } - else - { - # A partition matching the required size was not found - Write-Verbose -Message ($localizedData.MatchingPartitionNotFoundMessage -f ` - $DiskIdType,$DiskId) - } # if - } - else - { - # No size specified so no partition can be matched - $partition = $null - } # if - } # if - - # Do we need to create a new partition? - if (-not $partition) - { - # Attempt to create a new partition - $partitionParams = @{} - - if ($Size) - { - # Use only a specific size - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.CreatingPartitionMessage ` - -f $DiskIdType,$DiskId,"$($Size/1KB) KB") - ) -join '' ) - $partitionParams['Size'] = $Size - } - else - { - # Use the entire disk - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.CreatingPartitionMessage ` - -f $DiskIdType,$DiskId,'all free space') - ) -join '' ) - $partitionParams['UseMaximumSize'] = $true - } # if - - # Create the partition - $partition = $disk | New-Partition @partitionParams - - <# - After creating the partition it can take a few seconds for it to become writeable - Wait for up to 30 seconds for the partition to become writeable - #> - $timeout = (Get-Date) + (New-Timespan -Second 30) - while ($partition.IsReadOnly -and (Get-Date) -lt $timeout) - { - Write-Verbose -Message ($localizedData.NewPartitionIsReadOnlyMessage -f ` - $DiskIdType,$DiskId,$partition.PartitionNumber) - - Start-Sleep -Seconds 1 - - # Pull the partition details again to check if it is readonly - $partition = $partition | Get-Partition - } # while - } # if - - if ($partition.IsReadOnly) - { - # The partition is still readonly - throw an exception - New-InvalidOperationException ` - -Message ($localizedData.NewParitionIsReadOnlyError -f ` - $DiskIdType,$DiskId,$partition.PartitionNumber) - } # if - - $assignAccessPath = $true - } - else - { - # The disk already has a partition on it that is assigned to the access path - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.PartitionAlreadyAssignedMessage -f ` - $AccessPath,$partition.PartitionNumber) - ) -join '' ) - - $assignAccessPath = $false - } - - # Get the Volume on the partition - $volume = $partition | Get-Volume - - # Is the volume already formatted? - if ($volume.FileSystem -eq '') - { - # The volume is not formatted - $volParams = @{ - FileSystem = $FSFormat - Confirm = $false - } - - if ($FSLabel) - { - # Set the File System label on the new volume - $volParams["NewFileSystemLabel"] = $FSLabel - } # if - - if ($AllocationUnitSize) - { - # Set the Allocation Unit Size on the new volume - $volParams["AllocationUnitSize"] = $AllocationUnitSize - } # if - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.FormattingVolumeMessage -f $volParams.FileSystem) - ) -join '' ) - - # Format the volume - $volume = $partition | Format-Volume @VolParams - } - else - { - # The volume is already formatted - if ($PSBoundParameters.ContainsKey('FSFormat')) - { - # Check the filesystem format - $fileSystem = $volume.FileSystem - if ($fileSystem -ne $FSFormat) - { - # The file system format does not match - # There is nothing we can do to resolve this (yet) - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.FileSystemFormatMismatch -f ` - $AccessPath,$fileSystem,$FSFormat) - ) -join '' ) - } # if - } # if - - # Check the volume label - if ($PSBoundParameters.ContainsKey('FSLabel')) - { - # The volume should have a label assigned - if ($volume.FileSystemLabel -ne $FSLabel) - { - # The volume lable needs to be changed because it is different. - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.ChangingVolumeLabelMessage ` - -f $AccessPath,$FSLabel) - ) -join '' ) - - $volume | Set-Volume -NewFileSystemLabel $FSLabel - } # if - } # if - } # if - - # Assign the access path if it isn't assigned - if ($assignAccessPath) - { - <# - Add the partition access path, but do not pipe $disk to - Add-PartitionAccessPath because it is not supported in - Windows Server 2012 R2 - #> - $null = Add-PartitionAccessPath ` - -AccessPath $AccessPath ` - -DiskNumber $disk.Number ` - -PartitionNumber $partition.PartitionNumber - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.SuccessfullyInitializedMessage -f $AccessPath) - ) -join '' ) - } # if -} # Set-TargetResource - -<# - .SYNOPSIS - Tests if the disk is initialized, the partion exists and the access path is assigned. - - .PARAMETER AccessPath - Specifies the access path folder to the assign the disk volume to - - .PARAMETER DiskId - Specifies the disk identifier for the disk to modify. - - .PARAMETER DiskIdType - Specifies the identifier type the DiskId contains. Defaults to Number. - - .PARAMETER Size - Specifies the size of new volume (use all available space on disk if not provided). - - .PARAMETER FSLabel - Specifies the volume label to assign to the volume. - - .PARAMETER AllocationUnitSize - Specifies the allocation unit size to use when formatting the volume. - - .PARAMETER FSFormat - Specifies the file system format of the new volume. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $AccessPath, - - [Parameter(Mandatory = $true)] - [System.String] - $DiskId, - - [Parameter()] - [ValidateSet('Number','UniqueId')] - [System.String] - $DiskIdType = 'Number', - - [Parameter()] - [System.UInt64] - $Size, - - [Parameter()] - [System.String] - $FSLabel, - - [Parameter()] - [System.UInt32] - $AllocationUnitSize, - - [Parameter()] - [ValidateSet('NTFS','ReFS')] - [System.String] - $FSFormat = 'NTFS' - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.TestingDiskMessage -f $DiskIdType,$DiskId,$AccessPath) - ) -join '' ) - - # Validate the AccessPath parameter adding a trailing slash - $AccessPath = Assert-AccessPathValid -AccessPath $AccessPath -Slash - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.CheckDiskInitializedMessage -f $DiskIdType,$DiskId) - ) -join '' ) - - $diskIdParameter = @{ - $DiskIdType = $DiskId - } - - $disk = Get-Disk ` - @diskIdParameter ` - -ErrorAction SilentlyContinue - - if (-not $disk) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.DiskNotFoundMessage -f $DiskIdType,$DiskId) - ) -join '' ) - return $false - } # if - - if ($disk.IsOffline) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.DiskNotOnlineMessage -f $DiskIdType,$DiskId) - ) -join '' ) - return $false - } # if - - if ($disk.IsReadOnly) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.DiskReadOnlyMessage -f $DiskIdType,$DiskId) - ) -join '' ) - return $false - } # if - - if ($disk.PartitionStyle -ne 'GPT') - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.DiskNotGPTMessage -f $DiskIdType,$DiskId,$Disk.PartitionStyle) - ) -join '' ) - return $false - } # if - - # Get the partitions on the disk - $partition = $disk | Get-Partition -ErrorAction SilentlyContinue - - # Check if the disk has an existing partition assigned to the access path - $assignedPartition = $partition | - Where-Object -Property AccessPaths -Contains -Value $AccessPath - - if (-not $assignedPartition) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.AccessPathNotFoundMessage -f $AccessPath) - ) -join '' ) - return $false - } # if - - # Partition size was passed so check it - if ($Size) - { - if ($assignedPartition.Size -ne $Size) - { - # The partition size mismatches but can't be changed (yet) - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.SizeMismatchMessage -f ` - $AccessPath,$assignedPartition.Size,$Size) - ) -join '' ) - } # if - } # if - - # Prepare the AccessPath used in the CIM query (replaces '\' with '\\') - $queryAccessPath = $AccessPath -replace '\\','\\' - - $blockSize = (Get-CimInstance ` - -Query "SELECT BlockSize from Win32_Volume WHERE Name = '$queryAccessPath'" ` - -ErrorAction SilentlyContinue).BlockSize - - if ($blockSize -gt 0 -and $AllocationUnitSize -ne 0) - { - if ($AllocationUnitSize -ne $blockSize) - { - # The allocation unit size mismatches but can't be changed (yet) - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.AllocationUnitSizeMismatchMessage -f ` - $AccessPath,$($blockSize.BlockSize/1KB),$($AllocationUnitSize/1KB)) - ) -join '' ) - } # if - } # if - - # Get the volume so the properties can be checked - $volume = $assignedPartition | Get-Volume - - if ($PSBoundParameters.ContainsKey('FSFormat')) - { - # Check the filesystem format - $fileSystem = $volume.FileSystem - if ($fileSystem -ne $FSFormat) - { - # The file system format does not match but can't be changed (yet) - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.FileSystemFormatMismatch -f ` - $AccessPath,$fileSystem,$FSFormat) - ) -join '' ) - } # if - } # if - - if ($PSBoundParameters.ContainsKey('FSLabel')) - { - # Check the volume label - $label = $volume.FileSystemLabel - if ($label -ne $FSLabel) - { - # The assigned volume label is different and needs updating - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.DriveLabelMismatch -f ` - $AccessPAth,$label,$FSLabel) - ) -join '' ) - return $false - } # if - } # if - - return $true -} # Test-TargetResource - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDiskAccessPath/MSFT_xDiskAccessPath.schema.mof b/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDiskAccessPath/MSFT_xDiskAccessPath.schema.mof deleted file mode 100644 index f792348f..00000000 --- a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDiskAccessPath/MSFT_xDiskAccessPath.schema.mof +++ /dev/null @@ -1,12 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xDiskAccessPath")] -class MSFT_xDiskAccessPath : OMI_BaseResource -{ - [Key, Description("Specifies the access path folder to the assign the disk volume to.")] String AccessPath; - [Required, Description("Specifies the disk identifier for the disk to modify.")] String DiskId; - [Write, Description("Specifies the identifier type the DiskId contains. Defaults to Number."), ValueMap{"Number","UniqueId"}, Values{"Number","UniqueId"}] String DiskIdType; - [Write, Description("Specifies the size of new volume.")] Uint64 Size; - [Write, Description("Define volume label if required.")] String FSLabel; - [Write, Description("Specifies the allocation unit size to use when formatting the volume.")] Uint32 AllocationUnitSize; - [Write, Description("Specifies the file system format of the new volume."), ValueMap{"NTFS","ReFS"}, Values{"NTFS","ReFS"}] String FSFormat; -}; diff --git a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDiskAccessPath/en-us/MSFT_xDiskAccessPath.strings.psd1 b/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDiskAccessPath/en-us/MSFT_xDiskAccessPath.strings.psd1 deleted file mode 100644 index de5a2615..00000000 --- a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xDiskAccessPath/en-us/MSFT_xDiskAccessPath.strings.psd1 +++ /dev/null @@ -1,34 +0,0 @@ -ConvertFrom-StringData @' - GettingDiskMessage = Getting disk with {0} '{1}' status for access path '{2}'. - SettingDiskMessage = Setting disk with {0} '{1}' status for access path '{2}'. - SetDiskOnlineMessage = Setting disk with {0} '{1}' online. - SetDiskReadWriteMessage = Setting disk with {0} '{1}' to read/write. - CheckingDiskPartitionStyleMessage = Checking disk with {0} '{1}' partition style. - InitializingDiskMessage = Initializing disk with {0} '{1}'. - DiskAlreadyInitializedMessage = Disk with {0} '{1}' is already initialized with GPT. - CreatingPartitionMessage = Creating partition on disk with {0} '{1}' using {2}. - FormattingVolumeMessage = Formatting the volume as '{0}'. - SuccessfullyInitializedMessage = Successfully initialized volume and assigned to access path '{0}'. - ChangingDriveLetterMessage = The volume already exists, changing access path '{0}' to '{1}'. - AssigningDriveLetterMessage = Assigning access path '{0}'. - ChangingVolumeLabelMessage = Changing Volume assigned to access path '{0}' label to '{1}'. - NewPartitionIsReadOnlyMessage = New partition '{1}' on disk with {0} '{1}' is readonly. Waiting for it to become writable. - TestingDiskMessage = Testing disk with {0} '{1}' status for access path '{2}'. - CheckDiskInitializedMessage = Checking if disk with {0} '{1}' is initialized. - DiskNotFoundMessage = Disk with {0} '{1}' was not found. - DiskNotOnlineMessage = Disk with {0} '{1}' is not online. - DiskReadOnlyMessage = Disk with {0} '{1}'is readonly. - DiskNotGPTMessage = Disk with {0} '{1}' is initialised with '{2}' partition style. GPT required. - AccessPathNotFoundMessage = A volume assigned to access path '{0}' was not found. - SizeMismatchMessage = Partition assigned to access path '{0}' has size {1}, which does not match expected size {2}. - AllocationUnitSizeMismatchMessage = Volume assigned to access path '{0}' has allocation unit size {1} KB does not match expected allocation unit size {2} KB. - FileSystemFormatMismatch = Volume assigned to access path '{0}' filesystem format '{1}' does not match expected format '{2}'. - DriveLabelMismatch = Volume assigned to access path '{0}' label '{1}' does not match expected label '{2}'. - PartitionAlreadyAssignedMessage = Partition '{1}' is already assigned to access path '{0}'. - MatchingPartitionNotFoundMessage = Disk with {0} '{1}' already contains paritions, but none match required size. - MatchingPartitionFoundMessage = Disk with {0} '{1}' already contains paritions, and partition '{2}' matches required size. - AccessPathNotFoundOnPartitionMessage = Disk with {0} '{1}' does not contain a partition assigned to access path '{2}'. - - DiskAlreadyInitializedError = Disk with {0} '{1}' is already initialized with {2}. - NewParitionIsReadOnlyError = New partition '{2}' on disk with {0} '{1}' did not become writable in the expected time. -'@ diff --git a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xMountImage/MSFT_xMountImage.psm1 b/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xMountImage/MSFT_xMountImage.psm1 deleted file mode 100644 index 061857c4..00000000 --- a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xMountImage/MSFT_xMountImage.psm1 +++ /dev/null @@ -1,591 +0,0 @@ -# Suppressed as per PSSA Rule Severity guidelines for unit/integration tests: -# https://github.com/PowerShell/DscResources/blob/master/PSSARuleSeverities.md -[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')] -param () - -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Storage Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'StorageDsc.Common' ` - -ChildPath 'StorageDsc.Common.psm1')) - -# Import the Storage Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'StorageDsc.ResourceHelper' ` - -ChildPath 'StorageDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xMountImage' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current mount state of the VHD or ISO file. - - .PARAMETER ImagePath - Specifies the path of the VHD or ISO file. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $ImagePath - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.GettingMountedImageMessage ` - -f $ImagePath) - ) -join '' ) - - $diskImage = Get-DiskImage -ImagePath $ImagePath - - if ($diskImage.Attached) - { - $returnValue = @{ - ImagePath = $ImagePath - DriveLetter = '' - StorageType = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.DiskImage.StorageType] $diskImage.StorageType - Access = 'ReadOnly' - Ensure = 'Present' - } - - # Determine the Disk Image Access mode - if ($diskImage.StorageType ` - -eq [Microsoft.PowerShell.Cmdletization.GeneratedTypes.DiskImage.StorageType]::ISO) - { - # Get the Drive Letter the ISO is mounted as - $volume = $diskImage | Get-Volume - $returnValue.Driveletter = $volume.DriveLetter - } - else - { - # Look up the disk and find out if it is readwrite. - $disk = Get-Disk -Number $diskImage.Number - if (-not $disk.IsReadOnly) - { - $returnValue.Access = 'ReadWrite' - } # if - - # Find the first 'Basic' partition - $partitions = $disk | Get-Partition - $partition = $partitions | Where-Object -Property Type -EQ 'Basic' - - # Find the first volume in the partition and get the mounted Drive Letter - $volumes = $partition | Get-Volume - $volume = $volumes | Select-Object -First 1 - - $returnValue.Driveletter = $volume.DriveLetter - } # if - } - else - { - $returnValue = @{ - ImagePath = $ImagePath - Ensure = 'Absent' - } - } # if - - $returnValue -} # Get-TargetResource - -<# - .SYNOPSIS - Mounts or dismounts the ISO or VHD. - - .PARAMETER ImagePath - Specifies the path of the VHD or ISO file. - - .PARAMETER DriveLetter - Specifies the drive letter to mount this VHD or ISO to. - - .PARAMETER StorageType - Specifies the storage type of a file. If the StorageType parameter is not specified, then the storage type is determined by file extension. - - .PARAMETER Access - Allows a VHD file to be mounted in read-only or read-write mode. ISO files are mounted in read-only mode regardless of what parameter value you provide. - - .PARAMETER Ensure - Determines whether the setting should be applied or removed. -#> -function Set-TargetResource -{ - # Should process is called in a helper functions but not directly in Set-TargetResource - [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '')] - [CmdletBinding(SupportsShouldProcess = $true)] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $ImagePath, - - [Parameter()] - [System.String] - $DriveLetter, - - [Parameter()] - [ValidateSet('ISO','VHD','VHDx','VHDSet')] - [System.String] - $StorageType, - - [Parameter()] - [ValidateSet('ReadOnly','ReadWrite')] - [System.String] - $Access, - - [Parameter()] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present' - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.SettingMountedImageMessage ` - -f $ImagePath) - ) -join '' ) - - # Check the parameter combo passed is valid, and throw if not. - $null = Test-ParameterValid @PSBoundParameters - - # Get the current mount state of this disk image - $currentState = Get-TargetResource -ImagePath $ImagePath - - # Remove Ensure from PSBoundParameters so it can be splatted - $null = $PSBoundParameters.Remove('Ensure') - - if ($Ensure -eq 'Present') - { - # Get the normalized DriveLetter (colon removed) - $normalizedDriveLetter = Assert-DriveLetterValid -DriveLetter $DriveLetter - - # The Disk Image should be mounted - $needsMount = $false - if ($currentState.Ensure -eq 'Absent') - { - $needsMount = $true - } - else - { - if ($currentState.DriveLetter -ne $normalizedDriveLetter) - { - # The disk image is mounted to the wrong DriveLetter -remount disk - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.DismountingImageMessage ` - -f $ImagePath,$currentState.DriveLetter) - ) -join '' ) - - Dismount-DiskImage -ImagePath $ImagePath - $needsMount = $true - } # if - } # if - - if ($currentState.StorageType -ne 'ISO') - { - if ($PSBoundParameters.ContainsKey('Access')) - { - # For VHD/VHDx/VHDSet disks check the access mode - if ($currentState.Access -ne $Access) - { - # The access mode is wrong -remount disk - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.DismountingImageMessage ` - -f $ImagePath,$currentState.DriveLetter) - ) -join '' ) - - Dismount-DiskImage -ImagePath $ImagePath - $needsMount = $true - } # if - } # if - } # if - - if ($needsMount) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.MountingImageMessage ` - -f $ImagePath,$normalizedDriveLetter) - ) -join '' ) - - Mount-DiskImageToLetter @PSBoundParameters - } # if - } - else - { - # The Disk Image should not be mounted - if ($currentState.Ensure -eq 'Present') - { - # It is mounted so dismount it - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.DismountingImageMessage ` - -f $ImagePath,$currentState.DriveLetter) - ) -join '' ) - - Dismount-DiskImage -ImagePath $ImagePath - } - } # if -} # Set-TargetResource - -<# - .SYNOPSIS - Tests if the ISO or VHD file mount is in the correct state. - - .PARAMETER ImagePath - Specifies the path of the VHD or ISO file. - - .PARAMETER DriveLetter - Specifies the drive letter to mount this VHD or ISO to. - - .PARAMETER StorageType - Specifies the storage type of a file. If the StorageType parameter is not specified, then the storage type is determined by file extension. - - .PARAMETER Access - Allows a VHD file to be mounted in read-only or read-write mode. ISO files are mounted in read-only mode regardless of what parameter value you provide. - - .PARAMETER Ensure - Determines whether the setting should be applied or removed. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $ImagePath, - - [Parameter()] - [System.String] - $DriveLetter, - - [Parameter()] - [ValidateSet('ISO','VHD','VHDx','VHDSet')] - [System.String] - $StorageType, - - [Parameter()] - [ValidateSet('ReadOnly','ReadWrite')] - [System.String] - $Access, - - [Parameter()] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present' - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.TestingMountedImageMessage ` - -f $DriveLetter) - ) -join '' ) - - # Check the parameter combo passed is valid, and throw if not. - $null = Test-ParameterValid @PSBoundParameters - - # Get the current mount state of this disk image - $currentState = Get-TargetResource -ImagePath $ImagePath - - if ($Ensure -eq 'Present') - { - # Get the normalized DriveLetter (colon removed) - $normalizedDriveLetter = Assert-DriveLetterValid -DriveLetter $DriveLetter - - # The Disk Image should be mounted - if ($currentState.Ensure -eq 'Absent') - { - # The disk image isn't mounted - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.ImageIsNotMountedButShouldBeMessage ` - -f $ImagePath,$normalizedDriveLetter) - ) -join '' ) - return $false - } # if - - if ($currentState.DriveLetter -ne $normalizedDriveLetter) - { - # The disk image is mounted to the wrong DriveLetter - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.ImageIsMountedToTheWrongDriveLetterMessage ` - -f $ImagePath,$currentState.DriveLetter,$normalizedDriveLetter) - ) -join '' ) - return $false - } # if - - if ($currentState.StorageType -ne 'ISO') - { - if ($PSBoundParameters.ContainsKey('Access')) - { - # For VHD/VHDx/VHDSet disks check the access mode - if ($currentState.Access -ne $Access) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.VHDAccessModeMismatchMessage ` - -f $ImagePath,$normalizedDriveLetter,$currentState.Access,$Access) - ) -join '' ) - return $false - } # if - } # if - } # if - - # The Disk Image is mounted to the expected Drive - nothing to change. - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.ImageIsMountedAndShouldBeMessage ` - -f $ImagePath,$normalizedDriveLetter) - ) -join '' ) - } - else - { - # The Disk Image should not be mounted - if ($currentState.Ensure -eq 'Present') - { - # The disk image is mounted - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.ImageIsMountedButShouldNotBeMessage ` - -f $ImagePath,$currentState.DriveLetter) - ) -join '' ) - return $false - } # if - - # The image is not mounted and should not be - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.ImageIsNotMountedAndShouldNotBeMessage ` - -f $ImagePath) - ) -join '' ) - } # if - - # No changes are needed - return $true -} # Test-TargetResource - -<# - .SYNOPSIS - Validates that the parameters passed are valid. If the parameter combination - is invalid then an exception will be thrown. Also validates the DriveLetter - value that is passed is valid. - - .PARAMETER ImagePath - Specifies the path of the VHD or ISO file. - - .PARAMETER DriveLetter - Specifies the drive letter to mount this VHD or ISO to. - - .PARAMETER StorageType - Specifies the storage type of a file. If the StorageType parameter is not specified, then the storage type is determined by file extension. - - .PARAMETER Access - Allows a VHD file to be mounted in read-only or read-write mode. ISO files are mounted in read-only mode regardless of what parameter value you provide. - - .PARAMETER Ensure - Determines whether the setting should be applied or removed. - - .OUTPUTS - If ensure is present then returns a normalized array of Drive Letters. -#> -function Test-ParameterValid -{ - [CmdletBinding()] - [OutputType([String[]])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $ImagePath, - - [Parameter()] - [System.String] - $DriveLetter, - - [Parameter()] - [ValidateSet('ISO','VHD','VHDx','VHDSet')] - [System.String] - $StorageType, - - [Parameter()] - [ValidateSet('ReadOnly','ReadWrite')] - [System.String] - $Access, - - [Parameter()] - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present' - ) - - if ($Ensure -eq 'Absent') - { - if ($PSBoundParameters.ContainsKey('DriveLetter')) - { - # The DriveLetter should not be set if Ensure is Absent - New-InvalidOperationException ` - -Message ($localizedData.InvalidParameterSpecifiedError -f ` - 'Absent','DriveLetter') - } # if - - if ($PSBoundParameters.ContainsKey('StorageType')) - { - # The StorageType should not be set if Ensure is Absent - New-InvalidOperationException ` - -Message ($localizedData.InvalidParameterSpecifiedError -f ` - 'Absent','StorageType') - } # if - - if ($PSBoundParameters.ContainsKey('Access')) - { - # The Access should not be set if Ensure is Absent - New-InvalidOperationException ` - -Message ($localizedData.InvalidParameterSpecifiedError -f ` - 'Absent','Access') - } # if - } - else - { - if (-not (Test-Path -Path $ImagePath)) - { - # The file specified by ImagePath should be found - New-InvalidOperationException ` - -Message ($localizedData.DiskImageFileNotFoundError -f ` - $ImagePath) - } # if - - if ($PSBoundParameters.ContainsKey('DriveLetter')) - { - # Test the Drive Letter to ensure it is valid - $normalizedDriveLetter = Assert-DriveLetterValid -DriveLetter $DriveLetter - } - else - { - # Drive letter is not specified but Ensure is present. - New-InvalidOperationException ` - -Message ($localizedData.InvalidParameterNotSpecifiedError -f ` - 'Present','DriveLetter') - } # if - } # if -} # Test-ParameterValid - -<# - .SYNOPSIS - Mounts a Disk Image to a specific Drive Letter. - - .PARAMETER ImagePath - Specifies the path of the VHD or ISO file. - - .PARAMETER DriveLetter - Specifies the drive letter to mount this VHD or ISO to. - - .PARAMETER StorageType - Specifies the storage type of a file. If the StorageType parameter is not specified, then the storage type is determined by file extension. - - .PARAMETER Access - Allows a VHD file to be mounted in read-only or read-write mode. ISO files are mounted in read-only mode regardless of what parameter value you provide. -#> -function Mount-DiskImageToLetter -{ - [CmdletBinding()] - [OutputType([String[]])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $ImagePath, - - [Parameter()] - [System.String] - $DriveLetter, - - [Parameter()] - [ValidateSet('ISO','VHD','VHDx','VHDSet')] - [System.String] - $StorageType, - - [Parameter()] - [ValidateSet('ReadOnly','ReadWrite')] - [System.String] - $Access - ) - - # Get the normalized DriveLetter (colon removed) - $normalizedDriveLetter = Assert-DriveLetterValid -DriveLetter $DriveLetter - - # Mount the Diskimage - $mountParams = @{ ImagePath = $ImagePath } - if ($PSBoundParameters.ContainsKey('Access')) - { - $mountParams += @{ Access = $Access } - } # if - $null = Mount-DiskImage @mountParams - - # Get the DiskImage object - $diskImage = Get-DiskImage -ImagePath $ImagePath - - # Determine the Storage Type expected - if (-not $PSBoundParameters.ContainsKey('StorageType')) - { - $StorageType = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.DiskImage.StorageType] $diskImage.StorageType - } # if - - # Different StorageType images require different methods of getting the Volume object. - if ($StorageType -eq [Microsoft.PowerShell.Cmdletization.GeneratedTypes.DiskImage.StorageType]::ISO) - { - # This is a ISO diskimage - $volume = $diskImage | Get-Volume - } - else - { - # This is a VHD/VHDx/VHDSet diskimage - $disk = Get-Disk -Number $diskImage.Number - - # Find the first 'Basic' partition to mount - $partitions = $disk | Get-Partition - $partition = $partitions | Where-Object -Property Type -EQ 'Basic' - - # Find the first volume in the partition and get the mounted Drive Letter - $volumes = $partition | Get-Volume - $volume = $volumes | Select-Object -First 1 - } # if - - $currentDriveLetter = $volume.DriveLetter - - # Verify that the drive letter assigned to the drive is the one needed. - if ($currentDriveLetter -ne $normalizedDriveLetter) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.ChangingImageDriveLetterMessage ` - -f $ImagePath,$currentDriveLetter,$normalizedDriveLetter) - ) -join '' ) - - <# - Use CIM to change the DriveLetter. - The Win32_Volume must be looked up using the ObjectId found in the Volume object - ObjectId is more verbose than DeviceId in Windows 10 Anniversary Edition, look for - DeviceId in the ObjectId string to match volumes. - #> - $cimVolume = Get-CimInstance -ClassName Win32_Volume | - Where-Object -FilterScript { $volume.ObjectId.IndexOf($_.DeviceId) -ne -1 } - - Set-CimInstance ` - -InputObject $cimVolume ` - -Property @{ DriveLetter = "$($normalizedDriveLetter):" } - } # if -} # Mount-DiskImageToLetter - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xMountImage/MSFT_xMountImage.schema.mof b/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xMountImage/MSFT_xMountImage.schema.mof deleted file mode 100644 index 84c67135..00000000 --- a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xMountImage/MSFT_xMountImage.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xMountImage")] -class MSFT_xMountImage : OMI_BaseResource -{ - [Key, Description("Specifies the path of the VHD or ISO file.")] String ImagePath; - [Write, Description("Specifies the drive letter to mount this VHD or ISO to.")] String DriveLetter; - [Write, Description("Specifies the storage type of a file. If the StorageType parameter is not specified, then the storage type is determined by file extension."), ValueMap{"ISO","VHD","VHDx","VHDSet"}, Values{"ISO","VHD","VHDx","VHDSet"}] String StorageType; - [Write, Description("Allows a VHD file to be mounted in read-only or read-write mode. ISO files are mounted in read-only mode regardless of what parameter value you provide."), ValueMap{"ReadOnly","ReadWrite"}, Values{"ReadOnly","ReadWrite"}] String Access; - [Write, Description("Determines whether the VHD or ISO should be mounted or not."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; - diff --git a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xMountImage/en-us/MSFT_xMountImage.strings.psd1 b/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xMountImage/en-us/MSFT_xMountImage.strings.psd1 deleted file mode 100644 index e5eb28e2..00000000 --- a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xMountImage/en-us/MSFT_xMountImage.strings.psd1 +++ /dev/null @@ -1,22 +0,0 @@ -ConvertFrom-StringData @' - GettingMountedImageMessage = Getting Mounted Drive for image file '{0}'. - - SettingMountedImageMessage = Setting Mounted Drive for image file '{0}'. - DismountingImageMessage = The image file '{0}' is being dismounted from drive '{1}'. - - TestingMountedImageMessage = Testing Mounted Drive for image file '{0}'. - ImageIsNotMountedButShouldBeMessage = The image file '{0}' is not mounted to drive '{1}' but should be. Change required. - ImageIsMountedToTheWrongDriveLetterMessage = The image file '{0}' is mounted as drive '{1}' but should be mounted as drive '{2}'. Change required. - VHDAccessModeMismatchMessage = The image file '{0}' is mounted to drive '{1}' but the access is '{2}' and should be '{3}'. Change required. - ImageIsMountedAndShouldBeMessage = The image file '{0}' is mounted to drive '{1}' and should be. - ImageIsMountedButShouldNotBeMessage = The image file '{0}' is mounted to drive '{1}' but should not be. Change required. - ImageIsNotMountedAndShouldNotBeMessage = The image file '{0}' is not mounted and should not be. - - TestingMountedImageError = Testing Mounted Drive for image file '{0}'. - InvalidParameterSpecifiedError = Ensure is '{0}' but '{1}' was specified. - InvalidParameterNotSpecifiedError = Ensure is '{0}' but '{1}' was not specified. - DiskImageFileNotFoundError = The image file '{0}' could not be found. - - MountingImageMessage = The image file '{0}' is being mounted as drive '{1}'. - ChangingImageDriveLetterMessage = The image file '{0}' mounted as drive '{1}' will be changed to '{2}'. -'@ diff --git a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForDisk/MSFT_xWaitForDisk.psm1 b/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForDisk/MSFT_xWaitForDisk.psm1 deleted file mode 100644 index ab8af9f1..00000000 --- a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForDisk/MSFT_xWaitForDisk.psm1 +++ /dev/null @@ -1,231 +0,0 @@ -# Suppressed as per PSSA Rule Severity guidelines for unit/integration tests: -# https://github.com/PowerShell/DscResources/blob/master/PSSARuleSeverities.md -[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')] -param () - -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Storage Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'StorageDsc.Common' ` - -ChildPath 'StorageDsc.Common.psm1')) - -# Import the Storage Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'StorageDsc.ResourceHelper' ` - -ChildPath 'StorageDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xWaitForDisk' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current state of the wait for disk resource. - - .PARAMETER DiskId - Specifies the disk identifier for the disk to wait for. - - .PARAMETER DiskIdType - Specifies the identifier type the DiskId contains. Defaults to Number. - - .PARAMETER RetryIntervalSec - Specifies the number of seconds to wait for the disk to become available. - - .PARAMETER RetryCount - The number of times to loop the retry interval while waiting for the disk. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $DiskId, - - [Parameter()] - [ValidateSet('Number','UniqueId')] - [System.String] - $DiskIdType = 'Number', - - [Parameter()] - [System.UInt32] - $RetryIntervalSec = 10, - - [Parameter()] - [System.UInt32] - $RetryCount = 60 - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.GettingWaitForDiskStatusMessage -f $DiskIdType,$DiskId) - ) -join '' ) - - $returnValue = @{ - DiskId = $DiskId - DiskIdType = $DiskIdType - RetryIntervalSec = $RetryIntervalSec - RetryCount = $RetryCount - } - return $returnValue -} # function Get-TargetResource - -<# - .SYNOPSIS - Sets the current state of the wait for disk resource. - - .PARAMETER DiskId - Specifies the disk identifier for the disk to wait for. - - .PARAMETER DiskIdType - Specifies the identifier type the DiskId contains. Defaults to Number. - - .PARAMETER RetryIntervalSec - Specifies the number of seconds to wait for the disk to become available. - - .PARAMETER RetryCount - The number of times to loop the retry interval while waiting for the disk. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $DiskId, - - [Parameter()] - [ValidateSet('Number','UniqueId')] - [System.String] - $DiskIdType = 'Number', - - [Parameter()] - [System.UInt32] - $RetryIntervalSec = 10, - - [Parameter()] - [System.UInt32] - $RetryCount = 60 - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.CheckingForDiskStatusMessage -f $DiskIdType,$DiskId) - ) -join '' ) - - $diskFound = $false - - $diskIdParameter = @{ - $DiskIdType = $DiskId - } - - for ($count = 0; $count -lt $RetryCount; $count++) - { - $disk = Get-Disk ` - @diskIdParameter ` - -ErrorAction SilentlyContinue - if ($disk) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.DiskFoundMessage -f $DiskIdType,$DiskId,$disk.FriendlyName) - ) -join '' ) - - $diskFound = $true - break - } - else - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.DiskNotFoundMessage -f $DiskIdType,$DiskId,$RetryIntervalSec) - ) -join '' ) - - Start-Sleep -Seconds $RetryIntervalSec - } # if - } # for - - if (-not $diskFound) - { - New-InvalidOperationException ` - -Message $($localizedData.DiskNotFoundAfterError -f $DiskIdType,$DiskId,$RetryCount) - } # if -} # function Set-TargetResource - -<# - .SYNOPSIS - Tests the current state of the wait for disk resource. - - .PARAMETER DiskId - Specifies the disk identifier for the disk to wait for. - - .PARAMETER DiskIdType - Specifies the identifier type the DiskId contains. Defaults to Number. - - .PARAMETER RetryIntervalSec - Specifies the number of seconds to wait for the disk to become available. - - .PARAMETER RetryCount - The number of times to loop the retry interval while waiting for the disk. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $DiskId, - - [Parameter()] - [ValidateSet('Number','UniqueId')] - [System.String] - $DiskIdType = 'Number', - - [Parameter()] - [System.UInt32] - $RetryIntervalSec = 10, - - [Parameter()] - [System.UInt32] - $RetryCount = 60 - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.CheckingForDiskStatusMessage -f $DiskIdType,$DiskId) - ) -join '' ) - - $diskIdParameter = @{ - $DiskIdType = $DiskId - } - - $disk = Get-Disk ` - @diskIdParameter ` - -ErrorAction SilentlyContinue - - if ($disk) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.DiskFoundMessage -f $DiskIdType,$DiskId,$disk.FriendlyName) - ) -join '' ) - - return $true - } - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.DiskNotFoundMessage -f $DiskIdType,$DiskId) - ) -join '' ) - - return $false -} # function Test-TargetResource - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForDisk/MSFT_xWaitForDisk.schema.mof b/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForDisk/MSFT_xWaitForDisk.schema.mof deleted file mode 100644 index 0d805552..00000000 --- a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForDisk/MSFT_xWaitForDisk.schema.mof +++ /dev/null @@ -1,9 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xWaitForDisk")] -class MSFT_xWaitForDisk : OMI_BaseResource -{ - [Key, Description("Specifies the disk identifier for the disk to wait for.")] String DiskId; - [Write, Description("Specifies the identifier type the DiskId contains. Defaults to Number."), ValueMap{"Number","UniqueId"}, Values{"Number","UniqueId"}] String DiskIdType; - [Write, Description("Specifies the number of seconds to wait for the disk to become available.")] Uint32 RetryIntervalSec; - [Write, Description("The number of times to loop the retry interval while waiting for the disk.")] Uint32 RetryCount; -}; diff --git a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForDisk/en-us/MSFT_xWaitForDisk.strings.psd1 b/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForDisk/en-us/MSFT_xWaitForDisk.strings.psd1 deleted file mode 100644 index 67cafd58..00000000 --- a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForDisk/en-us/MSFT_xWaitForDisk.strings.psd1 +++ /dev/null @@ -1,12 +0,0 @@ -ConvertFrom-StringData @' - GettingWaitForDiskStatusMessage = Getting Wait for Disk status for disk with {0} '{1}'. - - SettingWaitForDiskStatusMessage = Waiting for disk status on disk with {0} '{1}'. - CheckingForDiskStatusMessage = Checking for disk with {0} '{1}'. - DiskFoundMessage = Found disk with {0} '{1}' named '{2}'. - DiskNotFoundRetryingMessage = Disk with {0} '{1}' not found, retrying in {2} seconds. - DiskNotFoundAfterError = Disk with {0} '{1}' not found after {2} counts. - - TestingWaitForDiskStatusMessage = Testing Wait for Disk status on disk with {0} '{1}'. - DiskNotFoundMessage = Disk with {0} '{1}' not found. -'@ diff --git a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForVolume/MSFT_xWaitForVolume.psm1 b/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForVolume/MSFT_xWaitForVolume.psm1 deleted file mode 100644 index eafb9d3b..00000000 --- a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForVolume/MSFT_xWaitForVolume.psm1 +++ /dev/null @@ -1,210 +0,0 @@ -# Suppressed as per PSSA Rule Severity guidelines for unit/integration tests: -# https://github.com/PowerShell/DscResources/blob/master/PSSARuleSeverities.md -[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')] -param () - -$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules' - -# Import the Storage Common Modules -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'StorageDsc.Common' ` - -ChildPath 'StorageDsc.Common.psm1')) - -# Import the Storage Resource Helper Module -Import-Module -Name (Join-Path -Path $modulePath ` - -ChildPath (Join-Path -Path 'StorageDsc.ResourceHelper' ` - -ChildPath 'StorageDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'MSFT_xWaitForVolume' ` - -ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path) - -<# - .SYNOPSIS - Returns the current state of the wait for drive resource. - - .PARAMETER DriveLetter - Specifies the name of the drive to wait for. - - .PARAMETER RetryIntervalSec - Specifies the number of seconds to wait for the drive to become available. - - .PARAMETER RetryCount - The number of times to loop the retry interval while waiting for the drive. -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [String] - $DriveLetter, - - [Parameter()] - [UInt32] - $RetryIntervalSec = 10, - - [Parameter()] - [UInt32] - $RetryCount = 60 - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.GettingWaitForVolumeStatusMessage -f $DriveLetter) - ) -join '' ) - - # Validate the DriveLetter parameter - $DriveLetter = Assert-DriveLetterValid -DriveLetter $DriveLetter - - $returnValue = @{ - DriveLetter = $DriveLetter - RetryIntervalSec = $RetryIntervalSec - RetryCount = $RetryCount - } - return $returnValue -} # function Get-TargetResource - -<# - .SYNOPSIS - Sets the current state of the wait for drive resource. - - .PARAMETER DriveLetter - Specifies the name of the drive to wait for. - - .PARAMETER RetryIntervalSec - Specifies the number of seconds to wait for the drive to become available. - - .PARAMETER RetryCount - The number of times to loop the retry interval while waiting for the drive. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] - $DriveLetter, - - [Parameter()] - [UInt32] - $RetryIntervalSec = 10, - - [Parameter()] - [UInt32] - $RetryCount = 60 - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.CheckingForVolumeStatusMessage -f $DriveLetter) - ) -join '' ) - - # Validate the DriveLetter parameter - $DriveLetter = Assert-DriveLetterValid -DriveLetter $DriveLetter - - $volumeFound = $false - - for ($count = 0; $count -lt $RetryCount; $count++) - { - $volume = Get-Volume -DriveLetter $DriveLetter -ErrorAction SilentlyContinue - if ($volume) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.VolumeFoundMessage -f $DriveLetter) - ) -join '' ) - - $volumeFound = $true - break - } - else - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.VolumeNotFoundMessage -f $DriveLetter,$RetryIntervalSec) - ) -join '' ) - - Start-Sleep -Seconds $RetryIntervalSec - - # This command forces a refresh of the PS Drive subsystem. - # So triggers any "missing" drives to show up. - $null = Get-PSDrive - } # if - } # for - - if (-not $volumeFound) - { - New-InvalidOperationException ` - -Message $($localizedData.VolumeNotFoundAfterError -f $DriveLetter,$RetryCount) - } # if -} # function Set-TargetResource - -<# - .SYNOPSIS - Tests the current state of the wait for drive resource. - - .PARAMETER DriveLetter - Specifies the name of the drive to wait for. - - .PARAMETER RetryIntervalSec - Specifies the number of seconds to wait for the drive to become available. - - .PARAMETER RetryCount - The number of times to loop the retry interval while waiting for the drive. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [String] - $DriveLetter, - - [Parameter()] - [UInt32] - $RetryIntervalSec = 10, - - [Parameter()] - [UInt32] - $RetryCount = 60 - ) - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.TestingWaitForVolumeStatusMessage -f $DriveLetter) - ) -join '' ) - - # Validate the DriveLetter parameter - $DriveLetter = Assert-DriveLetterValid -DriveLetter $DriveLetter - - # This command forces a refresh of the PS Drive subsystem. - # So triggers any "missing" drives to show up. - $null = Get-PSDrive - - $volume = Get-Volume -DriveLetter $DriveLetter -ErrorAction SilentlyContinue - if ($volume) - { - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.VolumeFoundMessage -f $DriveLetter) - ) -join '' ) - - return $true - } - - Write-Verbose -Message ( @( - "$($MyInvocation.MyCommand): " - $($localizedData.VolumeNotFoundMessage -f $DriveLetter) - ) -join '' ) - - return $false -} # function Test-TargetResource - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForVolume/MSFT_xWaitForVolume.schema.mof b/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForVolume/MSFT_xWaitForVolume.schema.mof deleted file mode 100644 index 5c2fce88..00000000 --- a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForVolume/MSFT_xWaitForVolume.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xWaitForVolume")] -class MSFT_xWaitForVolume : OMI_BaseResource -{ - [Key, Description("Specifies the drive letter of the volume to wait for.")] String DriveLetter; - [Write, Description("Specifies the number of seconds to wait for the volume to become available.")] Uint32 RetryIntervalSec; - [Write, Description("The number of times to loop the retry interval while waiting for the volume.")] Uint32 RetryCount; -}; diff --git a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForVolume/en-us/MSFT_xWaitForVolume.strings.psd1 b/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForVolume/en-us/MSFT_xWaitForVolume.strings.psd1 deleted file mode 100644 index 17115e90..00000000 --- a/lib/puppet_x/dsc_resources/xStorage/DSCResources/MSFT_xWaitForVolume/en-us/MSFT_xWaitForVolume.strings.psd1 +++ /dev/null @@ -1,12 +0,0 @@ -ConvertFrom-StringData @' - GettingWaitForVolumeStatusMessage = Getting Wait for Volume status for volume '{0}'. - - SettingWaitForVolumeStatusMessage = Waiting for Volume status on volume '{0}'. - CheckingForVolumeStatusMessage = Checking for volume '{0}'. - VolumeFoundMessage = Found volume '{0}'. - VolumeNotFoundRetryingMessage = Volume '{0}' not found, retrying in {1} seconds. - VolumeNotFoundAfterError = Volume '{0}' not found after {1} counts. - - TestingWaitForVolumeStatusMessage = Teting Wait for Volume status on volume '{0}'. - VolumeNotFoundMessage = Volume '{0}' not found. -'@ diff --git a/lib/puppet_x/dsc_resources/xStorage/LICENSE b/lib/puppet_x/dsc_resources/xStorage/LICENSE deleted file mode 100644 index 5f178f93..00000000 --- a/lib/puppet_x/dsc_resources/xStorage/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Michael Greene - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/lib/puppet_x/dsc_resources/xStorage/Modules/StorageDsc.Common/StorageDsc.Common.psm1 b/lib/puppet_x/dsc_resources/xStorage/Modules/StorageDsc.Common/StorageDsc.Common.psm1 deleted file mode 100644 index 3b29f1d2..00000000 --- a/lib/puppet_x/dsc_resources/xStorage/Modules/StorageDsc.Common/StorageDsc.Common.psm1 +++ /dev/null @@ -1,107 +0,0 @@ -# Import the Networking Resource Helper Module -Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) ` - -ChildPath (Join-Path -Path 'StorageDsc.ResourceHelper' ` - -ChildPath 'StorageDsc.ResourceHelper.psm1')) - -# Import Localization Strings -$localizedData = Get-LocalizedData ` - -ResourceName 'StorageDsc.Common' ` - -ResourcePath $PSScriptRoot - -<# - .SYNOPSIS - Validates a Drive Letter, removing or adding the trailing colon if required. - - .PARAMETER DriveLetter - The Drive Letter string to validate. - - .PARAMETER Colon - Will ensure the returned string will include or exclude a colon. -#> -function Assert-DriveLetterValid -{ - [CmdletBinding()] - [OutputType([String])] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [System.String] - $DriveLetter, - - [Switch] - $Colon - ) - - $Matches = @([regex]::matches($DriveLetter, '^([A-Za-z]):?$', 'IgnoreCase')) - if (-not $Matches) - { - # DriveLetter format is invalid - New-InvalidArgumentException ` - -Message $($LocalizedData.InvalidDriveLetterFormatError -f $DriveLetter) ` - -ArgumentName 'DriveLetter' - } - # This is the drive letter without a colon - $DriveLetter = $Matches.Groups[1].Value - if ($Colon) - { - $DriveLetter = $DriveLetter + ':' - } # if - return $DriveLetter -} # end function Assert-DriveLetterValid - -<# - .SYNOPSIS - Validates an Access Path, removing or adding the trailing slash if required. - If the Access Path does not exist or is not a folder then an exception will - be thrown. - - .PARAMETER AccessPath - The Access Path string to validate. - - .PARAMETER Slash - Will ensure the returned path will include or exclude a slash. -#> -function Assert-AccessPathValid -{ - [CmdletBinding()] - [OutputType([String])] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [System.String] - $AccessPath, - - [Switch] - $Slash - ) - - if (-not (Test-Path -Path $AccessPath -PathType Container)) - { - # AccessPath is invalid - New-InvalidArgumentException ` - -Message $($LocalizedData.InvalidAccessPathError -f $AccessPath) ` - -ArgumentName 'AccessPath' - } # if - - # Remove or Add the trailing slash - if($AccessPath.EndsWith('\')) - { - if (-not $Slash) - { - $AccessPath = $AccessPath.TrimEnd('\') - } # if - } - else - { - if ($Slash) - { - $AccessPath = "$AccessPath\" - } # if - } # if - - return $AccessPath -} # end function Assert-AccessPathValid - -Export-ModuleMember -Function @( 'Assert-DriveLetterValid', 'Assert-AccessPathValid' ) diff --git a/lib/puppet_x/dsc_resources/xStorage/Modules/StorageDsc.Common/en-us/StorageDsc.Common.strings.psd1 b/lib/puppet_x/dsc_resources/xStorage/Modules/StorageDsc.Common/en-us/StorageDsc.Common.strings.psd1 deleted file mode 100644 index 8d5e1305..00000000 --- a/lib/puppet_x/dsc_resources/xStorage/Modules/StorageDsc.Common/en-us/StorageDsc.Common.strings.psd1 +++ /dev/null @@ -1,4 +0,0 @@ -ConvertFrom-StringData @' - InvalidDriveLetterFormatError = Drive Letter format '{0}' is not valid. - InvalidAccessPathError = Access Path '{0}' is not found. -'@ diff --git a/lib/puppet_x/dsc_resources/xStorage/Modules/StorageDsc.ResourceHelper/StorageDsc.ResourceHelper.psm1 b/lib/puppet_x/dsc_resources/xStorage/Modules/StorageDsc.ResourceHelper/StorageDsc.ResourceHelper.psm1 deleted file mode 100644 index f4d2fe68..00000000 --- a/lib/puppet_x/dsc_resources/xStorage/Modules/StorageDsc.ResourceHelper/StorageDsc.ResourceHelper.psm1 +++ /dev/null @@ -1,170 +0,0 @@ -<# - .SYNOPSIS - Tests if the current machine is a Nano server. -#> -function Test-IsNanoServer -{ - if (Test-Command -Name Get-ComputerInfo) - { - $computerInfo = Get-ComputerInfo - - if ("Server" -eq $computerInfo.OsProductType ` - -and "NanoServer" -eq $computerInfo.OsServerLevel) - { - return $true - } - } - - return $false -} - -<# - .SYNOPSIS - Tests if the the specified command is found. -#> -function Test-Command -{ - param - ( - [String] $Name - ) - - return ($null -ne (Get-Command -Name $Name -ErrorAction Continue 2> $null)) -} - -<# - .SYNOPSIS - Creates and throws an invalid argument exception - - .PARAMETER Message - The message explaining why this error is being thrown - - .PARAMETER ArgumentName - The name of the invalid argument that is causing this error to be thrown -#> -function New-InvalidArgumentException -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Message, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ArgumentName - ) - - $argumentException = New-Object -TypeName 'ArgumentException' -ArgumentList @( $Message, - $ArgumentName ) - $newObjectParams = @{ - TypeName = 'System.Management.Automation.ErrorRecord' - ArgumentList = @( $argumentException, $ArgumentName, 'InvalidArgument', $null ) - } - $errorRecord = New-Object @newObjectParams - - throw $errorRecord -} - -<# - .SYNOPSIS - Creates and throws an invalid operation exception - - .PARAMETER Message - The message explaining why this error is being thrown - - .PARAMETER ErrorRecord - The error record containing the exception that is causing this terminating error -#> -function New-InvalidOperationException -{ - [CmdletBinding()] - param - ( - [ValidateNotNullOrEmpty()] - [String] - $Message, - - [ValidateNotNull()] - [System.Management.Automation.ErrorRecord] - $ErrorRecord - ) - - if ($null -eq $Message) - { - $invalidOperationException = New-Object -TypeName 'InvalidOperationException' - } - elseif ($null -eq $ErrorRecord) - { - $invalidOperationException = - New-Object -TypeName 'InvalidOperationException' -ArgumentList @( $Message ) - } - else - { - $invalidOperationException = - New-Object -TypeName 'InvalidOperationException' -ArgumentList @( $Message, - $ErrorRecord.Exception ) - } - - $newObjectParams = @{ - TypeName = 'System.Management.Automation.ErrorRecord' - ArgumentList = @( $invalidOperationException.ToString(), 'MachineStateIncorrect', - 'InvalidOperation', $null ) - } - $errorRecordToThrow = New-Object @newObjectParams - throw $errorRecordToThrow -} - -<# - .SYNOPSIS - Retrieves the localized string data based on the machine's culture. - Falls back to en-US strings if the machine's culture is not supported. - - .PARAMETER ResourceName - The name of the resource as it appears before '.strings.psd1' of the localized string file. - - For example: - For WindowsOptionalFeature: MSFT_xWindowsOptionalFeature - For Service: MSFT_xServiceResource - For Registry: MSFT_xRegistryResource - - .PARAMETER ResourcePath - The path the resource file is located in. -#> -function Get-LocalizedData -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ResourceName, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $ResourcePath - ) - - $localizedStringFileLocation = Join-Path -Path $ResourcePath -ChildPath $PSUICulture - - if (-not (Test-Path -Path $localizedStringFileLocation)) - { - # Fallback to en-US - $localizedStringFileLocation = Join-Path -Path $ResourcePath -ChildPath 'en-US' - } - - Import-LocalizedData ` - -BindingVariable 'localizedData' ` - -FileName "$ResourceName.strings.psd1" ` - -BaseDirectory $localizedStringFileLocation - - return $localizedData -} - -Export-ModuleMember -Function @( 'Test-IsNanoServer', 'New-InvalidArgumentException', - 'New-InvalidOperationException', 'Get-LocalizedData' ) diff --git a/lib/puppet_x/dsc_resources/xStorage/xStorage.psd1 b/lib/puppet_x/dsc_resources/xStorage/xStorage.psd1 deleted file mode 100644 index d9a63e9d..00000000 --- a/lib/puppet_x/dsc_resources/xStorage/xStorage.psd1 +++ /dev/null @@ -1,137 +0,0 @@ -# -# Module manifest for module 'xStorage' -# -# Generated on: 6/14/2015 -# - -@{ - -# Script module or binary module file associated with this manifest. -# RootModule = '' - -# Version number of this module. -ModuleVersion = '3.2.0.0' - -# ID used to uniquely identify this module -GUID = '00d73ca1-58b5-46b7-ac1a-5bfcf5814faf' - -# Author of this module -Author = 'PowerShell DSC' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '2015' - -# Description of the functionality provided by this module -Description = 'This module contains all resources related to the PowerShell Storage module, or pertaining to disk management.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Name of the Windows PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the Windows PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module -# DotNetFrameworkVersion = '' - -# Minimum version of the common language runtime (CLR) required by this module -# CLRVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -# RequiredModules = @() - -# Assemblies that must be loaded prior to importing this module -# RequiredAssemblies = @() - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -# FormatsToProcess = @() - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -# NestedModules = @() - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Variables to export from this module -VariablesToExport = '*' - -# Aliases to export from this module -AliasesToExport = '*' - -# DSC resources to export from this module -# DscResourcesToExport = @() - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xStorage/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xStorage' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '- xDisk: - - Fix error message when new partition does not become writable before timeout. - - Removed unneeded timeout initialization code. -- xDiskAccessPath: - - Fix error message when new partition does not become writable before timeout. - - Removed unneeded timeout initialization code. - - Fix error when used on Windows Server 2012 R2 - See [Issue 102](https://github.com/PowerShell/xStorage/issues/102). -- Added the VS Code PowerShell extension formatting settings that cause PowerShell - files to be formatted as per the DSC Resource kit style guidelines. -- Removed requirement on Hyper-V PowerShell module to execute integration tests. -- xMountImage: - - Fix error when mounting VHD on Windows Server 2012 R2 - See [Issue 105](https://github.com/PowerShell/xStorage/issues/105) - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - -} - - - - - - - diff --git a/lib/puppet_x/dsc_resources/xTimeZone/DSCResources/SetTimeZone.cs b/lib/puppet_x/dsc_resources/xTimeZone/DSCResources/SetTimeZone.cs deleted file mode 100644 index 8a71c3c6..00000000 --- a/lib/puppet_x/dsc_resources/xTimeZone/DSCResources/SetTimeZone.cs +++ /dev/null @@ -1,268 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Security; -using System.Runtime.InteropServices; -using Microsoft.Win32; -namespace Microsoft.PowerShell.xTimeZone -{ - [StructLayoutAttribute(LayoutKind.Sequential)] - public struct SystemTime - { - [MarshalAs(UnmanagedType.U2)] - public short Year; - [MarshalAs(UnmanagedType.U2)] - public short Month; - [MarshalAs(UnmanagedType.U2)] - public short DayOfWeek; - [MarshalAs(UnmanagedType.U2)] - public short Day; - [MarshalAs(UnmanagedType.U2)] - public short Hour; - [MarshalAs(UnmanagedType.U2)] - public short Minute; - [MarshalAs(UnmanagedType.U2)] - public short Second; - [MarshalAs(UnmanagedType.U2)] - public short Milliseconds; - } - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] - public struct TimeZoneInformation - { - [MarshalAs(UnmanagedType.I4)] - public int Bias; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x20)] - public string StandardName; - public SystemTime StandardDate; - [MarshalAs(UnmanagedType.I4)] - public int StandardBias; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x20)] - public string DaylightName; - public SystemTime DaylightDate; - [MarshalAs(UnmanagedType.I4)] - public int DaylightBias; - } - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] - public struct DynamicTimeZoneInformation - { - public int Bias; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] - public string StandardName; - public SystemTime StandardDate; - public int StandardBias; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] - public string DaylightName; - public SystemTime DaylightDate; - public int DaylightBias; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] - public string TimeZoneKeyName; - [MarshalAs(UnmanagedType.U1)] - public bool DynamicDaylightTimeDisabled; - } - [StructLayout(LayoutKind.Sequential)] - public struct RegistryTimeZoneInformation - { - [MarshalAs(UnmanagedType.I4)] - public int Bias; - [MarshalAs(UnmanagedType.I4)] - public int StandardBias; - [MarshalAs(UnmanagedType.I4)] - public int DaylightBias; - public SystemTime StandardDate; - public SystemTime DaylightDate; - public RegistryTimeZoneInformation(TimeZoneInformation tzi) - { - this.Bias = tzi.Bias; - this.StandardDate = tzi.StandardDate; - this.StandardBias = tzi.StandardBias; - this.DaylightDate = tzi.DaylightDate; - this.DaylightBias = tzi.DaylightBias; - } - public RegistryTimeZoneInformation(byte[] bytes) - { - if ((bytes == null) || (bytes.Length != 0x2c)) - { - throw new ArgumentException("Argument_InvalidREG_TZI_FORMAT"); - } - this.Bias = BitConverter.ToInt32(bytes, 0); - this.StandardBias = BitConverter.ToInt32(bytes, 4); - this.DaylightBias = BitConverter.ToInt32(bytes, 8); - this.StandardDate.Year = BitConverter.ToInt16(bytes, 12); - this.StandardDate.Month = BitConverter.ToInt16(bytes, 14); - this.StandardDate.DayOfWeek = BitConverter.ToInt16(bytes, 0x10); - this.StandardDate.Day = BitConverter.ToInt16(bytes, 0x12); - this.StandardDate.Hour = BitConverter.ToInt16(bytes, 20); - this.StandardDate.Minute = BitConverter.ToInt16(bytes, 0x16); - this.StandardDate.Second = BitConverter.ToInt16(bytes, 0x18); - this.StandardDate.Milliseconds = BitConverter.ToInt16(bytes, 0x1a); - this.DaylightDate.Year = BitConverter.ToInt16(bytes, 0x1c); - this.DaylightDate.Month = BitConverter.ToInt16(bytes, 30); - this.DaylightDate.DayOfWeek = BitConverter.ToInt16(bytes, 0x20); - this.DaylightDate.Day = BitConverter.ToInt16(bytes, 0x22); - this.DaylightDate.Hour = BitConverter.ToInt16(bytes, 0x24); - this.DaylightDate.Minute = BitConverter.ToInt16(bytes, 0x26); - this.DaylightDate.Second = BitConverter.ToInt16(bytes, 40); - this.DaylightDate.Milliseconds = BitConverter.ToInt16(bytes, 0x2a); - } - } - public class TokenPrivilegesAccess - { - [DllImport("advapi32.dll", CharSet = CharSet.Auto)] - public static extern int OpenProcessToken(int ProcessHandle, int DesiredAccess, - ref int tokenhandle); - [DllImport("kernel32.dll", CharSet = CharSet.Auto)] - public static extern int GetCurrentProcess(); - [DllImport("advapi32.dll", CharSet = CharSet.Auto)] - public static extern int LookupPrivilegeValue(string lpsystemname, string lpname, - [MarshalAs(UnmanagedType.Struct)] ref LUID lpLuid); - [DllImport("advapi32.dll", CharSet = CharSet.Auto)] - public static extern int AdjustTokenPrivileges(int tokenhandle, int disableprivs, - [MarshalAs(UnmanagedType.Struct)]ref TOKEN_PRIVILEGE Newstate, int bufferlength, - int PreivousState, int Returnlength); - public const int TOKEN_ASSIGN_PRIMARY = 0x00000001; - public const int TOKEN_DUPLICATE = 0x00000002; - public const int TOKEN_IMPERSONATE = 0x00000004; - public const int TOKEN_QUERY = 0x00000008; - public const int TOKEN_QUERY_SOURCE = 0x00000010; - public const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; - public const int TOKEN_ADJUST_GROUPS = 0x00000040; - public const int TOKEN_ADJUST_DEFAULT = 0x00000080; - public const UInt32 SE_PRIVILEGE_ENABLED_BY_DEFAULT = 0x00000001; - public const UInt32 SE_PRIVILEGE_ENABLED = 0x00000002; - public const UInt32 SE_PRIVILEGE_REMOVED = 0x00000004; - public const UInt32 SE_PRIVILEGE_USED_FOR_ACCESS = 0x80000000; - public static bool EnablePrivilege(string privilege) - { - try - { - int token = 0; - int retVal = 0; - TOKEN_PRIVILEGE TP = new TOKEN_PRIVILEGE(); - LUID LD = new LUID(); - retVal = OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref token); - retVal = LookupPrivilegeValue(null, privilege, ref LD); - TP.PrivilegeCount = 1; - var luidAndAtt = new LUID_AND_ATTRIBUTES(); - luidAndAtt.Attributes = SE_PRIVILEGE_ENABLED; - luidAndAtt.Luid = LD; - TP.Privilege = luidAndAtt; - retVal = AdjustTokenPrivileges(token, 0, ref TP, 1024, 0, 0); - return true; - } - catch - { - return false; - } - } - public static bool DisablePrivilege(string privilege) - { - try - { - int token = 0; - int retVal = 0; - TOKEN_PRIVILEGE TP = new TOKEN_PRIVILEGE(); - LUID LD = new LUID(); - retVal = OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref token); - retVal = LookupPrivilegeValue(null, privilege, ref LD); - TP.PrivilegeCount = 1; - // TP.Attributes should be none (not set) to disable privilege - var luidAndAtt = new LUID_AND_ATTRIBUTES(); - luidAndAtt.Luid = LD; - TP.Privilege = luidAndAtt; - retVal = AdjustTokenPrivileges(token, 0, ref TP, 1024, 0, 0); - return true; - } - catch - { - return false; - } - } - } - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] - public struct LUID - { - internal uint LowPart; - internal uint HighPart; - } - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] - public struct LUID_AND_ATTRIBUTES - { - internal LUID Luid; - internal uint Attributes; - } - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] - public struct TOKEN_PRIVILEGE - { - internal uint PrivilegeCount; - internal LUID_AND_ATTRIBUTES Privilege; - } - public class TimeZone - { - public const int ERROR_ACCESS_DENIED = 0x005; - public const int CORSEC_E_MISSING_STRONGNAME = -2146233317; - [DllImport("kernel32.dll", CharSet = CharSet.Auto)] - private static extern bool SetTimeZoneInformation([In] ref TimeZoneInformation lpTimeZoneInformation); - [DllImport("kernel32.dll", CharSet = CharSet.Auto)] - private static extern bool SetDynamicTimeZoneInformation([In] ref DynamicTimeZoneInformation lpTimeZoneInformation); - public static void Set(string name) - { - var regTimeZones = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones"); - // Print out all the possible time-zones. - //foreach(var subKey in regTimeZones.GetSubKeyNames()) - //{ - // Console.WriteLine(subKey); - //} - var subKey = regTimeZones.GetSubKeyNames().Where(s => s == name).First(); - string daylightName = (string)regTimeZones.OpenSubKey(subKey).GetValue("Dlt"); - string standardName = (string)regTimeZones.OpenSubKey(subKey).GetValue("Std"); - byte[] tzi = (byte[])regTimeZones.OpenSubKey(subKey).GetValue("TZI"); - var regTzi = new RegistryTimeZoneInformation(tzi); - TokenPrivilegesAccess.EnablePrivilege("SeTimeZonePrivilege"); - bool didSet; - if (Environment.OSVersion.Version.Major < 6) - { - var tz = new TimeZoneInformation(); - tz.Bias = regTzi.Bias; - tz.DaylightBias = regTzi.DaylightBias; - tz.StandardBias = regTzi.StandardBias; - tz.DaylightDate = regTzi.DaylightDate; - tz.StandardDate = regTzi.StandardDate; - tz.DaylightName = daylightName; - tz.StandardName = standardName; - didSet = TimeZone.SetTimeZoneInformation(ref tz); - } - else - { - var tz = new DynamicTimeZoneInformation(); - tz.Bias = regTzi.Bias; - tz.DaylightBias = regTzi.DaylightBias; - tz.StandardBias = regTzi.StandardBias; - tz.DaylightDate = regTzi.DaylightDate; - tz.StandardDate = regTzi.StandardDate; - tz.DaylightName = daylightName; - tz.StandardName = standardName; - tz.TimeZoneKeyName = subKey; - tz.DynamicDaylightTimeDisabled = false; - didSet = TimeZone.SetDynamicTimeZoneInformation(ref tz); - } - int lastError = Marshal.GetLastWin32Error(); - TokenPrivilegesAccess.DisablePrivilege("SeTimeZonePrivilege"); - if (! didSet) - { - if (lastError == TimeZone.ERROR_ACCESS_DENIED) - { - throw new SecurityException("Access denied changing System Timezone."); - } - else if (lastError == TimeZone.CORSEC_E_MISSING_STRONGNAME) - { - throw new SystemException("Application is not signed."); - } - else - { - throw new SystemException("Win32Error: " + lastError + "\nHRESULT: " + Marshal.GetHRForLastWin32Error()); - } - } - } - } -} diff --git a/lib/puppet_x/dsc_resources/xTimeZone/DSCResources/TimezoneHelper.psm1 b/lib/puppet_x/dsc_resources/xTimeZone/DSCResources/TimezoneHelper.psm1 deleted file mode 100644 index db060482..00000000 --- a/lib/puppet_x/dsc_resources/xTimeZone/DSCResources/TimezoneHelper.psm1 +++ /dev/null @@ -1,189 +0,0 @@ -#region localizeddata -if (Test-Path "${PSScriptRoot}\${PSUICulture}") -{ - Import-LocalizedData ` - -BindingVariable LocalizedData ` - -Filename TimezoneHelper.psd1 ` - -BaseDirectory "${PSScriptRoot}\${PSUICulture}" -} -else -{ - #fallback to en-US - Import-LocalizedData ` - -BindingVariable LocalizedData ` - -Filename TimezoneHelper.psd1 ` - -BaseDirectory "${PSScriptRoot}\en-US" -} -#endregion - -<# - .SYNOPSIS - Internal function to throw terminating error with specified errroCategory, errorId and errorMessage -#> -function New-TerminatingError -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory)] - [String] $ErrorId, - - [Parameter(Mandatory)] - [String] $ErrorMessage, - - [Parameter(Mandatory)] - [System.Management.Automation.ErrorCategory] $ErrorCategory - ) - - $exception = New-Object System.InvalidOperationException $errorMessage - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - throw $errorRecord -} # function New-TerminatingError - -<# - .SYNOPSIS - Get the of the current timezone Id. - -#> -function Get-TimeZoneId -{ - [CmdletBinding()] - param() - - if (Test-Command -Name 'Get-Timezone' -Module 'Microsoft.PowerShell.Management') - { - Write-Verbose -Message ($LocalizedData.GettingTimezoneMessage -f 'Cmdlets') - - $Timezone = (Get-Timezone).StandardName - } - else - { - Write-Verbose -Message ($LocalizedData.GettingTimezoneMessage -f 'CIM') - - $TimeZone = (Get-CimInstance ` - -ClassName WIN32_Timezone ` - -Namespace root\cimv2).StandardName - } - - Write-Verbose -Message ($LocalizedData.CurrentTimezoneMessage ` - -f $Timezone) - - $timeZoneInfo = [System.TimeZoneInfo]::GetSystemTimeZones() | - Where-Object StandardName -eq $TimeZone - - return $timeZoneInfo.Id -} # function Get-TimeZoneId - -<# - .SYNOPSIS - Compare a timezone Id with the current timezone Id -#> -function Test-TimeZoneId -{ - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [System.String] - $TimeZoneId - ) - # Test Expected is same as Current - $currentTimeZoneId = Get-TimeZoneId - - return $TimeZoneId -eq $currentTimeZoneId -} # function Test-TimeZoneId - -<# - .SYNOPSIS - Sets the current timezone using a timezone Id -#> -function Set-TimeZoneId -{ - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [System.String] - $TimeZoneId - ) - - if (Test-Command -Name 'Set-Timezone' -Module 'Microsoft.PowerShell.Management') - { - Set-Timezone -Id $TimezoneId - } - else - { - if (Test-Command -Name 'Add-Type' -Module 'Microsoft.Powershell.Utility') - { - # We can use Reflection to modify the TimeZone - Write-Verbose -Message ($LocalizedData.SettingTimezoneMessage ` - -f $TimeZoneId,'.NET') - - Set-TimeZoneUsingNET -TimezoneId $TimeZoneId - } - else - { - # For anything else use TZUTIL.EXE - Write-Verbose -Message ($LocalizedData.SettingTimezoneMessage ` - -f $TimeZoneId,'TZUTIL.EXE') - - try - { - & tzutil.exe @('/s',$TimeZoneId) - } - catch - { - $ErrorMsg = $_.Exception.Message - Write-Verbose -Message $ErrorMsg - } # try - } # if - } # if - - Write-Verbose -Message ($LocalizedData.TimezoneUpdatedMessage ` - -f $TimeZone) -} # function Set-TimeZoneId - -<# - .SYNOPSIS - This function exists so that the ::Set method can be mocked by Pester. -#> -function Set-TimeZoneUsingNET { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [System.String] - $TimeZoneId - ) - - # Add the [TimeZoneHelper.TimeZone] type if it is not defined. - if (-not ([System.Management.Automation.PSTypeName]'TimeZoneHelper.TimeZone').Type) - { - Write-Verbose -Message ($LocalizedData.AddingSetTimeZonedotNetTypeMessage) - $SetTimeZoneCs = Get-Content ` - -Path (Join-Path -Path $PSScriptRoot -ChildPath 'SetTimeZone.cs') ` - -Raw - Add-Type ` - -Language CSharp ` - -TypeDefinition $SetTimeZoneCs - } # if - - [Microsoft.PowerShell.xTimeZone.TimeZone]::Set($TimeZoneId) -} # function Set-TimeZoneUsingNET - -<# - .SYNOPSIS - This function tests if a cmdlet exists. -#> -function Test-Command { - [CmdletBinding()] - [OutputType([boolean])] - param( - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [System.String] - $Module - ) - - return ($null -ne (Get-Command @PSBoundParameters -ErrorAction SilentlyContinue)) -} # function Test-Command diff --git a/lib/puppet_x/dsc_resources/xTimeZone/DSCResources/en-us/TimezoneHelper.psd1 b/lib/puppet_x/dsc_resources/xTimeZone/DSCResources/en-us/TimezoneHelper.psd1 deleted file mode 100644 index 3224adb2..00000000 --- a/lib/puppet_x/dsc_resources/xTimeZone/DSCResources/en-us/TimezoneHelper.psd1 +++ /dev/null @@ -1,8 +0,0 @@ -# culture="en-US" -ConvertFrom-StringData -StringData @' - CurrentTimezoneMessage=Current Timezone is set to '{0}' - GettingTimezoneCimMessage=Getting current Timezone using {0} - SettingTimezoneMessage=Setting Timezone to '{0}' using {1} - TimezoneUpdatedMessage=Timezone has been updated to '{0}' - AddingSetTimeZonedotNetTypeMessage=Adding .NET Set Timezone Type -'@ diff --git a/lib/puppet_x/dsc_resources/xTimeZone/DSCResources/xTimeZone/en-us/xTimeZone.psd1 b/lib/puppet_x/dsc_resources/xTimeZone/DSCResources/xTimeZone/en-us/xTimeZone.psd1 deleted file mode 100644 index ebbbfe2e..00000000 --- a/lib/puppet_x/dsc_resources/xTimeZone/DSCResources/xTimeZone/en-us/xTimeZone.psd1 +++ /dev/null @@ -1,6 +0,0 @@ -# culture="en-US" -ConvertFrom-StringData -StringData @' - ReplaceSystemTimezoneMessage=Replace the System Time Zone - SettingTimezoneMessage=Setting the TimeZone. - TimezoneAlreadySetMessage=TimeZone already set to {0}. -'@ diff --git a/lib/puppet_x/dsc_resources/xTimeZone/DSCResources/xTimeZone/xTimeZone.psm1 b/lib/puppet_x/dsc_resources/xTimeZone/DSCResources/xTimeZone/xTimeZone.psm1 deleted file mode 100644 index 4e7e2e81..00000000 --- a/lib/puppet_x/dsc_resources/xTimeZone/DSCResources/xTimeZone/xTimeZone.psm1 +++ /dev/null @@ -1,119 +0,0 @@ -#--------------------------------------------------------------------------------- -#The sample scripts are not supported under any Microsoft standard support -#program or service. The sample scripts are provided AS IS without warranty -#of any kind. Microsoft further disclaims all implied warranties including, -#without limitation, any implied warranties of merchantability or of fitness for -#a particular purpose. The entire risk arising out of the use or performance of -#the sample scripts and documentation remains with you. In no event shall -#Microsoft, its authors, or anyone else involved in the creation, production, or -#delivery of the scripts be liable for any damages whatsoever (including, -#without limitation, damages for loss of business profits, business interruption, -#loss of business information, or other pecuniary loss) arising out of the use -#of or inability to use the sample scripts or documentation, even if Microsoft -#has been advised of the possibility of such damages -#--------------------------------------------------------------------------------- -#region localizeddata -if (Test-Path "${PSScriptRoot}\${PSUICulture}") -{ - Import-LocalizedData ` - -BindingVariable LocalizedData ` - -Filename xTimeZone.psd1 ` - -BaseDirectory "${PSScriptRoot}\${PSUICulture}" -} -else -{ - #fallback to en-US - Import-LocalizedData ` - -BindingVariable LocalizedData ` - -Filename xTimeZone.psd1 ` - -BaseDirectory "${PSScriptRoot}\en-US" -} -#endregion - -# Load the Helper Module -Import-Module -Name "$PSScriptRoot\..\TimezoneHelper.psm1" -Verbose:$false - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [String] - $IsSingleInstance, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $TimeZone - ) - - # Get the current TimeZone Id - $CurrentTimeZone = Get-TimeZoneId - - $returnValue = @{ - TimeZone = $CurrentTimeZone - IsSingleInstance = 'Yes' - } - - # Output the target resource - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding(SupportsShouldProcess=$true)] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [String] - $IsSingleInstance, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $TimeZone - ) - - $CurrentTimeZone = Get-TimeZoneId - - if($PSCmdlet.ShouldProcess("'$TimeZone'",$LocalizedData.ReplaceSystemTimezoneMessage)) - { - if($CurrentTimeZone -ne $TimeZone) - { - Write-Verbose -Message ($LocalizedData.SettingTimezoneMessage) - Set-TimeZoneId -TimeZone $TimeZone - } - else - { - Write-Verbose -Message ($LocalizedData.TimezoneAlreadySetMessage ` - -f $Timezone) - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet('Yes')] - [String] - $IsSingleInstance, - - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $TimeZone - ) - return Test-TimeZoneId -TimeZoneId $TimeZone -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xTimeZone/DSCResources/xTimeZone/xTimeZone.schema.mof b/lib/puppet_x/dsc_resources/xTimeZone/DSCResources/xTimeZone/xTimeZone.schema.mof deleted file mode 100644 index 1c0432f6..00000000 --- a/lib/puppet_x/dsc_resources/xTimeZone/DSCResources/xTimeZone/xTimeZone.schema.mof +++ /dev/null @@ -1,6 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xTimeZone")] -class xTimeZone : OMI_BaseResource -{ - [Key, Description("Specifies the resource is a single instance, the value must be 'Yes'"), ValueMap{"Yes"}, Values{"Yes"}] String IsSingleInstance; - [Required, Description("Specifies the TimeZone.")] String TimeZone; -}; diff --git a/lib/puppet_x/dsc_resources/xTimeZone/LICENSE b/lib/puppet_x/dsc_resources/xTimeZone/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xTimeZone/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xTimeZone/xTimeZone.psd1 b/lib/puppet_x/dsc_resources/xTimeZone/xTimeZone.psd1 deleted file mode 100644 index ad8a094b..00000000 --- a/lib/puppet_x/dsc_resources/xTimeZone/xTimeZone.psd1 +++ /dev/null @@ -1,66 +0,0 @@ -@{ - -# Version number of this module. -ModuleVersion = '1.6.0.0' - -# ID used to uniquely identify this module -GUID = 'd75e53f2-47fc-4ee7-97af-8d257d3e0151' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'This DSC Resources can easily set the System Time Zone.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Functions to export from this module -# FunctionsToExport = '' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Variables to export from this module -VariablesToExport = '*' - -# Aliases to export from this module -AliasesToExport = '*' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xTimeZone/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xTimeZone' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* Add support for Nano Server and WMF5.1 via Get-Timezone/Set-Timezone cmdlets. -* Minor changes to bring make resource ready for HQRM. -* Renamed and reworked functions in TimezoneHelper.psm1 to prevent conflicts with new built-in WMF5.1 Timezone Cmdlets. -* Fixed localization so that failback to en-US if culture specific language files not available. -* Moved code to init C' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - - - diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/Helper.psm1 b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/Helper.psm1 deleted file mode 100644 index 2f87aaf7..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/Helper.psm1 +++ /dev/null @@ -1,63 +0,0 @@ -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData -StringData @' - ModuleNotFound = Please ensure that the PowerShell module for role {0} is installed. -'@ -} - -<# - .SYNOPSIS - Internal function to throw terminating error with specified - errroCategory, errorId and errorMessage - .PARAMETER ErrorId - Specifies the Id error message. - .PARAMETER ErrorMessage - Specifies full Error Message to be returned. - .PARAMETER ErrorCategory - Specifies Error Category. -#> -function New-TerminatingError -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory)] - [String] $ErrorId, - - [Parameter(Mandatory)] - [String] $ErrorMessage, - - [Parameter(Mandatory)] - [System.Management.Automation.ErrorCategory] $ErrorCategory - ) - - $exception = New-Object System.InvalidOperationException $ErrorMessage - $errorRecord = New-Object System.Management.Automation.ErrorRecord ` - $exception, $ErrorId, $ErrorCategory, $null - throw $errorRecord -} - -<# - .SYNOPSIS - Internal function to assert if the module exists - .PARAMETER ModuleName - Module to test -#> -function Assert-Module -{ - [CmdletBinding()] - param - ( - [String]$ModuleName = 'WebAdministration' - ) - - if(-not(Get-Module -Name $ModuleName -ListAvailable)) - { - $errorMsg = $($LocalizedData.ModuleNotFound) -f $ModuleName - New-TerminatingError -ErrorId 'ModuleNotFound' ` - -ErrorMessage $errorMsg ` - -ErrorCategory ObjectNotFound - } -} diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIIsHandler/MSFT_xIisHandler.psm1 b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIIsHandler/MSFT_xIisHandler.psm1 deleted file mode 100644 index a6bf6d7b..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIIsHandler/MSFT_xIisHandler.psm1 +++ /dev/null @@ -1,959 +0,0 @@ -# Load the Helper Module -Import-Module -Name "$PSScriptRoot\..\Helper.psm1" - -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData -StringData @' - NoWebAdministrationModule = Please ensure that WebAdministration module is installed. - AddingHandler = Adding handler '{0}' - RemovingHandler = Removing handler '{0}' - HandlerExists = Handler with name '{0}' already exist - HandlerNotPresent = Handler with name '{0}' is not present as requested - HandlerNotSupported = The handler with name '{0}' is not supported. - VerboseGetTargetPresent = Handler is present - VerboseGetTargetAbsent = Handler is absent -'@ -} - -#region script variables -$script:handlers = @{ - 'aspq-Integrated-4.0' = (New-Object PSObject -Property @{ - Name = 'aspq-Integrated-4.0'; - Path = '*.aspq'; - Verb = 'GET,HEAD,POST,DEBUG'; - Type = 'System.Web.HttpForbiddenHandler'; - PreCondition = 'integratedMode,runtimeVersionv4.0' - }); - - 'aspq-ISAPI-4.0_32bit' = (New-Object PSObject -Property @{ - Name = 'aspq-ISAPI-4.0_32bit'; - Path = '*.aspq'; - Verb = '*'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness32'; - ResponseBufferLimit = '0' - }); - - 'aspq-ISAPI-4.0_64bit' = (New-Object PSObject -Property @{ - Name = 'aspq-ISAPI-4.0_64bit'; - Path = '*.aspq'; - Verb = '*'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness64'; - ResponseBufferLimit = '0' - }); - - 'AssemblyResourceLoader-Integrated-4.0' = (New-Object PSObject -Property @{ - Name = 'AssemblyResourceLoader-Integrated-4.0'; - Path = 'WebResource.axd'; - Verb = 'GET,DEBUG'; - Type = 'System.Web.Handlers.AssemblyResourceLoader'; - PreCondition = 'integratedMode,runtimeVersionv4.0' - }); - - 'AssemblyResourceLoader-Integrated' = (New-Object PSObject -Property @{ - Name = 'AssemblyResourceLoader-Integrated'; - Path = 'WebResource.axd'; - Verb = 'GET,DEBUG'; - Type = 'System.Web.Handlers.AssemblyResourceLoader'; - PreCondition = 'integratedMode' - }); - - 'AXD-ISAPI-2.0-64' = (New-Object PSObject -Property @{ - Name = 'AXD-ISAPI-2.0-64'; - Path = '*.axd'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv2.0,bitness64'; - ResponseBufferLimit = '0' - }); - - 'AXD-ISAPI-2.0' = (New-Object PSObject -Property @{ - Name = 'AXD-ISAPI-2.0'; - Path = '*.axd'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv2.0,bitness32'; - ResponseBufferLimit = '0' - }); - - 'AXD-ISAPI-4.0_32bit' = (New-Object PSObject -Property @{ - Name = 'AXD-ISAPI-4.0_32bit'; - Path = '*.axd'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness32'; - ResponseBufferLimit = '0' - }); - - 'AXD-ISAPI-4.0_64bit' = (New-Object PSObject -Property @{ - Name = 'AXD-ISAPI-4.0_64bit'; - Path = '*.axd'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness64'; - ResponseBufferLimit = '0' - }); - - 'CGI-exe' = (New-Object PSObject -Property @{ - Name = 'CGI-exe'; - Path = '*.exe'; - Verb = '*'; - Modules = 'CgiModule'; - ResourceType = 'File'; - RequireAccess = 'Execute'; - AllowPathInfo = 'true' - }); - - 'ClientLoggingHandler' = (New-Object PSObject -Property @{ - Name = 'ClientLoggingHandler'; - Path = '*.log'; - Verb = 'POST'; - Modules = 'ClientLoggingHandler'; - ResourceType = 'Unspecified'; - RequireAccess = 'None' - }); - - 'cshtm-Integrated-4.0' = (New-Object PSObject -Property @{ - Name = 'cshtm-Integrated-4.0'; - Path = '*.cshtm'; - Verb = 'GET,HEAD,POST,DEBUG'; - Type = 'System.Web.HttpForbiddenHandler'; - PreCondition = 'integratedMode,runtimeVersionv4.0' - }); - - 'cshtm-ISAPI-4.0_32bit' = (New-Object PSObject -Property @{ - Name = 'cshtm-ISAPI-4.0_32bit'; - Path = '*.cshtm'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness32'; - ResponseBufferLimit = '0' - }); - - 'cshtm-ISAPI-4.0_64bit' = (New-Object PSObject -Property @{ - Name = 'cshtm-ISAPI-4.0_64bit'; - Path = '*.cshtm'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness64'; - ResponseBufferLimit = '0' - }); - - 'cshtml-Integrated-4.0' = (New-Object PSObject -Property @{ - Name = 'cshtml-Integrated-4.0'; - Path = '*.cshtml'; - Verb = 'GET,HEAD,POST,DEBUG'; - Type = 'System.Web.HttpForbiddenHandler'; - PreCondition = 'integratedMode,runtimeVersionv4.0' - }); - - 'cshtml-ISAPI-4.0_32bit' = (New-Object PSObject -Property @{ - Name = 'cshtml-ISAPI-4.0_32bit'; - Path = '*.cshtml'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness32'; - ResponseBufferLimit = '0' - }); - - 'cshtml-ISAPI-4.0_64bit' = (New-Object PSObject -Property @{ - Name = 'cshtml-ISAPI-4.0_64bit'; - Path = '*.cshtml'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness64'; - ResponseBufferLimit = '0' - }); - - 'ExtensionlessUrlHandler-Integrated-4.0' = (New-Object PSObject -Property @{ - Name = 'ExtensionlessUrlHandler-Integrated-4.0'; - Path = '*.'; - Verb = 'GET,HEAD,POST,DEBUG'; - Type = 'System.Web.Handlers.TransferRequestHandler'; - PreCondition = 'integratedMode,runtimeVersionv4.0'; - ResponseBufferLimit = '0' - }); - - 'ExtensionlessUrlHandler-ISAPI-4.0_32bit' = (New-Object PSObject -Property @{ - Name = 'ExtensionlessUrlHandler-ISAPI-4.0_32bit'; - Path = '*.'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness32'; - ResponseBufferLimit = '0' - }); - - 'ExtensionlessUrlHandler-ISAPI-4.0_64bit' = (New-Object PSObject -Property @{ - Name = 'ExtensionlessUrlHandler-ISAPI-4.0_64bit'; - Path = '*.'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness64'; - ResponseBufferLimit = '0' - }); - - 'HttpRemotingHandlerFactory-rem-Integrated-4.0' = (New-Object PSObject -Property @{ - Name = 'HttpRemotingHandlerFactory-rem-Integrated-4.0'; - Path = '*.rem'; - Verb = 'GET,HEAD,POST,DEBUG'; - Type = 'System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory,;System.Runtime.Remoting,;Version = 4.0.0.0,;Culture = neutral,;PublicKeyToken = b77a5c561934e089'; - PreCondition = 'integratedMode,runtimeVersionv4.0' - }); - - 'HttpRemotingHandlerFactory-rem-Integrated' = (New-Object PSObject -Property @{ - Name = 'HttpRemotingHandlerFactory-rem-Integrated'; - Path = '*.rem'; - Verb = 'GET,HEAD,POST,DEBUG'; - Type = 'System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory,;System.Runtime.Remoting,;Version = 2.0.0.0,;Culture = neutral,;PublicKeyToken = b77a5c561934e089'; - PreCondition = 'integratedMode,runtimeVersionv2.0' - }); - - 'HttpRemotingHandlerFactory-rem-ISAPI-2.0-64' = (New-Object PSObject -Property @{ - Name = 'HttpRemotingHandlerFactory-rem-ISAPI-2.0-64'; - Path = '*.rem'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv2.0,bitness64'; - ResponseBufferLimit = '0' - }); - - 'HttpRemotingHandlerFactory-rem-ISAPI-2.0' = (New-Object PSObject -Property @{ - Name = 'HttpRemotingHandlerFactory-rem-ISAPI-2.0'; - Path = '*.rem'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv2.0,bitness32'; - ResponseBufferLimit = '0' - }); - - 'HttpRemotingHandlerFactory-rem-ISAPI-4.0_32bit' = (New-Object PSObject -Property @{ - Name = 'HttpRemotingHandlerFactory-rem-ISAPI-4.0_32bit'; - Path = '*.rem'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness32'; - ResponseBufferLimit = '0' - }); - - 'HttpRemotingHandlerFactory-rem-ISAPI-4.0_64bit' = (New-Object PSObject -Property @{ - Name = 'HttpRemotingHandlerFactory-rem-ISAPI-4.0_64bit'; - Path = '*.rem'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness64'; - ResponseBufferLimit = '0' - }); - - 'HttpRemotingHandlerFactory-soap-Integrated-4.0' = (New-Object PSObject -Property @{ - Name = 'HttpRemotingHandlerFactory-soap-Integrated-4.0'; - Path = '*.soap'; - Verb = 'GET,HEAD,POST,DEBUG'; - Type = 'System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory,;System.Runtime.Remoting,;Version = 4.0.0.0,;Culture = neutral,;PublicKeyToken = b77a5c561934e089'; - PreCondition = 'integratedMode,runtimeVersionv4.0' - }); - - 'HttpRemotingHandlerFactory-soap-Integrated' = (New-Object PSObject -Property @{ - Name = 'HttpRemotingHandlerFactory-soap-Integrated'; - Path = '*.soap'; - Verb = 'GET,HEAD,POST,DEBUG'; - Type = 'System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory,;System.Runtime.Remoting,;Version = 2.0.0.0,;Culture = neutral,;PublicKeyToken = b77a5c561934e089'; - PreCondition = 'integratedMode,runtimeVersionv2.0' - }); - - 'HttpRemotingHandlerFactory-soap-ISAPI-2.0-64' = (New-Object PSObject -Property @{ - Name = 'HttpRemotingHandlerFactory-soap-ISAPI-2.0-64'; - Path = '*.soap'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv2.0,bitness64'; - ResponseBufferLimit = '0' - }); - - 'HttpRemotingHandlerFactory-soap-ISAPI-2.0' = (New-Object PSObject -Property @{ - Name = 'HttpRemotingHandlerFactory-soap-ISAPI-2.0'; - Path = '*.soap'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv2.0,bitness32'; - ResponseBufferLimit = '0' - }); - - 'HttpRemotingHandlerFactory-soap-ISAPI-4.0_32bit' = (New-Object PSObject -Property @{ - Name = 'HttpRemotingHandlerFactory-soap-ISAPI-4.0_32bit'; - Path = '*.soap'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness32'; - ResponseBufferLimit = '0' - }); - - 'HttpRemotingHandlerFactory-soap-ISAPI-4.0_64bit' = (New-Object PSObject -Property @{ - Name = 'HttpRemotingHandlerFactory-soap-ISAPI-4.0_64bit'; - Path = '*.soap'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness64'; - ResponseBufferLimit = '0' - }); - - 'ISAPI-dll' = (New-Object PSObject -Property @{ - Name = 'ISAPI-dll'; - Path = '*.dll'; - Verb = '*'; - Modules = 'IsapiModule'; - ResourceType = 'File'; - RequireAccess = 'Execute'; - AllowPathInfo = 'true' - }); - - 'OPTIONSVerbHandler' = (New-Object PSObject -Property @{ - Name = 'OPTIONSVerbHandler'; - Path = '*'; - Verb = 'OPTIONS'; - Modules = 'ProtocolSupportModule'; - RequireAccess = 'None' - }); - - 'PageHandlerFactory-Integrated-4.0' = (New-Object PSObject -Property @{ - Name = 'PageHandlerFactory-Integrated-4.0'; - Path = '*.aspx'; - Verb = 'GET,HEAD,POST,DEBUG'; - Type = 'System.Web.UI.PageHandlerFactory'; - PreCondition = 'integratedMode,runtimeVersionv4.0' - }); - - 'PageHandlerFactory-Integrated' = (New-Object PSObject -Property @{ - Name = 'PageHandlerFactory-Integrated'; - Path = '*.aspx'; - Verb = 'GET,HEAD,POST,DEBUG'; - Type = 'System.Web.UI.PageHandlerFactory'; - PreCondition = 'integratedMode' - }); - - 'PageHandlerFactory-ISAPI-2.0-64' = (New-Object PSObject -Property @{ - Name = 'PageHandlerFactory-ISAPI-2.0-64'; - Path = '*.aspx'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv2.0,bitness64'; - ResponseBufferLimit = '0' - }); - - 'PageHandlerFactory-ISAPI-2.0' = (New-Object PSObject -Property @{ - Name = 'PageHandlerFactory-ISAPI-2.0'; - Path = '*.aspx'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv2.0,bitness32'; - ResponseBufferLimit = '0' - }); - - 'PageHandlerFactory-ISAPI-4.0_32bit' = (New-Object PSObject -Property @{ - Name = 'PageHandlerFactory-ISAPI-4.0_32bit'; - Path = '*.aspx'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness32'; - ResponseBufferLimit = '0' - }); - - 'PageHandlerFactory-ISAPI-4.0_64bit' = (New-Object PSObject -Property @{ - Name = 'PageHandlerFactory-ISAPI-4.0_64bit'; - Path = '*.aspx'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness64'; - ResponseBufferLimit = '0' - }); - - 'rules-Integrated-4.0' = (New-Object PSObject -Property @{ - Name = 'rules-Integrated-4.0'; - Path = '*.rules'; - Verb = '*'; - Type = 'System.ServiceModel.Activation.ServiceHttpHandlerFactory,;System.ServiceModel.Activation,;Version = 4.0.0.0,;Culture = neutral,;PublicKeyToken = 31bf3856ad364e35'; - PreCondition = 'integratedMode,runtimeVersionv4.0' - }); - - 'rules-ISAPI-4.0_32bit' = (New-Object PSObject -Property @{ - Name = 'rules-ISAPI-4.0_32bit'; - Path = '*.rules'; - Verb = '*'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness32'; - ResponseBufferLimit = '0' - }); - - 'rules-ISAPI-4.0_64bit' = (New-Object PSObject -Property @{ - Name = 'rules-ISAPI-4.0_64bit'; - Path = '*.rules'; - Verb = '*'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness64'; - ResponseBufferLimit = '0' - }); - - 'ScriptHandlerFactoryAppServices-Integrated-4.0' = (New-Object PSObject -Property @{ - Name = 'ScriptHandlerFactoryAppServices-Integrated-4.0'; - Path = '*_AppService.axd'; - Verb = '*'; - Type = 'System.Web.Script.Services.ScriptHandlerFactory,;System.Web.Extensions,;Version = 4.0.0.0,;Culture = neutral,;PublicKeyToken = 31BF3856AD364E35'; - PreCondition = 'integratedMode,runtimeVersionv4.0' - }); - - 'ScriptResourceIntegrated-4.0' = (New-Object PSObject -Property @{ - Name = 'ScriptResourceIntegrated-4.0'; - Path = '*ScriptResource.axd'; - Verb = 'GET,HEAD'; - Type = 'System.Web.Handlers.ScriptResourceHandler,;System.Web.Extensions,;Version = 4.0.0.0,;Culture = neutral,;PublicKeyToken = 31BF3856AD364E35'; - PreCondition = 'integratedMode,runtimeVersionv4.0' - }); - - 'SecurityCertificate' = (New-Object PSObject -Property @{ - Name = 'SecurityCertificate'; - Path = '*.cer'; - Verb = 'GET,HEAD,POST'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\system32\inetsrv\asp.dll'; - ResourceType = 'File' - }); - - 'SimpleHandlerFactory-Integrated-4.0' = (New-Object PSObject -Property @{ - Name = 'SimpleHandlerFactory-Integrated-4.0'; - Path = '*.ashx'; - Verb = 'GET,HEAD,POST,DEBUG'; - Type = 'System.Web.UI.SimpleHandlerFactory'; - PreCondition = 'integratedMode,runtimeVersionv4.0' - }); - - 'SimpleHandlerFactory-Integrated' = (New-Object PSObject -Property @{ - Name = 'SimpleHandlerFactory-Integrated'; - Path = '*.ashx'; - Verb = 'GET,HEAD,POST,DEBUG'; - Type = 'System.Web.UI.SimpleHandlerFactory'; - PreCondition = 'integratedMode' - }); - - 'SimpleHandlerFactory-ISAPI-2.0-64' = (New-Object PSObject -Property @{ - Name = 'SimpleHandlerFactory-ISAPI-2.0-64'; - Path = '*.ashx'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv2.0,bitness64'; - ResponseBufferLimit = '0' - }); - - 'SimpleHandlerFactory-ISAPI-2.0' = (New-Object PSObject -Property @{ - Name = 'SimpleHandlerFactory-ISAPI-2.0'; - Path = '*.ashx'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv2.0,bitness32'; - ResponseBufferLimit = '0' - }); - - 'SimpleHandlerFactory-ISAPI-4.0_32bit' = (New-Object PSObject -Property @{ - Name = 'SimpleHandlerFactory-ISAPI-4.0_32bit'; - Path = '*.ashx'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness32'; - ResponseBufferLimit = '0' - }); - - 'SimpleHandlerFactory-ISAPI-4.0_64bit' = (New-Object PSObject -Property @{ - Name = 'SimpleHandlerFactory-ISAPI-4.0_64bit'; - Path = '*.ashx'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness64'; - ResponseBufferLimit = '0' - }); - - 'SSINC-shtm' = (New-Object PSObject -Property @{ - Name = 'SSINC-shtm'; - Path = '*.shtm'; - Verb = 'GET,HEAD,POST'; - Modules = 'ServerSideIncludeModule'; - ResourceType = 'File' - }); - - 'SSINC-shtml' = (New-Object PSObject -Property @{ - Name = 'SSINC-shtml'; - Path = '*.shtml'; - Verb = 'GET,HEAD,POST'; - Modules = 'ServerSideIncludeModule'; - ResourceType = 'File' - }); - - 'SSINC-stm' = (New-Object PSObject -Property @{ - Name = 'SSINC-stm'; - Path = '*.stm'; - Verb = 'GET,HEAD,POST'; - Modules = 'ServerSideIncludeModule'; - ResourceType = 'File' - }); - - 'StaticFile' = (New-Object PSObject -Property @{ - Name = 'StaticFile'; - Path = '*'; - Verb = '*'; - Modules = 'StaticFileModule,DefaultDocumentModule,DirectoryListingModule'; - ResourceType = 'Either'; - RequireAccess = 'Read' - }); - - 'svc-Integrated-4.0' = (New-Object PSObject -Property @{ - Name = 'svc-Integrated-4.0'; - Path = '*.svc'; - Verb = '*'; - Type = 'System.ServiceModel.Activation.ServiceHttpHandlerFactory,;System.ServiceModel.Activation,;Version = 4.0.0.0,;Culture = neutral,;PublicKeyToken = 31bf3856ad364e35'; - PreCondition = 'integratedMode,runtimeVersionv4.0' - }); - - 'svc-ISAPI-4.0_32bit' = (New-Object PSObject -Property @{ - Name = 'svc-ISAPI-4.0_32bit'; - Path = '*.svc'; - Verb = '*'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness32'; - ResponseBufferLimit = '0' - }); - - 'svc-ISAPI-4.0_64bit' = (New-Object PSObject -Property @{ - Name = 'svc-ISAPI-4.0_64bit'; - Path = '*.svc'; - Verb = '*'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness64'; - ResponseBufferLimit = '0' - }); - - 'TraceHandler-Integrated-4.0' = (New-Object PSObject -Property @{ - Name = 'TraceHandler-Integrated-4.0'; - Path = 'trace.axd'; - Verb = 'GET,HEAD,POST,DEBUG'; - Type = 'System.Web.Handlers.TraceHandler'; - PreCondition = 'integratedMode,runtimeVersionv4.0' - }); - - 'TraceHandler-Integrated' = (New-Object PSObject -Property @{ - Name = 'TraceHandler-Integrated'; - Path = 'trace.axd'; - Verb = 'GET,HEAD,POST,DEBUG'; - Type = 'System.Web.Handlers.TraceHandler'; - PreCondition = 'integratedMode' - }); - - 'TRACEVerbHandler' = (New-Object PSObject -Property @{ - Name = 'TRACEVerbHandler'; - Path = '*'; - Verb = 'TRACE'; - Modules = 'ProtocolSupportModule'; - RequireAccess = 'None' - }); - - 'vbhtm-Integrated-4.0' = (New-Object PSObject -Property @{ - Name = 'vbhtm-Integrated-4.0'; - Path = '*.vbhtm'; - Verb = 'GET,HEAD,POST,DEBUG'; - Type = 'System.Web.HttpForbiddenHandler'; - PreCondition = 'integratedMode,runtimeVersionv4.0' - }); - - 'vbhtm-ISAPI-4.0_32bit' = (New-Object PSObject -Property @{ - Name = 'vbhtm-ISAPI-4.0_32bit'; - Path = '*.vbhtm'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness32'; - ResponseBufferLimit = '0' - }); - - 'vbhtm-ISAPI-4.0_64bit' = (New-Object PSObject -Property @{ - Name = 'vbhtm-ISAPI-4.0_64bit'; - Path = '*.vbhtm'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness64'; - ResponseBufferLimit = '0' - }); - - 'vbhtml-Integrated-4.0' = (New-Object PSObject -Property @{ - Name = 'vbhtml-Integrated-4.0'; - Path = '*.vbhtml'; - Verb = 'GET,HEAD,POST,DEBUG'; - Type = 'System.Web.HttpForbiddenHandler'; - PreCondition = 'integratedMode,runtimeVersionv4.0' - }); - - 'vbhtml-ISAPI-4.0_32bit' = (New-Object PSObject -Property @{ - Name = 'vbhtml-ISAPI-4.0_32bit'; - Path = '*.vbhtml'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness32'; - ResponseBufferLimit = '0' - }); - - 'vbhtml-ISAPI-4.0_64bit' = (New-Object PSObject -Property @{ - Name = 'vbhtml-ISAPI-4.0_64bit'; - Path = '*.vbhtml'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness64'; - ResponseBufferLimit = '0' - }); - - 'WebAdminHandler-Integrated-4.0' = (New-Object PSObject -Property @{ - Name = 'WebAdminHandler-Integrated-4.0'; - Path = 'WebAdmin.axd'; - Verb = 'GET,DEBUG'; - Type = 'System.Web.Handlers.WebAdminHandler'; - PreCondition = 'integratedMode,runtimeVersionv4.0' - }); - - 'WebAdminHandler-Integrated' = (New-Object PSObject -Property @{ - Name = 'WebAdminHandler-Integrated'; - Path = 'WebAdmin.axd'; - Verb = 'GET,DEBUG'; - Type = 'System.Web.Handlers.WebAdminHandler'; - PreCondition = 'integratedMode' - }); - - 'WebDAV' = (New-Object PSObject -Property @{ - Name = 'WebDAV'; - Path = '*'; - Verb = 'PROPFIND,PROPPATCH,MKCOL,PUT,COPY,DELETE,MOVE,LOCK,UNLOCK'; - Modules = 'WebDAVModule'; - ResourceType = 'Unspecified'; - RequireAccess = 'None' - }); - - 'WebServiceHandlerFactory-Integrated-4.0' = (New-Object PSObject -Property @{ - Name = 'WebServiceHandlerFactory-Integrated-4.0'; - Path = '*.asmx'; - Verb = 'GET,HEAD,POST,DEBUG'; - Type = 'System.Web.Script.Services.ScriptHandlerFactory,;System.Web.Extensions,;Version = 4.0.0.0,;Culture = neutral,;PublicKeyToken = 31bf3856ad364e35'; - PreCondition = 'integratedMode,runtimeVersionv4.0' - }); - - 'WebServiceHandlerFactory-Integrated' = (New-Object PSObject -Property @{ - Name = 'WebServiceHandlerFactory-Integrated'; - Path = '*.asmx'; - Verb = 'GET,HEAD,POST,DEBUG'; - Type = 'System.Web.Services.Protocols.WebServiceHandlerFactory,;System.Web.Services,;Version = 2.0.0.0,;Culture = neutral,;PublicKeyToken = b03f5f7f11d50a3a'; - PreCondition = 'integratedMode,runtimeVersionv2.0' - }); - - 'WebServiceHandlerFactory-ISAPI-2.0-64' = (New-Object PSObject -Property @{ - Name = 'WebServiceHandlerFactory-ISAPI-2.0-64'; - Path = '*.asmx'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv2.0,bitness64'; - ResponseBufferLimit = '0' - }); - - 'WebServiceHandlerFactory-ISAPI-2.0' = (New-Object PSObject -Property @{ - Name = 'WebServiceHandlerFactory-ISAPI-2.0'; - Path = '*.asmx'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv2.0,bitness32'; - ResponseBufferLimit = '0' - }); - - 'WebServiceHandlerFactory-ISAPI-4.0_32bit' = (New-Object PSObject -Property @{ - Name = 'WebServiceHandlerFactory-ISAPI-4.0_32bit'; - Path = '*.asmx'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness32'; - ResponseBufferLimit = '0' - }); - - 'WebServiceHandlerFactory-ISAPI-4.0_64bit' = (New-Object PSObject -Property @{ - Name = 'WebServiceHandlerFactory-ISAPI-4.0_64bit'; - Path = '*.asmx'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness64'; - ResponseBufferLimit = '0' - }); - - 'xamlx-Integrated-4.0' = (New-Object PSObject -Property @{ - Name = 'xamlx-Integrated-4.0'; - Path = '*.xamlx'; - Verb = 'GET,HEAD,POST,DEBUG'; - Type = 'System.Xaml.Hosting.XamlHttpHandlerFactory,;System.Xaml.Hosting,;Version = 4.0.0.0,;Culture = neutral,;PublicKeyToken = 31bf3856ad364e35'; - PreCondition = 'integratedMode,runtimeVersionv4.0' - }); - - 'xamlx-ISAPI-4.0_32bit' = (New-Object PSObject -Property @{ - Name = 'xamlx-ISAPI-4.0_32bit'; - Path = '*.xamlx'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness32'; - ResponseBufferLimit = '0' - }); - - 'xamlx-ISAPI-4.0_64bit' = (New-Object PSObject -Property @{ - Name = 'xamlx-ISAPI-4.0_64bit'; - Path = '*.xamlx'; - Verb = 'GET,HEAD,POST,DEBUG'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness64'; - ResponseBufferLimit = '0' - }); - - 'xoml-Integrated-4.0' = (New-Object PSObject -Property @{ - Name = 'xoml-Integrated-4.0'; - Path = '*.xoml'; - Verb = '*'; - Type = 'System.ServiceModel.Activation.ServiceHttpHandlerFactory,;System.ServiceModel.Activation,;Version = 4.0.0.0,;Culture = neutral,;PublicKeyToken = 31bf3856ad364e35'; - PreCondition = 'integratedMode,runtimeVersionv4.0' - }); - - 'xoml-ISAPI-4.0_32bit' = (New-Object PSObject -Property @{ - Name = 'xoml-ISAPI-4.0_32bit'; - Path = '*.xoml'; - Verb = '*'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness32'; - ResponseBufferLimit = '0' - }); - - 'xoml-ISAPI-4.0_64bit' = (New-Object PSObject -Property @{ - Name = 'xoml-ISAPI-4.0_64bit'; - Path = '*.xoml'; - Verb = '*'; - Modules = 'IsapiModule'; - ScriptProcessor = '%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll'; - PreCondition = 'classicMode,runtimeVersionv4.0,bitness64'; - ResponseBufferLimit = '0' - }) -} - -#endregion -function Get-TargetResource -{ - <# - .SYNOPSIS - This will return a hashtable of results - #> - - [OutputType([Hashtable])] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [String] $Name, - - [Parameter(Mandatory)] - [ValidateSet('Present', 'Absent')] - [String] $Ensure - ) - - # Check if WebAdministration module is present for IIS cmdlets - Assert-Module - - $handler = Get-Handler -Name $Name - - if ($null -eq $handler) - { - Write-Verbose -Message $LocalizedData.VerboseGetTargetAbsent - return @{ - Ensure = 'Absent' - Name = $Name - } - } - else - { - Write-Verbose -Message $LocalizedData.VerboseGetTargetPresent - return @{ - Ensure = 'Present' - Name = $Name - } - } -} -function Set-TargetResource -{ - <# - .SYNOPSIS - This will set the desired state - - .NOTES - There are a few limitations with this resource: - It only supports builtin handlers, that come with IIS, not third party ones. - Removing handlers should be no problem, but all new handlers are added at the - top of the list, meaning, they are tried first. There is no way of ordering the - handler list except for removing all and then adding them in the correct order. - #> - - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "")] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [String] $Name, - - [Parameter(Mandatory)] - [ValidateSet('Present', 'Absent')] - [String] $Ensure - ) - - Assert-Module - - [String] $psPathRoot = 'MACHINE/WEBROOT/APPHOST' - [String] $sectionNode = 'system.webServer/handlers' - - $handler = Get-Handler -Name $Name - - if ($null -eq $handler -and $Ensure -eq 'Present') - { - # add the handler - Add-Handler -Name $Name - Write-Verbose -Message ($LocalizedData.AddingHandler -f $Name) - } - elseif ($null -ne $handler -and $Ensure -eq 'Absent') - { - # remove the handler - Remove-WebConfigurationProperty -PSPath $psPathRoot ` - -Filter $sectionNode ` - -Name '.' ` - -AtElement @{name="$Name"} - Write-Verbose -Message ($LocalizedData.RemovingHandler -f $Name) - } -} -function Test-TargetResource -{ - <# - .SYNOPSIS - This tests the desired state. If the state is not correct it will return $false. - If the state is correct it will return $true - #> - - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [String] $Name, - - [Parameter(Mandatory)] - [ValidateSet('Present', 'Absent')] - [String] $Ensure - ) - - Assert-Module - - $handler = Get-Handler -Name $Name - - if (($null -eq $handler -and $Ensure -eq 'Present') -or ` - ($null -ne $handler -and $Ensure -eq 'Absent')) - { - return $false - } - elseif ($null -ne $handler -and $Ensure -eq 'Present') - { - # Handler is present - Write-Verbose -Message ($LocalizedData.HandlerExists -f $Name) - return $true - } - else - { - # Handler not present and should not be there. - Write-Verbose -Message ($LocalizedData.HandlerNotPresent -f $Name) - return $true - } -} - -#region Helper Functions - -function Get-Handler -{ - param - ( - [String] $Name - ) - - [String] $filter = "system.webServer/handlers/Add[@Name='" + $Name + "']" - return Get-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST' ` - -Filter $filter ` - -Name '.' -} - -function Add-Handler -{ - param - ( - [String] $Name - ) - - # check whether our dictionary has an item with the specified key - if ($script:handlers.ContainsKey($Name)) - { - # add the new handler - Add-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST' ` - -Filter 'system.webServer/handlers' ` - -Name '.' ` - -Value $script:handlers[$Name] - } - else - { - New-TerminatingError -ErrorId 'HandlerNotSupported' ` - -ErrorMessage $($LocalizedData.HandlerNotSupported -f $Name) ` - -ErrorCategory InvalidArgument - } -} - -#endregion - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIIsHandler/MSFT_xIisHandler.schema.mof b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIIsHandler/MSFT_xIisHandler.schema.mof deleted file mode 100644 index 3541a39a..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIIsHandler/MSFT_xIisHandler.schema.mof +++ /dev/null @@ -1,6 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("xIisHandler")] -class MSFT_xIisHandler : OMI_BaseResource -{ - [Key] string Name; - [Required,ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] string Ensure; -}; diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisFeatureDelegation/MSFT_xIisFeatureDelegation.psm1 b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisFeatureDelegation/MSFT_xIisFeatureDelegation.psm1 deleted file mode 100644 index 618b8f93..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisFeatureDelegation/MSFT_xIisFeatureDelegation.psm1 +++ /dev/null @@ -1,146 +0,0 @@ -# Load the Helper Module -Import-Module -Name "$PSScriptRoot\..\Helper.psm1" - -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData -StringData @' - NoWebAdministrationModule = Please ensure that WebAdministration module is installed. - UnableToGetConfig = Unable to get configuration data for '{0}'. - ChangedMessage = Changed overrideMode for '{0}' to '{1}'. - VerboseGetTargetResource = Get-TargetResource has been run. -'@ -} - -function Get-TargetResource -{ - <# - .SYNOPSIS - This will return a hashtable of results - #> - - [OutputType([Hashtable])] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [String] $SectionName, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [ValidateSet('Allow', 'Deny')] - [String] $OverrideMode - ) - - [String] $oMode = Get-OverrideMode -Section $SectionName - - Write-Verbose -Message $LocalizedData.VerboseGetTargetResource - - return @{ - SectionName = $SectionName - OverrideMode = $oMode - } -} - -function Set-TargetResource -{ - <# - .SYNOPSIS - This will set the desired state - #> - - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "")] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [String] $SectionName, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [ValidateSet('Allow', 'Deny')] - [String] $OverrideMode - ) - - Write-Verbose($($LocalizedData.ChangedMessage) -f $SectionName, $OverrideMode) - - Set-WebConfiguration -Location '' ` - -Filter "/system.webServer/$SectionName" ` - -PSPath 'machine/webroot/apphost' ` - -Metadata 'overrideMode' ` - -Value $OverrideMode -} - -function Test-TargetResource -{ - <# - .SYNOPSIS - This tests the desired state. If the state is not correct it will return $false. - If the state is correct it will return $true - #> - - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [String] $SectionName, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [ValidateSet('Allow', 'Deny')] - [String] $OverrideMode - ) - - [String] $oMode = Get-OverrideMode -Section $SectionName - - if ($oMode -eq $OverrideMode) - { - return $true - } - - return $false -} - -#region Helper functions -function Get-OverrideMode -{ - <# - .NOTES - Check for a single value. - If $oMode is anything but Allow or Deny, we have a problem with our - Get-WebConfiguration call or the ApplicationHost.config file is corrupted. - #> - - param - ( - [String] $Section - ) - - Assert-Module - - Write-Verbose -Message 'Getting override mode' - - $webConfig = Get-WebConfiguration -Location '' ` - -Filter /system.webServer/$Section ` - -Metadata - - $oMode = $webConfig.Metadata.effectiveOverrideMode - - if ($oMode -notmatch "^(Allow|Deny)$") - { - $errorMessage = $($LocalizedData.UnableToGetConfig) -f $Section - New-TerminatingError -ErrorId UnableToGetConfig ` - -ErrorMessage $errorMessage ` - -ErrorCategory:InvalidResult - } - - return $oMode -} - - -#endregion - -Export-ModuleMember -function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisFeatureDelegation/MSFT_xIisFeatureDelegation.schema.mof b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisFeatureDelegation/MSFT_xIisFeatureDelegation.schema.mof deleted file mode 100644 index 329a4a35..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisFeatureDelegation/MSFT_xIisFeatureDelegation.schema.mof +++ /dev/null @@ -1,6 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("xIisFeatureDelegation")] -class MSFT_xIisFeatureDelegation : OMI_BaseResource -{ - [Key] string SectionName; - [Key,ValueMap{"Allow", "Deny"},Values{"Allow", "Deny"}] string OverrideMode; -}; diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisLogging/MSFT_xIisLogging.psm1 b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisLogging/MSFT_xIisLogging.psm1 deleted file mode 100644 index 0ae3fb91..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisLogging/MSFT_xIisLogging.psm1 +++ /dev/null @@ -1,311 +0,0 @@ -# Load the Helper Module -Import-Module -Name "$PSScriptRoot\..\Helper.psm1" - -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData -StringData @' - VerboseGetTargetResult = Get-TargetResource has been run. - VerboseSetTargetUpdateLogPath = LogPath is not in the desired state and will be updated. - VerboseSetTargetUpdateLogFlags = LogFlags do not match and will be updated. - VerboseSetTargetUpdateLogPeriod = LogPeriod is not in the desired state and will be updated. - VerboseSetTargetUpdateLogTruncateSize = TruncateSize is not in the desired state and will be updated. - VerboseSetTargetUpdateLoglocalTimeRollover = LoglocalTimeRollover is not in the desired state and will be updated. - VerboseSetTargetUpdateLogFormat = LogFormat is not in the desired state and will be updated - VerboseTestTargetFalseLogPath = LogPath does match desired state. - VerboseTestTargetFalseLogFlags = LogFlags does not match desired state. - VerboseTestTargetFalseLogPeriod = LogPeriod does not match desired state. - VerboseTestTargetFalseLogTruncateSize = LogTruncateSize does not match desired state. - VerboseTestTargetFalseLoglocalTimeRollover = LoglocalTimeRollover does not match desired state. - VerboseTestTargetFalseLogFormat = LogFormat does not match desired state. - WarningLogPeriod = LogTruncateSize has is an input as will overwrite this desired state. - WarningIncorrectLogFormat = LogFormat is not W3C, as a result LogFlags will not be used. -'@ -} - -<# - .SYNOPSIS - This will return a hashtable of results about the given LogPath -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [String] $LogPath - ) - - Assert-Module - - $currentLogSettings = Get-WebConfiguration ` - -filter '/system.applicationHost/sites/siteDefaults/Logfile' - - Write-Verbose -Message ($LocalizedData.VerboseGetTargetResult) - - return @{ - LogPath = $currentLogSettings.directory - LogFlags = [Array]$currentLogSettings.LogExtFileFlags - LogPeriod = $currentLogSettings.period - LogTruncateSize = $currentLogSettings.truncateSize - LoglocalTimeRollover = $currentLogSettings.localTimeRollover - LogFormat = $currentLogSettings.logFormat - } -} - -<# - .SYNOPSIS - This will set the desired state -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] $LogPath, - - [ValidateSet('Date','Time','ClientIP','UserName','SiteName','ComputerName','ServerIP','Method','UriStem','UriQuery','HttpStatus','Win32Status','BytesSent','BytesRecv','TimeTaken','ServerPort','UserAgent','Cookie','Referer','ProtocolVersion','Host','HttpSubStatus')] - [String[]] $LogFlags, - - [ValidateSet('Hourly','Daily','Weekly','Monthly','MaxSize')] - [String] $LogPeriod, - - [ValidateScript({ - ([ValidateRange(1048576, 4294967295)] $valueAsUInt64 = [UInt64]::Parse($_)) - })] - [String] $LogTruncateSize, - - [Boolean] $LoglocalTimeRollover, - - [ValidateSet('IIS','W3C','NCSA')] - [String] $LogFormat - ) - - Assert-Module - - $currentLogState = Get-TargetResource -LogPath $LogPath - - # Update LogFormat if needed - if ($PSBoundParameters.ContainsKey('LogFormat') -and ` - ($LogFormat -ne $currentLogState.LogFormat)) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdateLogFormat) - Set-WebConfigurationProperty '/system.applicationHost/sites/siteDefaults/logfile' ` - -Name logFormat ` - -Value $LogFormat - } - - # Update LogPath if needed - if ($PSBoundParameters.ContainsKey('LogPath') -and ($LogPath -ne $currentLogState.LogPath)) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdateLogPath) - Set-WebConfigurationProperty '/system.applicationHost/sites/siteDefaults/logfile' ` - -Name directory ` - -Value $LogPath - } - - # Update Logflags if needed; also sets logformat to W3C - if ($PSBoundParameters.ContainsKey('LogFlags') -and ` - (-not (Compare-LogFlags -LogFlags $LogFlags))) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdateLogFlags) - Set-WebConfigurationProperty '/system.Applicationhost/Sites/SiteDefaults/logfile' ` - -Name logFormat ` - -Value 'W3C' - Set-WebConfigurationProperty '/system.Applicationhost/Sites/SiteDefaults/logfile' ` - -Name logExtFileFlags ` - -Value ($LogFlags -join ',') - } - - # Update Log Period if needed - if ($PSBoundParameters.ContainsKey('LogPeriod') -and ` - ($LogPeriod -ne $currentLogState.LogPeriod)) - { - if ($PSBoundParameters.ContainsKey('LogTruncateSize')) - { - Write-Verbose -Message ($LocalizedData.WarningLogPeriod) - } - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdateLogPeriod) - Set-WebConfigurationProperty '/system.Applicationhost/Sites/SiteDefaults/logfile' ` - -Name period ` - -Value $LogPeriod - } - - # Update LogTruncateSize if needed - if ($PSBoundParameters.ContainsKey('LogTruncateSize') -and ` - ($LogTruncateSize -ne $currentLogState.LogTruncateSize)) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdateLogTruncateSize) - Set-WebConfigurationProperty '/system.Applicationhost/Sites/SiteDefaults/logfile' ` - -Name truncateSize ` - -Value $LogTruncateSize - Set-WebConfigurationProperty '/system.Applicationhost/Sites/SiteDefaults/logfile' ` - -Name period ` - -Value 'MaxSize' - } - - # Update LoglocalTimeRollover if needed - if ($PSBoundParameters.ContainsKey('LoglocalTimeRollover') -and ` - ($LoglocalTimeRollover -ne ` - ([System.Convert]::ToBoolean($currentLogState.LoglocalTimeRollover)))) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdateLoglocalTimeRollover) - Set-WebConfigurationProperty '/system.Applicationhost/Sites/SiteDefaults/logfile' ` - -Name localTimeRollover ` - -Value $LoglocalTimeRollover - } -} - -<# - .SYNOPSIS - This tests the desired state. If the state is not correct it will return $false. - If the state is correct it will return $true -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [String] $LogPath, - - [ValidateSet('Date','Time','ClientIP','UserName','SiteName','ComputerName','ServerIP','Method','UriStem','UriQuery','HttpStatus','Win32Status','BytesSent','BytesRecv','TimeTaken','ServerPort','UserAgent','Cookie','Referer','ProtocolVersion','Host','HttpSubStatus')] - [String[]] $LogFlags, - - [ValidateSet('Hourly','Daily','Weekly','Monthly','MaxSize')] - [String] $LogPeriod, - - [ValidateScript({ - ([ValidateRange(1048576, 4294967295)] $valueAsUInt64 = [UInt64]::Parse($_)) - })] - [String] $LogTruncateSize, - - [Boolean] $LoglocalTimeRollover, - - [ValidateSet('IIS','W3C','NCSA')] - [String] $LogFormat - ) - - Assert-Module - - $currentLogState = Get-TargetResource -LogPath $LogPath - - # Check LogFormat - if ($PSBoundParameters.ContainsKey('LogFormat')) - { - # Warn if LogFlags are passed in and Current LogFormat is not W3C - if ($PSBoundParameters.ContainsKey('LogFlags') -and ` - $LogFormat -ne 'W3C') - { - Write-Verbose -Message ($LocalizedData.WarningIncorrectLogFormat) - } - - # Warn if LogFlags are passed in and Desired LogFormat is not W3C - if($PSBoundParameters.ContainsKey('LogFlags') -and ` - $currentLogState.LogFormat -ne 'W3C') - { - Write-Verbose -Message ($LocalizedData.WarningIncorrectLogFormat) - } - - # Check LogFormat - if ($LogFormat -ne $currentLogState.LogFormat) - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseLogFormat) - return $false - } - } - - # Check LogFlags - if ($PSBoundParameters.ContainsKey('LogFlags') -and ` - (-not (Compare-LogFlags -LogFlags $LogFlags))) - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseLogFlags) - return $false - } - - # Check LogPath - if ($PSBoundParameters.ContainsKey('LogPath') -and ` - ($LogPath -ne $currentLogState.LogPath)) - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseLogPath) - return $false - } - - # Check LogPeriod - if ($PSBoundParameters.ContainsKey('LogPeriod') -and ` - ($LogPeriod -ne $currentLogState.LogPeriod)) - { - if ($PSBoundParameters.ContainsKey('LogTruncateSize')) - { - Write-Verbose -Message ($LocalizedData.WarningLogPeriod) - } - - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseLogPeriod) - return $false - } - - # Check LogTruncateSize - if ($PSBoundParameters.ContainsKey('LogTruncateSize') -and ` - ($LogTruncateSize -ne $currentLogState.LogTruncateSize)) - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseLogTruncateSize) - return $false - } - - # Check LoglocalTimeRollover - if ($PSBoundParameters.ContainsKey('LoglocalTimeRollover') -and ` - ($LoglocalTimeRollover -ne ` - ([System.Convert]::ToBoolean($currentLogState.LoglocalTimeRollover)))) - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseLoglocalTimeRollover) - return $false - } - - return $true - -} - -#region Helper functions - -<# - .SYNOPSIS - Helper function used to validate the logflags status. - Returns False if the loglfags do not match and true if they do - - .PARAMETER LogFlags - Specifies flags to check -#> -function Compare-LogFlags -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [ValidateSet('Date','Time','ClientIP','UserName','SiteName','ComputerName','ServerIP','Method','UriStem','UriQuery','HttpStatus','Win32Status','BytesSent','BytesRecv','TimeTaken','ServerPort','UserAgent','Cookie','Referer','ProtocolVersion','Host','HttpSubStatus')] - [String[]] $LogFlags - ) - - $currentLogFlags = (Get-WebConfigurationProperty ` - -Filter '/system.Applicationhost/Sites/SiteDefaults/logfile' ` - -Name LogExtFileFlags) -split ',' | ` - Sort-Object - - $proposedLogFlags = $LogFlags -split ',' | Sort-Object - - if (Compare-Object -ReferenceObject $currentLogFlags ` - -DifferenceObject $proposedLogFlags) - { - return $false - } - - return $true - -} - -#endregion - -Export-ModuleMember -function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisLogging/MSFT_xIisLogging.schema.mof b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisLogging/MSFT_xIisLogging.schema.mof deleted file mode 100644 index 234f8b1c..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisLogging/MSFT_xIisLogging.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("xIisLogging")] -class MSFT_xIisLogging : OMI_BaseResource -{ - [Key, Description ("The directory to be used for logfiles")] String LogPath; - [Write, Description ("The W3C logging fields"), ValueMap{"Date","Time","ClientIP","UserName","SiteName","ComputerName","ServerIP","Method","UriStem","UriQuery","HttpStatus","Win32Status","BytesSent","BytesRecv","TimeTaken","ServerPort","UserAgent","Cookie","Referer","ProtocolVersion","Host","HttpSubStatus"}, Values{"Date","Time","ClientIP","UserName","SiteName","ComputerName","ServerIP","Method","UriStem","UriQuery","HttpStatus","Win32Status","BytesSent","BytesRecv","TimeTaken","ServerPort","UserAgent","Cookie","Referer","ProtocolVersion","Host","HttpSubStatus"}] String LogFlags[]; - [Write, Description ("How often the log file should rollover"), ValueMap{"Hourly","Daily","Weekly","Monthly","MaxSize"}, Values{"Hourly","Daily","Weekly","Monthly","MaxSize"}] String LogPeriod; - [Write, Description ("How large the file should be before it is truncated")] String LogTruncateSize; - [Write, Description ("Use the localtime for file naming and rollover")] Boolean LoglocalTimeRollover; - [Write, Description ("Format of the Logfiles. Only W3C supports LogFlags"), ValueMap{"IIS","W3C","NCSA"}, Values{"IIS","W3C","NCSA"}] String LogFormat; -}; diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisMimeTypeMapping/MSFT_xIisMimeTypeMapping.psm1 b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisMimeTypeMapping/MSFT_xIisMimeTypeMapping.psm1 deleted file mode 100644 index 4423852f..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisMimeTypeMapping/MSFT_xIisMimeTypeMapping.psm1 +++ /dev/null @@ -1,192 +0,0 @@ -# Load the Helper Module -Import-Module -Name "$PSScriptRoot\..\Helper.psm1" - -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData -StringData @' - NoWebAdministrationModule = Please ensure that WebAdministration module is installed. - AddingType = Adding MIMEType '{0}' for extension '{1}' - RemovingType = Removing MIMEType '{0}' for extension '{1}' - TypeExists = MIMEType '{0}' for extension '{1}' already exist - TypeNotPresent = MIMEType '{0}' for extension '{1}' is not present as requested - TypeStatusUnknown = MIMEType '{0}' for extension '{1}' is is an unknown status - VerboseGetTargetPresent = MIMEType is present - VerboseGetTargetAbsent = MIMEType is absent - VerboseSetTargetError = Cannot set type -'@ -} - -function Get-TargetResource -{ - <# - .SYNOPSIS - This will return a hashtable of results - #> - [OutputType([Hashtable])] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [String] $Extension, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [String] $MimeType, - - [ValidateSet('Present', 'Absent')] - [Parameter(Mandatory)] - [String] $Ensure - ) - - # Check if WebAdministration module is present for IIS cmdlets - Assert-Module - - $mt = Get-Mapping -Extension $Extension -Type $MimeType - - if ($null -eq $mt) - { - Write-Verbose -Message $LocalizedData.VerboseGetTargetAbsent - return @{ - Ensure = 'Absent' - Extension = $null - MimeType = $null - } - } - else - { - Write-Verbose -Message $LocalizedData.VerboseGetTargetPresent - return @{ - Ensure = 'Present' - Extension = $mt.fileExtension - MimeType = $mt.mimeType - } - } -} -function Set-TargetResource -{ - <# - .SYNOPSIS - This will set the desired state - #> - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [String] $Extension, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [String] $MimeType, - - [ValidateSet('Present', 'Absent')] - [Parameter(Mandatory)] - [String] $Ensure - ) - - Assert-Module - - [String] $psPathRoot = 'MACHINE/WEBROOT/APPHOST' - [String] $sectionNode = 'system.webServer/staticContent' - - $mt = Get-Mapping -Extension $Extension -Type $MimeType - - if ($null -eq $mt -and $Ensure -eq 'Present') - { - # add the MimeType - Add-WebConfigurationProperty -PSPath $psPathRoot ` - -Filter $sectionNode ` - -Name '.' ` - -Value @{fileExtension="$Extension";mimeType="$MimeType"} - Write-Verbose -Message ($LocalizedData.AddingType -f $MimeType,$Extension); - } - elseif ($null -ne $mt -and $Ensure -eq 'Absent') - { - # remove the MimeType - Remove-WebConfigurationProperty -PSPath $psPathRoot ` - -Filter $sectionNode ` - -Name '.' ` - -AtElement @{fileExtension="$Extension"} - Write-Verbose -Message ($LocalizedData.RemovingType -f $MimeType,$Extension); - } - else - { - Write-Verbose -Message $LocalizedData.VerboseSetTargetError - } -} - -function Test-TargetResource -{ - <# - .SYNOPSIS - This tests the desired state. If the state is not correct it will return $false. - If the state is correct it will return $true - #> - - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [String] $Extension, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [String] $MimeType, - - [ValidateSet('Present', 'Absent')] - [Parameter(Mandatory)] - [String] $Ensure - ) - - [Boolean] $DesiredConfigurationMatch = $true; - - Assert-Module - - $mt = Get-Mapping -Extension $Extension -Type $MimeType - - if (($null -eq $mt -and $Ensure -eq 'Present') -or ($null -ne $mt -and $Ensure -eq 'Absent')) - { - $DesiredConfigurationMatch = $false; - } - elseif ($null -ne $mt -and $Ensure -eq 'Present') - { - # Already there - Write-Verbose -Message ($LocalizedData.TypeExists -f $MimeType,$Extension); - } - elseif ($null -eq $mt -and $Ensure -eq 'Absent') - { - # TypeNotPresent - Write-Verbose -Message ($LocalizedData.TypeNotPresent -f $MimeType,$Extension); - } - else - { - $DesiredConfigurationMatch = $false; - Write-Verbose -Message ($LocalizedData.TypeStatusUnknown -f $MimeType,$Extension); - } - - return $DesiredConfigurationMatch -} - -#region Helper Functions - -function Get-Mapping -{ - - [CmdletBinding()] - param - ( - [String] $Extension, - - [String] $Type - ) - - [String] $filter = "system.webServer/staticContent/mimeMap[@fileExtension='" + ` - $Extension + "' and @mimeType='" + $Type + "']" - return Get-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST' -Filter $filter -Name . -} - -#endregion - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisMimeTypeMapping/MSFT_xIisMimeTypeMapping.schema.mof b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisMimeTypeMapping/MSFT_xIisMimeTypeMapping.schema.mof deleted file mode 100644 index 1dadb389..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisMimeTypeMapping/MSFT_xIisMimeTypeMapping.schema.mof +++ /dev/null @@ -1,7 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("xIisMimeTypeMapping")] -class MSFT_xIisMimeTypeMapping : OMI_BaseResource -{ - [Key] string Extension; - [Key] string MimeType; - [Required,ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] string Ensure; -}; diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisModule/MSFT_xIisModule.psm1 b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisModule/MSFT_xIisModule.psm1 deleted file mode 100644 index efdca6ba..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisModule/MSFT_xIisModule.psm1 +++ /dev/null @@ -1,414 +0,0 @@ -# Load the Helper Module -Import-Module -Name "$PSScriptRoot\..\Helper.psm1" - -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData -StringData @' - VerboseGetTargetResource = Get-TargetResource has been run. - VerboseSetTargetRemoveHandler = Removing handler - VerboseSetTargetAddHandler = Adding handler. - VerboseSetTargetAddfastCgi = Adding fastCgi. - VerboseTestTargetResource = Get-TargetResource has been run. - VerboseGetIisHandler = Getting Handler for {0} in Site {1} - VerboseTestTargetResourceImplVerb = Matched Verb {0} - VerboseTestTargetResourceImplExtraVerb = Extra Verb {0} - VerboseTestTargetResourceImplRequestPath = RequestPath is {0} - VerboseTestTargetResourceImplPath = Path is {0} - VerboseTestTargetResourceImplresourceStatusRequestPath = StatusRequestPath is {0} - VerboseTestTargetResourceImplresourceStatusPath = StatusPath is {0} - VerboseTestTargetResourceImplModulePresent = Module present is {0} - VerboseTestTargetResourceImplModuleConfigured = ModuleConfigured is {0} -'@ -} -function Get-TargetResource -{ - <# - .SYNOPSIS - This will return a hashtable of results - #> - - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [String] $Path, - - [Parameter(Mandatory = $true)] - [String] $Name, - - [Parameter(Mandatory = $true)] - [String] $RequestPath, - - [Parameter(Mandatory = $true)] - [String[]] $Verb, - - [ValidateSet('FastCgiModule')] - [String] $ModuleType = 'FastCgiModule', - - [String] $SiteName - ) - - Assert-Module - - $currentVerbs = @() - $Ensure = 'Absent' - - $modulePresent = $false; - - $handler = Get-IisHandler -Name $Name -SiteName $SiteName - - if($handler ) - { - $Ensure = 'Present' - $modulePresent = $true; - } - - foreach($thisVerb in $handler.Verb) - { - $currentVerbs += $thisVerb - } - - $fastCgiSetup = $false - - if($handler.Modules -eq 'FastCgiModule') - { - $fastCgi = Get-WebConfiguration /system.webServer/fastCgi/* ` - -PSPath (Get-IisSitePath ` - -SiteName $SiteName) | ` - Where-Object{$_.FullPath -ieq $handler.ScriptProcessor} - if($fastCgi) - { - $fastCgiSetup = $true - } - } - - Write-Verbose -Message $LocalizedData.VerboseGetTargetResource - - $returnValue = @{ - Path = $handler.ScriptProcessor - Name = $handler.Name - RequestPath = $handler.Path - Verb = $currentVerbs - SiteName = $SiteName - Ensure = $Ensure - ModuleType = $handler.Modules - EndPointSetup = $fastCgiSetup - } - - $returnValue - -} - -function Set-TargetResource -{ - <# - .SYNOPSIS - This will set the desired state - #> - - [CmdletBinding()] - param - ( - [ValidateSet('Present','Absent')] - [String] $Ensure, - - [Parameter(Mandatory = $true)] - [String] $Path, - - [Parameter(Mandatory = $true)] - [String] $Name, - - [Parameter(Mandatory = $true)] - [String] $RequestPath, - - [Parameter(Mandatory = $true)] - [String[]] $Verb, - - [ValidateSet('FastCgiModule')] - [String] $ModuleType = 'FastCgiModule', - - [String] $SiteName - ) - - $getParameters = Get-PSBoundParameters -FunctionParameters $PSBoundParameters - $resourceStatus = Get-TargetResource @GetParameters - $resourceTests = Test-TargetResourceImpl @PSBoundParameters -ResourceStatus $resourceStatus - if($resourceTests.Result) - { - return - } - - if($Ensure -eq 'Present') - { - if($resourceTests.ModulePresent -and -not $resourceTests.ModuleConfigured) - { - Write-Verbose -Message $LocalizedData.VerboseSetTargetRemoveHandler - Remove-IisHandler - } - - if(-not $resourceTests.ModulePresent -or -not $resourceTests.ModuleConfigured) - { - Write-Verbose -Message $LocalizedData.VerboseSetTargetAddHandler - Add-webconfiguration /system.webServer/handlers iis:\ -Value @{ - Name = $Name - Path = $RequestPath - Verb = $Verb -join ',' - Module = $ModuleType - ScriptProcessor = $Path - } - } - - if(-not $resourceTests.EndPointSetup) - { - Write-Verbose -Message $LocalizedData.VerboseSetTargetAddfastCgi - Add-WebConfiguration /system.webServer/fastCgi iis:\ -Value @{ - FullPath = $Path - } - } - } - else - { - Write-Verbose -Message $LocalizedData.VerboseSetTargetRemoveHandler - Remove-IisHandler - } -} - -function Test-TargetResource -{ - <# - .SYNOPSIS - This tests the desired state. If the state is not correct it will return $false. - If the state is correct it will return $true - #> - - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [ValidateSet('Present','Absent')] - [String] $Ensure, - - [Parameter(Mandatory = $true)] - [String] $Path, - - [Parameter(Mandatory = $true)] - [String] $Name, - - [Parameter(Mandatory = $true)] - [String] $RequestPath, - - [Parameter(Mandatory = $true)] - [String[]] $Verb, - - [ValidateSet('FastCgiModule')] - [String] $ModuleType = 'FastCgiModule', - - [String] $SiteName - ) - - $getParameters = Get-PSBoundParameters -FunctionParameters $PSBoundParameters - $resourceStatus = Get-TargetResource @GetParameters - - Write-Verbose -Message $LocalizedData.VerboseTestTargetResource - - return (Test-TargetResourceImpl @PSBoundParameters -ResourceStatus $resourceStatus).Result -} - -#region Helper Functions - -function Get-PSBoundParameters -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [Hashtable] $FunctionParameters - ) - - [Hashtable] $getParameters = @{} - foreach($key in $FunctionParameters.Keys) - { - if($key -ine 'Ensure') - { - $getParameters.Add($key, $FunctionParameters.$key) | Out-Null - } - } - - return $getParameters -} - -function Get-IisSitePath -{ - [OutputType([System.String])] - [CmdletBinding()] - param - ( - [String] $SiteName - ) - - if (-not $SiteName) - { - return 'IIS:\' - } - else - { - return Join-Path 'IIS:\sites\' $SiteName - } -} - -function Get-IisHandler -{ - <# - .NOTES - Get a list on IIS handlers - #> - [CmdletBinding()] - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - - [String] $Name, - - [String] $SiteName - ) - - Write-Verbose -Message ($LocalizedData.VerboseGetIisHandler -f $Name,$SiteName) - return Get-Webconfiguration -Filter 'System.WebServer/handlers/*' ` - -PSPath (Get-IisSitePath ` - -SiteName $SiteName) | ` - Where-Object{$_.Name -ieq $Name} -} - -function Remove-IisHandler -{ - <# - .NOTES - Remove an IIS Handler - #> - param - ( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - - [String] $Name, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - - [String] $SiteName - ) - - $handler = Get-IisHandler @PSBoundParameters - - if($handler) - { - Clear-WebConfiguration -PSPath $handler.PSPath ` - -Filter $handler.ItemXPath ` - -Location $handler.Location - } -} - -function Test-TargetResourceImpl -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [String] $Path, - - [Parameter(Mandatory = $true)] - [String] $Name, - - [Parameter(Mandatory = $true)] - [String] $RequestPath, - - [Parameter(Mandatory = $true)] - [String[]] $Verb, - - [ValidateSet('FastCgiModule')] - [String] $ModuleType = 'FastCgiModule', - - [String] $SiteName, - - [ValidateSet('Present','Absent')] - [String] $Ensure, - - [Parameter(Mandatory = $true)] - [HashTable] $resourceStatus - ) - - $matchedVerbs = @() - $mismatchVerbs =@() - foreach($thisVerb in $resourceStatus.Verb) - { - if($Verb -icontains $thisVerb) - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetResourceImplVerb ` - -f $Verb) - $matchedVerbs += $thisVerb - } - else - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetResourceImplExtraVerb ` - -f $Verb) - $mismatchVerbs += $thisVerb - } - } - - $modulePresent = $false - if($resourceStatus.Name.Length -gt 0) - { - $modulePresent = $true - } - - Write-Verbose -Message ($LocalizedData.VerboseTestTargetResourceImplRequestPath ` - -f $RequestPath) - Write-Verbose -Message ($LocalizedData.VerboseTestTargetResourceImplPath ` - -f $Path) - Write-Verbose -Message ($LocalizedData.VerboseTestTargetResourceImplresourceStatusRequestPath ` - -f $($resourceStatus.RequestPath)) - Write-Verbose -Message ($LocalizedData.VerboseTestTargetResourceImplresourceStatusPath ` - -f $($resourceStatus.Path)) - - $moduleConfigured = $false - if($modulePresent -and ` - $mismatchVerbs.Count -eq 0 -and ` - $matchedVerbs.Count-eq $Verb.Count -and ` - $resourceStatus.Path -eq $Path -and ` - $resourceStatus.RequestPath -eq $RequestPath) - { - $moduleConfigured = $true - } - - Write-Verbose -Message ($LocalizedData.VerboseTestTargetResourceImplModulePresent ` - -f $ModulePresent) - Write-Verbose -Message ($LocalizedData.VerboseTestTargetResourceImplModuleConfigured ` - -f $ModuleConfigured) - if($moduleConfigured -and ($ModuleType -ne 'FastCgiModule' -or $resourceStatus.EndPointSetup)) - { - return @{ - Result = $true - ModulePresent = $modulePresent - ModuleConfigured = $moduleConfigured - } - } - else - { - return @{ - Result = $false - ModulePresent = $modulePresent - ModuleConfigured = $moduleConfigured - } - } -} - - -#endregion - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisModule/MSFT_xIisModule.schema.mof b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisModule/MSFT_xIisModule.schema.mof deleted file mode 100644 index 135e12d7..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisModule/MSFT_xIisModule.schema.mof +++ /dev/null @@ -1,17 +0,0 @@ - -[ClassVersion("1.0.0"), FriendlyName("xIisModule")] -class MSFT_xIisModule : OMI_BaseResource -{ - [Key, Description("The path to the module, usually a dll, to be added to IIS.")] String Path; - [Required, Description("The logical name of the module to add to IIS.")] String Name; - [Required, Description("The allowed request Path example: *.php")] String RequestPath; - [Required, Description("The supported verbs for the module.")] String Verb[]; - [Write, Description("The IIS Site to register the module.")] String SiteName; - [Write, Description("Should the module be present or absent."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("The type of the module."), ValueMap{"FastCgiModule"}, Values{"FastCgiModule"}] String ModuleType; - [Read, Description("The End Point is setup. Such as a Fast Cgi endpoint.")] Boolean EndPointSetup; -}; - - - - diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisModule/xIisModuleDesigner.ps1 b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisModule/xIisModuleDesigner.ps1 deleted file mode 100644 index 3f9c39c6..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xIisModule/xIisModuleDesigner.ps1 +++ /dev/null @@ -1,50 +0,0 @@ -$diff = join-Path ${env:ProgramFiles(x86)} "Beyond compare 2\bc2.exe" -$friendlyName = "xIisModule" -$resourceName = "MSFT_$friendlyName" -$classVersion = "1.0.0" - -$scriptRoot = Split-Path $MyInvocation.MyCommand.Path -$originalModuleRoot = join-Path $scriptroot "..\.." -$originalModuleRootPath = Resolve-Path $originalModuleRoot -$moduleRoot = Join-Path $env:temp "$($originalModuleRootPath.path | split-path -Leaf)Temp" - -$resources = @() - -#Key properties -$resources += New-xDscResourceProperty -Name Path -Type String -Attribute Key -Description "The path to the module, usually a dll, to be added to IIS." - - -#Required Properites -$resources += New-xDscResourceProperty -Name Name -Type String -Attribute Required -Description "The logical name of the module to add to IIS." -$resources += New-xDscResourceProperty -Name RequestPath -Type String -Attribute Required -Description "The allowed request Path example: *.php" -$resources += New-xDscResourceProperty -Name Verb -Type String[] -Attribute Required -Description "The supported verbs for the module." - -#Write Properties -$resources += New-xDscResourceProperty -Name SiteName -Type String -Attribute Write -Description "The IIS Site to register the module." -$resources += New-xDscResourceProperty -Name Ensure -Type String -Attribute Write -Description "Should the module be present or absent." -ValidateSet @("Present","Absent") -$resources += New-xDscResourceProperty -Name ModuleType -Type String -Attribute Write -Description "The type of the module." -ValidateSet @("FastCgiModule") - -#Read Properties -$resources += New-xDscResourceProperty -Name EndPointSetup -Type Boolean -Attribute Read -Description "The End Point is setup. Such as a Fast Cgi endpoint." - - - -Write-Verbose "updating..." -Verbose - -# Create a New template resource to a temporary folder -New-xDscResource -Property $resources -ClassVersion $classVersion -Name $resourceName -Path $moduleRoot -FriendlyName $friendlyName - - -# Use your favorite diff program to compare and merge the current resource and the existing resource - -if((test-Path $diff)) -{ - &$diff $originalModuleRoot $moduleRoot -} -else -{ - Write-Warning "Diff propgram not found!`r`nUse your favorite diff program to compare and merge:`r`n `t$($originalModuleRootPath.path)`r`n and:`r`n `t$moduleRoot" -} - - - diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xSSLSettings/MSFT_xSSLSettings.psm1 b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xSSLSettings/MSFT_xSSLSettings.psm1 deleted file mode 100644 index 7e7fbb30..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xSSLSettings/MSFT_xSSLSettings.psm1 +++ /dev/null @@ -1,175 +0,0 @@ -# Load the Helper Module -Import-Module -Name "$PSScriptRoot\..\Helper.psm1" - -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData -StringData @' - UnableToFindConfig = Unable to find configuration in AppHost Config. - SettingsslConfig = Setting {0} ssl binding to {1}. - sslBindingsCorrect = ssl Bindings for {0} are correct. - sslBindingsAbsent = ssl Bindings for {0} are absent. - VerboseGetTargetResource = Get-TargetResource has been run. -'@ -} - -<# - .SYNOPSIS - This will return a hashtable of results including Name, Bindings, and Ensure -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [String] $Name, - - [Parameter(Mandatory = $true)] - [AllowEmptyString()] - [ValidateSet('','Ssl','SslNegotiateCert','SslRequireCert','Ssl128')] - [String[]] $Bindings - ) - - Assert-Module - - $ensure = 'Absent' - - try - { - $params = @{ - PSPath = 'MACHINE/WEBROOT/APPHOST' - Location = $Name - Filter = 'system.webServer/security/access' - Name = 'sslFlags' - } - - $sslSettings = Get-WebConfigurationProperty @params - - # If SSL is configured at all this will be a String else - # it willl be a configuration object. - if ($sslSettings.GetType().FullName -eq 'System.String') - { - $Bindings = $sslSettings.Split(',') - $ensure = 'Present' - } - } - catch [Exception] - { - $errorMessage = $LocalizedData.UnableToFindConfig - New-TerminatingError -ErrorId 'UnableToFindConfig'` - -ErrorMessage $errorMessage` - -ErrorCategory 'InvalidResult' - } - - Write-Verbose -Message $LocalizedData.VerboseGetTargetResource - - return @{ - Name = $Name - Bindings = $Bindings - Ensure = $ensure - } -} - -<# - .SYNOPSIS - This will update the desired state based on the Bindings passed in -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] $Name, - - [Parameter(Mandatory = $true)] - [AllowEmptyString()] - [ValidateSet('','Ssl','SslNegotiateCert','SslRequireCert','Ssl128')] - [String[]] $Bindings, - - [ValidateSet('Present','Absent')] - [String] $Ensure = 'Present' - ) - - Assert-Module - - if ($Ensure -eq 'Absent' -or $Bindings.toLower().Contains('none')) - { - $params = @{ - PSPath = 'MACHINE/WEBROOT/APPHOST' - Location = $Name - Filter = 'system.webServer/security/access' - Name = 'sslFlags' - Value = '' - } - - Write-Verbose -Message ($LocalizedData.SettingsslConfig -f $Name, 'None') - Set-WebConfigurationProperty @params - } - - else - { - $sslBindings = $Bindings -join ',' - $params = @{ - PSPath = 'MACHINE/WEBROOT/APPHOST' - Location = $Name - Filter = 'system.webServer/security/access' - Name = 'sslFlags' - Value = $sslBindings - } - - Write-Verbose -Message ($LocalizedData.SettingsslConfig -f $Name, $params.Value) - Set-WebConfigurationProperty @params - } -} - -<# - .SYNOPSIS - This tests the desired state. If the state is not correct it will return $false. - If the state is correct it will return $true -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [String] $Name, - - [Parameter(Mandatory = $true)] - [AllowEmptyString()] - [ValidateSet('','Ssl','SslNegotiateCert','SslRequireCert','Ssl128')] - [String[]] $Bindings, - - [ValidateSet('Present','Absent')] - [String] $Ensure = 'Present' - ) - - $sslSettings = Get-TargetResource -Name $Name -Bindings $Bindings - - if ($Ensure -eq 'Present' -and $sslSettings.Ensure -eq 'Present') - { - $sslComp = Compare-Object -ReferenceObject $Bindings ` - -DifferenceObject $sslSettings.Bindings ` - -PassThru - if ($null -eq $sslComp) - { - Write-Verbose -Message ($LocalizedData.sslBindingsCorrect -f $Name) - return $true; - } - } - - if ($Ensure -eq 'Absent' -and $sslSettings.Ensure -eq 'Absent') - { - Write-Verbose -Message ($LocalizedData.sslBindingsAbsent -f $Name) - return $true; - } - - return $false; -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xSSLSettings/MSFT_xSSLSettings.schema.mof b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xSSLSettings/MSFT_xSSLSettings.schema.mof deleted file mode 100644 index 8239042b..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xSSLSettings/MSFT_xSSLSettings.schema.mof +++ /dev/null @@ -1,7 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("xSSLSettings")] -class MSFT_xSSLSettings : OMI_BaseResource -{ - [Key, Description("Name of website in which to modify the SSL Settings")] String Name; - [Required, Description("The Bindings in which to modify for the website"), ValueMap{"","Ssl","SslNegotiateCert","SslRequireCert","Ssl128"},Values{"","Ssl","SslNegotiateCert","SslRequireCert","Ssl128"}] String Bindings[]; - [Write,ValueMap{"Present", "Absent"},Values{"Present", "Absent"},Description("Whether the bindings should be present or absent")] String Ensure; -}; diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebAppPool/MSFT_xWebAppPool.psm1 b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebAppPool/MSFT_xWebAppPool.psm1 deleted file mode 100644 index db2652a1..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebAppPool/MSFT_xWebAppPool.psm1 +++ /dev/null @@ -1,927 +0,0 @@ -#requires -Version 4.0 -Modules CimCmdlets - -# Load the Helper Module -Import-Module -Name "$PSScriptRoot\..\Helper.psm1" - -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData -StringData @' - ErrorAppCmdNonZeroExitCode = AppCmd.exe has exited with error code "{0}". - VerboseAppPoolFound = Application pool "{0}" was found. - VerboseAppPoolNotFound = Application pool "{0}" was not found. - VerboseEnsureNotInDesiredState = The "Ensure" state of application pool "{0}" does not match the desired state. - VerbosePropertyNotInDesiredState = The "{0}" property of application pool "{1}" does not match the desired state. - VerboseCredentialToBeCleared = Custom account credentials of application pool "{0}" need to be cleared because the "identityType" property is not set to "SpecificUser". - VerboseCredentialToBeIgnored = The "Credential" property is only valid when the "identityType" property is set to "SpecificUser". - VerboseResourceInDesiredState = The target resource is already in the desired state. No action is required. - VerboseResourceNotInDesiredState = The target resource is not in the desired state. - VerboseNewAppPool = Creating application pool "{0}". - VerboseRemoveAppPool = Removing application pool "{0}". - VerboseStartAppPool = Starting application pool "{0}". - VerboseStopAppPool = Stopping application pool "{0}". - VerboseSetProperty = Setting the "{0}" property of application pool "{1}". - VerboseClearCredential = Clearing custom account credentials of application pool "{0}" because the "identityType" property is not set to "SpecificUser". - VerboseRestartScheduleValueAdd = Adding value "{0}" to the "restartSchedule" collection of application pool "{1}". - VerboseRestartScheduleValueRemove = Removing value "{0}" from the "restartSchedule" collection of application pool "{1}". -'@ -} - -# Writable properties except Ensure and Credential. -data PropertyData -{ - @( - # General - @{Name = 'State'; Path = 'state'} - @{Name = 'autoStart'; Path = 'autoStart'} - @{Name = 'CLRConfigFile'; Path = 'CLRConfigFile'} - @{Name = 'enable32BitAppOnWin64'; Path = 'enable32BitAppOnWin64'} - @{Name = 'enableConfigurationOverride'; Path = 'enableConfigurationOverride'} - @{Name = 'managedPipelineMode'; Path = 'managedPipelineMode'} - @{Name = 'managedRuntimeLoader'; Path = 'managedRuntimeLoader'} - @{Name = 'managedRuntimeVersion'; Path = 'managedRuntimeVersion'} - @{Name = 'passAnonymousToken'; Path = 'passAnonymousToken'} - @{Name = 'startMode'; Path = 'startMode'} - @{Name = 'queueLength'; Path = 'queueLength'} - - # CPU - @{Name = 'cpuAction'; Path = 'cpu.action'} - @{Name = 'cpuLimit'; Path = 'cpu.limit'} - @{Name = 'cpuResetInterval'; Path = 'cpu.resetInterval'} - @{Name = 'cpuSmpAffinitized'; Path = 'cpu.smpAffinitized'} - @{Name = 'cpuSmpProcessorAffinityMask'; Path = 'cpu.smpProcessorAffinityMask'} - @{Name = 'cpuSmpProcessorAffinityMask2'; Path = 'cpu.smpProcessorAffinityMask2'} - - # Process Model - @{Name = 'identityType'; Path = 'processModel.identityType'} - @{Name = 'idleTimeout'; Path = 'processModel.idleTimeout'} - @{Name = 'idleTimeoutAction'; Path = 'processModel.idleTimeoutAction'} - @{Name = 'loadUserProfile'; Path = 'processModel.loadUserProfile'} - @{Name = 'logEventOnProcessModel'; Path = 'processModel.logEventOnProcessModel'} - @{Name = 'logonType'; Path = 'processModel.logonType'} - @{Name = 'manualGroupMembership'; Path = 'processModel.manualGroupMembership'} - @{Name = 'maxProcesses'; Path = 'processModel.maxProcesses'} - @{Name = 'pingingEnabled'; Path = 'processModel.pingingEnabled'} - @{Name = 'pingInterval'; Path = 'processModel.pingInterval'} - @{Name = 'pingResponseTime'; Path = 'processModel.pingResponseTime'} - @{Name = 'setProfileEnvironment'; Path = 'processModel.setProfileEnvironment'} - @{Name = 'shutdownTimeLimit'; Path = 'processModel.shutdownTimeLimit'} - @{Name = 'startupTimeLimit'; Path = 'processModel.startupTimeLimit'} - - # Process Orphaning - @{Name = 'orphanActionExe'; Path = 'failure.orphanActionExe'} - @{Name = 'orphanActionParams'; Path = 'failure.orphanActionParams'} - @{Name = 'orphanWorkerProcess'; Path = 'failure.orphanWorkerProcess'} - - # Rapid-Fail Protection - @{Name = 'loadBalancerCapabilities'; Path = 'failure.loadBalancerCapabilities'} - @{Name = 'rapidFailProtection'; Path = 'failure.rapidFailProtection'} - @{Name = 'rapidFailProtectionInterval'; Path = 'failure.rapidFailProtectionInterval'} - @{Name = 'rapidFailProtectionMaxCrashes'; Path = 'failure.rapidFailProtectionMaxCrashes'} - @{Name = 'autoShutdownExe'; Path = 'failure.autoShutdownExe'} - @{Name = 'autoShutdownParams'; Path = 'failure.autoShutdownParams'} - - # Recycling - @{Name = 'disallowOverlappingRotation'; Path = 'recycling.disallowOverlappingRotation'} - @{Name = 'disallowRotationOnConfigChange'; Path = 'recycling.disallowRotationOnConfigChange'} - @{Name = 'logEventOnRecycle'; Path = 'recycling.logEventOnRecycle'} - @{Name = 'restartMemoryLimit'; Path = 'recycling.periodicRestart.memory'} - @{Name = 'restartPrivateMemoryLimit'; Path = 'recycling.periodicRestart.privateMemory'} - @{Name = 'restartRequestsLimit'; Path = 'recycling.periodicRestart.requests'} - @{Name = 'restartTimeLimit'; Path = 'recycling.periodicRestart.time'} - @{Name = 'restartSchedule'; Path = 'recycling.periodicRestart.schedule'} - ) -} - -function Get-TargetResource -{ - <# - .SYNOPSIS - This will return a hashtable of results - #> - - [CmdletBinding()] - [OutputType([Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateLength(1, 64)] - [String] $Name - ) - - Assert-Module - - # XPath -Filter is case-sensitive. Use Where-Object to get the target application pool by name. - $appPool = Get-WebConfiguration -Filter '/system.applicationHost/applicationPools/add' | - Where-Object -FilterScript {$_.name -eq $Name} - - $cimCredential = $null - - if ($null -eq $appPool) - { - Write-Verbose -Message ($LocalizedData['VerboseAppPoolNotFound'] -f $Name) - - $ensureResult = 'Absent' - } - else - { - Write-Verbose -Message ($LocalizedData['VerboseAppPoolFound'] -f $Name) - - $ensureResult = 'Present' - - if ($appPool.processModel.identityType -eq 'SpecificUser') - { - $cimCredential = New-CimInstance -ClientOnly ` - -ClassName MSFT_Credential ` - -Namespace root/microsoft/windows/DesiredStateConfiguration ` - -Property @{ - UserName = [String]$appPool.processModel.userName - Password = [String]$appPool.processModel.password - } - } - } - - $returnValue = @{ - Name = $Name - Ensure = $ensureResult - Credential = $cimCredential - } - - $PropertyData.Where( - { - $_.Name -ne 'restartSchedule' - } - ).ForEach( - { - $property = Get-Property -Object $appPool -PropertyName $_.Path - $returnValue.Add($_.Name, $property) - } - ) - - $restartScheduleCurrent = [String[]]@( - @($appPool.recycling.periodicRestart.schedule.Collection).ForEach('value') - ) - - $returnValue.Add('restartSchedule', $restartScheduleCurrent) - - return $returnValue -} - -function Set-TargetResource -{ - <# - .SYNOPSIS - This will set the desired state - #> - - [CmdletBinding(SupportsShouldProcess = $true)] - param - ( - [Parameter(Mandatory = $true)] - [ValidateLength(1, 64)] - [String] $Name, - - [ValidateSet('Present', 'Absent')] - [String] $Ensure = 'Present', - - [ValidateSet('Started', 'Stopped')] - [String] $State, - - [Boolean] $autoStart, - - [String] $CLRConfigFile, - - [Boolean] $enable32BitAppOnWin64, - - [Boolean] $enableConfigurationOverride, - - [ValidateSet('Integrated', 'Classic')] - [String] $managedPipelineMode, - - [String] $managedRuntimeLoader, - - [ValidateSet('v4.0', 'v2.0', '')] - [String] $managedRuntimeVersion, - - [Boolean] $passAnonymousToken, - - [ValidateSet('OnDemand', 'AlwaysRunning')] - [String] $startMode, - - [ValidateRange(10, 65535)] - [UInt32] $queueLength, - - [ValidateSet('NoAction', 'KillW3wp', 'Throttle', 'ThrottleUnderLoad')] - [String] $cpuAction, - - [ValidateRange(0, 100000)] - [UInt32] $cpuLimit, - - [ValidateScript({ - ([ValidateRange(0, 1440)]$valueInMinutes = [TimeSpan]::Parse($_).TotalMinutes); $? - })] - [String] $cpuResetInterval, - - [Boolean] $cpuSmpAffinitized, - - [UInt32] $cpuSmpProcessorAffinityMask, - - [UInt32] $cpuSmpProcessorAffinityMask2, - - [ValidateSet( - 'ApplicationPoolIdentity', 'LocalService', 'LocalSystem', - 'NetworkService', 'SpecificUser' - )] - [String] $identityType, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [ValidateScript({ - ([ValidateRange(0, 43200)]$valueInMinutes = [TimeSpan]::Parse($_).TotalMinutes); $? - })] - [String] $idleTimeout, - - [ValidateSet('Terminate', 'Suspend')] - [String] $idleTimeoutAction, - - [Boolean] $loadUserProfile, - - [String] $logEventOnProcessModel, - - [ValidateSet('LogonBatch', 'LogonService')] - [String] $logonType, - - [Boolean] $manualGroupMembership, - - [ValidateRange(0, 2147483647)] - [UInt32] $maxProcesses, - - [Boolean] $pingingEnabled, - - [ValidateScript({ - ([ValidateRange(1, 4294967)]$valueInSeconds = [TimeSpan]::Parse($_).TotalSeconds); $? - })] - [String] $pingInterval, - - [ValidateScript({ - ([ValidateRange(1, 4294967)]$valueInSeconds = [TimeSpan]::Parse($_).TotalSeconds); $? - })] - [String] $pingResponseTime, - - [Boolean] $setProfileEnvironment, - - [ValidateScript({ - ([ValidateRange(1, 4294967)]$valueInSeconds = [TimeSpan]::Parse($_).TotalSeconds); $? - })] - [String] $shutdownTimeLimit, - - [ValidateScript({ - ([ValidateRange(1, 4294967)]$valueInSeconds = [TimeSpan]::Parse($_).TotalSeconds); $? - })] - [String] $startupTimeLimit, - - [String] $orphanActionExe, - - [String] $orphanActionParams, - - [Boolean] $orphanWorkerProcess, - - [ValidateSet('HttpLevel', 'TcpLevel')] - [String] $loadBalancerCapabilities, - - [Boolean] $rapidFailProtection, - - [ValidateScript({ - ([ValidateRange(1, 144000)]$valueInMinutes = [TimeSpan]::Parse($_).TotalMinutes); $? - })] - [String] $rapidFailProtectionInterval, - - [ValidateRange(0, 2147483647)] - [UInt32] $rapidFailProtectionMaxCrashes, - - [String] $autoShutdownExe, - - [String] $autoShutdownParams, - - [Boolean] $disallowOverlappingRotation, - - [Boolean] $disallowRotationOnConfigChange, - - [String] $logEventOnRecycle, - - [UInt32] $restartMemoryLimit, - - [UInt32] $restartPrivateMemoryLimit, - - [UInt32] $restartRequestsLimit, - - [ValidateScript({ - ([ValidateRange(0, 432000)]$valueInMinutes = [TimeSpan]::Parse($_).TotalMinutes); $? - })] - [String] $restartTimeLimit, - - [ValidateScript({ - ($_ -eq '') -or - (& { - ([ValidateRange(0, 86399)]$valueInSeconds = [TimeSpan]::Parse($_).TotalSeconds); $? - }) - })] - [String[]] $restartSchedule - ) - - if (-not $PSCmdlet.ShouldProcess($Name)) - { - return - } - - Assert-Module - - $appPool = Get-WebConfiguration -Filter '/system.applicationHost/applicationPools/add' | - Where-Object -FilterScript {$_.name -eq $Name} - - if ($Ensure -eq 'Present') - { - # Create Application Pool - if ($null -eq $appPool) - { - Write-Verbose -Message ($LocalizedData['VerboseAppPoolNotFound'] -f $Name) - Write-Verbose -Message ($LocalizedData['VerboseNewAppPool'] -f $Name) - - $appPool = New-WebAppPool -Name $Name -ErrorAction Stop - } - - # Set Application Pool Properties - if ($null -ne $appPool) - { - Write-Verbose -Message ($LocalizedData['VerboseAppPoolFound'] -f $Name) - - $PropertyData.Where( - { - ($_.Name -in $PSBoundParameters.Keys) -and - ($_.Name -notin @('State', 'restartSchedule')) - } - ).ForEach( - { - $propertyName = $_.Name - $propertyPath = $_.Path - $property = Get-Property -Object $appPool -PropertyName $propertyPath - - if ( - $PSBoundParameters[$propertyName] -ne $property - ) - { - Write-Verbose -Message ( - $LocalizedData['VerboseSetProperty'] -f $propertyName, $Name - ) - - Invoke-AppCmd -ArgumentList 'set', 'apppool', $Name, ( - '/{0}:{1}' -f $propertyPath, $PSBoundParameters[$propertyName] - ) - } - } - ) - - if ($PSBoundParameters.ContainsKey('Credential')) - { - if ($PSBoundParameters['identityType'] -eq 'SpecificUser') - { - if ($appPool.processModel.userName -ne $Credential.UserName) - { - Write-Verbose -Message ( - $LocalizedData['VerboseSetProperty'] -f 'Credential (userName)', $Name - ) - - Invoke-AppCmd -ArgumentList 'set', 'apppool', $Name, ( - '/processModel.userName:{0}' -f $Credential.UserName - ) - } - - $clearTextPassword = $Credential.GetNetworkCredential().Password - - if ($appPool.processModel.password -cne $clearTextPassword) - { - Write-Verbose -Message ( - $LocalizedData['VerboseSetProperty'] -f 'Credential (password)', $Name - ) - - Invoke-AppCmd -ArgumentList 'set', 'apppool', $Name, ( - '/processModel.password:{0}' -f $clearTextPassword - ) - } - } - else - { - Write-Verbose -Message ($LocalizedData['VerboseCredentialToBeIgnored']) - } - } - - # Ensure userName and password are cleared if identityType isn't set to SpecificUser. - if ( - ( - ( - ($PSBoundParameters.ContainsKey('identityType') -eq $true) -and - ($PSBoundParameters['identityType'] -ne 'SpecificUser') - ) -or - ( - ($PSBoundParameters.ContainsKey('identityType') -eq $false) -and - ($appPool.processModel.identityType -ne 'SpecificUser') - ) - ) -and - ( - ([String]::IsNullOrEmpty($appPool.processModel.userName) -eq $false) -or - ([String]::IsNullOrEmpty($appPool.processModel.password) -eq $false) - ) - ) - { - Write-Verbose -Message ($LocalizedData['VerboseClearCredential'] -f $Name) - - Invoke-AppCmd -ArgumentList 'set', 'apppool', $Name, '/processModel.userName:' - Invoke-AppCmd -ArgumentList 'set', 'apppool', $Name, '/processModel.password:' - } - - if ($PSBoundParameters.ContainsKey('restartSchedule')) - { - # Normalize the restartSchedule array values. - $restartScheduleDesired = [String[]]@( - $restartSchedule.Where( - { - $_ -ne '' - } - ).ForEach( - { - [TimeSpan]::Parse($_).ToString('hh\:mm\:ss') - } - ) | - Select-Object -Unique - ) - - $restartScheduleCurrent = [String[]]@( - @($appPool.recycling.periodicRestart.schedule.Collection).ForEach('value') - ) - - Compare-Object -ReferenceObject $restartScheduleDesired ` - -DifferenceObject $restartScheduleCurrent | - ForEach-Object -Process { - - # Add value - if ($_.SideIndicator -eq '<=') - { - Write-Verbose -Message ( - $LocalizedData['VerboseRestartScheduleValueAdd'] -f - $_.InputObject, $Name - ) - - Invoke-AppCmd -ArgumentList 'set', 'apppool', $Name, ( - "/+recycling.periodicRestart.schedule.[value='{0}']" -f $_.InputObject - ) - } - # Remove value - else - { - Write-Verbose -Message ( - $LocalizedData['VerboseRestartScheduleValueRemove'] -f - $_.InputObject, $Name - ) - - Invoke-AppCmd -ArgumentList 'set', 'apppool', $Name, ( - "/-recycling.periodicRestart.schedule.[value='{0}']" -f $_.InputObject - ) - } - - } - } - - if ($PSBoundParameters.ContainsKey('State') -and $appPool.state -ne $State) - { - if ($State -eq 'Started') - { - Write-Verbose -Message ($LocalizedData['VerboseStartAppPool'] -f $Name) - - Start-WebAppPool -Name $Name -ErrorAction Stop - } - else - { - Write-Verbose -Message ($LocalizedData['VerboseStopAppPool'] -f $Name) - - Stop-WebAppPool -Name $Name -ErrorAction Stop - } - } - } - } - else - { - # Remove Application Pool - if ($null -ne $appPool) - { - Write-Verbose -Message ($LocalizedData['VerboseAppPoolFound'] -f $Name) - - if ($appPool.state -eq 'Started') - { - Write-Verbose -Message ($LocalizedData['VerboseStopAppPool'] -f $Name) - - Stop-WebAppPool -Name $Name -ErrorAction Stop - } - - Write-Verbose -Message ($LocalizedData['VerboseRemoveAppPool'] -f $Name) - - Remove-WebAppPool -Name $Name -ErrorAction Stop - } - else - { - Write-Verbose -Message ($LocalizedData['VerboseAppPoolNotFound'] -f $Name) - } - } -} - -function Test-TargetResource -{ - <# - .SYNOPSIS - This tests the desired state. If the state is not correct it will return $false. - If the state is correct it will return $true - #> - - [OutputType([Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateLength(1, 64)] - [String] $Name, - - [ValidateSet('Present', 'Absent')] - [String] $Ensure = 'Present', - - [ValidateSet('Started', 'Stopped')] - [String] $State, - - [Boolean] $autoStart, - - [String] $CLRConfigFile, - - [Boolean] $enable32BitAppOnWin64, - - [Boolean] $enableConfigurationOverride, - - [ValidateSet('Integrated', 'Classic')] - [String] $managedPipelineMode, - - [String] $managedRuntimeLoader, - - [ValidateSet('v4.0', 'v2.0', '')] - [String] $managedRuntimeVersion, - - [Boolean] $passAnonymousToken, - - [ValidateSet('OnDemand', 'AlwaysRunning')] - [String] $startMode, - - [ValidateRange(10, 65535)] - [UInt32] $queueLength, - - [ValidateSet('NoAction', 'KillW3wp', 'Throttle', 'ThrottleUnderLoad')] - [String] $cpuAction, - - [ValidateRange(0, 100000)] - [UInt32] $cpuLimit, - - [ValidateScript({ - ([ValidateRange(0, 1440)]$valueInMinutes = [TimeSpan]::Parse($_).TotalMinutes); $? - })] - [String] $cpuResetInterval, - - [Boolean] $cpuSmpAffinitized, - - [UInt32] $cpuSmpProcessorAffinityMask, - - [UInt32] $cpuSmpProcessorAffinityMask2, - - [ValidateSet( - 'ApplicationPoolIdentity', 'LocalService', 'LocalSystem', - 'NetworkService', 'SpecificUser' - )] - [String] $identityType, - - [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential, - - [ValidateScript({ - ([ValidateRange(0, 43200)]$valueInMinutes = [TimeSpan]::Parse($_).TotalMinutes); $? - })] - [String] $idleTimeout, - - [ValidateSet('Terminate', 'Suspend')] - [String] $idleTimeoutAction, - - [Boolean] $loadUserProfile, - - [String] $logEventOnProcessModel, - - [ValidateSet('LogonBatch', 'LogonService')] - [String] $logonType, - - [Boolean] $manualGroupMembership, - - [ValidateRange(0, 2147483647)] - [UInt32] $maxProcesses, - - [Boolean] $pingingEnabled, - - [ValidateScript({ - ([ValidateRange(1, 4294967)]$valueInSeconds = [TimeSpan]::Parse($_).TotalSeconds); $? - })] - [String] $pingInterval, - - [ValidateScript({ - ([ValidateRange(1, 4294967)]$valueInSeconds = [TimeSpan]::Parse($_).TotalSeconds); $? - })] - [String] $pingResponseTime, - - [Boolean] $setProfileEnvironment, - - [ValidateScript({ - ([ValidateRange(1, 4294967)]$valueInSeconds = [TimeSpan]::Parse($_).TotalSeconds); $? - })] - [String] $shutdownTimeLimit, - - [ValidateScript({ - ([ValidateRange(1, 4294967)]$valueInSeconds = [TimeSpan]::Parse($_).TotalSeconds); $? - })] - [String] $startupTimeLimit, - - [String] $orphanActionExe, - - [String] $orphanActionParams, - - [Boolean] $orphanWorkerProcess, - - [ValidateSet('HttpLevel', 'TcpLevel')] - [String] $loadBalancerCapabilities, - - [Boolean] $rapidFailProtection, - - [ValidateScript({ - ([ValidateRange(1, 144000)]$valueInMinutes = [TimeSpan]::Parse($_).TotalMinutes); $? - })] - [String] $rapidFailProtectionInterval, - - [ValidateRange(0, 2147483647)] - [UInt32] $rapidFailProtectionMaxCrashes, - - [String] $autoShutdownExe, - - [String] $autoShutdownParams, - - [Boolean] $disallowOverlappingRotation, - - [Boolean] $disallowRotationOnConfigChange, - - [String] $logEventOnRecycle, - - [UInt32] $restartMemoryLimit, - - [UInt32] $restartPrivateMemoryLimit, - - [UInt32] $restartRequestsLimit, - - [ValidateScript({ - ([ValidateRange(0, 432000)]$valueInMinutes = [TimeSpan]::Parse($_).TotalMinutes); $? - })] - [String] $restartTimeLimit, - - [ValidateScript({ - ($_ -eq '') -or - (& { - ([ValidateRange(0, 86399)]$valueInSeconds = [TimeSpan]::Parse($_).TotalSeconds); $? - }) - })] - [String[]] $restartSchedule - ) - - Assert-Module - - $inDesiredState = $true - - $appPool = Get-WebConfiguration -Filter '/system.applicationHost/applicationPools/add' | - Where-Object -FilterScript {$_.name -eq $Name} - - if ( - ($Ensure -eq 'Absent' -and $null -ne $appPool) -or - ($Ensure -eq 'Present' -and $null -eq $appPool) - ) - { - $inDesiredState = $false - - if ($null -ne $appPool) - { - Write-Verbose -Message ($LocalizedData['VerboseAppPoolFound'] -f $Name) - } - else - { - Write-Verbose -Message ($LocalizedData['VerboseAppPoolNotFound'] -f $Name) - } - - Write-Verbose -Message ($LocalizedData['VerboseEnsureNotInDesiredState'] -f $Name) - } - - if ($Ensure -eq 'Present' -and $null -ne $appPool) - { - Write-Verbose -Message ($LocalizedData['VerboseAppPoolFound'] -f $Name) - - $PropertyData.Where( - { - ($_.Name -in $PSBoundParameters.Keys) -and - ($_.Name -ne 'restartSchedule') - } - ).ForEach( - { - $propertyName = $_.Name - $propertyPath = $_.Path - $property = Get-Property -Object $appPool -PropertyName $propertyPath - - if ( - $PSBoundParameters[$propertyName] -ne $property - ) - { - Write-Verbose -Message ( - $LocalizedData['VerbosePropertyNotInDesiredState'] -f $propertyName, $Name - ) - - $inDesiredState = $false - } - } - ) - - if ($PSBoundParameters.ContainsKey('Credential')) - { - if ($PSBoundParameters['identityType'] -eq 'SpecificUser') - { - if ($appPool.processModel.userName -ne $Credential.UserName) - { - Write-Verbose -Message ( - $LocalizedData['VerbosePropertyNotInDesiredState'] -f - 'Credential (userName)', $Name - ) - - $inDesiredState = $false - } - - $clearTextPassword = $Credential.GetNetworkCredential().Password - - if ($appPool.processModel.password -cne $clearTextPassword) - { - Write-Verbose -Message ( - $LocalizedData['VerbosePropertyNotInDesiredState'] -f - 'Credential (password)', $Name - ) - - $inDesiredState = $false - } - } - else - { - Write-Verbose -Message ($LocalizedData['VerboseCredentialToBeIgnored']) - } - } - - # Ensure userName and password are cleared if identityType isn't set to SpecificUser. - if ( - ( - ( - ($PSBoundParameters.ContainsKey('identityType') -eq $true) -and - ($PSBoundParameters['identityType'] -ne 'SpecificUser') - ) -or - ( - ($PSBoundParameters.ContainsKey('identityType') -eq $false) -and - ($appPool.processModel.identityType -ne 'SpecificUser') - ) - ) -and - ( - ([String]::IsNullOrEmpty($appPool.processModel.userName) -eq $false) -or - ([String]::IsNullOrEmpty($appPool.processModel.password) -eq $false) - ) - ) - { - Write-Verbose -Message ($LocalizedData['VerboseCredentialToBeCleared'] -f $Name) - - $inDesiredState = $false - } - - if ($PSBoundParameters.ContainsKey('restartSchedule')) - { - # Normalize the restartSchedule array values. - $restartScheduleDesired = [String[]]@( - $restartSchedule.Where( - { - $_ -ne '' - } - ).ForEach( - { - [TimeSpan]::Parse($_).ToString('hh\:mm\:ss') - } - ) | - Select-Object -Unique - ) - - $restartScheduleCurrent = [String[]]@( - @($appPool.recycling.periodicRestart.schedule.Collection).ForEach('value') - ) - - if ( - Compare-Object -ReferenceObject $restartScheduleDesired ` - -DifferenceObject $restartScheduleCurrent - ) - { - Write-Verbose -Message ( - $LocalizedData['VerbosePropertyNotInDesiredState'] -f 'restartSchedule', $Name - ) - - $inDesiredState = $false - } - } - } - - if ($inDesiredState -eq $true) - { - Write-Verbose -Message ($LocalizedData['VerboseResourceInDesiredState']) - } - else - { - Write-Verbose -Message ($LocalizedData['VerboseResourceNotInDesiredState']) - } - - return $inDesiredState -} - -#region Helper Functions - -function Get-Property -{ - param - ( - [object] $Object, - [string] $PropertyName) - - $parts = $PropertyName.Split('.') - $firstPart = $parts[0] - - $value = $Object.$firstPart - if ($parts.Count -gt 1) - { - $newParts = @() - 1..($parts.Count -1) | ForEach-Object { - $newParts += $parts[$_] - } - - $newName = ($newParts -join '.') - return Get-Property -Object $value -PropertyName $newName - } - else - { - return $value - } -} - -<# - .SYNOPSIS - Runs appcmd.exe - if there's an error then the application will terminate - - .PARAMETER ArgumentList - Optional list of string arguments to be passed into appcmd.exe - -#> -function Invoke-AppCmd -{ - [CmdletBinding()] - param - ( - [String[]] $ArgumentList - ) - - <# - This is a local preference for the function which will terminate - the program if there's an error invoking appcmd.exe - #> - $ErrorActionPreference = 'Stop' - - $appcmdFilePath = "$env:SystemRoot\System32\inetsrv\appcmd.exe" - - $appcmdResult = $(& $appcmdFilePath $ArgumentList) - Write-Verbose -Message $($appcmdResult).ToString() - - if ($LASTEXITCODE -ne 0) - { - $errorMessage = $LocalizedData['ErrorAppCmdNonZeroExitCode'] -f $LASTEXITCODE - - New-TerminatingError -ErrorId 'ErrorAppCmdNonZeroExitCode' ` - -ErrorMessage $errorMessage ` - -ErrorCategory 'InvalidResult' - } -} - -#endregion Helper Functions - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebAppPool/MSFT_xWebAppPool.schema.mof b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebAppPool/MSFT_xWebAppPool.schema.mof deleted file mode 100644 index 984ce32e..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebAppPool/MSFT_xWebAppPool.schema.mof +++ /dev/null @@ -1,55 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xWebAppPool")] -class MSFT_xWebAppPool : OMI_BaseResource -{ - [Key, Description("Indicates the application pool name. The value must contain between 1 and 64 characters.")] String Name; - [Write, Description("Indicates if the application pool exists. Set this property to Absent to ensure that the application pool does not exist. Setting it to Present (the default value) ensures that the application pool exists."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("Indicates the state of the application pool. The values that are allowed for this property are: Started, Stopped."), ValueMap{"Started","Stopped"}, Values{"Started","Stopped"}] String State; - [Write, Description("When set to true, indicates to the World Wide Web Publishing Service (W3SVC) that the application pool should be automatically started when it is created or when IIS is started.")] Boolean autoStart; - [Write, Description("Indicates the .NET configuration file for the application pool.")] String CLRConfigFile; - [Write, Description("When set to true, enables a 32-bit application to run on a computer that runs a 64-bit version of Windows.")] Boolean enable32BitAppOnWin64; - [Write, Description("When set to true, indicates that delegated settings in Web.config files will processed for applications within this application pool. When set to false, all settings in Web.config files will be ignored for this application pool.")] Boolean enableConfigurationOverride; - [Write, Description("Indicates the request-processing mode that is used to process requests for managed content. The values that are allowed for this property are: Integrated, Classic."), ValueMap{"Integrated","Classic"},Values{"Integrated","Classic"}] String managedPipelineMode; - [Write, Description("Indicates the managed loader to use for pre-loading the application pool.")] String managedRuntimeLoader; - [Write, Description("Indicates the CLR version to be used by the application pool. The values that are allowed for this property are: v4.0, v2.0, and ''."), ValueMap{"v4.0","v2.0",""},Values{"v4.0","v2.0",""}] String managedRuntimeVersion; - [Write, Description("When set to true, the Windows Process Activation Service (WAS) creates and passes a token for the built-in IUSR anonymous user account to the Anonymous authentication module. The Anonymous authentication module uses the token to impersonate the built-in account. When this property is set to false, the token will not be passed.")] Boolean passAnonymousToken; - [Write, Description("Indicates the startup type for the application pool. The values that are allowed for this property are: OnDemand, AlwaysRunning."), ValueMap{"OnDemand","AlwaysRunning"},Values{"OnDemand","AlwaysRunning"}] String startMode; - [Write, Description("Indicates the maximum number of requests that HTTP.sys will queue for the application pool. The value must be a valid integer between 10 and 65535.")] UInt32 queueLength; - [Write, Description("Configures the action that IIS takes when a worker process exceeds its configured CPU limit. The values that are allowed for this property are: NoAction, KillW3wp, Throttle, and ThrottleUnderLoad."), ValueMap{"NoAction","KillW3wp","Throttle","ThrottleUnderLoad"},Values{"NoAction","KillW3wp","Throttle","ThrottleUnderLoad"}] String cpuAction; - [Write, Description("Configures the maximum percentage of CPU time (in 1/1000ths of one percent) that the worker processes in the application pool are allowed to consume over a period of time as indicated by the cpuResetInterval property. The value must be a valid integer between 0 and 100000.")] UInt32 cpuLimit; - [Write, Description("Indicates the reset period (in minutes) for CPU monitoring and throttling limits on the application pool. The value must be a string representation of a TimeSpan value. The valid range (in minutes) is 0 to 1440. Setting the value of this property to 0 disables CPU monitoring.")] String cpuResetInterval; - [Write, Description("Indicates whether a particular worker process assigned to the application pool should also be assigned to a given CPU.")] Boolean cpuSmpAffinitized; - [Write, Description("Indicates the hexadecimal processor mask for multi-processor computers, which indicates to which CPU the worker processes in the application pool should be bound. Before this property takes effect, the cpuSmpAffinitized property must be set to true for the application pool. The value must be a valid integer between 0 and 4294967295.")] UInt32 cpuSmpProcessorAffinityMask; - [Write, Description("Indicates the high-order DWORD hexadecimal processor mask for 64-bit multi-processor computers, which indicates to which CPU the worker processes in the application pool should be bound. Before this property takes effect, the cpuSmpAffinitized property must be set to true for the application pool. The value must be a valid integer between 0 and 4294967295.")] UInt32 cpuSmpProcessorAffinityMask2; - [Write, Description("Indicates the account identity under which the application pool runs. The values that are allowed for this property are: ApplicationPoolIdentity, LocalService, LocalSystem, NetworkService, and SpecificUser."), ValueMap{"ApplicationPoolIdentity","LocalService","LocalSystem","NetworkService","SpecificUser"}, Values{"ApplicationPoolIdentity","LocalService","LocalSystem","NetworkService","SpecificUser"}] String identityType; - [Write, Description("Indicates the custom account crededentials. This property is only valid when the identityType property is set to SpecificUser."), EmbeddedInstance("MSFT_Credential")] String Credential; - [Write, Description("Indicates the amount of time (in minutes) a worker process will remain idle before it shuts down. The value must be a string representation of a TimeSpan value and must be less than the restartTimeLimit property value. The valid range (in minutes) is 0 to 43200.")] String idleTimeout; - [Write, Description("Indicates the action to perform when the idle timeout duration has been reached. The values that are allowed for this property are: Terminate, Suspend."), ValueMap{"Terminate","Suspend"}, Values{"Terminate","Suspend"}] String idleTimeoutAction; - [Write, Description("Indicates whether IIS loads the user profile for the application pool identity.")] Boolean loadUserProfile; - [Write, Description("Indicates that IIS should generate an event log entry for each occurrence of the specified process model events.")] String logEventOnProcessModel; - [Write, Description("Indicates the logon type for the process identity. The values that are allowed for this property are: LogonBatch, LogonService."), ValueMap{"LogonBatch","LogonService"},Values{"LogonBatch","LogonService"}] String logonType; - [Write, Description("Indicates whether the IIS_IUSRS group Security Identifier (SID) is added to the worker process token.")] Boolean manualGroupMembership; - [Write, Description("Indicates the maximum number of worker processes that would be used for the application pool. The value must be a valid integer between 0 and 2147483647.")] UInt32 maxProcesses; - [Write, Description("Indicates whether pinging (health monitoring) is enabled for the worker process(es) serving this application pool.")] Boolean pingingEnabled; - [Write, Description("Indicates the period of time (in seconds) between health monitoring pings sent to the worker process(es) serving this application pool. The value must be a string representation of a TimeSpan value. The valid range (in seconds) is 1 to 4294967.")] String pingInterval; - [Write, Description("Indicates the maximum time (in seconds) that a worker process is given to respond to a health monitoring ping. The value must be a string representation of a TimeSpan value. The valid range (in seconds) is 1 to 4294967.")] String pingResponseTime; - [Write, Description("Indicates the environment to be set based on the user profile for the new process.")] Boolean setProfileEnvironment; - [Write, Description("Indicates the period of time (in seconds) a worker process is given to finish processing requests and shut down. The value must be a string representation of a TimeSpan value. The valid range (in seconds) is 1 to 4294967.")] String shutdownTimeLimit; - [Write, Description("Indicates the period of time (in seconds) a worker process is given to start up and initialize. The value must be a string representation of a TimeSpan value. The valid range (in seconds) is 1 to 4294967.")] String startupTimeLimit; - [Write, Description("Indicates an executable to run when a worker process is orphaned.")] String orphanActionExe; - [Write, Description("Indicates parameters for the executable that is specified in the orphanActionExe property.")] String orphanActionParams; - [Write, Description("Indicates whether to assign a worker process to an orphan state instead of terminating it when the application pool fails. If true, an unresponsive worker process will be orphaned instead of terminated.")] Boolean orphanWorkerProcess; - [Write, Description("Indicates the response behavior of a service when it is unavailable. The values that are allowed for this property are: HttpLevel, TcpLevel. If set to HttpLevel and the application pool is stopped, HTTP.sys will return HTTP 503 error. If set to TcpLevel, HTTP.sys will reset the connection."), ValueMap{"HttpLevel","TcpLevel"},Values{"HttpLevel","TcpLevel"}] String loadBalancerCapabilities; - [Write, Description("Indicates whether rapid-fail protection is enabled. If true, the application pool is shut down if there are a specified number of worker process crashes within a specified time period.")] Boolean rapidFailProtection; - [Write, Description("Indicates the time interval (in minutes) during which the specified number of worker process crashes must occur before the application pool is shut down by rapid-fail protection. The value must be a string representation of a TimeSpan value. The valid range (in minutes) is 1 to 144000.")] String rapidFailProtectionInterval; - [Write, Description("Indicates the maximum number of worker process crashes permitted before the application pool is shut down by rapid-fail protection. The value must be a valid integer between 0 and 2147483647.")] UInt32 rapidFailProtectionMaxCrashes; - [Write, Description("Indicates an executable to run when the application pool is shut down by rapid-fail protection.")] String autoShutdownExe; - [Write, Description("Indicates parameters for the executable that is specified in the autoShutdownExe property.")] String autoShutdownParams; - [Write, Description("Indicates whether the W3SVC service should start another worker process to replace the existing worker process while that process is shutting down. If true, the application pool recycle will happen such that the existing worker process exits before another worker process is created.")] Boolean disallowOverlappingRotation; - [Write, Description("Indicates whether the W3SVC service should rotate worker processes in the application pool when the configuration has changed. If true, the application pool will not recycle when its configuration is changed.")] Boolean disallowRotationOnConfigChange; - [Write, Description("Indicates that IIS should generate an event log entry for each occurrence of the specified recycling events.")] String logEventOnRecycle; - [Write, Description("Indicates the maximum amount of virtual memory (in KB) a worker process can consume before causing the application pool to recycle. The value must be a valid integer between 0 and 4294967295. A value of 0 means there is no limit.")] UInt32 restartMemoryLimit; - [Write, Description("Indicates the maximum amount of private memory (in KB) a worker process can consume before causing the application pool to recycle. The value must be a valid integer between 0 and 4294967295. A value of 0 means there is no limit.")] UInt32 restartPrivateMemoryLimit; - [Write, Description("Indicates the maximum number of requests the application pool can process before it is recycled. The value must be a valid integer between 0 and 4294967295. A value of 0 means the application pool can process an unlimited number of requests.")] UInt32 restartRequestsLimit; - [Write, Description("Indicates the period of time (in minutes) after which the application pool will recycle. The value must be a string representation of a TimeSpan value. The valid range (in minutes) is 0 to 432000. A value of 0 means the application pool does not recycle on a regular interval.")] String restartTimeLimit; - [Write, Description("Indicates a set of specific local times, in 24 hour format, when the application pool is recycled. The value must be an array of string representations of TimeSpan values. TimeSpan values must be between 00:00:00 and 23:59:59 seconds inclusive, with a granularity of 60 seconds. Setting the value of this property to '' disables the schedule.")] String restartSchedule[]; -}; diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebAppPoolDefaults/MSFT_xWebAppPoolDefaults.psm1 b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebAppPoolDefaults/MSFT_xWebAppPoolDefaults.psm1 deleted file mode 100644 index 3328e89d..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebAppPoolDefaults/MSFT_xWebAppPoolDefaults.psm1 +++ /dev/null @@ -1,215 +0,0 @@ -# Load the Helper Module -Import-Module -Name "$PSScriptRoot\..\Helper.psm1" - -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData -StringData @' - NoWebAdministrationModule = Please ensure that WebAdministration module is installed. - SettingValue = Changing default value '{0}' to '{1}' - ValueOk = Default value '{0}' is already '{1}' - VerboseGetTargetResource = Get-TargetResource has been run. -'@ -} - -function Get-TargetResource -{ - <# - .SYNOPSIS - This will return a hashtable of results - #> - - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory)] - [ValidateSet('Machine')] - [String] $ApplyTo - ) - - Assert-Module - - Write-Verbose -Message $LocalizedData.VerboseGetTargetResource - - return @{ - ManagedRuntimeVersion = (Get-Value -Path '' -Name 'managedRuntimeVersion') - IdentityType = ( Get-Value -Path 'processModel' -Name 'identityType') - } -} - - -function Set-TargetResource -{ - <# - .SYNOPSIS - This will set the desired state - #> - - [CmdletBinding()] - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - param - ( - [ValidateSet('Machine')] - [Parameter(Mandatory = $true)] - [String] $ApplyTo, - - [ValidateSet('','v2.0','v4.0')] - [String] $ManagedRuntimeVersion, - - [ValidateSet('ApplicationPoolIdentity','LocalService','LocalSystem','NetworkService')] - [String] $IdentityType - ) - - Assert-Module - - Set-Value -Path '' -Name 'managedRuntimeVersion' -NewValue $ManagedRuntimeVersion - Set-Value -Path 'processModel' -Name 'identityType' -NewValue $IdentityType -} - -function Test-TargetResource -{ - <# - .SYNOPSIS - This tests the desired state. If the state is not correct it will return $false. - If the state is correct it will return $true - #> - - [CmdletBinding()] - [OutputType([System.Boolean])] - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - param - ( - [ValidateSet('Machine')] - [Parameter(Mandatory = $true)] - [String] $ApplyTo, - - [ValidateSet('','v2.0','v4.0')] - [String] $ManagedRuntimeVersion, - - [ValidateSet('ApplicationPoolIdentity','LocalService','LocalSystem','NetworkService')] - [String] $IdentityType - ) - - Assert-Module - - if (-not((Confirm-Value -Path '' ` - -Name 'managedRuntimeVersion' ` - -NewValue $ManagedRuntimeVersion))) - { - return $false - } - - if (-not((Confirm-Value -Path 'processModel' ` - -Name 'identityType' ` - -NewValue $IdentityType))) - { - return $false - } - - return $true -} - -#region Helper Functions - -function Confirm-Value -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [String] $Path, - - [String] $Name, - - [String] $NewValue - ) - - if (-not($NewValue)) - { - # if no new value was specified, we assume this value is okay. - return $true - } - - $existingValue = Get-Value -Path $Path -Name $Name - if ($existingValue -ne $NewValue) - { - return $false - } - else - { - $relPath = $Path + '/' + $Name - Write-Verbose($LocalizedData.ValueOk -f $relPath,$NewValue); - return $true - } -} - -function Set-Value -{ - [CmdletBinding()] - param - ( - [String] $Path, - - [String] $Name, - - [String] $NewValue - ) - - # if the variable doesn't exist, the user doesn't want to change this value - if (-not($NewValue)) - { - return - } - - $existingValue = Get-Value -Path $Path -Name $Name - if ($existingValue -ne $NewValue) - { - if ($Path -ne '') - { - $Path = '/' + $Path - } - - Set-WebConfigurationProperty ` - -PSPath 'MACHINE/WEBROOT/APPHOST' ` - -Filter "system.applicationHost/applicationPools/applicationPoolDefaults$Path" ` - -Name $Name ` - -Value "$NewValue" - - $relPath = $Path + '/' + $Name - Write-Verbose($LocalizedData.SettingValue -f $relPath,$NewValue); - - } - -} - -function Get-Value -{ - - [CmdletBinding()] - param - ( - [String] $Path, - - [String] $Name - ) - - { - if ($Path -ne '') - { - $Path = '/' + $Path - } - - return Get-WebConfigurationProperty ` - -PSPath 'MACHINE/WEBROOT/APPHOST' ` - -Filter "system.applicationHost/applicationPools/applicationPoolDefaults$Path" ` - -Name $Name - - } - -} - -#endregion - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebAppPoolDefaults/MSFT_xWebAppPoolDefaults.schema.mof b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebAppPoolDefaults/MSFT_xWebAppPoolDefaults.schema.mof deleted file mode 100644 index 99b2f22c..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebAppPoolDefaults/MSFT_xWebAppPoolDefaults.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xWebAppPoolDefaults")] -class MSFT_xWebAppPoolDefaults : OMI_BaseResource -{ - [Key, Description("Dummy value because we need a key, always 'Machine'"), ValueMap{"Machine"}, Values{"Machine"}] string ApplyTo; - [write, Description("applicationPools/applicationPoolDefaults/managedRuntimeVersion"), ValueMap{"","v2.0","v4.0"}, Values{"","v2.0","v4.0"}] string ManagedRuntimeVersion; - [write, Description("applicationPools/applicationPoolDefaults/processModel/identityType"), ValueMap{"ApplicationPoolIdentity","LocalService","LocalSystem","NetworkService"}, Values{"ApplicationPoolIdentity","LocalService","LocalSystem","NetworkService"}] string IdentityType; -}; diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebApplication/MSFT_xWebApplication.psm1 b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebApplication/MSFT_xWebApplication.psm1 deleted file mode 100644 index 0b18377f..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebApplication/MSFT_xWebApplication.psm1 +++ /dev/null @@ -1,834 +0,0 @@ -# Load the Helper Module -Import-Module -Name "$PSScriptRoot\..\Helper.psm1" - -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData -StringData @' - ErrorWebApplicationTestAutoStartProviderFailure = Desired AutoStartProvider is not valid due to a conflicting Global Property. Ensure that the serviceAutoStartProvider is a unique key. - VerboseGetTargetResource = Get-TargetResource has been run. - VerboseSetTargetAbsent = Removing existing Web Application "{0}". - VerboseSetTargetPresent = Creating new Web application "{0}". - VerboseSetTargetPhysicalPath = Updating physical path for Web application "{0}". - VerboseSetTargetWebAppPool = Updating application pool for Web application "{0}". - VerboseSetTargetSslFlags = Updating SslFlags for Web application "{0}". - VerboseSetTargetAuthenticationInfo = Updating AuthenticationInfo for Web application "{0}". - VerboseSetTargetPreload = Updating Preload for Web application "{0}". - VerboseSetTargetAutostart = Updating AutoStart for Web application "{0}". - VerboseSetTargetIISAutoStartProviders = Updating AutoStartProviders for IIS. - VerboseSetTargetWebApplicationAutoStartProviders = Updating AutoStartProviders for Web application "{0}". - VerboseSetTargetEnabledProtocols = Updating EnabledProtocols for Web application "{0}". - VerboseTestTargetFalseAbsent = Web application "{0}" is absent and should not absent. - VerboseTestTargetFalsePresent = Web application $Name should be absent and is not absent. - VerboseTestTargetFalsePhysicalPath = Physical path for web application "{0}" does not match desired state. - VerboseTestTargetFalseWebAppPool = Web application pool for web application "{0}" does not match desired state. - VerboseTestTargetFalseSslFlags = SslFlags for web application "{0}" are not in the desired state. - VerboseTestTargetFalseAuthenticationInfo = AuthenticationInfo for web application "{0}" is not in the desired state. - VerboseTestTargetFalsePreload = Preload for web application "{0}" is not in the desired state. - VerboseTestTargetFalseAutostart = Autostart for web application "{0}" is not in the desired state. - VerboseTestTargetFalseAutoStartProviders = AutoStartProviders for web application "{0}" are not in the desired state. - VerboseTestTargetFalseIISAutoStartProviders = AutoStartProviders for IIS are not in the desired state. - VerboseTestTargetFalseWebApplicationAutoStartProviders = AutoStartProviders for web application "{0}" are not in the desired state. - VerboseTestTargetFalseEnabledProtocols = EnabledProtocols for web application "{0}" are not in the desired state. -'@ -} - -<# -.SYNOPSIS - This will return a hashtable of results -#> -function Get-TargetResource -{ - - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [String] $Website, - - [Parameter(Mandatory = $true)] - [String] $Name, - - [Parameter(Mandatory = $true)] - [String] $WebAppPool, - - [Parameter(Mandatory = $true)] - [String] $PhysicalPath - ) - - Assert-Module - - $webApplication = Get-WebApplication -Site $Website -Name $Name - $cimAuthentication = Get-AuthenticationInfo -Site $Website -Name $Name - $currentSslFlags = (Get-SslFlags -Location "${Website}/${Name}") - - $Ensure = 'Absent' - - if ($webApplication.Count -eq 1) - { - $Ensure = 'Present' - } - - Write-Verbose -Message $LocalizedData.VerboseGetTargetResource - - $returnValue = @{ - Website = $Website - Name = $Name - WebAppPool = $webApplication.applicationPool - PhysicalPath = $webApplication.PhysicalPath - AuthenticationInfo = $cimAuthentication - SslFlags = [Array]$currentSslFlags - PreloadEnabled = $webApplication.preloadEnabled - ServiceAutoStartProvider = $webApplication.serviceAutoStartProvider - ServiceAutoStartEnabled = $webApplication.serviceAutoStartEnabled - EnabledProtocols = [Array]$webApplication.EnabledProtocols - Ensure = $Ensure - } - - return $returnValue - -} - - <# - .SYNOPSIS - This will set the desired state - #> -function Set-TargetResource -{ - - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] $Website, - - [Parameter(Mandatory = $true)] - [String] $Name, - - [Parameter(Mandatory = $true)] - [String] $WebAppPool, - - [Parameter(Mandatory = $true)] - [String] $PhysicalPath, - - [ValidateSet('Present','Absent')] - [String] $Ensure = 'Present', - - [AllowEmptyString()] - [ValidateSet('','Ssl','SslNegotiateCert','SslRequireCert','Ssl128')] - [String[]]$SslFlags = '', - - [Microsoft.Management.Infrastructure.CimInstance] - $AuthenticationInfo, - - [Boolean] - $PreloadEnabled, - - [Boolean] - $ServiceAutoStartEnabled, - - [String] - $ServiceAutoStartProvider, - - [String] - $ApplicationType, - - [ValidateSet('http','https','net.tcp','net.msmq','net.pipe')] - [String[]] $EnabledProtocols - ) - - Assert-Module - - if ($Ensure -eq 'Present') - { - $webApplication = Get-WebApplication -Site $Website -Name $Name - - if ($AuthenticationInfo -eq $null) - { - $AuthenticationInfo = Get-DefaultAuthenticationInfo - } - - if ($webApplication.count -eq 0) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetPresent -f $Name) - New-WebApplication -Site $Website -Name $Name ` - -PhysicalPath $PhysicalPath ` - -ApplicationPool $WebAppPool - $webApplication = Get-WebApplication -Site $Website -Name $Name - } - - # Update Physical Path if required - if (($PSBoundParameters.ContainsKey('PhysicalPath') -and ` - $webApplication.physicalPath -ne $PhysicalPath)) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetPhysicalPath -f $Name) - #Note: read this before touching the next line of code: - # https://github.com/PowerShell/xWebAdministration/issues/222 - Set-WebConfigurationProperty ` - -Filter "$($webApplication.ItemXPath)/virtualDirectory[@path='/']" ` - -Name physicalPath ` - -Value $PhysicalPath - } - - # Update AppPool if required - if ($PSBoundParameters.ContainsKey('WebAppPool') -and ` - ($webApplication.applicationPool -ne $WebAppPool)) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetWebAppPool -f $Name) - #Note: read this before touching the next line of code: - # https://github.com/PowerShell/xWebAdministration/issues/222 - Set-WebConfigurationProperty ` - -Filter $webApplication.ItemXPath ` - -Name applicationPool ` - -Value $WebAppPool - } - - # Update SslFlags if required - if ($PSBoundParameters.ContainsKey('SslFlags') -and ` - (-not (Test-SslFlags -Location "${Website}/${Name}" -SslFlags $SslFlags))) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetSslFlags -f $Name) - $params = @{ - PSPath = 'MACHINE/WEBROOT/APPHOST' - Location = "${Website}/${Name}" - Filter = 'system.webServer/security/access' - Name = 'sslFlags' - Value = ($sslflags -join ',') - } - Set-WebConfigurationProperty @params - } - - # Set Authentication; if not defined then pass in DefaultAuthenticationInfo - if ($PSBoundParameters.ContainsKey('AuthenticationInfo') -and ` - (-not (Test-AuthenticationInfo -Site $Website ` - -Name $Name ` - -AuthenticationInfo $AuthenticationInfo))) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetAuthenticationInfo -f $Name) - Set-AuthenticationInfo -Site $Website ` - -Name $Name ` - -AuthenticationInfo $AuthenticationInfo ` - -ErrorAction Stop ` - -Verbose - } - - # Update Preload if required - if ($PSBoundParameters.ContainsKey('preloadEnabled') -and ` - $webApplication.preloadEnabled -ne $PreloadEnabled) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetPreload -f $Name) - Set-ItemProperty -Path "IIS:\Sites\$Website\$Name" ` - -Name preloadEnabled ` - -Value $preloadEnabled ` - -ErrorAction Stop - } - - # Update AutoStart if required - if ($PSBoundParameters.ContainsKey('ServiceAutoStartEnabled') -and ` - $webApplication.serviceAutoStartEnabled -ne $ServiceAutoStartEnabled) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetAutostart -f $Name) - Set-ItemProperty -Path "IIS:\Sites\$Website\$Name" ` - -Name serviceAutoStartEnabled ` - -Value $serviceAutoStartEnabled ` - -ErrorAction Stop - } - - # Update AutoStartProviders if required - if ($PSBoundParameters.ContainsKey('ServiceAutoStartProvider') -and ` - $webApplication.serviceAutoStartProvider -ne $ServiceAutoStartProvider) - { - if (-not (Confirm-UniqueServiceAutoStartProviders ` - -ServiceAutoStartProvider $ServiceAutoStartProvider ` - -ApplicationType $ApplicationType)) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetIISAutoStartProviders) - Add-WebConfiguration ` - -filter /system.applicationHost/serviceAutoStartProviders ` - -Value @{name=$ServiceAutoStartProvider; type=$ApplicationType} ` - -ErrorAction Stop - } - Write-Verbose -Message ` - ($LocalizedData.VerboseSetTargetWebApplicationAutoStartProviders -f $Name) - Set-ItemProperty -Path "IIS:\Sites\$Website\$Name" ` - -Name serviceAutoStartProvider ` - -Value $ServiceAutoStartProvider ` - -ErrorAction Stop - } - - # Update EnabledProtocols if required - if ($PSBoundParameters.ContainsKey('EnabledProtocols') -and ` - (-not(Confirm-UniqueEnabledProtocols ` - -ExistingProtocols $webApplication.EnabledProtocols ` - -ProposedProtocols $EnabledProtocols ))) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetEnabledProtocols -f $Name) - # Make input bindings which are an array, into a string - $stringafiedEnabledProtocols = $EnabledProtocols -join ' ' - Set-ItemProperty -Path "IIS:\Sites\$Website\$Name" ` - -Name EnabledProtocols ` - -Value $stringafiedEnabledProtocols ` - -ErrorAction Stop - } - } - - if ($Ensure -eq 'Absent') - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetAbsent -f $Name) - Remove-WebApplication -Site $Website -Name $Name - } - -} - -<# -.SYNOPSIS - This tests the desired state. If the state is not correct it will return $false. - If the state is correct it will return $true -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [String] $Website, - - [Parameter(Mandatory = $true)] - [String] $Name, - - [Parameter(Mandatory = $true)] - [String] $WebAppPool, - - [Parameter(Mandatory = $true)] - [String] $PhysicalPath, - - [ValidateSet('Present','Absent')] - [String] $Ensure = 'Present', - - [AllowEmptyString()] - [ValidateSet('','Ssl','SslNegotiateCert','SslRequireCert','Ssl128')] - [String[]]$SslFlags = '', - - [Microsoft.Management.Infrastructure.CimInstance] - $AuthenticationInfo, - - [Boolean] - $preloadEnabled, - - [Boolean] - $serviceAutoStartEnabled, - - [String] - $serviceAutoStartProvider, - - [String] - $ApplicationType, - - [ValidateSet('http','https','net.tcp','net.msmq','net.pipe')] - [String[]] $EnabledProtocols - ) - - Assert-Module - - $webApplication = Get-WebApplication -Site $Website -Name $Name - - if ($AuthenticationInfo -eq $null) - { - $AuthenticationInfo = Get-DefaultAuthenticationInfo - } - - if ($webApplication.count -eq 0 -and $Ensure -eq 'Present') - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseAbsent -f $Name) - return $false - } - - if ($webApplication.count -eq 1 -and $Ensure -eq 'Absent') - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalsePresent -f $Name) - return $false - } - - if ($webApplication.count -eq 1 -and $Ensure -eq 'Present') - { - #Check Physical Path - if ($webApplication.physicalPath -ne $PhysicalPath) - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalsePhysicalPath -f $Name) - return $false - } - - #Check AppPool - if ($webApplication.applicationPool -ne $WebAppPool) - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseWebAppPool -f $Name) - return $false - } - - #Check SslFlags - if ($PSBoundParameters.ContainsKey('SslFlags') -and ` - (-not (Test-SslFlags -Location "${Website}/${Name}" -SslFlags $SslFlags))) - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseSslFlags -f $Name) - return $false - } - - #Check AuthenticationInfo - if ($PSBoundParameters.ContainsKey('AuthenticationInfo') -and ` - (-not (Test-AuthenticationInfo -Site $Website ` - -Name $Name ` - -AuthenticationInfo $AuthenticationInfo))) - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseAuthenticationInfo ` - -f $Name) - return $false - } - - #Check Preload - if ($PSBoundParameters.ContainsKey('preloadEnabled') -and ` - $webApplication.preloadEnabled -ne $PreloadEnabled) - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalsePreload -f $Name) - return $false - } - - #Check AutoStartEnabled - if($PSBoundParameters.ContainsKey('ServiceAutoStartEnabled') -and ` - $webApplication.serviceAutoStartEnabled -ne $ServiceAutoStartEnabled) - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseAutostart -f $Name) - return $false - } - - #Check AutoStartProviders - if ($PSBoundParameters.ContainsKey('ServiceAutoStartProvider') -and ` - $webApplication.serviceAutoStartProvider -ne $ServiceAutoStartProvider) - { - if (-not (Confirm-UniqueServiceAutoStartProviders ` - -serviceAutoStartProvider $ServiceAutoStartProvider ` - -ApplicationType $ApplicationType)) - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseIISAutoStartProviders) - return $false - } - Write-Verbose -Message ` - ($LocalizedData.VerboseTestTargetFalseWebApplicationAutoStartProviders -f $Name) - return $false - } - - # Update EnabledProtocols if required - if ($PSBoundParameters.ContainsKey('EnabledProtocols') -and ` - (-not(Confirm-UniqueEnabledProtocols ` - -ExistingProtocols $webApplication.EnabledProtocols ` - -ProposedProtocols $EnabledProtocols ))) - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseEnabledProtocols ` - -f $Name) - return $false - } - - } - - return $true - -} - -<# -.SYNOPSIS - Helper function used to validate that the EnabledProtocols are unique. - Returns $false if EnabledProtocols are not unique and $true if they are -.PARAMETER ExistingProtocols - Specifies existing SMTP bindings -.PARAMETER ProposedProtocols - Specifies desired SMTP bindings. -.NOTES - ExistingProtocols is a String whereas ProposedProtocols is an array of Strings - so we need to do some extra work in comparing them -#> -function Confirm-UniqueEnabledProtocols -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [AllowEmptyString()] - [String] $ExistingProtocols, - - [Parameter(Mandatory = $true)] - [String[]] $ProposedProtocols - ) - - $inputToCheck = @() - foreach ($proposedProtocol in $ProposedProtocols) - { - $inputToCheck += $proposedProtocol - } - - $existingProtocolsToCheck = $existingProtocols -split ',' - - $existingToCheck = @() - foreach ($existingProtocol in $existingProtocolsToCheck) - { - $existingToCheck += $existingProtocol.Trim() - } - - $sortedExistingProtocols = $existingToCheck | Sort-Object -Unique - $sortedInputProtocols = $inputToCheck | Sort-Object -Unique - - - if (Compare-Object -ReferenceObject $sortedExistingProtocols ` - -DifferenceObject $sortedInputProtocols ` - -PassThru) - { - return $false - } - - return $true -} - -#region Helper Functions - -<# -.SYNOPSIS - Helper function used to validate that the AutoStartProviders is unique to other - websites. Returns False if the AutoStartProviders exist. -.PARAMETER serviceAutoStartProvider - Specifies the name of the AutoStartProviders. -.PARAMETER ExcludeStopped - Specifies the name of the Application Type for the AutoStartProvider. -.NOTES - This tests for the existance of a AutoStartProviders which is globally assigned. - As AutoStartProviders need to be uniquely named it will check for this and error out if - attempting to add a duplicatly named AutoStartProvider. - Name is passed in to bubble to any error messages during the test. -#> -function Confirm-UniqueServiceAutoStartProviders -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [String] $ServiceAutoStartProvider, - - [Parameter(Mandatory = $true)] - [String] $ApplicationType - ) - - $WebSiteAutoStartProviders = (Get-WebConfiguration ` - -filter /system.applicationHost/serviceAutoStartProviders).Collection - - $ExistingObject = $WebSiteAutoStartProviders | ` - Where-Object -Property Name -eq -Value $serviceAutoStartProvider | ` - Select-Object Name,Type - - $ProposedObject = @(New-Object -TypeName PSObject -Property @{ - name = $ServiceAutoStartProvider - type = $ApplicationType - }) - - if(-not $ExistingObject) - { - return $false - } - - if(-not (Compare-Object -ReferenceObject $ExistingObject ` - -DifferenceObject $ProposedObject ` - -Property name)) - { - if(Compare-Object -ReferenceObject $ExistingObject ` - -DifferenceObject $ProposedObject ` - -Property type) - { - $ErrorMessage = $LocalizedData.ErrorWebApplicationTestAutoStartProviderFailure - New-TerminatingError ` - -ErrorId 'ErrorWebApplicationTestAutoStartProviderFailure' ` - -ErrorMessage $ErrorMessage ` - -ErrorCategory 'InvalidResult' - } - } - - return $true - -} - -<# -.SYNOPSIS - Helper function used to validate that the authenticationProperties for an Application. -.PARAMETER Site - Specifies the name of the Website. -.PARAMETER Name - Specifies the name of the Application. -#> -function Get-AuthenticationInfo -{ - [CmdletBinding()] - [OutputType([Microsoft.Management.Infrastructure.CimInstance])] - param - ( - [Parameter(Mandatory = $true)] - [String] $Site, - - [Parameter(Mandatory = $true)] - [String] $Name - ) - - $authenticationProperties = @{} - foreach ($type in @('Anonymous', 'Basic', 'Digest', 'Windows')) - { - $authenticationProperties[$type] = [String](Test-AuthenticationEnabled -Site $Site ` - -Name $Name ` - -Type $type) - } - - return New-CimInstance ` - -ClassName MSFT_xWebApplicationAuthenticationInformation ` - -ClientOnly -Property $authenticationProperties - -} - -<# -.SYNOPSIS - Helper function used to build a default CimInstance for AuthenticationInformation -#> -function Get-DefaultAuthenticationInfo -{ - New-CimInstance -ClassName MSFT_xWebApplicationAuthenticationInformation ` - -ClientOnly ` - -Property @{Anonymous=$false;Basic=$false;Digest=$false;Windows=$false} -} - -<# -.SYNOPSIS - Helper function used to return the SSLFlags on an Application. -.PARAMETER Location - Specifies the path in the IIS: PSDrive to the Application -#> -function Get-SslFlags -{ - [CmdletBinding()] - [OutputType([System.String])] - param - ( - [Parameter(Mandatory = $true)] - [String] $Location - ) - - $SslFlags = Get-WebConfiguration ` - -PSPath IIS:\Sites ` - -Location $Location ` - -Filter 'system.webserver/security/access' | ` - ForEach-Object { $_.sslFlags } - - if ($null -eq $SslFlags) - { - [String]::Empty - } - - return $SslFlags -} - -<# -.SYNOPSIS - Helper function used to set authenticationProperties for an Application. -.PARAMETER Site - Specifies the name of the Website. -.PARAMETER Name - Specifies the name of the Application. -.PARAMETER Type - Specifies the type of Authentication, -Limited to the set: ('Anonymous','Basic','Digest','Windows'). -.PARAMETER Enabled - Whether the Authentication is enabled or not. -#> -function Set-Authentication -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] $Site, - - [Parameter(Mandatory = $true)] - [String] $Name, - - [Parameter(Mandatory = $true)] - [ValidateSet('Anonymous','Basic','Digest','Windows')] - [String] $Type, - - [Boolean] $Enabled - ) - - Set-WebConfigurationProperty ` - -Filter /system.WebServer/security/authentication/${Type}Authentication ` - -Name enabled ` - -Value $Enabled ` - -Location "${Site}/${Name}" -} - -<# -.SYNOPSIS - Helper function used to validate that the authenticationProperties for an Application. -.PARAMETER Site - Specifies the name of the Website. -.PARAMETER Name - Specifies the name of the Application. -.PARAMETER AuthenticationInfo - A CimInstance of what state the AuthenticationInfo should be. -#> -function Set-AuthenticationInfo -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] $Site, - - [Parameter(Mandatory = $true)] - [String] $Name, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [Microsoft.Management.Infrastructure.CimInstance] $AuthenticationInfo - ) - - foreach ($type in @('Anonymous', 'Basic', 'Digest', 'Windows')) - { - $enabled = ($AuthenticationInfo.CimInstanceProperties[$type].Value -eq $true) - Set-Authentication -Site $Site ` - -Name $Name ` - -Type $type ` - -Enabled $enabled - } -} - -<# -.SYNOPSIS - Helper function used to test the authenticationProperties state for an Application. - Will return that value which will either [String]True or [String]False -.PARAMETER Site - Specifies the name of the Website. -.PARAMETER Name - Specifies the name of the Application. -.PARAMETER Type - Specifies the type of Authentication, - limited to the set: ('Anonymous','Basic','Digest','Windows'). -#> - -function Test-AuthenticationEnabled -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [String] $Site, - - [Parameter(Mandatory = $true)] - [String] $Name, - - [Parameter(Mandatory = $true)] - [ValidateSet('Anonymous','Basic','Digest','Windows')] - [String] $Type - ) - - - $prop = Get-WebConfigurationProperty ` - -Filter /system.WebServer/security/authentication/${Type}Authentication ` - -Name enabled ` - -Location "${Site}/${Name}" - - return $prop.Value - -} - -<# -.SYNOPSIS - Helper function used to test the authenticationProperties state for an Application. - Will return that result which will either [boolean]$True or [boolean]$False for use in - Test-TargetResource. - Uses Test-AuthenticationEnabled to determine this. First incorrect result will break - this function out. -.PARAMETER Site - Specifies the name of the Website. -.PARAMETER Name - Specifies the name of the Application. -.PARAMETER AuthenticationInfo - A CimInstance of what state the AuthenticationInfo should be. -#> - -function Test-AuthenticationInfo -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [String] $Site, - - [Parameter(Mandatory = $true)] - [String] $Name, - - [Parameter(Mandatory=$true)] - [ValidateNotNullOrEmpty()] - [Microsoft.Management.Infrastructure.CimInstance] $AuthenticationInfo - ) - - foreach ($type in @('Anonymous', 'Basic', 'Digest', 'Windows')) - { - - $expected = $AuthenticationInfo.CimInstanceProperties[$type].Value - $actual = Test-AuthenticationEnabled -Site $Site ` - -Name $Name ` - -Type $type - if ($expected -ne $actual) - { - return $false - } - } - - return $true - -} - -<# -.SYNOPSIS - Helper function used to test the SSLFlags on an Application. - Will return $true if they match and $false if they do not. -.PARAMETER SslFlags - Specifies the SslFlags to Test -.PARAMETER Location - Specifies the path in the IIS: PSDrive to the Application -#> -function Test-SslFlags -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [AllowEmptyString()] - [ValidateSet('','Ssl','SslNegotiateCert','SslRequireCert','Ssl128')] - [String[]] $SslFlags = '', - - [Parameter(Mandatory = $true)] - [String] $Location - ) - - $CurrentSslFlags = Get-SslFlags -Location $Location - - if(Compare-Object -ReferenceObject $CurrentSslFlags ` - -DifferenceObject $SslFlags) - { - return $false - } - - return $true -} - -#endregion - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebApplication/MSFT_xWebApplication.schema.mof b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebApplication/MSFT_xWebApplication.schema.mof deleted file mode 100644 index 3b8da457..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebApplication/MSFT_xWebApplication.schema.mof +++ /dev/null @@ -1,25 +0,0 @@ -[ClassVersion("1.0.0")] -class MSFT_xWebApplicationAuthenticationInformation -{ - [Write] Boolean Anonymous; - [Write] Boolean Basic; - [Write] Boolean Digest; - [Write] Boolean Windows; -}; - -[ClassVersion("1.0.0.0"), FriendlyName("xWebApplication")] -class MSFT_xWebApplication : OMI_BaseResource -{ - [Key, Description("Name of website with which web application is associated")] String Website; - [Key, Description("Name of web application")] String Name; - [Required, Description("Web application pool for the web application")] String WebAppPool; - [Required, Description("Physical path for the web application directory")] String PhysicalPath; - [Write, Description("Whether web application should be present or absent"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("SSLFlags for the application"), ValueMap{"","Ssl","SslNegotiateCert","SslRequireCert","Ssl128"},Values{"","Ssl","SslNegotiateCert","SslRequireCert","Ssl128"}] String SslFlags[]; - [write, EmbeddedInstance("MSFT_xWebApplicationAuthenticationInformation"), Description("Hashtable containing authentication information (Anonymous, Basic, Digest, Windows)")] String AuthenticationInfo; - [Write, Description ("Allows a Application to automatically start without a request")] Boolean PreloadEnabled; - [Write, Description ("Enables Autostart on an Application.")] Boolean ServiceAutoStartEnabled; - [Write, Description ("Adds a AutostartProvider")] String ServiceAutoStartProvider; - [Write, Description ("Adds a AutostartProvider ApplicationType")] String ApplicationType; - [Write, Description ("Adds EnabledProtocols on an Application"), ValueMap{"http","https","net.tcp","net.msmq","net.pipe"},Values{"http","https","net.tcp","net.msmq","net.pipe"}] String EnabledProtocols[]; -}; diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebConfigKeyValue/MSFT_xWebConfigKeyValue.psm1 b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebConfigKeyValue/MSFT_xWebConfigKeyValue.psm1 deleted file mode 100644 index dd8a59ab..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebConfigKeyValue/MSFT_xWebConfigKeyValue.psm1 +++ /dev/null @@ -1,404 +0,0 @@ - -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData -StringData @' - VerboseGetTargetCheckingTarget = Checking for the existance of key "{0}" in ConfigSection "{1}" located at "{2}" - VerboseGetTargetAttributeCheck = Checking if key "{0}" is an Attribute - VerboseGetTargetKeyNotFound = Key "{0}" has not been found. - VerboseGetTargetKeyFound = Key "{0}" has been found - VerboseSetTargetCheckingKey = Checking for existance of key "{0}" - VerboseSetTargetAddItem = Key "{0}" does not exist, adding key - VerboseSetTargetEditItem = Key "{0}" exists, editing key - VerboseSetTargetRemoveItem = Key "{0}" exists, removing key - VerboseTestTargetCheckingTarget = Checking for the existance of key "{0}" in ConfigSection "{1}" located at "{2}" - VerboseTestTargetKeyNotFound = Key "{0}" has not been found. - VerboseTestTargetKeyWasFound = Key "{0}" has been found. -'@ -} - -<# - .SYNOPSIS - Gets the value of the specified key in the config file -#> -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] $WebsitePath, - - [parameter(Mandatory = $true)] - [ValidateSet('AppSettings')] - [System.String] $ConfigSection, - - [parameter(Mandatory = $true)] - [String] $Key - ) - - Write-Verbose ` - -Message ($LocalizedData.VerboseGetTargetCheckingTarget -f $Key, $ConfigSection, $WebsitePath ) - - $existingValue = Get-ItemValue ` - -Key $Key ` - -IsAttribute $false ` - -WebsitePath $WebsitePath ` - -ConfigSection $ConfigSection - - if ( $null -eq $existingValue ) - { - Write-Verbose ` - -Message ($LocalizedData.VerboseGetTargetAttributeCheck -f $Key ) - - $existingValue = Get-ItemValue ` - -Key $Key ` - -IsAttribute $true ` - -WebsitePath $WebsitePath ` - -ConfigSection $ConfigSection - } - - if ( $existingValue.Length -eq 0 ) - { - Write-Verbose ` - -Message ($LocalizedData.VerboseGetTargetKeyNotFound -f $Key ) - - return @{ - Ensure = 'Absent' - Key = $Key - Value = $existingValue - } - } - - Write-Verbose ` - -Message ($LocalizedData.VerboseGetTargetKeyFound -f $Key ) - - return @{ - Ensure = 'Present' - Key = $Key - Value = $existingValue - } -} - -<# - .SYNOPSIS - Sets the value of the specified key in the config file -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] $WebsitePath, - - [parameter(Mandatory = $true)] - [ValidateSet('AppSettings')] - [System.String] $ConfigSection, - - [parameter(Mandatory = $true)] - [String] $Key, - - [ValidateSet('Present','Absent')] - [System.String] $Ensure = 'Present', - - [String] $Value, - - [System.Boolean] $IsAttribute - ) - - if ($Ensure -eq 'Present') - { - Write-Verbose ` - -Message ($LocalizedData.VerboseSetTargetCheckingKey -f $Key ) - - $existingValue = Get-ItemValue ` - -Key $Key ` - -IsAttribute $IsAttribute ` - -WebsitePath $WebsitePath ` - -ConfigSection $ConfigSection - - if ( (-not $IsAttribute -and ($null -eq $existingValue) ) ` - -or ( $IsAttribute -and ($existingValue.Length -eq 0) ) ) - { - Write-Verbose ` - -Message ($LocalizedData.VerboseSetTargetAddItem -f $Key ) - - Add-Item ` - -Key $Key ` - -Value $Value ` - -IsAttribute $IsAttribute ` - -WebsitePath $WebsitePath ` - -ConfigSection $ConfigSection - } - else - { - $propertyName = 'value' - - if ( $IsAttribute ) - { - $propertyName = $Key - } - - Write-Verbose ` - -Message ($LocalizedData.VerboseSetTargetEditItem -f $Key ) - - Edit-Item ` - -PropertyName $propertyName ` - -OldValue $Key ` - -NewValue $Value ` - -IsAttribute $IsAttribute ` - -WebsitePath $WebsitePath ` - -ConfigSection $ConfigSection - } - } - else - { - Write-Verbose ` - -Message ($LocalizedData.VerboseSetTargetRemoveItem -f $Key ) - - Remove-Item ` - -Key $Key ` - -IsAttribute $IsAttribute ` - -WebsitePath $WebsitePath ` - -ConfigSection $ConfigSection - } -} - -<# - .SYNOPSIS - Tests the value of the specified key in the config file -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] $WebsitePath, - - [parameter(Mandatory = $true)] - [ValidateSet('AppSettings')] - [System.String] $ConfigSection, - - [parameter(Mandatory = $true)] - [String] $Key, - - [String] $Value, - - [ValidateSet('Present','Absent')] - [System.String] $Ensure = 'Present', - - [System.Boolean] $IsAttribute - ) - - if ( -not $PSBoundParameters.ContainsKey('IsAttribute') ) - { - $IsAttribute = $false - } - - Write-Verbose ` - -Message ($LocalizedData.VerboseTestTargetCheckingTarget -f $Key, $ConfigSection, $WebsitePath ) - - $existingValue = Get-ItemValue ` - -Key $Key ` - -IsAttribute $IsAttribute ` - -WebsitePath $WebsitePath ` - -ConfigSection $ConfigSection - - if ( $Ensure -eq 'Present' ) - { - if ( ( $null -eq $existingValue ) -or ( $existingValue -ne $Value ) ` - -or ($existingValue.Length -eq 0) ) - { - Write-Verbose ` - -Message ($LocalizedData.VerboseTestTargetKeyNotFound -f $Key ) - return $false - } - } - else - { - if ( ( $null -ne $existingValue ) -or ( $existingValue.Length -ne 0 ) ) - { - Write-Verbose ` - -Message ($LocalizedData.VerboseTestTargetKeyNotFound -f $Key ) - - return $false - } - } - - Write-Verbose ` - -Message ($LocalizedData.VerboseTestTargetKeyWasFound -f $Key) - - return $true -} - -# region Helper Functions - -function Add-Item -{ - param - ( - [string] $Key, - - [string] $Value, - - [Boolean] $isAttribute, - - [string] $WebsitePath, - - [string] $ConfigSection - ) - - $itemCollection = @{ - Key = $Key; - Value = $Value; - } - - if ( -not $isAttribute ) - { - Add-WebConfigurationProperty ` - -Filter $ConfigSection ` - -Name '.' ` - -Value $itemCollection ` - -PSPath $WebsitePath - } - else - { - Set-WebConfigurationProperty ` - -Filter $ConfigSection ` - -PSPath $WebsitePath ` - -Name $Key ` - -Value $Value ` - -WarningAction Stop - } -} - -function Edit-Item -{ - param - ( - [string] $PropertyName, - - [string] $OldValue, - - [string] $NewValue, - - [Boolean] $IsAttribute, - - [string] $WebsitePath, - - [string] $ConfigSection - ) - - if ( -not $IsAttribute ) - { - $filter = "$ConfigSection/add[@key=`'$OldValue`']" - - Set-WebConfigurationProperty -Filter $filter ` - -PSPath $WebsitePath ` - -Name $PropertyName ` - -Value $NewValue ` - -WarningAction Stop - } - else - { - Set-WebConfigurationProperty ` - -Filter $ConfigSection ` - -PSPath $WebsitePath ` - -Name $PropertyName ` - -Value $NewValue ` - -WarningAction Stop - } -} - -function Remove-Item -{ - param - ( - [string] $Key, - - [Boolean] $IsAttribute, - - [string] $WebsitePath, - - [string] $ConfigSection - ) - - if ( -not $isAttribute ) - { - $filter = "$ConfigSection/add[@key=`'$key`']" - Clear-WebConfiguration ` - -Filter $filter ` - -PSPath $WebsitePath ` - -WarningAction Stop - } - else - { - $filter = "$ConfigSection/@$key" - - <# - This is a workaround to ensure if appSettings has no collection - and we try to delete the only attribute, the entire node is not deleted. - if we try removing the only attribute even if there is one collection item, - the node is preserved. - #> - Add-Item ` - -Key 'dummyKey' ` - -Value 'dummyValue' ` - -IsAttribute $false ` - -WebsitePath $WebsitePath ` - -ConfigSection $ConfigSection - - Clear-WebConfiguration ` - -Filter $filter ` - -PSPath $WebsitePath ` - -WarningAction Stop - - Remove-Item ` - -Key 'dummyKey' ` - -IsAttribute $false ` - -WebsitePath $WebsitePath ` - -ConfigSection $ConfigSection - } -} - -function Get-ItemValue -{ - param - ( - [string] $Key, - - [Boolean] $isAttribute, - - [string] $WebsitePath, - - # If this is null $value.Value will be null - [string] $ConfigSection - ) - - if (-not $isAttribute) - { - $filter = "$ConfigSection/add[@key=`'$key`']" - $value = Get-WebConfigurationProperty ` - -Filter $filter ` - -Name 'value' ` - -PSPath $WebsitePath - } - else - { - $value = Get-WebConfigurationProperty ` - -Filter $ConfigSection ` - -Name "$Key" ` - -PSPath $WebsitePath - } - - return $value.Value -} - -# endregion - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebConfigKeyValue/MSFT_xWebConfigKeyValue.schema.mof b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebConfigKeyValue/MSFT_xWebConfigKeyValue.schema.mof deleted file mode 100644 index 1b504152..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebConfigKeyValue/MSFT_xWebConfigKeyValue.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xWebConfigKeyValue")] -class MSFT_xWebConfigKeyValue : OMI_BaseResource -{ - [Key, Description("Path to website location(IIS or WebAdministration format)")] String WebsitePath; - [Key, Description("Config Section to be update"), ValueMap{"AppSettings"}, Values{"AppSettings"}] String ConfigSection; - [Key, Description("Key for AppSettings")] String Key; - [Write, ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("Value for AppSettings")] String Value; - [Write, Description("If the given key value pair is for attribute, default is element")] Boolean IsAttribute; -}; diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebSiteDefaults/MSFT_xWebSiteDefaults.psm1 b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebSiteDefaults/MSFT_xWebSiteDefaults.psm1 deleted file mode 100644 index cd738a7f..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebSiteDefaults/MSFT_xWebSiteDefaults.psm1 +++ /dev/null @@ -1,245 +0,0 @@ -# Load the Helper Module -Import-Module -Name "$PSScriptRoot\..\Helper.psm1" - -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData -StringData @' - NoWebAdministrationModule = Please ensure that WebAdministration module is installed. - SettingValue = Changing default Value '{0}' to '{1}' - ValueOk = Default Value '{0}' is already '{1}' - VerboseGetTargetResource = Get-TargetResource has been run. -'@ -} -function Get-TargetResource -{ - <# - .SYNOPSIS - This will return a hashtable of results - #> - - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory)] - [ValidateSet('Machine')] - [String] - $ApplyTo - ) - - Assert-Module - - Write-Verbose -Message $LocalizedData.VerboseGetTargetResource - - return @{ - LogFormat = (Get-Value 'siteDefaults/logFile' 'logFormat') - TraceLogDirectory = ( Get-Value 'siteDefaults/traceFailedRequestsLogging' 'directory') - DefaultApplicationPool = (Get-Value 'applicationDefaults' 'applicationPool') - AllowSubDirConfig = (Get-Value 'virtualDirectoryDefaults' 'allowSubDirConfig') - ApplyTo = 'Machine' - LogDirectory = (Get-Value 'siteDefaults/logFile' 'directory') - } - -} - -function Set-TargetResource -{ - <# - .SYNOPSIS - This will set the desired state - - .NOTES - Only a limited number of settings are supported at this time - We try to cover the most common use cases - We have a single parameter for each setting - #> - - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - param - ( - [ValidateSet('Machine')] - [Parameter(Mandatory = $true)] - [String] $ApplyTo, - - [ValidateSet('W3C','IIS','NCSA','Custom')] - [String] $LogFormat, - - [String] $LogDirectory, - - [String] $TraceLogDirectory, - - [String] $DefaultApplicationPool, - - [ValidateSet('true','false')] - [String] $AllowSubDirConfig - ) - - Assert-Module - - Set-Value 'siteDefaults/logFile' 'logFormat' $LogFormat - Set-Value 'siteDefaults/logFile' 'directory' $LogDirectory - Set-Value 'siteDefaults/traceFailedRequestsLogging' 'directory' $TraceLogDirectory - Set-Value 'applicationDefaults' 'applicationPool' $DefaultApplicationPool - Set-Value 'virtualDirectoryDefaults' 'allowSubDirConfig' $AllowSubDirConfig - -} - -function Test-TargetResource -{ - <# - .SYNOPSIS - This tests the desired state. If the state is not correct it will return $false. - If the state is correct it will return $true - #> - - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [OutputType([System.Boolean])] - param - ( - [ValidateSet('Machine')] - [Parameter(Mandatory = $true)] - [String] $ApplyTo, - - [ValidateSet('W3C','IIS','NCSA','Custom')] - [String] $LogFormat, - - [String] $LogDirectory, - - [String] $TraceLogDirectory, - - [String] $DefaultApplicationPool, - - [ValidateSet('true','false')] - [String] $AllowSubDirConfig - ) - - Assert-Module - - # check for the various given settings: - - if (-not(Confirm-Value -Path 'virtualDirectoryDefaults' ` - -Name 'allowSubDirConfig' ` - -NewValue $AllowSubDirConfig)) - { - return $false - } - - if (-not(Confirm-Value -Path 'siteDefaults/logFile' ` - -Name 'logFormat' ` - -NewValue $LogFormat)) - { - return $false - } - - if (-not(Confirm-Value -Path 'siteDefaults/logFile' ` - -Name 'directory' ` - -NewValue $LogDirectory)) - { - return $false - } - - if (-not(Confirm-Value -Path 'siteDefaults/traceFailedRequestsLogging' ` - -Name 'directory' ` - -NewValue $TraceLogDirectory)) - { - return $false - } - - if (-not(Confirm-Value -Path 'applicationDefaults' ` - -Name 'applicationPool' ` - -NewValue $DefaultApplicationPool)) - { - return $false - } - - return $true - -} - -#region Helper Functions - -function Confirm-Value -{ - [OutputType([System.Boolean])] - [CmdletBinding()] - param - ( - [String] $Path, - - [String] $Name, - - [String] $NewValue - ) - - if (-not($NewValue)) - { - return $true - } - - $existingValue = Get-Value -Path $Path -Name $Name - if ($existingValue -ne $NewValue) - { - return $false - } - else - { - $relPath = $Path + '/' + $Name - Write-Verbose($LocalizedData.ValueOk -f $relPath,$NewValue); - return $true - } - -} - -function Set-Value -{ - [CmdletBinding()] - param - ( - [String] $Path, - - [String] $Name, - - [String] $NewValue - ) - - # if the variable doesn't exist, the user doesn't want to change this Value - if (-not($NewValue)) - { - return - } - - # get the existing Value to compare - $existingValue = Get-Value -Path $Path -Name $Name - if ($existingValue -ne $NewValue) - { - Set-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST' ` - -Filter "system.applicationHost/sites/$Path" ` - -Name $Name ` - -Value "$NewValue" - $relPath = $Path + '/' + $Name - Write-Verbose($LocalizedData.SettingValue -f $relPath,$NewValue); - } - -} - -function Get-Value -{ - [CmdletBinding()] - param - ( - [String] $Path, - - [String] $Name - ) - - return Get-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST' ` - -Filter "system.applicationHost/sites/$Path" ` - -Name $Name -} - -#endregion - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebSiteDefaults/MSFT_xWebSiteDefaults.schema.mof b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebSiteDefaults/MSFT_xWebSiteDefaults.schema.mof deleted file mode 100644 index 44b54049..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebSiteDefaults/MSFT_xWebSiteDefaults.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ -[ClassVersion("1.0.0"), FriendlyName("xWebSiteDefaults")] -class MSFT_xWebSiteDefaults : OMI_BaseResource -{ - [Key, Description("Dummy value because we need a key, always 'Machine'"), ValueMap{"Machine"}, Values{"Machine"}] string ApplyTo; - [write, Description("sites/siteDefaults/logFile/logFormat"), ValueMap{"W3C","IIS","NCSA","Custom"}, Values{"W3C","IIS","NCSA","Custom"}] string LogFormat; - [write, Description("sites/siteDefaults/logFile/directory")] string LogDirectory; - [write, Description("sites/siteDefaults/traceFailedRequestsLogging/directory")] string TraceLogDirectory; - [write, Description("sites/applicationDefaults/applicationPool")] string DefaultApplicationPool; - [write, Description("sites/virtualDirectoryDefaults/allowSubDirConfig"), ValueMap{"true","false"}, Values{"true","false"}] string AllowSubDirConfig; -}; diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebVirtualDirectory/MSFT_xWebVirtualDirectory.psm1 b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebVirtualDirectory/MSFT_xWebVirtualDirectory.psm1 deleted file mode 100644 index c3f8dc0c..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebVirtualDirectory/MSFT_xWebVirtualDirectory.psm1 +++ /dev/null @@ -1,211 +0,0 @@ -# Load the Helper Module -Import-Module -Name "$PSScriptRoot\..\Helper.psm1" - -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData -StringData @' - VerboseGetTargetResource = Get-TargetResource has been run. - VerboseSetTargetPhysicalPath = Updating physical path for web virtual directory "{0}". - VerboseSetTargetCreateVirtualDirectory = Creating new Web Virtual Directory "{0}". - VerboseSetTargetRemoveVirtualDirectory = Removing existing Virtual Directory "{0}". - VerboseTestTargetFalse = Physical path "{0}" for web virtual directory "{1}" does not match desired state. - VerboseTestTargetTrue = Web virtual directory is in required state. - VerboseTestTargetAbsentTrue = Web virtual directory "{0}" should be absent and is absent. -'@ -} - -function Get-TargetResource -{ - <# - .SYNOPSIS - This will return a hashtable of results - #> - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [System.String] - $Website, - - [Parameter(Mandatory = $true)] - [AllowEmptyString()] - [System.String] - $WebApplication, - - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [System.String] - $PhysicalPath - ) - - Assert-Module - - $virtualDirectory = Get-WebVirtualDirectory -Site $Website ` - -Name $Name ` - -Application $WebApplication - - $PhysicalPath = '' - $Ensure = 'Absent' - - if ($virtualDirectory.Count -eq 1) - { - $PhysicalPath = $virtualDirectory.PhysicalPath - $Ensure = 'Present' - } - - Write-Verbose -Message ($LocalizedData.VerboseGetTargetResource) - - $returnValue = @{ - Name = $Name - Website = $Website - WebApplication = $WebApplication - PhysicalPath = $PhysicalPath - Ensure = $Ensure - } - - return $returnValue -} - -function Set-TargetResource -{ - <# - .SYNOPSIS - This will set the desired state - #> - [CmdletBinding()] - param - ( - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present', - - [Parameter(Mandatory = $true)] - [System.String] - $Website, - - [Parameter(Mandatory = $true)] - [AllowEmptyString()] - [System.String] - $WebApplication, - - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [System.String] - $PhysicalPath - ) - - Assert-Module - - if ($Ensure -eq 'Present') - { - $virtualDirectory = Get-WebVirtualDirectory -Site $Website ` - -Name $Name ` - -Application $WebApplication - if ($virtualDirectory.count -eq 0) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetCreateVirtualDirectory -f $Name) - New-WebVirtualDirectory -Site $Website ` - -Application $WebApplication ` - -Name $Name ` - -PhysicalPath $PhysicalPath - } - else - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetPhysicalPath -f $Name) - - if ($WebApplication.Length -gt 0) - { - $ItemPath = "IIS:Sites\$Website\$WebApplication\$Name" - } - else - { - $ItemPath = "IIS:Sites\$Website\$Name" - } - - Set-ItemProperty -Path $ItemPath ` - -Name physicalPath ` - -Value $PhysicalPath - } - } - - if ($Ensure -eq 'Absent') - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetRemoveVirtualDirectory -f $Name) - Remove-WebVirtualDirectory -Site $Website ` - -Application $WebApplication ` - -Name $Name - } -} - -function Test-TargetResource -{ - <# - .SYNOPSIS - This tests the desired state. If the state is not correct it will return $false. - If the state is correct it will return $true - #> - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [ValidateSet('Present','Absent')] - [System.String] - $Ensure = 'Present', - - [Parameter(Mandatory = $true)] - [System.String] - $Website, - - [Parameter(Mandatory = $true)] - [AllowEmptyString()] - [System.String] - $WebApplication, - - [Parameter(Mandatory = $true)] - [System.String] - $Name, - - [Parameter(Mandatory = $true)] - [System.String] - $PhysicalPath - ) - - Assert-Module - - $virtualDirectory = Get-WebVirtualDirectory -Site $Website ` - -Name $Name ` - -Application $WebApplication - - if ($virtualDirectory.Count -eq 1 -and $Ensure -eq 'Present') - { - if ($virtualDirectory.PhysicalPath -eq $PhysicalPath) - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetTrue) - return $true - } - else - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalse -f $PhysicalPath, $Name) - return $false - } - } - - if ($virtualDirectory.count -eq 0 -and $Ensure -eq 'Absent') - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetAbsentTrue -f $Name) - return $true - } - - return $false -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebVirtualDirectory/MSFT_xWebVirtualDirectory.schema.mof b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebVirtualDirectory/MSFT_xWebVirtualDirectory.schema.mof deleted file mode 100644 index 30523659..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebVirtualDirectory/MSFT_xWebVirtualDirectory.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xWebVirtualDirectory")] -class MSFT_xWebVirtualDirectory : OMI_BaseResource -{ - [Key, Description("Name of website with which Web Application is associated")] string Website; - [Key, Description("Web application name for the virtual directory")] string WebApplication; - [Key, Description("Name of virtual directory")] string Name; - [Required, Description("Physical path for the virtual directory")] string PhysicalPath; - [Write, Description("Whether virtual directory should be present or absent"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure; -}; diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebsite/MSFT_xWebsite.psm1 b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebsite/MSFT_xWebsite.psm1 deleted file mode 100644 index c4edfcd9..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebsite/MSFT_xWebsite.psm1 +++ /dev/null @@ -1,2106 +0,0 @@ -#requires -Version 4.0 -Modules CimCmdlets - -# Load the Helper Module -Import-Module -Name "$PSScriptRoot\..\Helper.psm1" -Verbose:$false - -# Localized messages -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData -StringData @' - ErrorWebsiteNotFound = The requested website "{0}" cannot be found on the target machine. - ErrorWebsiteDiscoveryFailure = Failure to get the requested website "{0}" information from the target machine. - ErrorWebsiteCreationFailure = Failure to successfully create the website "{0}". Error: "{1}". - ErrorWebsiteRemovalFailure = Failure to successfully remove the website "{0}". Error: "{1}". - ErrorWebsiteBindingUpdateFailure = Failure to successfully update the bindings for website "{0}". Error: "{1}". - ErrorWebsiteBindingInputInvalidation = Desired website bindings are not valid for website "{0}". - ErrorWebsiteCompareFailure = Failure to successfully compare properties for website "{0}". Error: "{1}". - ErrorWebBindingCertificate = Failure to add certificate to web binding. Please make sure that the certificate thumbprint "{0}" is valid. Error: "{1}". - ErrorWebsiteStateFailure = Failure to successfully set the state of the website "{0}". Error: "{1}". - ErrorWebsiteBindingConflictOnStart = Website "{0}" could not be started due to binding conflict. Ensure that the binding information for this website does not conflict with any existing website's bindings before trying to start it. - ErrorWebBindingInvalidIPAddress = Failure to validate the IPAddress property value "{0}". Error: "{1}". - ErrorWebBindingInvalidPort = Failure to validate the Port property value "{0}". The port number must be a positive integer between 1 and 65535. - ErrorWebBindingMissingBindingInformation = The BindingInformation property is required for bindings of type "{0}". - ErrorWebBindingMissingCertificateThumbprint = The CertificateThumbprint property is required for bindings of type "{0}". - ErrorWebBindingMissingSniHostName = The HostName property is required for use with Server Name Indication. - ErrorWebsitePreloadFailure = Failure to set Preload on Website "{0}". Error: "{1}". - ErrorWebsiteAutoStartFailure = Failure to set AutoStart on Website "{0}". Error: "{1}". - ErrorWebsiteAutoStartProviderFailure = Failure to set AutoStartProvider on Website "{0}". Error: "{1}". - ErrorWebsiteTestAutoStartProviderFailure = Desired AutoStartProvider is not valid due to a conflicting Global Property. Ensure that the serviceAutoStartProvider is a unique key." - VerboseSetTargetUpdatedPhysicalPath = Physical Path for website "{0}" has been updated to "{1}". - VerboseGetTargetAbsent = No Website exists with this name. - VerboseGetTargetPresent = A single Website exists with this name - VerboseSetTargetUpdatedApplicationPool = Application Pool for website "{0}" has been updated to "{1}". - VerboseSetTargetUpdatedBindingInfo = Bindings for website "{0}" have been updated. - VerboseSetTargetUpdatedEnabledProtocols = Enabled Protocols for website "{0}" have been updated to "{1}". - VerboseSetTargetUpdatedState = State for website "{0}" has been updated to "{1}". - VerboseSetTargetWebsiteCreated = Successfully created website "{0}". - VerboseSetTargetWebsiteStarted = Successfully started website "{0}". - VerboseSetTargetWebsiteRemoved = Successfully removed website "{0}". - VerboseSetTargetAuthenticationInfoUpdated = Successfully updated AuthenticationInfo on website "{0}". - VerboseSetTargetWebsitePreloadUpdated = Successfully updated Preload on website "{0}". - VerboseSetTargetWebsiteAutoStartUpdated = Successfully updated AutoStart on website "{0}". - VerboseSetTargetWebsiteAutoStartProviderUpdated = Successfully updated AutoStartProvider on website "{0}". - VerboseSetTargetIISAutoStartProviderUpdated = Successfully updated AutoStartProvider in IIS. - VerboseSetTargetUpdateLogPath = LogPath does not match and will be updated on Website "{0}". - VerboseSetTargetUpdateLogFlags = LogFlags do not match and will be updated on Website "{0}". - VerboseSetTargetUpdateLogPeriod = LogPeriod does not match and will be updated on Website "{0}". - VerboseSetTargetUpdateLogTruncateSize = TruncateSize does not match and will be updated on Website "{0}". - VerboseSetTargetUpdateLoglocalTimeRollover = LoglocalTimeRollover does not match and will be updated on Website "{0}". - VerboseSetTargetUpdateLogFormat = LogFormat is not in the desired state and will be updated on Website "{0}" - VerboseTestTargetFalseEnsure = The Ensure state for website "{0}" does not match the desired state. - VerboseTestTargetFalsePhysicalPath = Physical Path of website "{0}" does not match the desired state. - VerboseTestTargetFalseState = The state of website "{0}" does not match the desired state. - VerboseTestTargetFalseApplicationPool = Application Pool for website "{0}" does not match the desired state. - VerboseTestTargetFalseBindingInfo = Bindings for website "{0}" do not match the desired state. - VerboseTestTargetFalseEnabledProtocols = Enabled Protocols for website "{0}" do not match the desired state. - VerboseTestTargetFalseDefaultPage = Default Page for website "{0}" does not match the desired state. - VerboseTestTargetTrueResult = The target resource is already in the desired state. No action is required. - VerboseTestTargetFalseResult = The target resource is not in the desired state. - VerboseTestTargetFalsePreload = Preload for website "{0}" do not match the desired state. - VerboseTestTargetFalseAutoStart = AutoStart for website "{0}" do not match the desired state. - VerboseTestTargetFalseAuthenticationInfo = AuthenticationInfo for website "{0}" is not in the desired state. - VerboseTestTargetFalseIISAutoStartProvider = AutoStartProvider for IIS is not in the desired state - VerboseTestTargetFalseWebsiteAutoStartProvider = AutoStartProvider for website "{0}" is not in the desired state - VerboseTestTargetFalseLogPath = LogPath does not match desired state on Website "{0}". - VerboseTestTargetFalseLogFlags = LogFlags does not match desired state on Website "{0}". - VerboseTestTargetFalseLogPeriod = LogPeriod does not match desired state on Website "{0}". - VerboseTestTargetFalseLogTruncateSize = LogTruncateSize does not match desired state on Website "{0}". - VerboseTestTargetFalseLoglocalTimeRollover = LoglocalTimeRollover does not match desired state on Website "{0}". - VerboseTestTargetFalseLogFormat = LogFormat does not match desired state on Website "{0}". - VerboseConvertToWebBindingIgnoreBindingInformation = BindingInformation is ignored for bindings of type "{0}" in case at least one of the following properties is specified: IPAddress, Port, HostName. - VerboseConvertToWebBindingDefaultPort = Port is not specified. The default "{0}" port "{1}" will be used. - VerboseConvertToWebBindingDefaultCertificateStoreName = CertificateStoreName is not specified. The default value "{0}" will be used. - VerboseTestBindingInfoSameIPAddressPortHostName = BindingInfo contains multiple items with the same IPAddress, Port, and HostName combination. - VerboseTestBindingInfoSamePortDifferentProtocol = BindingInfo contains items that share the same Port but have different Protocols. - VerboseTestBindingInfoSameProtocolBindingInformation = BindingInfo contains multiple items with the same Protocol and BindingInformation combination. - VerboseTestBindingInfoInvalidCatch = Unable to validate BindingInfo: "{0}". - VerboseUpdateDefaultPageUpdated = Default page for website "{0}" has been updated to "{1}". - WarningLogPeriod = LogTruncateSize has is an input as will overwrite this desired state on Website "{0}". - WarningIncorrectLogFormat = LogFormat is not W3C, as a result LogFlags will not be used on Website "{0}". -'@ -} - -<# - .SYNOPSYS - The Get-TargetResource cmdlet is used to fetch the status of role or Website on - the target machine. It gives the Website info of the requested role/feature on the - target machine. - - .PARAMETER Name - Name of the website -#> -function Get-TargetResource -{ - - [CmdletBinding()] - [OutputType([Hashtable])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name - ) - - Assert-Module - - $website = Get-Website | Where-Object -FilterScript {$_.Name -eq $Name} - - if ($website.Count -eq 0) - { - Write-Verbose -Message ($LocalizedData.VerboseGetTargetAbsent) - $ensureResult = 'Absent' - } - elseif ($website.Count -eq 1) - { - Write-Verbose -Message ($LocalizedData.VerboseGetTargetPresent) - $ensureResult = 'Present' - - $cimBindings = @(ConvertTo-CimBinding -InputObject $website.bindings.Collection) - - $allDefaultPages = @( - Get-WebConfiguration -Filter '//defaultDocument/files/*' -PSPath "IIS:\Sites\$Name" | - ForEach-Object -Process {Write-Output -InputObject $_.value} - ) - $cimAuthentication = Get-AuthenticationInfo -Site $Name - $websiteAutoStartProviders = (Get-WebConfiguration ` - -filter /system.applicationHost/serviceAutoStartProviders).Collection - $webConfiguration = $websiteAutoStartProviders | ` - Where-Object -Property Name -eq -Value $ServiceAutoStartProvider | ` - Select-Object Name,Type - } - # Multiple websites with the same name exist. This is not supported and is an error - else - { - $errorMessage = $LocalizedData.ErrorWebsiteDiscoveryFailure -f $Name - New-TerminatingError -ErrorId 'WebsiteDiscoveryFailure' ` - -ErrorMessage $errorMessage ` - -ErrorCategory 'InvalidResult' - } - - # Add all website properties to the hash table - return @{ - Ensure = $ensureResult - Name = $Name - PhysicalPath = $website.PhysicalPath - State = $website.State - ApplicationPool = $website.ApplicationPool - BindingInfo = $cimBindings - DefaultPage = $allDefaultPages - EnabledProtocols = $website.EnabledProtocols - AuthenticationInfo = $cimAuthentication - PreloadEnabled = $website.applicationDefaults.preloadEnabled - ServiceAutoStartProvider = $website.applicationDefaults.serviceAutoStartProvider - ServiceAutoStartEnabled = $website.applicationDefaults.serviceAutoStartEnabled - ApplicationType = $webConfiguration.Type - LogPath = $website.logfile.directory - LogFlags = [Array]$website.logfile.LogExtFileFlags - LogPeriod = $website.logfile.period - LogtruncateSize = $website.logfile.truncateSize - LoglocalTimeRollover = $website.logfile.localTimeRollover - LogFormat = $website.logfile.logFormat - } -} - -<# - .SYNOPSYS - The Set-TargetResource cmdlet is used to create, delete or configure a website on the - target machine. - - .PARAMETER PhysicalPath - Specifies the physical path of the web site. Don't set this if the site will be deployed by an external tool that updates the path. -#> -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [String] - $PhysicalPath, - - [ValidateSet('Started', 'Stopped')] - [String] - $State = 'Started', - - # The application pool name must contain between 1 and 64 characters - [ValidateLength(1, 64)] - [String] - $ApplicationPool, - - [Microsoft.Management.Infrastructure.CimInstance[]] - $BindingInfo, - - [String[]] - $DefaultPage, - - [String] - $EnabledProtocols, - - [Microsoft.Management.Infrastructure.CimInstance] - $AuthenticationInfo, - - [Boolean] - $PreloadEnabled, - - [Boolean] - $ServiceAutoStartEnabled, - - [String] - $ServiceAutoStartProvider, - - [String] - $ApplicationType, - - [String] - $LogPath, - - [ValidateSet('Date','Time','ClientIP','UserName','SiteName','ComputerName','ServerIP','Method','UriStem','UriQuery','HttpStatus','Win32Status','BytesSent','BytesRecv','TimeTaken','ServerPort','UserAgent','Cookie','Referer','ProtocolVersion','Host','HttpSubStatus')] - [String[]] - $LogFlags, - - [ValidateSet('Hourly','Daily','Weekly','Monthly','MaxSize')] - [String] - $LogPeriod, - - [ValidateScript({ - ([ValidateRange(1048576, 4294967295)] $valueAsUInt64 = [UInt64]::Parse($_)) - })] - [String] - $LogTruncateSize, - - [Boolean] - $LoglocalTimeRollover, - - [ValidateSet('IIS','W3C','NCSA')] - [String] - $LogFormat - ) - - Assert-Module - - $website = Get-Website | Where-Object -FilterScript {$_.Name -eq $Name} - - if ($Ensure -eq 'Present') - { - if ($null -ne $website) - { - # Update Physical Path if required - if ([String]::IsNullOrEmpty($PhysicalPath) -eq $false -and ` - $website.PhysicalPath -ne $PhysicalPath) - { - Set-ItemProperty -Path "IIS:\Sites\$Name" ` - -Name physicalPath ` - -Value $PhysicalPath ` - -ErrorAction Stop - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdatedPhysicalPath ` - -f $Name, $PhysicalPath) - } - - # Update Application Pool if required - if ($PSBoundParameters.ContainsKey('ApplicationPool') -and ` - $website.ApplicationPool -ne $ApplicationPool) - { - Set-ItemProperty -Path "IIS:\Sites\$Name" ` - -Name applicationPool ` - -Value $ApplicationPool ` - -ErrorAction Stop - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdatedApplicationPool ` - -f $Name, $ApplicationPool) - } - - # Update Bindings if required - if ($PSBoundParameters.ContainsKey('BindingInfo') -and ` - $null -ne $BindingInfo) - { - if (-not (Test-WebsiteBinding -Name $Name ` - -BindingInfo $BindingInfo)) - { - Update-WebsiteBinding -Name $Name ` - -BindingInfo $BindingInfo - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdatedBindingInfo ` - -f $Name) - } - } - - # Update Enabled Protocols if required - if ($PSBoundParameters.ContainsKey('EnabledProtocols') -and ` - $website.EnabledProtocols -ne $EnabledProtocols) - { - Set-ItemProperty -Path "IIS:\Sites\$Name" ` - -Name enabledProtocols ` - -Value $EnabledProtocols ` - -ErrorAction Stop - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdatedEnabledProtocols ` - -f $Name, $EnabledProtocols) - } - - # Update Default Pages if required - if ($PSBoundParameters.ContainsKey('DefaultPage') -and ` - $null -ne $DefaultPage) - { - Update-DefaultPage -Name $Name ` - -DefaultPage $DefaultPage - } - - # Update State if required - if ($PSBoundParameters.ContainsKey('State') -and ` - $website.State -ne $State) - { - if ($State -eq 'Started') - { - # Ensure that there are no other running websites with binding information that - # will conflict with this website before starting - if (-not (Confirm-UniqueBinding -Name $Name -ExcludeStopped)) - { - # Return error and do not start the website - $errorMessage = $LocalizedData.ErrorWebsiteBindingConflictOnStart ` - -f $Name - New-TerminatingError -ErrorId 'WebsiteBindingConflictOnStart' ` - -ErrorMessage $errorMessage ` - -ErrorCategory 'InvalidResult' - } - - try - { - Start-Website -Name $Name -ErrorAction Stop - } - catch - { - $errorMessage = $LocalizedData.ErrorWebsiteStateFailure ` - -f $Name, $_.Exception.Message - New-TerminatingError -ErrorId 'WebsiteStateFailure' ` - -ErrorMessage $errorMessage ` - -ErrorCategory 'InvalidOperation' - } - } - else - { - try - { - Stop-Website -Name $Name -ErrorAction Stop - } - catch - { - $errorMessage = $LocalizedData.ErrorWebsiteStateFailure ` - -f $Name, $_.Exception.Message - New-TerminatingError -ErrorId 'WebsiteStateFailure' ` - -ErrorMessage $errorMessage ` - -ErrorCategory 'InvalidOperation' - } - } - - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdatedState ` - -f $Name, $State) - } - - # Set Authentication; if not defined then pass in DefaultAuthenticationInfo - if ($PSBoundParameters.ContainsKey('AuthenticationInfo') -and ` - (-not (Test-AuthenticationInfo -Site $Name ` - -AuthenticationInfo $AuthenticationInfo))) - { - Set-AuthenticationInfo -Site $Name ` - -AuthenticationInfo $AuthenticationInfo ` - -ErrorAction Stop - Write-Verbose -Message ($LocalizedData.VerboseSetTargetAuthenticationInfoUpdated ` - -f $Name) - } - - # Update Preload if required - if ($PSBoundParameters.ContainsKey('preloadEnabled') -and ` - ($website.applicationDefaults.preloadEnabled -ne $PreloadEnabled)) - { - Set-ItemProperty -Path "IIS:\Sites\$Name" ` - -Name applicationDefaults.preloadEnabled ` - -Value $PreloadEnabled ` - -ErrorAction Stop - Write-Verbose -Message ($LocalizedData.VerboseSetTargetWebsitePreloadUpdated ` - -f $Name) - } - - # Update AutoStart if required - if ($PSBoundParameters.ContainsKey('ServiceAutoStartEnabled') -and ` - ($website.applicationDefaults.ServiceAutoStartEnabled -ne $ServiceAutoStartEnabled)) - { - Set-ItemProperty -Path "IIS:\Sites\$Name" ` - -Name applicationDefaults.serviceAutoStartEnabled ` - -Value $ServiceAutoStartEnabled ` - -ErrorAction Stop - Write-Verbose -Message ($LocalizedData.VerboseSetTargetWebsiteAutoStartUpdated ` - -f $Name) - } - - # Update AutoStartProviders if required - if ($PSBoundParameters.ContainsKey('ServiceAutoStartProvider') -and ` - ($website.applicationDefaults.ServiceAutoStartProvider -ne ` - $ServiceAutoStartProvider)) - { - if (-not (Confirm-UniqueServiceAutoStartProviders ` - -ServiceAutoStartProvider $ServiceAutoStartProvider ` - -ApplicationType $ApplicationType)) - { - Add-WebConfiguration -filter /system.applicationHost/serviceAutoStartProviders ` - -Value @{ - name=$ServiceAutoStartProvider - type=$ApplicationType} ` - -ErrorAction Stop - Write-Verbose -Message ` - ($LocalizedData.VerboseSetTargetIISAutoStartProviderUpdated) - } - Set-ItemProperty -Path "IIS:\Sites\$Name" ` - -Name applicationDefaults.serviceAutoStartProvider ` - -Value $ServiceAutoStartProvider -ErrorAction Stop - Write-Verbose -Message ` - ($LocalizedData.VerboseSetTargetWebsiteAutoStartProviderUpdated ` - -f $Name) - } - - # Update LogFormat if Needed - if ($PSBoundParameters.ContainsKey('LogFormat') -and ` - ($LogFormat -ne $website.logfile.LogFormat)) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdateLogFormat ` - -f $Name) - - # In Windows Server 2008 R2, Set-ItemProperty only accepts index values to the LogFile.LogFormat property - $site = Get-Item "IIS:\Sites\$Name" - $site.LogFile.LogFormat = $LogFormat - $site | Set-Item - } - - # Update LogFlags if required - if ($PSBoundParameters.ContainsKey('LogFlags') -and ` - (-not (Compare-LogFlags -Name $Name -LogFlags $LogFlags))) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdateLogFlags ` - -f $Name) - - # Set-ItemProperty has no effect with the LogFile.LogExtFileFlags property - $site = Get-Item "IIS:\Sites\$Name" - $site.LogFile.LogFormat = 'W3C' - $site.LogFile.LogExtFileFlags = $LogFlags -join ',' - $site | Set-Item - } - - # Update LogPath if required - if ($PSBoundParameters.ContainsKey('LogPath') -and ` - ($LogPath -ne $website.logfile.directory)) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdateLogPath ` - -f $Name) - Set-ItemProperty -Path "IIS:\Sites\$Name" ` - -Name LogFile.directory -value $LogPath - } - - # Update LogPeriod if needed - if ($PSBoundParameters.ContainsKey('LogPeriod') -and ` - ($LogPeriod -ne $website.logfile.period)) - { - if ($PSBoundParameters.ContainsKey('LogTruncateSize')) - { - Write-Verbose -Message ($LocalizedData.WarningLogPeriod -f $Name) - } - - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdateLogPeriod) - - # In Windows Server 2008 R2, Set-ItemProperty only accepts index values to the LogFile.Period property - $site = Get-Item "IIS:\Sites\$Name" - $site.LogFile.Period = $LogPeriod - $site | Set-Item - } - - # Update LogTruncateSize if needed - if ($PSBoundParameters.ContainsKey('LogTruncateSize') -and ` - ($LogTruncateSize -ne $website.logfile.LogTruncateSize)) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdateLogTruncateSize ` - -f $Name) - Set-ItemProperty -Path "IIS:\Sites\$Name" ` - -Name LogFile.truncateSize -Value $LogTruncateSize - Set-ItemProperty -Path "IIS:\Sites\$Name" ` - -Name LogFile.period -Value 'MaxSize' - } - - # Update LoglocalTimeRollover if neeed - if ($PSBoundParameters.ContainsKey('LoglocalTimeRollover') -and ` - ($LoglocalTimeRollover -ne ` - ([System.Convert]::ToBoolean($website.logfile.LocalTimeRollover)))) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdateLoglocalTimeRollover ` - -f $Name) - Set-ItemProperty -Path "IIS:\Sites\$Name" ` - -Name LogFile.localTimeRollover -Value $LoglocalTimeRollover - } - - } - # Create website if it does not exist - else - { - try - { - $PSBoundParameters.GetEnumerator() | Where-Object -FilterScript { - $_.Key -in (Get-Command -Name New-Website ` - -Module WebAdministration).Parameters.Keys - } | ForEach-Object -Begin { - $newWebsiteSplat = @{} - } -Process { - $newWebsiteSplat.Add($_.Key, $_.Value) - } - - # If there are no other websites, specify the Id Parameter for the new website. - # Otherwise an error can occur on systems running Windows Server 2008 R2. - if (-not (Get-Website)) - { - $newWebsiteSplat.Add('Id', 1) - } - - if ([String]::IsNullOrEmpty($PhysicalPath)) { - # If no physical path is provided run New-Website with -Force flag - $website = New-Website @newWebsiteSplat -ErrorAction Stop -Force - } else { - # If physical path is provided don't run New-Website with -Force flag to verify that the path exists - $website = New-Website @newWebsiteSplat -ErrorAction Stop - } - - Write-Verbose -Message ($LocalizedData.VerboseSetTargetWebsiteCreated ` - -f $Name) - } - catch - { - $errorMessage = $LocalizedData.ErrorWebsiteCreationFailure ` - -f $Name, $_.Exception.Message - New-TerminatingError -ErrorId 'WebsiteCreationFailure' ` - -ErrorMessage $errorMessage ` - -ErrorCategory 'InvalidOperation' - } - - Stop-Website -Name $website.Name -ErrorAction Stop - - # Clear default bindings if new bindings defined and are different - if ($PSBoundParameters.ContainsKey('BindingInfo') -and ` - $null -ne $BindingInfo) - { - if (-not (Test-WebsiteBinding -Name $Name ` - -BindingInfo $BindingInfo)) - { - Update-WebsiteBinding -Name $Name -BindingInfo $BindingInfo - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdatedBindingInfo ` - -f $Name) - } - } - - # Update Enabled Protocols if required - if ($PSBoundParameters.ContainsKey('EnabledProtocols') ` - -and $website.EnabledProtocols ` - -ne $EnabledProtocols) - { - Set-ItemProperty -Path "IIS:\Sites\$Name" ` - -Name enabledProtocols ` - -Value $EnabledProtocols ` - -ErrorAction Stop - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdatedEnabledProtocols ` - -f $Name, $EnabledProtocols) - } - - # Update Default Pages if required - if ($PSBoundParameters.ContainsKey('DefaultPage') -and ` - $null -ne $DefaultPage) - { - Update-DefaultPage -Name $Name ` - -DefaultPage $DefaultPage - } - - # Start website if required - if ($State -eq 'Started') - { - # Ensure that there are no other running websites with binding information that - # will conflict with this website before starting - if (-not (Confirm-UniqueBinding -Name $Name -ExcludeStopped)) - { - # Return error and do not start the website - $errorMessage = $LocalizedData.ErrorWebsiteBindingConflictOnStart ` - -f $Name - New-TerminatingError -ErrorId 'WebsiteBindingConflictOnStart' ` - -ErrorMessage $errorMessage ` - -ErrorCategory 'InvalidResult' - } - - try - { - Start-Website -Name $Name -ErrorAction Stop - Write-Verbose -Message ($LocalizedData.VerboseSetTargetWebsiteStarted ` - -f $Name) - } - catch - { - $errorMessage = $LocalizedData.ErrorWebsiteStateFailure ` - -f $Name, $_.Exception.Message - New-TerminatingError -ErrorId 'WebsiteStateFailure' ` - -ErrorMessage $errorMessage ` - -ErrorCategory 'InvalidOperation' - } - } - - # Set Authentication; if not defined then pass in DefaultAuthenticationInfo - if ($PSBoundParameters.ContainsKey('AuthenticationInfo') -and ` - (-not (Test-AuthenticationInfo -Site $Name ` - -AuthenticationInfo $AuthenticationInfo))) - { - Set-AuthenticationInfo -Site $Name ` - -AuthenticationInfo $AuthenticationInfo ` - -ErrorAction Stop - Write-Verbose -Message ($LocalizedData.VerboseSetTargetAuthenticationInfoUpdated ` - -f $Name) - } - - # Update Preload if required - if ($PSBoundParameters.ContainsKey('preloadEnabled') -and ` - ($website.applicationDefaults.preloadEnabled -ne $PreloadEnabled)) - { - Set-ItemProperty -Path "IIS:\Sites\$Name" ` - -Name applicationDefaults.preloadEnabled ` - -Value $PreloadEnabled ` - -ErrorAction Stop - Write-Verbose -Message ($LocalizedData.VerboseSetTargetWebsitePreloadUpdated ` - -f $Name) - } - - # Update AutoStart if required - if ($PSBoundParameters.ContainsKey('ServiceAutoStartEnabled') -and ` - ($website.applicationDefaults.ServiceAutoStartEnabled -ne $ServiceAutoStartEnabled)) - { - Set-ItemProperty -Path "IIS:\Sites\$Name" ` - -Name applicationDefaults.serviceAutoStartEnabled ` - -Value $ServiceAutoStartEnabled ` - -ErrorAction Stop - Write-Verbose -Message ($LocalizedData.VerboseSetTargetWebsiteAutoStartUpdated ` - -f $Name) - } - - # Update AutoStartProviders if required - if ($PSBoundParameters.ContainsKey('ServiceAutoStartProvider') -and ` - ($website.applicationDefaults.ServiceAutoStartProvider ` - -ne $ServiceAutoStartProvider)) - { - if (-not (Confirm-UniqueServiceAutoStartProviders ` - -ServiceAutoStartProvider $ServiceAutoStartProvider ` - -ApplicationType $ApplicationType)) - { - Add-WebConfiguration -filter /system.applicationHost/serviceAutoStartProviders ` - -Value @{ - name=$ServiceAutoStartProvider; - type=$ApplicationType - } ` - -ErrorAction Stop - Write-Verbose -Message ` - ($LocalizedData.VerboseSetTargetIISAutoStartProviderUpdated) - } - Set-ItemProperty -Path "IIS:\Sites\$Name" ` - -Name applicationDefaults.serviceAutoStartProvider ` - -Value $ServiceAutoStartProvider -ErrorAction Stop - Write-Verbose -Message ` - ($LocalizedData.VerboseSetTargetWebsiteAutoStartProviderUpdated ` - -f $Name) - } - - # Update LogFormat if Needed - if ($PSBoundParameters.ContainsKey('LogFormat') -and ` - ($LogFormat -ne $website.logfile.LogFormat)) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdateLogFormat -f $Name) - - # In Windows Server 2008 R2, Set-ItemProperty only accepts index values to the LogFile.LogFormat property - $site = Get-Item "IIS:\Sites\$Name" - $site.LogFile.LogFormat = $LogFormat - $site | Set-Item - } - - # Update LogFlags if required - if ($PSBoundParameters.ContainsKey('LogFlags') -and ` - (-not (Compare-LogFlags -Name $Name -LogFlags $LogFlags))) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdateLogFlags ` - -f $Name) - - # Set-ItemProperty has no effect with the LogFile.LogExtFileFlags property - $site = Get-Item "IIS:\Sites\$Name" - $site.LogFile.LogFormat = 'W3C' - $site.LogFile.LogExtFileFlags = $LogFlags -join ',' - $site | Set-Item - } - - # Update LogPath if required - if ($PSBoundParameters.ContainsKey('LogPath') -and ` - ($LogPath -ne $website.logfile.directory)) - { - - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdateLogPath ` - -f $Name) - Set-ItemProperty -Path "IIS:\Sites\$Name" ` - -Name LogFile.directory -value $LogPath - } - - # Update LogPeriod if needed - if ($PSBoundParameters.ContainsKey('LogPeriod') -and ` - ($LogPeriod -ne $website.logfile.period)) - { - if ($PSBoundParameters.ContainsKey('LogTruncateSize')) - { - Write-Verbose -Message ($LocalizedData.WarningLogPeriod ` - -f $Name) - } - - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdateLogPeriod) - - # In Windows Server 2008 R2, Set-ItemProperty only accepts index values to the LogFile.Period property - $site = Get-Item "IIS:\Sites\$Name" - $site.LogFile.Period = $LogPeriod - $site | Set-Item - } - - # Update LogTruncateSize if needed - if ($PSBoundParameters.ContainsKey('LogTruncateSize') -and ` - ($LogTruncateSize -ne $website.logfile.LogTruncateSize)) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdateLogTruncateSize ` - -f $Name) - Set-ItemProperty -Path "IIS:\Sites\$Name" ` - -Name LogFile.truncateSize -Value $LogTruncateSize - Set-ItemProperty -Path "IIS:\Sites\$Name" ` - -Name LogFile.period -Value 'MaxSize' - } - - # Update LoglocalTimeRollover if neeed - if ($PSBoundParameters.ContainsKey('LoglocalTimeRollover') -and ` - ($LoglocalTimeRollover -ne ` - ([System.Convert]::ToBoolean($website.logfile.LocalTimeRollover)))) - { - Write-Verbose -Message ($LocalizedData.VerboseSetTargetUpdateLoglocalTimeRollover ` - -f $Name) - Set-ItemProperty -Path "IIS:\Sites\$Name" ` - -Name LogFile.localTimeRollover -Value $LoglocalTimeRollover - } - } - } - # Remove website - else - { - try - { - Remove-Website -Name $Name -ErrorAction Stop - Write-Verbose -Message ($LocalizedData.VerboseSetTargetWebsiteRemoved ` - -f $Name) - } - catch - { - $errorMessage = $LocalizedData.ErrorWebsiteRemovalFailure ` - -f $Name, $_.Exception.Message - New-TerminatingError -ErrorId 'WebsiteRemovalFailure' ` - -ErrorMessage $errorMessage ` - -ErrorCategory 'InvalidOperation' - } - } -} - -<# - .SYNOPSIS - The Test-TargetResource cmdlet is used to validate if the role or feature is in a state as - expected in the instance document. -#> -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [ValidateSet('Present', 'Absent')] - [String] - $Ensure = 'Present', - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [String] - $PhysicalPath, - - [ValidateSet('Started', 'Stopped')] - [String] - $State = 'Started', - - # The application pool name must contain between 1 and 64 characters - [ValidateLength(1, 64)] - [String] - $ApplicationPool, - - [Microsoft.Management.Infrastructure.CimInstance[]] - $BindingInfo, - - [String[]] - $DefaultPage, - - [String] - $EnabledProtocols, - - [Microsoft.Management.Infrastructure.CimInstance] - $AuthenticationInfo, - - [Boolean] - $PreloadEnabled, - - [Boolean] - $ServiceAutoStartEnabled, - - [String] - $ServiceAutoStartProvider, - - [String] - $ApplicationType, - - [String] - $LogPath, - - [ValidateSet('Date','Time','ClientIP','UserName','SiteName','ComputerName','ServerIP','Method','UriStem','UriQuery','HttpStatus','Win32Status','BytesSent','BytesRecv','TimeTaken','ServerPort','UserAgent','Cookie','Referer','ProtocolVersion','Host','HttpSubStatus')] - [String[]] - $LogFlags, - - [ValidateSet('Hourly','Daily','Weekly','Monthly','MaxSize')] - [String] - $LogPeriod, - - [ValidateScript({ - ([ValidateRange(1048576, 4294967295)] $valueAsUInt64 = [UInt64]::Parse($_)) - })] - [String] - $LogTruncateSize, - - [Boolean] - $LoglocalTimeRollover, - - [ValidateSet('IIS','W3C','NCSA')] - [String] - $LogFormat - ) - - Assert-Module - - $inDesiredState = $true - - $website = Get-Website | Where-Object -FilterScript {$_.Name -eq $Name} - - # Check Ensure - if (($Ensure -eq 'Present' -and $null -eq $website) -or ` - ($Ensure -eq 'Absent' -and $null -ne $website)) - { - $inDesiredState = $false - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseEnsure ` - -f $Name) - } - - # Only check properties if website exists - if ($Ensure -eq 'Present' -and ` - $null -ne $website) - { - # Check Physical Path property - if ([String]::IsNullOrEmpty($PhysicalPath) -eq $false -and ` - $website.PhysicalPath -ne $PhysicalPath) - { - $inDesiredState = $false - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalsePhysicalPath ` - -f $Name) - } - - # Check State - if ($PSBoundParameters.ContainsKey('State') -and $website.State -ne $State) - { - $inDesiredState = $false - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseState ` - -f $Name) - } - - # Check Application Pool property - if ($PSBoundParameters.ContainsKey('ApplicationPool') -and ` - $website.ApplicationPool -ne $ApplicationPool) - { - $inDesiredState = $false - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseApplicationPool ` - -f $Name) - } - - # Check Binding properties - if ($PSBoundParameters.ContainsKey('BindingInfo') -and ` - $null -ne $BindingInfo) - { - if (-not (Test-WebsiteBinding -Name $Name -BindingInfo $BindingInfo)) - { - $inDesiredState = $false - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseBindingInfo ` - -f $Name) - } - } - - # Check Enabled Protocols - if ($PSBoundParameters.ContainsKey('EnabledProtocols') -and ` - $website.EnabledProtocols -ne $EnabledProtocols) - { - $inDesiredState = $false - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseEnabledProtocols ` - -f $Name) - } - - # Check Default Pages - if ($PSBoundParameters.ContainsKey('DefaultPage') -and ` - $null -ne $DefaultPage) - { - $allDefaultPages = @( - Get-WebConfiguration -Filter '//defaultDocument/files/*' ` - -PSPath "IIS:\Sites\$Name" | - ForEach-Object -Process { Write-Output -InputObject $_.value } - ) - - foreach ($page in $DefaultPage) - { - if ($allDefaultPages -inotcontains $page) - { - $inDesiredState = $false - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseDefaultPage ` - -f $Name) - } - } - } - - #Check AuthenticationInfo - if ($PSBoundParameters.ContainsKey('AuthenticationInfo') -and ` - (-not (Test-AuthenticationInfo -Site $Name ` - -AuthenticationInfo $AuthenticationInfo))) - { - $inDesiredState = $false - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseAuthenticationInfo) - } - - #Check Preload - if($PSBoundParameters.ContainsKey('preloadEnabled') -and ` - $website.applicationDefaults.preloadEnabled -ne $PreloadEnabled) - { - $inDesiredState = $false - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalsePreload ` - -f $Name) - } - - #Check AutoStartEnabled - if($PSBoundParameters.ContainsKey('serviceAutoStartEnabled') -and ` - $website.applicationDefaults.serviceAutoStartEnabled -ne $ServiceAutoStartEnabled) - { - $inDesiredState = $false - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseAutoStart ` - -f $Name) - } - - #Check AutoStartProviders - if($PSBoundParameters.ContainsKey('serviceAutoStartProvider') -and ` - $website.applicationDefaults.serviceAutoStartProvider -ne $ServiceAutoStartProvider) - { - if (-not (Confirm-UniqueServiceAutoStartProviders ` - -serviceAutoStartProvider $ServiceAutoStartProvider ` - -ApplicationType $ApplicationType)) - { - $inDesiredState = $false - Write-Verbose -Message ($LocalizedData.VerboseSetTargetIISAutoStartProviderUpdated) - } - } - - # Check LogFormat - if ($PSBoundParameters.ContainsKey('LogFormat')) - { - # Warn if LogFlags are passed in and Current LogFormat is not W3C - if ($PSBoundParameters.ContainsKey('LogFlags') -and ` - $LogFormat -ne 'W3C') - { - Write-Verbose -Message ($LocalizedData.WarningIncorrectLogFormat ` - -f $Name) - } - - # Warn if LogFlags are passed in and Desired LogFormat is not W3C - if($PSBoundParameters.ContainsKey('LogFlags') -and ` - $website.logfile.LogFormat -ne 'W3C') - { - Write-Verbose -Message ($LocalizedData.WarningIncorrectLogFormat ` - -f $Name) - } - - # Check Log Format - if ($LogFormat -ne $website.logfile.LogFormat) - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseLogFormat ` - -f $Name) - return $false - } - } - - # Check LogFlags - if ($PSBoundParameters.ContainsKey('LogFlags') -and ` - (-not (Compare-LogFlags -Name $Name -LogFlags $LogFlags))) - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseLogFlags) - return $false - } - - # Check LogPath - if ($PSBoundParameters.ContainsKey('LogPath') -and ` - ($LogPath -ne $website.logfile.directory)) - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseLogPath ` - -f $Name) - return $false - } - - # Check LogPeriod - if ($PSBoundParameters.ContainsKey('LogPeriod') -and ` - ($LogPeriod -ne $website.logfile.period)) - { - if ($PSBoundParameters.ContainsKey('LogTruncateSize')) - { - Write-Verbose -Message ($LocalizedData.WarningLogPeriod ` - -f $Name) - } - - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseLogPeriod ` - -f $Name) - return $false - } - - # Check LogTruncateSize - if ($PSBoundParameters.ContainsKey('LogTruncateSize') -and ` - ($LogTruncateSize -ne $website.logfile.LogTruncateSize)) - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseLogTruncateSize ` - -f $Name) - return $false - } - - # Check LoglocalTimeRollover - if ($PSBoundParameters.ContainsKey('LoglocalTimeRollover') -and ` - ($LoglocalTimeRollover -ne ` - ([System.Convert]::ToBoolean($website.logfile.LocalTimeRollover)))) - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseLoglocalTimeRollover ` - -f $Name) - return $false - } - } - - if ($inDesiredState -eq $true) - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetTrueResult) - } - else - { - Write-Verbose -Message ($LocalizedData.VerboseTestTargetFalseResult) - } - - return $inDesiredState -} - -#region Helper Functions - -<# - .SYNOPSIS - Helper function used to validate that the logflags status. - Returns False if the loglfags do not match and true if they do - - .PARAMETER LogFlags - Specifies flags to check - - .PARAMETER Name - Specifies website to check the flags on -#> -function Compare-LogFlags -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [String[]] - [ValidateSet('Date','Time','ClientIP','UserName','SiteName','ComputerName','ServerIP','Method','UriStem','UriQuery','HttpStatus','Win32Status','BytesSent','BytesRecv','TimeTaken','ServerPort','UserAgent','Cookie','Referer','ProtocolVersion','Host','HttpSubStatus')] - $LogFlags, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name - - ) - - $currentLogFlags = (Get-Website -Name $Name).logfile.logExtFileFlags -split ',' | Sort-Object - $proposedLogFlags = $LogFlags -split ',' | Sort-Object - - if (Compare-Object -ReferenceObject $currentLogFlags -DifferenceObject $proposedLogFlags) - { - return $false - } - - return $true - -} - -<# - .SYNOPSIS - Helper function used to validate that the website's binding information is unique to other - websites. Returns False if at least one of the bindings is already assigned to another - website. - - .PARAMETER Name - Specifies the name of the website. - - .PARAMETER ExcludeStopped - Omits stopped websites. - - .NOTES - This function tests standard ('http' and 'https') bindings only. - It is technically possible to assign identical non-standard bindings (such as 'net.tcp') - to different websites. -#> -function Confirm-UniqueBinding -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [Parameter(Mandatory = $false)] - [Switch] - $ExcludeStopped - ) - - $website = Get-Website | Where-Object -FilterScript { $_.Name -eq $Name } - - if (-not $website) - { - $errorMessage = $LocalizedData.ErrorWebsiteNotFound ` - -f $Name - New-TerminatingError -ErrorId 'WebsiteNotFound' ` - -ErrorMessage $errorMessage ` - -ErrorCategory 'InvalidResult' - } - - $referenceObject = @( - $website.bindings.Collection | - Where-Object -FilterScript { $_.protocol -in @('http', 'https') } | - ConvertTo-WebBinding -Verbose:$false - ) - - if ($ExcludeStopped) - { - $otherWebsiteFilter = { $_.Name -ne $website.Name -and $_.State -ne 'Stopped' } - } - else - { - $otherWebsiteFilter = { $_.Name -ne $website.Name } - } - - $differenceObject = @( - Get-Website | - Where-Object -FilterScript $otherWebsiteFilter | - ForEach-Object -Process { $_.bindings.Collection } | - Where-Object -FilterScript { $_.protocol -in @('http', 'https') } | - ConvertTo-WebBinding -Verbose:$false - ) - - # Assume that bindings are unique - $result = $true - - $compareSplat = @{ - ReferenceObject = $referenceObject - DifferenceObject = $differenceObject - Property = @('protocol', 'bindingInformation') - ExcludeDifferent = $true - IncludeEqual = $true - } - - if (Compare-Object @compareSplat) - { - $result = $false - } - - return $result -} - -<# - .SYNOPSIS - Helper function used to validate that the AutoStartProviders is unique to other websites. - returns False if the AutoStartProviders exist. - - .PARAMETER ServiceAutoStartProvider - Specifies the name of the AutoStartProviders. - - .PARAMETER ApplicationType - Specifies the name of the Application Type for the AutoStartProvider. - - .NOTES - This tests for the existance of a AutoStartProviders which is globally assigned. - As AutoStartProviders need to be uniquely named it will check for this and error out if - attempting to add a duplicatly named AutoStartProvider. - Name is passed in to bubble to any error messages during the test. -#> -function Confirm-UniqueServiceAutoStartProviders -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [String] - $ServiceAutoStartProvider, - - [Parameter(Mandatory = $true)] - [String] - $ApplicationType - ) - - $websiteASP = (Get-WebConfiguration ` - -filter /system.applicationHost/serviceAutoStartProviders).Collection - - $existingObject = $websiteASP | ` - Where-Object -Property Name -eq -Value $ServiceAutoStartProvider | ` - Select-Object Name,Type - - $proposedObject = @(New-Object -TypeName PSObject -Property @{ - name = $ServiceAutoStartProvider - type = $ApplicationType - }) - - if(-not $existingObject) - { - return $false - } - - if(-not (Compare-Object -ReferenceObject $existingObject ` - -DifferenceObject $proposedObject ` - -Property name)) - { - if(Compare-Object -ReferenceObject $existingObject ` - -DifferenceObject $proposedObject ` - -Property type) - { - $errorMessage = $LocalizedData.ErrorWebsiteTestAutoStartProviderFailure - New-TerminatingError -ErrorId 'ErrorWebsiteTestAutoStartProviderFailure' ` - -ErrorMessage $errorMessage ` - -ErrorCategory 'InvalidResult'` - } - } - - return $true - -} - -<# - .SYNOPSIS - Converts IIS elements to instances of the MSFT_xWebBindingInformation CIM class. -#> -function ConvertTo-CimBinding -{ - [CmdletBinding()] - [OutputType([Microsoft.Management.Infrastructure.CimInstance])] - param - ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true)] - [AllowEmptyCollection()] - [AllowNull()] - [Object[]] - $InputObject - ) - - begin - { - $cimClassName = 'MSFT_xWebBindingInformation' - $cimNamespace = 'root/microsoft/Windows/DesiredStateConfiguration' - } - - process - { - foreach ($binding in $InputObject) - { - [Hashtable]$cimProperties = @{ - Protocol = [String]$binding.protocol - BindingInformation = [String]$binding.bindingInformation - } - - if ($binding.Protocol -in @('http', 'https')) - { - # Extract IPv6 address - if ($binding.bindingInformation -match '^\[(.*?)\]\:(.*?)\:(.*?)$') - { - $IPAddress = $Matches[1] - $Port = $Matches[2] - $HostName = $Matches[3] - } - else - { - $IPAddress, $Port, $HostName = $binding.bindingInformation -split '\:' - } - - if ([String]::IsNullOrEmpty($IPAddress)) - { - $IPAddress = '*' - } - - $cimProperties.Add('IPAddress', [String]$IPAddress) - $cimProperties.Add('Port', [UInt16]$Port) - $cimProperties.Add('HostName', [String]$HostName) - } - else - { - $cimProperties.Add('IPAddress', [String]::Empty) - $cimProperties.Add('Port', [UInt16]::MinValue) - $cimProperties.Add('HostName', [String]::Empty) - } - - if ([Environment]::OSVersion.Version -ge '6.2') - { - $cimProperties.Add('SslFlags', [String]$binding.sslFlags) - } - - $cimProperties.Add('CertificateThumbprint', [String]$binding.certificateHash) - $cimProperties.Add('CertificateStoreName', [String]$binding.certificateStoreName) - - New-CimInstance -ClassName $cimClassName ` - -Namespace $cimNamespace ` - -Property $cimProperties ` - -ClientOnly - } - } -} - -<# - .SYNOPSIS - Converts instances of the MSFT_xWebBindingInformation CIM class to the IIS - element representation. - - .LINK - https://www.iis.net/configreference/system.applicationhost/sites/site/bindings/binding -#> -function ConvertTo-WebBinding -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true)] - [AllowEmptyCollection()] - [AllowNull()] - [Object[]] - $InputObject - ) - process - { - foreach ($binding in $InputObject) - { - $outputObject = @{ - protocol = $binding.Protocol - } - - if ($binding -is [Microsoft.Management.Infrastructure.CimInstance]) - { - if ($binding.Protocol -in @('http', 'https')) - { - if (-not [String]::IsNullOrEmpty($binding.BindingInformation)) - { - if (-not [String]::IsNullOrEmpty($binding.IPAddress) -or - -not [String]::IsNullOrEmpty($binding.Port) -or - -not [String]::IsNullOrEmpty($binding.HostName) - ) - { - $isJoinRequired = $true - Write-Verbose -Message ` - ($LocalizedData.VerboseConvertToWebBindingIgnoreBindingInformation ` - -f $binding.Protocol) - } - else - { - $isJoinRequired = $false - } - } - else - { - $isJoinRequired = $true - } - - # Construct the bindingInformation attribute - if ($isJoinRequired -eq $true) - { - $ipAddressString = Format-IPAddressString -InputString $binding.IPAddress ` - -ErrorAction Stop - - if ([String]::IsNullOrEmpty($binding.Port)) - { - switch ($binding.Protocol) - { - 'http' { $portNumberString = '80' } - 'https' { $portNumberString = '443' } - } - - Write-Verbose -Message ` - ($LocalizedData.VerboseConvertToWebBindingDefaultPort ` - -f $binding.Protocol, $portNumberString) - } - else - { - if (Test-PortNumber -InputString $binding.Port) - { - $portNumberString = $binding.Port - } - else - { - $errorMessage = $LocalizedData.ErrorWebBindingInvalidPort ` - -f $binding.Port - New-TerminatingError -ErrorId 'WebBindingInvalidPort' ` - -ErrorMessage $errorMessage ` - -ErrorCategory 'InvalidArgument' - } - } - - $bindingInformation = $ipAddressString, ` - $portNumberString, ` - $binding.HostName -join ':' - $outputObject.Add('bindingInformation', [String]$bindingInformation) - } - else - { - $outputObject.Add('bindingInformation', [String]$binding.BindingInformation) - } - } - else - { - if ([String]::IsNullOrEmpty($binding.BindingInformation)) - { - $errorMessage = $LocalizedData.ErrorWebBindingMissingBindingInformation ` - -f $binding.Protocol - New-TerminatingError -ErrorId 'WebBindingMissingBindingInformation' ` - -ErrorMessage $errorMessage ` - -ErrorCategory 'InvalidArgument' - } - else - { - $outputObject.Add('bindingInformation', [String]$binding.BindingInformation) - } - } - - # SSL-related properties - if ($binding.Protocol -eq 'https') - { - if ([String]::IsNullOrEmpty($binding.CertificateThumbprint)) - { - $errorMessage = $LocalizedData.ErrorWebBindingMissingCertificateThumbprint ` - -f $binding.Protocol - New-TerminatingError -ErrorId 'WebBindingMissingCertificateThumbprint' ` - -ErrorMessage $errorMessage ` - -ErrorCategory 'InvalidArgument' - } - - if ([String]::IsNullOrEmpty($binding.CertificateStoreName)) - { - $certificateStoreName = 'MY' - Write-Verbose -Message ` - ($LocalizedData.VerboseConvertToWebBindingDefaultCertificateStoreName ` - -f $certificateStoreName) - } - else - { - $certificateStoreName = $binding.CertificateStoreName - } - - # Remove the Left-to-Right Mark character - $certificateHash = $binding.CertificateThumbprint -replace '^\u200E' - - $outputObject.Add('certificateHash', [String]$certificateHash) - $outputObject.Add('certificateStoreName', [String]$certificateStoreName) - - if ([Environment]::OSVersion.Version -ge '6.2') - { - $sslFlags = [Int64]$binding.SslFlags - - if ($sslFlags -in @(1, 3) -and [String]::IsNullOrEmpty($binding.HostName)) - { - $errorMessage = $LocalizedData.ErrorWebBindingMissingSniHostName - New-TerminatingError -ErrorId 'WebBindingMissingSniHostName' ` - -ErrorMessage $errorMessage ` - -ErrorCategory 'InvalidArgument' - } - - $outputObject.Add('sslFlags', $sslFlags) - } - } - else - { - # Ignore SSL-related properties for non-SSL bindings - $outputObject.Add('certificateHash', [String]::Empty) - $outputObject.Add('certificateStoreName', [String]::Empty) - - if ([Environment]::OSVersion.Version -ge '6.2') - { - $outputObject.Add('sslFlags', [Int64]0) - } - } - } - else - { - <# - WebAdministration can throw the following exception if there are non-standard - bindings (such as 'net.tcp'): 'The data is invalid. - (Exception from HRESULT: 0x8007000D)' - - Steps to reproduce: - 1) Add 'net.tcp' binding - 2) Execute {Get-Website | ` - ForEach-Object {$_.bindings.Collection} | ` - Select-Object *} - - Workaround is to create a new custom object and use dot notation to - access binding properties. - #> - - $outputObject.Add('bindingInformation', [String]$binding.bindingInformation) - $outputObject.Add('certificateHash', [String]$binding.certificateHash) - $outputObject.Add('certificateStoreName', [String]$binding.certificateStoreName) - - if ([Environment]::OSVersion.Version -ge '6.2') - { - $outputObject.Add('sslFlags', [Int64]$binding.sslFlags) - } - } - - Write-Output -InputObject ([PSCustomObject]$outputObject) - } - } -} - -<# - .SYNOPSYS - Formats the input IP address string for use in the bindingInformation attribute. -#> -function Format-IPAddressString -{ - [CmdletBinding()] - [OutputType([String])] - param - ( - [Parameter(Mandatory = $true)] - [AllowEmptyString()] - [AllowNull()] - [String] - $InputString - ) - - if ([String]::IsNullOrEmpty($InputString) -or $InputString -eq '*') - { - $outputString = '*' - } - else - { - try - { - $ipAddress = [IPAddress]::Parse($InputString) - - switch ($ipAddress.AddressFamily) - { - 'InterNetwork' - { - $outputString = $ipAddress.IPAddressToString - } - 'InterNetworkV6' - { - $outputString = '[{0}]' -f $ipAddress.IPAddressToString - } - } - } - catch - { - $errorMessage = $LocalizedData.ErrorWebBindingInvalidIPAddress ` - -f $InputString, $_.Exception.Message - New-TerminatingError -ErrorId 'WebBindingInvalidIPAddress' ` - -ErrorMessage $errorMessage ` - -ErrorCategory 'InvalidArgument' - } - } - - return $outputString -} - -<# - .SYNOPSIS - Helper function used to validate that the authenticationProperties for an Application. - - .PARAMETER Site - Specifies the name of the Website. -#> -function Get-AuthenticationInfo -{ - [CmdletBinding()] - [OutputType([Microsoft.Management.Infrastructure.CimInstance])] - param - ( - [Parameter(Mandatory = $true)] - [String]$Site - ) - - $authenticationProperties = @{} - foreach ($type in @('Anonymous', 'Basic', 'Digest', 'Windows')) - { - $authenticationProperties[$type] = [String](Test-AuthenticationEnabled -Site $Site ` - -Type $type) - } - - return New-CimInstance ` - -ClassName MSFT_xWebAuthenticationInformation ` - -ClientOnly -Property $authenticationProperties -} - -<# - .SYNOPSIS - Helper function used to build a default CimInstance for AuthenticationInformation -#> -function Get-DefaultAuthenticationInfo -{ - New-CimInstance -ClassName MSFT_xWebAuthenticationInformation ` - -ClientOnly ` - -Property @{ Anonymous = $false; Basic = $false; Digest = $false; Windows = $false } -} - -<# - .SYNOPSIS - Helper function used to set authenticationProperties for an Application - - .PARAMETER Site - Specifies the name of the Website. - - .PARAMETER Type - Specifies the type of Authentication. - Limited to the set: ('Anonymous','Basic','Digest','Windows') - - .PARAMETER Enabled - Whether the Authentication is enabled or not. -#> -function Set-Authentication -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String]$Site, - - [Parameter(Mandatory = $true)] - [ValidateSet('Anonymous','Basic','Digest','Windows')] - [String]$Type, - - [Boolean]$Enabled - ) - - Set-WebConfigurationProperty ` - -Filter /system.WebServer/security/authentication/${Type}Authentication ` - -Name enabled ` - -Value $Enabled ` - -Location $Site -} - -<# - .SYNOPSIS - Helper function used to validate that the authenticationProperties for an Application. - - .PARAMETER Site - Specifies the name of the Website. - - .PARAMETER AuthenticationInfo - A CimInstance of what state the AuthenticationInfo should be. -#> -function Set-AuthenticationInfo -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String]$Site, - - [Parameter()] - [ValidateNotNullOrEmpty()] - [Microsoft.Management.Infrastructure.CimInstance]$AuthenticationInfo - ) - - foreach ($type in @('Anonymous', 'Basic', 'Digest', 'Windows')) - { - $enabled = ($AuthenticationInfo.CimInstanceProperties[$type].Value -eq $true) - Set-Authentication -Site $Site -Type $type -Enabled $enabled - } -} - -<# - .SYNOPSIS - Helper function used to test the authenticationProperties state for an Application. - Will return that value which will either [String]True or [String]False - - .PARAMETER Site - Specifies the name of the Website. - - .PARAMETER Type - Specifies the type of Authentication. - Limited to the set: ('Anonymous','Basic','Digest','Windows'). -#> -function Test-AuthenticationEnabled -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [String]$Site, - - [Parameter(Mandatory = $true)] - [ValidateSet('Anonymous','Basic','Digest','Windows')] - [String]$Type - ) - - - $prop = Get-WebConfigurationProperty ` - -Filter /system.WebServer/security/authentication/${Type}Authentication ` - -Name enabled ` - -Location $Site - - return $prop.Value -} - -<# - .SYNOPSIS - Helper function used to test the authenticationProperties state for an Application. - Will return that result for use in Test-TargetResource. Uses Test-AuthenticationEnabled - to determine this. First incorrect result will break this function out. - - .PARAMETER Site - Specifies the name of the Website. - - .PARAMETER AuthenticationInfo - A CimInstance of what state the AuthenticationInfo should be. -#> -function Test-AuthenticationInfo -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [String]$Site, - - [Parameter(Mandatory=$true)] - [ValidateNotNullOrEmpty()] - [Microsoft.Management.Infrastructure.CimInstance]$AuthenticationInfo - ) - - $result = $true - - foreach ($type in @('Anonymous', 'Basic', 'Digest', 'Windows')) - { - $expected = $AuthenticationInfo.CimInstanceProperties[$type].Value - $actual = Test-AuthenticationEnabled -Site $Site -Type $type - if ($expected -ne $actual) - { - $result = $false - break - } - } - - return $result -} - -<# - .SYNOPSIS - Validates the desired binding information (i.e. no duplicate IP address, port, and - host name combinations). -#> -function Test-BindingInfo -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $BindingInfo - ) - - $isValid = $true - - try - { - # Normalize the input (helper functions will perform additional validations) - $bindings = @(ConvertTo-WebBinding -InputObject $bindingInfo | ConvertTo-CimBinding) - $standardBindings = @($bindings | ` - Where-Object -FilterScript {$_.Protocol -in @('http', 'https')}) - $nonStandardBindings = @($bindings | ` - Where-Object -FilterScript {$_.Protocol -notin @('http', 'https')}) - - if ($standardBindings.Count -ne 0) - { - # IP address, port, and host name combination must be unique - if (($standardBindings | Group-Object -Property IPAddress, Port, HostName) | ` - Where-Object -FilterScript {$_.Count -ne 1}) - { - $isValid = $false - Write-Verbose -Message ` - ($LocalizedData.VerboseTestBindingInfoSameIPAddressPortHostName) - } - - # A single port cannot be simultaneously specified for bindings with different protocols - foreach ($groupByPort in ($standardBindings | Group-Object -Property Port)) - { - if (($groupByPort.Group | Group-Object -Property Protocol).Length -ne 1) - { - $isValid = $false - Write-Verbose -Message ` - ($LocalizedData.VerboseTestBindingInfoSamePortDifferentProtocol) - break - } - } - } - - if ($nonStandardBindings.Count -ne 0) - { - if (($nonStandardBindings | ` - Group-Object -Property Protocol, BindingInformation) | ` - Where-Object -FilterScript {$_.Count -ne 1}) - { - $isValid = $false - Write-Verbose -Message ` - ($LocalizedData.VerboseTestBindingInfoSameProtocolBindingInformation) - } - } - } - catch - { - $isValid = $false - Write-Verbose -Message ($LocalizedData.VerboseTestBindingInfoInvalidCatch ` - -f $_.Exception.Message) - } - - return $isValid -} - -<# - .SYNOPSIS - Validates that an input string represents a valid port number. - The port number must be a positive integer between 1 and 65535. -#> -function Test-PortNumber -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [AllowEmptyString()] - [AllowNull()] - [String] - $InputString - ) - - try - { - $isValid = [UInt16]$InputString -ne 0 - } - catch - { - $isValid = $false - } - - return $isValid -} - -<# - .SYNOPSIS - Helper function used to validate and compare website bindings of current to desired. - Returns True if bindings do not need to be updated. -#> -function Test-WebsiteBinding -{ - [CmdletBinding()] - [OutputType([Boolean])] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $BindingInfo - ) - - $inDesiredState = $true - - # Ensure that desired binding information is valid (i.e. no duplicate IP address, port, and - # host name combinations). - if (-not (Test-BindingInfo -BindingInfo $BindingInfo)) - { - $errorMessage = $LocalizedData.ErrorWebsiteBindingInputInvalidation ` - -f $Name - New-TerminatingError -ErrorId 'WebsiteBindingInputInvalidation' ` - -ErrorMessage $errorMessage ` - -ErrorCategory 'InvalidResult' - } - - try - { - $website = Get-Website | Where-Object -FilterScript {$_.Name -eq $Name} - - # Normalize binding objects to ensure they have the same representation - $currentBindings = @(ConvertTo-WebBinding -InputObject $website.bindings.Collection ` - -Verbose:$false) - $desiredBindings = @(ConvertTo-WebBinding -InputObject $BindingInfo ` - -Verbose:$false) - - $propertiesToCompare = 'protocol', ` - 'bindingInformation', ` - 'certificateHash', ` - 'certificateStoreName' - - # The sslFlags attribute was added in IIS 8.0. - # This check is needed for backwards compatibility with Windows Server 2008 R2. - if ([Environment]::OSVersion.Version -ge '6.2') - { - $propertiesToCompare += 'sslFlags' - } - - if (Compare-Object -ReferenceObject $currentBindings ` - -DifferenceObject $desiredBindings ` - -Property $propertiesToCompare) - { - $inDesiredState = $false - } - } - catch - { - $errorMessage = $LocalizedData.ErrorWebsiteCompareFailure ` - -f $Name, $_.Exception.Message - New-TerminatingError -ErrorId 'WebsiteCompareFailure' ` - -ErrorMessage $errorMessage ` - -ErrorCategory 'InvalidResult' - } - - return $inDesiredState -} - -<# - .SYNOPSIS - Helper function used to update default pages of website. -#> -function Update-DefaultPage -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [String] - $Name, - - [Parameter(Mandatory = $true)] - [String[]] - $DefaultPage - ) - - $allDefaultPages = @( - Get-WebConfiguration -Filter '//defaultDocument/files/*' ` - -PSPath "IIS:\Sites\$Name" | - ForEach-Object -Process { Write-Output -InputObject $_.value } - ) - - foreach ($page in $DefaultPage) - { - if ($allDefaultPages -inotcontains $page) - { - Add-WebConfiguration -Filter '//defaultDocument/files' ` - -PSPath "IIS:\Sites\$Name" ` - -Value @{ value = $page } - Write-Verbose -Message ($LocalizedData.VerboseUpdateDefaultPageUpdated ` - -f $Name, $page) - } - } -} - -<# - .SYNOPSIS - Updates website bindings. -#> -function Update-WebsiteBinding -{ - [CmdletBinding()] - param - ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [String] - $Name, - - [Parameter(Mandatory = $false)] - [Microsoft.Management.Infrastructure.CimInstance[]] - $BindingInfo - ) - - # Use Get-WebConfiguration instead of Get-Website to retrieve XPath of the target website. - # XPath -Filter is case-sensitive. Use Where-Object to get the target website by name. - $website = Get-WebConfiguration -Filter '/system.applicationHost/sites/site' | - Where-Object -FilterScript {$_.Name -eq $Name} - - if (-not $website) - { - $errorMessage = $LocalizedData.ErrorWebsiteNotFound ` - -f $Name - New-TerminatingError -ErrorId 'WebsiteNotFound' ` - -ErrorMessage $errorMessage ` - -ErrorCategory 'InvalidResult' - } - - ConvertTo-WebBinding -InputObject $BindingInfo -ErrorAction Stop | - ForEach-Object -Begin { - Clear-WebConfiguration -Filter "$($website.ItemXPath)/bindings" -Force -ErrorAction Stop - } -Process { - - $properties = $_ - - try - { - Add-WebConfiguration -Filter "$($website.ItemXPath)/bindings" -Value @{ - protocol = $properties.protocol - bindingInformation = $properties.bindingInformation - } -Force -ErrorAction Stop - } - catch - { - $errorMessage = $LocalizedData.ErrorWebsiteBindingUpdateFailure ` - -f $Name, $_.Exception.Message - New-TerminatingError -ErrorId 'WebsiteBindingUpdateFailure' ` - -ErrorMessage $errorMessage ` - -ErrorCategory 'InvalidResult' - } - - if ($properties.protocol -eq 'https') - { - if ([Environment]::OSVersion.Version -ge '6.2') - { - try - { - Set-WebConfigurationProperty ` - -Filter "$($website.ItemXPath)/bindings/binding[last()]" ` - -Name sslFlags ` - -Value $properties.sslFlags ` - -Force ` - -ErrorAction Stop - } - catch - { - $errorMessage = $LocalizedData.ErrorWebsiteBindingUpdateFailure ` - -f $Name, $_.Exception.Message - New-TerminatingError ` - -ErrorId 'WebsiteBindingUpdateFailure' ` - -ErrorMessage $errorMessage ` - -ErrorCategory 'InvalidResult' - } - } - - try - { - $binding = Get-WebConfiguration ` - -Filter "$($website.ItemXPath)/bindings/binding[last()]" ` - -ErrorAction Stop - $binding.AddSslCertificate($properties.certificateHash, ` - $properties.certificateStoreName) - } - catch - { - $errorMessage = $LocalizedData.ErrorWebBindingCertificate ` - -f $properties.certificateHash, $_.Exception.Message - New-TerminatingError ` - -ErrorId 'WebBindingCertificate' ` - -ErrorMessage $errorMessage ` - -ErrorCategory 'InvalidOperation' - } - } - } -} - -#endregion - -Export-ModuleMember -Function *-TargetResource - - diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebsite/MSFT_xWebsite.schema.mof b/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebsite/MSFT_xWebsite.schema.mof deleted file mode 100644 index fc452e3e..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/DSCResources/MSFT_xWebsite/MSFT_xWebsite.schema.mof +++ /dev/null @@ -1,45 +0,0 @@ -[ClassVersion("1.0.0")] -class MSFT_xWebBindingInformation -{ - [Required,ValueMap{"http","https","msmq.formatname","net.msmq","net.pipe","net.tcp"},Values{"http","https","msmq.formatname","net.msmq","net.pipe","net.tcp"}] String Protocol; - [Write] String BindingInformation; - [Write] String IPAddress; - [Write] UInt16 Port; - [Write] String HostName; - [Write] String CertificateThumbprint; - [Write,ValueMap{"My", "WebHosting"},Values{"My", "WebHosting"}] String CertificateStoreName; - [Write,ValueMap{"0","1","2","3"},Values{"0","1","2","3"}] String SslFlags; -}; - -[ClassVersion("1.0.0")] -class MSFT_xWebAuthenticationInformation -{ - [Write] Boolean Anonymous; - [Write] Boolean Basic; - [Write] Boolean Digest; - [Write] Boolean Windows; -}; - -[ClassVersion("2.0.0"), FriendlyName("xWebsite")] -class MSFT_xWebsite : OMI_BaseResource -{ - [Write,ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] String Ensure; - [Key] String Name; - [Write] String PhysicalPath; - [Write,ValueMap{"Started","Stopped"},Values{"Started", "Stopped"}] String State; - [Write] String ApplicationPool; - [Write, EmbeddedInstance("MSFT_xWebBindingInformation"), Description("Website's binding information in the form of an array of embedded instances of the MSFT_xWebBindingInformation CIM class.")] String BindingInfo[]; - [Write] String DefaultPage[]; - [Write] String EnabledProtocols; - [write, EmbeddedInstance("MSFT_xWebAuthenticationInformation"), Description("Hashtable containing authentication information (Anonymous, Basic, Digest, Windows)")] String AuthenticationInfo; - [Write, Description ("Allows the Website to automatically start without a request")] Boolean PreloadEnabled; - [Write, Description ("Enables Autostart on a Website.")] Boolean ServiceAutoStartEnabled; - [Write, Description ("Adds a AutostartProvider")] String ServiceAutoStartProvider; - [Write, Description ("Adds a AutostartProvider ApplicationType")] String ApplicationType; - [Write, Description ("The directory to be used for logfiles")] String LogPath; - [Write, Description ("The W3C logging fields"), ValueMap{"Date","Time","ClientIP","UserName","SiteName","ComputerName","ServerIP","Method","UriStem","UriQuery","HttpStatus","Win32Status","BytesSent","BytesRecv","TimeTaken","ServerPort","UserAgent","Cookie","Referer","ProtocolVersion","Host","HttpSubStatus"},Values{"Date","Time","ClientIP","UserName","SiteName","ComputerName","ServerIP","Method","UriStem","UriQuery","HttpStatus","Win32Status","BytesSent","BytesRecv","TimeTaken","ServerPort","UserAgent","Cookie","Referer","ProtocolVersion","Host","HttpSubStatus"}] String LogFlags[]; - [Write, Description ("How often the log file should rollover"), ValueMap{"Hourly","Daily","Weekly","Monthly","MaxSize"},Values{"Hourly","Daily","Weekly","Monthly","MaxSize"}] String LogPeriod; - [Write, Description ("How large the file should be before it is truncated")] String LogTruncateSize; - [Write, Description ("Use the localtime for file naming and rollover")] Boolean LoglocalTimeRollover; - [Write, Description ("Format of the Logfiles. Only W3C supports LogFlags"), ValueMap{"IIS","W3C","NCSA"}, Values{"IIS","W3C","NCSA"}] String LogFormat; -}; diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/LICENSE b/lib/puppet_x/dsc_resources/xWebAdministration/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xWebAdministration/xWebAdministration.psd1 b/lib/puppet_x/dsc_resources/xWebAdministration/xWebAdministration.psd1 deleted file mode 100644 index c03ad7c8..00000000 --- a/lib/puppet_x/dsc_resources/xWebAdministration/xWebAdministration.psd1 +++ /dev/null @@ -1,69 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '1.18.0.0' - -# ID used to uniquely identify this module -GUID = 'b3239f27-d7d3-4ae6-a5d2-d9a1c97d6ae4' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2013 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module with DSC Resources for Web Administration' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xWebAdministration/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xWebAdministration' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* Added sample for **xWebVirtualDirectory** for creating a new virtual directory. Bugfix for 195. -* Added integration tests for **xWebVirtualDirectory**. Fixes 188. -* xWebsite: - * Fixed bugs when setting log properties, fixes 299. - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' -} - - - - - - - - - diff --git a/lib/puppet_x/dsc_resources/xWebDeploy/DSCResources/xWebDeploy/xWebDeploy.Schema.psm1 b/lib/puppet_x/dsc_resources/xWebDeploy/DSCResources/xWebDeploy/xWebDeploy.Schema.psm1 deleted file mode 100644 index 8907c3ab..00000000 --- a/lib/puppet_x/dsc_resources/xWebDeploy/DSCResources/xWebDeploy/xWebDeploy.Schema.psm1 +++ /dev/null @@ -1,73 +0,0 @@ -# Composite configuration to install the Web Deploy 3.5 IIS extension (MSDeploy) from default URL : http://go.microsoft.com/fwlink/?LinkID=309497. Supports MSWebDeploy sync, dump verbs with iisApp , contentPath parameters. -# Examples of sync verb used with ContentPath and iisApp paramters: -# -verb:sync -source:package=$SourcePath -dest:contentPath=$Destination -# -verb:sync -source:package=$SourcePath -dest:iisApp=$Destination -# -# Default path where the resource is expected to be placed: $env:ProgramFiles# \WindowsPowerShell\Modules\xWebDeploy\InstallerMsi . -# Change the default path if needed. - -#Install Web Deploy 3.5 -Configuration xInstallWebDeploy -{ - param - ( - [Parameter(Mandatory = $true)] - [Validateset("Present","Absent")] - [String] - $Ensure, - - [string] $WebDeployMsi = "http://go.microsoft.com/fwlink/?LinkID=309497" - - ) - - Package InstallWebDeployTool - { - Path = $WebDeployMsi - ProductId = "{1A81DA24-AF0B-4406-970E-54400D6EC118}" - Name = "Microsoft Web Deploy 3.5" - Arguments = "/quiet" - Ensure = $Ensure - } -} - -# Composite configuration to install an IIS site from a given package. Note that the package has to be created using webdeploy extension. -Configuration xWebDeploy -{ - param( - - [Parameter(Mandatory = $true)] - [string] $SourcePath, - - [Parameter(Mandatory = $true)] - [string] $Destination, - - [Parameter(Mandatory = $true)] - [Validateset("Present","Absent")] - [String] - $Ensure, - - [string] $WebDeployMsi = "http://go.microsoft.com/fwlink/?LinkID=309497" - - - ) - Import-DSCResource -Name xWebPackageDeploy - #Install WebDeploy IIS extension on the machine - xInstallWebDeploy InstallWebDeployTool - { - Ensure = $Ensure - WebDeployMsi = $WebDeployMsi - } - - #Deploy a web package in IIS - xWebPackageDeploy DeployWebPackage - { - SourcePath = $SourcePath - Destination = $Destination - Ensure = $Ensure - - } -} - -Export-ModuleMember -Function xInstallWebDeploy -Export-ModuleMember -Function xWebDeploy - diff --git a/lib/puppet_x/dsc_resources/xWebDeploy/DSCResources/xWebDeploy/xWebDeploy.psd1 b/lib/puppet_x/dsc_resources/xWebDeploy/DSCResources/xWebDeploy/xWebDeploy.psd1 deleted file mode 100644 index 96327c45..00000000 --- a/lib/puppet_x/dsc_resources/xWebDeploy/DSCResources/xWebDeploy/xWebDeploy.psd1 +++ /dev/null @@ -1,96 +0,0 @@ -# -# Module manifest for module composite resource 'xWebDeploy' -# -# Generated on: 8/23/2014 -# - -@{ - -# Script module or binary module file associated with this manifest. -RootModule = 'xWebDeploy.Schema.psm1' - -# Version number of this module. -ModuleVersion = '1.0' - -# ID used to uniquely identify this module -GUID = '09ad042a-8bd0-4045-b771-f2ac9b62fbdf' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft. All rights reserved.' - -# Description of the functionality provided by this module -# Description = '' - -# Minimum version of the Windows PowerShell engine required by this module -# PowerShellVersion = '' - -# Name of the Windows PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the Windows PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module -# DotNetFrameworkVersion = '' - -# Minimum version of the common language runtime (CLR) required by this module -# CLRVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -# RequiredModules = @() - -# Assemblies that must be loaded prior to importing this module -# RequiredAssemblies = @() - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -# FormatsToProcess = @() - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -# NestedModules = @() - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Variables to export from this module -VariablesToExport = '*' - -# Aliases to export from this module -AliasesToExport = '*' - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess -# PrivateData = '' - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - -} - - - diff --git a/lib/puppet_x/dsc_resources/xWebDeploy/DSCResources/xWebPackageDeploy/xWebPackageDeploy.psm1 b/lib/puppet_x/dsc_resources/xWebDeploy/DSCResources/xWebPackageDeploy/xWebPackageDeploy.psm1 deleted file mode 100644 index b293bb65..00000000 --- a/lib/puppet_x/dsc_resources/xWebDeploy/DSCResources/xWebPackageDeploy/xWebPackageDeploy.psm1 +++ /dev/null @@ -1,203 +0,0 @@ -######################################################################################################################################### -# xWebPackageDeploy module for deploying IIS WebSite using web deploy IIS extension. This resource assumes that WebDeploy tool -# is installed in IIS. -######################################################################################################################################### - - -######################################################################################################################################### -# Get-TargetResource ([string]$SourcePath, [string]$Destination) : given the package and IIS website name or content path, determine whether -# the package is deployed and return the result -######################################################################################################################################### - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [parameter(Mandatory = $true)] - [System.String] - $Destination - ) - - $appCmd = "$env:PROGRAMFILES\IIS\Microsoft Web Deploy V3\msdeploy.exe" - $ensure = "Absent" - Write-Verbose -Message "Calling msdeploy.exe to retrieve the site content in a zip file format" - & $appCmd -verb:sync "-source:contentPath=$Destination" "-dest:package=$SourcePath" - - # $Destination in this case points to website content full path. - if(Test-Path($Destination)) - { - $ensure = "Present" - } - else - { - # this is the case where $Destination points to IIS website name and not the website content path - $site = Get-ItemProperty -Path "IIS:\Sites\$Destination" -ErrorAction SilentlyContinue - if ($site -ne $null) - { - $path = $site.physicalPath - if(Test-Path($path)) - { - $ensure = "Present" - } - } - } - - $returnValue = @{ - SourcePath = $SourcePath - Destination = $Destination - Ensure = $ensure} - - $returnValue - -} - -######################################################################################################################################### -# Set-TargetResource ([string]$SourcePath, [string]$Destination, [string]$Ensure) : given the package and IIS website name or content path, deploy/remove -# the website content -######################################################################################################################################### - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [parameter(Mandatory = $true)] - [System.String] - $Destination, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present" - ) - - Write-Verbose -Message "Calling msdeploy.exe to sync the site content from a given zip package" - - $app = "$env:PROGRAMFILES\IIS\Microsoft Web Deploy V3" - - $appCmd = Join-Path $app -ChildPath "msdeploy.exe" - $appCmd = "& '$appCmd'" - - if($Ensure -eq "Present") - { - #sync the given package content into iis - - if($Destination.Contains("\")) - { - #this is the case when iis site content path is specified - $appCmd += "-verb:sync -source:package=$SourcePath -dest:contentPath=$Destination" - } - else - { - #this is the case when iis site name is specified - $appCmd += "-verb:sync -source:package=$SourcePath -dest:iisApp=$Destination" - } - Write-Verbose -Message $appCmd - Invoke-Expression $appCmd - - } - else - { - #delete the website content - if($Destination.Contains("\")) - { - # $SourcePath in this case points to physical path of the website. - Remove-Item -Path $Destination -Recurse -ErrorAction SilentlyContinue - } - else - { - # this is the case where $SourcePath points to IIS website name and not the actual path - $site = Get-ItemProperty -Path "IIS:\Sites\$Destination" -ErrorAction SilentlyContinue - if ($site -ne $null) - { - $path = $site.physicalPath - $files = Get-Item -Path $path -ErrorAction SilentlyContinue - Remove-Item -Path $files -Recurse -ErrorAction SilentlyContinue - } - } - - } -} - -######################################################################################################################################### -# Test-TargetResource ([string]$SourcePath, [string]$Destination, [string]$Ensure) : given the package and IIS website name or content path, -# determine whether the package is deployed or not. -######################################################################################################################################### - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $SourcePath, - - [parameter(Mandatory = $true)] - [System.String] - $Destination, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = "Present" - ) - $result = $false - $appCmd = "$env:PROGRAMFILES\IIS\Microsoft Web Deploy V3\msdeploy.exe" - - #get all the files from a given package - $packageFiles = & $appCmd -verb:dump "-source:package=$SourcePath" - - if($Ensure -eq "Present") - { - #find all the files for a given site - $siteFiles = & $appCmd -verb:dump "-source:contentPath=$Destination" - # the packages exported using webdeploy tool, contain 2 extra entries with site name. Skipping those.. - #compare based on the number of files - if(($packageFiles.Count -eq $siteFiles.Count) -or (($packageFiles.Count -2) -eq $siteFiles.Count) ) - { - $result = $true - } - } - else - { - #find the website's physical path if $Destination points to a site name - $site = Get-ItemProperty -Path "IIS:\Sites\$Destination" -ErrorAction SilentlyContinue - if ($site -ne $null) - { - $path = $site.physicalPath - $files = Get-Item -Path $path -ErrorAction SilentlyContinue - if ($files -ne $null) - { - $f = $files.GetFiles() - } - if($f.Count >1) - { - $result = $true - } - } - #this is the case when $Destination points to the website's physical path - else - { - if(Test-Path($Destination)) - { - $result = $true - } - } - } - $result -} - - - - - diff --git a/lib/puppet_x/dsc_resources/xWebDeploy/DSCResources/xWebPackageDeploy/xWebPackageDeploy.schema.mof b/lib/puppet_x/dsc_resources/xWebDeploy/DSCResources/xWebPackageDeploy/xWebPackageDeploy.schema.mof deleted file mode 100644 index a1c6e81a..00000000 --- a/lib/puppet_x/dsc_resources/xWebDeploy/DSCResources/xWebPackageDeploy/xWebPackageDeploy.schema.mof +++ /dev/null @@ -1,12 +0,0 @@ -#pragma namespace("\\\\.\\root\\microsoft\\windows\\DesiredStateConfiguration") - -[ClassVersion("1.0.0.0"), FriendlyName("xWebPackageDeploy")] -class xWebPackageDeploy : OMI_BaseResource -{ - [Required, Description("Full path to the zip package.")] String SourcePath; - [Key, Description("WebDeploy destination for content path or website name).")] String Destination; - [Write, Description("Desired state of resource."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xWebDeploy/LICENSE b/lib/puppet_x/dsc_resources/xWebDeploy/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xWebDeploy/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xWebDeploy/xWebDeploy.psd1 b/lib/puppet_x/dsc_resources/xWebDeploy/xWebDeploy.psd1 deleted file mode 100644 index fb43765b..00000000 --- a/lib/puppet_x/dsc_resources/xWebDeploy/xWebDeploy.psd1 +++ /dev/null @@ -1,119 +0,0 @@ -# -# Module manifest for module composite resource 'xWebDeploy' -# -# Generated on: 8/23/2014 -# - -@{ - -# Script module or binary module file associated with this manifest. -RootModule = '' - -# Version number of this module. -ModuleVersion = '1.2.0.0' - -# ID used to uniquely identify this module -GUID = 'caf7c498-948e-4b0d-b877-15b0e173a4c5' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'DSC resources for installing an IIS site using the WebDeploy IIS extension' - -# Minimum version of the Windows PowerShell engine required by this module -# PowerShellVersion = '' - -# Name of the Windows PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the Windows PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module -# DotNetFrameworkVersion = '' - -# Minimum version of the common language runtime (CLR) required by this module -# CLRVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -# RequiredModules = @() - -# Assemblies that must be loaded prior to importing this module -# RequiredAssemblies = @() - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -# FormatsToProcess = @() - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -# NestedModules = @() - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Variables to export from this module -VariablesToExport = '*' - -# Aliases to export from this module -AliasesToExport = '*' - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xWebDeploy/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xWebDeploy' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* xWebPackageDeploy: Fixed comparison to check if Destination contains any backslash - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - -} - - - diff --git a/lib/puppet_x/dsc_resources/xWinEventLog/DSCResources/MSFT_xWinEventLog/MSFT_xWinEventLog.psm1 b/lib/puppet_x/dsc_resources/xWinEventLog/DSCResources/MSFT_xWinEventLog/MSFT_xWinEventLog.psm1 deleted file mode 100644 index 63778a26..00000000 --- a/lib/puppet_x/dsc_resources/xWinEventLog/DSCResources/MSFT_xWinEventLog/MSFT_xWinEventLog.psm1 +++ /dev/null @@ -1,240 +0,0 @@ -function New-TerminatingError -{ - param - ( - [Parameter(Mandatory)] - [String]$errorId, - - [Parameter(Mandatory)] - [String]$errorMessage, - - [Parameter(Mandatory)] - [System.Management.Automation.ErrorCategory]$errorCategory - ) - - $exception = New-Object System.InvalidOperationException $errorMessage - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception, $errorId, $errorCategory, $null - throw $errorRecord -} - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $LogName - ) - - try - { - $log = Get-WinEvent -ListLog $logName - $returnValue = @{ - LogName = [System.String]$LogName - LogFilePath = [system.String]$log.LogFilePath - MaximumSizeInBytes = [System.Int64]$log.MaximumSizeInBytes - IsEnabled = [System.Boolean]$log.IsEnabled - LogMode = [System.String]$log.LogMode - SecurityDescriptor = [System.String]$log.SecurityDescriptor - } - - return $returnValue - }catch - { - write-Debug "ERROR: $($_|fl * -force|out-string)" - New-TerminatingError -errorId 'GetWinEventLogFailed' -errorMessage $_.Exception -errorCategory InvalidOperation - } -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $LogName, - - [System.Int64] - $MaximumSizeInBytes, - - [System.Boolean] - $IsEnabled, - - [ValidateSet("AutoBackup","Circular","Retain")] - [System.String] - $LogMode, - - [System.String] - $SecurityDescriptor, - - [System.String] - $LogFilePath - ) - - try - { - $log = Get-WinEvent -ListLog $logName - $update = $false - - if ($PSBoundParameters.ContainsKey('MaximumSizeInBytes') -and $MaximumSizeInBytes -ne $log.MaximumSizeInBytes) { - Set-MaximumSizeInBytes -LogName $LogName -MaximumSizeInBytes $MaximumSizeInBytes - } - - if ($PSBoundParameters.ContainsKey('LogMode') -and $LogMode -ne $log.LogMode){ - Set-LogMode -LogName $LogName -LogMode $LogMode - } - - if ($PSBoundParameters.ContainsKey('SecurityDescriptor') -and $SecurityDescriptor -ne $log.SecurityDescriptor) { - Set-SecurityDescriptor -LogName $LogName -SecurityDescriptor $SecurityDescriptor - } - - if ($PSBoundParameters.ContainsKey("IsEnabled") -and $IsEnabled -ne $log.IsEnabled) { - Set-IsEnabled -LogName $LogName -IsEnabled $IsEnabled - } - - if ($PSBoundParameters.ContainsKey("LogFilePath") -and $LogFilePath -ne $log.LogFilePath) { - Set-LogFilePath -LogName $LogName -LogFilePath $LogFilePath - } - - - }catch - { - Write-Debug "ERROR: $($_|fl * -force|out-string)" - New-TerminatingError -errorId 'SetWinEventLogFailed' -errorMessage $_.Exception -errorCategory InvalidOperation - } - - -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $LogName, - - [System.Int64] - $MaximumSizeInBytes, - - [System.Boolean] - $IsEnabled, - - [ValidateSet("AutoBackup","Circular","Retain")] - [System.String] - $LogMode, - - [System.String] - $SecurityDescriptor, - - [System.String] - $LogFilePath - ) - - try - { - $log = Get-WinEvent -ListLog $logName - if ($PSBoundParameters.ContainsKey("MaximumSizeInBytes") -and $log.MaximumSizeInBytes -ne $MaximumSizeInBytes ) { return $false} - if ($PSBoundParameters.ContainsKey("IsEnabled") -and $log.IsEnabled -ne $IsEnabled ) { return $false} - if ($PSBoundParameters.ContainsKey("LogMode") -and $log.LogMode -ne $LogMode ) { return $false} - if ($PSBoundParameters.ContainsKey("SecurityDescriptor") -and $log.SecurityDescriptor -ne $SecurityDescriptor ) { return $false} - if ($PSBoundParameters.ContainsKey("LogFilePath") -and $log.LogFilePath -ne $LogFilePath ) { return $false} - return $true - }catch - { - write-Debug "ERROR: $($_|fl * -force|out-string)" - New-TerminatingError -errorId 'TestWinEventLogFailed' -errorMessage $_.Exception -errorCategory InvalidOperation - } - -} - -Function Set-MaximumSizeInBytes{ - [CmdletBinding()] - param( - [System.String] - $LogName, - - [System.Int64] - $MaximumSizeInBytes - - ) - - $log = Get-WinEvent -ListLog $logName - $log.MaximumSizeInBytes = $MaximumSizeInBytes - $log.SaveChanges() - -} - -Function Set-LogMode{ - [CmdletBinding()] - param( - [System.String] - $LogName, - - [System.String] - $LogMode - ) - - $log = Get-WinEvent -ListLog $LogName - $log.LogMode = $LogMode - $log.SaveChanges() -} - -Function Set-SecurityDescriptor{ - [CmdletBinding()] - param( - [System.String] - $LogName, - - [System.String] - $SecurityDescriptor - ) - - $log = Get-WinEvent -ListLog $LogName - $log.SecurityDescriptor = $SecurityDescriptor - $log.SaveChanges() -} - - -Function Set-IsEnabled{ - [CmdletBinding()] - param( - [System.String] - $LogName, - - [System.Boolean] - $IsEnabled - ) - - $log = Get-WinEvent -ListLog $LogName - $log.IsEnabled = $IsEnabled - $log.SaveChanges() - -} - -Function Set-LogFilePath{ - [CmdletBinding()] - param( - [System.String] - $LogName, - - [System.String] - $LogFilePath - ) - - $log = Get-WinEvent -ListLog $LogName - $log.LogFilePath = $LogFilePath - $log.SaveChanges() -} - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xWinEventLog/DSCResources/MSFT_xWinEventLog/MSFT_xWinEventLog.schema.mof b/lib/puppet_x/dsc_resources/xWinEventLog/DSCResources/MSFT_xWinEventLog/MSFT_xWinEventLog.schema.mof deleted file mode 100644 index 69c766e2..00000000 --- a/lib/puppet_x/dsc_resources/xWinEventLog/DSCResources/MSFT_xWinEventLog/MSFT_xWinEventLog.schema.mof +++ /dev/null @@ -1,14 +0,0 @@ - -[ClassVersion("1.0.0.1"), FriendlyName("xWinEventLog")] -class MSFT_xWinEventLog : OMI_BaseResource -{ - [Key, Description("Name of the event log")] String LogName; - [Write, Description("sizethat the event log file is allowed to be When the file reaches this maximum size it is considered full")] Sint64 MaximumSizeInBytes; - [Write] Boolean IsEnabled; - [Write, ValueMap{"AutoBackup","Circular","Retain"}, Values{"AutoBackup","Circular","Retain"}] String LogMode; - [Write] String SecurityDescriptor; - [Write] String LogFilePath; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xWinEventLog/LICENSE b/lib/puppet_x/dsc_resources/xWinEventLog/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xWinEventLog/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xWinEventLog/xWinEventLog.psd1 b/lib/puppet_x/dsc_resources/xWinEventLog/xWinEventLog.psd1 deleted file mode 100644 index 095b3e66..00000000 --- a/lib/puppet_x/dsc_resources/xWinEventLog/xWinEventLog.psd1 +++ /dev/null @@ -1,98 +0,0 @@ -# -# Module manifest for module 'xWinEventLog' -# -# Generated by: Microsoft Corporation -# -# Generated on: 5/24/2014 -# - -@{ - -# Script module or binary module file associated with this manifest. -# RootModule = '' - -# Version number of this module. -ModuleVersion = '1.1.0.0' - -# ID used to uniquely identify this module -GUID = '5b4a0524-9c3f-44d6-933e-717c5c22b16a' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved' - -# Description of the functionality provided by this module -Description = 'Configure Windows Event Logs' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Name of the Windows PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the Windows PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module -# DotNetFrameworkVersion = '' - -# Minimum version of the common language runtime (CLR) required by this module -# CLRVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -# RequiredModules = @() - -# Assemblies that must be loaded prior to importing this module -# RequiredAssemblies = @() - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -# FormatsToProcess = @() - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -NestedModules = '.\xWinEventLog.psm1' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Variables to export from this module -VariablesToExport = '*' - -# Aliases to export from this module -AliasesToExport = '*' - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess -# PrivateData = '' - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - -} - - - diff --git a/lib/puppet_x/dsc_resources/xWinEventLog/xWinEventLog.psm1 b/lib/puppet_x/dsc_resources/xWinEventLog/xWinEventLog.psm1 deleted file mode 100644 index 2ef23e95..00000000 --- a/lib/puppet_x/dsc_resources/xWinEventLog/xWinEventLog.psm1 +++ /dev/null @@ -1,18 +0,0 @@ - -function Show-xWinEventLogExamples -{ - $path = Join-Path $PSScriptRoot 'Examples\*' - if ($Host.Name -eq 'Windows PowerShell ISE Host') - { - psedit $path - } - else - { - $files = @() - foreach ($f in dir $path) - { - $files += "$($f.FullName)" - } - PowerShell_ise -file $($files -join ",") - } -} diff --git a/lib/puppet_x/dsc_resources/xWindowsEventForwarding/DSCResources/MSFT_xWEFCollector/MSFT_xWEFCollector.psm1 b/lib/puppet_x/dsc_resources/xWindowsEventForwarding/DSCResources/MSFT_xWEFCollector/MSFT_xWEFCollector.psm1 deleted file mode 100644 index 63e585cd..00000000 --- a/lib/puppet_x/dsc_resources/xWindowsEventForwarding/DSCResources/MSFT_xWEFCollector/MSFT_xWEFCollector.psm1 +++ /dev/null @@ -1,77 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Name - ) - - $ServiceStartMode = (Get-WmiObject -Query "Select * From Win32_Service Where Name='Wecsvc'").StartMode - $Ensure = if ($ServiceStartMode -eq 'Auto') {'Present'} else {'Absent'} - - - $returnValue = @{ - Ensure = [System.String]$Ensure - Name = [System.String]$Name - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [parameter(Mandatory = $true)] - [System.String] - $Name - ) - - if ($Ensure -eq 'Present') {wecutil qc /q} - if ($Ensure -eq 'Absent') { - Stop-Service Wecsvc - $Service = Get-WmiObject -Query "Select * From Win32_Service Where Name='Wecsvc'" - $Service.ChangeStartMode("Disabled") - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [parameter(Mandatory = $true)] - [System.String] - $Name - ) - - $ServiceStartMode = (Get-WmiObject -Query "Select * From Win32_Service Where Name='Wecsvc'").StartMode - - if ($Ensure -eq 'Present') { - if ($ServiceStartMode -eq 'Auto') {$result = [System.Boolean]$true} else {$result = [System.Boolean]$false} - } - if ($Ensure -eq 'Absent') { - if ($ServiceStartMode -eq 'Disabled') {$result = [System.Boolean]$true} else {$result = [System.Boolean]$false} - } - - $result -} - - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xWindowsEventForwarding/DSCResources/MSFT_xWEFCollector/MSFT_xWEFCollector.schema.mof b/lib/puppet_x/dsc_resources/xWindowsEventForwarding/DSCResources/MSFT_xWEFCollector/MSFT_xWEFCollector.schema.mof deleted file mode 100644 index fb9494d2..00000000 --- a/lib/puppet_x/dsc_resources/xWindowsEventForwarding/DSCResources/MSFT_xWEFCollector/MSFT_xWEFCollector.schema.mof +++ /dev/null @@ -1,8 +0,0 @@ - -[ClassVersion("0.1.0.0"), FriendlyName("xWEFCollector")] -class MSFT_xWEFCollector : OMI_BaseResource -{ - [Write, Description("Determines whether the Collector service should be enabled or disabled"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Key, Description("Provide a unique name for the setting")] String Name; -}; - diff --git a/lib/puppet_x/dsc_resources/xWindowsEventForwarding/DSCResources/MSFT_xWEFSubscription/MSFT_xWEFSubscription.psm1 b/lib/puppet_x/dsc_resources/xWindowsEventForwarding/DSCResources/MSFT_xWEFSubscription/MSFT_xWEFSubscription.psm1 deleted file mode 100644 index 946fb02a..00000000 --- a/lib/puppet_x/dsc_resources/xWindowsEventForwarding/DSCResources/MSFT_xWEFSubscription/MSFT_xWEFSubscription.psm1 +++ /dev/null @@ -1,331 +0,0 @@ -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $SubscriptionID, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = 'Present', - - [parameter(Mandatory = $true)] - [ValidateSet("CollectorInitiated","SourceInitiated")] - [System.String] - $SubscriptionType - ) - - if ((get-service wecsvc).Status -ne 'Running') {throw 'The xWEFSubscription resource requires that the Wecsvc service be in a running state. Set the xWEFCollectorService resource to Ensure = Present or use wecutil qc.'} - - $EnumSubs = wecutil es - if ($EnumSubs -contains $SubscriptionID) { - [xml]$GetSub = wecutil gs $SubscriptionID /format:xml - } - - $returnValue = @{ - SubscriptionID = [System.String]$GetSub.Subscription.SubscriptionId - Ensure = if ($Ensure -eq 'Present' -AND $EnumSubs -contains $SubscriptionID) {[System.String]'Present'} else {$null} - SubscriptionType = [System.String]$GetSub.Subscription.SubscriptionType - Description = [System.String]$GetSub.Subscription.Description - Enabled = [System.String]$GetSub.Subscription.Enabled - DeliveryMode = [System.String]$GetSub.Subscription.Delivery.Mode - MaxItems = [System.Int32]$GetSub.Subscription.Delivery.Batching.MaxItems - MaxLatencyTime = [System.UInt64]$GetSub.Subscription.Delivery.Batching.MaxLatencyTime - HeartBeatInterval = [System.UInt64]$GetSub.Subscription.Delivery.PushSettings.Heartbeat.Interval - ReadExistingEvents = [System.String]$GetSub.Subscription.ReadExistingEvents - TransportName = [System.String]$GetSub.Subscription.TransportName - ContentFormat = [System.String]$GetSub.Subscription.ContentFormat - Locale = [System.String]$GetSub.Subscription.Locale.Language - LogFile = [System.String]$GetSub.Subscription.LogFile - CredentialsType = [System.String]$GetSub.Subscription.CredentialsType - AllowedSourceNonDomainComputers = [System.String[]]$GetSub.Subscription.AllowedSourceNonDomainComputers - AllowedSourceDomainComputers = [System.String]$GetSub.Subscription.AllowedSourceDomainComputers - Query = [System.String[]]$GetSub.Subscription.Query.'#cdata-section' - } - - $returnValue -} -# Get-TargetResource -SubscriptionID TestSub -Ensure Present -SubscriptionType CollectorInitiated - - -function Set-TargetResource -{ - [CmdletBinding()] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $SubscriptionID, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = 'Present', - - [parameter(Mandatory = $true)] - [ValidateSet("CollectorInitiated","SourceInitiated")] - [System.String] - $SubscriptionType, - - [System.String] - $Description, - - [ValidateSet("true","false")] - [System.String] - $Enabled = 'true', - - [ValidateSet("Push","Pull")] - [System.String] - $DeliveryMode = 'Push', - - [System.Int32] - $MaxItems = 1, - - [System.UInt64] - $MaxLatencyTime = 20000, - - [System.UInt64] - $HeartBeatInterval = 20000, - - [ValidateSet("true","false")] - [System.String] - $ReadExistingEvents = 'false', - - [ValidateSet("HTTP","HTTPS")] - [System.String] - $TransportName = 'HTTP', - - [System.String] - $TransportPort = '5985', - - [System.String] - $ContentFormat = 'RenderedText', - - [System.String] - $Locale = 'en-US', - - [System.String] - $LogFile = 'ForwardedEvents', - - [ValidateSet("Default","Basic","Negotiate","Digest")] - [System.String] - $CredentialsType = 'Default', - - [System.String[]] - $AllowedSourceNonDomainComputers, - - [System.String] - $AllowedSourceDomainComputers = 'O:NSG:NSD:(A;;GA;;;DC)(A;;GA;;;NS)', - - [System.String[]] - $Query = @('Application:*','System:*'), - - [System.String[]] - $Address = @('source.wef.test') - ) - - if ((get-service wecsvc).Status -ne 'Running') {throw 'The xWEFSubscription resource requires that the Wecsvc service be in a running state. Set the xWEFCollectorService resource to Ensure = Present or use wecutil qc.'} - - if ($Ensure -eq 'Present') { - $Create = @" - - - $SubscriptionID - $SubscriptionType - $Description - $Enabled - http://schemas.microsoft.com/wbem/wsman/1/windows/EventLog - Custom - - - $MaxItems - $MaxLatencyTime - - - - - - - -"@ - - foreach ($q in $Query){ - $h = Convert-QueryString $q - $Create += @" - -"@ - } - - $Create += @" -]]> - - $ReadExistingEvents - $TransportName - $TransportPort - $ContentFormat - - $LogFile - Microsoft-Windows-EventCollector - $CredentialsType - -"@ - - if ($SubscriptionType -eq 'CollectorInitiated') { - $Create += @" - - -"@ - foreach ($a in $Address) { - $Create += @" - -
$a
-
-"@ - } - $Create += @" - -
-"@ - } - - if ($SubscriptionType -eq 'SourceInitiated') { - $Create += @" - $AllowedSourceNonDomainComputers - $AllowedSourceDomainComputers -"@ - } - - $Create += @" - -
-"@ - Write-Verbose "SubscriptionID: $SubscriptionID" - $TempFileName = "$([system.guid]::newguid().guid).tmp" - $Create | Set-Content $env:TEMP\$TempFileName - - $EnumSubs = wecutil es - if ($EnumSubs -contains $SubscriptionID) { - WecUtil ds $subscriptionid - } - WecUtil cs $env:TEMP\$TempFileName - - Remove-Item $env:TEMP\$TempFileName -Force - } - - if ($Ensure -eq 'Absent') { - $EnumSubs = wecutil es - if ($EnumSubs -contains $SubscriptionID) { - wecutil ds $SubscriptionID - } - } -} -# Set-TargetResource -SubscriptionID TestSub -Ensure Present -SubscriptionType CollectorInitiated - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $SubscriptionID, - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = 'Present', - - [parameter(Mandatory = $true)] - [ValidateSet("CollectorInitiated","SourceInitiated")] - [System.String] - $SubscriptionType, - - [System.String] - $Description, - - [ValidateSet("true","false")] - [System.String] - $Enabled = 'true', - - [ValidateSet("Push","Pull")] - [System.String] - $DeliveryMode = 'Push', - - [System.Int32] - $MaxItems = 1, - - [System.UInt64] - $MaxLatencyTime = 20000, - - [System.UInt64] - $HeartBeatInterval = 20000, - - [ValidateSet("true","false")] - [System.String] - $ReadExistingEvents = 'false', - - [ValidateSet("HTTP","HTTPS")] - [System.String] - $TransportName = 'HTTP', - - [System.String] - $TransportPort = '5985', - - [System.String] - $ContentFormat = 'RenderedText', - - [System.String] - $Locale = 'en-US', - - [System.String] - $LogFile = 'ForwardedEvents', - - [ValidateSet("Default","Basic","Negotiate","Digest")] - [System.String] - $CredentialsType = 'Default', - - [System.String[]] - $AllowedSourceNonDomainComputers, - - [System.String] - $AllowedSourceDomainComputers = 'O:NSG:NSD:(A;;GA;;;DC)(A;;GA;;;NS)', - - [System.String[]] - $Query = @('Application:*','System:*'), - - [System.String[]] - $Address = @('source.wef.test') - ) - - if ((get-service wecsvc).Status -ne 'Running') {throw 'The xWEFSubscription resource requires that the Wecsvc service be in a running state. Set the xWEFCollectorService resource to Ensure = Present or use wecutil qc.'} - - $Get = Get-TargetResource -SubscriptionID $SubscriptionID -SubscriptionType $SubscriptionType - - $result = [System.Boolean]$true - - foreach ($g in $Get.Keys) { - if ($PSBoundParameters.$g) { - $test = $Get.$g -eq $PSBoundParameters.$g - if ($test -eq [System.Boolean]$false) {$result = [System.Boolean]$false} - } - } - - $result -} -# Test-TargetResource -SubscriptionID TestSub -Ensure Present -SubscriptionType CollectorInitiated - - -function Convert-QueryString { -param ( -[parameter(Mandatory = $true)] -[string[]] -$string -) - return @{Path=$($string.split(':')[0]);Select=$($string.split(':')[1])} -} - - -Export-ModuleMember -Function *-TargetResource \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xWindowsEventForwarding/DSCResources/MSFT_xWEFSubscription/MSFT_xWEFSubscription.schema.mof b/lib/puppet_x/dsc_resources/xWindowsEventForwarding/DSCResources/MSFT_xWEFSubscription/MSFT_xWEFSubscription.schema.mof deleted file mode 100644 index 0ccfb1ce..00000000 --- a/lib/puppet_x/dsc_resources/xWindowsEventForwarding/DSCResources/MSFT_xWEFSubscription/MSFT_xWEFSubscription.schema.mof +++ /dev/null @@ -1,26 +0,0 @@ - -[ClassVersion("0.1.0.0"), FriendlyName("xWEFSubscription")] -class MSFT_xWEFSubscription : OMI_BaseResource -{ - [Key, Description("Name of the Subscription")] String SubscriptionID; - [Write, Description("Determines whether to validate or remove the scubscription"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Required, Description("Type of Subscription to create"), ValueMap{"CollectorInitiated","SourceInitiated"}, Values{"CollectorInitiated","SourceInitiated"}] String SubscriptionType; - [Write, Description("Description of the Collector subscription")] String Description; - [Write, Description("Sets whether the subscription will be enabled, default true"), ValueMap{"true","false"}, Values{"true","false"}] String Enabled; - [Write, Description("Configures whether the collector will pull events from source nodes or if the source nodes will push events to the collector, default push"), ValueMap{"Push","Pull"}, Values{"Push","Pull"}] String DeliveryMode; - [Write, Description("The number of events that can occur on the source before they are submitted to the collector, default 1")] Sint32 MaxItems; - [Write, Description("The maximum amount of time that can pass before events are submitted to the collector, default 20000")] Uint64 MaxLatencyTime; - [Write, Description("Frequency to verify connectivity, default 20000")] Uint64 HeartBeatInterval; - [Write, Description("Should the collector read existing or only new events, default false"), ValueMap{"true","false"}, Values{"true","false"}] String ReadExistingEvents; - [Write, Description("Determines whether to require SSL, default HTTP"), ValueMap{"HTTP","HTTPS"}, Values{"HTTP","HTTPS"}] String TransportName; - [Write, Description("Set the port number that WinRM should use to make a connection, default 5985")] String TransportPort; - [Write, Description("Format that event logs will be submitted in, default RenderedText")] String ContentFormat; - [Write, Description("Sets the subscription Locale, default en-US")] String Locale; - [Write, Description("Sets the event log that the collected events will be written to, default ForwardedEvents")] String LogFile; - [Write, Description("Sets the credential type used for authenticating to WinRM, default Default"), ValueMap{"Default","Basic","Negotiate","Digest"}, Values{"Default","Basic","Negotiate","Digest"}] String CredentialsType; - [Write, Description("This parameter has not been fully implemented, only required for source initiated scenarios, provide XML to set IssuerCAList, AllowedSubjectList, or DeniedSubjectList if this will be used, default empty string")] String AllowedSourceNonDomainComputers[]; - [Write, Description("In Source Initiated scenario this SDDL determines who can push events, default O:NSG:NSD:(A;;GA;;;DC)(A;;GA;;;NS) which equates to Domain Computers and Network Service")] String AllowedSourceDomainComputers; - [Write, Description("Expects an array of hashtables that set which events should be collected, default is all application and system logs")] String Query[]; - [Write, Description("Expects an array of source node FQDNs, default source.wef.test to prevent errors when only staging test subscription")] String Address[]; -}; - diff --git a/lib/puppet_x/dsc_resources/xWindowsEventForwarding/LICENSE b/lib/puppet_x/dsc_resources/xWindowsEventForwarding/LICENSE deleted file mode 100644 index 5f178f93..00000000 --- a/lib/puppet_x/dsc_resources/xWindowsEventForwarding/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Michael Greene - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/lib/puppet_x/dsc_resources/xWindowsEventForwarding/xWindowsEventForwarding.psd1 b/lib/puppet_x/dsc_resources/xWindowsEventForwarding/xWindowsEventForwarding.psd1 deleted file mode 100644 index 228cef3b..00000000 --- a/lib/puppet_x/dsc_resources/xWindowsEventForwarding/xWindowsEventForwarding.psd1 +++ /dev/null @@ -1,120 +0,0 @@ -# -# Module manifest for module 'xWindowsEventForwarding' -# -# Generated by: PowerShell Team -# -# Generated on: 3/26/2015 -# - -@{ - -# Script module or binary module file associated with this manifest. -# RootModule = '' - -# Version number of this module. -ModuleVersion = '1.0.0.0' - -# ID used to uniquely identify this module -GUID = 'ab5e14f9-156e-49d2-ae1b-96576a929f3b' - -# Author of this module -Author = 'PowerShell Team' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '2015' - -# Description of the functionality provided by this module -Description = 'This module can be used to manage configuration of a Windows Event Forwarding server in a Colelctor role.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '5.0' - -# Name of the Windows PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the Windows PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module -# DotNetFrameworkVersion = '' - -# Minimum version of the common language runtime (CLR) required by this module -# CLRVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -# RequiredModules = @() - -# Assemblies that must be loaded prior to importing this module -# RequiredAssemblies = @() - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -# FormatsToProcess = @() - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -# NestedModules = @() - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Variables to export from this module -VariablesToExport = '*' - -# Aliases to export from this module -AliasesToExport = '*' - -# DSC resources to export from this module -# DscResourcesToExport = @() - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - # Tags = @() - - # A URL to the license for this module. - # LicenseUri = '' - - # A URL to the main website for this project. - # ProjectUri = '' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - # ReleaseNotes = '' - - } # End of PSData hashtable - -} # End of PrivateData hashtable - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - -} - diff --git a/lib/puppet_x/dsc_resources/xWindowsRestore/DSCResources/xSystemRestore/xSystemRestore.psm1 b/lib/puppet_x/dsc_resources/xWindowsRestore/DSCResources/xSystemRestore/xSystemRestore.psm1 deleted file mode 100644 index 4e9b3475..00000000 --- a/lib/puppet_x/dsc_resources/xWindowsRestore/DSCResources/xSystemRestore/xSystemRestore.psm1 +++ /dev/null @@ -1,120 +0,0 @@ -#--------------------------------------------------------------------------------- #The sample scripts are not supported under any Microsoft standard support #program or service. The sample scripts are provided AS IS without warranty #of any kind. Microsoft further disclaims all implied warranties including, #without limitation, any implied warranties of merchantability or of fitness for #a particular purpose. The entire risk arising out of the use or performance of #the sample scripts and documentation remains with you. In no event shall #Microsoft, its authors, or anyone else involved in the creation, production, or #delivery of the scripts be liable for any damages whatsoever (including, #without limitation, damages for loss of business profits, business interruption, #loss of business information, or other pecuniary loss) arising out of the use #of or inability to use the sample scripts or documentation, even if Microsoft #has been advised of the possibility of such damages #--------------------------------------------------------------------------------- - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure - ) - - #Get the status of system restore on the target computer. - $GetSystemRestore = Get-CimInstance -Class SystemRestoreConfig -Namespace 'root\default' - - $returnValue = @{ - Ensure = $Ensure - } - - #Check if the system restore is enabled or disabled. - If($GetSystemRestore.RPSessionInterval -eq 1) - { - $returnValue.Ensure = 'Present' - } - Else - { - $returnValue.Ensure = 'Absent' - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding(SupportsShouldProcess=$true)] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [System.String[]] - $Drive - ) - - Switch($Ensure) - { - 'Present' - { - If($PSCmdlet.ShouldProcess("'$Drive'","Enable the system restore")) - { - Try - { - Write-Verbose "Enable the System Restore feature on the '$Drive' file system drive." - Enable-ComputerRestore -Drive $Drive -ErrorAction Stop - } - Catch - { - $ErrorMsg = $_.Exception.Message - Write-Verbose $ErrorMsg - } - } - } - 'Absent' - { - If($PSCmdlet.ShouldProcess("$Drive","Disable the system restore")) - { - Try - { - Write-Verbose "Disable the System Restore feature on the '$Drive' file system drive." - Disable-ComputerRestore -Drive $Drive - } - Catch - { - $ErrorMsg = $_.Exception.Message - Write-Verbose $ErrorMsg - } - } - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure, - - [System.String[]] - $Drive - ) - - #Output the result of Get-TargetResource function. - $Get = Get-TargetResource -Ensure $Ensure - - If($Ensure -eq $Get.Ensure) - { - return $true - } - Else - { - return $false - } -} - - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xWindowsRestore/DSCResources/xSystemRestore/xSystemRestore.schema.mof b/lib/puppet_x/dsc_resources/xWindowsRestore/DSCResources/xSystemRestore/xSystemRestore.schema.mof deleted file mode 100644 index 7e6968e8..00000000 --- a/lib/puppet_x/dsc_resources/xWindowsRestore/DSCResources/xSystemRestore/xSystemRestore.schema.mof +++ /dev/null @@ -1,10 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xSystemRestore")] -class xSystemRestore : OMI_BaseResource -{ - [Key, Description("Indicates that the computer restore is enabled or is disabled."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [Write, Description("Specifies the file system drives. Enter one or more file system drive letters, each followed by a colon and a backslash and enclosed in quotation marks, such as 'C:\' or 'D:\'.")] String Drive[]; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xWindowsRestore/DSCResources/xSystemRestorePoint/xSystemRestorePoint.psm1 b/lib/puppet_x/dsc_resources/xWindowsRestore/DSCResources/xSystemRestorePoint/xSystemRestorePoint.psm1 deleted file mode 100644 index 009081de..00000000 --- a/lib/puppet_x/dsc_resources/xWindowsRestore/DSCResources/xSystemRestorePoint/xSystemRestorePoint.psm1 +++ /dev/null @@ -1,205 +0,0 @@ -#--------------------------------------------------------------------------------- #The sample scripts are not supported under any Microsoft standard support #program or service. The sample scripts are provided AS IS without warranty #of any kind. Microsoft further disclaims all implied warranties including, #without limitation, any implied warranties of merchantability or of fitness for #a particular purpose. The entire risk arising out of the use or performance of #the sample scripts and documentation remains with you. In no event shall #Microsoft, its authors, or anyone else involved in the creation, production, or #delivery of the scripts be liable for any damages whatsoever (including, #without limitation, damages for loss of business profits, business interruption, #loss of business information, or other pecuniary loss) arising out of the use #of or inability to use the sample scripts or documentation, even if Microsoft #has been advised of the possibility of such damages #--------------------------------------------------------------------------------- - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Description, - - [ValidateSet("APPLICATION_INSTALL","APPLICATION_UNINSTALL","DEVICE_DRIVER_INSTALL","MODIFY_SETTINGS","CANCELLED_OPERATION")] - [System.String] - $RestorePointType = 'APPLICATION_INSTALL', - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = 'Present' - ) - - #Get the latest status of system restore point. - $LatestRestorePoint = Get-ComputerRestorePoint | Select-Object -Last 1 - - $returnValue = @{ - Description = If($LatestRestorePoint.Description){$LatestRestorePoint.Description}Else{"None"} - RestorePointType = If($LatestRestorePoint.RestorePointType){$LatestRestorePoint.RestorePointType}Else{"None"} - Ensure = $Ensure - } - - - If($($Description -eq $LatestRestorePoint.Description) -and $($(ConvertRestorePointValue -RestoreType $RestorePointType) -eq $LatestRestorePoint.RestorePointType)) - { - $returnValue.Ensure = "Present" - } - Else - { - $returnValue.Ensure = "Absent" - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding(SupportsShouldProcess=$true)] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Description, - - [ValidateSet("APPLICATION_INSTALL","APPLICATION_UNINSTALL","DEVICE_DRIVER_INSTALL","MODIFY_SETTINGS","CANCELLED_OPERATION")] - [System.String] - $RestorePointType = 'APPLICATION_INSTALL', - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = 'Present' - ) - - Switch($Ensure) - { - 'Present' - { - If($PSCmdlet.ShouldProcess("$Description","Creating restore point")) - { - Try - { - Write-Verbose "Creating a system restore point on the target computer." - Checkpoint-Computer -Description $Description -RestorePointType $RestorePointType - } - Catch - { - $ErrorMsg = $_.Exception.Message - Write-Verbose $ErrorMsg - } - } - } - - 'Absent' - { - -$Definition = @" -[DllImport ("Srclient.dll")] -public static extern int SRRemoveRestorePoint (int index); -"@ - $Assemblies = [AppDomain]::CurrentDomain.GetAssemblies() - $isExists = ($Assemblies | Foreach {$_.GetTypes()} | Where {$_.FullName -eq "SystemRestore.DeleteRestorePoint"}) -ne $null - - If (!$isExists) - { - Add-Type -memberDefinition $Definition -Name DeleteRestorePoint -NameSpace SystemRestore -PassThru - } - - $RestorePoints = Get-ComputerRestorePoint | Where{$_.Description -eq "$Description" -and $_.RestorePointType -eq "$(ConvertRestorePointValue -RestoreType $RestorePointType)"} - - Foreach($RestorePoint in $RestorePoints) - { - If($PSCmdlet.ShouldProcess("$Description","Deleting restore point")) - { - Try - { - Write-Verbose "Deleting the restore point." - [SystemRestore.DeleteRestorePoint]::SRRemoveRestorePoint($restorePoint.SequenceNumber) | Out-Null - } - Catch - { - Write-Verbose "Failed to remove the restore point." - } - } - } - } - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Description, - - [ValidateSet("APPLICATION_INSTALL","APPLICATION_UNINSTALL","DEVICE_DRIVER_INSTALL","MODIFY_SETTINGS","CANCELLED_OPERATION")] - [System.String] - $RestorePointType = 'APPLICATION_INSTALL', - - [ValidateSet("Present","Absent")] - [System.String] - $Ensure = 'Present' - ) - - #Get the output of Get-TargetResource function. - $Get = Get-TargetResource -Description $Description -RestorePointType $RestorePointType - - Switch($Ensure) - { - 'Present' - { - #If the value of $Get.Ensure is "Present", it indicates that the current restore point is the same as the accepted value. - If($Get.Ensure -eq "Present") - { - return $true - } - Else - { - return $false - } - } - 'Absent' - { - If($Get.Ensure -eq "Present") - { - return $false - } - Else - { - return $true - } - } - } -} - - -Function ConvertRestorePointValue -{ - Param - ( - $RestoreType - ) - - Switch($RestoreType) - { - "APPLICATION_INSTALL" - { - $Value = 0 - } - "APPLICATION_UNINSTALL" - { - $Value = 1 - } - "DEVICE_DRIVER_INSTALL" - { - $Value = 10 - } - "MODIFY_SETTINGS" - { - $Value = 12 - } - "CANCELLED_OPERATION" - { - $Value = 13 - } - } - return $Value -} - - -Export-ModuleMember -Function *-TargetResource - diff --git a/lib/puppet_x/dsc_resources/xWindowsRestore/DSCResources/xSystemRestorePoint/xSystemRestorePoint.schema.mof b/lib/puppet_x/dsc_resources/xWindowsRestore/DSCResources/xSystemRestorePoint/xSystemRestorePoint.schema.mof deleted file mode 100644 index 3622f676..00000000 --- a/lib/puppet_x/dsc_resources/xWindowsRestore/DSCResources/xSystemRestorePoint/xSystemRestorePoint.schema.mof +++ /dev/null @@ -1,11 +0,0 @@ - -[ClassVersion("1.0.0.0"), FriendlyName("xSystemRestorePoint")] -class xSystemRestorePoint : OMI_BaseResource -{ - [Key, Description("Specifies a descriptive name for the restore point.")] String Description; - [Write, Description("Specifies the type of restore point. The default is APPLICATION_INSTALL."), ValueMap{"APPLICATION_INSTALL","APPLICATION_UNINSTALL","DEVICE_DRIVER_INSTALL","MODIFY_SETTINGS","CANCELLED_OPERATION"}, Values{"APPLICATION_INSTALL","APPLICATION_UNINSTALL","DEVICE_DRIVER_INSTALL","MODIFY_SETTINGS","CANCELLED_OPERATION"}] String RestorePointType; - [Write, Description("Indicates if the specified restore point created. Set this property to 'Absent' to ensure that the restore point does not exist. Set it to 'Present' to ensure that the restore point does exist. The default is 'Present'."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xWindowsRestore/LICENSE b/lib/puppet_x/dsc_resources/xWindowsRestore/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xWindowsRestore/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xWindowsRestore/xWindowsRestore.psd1 b/lib/puppet_x/dsc_resources/xWindowsRestore/xWindowsRestore.psd1 deleted file mode 100644 index 21358614..00000000 --- a/lib/puppet_x/dsc_resources/xWindowsRestore/xWindowsRestore.psd1 +++ /dev/null @@ -1,31 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '1.0.0' - -# ID used to uniquely identify this module -GUID = '32fe8783-1978-4d79-bf90-fddca2bbbf7b' - -# Author of this module -Author = 'OneScript Team' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'This DSC Module includes 2 DSC resources, xSystemRestore resource can configure system restore and xSystemRestorePoint resource can create or remove an restore point in Windows.' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' -} diff --git a/lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xMicrosoftUpdate/MSFT_xMicrosoftUpdate.psm1 b/lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xMicrosoftUpdate/MSFT_xMicrosoftUpdate.psm1 deleted file mode 100644 index cb2ca8e6..00000000 --- a/lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xMicrosoftUpdate/MSFT_xMicrosoftUpdate.psm1 +++ /dev/null @@ -1,122 +0,0 @@ -function Write-DeprecatedMessage -{ - Write-Warning -Message 'xMicrosoftUpdate is deprecated. Please use xWindows Update Agent' -} - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure - ) - - Write-DeprecatedMessage - Write-Verbose -Message "Getting Windows Update Agent services..." - #Get the registered update services - $UpdateServices = (New-Object -ComObject Microsoft.Update.ServiceManager).Services - - $returnValue = @{ - Ensure = $Ensure - } - - #Check if the microsoft update service is registered - if($UpdateServices | Where-Object {$_.ServiceID -eq '7971f918-a847-4430-9279-4a52d1efe18d'}) - { - Write-Verbose -Message "Microsoft Update Present..." - $returnValue.Ensure = 'Present' - } - Else - { - Write-Verbose -Message "Microsoft Update Absent..." - $returnValue.Ensure = 'Absent' - } - - $returnValue -} - - -function Set-TargetResource -{ - [CmdletBinding(SupportsShouldProcess=$true)] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure - ) - - Write-DeprecatedMessage - Switch($Ensure) - { - 'Present' - { - If($PSCmdlet.ShouldProcess("Enable Microsoft Update")) - { - Try - { - Write-Verbose -Message "Enable the Microsoft Update setting" - (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2('7971f918-a847-4430-9279-4a52d1efe18d',7,"") - Restart-Service wuauserv -ErrorAction SilentlyContinue - } - Catch - { - $ErrorMsg = $_.Exception.Message - Write-Verbose $ErrorMsg - } - } - } - 'Absent' - { - If($PSCmdlet.ShouldProcess("$Drive","Disable Microsoft Update")) - { - Try - { - Write-Verbose -Message "Disable the Microsoft Update setting" - (New-Object -ComObject Microsoft.Update.ServiceManager).RemoveService('7971f918-a847-4430-9279-4a52d1efe18d') - } - Catch - { - $ErrorMsg = $_.Exception.Message - Write-Verbose $ErrorMsg - } - } - } - } -} - -function Test-TargetResource -{ - # Verbose messages are written in Get. - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSDSCUseVerboseMessageInDSCResource", "")] - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Present","Absent")] - [System.String] - $Ensure - ) - - #Output the result of Get-TargetResource function. - - $Get = Get-TargetResource -Ensure $Ensure - - If($Ensure -eq $Get.Ensure) - { - return $true - } - Else - { - return $false - } -} - - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xMicrosoftUpdate/MSFT_xMicrosoftUpdate.schema.mof b/lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xMicrosoftUpdate/MSFT_xMicrosoftUpdate.schema.mof deleted file mode 100644 index 61ece228..00000000 --- a/lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xMicrosoftUpdate/MSFT_xMicrosoftUpdate.schema.mof +++ /dev/null @@ -1,6 +0,0 @@ - -[ClassVersion("0.1.0.0"), FriendlyName("xMicrosoftUpdate")] -class MSFT_xMicrosoftUpdate : OMI_BaseResource -{ - [Key, Description("Indicates that the Microsoft Update is enabled or is disabled."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; diff --git a/lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xWindowsUpdate/MSFT_xWindowsUpdate.psm1 b/lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xWindowsUpdate/MSFT_xWindowsUpdate.psm1 deleted file mode 100644 index ad669919..00000000 --- a/lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xWindowsUpdate/MSFT_xWindowsUpdate.psm1 +++ /dev/null @@ -1,418 +0,0 @@ -Data LocalizedData -{ - # culture="en-US"e - ConvertFrom-StringData @' - GettingHotfixMessage=Getting the hotfix patch with ID {0}. - ValidatingPathUri=Validating path/URI. - ErrorPathUriSpecifiedTogether=Hotfix path and Uri parameters cannot be specified together. - ErrorInvalidFilePathMsu=Filename provided is an invalid file path for hotfix since it does not have the msu suffix to it. - StartKeyWord=START - EndKeyWord= END - FailedKeyword = FAILED - ActionDownloadFromUri= Download from {0} using BitsTransfer. - ActionInstallUsingwsusa = Install using wsusa.exe - ActionUninstallUsingwsusa = Uninstall using wsusa.exe - DownloadingPackageTo = Downloading package to filepath {0} - FileDoesntExist=The given path {0} does not exist. - LogNotSpecified=Log name hasn't been specified. Hotfix will use the temporary log {0} . - ErrorOccuredOnHotfixInstall = \nCould not install the windows update. Details are stored in the log {0} . Error message is \n\n {1} .\n\nPlease look at Windows Update error codes here for more information - http://technet.microsoft.com/en-us/library/dd939837(WS.10).aspx . - ErrorOccuredOnHotfixUninnstall = \nCould not uninstall the windows update. Details are stored in the log {0} . Error message is \n\n {1} .\n\nPlease look at Windows Update error codes here for more information - http://technet.microsoft.com/en-us/library/dd939837(WS.10).aspx . - TestingEnsure = Testing whether hotfix is {0}. - InvalidPath=The specified Path ({0}) is not in a valid format. Valid formats are local paths, UNC, and HTTP. - InvalidBinaryType=The specified Path ({0}) does not appear to specify an MSU file and as such is not supported. - TestStandardArgumentsPathWasPath = Test-StandardArguments, Path was {0}. - NeedToDownloadFileFromSchemeDestinationWillBeDestName = Need to download file from {0}, destination will be {1}. - TheUriSchemeWasUriScheme = The uri scheme was {0}. - MountSharePath=Mount share to get media. - NeedsMoreInfo=Id is required. - InvalidIdFormat=Id must be formated either KBNNNNNNN or NNNNNNN. - DownloadHTTPFile=Download the media over HTTP or HTTPS. - CreatingCacheLocation = Creating cache location. - CouldNotOpenDestFile=Cannot open the file {0} for writing. - CreatingTheSchemeStream = Creating the {0} stream. - SettingDefaultCredential = Setting default credential. - SettingAuthenticationLevel = Setting authentication level. - IgnoringBadCertificates = Ignoring bad certificates. - GettingTheSchemeResponseStream = Getting the {0} response stream. - ErrorOutString = Error: {0}. - CopyingTheSchemeStreamBytesToTheDiskCache = Copying the {0} stream bytes to the disk cache. - RedirectingPackagePathToCacheFileLocation = Redirecting package path to cache file location. - ThePathExtensionWasPathExt = The path extension was {0} - CreatingTheDestinationCacheFile = Creating the destination cache file. -'@ -} - -$CacheLocation = "$env:ProgramData\Microsoft\Windows\PowerShell\Configuration\BuiltinProvCache\MSFT_xWindowsUpdate" - -# Get-TargetResource function -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - Param - ( - [parameter(Mandatory = $true)] - [System.String] - $Path, - - [parameter(Mandatory = $true)] - [System.String] - $Id - ) - Set-StrictMode -Version latest - - $uri, $kbId = Test-StandardArguments -Path $Path -Id $Id - - Write-Verbose $($LocalizedData.GettingHotfixMessage -f ${Id}) - - $hotfix = Get-HotFix -Id "KB$kbId" - - $returnValue = @{ - Path = '' - Id = $hotfix.HotFixId - Log = '' - } - - $returnValue - -} - -$Debug = $true -Function Trace-Message -{ - param([string] $Message) - Set-StrictMode -Version latest - if($Debug) - { - Write-Verbose $Message - } -} - -Function New-InvalidArgumentException -{ - param( - [string] $Message, - [string] $ParamName - ) - Set-StrictMode -Version latest - - $exception = new-object System.ArgumentException $Message,$ParamName - $errorRecord = New-Object System.Management.Automation.ErrorRecord $exception,$ParamName,'InvalidArgument',$null - throw $errorRecord -} - -# The Set-TargetResource cmdlet -function Set-TargetResource -{ - # should be [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidGlobalVars", "DSCMachineStatus")], but it doesn't work - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidGlobalVars", "")] - [CmdletBinding()] - Param - ( - [parameter(Mandatory = $true)] - [System.String] - $Path, - - [parameter(Mandatory = $true)] - [System.String] - $Id, - - [System.String] - $Log, - - [ValidateSet('Present','Absent')] - [System.String] - $Ensure='Present', - - [pscredential] $Credential - - ) - Set-StrictMode -Version latest - if (!$Log) - { - $Log = [IO.Path]::GetTempFileName() - $Log += '.etl' - - Write-Verbose "$($LocalizedData.LogNotSpecified -f ${Log})" - } - $uri, $kbId = Test-StandardArguments -Path $Path -Id $Id - - - - if($Ensure -eq 'Present') - { - $filePath = Test-WindowsUpdatePath -uri $uri -Credential $Credential - Write-Verbose "$($LocalizedData.StartKeyWord) $($LocalizedData.ActionInstallUsingwsusa)" - - Start-Process -FilePath 'wusa.exe' -ArgumentList "`"$filepath`" /quiet /norestart /log:`"$Log`"" -Wait -NoNewWindow -ErrorAction SilentlyContinue - $errorOccured = Get-WinEvent -Path $Log -Oldest | Where-Object {$_.Id -eq 3} - if($errorOccured) - { - $errorMessage= $errorOccured.Message - Throw "$($LocalizedData.ErrorOccuredOnHotfixInstall -f ${Log}, ${errorMessage})" - } - - Write-Verbose "$($LocalizedData.EndKeyWord) $($LocalizedData.ActionInstallUsingwsusa)" - } - else - { - $argumentList = "/uninstall /KB:$kbId /quiet /norestart /log:`"$Log`"" - - Write-Verbose "$($LocalizedData.StartKeyWord) $($LocalizedData.ActionUninstallUsingwsusa) Arguments: $ArgumentList" - - Start-Process -FilePath 'wusa.exe' -ArgumentList $argumentList -Wait -NoNewWindow -ErrorAction SilentlyContinue - #Read the log and see if there was an error event - $errorOccured = Get-WinEvent -Path $Log -Oldest | Where-Object {$_.Id -eq 3} - if($errorOccured) - { - $errorMessage= $errorOccured.Message - Throw "$($LocalizedData.ErrorOccuredOnHotfixUninstall -f ${Log}, ${errorMessage})" - } - - Write-Verbose "$($LocalizedData.EndKeyWord) $($LocalizedData.ActionUninstallUsingwsusa)" - - - } - - if (Test-Path -Path 'variable:\LASTEXITCODE') - { - if ($LASTEXITCODE -eq 3010) - { - # reboot machine if exitcode indicates reboot. - $global:DSCMachineStatus = 1 - } - } -} - - -# Function to test if Hotfix is installed. -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [System.String] - $Path, - - [parameter(Mandatory = $true)] - [System.String] - $Id, - - [System.String] - $Log, - - [ValidateSet('Present','Absent')] - [System.String] - $Ensure='Present', - - [pscredential] $Credential - ) - Set-StrictMode -Version latest - Write-Verbose "$($LocalizedData.TestingEnsure -f ${Ensure})" - $uri, $kbId = Test-StandardArguments -Path $Path -Id $Id - - # This is not the correct way to test to see if an update is applicable to a machine - # but, WUSA does not currently expose a way to ask. - $result = Get-HotFix -Id "KB$kbId" -ErrorAction SilentlyContinue - $returnValue= [bool]$result - if($Ensure -eq 'Present') - { - - Return $returnValue - } - else - { - Return !$returnValue - } - -} - -Function Test-StandardArguments -{ - param( - [string] - $Path, - - [string] - $Id - ) - Set-StrictMode -Version latest - - Trace-Message ($LocalizedData.TestStandardArgumentsPathWasPath -f $Path) - $uri = $null - try - { - $uri = [uri] $Path - } - catch - { - New-InvalidArgumentException ($LocalizedData.InvalidPath -f $Path) 'Path' - } - - if(-not @('file', 'http', 'https') -contains $uri.Scheme) - { - Trace-Message ($Localized.TheUriSchemeWasUriScheme -f $uri.Scheme) - New-InvalidArgumentException ($LocalizedData.InvalidPath -f $Path) 'Path' - } - - $pathExt = [System.IO.Path]::GetExtension($Path) - Trace-Message ($LocalizedData.ThePathExtensionWasPathExt -f $pathExt) - if(-not @('.msu') -contains $pathExt.ToLower()) - { - New-InvalidArgumentException ($LocalizedData.InvalidBinaryType -f $Path) 'Path' - } - - if(-not $Id) - { - New-InvalidArgumentException ($LocalizedData.NeedsMoreInfo -f $Path) 'Id' - } - else - { - if($Id -match 'kb[0-9]+') - { - if($Matches[0] -eq $id) - { - $kbId = $id.Substring(2) - } - else - { - New-InvalidArgumentException ($LocalizedData.InvalidIdFormat -f $Path) 'Id' - } - } - elseif($id -match '[0-9]+') - { - if($Matches[0] -eq $id) - { - $kbId = $id - } - else - { - New-InvalidArgumentException ($LocalizedData.InvalidIdFormat -f $Path) 'Id' - } - } - } - - return @($uri, $kbId) -} - - -function Test-WindowsUpdatePath -{ - <# - .SYNOPSIS - Validate path, if necessary, cache file and return the location to be accessed - #> - param( - [parameter(Mandatory = $true)] - [System.Uri] $uri, - - [pscredential] $Credential - ) - Set-StrictMode -Version latest - - if($uri.IsUnc) - { - $psdriveArgs = @{Name=([guid]::NewGuid());PSProvider='FileSystem';Root=(Split-Path $uri.LocalPath)} - if($Credential) - { - #We need to optionally include these and then splat the hash otherwise - #we pass a null for Credential which causes the cmdlet to pop a dialog up - $psdriveArgs['Credential'] = $Credential - } - - $psdrive = New-PSDrive @psdriveArgs - $Path = Join-Path $psdrive.Root (Split-Path -Leaf $uri.LocalPath) #Necessary? - } - elseif(@('http', 'https') -contains $uri.Scheme) - { - $scheme = $uri.Scheme - $outStream = $null - $responseStream = $null - - try - { - Trace-Message ($LocalizedData.CreatingCacheLocation) - - if(-not (Test-Path -PathType Container $CacheLocation)) - { - mkdir $CacheLocation | Out-Null - } - - $destName = Join-Path $CacheLocation (Split-Path -Leaf $uri.LocalPath) - - Trace-Message ($LocalizedData.NeedToDownloadFileFromSchemeDestinationWillBeDestName -f $scheme, $destName) - - try - { - Trace-Message ($LocalizedData.CreatingTheDestinationCacheFile) - $outStream = New-Object System.IO.FileStream $destName, 'Create' - } - catch - { - #Should never happen since we own the cache directory - Throw-TerminatingError ($LocalizedData.CouldNotOpenDestFile -f $destName) $_ - } - - try - { - Trace-Message ($LocalizedData.CreatingTheSchemeStream -f $scheme) - $request = [System.Net.WebRequest]::Create($uri) - Trace-Message ($LocalizedData.SettingDefaultCredential) - $request.Credentials = [System.Net.CredentialCache]::DefaultCredentials - if ($scheme -eq 'http') - { - Trace-Message ($LocalizedData.SettingAuthenticationLevel) - # default value is MutualAuthRequested, which applies to https scheme - $request.AuthenticationLevel = [System.Net.Security.AuthenticationLevel]::None - } - if ($scheme -eq 'https') - { - Trace-Message ($LocalizedData.IgnoringBadCertificates) - $request.ServerCertificateValidationCallBack = {$true} - } - Trace-Message ($LocalizedData.GettingTheSchemeResponseStream -f $scheme) - $responseStream = (([System.Net.HttpWebRequest]$request).GetResponse()).GetResponseStream() - } - catch - { - Trace-Message ($LocalizedData.ErrorOutString -f ($_ | Out-String)) - Throw-TerminatingError ($LocalizedData.CouldNotGetHttpStream -f $scheme, $Path) $_ - } - - try - { - Trace-Message ($LocalizedData.CopyingTheSchemeStreamBytesToTheDiskCache -f $scheme) - $responseStream.CopyTo($outStream) - $responseStream.Flush() - $outStream.Flush() - } - catch - { - Trace-Message ($LocalizedData.ErrorOutString -f ($_ | Out-String)) - Throw-TerminatingError ($LocalizedData.ErrorCopyingDataToFile -f $Path,$destName) $_ - } - } - finally - { - if($outStream) - { - $outStream.Close() - } - - if($responseStream) - { - $responseStream.Close() - } - } - Trace-Message ($LocalizedData.RedirectingPackagePathToCacheFileLocation) - $Path = $downloadedFileName = $destName - } - return $Path -} - -Export-ModuleMember -Function *-TargetResource - - - diff --git a/lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xWindowsUpdate/MSFT_xWindowsUpdate.schema.mof b/lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xWindowsUpdate/MSFT_xWindowsUpdate.schema.mof deleted file mode 100644 index f48ddfb4..00000000 --- a/lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xWindowsUpdate/MSFT_xWindowsUpdate.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ -[ClassVersion("1.0.0.0"), FriendlyName("xHotfix")] -class MSFT_xWindowsUpdate : OMI_BaseResource -{ - // We can have multiple versions of an update for a single ID, the indentifier is in the file, - // Therefore the file path should be the key - [key, Description("Specifies the path that contains the msu file for the hotfix installation.")] String Path; - [required, Description("Specifies the Hotfix ID.")] String Id; - [Write, Description("Specifies the location of the log that contains information from the installation.")] String Log; - [Write, Description("Specifies whether the hotfix needs to be installed or uninstalled."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; - [write, Description("Specifies the credential to use to authenticate to a UNC share if the path is on a UNC share."),EmbeddedInstance("MSFT_Credential")] string Credential; -}; - - diff --git a/lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xWindowsUpdateAgent/MSFT_xWindowsUpdateAgent.psm1 b/lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xWindowsUpdateAgent/MSFT_xWindowsUpdateAgent.psm1 deleted file mode 100644 index 2e0e97fd..00000000 --- a/lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xWindowsUpdateAgent/MSFT_xWindowsUpdateAgent.psm1 +++ /dev/null @@ -1,614 +0,0 @@ -Set-StrictMode -Version latest -$script:WuaSearchString = 'IsAssigned=1 and IsHidden=0 and IsInstalled=0' -function Get-WuaServiceManager -{ - return (New-Object -ComObject Microsoft.Update.ServiceManager) -} - -function Add-WuaService -{ - param( - [Parameter(Mandatory=$true)] - [string] - $ServiceId, - - [int] - $Flags = 7, - - [string] - $AuthorizationCabPath = [string]::Empty - - ) - - $wuaServiceManager = Get-WuaServiceManager - $wuaServiceManager.AddService2($ServiceId, $Flags, $AuthorizationCabPath) -} - -function Remove-WuaService -{ - param( - [Parameter(Mandatory=$true)] - [string] - $ServiceId - ) - - $wuaServiceManager = Get-WuaServiceManager - $wuaServiceManager.RemoveService($ServiceId) -} - -function Get-WuaSearchString -{ - param( - [switch] - $security, - [switch] - $optional, - [switch] - $important - ) - $securityCategoryId = "'0FA1201D-4330-4FA8-8AE9-B877473B6441'" - <# - - - - - - # invalid, would not install anything - not security and not optional and not important - #> - # security and optional and important - # not security and optional and important - if($optional -and $important) - { - # Installing everything not hidden and not already installed - return 'IsHidden=0 and IsInstalled=0' - } - # security and optional and not important - elseif ($security -and $optional) { - # or can only be used at the top most boolean expression - return "(IsAssigned=0 and IsHidden=0 and IsInstalled=0) or (CategoryIds contains $securityCategoryId and IsHidden=0 and IsInstalled=0)" - } - # security and not optional and important - elseif($security -and $important ){ - # Installing everything not hidden, - # not optional (optional are not assigned) and not already installed - return 'IsAssigned=1 and IsHidden=0 and IsInstalled=0' - } - elseif ($optional -and $important) { - # Installing everything not hidden, - # not optional (optional are not assigned) and not already installed - return 'IsHidden=0 and IsInstalled=0' - - } - # security and not optional and not important - elseif ($security) { - # Installing everything that is security and not hidden, - # and not already installed - return "CategoryIds contains $securityCategoryId and IsHidden=0 and IsInstalled=0" - } - # not security and not optional and important - elseif ($important) { - # Installing everything that is not hidden, - # is assigned (not optional) and not already installed - # not valid cannot do not contains or a boolean not - # Note important updates will include security updates - return "IsAssigned=1 and IsHidden=0 and IsInstalled=0" - } - # not security and optional and not important - elseif ($optional) { - # Installing everything that is not hidden, - # is not assigned (is optional) and not already installed - # not valid cannot do not contains or a boolean not - - # Note optional updates may include security updates - return "IsAssigned=0 and IsHidden=0 and IsInstalled=0" - } - - return "CategoryIds contains $securityCategoryId and IsHidden=0 and IsInstalled=0" - -} - -function Get-WuaAu -{ - return (New-Object -ComObject 'Microsoft.Update.AutoUpdate') -} - -function Get-WuaAuSettings -{ - return (Get-WuaAu).Settings -} - -function Get-WuaWrapper { - param( - [ScriptBlock] $tryBlock, - [object[]] $argumentList, - [Parameter(ParameterSetName='OneValue')] - [object] $ExceptionReturnValue = $null - ) - - try { - return Invoke-Command -ScriptBlock $tryBlock -NoNewScope -ArgumentList $argumentList - } - catch [System.Runtime.InteropServices.COMException] - { - switch($_.Exception.HResult) - { - # 0x8024001e -2145124322 WU_E_SERVICE_STOP Operation did not complete because the service or system was being shut down. wuerror.h - -2145124322 { - Write-Warning 'Got an error that WU service is stopping. Handling the error.' - return $ExceptionReturnValue - } - # 0x8024402c -2145107924 WU_E_PT_WINHTTP_NAME_NOT_RESOLVED Same as ERROR_WINHTTP_NAME_NOT_RESOLVED - the proxy server or target server name cannot be resolved. wuerror.h - -2145107924 { - # TODO: add retry for this error - Write-Warning 'Got an error that WU could not resolve the name of the update service. Handling the error.' - return $ExceptionReturnValue - } - # 0x8024401c -2145107940 WU_E_PT_HTTP_STATUS_REQUEST_TIMEOUT Same as HTTP status 408 - the server timed out waiting for the request. wuerror.h - -2145107940 { - # TODO: add retry for this error - Write-Warning 'Got an error a request timed out (http status 408 or equivalent) when WU was communicating with the update service. Handling the error.' - return $ExceptionReturnValue - } - # 0x8024402f -2145107921 WU_E_PT_ECP_SUCCEEDED_WITH_ERRORS External cab file processing completed with some errors. wuerror.h - -2145107921 { - # No retry needed - Write-Warning 'Got an error that CAB processing completed with some errors.' - return $ExceptionReturnValue - } - default { - throw - } - } - } -} - -function Get-WuaAuNotificationLevel -{ - return Get-WuaWrapper -tryBlock { - switch ((Get-WuaAuSettings).NotificationLevel) { - 0 { return 'Not Configured' } - 1 { return 'Disabled' } - 2 { return 'Notify before download' } - 3 { return 'Notify before installation' } - 4 { return 'Scheduled installation' } - default { return 'Reserved'} - } - } -ExceptionReturnValue [string]::Empty -} - -function Invoke-WuaDownloadUpdates -{ - param( - [Parameter(Mandatory=$true)] - [ValidateNotNullOrEmpty()] - [object] $UpdateCollection - ) - - $downloader = (Get-WuaSession).CreateUpdateDownloader() - $downloader.Updates = $UpdateCollection - - Write-Verbose -Message 'Downloading updates...' -Verbose - $downloadResult = $downloader.Download() -} - -function Invoke-WuaInstallUpdates -{ - param( - [Parameter(Mandatory=$true)] - [ValidateNotNullOrEmpty()] - [object] $UpdateCollection - ) - - $installer = (Get-WuaSession).CreateUpdateInstaller() - - $installer.Updates = $UpdateCollection - Write-Verbose -Message 'Installing updates...' -Verbose - $installResult = $installer.Install() -} - -function Set-WuaAuNotificationLevel -{ - param( - [ValidateSet('Not Configured','Disabled','Notify before download','Notify before installation','Scheduled installation','ScheduledInstallation')] - [string] - $notificationLevel - ) - $intNotificationLevel = Get-WuaAuNotificationLevelInt -notificationLevel $notificationLevel - - $settings = Get-WuaAuSettings - $settings.NotificationLevel = $intNotificationLevel - $settings.Save() -} - -function Get-WuaAuNotificationLevelInt { - param( - [ValidateSet('Not Configured','Disabled','Notify before download','Notify before installation','Scheduled installation','ScheduledInstallation')] - [string] - $notificationLevel - ) - $intNotificationLevel =0 - - switch -Regex ($notificationLevel) { - '^Not\s*Configured$' { $intNotificationLevel = 0 } - '^Disabled$' { $intNotificationLevel = 1 } - '^Notify\s*before\s*download$' { $intNotificationLevel = 2 } - '^Notify\s*before\s*installation$' { $intNotificationLevel = 3 } - '^Scheduled\s*installation$' { $intNotificationLevel = 4 } - default { throw 'Invalid notification level'} - } - - return $intNotificationLevel -} - -function Get-WuaSystemInfo -{ - return (New-Object -ComObject 'Microsoft.Update.SystemInfo') -} - -function Get-WuaRebootRequired -{ - return Get-WuaWrapper -tryBlock { - Write-Verbose -Message 'TryGet RebootRequired...' -Verbose - $rebootRequired = (Get-WuaSystemInfo).rebootRequired - Write-Verbose -Message "Got rebootRequired: $rebootRequired" -Verbose - return $rebootRequired - } -ExceptionReturnValue $true - -} -function Get-WuaSession -{ - return (New-Object -ComObject 'Microsoft.Update.Session') -} - -function get-WuaSearcher -{ - [cmdletbinding(DefaultParameterSetName='category')] - param( - [parameter(Mandatory = $true, ParameterSetName = 'searchString')] - [System.String] - $SearchString, - - [parameter(ParameterSetName = 'category')] - [ValidateSet("Security","Important","Optional")] - [AllowEmptyCollection()] - [AllowNull()] - [System.String[]] - $Category= @('Security') - - ) - - $memberSearchString = $SearchString - if($PSCmdlet.ParameterSetName -eq 'category') - { - $searchStringParams = @{} - foreach($CategoryItem in $Category) - { - $searchStringParams[$CategoryItem]=$true - } - $memberSearchString = (Get-WuaSearchString @searchStringParams) - } - - return Get-WuaWrapper -tryBlock { - param( - [parameter(Mandatory = $true)] - [System.String] - $memberSearchString - ) - Write-Verbose -Message "Searching for updating using: $memberSearchString" -Verbose - return ((Get-WuaSession).CreateUpdateSearcher()).Search($memberSearchString) - } -argumentList @($memberSearchString) -} - -function Test-SearchResult -{ - [CmdletBinding()] - [OutputType([bool])] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNull()] - [System.Object] - $SearchResult - ) - - if(!(@($SearchResult | get-member |Select-Object -ExpandProperty Name) -contains 'Updates')) - { - Write-Verbose 'Did not find updates on SearchResult' - return $false - } - if(!(@(Get-Member -InputObject $SearchResult.Updates |Select-Object -ExpandProperty Name) -contains 'Count')) - { - Write-Verbose 'Did not find count on updates on SearchResult' - return $false - } - return $true -} - -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Yes")] - [System.String] - $IsSingleInstance, - - [ValidateSet("Security","Important","Optional")] - [AllowEmptyCollection()] - [AllowNull()] - [System.String[]] - $Category= @('Security'), - - [ValidateSet("Disabled","ScheduledInstallation")] - [System.String] - $Notifications, - - [parameter(Mandatory = $true)] - [ValidateSet("WindowsUpdate","MicrosoftUpdate","WSUS")] - [System.String] - $Source, - - [bool] - $UpdateNow = $false - ) - - Test-TargetResourceProperties @PSBoundParameters - $totalUpdatesNotInstalled = $null - $UpdateNowReturn = $null - $rebootRequired = $null - if($UpdateNow) - { - $rebootRequired = Get-WuaRebootRequired - $SearchResult = (get-WuaSearcher -Category $Category) - $totalUpdatesNotInstalled = 0 - if($SearchResult -and (Test-SearchResult -SearchResult $SearchResult)) - { - $totalUpdatesNotInstalled = $SearchResult.Updates.Count - } - $UpdateNowReturn = $false - if($totalUpdatesNotInstalled -eq 0 -and !$rebootRequired) - { - $UpdateNowReturn = $true - } - } - - $notificationLevel = (Get-WuaAuNotificationLevel) - - - $CategoryReturn = $Category - - $SourceReturn = 'WindowsUpdate' - $UpdateServices = (Get-WuaServiceManager).Services - #Check if the microsoft update service is registered - $defaultService = @($UpdateServices).where{$_.IsDefaultAuService} - Write-Verbose -Message "Get default search service: $($defaultService.ServiceId)" - if($defaultService.ServiceId -eq '7971f918-a847-4430-9279-4a52d1efe18d') - { - $SourceReturn = 'MicrosoftUpdate' - } - elseif ($defaultService.IsManaged) { - $SourceReturn = 'WSUS' - } - - $returnValue = @{ - IsSingleInstance = 'Yes' - Category = $CategoryReturn - AutomaticUpdatesNotificationSetting = $notificationLevel - TotalUpdatesNotInstalled = $totalUpdatesNotInstalled - RebootRequired = $rebootRequired - Notifications = $notificationLevel - Source = $SourceReturn - UpdateNow = $UpdateNowReturn - } - $returnValue -} - - -function Set-TargetResource -{ - # should be [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidGlobalVars", "DSCMachineStatus")], but it doesn't work - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidGlobalVars", "")] - [CmdletBinding(SupportsShouldProcess=$true)] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Yes")] - [System.String] - $IsSingleInstance, - - [ValidateSet("Security","Important","Optional")] - [System.String[]] - $Category= @('Security'), - - [ValidateSet("Disabled","ScheduledInstallation")] - [System.String] - $Notifications, - - [parameter(Mandatory = $true)] - [ValidateSet("WindowsUpdate","MicrosoftUpdate","WSUS")] - [System.String] - $Source, - - [bool] - $UpdateNow = $false - ) - - Test-TargetResourceProperties @PSBoundParameters - - $Get = Get-TargetResource @PSBoundParameters - - $updateCompliant = ($UpdateNow -eq $false -or $Get.UpdateNow -eq $UpdateNow) - Write-Verbose "updateNow compliant: $updateCompliant" - $notificationCompliant = (!$Notifications -or $Notifications -eq $Get.Notifications) - Write-Verbose "notifications compliant: $notificationCompliant" - $SourceCompliant = (!$Source -or $Source -eq $Get.Source) - Write-Verbose "service compliant: $notificationCompliant" - - If(!$updateCompliant -and $PSCmdlet.ShouldProcess("Install Updates")) - { - $SearchResult = (get-WuaSearcher -Category $Category) - if($SearchResult -and $SearchResult.Updates.Count -gt 0) - { - Write-Verbose -Verbose -Message 'Installing updates...' - #Write Results - foreach($update in $SearchResult.Updates) - { - $title = $update.Title - Write-Verbose -Message "Found update: $Title" -Verbose - } - - Invoke-WuaDownloadUpdates -UpdateCollection $SearchResult.Updates - - Invoke-WuaInstallUpdates -UpdateCollection $SearchResult.Updates - - - } - else - { - Write-Verbose -Verbose -Message 'No updates' - } - Write-Verbose -Verbose -Message 'Checking for a reboot...' - $rebootRequired = (Get-WuaRebootRequired) - if($rebootRequired) - { - Write-Verbose -Verbose -Message 'A reboot was required' - $global:DSCMachineStatus = 1 - } - else { - Write-Verbose -Verbose -Message 'A reboot was NOT required' - } - } - - If(!$notificationCompliant -and $PSCmdlet.ShouldProcess("Set notifications to: $notifications")) - { - Try - { - #TODO verify that group policy is not overriding this settings - # if it is throw an error, if it conflicts - Set-WuaAuNotificationLevel -notificationLevel $Notifications - } - Catch - { - $ErrorMsg = $_.Exception.Message - Write-Verbose $ErrorMsg - } - } - - If(!$SourceCompliant ) - { - if($Source -eq 'MicrosoftUpdate' -and $PSCmdlet.ShouldProcess("Enable Microsoft Update Service")) - { - Write-Verbose "Enable the Microsoft Update setting" - Add-WuaService -ServiceId '7971f918-a847-4430-9279-4a52d1efe18d' - Restart-Service wuauserv -ErrorAction SilentlyContinue - } - elseif($PSCmdlet.ShouldProcess("Disable Microsoft Update Service")) { - Write-Verbose "Disable the Microsoft Update setting" - Remove-WuaService -ServiceId '7971f918-a847-4430-9279-4a52d1efe18d' - } - - } -} - - -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Yes")] - [System.String] - $IsSingleInstance, - - [ValidateSet("Security","Important","Optional")] - [System.String[]] - $Category= @('Security'), - - [ValidateSet("Disabled","ScheduledInstallation")] - [System.String] - $Notifications, - - [parameter(Mandatory = $true)] - [ValidateSet("WindowsUpdate","MicrosoftUpdate","WSUS")] - [System.String] - $Source, - - [bool] - $UpdateNow = $false - ) - - Test-TargetResourceProperties @PSBoundParameters - #Output the result of Get-TargetResource function. - $Get = Get-TargetResource @PSBoundParameters - - $updateCompliant = ($UpdateNow -eq $false -or $Get.UpdateNow -eq $UpdateNow) - Write-Verbose "updateNow compliant: $updateCompliant" - $notificationCompliant = (!$Notifications -or $Notifications -eq $Get.Notifications) - Write-Verbose "notifications compliant: $notificationCompliant" - $SourceCompliant = (!$Source -or $Source -eq $Get.Source) - Write-Verbose "service compliant: $notificationCompliant" - If($updateCompliant -and $notificationCompliant -and $SourceCompliant) - { - return $true - } - Else - { - return $false - } -} - -function Test-TargetResourceProperties -{ - param - ( - [parameter(Mandatory = $true)] - [ValidateSet("Yes")] - [System.String] - $IsSingleInstance, - - [ValidateSet("Security","Important","Optional")] - [AllowEmptyCollection()] - [AllowNull()] - [System.String[]] - $Category, - - [ValidateSet("Disabled","ScheduledInstallation")] - [System.String] - $Notifications, - - [parameter(Mandatory = $true)] - [ValidateSet("WindowsUpdate","MicrosoftUpdate","WSUS")] - [System.String] - $Source, - - [bool] - $UpdateNow - ) - $searchStringParams = @{} - foreach($CategoryItem in $Category) - { - $searchStringParams[$CategoryItem.ToLowerInvariant()]=$true - } - - if($UpdateNow -and (!$Category -or $Category.Count -eq 0)) - { - Write-Warning 'Defaulting to updating to security updates only. Please specify Category to avoid this warning.' - } - elseif ($searchStringParams.ContainsKey('important') -and !$searchStringParams.ContainsKey('security') ) { - Write-Warning "Important updates will include security updates. Please include Security in category to avoid this warning." - } - elseif ($searchStringParams.ContainsKey('optional') -and !$searchStringParams.ContainsKey('security') ) { - Write-Verbose "Optional updates may include security updates." - } - - if($Source -eq 'WSUS') - { - throw 'The WSUS service option is not implemented.' - } -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xWindowsUpdateAgent/MSFT_xWindowsUpdateAgent.schema.mof b/lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xWindowsUpdateAgent/MSFT_xWindowsUpdateAgent.schema.mof deleted file mode 100644 index cf5543f4..00000000 --- a/lib/puppet_x/dsc_resources/xWindowsUpdate/DscResources/MSFT_xWindowsUpdateAgent/MSFT_xWindowsUpdateAgent.schema.mof +++ /dev/null @@ -1,17 +0,0 @@ - -[ClassVersion("0.1.0.0"), FriendlyName("xWindowsUpdateAgent")] -class MSFT_xWindowsUpdateAgent : OMI_BaseResource -{ - [Key, Description("Specifies the resource is a single instance, the value must be 'Yes'"), ValueMap{"Yes"}, Values{"Yes"}] String IsSingleInstance; - [write, Description("Indicates if the resource should ensure all Windows Updates are installed or if Automatic updates should be disabled."), ValueMap{"Security","Important","Optional"}, - Values{"Security","Important","Optional"}] String Category[]; - [Write, Description("Indicates if Windows update agent should notify about updates, see:https://msdn.microsoft.com/en-us/library/windows/desktop/aa385806%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396."), - ValueMap{"Disabled","ScheduledInstallation"}, - Values{"Disabled","ScheduledInstallation"}] String Notifications; - [Required, Description("Indicates which source service Windows update agent should use. Note: WSUS is not implemented in this resource."), ValueMap{"WindowsUpdate","MicrosoftUpdate","WSUS"}, - Values{"WindowsUpdate","MicrosoftUpdate","WSUS"}] String Source; - [Write, Description("Indicates if the resource should trigger an update during consistency.")] boolean UpdateNow; - [Read, Description("Automatic Updates Notification Setting")] String AutomaticUpdatesNotificationSetting; - [Read, Description("Count of updates not installed. Only returned if UpdateNow is specified.")] uint32 TotalUpdatesNotInstalled; - [Read, Description("Indicates if Wua Requires a reboot. Only returned if UpdateNow is specified.")] boolean RebootRequired; -}; diff --git a/lib/puppet_x/dsc_resources/xWindowsUpdate/LICENSE b/lib/puppet_x/dsc_resources/xWindowsUpdate/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xWindowsUpdate/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xWindowsUpdate/xWindowsUpdate.psd1 b/lib/puppet_x/dsc_resources/xWindowsUpdate/xWindowsUpdate.psd1 deleted file mode 100644 index f0693d33..00000000 --- a/lib/puppet_x/dsc_resources/xWindowsUpdate/xWindowsUpdate.psd1 +++ /dev/null @@ -1,60 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '2.7.0.0' - -# ID used to uniquely identify this module -GUID = 'a9cba250-ea73-4d82-b31b-7e58cc50ffd1' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module with DSC Resources for Windows Update' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/xWindowsUpdate/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/xWindowsUpdate' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* xWindowsUpdateAgent: Fix Get-TargetResource returning incorrect key - -' - - } # End of PSData hashtable - -} # End of PrivateData hashtable -} - - - diff --git a/lib/puppet_x/dsc_resources/xWordPress/DscResources/MSFT_xWordPressSite/MSFT_xWordPressSite.psm1 b/lib/puppet_x/dsc_resources/xWordPress/DscResources/MSFT_xWordPressSite/MSFT_xWordPressSite.psm1 deleted file mode 100644 index ea577a06..00000000 --- a/lib/puppet_x/dsc_resources/xWordPress/DscResources/MSFT_xWordPressSite/MSFT_xWordPressSite.psm1 +++ /dev/null @@ -1,156 +0,0 @@ -data LocalizedData -{ - # culture="en-US" - ConvertFrom-StringData @' -WordPressInstallationSiteNotFound=Not able to connect to wordpress site using {0}. -WordPressInstallationFailed=Request to connect to wordpress site failed. Returned Status Code is {0], Description is {1}. -'@ -} - -$Debug = $true -Function Trace-Message -{ - param([string] $Message) - if($Debug) - { - Write-Verbose $Message - } -} - -# The Get-TargetResource cmdlet is used to fetch the status of role or Website on the target machine. -# It gives the Website info of the requested role/feature on the target machine. -function Get-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Uri, - - [parameter(Mandatory = $true)] - [System.String] - $Title, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AdministratorCredential, - - [parameter(Mandatory = $true)] - [System.String] - $AdministratorEmail - ) - - $Ensure = "Absent" - try - { - $response = Invoke-WebRequest -UseBasicParsing -Uri $Uri - if(-not ($response.Content -like "*WordPress › Installation*")) - { - $Ensure = "Present" - } - } - catch - { - Write-Verbose ($($LocalizedData.WordPressInstallationSiteNotFound) -f ${Uri}) - return $false - } - - $getTargetResourceResult = @{ - Uri = $Uri - Ensure = $Ensure - Title = $Title - AdministratorEmail = $AdministratorCredential - } - - return $getTargetResourceResult; -} - - -# The Set-TargetResource cmdlet is used to create, delete or configuure a website on the target machine. -function Set-TargetResource -{ - [CmdletBinding(SupportsShouldProcess=$true)] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Uri, - - [parameter(Mandatory = $true)] - [System.String] - $Title, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AdministratorCredential, - - [parameter(Mandatory = $true)] - [System.String] - $AdministratorEmail, - - [ValidateSet("Present", "Absent")] - [string]$Ensure = "Present" - ) - - if((Test-TargetResource @psboundparameters)) - { - return - } - - $status = Get-TargetResource @psboundparameters - Trace-Message "Get Wordpress site resource completed." - - $result = Invoke-WebRequest -UseBasicParsing -Uri "$Uri/wp-admin/install.php?step=2" -Method Post -Body "weblog_title=$Title&user_name=$($AdministratorCredential.UserName)&admin_password=$($AdministratorCredential.GetNetworkCredential().Password)&admin_password2=$($AdministratorCredential.GetNetworkCredential().Password)&admin_email=$AdministratorEmail&Submit=Install+WordPress" - - if ($result.StatusCode -ne 200) - { - Write-Verbose ($($LocalizedData.WordPressInstallationFailed) -f $result.StatusCode, $result.StatusDescription) - } -} - - -# The Test-TargetResource cmdlet is used to validate if the role or feature is in a state as expected in the instance document. -function Test-TargetResource -{ - [CmdletBinding()] - [OutputType([System.Boolean])] - param - ( - [parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [System.String] - $Uri, - - [parameter(Mandatory = $true)] - [System.String] - $Title, - - [parameter(Mandatory = $true)] - [System.Management.Automation.PSCredential] - $AdministratorCredential, - - [parameter(Mandatory = $true)] - [System.String] - $AdministratorEmail, - - [ValidateSet("Present", "Absent")] - [string]$Ensure = "Present" ) - - $handlerState = Get-TargetResource @psboundparameters - - if($handlerState.Ensure -eq "Present" ) - { - return $true - } - else - { - return $false - } - -} - -Export-ModuleMember -Function *-TargetResource diff --git a/lib/puppet_x/dsc_resources/xWordPress/DscResources/MSFT_xWordPressSite/MSFT_xWordPressSite.schema.mof b/lib/puppet_x/dsc_resources/xWordPress/DscResources/MSFT_xWordPressSite/MSFT_xWordPressSite.schema.mof deleted file mode 100644 index 267491f6..00000000 --- a/lib/puppet_x/dsc_resources/xWordPress/DscResources/MSFT_xWordPressSite/MSFT_xWordPressSite.schema.mof +++ /dev/null @@ -1,13 +0,0 @@ - -[ClassVersion("1.0.0"), FriendlyName("xWordPressSite")] -class MSFT_xWordPressSite : OMI_BaseResource -{ - [Key, Description("The WordPress Site URI.")] String Uri; - [Required, Description("The WordPress Site Default page title.")] String Title; - [Required, EmbeddedInstance("MSFT_Credential"), Description("The username and password of the WordPress administrator to create when creating the site.")] String AdministratorCredential; - [Required, Description("The email address of the WordPress administrator to create.")] String AdministratorEmail; - [Write, Description("Should the module be present or absent."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; -}; - - - diff --git a/lib/puppet_x/dsc_resources/xWordPress/DscResources/MSFT_xWordPressSite/xWordPressSite.ps1 b/lib/puppet_x/dsc_resources/xWordPress/DscResources/MSFT_xWordPressSite/xWordPressSite.ps1 deleted file mode 100644 index ce933462..00000000 --- a/lib/puppet_x/dsc_resources/xWordPress/DscResources/MSFT_xWordPressSite/xWordPressSite.ps1 +++ /dev/null @@ -1,55 +0,0 @@ -# Sample script to create the template or update the Wordpress Resource - -# Resource Details -# Friendly name of the resource: -$friendlyName = "xWordPressSite" -# Name of the resource: -$resourceName = "MSFT_$friendlyName" -# Class Version of the resource: -$classVersion = "1.0.0" - - -# Various Paths -$diff = join-Path ${env:ProgramFiles(x86)} "Beyond compare 2\bc2.exe" -$scriptRoot = Split-Path $MyInvocation.MyCommand.Path -$originalModuleRoot = join-Path $scriptroot "..\.." -$originalModuleRootPath = Resolve-Path $originalModuleRoot -$moduleRoot = Join-Path $env:temp "$($originalModuleRootPath.path | split-path -Leaf)Temp" - -$resources = @() -$schemaPath = (join-path $scriptRoot "$resourceName.schema.mof") - -#Key properties -$resources += New-xDscResourceProperty -Name Uri -Type String -Attribute Key -Description "The WordPress Site URI." - - -#Required Properites -$resources += New-xDscResourceProperty -Name Title -Type String -Attribute Required -Description "The WordPress Site Default page title." -$resources += New-xDscResourceProperty -Name AdministratorCredential -Type PSCredential -Attribute Required -Description "The username and password of the WordPress administrator to create when creating the site." -$resources += New-xDscResourceProperty -Name AdministratorEmail -Type String -Attribute Required -Description "The email address of the WordPress administrator to create." - -#Write Properties -$resources += New-xDscResourceProperty -Name Ensure -Type String -Attribute Write -Description "Currenly only Present is allowed." -ValidateSet @("Present") - -#Read Properties -#$resources += New-xDscResourceProperty -Name EndPointSetup -Type Boolean -Attribute Read -Description "The End Point is setup. Such as a Fast Cgi endpoint." - - - -Write-Host updating... - -# Create a New template resource to a temporary folder -New-xDscResource -Property $resources -ClassVersion $classVersion -Name $resourceName -Path $moduleRoot -FriendlyName $friendlyName - - -# Use your favorite diff program to compare and merge the current resource and the existing resource -if((test-Path $diff)) -{ - &$diff $originalModuleRoot $moduleRoot -} -else -{ - Write-Warning "Diff propgram not found!`r`nUse your favorite diff program to compare and merge:`r`n `t$($originalModuleRootPath.path)`r`n and:`r`n `t$moduleRoot" -} - - diff --git a/lib/puppet_x/dsc_resources/xWordPress/DscResources/xIisWordPressSite/xIisWordPressSite.Schema.psm1 b/lib/puppet_x/dsc_resources/xWordPress/DscResources/xIisWordPressSite/xIisWordPressSite.Schema.psm1 deleted file mode 100644 index 6009fbfe..00000000 --- a/lib/puppet_x/dsc_resources/xWordPress/DscResources/xIisWordPressSite/xIisWordPressSite.Schema.psm1 +++ /dev/null @@ -1,84 +0,0 @@ -# Composite configuration to install the IIS WordPress IIS site -# This does not setup the actual WordPress Site -configuration xIisWordPressSite -{ - param - ( - [Parameter(Mandatory = $true)] - [string] $DestinationPath, - - [Parameter(Mandatory = $true)] - [string] $DownloadUri, - - [Parameter(Mandatory = $true)] - [string] $PackageFolder, - - [Parameter(Mandatory = $true)] - [string] $Configuration - ) - - [string] $BinaryFolder = Join-Path $DestinationPath "WordPress" - - # Make sure the WordPress site folder is present - File WordPressFolder - { - DestinationPath = $BinaryFolder - Type = "Directory" - Ensure = "Present" - - } - - # Make sure the default IIS does not interfere with the WordPress site - # Should be removed once WordPress site launches by it is own URL and not using iis default url - xWebSite DefaultIisSite - { - Name = "Default Web Site" - PhysicalPath = "$env:SystemDrive\inetpub\wwwroot" - Ensure = "Present" - State = "Started" - BindingInfo = MSFT_xWebBindingInformation - { - Protocol = "HTTP" - Port = 9090 - } - } - - # Make sure the WordPress Iis site is present - xWebSite WordPressIisSite - { - Name = "WordPress" - PhysicalPath = $BinaryFolder - Ensure = "Present" - State = "Started" - DefaultPage = @("index.php") - DependsOn = @("[File]WordPressFolder","[xWebSite]DefaultIisSite") - } - - $WordPressZip = Join-Path $PackageFolder "WordPress.zip" - # Make sure the WordPress archive is in the package folder - xRemoteFile WordPressArchive - { - Uri = $DownloadUri - DestinationPath = $WordPressZip - } - - # Make sure the WordPress archive contents are in the WordPress root folder - xArchive WordPress - { - Path = $WordPressZip - Destination = $DestinationPath - DependsOn = @("[xRemoteFile]WordPressArchive","[File]WordPressFolder") - } - - # Make sure the WordPress configuration file is present - File WordPressConfig - { - Contents = $Configuration - DestinationPath = (Join-Path $BinaryFolder "wp-config.php") - DependsOn = @("[xArchive]WordPress") - MatchSource = $true - } -} - - - diff --git a/lib/puppet_x/dsc_resources/xWordPress/DscResources/xIisWordPressSite/xIisWordPressSite.psd1 b/lib/puppet_x/dsc_resources/xWordPress/DscResources/xIisWordPressSite/xIisWordPressSite.psd1 deleted file mode 100644 index a504c2bc..00000000 --- a/lib/puppet_x/dsc_resources/xWordPress/DscResources/xIisWordPressSite/xIisWordPressSite.psd1 +++ /dev/null @@ -1,96 +0,0 @@ -# -# Module manifest for module 'xIisWordPressSite' -# -# Generated on: 6/23/2014 -# - -@{ - -# Script module or binary module file associated with this manifest. -RootModule = 'xIisWordPressSite.Schema.psm1' - -# Version number of this module. -ModuleVersion = '1.0' - -# ID used to uniquely identify this module -GUID = 'af68428d-cfd6-41f3-9521-874614eb6d50' - -# Author of this module -Author = 'Microsoft Coropration' - -# Company or vendor of this module -CompanyName = 'Microsoft Coropration' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Coropration. All rights reserved.' - -# Description of the functionality provided by this module -# Description = '' - -# Minimum version of the Windows PowerShell engine required by this module -# PowerShellVersion = '' - -# Name of the Windows PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the Windows PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module -# DotNetFrameworkVersion = '' - -# Minimum version of the common language runtime (CLR) required by this module -# CLRVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -# RequiredModules = @() - -# Assemblies that must be loaded prior to importing this module -# RequiredAssemblies = @() - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -# FormatsToProcess = @() - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -# NestedModules = @() - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Variables to export from this module -VariablesToExport = '*' - -# Aliases to export from this module -AliasesToExport = '*' - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess -# PrivateData = '' - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - -} - - - diff --git a/lib/puppet_x/dsc_resources/xWordPress/LICENSE b/lib/puppet_x/dsc_resources/xWordPress/LICENSE deleted file mode 100644 index 567fd6a5..00000000 --- a/lib/puppet_x/dsc_resources/xWordPress/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/lib/puppet_x/dsc_resources/xWordPress/xWordPress.psd1 b/lib/puppet_x/dsc_resources/xWordPress/xWordPress.psd1 deleted file mode 100644 index bd96e31e..00000000 --- a/lib/puppet_x/dsc_resources/xWordPress/xWordPress.psd1 +++ /dev/null @@ -1,36 +0,0 @@ -@{ -# Version number of this module. -ModuleVersion = '1.1.0.0' - -# ID used to uniquely identify this module -GUID = 'f7a98e58-27fd-4fc8-8467-ae28bfc6cf63' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '(c) 2014 Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Module with DSC Resources for configuring WordPress' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion = '4.0' - -# Script module or binary module file associated with this manifest. -#RootModule = '' - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' -} - - From 548e928225e88b6ba9cafb29b24f124ea1d5c338 Mon Sep 17 00:00:00 2001 From: James Pogran Date: Wed, 1 Nov 2017 12:00:11 -0400 Subject: [PATCH 03/10] (MODULES-5839) Remove miscellaneous files This commit removes all the files needed to build types in the old dsc module. --- README_BUILD.md | 120 - README_CENTOS6.md | 40 - build/dsc.rake | 331 -- build/dsc.rb | 32 - build/dsc.yaml | 6 - build/dsc/manager.rb | 324 -- build/dsc/mof.rb | 87 - build/dsc/property.rb | 129 - build/dsc/psmodule.rb | 51 - build/dsc/resource.rb | 198 - build/dsc/templates/dsc_type.rb.erb | 269 - build/dsc/templates/dsc_type_spec.rb.erb | 340 -- build/dsc/templates/pso_pscrendential.ps1.erb | 2 - build/dsc/version.rb | 3 - build/qualifiers/base/MSFT_Qualifiers.mof | 12 - .../Application/CIM_AGPSoftwareFeature.mof | 41 - .../dmtf_mof/Application/CIM_Action.mof | 167 - .../Application/CIM_ActionSequence.mof | 45 - .../Application/CIM_ApplicationSystem.mof | 230 - .../CIM_ApplicationSystemDependency.mof | 33 - .../CIM_ApplicationSystemDirectory.mof | 91 - .../CIM_ApplicationSystemHierarchy.mof | 31 - .../CIM_ApplicationSystemSoftwareFeature.mof | 25 - .../Application/CIM_ArchitectureCheck.mof | 243 - ..._AssociatedAppSystemOverviewStatistics.mof | 28 - .../dmtf_mof/Application/CIM_BIOSElement.mof | 76 - .../dmtf_mof/Application/CIM_BIOSFeature.mof | 56 - .../CIM_BIOSFeatureBIOSElements.mof | 24 - .../vendor/dmtf_mof/Application/CIM_Check.mof | 177 - .../CIM_CollectedSoftwareElements.mof | 28 - .../CIM_CollectedSoftwareFeatures.mof | 28 - .../Application/CIM_CopyFileAction.mof | 35 - .../Application/CIM_CreateDirectoryAction.mof | 15 - .../CIM_DiagnosticTestSoftware.mof | 37 - .../Application/CIM_DirectoryAction.mof | 21 - .../CIM_DirectorySpecification.mof | 44 - .../CIM_DirectorySpecificationFile.mof | 23 - .../Application/CIM_DiskSpaceCheck.mof | 26 - .../Application/CIM_ExecuteProgram.mof | 25 - .../CIM_FRUIncludesSoftwareFeature.mof | 43 - .../dmtf_mof/Application/CIM_FileAction.mof | 16 - .../Application/CIM_FileSpecification.mof | 62 - .../Application/CIM_FromDirectoryAction.mof | 26 - .../CIM_FromDirectorySpecification.mof | 26 - .../Application/CIM_InstalledProduct.mof | 75 - .../Application/CIM_InstalledProductImage.mof | 27 - .../CIM_InstalledSoftwareElement.mof | 26 - .../Application/CIM_J2eeAppClientModule.mof | 15 - .../Application/CIM_J2eeApplication.mof | 32 - .../CIM_J2eeApplicationHostedOnServer.mof | 24 - .../Application/CIM_J2eeApplicationModule.mof | 25 - ...onnectionFactoryAvailableToJCAResource.mof | 29 - .../CIM_J2eeConnectionPoolStats.mof | 121 - .../Application/CIM_J2eeConnectionStats.mof | 79 - .../Application/CIM_J2eeDeployedObject.mof | 36 - .../dmtf_mof/Application/CIM_J2eeDomain.mof | 25 - .../dmtf_mof/Application/CIM_J2eeEJB.mof | 28 - .../Application/CIM_J2eeEJBInModule.mof | 26 - .../Application/CIM_J2eeEJBModule.mof | 15 - .../dmtf_mof/Application/CIM_J2eeEJBStats.mof | 29 - .../Application/CIM_J2eeEntityBean.mof | 14 - .../Application/CIM_J2eeEntityBeanStats.mof | 55 - .../CIM_J2eeJCAConnectionFactory.mof | 31 - ...nectionFactoryManagedConnectionFactory.mof | 25 - .../CIM_J2eeJCAConnectionPools.mof | 24 - .../CIM_J2eeJCAManagedConnectionFactory.mof | 32 - .../CIM_J2eeJCANonpooledConnections.mof | 24 - .../Application/CIM_J2eeJCAResource.mof | 13 - .../dmtf_mof/Application/CIM_J2eeJCAStats.mof | 15 - .../CIM_J2eeJDBCConnectionPools.mof | 24 - .../Application/CIM_J2eeJDBCDataSource.mof | 30 - .../CIM_J2eeJDBCDataSourceDriver.mof | 24 - .../Application/CIM_J2eeJDBCDriver.mof | 30 - .../CIM_J2eeJDBCNonpooledConnections.mof | 24 - .../Application/CIM_J2eeJDBCResource.mof | 15 - .../CIM_J2eeJDBCResourceUsesDataSource.mof | 29 - .../Application/CIM_J2eeJDBCStats.mof | 15 - .../CIM_J2eeJMSConnectionSessions.mof | 25 - .../CIM_J2eeJMSConnectionStats.mof | 23 - .../Application/CIM_J2eeJMSConsumerStats.mof | 21 - .../Application/CIM_J2eeJMSEndpointStats.mof | 62 - .../Application/CIM_J2eeJMSProducerStats.mof | 22 - .../Application/CIM_J2eeJMSResource.mof | 13 - .../CIM_J2eeJMSSessionConsumers.mof | 25 - .../CIM_J2eeJMSSessionProducers.mof | 25 - .../Application/CIM_J2eeJMSSessionStats.mof | 65 - .../CIM_J2eeJMSStatConnections.mof | 25 - .../dmtf_mof/Application/CIM_J2eeJMSStats.mof | 15 - .../Application/CIM_J2eeJNDIResource.mof | 15 - .../Application/CIM_J2eeJTAResource.mof | 15 - .../dmtf_mof/Application/CIM_J2eeJTAStats.mof | 30 - .../dmtf_mof/Application/CIM_J2eeJVM.mof | 53 - .../dmtf_mof/Application/CIM_J2eeJVMStats.mof | 53 - .../Application/CIM_J2eeJavaMailResource.mof | 14 - .../Application/CIM_J2eeJavaMailStats.mof | 20 - .../Application/CIM_J2eeManagedObject.mof | 105 - .../CIM_J2eeManagedObjectCapabilities.mof | 77 - .../Application/CIM_J2eeMessageDrivenBean.mof | 14 - .../CIM_J2eeMessageDrivenBeanStats.mof | 20 - .../dmtf_mof/Application/CIM_J2eeModule.mof | 16 - .../Application/CIM_J2eeModuleUsesJVM.mof | 24 - .../Application/CIM_J2eeNotification.mof | 89 - .../Application/CIM_J2eeRMI_IIOPResource.mof | 14 - .../dmtf_mof/Application/CIM_J2eeResource.mof | 38 - .../Application/CIM_J2eeResourceAdapter.mof | 28 - .../CIM_J2eeResourceAdapterInModule.mof | 29 - .../CIM_J2eeResourceAdapterModule.mof | 15 - .../Application/CIM_J2eeResourceOnServer.mof | 26 - .../dmtf_mof/Application/CIM_J2eeServer.mof | 34 - .../Application/CIM_J2eeServerInDomain.mof | 27 - .../Application/CIM_J2eeServerUsesJVM.mof | 26 - .../dmtf_mof/Application/CIM_J2eeServlet.mof | 27 - .../Application/CIM_J2eeServletInModule.mof | 26 - .../Application/CIM_J2eeServletStats.mof | 45 - .../Application/CIM_J2eeSessionBean.mof | 15 - .../Application/CIM_J2eeSessionBeanStats.mof | 36 - .../CIM_J2eeStatefulSessionBean.mof | 15 - .../CIM_J2eeStatefulSessionBeanStats.mof | 35 - .../CIM_J2eeStatelessSessionBean.mof | 15 - .../CIM_J2eeStatelessSessionBeanStats.mof | 16 - .../Application/CIM_J2eeStatistic.mof | 59 - .../Application/CIM_J2eeURLResource.mof | 13 - .../dmtf_mof/Application/CIM_J2eeURLStats.mof | 18 - .../Application/CIM_J2eeWebModule.mof | 15 - .../dmtf_mof/Application/CIM_MemoryCheck.mof | 25 - .../Application/CIM_ModifySettingAction.mof | 49 - .../Application/CIM_OSVersionCheck.mof | 51 - .../CIM_OperatingSystemSoftwareFeature.mof | 25 - .../CIM_ProductSoftwareFeatures.mof | 23 - .../dmtf_mof/Application/CIM_RebootAction.mof | 15 - .../Application/CIM_RemoveDirectoryAction.mof | 21 - .../Application/CIM_RemoveFileAction.mof | 17 - .../dmtf_mof/Application/CIM_SettingCheck.mof | 43 - .../Application/CIM_SoftwareElement.mof | 201 - .../CIM_SoftwareElementActions.mof | 24 - .../Application/CIM_SoftwareElementChecks.mof | 34 - .../CIM_SoftwareElementComponent.mof | 26 - .../CIM_SoftwareElementSAPImplementation.mof | 57 - ...M_SoftwareElementServiceImplementation.mof | 55 - .../CIM_SoftwareElementVersionCheck.mof | 119 - .../Application/CIM_SoftwareFeature.mof | 63 - .../CIM_SoftwareFeatureComponent.mof | 25 - .../CIM_SoftwareFeatureSAPImplementation.mof | 33 - ...M_SoftwareFeatureServiceImplementation.mof | 32 - .../CIM_SoftwareFeatureSoftwareElements.mof | 25 - .../CIM_StatisticalRuntimeOverview.mof | 66 - .../Application/CIM_SwapSpaceCheck.mof | 26 - .../dmtf_mof/Application/CIM_SystemBIOS.mof | 24 - .../Application/CIM_ToDirectoryAction.mof | 26 - .../CIM_ToDirectorySpecification.mof | 26 - .../CIM_VersionCompatibilityCheck.mof | 35 - .../Application/CIM_VideoBIOSElement.mof | 34 - .../Application/CIM_VideoBIOSFeature.mof | 47 - .../CIM_VideoBIOSFeatureVideoBIOSElements.mof | 25 - .../dmtf_mof/Core/CIM_ActiveConnection.mof | 79 - .../vendor/dmtf_mof/Core/CIM_ActsAsSpare.mof | 37 - .../vendor/dmtf_mof/Core/CIM_AdminDomain.mof | 51 - .../Core/CIM_AllocationCapabilities.mof | 104 - .../CIM_AssociatedPowerManagementService.mof | 188 - build/vendor/dmtf_mof/Core/CIM_BasedOn.mof | 61 - build/vendor/dmtf_mof/Core/CIM_BindsTo.mof | 34 - .../vendor/dmtf_mof/Core/CIM_Capabilities.mof | 64 - .../Core/CIM_CollectedCollections.mof | 25 - .../dmtf_mof/Core/CIM_CollectedMSEs.mof | 25 - build/vendor/dmtf_mof/Core/CIM_Collection.mof | 16 - .../Core/CIM_CollectionConfiguration.mof | 45 - .../dmtf_mof/Core/CIM_CollectionOfMSEs.mof | 47 - .../dmtf_mof/Core/CIM_CollectionSetting.mof | 26 - .../dmtf_mof/Core/CIM_CompatibleProduct.mof | 34 - build/vendor/dmtf_mof/Core/CIM_Component.mof | 23 - .../dmtf_mof/Core/CIM_ConcreteCollection.mof | 51 - .../dmtf_mof/Core/CIM_ConcreteComponent.mof | 39 - .../dmtf_mof/Core/CIM_ConcreteDependency.mof | 45 - .../dmtf_mof/Core/CIM_ConcreteIdentity.mof | 45 - .../vendor/dmtf_mof/Core/CIM_ConcreteJob.mof | 183 - .../dmtf_mof/Core/CIM_Configuration.mof | 52 - .../Core/CIM_ConfigurationComponent.mof | 44 - .../Core/CIM_ConfigurationForSystem.mof | 42 - .../dmtf_mof/Core/CIM_ContainedDomain.mof | 25 - .../dmtf_mof/Core/CIM_ContainedLocation.mof | 27 - .../dmtf_mof/Core/CIM_DefaultSetting.mof | 23 - build/vendor/dmtf_mof/Core/CIM_Dependency.mof | 27 - .../dmtf_mof/Core/CIM_DependencyContext.mof | 46 - .../Core/CIM_DeviceSAPImplementation.mof | 37 - .../Core/CIM_DeviceServiceImplementation.mof | 35 - .../Core/CIM_DeviceStatisticalInformation.mof | 52 - .../dmtf_mof/Core/CIM_DeviceStatistics.mof | 25 - .../Core/CIM_ElementAllocatedFromPool.mof | 20 - .../dmtf_mof/Core/CIM_ElementCapabilities.mof | 45 - .../Core/CIM_ElementConfiguration.mof | 46 - .../dmtf_mof/Core/CIM_ElementLocation.mof | 29 - .../dmtf_mof/Core/CIM_ElementProfile.mof | 45 - .../dmtf_mof/Core/CIM_ElementSetting.mof | 26 - .../dmtf_mof/Core/CIM_ElementSettingData.mof | 64 - .../Core/CIM_ElementSoftwareIdentity.mof | 86 - .../Core/CIM_ElementStatisticalData.mof | 31 - .../Core/CIM_EnabledLogicalElement.mof | 242 - .../CIM_EnabledLogicalElementCapabilities.mof | 56 - .../CIM_EthernetPortAllocationSettingData.mof | 42 - .../Core/CIM_ExtentRedundancyComponent.mof | 30 - .../dmtf_mof/Core/CIM_ExtraCapacityGroup.mof | 30 - build/vendor/dmtf_mof/Core/CIM_FRU.mof | 53 - .../dmtf_mof/Core/CIM_FRUIncludesProduct.mof | 29 - .../dmtf_mof/Core/CIM_FRUPhysicalElements.mof | 21 - .../dmtf_mof/Core/CIM_HostedAccessPoint.mof | 34 - .../dmtf_mof/Core/CIM_HostedCollection.mof | 30 - .../dmtf_mof/Core/CIM_HostedDependency.mof | 24 - .../dmtf_mof/Core/CIM_HostedResourcePool.mof | 22 - .../dmtf_mof/Core/CIM_HostedService.mof | 35 - .../Core/CIM_InstalledSoftwareIdentity.mof | 26 - build/vendor/dmtf_mof/Core/CIM_IsSpare.mof | 49 - build/vendor/dmtf_mof/Core/CIM_Job.mof | 291 -- .../dmtf_mof/Core/CIM_LastAppliedSnapshot.mof | 38 - .../Core/CIM_LocalizationCapabilities.mof | 106 - build/vendor/dmtf_mof/Core/CIM_Location.mof | 40 - .../dmtf_mof/Core/CIM_LogicalDevice.mof | 426 -- .../dmtf_mof/Core/CIM_LogicalElement.mof | 16 - .../dmtf_mof/Core/CIM_LogicalIdentity.mof | 48 - .../dmtf_mof/Core/CIM_ManagedElement.mof | 76 - .../Core/CIM_ManagedSystemElement.mof | 348 -- .../dmtf_mof/Core/CIM_MemberOfCollection.mof | 22 - .../dmtf_mof/Core/CIM_MethodParameters.mof | 68 - .../Core/CIM_OpaqueManagementData.mof | 60 - .../CIM_OpaqueManagementDataCapabilities.mof | 99 - .../Core/CIM_OpaqueManagementDataService.mof | 451 -- .../dmtf_mof/Core/CIM_OrderedComponent.mof | 46 - .../dmtf_mof/Core/CIM_OrderedDependency.mof | 48 - .../Core/CIM_OrderedMemberOfCollection.mof | 49 - .../Core/CIM_OwningCollectionElement.mof | 21 - .../Core/CIM_ParameterValueSources.mof | 30 - .../dmtf_mof/Core/CIM_ParametersForMethod.mof | 41 - .../dmtf_mof/Core/CIM_PhysicalElement.mof | 161 - .../Core/CIM_PhysicalElementLocation.mof | 27 - .../CIM_PhysicalStatisticalInformation.mof | 42 - .../dmtf_mof/Core/CIM_PhysicalStatistics.mof | 26 - .../Core/CIM_PowerManagementCapabilities.mof | 223 - .../Core/CIM_PowerManagementService.mof | 131 - ...PowerUtilizationManagementCapabilities.mof | 30 - .../CIM_PowerUtilizationManagementService.mof | 64 - build/vendor/dmtf_mof/Core/CIM_Product.mof | 77 - .../dmtf_mof/Core/CIM_ProductComponent.mof | 45 - build/vendor/dmtf_mof/Core/CIM_ProductFRU.mof | 26 - .../dmtf_mof/Core/CIM_ProductParentChild.mof | 23 - .../Core/CIM_ProductPhysicalComponent.mof | 25 - .../Core/CIM_ProductPhysicalElements.mof | 32 - .../Core/CIM_ProductProductDependency.mof | 34 - .../Core/CIM_ProductServiceComponent.mof | 36 - .../Core/CIM_ProductSoftwareComponent.mof | 24 - .../dmtf_mof/Core/CIM_ProductSupport.mof | 25 - build/vendor/dmtf_mof/Core/CIM_Profile.mof | 73 - .../dmtf_mof/Core/CIM_ProtocolEndpoint.mof | 234 - .../dmtf_mof/Core/CIM_ProtocolService.mof | 109 - .../dmtf_mof/Core/CIM_ProvidesEndpoint.mof | 27 - .../Core/CIM_ProvidesServiceToElement.mof | 49 - build/vendor/dmtf_mof/Core/CIM_Realizes.mof | 25 - .../dmtf_mof/Core/CIM_RedundancyComponent.mof | 34 - .../dmtf_mof/Core/CIM_RedundancyGroup.mof | 58 - .../dmtf_mof/Core/CIM_RedundancySet.mof | 158 - .../Core/CIM_RelatedStatisticalData.mof | 27 - .../dmtf_mof/Core/CIM_RelatedStatistics.mof | 22 - build/vendor/dmtf_mof/Core/CIM_RemotePort.mof | 44 - .../Core/CIM_RemoteServiceAccessPoint.mof | 86 - .../Core/CIM_ReplaceableProductFRU.mof | 25 - .../Core/CIM_ResourceAllocationFromPool.mof | 21 - .../CIM_ResourceAllocationSettingData.mof | 293 -- .../vendor/dmtf_mof/Core/CIM_ResourcePool.mof | 176 - ..._ResourcePoolConfigurationCapabilities.mof | 42 - .../CIM_ResourcePoolConfigurationService.mof | 220 - .../Core/CIM_SAPAvailableForElement.mof | 31 - .../dmtf_mof/Core/CIM_SAPSAPDependency.mof | 32 - .../Core/CIM_SAPStatisticalInformation.mof | 52 - .../dmtf_mof/Core/CIM_SAPStatistics.mof | 26 - .../dmtf_mof/Core/CIM_ScopedSetting.mof | 28 - .../dmtf_mof/Core/CIM_ScopedSettingData.mof | 27 - build/vendor/dmtf_mof/Core/CIM_Service.mof | 143 - .../dmtf_mof/Core/CIM_ServiceAccessBySAP.mof | 30 - .../dmtf_mof/Core/CIM_ServiceAccessPoint.mof | 48 - .../dmtf_mof/Core/CIM_ServiceAccessURI.mof | 32 - .../Core/CIM_ServiceAffectsElement.mof | 98 - .../CIM_ServiceAffectsElementWithQuota.mof | 32 - .../Core/CIM_ServiceAvailableToElement.mof | 34 - .../dmtf_mof/Core/CIM_ServiceComponent.mof | 24 - .../Core/CIM_ServiceSAPDependency.mof | 29 - .../Core/CIM_ServiceServiceDependency.mof | 65 - .../CIM_ServiceStatisticalInformation.mof | 52 - .../dmtf_mof/Core/CIM_ServiceStatistics.mof | 25 - build/vendor/dmtf_mof/Core/CIM_Setting.mof | 455 -- .../CIM_SettingAssociatedToCapabilities.mof | 34 - .../dmtf_mof/Core/CIM_SettingContext.mof | 52 - .../vendor/dmtf_mof/Core/CIM_SettingData.mof | 80 - .../dmtf_mof/Core/CIM_SettingForSystem.mof | 27 - .../Core/CIM_SettingsDefineCapabilities.mof | 142 - .../dmtf_mof/Core/CIM_SettingsDefineState.mof | 29 - .../Core/CIM_SnapshotOfVirtualSystem.mof | 27 - .../dmtf_mof/Core/CIM_SoftwareIdentity.mof | 436 -- .../Core/CIM_SoftwareInstallationService.mof | 292 -- ...oftwareInstallationServiceCapabilities.mof | 178 - build/vendor/dmtf_mof/Core/CIM_SpareGroup.mof | 61 - build/vendor/dmtf_mof/Core/CIM_Spared.mof | 25 - .../dmtf_mof/Core/CIM_StatisticalData.mof | 102 - .../Core/CIM_StatisticalInformation.mof | 27 - .../dmtf_mof/Core/CIM_StatisticalSetting.mof | 37 - build/vendor/dmtf_mof/Core/CIM_Statistics.mof | 23 - .../Core/CIM_StatisticsCollection.mof | 28 - .../Core/CIM_StorageAllocationSettingData.mof | 244 - .../dmtf_mof/Core/CIM_StorageExtent.mof | 317 -- .../Core/CIM_StorageRedundancyGroup.mof | 70 - .../Core/CIM_StorageRedundancySet.mof | 37 - .../dmtf_mof/Core/CIM_SupportAccess.mof | 55 - .../vendor/dmtf_mof/Core/CIM_Synchronized.mof | 42 - build/vendor/dmtf_mof/Core/CIM_System.mof | 116 - .../dmtf_mof/Core/CIM_SystemComponent.mof | 41 - .../dmtf_mof/Core/CIM_SystemConfiguration.mof | 63 - .../vendor/dmtf_mof/Core/CIM_SystemDevice.mof | 28 - .../dmtf_mof/Core/CIM_SystemPackaging.mof | 29 - .../dmtf_mof/Core/CIM_SystemSetting.mof | 41 - .../Core/CIM_SystemSettingContext.mof | 40 - .../Core/CIM_SystemSpecificCollection.mof | 54 - .../Core/CIM_SystemStatisticalInformation.mof | 42 - .../dmtf_mof/Core/CIM_SystemStatistics.mof | 25 - .../vendor/dmtf_mof/Core/CIM_TimeService.mof | 40 - build/vendor/dmtf_mof/Core/CIM_View.mof | 22 - .../CIM_VirtualEthernetSwitchSettingData.mof | 31 - ...IM_VirtualSystemManagementCapabilities.mof | 72 - .../CIM_VirtualSystemManagementService.mof | 227 - .../Core/CIM_VirtualSystemSettingData.mof | 197 - .../CIM_VirtualSystemSnapshotCapabilities.mof | 32 - .../Core/CIM_VirtualSystemSnapshotService.mof | 91 - ...rtualSystemSnapshotServiceCapabilities.mof | 45 - .../Database/CIM_AssociatedDatabaseSystem.mof | 20 - .../dmtf_mof/Database/CIM_CommonDatabase.mof | 81 - .../CIM_CommonDatabaseCapabilities.mof | 38 - .../CIM_CommonDatabaseSettingData.mof | 38 - .../Database/CIM_CommonDatabaseStatistics.mof | 16 - .../Database/CIM_DatabaseAdministrator.mof | 28 - .../Database/CIM_DatabaseControlFile.mof | 30 - .../dmtf_mof/Database/CIM_DatabaseFile.mof | 26 - .../Database/CIM_DatabaseParameter.mof | 31 - .../CIM_DatabaseResourceStatistics.mof | 43 - .../dmtf_mof/Database/CIM_DatabaseSegment.mof | 60 - .../CIM_DatabaseSegmentSettingData.mof | 77 - .../dmtf_mof/Database/CIM_DatabaseService.mof | 70 - .../CIM_DatabaseServiceStatistics.mof | 133 - .../dmtf_mof/Database/CIM_DatabaseStorage.mof | 28 - .../Database/CIM_DatabaseStorageArea.mof | 31 - .../dmtf_mof/Database/CIM_DatabaseSystem.mof | 29 - .../Database/CIM_SNMPDatabaseParameter.mof | 26 - .../CIM_ServiceAvailableToDatabase.mof | 55 - .../vendor/dmtf_mof/Device/CIM_ADSLModem.mof | 67 - .../Device/CIM_AGPVideoController.mof | 96 - .../dmtf_mof/Device/CIM_AccessLabelReader.mof | 26 - .../Device/CIM_AdapterActiveConnection.mof | 43 - .../dmtf_mof/Device/CIM_AggregatePExtent.mof | 42 - .../dmtf_mof/Device/CIM_AggregatePSExtent.mof | 33 - ...gregatePSExtentBasedOnAggregatePExtent.mof | 32 - .../CIM_AggregatePSExtentBasedOnPExtent.mof | 32 - .../CIM_AggregateRedundancyComponent.mof | 30 - .../dmtf_mof/Device/CIM_AlarmDevice.mof | 126 - .../Device/CIM_AlarmDeviceCapabilities.mof | 39 - .../Device/CIM_AllocatedFromStoragePool.mof | 37 - .../dmtf_mof/Device/CIM_AssociatedAlarm.mof | 24 - .../dmtf_mof/Device/CIM_AssociatedBattery.mof | 29 - ...iatedBlockStatisticsManifestCollection.mof | 25 - .../Device/CIM_AssociatedCacheMemory.mof | 152 - .../Device/CIM_AssociatedComponentExtent.mof | 26 - .../dmtf_mof/Device/CIM_AssociatedCooling.mof | 19 - .../Device/CIM_AssociatedIndicatorLED.mof | 22 - .../Device/CIM_AssociatedLabelReader.mof | 26 - .../dmtf_mof/Device/CIM_AssociatedMemory.mof | 25 - .../Device/CIM_AssociatedProcessorMemory.mof | 29 - .../CIM_AssociatedProtocolController.mof | 28 - .../Device/CIM_AssociatedRemainingExtent.mof | 26 - .../dmtf_mof/Device/CIM_AssociatedSensor.mof | 21 - .../CIM_AssociatedSupplyCurrentSensor.mof | 41 - .../CIM_AssociatedSupplyVoltageSensor.mof | 41 - .../dmtf_mof/Device/CIM_BIOSLoadedInNV.mof | 32 - build/vendor/dmtf_mof/Device/CIM_Battery.mof | 183 - .../dmtf_mof/Device/CIM_BinarySensor.mof | 43 - .../CIM_BlockStatisticsCapabilities.mof | 60 - .../Device/CIM_BlockStatisticsManifest.mof | 216 - .../CIM_BlockStatisticsManifestCollection.mof | 31 - .../Device/CIM_BlockStatisticsService.mof | 194 - .../CIM_BlockStorageStatisticalData.mof | 171 - .../vendor/dmtf_mof/Device/CIM_CDROMDrive.mof | 15 - .../vendor/dmtf_mof/Device/CIM_CableModem.mof | 15 - .../dmtf_mof/Device/CIM_CacheMemory.mof | 125 - .../dmtf_mof/Device/CIM_CallBasedModem.mof | 245 - .../dmtf_mof/Device/CIM_ChangerDevice.mof | 46 - .../Device/CIM_CollectionOfSensors.mof | 26 - .../dmtf_mof/Device/CIM_CompositeExtent.mof | 46 - .../Device/CIM_CompositeExtentBasedOn.mof | 105 - .../Device/CIM_ComputerSystemMemory.mof | 34 - .../Device/CIM_ComputerSystemProcessor.mof | 35 - .../CIM_ConfigurationReportingService.mof | 132 - .../Device/CIM_ConnectionBasedModem.mof | 31 - .../dmtf_mof/Device/CIM_ControlledBy.mof | 76 - .../vendor/dmtf_mof/Device/CIM_Controller.mof | 78 - .../CIM_ControllerConfigurationService.mof | 497 -- .../dmtf_mof/Device/CIM_CoolingDevice.mof | 21 - .../dmtf_mof/Device/CIM_CurrentSensor.mof | 113 - build/vendor/dmtf_mof/Device/CIM_DSLModem.mof | 16 - build/vendor/dmtf_mof/Device/CIM_DVDDrive.mof | 32 - .../dmtf_mof/Device/CIM_DesktopMonitor.mof | 41 - .../dmtf_mof/Device/CIM_DeviceConnection.mof | 53 - .../dmtf_mof/Device/CIM_DeviceErrorCounts.mof | 98 - .../dmtf_mof/Device/CIM_DeviceErrorData.mof | 59 - .../dmtf_mof/Device/CIM_DeviceIdentity.mof | 36 - .../Device/CIM_DeviceServicesLocation.mof | 44 - .../Device/CIM_DeviceSharingCapabilities.mof | 30 - .../dmtf_mof/Device/CIM_DeviceSoftware.mof | 64 - .../dmtf_mof/Device/CIM_DiscreteSensor.mof | 44 - .../vendor/dmtf_mof/Device/CIM_DiskDrive.mof | 15 - .../vendor/dmtf_mof/Device/CIM_DiskGroup.mof | 27 - .../dmtf_mof/Device/CIM_DiskPartition.mof | 100 - .../Device/CIM_DiskPartitionBasedOnVolume.mof | 28 - .../dmtf_mof/Device/CIM_DisketteDrive.mof | 15 - build/vendor/dmtf_mof/Device/CIM_Display.mof | 15 - build/vendor/dmtf_mof/Device/CIM_Door.mof | 60 - .../Device/CIM_DoorAccessToDevice.mof | 28 - .../CIM_DoorAccessToPhysicalElement.mof | 24 - .../dmtf_mof/Device/CIM_DriveInDiskGroup.mof | 28 - .../dmtf_mof/Device/CIM_ESCONController.mof | 13 - .../Device/CIM_ErrorCountersForDevice.mof | 29 - .../dmtf_mof/Device/CIM_EthernetAdapter.mof | 299 -- .../dmtf_mof/Device/CIM_EthernetPort.mof | 97 - .../Device/CIM_EthernetPortStatistics.mof | 190 - .../dmtf_mof/Device/CIM_ExtentInDiskGroup.mof | 30 - .../Device/CIM_FCAdapterEventCounters.mof | 139 - build/vendor/dmtf_mof/Device/CIM_FCPort.mof | 107 - .../Device/CIM_FCPortCapabilities.mof | 38 - .../Device/CIM_FCPortRateStatistics.mof | 78 - .../dmtf_mof/Device/CIM_FCPortStatistics.mof | 302 -- .../Device/CIM_FCSwitchCapabilities.mof | 54 - .../dmtf_mof/Device/CIM_FCSwitchSettings.mof | 48 - build/vendor/dmtf_mof/Device/CIM_Fan.mof | 41 - .../Device/CIM_FibreChannelAdapter.mof | 370 -- .../vendor/dmtf_mof/Device/CIM_FibrePort.mof | 253 - .../Device/CIM_FibrePortActiveLogin.mof | 164 - .../Device/CIM_FibrePortEventCounters.mof | 113 - .../Device/CIM_FibrePortOnFCAdapter.mof | 39 - .../Device/CIM_FibreProtocolService.mof | 20 - .../vendor/dmtf_mof/Device/CIM_FlatPanel.mof | 57 - .../dmtf_mof/Device/CIM_GroupInDiskGroup.mof | 28 - .../vendor/dmtf_mof/Device/CIM_HDSLModem.mof | 19 - .../dmtf_mof/Device/CIM_HardwareThread.mof | 50 - build/vendor/dmtf_mof/Device/CIM_HeatPipe.mof | 14 - .../dmtf_mof/Device/CIM_HostedStoragePool.mof | 27 - .../dmtf_mof/Device/CIM_IBSubnetManager.mof | 42 - .../dmtf_mof/Device/CIM_IDEController.mof | 13 - .../vendor/dmtf_mof/Device/CIM_ISDNModem.mof | 15 - .../dmtf_mof/Device/CIM_IndicatorLED.mof | 178 - .../Device/CIM_IndicatorLEDCapabilities.mof | 100 - .../Device/CIM_InfraredController.mof | 14 - .../dmtf_mof/Device/CIM_InterLibraryPort.mof | 48 - build/vendor/dmtf_mof/Device/CIM_Keyboard.mof | 34 - .../dmtf_mof/Device/CIM_LabelReader.mof | 44 - .../Device/CIM_LabelReaderStatData.mof | 30 - .../Device/CIM_LabelReaderStatInfo.mof | 50 - .../dmtf_mof/Device/CIM_LibraryExchange.mof | 32 - .../dmtf_mof/Device/CIM_LibraryPackage.mof | 26 - .../dmtf_mof/Device/CIM_LimitedAccessPort.mof | 72 - .../dmtf_mof/Device/CIM_LogicalDisk.mof | 45 - .../Device/CIM_LogicalDiskBasedOnExtent.mof | 29 - .../CIM_LogicalDiskBasedOnPartition.mof | 36 - .../Device/CIM_LogicalDiskBasedOnVolume.mof | 27 - .../CIM_LogicalDiskBasedOnVolumeSet.mof | 24 - .../dmtf_mof/Device/CIM_LogicalModule.mof | 53 - .../dmtf_mof/Device/CIM_LogicalPort.mof | 74 - .../Device/CIM_LogicalPortCapabilities.mof | 23 - .../dmtf_mof/Device/CIM_LogicalPortGroup.mof | 43 - .../Device/CIM_LogicalPortSettings.mof | 38 - .../Device/CIM_MagnetoOpticalDrive.mof | 15 - .../Device/CIM_ManagementController.mof | 17 - .../dmtf_mof/Device/CIM_MediaAccessDevice.mof | 264 - .../Device/CIM_MediaAccessStatData.mof | 55 - .../Device/CIM_MediaAccessStatInfo.mof | 81 - .../dmtf_mof/Device/CIM_MediaPartition.mof | 71 - .../dmtf_mof/Device/CIM_MediaPresent.mof | 31 - .../Device/CIM_MediaTransferDevice.mof | 16 - build/vendor/dmtf_mof/Device/CIM_Memory.mof | 194 - .../dmtf_mof/Device/CIM_MemoryError.mof | 146 - build/vendor/dmtf_mof/Device/CIM_Modem.mof | 15 - .../vendor/dmtf_mof/Device/CIM_ModulePort.mof | 23 - .../dmtf_mof/Device/CIM_MonitorResolution.mof | 81 - .../dmtf_mof/Device/CIM_MonitorSetting.mof | 24 - .../dmtf_mof/Device/CIM_MultiStateSensor.mof | 14 - .../dmtf_mof/Device/CIM_NetworkAdapter.mof | 105 - .../CIM_NetworkAdapterRedundancyComponent.mof | 66 - .../dmtf_mof/Device/CIM_NetworkPort.mof | 110 - .../Device/CIM_NetworkPortCapabilities.mof | 52 - .../Device/CIM_NetworkPortStatistics.mof | 47 - .../Device/CIM_NetworkVirtualAdapter.mof | 39 - .../Device/CIM_NonVolatileStorage.mof | 63 - .../dmtf_mof/Device/CIM_NumericSensor.mof | 366 -- .../Device/CIM_OOBAlertServiceOnModem.mof | 29 - .../CIM_OOBAlertServiceOnNetworkAdapter.mof | 38 - .../CIM_OOBAlertServiceOnNetworkPort.mof | 28 - .../dmtf_mof/Device/CIM_OwningPrintQueue.mof | 45 - .../vendor/dmtf_mof/Device/CIM_PCIBridge.mof | 131 - .../dmtf_mof/Device/CIM_PCIController.mof | 128 - .../vendor/dmtf_mof/Device/CIM_PCIDevice.mof | 74 - build/vendor/dmtf_mof/Device/CIM_PCIPort.mof | 19 - .../dmtf_mof/Device/CIM_PCIPortGroup.mof | 12 - .../vendor/dmtf_mof/Device/CIM_PCIeSwitch.mof | 19 - .../dmtf_mof/Device/CIM_PCMCIAController.mof | 13 - .../dmtf_mof/Device/CIM_PCVideoController.mof | 46 - .../Device/CIM_PExtentRedundancyComponent.mof | 29 - .../vendor/dmtf_mof/Device/CIM_POTSModem.mof | 156 - .../Device/CIM_PSExtentBasedOnPExtent.mof | 43 - .../dmtf_mof/Device/CIM_PackageAlarm.mof | 32 - .../dmtf_mof/Device/CIM_PackageCooling.mof | 39 - .../dmtf_mof/Device/CIM_PackageDependency.mof | 26 - .../dmtf_mof/Device/CIM_PackageTempSensor.mof | 30 - .../Device/CIM_ParallelController.mof | 58 - .../dmtf_mof/Device/CIM_PassThroughModule.mof | 132 - .../dmtf_mof/Device/CIM_PhysicalExtent.mof | 67 - .../dmtf_mof/Device/CIM_PickerElement.mof | 46 - .../dmtf_mof/Device/CIM_PickerForChanger.mof | 28 - .../dmtf_mof/Device/CIM_PickerLabelReader.mof | 25 - .../dmtf_mof/Device/CIM_PickerStatData.mof | 41 - .../dmtf_mof/Device/CIM_PickerStatInfo.mof | 62 - .../dmtf_mof/Device/CIM_PointingDevice.mof | 48 - .../Device/CIM_PortActiveConnection.mof | 32 - .../dmtf_mof/Device/CIM_PortController.mof | 41 - .../Device/CIM_PortImplementsEndpoint.mof | 32 - .../dmtf_mof/Device/CIM_PortOnDevice.mof | 23 - .../Device/CIM_PowerAllocationSettingData.mof | 87 - .../dmtf_mof/Device/CIM_PowerSupply.mof | 123 - build/vendor/dmtf_mof/Device/CIM_PrintJob.mof | 295 -- .../dmtf_mof/Device/CIM_PrintJobFile.mof | 26 - .../vendor/dmtf_mof/Device/CIM_PrintQueue.mof | 186 - build/vendor/dmtf_mof/Device/CIM_PrintSAP.mof | 44 - .../dmtf_mof/Device/CIM_PrintService.mof | 155 - build/vendor/dmtf_mof/Device/CIM_Printer.mof | 779 --- .../Device/CIM_PrinterServicingJob.mof | 23 - .../Device/CIM_PrinterServicingQueue.mof | 28 - .../vendor/dmtf_mof/Device/CIM_Processor.mof | 330 -- .../Device/CIM_ProcessorCapabilities.mof | 22 - .../dmtf_mof/Device/CIM_ProcessorCore.mof | 62 - .../Device/CIM_ProtectedExtentBasedOn.mof | 79 - .../Device/CIM_ProtectedSpaceExtent.mof | 58 - .../Device/CIM_ProtocolController.mof | 23 - .../CIM_ProtocolControllerAccessesUnit.mof | 35 - .../CIM_ProtocolControllerForDevice.mof | 59 - .../Device/CIM_ProtocolControllerForPort.mof | 27 - .../Device/CIM_ProtocolControllerForUnit.mof | 49 - ..._ProtocolControllerMaskingCapabilities.mof | 162 - .../Device/CIM_QueueForPrintService.mof | 33 - .../Device/CIM_QueueForwardsToPrintSAP.mof | 26 - .../dmtf_mof/Device/CIM_RealizedOnSide.mof | 38 - .../Device/CIM_RealizesAggregatePExtent.mof | 31 - .../Device/CIM_RealizesDiskPartition.mof | 33 - .../dmtf_mof/Device/CIM_RealizesExtent.mof | 37 - .../dmtf_mof/Device/CIM_RealizesPExtent.mof | 31 - .../Device/CIM_RealizesTapePartition.mof | 26 - .../dmtf_mof/Device/CIM_Refrigeration.mof | 14 - .../dmtf_mof/Device/CIM_SCSIController.mof | 78 - ...CIM_SCSIInitiatorTargetLogicalUnitPath.mof | 115 - .../dmtf_mof/Device/CIM_SCSIInterface.mof | 119 - .../Device/CIM_SCSIProtocolController.mof | 30 - .../vendor/dmtf_mof/Device/CIM_SDSLModem.mof | 16 - .../dmtf_mof/Device/CIM_SSAController.mof | 15 - build/vendor/dmtf_mof/Device/CIM_Scanner.mof | 14 - build/vendor/dmtf_mof/Device/CIM_Sensor.mof | 95 - .../dmtf_mof/Device/CIM_SerialController.mof | 69 - .../dmtf_mof/Device/CIM_SerialInterface.mof | 54 - .../CIM_SharedDeviceManagementService.mof | 94 - .../dmtf_mof/Device/CIM_SharingDependency.mof | 81 - build/vendor/dmtf_mof/Device/CIM_Snapshot.mof | 53 - .../dmtf_mof/Device/CIM_SnapshotOfExtent.mof | 37 - .../Device/CIM_StatisticsCapabilities.mof | 34 - .../dmtf_mof/Device/CIM_StatisticsService.mof | 14 - .../Device/CIM_StorageCapabilities.mof | 306 -- .../CIM_StorageConfigurationCapabilities.mof | 121 - .../CIM_StorageConfigurationService.mof | 494 -- .../dmtf_mof/Device/CIM_StorageDefect.mof | 28 - .../dmtf_mof/Device/CIM_StorageError.mof | 44 - .../dmtf_mof/Device/CIM_StorageLibrary.mof | 126 - .../dmtf_mof/Device/CIM_StoragePool.mof | 229 - .../CIM_StorageReplicationCapabilities.mof | 389 -- .../dmtf_mof/Device/CIM_StorageSetting.mof | 391 -- .../Device/CIM_StorageSettingWithHints.mof | 86 - ...torageSettingsAssociatedToCapabilities.mof | 29 - ...orageSettingsGeneratedFromCapabilities.mof | 42 - .../Device/CIM_StorageSynchronized.mof | 96 - .../dmtf_mof/Device/CIM_StorageVolume.mof | 55 - .../dmtf_mof/Device/CIM_SuppliesPower.mof | 22 - .../vendor/dmtf_mof/Device/CIM_Tachometer.mof | 42 - .../vendor/dmtf_mof/Device/CIM_TapeDrive.mof | 42 - .../dmtf_mof/Device/CIM_TapePartition.mof | 38 - .../Device/CIM_TapePartitionOnSurface.mof | 28 - .../dmtf_mof/Device/CIM_TemperatureSensor.mof | 113 - .../dmtf_mof/Device/CIM_TokenRingAdapter.mof | 338 -- .../dmtf_mof/Device/CIM_TokenRingPort.mof | 131 - .../Device/CIM_TokenRingPortStatistics.mof | 164 - .../dmtf_mof/Device/CIM_USBConnection.mof | 25 - .../dmtf_mof/Device/CIM_USBController.mof | 43 - .../Device/CIM_USBControllerHasHub.mof | 27 - .../vendor/dmtf_mof/Device/CIM_USBDevice.mof | 194 - build/vendor/dmtf_mof/Device/CIM_USBHub.mof | 27 - build/vendor/dmtf_mof/Device/CIM_USBPort.mof | 57 - .../dmtf_mof/Device/CIM_USBPortOnHub.mof | 26 - build/vendor/dmtf_mof/Device/CIM_Unimodem.mof | 309 -- .../Device/CIM_UninterruptiblePowerSupply.mof | 114 - .../vendor/dmtf_mof/Device/CIM_UserDevice.mof | 22 - .../vendor/dmtf_mof/Device/CIM_VDSLModem.mof | 16 - .../dmtf_mof/Device/CIM_VideoController.mof | 163 - .../Device/CIM_VideoControllerResolution.mof | 108 - .../dmtf_mof/Device/CIM_VideoSetting.mof | 34 - .../dmtf_mof/Device/CIM_VolatileStorage.mof | 33 - .../dmtf_mof/Device/CIM_VoltageSensor.mof | 113 - .../vendor/dmtf_mof/Device/CIM_VolumeSet.mof | 66 - .../Device/CIM_VolumeSetBasedOnPSExtent.mof | 50 - .../vendor/dmtf_mof/Device/CIM_WORMDrive.mof | 15 - .../Device/CIM_WakeUpServiceOnModem.mof | 28 - .../CIM_WakeUpServiceOnNetworkAdapter.mof | 38 - .../Device/CIM_WakeUpServiceOnNetworkPort.mof | 28 - build/vendor/dmtf_mof/Device/CIM_Watchdog.mof | 97 - .../dmtf_mof/Device/CIM_WiFiEndpoint.mof | 228 - build/vendor/dmtf_mof/Device/CIM_WiFiPort.mof | 61 - .../Device/CIM_WiFiPortCapabilities.mof | 30 - .../CIM_WiFiPortConfigurationService.mof | 234 - .../vendor/dmtf_mof/Device/CIM_WiFiRadio.mof | 35 - build/vendor/dmtf_mof/Device/CIM_Zone.mof | 65 - .../dmtf_mof/Device/CIM_ZoneCapabilities.mof | 68 - .../Device/CIM_ZoneMembershipSettingData.mof | 37 - .../dmtf_mof/Device/CIM_ZoneService.mof | 315 -- build/vendor/dmtf_mof/Device/CIM_ZoneSet.mof | 35 - .../CIM_AbstractIndicationSubscription.mof | 188 - .../dmtf_mof/Event/CIM_AlertIndication.mof | 328 -- .../Event/CIM_AlertInstIndication.mof | 27 - .../dmtf_mof/Event/CIM_ClassCreation.mof | 10 - .../dmtf_mof/Event/CIM_ClassDeletion.mof | 10 - .../dmtf_mof/Event/CIM_ClassIndication.mof | 21 - .../dmtf_mof/Event/CIM_ClassModification.mof | 19 - .../dmtf_mof/Event/CIM_FilterCollection.mof | 57 - .../CIM_FilterCollectionSubscription.mof | 22 - .../CIM_FormattedIndicationSubscription.mof | 97 - .../vendor/dmtf_mof/Event/CIM_Indication.mof | 202 - .../dmtf_mof/Event/CIM_IndicationFilter.mof | 150 - .../dmtf_mof/Event/CIM_IndicationHandler.mof | 21 - .../Event/CIM_IndicationHandlerCIMXML.mof | 21 - .../dmtf_mof/Event/CIM_IndicationService.mof | 74 - .../CIM_IndicationServiceCapabilities.mof | 75 - .../CIM_IndicationServiceSettingData.mof | 77 - .../Event/CIM_IndicationSubscription.mof | 29 - .../dmtf_mof/Event/CIM_InstCreation.mof | 9 - .../dmtf_mof/Event/CIM_InstDeletion.mof | 9 - .../dmtf_mof/Event/CIM_InstIndication.mof | 34 - .../dmtf_mof/Event/CIM_InstMethodCall.mof | 41 - .../dmtf_mof/Event/CIM_InstModification.mof | 18 - build/vendor/dmtf_mof/Event/CIM_InstRead.mof | 10 - .../Event/CIM_ListenerDestination.mof | 92 - .../Event/CIM_ListenerDestinationCIMXML.mof | 18 - .../CIM_ListenerDestinationWSManagement.mof | 109 - .../dmtf_mof/Event/CIM_ProcessIndication.mof | 13 - .../dmtf_mof/Event/CIM_SNMPTrapIndication.mof | 129 - .../Event/CIM_ThresholdIndication.mof | 39 - .../IPsecPolicy/CIM_ContainedProposal.mof | 39 - .../IPsecPolicy/CIM_ContainedTransform.mof | 43 - .../dmtf_mof/IPsecPolicy/CIM_IKEAction.mof | 74 - .../dmtf_mof/IPsecPolicy/CIM_IKEProposal.mof | 159 - .../dmtf_mof/IPsecPolicy/CIM_IKERule.mof | 40 - .../dmtf_mof/IPsecPolicy/CIM_IPsecAction.mof | 93 - .../CIM_IPsecPolicyForEndpoint.mof | 32 - .../IPsecPolicy/CIM_IPsecPolicyForSystem.mof | 33 - .../IPsecPolicy/CIM_IPsecProposal.mof | 13 - .../dmtf_mof/IPsecPolicy/CIM_IPsecRule.mof | 11 - .../IPsecPolicy/CIM_IPsecTransportAction.mof | 11 - .../IPsecPolicy/CIM_IPsecTunnelAction.mof | 23 - .../CIM_PacketConditionInSARule.mof | 26 - .../CIM_PeerGatewayForPreconfiguredTunnel.mof | 29 - .../IPsecPolicy/CIM_PeerGatewayForTunnel.mof | 42 - .../IPsecPolicy/CIM_PreconfiguredSAAction.mof | 56 - .../CIM_PreconfiguredTransportAction.mof | 14 - .../CIM_PreconfiguredTunnelAction.mof | 25 - .../IPsecPolicy/CIM_RuleThatGeneratedSA.mof | 21 - .../dmtf_mof/IPsecPolicy/CIM_SAAction.mof | 21 - .../IPsecPolicy/CIM_SANegotiationAction.mof | 68 - .../dmtf_mof/IPsecPolicy/CIM_SAProposal.mof | 22 - .../dmtf_mof/IPsecPolicy/CIM_SARule.mof | 34 - .../IPsecPolicy/CIM_SAStaticAction.mof | 37 - .../CIM_TransformOfPreconfiguredAction.mof | 54 - .../Interop/CIM_CIMOMStatisticalData.mof | 125 - .../CIM_CIMXMLCommunicationMechanism.mof | 41 - .../Interop/CIM_CommMechanismForAdapter.mof | 31 - .../Interop/CIM_CommMechanismForManager.mof | 27 - ...M_CommMechanismForObjectManagerAdapter.mof | 26 - .../Interop/CIM_ElementConformsToProfile.mof | 26 - build/vendor/dmtf_mof/Interop/CIM_Error.mof | 375 -- .../CIM_IdentificationOfManagedSystem.mof | 21 - .../vendor/dmtf_mof/Interop/CIM_Namespace.mof | 104 - .../Interop/CIM_NamespaceInManager.mof | 20 - .../dmtf_mof/Interop/CIM_ObjectManager.mof | 71 - .../Interop/CIM_ObjectManagerAdapter.mof | 67 - ...IM_ObjectManagerCommunicationMechanism.mof | 142 - .../dmtf_mof/Interop/CIM_ProtocolAdapter.mof | 52 - .../Interop/CIM_ReferencedProfile.mof | 20 - .../Interop/CIM_RegisteredProfile.mof | 139 - .../Interop/CIM_RegisteredSubProfile.mof | 12 - .../Interop/CIM_SubProfileRequiresProfile.mof | 24 - .../Interop/CIM_SystemIdentification.mof | 96 - .../Interop/CIM_SystemInNamespace.mof | 46 - .../dmtf_mof/Interop/CIM_WBEMService.mof | 13 - .../CIM_AggregationMetricDefinition.mof | 51 - .../Metrics/CIM_AggregationMetricValue.mof | 36 - .../Metrics/CIM_BaseMetricDefinition.mof | 204 - .../dmtf_mof/Metrics/CIM_BaseMetricValue.mof | 135 - .../Metrics/CIM_LogicalElementPerformsUoW.mof | 22 - .../CIM_LogicalElementUnitOfWorkDef.mof | 24 - .../dmtf_mof/Metrics/CIM_MetricDefForME.mof | 39 - .../dmtf_mof/Metrics/CIM_MetricDefinition.mof | 33 - .../dmtf_mof/Metrics/CIM_MetricForME.mof | 19 - .../dmtf_mof/Metrics/CIM_MetricInstance.mof | 28 - .../dmtf_mof/Metrics/CIM_MetricService.mof | 495 -- .../Metrics/CIM_MetricServiceCapabilities.mof | 114 - .../dmtf_mof/Metrics/CIM_StartedUoW.mof | 21 - build/vendor/dmtf_mof/Metrics/CIM_SubUoW.mof | 34 - .../vendor/dmtf_mof/Metrics/CIM_SubUoWDef.mof | 27 - .../dmtf_mof/Metrics/CIM_TraceLevelType.mof | 95 - .../dmtf_mof/Metrics/CIM_UnitOfWork.mof | 128 - .../Metrics/CIM_UnitOfWorkDefinition.mof | 64 - .../Metrics/CIM_UoWDefTraceLevelType.mof | 24 - .../vendor/dmtf_mof/Metrics/CIM_UoWMetric.mof | 33 - .../Metrics/CIM_UoWMetricDefinition.mof | 25 - .../Network/CIM_AFRelatedServices.mof | 32 - .../vendor/dmtf_mof/Network/CIM_AFService.mof | 57 - .../dmtf_mof/Network/CIM_AHTransform.mof | 54 - .../dmtf_mof/Network/CIM_ASBGPEndpoints.mof | 27 - .../Network/CIM_AdministrativeDistance.mof | 116 - .../CIM_AllocationSchedulingElement.mof | 69 - .../Network/CIM_AreaOfConfiguration.mof | 37 - .../Network/CIM_AssociatedNextHop.mof | 28 - .../dmtf_mof/Network/CIM_AutonomousSystem.mof | 108 - .../Network/CIM_AverageRateMeterService.mof | 36 - .../dmtf_mof/Network/CIM_BGPAdminDistance.mof | 30 - .../dmtf_mof/Network/CIM_BGPAttributes.mof | 115 - .../Network/CIM_BGPAttributesForRoute.mof | 56 - .../dmtf_mof/Network/CIM_BGPCluster.mof | 32 - .../dmtf_mof/Network/CIM_BGPClustersInAS.mof | 26 - .../Network/CIM_BGPEndpointStatistics.mof | 80 - .../dmtf_mof/Network/CIM_BGPIPRoute.mof | 43 - .../Network/CIM_BGPPathAttributes.mof | 153 - .../dmtf_mof/Network/CIM_BGPPeerGroup.mof | 95 - .../Network/CIM_BGPPeerGroupService.mof | 25 - .../Network/CIM_BGPPeerUsesRouteMap.mof | 33 - .../Network/CIM_BGPProtocolEndpoint.mof | 207 - .../dmtf_mof/Network/CIM_BGPRouteMap.mof | 104 - .../CIM_BGPRouteMapsInRoutingPolicy.mof | 33 - .../dmtf_mof/Network/CIM_BGPRoutingPolicy.mof | 26 - .../dmtf_mof/Network/CIM_BGPService.mof | 71 - .../Network/CIM_BGPServiceAttributes.mof | 37 - .../Network/CIM_BGPServiceStatistics.mof | 34 - .../dmtf_mof/Network/CIM_BGPStatistics.mof | 89 - .../Network/CIM_BindsToLANEndpoint.mof | 36 - .../CIM_BoundedPrioritySchedulingElement.mof | 39 - .../dmtf_mof/Network/CIM_BufferPool.mof | 86 - .../dmtf_mof/Network/CIM_CLPCapabilities.mof | 49 - .../Network/CIM_CLPProtocolEndpoint.mof | 106 - .../dmtf_mof/Network/CIM_CLPSettingData.mof | 113 - .../dmtf_mof/Network/CIM_CalculatedRoutes.mof | 37 - .../dmtf_mof/Network/CIM_CalculatesAmong.mof | 36 - .../Network/CIM_CalculationBasedOnQueue.mof | 30 - .../CIM_CalculationServiceForDropper.mof | 30 - .../Network/CIM_ClassifierElement.mof | 35 - ...M_ClassifierElementInClassifierService.mof | 45 - .../CIM_ClassifierElementUsesFilterList.mof | 34 - .../Network/CIM_ClassifierFilterSet.mof | 55 - .../Network/CIM_ClassifierService.mof | 38 - .../Network/CIM_CollectedBufferPool.mof | 24 - .../Network/CIM_ConditioningService.mof | 48 - .../CIM_ConditioningServiceOnEndpoint.mof | 57 - .../dmtf_mof/Network/CIM_Confederation.mof | 44 - .../Network/CIM_ConnectivityCollection.mof | 37 - .../CIM_ConnectivityMembershipSettingData.mof | 43 - .../dmtf_mof/Network/CIM_DHCPCapabilities.mof | 85 - .../Network/CIM_DHCPProtocolEndpoint.mof | 150 - .../dmtf_mof/Network/CIM_DHCPSettingData.mof | 216 - .../Network/CIM_DNSGeneralSettingData.mof | 48 - .../Network/CIM_DNSProtocolEndpoint.mof | 34 - .../dmtf_mof/Network/CIM_DNSSettingData.mof | 71 - .../Network/CIM_DSCPMarkerService.mof | 30 - .../dmtf_mof/Network/CIM_DiffServService.mof | 47 - .../CIM_DropThresholdCalculationService.mof | 49 - .../dmtf_mof/Network/CIM_DropperService.mof | 104 - .../Network/CIM_DynamicForwardingEntry.mof | 64 - .../vendor/dmtf_mof/Network/CIM_EFService.mof | 36 - .../Network/CIM_EGPRouteCalcDependency.mof | 39 - .../dmtf_mof/Network/CIM_ESPTransform.mof | 107 - .../dmtf_mof/Network/CIM_EWMAMeterService.mof | 48 - ...IM_EgressConditioningServiceOnEndpoint.mof | 38 - .../CIM_ElementInSchedulingService.mof | 34 - .../dmtf_mof/Network/CIM_EndpointIdentity.mof | 33 - .../dmtf_mof/Network/CIM_EndpointInArea.mof | 23 - .../dmtf_mof/Network/CIM_EndpointInLink.mof | 24 - .../Network/CIM_EndpointOfNetworkPipe.mof | 40 - .../Network/CIM_EntriesInFilterList.mof | 37 - .../Network/CIM_FailNextScheduler.mof | 38 - .../dmtf_mof/Network/CIM_FilterEntry.mof | 98 - .../dmtf_mof/Network/CIM_FilterEntryBase.mof | 63 - .../Network/CIM_FilterEntryInSystem.mof | 36 - .../dmtf_mof/Network/CIM_FilterList.mof | 77 - .../Network/CIM_FilterListInSystem.mof | 35 - .../Network/CIM_FilterListsInBGPRouteMap.mof | 24 - .../CIM_FilterOfSecurityAssociation.mof | 28 - .../Network/CIM_FilteredBGPAttributes.mof | 27 - .../dmtf_mof/Network/CIM_FlowService.mof | 23 - .../dmtf_mof/Network/CIM_ForwardedRoutes.mof | 32 - .../Network/CIM_ForwardingService.mof | 57 - .../dmtf_mof/Network/CIM_ForwardsAmong.mof | 25 - .../dmtf_mof/Network/CIM_Hdr8021Filter.mof | 104 - .../dmtf_mof/Network/CIM_Hdr8021PService.mof | 38 - .../Network/CIM_HeadTailDropQueueBinding.mof | 35 - .../dmtf_mof/Network/CIM_HeadTailDropper.mof | 31 - .../Network/CIM_HostedAdminDistance.mof | 29 - .../Network/CIM_HostedBGPAttributes.mof | 28 - .../Network/CIM_HostedBGPPeerGroup.mof | 28 - .../Network/CIM_HostedBGPRouteMap.mof | 28 - .../Network/CIM_HostedFilterEntryBase.mof | 28 - .../dmtf_mof/Network/CIM_HostedFilterList.mof | 27 - .../Network/CIM_HostedForwardingServices.mof | 33 - .../Network/CIM_HostedNetworkPipe.mof | 27 - .../dmtf_mof/Network/CIM_HostedRoute.mof | 27 - .../Network/CIM_HostedRoutingPolicy.mof | 30 - .../Network/CIM_HostedRoutingServices.mof | 33 - .../Network/CIM_IEEE8021xCapabilities.mof | 34 - .../Network/CIM_IEEE8021xSettings.mof | 210 - .../dmtf_mof/Network/CIM_IKESAEndpoint.mof | 125 - .../dmtf_mof/Network/CIM_IPAddressRange.mof | 71 - .../Network/CIM_IPAssignmentSettingData.mof | 50 - .../dmtf_mof/Network/CIM_IPCOMPTransform.mof | 53 - .../Network/CIM_IPConfigurationService.mof | 53 - .../Network/CIM_IPConnectivitySubnet.mof | 43 - .../dmtf_mof/Network/CIM_IPHeadersFilter.mof | 283 -- .../Network/CIM_IPProtocolEndpoint.mof | 94 - build/vendor/dmtf_mof/Network/CIM_IPRoute.mof | 129 - .../dmtf_mof/Network/CIM_IPSOFilterEntry.mof | 98 - .../vendor/dmtf_mof/Network/CIM_IPSubnet.mof | 50 - .../Network/CIM_IPXConnectivityNetwork.mof | 18 - .../dmtf_mof/Network/CIM_IPXNetwork.mof | 24 - .../Network/CIM_IPXProtocolEndpoint.mof | 32 - .../dmtf_mof/Network/CIM_IPsecSAEndpoint.mof | 49 - .../dmtf_mof/Network/CIM_InBGPPeerGroup.mof | 25 - .../dmtf_mof/Network/CIM_InLogicalNetwork.mof | 36 - .../vendor/dmtf_mof/Network/CIM_InSegment.mof | 33 - .../dmtf_mof/Network/CIM_InboundVLAN.mof | 80 - ...M_IngressConditioningServiceOnEndpoint.mof | 36 - .../Network/CIM_KVMRedirectionSAP.mof | 38 - .../Network/CIM_LANConnectivitySegment.mof | 42 - .../dmtf_mof/Network/CIM_LANEndpoint.mof | 77 - .../dmtf_mof/Network/CIM_LANSegment.mof | 49 - .../Network/CIM_ListsInRoutingPolicy.mof | 32 - .../dmtf_mof/Network/CIM_LogicalNetwork.mof | 86 - .../Network/CIM_LogicalNetworkService.mof | 38 - .../dmtf_mof/Network/CIM_MarkerService.mof | 36 - .../CIM_MediaRedirectionCapabilities.mof | 100 - .../Network/CIM_MediaRedirectionSAP.mof | 59 - .../dmtf_mof/Network/CIM_MeterService.mof | 68 - .../Network/CIM_NamedAddressCollection.mof | 24 - build/vendor/dmtf_mof/Network/CIM_Network.mof | 21 - .../dmtf_mof/Network/CIM_NetworkPipe.mof | 97 - .../Network/CIM_NetworkPipeComposition.mof | 61 - .../CIM_NetworkPortConfigurationService.mof | 48 - .../dmtf_mof/Network/CIM_NetworkService.mof | 70 - .../CIM_NetworkServicesInAdminDomain.mof | 36 - .../dmtf_mof/Network/CIM_NetworkVLAN.mof | 56 - .../Network/CIM_NetworksInAdminDomain.mof | 36 - .../dmtf_mof/Network/CIM_NextHopIPRoute.mof | 44 - .../dmtf_mof/Network/CIM_NextHopRoute.mof | 77 - .../dmtf_mof/Network/CIM_NextHopRouting.mof | 57 - .../dmtf_mof/Network/CIM_NextScheduler.mof | 36 - .../dmtf_mof/Network/CIM_NextService.mof | 34 - .../CIM_NextServiceAfterClassifierElement.mof | 35 - .../Network/CIM_NextServiceAfterMeter.mof | 48 - ...CIM_NonWorkConservingSchedulingService.mof | 18 - .../vendor/dmtf_mof/Network/CIM_OSPFArea.mof | 42 - .../Network/CIM_OSPFAreaConfiguration.mof | 87 - .../vendor/dmtf_mof/Network/CIM_OSPFLink.mof | 48 - .../Network/CIM_OSPFProtocolEndpoint.mof | 51 - .../Network/CIM_OSPFProtocolEndpointBase.mof | 72 - .../dmtf_mof/Network/CIM_OSPFService.mof | 60 - .../Network/CIM_OSPFServiceCapabilities.mof | 33 - .../Network/CIM_OSPFServiceConfiguration.mof | 40 - .../Network/CIM_OSPFVirtualInterface.mof | 20 - .../dmtf_mof/Network/CIM_OutboundVLAN.mof | 41 - .../Network/CIM_PacketSchedulingService.mof | 60 - .../Network/CIM_PeerIDPayloadFilterEntry.mof | 66 - .../dmtf_mof/Network/CIM_PeerOfSAEndpoint.mof | 24 - .../Network/CIM_Phase1SAUsedForPhase2.mof | 28 - .../dmtf_mof/Network/CIM_PreambleFilter.mof | 51 - .../Network/CIM_PreambleMarkerService.mof | 44 - .../Network/CIM_PrecedenceService.mof | 38 - .../CIM_Priority8021QMarkerService.mof | 30 - .../Network/CIM_PrioritySchedulingElement.mof | 38 - .../CIM_ProtocolServiceCapabilities.mof | 37 - .../Network/CIM_QoSConditioningSubService.mof | 29 - .../dmtf_mof/Network/CIM_QoSService.mof | 42 - .../dmtf_mof/Network/CIM_QoSSubService.mof | 37 - .../dmtf_mof/Network/CIM_QueueAllocation.mof | 40 - .../dmtf_mof/Network/CIM_QueueHierarchy.mof | 43 - .../dmtf_mof/Network/CIM_QueueToSchedule.mof | 35 - .../dmtf_mof/Network/CIM_QueuingService.mof | 34 - .../Network/CIM_REDDropperService.mof | 96 - .../Network/CIM_RangeOfIPAddresses.mof | 41 - .../Network/CIM_RangesOfConfiguration.mof | 37 - .../Network/CIM_RedirectionService.mof | 73 - .../CIM_RedirectionServiceCapabilities.mof | 18 - .../Network/CIM_ReflectorClientService.mof | 29 - .../Network/CIM_ReflectorNonClientService.mof | 28 - .../dmtf_mof/Network/CIM_ReflectorService.mof | 29 - .../Network/CIM_RelatedSpanningTree.mof | 28 - .../CIM_RelatedTransparentBridgingService.mof | 33 - .../CIM_RemoteAccessAvailableToElement.mof | 36 - .../Network/CIM_RouteCalculationService.mof | 44 - .../Network/CIM_RouteForwardedByService.mof | 47 - .../Network/CIM_RouteUsesEndpoint.mof | 26 - .../dmtf_mof/Network/CIM_RoutersInAS.mof | 61 - .../Network/CIM_RoutersInBGPCluster.mof | 29 - .../vendor/dmtf_mof/Network/CIM_RoutesBGP.mof | 28 - .../dmtf_mof/Network/CIM_RoutingPolicy.mof | 134 - .../Network/CIM_RoutingProtocolDomain.mof | 23 - .../Network/CIM_RoutingProtocolDomainInAS.mof | 24 - .../CIM_SAEndpointConnectionStatistics.mof | 31 - .../Network/CIM_SAEndpointRefreshSettings.mof | 39 - .../dmtf_mof/Network/CIM_SATransform.mof | 70 - .../Network/CIM_SCSIProtocolEndpoint.mof | 74 - .../Network/CIM_SNMPCommunityString.mof | 59 - .../dmtf_mof/Network/CIM_SNMPService.mof | 21 - .../dmtf_mof/Network/CIM_SNMPTrapTarget.mof | 51 - .../dmtf_mof/Network/CIM_SSHCapabilities.mof | 54 - .../Network/CIM_SSHProtocolEndpoint.mof | 120 - .../dmtf_mof/Network/CIM_SSHSettingData.mof | 116 - .../dmtf_mof/Network/CIM_SchedulerUsed.mof | 41 - .../Network/CIM_SchedulingElement.mof | 64 - .../CIM_SchedulingServiceToSchedule.mof | 35 - .../CIM_SecurityAssociationEndpoint.mof | 77 - .../Network/CIM_SourceRoutingService.mof | 29 - .../Network/CIM_SpanningTreeService.mof | 133 - .../Network/CIM_SpanningTreeStatistics.mof | 29 - .../CIM_Specific802dot1QVLANService.mof | 20 - .../Network/CIM_StaticForwardingEntry.mof | 72 - .../CIM_StaticIPAssignmentSettingData.mof | 39 - .../dmtf_mof/Network/CIM_SwitchPort.mof | 21 - .../CIM_SwitchPortDynamicForwarding.mof | 25 - .../dmtf_mof/Network/CIM_SwitchPortPair.mof | 42 - .../Network/CIM_SwitchPortSourceRouting.mof | 93 - .../CIM_SwitchPortSourceRoutingStatistics.mof | 104 - .../Network/CIM_SwitchPortSpanningTree.mof | 86 - .../CIM_SwitchPortSpanningTreeStatistics.mof | 22 - .../CIM_SwitchPortStaticForwarding.mof | 24 - .../Network/CIM_SwitchPortStatistics.mof | 30 - ...witchPortTransparentBridgingStatistics.mof | 42 - .../dmtf_mof/Network/CIM_SwitchService.mof | 56 - .../CIM_SwitchServiceSourceRouting.mof | 25 - .../Network/CIM_SwitchServiceSpanningTree.mof | 25 - .../CIM_SwitchServiceTransparentBridging.mof | 25 - .../Network/CIM_SwitchServiceVLAN.mof | 30 - .../dmtf_mof/Network/CIM_Switchable.mof | 31 - .../dmtf_mof/Network/CIM_SwitchesAmong.mof | 24 - .../Network/CIM_TCPProtocolEndpoint.mof | 27 - .../Network/CIM_TelnetCapabilities.mof | 54 - .../Network/CIM_TelnetProtocolEndpoint.mof | 111 - .../Network/CIM_TelnetSettingData.mof | 107 - .../Network/CIM_TextRedirectionSAP.mof | 41 - .../Network/CIM_TextRedirectionService.mof | 31 - .../dmtf_mof/Network/CIM_ToSMarkerService.mof | 30 - .../Network/CIM_TokenBucketMeterService.mof | 58 - .../CIM_TransformOfSecurityAssociation.mof | 26 - ...M_TransparentBridgingDynamicForwarding.mof | 27 - .../CIM_TransparentBridgingService.mof | 28 - ...IM_TransparentBridgingStaticForwarding.mof | 27 - .../CIM_TransparentBridgingStatistics.mof | 24 - .../Network/CIM_TrapSourceForSNMPService.mof | 26 - .../Network/CIM_UDPProtocolEndpoint.mof | 26 - .../CIM_USBRedirectionCapabilities.mof | 184 - .../Network/CIM_USBRedirectionSAP.mof | 47 - .../Network/CIM_USBRedirectionService.mof | 230 - build/vendor/dmtf_mof/Network/CIM_VLAN.mof | 66 - .../dmtf_mof/Network/CIM_VLANEndpoint.mof | 173 - build/vendor/dmtf_mof/Network/CIM_VLANFor.mof | 26 - .../dmtf_mof/Network/CIM_VLANService.mof | 24 - .../Network/CIM_WRRSchedulingElement.mof | 57 - .../Network/CIM_WeightedREDDropperService.mof | 73 - .../Network/CIM_WiFiEndpointCapabilities.mof | 113 - .../Network/CIM_WiFiEndpointSettings.mof | 185 - .../CIM_WiFiNetworkDetectionSettings.mof | 57 - .../Network/CIM_X509CredentialFilterEntry.mof | 62 - .../Network/CIM_iSCSICapabilities.mof | 55 - .../dmtf_mof/Network/CIM_iSCSIConnection.mof | 129 - .../Network/CIM_iSCSIConnectionSettings.mof | 149 - .../Network/CIM_iSCSILoginStatistics.mof | 180 - .../Network/CIM_iSCSIProtocolEndpoint.mof | 57 - .../dmtf_mof/Network/CIM_iSCSISession.mof | 180 - .../Network/CIM_iSCSISessionFailures.mof | 70 - .../Network/CIM_iSCSISessionSettings.mof | 139 - .../dmtf_mof/Physical/CIM_AdjacentSlots.mof | 33 - build/vendor/dmtf_mof/Physical/CIM_Card.mof | 85 - .../dmtf_mof/Physical/CIM_CardInSlot.mof | 26 - .../dmtf_mof/Physical/CIM_CardOnCard.mof | 41 - .../vendor/dmtf_mof/Physical/CIM_Chassis.mof | 134 - .../dmtf_mof/Physical/CIM_ChassisInRack.mof | 31 - build/vendor/dmtf_mof/Physical/CIM_Chip.mof | 32 - .../Physical/CIM_ConfigurationCapacity.mof | 126 - .../dmtf_mof/Physical/CIM_ConnectedTo.mof | 27 - .../Physical/CIM_ConnectorOnPackage.mof | 26 - .../dmtf_mof/Physical/CIM_Container.mof | 40 - build/vendor/dmtf_mof/Physical/CIM_Docked.mof | 28 - .../dmtf_mof/Physical/CIM_ElementCapacity.mof | 28 - .../Physical/CIM_ElementInConnector.mof | 21 - .../dmtf_mof/Physical/CIM_ElementsLinked.mof | 23 - .../dmtf_mof/Physical/CIM_HomeForMedia.mof | 35 - .../Physical/CIM_LinkHasConnector.mof | 25 - .../vendor/dmtf_mof/Physical/CIM_Magazine.mof | 60 - .../Physical/CIM_MediaPhysicalStatData.mof | 57 - .../Physical/CIM_MediaPhysicalStatInfo.mof | 94 - .../dmtf_mof/Physical/CIM_MemoryCapacity.mof | 53 - .../dmtf_mof/Physical/CIM_MemoryOnCard.mof | 26 - .../dmtf_mof/Physical/CIM_MemoryWithMedia.mof | 24 - .../Physical/CIM_PackageInChassis.mof | 27 - .../Physical/CIM_PackageInConnector.mof | 25 - .../dmtf_mof/Physical/CIM_PackageInSlot.mof | 28 - .../dmtf_mof/Physical/CIM_PackageLocation.mof | 32 - .../Physical/CIM_PackagedComponent.mof | 31 - .../Physical/CIM_ParticipatesInSet.mof | 23 - .../CIM_PhysicalAssetCapabilities.mof | 23 - .../Physical/CIM_PhysicalCapacity.mof | 32 - .../Physical/CIM_PhysicalComponent.mof | 79 - .../Physical/CIM_PhysicalConnector.mof | 189 - .../dmtf_mof/Physical/CIM_PhysicalFrame.mof | 94 - .../dmtf_mof/Physical/CIM_PhysicalLink.mof | 53 - .../dmtf_mof/Physical/CIM_PhysicalMedia.mof | 185 - .../Physical/CIM_PhysicalMediaInLocation.mof | 46 - .../dmtf_mof/Physical/CIM_PhysicalMemory.mof | 92 - .../dmtf_mof/Physical/CIM_PhysicalPackage.mof | 195 - .../dmtf_mof/Physical/CIM_PhysicalTape.mof | 24 - build/vendor/dmtf_mof/Physical/CIM_Rack.mof | 42 - .../dmtf_mof/Physical/CIM_ReplacementSet.mof | 25 - build/vendor/dmtf_mof/Physical/CIM_Slot.mof | 156 - .../dmtf_mof/Physical/CIM_SlotInSlot.mof | 44 - .../Physical/CIM_StorageMediaLocation.mof | 121 - .../dmtf_mof/Physical/CIM_SystemBusCard.mof | 67 - .../Policy/CIM_AcceptCredentialFrom.mof | 47 - .../Policy/CIM_AccountAuthentication.mof | 22 - .../Policy/CIM_AuthenticationCondition.mof | 18 - .../Policy/CIM_AuthenticationRule.mof | 22 - .../Policy/CIM_BiometricAuthentication.mof | 37 - .../Policy/CIM_CompoundPolicyAction.mof | 51 - .../Policy/CIM_CompoundPolicyCondition.mof | 22 - .../Policy/CIM_DocumentAuthentication.mof | 38 - .../CIM_ElementInPolicyRoleCollection.mof | 26 - .../Policy/CIM_FilterOfPacketCondition.mof | 32 - .../Policy/CIM_KerberosAuthentication.mof | 17 - .../dmtf_mof/Policy/CIM_MethodAction.mof | 118 - .../Policy/CIM_NetworkPacketAction.mof | 37 - .../Policy/CIM_NetworkingIDAuthentication.mof | 20 - .../Policy/CIM_PacketFilterCondition.mof | 34 - .../CIM_PhysicalCredentialAuthentication.mof | 38 - build/vendor/dmtf_mof/Policy/CIM_Policy.mof | 39 - .../dmtf_mof/Policy/CIM_PolicyAction.mof | 88 - .../Policy/CIM_PolicyActionInPolicyAction.mof | 23 - .../CIM_PolicyActionInPolicyRepository.mof | 41 - .../Policy/CIM_PolicyActionInPolicyRule.mof | 39 - .../Policy/CIM_PolicyActionStructure.mof | 65 - .../dmtf_mof/Policy/CIM_PolicyComponent.mof | 21 - .../dmtf_mof/Policy/CIM_PolicyCondition.mof | 85 - .../CIM_PolicyConditionInPolicyCondition.mof | 27 - .../CIM_PolicyConditionInPolicyRepository.mof | 41 - .../CIM_PolicyConditionInPolicyRule.mof | 26 - .../Policy/CIM_PolicyConditionStructure.mof | 54 - .../CIM_PolicyContainerInPolicyContainer.mof | 23 - .../dmtf_mof/Policy/CIM_PolicyGroup.mof | 36 - .../Policy/CIM_PolicyGroupInPolicyGroup.mof | 27 - .../Policy/CIM_PolicyGroupInSystem.mof | 22 - .../dmtf_mof/Policy/CIM_PolicyInSystem.mof | 33 - .../dmtf_mof/Policy/CIM_PolicyRepository.mof | 22 - ...CIM_PolicyRepositoryInPolicyRepository.mof | 31 - .../Policy/CIM_PolicyRoleCollection.mof | 75 - .../CIM_PolicyRoleCollectionInSystem.mof | 22 - .../vendor/dmtf_mof/Policy/CIM_PolicyRule.mof | 176 - .../Policy/CIM_PolicyRuleInPolicyGroup.mof | 28 - .../Policy/CIM_PolicyRuleInSystem.mof | 22 - .../Policy/CIM_PolicyRuleValidityPeriod.mof | 36 - .../vendor/dmtf_mof/Policy/CIM_PolicySet.mof | 87 - .../Policy/CIM_PolicySetAppliesToElement.mof | 26 - .../Policy/CIM_PolicySetComponent.mof | 41 - .../Policy/CIM_PolicySetInRoleCollection.mof | 22 - .../dmtf_mof/Policy/CIM_PolicySetInSystem.mof | 37 - .../Policy/CIM_PolicySetValidityPeriod.mof | 48 - .../Policy/CIM_PolicyTimePeriodCondition.mof | 285 -- .../CIM_PublicPrivateKeyAuthentication.mof | 24 - .../dmtf_mof/Policy/CIM_QueryCondition.mof | 79 - .../Policy/CIM_RejectConnectionAction.mof | 17 - .../dmtf_mof/Policy/CIM_ReusablePolicy.mof | 22 - .../Policy/CIM_ReusablePolicyContainer.mof | 16 - .../Policy/CIM_SharedSecretAuthentication.mof | 23 - .../Policy/CIM_VendorPolicyAction.mof | 37 - .../Policy/CIM_VendorPolicyCondition.mof | 37 - .../vendor/dmtf_mof/Support/PRS_Activity.mof | 52 - .../dmtf_mof/Support/PRS_ActivityContact.mof | 22 - .../dmtf_mof/Support/PRS_ActivityResource.mof | 23 - .../Support/PRS_ActivityTransaction.mof | 25 - build/vendor/dmtf_mof/Support/PRS_Address.mof | 47 - .../dmtf_mof/Support/PRS_AddressLocation.mof | 22 - .../dmtf_mof/Support/PRS_AdminAssociation.mof | 24 - .../dmtf_mof/Support/PRS_Administrative.mof | 79 - .../Support/PRS_AdministrativeContact.mof | 23 - .../Support/PRS_AdministrativeRevision.mof | 23 - .../vendor/dmtf_mof/Support/PRS_Agreement.mof | 24 - .../vendor/dmtf_mof/Support/PRS_Attached.mof | 22 - .../dmtf_mof/Support/PRS_Attachment.mof | 59 - .../dmtf_mof/Support/PRS_Categorization.mof | 29 - .../vendor/dmtf_mof/Support/PRS_Category.mof | 35 - .../Support/PRS_CategoryParentChild.mof | 25 - build/vendor/dmtf_mof/Support/PRS_Contact.mof | 17 - .../Support/PRS_ContactContactItem.mof | 32 - .../dmtf_mof/Support/PRS_ContactItem.mof | 16 - .../Support/PRS_ContactItemAddress.mof | 22 - .../Support/PRS_ContactOrganization.mof | 23 - .../dmtf_mof/Support/PRS_ContactPerson.mof | 23 - .../dmtf_mof/Support/PRS_ExchangeElement.mof | 54 - .../dmtf_mof/Support/PRS_Expression.mof | 25 - .../Support/PRS_ExpressionElement.mof | 16 - .../dmtf_mof/Support/PRS_ExpressionLink.mof | 27 - build/vendor/dmtf_mof/Support/PRS_Feature.mof | 40 - .../dmtf_mof/Support/PRS_FeatureResource.mof | 24 - .../vendor/dmtf_mof/Support/PRS_Location.mof | 23 - .../dmtf_mof/Support/PRS_Organization.mof | 22 - build/vendor/dmtf_mof/Support/PRS_Person.mof | 40 - build/vendor/dmtf_mof/Support/PRS_Problem.mof | 36 - build/vendor/dmtf_mof/Support/PRS_Product.mof | 30 - .../dmtf_mof/Support/PRS_ProductAsset.mof | 25 - .../dmtf_mof/Support/PRS_ProductComponent.mof | 24 - .../Support/PRS_ProductParentChild.mof | 32 - .../vendor/dmtf_mof/Support/PRS_Reference.mof | 18 - .../dmtf_mof/Support/PRS_Resolution.mof | 29 - .../Support/PRS_ResolutionResource.mof | 21 - .../vendor/dmtf_mof/Support/PRS_Resource.mof | 28 - .../vendor/dmtf_mof/Support/PRS_Revision.mof | 60 - .../dmtf_mof/Support/PRS_RevisionContact.mof | 22 - .../dmtf_mof/Support/PRS_SISService.mof | 204 - .../dmtf_mof/Support/PRS_ServiceActivity.mof | 23 - .../dmtf_mof/Support/PRS_ServiceAgreement.mof | 23 - .../dmtf_mof/Support/PRS_ServiceIncident.mof | 97 - .../dmtf_mof/Support/PRS_ServiceProblem.mof | 25 - .../dmtf_mof/Support/PRS_ServiceProvider.mof | 25 - .../dmtf_mof/Support/PRS_ServiceRequester.mof | 28 - .../Support/PRS_ServiceResolutionSolution.mof | 25 - .../vendor/dmtf_mof/Support/PRS_Solution.mof | 48 - .../dmtf_mof/Support/PRS_SolutionCategory.mof | 26 - .../dmtf_mof/Support/PRS_SolutionElement.mof | 25 - .../Support/PRS_SolutionExpression.mof | 25 - .../Support/PRS_SolutionHasElement.mof | 29 - .../dmtf_mof/Support/PRS_SolutionProblem.mof | 23 - .../Support/PRS_SolutionReference.mof | 24 - .../Support/PRS_SolutionResolution.mof | 24 - .../vendor/dmtf_mof/Support/PRS_Statement.mof | 93 - .../dmtf_mof/Support/PRS_StatementFeature.mof | 21 - .../dmtf_mof/Support/PRS_Transaction.mof | 52 - .../System/CIM_AffectedJobElement.mof | 55 - .../dmtf_mof/System/CIM_AllocatedDMA.mof | 31 - .../dmtf_mof/System/CIM_AllocatedResource.mof | 24 - .../System/CIM_AvailableDiagnosticService.mof | 50 - .../dmtf_mof/System/CIM_BIOSAttribute.mof | 99 - .../dmtf_mof/System/CIM_BIOSEnumeration.mof | 36 - .../dmtf_mof/System/CIM_BIOSInteger.mof | 45 - .../dmtf_mof/System/CIM_BIOSPassword.mof | 62 - .../dmtf_mof/System/CIM_BIOSService.mof | 445 -- .../System/CIM_BIOSServiceCapabilities.mof | 49 - .../vendor/dmtf_mof/System/CIM_BIOSString.mof | 51 - .../dmtf_mof/System/CIM_BootConfigSetting.mof | 70 - .../dmtf_mof/System/CIM_BootOSFromFS.mof | 26 - build/vendor/dmtf_mof/System/CIM_BootSAP.mof | 14 - .../dmtf_mof/System/CIM_BootService.mof | 208 - .../System/CIM_BootServiceAccessBySAP.mof | 23 - .../System/CIM_BootServiceCapabilities.mof | 118 - .../dmtf_mof/System/CIM_BootSettingData.mof | 39 - .../dmtf_mof/System/CIM_BootSourceSetting.mof | 67 - build/vendor/dmtf_mof/System/CIM_Cluster.mof | 55 - .../System/CIM_ClusterServiceAccessBySAP.mof | 23 - .../dmtf_mof/System/CIM_ClusteringSAP.mof | 14 - .../dmtf_mof/System/CIM_ClusteringService.mof | 47 - .../dmtf_mof/System/CIM_ComponentCS.mof | 51 - .../dmtf_mof/System/CIM_ComputerSystem.mof | 161 - .../dmtf_mof/System/CIM_ComputerSystemDMA.mof | 25 - .../dmtf_mof/System/CIM_ComputerSystemIRQ.mof | 25 - .../System/CIM_ComputerSystemMappedIO.mof | 26 - .../CIM_ComputerSystemNodeCapabilities.mof | 40 - .../System/CIM_ComputerSystemPackage.mof | 33 - .../System/CIM_ComputerSystemResource.mof | 25 - .../CIM_CorrespondingSettingDataRecord.mof | 18 - .../CIM_CorrespondingSettingsRecord.mof | 23 - build/vendor/dmtf_mof/System/CIM_DMA.mof | 117 - build/vendor/dmtf_mof/System/CIM_DataFile.mof | 15 - .../System/CIM_DeviceAccessedByFile.mof | 25 - .../vendor/dmtf_mof/System/CIM_DeviceFile.mof | 18 - .../System/CIM_DiagnosticCompletionRecord.mof | 47 - .../dmtf_mof/System/CIM_DiagnosticLog.mof | 15 - .../dmtf_mof/System/CIM_DiagnosticRecord.mof | 99 - .../dmtf_mof/System/CIM_DiagnosticResult.mof | 302 -- .../System/CIM_DiagnosticResultForMSE.mof | 28 - .../System/CIM_DiagnosticResultForTest.mof | 30 - .../System/CIM_DiagnosticResultInPackage.mof | 33 - .../dmtf_mof/System/CIM_DiagnosticService.mof | 112 - .../CIM_DiagnosticServiceCapabilities.mof | 164 - .../System/CIM_DiagnosticServiceRecord.mof | 79 - .../dmtf_mof/System/CIM_DiagnosticSetting.mof | 418 -- .../System/CIM_DiagnosticSettingData.mof | 318 -- .../CIM_DiagnosticSettingDataRecord.mof | 17 - .../System/CIM_DiagnosticSettingForTest.mof | 31 - .../System/CIM_DiagnosticSettingRecord.mof | 158 - .../dmtf_mof/System/CIM_DiagnosticTest.mof | 346 -- .../System/CIM_DiagnosticTestForMSE.mof | 64 - .../System/CIM_DiagnosticTestInPackage.mof | 36 - .../dmtf_mof/System/CIM_DiagnosticsLog.mof | 19 - .../vendor/dmtf_mof/System/CIM_Directory.mof | 16 - .../System/CIM_DirectoryContainsFile.mof | 25 - build/vendor/dmtf_mof/System/CIM_Export.mof | 27 - .../dmtf_mof/System/CIM_FIFOPipeFile.mof | 23 - .../dmtf_mof/System/CIM_FileIdentity.mof | 31 - .../dmtf_mof/System/CIM_FileStorage.mof | 26 - .../vendor/dmtf_mof/System/CIM_FileSystem.mof | 207 - .../System/CIM_FileSystemCapabilities.mof | 50 - .../System/CIM_FileSystemSettingData.mof | 46 - .../dmtf_mof/System/CIM_HelpService.mof | 128 - .../System/CIM_HelpServiceAvailableToFile.mof | 38 - .../dmtf_mof/System/CIM_HostedBootSAP.mof | 30 - .../dmtf_mof/System/CIM_HostedBootService.mof | 27 - .../dmtf_mof/System/CIM_HostedClusterSAP.mof | 30 - .../System/CIM_HostedClusterService.mof | 30 - .../dmtf_mof/System/CIM_HostedFileSystem.mof | 27 - .../System/CIM_HostedJobDestination.mof | 31 - .../vendor/dmtf_mof/System/CIM_HostingCS.mof | 24 - build/vendor/dmtf_mof/System/CIM_IRQ.mof | 84 - .../dmtf_mof/System/CIM_InstalledOS.mof | 36 - .../dmtf_mof/System/CIM_JobDestination.mof | 45 - .../System/CIM_JobDestinationJobs.mof | 24 - build/vendor/dmtf_mof/System/CIM_JobQueue.mof | 65 - .../dmtf_mof/System/CIM_JobSettingData.mof | 63 - .../dmtf_mof/System/CIM_LocalFileSystem.mof | 21 - build/vendor/dmtf_mof/System/CIM_Log.mof | 73 - build/vendor/dmtf_mof/System/CIM_LogEntry.mof | 91 - .../dmtf_mof/System/CIM_LogInDataFile.mof | 27 - .../dmtf_mof/System/CIM_LogInDeviceFile.mof | 28 - .../dmtf_mof/System/CIM_LogInStorage.mof | 34 - .../dmtf_mof/System/CIM_LogManagesRecord.mof | 23 - .../vendor/dmtf_mof/System/CIM_LogRecord.mof | 73 - .../dmtf_mof/System/CIM_LogicalFile.mof | 118 - .../dmtf_mof/System/CIM_MemoryMappedIO.mof | 56 - .../dmtf_mof/System/CIM_MemoryResource.mof | 22 - .../vendor/dmtf_mof/System/CIM_MessageLog.mof | 529 -- build/vendor/dmtf_mof/System/CIM_Mount.mof | 38 - build/vendor/dmtf_mof/System/CIM_NFS.mof | 95 - .../dmtf_mof/System/CIM_OOBAlertService.mof | 117 - .../vendor/dmtf_mof/System/CIM_OSProcess.mof | 27 - .../dmtf_mof/System/CIM_OperatingSystem.mof | 296 -- .../CIM_OperatingSystemCapabilities.mof | 31 - .../dmtf_mof/System/CIM_OperationLog.mof | 29 - .../dmtf_mof/System/CIM_OwningJobElement.mof | 31 - .../dmtf_mof/System/CIM_ParticipatingCS.mof | 53 - .../System/CIM_PlatformWatchdogService.mof | 125 - ...IM_PlatformWatchdogServiceCapabilities.mof | 52 - .../dmtf_mof/System/CIM_PortResource.mof | 22 - build/vendor/dmtf_mof/System/CIM_Process.mof | 149 - .../dmtf_mof/System/CIM_ProcessExecutable.mof | 25 - .../dmtf_mof/System/CIM_ProcessOfJob.mof | 31 - .../dmtf_mof/System/CIM_ProcessThread.mof | 26 - .../System/CIM_RecordAppliesToElement.mof | 27 - .../dmtf_mof/System/CIM_RecordForLog.mof | 100 - .../dmtf_mof/System/CIM_RecordInLog.mof | 24 - .../vendor/dmtf_mof/System/CIM_RecordLog.mof | 45 - .../dmtf_mof/System/CIM_RemoteFileSystem.mof | 21 - .../dmtf_mof/System/CIM_ResidesOnExtent.mof | 27 - .../dmtf_mof/System/CIM_ResourceOfSystem.mof | 27 - .../vendor/dmtf_mof/System/CIM_RunningOS.mof | 30 - .../dmtf_mof/System/CIM_ServiceProcess.mof | 56 - .../dmtf_mof/System/CIM_SymbolicLink.mof | 22 - .../dmtf_mof/System/CIM_SystemPartition.mof | 34 - .../dmtf_mof/System/CIM_SystemResource.mof | 34 - build/vendor/dmtf_mof/System/CIM_Thread.mof | 100 - build/vendor/dmtf_mof/System/CIM_TimeZone.mof | 215 - .../System/CIM_UnitaryComputerSystem.mof | 89 - .../dmtf_mof/System/CIM_UnixDeviceFile.mof | 47 - .../dmtf_mof/System/CIM_UnixDirectory.mof | 25 - build/vendor/dmtf_mof/System/CIM_UnixFile.mof | 157 - .../System/CIM_UnixLocalFileSystem.mof | 41 - .../dmtf_mof/System/CIM_UnixProcess.mof | 74 - .../CIM_UnixProcessStatisticalInformation.mof | 133 - .../System/CIM_UnixProcessStatistics.mof | 28 - .../vendor/dmtf_mof/System/CIM_UnixThread.mof | 77 - build/vendor/dmtf_mof/System/CIM_UseOfLog.mof | 33 - .../dmtf_mof/System/CIM_UseOfMessageLog.mof | 23 - .../System/CIM_VirtualComputerSystem.mof | 22 - .../CIM_VirtualSystemSettingDataComponent.mof | 27 - .../dmtf_mof/System/CIM_WakeUpService.mof | 61 - .../User/CIM_AccessControlInformation.mof | 117 - build/vendor/dmtf_mof/User/CIM_Account.mof | 263 - .../dmtf_mof/User/CIM_AccountIdentity.mof | 25 - .../CIM_AccountManagementCapabilities.mof | 87 - .../User/CIM_AccountManagementService.mof | 54 - .../User/CIM_AccountMapsToAccount.mof | 32 - .../dmtf_mof/User/CIM_AccountOnSystem.mof | 28 - .../dmtf_mof/User/CIM_AccountSettingData.mof | 72 - .../dmtf_mof/User/CIM_AssignedIdentity.mof | 24 - .../dmtf_mof/User/CIM_AssociatedPrivilege.mof | 255 - .../dmtf_mof/User/CIM_AuthenticateForUse.mof | 31 - .../User/CIM_AuthenticationRequirement.mof | 76 - .../User/CIM_AuthenticationService.mof | 21 - .../User/CIM_AuthenticationTarget.mof | 37 - .../User/CIM_AuthorizationService.mof | 16 - .../User/CIM_AuthorizationSubject.mof | 33 - .../dmtf_mof/User/CIM_AuthorizationTarget.mof | 35 - .../dmtf_mof/User/CIM_AuthorizedPrivilege.mof | 24 - .../dmtf_mof/User/CIM_AuthorizedSubject.mof | 33 - .../dmtf_mof/User/CIM_AuthorizedTarget.mof | 25 - .../dmtf_mof/User/CIM_AuthorizedUse.mof | 29 - .../User/CIM_CAHasPublicCertificate.mof | 26 - .../User/CIM_CASignsPublicKeyCertificate.mof | 48 - .../User/CIM_CertificateAuthority.mof | 62 - .../User/CIM_CollectionInOrganization.mof | 26 - .../dmtf_mof/User/CIM_CollectionInSystem.mof | 26 - build/vendor/dmtf_mof/User/CIM_Credential.mof | 55 - .../dmtf_mof/User/CIM_CredentialContext.mof | 29 - .../User/CIM_CredentialManagementSAP.mof | 18 - .../User/CIM_CredentialManagementService.mof | 15 - .../dmtf_mof/User/CIM_ElementAsUser.mof | 42 - .../User/CIM_ElementSecuritySensitivity.mof | 24 - .../dmtf_mof/User/CIM_GatewayPathID.mof | 46 - build/vendor/dmtf_mof/User/CIM_Group.mof | 59 - build/vendor/dmtf_mof/User/CIM_HostedACI.mof | 34 - .../CIM_HostedAuthenticationRequirement.mof | 32 - .../dmtf_mof/User/CIM_IKESecretIsNamed.mof | 32 - .../dmtf_mof/User/CIM_IPNetworkIdentity.mof | 53 - build/vendor/dmtf_mof/User/CIM_Identity.mof | 87 - .../dmtf_mof/User/CIM_IdentityContext.mof | 28 - .../User/CIM_KDCIssuesKerberosTicket.mof | 31 - .../CIM_KerberosKeyDistributionCenter.mof | 23 - .../dmtf_mof/User/CIM_KerberosTicket.mof | 81 - .../CIM_LocalCredentialManagementService.mof | 16 - .../User/CIM_LocallyManagedPublicKey.mof | 33 - .../dmtf_mof/User/CIM_ManagedCredential.mof | 29 - .../dmtf_mof/User/CIM_ManagesAccount.mof | 23 - .../User/CIM_ManagesAccountOnSystem.mof | 28 - .../dmtf_mof/User/CIM_MemberPrincipal.mof | 54 - .../dmtf_mof/User/CIM_MoreGroupInfo.mof | 26 - .../dmtf_mof/User/CIM_MoreOrgUnitInfo.mof | 26 - .../User/CIM_MoreOrganizationInfo.mof | 26 - .../dmtf_mof/User/CIM_MorePersonInfo.mof | 26 - .../vendor/dmtf_mof/User/CIM_MoreRoleInfo.mof | 26 - .../User/CIM_NamedSharedIKESecret.mof | 98 - build/vendor/dmtf_mof/User/CIM_Notary.mof | 50 - .../User/CIM_NotaryVerifiesBiometric.mof | 35 - .../User/CIM_OpaqueManagementDataOwner.mof | 30 - .../vendor/dmtf_mof/User/CIM_OrgStructure.mof | 28 - build/vendor/dmtf_mof/User/CIM_OrgUnit.mof | 82 - .../vendor/dmtf_mof/User/CIM_Organization.mof | 85 - .../User/CIM_OrganizationalEntity.mof | 15 - .../User/CIM_OtherGroupInformation.mof | 88 - .../User/CIM_OtherOrgUnitInformation.mof | 170 - .../User/CIM_OtherOrganizationInformation.mof | 207 - .../User/CIM_OtherPersonInformation.mof | 410 -- .../User/CIM_OtherRoleInformation.mof | 167 - build/vendor/dmtf_mof/User/CIM_Person.mof | 111 - build/vendor/dmtf_mof/User/CIM_Privilege.mof | 174 - .../CIM_PrivilegeManagementCapabilities.mof | 85 - .../User/CIM_PrivilegeManagementService.mof | 290 -- .../User/CIM_PublicKeyCertificate.mof | 67 - .../User/CIM_PublicKeyManagementService.mof | 16 - .../User/CIM_PublicPrivateKeyPair.mof | 61 - .../User/CIM_RequireCredentialsFrom.mof | 38 - build/vendor/dmtf_mof/User/CIM_Role.mof | 87 - .../CIM_RoleBasedAuthorizationService.mof | 179 - .../CIM_RoleBasedManagementCapabilities.mof | 28 - .../dmtf_mof/User/CIM_RoleLimitedToTarget.mof | 22 - .../dmtf_mof/User/CIM_SecuritySensitivity.mof | 55 - .../dmtf_mof/User/CIM_SecurityService.mof | 13 - .../User/CIM_SecurityServiceForSystem.mof | 33 - .../User/CIM_SecurityServiceUsesAccount.mof | 23 - .../User/CIM_ServiceUsesSecurityService.mof | 21 - .../vendor/dmtf_mof/User/CIM_SharedSecret.mof | 68 - .../User/CIM_SharedSecretIsShared.mof | 30 - .../dmtf_mof/User/CIM_SharedSecretService.mof | 31 - .../User/CIM_StorageClientSettingData.mof | 62 - .../dmtf_mof/User/CIM_StorageHardwareID.mof | 31 - ...CIM_StorageHardwareIDManagementService.mof | 200 - .../dmtf_mof/User/CIM_SystemAdministrator.mof | 25 - .../User/CIM_SystemAdministratorGroup.mof | 24 - .../User/CIM_SystemAdministratorRole.mof | 23 - .../dmtf_mof/User/CIM_TrustHierarchy.mof | 27 - .../dmtf_mof/User/CIM_UnsignedPublicKey.mof | 74 - .../vendor/dmtf_mof/User/CIM_UserContact.mof | 88 - build/vendor/dmtf_mof/User/CIM_UserEntity.mof | 15 - .../vendor/dmtf_mof/User/CIM_UsersAccess.mof | 67 - .../vendor/dmtf_mof/User/CIM_UsersAccount.mof | 31 - .../dmtf_mof/User/CIM_UsersCredential.mof | 33 - .../dmtf_mof/User/CIM_VerificationService.mof | 17 - build/vendor/dmtf_mof/cim_schema_2.26.0.mof | 1417 ------ build/vendor/dmtf_mof/qualifiers.mof | 230 - build/vendor/dmtf_mof/qualifiers_optional.mof | 54 - .../MSFT_ArchiveResource.psm1 | 974 ---- .../MSFT_ArchiveResource.schema.mof | 12 - .../en-US/ArchiveProvider.psd1 | Bin 12600 -> 0 bytes .../en-US/MSFT_ArchiveResource.schema.mfl | Bin 2552 -> 0 bytes .../MSFT_EnvironmentResource.psm1 | 637 --- .../MSFT_EnvironmentResource.schema.mof | 9 - .../en-US/MSFT_EnvironmentResource.schema.mfl | Bin 1506 -> 0 bytes .../MSFT_EnvironmentResource.strings.psd1 | Bin 2532 -> 0 bytes ...MSFT_FileDirectoryConfiguration.schema.mof | 17 - .../MSFT_GroupResource.psm1 | 1537 ------ .../MSFT_GroupResource.schema.mof | 12 - .../en-US/MSFT_GroupResource.schema.mfl | Bin 2080 -> 0 bytes .../en-US/MSFT_GroupResource.strings.psd1 | Bin 4850 -> 0 bytes .../MSFT_LogResource.schema.mof | 7 - .../en-US/MSFT_LogResource.schema.mfl | Bin 858 -> 0 bytes .../MSFT_PackageResource.psm1 | 808 --- .../MSFT_PackageResource.schema.mof | 19 - .../en-US/MSFT_PackageResource.schema.mfl | Bin 3370 -> 0 bytes .../en-US/PackageProvider.psd1 | Bin 6956 -> 0 bytes .../MSFT_ProcessResource.psm1 | 722 --- .../MSFT_ProcessResource.schema.mof | 17 - .../en-US/MSFT_ProcessResource.schema.mfl | Bin 3078 -> 0 bytes .../en-US/MSFT_ProcessResource.strings.psd1 | Bin 4028 -> 0 bytes .../MSFT_RegistryResource.psm1 | 1099 ---- .../MSFT_RegistryResource.schema.mof | 11 - .../en-US/MSFT_RegistryResource.schema.mfl | Bin 1986 -> 0 bytes .../en-US/MSFT_RegistryResource.strings.psd1 | Bin 3408 -> 0 bytes .../MSFT_RoleResource/MSFT_RoleResource.psm1 | 537 -- .../MSFT_RoleResource.schema.mof | 16 - .../en-US/MSFT_RoleResource.schema.mfl | Bin 850 -> 0 bytes .../en-US/MSFT_RoleResourceStrings.psd1 | Bin 4438 -> 0 bytes .../MSFT_ScriptResource.psm1 | 281 - .../MSFT_ScriptResource.schema.mof | 11 - .../en-US/MSFT_ScriptResource.schema.mfl | Bin 894 -> 0 bytes .../en-US/MSFT_ScriptResourceStrings.psd1 | Bin 2076 -> 0 bytes .../MSFT_ServiceResource.psm1 | 1209 ----- .../MSFT_ServiceResource.schema.mof | 16 - .../en-US/MSFT_ServiceResource.schema.mfl | Bin 3086 -> 0 bytes .../en-US/MSFT_ServiceResource.strings.psd1 | Bin 5738 -> 0 bytes .../MSFT_UserResource/MSFT_UserResource.psm1 | 538 -- .../MSFT_UserResource.schema.mof | 13 - .../en-US/MSFT_UserResource.schema.mfl | Bin 928 -> 0 bytes .../en-US/MSFT_UserResource.strings.psd1 | Bin 2876 -> 0 bytes .../MSFT_WindowsOptionalFeature.psm1 | Bin 16522 -> 0 bytes .../MSFT_WindowsOptionalFeature.schema.mof | 16 - .../MSFT_WindowsOptionalFeature.schema.mfl | Bin 2960 -> 0 bytes .../MSFT_WindowsOptionalFeature.strings.psd1 | Bin 2530 -> 0 bytes .../DSCResources/RunAsHelper.psm1 | 405 -- .../en-US/RunAsHelper.strings.psd1 | Bin 1790 -> 0 bytes .../Disable-DscDebug.cdxml | 28 - .../DSCFileDownloadManager.psd1 | Bin 4684 -> 0 bytes ...oft.PowerShell.DSC.FileDownloadManager.dll | Bin 36352 -> 0 bytes ...hell.DSC.FileDownloadManager.Resources.dll | Bin 6144 -> 0 bytes .../Enable-DscDebug.cdxml | 35 - .../Get-DSCLocalConfigurationManager.cdxml | 34 - .../Get-DscConfiguration.cdxml | 34 - .../Get-DscConfigurationStatus.cdxml | 39 - .../PSDesiredStateConfiguration.format.ps1xml | 394 -- .../PSDesiredStateConfiguration.psd1 | Bin 4588 -> 0 bytes .../PSDesiredStateConfiguration.psm1 | 4519 ----------------- .../PSDesiredStateConfiguration.types.ps1xml | 107 - .../PSDscXMachine.psm1 | 341 -- .../Remove-DscConfigurationDocument.cdxml | 50 - .../Restore-DscConfiguration.cdxml | 28 - .../Stop-DscConfiguration.cdxml | 35 - .../WebDownloadManager.psd1 | Bin 2386 -> 0 bytes .../en-US/PSDSCxMachine.strings.psd1 | Bin 1486 -> 0 bytes .../PSDesiredStateConfiguration.Resource.psd1 | Bin 13340 -> 0 bytes dsc_resource_release_tags.yml | 48 - manifests/lcm_config.pp | 14 - templates/set-lcm-mode.ps1.erb | 50 - types.md | 611 --- 1470 files changed, 103908 deletions(-) delete mode 100644 README_BUILD.md delete mode 100644 README_CENTOS6.md delete mode 100644 build/dsc.rake delete mode 100644 build/dsc.rb delete mode 100644 build/dsc.yaml delete mode 100644 build/dsc/manager.rb delete mode 100644 build/dsc/mof.rb delete mode 100644 build/dsc/property.rb delete mode 100644 build/dsc/psmodule.rb delete mode 100644 build/dsc/resource.rb delete mode 100644 build/dsc/templates/dsc_type.rb.erb delete mode 100644 build/dsc/templates/dsc_type_spec.rb.erb delete mode 100644 build/dsc/templates/pso_pscrendential.ps1.erb delete mode 100644 build/dsc/version.rb delete mode 100644 build/qualifiers/base/MSFT_Qualifiers.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_AGPSoftwareFeature.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_Action.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_ActionSequence.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_ApplicationSystem.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_ApplicationSystemDependency.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_ApplicationSystemDirectory.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_ApplicationSystemHierarchy.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_ApplicationSystemSoftwareFeature.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_ArchitectureCheck.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_AssociatedAppSystemOverviewStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_BIOSElement.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_BIOSFeature.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_BIOSFeatureBIOSElements.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_Check.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_CollectedSoftwareElements.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_CollectedSoftwareFeatures.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_CopyFileAction.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_CreateDirectoryAction.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_DiagnosticTestSoftware.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_DirectoryAction.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_DirectorySpecification.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_DirectorySpecificationFile.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_DiskSpaceCheck.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_ExecuteProgram.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_FRUIncludesSoftwareFeature.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_FileAction.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_FileSpecification.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_FromDirectoryAction.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_FromDirectorySpecification.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_InstalledProduct.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_InstalledProductImage.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_InstalledSoftwareElement.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeAppClientModule.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeApplication.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeApplicationHostedOnServer.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeApplicationModule.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeConnectionFactoryAvailableToJCAResource.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeConnectionPoolStats.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeConnectionStats.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeDeployedObject.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeDomain.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeEJB.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeEJBInModule.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeEJBModule.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeEJBStats.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeEntityBean.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeEntityBeanStats.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJCAConnectionFactory.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJCAConnectionFactoryManagedConnectionFactory.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJCAConnectionPools.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJCAManagedConnectionFactory.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJCANonpooledConnections.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJCAResource.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJCAStats.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJDBCConnectionPools.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJDBCDataSource.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJDBCDataSourceDriver.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJDBCDriver.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJDBCNonpooledConnections.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJDBCResource.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJDBCResourceUsesDataSource.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJDBCStats.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJMSConnectionSessions.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJMSConnectionStats.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJMSConsumerStats.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJMSEndpointStats.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJMSProducerStats.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJMSResource.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJMSSessionConsumers.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJMSSessionProducers.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJMSSessionStats.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJMSStatConnections.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJMSStats.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJNDIResource.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJTAResource.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJTAStats.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJVM.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJVMStats.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJavaMailResource.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeJavaMailStats.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeManagedObject.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeManagedObjectCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeMessageDrivenBean.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeMessageDrivenBeanStats.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeModule.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeModuleUsesJVM.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeNotification.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeRMI_IIOPResource.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeResource.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeResourceAdapter.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeResourceAdapterInModule.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeResourceAdapterModule.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeResourceOnServer.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeServer.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeServerInDomain.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeServerUsesJVM.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeServlet.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeServletInModule.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeServletStats.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeSessionBean.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeSessionBeanStats.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeStatefulSessionBean.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeStatefulSessionBeanStats.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeStatelessSessionBean.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeStatelessSessionBeanStats.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeStatistic.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeURLResource.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeURLStats.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_J2eeWebModule.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_MemoryCheck.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_ModifySettingAction.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_OSVersionCheck.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_OperatingSystemSoftwareFeature.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_ProductSoftwareFeatures.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_RebootAction.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_RemoveDirectoryAction.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_RemoveFileAction.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_SettingCheck.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_SoftwareElement.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_SoftwareElementActions.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_SoftwareElementChecks.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_SoftwareElementComponent.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_SoftwareElementSAPImplementation.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_SoftwareElementServiceImplementation.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_SoftwareElementVersionCheck.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_SoftwareFeature.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_SoftwareFeatureComponent.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_SoftwareFeatureSAPImplementation.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_SoftwareFeatureServiceImplementation.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_SoftwareFeatureSoftwareElements.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_StatisticalRuntimeOverview.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_SwapSpaceCheck.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_SystemBIOS.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_ToDirectoryAction.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_ToDirectorySpecification.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_VersionCompatibilityCheck.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_VideoBIOSElement.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_VideoBIOSFeature.mof delete mode 100644 build/vendor/dmtf_mof/Application/CIM_VideoBIOSFeatureVideoBIOSElements.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ActiveConnection.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ActsAsSpare.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_AdminDomain.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_AllocationCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_AssociatedPowerManagementService.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_BasedOn.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_BindsTo.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_Capabilities.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_CollectedCollections.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_CollectedMSEs.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_Collection.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_CollectionConfiguration.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_CollectionOfMSEs.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_CollectionSetting.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_CompatibleProduct.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_Component.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ConcreteCollection.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ConcreteComponent.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ConcreteDependency.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ConcreteIdentity.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ConcreteJob.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_Configuration.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ConfigurationComponent.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ConfigurationForSystem.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ContainedDomain.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ContainedLocation.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_DefaultSetting.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_Dependency.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_DependencyContext.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_DeviceSAPImplementation.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_DeviceServiceImplementation.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_DeviceStatisticalInformation.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_DeviceStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ElementAllocatedFromPool.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ElementCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ElementConfiguration.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ElementLocation.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ElementProfile.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ElementSetting.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ElementSettingData.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ElementSoftwareIdentity.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ElementStatisticalData.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_EnabledLogicalElement.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_EnabledLogicalElementCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_EthernetPortAllocationSettingData.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ExtentRedundancyComponent.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ExtraCapacityGroup.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_FRU.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_FRUIncludesProduct.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_FRUPhysicalElements.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_HostedAccessPoint.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_HostedCollection.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_HostedDependency.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_HostedResourcePool.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_HostedService.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_InstalledSoftwareIdentity.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_IsSpare.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_Job.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_LastAppliedSnapshot.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_LocalizationCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_Location.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_LogicalDevice.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_LogicalElement.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_LogicalIdentity.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ManagedElement.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ManagedSystemElement.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_MemberOfCollection.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_MethodParameters.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_OpaqueManagementData.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_OpaqueManagementDataCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_OpaqueManagementDataService.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_OrderedComponent.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_OrderedDependency.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_OrderedMemberOfCollection.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_OwningCollectionElement.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ParameterValueSources.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ParametersForMethod.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_PhysicalElement.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_PhysicalElementLocation.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_PhysicalStatisticalInformation.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_PhysicalStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_PowerManagementCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_PowerManagementService.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_PowerUtilizationManagementCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_PowerUtilizationManagementService.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_Product.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ProductComponent.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ProductFRU.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ProductParentChild.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ProductPhysicalComponent.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ProductPhysicalElements.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ProductProductDependency.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ProductServiceComponent.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ProductSoftwareComponent.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ProductSupport.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_Profile.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ProtocolEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ProtocolService.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ProvidesEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ProvidesServiceToElement.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_Realizes.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_RedundancyComponent.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_RedundancyGroup.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_RedundancySet.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_RelatedStatisticalData.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_RelatedStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_RemotePort.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_RemoteServiceAccessPoint.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ReplaceableProductFRU.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ResourceAllocationFromPool.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ResourceAllocationSettingData.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ResourcePool.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ResourcePoolConfigurationCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ResourcePoolConfigurationService.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SAPAvailableForElement.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SAPSAPDependency.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SAPStatisticalInformation.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SAPStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ScopedSetting.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ScopedSettingData.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_Service.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ServiceAccessBySAP.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ServiceAccessPoint.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ServiceAccessURI.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ServiceAffectsElement.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ServiceAffectsElementWithQuota.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ServiceAvailableToElement.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ServiceComponent.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ServiceSAPDependency.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ServiceServiceDependency.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ServiceStatisticalInformation.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_ServiceStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_Setting.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SettingAssociatedToCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SettingContext.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SettingData.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SettingForSystem.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SettingsDefineCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SettingsDefineState.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SnapshotOfVirtualSystem.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SoftwareIdentity.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SoftwareInstallationService.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SoftwareInstallationServiceCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SpareGroup.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_Spared.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_StatisticalData.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_StatisticalInformation.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_StatisticalSetting.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_Statistics.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_StatisticsCollection.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_StorageAllocationSettingData.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_StorageExtent.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_StorageRedundancyGroup.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_StorageRedundancySet.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SupportAccess.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_Synchronized.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_System.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SystemComponent.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SystemConfiguration.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SystemDevice.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SystemPackaging.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SystemSetting.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SystemSettingContext.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SystemSpecificCollection.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SystemStatisticalInformation.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_SystemStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_TimeService.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_View.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_VirtualEthernetSwitchSettingData.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_VirtualSystemManagementCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_VirtualSystemManagementService.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_VirtualSystemSettingData.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_VirtualSystemSnapshotCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_VirtualSystemSnapshotService.mof delete mode 100644 build/vendor/dmtf_mof/Core/CIM_VirtualSystemSnapshotServiceCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Database/CIM_AssociatedDatabaseSystem.mof delete mode 100644 build/vendor/dmtf_mof/Database/CIM_CommonDatabase.mof delete mode 100644 build/vendor/dmtf_mof/Database/CIM_CommonDatabaseCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Database/CIM_CommonDatabaseSettingData.mof delete mode 100644 build/vendor/dmtf_mof/Database/CIM_CommonDatabaseStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Database/CIM_DatabaseAdministrator.mof delete mode 100644 build/vendor/dmtf_mof/Database/CIM_DatabaseControlFile.mof delete mode 100644 build/vendor/dmtf_mof/Database/CIM_DatabaseFile.mof delete mode 100644 build/vendor/dmtf_mof/Database/CIM_DatabaseParameter.mof delete mode 100644 build/vendor/dmtf_mof/Database/CIM_DatabaseResourceStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Database/CIM_DatabaseSegment.mof delete mode 100644 build/vendor/dmtf_mof/Database/CIM_DatabaseSegmentSettingData.mof delete mode 100644 build/vendor/dmtf_mof/Database/CIM_DatabaseService.mof delete mode 100644 build/vendor/dmtf_mof/Database/CIM_DatabaseServiceStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Database/CIM_DatabaseStorage.mof delete mode 100644 build/vendor/dmtf_mof/Database/CIM_DatabaseStorageArea.mof delete mode 100644 build/vendor/dmtf_mof/Database/CIM_DatabaseSystem.mof delete mode 100644 build/vendor/dmtf_mof/Database/CIM_SNMPDatabaseParameter.mof delete mode 100644 build/vendor/dmtf_mof/Database/CIM_ServiceAvailableToDatabase.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ADSLModem.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AGPVideoController.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AccessLabelReader.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AdapterActiveConnection.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AggregatePExtent.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AggregatePSExtent.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AggregatePSExtentBasedOnAggregatePExtent.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AggregatePSExtentBasedOnPExtent.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AggregateRedundancyComponent.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AlarmDevice.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AlarmDeviceCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AllocatedFromStoragePool.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AssociatedAlarm.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AssociatedBattery.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AssociatedBlockStatisticsManifestCollection.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AssociatedCacheMemory.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AssociatedComponentExtent.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AssociatedCooling.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AssociatedIndicatorLED.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AssociatedLabelReader.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AssociatedMemory.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AssociatedProcessorMemory.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AssociatedProtocolController.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AssociatedRemainingExtent.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AssociatedSensor.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AssociatedSupplyCurrentSensor.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_AssociatedSupplyVoltageSensor.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_BIOSLoadedInNV.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_Battery.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_BinarySensor.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_BlockStatisticsCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_BlockStatisticsManifest.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_BlockStatisticsManifestCollection.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_BlockStatisticsService.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_BlockStorageStatisticalData.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_CDROMDrive.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_CableModem.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_CacheMemory.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_CallBasedModem.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ChangerDevice.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_CollectionOfSensors.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_CompositeExtent.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_CompositeExtentBasedOn.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ComputerSystemMemory.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ComputerSystemProcessor.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ConfigurationReportingService.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ConnectionBasedModem.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ControlledBy.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_Controller.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ControllerConfigurationService.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_CoolingDevice.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_CurrentSensor.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_DSLModem.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_DVDDrive.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_DesktopMonitor.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_DeviceConnection.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_DeviceErrorCounts.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_DeviceErrorData.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_DeviceIdentity.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_DeviceServicesLocation.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_DeviceSharingCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_DeviceSoftware.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_DiscreteSensor.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_DiskDrive.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_DiskGroup.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_DiskPartition.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_DiskPartitionBasedOnVolume.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_DisketteDrive.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_Display.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_Door.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_DoorAccessToDevice.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_DoorAccessToPhysicalElement.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_DriveInDiskGroup.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ESCONController.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ErrorCountersForDevice.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_EthernetAdapter.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_EthernetPort.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_EthernetPortStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ExtentInDiskGroup.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_FCAdapterEventCounters.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_FCPort.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_FCPortCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_FCPortRateStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_FCPortStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_FCSwitchCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_FCSwitchSettings.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_Fan.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_FibreChannelAdapter.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_FibrePort.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_FibrePortActiveLogin.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_FibrePortEventCounters.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_FibrePortOnFCAdapter.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_FibreProtocolService.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_FlatPanel.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_GroupInDiskGroup.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_HDSLModem.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_HardwareThread.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_HeatPipe.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_HostedStoragePool.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_IBSubnetManager.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_IDEController.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ISDNModem.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_IndicatorLED.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_IndicatorLEDCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_InfraredController.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_InterLibraryPort.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_Keyboard.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_LabelReader.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_LabelReaderStatData.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_LabelReaderStatInfo.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_LibraryExchange.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_LibraryPackage.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_LimitedAccessPort.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_LogicalDisk.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_LogicalDiskBasedOnExtent.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_LogicalDiskBasedOnPartition.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_LogicalDiskBasedOnVolume.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_LogicalDiskBasedOnVolumeSet.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_LogicalModule.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_LogicalPort.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_LogicalPortCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_LogicalPortGroup.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_LogicalPortSettings.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_MagnetoOpticalDrive.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ManagementController.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_MediaAccessDevice.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_MediaAccessStatData.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_MediaAccessStatInfo.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_MediaPartition.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_MediaPresent.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_MediaTransferDevice.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_Memory.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_MemoryError.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_Modem.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ModulePort.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_MonitorResolution.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_MonitorSetting.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_MultiStateSensor.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_NetworkAdapter.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_NetworkAdapterRedundancyComponent.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_NetworkPort.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_NetworkPortCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_NetworkPortStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_NetworkVirtualAdapter.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_NonVolatileStorage.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_NumericSensor.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_OOBAlertServiceOnModem.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_OOBAlertServiceOnNetworkAdapter.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_OOBAlertServiceOnNetworkPort.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_OwningPrintQueue.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PCIBridge.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PCIController.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PCIDevice.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PCIPort.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PCIPortGroup.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PCIeSwitch.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PCMCIAController.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PCVideoController.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PExtentRedundancyComponent.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_POTSModem.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PSExtentBasedOnPExtent.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PackageAlarm.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PackageCooling.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PackageDependency.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PackageTempSensor.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ParallelController.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PassThroughModule.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PhysicalExtent.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PickerElement.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PickerForChanger.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PickerLabelReader.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PickerStatData.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PickerStatInfo.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PointingDevice.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PortActiveConnection.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PortController.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PortImplementsEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PortOnDevice.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PowerAllocationSettingData.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PowerSupply.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PrintJob.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PrintJobFile.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PrintQueue.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PrintSAP.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PrintService.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_Printer.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PrinterServicingJob.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_PrinterServicingQueue.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_Processor.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ProcessorCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ProcessorCore.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ProtectedExtentBasedOn.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ProtectedSpaceExtent.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ProtocolController.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ProtocolControllerAccessesUnit.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ProtocolControllerForDevice.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ProtocolControllerForPort.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ProtocolControllerForUnit.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ProtocolControllerMaskingCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_QueueForPrintService.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_QueueForwardsToPrintSAP.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_RealizedOnSide.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_RealizesAggregatePExtent.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_RealizesDiskPartition.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_RealizesExtent.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_RealizesPExtent.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_RealizesTapePartition.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_Refrigeration.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_SCSIController.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_SCSIInitiatorTargetLogicalUnitPath.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_SCSIInterface.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_SCSIProtocolController.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_SDSLModem.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_SSAController.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_Scanner.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_Sensor.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_SerialController.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_SerialInterface.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_SharedDeviceManagementService.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_SharingDependency.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_Snapshot.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_SnapshotOfExtent.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_StatisticsCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_StatisticsService.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_StorageCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_StorageConfigurationCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_StorageConfigurationService.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_StorageDefect.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_StorageError.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_StorageLibrary.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_StoragePool.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_StorageReplicationCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_StorageSetting.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_StorageSettingWithHints.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_StorageSettingsAssociatedToCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_StorageSettingsGeneratedFromCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_StorageSynchronized.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_StorageVolume.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_SuppliesPower.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_Tachometer.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_TapeDrive.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_TapePartition.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_TapePartitionOnSurface.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_TemperatureSensor.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_TokenRingAdapter.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_TokenRingPort.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_TokenRingPortStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_USBConnection.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_USBController.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_USBControllerHasHub.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_USBDevice.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_USBHub.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_USBPort.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_USBPortOnHub.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_Unimodem.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_UninterruptiblePowerSupply.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_UserDevice.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_VDSLModem.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_VideoController.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_VideoControllerResolution.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_VideoSetting.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_VolatileStorage.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_VoltageSensor.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_VolumeSet.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_VolumeSetBasedOnPSExtent.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_WORMDrive.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_WakeUpServiceOnModem.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_WakeUpServiceOnNetworkAdapter.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_WakeUpServiceOnNetworkPort.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_Watchdog.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_WiFiEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_WiFiPort.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_WiFiPortCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_WiFiPortConfigurationService.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_WiFiRadio.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_Zone.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ZoneCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ZoneMembershipSettingData.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ZoneService.mof delete mode 100644 build/vendor/dmtf_mof/Device/CIM_ZoneSet.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_AbstractIndicationSubscription.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_AlertIndication.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_AlertInstIndication.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_ClassCreation.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_ClassDeletion.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_ClassIndication.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_ClassModification.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_FilterCollection.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_FilterCollectionSubscription.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_FormattedIndicationSubscription.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_Indication.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_IndicationFilter.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_IndicationHandler.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_IndicationHandlerCIMXML.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_IndicationService.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_IndicationServiceCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_IndicationServiceSettingData.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_IndicationSubscription.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_InstCreation.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_InstDeletion.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_InstIndication.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_InstMethodCall.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_InstModification.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_InstRead.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_ListenerDestination.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_ListenerDestinationCIMXML.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_ListenerDestinationWSManagement.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_ProcessIndication.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_SNMPTrapIndication.mof delete mode 100644 build/vendor/dmtf_mof/Event/CIM_ThresholdIndication.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_ContainedProposal.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_ContainedTransform.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_IKEAction.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_IKEProposal.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_IKERule.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecAction.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecPolicyForEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecPolicyForSystem.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecProposal.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecRule.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecTransportAction.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecTunnelAction.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_PacketConditionInSARule.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_PeerGatewayForPreconfiguredTunnel.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_PeerGatewayForTunnel.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_PreconfiguredSAAction.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_PreconfiguredTransportAction.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_PreconfiguredTunnelAction.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_RuleThatGeneratedSA.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_SAAction.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_SANegotiationAction.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_SAProposal.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_SARule.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_SAStaticAction.mof delete mode 100644 build/vendor/dmtf_mof/IPsecPolicy/CIM_TransformOfPreconfiguredAction.mof delete mode 100644 build/vendor/dmtf_mof/Interop/CIM_CIMOMStatisticalData.mof delete mode 100644 build/vendor/dmtf_mof/Interop/CIM_CIMXMLCommunicationMechanism.mof delete mode 100644 build/vendor/dmtf_mof/Interop/CIM_CommMechanismForAdapter.mof delete mode 100644 build/vendor/dmtf_mof/Interop/CIM_CommMechanismForManager.mof delete mode 100644 build/vendor/dmtf_mof/Interop/CIM_CommMechanismForObjectManagerAdapter.mof delete mode 100644 build/vendor/dmtf_mof/Interop/CIM_ElementConformsToProfile.mof delete mode 100644 build/vendor/dmtf_mof/Interop/CIM_Error.mof delete mode 100644 build/vendor/dmtf_mof/Interop/CIM_IdentificationOfManagedSystem.mof delete mode 100644 build/vendor/dmtf_mof/Interop/CIM_Namespace.mof delete mode 100644 build/vendor/dmtf_mof/Interop/CIM_NamespaceInManager.mof delete mode 100644 build/vendor/dmtf_mof/Interop/CIM_ObjectManager.mof delete mode 100644 build/vendor/dmtf_mof/Interop/CIM_ObjectManagerAdapter.mof delete mode 100644 build/vendor/dmtf_mof/Interop/CIM_ObjectManagerCommunicationMechanism.mof delete mode 100644 build/vendor/dmtf_mof/Interop/CIM_ProtocolAdapter.mof delete mode 100644 build/vendor/dmtf_mof/Interop/CIM_ReferencedProfile.mof delete mode 100644 build/vendor/dmtf_mof/Interop/CIM_RegisteredProfile.mof delete mode 100644 build/vendor/dmtf_mof/Interop/CIM_RegisteredSubProfile.mof delete mode 100644 build/vendor/dmtf_mof/Interop/CIM_SubProfileRequiresProfile.mof delete mode 100644 build/vendor/dmtf_mof/Interop/CIM_SystemIdentification.mof delete mode 100644 build/vendor/dmtf_mof/Interop/CIM_SystemInNamespace.mof delete mode 100644 build/vendor/dmtf_mof/Interop/CIM_WBEMService.mof delete mode 100644 build/vendor/dmtf_mof/Metrics/CIM_AggregationMetricDefinition.mof delete mode 100644 build/vendor/dmtf_mof/Metrics/CIM_AggregationMetricValue.mof delete mode 100644 build/vendor/dmtf_mof/Metrics/CIM_BaseMetricDefinition.mof delete mode 100644 build/vendor/dmtf_mof/Metrics/CIM_BaseMetricValue.mof delete mode 100644 build/vendor/dmtf_mof/Metrics/CIM_LogicalElementPerformsUoW.mof delete mode 100644 build/vendor/dmtf_mof/Metrics/CIM_LogicalElementUnitOfWorkDef.mof delete mode 100644 build/vendor/dmtf_mof/Metrics/CIM_MetricDefForME.mof delete mode 100644 build/vendor/dmtf_mof/Metrics/CIM_MetricDefinition.mof delete mode 100644 build/vendor/dmtf_mof/Metrics/CIM_MetricForME.mof delete mode 100644 build/vendor/dmtf_mof/Metrics/CIM_MetricInstance.mof delete mode 100644 build/vendor/dmtf_mof/Metrics/CIM_MetricService.mof delete mode 100644 build/vendor/dmtf_mof/Metrics/CIM_MetricServiceCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Metrics/CIM_StartedUoW.mof delete mode 100644 build/vendor/dmtf_mof/Metrics/CIM_SubUoW.mof delete mode 100644 build/vendor/dmtf_mof/Metrics/CIM_SubUoWDef.mof delete mode 100644 build/vendor/dmtf_mof/Metrics/CIM_TraceLevelType.mof delete mode 100644 build/vendor/dmtf_mof/Metrics/CIM_UnitOfWork.mof delete mode 100644 build/vendor/dmtf_mof/Metrics/CIM_UnitOfWorkDefinition.mof delete mode 100644 build/vendor/dmtf_mof/Metrics/CIM_UoWDefTraceLevelType.mof delete mode 100644 build/vendor/dmtf_mof/Metrics/CIM_UoWMetric.mof delete mode 100644 build/vendor/dmtf_mof/Metrics/CIM_UoWMetricDefinition.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_AFRelatedServices.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_AFService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_AHTransform.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_ASBGPEndpoints.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_AdministrativeDistance.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_AllocationSchedulingElement.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_AreaOfConfiguration.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_AssociatedNextHop.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_AutonomousSystem.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_AverageRateMeterService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_BGPAdminDistance.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_BGPAttributes.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_BGPAttributesForRoute.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_BGPCluster.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_BGPClustersInAS.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_BGPEndpointStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_BGPIPRoute.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_BGPPathAttributes.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_BGPPeerGroup.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_BGPPeerGroupService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_BGPPeerUsesRouteMap.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_BGPProtocolEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_BGPRouteMap.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_BGPRouteMapsInRoutingPolicy.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_BGPRoutingPolicy.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_BGPService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_BGPServiceAttributes.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_BGPServiceStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_BGPStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_BindsToLANEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_BoundedPrioritySchedulingElement.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_BufferPool.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_CLPCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_CLPProtocolEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_CLPSettingData.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_CalculatedRoutes.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_CalculatesAmong.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_CalculationBasedOnQueue.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_CalculationServiceForDropper.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_ClassifierElement.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_ClassifierElementInClassifierService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_ClassifierElementUsesFilterList.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_ClassifierFilterSet.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_ClassifierService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_CollectedBufferPool.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_ConditioningService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_ConditioningServiceOnEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_Confederation.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_ConnectivityCollection.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_ConnectivityMembershipSettingData.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_DHCPCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_DHCPProtocolEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_DHCPSettingData.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_DNSGeneralSettingData.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_DNSProtocolEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_DNSSettingData.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_DSCPMarkerService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_DiffServService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_DropThresholdCalculationService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_DropperService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_DynamicForwardingEntry.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_EFService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_EGPRouteCalcDependency.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_ESPTransform.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_EWMAMeterService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_EgressConditioningServiceOnEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_ElementInSchedulingService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_EndpointIdentity.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_EndpointInArea.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_EndpointInLink.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_EndpointOfNetworkPipe.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_EntriesInFilterList.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_FailNextScheduler.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_FilterEntry.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_FilterEntryBase.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_FilterEntryInSystem.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_FilterList.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_FilterListInSystem.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_FilterListsInBGPRouteMap.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_FilterOfSecurityAssociation.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_FilteredBGPAttributes.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_FlowService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_ForwardedRoutes.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_ForwardingService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_ForwardsAmong.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_Hdr8021Filter.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_Hdr8021PService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_HeadTailDropQueueBinding.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_HeadTailDropper.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_HostedAdminDistance.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_HostedBGPAttributes.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_HostedBGPPeerGroup.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_HostedBGPRouteMap.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_HostedFilterEntryBase.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_HostedFilterList.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_HostedForwardingServices.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_HostedNetworkPipe.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_HostedRoute.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_HostedRoutingPolicy.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_HostedRoutingServices.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_IEEE8021xCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_IEEE8021xSettings.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_IKESAEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_IPAddressRange.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_IPAssignmentSettingData.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_IPCOMPTransform.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_IPConfigurationService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_IPConnectivitySubnet.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_IPHeadersFilter.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_IPProtocolEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_IPRoute.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_IPSOFilterEntry.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_IPSubnet.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_IPXConnectivityNetwork.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_IPXNetwork.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_IPXProtocolEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_IPsecSAEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_InBGPPeerGroup.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_InLogicalNetwork.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_InSegment.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_InboundVLAN.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_IngressConditioningServiceOnEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_KVMRedirectionSAP.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_LANConnectivitySegment.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_LANEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_LANSegment.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_ListsInRoutingPolicy.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_LogicalNetwork.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_LogicalNetworkService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_MarkerService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_MediaRedirectionCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_MediaRedirectionSAP.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_MeterService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_NamedAddressCollection.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_Network.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_NetworkPipe.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_NetworkPipeComposition.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_NetworkPortConfigurationService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_NetworkService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_NetworkServicesInAdminDomain.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_NetworkVLAN.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_NetworksInAdminDomain.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_NextHopIPRoute.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_NextHopRoute.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_NextHopRouting.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_NextScheduler.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_NextService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_NextServiceAfterClassifierElement.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_NextServiceAfterMeter.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_NonWorkConservingSchedulingService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_OSPFArea.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_OSPFAreaConfiguration.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_OSPFLink.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_OSPFProtocolEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_OSPFProtocolEndpointBase.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_OSPFService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_OSPFServiceCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_OSPFServiceConfiguration.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_OSPFVirtualInterface.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_OutboundVLAN.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_PacketSchedulingService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_PeerIDPayloadFilterEntry.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_PeerOfSAEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_Phase1SAUsedForPhase2.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_PreambleFilter.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_PreambleMarkerService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_PrecedenceService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_Priority8021QMarkerService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_PrioritySchedulingElement.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_ProtocolServiceCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_QoSConditioningSubService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_QoSService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_QoSSubService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_QueueAllocation.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_QueueHierarchy.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_QueueToSchedule.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_QueuingService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_REDDropperService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_RangeOfIPAddresses.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_RangesOfConfiguration.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_RedirectionService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_RedirectionServiceCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_ReflectorClientService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_ReflectorNonClientService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_ReflectorService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_RelatedSpanningTree.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_RelatedTransparentBridgingService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_RemoteAccessAvailableToElement.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_RouteCalculationService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_RouteForwardedByService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_RouteUsesEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_RoutersInAS.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_RoutersInBGPCluster.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_RoutesBGP.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_RoutingPolicy.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_RoutingProtocolDomain.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_RoutingProtocolDomainInAS.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SAEndpointConnectionStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SAEndpointRefreshSettings.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SATransform.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SCSIProtocolEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SNMPCommunityString.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SNMPService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SNMPTrapTarget.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SSHCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SSHProtocolEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SSHSettingData.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SchedulerUsed.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SchedulingElement.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SchedulingServiceToSchedule.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SecurityAssociationEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SourceRoutingService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SpanningTreeService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SpanningTreeStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_Specific802dot1QVLANService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_StaticForwardingEntry.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_StaticIPAssignmentSettingData.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SwitchPort.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SwitchPortDynamicForwarding.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SwitchPortPair.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SwitchPortSourceRouting.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SwitchPortSourceRoutingStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SwitchPortSpanningTree.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SwitchPortSpanningTreeStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SwitchPortStaticForwarding.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SwitchPortStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SwitchPortTransparentBridgingStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SwitchService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SwitchServiceSourceRouting.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SwitchServiceSpanningTree.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SwitchServiceTransparentBridging.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SwitchServiceVLAN.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_Switchable.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_SwitchesAmong.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_TCPProtocolEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_TelnetCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_TelnetProtocolEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_TelnetSettingData.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_TextRedirectionSAP.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_TextRedirectionService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_ToSMarkerService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_TokenBucketMeterService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_TransformOfSecurityAssociation.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_TransparentBridgingDynamicForwarding.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_TransparentBridgingService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_TransparentBridgingStaticForwarding.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_TransparentBridgingStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_TrapSourceForSNMPService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_UDPProtocolEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_USBRedirectionCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_USBRedirectionSAP.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_USBRedirectionService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_VLAN.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_VLANEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_VLANFor.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_VLANService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_WRRSchedulingElement.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_WeightedREDDropperService.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_WiFiEndpointCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_WiFiEndpointSettings.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_WiFiNetworkDetectionSettings.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_X509CredentialFilterEntry.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_iSCSICapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_iSCSIConnection.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_iSCSIConnectionSettings.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_iSCSILoginStatistics.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_iSCSIProtocolEndpoint.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_iSCSISession.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_iSCSISessionFailures.mof delete mode 100644 build/vendor/dmtf_mof/Network/CIM_iSCSISessionSettings.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_AdjacentSlots.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_Card.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_CardInSlot.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_CardOnCard.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_Chassis.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_ChassisInRack.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_Chip.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_ConfigurationCapacity.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_ConnectedTo.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_ConnectorOnPackage.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_Container.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_Docked.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_ElementCapacity.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_ElementInConnector.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_ElementsLinked.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_HomeForMedia.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_LinkHasConnector.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_Magazine.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_MediaPhysicalStatData.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_MediaPhysicalStatInfo.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_MemoryCapacity.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_MemoryOnCard.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_MemoryWithMedia.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_PackageInChassis.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_PackageInConnector.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_PackageInSlot.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_PackageLocation.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_PackagedComponent.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_ParticipatesInSet.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_PhysicalAssetCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_PhysicalCapacity.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_PhysicalComponent.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_PhysicalConnector.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_PhysicalFrame.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_PhysicalLink.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_PhysicalMedia.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_PhysicalMediaInLocation.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_PhysicalMemory.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_PhysicalPackage.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_PhysicalTape.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_Rack.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_ReplacementSet.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_Slot.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_SlotInSlot.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_StorageMediaLocation.mof delete mode 100644 build/vendor/dmtf_mof/Physical/CIM_SystemBusCard.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_AcceptCredentialFrom.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_AccountAuthentication.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_AuthenticationCondition.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_AuthenticationRule.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_BiometricAuthentication.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_CompoundPolicyAction.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_CompoundPolicyCondition.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_DocumentAuthentication.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_ElementInPolicyRoleCollection.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_FilterOfPacketCondition.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_KerberosAuthentication.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_MethodAction.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_NetworkPacketAction.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_NetworkingIDAuthentication.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PacketFilterCondition.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PhysicalCredentialAuthentication.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_Policy.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyAction.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyActionInPolicyAction.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyActionInPolicyRepository.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyActionInPolicyRule.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyActionStructure.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyComponent.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyCondition.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyConditionInPolicyCondition.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyConditionInPolicyRepository.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyConditionInPolicyRule.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyConditionStructure.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyContainerInPolicyContainer.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyGroup.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyGroupInPolicyGroup.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyGroupInSystem.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyInSystem.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyRepository.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyRepositoryInPolicyRepository.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyRoleCollection.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyRoleCollectionInSystem.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyRule.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyRuleInPolicyGroup.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyRuleInSystem.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyRuleValidityPeriod.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicySet.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicySetAppliesToElement.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicySetComponent.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicySetInRoleCollection.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicySetInSystem.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicySetValidityPeriod.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PolicyTimePeriodCondition.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_PublicPrivateKeyAuthentication.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_QueryCondition.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_RejectConnectionAction.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_ReusablePolicy.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_ReusablePolicyContainer.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_SharedSecretAuthentication.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_VendorPolicyAction.mof delete mode 100644 build/vendor/dmtf_mof/Policy/CIM_VendorPolicyCondition.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_Activity.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_ActivityContact.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_ActivityResource.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_ActivityTransaction.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_Address.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_AddressLocation.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_AdminAssociation.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_Administrative.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_AdministrativeContact.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_AdministrativeRevision.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_Agreement.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_Attached.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_Attachment.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_Categorization.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_Category.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_CategoryParentChild.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_Contact.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_ContactContactItem.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_ContactItem.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_ContactItemAddress.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_ContactOrganization.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_ContactPerson.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_ExchangeElement.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_Expression.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_ExpressionElement.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_ExpressionLink.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_Feature.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_FeatureResource.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_Location.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_Organization.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_Person.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_Problem.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_Product.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_ProductAsset.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_ProductComponent.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_ProductParentChild.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_Reference.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_Resolution.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_ResolutionResource.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_Resource.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_Revision.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_RevisionContact.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_SISService.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_ServiceActivity.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_ServiceAgreement.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_ServiceIncident.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_ServiceProblem.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_ServiceProvider.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_ServiceRequester.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_ServiceResolutionSolution.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_Solution.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_SolutionCategory.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_SolutionElement.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_SolutionExpression.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_SolutionHasElement.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_SolutionProblem.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_SolutionReference.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_SolutionResolution.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_Statement.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_StatementFeature.mof delete mode 100644 build/vendor/dmtf_mof/Support/PRS_Transaction.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_AffectedJobElement.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_AllocatedDMA.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_AllocatedResource.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_AvailableDiagnosticService.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_BIOSAttribute.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_BIOSEnumeration.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_BIOSInteger.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_BIOSPassword.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_BIOSService.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_BIOSServiceCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_BIOSString.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_BootConfigSetting.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_BootOSFromFS.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_BootSAP.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_BootService.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_BootServiceAccessBySAP.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_BootServiceCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_BootSettingData.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_BootSourceSetting.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_Cluster.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_ClusterServiceAccessBySAP.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_ClusteringSAP.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_ClusteringService.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_ComponentCS.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_ComputerSystem.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_ComputerSystemDMA.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_ComputerSystemIRQ.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_ComputerSystemMappedIO.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_ComputerSystemNodeCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_ComputerSystemPackage.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_ComputerSystemResource.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_CorrespondingSettingDataRecord.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_CorrespondingSettingsRecord.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DMA.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DataFile.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DeviceAccessedByFile.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DeviceFile.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DiagnosticCompletionRecord.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DiagnosticLog.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DiagnosticRecord.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DiagnosticResult.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DiagnosticResultForMSE.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DiagnosticResultForTest.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DiagnosticResultInPackage.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DiagnosticService.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DiagnosticServiceCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DiagnosticServiceRecord.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DiagnosticSetting.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DiagnosticSettingData.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DiagnosticSettingDataRecord.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DiagnosticSettingForTest.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DiagnosticSettingRecord.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DiagnosticTest.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DiagnosticTestForMSE.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DiagnosticTestInPackage.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DiagnosticsLog.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_Directory.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_DirectoryContainsFile.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_Export.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_FIFOPipeFile.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_FileIdentity.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_FileStorage.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_FileSystem.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_FileSystemCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_FileSystemSettingData.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_HelpService.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_HelpServiceAvailableToFile.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_HostedBootSAP.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_HostedBootService.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_HostedClusterSAP.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_HostedClusterService.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_HostedFileSystem.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_HostedJobDestination.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_HostingCS.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_IRQ.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_InstalledOS.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_JobDestination.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_JobDestinationJobs.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_JobQueue.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_JobSettingData.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_LocalFileSystem.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_Log.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_LogEntry.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_LogInDataFile.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_LogInDeviceFile.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_LogInStorage.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_LogManagesRecord.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_LogRecord.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_LogicalFile.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_MemoryMappedIO.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_MemoryResource.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_MessageLog.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_Mount.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_NFS.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_OOBAlertService.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_OSProcess.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_OperatingSystem.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_OperatingSystemCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_OperationLog.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_OwningJobElement.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_ParticipatingCS.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_PlatformWatchdogService.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_PlatformWatchdogServiceCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_PortResource.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_Process.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_ProcessExecutable.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_ProcessOfJob.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_ProcessThread.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_RecordAppliesToElement.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_RecordForLog.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_RecordInLog.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_RecordLog.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_RemoteFileSystem.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_ResidesOnExtent.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_ResourceOfSystem.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_RunningOS.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_ServiceProcess.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_SymbolicLink.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_SystemPartition.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_SystemResource.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_Thread.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_TimeZone.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_UnitaryComputerSystem.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_UnixDeviceFile.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_UnixDirectory.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_UnixFile.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_UnixLocalFileSystem.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_UnixProcess.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_UnixProcessStatisticalInformation.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_UnixProcessStatistics.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_UnixThread.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_UseOfLog.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_UseOfMessageLog.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_VirtualComputerSystem.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_VirtualSystemSettingDataComponent.mof delete mode 100644 build/vendor/dmtf_mof/System/CIM_WakeUpService.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_AccessControlInformation.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_Account.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_AccountIdentity.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_AccountManagementCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_AccountManagementService.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_AccountMapsToAccount.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_AccountOnSystem.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_AccountSettingData.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_AssignedIdentity.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_AssociatedPrivilege.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_AuthenticateForUse.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_AuthenticationRequirement.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_AuthenticationService.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_AuthenticationTarget.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_AuthorizationService.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_AuthorizationSubject.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_AuthorizationTarget.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_AuthorizedPrivilege.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_AuthorizedSubject.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_AuthorizedTarget.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_AuthorizedUse.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_CAHasPublicCertificate.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_CASignsPublicKeyCertificate.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_CertificateAuthority.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_CollectionInOrganization.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_CollectionInSystem.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_Credential.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_CredentialContext.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_CredentialManagementSAP.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_CredentialManagementService.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_ElementAsUser.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_ElementSecuritySensitivity.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_GatewayPathID.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_Group.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_HostedACI.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_HostedAuthenticationRequirement.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_IKESecretIsNamed.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_IPNetworkIdentity.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_Identity.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_IdentityContext.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_KDCIssuesKerberosTicket.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_KerberosKeyDistributionCenter.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_KerberosTicket.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_LocalCredentialManagementService.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_LocallyManagedPublicKey.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_ManagedCredential.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_ManagesAccount.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_ManagesAccountOnSystem.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_MemberPrincipal.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_MoreGroupInfo.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_MoreOrgUnitInfo.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_MoreOrganizationInfo.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_MorePersonInfo.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_MoreRoleInfo.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_NamedSharedIKESecret.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_Notary.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_NotaryVerifiesBiometric.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_OpaqueManagementDataOwner.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_OrgStructure.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_OrgUnit.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_Organization.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_OrganizationalEntity.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_OtherGroupInformation.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_OtherOrgUnitInformation.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_OtherOrganizationInformation.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_OtherPersonInformation.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_OtherRoleInformation.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_Person.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_Privilege.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_PrivilegeManagementCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_PrivilegeManagementService.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_PublicKeyCertificate.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_PublicKeyManagementService.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_PublicPrivateKeyPair.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_RequireCredentialsFrom.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_Role.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_RoleBasedAuthorizationService.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_RoleBasedManagementCapabilities.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_RoleLimitedToTarget.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_SecuritySensitivity.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_SecurityService.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_SecurityServiceForSystem.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_SecurityServiceUsesAccount.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_ServiceUsesSecurityService.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_SharedSecret.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_SharedSecretIsShared.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_SharedSecretService.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_StorageClientSettingData.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_StorageHardwareID.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_StorageHardwareIDManagementService.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_SystemAdministrator.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_SystemAdministratorGroup.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_SystemAdministratorRole.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_TrustHierarchy.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_UnsignedPublicKey.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_UserContact.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_UserEntity.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_UsersAccess.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_UsersAccount.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_UsersCredential.mof delete mode 100644 build/vendor/dmtf_mof/User/CIM_VerificationService.mof delete mode 100644 build/vendor/dmtf_mof/cim_schema_2.26.0.mof delete mode 100644 build/vendor/dmtf_mof/qualifiers.mof delete mode 100644 build/vendor/dmtf_mof/qualifiers_optional.mof delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_ArchiveResource/MSFT_ArchiveResource.psm1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_ArchiveResource/MSFT_ArchiveResource.schema.mof delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_ArchiveResource/en-US/ArchiveProvider.psd1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_ArchiveResource/en-US/MSFT_ArchiveResource.schema.mfl delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_EnvironmentResource/MSFT_EnvironmentResource.psm1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_EnvironmentResource/MSFT_EnvironmentResource.schema.mof delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_EnvironmentResource/en-US/MSFT_EnvironmentResource.schema.mfl delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_EnvironmentResource/en-US/MSFT_EnvironmentResource.strings.psd1 delete mode 100644 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_FileDirectoryConfiguration/MSFT_FileDirectoryConfiguration.schema.mof delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_GroupResource/MSFT_GroupResource.psm1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_GroupResource/MSFT_GroupResource.schema.mof delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_GroupResource/en-US/MSFT_GroupResource.schema.mfl delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_GroupResource/en-US/MSFT_GroupResource.strings.psd1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_LogResource/MSFT_LogResource.schema.mof delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_LogResource/en-US/MSFT_LogResource.schema.mfl delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_PackageResource/MSFT_PackageResource.psm1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_PackageResource/MSFT_PackageResource.schema.mof delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_PackageResource/en-US/MSFT_PackageResource.schema.mfl delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_PackageResource/en-US/PackageProvider.psd1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_ProcessResource/MSFT_ProcessResource.psm1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_ProcessResource/MSFT_ProcessResource.schema.mof delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_ProcessResource/en-US/MSFT_ProcessResource.schema.mfl delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_ProcessResource/en-US/MSFT_ProcessResource.strings.psd1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_RegistryResource/MSFT_RegistryResource.psm1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_RegistryResource/MSFT_RegistryResource.schema.mof delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_RegistryResource/en-US/MSFT_RegistryResource.schema.mfl delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_RegistryResource/en-US/MSFT_RegistryResource.strings.psd1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_RoleResource/MSFT_RoleResource.psm1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_RoleResource/MSFT_RoleResource.schema.mof delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_RoleResource/en-US/MSFT_RoleResource.schema.mfl delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_RoleResource/en-US/MSFT_RoleResourceStrings.psd1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_ScriptResource/MSFT_ScriptResource.psm1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_ScriptResource/MSFT_ScriptResource.schema.mof delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_ScriptResource/en-US/MSFT_ScriptResource.schema.mfl delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_ScriptResource/en-US/MSFT_ScriptResourceStrings.psd1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_ServiceResource/MSFT_ServiceResource.psm1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_ServiceResource/MSFT_ServiceResource.schema.mof delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_ServiceResource/en-US/MSFT_ServiceResource.schema.mfl delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_ServiceResource/en-US/MSFT_ServiceResource.strings.psd1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_UserResource/MSFT_UserResource.psm1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_UserResource/MSFT_UserResource.schema.mof delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_UserResource/en-US/MSFT_UserResource.schema.mfl delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_UserResource/en-US/MSFT_UserResource.strings.psd1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_WindowsOptionalFeature/MSFT_WindowsOptionalFeature.psm1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_WindowsOptionalFeature/MSFT_WindowsOptionalFeature.schema.mof delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_WindowsOptionalFeature/en-US/MSFT_WindowsOptionalFeature.schema.mfl delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/MSFT_WindowsOptionalFeature/en-US/MSFT_WindowsOptionalFeature.strings.psd1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/RunAsHelper.psm1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DSCResources/en-US/RunAsHelper.strings.psd1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/Disable-DscDebug.cdxml delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DownloadManager/DSCFileDownloadManager/DSCFileDownloadManager.psd1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DownloadManager/DSCFileDownloadManager/Microsoft.PowerShell.DSC.FileDownloadManager.dll delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/DownloadManager/DSCFileDownloadManager/en/Microsoft.PowerShell.DSC.FileDownloadManager.Resources.dll delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/Enable-DscDebug.cdxml delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/Get-DSCLocalConfigurationManager.cdxml delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/Get-DscConfiguration.cdxml delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/Get-DscConfigurationStatus.cdxml delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/PSDesiredStateConfiguration.format.ps1xml delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/PSDesiredStateConfiguration.psd1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/PSDesiredStateConfiguration.psm1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/PSDesiredStateConfiguration.types.ps1xml delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/PSDscXMachine.psm1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/Remove-DscConfigurationDocument.cdxml delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/Restore-DscConfiguration.cdxml delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/Stop-DscConfiguration.cdxml delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/WebDownloadManager/WebDownloadManager.psd1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/en-US/PSDSCxMachine.strings.psd1 delete mode 100755 build/vendor/wmf_dsc_resources/PSDesiredStateConfiguration/en-US/PSDesiredStateConfiguration.Resource.psd1 delete mode 100644 dsc_resource_release_tags.yml delete mode 100644 manifests/lcm_config.pp delete mode 100644 templates/set-lcm-mode.ps1.erb delete mode 100644 types.md diff --git a/README_BUILD.md b/README_BUILD.md deleted file mode 100644 index 4afc75ce..00000000 --- a/README_BUILD.md +++ /dev/null @@ -1,120 +0,0 @@ -# Building DSC Resources - -The `dsc` module uses rake tasks to parse the DSC Resource MOF schema files to generate Puppet types. This process pulls the DSC Resources from the github [PowerShell/DSCResources](https:/github.com/powershell/DSCResources) repository using git. This is a point-in-time snapshot, so any time any of those DSC Resources are updated the build process needs to be run again to pull in the updated resources and parse them. To use non Microsoft DSC Resources follow the [Build Custom DSC Resource Types](#building-puppet-types-from-custom-dsc-resources) instructions. - -## Requirements - -* Knowledge of the file structure of a DSC Resource is useful to understand some of the concepts described here. Look at the [Learn More About DSC section](#learn-more-about-dsc-section) of the readme for resources on some of the terms used here. -* This module must be built with a **non-Windows** computer due to limitations in the gems that the builder uses to generate types and specs. -* Git client needs to be version 2.2.0 or above. - -## Setup - -To build the dsc module, clone the GitHub repository and then bundle install all the gem dependencies. - -~~~bash -# clone the dsc repository -git clone https://github.com/puppetlabs/puppetlabs-dsc -# change directory to the code -cd puppetlabs-dsc -# install the needed ruby gems/libs -bundle install --path .bundle/gems --without system_tests -~~~ - -*NOTE*: This guide assumes that you have a working ruby installation with bundler installed. The latest version of ruby is assumed, as of this writing this guide was tested with 1.9.3 and 2.3.1. - -## Considerations/Known Limitations - -When building the types and specs, keep the following considerations in mind: - -* The builder requires a `MOF` and `PSD1` file to build a type. Both need to be present for the build to be successful. -* The `MOF` file encoding should be UTF-8. This ensures the most compatibility with the mof gem. - -## Building Puppet Types from Microsoft DSC Resources - -To download all the Microsoft DSC Resources from the [PowerShell/DSCResources](https:/github.com/powershell/DSCResources) repository, parse, and build puppet types from them, run the following command: - -~~~bash -# Run the build (this will remove all puppet types and build them again) -bundle exec rake dsc:build -~~~ - -As you continue to work, you can clean your working copy and re-build by issuing the following commands: -~~~bash -# Run the build (this will remove all puppet types and build them again) -bundle exec rake dsc:clean -bundle exec rake dsc:build -~~~ - -## Building Puppet Types from Microsoft DSC Resources with the latest version - -The simplest way to rebuild all DSC resources with the latest version is to delete the `dsc_resource_release_tags.yml` prior to building. Alternatively, you can pass `true` to the `update_versions` argument of the `dsc:resources:import` rake task. - -The DSC tag file, called `dsc_resource_release_tags.yml`, determines which versions of the DSC Resources to build. If a DSC resource is not listed in the file, the latest version that has been released to the PowerShell gallery will be used during the build, and then added to the `dsc_resource_release_tags.yml` file. An example file is shown below: - -~~~ yaml ---- -xActiveDirectory: 2.12.0.0-PSGallery -xAdcsDeployment: 1.0.0.0-PSGallery -xAzure: 0.2.0.0-PSGallery -xAzurePack: 1.4.0.0-PSGallery -xBitlocker: 1.1.0.0-PSGallery -xCertificate: 2.1.0.0-PSGallery -xComputerManagement: 1.7.0.0-PSGallery -... -~~~ - -* Note that while the tag file will typically contain PowerShell Gallery tags, any type of [git reference](https://git-scm.com/book/en/v2/Git-Internals-Git-References) can be used, such as a commit SHA. -* The `DSC_REF` environment variable is still honored by the build process however it is no longer necessary as the DSC resource versions are explicitly set in the tag file. - -## Building Puppet Types from Custom DSC Resources - -You can build puppet types from your own custom DSC Resources. - -### Getting started - -When importing or creating custom types, the following considerations will allow the DSC Resource builder to successfully build your types. - -* Review the steps outlined in Building section above. -* Do not try to include your module in the `import` folder by default. When building the first time or during a clean, the builder will delete all files and folders in this directory. It is preferred that you keep those custom modules in a separate location. A suggested location a separate repository where you can use source control on those items. You could also keep those files in `build/vendor/custom` within this repository. -* The builder will import your custom types into the vendored resources `lib/puppet_x/dsc_resources` directory. They are required to be there for the module to successfully find them during a Puppet catalog application. The `dsc` module requires the PowerShell files to be there ***even*** if you have already installed them elsewhere on the machine due to how it points to the location of the resource to avoid issues with duplicate resources. -* The builder requires that there is no versioned subfolder. This means that you should not have a subfolder with a version (like you get when installing existing modules from the PowerShell Gallery). - * You can use existing modules from the Gallery if you install them, then copy the files from the versioned subfolder up to the top level folder and delete the versioned subfolder. -* The builder requires that the PSD1 file be named the same as the parent folder. If your DSC Resource is named `MyAwesomeThing`, the folder structure should be `MyAwesomeThing/MyAwesomeThing.psd1` and not `MyAwesomeThing/SomethingElse.psd1`. The builder also requires a subdirectory called `DSCRsources`. These are standard file and folder requriments for all DSC Resources, please consult DSC Resource building documentation for more information. See the image below: - ![Module Layout - PSD1 file](docs/images/dir_struct_psdname.png) - -### Detailed Steps to Build Custom DSC Resources - -When importing or creating custom types, follow these steps: - -1. Build the module with `bundle exec rake dsc:build` -2. Now take your own modules path and import your types: `bundle exec rake dsc:resources:import["path/to/your/types"]`. This should be the parent path that contains a folder (or folders) of DSC Resources. - e.g. run `bundle exec rake dsc:resources:import["build/vendor/custom"]`. - ![Module Layout - Import the Parent Directory](docs/images/dir_struct_import.png) -3. For each of your own modules you want to import that may be in different parent paths, you can repeat the above step. -4. Rebuild the module with `bundle exec rake dsc:types:build` -5. The rake task will produce new Puppet types based on the MOFs in `lib/puppet/type` and their spec tests in `spec/unit/puppet/type`. These files should never be modified. - * Inspect the actual types, they should be named to lower cased `dsc_DSCRESOURCENAME` and the properties all should be named to lower cased `dsc_DSCPROPERTY`. -6. The rake task will also copy the DSC resources into `lib/puppet_x/dsc_resources/`. This is necessary for the module to find the DSC resource implementations at runtime when applying the Puppet DSC resources. -7. Enjoy! - -### Concise Steps to Build Custom DSC Resources - -```bash -# perform an initial build to setup local copy -bundle exec rake dsc:build -# import your custom DSC Resource, repeat for each seperate directory -bundle exec rake dsc:resources:import["path/to/your/types"] -# parse the MOF files and build the types -bundle exec rake dsc:types:build -# commit the files to your fork -git add . && git commit -m "new custom DSC Resource" -``` - -## Partial support for DSC composite resources - -If you need a puppet type for a DSC composite resources, you have to create a `xxx.schema.mof` file next to your `xxx.schema.psm1` file. - -## Issues - -Please report issues on the Puppet MODULES project [issue tracker](https://tickets.puppetlabs.com/CreateIssue.jspa?pid=10707) diff --git a/README_CENTOS6.md b/README_CENTOS6.md deleted file mode 100644 index 676c6bd8..00000000 --- a/README_CENTOS6.md +++ /dev/null @@ -1,40 +0,0 @@ -Generate the puppet types on a centos 6 box -=========================================== - -```bash -# add software collection -sudo yum install -y centos-release-SCL - -# install ruby193 -sudo yum install -y ruby193 - -# Default to ruby193 -echo "source /opt/rh/ruby193/enable" | sudo tee -a /etc/profile.d/ruby193.sh -source /etc/profile.d/ruby193.sh - -# install build tools and libs -sudo yum install -y gcc gcc-c++ ruby193-ruby-devel libicu-devel zlib-devel libxml2 libxml2-devel libxslt libxslt-devel - -# install git -sudo yum install -y git - -# clone the dsc repo and cd into it -git clone https://github.com/msutter/puppet-dsc.git -cd puppet-dsc - -# install bundler -gem install bundler - -# Use system libs to avoid issues with the nokogiri build -bundle config build.nokogiri --use-system-libraries - -# Exclude debugging/development gems -bundle config --local without development - -# install the needed gems -bundle install - -# fire the generation -bundle exec rake - -``` diff --git a/build/dsc.rake b/build/dsc.rake deleted file mode 100644 index 5b39ca12..00000000 --- a/build/dsc.rake +++ /dev/null @@ -1,331 +0,0 @@ -require 'yaml' - -namespace :dsc do - - # local pathes - dsc_build_path = Pathname.new(__FILE__).dirname - dsc_repo_url = %x(git config --get remote.origin.url).strip - dsc_repo_branch = %x(git rev-parse --abbrev-ref HEAD).strip - # defaults - default_dsc_module_path = dsc_build_path.parent - default_dsc_resources_path = "#{default_dsc_module_path}/import/dsc_resources" - vendor_dsc_resources_path = "#{default_dsc_module_path}/lib/puppet_x/dsc_resources" - - default_repofile = "#{default_dsc_module_path}/Repofile" - default_types_path = "#{default_dsc_module_path}/lib/puppet/type" - default_type_specs_path = "#{default_dsc_module_path}/spec/unit/puppet/type" - - dsc_repo = 'https://github.com/PowerShell/DscResources.git' - dsc_resources_file = "#{default_dsc_module_path}/dsc_resource_release_tags.yml" - - desc "Import and build all" - task :build, [:dsc_module_path] do |t, args| - dsc_module_path = args[:dsc_module_path] || default_dsc_module_path - - if args[:dsc_module_path] - Rake::Task['dsc:module:skeleton'].invoke(dsc_module_path) - end - - # the presence of this git clone does not indicate the source is up to date - Rake::Task['dsc:resources:import'].invoke - Rake::Task['dsc:types:clean'].invoke(dsc_module_path) - Rake::Task['dsc:types:build'].invoke(dsc_module_path) - Rake::Task['dsc:types:document'].invoke(dsc_module_path) - end - - desc "Cleanup all" - task :clean, [:dsc_module_path] do |t, args| - dsc_module_path = args[:dsc_module_path] || default_dsc_module_path - - Rake::Task['dsc:types:clean'].invoke(dsc_module_path) - Rake::Task['dsc:resources:clean'].invoke(default_dsc_resources_path) - end - - namespace :resources do - - item_name = 'DSC Powershell modules files' - desc <<-eod - Import #{item_name} - -Default values: - dsc_resources_path: #{default_dsc_resources_path} -eod - - task :import, [:dsc_resources_path, :update_versions] do |t, args| - dsc_resources_path = args[:dsc_resources_path] || default_dsc_resources_path - dsc_resources_path = File.expand_path(dsc_resources_path) - dsc_resources_path_tmp = "#{dsc_resources_path}_tmp" - update_versions = args[:update_versions] || false - is_custom_resource = (dsc_resources_path != default_dsc_resources_path) - - m = Dsc::Manager.new - - if !is_custom_resource - puts "Downloading and Importing #{item_name}" - cmd = '' - cmd = "git clone #{dsc_repo} #{dsc_resources_path_tmp} && " unless Dir.exist? dsc_resources_path_tmp - cmd += "cd #{dsc_resources_path_tmp}" - cmd += " && git checkout #{ENV['DSC_REF']}" if ENV['DSC_REF'] - cmd += " && git submodule update --init" - - sh cmd - - community_dsc_resources_root = "#{dsc_resources_path_tmp}/xDscResources" - official_dsc_resources_root = "#{dsc_resources_path_tmp}/DscResources" - composite_resources = [ 'xChrome','xDSCResourceDesigner','xDscDiagnostics', - 'xFirefox','xSafeHarbor','xSystemSecurity' ] - - Rake::Task['dsc:resources:checkout'].invoke( - community_dsc_resources_root, update_versions, composite_resources) - Rake::Task['dsc:resources:checkout'].invoke( - official_dsc_resources_root, update_versions, composite_resources) - - # filter out unwanted files - valid_files = m.find_valid_files("#{dsc_resources_path_tmp}/**/*") - - puts "Copying vendored resources from #{dsc_resources_path_tmp} to #{vendor_dsc_resources_path}" - - # remove destination path, copy everything in from the filtered list - valid_files.each do |f| - if f.start_with?("#{community_dsc_resources_root}/") - dscresource_name = f.split(community_dsc_resources_root)[1].split("/")[1] - if f.include?("/#{dscresource_name}/Modules/#{dscresource_name}") - d = f.sub("#{dscresource_name}/Modules/#{dscresource_name}", "#{dscresource_name}") - dest = Pathname.new(d.sub(community_dsc_resources_root, vendor_dsc_resources_path)) - else - dest = Pathname.new(f.sub(community_dsc_resources_root, vendor_dsc_resources_path)) - end - - FileUtils.mkdir_p(dest.dirname) - FileUtils.cp(f, dest) - end - if f.start_with?("#{official_dsc_resources_root}/") - dscresource_name = f.split(official_dsc_resources_root)[1].split("/")[1] - if f.include?("/#{dscresource_name}/Modules/#{dscresource_name}") - d = f.sub("#{dscresource_name}/Modules/#{dscresource_name}", "#{dscresource_name}") - dest = Pathname.new(d.sub(official_dsc_resources_root, vendor_dsc_resources_path)) - else - dest = Pathname.new(f.sub(official_dsc_resources_root, vendor_dsc_resources_path)) - end - - FileUtils.mkdir_p(dest.dirname) - FileUtils.cp(f, dest) - end - end - - # and duplicate the vendored files - FileUtils.cp_r vendor_dsc_resources_path, dsc_resources_path - - puts "Copying vendored resources from #{default_dsc_module_path}/build/vendor/wmf_dsc_resources to #{dsc_resources_path}" - FileUtils.cp_r "#{default_dsc_module_path}/build/vendor/wmf_dsc_resources/.", "#{dsc_resources_path}/" - else - puts "Importing custom types from '#{dsc_resources_path}'" - # filter out unwanted files - valid_files = m.find_valid_files("#{dsc_resources_path}/**/*") - - puts "Copying vendored resources from #{dsc_resources_path} to #{vendor_dsc_resources_path}" - valid_files.each do |f| - dest = Pathname.new(f.sub(dsc_resources_path, vendor_dsc_resources_path)) - FileUtils.mkdir_p(dest.dirname) - FileUtils.cp(f, dest) - end - - puts "Adding custom types to '#{default_dsc_resources_path}'" - FileUtils.mkdir_p(default_dsc_resources_path) unless Dir.exist? default_dsc_resources_path - valid_files.each do |f| - dest = Pathname.new(f.sub(dsc_resources_path, default_dsc_resources_path)) - FileUtils.mkdir_p(dest.dirname) - FileUtils.cp(f, dest) - end - end - end - - task :checkout, [:dsc_resources_path, :update_versions, :blacklist] do |t, args| - dsc_resources_path = args[:dsc_resources_path] - update_versions = args[:update_versions] - blacklist = args[:blacklist] - puts "Getting latest release tags for DSC resources in #{dsc_resources_path}..." - - resource_tags = {} - resource_tags = YAML::load_file("#{dsc_resources_file}") if File.exist? dsc_resources_file - - Dir["#{dsc_resources_path}/*"].each do |dsc_resource_path| - dsc_resource_name = Pathname.new(dsc_resource_path).basename - FileUtils.cd(dsc_resource_path) do - # --date-order probably doesn't matter - # Requires git version 2.2.0 or higher - https://github.com/git/git/commit/9271095cc5571e306d709ebf8eb7f0a388254d9d - tags_raw = %x{ git log --tags --pretty=format:'%D' --simplify-by-decoration --date-order } - # If the conversion of string to version starts to result in errors, - # we should explore pushing this out out to a method where we can - # clean up the tags that may have prerelease versions in them - # similar to what was done in the Chocolatey module - versions = tags_raw.scan(/(\S+)\-PSGallery/).map { | ver | Gem::Version.new(ver[0]) } - if versions.empty? - raise "#{dsc_resource_name} does not have any '*-PSGallery' tags. Appears it has not been released yet. Tags found #{tags_raw.to_s}" - end - - latest_version = versions.max.to_s + "-PSGallery" - tracked_version = resource_tags["#{dsc_resource_name}"] - - update_version = tracked_version.nil? ? true : update_versions - - if update_version - puts "Using the latest/available reference of #{latest_version} for #{dsc_resource_name}." - checkout_version = latest_version - else - puts "Using the specified reference of #{tracked_version} for #{dsc_resource_name}." - checkout_version = tracked_version - end - - # If the checkout_version does not yet exist in the current repo source - # then re-fetch the upstream repository - tag_exists = begin sh "git rev-parse #{checkout_version}" rescue false end - if !tag_exists - puts "#{checkout_version} is not a PSGallery tag. Fetching from git remote" - sh "git fetch" - end - - sh "git checkout #{checkout_version}" - resource_tags["#{dsc_resource_name}"] = checkout_version.encode("UTF-8") - end - end - - resource_tags = resource_tags.reject do |r| - blacklist.include?(r) - end - - File.open("#{dsc_resources_file}", 'w+') { |f| f.write resource_tags.to_yaml } - end - - desc <<-eod - Cleanup #{item_name} - -Default values: - dsc_resources_path: #{default_dsc_resources_path}" -eod - - task :clean, [:dsc_resources_path] do |t, args| - dsc_resources_path = args[:dsc_resources_path] || default_dsc_resources_path - puts "Cleaning #{item_name}" - FileUtils.rm_rf "#{dsc_resources_path}" - FileUtils.rm_rf "#{vendor_dsc_resources_path}" - FileUtils.rm_rf "#{default_dsc_module_path}/import" - end - - end - - namespace :types do - - item_name = 'DSC types and type specs' - - desc "Build #{item_name}" - task :build, [:module_path] do |t, args| - module_path = args[:module_path] || default_dsc_module_path - m = Dsc::Manager.new - wait_for_resources = Dir["#{module_path}/**/MSFT_WaitFor*"] - fail "MSFT_WaitFor* resources found - aborting type building! Please remove the following MSFT_WaitFor* DSC Resources and run the build again.\n\n#{wait_for_resources}\n" if !wait_for_resources.empty? - m.target_module_path = module_path - msgs = m.build_dsc_types - msgs.each{|m| puts "#{m}"} - end - - desc "Document #{item_name}" - task :document, [:module_path] do |t, args| - module_path = args[:module_path] || default_dsc_module_path - m = Dsc::Manager.new - m.target_module_path = module_path - m.document_types("#{default_dsc_module_path}/types.md", m.get_dsc_types) - end - - desc "Cleanup #{item_name}" - task :clean, [:module_path] do |t, args| - module_path = args[:module_path] || default_dsc_module_path - puts "Cleaning #{item_name}" - m = Dsc::Manager.new - m.target_module_path = module_path - msgs = m.clean_dsc_types - msgs.each{|m| puts "#{m}"} - msgs = m.clean_dsc_type_specs - msgs.each{|m| puts "#{m}"} - end - - end - - namespace :module do - - item_name = 'External DSC module' - - desc "Generate skeleton for #{item_name}" - task :skeleton, [:dsc_module_path] do |t, args| - dsc_module_path = args[:dsc_module_path] || default_dsc_module_path - module_name = Pathname.new(dsc_module_path).basename.to_s - ext_module_files = [ - '.gitignore', - '.pmtignore', - 'LICENSE', - 'README.md', - 'Repofile', - 'spec/*.rb', - ] - ext_module_files.each do |module_pathes| - Dir[module_pathes].each do |path| - if File.directory?(path) - full_path = "#{dsc_module_path}/#{path}" - unless File.exists?(full_path) - puts "Creating directory #{full_path}" - FileUtils.mkdir_p(full_path) - end - else - directory = Pathname.new(path).dirname - full_directory_path = "#{dsc_module_path}/#{directory}" - full_path = "#{dsc_module_path}/#{path}" - unless File.exists?(full_directory_path) - puts "Creating directory #{full_directory_path}" - FileUtils.mkdir_p(full_directory_path) - end - unless File.exists?(full_path) - puts "Copying file #{path} to #{full_path}" - FileUtils.cp(path, full_path) - end - end - end - end - - unless File.exists?("#{dsc_module_path}/Puppetfile") - puts "Creating #{dsc_module_path}/Puppetfile" - - # Generate Puppetfile with dependency on this dsc module - Puppetfile_content = <<-eos -forge "https://forgeapi.puppetlabs.com" -mod '#{dsc_build_path.parent.basename}', :git => '#{dsc_repo_url}' -eos - - File.open("#{dsc_module_path}/Puppetfile", 'w') do |file| - file.write Puppetfile_content - end - - end - - # Generate Gemfile without any groups - unless File.exists?("#{dsc_module_path}/Gemfile") - puts "Creating #{dsc_module_path}/Gemfile" - Gemfile_content = File.read('Gemfile') - File.open("#{dsc_module_path}/Gemfile", 'w') do |file| - file.write Gemfile_content.gsub(/^group.*^end$/m,'') - end - end - - # Generate Rakefile - unless File.exists?("#{dsc_module_path}/Rakefile") - puts "Creating #{dsc_module_path}/Rakefile" - Rakefile_content = File.read('Rakefile') - File.open("#{dsc_module_path}/Rakefile", 'w') do |file| - file.write Rakefile_content.gsub(/\/spec\/fixtures\/modules\/dsc/, "/spec/fixtures/modules/#{module_name.split('-').last}") - end - end - - end - - end - -end diff --git a/build/dsc.rb b/build/dsc.rb deleted file mode 100644 index 2d6ad9a1..00000000 --- a/build/dsc.rb +++ /dev/null @@ -1,32 +0,0 @@ -require 'json' -require 'yaml' -require 'fileutils' -require 'pathname' -require 'erb' -require 'open-uri' -require 'find' -require 'logger' - -# Bundler group 'build' -if Bundler.rubygems.find_name('mof').any? - require 'mof' - require 'cim' - require 'charlock_holmes/string' -end - -# Debug -require 'pry' if Bundler.rubygems.find_name('pry').any? - -LIB_PATH = File.dirname(__FILE__) - -require "#{LIB_PATH}/dsc/version" -require "#{LIB_PATH}/dsc/mof" -require "#{LIB_PATH}/dsc/property" -require "#{LIB_PATH}/dsc/resource" -require "#{LIB_PATH}/dsc/psmodule" -require "#{LIB_PATH}/dsc/manager" - -module Dsc - - -end diff --git a/build/dsc.yaml b/build/dsc.yaml deleted file mode 100644 index d3424dd5..00000000 --- a/build/dsc.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -# import -import_folder: 'import' -dmtf_mof_folder: 'dmtf_mof' -dsc_modules_folder: 'dsc_resources' -debug: true \ No newline at end of file diff --git a/build/dsc/manager.rb b/build/dsc/manager.rb deleted file mode 100644 index c7ffb798..00000000 --- a/build/dsc/manager.rb +++ /dev/null @@ -1,324 +0,0 @@ -module Dsc - class Manager - - attr_accessor :target_module_path - - def initialize - @dsc_lib_path = Pathname.new(__FILE__).dirname - @tools_path = @dsc_lib_path.parent - @module_path = @tools_path.parent - - @base_qualifiers_folder = "#{@module_path}/build/qualifiers/base" - - @import_folder = "#{@module_path}/import" - @dsc_modules_folder = "#{@import_folder}/dsc_resources" - @dmtf_mof_folder = "#{@module_path}/build/vendor/dmtf_mof" - - @type_template_file = "#{@dsc_lib_path}/templates/dsc_type.rb.erb" - @type_spec_template_file = "#{@dsc_lib_path}/templates/dsc_type_spec.rb.erb" - - @target_module_path = @module_path - @puppet_type_subpath = "lib/puppet/type" - @puppet_type_spec_subpath = "spec/unit/puppet/type" - - @json_content = nil - @resources_hash = nil - @resources = nil - @cim_classes_with_path = nil - - @spec_test_values = { - 'string' => 'foo', - 'string[]' => ['foo','bar','spec'], - 'MSFT_Credential' => { 'user' => 'user', 'password' => 'password' }, - 'MSFT_KeyValuePair' => { 'somekey' => 'somevalue' }, - 'MSFT_KeyValuePair[]' => { 'somekey' => 'somevalue', 'somekey2' => 'somevalue2' }, - 'bool' => true, - 'boolean' => true, - 'munged_bools' => ['true','false','True', 'False', :true, :false], - 'munged_ints' => ['16','-16','32', '-32'], - 'munged_uints' => ['16','32','64'], - 'int_not_bool_mungeable' => -16, - 'uint_not_bool_mungeable' => 16, - 'datetime' => '20140711', - 'int8' => -16, - 'int8[]' => [-128, 0, 127], - 'int16' => -16, - 'int16[]' => [-16, 32, -64], - 'int32' => -32, - 'int32[]' => [-32, 64, -128], - 'int64' => -64, - 'int64[]' => [-64, 128, -256], - 'sint8' => -128, - 'sint8[]' => [-128, 0, 127], - 'sint16' => -16, - 'sint16[]' => [-16, 32, -64], - 'sint32' => -32, - 'sint32[]' => [-32, 64, -128], - 'sint64' => -64, - 'sint64[]' => [-64, 128, -256], - 'uint8' => 1, - 'uint8[]' => [0, 16, 255], - 'uint16' => 16, - 'uint16[]' => [16, 32, 64], - 'uint32' => 32, - 'uint32[]' => [32, 64, 128], - 'uint64' => 64, - 'uint64[]' => [64, 128, 256], - 'real32' => '32.000', - 'real64' => '64.000', - } - - end - - def get_spec_test_value(type) - # generate a hash here for any EmbeddedInstance type not seen yet - if ! @spec_test_values[type] - - type_name = type.gsub(/\[\]$/, '') # strip [] off end of MOF type name - values = cim_classes_with_path - .select{ |c| c[:klass].name == type_name } - .first[:klass] - .features - .map do |prop| - # use first value in ValueMap if present - if prop.qualifiers['Values'] - val = prop.qualifiers['Values'].value.first - else - val = get_spec_test_value(prop.type.to_s) - end - [prop.name, val] - end - - @spec_test_values[type] = Hash[ values ] - end - - @spec_test_values[type] - end - - def dsc_results - mof = Dsc::Mof.new( - :import_folder => @import_folder, - :dmtf_mof_folder => @dmtf_mof_folder, - :base_qualifiers_folder => @base_qualifiers_folder, - :dsc_modules_folder => @dsc_modules_folder, - ) - mof.dsc_results - end - - def cim_classes_with_path - unless @cim_classes_with_path - cim_classes_array = [] - dsc_results.each do |mof_path, mof_res| - mof_res.classes.each do |cim_class| - cim_classes_array << { :klass => cim_class, :path => mof_path } - end - end - @cim_classes_with_path = cim_classes_array - end - @cim_classes_with_path - end - - def resources - unless @resources - dsc_resources = {} - duplicate_imports = {} - cim_classes_with_path.select{|cc| cc[:klass].superclass == "OMI_BaseResource" }.each do |cim_class_with_path| - klass = cim_class_with_path[:klass] - resource = Dsc::Resource.new(klass, cim_class_with_path[:path]) - - # track the paths where this CIM name has already shown up - if dsc_resources.include?(resource.name) - if resource.relative_mof_path.split(/\//)[2] == dsc_resources[resource.name].relative_mof_path.split(/\//)[2] - # we don't care if the module or dsc resource is inside the folder containing the DSC resources - # if it's inside the folder, then it's only used by the dsc resource, not externally, so we - # don't have to parse it and shouldn't throw an error - # we can't blacklist this, because it's internal to a dsc resource, and not part of the main repo. - # for example, the xAdcsDeployment DSC Resource had xCertificateServices internalized in the 1.0.0 tag, - # causing duplicate MOFs to be parsed - next - end - duplicate_imports[resource.name] ||= [dsc_resources[resource.name].relative_mof_path] - duplicate_imports[resource.name] << resource.relative_mof_path - next - end - dsc_resources[resource.name] = resource - end - if !duplicate_imports.empty? - msg = duplicate_imports.map { |k,v| "Duplicate definitions of #{k} found at:\n#{v.join("\n")}" } - raise "Catastrophic Failure - Found duplication CIM definitions:\n" + msg.join("\n\n") - end - @resources = dsc_resources.values - end - @resources - end - - def embedded_resources - resources.select{|r|r.has_embeddedinstances?} - end - - def embedded_class_names - class_names_array = [] - embedded_resources.each do |er| - er.embedded_properties.each do |ep| - class_names_array << ep.embeddedinstance_class_name - end - end - class_names_array.uniq - end - - def embedded_cim_classes - cim_classes_with_path.select{|cc| embedded_class_names.include?(cc[:klass].name) }.collect{|cc| cc[:klass] } - end - - def build_dsc_types - type_pathes = [] - whitelist = ['archive','environment','file','group','groupset','log','package', - 'processset','registry','script','service','serviceset','user','windowsfeature', - 'windowsfeatureset','windowsoptionalfeature','windowsoptionalfeatureset','windowsprocess'] - resources.each do |resource| - type_template = File.open(@type_template_file, 'r').read - type_erb = ERB.new(type_template, nil, '-') - type_spec_template = File.open(@type_spec_template_file, 'r').read - type_spec_erb = ERB.new(type_spec_template, nil, '-') - if resource.friendlyname - puppet_type_path = "#{@target_module_path}/#{@puppet_type_subpath}" - FileUtils.mkdir_p(puppet_type_path) unless File.exists?(puppet_type_path) - File.open("#{puppet_type_path}/dsc_#{resource.friendlyname.downcase}.rb", 'w+') do |file| - file.write(type_erb.result(binding)) - pn = Pathname.new(file.path).expand_path.relative_path_from(@module_path) - type_pathes << "Add type - #{pn.to_s}" - end - puppet_type_spec_path = "#{@target_module_path}/#{@puppet_type_spec_subpath}" - FileUtils.mkdir_p(puppet_type_spec_path) unless File.exists?(puppet_type_spec_path) - if whitelist.include?(resource.friendlyname.downcase) - File.open("#{puppet_type_spec_path}/dsc_#{resource.friendlyname.downcase}_spec.rb", 'w+') do |file| - file.write(type_spec_erb.result(binding)) - pn = Pathname.new(file.path).expand_path.relative_path_from(@module_path) - type_pathes << "Add type spec - #{pn.to_s}" - end - end - else - puts "#{resource.name} from #{resource.dsc_module} has invalid mof (no friendlyname defined)" - puts "#{resource.name} will not be usable with puppet" - end - end - type_pathes - end - - def get_dsc_types - dsc_types = [] - resources.each do |resource| - dsc_types << "dsc_#{resource.friendlyname.downcase}" - end - dsc_types - end - - def document_types(markdown_file_path, dsc_types) - puts "Creating #{markdown_file_path}" - File.open("#{markdown_file_path}", 'w+') do |file| - file.write("## Resource Types included with DSC module\n") - file.write("For any system this module is installed on, use\n`Puppet describe typename` for more information.\n\n") - - file.write("#### WMF Core Types\n\n") - file.write("Puppet Type | DSC Resource\n") - file.write("----------- | -----------------\n") - resources.select { |t| t.instance_name.downcase.match(/dsc_[^x]/)}.each do |dsc_type| - pth = File.dirname(dsc_type.relative_mof_path.gsub(/import\/dsc_resources/,"build/vendor/wmf_dsc_resources")) - file.write("dsc_#{dsc_type.friendlyname.downcase} | [#{dsc_type.friendlyname}](https://github.com/puppetlabs/puppetlabs-dsc/tree/master/#{pth}) | #{dsc_type.relative_mof_path}\n") - end - - file.write("\n#### Community x Prefixed types\n\n") - resources.select { |t| t.instance_name.downcase.match(/dsc_x/)}.group_by { |dt| dt.ps_module.name}.each do |dsc_type| - file.write("##### #{dsc_type[0]}\n\n") - file.write("Puppet Type | DSC Resource | Github Repo\n") - file.write("----------- | ----------------- | -----\n") - dsc_type[1].each do | sb | - pth = File.dirname(sb.relative_mof_path.gsub(/import\/dsc_resources/,"lib/puppet_x/dsc_resources")) - file.write("dsc_#{sb.friendlyname.downcase} | [#{sb.friendlyname}](https://github.com/puppetlabs/puppetlabs-dsc/tree/master/#{pth}) | [repo](https://github.com/PowerShell/#{dsc_type[0]})\n") - end - file.write("\n") - end - end - end - - def clean_dsc_types - puppet_type_path = "#{@target_module_path}/#{@puppet_type_subpath}" - clean_folder(["#{puppet_type_path}/dsc_*.rb"]) - end - - def clean_dsc_type_specs - puppet_type_spec_path = "#{@target_module_path}/#{@puppet_type_spec_subpath}" - clean_folder(["#{puppet_type_spec_path}/dsc_*_spec.rb"]) - end - - # Mof's - def import_dmtf_mofs - Dsc::Import.download(@dmtf_cim_mof_zip_url, @dmtf_cim_mof_zip_path) - Dsc::Import.unzip(@dmtf_cim_mof_zip_path, @dmtf_mof_folder) - end - - def clean_dmtf_mofs - clean_folder([@dmtf_mof_folder]) - end - - def format_type_value(type_value) - case - when type_value.class.name == 'Symbol' - ":#{type_value}" - when type_value.class.name == 'String' - "'#{type_value}'" - when type_value.class.name == 'Numeric' - "#{type_value}" - else - type_value - end - end - - def format_newvalues(values) - output = [] - values.each do |v| - if v.respond_to?('downcase') - output << format_type_value(v) - output << format_type_value(v.downcase) - else - output << format_type_value(v) - end - end - output.join(', ') - end - - def find_valid_files(directory) - valid_files = Dir.glob("#{directory}/**/*").reject do |f| - # reject the .git folder or special git files - f =~ /\/\.(git|gitattributes|gitignore|gitmodules)/ || - # reject binary and other file extensions - f =~ /\.(pptx|docx|sln|cmd|xml|pssproj|pfx|html|txt|xlsm|csv|png|git|yml|md|js|json)$/i || - # reject test / sample / example code - f =~ /\/.*([Ss]ample|[Ee]xample|[Tt]est).*/ || - # reject stuff that is a Composite DSC Resource - f =~ /(xChrome|xDSCResourceDesigner|xDscDiagnostics|xFirefox|xSafeHarbor|xSystemSecurity).*/ || - # reject duplicated resources - f =~ /(xSharePoint|PSDscResources).*/ || - # and don't keep track of dirs - Dir.exists?(f) - end - - valid_files - end - - private - - def clean_folder(folders) - type_pathes = [] - folders.each do |folder| - Dir.glob("#{folder}").each do |filepath| - pn = Pathname.new(filepath).expand_path.relative_path_from(@module_path) - type_pathes << "Remove - #{pn.to_s}" - FileUtils.rm_rf filepath - end - end - type_pathes - end - - end -end diff --git a/build/dsc/mof.rb b/build/dsc/mof.rb deleted file mode 100644 index f4bf5e02..00000000 --- a/build/dsc/mof.rb +++ /dev/null @@ -1,87 +0,0 @@ -module Dsc - class Mof - - attr_accessor :dsc_invalid_resources - - def initialize(options) - - @import_folder = options[:import_folder] - @base_qualifiers_folder = options[:base_qualifiers_folder] - @dmtf_mof_folder = options[:dmtf_mof_folder] - @dsc_modules_folder = options[:dsc_modules_folder] - - @dmtf_cim_mof = Dir[ @dmtf_mof_folder + '/cim_schema_*.mof'].first - @dmtf_qualifiers_mof = "#{@dmtf_mof_folder}/qualifiers.mof" - @dmtf_qualifiers_optional_mof = "#{@dmtf_mof_folder}/qualifiers_optional.mof" - - @dsc_modules_mof = "#{@import_folder}/dsc_modules.mof" - @dsc_base_mof = "#{@import_folder}/base.mof" - - @dsc_mof_file_pathes = nil - @base_mof_file_pathes = nil - @dsc_invalid_resources = {} - end - - def base_mof_file_pathes - @base_mof_file_pathes ||= find_mofs(/.*\.mof$/, @base_qualifiers_folder) - end - - def dsc_mof_file_pathes - @dsc_mof_file_pathes ||= find_mofs(/.*\.[sS]chema.mof$/, @dsc_modules_folder) - end - - def dsc_results - all_result.select{|k,v| dsc_mof_file_pathes.include?(k)} - end - - def all_result - - create_index_mof(@dsc_modules_mof, dsc_mof_file_pathes) - - # generate base mof import file - create_index_mof(@dsc_base_mof, base_mof_file_pathes) - - moffiles, options = MOF::Parser.argv_handler "moflint", [] - options[:style] ||= :wmi - options[:includes] ||= [] - options[:quiet] ||= false - - moffiles.unshift @dsc_modules_mof unless moffiles.include? @dsc_modules_mof - moffiles.unshift @dsc_base_mof unless moffiles.include? @dsc_custom_mof - moffiles.unshift @dmtf_cim_mof unless moffiles.include? @dmtf_cim_mof - moffiles.unshift @dmtf_qualifiers_optional_mof unless moffiles.include? @dmtf_qualifiers_optional_mof - moffiles.unshift @dmtf_qualifiers_mof unless moffiles.include? @dmtf_qualifiers_mof - - parser = MOF::Parser.new options - - begin - result = parser.parse(moffiles) - rescue Exception => e - @dsc_invalid_resources[moffiles] = e - puts "Last processed 'schema.mof' file could not be parsed: #{e}" - exit 1 - end - # return mof result - result - end - - private - - def create_index_mof(index_mof_file_name, mofs) - File.open(index_mof_file_name, 'w') do |file| - mofs.each{|mof_path| file.write("#pragma include (\"#{mof_path}\")\n") } - end - end - - def find_mofs(regex, folder) - mof_file_pathes = [] - if File.exist?(folder) - Find.find(folder) do |path| - mof_file_pathes << path if path =~ regex - end - end - mof_file_pathes - end - - end -end diff --git a/build/dsc/property.rb b/build/dsc/property.rb deleted file mode 100644 index 1e861e70..00000000 --- a/build/dsc/property.rb +++ /dev/null @@ -1,129 +0,0 @@ -module Dsc - class Property - - attr_reader :property_hash - - def initialize(cim_feature, resource_mof_path) - @cim_feature = cim_feature - @resource_mof_path = resource_mof_path - @name = nil - @description = nil - @type = nil - @required = nil - @values = nil - end - - def name - @name ||= @cim_feature.name - end - - def description - begin - if @description.nil? && @cim_feature.description - content = @cim_feature.description - content.gsub!(/\xe2\x80\x9c/u, "'") # usage of single quotes as this string will be injected in a double bracket "#{content}" - content.gsub!(/\xe2\x80\x9d/u, "'") # usage of single quotes as this string will be injected in a double bracket "#{content}" - content.gsub!(/\xe2\x80\x98/u, "'") - content.gsub!(/\xe2\x80\x99/u, "'") - content.gsub!(/\xe2\x80\x93/u, "-") - content.gsub!(/\xe2\x80\x94/u, "--") - content.gsub!(/\xe2\x80\xa6/u, "...") - @description ||= content - end - @description - rescue - @description ||= "Description could no be generated. Illegal Chars found in original scheam.mof file" - @description - end - end - - def type - @type ||= (embeddedinstance? ? - embeddedinstance_class_name + (embeddedinstance_array? ? '[]' : '') : - @cim_feature.type.to_s.downcase) - end - - def required? - @required ||= @cim_feature.qualifiers.detect{|q| q.name.downcase == "key" } - end - - def embeddedinstance - @cim_feature.qualifiers.detect{|q| q.name.downcase == "embeddedinstance" } - end - - def embeddedinstance? - embeddedinstance ? true: false - end - - def embeddedinstance_array? - embeddedinstance? && @cim_feature.type.to_s.casecmp('string[]') == 0 - end - - def embeddedinstance_class_name - embeddedinstance.value - end - - def values - @values ||= - if is_ensure? && ! @cim_feature.values - $stderr.puts "WARNING: Processing #{@resource_mof_path}\nEnsurable property '#{name}' is missing a values specification - using default 'present'\n" - ['Present'] - else - @cim_feature.values - end - end - - def is_ensure? - name.downcase == 'ensure' ? true : false - end - - def dependable? - name.downcase == 'dependson' ? true : false - end - - def is_name? - name.downcase == 'name' ? true : false - end - - def credential? - embeddedinstance? && embeddedinstance_class_name == 'MSFT_Credential' - end - - def keyvaluepair? - embeddedinstance? && embeddedinstance_class_name == 'MSFT_KeyValuePair' - end - - def bool? - ["bool","boolean"].include?(type) - end - - def uint? - ["uint8","uint16","uint32","uint64"].include?(type) - end - - def uint_array? - ["uint8[]","uint16[]","uint32[]","uint64[]"].include?(type) - end - - def int? - ["int8","int16","int32","int64","sint8","sint16","sint32","sint64"].include?(type) - end - - def int_array? - ["int8[]","int16[]","int32[]","int64[]","sint8[]","sint16[]","sint32[]","sint64[]"].include?(type) - end - - def string? - ["string"].include?(type) - end - - def string_array? - ["string[]"].include?(type) - end - - def array? - string_array? or int_array? or uint_array? or embeddedinstance_array? - end - - end -end diff --git a/build/dsc/psmodule.rb b/build/dsc/psmodule.rb deleted file mode 100644 index e8b961e6..00000000 --- a/build/dsc/psmodule.rb +++ /dev/null @@ -1,51 +0,0 @@ -module Dsc - class Psmodule - - attr_accessor :name - - def initialize(module_name, module_manifest_path) - @name = module_name - @module_manifest_path = module_manifest_path - @attributes = nil - end - - def version - raise "ModuleVersion not found for module #{@name} / #{@module_manifest_path}" if attributes['ModuleVersion'].empty? - attributes['ModuleVersion'] - end - - def attributes - begin - unless @attributes - attrs = {} - regex = /^(.*) *= *['"](.*)['"] *$/ - File.open(@module_manifest_path, 'r') do |psd1| - content = File.read(psd1) - utf8_encoded_content = utf8_encode_content(content) - utf8_encoded_content.lines.each do |line| - dos2unix(line) - matches = regex.match(line) - attrs[matches[1].strip] = matches[2] if matches - end - @attributes = attrs - end - end - @attributes - rescue => e - raise "could not read psd1 manifest file for #{@name} / #{@module_manifest_path}: #{e}" - end - end - - private - - def utf8_encode_content(content) - detection = CharlockHolmes::EncodingDetector.detect(content) - CharlockHolmes::Converter.convert content, detection[:encoding], 'UTF-8' - end - - def dos2unix(line) - line.gsub!(/\r\n$/, "\n") - end - - end -end diff --git a/build/dsc/resource.rb b/build/dsc/resource.rb deleted file mode 100644 index 904be29f..00000000 --- a/build/dsc/resource.rb +++ /dev/null @@ -1,198 +0,0 @@ -module Dsc - class Resource - - attr_accessor :resource_cim_class - - def initialize(mof_class, mof_path) - @resource_mof_path = mof_path - @resource_cim_class = mof_class - @name = nil - @friendlyname = nil - @properties = nil - @array_properties = nil - @valuated_properties = nil - @required_properties = nil - @filtered_properties = nil - @embedded_properties = nil - @dsc_module = nil - @ps_module = nil - @absentable = nil - end - - def relative_mof_path - Pathname.new(@resource_mof_path).relative_path_from(Pathname.new(File.expand_path("#{LIB_PATH}/.."))).to_s - end - - def friendlyname - @friendlyname ||= @resource_cim_class.qualifiers['Friendlyname'].value if @resource_cim_class.qualifiers['Friendlyname'] - end - - def name - @name ||= @resource_cim_class.name - end - - def instance_name - "Dsc_#{self.friendlyname.downcase}" - end - - def properties - unless @properties - @properties ||= @resource_cim_class.features.collect{|cim_feature| Dsc::Property.new(cim_feature, @resource_mof_path) } - end - @properties - end - - def array_properties - unless @array_properties - @array_properties ||= properties.select{|rp| rp.array? } - end - @array_properties - end - - def valuated_properties - unless @valuated_properties - @valuated_properties ||= properties.select{|rp| rp.values } - end - @valuated_properties - end - - def required_properties - unless @required_properties - @required_properties ||= properties.select{|rp| rp.required? } - end - @required_properties - end - - def filtered_properties - unless @filtered_properties - @filtered_properties = properties.select{|p| !p.dependable? && !p.is_ensure? }.sort_by { |p| [p.required? ? 0 : 1, p.name.downcase] } - end - @filtered_properties - end - - def embedded_properties - unless @embedded_properties - @embedded_properties ||= properties.select{|rp| rp.embeddedinstance? } - end - @embedded_properties - end - - def ensurable? - ensure_property ? true : false - end - - def ensure_property - @ensure_property ||= properties.find{|p| p.is_ensure?} - end - - def absentable? - if @absentable.nil? - if !ensurable? - @absentable = false - else - override = ensure_type_overrides[name.downcase] - @absentable = override ? - # if an override exists, the absence of the :absent hash key (or nil value at :absent) means not absentable - !override[:absent].nil? : - # otherwise use typical 'absent' heuristic - ensure_property.values.any? { |v| v.casecmp('absent') == 0 } - end - end - @absentable - end - - def ensure_type_overrides - # always key the hash with a lower case version of the name - # the first defined present value is the default - # :absent may be omitted to indicate there is no ability to absent the resource - @ensure_type_overrides ||= - { - 'MSFT_xRunbookDirectory'.downcase => { :present => ['published', 'draft'], :absent => 'absent' }, - 'MSFT_WindowsOptionalFeature'.downcase => { :present => ['enable'], :absent => 'disable' }, - } - end - - def absent_value - @absent_value ||= - # explicit absent by MOF type name - if (ensure_values = ensure_type_overrides[name.downcase]) - ensure_values[:absent] - # resources like MSFT_LogResource or MSFT_ScriptResource have no Ensure / can't be 'absent' - elsif ensure_property.nil? - # absent_value should never be called if absentable? is not true - throw "Error processing MOF schema for #{name} - absent_value unavailable on property that is not absentable" - # absent is explicitly in the value map - elsif ensure_property.values.any? { |v| v.casecmp('absent') == 0 } - 'absent' - else - throw "Error processing MOF schema for #{name} - could not determine equivalent 'absent' value for ensure" - end - end - - def valid_ensure_present_values - @valid_ensure_present_values ||= - # explicit absent by MOF type name - if (ensure_values = ensure_type_overrides[name.downcase]) - ensure_values[:present] - # resources like MSFT_LogResource with no Ensure *must* be able to set 'present' - elsif ensure_property.nil? - ['present'] - # a non-nil list of ensure values with 'absent' filtered - elsif (present = ensure_property.values.collect { |v| v.downcase }.select { |v| v != 'absent' }) - # empty list of properties OR properties only contains 'absent' - makes no sense, FAIL hard - throw("Error processing MOF schema for #{name} - no valid ensure present property found in list #{ensure_property.values}") if present.empty? - present - else - throw "Error processing MOF schema for #{name} - could not determine equivalent 'present' value for ensure" - end - end - - def default_ensure_value - # with overrides present, use the first value - if ensure_type_overrides.include?(name.downcase) - valid_ensure_present_values[0] - # if no explicit overrides, and multiple values, favor present if defined - elsif valid_ensure_present_values.any? { |v| v.casecmp('present') == 0 } - 'present' - # otherwise, use the first value for present, which should be 'present' - else - valid_ensure_present_values[0] - end - end - - def has_name? - properties.detect{|p|p.is_name?} ? true : false - end - - def has_embeddedinstances? - properties.detect{|p|p.embeddedinstance?} ? true : false - end - - def has_credential? - properties.detect{|p|p.credential?} ? true : false - end - - def ps_module - unless @ps_module - path_array = @resource_mof_path.split('/') - revert_array = path_array.reverse - downcased_array = revert_array.collect{|p| p.downcase} - index = downcased_array.index('dscresources') - raise "module for #{self.name} not found (Missing DSCResources directory in path #{@resource_mof_path})" if index == nil - - module_name = revert_array[index + 1 ] rescue nil - if (module_name == "dsc_resources") - warn("The name of the module in directory #{@resource_mof_path} was detected as #{module_name}. This may indicate that the wrong directory was used to import the resource") - end - - module_dir = path_array[0..(path_array.count - (index + 2))].join('/') - module_manifest_path = "#{module_dir}/#{module_name}.psd1" - raise "module manifest #{module_manifest_path} not found" unless File.exists?(module_manifest_path) - - @ps_module = Dsc::Psmodule.new(module_name, module_manifest_path) - end - @ps_module - end - - end -end diff --git a/build/dsc/templates/dsc_type.rb.erb b/build/dsc/templates/dsc_type.rb.erb deleted file mode 100644 index 0180846f..00000000 --- a/build/dsc/templates/dsc_type.rb.erb +++ /dev/null @@ -1,269 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:dsc_<%= resource.friendlyname.downcase %>) do - require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' - require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' - -<% ignored = ['MSFT_KeyValuePair', 'MSFT_Credential'] - resource.embedded_properties - .map { |p| p.embeddedinstance_class_name } - .select { |class_name| !ignored.include?(class_name) } - .uniq - .each do |class_name| - - allowed = [] - required = [] - cim_classes_with_path - .select { |c| c[:klass].name == class_name } - .first[:klass] - .features - .each do |prop| - - name = prop.name.downcase.gsub("'", "\\\\'") - if prop.qualifiers.any? { |q| q.name.casecmp('Required') == 0 } - required << "'" + name + "'" - else - allowed << "'" + name + "'" - end - end - -%> - class PuppetX::Dsc::TypeHelpers - def self.validate_<%= class_name %>(mof_type_map, name, value) -<%# emit required or allowed fields based on embeddedinstance definition -%> - required = [<%= required.join(',') %>] - allowed = [<%= allowed.join(',') %>] - lowkey_hash = Hash[value.map { |k, v| [k.to_s.downcase, v] }] - - missing = required - lowkey_hash.keys - unless missing.empty? - fail "#{name} is missing the following required keys: #{missing.join(',')}" - end - - extraneous = lowkey_hash.keys - required - allowed - unless extraneous.empty? - fail "#{name} includes invalid keys: #{extraneous.join(',')}" - end - - lowkey_hash.keys.each do |key| - if lowkey_hash[key] - validate_mof_type(mof_type_map[key], '<%= class_name %>', key, lowkey_hash[key]) - end - end - end - end -<% end # def validate_XXX -%> - - @doc = %q{ - The DSC <%= resource.friendlyname%> resource type. - Automatically generated from - '<%= resource.relative_mof_path.gsub('import/dsc_resources/','') %>' - - To learn more about PowerShell Desired State Configuration, please - visit https://technet.microsoft.com/en-us/library/dn249912.aspx. - - For more information about built-in DSC Resources, please visit - https://technet.microsoft.com/en-us/library/dn249921.aspx. - - For more information about xDsc Resources, please visit - https://github.com/PowerShell/DscResources. - } - - validate do - <% resource.properties.select{|rp| rp.required? }.each do |property| -%> - fail('dsc_<%= property.name.downcase %> is a required attribute') if self[:dsc_<%= property.name.downcase %>].nil? - <% end -%> - end - - def dscmeta_resource_friendly_name; '<%= resource.friendlyname %>' end - def dscmeta_resource_name; '<%= resource.name %>' end - def dscmeta_module_name; '<%= resource.ps_module.name %>' end -<% if resource.ps_module.name != 'PSDesiredStateConfiguration' -%> - def dscmeta_module_version; '<%= resource.ps_module.version %>' end -<% end -%> - - newparam(:name, :namevar => true ) do - end - - ensurable do - newvalue(:exists?) { provider.exists? } -<% resource.valid_ensure_present_values.each do |property| -%> - newvalue(:<%= property.downcase %>) { provider.create } -<% end -%> -<% if resource.absentable? -%> - newvalue(:<%= resource.absent_value %>) { provider.destroy } -<% end -%> - defaultto { :<%= resource.default_ensure_value %> } - end - - # Name: PsDscRunAsCredential - # Type: MSFT_Credential - # IsMandatory: False - # Values: None - newparam(:dsc_psdscrunascredential) do - def mof_type; 'MSFT_Credential' end - def mof_is_embedded?; true end - desc "PsDscRunAsCredential" - validate do |value| - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end - PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) - end - end - -<% resource.properties.each do |property| -%> - # Name: <%= property.name %> - # Type: <%= property.type %> - # IsMandatory: <%= property.required? ? 'True' : 'False' %> - # Values: <%= property.values ? property.values : 'None' %> - newparam(:dsc_<%= property.name.downcase %><% if property.array? && !property.keyvaluepair? %>, :array_matching => :all<% end %>) do - def mof_type; '<%= property.type %>' end - def mof_is_embedded?; <%= property.embeddedinstance? -%> end -<% if property.embeddedinstance? && !property.credential? && !property.keyvaluepair? - - type_map = {} - cim_classes_with_path - .select { |c| c[:klass].name == property.embeddedinstance_class_name } - .first[:klass] - .features - .map { |p| Dsc::Property.new(p, resource.relative_mof_path) } - .each do |dsc_prop| - - name = dsc_prop.name.downcase.gsub("'", "\\\\'") - type_map[name] = { :type => dsc_prop.type } - type_map[name][:values] = dsc_prop.values if dsc_prop.values - end --%> - def mof_type_map - <%= type_map.to_s %> - end -<% end -%> - desc "<%= property.name %><% if property.description -%> - <%= property.description %><% end %><% if property.values -%><% unless property.description -%> -<% end %> Valid values are <%= property.values.join(', ') %>.<% end -%>" -<% if property.required? -%> - isrequired -<% end -%> - validate do |value| -<% if property.name.downcase == 'ensure' -%> - resource[:ensure] = value.downcase -<% end -%> -<% case -%> -<% when property.embeddedinstance? && property.embeddedinstance_array? -%> -<%# an array of keyvaluepairs is a special case as it's really a plain old hashtable -%> -<% if property.keyvaluepair? -%> - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end -<%# otherwise an array of embeddedinstances is an array of hashes -%> -<% else -%> - unless value.kind_of?(Array) || value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be an array of hashes or a hash") - end - (value.kind_of?(Hash) ? [value] : value).each_with_index do |v, i| - fail "<%= property.name %> value at index #{i} should be a Hash" unless v.is_a? Hash - - PuppetX::Dsc::TypeHelpers.validate_<%= property.embeddedinstance_class_name %>(<%= !property.credential? ? 'mof_type_map, ' : '' %>"<%= property.name %>", v) - end -<% end -%> -<% when property.embeddedinstance? && !property.embeddedinstance_array? -%> - unless value.kind_of?(Hash) - fail("Invalid value '#{value}'. Should be a hash") - end -<% if property.keyvaluepair? -%> - fail '<%= property.name %> may only have a single key / value pair' unless value.length == 1 -<% else -%> - PuppetX::Dsc::TypeHelpers.validate_<%= property.embeddedinstance_class_name %>(<%= !property.credential? ? 'mof_type_map, ' : '' %>"<%= property.name %>", value) -<% end -%> -<% when property.array? -%> -<% if property.int_array? -%> - unless value.kind_of?(Array) || value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value '#{value}'. Should be an integer or an array of integers") - end -<% elsif property.uint_array? -%> - unless value.kind_of?(Array) || (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value '#{value}'. Should be an integer or an array of integers") - end -<% else -%> - unless value.kind_of?(Array) || value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string or an array of strings") - end -<% end -%> -<% when property.bool? -%> -<% when property.int? -%> - unless value.kind_of?(Numeric) || value.to_i.to_s == value - fail("Invalid value #{value}. Should be a signed Integer") - end -<% when property.uint? -%> - unless (value.kind_of?(Numeric) && value >= 0) || (value.to_i.to_s == value && value.to_i >= 0) - fail("Invalid value #{value}. Should be a unsigned Integer") - end -<% else -%> - unless value.kind_of?(String) - fail("Invalid value '#{value}'. Should be a string") - end -<% end -%> -<% if property.values && property.values.any? -%> -<% if property.array? -%> - if value.kind_of?(Array) - unless ([<%= format_newvalues(property.values) %>] & value).count == value.count - fail("Invalid value #{value}. Valid values are <%= property.values.join(', ') %>") - end - end - if value.kind_of?(String) - unless [<%= format_newvalues(property.values) %>].include?(value) - fail("Invalid value #{value}. Valid values are <%= property.values.join(', ') %>") - end - end -<% else -%> - unless [<%= format_newvalues(property.values) %>].include?(value) - fail("Invalid value '#{value}'. Valid values are <%= property.values.join(', ') %>") - end -<% end -%> -<% end -%> - end -<% case -%> -<% when property.bool? -%> - newvalues(true, false) -<% end -%> -<% case -%> -<% when property.array? && !property.keyvaluepair? -%> - munge do |value| -<% if property.embeddedinstance_array? -%> - value.kind_of?(Hash) ? - [PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, value)] : - value.map { |v| PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, v) } -<% elsif (property.int_array? || property.uint_array?) -%> - v = PuppetX::Dsc::TypeHelpers.munge_integer(value) - v.is_a?(Array) ? v : Array(v) -<% else -%> - Array(value) -<% end -%> - end -<% when property.embeddedinstance? && !property.keyvaluepair? && !property.credential? -%> - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, value) - end -<% when property.bool? -%> - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) - end -<% when (property.int? || property.uint?) -%> - munge do |value| - PuppetX::Dsc::TypeHelpers.munge_integer(value) - end -<% else -%> -<% end -%> - end - -<% end %> - def builddepends - pending_relations = super() - PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) - end -end - -Puppet::Type.type(:dsc_<%= resource.friendlyname.downcase %>).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do - confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10586.117')) - defaultfor :operatingsystem => :windows - - mk_resource_methods -end diff --git a/build/dsc/templates/dsc_type_spec.rb.erb b/build/dsc/templates/dsc_type_spec.rb.erb deleted file mode 100644 index 6c887f84..00000000 --- a/build/dsc/templates/dsc_type_spec.rb.erb +++ /dev/null @@ -1,340 +0,0 @@ -#!/usr/bin/env ruby -require 'spec_helper' - -<%- -def munge_boolean(value) - return true if value =~ (/^(true|t|yes|y|1)$/i) - return false if value.empty? || value =~ (/^(false|f|no|n|0)$/i) - - raise ArgumentError.new "invalid value: #{value}" -end --%> -describe Puppet::Type.type(:dsc_<%= resource.friendlyname.downcase %>) do - - let :dsc_<%= resource.friendlyname.downcase %> do - Puppet::Type.type(:dsc_<%= resource.friendlyname.downcase %>).new( - :name => <%= format_type_value(get_spec_test_value('string')) %>, -<% resource.properties.select{|rp| rp.required? }.each do |property| -%> -<% if property.values -%> - :dsc_<%= property.name.downcase %> => '<%= property.values.first %>', -<% else -%> - :dsc_<%= property.name.downcase %> => <%= format_type_value(get_spec_test_value(property.type)) %>, -<% end -%> -<% end -%> - ) - end - - it 'should allow all properties to be specified' do - expect { Puppet::Type.type(:dsc_<%= resource.friendlyname.downcase %>).new( - :name => <%= format_type_value(get_spec_test_value('string')) %>, -<% resource.properties.each do |property| -%> -<% if property.values -%> - :dsc_<%= property.name.downcase %> => '<%= property.values.first %>', -<% else -%> - :dsc_<%= property.name.downcase %> => <%= format_type_value(get_spec_test_value(property.type)) || 'nil' %>, -<% end # if property.values -%> -<% end # each -%> - )}.to_not raise_error - end - - it "should stringify normally" do - expect(dsc_<%= resource.friendlyname.downcase %>.to_s).to eq("Dsc_<%= resource.friendlyname.downcase %>[<%= get_spec_test_value('string') %>]") - end -<% if resource.ensurable? -%> - - it 'should default to ensure => <%= resource.default_ensure_value %>' do - expect(dsc_<%= resource.friendlyname.downcase %>[:ensure]).to eq :<%= resource.default_ensure_value %> - end -<% end # resource.ensurable? -%> -<% resource.properties.each do |property| -%> -<% if property.credential? -%> - - it "should not accept empty password for dsc_<%= property.name.downcase %>" do - expect{dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = {"user"=>"user", "password"=>""}}.to raise_error(Puppet::ResourceError) - end -<% end # if property.credential? -%> -<% if property.required? -%> - - it 'should require that dsc_<%= property.name.downcase %> is specified' do - #dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] - expect { Puppet::Type.type(:dsc_<%= resource.friendlyname.downcase %>).new( - :name => <%= format_type_value(get_spec_test_value('string')) %>, -<% resource.properties.select{|rp| rp.name != property.name && rp.required? }.each do |other_property| -%> -<% if other_property.values -%> - :dsc_<%= other_property.name.downcase %> => '<%= other_property.values.first %>', -<% else -%> - :dsc_<%= other_property.name.downcase %> => <%= format_type_value(get_spec_test_value(other_property.type)) || 'nil' %>, -<% end # if other_property.values -%> -<% end # each -%> - )}.to raise_error(Puppet::Error, /dsc_<%= property.name.downcase %> is a required attribute/) - end -<% end # if property.required? -%> -<% if property.values -%> -<% property.values.each do |value| -%> - -<% if property.array? -%> - it 'should accept dsc_<%= property.name.downcase %> predefined value <%= value %>' do - dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = '<%= value %>' - expect(dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>]).to eq(['<%= value %>']) - end - - it 'should accept dsc_<%= property.name.downcase %> predefined value <%= value.downcase %>' do - dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = '<%= value.downcase %>' - expect(dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>]).to eq(['<%= value.downcase %>']) - end -<% else -%> - it 'should accept dsc_<%= property.name.downcase %> predefined value <%= value %>' do - dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = '<%= value %>' - expect(dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>]).to eq('<%= value %>') - end - - it 'should accept dsc_<%= property.name.downcase %> predefined value <%= value.downcase %>' do - dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = '<%= value.downcase %>' - expect(dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>]).to eq('<%= value.downcase %>') - end -<% end -%> -<% if property.name.downcase == 'ensure' -%> - - it 'should accept dsc_ensure predefined value <%= value.downcase %> and update ensure with this value (ensure end value should be a symbol)' do - dsc_<%= resource.friendlyname.downcase %>[:dsc_ensure] = '<%= value.downcase %>' - expect(dsc_<%= resource.friendlyname.downcase %>[:ensure]).to eq(dsc_<%= resource.friendlyname.downcase %>[:dsc_ensure].downcase.to_sym) - end -<% end # if property.name.downcase.... -%> -<% end # property.values.each....-%> - - it 'should not accept values not equal to predefined values' do - expect{dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = 'invalid value'}.to raise_error(Puppet::ResourceError) - end -<% end # if property.values -%> -<% if property.array? -%> -<% if property.keyvaluepair? -%> - - it 'should accept a hash for dsc_<%= property.name.downcase %>' do - dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = <%= format_type_value(get_spec_test_value(property.type)) %> - expect(dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>]).to eq(<%= format_type_value(get_spec_test_value(property.type)) %>) - end -<% elsif property.embeddedinstance? -%> - - it 'should accept a hash for dsc_<%= property.name.downcase %>' do - dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = <%= format_type_value(get_spec_test_value(property.type)) %> - expect(dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>]).to eq([<%= format_type_value(get_spec_test_value(property.type)) %>]) - end - - it 'should accept a an array of hashes for dsc_<%= property.name.downcase %>' do - dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = [<%= format_type_value(get_spec_test_value(property.type)) %>] - expect(dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>]).to eq([<%= format_type_value(get_spec_test_value(property.type)) %>]) - end -<% elsif property.values -%> - - it 'should accept array of predefined values for dsc_<%= property.name.downcase %>' do - dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = <%= property.values %> - expect(dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>]).to eq(<%= property.values %>) - end -<% else # if property.values -%> - - it 'should accept array for dsc_<%= property.name.downcase %>' do - dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = <%= format_type_value(get_spec_test_value(property.type)) %> - expect(dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>]).to eq(<%= format_type_value(get_spec_test_value(property.type)) %>) - end -<% end # if property.values -%> -<% else # if property.array? -%> - - it 'should not accept array for dsc_<%= property.name.downcase %>' do - expect{dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = <%= format_type_value(get_spec_test_value('string[]')) %>}.to raise_error(Puppet::ResourceError) - end -<% end # if property.array? -%> -<% if property.bool? -%> - - it 'should accept boolean for dsc_<%= property.name.downcase %>' do - dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = <%= format_type_value(get_spec_test_value(property.type)) %> - expect(dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>]).to eq(<%= format_type_value(get_spec_test_value(property.type)) %>) - end -<% get_spec_test_value('munged_bools').each do |munged_bool| %> - it "should accept boolean-like value <%= format_type_value(munged_bool) %> and munge this value to boolean for dsc_<%= property.name.downcase %>" do - dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = <%= format_type_value(munged_bool) %> - expect(dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>]).to eq(<%= munge_boolean(munged_bool.to_s) %>) - end -<% end # get_spec_test_value('munged_bools')... -%> -<% else # if property.bool? -%> - - it 'should not accept boolean for dsc_<%= property.name.downcase %>' do - expect{dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = <%= format_type_value(get_spec_test_value('boolean')) %>}.to raise_error(Puppet::ResourceError) - end -<% end # if property.bool? -%> -<% if property.int? || property.int_array? -%> - - it 'should accept int for dsc_<%= property.name.downcase %>' do -<%- single_int_type = property.type.gsub(/\[\]/,'') - expected = get_spec_test_value(single_int_type) - expected = [expected] if property.int_array? -%> - dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = <%= format_type_value(get_spec_test_value(single_int_type)) %> - expect(dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>]).to eq(<%= format_type_value(expected) %>) - end -<% get_spec_test_value('munged_ints').each do |munged_int| -%> - - it 'should accept string-like int for dsc_<%= property.name.downcase %>' do - dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = <%= format_type_value(munged_int) %> -<%- expected = property.uint_array? ? [munged_int.to_i] : munged_int.to_i -%> - expect(dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>]).to eq(<%= format_type_value(expected) %>) - end -<% end # get_spec_test_value('munged_ints')... -%> - -<% if property.int_array? -%> - - it 'should accept int[] for dsc_<%= property.name.downcase %>' do - dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = <%= format_type_value(get_spec_test_value(property.type)) %> - expect(dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>]).to eq(<%= format_type_value(get_spec_test_value(property.type)) %>) - end - - it 'should accept string-like int[] for dsc_<%= property.name.downcase %>' do - dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = <%= format_type_value(get_spec_test_value('munged_ints')) %> - expect(dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>]).to eq(<%= format_type_value(get_spec_test_value('munged_ints').map(&:to_i)) %> - end -<% end # if property.int_array? -%> -<% elsif !property.uint? && !property.uint_array? # if property.int? -%> - - it 'should not accept int for dsc_<%= property.name.downcase %>' do - expect{dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = <%= format_type_value(get_spec_test_value('int_not_bool_mungeable')) %>}.to raise_error(Puppet::ResourceError) - end -<% end # if property.int? -%> -<% if property.uint? || property.uint_array? -%> - - it 'should accept uint for dsc_<%= property.name.downcase %>' do -<%- single_uint_type = property.type.gsub(/\[\]/,'') - expected = get_spec_test_value(single_uint_type) - expected = [expected] if property.uint_array? -%> - dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = <%= format_type_value(get_spec_test_value(single_uint_type)) %> - expect(dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>]).to eq(<%= format_type_value(expected) %>) - end - - it 'should not accept signed (negative) value for dsc_<%= property.name.downcase %>' do -<%- signed_type = property.type.gsub(/(u|\[\])/,'') -%> - value = <%= format_type_value(get_spec_test_value(signed_type)) %> - expect(value).to be < 0 - expect{dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = value}.to raise_error(Puppet::ResourceError) - end -<% get_spec_test_value('munged_uints').each do |munged_uint| -%> - - it 'should accept string-like uint for dsc_<%= property.name.downcase %>' do - dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = <%= format_type_value(munged_uint) %> -<%- expected = property.uint_array? ? [munged_uint.to_i] : munged_uint.to_i -%> - expect(dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>]).to eq(<%= format_type_value(expected) %>) - end -<% end # get_spec_test_value('munged_ints')... -%> -<% if property.uint_array? -%> - - it 'should accept uint[] for dsc_<%= property.name.downcase %>' do - dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = <%= format_type_value(get_spec_test_value(property.type)) %> - expect(dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>]).to eq(<%= format_type_value(get_spec_test_value(property.type)) %>) - end - - it 'should accept string-like uint[] for dsc_<%= property.name.downcase %>' do - dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = <%= format_type_value(get_spec_test_value('munged_uints')) %> - expect(dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>]).to eq(<%= format_type_value(get_spec_test_value('munged_uints').map(&:to_i)) %>) - end -<% end # if property.uint_array? -%> -<% elsif !property.int? && !property.int_array? # if property.uint? -%> - - it 'should not accept uint for dsc_<%= property.name.downcase %>' do - expect{dsc_<%= resource.friendlyname.downcase %>[:dsc_<%= property.name.downcase %>] = <%= format_type_value(get_spec_test_value('uint_not_bool_mungeable')) %>}.to raise_error(Puppet::ResourceError) - end -<% end # if property.uint? -%> -<% end # resource.properties.each... -%> - - # Configuration PROVIDER TESTS - - describe "powershell provider tests" do - - it "should successfully instanciate the provider" do - described_class.provider(:powershell).new(dsc_<%= resource.friendlyname.downcase %>) - end - - before(:each) do - @provider = described_class.provider(:powershell).new(dsc_<%= resource.friendlyname.downcase %>) - end -<% unless ['msft_filedirectoryconfiguration'].include?(resource.name.downcase) -%> -<% if resource.ps_module.name -%> - - describe "when dscmeta_module_name existing/is defined " do - - it "should compute powershell dsc test script with Invoke-DscResource" do - expect(@provider.ps_script_content('test')).to match(/Invoke-DscResource/) - end - - it "should compute powershell dsc test script with method Test" do - expect(@provider.ps_script_content('test')).to match(/Method\s+=\s*'test'/) - end - - it "should compute powershell dsc set script with Invoke-DscResource" do - expect(@provider.ps_script_content('set')).to match(/Invoke-DscResource/) - end - - it "should compute powershell dsc test script with method Set" do - expect(@provider.ps_script_content('set')).to match(/Method\s+=\s*'set'/) - end - - end -<% end # if resource.ps_module.name -%> -<% end # unless ['msft_filedirectoryconfiguration'].... -%> -<% if resource.ensurable? -%> - - describe "when dsc_ensure is '<%= resource.default_ensure_value %>'" do - - before(:each) do - dsc_<%= resource.friendlyname.downcase %>.original_parameters[:dsc_ensure] = '<%= resource.default_ensure_value %>' - dsc_<%= resource.friendlyname.downcase %>[:dsc_ensure] = '<%= resource.default_ensure_value %>' - @provider = described_class.provider(:powershell).new(dsc_<%= resource.friendlyname.downcase %>) - end - - it "should update :ensure to :<%= resource.default_ensure_value %>" do - expect(dsc_<%= resource.friendlyname.downcase %>[:ensure]).to eq(:<%= resource.default_ensure_value %>) - end - - it "should compute powershell dsc test script in which ensure value is '<%= resource.default_ensure_value %>'" do - expect(@provider.ps_script_content('test')).to match(/ensure = '<%= resource.default_ensure_value %>'/) - end - - it "should compute powershell dsc set script in which ensure value is '<%= resource.default_ensure_value %>'" do - expect(@provider.ps_script_content('set')).to match(/ensure = '<%= resource.default_ensure_value %>'/) - end - - end - -<% end # if resource.ensurable? -%> -<% if resource.absentable? -%> - describe "when dsc_ensure is '<%= resource.absent_value %>'" do - - before(:each) do - dsc_<%= resource.friendlyname.downcase %>.original_parameters[:dsc_ensure] = '<%= resource.absent_value %>' - dsc_<%= resource.friendlyname.downcase %>[:dsc_ensure] = '<%= resource.absent_value %>' - @provider = described_class.provider(:powershell).new(dsc_<%= resource.friendlyname.downcase %>) - end - - it "should update :ensure to :<%= resource.absent_value %>" do - expect(dsc_<%= resource.friendlyname.downcase %>[:ensure]).to eq(:<%= resource.absent_value %>) - end - - it "should compute powershell dsc test script in which ensure value is '<%= resource.default_ensure_value %>'" do - expect(@provider.ps_script_content('test')).to match(/ensure = '<%= resource.default_ensure_value %>'/) - end - - it "should compute powershell dsc set script in which ensure value is '<%= resource.absent_value %>'" do - expect(@provider.ps_script_content('set')).to match(/ensure = '<%= resource.absent_value %>'/) - end - - end -<% end # if resource.absentable? -%> -<% if resource.has_credential? -%> - - describe "when dsc_resource has credentials" do - - it "should convert credential hash to a pscredential object" do - expect(@provider.ps_script_content('test')).to match(/| new-pscredential'/) - end - - end - -<% end # if resource.has_credential? -%> - - end -end diff --git a/build/dsc/templates/pso_pscrendential.ps1.erb b/build/dsc/templates/pso_pscrendential.ps1.erb deleted file mode 100644 index 0e733683..00000000 --- a/build/dsc/templates/pso_pscrendential.ps1.erb +++ /dev/null @@ -1,2 +0,0 @@ -$secpasswd = ConvertTo-SecureString "<% property.password %>" -AsPlainText -Force -$mycreds = New-Object System.Management.Automation.PSCredential ("<% property.username %>", $secpasswd) \ No newline at end of file diff --git a/build/dsc/version.rb b/build/dsc/version.rb deleted file mode 100644 index a7b888e9..00000000 --- a/build/dsc/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module Dsc - VERSION = "0.0.1" -end \ No newline at end of file diff --git a/build/qualifiers/base/MSFT_Qualifiers.mof b/build/qualifiers/base/MSFT_Qualifiers.mof deleted file mode 100644 index 849d0ddc..00000000 --- a/build/qualifiers/base/MSFT_Qualifiers.mof +++ /dev/null @@ -1,12 +0,0 @@ -Qualifier Stream : boolean = false, - Scope( method, parameter), - Flavor(DisableOverride, ToSubclass); - -Qualifier ClassVersion : string = null, - Scope(class, association, indication), - Flavor(EnableOverride, Restricted); - -Qualifier FriendlyName : string = null, - Scope(class, association, indication), - Flavor(EnableOverride, Restricted); - diff --git a/build/vendor/dmtf_mof/Application/CIM_AGPSoftwareFeature.mof b/build/vendor/dmtf_mof/Application/CIM_AGPSoftwareFeature.mof deleted file mode 100644 index fc7cf9ca..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_AGPSoftwareFeature.mof +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AGPSoftwareFeature -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::BIOS" ), - Description ( - "AGPSoftwareFeature adds two attributes to SoftwareFeature to " - "represent the capabilities of an AGP device driver. An " - "instance of this class would be associated with the Driver\'s " - "SoftwareElement using the SoftwareFeatureSoftware Elements " - "relationship. The driver\'s SoftwareElement is associated with " - "the AGPVideoController via the Device Software relationship." )] -class CIM_AGPSoftwareFeature : CIM_SoftwareFeature { - - [Description ( - "An array of integers indicating various capabilities and " - "characteristics of the AGPVideoController." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6" }, - Values { "Unknown", "Other", "OS support", - "Hardware Acceleration", "Hardware Blit", - "OpenGL Support", "Cache Coherency" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_AGPSoftwareFeature.CharacteristicDescriptions" }] - uint16 Characteristics[]; - - [Description ( - "An array of free-form strings providing more detailed " - "explanations for any of the features indicated in the " - "Characteristics array. Each entry in this array is " - "related to the Characteristics array entry located at " - "the same index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_AGPSoftwareFeature.Characteristics" }] - string CharacteristicDescriptions[]; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_Action.mof b/build/vendor/dmtf_mof/Application/CIM_Action.mof deleted file mode 100644 index f3610a37..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_Action.mof +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) 2009 DMTF. All Rights Reserved. - [Abstract, Version ( "2.23.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "A CIM_Action is an operation that is part of a process to " - "either create a SoftwareElement in its next state or to " - "eliminate the SoftwareElement in its current state. A " - "CIM_ComputerSystem object represents the environment in which " - "CIM_SoftwareElements are already deployed/installed or into " - "which the elements will be deployed/installed. For the case in " - "which an element is already installed, the " - "CIM_InstalledSoftwareElement association identifies the " - "CIM_ComputerSystem object that represents the \"environment\". " - "When a SoftwareElement is being deployed for installation on a " - "ComputerSystem, that system is the target of the Action and is " - "identified using the TargetSystem reference of the " - "InvokeOnSystem method." )] -class CIM_Action : CIM_ManagedElement { - - [Key, Description ( - "The name used to identify the SoftwareElement that is " - "being acted upon." ), - MaxLen ( 256 ), - Propagated ( "CIM_SoftwareElement.Name" )] - string Name; - - [Key, Description ( - "The version of the SoftwareElement being acted upon." ), - MaxLen ( 64 ), - Propagated ( "CIM_SoftwareElement.Version" )] - string Version; - - [Key, Description ( - "The SoftwareElementState of the SoftwareElement being acted upon." - ), - ValueMap { "0", "1", "2", "3" }, - Values { "Deployable", "Installable", "Executable", "Running" }, - Propagated ( "CIM_SoftwareElement.SoftwareElementState" )] - uint16 SoftwareElementState; - - [Key, Description ( - "This is an identifier for the SoftwareElement being acted upon." - ), - MaxLen ( 256 ), - Propagated ( "CIM_SoftwareElement.SoftwareElementID" )] - string SoftwareElementID; - - [Key, Description ( - "The Target Operating System of the SoftwareElement being " - "acted upon." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26", "27", - "28", "29", "30", "31", "32", "33", "34", "35", "36", - "37", "38", "39", "40", "41", "42", "43", "44", "45", - "46", "47", "48", "49", "50", "51", "52", "53", "54", - "55", "56", "57", "58", "59", "60", "61", "62", "63", - "64", "65", "66", "67", "68", "69", "70", "71", "72", - "73", "74", "75", "76", "77", "78", "79", "80", "81", - "82", "83", "84", "85", "86", "87", "88", "89", "90", - "91", "92", "93", "94", "95", "96", "97", "98", "99", - "100", "101", "102", "103", "104", "105", "106", "107", - "108", "109", "110" }, - Values { "Unknown", "Other", "MACOS", "ATTUNIX", "DGUX", - "DECNT", "Tru64 UNIX", "OpenVMS", "HPUX", "AIX", - //10 - "MVS", "OS400", "OS/2", "JavaVM", "MSDOS", - "WIN3x", "WIN95", "WIN98", "WINNT", "WINCE", - //20 - "NCR3000", "NetWare", "OSF", "DC/OS", - "Reliant UNIX", "SCO UnixWare", "SCO OpenServer", - "Sequent", "IRIX", "Solaris", //30 - "SunOS", - "U6000", "ASERIES", "HP NonStop OS", "HP NonStop OSS", - "BS2000", "LINUX", "Lynx", "XENIX", "VM", - //40 - "Interactive UNIX", "BSDUNIX", "FreeBSD", - "NetBSD", "GNU Hurd", "OS9", "MACH Kernel", "Inferno", - "QNX", "EPOC", //50 - "IxWorks", "VxWorks", - "MiNT", "BeOS", "HP MPE", "NextStep", "PalmPilot", - "Rhapsody", "Windows 2000", "Dedicated", - //60 - "OS/390", "VSE", "TPF", "Windows (R) Me", - "Caldera Open UNIX", "OpenBSD", "Not Applicable", - "Windows XP", "z/OS", "Microsoft Windows Server 2003", - //70 - "Microsoft Windows Server 2003 64-Bit", - "Windows XP 64-Bit", "Windows XP Embedded", - "Windows Vista", "Windows Vista 64-Bit", - "Windows Embedded for Point of Service", - "Microsoft Windows Server 2008", - "Microsoft Windows Server 2008 64-Bit", "FreeBSD 64-Bit", - "RedHat Enterprise Linux", - //80 - "RedHat Enterprise Linux 64-Bit", - "Solaris 64-Bit", "SUSE", "SUSE 64-Bit", "SLES", - "SLES 64-Bit", "Novell OES", "Novell Linux Desktop", - "Sun Java Desktop System", "Mandriva", - //90 - "Mandriva 64-Bit", "TurboLinux", - "TurboLinux 64-Bit", "Ubuntu", "Ubuntu 64-Bit", "Debian", - "Debian 64-Bit", "Linux 2.4.x", "Linux 2.4.x 64-Bit", - "Linux 2.6.x", //100 - "Linux 2.6.x 64-Bit", - "Linux 64-Bit", "Other 64-Bit", - "Microsoft Windows Server 2008 R2", "VMware ESXi", - "Microsoft Windows 7", "CentOS 32-bit", "CentOS 64-bit", - "Oracle Enterprise Linux 32-bit", - "Oracle Enterprise Linux 64-bit", - //110 - "eComStation 32-bitx" }, - Propagated ( "CIM_SoftwareElement.TargetOperatingSystem" )] - uint16 TargetOperatingSystem; - - [Key, Description ( - "The ActionID property is a unique identifier assigned to " - "a particular Action for a SoftwareElement." ), - MaxLen ( 256 )] - string ActionID; - - [Description ( - "The Direction property is used to indicate whether this " - "Action is part of a sequence to transition the " - "SoftwareElement to its next state (\"Install\") or to " - "remove the element (\"Uninstall\")." ), - ValueMap { "0", "1" }, - Values { "Install", "Uninstall" }] - uint16 Direction; - - - [Description ( - "The Invoke method takes this Action. The details of how " - "the Action is implemented are described by specific " - "subclasses of CIM_Action. When the SoftwareElement being " - "transitioned or eliminated is already installed, the " - "CIM_InstalledSoftwareElement association identifies the " - "CIM_ComputerSystem in whose context the Invoke is " - "executed. If this association is not in place, then the " - "InvokeOnSystem method should be used - since it " - "identifies the TargetSystem as a parameter of the " - "method. \n" - "The results of the Invoke method are based on the return " - "value. A zero is returned if the Action is satisfied. A " - "one is returned if the method is not supported. Any " - "other value indicates the Action is not satisfied." )] - uint32 Invoke( -); - - [Description ( - "The InvokeOnSystem method takes this Action. The details " - "of how the Action is implemented are described by " - "specific subclasses of CIM_Action. The method\'s " - "TargetSystem input parameter specifies the " - "ComputerSystem in whose context the method is invoked. \n" - "The results of the InvokeOnSystem method are based on " - "the return value. A zero is returned if the Action is " - "satisfied. A one is returned if the method is not " - "supported. Any other value indicates the Action is not " - "satisfied." )] - uint32 InvokeOnSystem( - [IN, Description ( - "Reference to target system in whose context the " - "method is to be invoked." )] - CIM_ComputerSystem REF TargetSystem); - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_ActionSequence.mof b/build/vendor/dmtf_mof/Application/CIM_ActionSequence.mof deleted file mode 100644 index 8c22a820..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_ActionSequence.mof +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ActionSequence -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "The CIM_ActionSequence association defines a series of " - "operations that either transition a SoftwareElement, " - "referenced by the CIM_SoftwareElementActions association, to " - "the next state or removes the element from its current state. " - "The Action classes participating in this association must have " - "the same value for the Action.Direction property - since they " - "are either part of a sequence to transition a SoftwareElement " - "into its next state or to uninstall it. The next-state and " - "uninstall Actions associated with a particular SoftwareElement " - "must be a continuous sequence. \n" - "ActionSequence is an association that loops on the Action " - "classes with roles for the \'prior\' and \'next\' Actions in " - "the sequence. The need for a continuous sequence imples: " - "(1)Within the set of next-state or uninstall Actions, there is " - "one and only one Action that does not have an instance of " - "ActionSequence referencing it in the \'next\' role. This is " - "the first Action in the sequence. (2) Within the set of " - "next-state or uninstall Actions, there is one and only one " - "Action that does not have an instance of ActionSequence " - "referencing it in the \'prior\' role. This is the last Action " - "in the sequence. (3) All other Actions within the set of " - "next-state and uninstall Actions must participate in two " - "instances of ActionSequence, one in a \'prior\' role and the " - "other in the \'next\' role." )] -class CIM_ActionSequence { - - [Key, Max ( 1 ), - Description ( "The next Action in the sequence." )] - CIM_Action REF Next; - - [Key, Max ( 1 ), - Description ( "The previous Action in the sequence." )] - CIM_Action REF Prior; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_ApplicationSystem.mof b/build/vendor/dmtf_mof/Application/CIM_ApplicationSystem.mof deleted file mode 100644 index 4c3a3e71..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_ApplicationSystem.mof +++ /dev/null @@ -1,230 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ApplicationSystem -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::DeploymentModel" ), - Description ( - "The ApplicationSystem class represents an application or a " - "software system that supports a particular business function " - "and that can be managed as an independent unit. Such a system " - "can be decomposed into its functional components using the " - "CIM_SoftwareFeature class. The Features for a particular " - "application or software system are located using the " - "CIM_ApplicationSystemSoftwareFeature association. The features " - "are part of the deployment-oriented aspects of the application " - "system. \n" - "With regard to the application runtime aspects, the " - "ApplicationSystem class also represents the core class of the " - "Application Systems\' sub-model which of the application " - "runtime model. Its role in the systems sub-model is a) the " - "root node of the containment hierarchy of the application " - "elements (at runtime) as services, components, sub-systems, " - "etc., b) the place for runtime overview information such as " - "response time or system status, c) runtime control of the " - "entire application (e.g., start/stop), and d) the main entry " - "point to the navigation through and drill-down into the " - "runtime model. \n" - "The lifetime of an instance of this class is not limited to " - "the application instance it represents. Even if the " - "application is not running, the ApplicationSystem object can " - "report properties that have values (e.g., the name of the " - "application or the current status). Note that it is also " - "possible to define the lifetime of the objects through the " - "lifetime of the application instances. \n" - "Through ApplicationSystemDependency, non-containment " - "relationships can be expressed." )] -class CIM_ApplicationSystem : CIM_System { - - [Description ( - "Distribution describes how the application system is " - "distributed with respect to its underlying servers. In " - "general, the application system is distributed or local. " - "This property indicates whether the application system " - "is running on one or multiple servers. This can be " - "determined without having to query for associated " - "servers represented by ComputerSystems. Distributed " - "systems also introduce a virtual notion to themselves. " - "Note that a distributed application system is not " - "tangible but virtual. Only its contained local systems " - "can be found as processes or threads, and can therefore " - "be regarded as tangible. The distributed system remains " - "a named, virtual entity, that scopes strongly bound " - "constituents and allows the application to be managed in " - "its entirety. \n" - "The property is needed to help root cause analysis and " - "operations, especially when these are automated, in " - "order to clearly know that more than one executed " - "application - most likely the local application systems " - "- is affected by the management task. This is " - "particularly true if the contained application systems " - "provide uniform functionality like webserver or " - "application server farms. \n" - "To express constraints between distributed and local " - "system, this class must be derived and appropriate " - "associations must be defined. \n" - "This property should not be confused with the Roles[] " - "property defined in System. The latter is reserved for " - "administrator assigned roles." ), - ValueMap { "0", "1", "2", "3..32767", "32768..65535" }, - Values { "Unknown", "Distributed", "Local", "DMTF Reserved", - "Vendor Specific" }] - uint16 Distribution; - - [Override ( "EnabledState" ), - Description ( - "EnabledState is an integer enumeration that indicates " - "the enabled/disabled states of an element. It can also " - "indicate the transitions between these requested states. " - "For example, shutting down and starting are transient " - "states between enabled and disabled. \n" - "In contrast to the original version defined higher in " - "the inheritance hierarchy (EnabledLogicalElement), " - "EnabledState is simplified. It reflects the notion of an " - "execution status tailored to applications and represents " - "a summary of the original property. It allows simplified " - "and efficient determination of whether the application " - "is started, stopped or in transition between either of " - "these states. The property does not show any errors. " - "Errors MUST be described in MSE.OperationalStatus, and " - "MAY also be described in logs or other data sources. \n" - "The mapping to MSE.OperationalStatus is as follows: \n" - "ExecutionStatus <- MSE.OperationalStatus \n" - "Unknown <- Unknown, No Contact, Lost Communication, \n" - "Either of the values <- Other \n" - "Enabled (started) <- OK, Degraded, Stressed, Predictive " - "Failure, In Service, Dormant, Supporting Entity in " - "Error, Completed \n" - "Enabled or Disabled (Started or Stopped) <- Error, " - "Non-Recoverable Error \n" - "Starting <- Starting \n" - "Shutting Down (Stopping) <- Stopping \n" - "Disabled (Stopped) <- Stopped, Aborted. \n" - "The mapping to the original EnabledState property is as " - "follows: \n" - "Unknown <- Unknown, Not Applicable \n" - "Either of the values <-Other \n" - "Enabled <- Enabled, Enabled but Offline, In Test, " - "Deferred, Quiesce \n" - "Disabled <- Disabled \n" - "ShuttingDown <- ShuttingDown \n" - "Starting <- Starting." ), - ValueMap { "0", "2", "3", "4", "10", "11..32767", - "32768..65535" }, - Values { "Unknown", "Enabled", "Disabled", "Shutting Down", - "Starting", "DMTF Reserved", "Vendor Reserved" }] - uint16 EnabledState = 0; - - [Description ( - "The point in time (date and time) when the application " - "system was last started. If the application system is in " - "a state other the state Enabled (i.e., started and " - "running) this value is not meaningful and the property " - "value MUST be set to all zeros. \n" - "StartupTime is preferably the point in time when the " - "application is available to the user. Instead, if the " - "provider and/or the instrumentation cannot determine the " - "point in time the application becomes available, the " - "point in time can be used at which the underlying " - "operating system reports successful launch of the " - "application. If no value can be provided the property " - "value MUST be set to all zeros." )] - datetime StartupTime; - - [Description ( - "ServingStatus is a summary of MSE.OperationalStatus. It " - "allows simplified and efficient determination of whether " - "the application is providing service or has stopped " - "doing so for various reasons like errors, shutdown, " - "abort, etc. Therefore, no transitional values are " - "provided. The property does not show any errors. Errors " - "MUST be described in MSE.OperationalStatus, and MAY also " - "be described in logs or other data sources. Therefore, " - "ServingStatus is suited to provide summary information " - "for monitoring purposes and service level management. \n" - "The mapping to MSE.OperationalStatus is as follows: \n" - "ServingStatus <- MSE.OperationalStatus \n" - "Unknown <- Unknown, No Contact, Lost Communication \n" - "Either of the values <- Other \n" - "Serving <- OK, Degraded, Stressed, Predictive Failure, " - "Completed \n" - "Not Serving <- Error, Non-Recoverable Error, Starting, " - "Stopping, Stopped, In Service, Aborted, Dormant, " - "Supporting Entity in Error." ), - ValueMap { "0", "1", "2", "5..4096", "4097..65535" }, - Values { "Unknown", "Serving", "Not Serving", - "DMTF Reserved", "Vendor Specific" }, - ModelCorrespondence { - "CIM_ManagedSystemElement.OperationalStatus" }] - uint16 ServingStatus; - - [Description ( - "The point in time at which the ServingStatus property " - "was last updated." ), - ModelCorrespondence { "CIM_ApplicationSystem.ServingStatus" }] - datetime LastServingStatusUpdate; - - - [Description ( - "StartApplication() starts an application system. The " - "ApplicationSystem object must have been created prior to " - "the invocation of this method. It is up to the " - "implementation of the method to define which of the " - "contained or dependent sub-elements are to be started " - "and in which order their startup may occur. \n" - "Since a system startup can extend over long periods of " - "time (several minutes is not unusual for complex " - "distributed applications), the method can be implemented " - "synchronously or asynchronously. In both cases " - "EnabledState and RequestedState reflect the current " - "state of the application and the desired state (Enabled) " - "respectively. The exact nature of the errors during the " - "startup cannot be determined in the asynchronous case. " - "The method must return one of the following values: \n" - "Unspecified Error: If no return code can be identified \n" - "Completed with No Error: successful invocation \n" - "Start Already in Progress: application still being " - "started \n" - "Failed:Indicates errors upon execution." ), - ValueMap { "0", "1", "2", "3", "4..4096", "4097..32767", - "32768..65535" }, - Values { "Unspecified Error", "Completed with No Error", - "Start Already in Progress", "Failed", "DMTF Reserved", - "Method Reserved", "Vendor Specific" }, - ModelCorrespondence { "CIM_ApplicationSystem.EnabledState", - "CIM_ApplicationSystem.RequestedState" }] - uint16 StartApplication( -); - - [Description ( - "StopApplication() allows for stopping/shutting down an " - "application system. It is up to the implementation of " - "the method to define which of the contained or dependent " - "sub-elements are to be stopped and in which order their " - "stop has to occur. \n" - "Since a system shutdown can last considerable time " - "(several minutes is not necessarily unusual for complex " - "distributed applications), the method can be implemented " - "synchronously or asynchronously. In both cases " - "EnabledState and RequestedState reflect the current " - "state of the application and the desired state " - "(Disabled) respectively. The exact nature of the errors " - "during the stop cannot be determined in the asynchronous " - "case. The method must return one of the following: \n" - "Unspecified Error: If no return code can be identified \n" - "Completed with No Error: successful invocation \n" - "Stop Already in Process: application is shutting down \n" - "Failed: Indicates errors upon execution." ), - ValueMap { "0", "1", "2", "3", "4..4096", "4097..32767", - "32768..65535" }, - Values { "Unspecified Error", "Completed with No Error", - "Stop Already in Process", "Failed", "DMTF Reserved", - "Method Reserved", "Vendor Specific" }, - ModelCorrespondence { "CIM_ApplicationSystem.EnabledState", - "CIM_ApplicationSystem.RequestedState" }] - uint16 StopApplication( -); - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_ApplicationSystemDependency.mof b/build/vendor/dmtf_mof/Application/CIM_ApplicationSystemDependency.mof deleted file mode 100644 index db034ac6..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_ApplicationSystemDependency.mof +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ApplicationSystemDependency -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::AppRuntime" ), - Description ( - "This dependency expresses use-relationships or other logical " - "interactions between application systems. At the business " - "level, the relationship could be due to a distributed business " - "process. Viewed from the technical level, the relationship is " - "to be interpreted as communication between application " - "systems. ApplicationSystemDependency primarily expresses " - "\'horizontal\' relationships, i.e., relationships between " - "distributed or local application systems." )] -class CIM_ApplicationSystemDependency : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "Antecedent represents the independent application system " - "in this association." )] - CIM_ApplicationSystem REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "Dependent represents the application system dependent on " - "the Antecedent." )] - CIM_ApplicationSystem REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_ApplicationSystemDirectory.mof b/build/vendor/dmtf_mof/Application/CIM_ApplicationSystemDirectory.mof deleted file mode 100644 index dee24caa..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_ApplicationSystemDirectory.mof +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ApplicationSystemDirectory -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::DeploymentModel" ), - Description ( - "CIM_ApplicationSystemDirectory is an association used to " - "establish a relationship between an ApplicationSystem and the " - "Directories that it uses. This is used to identify the single " - "root installation directory for an ApplicationSystem, as well " - "as the logical purpose of other directories utilized by the " - "ApplicationSystem. Note: This class is intended to be a " - "subclass of CIM_Dependency but the current specification " - "prohibits the extension of parent keys in a subclass. This " - "will be revisited when the specification changes to make the " - "intended inheritance possible." )] -class CIM_ApplicationSystemDirectory { - - [Key, Description ( - "A Directory which is used by the associated ApplicationSystem." - )] - CIM_Directory REF Antecedent; - - [Key, Description ( - "An ApplicationSystem which depends upon the associated Directory." - )] - CIM_ApplicationSystem REF Dependent; - - [Key, Description ( - "Name is a string representing a meaningful identifier " - "for referring to the associated Directory in the context " - "of the ApplicationSystem. As an example, this might be " - "the name of the environment variable used to hold the " - "same directory information." ), - MaxLen ( 1024 )] - string Name; - - [Required, Description ( - "ApplicationDirectoryUse is an enumerated array which " - "indicates the purpose(s) of the associated directory " - "within the context of the ApplicationSystem. A value of " - "\"Root\" indicates that the associated directory is the " - "one and only root directory for the ApplicationSystem. " - "This would typically be the directory path in which the " - "application is installed. For applications which are " - "installed in multiple directories, this would represent " - "the directory from which initial program and " - "configuration files are loaded. A value of \"Program\" " - "indicates that the directory contains supplemental " - "program files used by the ApplicationSystem. A value of " - "\"Data\" indicates that the directory is used for data " - "storage. A value of \"Log\" indicates that the directory " - "is used to contain log files for the ApplicationSystem. " - "It is considered invalid for multiple associations from " - "the same ApplicationSystem to have a value of \"Root\". " - "The \"Unknown\" state is expected to be short-lived and " - "would typically be seen only in the installation phase " - "of an ApplicationSystem, if at all. A value of \"Temp\" " - "indicates that the associated directory is used to " - "contain temporary files created by the " - "ApplicationSystem. The \"Other\" state should only be " - "used in cases where none of the designated values are " - "appropriate. This is intended to enable use of the model " - "for unanticipated purposes and would usually signal a " - "need to extend this enumeration through the standards " - "process." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6" }, - Values { "Unknown", "Other", "Root", "Program", "Data", - "Log", "Temp" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_ApplicationSystemDirectory.OtherUseDescriptions" }] - uint16 ApplicationDirectoryUses[]; - - [Description ( - "A string describing how the ApplicationSystem utilizes " - "the associated directory when the corresponding entry in " - "ApplicationDirectoryUses is set to 1, \"Other\". This " - "attribute is meaningless and should be null when the " - "corresponding entry in ApplicationDirectoryUses is set " - "to any value other than 1." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_ApplicationSystemDirectory.ApplicationDirectoryUses" }] - string OtherUseDescriptions[]; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_ApplicationSystemHierarchy.mof b/build/vendor/dmtf_mof/Application/CIM_ApplicationSystemHierarchy.mof deleted file mode 100644 index 08c2ee13..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_ApplicationSystemHierarchy.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ApplicationSystemHierarchy -// ================================================================== - [Association, Aggregation, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::AppRuntime" ), - Description ( - "Application systems may have arbitrarily complex structures. " - "It may be necessary to build application system hierarchies " - "including the two-step hierarchy of distributed and local " - "systems. ApplicationSystemHierarchy allows building " - "containment trees (only one parent at a time). It should not " - "be used to express use-relationships; use " - "CIM_ApplicationSystemDependency instead." )] -class CIM_ApplicationSystemHierarchy : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( - "The parent ApplicationSystem in the association." )] - CIM_ApplicationSystem REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The child ApplicationSystem in the association." )] - CIM_ApplicationSystem REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_ApplicationSystemSoftwareFeature.mof b/build/vendor/dmtf_mof/Application/CIM_ApplicationSystemSoftwareFeature.mof deleted file mode 100644 index 3d12f825..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_ApplicationSystemSoftwareFeature.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ApplicationSystemSoftwareFeature -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::DeploymentModel" ), - Description ( - "The ApplicationSystemSoftwareFeature association identifies " - "the Features that make up a particular ApplicationSystem. The " - "SoftwareFeatures can be scoped by different Products." )] -class CIM_ApplicationSystemSoftwareFeature : CIM_SystemComponent { - - [Aggregate, Override ( "GroupComponent" ), - Description ( - "The ApplicationSystem that aggregates the Features." )] - CIM_ApplicationSystem REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The Features in an ApplicationSystem." )] - CIM_SoftwareFeature REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_ArchitectureCheck.mof b/build/vendor/dmtf_mof/Application/CIM_ArchitectureCheck.mof deleted file mode 100644 index 57a7ef84..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_ArchitectureCheck.mof +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "ArchitectureCheck specifies the hardware platform on which a " - "SoftwareElement can run. The details of this Check are " - "compared with the information found in the CIM_Processor " - "object, related to the CIM_ComputerSystem instance that " - "describes the environment (related by the association, " - "CIM_ComputerSystemProcessor). There should be at least one " - "CIM_Processor that satisfies the details of the Check. In " - "other words, all the processors on the relevant computer " - "system do not need to satisfy the Check." )] -class CIM_ArchitectureCheck : CIM_Check { - - [Description ( - "The ArchitectureType property identifies a particular " - "type of architecture or architectural family that is " - "required to properly execute a particular " - "SoftwareElement. The intent is to capture the details " - "about the machine instructions exploited by the " - "executables of the SoftwareElement." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - // 11 - "11", "12", "13", "14", - "15", "16", "17", "18", "19", "20", "21", - // 24 - "24", "25", "26", "27", - "28", "29", "30", "31", "32", "33", "34", "35", "36", - "37", "38", "39", "40", "41", "42", "43", - // 48 - "48", "49", "50", "51", - "52", "53", "54", "55", "56", "57", "58", "59", "60", - // 64 - "64", "65", "66", "67", - "68", "69", // 80 - "80", "81", - "82", "83", "84", "85", "86", "87", "88", - // 96 - "96", "97", "98", - "99", "100", "101", - // 112 - "112", "120", "121", - "122", "128", "130", "131", "132", "133", "134", - // 135 - "135", "136", "137", "138", "139", "140", - "141", "142", "143", - // 144 - "144", "145", - "146", "147", "148", "149", "150", - // 160 - "160", "161", - "162", "163", "164", "165", "166", "167", "168", "169", - // 170 - "170", "171", "172", "173", "174", "175", - "176", "177", "178", "179", // 180 - "180", "181", - "182", "183", "184", "185", "186", "187", "188", "189", - // 190 - "190", "191", "192", - "193", "194", "195", "196", "197", "198", "199", - // 200 - "200", "201", "202", - "203", "204", "205", "206", // 210 - "210", "211", - "212", "213", "214", "215", "216", "217", "218", "219", - // 220 - "221", "222", "223", "224", - // 230 - "230", "231", "232", "233", "234", - "235", "236", "237", "238", "239", - // 250 - "250", "251", "254", - "255", "260", "261", "280", "281", - // 300 - "300", "301", "302", - "320", "350", "500", - // 65534 - "65534", "65535" }, - Values { "Other", "Unknown", "8086", "80286", "80386", - "80486", "8087", "80287", "80387", "80487", - // 11 - "Pentium(R) brand", - "Pentium(R) Pro", "Pentium(R) II", - "Pentium(R) processor with MMX(TM) technology", - "Celeron(TM)", "Pentium(R) II Xeon(TM)", "Pentium(R) III", - "M1 Family", "M2 Family", - "Intel(R) Celeron(R) M processor", - "Intel(R) Pentium(R) 4 HT processor", - // 24 - "K5 Family", - "K6 Family", "K6-2", "K6-3", - "AMD Athlon(TM) Processor Family", - "AMD(R) Duron(TM) Processor", "AMD29000 Family", - // 31 - "K6-2+", - "Power PC Family", "Power PC 601", "Power PC 603", - "Power PC 603+", "Power PC 604", "Power PC 620", - "Power PC X704", "Power PC 750", - "Intel(R) Core(TM) Duo processor", - "Intel(R) Core(TM) Duo mobile processor", - "Intel(R) Core(TM) Solo mobile processor", - "Intel(R) Atom(TM) processor", - // 48 - "Alpha Family", - "Alpha 21064", "Alpha 21066", "Alpha 21164", - "Alpha 21164PC", "Alpha 21164a", "Alpha 21264", - "Alpha 21364", - // 56 - "AMD Turion(TM) II Ultra Dual-Core Mobile M Processor Family", - "AMD Turion(TM) II Dual-Core Mobile M Processor Family", - "AMD Athlon(TM) II Dual-Core Mobile M Processor Family", - "AMD Opteron(TM) 6100 Series Processor", - "AMD Opteron(TM) 4100 Series Processor", - // 64 - "MIPS Family", - "MIPS R4000", "MIPS R4200", "MIPS R4400", "MIPS R4600", - "MIPS R10000", - // 80 - "SPARC Family", - "SuperSPARC", "microSPARC II", "microSPARC IIep", - "UltraSPARC", "UltraSPARC II", "UltraSPARC IIi", - "UltraSPARC III", "UltraSPARC IIIi", - // 96 - "68040", - "68xxx Family", "68000", "68010", "68020", "68030", - // 112 - "Hobbit Family", - "Crusoe(TM) TM5000 Family", "Crusoe(TM) TM3000 Family", - "Efficeon(TM) TM8000 Family", "Weitek", - "Itanium(TM) Processor", - "AMD Athlon(TM) 64 Processor Family", - "AMD Opteron(TM) Processor Family", - "AMD Sempron(TM) Processor Family", - "AMD Turion(TM) 64 Mobile Technology", - // 135 - "Dual-Core AMD Opteron(TM) Processor Family", - "AMD Athlon(TM) 64 X2 Dual-Core Processor Family", - "AMD Turion(TM) 64 X2 Mobile Technology", - "Quad-Core AMD Opteron(TM) Processor Family", - "Third-Generation AMD Opteron(TM) Processor Family", - "AMD Phenom(TM) FX Quad-Core Processor Family", - "AMD Phenom(TM) X4 Quad-Core Processor Family", - "AMD Phenom(TM) X2 Dual-Core Processor Family", - "AMD Athlon(TM) X2 Dual-Core Processor Family", - // 144 - "PA-RISC Family", - "PA-RISC 8500", "PA-RISC 8000", "PA-RISC 7300LC", - "PA-RISC 7200", "PA-RISC 7100LC", "PA-RISC 7100", - // 160 - "V30 Family", - // 161 - "Quad-Core Intel(R) Xeon(R) processor 3200 Series", - "Dual-Core Intel(R) Xeon(R) processor 3000 Series", - "Quad-Core Intel(R) Xeon(R) processor 5300 Series", - "Dual-Core Intel(R) Xeon(R) processor 5100 Series", - "Dual-Core Intel(R) Xeon(R) processor 5000 Series", - "Dual-Core Intel(R) Xeon(R) processor LV", - "Dual-Core Intel(R) Xeon(R) processor ULV", - "Dual-Core Intel(R) Xeon(R) processor 7100 Series", - "Quad-Core Intel(R) Xeon(R) processor 5400 Series", - "Quad-Core Intel(R) Xeon(R) processor", - "Dual-Core Intel(R) Xeon(R) processor 5200 Series", - "Dual-Core Intel(R) Xeon(R) processor 7200 Series", - "Quad-Core Intel(R) Xeon(R) processor 7300 Series", - "Quad-Core Intel(R) Xeon(R) processor 7400 Series", - "Multi-Core Intel(R) Xeon(R) processor 7400 Series", - // 176 - "Pentium(R) III Xeon(TM)", - "Pentium(R) III Processor with Intel(R) SpeedStep(TM) Technology", - "Pentium(R) 4", "Intel(R) Xeon(TM)", - // 180 - "AS400 Family", - "Intel(R) Xeon(TM) processor MP", - "AMD Athlon(TM) XP Family", "AMD Athlon(TM) MP Family", - "Intel(R) Itanium(R) 2", - "Intel(R) Pentium(R) M processor", - "Intel(R) Celeron(R) D processor", - "Intel(R) Pentium(R) D processor", - "Intel(R) Pentium(R) Processor Extreme Edition", - "Intel(R) Core(TM) Solo Processor", - // 190 - "K7", - "Intel(R) Core(TM)2 Duo Processor", - "Intel(R) Core(TM)2 Solo processor", - "Intel(R) Core(TM)2 Extreme processor", - "Intel(R) Core(TM)2 Quad processor", - "Intel(R) Core(TM)2 Extreme mobile processor", - "Intel(R) Core(TM)2 Duo mobile processor", - "Intel(R) Core(TM)2 Solo mobile processor", - "Intel(R) Core(TM) i7 processor", - "Dual-Core Intel(R) Celeron(R) Processor", - // 200 - "S/390 and zSeries Family", - "ESA/390 G4", "ESA/390 G5", "ESA/390 G6", - "z/Architectur base", - // 205 - "Intel(R) Core(TM) i5 processor", - "Intel(R) Core(TM) i3 processor", - // 210 - "VIA C7(TM)-M Processor Family", - "VIA C7(TM)-D Processor Family", - "VIA C7(TM) Processor Family", - "VIA Eden(TM) Processor Family", - "Multi-Core Intel(R) Xeon(R) processor", - "Dual-Core Intel(R) Xeon(R) processor 3xxx Series", - "Quad-Core Intel(R) Xeon(R) processor 3xxx Series", - "VIA Nano(TM) Processor Family", - "Dual-Core Intel(R) Xeon(R) processor 5xxx Series", - "Quad-Core Intel(R) Xeon(R) processor 5xxx Series", - // 221 - "Dual-Core Intel(R) Xeon(R) processor 7xxx Series", - "Quad-Core Intel(R) Xeon(R) processor 7xxx Series", - "Multi-Core Intel(R) Xeon(R) processor 7xxx Series", - "Multi-Core Intel(R) Xeon(R) processor 3400 Series", - // 230 - "Embedded AMD Opteron(TM) Quad-Core Processor Family", - "AMD Phenom(TM) Triple-Core Processor Family", - "AMD Turion(TM) Ultra Dual-Core Mobile Processor Family", - "AMD Turion(TM) Dual-Core Mobile Processor Family", - "AMD Athlon(TM) Dual-Core Processor Family", - "AMD Sempron(TM) SI Processor Family", - "AMD Phenom(TM) II Processor Family", - "AMD Athlon(TM) II Processor Family", - "Six-Core AMD Opteron(TM) Processor Family", - "AMD Sempron(TM) M Processor Family", - // 250 - "i860", "i960", - "Reserved (SMBIOS Extension)", - "Reserved (Un-initialized Flash Content - Lo)", "SH-3", - "SH-4", "ARM", "StrongARM", - // 300 - "6x86", "MediaGX", - "MII", "WinChip", "DSP", "Video Processor", - // 65534 - "Reserved (For Future Special Purpose Assignment)", - "Reserved (Un-initialized Flash Content - Hi)" }, - MappingStrings { "MIF.DMTF|Processor|017.3" }, - ModelCorrespondence { "CIM_Processor.Family" }] - uint16 ArchitectureType; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_AssociatedAppSystemOverviewStatistics.mof b/build/vendor/dmtf_mof/Application/CIM_AssociatedAppSystemOverviewStatistics.mof deleted file mode 100644 index 54590e44..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_AssociatedAppSystemOverviewStatistics.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AssociatedAppSystemOverviewStatistics -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::AppRuntime" ), - Description ( - "The link to the runtime overview statistics of an application system." - )] -class CIM_AssociatedAppSystemOverviewStatistics : CIM_ElementStatisticalData { - - [Override ( "ManagedElement" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The application system for which the overview is defined." )] - CIM_ApplicationSystem REF ManagedElement; - - [Override ( "Stats" ), - Max ( 1 ), - Description ( - "The application system runtime statistical overview." )] - CIM_StatisticalRuntimeOverview REF Stats; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_BIOSElement.mof b/build/vendor/dmtf_mof/Application/CIM_BIOSElement.mof deleted file mode 100644 index e31aca3c..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_BIOSElement.mof +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2007 DMTF. All Rights Reserved. - [Version ( "2.17.0" ), - UMLPackagePath ( "CIM::Application::BIOS" ), - Description ( - "BIOSElement represents the low-level software that is loaded " - "into non-volatile storage and used to bring up and configure a " - "ComputerSystem." )] -class CIM_BIOSElement : CIM_SoftwareElement { - - [Override ( "Version" ), - MappingStrings { "MIF.DMTF|System BIOS|001.3" }] - string Version; - - [Override ( "Manufacturer" ), - MappingStrings { "MIF.DMTF|System BIOS|001.2" }] - string Manufacturer; - - [Description ( - "If true, this is the primary BIOS of the ComputerSystem." ), - MappingStrings { "MIF.DMTF|System BIOS|001.9" }] - boolean PrimaryBIOS; - - [Description ( - "A list of installable languages for the BIOS. This " - "information can be obtained from SMBIOS, from the string " - "list that follows the Type 13 structure. An ISO 639 " - "Language Name should be used to specify the BIOS\' " - "installable languages. The ISO 3166 Territory Name and " - "the encoding method may also be specified, following the " - "Language Name." )] - string ListOfLanguages[]; - - [Description ( - "The currently selected language for the BIOS. This " - "information can be obtained from SMBIOS, using the " - "Current Language attribute of the Type 13 structure, to " - "index into the string list following the structure. The " - "property is formatted using the ISO 639 Language Name, " - "and may be followed by the ISO 3166 Territory Name and " - "the encoding method." ), - ModelCorrespondence { "CIM_BIOSElement.ListOfLanguages" }] - string CurrentLanguage; - - [Description ( - "The starting address of the memory which this BIOS occupies." - ), - MappingStrings { "MIF.DMTF|System BIOS|001.5" }] - uint64 LoadedStartingAddress; - - [Description ( - "The ending address of the memory which this BIOS occupies." - ), - MappingStrings { "MIF.DMTF|System BIOS|001.6" }] - uint64 LoadedEndingAddress; - - [Description ( - "A free form string describing the BIOS flash/load " - "utility that is required to update the BIOSElement. " - "Version and other information may be indicated in this " - "property." ), - MaxLen ( 64 ), - MappingStrings { "MIF.DMTF|System BIOS|001.7" }] - string LoadUtilityInformation; - - [Description ( "Date that this BIOS was released." ), - MappingStrings { "MIF.DMTF|System BIOS|001.8" }] - datetime ReleaseDate; - - [Description ( - "A string representing the publication location of the " - "BIOS Attribute registry or registries the implementation " - "complies to." )] - string RegistryURIs[]; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_BIOSFeature.mof b/build/vendor/dmtf_mof/Application/CIM_BIOSFeature.mof deleted file mode 100644 index 6da621fc..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_BIOSFeature.mof +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BIOSFeature -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::BIOS" ), - Description ( - "BIOSFeature represents the capabilities of the low-level " - "software that is used to bring up and configure a Computer " - "System." )] -class CIM_BIOSFeature : CIM_SoftwareFeature { - - [Description ( - "An array of integers that specify the features supported " - "by the BIOS. For example, one can specify that PnP " - "capabilities are provided (value=9) or that infrared " - "devices are supported (21). Values specified in the " - "enumeration are taken from both DMI and SMBIOS (the Type " - "0 structure, the BIOS Characteristics and BIOS " - "Characteristics Extension Bytes attributes." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "14", "15", "16", "17", "18", "19", - "20", "21", "22", "23", "24", "25", "26", "27", "28", - "29", "30", "31", "160" }, - Values { "Other", "Unknown", "Undefined", "ISA Support", - "MCA Support", "EISA Support", "PCI Support", - "PCMCIA Support", "PnP Support", "APM Support", - "Upgradeable BIOS", "BIOS Shadowing Allowed", - "VL VESA Support", "ESCD Support", "LS-120 Boot Support", - "ACPI Support", "I2O Boot Support", "USB Legacy Support", - "AGP Support", "PC Card", "IR", "1394", "I2C", - "Smart Battery", "ATAPI ZIP Drive Boot Support", - "1394 Boot Support", "Boot from CD", "Selectable Boot", - "BIOS ROM is Socketed", "Boot from PCMCIA", - "EDD Specification Support", "PC-98" }, - ArrayType ( "Indexed" ), - MappingStrings { "MIF.DMTF|BIOS Characteristic|004.3" }, - ModelCorrespondence { - "CIM_BIOSFeature.CharacteristicDescriptions" }] - uint16 Characteristics[]; - - [Description ( - "An array of free-form strings providing more detailed " - "explanations for any of the BIOS features indicated in " - "the Characteristics array. Note, each entry of this " - "array is related to the entry in the Characteristics " - "array that is located at the same index." ), - ArrayType ( "Indexed" ), - MappingStrings { "MIF.DMTF|BIOS Characteristic|004.4" }, - ModelCorrespondence { "CIM_BIOSFeature.Characteristics" }] - string CharacteristicDescriptions[]; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_BIOSFeatureBIOSElements.mof b/build/vendor/dmtf_mof/Application/CIM_BIOSFeatureBIOSElements.mof deleted file mode 100644 index f74b47d8..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_BIOSFeatureBIOSElements.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BIOSFeatureBIOSElements -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::BIOS" ), - Description ( - "A link between BIOSFeature and its aggregated BIOSElements." )] -class CIM_BIOSFeatureBIOSElements : CIM_SoftwareFeatureSoftwareElements { - - [Aggregate, Override ( "GroupComponent" ), - Description ( "The BIOSFeature." )] - CIM_BIOSFeature REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The BIOSElement that implements the capabilities " - "described by BIOSFeature." )] - CIM_BIOSElement REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_Check.mof b/build/vendor/dmtf_mof/Application/CIM_Check.mof deleted file mode 100644 index 499c3227..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_Check.mof +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) 2009 DMTF. All Rights Reserved. - [Abstract, Version ( "2.23.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "A CIM_Check is a condition or characteristic that is expected " - "to be true in an environment defined or scoped by an instance " - "of a CIM_ComputerSystem. The Checks associated with a " - "particular SoftwareElement are organized into one of two " - "groups using the Phase property of the " - "CIM_SoftwareElementChecks association. Conditions that are " - "expected to be true when a SoftwareElement is in a particular " - "state and environment are known as \'in-state\' conditions. " - "Conditions that need to be satisfied in order to transition " - "the SoftwareElement to its next state are known as " - "\'next-state\' conditions. \n" - "A CIM_ComputerSystem object represents the environment in " - "which CIM_SoftwareElements are already deployed/installed or " - "into which the elements will be deployed/installed. For the " - "case in which an element is already installed, the " - "CIM_InstalledSoftwareElement association identifies the " - "CIM_ComputerSystem object that represents the \"environment\". " - "When a SoftwareElement is being deployed for installation on a " - "ComputerSystem, that system is the target of the Check and is " - "identified using the TargetSystem reference of the " - "InvokeOnSystem method." )] -class CIM_Check : CIM_ManagedElement { - - [Key, Description ( - "The name used to identify the SoftwareElement that is " - "being checked." ), - MaxLen ( 256 ), - Propagated ( "CIM_SoftwareElement.Name" )] - string Name; - - [Key, Description ( - "The version of the SoftwareElement being checked." ), - MaxLen ( 64 ), - Propagated ( "CIM_SoftwareElement.Version" )] - string Version; - - [Key, Description ( - "The SoftwareElementState of the SoftwareElement being checked." - ), - ValueMap { "0", "1", "2", "3" }, - Values { "Deployable", "Installable", "Executable", "Running" }, - Propagated ( "CIM_SoftwareElement.SoftwareElementState" )] - uint16 SoftwareElementState; - - [Key, Description ( - "This is an identifier for the SoftwareElement being checked." - ), - MaxLen ( 256 ), - Propagated ( "CIM_SoftwareElement.SoftwareElementID" )] - string SoftwareElementID; - - [Key, Description ( - "The Target Operating System of the SoftwareElement being checked." - ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26", "27", - "28", "29", "30", "31", "32", "33", "34", "35", "36", - "37", "38", "39", "40", "41", "42", "43", "44", "45", - "46", "47", "48", "49", "50", "51", "52", "53", "54", - "55", "56", "57", "58", "59", "60", "61", "62", "63", - "64", "65", "66", "67", "68", "69", "70", "71", "72", - "73", "74", "75", "76", "77", "78", "79", "80", "81", - "82", "83", "84", "85", "86", "87", "88", "89", "90", - "91", "92", "93", "94", "95", "96", "97", "98", "99", - "100", "101", "102", "103", "104", "105", "106", "107", - "108", "109", "110" }, - Values { "Unknown", "Other", "MACOS", "ATTUNIX", "DGUX", - "DECNT", "Tru64 UNIX", "OpenVMS", "HPUX", "AIX", - //10 - "MVS", "OS400", "OS/2", "JavaVM", "MSDOS", - "WIN3x", "WIN95", "WIN98", "WINNT", "WINCE", - //20 - "NCR3000", "NetWare", "OSF", "DC/OS", - "Reliant UNIX", "SCO UnixWare", "SCO OpenServer", - "Sequent", "IRIX", "Solaris", //30 - "SunOS", - "U6000", "ASERIES", "HP NonStop OS", "HP NonStop OSS", - "BS2000", "LINUX", "Lynx", "XENIX", "VM", - //40 - "Interactive UNIX", "BSDUNIX", "FreeBSD", - "NetBSD", "GNU Hurd", "OS9", "MACH Kernel", "Inferno", - "QNX", "EPOC", //50 - "IxWorks", "VxWorks", - "MiNT", "BeOS", "HP MPE", "NextStep", "PalmPilot", - "Rhapsody", "Windows 2000", "Dedicated", - //60 - "OS/390", "VSE", "TPF", "Windows (R) Me", - "Caldera Open UNIX", "OpenBSD", "Not Applicable", - "Windows XP", "z/OS", "Microsoft Windows Server 2003", - //70 - "Microsoft Windows Server 2003 64-Bit", - "Windows XP 64-Bit", "Windows XP Embedded", - "Windows Vista", "Windows Vista 64-Bit", - "Windows Embedded for Point of Service", - "Microsoft Windows Server 2008", - "Microsoft Windows Server 2008 64-Bit", "FreeBSD 64-Bit", - "RedHat Enterprise Linux", - //80 - "RedHat Enterprise Linux 64-Bit", - "Solaris 64-Bit", "SUSE", "SUSE 64-Bit", "SLES", - "SLES 64-Bit", "Novell OES", "Novell Linux Desktop", - "Sun Java Desktop System", "Mandriva", - //90 - "Mandriva 64-Bit", "TurboLinux", - "TurboLinux 64-Bit", "Ubuntu", "Ubuntu 64-Bit", "Debian", - "Debian 64-Bit", "Linux 2.4.x", "Linux 2.4.x 64-Bit", - "Linux 2.6.x", //100 - "Linux 2.6.x 64-Bit", - "Linux 64-Bit", "Other 64-Bit", - "Microsoft Windows Server 2008 R2", "VMware ESXi", - "Microsoft Windows 7", "CentOS 32-bit", "CentOS 64-bit", - "Oracle Enterprise Linux 32-bit", - "Oracle Enterprise Linux 64-bit", - //110 - "eComStation 32-bitx" }, - Propagated ( "CIM_SoftwareElement.TargetOperatingSystem" )] - uint16 TargetOperatingSystem; - - [Key, Description ( - "An identifier used in conjunction with other keys to " - "uniquely identify the Check." ), - MaxLen ( 256 )] - string CheckID; - - [Description ( - "The CheckMode property is used to indicate whether the " - "condition is expected to exist or not exist in the " - "environment. When the value is True, the condition is " - "expected to exist (e.g., a file is expected to be on a " - "system), so the Invoke methods are expected to return " - "True. When the value is False, the condition is not " - "expected to exist (e.g., a file is not to be on a " - "system), so the Invoke methods are expected to return " - "False." )] - boolean CheckMode; - - - [Description ( - "The Invoke method evaluates this Check. The details of " - "the evaluation are described by the specific subclasses " - "of CIM_Check. When the SoftwareElement being checked is " - "already installed, the CIM_InstalledSoftwareElement " - "association identifies the CIM_ComputerSystem in whose " - "context the Invoke is executed. If this association is " - "not in place, then the InvokeOnSystem method should be " - "used - since it identifies the TargetSystem as an input " - "parameter of the method. \n" - "The results of the Invoke method are based on the return " - "value. A zero is returned if the condition is satisfied. " - "A one is returned if the method is not supported. Any " - "other value indicates the condition is not satisfied." )] - uint32 Invoke( -); - - [Description ( - "The InvokeOnSystem method evaluates this Check. The " - "details of the evaluation are described by the specific " - "subclasses of CIM_Check. The method\'s TargetSystem " - "input parameter specifies the ComputerSystem in whose " - "context the method is invoked. \n" - "The results of the InvokeOnSystem method are based on " - "the return value. A zero is returned if the condition is " - "satisfied. A one is returned if the method is not " - "supported. Any other value indicates the condition is " - "not satisfied." )] - uint32 InvokeOnSystem( - [IN, Description ( - "Reference to ComputerSystem in whose context the " - "method is to be invoked." )] - CIM_ComputerSystem REF TargetSystem); - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_CollectedSoftwareElements.mof b/build/vendor/dmtf_mof/Application/CIM_CollectedSoftwareElements.mof deleted file mode 100644 index f6fe7041..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_CollectedSoftwareElements.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_CollectedSoftwareElements -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::InstalledProduct" ), - Description ( - "CollectedSoftwareElements defines the SoftwareElements that " - "are collected by InstalledProduct (ie, the installed image of " - "a Product)." )] -class CIM_CollectedSoftwareElements : CIM_MemberOfCollection { - - [Aggregate, Override ( "Collection" ), - Description ( - "The collection representing the installed image of a Product." - )] - CIM_InstalledProduct REF Collection; - - [Override ( "Member" ), - Description ( - "A SoftwareElement that is a member of the " - "InstalledProduct collection." )] - CIM_SoftwareElement REF Member; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_CollectedSoftwareFeatures.mof b/build/vendor/dmtf_mof/Application/CIM_CollectedSoftwareFeatures.mof deleted file mode 100644 index c2c22221..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_CollectedSoftwareFeatures.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_CollectedSoftwareFeatures -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::InstalledProduct" ), - Description ( - "CollectedSoftwareFeatures defines the SoftwareFeatures that " - "are collected by InstalledProduct (ie, the installed image of " - "a Product)." )] -class CIM_CollectedSoftwareFeatures : CIM_MemberOfCollection { - - [Aggregate, Override ( "Collection" ), - Description ( - "The collection representing the installed image of a Product." - )] - CIM_InstalledProduct REF Collection; - - [Override ( "Member" ), - Description ( - "The SoftwareFeature that is a member of the " - "InstalledProduct collection." )] - CIM_SoftwareFeature REF Member; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_CopyFileAction.mof b/build/vendor/dmtf_mof/Application/CIM_CopyFileAction.mof deleted file mode 100644 index 29197886..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_CopyFileAction.mof +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_CopyFileAction -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "CopyFileAction specifies the files to be moved or copied to a " - "new location. The to/from information for the copy is " - "specified using either the ToDirectorySpecification/ " - "FromDirectorySpecification or the ToDirectoryAction/ " - "FromDirectoryAction associations. The first set is used when " - "the source and/or the target are to exist before any Actions " - "are taken. The second set is used when the source and/or " - "target are created as a part of a previous Action (specified " - "using the association, ActionSequence)." )] -class CIM_CopyFileAction : CIM_FileAction { - - [Description ( "The source directory." ), - MaxLen ( 1024 )] - string Source; - - [Description ( "The destination directory." ), - MaxLen ( 1024 )] - string Destination; - - [Description ( - "Boolean indicating that the file should be deleted after " - "being copied." )] - boolean DeleteAfterCopy; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_CreateDirectoryAction.mof b/build/vendor/dmtf_mof/Application/CIM_CreateDirectoryAction.mof deleted file mode 100644 index 13e47c09..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_CreateDirectoryAction.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_CreateDirectoryAction -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "CreateDirectoryAction creates empty directories for " - "SoftwareElements to be installed locally." )] -class CIM_CreateDirectoryAction : CIM_DirectoryAction { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_DiagnosticTestSoftware.mof b/build/vendor/dmtf_mof/Application/CIM_DiagnosticTestSoftware.mof deleted file mode 100644 index 2d838490..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_DiagnosticTestSoftware.mof +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DiagnosticTestSoftware -// ================================================================== - [Association, Deprecated { "CIM_ElementSoftwareIdentity" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::SystemSoftware" ), - Description ( - "This class is being deprecated to promote its usage to the " - "DiagnosticService level. \n" - "This is an association class relating DiagnosticTest to the " - "SoftwareElements that provide this test. SoftwareElement " - "describes vendor/version information and other deployment " - "data." )] -class CIM_DiagnosticTestSoftware : CIM_Dependency { - - [Deprecated { "CIM_ElementSoftwareIdentity.Antecedent" }, - Override ( "Antecedent" ), - Description ( - "This reference is deprecated and replaced (in " - "ServiceSoftwareIdentity) with a reference to the " - "SoftwareIdentity class, which has been determined to be " - "a better choice for diagnostics services. It defines " - "vendor/version and other information about the software " - "that runs as the DiagnosticTest." )] - CIM_SoftwareElement REF Antecedent; - - [Deprecated { "CIM_ElementSoftwareIdentity.Dependent" }, - Override ( "Dependent" ), - Description ( - "The DiagnosticTest whose software is described." )] - CIM_DiagnosticTest REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_DirectoryAction.mof b/build/vendor/dmtf_mof/Application/CIM_DirectoryAction.mof deleted file mode 100644 index b5e8a9e9..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_DirectoryAction.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DirectoryAction -// ================================================================== - [Abstract, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "DirectoryAction is an abstract class used to manage " - "directories. The creation of directories is handled by " - "CreateDirectoryAction and removal is handled by " - "RemoveDirectoryAction." )] -class CIM_DirectoryAction : CIM_Action { - - [Description ( "The name of the directory being managed." ), - MaxLen ( 1024 )] - string DirectoryName; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_DirectorySpecification.mof b/build/vendor/dmtf_mof/Application/CIM_DirectorySpecification.mof deleted file mode 100644 index 45ca22bf..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_DirectorySpecification.mof +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DirectorySpecification -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "The CIM_DirectorySpecification class captures the major " - "directory structure of a SoftwareElement. This class is used " - "to organize the files of a SoftwareElement into manageable " - "units that can be relocated on a computer system." )] -class CIM_DirectorySpecification : CIM_Check { - - [Description ( - "The DirectoryType property characterizes the type of " - "directory being described." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17" }, - Values { "Product base directory", - "Product executable directory", - "Product library directory", - "Product configuration directory", - "Product include directory", "Product working directory", - "Product log directory", "Shared base directory", - "Shared executable directory", "Shared library directory", - "Shared include directory", "System base directory", - "System executable directory", "System library directory", - "System configuration directory", - "System include directory", "System log directory", "Other" }, - MappingStrings { "MIF.DMTF|Location|001.2" }] - uint16 DirectoryType; - - [Description ( - "The DirectoryPath property is used to capture the name " - "of a directory. The value supplied by an application " - "provider is actually a default or recommended path name. " - "The value can be changed for a particular environment." ), - MaxLen ( 1024 )] - string DirectoryPath; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_DirectorySpecificationFile.mof b/build/vendor/dmtf_mof/Application/CIM_DirectorySpecificationFile.mof deleted file mode 100644 index bc879ba5..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_DirectorySpecificationFile.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DirectorySpecificationFile -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "The CIM_DirectorySpecificationFile association identifies the " - "directory that contains the file being checked in the CIM_ " - "FileSpecification class." )] -class CIM_DirectorySpecificationFile { - - [Key, Max ( 1 ), - Description ( "The directory to be checked." )] - CIM_DirectorySpecification REF DirectorySpecification; - - [Key, Description ( "The file to be checked." )] - CIM_FileSpecification REF FileSpecification; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_DiskSpaceCheck.mof b/build/vendor/dmtf_mof/Application/CIM_DiskSpaceCheck.mof deleted file mode 100644 index b1613537..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_DiskSpaceCheck.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "DiskSpaceCheck describes the amount of disk space that needs " - "to be available on the computer system. The amount is " - "specified in the AvailableDiskSpace property. The details of " - "this Check are compared with the value of the CIM_FileSystem. " - "AvailableSpace property - where the CIM_FileSystem object is " - "related (using HostedFileSystem) to the CIM_Computer System " - "instance that describes the environment. When the value of the " - "AvailableSpace property is greater than or equal to the value " - "specified in AvailableDiskSpace, the Check is satisfied." )] -class CIM_DiskSpaceCheck : CIM_Check { - - [Description ( - "The AvailableDiskSpace property specifies the minimum " - "amount of disk space that needs to be available on the " - "target system." ), - Units ( "KiloBytes" ), - ModelCorrespondence { "CIM_FileSystem.AvailableSpace" }, - PUnit ( "byte * 10^3" )] - uint64 AvailableDiskSpace; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_ExecuteProgram.mof b/build/vendor/dmtf_mof/Application/CIM_ExecuteProgram.mof deleted file mode 100644 index 75729c74..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_ExecuteProgram.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ExecuteProgram -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "ExecuteProgram causes programs to be executed on the computer " - "system that defines the Action\'s environment." )] -class CIM_ExecuteProgram : CIM_Action { - - [Description ( - "The location or \'path\' where the program is found." ), - MaxLen ( 1024 )] - string ProgramPath; - - [Description ( - "A string that can be executed and invokes program(s), " - "from a system\'s command line." )] - string CommandLine; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_FRUIncludesSoftwareFeature.mof b/build/vendor/dmtf_mof/Application/CIM_FRUIncludesSoftwareFeature.mof deleted file mode 100644 index 9fda70e3..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_FRUIncludesSoftwareFeature.mof +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FRUIncludesSoftwareFeature -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::DeploymentModel" ), - Description ( - "The FRUIncludesSoftwareFeature association identifies the " - "SoftwareFeature(s) packaged with a particular FRU. A common " - "usage is to determine whether the FRU is compatible with a " - "hardware/software platform. In order to determine this, the " - "following conditions need to be verified: \n" - "(1) Is the physical package of the FRU compatible with the " - "slots or equivalent packaging of the hardware? \n" - "(2) Are there any physical constraints (such as power " - "consumption) that prevent the FRU from being installed? \n" - "(3) Are the SoftwareFeatures packaged with the FRU compatiable " - "with the underlying operating system and other software " - "already installed/to be installed on the platform? \n" - "This latter question can be answered by first checking if an " - "instance of FRUIncludesSoftwareFeature exists. If it does, " - "then the compatibility of each SoftwareFeature can be " - "determined by evaluating the Check classes for the Software " - "Elements that are part of the Feature (found by traversing the " - "association, SoftwareFeatureSoftwareElements). For example, " - "there might be a SoftwareElementVersionCheck that declares " - "that a SoftwareElement (of the FRU\'s Software Feature) is not " - "compatible with current software." )] -class CIM_FRUIncludesSoftwareFeature { - - [Key, Aggregate, Max ( 1 ), - Description ( "The field replaceable unit." )] - CIM_FRU REF FRU; - - [Key, Description ( - "The SoftwareFeature which is included in the FRU and " - "whose SoftwareElements should be evaluated." )] - CIM_SoftwareFeature REF Component; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_FileAction.mof b/build/vendor/dmtf_mof/Application/CIM_FileAction.mof deleted file mode 100644 index 7f3ca6fb..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_FileAction.mof +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FileAction -// ================================================================== - [Abstract, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "FileAction locates files that already exist on the CIM_ " - "ComputerSystem that defines the Action\'s environment. These " - "files are removed or moved/copied to a new location." )] -class CIM_FileAction : CIM_Action { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_FileSpecification.mof b/build/vendor/dmtf_mof/Application/CIM_FileSpecification.mof deleted file mode 100644 index 7387a3b9..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_FileSpecification.mof +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "FileSpecification identifies a file that is either to be on or " - "off the system. The file is to be located in the directory " - "identified in FileName, or by the CIM_Directory " - "SpecificationFile association. When the Invoke methods are " - "executed, it is expected that they will use a combination of " - "information to check for file existence. Therefore, any of the " - "properties with a NULL value are not checked. So, if only the " - "FileName and MD5Checksum properties have values, they are the " - "only ones considered by the Invoke methods." )] -class CIM_FileSpecification : CIM_Check { - - [Description ( - "Either the name of the file or the name of the file with " - "a directory prefix." ), - MaxLen ( 1024 )] - string FileName; - - [Description ( "The creation date and time of the file." )] - datetime CreateTimeStamp; - - [Description ( "The size of the file in Kilobytes." ), - Units ( "KiloBytes" ), - PUnit ( "byte * 10^3" )] - uint64 FileSize; - - [Description ( - "A checksum calculated as the 16-bit sum of the first 32 " - "bytes of the file." ), - MappingStrings { "MIF.DMTF|Software Signature|002.4" }] - uint32 CheckSum; - - [Description ( - "The CRC1 property is the CRC value calculated using the " - "middle 512K bytes of the file." ), - MappingStrings { "MIF.DMTF|Software Signature|002.5" }] - uint32 CRC1; - - [Description ( - "The CRC2 property is the CRC value for the middle 512K " - "bytes of the file, modulo 3." ), - MappingStrings { "MIF.DMTF|Software Signature|002.6" }] - uint32 CRC2; - - [Description ( - "The MD5 algorithm is a well-known algorithm for " - "computing a 128-bit checksum for any file or object. For " - "purposes of MOF specification of the MD5Checksum " - "property, the MD5 algorithm always generates a 32 " - "character string. For example: The string " - "abcdefghijklmnopqrstuvwxyz generates the string " - "c3fcd3d76192e4007dfb496cca67e13b. See http: " - "//www.ietf.org - RFC1321 for details on the // " - "implementation of the MD5 algorithm." ), - MaxLen ( 32 )] - string MD5Checksum; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_FromDirectoryAction.mof b/build/vendor/dmtf_mof/Application/CIM_FromDirectoryAction.mof deleted file mode 100644 index a0fbd94a..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_FromDirectoryAction.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FromDirectoryAction -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "The FromDirectoryAction association identifies the source " - "directory for a FileAction. When this association is used, the " - "assumption is that the source directory was created by a " - "previous Action. This association cannot co-exist with a " - "FromDirectorySpecification association, since a FileAction can " - "only involve a single source directory." )] -class CIM_FromDirectoryAction { - - [Key, Max ( 1 ), - Description ( "The source directory of the Action." )] - CIM_DirectoryAction REF SourceDirectory; - - [Key, Description ( "The Action against the directory." )] - CIM_FileAction REF FileName; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_FromDirectorySpecification.mof b/build/vendor/dmtf_mof/Application/CIM_FromDirectorySpecification.mof deleted file mode 100644 index e644b4de..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_FromDirectorySpecification.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FromDirectorySpecification -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "The FromDirectorySpecification association identifies the " - "source directory for a FileAction. When this association is " - "used, the assumption is that the source directory already " - "exists. This association cannot co-exist with a " - "FromDirectoryAction association, since a FileAction can only " - "involve a single source directory." )] -class CIM_FromDirectorySpecification { - - [Key, Max ( 1 ), - Description ( "The source directory of the Action." )] - CIM_DirectorySpecification REF SourceDirectory; - - [Key, Description ( "The Action against the directory." )] - CIM_FileAction REF FileName; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_InstalledProduct.mof b/build/vendor/dmtf_mof/Application/CIM_InstalledProduct.mof deleted file mode 100644 index bf996ee8..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_InstalledProduct.mof +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_InstalledProduct -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::InstalledProduct" ), - Description ( - "The InstalledProduct object allows the grouping of " - "SoftwareFeatures and SoftwareElements that represent the " - "result of the installation of a purchased Product. " - "InstalledProduct is defined to be Weak to a Product. \n" - "Often, Products are purchased once but may be installed " - "several times in different locations on one or more systems. " - "All of the SoftwareElements and SoftwareFeatures of a single " - "install are grouped by an instance of InstalledProduct. These " - "are defined using the associations, CollectedSoftwareFeatures " - "and Collected SoftwareElements." )] -class CIM_InstalledProduct : CIM_Collection { - - [Key, Description ( "The scoping Product\'s identification." ), - MaxLen ( 64 ), - Propagated ( "CIM_Product.IdentifyingNumber" )] - string ProductIdentifyingNumber; - - [Key, Description ( - "The scoping Product\'s commonly used name." ), - MaxLen ( 256 ), - Propagated ( "CIM_Product.Name" )] - string ProductName; - - [Key, Description ( "The scoping Product\'s name." ), - MaxLen ( 256 ), - Propagated ( "CIM_Product.Vendor" )] - string ProductVendor; - - [Key, Description ( - "The scoping Product\'s version information." ), - MaxLen ( 64 ), - Propagated ( "CIM_Product.Version" )] - string ProductVersion; - - [Key, Description ( - "The identifying information of the System (ie, the " - "instance) on which the Product is installed. If the " - "System is not known, this property returns NULL. If the " - "System is known and represented in CIM, the property " - "contains the namespace and model paths of the instance, " - "encoded as a string parameter. If known but not " - "represented in CIM, the property contains some " - "identifying string that names the System on which the " - "Product is installed." ), - MaxLen ( 256 )] - string SystemID; - - [Key, Description ( - "The identification of the InstalledProduct object. This " - "key can be used to differentiate between Product " - "installations and could include the installation " - "location." ), - MaxLen ( 256 )] - string CollectionID; - - [Description ( - "The Name property defines the label by which the object " - "is known to the world, outside the data processing " - "system. This label is a human-readable name that " - "uniquely identifies the element in the context of the " - "element\'s namespace." ), - MaxLen ( 256 )] - string Name; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_InstalledProductImage.mof b/build/vendor/dmtf_mof/Application/CIM_InstalledProductImage.mof deleted file mode 100644 index 343d87af..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_InstalledProductImage.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_InstalledProductImage -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::InstalledProduct" ), - Description ( - "InstalledProductImage identifies the collection of Software " - "Features and SoftwareElements that are the result of the " - "installation of the referenced Product." )] -class CIM_InstalledProductImage { - - [Key, Aggregate, Min ( 1 ), - Max ( 1 ), - Description ( "The product that has been installed." )] - CIM_Product REF Product; - - [Key, Weak, Description ( - "The collection containing the set of SoftwareFeatures " - "and SoftwareElements that are the result of installing " - "the Product." )] - CIM_InstalledProduct REF Collection; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_InstalledSoftwareElement.mof b/build/vendor/dmtf_mof/Application/CIM_InstalledSoftwareElement.mof deleted file mode 100644 index 8da25322..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_InstalledSoftwareElement.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_InstalledSoftwareElement -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::SystemSoftware" ), - Description ( - "The InstalledSoftwareElement association allows the " - "identification of the ComputerSystem on which a particular " - "SoftwareElement is installed." )] -class CIM_InstalledSoftwareElement { - - [Key, Description ( - "Reference to the Software Element that is installed." )] - CIM_SoftwareElement REF Software; - - [Key, Max ( 1 ), - Description ( - "Reference to the ComputerSystem hosting a particular " - "SoftwareElement." )] - CIM_ComputerSystem REF System; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeAppClientModule.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeAppClientModule.mof deleted file mode 100644 index f38ef0ec..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeAppClientModule.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeAppClientModule -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "CIM_J2eeAppClientModule identifies a deployed Application " - "Client Module." )] -class CIM_J2eeAppClientModule : CIM_J2eeModule { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeApplication.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeApplication.mof deleted file mode 100644 index 41f9366b..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeApplication.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeApplication -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "CIM_J2eeApplication identifies a J2EE application that resides " - "on a J2ee Server." )] -class CIM_J2eeApplication : CIM_ApplicationSystem { - - [Override ( "Name" ), - Description ( - "The name of a J2EE Application. The name MUST be " - "constructed using the form specified in JSR77.3.1.1.1 in " - "order to avoid the need for manual key propagation." ), - MaxLen ( 256 ), - MappingStrings { "JSR77.JCP|JSR77.3.1.1.1 objectName|V1.0" }] - string Name; - - [Description ( - "Contains the original XML deployment descriptor that was " - "created for this application during the deployment " - "process." ), - MappingStrings { - "JSR77.JCP|JSR77.3.5.0.1 deploymentDescriptor|V1.0" }] - string DeploymentDescriptor; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeApplicationHostedOnServer.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeApplicationHostedOnServer.mof deleted file mode 100644 index a4f8202c..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeApplicationHostedOnServer.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeApplicationHostedOnServer -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "The CIM_J2eeApplicationHostedOnServer association identifies a " - "hosting J2ee Server for a particular J2EE Application." )] -class CIM_J2eeApplicationHostedOnServer : CIM_HostedDependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The hosting J2ee Server." )] - CIM_J2eeServer REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The hosted J2ee Application." )] - CIM_J2eeApplication REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeApplicationModule.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeApplicationModule.mof deleted file mode 100644 index cde3e1fb..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeApplicationModule.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeApplicationModule -// ================================================================== - [Association, Aggregation, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "The CIM_J2eeApplicationModule association identifies a " - "software module for a particular J2EE Application." )] -class CIM_J2eeApplicationModule : CIM_SystemComponent { - - [Aggregate, Override ( "GroupComponent" ), - Description ( - "The J2ee Application that is comprised of modules." )] - CIM_J2eeApplication REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The Module that is part of a J2ee Application." )] - CIM_J2eeModule REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeConnectionFactoryAvailableToJCAResource.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeConnectionFactoryAvailableToJCAResource.mof deleted file mode 100644 index 053c476b..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeConnectionFactoryAvailableToJCAResource.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeConnectionFactoryAvailableToJCAResource -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "CIM_J2eeConnectionFactoryAvailableToJCAResource is an " - "association that identifies the connection factory that is " - "available to a CIM_J2eeJCAResource object." )] -class CIM_J2eeConnectionFactoryAvailableToJCAResource : CIM_HostedDependency { - - [Override ( "Dependent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The JCA Resource that requires a Connection Factory." )] - CIM_J2eeJCAResource REF Dependent; - - [Override ( "Antecedent" ), - Min ( 1 ), - Description ( - "The Connection Factory being used by a JCA Resource." )] - CIM_J2eeJCAConnectionFactory REF Antecedent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeConnectionPoolStats.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeConnectionPoolStats.mof deleted file mode 100644 index f02132ee..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeConnectionPoolStats.mof +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeConnectionPoolStats -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "The J2eeConnectionPoolStats class defines the performance " - "statistics that are provided by a connection pool. JCA and " - "JDBC connection pool statistics are represented by this class. " - "The semantics are determined by the class to which the " - "ConnectionStats instance is associated via the " - "CIM_ElementStatisticalData association." )] -class CIM_J2eeConnectionPoolStats : CIM_J2eeConnectionStats { - - [Description ( "The number of connections closed." ), - Counter, MappingStrings { - "JSR77.JCP|JSR77.6.20.1.1 getCloseCount|V1.0" }] - uint64 CloseCount; - - [Description ( "The number of connections created." ), - Counter, MappingStrings { - "JSR77.JCP|JSR77.6.20.1.2 getCreateCount|V1.0" }] - uint64 CreateCount; - - [Description ( "The number of free connections in the pool." ), - Gauge, MappingStrings { - "JSR77.JCP|JSR77.6.20.1.3 getFreePoolSize|V1.0" }] - uint64 FreePoolSize; - - [Description ( - "The upper limit for the number of free connections in the pool." - ), - MappingStrings { "JSR77.JCP|JSR77.6.8.1.1 getUpperBound|V1.0" }] - uint64 FreePoolSizeUpperBound; - - [Description ( - "The lower limit for the number of free connections in the pool." - ), - MappingStrings { "JSR77.JCP|JSR77.6.8.1.2 getLowerBound|V1.0" }] - uint64 FreePoolSizeLowerBound; - - [Description ( - "The lowest number of free connections in the pool since " - "the beginning of the measurement." ), - MappingStrings { - "JSR77.JCP|JSR77.6.7.1.2 getLowWaterMark|V1.0" }] - uint64 FreePoolSizeLowWaterMark; - - [Description ( - "The highest number of free connections in the pool since " - "the beginning of the measurement." ), - MappingStrings { - "JSR77.JCP|JSR77.6.7.1.1 getHighWaterMark|V1.0" }] - uint64 FreePoolSizeHighWaterMark; - - [Description ( "The size of the connection pool." ), - Gauge, MappingStrings { - "JSR77.JCP|JSR77.6.20.1.4 getPoolSize|V1.0" }] - uint64 PoolSize; - - [Description ( - "The upper limit for the size of the connection pool." ), - MappingStrings { "JSR77.JCP|JSR77.6.8.1.1 getUpperBound|V1.0" }] - uint64 PoolSizeUpperBound; - - [Description ( - "The lower limit for the size of the connection pool." ), - MappingStrings { "JSR77.JCP|JSR77.6.8.1.2 getLowerBound|V1.0" }] - uint64 PoolSizeLowerBound; - - [Description ( - "The lowest size of the connection pool since the " - "beginning of the measurement." ), - MappingStrings { - "JSR77.JCP|JSR77.6.7.1.2 getLowWaterMark|V1.0" }] - uint64 PoolSizeLowWaterMark; - - [Description ( - "The largest size of the connection pool since the " - "beginning of the measurement." ), - MappingStrings { - "JSR77.JCP|JSR77.6.7.1.1 getHighWaterMark|V1.0" }] - uint64 PoolSizeHighWaterMark; - - [Description ( - "The number of threads waiting for a connection." ), - Gauge, MappingStrings { - "JSR77.JCP|JSR77.6.20.1.5 getWaitingThreadCount|V1.0" }] - uint64 WaitingThreadCount; - - [Description ( - "The upper limit for the number of threads waiting for a " - "connection." ), - MappingStrings { "JSR77.JCP|JSR77.6.8.1.1 getUpperBound|V1.0" }] - uint64 WaitingThreadCountUpperBound; - - [Description ( - "The lower limit for the number of threads waiting for a " - "connection." ), - MappingStrings { "JSR77.JCP|JSR77.6.8.1.2 getLowerBound|V1.0" }] - uint64 WaitingThreadCountLowerBound; - - [Description ( - "The lowest number of threads waiting for a connection " - "since the beginning of the measurement." ), - MappingStrings { - "JSR77.JCP|JSR77.6.7.1.2 getLowWaterMark|V1.0" }] - uint64 WaitingThreadCountLowWaterMark; - - [Description ( - "The highest number of threads waiting for a connection " - "since the beginning of the measurement." ), - MappingStrings { - "JSR77.JCP|JSR77.6.7.1.1 getHighWaterMark|V1.0" }] - uint64 WaitingThreadCountHighWaterMark; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeConnectionStats.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeConnectionStats.mof deleted file mode 100644 index 83235ed4..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeConnectionStats.mof +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeConnectionStats -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "The J2eeConnectionStats class defines the performance " - "statistics that are provided by a connection. JCA and JDBC " - "connection statistics are represented by this class. The " - "semantics are determined by the class to which the " - "ConnectionStats instance is associated via the " - "CIM_ElementStatisticalData association." )] -class CIM_J2eeConnectionStats : CIM_J2eeStatistic { - - [Description ( - "The time spent waiting for a connection to be available. " - "The time is represented as a datetime interval." ), - MappingStrings { "JSR77.JCP|JSR77.6.19.1.3 getWaitTime|V1.0" }] - datetime WaitTime; - - [Description ( - "The maximum amount of time spent waiting for a " - "connection to be available since the beginning of this " - "measurement. The time is represented as a datetime " - "interval." ), - MappingStrings { "JSR77.JCP|JSR77.6.6.1.2 getMaxTime|V1.0" }] - datetime WaitTimeMaxTime; - - [Description ( - "The minimum amount of time spent waiting for a " - "connection to be available since the beginning of this " - "measurement. The time is represented as a datetime " - "interval." ), - MappingStrings { "JSR77.JCP|JSR77.6.6.1.3 getMinTime|V1.0" }] - datetime WaitTimeMinTime; - - [Description ( - "The total amount of time spent waiting for a connection " - "to be available since the beginning of this measurement. " - "Dividing WaitTimeTotalTime by WaitTime will provide the " - "average time spent waiting for a connection. The time is " - "represented as a datetime interval." ), - MappingStrings { "JSR77.JCP|JSR77.6.6.1.4 getTotalTime|V1.0" }] - datetime WaitTimeTotalTime; - - [Description ( - "The time spent using a connection. The time is " - "represented as a datetime interval." ), - MappingStrings { "JSR77.JCP|JSR77.6.19.1.3 getUseTime|V1.0" }] - datetime UseTime; - - [Description ( - "The maximum amount of time spent using a connection " - "since the beginning of this measurement. The time is " - "represented as a datetime interval." ), - MappingStrings { "JSR77.JCP|JSR77.6.6.1.2 getMaxTime|V1.0" }] - datetime UseTimeMaxTime; - - [Description ( - "The minimum amount of time spent using a connection " - "since the beginning of this measurement. The time is " - "represented as a datetime interval." ), - MappingStrings { "JSR77.JCP|JSR77.6.6.1.3 getMinTime|V1.0" }] - datetime UseTimeMinTime; - - [Description ( - "The total amount of time spent using a connection since " - "the beginning of this measurement. Dividing " - "UseTimeTotalTime by UseTime will provide the average " - "time spent using a connection. The time is represented " - "as a datetime interval." ), - MappingStrings { "JSR77.JCP|JSR77.6.6.1.4 getTotalTime|V1.0" }] - datetime UseTimeTotalTime; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeDeployedObject.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeDeployedObject.mof deleted file mode 100644 index 92079954..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeDeployedObject.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeDeployedObject -// ================================================================== - [Abstract, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "The CIM_J2eeDeployedObject class is an abstract class that is " - "used to define CIM_J2eeModule objects that are deployed in the " - "CIM_J2eeServer. The Deployed Objects are hosted by a J2ee " - "Server and should hence be associated to a J2eeServer instance " - "through the CIM_HostedService association. The scoping keys in " - "the instance are provided by the J2eeServer hosting the " - "deployed object." )] -class CIM_J2eeDeployedObject : CIM_Service { - - [Override ( "Name" ), - Description ( - "The name of a J2EE deployed object. The name MUST be " - "constructed using the form specified in JSR77.3.1.1.1 in " - "order to avoid the need for manual key propagation." ), - MaxLen ( 256 ), - MappingStrings { "JSR77.JCP|JSR77.3.1.1.1 objectName|V1.0" }] - string Name; - - [Description ( - "Contains the original XML deployment descriptor that was " - "created for this module during the deployment process." ), - MappingStrings { - "JSR77.JCP|JSR77.3.5.0.1 deploymentDescriptor|V1.0" }] - string DeploymentDescriptor; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeDomain.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeDomain.mof deleted file mode 100644 index 242e7a1c..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeDomain.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeDomain -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "CIM_J2eeDomain identifies the J2EE Domains that are part of " - "the J2EE management environment. Domains provide a structure " - "for grouping J2EE Server objects." )] -class CIM_J2eeDomain : CIM_AdminDomain { - - [Override ( "Name" ), - Description ( - "The name of the J2EE server domain. The name MUST be " - "constructed using the form specified in JSR77.3.1.1.1 in " - "order to avoid the need for manual key propagation." ), - MaxLen ( 256 ), - MappingStrings { "JSR77.JCP|JSR77.3.1.1.1.1 Domain Name|V1.0" }] - string Name; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeEJB.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeEJB.mof deleted file mode 100644 index cd04fe2f..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeEJB.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeEJB -// ================================================================== - [Abstract, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "The CIM_J2eeEJB class is base class that represents different " - "types of deployed Enterprise JavaBean components. The EJB is " - "hosted by a J2ee Server and should hence be associated to a " - "J2eeServer instance through the CIM_HostedService association. " - "The scoping keys in the instance are provided by the " - "J2eeServer hosting the EJB." )] -class CIM_J2eeEJB : CIM_Service { - - [Override ( "Name" ), - Description ( - "The name of an EJB. The name MUST be constructed using " - "the form specified in JSR77.3.1.1.1 in order to avoid " - "the need for manual key propagation." ), - MaxLen ( 256 ), - MappingStrings { "JSR77.JCP|JSR77.3.1.1.1 objectName|V1.0" }] - string Name; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeEJBInModule.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeEJBInModule.mof deleted file mode 100644 index ab134b55..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeEJBInModule.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeEJBInModule -// ================================================================== - [Association, Aggregation, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "CIM_J2eeEJBInModule is a aggregation of the EJB components " - "within a deployed EJB JAR module." )] -class CIM_J2eeEJBInModule : CIM_ServiceComponent { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The EJB Module that is comprised of EJBs." )] - CIM_J2eeEJBModule REF GroupComponent; - - [Override ( "PartComponent" ), - Min ( 1 ), - Description ( "The EJB that is a part of the EJB Module." )] - CIM_J2eeEJB REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeEJBModule.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeEJBModule.mof deleted file mode 100644 index 188e6a70..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeEJBModule.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeEJBModule -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "CIM_J2eeEJBModule identifies a deployed EJB module and is a " - "container for CIM_J2eeEJBs." )] -class CIM_J2eeEJBModule : CIM_J2eeModule { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeEJBStats.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeEJBStats.mof deleted file mode 100644 index 94f53667..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeEJBStats.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeEJBStats -// ================================================================== - [Abstract, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "The J2eeEJBStats class defines the performance statistics that " - "are available for all EJB component types." )] -class CIM_J2eeEJBStats : CIM_J2eeStatistic { - - [Description ( - "A count of the number of times that the beans create " - "method was called." ), - Counter, MappingStrings { - "JSR77.JCP|JSR77.6.11.1.1 getCreateCount|V1.0" }] - uint64 CreateCount; - - [Description ( - "A count of the number of times that the beans remove " - "method was called." ), - Counter, MappingStrings { - "JSR77.JCP|JSR77.6.11.1.2 getRemoveCount|V1.0" }] - uint64 RemoveCount; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeEntityBean.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeEntityBean.mof deleted file mode 100644 index d882ab4e..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeEntityBean.mof +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeEntityBean -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "Identifies a deployed entity bean within an EJB module." )] -class CIM_J2eeEntityBean : CIM_J2eeEJB { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeEntityBeanStats.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeEntityBeanStats.mof deleted file mode 100644 index 5c56ae6b..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeEntityBeanStats.mof +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeEntityBeanStats -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "The J2eeEntityBeanStats class defines the performance " - "statistics that are provided by entity beans." )] -class CIM_J2eeEntityBeanStats : CIM_J2eeEJBStats { - - [Description ( - "The number of bean instances in the ready state." ), - Counter, MappingStrings { - "JSR77.JCP|JSR77.6.12.1.1 getReadyCount|V1.0" }] - uint64 ReadyCount; - - [Description ( - "The lowest number of bean instances in the ready state " - "since the beginning of the measurement." ), - MappingStrings { - "JSR77.JCP|JSR77.6.7.1.2 getLowWaterMark|V1.0" }] - uint64 ReadyLowWaterMark; - - [Description ( - "The highest number of bean instances in the ready state " - "since the beginning of the measurement." ), - MappingStrings { - "JSR77.JCP|JSR77.6.7.1.1 getHighWaterMark|V1.0" }] - uint64 ReadyHighWaterMark; - - [Description ( - "The number of bean instances in the pooled state." ), - Counter, MappingStrings { - "JSR77.JCP|JSR77.6.12.1.2 getPooledCount|V1.0" }] - uint64 PooledCount; - - [Description ( - "The lowest number of bean instances in the pooled state " - "since the beginning of the measurement." ), - MappingStrings { - "JSR77.JCP|JSR77.6.7.1.2 getLowWaterMark|V1.0" }] - uint64 PooledLowWaterMark; - - [Description ( - "The highest number of bean instances in the pooled state " - "since the beginning of the measurement." ), - MappingStrings { - "JSR77.JCP|JSR77.6.7.1.1 getHighWaterMark|V1.0" }] - uint64 PooledHighWaterMark; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJCAConnectionFactory.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJCAConnectionFactory.mof deleted file mode 100644 index adc933ab..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJCAConnectionFactory.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "The CIM_J2eeJCAConnectionFactory class identifies individual " - "JCA connection factories." )] -class CIM_J2eeJCAConnectionFactory : CIM_EnabledLogicalElement { - - [Key, Override ( "InstanceID" ), - Description ( - "InstanceID identifies a unique instance of a J2ee " - "JCAConnectionFactory. In order to ensure uniqueness, the " - "value of InstanceID MUST be constructed using the form " - "specified in JSR77.3.1.1.1 in order to avoid the need " - "for manual key propagation." ), - ModelCorrespondence { "CIM_J2eeJCAConnectionFactory.Name" }] - string InstanceID; - - [Override ( "Name" ), - Description ( - "The name of a J2EE JCAConnectionFactory. The name MUST " - "be constructed using the form specified in JSR77.3.1.1.1 " - "in order to avoid the need for manual key propagation." ), - MaxLen ( 256 ), - MappingStrings { "JSR77.JCP|JSR77.3.1.1.1 objectName|V1.0" }, - ModelCorrespondence { - "CIM_J2eeJCAConnectionFactory.InstanceID" }] - string Name; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJCAConnectionFactoryManagedConnectionFactory.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJCAConnectionFactoryManagedConnectionFactory.mof deleted file mode 100644 index fbeee800..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJCAConnectionFactoryManagedConnectionFactory.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJCAConnectionFactoryManagedConnectionFactory -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "CIM_J2eeJCAConnectionFactoryManagedConnectionFactory " - "identifies the JCA managed connection factory associated with " - "the corresponding JCA connection factory ." )] -class CIM_J2eeJCAConnectionFactoryManagedConnectionFactory : CIM_HostedDependency { - - [Override ( "Dependent" ), - Min ( 1 )] - CIM_J2eeJCAConnectionFactory REF Dependent; - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 )] - CIM_J2eeJCAManagedConnectionFactory REF Antecedent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJCAConnectionPools.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJCAConnectionPools.mof deleted file mode 100644 index 14b62581..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJCAConnectionPools.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJCAConnectionPools -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "CIM_J2eeJCAConnectionPools provides the list of statistics " - "about the connections pools that are associated with the " - "referencing JCA resource statistics." )] -class CIM_J2eeJCAConnectionPools : CIM_RelatedStatisticalData { - - [Override ( "Stats" ), - Description ( "The JCA resource statistic." )] - CIM_J2eeJCAStats REF Stats; - - [Override ( "RelatedStats" ), - Description ( "The related JCA connection pool statistics." )] - CIM_J2eeConnectionPoolStats REF RelatedStats; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJCAManagedConnectionFactory.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJCAManagedConnectionFactory.mof deleted file mode 100644 index ee64bfa7..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJCAManagedConnectionFactory.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "This class identifies JCA managed connection factories." )] -class CIM_J2eeJCAManagedConnectionFactory : CIM_EnabledLogicalElement { - - [Key, Override ( "InstanceID" ), - Description ( - "InstanceID identifies a unique instance of a J2ee " - "JCAManagedConnectionFactory. In order to ensure " - "uniqueness, the value of InstanceID MUST be constructed " - "using the form specified in JSR77.3.1.1.1 in order to " - "avoid the need for manual key propagation." ), - ModelCorrespondence { - "CIM_J2eeJCAManagedConnectionFactory.Name" }] - string InstanceID; - - [Override ( "Name" ), - Description ( - "The name of a J2EE JCAManagedConnectionFactory. The name " - "MUST be constructed using the form specified in " - "JSR77.3.1.1.1 in order to avoid the need for manual key " - "propagation." ), - MaxLen ( 256 ), - MappingStrings { "JSR77.JCP|JSR77.3.1.1.1 objectName|V1.0" }, - ModelCorrespondence { - "CIM_J2eeJCAManagedConnectionFactory.InstanceID" }] - string Name; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJCANonpooledConnections.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJCANonpooledConnections.mof deleted file mode 100644 index 3620dc32..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJCANonpooledConnections.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJCANonpooledConnections -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "CIM_J2eeJCANonpooledConnections provides the list of " - "statistics for the non-connections pools that are associated " - "with the referencing JCA resource statistics." )] -class CIM_J2eeJCANonpooledConnections : CIM_RelatedStatisticalData { - - [Override ( "Stats" ), - Description ( "The JCA resource statistic." )] - CIM_J2eeJCAStats REF Stats; - - [Override ( "RelatedStats" ), - Description ( "The related JCA connection statistics." )] - CIM_J2eeConnectionStats REF RelatedStats; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJCAResource.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJCAResource.mof deleted file mode 100644 index d7be4791..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJCAResource.mof +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJCAResource -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( "CIM_J2eeJCAResource identifies a JCA resource." )] -class CIM_J2eeJCAResource : CIM_J2eeResource { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJCAStats.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJCAStats.mof deleted file mode 100644 index 4cd66172..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJCAStats.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJCAStats -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "The J2eeJCAStats class defines the performance statistics that " - "are provided by a JCA resource." )] -class CIM_J2eeJCAStats : CIM_J2eeStatistic { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCConnectionPools.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCConnectionPools.mof deleted file mode 100644 index 9de53db5..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCConnectionPools.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJDBCConnectionPools -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "CIM_J2eeJDBCConnectionPools provides the list of statistics " - "about the connections pools that are associated with the " - "referencing JDBC resource statistics." )] -class CIM_J2eeJDBCConnectionPools : CIM_RelatedStatisticalData { - - [Override ( "Stats" ), - Description ( "The JDBC resource statistic." )] - CIM_J2eeJDBCStats REF Stats; - - [Override ( "RelatedStats" ), - Description ( "The related JDBC connection pool statistics." )] - CIM_J2eeConnectionPoolStats REF RelatedStats; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCDataSource.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCDataSource.mof deleted file mode 100644 index 6d76eb2c..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCDataSource.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "The CIM_J2eeJDBCDataSource class contains instances that " - "identify physical JDBC data sources." )] -class CIM_J2eeJDBCDataSource : CIM_EnabledLogicalElement { - - [Key, Override ( "InstanceID" ), - Description ( - "InstanceID identifies a unique instance of a J2ee " - "JDBCDataSource. In order to ensure uniqueness, the value " - "of InstanceID MUST be constructed using the form " - "specified in JSR77.3.1.1.1 in order to avoid the need " - "for manual key propagation." ), - ModelCorrespondence { "CIM_J2eeJDBCDataSource.Name" }] - string InstanceID; - - [Override ( "Name" ), - Description ( - "The name of a J2EE JDBCDataSource. The name MUST be " - "constructed using the form specified in JSR77.3.1.1.1 in " - "order to avoid the need for manual key propagation." ), - MaxLen ( 256 ), - MappingStrings { "JSR77.JCP|JSR77.3.1.1.1 objectName|V1.0" }, - ModelCorrespondence { "CIM_J2eeJDBCDataSource.InstanceID" }] - string Name; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCDataSourceDriver.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCDataSourceDriver.mof deleted file mode 100644 index c78178d3..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCDataSourceDriver.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJDBCDataSourceDriver -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "CIM_J2eeJDBCDataSourceDriver associates the JDBC driver with a " - "JDBC data source." )] -class CIM_J2eeJDBCDataSourceDriver : CIM_HostedDependency { - - [Override ( "Dependent" ), - Min ( 1 )] - CIM_J2eeJDBCDataSource REF Dependent; - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 )] - CIM_J2eeJDBCDriver REF Antecedent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCDriver.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCDriver.mof deleted file mode 100644 index 24476f2f..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCDriver.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "The CIM_J2eeJDBCDriver class identifies individual JDBC drivers." - )] -class CIM_J2eeJDBCDriver : CIM_EnabledLogicalElement { - - [Key, Override ( "InstanceID" ), - Description ( - "InstanceID identifies a unique instance of a J2ee " - "JDBCDriver. In order to ensure uniqueness, the value of " - "InstanceID MUST be constructed using the form specified " - "in JSR77.3.1.1.1 in order to avoid the need for manual " - "key propagation." ), - ModelCorrespondence { "CIM_J2eeJDBCDriver.Name" }] - string InstanceID; - - [Override ( "Name" ), - Description ( - "The name of a J2EE JDBCDriver. The name MUST be " - "constructed using the form specified in JSR77.3.1.1.1 in " - "order to avoid the need for manual key propagation." ), - MaxLen ( 256 ), - MappingStrings { "JSR77.JCP|JSR77.3.1.1.1 objectName|V1.0" }, - ModelCorrespondence { "CIM_J2eeJDBCDriver.InstanceID" }] - string Name; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCNonpooledConnections.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCNonpooledConnections.mof deleted file mode 100644 index 5b160782..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCNonpooledConnections.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJDBCNonpooledConnections -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "CIM_J2eeJDBCNonpooledConnections provides the list of " - "statistics for the non-connections pools that are associated " - "with the referencing JDBC resource statistics." )] -class CIM_J2eeJDBCNonpooledConnections : CIM_RelatedStatisticalData { - - [Override ( "Stats" ), - Description ( "The JDBC resource statistic." )] - CIM_J2eeJDBCStats REF Stats; - - [Override ( "RelatedStats" ), - Description ( "The related JDBC connection statistics." )] - CIM_J2eeConnectionStats REF RelatedStats; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCResource.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCResource.mof deleted file mode 100644 index dff6c57b..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCResource.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJDBCResource -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "CIM_J2eeJDBCResource identifies a JDBC resource. A JDBC " - "resource manages one or more JDBC data sources." )] -class CIM_J2eeJDBCResource : CIM_J2eeResource { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCResourceUsesDataSource.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCResourceUsesDataSource.mof deleted file mode 100644 index d0daacf7..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCResourceUsesDataSource.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJDBCResourceUsesDataSource -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "CIM_J2eeJDBCResourceUsesDataSource is an association that " - "identifies the JDBC data sources that are available to a " - "CIM_J2eeJDBCResource." )] -class CIM_J2eeJDBCResourceUsesDataSource : CIM_HostedDependency { - - [Override ( "Dependent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The JDBC Resource that requires a Data Source." )] - CIM_J2eeJDBCResource REF Dependent; - - [Override ( "Antecedent" ), - Min ( 1 ), - Description ( - "The Data Source that is being used by a JDBC Resource." )] - CIM_J2eeJDBCDataSource REF Antecedent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCStats.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCStats.mof deleted file mode 100644 index f29dee49..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJDBCStats.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJDBCStats -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "The J2eeJDBCStats class defines the performance statistics " - "that are provided by a JDBC resource." )] -class CIM_J2eeJDBCStats : CIM_J2eeStatistic { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJMSConnectionSessions.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJMSConnectionSessions.mof deleted file mode 100644 index 2f59541d..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJMSConnectionSessions.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJMSConnectionSessions -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "CIM_J2eeJMSConnectionSessions identifies the JMS session " - "statistics that are associated with the referencing JMS " - "connection statistics." )] -class CIM_J2eeJMSConnectionSessions : CIM_RelatedStatisticalData { - - [Override ( "Stats" ), - Min ( 1 ), - Description ( "The JMS connection statistic." )] - CIM_J2eeJMSConnectionStats REF Stats; - - [Override ( "RelatedStats" ), - Description ( "The related JMS session statistics." )] - CIM_J2eeJMSSessionStats REF RelatedStats; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJMSConnectionStats.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJMSConnectionStats.mof deleted file mode 100644 index 05da2838..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJMSConnectionStats.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJMSConnectionStats -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "The CIM_J2eeJMSConnectionStats class defines the performance " - "statistics that are provided by a JMS connection." )] -class CIM_J2eeJMSConnectionStats : CIM_J2eeStatistic { - - [Description ( - "The transactional state of the JMS connection. A value " - "of true indicates that the JMS connection is " - "transactional." ), - MappingStrings { - "JSR77.JCP|JSR77.6.25.1.2 isTransactional|V1.0" }] - boolean IsTransactional; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJMSConsumerStats.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJMSConsumerStats.mof deleted file mode 100644 index 9d332636..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJMSConsumerStats.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJMSConsumerStats -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "The CIM_J2eeJMSConsumerStats class defines the performance " - "statistics that are provided by a JMS message consumer." )] -class CIM_J2eeJMSConsumerStats : CIM_J2eeJMSEndpointStats { - - [Description ( - "A string that encapsulates the identity of the message origin." - ), - MappingStrings { "JSR77.JCP|JSR77.6.29.1.1 getOrigin|V1.0" }] - string Origin; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJMSEndpointStats.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJMSEndpointStats.mof deleted file mode 100644 index e0dfb61d..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJMSEndpointStats.mof +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJMSEndpointStats -// ================================================================== - [Abstract, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "The CIM_J2eeJMSEndpointStats class is a base class that " - "defines the performance statistics that are provided by a JMS " - "message producer or JMS message consumer." )] -class CIM_J2eeJMSEndpointStats : CIM_J2eeStatistic { - - [Description ( - "The number of messages that expired before delivery." ), - Counter, MappingStrings { - "JSR77.JCP|JSR77.6.27.1.1 getExpiredMessageCount|V1.0" }] - uint64 ExpiredMessageCount; - - [Description ( "The number of messages sent or received." ), - Counter, MappingStrings { - "JSR77.JCP|JSR77.6.27.1.2 getMessageCount|V1.0" }] - uint64 MessageCount; - - [Description ( - "The time spent by a message before being delivered. The " - "time is represented as a datetime interval." ), - MappingStrings { - "JSR77.JCP|JSR77.6.27.1.3 getMessageWaitTime|V1.0" }] - datetime MessageWaitTime; - - [Description ( - "The maximum amount of time spent by a message before " - "being delivered since the beginning of this measurement. " - "The time is represented as a datetime interval." ), - MappingStrings { "JSR77.JCP|JSR77.6.6.1.2 getMaxTime|V1.0" }] - datetime MessageWaitTimeMaxTime; - - [Description ( - "The minimum amount of time spent by a message before " - "being delivered since the beginning of this measurement. " - "The time is represented as a datetime interval." ), - MappingStrings { "JSR77.JCP|JSR77.6.6.1.3 getMinTime|V1.0" }] - datetime MessageWaitTimeMinTime; - - [Description ( - "The total amount of time spent by a message before being " - "delivered since the beginning of this measurement. " - "Dividing MessageWaitTimeTotalTime by MessageWaitTime " - "will provide the average time spent using a connection. " - "The time is represented as a datetime interval." ), - MappingStrings { "JSR77.JCP|JSR77.6.6.1.4 getTotalTime|V1.0" }] - datetime MessageWaitTimeTotalTime; - - [Description ( "The number of pending messages." ), - Counter, MappingStrings { - "JSR77.JCP|JSR77.6.27.1.4 getPendingMessageCount|V1.0" }] - uint64 PendingMessageCount; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJMSProducerStats.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJMSProducerStats.mof deleted file mode 100644 index 601fb66c..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJMSProducerStats.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJMSProducerStats -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "The CIM_J2eeJMSProducerStats class defines the performance " - "statistics that are provided by a JMS message producer." )] -class CIM_J2eeJMSProducerStats : CIM_J2eeJMSEndpointStats { - - [Description ( - "A string that encapsulates the identity of the message " - "destination." ), - MappingStrings { - "JSR77.JCP|JSR77.6.28.1.1 getDestination|V1.0" }] - string Destination; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJMSResource.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJMSResource.mof deleted file mode 100644 index 63709dab..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJMSResource.mof +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJMSResource -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( "CIM_J2eeJMSResource identifies a JMS resource." )] -class CIM_J2eeJMSResource : CIM_J2eeResource { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJMSSessionConsumers.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJMSSessionConsumers.mof deleted file mode 100644 index d725e800..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJMSSessionConsumers.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJMSSessionConsumers -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "CIM_J2eeJMSSessionConsumers identifies the JMS consumer " - "statistics that are associated with the referencing JMS " - "session statistics." )] -class CIM_J2eeJMSSessionConsumers : CIM_RelatedStatisticalData { - - [Override ( "Stats" ), - Min ( 1 ), - Description ( "The JMS session statistic." )] - CIM_J2eeJMSSessionStats REF Stats; - - [Override ( "RelatedStats" ), - Description ( "The related JMS consumer statistics." )] - CIM_J2eeJMSConsumerStats REF RelatedStats; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJMSSessionProducers.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJMSSessionProducers.mof deleted file mode 100644 index 12045093..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJMSSessionProducers.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJMSSessionProducers -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "CIM_J2eeJMSSessionProducers identifies the JMS producer " - "statistics that are associated with the referencing JMS " - "session statistics." )] -class CIM_J2eeJMSSessionProducers : CIM_RelatedStatisticalData { - - [Override ( "Stats" ), - Min ( 1 ), - Description ( "The JMS session statistic." )] - CIM_J2eeJMSSessionStats REF Stats; - - [Override ( "RelatedStats" ), - Description ( "The related JMS producer statistics." )] - CIM_J2eeJMSProducerStats REF RelatedStats; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJMSSessionStats.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJMSSessionStats.mof deleted file mode 100644 index 075aa0b3..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJMSSessionStats.mof +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJMSSessionStats -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "The CIM_J2eeJMSSessionStats class defines the performance " - "statistics that are provided by a JMS session." )] -class CIM_J2eeJMSSessionStats : CIM_J2eeStatistic { - - [Description ( "The number of durable subscriptions." ), - Counter, MappingStrings { - "JSR77.JCP|JSR77.6.26.1.3 getDurableSubscriptionCount|V1.0" }] - uint64 DurableSubscriptionCount; - - [Description ( "The number of expired messages." ), - Counter, MappingStrings { - "JSR77.JCP|JSR77.6.26.1.4 getExpiredMessageCount|V1.0" }] - uint64 ExpiredMessageCount; - - [Description ( "The number of messages exchanged." ), - Counter, MappingStrings { - "JSR77.JCP|JSR77.6.26.1.5 getMessageCount|V1.0" }] - uint64 MessageCount; - - [Description ( - "The time spent by a message before being delivered. The " - "time is represented as a datetime interval." ), - MappingStrings { - "JSR77.JCP|JSR77.6.26.1.6 getMessageWaitTime|V1.0" }] - datetime MessageWaitTime; - - [Description ( - "The maximum amount of time spent by a message before " - "being delivered since the beginning of this measurement. " - "The time is represented as a datetime interval." ), - MappingStrings { "JSR77.JCP|JSR77.6.6.1.2 getMaxTime|V1.0" }] - datetime MessageWaitTimeMaxTime; - - [Description ( - "The minimum amount of time spent by a message before " - "being delivered since the beginning of this measurement. " - "The time is represented as a datetime interval." ), - MappingStrings { "JSR77.JCP|JSR77.6.6.1.3 getMinTime|V1.0" }] - datetime MessageWaitTimeMinTime; - - [Description ( - "The total amount of time spent by a message before being " - "delivered since the beginning of this measurement. " - "Dividing MessageWaitTimeTotalTime by MessageWaitTime " - "will provide the average time spent using a connection. " - "The time is represented as a datetime interval." ), - MappingStrings { "JSR77.JCP|JSR77.6.6.1.4 getTotalTime|V1.0" }] - datetime MessageWaitTimeTotalTime; - - [Description ( "The number of pending messages." ), - Counter, MappingStrings { - "JSR77.JCP|JSR77.6.26.1.7 getPendingMessageCount|V1.0" }] - uint64 PendingMessageCount; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJMSStatConnections.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJMSStatConnections.mof deleted file mode 100644 index 690bc926..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJMSStatConnections.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJMSStatConnections -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "CIM_J2eeJMSStatConnections provides the list of JMS connection " - "statistics that are associated with the referencing JMS " - "resource statistics." )] -class CIM_J2eeJMSStatConnections : CIM_RelatedStatisticalData { - - [Override ( "Stats" ), - Min ( 1 ), - Description ( "The JMS resource statistic." )] - CIM_J2eeJMSStats REF Stats; - - [Override ( "RelatedStats" ), - Description ( "The related JMS connection statistics." )] - CIM_J2eeJMSConnectionStats REF RelatedStats; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJMSStats.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJMSStats.mof deleted file mode 100644 index 47f2e124..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJMSStats.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJMSStats -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "The CIM_J2eeJMSStats class defines the performance statistics " - "that are provided by a JMS resource." )] -class CIM_J2eeJMSStats : CIM_J2eeStatistic { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJNDIResource.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJNDIResource.mof deleted file mode 100644 index 647af92d..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJNDIResource.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJNDIResource -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "CIM_J2eeJNDIResource identifies a Java Naming and Directory " - "Interface (JNDI) resource." )] -class CIM_J2eeJNDIResource : CIM_J2eeResource { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJTAResource.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJTAResource.mof deleted file mode 100644 index 4c4f3723..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJTAResource.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJTAResource -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "CIM_J2eeJTAResource identifies a Java Transaction API (JTA) resource." - )] -class CIM_J2eeJTAResource : CIM_J2eeResource { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJTAStats.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJTAStats.mof deleted file mode 100644 index 4c021372..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJTAStats.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJTAStats -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "The CIM_J2eeJTAStats class defines the performance statistics " - "that are provided by a JTA resource." )] -class CIM_J2eeJTAStats : CIM_J2eeStatistic { - - [Description ( "The number of active transactions." ), - Counter, MappingStrings { - "JSR77.JCP|JSR77.6.30.1.1 getActiveCount|V1.0" }] - uint64 ActiveCount; - - [Description ( "The number of committed transactions." ), - Counter, MappingStrings { - "JSR77.JCP|JSR77.6.30.1.2 getCommittedCount|V1.0" }] - uint64 CommittedCount; - - [Description ( "The number of rolled-back transactions." ), - Counter, MappingStrings { - "JSR77.JCP|JSR77.6.30.1.3 getRolledbackCount|V1.0" }] - uint64 RolledbackCount; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJVM.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJVM.mof deleted file mode 100644 index 350fb0d9..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJVM.mof +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "The CIM_J2eeJVM class identifies a Java VM that is utilized by " - "a J2EE server. For each Java VM that is running threads " - "associated with the J2EE server, its containers or resources, " - "there must be an instance in this class. The instance must be " - "removed when the Java VM is no longer running. The reason this " - "class subclasses from a class as high up in the hierarchy as " - "CIM_EnabledLogicalElement is the absence of a class that " - "models Interpreters, Emulators and the like. The JVM is not an " - "OS, but then neither is it just a process. In v2.9, we hope to " - "plug this hole by introducing a class that will model " - "interpreters and emulators. At this point, the JVM class can " - "be pushed down in the hierarchy." )] -class CIM_J2eeJVM : CIM_EnabledLogicalElement { - - [Key, Override ( "InstanceID" ), - Description ( - "InstanceID identifies a unique instance of a J2ee JVM In " - "order to ensure uniqueness, the value of InstanceID MUST " - "be constructed using the form specified in JSR77.3.1.1.1 " - "in order to avoid the need for manual key propagation." ), - ModelCorrespondence { "CIM_J2eeJVM.Name" }] - string InstanceID; - - [Override ( "Name" ), - Description ( - "The name of a J2EE JVM. The name MUST be constructed " - "using the form specified in JSR77.3.1.1.1 in order to " - "avoid the need for manual key propagation." ), - MaxLen ( 256 ), - MappingStrings { "JSR77.JCP|JSR77.3.1.1.1 objectName|V1.0" }, - ModelCorrespondence { "CIM_J2eeJVM.InstanceID" }] - string Name; - - [Description ( - "The Java Runtime Environment version of the JVM." ), - MappingStrings { "JSR77.JCP|JSR77.3.4.1.1 javaVersion|V1.0" }] - string JavaVersion; - - [Description ( - "The Java Runtime Environment vendor of the JVM." ), - MappingStrings { "JSR77.JCP|JSR77.3.4.1.2 javaVendor|V1.0" }] - string JavaVendor; - - [Description ( "The node (machine) this JVM is running on." ), - MappingStrings { "JSR77.JCP|JSR77.3.4.1.3 node|V1.0" }] - string Node; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJVMStats.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJVMStats.mof deleted file mode 100644 index 206d42f8..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJVMStats.mof +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.2" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "The CIM_J2eeJVMStats class defines the performance statistics " - "that are provided by a Java VM." )] -class CIM_J2eeJVMStats : CIM_J2eeStatistic { - - [Description ( "The heap size of the JVM." ), - Units ( "Bytes" ), - Gauge, MappingStrings { - "JSR77.JCP|JSR77.6.31.1.1 getHeapSize|V1.0" }, - PUnit ( "byte" )] - uint64 HeapSize; - - [Description ( "The upper limit for the heap size of the JVM." ), - Units ( "Bytes" ), - MappingStrings { "JSR77.JCP|JSR77.6.8.1.1 getUpperBound|V1.0" }, - PUnit ( "byte" )] - uint64 HeapSizeUpperBound; - - [Description ( "The lower limit for the heap size of the JVM." ), - Units ( "Bytes" ), - MappingStrings { "JSR77.JCP|JSR77.6.8.1.2 getLowerBound|V1.0" }, - PUnit ( "byte" )] - uint64 HeapSizeLowerBound; - - [Description ( - "The smallest size of the JVM heap since the beginning of " - "the measurement." ), - Units ( "Bytes" ), - MappingStrings { - "JSR77.JCP|JSR77.6.7.1.2 getLowWaterMark|V1.0" }, - PUnit ( "byte" )] - uint64 HeapSizeLowWaterMark; - - [Description ( - "The largest size of the JVM heap since the beginning of " - "the measurement." ), - Units ( "Bytes" ), - MappingStrings { - "JSR77.JCP|JSR77.6.7.1.1 getHighWaterMark|V1.0" }, - PUnit ( "byte" )] - uint64 HeapSizeHighWaterMark; - - [Description ( - "The amount of time the JVM has been running. The time is " - "represented as a datetime interval." ), - MappingStrings { "JSR77.JCP|JSR77.6.31.1.2 getUpTime|V1.0" }] - datetime UpTime; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJavaMailResource.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJavaMailResource.mof deleted file mode 100644 index 2bb2b961..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJavaMailResource.mof +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJavaMailResource -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "CIM_J2eeJavaMailResource identifies a JavaMail resource." )] -class CIM_J2eeJavaMailResource : CIM_J2eeResource { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeJavaMailStats.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeJavaMailStats.mof deleted file mode 100644 index aaddb7ff..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeJavaMailStats.mof +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeJavaMailStats -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "The J2eeJavaMailStats class defines the performance statistics " - "that are provided by Java mail resources." )] -class CIM_J2eeJavaMailStats : CIM_J2eeStatistic { - - [Description ( "The number of mail messages received." ), - Counter, MappingStrings { - "JSR77.JCP|JSR77.6.13.1.1 getSentMailCount|V1.0" }] - uint64 SentMailCount; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeManagedObject.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeManagedObject.mof deleted file mode 100644 index 083289fb..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeManagedObject.mof +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Abstract, Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "CIM_J2eeManagedObject is a class for defining operations that " - "may supported by all J2EE managed objects. It contains the " - "attributes and methods that are common to all J2EE managed " - "objects. The J2EE Managed objects - for eg. J2eeServer should " - "participate in instances of the CIM_LogicalIdentity " - "association with the corresponding instance of the " - "J2eeManagedObject class. The start and stop methods of JSR77\'s " - "J2eeManagedObject find an equivalent in the RequestStateChange " - "method inherited from EnabledLogicalElement. Using " - "Enabled/Disabled as inputs to RequestStateChange, one can " - "effect start and stop." )] -class CIM_J2eeManagedObject : CIM_EnabledLogicalElement { - - [Key, Override ( "InstanceID" ), - Description ( - "InstanceID identifies a unique instance of a J2EE " - "ManagedObject\'s Capabilities in a given namespace. In " - "order to ensure uniqueness, the value of InstanceID MUST " - "be constructed using the form specified in JSR77.3.1.1.1 " - "in order to avoid the need for manual key propagation." ), - MappingStrings { "JSR77.JCP|JSR77.3.1.1.1 objectName|V1.0" }, - ModelCorrespondence { "CIM_J2eeManagedObject.ElementName" }] - string InstanceID; - - [Override ( "ElementName" ), - Description ( - "The name of a J2EE managed object. The name MUST be " - "constructed using the form specified in JSR77.3.1.1.1 in " - "order to avoid the need for manual key propagation." ), - MaxLen ( 256 ), - MappingStrings { "JSR77.JCP|JSR77.3.1.1.1 objectName|V1.0" }, - ModelCorrespondence { "CIM_J2eeManagedObject.InstanceID" }] - string ElementName; - - [Override ( "OperationalStatus" ), - Description ( - "The current state of the entity for J2ee managed objects " - "that support state management. If the StateManageable " - "property is FALSE, the value of this property MUST be " - "set to 0 - Unknown. The mapping from the J2ee management " - "states to OperationalStatus is as follows - " - "j2ee.state.starting - Starting, j2ee.state.running - OK, " - "j2ee.state.stopping - Stopping, j2ee.state.stopped - " - "Stopped, and j2ee.state.failed - Error." ), - ValueMap { "0", "2", "6", "8", "9", "10" }, - Values { "Unknown", "OK", "Error", "Starting", "Stopping", - "Stopped" }, - MappingStrings { "JSR77.JCP|JSR77.5.1.1.1 state|V1.0" }, - ModelCorrespondence { - "CIM_J2eeManagedObjectCapabilities.StateManageable" }] - uint16 OperationalStatus[]; - - [Description ( - "The time that the J2EE managed object was started, " - "represented as a datetime interval measured as the time " - "interval since January 1, 1970, 00:00:00. If the " - "StateManageable property of the " - "CIM_J2eeManagedObjectCapabilities class is false, this " - "value MUST be set to a zero time interval." ), - MappingStrings { "JSR77.JCP|JSR77.5.1.1.2 startTime|V1.0" }, - ModelCorrespondence { - "CIM_J2eeManagedObjectCapabilities.StateManageable" }] - datetime StartTime = "00000000000000.000000:000"; - - - [Description ( - "Starts the J2EE managed object. This operation can only " - "be invoked in when State is Stopped. This method, causes " - "State to become Starting initially, and eventually " - "becomes the RUNNING state. Additionally, " - "StartRecursive() is called on all the child " - "StateManageable instances that are registered with this " - "entity and are in the Stopped state. The method returns " - "0 on success and non-zero for failure." ), - MappingStrings { "JSR77.JCP|JSR77.5.1.2.2 startRecursive|V1.0" }] - uint32 StartRecursive( -); - - [Description ( - "This method starts the J2EE managed object. This " - "operation can only be invoked when the OperationalStatus " - "is Stopped. Note that StartService() will not be called " - "on any of the child StateManageable instances that are " - "registered with this instance. It is the responsibility " - "of the calling application to start the child if " - "required. The method returns 0 on success and non-zero " - "for failure." ), - MappingStrings { "JSR77.JCP|JSR77.5.1.2.1 start|V1.0" }] - uint32 Start( -); - - [Description ( - "This method stops the J2EE managed object and all " - "dependent objects that can be identified by following " - "the Dependency/Component associations this object\'s " - "identity participates in." ), - MappingStrings { "JSR77.JCP|JSR77.5.1.2.3 stop|V1.0" }] - uint32 Stop( -); - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeManagedObjectCapabilities.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeManagedObjectCapabilities.mof deleted file mode 100644 index 5704d8e8..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeManagedObjectCapabilities.mof +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeManagedObjectCapabilities -// ================================================================== - [Abstract, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "CIM_J2eeManagedObjectCapabilities is a class for defining " - "additional capabilities of J2EE managed objects. It contains " - "the attributes that are common to all J2EE managed objects. " - "These common attributes are mapped to the corresponding J2EE " - "classes using the CIM_ElementCapabilities association." )] -class CIM_J2eeManagedObjectCapabilities : CIM_Capabilities { - - [Override ( "InstanceID" ), - Description ( - "InstanceID identifies a unique instance of a J2EE " - "ManagedObject\'s Capabilities in a given namespace. In " - "order to ensure uniqueness, the value of InstanceID MUST " - "be constructed using the form specified in JSR77.3.1.1.1 " - "in order to avoid the need for manual key propagation." ), - MappingStrings { "JSR77.JCP|JSR77.3.1.1.1 objectName|V1.0" }, - ModelCorrespondence { - "CIM_J2eeManagedObjectCapabilities.ElementName" }] - string InstanceID; - - [Override ( "ElementName" ), - Description ( - "The name of a J2EE managed object. The name MUST be " - "constructed using the form specified in JSR77.3.1.1.1 in " - "order to avoid the need for manual key propagation." ), - MaxLen ( 256 ), - MappingStrings { "JSR77.JCP|JSR77.3.1.1.1 objectName|V1.0" }, - ModelCorrespondence { - "CIM_J2eeManagedObjectCapabilities.InstanceID" }] - string ElementName; - - [Description ( - "A property that indicates whether the managed object " - "implements the state management model as defined in " - "State Management chapter of the JSR77 specification. A " - "value of true indicates that the managed object " - "implements the state management interface. A value of " - "false indicates that the managed object does not " - "implement the state management interface." ), - MappingStrings { - "JSR77.JCP|JSR77.3.1.1.2 stateManageable|V1.0" }] - boolean StateManageable; - - [Description ( - "A property that indicates whether the managed object " - "implements the statistics provider model as defined in " - "Performance Monitoring chapter of the JSR77 " - "specification. A value of true indicates that the " - "managed object implements the statistics provider " - "interface. A value of false indicates that the managed " - "object does not implement the statistics provider " - "interface." ), - MappingStrings { - "JSR77.JCP|JSR77.3.1.1.3 statisticsProvider|V1.0" }] - boolean StatisticsProvider; - - [Description ( - "A property that indicates whether the managed object " - "implements the event provider model as defined in the " - "Events chapter of the JSR77 specification. A value of " - "true indicates that the managed object implements the " - "event provider interface. A value of false indicates " - "that the managed object does not implement the event " - "provider interface." ), - MappingStrings { "JSR77.JCP|JSR77.3.1.1.4 eventProvider|V1.0" }] - boolean EventProvider; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeMessageDrivenBean.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeMessageDrivenBean.mof deleted file mode 100644 index 119965fb..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeMessageDrivenBean.mof +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeMessageDrivenBean -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "Identifies a deployed message driven bean within an EJB module." )] -class CIM_J2eeMessageDrivenBean : CIM_J2eeEJB { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeMessageDrivenBeanStats.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeMessageDrivenBeanStats.mof deleted file mode 100644 index dc540fd8..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeMessageDrivenBeanStats.mof +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeMessageDrivenBeanStats -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "The J2eeMessageDrivenBeanStats class defines the performance " - "statistics that are provided by message driven beans." )] -class CIM_J2eeMessageDrivenBeanStats : CIM_J2eeEJBStats { - - [Description ( "The number of messages received." ), - Counter, MappingStrings { - "JSR77.JCP|JSR77.6.13.1.1 getMessageCount|V1.0" }] - uint64 MessageCount; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeModule.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeModule.mof deleted file mode 100644 index 3adfa4ad..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeModule.mof +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeModule -// ================================================================== - [Abstract, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "The CIM_J2eeModule class is an abstract class from which all " - "J2EE module type classes extend. These represent EAR, JAR, " - "WAR, and RAR files that have been deployed." )] -class CIM_J2eeModule : CIM_J2eeDeployedObject { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeModuleUsesJVM.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeModuleUsesJVM.mof deleted file mode 100644 index 721e6d5b..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeModuleUsesJVM.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeModuleUsesJVM -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "The CIM_J2eeModuleUsesJVM association identifies the JVM that " - "a specific Module runs in." )] -class CIM_J2eeModuleUsesJVM : CIM_HostedDependency { - - [Override ( "Dependent" ), - Description ( "The Module that uses a Java Virtual Machine." )] - CIM_J2eeModule REF Dependent; - - [Override ( "Antecedent" ), - Min ( 1 ), - Description ( "The Java VM on which the module is running." )] - CIM_J2eeJVM REF Antecedent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeNotification.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeNotification.mof deleted file mode 100644 index d6ddc3f0..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeNotification.mof +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeNotification -// ================================================================== - [Indication, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "The J2eeNotification class specifies the properties that must " - "be included in every event that is generated by a J2EE managed " - "object that supports the event model. All management systems " - "that support event notification must support all of the " - "properties in this class." )] -class CIM_J2eeNotification : CIM_ProcessIndication { - - [Override ( "IndicationIdentifier" ), - Description ( - "The identifier for the indication, represented as the " - "name of the source J2EE managed object that generated " - "the event. The name MUST be constructed using the form " - "specified in JSR77.3.1.1.1." ), - MappingStrings { "JSR77.JCP|JSR77.4.2.1.1 source|V1.0" }, - ModelCorrespondence { "CIM_J2eeManagedObject.InstanceID" }] - string IndicationIdentifier; - - [Override ( "SequenceNumber" ), - Description ( - "The sequence number of the indication. Identifies the " - "position of the indication in a stream of indications. " - "The sequence number provides a means of determining the " - "order of sequential indications that occurred with the " - "same timestamp (within the minimum supported unit of " - "time)." ), - MappingStrings { "JSR77.JCP|JSR77.4.2.1.3 sequence|V1.0" }] - sint64 SequenceNumber; - - [Description ( - "The type of the indication. The type is assigned by the " - "source object that generated the indication. It conveys " - "the semantic meaning of the particular indication. The " - "standard types (starting, stopping, running, etc.) MUST " - "be described by this property\'s enumeration. Other " - "values MAY also be specified by entering 1 (\"Other\") " - "in this property and placing the type\'s string value in " - "OtherIndicationType. The latter SHOULD be interpreted as " - "a number of dot-separated components. This allows some " - "structure in the naming of indication types. Source " - "objects are free to define any types that they wish to " - "use when naming the indications that they generate. \n" - "\n" - "Note that this enumeration is defined by examining " - "J2eeManagedObject\'s OperationalStatus property, by the " - "creation or deletion of the J2eeManagedObject instance, " - "or is the decision of the JSR77 experts or the " - "implementation. It is not a one-to-one mapping of the " - "OperationalStatus property in ManagedSystemElement, and " - "is therefore a unique enumeration and specific " - "ProcessIndication." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Unknown", "Other", "j2ee.object.created", - "j2ee.object.deleted", "j2ee.state.starting", - "j2ee.state.running", "j2ee.state.stopping", - "j2ee.state.stopped", "j2ee.state.failed" }, - MappingStrings { "JSR77.JCP|JSR77.4.2.1.4 type|V1.0" }, - ModelCorrespondence { - "CIM_J2eeNotification.OtherIndicationType" }] - uint16 IndicationType; - - [Description ( - "The type of the indication when a non-standard event is " - "generated by the source object. This value MUST be " - "specified when IndicationType is set to 1 (\"Other\")." ), - ModelCorrespondence { "CIM_J2eeNotification.IndicationType" }] - string OtherIndicationType; - - [Description ( - "An informational message about the indication." )] - string Message; - - [Description ( - "Optional data that the notication broadcaster wishes to " - "communicate to listeners. The content of the data is " - "user specific. The UserData property may be null." ), - OctetString] - string UserData; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeRMI_IIOPResource.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeRMI_IIOPResource.mof deleted file mode 100644 index 93dbc84b..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeRMI_IIOPResource.mof +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeRMI_IIOPResource -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "CIM_J2eeRMI_IIOPResource identifies an RMI_IIOP resource." )] -class CIM_J2eeRMI_IIOPResource : CIM_J2eeResource { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeResource.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeResource.mof deleted file mode 100644 index 62fba668..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeResource.mof +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Abstract, Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "The J2eeResource class is a base class for all managed object " - "types that represent J2EE resources. J2EE resources are " - "resources that are utilized by the J2EE server to provide the " - "J2EE standard services required by the J2EE platform " - "architecture. The J2EEResource class has several subclasses " - "that do not add any new properties. The option of using a type " - "property to identify the different resource types while doing " - "away with the numerous empty subclasses was not chosen because " - "the subclasses, when enhanced by vendor specific extensions " - "are significantly different from each other." )] -class CIM_J2eeResource : CIM_SystemResource { - - [Key, Override ( "InstanceID" ), - Description ( - "InstanceID identifies a unique instance of a J2ee " - "Resource. In order to ensure uniqueness, the value of " - "InstanceID MUST be constructed using the form specified " - "in JSR77.3.1.1.1 in order to avoid the need for manual " - "key propagation." ), - ModelCorrespondence { "CIM_J2eeResource.Name" }] - string InstanceID; - - [Override ( "Name" ), - Description ( - "The name of a J2EE Resource. The name MUST be " - "constructed using the form specified in JSR77.3.1.1.1 in " - "order to avoid the need for manual key propagation." ), - MaxLen ( 256 ), - MappingStrings { "JSR77.JCP|JSR77.3.1.1.1 objectName|V1.0" }, - ModelCorrespondence { "CIM_J2eeResource.InstanceID" }] - string Name; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeResourceAdapter.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeResourceAdapter.mof deleted file mode 100644 index 279508ae..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeResourceAdapter.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeResourceAdapter -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "Identifies a deployed Resource Adapter within a Resource " - "Adapter Module. The resource adapter is hosted by a J2ee " - "Server and should hence be associated to a J2eeServer instance " - "through the CIM_HostedService association. The scoping keys in " - "the instance are provided by the J2eeServer hosting the " - "resource adapter." )] -class CIM_J2eeResourceAdapter : CIM_Service { - - [Override ( "Name" ), - Description ( - "The name of a J2EE Resource Adapter. The name MUST be " - "constructed using the form specified in JSR77.3.1.1.1 in " - "order to avoid the need for manual key propagation." ), - MaxLen ( 256 ), - MappingStrings { "JSR77.JCP|JSR77.3.1.1.1 objectName|V1.0" }] - string Name; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeResourceAdapterInModule.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeResourceAdapterInModule.mof deleted file mode 100644 index e632941a..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeResourceAdapterInModule.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeResourceAdapterInModule -// ================================================================== - [Association, Aggregation, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "CIM_J2eeResourceAdapterInModule is an aggregation of the " - "resource adapters contained within a deployed RAR Module." )] -class CIM_J2eeResourceAdapterInModule : CIM_ServiceComponent { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Description ( - "The ResourceAdapter Module that is comprised of resource adapters." - )] - CIM_J2eeResourceAdapterModule REF GroupComponent; - - [Override ( "PartComponent" ), - Min ( 1 ), - Description ( - "The resource adapter that is a part of the resource " - "adapter Module." )] - CIM_J2eeResourceAdapter REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeResourceAdapterModule.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeResourceAdapterModule.mof deleted file mode 100644 index e4488089..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeResourceAdapterModule.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeResourceAdapterModule -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "CIM_J2eeResourceAdapterModule identifies a deployed Resource " - "Adapter Module and is a container for resource adapters." )] -class CIM_J2eeResourceAdapterModule : CIM_J2eeModule { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeResourceOnServer.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeResourceOnServer.mof deleted file mode 100644 index 57cd3c83..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeResourceOnServer.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeResourceOnServer -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "CIM_J2eeResourceOnServer is an association that establishes " - "the relationship between a J2EE server and its resources." )] -class CIM_J2eeResourceOnServer : CIM_ResourceOfSystem { - - [Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The Server exposing the resources." )] - CIM_J2eeServer REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The resource that is a component of the server." )] - CIM_J2eeResource REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeServer.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeServer.mof deleted file mode 100644 index 950b02a0..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeServer.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeServer -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "The CIM_J2eeServer class represents the J2EE Server core of " - "one instance of a J2EE platform product as described in the " - "Java 2 Enterprise Edition Platform specification." )] -class CIM_J2eeServer : CIM_ApplicationSystem { - - [Override ( "Name" ), - Description ( - "The name of a J2EE Server. The name MUST be constructed " - "using the form specified in JSR77.3.1.1.1 in order to " - "avoid the need for manual key propagation." ), - MaxLen ( 256 ), - MappingStrings { "JSR77.JCP|JSR77.3.1.1.1 objectName|V1.0" }] - string Name; - - [Description ( "The name of the server\'s vendor." ), - MappingStrings { "JSR77.JCP|JSR77.3.3.1.4 serverVendor|V1.0" }] - string Vendor; - - [Description ( - "The J2EE implementation version of the J2EE server." ), - MappingStrings { "JSR77.JCP|JSR77.3.3.1.5 serverVersion|V1.0" }] - string Version; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeServerInDomain.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeServerInDomain.mof deleted file mode 100644 index 114276c1..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeServerInDomain.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeServerInDomain -// ================================================================== - [Association, Aggregation, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "The CIM_J2eeServerInDomain association identifies the J2EE " - "Server that are part of a J2EE Domain for management purposes." )] -class CIM_J2eeServerInDomain : CIM_SystemComponent { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The J2ee Management Domain." )] - CIM_J2eeDomain REF GroupComponent; - - [Override ( "PartComponent" ), - Min ( 1 ), - Description ( - "The J2ee Server that is a member of the domain." )] - CIM_J2eeServer REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeServerUsesJVM.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeServerUsesJVM.mof deleted file mode 100644 index 36ff89b8..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeServerUsesJVM.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeServerUsesJVM -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "The association between a J2EE server and the Java virtual " - "machine on which the J2EE server has running threads." )] -class CIM_J2eeServerUsesJVM : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Description ( "The Java VM that is used by the J2ee Server." )] - CIM_J2eeJVM REF Antecedent; - - [Override ( "Dependent" ), - Min ( 1 ), - Description ( - "The J2ee Server that has threads running on the JVM." )] - CIM_J2eeServer REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeServlet.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeServlet.mof deleted file mode 100644 index 743fab89..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeServlet.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeServlet -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "Identifies a deployed servlet component. The Servlet is hosted " - "by a J2ee Server and should hence be associated to a " - "J2eeServer instance through the CIM_HostedService association. " - "The scoping keys in the instance are provided by the " - "J2eeServer hosting the servlet." )] -class CIM_J2eeServlet : CIM_Service { - - [Override ( "Name" ), - Description ( - "The name of a J2EE Servlet. The name MUST be constructed " - "using the form specified in JSR77.3.1.1.1 in order to " - "avoid the need for manual key propagation." ), - MaxLen ( 256 ), - MappingStrings { "JSR77.JCP|JSR77.3.1.1.1 objectName|V1.0" }] - string Name; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeServletInModule.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeServletInModule.mof deleted file mode 100644 index c9280eb7..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeServletInModule.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeServletInModule -// ================================================================== - [Association, Aggregation, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "CIM_J2eeServletInModule is a aggregation of the servlet " - "components within a deployed WAR module." )] -class CIM_J2eeServletInModule : CIM_ServiceComponent { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The Web Module that is comprised of servlets." )] - CIM_J2eeWebModule REF GroupComponent; - - [Override ( "PartComponent" ), - Min ( 1 ), - Description ( "The Servlet that is a part of the Web Module." )] - CIM_J2eeServlet REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeServletStats.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeServletStats.mof deleted file mode 100644 index f38f5373..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeServletStats.mof +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeServletStats -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "The CIM_J2eeServletStats class defines the performance " - "statistics that are provided by a Servlet component." )] -class CIM_J2eeServletStats : CIM_J2eeStatistic { - - [Description ( - "The execution time of the servlet\'s service method. The " - "time is represented as a datetime interval." ), - MappingStrings { - "JSR77.JCP|JSR77.6.32.1.1 getServiceTime|V1.0" }] - datetime ServiceTime; - - [Description ( - "The maximum execution time of the servlet\'s service " - "method since the beginning of this measurement. The time " - "is represented as a datetime interval." ), - MappingStrings { "JSR77.JCP|JSR77.6.6.1.2 getMaxTime|V1.0" }] - datetime ServletTimeMaxTime; - - [Description ( - "The minimum execution time of the servlet\'s service " - "method since the beginning of this measurement. The time " - "is represented as a datetime interval." ), - MappingStrings { "JSR77.JCP|JSR77.6.6.1.3 getMinTime|V1.0" }] - datetime ServiceTimeMinTime; - - [Description ( - "The total execution time of the servlet\'s service " - "method since the beginning of this measurement. Dividing " - "ServletTimeTotalTime by ServletTime will provide the " - "average time spent executing the servlet\'s service " - "method. The time is represented as a datetime interval." ), - MappingStrings { "JSR77.JCP|JSR77.6.6.1.4 getTotalTime|V1.0" }] - datetime ServletTimeTotalTime; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeSessionBean.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeSessionBean.mof deleted file mode 100644 index 4a092dbe..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeSessionBean.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeSessionBean -// ================================================================== - [Abstract, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "The CIM_J2eeSessionBean class is a base class that represents " - "specific types of deployed Session beans." )] -class CIM_J2eeSessionBean : CIM_J2eeEJB { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeSessionBeanStats.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeSessionBeanStats.mof deleted file mode 100644 index a8f7adc8..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeSessionBeanStats.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeSessionBeanStats -// ================================================================== - [Abstract, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "The J2eeSessionBeanStats class is a base class that defines " - "the performance statistics that are provided by both stateful " - "and stateless session beans." )] -class CIM_J2eeSessionBeanStats : CIM_J2eeEJBStats { - - [Description ( - "The number of bean instances in the method-ready state." ), - Counter, MappingStrings { - "JSR77.JCP|JSR77.6.14.1.1 getMethodReadyCount|V1.0" }] - uint64 MethodReadyCount; - - [Description ( - "The lowest number of bean instances in the method-ready " - "state since the beginning of the measurement." ), - MappingStrings { - "JSR77.JCP|JSR77.6.7.1.2 getLowWaterMark|V1.0" }] - uint64 MethodReadyLowWaterMark; - - [Description ( - "The highest number of bean instances in the method-ready " - "state since the beginning of the measurement." ), - MappingStrings { - "JSR77.JCP|JSR77.6.7.1.1 getHighWaterMark|V1.0" }] - uint64 MethodReadyHighWaterMark; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeStatefulSessionBean.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeStatefulSessionBean.mof deleted file mode 100644 index 7bef53fa..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeStatefulSessionBean.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeStatefulSessionBean -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "Identifies a deployed stateful session bean within an EJB module." - )] -class CIM_J2eeStatefulSessionBean : CIM_J2eeSessionBean { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeStatefulSessionBeanStats.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeStatefulSessionBeanStats.mof deleted file mode 100644 index 6b2df973..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeStatefulSessionBeanStats.mof +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeStatefulSessionBeanStats -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "The J2eeStatefulSessionBeanStats class defines the performance " - "statistics that are provided by a stateful session bean." )] -class CIM_J2eeStatefulSessionBeanStats : CIM_J2eeSessionBeanStats { - - [Description ( - "The number of bean instances in a passive state." ), - Counter, MappingStrings { - "JSR77.JCP|JSR77.6.15.1.1 getPassiveCount|V1.0" }] - uint64 PassiveCount; - - [Description ( - "The lowest number of bean instances in the passive state " - "since the beginning of the measurement." ), - MappingStrings { - "JSR77.JCP|JSR77.6.7.1.2 getLowWaterMark|V1.0" }] - uint64 PassiveLowWaterMark; - - [Description ( - "The highest number of bean instances in the passive " - "state since the beginning of the measurement." ), - MappingStrings { - "JSR77.JCP|JSR77.6.7.1.1 getHighWaterMark|V1.0" }] - uint64 PassiveHighWaterMark; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeStatelessSessionBean.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeStatelessSessionBean.mof deleted file mode 100644 index b798a1fd..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeStatelessSessionBean.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeStatelessSessionBean -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "Identifies a deployed stateless session bean within an EJB module." - )] -class CIM_J2eeStatelessSessionBean : CIM_J2eeSessionBean { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeStatelessSessionBeanStats.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeStatelessSessionBeanStats.mof deleted file mode 100644 index 8c58c0c8..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeStatelessSessionBeanStats.mof +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeStatelessSessionBeanStats -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "The J2eeStatelessSessionBeanStats class defines the " - "performance statistics that are provided by a stateless " - "session bean." )] -class CIM_J2eeStatelessSessionBeanStats : CIM_J2eeSessionBeanStats { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeStatistic.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeStatistic.mof deleted file mode 100644 index 7b21a6d0..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeStatistic.mof +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeStatistic -// ================================================================== - [Abstract, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "The J2eeStatistic class is a base class that defines the " - "properties that are common to all J2EE statistics. The JSR77 " - "specification defines a set of statistical types, then it " - "defines each J2EE statistic in terms of these types. Since CIM " - "does not support multiple inheritance or embedded objects, the " - "count, time, range, bounded range, and boundary statistics " - "defined have been broken out into individual properties for " - "each statistic that is defined in the JSR77 specification. \n" - "Many of the properties defined for J2EE statistics are " - "inherited from the CIM_StatisticalData class. Some of the " - "inherited properties are CIM dates, which are not consistent " - "with the definitions in the JSR77 specification. In order to " - "minimize implementation differences, methods are defined to " - "provide the dates as specified. Some of the subclasses of " - "CIM_J2EEStatistic do not add any new properties. However, " - "these subclasses were chosen over adding a type property to " - "the superclass because the vendor extensions were likely to " - "result in classes with characteristics distinct enough to " - "warrant the existence of subclasses." )] -class CIM_J2eeStatistic : CIM_StatisticalData { - - - [Description ( - "The time the first measurement was taken represented as " - "a long, whose value is the number of milliseconds since " - "January 1, 1970,00:00:00. This method converts the " - "StartStatisticTime property to the format defined in the " - "JSR77 specification. The related property " - "CIM_StatisticalData.StartStatisticTime represents the " - "same information as a CIMDatetime entity." ), - MappingStrings { "JSR77.JCP|JSR77.6.4.1.4 getStartTime|V1.0" }, - ModelCorrespondence { "CIM_StatisticalData.StartStatisticTime" }] - uint64 GetStartTime( -); - - [Description ( - "The time the most recent measurement was taken " - "represented as a long, whose value is the number of " - "milliseconds since January 1, 1970,00:00:00. This method " - "converts the StatisticTime property to the format " - "defined in the JSR77 specification. The related property " - "CIM_StatisticalData.StatisticTime represents the same " - "information as a CIMDatatime entity." ), - MappingStrings { - "JSR77.JCP|JSR77.6.4.1.5 getLastSampleTime|V1.0" }, - ModelCorrespondence { "CIM_StatisticalData.StatisticTime" }] - uint64 GetLastSampleTime( -); - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeURLResource.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeURLResource.mof deleted file mode 100644 index 21d1a36e..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeURLResource.mof +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeURLResource -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( "CIM_J2eeURLResource identifies a URL resource." )] -class CIM_J2eeURLResource : CIM_J2eeResource { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeURLStats.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeURLStats.mof deleted file mode 100644 index a5a08062..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeURLStats.mof +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeURLStats -// ================================================================== - [Abstract, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServerStats" ), - Description ( - "The CIM_J2eeURLStats class defines the performance statistics " - "that are provided by a URL resource. There are no standard " - "required URL statistics defined by the JSR77 specification. " - "This class may be extended to provide vendor specific URL " - "performance statistics." )] -class CIM_J2eeURLStats : CIM_J2eeStatistic { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_J2eeWebModule.mof b/build/vendor/dmtf_mof/Application/CIM_J2eeWebModule.mof deleted file mode 100644 index 7f9d76fc..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_J2eeWebModule.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_J2eeWebModule -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::J2eeAppServer" ), - Description ( - "CIM_J2eeWebModule identifies a deployed WAR module and is a " - "container for Servlets." )] -class CIM_J2eeWebModule : CIM_J2eeModule { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_MemoryCheck.mof b/build/vendor/dmtf_mof/Application/CIM_MemoryCheck.mof deleted file mode 100644 index 43ce1e3e..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_MemoryCheck.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "MemoryCheck specifies a condition for the minimum amount of " - "memory that needs to be available on a system. The amount is " - "specified in the MemorySize property. The details of this " - "Check are compared with the value of the CIM_OperatingSystem. " - "FreePhysicalMemory property - where the CIM_OperatingSystem " - "object is related (using InstalledOS) to the CIM_Computer " - "System instance that describes the environment. When the value " - "of the FreePhysicalMemory property is greater than or equal to " - "the value specified in MemorySize, the Check is satisfied." )] -class CIM_MemoryCheck : CIM_Check { - - [Description ( - "The amount of memory that needs to exist on a computer " - "system for a SoftwareElement to execute properly." ), - Units ( "KiloBytes" ), - ModelCorrespondence { "CIM_OperatingSystem.FreePhysicalMemory" }, - PUnit ( "byte * 2^10" )] - uint64 MemorySize; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_ModifySettingAction.mof b/build/vendor/dmtf_mof/Application/CIM_ModifySettingAction.mof deleted file mode 100644 index 74d871af..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_ModifySettingAction.mof +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ModifySettingAction -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "This class specifies the information used to modify a " - "\'setting\' file, for a specific entry in the file. The new " - "\'setting\' value is created as a new entry or appends to, " - "replaces, removes from, or deletes the specified entry. All " - "additions are assumed to be case sensitive. Removes are " - "assumed to be case insensitive." )] -class CIM_ModifySettingAction : CIM_Action { - - [Description ( - "This is the key or label of the section of the file to " - "be modified." ), - MaxLen ( 256 )] - string SectionKey; - - [Description ( "Name of setting entry to be modified." ), - MaxLen ( 256 )] - string EntryName; - - [Description ( - "This is the value to add, append, or replace the " - "specified setting." )] - string EntryValue; - - [Description ( "File name of the \'setting\' file." ), - MaxLen ( 1024 )] - string FileName; - - [Description ( - "Type of Action to be performed on the specified setting " - "entry. \n" - "0=Create - Creates the specified entry. \n" - "1=Delete - Deletes the specified entry. \n" - "2=Append - Appends to the end of the specified entry. \n" - "3=Remove - Removes the value from the specified entry." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Create", "Delete", "Append", "Remove" }] - uint16 ActionType; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_OSVersionCheck.mof b/build/vendor/dmtf_mof/Application/CIM_OSVersionCheck.mof deleted file mode 100644 index 5d6b8abf..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_OSVersionCheck.mof +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_OSVersionCheck -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "The OSVersionCheck class specifies the versions of the " - "operating system that can support/execute this Software " - "Element. The operating system itself (whose version should be " - "validated) is defined in the TargetOperatingSystem property of " - "the Check\'s scoping SoftwareElement. \n" - "This Check can be for a specific, minimum, maximum or a range " - "of releases of an OS. To identify a specific version of the " - "OS, the minimum and maximum versions must be the same. To " - "specify a minimum, only the minimum version needs to be " - "defined. To specify a maximum version, only the maximum " - "version needs to be defined. To specify a range, both minimum " - "and maximum versions need to be defined. \n" - "The data gathered from the Check and SoftwareElement objects " - "are compared with the corresponding details found in the " - "CIM_OperatingSystem object (referenced by the InstalledOS " - "association), for the CIM_ComputerSystem object that defines " - "the environment. The OSType property of CIM_OperatingSystem " - "must match the value of CIM_SoftwareElement.TargetOperating " - "System. Also, the OS\' version information should be within " - "the range of CIM_OSVersionCheck.Minimum/MaximumValue " - "properties. Note that all the operating systems on the " - "relevant computer do not need to satisfy the Check." )] -class CIM_OSVersionCheck : CIM_Check { - - [Description ( - "Minimum version of the required operating system. The " - "value is encoded as .. or " - ".." ), - MaxLen ( 64 ), - ModelCorrespondence { "CIM_OperatingSystem.Version" }] - string MinimumVersion; - - [Description ( - "Maximum version of the required operating system. The " - "value is encoded as .. or " - ".." ), - MaxLen ( 64 ), - ModelCorrespondence { "CIM_OperatingSystem.Version" }] - string MaximumVersion; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_OperatingSystemSoftwareFeature.mof b/build/vendor/dmtf_mof/Application/CIM_OperatingSystemSoftwareFeature.mof deleted file mode 100644 index 8c991cbb..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_OperatingSystemSoftwareFeature.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_OperatingSystemSoftwareFeature -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::SystemSoftware" ), - Description ( - "Indicates the SoftwareFeatures that make up the Operating " - "System. The SoftwareFeatures can be part of different " - "Products." )] -class CIM_OperatingSystemSoftwareFeature : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Description ( "The OperatingSystem." )] - CIM_OperatingSystem REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The SoftwareFeatures that make up the OperatingSystem." )] - CIM_SoftwareFeature REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_ProductSoftwareFeatures.mof b/build/vendor/dmtf_mof/Application/CIM_ProductSoftwareFeatures.mof deleted file mode 100644 index d57e3a52..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_ProductSoftwareFeatures.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ProductSoftwareFeatures -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::DeploymentModel" ), - Description ( - "The ProductSoftwareFeatures association identifies the " - "SoftwareFeatures for a particular Product." )] -class CIM_ProductSoftwareFeatures { - - [Key, Aggregate, Min ( 1 ), - Max ( 1 ), - Description ( "The Product that scopes the SoftwareFeatures." )] - CIM_Product REF Product; - - [Key, Weak, Description ( "The SoftwareFeature in a Product." )] - CIM_SoftwareFeature REF Component; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_RebootAction.mof b/build/vendor/dmtf_mof/Application/CIM_RebootAction.mof deleted file mode 100644 index 5ab823ff..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_RebootAction.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RebootAction -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "RebootAction causes a reboot of the computer system that " - "defines the Action\'s environment." )] -class CIM_RebootAction : CIM_Action { - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_RemoveDirectoryAction.mof b/build/vendor/dmtf_mof/Application/CIM_RemoveDirectoryAction.mof deleted file mode 100644 index 578994b1..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_RemoveDirectoryAction.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RemoveDirectoryAction -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "RemoveDirectoryAction removes directories from the computer " - "system that defines the Action\'s environment." )] -class CIM_RemoveDirectoryAction : CIM_DirectoryAction { - - [Description ( - "Boolean property indicating that the directory must be " - "empty in order to be removed. If this condition is not " - "satisfied, then the Invoke methods return an error." )] - boolean MustBeEmpty; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_RemoveFileAction.mof b/build/vendor/dmtf_mof/Application/CIM_RemoveFileAction.mof deleted file mode 100644 index 946e9444..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_RemoveFileAction.mof +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RemoveFileAction -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( "The RemoveFileAction uninstalls files." )] -class CIM_RemoveFileAction : CIM_FileAction { - - [Description ( "The file to be removed." ), - MaxLen ( 1024 )] - string File; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_SettingCheck.mof b/build/vendor/dmtf_mof/Application/CIM_SettingCheck.mof deleted file mode 100644 index e0bc9e0c..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_SettingCheck.mof +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SettingCheck -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "This class specifies information needed to verify a particular " - "\'setting\' file, for a specific entry in the file. The file " - "entry is checked whether it contains or matches the value " - "defined in EntryValue. All compares are assumed to be case " - "insensitive." )] -class CIM_SettingCheck : CIM_Check { - - [Description ( - "Key or label for the section of the file containing the " - "settings to be checked." ), - MaxLen ( 256 )] - string SectionKey; - - [Description ( "Name of the setting entry to be checked." ), - MaxLen ( 256 )] - string EntryName; - - [Description ( "Value to be compared for the named entry." )] - string EntryValue; - - [Description ( - "CheckType specifies how the setting value should be compared." - ), - ValueMap { "0", "1" }, - Values { "Matches", "Contains" }] - uint16 CheckType; - - [Description ( - "File name of the \'setting\' file to be checked." ), - MaxLen ( 1024 )] - string FileName; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_SoftwareElement.mof b/build/vendor/dmtf_mof/Application/CIM_SoftwareElement.mof deleted file mode 100644 index 05e40a62..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_SoftwareElement.mof +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) 2009 DMTF. All Rights Reserved. - [Version ( "2.23.0" ), - UMLPackagePath ( "CIM::Application::DeploymentModel" ), - Description ( - "The CIM_SoftwareElement class is used to decompose a " - "CIM_SoftwareFeature object into a set of individually " - "manageable or deployable parts, for a particular platform. A " - "SoftwareElement\'s platform is uniquely identified by its " - "underlying hardware architecture and operating system (for " - "example Sun Solaris on Sun Sparc or Windows NT on Intel " - "platforms). As such, to understand the details of how the " - "functionality of a particular SoftwareFeature is provided on a " - "particular platform, the CIM_SoftwareElement objects " - "referenced by CIM_SoftwareFeatureSoftwareElements associations " - "are organized in disjoint sets based on the " - "TargetOperatingSystem property. A CIM_SoftwareElement object " - "captures the management details of a part or component in one " - "of four states characterized by the SoftwareElementState " - "property." )] -class CIM_SoftwareElement : CIM_LogicalElement { - - [Key, Override ( "Name" ), - Description ( - "The name used to identify this SoftwareElement." ), - MaxLen ( 256 )] - string Name; - - [Key, Description ( - "Software Version should be in the form " - ".. or " - ".." ), - MaxLen ( 64 ), - MappingStrings { "MIF.DMTF|SubComponent Software |001.4" }] - string Version; - - [Key, Description ( - "The SoftwareElementState is defined in this model to " - "identify various states of a SoftwareElement\'s life " - "cycle. \n" - "- A SoftwareElement in the deployable state describes " - "the details necessary to successfully distribute it and " - "the details (Checks and Actions) required to move it to " - "the installable state (i.e, the next state). \n" - "- A SoftwareElement in the installable state describes " - "the details necessary to successfully install it and the " - "details (Checks and Actions) required to create an " - "element in the executable state (i.e., the next state). \n" - "- A SoftwareElement in the executable state describes " - "the details necessary to successfully start it and the " - "details (Checks and Actions) required to move it to the " - "running state (i.e., the next state). \n" - "- A SoftwareElement in the running state describes the " - "details necessary to manage the started element." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Deployable", "Installable", "Executable", "Running" }] - uint16 SoftwareElementState; - - [Key, Description ( - "This is an identifier for the SoftwareElement and is " - "designed to be used in conjunction with other keys to " - "create a unique representation of the element." ), - MaxLen ( 256 )] - string SoftwareElementID; - - [Key, Description ( - "The TargetOperatingSystem property specifies the " - "element\'s operating system environment. The value of " - "this property does not ensure that it is binary " - "executable. Two other pieces of information are needed. " - "First, the version of the OS needs to be specified using " - "the class, CIM_OSVersion Check. The second piece of " - "information is the architecture that the OS runs on. " - "This information is verified using " - "CIM_ArchitectureCheck. The combination of these " - "constructs clearly identifies the level of OS required " - "for a particular SoftwareElement." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26", "27", - "28", "29", "30", "31", "32", "33", "34", "35", "36", - "37", "38", "39", "40", "41", "42", "43", "44", "45", - "46", "47", "48", "49", "50", "51", "52", "53", "54", - "55", "56", "57", "58", "59", "60", "61", "62", "63", - "64", "65", "66", "67", "68", "69", "70", "71", "72", - "73", "74", "75", "76", "77", "78", "79", "80", "81", - "82", "83", "84", "85", "86", "87", "88", "89", "90", - "91", "92", "93", "94", "95", "96", "97", "98", "99", - "100", "101", "102", "103", "104", "105", "106", "107", - "108", "109", "110" }, - Values { "Unknown", "Other", "MACOS", "ATTUNIX", "DGUX", - "DECNT", "Tru64 UNIX", "OpenVMS", "HPUX", "AIX", - //10 - "MVS", "OS400", "OS/2", "JavaVM", "MSDOS", - "WIN3x", "WIN95", "WIN98", "WINNT", "WINCE", - //20 - "NCR3000", "NetWare", "OSF", "DC/OS", - "Reliant UNIX", "SCO UnixWare", "SCO OpenServer", - "Sequent", "IRIX", "Solaris", //30 - "SunOS", - "U6000", "ASERIES", "HP NonStop OS", "HP NonStop OSS", - "BS2000", "LINUX", "Lynx", "XENIX", "VM", - //40 - "Interactive UNIX", "BSDUNIX", "FreeBSD", - "NetBSD", "GNU Hurd", "OS9", "MACH Kernel", "Inferno", - "QNX", "EPOC", //50 - "IxWorks", "VxWorks", - "MiNT", "BeOS", "HP MPE", "NextStep", "PalmPilot", - "Rhapsody", "Windows 2000", "Dedicated", - //60 - "OS/390", "VSE", "TPF", "Windows (R) Me", - "Caldera Open UNIX", "OpenBSD", "Not Applicable", - "Windows XP", "z/OS", "Microsoft Windows Server 2003", - //70 - "Microsoft Windows Server 2003 64-Bit", - "Windows XP 64-Bit", "Windows XP Embedded", - "Windows Vista", "Windows Vista 64-Bit", - "Windows Embedded for Point of Service", - "Microsoft Windows Server 2008", - "Microsoft Windows Server 2008 64-Bit", "FreeBSD 64-Bit", - "RedHat Enterprise Linux", - //80 - "RedHat Enterprise Linux 64-Bit", - "Solaris 64-Bit", "SUSE", "SUSE 64-Bit", "SLES", - "SLES 64-Bit", "Novell OES", "Novell Linux Desktop", - "Sun Java Desktop System", "Mandriva", - //90 - "Mandriva 64-Bit", "TurboLinux", - "TurboLinux 64-Bit", "Ubuntu", "Ubuntu 64-Bit", "Debian", - "Debian 64-Bit", "Linux 2.4.x", "Linux 2.4.x 64-Bit", - "Linux 2.6.x", //100 - "Linux 2.6.x 64-Bit", - "Linux 64-Bit", "Other 64-Bit", - "Microsoft Windows Server 2008 R2", "VMware ESXi", - "Microsoft Windows 7", "CentOS 32-bit", "CentOS 64-bit", - "Oracle Enterprise Linux 32-bit", - "Oracle Enterprise Linux 64-bit", - //110 - "eComStation 32-bitx" }, - MappingStrings { "MIF.DMTF|SubComponent Software|001.8" }, - ModelCorrespondence { "CIM_OperatingSystem.OSType" }] - uint16 TargetOperatingSystem; - - [Description ( - "The OtherTargetOS property records the manufacturer and " - "operating system type for a SoftwareElement when the " - "TargetOperatingSystem property has a value of 1 " - "(\"Other\"). For all other values of " - "TargetOperatingSystem, the OtherTargetOS property is " - "NULL." ), - MaxLen ( 64 ), - ModelCorrespondence { - "CIM_OperatingSystem.OtherTypeDescription" }] - string OtherTargetOS; - - [Description ( "Manufacturer of this SoftwareElement." ), - MaxLen ( 256 ), - MappingStrings { "MIF.DMTF|SubComponent Software|001.3" }] - string Manufacturer; - - [Description ( - "The internal identifier for this compilation of SoftwareElement." - ), - MaxLen ( 64 ), - MappingStrings { - "MIF.DMTF|Software Component Information|002.4" }] - string BuildNumber; - - [Description ( - "The assigned serial number of this SoftwareElement." ), - MaxLen ( 64 ), - MappingStrings { "MIF.DMTF|ComponentID|001.4" }] - string SerialNumber; - - [Description ( - "The code set used by this SoftwareElement. It defines " - "the bit patterns that a system uses to identify " - "characters. ISO defines various code sets such as UTF-8 " - "and ISO8859-1." ), - MaxLen ( 64 )] - string CodeSet; - - [Description ( - "The manufacturer\'s identifier for this SoftwareElement. " - "Often this will be a stock keeping unit (SKU) or a part " - "number." ), - MaxLen ( 64 ), - MappingStrings { "MIF.DMTF|SubComponent Software|001.6" }] - string IdentificationCode; - - [Description ( - "The value of this property identifies the language " - "edition of this SoftwareElement. The language codes " - "defined in ISO 639 should be used. Where the element " - "represents a multi-lingual or international version, the " - "string \"Multilingual\" should be used." ), - MaxLen ( 32 ), - MappingStrings { "MIF.DMTF|SubComponent Software|001.7" }] - string LanguageEdition; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_SoftwareElementActions.mof b/build/vendor/dmtf_mof/Application/CIM_SoftwareElementActions.mof deleted file mode 100644 index 7bfb43a6..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_SoftwareElementActions.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SoftwareElementActions -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "This association identifies the Actions for a Software Element." )] -class CIM_SoftwareElementActions { - - [Key, Aggregate, Min ( 1 ), - Max ( 1 ), - Description ( "The element that scopes the Action." )] - CIM_SoftwareElement REF Element; - - [Key, Weak, Description ( - "The software Action to move or uninstall a SoftwareElement." - )] - CIM_Action REF Action; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_SoftwareElementChecks.mof b/build/vendor/dmtf_mof/Application/CIM_SoftwareElementChecks.mof deleted file mode 100644 index 07ba8d87..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_SoftwareElementChecks.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SoftwareElementChecks -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "This association ties a SoftwareElement to a specific Check to " - "validate its state or its movement to the next state. Note " - "that SoftwareElements in a running state cannot transition to " - "another state. Therefore, the value of the Phase property is " - "restricted to 0 (\"In-State\") for SoftwareElements in the " - "running state." )] -class CIM_SoftwareElementChecks { - - [Key, Aggregate, Min ( 1 ), - Max ( 1 ), - Description ( "The SoftwareElement being checked." )] - CIM_SoftwareElement REF Element; - - [Key, Weak, Description ( "The Check for the element." )] - CIM_Check REF Check; - - [Description ( - "The Phase property indicates whether the referenced " - "Check is an in-state or a next-state Check." ), - ValueMap { "0", "1" }, - Values { "In-State", "Next-State" }] - uint16 Phase; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_SoftwareElementComponent.mof b/build/vendor/dmtf_mof/Application/CIM_SoftwareElementComponent.mof deleted file mode 100644 index 246b3bb3..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_SoftwareElementComponent.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SoftwareElementComponent -// ================================================================== - [Association, Aggregation, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::DeploymentModel" ), - Description ( - "SoftwareElements may have an arbitrarily complex hierarchy. " - "SoftwareElementComponent is used to construct that hierarchy. " - "It should not be used to represent dependency." )] -class CIM_SoftwareElementComponent : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The parent element in the association." )] - CIM_SoftwareElement REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The child element in the association." )] - CIM_SoftwareElement REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_SoftwareElementSAPImplementation.mof b/build/vendor/dmtf_mof/Application/CIM_SoftwareElementSAPImplementation.mof deleted file mode 100644 index 5eabf989..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_SoftwareElementSAPImplementation.mof +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SoftwareElementSAPImplementation -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::DeploymentModel" ), - Description ( - "An association between a ServiceAccessPoint and how it is " - "implemented by one or more executable SoftwareElements. Note " - "that this association is restricted to \'executable\' " - "Elements. In earlier phases of deployment, the Software " - "FeatureSAPImplementation association is adequate and " - "recommended. \n" - "The relationship between this association and Software " - "FeatureSAPImplementation is more fully described here. " - "SoftwareElementSAPImplementation allows the description of " - "greater granularity than SoftwareFeatureSAPImplementation, " - "when a SoftwareFeature is fully deployed and results in " - "several executable Elements. These Elements may implement " - "several different ServiceAccessPoints. \n" - "Since SoftwareFeatures decompose into SoftwareElements, it is " - "possible to describe how software implements a SAP by using " - "either this association or the SoftwareFeatureSAP " - "Implementation relationship. One or the other should be " - "chosen. Both associations should not be used for a particular " - "AccessPoint, since their information is redundant. \n" - "This relationship is especially important when the " - "SoftwareFeature and Product aspects are not described for a " - "SoftwareElement (ie, when the acquisition and deployment of " - "the software is not detailed). In this case, the Software " - "ElementSAPImplementation association is the only one available " - "to describe how an AccessPoint is implemented in software. " - "Since SoftwareFeatures are not instantiated, it is not " - "possible to use the SoftwareFeatureSAP Implementation " - "association. \n" - "The cardinality of this association is many-to-many. A " - "ServiceAccessPoint may be provided by more than one Software " - "Element. (If this is true, it is assumed that the Software " - "Elements operate in conjunction.) And, any SoftwareElement may " - "provide more than one SAP." )] -class CIM_SoftwareElementSAPImplementation : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "The executable SoftwareElement implementing the SAP." )] - CIM_SoftwareElement REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The ServiceAccessPoint implemented by the SoftwareElement." - )] - CIM_ServiceAccessPoint REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_SoftwareElementServiceImplementation.mof b/build/vendor/dmtf_mof/Application/CIM_SoftwareElementServiceImplementation.mof deleted file mode 100644 index 91f0c879..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_SoftwareElementServiceImplementation.mof +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SoftwareElementServiceImplementation -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::DeploymentModel" ), - Description ( - "An association between a Service and how it is implemented by " - "one or more executable SoftwareElements. Note that this " - "association is restricted to \'executable\' Elements. In " - "earlier phases of deployment, the SoftwareFeatureService " - "Implementation association is adequate and recommended. \n" - "The relationship between this association and Software " - "FeatureServiceImplementation is more fully described here. " - "SoftwareElementServiceImplementation allows the description of " - "greater granularity than SoftwareFeatureService " - "Implementation, when a SoftwareFeature is fully deployed and " - "results in several executable Elements. These Elements may " - "implement several different Services. \n" - "Since SoftwareFeatures decompose into SoftwareElements, it is " - "possible to describe how software implements a Service by " - "using either this association or the SoftwareFeature " - "ServiceImplementation relationship. One or the other should be " - "chosen. Both associations should not be used for a single " - "Service instance, since their information is redundant. \n" - "This relationship is especially important when the " - "SoftwareFeature and Product aspects are not described for a " - "SoftwareElement (ie, when the acquisition and deployment of " - "the software is not detailed). In this case, the Software " - "ElementServiceImplementation association is the only one " - "available to describe how a Service is implemented in " - "software. Since SoftwareFeatures are not instantiated, it is " - "not possible to use the SoftwareFeatureService Implementation " - "association. \n" - "The cardinality of this association is many-to-many. A Service " - "may be provided by more than one SoftwareElement. If this is " - "true, it is assumed that the SoftwareElements operate in " - "conjunction. And, any SoftwareElement may provide more than " - "one Service." )] -class CIM_SoftwareElementServiceImplementation : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "The executable SoftwareElement implementing the Service." )] - CIM_SoftwareElement REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The Service implemented by the SoftwareElement." )] - CIM_Service REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_SoftwareElementVersionCheck.mof b/build/vendor/dmtf_mof/Application/CIM_SoftwareElementVersionCheck.mof deleted file mode 100644 index 4a3e0d7d..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_SoftwareElementVersionCheck.mof +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) 2009 DMTF. All Rights Reserved. - [Version ( "2.23.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "SoftwareElementVersionCheck specifies the release of a " - "SoftwareElement that must exist in the environment. This Check " - "can be for a specific, minimum, maximum or a range of " - "versions. To specify a specific version, the lower and upper " - "versions must be the same. To specify a minimum, only the " - "lower version needs to be defined. To specify a maximum " - "version, only the upper version needs to be defined. To " - "specify a range, both upper and lower versions need to be " - "defined. The details of this Check are compared with the " - "corresponding details found in a CIM_SoftwareElement object, " - "associated to the CIM_ComputerSystem instance that describes " - "the environment (related by the association, " - "CIM_InstalledSoftwareElement). There should be at least one " - "CIM_SoftwareElement that satisfies the details of the Check. " - "In other words, all the SoftwareElements on the relevant " - "computer system do not need to satisfy the Check." )] -class CIM_SoftwareElementVersionCheck : CIM_Check { - - [Description ( - "The name of the SoftwareElement being checked." ), - MaxLen ( 256 ), - ModelCorrespondence { "CIM_SoftwareElement.Name" }] - string SoftwareElementName; - - [Description ( - "The minimum version of the SoftwareElement being checked." ), - MaxLen ( 64 ), - ModelCorrespondence { "CIM_SoftwareElement.Version" }] - string LowerSoftwareElementVersion; - - [Description ( - "The maximum version of the SoftwareElement being checked." ), - MaxLen ( 64 ), - ModelCorrespondence { "CIM_SoftwareElement.Version" }] - string UpperSoftwareElementVersion; - - [Description ( - "The state of the SoftwareElement being checked." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Deployable", "Installable", "Executable", "Running" }, - ModelCorrespondence { - "CIM_SoftwareElement.SoftwareElementState" }] - uint16 SoftwareElementStateDesired; - - [Description ( - "The target operating system of the SoftwareElement being checked." - ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26", "27", - "28", "29", "30", "31", "32", "33", "34", "35", "36", - "37", "38", "39", "40", "41", "42", "43", "44", "45", - "46", "47", "48", "49", "50", "51", "52", "53", "54", - "55", "56", "57", "58", "59", "60", "61", "62", "63", - "64", "65", "66", "67", "68", "69", "70", "71", "72", - "73", "74", "75", "76", "77", "78", "79", "80", "81", - "82", "83", "84", "85", "86", "87", "88", "89", "90", - "91", "92", "93", "94", "95", "96", "97", "98", "99", - "100", "101", "102", "103", "104", "105", "106", "107", - "108", "109", "110" }, - Values { "Unknown", "Other", "MACOS", "ATTUNIX", "DGUX", - "DECNT", "Tru64 UNIX", "OpenVMS", "HPUX", "AIX", - //10 - "MVS", "OS400", "OS/2", "JavaVM", "MSDOS", - "WIN3x", "WIN95", "WIN98", "WINNT", "WINCE", - //20 - "NCR3000", "NetWare", "OSF", "DC/OS", - "Reliant UNIX", "SCO UnixWare", "SCO OpenServer", - "Sequent", "IRIX", "Solaris", //30 - "SunOS", - "U6000", "ASERIES", "HP NonStop OS", "HP NonStop OSS", - "BS2000", "LINUX", "Lynx", "XENIX", "VM", - //40 - "Interactive UNIX", "BSDUNIX", "FreeBSD", - "NetBSD", "GNU Hurd", "OS9", "MACH Kernel", "Inferno", - "QNX", "EPOC", //50 - "IxWorks", "VxWorks", - "MiNT", "BeOS", "HP MPE", "NextStep", "PalmPilot", - "Rhapsody", "Windows 2000", "Dedicated", - //60 - "OS/390", "VSE", "TPF", "Windows (R) Me", - "Caldera Open UNIX", "OpenBSD", "Not Applicable", - "Windows XP", "z/OS", "Microsoft Windows Server 2003", - //70 - "Microsoft Windows Server 2003 64-Bit", - "Windows XP 64-Bit", "Windows XP Embedded", - "Windows Vista", "Windows Vista 64-Bit", - "Windows Embedded for Point of Service", - "Microsoft Windows Server 2008", - "Microsoft Windows Server 2008 64-Bit", "FreeBSD 64-Bit", - "RedHat Enterprise Linux", - //80 - "RedHat Enterprise Linux 64-Bit", - "Solaris 64-Bit", "SUSE", "SUSE 64-Bit", "SLES", - "SLES 64-Bit", "Novell OES", "Novell Linux Desktop", - "Sun Java Desktop System", "Mandriva", - //90 - "Mandriva 64-Bit", "TurboLinux", - "TurboLinux 64-Bit", "Ubuntu", "Ubuntu 64-Bit", "Debian", - "Debian 64-Bit", "Linux 2.4.x", "Linux 2.4.x 64-Bit", - "Linux 2.6.x", //100 - "Linux 2.6.x 64-Bit", - "Linux 64-Bit", "Other 64-Bit", - "Microsoft Windows Server 2008 R2", "VMware ESXi", - "Microsoft Windows 7", "CentOS 32-bit", "CentOS 64-bit", - "Oracle Enterprise Linux 32-bit", - "Oracle Enterprise Linux 64-bit", - //110 - "eComStation 32-bitx" }, - ModelCorrespondence { - "CIM_SoftwareElement.TargetOperatingSystem" }] - uint16 TargetOperatingSystemDesired; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_SoftwareFeature.mof b/build/vendor/dmtf_mof/Application/CIM_SoftwareFeature.mof deleted file mode 100644 index 6cd08ee9..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_SoftwareFeature.mof +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SoftwareFeature -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::DeploymentModel" ), - Description ( - "The CIM_SoftwareFeature class defines a particular function or " - "capability of a product or application system. This class " - "captures a level of granularity describing a unit of " - "installation, rather than the units that reflect how the " - "product is built or packaged. The latter detail is captured " - "using a CIM_SoftwareElement class. When a SoftwareFeature can " - "exist on multiple platforms or operating systems (for example, " - "a client component of a three tiered client/server application " - "that runs on Solaris, Windows NT, and Windows 95), the Feature " - "is a collection of all the SoftwareElements for these " - "different platforms. In this case, the users of the model must " - "be aware of this situation since typically they will be " - "interested in a sub-collection of the SoftwareElements " - "required for a particular platform. \n" - "SoftwareFeatures are always defined in the context of a " - "CIM_Product, using the CIM_ProductSoftwareFeature association. " - "Features are delivered through Products. Optionally, " - "SoftwareFeatures from one or more Products can be organized " - "into ApplicationSystems using the " - "CIM_ApplicationSystemSoftwareFeature association." )] -class CIM_SoftwareFeature : CIM_LogicalElement { - - [Key, Description ( "The scoping Product\'s identification." ), - MaxLen ( 64 ), - Propagated ( "CIM_Product.IdentifyingNumber" )] - string IdentifyingNumber; - - [Key, Description ( - "The scoping Product\'s commonly used name." ), - MaxLen ( 256 ), - Propagated ( "CIM_Product.Name" )] - string ProductName; - - [Key, Description ( "The scoping Product\'s supplier." ), - MaxLen ( 256 ), - Propagated ( "CIM_Product.Vendor" )] - string Vendor; - - [Key, Description ( "The scoping Product\'s version." ), - MaxLen ( 64 ), - Propagated ( "CIM_Product.Version" )] - string Version; - - [Key, Override ( "Name" ), - Description ( - "The Name property defines the unique label by which the " - "SoftwareFeature is identified. This label should be a " - "human-readable name that uniquely identifies the element " - "in the context of the element\'s namespace." ), - MaxLen ( 256 )] - string Name; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_SoftwareFeatureComponent.mof b/build/vendor/dmtf_mof/Application/CIM_SoftwareFeatureComponent.mof deleted file mode 100644 index 351e1e47..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_SoftwareFeatureComponent.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SoftwareFeatureComponent -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::DeploymentModel" ), - Description ( - "The SoftwareFeatureComponent aggregation models a set of " - "subordinate or independent Software Features of a Product. " - "These are aggregated together to form a higher-level or large " - "grain Feature under the same Product." )] -class CIM_SoftwareFeatureComponent : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Description ( "The parent SoftwareFeature." )] - CIM_SoftwareFeature REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The component SoftwareFeature." )] - CIM_SoftwareFeature REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_SoftwareFeatureSAPImplementation.mof b/build/vendor/dmtf_mof/Application/CIM_SoftwareFeatureSAPImplementation.mof deleted file mode 100644 index b10e468d..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_SoftwareFeatureSAPImplementation.mof +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SoftwareFeatureSAPImplementation -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::DeploymentModel" ), - Description ( - "An association between a ServiceAccessPoint and how it is " - "implemented in software. The cardinality of this association " - "is many-to-many. A SAP may be provided by more than one " - "SoftwareFeature. When multiple SoftwareFeatures are associated " - "with a single SAP, it is assumed that these elements operate " - "in conjunction to provide the AccessPoint. Note that any " - "SoftwareFeature may provide more than one ServiceAccessPoint. \n" - "If different implementations of a SAP exist, each of these " - "implementations would result in individual instantiations of " - "the ServiceAccessPoint object. These individual instantiations " - "would then have their own associations to the unique " - "implementations." )] -class CIM_SoftwareFeatureSAPImplementation : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The SoftwareFeature implementing the SAP." )] - CIM_SoftwareFeature REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The AccessPoint being implemented." )] - CIM_ServiceAccessPoint REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_SoftwareFeatureServiceImplementation.mof b/build/vendor/dmtf_mof/Application/CIM_SoftwareFeatureServiceImplementation.mof deleted file mode 100644 index df1de358..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_SoftwareFeatureServiceImplementation.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SoftwareFeatureServiceImplementation -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::DeploymentModel" ), - Description ( - "An association between a Service and how it is implemented in " - "software. The cardinality of this association is many-to " - "-many. A Service may be provided by more than one " - "SoftwareFeature. When multiple SoftwareFeatures are associated " - "with a single Service, it is assumed that these elements " - "operate in conjunction to provide the Service. Note that any " - "SoftwareFeature may provide more than one Service. \n" - "If different implementations of a Service exist, each of these " - "implementations would result in individual instantiations of " - "the Service object. These individual instantiations would then " - "have their own associations to the unique implementations." )] -class CIM_SoftwareFeatureServiceImplementation : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The SoftwareFeature implementing the Service." )] - CIM_SoftwareFeature REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The Service being implemented." )] - CIM_Service REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_SoftwareFeatureSoftwareElements.mof b/build/vendor/dmtf_mof/Application/CIM_SoftwareFeatureSoftwareElements.mof deleted file mode 100644 index c493c050..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_SoftwareFeatureSoftwareElements.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SoftwareFeatureSoftwareElements -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::DeploymentModel" ), - Description ( - "SoftwareFeatureSoftwareElements identifies the Software " - "Elements that make up a particular SoftwareFeature." )] -class CIM_SoftwareFeatureSoftwareElements : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Description ( - "The SoftwareFeature that groups the SoftwareElement." )] - CIM_SoftwareFeature REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The SoftwareElement that makes up the Feature." )] - CIM_SoftwareElement REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_StatisticalRuntimeOverview.mof b/build/vendor/dmtf_mof/Application/CIM_StatisticalRuntimeOverview.mof deleted file mode 100644 index 221da94e..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_StatisticalRuntimeOverview.mof +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Application::AppRuntime" ), - Description ( - "This class represents statistical data and metrics that " - "characterize the application as a whole. It exists only once " - "per application system instance and provides primarily raw " - "data for the monitoring of service levels. Therefore, the " - "metrics presented are only a summary or overview of the " - "application system behavior at a certain point of time. " - "Instances are only available if the concerned application is " - "running. Therefore, an instance of ApplicationSystem MUST " - "exist when the instance of this class is created." )] -class CIM_StatisticalRuntimeOverview : CIM_StatisticalData { - - [Description ( - "The point in time (date and time) when the most recent " - "inbound activity was observed for the application. A " - "value of all zeros indicates that no inbound activity " - "has taken place since the application was started." )] - datetime LastActivity; - - [Description ( - "The number of requests currently being served. This is " - "not the count of open connections! Very often it " - "reflects the number of current user requests. Note that " - "the semantics of a request are general enough to " - "characterize the entire application system." ), - Counter] - uint32 NumberOfActiveRequests; - - [Description ( - "The number of active requestors in the application " - "system. It may differ from the number of active requests " - "(greater if a requestor has issued multiple requests, " - "smaller if some of the requestors have no request " - "running at the considered point in time). Very often it " - "reflects the number of user logged on to the application " - "system or the number of sessions being served by the " - "system. \n" - "Note that the semantics of a requestor are general " - "enough to characterize the entire application system." ), - Counter] - uint32 NumberOfActiveRequestors; - - [Description ( - "The average response time is the mean of a number of " - "requests captured between StatisticTime and a close " - "point in time in the past. This interval or duration, " - "that the average depends on, is defined by the " - "underlying implementation such that it still has a " - "reasonable proximity to one point in time. The term " - "average is not focused on averaging a number of requests " - "but averaging a period of time. Therefore, the average " - "does not relate to more than a couple of minutes and, " - "consequently, AverageResponseTime has the notion of the " - "response time at the point in time of StatisticTime. If " - "the interval is too great, AverageResponseTime becomes " - "meaningless for monitoring. If no response time can be " - "determined, the value is 0." ), - Units ( "MilliSeconds" ), - PUnit ( "second * 10^-3" )] - uint32 AverageResponseTime; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_SwapSpaceCheck.mof b/build/vendor/dmtf_mof/Application/CIM_SwapSpaceCheck.mof deleted file mode 100644 index 6fc33873..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_SwapSpaceCheck.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "SwapSpaceCheck specifies the amount of swap space that needs " - "to be available on the computer system. The amount is " - "specified in the SwapSpaceSize property. The details of this " - "Check are compared with the value of the CIM_OperatingSystem. " - "TotalSwapSpaceSize property - where the CIM_OperatingSystem " - "object is related (using RunningOS) to the CIM_Computer System " - "instance that describes the environment. When the value of " - "TotalSwapSpaceSize property is greater than or equal to the " - "value specified in SwapSpaceSize, the Check is satisfied." )] -class CIM_SwapSpaceCheck : CIM_Check { - - [Description ( - "The SwapSpaceSize property specifies the minimum number " - "of KiloBytes of swap space that needs to be available on " - "the target system." ), - Units ( "KiloBytes" ), - ModelCorrespondence { "CIM_OperatingSystem.TotalSwapSpaceSize" }, - PUnit ( "byte * 10^3" )] - uint64 SwapSpaceSize; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_SystemBIOS.mof b/build/vendor/dmtf_mof/Application/CIM_SystemBIOS.mof deleted file mode 100644 index 5be2dfd0..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_SystemBIOS.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SystemBIOS -// ================================================================== - [Association, Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Application::BIOS" ), - Description ( - "SystemBIOS associates a UnitaryComputerSystem\'s BIOS with the " - "System itself." )] -class CIM_SystemBIOS : CIM_SystemComponent { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( "The ComputerSystem that boots from the BIOS." )] - CIM_ComputerSystem REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The System\'s BIOS." )] - CIM_BIOSElement REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_ToDirectoryAction.mof b/build/vendor/dmtf_mof/Application/CIM_ToDirectoryAction.mof deleted file mode 100644 index aa02f91d..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_ToDirectoryAction.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ToDirectoryAction -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "The ToDirectoryAction association identifies the target " - "directory for a FileAction. When this association is used, the " - "assumption is that the target directory was created by a " - "previous Action. This association cannot co-exist with a " - "ToDirectorySpecification association, since a FileAction can " - "only involve a single target directory." )] -class CIM_ToDirectoryAction { - - [Key, Max ( 1 ), - Description ( "The destination directory of the Action." )] - CIM_DirectoryAction REF DestinationDirectory; - - [Key, Description ( "The Action against the directory." )] - CIM_CopyFileAction REF FileName; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_ToDirectorySpecification.mof b/build/vendor/dmtf_mof/Application/CIM_ToDirectorySpecification.mof deleted file mode 100644 index af2e92dd..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_ToDirectorySpecification.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ToDirectorySpecification -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "The ToDirectorySpecification association identifies the target " - "directory for a FileAction. When this association is used, the " - "assumption is that the target directory already exists. This " - "association cannot co-exist with a ToDirectoryAction " - "association, since a FileAction can only involve a single " - "target directory." )] -class CIM_ToDirectorySpecification { - - [Key, Max ( 1 ), - Description ( "The destination directory of the Action." )] - CIM_DirectorySpecification REF DestinationDirectory; - - [Key, Description ( "The Action against the directory." )] - CIM_CopyFileAction REF FileName; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_VersionCompatibilityCheck.mof b/build/vendor/dmtf_mof/Application/CIM_VersionCompatibilityCheck.mof deleted file mode 100644 index b55a275e..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_VersionCompatibilityCheck.mof +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_VersionCompatibilityCheck -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::CheckAction" ), - Description ( - "The VersionCompatibilityCheck class specifies whether it is " - "permissible to create the next state of a SoftwareElement." )] -class CIM_VersionCompatibilityCheck : CIM_Check { - - [Description ( - "The AllowDownVersion property indicates that this " - "Software Element can transition to its next state even " - "if a higher or later version of the element already " - "exists in the environment." )] - boolean AllowDownVersion; - - [Description ( - "The AllowMultipleVersions option controls the ability to " - "configure multiple versions of a SoftwareElement on a " - "system." )] - boolean AllowMultipleVersions; - - [Description ( - "The Reinstall property indicates that this " - "SoftwareElement can transition to its next state even if " - "an element of the same version already exists in the " - "environment." )] - boolean Reinstall; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_VideoBIOSElement.mof b/build/vendor/dmtf_mof/Application/CIM_VideoBIOSElement.mof deleted file mode 100644 index 59be4555..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_VideoBIOSElement.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_VideoBIOSElement -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::BIOS" ), - Description ( - "VideoBIOSElement represents the low-level software that is " - "loaded into non-volatile storage and used to bring up, " - "configure and access a ComputerSystem\'s VideoController and " - "Display." )] -class CIM_VideoBIOSElement : CIM_SoftwareElement { - - [Override ( "Version" ), - MappingStrings { "MIF.DMTF|Video BIOS|001.3" }] - string Version; - - [Override ( "Manufacturer" ), - MappingStrings { "MIF.DMTF|Video BIOS|001.2" }] - string Manufacturer; - - [Description ( - "If true, indicates that the Video BIOS is shadowed." ), - MappingStrings { "MIF.DMTF|Video BIOS|001.5" }] - boolean IsShadowed; - - [Description ( "Date that this BIOS was released." ), - MappingStrings { "MIF.DMTF|Video BIOS|001.4" }] - datetime ReleaseDate; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_VideoBIOSFeature.mof b/build/vendor/dmtf_mof/Application/CIM_VideoBIOSFeature.mof deleted file mode 100644 index b77ad878..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_VideoBIOSFeature.mof +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_VideoBIOSFeature -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::BIOS" ), - Description ( - "VideoBIOSFeature represents the capabilities of the low-level " - "software that is used to bring up, configure and use a " - "ComputerSystem\'s VideoController and Display." )] -class CIM_VideoBIOSFeature : CIM_SoftwareFeature { - - [Description ( - "An array of integers that specify the features supported " - "by the VideoBIOS. For example, one could indicate " - "support for VESA power management (value=6) or video " - "BIOS shadowing (8). The value, 3, is not valid in the " - "CIM Schema since in DMI it represents that no BIOS " - "Features are supported. In this case, the object should " - "not be instantiated." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9" }, - Values { "Other", "Unknown", "Undefined", - "Standard Video BIOS", "VESA BIOS Extensions Supported", - "VESA Power Management Supported", - "VESA Display Data Channel Supported", - "Video BIOS Shadowing Allowed", "Video BIOS Upgradeable" }, - ArrayType ( "Indexed" ), - MappingStrings { "MIF.DMTF|Video BIOS Characteristic|001.3" }, - ModelCorrespondence { - "CIM_VideoBIOSFeature.CharacteristicDescriptions" }] - uint16 Characteristics[]; - - [Description ( - "An array of free-form strings providing more detailed " - "explanations for any of the VideoBIOS features indicated " - "in the Characteristics array. Note, each entry of this " - "array is related to the entry in the Characteristics " - "array that is located at the same index." ), - ArrayType ( "Indexed" ), - MappingStrings { "MIF.DMTF|Video BIOS Characteristic|001.4" }, - ModelCorrespondence { "CIM_VideoBIOSFeature.Characteristics" }] - string CharacteristicDescriptions[]; - - -}; diff --git a/build/vendor/dmtf_mof/Application/CIM_VideoBIOSFeatureVideoBIOSElements.mof b/build/vendor/dmtf_mof/Application/CIM_VideoBIOSFeatureVideoBIOSElements.mof deleted file mode 100644 index ef885feb..00000000 --- a/build/vendor/dmtf_mof/Application/CIM_VideoBIOSFeatureVideoBIOSElements.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_VideoBIOSFeatureVideoBIOSElements -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Application::BIOS" ), - Description ( - "A link between VideoBIOSFeature and its aggregated VideoBIOSElements." - )] -class CIM_VideoBIOSFeatureVideoBIOSElements : CIM_SoftwareFeatureSoftwareElements { - - [Aggregate, Override ( "GroupComponent" ), - Description ( "The VideoBIOSFeature." )] - CIM_VideoBIOSFeature REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The VideoBIOSElement that implements the capabilities " - "described by VideoBIOSFeature." )] - CIM_VideoBIOSElement REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ActiveConnection.mof b/build/vendor/dmtf_mof/Core/CIM_ActiveConnection.mof deleted file mode 100644 index 968edde1..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ActiveConnection.mof +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ActiveConnection -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Service" ), - Description ( - "This association defines a connection that is currently " - "communicating, or is configured to communicate, between two " - "ServiceAccessPoints. It is used when the connection is not " - "treated as a ManagedElement itself (that is, with Status, " - "statistics, and so on), but its existence is known. The SAPs " - "that are connected are typically at the same networking or " - "application layer." )] -class CIM_ActiveConnection : CIM_SAPSAPDependency { - - [Override ( "Antecedent" ), - Description ( - "A ServiceAccessPoint that is configured to communicate " - "or is actively communicating with the Dependent SAP. In " - "a unidirectional connection, this SAP is the one that is " - "transmitting." )] - CIM_ServiceAccessPoint REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "A second ServiceAccessPoint that is configured to " - "communicate or is actively communicating with the " - "Antecedent SAP. In a unidirectional connection, this SAP " - "is the one that is receiving the communication." )] - CIM_ServiceAccessPoint REF Dependent; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this element is deprecated because it " - "is incorrectly placed on the association. Unicast, " - "broadcast, or other traffic types are not a function of " - "the connection between the referenced endpoints, but " - "rather are a function of the addressing, protocol and " - "basic functionality of the endpoints. \n" - "Deprecated description: The type of traffic that is " - "carried over this connection." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "Unicast", "Broadcast", - "Multicast", "Anycast" }, - ModelCorrespondence { - "CIM_ActiveConnection.OtherTrafficDescription" }] - uint16 TrafficType; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this element is deprecated because it " - "is incorrectly placed on the association. Unicast, " - "broadcast, or other traffic types are not a function of " - "the connection between the referenced endpoints, but " - "rather are a function of the addressing, protocol and " - "basic functionality of the endpoints. \n" - "Deprecated description: A string that describes the type " - "of traffic that is being carried over this instance when " - "its Type property is set, for example, to 1 (Other)." ), - MaxLen ( 64 ), - ModelCorrespondence { "CIM_ActiveConnection.TrafficType" }] - string OtherTrafficDescription; - - [Description ( - "TRUE means that this connection is unidirectional; FALSE " - "means that this connection is bidirectional. When the " - "connection is unidirectional, the \"speaker\" should be " - "defined as the Antecedent reference. In a bidirectional " - "connection, the selection of which AccessPoint is the " - "Antecedent or Dependent is immaterial." )] - boolean IsUnidirectional; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ActsAsSpare.mof b/build/vendor/dmtf_mof/Core/CIM_ActsAsSpare.mof deleted file mode 100644 index 76490e36..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ActsAsSpare.mof +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Deprecated -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ActsAsSpare -// ================================================================== - [Association, Deprecated { "CIM_IsSpare" }, - Version ( "2.8.1000" ), - UMLPackagePath ( "CIM::Core::Redundancy" ), - Description ( - "The ActsAsSpare association indicates which elements can spare " - "or replace the other aggregated elements. The fact that a " - "spare can operate in \"hot standby\" mode is specified on an " - "element by element basis. \n" - "The use of this class is being deprecated in lieu of using the " - "IsSpare relationship." )] -class CIM_ActsAsSpare { - - [Deprecated { "CIM_IsSpare.Dependent" }, - Key, Description ( "The SpareGroup." )] - CIM_SpareGroup REF Group; - - [Deprecated { "CIM_IsSpare.Antecedent" }, - Key, Description ( - "A ManagedSystemElement acting as a spare and " - "participating in the SpareGroup." )] - CIM_ManagedSystemElement REF Spare; - - [Deprecated { "CIM_IsSpare.SpareStatus" }, - Description ( - "HotStandby is a boolean indicating that the spare is " - "operating as a hot standby." )] - boolean HotStandby; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_AdminDomain.mof b/build/vendor/dmtf_mof/Core/CIM_AdminDomain.mof deleted file mode 100644 index f63c9c92..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_AdminDomain.mof +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AdminDomain -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::CoreElements" ), - Description ( - "This is a special grouping of ManagedSystemElements. The " - "grouping is viewed as a single entity, reflecting that all of " - "its components are administered similarly, either by the same " - "user, group of users, or policy. It serves as an aggregation " - "point to associate one or more of the following elements: " - "network devices, such as routers and switches, servers, and " - "other resources that can be accessed by end systems. This " - "grouping of devices plays an essential role in ensuring that " - "the same administrative policy and actions are applied to all " - "of the devices in the grouping. The specific behavior and/or " - "semantics of the AdminDomain can be identified through its " - "aggregated and associated entities." )] -class CIM_AdminDomain : CIM_System { - - [Override ( "NameFormat" ), - Description ( - "The NameFormat property identifies how the Name of the " - "AdminDomain is generated, using the heuristic specified " - "in the CIM V2 System Model specification. The property " - "assumes that to determine and assign a Name the " - "documented rules are traversed in order. The NameFormat " - "Values list defines the precedence order for assigning " - "the Name of the AdminDomain. \n" - "\n" - "\"FC\" has been deprecated and replaced by \"WWN\" to be " - "consistent with the other ValueMaps." ), - ValueMap { "Other", "AS", "NAP", "NOC", "POP", "RNP", "IP", - "IPX", "SNA", "Dial", "WAN", "LAN", "ISDN", "Frame Relay", - "ATM", "E.164", "IB", "FC", "Policy Repository", "WWN" }, - Values { "Other", "Autonomous System", - "Network Access Provider", "Network Operations Center", - "Point of Presence", "Regional Network Provider", "IP", - "IPX", "SNA", "Dial", "WAN", "LAN", "ISDN", "Frame Relay", - "ATM", "E.164", "Infiniband", "Fibre Channel", - "Policy Repository", "Fibre Channel Worldwide Name" }, - ModelCorrespondence { "CIM_AdminDomain.Name" }] - string NameFormat; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_AllocationCapabilities.mof b/build/vendor/dmtf_mof/Core/CIM_AllocationCapabilities.mof deleted file mode 100644 index a545e578..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_AllocationCapabilities.mof +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::Capabilities" ), - Description ( - "CIM_AllocationCapabilities extends the CIM_Capabilities class " - "for the purposes of expressing the resource allocation " - "capabilities of the associated managed element for the " - "allocation of a specific Resource Type. This class describes " - "the supported types of allocations allowed, specific or " - "general, the sharing modes supported for the device, dedicated " - "and or shared and the system states where the addition or " - "removal of the Resource Type is allowed." )] -class CIM_AllocationCapabilities : CIM_Capabilities { - - [Description ( - "The type of resource this allocation setting represents." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "14", "15", "16", "17", "18", "19", - "20", "21", "22", "23", "24", "25", "26", "27", "28", - "29", "30", "31", "32", "33", "..", "0x8000..0xFFFF" }, - Values { "Other", "Computer System", "Processor", "Memory", - "IDE Controller", "Parallel SCSI HBA", "FC HBA", - "iSCSI HBA", "IB HCA", "Ethernet Adapter", - "Other Network Adapter", "I/O Slot", "I/O Device", - "Floppy Drive", "CD Drive", "DVD drive", "Disk Drive", - "Tape Drive", "Storage Extent", "Other Storage Device", - "Serial port", "Parallel port", "USB Controller", - "Graphics controller", "IEEE 1394 Controller", - "Partitionable Unit", "Base Partitionable Unit", "Power", - "Cooling Capacity", "Ethernet Switch Port", - "Logical Disk", "Storage Volume", "Ethernet Connection", - "DMTF reserved", "Vendor Reserved" }, - ModelCorrespondence { - "CIM_AllocationCapabilities.OtherResourceType", - "CIM_ResourceAllocationSettingData.ResourceType" }] - uint16 ResourceType; - - [Description ( - "A string that describes the resource type when a well " - "defined value is not available and ResourceType has the " - "value \"Other\"." ), - ModelCorrespondence { - "CIM_ResourceAllocationSettingData.ResourceType" }] - string OtherResourceType; - - [Description ( - "A string describing an implementation specific sub-type " - "for this resource. For example, this may be used to " - "distinguish different models of the same resource type." )] - string ResourceSubType; - - [Description ( - "Indicates whether requesting a specific resource is " - "supported \n" - "\"Specific\" -- request can include a request for " - "specific resource \n" - "\"General\" -- request does not include specific " - "resource \n" - "\"Both\" -- both specific and general requests are " - "supported." ), - ValueMap { "0", "2", "3", "4", "..", "0x8000..0xFFFF" }, - Values { "Unknown", "Specific", "General", "Both", - "DMTF reserved", "Vendor Reserved" }] - uint16 RequestTypesSupported; - - [Description ( - "Indicates how access to underlying resource is granted: \n" - "\"Dedicated\" -- exclusive access to underlying resource \n" - "\"Shared\" -- shared use of underlying resource. \n" - "Actual quantity is controlled by min, max size, weights, " - "etc." ), - ValueMap { "0", "2", "3", "..", "0x8000..0xFFFF" }, - Values { "Unknown", "Dedicated", "Shared", "DMTF reserved", - "Vendor Reserved" }] - uint16 SharingMode; - - [Description ( - "Indicates the states that the System, to which the " - "resource will be associated via SystemDevice, may be in " - "when a new resource is created." ), - ValueMap { "0", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "..", "0x8000..0xFFFF" }, - Values { "Unknown", "Enabled", "Disabled", "Shutting Down", - "Not Applicable", "Enabled but Offline", "In Test", - "Deferred", "Quiesce", "Starting", "Paused", "Suspended", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_EnabledLogicalElement.EnabledState" }] - uint16 SupportedAddStates[]; - - [Description ( - "Indicates the states that the System, to which the " - "resource is associated via SystemDevice, may be in when " - "a the resource is removed ." ), - ValueMap { "0", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "..", "0x8000..0xFFFF" }, - Values { "Unknown", "Enabled", "Disabled", "Shutting Down", - "Not Applicable", "Enabled but Offline", "In Test", - "Deferred", "Quiesce", "Starting", "Paused", "Suspended", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_EnabledLogicalElement.EnabledState" }] - uint16 SupportedRemoveStates[]; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_AssociatedPowerManagementService.mof b/build/vendor/dmtf_mof/Core/CIM_AssociatedPowerManagementService.mof deleted file mode 100644 index fc96f6ea..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_AssociatedPowerManagementService.mof +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) 2010 DMTF. All rights reserved. - [Association, Version ( "2.24.1" ), - UMLPackagePath ( "CIM::Core::PowerMgmt" ), - Description ( - "The association between a Managed System Element and its power " - "management service." )] -class CIM_AssociatedPowerManagementService : CIM_ServiceAvailableToElement { - - [Override ( "ServiceProvided" ), - Max ( 1 ), - Description ( "The Service that is available." )] - CIM_PowerManagementService REF ServiceProvided; - - [Description ( - "The current power state of the associated Managed System Element." - ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "14", "15", "16", "17", "..", - "0x7FFF..0xFFFF" }, - Values { "Other", "On", "Sleep - Light", "Sleep -Deep", - "Power Cycle (Off - Soft)", "Off - Hard", - "Hibernate (Off - Soft)", "Off - Soft", - "Power Cycle (Off-Hard)", "Master Bus Reset", - "Diagnostic Interrupt (NMI)", "Off - Soft Graceful", - "Off - Hard Graceful", "Master Bus Reset Graceful", - "Power Cycle (Off - Soft Graceful)", - "Power Cycle (Off - Hard Graceful)", - "Diagnostic Interrupt (INIT)", "DMTF Reserved", - "Vendor Specific" }, - MappingStrings { "MIF.DMTF|System Power Controls|001.2" }, - ModelCorrespondence { - "CIM_PowerManagementCapabilities.PowerCapabilities" }] - uint16 PowerState; - - [Description ( - "A string describing the additional power management " - "state of the element, used when the PowerState is set to " - "the value 1, \"Other\"." ), - ModelCorrespondence { - "CIM_AssociatedPowerManagementService.PowerState" }] - string OtherPowerState; - - [Description ( - "The desired or the last requested power state of the " - "associated Managed System Element, irrespective of the " - "mechanism through which the request was made. If the " - "requested power state is unknown, then the property " - "shall have the value of 0 (\"Unknown\"). If the property " - "has no meaning or is not supported, then the property " - "shall have value 12(\"Not Applicable\")." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "..", "0x7FFF..0xFFFF" }, - Values { "Unknown", "Other", "On", "Sleep - Light", - "Sleep -_Deep", "Power Cycle (Off - Soft)", "Off - Hard", - "Hibernate (Off - Soft)", "Off - Soft", - "Power Cycle (Off-Hard)", "Master Bus Reset", - "Diagnostic Interrupt (NMI)", "Not Applicable", - "Off - Soft Graceful", "Off - Hard Graceful", - "Master Bus Reset Graceful", - "Power Cycle (Off - Soft Graceful)", - "Power Cycle (Off - Hard Graceful)", - "Diagnostic Interrupt (INIT)", "DMTF Reserved", - "Vendor Specific" }, - MappingStrings { "MIF.DMTF|System Power Controls|001.2" }, - ModelCorrespondence { - "CIM_PowerManagementCapabilities.PowerCapabilities", - "CIM_AssociatedPowerManagementService.OtherRequestedPowerState" }] - uint16 RequestedPowerState = 12; - - [Description ( - "A string describing the additional power management " - "state of the element, used when the RequestedPowerState " - "is set to the value 1, \"Other\"." ), - ModelCorrespondence { - "CIM_AssociatedPowerManagementService.RequestedPowerState" }] - string OtherRequestedPowerState; - - [Description ( - "The time when the element will be powered on again, used " - "when the RequestedPowerState has the value 2, \"On\", 5, " - "\"Power Cycle (Off - Soft)\" or 6, \"Power Cycle (Off - " - "Hard)\"." ), - ModelCorrespondence { - "CIM_AssociatedPowerManagementService.RequestedPowerState" }] - datetime PowerOnTime; - - [Description ( - "AvailableRequestedPowerStates indicates the possible " - "values for the PowerState parameter of the method " - "RequestPowerStateChange, used to initiate a power state " - "change.The values listed shall be a subset of the values " - "contained in the RequestedPowerStatesSupported property " - "of the CIM_PowerManagementCapabilities where the values " - "selected are a function of the current power state of " - "the system. This property shall be non-null if an " - "implementation supports the advertisement of the set of " - "possible values as a function of the current state. This " - "property shall be null if an implementation does not " - "support the advertisement of the set of possible values " - "as a function of the current state. \n" - "The current values in the enumeration are: \n" - "2=On, corresponding to ACPI state G0 or S0 or D0. \n" - "3=Sleep - Light, corresponding to ACPI state G1, S1/S2, " - "or D1. \n" - "4=Sleep - Deep, corresponding to ACPI state G1, S3, or D2.\n" - "5=Power Cycle (Off - Soft), corresponding to ACPI state " - "G2, S5, or D3, but where the managed element is set to " - "return to power state \"On\" at a pre-determined time. \n" - "6=Off - Hard, corresponding to ACPI state G3, S5, or D3. \n" - "7=Hibernate (Off - Soft), corresponding to ACPI state " - "S4, where the state of the managed element is preserved " - "and will be recovered upon powering on. \n" - "8=Off - Soft, corresponding to ACPI state G2, S5, or D3. " - "9= Power Cycle (Off-Hard), corresponds to the managed " - "element reaching the ACPI state G3 followed by ACPI " - "state S0. \n" - "10=Master Bus Reset, corresponds to the system reaching " - "ACPI state S5 followed by ACPI state S0. This is used to " - "represent system master bus reset. 11=Diagnostic " - "Interrupt (NMI), corresponding to the system reaching " - "ACPI state S5 followed by ACPI state S0. This is used to " - "represent system non-maskable interrupt. 12=Off - Soft " - "Graceful, equivalent to Off Soft but preceded by a " - "request to the managed element to perform an orderly " - "shutdown. \n" - "13=Off - Hard Graceful, equivalent to Off Hard but " - "preceded by a request to the managed element to perform " - "an orderly shutdown. \n" - "14=Master Bus Rest Graceful, equivalent to Master Bus " - "Reset but preceded by a request to the managed element " - "to perform an orderly shutdown. \n" - "15=Power Cycle (Off - Soft Graceful), equivalent to " - "Power Cycle (Off - Soft) but preceded by a request to " - "the managed element to perform an orderly shutdown. \n" - "16=Power Cycle (Off - Hard Graceful), equivalent to " - "Power Cycle (Off - Hard) but preceded by a request to " - "the managed element to perform an orderly shutdown. \n" - "..=DMTF Reserved. \n" - "0x7FFF..0xFFFF = Vendor Specific." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "14", "15", "16", "..", "0x7FFF..0xFFFF" }, - Values { "Other", "On", "Sleep - Light", "Sleep -Deep", - "Power Cycle (Off - Soft)", "Off - Hard", - "Hibernate (Off - Soft)", "Off - Soft", - "Power Cycle (Off-Hard)", "Master Bus Reset", - "Diagnostic Interrupt (NMI)", "Off - Soft Graceful", - "Off - Hard Graceful", "Master Bus Reset Graceful", - "Power Cycle (Off - Soft Graceful)", - "Power Cycle (Off - Hard Graceful)", "DMTF Reserved", - "Vendor Specific" }, - MappingStrings { "IEEE P1621 | 3.2" }, - ModelCorrespondence { - "CIM_PowerManagementCapabilities.RequestedPowerStatesSupported", - "CIM_PowerManagementService.RequestPowerStateChange", - "CIM_AssociatedPowerManagementService.PowerState" }] - uint16 AvailableRequestedPowerStates[]; - - [Description ( - "TransitioningToPowerState indicates the target power " - "state to which the system is transitioning. \n" - "A value of 19 \"No Change\" shall indicate that no " - "transition is in progress. A value of 18 \"Not " - "Applicable\" shall indicate the implementation does not " - "support representing ongoing transitions. \n" - "A value other than 18 or 19 shall identify the power " - "state to which the element is in the process of " - "transitioning." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "14", "15", "16", "17", "18", "19", - "..", "0x7FFF..0xFFFF" }, - Values { "Other", "On", "Sleep - Light", "Sleep -Deep", - "Power Cycle (Off - Soft)", "Off - Hard", - "Hibernate (Off - Soft)", "Off - Soft", - "Power Cycle (Off-Hard)", "Master Bus Reset", - "Diagnostic Interrupt (NMI)", "Off - Soft Graceful", - "Off - Hard Graceful", "Master Bus Reset Graceful", - "Power Cycle (Off - Soft Graceful)", - "Power Cycle (Off - Hard Graceful)", - "Diagnostic Interrupt (INIT)", "Not Applicable", - "No Change", "DMTF Reserved", "Vendor Specific" }, - MappingStrings { "MIF.DMTF|System Power Controls|001.2" }, - ModelCorrespondence { - "CIM_PowerManagementCapabilities.PowerCapabilities" }] - uint16 TransitioningToPowerState; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_BasedOn.mof b/build/vendor/dmtf_mof/Core/CIM_BasedOn.mof deleted file mode 100644 index 0395971c..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_BasedOn.mof +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BasedOn -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::StorageExtent" ), - Description ( - "BasedOn is an association describing how StorageExtents can be " - "assembled from lower level Extents. For example, " - "ProtectedSpaceExtents are parts of PhysicalExtents, while " - "VolumeSets are assembled from one or more Physical or " - "ProtectedSpaceExtents. As another example, CacheMemory can be " - "defined independently and realized in a PhysicalElement or can " - "be \'based on\' Volatile or NonVolatileStorageExtents." )] -class CIM_BasedOn : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The lower level StorageExtent." )] - CIM_StorageExtent REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The higher level StorageExtent." )] - CIM_StorageExtent REF Dependent; - - [Description ( - "StartingAddress indicates where in lower level storage, " - "the higher level Extent begins." )] - uint64 StartingAddress; - - [Description ( - "EndingAddress indicates where in lower level storage, " - "the higher level Extent ends. This property is useful " - "when mapping non-contiguous Extents into a higher level " - "grouping." )] - uint64 EndingAddress; - - [Description ( - "If there is an order to the BasedOn associations that " - "describe how a higher level StorageExtent is assembled, " - "the OrderIndex property indicates this. When an order " - "exists, the instances of BasedOn with the same Dependent " - "value (i.e., the same higher level Extent) should place " - "unique values in the OrderIndex property. The lowest " - "value implies the first member of the collection of " - "lower level Extents, and increasing values imply " - "successive members of the collection. If there is no " - "ordered relationship, a value of zero should be " - "specified. An example of the use of this property is to " - "define a RAID-0 striped array of 3 disks. The resultant " - "RAID array is a StorageExtent that is dependent on " - "(BasedOn) the StorageExtents that describe each of the 3 " - "disks. The OrderIndex of each BasedOn association from " - "the disk Extents to the RAID array could be specified as " - "1, 2 and 3 to indicate the order in which the disk " - "Extents are used to access the RAID data." )] - uint16 OrderIndex; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_BindsTo.mof b/build/vendor/dmtf_mof/Core/CIM_BindsTo.mof deleted file mode 100644 index 5e648dd3..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_BindsTo.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BindsTo -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Service" ), - Description ( - "This association establishes a ServiceAccessPoint as a " - "requestor of protocol services from a ProtocolEndpoint. " - "Typically, this association runs between SAPs and endpoints on " - "a single system. Because a ProtocolEndpoint is a kind of " - "ServiceAccessPoint, this binding can be used to establish a " - "layering of two protocols, with the upper layer represented by " - "the Dependent and the lower layer represented by the " - "Antecedent." )] -class CIM_BindsTo : CIM_SAPSAPDependency { - - [Override ( "Antecedent" ), - Description ( - "The lower-level endpoint that is accessed by the SAP." )] - CIM_ProtocolEndpoint REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The AccessPoint or ProtocolEndpoint that is dependent on " - "the lower-level endpoint." )] - CIM_ServiceAccessPoint REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_Capabilities.mof b/build/vendor/dmtf_mof/Core/CIM_Capabilities.mof deleted file mode 100644 index f292c400..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_Capabilities.mof +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Abstract, Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Core::Capabilities" ), - Description ( - "Capabilities is an abstract class whose subclasses describe " - "abilities and/or potential for use. For example, one may " - "describe the maximum number of VLANs that can be supported on " - "a system using a subclass of Capabilities. Capabilities are " - "tied to the elements which they describe using the " - "ElementCapabilities association. Note that the cardinality of " - "the ManagedElement reference is Min(1), Max(1). This " - "cardinality mandates the instantiation of the " - "ElementCapabilities association for the referenced instance of " - "Capabilities. ElementCapabilities describes the existence " - "requirements and context for the referenced instance of " - "ManagedElement. Specifically, the ManagedElement MUST exist " - "and provides the context for the Capabilities. Note that " - "Capabilities do not indicate what IS configured or " - "operational, but what CAN or CANNOT exist, be defined or be " - "used. Note that it is possible to describe both supported and " - "excluded abilities and functions (both capabilities and " - "limitations) using this class." )] -class CIM_Capabilities : CIM_ManagedElement { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. In order to ensure uniqueness within the " - "NameSpace, the value of InstanceID SHOULD be constructed " - "using the following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon " - "\':\', and where MUST include a copyrighted, " - "trademarked or otherwise unique name that is owned by " - "the business entity creating/defining the InstanceID, or " - "is a registered ID that is assigned to the business " - "entity by a recognized global authority (This is similar " - "to the _ structure of Schema " - "class names.) In addition, to ensure uniqueness " - "MUST NOT contain a colon (\':\'). When using this " - "algorithm, the first colon to appear in InstanceID MUST " - "appear between and . \n" - " is chosen by the business entity and SHOULD " - "not be re-used to identify different underlying " - "(real-world) elements. If the above \'preferred\' " - "algorithm is not used, the defining entity MUST assure " - "that the resultant InstanceID is not re-used across any " - "InstanceIDs produced by this or other providers for this " - "instance\'s NameSpace. \n" - "For DMTF defined instances, the \'preferred\' algorithm " - "MUST be used with the set to \'CIM\'." )] - string InstanceID; - - [Required, Override ( "ElementName" ), - Description ( - "The user friendly name for this instance of " - "Capabilities. In addition, the user friendly name can be " - "used as a index property for a search of query. (Note: " - "Name does not have to be unique within a namespace.)" )] - string ElementName; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_CollectedCollections.mof b/build/vendor/dmtf_mof/Core/CIM_CollectedCollections.mof deleted file mode 100644 index ffd5fe93..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_CollectedCollections.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// CPUBS corrections to CoreCollection.mof -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_CollectedCollections -// ================================================================== - [Association, Aggregation, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Collection" ), - Description ( - "CIM_CollectedCollections is an aggregation association " - "representing that a CollectionOfMSEs can itself be contained " - "in a CollectionOfMSEs." )] -class CIM_CollectedCollections { - - [Key, Aggregate, Description ( - "The \'higher level\' or parent element in the aggregation." - )] - CIM_CollectionOfMSEs REF Collection; - - [Key, Description ( "The \'collected\' Collection." )] - CIM_CollectionOfMSEs REF CollectionInCollection; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_CollectedMSEs.mof b/build/vendor/dmtf_mof/Core/CIM_CollectedMSEs.mof deleted file mode 100644 index ce6e1225..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_CollectedMSEs.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_CollectedMSEs -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::Collection" ), - Description ( - "CIM_CollectedMSEs is a generic association used to establish " - "the members of the grouping object, CollectionOf MSEs." )] -class CIM_CollectedMSEs : CIM_MemberOfCollection { - - [Aggregate, Override ( "Collection" ), - Description ( - "The grouping or \'bag\' object that represents the Collection." - )] - CIM_CollectionOfMSEs REF Collection; - - [Override ( "Member" ), - Description ( "The members of the Collection." )] - CIM_ManagedSystemElement REF Member; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_Collection.mof b/build/vendor/dmtf_mof/Core/CIM_Collection.mof deleted file mode 100644 index bd310c9d..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_Collection.mof +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Collection -// ================================================================== - [Abstract, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::Collection" ), - Description ( - "Collection is an abstract class that provides a common " - "superclass for data elements that represent collections of " - "ManagedElements and its subclasses." )] -class CIM_Collection : CIM_ManagedElement { - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_CollectionConfiguration.mof b/build/vendor/dmtf_mof/Core/CIM_CollectionConfiguration.mof deleted file mode 100644 index 67ef99e7..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_CollectionConfiguration.mof +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Deprecate -// class. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_CollectionConfiguration -// ================================================================== - [Association, Deprecated { "CIM_ElementSettingData", - "CIM_CollectionSetting" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Settings" ), - Description ( - "Note: The Configuration class is being deprecated in lieu of " - "using a ConcreteComponent relationship to indicate a hierarchy " - "of instances of Setting or SettingData. This relationship " - "allows the reuse of the collection-to-Setting and " - "element-to-SettingData associations instead of defining peer " - "associations specifically for Configurations. \n" - "Deprecated description: This association relates a " - "Configuration object to one or more CollectionOfMSEs objects. " - "The Configuration object represents a certain behavior or a " - "desired functional state for the associated Collection." )] -class CIM_CollectionConfiguration { - - [Deprecated { "CIM_ElementSettingData.ManagedElement", - "CIM_CollectionSetting.Collection" }, - Key, Description ( - "Note: The use of this element is deprecated. Deprecated " - "description: The CollectionOfMSEs." )] - CIM_CollectionOfMSEs REF Collection; - - [Deprecated { "CIM_ElementSettingData.SettingData", - "CIM_CollectionSetting.Setting" }, - Key, Description ( - "Note: The use of this element is deprecated. Deprecated " - "description: The Configuration object that groups the " - "Settings and dependencies that are associated with the " - "Collection." )] - CIM_Configuration REF Configuration; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_CollectionOfMSEs.mof b/build/vendor/dmtf_mof/Core/CIM_CollectionOfMSEs.mof deleted file mode 100644 index 4c8956c2..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_CollectionOfMSEs.mof +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// CPUBS corrections to CoreCollection.mof -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_CollectionOfMSEs -// ================================================================== - [Abstract, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Collection" ), - Description ( - "The CollectionOfMSEs object allows the grouping of Managed " - "SystemElements for various identification purposes and to " - "reduce the complexity of associating Settings and " - "Configurations. It is abstract to require further definition " - "and semantic refinement in subclasses. The CollectionOfMSEs " - "object does not carry any state or status information, but " - "represents only a grouping or \'bag\' of Elements. For this " - "reason, it is incorrect to subclass groups that have state or " - "status from CollectionOfMSEs. An example is CIM_Redundancy " - "Group (which is subclassed from LogicalElement). \n" - "Collections typically aggregate similar (\'like\') objects,but " - "they are not required to do so. Collections simply identify " - "\'bags\' and might represent an optimization. This purpose is " - "especially true with respect to their association to Settings " - "and Configurations. Without Collections, you would need to " - "define individual ElementSetting and ElementConfiguration " - "associations, to tie Settings and Configuration objects to " - "individual ManagedSystemElements. There might be duplication " - "when assigning the same Setting to multiple objects. In " - "addition, using the Collection object allows the determination " - "that the Setting and Configuration associations are indeed the " - "same for the Collection\'s members. This information would " - "otherwise be obtained by defining the Collection in a " - "proprietary manner, and then querying the ElementSetting and " - "ElementConfiguration associations to determine if the " - "Collection set is completely covered." )] -class CIM_CollectionOfMSEs : CIM_Collection { - - [Description ( - "The identification of the Collection object. When " - "subclassed, the CollectionID property can be overridden " - "to be a Key property." ), - MaxLen ( 256 )] - string CollectionID; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_CollectionSetting.mof b/build/vendor/dmtf_mof/Core/CIM_CollectionSetting.mof deleted file mode 100644 index 74af6fed..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_CollectionSetting.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_CollectionSetting -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Settings" ), - Description ( - "CollectionSetting represents the association between a " - "CollectionOfMSEs class and the Setting classes that are " - "defined for it." )] -class CIM_CollectionSetting { - - [Key, Description ( "The CollectionOfMSEs." )] - CIM_CollectionOfMSEs REF Collection; - - [Key, Description ( - "The Setting object that is associated with the Collection." - )] - CIM_Setting REF Setting; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_CompatibleProduct.mof b/build/vendor/dmtf_mof/Core/CIM_CompatibleProduct.mof deleted file mode 100644 index 285cd6d3..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_CompatibleProduct.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_CompatibleProduct -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::ProductFRU" ), - Description ( - "CIM_CompatibleProduct is an association between Products that " - "can indicate a wide variety of information. For example, it " - "can indicate that the two referenced Products interoperate, " - "that they can be installed together, that one can be the " - "physical container for the other, etc. The string property, " - "CompatibilityDescription, defines how the Products " - "interoperate or are compatible, any limitations regarding " - "interoperability or installation, ..." )] -class CIM_CompatibleProduct { - - [Key, Description ( - "The Product for which compatible offerings are defined." )] - CIM_Product REF Product; - - [Key, Description ( "The compatible Product." )] - CIM_Product REF CompatibleProduct; - - [Description ( - "CompatibilityDescription is a free-form string defining " - "how the two referenced Products interoperate or are " - "compatible, any limitations to compatibility, etc." )] - string CompatibilityDescription; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_Component.mof b/build/vendor/dmtf_mof/Core/CIM_Component.mof deleted file mode 100644 index 3d0d6ad4..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_Component.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Component -// ================================================================== - [Association, Abstract, Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Core::CoreElements" ), - Description ( - "CIM_Component is a generic association used to establish \'part " - "of\' relationships between Managed Elements. For example, it " - "could be used to define the components or parts of a System." )] -class CIM_Component { - - [Key, Aggregate, Description ( - "The parent element in the association." )] - CIM_ManagedElement REF GroupComponent; - - [Key, Description ( "The child element in the association." )] - CIM_ManagedElement REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ConcreteCollection.mof b/build/vendor/dmtf_mof/Core/CIM_ConcreteCollection.mof deleted file mode 100644 index d63d0206..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ConcreteCollection.mof +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Core::Collection" ), - Description ( - "A concrete version of Collection. This class represents a " - "generic and instantiable collection, such as a group of " - "ComputerSystems (for example, a pool of hosts available for " - "executing jobs). It is defined as a concrete subclass of the " - "abstract CIM_Collection class, to be used in place of many " - "specific subclasses that add no semantics. Note that when " - "defining additional semantics for Collection, this class must " - "not be subclassed. Specific semantics continue to be defined " - "as subclasses of the abstract CIM_Collection. " - "ConcreteCollection is limited in its use as a concrete form of " - "a general collection or bag. It was deemed more prudent to " - "create this concrete subclass than to change Collection from " - "an abstract to a concrete class." )] -class CIM_ConcreteCollection : CIM_Collection { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. To ensure uniqueness within the " - "NameSpace, the value of InstanceID should be constructed " - "using the following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon " - "\':\', and where must include a unique name. It " - "can be a copyrighted, trademarked, or otherwise unique " - "name that is owned by the business entity that is " - "creating or defining the InstanceID. Or, it could be a " - "registered ID that is assigned to the business entity by " - "a recognized global authority.(This requirement is " - "similar to the _ structure of " - "Schema class names.) In addition, to ensure uniqueness " - " must not contain a colon (\':\'). When using " - "this algorithm, the first colon to appear in InstanceID " - "must appear between and . \n" - "\n" - " is chosen by the business entity and should " - "not be re-used to identify different underlying " - "(real-world) elements. If the above \'preferred\' " - "algorithm is not used, the defining entity must ensure " - "that the resulting InstanceID is not re-used as any of " - "the InstanceIDs produced by this or other providers for " - "the NameSpace of this instance." )] - string InstanceID; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ConcreteComponent.mof b/build/vendor/dmtf_mof/Core/CIM_ConcreteComponent.mof deleted file mode 100644 index 6b05b8a2..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ConcreteComponent.mof +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ConcreteComponent -// ================================================================== - [Association, Aggregation, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::CoreElements" ), - Description ( - "CIM_ConcreteComponent is a generic association used to " - "establish \'part of\' relationships between ManagedElements. " - "It is defined as a concrete subclass of the abstract " - "CIM_Component class, to be used in place of many specific " - "subclasses of Component that add no semantics, that is " - "subclasses that do not clarify the type of composition, update " - "cardinalities, or add or remove qualifiers. Note that when you " - "define additional semantics for Component, this class must not " - "be subclassed. Specific semantics continue to be defined as " - "subclasses of the abstract CIM_Component. ConcreteComponent is " - "limited in its use as a concrete form of a general " - "composition. \n" - "\n" - "It was deemed more prudent to create this concrete subclass " - "than to change Component from an abstract to a concrete class. " - "Industry usage and impact could not be anticipated." )] -class CIM_ConcreteComponent : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Description ( "The parent element in the association." )] - CIM_ManagedElement REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The child element in the association." )] - CIM_ManagedElement REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ConcreteDependency.mof b/build/vendor/dmtf_mof/Core/CIM_ConcreteDependency.mof deleted file mode 100644 index c28a8116..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ConcreteDependency.mof +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ConcreteDependency -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::CoreElements" ), - Description ( - "CIM_ConcreteDependency is a generic association used to " - "establish dependency relationships between ManagedElements. It " - "is defined as a concrete subclass of the abstract " - "CIM_Dependency class, to be used in place of many specific " - "subclasses of Dependency that add no semantics, that is " - "subclasses that do not clarify the type of dependency, update " - "cardinalities, or add or remove qualifiers. Note that when you " - "define additional semantics for Dependency, this class must " - "not be subclassed. Specific semantics continue to be defined " - "as subclasses of the abstract CIM_Dependency. " - "ConcreteDependency is limited in its use as a concrete form of " - "a general dependency. \n" - "\n" - "It was deemed more prudent to create this concrete subclass " - "than to change Dependency from an abstract to a concrete " - "class. Dependency already had multiple abstract subclasses in " - "the CIM Schema, and wider industry usage and impact could not " - "be anticipated." )] -class CIM_ConcreteDependency : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "Antecedent represents the independent object in this association." - )] - CIM_ManagedElement REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "Dependent represents the object that is dependent on the " - "Antecedent." )] - CIM_ManagedElement REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ConcreteIdentity.mof b/build/vendor/dmtf_mof/Core/CIM_ConcreteIdentity.mof deleted file mode 100644 index 9cb61c4f..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ConcreteIdentity.mof +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ConcreteIdentity -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::CoreElements" ), - Description ( - "CIM_ConcreteIdentity associates two elements that represent " - "different aspects of the same underlying entity. It is defined " - "as a concrete subclass of the abstract CIM_LogicalIdentity " - "class, to be used in place of many specific subclasses of " - "LogicalIdentity that add no semantics, that is, subclasses " - "that do not clarify the type of identity, update " - "cardinalities, or add or remove qualifiers. Note that when you " - "define additional semantics for LogicalIdentity, this class " - "should not be subclassed. Specific semantics continue to be " - "defined as subclasses of the abstract CIM_LogicalIdentity. " - "ConcreteIdentity is limited in its use as a concrete form of a " - "general identity relationship. \n" - "\n" - "It was deemed more prudent to create this concrete subclass " - "than to change LogicalIdentity from an abstract to a concrete " - "class. LogicalIdentity already had multiple abstract " - "subclasses in the CIM Schema, and wider industry usage and " - "impact could not be anticipated." )] -class CIM_ConcreteIdentity : CIM_LogicalIdentity { - - [Override ( "SystemElement" ), - Description ( - "One aspect of the ManagedElement. The use of \'System\' " - "in the name does not limit the scope of the association. " - "This name is an artifact of the original definition of " - "the association." )] - CIM_ManagedElement REF SystemElement; - - [Override ( "SameElement" ), - Description ( "Another aspect of the ManagedElement." )] - CIM_ManagedElement REF SameElement; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ConcreteJob.mof b/build/vendor/dmtf_mof/Core/CIM_ConcreteJob.mof deleted file mode 100644 index 2af042ae..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ConcreteJob.mof +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::CoreElements" ), - Description ( - "A concrete version of Job. This class represents a generic and " - "instantiable unit of work, such as a batch or a print job." )] -class CIM_ConcreteJob : CIM_Job { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. In order to ensure uniqueness within the " - "NameSpace, the value of InstanceID SHOULD be constructed " - "using the following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon " - "\':\', and where must include a copyrighted, " - "trademarked or otherwise unique name that is owned by " - "the business entity that is creating or defining the " - "InstanceID, or that is a registered ID that is assigned " - "to the business entity by a recognized global authority. " - "(This requirement is similar to the _ structure of Schema class names.) In addition, to " - "ensure uniqueness must not contain a colon " - "(\':\'). When using this algorithm, the first colon to " - "appear in InstanceID must appear between and " - ". \n" - " is chosen by the business entity and should " - "not be re-used to identify different underlying " - "(real-world) elements. If the above \'preferred\' " - "algorithm is not used, the defining entity must assure " - "that the resulting InstanceID is not re-used across any " - "InstanceIDs produced by this or other providers for the " - "NameSpace of this instance. \n" - "For DMTF defined instances, the \'preferred\' algorithm " - "must be used with the set to \'CIM\'." )] - string InstanceID; - - [Required, Override ( "Name" ), - Description ( - "The user-friendly name for this instance of a Job. In " - "addition, the user-friendly name can be used as a " - "property for a search or query. (Note: Name does not " - "have to be unique within a namespace.)" )] - string Name; - - [Description ( - "JobState is an integer enumeration that indicates the " - "operational state of a Job. It can also indicate " - "transitions between these states, for example, \'Shutting " - "Down\' and \'Starting\'. Following is a brief " - "description of the states: \n" - "New (2) indicates that the job has never been started. \n" - "Starting (3) indicates that the job is moving from the " - "\'New\', \'Suspended\', or \'Service\' states into the " - "\'Running\' state. \n" - "Running (4) indicates that the Job is running. \n" - "Suspended (5) indicates that the Job is stopped, but can " - "be restarted in a seamless manner. \n" - "Shutting Down (6) indicates that the job is moving to a " - "\'Completed\', \'Terminated\', or \'Killed\' state. \n" - "Completed (7) indicates that the job has completed " - "normally. \n" - "Terminated (8) indicates that the job has been stopped " - "by a \'Terminate\' state change request. The job and all " - "its underlying processes are ended and can be restarted " - "(this is job-specific) only as a new job. \n" - "Killed (9) indicates that the job has been stopped by a " - "\'Kill\' state change request. Underlying processes " - "might have been left running, and cleanup might be " - "required to free up resources. \n" - "Exception (10) indicates that the Job is in an abnormal " - "state that might be indicative of an error condition. " - "Actual status might be displayed though job-specific " - "objects. \n" - "Service (11) indicates that the Job is in a " - "vendor-specific state that supports problem discovery, " - "or resolution, or both.\n" - "Query pending (12) waiting for a client to resolve a " - "query" ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13..32767", "32768..65535" }, - Values { "New", "Starting", "Running", "Suspended", - "Shutting Down", "Completed", "Terminated", "Killed", - "Exception", "Service", "Query Pending", "DMTF Reserved", - "Vendor Reserved" }] - uint16 JobState; - - [Description ( - "The date or time when the state of the Job last changed. " - "If the state of the Job has not changed and this " - "property is populated, then it must be set to a 0 " - "interval value. If a state change was requested, but " - "rejected or not yet processed, the property must not be " - "updated." )] - datetime TimeOfLastStateChange; - - [Required, Write, Description ( - "The amount of time that the Job is retained after it has " - "finished executing, either succeeding or failing in that " - "execution. The job must remain in existence for some " - "period of time regardless of the value of the " - "DeleteOnCompletion property. \n" - "The default is five minutes." )] - datetime TimeBeforeRemoval = "00000000000500.000000:000"; - - - [Description ( - "Requests that the state of the job be changed to the " - "value specified in the RequestedState parameter. " - "Invoking the RequestStateChange method multiple times " - "could result in earlier requests being overwritten or " - "lost. \n" - "If 0 is returned, then the task completed successfully. " - "Any other return code indicates an error condition." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", - "4097", "4098", "4099", "4100..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", - "Can NOT complete within Timeout Period", "Failed", - "Invalid Parameter", "In Use", "DMTF Reserved", - "Method Parameters Checked - Transition Started", - "Invalid State Transition", - "Use of Timeout Parameter Not Supported", "Busy", - "Method Reserved", "Vendor Specific" }] - uint32 RequestStateChange( - [IN, Description ( - "RequestStateChange changes the state of a job. The " - "possible values are as follows: \n" - "Start (2) changes the state to \'Running\'. \n" - "Suspend (3) stops the job temporarily. The " - "intention is to subsequently restart the job with " - "\'Start\'. It might be possible to enter the " - "\'Service\' state while suspended. (This is " - "job-specific.) \n" - "Terminate (4) stops the job cleanly, saving data, " - "preserving the state, and shutting down all " - "underlying processes in an orderly manner. \n" - "Kill (5) terminates the job immediately with no " - "requirement to save data or preserve the state. \n" - "Service (6) puts the job into a vendor-specific " - "service state. It might be possible to restart the " - "job." ), - ValueMap { "2", "3", "4", "5", "6", "7..32767", - "32768..65535" }, - Values { "Start", "Suspend", "Terminate", "Kill", - "Service", "DMTF Reserved", "Vendor Reserved" }] - uint16 RequestedState, - [IN, Description ( - "A timeout period that specifies the maximum amount " - "of time that the client expects the transition to " - "the new state to take. The interval format must be " - "used to specify the TimeoutPeriod. A value of 0 or " - "a null parameter indicates that the client has no " - "time requirements for the transition. \n" - "If this property does not contain 0 or null and " - "the implementation does not support this " - "parameter, a return code of \'Use Of Timeout " - "Parameter Not Supported\' must be returned." )] - datetime TimeoutPeriod); - - [Description ( - "When the job is executing or has terminated without " - "error, then this method returns no CIM_Error instance. " - "However, if the job has failed because of some internal " - "problem or because the job has been terminated by a " - "client, then a CIM_Error instance is returned." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", - "32768..65535" }, - Values { "Success", "Not Supported", "Unspecified Error", - "Timeout", "Failed", "Invalid Parameter", "Access Denied", - "DMTF Reserved", "Vendor Specific" }] - uint32 GetError( - [OUT, Description ( - "If the OperationalStatus on the Job is not \"OK\", " - "then this method will return a CIM Error instance. " - "Otherwise, when the Job is \"OK\", null is " - "returned." ), - EmbeddedInstance ( "CIM_Error" )] - string Error); - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_Configuration.mof b/build/vendor/dmtf_mof/Core/CIM_Configuration.mof deleted file mode 100644 index 0db95bfc..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_Configuration.mof +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Deprecate -// class. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Configuration -// ================================================================== - [Deprecated { "CIM_SettingData", "CIM_Setting" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Settings" ), - Description ( - "Note: The use of CIM_Configuration is deprecated in favor of " - "aggregating instances of Setting or SettingData into " - "\"higher-level\" Settings or SettingData objects using the " - "ConcreteComponent association. This association simplifies the " - "use of Settings or SettingData. With Configurations serving as " - "aggregations of Settings (as defined by the Configuration " - "Component relationship), separate associations were needed for " - "the aggregation and to tie an element to either its " - "Configurations or Settings or SettingData. These separate " - "associations introduced unnecessary complexity and redundancy " - "into the model. \n" - "Deprecated description: The Configuration object allows the " - "grouping of sets of parameters (defined in Setting objects) " - "and dependencies for one or more ManagedSystemElements. It " - "represents a certain behavior or a desired functional state " - "for the ManagedSystemElements. The desired functional state of " - "the Configuration is typically driven by external requirements " - "such as time or location. For example, to connect to a Mail " - "System from home, a dependency on a modem exists, but a " - "dependency on a network adapter exists at work. Settings for " - "the pertinent LogicalDevices (in this example, POTSModem and " - "NetworkAdapter) can be defined and aggregated by the " - "Configuration. Therefore, two \"Connect to Mail\" " - "Configurations can be defined by grouping the relevant " - "dependencies and Setting objects." )] -class CIM_Configuration : CIM_ManagedElement { - - [Deprecated { "CIM_SettingData.InstanceID", - "CIM_Setting.SettingID" }, - Key, Description ( - "Note: The use of this element is deprecated. Deprecated " - "description: The label by which the Configuration object " - "is known." ), - MaxLen ( 256 )] - string Name; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ConfigurationComponent.mof b/build/vendor/dmtf_mof/Core/CIM_ConfigurationComponent.mof deleted file mode 100644 index d846a5d4..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ConfigurationComponent.mof +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Deprecate -// class. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ConfigurationComponent -// ================================================================== - [Association, Deprecated { "CIM_ConcreteComponent" }, - Aggregation, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Settings" ), - Description ( - "Note: The Configuration class is being deprecated in lieu of " - "using a ConcreteComponent relationship to indicate a hierarchy " - "of instances of Setting or SettingData. Deprecated " - "description: ConfigurationComponent aggregates \"lower-level\" " - "Configuration objects into a \"high-level\" Configuration. " - "This association enables the assembly of complex " - "configurations by grouping together simpler ones. For example, " - "a logon policy for the United States could consist of two " - "Configuration groups, one for the East Coast and one for the " - "West Coast. Each of these groups could in turn consist of " - "multiple Configurations to handle different aspects of the " - "logon process." )] -class CIM_ConfigurationComponent { - - [Deprecated { "CIM_ConcreteComponent.GroupComponent" }, - Key, Aggregate, Description ( - "Note: The use of this element is deprecated. Deprecated " - "description: The Configuration that aggregates " - "additional Configurations." )] - CIM_Configuration REF ConfigGroup; - - [Deprecated { "CIM_ConcreteComponent.PartComponent" }, - Key, Description ( - "Note: The use of this element is deprecated. Deprecated " - "description: A Configuration that is part of a " - "\"higher-level\" Configuration." )] - CIM_Configuration REF ConfigComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ConfigurationForSystem.mof b/build/vendor/dmtf_mof/Core/CIM_ConfigurationForSystem.mof deleted file mode 100644 index df3ce336..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ConfigurationForSystem.mof +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Deprecate -// class. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ConfigurationForSystem -// ================================================================== - [Association, Deprecated { "CIM_ScopedSetting", - "CIM_SettingForSystem" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Settings" ), - Description ( - "Note: The use of this element is deprecated. Deprecated " - "description: CIM_ConfigurationForSystem defines a " - "Configuration in the context of the System on which it is " - "located. Because the Configuration class is deprecated, this " - "association is similarly deprecated." )] -class CIM_ConfigurationForSystem : CIM_HostedDependency { - - [Deprecated { "CIM_ScopedSetting.Antecedent", - "CIM_SettingForSystem.Antecedent" }, - Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "Note: The use of this element is deprecated. Deprecated " - "description: The hosting System." )] - CIM_System REF Antecedent; - - [Deprecated { "CIM_ScopedSetting.Dependent", - "CIM_SettingForSystem.Dependent" }, - Override ( "Dependent" ), - Weak, Description ( - "Note: The use of this element is deprecated. The " - "Configuration that is defined for the System." )] - CIM_SystemConfiguration REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ContainedDomain.mof b/build/vendor/dmtf_mof/Core/CIM_ContainedDomain.mof deleted file mode 100644 index 02b97fd8..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ContainedDomain.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ContainedDomain -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::CoreElements" ), - Description ( - "A relationship that aggregates one or more lower-level " - "AdminDomain instances into a higher-level AdminDomain." )] -class CIM_ContainedDomain : CIM_SystemComponent { - - [Aggregate, Override ( "GroupComponent" ), - Description ( - "An AdminDomain that aggregates other AdminDomains." )] - CIM_AdminDomain REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "An AdminDomain aggregated by another AdminDomain." )] - CIM_AdminDomain REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ContainedLocation.mof b/build/vendor/dmtf_mof/Core/CIM_ContainedLocation.mof deleted file mode 100644 index f2ad800f..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ContainedLocation.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ContainedLocation -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Physical" ), - Description ( - "ContainedLocation defines one location in the context of " - "another. For example, a campus might \'contain\' a building, " - "which in turn \'contains\' a floor." )] -class CIM_ContainedLocation : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( "The containing location." )] - CIM_Location REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The contained location." )] - CIM_Location REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_DefaultSetting.mof b/build/vendor/dmtf_mof/Core/CIM_DefaultSetting.mof deleted file mode 100644 index f7b78ca2..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_DefaultSetting.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DefaultSetting -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Settings" ), - Description ( - "DefaultSetting represents the association between a " - "ManagedSystemElement and the single Setting class that is " - "defined to be the default setting for this Element." )] -class CIM_DefaultSetting : CIM_ElementSetting { - - [Override ( "Setting" ), - Max ( 1 ), - Description ( "The Setting object that is the default." )] - CIM_Setting REF Setting; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_Dependency.mof b/build/vendor/dmtf_mof/Core/CIM_Dependency.mof deleted file mode 100644 index c4bde5f5..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_Dependency.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Dependency -// ================================================================== - [Association, Abstract, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::CoreElements" ), - Description ( - "CIM_Dependency is a generic association used to establish " - "dependency relationships between ManagedElements." )] -class CIM_Dependency { - - [Key, Description ( - "Antecedent represents the independent object in this association." - )] - CIM_ManagedElement REF Antecedent; - - [Key, Description ( - "Dependent represents the object that is dependent on the " - "Antecedent." )] - CIM_ManagedElement REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_DependencyContext.mof b/build/vendor/dmtf_mof/Core/CIM_DependencyContext.mof deleted file mode 100644 index 8b0b00c1..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_DependencyContext.mof +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Deprecate -// class. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DependencyContext -// ================================================================== - [Association, Deprecated { "No value" }, - Aggregation, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Settings" ), - Description ( - "Note: The Configuration class is being deprecated in lieu of " - "using a ConcreteComponent relationship to indicate a hierarchy " - "of Setting or SettingData instances. Therefore, this " - "association is also deprecated but it is deprecated to \"No " - "value\" because there are no equivalent relationships " - "currently defined for the Setting or SettingData classes. This " - "association is an anomaly because it defines what cannot be " - "expressed for the components of the Configuration. Also, it " - "singles out the Dependency association as opposed to allowing " - "any relationships to be defined as \"settings\". Its use in " - "the industry is discouraged. \n" - "Deprecated description: This relationship associates a " - "Dependency with one or more Configuration objects. For " - "example, dependencies for a ComputerSystem could change based " - "on the site or network to which the System is attached." )] -class CIM_DependencyContext { - - [Deprecated { "No value" }, - Key, Aggregate, Description ( - "Note: The use of this element is deprecated. Deprecated " - "description: The Configuration object that aggregates " - "the Dependency." )] - CIM_Configuration REF Context; - - [Deprecated { "No value" }, - Key, Description ( - "Note: The use of this element is deprecated. Deprecated " - "description: An aggregated Dependency." )] - CIM_Dependency REF Dependency; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_DeviceSAPImplementation.mof b/build/vendor/dmtf_mof/Core/CIM_DeviceSAPImplementation.mof deleted file mode 100644 index 39fdc36b..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_DeviceSAPImplementation.mof +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DeviceSAPImplementation -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Device" ), - Description ( - "An association between a ServiceAccessPoint (SAP) and how it " - "is implemented. The cardinality of this association is " - "many-to-many. A SAP can be provided by more than one " - "LogicalDevice, operating in conjunction. And, any Device can " - "provide more than one ServiceAccessPoint. When many " - "LogicalDevices are associated with a single SAP, it is assumed " - "that these elements operate in conjunction to provide the " - "AccessPoint. If different implementations of a SAP exist, each " - "of these implementations would result in individual " - "instantiations of the ServiceAccessPoint object. These " - "individual instantiations would then have associations to the " - "unique implementations." )] -class CIM_DeviceSAPImplementation : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The LogicalDevice." )] - CIM_LogicalDevice REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The ServiceAccessPoint implemented using the LogicalDevice." - )] - CIM_ServiceAccessPoint REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_DeviceServiceImplementation.mof b/build/vendor/dmtf_mof/Core/CIM_DeviceServiceImplementation.mof deleted file mode 100644 index 70a473f1..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_DeviceServiceImplementation.mof +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DeviceServiceImplementation -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Device" ), - Description ( - "An association between a Service and how it is implemented. " - "The cardinality of this association is many-to-many. A Service " - "can be provided by more than one Logical Device, operating in " - "conjunction. And, any Device can provide more than one " - "Service. When multiple Devices are associated with a single " - "Service, it is assumed that these elements operate in " - "conjunction to provide the Service. If different " - "implementations of a Service exist, each of these " - "implementations would result in individual instantiations of " - "the Service object. These individual instantiations would then " - "have associations to the unique implementations." )] -class CIM_DeviceServiceImplementation : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The LogicalDevice." )] - CIM_LogicalDevice REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The Service implemented using the Logical Device." )] - CIM_Service REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_DeviceStatisticalInformation.mof b/build/vendor/dmtf_mof/Core/CIM_DeviceStatisticalInformation.mof deleted file mode 100644 index 2544f1aa..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_DeviceStatisticalInformation.mof +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DeviceStatisticalInformation -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::Statistics" ), - Description ( - "Statistical information associated with a LogicalDevice or one " - "of its subclasses." )] -class CIM_DeviceStatisticalInformation : CIM_StatisticalInformation { - - [Key, Description ( "The scoping System\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_LogicalDevice.SystemCreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The scoping System\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_LogicalDevice.SystemName" )] - string SystemName; - - [Key, Description ( "The scoping Device\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_LogicalDevice.CreationClassName" )] - string DeviceCreationClassName; - - [Key, Description ( "The scoping Device\'s ID." ), - MaxLen ( 64 ), - Propagated ( "CIM_LogicalDevice.DeviceID" )] - string DeviceID; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Override ( "Name" ), - Description ( - "The Name property, inherited from " - "StatisticalInformation, serves as part of the object " - "key." ), - MaxLen ( 256 )] - string Name; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_DeviceStatistics.mof b/build/vendor/dmtf_mof/Core/CIM_DeviceStatistics.mof deleted file mode 100644 index 6a60ed92..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_DeviceStatistics.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DeviceStatistics -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::Statistics" ), - Description ( - "DeviceStatistics relates the DeviceStatisticalInformation " - "class to the LogicalDevice to which it applies." )] -class CIM_DeviceStatistics : CIM_Statistics { - - [Override ( "Stats" ), - Weak, Description ( "The statistical object." )] - CIM_DeviceStatisticalInformation REF Stats; - - [Override ( "Element" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The Device to which the statistics apply." )] - CIM_LogicalDevice REF Element; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ElementAllocatedFromPool.mof b/build/vendor/dmtf_mof/Core/CIM_ElementAllocatedFromPool.mof deleted file mode 100644 index ff3e3810..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ElementAllocatedFromPool.mof +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Association, Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::Resource" ), - Description ( - "ElementAllocatedFromPool associates an instance of " - "CIM_LogicalElement representing an allocated Resource with the " - "CIM_ResourcePool from which it was allocated." )] -class CIM_ElementAllocatedFromPool : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The resource pool." )] - CIM_ResourcePool REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The allocated resource." )] - CIM_LogicalElement REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ElementCapabilities.mof b/build/vendor/dmtf_mof/Core/CIM_ElementCapabilities.mof deleted file mode 100644 index 2d37376d..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ElementCapabilities.mof +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Association, Version ( "2.24.0" ), - UMLPackagePath ( "CIM::Core::Capabilities" ), - Description ( - "ElementCapabilities represents the association between " - "ManagedElements and their Capabilities. Note that the " - "cardinality of the ManagedElement reference is Min(1). This " - "cardinality mandates the instantiation of the " - "ElementCapabilities association for the referenced instance of " - "Capabilities. ElementCapabilities describes the existence " - "requirements and context for the referenced instance of " - "ManagedElement. Specifically, the ManagedElement MUST exist " - "and provides the context for the Capabilities." )] -class CIM_ElementCapabilities { - - [Key, Min ( 1 ), - Description ( "The managed element." )] - CIM_ManagedElement REF ManagedElement; - - [Key, Description ( - "The Capabilities object associated with the element." )] - CIM_Capabilities REF Capabilities; - - [Description ( - "Characteristics provides descriptive information about " - "the Capabilities. when the value 2 \"Default\" is " - "specified, the associated Capabilities shall represent " - "the default capabilities of the associated Managed " - "Element \n" - "when the value 2 \"Default\" is not specified, the " - "Capabilities instance may represent the default " - "capabilities of the Managed Element\n" - "When the value 3 \"Current\" is specified, the " - "associated Capabilities shall represent the current " - "capabilities of the associated Managed Element\n" - "When the value 3 \"Current\" is not specified, the " - "Capabilities instance may represent the current " - "capabilities of the Managed Element." ), - ValueMap { "2", "3", "..", "32768..65535" }, - Values { "Default", "Current", "DMTF Reserved", - "Vendor Specific" }] - uint16 Characteristics[]; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ElementConfiguration.mof b/build/vendor/dmtf_mof/Core/CIM_ElementConfiguration.mof deleted file mode 100644 index d8ba3932..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ElementConfiguration.mof +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Deprecate -// class. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ElementConfiguration -// ================================================================== - [Association, Deprecated { "CIM_ElementSettingData", - "CIM_ElementSetting" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Settings" ), - Description ( - "Note: The Configuration class is being deprecated in lieu of " - "using a ConcreteComponent relationship to indicate a hierarchy " - "of Setting or SettingData instances. This association allows " - "the reuse of the element to Setting or SettingData " - "associations instead of defining a peer association " - "specifically for Configurations. \n" - "Deprecated description: This association relates a " - "Configuration object to one or more ManagedSystemElements. The " - "Configuration object represents a certain behavior or a " - "desired functional state for the associated " - "ManagedSystemElements." )] -class CIM_ElementConfiguration { - - [Deprecated { "CIM_ElementSettingData.ManagedElement", - "CIM_ElementSetting.Element" }, - Key, Description ( - "Note: The use of this element is deprecated. Deprecated " - "description: The ManagedSystemElement." )] - CIM_ManagedSystemElement REF Element; - - [Deprecated { "CIM_ElementSettingData.SettingData", - "CIM_ElementSetting.Setting" }, - Key, Description ( - "Note: The use of this element is deprecated. Deprecated " - "description: The Configuration object that groups the " - "Settings and dependencies that are associated with the " - "ManagedSystemElement." )] - CIM_Configuration REF Configuration; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ElementLocation.mof b/build/vendor/dmtf_mof/Core/CIM_ElementLocation.mof deleted file mode 100644 index c228fead..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ElementLocation.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ElementLocation -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Physical" ), - Description ( - "ElementLocation associates a ManagedElement with a location " - "for positioning, inventory, maintenance and similar purposes. " - "PhysicalElements can certainly have locations. They are " - "explicitly defined in a subclass, PhysicalElement Location. " - "However, other ManagedElements can also be associated with " - "locations. For example, Organizations can be \'in\' one or " - "more locations, or Services can be restricted to a location." )] -class CIM_ElementLocation { - - [Key, Description ( - "The ManagedElement whose location is specified." )] - CIM_ManagedElement REF Element; - - [Key, Description ( "The location of the element." )] - CIM_Location REF PhysicalLocation; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ElementProfile.mof b/build/vendor/dmtf_mof/Core/CIM_ElementProfile.mof deleted file mode 100644 index d779d20c..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ElementProfile.mof +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Deprecate -// class. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ElementProfile -// ================================================================== - [Association, Deprecated { "CIM_ElementSettingData", - "CIM_ElementSetting" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Settings" ), - Description ( - "Note: The Profile class is being deprecated in lieu of using a " - "ConcreteComponent relationship to indicate a hierarchy of " - "Setting or SettingData instances. This relationship allows the " - "reuse of the element to Setting or SettingData associations " - "instead of defining a peer association specifically for " - "Profiles. \n" - "Deprecated description: ElementProfile represents the " - "association between ManagedElements and the Profiles " - "(collection of settings) that are defined for them. This " - "association indicates that the settings that are collected by " - "the Profile apply to the associated ManagedElement." )] -class CIM_ElementProfile { - - [Deprecated { "CIM_ElementSettingData.ManagedElement", - "CIM_ElementSetting.Element" }, - Key, Description ( - "Note: The use of this element is deprecated. Deprecated " - "description: The managed element." )] - CIM_ManagedElement REF ManagedElement; - - [Deprecated { "CIM_ElementSettingData.SettingData", - "CIM_ElementSetting.Setting" }, - Key, Description ( - "Note: The use of this object is deprecated. Deprecated " - "description: The Profile object that is associated with " - "the element." )] - CIM_Profile REF Profile; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ElementSetting.mof b/build/vendor/dmtf_mof/Core/CIM_ElementSetting.mof deleted file mode 100644 index 41a8c811..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ElementSetting.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ElementSetting -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Settings" ), - Description ( - "ElementSetting represents the association between " - "ManagedSystemElements and the Setting classes defined for " - "them." )] -class CIM_ElementSetting { - - [Key, Description ( "The ManagedSystemElement." )] - CIM_ManagedSystemElement REF Element; - - [Key, Description ( - "The Setting object that is associated with the " - "ManagedSystemElement." )] - CIM_Setting REF Setting; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ElementSettingData.mof b/build/vendor/dmtf_mof/Core/CIM_ElementSettingData.mof deleted file mode 100644 index 0c32ebe7..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ElementSettingData.mof +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Association, Version ( "2.19.1" ), - UMLPackagePath ( "CIM::Core::Settings" ), - Description ( - "ElementSettingData represents the association between " - "ManagedElements and applicable setting data. This association " - "also describes whether this is a default or current setting." )] -class CIM_ElementSettingData { - - [Key, Description ( "The managed element." )] - CIM_ManagedElement REF ManagedElement; - - [Key, Description ( - "The SettingData object associated with the element." )] - CIM_SettingData REF SettingData; - - [Description ( - "An enumerated integer indicating that the referenced " - "setting is a default setting for the element, or that " - "this information is unknown." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "Is Default", "Is Not Default" }] - uint16 IsDefault; - - [Description ( - "An enumerated integer indicating that the referenced " - "setting is currently being used in the operation of the " - "element, or that this information is unknown." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "Is Current", "Is Not Current" }] - uint16 IsCurrent; - - [Description ( - "An enumerated integer indicating whether or not the " - "referenced setting is the next setting to be applied. " - "For example, the application could take place on a " - "re-initialization, reset, reconfiguration request. This " - "could be a permanent setting, or a setting used only one " - "time, as indicated by the flag. If it is a permanent " - "setting then the setting is applied every time the " - "managed element reinitializes, until this flag is " - "manually reset. However, if it is single use, then the " - "flag is automatically cleared after the settings are " - "applied. Also note that if this flag is specified (i.e. " - "set to value other than \"Unknown\"), then this takes " - "precedence over any SettingData that may have been " - "specified as Default. For example: If the managed " - "element is a computer system, and the value of this flag " - "is \"Is Next\", then the setting will be effective next " - "time the system resets. And, unless this flag is " - "changed, it will persist for subsequent system resets. " - "However, if this flag is set to \"Is Next For Single " - "Use\", then this setting will only be used once and the " - "flag would be reset after that to \"Is Not Next\". So, " - "in the above example, if the system reboots in a quick " - "succession, the setting will not be used at the second " - "reboot." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Is Next", "Is Not Next", - "Is Next For Single Use" }] - uint16 IsNext; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ElementSoftwareIdentity.mof b/build/vendor/dmtf_mof/Core/CIM_ElementSoftwareIdentity.mof deleted file mode 100644 index 3e8691c6..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ElementSoftwareIdentity.mof +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Association, Version ( "2.20.0" ), - UMLPackagePath ( "CIM::Core::Software" ), - Description ( - "ElementSoftwareIdentity allows a Managed Element to report its " - "software related asset information (firmware, drivers, " - "configuration software, and etc.)" )] -class CIM_ElementSoftwareIdentity : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "A LogicalElement\'s Software Asset." )] - CIM_SoftwareIdentity REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The ManagedElement that requires or uses the software." )] - CIM_ManagedElement REF Dependent; - - [Description ( - "Indicates the element\'s ability to upgrade this " - "software asset.\n" - "\'Resides off element\'(2), indicates the persistence of " - "the software is outside of the element. Typically for a " - "element this software is part of the OperatingSystem is " - "typically upgradeable.\n" - "\'Owner Upgradeable\' (3), indicates the persistence of " - "the software is on the element and is upgradeable by the owner.\n" - "\'FactoryUpgradeable\' (4),indicates the persistence of " - "the software is on the element and is upgradeable by the manufacturer.\n" - "\'Not Upgradeable\' (5), indicates the presistence of " - "the software is on the element and is not upgradeable. " - "(i.e. burned into a non replaceable ROM chip." ), - ValueMap { "0", "1", "2", "3", "4", "5", "..", - "0x8000..0xFFFF" }, - Values { "Unknown", "Other", "Resides off device", - "Owner Upgradeable", "Factory Upgradeable", - "Not Upgradeable", "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { - "CIM_ElementSoftwareIdentity.OtherUpgradeCondition" }] - uint16 UpgradeCondition; - - [Description ( - "Describes the upgrade condition, when UpgradeCondition " - "is set to 1 (\"Other\")." ), - ModelCorrespondence { - "CIM_ElementSoftwareIdentity.UpgradeCondition" }] - string OtherUpgradeCondition; - - [Description ( - "A collection of properties describing the status of the " - "software on the managed element. Multiple properties " - "could be set at the same time. For example a " - "ElementSoftwareStatus could have \"Installed\", " - "\"Default\", \"Current\" and \"FallBack\" set at the " - "same time. \n" - "\"Current\" indicates that the software is currently " - "running on or for the Managed Element. \n" - "\"Next\" indicates that the software will run after the " - "next reset or reboot unless superseded by a software " - "with a status of \"SingleUse\". \n" - "\"FallBack\" indicates that the software will be run if " - "the software which has a status of \"Next\" or " - "\"SingleUse\" fails to run. \n" - "\"Default\" indicates the default version of the " - "software that was originally shipped by the " - "manufacturer. \n" - "\"Installed\" indicates that the software is " - "persistently located and is available for use on the " - "Managed Element. \n" - "\"SingleUse\" indicates that the software will run only " - "after the next reset or reboot but will not run after " - "the subsequent reset or reboot. \n" - "\"Available\" indicates that the software is available " - "for installation on the Managed Element. \n" - "\"Supports\"indicates that the software will work with " - "or operate the Managed Element but is or will be " - "installed on a different Managed Element." ), - ValueMap { "0", "2", "3", "4", "5", "6", "7", "8", "9", "..", - "32768..65535" }, - Values { "Unknown", "Current", "Next", "FallBack", "Default", - "Installed", "Single Use", "Available", "Supports", - "DMTF Reserved", "Vendor Reserved" }] - uint16 ElementSoftwareStatus[]; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ElementStatisticalData.mof b/build/vendor/dmtf_mof/Core/CIM_ElementStatisticalData.mof deleted file mode 100644 index 0f7e8dd6..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ElementStatisticalData.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ElementStatisticalData -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Core::Statistics" ), - Description ( - "CIM_ElementStatisticalData is an association that relates a " - "ManagedElement to its StatisticalData. Note that the " - "cardinality of the ManagedElement reference is Min(1), Max(1). " - "This cardinality mandates the instantiation of the " - "ElementStatisticalData association for the referenced instance " - "of CIM_StatisticalData. ElementStatisticalData describes the " - "existence requirements and context for the " - "CIM_StatisticalData, relative to a specific ManagedElement." )] -class CIM_ElementStatisticalData { - - [Key, Min ( 1 ), - Max ( 1 ), - Description ( - "The ManagedElement for which statistical or metric data " - "is defined." )] - CIM_ManagedElement REF ManagedElement; - - [Key, Description ( "The statistic information/object." )] - CIM_StatisticalData REF Stats; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_EnabledLogicalElement.mof b/build/vendor/dmtf_mof/Core/CIM_EnabledLogicalElement.mof deleted file mode 100644 index cf7da73b..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_EnabledLogicalElement.mof +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Abstract, Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::CoreElements" ), - Description ( - "This class extends LogicalElement to abstract the concept of " - "an element that is enabled and disabled, such as a " - "LogicalDevice or a ServiceAccessPoint." )] -class CIM_EnabledLogicalElement : CIM_LogicalElement { - - [Description ( - "EnabledState is an integer enumeration that indicates " - "the enabled and disabled states of an element. It can " - "also indicate the transitions between these requested " - "states. For example, shutting down (value=4) and " - "starting (value=10) are transient states between enabled " - "and disabled. The following text briefly summarizes the " - "various enabled and disabled states: \n" - "Enabled (2) indicates that the element is or could be " - "executing commands, will process any queued commands, " - "and queues new requests. \n" - "Disabled (3) indicates that the element will not execute " - "commands and will drop any new requests. \n" - "Shutting Down (4) indicates that the element is in the " - "process of going to a Disabled state. \n" - "Not Applicable (5) indicates the element does not " - "support being enabled or disabled. \n" - "Enabled but Offline (6) indicates that the element might " - "be completing commands, and will drop any new requests. \n" - "Test (7) indicates that the element is in a test state. \n" - "Deferred (8) indicates that the element might be " - "completing commands, but will queue any new requests. \n" - "Quiesce (9) indicates that the element is enabled but in " - "a restricted mode.\n" - "Starting (10) indicates that the element is in the " - "process of going to an Enabled state. New requests are " - "queued." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11..32767", "32768..65535" }, - Values { "Unknown", "Other", "Enabled", "Disabled", - "Shutting Down", "Not Applicable", "Enabled but Offline", - "In Test", "Deferred", "Quiesce", "Starting", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { - "CIM_EnabledLogicalElement.OtherEnabledState" }] - uint16 EnabledState = 5; - - [Description ( - "A string that describes the enabled or disabled state of " - "the element when the EnabledState property is set to 1 " - "(\"Other\"). This property must be set to null when " - "EnabledState is any value other than 1." ), - ModelCorrespondence { "CIM_EnabledLogicalElement.EnabledState" }] - string OtherEnabledState; - - [Description ( - "RequestedState is an integer enumeration that indicates " - "the last requested or desired state for the element, " - "irrespective of the mechanism through which it was " - "requested. The actual state of the element is " - "represented by EnabledState. This property is provided " - "to compare the last requested and current enabled or " - "disabled states. Note that when EnabledState is set to 5 " - "(\"Not Applicable\"), then this property has no meaning. " - "Refer to the EnabledState property description for " - "explanations of the values in the RequestedState " - "enumeration. \n" - "\"Unknown\" (0) indicates the last requested state for " - "the element is unknown.\n" - "Note that the value \"No Change\" (5) has been " - "deprecated in lieu of indicating the last requested " - "state is \"Unknown\" (0). If the last requested or " - "desired state is unknown, RequestedState should have the " - "value \"Unknown\" (0), but may have the value \"No " - "Change\" (5).Offline (6) indicates that the element has " - "been requested to transition to the Enabled but Offline " - "EnabledState. \n" - "It should be noted that there are two new values in " - "RequestedState that build on the statuses of " - "EnabledState. These are \"Reboot\" (10) and \"Reset\" " - "(11). Reboot refers to doing a \"Shut Down\" and then " - "moving to an \"Enabled\" state. Reset indicates that the " - "element is first \"Disabled\" and then \"Enabled\". The " - "distinction between requesting \"Shut Down\" and " - "\"Disabled\" should also be noted. Shut Down requests an " - "orderly transition to the Disabled state, and might " - "involve removing power, to completely erase any existing " - "state. The Disabled state requests an immediate " - "disabling of the element, such that it will not execute " - "or accept any commands or processing requests. \n" - "\n" - "This property is set as the result of a method " - "invocation (such as Start or StopService on " - "CIM_Service), or can be overridden and defined as " - "WRITEable in a subclass. The method approach is " - "considered superior to a WRITEable property, because it " - "allows an explicit invocation of the operation and the " - "return of a result code. \n" - "\n" - "If knowledge of the last RequestedState is not supported " - "for the EnabledLogicalElement, the property shall be " - "NULL or have the value 12 \"Not Applicable\"." ), - ValueMap { "0", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "..", "32768..65535" }, - Values { "Unknown", "Enabled", "Disabled", "Shut Down", - "No Change", "Offline", "Test", "Deferred", "Quiesce", - "Reboot", "Reset", "Not Applicable", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { "CIM_EnabledLogicalElement.EnabledState" }] - uint16 RequestedState = 12; - - [Write, Description ( - "An enumerated value indicating an administrator\'s " - "default or startup configuration for the Enabled State " - "of an element. By default, the element is \"Enabled\" " - "(value=2)." ), - ValueMap { "2", "3", "5", "6", "7", "9", "..", "32768..65535" }, - Values { "Enabled", "Disabled", "Not Applicable", - "Enabled but Offline", "No Default", "Quiesce", - "DMTF Reserved", "Vendor Reserved" }] - uint16 EnabledDefault = 2; - - [Description ( - "The date or time when the EnabledState of the element " - "last changed. If the state of the element has not " - "changed and this property is populated, then it must be " - "set to a 0 interval value. If a state change was " - "requested, but rejected or not yet processed, the " - "property must not be updated." )] - datetime TimeOfLastStateChange; - - [Description ( - "AvailableRequestedStates indicates the possible values " - "for the RequestedState parameter of the method " - "RequestStateChange, used to initiate a state change. The " - "values listed shall be a subset of the values contained " - "in the RequestedStatesSupported property of the " - "associated instance of " - "CIM_EnabledLogicalElementCapabilities where the values " - "selected are a function of the current state of the " - "CIM_EnabledLogicalElement. This property may be non-null " - "if an implementation is able to advertise the set of " - "possible values as a function of the current state. This " - "property shall be null if an implementation is unable to " - "determine the set of possible values as a function of " - "the current state." ), - ValueMap { "2", "3", "4", "6", "7", "8", "9", "10", "11", ".." }, - Values { "Enabled", "Disabled", "Shut Down", "Offline", - "Test", "Defer", "Quiesce", "Reboot", "Reset", - "DMTF Reserved" }, - ModelCorrespondence { - "CIM_EnabledLogicalElement.RequestStateChange", - "CIM_EnabledLogicalElementCapabilities.RequestedStatesSupported" }] - uint16 AvailableRequestedStates[]; - - [Description ( - "TransitioningToState indicates the target state to which " - "the instance is transitioning. \n" - "A value of 5 \"No Change\" shall indicate that no " - "transition is in progress.A value of 12 \"Not " - "Applicable\" shall indicate the implementation does not " - "support representing ongoing transitions. \n" - "A value other than 5 or 12 shall identify the state to " - "which the element is in the process of transitioning." ), - ValueMap { "0", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", ".." }, - Values { "Unknown", "Enabled", "Disabled", "Shut Down", - "No Change", "Offline", "Test", "Defer", "Quiesce", - "Reboot", "Reset", "Not Applicable", "DMTF Reserved" }, - ModelCorrespondence { - "CIM_EnabledLogicalElement.RequestStateChange", - "CIM_EnabledLogicalElement.RequestedState", - "CIM_EnabledLogicalElement.EnabledState" }] - uint16 TransitioningToState = 12; - - - [Description ( - "Requests that the state of the element be changed to the " - "value specified in the RequestedState parameter. When " - "the requested state change takes place, the EnabledState " - "and RequestedState of the element will be the same. " - "Invoking the RequestStateChange method multiple times " - "could result in earlier requests being overwritten or " - "lost. \n" - "A return code of 0 shall indicate the state change was " - "successfully initiated. \n" - "A return code of 3 shall indicate that the state " - "transition cannot complete within the interval specified " - "by the TimeoutPeriod parameter. \n" - "A return code of 4096 (0x1000) shall indicate the state " - "change was successfully initiated, a ConcreteJob has " - "been created, and its reference returned in the output " - "parameter Job. Any other return code indicates an error " - "condition." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", - "4097", "4098", "4099", "4100..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown or Unspecified Error", - "Cannot complete within Timeout Period", "Failed", - "Invalid Parameter", "In Use", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Invalid State Transition", - "Use of Timeout Parameter Not Supported", "Busy", - "Method Reserved", "Vendor Specific" }, - ModelCorrespondence { - "CIM_EnabledLogicalElement.RequestedState" }] - uint32 RequestStateChange( - [IN, Description ( - "The state requested for the element. This " - "information will be placed into the RequestedState " - "property of the instance if the return code of the " - "RequestStateChange method is 0 (\'Completed with " - "No Error\'), or 4096 (0x1000) (\'Job Started\'). " - "Refer to the description of the EnabledState and " - "RequestedState properties for the detailed " - "explanations of the RequestedState values." ), - ValueMap { "2", "3", "4", "6", "7", "8", "9", "10", - "11", "..", "32768..65535" }, - Values { "Enabled", "Disabled", "Shut Down", "Offline", - "Test", "Defer", "Quiesce", "Reboot", "Reset", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { - "CIM_EnabledLogicalElement.RequestedState" }] - uint16 RequestedState, - [IN ( false ), OUT, Description ( - "May contain a reference to the ConcreteJob created " - "to track the state transition initiated by the " - "method invocation." )] - CIM_ConcreteJob REF Job, - [IN, Description ( - "A timeout period that specifies the maximum amount " - "of time that the client expects the transition to " - "the new state to take. The interval format must be " - "used to specify the TimeoutPeriod. A value of 0 or " - "a null parameter indicates that the client has no " - "time requirements for the transition. \n" - "If this property does not contain 0 or null and " - "the implementation does not support this " - "parameter, a return code of \'Use Of Timeout " - "Parameter Not Supported\' shall be returned." )] - datetime TimeoutPeriod); - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_EnabledLogicalElementCapabilities.mof b/build/vendor/dmtf_mof/Core/CIM_EnabledLogicalElementCapabilities.mof deleted file mode 100644 index 2fe72cda..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_EnabledLogicalElementCapabilities.mof +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::Capabilities" ), - Description ( - "EnabledLogicalElementCapabilities describes the capabilities " - "supported for changing the state of the associated " - "EnabledLogicalElement." )] -class CIM_EnabledLogicalElementCapabilities : CIM_Capabilities { - - [Description ( - "Boolean indicating whether the ElementName can be modified." - ), - MappingStrings { - "FC-SWAPI.INCITS-T11|SWAPI_UNIT_CONFIG_CAPS_T|EditName" }, - ModelCorrespondence { "CIM_ManagedElement.ElementName" }] - boolean ElementNameEditSupported; - - [Description ( "Maximum supported ElementName length." ), - MaxValue ( 256 ), - MappingStrings { - "FC-SWAPI.INCITS-T11|SWAPI_UNIT_CONFIG_CAPS_T|MaxNameChars" }, - ModelCorrespondence { - "CIM_FCSwitchCapabilities.ElementNameEditSupported", - "CIM_EnabledLogicalElementCapabilities.ElementNameMask" }] - uint16 MaxElementNameLen; - - [Description ( - "RequestedStatesSupported indicates the possible states " - "that can be requested when using the method " - "RequestStateChange on the EnabledLogicalElement." ), - ValueMap { "2", "3", "4", "6", "7", "8", "9", "10", "11" }, - Values { "Enabled", "Disabled", "Shut Down", "Offline", - "Test", "Defer", "Quiesce", "Reboot", "Reset" }, - ModelCorrespondence { - "CIM_EnabledLogicalElement.RequestStateChange" }] - uint16 RequestedStatesSupported[]; - - [Description ( - "This string expresses the restrictions on " - "ElementName.The mask is expressed as a regular " - "expression.See DMTF standard ABNF with the Management " - "Profile Specification Usage Guide, appendix C for the " - "regular expression syntax permitted. \n" - "Since the ElementNameMask can describe the maximum " - "length of the ElementName,any length defined in the " - "regexp is in addition to the restriction defined in " - "MaxElementNameLen (causing the smaller value to be the " - "maximum length) The ElementName value satisfies the " - "restriction, if and only if it matches the regular " - "expression" ), - ModelCorrespondence { - "CIM_EnabledLogicalElementCapabilities.MaxElementNameLen" }] - string ElementNameMask; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_EthernetPortAllocationSettingData.mof b/build/vendor/dmtf_mof/Core/CIM_EthernetPortAllocationSettingData.mof deleted file mode 100644 index 97040006..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_EthernetPortAllocationSettingData.mof +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2010 DMTF. All rights reserved. - [Version ( "2.26.0" ), - UMLPackagePath ( "CIM::Core::Resource" ), - Description ( - "The EthernetPortAllocationSettingData class represents " - "settings specifically related to the allocation of an " - "EthernetPort that are outside the scope of the EthernetPort " - "CIM class itselfThese settings are used to provide information " - "specific to the resource itself." )] -class CIM_EthernetPortAllocationSettingData : CIM_ResourceAllocationSettingData { - - [Description ( - "The desired VLAN mode that is requested for use. This " - "property is usedto set the initial " - "OperationalEndpointMode property value in theinstance of " - "CIM_VLANEndpoint associated with the targeted Ethernet " - "Port.Refer to the description for the property " - "OperationalEndpointMode inCIM_VLANEndpoint for a " - "description of the values" ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", - "0x8000..0xFFFF" }, - Values { "DMTF Reserved", "Other", "Access", "Dynamic Auto", - "Dynamic Desirable", "Trunk", "Dot1Q Tunnel", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { - "CIM_VLANEndpoint.OperationalEndpointMode", - "CIM_VLANEndpoint.DesiredEndpointMode", - "CIM_EthernetPortAllocationSettingData.OtherEndpointMode" }] - uint16 DesiredVLANEndpointMode; - - [Description ( - "A string describing the type of VLAN endpoint model that " - "is supported by this VLANEndpoint, when the value of the " - "mode property is set to 1 (i.e., \"Other\"). This " - "property should be set to NULL when the mode property is " - "any value other than 1." ), - ModelCorrespondence { - "CIM_EthernetPortAllocationSettingData.DesiredVLANEndpointMode" }] - string OtherEndpointMode; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ExtentRedundancyComponent.mof b/build/vendor/dmtf_mof/Core/CIM_ExtentRedundancyComponent.mof deleted file mode 100644 index 113e320e..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ExtentRedundancyComponent.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Deprecated -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ExtentRedundancyComponent -// ================================================================== - [Association, Deprecated { "CIM_MemberOfCollection" }, - Aggregation, Version ( "2.13.0" ), - UMLPackagePath ( "CIM::Core::Redundancy" ), - Description ( - "Describes the StorageExtents participating in a Storage " - "RedundancyGroup. \n" - "The use of this class is being deprecated in lieu of using " - "MemberOfCollection in conjunction with StorageRedundancySet." )] -class CIM_ExtentRedundancyComponent : CIM_RedundancyComponent { - - [Deprecated { "CIM_MemberOfCollection.Collection" }, - Aggregate, Override ( "GroupComponent" ), - Description ( "The StorageRedundancyGroup." )] - CIM_StorageRedundancyGroup REF GroupComponent; - - [Deprecated { "CIM_MemberOfCollection.Member" }, - Override ( "PartComponent" ), - Description ( - "The StorageExtent participating in the RedundancyGroup." )] - CIM_StorageExtent REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ExtraCapacityGroup.mof b/build/vendor/dmtf_mof/Core/CIM_ExtraCapacityGroup.mof deleted file mode 100644 index 327822ff..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ExtraCapacityGroup.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Deprecated { "CIM_RedundancySet" }, - Version ( "2.21.0" ), - UMLPackagePath ( "CIM::Core::Redundancy" ), - Description ( - "A class derived from RedundancyGroup indicating that the " - "aggregated elements have more capacity or capability than is " - "needed. An example of this type of redundancy is the " - "installation of N+1 power supplies or fans in a system. \n" - "The use of this class is being deprecated in lieu of using " - "RedundancySet." )] -class CIM_ExtraCapacityGroup : CIM_RedundancyGroup { - - [Deprecated { "CIM_RedundancySet.MinNumberNeeded" }, - Description ( - "MinNumberNeeded indicates the smallest number of " - "elements that must be operational in order to have " - "redundancy. For example, in an N+1 redundancy " - "relationship, the MinNumberNeeded property should be set " - "equal to N." )] - uint32 MinNumberNeeded; - - [Deprecated { "CIM_RedundancySet.TypeOfSet" }, - Description ( - "Boolean indicating whether load balancing is supported " - "by the ExtraCapacityGroup." )] - boolean LoadBalancedGroup; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_FRU.mof b/build/vendor/dmtf_mof/Core/CIM_FRU.mof deleted file mode 100644 index 84ad30df..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_FRU.mof +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FRU -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::ProductFRU" ), - Description ( - "The CIM_FRU class is a vendor-defined collection of Products " - "and/or PhysicalElements that is associated with a Product for " - "the purpose of supporting, maintaining or upgrading that " - "Product at the customer\'s location. FRU is an acronym for " - "\'field replaceable unit\'." )] -class CIM_FRU : CIM_ManagedElement { - - [Key, Description ( "FRU ordering information." ), - MaxLen ( 64 ), - MappingStrings { "MIF.DMTF|FRU|002.6" }] - string FRUNumber; - - [Key, Description ( - "FRU identification such as a serial number on software " - "or a die number on a hardware chip." ), - MaxLen ( 64 ), - MappingStrings { "MIF.DMTF|FRU|002.7" }] - string IdentifyingNumber; - - [Key, Description ( "The name of the FRU\'s supplier." ), - MaxLen ( 256 ), - MappingStrings { "MIF.DMTF|FRU|002.4" }] - string Vendor; - - [Override ( "Description" ), - Description ( "A textual description of the FRU." ), - MappingStrings { "MIF.DMTF|FRU|002.3" }] - string Description; - - [Description ( "FRU name." ), - MaxLen ( 256 )] - string Name; - - [Description ( "The FRU\'s revision level." ), - MaxLen ( 64 ), - MappingStrings { "MIF.DMTF|FRU|002.8" }] - string RevisionLevel; - - [Description ( - "Indicates whether the FRU is customer replaceable." )] - boolean CustomerReplaceable; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_FRUIncludesProduct.mof b/build/vendor/dmtf_mof/Core/CIM_FRUIncludesProduct.mof deleted file mode 100644 index 3115ac32..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_FRUIncludesProduct.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FRUIncludesProduct -// ================================================================== - [Association, Deprecated { "CIM_ConcreteComponent" }, - Aggregation, Composition, Version ( "2.8.1000" ), - UMLPackagePath ( "CIM::Core::ProductFRU" ), - Description ( - "Indicates that a FRU may be composed of other Product(s). " - "Indicates that a FRU may be composed of other Product(s). The " - "use of this association has been deprecated since the FRU " - "class itself has been deprecated. The composition of " - "ReplacementFRUs is described by the ConcreteComponent " - "association." )] -class CIM_FRUIncludesProduct { - - [Deprecated { "CIM_ConcreteComponent.GroupComponent" }, - Key, Aggregate, Max ( 1 ), - Description ( "The FRU." )] - CIM_FRU REF FRU; - - [Deprecated { "CIM_ConcreteComponent.PartComponent" }, - Key, Description ( "The Product which is a part of the FRU." )] - CIM_Product REF Component; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_FRUPhysicalElements.mof b/build/vendor/dmtf_mof/Core/CIM_FRUPhysicalElements.mof deleted file mode 100644 index 84eef98a..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_FRUPhysicalElements.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FRUPhysicalElements -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Core::ProductFRU" ), - Description ( "Indicates the PhysicalElements that make up a FRU." )] -class CIM_FRUPhysicalElements { - - [Key, Aggregate, Max ( 1 ), - Description ( "The FRU." )] - CIM_FRU REF FRU; - - [Key, Description ( - "The PhysicalElement which is a part of the FRU." )] - CIM_PhysicalElement REF Component; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_HostedAccessPoint.mof b/build/vendor/dmtf_mof/Core/CIM_HostedAccessPoint.mof deleted file mode 100644 index 1e53c35c..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_HostedAccessPoint.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HostedAccessPoint -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Service" ), - Description ( - "CIM_HostedAccessPoint is an association between a Service " - "AccessPoint and the System on which it is provided. The " - "cardinality of this association is one-to-many and is weak " - "with respect to the System. Each System can host many " - "ServiceAccessPoints. Heuristic: If the implementation of the " - "ServiceAccessPoint is modeled, it must be implemented by a " - "Device or SoftwareFeature that is part of the System that is " - "hosting the ServiceAccessPoint." )] -class CIM_HostedAccessPoint : CIM_HostedDependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The hosting System." )] - CIM_System REF Antecedent; - - [Override ( "Dependent" ), - Weak, Description ( - "The SAPs that are hosted on this System." )] - CIM_ServiceAccessPoint REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_HostedCollection.mof b/build/vendor/dmtf_mof/Core/CIM_HostedCollection.mof deleted file mode 100644 index 78cc08a3..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_HostedCollection.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// CPUBS corrections to CoreCollection.mof -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HostedCollection -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Collection" ), - Description ( - "HostedCollection defines a SystemSpecificCollection in the " - "context of a scoping System. It represents a Collection that " - "has meaning only in the context of a System, a Collection " - "whose elements are restricted by the definition of the System, " - "or both of these types of Collections." )] -class CIM_HostedCollection : CIM_HostedDependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The scoping system." )] - CIM_System REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The collection defined in the context of a system." )] - CIM_SystemSpecificCollection REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_HostedDependency.mof b/build/vendor/dmtf_mof/Core/CIM_HostedDependency.mof deleted file mode 100644 index 0866f984..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_HostedDependency.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HostedDependency -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Core::CoreElements" ), - Description ( - "HostedDependency defines a ManagedElement in the context of " - "another ManagedElement in which it resides." )] -class CIM_HostedDependency : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The scoping ManagedElement." )] - CIM_ManagedElement REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The hosted ManagedElement." )] - CIM_ManagedElement REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_HostedResourcePool.mof b/build/vendor/dmtf_mof/Core/CIM_HostedResourcePool.mof deleted file mode 100644 index 9042b17b..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_HostedResourcePool.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Association, Aggregation, Composition, Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::Resource" ), - Description ( - "HostedResourcePool is a specialization of the SystemComponent " - "association that establishes that the ResourcePool is defined " - "in the context of the System" )] -class CIM_HostedResourcePool : CIM_SystemComponent { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The parent system in the association" )] - CIM_System REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The ResourcePool that is a component of the system" )] - CIM_ResourcePool REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_HostedService.mof b/build/vendor/dmtf_mof/Core/CIM_HostedService.mof deleted file mode 100644 index 2c73bf63..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_HostedService.mof +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HostedService -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Service" ), - Description ( - "CIM_HostedService is an association between a Service and the " - "System on which the functionality is located. The cardinality " - "of this association is one-to-many. A System can host many " - "Services. Services are weak with respect to their hosting " - "System. Heuristic: A Service is hosted on the System where the " - "LogicalDevices or SoftwareFeatures that implement the Service " - "are located. The model does not represent Services hosted " - "across multiple systems. The model is as an ApplicationSystem " - "that acts as an aggregation point for Services that are each " - "located on a single host." )] -class CIM_HostedService : CIM_HostedDependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The hosting System." )] - CIM_System REF Antecedent; - - [Override ( "Dependent" ), - Weak, Description ( "The Service hosted on the System." )] - CIM_Service REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_InstalledSoftwareIdentity.mof b/build/vendor/dmtf_mof/Core/CIM_InstalledSoftwareIdentity.mof deleted file mode 100644 index 174b8f6e..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_InstalledSoftwareIdentity.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_InstalledSoftwareIdentity -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Core::Software" ), - Description ( - "The InstalledSoftwareIdentity association identifies the " - "System on which a SoftwareIdentity is installed. This class is " - "a corollary to InstalledSoftwareElement, but deals with the " - "asset aspects of software (as indicated by SoftwareIdentity), " - "versus the deployment aspects (as indicated by " - "SoftwareElement)." )] -class CIM_InstalledSoftwareIdentity { - - [Key, Description ( - "The system on which the software is installed." )] - CIM_System REF System; - - [Key, Description ( "The SoftwareIdentity that is installed." )] - CIM_SoftwareIdentity REF InstalledSoftware; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_IsSpare.mof b/build/vendor/dmtf_mof/Core/CIM_IsSpare.mof deleted file mode 100644 index dbfc6031..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_IsSpare.mof +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Redundancy" ), - Description ( - "The IsSpare association indicates an element that can spare or " - "replace any of the elements in the referenced RedundancySet. " - "If the \'spare\' is itself a Collection, this indicates that " - "each of the \'spare\' members can replace any of the elements " - "in the RedundancySet. In the case of a collection all of the " - "values in the properties of this association MUST apply to all " - "members of the Collection. \n" - "If this is not true, then the Collection SHOULD be broken down " - "into smaller sets (and the IsSpare association defined for " - "each of these smaller sets), such that the properties of this " - "association apply to all collected members." )] -class CIM_IsSpare : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "A ManagedElement or Collection of elements acting as a spare." - )] - CIM_ManagedElement REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The set of elements that ARE spared." )] - CIM_RedundancySet REF Dependent; - - [Description ( - "Indicates the state of the \'spare\'. \n" - "- Hot Standby. The element is available \'immediately\' " - "to become a functioning member of the set. Such an " - "element is powered on and has been initialized for it\'s " - "role as a spare. \n" - "- Cold Standby. The element is not available to join the " - "set without action to prepare it." ), - ValueMap { "0", "2", "3" }, - Values { "Unknown", "Hot Standby", "Cold Standby" }] - uint16 SpareStatus; - - [Description ( - "Indicates whether or not the failover to the spare is a " - "manual or automatic action." ), - ValueMap { "0", "2", "3", "4" }, - Values { "Unknown", "Automatic", "Manual", - "Both Manual and Automatic" }] - uint16 FailoverSupported; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_Job.mof b/build/vendor/dmtf_mof/Core/CIM_Job.mof deleted file mode 100644 index ec903faa..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_Job.mof +++ /dev/null @@ -1,291 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_Job -// ================================================================== - [Abstract, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::CoreElements" ), - Description ( - "A Job is a LogicalElement that represents an executing unit of " - "work, such as a script or a print job. A Job is distinct from " - "a Process in that a Job can be scheduled or queued, and its " - "execution is not limited to a single system." )] -class CIM_Job : CIM_LogicalElement { - - [Description ( - "A free-form string that represents the status of the " - "job. The primary status is reflected in the inherited " - "OperationalStatus property. JobStatus provides " - "additional, implementation-specific details." ), - ModelCorrespondence { - "CIM_ManagedSystemElement.OperationalStatus" }] - string JobStatus; - - [Description ( - "The time that the Job was submitted to execute. A value " - "of all zeroes indicates that the owning element is not " - "capable of reporting a date and time. Therefore, the " - "ScheduledStartTime and StartTime are reported as " - "intervals relative to the time their values are " - "requested." )] - datetime TimeSubmitted; - - [Deprecated { "CIM_Job.RunMonth", "CIM_Job.RunDay", - "CIM_Job.RunDayOfWeek", "CIM_Job.RunStartInterval" }, - Write, Description ( - "The time that the current Job is scheduled to start. " - "This time can be represented by the actual date and " - "time, or an interval relative to the time that this " - "property is requested. A value of all zeroes indicates " - "that the Job is already executing. The property is " - "deprecated in lieu of the more expressive scheduling " - "properties, RunMonth, RunDay, RunDayOfWeek, and " - "RunStartInterval." )] - datetime ScheduledStartTime; - - [Description ( - "The time that the Job was actually started. This time " - "can be represented by an actual date and time, or by an " - "interval relative to the time that this property is " - "requested. Note that this property is also present in " - "the JobProcessingStatistics class. This class is " - "necessary to capture the processing information for " - "recurring Jobs, because only the \'last\' run time can " - "be stored in this single-valued property." )] - datetime StartTime; - - [Description ( - "The time interval that the Job has been executing or the " - "total execution time if the Job is complete. Note that " - "this property is also present in the " - "JobProcessingStatistics class. This class is necessary " - "to capture the processing information for recurring " - "Jobs, because only the \'last\' run time can be stored " - "in this single-valued property." )] - datetime ElapsedTime; - - [Write, Description ( - "The number of times that the Job should be run. A value " - "of 1 indicates that the Job is not recurring, while any " - "non-zero value indicates a limit to the number of times " - "that the Job will recur. Zero indicates that there is no " - "limit to the number of times that the Job can be " - "processed, but that it is terminated either after the " - "UntilTime or by manual intervention. By default, a Job " - "is processed once." )] - uint32 JobRunTimes = 1; - - [Write, Description ( - "The month during which the Job should be processed. " - "Specify 0 for January, 1 for February, and so on." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11" }, - Values { "January", "February", "March", "April", "May", - "June", "July", "August", "September", "October", - "November", "December" }, - ModelCorrespondence { "CIM_Job.RunDay", - "CIM_Job.RunDayOfWeek", "CIM_Job.RunStartInterval" }] - uint8 RunMonth; - - [Write, Description ( - "The day in the month on which the Job should be " - "processed. There are two different interpretations for " - "this property, depending on the value of DayOfWeek. In " - "one case, RunDay defines the day-in-month on which the " - "Job is processed. This interpretation is used when the " - "DayOfWeek is 0. A positive or negative integer indicates " - "whether the RunDay should be calculated from the " - "beginning or end of the month. For example, 5 indicates " - "the fifth day in the RunMonth and -1 indicates the last " - "day in the RunMonth. \n" - "\n" - "When RunDayOfWeek is not 0, RunDay is the day-in-month " - "on which the Job is processed, defined in conjunction " - "with RunDayOfWeek. For example, if RunDay is 15 and " - "RunDayOfWeek is Saturday, then the Job is processed on " - "the first Saturday on or after the 15th day in the " - "RunMonth (for example, the third Saturday in the month). " - "If RunDay is 20 and RunDayOfWeek is -Saturday, then this " - "indicates the first Saturday on or before the 20th day " - "in the RunMonth. If RunDay is -1 and RunDayOfWeek is " - "-Sunday, then this indicates the last Sunday in the " - "RunMonth." ), - MinValue ( -31 ), - MaxValue ( 31 ), - ModelCorrespondence { "CIM_Job.RunMonth", - "CIM_Job.RunDayOfWeek", "CIM_Job.RunStartInterval" }] - sint8 RunDay; - - [Write, Description ( - "A positive or negative integer used in conjunction with " - "RunDay to indicate the day of the week on which the Job " - "is processed. RunDayOfWeek is set to 0 to indicate an " - "exact day of the month, such as March 1. A positive " - "integer (representing Sunday, Monday, ..., Saturday) " - "means that the day of week is found on or after the " - "specified RunDay. A negative integer (representing " - "-Sunday, -Monday, ..., -Saturday) means that the day of " - "week is found on or BEFORE the RunDay." ), - ValueMap { "-7", "-6", "-5", "-4", "-3", "-2", "-1", "0", - "1", "2", "3", "4", "5", "6", "7" }, - Values { "-Saturday", "-Friday", "-Thursday", "-Wednesday", - "-Tuesday", "-Monday", "-Sunday", "ExactDayOfMonth", - "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", - "Friday", "Saturday" }, - ModelCorrespondence { "CIM_Job.RunMonth", "CIM_Job.RunDay", - "CIM_Job.RunStartInterval" }] - sint8 RunDayOfWeek; - - [Write, Description ( - "The time interval after midnight when the Job should be " - "processed. For example, \n" - "00000000020000.000000:000 \n" - "indicates that the Job should be run on or after two " - "o\'clock, local time or UTC time (distinguished using " - "the LocalOrUtcTime property." ), - ModelCorrespondence { "CIM_Job.RunMonth", "CIM_Job.RunDay", - "CIM_Job.RunDayOfWeek", "CIM_Job.RunStartInterval" }] - datetime RunStartInterval; - - [Write, Description ( - "This property indicates whether the times represented in " - "the RunStartInterval and UntilTime properties represent " - "local times or UTC times. Time values are synchronized " - "worldwide by using the enumeration value 2, \"UTC Time\"." ), - ValueMap { "1", "2" }, - Values { "Local Time", "UTC Time" }] - uint16 LocalOrUtcTime; - - [Write, Description ( - "The time after which the Job is invalid or should be " - "stopped. This time can be represented by an actual date " - "and time, or by an interval relative to the time that " - "this property is requested. A value of all nines " - "indicates that the Job can run indefinitely." ), - ModelCorrespondence { "CIM_Job.LocalOrUtcTime" }] - datetime UntilTime; - - [Write, Description ( - "The User who is to be notified upon the Job completion or failure." - )] - string Notify; - - [Description ( - "The User that submitted the Job, or the Service or " - "method name that caused the job to be created." ), - ModelCorrespondence { "CIM_OwningJobElement" }] - string Owner; - - [Write, Description ( - "Indicates the urgency or importance of execution of the " - "Job. The lower the number, the higher the priority. Note " - "that this property is also present in the " - "JobProcessingStatistics class. This class is necessary " - "to capture the setting information that would influence " - "the results of a job." )] - uint32 Priority; - - [Description ( - "The percentage of the job that has completed at the time " - "that this value is requested. Note that this property is " - "also present in the JobProcessingStatistics class. This " - "class is necessary to capture the processing information " - "for recurring Jobs, because only the \'last\' run data " - "can be stored in this single-valued property. \n" - "Note that the value 101 is undefined and will be not be " - "allowed in the next major revision of the specification." ), - Units ( "Percent" ), - MinValue ( 0 ), - MaxValue ( 101 ), - PUnit ( "percent" )] - uint16 PercentComplete; - - [Write, Description ( - "Indicates whether or not the job should be automatically " - "deleted upon completion. Note that the \'completion\' of " - "a recurring job is defined by its JobRunTimes or " - "UntilTime properties, or when the Job is terminated by " - "manual intervention. If this property is set to false " - "and the job completes, then the extrinsic method " - "DeleteInstance must be used to delete the job instead of " - "updating this property." )] - boolean DeleteOnCompletion; - - [Description ( - "A vendor-specific error code. The value must be set to " - "zero if the Job completed without error. Note that this " - "property is also present in the JobProcessingStatistics " - "class. This class is necessary to capture the processing " - "information for recurring Jobs, because only the \'last\' " - "run error can be stored in this single-valued property." ), - ModelCorrespondence { "CIM_Job.ErrorDescription" }] - uint16 ErrorCode; - - [Description ( - "A free-form string that contains the vendor error " - "description. Note that this property is also present in " - "the JobProcessingStatistics class. This class is " - "necessary to capture the processing information for " - "recurring Jobs, because only the \'last\' run error can " - "be stored in this single-valued property." ), - ModelCorrespondence { "CIM_Job.ErrorCode" }] - string ErrorDescription; - - [Description ( - "Describes the recovery action to be taken for an " - "unsuccessfully run Job. The possible values are: \n" - "0 = \"Unknown\", meaning it is unknown as to what " - "recovery action to take \n" - "1 = \"Other\", indicating that the recovery action will " - "be specified in the OtherRecoveryAction property \n" - "2 = \"Do Not Continue\", meaning stop the execution of " - "the job and appropriately update its status \n" - "3 = \"Continue With Next Job\", meaning continue with " - "the next job in the queue \n" - "4 = \"Re-run Job\", indicating that the job should be " - "re-run \n" - "5 = \"Run Recovery Job\", meaning run the Job associated " - "using the RecoveryJob relationship. Note that the " - "recovery Job must already be in the queue from which it " - "will run." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "Do Not Continue", - "Continue With Next Job", "Re-run Job", "Run Recovery Job" }, - ModelCorrespondence { "CIM_Job.OtherRecoveryAction" }] - uint16 RecoveryAction; - - [Description ( - "A string describing the recovery action when the " - "RecoveryAction property of the instance is 1 (\"Other\")." ), - ModelCorrespondence { "CIM_Job.RecoveryAction" }] - string OtherRecoveryAction; - - - [Deprecated { "CIM_ConcreteJob.RequestStateChange()" }, - Description ( - "KillJob is being deprecated because there is no " - "distinction made between an orderly shutdown and an " - "immediate kill. CIM_ConcreteJob.RequestStateChange() " - "provides \'Terminate\' and \'Kill\' options to allow " - "this distinction. \n" - "A method to kill this job and any underlying processes, " - "and to remove any \'dangling\' associations." ), - ValueMap { "0", "1", "2", "3", "4", "6", "7", "..", - "32768..65535" }, - Values { "Success", "Not Supported", "Unknown", "Timeout", - "Failed", "Access Denied", "Not Found", "DMTF Reserved", - "Vendor Specific" }] - uint32 KillJob( - [IN, Description ( - "Indicates whether or not the Job should be " - "automatically deleted upon termination. This " - "parameter takes precedence over the property, " - "DeleteOnCompletion." )] - boolean DeleteOnKill); - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_LastAppliedSnapshot.mof b/build/vendor/dmtf_mof/Core/CIM_LastAppliedSnapshot.mof deleted file mode 100644 index 5c2be7a3..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_LastAppliedSnapshot.mof +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Association, Version ( "2.22.0" ), - Description ( - "The CIM_LastAppliedSnapshot association associates an instance " - "of the CIM_VirtualSystemSettingData class representing a " - "virtual system snapshot that was most recently applied to a " - "virtual system, and the instance of the CIM_ComputerSystem " - "class representing the related virtual system.\n" - "An instance of this assocation indicates that the referenced " - "snapshot is the snapshot the was last applied to the virtual " - "system from the set of snapshots taken from that virtual " - "system. For each virtual system at any time there is at most " - "one snapshot the last applied snapshot." )] -class CIM_LastAppliedSnapshot : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 0 ), - Max ( 1 ), - Description ( - "Reference to the instance of the " - "CIM_VirtualSystemSettingData class representing the " - "virtual system snapshot that was last applied to the " - "virtual system." )] - CIM_VirtualSystemSettingData REF Antecedent; - - [Override ( "Dependent" ), - Min ( 0 ), - Max ( 1 ), - Description ( - "Reference to the instance of the CIM_ComputerSystem " - "class representing the virtual system upon which the " - "virtual system snapshot represented by the instance of " - "the CIM_VirtualSystemSettingData class referenced by the " - "Antecedent property was most recently applied." )] - CIM_ComputerSystem REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_LocalizationCapabilities.mof b/build/vendor/dmtf_mof/Core/CIM_LocalizationCapabilities.mof deleted file mode 100644 index b2d96601..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_LocalizationCapabilities.mof +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Deprecated -// class. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LocalizationCapabilities -// ================================================================== - [Deprecated { "No Value" }, - Version ( "2.11.0" ), - UMLPackagePath ( "CIM::Core::Capabilities" ), - Description ( - "This class is being deprecated to avoid conflicts with " - "localization implementations using CIM/XML over HTTP protocol, " - "the preferred mechanism. \n" - "Describes the input and output localization capabilities of " - "the entity associated via ElementCapabilities." )] -class CIM_LocalizationCapabilities : CIM_Capabilities { - - [Deprecated { "No Value" }, - Description ( - "This property, along with locale properties in (for " - "example) a SettingData class, specifies the locale for " - "data consumed by a ManagedElement. \n" - "A locale indicates a particular geographical, political, " - "or cultural region. The SupportedInputLocales property " - "is an array of strings whose entries specify one or more " - "languages that can be used in the formulation of " - "information input by a client. It may be defined by the " - "ManagedElement or client as an input parameter to a " - "method, as a Setting or SettingData property, or via " - "other mechanisms. \n" - "\n" - "The SupportedInputLocales property publishes an " - "element\'s support of various locales for input data. " - "The first array entry MUST define the default locale " - "(the natural language associated with the " - "ManagedElement). If the SupportedInputLocales property " - "is empty, it is assumed that the default locale is en_US " - "(English). \n" - "Each array entry consists of three sub-strings, " - "separated by underscores: \n" - "- The first sub-string is the language code, as " - "specified in ISO639. \n" - "- The second sub-string is the country code, as " - "specified in ISO3166. \n" - "- The third sub-string is a variant, which is vendor " - "specific. \n" - "For example, US English appears as: \"en_US_WIN\", where " - "the \"WIN\" variant would specify a Windows " - "browser-specific collation (if one exists). Since the " - "variant is not standardized, it is not commonly used and " - "is generally limited to easily recognizable values " - "(\"WIN\", \"UNIX\", \"EURO\", etc.) used in standard " - "environments. \n" - "The language and country codes are required; the variant " - "may be empty." )] - string SupportedInputLocales[]; - - [Deprecated { "No Value" }, - Description ( - "This property, along with locale properties in (for " - "example) a SettingData class, specifies the locale for " - "data produced by a ManagedElement. \n" - "A locale indicates a particular geographical, political, " - "or cultural region. The SupportedOutputLocales property " - "is an array of strings whose entries specify one or more " - "languages that can be used in the formulation of " - "information requested by and delivered to a client. It " - "may be defined by the ManagedElement or client as an " - "input parameter to a method, as a Setting or SettingData " - "property, or via other mechanisms. Note that more than " - "one locale may be specified in this array and later " - "selected for output. If multiple locales are selected, " - "information MUST be returned in each language specified, " - "and indicated as supported by this Capabilities " - "instance. \n" - "\n" - "The SupportedOutputLocales property publishes an " - "element\'s support of various locales for output data. " - "The first array entry MUST define the default locale " - "(the natural language associated with the " - "ManagedElement). If the SupportedOutput Locales property " - "is empty, it is assumed that the default locale is en_US " - "(English). \n" - "Each array entry consists of three sub-strings, " - "separated by underscores: \n" - "- The first sub-string is the language code, as " - "specified in ISO639. \n" - "- The second sub-string is the country code, as " - "specified in ISO3166. \n" - "- The third sub-string is a variant, which is vendor " - "specific. \n" - "For example, US English appears as: \"en_US_WIN\", where " - "the \"WIN\" variant would specify a Windows " - "browser-specific collation (if one exists). Since the " - "variant is not standardized, it is not commonly used and " - "is generally limited to easily recognizable values " - "(\"WIN\", \"UNIX\", \"EURO\", etc.) used in standard " - "environments. \n" - "The language and country codes are required; the variant " - "may be empty." )] - string SupportedOutputLocales[]; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_Location.mof b/build/vendor/dmtf_mof/Core/CIM_Location.mof deleted file mode 100644 index e050079e..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_Location.mof +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Location -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Physical" ), - Description ( - "The Location class specifies the position and address of a " - "PhysicalElement." )] -class CIM_Location : CIM_ManagedElement { - - [Key, Description ( - "Name is a free-form string defining a label for the " - "Location. It is a part of the key for the object." ), - MaxLen ( 256 )] - string Name; - - [Key, Description ( - "Position is a free-form string that indicates the " - "placement of a PhysicalElement. It can specify slot " - "information on a HostingBoard, mounting site in a " - "Cabinet, or latitude and longitude information, for " - "example, from a GPS. It is part of the key of the " - "Location object." ), - MaxLen ( 256 )] - string PhysicalPosition; - - [Description ( - "Address is a free-form string indicating a street, " - "building, or other type of address for the location of " - "the PhysicalElement." ), - MaxLen ( 1024 )] - string Address; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_LogicalDevice.mof b/build/vendor/dmtf_mof/Core/CIM_LogicalDevice.mof deleted file mode 100644 index 0d951e24..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_LogicalDevice.mof +++ /dev/null @@ -1,426 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LogicalDevice -// ================================================================== - [Abstract, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Core::Device" ), - Description ( - "An abstraction or emulation of a hardware entity, that may or " - "may not be Realized in physical hardware. Any characteristics " - "of a LogicalDevice that are used to manage its operation or " - "configuration are contained in, or associated with, the " - "LogicalDevice object. Examples of the operational properties " - "of a Printer would be paper sizes supported, or detected " - "errors. Examples of the configuration properties of a Sensor " - "Device would be threshold settings. Various configurations " - "could exist for a LogicalDevice. These configurations could be " - "contained in Setting objects and associated with the " - "LogicalDevice." )] -class CIM_LogicalDevice : CIM_EnabledLogicalElement { - - [Key, Description ( "The scoping System\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.CreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The scoping System\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.Name" )] - string SystemName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Description ( - "An address or other identifying information to uniquely " - "name the LogicalDevice." ), - MaxLen ( 64 )] - string DeviceID; - - [Deprecated { "CIM_PowerManagementCapabilities" }, - Description ( - "Boolean indicating that the Device can be power managed. " - "The use of this property has been deprecated. Instead, " - "the existence of an associated " - "PowerManagementCapabilities class (associated using the " - "ElementCapabilities relationhip) indicates that power " - "management is supported." )] - boolean PowerManagementSupported; - - [Deprecated { - "CIM_PowerManagementCapabilities.PowerCapabilities" }, - Description ( - "An enumerated array describing the power management " - "capabilities of the Device. The use of this property has " - "been deprecated. Instead, the PowerCapabilites property " - "in an associated PowerManagementCapabilities class " - "should be used." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7" }, - Values { "Unknown", "Not Supported", "Disabled", "Enabled", - "Power Saving Modes Entered Automatically", - "Power State Settable", "Power Cycling Supported", - "Timed Power On Supported" }] - uint16 PowerManagementCapabilities[]; - - [Description ( - "The primary availability and status of the Device. " - "(Additional status information can be specified using " - "the Additional Availability array property.) For " - "example, the Availability property indicates that the " - "Device is running and has full power (value=3), or is in " - "a warning (4), test (5), degraded (10) or power save " - "state (values 13-15 and 17). Regarding the Power Save " - "states, these are defined as follows: Value 13 (\"Power " - "Save - Unknown\") indicates that the Device is known to " - "be in a power save mode, but its exact status in this " - "mode is unknown; 14 (\"Power Save - Low Power Mode\") " - "indicates that the Device is in a power save state but " - "still functioning, and may exhibit degraded performance; " - "15 (\"Power Save - Standby\") describes that the Device " - "is not functioning but could be brought to full power " - "\'quickly\'; and value 17 (\"Power Save - Warning\") " - "indicates that the Device is in a warning state, though " - "also in a power save mode." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "14", "15", "16", "17", "18", "19", - "20", "21" }, - Values { "Other", "Unknown", "Running/Full Power", "Warning", - "In Test", "Not Applicable", "Power Off", "Off Line", - "Off Duty", "Degraded", "Not Installed", "Install Error", - "Power Save - Unknown", "Power Save - Low Power Mode", - "Power Save - Standby", "Power Cycle", - "Power Save - Warning", "Paused", "Not Ready", - "Not Configured", "Quiesced" }, - MappingStrings { "MIF.DMTF|Operational State|006.5", - "MIB.IETF|HOST-RESOURCES-MIB.hrDeviceStatus", - "MIF.DMTF|Host Device|001.5" }, - ModelCorrespondence { - "CIM_LogicalDevice.AdditionalAvailability" }] - uint16 Availability; - - [Deprecated { "CIM_EnabledLogicalElement.EnabledState" }, - Description ( - "The StatusInfo property indicates whether the Logical " - "Device is in an enabled (value = 3), disabled (value = " - "4) or some other (1) or unknown (2) state. If this " - "property does not apply to the LogicalDevice, the value, " - "5 (\"Not Applicable\"), should be used. StatusInfo has " - "been deprecated in lieu of a more clearly named property " - "with additional enumerated values (EnabledState), that " - "is inherited from ManagedSystemElement. \n" - "If a Device is (\"Enabled\")(value=3), it has been " - "powered up, and is configured and operational. The " - "Device may or may not be functionally active, depending " - "on whether its Availability (or AdditionalAvailability) " - "indicate that it is (\"Running/Full Power\")(value=3) or " - "(\"Off line\") (value=8). In an enabled but offline " - "mode, a Device may be performing out-of-band requests, " - "such as running Diagnostics. If (\"Disabled\") " - "StatusInfo value=4), a Device can only be \"enabled\" or " - "powered off. In a personal computer environment, " - "(\"Disabled\") means that the Device\'s driver is not " - "available in the stack. In other environments, a Device " - "can be disabled by removing its configuration file. A " - "disabled device is physically present in a System and " - "consuming resources, but can not be communicated with " - "until a load of a driver, a load of a configuration file " - "or some other \"enabling\" activity has occurred." ), - ValueMap { "1", "2", "3", "4", "5" }, - Values { "Other", "Unknown", "Enabled", "Disabled", - "Not Applicable" }, - MappingStrings { "MIF.DMTF|Operational State|006.4" }] - uint16 StatusInfo; - - [Deprecated { "CIM_DeviceErrorData.LastErrorCode" }, - Description ( - "LastErrorCode captures the last error code reported by " - "the LogicalDevice." )] - uint32 LastErrorCode; - - [Deprecated { "CIM_DeviceErrorData.ErrorDescription" }, - Description ( - "ErrorDescription is a free-form string supplying more " - "information about the error recorded in LastErrorCode, " - "and information on any corrective actions that may be " - "taken." )] - string ErrorDescription; - - [Deprecated { "CIM_ManagedSystemElement.OperationalStatus" }, - Description ( - "ErrorCleared is a boolean property indicating that the " - "error reported in LastErrorCode is now cleared." )] - boolean ErrorCleared; - - [Description ( - "OtherIdentifyingInfo captures additional data, beyond " - "DeviceID information, that could be used to identify a " - "LogicalDevice. One example would be to hold the " - "Operating System\'s user friendly name for the Device in " - "this property." ), - ArrayType ( "Indexed" ), - MaxLen ( 256 ), - ModelCorrespondence { - "CIM_LogicalDevice.IdentifyingDescriptions" }] - string OtherIdentifyingInfo[]; - - [Description ( - "The number of consecutive hours that this Device has " - "been powered, since its last power cycle." ), - Units ( "Hours" ), - Counter] - uint64 PowerOnHours; - - [Description ( - "The total number of hours that this Device has been powered." - ), - Units ( "Hours" ), - Counter] - uint64 TotalPowerOnHours; - - [Description ( - "An array of free-form strings providing explanations and " - "details behind the entries in the OtherIdentifyingInfo " - "array. Note, each entry of this array is related to the " - "entry in OtherIdentifyingInfo that is located at the " - "same index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_LogicalDevice.OtherIdentifyingInfo" }] - string IdentifyingDescriptions[]; - - [Description ( - "Additional availability and status of the Device, beyond " - "that specified in the Availability property. The " - "Availability property denotes the primary status and " - "availability of the Device. In some cases, this will not " - "be sufficient to denote the complete status of the " - "Device. In those cases, the AdditionalAvailability " - "property can be used to provide further information. For " - "example, a Device\'s primary Availability may be \"Off " - "line\" (value=8), but it may also be in a low power " - "state (AdditonalAvailability value=14), or the Device " - "could be running Diagnostics (AdditionalAvailability " - "value=5, \"In Test\")." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "14", "15", "16", "17", "18", "19", - "20", "21" }, - Values { "Other", "Unknown", "Running/Full Power", "Warning", - "In Test", "Not Applicable", "Power Off", "Off Line", - "Off Duty", "Degraded", "Not Installed", "Install Error", - "Power Save - Unknown", "Power Save - Low Power Mode", - "Power Save - Standby", "Power Cycle", - "Power Save - Warning", "Paused", "Not Ready", - "Not Configured", "Quiesced" }, - ModelCorrespondence { "CIM_LogicalDevice.Availability" }] - uint16 AdditionalAvailability[]; - - [Deprecated { "No value" }, - Description ( - "The MaxQuiesceTime property has been deprecated. When " - "evaluating the use of Quiesce, it was determine that " - "this single property is not adequate for describing when " - "a device will automatically exit a quiescent state. In " - "fact, the most likely scenario for a device to exit a " - "quiescent state was determined to be based on the number " - "of outstanding requests queued rather than on a maximum " - "time. This will be re-evaluated and repositioned later. \n" - "Maximum time in milliseconds, that a Device can run in a " - "\"Quiesced\" state. A Device\'s state is defined in its " - "Availability and AdditionalAvailability properties, " - "where \"Quiesced\" is conveyed by the value 21. What " - "occurs at the end of the time limit is device-specific. " - "The Device may unquiesce, may offline or take other " - "action. A value of 0 indicates that a Device can remain " - "quiesced indefinitely." ), - Units ( "MilliSeconds" )] - uint64 MaxQuiesceTime; - - - [Deprecated { "CIM_PowerManagementService.SetPowerState" }, - Description ( - "Sets the power state of the Device. The use of this " - "method has been deprecated. Instead, use the " - "SetPowerState method in the associated " - "PowerManagementService class." )] - uint32 SetPowerState( - [IN, Description ( "The power state to set." ), - ValueMap { "1", "2", "3", "4", "5", "6" }, - Values { "Full Power", "Power Save - Low Power Mode", - "Power Save - Standby", "Power Save - Other", - "Power Cycle", "Power Off" }] - uint16 PowerState, - [IN, Description ( - "Time indicates when the power state should be set, " - "either as a regular date-time value or as an " - "interval value (where the interval begins when the " - "method invocation is received." )] - datetime Time); - - [Description ( - "Requests a reset of the LogicalDevice. The return value " - "should be 0 if the request was successfully executed, 1 " - "if the request is not supported and some other value if " - "an error occurred. In a subclass, the set of possible " - "return codes could be specified, using a ValueMap " - "qualifier on the method. The strings to which the " - "ValueMap contents are \'translated\' may also be " - "specified in the subclass as a Values array qualifier." )] - uint32 Reset( -); - - [Deprecated { "CIM_EnabledLogicalElement.RequestStateChange" }, - Description ( - "The EnableDevice method has been deprecated in lieu of " - "the more general RequestStateChange method that directly " - "overlaps with the functionality provided by this method. \n" - "Requests that the LogicalDevice be enabled (\"Enabled\" " - "input parameter = TRUE) or disabled (= FALSE). If " - "successful, the Device\'s StatusInfo/EnabledState " - "properties should reflect the desired state " - "(enabled/disabled). Note that this method\'s function " - "overlaps with the RequestedState property. " - "RequestedState was added to the model to maintain a " - "record (i.e., a persisted value) of the last state " - "request. Invoking the EnableDevice method should set the " - "RequestedState property appropriately. \n" - "The return code should be 0 if the request was " - "successfully executed, 1 if the request is not supported " - "and some other value if an error occurred. In a " - "subclass, the set of possible return codes could be " - "specified, using a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \'translated\' " - "may also be specified in the subclass as a Values array " - "qualifier." )] - uint32 EnableDevice( - [IN, Description ( - "If TRUE enable the device, if FALSE disable the device." - )] - boolean Enabled); - - [Deprecated { "CIM_EnabledLogicalElement.RequestStateChange" }, - Description ( - "The OnlineDevice method has been deprecated in lieu of " - "the more general RequestStateChange method that directly " - "overlaps with the functionality provided by this method. \n" - "Requests that the LogicalDevice be brought online " - "(\"Online\" input parameter = TRUE) or taken offline (= " - "FALSE). \"Online\" indicates that the Device is ready to " - "accept requests, and is operational and fully " - "functioning. In this case, the Device\'s Availability " - "property would be set to a value of 3 (\"Running/Full " - "Power\"). \"Offline\" indicates that a Device is powered " - "up and operational, but not processing functional " - "requests. In an offline state, a Device may be capable " - "of running diagnostics or generating operational alerts. " - "For example, when the \"Offline\" button is pushed on a " - "Printer, the Device is no longer available to process " - "print jobs, but could be available for diagnostics or " - "maintenance. \n" - "If this method is successful, the Device\'s Availability " - "and AdditionalAvailability properties should reflect the " - "updated status. If a failure occurs trying to bring the " - "Device online or offline, it should remain in its " - "current state. IE, the request, if unsuccessful, should " - "not leave the Device in an indeterminate state. When " - "bringing a Device back \"Online\", from an \"Offline\" " - "mode, the Device should be restored to its last \"Online\" " - "state, if at all possible. Only a Device that has an " - "EnabledState/StatusInfo of \"Enabled\" and has been " - "configured can be brought online or taken offline. \n" - "OnlineDevice should return 0 if successful, 1 if the " - "request is not supported at all, 2 if the request is not " - "supported due to the current state of the Device, and " - "some other value if any other error occurred. In a " - "subclass, the set of possible return codes could be " - "specified, using a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \'translated\' " - "may also be specified in the subclass as a Values array " - "qualifier. \n" - "Note that this method\'s function overlaps with the " - "RequestedState property. RequestedState was added to the " - "model to maintain a record (i.e., a persisted value) of " - "the last state request. Invoking the OnlineDevice method " - "should set the RequestedState property appropriately." )] - uint32 OnlineDevice( - [IN, Description ( - "If TRUE, take the device online, if FALSE, take " - "the device OFFLINE." )] - boolean Online); - - [Deprecated { "CIM_EnabledLogicalElement.RequestStateChange" }, - Description ( - "The QuiesceDevice method has been deprecated in lieu of " - "the more general RequestStateChange method that directly " - "overlaps with the functionality provided by this method. \n" - "Requests that the LogicalDevice cleanly cease all " - "current activity (\"Quiesce\" input parameter = TRUE) or " - "resume activity (= FALSE). For this method to quiesce a " - "Device, that Device should have an Availability (or " - "Additional Availability) of \"Running/Full Power\" " - "(value=3) and an EnabledStatus/StatusInfo of \"Enabled\". " - "For example, if quiesced, a Device may then be offlined " - "for diagnostics, or disabled for power off and hot swap. " - "For the method to \"unquiesce\" a Device, that Device " - "should have an Availability (or AdditionalAvailability) " - "of \"Quiesced\" (value=21) and an " - "EnabledStatus/StatusInfo of \"Enabled\". In this case, " - "the Device would be returned to an \"Enabled\" and " - "\"Running/Full Power\" status. \n" - "The method\'s return code should indicate the success or " - "failure of the quiesce. It should return 0 if " - "successful, 1 if the request is not supported at all, 2 " - "if the request is not supported due to the current state " - "of the Device, and some other value if any other error " - "occurred. In a subclass, the set of possible return " - "codes could be specified, using a ValueMap qualifier on " - "the method. The strings to which the ValueMap contents " - "are \'translated\' may also be specified in the subclass " - "as a Values array qualifier." )] - uint32 QuiesceDevice( - [IN, Description ( - "If set to TRUE then cleanly cease all activity, if " - "FALSE resume activity." )] - boolean Quiesce); - - [Description ( - "Requests that the Device capture its current " - "configuration, setup and/or state information in a " - "backing store. The goal would be to use this information " - "at a later time (via the RestoreProperties method), to " - "return a Device to its present \"condition\". This " - "method may not be supported by all Devices. The method " - "should return 0 if successful, 1 if the request is not " - "supported, and some other value if any other error " - "occurred. In a subclass, the set of possible return " - "codes could be specified, using a ValueMap qualifier on " - "the method. The strings to which the ValueMap contents " - "are \'translated\' may also be specified in the subclass " - "as a Values array qualifier." )] - uint32 SaveProperties( -); - - [Description ( - "Requests that the Device re-establish its configuration, " - "setup and/or state information from a backing store. The " - "intent is to capture this information at an earlier time " - "(via the SaveProperties method), and use it to return a " - "Device to this earlier \"condition\". This method may " - "not be supported by all Devices. The method should " - "return 0 if successful, 1 if the request is not " - "supported, and some other value if any other error " - "occurred. In a subclass, the set of possible return " - "codes could be specified, using a ValueMap qualifier on " - "the method. The strings to which the ValueMap contents " - "are \'translated\' may also be specified in the subclass " - "as a Values array qualifier." )] - uint32 RestoreProperties( -); - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_LogicalElement.mof b/build/vendor/dmtf_mof/Core/CIM_LogicalElement.mof deleted file mode 100644 index f011cd46..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_LogicalElement.mof +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LogicalElement -// ================================================================== - [Abstract, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::CoreElements" ), - Description ( - "CIM_LogicalElement is a base class for all the components of a " - "System that represent abstract system components, such as " - "Files, Processes, or LogicalDevices." )] -class CIM_LogicalElement : CIM_ManagedSystemElement { - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_LogicalIdentity.mof b/build/vendor/dmtf_mof/Core/CIM_LogicalIdentity.mof deleted file mode 100644 index 7568a2a0..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_LogicalIdentity.mof +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LogicalIdentity -// ================================================================== - [Association, Abstract, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::CoreElements" ), - Description ( - "CIM_LogicalIdentity is an abstract and generic association, " - "indicating that two ManagedElements represent different " - "aspects of the same underlying entity. This relationship " - "conveys what could be defined with multiple inheritance. In " - "most scenarios, the Identity relationship is determined by the " - "equivalence of Keys or some other identifying properties of " - "the related Elements. \n" - "\n" - "This relationship is reasonable in several scenarios. For " - "example, it could be used to represent that a LogicalDevice is " - "both a \'bus\' entity and a \'functional\' entity. A Device " - "could be both a USB (bus) and a Keyboard (functional) entity." )] -class CIM_LogicalIdentity { - - [Key, Description ( - "SystemElement represents one aspect of the Managed " - "Element. The use of \'System\' in the role name does not " - "limit the scope of the association. The role name was " - "defined in the original association, where the " - "referenced elements were limited to LogicalElements. " - "Since that time, it has been found valuable to " - "instantiate these types of relationships for " - "ManagedElements, such as Collections. So, the referenced " - "elements of the association were redefined to be " - "ManagedElements. Unfortunately, the role name could not " - "be changed without deprecating the entire association. " - "This was not deemed necessary just to correct the role " - "name." )] - CIM_ManagedElement REF SystemElement; - - [Key, Description ( - "SameElement represents an alternate aspect of the ManagedElement." - )] - CIM_ManagedElement REF SameElement; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ManagedElement.mof b/build/vendor/dmtf_mof/Core/CIM_ManagedElement.mof deleted file mode 100644 index 6fdab9a8..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ManagedElement.mof +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Abstract, Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Core::CoreElements" ), - Description ( - "ManagedElement is an abstract class that provides a common " - "superclass (or top of the inheritance tree) for the " - "non-association classes in the CIM Schema." )] -class CIM_ManagedElement { - - [Description ( - "InstanceID is an optional property that may be used to " - "opaquely and uniquely identify an instance of this class " - "within the scope of the instantiating Namespace. Various " - "subclasses of this class may override this property to " - "make it required, or a key. Such subclasses may also " - "modify the preferred algorithms for ensuring uniqueness " - "that are defined below.\n" - "To ensure uniqueness within the NameSpace, the value of " - "InstanceID should be constructed using the following " - "\"preferred\" algorithm: \n" - ": \n" - "Where and are separated by a colon " - "(:), and where must include a copyrighted, " - "trademarked, or otherwise unique name that is owned by " - "the business entity that is creating or defining the " - "InstanceID or that is a registered ID assigned to the " - "business entity by a recognized global authority. (This " - "requirement is similar to the _ " - "structure of Schema class names.) In addition, to ensure " - "uniqueness, must not contain a colon (:). When " - "using this algorithm, the first colon to appear in " - "InstanceID must appear between and . \n" - " is chosen by the business entity and should " - "not be reused to identify different underlying " - "(real-world) elements. If not null and the above " - "\"preferred\" algorithm is not used, the defining entity " - "must assure that the resulting InstanceID is not reused " - "across any InstanceIDs produced by this or other " - "providers for the NameSpace of this instance. \n" - "If not set to null for DMTF-defined instances, the " - "\"preferred\" algorithm must be used with the " - "set to CIM." )] - string InstanceID; - - [Description ( - "The Caption property is a short textual description " - "(one- line string) of the object." ), - MaxLen ( 64 )] - string Caption; - - [Description ( - "The Description property provides a textual description " - "of the object." )] - string Description; - - [Description ( - "A user-friendly name for the object. This property " - "allows each instance to define a user-friendly name in " - "addition to its key properties, identity data, and " - "description information. \n" - "Note that the Name property of ManagedSystemElement is " - "also defined as a user-friendly name. But, it is often " - "subclassed to be a Key. It is not reasonable that the " - "same property can convey both identity and a " - "user-friendly name, without inconsistencies. Where Name " - "exists and is not a Key (such as for instances of " - "LogicalDevice), the same information can be present in " - "both the Name and ElementName properties. Note that if " - "there is an associated instance of " - "CIM_EnabledLogicalElementCapabilities, restrictions on " - "this properties may exist as defined in ElementNameMask " - "and MaxElementNameLen properties defined in that class." )] - string ElementName; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ManagedSystemElement.mof b/build/vendor/dmtf_mof/Core/CIM_ManagedSystemElement.mof deleted file mode 100644 index 6d03d787..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ManagedSystemElement.mof +++ /dev/null @@ -1,348 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Abstract, Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::CoreElements" ), - Description ( - "CIM_ManagedSystemElement is the base class for the System " - "Element hierarchy. Any distinguishable component of a System " - "is a candidate for inclusion in this class. Examples of system " - "components include: \n" - "- software components such as application servers, databases, " - "and applications \n" - "- operating system components such as files, processes, and " - "threads \n" - "- device components such as disk drives, controllers, " - "processors, and printers \n" - "- physical components such as chips and cards." )] -class CIM_ManagedSystemElement : CIM_ManagedElement { - - [Description ( - "A datetime value that indicates when the object was " - "installed. Lack of a value does not indicate that the " - "object is not installed." ), - MappingStrings { "MIF.DMTF|ComponentID|001.5" }] - datetime InstallDate; - - [Description ( - "The Name property defines the label by which the object " - "is known. When subclassed, the Name property can be " - "overridden to be a Key property." ), - MaxLen ( 1024 )] - string Name; - - [Description ( - "Indicates the current statuses of the element. Various " - "operational statuses are defined. Many of the " - "enumeration\'s values are self-explanatory. However, a " - "few are not and are described here in more detail. \n" - "\"Stressed\" indicates that the element is functioning, " - "but needs attention. Examples of \"Stressed\" states are " - "overload, overheated, and so on. \n" - "\"Predictive Failure\" indicates that an element is " - "functioning nominally but predicting a failure in the " - "near future. \n" - "\"In Service\" describes an element being configured, " - "maintained, cleaned, or otherwise administered. \n" - "\"No Contact\" indicates that the monitoring system has " - "knowledge of this element, but has never been able to " - "establish communications with it. \n" - "\"Lost Communication\" indicates that the ManagedSystem " - "Element is known to exist and has been contacted " - "successfully in the past, but is currently unreachable. \n" - "\"Stopped\" and \"Aborted\" are similar, although the " - "former implies a clean and orderly stop, while the " - "latter implies an abrupt stop where the state and " - "configuration of the element might need to be updated. \n" - "\"Dormant\" indicates that the element is inactive or " - "quiesced. \n" - "\"Supporting Entity in Error\" indicates that this " - "element might be \"OK\" but that another element, on " - "which it is dependent, is in error. An example is a " - "network service or endpoint that cannot function due to " - "lower-layer networking problems. \n" - "\"Completed\" indicates that the element has completed " - "its operation. This value should be combined with either " - "OK, Error, or Degraded so that a client can tell if the " - "complete operation Completed with OK (passed), Completed " - "with Error (failed), or Completed with Degraded (the " - "operation finished, but it did not complete OK or did " - "not report an error). \n" - "\"Power Mode\" indicates that the element has additional " - "power model information contained in the Associated " - "PowerManagementService association. \n" - "OperationalStatus replaces the Status property on " - "ManagedSystemElement to provide a consistent approach to " - "enumerations, to address implementation needs for an " - "array property, and to provide a migration path from " - "today\'s environment to the future. This change was not " - "made earlier because it required the deprecated " - "qualifier. Due to the widespread use of the existing " - "Status property in management applications, it is " - "strongly recommended that providers or instrumentation " - "provide both the Status and OperationalStatus " - "properties. Further, the first value of " - "OperationalStatus should contain the primary status for " - "the element. When instrumented, Status (because it is " - "single-valued) should also provide the primary status of " - "the element." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "..", "0x8000.." }, - Values { "Unknown", "Other", "OK", "Degraded", "Stressed", - "Predictive Failure", "Error", "Non-Recoverable Error", - "Starting", "Stopping", "Stopped", "In Service", - "No Contact", "Lost Communication", "Aborted", "Dormant", - "Supporting Entity in Error", "Completed", "Power Mode", - "DMTF Reserved", "Vendor Reserved" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_ManagedSystemElement.StatusDescriptions" }] - uint16 OperationalStatus[]; - - [Description ( - "Strings describing the various OperationalStatus array " - "values. For example, if \"Stopping\" is the value " - "assigned to OperationalStatus, then this property may " - "contain an explanation as to why an object is being " - "stopped. Note that entries in this array are correlated " - "with those at the same array index in OperationalStatus." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_ManagedSystemElement.OperationalStatus" }] - string StatusDescriptions[]; - - [Deprecated { "CIM_ManagedSystemElement.OperationalStatus" }, - Description ( - "A string indicating the current status of the object. " - "Various operational and non-operational statuses are " - "defined. This property is deprecated in lieu of " - "OperationalStatus, which includes the same semantics in " - "its enumeration. This change is made for 3 reasons: \n" - "1) Status is more correctly defined as an array. This " - "definition overcomes the limitation of describing status " - "using a single value, when it is really a multi-valued " - "property (for example, an element might be OK AND " - "Stopped. \n" - "2) A MaxLen of 10 is too restrictive and leads to " - "unclear enumerated values. \n" - "3) The change to a uint16 data type was discussed when " - "CIM V2.0 was defined. However, existing V1.0 " - "implementations used the string property and did not " - "want to modify their code. Therefore, Status was " - "grandfathered into the Schema. Use of the deprecated " - "qualifier allows the maintenance of the existing " - "property, but also permits an improved definition using " - "OperationalStatus." ), - ValueMap { "OK", "Error", "Degraded", "Unknown", "Pred Fail", - "Starting", "Stopping", "Service", "Stressed", - "NonRecover", "No Contact", "Lost Comm", "Stopped" }, - MaxLen ( 10 )] - string Status; - - [Description ( - "Indicates the current health of the element. This " - "attribute expresses the health of this element but not " - "necessarily that of its subcomponents. The possible " - "values are 0 to 30, where 5 means the element is " - "entirely healthy and 30 means the element is completely " - "non-functional. The following continuum is defined: \n" - "\"Non-recoverable Error\" (30) - The element has " - "completely failed, and recovery is not possible. All " - "functionality provided by this element has been lost. \n" - "\"Critical Failure\" (25) - The element is " - "non-functional and recovery might not be possible. \n" - "\"Major Failure\" (20) - The element is failing. It is " - "possible that some or all of the functionality of this " - "component is degraded or not working. \n" - "\"Minor Failure\" (15) - All functionality is available " - "but some might be degraded. \n" - "\"Degraded/Warning\" (10) - The element is in working " - "order and all functionality is provided. However, the " - "element is not working to the best of its abilities. For " - "example, the element might not be operating at optimal " - "performance or it might be reporting recoverable errors. \n" - "\"OK\" (5) - The element is fully functional and is " - "operating within normal operational parameters and " - "without error. \n" - "\"Unknown\" (0) - The implementation cannot report on " - "HealthState at this time. \n" - "DMTF has reserved the unused portion of the continuum " - "for additional HealthStates in the future." ), - ValueMap { "0", "5", "10", "15", "20", "25", "30", ".." }, - Values { "Unknown", "OK", "Degraded/Warning", - "Minor failure", "Major failure", "Critical failure", - "Non-recoverable error", "DMTF Reserved" }] - uint16 HealthState; - - [Description ( - "CommunicationStatus indicates the ability of the " - "instrumentation to communicate with the underlying " - "ManagedElement. CommunicationStatus consists of one of " - "the following values: Unknown, None, Communication OK, " - "Lost Communication, or No Contact. \n" - "A Null return indicates the implementation (provider) " - "does not implement this property. \n" - "\"Unknown\" indicates the implementation is in general " - "capable of returning this property, but is unable to do " - "so at this time. \n" - "\"Not Available\" indicates that the implementation " - "(provider) is capable of returning a value for this " - "property, but not ever for this particular piece of " - "hardware/software or the property is intentionally not " - "used because it adds no meaningful information (as in " - "the case of a property that is intended to add " - "additional info to another property). \n" - "\"Communication OK \" indicates communication is " - "established with the element, but does not convey any " - "quality of service. \n" - "\"No Contact\" indicates that the monitoring system has " - "knowledge of this element, but has never been able to " - "establish communications with it. \n" - "\"Lost Communication\" indicates that the Managed " - "Element is known to exist and has been contacted " - "successfully in the past, but is currently unreachable." ), - ValueMap { "0", "1", "2", "3", "4", "..", "0x8000.." }, - Values { "Unknown", "Not Available", "Communication OK", - "Lost Communication", "No Contact", "DMTF Reserved", - "Vendor Reserved" }] - uint16 CommunicationStatus; - - [Description ( - "DetailedStatus compliments PrimaryStatus with additional " - "status detail. It consists of one of the following " - "values: Not Available, No Additional Information, " - "Stressed, Predictive Failure, Error, Non-Recoverable " - "Error, SupportingEntityInError. Detailed status is used " - "to expand upon the PrimaryStatus of the element. \n" - "A Null return indicates the implementation (provider) " - "does not implement this property. \n" - "\"Not Available\" indicates that the implementation " - "(provider) is capable of returning a value for this " - "property, but not ever for this particular piece of " - "hardware/software or the property is intentionally not " - "used because it adds no meaningful information (as in " - "the case of a property that is intended to add " - "additional info to another property). \n" - "\"No Additional Information\" indicates that the element " - "is functioning normally as indicated by PrimaryStatus = " - "\"OK\". \n" - "\"Stressed\" indicates that the element is functioning, " - "but needs attention. Examples of \"Stressed\" states are " - "overload, overheated, and so on. \n" - "\"Predictive Failure\" indicates that an element is " - "functioning normally but a failure is predicted in the " - "near future. \n" - "\"Non-Recoverable Error \" indicates that this element " - "is in an error condition that requires human " - "intervention. \n" - "\"Supporting Entity in Error\" indicates that this " - "element might be \"OK\" but that another element, on " - "which it is dependent, is in error. An example is a " - "network service or endpoint that cannot function due to " - "lower-layer networking problems." ), - ValueMap { "0", "1", "2", "3", "4", "5", "..", "0x8000.." }, - Values { "Not Available", "No Additional Information", - "Stressed", "Predictive Failure", "Non-Recoverable Error", - "Supporting Entity in Error", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { - "CIM_EnabledLogicalElement.PrimaryStatus", - "CIM_ManagedSystemElement.HealthState" }] - uint16 DetailedStatus; - - [Description ( - "OperatingStatus provides a current status value for the " - "operational condition of the element and can be used for " - "providing more detail with respect to the value of " - "EnabledState. It can also provide the transitional " - "states when an element is transitioning from one state " - "to another, such as when an element is transitioning " - "between EnabledState and RequestedState, as well as " - "other transitional conditions.\n" - "OperatingStatus consists of one of the following values: " - "Unknown, Not Available, In Service, Starting, Stopping, " - "Stopped, Aborted, Dormant, Completed, Migrating, " - "Emmigrating, Immigrating, Snapshotting. Shutting Down, " - "In Test \n" - "A Null return indicates the implementation (provider) " - "does not implement this property. \n" - "\"Unknown\" indicates the implementation is in general " - "capable of returning this property, but is unable to do " - "so at this time. \n" - "\"None\" indicates that the implementation (provider) is " - "capable of returning a value for this property, but not " - "ever for this particular piece of hardware/software or " - "the property is intentionally not used because it adds " - "no meaningful information (as in the case of a property " - "that is intended to add additional info to another " - "property). \n" - "\"Servicing\" describes an element being configured, " - "maintained, cleaned, or otherwise administered. \n" - "\"Starting\" describes an element being initialized. \n" - "\"Stopping\" describes an element being brought to an " - "orderly stop. \n" - "\"Stopped\" and \"Aborted\" are similar, although the " - "former implies a clean and orderly stop, while the " - "latter implies an abrupt stop where the state and " - "configuration of the element might need to be updated. \n" - "\"Dormant\" indicates that the element is inactive or " - "quiesced. \n" - "\"Completed\" indicates that the element has completed " - "its operation. This value should be combined with either " - "OK, Error, or Degraded in the PrimaryStatus so that a " - "client can tell if the complete operation Completed with " - "OK (passed), Completed with Error (failed), or Completed " - "with Degraded (the operation finished, but it did not " - "complete OK or did not report an error). \n" - "\"Migrating\" element is being moved between host " - "elements. \n" - "\"Immigrating\" element is being moved to new host " - "element. \n" - "\"Emigrating\" element is being moved away from host " - "element. \n" - "\"Shutting Down\" describes an element being brought to " - "an abrupt stop. \n" - "\"In Test\" element is performing test functions. \n" - "\"Transitioning\" describes an element that is between " - "states, that is, it is not fully available in either its " - "previous state or its next state. This value should be " - "used if other values indicating a transition to a " - "specific state are not applicable.\n" - "\"In Service\" describes an element that is in service " - "and operational." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "..", "0x8000.." }, - Values { "Unknown", "Not Available", "Servicing", "Starting", - "Stopping", "Stopped", "Aborted", "Dormant", "Completed", - "Migrating", "Emigrating", "Immigrating", "Snapshotting", - "Shutting Down", "In Test", "Transitioning", "In Service", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_EnabledLogicalElement.EnabledState" }] - uint16 OperatingStatus; - - [Description ( - "PrimaryStatus provides a high level status value, " - "intended to align with Red-Yellow-Green type " - "representation of status. It should be used in " - "conjunction with DetailedStatus to provide high level " - "and detailed health status of the ManagedElement and its " - "subcomponents. \n" - "PrimaryStatus consists of one of the following values: " - "Unknown, OK, Degraded or Error. \"Unknown\" indicates " - "the implementation is in general capable of returning " - "this property, but is unable to do so at this time. \n" - "\"OK\" indicates the ManagedElement is functioning " - "normally. \n" - "\"Degraded\" indicates the ManagedElement is functioning " - "below normal. \n" - "\"Error\" indicates the ManagedElement is in an Error " - "condition." ), - ValueMap { "0", "1", "2", "3", "..", "0x8000.." }, - Values { "Unknown", "OK", "Degraded", "Error", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { - "CIM_ManagedSystemElement.DetailedStatus", - "CIM_ManagedSystemElement.HealthState" }] - uint16 PrimaryStatus; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_MemberOfCollection.mof b/build/vendor/dmtf_mof/Core/CIM_MemberOfCollection.mof deleted file mode 100644 index 1d327410..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_MemberOfCollection.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_MemberOfCollection -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::Collection" ), - Description ( - "CIM_MemberOfCollection is an aggregation used to establish " - "membership of ManagedElements in a Collection." )] -class CIM_MemberOfCollection { - - [Key, Aggregate, Description ( - "The Collection that aggregates members." )] - CIM_Collection REF Collection; - - [Key, Description ( "The aggregated member of the Collection." )] - CIM_ManagedElement REF Member; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_MethodParameters.mof b/build/vendor/dmtf_mof/Core/CIM_MethodParameters.mof deleted file mode 100644 index 903f1b32..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_MethodParameters.mof +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_MethodParameters -// ================================================================== - [Abstract, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::MethodParms" ), - Description ( - "CIM_MethodParameters represents a set of values to be used as " - "the parameters of a method. These parameters can be passed to " - "the method, directly used by the method in its invocation, or " - "accessed by the method when it is called. The properties of a " - "concrete subclass of MethodParameters are mapped to the " - "parameters of a method by the method itself or by the method " - "caller. This mapping is an implementation detail that is " - "independent of the definition of the class. For ease of use, " - "property names should match parameter names. \n" - "Property values should be set before the method is invoked. " - "The ModelCorrespondence qualifier can be used to indicate if " - "the property value should come from the property of another " - "class. The instances that the property values should be " - "gleaned from should be associated with MethodParameters using " - "the Parameter ValueSources association. \n" - "If the property is declared as an array, then the same " - "property value (identified by the Model Correspondence) will " - "be retrieved from all appropriate ParameterValueSources " - "instances and stored in the array. \n" - "If the property is declared as an array and the Model " - "Correspondence is to an array property, then only one instance " - "of the array will be copied from one ParameterValueSource. \n" - "If the property is not declared as an array and there are " - "multiple instances of the class and property associated with " - "it through ModelCorrespondence where the values are not all " - "the same, then an error will occur and the value of the " - "property will not be set. \n" - "Several MethodParameters instances can be associated with any " - "of the ManagedElement methods. This association allows the " - "maintenance of \'canned\' method invocation and reduces the " - "overhead of re-creating all method parameters for every method " - "invocation." )] -class CIM_MethodParameters : CIM_ManagedElement { - - [Description ( - "The identifier by which the MethodParameters object is known." - ), - MaxLen ( 256 )] - string MethodParametersId; - - - [Description ( - "The resetValues method updates the values of the " - "properties of MethodParameters, which have " - "ModelCorrespondence to the SourceME ManagedElement. This " - "update allows several source candidates to be associated " - "with the MethodParameters and one candidate to be " - "selected as the source for this set of values. If " - "resetValues is invoked and sourceME is null, then all " - "associated ManagedElements in ParameterValueSources will " - "be used to set the values of the MethodParameters " - "properties." )] - uint32 ResetValues( - [IN, Description ( "The source ManagedElement." )] - CIM_ManagedElement REF SourceME); - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_OpaqueManagementData.mof b/build/vendor/dmtf_mof/Core/CIM_OpaqueManagementData.mof deleted file mode 100644 index 66c2ecb1..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_OpaqueManagementData.mof +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::OpaqueManagementData" ), - Description ( - "A class derived from StorageExtent that describes opaque " - "management data in managed systems. The structure and " - "semantics of opaque management data, which may be standardized " - "or proprietary, are assumed to be known by at least one " - "management client, but need not be known by the CIM server. " - "The UntransformedDataFormat property identifies the structure " - "and semantics of the data.\n" - "Opaque management data are typically stored in non-volatile " - "memory that is accessible to the server. Management clients " - "are able to read and write opaque data, to manage their " - "lifetime, and to configure the access rights associated with " - "them. The non-volatile storage is often used as a mailbox, " - "with local management agents producing data for consumption by " - "remote management clients, or vice versa.\n" - "This class is not intended as a general-purpose opaque " - "alternative to any existing or planned CIM classes. It is " - "expressly intended for the mailbox usage model described " - "above." )] -class CIM_OpaqueManagementData : CIM_StorageExtent { - - [Description ( - "The maximum number of bytes of opaque management data " - "that the instance may contain." ), - PUnit ( "byte" )] - uint64 MaxSize; - - [Description ( - "The date and time when the opaque management data was " - "last accessed. Any operation on the OpaqueManagementData " - "instance constitutes access. This property shall be NULL " - "if it is not supported by the implementation." )] - datetime LastAccessed; - - [Description ( - "Indicates whether the data are stored on a medium that " - "has a limited number of write/erase cycles (e.g., flash " - "memory)." ), - ValueMap { "0", "1", "2", ".." }, - Values { "Unknown", "Not write-limited", "Write-limited", - "DMTF Reserved" }] - uint16 WriteLimited; - - [Description ( - "Describes the format of the opaque management data. A " - "free-form string that shall only be set by an authorized " - "client, and shall not be changed by the implementation." )] - string DataFormat; - - [Description ( - "The number of bytes of opaque management data in the instance." - ), - PUnit ( "byte" )] - uint64 DataSize; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_OpaqueManagementDataCapabilities.mof b/build/vendor/dmtf_mof/Core/CIM_OpaqueManagementDataCapabilities.mof deleted file mode 100644 index 330bda94..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_OpaqueManagementDataCapabilities.mof +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.23.0" ), - UMLPackagePath ( "CIM::Core::OpaqueManagementData" ), - Description ( - "CIM_OpaqueManagementDataCapabilities describes the " - "capabilities of CIM_OpaqueManagementDataService." )] -class CIM_OpaqueManagementDataCapabilities : CIM_EnabledLogicalElementCapabilities { - - [Description ( - "The maximum number of bytes of opaque management data " - "storage managed by the associated " - "CIM_OpaqueManagementDataService, and hence the maximum " - "value of the AvailableStorage property in the associated " - "CIM_OpaqueManagementDataService." ), - ModelCorrespondence { - "CIM_OpaqueManagementDataService.AvailableStorage" }, - PUnit ( "byte" )] - uint64 MaxAvailableStorage; - - [Description ( - "MaxReadLength indicates the maximum value that the " - "service supports in the Length parameter of the " - "ReadOpaqueManagementData method. Larger extents can be " - "read by successively invoking ReadOpaqueManagementData " - "on chunks of the data and reassembling them in the " - "management client. When this is done, the " - "LockOpaqueManagementData method should be used to " - "prevent modification of the data by other clients " - "between successive reads." ), - PUnit ( "byte" )] - uint64 MaxReadLength; - - [Description ( - "MaxWriteLength indicates the maximum value that the " - "service supports in the Length parameter of the " - "WriteOpaqueManagementData method. Larger extents can be " - "written by successively invoking " - "WriteOpaqueManagementData on chunks of the data and " - "reassembling them in the management client. When this is " - "done, the LockOpaqueManagementData method should be used " - "to prevent modification of the data by other clients " - "between successive writes." ), - PUnit ( "byte" )] - uint64 MaxWriteLength; - - [Description ( - "This property lists the URI schemes supported by " - "OpaqueManagementDataService.ExportOpaqueManagementDataToURI()." - ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "..", - "0x8000..0xFFFF" }, - Values { "data", "file", "ftp", "http", "https", "nfs", - "tftp", "DMTF Reserved", "Vendor Specific" }] - uint16 SupportedExportURISchemes[]; - - [Description ( - "This property lists the URI schemes supported by " - "OpaqueManagementDataService.ImportOpaqueManagementDataFromURI()." - ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "..", - "0x8000..0xFFFF" }, - Values { "data", "file", "ftp", "http", "https", "nfs", - "tftp", "DMTF Reserved", "Vendor Specific" }] - uint16 SupportedImportURISchemes[]; - - [Description ( - "This property advertises the methods that are supported " - "by the service." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "..", - "0x80.." }, - Values { "Other", "Create", "Read", "ExportToURI", "Write", - "ImportFromURI", "Lock", "ReassignOwnership", - "AssignAccess", "DMTF Reserved", "Vendor Specific" }] - uint16 SupportedMethods[]; - - [Description ( - "TruncationSupported indicates whether the associated " - "CIM_OpaqueManagementDataService allows a client to " - "truncate the data in a CIM_OpaqueManagementData instance " - "by reducing the value of its DataSize property.\n" - "If TruncationSupported = true, then the Service shall " - "support reduction of the value of CIM_OpaqueManagementData.DataSize\n" - ".If TruncationSupported = false or is null, then the " - "Service shall not support reduction of the value of " - "CIM_OpaqueManagementData.DataSize" )] - boolean TruncationSupported = false; - - [Description ( - "MaxInstancesSupported shall indicate the maximum number " - "of opaque management data instances that may exist " - "within the scope of the CIM_OpaqueManagementDataService " - "and managed by the associated instance of the " - "CIM_OpaqueManagementDataService. A value of zero shall " - "indicate that the maximum number of instances is unknown " - "or that the maximum number of instances is not enforced." )] - uint16 MaxInstancesSupported = 0; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_OpaqueManagementDataService.mof b/build/vendor/dmtf_mof/Core/CIM_OpaqueManagementDataService.mof deleted file mode 100644 index 503f75c8..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_OpaqueManagementDataService.mof +++ /dev/null @@ -1,451 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.1" ), - UMLPackagePath ( "CIM::Core::OpaqueManagementData" ), - Description ( - "A class derived from Service that contains global properties " - "of the opaque management data functionality in the CIM server, " - "and provides methods for using this functionality." )] -class CIM_OpaqueManagementDataService : CIM_Service { - - [Description ( - "The number of bytes of opaque management data storage " - "available from the CIM_OpaqueManagementDataService. The " - "value of AvailableStorage shall not exceed the value of " - "MaxAvailableStorage in the associated " - "CIM_OpaqueManagementDataCapabilities." ), - ModelCorrespondence { - "CIM_OpaqueManagementDataCapabilities.MaxAvailableStorage" }, - PUnit ( "byte" )] - uint64 AvailableStorage; - - [Description ( - "The amount of time a lock on a CIM_OpaqueManagementData " - "instance shall remain in effect without execution of any " - "CIM_OpaqueManagementDataService extrinsic methods on " - "that CIM_OpaqueManagementData instance by the Identity " - "that holds the lock. Locks on CIM_OpaqueManagementData " - "are created by Lock(). The intent of the timeout is to " - "ensure that a lock is released if the lock holder " - "neglects to release it or is unable to release it. The " - "value of LockTimeout shall be a duration." )] - datetime LockTimeout; - - [Description ( - "MaxCreateSize shall contain the maximum value that the " - "implementation will currently accept in the MaxSize " - "property of the OpaqueManagementDataTemplate embedded " - "instance parameter in a call to Create(). This value may " - "change over time for any reason, including but not " - "limited to fragmentation of the storage resources " - "managed by the service." ), - ModelCorrespondence { "CIM_OpaqueManagementData.MaxSize" }, - PUnit ( "byte" )] - uint64 MaxCreateSize; - - - [Description ( - "Grants or removes access to the referenced " - "CIM_OpaqueManagementData instance by the referenced " - "CIM_Identity instance." ), - ValueMap { "0", "1", "2", "3..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", "DMTF Reserved", - "Vendor Specified" }] - uint32 AssignAccess( - [Required, IN, Description ( - "Reference to the CIM_Identity instance that is the " - "subject of the access rights modified by this " - "method." )] - CIM_Identity REF Identity, - [Required, IN, Description ( - "Reference to the CIM_OpaqueManagementData instance " - "that is the target of the access rights modified " - "by this method." )] - CIM_OpaqueManagementData REF OpaqueManagementData, - [Required, IN, Description ( - "The subset of values from the value map that shall " - "be contained in the resulting Activities property " - "of the CIM_AssociatedPrivilege between the " - "CIM_Identity instance referenced by the Identity " - "parameter and the CIM_OpaqueManagementData " - "instance referenced by the OpaqueManagementData " - "parameter. If such an instance of " - "CIM_AssociatedPrivilege does not exist before the " - "method is invoked, the method shall create it." ), - ValueMap { "5", "6" }, - Values { "Read", "Write" }, - ModelCorrespondence { - "CIM_AssociatedPrivilege.Activities" }] - uint16 Activities[]); - - [Description ( - "Create() creates an instance of CIM_OpaqueManagementData " - "using the property values in the OpaqueManagementData " - "parameter, and allocates the number of bytes of storage " - "specified in the MaxSize property of the " - "OpaqueManagementData parameter. It also optionally " - "allows the client to specify an existing " - "CIM_StorageExtent instance as the basis (storage " - "location) of the new CIM_OpaqueManagementData instance." ), - ValueMap { "0", "1", "2", "3..4095", "4096", "4097..32767", - "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Method Reserved", "Vendor Specified" }] - uint32 Create( - [Required, IN, Description ( - "The requested value of the MaxSize property in the " - "CIM_OpaqueManagementData instance created by this " - "method. The actual property value shall not be " - "less than this value." ), - ModelCorrespondence { "CIM_OpaqueManagementData.MaxSize" }] - uint64 MaxSize, - [IN, Description ( - "The value of the DataFormat property in the " - "CIM_OpaqueManagementData instance created by this " - "method." ), - ModelCorrespondence { - "CIM_OpaqueManagementData.DataFormat" }] - string DataFormat, - [IN, Description ( - "The value of the ElementName property in the " - "CIM_OpaqueManagementData instance created by this " - "method." ), - ModelCorrespondence { - "CIM_OpaqueManagementData.ElementName" }] - string ElementName, - [Required, IN, Description ( - "Specifies the instance of CIM_Identity or its " - "subclass that shall be the owner of the new " - "CIM_OpaqueManagementData instance. Create() shall " - "associate the new CIM_OpaqueManagementData " - "instance with this CIM_Identity instance using a " - "new instance of CIM_AssociatedPrivilege." )] - CIM_Identity REF Owner, - [IN, Description ( - "Specifies the instance of CIM_StorageExtent on " - "which the new instance of CIM_OpaqueManagementData " - "shall be based (i.e., in which it shall be " - "stored). If this parameter is NULL, the choice of " - "storage location shall be left to the " - "implementation." )] - CIM_StorageExtent REF BasedOnExtent, - [IN ( false ), OUT, Description ( - "Reference to the instance of " - "CIM_OpaqueManagementData created when the method " - "returns a value of 0." )] - CIM_OpaqueManagementData REF OpaqueManagementData, - [IN ( false ), OUT, Description ( - "Reference to the job (may be null if job completed)." - )] - CIM_ConcreteJob REF Job); - - [Description ( - "ExportToURI() copies all or some of the bytes of opaque " - "management data in the extent represented by the " - "referenced instance of CIM_OpaqueManagementData to the " - "Uniform Resource Identifier (URI) specified in the " - "ExportURI parameter. The URI scheme implies the protocol " - "that shall be used. Typically, the URI will be a Uniform " - "Resource Locator (URL), but a Uniform Resource Name " - "(URN) is not prohibited.\n" - "If 0 is returned, the function completed successfully " - "and no ConcreteJob instance was required. If 4096/0x1000 " - "is returned, a ConcreteJob shall be started to to " - "perform the operation. The Job\'s reference shall be " - "returned in the output parameter Job." ), - ValueMap { "0", "1", "2", "3..4095", "4096", "4097..32767", - "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Method Reserved", "Vendor Specified" }] - uint32 ExportToURI( - [Required, IN, Description ( - "The CIM_OpaqueManagementData instance that " - "represents the extent that is the target of the " - "operation." )] - CIM_OpaqueManagementData REF OpaqueManagementData, - [Required, IN, Description ( - "Offset specifies the byte offset at which to start reading." - ), - PUnit ( "byte" )] - uint64 Offset, - [Required, IN, OUT, Description ( - "On entry, Length contains the number of bytes to " - "be read, starting at the byte offset in the Offset " - "property. On return, Length contains the number of " - "bytes that were actually read." ), - PUnit ( "byte" )] - uint64 Length, - [Required, IN, Description ( - "On entry, ExportURI contains a URI based on RFC " - "3986 that indicates the location to which the " - "service shall copy the specified bytes of opaque " - "management data and from which the client " - "subsequently retrieves them." ), - ModelCorrespondence { - "CIM_OpaqueManagementDataCapabilities.SupportedExportURISchemes" }] - string ExportURI, - [IN, Description ( - "A token that represents a Lock placed on the data " - "in the extent referenced by the " - "OpaqueManagementData parameter, using the Lock() " - "method." ), - OctetString] - uint8 LockToken[], - [IN ( false ), OUT, Description ( - "Reference to the job (may be null if job completed)." - )] - CIM_ConcreteJob REF Job); - - [Description ( - "ImportFromURI() modifies all or some of the bytes in the " - "referenced instance of CIM_OpaqueManagementData. The " - "imported data for the operation is copied from the URI " - "specified in the ImportURI parameter. The URI scheme " - "implies the protocol that shall be used. Typically, the " - "URI will be a Uniform Resource Locator (URL), but a " - "Uniform Resource Name (URN) is not prohibited.\n" - "Any data already present in the instance outside the " - "range specified by Offset and Length is unchanged.\n" - "If 0 is returned, the function completed successfully " - "and no ConcreteJob instance was required. If 4096/0x1000 " - "is returned, a ConcreteJob shall be started to perform " - "the operation. The Job\'s reference shall be returned in " - "the output parameter Job." ), - ValueMap { "0", "1", "2", "3..4095", "4096", "4097..32767", - "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Method Reserved", "Vendor Specified" }] - uint32 ImportFromURI( - [Required, IN, Description ( - "The CIM_OpaqueManagementData instance that " - "represents the extent that is the target of the " - "operation." )] - CIM_OpaqueManagementData REF OpaqueManagementData, - [Required, IN, Description ( - "Offset specifies the byte offset at which to start writing." - ), - PUnit ( "byte" )] - uint64 Offset, - [Required, IN, OUT, Description ( - "On entry, Length contains the number of bytes to " - "be written, starting at the byte offset in the " - "Offset. property. On return, Length contains the " - "number of bytes that were actually written." ), - PUnit ( "byte" )] - uint64 Length, - [IN, Description ( - "If the value of the DataSize property of the " - "instance referenced by the OpaqueManagementData " - "parameter is greater than Offset + Length, then a " - "value of TRUE shall indicate that the DataSize " - "property value shall be reduced by this operation " - "to Offset + Length, and a value of FALSE shall " - "indicate that the DataSize property value shall " - "remain unchanged by this operation. If the value " - "of the DataSize property is not greater than " - "Offset + Length, then this parameter shall be " - "ignored." ), - ModelCorrespondence { - "CIM_OpaqueManagementData.DataSize" }] - boolean Truncate, - [Required, IN, Description ( - "On entry, ImportURI contains a URI based on RFC " - "3986 that shall be used by the service to retrieve " - "the bytes of opaque management data to be written " - "into the extent represented by the " - "OpaqueManagementData parameter." ), - ModelCorrespondence { - "CIM_OpaqueManagementDataCapabilities.SupportedImportURISchemes" }] - string ImportURI, - [IN, Description ( - "A token that represents a Lock placed on the data " - "in the extent referenced by the " - "OpaqueManagementData parameter, using the Lock() " - "method." ), - OctetString] - uint8 LockToken[], - [IN ( false ), OUT, Description ( - "Reference to the job (may be null if job completed)." - )] - CIM_ConcreteJob REF Job); - - [Description ( - "Lock() allows a management client to atomically read or " - "write an opaque management data storage extent larger " - "than MaxReadLength or MaxWriteLength, respectively. A " - "server that supports this method shall support the " - "following pattern:\n" - "1. Issue Lock() with Lock set to true to lock the " - "CIM_OpaqueManagementData instance.\n" - "2. Repeat Read() or Write() as many times as necessary " - "to complete the transfer\n" - "3. Issue Lock() with Lock set to false to unlock the " - "CIM_OpaqueManagementData instance\n" - "If Lock() with Lock set to true completes successfully, " - "the server shall return a LockToken to the client. Until " - "the lock is removed or expires, the server shall deny " - "OpaqueManagementDataService method requests on the same " - "CIM_OpaqueManagementData instance that do not contain " - "the same LockToken value.\n" - "Lock() shall not lock the properties of the " - "OpaqueManagementData instance. The method shall return 0 " - "if successful, 1 if not supported, and any other value " - "if an error occurred." ), - ValueMap { "0", "1", "2", "3..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", "DMTF Reserved", - "Vendor Specified" }] - uint32 Lock( - [Required, IN, Description ( - "The CIM_OpaqueManagementData instance that " - "represents the extent that is the target of the " - "operation." )] - CIM_OpaqueManagementData REF OpaqueManagementData, - [Required, IN, Description ( - "If true, lock the data from access by another " - "management client. If false, release the data." )] - boolean Lock, - [IN, OUT, Description ( - "A token that shall be returned to the client as " - "output if Lock is True, and supplied by the client " - "as input if Lock is False. In this way, only the " - "client that set the Lock may remove it or delegate " - "such responsibility to another client." ), - OctetString] - uint8 LockToken[]); - - [Description ( - "Read() returns all or some of the bytes of opaque " - "management data in the extent represented by the " - "referenced instance of CIM_OpaqueManagementData." ), - ValueMap { "0", "1", "2", "3..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", "DMTF Reserved", - "Vendor Specified" }] - uint32 Read( - [Required, IN, Description ( - "The CIM_OpaqueManagementData instance that " - "represents the extent that is the target of the " - "operation." )] - CIM_OpaqueManagementData REF OpaqueManagementData, - [Required, IN, Description ( - "Offset specifies the byte offset at which to start reading." - ), - PUnit ( "byte" )] - uint64 Offset, - [Required, IN, OUT, Description ( - "On entry, Length shall contain the number of bytes " - "to be read, starting at the byte offset in the " - "Offset property. On return, Length shall contain " - "the number of bytes that were actually read." ), - ModelCorrespondence { - "CIM_OpaqueManagementDataCapabilities.MaxReadLength" }, - PUnit ( "byte" )] - uint64 Length, - [IN ( false ), OUT, Description ( - "On return, Data shall contain the bytes of opaque " - "management data read from the extent represented " - "by the OpaqueManagementData parameter." ), - OctetString] - uint8 Data[], - [IN, Description ( - "A token that represents a Lock placed on the data " - "in the extent referenced by the " - "OpaqueManagementData parameter, using the Lock() " - "method. Parameter shall be NULL if data is not " - "locked." ), - OctetString] - uint8 LockToken[]); - - [Description ( - "Transfers ownership of a CIM_OpaqueManagementData " - "instance to the CIM_Identity instance referenced by the " - "Identity parameter." ), - ValueMap { "0", "1", "2", "3..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", "DMTF Reserved", - "Vendor Specified" }] - uint32 ReassignOwnership( - [Required, IN, Description ( - "Reference to the CIM_Identity instance that will " - "become the new owner of the " - "CIM_OpaqueManagementData instance referenced by " - "the OpaqueManagementData parameter." )] - CIM_Identity REF NewOwner, - [Required, IN, Description ( - "Reference to the CIM_OpaqueManagementData instance " - "that is the target of ownership reassignment." )] - CIM_OpaqueManagementData REF OpaqueManagementData); - - [Description ( - "Write() modifies all or some of the bytes in the extent " - "represented by the referenced instance of " - "CIM_OpaqueManagementData. Any data already present in " - "the extent outside the range specified by Offset and " - "Length shall remain unchanged by this operation." ), - ValueMap { "0", "1", "2", "3..4095", "4096", "4097..32767", - "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Method Reserved", "Vendor Specified" }] - uint32 Write( - [Required, IN, Description ( - "The CIM_OpaqueManagementData instance that " - "represents the extent that is the target of the " - "operation." )] - CIM_OpaqueManagementData REF OpaqueManagementData, - [Required, IN, Description ( - "Offset specifies the byte offset at which to start writing." - ), - PUnit ( "byte" )] - uint64 Offset, - [Required, IN, OUT, Description ( - "On entry, Length contains the number of bytes to " - "be written, starting at the byte offset in the " - "Offset. property. On return, Length contains the " - "number of bytes that were actually written." ), - ModelCorrespondence { - "CIM_OpaqueManagementDataCapabilities.MaxWriteLength" }, - PUnit ( "byte" )] - uint64 Length, - [IN, Description ( - "If the value of the DataSize property of the " - "instance referenced by the OpaqueManagementData " - "parameter is greater than Offset + Length, then a " - "value of TRUE shall indicate that the DataSize " - "property value shall be reduced by this operation " - "to Offset + Length, and a value of FALSE shall " - "indicate that the DataSize property value shall " - "remain unchanged by this operation. If the value " - "of the DataSize property is not greater than " - "Offset + Length, then this parameter shall be " - "ignored." ), - ModelCorrespondence { - "CIM_OpaqueManagementData.DataSize" }] - boolean Truncate, - [Required, IN, Description ( - "On entry, Data contains the bytes of opaque " - "management data to be written into the extent " - "represented by the OpaqueManagementData parameter." ), - OctetString] - uint8 Data[], - [IN, Description ( - "A token that represents a Lock placed on the data " - "in the extent referenced by the " - "OpaqueManagementData parameter, using the Lock() " - "method." ), - OctetString] - uint8 LockToken[], - [IN ( false ), OUT, Description ( - "Reference to the job (may be null if job completed)." - )] - CIM_ConcreteJob REF Job); - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_OrderedComponent.mof b/build/vendor/dmtf_mof/Core/CIM_OrderedComponent.mof deleted file mode 100644 index 2d07b374..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_OrderedComponent.mof +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Association, Aggregation, Version ( "2.19.1" ), - UMLPackagePath ( "CIM::Core::CoreElements" ), - Description ( - "CIM_OrderedComponent is a generic association used to " - "establish \'part of\' relationships between ManagedElements. " - "It arranges the PartComponents in a specific assigned order. " - "The semantics of the order depends on the context and use by " - "the referencing classes. For example, if this association is " - "used to arrange settings in a hierarchical order, then this " - "specifies the sequence in which the settings are applied." )] -class CIM_OrderedComponent : CIM_Component { - - [Description ( - "AssignedSequence is an unsigned integer \'n\' that " - "indicates the relative order of ManagedElement " - "instances. When \'n\' is a positive integer, it " - "indicates a place in the sequence of members, with " - "smaller integers indicating earlier positions in the " - "sequence. The special value \'0\' indicates \'don\'t " - "care\'. If two or more members have the same non-zero " - "sequence number, then the ordering between those members " - "is irrelevant, but they must all be ordered at the " - "appropriate place in the overall sequence. \n" - "\n" - "A series of examples will make ordering of members " - "clearer: \n" - "If all members have the same sequence number, \n" - "regardless of whether it is \'0\' or non-zero, any \n" - "order is acceptable. \n" - "o The values: \n" - "1:MEMBER A \n" - "2:MEMBER B \n" - "1:MEMBER C \n" - "3:MEMBER D \n" - "indicate two acceptable orders: A,C,B,D or C,A,B,D, \n" - "since A and C can be ordered in either sequence, but \n" - "only at the \'1\' position. \n" - "\n" - "Note that the non-zero sequence numbers need not start " - "with \'1\', and they need not be consecutive. All that " - "matters is their relative magnitude." )] - uint64 AssignedSequence; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_OrderedDependency.mof b/build/vendor/dmtf_mof/Core/CIM_OrderedDependency.mof deleted file mode 100644 index 43a0bcba..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_OrderedDependency.mof +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Association, Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::CoreElements" ), - Description ( - "CIM_OrderedDependency is used to establish a relationship " - "between a ManagedElement and its dependencies. Each dependency " - "is an Antecedent reference and the order in which the " - "dependencies need to be resolved is indicated by the " - "AssignedSequence property. \n" - "For example, if this association is used to arrange " - "dependencies of a software in a hierarchical order, then this " - "specifies the sequence in which the dependencies need to be " - "installed prior to installing the software." )] -class CIM_OrderedDependency : CIM_Dependency { - - [Description ( - "AssignedSequence is an unsigned integer \'n\' that " - "indicates the relative order of ManagedElement " - "instances. When \'n\' is a positive integer, it " - "indicates a place in the sequence of members, with " - "smaller integers indicating earlier positions in the " - "sequence. The special value \'0\' indicates \'don\'t " - "care\'. If two or more members have the same non-zero " - "sequence number, then the ordering between those members " - "is irrelevant, but they must all be ordered at the " - "appropriate place in the overall sequence. \n" - "\n" - "A series of examples will make ordering of members " - "clearer: \n" - "If all members have the same sequence number, \n" - "regardless of whether it is \'0\' or non-zero, any \n" - "order is acceptable. \n" - "o The values: \n" - "1:MEMBER A \n" - "2:MEMBER B \n" - "1:MEMBER C \n" - "3:MEMBER D \n" - "indicate two acceptable orders: A,C,B,D or C,A,B,D, \n" - "since A and C can be ordered in either sequence, but \n" - "only at the \'1\' position. \n" - "\n" - "Note that the non-zero sequence numbers need not start " - "with \'1\', and they need not be consecutive. All that " - "matters is their relative magnitude." )] - uint64 AssignedSequence; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_OrderedMemberOfCollection.mof b/build/vendor/dmtf_mof/Core/CIM_OrderedMemberOfCollection.mof deleted file mode 100644 index ded10aa2..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_OrderedMemberOfCollection.mof +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// CPUBS corrections to CoreCollection.mof -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_OrderedMemberOfCollection -// ================================================================== - [Association, Aggregation, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Collection" ), - Description ( - "CIM_OrderedMemberOfCollection is an aggregation used to " - "establish an ordered membership of ManagedElements in a " - "Collection." )] -class CIM_OrderedMemberOfCollection : CIM_MemberOfCollection { - - [Description ( - "AssignedSequence is an unsigned integer \'n\' that " - "indicates the relative position of members within a " - "Collection. When \'n\' is a positive integer, it " - "indicates a place in the sequence of members, with " - "smaller integers indicating earlier positions in the " - "sequence. The special value \'0\' indicates \'don\'t " - "care\'. If two or more members have the same non-zero " - "sequence number, then the ordering between those members " - "is irrelevant, but they must all be ordered at the " - "appropriate place in the overall sequence. \n" - "\n" - "A series of examples will make ordering of members " - "clearer: \n" - "If all members have the same sequence number, \n" - "regardless of whether it is \'0\' or non-zero, any \n" - "order is acceptable. \n" - "o The values: \n" - "1:MEMBER A \n" - "2:MEMBER B \n" - "1:MEMBER C \n" - "3:MEMBER D \n" - "indicate two acceptable orders: A,C,B,D or C,A,B,D, \n" - "because A and C can be ordered in either sequence, but \n" - "only at the \'1\' position. \n" - "\n" - "Note that the non-zero sequence numbers do not need to " - "start with \'1\', and they do not need to be " - "consecutive. However, the sequencenumbers must reflect " - "their relative magnitude." )] - uint64 AssignedSequence; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_OwningCollectionElement.mof b/build/vendor/dmtf_mof/Core/CIM_OwningCollectionElement.mof deleted file mode 100644 index 9d4fe89d..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_OwningCollectionElement.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Association, Version ( "2.18.0" ), - UMLPackagePath ( "CIM::Core::Collection" ), - Description ( - "OwningCollectionElement represents an association between a " - "Collection and the ManagedElement responsible for the control " - "or ownership of the Collection." )] -class CIM_OwningCollectionElement { - - [Key, Max ( 1 ), - Description ( - "The ManagedElement acting as the \'owner\' or object " - "that isresponsible for the control of the Collection." )] - CIM_ManagedElement REF OwningElement; - - [Key, Description ( - "The Collection owned or controlled by the ManagedElement." )] - CIM_Collection REF OwnedElement; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ParameterValueSources.mof b/build/vendor/dmtf_mof/Core/CIM_ParameterValueSources.mof deleted file mode 100644 index fc03a197..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ParameterValueSources.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ParameterValueSources -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::MethodParms" ), - Description ( - "ParameterValueSources represents the association between a " - "MethodParameters instance and the ManagedElement instances, " - "which contain properties to be used to create values for the " - "MethodParameters properties." )] -class CIM_ParameterValueSources { - - [Key, Description ( - "The MethodParameters instance whose property values are to be set." - )] - CIM_MethodParameters REF Parameters; - - [Key, Description ( - "The ManagedElement that contains properties to be used " - "to populate the values of the properties of the " - "MethodParameters instance." )] - CIM_ManagedElement REF ValueSource; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ParametersForMethod.mof b/build/vendor/dmtf_mof/Core/CIM_ParametersForMethod.mof deleted file mode 100644 index 3ebce76b..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ParametersForMethod.mof +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ParametersForMethod -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::MethodParms" ), - Description ( - "ParametersForMethod represents the association between " - "MethodParameters classes and a ManagedElement that has a " - "method that can use the MethodParameters during its " - "invocation. This association is optional. The Method " - "Parameters instance can be passed as a parameter to a method " - "or used to create a method signature before the method is " - "invoked. This association is useful for finding all the valid " - "MethodParameters instances for a particular method. It might " - "be particularly useful for user-oriented interfaces and " - "automated or policy driven method invocations." )] -class CIM_ParametersForMethod { - - [Key, Description ( - "The MethodParameters instance, which can be used by the " - "ParametersForMethod\'s method invocation." )] - CIM_MethodParameters REF Parameters; - - [Key, Description ( - "The ManagedElement that has a method that can use this " - "instance of MethodParameters." )] - CIM_ManagedElement REF TheMethod; - - [Key, Description ( - "The name of the method that can use the referenced " - "instance of MethodParameters during its invocation." ), - MaxLen ( 64 )] - string MethodName; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_PhysicalElement.mof b/build/vendor/dmtf_mof/Core/CIM_PhysicalElement.mof deleted file mode 100644 index 03c8928e..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_PhysicalElement.mof +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PhysicalElement -// ================================================================== - [Abstract, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Physical" ), - Description ( - "Subclasses of CIM_PhysicalElement define any component of a " - "System that has a distinct physical identity. Instances of " - "this class can be defined as an object that can be seen or " - "touched. All Processes, Files, and LogicalDevices are " - "considered not to be Physical Elements. For example, it is not " - "possible to touch the functionality of a \'modem.\' You can " - "touch only the card or package that implements the modem. The " - "same card could also implement a LAN adapter. PhysicalElements " - "are tangible ManagedSystemElements that have a physical " - "manifestation of some sort. \n" - "\n" - "Note that the properties of PhysicalElement describe a " - "hardware entity. Possible replacement (FRU) information is " - "defined by following the ElementFRU association to one or more " - "instances of the ReplacementFRU class. This definition allows " - "a client to determine what hardware can be replaced (FRUed) " - "and what \'spare\' parts might be required by a customer or " - "engineer doing the replacement. If it can be instrumented or " - "manually determined that an element actually replaced (FRUed) " - "another, then this can be described in the model using the " - "ElementHasBeenFRUed association." )] -class CIM_PhysicalElement : CIM_ManagedSystemElement { - - [Key, Description ( - "An arbitrary string that uniquely identifies the " - "Physical Element and serves as the key of the Element. " - "The Tag property can contain information such as asset " - "tag or serial number data. The key for PhysicalElement " - "is placed very high in the object hierarchy in order to " - "independently identify the hardware or entity, " - "regardless of physical placement in or on Cabinets, " - "Adapters, and so on. For example, a hotswappable or " - "removable component can be taken from its containing " - "(scoping) Package and be temporarily unused. The object " - "still continues to exist and can even be inserted into a " - "different scoping container. Therefore, the key for " - "Physical Element is an arbitrary string and is defined " - "independently of any placement or location-oriented " - "hierarchy." ), - MaxLen ( 256 )] - string Tag; - - [Override ( "Description" ), - Description ( "A textual description of the PhysicalElement." ), - MappingStrings { "MIF.DMTF|FRU|003.3" }] - string Description; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Override ( "ElementName" ), - MappingStrings { "MIB.IETF|Entity-MIB.entPhysicalName" }] - string ElementName; - - [Description ( - "The name of the organization responsible for producing " - "the PhysicalElement. This organization might be the " - "entity from whom the Element is purchased, but this is " - "not necessarily true. The latter information is " - "contained in the Vendor property of CIM_Product." ), - MaxLen ( 256 ), - MappingStrings { "MIB.IETF|Entity-MIB.entPhysicalMfgName", - "MIF.DMTF|FRU|003.4" }] - string Manufacturer; - - [Description ( - "The name by which the PhysicalElement is generally known." ), - MaxLen ( 256 ), - MappingStrings { "MIB.IETF|Entity-MIB.entPhysicalDescr", - "MIF.DMTF|FRU|003.5" }] - string Model; - - [Description ( - "The stock-keeping unit number for this PhysicalElement." ), - MaxLen ( 64 )] - string SKU; - - [Description ( - "A manufacturer-allocated number used to identify the " - "Physical Element." ), - MaxLen ( 256 ), - MappingStrings { "MIB.IETF|Entity-MIB.entPhysicalSerialNum", - "MIF.DMTF|FRU|003.7" }] - string SerialNumber; - - [Description ( - "A string that indicates the version of the PhysicalElement." - ), - MaxLen ( 64 ), - MappingStrings { - "MIB.IETF|Entity-MIB.entPhysicalHardwareRev", - "MIF.DMTF|FRU|003.8" }] - string Version; - - [Description ( - "The part number assigned by the organization that is " - "responsible for producing or manufacturing the " - "PhysicalElement." ), - MaxLen ( 256 ), - MappingStrings { "MIB.IETF|Entity-MIB.entPhysicalModelName" }] - string PartNumber; - - [Write, Description ( - "OtherIdentifyingInfo captures data in addition to Tag " - "information. This information could be used to identify " - "a Physical Element. One example is bar code data " - "associated with an Element that also has an asset tag. " - "Note that if only bar code data is available and is " - "unique or able to be used as an Element key, this " - "property would be null and the bar code data would be " - "used as the class key, in the Tag property." ), - MappingStrings { "MIB.IETF|Entity-MIB.entPhysicalAlias" }] - string OtherIdentifyingInfo; - - [Description ( - "Boolean that indicates whether the PhysicalElement is " - "powered on (TRUE) or is currently off (FALSE)." )] - boolean PoweredOn; - - [Description ( - "The date that this PhysicalElement was manufactured." )] - datetime ManufactureDate; - - [Description ( - "A vendor-specific hardware type for the PhysicalElement. " - "It describes the specific equipment type for the " - "element, as defined by the vendor or manufacturer." ), - MappingStrings { "MIB.IETF|Entity-MIB.entPhysicalVendorType" }] - string VendorEquipmentType; - - [Write, Description ( - "User-assigned and writeable asset-tracking identifier " - "for the PhysicalElement." ), - MappingStrings { "MIB.IETF|Entity-MIB.entPhysicalAssetID" }] - string UserTracking; - - [Description ( - "Boolean that indicates whether this PhysicalElement can " - "be FRUed (TRUE) or not (FALSE)." ), - MappingStrings { "MIB.IETF|Entity-MIB.entPhysicalIsFRU" }] - boolean CanBeFRUed; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_PhysicalElementLocation.mof b/build/vendor/dmtf_mof/Core/CIM_PhysicalElementLocation.mof deleted file mode 100644 index 8e7485f5..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_PhysicalElementLocation.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PhysicalElementLocation -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Physical" ), - Description ( - "PhysicalElementLocation associates a PhysicalElement with a " - "Location object for inventory or replacement purposes." )] -class CIM_PhysicalElementLocation : CIM_ElementLocation { - - [Override ( "Element" ), - Description ( - "The PhysicalElement whose location is specified." )] - CIM_PhysicalElement REF Element; - - [Override ( "PhysicalLocation" ), - Max ( 1 ), - Description ( "The location of the PhysicalElement." )] - CIM_Location REF PhysicalLocation; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_PhysicalStatisticalInformation.mof b/build/vendor/dmtf_mof/Core/CIM_PhysicalStatisticalInformation.mof deleted file mode 100644 index 6097d1fa..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_PhysicalStatisticalInformation.mof +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PhysicalStatisticalInformation -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::Statistics" ), - Description ( - "Statistical information associated with a PhysicalElement or " - "one of its subclasses." )] -class CIM_PhysicalStatisticalInformation : CIM_StatisticalInformation { - - [Key, Description ( "The scoping Element\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_PhysicalElement.CreationClassName" )] - string PhysicalCreationClassName; - - [Key, Description ( "The scoping Element\'s identifying Tag." ), - MaxLen ( 256 ), - Propagated ( "CIM_PhysicalElement.Tag" )] - string Tag; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Override ( "Name" ), - Description ( - "The Name property, inherited from " - "StatisticalInformation, serves as part of the object " - "key." ), - MaxLen ( 256 )] - string Name; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_PhysicalStatistics.mof b/build/vendor/dmtf_mof/Core/CIM_PhysicalStatistics.mof deleted file mode 100644 index b880f279..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_PhysicalStatistics.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PhysicalStatistics -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::Statistics" ), - Description ( - "PhysicalStatistics relates the PhysicalStatisticalInformation " - "class to the PhysicalElement to which it applies." )] -class CIM_PhysicalStatistics : CIM_Statistics { - - [Override ( "Stats" ), - Weak, Description ( "The statistical object." )] - CIM_PhysicalStatisticalInformation REF Stats; - - [Override ( "Element" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The PhysicalElement to which the statistics apply." )] - CIM_PhysicalElement REF Element; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_PowerManagementCapabilities.mof b/build/vendor/dmtf_mof/Core/CIM_PowerManagementCapabilities.mof deleted file mode 100644 index 01b08fbc..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_PowerManagementCapabilities.mof +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.23.0" ), - UMLPackagePath ( "CIM::Core::PowerMgmt" ), - Description ( - "A class derived from Capabilities that describes the power " - "management aspects of an element (typically a system or " - "device). The element\'s power management capabilities are " - "decoupled from a PowerManagementService, since a single " - "service could apply to multiple elements, each with specific " - "capabilities." )] -class CIM_PowerManagementCapabilities : CIM_Capabilities { - - [Description ( - "An enumeration indicating the specific power-related " - "capabilities of a managed element. Since this is an " - "array, multiple values may be specified. The current " - "values in the enumeration are: \n" - "0 = Unknown \n" - "1 = Other \n" - "2 = Power Saving Modes Entered Automatically, describing " - "that a managed element can change its power state based " - "on usage or other criteria \n" - "3 = Power State Settable, indicating that the " - "SetPowerState method is supported \n" - "4 = Power Cycling Supported, indicating that the " - "SetPowerState method can be invoked with the PowerState " - "input variable set to \'Power Cycle\' \n" - "5 = Timed Power On Supported, indicating that the " - "SetPowerState method can be invoked with the PowerState " - "input variable set to \'Power Cycle\' and the Time " - "parameter set to a specific date and time, or interval, " - "for power-on." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", - "Power Saving Modes Entered Automatically", - "Power State Settable", "Power Cycling Supported", - "Timed Power On Supported" }, - MappingStrings { "MIF.DMTF|System Power Controls|001.2" }, - ModelCorrespondence { - "CIM_PowerManagementCapabilities.OtherPowerCapabilitiesDescriptions", - "CIM_PowerManagementService.SetPowerState" }] - uint16 PowerCapabilities[]; - - [Description ( - "An array of strings describing an element\'s additional " - "power management capabilities, used when the " - "PowerCapabilities array includes the value 1, \"Other\"." ), - ModelCorrespondence { - "CIM_PowerManagementCapabilities.PowerCapabilities" }] - string OtherPowerCapabilitiesDescriptions[]; - - [Description ( - "An enumeration that indicates the power states supported " - "by a managed element. Because this is an array, multiple " - "values can be specified. The current values in the " - "enumeration are: \n" - "2=On, corresponding to ACPI state G0 or S0 or D0. \n" - "3=Sleep - Light, corresponding to ACPI state G1, S1/S2, " - "or D1. \n" - "4=Sleep - Deep, corresponding to ACPI state G1, S3, or D2.\n" - "5=Power Cycle (Off - Soft), corresponding to ACPI state " - "G2, S5, or D3, but where the managed element is set to " - "return to power state \"On\" at a pre-determined time. \n" - "6=Off - Hard, corresponding to ACPI state G3, S5, or D3. \n" - "7=Hibernate (Off - Soft), corresponding to ACPI state " - "S4, where the state of the managed element is preserved " - "and will be recovered upon powering on. \n" - "8=Off - Soft, corresponding to ACPI state G2, S5, or D3. " - "9= Power Cycle (Off-Hard), corresponds to the managed " - "element reaching the ACPI state G3 followed by ACPI " - "state S0. \n" - "10=Master Bus Reset, corresponds to the system reaching " - "ACPI state S5 followed by ACPI state S0. This is used to " - "represent system master bus reset. 11=Diagnostic " - "Interrupt (NMI), corresponding to the system reaching " - "ACPI state S5 followed by ACPI state S0. This is used to " - "represent system non-maskable interrupt. 12=Off - Soft " - "Graceful, equivalent to Off Soft but preceded by a " - "request to the managed element to perform an " - "orderlyshutdown. \n" - "13=Off - Hard Graceful, equivalent to Off Hard but " - "preceded by a request to the managed element to perform " - "an orderly shutdown. \n" - "14=Master Bus Rest Graceful, equivalent to Master Bus " - "Reset but preceded by a request to the managed element " - "to perform an orderly shutdown. \n" - "15=Power Cycle (Off - Soft Graceful), equivalent to " - "Power Cycle (Off - Soft) but preceded by a request to " - "the managed element to perform an orderly shutdown. \n" - "16=Power Cycle (Off - Hard Graceful), equivalent to " - "Power Cycle (Off - Hard) but preceded by a request to " - "the managed element to perform an orderly shutdown. \n" - "..=DMTF Reserved. \n" - "0x7FFF..0xFFFF = Vendor Specific." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "14", "15", "16", "..", "0x7FFF..0xFFFF" }, - Values { "Other", "On", "Sleep - Light", "Sleep -Deep", - "Power Cycle (Off - Soft)", "Off - Hard", - "Hibernate (Off - Soft)", "Off - Soft", - "Power Cycle (Off-Hard)", "Master Bus Reset", - "Diagnostic Interrupt (NMI)", "Off - Soft Graceful", - "Off - Hard Graceful", "Master Bus Reset Graceful", - "Power Cycle (Off - Soft Graceful)", - "Power Cycle (Off - Hard Graceful)", "DMTF Reserved", - "Vendor Specific" }, - MappingStrings { "IEEE P1621 | 3.2" }, - ModelCorrespondence { - "CIM_PowerManagementService.RequestPowerStateChange", - "CIM_AssociatedPowerManagementService.PowerState" }] - uint16 PowerStatesSupported[]; - - [Description ( - "An enumeration indicating the specific power-related " - "capabilities of a managed element. Since this is an " - "array, multiple values may be specified. The current " - "values in the enumeration are: \n" - "0 = Unknown \n" - "1 = Other \n" - "2 = Power Saving Modes Entered Automatically, describing " - "that a managed element can change its power state based " - "on usage or other criteria \n" - "3 = Power State Settable, indicating that the " - "RequestPowerStateChange method is supported \n" - "4 = Power Cycling Supported, indicating that the " - "RequestPowerStateChange method can be invoked with the " - "PowerState input variable set to \'Power Cycle (Off " - "Soft)\' \n" - "5 = Timed Power On Supported, indicating that the " - "RequestPowerStateChange method can be invoked with the " - "PowerState input variable set to \'Power On\' and the " - "Time parameter set to a specific date and time, or " - "interval, for power-on.8 = Graceful Shutdown Supported, " - "indicating that the managed element can be sent a " - "hardware signal requesting an orderly shutdown prior to " - "the requested power state change." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Unknown", "Other", - "Power Saving Modes Entered Automatically", - "Power State Settable", "Power Cycling Supported", - "Timed Power On Supported", - "Off Hard Power Cycling Supported", "HW Reset Supported", - "Graceful Shutdown Supported" }, - ModelCorrespondence { - "CIM_PowerManagementService.RequestPowerStateChange", - "CIM_PowerManagementCapabilities.OtherPowerChangeCapabilities" }] - uint16 PowerChangeCapabilities[]; - - [Description ( - "A string describing the additional power management " - "capabilities of the element, used when the " - "PowerChangeCapabilities is set to the value 1, \"Other\"." ), - ModelCorrespondence { - "CIM_PowerManagementCapabilities.PowerChangeCapabilities" }] - string OtherPowerChangeCapabilities; - - [Description ( - "An enumeration that indicates the requested power states " - "supported by the power management service. Because this " - "is an array, multiple values can be specified. The " - "current values in the enumeration are: \n" - "2=On, corresponding to ACPI state G0 or S0 or D0. \n" - "3=Sleep - Light, corresponding to ACPI state G1, S1/S2, " - "or D1. \n" - "4=Sleep - Deep, corresponding to ACPI state G1, S3, or D2.\n" - "5=Power Cycle (Off - Soft), corresponding to ACPI state " - "G2, S5, or D3, but where the managed element is set to " - "return to power state \"On\" at a pre-determined time. \n" - "6=Off - Hard, corresponding to ACPI state G3, S5, or D3. \n" - "7=Hibernate (Off - Soft), corresponding to ACPI state " - "S4, where the state of the managed element is preserved " - "and will be recovered upon powering on. \n" - "8=Off - Soft, corresponding to ACPI state G2, S5, or D3. " - "9= Power Cycle (Off-Hard), corresponds to the managed " - "element reaching the ACPI state G3 followed by ACPI " - "state S0. \n" - "10=Master Bus Reset, corresponds to the system reaching " - "ACPI state S5 followed by ACPI state S0. This is used to " - "represent system master bus reset. 11=Diagnostic " - "Interrupt (NMI), corresponding to the system reaching " - "ACPI state S5 followed by ACPI state S0. This is used to " - "represent system non-maskable interrupt. 12=Off - Soft " - "Graceful, equivalent to Off Soft but preceded by a " - "request to the managed element to perform an " - "orderlyshutdown. \n" - "13=Off - Hard Graceful, equivalent to Off Hard but " - "preceded by a request to the managed element to perform " - "an orderly shutdown. \n" - "14=Master Bus Rest Graceful, equivalent to Master Bus " - "Reset but preceded by a request to the managed element " - "to perform an orderly shutdown. \n" - "15=Power Cycle (Off - Soft Graceful), equivalent to " - "Power Cycle (Off - Soft) but preceded by a request to " - "the managed element to perform an orderly shutdown. \n" - "16=Power Cycle (Off - Hard Graceful), equivalent to " - "Power Cycle (Off - Hard) but preceded by a request to " - "the managed element to perform an orderly shutdown. \n" - "17=Diagnostic Interrupt (INIT), equivalent to Diagnostic " - "Interrupt (NMI) but performed by an INIT switch instead " - "because the NMI signal is masked. \n" - "..=DMTF Reserved. \n" - "0x7FFF..0xFFFF = Vendor Specific." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "14", "15", "16", "17", "..", - "0x7FFF..0xFFFF" }, - Values { "Other", "On", "Sleep - Light", "Sleep -Deep", - "Power Cycle (Off - Soft)", "Off - Hard", - "Hibernate (Off - Soft)", "Off - Soft", - "Power Cycle (Off-Hard)", "Master Bus Reset", - "Diagnostic Interrupt (NMI)", "Off - Soft Graceful", - "Off - Hard Graceful", "Master Bus Reset Graceful", - "Power Cycle (Off - Soft Graceful)", - "Power Cycle (Off - Hard Graceful)", - "Diagnostic Interrupt (INIT)", "DMTF Reserved", - "Vendor Specific" }, - MappingStrings { "IEEE P1621 | 3.2" }, - ModelCorrespondence { - "CIM_PowerManagementCapabilities.PowerStatesSupported", - "CIM_PowerManagementService.RequestPowerStateChange", - "CIM_AssociatedPowerManagementService.PowerState" }] - uint16 RequestedPowerStatesSupported[]; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_PowerManagementService.mof b/build/vendor/dmtf_mof/Core/CIM_PowerManagementService.mof deleted file mode 100644 index e21c59a8..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_PowerManagementService.mof +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) 2008 DMTF. All Rights Reserved. - [Version ( "2.19.1" ), - UMLPackagePath ( "CIM::Core::PowerMgmt" ), - Description ( - "A class derived from Service that describes power management " - "functionality, hosted on a System. Whether this service might " - "be used to affect the power state of a particular element is " - "defined by the CIM_ServiceAvailable ToElement association." )] -class CIM_PowerManagementService : CIM_Service { - - - [Deprecated { - "CIM_PowerManagementService.RequestPowerStateChange" }, - Description ( - "The CIM_PowerManagementService.RequestPowerStateChange " - "method should be used instead of SetPowerState method, " - "which is deprecated. SetPowerState defines the desired " - "power state of the managed element and when the element " - "should be put into that state. The SetPowerState method " - "has three input parameters, no output parameters, and a " - "result. \n" - "- PowerState indicates the desired power state. \n" - "- ManagedElement indicates the element whose state is " - "set. This element should be associated with the service " - "using the ServiceAvailableToElement relationship. \n" - "- Time indicates when the power state should be set, " - "either as a regular date-time value or as an interval " - "value (where the interval begins when the method " - "invocation is received). \n" - "Note that when the PowerState parameter is equal to 5, " - "\"Power Cycle (Off -Soft)\", the Time parameter " - "indicates when the managed element should be powered on " - "again. Power-off is immediate. \n" - "SetPowerState should return 0 if successful, 1 if the " - "specified State and Time request is not supported for " - "the element, and some other value if any other error " - "occurred. In a subclass, the set of possible return " - "codes could be specified, using a ValueMap qualifier on " - "the method. The strings to which the ValueMap contents " - "are \'translated\' can also be specified in the subclass " - "as a Values array qualifier." )] - uint32 SetPowerState( - [IN, Description ( "The power state for ManagedElement." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "On", "Sleep - Light", "Sleep -Deep", - "Vendor Specific", "Power Cycle (Off - Soft)", - "Off - Hard", "Hibernate (Off - Soft)", "Off - Soft" }, - MappingStrings { "IEEE P1621 | 3.2" }] - uint16 PowerState, - [IN, Description ( - "ManagedElement indicates the element whose state is set." - )] - CIM_ManagedElement REF ManagedElement, - [IN, Description ( - "Time indicates when the power state should be set, " - "either as a regular date-time value or as an " - "interval value (where the interval begins when the " - "method invocation is received." )] - datetime Time); - - [Description ( - "RequestPowerStateChange defines the desired power state " - "of the managed element, and when the element should be " - "put into that state. The RequestPowerStateChange method " - "has five input parameters and a result code. \n" - "- PowerState indicates the desired power state. \n" - "- ManagedElement indicates the element whose state is " - "set. This element SHOULD be associated to the service " - "using the AssociatedPowerManagementService relationship. \n" - "- Time indicates when the power state should be set, " - "either as a regular date-time value or as an interval " - "value (where the interval begins when the method " - "invocation is received). \n" - "- Job is a reference to the job if started. \n" - "- TimeOutPeriod indicates the maximum amount of time a " - "client is expects the transition to take. \n" - "See CIM_PowerStateCapabilities for descriptions of " - "PowerState parameter enumerations." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", - "4097", "4098", "4099", "4100..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown or Unspecified Error", - "Cannot complete within Timeout Period", "Failed", - "Invalid Parameter", "In Use", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Invalid State Transition", - "Use of Timeout Parameter Not Supported", "Busy", - "Method Reserved", "Vendor Specific" }] - uint32 RequestPowerStateChange( - [IN, Description ( "The power state for ManagedElement." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16" }, - Values { "Power On", "Sleep - Light", "Sleep - Deep", - "Power Cycle (Off Soft)", "Power Off - Hard", - "Hibernate", "Power Off - Soft", - "Power Cycle (Off Hard)", "Master Bus Reset", - "Diagnostic Interrupt (NMI)", - "Power Off - Soft Graceful", - "Power Off - Hard Graceful", - "Master Bus Reset Graceful", - "Power Cycle (Off - Soft Graceful)", - "Power Cycle (Off - Hard Graceful)" }] - uint16 PowerState, - [IN, Description ( - "ManagedElement indicates the element whose state is set." - )] - CIM_ManagedElement REF ManagedElement, - [IN, Description ( - "Time indicates when the power state should be set, " - "either as a regular date-time value or as an " - "interval value (where the interval begins when the " - "method invocation is received." )] - datetime Time, - [IN ( false ), OUT, Description ( - "Reference to the job (can be null if the task is completed)." - )] - CIM_ConcreteJob REF Job, - [IN, Description ( - "A timeout period that specifies the maximum amount " - "of time that the client expects the transition to " - "the new state to take. The interval format must be " - "used to specify the TimeoutPeriod. A value of 0 or " - "a null parameter indicates that the client has no " - "time requirements for the transition. \n" - "If this property does not contain 0 or null and " - "the implementation does not support this " - "parameter, a return code of \'Use Of Timeout " - "Parameter Not Supported\' must be returned." )] - datetime TimeoutPeriod); - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_PowerUtilizationManagementCapabilities.mof b/build/vendor/dmtf_mof/Core/CIM_PowerUtilizationManagementCapabilities.mof deleted file mode 100644 index 0a26ca6b..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_PowerUtilizationManagementCapabilities.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.23.0" ), - UMLPackagePath ( "CIM::Device::CoolingAndPower" ), - Description ( - "CIM_PowerUtilizationManagementCapabilities describes the " - "capabilities of the associated " - "CIM_PowerUtilizationManagementService." )] -class CIM_PowerUtilizationManagementCapabilities : CIM_EnabledLogicalElementCapabilities { - - [Description ( - "PowerUtilizationModesSupported indicates the power " - "utilization modes supported by associated instances of " - "CIM_PowerUtilizationManagementService. See " - "CIM_PowerUtilizationManagementService.PowerSavingMode " - "for a description of each enumeration value." ), - ValueMap { "3", "4", "..", "32768..65535" }, - Values { "Dynamic", "Static", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { - "CIM_PowerUtilizationManagementService.PowerUtilizationMode" }] - uint16 PowerUtilizationModesSupported[]; - - [Description ( "Enumeration of supported method identifiers" ), - ValueMap { "2", "..", "32768..65535" }, - Values { "ApplyPowerAllocationSettings", "DMTF Reserved", - "Vendor Reserved" }] - uint16 SupportedMethods[]; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_PowerUtilizationManagementService.mof b/build/vendor/dmtf_mof/Core/CIM_PowerUtilizationManagementService.mof deleted file mode 100644 index 26e02854..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_PowerUtilizationManagementService.mof +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.23.0" ), - UMLPackagePath ( "CIM::Device::CoolingAndPower" ), - Description ( - "PowerUtilizationManagementService represents the ability of a " - "platform or component to perform autonomic management of its " - "power utilization." )] -class CIM_PowerUtilizationManagementService : CIM_Service { - - [Description ( - "PowerUtilizationMode indicates the current power " - "utilization mode implemented by the service. The mode " - "selection is a generally made infrequently as part of " - "element configuration. \n" - "A value of \"None\" shall indicate that no effort is " - "being made to reduce the power consumed by the system " - "below nominal. \n" - "A value of \"Dynamic\" shall indicate the " - "PowerUtilizationManagementService is actively modifying " - "the configuration of one or more system components in " - "order to reduce the power consumed. \n" - "A value of \"Static\" shall indicate the system whose " - "power utilization functionality is represented by the " - "PowerUtilizationManagementService is operating with a " - "fixed configuration resulting in a lower level of power " - "consumption than nominal. Static mode differs from " - "dynamic in that the mode corresponds to a single fixed " - "configuration, while dynamic mode implies frequent " - "changes in system configuration." ), - ValueMap { "2", "3", "4", "..", "32768..65535" }, - Values { "None", "Dynamic", "Static", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { - "CIM_PowerUtilizationManagementCapabilities.PowerUtilizationModesSupported" }] - uint16 PowerUtilizationMode = 2; - - - [Description ( - "Applies the Power Allocation Settings that " - "represents.the power aspect of the system. When applied " - "to a system\'s Power Allocation settings, a system\'s " - "power allocation settingsmay be modified.Upon " - "successfull execution if the limit property of the power " - "aspectis modified the power cap is modified" ), - ValueMap { "0", "1", "2", "4096", "..", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Failed", "Job Started", "DMTF Reserved", "Vendor Reserved" }] - uint32 ApplyPowerAllocationSettings( - [Required, In, Description ( - "An embedded instance of class " - "CIM_PowerAllocationSettingData that describes " - "modifications to the existing power allocation " - "aspects of a computer system. The embedded " - "instance must have a valid InstanceID in order to " - "identify the power allocation setting to be " - "modified." ), - EmbeddedInstance ( "CIM_PowerAllocationSettingData" )] - string PowerAllocationSettings, - [In ( false ), Out, Description ( - "If the operation is long running, then optionally " - "a job be returned." )] - CIM_ConcreteJob REF Job); - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_Product.mof b/build/vendor/dmtf_mof/Core/CIM_Product.mof deleted file mode 100644 index 2e310926..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_Product.mof +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Core::ProductFRU" ), - Description ( - "CIM_Product is a concrete class that aggregates " - "PhysicalElements, software (SoftwareIdentity and " - "SoftwareFeatures), Services and/or other Products, and is " - "acquired as a unit. Acquisition implies an agreement between " - "supplier and consumer which may have implications to Product " - "licensing, support and warranty. Non-commercial (e.g., " - "in-house developed Products) should also be identified as an " - "instance of CIM_Product. \n" - "Note that software is handled a bit differently in the list of " - "aggregated entities, above. This is because software can be " - "viewed as a tangible asset (similar to PhysicalElements) AND/ " - "OR as a set of features that make up a Product and are " - "deployed. These are two different concepts, usually managed by " - "different units in a business\' organization. When software " - "\'features\' are described, the CIM_SoftwareFeature class from " - "the Application Model is instantiated (where Features are Weak " - "to/scoped by a Product). When a specific piece of software is " - "acquired and perhaps warrantied as part of a Product, this is " - "addressed by the class, SoftwareIdentity." )] -class CIM_Product : CIM_ManagedElement { - - [Key, Description ( "Commonly used Product name." ), - MaxLen ( 256 ), - MappingStrings { "MIF.DMTF|ComponentID|001.2" }, - ModelCorrespondence { "PRS_Product.ProductName" }] - string Name; - - [Key, Description ( - "Product identification such as a serial number on " - "software, a die number on a hardware chip, or (for " - "non-commercial Products) a project number." ), - MaxLen ( 64 ), - MappingStrings { "MIF.DMTF|ComponentID|001.4" }] - string IdentifyingNumber; - - [Key, Description ( - "The name of the Product\'s supplier, or entity selling " - "the Product (the manufacturer, reseller, OEM, etc.). " - "Corresponds to the Vendor property in the Product object " - "in the DMTF Solution Exchange Standard." ), - MaxLen ( 256 ), - MappingStrings { "MIF.DMTF|ComponentID|001.1" }, - ModelCorrespondence { "PRS_Product.Vendor" }] - string Vendor; - - [Key, Description ( "Product version information." ), - MaxLen ( 64 ), - MappingStrings { "MIF.DMTF|ComponentID|001.3" }, - ModelCorrespondence { "PRS_Product.Version" }] - string Version; - - [Description ( "Product SKU (stock keeping unit) information." ), - MaxLen ( 64 )] - string SKUNumber; - - [Description ( - "If this Product is under warranty, the start date of the warranty." - ), - MappingStrings { "MIF.DMTF|FRU|002.9" }, - ModelCorrespondence { "CIM_Product.WarrantyDuration" }] - datetime WarrantyStartDate; - - [Description ( - "If this Product is under warranty, the duration of the " - "warranty in days." ), - Units ( "Days" ), - MappingStrings { "MIF.DMTF|FRU|002.10" }, - ModelCorrespondence { "CIM_Product.WarrantyStartDate" }, - PUnit ( "day" )] - uint32 WarrantyDuration; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ProductComponent.mof b/build/vendor/dmtf_mof/Core/CIM_ProductComponent.mof deleted file mode 100644 index b4a1cfb7..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ProductComponent.mof +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Deprecate class. -// ================================================================== -// CIM_ProductComponent -// ================================================================== - [Association, Deprecated { "CIM_ConcreteComponent" }, - Aggregation, Composition, Version ( "2.15.0" ), - UMLPackagePath ( "CIM::Core::ProductFRU" ), - Description ( - "The CIM_ProductComponent association defines a containment and " - "component relationship among Products. For example, a Product " - "may come bundled with other Products. \n" - "Note that this association duplicates ProductParentChild. The " - "latter association is maintained for legacy reasons. This " - "association, ProductComponent, is added for ease of query and " - "modeling consistency. Using ProductComponent, an application " - "can query for all Component relationships for a Product, " - "versus querying the various Component relationships AND " - "ProductParentChild." )] -class CIM_ProductComponent : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Description ( - "The Product which contains another Product as a " - "component. The cardinality of this reference takes the " - "default values (no minimum or maximum) since an instance " - "of Product can describe either a general product type, " - "or a specific item that is acquired. In the case of a " - "specific item, a cardinality of Max(1) is indicated. " - "However, when dealing with the general " - "description/templating of a Product, then it may be a " - "component of several others and a cardinality of Max(1) " - "would be invalid." ), - ModelCorrespondence { "PRS_ProductComponent.Antecedent" }] - CIM_Product REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The contained Product." ), - ModelCorrespondence { "PRS_ProductComponent.Dependent" }] - CIM_Product REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ProductFRU.mof b/build/vendor/dmtf_mof/Core/CIM_ProductFRU.mof deleted file mode 100644 index bf8d5460..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ProductFRU.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ProductFRU -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::ProductFRU" ), - Description ( - "CIM_ProductFRU is an association between Product and FRU that " - "provides information regarding what Product components have " - "been or are being replaced. The association is one to many, " - "conveying that a Product can have many FRUs, and that a " - "particular instance of a FRU is only applied to one (instance " - "of a) Product." )] -class CIM_ProductFRU { - - [Key, Max ( 1 ), - Description ( "The Product to which the FRU is applied." )] - CIM_Product REF Product; - - [Key, Description ( "The FRU." )] - CIM_FRU REF FRU; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ProductParentChild.mof b/build/vendor/dmtf_mof/Core/CIM_ProductParentChild.mof deleted file mode 100644 index 000669cb..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ProductParentChild.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ProductParentChild -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Core::ProductFRU" ), - Description ( - "The CIM_ProductParentChild association defines a parent child " - "hierarchy among Products. For example, a Product may come " - "bundled with other Products." )] -class CIM_ProductParentChild { - - [Key, Aggregate, Description ( - "The parent Product in the association." )] - CIM_Product REF Parent; - - [Key, Description ( "The child Product in the association." )] - CIM_Product REF Child; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ProductPhysicalComponent.mof b/build/vendor/dmtf_mof/Core/CIM_ProductPhysicalComponent.mof deleted file mode 100644 index 038baddd..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ProductPhysicalComponent.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ProductPhysicalComponent -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Core::ProductFRU" ), - Description ( - "Indicates that the referenced PhysicalElement is acquired as " - "part of a Product." )] -class CIM_ProductPhysicalComponent : CIM_Component { - - [Override ( "GroupComponent" ), - Max ( 1 ), - Description ( "The Product." )] - CIM_Product REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The PhysicalElement which is a part of the Product." )] - CIM_PhysicalElement REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ProductPhysicalElements.mof b/build/vendor/dmtf_mof/Core/CIM_ProductPhysicalElements.mof deleted file mode 100644 index c219bc79..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ProductPhysicalElements.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ProductPhysicalElements -// ================================================================== - [Association, Deprecated { "CIM_ProductPhysicalComponent" }, - Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Core::ProductFRU" ), - Description ( - "Indicates the PhysicalElement(s) that make up a Product. This " - "association is deprecated in order to correctly place it in " - "the inheritance hierarchy and align the definition with other " - "new classes that are being added to the model, such as " - "CIM_ProductServiceComponent. ProductPhysicalElements was " - "defined in the original CIM V2.0 release, when a Managed " - "Element and a Component relationship between ManagedElements " - "did not exist." )] -class CIM_ProductPhysicalElements { - - [Deprecated { "CIM_ProductPhysicalComponent.GroupComponent" }, - Key, Aggregate, Max ( 1 ), - Description ( "The Product." )] - CIM_Product REF Product; - - [Deprecated { "CIM_ProductPhysicalComponent.PartComponent" }, - Key, Description ( - "The PhysicalElement which is a part of the Product." )] - CIM_PhysicalElement REF Component; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ProductProductDependency.mof b/build/vendor/dmtf_mof/Core/CIM_ProductProductDependency.mof deleted file mode 100644 index a5d61492..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ProductProductDependency.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ProductProductDependency -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::ProductFRU" ), - Description ( - "CIM_ProductProductDependency is an association between two " - "Products, indicating that one must be installed, or must be " - "absent, for the other to function. This is conceptually " - "equivalent to the ServiceServiceDependency association." )] -class CIM_ProductProductDependency { - - [Key, Description ( "The required Product." )] - CIM_Product REF RequiredProduct; - - [Key, Description ( - "The Product that is dependent on another Product." )] - CIM_Product REF DependentProduct; - - [Description ( - "The nature of the Product dependency. This property " - "describes that the associated Product must be installed " - "(value=2) or must be absent (value=3) in order for the " - "Product to function." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Other", "Product Must Be Installed", - "Product Must Not Be Installed" }] - uint16 TypeOfDependency; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ProductServiceComponent.mof b/build/vendor/dmtf_mof/Core/CIM_ProductServiceComponent.mof deleted file mode 100644 index fbbb64bd..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ProductServiceComponent.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ProductServiceComponent -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Core::ProductFRU" ), - Description ( - "Indicates that the referenced Service is acquired as part of a " - "Product. Examples of Services that may be acquired are " - "outsourced storage and networking services, or support and " - "warranty services. Expanding on the examples, Services " - "represent generic functionality - so, it is possible to model " - "the existence of storage volume management or warranty " - "services as individual instances of subclasses of CIM_Service. " - "These \'Services\' may be enabled/disabled, started/stopped, " - "signal an error, etc. (They behave as standard " - "ManagedSystemElements.) Specific requests against the Services " - "- for example, a request for warranty service or increased " - "storage space - are NOT new instances of Service, but may be " - "requested via the methods of the Service subclass, or be " - "instantiated as specific subclasses of ManagedElement." )] -class CIM_ProductServiceComponent : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( "The Product." )] - CIM_Product REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The Service which is a part of the Product." )] - CIM_Service REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ProductSoftwareComponent.mof b/build/vendor/dmtf_mof/Core/CIM_ProductSoftwareComponent.mof deleted file mode 100644 index efa3100f..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ProductSoftwareComponent.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ProductSoftwareComponent -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Core::ProductFRU" ), - Description ( - "Indicates that the referenced SoftwareIdentity is acquired as " - "part of a Product." )] -class CIM_ProductSoftwareComponent : CIM_Component { - - [Override ( "GroupComponent" ), - Max ( 1 ), - Description ( "The Product." )] - CIM_Product REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The software which is a part of the Product." )] - CIM_SoftwareIdentity REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ProductSupport.mof b/build/vendor/dmtf_mof/Core/CIM_ProductSupport.mof deleted file mode 100644 index 101803a7..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ProductSupport.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ProductSupport -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::ProductFRU" ), - Description ( - "CIM_ProductSupport is an association between Product and " - "SupportAccess that conveys how support is obtained for the " - "Product. This is a many-to-many relationship, implying that " - "various types of Support are available for a Product, and that " - "the same Support object can provide assistance for multiple " - "Products." )] -class CIM_ProductSupport { - - [Key, Description ( "The Product." )] - CIM_Product REF Product; - - [Key, Description ( "Support for the Product." )] - CIM_SupportAccess REF Support; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_Profile.mof b/build/vendor/dmtf_mof/Core/CIM_Profile.mof deleted file mode 100644 index b0cee1da..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_Profile.mof +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Deprecated { "CIM_SettingData", "CIM_Setting", - "CIM_ConcreteComponent" }, - Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Core::Settings" ), - Description ( - "Note: The use of CIM_Profile is deprecated in favor of " - "aggregating instances of Setting or SettingData into " - "\"higher-level\" Settings or SettingData objects using the " - "ConcreteComponent association. This use simplifies the use of " - "Settings or SettingData. With Profiles subclassing from " - "Collection, separate associations were needed between an " - "element and either its Profiles or Settings or SettingData. " - "This class introduced unnecessary complexity and redundancy " - "into the model. \n" - "Deprecated description: Profile specifies a general collection " - "of Settings or SettingData objects that are logically grouped " - "together. Note: The CIM_Profile class uses simplified naming " - "or identity algorithms and collection algorithms, as compared " - "to CIM_Configuration. The settings are \"collected\" into the " - "Profile using the MemberOfCollection association. Note that a " - "Profile obtains its setting data and other necessary " - "information from collected Setting and SettingData instances " - "and by the definition of additional properties in subclasses. " - "One example of a Profile is to define the collection of " - "settings for a particular person. Another is to define the " - "collection of settings that are appropriate when initializing " - "a system. \n" - "Profile is tied to a ManagedElement using the ElementProfile " - "association. The ManagedElement provides the context for the " - "Profile, and the settings collected by Profile should be " - "settings of the associated ManagedElement. Note that a " - "ManagedElement cannot exist when the Profile is instantiated. " - "This situation is important to remember when the Profile is " - "used in the creation of the real-world entity that is " - "represented by (and then instantiated in) the ManagedElement." )] -class CIM_Profile : CIM_Collection { - - [Deprecated { "CIM_SettingData.InstanceID", - "CIM_Setting.SettingID" }, - Key, Override ( "InstanceID" ), - Description ( - "Note: The use of this element is deprecated. Deprecated " - "description: Within the scope of the instantiating " - "Namespace, InstanceID opaquely and uniquely identifies " - "an instance of this class. To ensure uniqueness within " - "the NameSpace, the value of InstanceID should be " - "constructed using the following \"preferred\" algorithm: \n" - ": \n" - "Where and are separated by a colon " - "(:), and where must include a copyrighted, " - "trademarked, or otherwise unique name that is owned by " - "the business entity that is creating or defining the " - "InstanceID or that is a registered ID assigned to the " - "business entity by a recognized global authority. (This " - "requirement is similar to the _ " - "structure of Schema class names.) In addition, to ensure " - "uniqueness, must not contain a colon (:). When " - "using this algorithm, the first colon to appear in " - "InstanceID must appear between and . \n" - " is chosen by the business entity and should " - "not be reused to identify different underlying " - "(real-world) elements. If the above \"preferred\" " - "algorithm is not used, the defining entity must assure " - "that the resulting InstanceID is not reused across any " - "InstanceIDs that are produced by this or other providers " - "for the NameSpace of this instance. \n" - "For DMTF-defined instances, the preferred algorithm must " - "be used with the set to CIM." )] - string InstanceID; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ProtocolEndpoint.mof b/build/vendor/dmtf_mof/Core/CIM_ProtocolEndpoint.mof deleted file mode 100644 index a17170b1..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ProtocolEndpoint.mof +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add enumerations -// "Telnet", "SSH", "SM CLP", "SMTP", "LDAP", "RDP", and "HTTPS" -// to ProtocolIfType.Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ProvidesEndpoint -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Service" ), - Description ( - "This association represents a ProtocolEndpoint that is " - "provided by a Service to allow access to the Service." )] -class CIM_ProvidesEndpoint : CIM_ServiceAccessBySAP { - - [Override ( "Antecedent" ), - Description ( - "The Service that is accessed by the ProtocolEndpoint." )] - CIM_Service REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The ProtocolEndpoint that provides access to the Service." )] - CIM_ProtocolEndpoint REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ProvidesServiceToElement.mof b/build/vendor/dmtf_mof/Core/CIM_ProvidesServiceToElement.mof deleted file mode 100644 index cc148bb9..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ProvidesServiceToElement.mof +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ProvidesServiceToElement -// ================================================================== - [Association, Deprecated { "CIM_ServiceAvailableToElement" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Service" ), - Description ( - "Note: The use of the CIM_ProvidesServiceToElement class has " - "been deprecated. Instead, ServiceAvailableToElement conveys " - "the semantics of use, while the subclasses of " - "ProvidesServiceToElement (or the ConcreteDependency " - "association) describe dependency relationships. " - "CIM_ProvidesServiceToElement was meant to generalize the " - "ServiceServiceDependency association. This method indicates " - "that ManagedElements can use the functionality provided by one " - "or more Services. An example of the association is that a " - "Processor and an enclosure (a PhysicalElement) can use " - "AlertOnLAN Services to signal an incomplete or erroneous boot. " - "In reality, AlertOnLAN is simply a HostedService on a computer " - "system that is generally available for use and is not a " - "dependency of the processor or enclosure. To describe that the " - "use of the service might be restricted or have limited " - "availability or applicability, the " - "CIM_ServiceAvailableToElement association would be " - "instantiated." )] -class CIM_ProvidesServiceToElement : CIM_Dependency { - - [Deprecated { "CIM_ServiceAvailableToElement.ServiceProvided" }, - Override ( "Antecedent" ), - Description ( - "Note: The use of this element is deprecated. Deprecated " - "description: The Service provided." )] - CIM_Service REF Antecedent; - - [Deprecated { "CIM_ServiceAvailableToElement.UserOfService" }, - Override ( "Dependent" ), - Description ( - "Note: The use of this element is deprecated. Deprecated " - "description: The ManagedElement that is dependent on the " - "Service." )] - CIM_ManagedElement REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_Realizes.mof b/build/vendor/dmtf_mof/Core/CIM_Realizes.mof deleted file mode 100644 index e7567674..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_Realizes.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Realizes -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::Device" ), - Description ( - "CIM_Realizes is the association that defines the mapping " - "between LogicalDevices and the PhysicalElements that implement " - "them." )] -class CIM_Realizes : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "The physical component that implements the Device." )] - CIM_PhysicalElement REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The LogicalDevice." )] - CIM_LogicalDevice REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_RedundancyComponent.mof b/build/vendor/dmtf_mof/Core/CIM_RedundancyComponent.mof deleted file mode 100644 index dece2776..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_RedundancyComponent.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Deprecated -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RedundancyComponent -// ================================================================== - [Association, Deprecated { "CIM_MemberOfCollection" }, - Aggregation, Version ( "2.13.0" ), - UMLPackagePath ( "CIM::Core::Redundancy" ), - Description ( - "A RedundancyGroup aggregates Managed System Elements and " - "indicates that these elements, taken together, provide " - "redundancy. All elements aggregated in a RedundancyGroup " - "should be instantiations of the same object class. \n" - "The use of this class is being depreacted in lieu of using " - "MemberOfCollection in conjunction with RedundancySet." )] -class CIM_RedundancyComponent : CIM_Component { - - [Deprecated { "CIM_MemberOfCollection.Collection" }, - Aggregate, Override ( "GroupComponent" ), - Description ( - "The RedundancyComponent association indicates that \'this " - "set of fans\' or \'these physical extents\' participate " - "in a single RedundancyGroup." )] - CIM_RedundancyGroup REF GroupComponent; - - [Deprecated { "CIM_MemberOfCollection.Member" }, - Override ( "PartComponent" ), - Description ( "The component of the redundancy group." )] - CIM_ManagedSystemElement REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_RedundancyGroup.mof b/build/vendor/dmtf_mof/Core/CIM_RedundancyGroup.mof deleted file mode 100644 index 2e05fcef..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_RedundancyGroup.mof +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Deprecated -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RedundancyGroup -// ================================================================== - [Deprecated { "CIM_RedundancySet" }, - Version ( "2.13.0" ), - UMLPackagePath ( "CIM::Core::Redundancy" ), - Description ( - "A class derived from LogicalElement that is a special " - "collection of ManagedSystemElements. This collection indicates " - "that the aggregated components together provide redundancy. " - "All elements aggregated in a RedundancyGroup should be " - "instantiations of the same object class. \n" - "The use of this class is being deprecated in lieu of using the " - "RedundancySet class." )] -class CIM_RedundancyGroup : CIM_LogicalElement { - - [Deprecated { "No Value" }, - Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Deprecated { "CIM_RedundancySet.InstanceID" }, - Key, Override ( "Name" ), - Description ( - "The RedundancyGroup Name serves as the key for the " - "Group\'s instance in an enterprise environment." ), - MaxLen ( 256 )] - string Name; - - [Deprecated { "CIM_RedundancySet.RedundancyStatus" }, - Description ( - "RedundancyStatus provides information on the state of " - "the RedundancyGroup. \"Fully Redundant\" (value=2) means " - "that all of the configured redundancy is still " - "available; \"Degraded Redundancy\" (3) means that some " - "failures have been experienced but some reduced amount " - "of redundancy is still available; \"Redundancy Lost\" " - "(4) means that a sufficient number of failures have been " - "experienced such that no redundancy is available and the " - "next failure experienced will cause overall failure. " - "Also, the values, \"Other\" (1) and \"Unknown\" (0), are " - "defined." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "Fully Redundant", - "Degraded Redundancy", "Redundancy Lost" }] - uint16 RedundancyStatus; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_RedundancySet.mof b/build/vendor/dmtf_mof/Core/CIM_RedundancySet.mof deleted file mode 100644 index 3143ef6f..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_RedundancySet.mof +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.18.0" ), - UMLPackagePath ( "CIM::Core::Redundancy" ), - Description ( - "A class derived from SystemSpecificCollection that is a " - "special collection of ManagedElements. This collection " - "indicates that the aggregated elements together provide " - "redundancy, or that redundancy is provided via sparing. All " - "elements collected in a RedundancySet SHOULD be instantiations " - "of the same object class." )] -class CIM_RedundancySet : CIM_SystemSpecificCollection { - - [Description ( - "RedundancyStatus provides information on the state of " - "the RedundancyGroup. \'Fully Redundant\' (value=2) means " - "that all of the configured redundancy is still " - "available; \'Degraded Redundancy\' (3) means that some " - "configured elements are degraded, missing or failed but " - "that the number of elements in the set is still greater " - "than the minimum required (\'MinNumberNeeded\'); " - "\'Redundancy Lost\' (4) means that sufficient configured " - "elements are missing or failed that no redundancy is " - "available and the next failure experienced will cause " - "overall failure. \'Overall Failure\' (5) means that " - "there has been an overall failure of the RedundancySet." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "DMTF Reserved", "Fully Redundant", - "Degraded Redundancy", "Redundancy Lost", "Overall Failure" }, - ModelCorrespondence { "CIM_RedundancySet.MinNumberNeeded" }] - uint16 RedundancyStatus; - - [Description ( - "TypeOfSet provides information on the type of " - "redundancy. N+1 (=2) indicates all members are active, " - "are unaware and function independent of one another. " - "However, there exist at least one extra member to " - "achieve functionality. \'Sparing\' is implied (i.e. each " - "member can be a spare for the other(s). An example of " - "N+1 is a system that has 2 power supplies, but needs " - "only 1 power supply to functioning properly. N+1 is a " - "special case of N+M redundancy where M=1. A value of N+1 " - "(=2) shall be used for N+M redundancy. - Load Balanced " - "(=3) indicates all members are active. However, there " - "functionality is not independent of each other. Their " - "functioning is determined by some sort of load balancing " - "algrothim (implemented in hardware and/or software). " - "\'Sparing\' is implied (i.e. each member can be a spare " - "for the other(s). \n" - "- Sparing (=4) indicates that all members are active and " - "are aware of each others. However, their functionality " - "is independent until failover. Each member can be a " - "spare for the other(s). \n" - "- Limited Sparing (=5) indicates that all members are " - "active, and they may or may not be aware of each and " - "they are not spares for each other. Instead, their " - "redundancy is indicated by the IsSpare relationship." ), - ValueMap { "0", "1", "2", "3", "4", "5", "..", "0x8000.." }, - Values { "Unknown", "Other", "N+1", "Load Balanced", - "Sparing", "Limited Sparing", "DMTF Reserved", - "Vendor Reserved" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_RedundancySet.OtherTypeOfSet" }] - uint16 TypeOfSet[]; - - [Description ( - "MinNumberNeeded indicates the smallest number of " - "elements that MUST be operational in order to function. " - "For example, in an N+1 redundancy relationship, the " - "MinNumberNeeded property is set equal to N. In a " - "\'LimitedSparing\' environment, this property is " - "meaningless and SHOULD be set to zero." ), - MinValue ( 0 )] - uint32 MinNumberNeeded; - - [Description ( - "MaxNumberSupported indicates the largest number of " - "elements that can participate in the RedundancySet. A " - "value of 0 indicates there is no limit on the number of " - "elements." )] - uint32 MaxNumberSupported; - - [Description ( - "VendorIdentifyingInfo captures the vendor identifying " - "data for the RedundancySet. One example is the product " - "name for a cluster." )] - string VendorIdentifyingInfo; - - [Description ( - "When the corresponding array entry in TypeOfSet[] is " - "\'Other\', this entry provides a string describing the " - "type of set." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_RedundancySet.TypeOfSet" }] - string OtherTypeOfSet[]; - - [Write, Description ( - "The current load balance algorithm. \n" - "Least Blocks, Least IO, and Address Region are used in " - "storage device path redundancy drivers to optimize load " - "balancing by routing requests to a path with the least " - "queued blocks or IO requests, or based on locality of " - "reference. \n" - "\'Product Specific\' indicates that the algorithm is " - "optimized for a particular type of product. Information " - "about that product SHOULD be provided in an associated " - "CIM_Product instance." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7" }, - Values { "Unknown", "Other", "No Load Balancing", - "Round Robin", "Least Blocks", "Least IO", - "Address Region", "Product Specific" }, - ModelCorrespondence { - "CIM_RedundancySet.OtherLoadBalanceAlgorithm" }] - uint16 LoadBalanceAlgorithm = 2; - - [Write, Description ( - "When LoadBalanceAlgorithm is Other, this property " - "describes the algorithm." ), - ModelCorrespondence { "CIM_RedundancySet.LoadBalanceAlgorithm" }] - string OtherLoadBalanceAlgorithm; - - - [Description ( - "This method forces a failover from one ManagedElement to " - "another. There are two parameters to the Failover " - "method. \n" - "- FailoverFrom is a reference to an \'active\' " - "ManagedElement that will become inactive after the " - "method. This element SHOULD be part of the RedundancySet " - "via a MemberOfCollection relationship. \n" - "- FailoverTo is a reference to the ManagedElement that " - "will take over for the FailoverFrom element. This " - "element SHOULD either be a member of the RedundancySet " - "or be associated with the RedundancySet via an IsSpare " - "relationship. \n" - "\n" - "Upon sucessful completion: \n" - "- the FailoverTo element SHOULD be associated to the " - "RedundancySet via MemberOfCollection. \n" - "- the FailFrom element SHOULD either still be associated " - "to the RedundandySet via MemberOfCollection with a " - "OperationalStatus or EnableState that indicates it not " - "active, or it SHOULD be associated to the \'Spared\' " - "collection via the MemberOfCollection association." ), - ValueMap { "0", "1", "2", "3", "4", "..", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", "Busy/In Use", - "Paramter Error", "DMTF Reserved", "Vendor Reserved" }] - uint32 Failover( - [IN, Description ( - "The primary ManagedSystemElement that will become " - "inactive after the method." )] - CIM_ManagedElement REF FailoverFrom, - [IN, Description ( - "The ManagedSystemElement that will take over from " - "the primary MSE." )] - CIM_ManagedElement REF FailoverTo); - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_RelatedStatisticalData.mof b/build/vendor/dmtf_mof/Core/CIM_RelatedStatisticalData.mof deleted file mode 100644 index 0b1010fb..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_RelatedStatisticalData.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RelatedStatisticalData -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Core::Statistics" ), - Description ( - "CIM_RelatedStatisticalData is an association that defines " - "hierarchies and/or dependencies of related CIM_Statistical " - "Data classes." )] -class CIM_RelatedStatisticalData { - - [Key, Description ( "The statistic information/object." )] - CIM_StatisticalData REF Stats; - - [Key, Description ( "The related statistics." )] - CIM_StatisticalData REF RelatedStats; - - [Description ( - "A free-form string describing how the statistics are related." - )] - string Description; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_RelatedStatistics.mof b/build/vendor/dmtf_mof/Core/CIM_RelatedStatistics.mof deleted file mode 100644 index 6fa8cc89..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_RelatedStatistics.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RelatedStatistics -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::Statistics" ), - Description ( - "CIM_RelatedStatistics is an association that defines " - "hierarchies and/or dependencies of related CIM_Statistical " - "Information classes." )] -class CIM_RelatedStatistics { - - [Key, Description ( "The statistic information/object." )] - CIM_StatisticalInformation REF Stats; - - [Key, Description ( "The related statistics or metrics." )] - CIM_StatisticalInformation REF RelatedStats; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_RemotePort.mof b/build/vendor/dmtf_mof/Core/CIM_RemotePort.mof deleted file mode 100644 index 274ce640..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_RemotePort.mof +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RemotePort -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Service" ), - Description ( - "RemotePort adds port information to the access data (such as " - "IP Address) that is specified in and inherited from " - "RemoteServiceAccessPoint. For example, using the additional " - "properties in this class, you could indicate that UDP Port 123 " - "is accessed at IP Address xyz. The IP Address would be " - "specified in the inherited AccessInfo property, while the UDP " - "Port number would be specified in the PortInfo property of " - "this class." )] -class CIM_RemotePort : CIM_RemoteServiceAccessPoint { - - [Description ( - "Port information that might further specify the remote " - "access information." ), - ModelCorrespondence { "CIM_RemotePort.PortProtocol" }] - string PortInfo; - - [Description ( - "An enumerated integer that describes the protocol of the " - "port that is addressed by PortInformation." ), - ValueMap { "1", "2", "3", "32768..65535" }, - Values { "Other", "TCP", "UDP", "Vendor Specific" }, - ModelCorrespondence { - "CIM_RemotePort.OtherProtocolDescription" }] - uint16 PortProtocol; - - [Description ( - "Describes the protocol when the property PortProtocol is " - "set to 1 (Other)." ), - ModelCorrespondence { "CIM_RemotePort.PortProtocol" }] - string OtherProtocolDescription; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_RemoteServiceAccessPoint.mof b/build/vendor/dmtf_mof/Core/CIM_RemoteServiceAccessPoint.mof deleted file mode 100644 index 738a2819..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_RemoteServiceAccessPoint.mof +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.21.0" ), - UMLPackagePath ( "CIM::Core::Service" ), - Description ( - "RemoteServiceAccessPoint describes access or addressing " - "information or a combination of this information for a remote " - "connection that is known to a local network element. This " - "information is scoped or contained by the local network " - "element, because this is the context in which the connection " - "is remote. \n" - "The relevance of the remote access point and information on " - "its use are described by subclassing RemoteServiceAccessPoint " - "or by associating to it." )] -class CIM_RemoteServiceAccessPoint : CIM_ServiceAccessPoint { - - [Description ( - "Access or addressing information or a combination of " - "this information for a remote connection. This " - "information can be a host name, network address, or " - "similar information." ), - ModelCorrespondence { - "CIM_RemoteServiceAccessPoint.InfoFormat" }] - string AccessInfo; - - [Description ( - "An enumerated integer that describes the format and " - "interpretation of the AccessInfo property.\n" - "206\'Parameterized URL\'- a URL containing " - "${parameterName} strings. Those strings are intended to " - "be replaced in their entirety by the value of the named " - "parameter. The interpretation of such parameters is not " - "defined by this subclass. \n" - "As an example use: If a parameter named \'CompanyURL\' " - "has a value of \'www.DMTF.org\' and the value of " - "AccessInfo was \'http:\\${CompanyURL}\', then the " - "resultant URL is intended to be \'http:\\www.dmtf.org\'." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "100", "101", "102", "103", "104", - "200", "201", "202", "203", "204", "205", "206", "..", - "32768..65535" }, - Values { "Other", "Host Name", "IPv4 Address", - "IPv6 Address", "IPX Address", "DECnet Address", - "SNA Address", "Autonomous System Number", "MPLS Label", - "IPv4 Subnet Address", "IPv6 Subnet Address", - "IPv4 Address Range", "IPv6 Address Range", "Dial String", - "Ethernet Address", "Token Ring Address", "ATM Address", - "Frame Relay Address", "URL", "FQDN", "User FQDN", - "DER ASN1 DN", "DER ASN1 GN", "Key ID", - "Parameterized URL", "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { - "CIM_RemoteServiceAccessPoint.OtherInfoFormatDescription" }] - uint16 InfoFormat; - - [Description ( - "Describes the format when the property InfoFormat is set " - "to 1 (Other)." ), - ModelCorrespondence { - "CIM_RemoteServiceAccessPoint.InfoFormat" }] - string OtherInfoFormatDescription; - - [Description ( - "The AccessContext property identifies the role this " - "RemoteServiceAccessPoint is playing in the hosting " - "system." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "..", "32768..65535" }, - Values { "Unknown", "Other", "Default Gateway", "DNS Server", - "SNMP Trap Destination", "MPLS Tunnel Destination", - "DHCP Server", "SMTP Server", "LDAP Server", - "Network Time Protocol (NTP) Server", - "Management Service", "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { - "CIM_RemoteServiceAccessPoint.OtherAccessContext" }] - uint16 AccessContext = 0; - - [Description ( - "When the AccessContext property contains a value of 1, " - "\"Other\" then this is a free form string providing more " - "information about the role of RemoteServiceAccessPoint " - "in the hosting system." ), - ModelCorrespondence { - "CIM_RemoteServiceAccessPoint.AccessContext" }] - string OtherAccessContext; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ReplaceableProductFRU.mof b/build/vendor/dmtf_mof/Core/CIM_ReplaceableProductFRU.mof deleted file mode 100644 index 258ccc8c..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ReplaceableProductFRU.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ReplaceableProductFRU -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::ProductFRU" ), - Description ( - "ReplaceableProductFRU is an association between Product and " - "FRU that shows what Product components may be replaced. The " - "association is one to many, conveying that a Product can have " - "many FRUs, and that a particular instance of a FRU is only " - "applied to one (instance of a) Product." )] -class CIM_ReplaceableProductFRU { - - [Key, Max ( 1 ), - Description ( "The Product to which the FRU is applied." )] - CIM_Product REF Product; - - [Key, Description ( "The FRU." )] - CIM_FRU REF FRU; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ResourceAllocationFromPool.mof b/build/vendor/dmtf_mof/Core/CIM_ResourceAllocationFromPool.mof deleted file mode 100644 index 8ae3b3fa..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ResourceAllocationFromPool.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Association, Version ( "2.22.0" ), - UMLPackagePath ( "CIM::System::Resource" ), - Description ( - "ResourceAllocationFromPool associates an instance of " - "CIM_ResourceAllocationSettingData representing a resource " - "allocation with the CIM_ResourcePool from which it is " - "allocated." )] -class CIM_ResourceAllocationFromPool : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The resource pool." )] - CIM_ResourcePool REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The resource allocation." )] - CIM_ResourceAllocationSettingData REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ResourceAllocationSettingData.mof b/build/vendor/dmtf_mof/Core/CIM_ResourceAllocationSettingData.mof deleted file mode 100644 index 7f370b38..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ResourceAllocationSettingData.mof +++ /dev/null @@ -1,293 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.24.0" ), - UMLPackagePath ( "CIM::Core::Resource" ), - Description ( - "The ResourceAllocationSettingData class represents settings " - "specifically related to an allocated resource that are outside " - "the scope of the CIM class typically used to represent the " - "resource itself. These settings include information specific " - "to the allocation that may not be visible to the consumer of " - "the resource itself. For example, a virtual processor may look " - "like a 2 ghz processor to the consumer (virtual computer " - "system), however the virtualization system may use " - "time-slicing to schedule the the virtual processor to only " - "allow it to use 1 ghz." )] -class CIM_ResourceAllocationSettingData : CIM_SettingData { - - [Description ( - "The type of resource this allocation setting represents." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "14", "15", "16", "17", "18", "19", - "20", "21", "22", "23", "24", "25", "26", "27", "28", - "29", "30", "31", "32", "33", "..", "0x8000..0xFFFF" }, - Values { "Other", "Computer System", "Processor", "Memory", - "IDE Controller", "Parallel SCSI HBA", "FC HBA", - "iSCSI HBA", "IB HCA", "Ethernet Adapter", - "Other Network Adapter", "I/O Slot", "I/O Device", - "Floppy Drive", "CD Drive", "DVD drive", "Disk Drive", - "Tape Drive", "Storage Extent", "Other storage device", - "Serial port", "Parallel port", "USB Controller", - "Graphics controller", "IEEE 1394 Controller", - "Partitionable Unit", "Base Partitionable Unit", "Power", - "Cooling Capacity", "Ethernet Switch Port", - "Logical Disk", "Storage Volume", "Ethernet Connection", - "DMTF reserved", "Vendor Reserved" }, - ModelCorrespondence { - "CIM_ResourceAllocationSettingData.OtherResourceType", - "CIM_ResourceAllocationSettingData.ResourceSubType" }] - uint16 ResourceType; - - [Description ( - "A string that describes the resource type when a well " - "defined value is not available and ResourceType has the " - "value \"Other\"." ), - ModelCorrespondence { - "CIM_ResourceAllocationSettingData.ResourceType" }] - string OtherResourceType; - - [Description ( - "A string describing an implementation specific sub-type " - "for this resource. For example, this may be used to " - "distinguish different models of the same resource " - "type.The property value shall conform to this format (in " - "ABNF): vs-type = dmtf-value / other-org-value / " - "legacy-value dmtf-value = \"DMTF:\" defining-org \":\" " - "org-vs-type org-value = defining-org \":\" org-vs-type\n" - "Where: dmtf-value: is a property value defined by DMTF " - "and is defined in the description of this property. " - "other-org-value: is a property value defined by a " - "business entity other than DMTF and is not defined in " - "the description of this property. legacy-value: is a " - "property value defined by a business entity other than " - "DMTF and is not defined in the description of this " - "property. These values are permitted but recommended to " - "be deprecated over time. defining-org:\n" - "is an identifier for the business entity that defines " - "the virtual system type. It shall include a copyrighted, " - "trademarked, or otherwise unique name that is owned by " - "that business entity. It shall not be \"DMTF\" and shall " - "not contain a colon (:). org-vs-type:\n" - "is an identifier for the virtual system type within the " - "defining business entity. It shall be unique within the " - "defining-org. It may use any character allowed for CIM " - "strings, except for the following: U0000-U001F (Unicode " - "C0 controls) U0020 (space), note that the reason is that " - "OVF allows for multiple space-separated vs-type values " - "in this property. U007F (Unicode C0 controls) " - "U0080-U009F (Unicode C1 controls)\n" - "If there is a need to structure the value into segments, " - "the segments should be separated with a single colon (:).\n" - "The values of this property shall be processed case " - "sensitively. They are intended to be processed " - "programmatically (instead of being a display name) and " - "should be short.\n" - "The following DMTF values are defined: DMTF:unknown - " - "the resource sub-type is unknown or cannot be determined\n" - "Developers should consult the relevant profile for " - "defined values." ), - ModelCorrespondence { - "CIM_ResourceAllocationSettingData.ResourceType" }] - string ResourceSubType; - - [Description ( - "This property specifies which ResourcePool the resource " - "is currently allocated from, or which ResourcePool the " - "resource will be allocated from when the allocation " - "occurs." ), - ModelCorrespondence { "CIM_ResourcePool.PoolId" }] - string PoolID; - - [Description ( - "Describes the consumers visibility to the allocated resource.\n" - "A value of \"Passed-Through\" indicates the underlying " - "or host resource is utilized and passed through to the " - "consumer, possibly using partitioning. At least one item " - "shall be present in the HostResource property. \n" - "A value of \"Virtualized\" indicates the resource is " - "virtualized and may not map directly to an " - "underlying/host resource. Some implementations may " - "support specific assignment for virtualized resources, " - "in which case the host resource(s) are exposed using the " - "HostResource property. \n" - "A value of \"Not represented\" indicates a " - "representation of the resource does not exist within the " - "context of the resource consumer." ), - ValueMap { "0", "2", "3", "4", "..", "32767..65535" }, - Values { "Unknown", "Passed-Through", "Virtualized", - "Not represented", "DMTF reserved", "Vendor Reserved" }] - uint16 ConsumerVisibility; - - [Description ( - "This property exposes specific assignment of resources. " - "Each non-null value of the HostResource property shall " - "be formated as a URI per RFC3986.\n" - "If this resource is modeled then a value should be a " - "WBEM URI (DSP0207). If the resource is not modeled then " - "see the appropriate profile. \n" - "Profiles may further constrain the type of URI. A NULL " - "value or empty array requests the implementation decide " - "the kind of host resource.\n" - "If the virtual resource is mapped to more than " - "oneunderlying resource, this property may be left NULL.\n" - "If NULL, the DeviceAllocatedFromPool or " - "ResourceAllocationFromPool associations may be used to " - "determine the pool of host resources this virtual " - "resource may use. If specific assignment is utilized, " - "all underlying resources used by this virtual resource " - "should be listed.The kind of dependency is specified by " - "the ConsumerVisibility and the MappingBehavior " - "properties. Typically the array contains one item, " - "however multiple host resources may be specified. \n" - "A client may set the value(s) to indicate that the " - "requested virtual resource allocation be based on host " - "resources that are identified by element values." ), - ModelCorrespondence { - "CIM_ResourceAllocationSettingData.ConsumerVisibility", - "CIM_ResourceAllocationSettingData.MappingBehavior" }] - string HostResource[]; - - [Description ( - "This property specifies the units of allocation used by " - "the Reservation and Limit properties. For example, when " - "ResourceType=Processor, AllocationUnits may be set to " - "hertz*10^6 or percent. When ResourceType=Memory, " - "AllocationUnits may be set to bytes*10^3. \n" - "It is expected that profiles constrain the units that " - "apply in context of particular resource types.\n" - "The value of this property shall be a legal value of the " - "Programmatic Units qualifier as defined in Annex C.1 of " - "DSP0004 V2.5 or later." ), - ModelCorrespondence { - "CIM_ResourceAllocationSettingData.Reservation", - "CIM_ResourceAllocationSettingData.Limit" }, - IsPUnit] - string AllocationUnits; - - [Description ( - "This property specifies the quantity of resources " - "presented to the consumer. For example, when " - "ResourceType=Processor, this property would reflect the " - "number of discrete Processors presented to the virtual " - "computer system. When ResourceType=Memory, this property " - "could reflect the number of MB reported to the virtual " - "computer system.\n" - "The value of the VirtualQuantity property should be " - "expressed in units as defined by the value of the " - "VirtualQuantityUnits property." ), - ModelCorrespondence { - "CIM_ResourceAllocationSettingData.VirtualQuantityUnits" }] - uint64 VirtualQuantity; - - [Description ( - "This property specifies the amount of resource " - "guaranteed to be available for this allocation. On " - "system which support over-commitment of resources, this " - "value is typically used for admission control to prevent " - "an an allocation from being accepted thus preventing starvation.\n" - "The value of the Reservation property is expressed in " - "the unit specified by the value of the AllocationUnits " - "property." ), - ModelCorrespondence { - "CIM_ResourceAllocationSettingData.AllocationUnits" }] - uint64 Reservation; - - [Description ( - "This property specifies the upper bound, or maximum " - "amount of resource that will be granted for this " - "allocation. For example, a system which supports memory " - "paging may support setting the Limit of a Memory " - "allocation below that of the VirtualQuantity, thus " - "forcing paging to occur for this allocation.\n" - "The value of the Limit property is expressed in the unit " - "specified by the value of the AllocationUnits property." ), - ModelCorrespondence { - "CIM_ResourceAllocationSettingData.AllocationUnits" }] - uint64 Limit; - - [Description ( - "This property specifies a relative priority for this " - "allocation in relation to other allocations from the " - "same ResourcePool. This property has no unit of measure, " - "and is only relevant when compared to other allocations " - "vying for the same host resources." )] - uint32 Weight; - - [Description ( - "This property specifies if the resource will be " - "automatically allocated. For example when set to true, " - "when the consuming virtual computer system is powered " - "on, this resource would be allocated. A value of false " - "indicates the resource must be explicitly allocated. For " - "example, the setting may represent removable media " - "(cdrom, floppy, etc.) where at power on time, the media " - "is not present. An explicit operation is required to " - "allocate the resource." )] - boolean AutomaticAllocation; - - [Description ( - "This property specifies if the resource will be " - "automatically de-allocated. For example, when set to " - "true, when the consuming virtual computer system is " - "powered off, this resource would be de-allocated. When " - "set to false, the resource will remain allocated and " - "must be explicitly de-allocated." )] - boolean AutomaticDeallocation; - - [Description ( - "The Parent of the resource. For example, a controller " - "for the current allocation" )] - string Parent; - - [Description ( - "The thing to which this resource is connected. For " - "example, a named network or switch port." )] - string Connection[]; - - [Description ( - "The address of the resource. For example, the MAC " - "address of a Ethernet port." )] - string Address; - - [Description ( - "Specifies how this resource maps to underlying " - "resourcesIf the HostResource array contains any entries, " - "this property reflects how the resource maps to those " - "specific resources." ), - ValueMap { "0", "2", "3", "4", "5", "..", "32767..65535" }, - Values { "Unknown", "Not Supported", "Dedicated", - "Soft Affinity", "Hard Affinity", "DMTF Reserved", - "Vendor Reserved" }] - uint16 MappingBehavior; - - [Description ( - "Describes the address of this resource in the context of " - "the Parent. The Parent/AddressOnParent properties are " - "used to describe the controller relationship as well the " - "ordering of devices on a controller.For example, if the " - "parent is a PCI Controller, this property would specify " - "the PCI slot of this child device." )] - string AddressOnParent; - - [Description ( - "This property specifies the units used by the " - "VirtualQuantity property. For example\n" - "- if ResourceType=Processor, the value of the " - "VirtualQuantityUnits property may be set to \"count\", " - "indicating that the value of the VirtualQuantity " - "property is expressed as a count.\n" - "- if ResourceType=Memory, the value of the " - "VirtualQuantityUnits property may be set to " - "\"bytes*10^3\", indicating that the value of the " - "VirtualQuantity property is expressed in kilobyte.\n" - "It is expected that profiles constrain the units that " - "apply in context of particular resource types.\n" - "The value of this property shall be a legal value of the " - "Programmatic Units qualifier as defined in Annex C.1 of " - "DSP0004 V2.5 or later." ), - ModelCorrespondence { - "CIM_ResourceAllocationSettingData.VirtualQuantity" }, - IsPUnit] - string VirtualQuantityUnits = "count"; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ResourcePool.mof b/build/vendor/dmtf_mof/Core/CIM_ResourcePool.mof deleted file mode 100644 index ac6f01e6..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ResourcePool.mof +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::Resource" ), - Description ( - "A ResourcePool is a logical entity (with associated " - "controls)provided by the host system for the purpose of " - "allocation and assignment of resources. A given ResourcePool " - "may be used to allocate resources of a specific type. " - "Hierarchies of ResourcePools may be created to provide " - "administrative control over allocations. In the cases where " - "resources are subdivided, multiple resource pools may exist " - "(e.g. nodal boundaries in NUMA-like systems). In systems that " - "support over commitment, pools represent the reservable " - "capacity, not an upper bound or limit on the maximum amount " - "that can be allocated. Admission control during power on may " - "detect and prevent systems from powering due to resource " - "exhaustion. For example, over commitment on a ResourcePool " - "with ResourceType=Memory would require that sufficient space " - "be available in some backing-store, that may be managed " - "through a storage ResourcePool." )] -class CIM_ResourcePool : CIM_LogicalElement { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. To ensure uniqueness within the " - "NameSpace, the value of InstanceID should be constructed " - "using the following \"preferred\" algorithm: \n" - ": \n" - "Where and are separated by a colon " - "(:), and where must include a copyrighted, " - "trademarked, or otherwise unique name that is owned by " - "the business entity that is creating or defining the " - "InstanceID or that is a registered ID assigned to the " - "business entity by a recognized global authority. (This " - "requirement is similar to the _ " - "structure of Schema class names.) In addition, to ensure " - "uniqueness, must not contain a colon (:). When " - "using this algorithm, the first colon to appear in " - "InstanceID must appear between and . \n" - " is chosen by the business entity and should " - "not be reused to identify different underlying " - "(real-world) elements. If the above \"preferred\" " - "algorithm is not used, the defining entity must ensure " - "that the resulting InstanceID is not reused across any " - "InstanceIDs produced by this or other providers for the " - "NameSpace of this instance. \n" - "For DMTF-defined instances, the \"preferred\" algorithm " - "must be used with the set to CIM." )] - string InstanceID; - - [Description ( - "An opaque identifier for the pool. This property is used " - "to provide correlation across save and restore of " - "configuration data to underlying persistent storage." ), - ModelCorrespondence { - "CIM_ResourceAllocationSettingData.PoolId" }] - string PoolID; - - [Description ( - "If true, \"Primordial\" indicates that this ResourcePool " - "is a base from which resources are drawn and returned in " - "the activity of resource management. Being primordial " - "means that this ResourcePool shall not be created or " - "deleted by consumers of this model. However, other " - "actions, modeled or not, may affect the characteristics " - "or size of primordial ResourcePools. If false, " - "\"Primordial\" indicates that the ResourcePool, a " - "concrete Resource Pool, is subject to resource " - "allocation services functions. This distinction is " - "important because higher-level ResourcePools may be " - "assembled using the Component or " - "ElementAllocatedFromPool associations. Although the " - "higher-level abstractions can be created and deleted, " - "the most basic, (i.e. primordial), hardware-based " - "ResourcePools cannot. They are physically realized as " - "part of the System, or are actually managed by some " - "other System and imported as if they were physically " - "realized." )] - boolean Primordial = false; - - [Description ( - "This property represents the maximum amount (in units of " - "AllocationUnits) of reservations that the ResourcePool " - "can support." )] - uint64 Capacity; - - [Description ( - "This property represents the current reservations (in " - "units of AllocationUnits) spread across all active " - "allocations from this pool. In a hierarchical " - "configuration, this represents the sum of all descendant " - "ResourcePool current reservations." )] - uint64 Reserved; - - [Description ( - "The type of resource this ResourcePool may allocate." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "14", "15", "16", "17", "18", "19", - "20", "21", "22", "23", "24", "25", "26", "27", "28", - "29", "30", "31", "32", "33", "..", "0x8000..0xFFFF" }, - Values { "Other", "Computer System", "Processor", "Memory", - "IDE Controller", "Parallel SCSI HBA", "FC HBA", - "iSCSI HBA", "IB HCA", "Ethernet Adapter", - "Other Network Adapter", "I/O Slot", "I/O Device", - "Floppy Drive", "CD Drive", "DVD drive", "Disk Drive", - "Tape Drive", "Storage Extent", "Other storage device", - "Serial port", "Parallel port", "USB Controller", - "Graphics controller", "IEEE 1394 Controller", - "Partitionable Unit", "Base Partitionable Unit", "Power", - "Cooling Capacity", "Ethernet Switch Port", - "Logical Disk", "Storage Volume", "Ethernet Connection", - "DMTF reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_ResourcePool.OtherResourceType", - "CIM_ResourcePool.ResourceSubType" }] - uint16 ResourceType; - - [Description ( - "A string that describes the resource type when a well " - "defined value is not available and ResourceType is set " - "to 0 for Other." ), - ModelCorrespondence { "CIM_ResourcePool.ResourceType" }] - string OtherResourceType; - - [Description ( - "A string describing an implementation specific sub-type " - "for this pool. For example, this may be used to " - "distinguish different models of the same resource type." ), - ModelCorrespondence { "CIM_ResourcePool.ResourceType" }] - string ResourceSubType; - - [Description ( - "This property specifies the units of allocation used by " - "the Reservation and Limit properties. For example, when " - "ResourceType=Processor, AllocationUnits may be set to " - "hertz*10^6 or percent. When ResourceType=Memory, " - "AllocationUnits may be set to bytes*10^3. The value of " - "this property shall be a legal value of the Programmatic " - "Units qualifier as defined in Appendix C.1 of DSP0004 " - "V2.4 or later." ), - IsPUnit] - string AllocationUnits; - - [Description ( - "This property specifies the units for the MaxConsumable " - "and the Consumed properties." ), - ModelCorrespondence { - "CIM_ResourcePool.MaxConsumableResource", - "CIM_ResourcePool.CurrentlyConsumedResource" }, - IsPUnit] - string ConsumedResourceUnits = "count"; - - [Description ( - "This property specifies the amount of resource that the " - "resource pool currently presents to consumers.\n" - "This property is different from the Reserved property in " - "that it describes the consumers view of the resource " - "while the Reserved property describes the producers view " - "of the resource." ), - ModelCorrespondence { "CIM_ResourcePool.ConsumedResourceUnits" }] - uint64 CurrentlyConsumedResource; - - [Description ( - "This property specifies the maximum of amount of " - "consumable resource that the resource pool can present " - "to consumers.\n" - "This property is different from the Capacity property in " - "that it describes the consumers view of the resource " - "while the Capacity property describes the producers view " - "of the resource." ), - ModelCorrespondence { "CIM_ResourcePool.ConsumedResourceUnits" }] - uint64 MaxConsumableResource; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ResourcePoolConfigurationCapabilities.mof b/build/vendor/dmtf_mof/Core/CIM_ResourcePoolConfigurationCapabilities.mof deleted file mode 100644 index 1112198b..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ResourcePoolConfigurationCapabilities.mof +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::Resource" ), - Description ( - "This class exposes the supported capabilities of a " - "ResourcePoolConfigurationService. Not all implementations will " - "support all methods on the service. Clients may use instances " - "of this class to determine which methods are supported. The " - "same method must not be listed in both lists. Implementations " - "must either be non-blocking and use a Job for long running " - "operations, or always block until the operation completes." )] -class CIM_ResourcePoolConfigurationCapabilities : CIM_Capabilities { - - [Description ( - "This property reflects the methods of the associated " - "service class that are supported that may return a Job." ), - ValueMap { "2", "3", "4", "5", "6", "7", "..", "32768..65535" }, - Values { "CreateResourcePool is supported", - "CreateChild ResourcePool is supported", - "DeleteResourcePool is supported", - "AddResourcesToResourcePool is supported", - "RemoveResourcesFromResourcePool is supported", - "ChangeParentResourcePool is supported", "DMTF Reserved", - "Vendor Reserved" }] - uint32 AsynchronousMethodsSupported[]; - - [Description ( - "This property reflects the methods of the associated " - "service class that are supported andblock until " - "completed (no Job is returned.)" ), - ValueMap { "2", "3", "4", "5", "6", "7", "..", "32768..65535" }, - Values { "CreateResourcePool is supported", - "CreateChild ResourcePool is supported", - "DeleteResourcePool is supported", - "AddResourcesToResourcePool is supported", - "RemoveResourcesFromResourcePool is supported", - "CIM_ChangeParentResourcePool is supported", - "DMTF Reserved", "Vendor Reserved" }] - uint32 SynchronousMethodsSupported[]; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ResourcePoolConfigurationService.mof b/build/vendor/dmtf_mof/Core/CIM_ResourcePoolConfigurationService.mof deleted file mode 100644 index 238559c2..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ResourcePoolConfigurationService.mof +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::Resource" ), - Description ( - "This service provides for active management of Resource Pools. " - "It allows jobs to be started for the creation and deletion of " - "ResourcePools as well as addition and subtraction of host " - "resources from ResourcePools" )] -class CIM_ResourcePoolConfigurationService : CIM_Service { - - - [Description ( - "Starts a job to create a root ResourcePool. The " - "ResourcePool will be scoped to the same System as this " - "Service. If 0 is returned, then the task completed " - "successfully and the use of ConcreteJob was not " - "required. If the task will take some time to complete, a " - "ConcreteJob will be created and its reference returned " - "in the output parameter Job. The resulting pool will be " - "a root pool with no parent pool." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "..", - "4096", "4097", "4098..32767", "32768..65535" }, - Values { "Job Completed with No Error", "Not Supported", - "Unknown", "Timeout", "Failed", "Invalid Parameter", - "In Use", "Incorrect ResourceType for the Pool", - "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Size Not Supported", "Method Reserved", "Vendor Specific" }] - uint32 CreateResourcePool( - [IN, Description ( - "A end user relevant name for the pool being " - "created. If NULL, then a system supplied default " - "name can be used. The value will be stored in the " - "\'ElementName\' property for the created pool." )] - string ElementName, - [IN, Description ( - "Array of zero or more devices that are used to " - "create the Pool or modify the source extents. All " - "elements in the array must be of the same type." )] - CIM_LogicalDevice REF HostResources[], - [IN, Description ( - "The type of resources the created poolwill manage. " - "If HostResources contains elements, this property " - "must mach their type." )] - string ResourceType, - [IN ( false ), OUT, Description ( - "On success, a reference to the resulting " - "ResourcePool is returned. When a Job is returned, " - "this may be NULL, in which case, the client must " - "use the Job to find the resulting ResourcePool " - "once the Job completes." )] - CIM_ResourcePool REF Pool, - [IN ( false ), OUT, Description ( - "Reference to the job (may be null if job completed)." - )] - CIM_ConcreteJob REF Job); - - [Description ( - "Start a job to create a sub-pool from a parent pool " - "using the specified allocation settings If 0 is " - "returned, the function completed successfully and no " - "ConcreteJob instance was required. If 4096/0x1000 is " - "returned, a ConcreteJob will be started to create the " - "sub-pool. The Job\'s reference will be returned in the " - "output parameter Job." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "..", - "4096", "4097", "4098..32767", "32768..65535" }, - Values { "Job Completed with No Error", "Not Supported", - "Unknown", "Timeout", "Failed", "Invalid Parameter", - "In Use", "Incorrect ResourceType for the Pool", - "Insufficient Resources", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Size Not Supported", "Method Reserved", "Vendor Specific" }] - uint32 CreateChildResourcePool( - [IN, Description ( - "A end user relevant name for the pool being " - "created. If NULL, then a system supplied default " - "name can be used. The value will be stored in the " - "\'ElementName\' property for the created element." )] - string ElementName, - [IN, Description ( - "String containing a representation of a " - "CIM_SettingData instance that is used to specify " - "the settings for the child Pool." ), - EmbeddedInstance ( "CIM_ResourceAllocationSettingData" ), - ModelCorrespondence { - "CIM_ResourcePoolConfigurationService.CreateChildResourcePool.ParentPool" }] - string Settings[], - [IN, Description ( - "The Pool(s) from which to create the new Pool." ), - ModelCorrespondence { - "CIM_ResourcePoolConfigurationService.CreateChildResourcePool.Settings" }] - CIM_ResourcePool REF ParentPool[], - [IN ( false ), OUT, Description ( - "A reference to the resulting pool." )] - CIM_ResourcePool REF Pool, - [IN ( false ), OUT, Description ( - "Reference to the job (may be null if job completed)." - )] - CIM_ConcreteJob REF Job); - - [Description ( - "Start a job to delete a ResourcePool. No allocations may " - "be outstanding or the delete will fail with \"In Use.\" " - "If the resource pool is a root resource pool, any host " - "resources are returned back to the underlying system. If " - "0 is returned, the function completed successfully, and " - "no ConcreteJob was required. If 4096/0x1000 is returned, " - "a ConcreteJob will be started to delete the " - "ResourcePool. A reference to the Job is returned in the " - "Job parameter." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "..", - "4096", "4097..32767", "32768..65535" }, - Values { "Job Completed with No Error", "Not Supported", - "Unknown", "Timeout", "Failed", "Invalid Parameter", - "In Use", "Incorrect ResourceType for the Pool", - "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Method Reserved", "Vendor Specific" }] - uint32 DeleteResourcePool( - [IN, Description ( "Reference to the pool to delete." )] - CIM_ResourcePool REF Pool, - [IN ( false ), OUT, Description ( - "Reference to the job (may be null if job completed)." - )] - CIM_ConcreteJob REF Job); - - [Description ( - "Starts a job to add resources to a ResourcePool. If 0 is " - "returned, then the task completed successfully and the " - "use of ConcreteJob was not required. If the task will " - "take some time to complete, a ConcreteJob will be " - "created and its reference returned in the output " - "parameter Job. The resulting pool will be a root pool " - "with no parent pool." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "..", - "4096", "4097", "4098..32767", "32768..65535" }, - Values { "Job Completed with No Error", "Not Supported", - "Unknown", "Timeout", "Failed", "Invalid Parameter", - "In Use", "Incorrect ResourceType for the Pool", - "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Size Not Supported", "Method Reserved", "Vendor Specific" }] - uint32 AddResourcesToResourcePool( - [IN, Description ( - "Array of CIM_LogicalDevice instances to add to the Pool." - )] - CIM_LogicalDevice REF HostResources[], - [IN, Description ( "The pool to add the resources to." )] - CIM_ResourcePool REF Pool, - [IN ( false ), OUT, Description ( - "Reference to the job (may be null if job completed)." - )] - CIM_ConcreteJob REF Job); - - [Description ( - "Starts a job to remove resources from a ResourcePool. If " - "0 is returned, then the task completed successfully and " - "the use of ConcreteJob was not required. If the task " - "will take some time to complete, a ConcreteJob will be " - "created and its reference returned in the output " - "parameter Job. The resulting pool will be a root pool " - "with no parent pool." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "..", - "4096", "4097", "4098..32767", "32768..65535" }, - Values { "Job Completed with No Error", "Not Supported", - "Unknown", "Timeout", "Failed", "Invalid Parameter", - "In Use", "Incorrect ResourceType for the Pool", - "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Size Not Supported", "Method Reserved", "Vendor Specific" }] - uint32 RemoveResourcesFromResourcePool( - [IN, Description ( - "Array of CIM_LogicalDevice instances to remove from the Pool." - )] - CIM_LogicalDevice REF HostResources[], - [IN, Description ( - "The pool to remove the resources from." )] - CIM_ResourcePool REF Pool, - [IN ( false ), OUT, Description ( - "Reference to the job (may be null if job completed)." - )] - CIM_ConcreteJob REF Job); - - [Description ( - "Start a job to change a parent pool using the specified " - "allocation settings If 0 is returned, the function " - "completed successfully and no ConcreteJob instance was " - "required. If 4096/0x1000 is returned, a ConcreteJob will " - "be started to change the parent pool. The Job\'s " - "reference will be returned in the output parameter Job." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "..", - "4096", "4097", "4098..32767", "32768..65535" }, - Values { "Job Completed with No Error", "Not Supported", - "Unknown", "Timeout", "Failed", "Invalid Parameter", - "In Use", "Incorrect ResourceType for the Pool", - "Insufficient Resources", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Size Not Supported", "Method Reserved", "Vendor Specific" }] - uint32 ChangeParentResourcePool( - [IN, Description ( "Reference to the child pool." )] - CIM_ResourcePool REF ChildPool, - [IN, Description ( "Reference to the parent pool(s)." )] - CIM_ResourcePool REF ParentPool[], - [IN, Description ( - "Optional string containing a representation of a " - "CIM_SettingData instance that is used to specify " - "the settings for the Parent Pool." ), - EmbeddedInstance ( "CIM_ResourceAllocationSettingData" ), - ModelCorrespondence { - "CIM_ResourcePoolConfigurationService.ChangeParentResourcePool.Settings" }] - string Settings[], - [IN ( false ), OUT, Description ( - "Reference to the job (may be null if job completed)." - ), - ModelCorrespondence { - "CIM_ResourcePoolConfigurationService.ChangeParentResourcePool.ParentPool" }] - CIM_ConcreteJob REF Job); - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SAPAvailableForElement.mof b/build/vendor/dmtf_mof/Core/CIM_SAPAvailableForElement.mof deleted file mode 100644 index a4ce1cf4..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SAPAvailableForElement.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SAPAvailableForElement -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Service" ), - Description ( - "CIM_SAPAvailableForElement conveys the semantics of a Service " - "Access Point that is available for a ManagedElement. When " - "CIM_SAPAvailableForElement is not instantiated, then the SAP " - "is assumed to be generally available. If instantiated, the SAP " - "is available only for the associated ManagedElements. For " - "example, a device might provide management access through a " - "URL. This association allows the URL to be advertised for the " - "device." )] -class CIM_SAPAvailableForElement { - - [Key, Description ( - "The Service Access Point that is available." )] - CIM_ServiceAccessPoint REF AvailableSAP; - - [Key, Description ( - "The ManagedElement for which the SAP is available." )] - CIM_ManagedElement REF ManagedElement; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SAPSAPDependency.mof b/build/vendor/dmtf_mof/Core/CIM_SAPSAPDependency.mof deleted file mode 100644 index c1e8e3b0..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SAPSAPDependency.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SAPSAPDependency -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Service" ), - Description ( - "CIM_SAPSAPDependency is an association between one " - "ServiceAccessPoint and another ServiceAccessPoint that " - "indicates that the latter is required for the former to " - "utilize or connect with its Service. For example, to print to " - "a network printer, local Print Access Points must utilize " - "underlying network-related SAPs, or ProtocolEndpoints, to send " - "the print request." )] -class CIM_SAPSAPDependency : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The required ServiceAccessPoint." )] - CIM_ServiceAccessPoint REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The ServiceAccessPoint that is dependent on an underlying SAP." - )] - CIM_ServiceAccessPoint REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SAPStatisticalInformation.mof b/build/vendor/dmtf_mof/Core/CIM_SAPStatisticalInformation.mof deleted file mode 100644 index 80511e35..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SAPStatisticalInformation.mof +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SAPStatisticalInformation -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::Statistics" ), - Description ( - "Statistical information associated with a Service AccessPoint " - "object or one of its subclasses." )] -class CIM_SAPStatisticalInformation : CIM_StatisticalInformation { - - [Key, Description ( "The scoping System\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_ServiceAccessPoint.SystemCreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The scoping System\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_ServiceAccessPoint.SystemName" )] - string SystemName; - - [Key, Description ( "The scoping SAP\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_ServiceAccessPoint.CreationClassName" )] - string SAPCreationClassName; - - [Key, Description ( "The scoping SAP\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_ServiceAccessPoint.Name" )] - string SAPName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Override ( "Name" ), - Description ( - "The Name property, inherited from " - "StatisticalInformation, serves as part of the object " - "key." ), - MaxLen ( 256 )] - string Name; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SAPStatistics.mof b/build/vendor/dmtf_mof/Core/CIM_SAPStatistics.mof deleted file mode 100644 index 02bf9cbf..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SAPStatistics.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SAPStatistics -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::Statistics" ), - Description ( - "SAPStatistics relates the SAPStatisticalInformation class to " - "the ServiceAccessPoint to which it applies." )] -class CIM_SAPStatistics : CIM_Statistics { - - [Override ( "Stats" ), - Weak, Description ( "The statistical object." )] - CIM_SAPStatisticalInformation REF Stats; - - [Override ( "Element" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The ServiceAccessPoint to which the statistics apply." )] - CIM_ServiceAccessPoint REF Element; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ScopedSetting.mof b/build/vendor/dmtf_mof/Core/CIM_ScopedSetting.mof deleted file mode 100644 index b04f98e3..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ScopedSetting.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ScopedSetting -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Settings" ), - Description ( - "ScopedSetting defines a setting in the context of the " - "ManagedElement in which it is located." )] -class CIM_ScopedSetting : CIM_HostedDependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The scoping ManagedElement." )] - CIM_ManagedElement REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The setting that is defined for the ManagedElement." )] - CIM_ScopedSettingData REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ScopedSettingData.mof b/build/vendor/dmtf_mof/Core/CIM_ScopedSettingData.mof deleted file mode 100644 index 50113833..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ScopedSettingData.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ScopedSettingData -// ================================================================== - [Abstract, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Settings" ), - Description ( - "The ScopedSettingData class represents the general concept of " - "SettingData, which is scoped or contained by a ManagedElement " - "(that is, settings that are specifically defined for a system, " - "device, and so on). ScopedSettingData is tied to a " - "ManagedElement using the ScopedSetting association. Note that " - "the cardinality of the ManagedElement reference is Min(1), " - "Max(1). This cardinality mandates the instantiation of the " - "ScopedSetting association for the referenced instance of " - "ScopedSettingData. ScopedSetting describes the existence " - "requirements and context for the referenced instance of " - "ManagedElement. Specifically, the ManagedElement must exist " - "and it provides the context for the ScopedSettingData." )] -class CIM_ScopedSettingData : CIM_SettingData { - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_Service.mof b/build/vendor/dmtf_mof/Core/CIM_Service.mof deleted file mode 100644 index 92444aea..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_Service.mof +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Update class -// description. -// ================================================================== -// CIM_Service -// ================================================================== - [Abstract, Version ( "2.14.0" ), - UMLPackagePath ( "CIM::Core::Service" ), - Description ( - "A Service is a LogicalElement that represents the availability " - "of functionality that can be managed. This functionality may " - "be provided by a seperately modeled entity such as a " - "LogicalDevice or a SoftwareFeature, or both. The modeled " - "Service typically provides only functionality required for " - "management of itself or the elements it affects." )] -class CIM_Service : CIM_EnabledLogicalElement { - - [Key, Description ( - "The CreationClassName of the scoping System." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.CreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The Name of the scoping System." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.Name" )] - string SystemName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass that is used in the creation of an instance. " - "When used with the other key properties of this class, " - "this property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Override ( "Name" ), - Description ( - "The Name property uniquely identifies the Service and " - "provides an indication of the functionality that is " - "managed. This functionality is described in more detail " - "in the Description property of the object." ), - MaxLen ( 256 )] - string Name; - - [Write, Description ( - "The name of the primary owner for the service, if one is " - "defined. The primary owner is the initial support " - "contact for the Service." ), - MaxLen ( 64 ), - MappingStrings { "MIF.DMTF|General Information|001.3" }] - string PrimaryOwnerName; - - [Write, Description ( - "A string that provides information on how the primary " - "owner of the Service can be reached (for example, phone " - "number, e-mail address, and so on)." ), - MaxLen ( 256 ), - MappingStrings { "MIF.DMTF|General Information|001.4" }] - string PrimaryOwnerContact; - - [Deprecated { "CIM_Service.EnabledDefault" }, - Description ( - "Note: The use of this element is deprecated in lieu of " - "the EnabledDefault property that is inherited from " - "EnabledLogicalElement. The EnabledLogicalElement " - "addresses the same semantics. The change to a uint16 " - "data type was discussed when CIM V2.0 was defined. " - "However, existing V1.0 implementations used the string " - "property. To remain compatible with those " - "implementations, StartMode was grandfathered into the " - "schema. Use of the deprecated qualifier allows the " - "maintenance of the existing property but also permits an " - "improved, clarified definition using EnabledDefault. \n" - "Deprecated description: StartMode is a string value that " - "indicates whether the Service is automatically started " - "by a System, an Operating System, and so on, or is " - "started only upon request." ), - ValueMap { "Automatic", "Manual" }, - MaxLen ( 10 )] - string StartMode; - - [Description ( - "Started is a Boolean that indicates whether the Service " - "has been started (TRUE), or stopped (FALSE)." )] - boolean Started; - - - [Description ( - "The StartService method places the Service in the " - "started state. Note that the function of this method " - "overlaps with the RequestedState property. " - "RequestedState was added to the model to maintain a " - "record (such as a persisted value) of the last state " - "request. Invoking the StartService method should set the " - "RequestedState property appropriately. The method " - "returns an integer value of 0 if the Service was " - "successfully started, 1 if the request is not supported, " - "and any other number to indicate an error. In a " - "subclass, the set of possible return codes could be " - "specified using a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are translated " - "can also be specified in the subclass as a Values array " - "qualifier. \n" - "\n" - "Note: The semantics of this method overlap with the " - "RequestStateChange method that is inherited from " - "EnabledLogicalElement. This method is maintained because " - "it has been widely implemented, and its simple \"start\" " - "semantics are convenient to use." )] - uint32 StartService( -); - - [Description ( - "The StopService method places the Service in the stopped " - "state. Note that the function of this method overlaps " - "with the RequestedState property. RequestedState was " - "added to the model to maintain a record (such as a " - "persisted value) of the last state request. Invoking the " - "StopService method should set the RequestedState " - "property appropriately. The method returns an integer " - "value of 0 if the Service was successfully stopped, 1 if " - "the request is not supported, and any other number to " - "indicate an error. In a subclass, the set of possible " - "return codes could be specified using a ValueMap " - "qualifier on the method. The strings to which the " - "ValueMap contents are translated can also be specified " - "in the subclass as a Values array qualifier. \n" - "\n" - "Note: The semantics of this method overlap with the " - "RequestStateChange method that is inherited from " - "EnabledLogicalElement. This method is maintained because " - "it has been widely implemented, and its simple \"stop\" " - "semantics are convenient to use." )] - uint32 StopService( -); - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ServiceAccessBySAP.mof b/build/vendor/dmtf_mof/Core/CIM_ServiceAccessBySAP.mof deleted file mode 100644 index 1f37accc..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ServiceAccessBySAP.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ServiceAccessBySAP -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Service" ), - Description ( - "CIM_ServiceAccessBySAP is an association that identifies the " - "access points for a Service. For example, a printer might be " - "accessed by NetWare, MacIntosh or Windows ServiceAccessPoints, " - "which might all be hosted on different Systems." )] -class CIM_ServiceAccessBySAP : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The Service." )] - CIM_Service REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "An Access Point for a Service. Access points are " - "dependent in this relationship because they have no " - "function without a corresponding Service." )] - CIM_ServiceAccessPoint REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ServiceAccessPoint.mof b/build/vendor/dmtf_mof/Core/CIM_ServiceAccessPoint.mof deleted file mode 100644 index 70b0f334..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ServiceAccessPoint.mof +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ServiceAccessPoint -// ================================================================== - [Abstract, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Service" ), - Description ( - "CIM_ServiceAccessPoint represents the ability to utilize or " - "invoke a Service. Access points represent that a Service is " - "made available for other entities to use." )] -class CIM_ServiceAccessPoint : CIM_EnabledLogicalElement { - - [Key, Description ( - "The CreationClassName of the scoping System." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.CreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The Name of the scoping System." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.Name" )] - string SystemName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Override ( "Name" ), - Description ( - "The Name property uniquely identifies the " - "ServiceAccessPoint and provides an indication of the " - "functionality that is managed. This functionality is " - "described in more detail in the Description property of " - "the object." ), - MaxLen ( 256 )] - string Name; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ServiceAccessURI.mof b/build/vendor/dmtf_mof/Core/CIM_ServiceAccessURI.mof deleted file mode 100644 index 435a5622..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ServiceAccessURI.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ServiceAccessURI -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Service" ), - Description ( - "CIM_ServiceAccessURI represents the ability to utilize or " - "invoke a Service using a uniform resource identifier (URI). " - "RFC 1738 describes the Uniform Resource Locator, which is a " - "more specific form of a URI, and RFC 2396 describes the " - "broader, inclusive URI. The following explanation is from the " - "RFC: \"A Uniform Resource Identifier (URI) is a compact string " - "of characters for identifying an abstract or physical " - "resource.\" In the context of a ServiceAccessPoint, a URI " - "contains the information necessary to access an associated " - "service (associated through ServiceAccessBySAP), using a " - "syntax that is specific to that service." )] -class CIM_ServiceAccessURI : CIM_ServiceAccessPoint { - - [Required, Description ( - "The LabeledURI property is based on RFC 2079 and its " - "value and syntax are service-specific." ), - MaxLen ( 256 )] - string LabeledURI; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ServiceAffectsElement.mof b/build/vendor/dmtf_mof/Core/CIM_ServiceAffectsElement.mof deleted file mode 100644 index f33562c3..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ServiceAffectsElement.mof +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Clarify ElementEffects -// descriptionAdd UmlPackagePath -// qualifier values to CIM Schema. -// Update description of -// "Manages" value of property ElementAffects . -// ================================================================== -// CIM_ServiceAffectsElement -// ================================================================== - [Association, Version ( "2.14.0" ), - UMLPackagePath ( "CIM::Core::Service" ), - Description ( - "ServiceAffectsElement represents an association between a " - "Service and the ManagedElements that might be affected by its " - "execution. Instantiating this association indicates that " - "running the service may change, manage, provide functionality " - "for,or pose some burden on the ManagedElement. This burden " - "might affect performance, throughput, availability, and so on." )] -class CIM_ServiceAffectsElement { - - [Key, Description ( - "The Managed Element that is affected by the Service." )] - CIM_ManagedElement REF AffectedElement; - - [Key, Description ( - "The Service that is affecting the ManagedElement." )] - CIM_Service REF AffectingElement; - - [Description ( - "An enumeration that describes the effect on the " - "ManagedElement. This array corresponds to the " - "OtherElementEffectsDescriptions array, where the latter " - "provides details that are related to the high-level " - "effects enumerated by this property. Additional detail " - "is required if the ElementEffects array contains the " - "value 1 (Other). The values are defined as follows: \n" - "- Exclusive Use (2): No other Service may have this " - "association to the element. \n" - "- Performance Impact (3): Deprecated in favor of " - "\"Consumes\", \"Enhances Performance\", or \"Degrades " - "Performance\". Execution of the Service may enhance or " - "degrade the performance of the element. This may be as a " - "side-effect of execution or as an intended consequence " - "of methods provided by the Service. \n" - "- Element Integrity (4): Deprecated in favor of " - "\"Consumes\", \"Enhances Integrity\", or \"Degrades " - "Integrity\". Execution of the Service may enhance or " - "degrade the integrity of the element. This may be as a " - "side-effect of execution or as an intended consequence " - "of methods provided by the Service. \n" - "- Manages (5): The Service manages the element. \n" - "- Consumes (6): Execution of the Service consumes some " - "or all of the associated element as a consequence of " - "running the Service. For example, the Service may " - "consume CPU cycles, which may affect performance, or " - "Storage which may affect both performance and integrity. " - "(For instance, the lack of free storage can degrade " - "integrity by reducing the ability to save state. ) " - "\"Consumes\" may be used alone or in conjunction with " - "other values, in particular, \"Degrades Performance\" " - "and \"Degrades Integrity\". \n" - "\"Manages\" and not \"Consumes\" should be used to " - "reflect allocation services that may be provided by a " - "Service. \n" - "- Enhances Integrity (7): The Service may enhance " - "integrity of the associated element. \n" - "- Degrades Integrity (8): The Service may degrade " - "integrity of the associated element. \n" - "- Enhances Performance (9): The Service may enhance " - "performance of the associated element. \n" - "- Degrades Performance (10): The Service may degrade " - "performance of the associated element." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "..", "0x8000..0xFFFF" }, - Values { "Unknown", "Other", "Exclusive Use", - "Performance Impact", "Element Integrity", "Manages", - "Consumes", "Enhances Integrity", "Degrades Integrity", - "Enhances Performance", "Degrades Performance", - "DMTF Reserved", "Vendor Reserved" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_ServiceAffectsElement.OtherElementEffectsDescriptions" }] - uint16 ElementEffects[]; - - [Description ( - "Provides details for the effect at the corresponding " - "array position in ElementEffects. This information is " - "required if ElementEffects contains the value 1 (Other)." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_ServiceAffectsElement.ElementEffects" }] - string OtherElementEffectsDescriptions[]; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ServiceAffectsElementWithQuota.mof b/build/vendor/dmtf_mof/Core/CIM_ServiceAffectsElementWithQuota.mof deleted file mode 100644 index 1317b5fd..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ServiceAffectsElementWithQuota.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Association, Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::Service" ), - Description ( - "ServiceAffectsElementWithQuota represents an extension of " - "ServiceAffectsElement to include a quota imposed on the " - "AffectedElement by the Service. The quota governs the amount " - "of a resource controlled by the Service that can be allocated " - "by the AffectedElement in one or more allocations." )] -class CIM_ServiceAffectsElementWithQuota : CIM_ServiceAffectsElement { - - [Description ( - "Quota is the maximum number of resource units that may " - "be allocated to the AffectedElement." )] - uint64 Quota; - - [Description ( - "Quota is the number of resource units currently " - "allocated to the AffectedElement." )] - uint64 QuotaUsed; - - [Description ( - "QuotaUnits specifies the type of unit used in the Quota " - "and QuotaUsed properties. The value shall be formatted " - "according to DSP0004 Appendix C1, where the base-unit is " - "\"byte\"), and there are no occurrences of " - "multiplied-base-unit and divided-base-unit." ), - IsPUnit] - string QuotaUnits = "byte"; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ServiceAvailableToElement.mof b/build/vendor/dmtf_mof/Core/CIM_ServiceAvailableToElement.mof deleted file mode 100644 index c4f2ab11..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ServiceAvailableToElement.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ServiceAvailableToElement -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Service" ), - Description ( - "CIM_ServiceAvailableToElement conveys the semantics of a " - "Service that is available for the use of a ManagedElement. An " - "example of an available Service is that a Processor and an " - "enclosure (a PhysicalElement) can use AlertOnLAN Services to " - "signal an incomplete or erroneous boot. In reality, AlertOnLAN " - "is simply a HostedService on a computer system that is " - "generally available for use and is not a dependency of the " - "processor or enclosure. To describe that the use of this " - "service might be restricted or have limited availability or " - "applicability, the CIM_ServiceAvailableToElement association " - "would be instantiated between the Service and specific " - "CIM_Processors and CIM_Chassis." )] -class CIM_ServiceAvailableToElement { - - [Key, Description ( "The Service that is available." )] - CIM_Service REF ServiceProvided; - - [Key, Description ( - "The ManagedElement that can use the Service." )] - CIM_ManagedElement REF UserOfService; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ServiceComponent.mof b/build/vendor/dmtf_mof/Core/CIM_ServiceComponent.mof deleted file mode 100644 index 8bd5c354..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ServiceComponent.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ServiceComponent -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::Service" ), - Description ( - "The ServiceComponent aggregation models a set of subordinate " - "Services that are aggregated together to form a higher-level " - "service." )] -class CIM_ServiceComponent : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Description ( "The parent Service." )] - CIM_Service REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The component Service." )] - CIM_Service REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ServiceSAPDependency.mof b/build/vendor/dmtf_mof/Core/CIM_ServiceSAPDependency.mof deleted file mode 100644 index a14bc100..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ServiceSAPDependency.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ServiceSAPDependency -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Service" ), - Description ( - "CIM_ServiceSAPDependency is an association between a Service " - "and a ServiceAccessPoint that indicates that the referenced " - "SAP is utilized by the Service to provide its functionality. " - "For example, Boot Services can invoke BIOS Disk Services " - "(interrupts) in order to function." )] -class CIM_ServiceSAPDependency : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The required ServiceAccessPoint." )] - CIM_ServiceAccessPoint REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The Service that is dependent on an underlying SAP." )] - CIM_Service REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ServiceServiceDependency.mof b/build/vendor/dmtf_mof/Core/CIM_ServiceServiceDependency.mof deleted file mode 100644 index 9f29f7be..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ServiceServiceDependency.mof +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2005 - 2007 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Update description and add enumeration. -// ================================================================== -// CIM_ServiceServiceDependency -// ================================================================== - [Association, Version ( "2.16.0" ), - UMLPackagePath ( "CIM::Core::Service" ), - Description ( - "CIM_ServiceServiceDependency is an association between a " - "Service and another Service, which indicates that the latter " - "cooperates with the former, is required to be present, " - "required to have completed, or must be absent for the former " - "Service to provide its functionality. For example, Boot " - "Services might be dependent upon underlying system " - "initialization Services. In the case of the initialization " - "Services, the Boot Service might be dependent on the " - "completion of the init Services. \n" - "When examining the ServiceServiceDependency class definition, " - "note that its superclass ProvidesServiceToElement is " - "deprecated. Unfortunately, ProvidesServiceToElement cannot be " - "removed from the object hierarchy without a major Schema " - "release. When or if a major release occurs, the " - "ProvidesServiceToElement superclass will be removed, and " - "ServiceServiceDependency will subclass from CIM_Dependency " - "directly." )] -class CIM_ServiceServiceDependency : CIM_ProvidesServiceToElement { - - [Override ( "Antecedent" ), - Description ( "The required Service." )] - CIM_Service REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The Service that is dependent on an underlying Service." )] - CIM_Service REF Dependent; - - [Description ( - "The nature of the Service-to-Service dependency. 2 - " - "Antecedent Service shall have completed before Dependent " - "service\'s functionality is available.\n" - "3 - Antecedent Service shall have started before " - "Dependent service\'s functionality is available.\n" - "4 - Antecedent Service shall not be started in order for " - "Dependent service\'s functionality to be available.\n" - "5 - The two Services cooperate and augment each other\'s " - "function. There is no requirement implied by this value " - "regarding the execution of the Antecedent service in " - "order for the Dependent service to operate." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "Service Must Have Completed", - "Service Must Be Started", "Service Must Not Be Started", - "Cooperate" }] - uint16 TypeOfDependency; - - [Description ( - "This property describes that the Antecedent Service must " - "be restarted after the Dependent operation is complete." )] - boolean RestartService; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ServiceStatisticalInformation.mof b/build/vendor/dmtf_mof/Core/CIM_ServiceStatisticalInformation.mof deleted file mode 100644 index 9e9dbba7..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ServiceStatisticalInformation.mof +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ServiceStatisticalInformation -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::Statistics" ), - Description ( - "Statistical information associated with a Service object or " - "one of its subclasses." )] -class CIM_ServiceStatisticalInformation : CIM_StatisticalInformation { - - [Key, Description ( "The scoping System\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_Service.SystemCreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The scoping System\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_Service.SystemName" )] - string SystemName; - - [Key, Description ( "The scoping Service\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_Service.CreationClassName" )] - string ServiceCreationClassName; - - [Key, Description ( "The scoping Service\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_Service.Name" )] - string ServiceName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Override ( "Name" ), - Description ( - "The Name property, inherited from " - "StatisticalInformation, serves as part of the object " - "key." ), - MaxLen ( 256 )] - string Name; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_ServiceStatistics.mof b/build/vendor/dmtf_mof/Core/CIM_ServiceStatistics.mof deleted file mode 100644 index 6ffec012..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_ServiceStatistics.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ServiceStatistics -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::Statistics" ), - Description ( - "ServiceStatistics relates the ServiceStatisticalInformation " - "class to the Service to which it applies." )] -class CIM_ServiceStatistics : CIM_Statistics { - - [Override ( "Stats" ), - Weak, Description ( "The statistical object." )] - CIM_ServiceStatisticalInformation REF Stats; - - [Override ( "Element" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The Service to which the statistics apply." )] - CIM_Service REF Element; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_Setting.mof b/build/vendor/dmtf_mof/Core/CIM_Setting.mof deleted file mode 100644 index 7167ac7a..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_Setting.mof +++ /dev/null @@ -1,455 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of description to -// support deprecation of CIM_Profile and -// CIM_Configuration. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Setting -// ================================================================== - [Abstract, Version ( "2.8.1000" ), - UMLPackagePath ( "CIM::Core::Settings" ), - Description ( - "The Setting class represents configuration-related and " - "operational parameters for one or more ManagedSystemElements. " - "An Element can have multiple Setting objects associated with " - "it. The current operational values for the parameters of an " - "Element are reflected by properties in the Element itself or " - "by properties in its associations. These properties do not " - "have to be the same values present in the Setting object. For " - "example, a modem might have a Setting baud rate of 56Kb/sec " - "but be operating at 19.2Kb/sec. \n" - "Note: The CIM_SettingData class is very similar to " - "CIM_Setting, yet both classes are present in the model because " - "many implementations have successfully used CIM_Setting. " - "However, issues have arisen that could not be resolved without " - "defining a new class. Therefore, until a new major release " - "occurs, both classes will exist in the model. Refer to the " - "Core White Paper for additional information. Setting instances " - "can be aggregated together into higher-level Setting objects " - "using ConcreteComponent associations." )] -class CIM_Setting : CIM_ManagedElement { - - [Description ( - "The identifier by which the Setting object is known." ), - MaxLen ( 256 )] - string SettingID; - - - [Description ( - "The VerifyOKToApplyToMSE method is used to verify that " - "this Setting can be applied to the referenced " - "ManagedSystemElement at the given time or time interval. " - "This method takes three input parameters: MSE (the " - "Managed SystemElement that is being verified), " - "TimeToApply (which, being a datetime, can be either a " - "specific time or a time interval), and MustBeCompletedBy " - "(which indicates the required completion time for the " - "method). The return value should be 0 if it is okay to " - "apply the Setting, 1 if the method is not supported, 2 " - "if the Setting cannot be applied within the specified " - "times, and any other number if an error occurred. In a " - "subclass, the set of possible return codes could be " - "specified using a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \"translated\" " - "can also be specified in the subclass as a Values array " - "qualifier." )] - uint32 VerifyOKToApplyToMSE( - [IN, Description ( - "The ManagedSystemElement that is being verified." )] - CIM_ManagedSystemElement REF MSE, - [IN, Description ( - "TimeToApply can be either a specific time or a time interval." - )] - datetime TimeToApply, - [IN, Description ( - "The required completion time for the method." )] - datetime MustBeCompletedBy); - - [Description ( - "The ApplyToMSE method performs the actual application of " - "the Setting to the referenced ManagedSystemElement. It " - "takes three input parameters: MSE (the " - "ManagedSystemElement to which the Setting is being " - "applied), TimeToApply (which, being a datetime, can be " - "either a specific time or a time interval), and " - "MustBeCompletedBy (which indicates the required " - "completion time for the method). Note that the semantics " - "of this method are that individual Settings are either " - "wholly applied or not applied at all to their target " - "ManagedSystemElement. The return value should be 0 if " - "the Setting is successfully applied to the referenced " - "ManagedSystemElement, 1 if the method is not supported, " - "2 if the Setting was not applied within the specified " - "times, and any other number if an error occurred. In a " - "subclass, the set of possible return codes could be " - "specified, using a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \"translated\" " - "can also be specified in the subclass as a Values array " - "qualifier. \n" - "Note: If an error occurs when applying the Setting to a " - "ManagedSystemElement, the Element must be configured as " - "it was when the \"Apply\" attempt began. That is, the " - "Element should not be left in an indeterminate state." )] - uint32 ApplyToMSE( - [IN, Description ( - "The ManagedSystemElement to which the Setting is being applied." - )] - CIM_ManagedSystemElement REF MSE, - [IN, Description ( - "TimeToApply can be either a specific time or a time interval." - )] - datetime TimeToApply, - [IN, Description ( - "The required completion time for the method." )] - datetime MustBeCompletedBy); - - [Description ( - "The VerifyOKToApplyToCollection method is used to verify " - "that this Setting can be applied to the referenced " - "Collection of ManagedSystemElements, at the given time " - "or time interval, without causing adverse effects to " - "either the Collection itself or its surrounding " - "environment. The net effect is to execute the " - "VerifyOKToApply method against each of the Elements that " - "are aggregated by the Collection. This method takes " - "three input parameters: Collection (the Collection of " - "ManagedSystemElements that is being verified), " - "TimeToApply (which, being a datetime, can be either a " - "specific time or a time interval), and MustBeCompletedBy " - "(which indicates the required completion time for the " - "method). The return value should be 0 if it is okay to " - "apply the Setting, 1 if the method is not supported, 2 " - "if the Setting cannot be applied within the specified " - "times, and any other number if an error occurred. One " - "output parameter, CanNotApply, is defined, which is a " - "string array that lists the keys of the " - "ManagedSystemElements to which the Setting cannot be " - "applied. This parameter enables those Elements to be " - "revisited and either fixed or have other corrective " - "action taken on them. \n" - "In a subclass, the set of possible return codes could be " - "specified, using a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \"translated\" " - "can also be specified in the subclass as a Values array " - "qualifier." )] - uint32 VerifyOKToApplyToCollection( - [IN, Description ( - "The Collection of ManagedSystemElements that is being verified." - )] - CIM_CollectionOfMSEs REF Collection, - [IN, Description ( - "TimeToApply can be either a specific time or a time interval." - )] - datetime TimeToApply, - [IN, Description ( - "The required completion time for the method." )] - datetime MustBeCompletedBy, - [IN ( false ), OUT, Description ( - "A string array that lists the keys of the " - "ManagedSystemElements to which the Setting cannot " - "be applied." )] - string CanNotApply[]); - - [Description ( - "The ApplyToCollection method performs the application of " - "the Setting to the referenced Collection of " - "ManagedSystemElements. The net effect is to execute the " - "ApplyToMSE method against each of the Elements that are " - "aggregated by the Collection. If the input value " - "ContinueOnError is false, this method applies the " - "Setting to all Elements in the Collection until it " - "encounters an error. In the case of an error, the method " - "stops execution, logs the key of the Element that caused " - "the error in the CanNotApply array, and issues a return " - "code of 2. If the input value ContinueOnError is true, " - "then this method applies the Setting to all of the " - "ManagedSystemElements in the Collection, and reports the " - "failed Elements in the array, CanNotApply. For the " - "latter, processing will continue until the method is " - "applied to all Elements in the Collection, regardless of " - "any errors encountered. The key of each " - "ManagedSystemElement to which the Setting could not be " - "applied is logged into the CanNotApply array. This " - "method takes four input parameters: Collection (the " - "Collection of Elements to which the Setting is being " - "applied), TimeToApply (which, being a datetime, can be " - "either a specific time or a time interval), " - "ContinueOnError (true indicates to continue processing " - "when an error is encountered), and MustBeCompletedBy " - "(which indicates the required completion time for the " - "method). The return value should be 0 if the Setting is " - "successfully applied to the referenced Collection, 1 if " - "the method is not supported, 2 if the Setting was not " - "applied within the specified times, 3 if the Setting " - "cannot be applied using the input value for " - "ContinueOnError, and any other number if an error " - "occurred. One output parameter, CanNotApplystring, is " - "defined, which is an array that lists the keys of the " - "ManagedSystemElements to which the Setting could not be " - "applied. This output parameter has meaning only when the " - "ContinueOnError parameter is true. \n" - "In a subclass, the set of possible return codes could be " - "specified using a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \"translated\" " - "can also be specified in the subclass as a Values array " - "qualifier. \n" - "Note: If an error occurs when applying the Setting to a " - "ManagedSystemElement in the Collection, the Element must " - "be configured as it was when the \"Apply\" attempt " - "began. That is, the Element should not be left in an " - "indeterminate state." )] - uint32 ApplyToCollection( - [IN, Description ( - "The Collection of ManagedSystemElements to be applied." - )] - CIM_CollectionOfMSEs REF Collection, - [IN, Description ( - "TimeToApply can be either a specific time or a time interval." - )] - datetime TimeToApply, - [IN, Description ( - "True means to continue processing when an error is encountered." - )] - boolean ContinueOnError, - [IN, Description ( - "The required completion time for the method." )] - datetime MustBeCompletedBy, - [IN ( false ), OUT, Description ( - "A string array that lists the keys of the " - "ManagedSystemElements to which the Setting could " - "not be applied." )] - string CanNotApply[]); - - [Description ( - "The VerifyOKToApplyIncrementalChangeToMSE method is used " - "to verify that a subset of the properties in this " - "Setting can be applied to the referenced " - "ManagedSystemElement at the given time or time interval. " - "This method takes four input parameters: MSE (the " - "ManagedSystemElement that is being verified), " - "TimeToApply (which, being a datetime, can be either a " - "specific time or a time interval), MustBeCompletedBy " - "(which indicates the required completion time for the " - "method), and a PropertiesToApply array (which contains a " - "list of the property names whose values will be " - "verified). If the array is null or empty or contains the " - "string \"ALL\" as a property name, then all Settings " - "properties will be verified. If it is set to \"NONE\", " - "then no Settings properties will be verified. The return " - "value should be 0 if it is okay to apply the Setting, 1 " - "if the method is not supported, 2 if the Setting cannot " - "be applied within the specified times, and any other " - "number if an error occurred. In a subclass, the set of " - "possible return codes could be specified using a " - "ValueMap qualifier on the method. The strings to which " - "the ValueMap contents are \"translated\" can also be " - "specified in the subclass as a Values array qualifier." )] - uint32 VerifyOKToApplyIncrementalChangeToMSE( - [IN, Description ( - "The ManagedSystemElement for which the Setting is " - "being verified." )] - CIM_ManagedSystemElement REF MSE, - [IN, Description ( - "TimeToApply can be either a specific time or a time interval." - )] - datetime TimeToApply, - [IN, Description ( - "The required completion time for the method." )] - datetime MustBeCompletedBy, - [IN, Description ( - "A list of the property names whose values will be verified." - )] - string PropertiesToApply[]); - - [Description ( - "The ApplyIncrementalChangeToMSE method performs the " - "actual application of a subset of the properties in the " - "Setting to the referenced ManagedSystemElement. It takes " - "four input parameters: MSE (the ManagedSystem Element to " - "which the Setting is being applied), TimeToApply (which, " - "being a datetime, can be either a specific time or a " - "time interval), MustBeCompletedBy (which indicates the " - "required completion time for the method), and a " - "PropertiesToApply array (which contains a list of the " - "property names whose values will be applied). If a " - "property is not in this list, it will be ignored by the " - "Apply. If the array is null, empty, or contains the " - "string \"ALL\" as a property name, then all Settings " - "properties will be applied. If it is set to \"NONE\", " - "then no Settings properties will be applied. \n" - "Note that the semantics of this method are that " - "individual Settings are either wholly applied or not " - "applied at all to their target ManagedSystemElement. The " - "return value should be 0 if the Setting is successfully " - "applied to the referenced ManagedSystemElement, 1 if the " - "method is not supported, 2 if the Setting was not " - "applied within the specified times, and any other number " - "if an error occurred. In a subclass, the set of possible " - "return codes could be specified using a ValueMap " - "qualifier on the method. The strings to which the " - "ValueMap contents are \"translated\" can also be " - "specified in the subclass as a Values array qualifier. \n" - "Note: If an error occurs when applying the Setting to a " - "ManagedSystemElement, the Element must be configured as " - "it was when the \"Apply\" attempt began. That is, the " - "Element should not be left in an indeterminate state." )] - uint32 ApplyIncrementalChangeToMSE( - [IN, Description ( - "The ManagedSystemElement to which the Setting is being applied." - )] - CIM_ManagedSystemElement REF MSE, - [IN, Description ( - "TimeToApply can be either a specific time or a time interval." - )] - datetime TimeToApply, - [IN, Description ( - "The required completion time for the method." )] - datetime MustBeCompletedBy, - [IN, Description ( - "A list of the property names whose values will be applied." - )] - string PropertiesToApply[]); - - [Description ( - "The VerifyOKToApplyIncrementalChangeToCollection method " - "is used to verify that a subset of the properties in " - "this Setting can be applied to the referenced Collection " - "of ManagedSystemElements at the given time or time " - "interval, without causing adverse effects to either the " - "Collection itself or its surrounding environment. The " - "net effect is to execute the " - "VerifyOKToApplyIncrementalChangeToMSE method against " - "each of the Elements that are aggregated by the " - "Collection. This method takes four input parameters: " - "Collection (the Collection of ManagedSystemElements that " - "is being verified), TimeToApply (which, being a " - "datetime, can be either a specific time or a time " - "interval), MustBeCompletedBy (which indicates the " - "required completion time for the method), and a " - "PropertiesToApply array (which contains a list of the " - "property names whose values will be verified). If the " - "array is null or empty or contains the string \"all\" as " - "a property name, all Settings properties will be " - "verified. If it is set to \"none\" then no Settings " - "properties will be verified. The return value should be " - "0 if it is okay to apply the Setting, 1 if the method is " - "not supported, 2 if the Setting cannot be applied within " - "the specified times, and any other number if an error " - "occurred. One output parameter, CanNotApply, is defined, " - "which is a string array that lists the keys of the " - "ManagedSystemElements to which the Setting cannot be " - "applied. This parameter enables those Elements to be " - "revisited and either fixed or have other corrective " - "action taken on them. \n" - "In a subclass, the set of possible return codes could be " - "specified using a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \"translated\" " - "can also be specified in the subclass as a Values array " - "qualifier." )] - uint32 VerifyOKToApplyIncrementalChangeToCollection( - [IN, Description ( - "The Collection of ManagedSystemElements for which " - "the setting is being verified." )] - CIM_CollectionOfMSEs REF Collection, - [IN, Description ( - "TimeToApply can be either a specific time or a time interval." - )] - datetime TimeToApply, - [IN, Description ( - "The required completion time for the method." )] - datetime MustBeCompletedBy, - [IN, Description ( - "A list of the property names whose values will be verified." - )] - string PropertiesToApply[], - [IN ( false ), OUT, Description ( - "A string array that lists the keys of the " - "ManagedSystemElements to which the Setting cannot " - "be applied." )] - string CanNotApply[]); - - [Description ( - "The ApplyIncrementalChangeToCollection method performs " - "the application of a subset of the properties in this " - "Setting to the referenced Collection of " - "ManagedSystemElements. The net effect is to execute the " - "ApplyIncrementalChangeToMSE method against each of the " - "Elements that are aggregated by the Collection. If the " - "input value ContinueOnError is false, this method " - "applies the Setting to all Elements in the Collection " - "until it encounters an error, in which case it stops " - "execution, logs the key of the Element that caused the " - "error in the CanNotApply array, and issues a return code " - "of 2. If the input value ContinueOnError is true, then " - "this method applies the Setting to all of the " - "ManagedSystemElements in the Collection, and reports the " - "failed Elements in the array, CanNotApply. For the " - "latter, processing will continue until the method is " - "applied to all Elements in the Collection, regardless of " - "any errors encountered. The key of each " - "ManagedSystemElement to which the Setting could not be " - "applied is logged into the CanNotApply array. This " - "method takes four input parameters: Collection (the " - "Collection of Elements to which the Setting is being " - "applied), TimeToApply (which, being a datetime, can be " - "either a specific time or a time interval), " - "ContinueOnError (true indicates to continue processing " - "when an error is encountered), MustBeCompletedBy (which " - "indicates the required completion time for the method), " - "and a PropertiesToApply array (which contains a list of " - "the property names whose values will be applied). If a " - "property is not in this list, it will be ignored by the " - "Apply. If the array is null or empty or contains the " - "string \"ALL\" as a property name, then all Settings " - "properties will be applied. If it is set to \"NONE\", " - "then no Settings properties will be applied. \n" - "The return value should be 0 if the Setting is " - "successfully applied to the referenced Collection, 1 if " - "the method is not supported, 2 if the Setting was not " - "applied within the specified time, 3 if the Setting " - "cannot be applied using the input value for " - "ContinueOnError, and any other number if an error " - "occurred. One output parameter, CanNotApplystring, is " - "defined, which is an array that lists the keys of the " - "ManagedSystemElements to which the Setting could not be " - "applied. This output parameter has meaning only when the " - "ContinueOnError parameter is true. \n" - "In a subclass, the set of possible return codes could be " - "specified using a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \"translated\" " - "can also be specified in the subclass as a Values array " - "qualifier. \n" - "Note: If an error occurs when applying the Setting to a " - "ManagedSystemElement in the Collection, the Element must " - "be configured as it was when the \"Apply\" attempt " - "began. That is, the Element should not be left in an " - "indeterminate state." )] - uint32 ApplyIncrementalChangeToCollection( - [IN, Description ( - "The Collection of Elements to which the Setting is " - "being applied." )] - CIM_CollectionOfMSEs REF Collection, - [IN, Description ( "A specific time or a time interval." )] - datetime TimeToApply, - [IN, Description ( - "True indicates to continue processing when an " - "error is encountered." )] - boolean ContinueOnError, - [IN, Description ( - "This parameter indicates the required completion " - "time for the method." )] - datetime MustBeCompletedBy, - [IN, Description ( - "A list of the property names whose values will be verified." - )] - string PropertiesToApply[], - [IN ( false ), OUT, Description ( - "A string array that lists the keys of the " - "ManagedSystemElements to which the Setting cannot " - "be applied." )] - string CanNotApply[]); - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SettingAssociatedToCapabilities.mof b/build/vendor/dmtf_mof/Core/CIM_SettingAssociatedToCapabilities.mof deleted file mode 100644 index 170788d7..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SettingAssociatedToCapabilities.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.11.0" ), - UMLPackagePath ( "CIM::System::FilesystemServices" ), - Description ( - "This association defines settings that can be used to create " - "or modify elements. Unlike ElementSettingData, these settings " - "are not used to express the characteristics of existing " - "managed elements. \n" - "Typically, the capabilities associated with this class define " - "the characteristics of a service in creating or modifying " - "elements that are dependent on the service directly or " - "indirectly. A CIM Client may use this association to find " - "SettingData instances that can be used to create or modify " - "these dependent elements." )] -class CIM_SettingAssociatedToCapabilities : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The Capabilities." )] - CIM_Capabilities REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The Setting." )] - CIM_SettingData REF Dependent; - - [Required, Description ( - "If an element whose characteristics are described by the " - "associated Capabilities instance has a dependent element " - "created or modified without specifying an associated " - "SettingData instance, then the default SettingData will " - "be used in that operation." )] - boolean DefaultSetting = false; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SettingContext.mof b/build/vendor/dmtf_mof/Core/CIM_SettingContext.mof deleted file mode 100644 index a2dae375..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SettingContext.mof +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Deprecate -// class -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SettingContext -// ================================================================== - [Association, Deprecated { "CIM_ConcreteComponent" }, - Aggregation, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Settings" ), - Description ( - "Note: The Configuration class is being deprecated in lieu of " - "using a ConcreteComponent relationship to indicate a hierarchy " - "of instances of Setting or SettingData. Therefore, the " - "aggregation of Settings into Configurations is replaced by the " - "ConcreteComponent relationship between instances of Settings " - "and SettingData. \n" - "Deprecated description: This relationship associates " - "Configuration objects with Setting objects. For example, " - "Settings of a NetworkAdapter could change based on the site or " - "network to which its hosting ComputerSystem is attached. In " - "this case, the ComputerSystem would have two different " - "Configuration objects, corresponding to the differences in " - "network configuration for the two network segments. " - "Configuration A would aggregate a Setting object for the " - "NetworkAdapter when operating on segment \"ANet\", whereas " - "Configuration B would aggregate a different NetworkAdapter " - "Setting object, specific to segment \"BNet\". Note that many " - "Settings of the computer are independent of the network " - "Configuration. For example, both Configurations A and B would " - "aggregate the same Setting object for the MonitorResolution of " - "the ComputerSystem." )] -class CIM_SettingContext { - - [Deprecated { "CIM_ConcreteComponent.GroupComponent" }, - Key, Aggregate, Description ( - "Note: The use of this element is deprecated. Deprecated " - "description: The Configuration object that aggregates " - "the Setting." )] - CIM_Configuration REF Context; - - [Deprecated { "CIM_ConcreteComponent.PartComponent" }, - Key, Description ( - "Note: The use of this element is deprecated. Deprecated " - "description: An aggregated Setting." )] - CIM_Setting REF Setting; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SettingData.mof b/build/vendor/dmtf_mof/Core/CIM_SettingData.mof deleted file mode 100644 index 4439d492..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SettingData.mof +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Abstract, Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Core::Settings" ), - Description ( - "CIM_SettingData is used to represent configuration and and " - "operational parameters for CIM_ManagedElement instances. There " - "are a number of different uses of CIM_SettingData supported in " - "the model today. Additional uses may be defined in the future.\n" - "Instances of CIM_SettingData may represent Aspects of a " - "CIM_ManagedElement instance. This is modeled using the " - "CIM_SettingsDefineState association. CIM_SettingData may be " - "used to define capabilities when associated to an instance of " - "CIM_Capabilities through the CIM_SettingsDefineCapabilities " - "association. \n" - "Instances of CIM_SettingData may represent different types of " - "configurations for a CIM_ManagedElement, including persistent " - "configurations, in progress configuration changes, or " - "requested configurations. The CIM_ElementSettingData " - "association is used to model the relationship between a " - "CIM_SettingData instance and the CIM_ManagedElement for which " - "it is a configuration. \n" - "When an instance of CIM_SettingData represents a " - "configuration, the current operational values for the " - "parameters of the element are reflected by properties in the " - "Element itself or by properties in its associations. These " - "properties do not have to be the same values that are present " - "in the SettingData object. For example, a modem might have a " - "SettingData baud rate of 56Kb/sec but be operating at " - "19.2Kb/sec. \n" - "Note: The CIM_SettingData class is very similar to " - "CIM_Setting, yet both classes are present in the model because " - "many implementations have successfully used CIM_Setting. " - "However, issues have arisen that could not be resolved without " - "defining a new class. Therefore, until a new major release " - "occurs, both classes will exist in the model. Refer to the " - "Core White Paper for additional information. SettingData " - "instances can be aggregated together into higher- level " - "SettingData objects using ConcreteComponent associations." )] -class CIM_SettingData : CIM_ManagedElement { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. To ensure uniqueness within the " - "NameSpace, the value of InstanceID should be constructed " - "using the following \"preferred\" algorithm: \n" - ": \n" - "Where and are separated by a colon " - "(:), and where must include a copyrighted, " - "trademarked, or otherwise unique name that is owned by " - "the business entity that is creating or defining the " - "InstanceID or that is a registered ID assigned to the " - "business entity by a recognized global authority. (This " - "requirement is similar to the _ " - "structure of Schema class names.) In addition, to ensure " - "uniqueness, must not contain a colon (:). When " - "using this algorithm, the first colon to appear in " - "InstanceID must appear between and . \n" - " is chosen by the business entity and should " - "not be reused to identify different underlying " - "(real-world) elements. If the above \"preferred\" " - "algorithm is not used, the defining entity must assure " - "that the resulting InstanceID is not reused across any " - "InstanceIDs produced by this or other providers for the " - "NameSpace of this instance. \n" - "For DMTF-defined instances, the \"preferred\" algorithm " - "must be used with the set to CIM." )] - string InstanceID; - - [Required, Override ( "ElementName" ), - Description ( - "The user-friendly name for this instance of SettingData. " - "In addition, the user-friendly name can be used as an " - "index property for a search or query. (Note: The name " - "does not have to be unique within a namespace.)" )] - string ElementName; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SettingForSystem.mof b/build/vendor/dmtf_mof/Core/CIM_SettingForSystem.mof deleted file mode 100644 index f5832fdb..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SettingForSystem.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SettingForSystem -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Settings" ), - Description ( - "CIM_SettingForSystem defines a Setting in the context of the " - "System on which it is located." )] -class CIM_SettingForSystem : CIM_HostedDependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The hosting System." )] - CIM_System REF Antecedent; - - [Override ( "Dependent" ), - Weak, Description ( "The Setting defined for the System." )] - CIM_SystemSetting REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SettingsDefineCapabilities.mof b/build/vendor/dmtf_mof/Core/CIM_SettingsDefineCapabilities.mof deleted file mode 100644 index 0de7f57f..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SettingsDefineCapabilities.mof +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Association, Aggregation, Version ( "2.22.1" ), - UMLPackagePath ( "CIM::Core::Settings" ), - Description ( - "This association indicates that the non-null, non-key set of " - "properties of the component SettingData instance specifies " - "some capabilities of the associated Capabilities instance. The " - "interpretation of the set of properties in the associated " - "SettingData is governed by the properties: PropertyPolicy and ValueRole.\n" - "For a particular Capabilities instance, the complete set of " - "Component SettingData instances, together with properties of " - "the Capabilities instance itself, defines the overall range of " - "supported capabilities.\n" - "PropertyPolicy determines whether the properties of the set " - "are interpreted independently or as a whole (i.e. correlated.)\n" - "ValueRole further qualifies the members of the set.\n" - "This association eliminates the need to define and maintain " - "corresponding property definitions and values in both a " - "Capabilities subclass and a SettingData subclass.\n" - "Typically these setting instances will be published along with " - "the associated Capabilities instance and will not be " - "modifiable by the client." )] -class CIM_SettingsDefineCapabilities : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( "The Capabilities instance." )] - CIM_Capabilities REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "A Setting used to define the associated Capabilities instance." - )] - CIM_SettingData REF PartComponent; - - [Required, Description ( - "PropertyPolicy defines whether or not the non-null, " - "non-key properties of the associated SettingData " - "instance are treated independently or as a correlated " - "set. For instance, an independent set of maximum " - "properties might be defined, when there is no " - "relationship between each property. On the other hand, " - "several correlated sets of maximum properties might need " - "to be defined when the maximum values of each are " - "dependent on some of the others." ), - ValueMap { "0", "1", ".." }, - Values { "Independent", "Correlated", "DMTF Reserved" }, - ModelCorrespondence { - "CIM_SettingsDefineCapabilities.ValueRole", - "CIM_SettingsDefineCapabilities.ValueRange" }] - uint16 PropertyPolicy = 0; - - [Description ( - "The ValueRole property indicates further semantics on " - "the interpretation of the non-null, non-key properties " - "of the Component SettingData.\n" - "\"Default\" indicates that property values of the " - "component SettingData instance will be used as default " - "values, when a new SettingData instance is created for " - "elements whose capabilities are defined by the " - "associated Capabilities instance.\n" - "Across instances of settingdata, for particular " - "properties having the same semantic purpose, at most one " - "such settingdata instance shall be specified as a default.\n" - "\"Optimal\" indicates that the SettingData instance " - "represents optimal setting values for elements " - "associated with the associated capabilities instance. " - "Multiple component SettingData instances may be declared " - "as optimal.\"Mean\" indicates that the non-null, " - "non-key, non-enumerated, non-boolean, numeric properties " - "of the associated SettingData instance represents an " - "average point along some dimension. For different " - "combinations of SettingData properties, multiple " - "component SettingData instances may be declared as " - "\"Mean\". \"Supported\" indicates that the non-null, " - "non-key properties of the Component SettingData instance " - "represents a set of supported property values that are " - "not otherwise qualified." ), - ValueMap { "0", "1", "2", "3", ".." }, - Values { "Default", "Optimal", "Mean", "Supported", - "DMTF Reserved" }, - ModelCorrespondence { - "CIM_SettingsDefineCapabilities.PropertyPolicy", - "CIM_SettingsDefineCapabilities.ValueRange" }] - uint16 ValueRole = 3; - - [Description ( - "The ValueRange property indicates further semantics on " - "the interpretation of all non-null, non-key properties " - "of the Component SettingData.\n" - "\"Point\" indicates that this SettingData instance " - "provides a single set of values.\n" - "\"Minimums\", \"Maximums\", and \"Increments\", are only " - "evaluated against non-null, non-key, non-enumerated, " - "non-boolean, numeric properties of the SettingData " - "instance. Each property of that set shall be " - "mathematically comparable to other instances of that property.\n" - "\"Minimums\" indicates that this SettingData instance " - "provides minimum values for evaluated properties. When " - "used with PropertyPolicy = \"Independent\", only one " - "such setting per particular SettingData instance shall " - "be specified for any Capabilities. Unless restricted by " - "a Maximums on the same set of properties, all values " - "that compare higher than the specified values are also " - "considered to be supported by the associated " - "capabilities instance. \n" - "\"Maximums\" indicates that this SettingData instance " - "provides maximum values for evaluated properties. When " - "used with PropertyPolicy = \"Independent\", only one " - "such setting per particular SettingData instance shall " - "be specified for any Capabilities. Unless restricted by " - "a Minimums on the same set of properties, all values " - "that compare lower than the specified values are also " - "considered to be supported by the associated " - "capabilities instance.\n" - "\"Increments\" indicates that this SettingData instance " - "provides increment values for evaluated properties. For " - "the associated Capabilities, if an evaluated property " - "currently has no corresponding minimums or maximums, " - "then the property has no affect. Otherwise, for each " - "evaluated property: its value x shall be between the " - "minimum and maximum, inclusively, and shall have the " - "property that both the result of maximum minus x and the " - "result of x minus minimum are each an integer multiple " - "of the increment. If either minimum or maximum is not " - "specified and the other is, then the missing value shall " - "be respectively assumed to be the lowest or highest " - "supported value for the property\'s data-type. " - "Additionally, if both a minimum and a maximum are " - "specified for an evaluated property, then the result of " - "maximum minus minimum shall be an integer multiple of " - "the increment." ), - ValueMap { "0", "1", "2", "3", ".." }, - Values { "Point", "Minimums", "Maximums", "Increments", - "DMTF Reserved" }, - ModelCorrespondence { - "CIM_SettingsDefineCapabilities.PropertyPolicy", - "CIM_SettingsDefineCapabilities.ValueRole" }] - uint16 ValueRange = 0; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SettingsDefineState.mof b/build/vendor/dmtf_mof/Core/CIM_SettingsDefineState.mof deleted file mode 100644 index 7f74b865..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SettingsDefineState.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Association, Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::Settings" ), - Description ( - "SettingsDefineState is used to associate an instance of " - "SettingData with an instance of ManagedElement. This " - "association indicates that the SettingData instance provides " - "additional information about the Current State of the " - "associated ManagedElement. State is broadly defined to include " - "the configuration, status, capabilities, and other information " - "of an instance. \n" - "Use of the same instance of SettingData to represent more than " - "one of Current State (SettingsDefineState) and Desired State " - "(ElementSettingData) and Possible State " - "(SettingsDefineCapabilities) for a ManagedElement is not " - "recommended." )] -class CIM_SettingsDefineState { - - [Key, Description ( "The managed element." )] - CIM_ManagedElement REF ManagedElement; - - [Key, Description ( - "The SettingData object that provides additional " - "information about the current state and configuration of " - "the ManagedElement." )] - CIM_SettingData REF SettingData; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SnapshotOfVirtualSystem.mof b/build/vendor/dmtf_mof/Core/CIM_SnapshotOfVirtualSystem.mof deleted file mode 100644 index 31b52884..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SnapshotOfVirtualSystem.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Association, Version ( "2.22.0" ), - Description ( - "The CIM_SnapshotOfVirtuaSystem association associates an " - "instance of the CIM_ComputerSystem class representing a " - "virtual system, and an instance of the " - "CIM_VirtualSystemSettingData class representing a snapshot " - "that was captured from the virtual system." )] -class CIM_SnapshotOfVirtualSystem : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 0 ), - Max ( 1 ), - Description ( - "Reference to the instance of the CIM_ComputerSystem " - "class representing a virtual system." )] - CIM_ComputerSystem REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "Reference to the instance of the " - "CIM_VirtualSystemSettingData class representing a " - "snapshot that was captured from the virtual system." )] - CIM_VirtualSystemSettingData REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SoftwareIdentity.mof b/build/vendor/dmtf_mof/Core/CIM_SoftwareIdentity.mof deleted file mode 100644 index a0b6aeff..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SoftwareIdentity.mof +++ /dev/null @@ -1,436 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.23.0" ), - ClassConstraint { - "inv:self.IsLargeBuildNumber=true implies self.BuildNumber = null and self.LargeBuildNumber <> null", - "inv:self.IsLargeBuildNumber=false implies self.LargeBuildNumber=null" }, - UMLPackagePath ( "CIM::Core::Software" ), - Description ( - "SoftwareIdentity provides descriptive information about a " - "software component for asset tracking and/or installation " - "dependency management. When the IsEntity property has the " - "value TRUE, the instance of SoftwareIdentity represents an " - "individually identifiable entity similar to Physical Element. " - "SoftwareIdentity does NOT indicate whether the software is " - "installed, executing, etc. This extra information may be " - "provided through specialized associations to Software " - "Identity. For instance, both InstalledSoftwareIdentity and " - "ElementSoftwareIdentity may be used to indicate that the " - "software identified by this class is installed. " - "SoftwareIdentity is used when managing the software components " - "of a ManagedElement that is the management focus. Since " - "software may be acquired, SoftwareIdentity can be associated " - "with a Product using the ProductSoftwareComponent " - "relationship. The Application Model manages the deployment and " - "installation of software via the classes, SoftwareFeatures and " - "SoftwareElements. SoftwareFeature and SoftwareElement are used " - "when the software component is the management focus. The " - "deployment/installation concepts are related to the " - "asset/identity one. In fact, a SoftwareIdentity may correspond " - "to a Product, or to one or more SoftwareFeatures or " - "SoftwareElements - depending on the granularity of these " - "classes and the deployment model. The correspondence of " - "Software Identity to Product, SoftwareFeature or " - "SoftwareElement is indicated using the ConcreteIdentity " - "association. Note that there may not be sufficient detail or " - "instrumentation to instantiate ConcreteIdentity. And, if the " - "association is instantiated, some duplication of information " - "may result. For example, the Vendor described in the instances " - "of Product and SoftwareIdentity MAY be the same. However, this " - "is not necessarily true, and it is why vendor and similar " - "information are duplicated in this class. \n" - "Note that ConcreteIdentity can also be used to describe the " - "relationship of the software to any LogicalFiles that result " - "from installing it. As above, there may not be sufficient " - "detail or instrumentation to instantiate this association." )] -class CIM_SoftwareIdentity : CIM_LogicalElement { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. In order to ensure uniqueness within the " - "NameSpace, the value of InstanceID SHOULD be constructed " - "using the following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon " - "\':\', and where MUST include a copyrighted, " - "trademarked or otherwise unique name that is owned by " - "the business entity creating/defining the InstanceID, or " - "is a registered ID that is assigned to the business " - "entity by a recognized global authority (This is similar " - "to the _ structure of Schema " - "class names.) In addition, to ensure uniqueness " - "MUST NOT contain a colon (\':\'). When using this " - "algorithm, the first colon to appear in InstanceID MUST " - "appear between and . \n" - " is chosen by the business entity and SHOULD " - "not be re-used to identify different underlying " - "(real-world) elements. If the above \'preferred\' " - "algorithm is not used, the defining entity MUST assure " - "that the resultant InstanceID is not re-used across any " - "InstanceIDs produced by this or other providers for this " - "instance\'s NameSpace. \n" - "For DMTF defined instances, the \'preferred\' algorithm " - "MUST be used with the set to \'CIM\'." )] - string InstanceID; - - [Description ( - "The major number component of the software\'s version " - "information - for example, \'12\' from version 12.1(3)T. " - "This property is defined as a numeric value to allow the " - "determination of \'newer\' vs. \'older\' releases. A " - "\'newer\' major release is indicated by a larger numeric " - "value." )] - uint16 MajorVersion; - - [Description ( - "The minor number component of the software\'s version " - "information - for example, \'1\' from version 12.1(3)T. " - "This property is defined as a numeric value to allow the " - "determination of \'newer\' vs. \'older\' releases. A " - "\'newer\' minor release is indicated by a larger numeric " - "value." )] - uint16 MinorVersion; - - [Description ( - "The revision or maintenance release component of the " - "software\'s version information - for example, \'3\' " - "from version 12.1(3)T. This property is defined as a " - "numeric value to allow the determination of \'newer\' " - "vs. \'older\' releases. A \'newer\' revision is " - "indicated by a larger numeric value." )] - uint16 RevisionNumber; - - [Description ( "The build number of the software." ), - ModelCorrespondence { - "CIM_SoftwareIdentity.LargeBuildNumber", - "CIM_SoftwareIdentity.IsLargeBuildNumber" }] - uint16 BuildNumber; - - [Description ( - "The build number of the software if IsLargeBuildNumber " - "is TRUE. TheLargeBuildNumber property should be used for " - "all future implementations." ), - ModelCorrespondence { "CIM_SoftwareIdentity.BuildNumber", - "CIM_SoftwareIdentity.IsLargeBuildNumber" }] - uint64 LargeBuildNumber; - - [Description ( - "The IsLargeBuildNumber property is used to indicate if " - "the BuildNumber of LargeBuildNumber property contains " - "the value of the software build. A value of TRUE shall " - "indicate that the build number is represented by the " - "LargeBuildNumber property. A value of FALSE shall " - "indicate that the build number is represented by the " - "BuildNumber property." ), - ModelCorrespondence { "CIM_SoftwareIdentityBuildNumber", - "CIM_SoftwareIdentity.LargeBuildNumber" }] - boolean IsLargeBuildNumber = false; - - [Description ( - "A string representing the complete software version " - "information - for example, \'12.1(3)T\'. This string and " - "the numeric major/minor/revision/build properties are " - "complementary. Since vastly different representations " - "and semantics exist for versions, it is not assumed that " - "one representation is sufficient to permit a client to " - "perform computations (i.e., the values are numeric) and " - "a user to recognize the software\'s version (i.e., the " - "values are understandable and readable). Hence, both " - "numeric and string representations of version are " - "provided." )] - string VersionString; - - [Description ( - "Specifies the target operating systems of the software. " - "This property should be used when a target operating " - "system is not listed in the TargetOSTypes array values." )] - string TargetOperatingSystems[]; - - [Description ( "Manufacturer of this software." )] - string Manufacturer; - - [Description ( - "The language editions supported by the software. The " - "language codes defined in ISO 639 should be used." )] - string Languages[]; - - [Description ( - "An array of enumerated integers that classify this " - "software. For example, the software MAY be " - "instrumentation (value=5) or firmware and diagnostic " - "software (10 and 7). The use of value 6, Firmware/BIOS, " - "is being deprecated. Instead, either the value 10 " - "(Firmware) and/or 11 (BIOS/FCode) SHOULD be used. The " - "value 13, Software Bundle, identifies a software package " - "consisting of multiple discrete software instances that " - "can be installed individually or together.\n" - "Each contained software instance is represented by an " - "instance of SoftwareIdentity that is associated to this " - "instance of SoftwareIdentityinstance via a Component " - "association." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "..", "0x8000..0xFFFF" }, - Values { "Unknown", "Other", "Driver", - "Configuration Software", "Application Software", - "Instrumentation", "Firmware/BIOS", "Diagnostic Software", - "Operating System", "Middleware", "Firmware", - "BIOS/FCode", "Support/Service Pack", "Software Bundle", - "DMTF Reserved", "Vendor Reserved" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_SoftwareIdentity.ClassificationDescriptions" }] - uint16 Classifications[]; - - [Description ( - "An array of free-form strings providing more detailed " - "explanations for any of the entries in the " - "Classifications array. Note that each entry is related " - "to one in the Classifications array located at the same " - "index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_SoftwareIdentity.Classifications" }] - string ClassificationDescriptions[]; - - [Description ( - "A manufacturer-allocated number used to identify the software." - )] - string SerialNumber; - - [Description ( - "An array of strings that describes the compatible " - "installer(s). The purpose of the array elements is to " - "establish compatibility between a SoftwareIdentity and a " - "SoftwareInstallationService that can install the " - "SoftwareIdentity by comparing the values of the array " - "elements of this property to the values of " - "SoftwareInstallationServiceCapabilities.SupportedTargetTypes[] " - "property\'s array elements." ), - ModelCorrespondence { - "CIM_SoftwareInstallationServiceCapabilities.SupportedTargetTypes" }] - string TargetTypes[]; - - [Description ( - "IdentityInfoValue captures additional information that " - "MAY be used by an organization to describe or identify a " - "software instance within the context of the " - "organization. For example, large organizations may have " - "several ways to address or identify a particular " - "instance of software depending on where it is stored; a " - "catalog, a web site, or for whom it is intended; " - "development, customer service, etc. The indexed array " - "property IdentityInfoValue contains 0 or more strings " - "that contain a specific identity info string value. " - "IdentityInfoValue is mapped and indexed to " - "IdentityInfoType. When the IdentityInfoValue property is " - "implemented, the IdentityInfoType property MUST be " - "implemented and shall be formatted using the algorithm " - "provided in the IdentityInfoType property Description." ), - ArrayType ( "Indexed" ), - MaxLen ( 256 ), - ModelCorrespondence { "CIM_SoftwareIdentity.IdentityInfoType" }] - string IdentityInfoValue[]; - - [Description ( - "An indexed array of fixed-form strings that provide the " - "description of the type of information that is stored in " - "the corresponding component of the IdentityInfoValue " - "array. The elements of this property array describe the " - "type of the value in the corresponding elements of the " - "IndetityInfoValue array. When the IdentityInfoValue " - "property is implemented, the IdentityInfoType property " - "MUST be implemented. To insure uniqueness the " - "IdentityInfoType property SHOULD be formatted using the " - "following algorithm: < OrgID > : < LocalID > Where < " - "OrgID > and < LocalID > are separated by a colon (:), " - "and where < OrgID > MUST include a copyrighted, " - "trademarked, or otherwise unique name that is owned by " - "the business entity that is creating or defining the " - "IdentityInfoType or that is a registered ID assigned to " - "the business entity by a recognized global authority. " - "(This requirement is similar to the < Schema Name > _ < " - "Class Name > structure of Schema class names.) In " - "addition, to ensure uniqueness, < OrgID > MUST NOT " - "contain a colon (:). When using this algorithm, the " - "first colon to appear in IdentityInfoType MUST appear " - "between < OrgID > and < LocalID > . < LocalID > is " - "chosen by the business entity and SHOULD NOT be reused " - "to identify different underlying software elements." ), - ArrayType ( "Indexed" ), - MaxLen ( 256 ), - ModelCorrespondence { "CIM_SoftwareIdentity.IdentityInfoValue" }] - string IdentityInfoType[]; - - [Description ( "The date the software was released." )] - datetime ReleaseDate; - - [Description ( - "The IsEntity property is used to indicate whether the " - "SoftwareIdentity corresponds to a discrete copy of the " - "software component or is being used to convey " - "descriptive and identifying information about software " - "that is not present in the management domain.A value of " - "TRUE shall indicate that the SoftwareIdentity instance " - "corresponds to a discrete copy of the software " - "component. A value of FALSE shall indicate that the " - "SoftwareIdentity instance does not correspond to a " - "discrete copy of the Software." )] - boolean IsEntity = false; - - [Description ( - "The binary format type of the installation package of " - "the software. This property can be used to locate a " - "SoftwareInstallationService capable of installing this " - "software." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "..", "0x8000.." }, - Values { "Unknown", "Other", "Not Applicable", "Linux RPM", - "HP-UX Depot", "Windows MSI", "Solaris Package", - "Macintosh Disk Image", "Debian linux Package", - "VMware vSphere Installation Bundle", - "VMware Software Bulletin", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { - "CIM_SoftwareIdentity.OtherExtendedResource", - "CIM_SoftwareIdentity.MinExtendedResourceTypeMajorVersion", - "CIM_SoftwareIdentity.MinExtendedResourceTypeMinorVersion", - "CIM_SoftwareIdentity.MinExtendedResourceTypeRevisionNumber", - "CIM_SoftwareIdentity.MinExtendedResourceTypeBuildNumber", - "CIM_SoftwareInstallationServiceCapabilities.SupportedExtendedResourceTypes[]" }] - uint16 ExtendedResourceType; - - [Description ( - "A string describing the binary format type of the " - "installation package of the software when the " - "ExtendedResourceType property has a value of 1 (Other)." ), - ModelCorrespondence { - "CIM_SoftwareIdentity.ExtendedResourceType", - "CIM_SoftwareIdentity.MinExtendedResourceTypeMajorVersion", - "CIM_SoftwareIdentity.MinExtendedResourceTypeMinorVersion", - "CIM_SoftwareIdentity.MinExtendedResourceTypeRevisionNumber", - "CIM_SoftwareIdentity.MinExtendedResourceTypeBuildNumber", - "CIM_SoftwareInstallationServiceCapabilities.SupportedExtendedResourceTypes[]" }] - string OtherExtendedResourceTypeDescription; - - [Description ( - "This property represents the major number component of " - "the minimum version of the installer, represented by the " - "ExtendedResourceType property, that is required to " - "install this software." ), - ModelCorrespondence { - "CIM_SoftwareIdentity.ExtendedResourceType", - "CIM_SoftwareIdentity.OtherExtendedResourceTypeDescription", - "CIM_SoftwareInstallationServiceCapabilities.SupportedExtendedResourceTypes[]", - "CIM_SoftwareInstallationServiceCapabilities.SupportedExtendedResourceTypesMajorVersions[]" }] - uint16 MinExtendedResourceTypeMajorVersion; - - [Description ( - "This property represents the minor number component of " - "the minimum version of the installer, represented by " - "theExtendedResourceType property, that is required to " - "install this software." ), - ModelCorrespondence { - "CIM_SoftwareIdentity.ExtendedResourceType", - "CIM_SoftwareIdentity.OtherExtendedResourceTypeDescription", - "CIM_SoftwareInstallationServiceCapabilities.SupportedExtendedResourceTypes[]", - "CIM_SoftwareInstallationServiceCapabilities.SupportedExtendedResourceTypesMinorVersions[]" }] - uint16 MinExtendedResourceTypeMinorVersion; - - [Description ( - "This property represents the Revision number component " - "of the minimum version of the installer, represented by " - "theExtendedResourceType property, that is required to " - "install this software." ), - ModelCorrespondence { - "CIM_SoftwareIdentity.ExtendedResourceType", - "CIM_SoftwareIdentity.OtherExtendedResourceTypeDescription", - "CIM_SoftwareInstallationServiceCapabilities.SupportedExtendedResourceTypes[]", - "CIM_SoftwareInstallationServiceCapabilities.SupportedExtendedResourceTypesRevisionNumbers[]" }] - uint16 MinExtendedResourceTypeRevisionNumber; - - [Description ( - "This property represents the Build number component of " - "the minimum version of the installer, represented by " - "theExtendedResourceType property, that is required to " - "install this software." ), - ModelCorrespondence { - "CIM_SoftwareIdentity.ExtendedResourceType", - "CIM_SoftwareIdentity.OtherExtendedResourceTypeDescription", - "CIM_SoftwareInstallationServiceCapabilities.SupportedExtendedResourceTypes[]", - "CIM_SoftwareInstallationServiceCapabilities.SupportedExtendedResourceTypesBuildNumbers[]" }] - uint16 MinExtendedResourceTypeBuildNumber; - - [Description ( - "The TargetOSTypes property specifies the target " - "operating systems supported by the software. When the " - "target operating system of the software is not listed in " - "the enumeration values, TargetOperatingSystems[] " - "property should be used to specify the target operating " - "system." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26", "27", - "28", "29", "30", "31", "32", "33", "34", "35", "36", - "37", "38", "39", "40", "41", "42", "43", "44", "45", - "46", "47", "48", "49", "50", "51", "52", "53", "54", - "55", "56", "57", "58", "59", "60", "61", "62", "63", - "64", "65", "66", "67", "68", "69", "70", "71", "72", - "73", "74", "75", "76", "77", "78", "79", "80", "81", - "82", "83", "84", "85", "86", "87", "88", "89", "90", - "91", "92", "93", "94", "95", "96", "97", "98", "99", - "100", "101", "102", "103", "104", "105", "106", "107", - "108", "109", "110" }, - Values { "Unknown", "Other", "MACOS", "ATTUNIX", "DGUX", - "DECNT", "Tru64 UNIX", "OpenVMS", "HPUX", "AIX", - //10 - "MVS", "OS400", "OS/2", "JavaVM", "MSDOS", - "WIN3x", "WIN95", "WIN98", "WINNT", "WINCE", - //20 - "NCR3000", "NetWare", "OSF", "DC/OS", - "Reliant UNIX", "SCO UnixWare", "SCO OpenServer", - "Sequent", "IRIX", "Solaris", //30 - "SunOS", - "U6000", "ASERIES", "HP NonStop OS", "HP NonStop OSS", - "BS2000", "LINUX", "Lynx", "XENIX", "VM", - //40 - "Interactive UNIX", "BSDUNIX", "FreeBSD", - "NetBSD", "GNU Hurd", "OS9", "MACH Kernel", "Inferno", - "QNX", "EPOC", //50 - "IxWorks", "VxWorks", - "MiNT", "BeOS", "HP MPE", "NextStep", "PalmPilot", - "Rhapsody", "Windows 2000", "Dedicated", - //60 - "OS/390", "VSE", "TPF", "Windows (R) Me", - "Caldera Open UNIX", "OpenBSD", "Not Applicable", - "Windows XP", "z/OS", "Microsoft Windows Server 2003", - //70 - "Microsoft Windows Server 2003 64-Bit", - "Windows XP 64-Bit", "Windows XP Embedded", - "Windows Vista", "Windows Vista 64-Bit", - "Windows Embedded for Point of Service", - "Microsoft Windows Server 2008", - "Microsoft Windows Server 2008 64-Bit", "FreeBSD 64-Bit", - "RedHat Enterprise Linux", - //80 - "RedHat Enterprise Linux 64-Bit", - "Solaris 64-Bit", "SUSE", "SUSE 64-Bit", "SLES", - "SLES 64-Bit", "Novell OES", "Novell Linux Desktop", - "Sun Java Desktop System", "Mandriva", - //90 - "Mandriva 64-Bit", "TurboLinux", - "TurboLinux 64-Bit", "Ubuntu", "Ubuntu 64-Bit", "Debian", - "Debian 64-Bit", "Linux 2.4.x", "Linux 2.4.x 64-Bit", - "Linux 2.6.x", //100 - "Linux 2.6.x 64-Bit", - "Linux 64-Bit", "Other 64-Bit", - "Microsoft Windows Server 2008 R2", "VMware ESXi", - "Microsoft Windows 7", "CentOS 32-bit", "CentOS 64-bit", - "Oracle Enterprise Linux 32-bit", - "Oracle Enterprise Linux 64-bit", - //110 - "eComStation 32-bitx" }, - ModelCorrespondence { "CIM_OperatingSystem.OSType" }] - uint16 TargetOSTypes[]; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SoftwareInstallationService.mof b/build/vendor/dmtf_mof/Core/CIM_SoftwareInstallationService.mof deleted file mode 100644 index 0ed5a34d..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SoftwareInstallationService.mof +++ /dev/null @@ -1,292 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::Software" ), - Description ( - "A subclass of service which provides methods to install (or " - "update) Software Identities in ManagedElements." )] -class CIM_SoftwareInstallationService : CIM_Service { - - - [Description ( - "This method allows a client application to determine " - "whether a specific SoftwareIdentity can be installed (or " - "updated) on a ManagedElement. It also allows other " - "characteristics to be determined such as whether install " - "will require a reboot. In addition a client can check " - "whether the SoftwareIdentity can be added " - "simulataneously to a specified " - "SofwareIndentityCollection. A client MAY specify either " - "or both of the Collection and Target parameters. The " - "Collection parameter is only supported if " - "SoftwareInstallationServiceCapabilities.CanAddToCollection " - "is TRUE." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", - "4097", "4098", "4099", "4100", "4101", "4102", "4103", - "4104", "4105", "4106", "4107", "4108", "4109", - "4110..32767", "32768..65535" }, - Values { "Job Completed with No Error", "Not Supported", - "Unspecified Error", "Timeout", "Failed", - "Invalid Parameter", "Target In Use", "DMTF Reserved", - "Method Reserved", "Unsupported TargetType", - "Unattended/silent installation not supported", - "Downgrade/reinstall not supported", "Not enough memory", - "Not enough swap-space", "Unsupported version transition", - "Not enough disk space", - "Software and target operating system mismatch", - "Missing dependencies", "Not applicable to target", - "No supported path to image", "Cannot add to Collection", - "Asynchronous Job already in progress", "Method Reserved", - "Vendor Specific" }] - uint32 CheckSoftwareIdentity( - [IN, Description ( - "Reference to the SoftwareIdentity to be checked." )] - CIM_SoftwareIdentity REF Source, - [IN, Description ( - "Reference to the ManagedElement that the Software " - "Identity is going to be installed in (or updated)." )] - CIM_ManagedElement REF Target, - [IN, Description ( - "Reference to the Collection to which the Software " - "Identity will be added." )] - CIM_Collection REF Collection, - [IN ( false ), OUT, Description ( - "The parameter describes the characteristics of the " - "installation/update that will take place if the " - "Source Software Identity is installed: \n" - "Target automatic reset: The target element will " - "automatically reset once the installation is " - "complete. \n" - "System automatic reset: The containing system of " - "the target ManagedElement (normally a logical " - "device or the system itself) will automatically " - "reset/reboot once the installation is complete. \n" - "Separate target reset required: " - "EnabledLogicalElement.RequestStateChange MUST be " - "used to reset the target element after the " - "SoftwareIdentity is installed. \n" - "Separate system reset required: " - "EnabledLogicalElement.RequestStateChange MUST be " - "used to reset/reboot the containing system of the " - "target ManagedElement after the SoftwareIdentity " - "is installed. \n" - "Manual Reboot Required: The system MUST be " - "manually rebooted by the user. \n" - "No reboot required : No reboot is required after " - "installation. \n" - "User Intervention Recomended : It is recommended " - "that a user confirm installation of this " - "SoftwareIdentity. Inappropriate application MAY " - "have serious consequences. \n" - "MAY be added to specified collection : The " - "SoftwareIndentity MAY be added to specified " - "Collection." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", - "..", "0x7FFF..0xFFFF" }, - Values { "Target automatic reset", - "System automatic reset", - "Separate target reset Required", - "Separate system reset Required", - "Manual Reboot Required", "No Reboot Required", - "User Intervention recommended", - "MAY be added to specified Collection", - "DMTF Reserved", "Vendor Specific" }] - uint16 InstallCharacteristics[]); - - [Description ( - "Start a job to install or update a SoftwareIdentity " - "(Source) on a ManagedElement (Target). \n" - "In addition the method can be used to add the " - "SoftwareIdentity simulataneously to a specified " - "SofwareIndentityCollection. A client MAY specify either " - "or both of the Collection and Target parameters. The " - "Collection parameter is only supported if " - "SoftwareInstallationServiceCapabilities.CanAddToCollection " - "is TRUE. \n" - "If 0 is returned, the function completed successfully " - "and no ConcreteJob instance was required. If 4096/0x1000 " - "is returned, a ConcreteJob will be started to perform " - "the install. The Job\'s reference will be returned in " - "the output parameter Job." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", - "4097", "4098", "4099", "4100", "4101", "4102", "4103", - "4104", "4105", "4106", "4107", "4108", "4109..32767", - "32768..65535" }, - Values { "Job Completed with No Error", "Not Supported", - "Unspecified Error", "Timeout", "Failed", - "Invalid Parameter", "Target In Use", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Unsupported TargetType", - "Unattended/silent installation not supported", - "Downgrade/reinstall not supported", "Not enough memory", - "Not enough swap-space", "Unsupported version transition", - "Not enough disk space", - "Software and target operating system mismatch", - "Missing dependencies", "Not applicable to target", - "No supported path to image", "Cannot add to Collection", - "Method Reserved", "Vendor Specific" }] - uint32 InstallFromSoftwareIdentity( - [IN ( false ), OUT, Description ( - "Reference to the job (may be null if job completed)." - )] - CIM_ConcreteJob REF Job, - [IN, Description ( - "Options to control the install process.\n" - "Defer target/system reset : do not automatically " - "reset the target/system.\n" - "Force installation : Force the installation of the " - "same or an older SoftwareIdentity. Install: " - "Perform an installation of this software on the " - "managed element.\n" - "Update: Perform an update of this software on the " - "managed element.\n" - "Repair: Perform a repair of the installation of " - "this software on the managed element by forcing " - "all the files required for installing the software " - "to be reinstalled.\n" - "Reboot: Reboot or reset the system immediately " - "after the install or update of this software, if " - "the install or the update requires a reboot or reset.\n" - "Password: Password will be specified as clear text " - "without any encryption for performing the install " - "or update.\n" - "Uninstall: Uninstall the software on the managed element.\n" - "Log: Create a log for the install or update of the software.\n" - "SilentMode: Perform the install or update without " - "displaying any user interface.\n" - "AdministrativeMode: Perform the install or update " - "of the software in the administrative mode. " - "ScheduleInstallAt: Indicates the time at which " - "theinstall or update of the software will occur." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "..", "32768..65535" }, - Values { "Defer target/system reset", - "Force installation", "Install", "Update", "Repair", - "Reboot", "Password", "Uninstall", "Log", - "SilentMode", "AdministrativeMode", - "ScheduleInstallAt", "DMTF Reserved", - "Vendor Specific" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_SoftwareInstallationService.InstallOptionsValues[]", - "CIM_SoftwareInstallationServiceCapabilities.SupportedInstallOptions[]" }] - uint16 InstallOptions[], - [IN, Description ( - "InstallOptionsValues is an array of strings " - "providing additional information to InstallOptions " - "for the method to install the software. Each entry " - "of this array is related to the entry in " - "InstallOptions that is located at the same index " - "providing additional information for " - "InstallOptions. \n" - "If the index in InstallOptions has the value " - "\"Password \" then a value at the corresponding " - "index of InstallOptionValues shall not be NULL. \n" - "If the index in InstallOptions has the value " - "\"ScheduleInstallAt\" then the value at the " - "corresponding index of InstallOptionValues shall " - "not be NULL and shall be in the datetime type " - "format. \n" - "If the index in InstallOptions has the value \"Log " - "\" then a value at the corresponding index of " - "InstallOptionValues may be NULL. \n" - "If the index in InstallOptions has the value " - "\"Defer target/system reset\", \"Force " - "installation\",\"Install\", \"Update\", \"Repair\" " - "or \"Reboot\" then a value at the corresponding " - "index of InstallOptionValues shall be NULL." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_SoftwareInstallationService.InstallOptions[]" }] - string InstallOptionsValues[], - [IN, Description ( - "Reference to the source of the install." )] - CIM_SoftwareIdentity REF Source, - [IN, Description ( - "The installation target. If NULL then the " - "SOftwareIdentity will be added to Collection only. " - "The underlying implementation is expected to be " - "able to obtain any necessary metadata from the " - "Software Identity." )] - CIM_ManagedElement REF Target, - [IN, Description ( - "Reference to the Collection to which the Software " - "Identity SHALL be added. If NULL then the SOftware " - "Identity will not be added to a Collection." )] - CIM_Collection REF Collection); - - [Description ( - "Start a job to install software from a specific URI in a " - "ManagedElement. \n" - "Note that this method is provided to support existing, " - "alternative download mechanisms (such as used for " - "firmware download). The \'normal\' mechanism will be to " - "use the InstallFromSoftwareIdentity method.\n" - "If 0 is returned, the function completed successfully " - "and no ConcreteJob instance was required. If 4096/0x1000 " - "is returned, a ConcreteJob will be started to to perform " - "the install. The Job\'s reference will be returned in " - "the output parameter Job." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", - "4097", "4098", "4099", "4100", "4101", "4102", "4103", - "4104", "4105", "4106", "4107", "4108..32767", - "32768..65535" }, - Values { "Job Completed with No Error", "Not Supported", - "Unspecified Error", "Timeout", "Failed", - "Invalid Parameter", "Target In Use", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Unsupported TargetType", - "Unattended/silent installation not supported", - "Downgrade/reinstall not supported", "Not enough memory", - "Not enough swap-space", "Unsupported version transition", - "Not enough disk space", - "Software and target operating system mismatch", - "Missing dependencies", "Not applicable to target", - "URI not accessible", "Method Reserved", "Vendor Specific" }] - uint32 InstallFromURI( - [IN ( false ), OUT, Description ( - "Reference to the job (may be null if job completed)." - )] - CIM_ConcreteJob REF Job, - [IN, Description ( - "A URI for the software based on RFC 2079." )] - string URI, - [IN, Description ( "The installation target." )] - CIM_ManagedElement REF Target, - [IN, Description ( - "Options to control the install process. \n" - "See the InstallOptions parameter of the " - "SoftwareInstallationService.InstallFromSoftwareIdentity " - "method for the description of these values." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "..", "32768..65535" }, - Values { "Defer target/system reset", - "Force installation", "Install", "Update", "Repair", - "Reboot", "Password", "Uninstall", "Log", - "SilentMode", "AdministrativeMode", - "ScheduleInstallAt", "DMTF Reserved", - "Vendor Specific" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_SoftwareInstallationService.InstallFromURI.InstallOptionsValues[]", - "CIM_SoftwareInstallationServiceCapabilities.SupportedInstallOptions[]" }] - uint16 InstallOptions[], - [IN, Description ( - "InstallOptionsValues is an array of strings " - "providing additionalinformation to InstallOptions " - "for the method to install the software. Each entry " - "of this array is related to the entry in " - "InstallOptions that is located at the same index " - "providing additional information for " - "InstallOptions. \n" - "For further information on the use of " - "InstallOptionsValues parameter, see the " - "description of the InstallOptionsValues parameter " - "of the " - "SoftwareInstallationService.InstallFromSoftwareIdentity " - "method." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_SoftwareInstallationService.InstallFromByteStream.InstallOptions[]" }] - string InstallOptionsValues[]); - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SoftwareInstallationServiceCapabilities.mof b/build/vendor/dmtf_mof/Core/CIM_SoftwareInstallationServiceCapabilities.mof deleted file mode 100644 index dd57c068..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SoftwareInstallationServiceCapabilities.mof +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::Software" ), - Description ( - "A subclass of capabilities that defines the capabilities of a " - "SoftwareInstallationService. A single instance of " - "SoftwareInstallationServiceCapabilities is associated with a " - "SoftwareInstallationService using ElementCapabilities." )] -class CIM_SoftwareInstallationServiceCapabilities : CIM_Capabilities { - - [Required, Description ( - "Enumeration indicating what operations will be executed " - "as asynchronous jobs. If an operation is included in " - "both this and SupportedSynchronousActions then the " - "underlying implementation is indicating that it may or " - "may not create a job. If a Job is created, then the " - "methods in SoftwareInstallationService return a " - "reference to that Job as the Job parameter." ), - ValueMap { "2", "3", "4", "5" }, - Values { "None supported", "Install From Software Identity", - "Install from ByteStream", "Install from URI" }, - ModelCorrespondence { - "CIM_SoftwareInstallationServiceCapabilities.SupportedSynchronousActions" }] - uint16 SupportedAsynchronousActions[]; - - [Required, Description ( - "Enumeration indicating what operations will be executed " - "without the creation of a job. If an operation is " - "included in both this and SupportedAsynchronousActions " - "then the underlying instrumentation is indicating that " - "it may or may not create a job." ), - ValueMap { "2", "3", "4", "5" }, - Values { "None supported", "Install From Software Identity", - "Install from ByteStream", "Install from URI" }, - ModelCorrespondence { - "CIM_SoftwareInstallationServiceCapabilities.SupportedAsynchronousActions" }] - uint16 SupportedSynchronousActions[]; - - [Required, Description ( - "An array containing a list of " - "SoftwareIdentity.TargetType properties that this service " - "\'knows\' how to install. TargetType is an application " - "specific string which is invariant across version or " - "name changes of the SoftwareIdentity and so can be used " - "by a client to select Software Identities compatible " - "with this service. \n" - "If the service is generic (for example an OS installer), " - "this array will be empty." ), - ModelCorrespondence { "CIM_SoftwareIdentity.TargetType" }] - string SupportedTargetTypes[]; - - [Required, Description ( - "An array containing a list of the binary format types " - "that this service \'knows\' how to install. The Values " - "for this property are the subset of " - "CIM_SoftwareIdentityResource.ExtendedResourceTypes that " - "apply to the \'Installer and Payload\', \'Installer\' " - "and \' Installability Checker\' ResourceTypes. For " - "example, an a Windows system, this property may be set " - "to \'4\' indicating \'Windows MSI\'. This property " - "should be set to \'2\' (Not Applicable) if this service " - "is not OS specific." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", - "9..0x7FFF", "0x8000.." }, - Values { "Unknown", "Other", "Not Applicable", "Linux RPM", - "HP-UX Depot", "Windows MSI", "Solaris Package", - "Macintosh Disk Image", "Debian linux Package", - "DMTF Reserved", "Vendor Reserved" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_SoftwareIdentity.ExtendedResourceType", - "CIM_SoftwareInstallationServiceCapabilities.OtherSupportedExtendedResourceTypeDescriptions[]", - "CIM_SoftwareInstallationServiceCapabilities.SupportedExtendedResourceTypesMajorVersions[]", - "CIM_SoftwareInstallationServiceCapabilities.SupportedExtendedResourceTypesMinorVersions[]", - "CIM_SoftwareInstallationServiceCapabilities.SupportedExtendedResourceTypesRevisionNumbers[]", - "CIM_SoftwareInstallationServiceCapabilities.SupportedExtendedResourceTypesbuildNumbers[]" }] - uint16 SupportedExtendedResourceTypes[]; - - [Required, Description ( - "This property indicates whether " - "SoftwareInstallationService.InstallFromSoftwareIdentity " - "supports adding a SoftwareIdentity to a Collection." )] - boolean CanAddToCollection; - - [Description ( - "An enumeration indicating the specific install related " - "optionssupported by this service. Since this is an " - "array, multiple values may be specified. See the " - "InstallOptions parameter of " - "theSoftwareInstallationService.InstallFromSoftwareIdentity " - "method for the description of these values." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "..", "32768..65535" }, - Values { "Defer target/system reset", "Force installation", - "Install", "Update", "Repair", "Reboot", "Password", - "Uninstall", "Log", "SilentMode", "AdministrativeMode", - "ScheduleInstallAt", "DMTF Reserved", "Vendor Specific" }, - ModelCorrespondence { - "CIM_SoftwareInstallationService.InstallFromSoftwareIdentity" }] - uint16 SupportedInstallOptions[]; - - [Description ( - "A string describing the binary format types that this " - "service \'knows\' how to install when the corresponding " - "SupportedExtendedResourceTypes array includes the value " - "1 (Other)." ), - ModelCorrespondence { - "CIM_SoftwareIdentity.ExtendedResourceType", - "CIM_SoftwareInstallationServiceCapabilities.SupportedExtendedResourceTypes[]", - "CIM_SoftwareInstallationServiceCapabilities.SupportedExtendedResourceTypesMajorVersions[]", - "CIM_SoftwareInstallationServiceCapabilities.SupportedExtendedResourceTypesMinorVersions[]", - "CIM_SoftwareInstallationServiceCapabilities.SupportedExtendedResourceTypesRevisionNumbers[]", - "CIM_SoftwareInstallationServiceCapabilities.SupportedExtendedResourceTypesbuildNumbers[]" }] - string OtherSupportedExtendedResourceTypeDescriptions[]; - - [Description ( - "This property represents the major number component of " - "the installer version supported by the " - "SoftwareInstallationService.The installer format is " - "represented by the element at the same index in the " - "SupportedExtendedResourceTypes array." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_SoftwareIdentity.ExtendedResourceType", - "CIM_SoftwareIdentity.MinExtendedResourceTypeMajorVersion", - "CIM_SoftwareInstallationServiceCapabilities.SupportedExtendedResourceTypes[]" }] - uint16 SupportedExtendedResourceTypesMajorVersions[]; - - [Description ( - "This property represents the minor number component of " - "the installer version supported by the " - "SoftwareInstallationService.The installer format is " - "represented by the element at the same index in the " - "SupportedExtendedResourceTypes array." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_SoftwareIdentity.ExtendedResourceType", - "CIM_SoftwareIdentity.MinExtendedResourceTypeMinorVersion", - "CIM_SoftwareInstallationServiceCapabilities.SupportedExtendedResourceTypes[]" }] - uint16 SupportedExtendedResourceTypesMinorVersions[]; - - [Description ( - "This property represents the revision number component " - "of the installer version supported by the " - "SoftwareInstallationService.The installer format is " - "represented by the element at the same index in the " - "SupportedExtendedResourceTypes array." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_SoftwareIdentity.ExtendedResourceType", - "CIM_SoftwareIdentity.MinExtendedResourceTypeRevisionNumber", - "CIM_SoftwareInstallationServiceCapabilities.SupportedExtendedResourceTypes[]" }] - uint16 SupportedExtendedResourceTypesRevisionNumbers[]; - - [Description ( - "This property represents the build number component of " - "the installer version supported by the " - "SoftwareInstallationService.The installer format is " - "represented by the element at the same index in the " - "SupportedExtendedResourceTypes array." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_SoftwareIdentity.ExtendedResourceType", - "CIM_SoftwareIdentity.MinExtendedResourceTypeBuildNumber", - "CIM_SoftwareInstallationServiceCapabilities.SupportedExtendedResourceTypes[]" }] - uint16 SupportedExtendedResourceTypesBuildNumbers[]; - - [Description ( - "This property lists the URI schemes supported by the " - "SoftwareInstallationService." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "..", - "0x8000..0xFFFF" }, - Values { "data", "file", "ftp", "http", "https", "nfs", - "tftp", "DMTF Reserved", "Vendor Specific" }] - uint16 SupportedURISchemes[]; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SpareGroup.mof b/build/vendor/dmtf_mof/Core/CIM_SpareGroup.mof deleted file mode 100644 index fc253426..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SpareGroup.mof +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Deprecated -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SpareGroup -// ================================================================== - [Deprecated { "CIM_RedundancySet" }, - Version ( "2.13.0" ), - UMLPackagePath ( "CIM::Core::Redundancy" ), - Description ( - "A class derived from RedundancyGroup indicating that one or " - "more of the aggregated elements can be spared. (The actual " - "Spares are defined using the ActsAsSpare association.) An " - "example is the use of redundant NICs in a ComputerSystem - " - "where one NIC is primary and the other is Spare. The \'primary\' " - "NIC would be a member of the SpareGroup (associated using the " - "RedundancyComponent class) and the \'other\' NIC would be " - "associated using the ActsAsSpare relationship. \n" - "The use of the class is being deprecated in lieu of using the " - "RedundancySet class." )] -class CIM_SpareGroup : CIM_RedundancyGroup { - - - [Deprecated { "CIM_RedundancySet.FailOver()" }, - Description ( - "This method is forces a failover from one ManagedSystem " - "Element to another. There are two parameters to the " - "Failover method, FailoverFrom and FailoverTo. The " - "FailoverFrom parameter is a reference to the primary " - "ManagedSystemElement that will become inactive after the " - "method. This Element should be associated with the " - "SpareGroup through the RedundancyComponent relationship. " - "The FailoverTo parameter is a reference to the " - "ManagedSystemElement that will take over for the " - "primary. This Element should be associated with the " - "SpareGroup through the ActsAsSpare association. Once the " - "failover has occurred, the SpareGroup and the Redundancy " - "Component and ActsAsSpare associations will be updated " - "with current status. For example, the ActsAsSpare " - "association that contained the FailoverTo Element will " - "be deleted and a new RedundancyComponent association " - "instantiated in its place. The method should return 0 if " - "successful, 1 if the request is not supported, and some " - "other value if any other error occurred. In a subclass, " - "the set of possible return codes could be specified, " - "using a ValueMap qualifier on the method. The strings to " - "which the ValueMap contents are \'translated\' may also " - "be specified in the subclass as a Values array " - "qualifier." )] - uint32 Failover( - [IN, Description ( - "The primary ManagedSystemElement that will become " - "inactive after the method." )] - CIM_ManagedSystemElement REF FailoverFrom, - [IN, Description ( - "The ManagedSystemElement that will take over from " - "the primary MSE." )] - CIM_ManagedSystemElement REF FailoverTo); - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_Spared.mof b/build/vendor/dmtf_mof/Core/CIM_Spared.mof deleted file mode 100644 index 87e6bbd3..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_Spared.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Redundancy" ), - Description ( - "The Spared association indicates an element that is acting as " - "a replacement for another element. If the Dependent references " - "a Collection, this indicates that \'spared\' element is a " - "member of that collection and the actual mapping between the " - "spare and the spared is un-important." )] -class CIM_Spared : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "A ManagedElement that has replaced/spared another the " - "reference Dependent element." )] - CIM_ManagedElement REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The Element or Elements (in the case of a collection) " - "that have been replaced/spared." )] - CIM_ManagedElement REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_StatisticalData.mof b/build/vendor/dmtf_mof/Core/CIM_StatisticalData.mof deleted file mode 100644 index 2ae3c75f..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_StatisticalData.mof +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Abstract, Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Core::Statistics" ), - Description ( - "CIM_StatisticalData is a root class for any arbitrary " - "collection of statistical data and/or metrics applicable to " - "one or more ManagedElements. These statistics MUST represent " - "the most recent observations and MUST NOT be provided if " - "irrelevant or stale. Note that this class uses a simplified " - "naming/identity algorithm as compared to " - "CIM_StatisticalInformation." )] -class CIM_StatisticalData : CIM_ManagedElement { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. In order to ensure uniqueness within the " - "NameSpace, the value of InstanceID SHOULD be constructed " - "using the following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon " - "\':\', and where MUST include a copyrighted, " - "trademarked or otherwise unique name that is owned by " - "the business entity creating/defining the InstanceID, or " - "is a registered ID that is assigned to the business " - "entity by a recognized global authority (This is similar " - "to the _ structure of Schema " - "class names.) In addition, to ensure uniqueness " - "MUST NOT contain a colon (\':\'). When using this " - "algorithm, the first colon to appear in InstanceID MUST " - "appear between and . \n" - " is chosen by the business entity and SHOULD " - "not be re-used to identify different underlying " - "(real-world) elements. If the above \'preferred\' " - "algorithm is not used, the defining entity MUST assure " - "that the resultant InstanceID is not re-used across any " - "InstanceIDs produced by this or other providers for this " - "instance\'s NameSpace. \n" - "For DMTF defined instances, the \'preferred\' algorithm " - "MUST be used with the set to \'CIM\'." )] - string InstanceID; - - [Required, Override ( "ElementName" ), - Description ( - "The user friendly name for this instance of " - "StatisticalData. In addition, the user friendly name can " - "be used as a index property for a search of query. " - "(Note: Name does not have to be unique within a " - "namespace.)" )] - string ElementName; - - [Description ( - "The time, relative to managed element where the " - "statistic was collected, when the first measurement was " - "taken. If the statistic is reset, the StartStatisticTime " - "is the time when the reset was performed." )] - datetime StartStatisticTime; - - [Description ( - "The time the most recent measurement was taken, relative " - "to the managed element where the statistic was " - "collected." )] - datetime StatisticTime; - - [Description ( - "Some statistics are sampled at consistent time " - "intervals. This property provides the sample interval so " - "that client applications can determine the minimum time " - "that new statistics should be pulled. If the statistics " - "are not sampled at consistent time intervals, this " - "property must be set to a zero time interval." )] - datetime SampleInterval = "00000000000000.000000:000"; - - - [Description ( - "Method to reset one or more of the instance\'s " - "statistics. The method takes one parameter as input - an " - "array of strings indicating which statistics to reset. " - "If all the statistics in the instance should be reset, " - "the first element of the array MUST be set to \"All\" or " - "\"ALL\". If one or more individual statistics should be " - "reset, the corresponding property names are entered into " - "the elements of the array. \n" - "The method returns 0 if successful, 1 if not supported, " - "and any other value if an error occurred. A method is " - "specified so that the StatisticalInformation\'s " - "provider/ instrumentation, which calculates the " - "statistics, can reset its internal processing, counters, " - "etc. \n" - "In a subclass, the set of possible return codes could be " - "specified, using a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \'translated\' " - "may also be specified in the subclass as a Values array " - "qualifier." )] - uint32 ResetSelectedStats( - [IN, Description ( - "Array of strings indicating which statistics to reset." - )] - string SelectedStatistics[]); - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_StatisticalInformation.mof b/build/vendor/dmtf_mof/Core/CIM_StatisticalInformation.mof deleted file mode 100644 index 2cbd3fde..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_StatisticalInformation.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_StatisticalInformation -// ================================================================== - [Abstract, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::Statistics" ), - Description ( - "CIM_StatisticalInformation is a root class for any arbitrary " - "collection of statistical data and/or metrics applicable to " - "one or more ManagedSystemElements. Note that the CIM_ " - "StatisticalData class uses a simplified naming/identity " - "algorithm as compared to this class. StatisticalInformation is " - "not deprecated since its naming algorithm is still in use in " - "various implementations." )] -class CIM_StatisticalInformation : CIM_ManagedElement { - - [Description ( - "The Name property defines the label by which the " - "statistic or metric is known. When subclassed, the " - "property can be overridden to be a Key property." ), - MaxLen ( 256 )] - string Name; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_StatisticalSetting.mof b/build/vendor/dmtf_mof/Core/CIM_StatisticalSetting.mof deleted file mode 100644 index 040fef88..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_StatisticalSetting.mof +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_StatisticalSetting -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Core::Statistics" ), - Description ( - "CIM_StatisticalSetting is the class for setting the collection " - "criteria of statistical data and/or metrics applicable to one " - "or more ManagedElements." )] -class CIM_StatisticalSetting : CIM_SettingData { - - [Write, Description ( - "The time, relative to managed element where the " - "statistic is to be collected, when the first measurement " - "is to be taken." ), - ModelCorrespondence { "CIM_StatisticalData.StartStatisticTime" }] - datetime StartStatisticTime; - - [Write, Description ( - "The time, relative to managed element where the " - "statistic is to be collected, when the measurement is to " - "end." )] - datetime EndStatisticTime; - - [Write, Description ( - "Some statistics are sampled at consistent time " - "intervals. This property when set indicates the desired " - "minimum time that new statistics should be polled or " - "calculated." ), - ModelCorrespondence { "CIM_StatisticalData.SampleInterval" }] - datetime SampleInterval; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_Statistics.mof b/build/vendor/dmtf_mof/Core/CIM_Statistics.mof deleted file mode 100644 index 3e16df65..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_Statistics.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Statistics -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::Statistics" ), - Description ( - "CIM_Statistics is an association that relates Managed Elements " - "to the StatisticalGroup(s) that apply to them." )] -class CIM_Statistics { - - [Key, Description ( "The statistic information/object." )] - CIM_StatisticalInformation REF Stats; - - [Key, Description ( - "The ManagedElement for which statistical or metric data " - "is defined." )] - CIM_ManagedElement REF Element; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_StatisticsCollection.mof b/build/vendor/dmtf_mof/Core/CIM_StatisticsCollection.mof deleted file mode 100644 index 464938bc..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_StatisticsCollection.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.1000" ), - UMLPackagePath ( "CIM::Core::Statistics" ), - Description ( - "A subclass of SystemSpecificCollection which collects together " - "statistics for a system. This class forms an \'anchor point\' " - "from which all the statistics kept for the system can be found " - "(via the MemberOfCollection associations)." )] -class CIM_StatisticsCollection : CIM_SystemSpecificCollection { - - [Description ( - "This property provides the minimum sampling interval for " - "the associated statistics so that client applications " - "can determine the minimum interval that the " - "StatisticsCollection should be sampled. If the " - "statistics are sampled at different cycles, this " - "property MUST be set to a zero time interval." )] - datetime SampleInterval = "00000000000000.000000:000"; - - [Description ( - "The time that the statistics collection was last " - "sampled. Note that this property MAY be used to trigger " - "an indication for \'push\' delivery of statistics " - "samples." )] - datetime TimeLastSampled; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_StorageAllocationSettingData.mof b/build/vendor/dmtf_mof/Core/CIM_StorageAllocationSettingData.mof deleted file mode 100644 index 8c18b4d0..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_StorageAllocationSettingData.mof +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::Resource" ), - Description ( - "The CIM_StorageAllocationSettingData class represents settings " - "specifically related to the allocation of virtual storage." )] -class CIM_StorageAllocationSettingData : CIM_ResourceAllocationSettingData { - - [Description ( - "Size in bytes of the blocks that are presented to the " - "consumer as the result of this storage resource " - "allocation or storage resource allocation request. If " - "the block size is variable, then the maximum block size " - "in bytes should be specified. If the block size is " - "unknown or if a block concept does not apply, then the " - "value 1 shall be used.\n" - "NOTE: The use of 1 (and not 0) to indicate that the " - "blocksize is unknown still allows the use of the " - "VirtualQuantity property to convey the size in blocks of " - "size 1).\n" - "NOTE: This property is a copy of the " - "CIM_StorageExtent.BlockSize property. See the " - "description of the CIM_StorageExtent.BlockSize property " - "for details." ), - ModelCorrespondence { "CIM_StorageExtent.BlockSize" }, - PUnit ( "byte" )] - uint64 VirtualResourceBlockSize; - - [Override ( "VirtualQuantity" ), - Description ( - "Number of blocks that are presented to the consumer. The " - "blocksize is specified by the value of the " - "VirtualResourceBlockSize property." ), - ModelCorrespondence { "CIM_StorageExtent.NumberOfBlocks", - "CIM_StorageAllocationSettingData.VirtualQuantityUnits" }] - uint64 VirtualQuantity; - - [Override ( "VirtualQuantityUnits" ), - Description ( - "This property specifies the units used by the " - "VirtualQuantity property. The value shall match " - "\"count(fixed size block)\" | \"byte\".\n" - "The default value \"count(fixed size block)\" assumes " - "that the implementation knows a fixed block size and " - "conveys the block size through the value of the " - "VirtualResourceBlockSize property. However, if the " - "VirtualResourceBlockSize property has a value \"1\", " - "this indicates an unknown or variable block size; in " - "this case the value of the VirtualQuantityUnit property " - "should be set to \"byte\", such that the value of the " - "VirtualQuantity property is measured directly in byte.\n" - "NOTE: The IsPUnit qualifier already formally restricts " - "the value of this property to be a unit as specified in " - "DMTF DSP0004:2.5.0, Annex C; in addition, the normative " - "text in the description of this property above further " - "constrains the value to match \"byte\" | \"count(fixed " - "size block)\"." ), - ModelCorrespondence { - "CIM_StorageAllocationSettingData.VirtualQuantity" }, - IsPUnit] - string VirtualQuantityUnits = "count(fixed size block)"; - - [Description ( - "Access describes whether the allocated storage extent is " - "1 (readable), 2 (writeable), or 3 (both).\n" - "NOTE: This property is a copy of the " - "CIM_StorageExtent.Access property, except deprecated " - "values. See the description of the " - "CIM_StorageExtent.Access property for details." ), - ValueMap { "0", "1", "2", "3", ".." }, - Values { "Unknown", "Readable", "Writeable", - "Read/Write Supported", "DMTF Reserved" }, - ModelCorrespondence { "CIM_StorageExtent.Access" }] - uint16 Access; - - [Description ( - "Size in bytes of the blocks that are allocated at the " - "host as the result of this storage resource allocation " - "or storage resource allocation request. If the block " - "size is variable, then the maximum block size in bytes " - "should be specified. If the block size is unknown or if " - "a block concept does not apply, then the value 1 shall " - "be used.\n" - "NOTE: This property is a copy of the " - "CIM_StorageExtent.BlockSize property. See the " - "description of the CIM_StorageExtent.BlockSize property " - "for details." ), - ModelCorrespondence { "CIM_StorageExtent.BlockSize" }, - PUnit ( "byte" )] - uint64 HostResourceBlockSize; - - [Override ( "Reservation" ), - Description ( - "The amount of blocks that are guaranteed to be available " - "for this storage resource allocation at the host. The " - "blocksize is specified by the value of the " - "HostResourceBlockSize property." ), - ModelCorrespondence { - "CIM_StorageAllocationSettingData.HostResourceBlockSize" }] - uint64 Reservation; - - [Override ( "Limit" ), - Description ( - "The maximum amount of blocks that will be granted for " - "this storage resource allocation at the host. The " - "blocksize is specified by the value of the " - "HostResourceBlockSize property.Usually the value this " - "property would reflect a maximum size for the allocated " - "host extent that matches the size of the virtual storage " - "extent presented to the consumer. A value less than that " - "would indicate a situation where a sparsely populated " - "virtual storage extent is expected, where the fill rate " - "is limited by the value of the Limit property." ), - ModelCorrespondence { - "CIM_StorageAllocationSettingData.HostResourceBlockSize" }] - uint64 Limit; - - [Description ( - "The HostExtentStartingAddress property identifies the " - "starting address on the host storage extent identified " - "by the value of the HostExtentName property that is used " - "for the allocation of the virtual storage extent.\n" - "A value of NULL indicates that there is no direct " - "mapping of the virtual storage extent onto the " - "referenced host storage extent.\n" - "NOTE: This property is a copy of the " - "CIM_BasedOn.StartingAddess property. See the description " - "of CIM_BasedOn association for details." ), - ModelCorrespondence { - "CIM_StorageAllocationSettingData.HostResourceBlockSize", - "CIM_BasedOn.StartingAddress" }] - uint64 HostExtentStartingAddress; - - [Description ( - "A unique identifier for the host extent. The identified " - "host extent is used for the storage resource allocation.\n" - "NOTE: This property is a copy of the " - "CIM_StorageExtent.Name property. See the description of " - "CIM_StorageExtent.Name property for details." ), - ModelCorrespondence { - "CIM_StorageAllocationSettingData.HostExtentNameFormat", - "CIM_StorageAllocationSettingData.HostExtentNameNamespace", - "CIM_StorageExtent.Name" }] - string HostExtentName; - - [Description ( - "The HostExtentNameFormat property identifies the format " - "that is used for the value of the HostExtentName property.\n" - "NOTE: This property is a copy of the " - "CIM_StorageExtent.NameFormat property, excluding " - "deprecated values. See the description of " - "CIM_StorageExtent.NameFormat class for details.\n" - "7 = Serial Number/Vendor/Model (SNVM) SNVM is 3 strings " - "representing the vendor name, product name within the " - "vendor namespace, and the serial number within the model " - "namespace. Strings are delimited with a \'+\'. Spaces " - "may be included and are significant. The serial number " - "is the text representation of the serial number in " - "hexadecimal upper case. This represents the vendor and " - "model ID from SCSI Inquiry data; the vendor field MUST " - "be 8 characters wide and the product field MUST be 16 " - "characters wide. For example, \n" - "\'ACME____+SUPER DISK______+124437458\' (_ is a space " - "character) \n" - "9 = NAA as a generic format. See \n" - "http://standards.ieee.org/regauth/oui/tutorials/fibrecomp_id.html. " - "Formatted as 16 or 32 unseparated uppercase hex " - "characters (2 per binary byte). For example " - "\'21000020372D3C73\' \n" - "10 = EUI as a generic format (EUI64) See \n" - "http://standards.ieee.org/regauth/oui/tutorials/EUI64.html. \n" - "Formatted as 16 unseparated uppercase hex characters (2 " - "per binary byte) \n" - "11 = T10 vendor identifier format as returned by SCSI " - "Inquiry VPD page 83, identifier type 1. See T10 SPC-3 " - "specification. This is the 8-byte ASCII vendor ID from " - "the T10 registry followed by a vendor specific ASCII " - "identifier; spaces are permitted. For non SCSI volumes, " - "\'SNVM\' may be the most appropriate choice. 12 = OS " - "Device Name (for LogicalDisks). See LogicalDisk Name " - "description for details." ), - ValueMap { "0", "1", "7", "9", "10", "11", "12", ".." }, - Values { "Unknown", "Other", "SNVM", "NAA", "EUI64", - "T10VID", "OS Device Name", "DMTF Reserved" }, - ModelCorrespondence { - "CIM_StorageAllocationSettingData.HostExtentName", - "CIM_StorageAllocationSettingData.OtherHostExtentNameFormat", - "CIM_StorageExtent.NameFormat" }] - uint16 HostExtentNameFormat; - - [Description ( - "A string describing the format of the HostExtentName " - "property if the value of the HostExtentNameFormat " - "property is 1 (Other)." ), - ModelCorrespondence { - "CIM_StorageAllocationSettingData.HostExtentNameFormat" }] - string OtherHostExtentNameFormat; - - [Description ( - "If the host extent is a SCSI volume, then the preferred " - "source for SCSI volume names is SCSI VPD Page 83 responses.\n" - "NOTE: This property is a copy of the " - "CIM_StorageExtent.NameNamespace property. See the " - "description of CIM_StorageExtent.NameNamespace class for details.\n" - "Page 83 returns a list of identifiers for various device " - "elements. The metadata for each identifier includes an " - "Association field, identifiers with association of 0 " - "apply to volumes. Page 83 supports several namespaces " - "specified in the Type field in the identifier metadata. " - "See SCSI SPC-3 specification. \n" - "2 = VPD Page 83, Type 3 NAA (NameFormat SHOULD be NAA) \n" - "3 = VPD Page 83, Type 2 EUI64 (NameFormat EUI) \n" - "4 = VPD Page 83, Type 1 T10 Vendor Identification \n" - "(NameFormat T10) \n" - "Less preferred volume namespaces from other interfaces: \n" - "5 = VPD page 80, Serial number (NameFormat SHOULD be " - "Other) \n" - "6 = FC NodeWWN (NameFormat SHOULD be NAA or EUI) \n" - "7 = Serial Number/Vendor/Model (NameFormat SHOULD be " - "SNVM) cThe preferred namespace for LogigicalDisk names " - "is platform specific device namespace; see LogigicalDIsk " - "Description. \n" - "8 = OS Device Namespace." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", ".." }, - Values { "Unknown", "Other", "VPD83Type3", "VPD83Type2", - "VPD83Type1", "VPD80", "NodeWWN", "SNVM", - "OS Device Namespace", "DMTF Reserved" }, - ModelCorrespondence { - "CIM_StorageAllocationSettingData.HostExtentName", - "CIM_StorageAllocationSettingData.OtherHostExtentNameNamespace", - "CIM_StorageAllocationSettingData.HostExtentNameFormat", - "CIM_StorageExtent.Namespace" }] - uint16 HostExtentNameNamespace; - - [Description ( - "A string describing the namespace of the HostExtentName " - "property if the value of the HostExtentNameNamespace " - "matches 1 (Other)." ), - ModelCorrespondence { - "CIM_StorageAllocationSettingData.HostExtentNameNamespace" }] - string OtherHostExtentNameNamespace; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_StorageExtent.mof b/build/vendor/dmtf_mof/Core/CIM_StorageExtent.mof deleted file mode 100644 index f39fe96f..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_StorageExtent.mof +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_StorageExtent -// ================================================================== - [Version ( "2.13.0" ), - UMLPackagePath ( "CIM::Core::StorageExtent" ), - Description ( - "StorageExtent describes the capabilities and management of the " - "various media that exist to store data and allow data " - "retrieval. This superclass could be used to represent the " - "various components of RAID (Hardware or Software) or as a raw " - "logical extent on top of physical media." )] -class CIM_StorageExtent : CIM_LogicalDevice { - - [Description ( "Type of data organization used." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Other", "Unknown", "Fixed Block", "Variable Block", - "Count Key Data" }] - uint16 DataOrganization; - - [Description ( - "A free form string describing the media and/or its use." ), - MappingStrings { "MIB.IETF|HOST-RESOURCES-MIB.hrStorageDescr" }] - string Purpose; - - [Description ( - "Access describes whether the media is readable " - "(value=1), writeable (value=2), or both (value=3). " - "\"Unknown\" (0) and \"Write Once\" (4) can also be " - "defined." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Readable", "Writeable", - "Read/Write Supported", "Write Once" }] - uint16 Access; - - [Description ( - "ErrorMethodology is a free-form string describing the " - "type of error detection and correction supported by this " - "StorageExtent." )] - string ErrorMethodology; - - [Description ( - "Size in bytes of the blocks which form this " - "StorageExtent. If variable block size, then the maximum " - "block size in bytes should be specified. If the block " - "size is unknown or if a block concept is not valid (for " - "example, for AggregateExtents, Memory or LogicalDisks), " - "enter a 1." ), - Units ( "Bytes" ), - MappingStrings { "MIF.DMTF|Host Storage|001.4", - "MIB.IETF|HOST-RESOURCES-MIB.hrStorageAllocationUnits", - "MIF.DMTF|Storage Devices|001.5" }] - uint64 BlockSize; - - [Description ( - "Total number of logically contiguous blocks, of size " - "Block Size, which form this Extent. The total size of " - "the Extent can be calculated by multiplying BlockSize by " - "NumberOfBlocks. If the BlockSize is 1, this property is " - "the total size of the Extent." ), - MappingStrings { "MIF.DMTF|Host Storage|001.5", - "MIB.IETF|HOST-RESOURCES-MIB.hrStorageSize" }] - uint64 NumberOfBlocks; - - [Description ( - "The maximum number of blocks, of size BlockSize, which " - "are available for consumption when layering " - "StorageExtents using the BasedOn association. This " - "property only has meaning when this StorageExtent is an " - "Antecedent reference in a BasedOn relationship. For " - "example, a StorageExtent could be composed of 120 " - "blocks. However, the Extent itself may use 20 blocks for " - "redundancy data. If another StorageExtent is BasedOn " - "this Extent, only 100 blocks would be available to it. " - "This information (\'100 blocks is available for " - "consumption\') is indicated in the ConsumableBlocks " - "property." )] - uint64 ConsumableBlocks; - - [Description ( - "True indicates that the underlying StorageExtent(s) " - "participate in a StorageRedundancyGroup." )] - boolean IsBasedOnUnderlyingRedundancy; - - [Description ( - "Boolean set to TRUE if the Storage is sequentially " - "accessed by a MediaAccessDevice. A TapePartition is an " - "example of a sequentially accessed StorageExtent. " - "StorageVolumes, Disk Partitions and LogicalDisks " - "represent randomly accessed Extents." )] - boolean SequentialAccess; - - [Description ( - "StorageExtents have additional status information beyond " - "that captured in the OperationalStatus and other " - "properties, inherited from ManagedSystemElement. This " - "additional information (for example, \"Protection " - "Disabled\", value=9) is captured in the ExtentStatus " - "property. \n" - "\'In-Band Access Granted\' says that access to data on " - "an extent is granted to some consumer and is only valid " - "when \'Exported\' is also set. It is set as a side " - "effect of PrivilegeManagementService.ChangeAccess or " - "equivalent interfaces. \n" - "\'Imported\' indicates that the extent is used in the " - "current system, but known to be managed by some other " - "system. For example, a server imports volumes from a " - "disk array. \n" - "\'Exported\' indicates the extent is meant to be used by " - "some comsumer. A disk array\'s logical units are " - "exported. \n" - "Intermediate composite extents may be neither imported " - "nor exported." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", - "18..32767", "32768..65535" }, - Values { "Other", "Unknown", "None/Not Applicable", "Broken", - "Data Lost", "Dynamic Reconfig", "Exposed", - "Fractionally Exposed", "Partially Exposed", - "Protection Disabled", "Readying", "Rebuild", - "Recalculate", "Spare in Use", "Verify In Progress", - "In-Band Access Granted", "Imported", "Exported", - "DMTF Reserved", "Vendor Reserved" }] - uint16 ExtentStatus[]; - - [Description ( - "Indicates whether or not there exists no single point of failure." - ), - ModelCorrespondence { - "CIM_StorageSetting.NoSinglePointOfFailure" }] - boolean NoSinglePointOfFailure; - - [Description ( - "Number of complete copies of data currently maintained." ), - ModelCorrespondence { - "CIM_StorageSetting.DataRedundancyGoal", - "CIM_StorageSetting.DataRedundancyMax", - "CIM_StorageSetting.DataRedundancyMin" }] - uint16 DataRedundancy; - - [Description ( - "How many physical packages can currently fail without " - "data loss. For example, in the storage domain, this " - "might be disk spindles." ), - ModelCorrespondence { - "CIM_StorageSetting.PackageRedundancyGoal", - "CIM_StorageSetting.PackageRedundancyMax", - "CIM_StorageSetting.PackageRedundancyMin" }] - uint16 PackageRedundancy; - - [Description ( - "Current value for Delta reservation. This is a " - "percentage that specifies the amount of space that " - "should be reserved in a replica for caching changes." ), - Units ( "Percentage" ), - MinValue ( 1 ), - MaxValue ( 100 ), - ModelCorrespondence { - "CIM_StorageSetting.DeltaReservationGoal", - "CIM_StorageSetting.DeltaReservationMax", - "CIM_StorageSetting.DeltaReservationMin" }] - uint8 DeltaReservation; - - [Description ( - "If true, \"Primordial\" indicates that the containing " - "System does not have the ability to create or delete " - "this operational element. This is important because " - "StorageExtents are assembled into higher-level " - "abstractions using the BasedOn association. Although the " - "higher-level abstractions can be created and deleted, " - "the most basic, (i.e. primordial), hardware-based " - "storage entities cannot. They are physically realized as " - "part of the System, or are actually managed by some " - "other System and imported as if they were physically " - "realized. In other words, a Primordial StorageExtent " - "exists in, but is not created by its System and " - "conversely a non-Primordial StorageExtent is created in " - "the context of its System. For StorageVolumes, this " - "property will generally be false. One use of this " - "property is to enable algorithms that aggregate " - "StorageExtent.ConsumableSpace across all, StorageExtents " - "but that also want to distinquish the space that " - "underlies Primordial StoragePools. Since implementations " - "are not required to surface all Component StorageExtents " - "of a StoragePool, this information is not accessible in " - "any other way." )] - boolean Primordial = false; - - [Override ( "Name" ), - Description ( "A unique identifier for the Extent." ), - MappingStrings { - "SPC.INCITS-T10| VPD 83, Association 0 | Identifier" }, - ModelCorrespondence { "CIM_StorageExtent.NameFormat", - "CIM_StorageExtent.NameNamespace" }] - string Name; - - [Description ( - "The list here applies to all StorageExtent subclasses. " - "Please look at the Description in each subclass for " - "guidelines on the approriate values for that subclass. " - "Note that any of these formats could apply to a " - "CompositeExtent. \n" - "\n" - "Note - this property originally touched on two concepts " - "that are now separated into this property and " - "NameNamespace. Values 2,3,4,5,6, and 8 are retained for " - "backwards compatibility but are deprecated in lieu of " - "the corresponding values in " - "CIM_StorageExtent.NameNamespace. \n" - "\n" - "For example, the preferred source for SCSI virtual " - "(RAID) disk names is from Inquiry VPD page 83 response, " - "type 3 identifiers. These will have NameFormat set to " - "\'NAA\' and NameNamespace to \'VPD83Type3\'. \n" - "\n" - "Format of the Name property. Values for extents " - "representing SCSI volumes are (per SCSI SPC-3): \n" - "2 = VPD Page 83, NAA IEEE Registered Extended " - "(VPD83NAA6) \n" - "(DEPRECATED) \n" - "3 = VPD Page 83, NAA IEEE Registered (VPD83NAA5) \n" - "(DEPRECATED) \n" - "4 = VPD Page 83, (VPD83Type2) (DEPRECATED) \n" - "5 = VPD Page 83, \n" - "T10 Vendor Identification (VPD83Type1) (DEPRECATED) \n" - "6 = VPD Page 83, Vendor Specific (VPD83Type0) " - "(DEPRECATED) \n" - "7 = Serial Number/Vendor/Model (SNVM) SNVM is 3 strings " - "representing the vendor name, product name within the " - "vendor namespace, and the serial number within the model " - "namespace. Strings are delimited with a \'+\'. Spaces " - "may be included and are significant. The serial number " - "is the text representation of the serial number in " - "hexadecimal upper case. This represents the vendor and " - "model ID from SCSI Inquiry data; the vendor field MUST " - "be 8 characters wide and the product field MUST be 16 " - "characters wide. For example, \n" - "\'ACME____+SUPER DISK______+124437458\' (_ is a space " - "character) \n" - "8 = Node WWN (for single LUN/controller) (NodeWWN) \n" - "(DEPRECATED) \n" - "9 = NAA as a generic format. See \n" - "http://standards.ieee.org/regauth/oui/tutorials/fibrecomp_id.html. " - "Formatted as 16 or 32 unseparated uppercase hex " - "characters (2 per binary byte). For example " - "\'21000020372D3C73\' \n" - "10 = EUI as a generic format (EUI64) See \n" - "http://standards.ieee.org/regauth/oui/tutorials/EUI64.html. \n" - "Formatted as 16 unseparated uppercase hex characters (2 " - "per binary byte) \n" - "11 = T10 vendor identifier format as returned by SCSI " - "Inquiry VPD page 83, identifier type 1. See T10 SPC-3 " - "specification. This is the 8-byte ASCII vendor ID from " - "the T10 registry followed by a vendor specific ASCII " - "identifier; spaces are permitted. For non SCSI volumes, " - "\'SNVM\' may be the most appropriate choice. 12 = OS " - "Device Name (for LogicalDisks). See LogicalDisk Name " - "description for details." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12" }, - Values { "Unknown", "Other", "VPD83NAA6", "VPD83NAA5", - "VPD83Type2", "VPD83Type1", "VPD83Type0", "SNVM", - "NodeWWN", "NAA", "EUI64", "T10VID", "OS Device Name" }, - ModelCorrespondence { "CIM_StorageExtent.Name", - "CIM_StorageExtent.NameNamespace", - "CIM_StorageExtent.OtherNameFormat" }] - uint16 NameFormat; - - [Description ( - "The preferred source SCSI for volume names is SCSI VPD " - "Page 83 responses. Page 83 returns a list of identifiers " - "for various device elements. The metadata for each " - "identifier includes an Association field, identifiers " - "with association of 0 apply to volumes. Page 83 supports " - "several namespaces specified in the Type field in the " - "identifier metadata. See SCSI SPC-3 specification. \n" - "2 = VPD Page 83, Type 3 NAA (NameFormat SHOULD be NAA) \n" - "3 = VPD Page 83, Type 2 EUI64 (NameFormat EUI) \n" - "4 = VPD Page 83, Type 1 T10 Vendor Identification \n" - "(NameFormat T10) \n" - "Less preferred volume namespaces from other interfaces: \n" - "5 = VPD page 80, Serial number (NameFormat SHOULD be " - "Other) \n" - "6 = FC NodeWWN (NameFormat SHOULD be NAA or EUI) \n" - "7 = Serial Number/Vendor/Model (NameFormat SHOULD be " - "SNVM) \n" - "The preferred namespace for LogigicalDisk names is " - "platform specific device namespace; see LogigicalDIsk " - "Description. \n" - "8 = OS Device Namespace." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Unknown", "Other", "VPD83Type3", "VPD83Type2", - "VPD83Type1", "VPD80", "NodeWWN", "SNVM", - "OS Device Namespace" }, - MappingStrings { - "SPC.INCITS-T10| VPD 83, Association 0 | Identifier" }, - ModelCorrespondence { "CIM_StorageExtent.Name", - "CIM_StorageExtent.OtherNameNamespace", - "CIM_StorageExtent.NameFormat" }] - uint16 NameNamespace; - - [Description ( - "A string describing the namespace of the Name property " - "when NameNamespace includes the value 1, \"Other\"." ), - ModelCorrespondence { "CIM_StorageExtent.NameNamespace" }] - string OtherNameNamespace; - - [Description ( - "A string describing the format of the Name property when " - "NameFormat includes the value 1, \"Other\"." ), - ModelCorrespondence { "CIM_StorageExtent.NameFormat" }] - string OtherNameFormat; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_StorageRedundancyGroup.mof b/build/vendor/dmtf_mof/Core/CIM_StorageRedundancyGroup.mof deleted file mode 100644 index 9c50ebd3..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_StorageRedundancyGroup.mof +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Deprecated -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_StorageRedundancyGroup -// ================================================================== - [Deprecated { "CIM_StorageRedundancySet" }, - Version ( "2.13.0" ), - UMLPackagePath ( "CIM::Core::Redundancy" ), - Description ( - "A class derived from RedundancyGroup containing mass " - "storage-related redundancy information. StorageRedundancy " - "Groups are used to protect user data. They act on one or more " - "underlying StorageExtents, associated via " - "ExtentRedundancyComponent and produce one or more protected " - "StorageExtents that are associated to the underlying " - "StorageExtents via ProtectedExtentBasedOn or " - "CompositeExtentBasedOn. StorageRedundancyGroups may overlap. " - "However, the underlying StorageExtents within the overlap " - "should not contain any check data. \n" - "The use of this class is being deprecated in lieu of using the " - "StorageRedundancySet class." )] -class CIM_StorageRedundancyGroup : CIM_RedundancyGroup { - - [Deprecated { "CIM_StorageRedundancySet.TypeOfAlgorithm" }, - Description ( - "The TypeOfAlgorithm specifies the algorithm used for " - "data redundancy and reconstruction. For example, \"P+Q\" " - "(value =5) or \"P+S\" (7) may be specified. The value of " - "0, is defined as \"None\" to indicate that data " - "redundancy is not active. An inactive redundancy should " - "only be instantiated if data striping or concatenation " - "are active. These are indicated by the IsStriped or " - "IsConcatentated boolean properties of this " - "RedundancyGroup." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7" }, - Values { "None", "Other", "Unknown", "Copy", "XOR", "P+Q", - "S", "P+S" }, - MappingStrings { "MIF.DMTF|Redundancy Group|001.2" }] - uint16 TypeOfAlgorithm; - - [Deprecated { "No Value" }, - Description ( - "StorageRedundancy provides additional information on the " - "state of the RedundancyGroup, beyond the " - "RedundancyStatus property. Information like \"Reconfig " - "In Progress\" (value =1) or \"Redundancy Disabled\" can " - "be specified using this property." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "No Additional Status", "Reconfig In Progress", - "Data Lost", "Not Currently Configured", - "Protected Rebuild", "Redundancy Disabled", - "Unprotected Rebuild", "Recalculating", "Verifying" }] - uint16 StorageRedundancy; - - [Deprecated { "CIM_CompositeExtent.ExtentStripeLength" }, - Description ( - "True indicates that the data is striped across the " - "various StorageExtents in the Group." )] - boolean IsStriped; - - [Deprecated { "CIM_CompositeExtent.IsConcatenated" }, - Description ( - "True indicates that the data is concatenated across the " - "various StorageExtents in the Group." )] - boolean IsConcatenated; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_StorageRedundancySet.mof b/build/vendor/dmtf_mof/Core/CIM_StorageRedundancySet.mof deleted file mode 100644 index 5e3d93e8..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_StorageRedundancySet.mof +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.1000" ), - UMLPackagePath ( "CIM::Core::Redundancy" ), - Description ( - "A class derived from RedundancySet describing storage-related " - "redundancy information. StorageRedundancySets are used to " - "protect user data. They aggregate one or more underlying " - "StorageExtents, associated via MemberOfCollection, and produce " - "one or more higher-level Extents. The Extents are related to " - "each other via a BasedOn association. And, the higher level " - "Extent is related to the StorageRedundancy Set via the " - "LogicalIdentity association. \n" - "Note that StorageRedundancySets may overlap in their " - "aggregation of members. If this occurs, the overlapping " - "Extents SHOULD NOT contain any check data." )] -class CIM_StorageRedundancySet : CIM_RedundancySet { - - [Description ( - "TypeOfAlgorithm specifies the algorithm used for storage " - "data redundancy and reconstruction. For example, \'P+Q\' " - "(=5) or \'P+S\' (=7) may be specified." ), - ValueMap { "0", "1", "3", "4", "5", "6", "7" }, - Values { "Unknown", "Other", "Copy", "XOR", "P+Q", "S", "P+S" }, - MappingStrings { "MIF.DMTF|Redundancy Group|001.2" }, - ModelCorrespondence { - "CIM_StorageRedundancySet.OtherAlgorithm" }] - uint16 TypeOfAlgorithm; - - [Description ( - "A string describing the redundancy algorithm when the " - "TypeOfAlgorithm is set to 1 \'Other\'." ), - ModelCorrespondence { - "CIM_StorageRedundancySet.TypeOfAlgorithm" }] - string OtherAlgorithm; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SupportAccess.mof b/build/vendor/dmtf_mof/Core/CIM_SupportAccess.mof deleted file mode 100644 index 25c9e47e..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SupportAccess.mof +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SupportAccess -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::ProductFRU" ), - Description ( - "The CIM_SupportAccess association defines how to obtain " - "assistance for a Product." )] -class CIM_SupportAccess : CIM_ManagedElement { - - [Key, Description ( - "SupportAccessID is an arbitrary, free form string " - "defined by the Product Vendor or by the organization " - "that deploys the Product. This property, since it is a " - "key, should be unique throughout the enterprise." ), - MaxLen ( 256 )] - string SupportAccessId; - - [Override ( "Description" ), - Description ( - "A textual description of the type of Support provided." ), - MappingStrings { "MIF.DMTF|Support|001.3" }] - string Description; - - [Description ( - "CommunicationInfo provides the details of the " - "Communication Mode. For example, if the " - "CommunicationMode is \'Phone\', CommunicationInfo " - "specifies the phone number to be called." ), - MappingStrings { "MIF.DMTF|FRU|002.11", "MIF.DMTF|FRU|002.12" }] - string CommunicationInfo; - - [Description ( - "CommunicationMode defines the form of communication in " - "order to obtain support. For example, phone " - "communication (value =2), fax (3) or email (8) can be " - "specified." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Other", "Phone", "Fax", "BBS", "Online Service", - "Web Page", "FTP", "E-mail" }, - MappingStrings { "MIF.DMTF|Support|001.5" }] - uint16 CommunicationMode; - - [Description ( - "Locale defines the geographic region and/or language " - "dialect to which this Support resource pertains." ), - MaxLen ( 64 ), - MappingStrings { "MIF.DMTF|Support|001.2" }] - string Locale; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_Synchronized.mof b/build/vendor/dmtf_mof/Core/CIM_Synchronized.mof deleted file mode 100644 index 854c130c..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_Synchronized.mof +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Synchronized -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::CoreElements" ), - Description ( - "Indicates that two ManagedElements were aligned or made to be " - "equivalent at the specified point in time. If the Boolean " - "property SyncMaintained is true, then synchronization of the " - "Elements is preserved. Both like and unlike objects can be " - "synchronized. For example, two WatchDog timers can be aligned, " - "or the contents of a LogicalFile can be synchronized with the " - "contents of a StorageExtent." )] -class CIM_Synchronized { - - [Key, Description ( - "SystemElement represents one ManagedElement that is " - "synchronized with the entity referenced as " - "SyncedElement." )] - CIM_ManagedElement REF SystemElement; - - [Key, Description ( - "SyncedElement represents another ManagedElement that is " - "synchronized with the entity referenced as " - "SystemElement." )] - CIM_ManagedElement REF SyncedElement; - - [Description ( - "The point in time that the Elements were synchronized." )] - datetime WhenSynced; - - [Description ( - "Boolean indicating whether synchronization is maintained." )] - boolean SyncMaintained; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_System.mof b/build/vendor/dmtf_mof/Core/CIM_System.mof deleted file mode 100644 index ced9ffb9..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_System.mof +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Promoted OtherIdentifyingInfo -// and IdentifyingDescription from ComputerSystem to System. -// ================================================================== -// CIM_System -// ================================================================== - [Abstract, Version ( "2.15.0" ), - UMLPackagePath ( "CIM::Core::CoreElements" ), - Description ( - "CIM_System represents an entity made up of component parts " - "(defined by the SystemComponent relationship), that operates " - "as a \'functional whole\'. Systems are top-level objects in " - "the CIM hierarchy, requiring no scoping or weak relationships " - "in order to exist and have context. It should be reasonable to " - "uniquely name and manage a System at an enterprise level. For " - "example, a ComputerSystem is a kind of System that can be " - "uniquely named and independently managed in an enterprise. " - "However, these qualities are not true for the power supply (or " - "the power supply sub-\'system\') within the computer. \n" - "\n" - "Although a System can be viewed as a Collection, this view is " - "not the correct model. A Collection is simply a \'bag\' that " - "\'holds\' its members. A System is a higher-level abstraction, " - "built out of its individual components. It is more than the " - "sum of its parts. Note that System is a subclass of " - "EnabledLogicalElement which allows the entire abstraction to " - "be functionally enabled or disabled at a higher level than " - "enabling or disabling its component parts." )] -class CIM_System : CIM_EnabledLogicalElement { - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Override ( "Name" ), - Description ( - "The inherited Name serves as the key of a System " - "instance in an enterprise environment." ), - MaxLen ( 256 )] - string Name; - - [Description ( - "The System object and its derivatives are top-level " - "objects of CIM. They provide the scope for numerous " - "components. Having unique System keys is required. A " - "heuristic can be defined in individual System subclasses " - "to attempt to always generate the same System Name Key. " - "The NameFormat property identifies how the System name " - "was generated, using the heuristic of the subclass." ), - MaxLen ( 64 )] - string NameFormat; - - [Write, Description ( - "The name of the primary system owner. The system owner " - "is the primary user of the system." ), - MaxLen ( 64 ), - MappingStrings { "MIF.DMTF|General Information|001.3" }] - string PrimaryOwnerName; - - [Write, Description ( - "A string that provides information on how the primary " - "system owner can be reached (for example, phone number, " - "e-mail address, and so on)." ), - MaxLen ( 256 ), - MappingStrings { "MIF.DMTF|General Information|001.4" }] - string PrimaryOwnerContact; - - [Write, Description ( - "An array (bag) of strings that specifies the " - "administrator -defined roles this System plays in the " - "managed environment. Examples might be \'Building 8 " - "print server\' or \'Boise user directories\'. A single " - "system may perform multiple roles. \n" - "Note that the instrumentation view of the \'roles\' of a " - "System is defined by instantiating a specific subclass " - "of System, or by properties in a subclass, or both. For " - "example, the purpose of a ComputerSystem is defined " - "using the Dedicated and OtherDedicatedDescription " - "properties." )] - string Roles[]; - - [Description ( - "OtherIdentifyingInfo captures additional data, beyond " - "System Name information, that could be used to identify " - "a ComputerSystem. One example would be to hold the Fibre " - "Channel World-Wide Name (WWN) of a node. Note that if " - "only the Fibre Channel name is available and is unique " - "(able to be used as the System key), then this property " - "would be NULL and the WWN would become the System key, " - "its data placed in the Name property." ), - ArrayType ( "Indexed" ), - MaxLen ( 256 ), - ModelCorrespondence { "CIM_System.IdentifyingDescriptions" }] - string OtherIdentifyingInfo[]; - - [Description ( - "An array of free-form strings providing explanations and " - "details behind the entries in the OtherIdentifying Info " - "array. Note, each entry of this array is related to the " - "entry in OtherIdentifyingInfo that is located at the " - "same index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_System.OtherIdentifyingInfo" }] - string IdentifyingDescriptions[]; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SystemComponent.mof b/build/vendor/dmtf_mof/Core/CIM_SystemComponent.mof deleted file mode 100644 index 919ea405..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SystemComponent.mof +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SystemComponent -// ================================================================== - [Association, Aggregation, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::CoreElements" ), - Description ( - "CIM_SystemComponent is a specialization of the CIM_Component " - "association that establishes \'part of\' relationships between " - "a System and any ManagedSystemElements of which it is " - "composed. \n" - "Use this association with caution when using it instead of a " - "subclass such as SystemDevice or a peer association such as " - "HostedService. This class is very broadly defined, which can " - "lead to erroneous use. For example, Access Points that are " - "dependent on (and hosted on) a System are NOT Components of " - "the System. The System is not made up of any AccessPoint " - "\'parts\', which is why a Dependency association, " - "HostedAccessPoint, was defined. Similarly, a PhysicalPackage " - "is not a \'part\' of a System, because the physical element " - "exists independently of any internal components, software, and " - "so on. In fact, again, a Dependency relationship is true where " - "a ComputerSystem is Dependent on its packaging, as described " - "by the ComputerSystemPackage association." )] -class CIM_SystemComponent : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Description ( "The parent System in the Association." )] - CIM_System REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The child element that is a component of a System." )] - CIM_ManagedSystemElement REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SystemConfiguration.mof b/build/vendor/dmtf_mof/Core/CIM_SystemConfiguration.mof deleted file mode 100644 index 0cb93a72..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SystemConfiguration.mof +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Deprecate -// class -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SystemConfiguration -// ================================================================== - [Deprecated { "CIM_ScopedSettingData", "CIM_SystemSetting" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Settings" ), - Description ( - "Note: Similar to the deprecation of CIM_Configuration, this " - "peer class is also deprecated in favor of aggregating " - "instances of Setting or SettingData into \"higher-level\" " - "Settings or SettingData objects using the ConcreteComponent " - "association. \n" - "Deprecated description: CIM_SystemConfiguration represents the " - "general concept of a CIM_Configuration that is scoped by a " - "System. This class is a peer of CIM_Configuration because the " - "key structure of Configuration is currently defined and cannot " - "be modified with additional properties." )] -class CIM_SystemConfiguration : CIM_ManagedElement { - - [Deprecated { "CIM_SystemSetting.SystemCreationClassName" }, - Key, Description ( - "Note: The use of this element is deprecated. Deprecated " - "description: The CreationClassName of the scoping " - "system." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.CreationClassName" )] - string SystemCreationClassName; - - [Deprecated { "CIM_SystemSetting.SystemName" }, - Key, Description ( - "Note: The use of this element is deprecated. Deprecated " - "description: The Name of the scoping system." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.Name" )] - string SystemName; - - [Deprecated { "CIM_SystemSetting.CreationClassName" }, - Key, Description ( - "Note: The use of this element is deprecated. Deprecated " - "description: CreationClassName indicates the name of the " - "class or the subclass used in the creation of an " - "instance. When used with the other key properties of " - "this class, this property allows all instances of this " - "class and its subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Deprecated { "CIM_ScopedSettingData.InstanceID", - "CIM_SystemSetting.SettingID" }, - Key, Description ( - "The label by which the Configuration object is known." ), - MaxLen ( 256 )] - string Name; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SystemDevice.mof b/build/vendor/dmtf_mof/Core/CIM_SystemDevice.mof deleted file mode 100644 index 6b2bd64e..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SystemDevice.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SystemDevice -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Device" ), - Description ( - "LogicalDevices can be aggregated by a System. This " - "relationship is made explicit by the SystemDevice association." )] -class CIM_SystemDevice : CIM_SystemComponent { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The parent system in the Association." )] - CIM_System REF GroupComponent; - - [Override ( "PartComponent" ), - Weak, Description ( - "The LogicalDevice that is a component of a System." )] - CIM_LogicalDevice REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SystemPackaging.mof b/build/vendor/dmtf_mof/Core/CIM_SystemPackaging.mof deleted file mode 100644 index 736b39e0..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SystemPackaging.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SystemPackaging -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Physical" ), - Description ( - "Similar to the way that LogicalDevices are \'Realized\' by " - "PhysicalElements, Systems can be associated with specific " - "packaging or PhysicalElements. This association explicitly " - "defines the relationship between a System and its packaging." )] -class CIM_SystemPackaging : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "The PhysicalElements that provide the packaging of a System." - )] - CIM_PhysicalElement REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The System whose packaging is described." )] - CIM_System REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SystemSetting.mof b/build/vendor/dmtf_mof/Core/CIM_SystemSetting.mof deleted file mode 100644 index 03d59e5d..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SystemSetting.mof +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SystemSetting -// ================================================================== - [Abstract, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Settings" ), - Description ( - "CIM_SystemSetting represents the general concept of a " - "CIM_Setting that is scoped by a System." )] -class CIM_SystemSetting : CIM_Setting { - - [Key, Description ( - "The CreationClassName of the scoping system." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.CreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The Name of the scoping system." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.Name" )] - string SystemName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Override ( "SettingID" ), - MaxLen ( 256 )] - string SettingID; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SystemSettingContext.mof b/build/vendor/dmtf_mof/Core/CIM_SystemSettingContext.mof deleted file mode 100644 index d01930ad..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SystemSettingContext.mof +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Deprecate -// class -// Update of -// descriptions based on Tech Edit review. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SystemSettingContext -// ================================================================== - [Association, Deprecated { "CIM_ConcreteComponent" }, - Aggregation, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Core::Settings" ), - Description ( - "Note: The Configuration and SystemConfiguration classes are " - "deprecated in lieu of using a ConcreteComponent relationship " - "to indicate a hierarchy of Settings or SettingData instances. " - "Therefore, the aggregation of SystemSettings into System " - "Configurations is replaced by the ConcreteComponent " - "relationship between instances of Settings and SettingData. \n" - "Deprecated description: This relationship associates " - "System-specific Configuration objects with System-specific " - "Setting objects, similar to the SettingContext association." )] -class CIM_SystemSettingContext { - - [Deprecated { "CIM_ConcreteComponent.GroupComponent" }, - Key, Aggregate, Description ( - "Note: The use of this element is deprecated. Deprecated " - "description: The Configuration object that aggregates " - "the Setting." )] - CIM_SystemConfiguration REF Context; - - [Deprecated { "CIM_ConcreteComponent.PartComponent" }, - Key, Description ( - "Note: The use of this element is deprecated. Deprecated " - "description: An aggregated Setting." )] - CIM_SystemSetting REF Setting; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SystemSpecificCollection.mof b/build/vendor/dmtf_mof/Core/CIM_SystemSpecificCollection.mof deleted file mode 100644 index 5f3c7681..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SystemSpecificCollection.mof +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Core::Collection" ), - Description ( - "SystemSpecificCollection represents the general concept of a " - "collection that is scoped (or contained) by a System. It " - "represents a Collection that has meaning only in the context " - "of a System, a Collection whose elements are restricted by the " - "definition of the System, or both of these types of " - "Collections. This meaning is explicitly described by the " - "(required) association, HostedCollection. \n" - "An example of a SystemSpecificCollection is a Fibre Channel " - "zone that collects network ports, port groupings, and aliases " - "(as required by a customer) in the context of an AdminDomain. " - "The Collection is not a part of the domain, but merely an " - "arbitrary grouping of the devices and other Collections in the " - "domain. In other words, the context of the Collection is " - "restricted to the domain, and its members are also limited by " - "the domain." )] -class CIM_SystemSpecificCollection : CIM_Collection { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. To ensure uniqueness within the " - "NameSpace, the value of InstanceID should be constructed " - "using the following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon " - "\':\', and where must include a unique name. It " - "can be a copyrighted, trademarked, or otherwise unique " - "name that is owned by the business entity that is " - "creating or defining the InstanceID. Or, it could be a " - "registered ID that is assigned to the business entity by " - "a recognized global authority.(This requirement is " - "similar to the _ structure of " - "Schema class names.) In addition, to ensure uniqueness " - " must not contain a colon (\':\'). When using " - "this algorithm, the first colon to appear in InstanceID " - "must appear between and . \n" - " is chosen by the business entity and should " - "not be re-used to identify different underlying " - "(real-world) elements. If the above \'preferred\' " - "algorithm is not used, the defining entity must ensure " - "that the resulting InstanceID is not re-used as any of " - "InstanceIDs produced by this or other providers for the " - "NameSpace of this instance. \n" - "For DMTF-defined instances, the \'preferred\' algorithm " - "must be used with the set to \'CIM\'." )] - string InstanceID; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SystemStatisticalInformation.mof b/build/vendor/dmtf_mof/Core/CIM_SystemStatisticalInformation.mof deleted file mode 100644 index b4ce6c2d..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SystemStatisticalInformation.mof +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SystemStatisticalInformation -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::Statistics" ), - Description ( - "Statistical information associated with a System object or one " - "of its subclasses." )] -class CIM_SystemStatisticalInformation : CIM_StatisticalInformation { - - [Key, Description ( "The scoping System\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.CreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The scoping System\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.Name" )] - string SystemName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Override ( "Name" ), - Description ( - "The Name property, inherited from " - "StatisticalInformation, serves as part of the object " - "key." ), - MaxLen ( 256 )] - string Name; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_SystemStatistics.mof b/build/vendor/dmtf_mof/Core/CIM_SystemStatistics.mof deleted file mode 100644 index d29d136f..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_SystemStatistics.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SystemStatistics -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Core::Statistics" ), - Description ( - "SystemStatistics relates the SystemStatisticalInformation " - "class to the System to which it applies." )] -class CIM_SystemStatistics : CIM_Statistics { - - [Override ( "Stats" ), - Weak, Description ( "The statistical object." )] - CIM_SystemStatisticalInformation REF Stats; - - [Override ( "Element" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The System to which the statistics apply." )] - CIM_System REF Element; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_TimeService.mof b/build/vendor/dmtf_mof/Core/CIM_TimeService.mof deleted file mode 100644 index 905c9416..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_TimeService.mof +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::Service" ), - Description ( - "The TimeService manages time (retrieves or sets time) for one " - "or more elements in a system. All elements to which the " - "Service applies are associated using ServiceAffectsElement." )] -class CIM_TimeService : CIM_Service { - - - [Description ( - "This method gets or sets the time for the specified element." - ), - ValueMap { "0", "1", "2", "3", "4", "5", "6..32767", - "32768..65535" }, - Values { "Success", "Not Supported", "Unknown", "Timeout", - "Failed", "Invalid Parameter", "DMTF Reserved", - "Vendor Specific" }] - uint32 ManageTime( - [IN, Description ( - "Indicates whether the request is to get (TRUE) or " - "set (FALSE) the time for the specified element." )] - boolean GetRequest, - [IN, OUT, Description ( - "The current date and time. On input, this value is " - "the time that is set on the specified element, if " - "the GetRequest input parameter is TRUE. Otherwise, " - "the input time is ignored. On output, this value " - "is the time as it is known by the element." )] - datetime TimeData, - [Required, IN, Description ( - "A reference to the ManagedElement whose time is " - "retrieved or set. This reference is necessary " - "because the TimeService might apply to multiple " - "elements simultaneously. The referenced element " - "must be associated with the Service using the " - "ServiceAffectsElement relationship." )] - CIM_ManagedElement REF ManagedElement); - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_View.mof b/build/vendor/dmtf_mof/Core/CIM_View.mof deleted file mode 100644 index 33f3dd26..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_View.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2010 DMTF. All rights reserved. - [Abstract, Version ( "2.26.0" ), - UMLPackagePath ( "CIM::Core::CoreElements" ), - Description ( - "View is an abstract class that provides a common superclass " - "for classes providing de-normalized, aggregate representations " - "of managed resources. The definition of each sub-class will " - "include properties propagated from the the graph of classes " - "that are used to model the resource in the normalized view. " - "The classes may be resource classes or associations. The " - "definition of how a value is propagated (i.e. source class and " - "value transformations) is required to be specified. \n" - "Sub-classes may be explicitly constrained to be read only. If " - "a sub-class is not constrained as read only, the designers are " - "strongly encouraged to carefully consider the data " - "synchronization and consistencies issues that may result. The " - "ElementView association may be used to find the instances that " - "form the normalized view of the managed resource." )] -class CIM_View : CIM_ManagedElement { - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_VirtualEthernetSwitchSettingData.mof b/build/vendor/dmtf_mof/Core/CIM_VirtualEthernetSwitchSettingData.mof deleted file mode 100644 index 1a3bf154..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_VirtualEthernetSwitchSettingData.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2010 DMTF. All rights reserved. - [Version ( "2.26.0" ), - UMLPackagePath ( "CIM::Core::Virtualization" ), - Description ( - "CIM_VirtualEthernetSwitchSettingData specializes " - "CIM_VirtualSystemSettingDatato add the specific properties " - "required to define a virtual Ethernet switch." )] -class CIM_VirtualEthernetSwitchSettingData : CIM_VirtualSystemSettingData { - - [Description ( "A list of VLANIds that this switch can access" )] - string VLANConnection[]; - - [Description ( - "A list of host resource pools to be associated or that " - "are currentlyassociated with the Ethernet Switch for the " - "purpose of the allocation of Ethernet connections " - "between a virtual machine and an Ethernet switch Each " - "non-Null value of the AssoicatedResourcePool property " - "shall conformto the production " - "WBEM_URI_UntypedInstancePath as defined in DSP0207" )] - string AssociatedResourcePool[]; - - [Description ( - "This property specifies the number of unique MAC " - "addresses that can be learnedby the switch to support " - "MAC Address Learning, as defined in the IEEE 802.1 " - "standard" )] - uint32 MaxNumMACAddress; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_VirtualSystemManagementCapabilities.mof b/build/vendor/dmtf_mof/Core/CIM_VirtualSystemManagementCapabilities.mof deleted file mode 100644 index 914b8019..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_VirtualSystemManagementCapabilities.mof +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.23.0" ), - UMLPackagePath ( "CIM::Core::Virtualization" ), - Description ( - "Capabilities of a CIM_VirtualSystemManagementService." )] -class CIM_VirtualSystemManagementCapabilities : CIM_EnabledLogicalElementCapabilities { - - [Description ( - "Enumeration of strings each designating a type of " - "virtual system that the implementation supports.\n" - "The value of each non-NULL array element shall conform " - "to the format defined for the " - "CIM_VirtualSystemSettingData.VirtualSystemType property." ), - ModelCorrespondence { - "CIM_VirtualSystemSettingData.VirtualSystemType" }] - string VirtualSystemTypesSupported[]; - - [Description ( - "Enumeration of method identifiers each identifying a " - "method of class CIM_VirtualSystemManagementService that " - "is supported synchronously by the implementation." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", "10", - "..", "32767..65535" }, - Values { "DefineSystemSupported", "DestroySystemSupported", - "DestroySystemConfigurationSupported", - "ModifyResourceSettingsSupported", - "ModifySystemSettingsSupported", - "RemoveResourcesSupported", - "SelectSystemConfigurationSupported", - "SnapshotSystemSupported", "AddResourcesSupported", - "DMTF Reserved", "Vendor Reserved" }] - uint16 SynchronousMethodsSupported[]; - - [Description ( - "Enumeration of method identifiers each identifying a " - "method of class CIM_VirtualSystemManagementService that " - "is supported asynchronously by the implementation." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", "10", - "..", "32767..65535" }, - Values { "DefineSystemSupported", "DestroySystemSupported", - "DestroySystemConfigurationSupported", - "ModifyResourceSettingsSupported", - "ModifySystemSettingsSupported", - "RemoveResourcesSupported", - "SelectSystemConfigurationSupported", - "SnapshotSystemSupported", "AddResourcesSupported", - "DMTF Reserved", "Vendor Reserved" }] - uint16 AsynchronousMethodsSupported[]; - - [Description ( - "Enumeration of indication identifiers each identifying " - "an indication that is supported by the implementation.\n" - "VirtualSystemStateChangeIndicationsSupported indicates " - "whether or not the implementation supports notification " - "on state changes of CIM_ComputerSystem instances " - "representing virtual systems.\n" - "VirtualResourceStateChangeIndicationsSupported indicates " - "whether or not the implementation supports notification " - "on state changes of CIM_LogicalDevice instances " - "representing resources of virtual systems.\n" - "ConcreteJobStateChangeIndicationsSupported indicates " - "whether or not the implementation supports notification " - "on state changes of CIM_ConcreteJob instances." ), - ValueMap { "2", "3", "4", "..", "32767..65535" }, - Values { "VirtualResourceStateChangeIndicationsSupported", - "ConcreteJobStateChangeIndicationsSupported", - "VirtualSystemStateChangeIndicationsSupported", - "DMTF Reserved", "Vendor Reserved" }] - uint16 IndicationsSupported[]; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_VirtualSystemManagementService.mof b/build/vendor/dmtf_mof/Core/CIM_VirtualSystemManagementService.mof deleted file mode 100644 index c9295a0b..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_VirtualSystemManagementService.mof +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::Virtualization" ), - Description ( - "Service to define and manipulate virtual systems and their components" - )] -class CIM_VirtualSystemManagementService : CIM_Service { - - - [Description ( - "Adds resources to a virtual system configuration\n" - ".When applied to a \"state\" virtual system " - "configuration, as a side effect resources are added to " - "the active virtual system." ), - ValueMap { "0", "1", "2", "3", "4", "..", "4096", - "4097..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Failed", "Timeout", "Invalid Parameter", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Method Reserved", "Vendor Specific" }] - uint32 AddResourceSettings( - [Description ( - "Reference to the affected virtual system configuration." - )] - CIM_VirtualSystemSettingData REF AffectedConfiguration, - [Description ( - "Array of strings each containing one embedded " - "instance of class " - "CIM_ResourceAllocationSettingData that describes " - "the virtual aspects of a virtual resource to be " - "added to the virtual system." ), - EmbeddedInstance ( "CIM_ResourceAllocationSettingData" ), - ArrayType ( "Indexed" )] - string ResourceSettings[], - [In ( false ), Out, Description ( - "Array of references to instances of class " - "CIM_ResourceAllocationSettingData representing " - "virtual aspects of the added virtual resources." ), - ArrayType ( "Indexed" )] - CIM_ResourceAllocationSettingData REF ResultingResourceSettings[], - [In ( false ), Out, Description ( - "If the operation is long running, then optionally " - "a job may be returned. In this case, the instances " - "of class CIM_ResourceAllocationSettingData " - "representing the added resource settings are " - "available via association CIM_ConreteComponent " - "from the instance of class " - "CIM_VirtualSystemSettingData representing the " - "affected virtual system configuration." )] - CIM_ConcreteJob REF Job); - - [Description ( - "Defines a virtual system.\n" - "Input that is not completely specified may be filled out " - "with default values." ), - ValueMap { "0", "1", "2", "3", "4", "..", "4096", - "4097..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Failed", "Timeout", "Invalid Parameter", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Method Reserved", "Vendor Specific" }] - uint32 DefineSystem( - [Description ( - "String containing an embedded instance of class " - "CIM_VirtualSystemSettingData that is used to " - "define attributes of the virtual system to be " - "created." ), - EmbeddedInstance ( "CIM_VirtualSystemSettingData" )] - string SystemSettings, - [Description ( - "Array of strings each containing an embedded " - "instance of class " - "CIM_ResourceAllocationSettingData that describes " - "the virtual aspects of a virtual resource to be " - "created in the scope of the new virtual system." ), - EmbeddedInstance ( "CIM_ResourceAllocationSettingData" ), - ArrayType ( "Indexed" )] - string ResourceSettings[], - [Description ( - "Reference to an instance of class " - "CIM_VirtualSystemSettingData object that is the " - "top level object of a reference virtual system " - "configuration. The reference configuration is used " - "to complement the configuration of the new virtual " - "system if parameters SystemSettings and " - "ResourceSettings did not provide respective " - "information." )] - CIM_VirtualSystemSettingData REF ReferenceConfiguration, - [In ( false ), Out, Description ( - "If a virtual computer system is successfully " - "defined, a reference to an instance of class " - "CIM_ComputerSystem that represents the newly " - "defined virtual computer system is returned." )] - CIM_ComputerSystem REF ResultingSystem, - [In ( false ), Out, Description ( - "If the operation is long running, then optionally " - "a job may be returned. In this case, the instance " - "of class CIM_ComputerSystem representing the new " - "virtual systemis presented via association " - "CIM_AffectedJobElementwith property " - "AffectedElement refering to the new instance of " - "class CIM_ComputerSystem and property " - "ElementEffects set to 5 (Create)." )] - CIM_ConcreteJob REF Job); - - [Description ( - "Destroys a virtual system.\n" - "The referenced virtual system is destroyed, including " - "any elements scoped by it. Virtual resources are " - "returned to their resource pools, which may imply the " - "destruction of those resources (implementation " - "dependent). If the virtual system is active when the " - "operation is invoked, it is first deactivated and then " - "destroyed. If snapshots were created from the virtual " - "system, these are destroyed as well." ), - ValueMap { "0", "1", "2", "3", "4", "5", "..", "4096", - "4097..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Failed", "Timeout", "Invalid Parameter", "Invalid State", - "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Method Reserved", "Vendor Specific" }] - uint32 DestroySystem( - [Description ( - "Reference to an instance of class " - "CIM_ComputerSystem representing the virtual " - "computer system that it to be destroyed." )] - CIM_ComputerSystem REF AffectedSystem, - [In ( false ), Out, Description ( - "If the operation is long running, then optionally " - "a job may be returned." )] - CIM_ConcreteJob REF Job); - - [Description ( - "Modifies virtual resource settings.\n" - "When applied to parts of a \"current\" virtual system " - "configuration, as a side effect resources of the active " - "virtual system may be modified." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", - "4097..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Failed", "Timeout", "Invalid Parameter", "Invalid State", - "Incompatible Parameters", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Method Reserved", "Vendor Specific" }] - uint32 ModifyResourceSettings( - [Description ( - "Array of strings each containing an embedded " - "instance of class " - "CIM_ResourceAllocationSettingData that describes " - "modifications to the virtual aspects of an " - "existing virtual resource. All instances must have " - "a valid InstanceID in order to identify the " - "virtual resource setting to be modified." ), - EmbeddedInstance ( "CIM_ResourceAllocationSettingData" ), - ArrayType ( "Indexed" )] - string ResourceSettings[], - [In ( false ), Out, Description ( - "Array of references to instances of class " - "Cim_ResourceAllocationSettingData representing " - "virtual aspects of the modified virtual resources." ), - ArrayType ( "Indexed" )] - CIM_ResourceAllocationSettingData REF ResultingResourceSettings[], - [In ( false ), Out, Description ( - "If the operation is long running, then optionally " - "a job be returned. In this case, the instances of " - "class CIM_ResourceAllocationSettingData " - "representing the modified resource settings are " - "available via association CIM_ConreteComponent " - "from the instance of class " - "CIM_VirtualSystemSettingData representing the " - "affected virtual system configuration." )] - CIM_ConcreteJob REF Job); - - [Description ( - "Modifies virtual system settings.\n" - "When applied to the system settings of a \"current\" " - "virtual system configuration, as a side effect the " - "virtual system instance may be modified." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", - "4097..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Failed", "Timeout", "Invalid Parameter", "Invalid State", - "Incompatible Parameters", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Method Reserved", "Vendor Specific" }] - uint32 ModifySystemSettings( - [Description ( - "String containing an instance of class " - "CIM_VirtualSystemSettingData that is used to " - "modify the settings of the virtual system. The " - "instance must have a valid InstanceID in order to " - "identify the virtual system setting to be " - "modified." ), - EmbeddedInstance ( "CIM_VirtualSystemSettingData" )] - string SystemSettings, - [In ( false ), Out, Description ( - "If the operation is long running, then optionally " - "a job may be returned." )] - CIM_ConcreteJob REF Job); - - [Description ( - "Removes virtual resource settings from a virtual system configuration.\n" - "When applied to parts of a \"current\" virtual system " - "configuration, as a side effect resources of the active " - "virtual system may be removed." ), - ValueMap { "0", "1", "2", "3", "4", "5", "..", "4096", - "4097..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Failed", "Timeout", "Invalid Parameter", "Invalid State", - "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Method Reserved", "Vendor Specific" }] - uint32 RemoveResourceSettings( - [Description ( - "Array of references to instances of class " - "CIM_ResourceAllocationSettingData where each " - "instance represents the settings of a virtual " - "resource within a virtual system configuration " - "that are to be removed." )] - CIM_ResourceAllocationSettingData REF ResourceSettings[], - [In ( false ), Out, Description ( - "If the operation is long running, then optionally " - "a job my be returned." )] - CIM_ConcreteJob REF Job); - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_VirtualSystemSettingData.mof b/build/vendor/dmtf_mof/Core/CIM_VirtualSystemSettingData.mof deleted file mode 100644 index 190a3dd3..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_VirtualSystemSettingData.mof +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) 2010 DMTF. All rights reserved. - [Version ( "2.25.0" ), - UMLPackagePath ( "CIM::System::SystemElements" ), - Description ( - "CIM_VirtualSystemSettingData defines the virtual aspects of a " - "virtual system through a set of virtualization specific " - "properties. CIM_VirtualSystemSettingData is also used as the " - "top level class of virtual system configurations. Virtual " - "system configurations model configuration information about " - "virtual systems and their components. A virtual system " - "configuration consists of one top-level instance of class " - "CIM_VirtualSystemSettingData that aggregates a number of " - "instances of class CIM_ResourceAllocationSettingData, using " - "association CIM_ConcreteComponent. \n" - "Virtual system configurations may for example be used to " - "reflect configurations of \n" - "- virtual systems that are defined at a virtualization " - "platform, \n" - "- virtual systems that are currently active, \n" - "- input requests to create new virtual systems, \n" - "- input requests to modify existing virtual systems, or \n" - "- snapshots of virtual systems." )] -class CIM_VirtualSystemSettingData : CIM_SettingData { - - [Description ( - "VirtualSystemIdentifier shall reflect a unique name for " - "the system as it is used within the virtualization " - "platform. Note that the VirtualSystemIdentifier is not " - "the hostname assigned to the operating system instance " - "running within the virtual system, nor is it an IP " - "address or MAC address assigned to any of its network " - "ports. \n" - "On create requests VirtualSystemIdentifier may contain " - "implementation specific rules (like simple patterns or " - "regular expresssion) that may be interpreted by the " - "implementation when assigning a VirtualSystemIdentifier." )] - string VirtualSystemIdentifier; - - [Description ( - "VirtualSystemType shall reflect a particular type of " - "virtual system.\n" - "The property value shall conform to this format (in " - "ABNF): vs-type = dmtf-value / other-org-value / " - "legacy-value; dmtf-value = \"DMTF:\" defining-org \":\" " - "org-vs-type; other-org-value = defining-org \":\" org-vs-type;\n" - "Where: dmtf-value:\n" - "is a property value defined by DMTF and is defined in " - "the description of this property. other-org-value:\n" - "is a property value defined by a business entity other " - "than DMTF and is not defined in the description of this " - "property. legacy-value:\n" - "is a property value defined by a business entity other " - "than DMTF and is not defined in the description of this " - "property. These values are permitted but recommended to " - "be deprecated over time. defining-org:\n" - "is an identifier for the business entity that defines " - "the virtual system type. It shall include a copyrighted, " - "trademarked, or otherwise unique name that is owned by " - "that business entity. It shall not be \"DMTF\" and shall " - "not contain a colon (:). org-vs-type:\n" - "is an identifier for the virtual system type within the " - "defining business entity. It shall be unique within the " - "defining-org. It may use any character allowed for CIM " - "strings, except for the following: U0000-U001F (Unicode " - "C0 controls) U0020 (space), note that the reason is that " - "OVF allows for multiple space-separated vs-type values " - "in this property. U007F (Unicode C0 controls) " - "U0080-U009F (Unicode C1 controls)\n" - "If there is a need to structure the value into segments, " - "the segments should be separated with a single colon (:).\n" - "The values of this property shall be processed case " - "sensitively. They are intended to be processed " - "programmatically (instead of being a display name) and " - "should be short.\n" - "As stated in the class description, instances of this " - "class may be used for various purposes. A management " - "application intending to use an instance of this class " - "as input parameter to an operation that creates or " - "modifies a virtual system should first determine the set " - "of valid virtual system types that are supported by the " - "virtualization platform hosting the virtual system by " - "inspecting values of array property " - "VirtualSystemTypesSupported of the instance of class " - "CIM_VirtualSystemManagementCapabilities that describes " - "the capabilities of the virtualization platform.\n" - "The following DMTF values are defined: DMTF:unknown - " - "the virtual system type is unknown or cannot be " - "determined" )] - string VirtualSystemType; - - [Description ( - "End-user supplied notes that are related to the virtual system." - )] - string Notes[]; - - [Description ( - "Time when the virtual system configuration was created." )] - datetime CreationTime; - - [Description ( - "Unique id of the virtual system configuration. Note that " - "the ConfigurationID is different from the InstanceID as " - "it is assigned by the implementation to a virtual system " - "or a virtual system configuration. It is not a key, and " - "the same value may occur within more than one instance." )] - string ConfigurationID; - - [Description ( - "Filepath of a directory where information about the " - "virtual system configuration is stored.Format shall be " - "URI based on RFC 2079." )] - string ConfigurationDataRoot; - - [Description ( - "Filepath of a file where information about the virtual " - "system configuration is stored. A relative path appends " - "to the value of the ConfigurationDataRoot " - "property.Format shall be URI based on RFC 2079." )] - string ConfigurationFile; - - [Description ( - "Filepath of a directory where information about virtual " - "system snapshots is stored. A relative path appends to " - "the value of the ConfigurationDataRoot property.Format " - "shall be URI based on RFC 2079." )] - string SnapshotDataRoot; - - [Description ( - "Filepath of a directory where suspend related " - "information about the virtual system is stored. A " - "relative path appends to the value of the " - "ConfigurationDataRoot property.Format shall be URI based " - "on RFC 2079." )] - string SuspendDataRoot; - - [Description ( - "Filepath of a directory where swapfiles of the virtual " - "system are stored. A relative path appends to the value " - "of the ConfigurationDataRoot property.Format shall be " - "URI based on RFC 2079." )] - string SwapFileDataRoot; - - [Description ( - "Filepath of a directory where log information about the " - "virtual system is stored. A relative path appends to the " - "value of the ConfigurationDataRoot property.Format shall " - "be URI based on RFC 2079." )] - string LogDataRoot; - - [Description ( - "Action to take for the virtual system when the host is started." - ), - ValueMap { "2", "3", "4", ".." }, - Values { "None", "Restart if previously active", - "Always startup", "DMTF Reserved" }] - uint16 AutomaticStartupAction; - - [Description ( - "Delay applicable to startup action. The value shall be " - "in the interval variant of the datetime datatype." )] - datetime AutomaticStartupActionDelay; - - [Description ( - "Number indicating the relative sequence of virtual " - "system activation when the host system is started. A " - "lower number indicates earlier activation. If one or " - "more configurations show the same value, the sequence is " - "implementation dependent. A value of 0 indicates that " - "the sequence is implementation dependent." )] - uint16 AutomaticStartupActionSequenceNumber; - - [Description ( - "Action to take for the virtual system when the host is shut down." - ), - ValueMap { "2", "3", "4", ".." }, - Values { "Turn Off", "Save state", "Shutdown", "DMTF Reserved" }] - uint16 AutomaticShutdownAction; - - [Description ( - "Action to take for the virtual system when the software " - "executed by the virtual system fails. Failures in this " - "case means a failure that is detectable by the host " - "platform, such as a non-interuptable wait state " - "condition." ), - ValueMap { "2", "3", "4", ".." }, - Values { "None", "Restart", "Revert to snapshot", - "DMTF Reserved" }] - uint16 AutomaticRecoveryAction; - - [Description ( - "Filepath of a file where recovery relateded information " - "of the virtual system is stored.Format shall be URI " - "based on RFC 2079." )] - string RecoveryFile; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_VirtualSystemSnapshotCapabilities.mof b/build/vendor/dmtf_mof/Core/CIM_VirtualSystemSnapshotCapabilities.mof deleted file mode 100644 index 7180fc07..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_VirtualSystemSnapshotCapabilities.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::Virtualization" ), - Description ( - "The CIM_VirtualSystemSnapshotCapabilities class defines the " - "properties that describe the capabilities of a virtual system " - "with respect to snapshots, like for example the set of " - "snapshot operations that it enabled for a virtual system." )] -class CIM_VirtualSystemSnapshotCapabilities : CIM_Capabilities { - - [Description ( - "Enumeration of snapshot type identifiers each " - "designating a snapshot type that is presently enabled " - "for the virtual system that is referenced via the " - "CIM_ElementCapabilities association." ), - ValueMap { "2", "3", "..", "32768..65535" }, - Values { "Full Snapshot", "Disk Snapshot", "DMTF Reserved", - "Vendor Specific" }, - ModelCorrespondence { - "CIM_VirtualSystemSnapshotService.CreateSnapshot(SnapshotType)", - "CIM_VirtualSystemSnapshotServiceCapabilities.SnapshotTypesSupported" }] - uint16 SnapshotTypesEnabled[]; - - [Description ( - "Boolean flag indicating the capability of the snapshot " - "service to notify the guest operation system that runs " - "within the virtual system about the imminent snapshot " - "operation." )] - boolean GuestOSNotificationEnabled; - - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_VirtualSystemSnapshotService.mof b/build/vendor/dmtf_mof/Core/CIM_VirtualSystemSnapshotService.mof deleted file mode 100644 index 2bae501b..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_VirtualSystemSnapshotService.mof +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::Virtualization" ), - Description ( - "Service to create, apply and destroy snapshots of virtual systems." - )] -class CIM_VirtualSystemSnapshotService : CIM_Service { - - - [Description ( "Creates a snapshot of a virtual system." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", - "4097..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Failed", "Timeout", "Invalid Parameter", "Invalid State", - "Invalid Type", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Method Reserved", "Vendor Specific" }] - uint32 CreateSnapshot( - [In, Description ( - "Reference to the affected virtual system." )] - CIM_ComputerSystem REF AffectedSystem, - [In, Description ( "Parameter settings." ), - EmbeddedInstance ( "CIM_SettingData" )] - string SnapshotSettings, - [In, Description ( - "Requested snapshot type:\n" - "Full Snapshot: Complete snapshot of the virtual system.\n" - "Disk Snapshot: Snapshot of virtual system disks." ), - ValueMap { "2", "3", "..", "32768..65535" }, - Values { "Full Snapshot", "Disk Snapshot", - "DMTF Reserved", "Vendor Specific" }, - ModelCorrespondence { - "CIM_VirtualSystemSnapshotCapabilities.SnapshotTypesEnabled", - "CIM_VirtualSystemSnapshotServiceCapabilities.SnapshotTypesSupported" }] - uint16 SnapshotType, - [In, Out, Description ( - "Resulting virtual system snapshot" )] - CIM_VirtualSystemSettingData REF ResultingSnapshot, - [In, Out, Description ( - "If the operation is long running, then optionally " - "a job may be returned. In this case, the instance " - "of the CIM_VirtualSystemSettingData class " - "representing the new virtual system snapshot is " - "presented via the CIM_AffectedJobElement " - "association with the value of the AffectedElement " - "property referring to the new instance of the " - "CIM_VirtualSystemSettingData class representing " - "the virtual system snapshot and and the value of " - "the ElementEffects set to 5 (Create)." )] - CIM_ConcreteJob REF Job); - - [Description ( - "Destroy an existing virtual system snapshot.This method " - "may as a side effect destroy other snapshots that are " - "dependent on the affected snapshot." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", - "4097..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Failed", "Timeout", "Invalid Parameter", "Invalid State", - "Invalid Type", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Method Reserved", "Vendor Specific" }] - uint32 DestroySnapshot( - [In, Description ( - "Reference to the affected virtual system snapshot." )] - CIM_VirtualSystemSettingData REF AffectedSnapshot, - [In, Out, Description ( - "If the operation is long running, then optionally " - "a job may be returned." )] - CIM_ConcreteJob REF Job); - - [Description ( - "Apply a virtual system snapshot to the virtual system " - "that it was created from." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", - "4097..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Failed", "Timeout", "Invalid Parameter", "Invalid State", - "Invalid Type", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Method Reserved", "Vendor Specific" }] - uint32 ApplySnapshot( - [In, Description ( - "Reference to the virtual system snapshot." )] - CIM_VirtualSystemSettingData REF Snapshot, - [In, Out, Description ( - "If the operation is long running, then optionally " - "a job may be returned." )] - CIM_ConcreteJob REF Job); - -}; diff --git a/build/vendor/dmtf_mof/Core/CIM_VirtualSystemSnapshotServiceCapabilities.mof b/build/vendor/dmtf_mof/Core/CIM_VirtualSystemSnapshotServiceCapabilities.mof deleted file mode 100644 index ed9699bd..00000000 --- a/build/vendor/dmtf_mof/Core/CIM_VirtualSystemSnapshotServiceCapabilities.mof +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::Virtualization" ), - Description ( - "The CIM_VirtualSystemSnapshotServiceCapabilities class defines " - "the properties that describe the capabilities of a virtual " - "system snapshot service, like for example which snapshot " - "operations are implemented." )] -class CIM_VirtualSystemSnapshotServiceCapabilities : CIM_Capabilities { - - [Description ( - "Enumeration of method identifiers each identifying a " - "method of class CIM_VirtualSystemSnapshotService that is " - "supported synchronously by the implementation." ), - ValueMap { "2", "3", "4", ".." }, - Values { "CreateSnapshotSupported", - "DestroySnapshotSupported", "ApplySnapshotSupported", - "DMTF Reserved" }] - uint16 SynchronousMethodsSupported[]; - - [Description ( - "Enumeration of method identifiers each identifying a " - "method of class CIM_VirtualSystemSnapshotService that is " - "supported synchronously and asynchronously by the " - "implementation." ), - ValueMap { "2", "3", "4", ".." }, - Values { "CreateSnapshotSupported", - "DestroySnapshotSupported", "ApplySnapshotSupported", - "DMTF Reserved" }] - uint16 AynchronousMethodsSupported[]; - - [Description ( - "Supported snapshot types:\n" - "Full Snapshot: Complete snapshot of the virtual system.\n" - "Disk Snapshot: Snapshot of virtual system disks." ), - ValueMap { "2", "3", "..", "32768..65535" }, - Values { "Full Snapshot", "Disk Snapshot", "DMTF Reserved", - "Vendor Specific" }, - ModelCorrespondence { - "CIM_VirtualSystemSnapshotService.CreateSnapshot(SnapshotType)", - "CIM_VirtualSystemSnapshotCapabilities.SnapshotTypesEnabled" }] - uint16 SnapshotTypesSupported[]; - - -}; diff --git a/build/vendor/dmtf_mof/Database/CIM_AssociatedDatabaseSystem.mof b/build/vendor/dmtf_mof/Database/CIM_AssociatedDatabaseSystem.mof deleted file mode 100644 index 05fa72a5..00000000 --- a/build/vendor/dmtf_mof/Database/CIM_AssociatedDatabaseSystem.mof +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Database::System" ), - Description ( - "The CIM_AssociatedDatabaseSystem association identifies the " - "database system that is responsible for the database." )] -class CIM_AssociatedDatabaseSystem : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Description ( - "The database system that is responsible for the database." )] - CIM_DatabaseSystem REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The database." )] - CIM_CommonDatabase REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Database/CIM_CommonDatabase.mof b/build/vendor/dmtf_mof/Database/CIM_CommonDatabase.mof deleted file mode 100644 index a95c8cb0..00000000 --- a/build/vendor/dmtf_mof/Database/CIM_CommonDatabase.mof +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Database::System" ), - Description ( - "A database is a collection of interrelated data, treated as a " - "unit, which is organized into one or more schemas. The " - "CIM_CommonDatabase class defines the properties that are " - "common across database model and vendor implementations for " - "the database entity that is represented by the unit of " - "interrelated data. \n" - "Databases are manipulated through one or more database " - "services. More detailed information on database services is " - "provided in the description of the CIM_DatabaseService class." )] -class CIM_CommonDatabase : CIM_EnabledLogicalElement { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. In order to ensure uniqueness within the " - "NameSpace, the value of InstanceID SHOULD be constructed " - "using the following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon " - "\':\', and where MUST include a copyrighted, " - "trademarked or otherwise unique name that is owned by " - "the business entity creating/defining the InstanceID, or " - "is a registered ID that is assigned to the business " - "entity by a recognized global authority. (This is " - "similar to the _ structure of " - "Schema class names.) In addition, to ensure uniqueness " - " MUST NOT contain a colon (\':\'). When using " - "this algorithm, the first colon to appear in InstanceID " - "MUST appear between and . \n" - " is chosen by the business entity and SHOULD " - "not be re-used to identify different underlying " - "(real-world) elements. If the above \'preferred\' " - "algorithm is not used, the defining entity MUST assure " - "that the resultant InstanceID is not re-used across any " - "InstanceIDs produced by this or other providers for this " - "instance\'s NameSpace. \n" - "For DMTF defined instances, the \'preferred\' algorithm " - "MUST be used with the set to \'CIM\'." )] - string InstanceID; - - [Description ( - "The version number for the database. If the version is " - "not relevant, the value for this property must be set to " - "NULL." ), - MappingStrings { "MIB.IETF|RDBMS-MIB.rdbmsDbInfoVersion" }] - string DatabaseVersion; - - [Description ( - "The date and time when the latest complete or partial " - "backup of the database was performed. If the database " - "has never been backed up, then this property has no " - "meaning. The value of this property should be set to all " - "zeros if the database has never been backed up." ), - MappingStrings { "MIB.IETF|RDBMS-MIB.rdbmsDbInfoLastBackup" }] - datetime LastBackup; - - [Description ( - "The estimated amount of disk space (in units) that has " - "been reserved for database use." ), - MappingStrings { "MIB.IETF|RDBMS-MIB.rdbmsDbInfoSizeAllocated" }] - uint32 SizeAllocated; - - [Description ( - "The units for the SizeAllocated property and the " - "SizeUsed property that is defined in the " - "CIM_CommonDatabaseStatistics class. Mapping is 1 - " - "Bytes, 2 - Kilobytes, 3 - Megabytes, 4 - Gigabytes and 5 " - "- Terabytes." ), - ValueMap { "1", "2", "3", "4", "5" }, - Values { "Bytes", "Kilobyes", "Megabytes", "Gigabytes", - "Terabytes" }, - MappingStrings { "MIB.IETF|RDBMS-MIB.rdbmsDbInfoSizeUnits" }] - uint16 SizeUnits; - - -}; diff --git a/build/vendor/dmtf_mof/Database/CIM_CommonDatabaseCapabilities.mof b/build/vendor/dmtf_mof/Database/CIM_CommonDatabaseCapabilities.mof deleted file mode 100644 index 2dff51f8..00000000 --- a/build/vendor/dmtf_mof/Database/CIM_CommonDatabaseCapabilities.mof +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Database::Storage" ), - Description ( - "Properties in this class represent general, high-level " - "database capabilities that may be supported by a common " - "database. For example, the ability for a database to support " - "recoverability, replication, parallelism, or clustering would " - "be specified in this class. Detailed settings, such as the " - "minimum and maximum number of parallel servers for a database " - "that supports parallelism, would be defined in the " - "CIM_DatabaseParameter class. \n" - "This information is tied to the CommonDatabase using the " - "ElementCapabilities association." )] -class CIM_CommonDatabaseCapabilities : CIM_Capabilities { - - [Description ( - "This property identifies the supported recoverability " - "modes for the associated CommonDatabase." ), - ValueMap { "1", "2", "3", "4" }, - Values { "Other", "Recoverable", "Non-Recoverable", - "Rebuildable" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_CommonDatabaseCapabilities.OtherRecoverabilityOptions" }] - uint16 RecoverabilityOptions[]; - - [Description ( - "This property contains additional recovery information " - "for the CommonDatabase. This property must be specified " - "when the Recoverability property is \"Other\"." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_CommonDatabaseCapabilities.RecoverabilityOptions" }] - string OtherRecoverabilityOptions[]; - - -}; diff --git a/build/vendor/dmtf_mof/Database/CIM_CommonDatabaseSettingData.mof b/build/vendor/dmtf_mof/Database/CIM_CommonDatabaseSettingData.mof deleted file mode 100644 index f29f8b70..00000000 --- a/build/vendor/dmtf_mof/Database/CIM_CommonDatabaseSettingData.mof +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Database::Storage" ), - Description ( - "This class contains the specific settings that identify the " - "degree to which the high-level database capabilities that are " - "defined in the CIM_CommonDatabaseCapabilities class are " - "supported by a CommonDatabase. Specific values for the " - "properties in this class must correspond to a valid capability " - "that has been defined in the CIM_CommonDatabaseCapabilities " - "class. \n" - "Instances in the CIM_CommonDatabaseSettingData class are tied " - "to the CommonDatabase using the ElementSettingData " - "association." )] -class CIM_CommonDatabaseSettingData : CIM_SettingData { - - [Write, Description ( - "RecoverabilityOption indicates the specific " - "recoverability mode for the associated CommonDatabase." ), - ValueMap { "1", "2", "3", "4" }, - Values { "Other", "Recoverable", "Non-Recoverable", - "Rebuildable" }, - ModelCorrespondence { - "CIM_CommonDatabaseSettingData.OtherRecoverabilityOption", - "CIM_CommonDatabaseCapabilities.RecoverabilityOptions" }] - uint16 RecoverabilityOption; - - [Write, Description ( - "This property contains additional recovery information " - "for the CommonDatabase. This property must be specified " - "when the Recoverability property is \"Other\"." ), - ModelCorrespondence { - "CIM_CommonDatabaseSettingData.RecoverabilityOption", - "CIM_CommonDatabaseCapabilities.OtherRecoverabilityOptions" }] - string OtherRecoverabilityOption; - - -}; diff --git a/build/vendor/dmtf_mof/Database/CIM_CommonDatabaseStatistics.mof b/build/vendor/dmtf_mof/Database/CIM_CommonDatabaseStatistics.mof deleted file mode 100644 index 672fb451..00000000 --- a/build/vendor/dmtf_mof/Database/CIM_CommonDatabaseStatistics.mof +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Database::Statistics" ), - Description ( - "The CIM_CommonDatabaseStatistics class contains the current " - "statistics for a database." )] -class CIM_CommonDatabaseStatistics : CIM_StatisticalData { - - [Description ( - "The estimated amount of disk space (in units) that is " - "currently used by the database." ), - MappingStrings { "MIB.IETF|RDBMS-MIB.rdbmsDbInfoSizeUsed" }] - uint32 SizeUsed; - - -}; diff --git a/build/vendor/dmtf_mof/Database/CIM_DatabaseAdministrator.mof b/build/vendor/dmtf_mof/Database/CIM_DatabaseAdministrator.mof deleted file mode 100644 index 91114cd7..00000000 --- a/build/vendor/dmtf_mof/Database/CIM_DatabaseAdministrator.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Database::System" ), - Description ( - "The DatabaseAdministrator association identifies a UserEntity " - "as a database administrator of a CommonDatabase. \n" - "The current version of CIM includes a UserContact class that " - "is concrete and extends from UserEntity. UserContact contains " - "the information that is needed to contact a database " - "administrator. The DatabaseAdministrator association should be " - "implemented through the UserContact class in favor of creating " - "a vendor-specific concrete class to define database " - "administrator contact information for the database " - "administrator." )] -class CIM_DatabaseAdministrator : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The database that is being administered." )] - CIM_CommonDatabase REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The user entity that is responsible for the " - "administration of the database." )] - CIM_UserEntity REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Database/CIM_DatabaseControlFile.mof b/build/vendor/dmtf_mof/Database/CIM_DatabaseControlFile.mof deleted file mode 100644 index 8a1bddff..00000000 --- a/build/vendor/dmtf_mof/Database/CIM_DatabaseControlFile.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.10" ), - UMLPackagePath ( "CIM::Database::Storage" ), - Description ( - "CIM_DatabaseControlFile is a specialization of the " - "CIM_Dependency association that identifies the LogicalFiles " - "that provide control information for a Database. As an " - "example, some implementations of CommonDatabase assign " - "particular significance to a small number of files that " - "contain database state and configuration information. This " - "association is intended to provide an efficient means of " - "identifying these files." )] -class CIM_DatabaseControlFile : CIM_HostedDependency { - - [Override ( "Antecedent" ), - Min ( 0 ), - Max ( 1 ), - Description ( - "The parent CommonDatabase for the associated control file." - )] - CIM_CommonDatabase REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The LogicalFile that contains control information for " - "the associated CommonDatabase." )] - CIM_LogicalFile REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Database/CIM_DatabaseFile.mof b/build/vendor/dmtf_mof/Database/CIM_DatabaseFile.mof deleted file mode 100644 index 96336c40..00000000 --- a/build/vendor/dmtf_mof/Database/CIM_DatabaseFile.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Aggregation, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Database::Storage" ), - Description ( - "DatabaseFile captures the relationship between a database and " - "the supporting files that make up the database as well as the " - "purpose served by the files within the context of the " - "database." )] -class CIM_DatabaseFile : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The single CommonDatabase instance that uses the " - "referenced LogicalFile." )] - CIM_CommonDatabase REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "One of any number of LogicalFile instances that are " - "utilized by the referenced CommonDatabase." )] - CIM_LogicalFile REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Database/CIM_DatabaseParameter.mof b/build/vendor/dmtf_mof/Database/CIM_DatabaseParameter.mof deleted file mode 100644 index db0e6c7c..00000000 --- a/build/vendor/dmtf_mof/Database/CIM_DatabaseParameter.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Abstract, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Database::System" ), - Description ( - "The CIM_DatabaseParameter class extends from " - "CIM_ScopedSettingData. This abstract class specifies the " - "database and service configuration parameters that are common " - "across database models and vendor implementations. \n" - "The SNMP RDBMS MIB defines database and service parameters as " - "name and value pair combinations rather than as specific named " - "properties of the class. In order to maintain a consistent " - "mapping between SNMP and CIM, a CIM_SNMPDatabaseParameter " - "class extends from the abstract CIM_DatabaseParameter class, " - "which defines parameters as a name value pair. \n" - "In a future release of the database MOF, the working group can " - "choose to create a new class that extends from " - "CIM_DatabaseParameter, which specifies properties for common " - "configuration parameters. \n" - "The parameter context for a specific database or database " - "service is established by collecting the SettingData using the " - "CIM_ElementProfile association. \n" - "The SNMP RDBMS MIB defines generic tables that contain rows of " - "named database or service configuration entries. A parameter " - "entry contains a parameter name, description, and value. See " - "the description of the rdbmsDbParamTable or the " - "rdbmsSrvParamTable for more information on the SNMP " - "definitions." )] -class CIM_DatabaseParameter : CIM_ScopedSettingData { - - -}; diff --git a/build/vendor/dmtf_mof/Database/CIM_DatabaseResourceStatistics.mof b/build/vendor/dmtf_mof/Database/CIM_DatabaseResourceStatistics.mof deleted file mode 100644 index 16efa45a..00000000 --- a/build/vendor/dmtf_mof/Database/CIM_DatabaseResourceStatistics.mof +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Database::Statistics" ), - Description ( - "The CIM_DatabaseServiceStatistics class contains the current " - "statistics for a database resource. This class maps to the " - "database and server-limited resource tables in the SNMP RDBMS " - "MIB as defined in RFC 1697." )] -class CIM_DatabaseResourceStatistics : CIM_StatisticalData { - - [Description ( - "The current value of a limited database resource." ), - Counter, MappingStrings { - "MIB.IETF|RDBMS-MIB.rdbmsDbLimitedResourceCurrent" }] - uint64 Current; - - [Description ( - "The maximum value that the database resource can attain." ), - MappingStrings { - "MIB.IETF|RDBMS-MIB.rdbmsDbLimitedResourceLimit" }] - uint64 Limit; - - [Description ( - "The number of database resources used, as measured from " - "the time when the first service was started for the " - "database. \n" - "Other external factors, such as an explicit reset of the " - "statistics might cause this measurement to begin at a " - "later point in time." ), - Counter, MappingStrings { - "MIB.IETF|RDBMS-MIB.rdbmsDbLimitedResourceHighwater" }] - uint64 Highwater; - - [Description ( - "The number of times that the system wanted to exceed the " - "database resource limit that is measured from the time " - "when the first service was started for the database." ), - Counter, MappingStrings { - "MIB.IETF|RDBMS-MIB.rdbmsDbLimitedResourceFailures" }] - uint32 Failures; - - -}; diff --git a/build/vendor/dmtf_mof/Database/CIM_DatabaseSegment.mof b/build/vendor/dmtf_mof/Database/CIM_DatabaseSegment.mof deleted file mode 100644 index a9495072..00000000 --- a/build/vendor/dmtf_mof/Database/CIM_DatabaseSegment.mof +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Database::Storage" ), - Description ( - "A database segment is a logical storage entity that is " - "composed of one or more storage extents, each of which can " - "have one or more database blocks. Database segments have " - "various types depending on their purpose. Note that the order " - "of extents within a DatabaseSegment should be represented in " - "the BasedOn dependency of CIM_StorageExtent using the " - "BasedOn.OrderIndex attribute." )] -class CIM_DatabaseSegment : CIM_StorageExtent { - - [Override ( "Purpose" ), - Description ( - "The purpose of this segment within the context of the " - "database. A value of \"Data\" indicates that this " - "segment contains data for database area. A value of " - "\"Data Partition\" indicates that this segment contains " - "a portion of a partitioned data area. A value of \"Data " - "Cluster\" indicates that this segment contains a portion " - "of a clustered database area. A value of \"Index\" " - "indicates that this segment contains index information. " - "A value of \"Index Partition\" indicates that this " - "segment contains a portion of a partitioned index. A " - "value of \"LOB\" indicates that this segment is used to " - "hold large objects such as Binary Large Object (BLOB) or " - "Character Large Object (CLOB) entities. A value of \"LOB " - "Index\" indicates that this segment is used to hold " - "index information relevant to a \"LOB\" segment. A value " - "of \"Undo\" indicates that this segment contains undo or " - "rollback information that might be used to reverse " - "operations that are applied to a database. A value of " - "\"Snapshot\" indicates that this segment is used to " - "represent a portion of the database at a previous " - "point-in-time. A value of \"Temp\" indicates that this " - "segment is used as temporary space for database " - "operations. A value of \"Other\" indicates that the " - "segment is used for something other than any of the " - "listed purposes and requires further description in the " - "OtherPurpose attribute. Using a value of \"Other\" would " - "generally indicate a need to extend the model to include " - "an additional purpose." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11" }, - Values { "Other", "Data", "Data Partition", "Data Cluster", - "Index", "Index Partition", "LOB", "LOB Index", "Undo", - "Snapshot", "Temp" }, - ModelCorrespondence { "CIM_DatabaseSegment.OtherPurpose" }] - string Purpose; - - [Description ( - "The purpose of this segment when the Purpose attribute " - "has a value of \"Other\". This attribute should be null " - "in all other cases." ), - ModelCorrespondence { "CIM_DatabaseSegment.Purpose" }] - string OtherPurpose; - - -}; diff --git a/build/vendor/dmtf_mof/Database/CIM_DatabaseSegmentSettingData.mof b/build/vendor/dmtf_mof/Database/CIM_DatabaseSegmentSettingData.mof deleted file mode 100644 index 5dcc1ce1..00000000 --- a/build/vendor/dmtf_mof/Database/CIM_DatabaseSegmentSettingData.mof +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Database::Storage" ), - Description ( - "This class defines the attributes that affect the growth of a " - "DatabaseSegment. The attributes are tied to the " - "DatabaseSegment through an ElementSettingData association. \n" - "This class can also be used to specify the default settings " - "for all DatabaseSegment instances that are created within a " - "CommonDatabase through an ElementSettingData association to " - "the CommonDatabase. Processes that create new instances of " - "DatabaseSegment and the associated setting data should check " - "for a DatabaseSegmentSettingData instance that is associated " - "with the CommonDatabase and should create a new instance of " - "DatabaseSegmentSettingData that is specific to the " - "DatabaseSegment only if the default settings need to be " - "overridden or frozen for the specific DatabaseSegment " - "instance." )] -class CIM_DatabaseSegmentSettingData : CIM_ScopedSettingData { - - [Write, Description ( - "The size, in bytes, of the first extent to be allocated " - "when a database segment is created." ), - Units ( "Bytes" ), - PUnit ( "byte" )] - uint64 InitialExtentSize; - - [Write, Description ( - "The total number of extents to be allocated when the " - "database segment is created. This setting allows for a " - "large initial segment allocation at creation time, even " - "if contiguous space is not available." )] - uint64 MinimumExtents; - - [Write, Description ( - "The upper limit on the number of extents that can be " - "allocated for the segment." )] - uint64 MaximumExtents; - - [Write, Description ( - "The size, in bytes, to be allocated for the next " - "incremental extent for the segment. A NextExtentSize of " - "0 indicates that the size of incremental extents will be " - "determined based on the value of PercentIncrease." ), - Units ( "Bytes" ), - MinValue ( 0 ), - ModelCorrespondence { - "CIM_DatabaseSegmentSettingData.PercentIncrease" }, - PUnit ( "byte" )] - uint64 NextExtentSize; - - [Write, Description ( - "The percentage by which the next incremental extent will " - "grow over the previously allocated size of all extents " - "for the segment. A PercentIncrease of 0 indicates that " - "all incremental extents will be the same size, as " - "specified by NextExtentSize. This value is ignored and " - "should be set to 0 if NextExtentSize has a value other " - "than 0." ), - MinValue ( 0 ), - ModelCorrespondence { - "CIM_DatabaseSegmentSettingData.NextExtentSize" }] - uint16 PercentIncrease; - - [Write, Description ( - "A freelist is a list of the free blocks that are " - "associated with a database segment. The freelist is used " - "to determine which segments are eligible for accepting " - "data when a new insert or update request is processed. " - "The NumberOfFreeLists setting identifies the number of " - "freelists that are defined for the database segment. " - "This value is typically set to the expected number of " - "concurrent inserts for the segment." )] - uint32 NumberOfFreeLists; - - -}; diff --git a/build/vendor/dmtf_mof/Database/CIM_DatabaseService.mof b/build/vendor/dmtf_mof/Database/CIM_DatabaseService.mof deleted file mode 100644 index 551b701a..00000000 --- a/build/vendor/dmtf_mof/Database/CIM_DatabaseService.mof +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Database::System" ), - Description ( - "Database services perform tasks for a database. Examples of " - "tasks that are performed by a database service include " - "providing user access to the database, performing data and " - "metadata manipulation, database administration, and " - "maintenance operations. \n" - "One or more database services can perform tasks for a " - "database. The database services can be located on the same " - "computer system as the database or on different computer " - "systems. Database services can be implemented as one or more " - "processes." )] -class CIM_DatabaseService : CIM_Service { - - [Description ( - "The date and time when the database service was last " - "started. If the database service has an " - "OperationalStatus of Stopped or Starting, then this " - "value is not meaningful and the contents must be set to " - "zeros." ), - MappingStrings { "MIB.IETF|RDBMS-MIB.rdbmsSrvInfoStartupTime" }] - datetime StartupTime; - - [Override ( "OperationalStatus" ), - Description ( - "This property contains the operational status of the " - "database service. \n" - "OK means that the database service is operational and " - "available for general use. \n" - "Stopped means that the service is unavailable and cannot " - "be used. \n" - "Service implies an administrative state of " - "unavailability. \n" - "Degraded means that the database service is operating at " - "a less than optimal level. \n" - "Starting means that the database service is in the " - "process of becoming operational. \n" - "These status values map to the RFC1697 OperStatus values " - "as follows: OK - UP, Stopped - DOWN, In Service - " - "HALTED, Stressed - CONGESTED, and Starting - RESTARTING. " - "Any additional status variables that are defined are " - "CIM-specific." ), - MappingStrings { "MIB.IETF|RDBMS-MIB.rdbmsSrvInfoOperStatus" }] - uint16 OperationalStatus[]; - - [Deprecated { "CIM_EnabledLogicalElement.TimeOfLastStateChange" }, - Description ( - "Note: The LastStatusChangeTime property is deprecated in " - "lieu of the TimeOfLastStateChange property that is " - "inherited from CIM_EnabledLogicalElement. \n" - "Deprecated description: The date and time when the " - "status of the database service last changed." ), - MappingStrings { "MIB.IETF|RDBMS-MIB.rdbmsSrvInfoLastChange" }] - datetime LastStatusChangeTime; - - [Override ( "TimeOfLastStateChange" ), - MappingStrings { "MIB.IETF|RDBMS-MIB.rdbmsSrvInfoLastChange" }] - datetime TimeOfLastStateChange; - - [Description ( - "The maximum number of active inbound connections that " - "can be concurrently opened on the service." ), - MappingStrings { - "MIB.IETF|RDBMS-MIB.rdbmsSrvInfoMaxInboundAssociations" }] - uint32 ConnectionLimit; - - -}; diff --git a/build/vendor/dmtf_mof/Database/CIM_DatabaseServiceStatistics.mof b/build/vendor/dmtf_mof/Database/CIM_DatabaseServiceStatistics.mof deleted file mode 100644 index 762395c6..00000000 --- a/build/vendor/dmtf_mof/Database/CIM_DatabaseServiceStatistics.mof +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Database::Statistics" ), - Description ( - "The CIM_DatabaseServiceStatistics class contains the current " - "statistics for a database service. These statistics are " - "counters that are relative to the start of the service or from " - "the time when a reset was issued." )] -class CIM_DatabaseServiceStatistics : CIM_StatisticalData { - - [Description ( - "The date and time when the most recent inbound activity " - "was observed for the database service. A value of all " - "zeros indicates that no inbound activity has taken place " - "since the service was started." ), - MappingStrings { - "MIB.IETF|RDBMS-MIB.rdbmsSrvInfoLastInboundActivity" }] - datetime LastActivity; - - [Description ( - "The number of active inbound connections that are " - "currently using the service." ), - Counter, MappingStrings { - "MIB.IETF|RDBMS-MIB.rdbmsSrvInfoapplInboundAssociation" }] - uint64 ActiveConnections; - - [Description ( - "The total number of inbound connections to the service " - "since it was started." ), - Counter, MappingStrings { - "MIB.IETF|RDBMS-MIB.rdbmsSrvInfoapplAccumulatedInboundAssociations" }] - uint64 CumulativeConnections; - - [Description ( - "The total number of inbound connections that were " - "rejected by the service since it was started." ), - Counter, MappingStrings { - "MIB.IETF|RDBMS-MIB.rdbmsSrvInfoapplRejectedInboundAssociations" }] - uint64 RejectedConnections; - - [Description ( - "The total number of transactions that have been " - "completed by a commit or abort. Some database " - "operations, such as read-only queries, might not create " - "a transaction." ), - Counter, MappingStrings { - "MIB.IETF|RDBMS-MIB.rdbmsSrvInfoFinishedTransactions" }] - uint64 CompletedTransactions; - - [Description ( - "The total number of database file reads that were issued " - "by the service since it was started." ), - Counter, MappingStrings { - "MIB.IETF|RDBMS-MIB.rdbmsSrvInfoDiskReads" }] - uint64 DiskReads; - - [Description ( - "The total number of database file writes that were " - "issued by the service since it was started." ), - Counter, MappingStrings { - "MIB.IETF|RDBMS-MIB.rdbmsSrvInfoDiskWrites" }] - uint64 DiskWrites; - - [Description ( - "The total number of logical database file reads that " - "were issued by the service since it was started." ), - Counter, MappingStrings { - "MIB.IETF|RDBMS-MIB.rdbmsSrvInfoLogicalReads" }] - uint64 LogicalReads; - - [Description ( - "The total number of logical database file writes that " - "were issued by the service since it was started. A " - "logical write is a count of the number of times that " - "parts of database files have been marked dirty to " - "indicate that they need to be written to disk." ), - Counter, MappingStrings { - "MIB.IETF|RDBMS-MIB.rdbmsSrvInfoLogicalWrites" }] - uint64 LogicalWrites; - - [Description ( - "The total number of database pages that have been read " - "by the service since it was started." ), - Counter, MappingStrings { - "MIB.IETF|RDBMS-MIB.rdbmsSrvInfoPageReads" }] - uint64 PageReads; - - [Description ( - "The total number of database pages that have been " - "written by the service since it was started." ), - Counter, MappingStrings { - "MIB.IETF|RDBMS-MIB.rdbmsSrvInfoPageWrites" }] - uint64 PageWrites; - - [Description ( - "The total number of times that the database requested " - "disk space and it was not available since the service " - "was started." ), - Counter, MappingStrings { - "MIB.IETF|RDBMS-MIB.rdbmsSrvInfoDiskOutOfSpaces" }] - uint64 DiskSpaceUnavailable; - - [Description ( - "The total number of requests that have been received by " - "the service since it was started." ), - Counter, MappingStrings { - "MIB.IETF|RDBMS-MIB.rdbmsSrvInfoHandledRequests" }] - uint64 RequestsHandled; - - [Description ( - "The total number of receive operations made by the " - "service during request processing since it was started." ), - Counter, MappingStrings { - "MIB.IETF|RDBMS-MIB.rdbmsSrvInfoRequestRecvs" }] - uint64 RequestsReceived; - - [Description ( - "The total number of send operations made by the service " - "during request processing since it was started." ), - Counter, MappingStrings { - "MIB.IETF|RDBMS-MIB.rdbmsSrvInfoRequestsSent" }] - uint64 RequestsSent; - - [Description ( - "The maximum number of active inbound connections that " - "have been concurrently using the service since it was " - "started." ), - Counter, MappingStrings { - "MIB.IETF|RDBMS-MIB.rdbmsSrvInfoHighwaterInboundAssociations" }] - uint64 HighwaterConnections; - - -}; diff --git a/build/vendor/dmtf_mof/Database/CIM_DatabaseStorage.mof b/build/vendor/dmtf_mof/Database/CIM_DatabaseStorage.mof deleted file mode 100644 index f4f5593f..00000000 --- a/build/vendor/dmtf_mof/Database/CIM_DatabaseStorage.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Aggregation, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Database::Storage" ), - Description ( - "Databases are comprised of a collection of logical storage " - "areas that are represented by instances of the " - "DatabaseStorageArea class. The DatabaseStorage class " - "represents the relationship between a CommonDatabase and the " - "storage areas that it uses." )] -class CIM_DatabaseStorage : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The database that makes use of the associated DatabaseStorageArea." - )] - CIM_CommonDatabase REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "A DatabaseStorageArea that is used by the associated " - "CommonDatabase. A DatabaseStorageArea must only be used " - "by a single database." )] - CIM_DatabaseStorageArea REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Database/CIM_DatabaseStorageArea.mof b/build/vendor/dmtf_mof/Database/CIM_DatabaseStorageArea.mof deleted file mode 100644 index 50bf3449..00000000 --- a/build/vendor/dmtf_mof/Database/CIM_DatabaseStorageArea.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Database::Storage" ), - Description ( - "Databases as modeled by instances of the CommonDatabase class " - "are comprised of a collection of logical storage areas that " - "are represented by instances of the DatabaseStorageArea class. \n" - "Database storage areas allow the administrator to logically " - "organize the content of the database. This class extends from " - "FileSystem and uses the inherited associations to represent " - "the internal structure of the database." )] -class CIM_DatabaseStorageArea : CIM_FileSystem { - - [Description ( - "A Boolean value that indicates the ownership of this " - "StorageArea. A value of true indicates that this " - "StorageArea is owned by the DatabaseSystem and contains " - "system information. A value of false indicates that this " - "is a user StorageArea that contains data." )] - boolean IsSystemArea; - - [Description ( - "A timestamp that represents the date and time of the " - "last successful backup of the DatabaseStorageArea. This " - "property should be set to a value of 0, in interval " - "format (00000000000000.000000:000), if it is not known " - "whether a backup has ever been completed." )] - datetime LastBackup; - - -}; diff --git a/build/vendor/dmtf_mof/Database/CIM_DatabaseSystem.mof b/build/vendor/dmtf_mof/Database/CIM_DatabaseSystem.mof deleted file mode 100644 index 206b9419..00000000 --- a/build/vendor/dmtf_mof/Database/CIM_DatabaseSystem.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Database::System" ), - Description ( - "A database environment is composed of a database system (the " - "application system represented by this class), one or more " - "database services, and one or more databases. See the " - "descriptions of CIM_DatabaseService and CIM_CommonDatabase for " - "get more detailed information about database services and " - "databases. \n" - "Each separately manageable database system should have an " - "instance in this class. This class can be used: \n" - "- to determine the software that belongs to the database " - "system. \n" - "- to perform database system-wide management operations, such " - "as stopping all the databases that were created by the " - "database system for maintenance purposes. \n" - "- to view runtime statistics in the context of a database " - "system. \n" - "Many of the management capabilities that are needed to " - "represent a database system as an application system have " - "already been modeled in the CIM_ApplicationSystem class from " - "which CIM_DatabaseSystem extends. CIM_DatabaseSystem provides " - "a logical entity to define the relationships that are specific " - "to the database management domain." )] -class CIM_DatabaseSystem : CIM_ApplicationSystem { - - -}; diff --git a/build/vendor/dmtf_mof/Database/CIM_SNMPDatabaseParameter.mof b/build/vendor/dmtf_mof/Database/CIM_SNMPDatabaseParameter.mof deleted file mode 100644 index e97a3afd..00000000 --- a/build/vendor/dmtf_mof/Database/CIM_SNMPDatabaseParameter.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Database::System" ), - Description ( - "The CIM_SNMPDatabaseParameter class extends from " - "CIM_DatabaseParameter. This class is included in the CIM " - "database schema to provide explicit mapping to the way that " - "the SNMP MIB defines database and service parameters. More " - "information on the SNMP MIB parameters can be found in RFC " - "1697. \n" - "The SNMP RDBMS MIB defines generic tables that contain rows of " - "named database or service configuration entries. A parameter " - "entry contains a parameter name, description, and value. See " - "the description of the rdbmsDbParamTable or the " - "rdbmsSrvParamTable for more detailed information on the SNMP " - "definitions." )] -class CIM_SNMPDatabaseParameter : CIM_DatabaseParameter { - - [Description ( - "The value of a database or service parameter that is " - "represented as a string." ), - MappingStrings { "MIB.IETF|RDBMS-MIB.rdbmsDbParamCurrValue" }] - string ParameterValue; - - -}; diff --git a/build/vendor/dmtf_mof/Database/CIM_ServiceAvailableToDatabase.mof b/build/vendor/dmtf_mof/Database/CIM_ServiceAvailableToDatabase.mof deleted file mode 100644 index 1b5f8020..00000000 --- a/build/vendor/dmtf_mof/Database/CIM_ServiceAvailableToDatabase.mof +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Database::System" ), - Description ( - "The CIM_ServiceAvailableToDatabase association relates " - "databases to the database services that are available for " - "database use." )] -class CIM_ServiceAvailableToDatabase : CIM_ServiceAvailableToElement { - - [Override ( "ServiceProvided" ), - Description ( - "The database service that is providing service." )] - CIM_DatabaseService REF ServiceProvided; - - [Override ( "UserOfService" ), - Description ( "The database that is being served." )] - CIM_CommonDatabase REF UserOfService; - - [Description ( - "The AvailableState property indicates the current state " - "of a database service regarding its ability to access a " - "specific database. A service can be actively using a " - "database (ACTIVE), or it can be waiting for a task to " - "perform (AVAILABLE), or the service can be less than " - "completely available for use by the database " - "(RESTRICTED), or the database is not accessible from " - "this service (UNAVAILABLE). Any service states that do " - "not match one of these values should specify (OTHER)." ), - ValueMap { "1", "2", "3", "4", "5" }, - Values { "Other", "Active", "Available", "Restricted", - "Unavailable" }, - MappingStrings { "MIB.IETF|RDBMS-MIB.rdbmsRelState" }, - ModelCorrespondence { - "CIM_ServiceAvailableToDatabase.OtherAvailableState" }] - uint16 AvailableState; - - [Description ( - "A string that describes the available state of the " - "service when the AvailableState property is set to 1 " - "(\"Other\"). This property must be set to NULL when " - "AvailableState is any value other than 1." ), - ModelCorrespondence { - "CIM_ServiceAvailableToDatabase.AvailableState" }] - string OtherAvailableState; - - [Description ( - "The time that the database was made active by this " - "service. \n" - "If the AvailableState property is not active, then the " - "value of this property must be set to 0." ), - MappingStrings { "MIB.IETF|RDBMS-MIB.rdbmsRelActiveTime" }] - datetime ActiveTime; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ADSLModem.mof b/build/vendor/dmtf_mof/Device/CIM_ADSLModem.mof deleted file mode 100644 index 47fd70a9..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ADSLModem.mof +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_ADSLModem -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Modems" ), - Description ( - "The ADSLModem class represents Modems of the DSL type = ADSL, " - "Asymmetric Digital Subscriber Line." )] -class CIM_ADSLModem : CIM_DSLModem { - - [Description ( - "Noise Margin of this Modem with respect to its received " - "signal, in tenths of dB." ), - Units ( "Tenths of Decibels" ), - PUnit ( "decibel * 10^-1" )] - uint32 NoiseMargin; - - [Description ( - "Measured difference in the total power transmitted by " - "the peer Modem and the total power received by this " - "Modem. This value is measured in tenths of dB." ), - Units ( "Tenths of Decibels" ), - Gauge, PUnit ( "decibel * 10^-1" )] - uint32 LineAttenuation; - - [Description ( - "Status indicates the current state of the connection " - "(line). The property holds a bit map that describes the " - "possible conditions. For example, \n" - "1) No Defect - There are no defects on the line; \n" - "2) Loss Of Framing - ATUR failure due to the inability " - "to receive a valid frame; \n" - "4) Loss Of Signal - ATUR failure due to the inability to " - "receive a signal; \n" - "8) Loss Of Power - ATUR failure due to loss of power; \n" - "32) Loss Of Signal Quality - Loss of Signal Quality is " - "declared when the NoiseMargin falls below the minimum " - "NoiseMargin, or the bit-error-rate exceeds 10^-7." ), - ValueMap { "1", "2", "4", "8", "32" }, - Values { "No Defect", "Loss Of Framing", "Loss Of Signal", - "Loss Of Power", "Loss Of Signal Quality" }] - uint32 LineState; - - [Description ( - "Measured total output power (in tenths of dB) " - "transmitted by this Modem." ), - Units ( "Tenths of Decibels" ), - Gauge, PUnit ( "decibel * 10^-1" )] - uint32 TotalOutputPower; - - [Description ( - "Indicates the maximum currently attainable data rate for " - "the Modem. This value will be equal to or greater than " - "the current line rate." ), - Units ( "Bits per Second" ), - PUnit ( "bit / second" )] - uint32 MaxDataRate; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AGPVideoController.mof b/build/vendor/dmtf_mof/Device/CIM_AGPVideoController.mof deleted file mode 100644 index c50d5ebf..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AGPVideoController.mof +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AGPVideoController -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( - "Capabilities and management of an AGPVideoController." )] -class CIM_AGPVideoController : CIM_VideoController { - - [Deprecated { "CIM_VideoController.AcceleratorCapabilities" }, - Description ( - "This property has been incorporated into the inherited " - "AcceleratorCapabilities property. Capabilities of the " - "AGP Graphics Controller. For example, the Device may " - "support multiple monitors, PCI Mastering and large " - "memory addresses. In this case, the values 3, 4 and 6 " - "would be written to the Capabilities array." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6" }, - Values { "Unknown", "Other", "PCI Fast Write", - "MultiMonitor Support", "PCI Mastering", - "Second Monochrome Adapter Support", - "Large Memory Address Support" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_AGPVideoController.CapabilityDescriptions" }] - uint16 Capabilities[]; - - [Description ( "Size of the non-local video memory in KB." ), - Units ( "KiloBytes" )] - uint32 NonlocalVideoMemorySize; - - [Description ( - "Width of the internal bus in the graphics Controller, in bits." - ), - Units ( "Bits" )] - uint32 LocalBusWidth; - - [Description ( - "An integer enumeration indicating the usage model of the " - "graphics Controller. Usage model indicates how the " - "Controller does manipulations of graphics surfaces, " - "textures, etc. in memory. DMA indicates that the " - "graphics Controller brings structures from the system " - "memory to its local memory to perform needed " - "manipulations or renderings. Execute specifies that the " - "graphics Controller can directly access a specified " - "region in main memory (called the graphics aperture) " - "using GART - Graphics Aperture Remapping Table. It then " - "performs manipulations in that range as if that whole " - "graphics aperture were part of its local memory. A value " - "of \"Both\" DMA and Execute models may also be " - "specified." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "Execute", "DMA", "Both" }] - uint16 UsageModel; - - [Description ( - "An integer enumeration indicating the data transfer rate " - "of the graphics Controller." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "1X", "2X", "4X" }] - uint16 DataTransferRate; - - [Description ( - "An integer enumeration indicating the addressing mode of " - "the graphics Controller." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Other", "Sideband", "Pipeline" }] - uint16 AddressingMode; - - [Description ( - "The maximum number of AGP Transaction requests that the " - "master (AGP Graphics Controller) is allowed to enqueue " - "into the target." )] - uint32 MaximumAGPCommandQueuePath; - - [Description ( - "The number of AGP Transaction that the core logic " - "(chipset) can accept into its transaction request queue " - "from the Controller." )] - uint32 MaxNumberOfPipelinedAGPTransactions; - - [Description ( "Size of the graphics aperture in KB." ), - Units ( "KiloBytes" )] - uint32 GraphicsApertureSize; - - [Description ( - "A string containing the AGP specification version to " - "which this graphics Controller conforms." )] - string AGPSpecificationVersionConformance; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AccessLabelReader.mof b/build/vendor/dmtf_mof/Device/CIM_AccessLabelReader.mof deleted file mode 100644 index cd5b7fc0..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AccessLabelReader.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AccessLabelReader -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageLib" ), - Description ( - "AccessLabelReader is used to indicate that one or more Label " - "Readers works in conjunction with MediaAccessDevices, to " - "identify PhysicalMedia before read/write." )] -class CIM_AccessLabelReader : CIM_AssociatedLabelReader { - - [Override ( "Antecedent" ), - Description ( "The LabelReader." )] - CIM_LabelReader REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The MediaAccessDevice that is dependent on the Reader Device." - )] - CIM_MediaAccessDevice REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AdapterActiveConnection.mof b/build/vendor/dmtf_mof/Device/CIM_AdapterActiveConnection.mof deleted file mode 100644 index db12382a..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AdapterActiveConnection.mof +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AdapterActiveConnection -// ================================================================== - [Association, Deprecated { "CIM_PortActiveConnection" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::NetworkAdapter" ), - Description ( - "Note: The use of the CIM_AdapterActiveConnection class has " - "been deprecated, because NetworkAdapter is deprecated. Instead " - "use the CIM_PortActiveConnection class. \n" - "Deprecated description: The AdapterActiveConnection " - "relationship indicates that a NetworkAdapter is using the " - "referenced PhysicalConnector to output to the network. This " - "relationship is important when the Adapter can choose to " - "output from one of several Connectors. The Connectors can be " - "associated with the NetworkAdapter in a Realizes relationship " - "but this is not required. This association provides additional " - "information (such as, \'in use for communication\') different " - "from Realizes." )] -class CIM_AdapterActiveConnection : CIM_Dependency { - - [Deprecated { "CIM_PortActiveConnection.Antecedent" }, - Override ( "Antecedent" ), - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The PhysicalConnector." )] - CIM_PhysicalConnector REF Antecedent; - - [Deprecated { "CIM_PortActiveConnection.Dependent" }, - Override ( "Dependent" ), - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The NetworkAdapter that " - "transmits using the Connector." )] - CIM_NetworkAdapter REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AggregatePExtent.mof b/build/vendor/dmtf_mof/Device/CIM_AggregatePExtent.mof deleted file mode 100644 index 54242064..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AggregatePExtent.mof +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AggregatePExtent -// ================================================================== - [Deprecated { "CIM_StorageExtent", "CIM_CompositeExtentBasedOn" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::SccExtents" ), - Description ( - "This class is deprecated in lieu of the generic StorageExtent " - "object and the ProtectedExtentBasedOn association. An " - "AggregatePExtent is used to model an SCC RAID implementation. " - "AggregatePExtents provide summary information about the " - "addressable logical blocks which are in the same " - "StorageRedundancyGroup and reside on the same storage device. " - "This is an alternative grouping for PhysicalExtents, when only " - "summary information is needed or when automatic configuration " - "is used." )] -class CIM_AggregatePExtent : CIM_StorageExtent { - - [Deprecated { "CIM_CompositeExtentBasedOn.NumberOfBlocks", - "CIM_StorageExtent.NumberOfBlocks" }, - Override ( "NumberOfBlocks" ), - Description ( - "Total number of blocks (including the check data blocks) " - "contained in this AggregatePExtent. The block size (an " - "inherited property) should be set to the same value as " - "for the MediaAccessDevice associated with this Extent." ), - MappingStrings { "MIF.DMTF|Aggregate Physical Extent|001.2" }] - uint64 NumberOfBlocks; - - [Deprecated { "CIM_CompositeExtentBasedOn.UnitsOfCheckData" }, - Description ( - "The number of blocks contained in this AggregatePExtent " - "to be used as check data. If this AggregatePExtent is " - "available, then this value shall be zero." ), - MappingStrings { "MIF.DMTF|Aggregate Physical Extent|001.3" }] - uint64 BlocksOfCheckData; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AggregatePSExtent.mof b/build/vendor/dmtf_mof/Device/CIM_AggregatePSExtent.mof deleted file mode 100644 index ba0b17ce..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AggregatePSExtent.mof +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AggregatePSExtent -// ================================================================== - [Deprecated { "CIM_StorageExtent", "CIM_CompositeExtentBasedOn" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::SccExtents" ), - Description ( - "Similar to AggregatePExtent, this class is deprecated in lieu " - "of the generic StorageExtent object and the " - "ProtectedExtentBasedOn association. An AggregatePSExtent is " - "used to model an SCC RAID implementation. AggregatePSExtents " - "define the number of addressable logical blocks on a single " - "storage device, excluding any logical blocks mapped as check " - "data. This is an alternative grouping for ProtectedSpace " - "Extents, when only summary information is needed or when " - "automatic configuration is used." )] -class CIM_AggregatePSExtent : CIM_StorageExtent { - - [Deprecated { "CIM_CompositeExtentBasedOn.NumberOfBlocks", - "CIM_StorageExtent.NumberOfBlocks" }, - Override ( "NumberOfBlocks" ), - Description ( - "Total number of user data blocks that are contained in " - "this Extent." ), - MappingStrings { - "MIF.DMTF|Aggregate Protected Space Extent|001.2" }] - uint64 NumberOfBlocks; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AggregatePSExtentBasedOnAggregatePExtent.mof b/build/vendor/dmtf_mof/Device/CIM_AggregatePSExtentBasedOnAggregatePExtent.mof deleted file mode 100644 index 6217632e..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AggregatePSExtentBasedOnAggregatePExtent.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AggregatePSExtentBasedOnAggregatePExtent -// ================================================================== - [Association, Deprecated { "CIM_ProtectedExtentBasedOn" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::SccExtents" ), - Description ( - "This association is deprecated in lieu of " - "ProtectedSpaceBasedOn, since AggregatePExtents and " - "AggregatePSExtents are themselves deprecated. The association " - "describes that AggregatePSExtents are BasedOn a single " - "AggregatePExtent." )] -class CIM_AggregatePSExtentBasedOnAggregatePExtent : CIM_BasedOn { - - [Deprecated { "CIM_ProtectedExtentBasedOn.Antecedent" }, - Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The AggregatePExtent." )] - CIM_AggregatePExtent REF Antecedent; - - [Deprecated { "CIM_ProtectedExtentBasedOn.Dependent" }, - Override ( "Dependent" ), - Description ( - "The AggregatePSExtent which is built on the Aggregate PExtent." - )] - CIM_AggregatePSExtent REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AggregatePSExtentBasedOnPExtent.mof b/build/vendor/dmtf_mof/Device/CIM_AggregatePSExtentBasedOnPExtent.mof deleted file mode 100644 index be286e03..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AggregatePSExtentBasedOnPExtent.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AggregatePSExtentBasedOnPExtent -// ================================================================== - [Association, Deprecated { "CIM_ProtectedExtentBasedOn" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::SccExtents" ), - Description ( - "This association is deprecated in lieu of " - "ProtectedSpaceBasedOn, since PhysicalExtents and " - "AggregatePSExtents are themselves deprecated. The association " - "describes that AggregatePSExtents are BasedOn a single " - "PhysicalExtent." )] -class CIM_AggregatePSExtentBasedOnPExtent : CIM_BasedOn { - - [Deprecated { "CIM_ProtectedExtentBasedOn.Antecedent" }, - Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The PhysicalExtent." )] - CIM_PhysicalExtent REF Antecedent; - - [Deprecated { "CIM_ProtectedExtentBasedOn.Dependent" }, - Override ( "Dependent" ), - Description ( - "The AggregatePSExtent which is built on the PhysicalExtent." - )] - CIM_AggregatePSExtent REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AggregateRedundancyComponent.mof b/build/vendor/dmtf_mof/Device/CIM_AggregateRedundancyComponent.mof deleted file mode 100644 index e8f5091a..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AggregateRedundancyComponent.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AggregateRedundancyComponent -// ================================================================== - [Association, Deprecated { "CIM_ExtentRedundancyComponent" }, - Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::SccExtents" ), - Description ( - "Describes the AggregatePExtent in a StorageRedundancyGroup. " - "However, there is no need for the specificity of this " - "association. It is deprecated in lieu of the generic " - "ExtentRedundancyComponent relationship, its superclass." )] -class CIM_AggregateRedundancyComponent : CIM_ExtentRedundancyComponent { - - [Deprecated { "CIM_ExtentRedundancyComponent.GroupComponent" }, - Aggregate, Override ( "GroupComponent" ), - Description ( "The StorageRedundancyGroup." )] - CIM_StorageRedundancyGroup REF GroupComponent; - - [Deprecated { "CIM_ExtentRedundancyComponent.PartComponent" }, - Override ( "PartComponent" ), - Description ( - "The AggregatePExtent participating in the RedundancyGroup." - )] - CIM_AggregatePExtent REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AlarmDevice.mof b/build/vendor/dmtf_mof/Device/CIM_AlarmDevice.mof deleted file mode 100644 index 1c171e99..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AlarmDevice.mof +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AlarmDevice -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::Sensors" ), - Description ( - "An AlarmDevice is a type of Device that emits audible or " - "visible indications related to a problem situation." )] -class CIM_AlarmDevice : CIM_LogicalDevice { - - [Description ( "Boolean indicating that the Alarm is audible." )] - boolean AudibleAlarm; - - [Description ( "Boolean indicating that the Alarm is visible." )] - boolean VisibleAlarm; - - [Description ( - "Boolean indicating that the Alarm causes motion of the Device." - )] - boolean MotionAlarm; - - [Description ( - "Urgency is an enumerated value that indicates the " - "relative frequency at which the Alarm flashes, vibrates " - "and/or emits audible tones." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6" }, - Values { "Unknown", "Other", "Not Supported", - "Informational", "Non-Critical", "Critical", - "Unrecoverable" }] - uint16 Urgency; - - [Description ( "The current state of the alarm." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Off", "Steady", "Alternating" }] - uint16 AlarmState; - - [Description ( - "True indicates that the audio of an AlarmState indicator " - "has been disabled (i.e. muted). A disabled state here " - "does not imply that the AlarmState is off." )] - boolean AudioIndicatorIsDisabled; - - [Description ( - "True indicates that the visual of an AlarmState " - "indicator has been disabled (i.e. dimmed). A disabled " - "state here does not imply that the AlarmState is off." )] - boolean VisualIndicatorIsDisabled; - - [Description ( - "True indicates that the motion of an AlarmState " - "indicator has been disabled (i.e. stopped). A disabled " - "state here does not imply that the AlarmState is off." )] - boolean MotionIndicatorIsDisabled; - - - [Description ( - "SetAlarmState is a method for defining the current state " - "of the Alarm. Its input parameter, RequestedAlarmState, " - "is specified using the Values list of AlarmDevice\'s " - "AlarmState property. SetAlarmState returns 0 if the " - "request is successfully implemented, 1 if the specified " - "RequestedAlarm State is not supported, and some other " - "value if any other error occurred. In a subclass, the " - "set of possible return codes should be specified using a " - "ValueMap qualifier on the method. The strings to which " - "the ValueMap contents are \'translated\' should be " - "specified as a Values array qualifier." )] - uint32 SetAlarmState( - [IN, Description ( "The desired state for the alarm." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Off", "Steady", "Alternating" }] - uint16 RequestedAlarmState); - - [Description ( - "SetAlarmIndicator is a method for enabling or disabling " - "the indicator of the AlarmState function, without " - "changing the current AlarmState. It has 3 input " - "parameters, Audio Indicator, VisualIndicator and " - "MotionIndicator. For all of the input parameters, a " - "value of 0 indicates no change to the AlarmState " - "indicator, 1 indicates Disable, and 2 indicates Enable. " - "The method returns 0 if the request is successfully " - "implemented, 1 if the specified request is not " - "supported, and some other value if any other error " - "occurred. In a subclass, the set of possible return " - "codes should be specified using a ValueMap qualifier on " - "the method. The strings to which the ValueMap contents " - "are \'translated\' should be specified as a Values array " - "qualifier." )] - uint32 SetAlarmIndicator( - [IN, Description ( "The state for the audio indicator." ), - ValueMap { "0", "1", "2" }, - Values { "No Change", "Disable", "Enable" }] - uint16 AudioIndicator, - [IN, Description ( "The state for the visual indicator." ), - ValueMap { "0", "1", "2" }, - Values { "No Change", "Disable", "Enable" }] - uint16 VisualIndicator, - [IN, Description ( "The state for the motion indicator." ), - ValueMap { "0", "1", "2" }, - Values { "No Change", "Disable", "Enable" }] - uint16 MotionIndicator); - - [Description ( - "SetUrgency is a method for defining the desired urgency " - "level for the Alarm. Its input parameter, " - "RequestedUrgency, is specified using the Values list of " - "AlarmDevice\'s Urgency property. SetUrgency returns 0 if " - "the request is successfully implemented, 1 if the " - "specified Urgency level is not supported, and some other " - "value if any other error occurred. In a subclass, the " - "set of possible return codes should be specified using a " - "ValueMap qualifier on the method. The strings to which " - "the ValueMap contents are \'translated\' should be " - "specified as a Values array qualifier." )] - uint32 SetUrgency( - [IN, Description ( "Desired urgency for the alarm." ), - ValueMap { "1", "3", "4", "5", "6" }, - Values { "Other", "Informational", "Non-Critical", - "Critical", "Unrecoverable" }] - uint16 RequestedUrgency); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AlarmDeviceCapabilities.mof b/build/vendor/dmtf_mof/Device/CIM_AlarmDeviceCapabilities.mof deleted file mode 100644 index 396f88f9..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AlarmDeviceCapabilities.mof +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::Capabilities" ), - Description ( - "AlarmDeviceCapabilities describes the capabilities supported " - "for changing the state OF THE ASSOCIATED AlarmDevice." )] -class CIM_AlarmDeviceCapabilities : CIM_EnabledLogicalElementCapabilities { - - [Description ( - "RequestedAlarmStatesSupported indicates the possible " - "states that can be requested when using the method " - "SetAlarmState on the AlarmDevice. A value of 1 indicates " - "that AlarmDevice indicators may be inactivated, a value " - "of 2 or 3 indicates that AlarmDevice indicators may be " - "activated." ), - ValueMap { "0", "1", "2", "3", "..", "32768..65535" }, - Values { "Unknown", "Off", "Steady", "Alternating", - "DMTF Reserved", "Vendor Specific" }, - ModelCorrespondence { "CIM_AlarmDevice.SetAlarmState" }] - uint16 RequestedAlarmStatesSupported[]; - - [Description ( - "AlarmIndicatorTypesConfigurable indicates the possible " - "indicators that can be enabled or disabled when using " - "the method SetAlarmIndicator on the AlarmDevice. An " - "indicator is a device that emits sound (Audio), emits " - "light or changes color (Visual), or emits vibrations " - "(Motion) to indicate some condition. Indicators may " - "include the audible alarm on a RAID controller, the " - "location LED on a chassis, or the vibration of a cell " - "phone." ), - ValueMap { "1", "2", "3", "..", "32768..65535" }, - Values { "Audio", "Visual", "Motion", "DMTF Reserved", - "Vendor Specific" }, - ModelCorrespondence { "CIM_AlarmDevice.SetAlarmIndicator" }] - uint16 AlarmIndicatorTypesConfigurable[]; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AllocatedFromStoragePool.mof b/build/vendor/dmtf_mof/Device/CIM_AllocatedFromStoragePool.mof deleted file mode 100644 index f5d12aab..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AllocatedFromStoragePool.mof +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AllocatedFromStoragePool -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::StorageServices" ), - Description ( - "AllocatedFromStoragePool is an association describing how " - "LogicalElements are allocated from underlying StoragePools. " - "These elements typically would be subclasses of StorageExtents " - "or StoragePools." )] -class CIM_AllocatedFromStoragePool : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The StoragePool." )] - CIM_StoragePool REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The subsidiary element." )] - CIM_LogicalElement REF Dependent; - - [Required, Description ( - "Space consumed from this Pool, in bytes. This value MUST " - "be maintained so that, relative to the Antecedent " - "StoragePool, it is possible to compute TotalManagedSpace " - "as StoragePool.RemainingManagedSpace plus the sum of " - "SpaceConsumed from all of the AllocatedFromStoragePool " - "references from the antecedent StoragePool." ), - Units ( "Bytes" ), - ModelCorrespondence { "CIM_StoragePool.TotalManagedSpace", - "CIM_StoragePool.RemainingManagedSpace" }] - uint64 SpaceConsumed; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AssociatedAlarm.mof b/build/vendor/dmtf_mof/Device/CIM_AssociatedAlarm.mof deleted file mode 100644 index 642471a1..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AssociatedAlarm.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AssociatedAlarm -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::Sensors" ), - Description ( - "LogicalDevices may have one or more AlarmDevices associated " - "with them, in order to indicate problem situations. This " - "relationship is indicated by the AssociatedAlarm dependency." )] -class CIM_AssociatedAlarm : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The AlarmDevice." )] - CIM_AlarmDevice REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The LogicalDevice that is alarmed." )] - CIM_LogicalDevice REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AssociatedBattery.mof b/build/vendor/dmtf_mof/Device/CIM_AssociatedBattery.mof deleted file mode 100644 index 949dd53e..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AssociatedBattery.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AssociatedBattery -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::CoolingAndPower" ), - Description ( - "A LogicalDevice might use or require one or more Batteries. " - "This relationship is described by the AssociatedBattery " - "dependency. It is also possible to model the individual " - "Batteries that comprise a UPS, using this association." )] -class CIM_AssociatedBattery : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The Battery." )] - CIM_Battery REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The LogicalDevice that needs or is associated with the Battery." - )] - CIM_LogicalDevice REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AssociatedBlockStatisticsManifestCollection.mof b/build/vendor/dmtf_mof/Device/CIM_AssociatedBlockStatisticsManifestCollection.mof deleted file mode 100644 index e00ff792..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AssociatedBlockStatisticsManifestCollection.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::StorageStatistics" ), - Description ( - "Instances of this class associate a " - "BlockStatisticsManifestCollection to the StatisticsCollection " - "to which is is applied. The ManifestCollection contains the " - "Manifests that are used to filter requests for the retrieval " - "of statistics." )] -class CIM_AssociatedBlockStatisticsManifestCollection { - - [Key, Min ( 1 ), - Max ( 1 ), - Description ( - "The collection of statistics filtered by the " - "BlockStatisticsManifestCollection." )] - CIM_StatisticsCollection REF Statistics; - - [Key, Description ( - "The collection of Manifests applied to the StatisticsCollection." - )] - CIM_BlockStatisticsManifestCollection REF ManifestCollection; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AssociatedCacheMemory.mof b/build/vendor/dmtf_mof/Device/CIM_AssociatedCacheMemory.mof deleted file mode 100644 index 521446a0..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AssociatedCacheMemory.mof +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::Memory" ), - Description ( - "Indicates that the Memory provides Cache to the Dependent " - "Logical Element." )] -class CIM_AssociatedCacheMemory : CIM_AssociatedMemory { - - [Description ( - "Defines whether this is the Primary (value=3), Secondary " - "(value=4) or Tertiary (value=5) Cache. Also, \"Other\" " - "(1), \"Unknown\" (0) and \"Not Applicable\" (2) can be " - "defined." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "Not Applicable", "Primary", - "Secondary", "Tertiary" }, - MappingStrings { "MIF.DMTF|System Cache|006.2" }, - ModelCorrespondence { - "CIM_AssociatedCacheMemory.OtherLevelDescription" }] - uint16 Level; - - [Description ( - "A string describing the cache level when the Level value " - "is 1, \"Other\"." ), - ModelCorrespondence { "CIM_AssociatedCacheMemory.Level" }] - string OtherLevelDescription; - - [Description ( - "Defines whether this is write-back (value=2) or " - "write-through (value=3) Cache, or whether this " - "information \"Varies with Address\" (4) or is defined " - "individually for each I/O (5). Also, \"Other\" (1) and " - "\"Unknown\" (0) can be specified." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "Write Back", "Write Through", - "Varies with Address", "Determination Per I/O" }, - MappingStrings { "MIF.DMTF|System Cache|006.5" }, - ModelCorrespondence { - "CIM_AssociatedCacheMemory.OtherWritePolicyDescription" }] - uint16 WritePolicy; - - [Description ( - "A string describing the Write Policy when the " - "WritePolicy value is 1, \"Other\"." ), - ModelCorrespondence { "CIM_AssociatedCacheMemory.WritePolicy" }] - string OtherWritePolicyDescription; - - [Description ( - "Defines whether this is for instruction caching " - "(value=2), data caching (value=3) or both (value=4, " - "\"Unified\"). Also, \"Other\" (1) and \"Unknown\" (0) " - "can be defined." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "Instruction", "Data", "Unified" }, - MappingStrings { "MIF.DMTF|System Cache|006.9" }, - ModelCorrespondence { - "CIM_AssociatedCacheMemory.OtherCacheTypeDescription" }] - uint16 CacheType; - - [Description ( - "A string describing the Cache Type when the CacheType " - "value is 1, \"Other\"." ), - ModelCorrespondence { "CIM_AssociatedCacheMemory.CacheType" }] - string OtherCacheTypeDescription; - - [Description ( - "Size, in bytes, of a single cache bucket or line." ), - Units ( "Bytes" ), - MappingStrings { "MIF.DMTF|System Cache|006.10" }, - PUnit ( "byte" )] - uint32 LineSize; - - [Description ( - "An integer enumeration describing the algorithm to " - "determine which cache lines or buckets should be " - "re-used." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Unknown", "Other", "Unknown", - "Least Recently Used (LRU)", "First In First Out (FIFO)", - "Last In First Out (LIFO)", "Least Frequently Used (LFU)", - "Most Frequently Used (MFU)", - "Data Dependent Multiple Algorithms" }, - MappingStrings { "MIF.DMTF|System Cache|006.12" }, - ModelCorrespondence { - "CIM_AssociatedCacheMemory.OtherReplacementPolicyDescription" }] - uint16 ReplacementPolicy; - - [Description ( - "A string describing the Cache replacement policy when " - "the ReplacementPolicy value is 1, \"Other\"." ), - ModelCorrespondence { - "CIM_AssociatedCacheMemory.ReplacementPolicy" }] - string OtherReplacementPolicyDescription; - - [Description ( - "Policy that shall be employed by the Cache for handling " - "read requests. For example, \"Read\", \"Read-Ahead\" or " - "both can be specified using the values, 2, 3 or 4, " - "respectively. If the read policy is determined " - "individually (ie, for each request), then the value 5 " - "(\"Determination per I/O\") should be specified. \"Other\" " - "(1) and \"Unknown\" (0) are also valid values." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "Read", "Read-Ahead", - "Read and Read-Ahead", "Determination Per I/O" }, - MappingStrings { "MIF.DMTF|System Cache|006.13" }, - ModelCorrespondence { - "CIM_AssociatedCacheMemory.OtherReadPolicyDescription" }] - uint16 ReadPolicy; - - [Description ( - "A string describing the read policy when the ReadPolicy " - "value is 1, \"Other\"." ), - ModelCorrespondence { "CIM_AssociatedCacheMemory.ReadPolicy" }] - string OtherReadPolicyDescription; - - [Description ( - "Maximum amount of time, in seconds, dirty lines or " - "buckets may remain in the Cache before they are flushed. " - "A value of zero indicated that a cache flush is not " - "controlled by a flushing timer." ), - Units ( "Seconds" ), - MappingStrings { "MIF.DMTF|System Cache|006.14" }, - PUnit ( "second" )] - uint32 FlushTimer; - - [Description ( - "An integer enumeration defining the system cache " - "associativity. For example, 5 indicates a fully " - "associative cache." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12" }, - Values { "Unknown", "Other", "Direct Mapped", - "2-way Set-Associative", "4-way Set-Associative", - "Fully Associative", "8-way Set-Associative", - "16-way Set-Associative", "12-way Set Associative", - "24-way Set Associative", "32-way Set Associative", - "48-way Set Associative", "64-way Set Associative" }, - MappingStrings { "MIF.DMTF|System Cache|006.15" }, - ModelCorrespondence { - "CIM_AssociatedCacheMemory.OtherAssociativityDescription" }] - uint16 Associativity; - - [Description ( - "A string describing the cache associativity when the " - "Associativity value is 1, \"Other\"." ), - ModelCorrespondence { - "CIM_AssociatedCacheMemory.Associativity" }] - string OtherAssociativityDescription; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AssociatedComponentExtent.mof b/build/vendor/dmtf_mof/Device/CIM_AssociatedComponentExtent.mof deleted file mode 100644 index 7652131c..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AssociatedComponentExtent.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2008 DMTF. All Rights Reserved. - [Association, Aggregation, Version ( "2.18.0" ), - UMLPackagePath ( "CIM::Device::StorageServices" ), - Description ( - "This association defines the capacity, expressed in " - "StorageExtents, that together represents the entire capacity " - "collected in a StoragePool. The capacity represented by " - "StorageExtents may represent capacity that is allocated or " - "unallocated. \n" - "StorageExtents associated to a StoragePool using this " - "association shall not be also be associated to that " - "StoragePool using the CIM_AssociatedRemainingExtent " - "association." )] -class CIM_AssociatedComponentExtent : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Description ( "The parent StoragePool in the association." )] - CIM_StoragePool REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The component StorageExtent in the association." )] - CIM_StorageExtent REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AssociatedCooling.mof b/build/vendor/dmtf_mof/Device/CIM_AssociatedCooling.mof deleted file mode 100644 index 2e7eca62..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AssociatedCooling.mof +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Association, Version ( "2.19.1" ), - UMLPackagePath ( "CIM::Device::CoolingAndPower" ), - Description ( - "The CIM_AssociatedCooling relationship indicates what " - "ManagedSystemElement(s) the fan or cooling device is " - "providingcooling for." )] -class CIM_AssociatedCooling : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The CoolingDevice." )] - CIM_CoolingDevice REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The ManagedSystemElement being cooled." )] - CIM_ManagedSystemElement REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AssociatedIndicatorLED.mof b/build/vendor/dmtf_mof/Device/CIM_AssociatedIndicatorLED.mof deleted file mode 100644 index 1868689a..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AssociatedIndicatorLED.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Association, Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Device::LED" ), - Description ( - "ManagedSystemElements may have zero or more IndicatorLEDs " - "associated with them, in order to indicate problem situations. " - "This relationship is indicated by the AssociatedIndicatorLED " - "dependency." )] -class CIM_AssociatedIndicatorLED : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Description ( - "The ManagedSystemElement that has an associated LED." )] - CIM_ManagedSystemElement REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The LED." )] - CIM_IndicatorLED REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AssociatedLabelReader.mof b/build/vendor/dmtf_mof/Device/CIM_AssociatedLabelReader.mof deleted file mode 100644 index 2d22d5c0..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AssociatedLabelReader.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AssociatedLabelReader -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageLib" ), - Description ( - "A LogicalDevice may use or require one or more LabelReaders, " - "to scan barcodes or otherwise identify entities. This " - "relationship is described by the AssociatedLabelReader " - "dependency." )] -class CIM_AssociatedLabelReader : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The LabelReader." )] - CIM_LabelReader REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The Device that is dependent on the Reader Device." )] - CIM_LogicalDevice REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AssociatedMemory.mof b/build/vendor/dmtf_mof/Device/CIM_AssociatedMemory.mof deleted file mode 100644 index 33b9a174..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AssociatedMemory.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AssociatedMemory -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::Memory" ), - Description ( - "LogicalElements may have Memory installed on them or otherwise " - "associated with them - such as CacheMemory. This is made " - "explicit in this association." )] -class CIM_AssociatedMemory : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "Memory installed on or associated with a Device." )] - CIM_Memory REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The LogicalElement." )] - CIM_LogicalElement REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AssociatedProcessorMemory.mof b/build/vendor/dmtf_mof/Device/CIM_AssociatedProcessorMemory.mof deleted file mode 100644 index 5f662333..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AssociatedProcessorMemory.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_AssociatedProcessorMemory -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::Memory" ), - Description ( - "Associates the Processor and system Memory, or a Processor\'s Cache." - )] -class CIM_AssociatedProcessorMemory : CIM_AssociatedMemory { - - [Override ( "Dependent" ), - Description ( - "The Processor that accesses the Memory or uses the Cache." )] - CIM_Processor REF Dependent; - - [Description ( - "Speed of the bus, in MHertz, between the Processor and Memory." - ), - Units ( "MegaHertz" ), - PUnit ( "hertz * 10^6" )] - uint32 BusSpeed; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AssociatedProtocolController.mof b/build/vendor/dmtf_mof/Device/CIM_AssociatedProtocolController.mof deleted file mode 100644 index 05962254..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AssociatedProtocolController.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AssociatedProtocolController -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::ProtocolController" ), - Description ( - "This association is used to define a hierarchy relationship " - "between ProtocolControllers. This subclass is provided so that " - "an enumeration of related ProtocolControllers can be performed " - "without retrieving any connected StorageVolumes, " - "MediaAccessDevices or LogicalPorts." )] -class CIM_AssociatedProtocolController : CIM_ProtocolControllerForDevice { - - [Override ( "Antecedent" ), - Description ( - "The \'upstream\', Antecedent ProtocolController." )] - CIM_ProtocolController REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The \'downstream\' Dependent ProtocolController." )] - CIM_ProtocolController REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AssociatedRemainingExtent.mof b/build/vendor/dmtf_mof/Device/CIM_AssociatedRemainingExtent.mof deleted file mode 100644 index c9769eba..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AssociatedRemainingExtent.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2008 DMTF. All Rights Reserved - [Association, Aggregation, Version ( "2.18.0" ), - UMLPackagePath ( "CIM::Device::StorageServices" ), - Description ( - "This association defines that capacity of the StoragePool that " - "is not yet allocated from the StoragePool. This capacity is " - "remaining in the StoragePool for future " - "allocation.StorageExtents associated to a StoragePool using " - "this association shall be BasedOn StorageExtents that are " - "associated to that StoragePool using " - "CIM_AssociatedComponentExtent, but shall not be associated to " - "that StoragePool using the CIM_AssociatedComponentExtent " - "association." )] -class CIM_AssociatedRemainingExtent : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Description ( "The parent StoragePool in the association." )] - CIM_StoragePool REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The component StorageExtent in the association." )] - CIM_StorageExtent REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AssociatedSensor.mof b/build/vendor/dmtf_mof/Device/CIM_AssociatedSensor.mof deleted file mode 100644 index af2800ed..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AssociatedSensor.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Association, Version ( "2.19.1" ), - UMLPackagePath ( "CIM::Device::Sensors" ), - Description ( - "The CIM_AssociatedCooling relationship indicates what " - "ManagedSystemElement(s) the fan or cooling device is " - "providingcooling for." )] -class CIM_AssociatedSensor : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The Sensor." )] - CIM_Sensor REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The ManagedSystemElement for which information is " - "measured by the Sensor." )] - CIM_ManagedSystemElement REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AssociatedSupplyCurrentSensor.mof b/build/vendor/dmtf_mof/Device/CIM_AssociatedSupplyCurrentSensor.mof deleted file mode 100644 index 4134f7b7..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AssociatedSupplyCurrentSensor.mof +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AssociatedSupplyCurrentSensor -// ================================================================== - [Association, Deprecated { "CIM_AssociatedSensor" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::Sensors" ), - Description ( - "The use of this association is being deprecated in lieu of " - "using AssociatedSensor, since the use of the referenced class " - "CurrentSensor is deprecated. \n" - "A PowerSupply may have an associated CurrentSensor, monitoring " - "its input frequency. This is described by this association." )] -class CIM_AssociatedSupplyCurrentSensor : CIM_AssociatedSensor { - - [Deprecated { "CIM_AssociatedSensor.Antecedent" }, - Override ( "Antecedent" ), - Description ( "The CurrentSensor." )] - CIM_CurrentSensor REF Antecedent; - - [Deprecated { "CIM_AssociatedSensor.Dependent" }, - Override ( "Dependent" ), - Description ( - "The PowerSupply associated with the CurrentSensor." )] - CIM_PowerSupply REF Dependent; - - [Deprecated { "No Value" }, - Description ( - "Indicates the PowerSupply\'s input frequency range " - "measured by the associated sensor. Range 1, 2 or both " - "can be specified using the values 2, 3 or 4, " - "respectively." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "Range 1", "Range 2", - "Both Range 1 and 2" }] - uint16 MonitoringRange; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_AssociatedSupplyVoltageSensor.mof b/build/vendor/dmtf_mof/Device/CIM_AssociatedSupplyVoltageSensor.mof deleted file mode 100644 index 9f70e93b..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_AssociatedSupplyVoltageSensor.mof +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AssociatedSupplyVoltageSensor -// ================================================================== - [Association, Deprecated { "CIM_AssociatedSensor" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::Sensors" ), - Description ( - "The use of this association is being deprecated in lieu of " - "using AssociatedSensor, since the use of the referenced class " - "VoltageSensor is deprecated. \n" - "A PowerSupply may have an associated VoltageSensor, monitoring " - "its input voltage. This is described by this association." )] -class CIM_AssociatedSupplyVoltageSensor : CIM_AssociatedSensor { - - [Deprecated { "CIM_AssociatedSensor.Antecedent" }, - Override ( "Antecedent" ), - Description ( "The VoltageSensor." )] - CIM_VoltageSensor REF Antecedent; - - [Deprecated { "CIM_AssociatedSensor.Dependent" }, - Override ( "Dependent" ), - Description ( - "The PowerSupply associated with the VoltageSensor." )] - CIM_PowerSupply REF Dependent; - - [Deprecated { "No Value" }, - Description ( - "Indicates the PowerSupply\'s input voltage range " - "measured by the associated sensor. Range 1, 2 or both " - "can be specified using the values 2, 3 or 4, " - "respectively." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "Range 1", "Range 2", - "Both Range 1 and 2" }] - uint16 MonitoringRange; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_BIOSLoadedInNV.mof b/build/vendor/dmtf_mof/Device/CIM_BIOSLoadedInNV.mof deleted file mode 100644 index fae195fc..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_BIOSLoadedInNV.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BIOSLoadedInNV -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::Memory" ), - Description ( - "A link between BIOSElement and Memory where the BIOS is loaded." )] -class CIM_BIOSLoadedInNV : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The memory storage." )] - CIM_Memory REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The BIOS stored in the memory." )] - CIM_BIOSElement REF Dependent; - - [Description ( - "The starting address where the BIOS is located in " - "non-volatile storage." )] - uint64 StartingAddress; - - [Description ( - "The ending address where the BIOS is located in " - "non-volatile storage." )] - uint64 EndingAddress; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_Battery.mof b/build/vendor/dmtf_mof/Device/CIM_Battery.mof deleted file mode 100644 index 5396f097..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_Battery.mof +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) 2010 DMTF. All rights reserved. - [Version ( "2.26.0" ), - UMLPackagePath ( "CIM::Device::CoolingAndPower" ), - Description ( - "Capabilities and management of the Battery. This class applies " - "to both batteries in Laptop Systems and other internal or " - "external batteries, such as an uninterruptible power supply " - "(UPS)." )] -class CIM_Battery : CIM_LogicalDevice { - - [Description ( - "Description of the charge status of the Battery. Values " - "such as \"Fully Charged\" (value=3) or \"Partially " - "Charged\" (value=11) can be specified. The value, 10, is " - "not valid in the CIM Schema because in DMI it represents " - "that no battery is installed. In this case, this object " - "should not be instantiated. The valuemaps: 6(Charging), " - "7(Charging and High), 8(Charging and Low), and 9(Charing " - "and Critical) has been deprecated in lieu of the " - "ChargingStatus property. 10(Undefined) has been " - "deprecated in lieu of 2(Unknown)." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "..", "32768..65535" }, - Values { "Other", "Unknown", "Fully Charged", "Low", - "Critical", "Charging", "Charging and High", - "Charging and Low", "Charging and Critical", "Undefined", - "Partially Charged", "Learning", "Overcharged", - "DMTF Reserved", "Vendor Specific" }, - MappingStrings { "MIF.DMTF|Portable Battery|003.14" }] - uint16 BatteryStatus; - - [Description ( - "TimeOnBattery indicates the elapsed time in seconds " - "since the ComputerSystem, UPS, or so on, last switched " - "to battery power, or the time since the System or UPS " - "was last restarted, whichever is less. Zero is returned " - "if the Battery is \'on line\'." ), - Units ( "Seconds" ), - PUnit ( "second" )] - uint32 TimeOnBattery; - - [Description ( - "EstimatedRunTime is an estimate in minutes of the time " - "that battery charge depletion will occur under the " - "present load conditions if the utility power is off, or " - "is lost and remains off, or a Laptop is disconnected " - "from a power source." ), - Units ( "Minutes" ), - MappingStrings { "MIF.DMTF|Portable Battery|003.15" }, - PUnit ( "minute" )] - uint32 EstimatedRunTime; - - [Description ( - "An estimate of the percentage of full charge remaining." ), - Units ( "Percent" ), - Gauge, PUnit ( "percent" )] - uint16 EstimatedChargeRemaining; - - [Description ( - "An enumeration that describes the chemistry of the Battery." - ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "..", - "32768..65535" }, - Values { "Other", "Unknown", "Lead Acid", "Nickel Cadmium", - "Nickel Metal Hydride", "Lithium-ion", "Zinc air", - "Lithium Polymer", "DMTF Reserved", "Vendor Specified" }, - MappingStrings { "MIF.DMTF|Portable Battery|003.7" }] - uint16 Chemistry; - - [Description ( - "The design capacity of the battery in mWatt-hours. If " - "this property is not supported, enter 0." ), - Units ( "MilliWattHours" ), - MappingStrings { "MIF.DMTF|Portable Battery|003.8" }, - PUnit ( "watt * hour * 10^-3" )] - uint32 DesignCapacity; - - [Description ( - "The full charge capacity of the battery in mWatt-hours. " - "Comparison of this value to the Battery DesignCapacity " - "determines when the Battery requires replacement. The " - "end of life of a Battery is typically when the " - "FullCharge Capacity falls below 80% of the " - "DesignCapacity. If this property is not supported, enter " - "0." ), - Units ( "MilliWattHours" ), - MappingStrings { "MIF.DMTF|Portable Battery|003.11" }, - PUnit ( "watt * hour * 10^-3" )] - uint32 FullChargeCapacity; - - [Description ( - "The design voltage of the battery in mVolts. If this " - "attribute is not supported, enter 0." ), - Units ( "MilliVolts" ), - MappingStrings { "MIF.DMTF|Portable Battery|003.9" }, - PUnit ( "volt * 10^-3" )] - uint64 DesignVoltage; - - [Description ( - "The Smart Battery Data Specification version number that " - "is supported by this Battery. If the Battery does not " - "support this function, the value should be left blank." ), - MaxLen ( 64 ), - MappingStrings { "MIF.DMTF|Portable Battery|003.10" }] - string SmartBatteryVersion; - - [Description ( - "The remaining time in minutes to charge the battery " - "fully at the current charging rate and usage." ), - Units ( "Minutes" ), - MappingStrings { "MIF.DMTF|Portable Battery|003.16" }, - PUnit ( "minute" )] - uint32 TimeToFullCharge; - - [Description ( - "Indicates the expected lifetime of the Battery in " - "minutes, assuming that the Battery is fully charged. " - "This property represents the total expected life of the " - "Battery, not its current remaining life, which is " - "indicated by the EstimatedRunTime property." ), - Units ( "Minutes" ), - PUnit ( "minute" )] - uint32 ExpectedLife; - - [Description ( - "MaxRechargeTime indicates the maximum time, in minutes, " - "to fully charge the Battery. This property represents " - "the time to recharge a fully depleted Battery, not the " - "current remaining charging time, which is indicated in " - "the TimeToFullCharge property." ), - Units ( "Minutes" ), - PUnit ( "minute" )] - uint32 MaxRechargeTime; - - [Description ( - "The number of times the Battery has been recharged." )] - uint32 RechargeCount; - - [Description ( - "The maximum number of times the Battery can be recharged." )] - uint32 MaxRechargeCount; - - [Description ( - "The Battery\'s remaining charge capacity in mWatt-hours." ), - Units ( "MilliWattHours" ), - PUnit ( "watt * hour * 10^-3" )] - uint32 RemainingCapacity; - - [Description ( - "The maximum error (as a percentage) in the mWatt-hour " - "data reported by RemainingCapacity property." ), - Units ( "Percentage" ), - PUnit ( "percent" )] - uint8 RemainingCapacityMaxError; - - [Description ( - "The description of the battery chemistry when the " - "Chemistry property has value 1 (Other). The property " - "shall be implemented if the Chemistry property has value " - "1(Other)." )] - string OtherChemistryDescription; - - [Description ( - "ChargingStatus indicates whether the battery is " - "charging. Charging - the battery is charging. " - "Discharging - the battery is discharging. Idle - the " - "batter is neither charging nor discharging." ), - ValueMap { "0", "2", "3", "4", "..", "32768..65535" }, - Values { "Unknown", "Charging", "Discharging", "Idle", - "DMTF Reserved", "Vendor Specified" }] - uint16 ChargingStatus; - - [Description ( - "An estimate of the percentage of the overall battery " - "health. It indicates how much the battery has " - "deteriorated over time. It can take values 0 to 100; 255 " - "if it is unknown." ), - Units ( "Percentage" ), - PUnit ( "percent" )] - uint8 HealthPercent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_BinarySensor.mof b/build/vendor/dmtf_mof/Device/CIM_BinarySensor.mof deleted file mode 100644 index 33f36cbe..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_BinarySensor.mof +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BinarySensor -// ================================================================== - [Deprecated { "CIM_Sensor" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::Sensors" ), - Description ( - "A BinarySensor provides a boolean output. The use of this " - "class is being deprecated in lieu of creating a Sensor with " - "two PossibleStates." )] -class CIM_BinarySensor : CIM_Sensor { - - [Deprecated { "CIM_Sensor.SensorType" }, - Description ( "The current value indicated by the Sensor." )] - boolean CurrentReading; - - [Deprecated { "CIM_Sensor.SensorType" }, - Description ( - "ExpectedReading indicates the \'normal\' value for the Sensor." - )] - boolean ExpectedReading; - - [Deprecated { "CIM_Sensor.PossibleStates" }, - Description ( - "InterpretationOfTrue is a string indicating what a " - "\'True\' value from the BinarySensor means. This " - "information could be displayed to a user." ), - MaxLen ( 64 )] - string InterpretationOfTrue; - - [Deprecated { "CIM_Sensor.PossibleStates" }, - Description ( - "InterpretationOfFalse is a string indicating what a " - "\'False\' value from the BinarySensor means. This " - "information could be displayed to a user." ), - MaxLen ( 64 )] - string InterpretationOfFalse; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_BlockStatisticsCapabilities.mof b/build/vendor/dmtf_mof/Device/CIM_BlockStatisticsCapabilities.mof deleted file mode 100644 index ebb9d82c..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_BlockStatisticsCapabilities.mof +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::StorageStatistics" ), - Description ( - "A specialization of the StatisticsCapabilities class that " - "describes the capabilities of a BlockStatisticsService, which " - "provides statistical data for instances of " - "BlockStatisticalData." )] -class CIM_BlockStatisticsCapabilities : CIM_StatisticsCapabilities { - - [Required, Override ( "ElementTypesSupported" ), - Description ( - "The list of element types for which statistical data is " - "available. The values of this array correspond to the " - "values defined for the ElementType property of the " - "BlockStatisticalData class." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "..", "0x8000.." }, - Values { "Computer System", "Front-end Computer System", - "Peer Computer System", "Back-end Computer System", - "Front-end Port", "Back-end Port", "Volume", "Extent", - "Disk Drive", "Arbitrary LUs", "Remote Replica Group", - "DMTF Reserved", "Vendor Specific" }] - uint16 ElementTypesSupported[]; - - [Override ( "SynchronousMethodsSupported" ), - Description ( - "The synchronous mechanisms supported for retrieving " - "statistics and defining and modifying filters for " - "statistics retrieval." ), - ValueMap { "2", "3", "4", "5", "6", "7", "..", "0x8000.." }, - Values { "Execute Query", "Query Collection", - "GetStatisticsCollection", "Manifest Creation", - "Manifest Modification", "Manifest Removal", - "DMTF Reserved", "Vendor Specific" }] - uint16 SynchronousMethodsSupported[]; - - [Override ( "AsynchronousMethodsSupported" ), - Description ( - "The asychronous mechanisms supported for retrieving statistics." - ), - ValueMap { "2", "3", "..", "0x8000.." }, - Values { "GetStatisticsCollection", "Indications", - "DMTF Reserved", "Vendor Specific" }] - uint16 AsynchronousMethodsSupported[]; - - [Description ( - "An internal clocking interval for all timers in the " - "subsystem, measured in microseconds (Unit of measure in " - "the timers, measured in microseconds). Time counters are " - "monotanically increasing counters that contain \'ticks\'. " - "Each tick represents one ClockTickInterval. If " - "ClockTickInterval contained a value of 32 then each time " - "counter tick would represent 32 microseconds." ), - Units ( "MicroSeconds" ), - PUnit ( "second * 10^-6" )] - uint64 ClockTickInterval; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_BlockStatisticsManifest.mof b/build/vendor/dmtf_mof/Device/CIM_BlockStatisticsManifest.mof deleted file mode 100644 index 45e13c46..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_BlockStatisticsManifest.mof +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Device::StorageStatistics" ), - Description ( - "Instances of this class define a list of supported or desired " - "properties of BlockStatisticalData instances. In the case " - "where a BlockStatisticsManifest instance is a member of a " - "BlockStatisticsManifestCollection used in a " - "BlockStatisticsService.GetStatisticsCollection request, for " - "each of the boolean \"include\" properties set to true in that " - "BlockStatisticsManifest, the corresponding " - "BlockStatisticalData property will be included, if available, " - "in the statistics returned for BlockStatisticalData instances " - "whose ElementType matches the ElementType of the " - "BlockStatisticsManifest." )] -class CIM_BlockStatisticsManifest : CIM_ManagedElement { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. To ensure uniqueness within the " - "NameSpace, the value of InstanceID should be constructed " - "using the following \"preferred\" algorithm: \n" - ": \n" - "Where and are separated by a colon " - "(:), and where must include a copyrighted, " - "trademarked, or otherwise unique name that is owned by " - "the business entity that is creating or defining the " - "InstanceID or that is a registered ID assigned to the " - "business entity by a recognized global authority. (This " - "requirement is similar to the _ " - "structure of Schema class names.) In addition, to ensure " - "uniqueness, must not contain a colon (:). When " - "using this algorithm, the first colon to appear in " - "InstanceID must appear between and . \n" - " is chosen by the business entity and should " - "not be reused to identify different underlying " - "(real-world) elements. If the above \"preferred\" " - "algorithm is not used, the defining entity must assure " - "that the resulting InstanceID is not reused across any " - "InstanceIDs produced by this or other providers for the " - "NameSpace of this instance. \n" - "For DMTF-defined instances, the \"preferred\" algorithm " - "must be used with the set to CIM." )] - string InstanceID; - - [Description ( - "Determines the type of elements that this " - "BlockStatisticsManifest can be applied to (e.g. during a " - "GetStatisticsCollection request). This is used when the " - "same set of statistical metrics is calculated for " - "several types of devices. In this way, a single " - "BlockStatisticsManifest instance can be used to filter " - "all the StatsiticalData instances that contain metrics " - "for the same type of element in a StatisticsCollection. " - "If used, a subclass should override this property to " - "specify the element types supported by that class, " - "preferably through ValueMap and Values qualifiers to " - "allow clients to programmatically retrieve those " - "supported types." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "..", "0x8000.." }, - Values { "Computer System", "Front-end Computer System", - "Peer Computer System", "Back-end Computer System", - "Front-end Port", "Back-end Port", "Volume", "Extent", - "Disk Drive", "Arbitrary LUs", "Remote Replica Group", - "DMTF Reserved", "Vendor Specific" }, - ModelCorrespondence { - "CIM_BlockStorageStatisticalData.ElementType" }] - uint16 ElementType; - - [Description ( - "Indicates whether or not the Statistics property of " - "StatisticsService.GetStatisticsCollection method will " - "include the time at time when statistics for this " - "BlockStatisticsManifest were first captured." ), - ModelCorrespondence { - "CIM_BlockStorageStatisticalData.StartStatisticTime" }] - boolean IncludeStartStatisticTime = false; - - [Description ( - "Indicates whether or not the Statistics property of " - "StatisticsService.GetStatisticsCollection method will " - "include the time when statistics for this " - "BlockStatisticsManifest were last captured." ), - ModelCorrespondence { - "CIM_BlockStorageStatisticalData.StatisticTime" }] - boolean IncludeStatisticTime = false; - - [Description ( - "Whether to include in a filter for a metered element the " - "cumulative count of I/Os for that element." ), - ModelCorrespondence { - "CIM_BlockStorageStatisticalData.StatisticTime" }] - boolean IncludeTotalIOs = false; - - [Description ( - "Whether to include in a filter for a metered element the " - "cumulative count of data transferred in Kbytes for that " - "element." ), - ModelCorrespondence { - "CIM_BlockStorageStatisticalData.KBytesTransferred" }] - boolean IncludeKBytesTransferred = false; - - [Description ( - "Whether to include in a filter for a metered element the " - "cumulative elapsed I/O time (number of Clock Tick " - "Intervals) for all I/Os for that element as defined in " - "\'Total I/Os\'." ), - ModelCorrespondence { - "CIM_BlockStorageStatisticalData.IOTimeCounter" }] - boolean IncludeIOTimeCounter = false; - - [Description ( - "Whether to include in a filter for a metered element the " - "cumulative count of all reads for that element." ), - ModelCorrespondence { - "CIM_BlockStorageStatisticalData.ReadIOs" }] - boolean IncludeReadIOs = false; - - [Description ( - "Whether to include in a filter for a metered element the " - "cumulative count of all read cache hits (Reads from " - "Cache) for that element." ), - ModelCorrespondence { - "CIM_BlockStorageStatisticalData.ReadHitIOs" }] - boolean IncludeReadHitIOs = false; - - [Description ( - "Whether to include in a filter for a metered element the " - "cumulative elapsed time for all cumulative Read I/Os for " - "that element." ), - ModelCorrespondence { - "CIM_BlockStorageStatisticalData.ReadIOTimeCounter" }] - boolean IncludeReadIOTimeCounter = false; - - [Description ( - "Whether to include in a filter for a metered element the " - "cumulative elapsed time for all Read I/Os read from " - "cache for that element." ), - ModelCorrespondence { - "CIM_BlockStorageStatisticalData.ReadHitIOTimeCounter" }] - boolean IncludeReadHitIOTimeCounter = false; - - [Description ( - "Whether to include in a filter for a metered element the " - "cumulative count of data read in Kbytes for that " - "element." ), - ModelCorrespondence { - "CIM_BlockStorageStatisticalData.KBytesRead" }] - boolean IncludeKBytesRead = false; - - [Description ( - "Whether to include in a filter for a metered element the " - "cumulative count of all writes for tat element." ), - ModelCorrespondence { - "CIM_BlockStorageStatisticalData.WriteIOs" }] - boolean IncludeWriteIOs = false; - - [Description ( - "Whether to include in a filter for a metered element the " - "cumulative count of Write Cache Hits (Writes that went " - "directly to Cache) for that element." ), - ModelCorrespondence { - "CIM_BlockStorageStatisticalData.WriteHitIOs" }] - boolean IncludeWriteHitIOs = false; - - [Description ( - "Whether to include in a filter for a metered element the " - "cumulative elapsed time for all Write I/Os for that " - "element." ), - ModelCorrespondence { - "CIM_BlockStorageStatisticalData.WriteIOTimeCounter" }] - boolean IncludeWriteIOTimeCounter = false; - - [Description ( - "Whether to include in a filter for a metered element the " - "cumulative elapsed time for all Write I/Os written to " - "cache for that element." ), - ModelCorrespondence { - "CIM_BlockStorageStatisticalData.WriteHitIOTimeCounter" }] - boolean IncludeWriteHitIOTimeCounter = false; - - [Description ( - "Whether to include in a filter for a metered element the " - "cumulative count of data written in Kbytes for that " - "element." ), - ModelCorrespondence { - "CIM_BlockStorageStatisticalData.KBytesWritten" }] - boolean IncludeKBytesWritten = false; - - [Description ( - "Whether to include in a filter for a metered element the " - "cumulative elapsed idle time for that element." ), - ModelCorrespondence { - "CIM_BlockStorageStatisticalData.IdleTimeCounter" }] - boolean IncludeIdleTimeCounter = false; - - [Description ( - "Whether to include in a filter for a metered element the " - "cumulative count of all maintenance operations for that " - "element." ), - ModelCorrespondence { - "CIM_BlockStorageStatisticalData.MaintOp" }] - boolean IncludeMaintOp = false; - - [Description ( - "Whether to include in a filter for a metered element the " - "cumulative elapsed maintenance time for that element." ), - ModelCorrespondence { - "CIM_BlockStorageStatisticalData.MaintTimeCounter" }] - boolean IncludeMaintTimeCounter = false; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_BlockStatisticsManifestCollection.mof b/build/vendor/dmtf_mof/Device/CIM_BlockStatisticsManifestCollection.mof deleted file mode 100644 index 281e95ab..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_BlockStatisticsManifestCollection.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::StorageStatistics" ), - Description ( - "The BlockStatisticsManifestCollection class aggregates, via " - "MemberOfCollection, a set of BlockStatisticsManifests. This " - "collection is associated via " - "AssociatedBlockStatisticsManifestCollection to exactly one " - "StatisticsCollection. The BlockStatisticsManifestCollection is " - "used to filter the retrieval of statistics. For example, a " - "BlockStatisticsManifestCollection is specified as part of the " - "StatisticsService.GetStatisticsCollection method to filter the " - "statistics returned by that method." )] -class CIM_BlockStatisticsManifestCollection : CIM_SystemSpecificCollection { - - [Override ( "ElementName" ), - Description ( - "A user-friendly name for the " - "BlockStatisticsManifestCollection. It can be set through " - "the ElementName parameter of the " - "StatisticsService.CreateManifestCollection method." )] - string ElementName; - - [Required, Description ( - "Denotes whether or not this " - "BlockStatisticsManifestCollection is a provider defined " - "default BlockStatisticsManifestCollection." )] - boolean IsDefault; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_BlockStatisticsService.mof b/build/vendor/dmtf_mof/Device/CIM_BlockStatisticsService.mof deleted file mode 100644 index 08d3b5a8..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_BlockStatisticsService.mof +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::StorageStatistics" ), - Description ( - "A subclass of StatisticsService that provides services for " - "filtering and retrieving statistics from a " - "StatisticsManifestCollection that contains instances of " - "BlockStatisticalData." )] -class CIM_BlockStatisticsService : CIM_StatisticsService { - - - [Description ( - "Retrieves statistics in a well-defined bulk format. The " - "collection of statistics returned is determined by the " - "list of element types passed in to the method and the " - "manifests for those types contained in the supplied " - "BlockStatisticsManifestCollection. If both the Elements " - "and BlockStatisticsManifestCollection parameters are " - "supplied, then the types of elements returned is an " - "intersection of the element types listed in the Elements " - "parameter and the types for which " - "BlockStatisticsManifest instances exist in the supplied " - "BlockStatisticsManifestCollection. The statistics are " - "returned through a well-defined array of strings, whose " - "format is specified by the StatisticsFormat parameter, " - "that can be parsed to retrieve the desired statistics as " - "well as limited information about the elements that " - "those metrics describe." ), - ValueMap { "0", "1", "2", "3", "4", "5", "..", "4096", - "4097", "4098", "4099..32767", "32768..65535" }, - Values { "Job Completed with No Error", "Not Supported", - "Unknown", "Timeout", "Failed", "Invalid Parameter", - "Method Reserved", - "Method Parameters Checked - Job Started", - "Element Not Supported", - "Statistics Format Not Supported", "Method Reserved", - "Vendor Specific" }] - uint32 GetStatisticsCollection( - [IN ( false ), OUT, Description ( - "Reference to the job (may be null if job completed)." - )] - CIM_ConcreteJob REF Job, - [IN, Description ( - "Element types for which statistics should be " - "returned. If not supplied (i.e. parameter is null) " - "this parameter is not considered when filtering " - "the instances of StatisticalData that will " - "populate the Statistics output parameter. If the " - "array is not null, but is empty, then no " - "statistics will be returned by this method. A " - "client SHOULD NOT specify this parameter if it is " - "not meaningful (i.e. the service only provides " - "statistics for a single type of element)." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "..", "0x8000.." }, - Values { "Computer System", - "Front-end Computer System", "Peer Computer System", - "Back-end Computer System", "Front-end Port", - "Back-end Port", "Volume", "Extent", "Disk Drive", - "Arbitrary LUs", "Remote Replica Group", - "DMTF Reserved", "Vendor Specific" }, - ModelCorrespondence { - "CIM_BlockStorageStatisticalData.ElementType" }] - uint16 ElementTypes[], - [IN, Description ( - "The BlockStatisticsManifestCollection that " - "contains the manifests that list the metrics to be " - "returned for each element type. If not supplied " - "(i.e. parameter is null), then all available " - "statistics will be returned unfiltered. Only " - "elements that match the element type properties " - "(if meaningful) of the BlockStatisticsManifest " - "instances contained within the " - "BlockStatisticsManifestCollection will have data " - "returned by this method. If the supplied " - "BlockStatisticsManifestCollection does not contain " - "any BlockStatisticsManifest instances, then no " - "statistics will be returned by this method." )] - CIM_BlockStatisticsManifestCollection REF ManifestCollection, - [IN, Description ( - "Specifies the format of the Statistics output " - "parameter. \n" - "- CSV = Comma Separated Values." ), - ValueMap { "0", "1", "2", "..", "0x8000.." }, - Values { "Unknown", "Other", "CSV", "DMTF Reserved", - "Vendor Specific" }] - uint16 StatisticsFormat, - [OUT, Description ( - "The statistics for all the elements as determined " - "by the Elements, ManifestCollection parameters, " - "and StatisticsFormat parameters." ), - ModelCorrespondence { - "CIM_BlockStatisticsService.GetStatisticsCollection(ElementTypes)", - "CIM_BlockStatisticsService.GetStatisticsCollection(ManifestCollection)", - "CIM_BlockStatisticsService.GetStatisticsCollection(StatisticsFormat)" }] - string Statistics[]); - - [Description ( - "Creates a new BlockStatisticsManifestCollection " - "instance, whose members can serve as a filter for " - "metrics retrieved through the GetStatisticsCollection " - "method." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6..32767", - "32768..65535" }, - Values { "Ok", "Not Supported", "Unknown", "Timeout", - "Failed", "Invalid Parameter", "Method Reserved", - "Vendor Specific" }] - uint32 CreateManifestCollection( - [IN, Description ( - "The collection of statistics that will be filtered " - "using the new BlockStatisticsManifestCollection." )] - CIM_StatisticsCollection REF Statistics, - [IN, Description ( - "Client-defined name for the new " - "BlockStatisticsManifestCollection." )] - string ElementName, - [OUT, Description ( - "Reference to the new BlockStatisticsManifestCollection." - )] - CIM_BlockStatisticsManifestCollection REF ManifestCollection); - - [Description ( - "Method that creates or modifies a " - "BlockStatisticsManifest for this statistics service. A " - "client supplies a BlockStatisticsManifestCollection in " - "which the new BlockStatisticsManifest will be placed or " - "an existing BlockStatisticsManifest will be modified, " - "the element type of the statistics that the " - "BlockStatisticsManifest will filter, and a list of " - "metrics, which serves as a filter for statistical data " - "of that element type." ), - ValueMap { "0", "1", "2", "3", "4", "5", "..", "4096", - "4097", "4098", "4099..32767", "32768..65535" }, - Values { "Success", "Not Supported", "Unknown", "Timeout", - "Failed", "Invalid Parameter", "Method Reserved", - "Element Not Supported", "Metric not supported", - "ElementType Parameter Missing", "Method Reserved", - "Vendor Specific" }] - uint32 AddOrModifyManifest( - [IN, Description ( - "BlockStatisticsManifestCollection that the " - "BlockStatisticsManifest is or should be a member " - "of." )] - CIM_BlockStatisticsManifestCollection REF ManifestCollection, - [IN, Description ( - "The type of elements whose statistics the " - "BlockStatisticsManifest will filter." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "..", "0x8000.." }, - Values { "Computer System", - "Front-end Computer System", "Peer Computer System", - "Back-end Computer System", "Front-end Port", - "Back-end Port", "Volume", "Extent", "Disk Drive", - "Arbitrary LUs", "Remote Replica Group", - "DMTF Reserved", "Vendor Specific" }, - ModelCorrespondence { - "CIM_BlockStatisticsManifest.ElementType" }] - uint16 ElementType, - [IN, Description ( - "A client-defined string that identifies the " - "BlockStatisticsManifest created or modified by " - "this method." )] - string ElementName, - [IN, Description ( - "The metrics that will be included by the filter. " - "The metrics supplied here are the properties of " - "CIM_StatisticalData or one of its subclasses that " - "will remain after the BlockStatisticsManifest " - "filter is applied." )] - string StatisticsList[], - [OUT, Description ( - "The BlockStatisticsManifest that is created or " - "modified on successful execution of the method." )] - CIM_BlockStatisticsManifest REF Manifest); - - [Description ( - "Extrinsic method that removes manifests from a " - "BlockStatisticsManifestCollection." ), - ValueMap { "0", "1", "2", "3", "4", "5", "..", "4096", - "4097..32767", "32768..65535" }, - Values { "Success", "Not Supported", "Unknown", "Timeout", - "Failed", "Invalid Parameter", "Method Reserved", - "Manifest not found", "Method Reserved", "Vendor Specific" }] - uint32 RemoveManifests( - [IN, Description ( - "BlockStatisticsManifestCollection from which the " - "BlockStatisticsManifests will be removed." )] - CIM_BlockStatisticsManifestCollection REF ManifestCollection, - [IN, Description ( - "List of BlockStatisticsManifests to be removed " - "from the BlockStatisticsManifestCollection." )] - CIM_BlockStatisticsManifest REF Manifests[]); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_BlockStorageStatisticalData.mof b/build/vendor/dmtf_mof/Device/CIM_BlockStorageStatisticalData.mof deleted file mode 100644 index abcefe81..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_BlockStorageStatisticalData.mof +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::StorageStatistics" ), - Description ( - "A subclass of StatisticalData which identifies individual " - "statistics for an element of a block storage system. This " - "class defines the metrics that MAY be kept for managed " - "elements of the system." )] -class CIM_BlockStorageStatisticalData : CIM_StatisticalData { - - [Required, Description ( - "Defines the role that the element played for which this " - "statistics record was collected. If the metered element " - "is a system or a component of a system associated to a " - "RegisteredProfile, then that profile may provide a more " - "specialized definition and additional usage information " - "for this property. \n" - "Generally, the ElementTypes defined here have the " - "following meaning in the context of this class: 2, " - "\"Computer System\": Cumulative statistics for the " - "storage system. In the case of a complex system with " - "multiple component Computer Systems, these are the " - "statistics for the top-level aggregate Computer System. " - "3, \"Front-end Computer System\": Statistics for a " - "component computer system that communicate with systems " - "that initiate IO requests. 4, \"Peer Computer System\": " - "Statistics for a component computer system that " - "communicates with peer storage systems e.g. to provide " - "remote mirroring of a volume. 5, \"Back-end Computer " - "System\": Statistics for a component computer system " - "that communicates with back-end storage. 6, \"Front-end " - "Port\": Statistics for a port that communicates with " - "systems that initiate IO requests. 7, \"Back-end Port\": " - "Statistics for a port that initiates IO requests to " - "storage devices. 8, \"Volume\": Statistics for an " - "exposable storage extent, such as a StorageVolume or " - "LogicalDisk. 9, \"Extent\": Statistics for an " - "intermediate storage extent, i.e. an extent that is " - "neither a volume or a disk. 10, \"Disk Drive: Statistics " - "for a StorageExtent that is associated to a DiskDrive " - "through the MediaPresent association. 11, \"Arbitrary " - "LUs\": Statistics that derive from access to Logical " - "Units that are NOT StorageVolumes (e.g., controller " - "commands). 12, \"Remote Replica Group\": Statistics for " - "control IOs between an array and a remote mirror across " - "a Network. Note that statistics for the actual movement " - "of data to the remote mirror are attributed to the " - "targeted StorageVolume (or LogicalDisk). Note that a " - "particular element could be associated to multiple " - "BlockStorageStatisticalData instances if it had multiple " - "roles. For example, a storage array could contain " - "redundant component computer systems that communicate " - "both with hosts on the front end and disks on the back " - "end. Such a device could have one " - "BlockStorageStatisticalData instance where ElementType=3 " - "and another instance where ElementType=5." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "..", "0x8000.." }, - Values { "Computer System", "Front-end Computer System", - "Peer Computer System", "Back-end Computer System", - "Front-end Port", "Back-end Port", "Volume", "Extent", - "Disk Drive", "Arbitrary LUs", "Remote Replica Group", - "DMTF Reserved", "Vendor Specific" }] - uint16 ElementType; - - [Description ( "The cumulative count of I/Os for the object." ), - Counter] - uint64 TotalIOs; - - [Description ( - "The cumulative count of data transferred in Kbytes " - "(1024bytes = 1KByte)." ), - Units ( "KiloBytes" ), - Counter, PUnit ( "byte * 10^3" )] - uint64 KBytesTransferred; - - [Description ( - "The cumulative count of data written in Kbytes " - "(1024bytes = 1KByte)." ), - Units ( "KiloBytes" ), - Counter, PUnit ( "byte * 10^3" )] - uint64 KBytesWritten; - - [Description ( - "The cumulative elapsed I/O time (number of Clock Tick " - "Intervals) for all I/Os as defined in \'Total I/Os\'. " - "I/O response time is added to this counter at the " - "completion of each measured I/O using ClockTickInterval " - "units. This value can be divided by number of IOs to " - "obtain an average response time." ), - Counter] - uint64 IOTimeCounter; - - [Description ( "The cumulative count of all reads." ), - Counter] - uint64 ReadIOs; - - [Description ( - "The cumulative count of all read cache hits (Reads from Cache)." - ), - Counter] - uint64 ReadHitIOs; - - [Description ( - "The cumulative elapsed time for all Read I/Os for all " - "cumulative Read I/Os." ), - Counter] - uint64 ReadIOTimeCounter; - - [Description ( - "The cumulative elapsed time for all Read I/Os read from " - "cache for all cumulative Read I/Os." ), - Counter] - uint64 ReadHitIOTimeCounter; - - [Description ( - "The cumulative count of data read in Kbytes (1024bytes = 1KByte)." - ), - Units ( "KiloBytes" ), - Counter, PUnit ( "byte * 10^3" )] - uint64 KBytesRead; - - [Description ( "The cumulative count of all writes." ), - Counter] - uint64 WriteIOs; - - [Description ( - "The cumulative count of Write Cache Hits (Writes that " - "went directly to Cache)." ), - Counter] - uint64 WriteHitIOs; - - [Description ( - "The cumulative elapsed time for all Write I/Os for all " - "cumulative Writes." ), - Counter] - uint64 WriteIOTimeCounter; - - [Description ( - "The cumulative elapsed time using ClockTickInterval " - "units for all Write I/Os written to cache for all " - "cumulative Write I/Os." ), - Counter] - uint64 WriteHitIOTimeCounter; - - [Description ( - "The cumulative elapsed idle time using ClockTickInterval " - "units (Cumulative Number of Time Units for all idle time " - "in the array)." ), - Counter] - uint64 IdleTimeCounter; - - [Description ( - "The cumulative count of all disk maintenance operations " - "(SCSI commands such as: Verify, skip-mask, XOR read, XOR " - "write-read, etc).This is needed to understand the load " - "on the disks that may interfere with normal read and " - "write operations." ), - Counter] - uint64 MaintOp; - - [Description ( - "The cumulative elapsed disk mainenance time. " - "Maintainance response time is added to this counter at " - "the completion of each measured maintenance operation " - "using ClockTickInterval units." ), - Counter] - uint64 MaintTimeCounter; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_CDROMDrive.mof b/build/vendor/dmtf_mof/Device/CIM_CDROMDrive.mof deleted file mode 100644 index 7f5b036f..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_CDROMDrive.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_CDROMDrive -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageDevices" ), - Description ( - "Capabilities and managment of a CDROMDrive, a subtype of " - "MediaAccessDevice." )] -class CIM_CDROMDrive : CIM_MediaAccessDevice { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_CableModem.mof b/build/vendor/dmtf_mof/Device/CIM_CableModem.mof deleted file mode 100644 index 788b3bde..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_CableModem.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_CableModem -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::Modems" ), - Description ( - "The CableModem class represents a device for transmission " - "across a cable infrastructure." )] -class CIM_CableModem : CIM_ConnectionBasedModem { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_CacheMemory.mof b/build/vendor/dmtf_mof/Device/CIM_CacheMemory.mof deleted file mode 100644 index 889b9a14..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_CacheMemory.mof +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_CacheMemory -// ================================================================== - [Deprecated { "CIM_AssociatedCacheMemory" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::Memory" ), - Description ( - "Capabilities and management of Cache Memory. Cache memory is " - "dedicated or allocated RAM that a Processor searches first for " - "data, before going to \'regular\' memory. CacheMemory is used " - "to speed up the delivery of data to a Processor. It is usually " - "described by its closeness to the Processor (for example, " - "Primary or Secondary Cache). \n" - "If a DiskDrive includes RAM allocated for holding the disk\'s " - "most recently read and/or adjacent data (in order to speed up " - "retrieval), this also would be modeled as CacheMemory. Note " - "that CacheMemory is NOT operating system or application level " - "buffers but actual RAM allocated for caching data for a " - "Processor, from a hard disk, etc." )] -class CIM_CacheMemory : CIM_Memory { - - [Deprecated { "CIM_AssociatedCacheMemory.Level" }, - Description ( - "Defines whether this is the Primary (value=3), Secondary " - "(value=4) or Tertiary (value=5) Cache. Also, \"Other\" " - "(1), \"Unknown\" (2) and \"Not Applicable\" (6) can be " - "defined." ), - ValueMap { "1", "2", "3", "4", "5", "6" }, - Values { "Other", "Unknown", "Primary", "Secondary", - "Tertiary", "Not Applicable" }, - MappingStrings { "MIF.DMTF|System Cache|006.2" }] - uint16 Level; - - [Deprecated { "CIM_AssociatedCacheMemory.WritePolicy" }, - Description ( - "Defines whether this is write-back (value=3) or " - "write-through (value=4) Cache, or whether this " - "information \"Varies with Address\" (5) or is defined " - "individually for each I/O (6). Also, \"Other\" (1) and " - "\"Unknown\" (2) can be specified." ), - ValueMap { "1", "2", "3", "4", "5", "6" }, - Values { "Other", "Unknown", "Write Back", "Write Through", - "Varies with Address", "Determination Per I/O" }, - MappingStrings { "MIF.DMTF|System Cache|006.5" }] - uint16 WritePolicy; - - [Deprecated { "CIM_AssociatedCacheMemory.CacheType" }, - Description ( - "Defines whether this is for instruction caching " - "(value=3), data caching (value=4) or both (value=5, " - "\"Unified\"). Also, \"Other\" (1) and \"Unknown\" (2) " - "can be defined." ), - ValueMap { "1", "2", "3", "4", "5" }, - Values { "Other", "Unknown", "Instruction", "Data", "Unified" }, - MappingStrings { "MIF.DMTF|System Cache|006.9" }] - uint16 CacheType; - - [Deprecated { "CIM_AssociatedCacheMemory.LineSize" }, - Description ( - "Size, in bytes, of a single cache bucket or line." ), - Units ( "Bytes" ), - MappingStrings { "MIF.DMTF|System Cache|006.10" }, - PUnit ( "byte" )] - uint32 LineSize; - - [Deprecated { "CIM_AssociatedCacheMemory.ReplacementPolicy" }, - Description ( - "An integer enumeration describing the algorithm to " - "determine which cache lines or buckets should be " - "re-used." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Other", "Unknown", "Least Recently Used (LRU)", - "First In First Out (FIFO)", "Last In First Out (LIFO)", - "Least Frequently Used (LFU)", - "Most Frequently Used (MFU)", - "Data Dependent Multiple Algorithms" }, - MappingStrings { "MIF.DMTF|System Cache|006.12" }] - uint16 ReplacementPolicy; - - [Deprecated { "CIM_AssociatedCacheMemory.ReadPolicy" }, - Description ( - "Policy that shall be employed by the Cache for handling " - "read requests. For example, \"Read\", \"Read-Ahead\" or " - "both can be specified using the values, 3, 4 or 5, " - "respectively. If the read policy is determined " - "individually (ie, for each request), then the value 6 " - "(\"Determination per I/O\") should be specified. \"Other\" " - "(1) and \"Unknown\" (2) are also valid values." ), - ValueMap { "1", "2", "3", "4", "5", "6" }, - Values { "Other", "Unknown", "Read", "Read-Ahead", - "Read and Read-Ahead", "Determination Per I/O" }, - MappingStrings { "MIF.DMTF|System Cache|006.13" }] - uint16 ReadPolicy; - - [Deprecated { "CIM_AssociatedCacheMemory.FlushTimer" }, - Description ( - "Maximum amount of time, in seconds, dirty lines or " - "buckets may remain in the Cache before they are flushed. " - "A value of zero indicated that a cache flush is not " - "controlled by a flushing timer." ), - Units ( "Seconds" ), - MappingStrings { "MIF.DMTF|System Cache|006.14" }, - PUnit ( "second" )] - uint32 FlushTimer; - - [Deprecated { "CIM_AssociatedCacheMemory.Associativity" }, - Description ( - "An integer enumeration defining the system cache " - "associativity. For example, 6 indicates a fully " - "associative cache." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Other", "Unknown", "Direct Mapped", - "2-way Set-Associative", "4-way Set-Associative", - "Fully Associative", "8-way Set-Associative", - "16-way Set-Associative" }, - MappingStrings { "MIF.DMTF|System Cache|006.15" }] - uint16 Associativity; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_CallBasedModem.mof b/build/vendor/dmtf_mof/Device/CIM_CallBasedModem.mof deleted file mode 100644 index 0d76b67b..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_CallBasedModem.mof +++ /dev/null @@ -1,245 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_CallBasedModem -// ================================================================== - [Abstract, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Modems" ), - Description ( - "CIM_CallBasedModem is the superclass for grouping the numerous " - "types of call-based modems. The POTSModem is a type of call- " - "based Modem." )] -class CIM_CallBasedModem : CIM_Modem { - - [Description ( - "Indicates whether online fallback is enabled so that it " - "can be negotiated by the Modem." )] - boolean FallbackEnabled; - - [Description ( - "An array that enumerates all the compression protocols " - "that are supported by the Modem." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" }, - Values { "Unknown", "Other", "No Compression", "MNP 5", - "V.42bis", "MNP 3", "MNP 4", "V.58", "PEP", "HST" }, - ModelCorrespondence { - "CIM_CallBasedModem.OtherCompressionDescription" }] - uint16 CompressionSupported[]; - - [Description ( - "Description of the compression type when \"Other \" " - "(value=1) is defined in the CompressionSupported array. " - "If there are multiple \"Other\" types, then combine " - "their descriptions into a single string." ), - ModelCorrespondence { - "CIM_CallBasedModem.CompressionSupported" }] - string OtherCompressionDescription; - - [Description ( - "Describes the current data compression characteristics " - "of the Modem." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" }, - Values { "Unknown", "Other", "No Compression", "MNP 5", - "V.42bis", "MNP 3", "MNP 4", "V.58", "PEP", "HST" }, - ModelCorrespondence { - "CIM_CallBasedModem.CompressionSupported", - "CIM_CallBasedModem.OtherCompressionInfoDescription" }] - uint16 CompressionInfo; - - [Description ( - "Description of the current compression type when \"Other\" " - "(value=1) is specified in the CompressionInfo property." ), - ModelCorrespondence { "CIM_CallBasedModem.CompressionInfo" }] - string OtherCompressionInfoDescription; - - [Description ( - "An array that enumerates all the modulation protocols " - "that are supported by the Modem. The beginning entries " - "in the Values qualifier array are mapped from the " - "CIM_POTSModem ModulationScheme property." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26", "27", - "28", "29" }, - Values { "Unknown", "Other", "Not Supported", "Bell 103", - "Bell 212A", "V.22bis", "V.32", "V.32bis", "V.terbo", - "V.FC", "V.34", "V.34bis", "V.17 (G3 Fax Call)", "V.21", - "V.22", "V.23 Constant Carrier (1200/75)", - "V.23 Switched Carrier (Half Duplex)", "V.26bis", - "V.26ter", "V.27ter (G3 Fax Call)", - "V.29 HD (G3 Fax Call)", "V.34 HD (G3 Fax Call)", - "V.90 Issue 1 (Asymmetric)", "V.90 Issue 2 (Symmetric)", - "V.58", "X2", "K56FLEX", "V.Fast", "PEP", "HST" }, - ModelCorrespondence { - "CIM_CallBasedModem.OtherModulationDescription" }] - uint16 ModulationSupported[]; - - [Description ( - "Description of the current modulation type when \"Other\" " - "(value=1) is specified in the ModulationSupported " - "property. If there are multiple \"Other\" types, then " - "combine their descriptions into a single string." ), - ModelCorrespondence { "CIM_CallBasedModem.ModulationSupported" }] - string OtherModulationDescription; - - [Description ( - "Describes the current modulation scheme of the Modem." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26", "27", - "28", "29" }, - Values { "Unknown", "Other", "Not Supported", "Bell 103", - "Bell 212A", "V.22bis", "V.32", "V.32bis", "V.terbo", - "V.FC", "V.34", "V.34bis", "V.17 (G3 Fax Call)", "V.21", - "V.22", "V.23 Constant Carrier (1200/75)", - "V.23 Switched Carrier (Half Duplex)", "V.26bis", - "V.26ter", "V.27ter (G3 Fax Call)", - "V.29 HD (G3 Fax Call)", "V.34 HD (G3 Fax Call)", - "V.90 Issue 1 (Asymmetric)", "V.90 Issue 2 (Symmetric)", - "V.58", "X2", "K56FLEX", "V.Fast", "PEP", "HST" }, - ModelCorrespondence { - "CIM_CallBasedModem.ModulationSupported", - "CIM_CallBasedModem.OtherSchemeDescription" }] - uint16 ModulationScheme; - - [Description ( - "Description of the current modulation type when \"Other\" " - "(value=1) is specified in the ModulationScheme property." ), - ModelCorrespondence { "CIM_CallBasedModem.ModulationScheme" }] - string OtherSchemeDescription; - - [Description ( - "An array that enumerates the error control protocols " - "that are supported by the Modem. The beginning entries " - "in the Values qualifier array are mapped from the " - "CIM_POTSModem ErrorControlInfo property." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13" }, - Values { "Unknown", "Other", "No Error Correction", "MNP 4", - "LAPM", "V.58", "ECP Enhanced Cellular Protocol", - "ETC Enhanced Throughput Cellular", "MNP 1", "MNP 2", - "MNP 3", "MNP10", "PEP", "HST" }, - ModelCorrespondence { - "CIM_CallBasedModem.OtherErrorControlDescription" }] - uint16 ErrorControlSupported[]; - - [Description ( - "Description of the error control type when \"Other\" " - "(value= 1) is specified in the ErrorControlSupported " - "property. If there are multiple \"Other\" types, then " - "combine their descriptions into a single string." ), - ModelCorrespondence { - "CIM_CallBasedModem.ErrorControlSupported" }] - string OtherErrorControlDescription; - - [Description ( - "Describes the current error correction characteristics " - "of the Modem." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13" }, - Values { "Unknown", "Other", "No Error Correction", "MNP 4", - "LAPM", "V.58", "ECP Enhanced Cellular Protocol", - "ETC Enhanced Throughput Cellular", "MNP 1", "MNP 2", - "MNP 3", "MNP10", "PEP", "HST" }, - ModelCorrespondence { - "CIM_CallBasedModem.ErrorControlSupported", - "CIM_CallBasedModem.OtherErrorControlInfoDescription" }] - uint16 ErrorControlInfo; - - [Description ( - "Description of the error control when \"Other\" " - "(value=1) is defined as the value of the " - "ErrorControlInfo property." ), - ModelCorrespondence { "CIM_CallBasedModem.ErrorControlInfo" }] - string OtherErrorControlInfoDescription; - - [Description ( "Time of the last reset of the Modem." )] - datetime TimeOfLastReset; - - [Description ( - "The rate at which the receiver and transmitter are or " - "were last cooperating, on a call, before disconnection." ), - Units ( "Bits per Second" ), - PUnit ( "bit / second" )] - uint32 CallSpeed; - - [Description ( - "Status of the Modem. For example, information regarding " - "modem negotiation or whether the modem is connected " - "(values 8 and 9, respectively) can be conveyed in this " - "property." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10" }, - Values { "Unknown", "Other", "Offline", "On Hook", "Dialing", - "Waiting for Answer", "Ringing", "Modem Detected", - "Negotiating", "Online", "Error" }] - uint16 CallStatus; - - [Description ( - "Total number of characters sent by the Device on the " - "last or current call. A call in-progress is indicated by " - "the CallStatus property." ), - Counter] - uint32 CharsSent; - - [Description ( - "Total number of characters received by the Device on the " - "last or current call. A call in-progress is indicated by " - "the CallStatus property." ), - Counter] - uint32 CharsReceived; - - [Description ( - "Total number of characters lost by the Device on the " - "last or current call. A call in-progress is indicated by " - "the CallStatus property." ), - Counter] - uint32 CharsLost; - - [Description ( - "Total number of blocks sent by the Device on the last or " - "current call. A call in-progress is indicated by the " - "CallStatus property." ), - Counter] - uint32 BlocksSent; - - [Description ( - "Total number of blocks resent by the Device on the last " - "or current call. A call in-progress is indicated by the " - "CallStatus property." ), - Counter] - uint32 BlocksResent; - - [Description ( - "Total number of blocks received by the Device on the " - "last or current call. A call in-progress is indicated by " - "the CallStatus property." ), - Counter] - uint32 BlocksReceived; - - [Description ( - "Total number of block errors seen by the Device on the " - "last or current call. A call in-progress is indicated by " - "the CallStatus property." ), - Counter] - uint32 BlockErrors; - - [Description ( - "Length of the last or current call. A call in-progress " - "is indicated by the CallStatus property. The \'interval\' " - "format of the datetime data type should be used for the " - "property value." )] - datetime CallLength; - - [Description ( - "Last or current number dialed to which the statistics " - "apply, or NULL if the call was incoming." )] - string NumberDialed; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ChangerDevice.mof b/build/vendor/dmtf_mof/Device/CIM_ChangerDevice.mof deleted file mode 100644 index aefbaf61..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ChangerDevice.mof +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_ChangerDevice -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageLib" ), - Description ( - "ChangerDevices represent hardware that moves PhysicalMedia " - "within a System, such as a StorageLibrary." )] -class CIM_ChangerDevice : CIM_MediaTransferDevice { - - [Description ( - "The maximum time in seconds between a PickerElement pick " - "and place. It should be reported as the transit time " - "between the two most physically distant StorageMedia " - "Locations in a System. The maximum time interval for " - "moving a Media from one point to another is the sum of " - "the PickerElement\'s MaxPickTime, the ChangerDevice\'s " - "Max TransitTime and the PickerElement\'s MaxPutTime." ), - Units ( "Seconds" ), - PUnit ( "second" )] - uint32 MaxTransitTime; - - [Description ( - "Boolean set to TRUE if the Changer supports media " - "flipping. Media needs to be flipped when multi-sided " - "PhysicalMedia are placed into a MediaAccessDevice that " - "does NOT support dual sided access." )] - boolean MediaFlipSupported; - - [Description ( - "Boolean set to TRUE if an audit is currently being " - "performed by the Changer." )] - boolean AuditInProgress; - - [Description ( - "A count of the number of audits performed by the Changer." ), - Counter] - uint64 AuditsPerformed; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_CollectionOfSensors.mof b/build/vendor/dmtf_mof/Device/CIM_CollectionOfSensors.mof deleted file mode 100644 index b71cab0d..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_CollectionOfSensors.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_CollectionOfSensors -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::Sensors" ), - Description ( - "The CollectionOfSensors association indicates the Sensors that " - "make up a MultiStateSensor." )] -class CIM_CollectionOfSensors : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( "The MultiStateSensor." )] - CIM_MultiStateSensor REF GroupComponent; - - [Override ( "PartComponent" ), - Min ( 2 ), - Description ( - "A Sensor that is part of the MultiStateSensor." )] - CIM_Sensor REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_CompositeExtent.mof b/build/vendor/dmtf_mof/Device/CIM_CompositeExtent.mof deleted file mode 100644 index 040074b2..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_CompositeExtent.mof +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_CompositeExtent -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::StorageExtents" ), - Description ( - "A CompositeExtent is used to model the distribution of user " - "data across one or more underlying StorageExtents, which may " - "or not be protected by some redundancy mechanism. " - "CompositeExtents represent a contiguous range of logical " - "blocks. CompositeExtents may overlap, however, the underlying " - "StorageExtents within the overlap shall not contain any check " - "data. Distribution of check data may be specified using the " - "CompositeExtentBasedOn association." )] -class CIM_CompositeExtent : CIM_StorageExtent { - - [Override ( "NumberOfBlocks" ), - MappingStrings { "MIF.DMTF|Volume Set|001.3" }] - uint64 NumberOfBlocks; - - [Description ( - "Number of contiguous underlying StorageExtents counted " - "before looping back to the first underlying " - "StorageExtent of the current stripe. It is the number of " - "StorageExtents forming the user data stripe." ), - MappingStrings { "MIF.DMTF|Volume Set|001.4" }] - uint64 ExtentStripeLength; - - [Description ( - "Number of StorageExtents to stripe as a collective set. " - "In SCC, this value is defined as the number of stripes " - "to count before continuing to map into the next " - "contiguous set of Extents, beyond the current stripe." ), - MappingStrings { "MIF.DMTF|Volume Set|001.5" }] - uint64 ExtentInterleaveDepth; - - [Description ( - "True indicates that the data is concatenated across the " - "various StorageExtents in the Group." )] - boolean IsConcatenated; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_CompositeExtentBasedOn.mof b/build/vendor/dmtf_mof/Device/CIM_CompositeExtentBasedOn.mof deleted file mode 100644 index 8724d6ba..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_CompositeExtentBasedOn.mof +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Association, Version ( "2.19.0" ), - ClassConstraint { "inv: self.Dependent.IsComposite = true" }, - UMLPackagePath ( "CIM::Device::StorageExtents" ), - Description ( - "This specialization defines how data is striped across " - "StorageExtents. Additionally, it includes information on " - "distribution of check data so that the \'usual case\' RAID " - "devices can be created in one step." )] -class CIM_CompositeExtentBasedOn : CIM_BasedOn { - - [Override ( "Antecedent" ), - Min ( 1 ), - Description ( "The underlying StorageExtent." )] - CIM_StorageExtent REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The StorageExtent which is built on the StorageExtent." )] - CIM_StorageExtent REF Dependent; - - [Required, Override ( "OrderIndex" ), - Description ( - "Order matters to composite extents. An example of the " - "use of this property is when defining a RAID-0 striped " - "array of 3 disks. The resultant RAID array is a " - "composite extent that is dependent on (as described by " - "CompositeExtentBasedOn) the StorageExtents that " - "represent each of the 3 disks. The OrderIndex of each " - "CompositeExtentBasedOn association from the disk Extents " - "to the RAID array could be specified as 1, 2 and 3 to " - "indicate the order in which the disk Extents are used to " - "access the RAID data." ), - MappingStrings { "MIF.DMTF|Protected Space Extent|001.1" }] - uint16 OrderIndex; - - [Description ( - "True if logical blocks in the underlying StorageExtents " - "are mapped in decrementing order. This property " - "corresponds to the INCDEC value in the SCSI SCC-2 Volume " - "Set PS_Extent Descriptor." )] - boolean LBAsMappedByDecrementing; - - [Description ( - "True if the logical block mapping algorithm includes " - "check data bytes. This property corresponds to the " - "NOCHKSKIP attribute in the SCC-2 Volume Set PS_Extent " - "Descriptor." )] - boolean LBAMappingIncludesCheckData; - - [Description ( - "The total number of blocks that will be consumed on the " - "Dependent Extent. This is limited by the Antecedent\'s " - "NumberOfBlocks, but is included explicitly to provide " - "for the DMTF MIF mapping. In SCSI SCC, this is " - "equivalent to the NUMBER OF LBA_PS(s) field in the " - "Volume Set PS_Extent Descriptor." ), - MappingStrings { "MIF.DMTF|Protected Space Extent|001.3" }, - ModelCorrespondence { "CIM_StorageExtent.NumberOfBlocks" }] - uint64 NumberOfBlocks; - - [Description ( - "The Dependent\'s BlockSize is limited by the " - "Antecedent\'s. In SCSI SCC, this is equivalent to the " - "NUMBER OF BYTES PER LBA_PS field in the RedundancyGroup " - "P_Extent Descriptor." ), - Units ( "Bytes" ), - MappingStrings { "MIF.DMTF|Protected Space Extent|001.4" }, - ModelCorrespondence { "CIM_StorageExtent.BlockSize" }, - PUnit ( "byte" )] - uint64 BlockSize; - - [Description ( - "Number of bytes which form the stripe size for the " - "Dependent StorageExtent. If the CompositeExtent is " - "concatenated instead of striped, then " - "UserDataStripeDepth should be set to zero." ), - Units ( "Bytes" ), - MappingStrings { "MIF.DMTF|Protected Space Extent|001.6" }, - PUnit ( "byte" )] - uint64 UserDataStripeDepth; - - [Description ( - "Number of bytes of user data to skip before starting the " - "check data interleave." ), - Units ( "Bytes" ), - MappingStrings { "MIF.DMTF|Physical Extent|001.6" }, - PUnit ( "byte" )] - uint64 UnitsBeforeCheckDataInterleave; - - [Description ( - "Number of bytes to be reserved for check data." ), - Units ( "Bytes" ), - MappingStrings { "MIF.DMTF|Physical Extent|001.7" }, - PUnit ( "byte" )] - uint64 UnitsOfCheckData; - - [Description ( "Number of bytes to be reserved for user data." ), - Units ( "Bytes" ), - MappingStrings { "MIF.DMTF|Physical Extent|001.8" }, - PUnit ( "byte" )] - uint64 UnitsOfUserData; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ComputerSystemMemory.mof b/build/vendor/dmtf_mof/Device/CIM_ComputerSystemMemory.mof deleted file mode 100644 index 8e2a91b4..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ComputerSystemMemory.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ComputerSystemMemory -// ================================================================== - [Association, Deprecated { "CIM_SystemDevice" }, - Aggregation, Composition, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::Memory" ), - Description ( - "The use of this association has be deprecated in lieu of " - "SystemDevice. Association indicating that memory is installed " - "and required for the UnitaryComputerSystem to operate. Note " - "that this relationship inherits from the SystemDevice " - "association, and therefore, the Memory StorageExtent is weak " - "to the aggregating UnitaryComputerSystem." )] -class CIM_ComputerSystemMemory : CIM_SystemDevice { - - [Deprecated { "CIM_SystemDevice.GroupComponent" }, - Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The UnitaryComputerSystem." )] - CIM_UnitaryComputerSystem REF GroupComponent; - - [Deprecated { "CIM_SystemDevice.PartComponent" }, - Override ( "PartComponent" ), - Description ( - "The Memory StorageExtent which is part of the " - "UnitaryComputerSystem." )] - CIM_Memory REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ComputerSystemProcessor.mof b/build/vendor/dmtf_mof/Device/CIM_ComputerSystemProcessor.mof deleted file mode 100644 index 54d9a5db..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ComputerSystemProcessor.mof +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ComputerSystemProcessor -// ================================================================== - [Association, Deprecated { "CIM_SystemDevice" }, - Aggregation, Composition, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Processor" ), - Description ( - "Note: ComputerSystemProcessor is deprecated in lieu of its " - "superclass, SystemDevice, because it adds no detail and " - "changes none of the cardinalities in the definition of the " - "superclass. Deprecated description: An association that " - "indicates the processors of a UnitaryComputer System." )] -class CIM_ComputerSystemProcessor : CIM_SystemDevice { - - [Deprecated { "CIM_SystemDevice.GroupComponent" }, - Aggregate, Override ( "GroupComponent" ), - Description ( - "Note: This method is deprecated. Deprecated description: " - "The UnitaryComputerSystem." )] - CIM_UnitaryComputerSystem REF GroupComponent; - - [Deprecated { "CIM_SystemDevice.PartComponent" }, - Override ( "PartComponent" ), - Description ( - "Note: This method is deprecated. Deprecated description: " - "The Processor that is part of the UnitaryComputerSystem." )] - CIM_Processor REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ConfigurationReportingService.mof b/build/vendor/dmtf_mof/Device/CIM_ConfigurationReportingService.mof deleted file mode 100644 index 1c4e3532..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ConfigurationReportingService.mof +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ConfigurationReportingService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::StorageServices" ), - Description ( - "Service to provide reports on current configuration and " - "potential for growth. The service may be used in several " - "circumstances: \n" - "- To report growth potential (how many can I have) \n" - "- To report information on objects not directly modeled for " - "performance or other reasons. \n" - "It can also report counts of \'things\' or counts of \'units\'. " - "For example, the number of disk drives could be reported or " - "the capacity that they would provide." )] -class CIM_ConfigurationReportingService : CIM_Service { - - - [Description ( - "Returns a list of classes that the given Managed Element " - "supports or has installed." ), - ValueMap { "0", "1", "2", "3", "4", "..", "32768..65535" }, - Values { "Success", "Not Supported", "Unknown", "Timeout", - "Failed", "DMTF Reserved", "Vendor Specific" }] - uint32 GetClassTypes( - [IN, Description ( - "The type of inquiry to be performed." ), - ValueMap { "2", "3" }, - Values { "Supports", "Installed" }] - uint16 InquiryType, - [IN, Description ( - "False : Only report on elements directly contained " - "in/attached to the given ManagedElement. \n" - "True : Report on all objects contained in/attached " - "to the given ManagedElement." )] - boolean Recursive, - [IN, Description ( - "The target of query, for example a rack or a chassis." - )] - CIM_ManagedElement REF Target, - [IN ( false ), OUT, Description ( - "Array containing the class names (typically the " - "leaf classes) that the given ManagedElement can " - "support or has installed." )] - string ClassTypes[]); - - [Description ( - "Returns a list of UnitTypes that are installed for a " - "given ClassType on a given ManagedElement." ), - ValueMap { "0", "1", "2", "3", "4", "..", "32768..65535" }, - Values { "Success", "Not Supported", "Unknown", "Timeout", - "Failed", "DMTF Reserved", "Vendor Specific" }] - uint32 GetUnitTypes( - [IN, Description ( - "The type of inquiry to be performed." ), - ValueMap { "2", "3" }, - Values { "Supported", "Installed" }] - uint16 InquiryType, - [IN, Description ( - "False : Only report on elements directly contained " - "in/attached to the given ManagedElement. \n" - "True : Report on all objects contained in/attached " - "to the given ManagedElement." )] - boolean Recursive, - [IN, Description ( - "The target of query, for example a rack or a chassis." - )] - CIM_ManagedElement REF Target, - [IN, Description ( - "The ClassType for the query. This should be a " - "entry returned in the GetClassTypes.ClassTypes " - "property." )] - string ClassType, - [IN ( false ), OUT, Description ( - "A list of supported UnitTypes." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", - "10", "..", "32768..65535" }, - Values { "None", "Front Side", "Back Side", - "Contained", "Connected", "I/O", "Memory", - "StorageMediaLocation", "Megabytes", - "DMTF Reserved", "Vendor Specific" }, - ModelCorrespondence { - "CIM_ConfigurationReportingService.ReportCapacity(UnitType)" }] - uint16 UnitTypes[]); - - [Description ( - "Returns the maximum number supported or the number of " - "currently installed units for the given UnitType, for a " - "given ClassType on a given ManagedElement." ), - ValueMap { "0", "1", "2", "3", "4", "..", "32768..65535" }, - Values { "Success", "Not Supported", "Unknown", "Timeout", - "Failed", "DMTF Reserved", "Vendor Specific" }] - uint32 ReportCapacity( - [IN, Description ( - "The type of inquiry to be performed." ), - ValueMap { "2", "3" }, - Values { "Supported", "Installed" }] - uint16 InquiryType, - [IN, Description ( - "False : Only report on elements directly contained " - "in/attached to the given ManagedElement. \n" - "True : Report on all objects contained in/attached " - "to the given ManagedElement." )] - boolean Recursive, - [IN, Description ( - "The target of query, for example a rack or a chassis." - )] - CIM_ManagedElement REF Target, - [IN, Description ( - "The ClassType for the query. This should be a " - "entry returned in the GetClassTypes.ClassTypes " - "property." )] - string ClassType, - [IN, Description ( "The UnitType for the query." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", - "10", "..", "32768..65535" }, - Values { "None", "Front Side", "Back Side", - "Contained", "Connected", "I/O", "Memory", - "StorageMediaLocation", "Megabytes", - "DMTF Reserved", "Vendor Specific" }, - ModelCorrespondence { - "CIM_ConfigurationReportingService.GetUnitTypes(UnitTypes)" }] - uint16 UnitType, - [IN ( false ), OUT, Description ( - "The maximum number of supported or the number of " - "currently installed units." )] - uint64 NumberOfUnits); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ConnectionBasedModem.mof b/build/vendor/dmtf_mof/Device/CIM_ConnectionBasedModem.mof deleted file mode 100644 index 485a54e9..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ConnectionBasedModem.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ConnectionBasedModem -// ================================================================== - [Abstract, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Modems" ), - Description ( - "CIM_ConnectionBasedModem is the superclass for grouping the " - "numerous types of connection-based Modems. A CableModem is a " - "type of connection-based Modem." )] -class CIM_ConnectionBasedModem : CIM_Modem { - - [Description ( - "VendorID information is reported through Modem-specific " - "requests. For example, for ADSLModem Devices, the " - "VendorID is assigned by T1E1.4 according to T1.413, " - "Appendix D. The correct place in the CIM Schema for this " - "information is in PhysicalElement (the Manufacturer " - "property) for hardware and Product (the Vendor property) " - "if the information is related to Product acquisition. " - "This data is also reported here because it is part of " - "the standard output from the Device and is an " - "optimization." )] - string VendorID; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ControlledBy.mof b/build/vendor/dmtf_mof/Device/CIM_ControlledBy.mof deleted file mode 100644 index a36c13aa..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ControlledBy.mof +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ControlledBy -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( - "The ControlledBy relationship indicates which Devices are " - "controlled by a CIM_Controller." )] -class CIM_ControlledBy : CIM_DeviceConnection { - - [Override ( "Antecedent" ), - Description ( "The Controller." )] - CIM_Controller REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The controlled Device." )] - CIM_LogicalDevice REF Dependent; - - [Description ( - "The State property indicates whether the Controller is " - "actively commanding or accessing the Device (value=1) or " - "not (value=2). Also, the value, \"Unknown\" (0), can be " - "defined. This information is necessary when a " - "LogicalDevice can be commanded by, or accessed through, " - "multiple Controllers." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "Active", "Inactive" }] - uint16 AccessState; - - [Description ( - "The time that the downstream Device was last reset by " - "the Controller." )] - datetime TimeOfDeviceReset; - - [Description ( - "Number of hard resets issued by the Controller. A hard " - "reset returns the Device to its initialization or " - "boot-up state. All internal Device state information and " - "data are lost." ), - Counter] - uint32 NumberOfHardResets; - - [Description ( - "Number of soft resets issued by the Controller. A soft " - "reset does not completely clear current Device state or " - "data. Exact semantics are dependent on the Device and on " - "the protocols and mechanisms used to communicate with " - "the Device." ), - Counter] - uint32 NumberOfSoftResets; - - [Description ( - "Address of associated Device in context of the " - "antecedent Controller." )] - string DeviceNumber; - - [Description ( - "This property describes the accessibility of the device " - "through the antecedent controller." ), - ValueMap { "2", "3", "4" }, - Values { "ReadWrite", "ReadOnly", "NoAccess" }] - uint16 AccessMode; - - [Description ( - "The property describes the priority given to accesses of " - "the device through this controller. The highest priority " - "path will have the lowest value for this parameter." )] - uint16 AccessPriority; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_Controller.mof b/build/vendor/dmtf_mof/Device/CIM_Controller.mof deleted file mode 100644 index 0f39748d..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_Controller.mof +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// =================================================================== -// CIM_Controller -// =================================================================== - [Abstract, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( - "Controller is a superclass for grouping the miscellaneous " - "control-related Devices that provide a classic bus master " - "interface. Examples of Controllers are USBControllers, " - "SerialControllers, and so on. The Controller class is an " - "abstraction for Devices with a single protocol stack, which " - "exist to control communications (data, control, and reset) to " - "downstream devices. Note that a new abstract class " - "(ProtocolController) has been created to model more complex " - "interface controllers such as SCSI." )] -class CIM_Controller : CIM_LogicalDevice { - - [Description ( "Time of last reset of the Controller." )] - datetime TimeOfLastReset; - - [Description ( - "The protocol used by the Controller to access controlled Devices." - ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "14", "15", "16", "17", "18", "19", - "20", "21", "22", "23", "24", "25", "26", "27", "28", - "29", "30", "31", "32", "33", "34", "35", "36", "37", - "38", "39", "40", "41", "42", "43", "44", "45", "46", - "47", "48" }, - Values { "Other", "Unknown", "EISA", "ISA", "PCI", - "ATA/ATAPI", "Flexible Diskette", "1496", - "SCSI Parallel Interface", - // 10 - "SCSI Fibre Channel Protocol", - "SCSI Serial Bus Protocol", - "SCSI Serial Bus Protocol-2 (1394)", - "SCSI Serial Storage Architecture", "VESA", "PCMCIA", - "Universal Serial Bus", "Parallel Protocol", "ESCON", - "Diagnostic", // 20 - "I2C", - "Power", "HIPPI", "MultiBus", "VME", "IPI", "IEEE-488", - "RS232", "IEEE 802.3 10BASE5", "IEEE 802.3 10BASE2", - // 30 - "IEEE 802.3 1BASE5", - "IEEE 802.3 10BROAD36", "IEEE 802.3 100BASEVG", - "IEEE 802.5 Token-Ring", "ANSI X3T9.5 FDDI", "MCA", - "ESDI", "IDE", "CMD", "ST506", - // 40 - "DSSI", "QIC2", - "Enhanced ATA/IDE", "AGP", "TWIRP (two-way infrared)", - "FIR (fast infrared)", "SIR (serial infrared)", "IrBus", - "Serial ATA" }, - MappingStrings { "MIF.DMTF|Bus Port|004.2", - "MIF.DMTF|Disks|003.3" }, - ModelCorrespondence { "CIM_Controller.ProtocolDescription" }] - uint16 ProtocolSupported; - - [Description ( - "Maximum number of directly addressable entities that are " - "supported by this Controller. A value of 0 should be " - "used if the number is unknown or unlimited." ), - MappingStrings { "MIF.DMTF|Bus Port|004.9" }] - uint32 MaxNumberControlled; - - [Description ( - "A free-form string that provides more information that " - "is related to the ProtocolSupported by the Controller." ), - MappingStrings { "MIF.DMTF|Bus Port|004.3" }, - ModelCorrespondence { "CIM_Controller.ProtocolSupported" }] - string ProtocolDescription; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ControllerConfigurationService.mof b/build/vendor/dmtf_mof/Device/CIM_ControllerConfigurationService.mof deleted file mode 100644 index 29dd01df..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ControllerConfigurationService.mof +++ /dev/null @@ -1,497 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::ProtocolController" ), - Description ( - "The ControllerConfigurationService provides methods that allow " - "a client to manipulate LUN Masking in a storage system." )] -class CIM_ControllerConfigurationService : CIM_Service { - - - [Description ( - "This method creates an appropriate subclass of " - "ProtocolController. In addition to its role of " - "controlling downstream devices, a ProtocolControl is " - "used to provide a central management point for access " - "control with respect to those devices. Certain storage " - "system implementations across multiple vendors require " - "permissions to be established atomically with the " - "creation of a ProtocolController. This method provides " - "this capability via the Privilege and Identity " - "properties. By supplying appropriate information in " - "those properties, this method will assure that " - "appropriate AuthorizedTarget and AuthorizedSubject " - "associations, (as defined in the User and Security " - "Model), are instantiated to restrict access to the " - "logical devices \'behind\' it. \n" - "If multiple target ports are specified in the Ports " - "input parameter, all expose the same view (i.e., have " - "the same unit numbers and permissions). This method does " - "not create the port instances, but does create " - "ProtocolControllerForPort associations between the " - "specified ports and the new ProtocolController. The new " - "ProtocolController is defined to be weak to the same " - "System as the ControllerConfigurationService." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6..4095", "4096", - "4097", "4098", "4099..32767", "32768..65535" }, - Values { "Success", "Not Supported", "Unspecified Error", - "Timeout", "Failed", "Invalid Parameter", "DMTF Reserved", - "ID Parameter Missing or Not Unique", - "Hardware Implementation Requires Null Ports Parameter", - "Busy", "Method Reserved", "Vendor Specific" }] - uint32 CreateProtocolControllerWithPorts( - [IN, Description ( - "The string to be used in the ElementName of the " - "new ProtocolController." ), - ModelCorrespondence { - "CIM_ProtocolController.ElementName" }] - string ElementName, - [IN, Description ( - "Array of strings containing representations of " - "references to instances of CIM_LogicalPort (or " - "subclass) instances. This is the list of target " - "ports that are associated to the " - "ProtocolController. ProtocolControllerForPort " - "associations are created by the instrumentation " - "associating the new ProtocolController to these " - "ports. If this parameter is null, then all ports " - "in the storage system (this Service\'s \'scoping\' " - "System and all its ComponentCS Systems) are " - "attached to the new ProtocolController." )] - string Ports[], - [IN, Description ( - "The protocol type for the new ProtocolController." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "Other", "SCSI" }, - ModelCorrespondence { "CIM_SCSIProtocolController" }] - uint16 Protocol, - [IN, Description ( - "Reference to a CIM_Privilege (or subclass) " - "instance to be used as a template. If supplied, it " - "has a 1:1 correspondence with the Identity " - "parameter and this method will atomically create " - "the new ProtocolController instance and related " - "AuthorizedPrivilege, AuthorizedTarget and " - "AuthorizedSubject instances. \n" - "Note: if " - "ProtocolControllerRequiresAuthorizedIdentity is " - "true, then the Identity/Privilege pair MUST be " - "specified. If false, then the Identity/Privilege " - "pair MUST NOT be specified." ), - ModelCorrespondence { - "CIM_ControllerConfigurationService.CreateProtocolControllerWithPorts.Identity" }] - CIM_Privilege REF Privilege, - [IN, Description ( - "Reference to a CIM_ManagedElement (or subclass) " - "instance. This ManagedElement MUST be either a " - "CIM_Identity, or a CIM_Collection (or subclass, " - "eg. SystemSpecificCollection, Role, or Group) that " - "has CIM_Identities as MemberOfCollection. If " - "ProtocolControllerMaskingCapabilities.ProtocolControllerSupportsCollection " - "is false, the reference MUST be to a CIM_Identity " - "(or subclass). If present, it has a 1:1 " - "correspondence with the Privilege property. If " - "present, this method will atomically create the " - "new ProtocolController instance and instantiate a " - "missing AuthorizedSubject association between the " - "Privilege/Identity pair; and instantiate an " - "AuthorizedTarget association between the " - "AuthorizedPrivilege and the new " - "ProtocolController. \n" - "Note: if " - "ProtocolControllerRequiresAuthorizedIdentity is " - "true, then at least the Identity/Privilege pair " - "MUST be specified." ), - ModelCorrespondence { - "CIM_ControllerConfigurationService.CreateProtocolControllerWithPorts.Privilege" }] - CIM_ManagedElement REF Identity, - [IN ( false ), OUT, Description ( - "A reference to the new ProtocolController that is created." - )] - CIM_ProtocolController REF ProtocolController); - - [Description ( - "The method deletes an instance of ProtocolController and " - "all associations in which this ProtocolController is " - "referenced." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6..4095", "4096", - "4097", "4098..32767", "32768..65535" }, - Values { "Success", "Not Supported", "Unspecified Error", - "Timeout", "Failed", "Invalid Parameter", "DMTF Reserved", - "LogicalDevices Associated to Other ProtocolControllers Not Deleted", - "Busy", "Method Reserved", "Vendor Specific" }] - uint32 DeleteProtocolController( - [IN, Description ( - "The ProtocolController to be deleted." )] - CIM_ProtocolController REF ProtocolController, - [IN, Description ( - "If true, the management instrumentation provider " - "will also delete \'child\' ProtocolControllers " - "(i.e., those defined as Dependent references in " - "instances of AssociatedProtocolController where " - "this ProtocolController is the Antecedent " - "reference). Also, all direct associations " - "involving the \'child\' ProtocolControllers will " - "be removed." )] - boolean DeleteChildrenProtocolControllers, - [IN, Description ( - "If true, the management instrumentation provider " - "will also delete LogicalDevice instances " - "associated via ProtocolControllerForUnit, to this " - "ProtocolController and its children. (Note that " - "\'child\' controllers will only be affected if the " - "DeleteChildrenProtocolControllers input parameter " - "is TRUE). LogicalDevice instances are only deleted " - "if there are NO remaining " - "ProtocolControllerForUnit associations, to other " - "ProtocolControllers." )] - boolean DeleteUnits); - - [Description ( - "This method associates a LogicalDevice subclass " - "(specifically a StorageVolume or MediaAccessDevice " - "subclass) to the referenced ProtocolController. The " - "association is persisted as an instance of " - "ProtocolControllerForUnit. The management " - "instrumentation provider must verify that the logical " - "unit numbers (defined using the DeviceNumber input " - "parameter) are unique for the ProtocolController. When " - "the Protocol Controller is actively masking a device " - "(i.e. is part of an AuthorizedTarget association), the " - "provider should update the access configuration in the " - "underlying hardware as appropriate." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6..4095", "4096", - "4097", "4098", "4099", "4100", "4101..32767", - "32768..65535" }, - Values { "Success", "Not Supported", "Unspecified Error", - "Timeout", "Failed", "Invalid Parameter", "DMTF Reserved", - "Invalid LogicalDevice Instance", - "Device Number Conflict", - "DeviceNumber Parameter Must Be Provided", - "Hardware Implementation Requires Null DeviceNumber", - "Busy", "Method Reserved", "Vendor Specific" }] - uint32 AttachDevice( - [IN, Description ( "The ProtocolController instance." )] - CIM_ProtocolController REF ProtocolController, - [IN, Description ( - "The LogicalDevice instance to attach." )] - CIM_LogicalDevice REF Device, - [IN, OUT, Description ( - "The number assigned to " - "ProtocolControllerForUnit.DeviceNumber (if " - "supported by the hardware). Hardware support is " - "indicated by " - "ProtocolControllerMaskingCapabilities.ClientSelectableDeviceNumbers). " - "If the hardware does not support setting the " - "number, but the DeviceNumber has not been " - "established in an existing " - "ProtocolControllerForDevice subclass, then this " - "parameter\'s value will be used. If the " - "DeviceNumber has been established, then the " - "current number will be reused." ), - ModelCorrespondence { - "CIM_ProtocolControllerForUnit.DeviceNumber" }] - string DeviceNumber); - - [Description ( - "This method removes the ProtocolControllerForDevice " - "association subclass between the ProtocolController and " - "a LogicalDevice, such as a StorageVolume or a " - "MediaAccessDevice. When the ProtocolController is " - "actively masking a device (i.e. is part of an " - "AuthorizedTarget association, the management " - "instrumentation provider should update the hardware " - "access configuration when DetachDevice is called." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6..4095", "4096", - "4097", "4098..32767", "32768..65535" }, - Values { "Success", "Not Supported", "Unspecified Error", - "Timeout", "Failed", "Invalid Parameter", "DMTF Reserved", - "LogicalDevice Instance not Associated with Controller", - "Busy", "Method Reserved", "Vendor Specific" }] - uint32 DetachDevice( - [IN, Description ( "The ProtocolController instance." )] - CIM_ProtocolController REF ProtocolController, - [IN, Description ( - "The LogicalDevice instance to detach." )] - CIM_LogicalDevice REF Device); - - [Description ( - "Expose a list of SCSI logical units (such as RAID " - "volumes or tape drives) to a list of initiators through " - "a list of target ports, through one or more " - "SCSIProtocolControllers (SPCs). \n" - "\n" - "The parameters for this method are: Job - null if no job " - "created, otherwise this is a reference to the job. " - "LUNames - the list of names of the logical units to use. " - "InitiatorPortIDs - the names of the initiator ports to " - "use. TargetPortIDs - the names of the target ports to " - "use. DeviceNumbers - the device numbers (LUNs) to use. " - "DeviceAccesses - permissions for the logical units. " - "ProtocolControllers - SPCs involved in this operation. \n" - "\n" - "There are two modes of operation, create and modify. If " - "a NULL value is passed in for the SPC, then the " - "instrumentation will create at least one SPC that " - "satisfies the request. Depending upon the " - "instrumentation capabilities, more than one SPC MAY be " - "created. (e.g. if " - "CIM_ProtocolControllerMaskingCapabilities.OneHardwareIDPerView " - "is true and more than one initiatorID was passed in, " - "then one SPC per initiatorID will be created). If an SPC " - "is passed in, then the instrumentation attempts to add " - "the new paths to the existing SPC. Depending upon the " - "instrumentation capabilities, this MAY result in the " - "creation of additional SPCs. The instrumentation MAY " - "return an error if honoring this request would violate " - "SCSI semantics. \n" - "\n" - "For creating an SPC, the parameters that MUST be " - "specified are dependent upon the SPCAllows* properties " - "in CIM_ProtocolControllerMaskingCapabilities. If " - "SPCAllowsNoLUs is false, the caller MUST specify a list " - "of LUNames. If it is true, the caller MAY specify a list " - "of LUNames or MAY pass in null. If SPCAllowsNoTargets is " - "false and PortsPerView is not \'All Ports share the same " - "view\' the caller MUST specify a list of TargetPortIDs. " - "If it is true, the caller MAY specify a list of " - "TargetPortIDs or MAY pass in null. If " - "SPCAllowsNoInitiators is false, the caller MUST specify " - "a list of InitiatorPortIDs. If it is true, the caller " - "MAY specify a list of InitiatorPortIDs or MAY pass in " - "null. If LUNames is not null, the caller MUST specify " - "DeviceAccesses for each logical unit. If the " - "instrumentation\'s " - "CIM_ProtocolControllerMaskingCapabilities " - "ClientSelectableDeviceNumbers property is TRUE then the " - "client MAY provide a list of device numbers (LUNs) to " - "use for the paths to be created. If is false, the client " - "MUST pass in NULL for this parameter. \n" - "\n" - "The LUNames, DeviceNumbers, and DeviceAccesses " - "parameters are mutually indexed arrays - any element in " - "DeviceNumbers or DeviceAccesses will set a property " - "relative to the LogicalDevice instance named in the " - "corresponding element of LUNames. LUNames and " - "DeviceAccesses MUST have the same number of elements. " - "DeviceNumbers MUST be null (asking the instrumentation " - "to assign numbers) or have the same number of elements " - "as LUNames. If these conditions are not met, the " - "instrumentation MUST return a \'Invalid Parameter\' " - "status or a CIM_Error. \n" - "\n" - "For modifying an SPC, there are three specific use cases " - "identified. The instrumentation MUST support these use " - "cases. Other permutations are allowed, but are " - "vendor-specific. The use cases are: Add LUs to a view, " - "Add initiator IDs to a view, and Add target port IDs to " - "a view. Add LUs to a view requires that the LUNames " - "parameter not be null and that the InitiatorIDs and " - "TargetPortIDs parameters be null. DeviceNumbers MAY be " - "null if ClientSelectableDeviceNumbers is false. " - "DeviceAccesses MUST be specified. Add initiator IDs to a " - "view requires that the LUNames parameter be null, that " - "the InitiatorIDs not be null, and that the TargetPortIDs " - "parameters be null. DeviceNumbers and DeviceAccesses " - "MUST be null. Add target port IDs to a view requires " - "that the LUNames and InitiatorPortIDs parameters be null " - "and is only possible is PortsPerView is \'Multiple Ports " - "Per View\'. DeviceNumbers and DeviceAccesses MUST also " - "be null \n" - "\n" - "The relevant rules of SCSI semantics are: \n" - "- an SPC MAY NOT be exposed through a particular " - "host/target port pair that is in use by another SPC. (In " - "other words, an SPC and its associated logical units and " - "ports together correspond to the logical unit inventory " - "provided by SCSI REPORT LUNS and INQUIRY commands) \n" - "- each LogicalDevice associated to an SPC MUST have a " - "unique ProtocolControllerForUnit DeviceNumber (logical " - "unit number) \n" - "The instrumentation MUST report an error if the client " - "request would violate one of these rules. \n" - "\n" - "If the instrumentation provides " - "PrivilegeManagementService, the results of setting " - "DeviceAccesses MUST be synchronized with " - "PrivilegeManagementService as described in the " - "ProtocolControllerForUnit DeviceAccess description." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6..4095", "4096", - "4097", "4098", "4099", "4100", "4101", "4102", "4103", - "4104..32767", "32768..65535" }, - Values { "Success", "Not Supported", "Unspecified Error", - "Timeout", "Failed", "Invalid Parameter", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Invalid logical unit ID", "Invalid initiator port ID", - "Invalid target port ID", "Invalid permission", - "Target/initiator combination already exposed", - "Requested logical unit number in use", - "Maximum Map Count Exceeded", "Method Reserved", - "Vendor Specific" }] - uint32 ExposePaths( - [IN ( false ), OUT, Description ( - "Reference to the job if \'Method Parameters " - "Checked - Job Started\' is returned (MAY be null " - "if job completed)." )] - CIM_ConcreteJob REF Job, - [Required, IN, Description ( - "An array of IDs of logical unit instances. The LU " - "instances MUST already exist. The members of this " - "array MUST match the Name property of " - "LogicalDevice instances that represent SCSI " - "logical units. See the method description for " - "conditions where this MAY be null." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_LogicalDevice.Name", - "CIM_ControllerConfigurationService.ExposePaths.DeviceNumbers", - "CIM_ControllerConfigurationService.ExposePaths.DeviceAccesses" }] - string LUNames[], - [IN, Description ( - "IDs of initiator ports. If existing " - "StorageHardwareID instances exist, they MUST be " - "used. If no StorageHardwareID instance matches, " - "then one is implicitly created. See the method " - "description for conditions where this MAY be null." ), - ModelCorrespondence { "CIM_StorageHardwareID.StorageID" }] - string InitiatorPortIDs[], - [IN, Description ( - "IDs of target ports. See the method description " - "for conditions where this MAY be null." ), - ModelCorrespondence { "CIM_SCSIProtocolEndpoint.Name" }] - string TargetPortIDs[], - [IN, Description ( - "A list of logical unit numbers to assign to the " - "corresponding logical unit in the LUNames " - "parameter. (within the context of the elements " - "specified in the other parameters). If the LUNames " - "parameter is null, then this parameter MUST be " - "null. Otherwise, if this parameter is null, all LU " - "numbers are assigned by the hardware or " - "instrumentation." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_ProtocolControllerForUnit.DeviceNumberCIM_ControllerConfigurationService.ExposePaths.LUNames", - "CIM_ControllerConfigurationService.ExposePaths.DeviceAccesses" }] - string DeviceNumbers[], - [IN, Description ( - "A list of permissions to assign to the " - "corresponding logical unit in the LUNames " - "parameter. This specifies the permission to assign " - "within the context of the elements specified in " - "the other parameters. Setting this to \'No Access\' " - "assigns the DeviceNumber for the associated " - "initiators, but does not grant read or write " - "access. If the LUNames parameter is not null then " - "this parameter MUST be specified." ), - ValueMap { "0", "2", "3", "4", "5..15999", "16000.." }, - Values { "Unknown", "Read Write", "Read-Only", - "No Access", "DMTF Reserved", "Vendor Reserved" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_ProtocolControllerForUnit.DeviceAccessCIM_ControllerConfigurationService.ExposePaths.DeviceNumbers", - "CIM_ControllerConfigurationService.ExposePaths.LUNames" }] - uint16 DeviceAccesses[], - [IN, OUT, Description ( - "An array of references to SCSIProtocolControllers " - "(SPCs). On input, this can be null, or contain " - "exactly one element; there MAY be multiple " - "references on output. If null on input, the " - "instrumentation will create one or more new SPC " - "instances. If an SPC is specified, the " - "instrumentation will attempt to add associations " - "to one or more existing SPCs. If the first array " - "element is a valid SPC reference and SCSI " - "semantics can be preserved, the instrumentation " - "MUST attach associations to the specified SPC. If " - "multiple elements are non-null on input, the " - "instrumentation MUST report an invalid parameter. " - "On output, this is an array of references to SPCs " - "created or modified as the result of processing " - "the request." )] - CIM_SCSIProtocolController REF ProtocolControllers[]); - - [Description ( - "Hide a list of SCSI logical units (such as a RAID volume " - "or tape drive) from a list of initiators and/or target " - "ports on a SCSIProtocolController (SPC). \n" - "\n" - "The parameters for this method are: Job - null if no job " - "created, otherwise this is a reference to the job. " - "LUNames - the list of names of the logical units to use. " - "InitiatorPortIDs - the names of the initiator ports to " - "use. TargetPortIDs - the names of the target ports to " - "use. ProtocolControllers - SPCs involved in this " - "operation. \n" - "\n" - "When hiding logical units, there are three specific use " - "cases identified. The instrumentation MUST support these " - "use cases. Other permutations are allowed, but are " - "vendor-specific. The use cases are: Remove LUs from a " - "view, Remove initiator IDs from a view, and Remove " - "target port IDs from a view. Remove LUs from a view " - "requires that the LUNames parameter not be null and that " - "the InitiatorIDs and TargetPortIDs parameters be null. " - "Remove initiator IDs from a view requires that the " - "LUNames parameter be null, that the InitiatorIDs not be " - "null, and that the TargetPortIDs parameters be null. " - "Remove target port IDs from a view requires that the " - "LUNames and InitiatorPortIDs parameters be null. \n" - "\n" - "The disposition of the SPC when the last logical unit, " - "initiator ID, or target port ID is removed depends upon " - "the CIM_ProtocolControllerMaskingCapabilites " - "SPCAllowsNo* properties. If SPCAllowsNoLUs is false, " - "then the SPC is automatically deleted when the last " - "logical unit is removed. If SPCAllowsNoTargets is false, " - "then the SPC is automatically deleted when the last " - "target port ID is removed. If SPCAllowsNoInitiators is " - "false, then the SPC is automatically deleted when the " - "last initiator port ID is removed. In all other cases, " - "the SPC MUST be explicitly deleted via the " - "DeleteInstance intrinsic function." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6..4095", "4096", - "4097", "4098", "4099", "4100", "4101..32767", - "32768..65535" }, - Values { "Success", "Not Supported", "Unspecified Error", - "Timeout", "Failed", "Invalid Parameter", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Invalid logical unit ID", "Invalid initiator port ID", - "Invalid target port ID", - "Target/initiator combination not exposed", - "Method Reserved", "Vendor Specific" }] - uint32 HidePaths( - [IN ( false ), OUT, Description ( - "Reference to the job if \'Method Parameters " - "Checked - Job Started\' is returned (MAY be null " - "if job completed)." )] - CIM_ConcreteJob REF Job, - [Required, IN, Description ( - "A list of IDs of logical units. Each LU instance " - "MUST already exist. See the method description for " - "conditions where this MAY be null." ), - ModelCorrespondence { "CIM_LogicalDevice.Name" }] - string LUNames[], - [IN, Description ( - "IDs of initiator ports. See the method description " - "for conditions where this MAY be null." ), - ModelCorrespondence { "CIM_StorageHardwareID.StorageID" }] - string InitiatorPortIDs[], - [IN, Description ( - "IDs of target ports. See the method description " - "for conditions where this MAY be null." ), - ModelCorrespondence { "CIM_SCSIProtocolEndpoint.Name" }] - string TargetPortIDs[], - [IN, OUT, Description ( - "An array of references to SCSIProtocolControllers " - "(SPCs). On input, this MUST contain exactly one " - "element; there MAY be multiple references on " - "output. The instrumentation will attempt to remove " - "associations (LUNames, InitiatorPortIDs, or " - "TargetPortIDs) from this SPC. Depending upon the " - "specific implementation, the instrumentation MAY " - "need to create new SPCs with a subset of the " - "remaining associations. On output, this is an " - "array of references to SPCs created or modified as " - "the result of processing the request." )] - CIM_SCSIProtocolController REF ProtocolControllers[]); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_CoolingDevice.mof b/build/vendor/dmtf_mof/Device/CIM_CoolingDevice.mof deleted file mode 100644 index dceef948..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_CoolingDevice.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_CoolingDevice -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::CoolingAndPower" ), - Description ( "Capabilities and management of CoolingDevices." )] -class CIM_CoolingDevice : CIM_LogicalDevice { - - [Description ( - "ActiveCooling is a Boolean that indicates that the " - "Cooling Device provides active (as opposed to passive) " - "cooling." )] - boolean ActiveCooling; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_CurrentSensor.mof b/build/vendor/dmtf_mof/Device/CIM_CurrentSensor.mof deleted file mode 100644 index b7c27662..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_CurrentSensor.mof +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_CurrentSensor -// ================================================================== - [Deprecated { "CIM_NumericSensor" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::Sensors" ), - Description ( - "The use of this class is being deprecated in lieu of the " - "additions to Sensor and NumericSensor. A CurrentSensor can be " - "defined by setting the SensorType property, inherited from " - "Sensor, to 4 (\"Current\")." )] -class CIM_CurrentSensor : CIM_NumericSensor { - - [Deprecated { "No Value" }, - Override ( "SensorType" )] - uint16 SensorType = 4; - - [Deprecated { "No Value" }, - Override ( "BaseUnits" )] - uint16 BaseUnits = 6; - - [Deprecated { "No Value" }, - Override ( "UnitModifier" )] - sint32 UnitModifier = -3; - - [Deprecated { "No Value" }, - Override ( "RateUnits" )] - uint16 RateUnits = 0; - - [Deprecated { "No Value" }, - Override ( "CurrentReading" ), - MappingStrings { "MIF.DMTF|Electrical Current Probe|001.5" }] - sint32 CurrentReading; - - [Deprecated { "No Value" }, - Override ( "NominalReading" ), - MappingStrings { "MIF.DMTF|Electrical Current Probe|001.6" }] - sint32 NominalReading; - - [Deprecated { "No Value" }, - Override ( "NormalMax" ), - MappingStrings { "MIF.DMTF|Electrical Current Probe|001.7" }] - sint32 NormalMax; - - [Deprecated { "No Value" }, - Override ( "NormalMin" ), - MappingStrings { "MIF.DMTF|Electrical Current Probe|001.8" }] - sint32 NormalMin; - - [Deprecated { "No Value" }, - Override ( "MaxReadable" ), - MappingStrings { "MIF.DMTF|Electrical Current Probe|001.9" }] - sint32 MaxReadable; - - [Deprecated { "No Value" }, - Override ( "MinReadable" ), - MappingStrings { "MIF.DMTF|Electrical Current Probe|001.10" }] - sint32 MinReadable; - - [Deprecated { "No Value" }, - Override ( "Resolution" ), - Units ( "Tenths of MilliAmps" ), - MappingStrings { "MIF.DMTF|Electrical Current Probe|001.17" }, - PUnit ( "ampere * 10^-4" )] - uint32 Resolution; - - [Deprecated { "No Value" }, - Override ( "Tolerance" ), - MappingStrings { "MIF.DMTF|Electrical Current Probe|001.18" }] - sint32 Tolerance; - - [Deprecated { "No Value" }, - Override ( "Accuracy" ), - MappingStrings { "MIF.DMTF|Electrical Current Probe|001.19" }] - sint32 Accuracy; - - [Deprecated { "No Value" }, - Override ( "LowerThresholdNonCritical" ), - MappingStrings { "MIF.DMTF|Electrical Current Probe|001.11" }] - sint32 LowerThresholdNonCritical; - - [Deprecated { "No Value" }, - Override ( "UpperThresholdNonCritical" ), - MappingStrings { "MIF.DMTF|Electrical Current Probe|001.12" }] - sint32 UpperThresholdNonCritical; - - [Deprecated { "No Value" }, - Override ( "LowerThresholdCritical" ), - MappingStrings { "MIF.DMTF|Electrical Current Probe|001.13" }] - sint32 LowerThresholdCritical; - - [Deprecated { "No Value" }, - Override ( "UpperThresholdCritical" ), - MappingStrings { "MIF.DMTF|Electrical Current Probe|001.14" }] - sint32 UpperThresholdCritical; - - [Deprecated { "No Value" }, - Override ( "LowerThresholdFatal" ), - MappingStrings { "MIF.DMTF|Electrical Current Probe|001.15" }] - sint32 LowerThresholdFatal; - - [Deprecated { "No Value" }, - Override ( "UpperThresholdFatal" ), - MappingStrings { "MIF.DMTF|Electrical Current Probe|001.16" }] - sint32 UpperThresholdFatal; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_DSLModem.mof b/build/vendor/dmtf_mof/Device/CIM_DSLModem.mof deleted file mode 100644 index fe9e5f1d..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_DSLModem.mof +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DSLModem -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::Modems" ), - Description ( - "The DSLModem class represents the superclass for Digital " - "Subscriber Line (DSL) Devices. Properties will be defined in a " - "future release of the model." )] -class CIM_DSLModem : CIM_ConnectionBasedModem { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_DVDDrive.mof b/build/vendor/dmtf_mof/Device/CIM_DVDDrive.mof deleted file mode 100644 index 2f46796e..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_DVDDrive.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DVDDrive -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageDevices" ), - Description ( - "Capabilities and management of a DVDDrive, a subtype of " - "MediaAccessDevice." )] -class CIM_DVDDrive : CIM_MediaAccessDevice { - - [Description ( - "The CD and DVD formats that are supported by this " - "Device. For example, the Drive may support \"CD-ROM\" " - "and \"DVD-RAM\". In this case, the values 16 and 24 " - "would be written to the array. This property\'s values " - "align with those defined in PhysicalMedia.MediaType." ), - ValueMap { "0", "1", "16", "17", "18", "19", "22", "23", - "24", "25", "26", "27", "33", "34", "35", "36", "37", - "38", "39", "40", "41", "42" }, - Values { "Unknown", "Other", "CD-ROM", "CD-ROM/XA", "CD-I", - "CD Recordable", "DVD", "DVD-RW+", "DVD-RAM", "DVD-ROM", - "DVD-Video", "Divx", "CD-RW", "CD-DA", "CD+", - "DVD Recordable", "DVD-RW", "DVD-Audio", "DVD-5", "DVD-9", - "DVD-10", "DVD-18" }, - ModelCorrespondence { "CIM_PhysicalMedia.MediaType" }] - uint16 FormatsSupported[]; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_DesktopMonitor.mof b/build/vendor/dmtf_mof/Device/CIM_DesktopMonitor.mof deleted file mode 100644 index 2d01410b..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_DesktopMonitor.mof +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_DesktopMonitor -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::UserDevices" ), - Description ( - "Capabilities and management of the DesktopMonitor (CRT) " - "LogicalDevice." )] -class CIM_DesktopMonitor : CIM_Display { - - [Description ( - "The type of DesktopMonitor or CRT. For example, " - "multiscan color or monochrome monitors (values 2 or 3, " - "respectively) can be indicated in this property." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "Multiscan Color", - "Multiscan Monochrome", "Fixed Frequency Color", - "Fixed Frequency Monochrome" }] - uint16 DisplayType; - - [Description ( - "Monitor\'s bandwidth in MHertz. If unknown, enter 0." ), - Units ( "MegaHertz" ), - PUnit ( "hertz * 10^6" )] - uint32 Bandwidth; - - [Description ( - "The logical height of the Display in screen coordinates." )] - uint32 ScreenHeight; - - [Description ( - "The logical width of the Display in screen coordinates." )] - uint32 ScreenWidth; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_DeviceConnection.mof b/build/vendor/dmtf_mof/Device/CIM_DeviceConnection.mof deleted file mode 100644 index ad27ade4..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_DeviceConnection.mof +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_DeviceConnection -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::DeviceElements" ), - Description ( - "The DeviceConnection relationship indicates that two or more " - "Devices are connected together." )] -class CIM_DeviceConnection : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "A LogicalDevice." )] - CIM_LogicalDevice REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "A second LogicalDevice that is connected to the Antecedent Device." - )] - CIM_LogicalDevice REF Dependent; - - [Description ( - "When several bus and connection speeds are possible, the " - "NegotiatedSpeed property defines the one that is in use " - "between the Devices. Speed is specified in bits per " - "second. If connection or bus speeds are not negotiated, " - "or if this information is not available or not important " - "to Device management, the property should be set to 0." ), - Units ( "Bits per Second" ), - MappingStrings { "MIF.DMTF|Bus Port Association|001.2" }, - PUnit ( "bit / second" )] - uint64 NegotiatedSpeed; - - [Description ( - "When several bus and connection data widths are " - "possible, the NegotiatedDataWidth property defines the " - "one that is in use between the Devices. Data width is " - "specified in bits. If data width is not negotiated, or " - "if this information is not available or not important to " - "Device management, the property should be set to 0." ), - Units ( "Bits" ), - MappingStrings { "MIF.DMTF|Bus Port Association|001.3" }, - PUnit ( "bit" )] - uint32 NegotiatedDataWidth; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_DeviceErrorCounts.mof b/build/vendor/dmtf_mof/Device/CIM_DeviceErrorCounts.mof deleted file mode 100644 index 8b8e95c1..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_DeviceErrorCounts.mof +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DeviceErrorCounts -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::DeviceElements" ), - Description ( - "DeviceErrorCounts is a statistical class containing error- " - "related counters for a LogicalDevice. The types of errors are " - "defined by CCITT (Rec X.733) and ISO (IEC 10164-4). Note that " - "the CIM_DeviceErrorCountData class uses a simplified naming or " - "identity algorithm as compared to this class. " - "DeviceErrorCounts is not deprecated because its naming " - "algorithm is still in use in various implementations." )] -class CIM_DeviceErrorCounts : CIM_StatisticalInformation { - - [Key, Description ( - "The CreationClassName of the scoping System." ), - MaxLen ( 256 ), - Propagated ( "CIM_LogicalDevice.SystemCreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The Name of the scoping System." ), - MaxLen ( 256 ), - Propagated ( "CIM_LogicalDevice.SystemName" )] - string SystemName; - - [Key, Description ( - "The CreationClassName of the scoping Device." ), - MaxLen ( 256 ), - Propagated ( "CIM_LogicalDevice.CreationClassName" )] - string DeviceCreationClassName; - - [Key, Description ( "The ID of the scoping Device." ), - MaxLen ( 64 ), - Propagated ( "CIM_LogicalDevice.DeviceID" )] - string DeviceID; - - [Key, Override ( "Name" ), - Description ( - "The inherited Name serves as part of the key for the " - "DeviceErrorCounts instance. The object is scoped by the " - "LogicalDevice to which the statistics apply." ), - MaxLen ( 256 )] - string Name; - - [Description ( "Count of the indeterminate errors." ), - Counter] - uint64 IndeterminateErrorCount; - - [Description ( "Count of the critical errors." ), - Counter, MappingStrings { "MIF.DMTF|Operational State|006.7" }] - uint64 CriticalErrorCount; - - [Description ( "Count of the major errors." ), - Counter, MappingStrings { "MIF.DMTF|Operational State|006.8" }] - uint64 MajorErrorCount; - - [Description ( "Count of the minor errors." ), - Counter] - uint64 MinorErrorCount; - - [Description ( "Count of the warnings." ), - Counter, MappingStrings { "MIF.DMTF|Operational State|006.9" }] - uint64 WarningCount; - - - [Description ( - "Method to reset the error and warning counters. The " - "method takes one parameter as input, an integer that " - "indicates which counter to reset. For this input " - "parameter, 0 indicates all, 1 indicates a reset of the " - "indeterminate error counter, 2 the critical error " - "counter, 3 the major error counter, 4 the minor error " - "counter, and 5 the warning counter. The method returns 0 " - "if successful, 1 if not supported, and any other value " - "if an error occurred. A method is specified so that the " - "instrumentation of the LogicalDevice, which tabulates " - "the errors and warnings, can also reset its internal " - "processing and counters. \n" - "In a subclass, the set of possible return codes could be " - "specified, using a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \'translated\' " - "can also be specified in the subclass as a Values array " - "qualifier." )] - uint32 ResetCounter( - [IN, Description ( "The counter to reset." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "All", "Indeterminate Error Counter", - "Critical Error Counter", "Major Error Counter", - "Minor Error Counter", "Warning Counter" }] - uint16 SelectedCounter); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_DeviceErrorData.mof b/build/vendor/dmtf_mof/Device/CIM_DeviceErrorData.mof deleted file mode 100644 index 3351dd2d..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_DeviceErrorData.mof +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DeviceErrorData -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::DeviceElements" ), - Description ( - "DeviceErrorData is a statistical class that contains error- " - "related counters for a LogicalDevice. The types of errors are " - "defined by CCITT (Rec X.733) and ISO (IEC 10164-4). The " - "element, whose statistics are described, is associated using " - "the relationship, ElementStatisticalData. Note that this class " - "uses a simplified identity or naming algorithm over " - "CIM_DeviceErrorCounts." )] -class CIM_DeviceErrorData : CIM_StatisticalData { - - [Description ( "Count of the indeterminate errors." ), - Counter] - uint64 IndeterminateErrorCount; - - [Description ( "Count of the critical errors." ), - Counter, MappingStrings { "MIF.DMTF|Operational State|006.7" }] - uint64 CriticalErrorCount; - - [Description ( "Count of the major errors." ), - Counter, MappingStrings { "MIF.DMTF|Operational State|006.8" }] - uint64 MajorErrorCount; - - [Description ( "Count of the minor errors." ), - Counter] - uint64 MinorErrorCount; - - [Description ( "Count of the warnings." ), - Counter, MappingStrings { "MIF.DMTF|Operational State|006.9" }] - uint64 WarningCount; - - [Description ( - "LastErrorCode captures the last error code reported by " - "the LogicalDevice. While the device is in this error " - "condition, then the OperationalStatus of the " - "LogicalDevice should not reflect an \'Okay\' status. " - "When this error condition is cleared, then the " - "OperationalStatus of the LogicalDevice should report an " - "\'Okay\' status." )] - string LastErrorCode; - - [Description ( - "ErrorDescription is a free-form string that supplies " - "more information about the error recorded in " - "LastErrorCode, and information on any corrective actions " - "that might be taken." )] - string ErrorDescription; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_DeviceIdentity.mof b/build/vendor/dmtf_mof/Device/CIM_DeviceIdentity.mof deleted file mode 100644 index e1a2039d..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_DeviceIdentity.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DeviceIdentity -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::DeviceElements" ), - Description ( - "CIM_DeviceIdentity indicates that two LogicalDevices represent " - "different aspects of the same underlying entity. This " - "association refines the CIM_LogicalIdentity superclass by " - "restricting it to the Device level and defining its use in " - "well understood scenarios. One of these scenarios is to " - "represent that a Device is both a \'bus\' entity and a " - "\'functional\' entity. For example, a Device could be both a " - "PCI Device (or a USB Device), as well as a CIM_Keyboard. The " - "other scenario is where a Device plays multiple functional " - "roles that can not be distinguished by their hardware " - "realization alone. For example, a Fibre Channel adapter might " - "have aspects of both a NetworkAdapter and a SCSIController." )] -class CIM_DeviceIdentity : CIM_LogicalIdentity { - - [Override ( "SystemElement" ), - Description ( - "SystemElement represents one aspect of the Device." )] - CIM_LogicalDevice REF SystemElement; - - [Override ( "SameElement" ), - Description ( - "SameElement represents an alternate aspect of the System entity." - )] - CIM_LogicalDevice REF SameElement; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_DeviceServicesLocation.mof b/build/vendor/dmtf_mof/Device/CIM_DeviceServicesLocation.mof deleted file mode 100644 index 4bcf2152..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_DeviceServicesLocation.mof +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DeviceServicesLocation -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageLib" ), - Description ( - "Within an automated StorageLibrary, Media should be accessible " - "to the various robotics and MediaTransferDevices (Pickers, " - "Changers, InterLibraryPorts, etc.). The Library may be " - "serviced by different TransferDevices, each responsible for a " - "subset of the Library\'s StorageMediaLocations. The Device " - "ServicesLocation association indicates that the Transfer " - "Device handles Media stored in the referenced Location. For " - "example, LibraryPort \'A\' may only service Media from Slots " - "1-10, while LibraryPort \'B\' covers Slots 11-33. This detail " - "is conveyed by this association." )] -class CIM_DeviceServicesLocation : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "The MediaTransferDevice that handles Media from the " - "StorageMediaLocation." )] - CIM_MediaTransferDevice REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The MediaLocation that is serviced." )] - CIM_StorageMediaLocation REF Dependent; - - [Description ( - "Boolean indicating that the referenced " - "StorageMediaLocation is not currently accessible to the " - "MediaTransferDevice. For example, the Location could be " - "the realization of an InterLibraryPort that is currently " - "servicing another Library. The DeviceServicesLocation " - "association describes that the TransferDevice COULD " - "service the MediaLocation. This boolean indicates that " - "that this is temporarily not possible." )] - boolean Inaccessible; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_DeviceSharingCapabilities.mof b/build/vendor/dmtf_mof/Device/CIM_DeviceSharingCapabilities.mof deleted file mode 100644 index 4bfb14ad..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_DeviceSharingCapabilities.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Device::SCSI" ), - Description ( - "A class derived from Capabilities that describes the type of " - "access supported for a shared device." )] -class CIM_DeviceSharingCapabilities : CIM_Capabilities { - - [Description ( - "SupportedAccess describes the types of shared access " - "that are supported for the referenced LogicalDevice." ), - ValueMap { "0", "1", "2", "3", "4", "5", "..", "32768..65535" }, - Values { "Unknown", "Other", "No Access", "Exclusive Access", - "Shared Read", "Shared Full", "DMTF Reserved", - "Vendor Reserved" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_SharingDependency.CurrentAccess", - "CIM_DeviceSharingCapabilities.OtherSupportedAccessModes" }] - uint16 SupportedAccessModes[]; - - [Description ( - "A string value describing SupportedAccess when it has a " - "value of \"Other\"." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_DeviceSharingCapabilities.SupportedAccessModes" }] - string OtherSupportedAccessModes[]; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_DeviceSoftware.mof b/build/vendor/dmtf_mof/Device/CIM_DeviceSoftware.mof deleted file mode 100644 index 519727ba..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_DeviceSoftware.mof +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DeviceSoftware -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::DeviceElements" ), - Description ( - "The DeviceSoftware relationship identifies any software that " - "is associated with a Device such as drivers, configuration, or " - "application software, or firmware." )] -class CIM_DeviceSoftware : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The SoftwareElement." )] - CIM_SoftwareElement REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The LogicalDevice that requires or uses the software." )] - CIM_LogicalDevice REF Dependent; - - [Description ( - "An enumerated integer that indicates the role that this " - "software plays in regards to its associated Device. For " - "example, this software could be instrumentation " - "(value=5) or firmware (value=6)." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Unknown", "Other", "Driver", - "Configuration Software", "Application Software", - "Instrumentation", "Firmware", "BIOS", "Boot ROM" }, - MappingStrings { "MIF.DMTF|SubComponent Software|001.2" }, - ModelCorrespondence { "CIM_DeviceSoftware.PurposeDescription" }] - uint16 Purpose; - - [Description ( - "A free-form string that provides more information for " - "the Purpose property, for example, \"Application " - "Software\"." ), - ModelCorrespondence { "CIM_DeviceSoftware.Purpose" }] - string PurposeDescription; - - [Description ( - "Boolean that indicates that the software is \'burned " - "into\' or otherwise located on the hardware of the " - "LogicalDevice." )] - boolean LoadedOnDevice; - - [Description ( - "Boolean that indicates whether the software is " - "upgradeable, when it is LoadedOnDevice. Software that is " - "loaded as part of the OperatingSystem is typically " - "changeable and upgradeable. However, when DeviceSoftware " - "is burned into EEPROM or a chip that realizes the " - "LogicalDevice, then it might not be upgradeable. This " - "property indicates the ability to update and upgrade " - "DeviceSoftware." )] - boolean UpgradeableOnDevice; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_DiscreteSensor.mof b/build/vendor/dmtf_mof/Device/CIM_DiscreteSensor.mof deleted file mode 100644 index f514f8fe..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_DiscreteSensor.mof +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DiscreteSensor -// ================================================================== - [Deprecated { "CIM_Sensor" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::Sensors" ), - Description ( - "A DiscreteSensor has a set of legal string values, that it can " - "report. These values are enumerated in the Sensor\'s " - "PossibleValues property. A DiscreteSensor will always have a " - "\'current reading\' that corresponds to one of the enumerated " - "values. \n" - "The use of this class is being deprecated in lieu of " - "CIM_Sensor. Information in the CurrentReading and " - "PossibleValues properties will typically have the same values " - "and semantics as for the CurrentState and PossibleStates " - "properties, inherited from Sensor." )] -class CIM_DiscreteSensor : CIM_Sensor { - - [Deprecated { "CIM_Sensor.CurrentState" }, - Description ( "The current value indicated by the Sensor." ), - MaxLen ( 64 )] - string CurrentReading; - - [Deprecated { "CIM_Sensor.PossibleStates" }, - Description ( - "PossibleValues enumerates the string outputs that can be " - "reported by the DiscreteSensor." ), - MaxLen ( 64 )] - string PossibleValues[]; - - [Deprecated { "No Value" }, - Description ( - "AcceptableValues details which of the PossibleValues " - "strings are considered \'acceptable\' (ie, \'not an " - "error\')." ), - MaxLen ( 64 )] - string AcceptableValues[]; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_DiskDrive.mof b/build/vendor/dmtf_mof/Device/CIM_DiskDrive.mof deleted file mode 100644 index 8481c88a..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_DiskDrive.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DiskDrive -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageDevices" ), - Description ( - "Capabilities and managment of a DiskDrive, a subtype of " - "MediaAccessDevice." )] -class CIM_DiskDrive : CIM_MediaAccessDevice { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_DiskGroup.mof b/build/vendor/dmtf_mof/Device/CIM_DiskGroup.mof deleted file mode 100644 index 35322be0..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_DiskGroup.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DiskGroup -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::DiskGroup" ), - Description ( - "A DiskGroup is a named collection of DiskDrives and the " - "StorageExtents accessed using those Drives. The collection is " - "used to limit the BasedOn relationships of the Extents in the " - "DiskGroup. Extents in the Group cannot be BasedOn storage " - "accessed from Drives outside of the Group. For example, a " - "SoftwareVolume created within the DiskGroup is restricted to " - "be completely accessed using Drives in the Group. Actions such " - "as replicate or migrate on an Extent must operate within the " - "scope of the Extents that are present in the DiskGroup." )] -class CIM_DiskGroup : CIM_CollectionOfMSEs { - - [Key, Override ( "CollectionID" )] - string CollectionID; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_DiskPartition.mof b/build/vendor/dmtf_mof/Device/CIM_DiskPartition.mof deleted file mode 100644 index cddda2b9..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_DiskPartition.mof +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DiskPartition -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageExtents" ), - Description ( - "A DiskPartition is a presentation of a contiguous range of " - "logical blocks that is identifiable by the Operating System " - "via the Partition\'s type and subtype fields. Disk Partitions " - "should be directly realized by PhysicalMedia (indicated by the " - "RealizesDiskPartition association) or built on StorageVolumes " - "(indicated by the PartitionBasedOnVolume association." )] -class CIM_DiskPartition : CIM_MediaPartition { - - [Description ( - "Boolean indicating that the DiskPartition is labelled as " - "the primary partition for a ComputerSystem." )] - boolean PrimaryPartition; - - [Description ( "The type of Partition." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Primary", "Extended", "Logical" }] - uint16 PartitionType; - - [Description ( - "The \'sub\' type of a primary, extended, or logical " - "Partition. The list of possible values corresponds to " - "the decimal representation of the typical values in the " - "Partition record." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "14", "15", "16", "17", "18", "20", - "22", "23", "27", "28", "33", "35", "36", "38", "49", - "51", "52", "53", "54", "55", "60", "64", "65", "66", - "67", "80", "81", "82", "83", "84", "85", "86", "97", - "99", "100", "101", "102", "103", "104", "105", "113", - "115", "116", "117", "118", "119", "120", "121", "128", - "129", "130", "131", "132", "134", "135", "147", "148", - "161", "163", "164", "165", "166", "177", "179", "180", - "182", "183", "184", "193", "196", "198", "199", "216", - "219", "225", "227", "228", "229", "230", "239", "240", - "241", "242", "243", "244", "246", "254", "255", "65535" }, - Values { "Empty | Microsoft", "DOS 12-bit FAT", "XENIX root", - "XENIX usr", "DOS 16-bit FAT", "DOS Extended", - "DOS 16-bit FAT (> 32MB)", - "OS/2 HPFS | Win NTFS | QNX Ver 2 | Adv UNIX", - "AIX Boot | OS /2 | Dell (Array) | Commodore DOS", - "AIX Data, Coherent", "OS/2 Boot Manager", "32-bit FAT", - "32-bit FAT", "Microsoft 16-bit FAT", - "Microsoft DOS Extended", "OPUS | OS/2 2.0", - "OS/2 (MOSS) Inactive Type 1", - "Compaq Diagnostics Partition | Microsoft", - "OS/2 (MOSS) Inactive Type 4", - "OS/2 (MOSS) Inactive Type 6", - "OS/2 (MOSS) Inactive Type 7", - "OS/2 (MOSS) Inactive Type B", - "OS/2 (MOSS) Inactive Type C", "Microsoft", "Microsoft", - "Microsoft", "Microsoft", "Microsoft", "Microsoft", - "Microsoft", "OS/2 Logical Volume Manager", "Microsoft", - "OS/2 JFS Log", "PowerQuest", - "VENIX 80286 | Series/1 Disk", "Personal RISC Boot", - "Veritas", "Veritas", - "OnTrack Disk Manager Read Only DOS", - "OnTrack Disk Manager Read/Write DOS", - "CPM | Microport System V/386 | OnTrack Disk Mgr | Microsoft", - "OnTrack Disk Manager", "OnTrack Disk Manager Non-DOS", - "Micro House EZ-Drive Non-DOS", - "Golden Bow Vfeature | Microsoft", - "Storage Dimensions SpeedStor | Microsoft", - "UNIX - AT&T System V/386 | SCO UNIX", - "Novell NetWare | Speedstore", "Novell NetWare", - "Novell NetWare", "Novell", "Novell", "Novell", - "Microsoft", "Microsoft", "Microsoft", "PC/IX IBM", - "Microsoft", "QNX POSIX", "QNX POSIX (Secondary)", - "QNX POSIX (Secondary)", - "Minix (<=1.4a) | Linux | Microsoft", - "Minix (>=1.4b) | Microsoft", "Linux Swap | Prime", - "Linux Native | Apple", "System Hibernation for APM", - "Microsoft", "HPFS FT mirror", "Amoeba | Microsoft", - "Amoeba BBT | Microsoft", "Microsoft", "Microsoft", - "Microsoft", "BSD/386", "Microsoft", "Microsoft", - "Microsoft", "Microsoft", "Microsoft", - "BSDI fs | Microsoft", "BSDI Swap | Microsoft", - "Microsoft", "Microsoft", "Microsoft", - "Syrinx | HPFS FT Disabled Mirror", "CP/M 86", - "Digital Research CPM-86 | Concurrent DOS | OUTRIGGER", - "SpeedStor 12-bit FAT Extended", - "DOS Read-Only | Storage Dimensions", - "SpeedStor 16-bit FAT Extended", "Microsoft", "Microsoft", - "Intel", "OS/2 Raw Data", "Storage Dimensions", - "DOS (Secondary)", "Microsoft", - "SpeedStor Large | Storage Dimensions", "Microsoft", - "Lan Step | SpeedStor | IBM PS/2 IML", "Bad Block Tables", - "Unknown" }] - uint16 PartitionSubtype; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_DiskPartitionBasedOnVolume.mof b/build/vendor/dmtf_mof/Device/CIM_DiskPartitionBasedOnVolume.mof deleted file mode 100644 index b2b9b3f8..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_DiskPartitionBasedOnVolume.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DiskPartitionBasedOnVolume -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageExtents" ), - Description ( - "DiskPartitions should be BasedOn a single StorageVolume (for " - "example, exposed by a hardware RAID cabinet), an SCC " - "VolumeSet, or realized directly in PhysicalMedia. The first " - "two relationships are made explicit in this association. The " - "latter is conveyed by the RealizesDiskPartition association." )] -class CIM_DiskPartitionBasedOnVolume : CIM_BasedOn { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The StorageVolume." )] - CIM_StorageVolume REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The DiskPartition which is built on the Volume." )] - CIM_DiskPartition REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_DisketteDrive.mof b/build/vendor/dmtf_mof/Device/CIM_DisketteDrive.mof deleted file mode 100644 index 0e7911c8..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_DisketteDrive.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DisketteDrive -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageDevices" ), - Description ( - "Capabilities and managment of a DisketteDrive, a subtype of " - "MediaAccessDevice." )] -class CIM_DisketteDrive : CIM_MediaAccessDevice { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_Display.mof b/build/vendor/dmtf_mof/Device/CIM_Display.mof deleted file mode 100644 index 36af3f99..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_Display.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Display -// ================================================================== - [Abstract, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::UserDevices" ), - Description ( - "Display is a superclass for grouping the miscellaneous display " - "devices that exist." )] -class CIM_Display : CIM_UserDevice { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_Door.mof b/build/vendor/dmtf_mof/Device/CIM_Door.mof deleted file mode 100644 index 667265f2..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_Door.mof +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_Door -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::UserDevices" ), - Description ( - "A Door is the abstraction of hardware providing access to the " - "internal componentry of a System. When a Door is \'opened\', " - "typically all accessible, moving components are stopped or " - "suspended to prevent physical harm." )] -class CIM_Door : CIM_LogicalDevice { - - [Description ( - "Boolean indicating the \'open\' (TRUE) or \'closed\' " - "(FALSE) status of the Door." )] - boolean Open; - - [Description ( - "Boolean indicating that the Door is \'locked\' (TRUE) or " - "\'unlocked\' (FALSE). When the Door is locked, access to " - "the componentry is prevented, without the use of a " - "physical key or the issuance of a software unlock " - "command." )] - boolean Locked; - - [Description ( - "When a Door is \'Open\', all accessible, moving " - "componentry and Device operation are typically stopped. " - "The Timeout property provides a mechanism to event on a " - "Door left open for a period of time (in seconds) " - "exceeding the property\'s value." ), - Units ( "Seconds" ), - PUnit ( "second" )] - uint32 Timeout; - - [Description ( "Date and time that the Door was last opened." )] - datetime LastOpened; - - [Description ( - "The Capabilities of the Door. For example, information " - "on whether the Door is \"Host System Lockable\" " - "(value=2) and/or whether a key is available (value=3) " - "are specified in this property. The value 4, \"All " - "Drives Dismounted Before Access\", pertains to a Door on " - "a StorageLibrary or set of drive bays. If specified for " - "the Door, it means that it can not be opened unless all " - "Media are first unloaded from the accessible " - "MediaAccessDevices." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "Host System Lockable", - "Physical Key", "All Drives Dismounted Before Access" }] - uint16 Capabilities[]; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_DoorAccessToDevice.mof b/build/vendor/dmtf_mof/Device/CIM_DoorAccessToDevice.mof deleted file mode 100644 index e937c163..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_DoorAccessToDevice.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DoorAccessToDevice -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::UserDevices" ), - Description ( - "Doors provide access to PhysicalElements for hot swap, repair " - "and similar activities. In turn, PhysicalElements \'Realize\' " - "LogicalDevices. Since it may not be possible to define all the " - "PhysicalElements that exist, and optimizing the retrieval of " - "Devices \'behind\' the Door may be desirable, the DoorAccessTo " - "Device association provides a shortcut mechanism for defining " - "the LogicalDevices (\'hardware\') accessed through a Door." )] -class CIM_DoorAccessToDevice : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The Door that provides access." )] - CIM_Door REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The LogicalDevice that is accessed." )] - CIM_LogicalDevice REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_DoorAccessToPhysicalElement.mof b/build/vendor/dmtf_mof/Device/CIM_DoorAccessToPhysicalElement.mof deleted file mode 100644 index af955ac5..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_DoorAccessToPhysicalElement.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DoorAccessToPhysicalElement -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::UserDevices" ), - Description ( - "Doors provide access to PhysicalElements for hot swap, repair " - "and similar activities. The entities accessed through a Door " - "are indicated in this relationship." )] -class CIM_DoorAccessToPhysicalElement : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The Door that provides access." )] - CIM_Door REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The PhysicalElement that is accessed." )] - CIM_PhysicalElement REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_DriveInDiskGroup.mof b/build/vendor/dmtf_mof/Device/CIM_DriveInDiskGroup.mof deleted file mode 100644 index 66675f2e..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_DriveInDiskGroup.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DriveInDiskGroup -// ================================================================== - [Association, Aggregation, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::DiskGroup" ), - Description ( - "CIM_DriveInDiskGroup defines the DiskDrives that participate " - "in the Group." )] -class CIM_DriveInDiskGroup : CIM_CollectedMSEs { - - [Aggregate, Override ( "Collection" ), - Max ( 1 ), - Description ( - "The DiskGroup. A Drive is a member of at most one DiskGroup." - )] - CIM_DiskGroup REF Collection; - - [Override ( "Member" ), - Description ( "The DiskDrive in the Group." )] - CIM_DiskDrive REF Member; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ESCONController.mof b/build/vendor/dmtf_mof/Device/CIM_ESCONController.mof deleted file mode 100644 index c0b0773c..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ESCONController.mof +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ESCONController -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( "Capabilities and management of an ESCONController." )] -class CIM_ESCONController : CIM_Controller { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ErrorCountersForDevice.mof b/build/vendor/dmtf_mof/Device/CIM_ErrorCountersForDevice.mof deleted file mode 100644 index 37c8e877..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ErrorCountersForDevice.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ErrorCountersForDevice -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::DeviceElements" ), - Description ( - "ErrorCountersForDevice relates the DeviceErrorCounts class to " - "the LogicalDevice to which it applies." )] -class CIM_ErrorCountersForDevice : CIM_Statistics { - - [Override ( "Stats" ), - Weak, Description ( - "The statistical object, in this case, the error counter class." - )] - CIM_DeviceErrorCounts REF Stats; - - [Override ( "Element" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The Device to which the error counters apply." )] - CIM_LogicalDevice REF Element; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_EthernetAdapter.mof b/build/vendor/dmtf_mof/Device/CIM_EthernetAdapter.mof deleted file mode 100644 index 2a562669..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_EthernetAdapter.mof +++ /dev/null @@ -1,299 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_EthernetAdapter -// ================================================================== - [Deprecated { "CIM_EthernetPort" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::NetworkAdapter" ), - Description ( - "Note: The use of the CIM_EthernetAdapter class has been " - "deprecated, consistent with NetworkAdapter. Instead use the " - "CIM_EthernetPort class. \n" - "Deprecated description: This class describes the capabilities " - "and management aspects of an EthernetAdapter." )] -class CIM_EthernetAdapter : CIM_NetworkAdapter { - - [Deprecated { "CIM_EthernetPort.NetworkAddresses" }, - Override ( "NetworkAddresses" ), - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Ethernet/802.3 MAC addresses " - "formatted as twelve hexadecimal digits (for example, " - "\"010203040506\"), with each pair representing one of " - "the six octets of the MAC address in \"canonical\" bit " - "order. (Therefore, the Group address bit is found in the " - "low order bit of the first character of the string.)" ), - ArrayType ( "Indexed" )] - string NetworkAddresses[]; - - [Deprecated { "CIM_EthernetPort.MaxDataSize" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The maximum size of the INFO " - "(non-MAC) field that will be received or transmitted." ), - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dTpPortMaxInfo" }] - uint32 MaxDataSize; - - [Deprecated { "CIM_EthernetPort.Capabilities" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Capabilities of the " - "EthernetAdapter. For example, the Device might support " - "AlertOnLan, WakeOnLan, Load Balancing, or FailOver. If " - "failover or load balancing capabilities are listed, a " - "SpareGroup (failover) or ExtraCapacityGroup (load " - "balancing) should also be defined to completely describe " - "the capability." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "AlertOnLan", "WakeOnLan", - "FailOver", "LoadBalancing" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_EthernetAdapter.CapabilityDescriptions" }] - uint16 Capabilities[]; - - [Deprecated { "CIM_EthernetPort.CapabilityDescriptions" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: An array of free-form strings " - "that provides more detailed explanations for any of the " - "EthernetAdapter features that are indicated in the " - "Capabilities array. Note, each entry of this array is " - "related to the entry in the Capabilities array that is " - "located at the same index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_EthernetAdapter.Capabilities" }] - string CapabilityDescriptions[]; - - [Deprecated { "CIM_EthernetPort.EnabledCapabilities" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Specifies which capabilities are " - "enabled from the list of all supported ones, which are " - "defined in the Capabilities array." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "AlertOnLan", "WakeOnLan", - "FailOver", "LoadBalancing" }, - ModelCorrespondence { "CIM_EthernetAdapter.Capabilities" }] - uint16 EnabledCapabilities[]; - - [Deprecated { "CIM_EthernetPortStatistics.SymbolErrors" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of times there was an " - "invalid data symbol when a valid carrier was present. " - "The count is incremented at most once per carrier event, " - "even if multiple symbol errors occur during the carrier " - "event." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsSymbolErrors" }] - uint32 SymbolErrors; - - [Deprecated { "CIM_NetworkPortStatistics.PacketsTransmitted" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The total number of packets that " - "are transmitted." ), - Counter, MappingStrings { - "MIF.DMTF|Network Adapter 802 Port|001.6" }] - uint64 TotalPacketsTransmitted; - - [Deprecated { "CIM_NetworkPortStatistics.PacketsReceived" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The total number of packets that " - "are received." ), - Counter, MappingStrings { - "MIF.DMTF|Network Adapter 802 Port|001.8" }] - uint64 TotalPacketsReceived; - - [Deprecated { "CIM_EthernetPortStatistics.AlignmentErrors" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: A count of frames that were " - "received on a particular interface, are not an integral " - "number of octets in length, and do not pass the FCS " - "check. The count that is represented by an instance of " - "this object is incremented when the alignment Error " - "status is returned by the MAC layer to the LLC (or other " - "MAC user). Received frames for which multiple error " - "conditions obtained are, according to the conventions of " - "IEEE 802.3 Layer Management, counted exclusively " - "according to the error status presented to the LLC." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsAlignmentErrors" }] - uint32 AlignmentErrors; - - [Deprecated { "CIM_EthernetPortStatistics.FCSErrors" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: A count of frames that were " - "received on a particular interface and are an integral " - "number of octets in length, but do not pass the FCS " - "check. The count represented by an instance of this " - "object is incremented when the frame CheckError status " - "is returned by the MAC layer to the LLC (or other MAC " - "user). Received frames for which multiple error " - "conditions obtained are, according to the conventions of " - "IEEE 802.3 Layer Management, counted exclusively " - "according to the error status presented to the LLC." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsFCSErrors" }] - uint32 FCSErrors; - - [Deprecated { - "CIM_EthernetPortStatistics.SingleCollisionFrames" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: A count of successfully " - "transmitted frames on a particular interface for which " - "transmission is inhibited by exactly one collision. A " - "frame that is counted by an instance of this object is " - "not counted by the corresponding instance of the " - "MultipleCollisionFrames property." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsSingleCollisionFrames" }] - uint32 SingleCollisionFrames; - - [Deprecated { - "CIM_EthernetPortStatistics.MultipleCollisionFrames" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: A count of successfully " - "transmitted frames on a particular interface for which " - "transmission is inhibited by more than one collision. A " - "frame that is counted by an instance of this object is " - "not counted by the corresponding instance of the " - "SingleCollisionFrames property." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsMultipleCollisionFrames" }] - uint32 MultipleCollisionFrames; - - [Deprecated { "CIM_EthernetPortStatistics.SQETestErrors" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: A count of times that the SQE " - "TEST ERROR message is generated by the PLS sublayer for " - "a particular interface. The SQE TEST ERROR message is " - "defined in section 7.2.2.2.4 of ANSI/IEEE 802.3-1985 and " - "its generation is described in section 7.2.4.6 of the " - "same document." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsSQETestErrors" }] - uint32 SQETestErrors; - - [Deprecated { - "CIM_EthernetPortStatistics.DeferredTransmissions" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: A count of frames for which the " - "first transmission attempt on a particular interface is " - "delayed because the medium is busy. The count " - "represented by an instance of this object does not " - "include the frames that are involved in collisions." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsDeferredTransmissions" }] - uint32 DeferredTransmissions; - - [Deprecated { "CIM_EthernetPortStatistics.LateCollisions" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of times that a " - "collision is detected on a particular interface later " - "than 512 bit-times into the transmission of a packet. " - "Five hundred and twelve bit-times corresponds to 51.2 " - "microseconds on a 10 Mbit/s system. A late collision " - "included in a count that is represented by an instance " - "of this object is also considered to be a generic " - "collision for purposes of other collision-related " - "statistics." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsLateCollisions" }] - uint32 LateCollisions; - - [Deprecated { "CIM_EthernetPortStatistics.ExcessiveCollisions" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: A count of frames for which " - "transmission on a particular interface fails due to " - "excessive collisions." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsExcessiveCollisions" }] - uint32 ExcessiveCollisions; - - [Deprecated { - "CIM_EthernetPortStatistics.InternalMACTransmitErrors" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: A count of frames for which " - "transmission on a particular interface fails due to an " - "internal MAC sublayer transmit error. A frame is counted " - "by an instance of this object only if it is not counted " - "by the corresponding instance of the LateCollisions " - "property, the Excessive Collisions property, or the " - "CarrierSenseErrors property. The precise meaning of the " - "count represented by an instance of this object is " - "implementation-specific. In particular, an instance of " - "this object might represent a count of transmission " - "errors on a particular interface that are not otherwise " - "counted." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsInternalMacTransmitErrors" }] - uint32 InternalMACTransmitErrors; - - [Deprecated { - "CIM_EthernetPortStatistics.InternalMACReceiveErrors" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: A count of frames for which " - "reception on a particular interface fails due to an " - "internal MAC sublayer receive error. A frame is counted " - "by an instance of this object only if it is not counted " - "by the corresponding instance of the FrameTooLongs " - "property the AlignmentErrors property, or the FCSErrors " - "property. The precise meaning of the count that is " - "represented by an instance of this object is " - "implementation-specific. In particular, an instance of " - "this object might represent a count of receive errors on " - "a particular interface that are not otherwise counted." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsInternalMacReceiveErrors" }] - uint32 InternalMACReceiveErrors; - - [Deprecated { "CIM_EthernetPortStatistics.CarrierSenseErrors" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of times that the " - "carrier sense condition was lost or never asserted when " - "attempting to transmit a frame on a particular " - "interface. The count represented by an instance of this " - "object is incremented, at most, once per transmission " - "attempt, even if the carrier sense condition fluctuates " - "during a transmission attempt." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsCarrierSenseErrors" }] - uint32 CarrierSenseErrors; - - [Deprecated { "CIM_EthernetPortStatistics.FrameTooLongs" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: A count of frames that are " - "received on a particular interface that exceeds the " - "maximum permitted frame size. The count that is " - "represented by an instance of this object is incremented " - "when the FrameTooLong status is returned by the MAC " - "layer to the LLC (or other MAC user). Received frames " - "for which multiple error conditions obtained are, " - "according to the conventions of IEEE 802.3 Layer " - "Management, counted exclusively according to the error " - "status presented to the LLC." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsFrameTooLongs" }] - uint32 FrameTooLongs; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_EthernetPort.mof b/build/vendor/dmtf_mof/Device/CIM_EthernetPort.mof deleted file mode 100644 index a5f2b51e..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_EthernetPort.mof +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_EthernetPort -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Ports" ), - Description ( "Capabilities and management of an EthernetPort." )] -class CIM_EthernetPort : CIM_NetworkPort { - - [Override ( "PortType" ), - Description ( - "The specific mode that is currently enabled for the " - "Port. When set to 1 (\"Other\"), the related property " - "OtherPortType contains a string description of the type " - "of port." ), - ValueMap { "0", "1", "50", "51", "52", "53", "54", "55", - "56", "100", "101", "102", "103", "104", "105", "106", - "107", "108", "109", "110", "111", "16000..65535" }, - Values { "Unknown", "Other", - //50 Copper - "10BaseT", "10-100BaseT", - "100BaseT", "1000BaseT", "2500BaseT", "10GBaseT", - "10GBase-CX4", //100 Fiber - "100Base-FX", - "100Base-SX", "1000Base-SX", "1000Base-LX", "1000Base-CX", - "10GBase-SR", "10GBase-SW", "10GBase-LX4", "10GBase-LR", - "10GBase-LW", "10GBase-ER", "10GBase-EW", "Vendor Reserved" }] - uint16 PortType; - - [Override ( "NetworkAddresses" ), - Description ( - "Ethernet/802.3 MAC addresses formatted as twelve " - "hexadecimal digits (for example, \"010203040506\"), with " - "each pair representing one of the six octets of the MAC " - "address in \"canonical\" bit order. (Therefore, the " - "Group address bit is found in the low order bit of the " - "first character of the string.)" )] - string NetworkAddresses[]; - - [Description ( - "The maximum size of the INFO (non-MAC) field that will " - "be received or transmitted." ), - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dTpPortMaxInfo" }] - uint32 MaxDataSize; - - [Description ( - "Capabilities of the EthernetPort. For example, the " - "Device might support AlertOnLan, WakeOnLan, Load " - "Balancing, or FailOver. If failover or load balancing " - "capabilities are listed, a SpareGroup (failover) or " - "ExtraCapacityGroup (load balancing) should also be " - "defined to completely describe the capability." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "AlertOnLan", "WakeOnLan", - "FailOver", "LoadBalancing" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_EthernetPort.CapabilityDescriptions" }] - uint16 Capabilities[]; - - [Description ( - "An array of free-form strings that provides more " - "detailed explanations for any of the EthernetPort " - "features that are indicated in the Capabilities array. " - "Note, each entry of this array is related to the entry " - "in the Capabilities array that is located at the same " - "index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_EthernetPort.Capabilities" }] - string CapabilityDescriptions[]; - - [Description ( - "Specifies which capabilities are enabled from the list " - "of all supported ones, which are defined in the " - "Capabilities array." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "AlertOnLan", "WakeOnLan", - "FailOver", "LoadBalancing" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_EthernetPort.Capabilities", - "CIM_EthernetPort.OtherEnabledCapabilities" }] - uint16 EnabledCapabilities[]; - - [Description ( - "An array of free-form strings that provides more " - "detailed explanations for any of the enabled " - "capabilities that are specified as \'Other\'." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_EthernetPort.EnabledCapabilities" }] - string OtherEnabledCapabilities[]; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_EthernetPortStatistics.mof b/build/vendor/dmtf_mof/Device/CIM_EthernetPortStatistics.mof deleted file mode 100644 index e79d5bca..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_EthernetPortStatistics.mof +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_EthernetPortStatistics -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Ports" ), - Description ( - "The EthernetPortStatistics class describes the statistics for " - "the EthernetPort." )] -class CIM_EthernetPortStatistics : CIM_NetworkPortStatistics { - - [Override ( "PacketsTransmitted" ), - Description ( - "The total number of packets that are transmitted." ), - Counter, MappingStrings { - "MIF.DMTF|Network Adapter 802 Port|001.6" }] - uint64 PacketsTransmitted; - - [Override ( "PacketsReceived" ), - Description ( - "The total number of packets that are received." ), - Counter, MappingStrings { - "MIF.DMTF|Network Adapter 802 Port|001.8" }] - uint64 PacketsReceived; - - [Description ( - "The number of times that there was an invalid data " - "symbol when a valid carrier was present. The count can " - "be incremented only once per carrier event, even if " - "multiple symbol errors occur during the carrier event." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsSymbolErrors" }] - uint32 SymbolErrors; - - [Description ( - "The number of frames that are received on a particular " - "interface that are not an integral number of octets in " - "length and do not pass the FCS check. The count " - "represented by an instance of this object is incremented " - "when the alignment error status is returned by the MAC " - "layer to the LLC (or other MAC user). Received frames " - "for which multiple error conditions obtained are, " - "according to the conventions of IEEE 802.3 Layer " - "Management, counted exclusively according to the error " - "status presented to the LLC." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsAlignmentErrors" }] - uint32 AlignmentErrors; - - [Description ( - "The number of frames that are received on a particular " - "interface that are an integral number of octets in " - "length, but do not pass the FCS check. The count " - "represented by an instance of this object is incremented " - "when the frame check error status is returned by the MAC " - "layer to the LLC (or other MAC user). Received frames " - "for which multiple error conditions obtained are, " - "according to the conventions of the error status " - "presented to the LLC." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsFCSErrors" }] - uint32 FCSErrors; - - [Description ( - "The number of successfully transmitted frames on a " - "particular interface for which transmission is inhibited " - "by exactly one collision. A frame that is counted by an " - "instance of this object is not counted by the " - "corresponding instance of the MultipleCollisionFrames " - "property." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsSingleCollisionFrames" }] - uint32 SingleCollisionFrames; - - [Description ( - "The number of successfully transmitted frames on a " - "particular interface for which transmission is inhibited " - "by more than one collision. A frame that is counted by " - "an instance of this object is not counted by the " - "corresponding instance of the SingleCollisionFrames " - "property." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsMultipleCollisionFrames" }] - uint32 MultipleCollisionFrames; - - [Description ( - "The number of times that the SQE TEST ERROR message is " - "generated by the PLS sublayer for a particular " - "interface. The SQE TEST ERROR message is defined in " - "section 7.2.2.2.4 of ANSI/IEEE 802.3-1985 and its " - "generation is described in section 7.2.4.6 of the same " - "document." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsSQETestErrors" }] - uint32 SQETestErrors; - - [Description ( - "The number of frames for which the first transmission " - "attempt on a particular interface is delayed because the " - "medium is busy. The count represented by an instance of " - "this object does not include frames involved in " - "collisions." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsDeferredTransmissions" }] - uint32 DeferredTransmissions; - - [Description ( - "The number of times that a collision is detected on a " - "particular interface later than 512 bit-times into the " - "transmission of a packet. Five hundred and twelve bit- " - "times corresponds to 51.2 microseconds on a 10 Mbit/s " - "system. A (late) collision included in a count " - "represented by an instance of this object is also " - "considered as a (generic) collision for purposes of " - "other collision-related statistics." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsLateCollisions" }] - uint32 LateCollisions; - - [Description ( - "The number of frames for which transmission on a " - "particular interface fails due to excessive collisions." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsExcessiveCollisions" }] - uint32 ExcessiveCollisions; - - [Description ( - "The number of frames for which transmission on a " - "particular interface fails due to an internal MAC " - "sublayer transmit error. A frame is counted by an " - "instance of this object only if it is not counted by the " - "corresponding instance of either the LateCollisions " - "property, the Excessive Collisions property, or the " - "CarrierSenseErrors property. The precise meaning of the " - "count that is represented by an instance of this object " - "is implementation-specific. In particular, an instance " - "of this object can represent a count of transmission " - "errors on a particular interface that are not otherwise " - "counted." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsInternalMacTransmitErrors" }] - uint32 InternalMACTransmitErrors; - - [Description ( - "The number of frames for which reception on a particular " - "interface fails due to an internal MAC sublayer receive " - "error. A frame is counted by an instance of this object " - "only if it is not counted by the corresponding instance " - "of either the FrameTooLongs property, the " - "AlignmentErrors property, or the FCSErrors property. The " - "precise meaning of the count that is represented by an " - "instance of this object is implementation-specific. For " - "example, an instance of this object can represent a " - "count of receive errors on a particular interface that " - "are not otherwise counted." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsInternalMacReceiveErrors" }] - uint32 InternalMACReceiveErrors; - - [Description ( - "The number of times that the carrier sense condition was " - "lost or never asserted when attempting to transmit a " - "frame on a particular interface. The count represented " - "by an instance of this object can be incremented only " - "once per transmission attempt, even if the carrier sense " - "condition fluctuates during a transmission attempt." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsCarrierSenseErrors" }] - uint32 CarrierSenseErrors; - - [Description ( - "The number of frames received on a particular interface " - "that exceed the maximum permitted frame size. The count " - "represented by an instance of this object is incremented " - "when the FrameTooLong status is returned by the MAC " - "layer to the LLC (or other MAC user). Received frames " - "for which multiple error conditions obtained are, " - "according to the conventions of IEEE 802.3 Layer " - "Management, counted exclusively according to the error " - "status presented to the LLC." ), - Counter, MappingStrings { - "MIB.IETF|EtherLike-MIB.dot3StatsFrameTooLongs" }] - uint32 FrameTooLongs; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ExtentInDiskGroup.mof b/build/vendor/dmtf_mof/Device/CIM_ExtentInDiskGroup.mof deleted file mode 100644 index 535b8164..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ExtentInDiskGroup.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ExtentInDiskGroup -// ================================================================== - [Association, Aggregation, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::DiskGroup" ), - Description ( - "CIM_ExtentInDiskGroup defines the StorageExtents that are " - "located within and restricted by the Group." )] -class CIM_ExtentInDiskGroup : CIM_CollectedMSEs { - - [Aggregate, Override ( "Collection" ), - Max ( 1 ), - Description ( - "The DiskGroup. An Extent is defined within at most one DiskGroup." - )] - CIM_DiskGroup REF Collection; - - [Override ( "Member" ), - Description ( - "The StorageExtent that is restricted by and " - "participating in the Group." )] - CIM_StorageExtent REF Member; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_FCAdapterEventCounters.mof b/build/vendor/dmtf_mof/Device/CIM_FCAdapterEventCounters.mof deleted file mode 100644 index 5fc53e81..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_FCAdapterEventCounters.mof +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FCAdapterEventCounters -// ================================================================== - [Deprecated { "CIM_FCPortStatistics" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::NetworkAdapter" ), - Description ( - "Note: The use of the FCAdapterEventCounters class is " - "deprecated because FibreChannelAdapter is deprecated. " - "FCPortStatistics should be used instead, but it redefines the " - "level at which data is collected. Therefore, there is no " - "direct translation of the individual counters between the two " - "classes. This object describes event counters that were " - "specific to a FibreChannelAdapter." )] -class CIM_FCAdapterEventCounters : CIM_DeviceStatisticalInformation { - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of Abort sequence " - "frames received." ), - Counter] - uint64 ABTSFramesReceived; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of Abort sequence " - "frames sent." ), - Counter] - uint64 ABTSFramesSent; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of frames busied by " - "the Fabric." ), - Counter] - uint64 FBSYsReceived; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of frames busied by " - "the receiving Node." ), - Counter] - uint64 PBSYsReceived; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of frames busied by " - "the Adapter itself." ), - Counter] - uint64 PBSYsSent; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of frames rejected by " - "the Fabric." ), - Counter] - uint64 FRJTsReceived; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of frames rejected by " - "the receiving Node." ), - Counter] - uint64 PRJTsReceived; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of frames rejected by " - "the Adapter itself." ), - Counter] - uint64 PRJTsSent; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of PRLI frames sent " - "where the response was LS_RJT." ), - Counter] - uint64 PRLIsRejected; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of PRLO frames sent " - "where the response was LS_RJT." ), - Counter] - uint64 PRLOsRejected; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of Abort sequence " - "frames sent where the response was BA_RJT." ), - Counter] - uint64 ABTSFramesRejected; - - - [Deprecated { "CIM_FCPortStatistics.ResetSelectedStats()" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Method to reset the Adapter " - "event counters. The method takes, as input, an integer " - "that indicates which counter to reset. For this input 0 " - "indicates all and 1 through 11 indicate a reset of the " - "individual counters. The method returns 0 if successful, " - "1 if not supported, and any other value if an error " - "occurred. A method is specified so that the " - "instrumentation of the Device, which tabulates the " - "errors and warnings, can also reset its internal " - "processing and counters. \n" - "In a subclass, the set of possible return codes could be " - "specified, using a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \'translated\' " - "can also be specified in the subclass as a Values array " - "qualifier." )] - uint32 ResetCounter( - [IN, Description ( "The counter to reset." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", - "9", "10", "11" }, - Values { "All", "ABTSFramesReceived", "ABTSFramesSent", - "FBSYReceived", "PBSYReceived", "PBSYSent", - "FRJTReceived", "PRJTReceived", "PRJTSent", - "PRLIRejected", "PRLORejected", "ABTSFramesRejected" }] - uint16 SelectedCounter); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_FCPort.mof b/build/vendor/dmtf_mof/Device/CIM_FCPort.mof deleted file mode 100644 index b8e60078..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_FCPort.mof +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Fix FCPort.PortType -// descriptionAdd UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FCPort -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::FC" ), - Description ( - "Capabilities and management of a Fibre Channel Port Device." )] -class CIM_FCPort : CIM_NetworkPort { - - [Override ( "PortType" ), - Description ( - "The specific mode currently enabled for the Port. If the " - "port is logged in, this will be the negotiated port " - "type, otherwise the configured port type will be " - "reported. \n" - "The values: \"N\" = Node Port, \"NL\" = Node Port " - "supporting FC arbitrated loop, \"NX\" = Port may " - "negotiate to become either a node port (N) or a node " - "port supporting FC arbitrated loop (NL), \"E\" = " - "Expansion Port connecting fabric elements (for example, " - "FC switches), \"F\" = Fabric (element) Port, \"FL\" = " - "Fabric (element) Port supporting FC arbitrated loop, " - "\"FX\" = Port may negotiate to become a fabric port (F), " - "or a fabric port supporting FC arbitrated loop (FL). \"B\" " - "= Bridge port, and \"G\" = Port may negotiate to become " - "either an expansion port (E), or a fabric port (F), \"GL\" " - "= Port may negotiate to become an expansion port (E), a " - "fabric port (F), or a fabric port supporting FC " - "arbitrated loop (FL). \n" - "PortTypes are defined in the ANSI X3 standards. When set " - "to 1 (\"Other\"), the related property OtherPortType " - "contains a string description of the type of port." ), - ValueMap { "0", "1", "10", "11", "12", "13", "14", "15", - "16", "17", "18", "16000..65535" }, - Values { "Unknown", "Other", "N", "NL", "F/NL", "Nx", "E", - "F", "FL", "B", "G", "Vendor Reserved" }] - uint16 PortType; - - [Description ( - "An array of integers that indicates the Fibre Channel " - "Classes of Service that are supported. The active COS " - "are indicated in ActiveCOS." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7" }, - Values { "Unknown", "1", "2", "3", "4", "5", "6", "F" }] - uint16 SupportedCOS[]; - - [Description ( - "An array of integers that indicates the Classes of " - "Service that are active. The Active COS is indicated in " - "ActiveCOS." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7" }, - Values { "Unknown", "1", "2", "3", "4", "5", "6", "F" }, - ModelCorrespondence { "CIM_FCPort.SupportedCOS" }] - uint16 ActiveCOS[]; - - [Description ( - "An array of integers that indicates the Fibre Channel " - "FC-4 protocols supported. The protocols that are active " - "and running are indicated in the ActiveFC4Types " - "property." ), - ValueMap { "0", "1", "4", "5", "8", "9", "17", "18", "19", - "21", "22", "23", "25", "26", "27", "28", "32", "34", - "36", "64", "80", "81", "82", "88", "96", "255" }, - Values { "Unknown", "Other", "ISO/IEC 8802 - 2 LLC", - "IP over FC", "SCSI - FCP", "SCSI - GPP", - "IPI - 3 Master", "IPI - 3 Slave", "IPI - 3 Peer", - "CP IPI - 3 Master", "CP IPI - 3 Slave", - "CP IPI - 3 Peer", "SBCCS Channel", "SBCCS Control Unit", - "FC-SB-2 Channel", "FC-SB-2 Control Unit", - "Fibre Channel Services (FC-GS, FC-GS-2, FC-GS-3)", - "FC-SW", "FC - SNMP", "HIPPI - FP", "BBL Control", - "BBL FDDI Encapsulated LAN PDU", - "BBL 802.3 Encapsulated LAN PDU", "FC - VI", "FC - AV", - "Vendor Unique" }] - uint16 SupportedFC4Types[]; - - [Description ( - "An array of integers that indicates the Fibre Channel " - "FC-4 protocols currently running. A list of all " - "supported protocols is indicated in the " - "SupportedFC4Types property." ), - ValueMap { "0", "1", "4", "5", "8", "9", "17", "18", "19", - "21", "22", "23", "25", "26", "27", "28", "32", "34", - "36", "64", "80", "81", "82", "88", "96", "255" }, - Values { "Unknown", "Other", "ISO/IEC 8802 - 2 LLC", - "IP over FC", "SCSI - FCP", "SCSI - GPP", - "IPI - 3 Master", "IPI - 3 Slave", "IPI - 3 Peer", - "CP IPI - 3 Master", "CP IPI - 3 Slave", - "CP IPI - 3 Peer", "SBCCS Channel", "SBCCS Control Unit", - "FC-SB-2 Channel", "FC-SB-2 Control Unit", - "Fibre Channel Services (FC-GS, FC-GS-2, FC-GS-3)", - "FC-SW", "FC - SNMP", "HIPPI - FP", "BBL Control", - "BBL FDDI Encapsulated LAN PDU", - "BBL 802.3 Encapsulated LAN PDU", "FC - VI", "FC - AV", - "Vendor Unique" }, - ModelCorrespondence { "CIM_FCPort.SupportedFC4Types" }] - uint16 ActiveFC4Types[]; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_FCPortCapabilities.mof b/build/vendor/dmtf_mof/Device/CIM_FCPortCapabilities.mof deleted file mode 100644 index dbebcb13..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_FCPortCapabilities.mof +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.11.0" ), - UMLPackagePath ( "CIM::Device::FC" ), - Description ( - "FibreChannel port control and configuration capabilities." )] -class CIM_FCPortCapabilities : CIM_LogicalPortCapabilities { - - [Description ( - "List of supported port types that can be configured on " - "FCPortSettings.RequestedType. \n" - "RequestedType acts as a filter on the enabled port types " - "that a port may auto-negotiate during port login. \n" - "\"G\" = Port may only act as an expansion port (E), or a " - "fabric port (F). \"GL\" = Port may only act an an " - "expansion port (E), a fabric port (F), or a fabric port " - "supporting FC arbitrated loop (FL). \"E\" = Port may " - "only act as an expansion port (E) connecting fabric " - "elements. \"F\" = Port may only act as a fabric port " - "(F). \"FX\" = Port may only act as a fabric port (F), or " - "a fabric port supporting FC arbitrated loop (FL). \"B\" " - "= Port may only act as a bridge port (B). \"NX\" = Port " - "may only act as a node port (N) or a node port " - "supporting FC arbitrated loop (NL). \"N\" = Port may " - "only act as a Node port. \"NL\" = Port may only act as a " - "Node Port supporting FC arbitrated loop. \"NX\" = Port " - "may only act as a node port (N) or a node port " - "supporting FC arbitrated loop (NL)." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", "10", - "..", "16000..65535" }, - Values { "G", "GL", "E", "F", "FX", "B", "NX", "N", "NL", - "DMTF Reserved", "Vendor Reserved" }, - MappingStrings { - "FC-SWAPI.INCITS-T11|SWAPI_PORT_CONFIG_CAPS_T.ConfigurablePortTypes" }, - ModelCorrespondence { "CIM_FCPortSettings.RequestedType" }] - uint16 RequestedTypesSupported[]; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_FCPortRateStatistics.mof b/build/vendor/dmtf_mof/Device/CIM_FCPortRateStatistics.mof deleted file mode 100644 index eb0fa324..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_FCPortRateStatistics.mof +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FCPortRateStatistics -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::FC" ), - Description ( - "FCPortRateStatistics is the performance rate for the FCPort. " - "The Frame and Byte rates report the average of a counter " - "change per second and the maximum counter change per second " - "over a specified interval, the SampleInterval, which is " - "defined in the parent class, StatisticalData." )] -class CIM_FCPortRateStatistics : CIM_StatisticalData { - - [Description ( - "TxFrameRate is the instantaneous transmit frame rate." ), - MappingStrings { - "FC-SWAPI.T11|PerformanceRates|1.SWAPI_STATS_LBL_TFRR" }, - ModelCorrespondence { "CIM_StatisticalData.SampleInterval" }] - uint64 TxFrameRate; - - [Description ( - "RxFrameRate is the instantaneous receive frame rate." ), - MappingStrings { - "FC-SWAPI.T11|PerformanceRates|1.SWAPI_STATS_LBL_RFRR" }, - ModelCorrespondence { "CIM_StatisticalData.SampleInterval" }] - uint64 RxFrameRate; - - [Description ( - "MaxTxFrameRate is the maximum transmit frame rate achieved." - ), - MappingStrings { - "FC-SWAPI.T11|PerformanceRates|1.SWAPI_STATS_LBL_TFPR" }, - ModelCorrespondence { "CIM_StatisticalData.SampleInterval" }] - uint64 MaxTxFrameRate; - - [Description ( - "MaxRxFrameRate is the maximum receive frame rate achieved." - ), - MappingStrings { - "FC-SWAPI.T11|PerformanceRates|1.SWAPI_STATS_LBL_RFPR" }, - ModelCorrespondence { "CIM_StatisticalData.SampleInterval" }] - uint64 MaxRxFrameRate; - - [Description ( - "TxRate is the instantaneous transmit byte rate." ), - MappingStrings { - "FC-SWAPI.T11|PerformanceRates|1. SWAPI_STATS_LBL_TBYR" }, - ModelCorrespondence { "CIM_StatisticalData.SampleInterval" }] - uint64 TxRate; - - [Description ( - "RxRate is the instantaneous receive byte rate." ), - MappingStrings { - "FC-SWAPI.T11|PerformanceRates|1.SWAPI_STATS_LBL_RBYR" }, - ModelCorrespondence { "CIM_StatisticalData.SampleInterval" }] - uint64 RxRate; - - [Description ( - "PeakTxRate is the maximum transmit byte rate achieved." ), - MappingStrings { - "FC-SWAPI.T11|PerformanceRates|1. SWAPI_STATS_LBL_TBPR" }, - ModelCorrespondence { "CIM_StatisticalData.SampleInterval" }] - uint64 PeakTxRate; - - [Description ( - "PeakRxRate is the maximum receive byte rate achieved." ), - MappingStrings { - "FC-SWAPI.T11|PerformanceRates|1. SWAPI_STATS_LBL_RBPR" }, - ModelCorrespondence { "CIM_StatisticalData.SampleInterval" }] - uint64 PeakRxRate; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_FCPortStatistics.mof b/build/vendor/dmtf_mof/Device/CIM_FCPortStatistics.mof deleted file mode 100644 index b5038a1b..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_FCPortStatistics.mof +++ /dev/null @@ -1,302 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FCPortStatistics -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::FC" ), - Description ( "FCPortStatistics is the statistics for the FCPort." )] -class CIM_FCPortStatistics : CIM_NetworkPortStatistics { - - [Description ( - "LIPCount is the number of LIP events that have occurred " - "on an arbitrated loop." ), - Counter] - uint64 LIPCount; - - [Description ( - "NOSCount is the number of NOS events that have occurred " - "on the switched fabric." ), - Counter] - uint64 NOSCount; - - [Description ( - "ErrorFrames is the number of frames that have been " - "received in error." ), - Counter] - uint64 ErrorFrames; - - [Description ( - "DumpedFrames is the number of frames that were lost due " - "to a lack of host buffers available." ), - Counter] - uint64 DumpedFrames; - - [Description ( - "LinkFailure is the number of times that a link error has " - "occurred. This count is part of the Link Error Status " - "Block (LESB)." ), - Counter] - uint64 LinkFailures; - - [Description ( - "Number of times the signal is lost on the Port since the " - "last reset of the Device. This count is part of the Link " - "Error Status Block (LESB)." ), - Counter] - uint64 LossOfSignalCounter; - - [Description ( - "Number of times that synchronization is lost on the Port " - "since the last reset of the Device. Synchronization is " - "assumed lost after a timeout period (identified by the " - "Receiver TransmitterTimeout property) is exceeded. This " - "count is part of the Link Error Status Block (LESB)." ), - Counter] - uint64 LossOfSyncCounter; - - [Description ( - "Count of primitive sequence protocol errors that are " - "detected at this port. This count is part of the Link " - "Error Status Block (LESB)." ), - Counter] - uint64 PrimitiveSeqProtocolErrCount; - - [Description ( - "Number of times that the CRC in a frame does not match " - "the CRC that is computed by the receiver. This count is " - "part of the Link Error Status Block (LESB)." ), - Counter] - uint64 CRCErrors; - - [Description ( - "The number of transmission words that had an invalid " - "character (8b10b code violation) in one or more of its " - "characters, had a K28.5 (8b10b control) in its second, " - "third, or fourth character position, or had an incorrect " - "Beginning Running Disparity. This count is part of the " - "Link Error Status Block (LESB)." ), - Counter] - uint64 InvalidTransmissionWords; - - [Description ( - "The number of frames received that were shorter than 28 " - "octets. The value of 28 is calculated based on an " - "assumption of 24 header bytes plus 4 CRC bytes. The " - "count does not include SOF/EOF bytes, which are not " - "data." ), - Counter] - uint64 FramesTooShort; - - [Description ( - "The number of frames received that were longer than 2140 " - "octets. The value of 2140 is calculated based on an " - "assumption of 24 header bytes plus 4 CRC bytes and 2112 " - "bytes of payload." ), - Counter] - uint64 FramesTooLong; - - [Description ( - "Count of frames received with unknown addressing. An " - "example is an unknown SID or DID. The SID or DID is not " - "known to the routing algorithm." ), - Counter] - uint64 AddressErrors; - - [Description ( - "Count of occurrences when all input buffers of a port " - "were full and outbound buffer-to-buffer credit was " - "transitioned to zero. There is no credit to provide to " - "the other side." ), - Counter] - uint64 BufferCreditNotProvided; - - [Description ( - "Count of transitions in or out of BBcredit zero state. " - "The other side is not providing any credit." ), - Counter] - uint64 BufferCreditNotReceived; - - [Description ( - "Count of invalid frame delimiters that are received at " - "this port. An example is a frame with a class 2 start " - "and a class 3 at the end." ), - Counter] - uint64 DelimiterErrors; - - [Description ( - "Count of disparity errors that are received at this port." ), - Counter] - uint64 EncodingDisparityErrors; - - [Description ( - "Count of Link resets. This count is the number of LRs received." - ), - Counter] - uint64 LinkResetsReceived; - - [Description ( - "Count of Link resets. This count is the number of LRs transmitted." - ), - Counter] - uint64 LinkResetsTransmitted; - - [Description ( - "Count of Multicast Frames or Packets received." ), - Counter] - uint64 MulticastFramesReceived; - - [Description ( - "Count of Multicast Frames or Packets transmitted." ), - Counter] - uint64 MulticastFramesTransmitted; - - [Description ( - "FBSYFrames is the number of times that FBSY was returned " - "to the port." ), - Counter, MappingStrings { - "FC-SWAPI.T11|ErrorCounters|1.SWAPI_STATS_LBL_FBSY" }] - uint64 FBSYFrames; - - [Description ( - "PBSYFrames is the number of times that PBSY was returned " - "to the port." ), - Counter, MappingStrings { - "FC-SWAPI.T11|ErrorCounters|1.SWAPI_STATS_LBL_PBSY" }] - uint64 PBSYFrames; - - [Description ( - "FRJTFrames is the number of times that FRJT was returned " - "to the port." ), - Counter, MappingStrings { - "FC-SWAPI.T11|ErrorCounters|1.SWAPI_STATS_LBL_FRJT" }] - uint64 FRJTFrames; - - [Description ( - "PRJTFrames is the number of times that PRJT was returned " - "to the port." ), - Counter, MappingStrings { - "FC-SWAPI.T11|ErrorCounters|1.SWAPI_STATS_LBL_PRJT" }] - uint64 PRJTFrames; - - [Description ( - "RXClass1Frames is the number of class 1 frames received." ), - Counter, MappingStrings { - "FC-SWAPI.T11|PerformanceCounters|1.SWAPI_STATS_LBL_C1RF" }] - uint64 RXClass1Frames; - - [Description ( - "TXClass1Frames is the number of class 1 frames transmitted." - ), - Counter, MappingStrings { - "FC-SWAPI.T11|PerformanceCounters|1.SWAPI_STATS_LBL_C1TF" }] - uint64 TXClass1Frames; - - [Description ( - "Class1FBSY is the number of times that FBSY was returned " - "to the port." ), - Counter, MappingStrings { - "FC-SWAPI.T11|PerformanceCounters|1.SWAPI_STATS_LBL_C1FB" }] - uint64 Class1FBSY; - - [Description ( - "Class1PBSY is the number of times that PBSY was returned " - "to the port." ), - Counter, MappingStrings { - "FC-SWAPI.T11|PerformanceCounters|1.SWAPI_STATS_LBL_C1PB" }] - uint64 Class1PBSY; - - [Description ( - "Class1FRJT is the number of times that FRJT was returned " - "to the port." ), - Counter, MappingStrings { - "FC-SWAPI.T11|PerformanceCounters|1.SWAPI_STATS_LBL_C1FR" }] - uint64 Class1FRJT; - - [Description ( - "Class1PRJT is the number of times that PRJT was returned " - "to the port." ), - Counter, MappingStrings { - "FC-SWAPI.T11|PerformanceCounters|1.SWAPI_STATS_LBL_C1PR" }] - uint64 Class1PRJT; - - [Description ( - "RXClass2Frames is the number of class 2 frames received." ), - Counter, MappingStrings { - "FC-SWAPI.T11|PerformanceCounters|1.SWAPI_STATS_LBL_C2RF" }] - uint64 RXClass2Frames; - - [Description ( - "TXClass2Frames is the number of class 2 frames transmitted." - ), - Counter, MappingStrings { - "FC-SWAPI.T11|PerformanceCounters|1.SWAPI_STATS_LBL_C2LF" }] - uint64 TXClass2Frames; - - [Description ( - "Class2FBSY is the number of times that FBSY was returned " - "to the port." ), - Counter, MappingStrings { - "FC-SWAPI.T11|PerformanceCounters|1.SWAPI_STATS_LBL_C2FB" }] - uint64 Class2FBSY; - - [Description ( - "Class2PBSY is the number of times that PBSY was returned " - "to the port." ), - Counter, MappingStrings { - "FC-SWAPI.T11|PerformanceCounters|1.SWAPI_STATS_LBL_C2PB" }] - uint64 Class2PBSY; - - [Description ( - "Class2FRJT is the number of times that FRJT was returned " - "to the port." ), - Counter, MappingStrings { - "FC-SWAPI.T11|PerformanceCounters|1.SWAPI_STATS_LBL_C2FR" }] - uint64 Class2FRJT; - - [Description ( - "Class2PRJT is the number of times that PRJT was returned " - "to the port." ), - Counter, MappingStrings { - "FC-SWAPI.T11|PerformanceCounters|1.SWAPI_STATS_LBL_C2PR" }] - uint64 Class2PRJT; - - [Description ( - "RXClass3Frames is the number of class 3 frames received." ), - Counter, MappingStrings { - "FC-SWAPI.T11|PerformanceCounters|1.SWAPI_STATS_LBL_C3RF" }] - uint64 RXClass3Frames; - - [Description ( - "TXClass3Frames is the number of class 3 frames transmitted." - ), - Counter, MappingStrings { - "FC-SWAPI.T11|PerformanceCounters|1.SWAPI_STATS_LBL_C3TF" }] - uint64 TXClass3Frames; - - [Description ( - "Class3FramesDiscarded is the number of class 3 frames " - "that were discarded upon reception." ), - Counter, MappingStrings { - "FC-SWAPI.T11|PerformanceCounters|1.SWAPI_STATS_LBL_C3DC" }] - uint64 Class3FramesDiscarded; - - [Description ( - "RXBroadcastFrames is the number of broadcast frames or " - "packets received." ), - Counter, MappingStrings { - "FC-SWAPI.T11|PerformanceCounters|1.SWAPI_STATS_LBL_RBCO" }] - uint64 RXBroadcastFrames; - - [Description ( - "TXBroadcastFrames is the number of broadcast frames or " - "packets transmitted." ), - Counter, MappingStrings { - "FC-SWAPI.T11|PerformanceCounters|1.SWAPI_STATS_LBL_TBCO" }] - uint64 TXBroadcastFrames; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_FCSwitchCapabilities.mof b/build/vendor/dmtf_mof/Device/CIM_FCSwitchCapabilities.mof deleted file mode 100644 index 0f5cef85..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_FCSwitchCapabilities.mof +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.11.0" ), - UMLPackagePath ( "CIM::Device::FC" ), - Description ( - "FibreChannel switch control and configuration capabilities." )] -class CIM_FCSwitchCapabilities : CIM_EnabledLogicalElementCapabilities { - - [Description ( - "Boolean that indicates whether the DomainID setting can " - "be modified." ), - MappingStrings { - "FC-SWAPI.INCITS-T11|SWAPI_UNIT_CONFIG_CAPS_T|EditDomainID" }, - ModelCorrespondence { "CIM_FCSwitchSettings.PreferredDomainID" }] - boolean DomainIDConfigureable; - - [Description ( - "Minimum DomainID value supported by the switch." ), - MinValue ( 1 ), - MaxValue ( 239 ), - MappingStrings { - "FC-SWAPI.INCITS-T11|SWAPI_UNIT_CONFIG_CAPS_T|MinDomainID" }, - ModelCorrespondence { "CIM_FCSwitchSettings.PreferredDomainID" }] - uint8 MinDomainID; - - [Description ( - "Maximum DomainID value supported by the switch. This " - "value must be greater than or equal to MinDomainID." ), - MinValue ( 1 ), - MaxValue ( 239 ), - MappingStrings { - "FC-SWAPI.INCITS-T11|SWAPI_UNIT_CONFIG_CAPS_T|MaxDomainID" }, - ModelCorrespondence { "CIM_FCSwitchSettings.PreferredDomainID" }] - uint8 MaxDomainID; - - [Description ( - "Boolean that indicates whether the DomainIDLocked " - "setting can be modified." ), - MappingStrings { - "FC-SWAPI.INCITS-T11|SWAPI_UNIT_CONFIG_CAPS_T|EditDomainIDLocked" }, - ModelCorrespondence { "CIM_FCSwitchSettings.DomainIDLocked" }] - boolean DomainIDLockedSupported; - - [Description ( - "This array contains the principal priority settings that " - "are supported by the switch." ), - ValueMap { "2", "3", "4", "5" }, - Values { "Principal", "Subordinate", "Any", "Not Applicable" }, - MappingStrings { - "FC-SWAPI.INCITS-T11|SWAPI_UNIT_CONFIG_CAPS_T|SupportedSwitchPriorities" }, - ModelCorrespondence { "CIM_FCSwitchSettings.PrincipalPriority" }] - uint16 PrincipalPrioritiesSupported[]; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_FCSwitchSettings.mof b/build/vendor/dmtf_mof/Device/CIM_FCSwitchSettings.mof deleted file mode 100644 index fbd49484..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_FCSwitchSettings.mof +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.11.0" ), - UMLPackagePath ( "CIM::Device::FC" ), - Description ( - "A ComputerSystem that supports FC Switch capabilities and can " - "be configured using the FCSwitchConfig class." )] -class CIM_FCSwitchSettings : CIM_SettingData { - - [Write, Description ( - "The preferred domainID for the switch. If DomainIDLocked " - "is true, then this property will be the required " - "DomainID for the switch." ), - MinValue ( 1 ), - MaxValue ( 239 ), - MappingStrings { - "FC-SWAPI.INCITS-T11|UcUnitConfigGetDomainID", - "GC-GS.INCITS-T11|InterconnectElement|DomainIdentifier" }, - ModelCorrespondence { "CIM_FCSwitchSettings.DomainIDLocked" }] - uint8 PreferredDomainID; - - [Write, Description ( - "Boolean that indicates if the switch can negotiate a new " - "domainID when the configured domainID is unavailable. If " - "this value is true, a domainID conflict will cause the " - "fabric merge process to fail." ), - MappingStrings { - "FC-SWAPI.INCITS-T11|UcUnitConfigGetDomainIDLocked" }, - ModelCorrespondence { "CIM_FCSwitchSettings.PreferredDomainID" }] - boolean DomainIDLocked; - - [Write, Description ( - "This value affects the selection of a principal switch " - "within the fabric. The value indirectly corresponds to " - "the FC-FS switch_priority value used during principal " - "switch selection. \n" - "- Principal: Attempt to become the principal switch in " - "the fabric. \n" - "- Subordinate: Attempt not to become the principal " - "switch in the fabric. \n" - "- Any: No preference." ), - ValueMap { "2", "3", "4" }, - Values { "Principal", "Subordinate", "Any" }, - MappingStrings { - "FC-SWAPI.INCITS-T11|SWAPI_PRINCIPAL_PRIORITY_T" }] - uint16 PrincipalPriority = 3; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_Fan.mof b/build/vendor/dmtf_mof/Device/CIM_Fan.mof deleted file mode 100644 index f56bff8f..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_Fan.mof +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Fan -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::CoolingAndPower" ), - Description ( "Capabilities and management of a Fan CoolingDevice." )] -class CIM_Fan : CIM_CoolingDevice { - - [Description ( - "Indication of whether the fan supports variable speeds." )] - boolean VariableSpeed; - - [Description ( - "DesiredSpeed is the currently requested fan speed, " - "defined in Revolutions per Minute, when a variable speed " - "fan is supported (VariableSpeed boolean = TRUE). The " - "current speed is determined via a sensor " - "(CIM_Tachometer) that is associated with the Fan using " - "the CIM_AssociatedSensor relationship." ), - Units ( "Revolutions per Minute" )] - uint64 DesiredSpeed; - - - [Description ( - "Requests that the Fan speed be set to the value " - "specified in the method\'s input parameter. The return " - "value should be 0 if the request was successfully " - "executed, 1 if the request is not supported and some " - "other value if an error occurred. In a subclass, the set " - "of possible return codes could be specified, using a " - "ValueMap qualifier on the method. The strings to which " - "the ValueMap contents are \'translated\' may also be " - "specified in the subclass as a Values array qualifier." )] - uint32 SetSpeed( - [IN, Description ( "The desired speed for the fan." )] - uint64 DesiredSpeed); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_FibreChannelAdapter.mof b/build/vendor/dmtf_mof/Device/CIM_FibreChannelAdapter.mof deleted file mode 100644 index 1cb924de..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_FibreChannelAdapter.mof +++ /dev/null @@ -1,370 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_FibreChannelAdapter -// ================================================================== - [Deprecated { "CIM_FCPort" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::NetworkAdapter" ), - Description ( - "Note: The use of the CIM_FibreChannelAdapter class is " - "deprecated, consistent with the deprecation of NetworkAdapter. " - "Instead use CIM_FCPort. \n" - "Deprecated description: This class describes the capabilities " - "and management aspects of a Fibre Channel Adapter." )] -class CIM_FibreChannelAdapter : CIM_NetworkAdapter { - - [Deprecated { - "CIM_NetworkPort.SupportedMaximumTransmissionUnit" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The maximum frame size, in " - "bytes, supported by the Adapter." ), - Units ( "Bytes" ), - PUnit ( "byte" )] - uint64 MaxFrameSize; - - [Deprecated { "CIM_FCPort.SupportedCOS" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The Fibre Channel Classes of " - "Service that are supported by the Adapter, on its Ports. " - "The currently negotiated COS for a connection is a " - "property (NegotiatedCOS) on the FibrePort ActiveLogin " - "association." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6" }, - Values { "Unknown", "1", "2", "3", "4", "6", "F" }] - uint16 SupportedCOS[]; - - [Deprecated { "CIM_FCPort.SupportedFC4Types" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: An array of integers that " - "indicates the Fibre Channel FC-4 protocols that are " - "supported by the Adapter. The protocols that are active " - "and running are indicated in the CurrentFC4Types " - "property. The values that are used in this array are " - "taken from the FC-GS2 (bit-mapped) field defined in " - "Table 11 of the standard. Also, FC-SB-2 codes are " - "included from the T11 document, 236V0. If the FC4 Type " - "is \"Vendor Unique\" (value=255), then the specific " - "vendor values (in the range, 0xE0 to 0xFF) should be " - "listed in the FC4VendorUniqueTypes property." ), - ValueMap { "0", "1", "4", "5", "8", "9", "17", "18", "19", - "21", "22", "23", "25", "26", "27", "28", "32", "34", - "36", "64", "80", "81", "82", "88", "96", "255" }, - Values { "Unknown", "Other", "ISO/IEC 8802 - 2 LLC", - "IP over FC", "SCSI - FCP", "SCSI - GPP", - "IPI - 3 Master", "IPI - 3 Slave", "IPI - 3 Peer", - "CP IPI - 3 Master", "CP IPI - 3 Slave", - "CP IPI - 3 Peer", "SBCCS Channel", "SBCCS Control Unit", - "FC-SB-2 Channel", "FC-SB-2 Control Unit", - "Fibre Channel Services (FC-GS, FC-GS-2, FC-GS-3)", - "FC-SW", "FC - SNMP", "HIPPI - FP", "BBL Control", - "BBL FDDI Encapsulated LAN PDU", - "BBL 802.3 Encapsulated LAN PDU", "FC - VI", "FC - AV", - "Vendor Unique" }, - ModelCorrespondence { - "CIM_FibreChannelAdapter.FC4VendorUniqueTypes" }] - uint16 FC4TypesSupported[]; - - [Deprecated { "CIM_FCPort.SupportedFC4Types" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: When the FC4TypesSupported array " - "contains the value 255 (\"Vendor Unique\"), then the " - "property, FC4Vendor UniqueTypes, lists of all the " - "vendor-specific protocols that are supported by the " - "Adapter. These values are in the range 0xE0 to 0xFF." ), - MinValue ( 240 ), - MaxValue ( 255 )] - uint16 FC4VendorUniqueTypes[]; - - [Deprecated { "CIM_FCPort.ActiveFC4Types" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: An array of integers that " - "indicate the Fibre Channel FC-4 protocols that are " - "currently running on the Adapter. A list of all " - "protocols that are supported by the Adapter is indicated " - "in the FC4TypesSupported property. The values used in " - "this array are taken from the FC-GS2 (bit-mapped) field " - "that is defined in Table 11 of the standard. Also, " - "FC-SB-2 codesare included from the T11 document, 236V0. " - "If the FC4 Type is \"Vendor Unique\" (value=255), then " - "the specific vendor values (in the range 0xE0 to 0xFF) " - "that are currently running should be listed in the " - "CurrentFC4VendorTypes property." ), - ValueMap { "0", "1", "4", "5", "8", "9", "17", "18", "19", - "21", "22", "23", "25", "26", "27", "28", "32", "34", - "36", "64", "80", "81", "82", "88", "96", "255" }, - Values { "Unknown", "Other", "ISO/IEC 8802 - 2 LLC", - "IP over FC", "SCSI - FCP", "SCSI - GPP", - "IPI - 3 Master", "IPI - 3 Slave", "IPI - 3 Peer", - "CP IPI - 3 Master", "CP IPI - 3 Slave", - "CP IPI - 3 Peer", "SBCCS Channel", "SBCCS Control Unit", - "FC-SB-2 Channel", "FC-SB-2 Control Unit", - "Fibre Channel Services (FC-GS, FC-GS-2, FC-GS-3)", - "FC-SW", "FC - SNMP", "HIPPI - FP", "BBL Control", - "BBL FDDI Encapsulated LAN PDU", - "BBL 802.3 Encapsulated LAN PDU", "FC - VI", "FC - AV", - "Vendor Unique" }, - ModelCorrespondence { - "CIM_FibreChannelAdapter.FC4TypesSupported", - "CIM_FibreChannelAdapter.CurrentFC4VendorTypes" }] - uint16 CurrentFC4Types[]; - - [Deprecated { "CIM_FCPort.ActiveFC4Types" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: When the CurrentFC4Types array " - "contains the value 255 (\"Vendor Unique\"), then the " - "property, CurrentFC4 VendorTypes, lists all the " - "vendor-specific protocols running on the Adapter. These " - "values are in the range 0xE0 to 0xFF." ), - MinValue ( 240 ), - MaxValue ( 255 ), - ModelCorrespondence { - "CIM_FibreChannelAdapter.FC4VendorUniqueTypes" }] - uint16 CurrentFC4VendorTypes[]; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: A list of the Capabilities of " - "the Fibre Channel Adapter. For example, the capability " - "that the Adapter utilizes the Directory Server, or that " - "it generates State Change Notifications can be indicated " - "using the values 2 and 12, respectively." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15" }, - Values { "Unknown", "Other", "Utilizes the Directory Server", - "Utilizes the Time Server", - "Utilizes the Management Server", - "Utilizes the Alias Server", - "Utilizes the Security Key Distribution Server", - "Utilizes the Clock Synchronization Server", - "Utilizes the Multicast Server", - "Utilizes QoS Facilitator", "Utilizes Broadcast Services", - "Supports Fabric Login Server", - "Generates State Change Notifications", - "Registers for State Change Notifications", - "Responds to Read Connection Status", - "Supports Third Party Process Logout" }, - ArrayType ( "Indexed" )] - uint16 Capabilities[]; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: An array of free-form strings " - "that provide more detailed explanations for any of the " - "Adapter features that are indicated in the Capabilities " - "array. Note, each entry of this array is related to the " - "entry in the Capabilities array that is located at the " - "same index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_FibreChannelAdapter.Capabilities" }] - string CapabilityDescriptions[]; - - [Deprecated { "CIM_FCPortStatistics.ErrorFrames" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of times that a frame " - "was received but no buffer was available." ), - Counter] - uint64 ReceiveBufferErrors; - - [Deprecated { "CIM_FCPortStatistics.ErrorFrames" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of times that a frame " - "was received but no end-to-end credit was available." ), - Counter] - uint64 ReceiveEndErrors; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: A \'long\' timeout value (in " - "milliseconds) for determining when to reinstate a " - "Recovery_Qualifier. The default value is 120 seconds " - "(120000 milliseconds). The value is typically set to the " - "ErrorDetectTimeout value + 2*(fabric delay time)." ), - Units ( "MilliSeconds" ), - PUnit ( "second * 10^-3" )] - uint64 ResourceAllocationTimeout; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: A \'short\' timeout value (in " - "milliseconds) for determining that an error has " - "occurred. The default value is 10 seconds (10000 " - "milliseconds)." ), - Units ( "MilliSeconds" ), - PUnit ( "second * 10^-3" )] - uint64 ErrorDetectTimeout; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of Class 1 sequences sent " - "since the last reset of the Device." ), - Counter] - uint64 Class1SequencesSent; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of Class 2 sequences sent " - "since the last reset of the Device." ), - Counter] - uint64 Class2SequencesSent; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of Class 3 sequences sent " - "since the last reset of the Device." ), - Counter] - uint64 Class3SequencesSent; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of Class 4 sequences sent " - "since the last reset of the Device." ), - Counter] - uint64 Class4SequencesSent; - - [Deprecated { "CIM_FCPortStatistics.BytesReceived" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of octets received by the " - "Adapter when running Class 2 service." ), - Counter] - uint64 Class2OctetsReceived; - - [Deprecated { "CIM_FCPortStatistics.BytesTransmitted" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of octets that are " - "transmitted by the Adapter when running Class 2 service." ), - Counter] - uint64 Class2OctetsTransmitted; - - [Deprecated { "CIM_FCPortStatistics.PacketsReceived" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of frames that were " - "received by the Adapter when running Class 2 service." ), - Counter] - uint64 Class2FramesReceived; - - [Deprecated { "CIM_FCPortStatistics.PacketsTransmitted" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of frames that were " - "transmitted by the Adapter when running Class 2 service." ), - Counter] - uint64 Class2FramesTransmitted; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of frames that were " - "discarded by the Adapter when running Class 2 service." ), - Counter] - uint64 Class2DiscardFrames; - - [Deprecated { "CIM_FCPortStatistics.BytesReceived" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of octets that were " - "received by the Adapter when running Class 3 service." ), - Counter] - uint64 Class3OctetsReceived; - - [Deprecated { "CIM_FCPortStatistics.BytesTransmitted" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of octets that were " - "transmitted by the Adapter when running Class 3 service." ), - Counter] - uint64 Class3OctetsTransmitted; - - [Deprecated { "CIM_FCPortStatistics.PacketsReceived" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of frames that were " - "received by the Adapter when running Class 3 service." ), - Counter] - uint64 Class3FramesReceived; - - [Deprecated { "CIM_FCPortStatistics.PacketsTransmitted" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of frames that were " - "transmitted by the Adapter when running Class 3 service." ), - Counter] - uint64 Class3FramesTransmitted; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of frames that were " - "discarded by the Adapter when running Class 3 service." ), - Counter] - uint64 Class3DiscardFrames; - - [Deprecated { "CIM_FCPortStatistics.ErrorFrames" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of parity errors that " - "were detected somewhere in the data path." ), - Counter] - uint64 ParityErrors; - - [Deprecated { "CIM_FCPortStatistics.ErrorFrames" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of Class 1 or 2 frames " - "that are not ACKed within the time indicated by " - "ErrorDetectTimeout." ), - Counter] - uint64 FrameTimeouts; - - [Deprecated { "CIM_FCPortStatistics.BufferCreditNotProvided" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of times that the Device " - "has been without a buffer credit for a time longer than " - "ErrorDetectTimeout." ), - Counter] - uint64 BufferCreditErrors; - - [Deprecated { "CIM_FCPortStatistics.BufferCreditNotReceived" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of times that the Device " - "has been without an end credit for a time longer than " - "ErrorDetectTimeout." ), - Counter] - uint64 EndCreditErrors; - - [Deprecated { "CIM_FCPortStatistics.DelimiterErrors" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of frames that were " - "received out of order." ), - Counter] - uint64 OutOfOrderFramesReceived; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_FibrePort.mof b/build/vendor/dmtf_mof/Device/CIM_FibrePort.mof deleted file mode 100644 index 0c0f1e9c..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_FibrePort.mof +++ /dev/null @@ -1,253 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_FibrePort -// ================================================================== - [Deprecated { "CIM_FCPort" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::NetworkAdapter" ), - Description ( - "Note: The use of the FibrePort class is deprecated because " - "FibreChannel Adapter has been deprecated in lieu of FCPort and " - "this class overlaps with FCPort. The new FCPort class should " - "be used in lieu of both FibreChannelAdapter and FibrePort. \n" - "Deprecated description: FibrePort describes the capabilities " - "and management aspects of a Fibre Channel Port Device." )] -class CIM_FibrePort : CIM_LogicalPort { - - [Deprecated { "CIM_FCPort.PermanentAddress" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: An address value that is used to " - "identify the source (S_ID) or destination (D_ID) of a " - "frame. The FC-SW standard includes a table of special " - "address identifier values and their meanings. Consult " - "the FC-SW documentation for additional information." )] - uint32 AddressIdentifier; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: An array that indicates the " - "modes in which the Port can operate. PortType values " - "describe the role and behavior of the Fibre Channel " - "entity: \"N\" = Node Port, \"NL\" = Node Port supporting " - "FC arbitrated loop, \"E\" = Expansion Port connecting " - "fabric elements (for example, FC switches), \"F\"=Fabric " - "(element) Port, \"FL\"=Fabric (element) Port supporting " - "FC arbitrated loop, and \"B\"=Bridge Port. PortTypes are " - "defined in the ANSI X3 standards. \n" - "\n" - "A particular mode can be listed multiple times in the " - "SupportedPortTypes array in order to define that " - "multiple, unique version levels are supported. Version " - "information is defined in the PortTypeVersions property. " - "Note, each entry of the SupportedPortTypes array is " - "related to the entry in PortTypeVersions that is located " - "at the same index." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7" }, - Values { "Unknown", "N", "NL-Private", "NL-Public", "E", "F", - "FL", "B" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_FibrePort.PortTypeVersions" }] - uint16 SupportedPortTypes[]; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Version information for each of " - "the SupportedPortTypes. A particular PortType (mode) can " - "be listed multiple times in the SupportedPortTypes array " - "in order to define multiple, unique version levels. " - "Note, each entry of this array is related to the entry " - "in SupportedPortTypes that is located at the same index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_FibrePort.SupportedPortTypes" }] - string PortTypeVersions[]; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The specific modes currently " - "enabled for the Port. The values are equal to, or a " - "subset of the values in the Supported PortTypes array." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7" }, - Values { "Unknown", "N", "NL-Private", "NL-Public", "E", "F", - "FL", "B" }, - ModelCorrespondence { "CIM_FibrePort.SupportedPortTypes", - "CIM_FibrePort.EnabledVersions" }] - uint16 EnabledPortTypes[]; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Version information for each of " - "the EnabledPortTypes. A particular PortType (mode) might " - "be listed multiple times in the EnabledPortTypes array " - "in order to define multiple, unique version levels. " - "Note, each entry of this array is related to the entry " - "in EnabledPortTypes that is located at the same index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_FibrePort.EnabledPortTypes" }] - string EnabledVersions[]; - - [Deprecated { "CIM_FCPort.PortType" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The specific mode in which the " - "Port is currently running. The value is one of the " - "entries in the EnabledPortTypes array. The current port " - "type or mode is dependent on the fibre technology. For " - "example, in a public loop network, you might indicate a " - "port type of \"FL\" (value=6) or \"NL\" (value=2)." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7" }, - Values { "Unknown", "N", "NL-Private", "NL-Public", "E", "F", - "FL", "B" }, - ModelCorrespondence { "CIM_FibrePort.EnabledPortTypes", - "CIM_FibrePort.CurrentVersion" }] - uint16 CurrentPortType; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Version information for the " - "CurrentPortType that is active." ), - ModelCorrespondence { "CIM_FibrePort.CurrentPortType" }] - string CurrentVersion; - - [Deprecated { "CIM_FCPort.NetworkAddresses" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: One or more address identifiers " - "that can be recognized by the Port, in addition to its " - "port-specific identifier. Multicast or hunt group " - "addresses that are recognized by the Port would be " - "identified in this array." )] - uint32 AliasAddresses[]; - - [Deprecated { "CIM_FCPortStatistics.LossOfSignalCounter" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of times that the signal " - "has been lost on the Port since the last reset of the " - "Device." ), - Counter] - uint64 LossOfSignalCounter; - - [Deprecated { "CIM_FCPortStatistics.LossOfSyncCounter" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of times that " - "synchronization has been lost on the Port since the last " - "reset of the Device. Synchronization is assumed lost " - "after a timeout period that is identified by the " - "Receiver TransmitterTimeout property." ), - Counter] - uint64 LossOfSyncCounter; - - [Deprecated { "CIM_FCPortStatistics.CRCErrors" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of times that the CRC in " - "a frame does not match the CRC computed by the receiver." ), - Counter] - uint64 CRCErrors; - - [Deprecated { "CIM_FCPortStatistics.InvalidTransmissionWords" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of transmission words " - "that had an 8b10b code violation in one or more of its " - "characters, had a K28.5 in its second, third, or fourth " - "character positions, or was an ordered set that had an " - "incorrect Beginning Running Disparity." ), - Counter] - uint64 InvalidTransmissionWords; - - [Deprecated { "CIM_FCPortStatistics.FramesTooShort" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of frames that were " - "received that were shorter than 28 octets. The value of " - "28 is calculated based on an assumption of 24 header " - "bytes plus 4 CRC bytes. The count does not include " - "SOF/EOF bytes that are not data." ), - Counter] - uint64 FramesTooShort; - - [Deprecated { "CIM_FCPortStatistics.FramesTooLong" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of frames that were " - "received that were longer than 2140 octets. The value of " - "2140 is calculated based on an assumption of 24 header " - "bytes plus 4 CRC bytes and 2112 bytes of payload." ), - Counter] - uint64 FramesTooLong; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of times that a fill " - "word could not be inserted, when required. The " - "Elasticity Buffer is defined in FC-AL. This event might " - "cause data corruption and might indicate a configuration " - "error or that a device is out of spec." ), - Counter] - uint64 ElasticityBufferUnderruns; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of times that a fill " - "word could not be deleted, when required. The Elasticity " - "Buffer is defined in FC-AL. This event might cause data " - "corruption and might indicate a configuration error or a " - "device out of spec." ), - Counter] - uint64 ElasticityBufferOverruns; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Timeout value in milliseconds " - "that is used to determine when loss of synchronization " - "has occurred. The typical default is 100 msec." ), - Units ( "Milliseconds" ), - PUnit ( "second * 10^-3" )] - uint64 ReceiverTransmitterTimeout; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Indication of whether the Port " - "is currently bypassed (value=2) or not (value=1). A " - "value of 3 (\"Forced Insert\") describes that the Port " - "is forced active, when it would otherwise be \"Bypassed\"." - ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Not Bypassed", "Bypassed", - "Forced Insert" }] - uint16 BypassedState; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The type of cabling as sensed by " - "the Port. Not all Fibre Ports are capable of providing " - "this information. In this case, a value of 0, \"Unknown\", " - "will be returned. Also, when single or multi-mode fiber " - "cabling cannot be distinguished, the more general value " - "4, \"Fiber-optic\" can be specified." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6" }, - Values { "Unknown", "Other", "No Media", "Copper/Twinaxial", - "Fiber-optic", "Fiber Single Mode", "Fiber Multimode" }] - uint16 ConnectedMedia; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_FibrePortActiveLogin.mof b/build/vendor/dmtf_mof/Device/CIM_FibrePortActiveLogin.mof deleted file mode 100644 index 35b6f8cd..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_FibrePortActiveLogin.mof +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_FibrePortActiveLogin -// ================================================================== - [Association, Deprecated { "CIM_ActiveConnection", "CIM_FCPort" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::NetworkAdapter" ), - Description ( - "Note: The use of FibrePortActiveLogin is deprecated because " - "FibrePort is deprecated. \n" - "Deprecated description: Information for FibrePortActiveLogin " - "is found by examining the individual FCPorts, and an " - "ActiveConnection between the FCProtocolEndpoints that are " - "associated with the ports. FibrePortActiveLogin indicates that " - "two FibrePorts are connected through a login and have " - "negotiated their Class Of Service, frame size, and other link " - "characteristics, as specified by an instance of this class." )] -class CIM_FibrePortActiveLogin { - - [Deprecated { "CIM_ActiveConnection.Dependent" }, - Key, Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The originator of the login." )] - CIM_FibrePort REF LoginOriginator; - - [Deprecated { "CIM_ActiveConnection.Antecedent" }, - Key, Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The responder to the login." )] - CIM_FibrePort REF LoginResponder; - - [Deprecated { "CIM_FCPort.ActiveCOS" }, - Key, Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The Fibre Channel Class of " - "Service that is currently running between the Ports. " - "Because two Ports can be simultaneously connected at " - "different Classes of Service, this property had to be " - "part of the key of the object and therefore, the " - "identity of the instance." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6" }, - Values { "Unknown", "1", "2", "3", "4", "6", "F" }, - MappingStrings { - "MIF.DMTF|Fibre Channel Bus PortExtensions|001.5" }, - ModelCorrespondence { "CIM_FibreChannelAdapter.SupportedCOS" }] - uint16 NegotiatedCOS; - - [Deprecated { "CIM_FCPort.ActiveMaximumTransmissionUnit" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The Fibre Channel frame size, in " - "bytes, that is currently negotiated between the two " - "Ports." ), - Units ( "Bytes" ), - PUnit ( "byte" )] - uint64 NegotiatedFrameSize; - - [Deprecated { "CIM_FCPort.Speed" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The speed for communications " - "that is currently negotiated between the two Ports. " - "Speed is specified in Bits per Second. If this " - "information is not available, the property should be set " - "to 0." ), - Units ( "Bits per Second" ), - PUnit ( "bit / second" )] - uint64 NegotiatedSpeed; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Acknowledgement model that is " - "negotiated during Port login. For example, ACK-1 " - "indicates that each frame should be acknowledged." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "ACK-0", "ACK-1", "ACK-N" }, - MappingStrings { - "MIF.DMTF|Fibre Channel Bus PortExtensions|001.6" }] - uint16 ACKModel; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The buffer-to-buffer model that " - "was negotiated during Port login. Either the model " - "defined by the FC-PH standard is used (value=1, " - "\"Regular\") or an \"Alternate\" model is negotiated." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "Regular", "Alternate" }] - uint16 BufferToBufferModel; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: OriginatorBufferCredit reflects " - "the buffer credit of the Port that is defined as the " - "LoginOriginator. This method is the number of frame " - "buffers that were made available by the originating Port " - "to the responder Port. Buffer credits are used in " - "point-to- point connections, when an NL-Local Port is " - "logged into another NL-Local Port, and when Nx Ports are " - "logged into Fx Ports. In other scenarios, this value is " - "undefined." ), - MappingStrings { - "MIF.DMTF|Fibre Channel Bus PortExtensions|001.3" }] - uint64 OriginatorBufferCredit; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: ResponderBufferCredit reflects " - "the buffer credit of the Port that is defined as the " - "LoginResponder. This method is the number of frame " - "buffers that were made available by the responder Port " - "to the originating Port. Buffer credits are used in " - "point-to-point connections, when an NL-Local Port is " - "logged into another NL-Local Port, and when Nx Ports are " - "logged into Fx Ports. In other scenarios, this value is " - "undefined." ), - MappingStrings { - "MIF.DMTF|Fibre Channel Bus PortExtensions|001.3" }] - uint64 ResponderBufferCredit; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: OriginatorEndCredit reflects the " - "end credit of the Port that is defined as the " - "LoginOriginator. This method is the number of frame " - "buffers that were made available by the originating Port " - "to the responder Port. End credits are used in " - "point-to-point connections, when an NL-Local Port is " - "logged into another NL-Local Port, and when Nx Ports are " - "logged into remote Nx Ports. In other scenarios, this " - "value is undefined." ), - MappingStrings { - "MIF.DMTF|Fibre Channel Bus PortExtensions|001.2" }] - uint64 OriginatorEndCredit; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: ResponderEndCredit reflects the " - "end credit of the Port that is defined as the " - "LoginResponder. This method is the number of frame " - "buffers that were made available by the responder Port " - "to the originating Port. End credits are used in " - "point-to-point connections, when an NL-Local Port is " - "logged into another NL-Local Port, and when Nx Ports are " - "logged into remote Nx Ports. In other scenarios, this " - "value is undefined." ), - MappingStrings { - "MIF.DMTF|Fibre Channel Bus PortExtensions|001.2" }] - uint64 ResponderEndCredit; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_FibrePortEventCounters.mof b/build/vendor/dmtf_mof/Device/CIM_FibrePortEventCounters.mof deleted file mode 100644 index 91c7933b..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_FibrePortEventCounters.mof +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FibrePortEventCounters -// ================================================================== - [Deprecated { "CIM_FCPortStatistics" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::NetworkAdapter" ), - Description ( - "Note: The use of the FibrePortEventCounters class is " - "deprecated because FibrePort is deprecated. FCPortStatistics " - "should be used instead, but it redefines the level at which " - "data is collected. Therefore, there is no direct translation " - "of the individual counters between the two classes. Deprecated " - "description: This object defines error counters that are " - "specific to a FibrePort." )] -class CIM_FibrePortEventCounters : CIM_DeviceStatisticalInformation { - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of login frames " - "received." ), - Counter] - uint64 PLOGIsReceived; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of login frames sent." ), - Counter] - uint64 PLOGIsSent; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of frames received that " - "contain \'EOF Abort\'." ), - Counter] - uint64 EOFAbortsReceived; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Number of frames transmitted " - "that contain \'EOF Abort\'." ), - Counter] - uint64 EOFAbortsTransmitted; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of logouts that were " - "received from various targets." ), - Counter] - uint64 PLOGOsReceived; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of logout frames " - "sent." ), - Counter] - uint64 PLOGOsSent; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of PLOGI frames sent " - "where the response was LS_RJT." ), - Counter] - uint64 PLOGIsRejected; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of PLOGO frames sent " - "where the response was LS_RJT." ), - Counter] - uint64 PLOGOsRejected; - - - [Deprecated { "CIM_FCPortStatistics.ResetSelectedStats" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Method to reset the Port event " - "counters. The method takes as input an integer that " - "indicates which counter to reset. For this input " - "parameter, 0 indicates all and 1 through 8 indicate a " - "reset of the individual counters. The method returns 0 " - "if successful, 1 if not supported, and any other value " - "if an error occurred. A method is specified so that the " - "instrumentation of the Device, which tabulates the " - "errors and warnings, can also reset its internal " - "processing and counters. \n" - "In a subclass, the set of possible return codes could be " - "specified, using a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \'translated\' " - "can also be specified in the subclass as a Values array " - "qualifier." )] - uint32 ResetCounter( - [IN, Description ( "The counter to reset." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "All", "PLOGIsReceived", "PLOGIsSent", - "EOFAbortsReceived", "EOFAbortsTransmitted", - "PLOGOsReceived", "PLOGOsSent", "PLOGIsRejected", - "PLOGOsRejected" }] - uint16 SelectedCounter); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_FibrePortOnFCAdapter.mof b/build/vendor/dmtf_mof/Device/CIM_FibrePortOnFCAdapter.mof deleted file mode 100644 index 89892d73..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_FibrePortOnFCAdapter.mof +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FibrePortOnFCAdapter -// ================================================================== - [Association, Deprecated { "No value" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::NetworkAdapter" ), - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The use of FibrePortOnFCAdapter is " - "deprecated because both FibrePort and FibreChannelAdapter have " - "been deprecated. No replacement is needed because the 2 " - "classes are combined into a single class. FibrePortOnFCAdapter " - "associates a FibrePort with a FibreChannelAdapter." )] -class CIM_FibrePortOnFCAdapter : CIM_PortOnDevice { - - [Deprecated { "No value" }, - Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The FibreChannelAdapter that " - "includes the Port." )] - CIM_FibreChannelAdapter REF Antecedent; - - [Deprecated { "No value" }, - Override ( "Dependent" ), - Max ( 1 ), - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The FibrePort on the Adapter." )] - CIM_FibrePort REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_FibreProtocolService.mof b/build/vendor/dmtf_mof/Device/CIM_FibreProtocolService.mof deleted file mode 100644 index 336f04a6..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_FibreProtocolService.mof +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FibreProtocolService -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::FC" ), - Description ( - "FibreProtocolService abstracts and allows the management of " - "the Alias, Management, Time, Security, Directory (Naming), and " - "other services and functions that are available in a Fibre " - "Channel network. This class will be further defined in a later " - "release of CIM." )] -class CIM_FibreProtocolService : CIM_Service { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_FlatPanel.mof b/build/vendor/dmtf_mof/Device/CIM_FlatPanel.mof deleted file mode 100644 index 64237127..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_FlatPanel.mof +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_FlatPanel -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::UserDevices" ), - Description ( - "Capabilities and management of the FlatPanel LogicalDevice." )] -class CIM_FlatPanel : CIM_Display { - - [Description ( "FlatPanel\'s horizontal resolution in Pixels." ), - Units ( "Pixels" ), - PUnit ( "pixel" )] - uint32 HorizontalResolution; - - [Description ( "FlatPanel\'s vertical resolution in Pixels." ), - Units ( "Pixels" ), - PUnit ( "pixel" )] - uint32 VerticalResolution; - - [Description ( - "A FlatPanel\'s scan mode indicating either single " - "(value=2) or dual scan (3)." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Other", "Single Scan", "Dual Scan" }] - uint16 ScanMode; - - [Description ( - "An integer enumeration describing the type of flat panel display." - ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Unknown", "Other", "Passive Matrix LCD", - "Active Matrix LCD", "Cholesteric LCD", - "Field Emission Display", "Electro Luminescent Display", - "Gas Plasma", "LED" }] - uint16 DisplayType; - - [Description ( - "A description of the display illumination type. For " - "example, backlit (value=2) or reflective (4) can be " - "specified." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "Backlit", "Edgelit", - "Reflective" }] - uint16 LightSource; - - [Description ( - "Boolean indicating whether the FlatPanel supports color display." - )] - boolean SupportsColor; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_GroupInDiskGroup.mof b/build/vendor/dmtf_mof/Device/CIM_GroupInDiskGroup.mof deleted file mode 100644 index ddb6d6a4..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_GroupInDiskGroup.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_GroupInDiskGroup -// ================================================================== - [Association, Aggregation, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::DiskGroup" ), - Description ( - "CIM_GroupInDiskGroup describes that a DiskGroup can be divided " - "into smaller named Collections." )] -class CIM_GroupInDiskGroup : CIM_CollectedCollections { - - [Aggregate, Override ( "Collection" ), - Max ( 1 ), - Description ( - "The DiskGroup that is divided into smaller Collections." )] - CIM_DiskGroup REF Collection; - - [Override ( "CollectionInCollection" ), - Description ( - "The DiskGroup that is a subset of the larger Group." )] - CIM_DiskGroup REF CollectionInCollection; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_HDSLModem.mof b/build/vendor/dmtf_mof/Device/CIM_HDSLModem.mof deleted file mode 100644 index f271b9ba..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_HDSLModem.mof +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HDSLModem -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Modems" ), - Description ( - "The HDSLModem class represents Modems of the DSL type = HDSL, " - "High data rate Digital Subscribe Line, which is capable of " - "delivering T1 or E1 speeds. Properties will be defined in a " - "future release of the model." )] -class CIM_HDSLModem : CIM_DSLModem { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_HardwareThread.mof b/build/vendor/dmtf_mof/Device/CIM_HardwareThread.mof deleted file mode 100644 index bb0a5eb9..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_HardwareThread.mof +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Device::Processor" ), - Description ( - "The CIM_HardwareThread class inherits from " - "CIM_EnabledLogicalElement and represents a specific processor " - "hardware thread. CIM_HardwareThread instances are related to " - "the CIM_ProcessorCore instance they are based on." )] -class CIM_HardwareThread : CIM_EnabledLogicalElement { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. \n" - "In order to ensure uniqueness within the NameSpace, the " - "value of InstanceID SHOULD be constructed using the " - "following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon " - "\':\', and where MUST include a copyrighted, " - "trademarked or otherwise unique name that is owned by " - "the business entity creating/defining the InstanceID, or " - "is a registered ID that is assigned to the business " - "entity by a recognized global authority (This is similar " - "to the _ structure of Schema " - "class names.) In addition, to ensure uniqueness " - "MUST NOT contain a colon (\':\'). When using this " - "algorithm, the first colon to appear in InstanceID MUST " - "appear between and . \n" - " is chosen by the business entity and SHOULD " - "not be re-used to identify different underlying " - "(real-world) elements. If the above \'preferred\' " - "algorithm is not used, the defining entity MUST assure " - "that the resultant InstanceID is not re-used across any " - "InstanceIDs produced by this or other providers for this " - "instance\'s NameSpace. \n" - "For DMTF defined instances, the \'preferred\' algorithm " - "MUST be used with the set to \'CIM\'." )] - string InstanceID; - - [Description ( - "Loading of this processor hardware thread, averaged over " - "the last minute, in Percent." ), - Units ( "Percent" ), - Gauge, PUnit ( "percent" )] - uint16 LoadPercentage; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_HeatPipe.mof b/build/vendor/dmtf_mof/Device/CIM_HeatPipe.mof deleted file mode 100644 index 3fbf3d91..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_HeatPipe.mof +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HeatPipe -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::CoolingAndPower" ), - Description ( - "Capabilities and management of a HeatPipe CoolingDevice." )] -class CIM_HeatPipe : CIM_CoolingDevice { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_HostedStoragePool.mof b/build/vendor/dmtf_mof/Device/CIM_HostedStoragePool.mof deleted file mode 100644 index 77940191..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_HostedStoragePool.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HostedStoragePool -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::StorageServices" ), - Description ( - "SystemStoragePool is a specialization of SystemComponent " - "association that establishes that the StoragePool is defined " - "in the context of the System." )] -class CIM_HostedStoragePool : CIM_SystemComponent { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The parent system in the Association." )] - CIM_System REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The StoragePool that is a component of a System." )] - CIM_StoragePool REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_IBSubnetManager.mof b/build/vendor/dmtf_mof/Device/CIM_IBSubnetManager.mof deleted file mode 100644 index 591ea761..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_IBSubnetManager.mof +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_IBSubnetManager -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::IB" ), - Description ( - "An Infiniband Subnet Manager (SM) is an entity responsible for " - "configuring and managing an IB subnet. It uses Subnet " - "Management Agents (SMA) to access and manage individual nodes. " - "The SM is hosted in the context of a specific computer system " - "(i.e., hosted by an instance of UnitaryComputerSystem), as " - "described by the HostedService association. Note that there " - "may be multiple SMs operating in a subnet, but only the " - "elected master is allowed to perform configuration functions." )] -class CIM_IBSubnetManager : CIM_Service { - - [Write, Description ( - "Administratively assigned priority for this SM, used to " - "establish the master. A higher number indicates a higher " - "priority and likelihood of becoming the master. The " - "property value can be reset by the master SM." ), - MappingStrings { "MAD.IBTA | SMInfo | Priority" }] - uint8 Priority; - - [Description ( - "Enumerated value that indicates the Subnet Manager\'s " - "State. The values are fairly self-explanatory except for " - "\"Not Active\". This value indicates that the SM is " - "available to participate in the subnet, but has not been " - "given permission. A value \"Unknown\" (0) is also " - "defined." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Not Active", "Discovering", "Standby", - "Master" }, - MappingStrings { "MAD.IBTA | SMInfo | SMState" }] - uint16 State; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_IDEController.mof b/build/vendor/dmtf_mof/Device/CIM_IDEController.mof deleted file mode 100644 index 07f78cb4..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_IDEController.mof +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_IDEController -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( "Capabilities and management of an IDEController." )] -class CIM_IDEController : CIM_Controller { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ISDNModem.mof b/build/vendor/dmtf_mof/Device/CIM_ISDNModem.mof deleted file mode 100644 index 693c35ba..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ISDNModem.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ISDNModem -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::Modems" ), - Description ( - "The ISDNModem class, a kind of call-based Modem. Properties " - "will be defined in a future release of the model." )] -class CIM_ISDNModem : CIM_CallBasedModem { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_IndicatorLED.mof b/build/vendor/dmtf_mof/Device/CIM_IndicatorLED.mof deleted file mode 100644 index 603b4b81..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_IndicatorLED.mof +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Device::Sensors" ), - Description ( - "CIM_IndicatorLED represents an LED of a managed element used " - "to indicate one or more conditions for the managed element. A " - "single discrete package may be represented by one or more " - "instances of CIM_IndicatorLED. There shall be an instance of " - "CIM_IndicatorLED for each IndicatedCondition that may be " - "indicated simultaneously by the discrete package. For example, " - "if a single LED is capable of flashing yellow for one " - "condition and blue for a different one, but the conditions are " - "not indicated simultaneously, it is modeled using a single " - "instance of CIM_IndicatorLED that supports both colors. If the " - "LED indicated both conditions simultaneously, i.e. the package " - "was lit yellow and blue simultaneously, there would be two " - "instances of CIM_IndicatorLED." )] -class CIM_IndicatorLED : CIM_LogicalDevice { - - [Override ( "ElementName" ), - Description ( - "ElementName specifies an identifier for the LED. The " - "value of ElementName shall be constructed using the " - "following \"preferred\" algorithm: :: \n" - "Where and are separated by two colons " - "(::), and where shall include a copyrighted, " - "trademarked, or otherwise unique name that is owned by " - "the business entity that is creating or defining the " - "ControlPattern or that is a registered ID assigned to " - "the business entity by a recognized global authority. " - " is chosen by the business entity and should " - "not be reused to identify different underlying " - "(real-world) elements." )] - string ElementName; - - [Description ( - "The condition indicated by the LED. 2 \"Not Applicable\" " - "shall indicate the LED is currently not assigned an " - "interpretation. \n" - "3 \"Location\" shall indicate the LED is used to " - "indicate the location of associated managed elements.\n" - "4 \"Attention\" shall indicate the LED is used to " - "indicate the associated managed elements requires the " - "attention of service personnel.\n" - "5 \"Activity\" shall indicate the LED is used to " - "indicate activity is occurring for the associated " - "managed elements. The type of activity indicated is " - "specific to the associated managed elements.\n" - "6 \"Powered On\" shall indicate the LED is used to " - "indicate if the associated managed elements are " - "receiving power. \n" - "7 \"Fault\" shall indicate the LED is used to indicate " - "if the associated managed elements are in a fault, " - "error, or otherwise degraded state." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "..", - "32768..65535" }, - Values { "Unknown", "Other", "Not Applicable", "Location", - "Attention", "Activity", "Powered On", "Fault", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { - "CIM_IndicatorLED.OtherIndicatedConditionDescription" }] - uint16 IndicatedConditions[]; - - [Description ( - "This property shall have a value if IndicatedCondition " - "contains the value 1 \"Other\"." ), - ModelCorrespondence { "CIM_IndicatorLED.IndicatedCondition" }] - string OtherIndicatedConditionDescription; - - [Write, Description ( - "This property shall indicate the current color of the " - "LED. If the value of the ActivationState property is 4 " - "\"Off\" this property shall indicate the color of the " - "LED the last time it was lit, or shall have the value 2 " - "\"Not Applicable\"." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "..", "32768..65535" }, - Values { "Unknown", "Other", "Not Applicable", "White", - "Red", "Green", "Blue", "Orange", "Yellow", "Black", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { - "CIM_IndicatorLED.OtherColorDescription", - "CIM_IndicatorLEDCapabilities.SupportedColors" }] - uint16 Color; - - [Write, Description ( - "This property shall have a value if Color contains the " - "value 1 \"Other\"." ), - ModelCorrespondence { "CIM_IndicatorLED.Color", - "CIM_IndicatorLEDCapabilities.OtherSupportedColorDescriptions" }] - string OtherColorDescription; - - [Write, Description ( - "ControlMode indicates the current control mode for the " - "LED.2 \"Automatic\" shall indicate the state of the LED " - "is being controlled by the management infrastructure. 3 " - "\"Manual\" shall indicate the state of the LED is being " - "controlled by a management client. 4 \"Test\" shall " - "indicate the LED is in a test mode." ), - ValueMap { "2", "3", "4", "..", "32768..65535" }, - Values { "Automatic", "Manual", "Test", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { - "CIM_IndicatorLEDCapabilities.SupportedControlModes" }] - uint16 ControlMode; - - [Description ( - "DefaultActivationState indicates the default state of an " - "LED. See ActivationState for a description of the " - "values." ), - ValueMap { "2", "3", "4", "5", "..", "32768..65535" }, - Values { "Lit", "Blinking", "Off", "Control Pattern", - "DMTF Reserved", "Vendor Reserved" }] - uint16 DefaultActivationState; - - [Write, Description ( - "ActivationState indicates the current activity of an " - "LED. An LED may exhibit behaviors that vary greatly in " - "complexity. If the behavior of the LED is simple or a " - "detailed depiction of the behavior is unnecessary to " - "convey to client applications, values of than 5 " - "\"ControlPattern\" may be used to indicate the behavior. " - "If the behavior is complex and detailed information " - "about the behavior is meaningful to a client, the value " - "5 \"ControlPattern\" shall be used to indicate the " - "ControlPattern property describes the behavior. \n" - "2 \"Lit\" shall indicate the LED is continuously " - "illuminated without variation in color or intensity. 3 " - "\"Blinking\" shall indicate the LED is alternating " - "between illuminated and not illuminated in a regular " - "pattern without variation in color or intensity. The " - "pattern is not indicated. \n" - "4 \"Off\" shall indicate the LED is not illuminated. 5 " - "\"ControlPattern\" shall indicate the LED is exhibiting " - "behavior that is described using the ControlPattern " - "property." ), - ValueMap { "2", "3", "4", "5", "..", "32768..65535" }, - Values { "Lit", "Blinking", "Off", "Control Pattern", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_IndicatorLED.ControlPattern", - "CIM_IndicatorLEDCapabilities.SupportedActivationStates" }] - uint16 ActivationState; - - [Write, Description ( - "An LED may exhibit a range of behavior from very simple " - "(ex. solid on) to very complicated (ex. a series of " - "blinks of alternating color and duration). " - "ControlPattern specifies the vendor or standard behavior " - "exhibited by the LED if it cannot be described using one " - "of the standard behaviors listed for the ActivationState " - "property. \n" - "If ActivationState has the value 5 \"ControlPattern\", " - "the ControlPattern property shall not be NULL. \n" - "The value of ControlPattern shall be constructed using " - "the following \"preferred\" algorithm: " - ":: \n" - "Where and < Pattern> are separated by two colons " - "(::), and where shall include a copyrighted, " - "trademarked, or otherwise unique name that is owned by " - "the business entity that is creating or defining the " - "ControlPattern or that is a registered ID assigned to " - "the business entity by a recognized global authority. If " - "the definition of the value is specified by the DMTF, " - "the value of shall be \"DMTF\". is " - "chosen by the business entity and shall not be reused to " - "identify different underlying (real-world) behaviors. If " - "the behavior specified for the LED adheres to a standard " - "or proprietary specification, shall be a " - "uniquely assigned value identifying the behavior. If the " - "behavior for the LED is described using a standard or " - "proprietary grammar, shall be prefixed with a " - "uniquely assigned identifier for the grammar." ), - ModelCorrespondence { "CIM_IndicatorLED.ActivationState", - "CIM_IndicatorLEDCapabilities.SupportedControlPatterns" }] - string ControlPattern; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_IndicatorLEDCapabilities.mof b/build/vendor/dmtf_mof/Device/CIM_IndicatorLEDCapabilities.mof deleted file mode 100644 index fe563f60..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_IndicatorLEDCapabilities.mof +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Device::LED" ), - Description ( - "LEDCapabilities describes the capabilities supported for " - "managing the associated LED." )] -class CIM_IndicatorLEDCapabilities : CIM_EnabledLogicalElementCapabilities { - - [Description ( - "The conditions that may be indicated by the LED.See " - "CIM_IndicatorLED.IndicatedCondition for a description of " - "the values." ), - ValueMap { "1", "3", "4", "5", "6", "7", "..", "32768..65535" }, - Values { "Other", "Location", "Attention", "Activity", - "Powered On", "Fault", "DMTF Reserved", "Vendor Reserved" }] - uint16 SupportedIndicatedConditions[]; - - [Description ( - "An array index of this property shall have a value if " - "the corresponding array index of " - "SupportedIndicatedConditions contains the value 1 " - "\"Other\"." ), - ModelCorrespondence { - "CIM_IndicatorLEDCapabilities.SupportedIndicatedConditions", - "CIM_IndicatorLED.OtherIndicatedConditionDescription" }] - string OtherSupportedIndicatedConditionDescriptions[]; - - [Description ( - "SupportedControlModes indicates the control modes " - "supported for the LED.See " - "CIM_IndicatorLED.CurrentControlMode for more " - "information." ), - ValueMap { "2", "3", "4", "..", "32768..65535" }, - Values { "Automatic", "Manual", "Test", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { "CIM_IndicatorLED.ControlMode" }] - uint16 SupportedControlModes[]; - - [Description ( - "This property indicates the colors supported by the " - "associated instance of CIM_IndicatorLED." ), - ValueMap { "1", "3", "4", "5", "6", "7", "8", "9", "..", - "32768..65535" }, - Values { "Other", "White", "Red", "Green", "Blue", "Orange", - "Yellow", "Black", "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_IndicatorLED.Color", - "CIM_IndicatorLEDCapabilities.OtherSupportedColorDescriptions" }] - uint16 SupportedColors[]; - - [Description ( - "An array index of this property shall have a value if " - "the corresponding array index of SupportedColors " - "contains the value 1 \"Other\"." ), - ModelCorrespondence { - "CIM_IndicatorLEDCapabilities.SupportedColors", - "CIM_IndicatorLED.OtherColorDescription" }] - string OtherSupportedColorDescriptions[]; - - [Description ( - "SupportedControlPatterns describes the control patterns " - "supported by the associated LED. The values of " - "SupportedControlPatterns may be an exact match for " - "values allowed for CIM_IndicatorLED.ControlPatterns or " - "may indicate general categories of behavior. The " - "interpretation of value is specific to the business " - "entity identified by . \n" - "Each value of SupportedControlPatterns shall be " - "constructed using the following \"preferred\" algorithm: " - ":: \n" - "Where and < Pattern> are separated by two colons " - "(::), and where shall include a copyrighted, " - "trademarked, or otherwise unique name that is owned by " - "the business entity that is creating or defining the " - "ControlPattern or that is a registered ID assigned to " - "the business entity by a recognized global authority. " - " is chosen by the business entity and shall not " - "be reused to identify different underlying (real-world) " - "behaviors. If the behavior specified for the LED adheres " - "to a standard or proprietary specification, " - "shall be a uniquely assigned value identifying the " - "behavior. If the behavior for the LED is described using " - "a standard or proprietary grammar, shall be " - "prefixed with a uniquely assigned identifier for the " - "grammar." ), - ModelCorrespondence { "CIM_IndicatorLED.ControlPattern" }] - string SupportedControlPatterns[]; - - [Description ( - "SupportedActivationStates indicates the supported " - "activation states for the associated IndicatorLED. See " - "CIM_IndicatorLED.ActivationState for descriptions of the " - "values." ), - ValueMap { "2", "3", "4", "5", "..", "32768..65535" }, - Values { "Lit", "Blinking", "Off", "Control Pattern", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_IndicatorLED.ActivationState" }] - uint16 SupportedActivationStates[]; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_InfraredController.mof b/build/vendor/dmtf_mof/Device/CIM_InfraredController.mof deleted file mode 100644 index 9d5f5c71..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_InfraredController.mof +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_InfraredController -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( - "Capabilities and management of an InfraredController." )] -class CIM_InfraredController : CIM_Controller { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_InterLibraryPort.mof b/build/vendor/dmtf_mof/Device/CIM_InterLibraryPort.mof deleted file mode 100644 index 6ec5edbd..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_InterLibraryPort.mof +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_InterLibraryPort -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageLib" ), - Description ( - "InterLibraryPorts represent hardware that transports Physical " - "Media between connected StorageLibraries. The LibraryExchange " - "association identifies the connected Libraries, by identifying " - "the connected InterLibraryPorts." )] -class CIM_InterLibraryPort : CIM_MediaTransferDevice { - - [Description ( - "Date and time that the Port was last accessed by its " - "System/StorageLibrary. This value may be different than " - "that specified for the Port(s) to which this Inter " - "LibraryPort is connected. Connected Ports are identified " - "using the LibraryExchange association." )] - datetime LastAccessed; - - [Description ( - "The number of times that the InterLibraryPort was used " - "to move a PhysicalMedia into the System/StorageLibrary." ), - Counter] - uint64 ImportCount; - - [Description ( - "The number of times that the InterLibraryPort was used " - "to move a PhysicalMedia out of the " - "System/StorageLibrary." ), - Counter] - uint64 ExportCount; - - [Description ( - "An enumeration expressing whether the Port is used for " - "import into the Library/System which scopes and names it " - "(value=1), export from the Library/System (value=2), or " - "both (value=3)." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Import", "Export", - "Both Import and Export" }] - uint16 Direction; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_Keyboard.mof b/build/vendor/dmtf_mof/Device/CIM_Keyboard.mof deleted file mode 100644 index a9894a24..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_Keyboard.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Keyboard -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::UserDevices" ), - Description ( - "Capabilities and management of the Keyboard LogicalDevice." )] -class CIM_Keyboard : CIM_UserDevice { - - [Description ( "Number of function keys on the Keyboard." )] - uint16 NumberOfFunctionKeys; - - [Description ( - "A free-form string indicating the format and layout of " - "the Keyboard." ), - MappingStrings { "MIF.DMTF|Keyboard|004.1" }] - string Layout; - - [Description ( - "An integer indicating whether a hardware-level password " - "is enabled at the keyboard (value=4), preventing local " - "input. Other values are: \"Disabled\" (3), \"Not " - "Implemented\" (5), \"Other\" (1) and \"Unknown\" (2)." ), - ValueMap { "1", "2", "3", "4", "5" }, - Values { "Other", "Unknown", "Disabled", "Enabled", - "Not Implemented" }, - MappingStrings { "MIF.DMTF|System Hardware Security|001.2" }] - uint16 Password; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_LabelReader.mof b/build/vendor/dmtf_mof/Device/CIM_LabelReader.mof deleted file mode 100644 index 1a5e3bc8..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_LabelReader.mof +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LabelReader -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageLib" ), - Description ( - "LabelReaders represent hardware capable of scanning or reading " - "a physical label or the NonVolatileMemory on a PhysicalMedia. " - "Examples of labels include barcode and OCR tags." )] -class CIM_LabelReader : CIM_LogicalDevice { - - [Description ( - "An array of enumerated integers describing the formats " - "of the labels that can be read or scanned by the " - "LabelReader. The values specified for this property " - "correspond to those defined for " - "CIM_PhysicalMedia.LabelFormats." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Barcode", "Radio Frequency Identification", - "OCR (Optical Character Recognition)", - "MICR (Magnetic Ink Character Recognition)", - "7 Character Barcode", "9 Character Barcode" }, - ModelCorrespondence { "CIM_PhysicalMedia.LabelFormats" }] - uint16 SupportedFormats[]; - - [Description ( - "The technology used by the LabelReader. One entry of the " - "Values array requires some explanation - \"Memory " - "Reader\". The latter describes the ability to access " - "memory in a PhysicalMedia\'s packaging (for example, " - "memory on an AIT tape). The existence of this Memory is " - "indicated by the MemoryWithMedia association on the " - "physical side, or by AssociatedMemory on the logical " - "side." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6" }, - Values { "Unknown", "Other", "Laser", "Infrared", "RF", - "Camera", "Memory Reader" }] - uint16 Technology; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_LabelReaderStatData.mof b/build/vendor/dmtf_mof/Device/CIM_LabelReaderStatData.mof deleted file mode 100644 index b61e17f2..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_LabelReaderStatData.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LabelReaderStatData -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::StorageLib" ), - Description ( - "Statistics for a LabelReader, related to read successes, " - "failures and retries. The element whose statistics are " - "described is associated using the relationship, " - "ElementStatisticalData." )] -class CIM_LabelReaderStatData : CIM_StatisticalData { - - [Description ( - "The number of successful physical label scans." ), - Counter] - uint64 ScanSuccesses; - - [Description ( "The number of failed physical label scans." ), - Counter] - uint64 ScanFailures; - - [Description ( "The number of retried physical label scans." ), - Counter] - uint64 ScanRetries; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_LabelReaderStatInfo.mof b/build/vendor/dmtf_mof/Device/CIM_LabelReaderStatInfo.mof deleted file mode 100644 index b741a3da..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_LabelReaderStatInfo.mof +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LabelReaderStatInfo -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageLib" ), - Description ( - "Statistics for a LabelReader, related to read successes, " - "failures and retries." )] -class CIM_LabelReaderStatInfo : CIM_DeviceStatisticalInformation { - - [Description ( - "The number of successful physical label scans." ), - Counter] - uint64 ScanSuccesses; - - [Description ( "The number of failed physical label scans." ), - Counter] - uint64 ScanFailures; - - [Description ( "The number of retried physical label scans." ), - Counter] - uint64 ScanRetries; - - - [Description ( - "Method to reset the statistical counters. The method " - "takes one parameter as input - an integer indicating " - "which counter to reset. For this input parameter, 0 " - "indicates all, 1 resets the \"Scan Successes\" counter, " - "2 resets the \"Scan Failures\" counter, and 3 resets the " - "\"Scan Retries\" counter. The method returns 0 if " - "successful, 1 if not supported, and any other value if " - "an error occurred. A method is specified so that the " - "Device\'s instrumentation can also reset its internal " - "processing and counters. \n" - "In a subclass, the set of possible return codes should " - "be specified in a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \'translated\' " - "can be specified as a Values array qualifier." )] - uint32 ResetCounter( - [IN, Description ( "The counter to reset." ), - ValueMap { "0", "1", "2", "3" }, - Values { "All", "Scan Successes", "Scan Failures", - "Scan Retries" }] - uint16 SelectedCounter); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_LibraryExchange.mof b/build/vendor/dmtf_mof/Device/CIM_LibraryExchange.mof deleted file mode 100644 index 04d6ca04..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_LibraryExchange.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LibraryExchange -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageLib" ), - Description ( - "LibraryExchange indicates that two StorageLibraries are " - "connected through their InterLibraryPorts." )] -class CIM_LibraryExchange : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The InterLibraryPort of one StorageLibrary." )] - CIM_InterLibraryPort REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The InterLibraryPort of the connected Library." )] - CIM_InterLibraryPort REF Dependent; - - [Description ( - "Enumeration indicating whether the Antecedent (value=1), " - "Dependent (value=2), or neither Library (value=3) " - "currently has access to the Port." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Antecedent", "Dependent", "Neither" }] - uint16 CurrentlyAccessingPort; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_LibraryPackage.mof b/build/vendor/dmtf_mof/Device/CIM_LibraryPackage.mof deleted file mode 100644 index ec6f8455..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_LibraryPackage.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LibraryPackage -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::StorageLib" ), - Description ( - "Similar to the way that LogicalDevices are \'Realized\' by " - "PhysicalElements, a StorageLibrary can be realized in one or " - "more PhysicalPackages. The LibraryPackage association " - "explicitly defines this relationship." )] -class CIM_LibraryPackage : CIM_SystemPackaging { - - [Override ( "Antecedent" ), - Description ( - "The PhysicalPackage(s) that realize a StorageLibrary." )] - CIM_PhysicalPackage REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The StorageLibrary." )] - CIM_StorageLibrary REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_LimitedAccessPort.mof b/build/vendor/dmtf_mof/Device/CIM_LimitedAccessPort.mof deleted file mode 100644 index d21e43a7..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_LimitedAccessPort.mof +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_LimitedAccessPort -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageLib" ), - Description ( - "LimitedAccessPorts represent hardware that transports Physical " - "Media into or out of a System, such as a StorageLibrary. They " - "are identified as \'limited\' since these Ports do not provide " - "access to ALL the PhysicalMedia or StorageMediaLocations in a " - "Library, but only to a subset." )] -class CIM_LimitedAccessPort : CIM_MediaTransferDevice { - - [Description ( - "Boolean indicating that the Port is \'locked\' (TRUE) or " - "\'unlocked\' (FALSE). When the Port is locked, access " - "its Media Locations is prevented without the use of a " - "physical key, front panel activity or the issuance of a " - "software unlock command." )] - boolean Locked; - - [Description ( - "When a Port is \'Extended\' or \'open\' (value=TRUE), " - "its Storage MediaLocations are accessible to a human " - "operator. If not extended (value=FALSE), the Locations " - "are accessible to a PickerElement." )] - boolean Extended; - - [Description ( - "When a LimitedAccessPort is \'Extended\', all related " - "media- transfer componentry may be stopped. The " - "ExtendTimeout property provides a mechanism to event on " - "a Port left open for a period of time (in seconds) " - "exceeding the property\'s value." ), - Units ( "Seconds" ), - PUnit ( "second" )] - uint32 ExtendTimeout; - - [Description ( - "Date and time that the Port was last extended." )] - datetime LastExtended; - - [Description ( - "The number of times that the LimitedAccessPort was used " - "to move a PhysicalMedia into the System/StorageLibrary." ), - Counter] - uint64 ImportCount; - - [Description ( - "The number of times that the LimitedAccessPort was used " - "to move a PhysicalMedia out of the " - "System/StorageLibrary." ), - Counter] - uint64 ExportCount; - - [Description ( - "An enumeration expressing whether the Port is used for " - "import into the Library/System which scopes and names it " - "(value=1), export from the Library/System (value=2), or " - "both (value=3)." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Import", "Export", - "Both Import and Export" }] - uint16 Direction; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_LogicalDisk.mof b/build/vendor/dmtf_mof/Device/CIM_LogicalDisk.mof deleted file mode 100644 index 8f7a4357..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_LogicalDisk.mof +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Correct ValueMapsAdd UmlPackagePath -// qualifier values to CIM Schema. -// Correct descriptions -// use of MAY and MUST to may and shall. -// ================================================================== -// CIM_LogicalDisk -// ================================================================== - [Version ( "2.15.0" ), - UMLPackagePath ( "CIM::Device::StorageExtents" ), - Description ( - "A LogicalDisk is a presentation of a contiguous range of " - "logical blocks that is identifiable by applications such as " - "filesystems via the Name field. (DeviceID (key) may use the " - "same name or some other unique text such as a UUID.) For " - "example in a Windows environment, the Name field may contain a " - "drive letter. In a Unix environment, it may contain the access " - "path (for example, \'/dev/...\'); and in a NetWare " - "environment, may contain the volume name. LogicalDisks are " - "typically built on a DiskPartition or other LogicalDisks (for " - "instance, those exposed by a software volume manager). " - "However, it can be based on other StorageExtents, like " - "CIM_Memory, in the case of a RAM disk. \n" - "\n" - "LogicalDisks SHOULD set the \'Exported\' value in " - "ExtentStatus[] if they are intended for application use." )] -class CIM_LogicalDisk : CIM_StorageExtent { - - [Override ( "NameFormat" ), - Description ( - "LogicalDisk names shall use OS Device Name format." ), - ValueMap { "1", "12" }, - Values { "Other", "OS Device Name" }] - uint16 NameFormat = 12; - - [Override ( "NameNamespace" ), - Description ( - "LogicalDisk names shall use OS Device Namespace." ), - ValueMap { "1", "8" }, - Values { "Other", "OS Device Namespace" }] - uint16 NameNamespace = 8; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_LogicalDiskBasedOnExtent.mof b/build/vendor/dmtf_mof/Device/CIM_LogicalDiskBasedOnExtent.mof deleted file mode 100644 index 009bc43b..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_LogicalDiskBasedOnExtent.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LogicalDiskBasedOnExtent -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageExtents" ), - Description ( - "LogicalDisks can be BasedOn a single StorageVolume, Memory (in " - "the case of a RAM Disk), a DiskPartition or other " - "StorageExtent. These relationships are made explicit in this " - "association. Subclasses of the association, LogicalDiskBasedOn " - "Partition and LogicalDiskBasedOnVolume, detail the \'typical\' " - "semantics." )] -class CIM_LogicalDiskBasedOnExtent : CIM_BasedOn { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The StorageExtent." )] - CIM_StorageExtent REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The LogicalDisk which is built on the StorageExtent." )] - CIM_LogicalDisk REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_LogicalDiskBasedOnPartition.mof b/build/vendor/dmtf_mof/Device/CIM_LogicalDiskBasedOnPartition.mof deleted file mode 100644 index 115cd2c0..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_LogicalDiskBasedOnPartition.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LogicalDiskBasedOnPartition -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageExtents" ), - Description ( - "LogicalDisks can be BasedOn a DiskPartition. For example, a " - "personal computer\'s C: drive may be located on a Partition on " - "local PhysicalMedia. In this association of LogicalDisks to " - "Partitions, note that the cardinality of the Antecedent, Disk " - "Partition, is Max (1). This dictates that a LogicalDisk can " - "not span more than one Partition. However, there are cases " - "where this is true. When it occurs, the LogicalDisk is really " - "based on some kind of RAID configuration (for example, a " - "mirror or stripe set). In these scenarios, the LogicalDisk is " - "more correctly BasedOn a StorageVolume. To prevent incorrectly " - "using the LogicalDiskBasedOnPartition association, the Max (1) " - "qualifier was put on the Antecedent reference to the " - "DiskPartition." )] -class CIM_LogicalDiskBasedOnPartition : CIM_LogicalDiskBasedOnExtent { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The DiskPartition." )] - CIM_DiskPartition REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The LogicalDisk which is built on the StorageExtent." )] - CIM_LogicalDisk REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_LogicalDiskBasedOnVolume.mof b/build/vendor/dmtf_mof/Device/CIM_LogicalDiskBasedOnVolume.mof deleted file mode 100644 index 916eb003..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_LogicalDiskBasedOnVolume.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LogicalDiskBasedOnVolume -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageExtents" ), - Description ( - "LogicalDisks can be BasedOn a single Volume (for example, " - "exposed by a software volume manager), or be BasedOn a Disk " - "Partition directly. The former relationship is made explicit " - "in this association." )] -class CIM_LogicalDiskBasedOnVolume : CIM_LogicalDiskBasedOnExtent { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The StorageVolume." )] - CIM_StorageVolume REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The LogicalDisk which is built on the StorageExtent." )] - CIM_LogicalDisk REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_LogicalDiskBasedOnVolumeSet.mof b/build/vendor/dmtf_mof/Device/CIM_LogicalDiskBasedOnVolumeSet.mof deleted file mode 100644 index eca672d6..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_LogicalDiskBasedOnVolumeSet.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LogicalDiskBasedOnVolumeSet -// ================================================================== - [Association, Deprecated { "CIM_BasedOn" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::SccExtents" ), - Description ( - "This association describes that LogicalDisks can be BasedOn a " - "VolumeSet. However, there is no need for the specificity of " - "this association. It is deprecated in lieu of the generic " - "BasedOn relationship." )] -class CIM_LogicalDiskBasedOnVolumeSet : CIM_LogicalDiskBasedOnVolume { - - [Deprecated { "CIM_BasedOn.Antecedent" }, - Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The VolumeSet." )] - CIM_VolumeSet REF Antecedent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_LogicalModule.mof b/build/vendor/dmtf_mof/Device/CIM_LogicalModule.mof deleted file mode 100644 index 0d899703..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_LogicalModule.mof +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Device::Ports" ), - Description ( - "LogicalModule is the logical device that corresponds to a " - "component part (such as a card or blade) in a device. For " - "example, a line card in a switch is an instance of " - "LogicalModule, that is associated with the the switch itself. " - "A logical module is not necessarily independently managed." )] -class CIM_LogicalModule : CIM_LogicalDevice { - - [Description ( - "Logical modules are often named by the physical or " - "logical slot that they occupy within the containing " - "device. ModuleNumber is the number assigned to the " - "module by its parent." )] - uint16 ModuleNumber; - - [Description ( - "Type identifies the type of LogicalModule this instance " - "represents. \n" - "A value of \"Unknown\" indicates that the " - "LogicalModuleType is unknown. \n" - "A value of \"Other\" indicates that the value is not one " - "of the enumerated values. " - "OtherLogicalModuleTypeDescription should contain " - "additional information. \n" - "A value of \"Device Tray\" indicates that the device is " - "a device or media tray, for example in a modular system. \n" - "A value of \"Line Card\" indicates that the module is a " - "line card in a switch. \n" - "A value of \"Blade\" indicates the module is a blade " - "inserted into a switch. \n" - "The ranges expressed by \"DMTF Reserved\" and \"Vendor " - "Reserved\" are reserved for DMTF and Vendor " - "extensibility, respectively." ), - ValueMap { "0", "1", "2", "3", "4", "5..32767", "32768..65535" }, - Values { "Unknown", "Other", "Device Tray", "Line Card", - "Blade", "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { - "CIM_LogicalModule.OtherLogicalModuleTypeDescription" }] - uint16 LogicalModuleType = 0; - - [Description ( - "OtherLogicalModuleTypeDescription provides additional " - "information about the type of LogicalModule represented " - "by this instance when the value of LogicalModuleType is " - "1 (\"Other\")." ), - ModelCorrespondence { "CIM_LogicalModule.LogicalModuleType" }] - string OtherLogicalModuleTypeDescription; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_LogicalPort.mof b/build/vendor/dmtf_mof/Device/CIM_LogicalPort.mof deleted file mode 100644 index 39dbe5c6..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_LogicalPort.mof +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_LogicalPort -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Ports" ), - Description ( - "The abstraction of a port or connection point of a Device. " - "This object should be instantiated when the Port has " - "independent management characteristics from the Device that " - "includes it. Examples are a Fibre Channel Port and a USB Port." )] -class CIM_LogicalPort : CIM_LogicalDevice { - - [Description ( "The bandwidth of the Port in Bits per Second." ), - Units ( "Bits per Second" ), - PUnit ( "bit / second" )] - uint64 Speed; - - [Description ( - "The maximum bandwidth of the Port in Bits per Second." ), - Units ( "Bits per Second" ), - PUnit ( "bit / second" )] - uint64 MaxSpeed; - - [Write, Description ( - "The requested bandwidth of the Port in Bits per Second. " - "The actual bandwidth is reported in LogicalPort.Speed." ), - Units ( "Bits per Second" ), - ModelCorrespondence { "CIM_LogicalPort.Speed" }, - PUnit ( "bit / second" )] - uint64 RequestedSpeed; - - [Description ( - "In some circumstances, a LogicalPort might be " - "identifiable as a front end or back end port. An example " - "of this situation would be a storage array that might " - "have back end ports to communicate with disk drives and " - "front end ports to communicate with hosts. If there is " - "no restriction on the use of the port, then the value " - "should be set to \'not restricted\'." ), - ValueMap { "0", "2", "3", "4" }, - Values { "Unknown", "Front-end only", "Back-end only", - "Not restricted" }] - uint16 UsageRestriction; - - [Description ( - "PortType is defined to force consistent naming of the " - "\'type\' property in subclasses and to guarantee unique " - "enum values for all instances of NetworkPort. When set " - "to 1 (\"Other\"), related property OtherPortType " - "contains a string description of the type of port. A " - "range of values, DMTF_Reserved, has been defined that " - "allows subclasses to override and define their specific " - "types of ports." ), - ValueMap { "0", "1", "2", "3..15999", "16000..65535" }, - Values { "Unknown", "Other", "Not Applicable", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_NetworkPort.OtherNetworkPortType" }] - uint16 PortType; - - [Description ( - "Describes the type of module, when PortType is set to 1 (\"Other\")." - ), - ModelCorrespondence { "CIM_LogicalPort.PortType" }] - string OtherPortType; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_LogicalPortCapabilities.mof b/build/vendor/dmtf_mof/Device/CIM_LogicalPortCapabilities.mof deleted file mode 100644 index 7064ef4c..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_LogicalPortCapabilities.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.11.0" ), - UMLPackagePath ( "CIM::Device::Ports" ), - Description ( - "LogicalPortCapabilities describes the configuration " - "capabilities for properties in LogicalPortSettings." )] -class CIM_LogicalPortCapabilities : CIM_EnabledLogicalElementCapabilities { - - [Description ( - "List of supported port speeds that can be configured on " - "LogicalPortSettings.RequestedSpeed." ), - ModelCorrespondence { "CIM_NetworkPort.Speed" }] - uint64 RequestedSpeedsSupported[]; - - [Description ( - "A boolean indicating whether the value in " - "LogicalPortSettings.AutoSenseSpeed may be changed " - "(TRUE), or may only be viewed (FALSE)." ), - ModelCorrespondence { "CIM_NetworkPort.Speed" }] - boolean AutoSenseSpeedConfigurable; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_LogicalPortGroup.mof b/build/vendor/dmtf_mof/Device/CIM_LogicalPortGroup.mof deleted file mode 100644 index 0e771441..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_LogicalPortGroup.mof +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LogicalPortGroup -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Ports" ), - Description ( - "A collection of one or more ports that are logically grouped " - "for administrative and discovery or topology purposes. " - "LogicalPortGroups define port collections for access control, " - "or for use in routing policy or other management tasks. For " - "example, in Fibre Channel and Infiniband, a LogicalPortGroup " - "represents the concept of a \'node\'." )] -class CIM_LogicalPortGroup : CIM_SystemSpecificCollection { - - [Description ( - "The Name property defines the identity by which the " - "LogicalPortGroup is known." ), - MaxLen ( 256 ), - ModelCorrespondence { "CIM_LogicalPortGroup.NameFormat" }] - string Name; - - [Description ( - "The NameFormat property identifies how the Name of the " - "LogicalPortGroup is generated." ), - ValueMap { "Unknown", "Other", "WWN", "GUID" }, - MaxLen ( 64 ), - ModelCorrespondence { "CIM_LogicalPortGroup.Name", - "CIM_LogicalPortGroup.OtherNameFormat" }] - string NameFormat; - - [Description ( - "A string that describes how the LogicalPortGroup is " - "identified when the NameFormat is \"Other\"." ), - ModelCorrespondence { "CIM_LogicalPortGroup.Name" }] - string OtherNameFormat; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_LogicalPortSettings.mof b/build/vendor/dmtf_mof/Device/CIM_LogicalPortSettings.mof deleted file mode 100644 index e8a2974b..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_LogicalPortSettings.mof +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.11.0" ), - UMLPackagePath ( "CIM::Device::Ports" ), - Description ( - "A LogicalPort may be configured via the LogicalPortSettings " - "class. The configuration changes are expected to be stored to " - "non-volatile memory." )] -class CIM_LogicalPortSettings : CIM_SettingData { - - [Write, Description ( - "The requested bandwidth of the Port in Bits per Second. " - "The actual bandwidth is reported in LogicalPort.Speed." ), - Units ( "Bits per Second" ), - MappingStrings { - "FC-SWAPI.INCITS-T11|UcPortConfigSetLinkSpeed" }, - ModelCorrespondence { "CIM_LogicalPort.Speed" }, - PUnit ( "bit / second" )] - uint64 RequestedSpeed; - - [Write, Description ( - "A boolean indicating whether the LogicalPort should " - "automatically negotiate an optimal bandwidth (TRUE), or " - "attempt to communicate only at the RequestedSpeed " - "(FALSE). The actual bandwidth is reported in " - "LogicalPort.Speed. Changing this value to (FALSE) may " - "cause the OperationalStatus to change to [stopped] if " - "the RequestedSpeed is not compatible with the attached " - "device \n" - "Check LogicalPortCapabilities.AutoSenseSpeedConfigurable " - "to see if this value may be changed." ), - MappingStrings { - "FC-SWAPI.INCITS-T11|UcPortConfigSetLinkSpeed" }, - ModelCorrespondence { "CIM_LogicalPort.Speed", - "CIM_LogicalPortCapabilities.AutoSenseSpeedConfigurable" }] - boolean AutoSenseSpeed; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_MagnetoOpticalDrive.mof b/build/vendor/dmtf_mof/Device/CIM_MagnetoOpticalDrive.mof deleted file mode 100644 index 4c434f02..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_MagnetoOpticalDrive.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_MagnetoOpticalDrive -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageDevices" ), - Description ( - "Capabilities and managment of a MagnetoOpticalDrive, a subtype " - "of MediaAccessDevice." )] -class CIM_MagnetoOpticalDrive : CIM_MediaAccessDevice { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ManagementController.mof b/build/vendor/dmtf_mof/Device/CIM_ManagementController.mof deleted file mode 100644 index f989f5df..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ManagementController.mof +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ManagementController -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( - "Capabilities and management of a ManagementController. An I2C " - "microcontroller is a type of ManagementController." )] -class CIM_ManagementController : CIM_Controller { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_MediaAccessDevice.mof b/build/vendor/dmtf_mof/Device/CIM_MediaAccessDevice.mof deleted file mode 100644 index ac965cae..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_MediaAccessDevice.mof +++ /dev/null @@ -1,264 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_MediaAccessDevice -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageDevices" ), - Description ( - "A MediaAccessDevice represents the ability to access one or " - "more media and use this media to store and retrieve data." )] -class CIM_MediaAccessDevice : CIM_LogicalDevice { - - [Description ( - "Capabilities of the MediaAccessDevice. For example, the " - "Device may support \"Random Access\", removeable media " - "and \"Automatic Cleaning\". In this case, the values 3, " - "7 and 9 would be written to the array. \n" - "Several of the enumerated values require some " - "explanation: 1) Value 11, Supports Dual Sided Media, " - "distinguishes a Device that can access both sides of " - "dual sided Media, from a Device that reads only a single " - "side and requires the Media to be flipped; and, 2) Value " - "12, Predismount Eject Not Required, indicates that Media " - "does not have to be explicitly ejected from the Device " - "before being accessed by a PickerElement." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12" }, - Values { "Unknown", "Other", "Sequential Access", - "Random Access", "Supports Writing", "Encryption", - "Compression", "Supports Removeable Media", - "Manual Cleaning", "Automatic Cleaning", - // 10 - "SMART Notification", - "Supports Dual Sided Media", - "Predismount Eject Not Required" }, - ArrayType ( "Indexed" ), - MappingStrings { "MIF.DMTF|Storage Devices|001.9", - "MIF.DMTF|Storage Devices|001.11", - "MIF.DMTF|Storage Devices|001.12", "MIF.DMTF|Disks|003.7", - "MIF.DMTF|Host Disk|001.2", "MIF.DMTF|Host Disk|001.4" }, - ModelCorrespondence { - "CIM_MediaAccessDevice.CapabilityDescriptions" }] - uint16 Capabilities[]; - - [Description ( - "An array of free-form strings providing more detailed " - "explanations for any of the AccessDevice features " - "indicated in the Capabilities array. Note, each entry of " - "this array is related to the entry in the Capabilities " - "array that is located at the same index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_MediaAccessDevice.Capabilities" }] - string CapabilityDescriptions[]; - - [Description ( - "ErrorMethodology is a free-form string describing the " - "type(s) of error detection and correction supported by " - "this Device." )] - string ErrorMethodology; - - [Description ( - "A free form string indicating the algorithm or tool used " - "by the device to support compression. If it is not " - "possible or not desired to describe the compression " - "scheme (perhaps because it is not known), recommend " - "using the following words: \"Unknown\" to represent that " - "it is not known whether the device supports compression " - "capabilities or not, \"Compressed\" to represent that " - "the device supports compression capabilities but either " - "its compression scheme is not known or not disclosed, " - "and \"Not Compressed\" to represent that the devices " - "does not support compression capabilities." )] - string CompressionMethod; - - [Description ( - "When the MediaAccessDevice supports multiple individual " - "Media, this property defines the maximum number which " - "can be supported or inserted." )] - uint32 NumberOfMediaSupported; - - [Description ( - "Maximum size, in KBytes, of media supported by this " - "Device. KBytes is interpreted as the number of bytes " - "multiplied by 1000 (NOT the number of bytes multiplied " - "by 1024)." ), - MappingStrings { "MIF.DMTF|Sequential Access Devices|001.2", - "MIF.DMTF|Host Disk|001.5" }] - uint64 MaxMediaSize; - - [Description ( - "Default block size, in bytes, for this Device." ), - Units ( "Bytes" ), - PUnit ( "byte" )] - uint64 DefaultBlockSize; - - [Description ( - "Maximum block size, in bytes, for media accessed by this Device." - ), - Units ( "Bytes" ), - PUnit ( "byte" )] - uint64 MaxBlockSize; - - [Description ( - "Minimum block size, in bytes, for media accessed by this Device." - ), - Units ( "Bytes" ), - PUnit ( "byte" )] - uint64 MinBlockSize; - - [Description ( - "Boolean indicating that the MediaAccessDevice needs " - "cleaning. Whether manual or automatic cleaning is " - "possible is indicated in the Capabilities array " - "property." )] - boolean NeedsCleaning; - - [Description ( - "True indicates that the media is locked in the Device " - "and can not be ejected. For non-removeable Devices, this " - "value should be true." )] - boolean MediaIsLocked; - - [Description ( - "An enumeration indicating the operational security " - "defined for the MediaAccessDevice. For example, " - "information that the Device is \"Read Only\" (value=4) " - "or \"Boot Bypass\" (value=6) can be described using this " - "property." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7" }, - Values { "Other", "Unknown", "None", "Read Only", - "Locked Out", "Boot Bypass", "Boot Bypass and Read Only" }, - MappingStrings { "MIF.DMTF|Disks|003.22" }] - uint16 Security; - - [Description ( - "The date and time on which the Device was last cleaned." )] - datetime LastCleaned; - - [Description ( - "Time in milliseconds to move from the first location on " - "the Media to the location that is furthest with respect " - "to time. For a DiskDrive, this represents full seek + " - "full rotational delay. For TapeDrives, this represents a " - "search from the beginning of the tape to the most " - "physically distant point. (The end of a tape may be at " - "its most physically distant point, but this is not " - "necessarily true.)" ), - Units ( "MilliSeconds" ), - PUnit ( "second * 10^-3" )] - uint64 MaxAccessTime; - - [Description ( - "The sustained data transfer rate in KB/sec that the " - "Device can read from and write to a Media. This is a " - "sustained, raw data rate. Maximum rates or rates " - "assuming compression should not be reported in this " - "property." ), - Units ( "KiloBytes per Second" ), - PUnit ( "byte / second * 10^3" )] - uint32 UncompressedDataRate; - - [Description ( - "Time in milliseconds from \'load\' to being able to read " - "or write a Media. For example, for DiskDrives, this is " - "the interval between a disk not spinning to the disk " - "reporting that it is ready for read/write (ie, the disk " - "spinning at nominal speeds). For TapeDrives, this is the " - "time from a Media being injected to reporting that it is " - "ready for an application. This is usually at the tape\'s " - "BOT area." ), - Units ( "MilliSeconds" ), - PUnit ( "second * 10^-3" )] - uint64 LoadTime; - - [Description ( - "Time in milliseconds from being able to read or write a " - "Media to its \'unload\'. For example, for DiskDrives, " - "this is the interval between a disk spinning at nominal " - "speeds and a disk not spinning. For TapeDrives, this is " - "the time for a Media to go from its BOT to being fully " - "ejected and accessible to a PickerElement or human " - "operator." ), - Units ( "MilliSeconds" ), - PUnit ( "second * 10^-3" )] - uint64 UnloadTime; - - [Description ( - "For a MediaAccessDevice that supports removable Media, " - "the number of times that Media have been mounted for " - "data transfer or to clean the Device. For Devices " - "accessing nonremovable Media, such as hard disks, this " - "property is not applicable and should be set to 0." ), - Counter] - uint64 MountCount; - - [Description ( - "For a MediaAccessDevice that supports removable Media, " - "the most recent date and time that Media was mounted on " - "the Device. For Devices accessing nonremovable Media, " - "such as hard disks, this property has no meaning and is " - "not applicable." )] - datetime TimeOfLastMount; - - [Description ( - "For a MediaAccessDevice that supports removable Media, " - "the total time (in seconds) that Media have been mounted " - "for data transfer or to clean the Device. For Devices " - "accessing nonremovable Media, such as hard disks, this " - "property is not applicable and should be set to 0." )] - uint64 TotalMountTime; - - [Description ( - "Defines \'Units\' relative to its use in the property, " - "MaxUnitsBeforeCleaning. This describes the criteria used " - "to determine when the MediaAccessDevice should be " - "cleaned." ), - ModelCorrespondence { - "CIM_MediaAccessDevice.MaxUnitsBeforeCleaning", - "CIM_MediaAccessDevice.UnitsUsed" }] - string UnitsDescription; - - [Description ( - "An unsigned integer indicating the maximum \'units\' " - "that can be used, with respect to the AccessDevice, " - "before the Device should be cleaned. The property, " - "UnitsDescription, defines how \'units\' should be " - "interpreted." ), - ModelCorrespondence { "CIM_MediaAccessDevice.UnitsDescription" }] - uint64 MaxUnitsBeforeCleaning; - - [Description ( - "An unsigned integer indicating the currently used " - "\'units\' of the AccessDevice, helpful to describe when " - "the Device may require cleaning. The property, " - "UnitsDescription, defines how \'units\' should be " - "interpreted." ), - Gauge, ModelCorrespondence { - "CIM_MediaAccessDevice.UnitsDescription", - "CIM_MediaAccessDevice.MaxUnitsBeforeCleaning" }] - uint64 UnitsUsed; - - - [Description ( - "Method to lock and unlock the media in a removeable " - "Access Device. The method takes one parameter as input - " - "a boolean indicating whether to lock or unlock. TRUE " - "indicates that the media should be locked in the Device, " - "FALSE indicates that the media should be unlocked. The " - "method returns 0 if successful, 1 if not supported, and " - "any other value if an error occurred. The set of " - "possible return codes should be specified in a ValueMap " - "qualifier on the method. The strings to which the " - "ValueMap contents are \'translated\' should be specified " - "as a Values array qualifier on the method." )] - uint32 LockMedia( - [IN, Description ( - "If TRUE, lock the media. If FALSE release the media." - )] - boolean Lock); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_MediaAccessStatData.mof b/build/vendor/dmtf_mof/Device/CIM_MediaAccessStatData.mof deleted file mode 100644 index 56d625cb..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_MediaAccessStatData.mof +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_MediaAccessStatData -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::StorageDevices" ), - Description ( - "Statistics related to reading and writing at a specific " - "MediaAccessDevice, or for a specific StorageExtent. The same " - "class is used to represent this data - whether for the " - "MediaAccessDevice (independent of the StorageExtent), OR for " - "the Extent (independent of its AccessDevice). The element " - "whose statistics are described is associated using the " - "relationship, ElementStatisticalData. Note that this class " - "models the same properties as MediaAccessStatInfo. This class, " - "however, uses the simplified key mechanisms of its superclass, " - "StatisticalData." )] -class CIM_MediaAccessStatData : CIM_StatisticalData { - - [Description ( "The number of attempted read operations." ), - Counter] - uint64 ReadOperations; - - [Description ( "The number of unrecoverable read operations." ), - Counter] - uint64 UnrecoverableReadOperations; - - [Description ( "The number of attempted write operations." ), - Counter] - uint64 WriteOperations; - - [Description ( "The number of unrecoverable write operations." ), - Counter] - uint64 UnrecoverableWriteOperations; - - [Description ( "The number of recovered read operations." ), - Counter] - uint64 RecoveredReadOperations; - - [Description ( "The number of recovered write operations." ), - Counter] - uint64 RecoveredWriteOperations; - - [Description ( "The number of recovered seek operations." ), - Counter] - uint64 RecoveredSeekOperations; - - [Description ( "The number of unrecoverable seek operations." ), - Counter] - uint64 UnrecoverableSeekOperations; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_MediaAccessStatInfo.mof b/build/vendor/dmtf_mof/Device/CIM_MediaAccessStatInfo.mof deleted file mode 100644 index 7d086aab..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_MediaAccessStatInfo.mof +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_MediaAccessStatInfo -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageDevices" ), - Description ( - "Statistics related to reading and writing at a specific " - "MediaAccessDevice, or for a specific StorageExtent. Although " - "the same class is used to represent this data, at the instance " - "level the object holds information for the MediaAccessDevice " - "(independent of the StorageExtent), OR for the Extent " - "(independent of its AccessDevice). Note that this class models " - "the same properties as MediaAccessStatData. The latter, " - "however, uses the simplified key mechanisms of the " - "StatisticalData class." )] -class CIM_MediaAccessStatInfo : CIM_DeviceStatisticalInformation { - - [Description ( "The number of attempted read operations." ), - Counter] - uint64 ReadOperations; - - [Description ( "The number of unrecoverable read operations." ), - Counter] - uint64 UnrecoverableReadOperations; - - [Description ( "The number of attempted write operations." ), - Counter] - uint64 WriteOperations; - - [Description ( "The number of unrecoverable write operations." ), - Counter] - uint64 UnrecoverableWriteOperations; - - [Description ( "The number of recovered read operations." ), - Counter] - uint64 RecoveredReadOperations; - - [Description ( "The number of recovered write operations." ), - Counter] - uint64 RecoveredWriteOperations; - - [Description ( "The number of recovered seek operations." ), - Counter] - uint64 RecoveredSeekOperations; - - [Description ( "The number of unrecoverable seek operations." ), - Counter] - uint64 UnrecoverableSeekOperations; - - - [Description ( - "Method to reset the statistical counters. The method " - "takes one parameter as input - an integer indicating " - "which counter to reset. For this input parameter, 0 " - "indicates all, 1-2 and 5 reset the \'read " - "operation\'-related counters, 3-4 and 6 reset the \'write " - "operation\'-related counters, and 7-8 reset the " - "seek-related counters. The method returns 0 if " - "successful, 1 if not supported, and any other value if " - "an error occurred. A method is specified so that the " - "Device\'s instrumentation can also reset its internal " - "processing and counters. \n" - "In a subclass, the set of possible return codes should " - "be specified in a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \'translated\' " - "can be specified as a Values array qualifier." )] - uint32 ResetCounter( - [IN, Description ( "The counter to reset." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "All", "Read Operations", - "Unrecoverable Read Operations", "Write Operations", - "Unrecoverable Write Operations", - "Recovered Read Operations", - "Recovered Write Operations", "Recovered Seeks", - "Unrecoverable Seeks" }] - uint16 SelectedCounter); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_MediaPartition.mof b/build/vendor/dmtf_mof/Device/CIM_MediaPartition.mof deleted file mode 100644 index 28675e69..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_MediaPartition.mof +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_MediaPartition -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageExtents" ), - Description ( - "A MediaPartition is a presentation of a contiguous range of " - "logical blocks and has identifying data written on/to it. It " - "may include a signature written by the OS or by an " - "application. This class is a common superclass for Disk and " - "TapePartions. Partitions are directly realized by Physical " - "Media (indicated by the RealizesExtent association) or built " - "on StorageVolumes (indicated by the BasedOn association)." )] -class CIM_MediaPartition : CIM_StorageExtent { - - [Description ( - "Boolean indicating that the Partition is labeled as " - "bootable. (Note that this does not mean that an " - "Operating System is actually loaded on the Partition.) " - "With the advent of bootable Tape and other bootable " - "media, this property is included in the higher level " - "MediaPartition class, rather than in a subclass such as " - "DiskPartition." )] - boolean Bootable; - - [Description ( - "Boolean indicating that the Partition is available and " - "may be allocated for use." )] - boolean Allocatable; - - [Description ( - "An identifying string written to the Partition. " - "Additional information related to this \'Signature\' may " - "be found in the properties, SignatureState and " - "SignatureAlgorithm." ), - ModelCorrespondence { "CIM_MediaPartition.SignatureState", - "CIM_MediaPartition.SignatureAlgorithm" }] - string Signature; - - [Description ( - "A free-form string describing the algorithm used to " - "define the Partition Signature. The value of this " - "property is dependent on the Signature\'s State." ), - ModelCorrespondence { "CIM_MediaPartition.Signature", - "CIM_MediaPartition.SignatureState" }] - string SignatureAlgorithm; - - [Description ( - "An enumeration describing the state of the Partition\'s " - "identifying Signature string. Information such as " - "\"Uninitialized\" (value=2), or \"Assigned by Owning " - "Application\" (value=5) are possible entries." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Unimplemented", "Uninitialized", - "Calculated by Operating System", - "Calculated by a Media Manager", - "Assigned by Owning Application" }, - ModelCorrespondence { "CIM_MediaPartition.Signature", - "CIM_MediaPartition.SignatureAlgorithm" }] - string SignatureState; - - [Description ( - "Boolean indicating that the Partition can be " - "grown/extended without reformatting." )] - boolean Extendable; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_MediaPresent.mof b/build/vendor/dmtf_mof/Device/CIM_MediaPresent.mof deleted file mode 100644 index 0c119296..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_MediaPresent.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_MediaPresent -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageExtents" ), - Description ( - "Where a StorageExtent must be accessed through a MediaAccess " - "Device, this relationship is described by the MediaPresent " - "association." ), - MappingStrings { "MIF.DMTF|Storage Devices|001.8" }] -class CIM_MediaPresent : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The MediaAccessDevice." )] - CIM_MediaAccessDevice REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The StorageExtent accessed using the MediaAccessDevice." )] - CIM_StorageExtent REF Dependent; - - [Description ( - "Boolean indicating that the accessed StorageExtent is " - "fixed in the MediaAccessDevice and can not be ejected." )] - boolean FixedMedia; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_MediaTransferDevice.mof b/build/vendor/dmtf_mof/Device/CIM_MediaTransferDevice.mof deleted file mode 100644 index 1dbff1ec..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_MediaTransferDevice.mof +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_MediaTransferDevice -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageLib" ), - Description ( - "A MediaTransferDevice represents hardware that moves Physical " - "Media. It is a superclass for Devices like PickerElement, " - "ChangerDevice and InterLibraryPort." )] -class CIM_MediaTransferDevice : CIM_LogicalDevice { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_Memory.mof b/build/vendor/dmtf_mof/Device/CIM_Memory.mof deleted file mode 100644 index 10f740cb..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_Memory.mof +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_Memory -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::Memory" ), - Description ( - "Capabilities and management of Memory-related LogicalDevices." )] -class CIM_Memory : CIM_StorageExtent { - - [Description ( - "Volatile is a property that indicates whether this " - "memory is volatile or not." )] - boolean Volatile; - - [Override ( "ErrorMethodology" ), - Description ( - "ErrorMethodology for Memory is a string property that " - "indicates whether parity or CRC algorithms, ECC or other " - "mechanisms are used. Details on the algorithm can also " - "be supplied." ), - MappingStrings { "MIF.DMTF|Physical Memory Array|001.7" }] - string ErrorMethodology; - - [Description ( - "The beginning address, referenced by an application or " - "operating system and mapped by a memory controller, for " - "this Memory object. The starting address is specified in " - "KBytes." ), - Units ( "KiloBytes" ), - MappingStrings { - "MIF.DMTF|Memory Array Mapped Addresses|001.3", - "MIF.DMTF|Memory Device Mapped Addresses|001.4" }, - PUnit ( "byte * 10^3" )] - uint64 StartingAddress; - - [Description ( - "The ending address, referenced by an application or " - "operating system and mapped by a memory controller, for " - "this Memory object. The ending address is specified in " - "KBytes." ), - Units ( "KiloBytes" ), - MappingStrings { - "MIF.DMTF|Memory Array Mapped Addresses|001.4", - "MIF.DMTF|Memory Device Mapped Addresses|001.5" }, - PUnit ( "byte * 10^3" )] - uint64 EndingAddress; - - [Deprecated { "CIM_MemoryError.ErrorInfo" }, - Description ( - "An integer enumeration describing the type of error that " - "occurred most recently. For example, single (value=6) or " - "double bit errors (7) can be specified using this " - "property. The values, 12-14, are undefined in the CIM " - "Schema since in DMI, they mix the semantics of the type " - "of error and whether it was correctable or not. The " - "latter is indicated in the property, CorrectableError." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "14" }, - Values { "Other", "Unknown", "OK", "Bad Read", - "Parity Error", "Single-Bit Error", "Double-Bit Error", - "Multi-Bit Error", "Nibble Error", "Checksum Error", - "CRC Error", "Undefined", "Undefined", "Undefined" }, - MappingStrings { "MIF.DMTF|Memory Device|005.12", - "MIF.DMTF|Physical Memory Array|001.8" }, - ModelCorrespondence { "CIM_Memory.OtherErrorDescription" }] - uint16 ErrorInfo; - - [Deprecated { "CIM_MemoryError.OtherErrorDescription" }, - Description ( - "Free form string providing more information if the Error " - "Type property is set to 1, \"Other\". If not set to 1, " - "this string has no meaning." ), - ModelCorrespondence { "CIM_Memory.ErrorInfo" }] - string OtherErrorDescription; - - [Deprecated { "CIM_MemoryError.CorrectableError" }, - Description ( - "Boolean indicating that the most recent error was " - "correctable. If the ErrorInfo property is equal to 3, " - "\"OK\", then this property has no meaning." ), - MappingStrings { "MIF.DMTF|Physical Memory Array|001.8" }] - boolean CorrectableError; - - [Deprecated { "CIM_MemoryError.ErrorTime" }, - Description ( - "The time that the last memory error occurred. The type " - "of error is described by the ErrorInfo property. If the " - "Error Info property is equal to 3, \"OK\", then this " - "property has no meaning." )] - datetime ErrorTime; - - [Deprecated { "CIM_MemoryError.ErrorAccess" }, - Description ( - "An integer enumeration indicating the memory access " - "operation that caused the last error. The type of error " - "is described by the ErrorInfo property. If the ErrorInfo " - "property is equal to 3, \"OK\", then this property has " - "no meaning." ), - ValueMap { "1", "2", "3", "4", "5" }, - Values { "Other", "Unknown", "Read", "Write", "Partial Write" }, - MappingStrings { "MIF.DMTF|Physical Memory Array|001.10" }] - uint16 ErrorAccess; - - [Deprecated { "CIM_MemoryError.ErrorTransferSize" }, - Description ( - "The size of the data transfer in bits that caused the " - "last error. 0 indicates no error. If the ErrorInfo " - "property is equal to 3, \"OK\", then this property " - "should be set to 0." ), - Units ( "Bits" ), - MappingStrings { "MIF.DMTF|Physical Memory Array|001.11" }, - PUnit ( "bit" )] - uint32 ErrorTransferSize; - - [Deprecated { "CIM_MemoryError.ErrorData" }, - Description ( - "Data captured during the last erroneous mebmory access. " - "The data occupies the first n octets of the array " - "necessary to hold the number of bits specified by the " - "ErrorTransferSize property. If ErrorTransferSize is 0, " - "then this property has no meaning." ), - OctetString, ArrayType ( "Indexed" ), - MappingStrings { "MIF.DMTF|Physical Memory Array|001.12" }] - uint8 ErrorData[]; - - [Deprecated { "CIM_MemoryError.ErrorDataOrder" }, - Description ( - "The ordering for data stored in the ErrorData property. " - "\"Least Significant Byte First\" (value=1) or \"Most " - "Significant Byte First\" (2) can be specified. If " - "ErrorTransferSize is 0, then this property has no " - "meaning." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "Least Significant Byte First", - "Most Significant Byte First" }] - uint16 ErrorDataOrder; - - [Deprecated { "CIM_MemoryError.StartingAddress" }, - Description ( - "Specifies the address of the last memory error. The type " - "of error is described by the ErrorInfo property. If the " - "ErrorInfo property is equal to 3, \"OK\", then this " - "property has no meaning." ), - MappingStrings { "MIF.DMTF|Memory Device|005.19", - "MIF.DMTF|Physical Memory Array|001.14" }] - uint64 ErrorAddress; - - [Deprecated { "CIM_MemoryError.SystemLevelAddress" }, - Description ( - "Boolean indicating whether the address information in " - "the property, ErrorAddress, is a system-level address " - "(TRUE) or a physical address (FALSE). If the ErrorInfo " - "property is equal to 3, \"OK\", then this property has " - "no meaning." )] - boolean SystemLevelAddress; - - [Deprecated { "CIM_MemoryError.ErrorResolution" }, - Description ( - "Specifies the range, in bytes, to which the last error " - "can be resolved. For example, if error addresses are " - "resolved to bit 11 (ie, on a typical page basis), then " - "errors can be resolved to 4K boundaries and this " - "property is set to 4000. If the ErrorInfo property is " - "equal to 3, \"OK\", then this property has no meaning." ), - Units ( "Bytes" ), - MappingStrings { "MIF.DMTF|Memory Device|005.21", - "MIF.DMTF|Physical Memory Array|001.15" }, - PUnit ( "byte" )] - uint64 ErrorResolution; - - [Deprecated { "CIM_MemoryError.AdditionalErrorData" }, - Description ( - "An array of octets holding additional error information. " - "An example is ECC Syndrome or the return of the check " - "bits if a CRC-based ErrorMethodology is used. In the " - "latter case, if a single bit error is recognized and the " - "CRC algorithm is known, it is possible to determine the " - "exact bit that failed. This type of data (ECC Syndrome, " - "Check Bit or Parity Bit data, or other vendor supplied " - "information) is included in this field. If the ErrorInfo " - "property is equal to 3, \"OK\", then AdditionalErrorData " - "has no meaning." ), - OctetString, MappingStrings { - "MIF.DMTF|Memory Device|005.18", - "MIF.DMTF|Physical Memory Array|001.13" }] - uint8 AdditionalErrorData[]; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_MemoryError.mof b/build/vendor/dmtf_mof/Device/CIM_MemoryError.mof deleted file mode 100644 index ce74c59e..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_MemoryError.mof +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_MemoryError -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::Memory" ), - Description ( - "MemoryError defines a memory space that has errors. The Key of " - "the class is the StartingAddress of the bytes in error." )] -class CIM_MemoryError : CIM_StorageError { - - [Override ( "StartingAddress" ), - Description ( - "Specifies the address of the memory error. The type of " - "error is described by the ErrorInfo property. If the " - "ErrorInfo property is equal to 3, \"OK\", then this " - "property has no meaning." ), - MappingStrings { "MIF.DMTF|Memory Device|005.19", - "MIF.DMTF|Physical Memory Array|001.14" }] - uint64 StartingAddress; - - [Description ( - "An integer enumeration describing the type of error that " - "occurred most recently. For example, single (value=6) or " - "double bit errors (7) can be specified using this " - "property. The values, 12-14, are undefined in the CIM " - "Schema since in DMI, they mix the semantics of the type " - "of error and whether it was correctable or not. The " - "latter is indicated in the property, CorrectableError." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10" }, - Values { "Unknown", "Other", "OK", "Bad Read", - "Parity Error", "Single-Bit Error", "Double-Bit Error", - "Multi-Bit Error", "Nibble Error", "Checksum Error", - "CRC Error" }, - MappingStrings { "MIF.DMTF|Memory Device|005.12", - "MIF.DMTF|Physical Memory Array|001.8" }, - ModelCorrespondence { "CIM_Memory.OtherErrorDescription" }] - uint16 ErrorInfo; - - [Description ( - "Free form string providing more information if the Error " - "Type property is set to 1, \"Other\". If not set to 1, " - "this string has no meaning." ), - ModelCorrespondence { "CIM_Memory.ErrorInfo" }] - string OtherErrorDescription; - - [Description ( - "Boolean indicating that the most recent error was " - "correctable. If the ErrorInfo property is equal to 3, " - "\"OK\", then this property has no meaning." ), - MappingStrings { "MIF.DMTF|Physical Memory Array|001.8" }] - boolean CorrectableError; - - [Description ( - "The time that the last memory error occurred. The type " - "of error is described by the ErrorInfo property. If the " - "Error Info property is equal to 3, \"OK\", then this " - "property has no meaning." )] - datetime ErrorTime; - - [Description ( - "An integer enumeration indicating the memory access " - "operation that caused the last error. The type of error " - "MUST be described by the ErrorInfo property. If the " - "ErrorInfo property is equal to 3, \"OK\", then this " - "property has no meaning." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "Read", "Write", "Partial Write" }, - MappingStrings { "MIF.DMTF|Physical Memory Array|001.10" }] - uint16 ErrorAccess; - - [Description ( - "The size of the data transfer in bits that caused the " - "last error. 0 indicates no error. If the ErrorInfo " - "property is equal to 3, \"OK\", then this property " - "should be set to 0." ), - Units ( "Bits" ), - MappingStrings { "MIF.DMTF|Physical Memory Array|001.11" }, - PUnit ( "bit" )] - uint32 ErrorTransferSize; - - [Description ( - "Data captured during the last erroneous mebmory access. " - "The data occupies the first n octets of the array " - "necessary to hold the number of bits specified by the " - "ErrorTransferSize property. If ErrorTransferSize is 0, " - "then this property has no meaning." ), - OctetString, ArrayType ( "Indexed" ), - MappingStrings { "MIF.DMTF|Physical Memory Array|001.12" }] - uint8 ErrorData[]; - - [Description ( - "The ordering for data stored in the ErrorData property. " - "\"Least Significant Byte First\" (value=1) or \"Most " - "Significant Byte First\" (2) can be specified. If " - "ErrorTransferSize is 0, then this property has no " - "meaning." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "Least Significant Byte First", - "Most Significant Byte First" }] - uint16 ErrorDataOrder; - - [Description ( - "Boolean indicating whether the address information in " - "the property, ErrorAddress, is a system-level address " - "(TRUE) or a physical address (FALSE). If the ErrorInfo " - "property is equal to 3, \"OK\", then this property has " - "no meaning." )] - boolean SystemLevelAddress; - - [Description ( - "Specifies the range, in bytes, to which the last error " - "can be resolved. For example, if error addresses are " - "resolved to bit 11 (ie, on a typical page basis), then " - "errors can be resolved to 4K boundaries and this " - "property is set to 4000. If the ErrorInfo property is " - "equal to 3, \"OK\", then this property has no meaning." ), - Units ( "Bytes" ), - MappingStrings { "MIF.DMTF|Memory Device|005.21", - "MIF.DMTF|Physical Memory Array|001.15" }, - PUnit ( "byte" )] - uint64 ErrorResolution; - - [Description ( - "An array of octets holding additional error information. " - "An example is ECC Syndrome or the return of the check " - "bits if a CRC-based ErrorMethodology is used. In the " - "latter case, if a single bit error is recognized and the " - "CRC algorithm is known, it is possible to determine the " - "exact bit that failed. This type of data (ECC Syndrome, " - "Check Bit or Parity Bit data, or other vendor supplied " - "information) is included in this field. If the ErrorInfo " - "property is equal to 3, \"OK\", then AdditionalErrorData " - "has no meaning." ), - OctetString, MappingStrings { - "MIF.DMTF|Memory Device|005.18", - "MIF.DMTF|Physical Memory Array|001.13" }] - uint8 AdditionalErrorData[]; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_Modem.mof b/build/vendor/dmtf_mof/Device/CIM_Modem.mof deleted file mode 100644 index 8aa6b735..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_Modem.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Modem -// ================================================================== - [Abstract, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::Modems" ), - Description ( - "CIM_Modem is the superclass for grouping the numerous types of " - "Modems." )] -class CIM_Modem : CIM_LogicalDevice { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ModulePort.mof b/build/vendor/dmtf_mof/Device/CIM_ModulePort.mof deleted file mode 100644 index 82664db4..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ModulePort.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ModulePort -// ================================================================== - [Association, Aggregation, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::Ports" ), - Description ( - "ModulePort associates ports with their hosting modules." )] -class CIM_ModulePort : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( "A module that has ports." )] - CIM_LogicalModule REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "A Port that is associated with a module." )] - CIM_NetworkPort REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_MonitorResolution.mof b/build/vendor/dmtf_mof/Device/CIM_MonitorResolution.mof deleted file mode 100644 index dc3e62a5..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_MonitorResolution.mof +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_MonitorResolution -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::UserDevices" ), - Description ( - "MonitorResolution describes the relationship between " - "horizontal and vertical resolutions, refresh rate and scan " - "mode for a DesktopMonitor. The actual resolutions, etc. that " - "are in use, are the values specified in the VideoController " - "object." )] -class CIM_MonitorResolution : CIM_Setting { - - [Key, Override ( "SettingID" ), - Description ( - "The inherited SettingID serves as part of the key for a " - "MonitorResolution instance." ), - MaxLen ( 256 )] - string SettingID; - - [Description ( "Monitor\'s horizontal resolution in Pixels." ), - Units ( "Pixels" ), - MappingStrings { "MIF.DMTF|Monitor Resolutions|002.2" }, - ModelCorrespondence { - "CIM_VideoController.CurrentHorizontalResolution" }, - PUnit ( "pixel" )] - uint32 HorizontalResolution; - - [Description ( "Monitor\'s vertical resolution in Pixels." ), - Units ( "Pixels" ), - MappingStrings { "MIF.DMTF|Monitor Resolutions|002.3" }, - ModelCorrespondence { - "CIM_VideoController.CurrentVerticalResolution" }, - PUnit ( "pixel" )] - uint32 VerticalResolution; - - [Description ( - "Monitor\'s refresh rate in Hertz. If a range of rates is " - "supported, use the MinRefreshRate and MaxRefreshRate " - "properties, and set RefreshRate (this property) to 0." ), - Units ( "Hertz" ), - MappingStrings { "MIF.DMTF|Monitor Resolutions|002.4" }, - ModelCorrespondence { "CIM_VideoController.CurrentRefreshRate" }, - PUnit ( "hertz" )] - uint32 RefreshRate; - - [Description ( - "Monitor\'s minimum refresh rate in Hertz, when a range " - "of rates is supported at the specified resolutions." ), - Units ( "Hertz" ), - MappingStrings { "MIF.DMTF|Monitor Resolutions|002.6" }, - ModelCorrespondence { "CIM_VideoController.MinRefreshRate" }, - PUnit ( "hertz" )] - uint32 MinRefreshRate; - - [Description ( - "Monitor\'s maximum refresh rate in Hertz, when a range " - "of rates is supported at the specified resolutions." ), - Units ( "Hertz" ), - MappingStrings { "MIF.DMTF|Monitor Resolutions|002.7" }, - ModelCorrespondence { "CIM_VideoController.MaxRefreshRate" }, - PUnit ( "hertz" )] - uint32 MaxRefreshRate; - - [Description ( - "Integer indicating whether the monitor operates in " - "interlaced (value=5) or non-interlaced (4) mode." ), - ValueMap { "1", "2", "3", "4", "5" }, - Values { "Other", "Unknown", "Not Supported", - "Non-Interlaced Operation", "Interlaced Operation" }, - MappingStrings { "MIF.DMTF|Monitor Resolutions|002.5" }, - ModelCorrespondence { "CIM_VideoController.CurrentScanMode" }] - uint16 ScanMode; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_MonitorSetting.mof b/build/vendor/dmtf_mof/Device/CIM_MonitorSetting.mof deleted file mode 100644 index 226578e2..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_MonitorSetting.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_MonitorSetting -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::UserDevices" ), - Description ( - "MonitorSetting associates the MonitorResolution Setting object " - "with the DesktopMonitor to which it applies." )] -class CIM_MonitorSetting : CIM_ElementSetting { - - [Override ( "Element" ), - Description ( "The DesktopMonitor." )] - CIM_DesktopMonitor REF Element; - - [Override ( "Setting" ), - Description ( - "The MonitorResolution associated with the DesktopMonitor." )] - CIM_MonitorResolution REF Setting; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_MultiStateSensor.mof b/build/vendor/dmtf_mof/Device/CIM_MultiStateSensor.mof deleted file mode 100644 index 6edced15..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_MultiStateSensor.mof +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_MultiStateSensor -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::Sensors" ), - Description ( - "A Multi-StateSensor is a multi-member set of Sensors." )] -class CIM_MultiStateSensor : CIM_Sensor { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_NetworkAdapter.mof b/build/vendor/dmtf_mof/Device/CIM_NetworkAdapter.mof deleted file mode 100644 index 825e1c26..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_NetworkAdapter.mof +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_NetworkAdapter -// ================================================================== - [Deprecated { "CIM_NetworkPort" }, - Abstract, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::NetworkAdapter" ), - Description ( - "Note: The use of the CIM_NetworkAdpater class has been " - "deprecated in lieu of CIM_NetworkPort. CIM_NetworkPort better " - "reflects that the hardware of a single port is described and " - "managed. \n" - "Deprecated description: NetworkAdapter is an Abstract class " - "that defines general networking hardware concepts (for " - "example, PermanentAddress or Speed of operation)." )] -class CIM_NetworkAdapter : CIM_LogicalDevice { - - [Deprecated { "CIM_NetworkPort.PermanentAddress" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: PermanentAddress defines the " - "network address that is hardcoded into an adapter. This " - "\'hardcoded\' address might be changed through a " - "firmware upgrade or software configuration. If so, this " - "field should be updated when the change is made. " - "PermanentAddress should be left blank if no \'hardcoded\' " - "address exists for the NetworkAdapter." ), - MaxLen ( 64 ), - MappingStrings { "MIF.DMTF|Network Adapter 802 Port|001.2" }] - string PermanentAddress; - - [Deprecated { "CIM_NetworkPort.NetworkAddresses" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: An array of strings that " - "indicates the network addresses for an adapter." ), - ArrayType ( "Indexed" ), - MaxLen ( 64 ), - MappingStrings { "MIF.DMTF|Network Adapter 802 Port|001.3" }] - string NetworkAddresses[]; - - [Deprecated { "CIM_NetworkPort.Speed" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: An estimate of the current " - "bandwidth in Bits per Second. For Adapters that vary in " - "bandwidth or for those where no accurate estimation can " - "be made, this property should contain the nominal " - "bandwidth." ), - Units ( "Bits per Second" ), - MappingStrings { "MIB.IETF|RFC1213-MIB.ifSpeed", - "MIF.DMTF|Network Adapter 802 Port|001.5" }, - PUnit ( "bit / second" )] - uint64 Speed; - - [Deprecated { "CIM_NetworkPort.MaxSpeed" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The maximum speed, in Bits per " - "Second, for the Network Adapter." ), - Units ( "Bits per Second" ), - PUnit ( "bit / second" )] - uint64 MaxSpeed; - - [Deprecated { "CIM_NetworkPort.FullDuplex" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: A Boolean that indicates that " - "the Adapter is operating in full duplex mode." )] - boolean FullDuplex; - - [Deprecated { "CIM_NetworkPort.AutoSense" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: A Boolean that indicates whether " - "the NetworkAdapter is capable of automatically " - "determining the speed or other communications " - "characteristics of the attached network media." )] - boolean AutoSense; - - [Deprecated { "CIM_NetworkPortStatistics.BytesTransmitted" }, - Description ( - "Note: The use of this method has been deprecated. The " - "replacement is " - "CIM_NetworkPortStatistics.BytesTransmitted." ), - Counter, MappingStrings { "MIB.IETF|RFC1213-MIB.ifOutOctets", - "MIF.DMTF|Network Adapter 802 Port|001.7" }] - uint64 OctetsTransmitted; - - [Deprecated { "CIM_NetworkPortStatistics.BytesReceived" }, - Description ( - "Note: The use of OctetsReceived is deprecated. The " - "replacement is CIM_NetworkPortStatistics.BytesReceived." ), - Counter, MappingStrings { "MIB.IETF|RFC1213-MIB.ifInOctets", - "MIF.DMTF|Network Adapter 802 Port|001.9" }] - uint64 OctetsReceived; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_NetworkAdapterRedundancyComponent.mof b/build/vendor/dmtf_mof/Device/CIM_NetworkAdapterRedundancyComponent.mof deleted file mode 100644 index 6bd0e6b8..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_NetworkAdapterRedundancyComponent.mof +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_NetworkAdapterRedundancyComponent -// ================================================================== - [Association, Deprecated { "CIM_OrderedMemberOfCollection" }, - Aggregation, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::NetworkAdapter" ), - Description ( - "Note: The use of the CIM_NetworkAdapterRedundancyComponent " - "class has been deprecated because a specific association is " - "not needed. Instead use the CIM_ OrderedMemberOf Collection " - "class. \n" - "Deprecated description: CIM_NetworkAdapterRedundancyComponent " - "indicates the role that a NetworkAdapter plays in an " - "ExtraCapacityGroup, providing load balancing." )] -class CIM_NetworkAdapterRedundancyComponent : CIM_RedundancyComponent { - - [Deprecated { "CIM_OrderedMemberOfCollection.Collection" }, - Aggregate, Override ( "GroupComponent" ), - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The RedundancyGroup that " - "represents a set of load-balanced NetworkAdapters." )] - CIM_ExtraCapacityGroup REF GroupComponent; - - [Deprecated { "CIM_OrderedMemberOfCollection.Member" }, - Override ( "PartComponent" ), - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The Network Adapters that belong " - "to the RedundancyGroup." )] - CIM_NetworkAdapter REF PartComponent; - - [Deprecated { "No value" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Indicates the scope of load " - "balancing for the NetworkAdapters that is involved in " - "the RedundancyGroup. Load balancing can be restricted to " - "transmitting data only (value=1), receiving data only " - "(value=2), or used for both transmit and receive " - "(value=3)." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Load Balancing - Transmit Only", - "Load Balancing - Receive Only", "Full Load Balancing" }] - uint16 ScopeOfBalancing; - - [Deprecated { "CIM_OrderedMemberOfCollection.AssignedSequence" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: A Boolean that indicates whether " - "the Network Adapter is an original primary adapter " - "(value=1), a preferred primary adapter (value=2), or " - "both (value=3). Values of \"Unknown\" and \"Not " - "Applicable\" can also be specified." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Original Primary", "Preferred Primary", - "Both", "Not Applicable" }] - uint16 PrimaryAdapter; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_NetworkPort.mof b/build/vendor/dmtf_mof/Device/CIM_NetworkPort.mof deleted file mode 100644 index ccc1946d..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_NetworkPort.mof +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_NetworkPort -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Ports" ), - Description ( - "NetworkPort is the logical representation of network " - "communications hardware such as a physical connector and the " - "setup or operation of the network chips, at the lowest layers " - "of a network stack." )] -class CIM_NetworkPort : CIM_LogicalPort { - - [Override ( "Speed" ), - Description ( - "The current bandwidth of the Port in Bits per Second. " - "For ports that vary in bandwidth or for those where no " - "accurate estimation can be made, this property should " - "contain the nominal bandwidth." ), - Units ( "Bits per Second" ), - MappingStrings { "MIB.IETF|MIB-II.ifSpeed", - "MIF.DMTF|Network Adapter 802 Port|001.5" }, - PUnit ( "bit / second" )] - uint64 Speed; - - [Deprecated { "CIM_NetworkPort.OtherPortType" }, - Description ( - "Note: The use of this property is deprecated in lieu of " - "CIM_LogicalPort.PortType. \n" - "Deprecated description: The type of module, when " - "PortType is set to 1 (\"Other\".)" ), - ModelCorrespondence { "CIM_LogicalPort.PortType" }] - string OtherNetworkPortType; - - [Description ( - "NetworkPorts are often numbered relative to either a " - "logical module or a network element." )] - uint16 PortNumber; - - [Description ( - "An enumeration of the types of links. When set to 1 " - "(\"Other\"), the related property OtherLinkTechnology " - "contains a string description of the type of link." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11" }, - Values { "Unknown", "Other", "Ethernet", "IB", "FC", "FDDI", - "ATM", "Token Ring", "Frame Relay", "Infrared", - "BlueTooth", "Wireless LAN" }, - ModelCorrespondence { "CIM_NetworkPort.OtherLinkTechnology" }] - uint16 LinkTechnology; - - [Description ( - "A string value that describes LinkTechnology when it is " - "set to 1, \"Other\"." ), - ModelCorrespondence { "CIM_NetworkPort.LinkTechnology" }] - string OtherLinkTechnology; - - [Description ( - "PermanentAddress defines the network address that is " - "hardcoded into a port. This \'hardcoded\' address can be " - "changed using a firmware upgrade or a software " - "configuration. When this change is made, the field " - "should be updated at the same time. PermanentAddress " - "should be left blank if no \'hardcoded\' address exists " - "for the NetworkAdapter." ), - MaxLen ( 64 ), - MappingStrings { "MIF.DMTF|Network Adapter 802 Port|001.2" }] - string PermanentAddress; - - [Description ( - "An array of strings that indicates the network addresses " - "for the port." ), - MaxLen ( 64 ), - MappingStrings { "MIF.DMTF|Network Adapter 802 Port|001.3" }] - string NetworkAddresses[]; - - [Description ( - "Boolean that indicates that the port is operating in " - "full duplex mode." )] - boolean FullDuplex; - - [Description ( - "A Boolean that indicates whether the NetworkPort is " - "capable of automatically determining the speed or other " - "communications characteristics of the attached network " - "media." )] - boolean AutoSense; - - [Description ( - "The maximum transmission unit (MTU) that can be supported." - ), - Units ( "Bytes" ), - PUnit ( "byte" )] - uint64 SupportedMaximumTransmissionUnit; - - [Description ( - "The active or negotiated maximum transmission unit (MTU) " - "that can be supported." ), - Units ( "Bytes" ), - PUnit ( "byte" )] - uint64 ActiveMaximumTransmissionUnit; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_NetworkPortCapabilities.mof b/build/vendor/dmtf_mof/Device/CIM_NetworkPortCapabilities.mof deleted file mode 100644 index 8b210bec..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_NetworkPortCapabilities.mof +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Device::Ports" ), - Description ( - "NetworkPortCapabilities describes the capabilities supported " - "for properties that are configurable in NetworkPort." )] -class CIM_NetworkPortCapabilities : CIM_LogicalPortCapabilities { - - [Description ( - "Boolean that indicates whether the Speed can be configured." - ), - ModelCorrespondence { - "CIM_NetworkPortCapabilities.PortSpeedsSupported" }] - boolean SpeedConfigurable = false; - - [Description ( - "List of supported port speeds that can be configured on " - "NetworkPort.Speed." ), - ModelCorrespondence { "CIM_NetworkPort.Speed" }] - uint64 PortSpeedsSupported[]; - - [Description ( - "Boolean indicating whether the NetworkPort can be " - "configured to connect to specific Networks." ), - ModelCorrespondence { "CIM_NetworkPortSettings.NetworkIDs" }] - boolean NetworkIDsConfigurable; - - [Description ( - "The format that is expected to populate the NetworkIds " - "for the associated NetworkPortSettings.list of supported " - "LinkTechnologies of the NetworkPort is defined in the " - "NetworkPortCapabilities." ), - ValueMap { "2", "..", "32768..65535" }, - Values { "Virtual Fabric ID", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { "CIM_NetworkPortSettings.NetworkIDs" }] - uint16 NetworkIDsFormat; - - [Description ( - "List of the LinkTechnologies supported by the the NetworkPort." - ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", ".." }, - Values { "Ethernet", "IB", "FC", "FDDI", "ATM", "Token Ring", - "Frame Relay", "Infrared", "BlueTooth", "Wireless LAN", - "DMTF Reserved" }, - ModelCorrespondence { "CIM_NetworkPortSettings.NetworkIDs", - "CIM_NetworkPort.LinkTechnology" }] - uint16 LinkTechnologiesSupported[]; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_NetworkPortStatistics.mof b/build/vendor/dmtf_mof/Device/CIM_NetworkPortStatistics.mof deleted file mode 100644 index 2b1734fd..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_NetworkPortStatistics.mof +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_NetworkPortStatistics -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Ports" ), - Description ( - "The NetworkPortStatistics class describes the statistics for " - "the NetworkPort." )] -class CIM_NetworkPortStatistics : CIM_StatisticalData { - - [Description ( - "The total number of bytes that are transmitted, " - "including framing characters." ), - Units ( "Bytes" ), - Counter, MappingStrings { "MIB.IETF|MIB-II.ifOutOctets", - "MIF.DMTF|Network Adapter 802 Port|001.7" }, - PUnit ( "byte" )] - uint64 BytesTransmitted; - - [Description ( - "The total number of bytes that are received, including " - "framing characters." ), - Units ( "Bytes" ), - Counter, MappingStrings { "MIB.IETF|MIB-II.ifInOctets", - "MIF.DMTF|Network Adapter 802 Port|001.9" }, - PUnit ( "byte" )] - uint64 BytesReceived; - - [Description ( - "The total number of packets that are transmitted." ), - Counter] - uint64 PacketsTransmitted; - - [Description ( - "The total number of packets that are received." ), - Counter] - uint64 PacketsReceived; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_NetworkVirtualAdapter.mof b/build/vendor/dmtf_mof/Device/CIM_NetworkVirtualAdapter.mof deleted file mode 100644 index 73e0bcdd..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_NetworkVirtualAdapter.mof +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_NetworkVirtualAdapter -// ================================================================== - [Association, Deprecated { "CIM_ConcreteIdentity" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::NetworkAdapter" ), - Description ( - "Note: The use of the CIM_NetworkVirtualAdapter class has been " - "deprecated. A specific association is not needed. Instead use " - "the CIM_ConcreteIdentity class. \n" - "Deprecated description: NetworkVirtual Adapter describes that " - "an instance of NetworkAdapter is actually the result of " - "several Adapters participating in a load-balanced " - "RedundancyGroup." )] -class CIM_NetworkVirtualAdapter : CIM_LogicalIdentity { - - [Deprecated { "CIM_ConcreteIdentity.SystemElement" }, - Override ( "SystemElement" ), - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The \'virtual\' NetworkAdapter." )] - CIM_NetworkAdapter REF SystemElement; - - [Deprecated { "CIM_ConcreteIdentity.SameElement" }, - Override ( "SameElement" ), - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The ExtraCapacity " - "RedundancyGroup that describes the load balancing. The " - "result of the load balancing is the \'virtual\' Adapter." )] - CIM_ExtraCapacityGroup REF SameElement; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_NonVolatileStorage.mof b/build/vendor/dmtf_mof/Device/CIM_NonVolatileStorage.mof deleted file mode 100644 index 365c2a1f..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_NonVolatileStorage.mof +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_NonVolatileStorage -// ================================================================== - [Deprecated { "CIM_Memory" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::Memory" ), - Description ( - "This class has been deprecated in favor of CIM_Memory with the " - "volatile parameter set to false. Capabilities and management " - "of NV Storage. Non-volatile memory natively includes flash and " - "ROM storage. In addition, NV memory can be BasedOn " - "VolatileStorage, if the volatile memory is backed by a " - "Battery. This scenario would be completely described by an " - "instance of the AssociatedBattery relationship, referencing " - "the NonVolatileStorage as the Dependent and the Battery as the " - "Antecedent, and an instance of the BasedOn relationship, " - "referencing the NonVolatileStorage as the Dependent and the " - "VolatileStorage as the Antecedent." )] -class CIM_NonVolatileStorage : CIM_Memory { - - [Deprecated { "CIM_Memory.Access" }, - Description ( "Indicating that the NV storage is writeable." )] - boolean IsWriteable; - - [Deprecated { "no value" }, - Description ( - "Boolean indicating that at least some portion of the " - "NonVolatileStorage is writeable by applications." )] - boolean ApplicationWriteable; - - [Deprecated { "no value" }, - Description ( - "When at least some portion of the NonVolatileStorage is " - "writeable (ApplicationWriteable property = TRUE), " - "StartAddress forApplcationWrite indicates the starting " - "address for application data. If the " - "ApplicationWriteable property is FALSE, this property is " - "undefined." ), - ModelCorrespondence { - "CIM_NonVolatileStorage.ApplicationWriteable" }] - uint64 StartAddressForApplicationWrite; - - [Deprecated { "no value" }, - Description ( - "When at least some portion of the NonVolatileStorage is " - "writeable (ApplicationWriteable property = TRUE), " - "Application WritableSize indicates the number of bits " - "available for application data. If the " - "ApplicationWriteable property is FALSE, this property is " - "undefined." ), - Units ( "Bits" ), - ModelCorrespondence { - "CIM_NonVolatileStorage.ApplicationWriteable" }, - PUnit ( "bit" )] - uint64 ApplicationWriteableSize; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_NumericSensor.mof b/build/vendor/dmtf_mof/Device/CIM_NumericSensor.mof deleted file mode 100644 index 528ea8bf..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_NumericSensor.mof +++ /dev/null @@ -1,366 +0,0 @@ -// Copyright (c) 2007 DMTF. All rights reserved. -// Add write qualifier -// to LowerThresholdNonCritical, UpperThresholdNonCritical, -// LowerThresholdCritical, UpperThresholdCritical, LowerThresholdFatal, -// UpperThresholdFatal.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// Added Pascals to BaseUnit -// ================================================================== -// CIM_NumericSensor -// ================================================================== - [Version ( "2.16.0" ), - UMLPackagePath ( "CIM::Device::Sensors" ), - Description ( - "A Numeric Sensor is capable of returning numeric readings and " - "optionally supports thresholds settings." )] -class CIM_NumericSensor : CIM_Sensor { - - [Description ( - "The base unit of the values returned by this Sensor. All " - "the values returned by this Sensor are represented in " - "the units obtained by (BaseUnits * 10 raised to the " - "power of the UnitModifier). For example, if BaseUnits is " - "Volts and the UnitModifier is -6, then the units of the " - "values returned are MicroVolts. However, if the " - "RateUnits property is set to a value other than \"None\", " - "then the units are further qualified as rate units. In " - "the above example, if RateUnits is set to \"Per Second\", " - "then the values returned by the Sensor are in " - "MicroVolts/Second. The units apply to all numeric " - "properties of the Sensor, unless explicitly overridden " - "by the Units qualifier." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26", "27", - "28", "29", "30", "31", "32", "33", "34", "35", "36", - "37", "38", "39", "40", "41", "42", "43", "44", "45", - "46", "47", "48", "49", "50", "51", "52", "53", "54", - "55", "56", "57", "58", "59", "60", "61", "62", "63", - "64", "65", "66" }, - Values { "Unknown", "Other", "Degrees C", "Degrees F", - "Degrees K", "Volts", "Amps", "Watts", "Joules", - "Coulombs", //10 - "VA", "Nits", "Lumens", "Lux", - "Candelas", "kPa", "PSI", "Newtons", "CFM", "RPM", - //20 - "Hertz", "Seconds", "Minutes", "Hours", - "Days", "Weeks", "Mils", "Inches", "Feet", "Cubic Inches", - //30 - "Cubic Feet", "Meters", - "Cubic Centimeters", "Cubic Meters", "Liters", - "Fluid Ounces", "Radians", "Steradians", "Revolutions", - "Cycles", //40 - "Gravities", "Ounces", "Pounds", - "Foot-Pounds", "Ounce-Inches", "Gauss", "Gilberts", - "Henries", "Farads", "Ohms", //50 - "Siemens", - "Moles", "Becquerels", "PPM (parts/million)", "Decibels", - "DbA", "DbC", "Grays", "Sieverts", - "Color Temperature Degrees K", //60 - "Bits", - "Bytes", "Words (data)", "DoubleWords", "QuadWords", - "Percentage", "Pascals" }, - ModelCorrespondence { "CIM_NumericSensor.UnitModifier", - "CIM_NumericSensor.RateUnits" }] - uint16 BaseUnits; - - [Description ( - "The unit multiplier for the values returned by this " - "Sensor. All the values returned by this Sensor are " - "represented in the units obtained by (BaseUnits * 10 " - "raised to the power of the UnitModifier). For example, " - "if BaseUnits is Volts and the Unit Modifier is -6, then " - "the units of the values returned are MicroVolts. " - "However, if the RateUnits property is set to a value " - "other than \"None\", then the units are further " - "qualified as rate units. In the above example, if " - "RateUnits is set to \"Per Second\", then the values " - "returned by the Sensor are in MicroVolts/Second. The " - "units apply to all numeric properties of the Sensor, " - "unless explicitly overridden by the Units qualifier." ), - ModelCorrespondence { "CIM_NumericSensor.BaseUnits", - "CIM_NumericSensor.RateUnits" }] - sint32 UnitModifier; - - [Description ( - "Specifies if the units returned by this Sensor are rate " - "units. All the values returned by this Sensor are " - "represented in the units obtained by (BaseUnits * 10 " - "raised to the power of the UnitModifier). This is true " - "unless this property (RateUnits) has a value different " - "than \"None\". For example, if BaseUnits is Volts and " - "the UnitModifier is -6, then the units of the values " - "returned are MicroVolts. But, if the RateUnits property " - "is set to a value other than \"None\", then the units " - "are further qualified as rate units. In the above " - "example, if RateUnits is set to \"Per Second\", then the " - "values returned by the Sensor are in MicroVolts/Second. " - "The units apply to all numeric properties of the Sensor, " - "unless explicitly overridden by the Units qualifier. Any " - "implementation of CurrentReading should be qualified " - "with either a Counter or a Gauge qualifier, depending on " - "the characteristics of the sensor being modeled." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" }, - Values { "None", "Per MicroSecond", "Per MilliSecond", - "Per Second", "Per Minute", "Per Hour", "Per Day", - "Per Week", "Per Month", "Per Year" }, - ModelCorrespondence { "CIM_NumericSensor.UnitModifier", - "CIM_NumericSensor.BaseUnits" }] - uint16 RateUnits; - - [Description ( "The current value indicated by the Sensor." ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.5", - "MIF.DMTF|Electrical Current Probe|001.5", - "MIF.DMTF|Voltage Probe|001.5" }] - sint32 CurrentReading; - - [Description ( - "NominalReading indicates the \'normal\' or expected " - "value for the NumericSensor." ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.6", - "MIF.DMTF|Electrical Current Probe|001.6", - "MIF.DMTF|Voltage Probe|001.6" }] - sint32 NominalReading; - - [Description ( - "NormalMax provides guidance for the user as to the " - "normal maximum range for the NumericSensor." ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.7", - "MIF.DMTF|Electrical Current Probe|001.7", - "MIF.DMTF|Voltage Probe|001.7" }] - sint32 NormalMax; - - [Description ( - "NormalMin provides guidance for the user as to the " - "normal minimum range for the NumericSensor." ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.8", - "MIF.DMTF|Electrical Current Probe|001.8", - "MIF.DMTF|Voltage Probe|001.8" }] - sint32 NormalMin; - - [Description ( - "MaxReadable indicates the largest value of the measured " - "property that can be read by the NumericSensor." ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.9", - "MIF.DMTF|Electrical Current Probe|001.9", - "MIF.DMTF|Voltage Probe|001.9" }] - sint32 MaxReadable; - - [Description ( - "MinReadable indicates the smallest value of the measured " - "property that can be read by the NumericSensor." ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.10", - "MIF.DMTF|Electrical Current Probe|001.10", - "MIF.DMTF|Voltage Probe|001.10" }] - sint32 MinReadable; - - [Description ( - "Resolution indicates the ability of the Sensor to " - "resolve differences in the measured property. The units " - "for this measurement are determined by " - "BaseUnit*UnitModifier/RateUnit." ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.17", - "MIF.DMTF|Electrical Current Probe|001.17", - "MIF.DMTF|Voltage Probe|001.17" }] - uint32 Resolution; - - [Deprecated { "CIM_NumericSensor.Resolution", - "CIM_NumericSensor.Accuracy" }, - Description ( - "This property is being deprecated in lieu of using the " - "Resolution and Accuracy properties. \n" - "Indicates the tolerance of the Sensor for the measured " - "property. Tolerance, along with Resolution and Accuracy, " - "is used to calculate the actual value of the measured " - "physical property. Tolerance may vary depending on " - "whether the Device is linear over its dynamic range." )] - sint32 Tolerance; - - [Description ( - "Indicates the accuracy of the Sensor for the measured " - "property. Its value is recorded as plus/minus hundredths " - "of a percent. Accuracy, along with Resolution, is used " - "to calculate the actual value of the measured physical " - "property. Accuracy may vary depending on whether the " - "Device is linear over its dynamic range." ), - Units ( "Hundredths of Percent" ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.19", - "MIF.DMTF|Electrical Current Probe|001.19", - "MIF.DMTF|Voltage Probe|001.19" }, - PUnit ( "percent * 10^-2" )] - sint32 Accuracy; - - [Description ( - "Indicates that the Sensor is linear over its dynamic range." - )] - boolean IsLinear; - - [Description ( - "Indicates the margin built around the thresholds. This " - "margin prevents unnecessary state changes when the " - "Sensor reading may fluctuate very close to its " - "thresholds. This could be due to the Sensor\'s " - "tolerance/accuracy/resolution or due to environmental " - "factors. Once a threshold is crossed, the state of the " - "Sensor should change. However, the state should not " - "fluctuate between the old and new states unless the " - "Sensor\'s change in the reading exceeds the hysteresis " - "value. The units for this measurement are determined by " - "BaseUnit*UnitModifier/RateUnit." )] - uint32 Hysteresis; - - [Write, Description ( - "The Sensor\'s threshold values specify the ranges (min " - "and max values) for determining whether the Sensor is " - "operating under Normal, NonCritical, Critical or Fatal " - "conditions. If Current Reading is between " - "LowerThresholdNonCritical and Upper " - "ThresholdNonCritical, then the Sensor is reporting a " - "normal value. If CurrentReading is between " - "LowerThresholdNonCritical and LowerThresholdCritical, " - "then the CurrentState is NonCritical." ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.11", - "MIF.DMTF|Electrical Current Probe|001.11", - "MIF.DMTF|Voltage Probe|001.11" }] - sint32 LowerThresholdNonCritical; - - [Write, Description ( - "The Sensor\'s threshold values specify the ranges (min " - "and max values) for determining whether the Sensor is " - "operating under Normal, NonCritical, Critical or Fatal " - "conditions. If the CurrentReading is between " - "LowerThresholdNonCritical and UpperThresholdNonCritical, " - "then the Sensor is reporting a normal value. If the " - "CurrentReading is between UpperThreshold NonCritical and " - "UpperThresholdCritical, then the CurrentState is " - "NonCritical." ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.12", - "MIF.DMTF|Electrical Current Probe|001.12", - "MIF.DMTF|Voltage Probe|001.12" }] - sint32 UpperThresholdNonCritical; - - [Write, Description ( - "The Sensor\'s threshold values specify the ranges (min " - "and max values) for determining whether the Sensor is " - "operating under Normal, NonCritical, Critical or Fatal " - "conditions. If the CurrentReading is between " - "LowerThresholdCritical and Lower ThresholdFatal, then " - "the CurrentState is Critical." ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.13", - "MIF.DMTF|Electrical Current Probe|001.13", - "MIF.DMTF|Voltage Probe|001.13" }] - sint32 LowerThresholdCritical; - - [Write, Description ( - "The Sensor\'s threshold values specify the ranges (min " - "and max values) for determining whether the Sensor is " - "operating under Normal, NonCritical, Critical or Fatal " - "conditions. If the CurrentReading is between " - "UpperThresholdCritical and Upper ThresholdFatal, then " - "the CurrentState is Critical." ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.14", - "MIF.DMTF|Electrical Current Probe|001.14", - "MIF.DMTF|Voltage Probe|001.14" }] - sint32 UpperThresholdCritical; - - [Write, Description ( - "The Sensor\'s threshold values specify the ranges (min " - "and max values) for determining whether the Sensor is " - "operating under Normal, NonCritical, Critical or Fatal " - "conditions. If the CurrentReading is below " - "LowerThresholdFatal, then the Current State is Fatal." ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.15", - "MIF.DMTF|Electrical Current Probe|001.15", - "MIF.DMTF|Voltage Probe|001.15" }] - sint32 LowerThresholdFatal; - - [Write, Description ( - "The Sensor\'s threshold values specify the ranges (min " - "and max values) for determining whether the Sensor is " - "operating under Normal, NonCritical, Critical or Fatal " - "conditions. If the CurrentReading is above " - "UpperThresholdFatal, then the Current State is Fatal." ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.16", - "MIF.DMTF|Electrical Current Probe|001.16", - "MIF.DMTF|Voltage Probe|001.16" }] - sint32 UpperThresholdFatal; - - [Description ( - "An array representing the thresholds supported by this Sensor." - ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "LowerThresholdNonCritical", - "UpperThresholdNonCritical", "LowerThresholdCritical", - "UpperThresholdCritical", "LowerThresholdFatal", - "UpperThresholdFatal" }] - uint16 SupportedThresholds[]; - - [Description ( - "An array representing the thresholds that are currently " - "enabled for this Sensor." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "LowerThresholdNonCritical", - "UpperThresholdNonCritical", "LowerThresholdCritical", - "UpperThresholdCritical", "LowerThresholdFatal", - "UpperThresholdFatal" }] - uint16 EnabledThresholds[]; - - [Description ( - "An array representing the writable thresholds supported by Sensor." - ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "LowerThresholdNonCritical", - "UpperThresholdNonCritical", "LowerThresholdCritical", - "UpperThresholdCritical", "LowerThresholdFatal", - "UpperThresholdFatal" }] - uint16 SettableThresholds[]; - - - [Description ( - "This method resets the values of the thresholds to " - "hardware defaults. This method returns 0 if successful, " - "1 if unsupported and any other value if an error " - "occurred. In a subclass, the set of possible return " - "codes could be specified, using a ValueMap qualifier on " - "the method. The strings to which the ValueMap contents " - "are \'translated\' may also be specified in the subclass " - "as a Values array qualifier." )] - uint32 RestoreDefaultThresholds( -); - - [Deprecated { "No Value" }, - Description ( - "The use of this method is being deprecated, since " - "Current senor reading can be retrieved through the " - "GetInstance operation. \n" - "For a non-linear Sensor, the resolution, accuracy, " - "tolerance and hysteresis vary as the current reading " - "moves. This method can be used to get these factors for " - "a given reading. It returns 0 if successful, 1 if " - "unsupported, and any other value if an error occurred. " - "In a subclass, the set of possible return codes could be " - "specified, using a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \'translated\' " - "may also be specified in the subclass as a Values array " - "qualifier." )] - uint32 GetNonLinearFactors( - [IN, Description ( - "The sensor reading to get information for." )] - sint32 SensorReading, - [IN ( false ), OUT, Description ( - "The accuracy of the reading." )] - sint32 Accuracy, - [IN ( false ), OUT, Description ( - "The resolution of the reading." )] - uint32 Resolution, - [IN ( false ), OUT, Description ( - "The tolerance of the reading." )] - sint32 Tolerance, - [IN ( false ), OUT, Description ( - "The Hysteresis of the reading." )] - uint32 Hysteresis); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_OOBAlertServiceOnModem.mof b/build/vendor/dmtf_mof/Device/CIM_OOBAlertServiceOnModem.mof deleted file mode 100644 index 5530f533..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_OOBAlertServiceOnModem.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_OOBAlertServiceOnModem -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Modems" ), - Description ( - "OOBAlertServiceOnModem defines where the out-of-band alerting " - "Service is implemented. The Service can either employ a Modem " - "or NetworkAdapter to send alerts." )] -class CIM_OOBAlertServiceOnModem : CIM_DeviceServiceImplementation { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "The Modem that implements the alerting Service." )] - CIM_Modem REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The alerting Service that is provided on the Modem." )] - CIM_OOBAlertService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_OOBAlertServiceOnNetworkAdapter.mof b/build/vendor/dmtf_mof/Device/CIM_OOBAlertServiceOnNetworkAdapter.mof deleted file mode 100644 index 84b88143..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_OOBAlertServiceOnNetworkAdapter.mof +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_OOBAlertServiceOnNetworkAdapter -// ================================================================== - [Association, Deprecated { "CIM_OOBAlertServiceOnNetworkPort" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::NetworkAdapter" ), - Description ( - "Note: The use of CIM_OOBAlertServiceOnNetworkAdapter has been " - "deprecated because NetworkAdapter has been deprecated. Instead " - "use the CIM_OOBAlertServiceOnNetworkPort class. \n" - "Deprecated description: OOBAlertServiceOnNetworkAdapter " - "defines where the out-of-band alerting Service is implemented." )] -class CIM_OOBAlertServiceOnNetworkAdapter : CIM_DeviceServiceImplementation { - - [Deprecated { "CIM_OOBAlertServiceOnNetworkPort.Antecedent" }, - Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The NetworkAdapter that " - "implements the Service." )] - CIM_NetworkAdapter REF Antecedent; - - [Deprecated { "CIM_OOBAlertServiceOnNetworkPort.Dependent" }, - Override ( "Dependent" ), - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The alerting Service that is " - "provided on the NetworkAdapter." )] - CIM_OOBAlertService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_OOBAlertServiceOnNetworkPort.mof b/build/vendor/dmtf_mof/Device/CIM_OOBAlertServiceOnNetworkPort.mof deleted file mode 100644 index 5ad67214..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_OOBAlertServiceOnNetworkPort.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_OOBAlertServiceOnNetworkPort -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Ports" ), - Description ( - "OOBAlertServiceOnNetworkPort defines where the out-of-band " - "alerting Service is implemented. Currently, the Service can " - "either employ a Modem or a NetworkPort to send alerts." )] -class CIM_OOBAlertServiceOnNetworkPort : CIM_DeviceServiceImplementation { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The NetworkPort that implements the Service." )] - CIM_NetworkPort REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The alerting Service that is provided on the NetworkPort." )] - CIM_OOBAlertService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_OwningPrintQueue.mof b/build/vendor/dmtf_mof/Device/CIM_OwningPrintQueue.mof deleted file mode 100644 index de8ab07e..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_OwningPrintQueue.mof +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// . For type \"Host\", the device is a " - "Host-to-PCI bridge. For type \"PCIe-to-PCI\", the device " - "is a PCI Express-to-PCI bridge." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "128", ".." }, - Values { "Host", "ISA", "EISA", "Micro Channel", "PCI", - "PCMCIA", "NuBus", "CardBus", "RACEway", "AGP", "PCIe", - "PCIe-to-PCI", // 128 - "Other", "DMTF Reserved" }] - uint16 BridgeType; - - [Description ( - "The timeslice for the secondary interface when the " - "bridge is acting as an initiator. A 0 value indicates no " - "requirement." ), - Units ( "PCI clock cycles" ), - PUnit ( "cycle" )] - uint8 SecondaryLatencyTimer; - - [Description ( - "The number of the highest numbered bus that exists " - "behind the bridge." )] - uint8 SubordinateBusNumber; - - [Description ( - "The number of the PCI bus segment to which the secondary " - "interface of the bridge is connected." )] - uint8 SecondayBusNumber; - - [Description ( - "The number of the PCI bus segment to which the primary " - "interface of the bridge is connected." )] - uint8 PrimaryBusNumber; - - [Description ( - "The contents of the SecondaryStatusRegister of the " - "Bridge. For more information on the contents of this " - "register, refer to the PCI-to-PCI Bridge Architecture " - "Specification." )] - uint16 SecondaryStatusRegister; - - [Description ( - "The slowest device-select timing for a target device on " - "the secondary bus." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "Fast", "Medium", "Slow", - "DMTF Reserved" }] - uint16 SecondaryBusDeviceSelectTiming; - - [Description ( - "End address of the I/O addresses supported by the bus. " - "The upper 4 bits of this property specify the address " - "bits, AD[15::12], of the I/O address. Each of the " - "remaining 12 bits of the I/O address are assumed to be " - "1." )] - uint8 IOLimit; - - [Description ( - "Base address of I/O addresses supported by the bus. The " - "upper 4 bits of this property specify the address bits, " - "AD[15::12], of the I/O address. Each of the remaining 12 " - "bits of the I/O address are assumed to be 0." )] - uint8 IOBase; - - [Description ( - "End address of the memory supported by the bus. The " - "upper 12 bits of this property specify the address bits, " - "AD[31::20], of a 32-bit memory address. Each of the " - "remaining 20 bits of the address are assumed to be 1." )] - uint16 MemoryLimit; - - [Description ( - "Base address of the memory supported by the bus. The " - "upper 12 bits of this property specify the address bits, " - "AD[31::20], of a 32-bit memory address. Each of the " - "remaining 20 bits of the address are assumed to be 0." )] - uint16 MemoryBase; - - [Description ( - "End address of the memory that can be prefetched by the " - "bus. The upper 12 bits of this property specify the " - "address bits, AD[31::20], of a 32-bit memory address. " - "Each of the remaining 20 bits of the address are assumed " - "to be 1." )] - uint16 PrefetchMemoryLimit; - - [Description ( - "Base address of the memory that can be prefetched by the " - "bus. The upper 12 bits of this property specify the " - "address bits, AD[31::20], of a 32-bit memory address. " - "Each of the remaining 20 bits of the address are assumed " - "to be 0." )] - uint16 PrefetchMemoryBase; - - [Description ( - "Upper 32 bits of the supported prefetch end address when " - "64-bit addressing is used. The lower 32 bits are each " - "assumed to be 1." )] - uint32 PrefetchLimitUpper32; - - [Description ( - "Upper 32 bits of the supported prefetch base address " - "when 64-bit addressing is used. The lower 32 bits are " - "assumed to be 0." )] - uint32 PrefetchBaseUpper32; - - [Description ( - "Upper 16 bits of the supported I/O end address when " - "32-bit I/O addressing is used. The lower 16 bits are " - "each assumed to be 1." )] - uint16 IOLimitUpper16; - - [Description ( - "Upper 16 bits of the supported I/O base address when " - "32-bit I/O addressing is used. The lower 16 bits are " - "assumed to be 0." )] - uint16 IOBaseUpper16; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PCIController.mof b/build/vendor/dmtf_mof/Device/CIM_PCIController.mof deleted file mode 100644 index 3cda7fe3..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PCIController.mof +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.20.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( - "PCIController is a superclass for the PCIBridge and PCIDevice " - "classes. These classes model adapters and bridges on a PCI " - "bus. The properties in PCIController and its subclasses are " - "defined in the various PCI Specifications that are published " - "by the PCI SIG." )] -class CIM_PCIController : CIM_Controller { - - [Description ( - "Current contents of the register that provides basic " - "control over the ability of the device to respond to or " - "perform PCI accesses." )] - uint16 CommandRegister; - - [Description ( - "An array of integers that indicates controller " - "capabilities. Information such as \"Supports 66MHz\" " - "(value=2) is specified in this property. The data in the " - "Capabilities array is gathered from the PCI Status " - "Register and the PCI Capabilities List as defined in the " - "PCI Specification." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15..32767", "32768..65535" }, - Values { "Unknown", "Other", "Supports 66MHz", - "Supports User Definable Features", - "Supports Fast Back-to-Back Transactions", - "PCI-X Capable", "PCI Power Management Supported", - "Message Signaled Interrupts Supported", - "Parity Error Recovery Capable", "AGP Supported", - // 10 - "Vital Product Data Supported", - "Provides Slot Identification", "Hot Swap Supported", - "Supports PCIe", "Supports PCIe Gen 2", "DMTF Reserved", - "Vendor Reserved" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_PCIController.CapabilityDescriptions" }] - uint16 Capabilities[]; - - [Description ( - "An array of free-form strings that provides more " - "detailed explanations for any of the PCIController " - "features that are indicated in the Capabilities array. " - "Note, each entry of this array is related to the entry " - "in the Capabilities array that is located at the same " - "index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_PCIController.Capabilities" }] - string CapabilityDescriptions[]; - - [Description ( - "The slowest device-select timing for a target device." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "Fast", "Medium", "Slow", - "Reserved" }] - uint16 DeviceSelectTiming; - - [Description ( - "Register of 8 bits that identifies the basic function of " - "the PCI device. This property is only the upper byte " - "(offset 0Bh) of the 3-byte ClassCode field. Note that " - "the ValueMap array of the property specifies the decimal " - "representation of this information." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18..254", - "255" }, - Values { "Pre 2.0", "Mass Storage", "Network", "Display", - "Multimedia", "Memory", "Bridge", "Simple Communications", - "Base Peripheral", "Input", - // 10 - "Docking Station", - "Processor", "Serial Bus", "Wireless", "Intelligent I/O", - "Satellite Communication", "Encryption/Decryption", - "Data Acquisition and Signal Processing", - // 18 - 255 - "PCI Reserved", - "Other" }] - uint8 ClassCode; - - [Description ( - "Specifies the system cache line size in doubleword " - "increments (for example, a 486-based system would store " - "the value 04h, indicating a cache line size of four " - "doublewords." ), - Units ( "DoubleWords" ), - PUnit ( "dataword * 2" )] - uint8 CacheLineSize; - - [Description ( - "Defines the minimum amount of time, in PCI clock cycles, " - "that the bus master can retain ownership of the bus." ), - Units ( "PCI clock cycles" ), - PUnit ( "cycle" )] - uint8 LatencyTimer; - - [Description ( - "Defines the PCI interrupt request pin (INTA# to INTD#) " - "to which a PCI functional device is connected." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "None", "INTA#", "INTB#", "INTC#", "INTD#", "Unknown" }] - uint16 InterruptPin; - - [Description ( "Doubleword Expansion ROM-base memory address." ), - Units ( "DoubleWords" ), - PUnit ( "dataword * 2" )] - uint32 ExpansionROMBaseAddress; - - [Description ( - "Reports if the PCI device can perform the self-test " - "function. Returns bit 7 of the BIST register as a " - "Boolean." )] - boolean SelfTestEnabled; - - - [Description ( - "Method to invoke PCI device self-test. This method sets " - "bit 6 of the BIST register. The return result is the " - "lower 4 bits of the BIST register where 0 indicates " - "success and non-zero is a device-dependent failure. " - "Support for this method is optional in the PCI " - "Specification." )] - uint8 BISTExecution( -); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PCIDevice.mof b/build/vendor/dmtf_mof/Device/CIM_PCIDevice.mof deleted file mode 100644 index d295e364..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PCIDevice.mof +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - ClassConstraint { - "inv:IsBaseAddress64=true implies BaseAddress=null and BaseAddress64<>null", - "inv:IsBaseAddress64=false implies BaseAddress64=null" }, - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( - "Capabilities and management of a PCI device controller on an " - "adapter card." )] -class CIM_PCIDevice : CIM_PCIController { - - [Description ( "Array of doubleword base-memory addresses." ), - ModelCorrespondence { "CIM_PCIDevice.IsBaseAddress64" }] - uint32 BaseAddress[]; - - [Description ( "Subsystem identifier code." )] - uint16 SubsystemID; - - [Description ( - "Subsystem vendor ID. ID information is reported from a " - "PCIDevice through protocol-specific requests. The " - "correct place in the CIM Schema for this information is " - "in CIM_Physical Element (the Manufacturer property) for " - "hardware, and CIM_Product (the Vendor property) if the " - "information is related to Product acquisition. This data " - "is also reported here, because it is part of the " - "standard output from the Device and is an optimization." )] - uint16 SubsystemVendorID; - - [Description ( - "Register that indicates how long the master would like " - "to retain PCI bus ownership whenever it initiates a " - "transaction. A 0 value indicates no requirement." ), - Units ( "250 nanoseconds" ), - PUnit ( "second * 250 * 10^-9" )] - uint8 MinGrantTime; - - [Description ( - "Register that specifies how often the device needs " - "access to the PCI bus in 250ns. A 0 value indicates no " - "requirement." ), - Units ( "250 nanoseconds" ), - PUnit ( "second * 250 * 10^-9" )] - uint8 MaxLatency; - - [Description ( "The bus number where this PCI device resides." )] - uint8 BusNumber; - - [Description ( - "The device number assigned to this PCI device for this bus." - )] - uint8 DeviceNumber; - - [Description ( "The function number for this PCI device." )] - uint8 FunctionNumber; - - [Description ( - "Register that contains a value assigned by the device " - "manufacturer used to identify the type of device." )] - uint16 PCIDeviceID; - - [Description ( - "Register that contains a value assigned by the PCI SIG " - "used to identify the manufacturer of the device." )] - uint16 VendorID; - - [Description ( - "Register that contains a value assigned by the device " - "manufacturer used to identify the revision number of the " - "device." )] - uint8 RevisionID; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PCIPort.mof b/build/vendor/dmtf_mof/Device/CIM_PCIPort.mof deleted file mode 100644 index cab08f4f..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PCIPort.mof +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( - "Represents PCI device ports used to describe the connection " - "between PCI devices." )] -class CIM_PCIPort : CIM_LogicalPort { - - [Override ( "PortType" ), - Description ( "The type of port." ), - ValueMap { "0", "1", "2", "150", "151", "152", "153", "..", - "16000..65535" }, - Values { "Unknown", "Other", "Not Applicable", "PCI", - "PCI-X", "PCIe", "PCIe Gen 2", "DMTF Reserved", - "Vendor Reserved" }] - uint16 PortType; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PCIPortGroup.mof b/build/vendor/dmtf_mof/Device/CIM_PCIPortGroup.mof deleted file mode 100644 index 6b62ec5e..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PCIPortGroup.mof +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( "A collection of one or more PCI device ports." )] -class CIM_PCIPortGroup : CIM_LogicalPortGroup { - - [Description ( - "The bus number shared by the PCI device ports." )] - uint8 BusNumber; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PCIeSwitch.mof b/build/vendor/dmtf_mof/Device/CIM_PCIeSwitch.mof deleted file mode 100644 index c6f0d8f8..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PCIeSwitch.mof +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( - "Capabilities and management of a PCI device that provide PCI " - "Express switch capability." )] -class CIM_PCIeSwitch : CIM_PCIDevice { - - [Description ( - "The number of ports that are exposed by this switch." )] - uint16 NumberOfPorts; - - [Description ( - "The number of the PCI bus segments to which the " - "secondary interfaces of the switch are connected." )] - uint8 SecondaryBusNumbers[]; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PCMCIAController.mof b/build/vendor/dmtf_mof/Device/CIM_PCMCIAController.mof deleted file mode 100644 index 1d2c8f41..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PCMCIAController.mof +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PCMCIAController -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( "Capabilities and management of a PCMCIAController." )] -class CIM_PCMCIAController : CIM_Controller { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PCVideoController.mof b/build/vendor/dmtf_mof/Device/CIM_PCVideoController.mof deleted file mode 100644 index 5af82127..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PCVideoController.mof +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Deprecate class.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PCVideoController -// ================================================================== - [Deprecated { "CIM_DisplayController" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( - "Note: The use of the CIM_PCVideoController class has been " - "deprecated in lieu of CIM_DisplayController. \n" - "Deprecated description: Capabilities and management of a " - "PCVideoController, a subtype of VideoController." )] -class CIM_PCVideoController : CIM_VideoController { - - [Deprecated { "No Value" }, - Description ( - "The video architecture. For example, VGA (value=5) or " - "PC-98 (160) can be specified." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "160" }, - Values { "Other", "Unknown", "CGA", "EGA", "VGA", "SVGA", - "MDA", "HGC", "MCGA", - // 10 - "8514A", "XGA", - "Linear Frame Buffer", "PC-98" }, - MappingStrings { "MIF.DMTF|Video|004.2" }] - uint16 VideoArchitecture; - - [Deprecated { "No Value" }, - Description ( "Current video mode." ), - MappingStrings { "MIF.DMTF|Video|004.3" }] - uint16 VideoMode; - - [Deprecated { "No Value" }, - Description ( - "Current number of color planes. If this value is not " - "applicable for the current video configuration, enter 0." )] - uint16 NumberOfColorPlanes; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PExtentRedundancyComponent.mof b/build/vendor/dmtf_mof/Device/CIM_PExtentRedundancyComponent.mof deleted file mode 100644 index 84b2d616..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PExtentRedundancyComponent.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PExtentRedundancyComponent -// ================================================================== - [Association, Deprecated { "CIM_ExtentRedundancyComponent" }, - Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::SccExtents" ), - Description ( - "Describes the PhysicalExtents participating in a Storage " - "RedundancyGroup. However, there is no need for the specificity " - "of this association. It is deprecated in lieu of the generic " - "ExtentRedundancyComponent relationship, its superclass." )] -class CIM_PExtentRedundancyComponent : CIM_ExtentRedundancyComponent { - - [Deprecated { "CIM_ExtentRedundancyComponent.GroupComponent" }, - Aggregate, Override ( "GroupComponent" ), - Description ( "The StorageRedundancyGroup." )] - CIM_StorageRedundancyGroup REF GroupComponent; - - [Deprecated { "CIM_ExtentRedundancyComponent.PartComponent" }, - Override ( "PartComponent" ), - Description ( - "The PhysicalExtent participating in the RedundancyGroup." )] - CIM_PhysicalExtent REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_POTSModem.mof b/build/vendor/dmtf_mof/Device/CIM_POTSModem.mof deleted file mode 100644 index 32e48b74..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_POTSModem.mof +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_POTSModem -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Modems" ), - Description ( - "The POTSModem class represents a Device that translates binary " - "data into wave modulations for sound-based transmission. It " - "connects to the POTS (Plain Old Telephone System) network." )] -class CIM_POTSModem : CIM_CallBasedModem { - - [Description ( - "Capabilities of the POTSModem. For example, the Device " - "might support distinctive ring, caller ID, fax, voice, " - "and so on." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12" }, - Values { "Unknown", "Other", "Distinctive Ring", "Caller ID", - "Voice", "Fax Class 1", "Fax Class 2", "WakeOnRing", - "Fax Group 3", "GSM Support", "AMPS Support", - "OOB Alerting", "Worldwide Country Support" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_POTSModem.CapabilityDescriptions" }] - uint16 Capabilities[]; - - [Description ( - "An array of free-form strings that provides more " - "detailed explanations for any of the POTSModem features " - "indicated in the Capabilities array. Note, each entry of " - "this array is related to the entry in the Capabilities " - "array that is located at the same index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_POTSModem.Capabilities" }] - string CapabilityDescriptions[]; - - [Description ( - "Specifies which capabilities from the list of those " - "supported are enabled and defined in the Capabilities " - "array." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12" }, - Values { "Unknown", "Other", "Distinctive Ring", "Caller ID", - "Voice", "Fax Class 1", "Fax Class 2", "WakeOnRing", - "Fax Group 3", "GSM Support", "AMPS Support", - "OOB Alerting", "Worldwide Country Support" }, - ModelCorrespondence { "CIM_POTSModem.Capabilities" }] - uint16 EnabledCapabilities[]; - - [Description ( - "Defines the maximum communication speed to the COM Port " - "for an external modem that can be set. Enter 0 if not " - "applicable." ), - Units ( "Bits per Second" ), - PUnit ( "bit / second" )] - uint32 MaxBaudRateToSerialPort; - - [Description ( - "Defines the maximum communication speed for accessing " - "the phone system that can be set." ), - Units ( "Bits per Second" ), - PUnit ( "bit / second" )] - uint32 MaxBaudRateToPhone; - - [Description ( - "Boolean that indicates that synchronous, as well as " - "asynchronous, communication is supported." )] - boolean SupportsSynchronousConnect; - - [Description ( - "DialType is an integer that indicates whether tone " - "(value=1) or pulse dialing (value=2) is used. \"Unknown\" " - "(0) can also be defined." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "Tone", "Pulse" }] - uint16 DialType; - - [Description ( - "InactivityTimeout defines the time limit (in seconds) " - "for automatic disconnection of the phone line, if no " - "data is exchanged. A value of 0 indicates that this " - "feature is present but not enabled." ), - Units ( "Seconds" ), - PUnit ( "second" )] - uint32 InactivityTimeout; - - [Description ( - "Describes the volume level of the audible tones from the " - "Modem. For example, high, medium, or low volume can be " - "reported (values 3, 4, or 5, respectively)." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7" }, - Values { "Unknown", "Other", "Not Supported", "High", - "Medium", "Low", "Off", "Auto" }] - uint16 SpeakerVolumeInfo; - - [Description ( - "CountriesSupported is an array of strings that defines " - "the countries in which the POTSModem operates." ), - MaxLen ( 64 )] - string CountriesSupported[]; - - [Description ( - "CountrySelected is a string value that defines the " - "country for which the Modem is currently programmed. " - "When multiple countries are supported, this property " - "defines which one is currently selected for use." ), - MaxLen ( 64 )] - string CountrySelected; - - [Description ( - "Number of rings before the Modem answers an incoming call." - )] - uint8 RingsBeforeAnswer; - - [Description ( - "MaxNumberOfPasswords specifies the number of passwords " - "that can be defined in the Modem itself. If this feature " - "is not supported, enter 0." )] - uint16 MaxNumberOfPasswords; - - [Description ( - "CurrentPasswords is an array that contains the currently " - "defined passwords for the Modem. This array might be " - "left blank for security reasons." ), - MaxLen ( 24 )] - string CurrentPasswords[]; - - [Description ( - "Indication of whether the Modem supports call-back." )] - boolean SupportsCallback; - - [Description ( - "AnswerMode defines the current auto-answer or call-back " - "setting for the Modem." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "Disabled", "Manual Answer", - "Auto Answer", "Auto Answer with Call-Back" }] - uint16 AnswerMode; - - [Description ( - "The current equalization setting for the Modem." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Other", "Long", "Short" }] - uint16 Equalization; - - [Description ( "List of black-listed numbers for the Modem." )] - string BlackListedNumbers[]; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PSExtentBasedOnPExtent.mof b/build/vendor/dmtf_mof/Device/CIM_PSExtentBasedOnPExtent.mof deleted file mode 100644 index b6cb68c8..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PSExtentBasedOnPExtent.mof +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PSExtentBasedOnPExtent -// ================================================================== - [Association, Deprecated { "CIM_ProtectedExtentBasedOn", - "CIM_CompositeExtentBasedOn" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::SccExtents" ), - Description ( - "Covered by ProtectedExtentBasedOn or CompositeExtentBasedOn, " - "since PhysicalExtent itself is deprecated in lieu of these " - "associations. ProtectedSpaceExtents are BasedOn a " - "PhysicalExtent. This relationship is made explicit by this " - "association." )] -class CIM_PSExtentBasedOnPExtent : CIM_BasedOn { - - [Deprecated { "CIM_CompositeExtentBasedOn.Antecedent", - "CIM_ProtectedExtentBasedOn.Antecedent" }, - Override ( "Antecedent" ), - Description ( "The PhysicalExtent." )] - CIM_PhysicalExtent REF Antecedent; - - [Deprecated { "CIM_CompositeExtentBasedOn.Dependent", - "CIM_ProtectedExtentBasedOn.Dependent" }, - Override ( "Dependent" ), - Description ( - "The ProtectedSpaceExtent which is built on the Physical Extent." - )] - CIM_ProtectedSpaceExtent REF Dependent; - - [Deprecated { "CIM_CompositeExtentBasedOn.StartingAddress", - "CIM_ProtectedExtentBasedOn.StartingAddress" }, - Override ( "StartingAddress" ), - Description ( - "The starting logical block address of the PhysicalExtent " - "from which this ProtectedSpaceExtent is derived." ), - MappingStrings { "MIF.DMTF|Protected Space Extent|001.2" }] - uint64 StartingAddress; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PackageAlarm.mof b/build/vendor/dmtf_mof/Device/CIM_PackageAlarm.mof deleted file mode 100644 index 2d61f699..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PackageAlarm.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PackageAlarm -// ================================================================== - [Association, Deprecated { "CIM_PackageDependency" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::Sensors" ), - Description ( - "Often, an AlarmDevice is installed as part of a Package, not " - "to indicate issues with any particular LogicalDevice or " - "PhysicalComponent, but with the Package\'s environment in " - "general, its security state or its overall health. The use of " - "this association has been deprecated. Instead, use " - "PackageDependency to describe this relationship." )] -class CIM_PackageAlarm : CIM_PackageDependency { - - [Deprecated { "CIM_PackageDependency.Antecedent" }, - Override ( "Antecedent" ), - Description ( "The AlarmDevice for the Package." )] - CIM_AlarmDevice REF Antecedent; - - [Deprecated { "CIM_PackageDependency.Dependent" }, - Override ( "Dependent" ), - Description ( - "The PhysicalPackage whose health, security, environment, " - "etc. is alarmed." )] - CIM_PhysicalPackage REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PackageCooling.mof b/build/vendor/dmtf_mof/Device/CIM_PackageCooling.mof deleted file mode 100644 index bfc1f63b..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PackageCooling.mof +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PackageCooling -// ================================================================== - [Association, Deprecated { "CIM_PackageDependency" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::CoolingAndPower" ), - Description ( - "Note: The use of this association has been deprecated. " - "Instead, the more generic PackageDependency relationship " - "should be used. \n" - "Deprecated description: Often, a CoolingDevice is installed in " - "a Package such as a Chassis or a Rack, not for a specific " - "Device, but to assist in the cooling of the Package in " - "general." )] -class CIM_PackageCooling : CIM_PackageDependency { - - [Deprecated { "CIM_PackageDependency.Antecedent" }, - Override ( "Antecedent" ), - Description ( - "Note: The use of this method is deprecated. \n" - "Deprecated description: The CoolingDevice for the " - "Package." )] - CIM_CoolingDevice REF Antecedent; - - [Deprecated { "CIM_PackageDependency.Dependent" }, - Override ( "Dependent" ), - Description ( - "Note: The use of this method is deprecated. \n" - "Deprecated description: The PhysicalPackage whose " - "environment is cooled." )] - CIM_PhysicalPackage REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PackageDependency.mof b/build/vendor/dmtf_mof/Device/CIM_PackageDependency.mof deleted file mode 100644 index f9aede39..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PackageDependency.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PackageDependency -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::DeviceElements" ), - Description ( - "A LogicalDevice is installed in a Package such as a Chassis or " - "a Rack, not for a specific Device, but to function with the " - "Package in general. This relationship is described by the " - "PackageDependency association." )] -class CIM_PackageDependency : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The Logical Device for the Package." )] - CIM_LogicalDevice REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The PhysicalPackage whose environment is affected." )] - CIM_PhysicalPackage REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PackageTempSensor.mof b/build/vendor/dmtf_mof/Device/CIM_PackageTempSensor.mof deleted file mode 100644 index 1a3b221e..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PackageTempSensor.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PackageTempSensor -// ================================================================== - [Association, Deprecated { "CIM_PackageDependency" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::Sensors" ), - Description ( - "Often, a TemperatureSensor is installed in a Package such as a " - "Chassis or a Rack, not to measure any particular Device, but " - "the Package\'s environment in general. The use of this " - "association has been deprecated. Instead, use " - "PackageDependency to describe this relationship." )] -class CIM_PackageTempSensor : CIM_PackageDependency { - - [Deprecated { "CIM_PackageDependency.Antecedent" }, - Override ( "Antecedent" ), - Description ( "The TemperatureSensor for the Package." )] - CIM_TemperatureSensor REF Antecedent; - - [Deprecated { "CIM_PackageDependency.Dependent" }, - Override ( "Dependent" ), - Description ( - "The PhysicalPackage whose environment is monitored." )] - CIM_PhysicalPackage REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ParallelController.mof b/build/vendor/dmtf_mof/Device/CIM_ParallelController.mof deleted file mode 100644 index e9fed953..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ParallelController.mof +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ParallelController -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( - "Capabilities and management of the ParallelController." )] -class CIM_ParallelController : CIM_Controller { - - [Description ( - "Set to true if the ParallelController supports DMA." ), - MappingStrings { "MIF.DMTF|Parallel Ports|003.7" }] - boolean DMASupport; - - [Description ( - "An integer enumeration that indicates the capabilities " - "of the ParallelController." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Unknown", "Other", "XT/AT Compatible", - "PS/2 Compatible", "ECP", "EPP", "PC-98", "PC-98-Hireso", - "PC-H98" }, - ArrayType ( "Indexed" ), - MappingStrings { "MIF.DMTF|Parallel Ports|003.8" }, - ModelCorrespondence { - "CIM_ParallelController.CapabilityDescriptions" }] - uint16 Capabilities[]; - - [Description ( - "An array of free-form strings that provides more " - "detailed explanations for any of the ParallelController " - "features that are indicated in the Capabilities array. " - "Note, each entry of this array is related to the entry " - "in the Capabilities array that is located at the same " - "index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_ParallelController.Capabilities" }] - string CapabilityDescriptions[]; - - [Description ( - "An enumeration that indicates the operational security " - "for the Controller. For example, information that the " - "external interface of the Device is locked out (value=4) " - "or \"Boot Bypass\" (value=6) can be described using this " - "property." ), - ValueMap { "1", "2", "3", "4", "5", "6" }, - Values { "Other", "Unknown", "None", - "External Interface Locked Out", - "External Interface Enabled", "Boot Bypass" }, - MappingStrings { "MIF.DMTF|Parallel Ports|003.10" }] - uint16 Security; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PassThroughModule.mof b/build/vendor/dmtf_mof/Device/CIM_PassThroughModule.mof deleted file mode 100644 index a60fc5b1..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PassThroughModule.mof +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( - "A device that is a replacement for physical cables and allows " - "internal network physical ports in a chassis or rack to be " - "made accessible from the external network. This may a fixed " - "internal port to external port relationship, or a configurable " - "mapping of internal ports to output ports via a cross-point " - "switching function. The mapping between an internal and " - "external port is modeled using the InternalPorts and " - "ExternalPorts array properties. Corresponding array indices of " - "the InternalPorts and ExternalPorts properties shall contain " - "the port number of the internal port and external port, " - "respectively in a mapping pair. Usage of this class is " - "appropriate when modeling a simple n x n pass through module " - "where the protocols supported by the module are not the target " - "of management. Implementations wishing to enable management of " - "the network function should instrument the appropriate device " - "and network models. The tie into the device and network models " - "is accomplished by correlating the port numbers in this class\' " - "internal and external port arrays with CIM_NetworkPort\'s " - "PortNumber property. The following is an example of how this " - "class could be used: \n" - "For a given instance, the value of NumberOfPorts is 3. This " - "indicates that there are 3 internal ports and 3 external " - "ports. Internal port 2 is mapped to external port 3. Internal " - "ports 1 and 3 are not mapped to an external port. External " - "ports 1 and 2 are not mapped to internal ports. For this " - "instance the length of the InternalPorts and ExternalPorts " - "arrays shall both be one. The first array position in " - "InternalPortshall contain the value 2. The first array " - "position in ExternalPorts shall contain the value 3." )] -class CIM_PassThroughModule : CIM_LogicalModule { - - [Description ( - "An enumeration of the link technologies that can be " - "passed- through by this device. When set to 1 (\"Other\"), " - "the property OtherLinkTechnologies contains string " - "descriptions of the alternative link types." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12..32767", "32768..65535" }, - Values { "Unknown", "Other", "Ethernet", "IB", "FC", "FDDI", - "ATM", "Token Ring", "Frame Relay", "Infrared", - "BlueTooth", "Wireless LAN", "DMTF Reserved", - "Vendor Specified" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_PassThroughModule.OtherLinkTechnologies" }] - uint16 LinkTechnologies[]; - - [Description ( - "An array of string values describing the supported " - "technologies when an entry in the LinkTechnologies array " - "is set to 1, \"Other\"." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_PassThroughModule.LinkTechnologies" }] - string OtherLinkTechnologies[]; - - [Description ( - "Boolean indicating if the port assignments on this " - "switch are software programmable or not." )] - boolean IsProgrammable = false; - - [Description ( - "A PassThroughModule is a simple module with 1-1 " - "correspondence between internal and external ports. This " - "number represents the number of external ports. By " - "virtue of there being a 1-1 correspondence of ports, it " - "also represents the number of internal ports. \n" - "The ports are numbered 1 through N." )] - uint16 NumberOfPorts; - - [Description ( - "An indexed array containing the internal port numbers. " - "Corresponding external ports are in the ExternalPorts " - "array. Only internal ports which are mapped to an " - "external port shall appear in the array." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_PassThroughModule.ExternalPorts", - "CIM_NetworkPort.PortNumber" }] - uint16 InternalPorts[]; - - [Description ( - "An indexed array containing the external ports. " - "Corresponding internal ports are in the InternalPorts " - "array. Only external ports which are mapped to an " - "internal port shall appear in the array." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_PassThroughModule.InternalPorts", - "CIM_NetworkPort.PortNumber" }] - uint16 ExternalPorts[]; - - - [Description ( - "If the switch is software programmable, then this method " - "is called to assign an internal port to an external " - "port. \n" - "If 0 is returned, the requested status of the mapping of " - "InternalPort and ExternalPort is in effect. That is, an " - "attempt to unmap two ports that are not mapped to any " - "other ports or an attempt to map two ports which are " - "already mapped to each other shall return 0, because the " - "resultant state of the mapping is equivalent to the " - "client request. For a mapping operation, if either " - "target port is already mapped to a different port, the " - "implementation shall first unmap it. An attempt to unmap " - "two ports that are not mapped to each other shall fail " - "with an error of \"Not Mapped\"." ), - ValueMap { "0", "1", "2", "3", "4", "5..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", "Busy", "Not Mapped", - "DMTF Reserved", "Vendor Reserved" }] - uint32 AssignPorts( - [IN, Description ( - "Boolean indicating if the ports are to be unmapped " - "or mapped. If \"True\", InternalPorts and " - "ExternalPorts shall be updated to contain a " - "mapping of InternalPort to ExternalPort. If " - "\"False\", InternalPorts and ExternalPorts shall " - "be updated to remove the mapping if one exists." )] - boolean Mapped, - [IN, Description ( - "The mapping for this internal port shall be updated." - )] - uint16 InternalPort, - [IN, Description ( - "The mapping for this external port shall be updated." - )] - uint16 ExternalPort); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PhysicalExtent.mof b/build/vendor/dmtf_mof/Device/CIM_PhysicalExtent.mof deleted file mode 100644 index 23b9702d..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PhysicalExtent.mof +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_PhysicalExtent -// ================================================================== - [Deprecated { "CIM_ProtectedExtentBasedOn", - "CIM_CompositeExtentBasedOn" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::SccExtents" ), - Description ( - "Deprecated - use CIM_ProtectedExtentBasedOn or " - "CIM_CompositeExtentBasedOn instead. The information on check " - "and user data is better expressed in the association that " - "layers the storage, than in the extent itself. A " - "PhysicalExtent is used to model an SCC RAID implementation. It " - "defines the consecutive addressable block addresses on a " - "single storage device, that are treated as a single " - "StorageExtent and that are in the same StorageRedundancyGroup. " - "An alternate possibility, if automatic configuration is used, " - "is to instantiate or extend the AggregatePExtent class." )] -class CIM_PhysicalExtent : CIM_StorageExtent { - - [Deprecated { "CIM_CompositeExtentBasedOn.BlockSize", - "CIM_ProtectedExtentBasedOn.BlockSize" }, - Override ( "BlockSize" ), - MappingStrings { "MIF.DMTF|Physical Extent|001.4" }] - uint64 BlockSize; - - [Deprecated { "CIM_CompositeExtentBasedOn.NumberOfBlocks", - "CIM_ProtectedExtentBasedOn.NumberOfBlocks" }, - Override ( "NumberOfBlocks" ), - MappingStrings { "MIF.DMTF|Physical Extent|001.3" }] - uint64 NumberOfBlocks; - - [Deprecated { - "CIM_CompositeExtentBasedOn.UnitsBeforeCheckDataInterleave", - "CIM_ProtectedExtentBasedOn.UnitsBeforeCheckDataInterleave" }, - Description ( - "Number of bytes of user data to skip before starting the " - "check data interleave." ), - Units ( "Bytes" ), - MappingStrings { "MIF.DMTF|Physical Extent|001.6" }, - PUnit ( "byte" )] - uint64 UnitsBeforeCheckDataInterleave; - - [Deprecated { "CIM_CompositeExtentBasedOn.UnitsOfCheckData", - "CIM_ProtectedExtentBasedOn.UnitsOfCheckData" }, - Description ( - "Number of bytes to be reserved for check data." ), - Units ( "Bytes" ), - MappingStrings { "MIF.DMTF|Physical Extent|001.7" }, - PUnit ( "byte" )] - uint64 UnitsOfCheckData; - - [Deprecated { "CIM_CompositeExtentBasedOn.UnitsOfUserData", - "CIM_ProtectedExtentBasedOn.UnitsOfUserData" }, - Description ( "Number of bytes to be reserved for user data." ), - Units ( "Bytes" ), - MappingStrings { "MIF.DMTF|Physical Extent|001.8" }, - PUnit ( "byte" )] - uint64 UnitsOfUserData; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PickerElement.mof b/build/vendor/dmtf_mof/Device/CIM_PickerElement.mof deleted file mode 100644 index 3d6eaf9f..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PickerElement.mof +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_PickerElement -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageLib" ), - Description ( - "PickerElements represent hardware used to pick or place " - "PhysicalMedia from/into StorageMediaLocations." )] -class CIM_PickerElement : CIM_MediaTransferDevice { - - [Description ( - "The maximum time in seconds for a PickerElement to grab " - "a PhysicalMedia from a StorageMediaLocation, once the " - "Picker has arrived at that Location. The maximum time " - "interval for moving a Media from one point to another is " - "the sum of the PickerElement\'s MaxPickTime, the Changer " - "Device\'s MaxTransitTime and the PickerElement\'s " - "MaxPutTime." ), - Units ( "Seconds" ), - PUnit ( "second" )] - uint32 MaxPickTime; - - [Description ( - "The maximum time in seconds for a PickerElement to place " - "a PhysicalMedia into a StorageMediaLocation, once the " - "Picker has arrived at that Location. The maximum time " - "interval for moving a Media from one point to another is " - "the sum of the PickerElement\'s MaxPickTime, the Changer " - "Device\'s MaxTransitTime and the PickerElement\'s " - "MaxPutTime." ), - Units ( "Seconds" ), - PUnit ( "second" )] - uint32 MaxPutTime; - - [Description ( - "String describing the location in the StorageLibrary " - "where the Picker is currently positioned." )] - string CellLocation; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PickerForChanger.mof b/build/vendor/dmtf_mof/Device/CIM_PickerForChanger.mof deleted file mode 100644 index ea7a62bc..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PickerForChanger.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PickerForChanger -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageLib" ), - Description ( - "PickerForChanger indicates the PickerElement(s) that access " - "StorageMediaLocations and deliver PhysicalMedia to the " - "Changer, for movement through the System. A Changer may have " - "several Pickers for faster exchange of Media." )] -class CIM_PickerForChanger : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "The PickerElement that accesses StorageMediaLocations to " - "deliver Media to the Changer." )] - CIM_PickerElement REF Antecedent; - - [Override ( "Dependent" ), - Max ( 1 ), - Description ( "The ChangerDevice." )] - CIM_ChangerDevice REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PickerLabelReader.mof b/build/vendor/dmtf_mof/Device/CIM_PickerLabelReader.mof deleted file mode 100644 index ff7d8e24..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PickerLabelReader.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PickerLabelReader -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageLib" ), - Description ( - "PickerLabelReader is used to indicate that one or more Label " - "Readers works in conjunction with PickerElements, to identify " - "PhysicalMedia as they are being picked/placed." )] -class CIM_PickerLabelReader : CIM_AssociatedLabelReader { - - [Override ( "Antecedent" ), - Description ( "The LabelReader." )] - CIM_LabelReader REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The PickerElement that is dependent on the Reader Device." )] - CIM_PickerElement REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PickerStatData.mof b/build/vendor/dmtf_mof/Device/CIM_PickerStatData.mof deleted file mode 100644 index 66c65208..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PickerStatData.mof +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PickerStatData -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::StorageLib" ), - Description ( - "Statistics for a PickerElement, related to pick/put successes, " - "retries and failures. The element whose statistics are " - "described is associated using the relationship, " - "ElementStatisticalData." )] -class CIM_PickerStatData : CIM_StatisticalData { - - [Description ( "The number of successful picks." ), - Counter] - uint64 PickSuccesses; - - [Description ( "The number of failed picks." ), - Counter] - uint64 PickFailures; - - [Description ( "The number of retried picks." ), - Counter] - uint64 PickRetries; - - [Description ( "The number of successful puts." ), - Counter] - uint64 PutSuccesses; - - [Description ( "The number of failed puts." ), - Counter] - uint64 PutFailures; - - [Description ( "The number of retried puts." ), - Counter] - uint64 PutRetries; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PickerStatInfo.mof b/build/vendor/dmtf_mof/Device/CIM_PickerStatInfo.mof deleted file mode 100644 index 4cd677be..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PickerStatInfo.mof +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PickerStatInfo -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageLib" ), - Description ( - "Statistics for a PickerElement, related to pick/put successes, " - "retries and failures." )] -class CIM_PickerStatInfo : CIM_DeviceStatisticalInformation { - - [Description ( "The number of successful picks." ), - Counter] - uint64 PickSuccesses; - - [Description ( "The number of failed picks." ), - Counter] - uint64 PickFailures; - - [Description ( "The number of retried picks." ), - Counter] - uint64 PickRetries; - - [Description ( "The number of successful puts." ), - Counter] - uint64 PutSuccesses; - - [Description ( "The number of failed puts." ), - Counter] - uint64 PutFailures; - - [Description ( "The number of retried puts." ), - Counter] - uint64 PutRetries; - - - [Description ( - "Method to reset the statistical counters. The method " - "takes one parameter as input - an integer indicating " - "which counter to reset. For this input parameter, 0 " - "indicates all, 1-3 reset the \'pick\'-related counters, " - "and 4-6 reset the \'put\'- related counters. The method " - "returns 0 if successful, 1 if not supported, and any " - "other value if an error occurred. A method is specified " - "so that the Device\'s instrumentation can also reset its " - "internal pocessing and counters. \n" - "In a subclass, the set of possible return codes should " - "be specified in a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \'translated\' " - "can be specified as a Values array qualifier." )] - uint32 ResetCounter( - [IN, Description ( - "This parameter indicates the counter to reset." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6" }, - Values { "All", "Pick Successes", "Pick Failures", - "Pick Retries", "Put Successes", "Put Failures", - "Put Retries" }] - uint16 SelectedCounter); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PointingDevice.mof b/build/vendor/dmtf_mof/Device/CIM_PointingDevice.mof deleted file mode 100644 index 53ac4084..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PointingDevice.mof +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_PointingDevice -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::UserDevices" ), - Description ( - "PointingDevice represents those Devices used to \'point\' to " - "regions of a Display." )] -class CIM_PointingDevice : CIM_UserDevice { - - [Description ( "The type of the pointing device." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9" }, - Values { "Other", "Unknown", "Mouse", "Track Ball", - "Track Point", "Glide Point", "Touch Pad", "Touch Screen", - "Mouse - Optical Sensor" }, - MappingStrings { "MIF.DMTF|Pointing Device|003.1" }] - uint16 PointingType; - - [Description ( - "Number of buttons. If the PointingDevice has no buttons, enter 0." - ), - MappingStrings { "MIF.DMTF|Pointing Device|003.4" }] - uint8 NumberOfButtons; - - [Description ( - "Integer indicating whether the PointingDevice is " - "configured for right (value=2) or left handed operation " - "(value=3). Also, the values, \"Unknown\" (0) and \"Not " - "Applicable\" (1), can be defined." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Not Applicable", - "Right Handed Operation", "Left Handed Operation" }] - uint16 Handedness; - - [Description ( - "Tracking resolution of the PointingDevice in Counts per Inch." - ), - Units ( "Counts per Inch" ), - PUnit ( "count / inch" )] - uint32 Resolution; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PortActiveConnection.mof b/build/vendor/dmtf_mof/Device/CIM_PortActiveConnection.mof deleted file mode 100644 index 816b9054..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PortActiveConnection.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PortActiveConnection -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Ports" ), - Description ( - "The PortActiveConnection relationship indicates that a " - "NetworkPort is using the referenced PhysicalConnector to " - "output to the network. This relationship is important when the " - "port can choose to output from one of several connectors. The " - "connectors can be associated with the NetworkPort in a " - "Realizes relationship, but this is not required. This " - "association provides additional information (for instance,\'in " - "use for communication\') different than Realizes." )] -class CIM_PortActiveConnection : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The PhysicalConnector." )] - CIM_PhysicalConnector REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The NetworkPort that transmits using the Connector." )] - CIM_NetworkPort REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PortController.mof b/build/vendor/dmtf_mof/Device/CIM_PortController.mof deleted file mode 100644 index 244bba22..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PortController.mof +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PortController -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( - "PortController is a logical device corresponding to a hardware " - "network port controller. Port controllers provide various " - "features depending on their types and versions." )] -class CIM_PortController : CIM_Controller { - - [Description ( - "The type or model of the port controller. Specific " - "values will be enumerated in a later release of this " - "schema. When set to 1 (\"Other\"), the related property " - "OtherControllerType contains a string description of the " - "type of the controller." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Unknown", "Other", "Ethernet", "IB", "FC", "FDDI", - "ATM", "Token Ring", "Frame Relay" }, - ModelCorrespondence { "CIM_PortController.OtherControllerType" }] - uint16 ControllerType; - - [Description ( - "A string value for controller types that is not captured " - "by the ControllerType enumeration. This property should " - "be used only when the value of the ControllerType " - "property is set to 1, \"Other\"." ), - ModelCorrespondence { "CIM_PortController.ControllerType" }] - string OtherControllerType; - - [Description ( "The revision number of the controller." )] - uint16 ControllerVersion; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PortImplementsEndpoint.mof b/build/vendor/dmtf_mof/Device/CIM_PortImplementsEndpoint.mof deleted file mode 100644 index 69ad910d..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PortImplementsEndpoint.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PortImplementsEndpoint -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Ports" ), - Description ( - "PortImplementsEndpoint associates a LogicalPort with one or " - "more ProtocolEndpoints that are implemented on it. This class " - "specializes the DeviceSAPImplementation association. It " - "indicates that the referenced Endpoint is dependent on the " - "operations of the Port Device." )] -class CIM_PortImplementsEndpoint : CIM_DeviceSAPImplementation { - - [Override ( "Antecedent" ), - Description ( - "The LogicalPort that represents the Device behind the " - "ProtocolEndpoint." )] - CIM_LogicalPort REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The ProtocolEndpoint that is implemented on the LogicalPort." - )] - CIM_ProtocolEndpoint REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PortOnDevice.mof b/build/vendor/dmtf_mof/Device/CIM_PortOnDevice.mof deleted file mode 100644 index 132501d4..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PortOnDevice.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PortOnDevice -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::Ports" ), - Description ( - "PortOnDevice associates a Port or connection point with its Device." - )] -class CIM_PortOnDevice : CIM_HostedDependency { - - [Override ( "Antecedent" ), - Description ( "The Device that includes the Port." )] - CIM_LogicalDevice REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The Port on the Device." )] - CIM_LogicalPort REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PowerAllocationSettingData.mof b/build/vendor/dmtf_mof/Device/CIM_PowerAllocationSettingData.mof deleted file mode 100644 index e12ee115..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PowerAllocationSettingData.mof +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.23.0" ), - UMLPackagePath ( "CIM::System::CoolingAndPower" ), - Description ( - "PowerAllocationSettingData class is used to provide " - "configuration and capabilities information about power " - "consumption and/or allocation for a CIM_ManagedSystemElement." )] -class CIM_PowerAllocationSettingData : CIM_ResourceAllocationSettingData { - - [Description ( - "When power is consumed by or allocated to a " - "ManagedSystemElement, there may be well-known or " - "meaningful levels of allocation or consumption for the " - "ManagedSystemElement. The PowerAllocationSettingPurpose " - "property may be used to identify the well known level or " - "provide context for the interpretation of the other " - "values of the PowerAllocationSettingData instance. A " - "value of \"MaxConAuxiliary\" shall indicate the instance " - "provides information about the maximum power allocated " - "or consumed by the ManagedSystemElement as currently " - "configured, while the ManagedSystemElement is turned off " - "and drawing auxiliary power. Note that an alternate name " - "for \"auxiliary power\" is \"trickle power\" \n" - "A value of \"MinWhenOn\" shall indicate the instance " - "provides information about the minimum value for power " - "consumption for which a configuration of the " - "ManagedSystemElement exists such that when it is powered " - "on and operating in that configuration, the power " - "consumption of the ManagedSystemElement is guaranteed " - "not to exceed the specified amount. \n" - "A value of \"MaxAsConfigured\" shall indicate the " - "instance provides information about the maximum power " - "that may be allocated to or consumed by the " - "ManagedSystemElement as currently configured while " - "powered on. The actual power consumed may be less.\n" - "A value of \"MaxIfAllHotPlug\" shall indicate the " - "instance provides information about the maximum power " - "allocated or consumed by the ManagedSystemElement if all " - "components that could be added to the " - "ManagedSystemElement without requiring a power cycle of " - "the ManagedSystemElement were added to the " - "ManagedSystemElement. \n" - "A value of \"MaxIfAllColdPlug\" shall indicate the " - "instance provides information about the maximum power " - "allocated or consumed by the ManagedSystemElement if all " - "components that could be added to the " - "ManagedSystemElement, including those that require a " - "power cycle of the ManagedSystemElement, were added to " - "the ManagedSystemElement. \n" - "A value of \"Allocated\" shall indicate the instance " - "provides information about the current power allocated " - "to the ManagedSystemElement. \n" - "A value of \"MinWithoutDegradation\" shall indicate the " - "instance provides information about the minimum power " - "allocated or consumed by the ManagedSystemElement with " - "out causing performance degradation." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "..", - "32768..65535" }, - Values { "Other", "MaxConAuxiliary", "MinWhenOn", - "MaxAsConfigured", "MaxIfAllHotPlug", "MaxIfAllColdPlug", - "Allocated", "MinWithoutDegradation", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { - "CIM_PowerAllocationSettingData.OtherSettingPurpose" }] - uint16 PowerAllocationSettingPurpose; - - [Description ( - "This property shall be set to null if SettingPurpose is " - "any value other than 1. This property shall be non-null " - "if SettingPurpose has the value 1. If non-null, the " - "value of this property shall be formatted using the " - "following algorithm: : , where and are separated by a " - "colon (:) and shall include a copyrighted, trademarked, " - "or otherwise unique name that is owned by the business " - "entity that is creating or defining the value or that is " - "a registered ID assigned to the business entity by a " - "recognized global authority. In addition, to ensure " - "uniqueness, shall not contain a colon (:). If this " - "algorithm is used, the first colon to appear in the " - "value shall appear between and . The is chosen by the " - "business entity and shall be used uniquely." ), - ModelCorrespondence { - "CIM_PowerAllocationSettingData.PowerAllocationSettingPurpose" }] - string OtherSettingPurpose; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PowerSupply.mof b/build/vendor/dmtf_mof/Device/CIM_PowerSupply.mof deleted file mode 100644 index f211d135..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PowerSupply.mof +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_PowerSupply -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::CoolingAndPower" ), - Description ( - "Capabilities and management of the PowerSupply LogicalDevice." )] -class CIM_PowerSupply : CIM_LogicalDevice { - - [Description ( - "Boolean indicating that the PowerSupply is a switching " - "(instead of linear) supply." )] - boolean IsSwitchingSupply; - - [Description ( - "The low voltage of Input Voltage Range 1 for this Power " - "Supply, in millivolts. A value of 0 denotes \'unknown\'." ), - Units ( "MilliVolts" ), - MappingStrings { "MIF.DMTF|Power Supply|004.7" }, - PUnit ( "volt * 10^-3" )] - uint32 Range1InputVoltageLow; - - [Description ( - "The high voltage of Input Voltage Range 1 for this Power " - "Supply, in millivolts. A value of 0 denotes \'unknown\'." ), - Units ( "MilliVolts" ), - MappingStrings { "MIF.DMTF|Power Supply|004.8" }, - PUnit ( "volt * 10^-3" )] - uint32 Range1InputVoltageHigh; - - [Description ( - "The frequency (in hertz) at the low end of the Input " - "Frequency Range 1 of this Power Supply. A value of 0 " - "implies DC." ), - Units ( "Hertz" ), - MappingStrings { "MIF.DMTF|Power Supply|004.17" }, - PUnit ( "hertz" )] - uint32 Range1InputFrequencyLow; - - [Description ( - "The frequency (in hertz) at the high end of the Input " - "Frequency Range 1 of this Power Supply. A value of 0 " - "implies DC." ), - Units ( "Hertz" ), - MappingStrings { "MIF.DMTF|Power Supply|004.18" }, - PUnit ( "hertz" )] - uint32 Range1InputFrequencyHigh; - - [Description ( - "The low voltage of Input Voltage Range 2 for this Power " - "Supply, in millivolts. A value of 0 denotes \'unknown\'." ), - Units ( "MilliVolts" ), - MappingStrings { "MIF.DMTF|Power Supply|004.11" }, - PUnit ( "volt * 10^-3" )] - uint32 Range2InputVoltageLow; - - [Description ( - "The high voltage of Input Voltage Range 2 for this Power " - "Supply, in millivolts. A value of 0 denotes \'unknown\'." ), - Units ( "MilliVolts" ), - MappingStrings { "MIF.DMTF|Power Supply|004.12" }, - PUnit ( "volt * 10^-3" )] - uint32 Range2InputVoltageHigh; - - [Description ( - "The frequency (in hertz) at the low end of the Input " - "Frequency Range 2 of this Power Supply. A value of 0 " - "implies DC." ), - Units ( "Hertz" ), - MappingStrings { "MIF.DMTF|Power Supply|004.19" }, - PUnit ( "hertz" )] - uint32 Range2InputFrequencyLow; - - [Description ( - "The frequency (in hertz) at the high end of the Input " - "Frequency Range 2 of this Power Supply. A value of 0 " - "implies DC." ), - Units ( "Hertz" ), - MappingStrings { "MIF.DMTF|Power Supply|004.20" }, - PUnit ( "hertz" )] - uint32 Range2InputFrequencyHigh; - - [Description ( - "ActiveInputVoltage indicates which input voltage range " - "is currently in use. Range 1, 2, or both can be " - "specified using the values 3, 4, or 5, respectively. If " - "the Supply is not currently drawing power, the value 6 " - "(\"Neither\") can be specified. This information is " - "necessary in the case of a UPS, a subclass of " - "PowerSupply." ), - ValueMap { "1", "2", "3", "4", "5", "6" }, - Values { "Other", "Unknown", "Range 1", "Range 2", "Both", - "Neither" }, - MappingStrings { "MIF.DMTF|Power Supply|004.15" }] - uint16 ActiveInputVoltage; - - [Description ( - "TypeOfRangeSwitching describes the kind of input voltage " - "range switching that is implemented in this PowerSupply. " - "For example, autoswitching can be specified (value=4)." ), - ValueMap { "1", "2", "3", "4", "5", "6" }, - Values { "Other", "Unknown", "Manual", "Autoswitch", - "Wide Range", "Not Applicable" }, - MappingStrings { "MIF.DMTF|Power Supply|004.16" }] - uint16 TypeOfRangeSwitching; - - [Description ( - "Represents the total output power of the PowerSupply in " - "milliWatts. 0 denotes \'unknown\'." ), - Units ( "MilliWatts" ), - MappingStrings { "MIF.DMTF|Power Supply|004.21" }, - PUnit ( "watt * 10^-3" )] - uint32 TotalOutputPower; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PrintJob.mof b/build/vendor/dmtf_mof/Device/CIM_PrintJob.mof deleted file mode 100644 index 473d40ea..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PrintJob.mof +++ /dev/null @@ -1,295 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_PrintJob -// ================================================================== - [Version ( "2.14.0" ), - UMLPackagePath ( "CIM::Device::Printing" ), - Description ( - "Description of a print request that is either waiting on a " - "Queue for a Printer to become available or in the process of " - "being output on a Printer, or that has previously been printed " - "on a Printer. PrintJobs are weak to their current Queue, or to " - "the last Queue that held them. The ABNF for CIM references to " - "PWG Standards and MIBs is in the directory " - "\'ftp://ftp.pwg.org/pub/pwg/general/process\' in the file " - "\'pwg-cim-references-format-20060309.txt\'. An example for a " - "MappingStrings reference to a PWG Standard is " - "\'PWG5101-1.PWG|Section 4 Media Color Names\'. An example for " - "a MappingStrings reference to a PWG MIB is " - "\'MIB.PWG|PWG-IMAGING-COUNTER-MIB.icMonitorCompletedJobs\'." )] -class CIM_PrintJob : CIM_Job { - - [Key, Description ( - "The CreationClassName of the scoping System." ), - MaxLen ( 256 ), - Propagated ( "CIM_PrintQueue.SystemCreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The Name of the scoping System." ), - MaxLen ( 256 ), - MappingStrings { "MIB.IETF|SNMPv2-MIB.sysName" }, - Propagated ( "CIM_PrintQueue.SystemName" )] - string SystemName; - - [Key, Description ( - "The CreationClassName of the scoping Queue." ), - MaxLen ( 256 ), - Propagated ( "CIM_PrintQueue.CreationClassName" )] - string QueueCreationClassName; - - [Key, Description ( "The Name of the scoping Queue." ), - MaxLen ( 256 ), - MappingStrings { - "MIB.IETF|Job-Monitoring-MIB.jmGeneralJobSetName", - "MIB.IETF|Job-Monitoring-MIB.queueNameRequested", - "RFC2911.IETF|Job.output-device-assigned" }, - Propagated ( "CIM_PrintQueue.Name" )] - string QueueName; - - [Override ( "JobStatus" ), - Description ( - "The inherited JobStatus is used to provide additional " - "information about the status of a PrintJob beyond that " - "enumerated by PrintJobStatus." ), - MappingStrings { "MIB.IETF|Job-Monitoring-MIB.jmJobState", - "MIB.IETF|Job-Monitoring-MIB.jmJobStateReasons1", - "RFC2911.IETF|Job.job-state", - "RFC2911.IETF|Job.job-state-reasons", - "RFC2911.IETF|Job.job-state-message" }, - ModelCorrespondence { "CIM_PrintJob.PrintJobStatus" }] - string JobStatus; - - [Key, Description ( - "Uniquely identifies this Job within its scoping Queue, " - "but NOT across different Queues or PrintServices." ), - MappingStrings { "MIB.IETF|Job-Monitoring-MIB.jmJobIndex", - "MIB.IETF|Job-Monitoring-MIB.jmJobSubmissionID", - "RFC2911.IETF|Job.job-id" }] - string JobID; - - [Deprecated { "No Value" }, - Description ( - "Note: The use of this free-form string property is " - "deprecated in lieu of the more semantically rich " - "CIM_JobSettingData class inherited from CIM_Job." )] - string SchedulingInformation; - - [Description ( - "Specifies the size of the PrintJob (as a byte stream) in " - "units of Kbytes." ), - Units ( "KiloBytes" ), - MappingStrings { - "MIB.IETF|Job-Monitoring-MIB.jmJobKOctetsProcessed", - "RFC2911.IETF|Job.job-k-octets" }, - ModelCorrespondence { "CIM_Printer.MaxSizeSupported", - "CIM_PrintQueue.MaxJobSize" }, - PUnit ( "byte * 10^3" )] - uint32 JobSize; - - [Description ( - "Specifies the print language that is used by this Job." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "14", "15", "16", "17", "18", "19", - "20", "21", "22", "23", "24", "25", "26", "27", "28", - "29", "30", "31", "32", "33", "34", "35", "36", "37", - "38", "39", "40", "41", "42", "43", "44", "45", "46", - "47", "48", "50", "51", "52", "53", "54", "55", "56", - "57", "58", "59", "60", "61", "62", "63", "64", "65", - "66", "67" }, - Values { "Other", "Unknown", "PCL", "HPGL", "PJL", "PS", - "PSPrinter", "IPDS", "PPDS", // 10 - "EscapeP", - "Epson", "DDIF", "Interpress", "ISO6429", "Line Data", - "MODCA", "REGIS", "SCS", "SPDL", - // 20 - "TEK4014", "PDS", "IGP", "CodeV", - "DSCDSE", "WPS", "LN03", "CCITT", "QUIC", "CPAP", - // 30 - "DecPPL", "Simple Text", "NPAP", "DOC", - "imPress", "Pinwriter", "NPDL", "NEC201PL", "Automatic", - "Pages", // 40 - "LIPS", "TIFF", "Diagnostic", - "CaPSL", "EXCL", "LCDS", "XES", "MIME", "TIPSI", - // 50 - "Prescribe", "LinePrinter", "IDP", "XJCL", - "PDF", "RPDL", "IntermecIPL", "UBIFingerprint", - "UBIDirectProtocol", "Fujitsu", // 60 - "PCLXL", - "ART", "CGM", "JPEG", "CALS1", "CALS2", "NIRS", "C4" }, - MappingStrings { - "MIB.IETF|Printer-MIB.prtInterpreterLangFamily", - "MIB.IETF|IANA-PRINTER-MIB.PrtInterpreterLangFamilyTC", - "MIB.IETF|Job-Monitoring-MIB.documentFormat", - "PWG5100-7.PWG|Job.document-format-supplied" }, - ModelCorrespondence { "CIM_Printer.LanguagesSupported", - "CIM_PrintService.LanguagesSupported", - "CIM_PrintJob.MimeTypes" }] - uint16 Language; - - [Description ( - "Specifies the MIME types that are used by the PrintJob " - "if Language is set to indicate that a MIME type is in " - "use (value=47)." ), - ModelCorrespondence { "CIM_PrintJob.Language", - "CIM_Printer.MimeTypesSupported", - "CIM_PrintService.MimeTypesSupported" }] - string MimeTypes[]; - - [Description ( - "A string that specifies the type of paper that is " - "required by this PrintJob. The values of the property " - "SHOULD conform to the requirements of the PWG Media " - "Standardized Names specification [PWG5101.1], which " - "defines the normative values for this property. See " - "older Appendix B \'Media Size Names\' and Appendix C " - "\'Media Names\' of IETF Printer MIB v2 [RFC3805] which " - "list the values of standardized media names defined in " - "ISO DPA [ISO10175]." ), - MappingStrings { "PWG5101-1.PWG|Media Standardized Names", - "MIB.IETF|Job-Monitoring-MIB.mediumRequested", - "RFC2911.IETF|Job.media" }, - ModelCorrespondence { "CIM_Printer.PaperTypesAvailable", - "CIM_PrintService.PaperTypesAvailable" }] - string RequiredPaperType; - - [Description ( - "An array of integers that indicates the type of " - "finishing that is required by this Job. It is equivalent " - "to the Capabilities property that is provided by the " - "Printer." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21" }, - Values { "Unknown", "Other", "Color Printing", - "Duplex Printing", "Copies", "Collation", "Stapling", - "Transparency Printing", "Punch", "Cover", "Bind", - "Black and White Printing", "One Sided", - "Two Sided Long Edge", "Two Sided Short Edge", "Portrait", - "Landscape", "Reverse Portrait", "Reverse Landscape", - "Quality High", "Quality Normal", "Quality Low" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_Printer.Capabilities", - "CIM_PrintService.Capabilities" }] - uint16 Finishing[]; - - [Description ( - "The number of physical copies of the output that will be " - "produced from this Job." ), - MappingStrings { - "MIB.IETF|Job-Monitoring-MIB.jobCopiesRequested", - "RFC2911.IETF|Job.copies" }, - ModelCorrespondence { "CIM_Printer.MaxCopies" }] - uint32 Copies; - - [Description ( - "The resolution of the in Pixels per Inch for the Job in " - "the cross-feed direction, i.e., short-edge in portrait " - "feed mode." ), - Units ( "Pixels per Inch" ), - MappingStrings { - "MIB.IETF|Job-Monitoring-MIB.printerResolutionRequested", - "RFC2911.IETF|Job.printer-resolution" }, - ModelCorrespondence { "CIM_Printer.HorizontalResolution" }, - PUnit ( "pixel / inch" )] - uint32 HorizontalResolution; - - [Description ( - "The resolution in Pixels per Inch for the Job in the " - "feed direction, i.e., long-edge in portrait feed mode." ), - Units ( "Pixels per Inch" ), - MappingStrings { - "MIB.IETF|Job-Monitoring-MIB.printerResolutionRequested", - "RFC2911.IETF|Job.printer-resolution" }, - ModelCorrespondence { "CIM_Printer.VerticalResolution" }, - PUnit ( "pixel / inch" )] - uint32 VerticalResolution; - - [Description ( - "Specifies the character set and encoding method that " - "should be used by the Printer for the management of this " - "Job. The strings should conform to the semantics and " - "syntax that are specified by section 4.1.2 (\"Charset " - "parameter\") in RFC 2046 (MIME Part 2) and contained in " - "the IANA character-set registry. Examples include " - "\"utf-8\", \"us-ascii\" and \"iso-8859-1\"." ), - MappingStrings { - "MIB.IETF|Job-Monitoring-MIB.jobCodedCharSet", - "MIB.IETF|IANA-CHARSET-MIB.IANACharset", - "RFC2911.IETF|Job.attributes-charset" }, - ModelCorrespondence { "CIM_Printer.CharSetsSupported" }] - string CharSet; - - [Description ( - "Identifies the language that should be used by the " - "Printer for the management of this Job. The specified " - "value should conform to RFC 1766. For example, \"en\" is " - "used for English." ), - MappingStrings { - "MIB.IETF|Job-Monitoring-MIB.jobNaturalLanguageTag", - "RFC2911.IETF|Job.attributes-natural-language" }, - ModelCorrespondence { "CIM_Printer.NaturalLanguagesSupported" }] - string NaturalLanguage; - - [Description ( - "The number of print-stream pages that should be rendered " - "onto a single media sheet when the Printer outputs this " - "PrintJob." ), - MappingStrings { "RFC2911.IETF|Job.number-up" }, - ModelCorrespondence { "CIM_Printer.MaxNumberUp" }] - uint32 NumberUp; - - [Description ( - "Describes the current state of this Job with respect to " - "the PrintQueue and the Printer. Additional information " - "can be specified in JobStatus." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7" }, - Values { "Other", "Unknown", "Pending", "Blocked", - "Complete", "Completed With Error", "Printing" }, - MappingStrings { "MIB.IETF|Job-Monitoring-MIB.jmJobState", - "RFC2911.IETF|Job.job-state" }, - ModelCorrespondence { "CIM_PrintJob.TimeCompleted", - "CIM_PrintJob.JobStatus" }] - uint16 PrintJobStatus; - - [Description ( - "The time when this Job was completed. This value is " - "valid only if the PrintJobStatus has been assigned to " - "\"Complete\" (value=5) or \"Completed With Error\" " - "(value=6)." ), - MappingStrings { - "MIB.IETF|Job-Monitoring-MIB.jobCompletionTime", - "RFC2911.IETF|Job.date-time-at-completed" }, - ModelCorrespondence { "CIM_PrintJob.PrintJobStatus" }] - datetime TimeCompleted; - - [Description ( - "Describes the job sheets that should be used when this " - "Job is output on the Printer." ), - MappingStrings { "RFC2911.IETF|Job.job-sheets" }, - ModelCorrespondence { "CIM_Printer.AvailableJobSheets" }] - string RequiredJobSheets[]; - - [Description ( - "Provides additional information, beyond Job Owner that " - "is inherited from CIM_Job, to identify the origins of " - "the PrintJob. This property could include information " - "such as the System, Application, or Process that created " - "the Job." ), - MappingStrings { - "MIB.IETF|Job-Monitoring-MIB.jobOriginatingHost", - "MIB.IETF|Job-Monitoring-MIB.submittingServerName", - "MIB.IETF|Job-Monitoring-MIB.submittingApplicationName", - "RFC2911.IETF|Job.job-originating-user-name" }] - string JobOrigination; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PrintJobFile.mof b/build/vendor/dmtf_mof/Device/CIM_PrintJobFile.mof deleted file mode 100644 index 8a259fbf..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PrintJobFile.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PrintJobFile -// ================================================================== - [Association, Aggregation, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Printing" ), - Description ( - "This association indicates which files are associated with a " - "PrintJob." )] -class CIM_PrintJobFile : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Description ( - "The PrintJob that is based on one or more Files." )] - CIM_PrintJob REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The Files that make up a PrintJob." )] - CIM_DataFile REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PrintQueue.mof b/build/vendor/dmtf_mof/Device/CIM_PrintQueue.mof deleted file mode 100644 index 0b3d1a0b..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PrintQueue.mof +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_PrintQueue -// ================================================================== - [Version ( "2.14.0" ), - UMLPackagePath ( "CIM::Device::Printing" ), - Description ( - "Capabilities and management of a Printer Queue. A PrintQueue " - "holds PrintJobs that are placed on the Queue by a Print " - "Service. Jobs can move from Queue to Queue. The ABNF for CIM " - "references to PWG Standards and MIBs is in the directory " - "\'ftp://ftp.pwg.org/pub/pwg/general/process\' in the file " - "\'pwg-cim-references-format-20060309.txt\'. An example for a " - "MappingStrings reference to a PWG Standard is " - "\'PWG5101-1.PWG|Section 4 Media Color Names\'. An example for " - "a MappingStrings reference to a PWG MIB is " - "\'MIB.PWG|PWG-IMAGING-COUNTER-MIB.icMonitorCompletedJobs\'." )] -class CIM_PrintQueue : CIM_JobDestination { - - [Deprecated { "CIM_EnabledLogicalElement.EnabledState" }, - Description ( - "Note: Both this property and QueueAccepting are " - "deprecated in lieu of EnabledState. \n" - "Deprecated description: Indicates that Jobs on the Queue " - "will be passed to a Printer. When false, a Job will " - "remain on the Queue and will not be passed to a Printer " - "for output. This property, coupled with the information " - "in QueueAccepting, aligns with various values of the " - "inherited EnabledState property: \n" - "- When both QueueEnabled and QueueAccepting are true, " - "then EnabledState is set to 2 (\"Enabled\") \n" - "- When both QueueEnabled and QueueAccepting are false, " - "then EnabledState is set to 3 (\"Disabled\") \n" - "- When QueueEnabled is true and QueueAccepting is false " - "(for instance, when the Queue outputs jobs to the " - "printer, but does not accept new jobs), then " - "EnabledState is set to 6 (\"Enabled but Offline\") \n" - "- When QueueEnabled is false and QueueAccepting is true " - "(for instance, when the Queue accepts print jobs but " - "does not send them to a printer), then EnabledState is " - "set to 8 (\"Deferred\")." )] - boolean QueueEnabled; - - [Deprecated { "CIM_EnabledLogicalElement.EnabledState" }, - Description ( - "Note: Both this property and QueueEnabled are deprecated " - "in lieu of EnabledState. \n" - "Deprecated description: When false, no PrintService can " - "place PrintJobs on the PrintQueue. The ability of an " - "individual PrintService to place a Job on the Queue can " - "be specified using the QueueAcceptingFromService " - "property in the QueueForPrint Service association. This " - "property, coupled with the information in QueueEnabled, " - "aligns with various values of the inherited EnabledState " - "property: \n" - "- When both QueueEnabled and QueueAccepting are true, " - "then EnabledState is set to 2 (\"Enabled\") \n" - "- When both QueueEnabled and QueueAccepting are false, " - "then EnabledState is set to 3 (\"Disabled\") \n" - "- When QueueEnabled is true and QueueAccepting is false " - "(for instance, when the Queue outputs jobs to the " - "printer, but does not accept new jobs), then " - "EnabledState is set to 6 (\"Enabled but Offline\") \n" - "- When QueueEnabled is false and QueueAccepting is true " - "(for instance, when the Queue accepts print jobs but " - "does not send them to a printer), then EnabledState is " - "set to 8 (\"Deferred\")." )] - boolean QueueAccepting; - - [Description ( "The current number of Jobs on the Queue." ), - Gauge, MappingStrings { - "MIB.IETF|Job-Monitoring-MIB.jmGeneralNumberOfActiveJobs", - "RFC2911.IETF|Printer.queued-job-count" }] - uint32 NumberOnQueue; - - [Description ( - "Gives Queue-specific status information, beyond the " - "ManagedSystemElement.Status property. This method can be " - "used to provide further qualification as to the status " - "of the Queue or to indicate a secondary condition (for " - "example, spool area is full)." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Other", "Unknown", "No Additional Status", - "QueueSpoolAreaFull" }, - MappingStrings { "RFC2911.IETF|Printer.printer-state-reasons" }] - uint16 QueueStatus; - - [Description ( - "Provides a textual explanation for the status of the " - "Queue. The settings of both QueueStatus and the Status " - "property that are inherited from ManagedSystemElement " - "can be described by QueueStatusInfo. For example, if " - "\"Stopping\" is the value that is assigned to Status, " - "then this property might contain an explanation as to " - "why the Queue is being stopped." ), - MappingStrings { "RFC2911.IETF|Printer.printer-state-message" }] - string QueueStatusInfo; - - [Description ( - "Specifies the largest possible Job (in terms of a single " - "byte stream) that can be submitted to this Queue. A " - "value of 0 indicates that no limit has been set. Units " - "are Kbytes." ), - Units ( "KiloBytes" ), - MappingStrings { - "RFC2911.IETF|Section 4.4.33 job-k-octets-supported" }, - ModelCorrespondence { "CIM_PrintJob.JobSize" }, - PUnit ( "byte * 10^3" )] - uint32 MaxJobSize; - - [Description ( - "Specifies the priority that will be assigned to a new " - "Job that is submitted to this Queue, if the Job does not " - "explicitly specify a priority. The range of valid " - "priorities and the interpretation of priorities can be " - "determined from the JobPriorityHigh and JobPriorityLow " - "properties." ), - MappingStrings { "RFC2911.IETF|Printer.job-priority-default" }, - ModelCorrespondence { "CIM_PrintQueue.JobPriorityHigh", - "CIM_PrintQueue.JobPriorityLow" }] - uint32 DefaultJobPriority; - - [Description ( - "Specifies the numeric value that is used to represent " - "the highest priority Jobs that are submitted to this " - "Queue. The range of numeric values for priority can be " - "inverted, for example, a high priority job is " - "represented by a low integer value. This value is " - "indicated by JobPriorityLow being greater than " - "JobPriorityHigh. If both values (PriorityLow and " - "PriorityHigh) are assigned to 0, then the Queue does not " - "support Job priorities. The values and usage of the " - "property SHOULD conform to the semantics of the " - "\'job-priority-supported\' attribute of the Printer " - "object defined in IPP/1.1 [RFC2911]." ), - MappingStrings { "RFC2911.IETF|Printer.job-priority-supported" }, - ModelCorrespondence { "CIM_PrintQueue.JobPriorityLow", - "CIM_Job.Priority" }] - uint32 JobPriorityHigh; - - [Description ( - "Specifies the numeric value that is used to represent " - "the lowest priority Jobs that are submitted to this " - "Queue. The range of numeric values for priority can be " - "inverted, for example, a low priority job is represented " - "by a high integer value. This value is indicated by " - "JobPriorityLow being greater than JobPriorityHigh. If " - "both values (PriorityLow and PriorityHigh) are assigned " - "to 0, then the Queue does not support Job priorities. " - "The values and usage of the property SHOULD conform to " - "the semantics of the \'job-priority-supported\' " - "attribute of the Printer object defined in IPP/1.1 " - "[RFC2911]." ), - MappingStrings { "RFC2911.IETF|Printer.job-priority-supported" }, - ModelCorrespondence { "CIM_PrintQueue.JobPriorityHigh", - "CIM_Job.Priority" }] - uint32 JobPriorityLow; - - [Description ( - "Specifies the job sheets that are supported by this " - "Queue. Typically the job sheets that are provided by a " - "Queue will be the union or aggregation of those provided " - "by all the Printers that it supports. However, a system " - "administrator can choose to restrict access to some job " - "sheets on a particular Queue. A Queue can also support " - "additional job sheets through the use of a filter that " - "adds a banner or some other page when a Job is taken " - "from the Queue." ), - MappingStrings { - "MIB.IETF|Printer-MIB.prtAuxiliarySheetStartupPage", - "MIB.IETF|Printer-MIB.prtAuxiliarySheetBannerPage", - "RFC2911.IETF|Printer.job-sheets-supported" }, - ModelCorrespondence { "CIM_PrintJob.RequiredJobSheets" }] - string AvailableJobSheets[]; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PrintSAP.mof b/build/vendor/dmtf_mof/Device/CIM_PrintSAP.mof deleted file mode 100644 index b925cdab..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PrintSAP.mof +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PrinterServicingJob -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::Printing" ), - Description ( - "This association indicates that a Printer is currently " - "servicing a particular PrintJob." )] -class CIM_PrinterServicingJob : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The destination Printer for a PrintJob." )] - CIM_Printer REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The PrintJob." )] - CIM_PrintJob REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_PrinterServicingQueue.mof b/build/vendor/dmtf_mof/Device/CIM_PrinterServicingQueue.mof deleted file mode 100644 index d070813e..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_PrinterServicingQueue.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PrinterServicingQueue -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Printing" ), - Description ( - "This association indicates that PrintJobs can be passed to a " - "Printer from a particular Queue." )] -class CIM_PrinterServicingQueue : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "A destination Printer for Jobs enqueued on the Dependent Queue." - )] - CIM_Printer REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "A Queue that is providing Jobs to the Printer." )] - CIM_PrintQueue REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_Processor.mof b/build/vendor/dmtf_mof/Device/CIM_Processor.mof deleted file mode 100644 index 5e58efb4..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_Processor.mof +++ /dev/null @@ -1,330 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.24.1" ), - UMLPackagePath ( "CIM::Device::Processor" ), - Description ( - "Capabilities and management of the Processor LogicalDevice." )] -class CIM_Processor : CIM_LogicalDevice { - - [Description ( - "A free-form string that describes the role of the " - "Processor, for example, \"Central Processor\" or \"Math " - "Processor\"." )] - string Role; - - [Description ( - "The Processor family type. For example, values include " - "\"Pentium(R) processor with MMX(TM) technology\" " - "(value=14) and \"68040\" (value=96)." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - // 11 - "11", "12", "13", "14", - "15", "16", "17", "18", "19", "20", "21", - // 24 - "24", "25", "26", "27", - "28", "29", "30", "31", "32", "33", "34", "35", "36", - "37", "38", "39", "40", "41", "42", "43", - // 48 - "48", "49", "50", "51", - "52", "53", "54", "55", "56", "57", "58", "59", "60", - // 64 - "64", "65", "66", "67", - "68", "69", // 80 - "80", "81", - "82", "83", "84", "85", "86", "87", "88", - // 96 - "96", "97", "98", - "99", "100", "101", - // 112 - "112", "120", "121", - "122", "128", "130", "131", "132", "133", "134", - // 135 - "135", "136", "137", "138", "139", "140", - "141", "142", "143", - // 144 - "144", "145", - "146", "147", "148", "149", "150", - // 160 - "160", "161", - "162", "163", "164", "165", "166", "167", "168", "169", - // 170 - "170", "171", "172", "173", "174", "175", - "176", "177", "178", "179", // 180 - "180", "181", - "182", "183", "184", "185", "186", "187", "188", "189", - // 190 - "190", "191", "192", - "193", "194", "195", "196", "197", "198", "199", - // 200 - "200", "201", "202", - "203", "204", "205", "206", // 210 - "210", "211", - "212", "213", "214", "215", "216", "217", "218", "219", - // 220 - "221", "222", "223", "224", - // 230 - "230", "231", "232", "233", "234", - "235", "236", "237", "238", "239", - // 250 - "250", "251", "254", - "255", "260", "261", "280", "281", - // 300 - "300", "301", "302", - "320", "350", "500", - // 65534 - "65534", "65535" }, - Values { "Other", "Unknown", "8086", "80286", "80386", - "80486", "8087", "80287", "80387", "80487", - // 11 - "Pentium(R) brand", - "Pentium(R) Pro", "Pentium(R) II", - "Pentium(R) processor with MMX(TM) technology", - "Celeron(TM)", "Pentium(R) II Xeon(TM)", "Pentium(R) III", - "M1 Family", "M2 Family", - "Intel(R) Celeron(R) M processor", - "Intel(R) Pentium(R) 4 HT processor", - // 24 - "K5 Family", - "K6 Family", "K6-2", "K6-3", - "AMD Athlon(TM) Processor Family", - "AMD(R) Duron(TM) Processor", "AMD29000 Family", - // 31 - "K6-2+", - "Power PC Family", "Power PC 601", "Power PC 603", - "Power PC 603+", "Power PC 604", "Power PC 620", - "Power PC X704", "Power PC 750", - "Intel(R) Core(TM) Duo processor", - "Intel(R) Core(TM) Duo mobile processor", - "Intel(R) Core(TM) Solo mobile processor", - "Intel(R) Atom(TM) processor", - // 48 - "Alpha Family", - "Alpha 21064", "Alpha 21066", "Alpha 21164", - "Alpha 21164PC", "Alpha 21164a", "Alpha 21264", - "Alpha 21364", - // 56 - "AMD Turion(TM) II Ultra Dual-Core Mobile M Processor Family", - "AMD Turion(TM) II Dual-Core Mobile M Processor Family", - "AMD Athlon(TM) II Dual-Core Mobile M Processor Family", - "AMD Opteron(TM) 6100 Series Processor", - "AMD Opteron(TM) 4100 Series Processor", - // 64 - "MIPS Family", - "MIPS R4000", "MIPS R4200", "MIPS R4400", "MIPS R4600", - "MIPS R10000", - // 80 - "SPARC Family", - "SuperSPARC", "microSPARC II", "microSPARC IIep", - "UltraSPARC", "UltraSPARC II", "UltraSPARC IIi", - "UltraSPARC III", "UltraSPARC IIIi", - // 96 - "68040", - "68xxx Family", "68000", "68010", "68020", "68030", - // 112 - "Hobbit Family", - "Crusoe(TM) TM5000 Family", "Crusoe(TM) TM3000 Family", - "Efficeon(TM) TM8000 Family", "Weitek", - "Itanium(TM) Processor", - "AMD Athlon(TM) 64 Processor Family", - "AMD Opteron(TM) Processor Family", - "AMD Sempron(TM) Processor Family", - "AMD Turion(TM) 64 Mobile Technology", - // 135 - "Dual-Core AMD Opteron(TM) Processor Family", - "AMD Athlon(TM) 64 X2 Dual-Core Processor Family", - "AMD Turion(TM) 64 X2 Mobile Technology", - "Quad-Core AMD Opteron(TM) Processor Family", - "Third-Generation AMD Opteron(TM) Processor Family", - "AMD Phenom(TM) FX Quad-Core Processor Family", - "AMD Phenom(TM) X4 Quad-Core Processor Family", - "AMD Phenom(TM) X2 Dual-Core Processor Family", - "AMD Athlon(TM) X2 Dual-Core Processor Family", - // 144 - "PA-RISC Family", - "PA-RISC 8500", "PA-RISC 8000", "PA-RISC 7300LC", - "PA-RISC 7200", "PA-RISC 7100LC", "PA-RISC 7100", - // 160 - "V30 Family", - // 161 - "Quad-Core Intel(R) Xeon(R) processor 3200 Series", - "Dual-Core Intel(R) Xeon(R) processor 3000 Series", - "Quad-Core Intel(R) Xeon(R) processor 5300 Series", - "Dual-Core Intel(R) Xeon(R) processor 5100 Series", - "Dual-Core Intel(R) Xeon(R) processor 5000 Series", - "Dual-Core Intel(R) Xeon(R) processor LV", - "Dual-Core Intel(R) Xeon(R) processor ULV", - "Dual-Core Intel(R) Xeon(R) processor 7100 Series", - "Quad-Core Intel(R) Xeon(R) processor 5400 Series", - "Quad-Core Intel(R) Xeon(R) processor", - "Dual-Core Intel(R) Xeon(R) processor 5200 Series", - "Dual-Core Intel(R) Xeon(R) processor 7200 Series", - "Quad-Core Intel(R) Xeon(R) processor 7300 Series", - "Quad-Core Intel(R) Xeon(R) processor 7400 Series", - "Multi-Core Intel(R) Xeon(R) processor 7400 Series", - // 176 - "Pentium(R) III Xeon(TM)", - "Pentium(R) III Processor with Intel(R) SpeedStep(TM) Technology", - "Pentium(R) 4", "Intel(R) Xeon(TM)", - // 180 - "AS400 Family", - "Intel(R) Xeon(TM) processor MP", - "AMD Athlon(TM) XP Family", "AMD Athlon(TM) MP Family", - "Intel(R) Itanium(R) 2", - "Intel(R) Pentium(R) M processor", - "Intel(R) Celeron(R) D processor", - "Intel(R) Pentium(R) D processor", - "Intel(R) Pentium(R) Processor Extreme Edition", - "Intel(R) Core(TM) Solo Processor", - // 190 - "K7", - "Intel(R) Core(TM)2 Duo Processor", - "Intel(R) Core(TM)2 Solo processor", - "Intel(R) Core(TM)2 Extreme processor", - "Intel(R) Core(TM)2 Quad processor", - "Intel(R) Core(TM)2 Extreme mobile processor", - "Intel(R) Core(TM)2 Duo mobile processor", - "Intel(R) Core(TM)2 Solo mobile processor", - "Intel(R) Core(TM) i7 processor", - "Dual-Core Intel(R) Celeron(R) Processor", - // 200 - "S/390 and zSeries Family", - "ESA/390 G4", "ESA/390 G5", "ESA/390 G6", - "z/Architectur base", - // 205 - "Intel(R) Core(TM) i5 processor", - "Intel(R) Core(TM) i3 processor", - // 210 - "VIA C7(TM)-M Processor Family", - "VIA C7(TM)-D Processor Family", - "VIA C7(TM) Processor Family", - "VIA Eden(TM) Processor Family", - "Multi-Core Intel(R) Xeon(R) processor", - "Dual-Core Intel(R) Xeon(R) processor 3xxx Series", - "Quad-Core Intel(R) Xeon(R) processor 3xxx Series", - "VIA Nano(TM) Processor Family", - "Dual-Core Intel(R) Xeon(R) processor 5xxx Series", - "Quad-Core Intel(R) Xeon(R) processor 5xxx Series", - // 221 - "Dual-Core Intel(R) Xeon(R) processor 7xxx Series", - "Quad-Core Intel(R) Xeon(R) processor 7xxx Series", - "Multi-Core Intel(R) Xeon(R) processor 7xxx Series", - "Multi-Core Intel(R) Xeon(R) processor 3400 Series", - // 230 - "Embedded AMD Opteron(TM) Quad-Core Processor Family", - "AMD Phenom(TM) Triple-Core Processor Family", - "AMD Turion(TM) Ultra Dual-Core Mobile Processor Family", - "AMD Turion(TM) Dual-Core Mobile Processor Family", - "AMD Athlon(TM) Dual-Core Processor Family", - "AMD Sempron(TM) SI Processor Family", - "AMD Phenom(TM) II Processor Family", - "AMD Athlon(TM) II Processor Family", - "Six-Core AMD Opteron(TM) Processor Family", - "AMD Sempron(TM) M Processor Family", - // 250 - "i860", "i960", - "Reserved (SMBIOS Extension)", - "Reserved (Un-initialized Flash Content - Lo)", "SH-3", - "SH-4", "ARM", "StrongARM", - // 300 - "6x86", "MediaGX", - "MII", "WinChip", "DSP", "Video Processor", - // 65534 - "Reserved (For Future Special Purpose Assignment)", - "Reserved (Un-initialized Flash Content - Hi)" }, - MappingStrings { "MIF.DMTF|Processor|017.3" }, - ModelCorrespondence { "CIM_Processor.OtherFamilyDescription" }] - uint16 Family; - - [Description ( - "A string that describes the Processor Family type. It is " - "used when the Family property is set to 1 (\"Other\"). " - "This string should be set to NULL when the Family " - "property is any value other than 1." ), - MaxLen ( 64 ), - ModelCorrespondence { "CIM_Processor.Family" }] - string OtherFamilyDescription; - - [Description ( - "CPU socket information that includes data on how this " - "Processor can be upgraded (if upgrades are supported). " - "This property is an integer enumeration." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "14", "15", "16", "17", "18", "19", - "20", "21", "22", "23", "24", "25", "26", "27", "28", - "29", "30", "31", "32" }, - Values { "Other", "Unknown", "Daughter Board", "ZIF Socket", - "Replacement/Piggy Back", "None", "LIF Socket", "Slot 1", - "Slot 2", "370 Pin Socket", "Slot A", "Slot M", - "Socket 423", "Socket A (Socket 462)", "Socket 478", - "Socket 754", "Socket 940", "Socket 939", - "Socket mPGA604", "Socket LGA771", "Socket LGA775", - "Socket S1", "Socket AM2", "Socket F (1207)", - "Socket LGA1366", "Socket G34", "Socket AM3", - "Socket C32", "Socket LGA1156", "Socket LGA1567", - "Socket PGA988A", "Socket BGA1288" }, - MappingStrings { "MIF.DMTF|Processor|017.7" }] - uint16 UpgradeMethod; - - [Description ( "The maximum speed (in MHz) of this Processor." ), - Units ( "MegaHertz" ), - MappingStrings { "MIF.DMTF|Processor|017.5" }, - PUnit ( "hertz * 10^6" )] - uint32 MaxClockSpeed; - - [Description ( "The current speed (in MHz) of this Processor." ), - Units ( "MegaHertz" ), - MappingStrings { "MIF.DMTF|Processor|017.6" }, - PUnit ( "hertz * 10^6" )] - uint32 CurrentClockSpeed; - - [Description ( "Processor data width in bits." ), - Units ( "Bits" ), - PUnit ( "bit" )] - uint16 DataWidth; - - [Description ( "Processor address width in bits." ), - Units ( "Bits" ), - PUnit ( "bit" )] - uint16 AddressWidth; - - [Description ( - "Loading of this Processor, averaged over the last " - "minute, in Percent." ), - Units ( "Percent" ), - Gauge, MappingStrings { - "MIB.IETF|HOST-RESOURCES-MIB.hrProcessorLoad" }, - PUnit ( "percent" )] - uint16 LoadPercentage; - - [Description ( - "Stepping is a free-form string that indicates the " - "revision level of the Processor within the " - "Processor.Family." ), - ModelCorrespondence { "CIM_Processor.Family" }] - string Stepping; - - [Description ( - "A globally unique identifier for the Processor. This " - "identifier can be unique only within a Processor Family." )] - string UniqueID; - - [Description ( - "The CPUStatus property that indicates the current status " - "of the Processor. For example, the Processor might be " - "disabled by the user (value=2), or disabled due to a " - "POST error (value=3). Information in this property can " - "be obtained from SMBIOS, the Type 4 structure, and the " - "Status attribute." ), - ValueMap { "0", "1", "2", "3", "4", "7" }, - Values { "Unknown", "CPU Enabled", "CPU Disabled by User", - "CPU Disabled By BIOS (POST Error)", "CPU Is Idle", "Other" }] - uint16 CPUStatus; - - [Description ( - "The speed (in MHz) of the external bus interface (also " - "known as the front side bus)." ), - Units ( "MegaHertz" ), - PUnit ( "hertz * 10^6" )] - uint32 ExternalBusClockSpeed; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ProcessorCapabilities.mof b/build/vendor/dmtf_mof/Device/CIM_ProcessorCapabilities.mof deleted file mode 100644 index 6c59d631..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ProcessorCapabilities.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Device::Processor" ), - Description ( - "ProcessorCapabilities inherits the capabilities of " - "EnabledLogicalElementCapabilities and adds properties " - "describing processor core and hardware thread support." )] -class CIM_ProcessorCapabilities : CIM_EnabledLogicalElementCapabilities { - - [Description ( - "Number of processor cores available for processor. This " - "number would not include cores disabled by hardware and " - "may be obtained from SMBIOS 2.5 Type 4 offset 23h." )] - uint16 NumberOfProcessorCores; - - [Description ( - "Number of hardware threads available for the processor. " - "May be obtained from SMBIOS v2.5 4 offset 25h." )] - uint16 NumberOfHardwareThreads; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ProcessorCore.mof b/build/vendor/dmtf_mof/Device/CIM_ProcessorCore.mof deleted file mode 100644 index ab71b7c0..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ProcessorCore.mof +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.122.0" ), - UMLPackagePath ( "CIM::Device::Processor" ), - Description ( - "The CIM_ProcessorCore class inherits from " - "CIM_EnabledLogicalElement and describes a specific processor " - "core. CIM_ProcessorCore instances are related to the instance " - "of CIM_Processor that represents the processor they are " - "contained in." )] -class CIM_ProcessorCore : CIM_EnabledLogicalElement { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. \n" - "In order to ensure uniqueness within the NameSpace, the " - "value of InstanceID SHOULD be constructed using the " - "following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon " - "\':\', and where MUST include a copyrighted, " - "trademarked or otherwise unique name that is owned by " - "the business entity creating/defining the InstanceID, or " - "is a registered ID that is assigned to the business " - "entity by a recognized global authority (This is similar " - "to the _ structure of Schema " - "class names.) In addition, to ensure uniqueness " - "MUST NOT contain a colon (\':\'). When using this " - "algorithm, the first colon to appear in InstanceID MUST " - "appear between and . \n" - " is chosen by the business entity and SHOULD " - "not be re-used to identify different underlying " - "(real-world) elements. If the above \'preferred\' " - "algorithm is not used, the defining entity MUST assure " - "that the resultant InstanceID is not re-used across any " - "InstanceIDs produced by this or other providers for this " - "instance\'s NameSpace. \n" - "For DMTF defined instances, the \'preferred\' algorithm " - "MUST be used with the set to \'CIM\'." )] - string InstanceID; - - [Description ( - "The CoreEnabledState property is the configuration state " - "of the processor core. For example, the core might be " - "disabled by the user (value=2), or disabled due to a " - "POST error (value=3)." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "DMTF Reserved", "Core Enabled", - "Core Disabled", "Core Disabled by User", - "Core Disabled By POST Error)" }] - uint16 CoreEnabledState; - - [Description ( - "Loading of this processor core, averaged over the last " - "minute, in Percent." ), - Units ( "Percent" ), - Gauge, PUnit ( "percent" )] - uint16 LoadPercentage; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ProtectedExtentBasedOn.mof b/build/vendor/dmtf_mof/Device/CIM_ProtectedExtentBasedOn.mof deleted file mode 100644 index 5b7f06ee..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ProtectedExtentBasedOn.mof +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_ProtectedExtentBasedOn -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::StorageExtents" ), - Description ( - "Protected StorageExtents map to an underlying StorageExtent. " - "This mapping includes information about the placement of check " - "data on the underlying extent. The mapping is made explicit in " - "this association." )] -class CIM_ProtectedExtentBasedOn : CIM_BasedOn { - - [Override ( "Antecedent" ), - Description ( "The underlying StorageExtent." )] - CIM_StorageExtent REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The Protected Space is built on this StorageExtent." )] - CIM_StorageExtent REF Dependent; - - [Override ( "StartingAddress" ), - Description ( - "The starting logical block address of the underlying " - "StorageExtent from which this protected StorageExtent is " - "derived. In SCC, this is equivalent to the START LBA_P " - "field in the Redundancy Group P_Extent Descriptor." ), - MappingStrings { "MIF.DMTF|Physical Extent|001.2" }] - uint64 StartingAddress; - - [Description ( - "The size of the protected space. Note that this is " - "limited by the Antecedent->NumberOfBlocks, but is " - "included explicitly to provide for the DMTF MIF mapping. " - "In SCC, this is equivalent to the NUMBER OF LBA_P(s) " - "field in the Redundancy Group P_Extent Descriptor." ), - MappingStrings { "MIF.DMTF|Physical Extent|001.3" }, - ModelCorrespondence { "CIM_StorageExtent.NumberOfBlocks" }] - uint64 NumberOfBlocks; - - [Description ( - "The block size of the protected space. Note that this is " - "limited by the Antecedent->BlockSize. In SCC, this is " - "equivalent to the NUMBER OF BYTES PER LBA_P field in the " - "Redundancy Group P_Extent Descriptor." ), - Units ( "Bytes" ), - MappingStrings { "MIF.DMTF|Physical Extent|001.4" }, - ModelCorrespondence { "CIM_StorageExtent.BlockSize" }, - PUnit ( "byte" )] - uint64 BlockSize; - - [Description ( - "Number of bytes of user data to skip before starting the " - "check data interleave." ), - Units ( "Bytes" ), - MappingStrings { "MIF.DMTF|Physical Extent|001.6" }, - PUnit ( "byte" )] - uint64 UnitsBeforeCheckDataInterleave; - - [Description ( - "Number of bytes to be reserved for check data." ), - Units ( "Bytes" ), - MappingStrings { "MIF.DMTF|Physical Extent|001.7" }, - PUnit ( "byte" )] - uint64 UnitsOfCheckData; - - [Description ( "Number of bytes to be reserved for user data." ), - Units ( "Bytes" ), - MappingStrings { "MIF.DMTF|Physical Extent|001.8" }, - PUnit ( "byte" )] - uint64 UnitsOfUserData; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ProtectedSpaceExtent.mof b/build/vendor/dmtf_mof/Device/CIM_ProtectedSpaceExtent.mof deleted file mode 100644 index cd35c883..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ProtectedSpaceExtent.mof +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_ProtectedSpaceExtent -// ================================================================== - [Deprecated { "CIM_ProtectedExtentBasedOn", - "CIM_CompositeExtentBasedOn" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::SccExtents" ), - Description ( - "Deprecated - use CIM_ProtectedExtentBasedOn or " - "CIM_CompositeExtentBasedOn instead. The information on check " - "and user data is better expressed in the association that " - "layers the storage, than in the extent itself. A " - "ProtectedSpaceExtent is used to model an SCC RAID " - "implementation. ProtectedSpaceExtent defines addressable " - "logical block addresses, treated as a single Extent, located " - "on one or more PhysicalExtents. ProtectedSpaceExtents exclude " - "any logical blocks mapped as check data and contain user data " - "stripe depth mapping information. An alternate possibility, if " - "automatic configuration is used, is to instantiate or extend " - "the AggregatePSExtent class." )] -class CIM_ProtectedSpaceExtent : CIM_StorageExtent { - - [Deprecated { "CIM_CompositeExtentBasedOn.BlockSize", - "CIM_ProtectedExtentBasedOn.BlockSize" }, - Override ( "BlockSize" ), - MappingStrings { "MIF.DMTF|Protected Space Extent|001.4" }] - uint64 BlockSize; - - [Deprecated { "CIM_CompositeExtentBasedOn.NumberOfBlocks", - "CIM_ProtectedExtentBasedOn.NumberOfBlocks" }, - Override ( "NumberOfBlocks" ), - Description ( - "The number of user data blocks contained in this Extent." ), - MappingStrings { "MIF.DMTF|Protected Space Extent|001.3" }] - uint64 NumberOfBlocks; - - [Deprecated { "CIM_CompositeExtentBasedOn.UserDataStripeDepth" }, - Description ( - "For a ProtectedSpaceExtent that is allocated to a Volume " - "Set (i.e. is named in a CIM_VolumeSetBasedOnPSExtent " - "association), this property is the number of user data " - "bytes placed on this ProtectedSpaceExtent before moving " - "on to the next ProtectedSpaceExtent in the VolumeSet. " - "Otherwise, this ProtectedSpaceExtent is considered to be " - "unallocated, and this property shall be set to zero " - "(0h.)" ), - Units ( "Bytes" ), - MappingStrings { "MIF.DMTF|Protected Space Extent|001.6" }, - PUnit ( "byte" )] - uint64 UserDataStripeDepth; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ProtocolController.mof b/build/vendor/dmtf_mof/Device/CIM_ProtocolController.mof deleted file mode 100644 index da042042..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ProtocolController.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ProtocolController -// ================================================================== - [Abstract, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::ProtocolController" ), - Description ( - "ProtocolController is a superclass for grouping controllers " - "that are used to control the operation and function of " - "sophisticated devices that instantiate a protocol such as " - "SCSI. Simpler \'bus\' and device controllers are modeled using " - "the CIM_Controller class." )] -class CIM_ProtocolController : CIM_LogicalDevice { - - [Description ( - "Maximum number of Units that can be controlled by or " - "accessed through this ProtocolController." )] - uint32 MaxUnitsControlled; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ProtocolControllerAccessesUnit.mof b/build/vendor/dmtf_mof/Device/CIM_ProtocolControllerAccessesUnit.mof deleted file mode 100644 index 61ac9fd7..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ProtocolControllerAccessesUnit.mof +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ProtocolControllerAccessesUnit -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::ProtocolController" ), - Description ( - "This association is used to define a relationship between a " - "protocol controllers and a Logical Unit (for example a Storage " - "Volume or Media Access Device) controlled by the controller. " - "This association is used instead of ProtocolControllerForUnit " - "to indicate a \'controlled through\' relationship rather than " - "a \'controlled by\' one. An example is SCSI where this " - "association is used to indicate a target/initiator " - "relationship." )] -class CIM_ProtocolControllerAccessesUnit : CIM_ProtocolControllerForDevice { - - [Override ( "Antecedent" ), - Description ( "The protocol controller." )] - CIM_ProtocolController REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The logical unit (eg StorageVolume)." )] - CIM_LogicalDevice REF Dependent; - - [Description ( - "The number of the dependent\'s target protocol " - "controller. As an example, in SCSI this is the Target " - "ID." )] - string TargetControllerNumber; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ProtocolControllerForDevice.mof b/build/vendor/dmtf_mof/Device/CIM_ProtocolControllerForDevice.mof deleted file mode 100644 index 5b387384..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ProtocolControllerForDevice.mof +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ProtocolControllerForDevice -// ================================================================== - [Association, Abstract, Version ( "2.8.1000" ), - UMLPackagePath ( "CIM::Device::ProtocolController" ), - Description ( - "This association indicates a subclass of LogicalDevice (for " - "example a Storage Volume) is connected through a specific " - "ProtocolController. In many situations (for example storage " - "LUN masking), there may be many of these associations used to " - "relate to different objects. Therefore subclasses have been " - "defined to optimize enumeration of the associations." )] -class CIM_ProtocolControllerForDevice : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The ProtocolController." )] - CIM_ProtocolController REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The controlled Device." )] - CIM_LogicalDevice REF Dependent; - - [Description ( - "Address of the associated Device in the context of the " - "Antecedent Controller." )] - string DeviceNumber; - - [Description ( - "This property describes the priority given to accesses " - "of the device through this Controller. The highest " - "priority path will have the lowest value for this " - "parameter." )] - uint16 AccessPriority; - - [Description ( - "The AccessState property describes the accessibility of " - "the LogicalDevice through the ProtocolController. \n" - "Unknown (0) indicates the instrumentation does not know " - "whether access is or is not functioning. \n" - "Active (2) indicates normal access. \n" - "Inactive (3) indicates the instrumentation knows this " - "path is not active, and one of the other values (below) " - "does not apply. \n" - "Replication in Progress (4) indicates that the path is " - "temporarily inactive due to a replication activity. \n" - "Mapping Inconsistency (5) indicates the instrumentation " - "has detected that this path is inactive due to an " - "inconsistency in the DeviceNumber/DeviceAccess " - "configuration." ), - ValueMap { "0", "2", "3", "4", "5" }, - Values { "Unknown", "Active", "Inactive", - "Replication In Progress", "Mapping Inconsistency" }] - uint16 AccessState; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ProtocolControllerForPort.mof b/build/vendor/dmtf_mof/Device/CIM_ProtocolControllerForPort.mof deleted file mode 100644 index e9e9de70..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ProtocolControllerForPort.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ProtocolControllerForPort -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::ProtocolController" ), - Description ( - "This association is used to define a relationship between a " - "ProtocolController and a LogicalPort. This subclass is " - "provided so that an enumeration of related controllers and " - "ports can be performed without retrieving any other " - "controllers or connected units." )] -class CIM_ProtocolControllerForPort : CIM_ProtocolControllerForDevice { - - [Override ( "Antecedent" ), - Description ( "The ProtocolController." )] - CIM_ProtocolController REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The LogicalPort \'behind\' the ProtocolController." )] - CIM_LogicalPort REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ProtocolControllerForUnit.mof b/build/vendor/dmtf_mof/Device/CIM_ProtocolControllerForUnit.mof deleted file mode 100644 index 51d27006..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ProtocolControllerForUnit.mof +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::ProtocolController" ), - Description ( - "This association is used to define a relationship between a " - "ProtocolController and an exposed Logical Unit (for example a " - "Storage Volume or a MediaAccessDevice such as a tape drive). " - "An example of the use of this association is SCSI, where it " - "link the target controller and Logical Units. This subclass is " - "provided so that an enumeration of related controllers and " - "units can be performed without retrieving any connected ports " - "or other controllers." )] -class CIM_ProtocolControllerForUnit : CIM_ProtocolControllerForDevice { - - [Override ( "Antecedent" ), - Description ( "The ProtocolController." )] - CIM_ProtocolController REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The logical unit (eg StorageVolume) \'behind\' the " - "ProtocolController." )] - CIM_LogicalDevice REF Dependent; - - [Description ( - "The access rights granted to the referenced logical unit " - "as exposed through referenced ProtocolController. The " - "\'No Access\' value is used in implementations where the " - "DeviceNumber is reserved, but no access is granted. \n" - "If the instrumentation exposes " - "PrivilegeManagementService, this property MUST be " - "synchronized with the Activities property of any " - "Privilege instances associated with StorageHardwareIDs " - "associated to the referenced ProtocolController and the " - "referenced LogicalDevice. In particular, when this " - "property is \'Read Write\', Privilege.Activities MUST " - "include entries for \'Read\' and \'Write\'. When this " - "property is \'Read-Only\', Privilege.Activities MUST " - "include an entry for \'Read\'. The corresponding entries " - "for Privilege.ActivityQualifiers MUST be \'CDB=*\' and " - "the corresponding entries for Privilege.QualifierFormat " - "MUST be \'SCSI Command\'." ), - ValueMap { "0", "2", "3", "4", "5..15999", "16000.." }, - Values { "Unknown", "Read Write", "Read-Only", "No Access", - "DMTF Reserved", "Vendor Reserved" }] - uint16 DeviceAccess; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ProtocolControllerMaskingCapabilities.mof b/build/vendor/dmtf_mof/Device/CIM_ProtocolControllerMaskingCapabilities.mof deleted file mode 100644 index 9705da1c..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ProtocolControllerMaskingCapabilities.mof +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::ProtocolController" ), - Description ( - "A subclass of Capabilities that defines the Masking-related " - "capabilities of a ProtocolController." )] -class CIM_ProtocolControllerMaskingCapabilities : CIM_Capabilities { - - [Description ( - "A list of the valid values for " - "StrorageHardwareID.IDType. iSCSI IDs MAY use one of " - "three iSCSI formats - iqn, eui, or naa. This three " - "letter format is the name prefix; so a single iSCSI type " - "is provided here, the prefix can be used to further " - "refine the format." ), - ValueMap { "1", "2", "3", "4", "5" }, - Values { "Other", "Port WWN", "Node WWN", "Host Name", - "iSCSI Name" }, - ArrayType ( "Indexed" )] - uint16 ValidHardwareIdTypes[]; - - [Description ( - "An array of strings describing types for valid " - "StorageHardwareID.IDType. Used when the " - "ValidHardwareIdTypes includes 1 (\"Other\")." ), - ArrayType ( "Indexed" )] - string OtherValidHardwareIDTypes[]; - - [Description ( - "An integer enumeration indicating the way that ports per " - "view (ProtocolController) are handled by the underlying " - "storage system." ), - ValueMap { "2", "3", "4" }, - Values { "One Port per View", "Multiple Ports per View", - "All Ports share the same View" }] - uint16 PortsPerView = 2; - - [Description ( - "Set to true if this storage system allows the client to " - "specify the DeviceNumber parameter when calling " - "ControllerConfigurationService.AttachDevice() or specify " - "the DeviceNumbers parameter when calling " - "ControllerConfigurationService.ExposePaths(). Set to " - "false if the implementation does not allow unit numbers " - "to vary for a ProtocolController. However, if set to " - "false and a Device is not the Dependent of a " - "ProtocolControllerForUnit association, the client MUST " - "provide a DeviceNumber parameter in " - "ControllerConfigurationService.AttachDevice or " - "ControllerConfigurationService.ExposePaths. If set to " - "false and the Device is already the Dependent of a " - "ProtocolControllerForUnit association, then the client " - "can omit the DeviceNumber parameter (or supply the same " - "value) in subsequent " - "ControllerConfigurationService.AttachDevice calls." )] - boolean ClientSelectableDeviceNumbers = true; - - [Description ( - "Set to true if this storage system supports the " - "AttachDevice method." )] - boolean AttachDeviceSupported; - - [Description ( - "Set to true if this storage system limits configurations " - "to a single subject hardware ID per view. Otherwise, " - "multiple hardware ID types can be used. The default is " - "FALSE, that multiple ID types MAY be used in a single " - "view." )] - boolean OneHardwareIDPerView = false; - - [Description ( - "When set to false, different ProtocolContollers attached " - "to a LogicalPort can expose the same unit numbers. If " - "true, then this storage system requires unique unit " - "numbers across all the ProtocolControllers connected to " - "a LogicalPort." )] - boolean UniqueUnitNumbersPerPort = false; - - [Description ( - "Set to true if this storage system allows a client to " - "create a Privilege instance with PrivilegeGranted set to " - "FALSE." )] - boolean PrivilegeDeniedSupported = false; - - [Description ( - "If true, this property indicates that a " - "Privilege/Identity pair MUST be specified when " - "CreateProtocolControllerWithPorts() is called. If false, " - "then the Privilege/Identity pair in " - "CreateProtocolControllerWithPorts() MUST NOT be set." )] - boolean ProtocolControllerRequiresAuthorizedIdentity = false; - - [Description ( - "If true, this property indicates that the Identity " - "parameter of CreateProtocolConntrollerWithPorts() MUST " - "contain a reference to a CIM_Collection (or subclass) or " - "to a CIM_Identity (or subclass). If ExposePathsSupported " - "is true, this property indicates the storage system " - "supports SystemSpecificCollections of " - "StorageHardwareIDs." )] - boolean ProtocolControllerSupportsCollections = false; - - [Description ( - "Set to true if this storage system supports the " - "ExposePaths and HidePaths methods." )] - boolean ExposePathsSupported; - - [Description ( - "Set to true if this storage system supports the " - "CreateProtocolControllerWithPorts method." )] - boolean CreateProtocolControllerSupported; - - [Description ( - "The maximum number of ProtocolCOntrollerForUnit " - "associations that can be associated with a single " - "LogicalDevice (for example, StorageVolume). Zero " - "indicates there is no limit." )] - uint16 MaximumMapCount = 0; - - [Description ( - "Set to true if the instumentation allows a client to " - "create a configuration where an SPC has no " - "LogicalDevices associated via " - "CIM_ProtocolControllerForUnit associations." )] - boolean SPCAllowsNoLUs = false; - - [Description ( - "Set to true if the instumentation allows a client to " - "create a configuration where an SPC has no target " - "SCSIProtocolEndpoints associated via " - "CIM_SAPAvailableForELement associations." )] - boolean SPCAllowsNoTargets = false; - - [Description ( - "Set to true if the instumentation allows a client to " - "create a configuration where an SPC has no " - "StorageHardwareIDs associated via " - "CIM_AuthorizedTarget/CIM_AuthorizedPrivilege/CIM_AuthorizedSubject." - )] - boolean SPCAllowsNoInitiators = false; - - [Description ( - "Set to true if it the instrumentation supports \'default " - "view\' SPCs that exposes logical units to all initiators " - "(so called \'promiscuous LUNs\'. Default view SPCs MUST " - "have be associated to a CIM_StorageHardwareID instance " - "with Name set to the null string. A target port MUST NOT " - "be associated with more a single default view SPC. If " - "PortsPerView is \'All Ports share the same View\', then " - "at most one default view SPC MAY be associated with the " - "target system. If SPCAllowsNoLUs is true, the " - "instrumentation MAY instantiate a static default view " - "instance or let the client create one as needed using " - "ExposePaths. For other values of PortsPerView, all " - "default view SPC MUST share the same null-Name " - "CIM_StorageHardwareID instance." ), - ModelCorrespondence { - "CIM_ProtocolControllerMaskingCapabilities.PortsPerView" }] - boolean SPCSupportsDefaultViews = true; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_QueueForPrintService.mof b/build/vendor/dmtf_mof/Device/CIM_QueueForPrintService.mof deleted file mode 100644 index 7593428f..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_QueueForPrintService.mof +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_QueueForwardsToPrintSAP -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Printing" ), - Description ( - "This association indicates that the Jobs from a PrintQueue can " - "be sent to the referenced PrintSAP, to be handled by the " - "backing PrintService of the SAP." )] -class CIM_QueueForwardsToPrintSAP : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The PrintSAP for the PrintService." )] - CIM_PrintSAP REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The PrintQueue that forwards Jobs to the SAP." )] - CIM_PrintQueue REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_RealizedOnSide.mof b/build/vendor/dmtf_mof/Device/CIM_RealizedOnSide.mof deleted file mode 100644 index c3d42a95..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_RealizedOnSide.mof +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RealizedOnSide -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageExtents" ), - Description ( - "Since removable PhysicalMedia can be dual-sided, there is the " - "possibility for StorageExtents to be realized on a single side " - "of the Media. This association is a specialization of the " - "RealizesExtent relationship, adding a Side property to express " - "the Media\'s orientation details." )] -class CIM_RealizedOnSide : CIM_RealizesExtent { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "The PhysicalMedia on which the Extent is realized." )] - CIM_PhysicalMedia REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The StorageExtent that is located on the Component." )] - CIM_StorageExtent REF Dependent; - - [Description ( - "An enumeration expressing on which \'Side\' the Extent " - "is realized. Since sides can be named by various schemes " - "(0/1 or A/B), both schemes are expressed in the Values " - "array of this property." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Side 0", "Side 1", "Side A", "Side B" }] - uint16 Side; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_RealizesAggregatePExtent.mof b/build/vendor/dmtf_mof/Device/CIM_RealizesAggregatePExtent.mof deleted file mode 100644 index 1ca86a03..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_RealizesAggregatePExtent.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RealizesAggregatePExtent -// ================================================================== - [Association, Deprecated { "CIM_RealizesExtent" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::SccExtents" ), - Description ( - "AggregatePExtents are realized on a PhysicalMedia. This is " - "described by RealizesAggregatePExtent. However, there is no " - "need for the specificity of this association. It is deprecated " - "in lieu of the generic RealizesExtent relationship." )] -class CIM_RealizesAggregatePExtent : CIM_RealizesExtent { - - [Deprecated { "CIM_RealizesExtent.Antecedent" }, - Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "The PhysicalMedia on which the Extent is realized." )] - CIM_PhysicalMedia REF Antecedent; - - [Deprecated { "CIM_RealizesExtent.Dependent" }, - Override ( "Dependent" ), - Description ( - "The AggregatePExtent that is located on the Media." )] - CIM_AggregatePExtent REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_RealizesDiskPartition.mof b/build/vendor/dmtf_mof/Device/CIM_RealizesDiskPartition.mof deleted file mode 100644 index 133b4e44..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_RealizesDiskPartition.mof +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RealizesDiskPartition -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageExtents" ), - Description ( - "DiskPartitions can be directly realized on a PhysicalMedia. " - "This is used to model the creation of Partitions on a raw SCSI " - "or IDE drive, using the fdisk (DOS and Unix) or pdisk (Unix) " - "command. The StartingAddress of the DiskPartition on the " - "PhysicalMedia is also specified as a property of this " - "relationship. An alternative is that Partitions can be BasedOn " - "StorageVolumes, such as a VolumeSet or a Volume exposed by a " - "hardware RAID cabinet. The latter relationship is modeled " - "using the DiskPartitionBasedOnVolume association." )] -class CIM_RealizesDiskPartition : CIM_RealizesExtent { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "The PhysicalMedia on which the Extent is realized." )] - CIM_PhysicalMedia REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The DiskPartition that is located on the Media." )] - CIM_DiskPartition REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_RealizesExtent.mof b/build/vendor/dmtf_mof/Device/CIM_RealizesExtent.mof deleted file mode 100644 index dfbe3ecd..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_RealizesExtent.mof +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RealizesExtent -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageExtents" ), - Description ( - "StorageExtents can be realized by PhysicalComponents. For " - "example, disks or tapes are realized by PhysicalMedia. Memory " - "is realized by PhysicalMemory. This relationship of Extents to " - "PhysicalComponents is made explicit by the RealizesExtent " - "association. In addition, the StartingAddress of the " - "StorageExtent on the Component is specified here." )] -class CIM_RealizesExtent : CIM_Realizes { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "The PhysicalComponent on which the Extent is realized." )] - CIM_PhysicalComponent REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The StorageExtent that is located on the Component." )] - CIM_StorageExtent REF Dependent; - - [Description ( - "The starting address on the PhysicalComponent where the " - "StorageExtent begins. Ending address of the " - "StorageExtent is determined using the NumberOfBlocks and " - "Block Size properties of the StorageExtent object." )] - uint64 StartingAddress; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_RealizesPExtent.mof b/build/vendor/dmtf_mof/Device/CIM_RealizesPExtent.mof deleted file mode 100644 index 3c19bede..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_RealizesPExtent.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RealizesPExtent -// ================================================================== - [Association, Deprecated { "CIM_RealizesExtent" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::SccExtents" ), - Description ( - "PhysicalExtents are realized on a PhysicalMedia. This is " - "described by RealizesPExtent. However, there is no need for " - "the specificity of this association. It is deprecated in lieu " - "of the generic RealizesExtent relationship." )] -class CIM_RealizesPExtent : CIM_RealizesExtent { - - [Deprecated { "CIM_RealizesExtent.Antecedent" }, - Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "The PhysicalMedia on which the Extent is realized." )] - CIM_PhysicalMedia REF Antecedent; - - [Deprecated { "CIM_RealizesExtent.Dependent" }, - Override ( "Dependent" ), - Description ( - "The PhysicalExtent that is located on the Media." )] - CIM_PhysicalExtent REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_RealizesTapePartition.mof b/build/vendor/dmtf_mof/Device/CIM_RealizesTapePartition.mof deleted file mode 100644 index cc5ba4ae..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_RealizesTapePartition.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RealizesTapePartition -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageExtents" ), - Description ( - "TapePartitions are realized on PhysicalTape. This relationship " - "is made explicit by the RealizesTapePartition association." )] -class CIM_RealizesTapePartition : CIM_RealizesExtent { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "The PhysicalTape on which the Partition is realized." )] - CIM_PhysicalTape REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The TapePartition that is located on the Media." )] - CIM_TapePartition REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_Refrigeration.mof b/build/vendor/dmtf_mof/Device/CIM_Refrigeration.mof deleted file mode 100644 index bdb15e1c..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_Refrigeration.mof +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Refrigeration -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::CoolingAndPower" ), - Description ( - "Capabilities and management of a Refrigeration CoolingDevice." )] -class CIM_Refrigeration : CIM_CoolingDevice { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_SCSIController.mof b/build/vendor/dmtf_mof/Device/CIM_SCSIController.mof deleted file mode 100644 index 7a634297..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_SCSIController.mof +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_SCSIController -// ================================================================== - [Deprecated { "CIM_SCSIProtocolController" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( - "Note: The use of this class is deprecated in lieu of " - "SCSIProtocolController. The latter reflects the protocol- " - "related issues of SCSI interfaces, because these are not bus " - "master-type Controllers.\" Deprecated description: " - "Capabilities and management of the SCSIController." )] -class CIM_SCSIController : CIM_Controller { - - [Deprecated { "No Value" }, - Description ( - "Note: The use of this method is deprecated. \n" - "Deprecated description: An integer enumeration that " - "indicates whether or not the SCSIController provides " - "redundancy or protection against device failures." ), - ValueMap { "1", "2", "3", "4", "5", "6" }, - Values { "Other", "Unknown", "Unprotected", "Protected", - "Protected through SCC (SCSI-3 Controller Command)", - "Protected through SCC-2 (SCSI-3 Controller Command)" }, - MappingStrings { "MIF.DMTF|Storage Controller|001.3" }] - uint16 ProtectionManagement; - - [Deprecated { "No Value" }, - Description ( - "Note: The use of this method is deprecated. \n" - "Deprecated description: Maximum data width (in bits) " - "supported by the SCSIController." ), - Units ( "Bits" ), - MappingStrings { "MIF.DMTF|Bus Port|004.7" }, - PUnit ( "bit" )] - uint32 MaxDataWidth; - - [Deprecated { "No Value" }, - Description ( - "Note: The use of this method is deprecated. \n" - "Deprecated description: Maximum transfer rate (in Bits " - "per Second) supported by the SCSIController." ), - Units ( "Bits per Second" ), - MappingStrings { "MIF.DMTF|Bus Port|004.8" }, - PUnit ( "bit / second" )] - uint64 MaxTransferRate; - - [Deprecated { "No Value" }, - Description ( - "Note: The use of this method is deprecated. \n" - "Deprecated description: Number of SCSIController " - "timeouts that have occurred since the TimeOfLastReset." ), - Counter] - uint32 ControllerTimeouts; - - [Deprecated { "No Value" }, - Description ( - "Note: The use of this method is deprecated. \n" - "Deprecated description: Signal capabilities that can be " - "supported by the SCSIController. For example, the " - "Controller can support \"Single Ended\" and " - "\"Differential\". In this case, the values 3 and 4 would " - "be written to the Signal Capabilities array." ), - ValueMap { "1", "2", "3", "4", "5", "6" }, - Values { "Other", "Unknown", "Single Ended", "Differential", - "Low Voltage Differential", "Optical" }, - ModelCorrespondence { "CIM_SCSIInterface.SCSISignal" }] - uint16 SignalCapabilities[]; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_SCSIInitiatorTargetLogicalUnitPath.mof b/build/vendor/dmtf_mof/Device/CIM_SCSIInitiatorTargetLogicalUnitPath.mof deleted file mode 100644 index 265c599b..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_SCSIInitiatorTargetLogicalUnitPath.mof +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::StorageDevices" ), - Description ( - "An association that models a host driver path to a SCSI " - "logical unit. Each permutation of initiator and target " - "ProtocolEndpoints and logical units is considered a separate " - "path. This class describes end-to-end path behavior such as " - "properties and operations commonly used in multipath " - "management." )] -class CIM_SCSIInitiatorTargetLogicalUnitPath { - - [Key, Description ( "An initiator endpoint." )] - CIM_SCSIProtocolEndpoint REF Initiator; - - [Key, Description ( "A target endpoint." )] - CIM_SCSIProtocolEndpoint REF Target; - - [Key, Description ( - "A subclass of LogicalDevice representing a SCSI Logical " - "Unit (such as StorageVolume or TapeDrive)." )] - CIM_LogicalDevice REF LogicalUnit; - - [Description ( - "The OS Device Name for this path. Only applicable if the " - "ExposedPathDeviceFiles property is true in the instance " - "of SCSIMultipathConfigurationCapabilities associated " - "with the LogicalDevice/RedundancySet this instance is a " - "member of." ), - MappingStrings { - "MP_API.SNIA|MP_PATH_LOGICAL_UNIT_PROPERTIES|deviceFileName" }] - string OSDeviceName; - - [Write, Description ( - "A value assigned by an administrator specifying a " - "preference to assign to a path. The drivers will " - "actively use all available paths with the highest " - "weight. This allows an administrator to assign a subset " - "of available paths for load balanced access and reserve " - "the others as backup paths. For symmetric access " - "devices, all paths are considered \'available\'. For " - "asymmetric access devices, all paths in active target " - "port groups are considered available." ), - MappingStrings { - "MP_API.SNIA|MP_PATH_LOGICAL_UNIT_PROPERTIES|weight" }] - uint32 AdministrativeWeight; - - [Write, Description ( - "The state of this path. Values are defined as follows: \n" - "Unknown - the path is unavailable,but the cause is not " - "known. \n" - "Active - The path is okay and active. \n" - "Passive - The path is okay, but is associated with a " - "target port of target port group in standby access " - "state. Only applies to devices with asymmetric access. \n" - "Disabled - The path is disabled by administrative " - "request (DisablePathLU). \n" - "Path Error - The path is unusable due to an error on " - "this path and no SCSI status was received. \n" - "Logical Unit Error - A SCSI status was received for an " - "I/O through this path indicating a logical unit error. \n" - "Reserved - The path is unavailable due to a SCSI " - "reservation. \n" - "Removed - The path is unavailable because the OS or " - "drivers marked the pathunusable. \n" - "Transitioning - the path is transitioning between two " - "valid states. \n" - "The only valid values a client can specify are Disabled " - "and Active. All other states are determined by the " - "underlying implementation; attempts to set them should " - "be given an error response." ), - ValueMap { "0", "2", "3", "4", "5", "6", "7", "8", "9" }, - Values { "Unknown", "Active", "Passive", "Disabled", - "Path Error", "Logical Unit Error", "Reserved", "Removed", - "Transitioning" }, - MappingStrings { - "MP_API.SNIA|MP_PATH_LOGICAL_UNIT_PROPERTIES|pathState" }] - uint32 State; - - [Description ( - "AdministrativeOverride allows an administrator to select " - "a single path, force all I/O to this path, and disables " - "load balancing. The steady-state value is \'No override " - "in effect\'. When an administrator sets an override for " - "a particular path, that path\'s AdministrativeOverride " - "is set to \'Overridding\' and all other paths to same " - "logical unit are assigned a value of \'Overridden\'. " - "This property is changed using the OverridePath method " - "in SCSIPathConfigurationService." ), - ValueMap { "2", "3", "4" }, - Values { "Overriding", "Overridden", "No override in effect" }, - MappingStrings { - "MP_API.SNIA|MP_MULTIPATH_LOGICAL_UNIT_PROPERTIES|overridePath" }, - ModelCorrespondence { - "CIM_SCSIPathConfigurationService.SetOverridePath" }] - uint16 AdministrativeOverride; - - [Description ( - "The SCSI Logical Unit Number. This is the unit number " - "with values below 16,384 used in management " - "applications. It is not the full SCSI SAM 8-byte logical " - "unit number structure. Using the terminology from the " - "T10 SCSI specifications, this is the LU number with a " - "value between 0 and 255 using the Peripheral device " - "addressing method with Bus Identifier zero or a LU " - "number between 0 and 16,383 using the Flat space (AKA " - "volume set) addressing method." ), - MaxValue ( 16383 ), - MappingStrings { - "MP_API.SNIA|MP_MULTIPATH_LOGICAL_UNIT_PROPERTIES|overridePathMP_API.SNIA|MP_CancelOverridePath", - "MP_API.SNIA|MP_SetOverridePath" }] - uint16 LogicalUnitNumber; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_SCSIInterface.mof b/build/vendor/dmtf_mof/Device/CIM_SCSIInterface.mof deleted file mode 100644 index c07e6e05..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_SCSIInterface.mof +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SCSIInterface -// ================================================================== - [Association, Deprecated { "CIM_ProtocolControllerAccessesUnit" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( - "Note: The use of this class is deprecated in lieu of " - "ProtocolControllerForUnit, because the SCSIController class " - "involved in this association is itself deprecated. The " - "protocol-related aspects of SCSI are better reflected in the " - "new classes and associations. \n" - "Deprecated description: SCSIInterface is a ControlledBy " - "relationship that indicates which Devices are accessed through " - "a SCSIController and describes the characteristics of this " - "access." )] -class CIM_SCSIInterface : CIM_ControlledBy { - - [Deprecated { "No Value" }, - Override ( "Antecedent" ), - Description ( - "Note: The use of this method is deprecated. \n" - "Deprecated description: The SCSIController." )] - CIM_SCSIController REF Antecedent; - - [Deprecated { "No Value" }, - Description ( - "Note: The use of this method is deprecated. \n" - "Deprecated description: Number of SCSI timeouts that " - "have occurred since the last hard or soft reset that is " - "related to the controlled Device. The time of last reset " - "is indicated in the TimeOfDeviceReset property, " - "inherited from the ControlledBy association." ), - Counter] - uint32 SCSITimeouts; - - [Deprecated { "No Value" }, - Description ( - "Note: The use of this method is deprecated. \n" - "Deprecated description: Number of SCSI retries that have " - "occurred since the last hard or soft reset that is " - "related to the controlled Device. The time of last reset " - "is indicated in the TimeOfDeviceReset property, " - "inherited from the ControlledBy association." ), - Counter, MappingStrings { - "MIF.DMTF|Mass Storage Statistics|001.18" }] - uint32 SCSIRetries; - - [Deprecated { "No Value" }, - Description ( - "Note: The use of this method is deprecated. \n" - "Deprecated description: The SCSI Initiator ID." ), - MappingStrings { "MIF.DMTF|Bus Port|004.5" }] - uint32 InitiatorId; - - [Deprecated { - "CIM_ProtocolControllerAccessesUnit.TargetControllerNumber" }, - Description ( - "Note: The use of this method is deprecated. \n" - "Deprecated description: The SCSI Target ID." ), - MappingStrings { "MIF.DMTF|Bus Port|004.5" }] - uint32 TargetId; - - [Deprecated { "CIM_ProtocolControllerForDevice.DeviceNumber" }, - Description ( - "Note: The use of this method is deprecated. \n" - "Deprecated description: The SCSI Target LUN." ), - MappingStrings { "MIF.DMTF|Storage Devices|001.4" }] - uint64 TargetLUN; - - [Deprecated { "No Value" }, - Description ( - "Note: The use of this method is deprecated. \n" - "Deprecated description: SCSIReservation indicates the " - "type of SCSI reservation that currently exists between " - "the source and destination." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "None", "Simple", "Persistent" }] - uint16 SCSIReservation; - - [Deprecated { "No Value" }, - Description ( - "Note: The use of this method is deprecated. \n" - "Deprecated description: The SCSI signal characteristics " - "being used for this connection. The value listed here " - "must also be listed in the SignalCapabilities field of " - "the SCSIController." ), - ValueMap { "1", "2", "3", "4", "5", "6" }, - Values { "Other", "Unknown", "Single Ended", "Differential", - "Low Voltage Differential", "Optical" }, - MappingStrings { "MIF.DMTF|Bus Port|004.4" }, - ModelCorrespondence { "CIM_SCSIController.SignalCapabilities" }] - uint16 SCSISignal; - - [Deprecated { "No Value" }, - Description ( - "Note: The use of this method is deprecated. \n" - "Deprecated description: Maximum number of Command " - "Descriptor Blocks (CDBs) that can be supported by the " - "target. This data cannot be obtained under all " - "circumstances." )] - uint32 MaxQueueDepth; - - [Deprecated { "No Value" }, - Description ( - "Note: The use of this method is deprecated. \n" - "Deprecated description: The maximum number of concurrent " - "Command Descriptor Blocks (CDBs) that the initiator will " - "send to the target. This value should never be greater " - "than MaxQueueDepth." )] - uint32 QueueDepthLimit; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_SCSIProtocolController.mof b/build/vendor/dmtf_mof/Device/CIM_SCSIProtocolController.mof deleted file mode 100644 index 6eb0c05a..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_SCSIProtocolController.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.1000" ), - UMLPackagePath ( "CIM::Device::ProtocolController" ), - Description ( - "SCSIProtocolController is a type of ProtocolController, " - "managing a SCSI interface." )] -class CIM_SCSIProtocolController : CIM_ProtocolController { - - [Description ( - "The NameFormat property identifies how the Name of the " - "SCSIProtocolController is selected. \n" - "For Fibre Channel, the NameFormat is \'FC Port WWN\'. \n" - "For iSCSI, Name can use any of the 3 iSCSI formats (iqn, " - "eui, naa) which include the iSCSI format as as a prefix " - "in the name, so they are not ambiguous." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Other", "FC Port WWN", "iSCSI Name" }, - ModelCorrespondence { "CIM_SCSIProtocolController.Name", - "CIM_SCSIProtocolController.OtherNameFormat" }] - uint16 NameFormat; - - [Description ( - "A string describing how the ProtocolController is " - "identified when the NameFormat is \"Other\"." ), - ModelCorrespondence { "CIM_SCSIProtocolController.Name", - "CIM_SCSIProtocolController.NameFormat" }] - string OtherNameFormat; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_SDSLModem.mof b/build/vendor/dmtf_mof/Device/CIM_SDSLModem.mof deleted file mode 100644 index a113f743..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_SDSLModem.mof +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SDSLModem -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::Modems" ), - Description ( - "The SDSLModem class represents Modems of the DSL type = SDSL, " - "Symmetric Digital Subscriber Line. Properties will be defined " - "in a future release of the model." )] -class CIM_SDSLModem : CIM_DSLModem { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_SSAController.mof b/build/vendor/dmtf_mof/Device/CIM_SSAController.mof deleted file mode 100644 index 21fc0c44..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_SSAController.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SSAController -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( - "Capabilities and management of an SSAController (Serial " - "Storage Architecture)." )] -class CIM_SSAController : CIM_Controller { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_Scanner.mof b/build/vendor/dmtf_mof/Device/CIM_Scanner.mof deleted file mode 100644 index 5e37a969..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_Scanner.mof +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Scanner -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::UserDevices" ), - Description ( - "Capabilities and management of the Scanner LogicalDevice." )] -class CIM_Scanner : CIM_LogicalDevice { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_Sensor.mof b/build/vendor/dmtf_mof/Device/CIM_Sensor.mof deleted file mode 100644 index 5f7d76e3..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_Sensor.mof +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 2007 DMTF. All rights reserved. -// Make concreteAdd UmlPackagePath -// qualifier values to CIM Schema. -// Add enumerations -// to SensorType for "Power Consumption" and "Power Production" -// as well as the reserved enumerations that were missing. -// Add PUnit qualifier values -// to Units qualifier values. -// change description. -// add Pressure to SensorType -// ================================================================== -// CIM_Sensor -// ================================================================== - [Version ( "2.16.0" ), - UMLPackagePath ( "CIM::Device::Sensors" ), - Description ( - "A Sensor is an entity capable of measuring or reporting the " - "characteristics of some physical property - for example, the " - "temperature or voltage characteristics of a Computer System." )] -class CIM_Sensor : CIM_LogicalDevice { - - [Description ( - "The Type of the Sensor, e.g. Voltage or Temperature " - "Sensor. If the type is set to \"Other\", then the " - "OtherSensorType Description can be used to further " - "identify the type, or if the Sensor has numeric " - "readings, then the type of the Sensor can be implicitly " - "determined by the Units. A description of the different " - "Sensor types is as follows: A Temperature Sensor " - "measures the environmental temperature. Voltage and " - "Current Sensors measure electrical voltage and current " - "readings. A Tachometer measures speed/revolutions of a " - "Device. For example, a Fan Device can have an associated " - "Tachometer which measures its speed. A Counter is a " - "general purpose Sensor that measures some numerical " - "property of a Device. A Counter value can be cleared, " - "but it never decreases. A Switch Sensor has states like " - "Open/Close, On/Off, or Up/Down. A Lock has states of " - "Locked/Unlocked. Humidity, Smoke Detection and Air Flow " - "Sensors measure the equivalent environmental " - "characteristics. A Presence Sensor detects the presence " - "of a PhysicalElement. A Power Consumption Sensor " - "measures the instantaneous power consumed by a managed " - "element. A Power Production Sensor measures the " - "instantaneous power produced by a managed element such " - "as a power supply or a voltage regulator. A pressure " - "sensor is used to report pressure." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "..", "32768..65535" }, - Values { "Unknown", "Other", "Temperature", "Voltage", - "Current", "Tachometer", "Counter", "Switch", "Lock", - "Humidity", "Smoke Detection", "Presence", "Air Flow", - "Power Consumption", "Power Production", "Pressure", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_Sensor.OtherSensorTypeDescription" }] - uint16 SensorType; - - [Description ( - "A string describing the Sensor type - used when the " - "SensorType property is set to \"Other\"." ), - MaxLen ( 128 ), - ModelCorrespondence { "CIM_Sensor.SensorType" }] - string OtherSensorTypeDescription; - - [Description ( - "PossibleStates enumerates the string outputs of the " - "Sensor. For example, a \"Switch\" Sensor may output the " - "states \"On\", or \"Off\". Another implementation of the " - "Switch may output the states \"Open\", and \"Close\". " - "Another example is a NumericSensor supporting " - "thresholds. This Sensor can report the states like " - "\"Normal\", \"Upper Fatal\", \"Lower Non-Critical\", " - "etc. A NumericSensor that does not publish readings and " - "thresholds, but stores this data internally, can still " - "report its states." ), - MaxLen ( 128 )] - string PossibleStates[]; - - [Description ( - "The current state indicated by the Sensor. This is " - "always one of the \"PossibleStates\"." ), - MaxLen ( 128 )] - string CurrentState; - - [Description ( - "The polling interval that the Sensor hardware or the " - "instrumentation uses to determine the current state of " - "the Sensor." ), - Units ( "NanoSeconds" ), - PUnit ( "second * 10^-9" )] - uint64 PollingInterval; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_SerialController.mof b/build/vendor/dmtf_mof/Device/CIM_SerialController.mof deleted file mode 100644 index d4392cf3..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_SerialController.mof +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_SerialController -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( - "Capabilities and management of the SerialController." )] -class CIM_SerialController : CIM_Controller { - - [Description ( - "The Capabilities property defines chip level " - "compatibility for the SerialController. Therefore, this " - "property describes the buffering and other capabilities " - "of the SerialController that might be inherent in the " - "chip hardware. The property is an enumerated integer." ), - ValueMap { "1", "2", "3", "4", "5", "6", "160", "161" }, - Values { "Other", "Unknown", "XT/AT Compatible", - "16450 Compatible", "16550 Compatible", - "16550A Compatible", - // 160 - "8251 Compatible", - "8251FIFO Compatible" }, - ArrayType ( "Indexed" ), - MappingStrings { "MIF.DMTF|Serial Ports|004.7" }, - ModelCorrespondence { - "CIM_SerialController.CapabilityDescriptions" }] - uint16 Capabilities[]; - - [Description ( - "An array of free-form strings that provides more " - "detailed explanations for any of the SerialController " - "features that are indicated in the Capabilities array. " - "Note, each entry of this array is related to the entry " - "in the Capabilities array that is located at the same " - "index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_SerialController.Capabilities" }] - string CapabilityDescriptions[]; - - [Description ( - "Maximum baud rate in Bits per Second that is supported " - "by the SerialController." ), - Units ( "Bits per Second" ), - MappingStrings { "MIF.DMTF|Serial Ports|004.6" }, - PUnit ( "bit / second" )] - uint32 MaxBaudRate; - - [Description ( - "An enumeration that indicates the operational security " - "for the Controller. For example, information that the " - "external interface of the Device is locked out (value=4) " - "or \"Boot Bypass\" (value=6) can be described using this " - "property." ), - ValueMap { "1", "2", "3", "4", "5", "6" }, - Values { "Other", "Unknown", "None", - "External Interface Locked Out", - "External Interface Enabled", "Boot Bypass" }, - MappingStrings { "MIF.DMTF|Serial Ports|004.9" }] - uint16 Security; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_SerialInterface.mof b/build/vendor/dmtf_mof/Device/CIM_SerialInterface.mof deleted file mode 100644 index c05c1ca7..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_SerialInterface.mof +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_SerialInterface -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( - "SerialInterface is a ControlledBy relationship that indicates " - "which Devices are accessed through the SerialController and " - "describes the characteristics of this access." )] -class CIM_SerialInterface : CIM_ControlledBy { - - [Override ( "Antecedent" ), - Description ( "The SerialController." )] - CIM_SerialController REF Antecedent; - - [Override ( "NegotiatedDataWidth" ), - Description ( - "For the SerialInterface, NegotiatedDataWidth is the " - "number of data bits to be transmitted, without stop bits " - "or parity." ), - Units ( "Bits" ), - PUnit ( "bit" )] - uint32 NegotiatedDataWidth; - - [Description ( "Number of stop bits to be transmitted." ), - Units ( "Bits" ), - PUnit ( "bit" )] - uint16 NumberOfStopBits; - - [Description ( - "Information on the parity setting for transmitted data. " - "No parity (value=1), even (value=2), or odd (value=3) " - "can be specified." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "None", "Even", "Odd" }] - uint16 ParityInfo; - - [Description ( - "An integer enumeration that indicates the flow control " - "(Xon-Xoff or RTS/CTS) for transmitted data." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Not Supported", "None", "XonXoff", - "RTS/CTS", "Both XonXoff and RTS/CTS" }] - uint16 FlowControlInfo; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_SharedDeviceManagementService.mof b/build/vendor/dmtf_mof/Device/CIM_SharedDeviceManagementService.mof deleted file mode 100644 index deff5cd8..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_SharedDeviceManagementService.mof +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Device::SCSI" ), - Description ( - "A class derived from Service that describes the ability to " - "control access to shared devices." )] -class CIM_SharedDeviceManagementService : CIM_Service { - - - [Description ( - "ShareDevice defines the ability to change the access of " - "a System to a shared LogicalDevice. If this method " - "completes successfully the value of CurrentAccess for " - "the instance of CIM_SharingDependency which references " - "the LogicalDevice will have the value of the " - "RequestedAccess parameter. If 4096 (0x1000) is returned, " - "then the task will take some time to complete, " - "ConcreteJob will be created, and its reference returned " - "in the output parameter Job." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11..4095", "4096", "4097..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", - "Can NOT complete within Timeout Period", "Failed", - "Invalid Parameter", "Unsupported Access", - "Invalid Device", "Invalid System", - "Use of Timeout Parameter Not Supported", "Busy", - "DMTF Reserved", - "Method Parameters Checked - Job Started", - "DMTF Reserved", "Vendor Reserved" }] - uint32 ShareDevice( - [IN, Description ( - "The desired access of the System to the shared Logical Device." - ), - ValueMap { "2", "3", "4", "5", "..", "32768..65535" }, - Values { "No Access", "Exclusive Access", - "Shared Read", "Shared Full", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { - "CIM_SharingDependency.CurrentAccess", - "CIM_DeviceSharingCapabilities.SupportedAccessModes" }] - uint16 RequestedAccess, - [IN, Description ( - "The LogicalDevice to change access to." )] - CIM_LogicalDevice REF Device, - [IN, Description ( - "The System whose access to the LogicalDevice the " - "change is requested for." )] - CIM_System REF System, - [IN, Description ( - "A timeout period that specifies the maximum amount " - "of time that the client is willing to wait for " - "access to the shared device to be granted before " - "the request should be abandoned. This value does " - "not directly correlate to a timeout for the method " - "invocation. That is, its possible for a job to be " - "started to process the request and the method to " - "return within the timeout period only to have the " - "operation aborted later when the timeout period " - "expires. The TimeoutPeriod shall be specified in " - "interval format. A value of 0 indicates that if " - "the requested access can not be granted " - "immediately the client does not wish to wait and " - "the request should fail. A null parameter " - "indicates that the client has no time requirements " - "for the request to be granted and wishes to wait " - "indefinitely for access to be granted. \n" - "If this property does not contain 0 or null and " - "the implementation doesn\'t support this " - "parameter, a return code of \'Use Of Timeout " - "Parameter Not Supported\' shall be returned." )] - datetime TimeoutPeriod, - [IN, Description ( - "This parameter is used by a client to indicate " - "that they wish the requested access to be granted " - "even if it requires forcibly revoking access " - "currently granted to another system. When the " - "value of this parameter is true, and a valid " - "TimeoutPeriod is specified, the implementation " - "shall wait for the duration specified by " - "TimeoutPeriod before forcibly modifying access. If " - "the access requested can be granted without " - "disruption prior to the TimeoutPeriod expiring, " - "the implementation should complete the request and " - "not wait for the expiration of the interval " - "specified by TimeoutPeriod." )] - boolean Force, - [IN ( false ), OUT, Description ( - "Reference to the job spawned if the operation " - "continues after the method returns. (may be null " - "if task completed)." )] - CIM_ConcreteJob REF Job); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_SharingDependency.mof b/build/vendor/dmtf_mof/Device/CIM_SharingDependency.mof deleted file mode 100644 index 5a589632..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_SharingDependency.mof +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Association, Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Device::SCSI" ), - Description ( - "In some configurations, a logical device may be shared among " - "multiple systems while only belonging to one. When modeling " - "this sharing relationship, one instance of LogicalDevice " - "exists to model the resource. This instance is associated with " - "the owning system via the SystemDevice association. An " - "additional instance of LogicalDevice will exist for each " - "system the device is shared with to represent the device in " - "the context of each System it is shared with. Each of these " - "instances is associated with a single instance of System via " - "an instance of the SystemDevice association. This is very " - "similar to the way that virtual devices are modeled. However, " - "there are additional semantics associated with shared devices " - "that need to be modeled, including the current access of a " - "sharing system to the shared device. The SharingDependency " - "association will be used to add support for modeling this " - "additional semantic. It is used to associate a LogicalDevice " - "instance in the sharing system to the LogicalDevice " - "representing the underlying shared resource." )] -class CIM_SharingDependency : CIM_HostedDependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The shared LogicalDevice." )] - CIM_LogicalDevice REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The LogicalDevice owned by the sharing System." )] - CIM_LogicalDevice REF Dependent; - - [Description ( - "CurrentAccess describes the current ability of the " - "System owning the Dependent LogicalDevice to access the " - "shared device. This property does not model whether or " - "not the referenced System is authorized to utilize the " - "shared resource. It is intended to model the current " - "sharing relationship the system has to the device. " - "Authorization for a user or service running within the " - "system would be modeled identical to if the resource was " - "owned exclusively by the system. However, the ability of " - "an authorized user to utilize a shared resource is " - "contingent on the System having access to the shared " - "resource. \n" - "Unknown (0) indicates that the current access of the " - "System to the shared resource is unknown \n" - "No Access (1) indicates that the System currently does " - "not have access to the shared resource \n" - "Exclusive Access (2) indicates that the System has " - "exclusive access to the shared resource. The resource is " - "effectively locked. Granting another System access to " - "the shared resource will cause this system to lose " - "access. \n" - "Shared Read (3) indicates that the System is accessing " - "the resource in a read only mode. Other Systems can have " - "concurrent access to the device of type \"Shared Read\" " - "or \"Shared Full\" \n" - "Shared Full (4) indicates that the System is accessing " - "the resource in read/write mode. Other Systems can have " - "concurrent access to the device of type \"Shared Read\" " - "or \"Shared Full\"." ), - ValueMap { "0", "1", "2", "3", "4", "5", "..", "32768..65535" }, - Values { "Unknown", "Other", "No Access", "Exclusive Access", - "Shared Read", "Shared Full", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { - "CIM_SharingDependency.OtherCurrentAccess", - "CIM_DeviceSharingCapabilities.SupportedAccessModes" }] - uint16 CurrentAccess; - - [Description ( - "A string value describing CurrentAccess when it has a " - "value of \"1 (Other)\"." ), - ModelCorrespondence { "CIM_SharingDependency.CurrentAccess" }] - string OtherCurrentAccess; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_Snapshot.mof b/build/vendor/dmtf_mof/Device/CIM_Snapshot.mof deleted file mode 100644 index d152cee5..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_Snapshot.mof +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Snapshot -// ================================================================== - [Deprecated { "No Value" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::SccExtents" ), - Description ( - "Deprecated. Snapshots are now modeled in a more abstrct way " - "using StorageExtent and StorageSynchronized. \n" - "The Snapshot class is an optional construct. It can be used to " - "represent an Extent that contains a full copy of another " - "Extent, or the changes to that Extent when performing a " - "delta-based (delta before or delta after) copy. \n" - "Snapshot\'s definition in CIM is not equivalent to the act of " - "creating a volume or file-based snapshot, or a point in time " - "copy. It is at a much lower level and represents the use of " - "storage to hold a copied image of an Extent, or to hold " - "changes to an Extent. Use of the Snapshot object when making a " - "full copy is only recommended if the purpose is to describe " - "the existence of a copy. (This use will be very infrequent.) " - "The problem with describing an Extent solely as a \'snapshot\' " - "is that when the snapshot/copy is broken, the object must be " - "destroyed. Typically, this object still holds valid data, and " - "would have to be reinstantiated. If the \'full copy\' object " - "is to be treated as a StorageVolume or more general Extent, " - "then it should be modeled as such from the beginning - i.e., " - "not as an instance of Snapshot but as an instance of a generic " - "StorageExtent or StorageVolume. In this case, the Synchronized " - "association would be used to describe that one StorageExtent " - "is synchronized with another. \n" - "When describing a delta-based snapshot/point in time copy, the " - "Snapshot object represents the store holding the before/after " - "image changes to the original Extent. For example, when doing " - "a \'delta before\' Snapshot, the resultant target would be " - "modeled as a StorageExtent that is BasedOn the original Extent " - "and the instance of Snapshot (that holds the changes to the " - "original Extent)." )] -class CIM_Snapshot : CIM_StorageExtent { - - [Deprecated { "CIM_Synchronized.SyncMaintained" }, - Description ( "True indicates that the snapshot is synced." )] - boolean IsSynced; - - [Deprecated { "CIM_Synchronized.WhenSynced" }, - Description ( - "The time stamp indicating when the sync occurred." )] - datetime SyncTime; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_SnapshotOfExtent.mof b/build/vendor/dmtf_mof/Device/CIM_SnapshotOfExtent.mof deleted file mode 100644 index df1f9483..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_SnapshotOfExtent.mof +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SnapshotOfExtent -// ================================================================== - [Association, Deprecated { "No Value" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::SccExtents" ), - Description ( - "Deprecated. Snapshots are now modeled in a more abstract way " - "using StorageExtent and CIM_StorageSynchronized. \n" - "SnapshotOfExtent is an association between an Extent and its " - "Snapshot. This relationship is made explicit in this " - "association." )] -class CIM_SnapshotOfExtent : CIM_Dependency { - - [Deprecated { "No Value" }, - Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The StorageExtent." )] - CIM_StorageExtent REF Antecedent; - - [Deprecated { "No Value" }, - Override ( "Dependent" ), - Description ( "The Snapshot." )] - CIM_Snapshot REF Dependent; - - [Deprecated { "CIM_StorageSynchronized.CopyType" }, - Description ( "The type of snapshot." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Other", "Unknown", "Copy", "Before Delta", - "After Delta" }] - uint16 SnapshotType; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_StatisticsCapabilities.mof b/build/vendor/dmtf_mof/Device/CIM_StatisticsCapabilities.mof deleted file mode 100644 index c7b2daa1..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_StatisticsCapabilities.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::StorageStatistics" ), - Description ( - "An instance of this class defines the specific support for the " - "metered elements and methods for retrieving that statistical " - "data from a StatisticsService." )] -class CIM_StatisticsCapabilities : CIM_Capabilities { - - [Description ( - "The list of element types for which statistical data is " - "available. This property may not be meaningful if the " - "StatisticsService these capabilities describe does not " - "support StatisticalData instances for different types of " - "elements." )] - uint16 ElementTypesSupported[]; - - [Description ( - "The synchronous mechanisms supported for retrieving " - "statistics and defining and modifying filters for " - "statistics retrieval." ), - ValueMap { "..", "0x8000.." }, - Values { "DMTF Reserved", "Vendor Specific" }] - uint16 SynchronousMethodsSupported[]; - - [Description ( - "The asychronous mechanisms supported for retrieving statistics." - ), - ValueMap { "..", "0x8000.." }, - Values { "DMTF Reserved", "Vendor Specific" }] - uint16 AsynchronousMethodsSupported[]; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_StatisticsService.mof b/build/vendor/dmtf_mof/Device/CIM_StatisticsService.mof deleted file mode 100644 index 3d9bb6c7..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_StatisticsService.mof +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::StorageStatistics" ), - Description ( - "This is a Service that provides methods for statistics " - "retrieval and BlockStatisticsManifest manipulation. The " - "methods of the service that are supported by the provider can " - "be determined from the SynchronousMethodsSupported and " - "AsynchronousMethodsSupported properties of the " - "StatisticsCapabilities associated to the service." )] -class CIM_StatisticsService : CIM_Service { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_StorageCapabilities.mof b/build/vendor/dmtf_mof/Device/CIM_StorageCapabilities.mof deleted file mode 100644 index d1c5ee1c..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_StorageCapabilities.mof +++ /dev/null @@ -1,306 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.11.0" ), - UMLPackagePath ( "CIM::Device::StorageServices" ), - Description ( - "A subclass of Capabilities that defines the Capabilities of a " - "StorageService or StoragePool. For example, an instance of " - "StorageCapabilities could be associated with either a " - "StorageConfigurationService or StoragePool by using " - "ElementCapabilities." )] -class CIM_StorageCapabilities : CIM_Capabilities { - - [Description ( - "Enumeration indicating the type of element to which this " - "StorageCapabilities applies." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7" }, - Values { "Unknown", "Reserved", "Any Type", "StorageVolume", - "StorageExtent", "StoragePool", - "StorageConfigurationService", "LogicalDisk" }] - uint16 ElementType; - - [Description ( - "Indicates whether or not the associated element supports " - "no single point of failure. Values are: FALSE = does not " - "support no single point of failure, and TRUE = supports " - "no single point of failure." ), - ModelCorrespondence { - "CIM_StorageCapabilities.NoSinglePointOfFailureDefault" }] - boolean NoSinglePointOfFailure; - - [Description ( - "Indicates the default value for the " - "NoSinglePointOfFailure property." ), - ModelCorrespondence { - "CIM_StorageCapabilities.NoSinglePointOfFailure" }] - boolean NoSinglePointOfFailureDefault; - - [Description ( - "DataRedundancyMax describes the maximum number of " - "complete copies of data that can be maintained. Examples " - "would be RAID 5 (where 1 copy is maintained) and RAID 1 " - "(where 2 or more copies are maintained). Possible values " - "are 1 to n. The default redundancy is specified using " - "DataRedundancyDefault, while the minimum is defined by " - "DataRedundancyMin." ), - MinValue ( 1 ), - ModelCorrespondence { - "CIM_StorageCapabilities.DataRedundancyMin", - "CIM_StorageCapabilities.DataRedundancyDefault" }] - uint16 DataRedundancyMax; - - [Description ( - "DataRedundancyMin describes the minimum number of " - "complete copies of data that can be maintained. Examples " - "would be RAID 5 where 1 copy is maintained and RAID 1 " - "where 2 or more copies are maintained). Possible values " - "are 1 to n. The default redundancy is specified using " - "DataRedundancyDefault, while the maximum is defined by " - "DataRedundancyMax." ), - MinValue ( 1 ), - ModelCorrespondence { - "CIM_StorageCapabilities.DataRedundancyMax", - "CIM_StorageCapabilities.DataRedundancyDefault" }] - uint16 DataRedundancyMin; - - [Description ( - "DataRedundancyDefault describes the default number of " - "complete copies of data that can be maintained. Examples " - "would be RAID 5 where 1 copy is maintained and RAID 1 " - "where 2 or more copies are maintained. Possible values " - "are 1 to n. The bounds for the redundancy (max and min) " - "are defined by DataRedundancyMax and DataRedundancyMin." ), - MinValue ( 1 ), - ModelCorrespondence { - "CIM_StorageCapabilities.DataRedundancyMax", - "CIM_StorageCapabilities.DataRedundancyMin" }] - uint16 DataRedundancyDefault; - - [Description ( - "PackageRedundancyMax describes the maximum number of " - "redundant packages that can be used. For example, in the " - "storage domain, package redundancy describes how many " - "disk spindles can fail without data loss including, at " - "most, one spare. An example would be RAID5 with a spare " - "disk which would have a PackageRedundancy of 2. Possible " - "values are 0 to n. The default redundancy is specified " - "using PackageRedundancyDefault, while the maximum is " - "defined by PackageRedundancyMax." ), - ModelCorrespondence { - "CIM_StorageCapabilities.PackageRedundancyMin", - "CIM_StorageCapabilities.PackageRedundancyDefault" }] - uint16 PackageRedundancyMax; - - [Description ( - "PackageRedundancyMin describes the minimum number of " - "redundant packages that can be used. For example, in the " - "storage domain, package redundancy describes how many " - "disk spindles can fail without data loss including, at " - "most, one spare. An example would be RAID5 with a spare " - "disk which would have a PackageRedundancy of 2. Possible " - "values are 0 to n. The default redundancy is specified " - "using PackageRedundancyDefault, while the minimum is " - "defined by PackageRedundancyMin." ), - ModelCorrespondence { - "CIM_StorageCapabilities.PackageRedundancyMax", - "CIM_StorageCapabilities.PackageRedundancyDefault" }] - uint16 PackageRedundancyMin; - - [Description ( - "PackageRedundancyDefault describes the default number of " - "redundant packages that will be used. For example, in " - "the storage domain, package redundancy describes how " - "many disk spindles can fail without data loss including, " - "at most, one spare. An example would be RAID5 with a " - "spare disk which would have a PackageRedundancy of 2. " - "Possible values are 0 to n. The bounds for redundancy " - "are specified using the properties, PackageRedundancyMax " - "and PackageRedundancyMin." ), - ModelCorrespondence { - "CIM_StorageCapabilities.PackageRedundancyMin", - "CIM_StorageCapabilities.PackageRedundancyMax" }] - uint16 PackageRedundancyDefault; - - [Description ( - "DeltaReservatioMax is a number between 1 (1%) and a 100 " - "(100%) that specifies the maximum amount of space " - "reserved in a replica for caching changes. For a " - "complete copy this would be 100%, but it can be lower in " - "some implementations. This parameter sets the upper " - "limit, while DeltaReservationMin sets the lower limit." ), - Units ( "Percentage" ), - MinValue ( 0 ), - MaxValue ( 100 ), - ModelCorrespondence { - "CIM_StorageCapabilities.DeltaReservationMin", - "CIM_StorageCapabilities.DeltaReservationDefault" }] - uint16 DeltaReservationMax; - - [Description ( - "DeltaReservationMin is a number between 1 (1%) and a 100 " - "(100%) that specifies the minimum amount of space that " - "should be reserved in a replica for caching changes. For " - "a complete copy this would be 100%, but it can be lower " - "in some implementations. This parameter sets the lower " - "limit, while DeltaReservationMax sets the upper limit." ), - Units ( "Percentage" ), - MinValue ( 0 ), - MaxValue ( 100 ), - ModelCorrespondence { - "CIM_StorageCapabilities.DeltaReservationMax", - "CIM_StorageCapabilities.DeltaReservationDefault" }] - uint16 DeltaReservationMin; - - [Description ( - "Delta reservation is a number between 1 (1%) and a 100 " - "(100%) that specifies how much space should be reserved " - "by default in a replica for caching changes. For a " - "complete copy this would be 100%, but it can be lower in " - "some implementations. This parameter sets the default " - "value, while DeletaReservationMax and DeltReservationMin " - "set the upper and lower bounds." ), - Units ( "Percentage" ), - MinValue ( 0 ), - MaxValue ( 100 ), - ModelCorrespondence { - "CIM_StorageCapabilities.DeltaReservationMax", - "CIM_StorageCapabilities.DeltaReservationMin" }] - uint16 DeltaReservationDefault; - - [Description ( - "Extent Stripe Length describes the number of underlying " - "StorageExtents across which data is striped in the " - "common striping-based storage organizations. This is " - "also known as the number of \'members\' or \'columns\'. \n" - "A NULL value for ExtentStripeLengthDefault indicates " - "that the system does not support configuration of " - "storage by specifying Stripe Length. \n" - "If Extent Stripe Length is supported, and this " - "Capabilities instance is associated with a pool that was " - "created with a range of QOS then " - "ExtentStripeLengthDefault represents the default value. " - "Other available values(such as min, max, and discrete " - "values) can be determined by using the " - "\'GetSupportedStripeLengths\' and " - "\'GetSupportedStripeLengthRange\' methods. \n" - "If Extent Stripe Length is supported and the pool was " - "created with a single specific QOS, representing a Raid " - "group, set, or rank, then this property represents the " - "current/fixed value for the pool, and Extent Stripe " - "Length is not supported in subsequent creation of " - "elements from this pool. Consequently, the " - "\'GetSupportedStripeLength\' methods cannot be used, and " - "in a StorageSetting instance used as a goal when " - "creating or modifying a child element of the pool, " - "ExtentStripeLengthGoal, ExtentStripeLengthMin, and " - "ExtentStripeLengthMax MUST be set to NULL." ), - MinValue ( 1 )] - uint16 ExtentStripeLengthDefault; - - [Description ( - "ParityLayout specifies whether a parity-based storage " - "organization is using rotated or non-rotated parity. If " - "this capabilities instance is associated with a pool " - "that was created with a range of QOS then " - "ParityLayoutDefault represents the default value. Other " - "available values can be determined by using the " - "\'GetSupportedParityLayouts\' method. If the pool was " - "created with a single specific QOS, representing a Raid " - "group, set, or rank, then this property represents the " - "current/fixed value for the pool, and ParityLayout is " - "not supported in subsequent creation of elements from " - "this pool. Consequently, the \'GetSupportedParityLayouts\' " - "method cannot be used, and the ParityLayoutGoal property " - "in StorageSetting instances used in child element " - "operations on this pool MUST be set to NULL. A NULL " - "value for ParityLayoutDefault indicates that the system " - "does not support configuration of storage by specifying " - "ParityLayout." ), - ValueMap { "2", "3" }, - Values { "Non-Rotated Parity", "Rotated Parity" }] - uint16 ParityLayoutDefault; - - [Description ( - "User Data Stripe Depth describes the number of bytes " - "forming a strip in common striping-based storage " - "organizations. The strip is defined as the size of the " - "portion of a stripe that lies on one extent. Thus, " - "ExtentStripeLength * UserDataStripeDepth will yield the " - "size of one stripe of user data. A NULL value for " - "UserDataStripeDepthDefault indicates that the system " - "does not support configuration of storage by specifying " - "Stripe Depth. \n" - "If User Data Stripe Depth is supported, and this " - "Capabilities instance is associated with a pool that was " - "created with a range of QOS then " - "UserDataStripeDepthDefault represents the default value. " - "Other available values(such as min, max, and discrete " - "values) can be determined by using the " - "\'GetSupportedStripeDepths\' and " - "\'GetSupportedStripeDepthRange\' methods. \n" - "If User Data Stripe Depth is supported and the pool was " - "created with a single specific QOS, representing a Raid " - "group, set, or rank, then this property represents the " - "current/fixed value for the pool, and User Data Stripe " - "Depth is not supported in subsequent creation of " - "elements from this pool. Consequently, the " - "\'GetSupportedStripeDepth\' methods cannot be used, and " - "in a StorageSetting instance used as a goal when " - "creating or modifying a child element of the pool, " - "UserDataStripeDepthGoal, UserDataStripeDepthMin, and " - "UserDataStripeDepthMax MUST be set to NULL." ), - Units ( "Bytes" ), - MinValue ( 1 )] - uint64 UserDataStripeDepthDefault; - - - [Description ( - "Method to create and populate a StorageSetting instance " - "from a StorageCapability instance. This removes the need " - "to populate default settings and other settings in the " - "context of each StorageCapabilities (which could be " - "numerous). If the underlying instrumentation supports " - "the StorageSettingWithHints subclass, then an instance " - "of that class will be created instead." ), - ValueMap { "0", "1", "2", "3", "4", "5", "..", "32768..65535" }, - Values { "Success", "Not Supported", "Unspecified Error", - "Timeout", "Failed", "Invalid Parameter", "DMTF Reserved", - "Vendor Specific" }] - uint32 CreateSetting( - [IN, Description ( - "If \'Default\' is passed for the CreateDefault " - "parameter, the Max, Goal, and Min setting " - "attributes are set to the Default values of the " - "parent StorageCapabilities when the instance is " - "created. \n" - "If set to \'Goal\' the new StorageSetting " - "attributes are set to the related attributes of " - "the parent StorageCapabilities, e.g. Min to Min, " - "Goal to Default, and Max to Max. \n" - "\n" - "This method maybe deprecated in lieu of intrinsics " - "once limitations in the CIM Operations are " - "addressed." ), - ValueMap { "2", "3" }, - Values { "Default", "Goal" }] - uint16 SettingType, - [IN ( false ), OUT, Description ( - "Reference to the created StorageSetting instance." )] - CIM_StorageSetting REF NewSetting); - - [Description ( - "For systems that support Parity-based storage " - "organizations for volume or pool creation, this method " - "can be used to the supported parity layouts." ), - ValueMap { "0", "1", "2" }, - Values { "Method completed OK", "Method not supported", - "Choice not aavailable for this capability" }] - uint32 GetSupportedParityLayouts( - [IN ( false ), OUT, Description ( - "List of supported Parity for a Volume/Pool " - "creation or modification." ), - ValueMap { "2", "3" }, - Values { "Non-Rotated Parity", "Rotated Parity" }, - ArrayType ( "Indexed" )] - uint16 ParityLayout[]); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_StorageConfigurationCapabilities.mof b/build/vendor/dmtf_mof/Device/CIM_StorageConfigurationCapabilities.mof deleted file mode 100644 index b9c9310d..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_StorageConfigurationCapabilities.mof +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_StorageConfigurationCapabilities -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::StorageServices" ), - Description ( - "A subclass of Capabilities that defines the Capabilities of a " - "StorageConfigurationService. An instance of " - "StorageConfigurationCapabilities is associated with a " - "StorageConfigurationService using ElementCapabilities." )] -class CIM_StorageConfigurationCapabilities : CIM_Capabilities { - - [Description ( - "Enumeration indicating what operations will be executed " - "as asynchronous jobs. If an operation is included in " - "both this and SupportedSynchronousActions then the " - "underlying implementation is indicating that it may or " - "may not create a job." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", "10" }, - Values { "Storage Pool Creation", "Storage Pool Deletion", - "Storage Pool Modification", "Storage Element Creation", - "Storage Element Return", "Storage Element Modification", - "Replica Creation", "Replica Modification", - "Replica Attachment" }, - ModelCorrespondence { - "CIM_StorageConfigurationCapabilities.SupportedSynchronousActions" }] - uint16 SupportedAsynchronousActions[]; - - [Description ( - "Enumeration indicating what operations will be executed " - "without the creation of a job. If an operation is " - "included in both this and SupportedAsynchronousActions " - "then the underlying instrumentation is indicating that " - "it may or may not create a job." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", "10" }, - Values { "Storage Pool Creation", "Storage Pool Deletion", - "Storage Pool Modification", "Storage Element Creation", - "Storage Element Return", "Storage Element Modification", - "Replica Creation", "Replica Modification", - "Replica Attachment" }, - ModelCorrespondence { - "CIM_StorageConfigurationCapabilities.SupportedAsynchronousActions" }] - uint16 SupportedSynchronousActions[]; - - [Description ( - "Enumeration indicating the type of storage elements that " - "are supported by the associated " - "StorageConfigurationService." ), - ValueMap { "2", "3", "..", "0x8000..0xFFFF" }, - Values { "StorageVolume", "StorageExtent", "DMTF Reserved", - "Vendor Specific" }, - ModelCorrespondence { - "CIM_StorageConfigurationService.CreateOrModifyElementFromStoragePool.ElementType" }] - uint16 SupportedStorageElementTypes[]; - - [Description ( - "Enumeration indicating features supported by the " - "StoragePool methods." ), - ValueMap { "2", "3", "4", "..", "0x8000..0xFFFF" }, - Values { "InExtents", "Single InPool", "Multiple InPools", - "DMTF Reserved", "Vendor Specific" }, - ModelCorrespondence { - "CIM_StorageConfigurationService.CreateOrModifyStoragePool.InPools", - "CIM_StorageConfigurationService.CreateOrModifyStoragePool.InExtents" }] - uint16 SupportedStoragePoolFeatures[]; - - [Description ( - "Enumeration indicating features supported by the Storage " - "Element methods." ), - ValueMap { "2", "3", "4", "5", "6", "7", "..", - "0x8000..0xFFFF" }, - Values { "StorageExtent Creation", "StorageVolume Creation", - "StorageExtent Modification", - "StorageVolume Modification", "Single InPool", - "Multiple InPools", "DMTF Reserved", "Vendor Specific" }, - ModelCorrespondence { - "CIM_StorageConfigurationService.CreateOrModifyElementFromStoragePool.ElementType", - "CIM_StorageConfigurationService.CreateOrModifyElementFromStoragePool.InPool" }] - uint16 SupportedStorageElementFeatures[]; - - [Description ( - "SupportedCopyTypes describes the replication " - "capabilities supported by the associated " - "StorageConfigurationServices. Values are: \n" - "Async: asynchronous copies may be created and " - "maintained. \n" - "Sync: synchronous copies may be created and maintained. \n" - "UnSyncAssoc: unsynchronized copies may be created and " - "maintained. \n" - "UnSyncUnAssoc: a \'straight copy\' may be created." ), - ValueMap { "2", "3", "4", "5", "..", "0x8000..0xFFFF" }, - Values { "Async", "Sync", "UnSyncAssoc", "UnSyncUnAssoc", - "DMTF Reserved", "Vendor Specific" }, - ModelCorrespondence { - "CIM_StorageConfigurationService.CreateReplica.CopyType" }] - uint16 SupportedCopyTypes[]; - - [Description ( - "InitialReplicationState specifies which initial " - "ReplicationState is supported by a particular provider. " - "Values are: \n" - "Initialized: The replication relationship is known and " - "unsynchronized, but time required to synchronize may be " - "long. \n" - "Prepared: The replication relationship is known and " - "unsynchronized and the time required to synchronize will " - "be short. \n" - "Synchronized: The replicas are synchronized." ), - ValueMap { "2", "3", "4", "..", "0x8000..0xFFFF" }, - Values { "Initialized", "Prepared", "Synchronized", - "DMTF Reserved", "Vendor Specific" }, - ModelCorrespondence { - "CIM_StorageConfigurationService.AttachReplica", - "CIM_StorageConfigurationService.CreateReplica" }] - uint16 InitialReplicationState; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_StorageConfigurationService.mof b/build/vendor/dmtf_mof/Device/CIM_StorageConfigurationService.mof deleted file mode 100644 index beebc613..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_StorageConfigurationService.mof +++ /dev/null @@ -1,494 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.11.0" ), - UMLPackagePath ( "CIM::Device::StorageServices" ), - Description ( - "This service allows the active management of a Storage Server. " - "It allows jobs to be started for the creation, modification " - "and deletion of storage objects (StoragePools, StorageVolumes " - "and LogicalDisks)." )] -class CIM_StorageConfigurationService : CIM_Service { - - - [Description ( - "Starts a job to create (or modify) a StoragePool. The " - "StoragePool will be (or must be) scoped to the same " - "System as this Service. One of the parameters for this " - "method is Size. As an input parameter, Size specifies " - "the desired size of the pool. As an output parameter, it " - "specifies the size achieved. Space is taken from either " - "or both of the specified input StoragePools and " - "StorageExtents (InPools and InExtents). The capability " - "requirements that the Pool must support are defined " - "using the Goal parameter. If the requested pool size " - "cannot be created, no action will be taken, the Return " - "Value will be 4097/0x1001, and the output value of Size " - "will be set to the nearest possible size. If 0 is " - "returned, then the task completed successfully and the " - "use of ConcreteJob was not required. If the task will " - "take some time to complete, a ConcreteJob will be " - "created and its reference returned in the output " - "parameter Job." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", - "4097", "4098..32767", "32768..65535" }, - Values { "Job Completed with No Error", "Not Supported", - "Unknown", "Timeout", "Failed", "Invalid Parameter", - "In Use", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Size Not Supported", "Method Reserved", "Vendor Specific" }] - uint32 CreateOrModifyStoragePool( - [IN, Description ( - "A end user relevant name for the pool being " - "created. If NULL, then a system supplied default " - "name can be used. The value will be stored in the " - "\'ElementName\' property for the created pool. If " - "not NULL, this parameter will supply a new name " - "when modifying an existing pool." )] - string ElementName, - [IN ( false ), OUT, Description ( - "Reference to the job (may be null if job completed)." - )] - CIM_ConcreteJob REF Job, - [IN, Description ( - "Reference to an instance of StorageSetting that " - "defines the desired capabilities of the " - "StoragePool. If set to a null value, the default " - "configuration from the source pool will be used. " - "If not NULL, this parameter will supply a new Goal " - "setting when modifying an existing pool." )] - CIM_StorageSetting REF Goal, - [IN, OUT, Description ( - "As an input parameter this specifies the desired " - "pool size in bytes. As an output parameter this " - "specifies the size achieved." ), - Units ( "Bytes" )] - uint64 Size, - [IN, Description ( - "Array of strings containing representations of " - "references to CIM_StoragePool instances, that are " - "used to create the Pool or modify the source " - "pools." )] - string InPools[], - [IN, Description ( - "Array of strings containing representations of " - "references to CIM_StorageExtent instances, that " - "are used to create the Pool or modify the source " - "extents." )] - string InExtents[], - [IN, OUT, Description ( - "As an input parameter: if null, creates a new " - "StoragePool. If not null, modifies the referenced " - "Pool. When returned, it is a reference to the " - "resulting StoragePool." )] - CIM_StoragePool REF Pool); - - [Description ( - "Start a job to create (or modify) a specified element " - "(for example a StorageVolume or StorageExtent) from a " - "StoragePool. One of the parameters for this method is " - "Size. As an input parameter, Size specifies the desired " - "size of the element. As an output parameter, it " - "specifies the size achieved. Space is taken from the " - "input StoragePool. The desired settings for the element " - "are specified by the Goal parameter. If the requested " - "size cannot be created, no action will be taken, and the " - "Return Value will be 4097/0x1001. Also, the output value " - "of Size is set to the nearest possible size. If 0 is " - "returned, the function completed successfully and no " - "ConcreteJob instance was required. If 4096/0x1000 is " - "returned, a ConcreteJob will be started to create the " - "element. The Job\'s reference will be returned in the " - "output parameter Job." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", - "4097", "4098..32767", "32768..65535" }, - Values { "Job Completed with No Error", "Not Supported", - "Unknown", "Timeout", "Failed", "Invalid Parameter", - "In Use", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Size Not Supported", "Method Reserved", "Vendor Specific" }] - uint32 CreateOrModifyElementFromStoragePool( - [IN, Description ( - "A end user relevant name for the element being " - "created. If NULL, then a system supplied default " - "name can be used. The value will be stored in the " - "\'ElementName\' property for the created element. " - "If not NULL, this parameter will supply a new name " - "when modifying an existing element." )] - string ElementName, - [IN, Description ( - "Enumeration indicating the type of element being " - "created or modified. If the input parameter " - "TheElement is specified when the operation is a " - "\'modify\', this type value must match the type of " - "that instance." ), - ValueMap { "0", "1", "2", "3", "4", "..", "32768..65535" }, - Values { "Unknown", "Reserved", "StorageVolume", - "StorageExtent", "LogicalDisk", "DMTF Reserved", - "Vendor Specific" }] - uint16 ElementType, - [IN ( false ), OUT, Description ( - "Reference to the job (may be null if job completed)." - )] - CIM_ConcreteJob REF Job, - [IN, Description ( - "The requirements for the element to maintain. If " - "set to a null value, the default configuration " - "from the source pool will be used. This parameter " - "should be a reference to a Setting or Profile " - "appropriate to the element being created. If not " - "NULL, this parameter will supply a new Goal when " - "modifying an existing element." )] - CIM_ManagedElement REF Goal, - [IN, OUT, Description ( - "As an input parameter Size specifies the desired " - "size. If not NULL, this parameter will supply a " - "new size when modifying an existing element. As an " - "output parameter Size specifies the size achieved." ), - Units ( "Bytes" )] - uint64 Size, - [IN, Description ( - "The Pool from which to create the element. This " - "parameter must be set to null if the input " - "parameter TheElement is specified (in the case of " - "a \'modify\' operation)." )] - CIM_StoragePool REF InPool, - [IN, OUT, Description ( - "As an input parameter: if null, creates a new " - "element. If not null, then the method modifies the " - "specified element. As an output parameter, it is a " - "reference to the resulting element." )] - CIM_LogicalElement REF TheElement); - - [Description ( - "Start a job to delete a StoragePool. The freed space is " - "returned source StoragePools (indicated by AllocatedFrom " - "StoragePool) or back to underlying storage extents. If 0 " - "is returned, the function completed successfully, and no " - "ConcreteJob was required. If 4096/0x1000 is returned, a " - "ConcreteJob will be started to delete the StoragePool. A " - "reference to the Job is returned in the Job parameter." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", - "4097..32767", "32768..65535" }, - Values { "Job Completed with No Error", "Not Supported", - "Unknown", "Timeout", "Failed", "Invalid Parameter", - "In Use", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Method Reserved", "Vendor Specific" }] - uint32 DeleteStoragePool( - [IN ( false ), OUT, Description ( - "Reference to the job (may be null if job completed)." - )] - CIM_ConcreteJob REF Job, - [IN, Description ( "Reference to the pool to delete." )] - CIM_StoragePool REF Pool); - - [Description ( - "Start a job to delete an element previously created from " - "a StoragePool. The freed space is returned to the source " - "StoragePool. If 0 is returned, the function completed " - "successfully and no ConcreteJob was required. If " - "4096/0x1000 is returned, a ConcreteJob will be started " - "to delete the element. A reference to the Job is " - "returned in the Job parameter." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", - "4097..32767", "32768..65535" }, - Values { "Job Completed with No Error", "Not Supported", - "Unknown", "Timeout", "Failed", "Invalid Parameter", - "In Use", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Method Reserved", "Vendor Specific" }] - uint32 ReturnToStoragePool( - [IN ( false ), OUT, Description ( - "Reference to the job (may be null if job completed)." - )] - CIM_ConcreteJob REF Job, - [IN, Description ( - "Reference to the element to return to the StoragePool." - )] - CIM_LogicalElement REF TheElement); - - [Description ( - "Start a job to create a new storage object which is a " - "replica of the specified source storage object. " - "(SourceElement). Note that using the input paramter, " - "CopyType, this function can be used to instantiate the " - "replica, and to create an ongoing association between " - "the source and replica. If 0 is returned, the function " - "completed successfully and no ConcreteJob instance is " - "created. If 4096/0x1000 is returned, a ConcreteJob is " - "started, a reference to which is returned in the Job " - "output parameter." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", - "4097..32767", "32768..65535" }, - Values { "Job Completed with No Error", "Not Supported", - "Unknown", "Timeout", "Failed", "Invalid Parameter", - "In Use", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Method Reserved", "Vendor Specific" }] - uint32 CreateReplica( - [IN, Description ( - "A end user relevant name for the element being " - "created. If NULL, then a system supplied default " - "name can be used. The value will be stored in the " - "\'ElementName\' property for the created element." )] - string ElementName, - [IN ( false ), OUT, Description ( - "Reference to the job (may be null if job completed)." - )] - CIM_ConcreteJob REF Job, - [Required, IN, Description ( - "The source storage object which may be a " - "StorageVolume or storage object." )] - CIM_LogicalElement REF SourceElement, - [IN ( false ), OUT, Description ( - "Reference to the created target storage element " - "(i.e., the replica)." )] - CIM_LogicalElement REF TargetElement, - [IN, Description ( - "The definition for the StorageSetting to be " - "maintained by the target storage object (the " - "replica)." )] - CIM_StorageSetting REF TargetSettingGoal, - [IN, Description ( - "The underlying storage for the target element (the " - "replica) will be drawn from TargetPool if " - "specified, otherwise the allocation is " - "implementation specific." )] - CIM_StoragePool REF TargetPool, - [IN, Description ( - "CopyType describes the type of copy that will be " - "made. Values are: \n" - "Async: Create and maintain an asynchronous copy of " - "the source. \n" - "Sync: Create and maintain a synchronized copy of " - "the source. \n" - "UnSyncAssoc: Create an unsynchronized copy and " - "maintain an association to the source. \n" - "UnSyncUnAssoc: Create unassociated copy of the " - "source element." ), - ValueMap { "2", "3", "4", "5", "..", "32768..65535" }, - Values { "Async", "Sync", "UnSyncAssoc", - "UnSyncUnAssoc", "DMTF Reserved", "Vendor Specific" }] - uint16 CopyType); - - [Description ( - "Modify (or start a job to modify) the synchronization " - "association between two storage objects. If 0 is " - "returned, the function completed successfully and no " - "ConcreteJob instance was created. If 0x1000 is returned, " - "a ConcreteJob was started and a reference to this Job is " - "returned in the Job output parameter. A return value of " - "1 indicates the method is not supported. All other " - "values indicate some type of error condition." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "0x1000", - "0x1001..0x7FFF", "0x8000..0xFFFF" }, - Values { "Job Completed with No Error", "Not Supported", - "Unspecified Error", "Timeout", "Failed", - "Invalid Parameter", "In Use", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Method Reserved", "Vendor Specific" }] - uint32 ModifySynchronization( - [IN, Description ( - "Operation describes the type of modification to be " - "made to the replica. Values are: \n" - "Detach: \'Forget\' the synchronization between two " - "storage objects. Start to treat the objects as " - "independent. \n" - "Fracture: Suspend the synchronization between two " - "storage objects using Sync or Async replication. \n" - "The association and (typically) changes are " - "remembered to allow a fast resynchronization. This " - "may be used during a backup cycle to allow one of " - "the objects to be copied while the other remains " - "in production. \n" - "Resync Replica: Re-establish the synchronization " - "of a Sync or Async replication. This will negate " - "the action of a previous Fracture operation. " - "Recreate a Point In Time image for an UnSyncAssoc " - "replication. \n" - "Restore from Replica: Renew the contents of the " - "original storage object from a replica. \n" - "Prepare: Get the link ready for a Resync operation " - "to take place. Some implementations will require " - "this operation to be invoked to keep the Resync " - "operation as fast as possible. May start the copy " - "engine. \n" - "Unprepare: Clear a prepared state if a Prepare is " - "not to be followed by a Resync operation. \n" - "Quiesce: Some applications require notification so " - "that they can ready the link for an operation. For " - "example flush any cached data or buffered changes. " - "The copy engine is stopped for UnSyncAssoc " - "replications. \n" - "Unquiesce: Take the link from the quiesced state " - "(without executing the intended operation. \n" - "Start Copy: initiate a full background copy of the " - "source to the UnSyncAssoc replica. Replica enters " - "Frozen state when copy operation is completed. \n" - "Stop Copy: stop the background copy previously " - "started. Reset To Sync: Change the CopyType of the " - "association to Sync (e.g., from the Async " - "CopyType). \n" - "Reset To Async: Change the CopyType of the " - "association to Async (e.g., from the Sync " - "CopyType)." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", - "9", "10", "11", "12", "13", "..", "0x8000..0xFFFF" }, - Values { "DMTF Reserved", "DMTF Reserved", "Detach", - "Fracture", "Resync Replica", - "Restore from Replica", "Prepare", "Unprepare", - "Quiesce", "Unquiesce", "Reset To Sync", - "Reset To Async", "Start Copy", "Stop Copy", - "DMTF Reserved", "Vendor Specific" }] - uint16 Operation, - [IN ( false ), OUT, Description ( - "Reference to the job (may be null if the task completed)." - )] - CIM_ConcreteJob REF Job, - [IN, Description ( - "The referenced to the StorageSynchronized " - "association describing the storage source/replica " - "relationship." )] - CIM_StorageSynchronized REF Synchronization); - - [Description ( - "Create (or start a job to create) a StorageSynchronized " - "relationship between two existing storage objects. Note " - "that using the input parameter, CopyType, this function " - "can be used to to create an ongoing association between " - "the source and replica. If 0 is returned, the function " - "completed successfully and no ConcreteJob instance is " - "created. If 0x1000 is returned, a ConcreteJob is " - "started, a reference to which is returned in the Job " - "output parameter. A return value of 1 indicates the " - "method is not supported. All other values indicate some " - "type of error condition." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "0x1000", - "0x1001..0x7FFF", "0x8000..0xFFFF" }, - Values { "Job Completed with No Error", "Not Supported", - "Unspecified Error", "Timeout", "Failed", - "Invalid Parameter", "In Use", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Method Reserved", "Vendor Specific" }] - uint32 AttachReplica( - [IN ( false ), OUT, Description ( - "Reference to the job (may be null if the task completed)." - )] - CIM_ConcreteJob REF Job, - [Required, IN, Description ( - "The source storage object which may be a " - "StorageVolume or other storage object." )] - CIM_ManagedElement REF SourceElement, - [IN, Description ( - "Reference to the target storage element (i.e., the replica)." - )] - CIM_ManagedElement REF TargetElement, - [IN, Description ( - "CopyType describes the type of Synchronized " - "relationship that will be created. Values are: \n" - "Async: Create and maintain an asynchronous copy of " - "the source. \n" - "Sync: Create and maintain a synchronized copy of " - "the source. \n" - "UnSyncAssoc: Create an unsynchronized copy and " - "maintain an association to the source. \n" - "UnSyncUnAssoc: Create unassociated copy of the " - "source element." ), - ValueMap { "2", "3", "4", "5", "..", "0x8000..0xFFFF" }, - Values { "Async", "Sync", "UnSyncAssoc", - "UnSyncUnAssoc", "DMTF Reserved", "Vendor Specific" }] - uint16 CopyType); - - [Description ( - "Start a job to create (or modify) a specified storage " - "element from specified input StorageExtents. The created " - "or modified storage element can be a StorageExtent, " - "StorageVolume, LogicalDisk, or StoragePool. An input " - "list of InElements must be specified. The " - "GetAvailableExtents method can be used to get a list of " - "valid extents that can be used to achieve a desired " - "goal. Validity of the extents is determined by the " - "implementation. As an input parameter, Size specifies " - "the desired size of the element. As an output parameter, " - "it specifies the size achieved. Space is taken from the " - "input InElements. The desired Settings for the element " - "are specified by the Goal parameter. If the size of " - "Extents passed is less than the size requested, then the " - "capacity is drawn from the extents in the order, left to " - "right, that the Extents were specified. The partial " - "consumption of an Extent is represented by an Extent for " - "the capacity used and an Extent for the capacity not " - "used. If the Size is NULL, then a configuration using " - "all Extents passed will be attempted. If the requested " - "size cannot be created, no action will be taken, and the " - "Return Value will be 4097/0x1001. Also, the output value " - "of Size is set to the nearest possible size. If 0 is " - "returned, the function completed successfully and no " - "ConcreteJob instance was required. If 4096/0x1000 is " - "returned, a ConcreteJob will be started to create the " - "element. The Job\'s reference will be returned in the " - "output parameter Job." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", - "4097", "4098..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown", "Timeout", "Failed", "Invalid Parameter", - "In Use", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Size Not Supported", "Method Reserved", "Vendor Specific" }] - uint32 CreateOrModifyElementFromElements( - [IN, Description ( - "A end user relevant name for the element being " - "created. If NULL, then a system-supplied default " - "name can be used. The value will be stored in the " - "\'ElementName\' property for the created element. " - "If not NULL, this parameter will supply a new name " - "when modifying an existing element." )] - string ElementName, - [Required, IN, Description ( - "Enumeration indicating the type of element being " - "created or modified. If the input parameter " - "TheElement is specified when the operation is a " - "\'modify\', this type value must match the type of " - "that instance. The actual CIM class of the created " - "TheElement can be vendor-specific, but it must be " - "a derived class of the appropriate CIM class -- " - "i.e., CIM_StorageVolume, CIM_StorageExtent, " - "CIM_LogicalDisk, or CIM_StoragePool." ), - ValueMap { "0", "1", "2", "3", "4", "5", "..", - "32768..65535" }, - Values { "Unknown", "Reserved", "Storage Volume", - "Storage Extent", "Storage Pool", "Logical Disk", - "DMTF Reserved", "Vendor Specific" }] - uint16 ElementType, - [IN ( false ), OUT, Description ( - "Reference to the job (may be null if job completed)." - )] - CIM_ConcreteJob REF Job, - [IN, Description ( - "The requirements for the element to maintain. If " - "set to a null value, the default configuration " - "associated with the Service will be used. This " - "parameter should be a reference to a Setting, " - "SettingData, or Profile appropriate to the element " - "being created. If not NULL, this parameter will " - "supply a new Goal when modifying an existing " - "element." )] - CIM_ManagedElement REF Goal, - [IN, OUT, Description ( - "As an input parameter Size specifies the desired " - "size. If not NULL, this parameter will supply a " - "new size when modifying an existing element. As an " - "output parameter Size specifies the size achieved." ), - Units ( "Bytes" )] - uint64 Size, - [Required, IN, Description ( - "Array of references to storage element instances " - "that are used to create or modify TheElement." )] - CIM_StorageExtent REF InElements[], - [IN, OUT, Description ( - "As an input parameter: if null, creates a new " - "element. If not null, then the method modifies the " - "specified element. As an output parameter, it is a " - "reference to the resulting element." )] - CIM_LogicalElement REF TheElement); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_StorageDefect.mof b/build/vendor/dmtf_mof/Device/CIM_StorageDefect.mof deleted file mode 100644 index 88d81a41..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_StorageDefect.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_StorageDefect -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageExtents" ), - Description ( - "The StorageDefect aggregation collects the StorageErrors for a " - "StorageExtent." )] -class CIM_StorageDefect { - - [Key, Aggregate, Min ( 1 ), - Max ( 1 ), - Description ( - "The Extent reference defines the StorageExtent on which " - "the errors occurred." )] - CIM_StorageExtent REF Extent; - - [Key, Weak, Description ( - "Error references the Error object, defining the starting " - "and ending addresses that are \'mapped out\' of the " - "Storage Extent." )] - CIM_StorageError REF Error; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_StorageError.mof b/build/vendor/dmtf_mof/Device/CIM_StorageError.mof deleted file mode 100644 index e6dce788..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_StorageError.mof +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_StorageError -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageExtents" ), - Description ( - "StorageError defines blocks of media or memory space that are " - "mapped \'out of use\' due to errors. The Key of the class is " - "the StartingAddress of the bytes in error." )] -class CIM_StorageError : CIM_ManagedElement { - - [Key, Description ( "The scoping System\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_StorageExtent.SystemCreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The scoping System\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_StorageExtent.SystemName" )] - string SystemName; - - [Key, Description ( - "The scoping StorageExtent\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_StorageExtent.CreationClassName" )] - string DeviceCreationClassName; - - [Key, Description ( "The scoping StorageExtent\'s DeviceID." ), - MaxLen ( 64 ), - Propagated ( "CIM_StorageExtent.DeviceID" )] - string DeviceID; - - [Key, Description ( - "The starting address of the bytes in error." )] - uint64 StartingAddress; - - [Description ( "The ending address of the bytes in error." )] - uint64 EndingAddress; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_StorageLibrary.mof b/build/vendor/dmtf_mof/Device/CIM_StorageLibrary.mof deleted file mode 100644 index 6a03c992..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_StorageLibrary.mof +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// (CIM V2.9.1 Final) Deprecate CIM_StorageMediaLibrary in Device model -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// =================================================================== -// StorageLibrary -// =================================================================== - [Deprecated { "CIM_ComputerSystem", "CIM_StorageLibraryCapabilities" }, - Version ( "2.9.0" ), - UMLPackagePath ( "CIM::Device::StorageLib" ), - Description ( - "A StorageLibrary is a collection of ManagedSystemElements that " - "operate together to provide cartridge library capabilities. " - "This object serves as an aggregation point to group the " - "following elements: MediaTransferDevices, a Label Reader, a " - "library Door, MediaAccessDevices, and other Library " - "components. \n" - "The use of this class is deprecated in favor of " - "CIM_ComputerSystem. Originally it was felt that a media " - "library could be purely mechanical and thus not a " - "ComputerSystem. However all manageable libraries are " - "ComputerSystems. This change simplifies the use of the model " - "by client software." )] -class CIM_StorageLibrary : CIM_System { - - [Deprecated { "CIM_StorageLibraryCapabilities.Capabilities" }, - Description ( - "Capabilities of the StorageLibrary. For example, it can " - "be indicated that the Library can perform automatic " - "cleaning of the MediaAccessDevices contained in it " - "(value=1) or that the Library provides physical door " - "access for an operator (value=2)." ), - ValueMap { "0", "2", "3", "4" }, - Values { "Unknown", "Automatic Cleaning", "Manual Operation", - "Front Panel Lockable" }] - uint16 Capabilities[]; - - [Deprecated { "CIM_ComputerSystem.OperationalStatus" }, - Description ( - "This property is deprecated in favour of an " - "OperationalStatus value of 4 (\'stressed\').\n" - "Boolean set to TRUE if there are more PhysicalMedia in a " - "Library than there are StorageMediaLocations to contain " - "them. For instance, if all MediaAccessDevices have a " - "Media loaded in them, and all StorageMediaLocations are " - "loaded by an operator, then an Overfilled condition " - "exists." )] - boolean Overfilled; - - [Deprecated { "CIM_ComputerSystem.OperationalStatus" }, - Description ( - "This property is deprecated in favour of an " - "OperationalStatus value of 0 (\'Unknown\').\n" - "Boolean set to TRUE if the Library can not currently " - "report the correct state of each PhysicalMedia within " - "its proper StorageMediaLocation." )] - boolean AuditNeeded; - - [Deprecated { "CIM_ComputerSystem.OperationalStatus" }, - Description ( - "This property is deprecated in favour of an " - "OperationalStatus value of 11 (\'In Service\').\n" - "Boolean set to TRUE if an audit of the location of some " - "or all of the Library\'s PhysicalMedia is currently " - "being performed. That an individual Changer is currently " - "doing an audit is indicated by a similar AuditInProgress " - "boolean property on the Changer object." )] - boolean AuditInProgress; - - [Deprecated { "CIM_StorageLibraryCapabilities.MaxAuditTime" }, - Description ( - "Maximum time in seconds that it takes for the Storage " - "Library to perform a complete audit of each StorageMedia " - "Location, to determine the absence or presence of a " - "Physical Media. If automated support is not provided, " - "then this property\'s value is undefined." ), - Units ( "Seconds" ), - PUnit ( "second" )] - uint64 MaxAuditTime; - - [Deprecated { "No value" }, - Description ( - "This property is deprecated since all managed libraries " - "willbe automated.\n" - "Boolean set to TRUE if the Library includes a robotics " - "mechanism that can be controlled by a ComputerSystem, to " - "automatically load and unload PhysicalMedia to/from " - "MediaAccessDevices and StorageMediaLocations. The " - "property is set to FALSE if the Library represents a " - "repository of Media that are inaccessible to a " - "MediaAccess Device without human intervention. An " - "example of a non- automated Library is a \'shelf\' or " - "\'vault\' where Physical Media are kept for extended " - "periods of time." )] - boolean Automated; - - [Deprecated { "CIM_ComputerSystem.OperationalStatus" }, - Description ( - "This property is deprecated in favour of an " - "OperationalStatus value of 10 (\'Stopped\').\n" - "Boolean indicating whether the Library\'s robotics are " - "currently active/enabled. If TRUE, then the Library may " - "not be safe for a human to enter." )] - boolean RoboticsEnabled; - - - [Deprecated { "CIM_ComputerSystem.RequestStateChange" }, - Description ( - "Requests that the Library robotics be enabled for " - "automated operation (input parameter, Enabled, set to " - "TRUE), or disabled for manual operation (input parameter " - "set to FALSE). The return value should be 0 if the " - "request was successfully executed, 1 if the request is " - "not supported and some other value if an error occurred. " - "In a subclass, the set of possible return codes could be " - "specified, using a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \'translated\' " - "may also be specified in the subclass as a Values array " - "qualifier." )] - uint32 EnableRobotics( - [IN, Description ( "Set TRUE to enable." )] - boolean Enable); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_StoragePool.mof b/build/vendor/dmtf_mof/Device/CIM_StoragePool.mof deleted file mode 100644 index 231f6900..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_StoragePool.mof +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Device::StorageServices" ), - Description ( - "A StoragePool is a conglomeration of storage capacity for the " - "purpose of assignment and allocation based on service " - "characteristics, such as location, available space or other " - "criteria (for example, cost per megabyte or hardware " - "ownership). A StoragePool is managed within the scope of a " - "particular System. StoragePools may consist of component " - "StoragePools or StorageExtents. StorageExtents that belong to " - "the StoragePool have a Component relationship to the " - "StoragePool. StorageExtents/StoragePools that are elements of " - "a pool have their available space aggregated into the pool. " - "StoragePools, StorageVolumes and LogicalDisks may be created " - "from StoragePools. This is indicated by the " - "AllocatedFromStoragePool association. StoragePool is scoped to " - "a system by the HostedStoragePool association." )] -class CIM_StoragePool : CIM_LogicalElement { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. In order to ensure uniqueness within the " - "NameSpace, the value of InstanceID SHOULD be constructed " - "using the following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon " - "\':\', and where MUST include a copyrighted, " - "trademarked or otherwise unique name that is owned by " - "the business entity creating/defining the InstanceID, or " - "is a registered ID that is assigned to the business " - "entity by a recognized global authority (This is similar " - "to the _ structure of Schema " - "class names.) In addition, to ensure uniqueness " - "MUST NOT contain a colon (\':\'). When using this " - "algorithm, the first colon to appear in InstanceID MUST " - "appear between and . \n" - " is chosen by the business entity and SHOULD " - "not be re-used to identify different underlying " - "(real-world) elements. If the above \'preferred\' " - "algorithm is not used, the defining entity MUST assure " - "that the resultant InstanceID is not re-used across any " - "InstanceIDs produced by this or other providers for this " - "instance\'s NameSpace. \n" - "For DMTF defined instances, the \'preferred\' algorithm " - "MUST be used with the set to \'CIM\'." )] - string InstanceID; - - [Required, Description ( - "A unique name in the context of the System that " - "identifies this pool." ), - MaxLen ( 256 )] - string PoolID; - - [Description ( - "If true, \"Primordial\" indicates that this StoragePool " - "is the base from which storage capacity is drawn and " - "returned in the activity of storage management. Being " - "primordial means that this StoragePool shall not be " - "created or deleted by consumers of this model. However, " - "other actions, modeled or not, may affect the " - "characteristics or size of primordial StoragePools. If " - "false, \"Primordial\" indicated that the StoragePool, a " - "concrete Storage Pool, is subject to storage services " - "functions. This distinction is important because " - "higher-level StoragePools may be assembled using the " - "Component or AllocatedFromStoragePool associations. " - "Although the higher-level abstractions can be created " - "and deleted, the most basic, (i.e. primordial), " - "hardware-based StoragePools cannot. They are physically " - "realized as part of the System, or are actually managed " - "by some other System and imported as if they were " - "physically realized." )] - boolean Primordial = false; - - [Description ( - "The total amount of capacity usable for the allocation " - "of StorageVolumes, LogicalDisks, or child Storage Pools. \n" - "For primordial Storage Pools, this capacity reflects the " - "usable capacity of Disk Drives or LUNs, for example, to " - "the owning storage device or application. For example, " - "in storage array, a primordial Storage Pool\'s " - "TotalManagedSpace does not include metadata such as the " - "disk label area and absolute disk drive capacity lost in " - "disk formatting. \n" - "For concrete Storage Pools, the same applies, but the " - "metadata not included in TotalManagedSpace is consumed " - "in virtualization like RAID and concatenation. Concrete " - "Storage Pool may also be simple reserve of capacity. In " - "such a case, no capacity may be lost in formation of the " - "Storage Pool. \n" - "Conceptually TotalManagedSpace is the sum of all storage " - "known via AssociatedComponentExtent associations to " - "underlying StorageExtents. However, note some of these " - "underlying storage may not be modeled by the " - "instrumentation." ), - Units ( "Bytes" ), - ModelCorrespondence { "CIM_StoragePool.RemainingManagedSpace" }] - uint64 TotalManagedSpace; - - [Required, Description ( - "The remaining usable capacity after the allocation of " - "StorageVolumes, LogicalDisks, or child Storage Pools. " - "This property is maintained here to provide efficient " - "access to this information. However, note that it is " - "possible to compute RemainingManagedSpace as " - "(TotalManagedSpace minus the sum of SpaceConsumed from " - "all of the AllocatedFromStoragePool references from this " - "StoragePool). Note that SpaceConsumed remains useful to " - "determine the amount of capacity consumed by a " - "particular allocated element." ), - Units ( "Bytes" ), - ModelCorrespondence { "CIM_StoragePool.TotalManagedSpace", - "CIM_AllocatedFromStoragePool.SpaceConsumed" }] - uint64 RemainingManagedSpace; - - - [Description ( - "For pools that support discrete sizes for volume or pool " - "creation, this method can be used to retrieve a list of " - "supported sizes. Note that different pool " - "implementations may support either or both the " - "GetSupportedSizes and GetSupportedSizeRanges methods at " - "different times, depending on Pool configuration. Also " - "note that the advertised sizes may change after the call " - "due to requests from other clients. If the pool " - "currently only supports a range of sizes, then the " - "return value will be set to 1." ), - ValueMap { "0", "1", "2" }, - Values { "Method completed OK", "Method not supported", - "Use GetSupportedSizeRange instead" }] - uint32 GetSupportedSizes( - [IN, Description ( - "The type of element for which supported sizes are reported for." - ), - ValueMap { "2", "3", "4" }, - Values { "Storage Pool", "Storage Volume", - "Logical Disk" }] - uint16 ElementType, - [IN, Description ( - "The StorageSetting for which supported sizes " - "should be reported for." )] - CIM_StorageSetting REF Goal, - [IN ( false ), OUT, Description ( - "List of supported sizes for a Volume/Pool creation " - "or modification." ), - Units ( "Bytes" )] - uint64 Sizes[]); - - [Description ( - "For pools that that support a range of sizes for volume " - "or pool creation, this method can be used to retrieve " - "the supported range. Note that different pool " - "implementations may support either or both the " - "GetSupportedSizes and GetSupportedSizeRanges methods at " - "different times, depending on Pool configuration. Also " - "note that the advertised sizes may change after the call " - "due to requests from other clients. If the pool " - "currently only supports discrete sizes, then the return " - "value will be set to 1." ), - ValueMap { "0", "1", "2" }, - Values { "Method completed OK", "Method not supported", - "Use GetSupportedSizes instead" }] - uint32 GetSupportedSizeRange( - [IN, Description ( - "The type of element for which supported size " - "ranges are reported for." ), - ValueMap { "2", "3", "4" }, - Values { "Storage Pool", "Storage Volume", - "Logical Disk" }] - uint16 ElementType, - [IN, Description ( - "The StorageSetting for which supported size ranges " - "should be reported for." )] - CIM_StorageSetting REF Goal, - [IN ( false ), OUT, Description ( - "The minimum size for a volume/pool in bytes." ), - Units ( "Bytes" )] - uint64 MinimumVolumeSize, - [IN ( false ), OUT, Description ( - "The maximum size for a volume/pool in bytes." ), - Units ( "Bytes" )] - uint64 MaximumVolumeSize, - [IN ( false ), OUT, Description ( - "A volume/pool size must be a multiple of this " - "value which is specified in bytes." ), - Units ( "Bytes" )] - uint64 VolumeSizeDivisor); - - [Description ( - "This method can be used to retrieve a list of available " - "Extents that may be used in the creation or modification " - "of a StoragePool, StorageVolume, or LogicalDisk. The " - "GetAvailableExtents method MUST return the Extents from " - "the set of Component Extents of the Pool on which the " - "method is being invoked. The returned Extents are " - "available at the time the method returns. There is no " - "guarantee that the same Extents will be available later. " - "This method MUST return the Extents that are not being " - "used as supporting capacity for any other Pools, " - "Volumes, or LogicalDisks that have been allocated from " - "this Pool. The Extent returned MUST be a component " - "Extent of the Pool or subdivisions of a component " - "Extent, the subdivisions themselves represented as " - "Extents." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", - "4098..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown", "Timeout", "Failed", "Invalid Parameter", - "In Use", "DMTF Reserved", "Method Reserved", - "Vendor Specific" }] - uint32 GetAvailableExtents( - [IN, Description ( - "The StorageSetting (Goal) for which supported " - "extents should be retrieved as available. \n" - "If a NULL is passed for the Goal, the method will " - "return all available extents, regardless of the " - "goal. There exists a possibility of error in " - "creating a Pool, Volume, or LogicalDisk retrieved " - "in this manner." )] - CIM_StorageSetting REF Goal, - [OUT, Description ( - "List of references to available StorageExtents, or " - "subclass instances." )] - CIM_StorageExtent REF AvailableExtents[]); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_StorageReplicationCapabilities.mof b/build/vendor/dmtf_mof/Device/CIM_StorageReplicationCapabilities.mof deleted file mode 100644 index 2e0ec0eb..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_StorageReplicationCapabilities.mof +++ /dev/null @@ -1,389 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::StorageServices" ), - Description ( - "This subclass defines the replication capabilities of a " - "StorageConfigurationService. Multiple instances of " - "StorageReplicationCapabilities may be associated with a " - "StorageConfigurationService using ElementCapabilities. A " - "provider should create one instance for each supported " - "SynchronizationType." )] -class CIM_StorageReplicationCapabilities : CIM_Capabilities { - - [Description ( - "SupportedSynchronizationType describes the type of " - "Synchronization that is characterized by this instance " - "of StorageReplicationCapabilities. Values are:\n" - "Async: create a mirror that is nearly always " - "synchronized. Sync: create a mirror that is always synchronized.\n" - "UnSyncAssocFull: create a full size snapshot (Point In " - "Time image).\n" - "UnSyncAssocDelta: create a delta snapshot (Point In Time image).\n" - "UnSyncUnAssoc: create a full size, independent replica." ), - ValueMap { "2", "3", "4", "5", "6", "..", "32768..65535" }, - Values { "Async", "Sync", "UnSyncAssoc-Full", - "UnSyncAssoc-Delta", "UnSyncUnAssoc", "DMTF Reserved", - "Vendor Specific" }] - uint16 SupportedSynchronizationType; - - [Description ( - "Enumeration indicating what operations will be executed " - "as asynchronous jobs. If an operation is included in " - "both this and SupportedSynchronousActions then the " - "underlying implementation is indicating that it may or " - "may not create a job." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", ".." }, - Values { "Local Replica Creation", "Remote Replica Creation", - "Local Replica Modification", - "Remote Replica Modification", "Local Replica Attachment", - "Remote Replica Attachment", "Buffer Creation", - "DMTF Reserved" }, - ModelCorrespondence { - "CIM_StorageReplicationCapabilities.SupportedSynchronousActions" }] - uint16 SupportedAsynchronousActions[]; - - [Description ( - "Enumeration indicating what operations will be executed " - "without the creation of a job. If an operation is " - "included in both this and SupportedAsynchronousActions " - "then the underlying instrumentation is indicating that " - "it may or may not create a job." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", ".." }, - Values { "Local Replica Creation", "Remote Replica Creation", - "Local Replica Modification", - "Remote Replica Modification", "Local Replica Attachment", - "Remote Replica Attachment", "Buffer Creation", - "NetworkPipe Creation", "DMTF Reserved" }, - ModelCorrespondence { - "CIM_StorageReplicationCapabilities.SupportedAsynchronousActions" }] - uint16 SupportedSynchronousActions[]; - - [Description ( - "InitialReplicationState specifies which initial " - "ReplicationState is supported by a particular provider. " - "Values are: \n" - "Initialized: The replication relationship is known and " - "unsynchronized, but time required to synchronize may be " - "long. \n" - "Prepared: The replication relationship is known and " - "unsynchronized and the time required to synchronize will " - "be short. \n" - "Synchronized: The replicas are synchronized.Idle: an " - "UnSyncAssoc replica is ready to manage." ), - ValueMap { "2", "3", "4", "5", "..", "0x8000..0xFFFF" }, - Values { "Initialized", "Prepared", "Synchronized", "Idle", - "DMTF Reserved", "Vendor Specific" }, - ModelCorrespondence { - "CIM_StorageConfigurationService.AttachReplica", - "CIM_StorageConfigurationService.AttachOrModifyReplica", - "CIM_StorageConfigurationService.CreateReplica" }] - uint16 InitialReplicationState; - - [Description ( - "Enumeration indicating which specialized storage element " - "types are supported by this instance of " - "StorageReplicationCapabilities. Specialized types are " - "indicated by the value of the IntendedUsage in " - "StorageSetting." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "..", - "0x8000..0xFFFF" }, - Values { "Delta Pool", "Delta Pool Component", - "Remote Mirror", "Local Mirror", "Full Snapshot", - "Delta Snapshot", "Replication Buffer", "DMTF Reserved", - "Vendor Specific" }, - ModelCorrespondence { "CIM_StorageSetting.IntendedUsage" }] - uint16 SupportedSpecializedElements[]; - - [Description ( - "Enumeration indicating which ModifySynchronization " - "operations are supported by this instance of " - "StorageReplicationCapabilities." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "..", "0x8000..0xFFFF" }, - Values { "Detach", "Fracture", "Resync", "Restore", - "Prepare", "Unprepare", "Quiesce", "Unquiesce", - "Reset To Sync", "Reset To Async", "Start Copy", - "Stop Copy", "DMTF Reserved", "Vendor Specific" }, - ModelCorrespondence { - "CIM_StorageConfigurationService.ModifySynchronization" }] - uint16 SupportedModifyOperations[]; - - [Description ( - "Indicates host access restrictions for replicas with " - "thesecapabilities. Values: 2 = not accessible. \n" - "3 = no restrictions. Any host may access. 4 = only " - "accessible by associated source element hosts. 5 = not " - "accessible by source element hosts. Other hosts OK." ), - ValueMap { "2", "3", "4", "5", ".." }, - Values { "Not Accessible", "No Restrictions", - "Source Hosts Only", "Source Hosts Excluded", - "DMTF Reserved" }] - uint16 ReplicaHostAccessibility; - - [Description ( - "Lists the replica synchronization states in which the " - "provider allows host access to replicas. Accessibility " - "does not guarantee replica contents are valid or " - "consistent." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "14", "15", "..", "0x8000.." }, - Values { "Initialized", "Prepare In Progress", "Prepared", - "Resync In Progress", "Synchronized", - "Fracture In Progress", "Quiesce In Progress", "Quiesced", - "Restore In Progress", "Idle", "Broken", "Fractured", - "Frozen", "Copy In Progress", "DMTF Reserved", - "Vendor Specific" }, - ModelCorrespondence { "CIM_StorageSynchronized.SyncState" }] - uint16 HostAccessibleState[]; - - [Description ( - "True indicates space limits on allocation from " - "StoragePools may be enforced." ), - ModelCorrespondence { - "CIM_AllocatedFromStoragePool.SpaceLimit" }] - boolean SpaceLimitSupported; - - [Description ( - "True indicates space reserved for replicas can be from a " - "specialized pool." )] - boolean SpaceReservationSupported; - - [Description ( - "True indicates local mirror can be snapshot source." )] - boolean LocalMirrorSnapshotSupported; - - [Description ( - "True indicates remote mirror can be snapshot source." )] - boolean RemoteMirrorSnapshotSupported; - - [Description ( - "True indicates all delta replicas associated with the " - "same source element can be incrementally dependent. Only " - "the oldest replica in the set may be deleted or " - "resynced." )] - boolean IncrementalDeltasSupported; - - [Description ( - "True indicates replicas can persist during power off or " - "system reset. False indicates replicas lost during these " - "events." )] - boolean PersistentReplicasSupported; - - [Description ( - "True indicates peer-to-peer connections are " - "bi-directional. False indicates connections are " - "uni-directional." )] - boolean BidirectionalConnectionsSupported; - - [Description ( - "Maximum number of replicas that can be associated with " - "one source element." )] - uint16 MaximumReplicasPerSource; - - [Description ( - "Maximum number of port pairs assigned to a peer-to-peer " - "connection." )] - uint16 MaximumPortsPerConnection; - - [Description ( - "Maximum number of peer-to-peer connections to which a " - "port maybe assigned." )] - uint16 MaximumConnectionsPerPort; - - [Description ( - "Maximum number of peer connections supported by this " - "instance of StorageConfigurationService." )] - uint16 MaximumPeerConnections; - - [Description ( - "Maximum local mirror replication depth allowed by this " - "instance of StorageConfigurationService. Value 1 " - "indicates multi-level replication not supported." )] - uint16 MaximumLocalReplicationDepth = 1; - - [Description ( - "Maximum remote mirror replication depth allowed by this " - "instance of StorageConfigurationService. Value N means " - "that remote replicas can span N linked peer-to-peer " - "connections. Value 1 indicates multi-level replication " - "not supported." )] - uint16 MaximumRemoteReplicationDepth = 1; - - [Description ( - "Start or do not start background copy when replica is created." - ), - ValueMap { "0", "1", "2", "..", "0x8000.." }, - Values { "Not Managed", "Start", "Do Not Start", - "DMTF Reserved", "Vendor Specific" }, - ModelCorrespondence { - "CIM_StorageSetting.InitialSynchronization" }] - uint16 InitialSynchronizationDefault; - - [Description ( - "ReplicationPriority allows the priority of background " - "Replication I/O to be managed relative to host I/O. " - "Default applies to initial or deferred background " - "Replication operations. Value can be modified while in " - "Replication-in-progress state. Values: Low: Replication " - "engine I/O lower priority than host I/O. \n" - "Same: Replication engine I/O has the same priority as " - "host I/O. \n" - "High: Replication engine I/O has higher priority than " - "host I/O." ), - ValueMap { "0", "1", "2", "3", "..", "0x8000.." }, - Values { "Not Managed", "Low", "Same", "High", - "DMTF Reserved", "Vendor Specific" }, - ModelCorrespondence { "CIM_StorageSetting.ReplicationPriority" }] - uint16 ReplicationPriorityDefault; - - [Description ( - "Warning threshold for generating an indication for " - "RemainingManagedSpace. Value of zero means no warning " - "generated.Triggered when RemainingManagedSpace <= " - "(TotalManagedSpace*LowSpaceWarningThreshold)/100." ), - Units ( "Percentage" ), - MinValue ( 0 ), - MaxValue ( 100 ), - ModelCorrespondence { - "CIM_StoragePool.LowSpaceWarningThreshold" }, - PUnit ( "percent" )] - uint8 LowSpaceWarningThresholdDefault; - - [Description ( - "Warning threshold for instance modification indication " - "for SpaceConsumed by a replica element. Value of zero " - "means no warning generated. Triggered when SpaceConsumed " - ">= (SpaceLimit*SpaceLimitWarningThreshold)/100." ), - Units ( "Percentage" ), - MinValue ( 0 ), - MaxValue ( 100 ), - ModelCorrespondence { - "CIM_AllocatedFromStoragePool.SpaceLimitWarningThreshold" }, - PUnit ( "percent" )] - uint8 SpaceLimitWarningThresholdDefault; - - [Description ( - "Remote replication provides StorageConfigurationService " - "instances for source systems and target systems. A " - "client determines that extrinsic methods of the service " - "should be invoked to one instance or the other based on " - "the value of this property. Values: Not Specified: " - "invoke a method to either system instance. Source: " - "invoke to source element service instance. Target: " - "invoke to target element service instance. Proxy: find " - "and invoke to proxy service instance." ), - ValueMap { "2", "3", "4", "5", "..", "0x8000.." }, - Values { "Not Specified", "Source", "Target", "Proxy", - "DMTF Reserved", "Vendor Specific" }] - uint16 RemoteReplicationServicePointAccess; - - [Description ( - "Remote replication provides StorageConfigurationService " - "instances for source systems and target systems. A " - "client determines that extrinsic methods of the service " - "should be invoked to one instance or the other based on " - "the value of this property. If the primary instance is " - "unavailable, the provider may indicate an alternate " - "instance. Values: None: no alternate exists. Source: " - "invoke to source element service instance. Target: " - "invoke to target element service instance. Proxy: find " - "and invoke alternate proxy service instance." ), - ValueMap { "2", "3", "4", "5", "..", "0x8000.." }, - Values { "None", "Source", "Target", "Proxy", - "DMTF Reserved", "Vendor Specific" }] - uint16 AlternateReplicationServicePointAccess; - - [Description ( - "DeltaReplicaPool indicates that a specialized pool is " - "required as a container for delta replica elements. " - "Values: Any: delta replicas can be created in any pool. " - "Exclusive: one specialized, exclusive pool must be " - "created for each source element that has associated " - "delta replicas. Shared: one specialized, shared pool " - "must be created to be shared by all source elements with " - "associated delta replicas." ), - ValueMap { "2", "3", "4", "..", "0x8000.." }, - Values { "Any", "Exclusive", "Shared", "DMTF Reserved", - "Vendor Specific" }] - uint16 DeltaReplicaPoolAccess; - - [Description ( - "Remote replication buffer elements are instances of " - "CIM_Memory. A buffer element may be created from a " - "component extent with a BasedOn association or in a " - "storage pool with an AllocatedFromStoragePool " - "association. The provider can also make the size and " - "element type opaque to a client. Values: \n" - "Not specified: client allows provider to determine size " - "and container element type. \n" - "InExtent: buffer must be created from passed component " - "extent. \n" - "InPool: buffer must be created in passed pool." ), - ValueMap { "0", "2", "3", "..", "0x8000.." }, - Values { "Not specified", "InExtent", "InPool", - "DMTF Reserved", "Vendor Specific" }] - uint16 RemoteBufferElementType; - - [Description ( - "Array provider may require multiple buffer elements per " - "array instance as indicated by this property. Values: \n" - "Array: one buffer element for the entire array. \n" - "ComponentCS: one buffer element per ComputerSystem " - "element in a clustered array. \n" - "Pipe: one or two buffer elements per replication pipe." ), - ValueMap { "2", "3", "4", "..", "0x8000.." }, - Values { "Array", "ComponentCS", "Pipe", "DMTF Reserved", - "Vendor Specific" }] - uint16 RemoteBufferHost; - - [Description ( - "This property allows the provider to indicate the " - "required location for remote buffer elements. Values: \n" - "Source: buffer needed only on platforms hosting source " - "elements. \n" - "Target: buffer needed only on platforms hosting target " - "elements. \n" - "Both: buffers needed for both source and target " - "platforms." ), - ValueMap { "2", "3", "4", "..", "0x8000.." }, - Values { "Source", "Target", "Both", "DMTF Reserved", - "Vendor Specific" }] - uint16 RemoteBufferLocation; - - [Description ( - "Peer may require a write buffer for remote replica " - "elements with async I/O buffering. Typically used to " - "increase remote mirror replication engine performance " - "while maintaining high availability. Values: \n" - "Required: must have buffer if any Async remote replicas " - "are created. \n" - "Optional: may have buffer if any Async remote replicas " - "are created." ), - ValueMap { "0", "2", "3", "..", "0x8000.." }, - Values { "Not Supported", "Required", "Optional", - "DMTF Reserved", "Vendor Specific" }] - uint16 RemoteBufferSupported; - - [Description ( - "Indicate if an async remote replica pair is allowed to " - "use a write buffer for asynchronous write buffering. - " - "Not Managed: use or not of the buffer is up to the " - "implementation. - Use Buffer: use of a buffer is " - "required. - Do Not Use Buffer: a buffer shall not be " - "used." ), - ValueMap { "0", "1", "2", "..", "0x8000.." }, - Values { "Not Managed", "Use Buffer", "Do Not Use Buffer", - "DMTF Reserved", "Vendor Specific" }, - ModelCorrespondence { - "CIM_StorageSetting.UseReplicationBuffer" }] - uint16 UseReplicationBufferDefault; - - [Description ( - "Peer connection protocol is a private, vendor-specific " - "protocol for replication data transport. A client " - "verifies that two peers support the same protocol before " - "establishing a peer-to-peer connection." )] - string PeerConnectionProtocol; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_StorageSetting.mof b/build/vendor/dmtf_mof/Device/CIM_StorageSetting.mof deleted file mode 100644 index 480b3042..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_StorageSetting.mof +++ /dev/null @@ -1,391 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.11.0" ), - UMLPackagePath ( "CIM::Device::StorageServices" ), - Description ( - "StorageSetting is roughly equivalent to a Service Level " - "Agreement (SLA) It defines the characteristics, qualities of " - "service and goals when used in a CreateOrModifyElement " - "FromStoragePool or CreateOrModifyStoragePool method in the " - "StorageConfigurationService. It specifies a series of " - "properties with Maximum and Minimum values that define the " - "(inclusive) bounds that the object should maintain. Note that " - "the setting is associated to a StorageVolume or LogicalDisk, " - "using ElementSetting. \n" - "The use of these properties differs depending on whether the " - "StorageSetting instance is being used as a goal for a " - "configuration operation or being used as a Service Level " - "Agreement for a created Volume. In addition the properties " - "fall into two categories: The QOS " - "properties(PackageRedundancy, Data Redundancy, & " - "NoSinglePointOfFailure) and the Detailed RAID " - "properties(ExtentStripeLength, ParityLayout, and " - "UserDataStripeDepth). In a Setting used as a goal, the QOS " - "properties are required as a set; The Detailed RAID " - "properties(if supported as indicated by the scoping " - "StorageCapabilities instance) may be used optionally in any " - "combination. The implementation MUST supply it\'s own best " - "practice in the case where one or more supported RAID " - "properties are not supplied. In this situation the use of " - "StorageSettingWithHints can be useful to provide direction to " - "the implementation. \n" - "In a Setting used as a service agreement for a Volume, the QOS " - "properties reflect the Service Level Agreement, with goal, " - "min, & max. The actual current service level is exposed by " - "corresponding values in StorageExtent. \n" - "The Detailed RAID properties, by contrast, reflect specific " - "values that reflect the RAID construction of the Volume. Only " - "the primary values are meaningful; Min and Max are set to " - "match. \n" - "Certain StorageSetting instances may be classed as \"Fixed\", " - "by using the \"ChangeableType\" property, indicating the " - "setting is preset. Such settings are used when the possible " - "setting variations are low enough to be instantiated in their " - "entirety. The StorageCapabilities \"CreateSetting\" method MAY " - "NOT be used to return settings that are not changeable. \n" - "Other StorageSetting instances are created using the " - "\"CreateSetting\" method. If the capabilities specifies " - "ranges, then the setting can be used by a client to narrow the " - "range to particular values within the range. In other words, " - "the capabilities MAY be broad, but the related setting MUST be " - "as capable or less capable, that is more narrowly defined, " - "before it is used to create or modify resources. \n" - "These created StorageSetting instances MUST have their " - "\"ChangeableType\" property = 1, \"Changeable - Transient\". \n" - "GeneratedSettings MAY not remain after the restart or reset of " - "the implementation. They may be deleted by implementation at " - "any time. A reasonable minimal time to retain the generated " - "transient settings is five minutes, although there is no " - "minimal retention time." )] -class CIM_StorageSetting : CIM_SettingData { - - [Write, Description ( - "Indicates the desired value for No Single Point of " - "Failure. Possible values are false = single point of " - "failure, and true = no single point of failure." )] - boolean NoSinglePointOfFailure; - - [Write, Description ( - "DataRedundancyMax describes the maximum number of " - "complete copies of data to be maintained. Examples would " - "be RAID 5 where 1 copy is maintained and RAID 1 where 2 " - "or more copies are maintained. Possible values are 1 to " - "n. The desired redundancy is specified using " - "DataRedundancyGoal, while the minimum is defined by " - "DataRedundancyMin." ), - MinValue ( 1 ), - ModelCorrespondence { "CIM_StorageSetting.DataRedundancyMin", - "CIM_StorageSetting.DataRedundancyGoal" }] - uint16 DataRedundancyMax; - - [Write, Description ( - "DataRedundancyMin describes the minimum number of " - "complete copies of data to be maintained. Examples would " - "be RAID 5 where 1 copy is maintained and RAID 1 where 2 " - "or more copies are maintained. Possible values are 1 to " - "n. The desired redundancy is specified using " - "DataRedundancyGoal, while the maximum is defined by " - "DataRedundancyMax." ), - MinValue ( 1 ), - ModelCorrespondence { "CIM_StorageSetting.DataRedundancyMax", - "CIM_StorageSetting.DataRedundancyGoal" }] - uint16 DataRedundancyMin; - - [Write, Description ( - "DataRedundancyGoal describes the desired number of " - "complete copies of data to be maintained. Examples would " - "be RAID 5 where 1 copy is maintained and RAID 1 where 2 " - "or more copies are maintained. Possible values are 1 to " - "n. The bounds (max and min) for redundancy are defined " - "using the properties, DataRedundancyMax and " - "DataRedundancyMin." ), - MinValue ( 1 ), - ModelCorrespondence { "CIM_StorageSetting.DataRedundancyMax", - "CIM_StorageSetting.DataRedundancyMin" }] - uint16 DataRedundancyGoal; - - [Write, Description ( - "PackageRedundancyMax describes the maximum number of " - "redundant packages to be used. For example, in the " - "storage domain, package redundancy describes how many " - "disk spindles can fail without data loss including, at " - "most, one spare. An example would be RAID5 with a spare " - "disk which would have a PackageRedundancy of 2. Possible " - "values are 0 to n. The desired redundancy is specified " - "using PackageRedundancyGoal, while the minimum is " - "defined by PackageRedundancyMin." ), - ModelCorrespondence { - "CIM_StorageSetting.PackageRedundancyMin", - "CIM_StorageSetting.PackageRedundancyGoal" }] - uint16 PackageRedundancyMax; - - [Write, Description ( - "PackageRedundancyMin describes the minimum number of " - "redundant packages to be used. For example, in the " - "storage domain, package redundancy describes how many " - "disk spindles can fail without data loss including, at " - "most, one spare. An example would be RAID5 with a spare " - "disk which would have a PackageRedundancy of 2. Possible " - "values are 0 to n. The desired redundancy is specified " - "using PackageRedundancyGoal, while the maximum is " - "defined by PackageRedundancyMax." ), - ModelCorrespondence { - "CIM_StorageSetting.PackageRedundancyMax", - "CIM_StorageSetting.PackageRedundancyGoal" }] - uint16 PackageRedundancyMin; - - [Write, Description ( - "PackageRedundancyGoal describes the desired number of " - "redundant packages to be used. For example, in the " - "storage domain, package redundancy describes how many " - "disk spindles can fail without data loss including, at " - "most, one spare. An example would be RAID5 with a spare " - "disk which would have a PackageRedundancy of 2. Possible " - "values are 0 to n. The bounds (max and min) for " - "redundancy are defined using the properties, " - "PackageRedundancyMax and PackageRedundancyMin." ), - ModelCorrespondence { - "CIM_StorageSetting.PackageRedundancyMax", - "CIM_StorageSetting.PackageRedundancyMin" }] - uint16 PackageRedundancyGoal; - - [Write, Description ( - "DeltaReservationMax is a number between 1 (1%) and a 100 " - "(100%) which specifies the maximum amount of space that " - "should be reserved in a replica for caching changes. For " - "a complete copy this would be 100%. The desired " - "reservation is specified using DeltaReservationGoal, " - "while the minimum is defined by DeltaReservationMin." ), - Units ( "Percentage" ), - MinValue ( 1 ), - MaxValue ( 100 ), - ModelCorrespondence { - "CIM_StorageSetting.DeltaReservationMin", - "CIM_StorageSetting.DeltaReservationGoal" }] - uint8 DeltaReservationMax; - - [Write, Description ( - "DeltaReservationMin is a number between 1 (1%) and a 100 " - "(100%) which specifies the minimum amount of space that " - "should be reserved in a replica for caching changes. For " - "a complete copy this would be 100%. The desired " - "reservation is specified using DeltaReservationGoal, " - "while the maximum is defined by DeltaReservationMax." ), - Units ( "Percentage" ), - MinValue ( 1 ), - MaxValue ( 100 ), - ModelCorrespondence { - "CIM_StorageSetting.DeltaReservationMax", - "CIM_StorageSetting.DeltaReservationGoal" }] - uint8 DeltaReservationMin; - - [Write, Description ( - "DeltaReservationGoal is a number between 1 (1%) and a " - "100 (100%) which specifies the desired amount of space " - "that should be reserved in a replica for caching " - "changes. For a complete copy this would be 100%. The " - "bounds (max and min) for the reservation are defined " - "using the properties, DeltaReservationMax and " - "DeltaReservationMin." ), - Units ( "Percentage" ), - MinValue ( 1 ), - MaxValue ( 100 ), - ModelCorrespondence { - "CIM_StorageSetting.DeltaReservationMin", - "CIM_StorageSetting.DeltaReservationMax" }] - uint8 DeltaReservationGoal; - - [Description ( - "Enumeration indicating the type of setting. \"Fixed - " - "Not Changeable\" settings are primordial. These setting " - "are defined at the implementor of the class. \"Changeable " - "- Transient\" is the type of setting produced by the " - "\"CreateSetting\" method. A client can subsequently " - "request that the implementation persist the generated " - "and potentially modified setting indefinately. Only a " - "\"Changeable - Transient\" setting SHALL be converted to " - "a \"Changeable = Persistent\" setting; the setting SHALL " - "NOT be changed back." ), - ValueMap { "0", "1", "2" }, - Values { "Fixed - Not Changeable", "Changeable - Transient", - "Changeable - Persistent" }] - uint16 ChangeableType; - - [Write, Description ( - "ExtentStripeLength describes the number of underlying " - "StorageExtents across which data is striped in the " - "common striping-based storage organizations. This is " - "also known as the number of \'members\' or \'columns\'. " - "When used in a goal setting instance, ExtentStripeLength " - "is the optimal desired value. The bounds (max and min) " - "for Stripe Length are defined using the properties " - "ExtentStripeLengthMax and ExtentStripeLengthMin. " - "ExtentStripeLength MUST be set to NULL if the scoping " - "StorageCapablities indicates that it is not supported in " - "this context. ExtentStripeLength can be used in " - "conjunction with CreateOrModifyElementFromELements to " - "explicitly configure storage. An example would be RAID " - "0+1 with mirroring two stripe sets, each set being three " - "wide. In this case CreateOrModifyElementFromElements " - "would be passed a goal setting with DataRedundancy = 2 " - "and ExtentStripeLength = 3. The size of the InElements " - "array would be 6 and would contain the StorageExtents to " - "be used to construct the StorageElement as a RAID 0+1. " - "ExtentStripeLengthMin and ExtentStripeLengthMax are " - "meaningless and wouldbe set to NULL. If the property is " - "supported, and is part of StorageSettingWithHints it MAY " - "be set to NULL. If used it will constrain the effects of " - "Hint selections. When used in a Setting instance " - "associated to a Volume, this property indicates the " - "specific value that the Volume was created with, and " - "ExtentStripeLengthMin and ExtentStripeLengthMax will be " - "set to the same specific value." ), - MinValue ( 1 ), - ModelCorrespondence { - "CIM_StorageSetting.ExtentStripeLengthMax", - "CIM_StorageSetting.ExtentStripeLengthMin" }] - uint16 ExtentStripeLength; - - [Write, Description ( - "ExtentStripeLength describes the number of underlying " - "StorageExtents across which data is striped in the " - "common striping-based storage organizations. This is " - "also known as the number of \'members\' or \'columns\'. " - "When used in a goal setting instance, " - "ExtentStripeLengthMin is the minimum acceptable value. " - "The desired Stripe Length is specified using " - "ExtentStripeLength, while the maximum is defined by " - "ExtentStripeLengthMax. ExtentStripeLengthMin MUST be set " - "to NULL if the scoping StorageCapablities indicates that " - "it is not supported in this context. If the property is " - "supported, and is part of StorageSettingWithHints it MAY " - "be set to NULL. If used it will constrain the effects of " - "Hint selections. When used in a Setting instance " - "associated to a Volume, this property is set to the " - "specific value of ExtentStripeLength." ), - MinValue ( 1 ), - ModelCorrespondence { - "CIM_StorageSetting.ExtentStripeLengthMax", - "CIM_StorageSetting.ExtentStripeLength" }] - uint16 ExtentStripeLengthMin; - - [Write, Description ( - "ExtentStripeLength describes the number of underlying " - "StorageExtents across which data is striped in the " - "common striping-based storage organizations. This is " - "also known as the number of \'members\' or \'columns\'. " - "When used in a goal setting instance, " - "ExtentStripeLengthMax is the maximum acceptable value. " - "The desired Stripe Length is specified using " - "ExtentStripeLength, while the minimum is defined by " - "ExtentStripeLengthMin. ExtentStripeLengthMax MUST be set " - "to NULL if the scoping StorageCapablities indicates that " - "it is not supported in this context. If the property is " - "supported, and is part of StorageSettingWithHints it MAY " - "be set to NULL. If used it will constrain the effects of " - "Hint selections. When used in a Setting instance " - "associated to a Volume, this property is set to the " - "specific value of ExtentStripeLength." ), - MinValue ( 1 ), - ModelCorrespondence { - "CIM_StorageSetting.ExtentStripeLengthMin", - "CIM_StorageSetting.ExtentStripeLength" }] - uint16 ExtentStripeLengthMax; - - [Write, Description ( - "ParityLayout specifies whether a parity-based storage " - "organization is using rotated or non-rotated parity. " - "When used in a goal setting instance, ParityLayout is " - "the desired value. It MUST be set to NULL if the scoping " - "StorageCapablities indicates that it is not supported in " - "this context. If the property is supported, and is part " - "of StorageSettingWithHints it MAY be set to NULL. If " - "used it will constrain the effects of Hint selections. " - "When used in a Setting instance associated to a Volume, " - "this property indicates the specific value that the " - "Volume was created with." ), - ValueMap { "1", "2" }, - Values { "Non-rotated Parity", "Rotated Parity" }] - uint16 ParityLayout; - - [Write, Description ( - "UserDataStripeDepth describes the number of bytes " - "forming a strip in common striping-based storage " - "organizations. The strip is defined as the size of the " - "portion of a stripe that lies on one extent. Thus, " - "ExtentStripeLength * UserDataStripeDepth will yield the " - "size of one stripe of user data. When used in a goal " - "setting instance, UserDataStripeDepth is the optimal " - "desired value. The bounds (max and min) for Stripe Depth " - "are defined using the properties UserDataStripeDepthMax " - "and UserDataStripeDepthMin. UserDataStripeDepth MUST be " - "set to NULL if the scoping StorageCapablities indicates " - "that it is not supported in this context. If the " - "property is supported, and is part of " - "StorageSettingWithHints it MAY be set to NULL. If used " - "it will constrain the effects of Hint selections. When " - "used in a Setting instance associated to a Volume, this " - "property indicates the specific value that the Volume " - "was created with, and UserDataStripeDepthMin and " - "UserDataStripeDepthMax will be set to the same specific " - "value." ), - Units ( "Bytes" ), - MinValue ( 1 ), - ModelCorrespondence { - "CIM_StorageSetting.UserDataStripeDepthMax", - "CIM_StorageSetting.UserDataStripeDepthMin" }] - uint64 UserDataStripeDepth; - - [Write, Description ( - "UserDataStripeDepth describes the number of bytes " - "forming a strip in common striping-based storage " - "organizations. The strip is defined as the size of the " - "portion of a stripe that lies on one extent. Thus, " - "ExtentStripeLength * UserDataStripeDepth will yield the " - "size of one stripe of user data. When used in a goal " - "setting instance, UserDataStripeDepthMin is the minimum " - "acceptable value. The desired Stripe Depth is specified " - "using UserDataStripeDepth, while the maximum is defined " - "by UserDataStripeDepthMax. UserDataStripeDepthMin MUST " - "be set to NULL if the scoping StorageCapablities " - "indicates that it is not supported in this context. If " - "the property is supported, and is part of " - "StorageSettingWithHints it MAY be set to NULL. If used " - "it will constrain the effects of Hint selections. When " - "used in a Setting instance associated to a Volume, this " - "property is set to the specific value of " - "UserDataStripeDepth." ), - Units ( "Bytes" ), - MinValue ( 1 ), - ModelCorrespondence { - "CIM_StorageSetting.UserDataStripeDepthMax", - "CIM_StorageSetting.UserDataStripeDepth" }] - uint64 UserDataStripeDepthMin; - - [Write, Description ( - "UserDataStripeDepth describes the number of bytes " - "forming a strip in common striping-based storage " - "organizations. The strip is defined as the size of the " - "portion of a stripe that lies on one extent. Thus, " - "ExtentStripeLength * UserDataStripeDepth will yield the " - "size of one stripe of user data. When used in a goal " - "setting instance, UserDataStripeDepthMax is the maximum " - "acceptable value. The desired Stripe Depth is specified " - "using UserDataStripeDepthGoal, while the minimum is " - "defined by UserDataStripeDepthMin. " - "UserDataStripeDepthMax MUST be set to NULL if the " - "scoping StorageCapablities indicates that it is not " - "supported in this context. If the property is supported, " - "and is part of StorageSettingwWithHints it MAY be set to " - "NULL. If used it will constrain the effects of Hint " - "selections. When used in a Setting instance associated " - "to a Volume, this property is set to the specific value " - "of UserDataStripeDepth." ), - Units ( "Bytes" ), - MinValue ( 1 ), - ModelCorrespondence { - "CIM_StorageSetting.UserDataStripeDepthMin", - "CIM_StorageSetting.UserDataStripeDepth" }] - uint64 UserDataStripeDepthMax; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_StorageSettingWithHints.mof b/build/vendor/dmtf_mof/Device/CIM_StorageSettingWithHints.mof deleted file mode 100644 index ecc72a3c..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_StorageSettingWithHints.mof +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_StorageSettingWithHints -// ================================================================== - [Version ( "2.7.1" ), - UMLPackagePath ( "CIM::Device::StorageServices" ), - Description ( - "This subclass of StorageSetting allows a client to specify " - "\'hint\'s for optimization of the volume performance. The " - "effect of these hints is implementation dependent." )] -class CIM_StorageSettingWithHints : CIM_StorageSetting { - - [Write, Description ( - "This hint is an indication from a client of the " - "importance placed on data availability. Values are " - "0=Don\'t Care to 10=Very Important." ), - MinValue ( 0 ), - MaxValue ( 10 )] - uint16 DataAvailabilityHint; - - [Write, Description ( - "This hint is an indication from a client of the " - "randomness of accesses. Values are 0=Entirely Sequential " - "to 10=Entirely Random." ), - MinValue ( 0 ), - MaxValue ( 10 )] - uint16 AccessRandomnessHint; - - [Write, Description ( - "This hint is an indication from a client of the " - "direction of accesses. Values are 0=Entirely Read to " - "10=Entirely Write." ), - MinValue ( 0 ), - MaxValue ( 10 )] - uint16 AccessDirectionHint; - - [Write, Description ( - "This hint is an indication from a client of the optimal " - "access sizes (in bytes). Since this property is an " - "array, several sizes can be specified." ), - Units ( "Bytes" ), - PUnit ( "byte" )] - uint16 AccessSizeHint[]; - - [Write, Description ( - "This hint is an indication from a client how important " - "access latency is. Values are 0=Don\'t Care to 10=Very " - "Important." ), - MinValue ( 0 ), - MaxValue ( 10 )] - uint16 AccessLatencyHint; - - [Write, Description ( - "This hint is an indication from a client of bandwidth " - "prioritization. Values are 0=Don\'t Care to 10=Very " - "Important." ), - MinValue ( 0 ), - MaxValue ( 10 )] - uint16 AccessBandwidthWeight; - - [Write, Description ( - "This hint is an indication of the importance the client " - "places on the cost of storage. Values are 0=Don\'t Care " - "to 10=Very Important. A StorageVolume provider might " - "choose to place data on low cost or high cost drives " - "based on this parameter." ), - MinValue ( 0 ), - MaxValue ( 10 )] - uint16 StorageCostHint; - - [Write, Description ( - "This hint is an indication of the importance placed on " - "storage space efficiency by the client. Values are " - "0=Don\'t Care to 10=Very Important. A StorageVolume " - "provider might choose different RAID levels based on " - "this hint." ), - MinValue ( 0 ), - MaxValue ( 10 )] - uint16 StorageEfficiencyHint; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_StorageSettingsAssociatedToCapabilities.mof b/build/vendor/dmtf_mof/Device/CIM_StorageSettingsAssociatedToCapabilities.mof deleted file mode 100644 index f8efa3a1..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_StorageSettingsAssociatedToCapabilities.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.11.0" ), - UMLPackagePath ( "CIM::Device::StorageServices" ), - Description ( - "This association define StorageSettings that reflect the " - "capabilities of the associated StorageCapabilities. The " - "associated StorageSetting may not define the operational " - "characteristics (through settings properties) of any storage " - "element. Certain StorageSetting instances can be defined as " - "\"Fixed = Not Changeable\" by using the \"ChangeableType\" " - "attribute. \"Fixed\" settings have this special association. " - "This association should be defined between \"Fixed - Not " - "Changeable\" instances of StorageSetting with the " - "StorageCapabilities instances that are associated with the " - "StoragePools which support the storage characteristics " - "described by the StorageSetting instance. \n" - "Fixed settings may be associated to many StorageCapabilities." )] -class CIM_StorageSettingsAssociatedToCapabilities : CIM_SettingAssociatedToCapabilities { - - [Override ( "Antecedent" ), - Description ( "The StorageCapabilities." )] - CIM_StorageCapabilities REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The fixed and predefined StorageSetting." )] - CIM_StorageSetting REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_StorageSettingsGeneratedFromCapabilities.mof b/build/vendor/dmtf_mof/Device/CIM_StorageSettingsGeneratedFromCapabilities.mof deleted file mode 100644 index 146f32b2..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_StorageSettingsGeneratedFromCapabilities.mof +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::StorageServices" ), - Description ( - "This association define StorageSettings that reflect the " - "capabilities of the associated StorageCapabilities. The " - "associated StorageSetting may not define the operational " - "characteristics (through settings properties) of any storage " - "element. StorageSettingsGeneratedFromCapabilities is the " - "association between instances of StorageCapabilities and those " - "instances of StorageSetting that have been created from the " - "StorageCapabilities instance using the StorageCapabilities " - "\"CreateSetting\" method. These settings have a " - "StorageSetting.ChangeableType of \"Changeable - Transient\" or " - "\"Changeable - Persistent\" The settings associated by this " - "class reflect the capabilities from which they are generated. " - "These setting SHALL be associated with one " - "StorageCapabilities. \n" - "A generated setting can be deleted by the implementation at " - "any time if it is a a StorageSetting of \"Changed - Transient\" " - "ChangeableType. \n" - "A client should not use this association to find transient " - "Settings to subsequently modify and/or use because that would " - "increase the likelihood of setting contention across clients. " - "Instead the implementation uses this association to define " - "transient settings, which can be located through any means, " - "that have special temporal based life cycle. \n" - "DefaultSetting is meaningless in this class." )] -class CIM_StorageSettingsGeneratedFromCapabilities : CIM_SettingAssociatedToCapabilities { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The StorageCapabilities." )] - CIM_StorageCapabilities REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The temporary and client generated StorageSetting." )] - CIM_StorageSetting REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_StorageSynchronized.mof b/build/vendor/dmtf_mof/Device/CIM_StorageSynchronized.mof deleted file mode 100644 index bd62d9b3..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_StorageSynchronized.mof +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_StorageSynchronized -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::StorageServices" ), - Description ( - "Indicates that two Storage objects were replicated at the " - "specified point in time. If the CopyType property is set to " - "\'Sync\' (=3), then synchronization of the Storage objects is " - "preserved." )] -class CIM_StorageSynchronized : CIM_Synchronized { - - [Override ( "SystemElement" ), - Description ( - "SystemElement represents the Storage that is the source " - "of the replication." )] - CIM_ManagedElement REF SystemElement; - - [Override ( "SyncedElement" ), - Description ( - "SyncedElement represents the Storage that is the target " - "of the replication." )] - CIM_ManagedElement REF SyncedElement; - - [Description ( - "CopyType describes the Replication Policy. Values are: \n" - "Async: create and maintain an asynchronous copy of the " - "source. \n" - "Sync: create and maintain a synchronized copy of the " - "source. \n" - "UnSyncAssoc: create an unsynchronized copy and maintain " - "an association to the source." ), - ValueMap { "2", "3", "4", "..", "0x8000.." }, - Values { "Async", "Sync", "UnSyncAssoc", "DMTF Reserved", - "Vendor Specific" }] - uint16 CopyType; - - [Description ( - "ReplicaType provides information on how the Replica is " - "being maintained. Values are: \n" - "Full Copy: This indicates that a full copy of the source " - "object is (or will be) generated . \n" - "Before Delta: This indicates that the source object will " - "be maintained as a delta data from the replica. \n" - "After Delta: This indicates that the replica will be " - "maintained as delta data from the source object. \n" - "Log: This indicates that the replica object is being " - "maintained as a log of changes to the source. \n" - "Not Specified: The method of maintaining the copy is not " - "specified." ), - ValueMap { "0", "2", "3", "4", "5", "..", "0x8000.." }, - Values { "Not Specified", "Full Copy", "Before Delta", - "After Delta", "Log", "DMTF Reserved", "Vendor Specific" }] - uint16 ReplicaType; - - [Description ( - "SyncState describes the state of the association with " - "respect to Replication activity. Values are: \n" - "Initialized: The link to enable replication is " - "established. \n" - "PrepareInProgress: Preparation for Replication is in " - "progress. \n" - "Prepared: All necessary preparation has completed. \n" - "ResyncInProgress: Synchronization or Resynchronization " - "is in progress. \n" - "This may be the initial \'copy\' or subsequent changes " - "being copied. \n" - "Synchronized: An Async or Sync replication is currently " - "synchronized. When this value is set, SyncMaintained " - "will be true. \n" - "FractureInProgress: An operation to fracture an Async or " - "Sync replication is in progress. \n" - "Fractured: An Async or Sync replication is fractured. \n" - "QuiesceInProgress: A quiesce operation is in progress. \n" - "Quiesced: The replication has been quiesced and is ready " - "for a change. \n" - "RestoreInProgress: An operation is in progress to copy " - "the Synced object to the System object. \n" - "Idle: The \'normal\' state for an UnSyncAssoc replica. \n" - "Broken: The relationship is non-functional due to errors " - "in the source, the target, the path between the two or " - "space constraints." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "..", "0x8000.." }, - Values { "Initialized", "PrepareInProgress", "Prepared", - "ResyncInProgress", "Synchronized", - "Fracture In Progress", "QuiesceInProgress", "Quiesced", - "Restore In Progresss", "Idle", "Broken", "Fractured", - "DMTF Reserved", "Vendor Specific" }] - uint16 SyncState; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_StorageVolume.mof b/build/vendor/dmtf_mof/Device/CIM_StorageVolume.mof deleted file mode 100644 index bb242e2c..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_StorageVolume.mof +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_StorageVolume -// ================================================================== - [Version ( "2.13.0" ), - UMLPackagePath ( "CIM::Device::StorageExtents" ), - Description ( - "A StorageVolume is a StorageExtent that is published for use " - "outside of the scoping System. For SCSI storage target " - "devices, StorageVolumes are used to represent target Block " - "devices, (peripheral device type codes 0h (i.e, " - "direct-access), 4h (i.e., write-once), 5h (i.e., CD/DVD), 7h " - "(i.e., optical memory), and Eh (i.e., simplified " - "direct-access).); \n" - "Stream devices, (peripheral device type codes 1h (i.e., \n" - "sequential-access) and 3h (i.e., processor).). \n" - "In these case, StorageVolume.Name will be derived from SCSI " - "volume as documented in StorageExtent.Nameformat and " - "NameNamespace Descriptions. \n" - "\n" - "The \'Exported\' value from StorageExtent.ExtentStatus[] MUST " - "be in all instances of StorageVolume to maintain the semantic " - "of \'published\' described above." )] -class CIM_StorageVolume : CIM_StorageExtent { - - [Override ( "Name" ), - Description ( "A unique identifier for the Volume." ), - MappingStrings { "ANSI|T10|SCSI SPC-3|8.6" }, - ModelCorrespondence { "CIM_StorageVolume.NameFormat" }] - string Name; - - [Override ( "NameFormat" ), - Description ( - "A subset of StorageExtent name formats apply to StorageVolumes." - ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11" }, - Values { "Unknown", "Other", "VPD83NAA6", "VPD83NAA5", - "VPD83Type2", "VPD83Type1", "VPD83Type0", "SNVM", - "NodeWWN", "NAA", "EUI64", "T10VID" }] - uint16 NameFormat; - - [Override ( "NameNamespace" ), - Description ( - "A subset of StorageExtent name spaces apply to StorageVolume." - ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7" }, - Values { "Unknown", "Other", "VPD83Type3", "VPD83Type2", - "VPD83Type1", "VPD80", "NodeWWN", "SNVM" }] - uint16 NameNamespace; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_SuppliesPower.mof b/build/vendor/dmtf_mof/Device/CIM_SuppliesPower.mof deleted file mode 100644 index 32eb93b4..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_SuppliesPower.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Association, Version ( "2.19.1" ), - UMLPackagePath ( "CIM::Device::CoolingAndPower" ), - Description ( - "The SuppliesPower relationship indicates that a " - "ManagedSystemElementis in the power domain of the referenced " - "PowerSource. It indicates which ManagedSystemElements are " - "dependent on the PowerSource, and therefore, which " - "ManagedSystemElements are affected if the PowerSource is lost." )] -class CIM_SuppliesPower : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The Supply that is providing power." )] - CIM_PowerSupply REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "A ManagedSystemElement in the power domain of the Supply." )] - CIM_ManagedSystemElement REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_Tachometer.mof b/build/vendor/dmtf_mof/Device/CIM_Tachometer.mof deleted file mode 100644 index ee1c9ff5..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_Tachometer.mof +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_Tachometer -// ================================================================== - [Deprecated { "CIM_NumericSensor" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::Sensors" ), - Description ( - "The use of this class is deprecated in lieu of the additions " - "to Sensor and NumericSensor. A Tachometer can be defined by " - "setting the SensorType property. inherited from Sensor, to 5 " - "(\"Tachometer\")." )] -class CIM_Tachometer : CIM_NumericSensor { - - [Deprecated { "No value" }, - Override ( "SensorType" )] - uint16 SensorType = 5; - - [Deprecated { "No value" }, - Override ( "BaseUnits" )] - uint16 BaseUnits = 38; - - [Deprecated { "No value" }, - Override ( "UnitModifier" )] - sint32 UnitModifier = 1; - - [Deprecated { "No value" }, - Override ( "RateUnits" )] - uint16 RateUnits = 4; - - [Deprecated { "No value" }, - Override ( "Resolution" ), - Units ( "Tenths of Revolutions per Minute" ), - PUnit ( "revolution / minute * 10^-1" )] - uint32 Resolution; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_TapeDrive.mof b/build/vendor/dmtf_mof/Device/CIM_TapeDrive.mof deleted file mode 100644 index ec3f7d9e..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_TapeDrive.mof +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_TapeDrive -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageDevices" ), - Description ( - "Capabilities and managment of a TapeDrive, a subtype of " - "MediaAccessDevice." )] -class CIM_TapeDrive : CIM_MediaAccessDevice { - - [Description ( - "EOTWarningZoneSize indicates the size, in bytes, of the " - "area designated as \'end of tape\'. Access in this area " - "generates an \'end of tape\' warning." ), - Units ( "Bytes" ), - PUnit ( "byte" )] - uint32 EOTWarningZoneSize; - - [Description ( "Maximum partition count for the TapeDrive." )] - uint32 MaxPartitionCount; - - [Description ( - "Padding indicates the number of bytes inserted between " - "blocks on a tape Media." ), - Units ( "Bytes" ), - PUnit ( "byte" )] - uint32 Padding; - - [Description ( - "Time in milliseconds to move from the most physically " - "distant point on the tape to the beginning." ), - Units ( "MilliSeconds" ), - PUnit ( "second * 10^-3" )] - uint64 MaxRewindTime; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_TapePartition.mof b/build/vendor/dmtf_mof/Device/CIM_TapePartition.mof deleted file mode 100644 index 514187f7..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_TapePartition.mof +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_TapePartition -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageExtents" ), - Description ( - "Capabilities and management of a TapePartition StorageExtent. " - "Note that if a PhysicalTape is not partitioned, only a generic " - "StorageExtent that represents the entire Tape should be " - "instantiated. TapePartitions may be BasedOn other " - "StorageExtents or directly Realized on a PhysicalTape." )] -class CIM_TapePartition : CIM_MediaPartition { - - [Override ( "NameFormat" ), - Description ( "TapePartition names are application specific." ), - ValueMap { "0", "1" }, - Values { "Other", "Unknown" }] - uint16 NameFormat = 1; - - [Override ( "NameNamespace" ), - Description ( "TapePartition names are application specific." ), - ValueMap { "0", "1" }, - Values { "Other", "Unknown" }] - uint16 NameNamespace = 1; - - [Description ( - "Number of blocks that are currently unused/not written " - "on the Partition. When this number is multiplied by the " - "BlockSize, inherited from StorageExtent, the total " - "number of bytes available for writing can be computed." ), - Gauge] - uint64 UnusedBlocks; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_TapePartitionOnSurface.mof b/build/vendor/dmtf_mof/Device/CIM_TapePartitionOnSurface.mof deleted file mode 100644 index 763a6226..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_TapePartitionOnSurface.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_TapePartitionOnSurface -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageExtents" ), - Description ( - "TapePartitionOnSurface represents the ability to have one or " - "more TapePartitions on each surface of a PhysicalTape. The " - "individual surfaces are represented as instances of " - "CIM_StorageExtent." )] -class CIM_TapePartitionOnSurface : CIM_BasedOn { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "The StorageExtent that represents the Tape\'s surface." )] - CIM_StorageExtent REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The TapePartition which is built on the Extent." )] - CIM_TapePartition REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_TemperatureSensor.mof b/build/vendor/dmtf_mof/Device/CIM_TemperatureSensor.mof deleted file mode 100644 index 7c4ee852..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_TemperatureSensor.mof +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_TemperatureSensor -// ================================================================== - [Deprecated { "CIM_NumericSensor" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::Sensors" ), - Description ( - "The use of this class is being deprecated in lieu of the " - "additions to Sensor and Numeric Sensor. A TemperatureSensor " - "can be defined by setting the SensorType property, inherited " - "from Sensor, to 2 (\"Temperature\")." )] -class CIM_TemperatureSensor : CIM_NumericSensor { - - [Deprecated { "No Value" }, - Override ( "SensorType" )] - uint16 SensorType = 2; - - [Deprecated { "No Value" }, - Override ( "BaseUnits" )] - uint16 BaseUnits = 2; - - [Deprecated { "No Value" }, - Override ( "UnitModifier" )] - sint32 UnitModifier = -1; - - [Deprecated { "No Value" }, - Override ( "RateUnits" )] - uint16 RateUnits = 0; - - [Deprecated { "No Value" }, - Override ( "CurrentReading" ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.5" }] - sint32 CurrentReading; - - [Deprecated { "No Value" }, - Override ( "NominalReading" ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.6" }] - sint32 NominalReading; - - [Deprecated { "No Value" }, - Override ( "NormalMax" ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.7" }] - sint32 NormalMax; - - [Deprecated { "No Value" }, - Override ( "NormalMin" ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.8" }] - sint32 NormalMin; - - [Deprecated { "No Value" }, - Override ( "MaxReadable" ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.9" }] - sint32 MaxReadable; - - [Deprecated { "No Value" }, - Override ( "MinReadable" ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.10" }] - sint32 MinReadable; - - [Deprecated { "No Value" }, - Override ( "Resolution" ), - Units ( "Hundredths of Degrees C" ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.17" }, - PUnit ( "degree celsius * 10^-2" )] - uint32 Resolution; - - [Deprecated { "No Value" }, - Override ( "Tolerance" ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.18" }] - sint32 Tolerance; - - [Deprecated { "No Value" }, - Override ( "Accuracy" ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.19" }] - sint32 Accuracy; - - [Deprecated { "No Value" }, - Override ( "LowerThresholdNonCritical" ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.11" }] - sint32 LowerThresholdNonCritical; - - [Deprecated { "No Value" }, - Override ( "UpperThresholdNonCritical" ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.12" }] - sint32 UpperThresholdNonCritical; - - [Deprecated { "No Value" }, - Override ( "LowerThresholdCritical" ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.13" }] - sint32 LowerThresholdCritical; - - [Deprecated { "No Value" }, - Override ( "UpperThresholdCritical" ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.14" }] - sint32 UpperThresholdCritical; - - [Deprecated { "No Value" }, - Override ( "LowerThresholdFatal" ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.15" }] - sint32 LowerThresholdFatal; - - [Deprecated { "No Value" }, - Override ( "UpperThresholdFatal" ), - MappingStrings { "MIF.DMTF|Temperature Probe|002.16" }] - sint32 UpperThresholdFatal; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_TokenRingAdapter.mof b/build/vendor/dmtf_mof/Device/CIM_TokenRingAdapter.mof deleted file mode 100644 index 73a17718..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_TokenRingAdapter.mof +++ /dev/null @@ -1,338 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_TokenRingAdapter -// ================================================================== - [Deprecated { "CIM_TokenRingAdapter" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::NetworkAdapter" ), - Description ( - "Note: The use of the CIM_TokenRingAdapter class has been " - "deprecated, consistent with NetworkAdapter. Instead use the " - "CIM_TokenRingPort class. \n" - "Deprecated description: This class describes the capabilities " - "and management aspects of a TokenRingAdapter." )] -class CIM_TokenRingAdapter : CIM_NetworkAdapter { - - [Deprecated { "CIM_TokenRingAdapter.NetworkAddresses" }, - Override ( "NetworkAddresses" ), - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Token Ring/802.5 MAC addresses " - "formatted as twelve hexadecimal digits (for example, " - "\"010203040506\"), with each pair representing one of " - "the six octets of the MAC address in \"canonical\" bit " - "order. (Therefore, the Group address bit is found in the " - "low order bit of the first character of the string.)" ), - ArrayType ( "Indexed" )] - string NetworkAddresses[]; - - [Deprecated { "CIM_TokenRingPort.MaxDataSize" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The maximum size of the INFO " - "(non-MAC) field that will be received or transmitted." ), - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dTpPortMaxInfo" }] - uint32 MaxDataSize; - - [Deprecated { "CIM_TokenRingPort.Capabilities" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Capabilities of the " - "TokenRingAdapter. For example, the Device might support " - "AlertOnLan, WakeOnLan, Load Balancing, or Failover. If " - "failover or load balancing capabilities are listed, a " - "SpareGroup (failover) or ExtraCapacityGroup (load " - "balancing) should also be defined to completely describe " - "the capability." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "AlertOnLan", "WakeOnLan", - "FailOver", "LoadBalancing" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_TokenRingPort.CapabilityDescriptions" }] - uint16 Capabilities[]; - - [Deprecated { "CIM_TokenRingPort.CapabilityDescriptions" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: An array of free-form strings " - "that provides more detailed explanations for any of the " - "TokenRingAdapter features that are indicated in the " - "Capabilities array. Note, each entry of this array is " - "related to the entry in the Capabilities array that is " - "located at the same index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_TokenRingAdapter.Capabilities" }] - string CapabilityDescriptions[]; - - [Deprecated { "CIM_TokenRingPort.EnabledCapabilities" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: Specifies which of the " - "capabilities from the \"Capabilities\" property are " - "currently enabled." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "AlertOnLan", "WakeOnLan", - "FailOver", "LoadBalancing" }, - ModelCorrespondence { "CIM_TokenRingAdapter.Capabilities" }] - uint16 EnabledCapabilities[]; - - [Deprecated { "CIM_TokenRingPort.RingStatus" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The current status that can be " - "used to diagnose fluctuating problems that can occur on " - "token rings, after a station has successfully been added " - "to the ring. Before an open is completed, this object " - "contains the value that indicates \"no status\" " - "(131072). (The RingState and RingOpenStatus properties " - "are also provided for debugging problems when the " - "station cannot even enter the ring.) The value of the " - "property is a sum of values, one for each currently " - "applicable condition. The following values are defined " - "for various conditions: \n" - "0=No Problems Detected, 32=Ring Recovery, 64=Single " - "Station, 256=Remove Received, 512=Reserved, 1024= " - "Auto-Removal Error, 2048=Lobe Wire Fault, 4096=Transmit " - "Beacon, 8192=Soft Error, 16384=Hard Error, 32768=Signal " - "Loss, 131072=No Status, Open Not Completed." ), - MappingStrings { - "MIB.IETF|IEEE 802.5 Token RingMIB.dot5RingStatus" }] - uint32 RingStatus; - - [Deprecated { "CIM_TokenRingPort.RingState" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The current Device state with " - "respect to entering or leaving the ring." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Opened", "Closed", "Opening", "Closing", - "Open Failure", "Ring Failure" }, - MappingStrings { - "MIB.IETF|IEEE 802.5 Token RingMIB.dot5RingState" }] - uint16 RingState; - - [Deprecated { "CIM_TokenRingPort.RingOpenStatus" }, - Description ( - "Note: The use of this property has been deprecated. \n" - "Deprecated description: This property indicates the " - "success, or the reason for failure, of the most recent " - "attempt of the station to enter the ring." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10" }, - Values { "No Open Attempted", "Bad Parameter", "Lobe Failed", - "Signal Loss", "Insertion Timeout", "Ring Failed", - "Beaconing", "Duplicate MAC", "Request Failed", - "Remove Received", - // 10 - "Last Open Successful" }, - MappingStrings { - "MIB.IETF|IEEE 802.5 Token RingMIB.dot5RingOpenStatus" }] - uint16 RingOpenStatus; - - [Deprecated { "CIM_TokenRingPort.RingSpeed" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The bandwidth of the ring." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "One Megabit", "Four Megabit", - "Sixteen Megabit" }, - MappingStrings { - "MIB.IETF|IEEE 802.5 Token RingMIB.dot5RingSpeed" }] - uint16 RingSpeed; - - [Deprecated { "CIM_TokenRingPortStatistics.BurstErrors" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: This counter is incremented when " - "a station detects the absence of transitions for five " - "half-bit timers (burst-five errors)." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token RingMIB.dot5StatsBurstErrors" }] - uint32 BurstErrors; - - [Deprecated { "CIM_TokenRingPortStatistics.ACErrors" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: This counter is incremented when " - "a station receives an AMP or SMP frame in which A is " - "equal to C, and C is equal to 0, and then receives " - "another SMP frame with A equal to C, and C equal to 0 " - "without first receiving an AMP frame. This condition " - "indicates a station that cannot set the AC bits " - "properly." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token RingMIB.dot5StatsACErrors" }] - uint32 ACErrors; - - [Deprecated { "CIM_TokenRingPortStatistics.AbortTransErrors" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: This counter is incremented when " - "a station transmits an abort delimiter while " - "transmitting data." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5StatsAbortTransErrors" }] - uint32 AbortTransErrors; - - [Deprecated { "CIM_TokenRingPortStatistics.InternalErrors" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: This counter is incremented when " - "a station recognizes an internal error." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5StatsInternalErrors" }] - uint32 InternalErrors; - - [Deprecated { "CIM_TokenRingPortStatistics.LostFrameErrors" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: This counter is incremented when " - "a station is transmitting and its TRR timer expires. " - "This result indicates a condition where a transmitting " - "station in strip mode does not receive the trailer of " - "the frame before the TRR timer goes off." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5StatsLostFrameErrors" }] - uint32 LostFrameErrors; - - [Deprecated { "CIM_TokenRingPortStatistics.ReceiveCongestions" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: This counter is incremented when " - "a station recognizes a frame addressed to its specific " - "address but has no available buffer space, which " - "indicates that the station is congested." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5StatsReceiveCongestions" }] - uint32 ReceiveCongestions; - - [Deprecated { "CIM_TokenRingPortStatistics.FrameCopiedErrors" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: This counter is incremented when " - "a station recognizes a frame that is addressed to its " - "specific address and detects that the FS field A bits " - "are set to 1, which indicates a possible line hit or " - "duplicate address." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5StatsFrameCopiedErrors" }] - uint32 FrameCopiedErrors; - - [Deprecated { "CIM_TokenRingPortStatistics.TokenErrors" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: This counter is incremented when " - "a station that acts as the active monitor recognizes an " - "error condition that needs a token transmitted." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token RingMIB.dot5StatsTokenErrors" }] - uint32 TokenErrors; - - [Deprecated { "CIM_TokenRingPortStatistics.SoftErrors" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of Soft Errors that " - "the Device has detected. This method directly " - "corresponds to the number of Report Error MAC frames " - "that this Device has transmitted. Soft Errors are those " - "that are recoverable by the MAC layer protocols." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token RingMIB.dot5StatsSoftErrors" }] - uint32 SoftErrors; - - [Deprecated { "CIM_TokenRingPortStatistics.HardErrors" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of times that this " - "Device has detected an immediately recoverable fatal " - "error. This method indicates the number of times that " - "this Device is either transmitting or receiving beacon " - "MAC frames." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token RingMIB.dot5StatsHardErrors" }] - uint32 HardErrors; - - [Deprecated { "CIM_TokenRingPortStatistics.SignalLossCount" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of times that this " - "Device has detected the loss of signal condition from " - "the ring." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token RingMIB.dot5StatsSignalLoss" }] - uint32 SignalLossCount; - - [Deprecated { "CIM_TokenRingPortStatistics.TransmittedBeacons" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of times that this " - "Device has transmitted a beacon frame." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token RingMIB.dot5StatsTransmitBeacons" }] - uint32 TransmittedBeacons; - - [Deprecated { "CIM_TokenRingPortStatistics.Recoverys" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of Claim Token MAC " - "frames that are received or transmitted after the Device " - "has received a Ring Purge MAC frame. This counter " - "signifies the number of times that the ring has been " - "purged and is being recovered back into a normal " - "operating state." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token RingMIB.dot5StatsRecoverys" }] - uint32 Recoverys; - - [Deprecated { "CIM_TokenRingPortStatistics.LobeWires" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of times that the " - "Device has detected an open or short circuit in the lobe " - "data path. The adapter will be closed and RingState will " - "signify this condition." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token RingMIB.dot5StatsLobeWires" }] - uint32 LobeWires; - - [Deprecated { "CIM_TokenRingPortStatistics.Removes" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of times that the " - "Device has received a Remove Ring Station MAC frame " - "request. When this frame is received, the Device will " - "enter the close state and RingState will signify this " - "condition." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token RingMIB.dot5StatsRemoves" }] - uint32 Removes; - - [Deprecated { "CIM_TokenRingPortStatistics.Singles" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of times that the " - "Device has sensed that it is the only station on the " - "ring. This situation occurs if the Device is the first " - "one up on a ring or if there is a hardware problem." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token RingMIB.dot5StatsSingles" }] - uint32 Singles; - - [Deprecated { "CIM_TokenRingPortStatistics.FrequencyErrors" }, - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The number of times that the " - "Device has detected that the frequency of the incoming " - "signal differs from the expected frequency by more than " - "that specified by the IEEE 802.5 standard." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token RingMIB.dot5StatsFreqErrors" }] - uint32 FrequencyErrors; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_TokenRingPort.mof b/build/vendor/dmtf_mof/Device/CIM_TokenRingPort.mof deleted file mode 100644 index 57c4d71d..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_TokenRingPort.mof +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_TokenRingPort -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Ports" ), - Description ( "Capabilities and management of a TokenRingPort." )] -class CIM_TokenRingPort : CIM_NetworkPort { - - [Override ( "NetworkAddresses" ), - Description ( - "Token Ring/802.5 MAC addresses formatted as twelve " - "hexadecimal digits (for example,\"010203040506\"), with " - "each pair representing one of the six octets of the MAC " - "address in \"canonical\" bit order. (Therefore, the " - "Group address bit is found in the low order bit of the " - "first character of the string.)" )] - string NetworkAddresses[]; - - [Description ( - "The maximum size of the INFO (non-MAC) field that will " - "be received or transmitted." ), - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dTpPortMaxInfo" }] - uint32 MaxDataSize; - - [Description ( - "Capabilities of the TokenRingPort. For example, the " - "Device might support AlertOnLan, WakeOnLan, Load " - "Balancing, or Failover. If failover or load balancing " - "capabilities are listed, a SpareGroup (failover) or " - "ExtraCapacityGroup (load balancing) should also be " - "defined to completely describe the capability." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "AlertOnLan", "WakeOnLan", - "FailOver", "LoadBalancing" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_TokenRingPort.CapabilityDescriptions" }] - uint16 Capabilities[]; - - [Description ( - "An array of free-form strings that provides more " - "detailed explanations for any of the TokenRingAPort " - "features that are indicated in the Capabilities array. " - "Note, each entry of this array is related to the entry " - "in the Capabilities array that is located at the same " - "index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_TokenRingPort.Capabilities" }] - string CapabilityDescriptions[]; - - [Description ( - "Specifies which of the capabilities from the " - "\"Capabilities\" property are currently enabled." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "AlertOnLan", "WakeOnLan", - "FailOver", "LoadBalancing" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_TokenRingPort.Capabilities", - "CIM_TokenRingPort.OtherEnabledCapabilities" }] - uint16 EnabledCapabilities[]; - - [Description ( - "An array of free-form strings that provides more " - "detailed explanations for any of the enabled " - "capabilities that are specified as \'Other\'." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_TokenRingPort.EnabledCapabilities" }] - string OtherEnabledCapabilities[]; - - [Description ( - "The current status that can be used to diagnose " - "fluctuating problems that can occur on token rings, " - "after a station has successfully been added to the ring. " - "Before an open is completed, this object contains the " - "value that indicates \"no status\" (131072). (The " - "RingState and RingOpenStatus properties are also " - "provided for debugging problems when the station cannot " - "even enter the ring.) The value of the property is a sum " - "of values, one for each currently applicable condition. " - "The following values are defined for various conditions: \n" - "0 = No Problems Detected, 32 = Ring Recovery, 64 = " - "Single Station, 256 = Remove Received, 512 = Reserved, " - "1024 = Auto-Removal Error, 2048 = Lobe Wire Fault, 4096 " - "= Transmit Beacon, 8192 = Soft Error, 16384 = Hard " - "Error, 32768 = Signal Loss, 131072 = No Status, Open Not " - "Completed." ), - MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5RingStatus" }] - uint32 RingStatus; - - [Description ( - "The current Device state with respect to entering or " - "leaving the ring." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Opened", "Closed", "Opening", "Closing", - "Open Failure", "Ring Failure" }, - MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5RingState" }] - uint16 RingState; - - [Description ( - "This property indicates the success, or the reason for " - "failure, of the most recent attempt by the station to " - "enter the ring." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10" }, - Values { "No Open Attempted", "Bad Parameter", "Lobe Failed", - "Signal Loss", "Insertion Timeout", "Ring Failed", - "Beaconing", "Duplicate MAC", "Request Failed", - "Remove Received", - // 10 - "Last Open Successful" }, - MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5RingOpenStatus" }] - uint16 RingOpenStatus; - - [Description ( "The bandwidth of the ring." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "One Megabit", "Four Megabit", - "Sixteen Megabit" }, - MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5RingSpeed" }] - uint16 RingSpeed; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_TokenRingPortStatistics.mof b/build/vendor/dmtf_mof/Device/CIM_TokenRingPortStatistics.mof deleted file mode 100644 index 6495f676..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_TokenRingPortStatistics.mof +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_TokenRingPortStatistics -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Ports" ), - Description ( - "The TokenRingPortStatistics class describes the statistics for " - "the TokenRingPort." )] -class CIM_TokenRingPortStatistics : CIM_NetworkPortStatistics { - - [Description ( - "This counter is incremented when a station detects the " - "absence of transitions for five half-bit timers " - "(burst-five errors)." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5StatsBurstErrors" }] - uint32 BurstErrors; - - [Description ( - "This counter is incremented when a station receives an " - "AMP or SMP frame in which A is equal to C and C is equal " - "to 0, and then receives another SMP frame with A equal " - "to C and C equal to 0 without first receiving an AMP " - "frame. This condition indicates a station that cannot " - "set the AC bits properly." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5StatsACErrors" }] - uint32 ACErrors; - - [Description ( - "This counter is incremented when a station transmits an " - "abort delimiter while transmitting data." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5StatsAbortTransErrors" }] - uint32 AbortTransErrors; - - [Description ( - "This counter is incremented when a station recognizes an " - "internal error." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5StatsInternalErrors" }] - uint32 InternalErrors; - - [Description ( - "This counter is incremented when a station is " - "transmitting and its TRR timer expires. This condition " - "indicates where a transmitting station in strip mode " - "does not receive the trailer of the frame before the TRR " - "timer goes off." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5StatsLostFrameErrors" }] - uint32 LostFrameErrors; - - [Description ( - "This counter is incremented when a station recognizes a " - "frame addressed to its specific address but has no " - "available buffer space, which indicates that the station " - "is congested." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5StatsReceiveCongestions" }] - uint32 ReceiveCongestions; - - [Description ( - "This counter is incremented when a station recognizes a " - "frame addressed to its specific address and detects that " - "the FS field A bits are set to 1, which indicates a " - "possible line hit or duplicate address." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5StatsFrameCopiedErrors" }] - uint32 FrameCopiedErrors; - - [Description ( - "This counter is incremented when a station acting as the " - "active monitor recognizes an error condition that needs " - "a token transmitted." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5StatsTokenErrors" }] - uint32 TokenErrors; - - [Description ( - "The number of Soft Errors that the Device has detected. " - "This condition directly corresponds to the number of " - "Report Error MAC frames that this Device has " - "transmitted. Soft Errors are those which are recoverable " - "by the MAC layer protocols." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5StatsSoftErrors" }] - uint32 SoftErrors; - - [Description ( - "The number of times this Device has detected an " - "immediately recoverable fatal error. The number of times " - "this Device is either transmitting or receiving beacon " - "MAC frames." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5StatsHardErrors" }] - uint32 HardErrors; - - [Description ( - "The number of times this Device has detected the loss of " - "a signal condition from the ring." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5StatsSignalLoss" }] - uint32 SignalLossCount; - - [Description ( - "The number of times this Device has transmitted a beacon frame." - ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5StatsTransmitBeacons" }] - uint32 TransmittedBeacons; - - [Description ( - "The number of Claim Token MAC frames that are received " - "or transmitted after the Device has received a Ring " - "Purge MAC frame. This counter signifies the number of " - "times that the ring has been purged and is being " - "recovered back into a normal operating state." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5StatsRecoverys" }] - uint32 Recoverys; - - [Description ( - "The number of times that the Device has detected an open " - "or short circuit in the lobe data path. The port will be " - "closed and RingState will signify this condition." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5StatsLobeWires" }] - uint32 LobeWires; - - [Description ( - "The number of times that the Device has received a " - "Remove Ring Station MAC frame request. When this frame " - "is received, the Device will enter the close state and " - "RingState will signify this condition." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5StatsRemoves" }] - uint32 Removes; - - [Description ( - "The number of times that the Device has sensed that it " - "is the only station on the ring. This condition occurs " - "if the Device is the first one up on a ring or if there " - "is a hardware problem." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5StatsSingles" }] - uint32 Singles; - - [Description ( - "The number of times that the Device has detected that " - "the frequency of the incoming signal differs from the " - "expected frequency by more than that specified by the " - "IEEE 802.5 standard." ), - Counter, MappingStrings { - "MIB.IETF|IEEE 802.5 Token Ring MIB.dot5StatsFreqErrors" }] - uint32 FrequencyErrors; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_USBConnection.mof b/build/vendor/dmtf_mof/Device/CIM_USBConnection.mof deleted file mode 100644 index dc876861..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_USBConnection.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_USBConnection -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::USB" ), - Description ( - "USBConnection associates a Device with the USBPort to which it " - "is connected." )] -class CIM_USBConnection : CIM_DeviceConnection { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The USBPort." )] - CIM_USBPort REF Antecedent; - - [Override ( "Dependent" ), - Max ( 1 ), - Description ( "The USBDevice that is connected to the Port." )] - CIM_USBDevice REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_USBController.mof b/build/vendor/dmtf_mof/Device/CIM_USBController.mof deleted file mode 100644 index b1dc1d97..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_USBController.mof +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_USBController -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( - "Capabilities and management of a USB Host Controller." )] -class CIM_USBController : CIM_Controller { - - [Description ( - "Indicates the latest USB Version that is supported by " - "the Controller. The property is expressed as a " - "Binary-Coded Decimal (BCD) where a decimal point is " - "implied between the second and third digits. For " - "example, a value of 0x201 indicates that version 2.01 is " - "supported." )] - uint16 USBVersion; - - [Description ( - "The type of interface used between the host-system " - "software and the USBController." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Other", "UHCI", "OHCI" }, - ModelCorrespondence { "CIM_USBController.ControllerVersion" }] - uint16 InterfaceType; - - [Description ( - "Indicates the version of the USB Host Controller " - "register set, specific to the InterfaceType. The " - "property is expressed as a Binary-Coded Decimal (BCD) " - "value where a decimal point is implied between the " - "second and third digits. For example, a value of 0x103 " - "indicates that version 1.03 is supported." ), - ModelCorrespondence { "CIM_USBController.InterfaceType" }] - uint16 ControllerVersion; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_USBControllerHasHub.mof b/build/vendor/dmtf_mof/Device/CIM_USBControllerHasHub.mof deleted file mode 100644 index 39f652bd..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_USBControllerHasHub.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_USBControllerHasHub -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::USB" ), - Description ( - "USBControllerHasHub defines the Hub(s) that are downstream of " - "the USBController." )] -class CIM_USBControllerHasHub : CIM_ControlledBy { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The USBController." )] - CIM_USBController REF Antecedent; - - [Override ( "Dependent" ), - Min ( 1 ), - Description ( - "The USBHub that is associated with the Controller." )] - CIM_USBHub REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_USBDevice.mof b/build/vendor/dmtf_mof/Device/CIM_USBDevice.mof deleted file mode 100644 index 4b201f71..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_USBDevice.mof +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Device::USB" ), - Description ( "The management characterisitics of a USB Device." )] -class CIM_USBDevice : CIM_LogicalDevice { - - [Description ( - "Indicates the latest USB Version supported by the USB " - "Device. The property is expressed as a Binary-Coded " - "Decimal (BCD) where a decimal point is implied between " - "the 2nd and 3rd digits. For example, a value of 0x201 " - "indicates that version 2.01 is supported." )] - uint16 USBVersion; - - [Description ( "Indicates the USB class code." ), - MappingStrings { - "Universal Serial Bus Specification.USB-IF|Standard Device Descriptor|bDeviceClass" }] - uint8 ClassCode; - - [Description ( "Indicates the USB subclass code." ), - MappingStrings { - "Universal Serial Bus Specification.USB-IF|Standard Device Descriptor|bDeviceSubClass" }] - uint8 SubclassCode; - - [Description ( "Indicates the USB protocol code." ), - MappingStrings { - "Universal Serial Bus Specification.USB-IF|Standard Device Descriptor|bDeviceProtocol" }] - uint8 ProtocolCode; - - [Description ( - "From the USB specification Device Descriptor, where " - "\'bcdUSB\' is the USB Specification Number, in " - "Binary-Coded Decimal format, that the device complies " - "with." ), - MappingStrings { - "Universal Serial Bus Specification.USB-IF|Standard Device Descriptor|bcdUSB" }] - uint16 USBVersionInBCD; - - [Description ( - "From the USB specification Device Descriptor, Maximum " - "Packet size for the USB zero endpoint. Valid sizes are " - "8, 16, 32, 64." ), - MappingStrings { - "Universal Serial Bus Specification.USB-IF|Standard Device Descriptor|bMaxPacketSize" }] - uint8 MaxPacketSize; - - [Description ( - "From the USB specification Device Descriptor, Vendor ID " - "assigned by USB.org." ), - MappingStrings { - "Universal Serial Bus Specification.USB-IF|Standard Device Descriptor|idVendor" }] - uint16 VendorID; - - [Description ( - "From the USB specification Device Descriptor, Product ID " - "assigned by manufacturer." ), - MappingStrings { - "Universal Serial Bus Specification.USB-IF|Standard Device Descriptor|idProduct" }] - uint16 ProductID; - - [Description ( - "From the USB specification Device Descriptor, Device " - "Release Number in Binary-Coded Decimal." ), - MappingStrings { - "Universal Serial Bus Specification.USB-IF|Standard Device Descriptor|bcdDevice" }] - uint16 DeviceReleaseNumber; - - [Description ( - "From the USB specification Device Descriptior, " - "Manufacturer string." ), - MappingStrings { - "Universal Serial Bus Specification.USB-IF|Standard Device Descriptor|iManufacturer" }] - string Manufacturer; - - [Description ( - "From the USB specification Device Descriptor, Product String." - ), - MappingStrings { - "Universal Serial Bus Specification.USB-IF|Standard Device Descriptor|iProduct" }] - string Product; - - [Description ( - "From the USB specification Device Descriptor, Serial " - "Number String." ), - MappingStrings { - "Universal Serial Bus Specification.USB-IF|Standard Device Descriptor|iSerialNumber" }] - string SerialNumber; - - [Description ( - "Number of device configurations that are defined for the Device." - ), - MappingStrings { - "Universal Serial Bus Specification.USB-IF|Standard Device Descriptor|bNumConfigurations" }] - uint8 NumberOfConfigs; - - [Description ( - "Indicates the configuration currently selected for the " - "Device. If this value is zero, the Device is " - "unconfigured." ), - ModelCorrespondence { "CIM_USBDevice.CurrentAlternateSettings" }] - uint8 CurrentConfigValue; - - [Description ( - "An array of USB \'alternate settings\' for each " - "interface in the currently selected configuration " - "(indicated by the CurrentConfigValue property). This " - "array has one entry for each interface in the " - "configuration. If the property, CurrentConfigValue, is " - "zero (indicating the Device is not configured), the " - "array is undefined. To understand how to parse this " - "octet string, refer to the USB Specification." ), - ModelCorrespondence { "CIM_USBDevice.CurrentConfigValue" }] - uint8 CurrentAlternateSettings[]; - - [Description ( - "CommandTimeout is configurable by management " - "applications supporting USB Redirections. When the " - "Redirection Service redirects a USBDevice command to a " - "remote device, and the remote device does not respond " - "before CommandTimout times out, the Redirection Service " - "will emulate a media eject event and re-try the command " - "and/or try to re-establish the connection to the remote " - "device. The timeout is expressed using the interval " - "format of the datetime type." )] - datetime CommandTimeout; - - - [Description ( - "This method returns the USBDevice Descriptor as " - "specified by the input parameters. Each parameter is " - "briefly described here with more detail in its Qualifier " - "list. RequestType is an input parameter that defines " - "whether the request is for standard, class or " - "vendor-specific information, as well as specifying the " - "recipient. RequestValue is also an input parameter and " - "defines the USB Descriptor Type and Index. RequestIndex " - "is an input parameter which describes the language used " - "to return a string Descriptor. RequestLength is both an " - "input and output parameter. It specifies the length of " - "the Descriptor that should be returned (on input) and " - "what is actually returned in the Buffer parameter (on " - "output). Buffer is an output parameter, containing the " - "Descriptor data. The GetDescriptor method returns an " - "integer value of 0 if the USB Descriptor is successfully " - "returned, 1 if the request is not supported and any " - "other number to indicate an error. \n" - "In a subclass, the set of possible return codes could be " - "specified, using a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \'translated\' " - "may also be specified in the subclass as a Values array " - "qualifier." )] - uint32 GetDescriptor( - [IN, Description ( - "RequestType is bit-mapped and identifies the type " - "of Descriptor request and the recipient. The type " - "of request may be \'standard\', \'class\' or " - "\'vendor-specific\'. The recipient may be " - "\'device\', \'interface\', \'endpoint\' or " - "\'other\'. Refer to the USB Specification for the " - "appropriate values for each bit." )] - uint8 RequestType, - [IN, Description ( - "RequestValue contains the Descriptor Type in the " - "high byte and the Descriptor Index (for example, " - "index or offset into the Descriptor array) in the " - "low byte. Refer to the USB Specification for more " - "information." )] - uint16 RequestValue, - [IN, Description ( - "RequestIndex defines the 2 byte Language ID code " - "used by the USBDevice when returning string " - "Descriptor data. The parameter is typically 0 for " - "non-string Descriptors. Refer to the USB " - "Specification for more information." )] - uint16 RequestIndex, - [IN, OUT, Description ( - "On input, RequestLength is the length (in octets) " - "of the Descriptor that should be returned. If this " - "value is less than the actual length of the " - "Descriptor, only the requested length will be " - "returned. If it is more than the actual length, " - "the actual length is returned. On output, this " - "parameter is the length, in octets, of the Buffer " - "being returned. If the requested Descriptor does " - "not exist, the contents of this parameter are " - "undefined." )] - uint16 RequestLength, - [IN ( false ), OUT, Description ( - "Buffer returns the requested Descriptor " - "information. If the Descriptor does not exist, the " - "contents of the Buffer are undefined." )] - uint8 Buffer[]); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_USBHub.mof b/build/vendor/dmtf_mof/Device/CIM_USBHub.mof deleted file mode 100644 index 20df5fdf..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_USBHub.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_USBHub -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::USB" ), - Description ( "USB Hub Device." )] -class CIM_USBHub : CIM_USBDevice { - - [Description ( - "Indicates whether power to the Hub Ports is individually " - "or gang-switched. If this value is FALSE, power is " - "switched individually for each Port. If this value is " - "TRUE, power is switched to all Ports on the Hub at once." )] - boolean GangSwitched; - - [Description ( - "Number of downstream Ports on the Hub, including those " - "embedded in the Hub\'s silicon. Individual USBPorts are " - "associated with the Hub using the USBPortOnHub " - "association." )] - uint8 NumberOfPorts; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_USBPort.mof b/build/vendor/dmtf_mof/Device/CIM_USBPort.mof deleted file mode 100644 index bb9af19b..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_USBPort.mof +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_USBPort -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::USB" ), - Description ( "A Port on a USBHub." )] -class CIM_USBPort : CIM_LogicalPort { - - [Override ( "Speed" ), - Description ( - "USB Port Speed in bits per second. This speed is " - "determined and set by the attached Device. The \'attached " - "Device\' is indicated using the USBConnection " - "association. At this time, only several Port speeds are " - "valid. These are: 1.5Mbps and 12Mbps. The value 0 can " - "also be specified to indicate that the current speed is " - "\'unknown\' or 1 to indicate that the speed is \'other\' " - "than 1.5 or 12Mbps." ), - ValueMap { "0", "1", "1500000", "12000000" }] - uint64 Speed; - - [Override ( "StatusInfo" ), - Description ( - "Indicates whether the Port is currently enabled." ), - ValueMap { "2", "3", "4" }, - Values { "Unknown", "Enabled", "Disabled" }] - uint16 StatusInfo; - - [Override ( "Availability" ), - Description ( - "Indicates whether the Port is currently Powered." ), - ValueMap { "2", "3", "7" }, - Values { "Unknown", "Running/Full Power", "Power Off" }] - uint16 Availability; - - [Description ( - "The USB Port\'s power capability. The current " - "specification defines that 1 or 5 loads can be supported " - "(values 2 or 3 would be specified, respectively)." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Other", "1 Unit Load", "5 Unit Loads" }] - uint16 Power; - - [Description ( - "Indicates whether the Port is currently Suspended." )] - boolean Suspended; - - [Description ( - "Indicates whether the Port is disabled due to an " - "overcurrent event." )] - boolean Overcurrent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_USBPortOnHub.mof b/build/vendor/dmtf_mof/Device/CIM_USBPortOnHub.mof deleted file mode 100644 index 6e9a6dd8..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_USBPortOnHub.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_USBPortOnHub -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::USB" ), - Description ( - "USBPortOnHub associates a USBPort or connection point with the " - "USBHub that includes it." )] -class CIM_USBPortOnHub : CIM_PortOnDevice { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The Hub that includes the USBPort." )] - CIM_USBHub REF Antecedent; - - [Override ( "Dependent" ), - Min ( 1 ), - Description ( "The Port on the USBHub." )] - CIM_USBPort REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_Unimodem.mof b/build/vendor/dmtf_mof/Device/CIM_Unimodem.mof deleted file mode 100644 index 797238f0..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_Unimodem.mof +++ /dev/null @@ -1,309 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_Unimodem -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Modems" ), - Description ( - "Unimodem is a POTSModem that supports the Unimodem 1.0 Specification." - )] -class CIM_Unimodem : CIM_POTSModem { - - [Description ( "Current call setup result code." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11" }, - Values { "No Previous Call", "No Dial Tone Detected", - "Reorder Signal Detected, Network Busy", - "Busy Signal Detected", "No Recognized Signal Detected", - "Voice Detected", "Text Telephone Detected", - "Data Answering Signal Detected", - "Data Calling Signal Detected", - "Fax Answering Signal Detected", - "Fax Calling Signal Detected", "V.8bis Signal Detected" }] - uint16 CallSetupResultCode; - - [Description ( "Current multimedia mode of the Unimodem." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10" }, - Values { "Data Only", "Fax Only", "Voice Only", "Voice View", - "ASVD V.61", "ASVD V.34Q", "DSVD Multi-Tech", "DSVD 1.2", - "DSVD V.70", "Video Telephony H.324", "Other V.80 Call" }] - uint16 MultiMediaMode; - - [Description ( - "Current DTE-DCE interface mode of the Unimodem, such as " - "asynchronous, V.80 transparent, or framed synchronous " - "modes." ), - ValueMap { "0", "1", "2" }, - Values { "Async Data", "V.80 Transparent Synchronous Mode", - "V.80 Framed Synchronous Mode" }] - uint16 DTEDCEInterfaceMode; - - [Description ( "The active transmit modulation scheme." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23..65535" }, - Values { "V.17 (G3 Fax Call)", "V.21", "V.22", "V.22bis", - "V.23 Constant Carrier (1200/75)", - "V.23 Switched Carrier (Half Duplex)", "V.26bis", - "V.26ter", "V.27ter (G3 Fax Call)", - "V.29 HD (G3 Fax Call)", "V.32", "V.32bis", "V.34", - "V.34 HD (G3 Fax Call)", "V.90 Issue 1 (Asymmetric)", - "V.90 Issue 2 (Symmetric)", "Reserved (V.58)", "X2", - "K56FLEX", "V.FC", "V.32terbo", "Bell 212A", "Bell 103", - "Reserved for Mfgs" }] - uint16 TransmitCarrierNegotiation; - - [Description ( "The active receive modulation scheme." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23..65535" }, - Values { "V.17 (G3 Fax Call)", "V.21", "V.22", "V.22bis", - "V.23 Constant Carrier (1200/75)", - "V.23 Switched Carrier (Half Duplex)", "V.26bis", - "V.26ter", "V.27ter (G3 Fax Call)", - "V.29 HD (G3 Fax Call)", "V.32", "V.32bis", "V.34", - "V.34 HD (G3 Fax Call)", "V.90 Issue 1 (Asymmetric)", - "V.90 Issue 2 (Symmetric)", "Reserved (V.58)", "X2", - "K56FLEX", "V.FC", "V.32terbo", "Bell 212A", "Bell 103", - "Reserved for Mfgs" }] - uint16 ReceiveCarrierNegotiation; - - [Description ( - "Initial transmit carrier data rate for the current or " - "last call, in bits per second." ), - Units ( "Bits per Second" ), - PUnit ( "bit / second" )] - uint32 InitialTransmitCarrierDataRate; - - [Description ( - "Initial receive carrier data rate for the current or " - "last call, in bits per second." ), - Units ( "Bits per Second" ), - PUnit ( "bit / second" )] - uint32 InitialReceiveCarrierDataRate; - - [Description ( - "The number of carrier retrains requested during the " - "current or last call." ), - Counter] - uint8 CarrierRetrainsRequested; - - [Description ( - "The number of carrier retrains granted during the " - "current or last call." ), - Counter] - uint8 CarrierRetrainsGranted; - - [Description ( - "Final transmit carrier data rate of the current or last " - "call, in bits per second." ), - Units ( "Bits per Second" ), - PUnit ( "bit / second" )] - uint32 FinalTransmitCarrierDataRate; - - [Description ( - "Final receive carrier data rate of the current or last " - "call, in bits per second." ), - Units ( "Bits per Second" ), - PUnit ( "bit / second" )] - uint32 FinalReceiveCarrierDataRate; - - [Description ( "Cause of last call termination." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26", "27", - "28", "29", "30", "31", "32", "33", "34", "35", "36", - "37", "38", "39", "40", "41", "42", "43", "44", "45", - "46", "47", "48", "49", "50" }, - Values { "Cause Unidentified", "No Previous Call", - "Call Is Still in Progress", - "Call Waiting Signal Detected", "Delayed", - "NMS Initiated Dial Call", - "NMS Initiated Leased Line Restoral", - "NMS Initiated Redial", "NMS Initiated Dial Disconnect", - "Power Loss", - // 10 - "Equipment Failure", - "Front Panel Disconnect Requested", - "Front Panel Leased Line Restoral", - "Automatic Leased Line Restoral", - "Inactivity Timer Expired", "cct116 Restoral Request", - "cct108 Is Off Inhibits Dial", "cct108 Turned Off", - "No Number Provided", "Blacklisted Number", - // 20 - "Call Attempts Limit Exceeded", - "Extension Phone Off Hook", - "Call Setup Fail Timer Expired", "Incoming Call Detected", - "Loop Current Interrupted", "No Dial Tone", - "Voice Detected", "Reorder Tone", "Sit Tone", - "Engaged Tone", - // 30 - "Long Space Disconnect", - "Carrier Lost", "Training Failed", - "No Modulation in Common", "Retrain Failed", - "Retrain Attempt Count Exceeded", - "GSTN Cleardown Received", "Fax Detected", "In Test Mode", - "Intrusive Self Test Initiated", - // 40 - "Any Key Abort", - "DTE Hangup Command", "DTE Reset Command", "Frame Reject", - "No Error Control Established", "Protocol Violation", - "n400 Exceeded", "Negotiation Failed", - "Disconnect Frame Received", "Sabme Frame Received", - // 50 - "Loss Of Synchronization" }] - uint16 TerminationCause; - - [Description ( - "Diagnostic Command Specification, Unimodem revision number." - )] - string UnimodemRevision; - - [Description ( - "Estimated noise level for the last or current call in " - "-dBm. Values are in the range of 0-100." ), - Units ( "-dBm" ), - Gauge, PUnit ( "decibel(m) * -1" )] - uint32 EstimatedNoiseLevel; - - [Description ( - "Normalized mean squared error for the last or current call." - )] - uint32 NormalizedMeanSquaredError; - - [Description ( - "Temporary carrier loss event count for the last or current call." - ), - Counter] - uint8 TemporaryCarrierLossEventCount; - - [Description ( - "Carrier Rate renegotiation event count for the last or " - "current call." ), - Counter] - uint8 CarrierRenegotiationEventCount; - - [Description ( - "Error Control frame size in bytes for the last or current call." - ), - Units ( "Bytes" ), - PUnit ( "byte" )] - uint16 ErrorControlFrameSize; - - [Description ( - "Error control link timeouts in transmission for the last " - "or current call." ), - Counter] - uint8 ErrorControlLinkTimeouts; - - [Description ( - "Error control link NAKs received for the last or current call." - ), - Counter] - uint8 ErrorControlLinkNAKs; - - [Description ( - "The flow control mechanism used in transmitting data." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Off", "DC1/DC3", "V.24 ckt 106/133" }] - uint16 TransmitFlowControl; - - [Description ( - "The flow control mechanism used in receiving data." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Off", "DC1/DC3", "V.24 ckt 106/133" }] - uint16 ReceiveFlowControl; - - [Description ( - "Number of transmit chars sent from the DTE for the last " - "or current call. A continuous connection might exceed " - "this value, given enough time. Typically these counters " - "are implemented as 32-bit counters, but additional bits " - "can be provided and are accounted for in this property. " - "If these counters hit maximum value, the DCE " - "manufacturer might roll over to 0." ), - Counter] - uint64 TransmitCharsSentFromDTE; - - [Description ( - "Number of receive chars sent to the DTE for the last or " - "current call. A continuous connection might exceed this " - "value, given enough time. Typically these counters are " - "implemented as 32-bit counters, but additional bits can " - "be provided and are accounted for in this property. If " - "these counters hit maximum value, the DCE manufacturer " - "might roll over to 0." ), - Counter] - uint64 ReceiveCharsSentToDTE; - - [Description ( - "Number of transmit characters lost for the last or " - "current call. A DCE might limit this counter to 16 bits, " - "but additional bits can be provided and are accounted " - "for in this property." ), - Counter] - uint64 TransmitCharsLost; - - [Description ( - "Number of receive characters lost for the last or " - "current call. A DCE might limit this counter to 16 bits, " - "but additional bits can be provided and are accounted " - "for in this property." ), - Counter] - uint64 ReceiveCharsLost; - - [Description ( - "Number of I-Frames transmitted for the last or current " - "call. A continuous connection might exceed this value, " - "given enough time. Typically these counters are " - "implemented as 32- bit counters, but additional bits can " - "be provided and are accounted for in this property. If " - "these counters hit maximum value, the DCE manufacturer " - "might roll over to 0." ), - Counter] - uint64 TransmitIFrameCount; - - [Description ( - "Number of I-Frames received for the last or current " - "call. A continuous connection might exceed this value, " - "given enough time. Typically these counters are " - "implemented as 32-bit counters, but additional bits can " - "be provided and are accounted for in this property. If " - "these counters hit maximum value, the DCE manufacturer " - "might roll over to 0." ), - Counter] - uint64 ReceiveIFrameCount; - - [Description ( - "Number of I-Frame errors detected for the last or " - "current call, if error control protocol is running. A " - "DCE might limit this counter to 16 bits, but additional " - "bits can be provided and are accounted for in this " - "property." ), - Counter] - uint64 TransmitIFrameErrorCount; - - [Description ( - "Number of I-Frame errors detected for the last or " - "current call, if error control protocol is running. A " - "DCE might limit this counter to 16 bits, but additional " - "bits can be provided and are accounted for in this " - "property." ), - Counter] - uint64 ReceivedIFrameErrorCount; - - [Description ( - "Number of Call waiting events detected for the last or " - "current call." ), - Counter] - uint8 CallWaitingEventCount; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_UninterruptiblePowerSupply.mof b/build/vendor/dmtf_mof/Device/CIM_UninterruptiblePowerSupply.mof deleted file mode 100644 index 86429446..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_UninterruptiblePowerSupply.mof +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_UninterruptiblePowerSupply -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::CoolingAndPower" ), - Description ( - "Capabilities and management of an UninterruptiblePowerSupply. " - "The properties of the UPS Device indicate when incoming power " - "is trimmed or boosted, and the aggregated information of the " - "batteries, generators, and so on that comprise the Device. " - "These individual components (for example, multiple batteries) " - "can also be independently modeled and associated with the UPS." )] -class CIM_UninterruptiblePowerSupply : CIM_PowerSupply { - - [Override ( "Range1InputVoltageLow" ), - Description ( - "If the voltage (in millivolts) drops below the value " - "specified by Range1InputVoltageLow, the UPS will " - "compensate by boosting the voltage using its power " - "sources. A value of 0 indicates that the voltage at " - "which boosting occurs is \'unknown\'." ), - Units ( "MilliVolts" ), - PUnit ( "volt * 10^-3" )] - uint32 Range1InputVoltageLow; - - [Override ( "Range1InputVoltageHigh" ), - Description ( - "If the voltage (in millivolts) rises above the value " - "specified by Range1InputVoltageHigh, the UPS will " - "compensate by trimming the voltage. A value of 0 " - "indicates that the voltage at which trimming occurs is " - "\'unknown\'." ), - Units ( "MilliVolts" ), - PUnit ( "volt * 10^-3" )] - uint32 Range1InputVoltageHigh; - - [Override ( "Range2InputVoltageLow" ), - Description ( - "If the voltage (in millivolts) drops below the value " - "specified by Range2InputVoltageLow, the UPS will " - "compensate by boosting the voltage using its power " - "sources. A value of 0 indicates that the voltage at " - "which boosting occurs is \'unknown\'." ), - Units ( "MilliVolts" ), - PUnit ( "volt * 10^-3" )] - uint32 Range2InputVoltageLow; - - [Override ( "Range2InputVoltageHigh" ), - Description ( - "If the voltage (in millivolts) rises above the value " - "specified by Range2InputVoltageHigh, the UPS will " - "compensate by trimming the voltage. A value of 0 " - "indicates that the voltage at which trimming occurs is " - "\'unknown\'." ), - Units ( "MilliVolts" ), - PUnit ( "volt * 10^-3" )] - uint32 Range2InputVoltageHigh; - - [Description ( - "The indication of the capacity that remains in the UPS " - "batteries, generator, and so on. A value of \"Normal\" " - "(2) indicates that the remaining estimated minutes of " - "run-time are greater than the \'low power\' state " - "defined for the UPS (typically two minutes). A value of " - "\"Low\" (3) indicates that the remaining estimated " - "minutes of run-time are less than or equal to the " - "defined \'low power\' state of the device. A value of " - "\"Depleted\" (4) indicates that the UPS will be unable " - "to sustain the present load when and if the utility " - "power is lost (including the possibility that the " - "utility power is currently absent)." ), - ValueMap { "1", "2", "3", "4" }, - Values { "Unknown", "Normal", "Low", "Depleted" }, - MappingStrings { "MIF.DMTF|UPS Battery|001.1" }] - uint16 RemainingCapacityStatus; - - [Description ( - "TimeOnBackup indicates the elapsed time in seconds since " - "the UPS last switched to battery power, generator, or so " - "on or the time since the UPS was last restarted, " - "whichever is less. 0 is returned if the UPS is \'on " - "line\'." ), - Units ( "Seconds" ), - MappingStrings { "MIF.DMTF|UPS Battery|001.2" }, - PUnit ( "second" )] - uint32 TimeOnBackup; - - [Description ( - "EstimatedRunTime is an estimate in minutes of the time " - "that depletion of the battery, generator, or other " - "device, will occur under the present load conditions if " - "the utility power is off or is lost and remains off." ), - Units ( "Minutes" ), - MappingStrings { "MIF.DMTF|UPS Battery|001.3" }, - PUnit ( "minute" )] - uint32 EstimatedRunTime; - - [Description ( - "An estimate of the percentage of full charge remaining " - "for a UPS (that uses battery technology)." ), - Units ( "Percent" ), - Gauge, MappingStrings { "MIF.DMTF|UPS Battery|001.4" }, - PUnit ( "percent" )] - uint16 EstimatedChargeRemaining; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_UserDevice.mof b/build/vendor/dmtf_mof/Device/CIM_UserDevice.mof deleted file mode 100644 index 068af849..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_UserDevice.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_UserDevice -// ================================================================== - [Abstract, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::UserDevices" ), - Description ( - "UserDevices are LogicalDevices that allow a ComputerSystem\'s " - "users to input, view or hear data. It is a superclass from " - "which other classes, such as Keyboard or DesktopMonitor, " - "descend." )] -class CIM_UserDevice : CIM_LogicalDevice { - - [Description ( - "An indication of whether the Device is locked, " - "preventing user input or output." )] - boolean IsLocked; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_VDSLModem.mof b/build/vendor/dmtf_mof/Device/CIM_VDSLModem.mof deleted file mode 100644 index c2fa863d..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_VDSLModem.mof +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_VDSLModem -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::Modems" ), - Description ( - "The VDSLmodem class represents Modems of the DSL type = VDSL, " - "Very high data rate Digital Subscriber Line. Properties will " - "be defined in a future release of the model." )] -class CIM_VDSLModem : CIM_DSLModem { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_VideoController.mof b/build/vendor/dmtf_mof/Device/CIM_VideoController.mof deleted file mode 100644 index a3cc59de..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_VideoController.mof +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Deprecate class.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_VideoController -// ================================================================== - [Deprecated { "CIM_DisplayController, CIM_VideoHead" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( - "Note: The use of the CIM_VideoController class has been " - "deprecated in lieu of CIM_DisplayController. Deprecated " - "description: Capabilities and management of the " - "VideoController." )] -class CIM_VideoController : CIM_Controller { - - [Deprecated { "No Value" }, - Override ( "Description" ), - MappingStrings { "MIF.DMTF|Video|004.18" }] - string Description; - - [Deprecated { "CIM_DisplayController.VideoProcessor" }, - Description ( - "A free-form string that describes the video processor or " - "Controller." )] - string VideoProcessor; - - [Deprecated { "CIM_DisplayController.VideoMemoryType" }, - Description ( - "An integer enumeration that indicates the type of video memory." - ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13" }, - Values { "Other", "Unknown", "VRAM", "DRAM", "SRAM", "WRAM", - "EDO RAM", "Burst Synchronous DRAM", - "Pipelined Burst SRAM", //10 - "CDRAM", "3DRAM", - "SDRAM", "SGRAM" }, - MappingStrings { "MIF.DMTF|Video|004.6" }] - uint16 VideoMemoryType; - - [Deprecated { "CIM_DisplayController.NumberOfVideoPages" }, - Description ( - "Number of video pages that are supported given the " - "current resolutions and available memory." )] - uint32 NumberOfVideoPages; - - [Deprecated { "CIM_DisplayController.MaxMemorySupported" }, - Description ( "Maximum amount of memory supported in bytes." ), - Units ( "Bytes" ), - PUnit ( "byte" )] - uint32 MaxMemorySupported; - - [Deprecated { "CIM_DisplayController.AcceleratorCapabilities" }, - Description ( - "An array of integers that indicates the graphics and 3D " - "capabilities of the VideoController." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Unknown", "Other", "Graphics Accelerator", - "3D Accelerator", "PCI Fast Write", - "MultiMonitor Support", "PCI Mastering", - "Second Monochrome Adapter Support", - "Large Memory Address Support" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_VideoController.CapabilityDescriptions" }] - uint16 AcceleratorCapabilities[]; - - [Deprecated { "CIM_DisplayController.CapabilityDescriptions" }, - Description ( - "An array of free-form strings that provides more " - "detailed explanations for any of the video Accelerator " - "features that are indicated in the Capabilities array. " - "Note, each entry of this array is related to the entry " - "in the Capabilities array that is located at the same " - "index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_VideoController.AcceleratorCapabilities" }] - string CapabilityDescriptions[]; - - [Deprecated { "CIM_VideoHead.CurrentBitsPerPixel" }, - Description ( - "The number of bits used to display each pixel." ), - Units ( "Bits" ), - MappingStrings { "MIF.DMTF|Video|004.12" }, - PUnit ( "bit" )] - uint32 CurrentBitsPerPixel; - - [Deprecated { "CIM_VideoHead.CurrentHorizontalResolution" }, - Description ( "Current number of horizontal pixels." ), - Units ( "Pixels" ), - MappingStrings { "MIF.DMTF|Video|004.11" }, - PUnit ( "pixel" )] - uint32 CurrentHorizontalResolution; - - [Deprecated { "CIM_VideoHead.CurrentVerticalResolution" }, - Description ( "Current number of vertical pixels." ), - Units ( "Pixels" ), - MappingStrings { "MIF.DMTF|Video|004.10" }, - PUnit ( "pixel" )] - uint32 CurrentVerticalResolution; - - [Deprecated { "CIM_VideoHead.MaxRefreshRate" }, - Description ( - "Maximum refresh rate of the VideoController in hertz." ), - Units ( "Hertz" ), - MappingStrings { "MIF.DMTF|Video|004.5" }, - PUnit ( "hertz" )] - uint32 MaxRefreshRate; - - [Deprecated { "CIM_VideoHead.MinRefreshRate" }, - Description ( - "Minimum refresh rate of the Video Controller in hertz." ), - Units ( "Hertz" ), - MappingStrings { "MIF.DMTF|Video|004.4" }, - PUnit ( "hertz" )] - uint32 MinRefreshRate; - - [Deprecated { "CIM_VideoHead.CurrentRefreshRate" }, - Description ( "Current refresh rate in hertz." ), - Units ( "Hertz" ), - MappingStrings { "MIF.DMTF|Video|004.15" }, - PUnit ( "hertz" )] - uint32 CurrentRefreshRate; - - [Deprecated { "CIM_VideoHead.CurrentScanMode" }, - Description ( - "Current scan mode. \"Interlaced\" (value=3) or \"Non " - "Interlaced\" (value=4) can be defined using this " - "property." ), - ValueMap { "1", "2", "3", "4" }, - Values { "Other", "Unknown", "Interlaced", "Non Interlaced" }, - MappingStrings { "MIF.DMTF|Video|004.8" }] - uint16 CurrentScanMode; - - [Deprecated { "CIM_VideoHead.CurrentNumberOfRows" }, - Description ( - "If in character mode, the number of rows for this Video " - "Controller. Otherwise, enter 0." ), - MappingStrings { "MIF.DMTF|Video|004.13" }] - uint32 CurrentNumberOfRows; - - [Deprecated { "CIM_VideoHead.CurrentNumberOfColumns" }, - Description ( - "If in character mode, the number of columns for this " - "VideoController. Otherwise, enter 0." ), - MappingStrings { "MIF.DMTF|Video|004.14" }] - uint32 CurrentNumberOfColumns; - - [Deprecated { "CIM_VideoHead.CurrentNumberOfColors" }, - Description ( - "The number of colors that are supported at the current " - "resolutions." )] - uint64 CurrentNumberOfColors; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_VideoControllerResolution.mof b/build/vendor/dmtf_mof/Device/CIM_VideoControllerResolution.mof deleted file mode 100644 index 1c8c60d0..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_VideoControllerResolution.mof +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Deprecate class.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_VideoControllerResolution -// ================================================================== - [Deprecated { "CIM_VideoHeadResolution" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( - "Note: The use of the CIM_VideoControllerResolutionclass has " - "been deprecated in lieu of CIM_VideoHeadResolution. \n" - "Deprecated description: \n" - "VideoControllerResolution describes the various video modes " - "that a VideoController can support. Video modes are defined by " - "the possible horizontal and vertical resolutions, refresh " - "rate, scan mode, and number of color settings that are " - "supported by a Controller. The actual resolutions and so on " - "that are in use are the values specified in the " - "VideoController object." )] -class CIM_VideoControllerResolution : CIM_Setting { - - [Deprecated { "No Value" }, - Key, Override ( "SettingID" ), - Description ( - "The inherited SettingID serves as part of the key for a " - "VideoControllerResolution instance." ), - MaxLen ( 256 )] - string SettingID; - - [Deprecated { "CIM_VideoHeadResolution.HorizontalResolution" }, - Description ( - "The horizontal resolution of the Controller in Pixels." ), - Units ( "Pixels" ), - MappingStrings { "MIF.DMTF|Monitor Resolutions|002.2" }, - ModelCorrespondence { - "CIM_VideoController.CurrentHorizontalResolution" }, - PUnit ( "pixel" )] - uint32 HorizontalResolution; - - [Deprecated { "CIM_VideoHeadResolution.VerticalResolution" }, - Description ( - "The vertical resolution of the Controller in Pixels." ), - Units ( "Pixels" ), - MappingStrings { "MIF.DMTF|Monitor Resolutions|002.3" }, - ModelCorrespondence { - "CIM_VideoController.CurrentVerticalResolution" }, - PUnit ( "pixel" )] - uint32 VerticalResolution; - - [Deprecated { "CIM_VideoHeadResolution.RefreshRate" }, - Description ( - "Refresh rate in hertz. If a range of rates is supported, " - "use the MinRefreshRate and MaxRefreshRate properties, " - "and set RefreshRate (this property) to 0." ), - Units ( "Hertz" ), - MappingStrings { "MIF.DMTF|Monitor Resolutions|002.4" }, - ModelCorrespondence { "CIM_VideoController.CurrentRefreshRate" }, - PUnit ( "hertz" )] - uint32 RefreshRate; - - [Deprecated { "CIM_VideoHeadResolution.MinRefreshRate" }, - Description ( - "Minimum refresh rate in hertz, when a range of rates is " - "supported at the specified resolutions." ), - Units ( "Hertz" ), - MappingStrings { "MIF.DMTF|Monitor Resolutions|002.6" }, - ModelCorrespondence { "CIM_VideoController.MinRefreshRate" }, - PUnit ( "hertz" )] - uint32 MinRefreshRate; - - [Deprecated { "CIM_VideoHeadResolution.MaxRefreshRate" }, - Description ( - "Maximum refresh rate in hertz, when a range of rates is " - "supported at the specified resolutions." ), - Units ( "Hertz" ), - MappingStrings { "MIF.DMTF|Monitor Resolutions|002.7" }, - ModelCorrespondence { "CIM_VideoController.MaxRefreshRate" }, - PUnit ( "hertz" )] - uint32 MaxRefreshRate; - - [Deprecated { "CIM_VideoHeadResolution.ScanMode" }, - Description ( - "Integer that indicates whether the Controller operates " - "in interlaced (value=5) or non-interlaced (value=4) " - "mode." ), - ValueMap { "1", "2", "3", "4", "5" }, - Values { "Other", "Unknown", "Not Supported", - "Non-Interlaced Operation", "Interlaced Operation" }, - MappingStrings { "MIF.DMTF|Monitor Resolutions|002.5" }, - ModelCorrespondence { "CIM_VideoController.CurrentScanMode" }] - uint16 ScanMode; - - [Deprecated { "CIM_VideoHeadResolution.NumberOfColors" }, - Description ( - "Number of colors that are supported at the current resolutions." - ), - ModelCorrespondence { - "CIM_VideoController.CurrentNumberOfColors" }] - uint64 NumberOfColors; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_VideoSetting.mof b/build/vendor/dmtf_mof/Device/CIM_VideoSetting.mof deleted file mode 100644 index 2a4fa2f1..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_VideoSetting.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Deprecate class.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_VideoSetting -// ================================================================== - [Association, Deprecated { "CIM_ElementSetting" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Controller" ), - Description ( - "Note: The use of the CIM_VideoSetting class has been " - "deprecated in lieu of CIM_ElementSetting. \n" - "Deprecated description: \n" - "VideoSetting associates the VideoControllerResolution Setting " - "with the Controllers to which it applies." )] -class CIM_VideoSetting : CIM_ElementSetting { - - [Deprecated { "CIM_ElementSetting.Element" }, - Override ( "Element" ), - Description ( "The VideoController." )] - CIM_VideoController REF Element; - - [Deprecated { "CIM_ElementSetting.Setting" }, - Override ( "Setting" ), - Description ( - "The resolutions, refresh rates, scan mode, and number of " - "colors that can be set for the Controller." )] - CIM_VideoControllerResolution REF Setting; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_VolatileStorage.mof b/build/vendor/dmtf_mof/Device/CIM_VolatileStorage.mof deleted file mode 100644 index 96bbe64b..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_VolatileStorage.mof +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_VolatileStorage -// ================================================================== - [Deprecated { "CIM_Memory" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::Memory" ), - Description ( "Capabilities and management of Volatile Storage." )] -class CIM_VolatileStorage : CIM_Memory { - - [Deprecated { "CIM_AssociatedCacheMemory" }, - Description ( - "Indicates whether this Memory can be cached or not." ), - MappingStrings { "MIF.DMTF|System Resource Memory Info|002.5" }] - boolean Cacheable; - - [Deprecated { "CIM_AssociatedCacheMemory.WritePolicy" }, - Description ( - "An enumeration indicating the cache type that is " - "compatible with this Memory. For example, 4 indicates " - "write-through cache. If the Cacheable property is set to " - "false, then this property does not have meaning and " - "should be set to 5, \"Not Applicable\"." ), - ValueMap { "1", "2", "3", "4", "5" }, - Values { "Other", "Unknown", "Write-Back", "Write-Through", - "Not Applicable" }, - MappingStrings { "MIF.DMTF|System Resource Memory Info|002.6" }] - uint16 CacheType; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_VoltageSensor.mof b/build/vendor/dmtf_mof/Device/CIM_VoltageSensor.mof deleted file mode 100644 index 8235a78c..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_VoltageSensor.mof +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_VoltageSensor -// ================================================================== - [Deprecated { "CIM_NumericSensor" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Device::Sensors" ), - Description ( - "The use of this class is being deprecated in lieu of the " - "additions to Sensor and NumericSensor. A VoltageSensor can be " - "defined by setting the SensorType property, inherited from " - "Sensor, to 3 (\"Voltage\")." )] -class CIM_VoltageSensor : CIM_NumericSensor { - - [Deprecated { "No value" }, - Override ( "SensorType" )] - uint16 SensorType = 3; - - [Deprecated { "No value" }, - Override ( "BaseUnits" )] - uint16 BaseUnits = 5; - - [Deprecated { "No value" }, - Override ( "UnitModifier" )] - sint32 UnitModifier = -3; - - [Deprecated { "No value" }, - Override ( "RateUnits" )] - uint16 RateUnits = 0; - - [Deprecated { "No value" }, - Override ( "CurrentReading" ), - MappingStrings { "MIF.DMTF|Voltage Probe|001.5" }] - sint32 CurrentReading; - - [Deprecated { "No value" }, - Override ( "NominalReading" ), - MappingStrings { "MIF.DMTF|Voltage Probe|001.6" }] - sint32 NominalReading; - - [Deprecated { "No value" }, - Override ( "NormalMax" ), - MappingStrings { "MIF.DMTF|Voltage Probe|001.7" }] - sint32 NormalMax; - - [Deprecated { "No value" }, - Override ( "NormalMin" ), - MappingStrings { "MIF.DMTF|Voltage Probe|001.8" }] - sint32 NormalMin; - - [Deprecated { "No value" }, - Override ( "MaxReadable" ), - MappingStrings { "MIF.DMTF|Voltage Probe|001.9" }] - sint32 MaxReadable; - - [Deprecated { "No value" }, - Override ( "MinReadable" ), - MappingStrings { "MIF.DMTF|Voltage Probe|001.10" }] - sint32 MinReadable; - - [Deprecated { "No value" }, - Override ( "Resolution" ), - Units ( "Tenths of MilliVolts" ), - MappingStrings { "MIF.DMTF|Voltage Probe|001.17" }, - PUnit ( "volt * 10^-4" )] - uint32 Resolution; - - [Deprecated { "No value" }, - Override ( "Tolerance" ), - MappingStrings { "MIF.DMTF|Voltage Probe|001.18" }] - sint32 Tolerance; - - [Deprecated { "No value" }, - Override ( "Accuracy" ), - MappingStrings { "MIF.DMTF|Voltage Probe|001.19" }] - sint32 Accuracy; - - [Deprecated { "No value" }, - Override ( "LowerThresholdNonCritical" ), - MappingStrings { "MIF.DMTF|Voltage Probe|001.11" }] - sint32 LowerThresholdNonCritical; - - [Deprecated { "No value" }, - Override ( "UpperThresholdNonCritical" ), - MappingStrings { "MIF.DMTF|Voltage Probe|001.12" }] - sint32 UpperThresholdNonCritical; - - [Deprecated { "No value" }, - Override ( "LowerThresholdCritical" ), - MappingStrings { "MIF.DMTF|Voltage Probe|001.13" }] - sint32 LowerThresholdCritical; - - [Deprecated { "No value" }, - Override ( "UpperThresholdCritical" ), - MappingStrings { "MIF.DMTF|Voltage Probe|001.14" }] - sint32 UpperThresholdCritical; - - [Deprecated { "No value" }, - Override ( "LowerThresholdFatal" ), - MappingStrings { "MIF.DMTF|Voltage Probe|001.15" }] - sint32 LowerThresholdFatal; - - [Deprecated { "No value" }, - Override ( "UpperThresholdFatal" ), - MappingStrings { "MIF.DMTF|Voltage Probe|001.16" }] - sint32 UpperThresholdFatal; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_VolumeSet.mof b/build/vendor/dmtf_mof/Device/CIM_VolumeSet.mof deleted file mode 100644 index 5874fa42..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_VolumeSet.mof +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_VolumeSet -// ================================================================== - [Deprecated { "CIM_CompositeExtent" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::SccExtents" ), - Description ( - "VolumeSet is deprecated in lieu of CompositeExtent, which " - "removes the restriction that the Set must be exported. A " - "VolumeSet can be used to model an SCC RAID implementation. " - "VolumeSets represent a contiguous range of logical blocks " - "presented to the operating environment. VolumeSets may " - "overlap. However, the underlying PhysicalExtents within the " - "overlap shall not contain any check data. They are BasedOn one " - "or more ProtectedSpaceExtents. These BasedOn associations " - "should be instantiated or subclassed as needed." )] -class CIM_VolumeSet : CIM_StorageVolume { - - [Deprecated { "CIM_CompositeExtent.NumberOfBlocks" }, - Override ( "NumberOfBlocks" ), - MappingStrings { "MIF.DMTF|Volume Set|001.3" }] - uint64 NumberOfBlocks; - - [Deprecated { "CIM_CompositeExtent.ExtentStripeLength" }, - Description ( - "Number of contiguous ProtectedSpaceExtents counted " - "before looping back to the first ProtectedSpaceExtent of " - "the current stripe. It is the number of Extents forming " - "the user data stripe." ), - MappingStrings { "MIF.DMTF|Volume Set|001.4" }] - uint64 PSExtentStripeLength; - - [Deprecated { "CIM_CompositeExtent.ExtentInterleaveDepth" }, - Description ( - "Number of ProtectedSpaceExtents to stripe as a " - "collective set. In SCC, this value is defined as the " - "number of stripes to count before continuing to map into " - "the next contiguous set of Extents, beyond the current " - "stripe." ), - MappingStrings { "MIF.DMTF|Volume Set|001.5" }] - uint64 PSExtentInterleaveDepth; - - [Deprecated { "No value" }, - Description ( - "VolumeSets in SCC have additional status information " - "beyond that captured in the Availability and other " - "properties, inherited from ManagedSystemElement. This " - "additional information (for example, \"Protection " - "Disabled\", value=9) is captured in the VolumeStatus " - "property." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14" }, - Values { "Other", "Unknown", "None/Not Applicable", "Broken", - "Data Lost", "Dynamic Reconfig", "Exposed", - "Fractionally Exposed", "Partially Exposed", - "Protection Disabled", - // 10 - "Readying", "Rebuild", - "Recalculate", "Spare in Use", "Verify In Progress" }] - uint16 VolumeStatus; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_VolumeSetBasedOnPSExtent.mof b/build/vendor/dmtf_mof/Device/CIM_VolumeSetBasedOnPSExtent.mof deleted file mode 100644 index a34a7a00..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_VolumeSetBasedOnPSExtent.mof +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_VolumeSetBasedOnPSExtent -// ================================================================== - [Association, Deprecated { "CIM_CompositeExtentBasedOn" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Device::SccExtents" ), - Description ( - "This association is deprecated in lieu of " - "CompositeExtentBasedOn, since VolumeSets and " - "ProtectedSpaceExtents are themselves deprecated. The " - "relationship describes that VolumeSets are BasedOn on one or " - "more ProtectedSpaceExtents." )] -class CIM_VolumeSetBasedOnPSExtent : CIM_BasedOn { - - [Deprecated { "CIM_CompositeExtentBasedOn.Antecedent" }, - Override ( "Antecedent" ), - Min ( 1 ), - Description ( "The ProtectedSpaceExtent." )] - CIM_ProtectedSpaceExtent REF Antecedent; - - [Deprecated { "CIM_CompositeExtentBasedOn.Dependent" }, - Override ( "Dependent" ), - Description ( - "The VolumeSet which is built on the ProtectedSpace Extent." - )] - CIM_VolumeSet REF Dependent; - - [Deprecated { - "CIM_CompositeExtentBasedOn.LBAsMappedByDecrementing" }, - Description ( - "True if logical blocks in the ProtectedSpaceExtent are " - "mapped in decrementing order. This property corresponds " - "to the INCDEC value in the SCC-2 Volume Set PS_Extent " - "Descriptor." )] - boolean LBAsMappedByDecrementing; - - [Deprecated { - "CIM_CompositeExtentBasedOn.LBAMappingIncludesCheckData" }, - Description ( - "True if the logical block mapping algorithm includes " - "check data bytes. This property corresponds to the " - "NOCHKSKIP attribute in the SCC-2 Volume Set PS_Extent " - "Descriptor." )] - boolean LBAMappingIncludesCheckData; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_WORMDrive.mof b/build/vendor/dmtf_mof/Device/CIM_WORMDrive.mof deleted file mode 100644 index 5ad4ee86..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_WORMDrive.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_WORMDrive -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Device::StorageDevices" ), - Description ( - "Capabilities and managment of a WORMDrive, a subtype of " - "MediaAccessDevice." )] -class CIM_WORMDrive : CIM_MediaAccessDevice { - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_WakeUpServiceOnModem.mof b/build/vendor/dmtf_mof/Device/CIM_WakeUpServiceOnModem.mof deleted file mode 100644 index e1265b90..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_WakeUpServiceOnModem.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_WakeUpServiceOnModem -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Modems" ), - Description ( - "WakeUpServiceOnModem defines where the WakeUpService is " - "implemented. The Service can either employ a Modem or " - "NetworkAdapter to receive a wakeup signal." )] -class CIM_WakeUpServiceOnModem : CIM_DeviceServiceImplementation { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The Modem that implements the WakeUpService." )] - CIM_Modem REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The wakeup Service that is provided on the Modem." )] - CIM_WakeUpService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_WakeUpServiceOnNetworkAdapter.mof b/build/vendor/dmtf_mof/Device/CIM_WakeUpServiceOnNetworkAdapter.mof deleted file mode 100644 index 6ee66750..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_WakeUpServiceOnNetworkAdapter.mof +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_WakeUpServiceOnNetworkAdapter -// ================================================================== - [Association, Deprecated { "CIM_WakeUpServiceOnNetworkPort" }, - Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::NetworkAdapter" ), - Description ( - "Note: The use of the CIM_WakeUpServiceOnNetworkAdapter class " - "has been deprecated because NetworkAdapter is deprecated. " - "Instead use the CIM_WakeUpServiceOnNetworkPort class. \n" - "Deprecated description: WakeUpServiceOnNetworkAdapter defines " - "where the WakeUpService is implemented." )] -class CIM_WakeUpServiceOnNetworkAdapter : CIM_DeviceServiceImplementation { - - [Deprecated { "CIM_WakeUpServiceOnNetworkPort.Antecedent" }, - Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The NetworkAdapter that " - "implements the Service." )] - CIM_NetworkAdapter REF Antecedent; - - [Deprecated { "CIM_WakeUpServiceOnNetworkPort.Dependent" }, - Override ( "Dependent" ), - Description ( - "Note: The use of this method has been deprecated. \n" - "Deprecated description: The wakeup Service that is " - "provided on the NetworkAdapter." )] - CIM_WakeUpService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_WakeUpServiceOnNetworkPort.mof b/build/vendor/dmtf_mof/Device/CIM_WakeUpServiceOnNetworkPort.mof deleted file mode 100644 index 2cb1de83..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_WakeUpServiceOnNetworkPort.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_WakeUpServiceOnNetworkPort -// ================================================================== - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Ports" ), - Description ( - "WakeUpServiceOnNetworkPort defines where the WakeUpService is " - "implemented. Currently, the Service can either employ a Modem " - "or a NetworkPort for wakeup." )] -class CIM_WakeUpServiceOnNetworkPort : CIM_DeviceServiceImplementation { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The NetworkPort that implements the Service." )] - CIM_NetworkPort REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The wakeup Service that is provided on the NetworkPort." )] - CIM_WakeUpService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_Watchdog.mof b/build/vendor/dmtf_mof/Device/CIM_Watchdog.mof deleted file mode 100644 index f08ed168..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_Watchdog.mof +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// Add PUnit qualifier values -// to Units qualifier values. -// ================================================================== -// CIM_Watchdog -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::Processor" ), - Description ( - "CIM_Watchdog is a timer that is implemented in the system " - "hardware. It allows the hardware to monitor the state of the " - "Operating System, BIOS, or a software component that is " - "installed on the System. If the monitored component fails to " - "re-arm the timer before its expiration, the hardware assumes " - "that the System is in a critical state, and could reset the " - "ComputerSystem. This feature can also be used as an " - "application watchdog timer for a mission-critical application. " - "In this case, the application would assume responsibility for " - "re-arming the timer before expiration." )] -class CIM_Watchdog : CIM_LogicalDevice { - - [Description ( - "The entity that is currently being monitored by the " - "WatchDog. This property is used to identify the module " - "that is responsible for re-arming, or whose information " - "is used to re-arm, the watchdog at periodic intervals." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Unknown", "Other", "Operating System", - "Operating System Boot Process", - "Operating System Shutdown Process", - "Firmware Boot Process", "BIOS Boot Process", - "Application", "Service Processor" }] - uint16 MonitoredEntity; - - [Description ( - "A string that describes more textual information about " - "the monitored entity." ), - MaxLen ( 256 )] - string MonitoredEntityDescription; - - [Description ( - "The timeout interval that is used by the watchdog, in " - "MicroSeconds." ), - Units ( "MicroSeconds" ), - PUnit ( "second * 10^-6" )] - uint32 TimeoutInterval; - - [Description ( - "Resolution of the timer. For example, if this value is " - "100, then the timer can expire anytime between " - "(TimeoutInterval- 100) microseconds or " - "(TimeoutInterval+100) microseconds." ), - Units ( "MicroSeconds" ), - PUnit ( "second * 10^-6" )] - uint32 TimerResolution; - - [Description ( "The time of the last timer expiry." )] - datetime TimeOfLastExpiration; - - [Description ( - "Monitored entity at the time of last timer expiry." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Unknown", "Other", "Operating System", - "Operating System Boot Process", - "Operating System Shutdown Process", - "Firmware Boot Process", "BIOS Boot Process", - "Application", "Service Processor" }] - uint16 MonitoredEntityOnLastExpiration; - - [Description ( - "The action that should happen upon the expiry of the watchdog." - ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "None - Status Only", "System Reset", - "System Power Off", "System Power Off, then On", - "Generate System NonMaskableInterrupt (NMI)", - "Generate System Management Interrupt (SMI)" }] - uint16 ActionOnExpiration; - - - [Description ( - "A method to re-arm the timer. This method is used only " - "if the MonitoredEntity is \"Application\". It returns 0 " - "if successful, 1 if unsupported, and any other value if " - "an error occurred. In a subclass, the set of possible " - "return codes could be specified, using a ValueMap " - "qualifier on the method. The strings to which the " - "ValueMap contents are \'translated\' can also be " - "specified in the subclass as a Values array qualifier." )] - uint32 KeepAlive( -); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_WiFiEndpoint.mof b/build/vendor/dmtf_mof/Device/CIM_WiFiEndpoint.mof deleted file mode 100644 index 5c3711a3..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_WiFiEndpoint.mof +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Network::Wireless" ), - Description ( - "A wireless communication endpoint which, when its associated " - "interface device is associated with an IEEE 802.11 wireless " - "LAN, may send and receive data frames." )] -class CIM_WiFiEndpoint : CIM_LANEndpoint { - - [Override ( "LANID" ), - Description ( - "LANID shall contain the Service Set Identifier (SSID) of " - "the wireless LAN with which the Endpoint is associated, " - "or shall be NULL if the Endpoint is not currently " - "associated or this information is not known." ), - MappingStrings { "IEEE 802.11-2007 | 7.3.2.1" }] - string LANID; - - [Override ( "ProtocolIFType" ), - Description ( - "ProtocolIFType\'s enumeration is limited to Wi-Fi and " - "reserved values for this subclass of ProtocolEndpoint." ), - ValueMap { "1", "71", "225..4095", "4301..32767", "32768.." }, - Values { "Other", "IEEE 802.11", "IANA Reserved", - "DMTF Reserved", "Vendor Reserved" }] - uint16 ProtocolIFType = 71; - - [Description ( - "EncryptionMethod shall specify the encryption method in " - "use to protect the confidentiality of data sent and " - "received by the WiFiEndpoint.\n" - "\t* Unknown (0): shall indicate that the encryption " - "method is unknown to the server.\n" - "\t* Other (1): shall indicate that the encryption method " - "is known to the server but not defined in the list " - "below. If EncryptionMethod contains 1, " - "OtherEncryptionMethod shall not be NULL and shall not be empty.\n" - "\t* WEP (2): shall indicate that the encryption method " - "is Wired Equivalency Privacy (WEP). The value of " - "EncryptionMethod shall be 2 only if the value of " - "AuthenticationMethod is 2 (\"Open System\") or 3 " - "(\"Shared Key\").\n" - "\t* TKIP (3): shall indicate that the encryption method " - "is Temporal Key Integrity Protocol (TKIP). The value of " - "EncryptionMethod shall be 3 only if the value of " - "AuthenticationMethod is 4 (\"WPA PSK\"), 5 (\"WPA IEEE " - "802.1x\"), 6 (\"WPA2 PSK\"), or 7 (\"WPA2 IEEE 802.1x\").\n" - "\t* CCMP (4): shall indicate that the encryption method " - "is Counter Mode with Cipher Block Chaining Message " - "Authentication Code Protocol (CCMP). The value of " - "EncryptionMethod shall be 4 only if the value of " - "AuthenticationMethod is 4 (\"WPA PSK\"), 5 (\"WPA IEEE " - "802.1x\"), 6 (\"WPA2 PSK\"), or 7 (\"WPA2 IEEE 802.1x\").\n" - "\t* None (5): shall indicate that no encryption method " - "is in use. The value of EncryptionMethod shall be 5 only " - "if the value of AuthenticationMethod is 2 (\"Open " - "System\") or 3 (\"Shared Key\")." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6.." }, - Values { "Unknown", "Other", "WEP", "TKIP", "CCMP", "None", - "DMTF Reserved" }, - MappingStrings { "IEEE 802.11-2007 | 8" }, - ModelCorrespondence { - "CIM_WiFiEndpoint.AuthenticationMethod", - "CIM_WiFiEndpoint.OtherEncryptionMethod" }] - uint16 EncryptionMethod; - - [Description ( - "OtherEncryptionMethod shall specify the 802.11 " - "encryption method if and only if EncryptionMethod " - "contains \"Other\". The format of this string shall be " - "vendor-specific." ), - ModelCorrespondence { "CIM_WiFiEndpoint.EncryptionMethod" }] - string OtherEncryptionMethod; - - [Description ( - "AuthenticationMethod shall specify the method used to " - "authenticate the WiFiEndpoint and the network to one another.\n" - "\t* Unknown (0): shall indicate that the authentication " - "method is unknown to the server.\t* Other (1): shall " - "indicate that the authentication method is known to the " - "server but not specified in the list below. If " - "AuthenticationMethod contains 1, " - "OtherAuthenticationMethod shall not be NULL and shall " - "not be empty.\n" - "\t* Open System (2): shall indicate that the " - "authentication method is Open System. " - "AuthenticationMethod shall contain 2 only if " - "EncryptionMethod contains 2 (\"WEP\").\n" - "\t* Shared Key (3): shall indicate that the " - "authentication method is Shared Key. " - "AuthenticationMethod shall contain 3 only if " - "EncryptionMethod contains 2 (\"WEP\").\n" - "\t* WPA PSK (4): shall indicate that the authentication " - "method is WPA (Wi-Fi Protected Access) PSK (Pre-Shared " - "Key). AuthenticationMethod shall contain 4 only if " - "EncryptionMethod contains 3 (\"TKIP\") or 4 (\"CCMP\").\n" - "\t* WPA IEEE 802.1x (5): shall indicate that the " - "authentication method is WPA (Wi-Fi Protected Access) " - "IEEE 802.1x. AuthenticationMethod shall contain 5 only " - "if EncryptionMethod contains 3 (\"TKIP\") or 4 (\"CCMP\").\n" - "\t* WPA2 PSK (6): shall indicate that the authentication " - "method is WPA2 (Wi-Fi Protected Access Version 2) PSK " - "(Pre-Shared Key). AuthenticationMethod shall contain 6 " - "only if EncryptionMethod contains 3 (\"TKIP\") or 4 (\"CCMP\").\n" - "\t* WPA2 IEEE 802.1x (7): shall indicate that the " - "authentication method is WPA2 (Wi-Fi Protected Access " - "Version 2) IEEE 802.1x. AuthenticationMethod shall " - "contain 6 only if EncryptionMethod contains 3 (\"TKIP\") " - "or 4 (\"CCMP\").\n" - "\t* CCKM IEEE 802.1x (8): CCKM (Cisco Centralized Key " - "Management with LEAP or EAP-FAST)" ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9.." }, - Values { "Unknown", "Other", "Open System", "Shared Key", - "WPA PSK", "WPA IEEE 802.1x", "WPA2 PSK", - "WPA2 IEEE 802.1x", "CCKM IEEE 802.1x", "DMTF Reserved" }, - MappingStrings { "IEEE 802.11-2007 | 8" }, - ModelCorrespondence { "CIM_WiFiEndpoint.EncryptionMethod", - "CIM_WiFiEndpoint.IEEE8021xAuthenticationProtocol", - "CIM_WiFiEndpoint.OtherAuthenticationMethod" }] - uint16 AuthenticationMethod; - - [Description ( - "OtherAuthenticationMethod shall specify the 802.11 " - "authentication method if and only if " - "AuthenticationMethod contains \"Other\". The format of " - "this string shall be vendor-specific." ), - ModelCorrespondence { "CIM_WiFiEndpoint.AuthenticationMethod" }] - string OtherAuthenticationMethod; - - [Description ( - "IEEE8021xAuthenticationProtocol shall contain the EAP " - "(Extensible Authentication Protocol) type if and only if " - "AuthenticationMethod contains \"WPA IEEE 802.1x\" or " - "\"WPA2 IEEE 802.1x\" or \"CCKM IEEE 802.1x\"\n" - ".\t* EAP-TLS (0): shall indicate the Transport Layer " - "Security EAP type specified in RFC 2716.\n" - "\t* EAP-TTLS/MSCHAPv2 (1): shall indicate the Tunneled " - "TLS Authentication Protocol EAP type (specified in " - "draft-ietf-pppext-eap-ttls) with Microsoft PPP CHAP " - "Extensions, Version 2 (MSCHAPv2) as the inner " - "authentication method.\n" - "\t* PEAPv0/EAP-MSCHAPv2 (2): shall indicate the " - "Protected Extensible Authentication Protocol (PEAP) " - "Version 0 EAP type (specified in " - "draft-kamath-pppext-peapv0), with Microsoft PPP CHAP " - "Extensions, Version 2 (MSCHAPv2) as the inner " - "authentication method.\n" - "\t* PEAPv1/EAP-GTC (3): shall indicate the Protected " - "Extensible Authentication Protocol (PEAP) Version 1 EAP " - "type (specified in draft-josefsson-pppext-eap-tls-eap), " - "with Generic Token Card (GTC) as the inner " - "authentication method.\n" - "\t* EAP-FAST/MSCHAPv2 (4): shall indicate the Flexible " - "Authentication Extensible Authentication Protocol EAP " - "type specified in IETF RFC 4851, with Microsoft PPP CHAP " - "Extensions, Version 2 (MSCHAPv2) as the inner " - "authentication method.\n" - "\t* EAP-FAST/GTC (5): shall indicate the Flexible " - "Authentication Extensible Authentication Protocol EAP " - "type specified in IETF RFC 4851, with Generic Token Card " - "(GTC) as the inner authentication method.\n" - "\t* EAP-MD5 (6): shall indicate the EAP MD5 " - "authentication method, specified in RFC 3748.\n" - "\t* EAP-PSK (7): shall indicate the EAP-PSK (Pre-shared " - "Key) Protocol specified in RFC 4764.\n" - "\t* EAP-SIM (8): shall indicate the Extensible " - "Authentication Protocol Method for Global System for " - "Mobile Communications (GSM) Subscriber Identity Modules " - "(EAP-SIM), specified in RFC 4186.\n" - "\t* EAP-AKA (9): shall indicate the Extensible " - "Authentication Protocol Method for 3rd Generation " - "Authentication and Key Agreement (EAP-AKA) " - "authentication method, specified in RFC 4187.\n" - "\t* EAP-FAST/TLS (10): shall indicate the Flexible " - "Authentication Extensible Authentication Protocol EAP " - "type specified in IETF RFC 4851, with TLS as the inner " - "authentication method." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11.." }, - Values { "EAP-TLS", "EAP-TTLS/MSCHAPv2", - "PEAPv0/EAP-MSCHAPv2", "PEAPv1/EAP-GTC", - "EAP-FAST/MSCHAPv2", "EAP-FAST/GTC", "EAP-MD5", "EAP-PSK", - "EAP-SIM", "EAP-AKA", "EAP-FAST/TLS", "DMTF Reserved" }, - MappingStrings { "RFC4017.IETF", "RFC2716.IETF", - "draft-ietf-pppext-eap-ttls.IETF", - "draft-kamath-pppext-peapv0.IETF", - "draft-josefsson-pppext-eap-tls-eap", "RFC4851.IETF", - "RFC3748.IETF", "RFC4764.IETF", "RFC4186.IETF", - "RFC4187.IETF" }, - ModelCorrespondence { "CIM_WiFiEndpoint.AuthenticationMethod" }] - uint16 IEEE8021xAuthenticationProtocol; - - [Description ( - "AccessPointAddress shall contain the MAC address of the " - "access point with which the WiFiEndpoint is currently " - "associated. If the WiFiEndpoint is not currently " - "associated, then AccessPointAddress shall be NULL.The " - "MAC address shall be formatted as twelve hexadecimal " - "digits (for example, \"010203040506\"), with each pair " - "representing one of the six octets of the MAC address in " - "\"canonical\" bit order. (Therefore, the Group address " - "bit is found in the low order bit of the first character " - "of the string.)" )] - string AccessPointAddress; - - [Description ( - "BSSType shall indicate the Basic Service Set (BSS) Type " - "of the network that corresponds to the instance. A Basic " - "Service Set is a set of stations controlled by a single " - "coordination function.\n" - "\t* Independent: the WiFiEndpoint is associated directly " - "to another client station.\n" - "\t* Infrastructure: the WiFiEndpoint is associated to a " - "network via an access point." ), - ValueMap { "0", "2", "3", "4.." }, - Values { "Unknown", "Independent", "Infrastructure", - "DMTF Reserved" }, - MappingStrings { "IEEE 802.11-2007 | 3.16" }] - uint16 BSSType; - - [Description ( - "Associated shall indicate whether or not the " - "WiFiEndpoint is currently associated to an access point " - "or client station." )] - boolean Associated; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_WiFiPort.mof b/build/vendor/dmtf_mof/Device/CIM_WiFiPort.mof deleted file mode 100644 index 8b459a12..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_WiFiPort.mof +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Device::Ports" ), - Description ( - "WiFiPort is the logical representation of wireless local area " - "network communications hardware that conforms to the IEEE " - "802.11 series of specifications. It embodies properties at the " - "lowest layers of a network stack, such as the antennas used " - "for transmission and reception, the address permanently " - "embedded into the hardware, and the operational bandwidth of " - "the device." )] -class CIM_WiFiPort : CIM_NetworkPort { - - [Override ( "Speed" ), - Description ( - "The data rate at which the current PPDU (PLCP (Physical " - "Layer Convergence Protocol) Protocol Data Unit) was " - "received. This value is encoded in the first 4 bits of " - "the PLCP header in each PLCP frame." )] - uint64 Speed; - - [Override ( "MaxSpeed" ), - Description ( - "Shall contain the maximum bandwidth relative to the " - "current operating mode specified in PortType. For " - "example, shall contain 11000000 if PortType contains 71 " - "(\"802.11b\")." )] - uint64 MaxSpeed; - - [Override ( "PortType" ), - Description ( - "PortType shall contain the specific 802.11 operating " - "mode that is currently enabled on the Port. All modes " - "are specified in" ), - ValueMap { "0", "1", "70", "71", "72", "73", "..", "16000.." }, - Values { "Unknown", "Other", "802.11a", "802.11b", "802.11g", - "802.11n", "DMTF Reserved", "Vendor Reserved" }] - uint16 PortType; - - [Override ( "PermanentAddress" ), - Description ( - "IEEE 802 EUI-48 MAC address, formatted as twelve " - "hexadecimal digits (for example, \"010203040506\"), with " - "each pair representing one of the six octets of the MAC " - "address in \"canonical\" bit order. (Therefore, the " - "Group address bit is found in the low order bit of the " - "first character of the string.)" )] - string PermanentAddress; - - [Override ( "NetworkAddresses" ), - Description ( - "IEEE 802 EUI-48 MAC addresses, each formatted as twelve " - "hexadecimal digits (for example, \"010203040506\"), with " - "each pair representing one of the six octets of the MAC " - "address in \"canonical\" bit order. (Therefore, the " - "Group address bit is found in the low order bit of the " - "first character of the string.)" )] - string NetworkAddresses[]; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_WiFiPortCapabilities.mof b/build/vendor/dmtf_mof/Device/CIM_WiFiPortCapabilities.mof deleted file mode 100644 index f0d4e104..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_WiFiPortCapabilities.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Device::Ports" ), - Description ( - "CIM_WiFiPortCapabilities is a specialization of " - "CIM_NetworkPortCapabilities that describes the capabilities of " - "a WiFiPort." )] -class CIM_WiFiPortCapabilities : CIM_NetworkPortCapabilities { - - [Description ( - "The 802.11 modes that the Port supports. See description " - "of PortType property in CIM_WiFiPort for more " - "information." ), - ValueMap { "0", "1", "70", "71", "72", "73", "..", "16000.." }, - Values { "Unknown", "Other", "802.11a", "802.11b", "802.11g", - "802.11n", "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_WiFiPort.PortType", - "CIM_WiFiPortCapabilities.OtherSupportedPortTypes" }] - uint16 SupportedPortTypes[]; - - [Description ( - "Additional 802.11 modes supported by the associated " - "WiFiPort, but not listed in the valuemap for " - "SupportedPortTypes." ), - ModelCorrespondence { "CIM_WiFiPort.OtherPortType", - "CIM_WiFiPortCapabilities.SupportedPortTypes" }] - string OtherSupportedPortTypes[]; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_WiFiPortConfigurationService.mof b/build/vendor/dmtf_mof/Device/CIM_WiFiPortConfigurationService.mof deleted file mode 100644 index ed361da0..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_WiFiPortConfigurationService.mof +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Device::Ports" ), - Description ( - "Provides methods for configuring parameters of Wi-Fi ports and " - "the Wi-Fi protocol endpoints associated with them." )] -class CIM_WiFiPortConfigurationService : CIM_NetworkPortConfigurationService { - - - [Description ( - "Shall atomically create settings that enable a " - "WiFiEndpoint to connect to a given Wi-Fi network. These " - "settings include the name (SSID) of the network as well " - "as the security parameters used by the WiFiEndpoint to " - "authenticate to the network and encrypt frames it " - "transmits into the network and decrypt the frames it " - "receives from the network. Upon successful completion, a " - "new instance of CIM_WiFiEndpointSettings shall be " - "associated to the CIM_WiFiEndpoint referenced by the " - "WiFiEndpoint parameter, through a new instance of " - "CIM_ElementSettingData. If the IEEE8021xSettingsInput " - "parameter is not null, a new instance of " - "CIM_IEEE8021xSettings containing its property values " - "shall be associated to the new instance of " - "CIM_WiFiEndpointSettings through a new instance of " - "CIM_ConcreteComponent upon successful completion. " - "Alternatively, if the IEEE8021xSettingsInputReference " - "parameter is not null, the CIM_IEEE8021xSettings that it " - "references shall be associated to the new instance of " - "CIM_WiFiEndpointSettings through a new instance of " - "CIM_ConcreteComponent upon successful completion. This " - "method shall not apply the new settings to WiFiEndpoint. " - "Rather, it shall make them available for subsequent " - "manual or autonomous application." ), - ValueMap { "0", "1", "2", "3", "4", "5..4095", "4096..32767", - "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Failed", "Invalid Parameter", "Invalid Reference", - "DMTF Reserved", "Method Reserved", "Vendor Specified" }] - uint32 AddWiFiSettings( - [Required, IN, Description ( - "References the instance of CIM_WiFiEndpoint with " - "which the new settings shall be associated." )] - CIM_WiFiEndpoint REF WiFiEndpoint, - [Required, IN, Description ( - "Provides the input property values for the " - "CIM_WiFiEndpointSettings instance that shall be " - "created by this method. Upon successful completion " - "of this method, a new instance of " - "CIM_WiFiEndpointSettings shall be associated to " - "the CIM_WiFiEndpoint referenced by the " - "WiFiEndpoint parameter, through a new instance of " - "CIM_ElementSettingData." ), - EmbeddedInstance ( "CIM_WiFiEndpointSettings" )] - string WiFiEndpointSettingsInput, - [IN, Description ( - "Provides the property values for a new instance of " - "CIM_IEEE8021xSettings. If both " - "IEEE8021xSettingsInput and " - "IEEE8021xSettingsInputReference are not null, this " - "method shall return 2 (\"Unknown/Unspecified " - "Error\").If this parameter is not null and " - "IEEE8021xSettingsInputReference is null, this " - "method shall create a new CIM_IEEE8021xSettings " - "instance with the values in this parameter, and " - "shall associate it (through a new instance of " - "CIM_ConcreteComponent) with the newly created " - "instance of CIM_WiFiEndpointSettings." ), - EmbeddedInstance ( "CIM_IEEE8021xSettings" )] - string IEEE8021xSettingsInput, - [IN, Description ( - "References a credential that shall be used to " - "authenticate the CIM_WiFiEndpoint to a IEEE 802.1x " - "authentication server. This method shall return 2 " - "(\"Unknown/Unspecified Error\") if " - "IEEE8021xSettingsInput is null and " - "IEEE8021xCredential is not null." )] - CIM_Credential REF ClientCredential, - [IN, Description ( - "References a credential that shall be used as a " - "trusted root certificate by the CIM_WiFiEndpoint " - "when it authenticates the leaf certificate " - "provided by the authentication server. This method " - "shall return 2 (\"Unknown/Unspecified Error\") if " - "IEEE8021xSettingsInput is null and " - "IEEE8021xCredential is not null." )] - CIM_Credential REF CACredential, - [OUT, Description ( - "Upon successful completion, shall contain a " - "reference to the CIM_WiFiEndpointSettings instance " - "created by this method." )] - CIM_WiFiEndpointSettings REF WiFiEndpointSettings, - [OUT, Description ( - "Upon successful completion, shall contain a " - "reference to the CIM_IEEE8021xSettings instance " - "created by this method if and only if " - "IEEE8021xSettingsInput was not null." )] - CIM_IEEE8021xSettings REF IEEE8021xSettings); - - [Description ( - "Shall atomically update settings that enable a " - "WiFiEndpoint to connect to a given Wi-Fi network. These " - "settings include the name (SSID) of the network as well " - "as the security parameters used by the WiFiEndpoint to " - "authenticate to the network and encrypt frames it " - "transmits into the network and decrypt the frames it " - "receives from the network. This method addresses the " - "following update scenarios, each of which is given a tag " - "line that precedes its description. Each tag line is in " - "the form A to B, in which A indicates the type of " - "authentication method in the settings before " - "UpdateWiFiSettings is executed, and B indicates the type " - "of authentication method in the settings after " - "UpdateWiFiSettings is executed. Each of A and B is " - "replaced in the tag lines by either \"IEEE 802.1x\", " - "which indicates that the authentication method in the " - "settings is based on IEEE 802.1x, or \"Non-IEEE-802.1x\", " - "which indicates that the authentication method in the " - "settings is not based on IEEE 802.1x.\n" - "\t* IEEE 802.1x to IEEE 802.1x, update all: Updating the " - "properties of a CIM_WiFiEndpointSettings instance in " - "which the AuthenticationMethod property indicates an " - "IEEE 802.1x authentication method and the properties of " - "the associated CIM_IEEE8021xSettings instance, without " - "reverting to a non-IEEE-802.1x authentication method. In " - "this scenario, all parameters should be not null.\n" - "\t* IEEE 802.1x to IEEE 802.1x, update WiFi only: " - "Updating the properties of a CIM_WiFiEndpointSettings " - "instance in which the AuthenticationMethod property " - "indicates an IEEE 802.1x authentication method and that " - "accordingly has an associated CIM_IEEE8021xSettings " - "instance, without updating the CIM_IEEE8021xSettings " - "instance, and without reverting to a non-IEEE-802.1x " - "authentication method. In this scenario, the " - "IEEE8021xSettingsInput parameter should be null and all " - "other parameters should be not null.\n" - "\t* IEEE 802.1x to IEEE 802.1x, update IEEE 802.1x only: " - "Updating the properties of a CIM_IEEE8021xSettings " - "instance that has an associated CIM_WiFiEndpointSettings " - "instance without updating the CIM_WiFiEndpointSettings " - "instance. In this scenario, the " - "WiFiEndpointSettingsInput parameter should be null and " - "all other parameters should be not null.\n" - "\t* Non-IEEE-802.1x to Non-IEEE-802.1x: Updating the " - "properties of a CIM_WiFiEndpointSettings instance in " - "which the AuthenticationMethod property indicates a " - "non-IEEE-802.1x authentication method, and that " - "accordingly does not have an associated " - "CIM_IEEE8021xSettings instance, without changing the " - "authentication method to an IEEE 802.1x method. In this " - "scenario, the WiFiEndpointSettings and " - "WiFiEndpointSettingsInput parameters should be not null, " - "and the IEEE8021xSettings and IEEE8021xSettingsInput " - "parameters should be null.\n" - "\t* Non-IEEE-802.1x to IEEE 802.1x: Updating the " - "properties of a CIM_WiFiEndpointSettings instance in " - "which the AuthenticationMethod property indicates a " - "non-IEEE-802.1x authentication method, and that " - "accordingly does not have an associated " - "CIM_IEEE8021xSettings instance, and changing the " - "authentication method to an IEEE 802.1x method. In this " - "scenario, the IEEE8021xSettingsInput parameter should be " - "null, and all other parameters should be not null. An " - "instance of CIM_IEEE8021xSettings should first be " - "created using the intrinsic method CreateInstance. Then, " - "this method should be used with all parameters except " - "IEEE8021xSettingsInput not null. This method shall " - "update WiFiEndpointSettings and create a new instance of " - "CIM_ConcreteComponent between WiFiEndpointSettings and IEEE8021xSettings.\n" - "\t* IEEE 802.1x to Non-IEEE-802.1x: Updating the " - "properties of a CIM_WiFiEndpointSettings instance in " - "which the AuthenticationMethod property indicates an " - "IEEE 802.1x authentication method and that accordingly " - "has an associated CIM_IEEE8021xSettings instance, and " - "reverting to a non-IEEE-802.1x authentication method. In " - "this scenario, the IEEE8021xSettingsInput should be " - "null, and all other parameters should be not null. This " - "method shall delete the CIM_ConcreteComponent instance " - "between the instances referenced by the " - "WiFiEndpointSettings and IEEE8021xSettings parameters. " - "If this CIM_ConcreteComponent instance is the last " - "CIM_ConcreteComponent instance that references the " - "CIM_IEEE8021xSettings instance referenced by the " - "IEEE8021xSettings parameter, and the instance of " - "CIM_IEEE8021xSettings referenced by the " - "IEEE8021xSettings parameter was created by " - "AddWiFiEndpointSettings, then this method shall also " - "delete this CIM_IEEE8021xSettings instance.\n" - "This method shall not apply the updated settings to any " - "instance of CIM_WiFiEndpoint." ), - ValueMap { "0", "1", "2", "3", "4", "5..4095", "4096..32767", - "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Failed", "Invalid Parameter", "Invalid Reference", - "DMTF Reserved", "Method Reserved", "Vendor Specified" }] - uint32 UpdateWiFiSettings( - [Required, IN, OUT, Description ( - "Shall reference the CIM_WiFiEndpointSettings " - "instance that shall be updated by this method." )] - CIM_WiFiEndpointSettings REF WiFiEndpointSettings, - [IN, Description ( - "If not null, shall provide the new property values " - "for the instance of CIM_WiFiEndpointSettings " - "referenced by the WiFiEndpointSettings parameter." ), - EmbeddedInstance ( "CIM_WiFiEndpointSettings" )] - string WiFiEndpointSettingsInput, - [IN, Description ( - "If not null, shall provide the new property values " - "for the instance of CIM_IEEE8021xSettings " - "referenced by the IEEE8021xSettings parameter. If " - "the IEEE8021xSettings is null and the " - "IEEE8021xSettingsInput parameter is not null, this " - "method shall return 2 (\"Unknown/Unspecified " - "Error\")." ), - EmbeddedInstance ( "CIM_IEEE8021xSettings" )] - string IEEE8021xSettingsInput, - [IN, Description ( - "References a credential that shall be used to " - "authenticate the CIM_WiFiEndpoint to a IEEE 802.1x " - "authentication server." )] - CIM_Credential REF ClientCredential, - [IN, Description ( - "References a credential that shall be used as a " - "trusted root certificate by the CIM_WiFiEndpoint " - "when it authenticates the leaf certificate " - "provided by the authentication server." )] - CIM_Credential REF CACredential, - [IN, OUT, Description ( - "If not null, shall reference the " - "CIM_IEEE8021xSettings instance that shall be " - "updated by this method." )] - CIM_IEEE8021xSettings REF IEEE8021xSettings); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_WiFiRadio.mof b/build/vendor/dmtf_mof/Device/CIM_WiFiRadio.mof deleted file mode 100644 index f2442276..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_WiFiRadio.mof +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Device::Ports" ), - Description ( - "CIM_WiFiRadio describes a radio transceiver component of a " - "WiFiPort. It is modeled because of the possibility of multiple " - "transceivers being associated with a single port, the " - "possibility of multiple ports being associated with a single " - "radio transceiver, and the possibility of enabling/disabling a " - "radio transceiver independent of its associated WiFiPort." )] -class CIM_WiFiRadio : CIM_LogicalDevice { - - [Description ( "The received signal strength, in -dBm." ), - PUnit ( "decibel(m) * -1" )] - uint32 SignalStrength; - - [Description ( "The received signal noise, in -dBm." ), - PUnit ( "decibel(m) * -1" )] - uint32 SignalNoise; - - [Description ( - "Channel shall contain the channel number currently in " - "use by the WiFiRadio to communicate with the station " - "with which it is associated. Each channel number is " - "associated with a particular signal frequency band." )] - uint16 Channel; - - [Description ( - "The frequency, in Megahertz, of the center frequency of " - "the band (channel) currently in use by the WiFiRado." ), - PUnit ( "hertz * 10^6" )] - uint32 Frequency; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_Zone.mof b/build/vendor/dmtf_mof/Device/CIM_Zone.mof deleted file mode 100644 index 8a0957a1..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_Zone.mof +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Zone -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::FC" ), - Description ( - "A Zone is a group of Ports, Endpoints, Nodes, Zones, and " - "NamedAddressCollections that are managed collectively by the " - "same domain. The managing domain is indicated by the " - "HostedCollection association. For Fibre Channel, a Zone " - "indicates a set of members that are participating together in " - "the fabric." )] -class CIM_Zone : CIM_ConnectivityCollection { - - [Required, Override ( "ElementName" ), - Write, Description ( - "A user-friendly name for the Zone that is unique within " - "the AdminDomain." )] - string ElementName; - - [Required, Description ( - "Indicates that this Zone is currently active (that is, " - "under enforcement of a fabric). This property can be " - "used to distinguish between a Zone that is currently " - "active and a snapshot of a Zone (with the same " - "InstanceName) that is for \"offline\" editing." )] - boolean Active; - - [Required, Description ( "The type of zoning to be enforced." ), - ValueMap { "0", "1", "2", "3", "..", "32768..65535" }, - Values { "Unknown", "Other", "Default", "Protocol", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_Zone.OtherZoneTypeDescription" }] - uint16 ZoneType; - - [Description ( - "A string that describes the ZoneType when the ZoneType " - "value is 1 \"Other\"." ), - ModelCorrespondence { "CIM_Zone.ZoneType" }] - string OtherZoneTypeDescription; - - [Description ( - "Specific clarification to be used when the ProtocolType " - "has an enumeration that requires it. Specifically, if " - "ProtocolType is \"Protocol\", then SubType is the Fibre " - "Channel FC4 type." ), - ValueMap { "0", "1", "2", "3", "4", "..", "32768..65535" }, - Values { "Unknown", "Other", "SCSI", "VI", "IP", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_Zone.OtherZoneSubTypeDescription" }] - uint16 ZoneSubType; - - [Description ( - "A string that describes the ZoneSubType when the " - "ZoneSubType value is 1 \"Other\"." ), - ModelCorrespondence { "CIM_Zone.ZoneSubType" }] - string OtherZoneSubTypeDescription; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ZoneCapabilities.mof b/build/vendor/dmtf_mof/Device/CIM_ZoneCapabilities.mof deleted file mode 100644 index b2965f77..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ZoneCapabilities.mof +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.23.0" ), - UMLPackagePath ( "CIM::Device::FC" ), - Description ( - "ZoneCapabilities exposes the capabilities for zoning of an " - "AdminDomain." )] -class CIM_ZoneCapabilities : CIM_Capabilities { - - [Description ( - "The maximum length for the Zone Name that the " - "AdminDomain is capable of supporting." )] - uint32 ZoneNameMaxLen; - - [Description ( - "The ZoneNameFormat supported by the AdminDomain." ), - ValueMap { "0", "2", "3", "..", "0x8000.." }, - Values { "Unknown", "Numeric", "Alpha Numeric", - "DMTF Reserved", "Vendor Reserved" }] - uint16 ZoneNameFormat; - - [Description ( - "The maximum number of ZoneSets that the AdminDomain is " - "capable of supporting." )] - uint32 MaxNumZoneSets; - - [Description ( - "The maximum number of Zones that the AdminDomain is " - "capable of supporting." )] - uint32 MaxNumZone; - - [Description ( - "The maximum number of ZoneMembers that the AdminDomain " - "is capable of supporting." )] - uint32 MaxNumZoneMembers; - - [Description ( - "The maximum number of Zones per ZoneSet that the " - "AdminDomain is capable of supporting." )] - uint32 MaxNumZonesPerZoneSet; - - [Description ( - "The maximum number of ZoneAliases that the AdminDomain " - "is capable of supporting." )] - uint32 MaxNumZoneAliases; - - [Description ( - "In case one of the array elements for " - "SupportedConnectivityMemberTypes has a value of 1, i.e " - "Other, then this array lists the Other Supported " - "Connectivity Member Types." )] - string OtherSupportedConnectivityMemberTypes[]; - - [Description ( - "An array of enumerated integers that describe the " - "supported Zone Member Types. For example, a vendor " - "supporting only Permanent Address and Network Address as " - "Zone Member Types would need to return an array of 2 " - "elements, with the values 2 & 3." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "0x8000.." }, - Values { "Unknown", "Other", "Permanent Address", - "Network Address", "Switch Port ID", "Logical Port Group", - "Connectivity Collection", "DMTF Reserved", - "Vendor Reserved" }, - ArrayType ( "Indexed" )] - uint16 SupportedConnectivityMemberTypes[]; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ZoneMembershipSettingData.mof b/build/vendor/dmtf_mof/Device/CIM_ZoneMembershipSettingData.mof deleted file mode 100644 index e1b044ad..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ZoneMembershipSettingData.mof +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ZoneMembershipSettingData -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::FC" ), - Description ( - "ZoneMembershipSettingData provides the identification criteria " - "for possible Zone and ZoneAlias members." )] -class CIM_ZoneMembershipSettingData : CIM_ConnectivityMembershipSettingData { - - [Override ( "ConnectivityMemberType" ), - Description ( - "ConnectivityMemberType specifies the type of " - "identification used in the ConnectivityMemberID field. " - "For Fibre Channel, several of the enumerated values " - "require additional explanation: \n" - "* A ConnectivityMemberType equal to 2 (Permanent " - "Address) indicates that an NxPort WWN value should be " - "specified in the related ConnectivityMemberID property. \n" - "* A ConnectivityMemberType of 3 (Network Address) " - "indicates that an NxPort Address ID value should be " - "specified in the related ConnectivityMemberID property. \n" - "* A ConnectivityMemberType of 4 (Switch Port ID) " - "indicates that a Domain or Port Number value should be " - "specified in the related ConnectivityMemberID property. \n" - "* A ConnectivityMemberType of 5 (Logical Port Group) " - "indicates that a Node WWN value should be specified in " - "the related ConnectivityMemberID property." )] - uint16 ConnectivityMemberType; - - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ZoneService.mof b/build/vendor/dmtf_mof/Device/CIM_ZoneService.mof deleted file mode 100644 index bb71b0a4..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ZoneService.mof +++ /dev/null @@ -1,315 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.23.0" ), - UMLPackagePath ( "CIM::Device::FC" ), - Description ( - "The ZoneService if responsible for managing the Zone " - "enforcement for the fabric. The ZoneService is hosted on an " - "AdminDomain. This relationship is depicted by the " - "HostedService association." )] -class CIM_ZoneService : CIM_Service { - - [Description ( - "SessionState is an integer enumeration that indicates " - "whether the session is currently starting (value=2) or " - "has ended (value=3). It is possible that a particular " - "instance of a ZoneService might not support sessions. If " - "sessions are not supported, the value 4 (\"Not " - "Applicable\") is used." ), - ValueMap { "0", "2", "3", "4" }, - Values { "Unknown", "Starting", "Ended", "Not Applicable" }] - uint16 SessionState = 4; - - [Description ( - "RequestedSessionState is an integer enumeration that " - "indicates whether the ZoneService session has been " - "requested to start (value=2), end (value=3), or " - "terminate (value=4). Note that when " - "RequestedSessionState is set to 4 (\"Not Applicable\"), " - "then this property is not used. By default, the " - "RequestedSessionState of the element is 5 (\"No " - "Change\")." ), - ValueMap { "2", "3", "4", "5" }, - Values { "Start", "End", "Terminate", "No Change" }, - ModelCorrespondence { "CIM_ZoneService.SessionState", - "CIM_ZoneService.SessionControl()" }] - uint16 RequestedSessionState = 5; - - [Description ( - "DefaultZoningState indicates whether fabric members " - "(devices) that are not in any other active Zones can " - "access each other. In particular, if no Zones are " - "active, a DefaultZoningState \"Allow\" indicates that " - "all fabric members can access each other." ), - ValueMap { "0", "2", "3" }, - Values { "Unknown", "Allow", "Deny" }] - uint16 DefaultZoningState; - - - [Description ( - "The method creates a ZoneSet and the association " - "HostedCollection. The newly created association, " - "HostedCollection, associates the Zone to the same " - "AdminDomain that the ZoneService is hosted to. For the " - "newly created ZoneSet, the Active property is always set " - "to false. \n" - "\n" - "This method might be deprecated in the future in lieu of " - "intrinsics after limitations in the CIM Operations are " - "addressed." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10..0x0FFF", "0x1000..0x7777", "0x8000.." }, - Values { "Success", "Not Supported", "Unspecified Error", - "Timeout", "Failed", "Invalid Parameter", "Access_Denied", - "Not_Found", "Already_Exists", "Insufficient_Resources", - "DMTF_Reserved", "Method_Reserved", "Vendor_Reserved" }] - uint32 CreateZoneSet( - [Required, IN, Description ( - "A user-friendly name for the ZoneSet that is " - "unique within the AdminDomain." ), - ModelCorrespondence { "CIM_ZoneSet.ElementName" }] - string ZoneSetName, - [IN, OUT, Description ( - "A reference to the newly created Zone." )] - CIM_ZoneSet REF ZoneSet); - - [Description ( - "The method creates a Zone and the association " - "HostedCollection. The newly created association, " - "HostedCollection, associates the Zone to the same " - "AdminDomain that the ZoneService is hosted to. For the " - "newly created Zone, the Active property is always set to " - "false. \n" - "\n" - "This method might be deprecated in the future in lieu of " - "intrinsics after limitations in the CIM Operations are " - "addressed." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10..0x0FFF", "0x1000..0x7777", "0x8000.." }, - Values { "Success", "Not Supported", "Unspecified Error", - "Timeout", "Failed", "Invalid Parameter", "Access_Denied", - "Not_Found", "Already_Exists", "Insufficient_Resources", - "DMTF_Reserved", "Method_Reserved", "Vendor_Reserved" }] - uint32 CreateZone( - [Required, IN, Description ( - "A user-friendly name for the Zone that is unique " - "within the AdminDomain." ), - ModelCorrespondence { "CIM_Zone.ElementName" }] - string ZoneName, - [IN, Description ( "The type of zoning to be enforced." ), - ValueMap { "2", "3" }, - Values { "Default", "Protocol" }, - ModelCorrespondence { "CIM_Zone.ZoneType" }] - uint16 ZoneType, - [IN, Description ( - "Specific clarification to be used when the " - "ZoneType has an enumeration that requires it. " - "Specifically, if ZoneType is \"Protocol\", then " - "SubType is the Fibre Channel FC4 type." ), - ValueMap { "2", "3", "4" }, - Values { "SCSI", "VI", "IP" }, - ModelCorrespondence { "CIM_Zone.ZoneSubType" }] - uint16 ZoneSubType, - [IN, OUT, Description ( - "A reference to the newly created Zone." )] - CIM_Zone REF Zone); - - [Description ( - "The method creates a ZoneAlias and the association " - "HostedCollection. The newly created association, " - "HostedCollection, associates the ZoneAlias to the same " - "AdminDomain that the ZoneService is hosted to. For the " - "newly created ZoneAlias, the Active property is always " - "set to false. \n" - "\n" - "This method might be deprecated in the future in lieu of " - "intrinsics after limitations in the CIM Operations are " - "addressed." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10..0x0FFF", "0x1000..0x7777", "0x8000.." }, - Values { "Success", "Not Supported", "Unspecified Error", - "Timeout", "Failed", "Invalid Parameter", "Access_Denied", - "Not_Found", "Already_Exists", "Insufficient_Resources", - "DMTF_Reserved", "Method_Reserved", "Vendor_Reserved" }] - uint32 CreateZoneAlias( - [Required, IN, Description ( - "A name (alias) for the ZoneAlias that is unique in " - "the context of the hosting System." ), - ModelCorrespondence { "CIM_ZoneAlias.CollectionAlias" }] - string CollectionAlias, - [IN, OUT, Description ( - "A reference to the newly created ZoneAlias." )] - CIM_NamedAddressCollection REF ZoneAlias); - - [Description ( - "CreateZoneMembershipSettingData creates a " - "ZoneMembershipSettingData and adds it to the specified " - "Zone or ZoneAlias by creating a MemberOfCollection " - "association. \n" - "\n" - "This method might be deprecated in the future in lieu of " - "intrinsics after limitations in the CIM Operations are " - "addressed." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10..0x0FFF", "0x1000..0x7777", "0x8000.." }, - Values { "Success", "Not Supported", "Unspecified Error", - "Timeout", "Failed", "Invalid Parameter", "Access_Denied", - "Not_Found", "Already_Exists", "Insufficient_Resources", - "DMTF_Reserved", "Method_Reserved", "Vendor_Reserved" }] - uint32 CreateZoneMembershipSettingData( - [Required, IN, Description ( - "Identifies the type of identification placed in " - "ConnectivityMemberID." ), - ValueMap { "0", "1", "2", "3", "4", "5", "..", - "0x8000.." }, - Values { "Unknown", "Other", "PermanentAddress", - "NetworkAddress", "SwitchPortID", - "LogicalPortGroup", "DMTF_Reserved", - "Vendor_Reserved" }, - ModelCorrespondence { - "CIM_ZoneMembershipSettingData.ZoneMemberType" }] - uint16 ConnectivityMemberType, - [Required, IN, Description ( - "This property specifies the type of identification " - "used in the ConnectivityMemberID field. For Fibre " - "Channel: \n" - "* A ConnectivityMemberType of \'PermanentAddress\', " - "the ConnectivityMemberID is the NxPort WWN; \n" - "* A ConnectivityMemberType of \'NetworkAddress\', " - "the ConnectivityMemberID is the NXPort Address ID; \n" - "* A ConnectivityMemberType of \'SwitchPortID\', " - "the ConnectivityMemberID is \'Domain:PortNumber\'." ), - ModelCorrespondence { - "CIM_ZoneMembershipSettingData.ConnectivityMemberID" }] - string ConnectivityMemberID, - [Required, IN, Description ( - "The collection that the ZoneMembershipSettingData " - "should be added to. The collection is either a " - "Zone or ZoneAlias." )] - CIM_SystemSpecificCollection REF SystemSpecificCollection, - [IN, OUT, Description ( - "A reference to the newly created ZoneMembershipSettingData." - )] - CIM_ZoneMembershipSettingData REF ZoneMembershipSettingData); - - [Description ( - "Adds to the ZoneSet the specified Zone. Adding a Zone to " - "a ZoneSet, extends the zone enforcement definition of " - "the ZoneSet to include the members of that Zone. If " - "adding the Zone is successful, the Zone should be " - "associated with the ZoneSet by MemberOfCollection. \n" - "\n" - "This method might be deprecated in the future in lieu of " - "intrinsics after limitations in the CIM Operations are " - "addressed." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10..0x0FFF", "0x1000..0x7777", "0x8000.." }, - Values { "Success", "Not Supported", "Unspecified Error", - "Timeout", "Failed", "Invalid Parameter", "Access_Denied", - "Not_Found", "Already_Exists", "Insufficient_Resources", - "DMTF_Reserved", "Method_Reserved", "Vendor_Reserved" }] - uint32 AddZone( - [Required, IN, Description ( - "A reference to the ZoneSet that the Zone is added to." - )] - CIM_ZoneSet REF ZoneSet, - [IN, Description ( - "A reference to the Zone that is to be added to the ZoneSet." - )] - CIM_Zone REF Zone); - - [Description ( - "Adds to the Zone or ZoneAlias, the specified " - "ZoneMembershipSettingData. If adding the " - "ZoneMembershipSettingData is successful, an " - "ElementSettingData association will be created between " - "the ZoneMembershipSettingData and either the Zone or " - "ZoneAlias. \n" - "\n" - "This method might be deprecated in the future in lieu of " - "intrinsics after limitations in the CIM Operations are " - "addressed." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10..0x0FFF", "0x1000..0x7777", "0x8000.." }, - Values { "Success", "Not Supported", "Unspecified Error", - "Timeout", "Failed", "Invalid Parameter", "Access_Denied", - "Not_Found", "Already_Exists", "Insufficient_Resources", - "DMTF_Reserved", "Method_Reserved", "Vendor_Reserved" }] - uint32 AddZoneMembershipSettingData( - [Required, IN, Description ( - "A reference to the Zone or ZoneAlias that the " - "ZoneMembershipSettingData is to be added to." )] - CIM_SystemSpecificCollection REF SystemSpecificCollection, - [IN, Description ( - "A reference to the ZoneMembershipSettingData that " - "is to be added to the Zone or ZoneAlias." )] - CIM_ZoneMembershipSettingData REF ZoneMembershipSettingData); - - [Description ( - "Adds to the Zone the specified ZoneAlias. \n" - "\n" - "This method might be deprecated in the future in lieu of " - "intrinsics after limitations in the CIM Operations are " - "addressed." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10..0x0FFF", "0x1000..0x7777", "0x8000.." }, - Values { "Success", "Not Supported", "Unspecified Error", - "Timeout", "Failed", "Invalid Parameter", "Access_Denied", - "Not_Found", "Already_Exists", "Insufficient_Resources", - "DMTF_Reserved", "Method_Reserved", "Vendor_Reserved" }] - uint32 AddZoneAlias( - [Required, IN, Description ( - "A reference to the Zone that the ZoneAlias is to be added to." - )] - CIM_Zone REF Zone, - [IN, Description ( - "A reference to the ZoneAlias that is to be added to the Zone." - )] - CIM_NamedAddressCollection REF ZoneAlias); - - [Description ( - "Activates the specified ZoneSet. After the ZoneSet is " - "activated, the ZoneSet, associated Zone, ZoneAliases, " - "and ZoneMembershipSettingData instances will have the " - "active flag set to true. \n" - "\n" - "This method might be deprecated in the future in lieu of " - "intrinsics after limitations in the CIM Operations are " - "addressed." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "9", - "10..0x0FFF", "0x1000..0x7777", "0x8000.." }, - Values { "Success", "Not Supported", "Unspecified Error", - "Timeout", "Failed", "Invalid Parameter", "Access_Denied", - "Not_Found", "Insufficient_Resources", "DMTF_Reserved", - "Method_Reserved", "Vendor_Reserved" }] - uint32 ActivateZoneSet( - [Required, IN, Description ( - "A reference to the ZoneSet to be activated." )] - CIM_ZoneSet REF ZoneSet, - [Required, IN, Description ( - "Activate indicates whether the references to " - "ZoneSet should be activated (Active=true) or " - "deactivated (Active=false)." )] - boolean Activate); - - [Description ( - "SessionControl requests that a session start (value=2), " - "end (value=3), or terminate (value=4)." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "9", - "10..0x0FFF", "0x1000..0x7777", "0x8000.." }, - Values { "Success", "Not Supported", "Unspecified Error", - "Timeout", "Failed", "Invalid Parameter", "Access_Denied", - "Insufficient_Resources", "DMTF_Reserved", - "Method_Reserved", "Vendor_Reserved" }] - uint32 SessionControl( - [IN, Description ( - "RequestedSessionState is an integer enumeration " - "that indicates whether the ZoneService session has " - "been requested to start (value=2), end (value=3), " - "or terminate (value=4)." ), - ValueMap { "2", "3", "4" }, - Values { "Start", "End", "Terminate" }, - ModelCorrespondence { - "CIM_ZoneService.RequestedSessionState" }] - uint16 RequestedSessionState); - -}; diff --git a/build/vendor/dmtf_mof/Device/CIM_ZoneSet.mof b/build/vendor/dmtf_mof/Device/CIM_ZoneSet.mof deleted file mode 100644 index a7a3237e..00000000 --- a/build/vendor/dmtf_mof/Device/CIM_ZoneSet.mof +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Update of -// descriptions based on Tech Edit review.Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ZoneSet -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Device::FC" ), - Description ( - "A ZoneSet is a group of zones that are managed collectively by " - "the same domain. The managing domain is indicated by the " - "HostedCollection association. For example, for Fibre Channel, " - "this property would indicate a set of zones that are part of a " - "fabric. The zones are under enforcement by the fabric, only if " - "the Zoneset is set to active." )] -class CIM_ZoneSet : CIM_ConnectivityCollection { - - [Required, Override ( "ElementName" ), - Write, Description ( - "A user-friendly name for the ZoneSet that is unique " - "within the AdminDomain." )] - string ElementName; - - [Required, Write, Description ( - "Indicates that this ZoneSet is currently active (that " - "is, under enforcement of a fabric). This property can be " - "used to distinguish between a ZoneSet that is currently " - "active and a snapshot of a ZoneSet (with the same " - "InstanceName) that is for \"offline\" editing." )] - boolean Active; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_AbstractIndicationSubscription.mof b/build/vendor/dmtf_mof/Event/CIM_AbstractIndicationSubscription.mof deleted file mode 100644 index a05767eb..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_AbstractIndicationSubscription.mof +++ /dev/null @@ -1,188 +0,0 @@ -//Copyright (c) 2007 DMTF. All Rights Reserved. - [Association, Abstract, Version ( "2.16.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "CIM_IndicationSubscription describes a flow of Indications. " - "The flow is specified by the referenced Filter, and directed " - "to the referenced destination or process in the Handler. " - "Property values of the referenced CIM_IndicationFilter " - "instance and CIM_ListenerDestination instance MAY " - "significantly effect the definition of the subscription. E.g., " - "a subscription associated with a \"Transient\" destination MAY " - "be deleted when the destination terminates or is no longer " - "available." )] -class CIM_AbstractIndicationSubscription { - - [Key, Description ( - "The Filter that defines the criteria and data of the " - "possible Indications of this subscription." )] - CIM_ManagedElement REF Filter; - - [Key, Description ( - "The Handler addressing delivery of the possible " - "Indications of this subscription." )] - CIM_ListenerDestination REF Handler; - - [Description ( - "Defines the desired behavior for a subscription when a " - "fatal error occurs in one of the Indication processing " - "subcomponents (e.g., Indication processor, Indication or " - "instance provider, or Indication handler) and the " - "Indication cannot be successfully sent. Specifically, a " - "failure implies that some aspect of Indication " - "generation, processing or dispatch is no longer " - "functioning and Indications may be lost. If the value of " - "OnFatalErrorPolicy is 2 (\"Ignore\") or not set (NULL), " - "the subscription MUST continue to be processed in a " - "\'best effort\' mode. This mode of operation can lead to " - "unpredictable, and potentially misleading results, " - "because Indications may be lost. If the value is 3 " - "(\"Disable\"), the subscription MUST be disabled. With " - "this policy, no new Indications will be generated or " - "dispatched until the subscription is explicitly enabled. " - "This is accomplished via the property, " - "SubscriptionState. If the value is 4 (\"Remove\"), the " - "subscription MUST be deleted. Selecting this policy has " - "the same effect as issuing a DeleteInstance operation on " - "this subscription instance." ), - ValueMap { "1", "2", "3", "4" }, - Values { "Other", "Ignore", "Disable", "Remove" }] - uint16 OnFatalErrorPolicy; - - [Description ( - "A string defining \"Other\" values for " - "OnFatalErrorPolicy. This value MUST be set to a non NULL " - "value when OnFatalErrorPolicy is set to a value of 1 " - "(\"Other\"). For all other values, the " - "OtherOnFatalErrorPolicy MUST be NULL." )] - string OtherOnFatalErrorPolicy; - - [Description ( - "The FailureTriggerTimeInterval is used by the client to " - "specify a recommended minimum delay before the " - "OnFatalErrorPolicy is implemented." ), - Units ( "Seconds" ), - PUnit ( "second" )] - uint64 FailureTriggerTimeInterval; - - [Write, Description ( - "Indicates the current processing state of the subscription." - ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "Enabled", "Enabled Degraded", - "Disabled" }] - uint16 SubscriptionState; - - [Description ( - "A string defining \"Other\" values for " - "SubscriptionState. This value MUST be set to a non NULL " - "value when SubscriptionState is set to a value of 1 " - "(\"Other\"). For all other values, the " - "OtherSubscriptionState MUST be NULL." )] - string OtherSubscriptionState; - - [Description ( - "Date and time of the last state change. This value is " - "based on the notion of local date and time of the " - "Managed System Element running the Indication processing " - "subcomponents." )] - datetime TimeOfLastStateChange; - - [Write, Description ( - "SubscriptionDuration defines the desired length of the " - "subscription. Indications generated after the duration " - "of the subscription has exceeded SubscriptionDuration " - "MUST NOT be sent. The duration of a subscription MAY be " - "changed by modifying this property. An expired " - "subscription MAY be deleted and MUST NOT be modified. If " - "the value of SubscriptionDuration is not set, the " - "subscription MUST be treated as having no expiration " - "date." ), - Units ( "Seconds" ), - PUnit ( "second" )] - uint64 SubscriptionDuration; - - [Description ( - "SubscriptionStartTime is the time the subscription was " - "started. The value of this property is computed based on " - "the notion of date and time of the ManagedSystemElement " - "running the Indication processing subcomponents." )] - datetime SubscriptionStartTime; - - [Description ( - "SubscriptionTimeRemaining is a computed value that " - "provides a snapshot of the time remaining in the " - "Subscription." ), - Units ( "Seconds" ), - PUnit ( "second" )] - uint64 SubscriptionTimeRemaining; - - [Description ( - "The RepeatNotificationPolicy property defines the " - "desired behavior for handling Indications that report " - "the occurrence of the same underlying event (e.g., the " - "disk is still generating I/O errors and has not yet been " - "repaired). The defined semantics for the " - "RepeatNotificationCount, RepeatNotificationInterval, and " - "RepeatNotificationGap properties depend on the value of " - "RepeatNotificationPolicy, but values for these " - "properties MUST be set if the property is defined for " - "the selected policy. If the value of " - "RepeatNotificationPolicy is 0 (\"Unknown\") or not set, " - "no special processing for repeat Indications is defined " - "by the subscription. The semantics associated with the " - "handling of repeat Indications MAY be defined by the " - "Indication processing subcomponents. If the value of " - "RepeatNotificationPolicy is 2 (\"None\"), special " - "processing of repeat Indications MUST NOT be performed. " - "If the value is 3 (\"Suppress\") the first " - "RepeatNotificationCount Indications, describing the same " - "event, MUST be sent and all subsequent Indications for " - "this event suppressed for the remainder of the time " - "interval RepeatNotificationInterval. A new interval " - "starts when the next Indication for this event is " - "received. If the value of RepeatNotificationPolicy is 4 " - "(\"Delay\") and an Indication is received, this " - "Indication MUST be suppressed if, including this " - "Indication, RepeatNoticationCount or fewer Indications " - "for this event have been received during the prior time " - "interval defined by RepeatNotificationInterval. If this " - "Indication is the RepeatNotificationCount + 1 " - "Indication, this Indication MUST be sent and all " - "subsequent Indications for this event ignored until the " - "RepeatNotificationGap has elapsed. A " - "RepeatNotificationInterval MAY NOT overlap a " - "RepeatNotificationGap time interval." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "None", "Suppress", "Delay" }] - uint16 RepeatNotificationPolicy; - - [Description ( - "A string defining \"Other\" values for " - "RepeatNotificationPolicy. This value MUST be set to a " - "non NULL value when RepeatNotificationPolicy is set to a " - "value of 1 (\"Other\"). For all other values, the " - "OtherRepeatNotificationPolicy MUST be NULL." )] - string OtherRepeatNotificationPolicy; - - [Description ( - "Defines the time interval for the repeat notification " - "policy calculation." ), - Units ( "Seconds" ), - PUnit ( "second" )] - uint64 RepeatNotificationInterval; - - [Description ( - "Defines the gap interval for the repeat notification " - "policy calculation." ), - Units ( "Seconds" ), - PUnit ( "second" )] - uint64 RepeatNotificationGap; - - [Description ( - "Defines the count property for the repeat notification " - "policy calculation." )] - uint16 RepeatNotificationCount; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_AlertIndication.mof b/build/vendor/dmtf_mof/Event/CIM_AlertIndication.mof deleted file mode 100644 index cfc6e81c..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_AlertIndication.mof +++ /dev/null @@ -1,328 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Indication, Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "A concrete superclass for CIM Alert notifications. An " - "AlertIndication is a specialized type of CIM_Indication that " - "contains information about the severity, cause, recommended " - "actions and other data of a real world event. This event and " - "its data may or may not be modeled in the CIM class hierarchy." )] -class CIM_AlertIndication : CIM_ProcessIndication { - - [Description ( "A short description of the Indication." ), - MappingStrings { "Recommendation.ITU|X733.Additional text" }] - string Description; - - [Description ( - "The identifying information of the entity (ie, the " - "instance) for which this Indication is generated. The " - "property contains the path of an instance, encoded as a " - "string parameter - if the instance is modeled in the CIM " - "Schema. If not a CIM instance, the property contains " - "some identifying string that names the entity for which " - "the Alert is generated. The path or identifying string " - "is formatted per the AlertingElementFormat property." ), - ModelCorrespondence { - "CIM_AlertIndication.AlertingElementFormat" }] - string AlertingManagedElement; - - [Description ( - "The format of the AlertingManagedElement property is " - "interpretable based upon the value of this property. " - "Values are defined as: \n" - "0 - Unknown. The format is unknown or not meaningfully " - "interpretable by a CIM client application. \n" - "1 - Other. The format is defined by the value of the " - "OtherAlertingElementFormat property. \n" - "2 - CIMObjectPath. The format is a CIMObjectPath, with " - "format :.=\"\", " - "=\"\", . . . specifying an instance in " - "the CIM Schema." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "Other", "CIMObjectPath" }, - ModelCorrespondence { - "CIM_AlertIndication.AlertingManagedElement", - "CIM_AlertIndication.OtherAlertingElementFormat" }] - uint16 AlertingElementFormat = 0; - - [Description ( - "A string defining \"Other\" values for " - "AlertingElementFormat. This value MUST be set to a non " - "NULL value when AlertingElementFormat is set to a value " - "of 1 (\"Other\"). For all other values of " - "AlertingElementFormat, the value of this string must be " - "set to NULL." ), - ModelCorrespondence { - "CIM_AlertIndication.AlertingElementFormat" }] - string OtherAlertingElementFormat; - - [Required, Description ( - "Primary classification of the Indication. The following " - "values are defined: \n" - "1 - Other. The Indication\'s OtherAlertType property " - "conveys its classification. Use of \"Other\" in an " - "enumeration is a standard CIM convention. It means that " - "the current Indication does not fit into the categories " - "described by this enumeration. \n" - "2 - Communications Alert. An Indication of this type is " - "principally associated with the procedures and/or " - "processes required to convey information from one point " - "to another. \n" - "3 - Quality of Service Alert. An Indication of this type " - "is principally associated with a degradation or errors " - "in the performance or function of an entity. \n" - "4 - Processing Error. An Indication of this type is " - "principally associated with a software or processing " - "fault. \n" - "5 - Device Alert. An Indication of this type is " - "principally associated with an equipment or hardware " - "fault. \n" - "6 - Environmental Alert. An Indication of this type is " - "principally associated with a condition relating to an " - "enclosure in which the hardware resides, or other " - "environmental considerations. \n" - "7 - Model Change. The Indication addresses changes in " - "the Information Model. For example, it may embed a " - "Lifecycle Indication to convey the specific model change " - "being alerted. \n" - "8 - Security Alert. An Indication of this type is " - "associated with security violations, detection of " - "viruses, and similar issues." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Other", "Communications Alert", - "Quality of Service Alert", "Processing Error", - "Device Alert", "Environmental Alert", "Model Change", - "Security Alert" }, - MappingStrings { "Recommendation.ITU|X733.Event type" }] - uint16 AlertType; - - [Description ( - "A string describing the Alert type - used when the " - "AlertType property is set to 1, \"Other State Change\"." ), - ModelCorrespondence { "CIM_AlertIndication.AlertType" }] - string OtherAlertType; - - [Required, Override ( "PerceivedSeverity" ), - Description ( - "An enumerated value that describes the severity of the " - "Alert Indication from the notifier\'s point of view: \n" - "1 - Other, by CIM convention, is used to indicate that " - "the Severity\'s value can be found in the OtherSeverity " - "property. \n" - "3 - Degraded/Warning should be used when its appropriate " - "to let the user decide if action is needed. \n" - "4 - Minor should be used to indicate action is needed, " - "but the situation is not serious at this time. \n" - "5 - Major should be used to indicate action is needed " - "NOW. \n" - "6 - Critical should be used to indicate action is needed " - "NOW and the scope is broad (perhaps an imminent outage " - "to a critical resource will result). \n" - "7 - Fatal/NonRecoverable should be used to indicate an " - "error occurred, but it\'s too late to take remedial " - "action. \n" - "2 and 0 - Information and Unknown (respectively) follow " - "common usage. Literally, the AlertIndication is purely " - "informational or its severity is simply unknown." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7" }, - Values { "Unknown", "Other", "Information", - "Degraded/Warning", "Minor", "Major", "Critical", - "Fatal/NonRecoverable" }, - MappingStrings { "Recommendation.ITU|X733.Perceived severity" }] - uint16 PerceivedSeverity; - - [Required, Description ( - "An enumerated value that describes the probable cause of " - "the situation which resulted in the AlertIndication." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26", "27", - "28", "29", "30", "31", "32", "33", "34", "35", "36", - "37", "38", "39", "40", "41", "42", "43", "44", "45", - "46", "47", "48", "49", "50", "51", "52", "53", "54", - "55", "56", "57", "58", "59", "60", "61", "62", "63", - "64", "65", "66", "67", "68", "69", "70", "71", "72", - "73", "74", "75", "76", "77", "78", "79", "80", "81", - "82", "83", "84", "85", "86", "87", "88", "89", "90", - "91", "92", "93", "94", "95", "96", "97", "98", "99", - "100", "101", "102", "103", "104", "105", "106", "107", - "108", "109", "110", "111", "112", "113", "114", "115", - "116", "117", "118", "119", "120", "121", "122", "123", - "124", "125", "126", "127", "128", "129", "130" }, - Values { "Unknown", "Other", "Adapter/Card Error", - "Application Subsystem Failure", "Bandwidth Reduced", - "Connection Establishment Error", - "Communications Protocol Error", - "Communications Subsystem Failure", - "Configuration/Customization Error", "Congestion", - "Corrupt Data", "CPU Cycles Limit Exceeded", - "Dataset/Modem Error", "Degraded Signal", - "DTE-DCE Interface Error", "Enclosure Door Open", - "Equipment Malfunction", "Excessive Vibration", - "File Format Error", "Fire Detected", "Flood Detected", - "Framing Error", "HVAC Problem", "Humidity Unacceptable", - "I/O Device Error", "Input Device Error", "LAN Error", - "Non-Toxic Leak Detected", - "Local Node Transmission Error", "Loss of Frame", - "Loss of Signal", - //31 - "Material Supply Exhausted", - "Multiplexer Problem", "Out of Memory", - "Output Device Error", "Performance Degraded", - "Power Problem", "Pressure Unacceptable", - "Processor Problem (Internal Machine Error)", - "Pump Failure", "Queue Size Exceeded", "Receive Failure", - "Receiver Failure", "Remote Node Transmission Error", - "Resource at or Nearing Capacity", - "Response Time Excessive", - "Retransmission Rate Excessive", "Software Error", - "Software Program Abnormally Terminated", - "Software Program Error (Incorrect Results)", - "Storage Capacity Problem", "Temperature Unacceptable", - "Threshold Crossed", "Timing Problem", - "Toxic Leak Detected", "Transmit Failure", - "Transmitter Failure", "Underlying Resource Unavailable", - "Version MisMatch", "Previous Alert Cleared", - //60 - "Login Attempts Failed", - "Software Virus Detected", "Hardware Security Breached", - "Denial of Service Detected", - "Security Credential MisMatch", "Unauthorized Access", - "Alarm Received", "Loss of Pointer", "Payload Mismatch", - "Transmission Error", "Excessive Error Rate", - "Trace Problem", "Element Unavailable", "Element Missing", - "Loss of Multi Frame", "Broadcast Channel Failure", - "Invalid Message Received", "Routing Failure", - "Backplane Failure", "Identifier Duplication", - "Protection Path Failure", "Sync Loss or Mismatch", - "Terminal Problem", "Real Time Clock Failure", - "Antenna Failure", "Battery Charging Failure", - "Disk Failure", "Frequency Hopping Failure", - "Loss of Redundancy", "Power Supply Failure", - "Signal Quality Problem", - //91 - "Battery Discharging", "Battery Failure", - "Commercial Power Problem", "Fan Failure", - "Engine Failure", "Sensor Failure", "Fuse Failure", - "Generator Failure", "Low Battery", "Low Fuel", - "Low Water", "Explosive Gas", "High Winds", "Ice Buildup", - "Smoke", "Memory Mismatch", "Out of CPU Cycles", - "Software Environment Problem", - "Software Download Failure", "Element Reinitialized", - "Timeout", "Logging Problems", "Leak Detected", - "Protection Mechanism Failure", - //115 - "Protecting Resource Failure", - "Database Inconsistency", "Authentication Failure", - "Breach of Confidentiality", "Cable Tamper", - "Delayed Information", "Duplicate Information", - "Information Missing", "Information Modification", - "Information Out of Sequence", "Key Expired", - "Non-Repudiation Failure", "Out of Hours Activity", - "Out of Service", "Procedural Error", - "Unexpected Information" }, - MappingStrings { "Recommendation.ITU|X733.Probable cause", - "Recommendation.ITU|M3100.probableCause", - "ITU-IANA-ALARM-TC" }, - ModelCorrespondence { - "CIM_AlertIndication.ProbableCauseDescription", - "CIM_AlertIndication.EventID", - "CIM_AlertIndication.EventTime" }] - uint16 ProbableCause; - - [Description ( - "Provides additional information related to the ProbableCause." - ), - ModelCorrespondence { "CIM_AlertIndication.ProbableCause" }] - string ProbableCauseDescription; - - [Description ( - "Provides information on trending - trending up, down or no change." - ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Not Applicable", "Trending Up", - "Trending Down", "No Change" }, - MappingStrings { "Recommendation.ITU|X733.TrendIndication" }] - uint16 Trending; - - [Description ( - "Free form descriptions of the recommended actions to " - "take to resolve the cause of the notification." ), - MappingStrings { - "Recommendation.ITU|X733.Proposed repair actions" }] - string RecommendedActions[]; - - [Description ( - "An instrumentation or provider specific value that " - "describes the underlying \"real-world\" event " - "represented by the Indication. Two Indications with the " - "same, non NULL EventID value are considered, by the " - "creating entity, to represent the same event. The " - "comparison of two EventID values is only defined for " - "Alert Indications with identical, non NULL values of " - "SystemCreateClassName, SystemName and ProviderName." ), - ModelCorrespondence { "CIM_AlertIndication.ProbableCause" }] - string EventID; - - [Description ( - "The time and date the underlying event was first " - "detected. If specified, this property MUST be set to " - "NULL if the creating entity is not capable of providing " - "this information. This value is based on the notion of " - "local date and time of the Managed System Element " - "generating the Indication." ), - ModelCorrespondence { "CIM_AlertIndication.ProbableCause" }] - datetime EventTime; - - [Description ( - "The scoping System\'s CreationClassName for the Provider " - "generating this Indication." ), - MaxLen ( 256 )] - string SystemCreationClassName; - - [Description ( - "The scoping System\'s Name for the Provider generating " - "this Indication." ), - MaxLen ( 256 )] - string SystemName; - - [Description ( - "The name of the Provider generating this Indication." ), - MaxLen ( 256 )] - string ProviderName; - - [Description ( - "The formatted message. This message is constructed by " - "combining some or all of the dynamic elements specified " - "in the MessageArguments property with the static " - "elements uniquely identified by the MessageID in a " - "message registry or other catalog associated with the " - "OwningEntity." ), - ModelCorrespondence { "CIM_AlertIndication.MessageID", - "CIM_AlertIndication.MessageArguments" }] - string Message; - - [Description ( - "An array containing the dynamic content of the message." ), - ModelCorrespondence { "CIM_AlertIndication.Message", - "CIM_AlertIndication.MessageID" }] - string MessageArguments[]; - - [Description ( - "A string that uniquely identifies, within the scope of " - "the OwningEntity, the format of the Message." ), - ModelCorrespondence { "CIM_AlertIndication.Message", - "CIM_AlertIndication.MessageArguments" }] - string MessageID; - - [Description ( - "A string that uniquely identifies the entity that owns " - "the definition of the format of the Message described in " - "this instance. OwningEntity MUST include a copyrighted, " - "trademarked or otherwise unique name that is owned by " - "the business entity or standards body defining the " - "format." )] - string OwningEntity; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_AlertInstIndication.mof b/build/vendor/dmtf_mof/Event/CIM_AlertInstIndication.mof deleted file mode 100644 index 0db7caed..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_AlertInstIndication.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Indication, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "A subclass of CIM_AlertIndication that embeds a CIM_Inst " - "Indication. It is used when adding AlertIndication data to a " - "LifeCycle Indication." )] -class CIM_AlertInstIndication : CIM_AlertIndication { - - [Override ( "AlertType" ), - Description ( - "The primary classification of the Indication, defaulted " - "to 7, \"Model Change\", for this class. This is done " - "because: 1) the primary purpose of AlertInstIndication " - "is to add Alert data to a LifeCycle Indication; and 2) " - "LifeCycle Indications deal with \'model changes\'." )] - uint16 AlertType = 7; - - [Required, Description ( - "Embeds the InstIndication that is part of this Alert " - "Indication. Only the properties selected by the " - "Indication Filter\'s Query are included." ), - EmbeddedObject] - string IndObject; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_ClassCreation.mof b/build/vendor/dmtf_mof/Event/CIM_ClassCreation.mof deleted file mode 100644 index 7ee3402f..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_ClassCreation.mof +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Indication, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "CIM_ClassCreation notifies when a new class is defined in the schema." - )] -class CIM_ClassCreation : CIM_ClassIndication { - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_ClassDeletion.mof b/build/vendor/dmtf_mof/Event/CIM_ClassDeletion.mof deleted file mode 100644 index 2dff0367..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_ClassDeletion.mof +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Indication, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "CIM_ClassDeletion notifies when a class is deleted from the schema." - )] -class CIM_ClassDeletion : CIM_ClassIndication { - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_ClassIndication.mof b/build/vendor/dmtf_mof/Event/CIM_ClassIndication.mof deleted file mode 100644 index 115434ba..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_ClassIndication.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Indication, Abstract, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "CIM_ClassIndication is an abstract superclass describing " - "changes in the definition of the schema. Subclasses represent " - "specific types of change notifications, such as class " - "creation, deletion and modification." )] -class CIM_ClassIndication : CIM_Indication { - - [Required, Description ( - "The current definition of the class that is created, " - "changed or deleted in the schema. In the case of a " - "CIM_ClassDeletion Indication, the definition for the " - "class just prior to deletion should be placed in this " - "property." ), - EmbeddedObject] - string ClassDefinition; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_ClassModification.mof b/build/vendor/dmtf_mof/Event/CIM_ClassModification.mof deleted file mode 100644 index 31c88077..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_ClassModification.mof +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Indication, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "CIM_ClassModification notifies when a class definition in the " - "schema is modified." )] -class CIM_ClassModification : CIM_ClassIndication { - - [Required, Description ( - "A copy of the \'previous\' class definition whose change " - "generated the Indication. PreviousClassDefinition " - "contains an \'older\' copy of the class\' information, " - "as compared to what is found in the ClassDefinition " - "property (inherited from ClassIndication)." ), - EmbeddedObject] - string PreviousClassDefinition; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_FilterCollection.mof b/build/vendor/dmtf_mof/Event/CIM_FilterCollection.mof deleted file mode 100644 index 3dcd725a..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_FilterCollection.mof +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.20.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "A FilterCollection is a subclass of CIM_Collection which " - "aggregates instances of CIM_IndicationFilter." )] -class CIM_FilterCollection : CIM_Collection { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. In order to ensure uniqueness within the " - "NameSpace, the value of InstanceID shall be constructed " - "using the following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon " - "\':\', and where MUST include a copyrighted, " - "trademarked or otherwise unique name that is owned by " - "the business entity creating/defining the InstanceID, or " - "is a registered ID that is assigned to the business " - "entity by a recognized global authority (This is similar " - "to the _ structure of Schema " - "class names.) In addition, to ensure uniqueness " - "MUST NOT contain a colon (\':\'). When using this " - "algorithm, the first colon to appear in InstanceID MUST " - "appear between and . \n" - " is chosen by the business entity and SHOULD " - "not be re-used to identify different underlying " - "(real-world) elements. If the above \'preferred\' " - "algorithm is not used, the defining entity MUST assure " - "that the resultant InstanceID is not re-used across any " - "InstanceIDs produced by this or other providers for this " - "instance\'s NameSpace. \n" - "For DMTF defined instances, the \'preferred\' algorithm " - "MUST be used with the set to \'CIM\'." )] - string InstanceID; - - [Description ( - "The Collection Name is to be specified by a profile or " - "owning organization such that it can be used to identify " - "a particular collection of indication filters. The value " - "of CollectionName shall be constructed using the " - "following algorithm: \n" - ": \n" - "Where and are separated by a " - "colon \':\', and where shall include a " - "copyrighted, trademarked or otherwise unique name that " - "is owned by the business entity creating/defining the " - "CollectionName. In addition, to ensure uniqueness " - " shall not contain a colon (\':\').\n" - " is the string label defined in the " - "specification defining the collection." )] - string CollectionName; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_FilterCollectionSubscription.mof b/build/vendor/dmtf_mof/Event/CIM_FilterCollectionSubscription.mof deleted file mode 100644 index 87e5ccbf..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_FilterCollectionSubscription.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Association, Version ( "2.20.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "CIM_FilterCollectionSubscription associates the " - "CIM_FilterCollection with a CIM_ListenerDestionation." )] -class CIM_FilterCollectionSubscription : CIM_AbstractIndicationSubscription { - - [Key, Override ( "Filter" ), - Description ( - "The Filter that defines the criteria and data of the " - "possible Indications of this subscription." )] - CIM_FilterCollection REF Filter; - - [Key, Override ( "Handler" ), - Description ( - "The Handler addressing delivery of the possible " - "Indications of this subscription." )] - CIM_ListenerDestination REF Handler; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_FormattedIndicationSubscription.mof b/build/vendor/dmtf_mof/Event/CIM_FormattedIndicationSubscription.mof deleted file mode 100644 index 97f8ebaf..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_FormattedIndicationSubscription.mof +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "A subclass of IndicationSubscription that defines the text " - "formatting of Indication information. The " - "TextFormatOwningEntity, TextFormatID, TextFormat, and " - "TextFormatParameters properties are used to describe a " - "human-readable representation of the Indication as defined by " - "the referenced CIM_IndicationFilter. This representation MAY " - "be used by the CIM_ListenerDestination when the intended " - "consumer of the Indication is human. For example, this format " - "could be used when writing the Indication to a system log or " - "sending an e-mail notification to a system administrator." )] -class CIM_FormattedIndicationSubscription : CIM_IndicationSubscription { - - [Description ( - "The TextFormatOwningEntity is a string that uniquely " - "identifies the entity that owns the definition of the " - "human-readable format described in this instance. " - "OwningEntity MUST include a copyrighted, trademarked or " - "otherwise unique name that is owned by the business " - "entity or standards body defining the format." ), - ModelCorrespondence { - "CIM_FormattedIndicationSubscription.TextFormatID", - "CIM_FormattedIndicationSubscription.TextFormat", - "CIM_FormattedIndicationSubscription.TextFormatParameters" }] - string TextFormatOwningEntity; - - [Description ( - "An opaque string that uniquely identifies, within the " - "scope of the TextFormatOwningEntity, a human-readable " - "format for representing the Indications described by " - "this Subscription." ), - ModelCorrespondence { - "CIM_FormattedIndicationSubscription.TextFormatOwningEntity", - "CIM_FormattedIndicationSubscription.TextFormat", - "CIM_FormattedIndicationSubscription.TextFormatParameters" }] - string TextFormatID; - - [Description ( - "A string describing the human-readable format for " - "representing the Indications described by this " - "Subscription. The actual text is constructed by applying " - "the dynamic content, defined in the Indication, to the " - "string specified in this property. /n /n The dynamic " - "content is specified by embedding the following syntax " - "in the appropriate places in the format string: \n" - "\"{\" [\"[\"[]\"]\"],\"}\" \n" - "- the first occurrence of defines the element of " - "TextFormatParameters that contains the name of the " - "Indication property to be used to populate the text message.\n" - "- if the Indication property defined by the first " - " is an array property, then the first index MUST " - "be followed by either empty brackets (i.e., []) or an " - "index value enclosed in brackets (e.g., [1]). If empty " - "brackets are specified (e.g., {4[], string}), then the " - "dynamic content of the text message is populated with a " - "list of the array elements. If an index is specified " - "(e.g., {4[1], string}, then only the specified array " - "element is used to populate the message. If the value of " - "the dynamic content is not defined in the Indication, " - "then the string \"UNKNOWN\" is used to populate the text message.\n" - "- defines the type of the dynamic content. Valid " - "values for are: \'boolean\', \'string\', " - "\'char16\', \'uint8\', \'sint8\', \'uint16\', \'sint16\', " - "\'uint32\', \'sint32\', \'uint64\', \'sint64\', " - "\'datetime\', \'real32\', \'real64\' or \'ref\'. \n" - "\n" - "The string encoding for the dynamic content MUST conform " - "to the MOF Syntax Grammar described in the CIM " - "Infrastructure Specification. The string encoding for a " - "list of array elements MUST conform to the definition of " - "the arrayInitializer element.\n" - "As an example, a format string for a UPS AlertIndication " - "could be defined as follows: \"A {4,string} UPS Alert of " - "type {5,uint16} was detected on the device {6,string} on " - "the system {2,string} at {1,datetime}. The following " - "actions have been recommended to resolve the alert: " - "{3[],string}\"." )] - string TextFormat; - - [Description ( - "An indexed array containing the names of properties " - "defined in the select clause of the associated " - "CIM_IndicationFilter Query. The values of these " - "Indication properties are used to populate the dynamic " - "content of the text message." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_FormattedIndicationSubscription.TextFormatOwningEntity", - "CIM_FormattedIndicationSubscription.TextFormatID", - "CIM_FormattedIndicationSubscription.TextFormat" }] - string TextFormatParameters[]; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_Indication.mof b/build/vendor/dmtf_mof/Event/CIM_Indication.mof deleted file mode 100644 index 864c9f24..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_Indication.mof +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Indication, Abstract, Version ( "2.24.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "CIM_Indication is the abstract root class for all " - "notifications about changes in schema, objects and their data, " - "and about events detected by providers and instrumentation. " - "Subclasses represent specific types of notifications. \n" - "\n" - "To receive an Indication, a consumer (or subscriber) must " - "create an instance of CIM_IndicationFilter describing the " - "criteria of the notification, an instance of " - "CIM_ListenerDestination describing the delivery of the " - "notification, and an instance of CIM_IndicationSubscription " - "associating the Filter and Handler." )] -class CIM_Indication { - - [Description ( - "An identifier for the Indication. This property is " - "similar to a key value in that it can be used for " - "identification, when correlating Indications (see the " - "CorrelatedIndications array). Its value SHOULD be unique " - "as long as correlations are reported, but MAY be reused " - "or left NULL if no future Indications will reference it " - "in their CorrelatedIndications array.To ensure " - "uniqueness, the value of IndicationIdentifier should be " - "constructed using the following \"preferred\" algorithm: \n" - ": \n" - "Where and are separated by a colon " - "(:), and where must include a copyrighted, " - "trademarked, or otherwise unique name that is owned by " - "the business entity that is creating or defining the " - "IndicationIdentifier or that is a recognized ID that is " - "assigned to the business entity by a recognized global " - "authority. (This requirement is similar to the _ structure of Schema class names.) In " - "addition, to ensure uniqueness must not contain " - "a colon (:). When using this algorithm, the first colon " - "to appear in IndicationIdentifier must appear between " - " and . \n" - " is chosen by the business entity and should " - "not be re-used to identify different underlying " - "(real-world) elements. \n" - "If the above \"preferred\" algorithm is not used, the " - "defining entity should assure that the resulting " - "IndicationIdentifier is not re-used across any " - "IndicationIdentifiers that are produced by this or other " - "providers for the NameSpace of this instance. \n" - "For DMTF-defined instances, the \"preferred\" algorithm " - "should be used with the set to CIM." ), - MappingStrings { - "Recommendation.ITU|X733.Notification identifier" }] - string IndicationIdentifier; - - [Description ( - "A list of IndicationIdentifiers whose notifications are " - "correlated with (related to) this one." ), - MappingStrings { - "Recommendation.ITU|X733.Correlated notifications" }, - ModelCorrespondence { "CIM_Indication.IndicationIdentifier" }] - string CorrelatedIndications[]; - - [Description ( - "The time and date of creation of the Indication. The " - "property may be set to NULL if the entity creating the " - "Indication is not capable of determining this " - "information. Note that IndicationTime may be the same " - "for two Indications that are generated in rapid " - "succession." )] - datetime IndicationTime; - - [Description ( - "An enumerated value that describes the severity of the " - "Indication from the notifier\'s point of view: \n" - "1 - Other, by CIM convention, is used to indicate that " - "the Severity\'s value can be found in the OtherSeverity " - "property. \n" - "3 - Degraded/Warning should be used when its appropriate " - "to let the user decide if action is needed. \n" - "4 - Minor should be used to indicate action is needed, " - "but the situation is not serious at this time. \n" - "5 - Major should be used to indicate action is needed " - "NOW. \n" - "6 - Critical should be used to indicate action is needed " - "NOW and the scope is broad (perhaps an imminent outage " - "to a critical resource will result). \n" - "7 - Fatal/NonRecoverable should be used to indicate an " - "error occurred, but it\'s too late to take remedial " - "action. \n" - "2 and 0 - Information and Unknown (respectively) follow " - "common usage. Literally, the Indication is purely " - "informational or its severity is simply unknown." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", ".." }, - Values { "Unknown", "Other", "Information", - "Degraded/Warning", "Minor", "Major", "Critical", - "Fatal/NonRecoverable", "DMTF Reserved" }, - MappingStrings { "Recommendation.ITU|X733.Perceived severity" }] - uint16 PerceivedSeverity; - - [Description ( - "Holds the value of the user defined severity value when " - "\'PerceivedSeverity\' is 1 (\"Other\")." ), - ModelCorrespondence { "CIM_AlertIndication.PerceivedSeverity" }] - string OtherSeverity; - - [Description ( - "An identifier for the indication filter that selects " - "this indication and causes it to be sent. This property " - "is to be filled out by the indication sending service. " - "The value shall be correlatable with the Name property " - "of the instance of CIM_IndicationFilter describing the " - "criteria of the indication. The value of the " - "IndicationFilterName should be formatted using the " - "following algorithm: < OrgID > : < LocalID >, where < " - "OrgID > and < LocalID > are separated by a colon (:) and " - "< OrgID > shall include a copyrighted, trademarked, or " - "otherwise unique name that is owned by the business " - "entity that is creating or defining the value or that is " - "a registered ID assigned to the business entity by a " - "recognized global authority. In addition, to ensure " - "uniqueness, < OrgID > shall not contain a colon (:).When " - "using this algorithm, the first colon to appear in the " - "value shall appear between < OrgID > and < LocalID >. < " - "LocalID > is chosen by the business entity and shall be " - "used uniquely." ), - ModelCorrespondence { "CIM_IndicationFilter.Name" }] - string IndicationFilterName; - - [Description ( - "The sequence context portion of a sequence identifier " - "for the indication. The sequence number portion of the " - "sequence identifier is provided by the SequenceNumber " - "property. The combination of both property values " - "represents the sequence identifier for the indication.\n" - "The sequence identifier for the indication enables a CIM " - "listener to identify duplicate indications when the CIM " - "service attempts the delivery retry of indications, to " - "reorder indications that arrive out-of-order, and to " - "detect lost indications.\n" - "If a CIM service does not support sequence identifiers " - "for indications, this property shall be NULL.\n" - "If a CIM service supports sequence identifiers for " - "indications, this property shall be maintained by the " - "CIM service for each registered listener destination, " - "and its value shall uniquely identify the CIM service " - "and the indication service within the CIM service such " - "that restarts of the CIM service and deregistration of " - "listener destinations to the CIM service cause the value " - "to change, without reusing earlier values for a " - "sufficiently long time.\n" - "When retrying the delivery of an indication, this " - "property shall have the same value as in the original delivery.\n" - "To guarantee this uniqueness, the property value should " - "be constructed using the following format (defined in " - "ABNF): sequence-context = indication-service-name \"#\" " - "cim-service-start-id \"#\" listener-destination-creation-time\n" - "Where: indication-service-name is the value of the Name " - "property of the CIM_IndicationService instance " - "responsible for delivering the indication. " - "cim-service-start-id is an identifier that uniquely " - "identifies the CIM service start, for example via a " - "timestamp of the start time, or via a counter that " - "increases for each start or restart. " - "listener-destination-creation-time is a timestamp of the " - "creation time of the CIM_ListenerDestination instance " - "representing the listener destination.\n" - "Since this format is only a recommendation, CIM clients " - "shall treat the value as an opaque identifier for the " - "sequence context and shall not rely on this format." ), - ModelCorrespondence { "CIM_Indication.SequenceNumber" }] - string SequenceContext; - - [Description ( - "The sequence number portion of a sequence identifier for " - "the indication. The sequence context portion of the " - "sequence identifier is provided by the SequenceContext " - "property. The combination of both property values " - "represents the sequence identifier for the indication.\n" - "The sequence identifier for the indication enables a CIM " - "listener to identify duplicate indications when the CIM " - "service attempts the delivery retry of indications, to " - "reorder indications that arrive out-of-order, and to " - "detect lost indications.\n" - "If a CIM service does not support sequence identifiers " - "for indications, this property shall be NULL.\n" - "If a CIM service supports sequence identifiers for " - "indications, this property shall be maintained by the " - "CIM service for each registered listener destination, " - "and its value shall uniquely identify the indication " - "within the sequence context provided by SequenceContext. " - "It shall start at 0 whenever the sequence context string " - "changes. Otherwise, it shall be increased by 1 for every " - "new indication to that listener destination, and it " - "shall wrap to 0 when the value range is exceeded.\n" - "When retrying the delivery of an indication, this " - "property shall have the same value as in the original " - "delivery." ), - ModelCorrespondence { "CIM_Indication.SequenceContext" }] - sint64 SequenceNumber; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_IndicationFilter.mof b/build/vendor/dmtf_mof/Event/CIM_IndicationFilter.mof deleted file mode 100644 index 15b6eb23..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_IndicationFilter.mof +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "CIM_IndicationFilter defines the criteria for generating an " - "instance of CIM_Indication and what data should be returned in " - "that instance. It is derived from CIM_ManagedElement to allow " - "modeling the dependency of the filter on a specific service.\n" - "If used with the \"DMTF:CQLT\" language, the processing and " - "CQLT tokens that must be supported are described in the " - "description of the QueryLanguage property" )] -class CIM_IndicationFilter : CIM_ManagedElement { - - [Key, Description ( - "A System\'s CreationClassName. The Filter is defined in " - "the context of a CIM_System, where it is hosted or to " - "which it applies. In a future release, a weak " - "relationship will be explicitly added to the model. This " - "is not done now to allow further refinement of the " - "Filter definition and its inheritance tree. Keys are " - "defined now to allow the class to be instantiated." ), - MaxLen ( 256 )] - string SystemCreationClassName; - - [Key, Description ( - "A System\'s Name. The Filter is defined in the context " - "of a CIM_System, where it is hosted or to which it " - "applies. In a future release, a weak relationship will " - "be explicitly added to the model. This is not done now " - "to allow further refinement of the Filter definition and " - "its inheritance tree. Keys are defined now to allow the " - "class to be instantiated." ), - MaxLen ( 256 )] - string SystemName; - - [Key, Description ( - "Indicates the name of the class or the subclass used in " - "the creation of an instance. When used with the other " - "key properties of this class, it allows all instances of " - "this class and its subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Description ( "The name of the filter." )] - string Name; - - [Deprecated { "CIM_IndicationFilter.SourceNamespaces" }, - Description ( - "The path to a local namespace where the Indications " - "originate. If NULL, the namespace of the Filter " - "registration is assumed." )] - string SourceNamespace; - - [Description ( - "The names of the local namespaces where the Indications " - "originate. If NULL, the namespace of the Filter " - "registration is assumed. SourceNamespaces replaces the " - "SourceNamespace property on IndicationFilter to provide " - "a means of defining the multiple namespaces where " - "indications may originate." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_Namespace.Name" }] - string SourceNamespaces[]; - - [Description ( - "If IndividualSubscriptionSupported is true, the " - "implementation shall support direct subscription to this " - "IndicationFilter. If IndividualSubscriptionSupported is " - "false, the implementation shall not support direct " - "subscription to this IndicationFilter." )] - boolean IndividualSubscriptionSupported = true; - - [Required, Description ( - "A query expression that defines the condition(s) under " - "which instances of CIM_Indication will be generated. For " - "CIM_InstIndication subclasses of CIM_Indication classes, " - "the query expression may also define the instance " - "properties to be copied to the CIM_InstIndication\'s " - "SourceInstance and PreviousInstance properties. Query " - "language semantics include projection (e.g., Select), " - "range (e.g., From) and predicate (e.g., Where). \n" - "When used with QueryLanguage set to \"DMTF:CQL\" or " - "\"DMTF:CQLT\", the FROM clause shall contain at least " - "one subclass of CIM_Indication and may contain any " - "number of other classes or subqueries. If only one " - "subclass of CIM_Indication is named, it defines the " - "CIM_Indication that this Instance of " - "CIM_IndicationFilter will produce. If more than one " - "subclass of CIM_Indication is named, then one of them " - "must be named explicitly in the select-list. \n" - "The select-list must refer explicitly or implicitly to " - "exactly one CIM_Indication subclass. In addition, it " - "shall conform to one of several options: \n" - "1) only a \"*\": This may only be used if the Indication " - "subclass is the only entry on the FROM list. \n" - "2) only a \".*\": This form " - "may be used if the FROM clause contains more than one " - "Indication subclass. \n" - "3) a list of the form \"*[\",\"[ " - "AS ]]\": This form may only be used if the " - "CIM_Indication subclass is the only entry on the FROM " - "list. In this form, the literal is assigned to the named " - "property of the selected CIM_Indication subclass \n" - "4) a list of the form \". " - "*[\",\" [. |\"\": " - " AS | . " - "AS ] ]\" : The first term selects the " - "appropriate CIM_Indication subclass to produce. " - "Subsequent terms allow other properties of that " - "indication, or allow a literal or property of another " - "class to be assigned to the output as one of the " - "properties of the selected CIM_Indication subclass. \n" - "Note that in all cases, only the property names of the " - "selected CIM_Indication subclass may be referred to in " - "the select-list.\n" - "When used with \"DMTF:CQLT\", the additional string " - "array property TemplateVariable should be used to " - "provide additional filtering information to the query." ), - ModelCorrespondence { "CIM_IndicationFilter.QueryLanguage", - "CIM_IndicationFilter.TemplateVariable" }] - string Query; - - [Required, Description ( - "The language in which the query is expressed. . \n" - "\"DMTF:CQL\" indicates a CIM Query Language string. \n" - "\"DMTF:CQLT\" indicates a CIM Query Language Template " - "string. When used, the identifiers recognized in the " - "$identifier$ tokens are \"SELF\" and the property names " - "of this class, or one of its subclasses. As seen by a " - "CIM client, the value of the Query property is not " - "changed as a result of template processing. Template " - "processing conceptually produces a new query string, " - "which defines the actual conditions that will trigger " - "production of a CIM_Indication instance. When used in " - "the Query string, $SELF$ will be replaced by a string " - "corresponding to a WBEM URI referencing the instance of " - "this class that contains the Query template string. " - "Tokens of the form $$ will be replaced by " - "a string representing the corresponding property value " - "of the instance of this class that contains the Query " - "string. The Query string must be evaluated when the " - "CIM_IndicationFilter is created and at any time when one " - "any modification of any property referenced by tokens in " - "the Query string are modified." ), - ModelCorrespondence { "CIM_IndicationFilter.Query", - "CIM_IndicationFilter.TemplateVariable" }] - string QueryLanguage; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_IndicationHandler.mof b/build/vendor/dmtf_mof/Event/CIM_IndicationHandler.mof deleted file mode 100644 index 56e3e98b..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_IndicationHandler.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Deprecated { "CIM_ListenerDestination" }, - Abstract, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "CIM_IndicationHandler is an abstract superclass describing how " - "an Indication is to be processd/delivered/\'handled\'. This " - "may define a destination and protocol for delivering " - "Indications, or it may define a process to invoke. This class " - "is derived from CIM_ManagedElement to allow modeling the " - "dependency of the Handler on a specific service." )] -class CIM_IndicationHandler : CIM_ListenerDestination { - - [Deprecated { "No value" }, - Description ( - "The name of the entity that created and/or maintains this Handler." - )] - string Owner; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_IndicationHandlerCIMXML.mof b/build/vendor/dmtf_mof/Event/CIM_IndicationHandlerCIMXML.mof deleted file mode 100644 index 7c47e32f..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_IndicationHandlerCIMXML.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Deprecated { "CIM_ListenerDestinationCIMXML" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "CIM_IndicationHandlerCIMXML describes the destination for " - "Indications to be delivered via CIM-XML." )] -class CIM_IndicationHandlerCIMXML : CIM_IndicationHandler { - - [Deprecated { "CIM_ListenerDestinationCIMXML.Destination" }, - Required, Override ( "Destination" ), - Description ( - "The destination URL to which CIM-XML Indication messages " - "are to be delivered. The scheme prefix MUST be " - "consistent with the DMTF CIM-XML Specifications. If a " - "scheme prefix is not specified, the scheme \"http:\" " - "MUST be assumed." )] - string Destination; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_IndicationService.mof b/build/vendor/dmtf_mof/Event/CIM_IndicationService.mof deleted file mode 100644 index 12555a4a..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_IndicationService.mof +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.20.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "An IndicationService is a Service of the CIM Object Manager " - "that is responsible for delivering indications to Indication " - "Handlers." )] -class CIM_IndicationService : CIM_Service { - - [Description ( - "The FilterCreationEnabled property controls whether or " - "not clients can create indication filters. If this value " - "is set to false, only the indication filters that exist " - "can be subscribed to. If this value is true clients may " - "attempt to create filters. Note that implementations may " - "preset this setting and not allow this value to be " - "modified." )] - boolean FilterCreationEnabled = false; - - [Description ( - "Defines the number of retries that the indication " - "service will try to deliver an indication to a " - "particular listener destination. This does not effect " - "the original delivery attempt, thus if set to 0, it will " - "only try to deliver the indication once. Note that " - "implementations may preset this setting and not allow " - "this value to be modified." ), - MinValue ( 0 ), - ModelCorrespondence { - "CIM_IndicationService.DeliveryRetryInterval" }] - uint16 DeliveryRetryAttempts = 3; - - [Description ( - "Defines the minimal time interval in seconds for the " - "indication service to use before delivering an " - "indication to a particular listener destination that " - "previously failed. The implementation may take longer " - "due to QoS or other processing. Note that " - "implementations may preset this setting and not allow " - "this value to be modified." ), - ModelCorrespondence { - "CIM_IndicationService.DeliveryRetryAttempts" }, - PUnit ( "Seconds" )] - uint32 DeliveryRetryInterval = 30; - - [Description ( - "Defines the removal action for subscriptions that have " - "two failed indication deliveries without any successful " - "indication deliveries in between and the time between " - "the failed deliveries exceeded the timeout defined in " - "the SubscriptionRemovalTimeInterval property. \"Remove\" " - "defines the subscription is to be removed.\n" - "\"Disable\" indicates that subscription removal process " - "isnot being enforced. \n" - "\"Ignore\" indicates that the removal action is " - "temporarily not enforced. implementations may preset " - "this setting and not allow this value to be modified." ), - ValueMap { "2", "3", "4", ".." }, - Values { "Remove", "Disable", "Ignore", "DMTF Reserved" }, - ModelCorrespondence { - "CIM_IndicationService.SubscriptionRemovalTimeInterval" }] - uint16 SubscriptionRemovalAction; - - [Description ( - "Minimum time between two failed indication deliveries " - "without any successful indication deliveries in between " - "before the SubscriptionRemovalPolicy goes into effect." ), - ModelCorrespondence { - "CIM_IndicationService.SubscriptionRemovalAction" }, - PUnit ( "Seconds" )] - uint32 SubscriptionRemovalTimeInterval; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_IndicationServiceCapabilities.mof b/build/vendor/dmtf_mof/Event/CIM_IndicationServiceCapabilities.mof deleted file mode 100644 index aa083e96..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_IndicationServiceCapabilities.mof +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.20.0" ), - UMLPackagePath ( "CIM::Core::Capabilities" ), - Description ( - "IndicationServiceCapabilities describes whether properties on " - "the Indication Service can be modified by a client." )] -class CIM_IndicationServiceCapabilities : CIM_Capabilities { - - [Description ( - "Boolean indicating whether the FilterCreationEnabled " - "property can be set by a client application." ), - ModelCorrespondence { - "CIM_IndicationService.FilterCreationEnabled" }] - boolean FilterCreationEnabledIsSettable; - - [Description ( - "Boolean indicating whether the DeliveryRetryAttempts " - "property can be set by a client application." ), - ModelCorrespondence { - "CIM_IndicationService.DeliveryRetryAttempts" }] - boolean DeliveryRetryAttemptsIsSettable; - - [Description ( - "Boolean indicating whether the DeliveryRetryInterval " - "property can be set by a client application." ), - ModelCorrespondence { - "CIM_IndicationService.DeliveryRetryInterval" }] - boolean DeliveryRetryIntervalIsSettable; - - [Description ( - "Boolean indicating whether the SubscriptionRemovalAction " - "property can be set by a client application." ), - ModelCorrespondence { - "CIM_IndicationService.SubscriptionRemovalAction" }] - boolean SubscriptionRemovalActionIsSettable; - - [Description ( - "Boolean indicating whether the " - "SubscriptionRemovalTimeInterval property can be set by a " - "client application." ), - ModelCorrespondence { - "CIM_IndicationService.SubscriptionRemovalTimeInterval" }] - boolean SubscriptionRemovalTimeIntervalIsSettable; - - [Description ( - "MaxListenerDestinations specifies the maximum number of " - "instances of CIM_ListenerDestination allowed by the " - "associated CIM_IndicationService." ), - MinValue ( 1 )] - uint32 MaxListenerDestinations = 1; - - [Description ( - "MaxActiveSubscriptions specifies the maximum total " - "number of instances of CIM_IndicationSubcription and " - "CIM_FilterCollectionSubscription instances supported by " - "the CIM_IndicationService." ), - MinValue ( 1 )] - uint32 MaxActiveSubscriptions = 1; - - [Description ( - "SubscriptionsPersisted indicates whether or not the " - "IndicationService persists indication subscriptions " - "across restarts of the service. If " - "SubscriptionsPersisted has a value of true, the " - "indication service shall persist indication " - "subscriptions across restarts of service. If " - "SubscriptionsPersisted has a value of false, the " - "indication service shall not persist indication " - "subscriptions across restarts of the service. A value of " - "NULL indicates support for subscription persistence is " - "unknown." )] - boolean SubscriptionsPersisted = false; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_IndicationServiceSettingData.mof b/build/vendor/dmtf_mof/Event/CIM_IndicationServiceSettingData.mof deleted file mode 100644 index 25e940e1..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_IndicationServiceSettingData.mof +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.20.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "An IndicationService is a Service of the CIM Object Manager " - "that is responsible for delivering indications. The following " - "are available settings for the Indication Service. The " - "following describes a possible configuration of settings for " - "the associated Indication Service." )] -class CIM_IndicationServiceSettingData : CIM_SettingData { - - [Write, Description ( - "The FilterCreationEnabled property controls whether or " - "not clients can create indication filters. If this value " - "is set to false, only the indication filters that exist " - "can be subscribed to. If this value is true clients may " - "attempt to create filters.\n" - "Note that implementations may preset this setting and " - "not allow this value to be modified." )] - boolean FilterCreationEnabled = false; - - [Write, Description ( - "Defines the number of retries that the indication " - "service will try to deliver an indication to a " - "particular listener destination. This does not effect " - "the original delivery attempt, thus if set to 0, it will " - "only try to deliver the indication once. Note that " - "implementations may preset this setting and not allow " - "this value to be modified." ), - MinValue ( 0 ), - ModelCorrespondence { - "CIM_IndicationServiceSettingData.DeliveryRetryInterval" }] - uint16 DeliveryRetryAttempts = 3; - - [Write, Description ( - "Defines the minimal time interval in seconds for the " - "indication service to use before delivering an " - "indication to a particular listener destination that " - "previously failed. The implementation may take longer " - "due to QoS or other processing. Note that " - "implementations may preset this setting and not allow " - "this value to be modified." ), - ModelCorrespondence { - "CIM_IndicationServiceSettingData.DeliveryRetryAttempts" }, - PUnit ( "Seconds" )] - uint32 DeliveryRetryInterval = 30; - - [Write, Description ( - "Defines the removal action for subscriptions that have " - "two failed indication deliveries without any successful " - "indication deliveries in between and the time between " - "the failed deliveries exceeded the timeout defined in " - "the SubscriptionRemovalTimeInterval property. \"Remove\" " - "defines the subscription is to be removed. \n" - "\"Disable\" indicates that subscription removal process " - "isnot being enforced.\n" - "\"Ignore\" indicates that the removal action is " - "temporarily not enforced.\n" - "Implementations may preset this setting and not allow " - "this value to be modified." ), - ValueMap { "2", "3", "4", ".." }, - Values { "Remove", "Disable", "Ignore", "DMTF Reserved" }, - ModelCorrespondence { - "CIM_IndicationServiceSettingData.SubscriptionRemovalTimeInterval" }] - uint16 SubscriptionRemovalAction; - - [Write, Description ( - "Minimum time between two failed indication deliveries " - "without any successful indication deliveries in between " - "before the SubscriptionRemovalPolicy goes into effect." ), - ModelCorrespondence { - "CIM_IndicationServiceSettingData.SubscriptionRemovalAction" }, - PUnit ( "Seconds" )] - uint32 SubscriptionRemovalTimeInterval; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_IndicationSubscription.mof b/build/vendor/dmtf_mof/Event/CIM_IndicationSubscription.mof deleted file mode 100644 index b75b7c01..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_IndicationSubscription.mof +++ /dev/null @@ -1,29 +0,0 @@ -//Copyright (c) 2009 DMTF. All Rights Reserved. - [Association, Version ( "2.16.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "CIM_IndicationSubscription describes a flow of Indications. " - "The flow is specified by the referenced Filter, and directed " - "to the referenced destination or process in the Handler. " - "Property values of the referenced CIM_IndicationFilter " - "instance and CIM_ListenerDestination instance MAY " - "significantly effect the definition of the subscription. E.g., " - "a subscription associated with a \"Transient\" destination MAY " - "be deleted when the destination terminates or is no longer " - "available." )] -class CIM_IndicationSubscription : CIM_AbstractIndicationSubscription { - - [Key, Override ( "Filter" ), - Description ( - "The Filter that defines the criteria and data of the " - "possible Indications of this subscription." )] - CIM_IndicationFilter REF Filter; - - [Key, Override ( "Handler" ), - Description ( - "The Handler addressing delivery of the possible " - "Indications of this subscription." )] - CIM_ListenerDestination REF Handler; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_InstCreation.mof b/build/vendor/dmtf_mof/Event/CIM_InstCreation.mof deleted file mode 100644 index 8103a398..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_InstCreation.mof +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Indication, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "CIM_InstCreation notifies when a new instance is created." )] -class CIM_InstCreation : CIM_InstIndication { - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_InstDeletion.mof b/build/vendor/dmtf_mof/Event/CIM_InstDeletion.mof deleted file mode 100644 index 8fc09bc3..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_InstDeletion.mof +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Indication, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "CIM_InstDeletion notifies when an existing instance is deleted." )] -class CIM_InstDeletion : CIM_InstIndication { - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_InstIndication.mof b/build/vendor/dmtf_mof/Event/CIM_InstIndication.mof deleted file mode 100644 index d62400ee..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_InstIndication.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Indication, Abstract, Version ( "2.9.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "CIM_InstIndication is an abstract superclass describing " - "changes to instances. Subclasses represent specific types of " - "change notifications, such as instance creation, deletion and " - "modification." )] -class CIM_InstIndication : CIM_Indication { - - [Required, Description ( - "A copy of the instance that changed to generate the " - "Indication. SourceInstance contains the current values " - "of the properties selected by the Indication Filter\'s " - "Query. In the case of CIM_InstDeletion, the property " - "values are copied before the instance is deleted." ), - EmbeddedObject] - string SourceInstance; - - [Description ( - "The Model Path of the SourceInstance. The following " - "format MUST be used to encode the Model Path: \n" - ":.=\"\", \n" - "=\"\", ..." ), - ModelCorrespondence { "CIM_InstIndication.SourceInstance" }] - string SourceInstanceModelPath; - - [Description ( - "The host name or IP address of the SourceInstance." ), - ModelCorrespondence { "CIM_InstIndication.SourceInstance" }] - string SourceInstanceHost; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_InstMethodCall.mof b/build/vendor/dmtf_mof/Event/CIM_InstMethodCall.mof deleted file mode 100644 index b4d52a8d..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_InstMethodCall.mof +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Indication, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "CIM_InstMethodCall notifies when an instance\'s method is invoked." - )] -class CIM_InstMethodCall : CIM_InstIndication { - - [Required, Description ( "The name of the method invoked." )] - string MethodName; - - [Description ( - "The parameters of the method, formatted as an " - "EmbeddedObject (with a predefined class name of " - "\"__MethodParameters\"." ), - EmbeddedObject] - string MethodParameters; - - [Description ( - "ReturnValue\'s data is dependent on the PreCall " - "property. When PreCall is TRUE, this property is NULL " - "describing that there is no method return value (since " - "the method has not yet executed). When PreCall is FALSE, " - "ReturnValue contains a string representation of the " - "method\'s return value." ), - ModelCorrespondence { "CIM_InstMethodCall.PreCall" }] - string ReturnValue; - - [Required, Description ( - "Boolean indicating whether the Indication is sent before " - "the method begins executing (TRUE) or when the method " - "completes (FALSE). When TRUE, the inherited property " - "SourceInstance contains the value of the instance (the " - "properties defined by the Filter\'s Query clause), " - "before execution of the method. When PreCall is FALSE, " - "SourceInstance embeds the instance as it appears after " - "the completion of the method." )] - boolean PreCall; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_InstModification.mof b/build/vendor/dmtf_mof/Event/CIM_InstModification.mof deleted file mode 100644 index fef6813b..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_InstModification.mof +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Indication, Version ( "2.10.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "CIM_InstModification notifies when an instance is modified." )] -class CIM_InstModification : CIM_InstIndication { - - [Description ( - "A copy of the \'previous\' instance whose change " - "generated the Indication. PreviousInstance contains " - "\'older\' values of an instance\'s properties (as " - "compared to SourceInstance), selected by the " - "IndicationFilter\'s Query." ), - EmbeddedObject] - string PreviousInstance; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_InstRead.mof b/build/vendor/dmtf_mof/Event/CIM_InstRead.mof deleted file mode 100644 index 50223e7c..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_InstRead.mof +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Indication, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "CIM_InstRead notifies when an instance is read but not modified." - )] -class CIM_InstRead : CIM_InstIndication { - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_ListenerDestination.mof b/build/vendor/dmtf_mof/Event/CIM_ListenerDestination.mof deleted file mode 100644 index 0a63854a..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_ListenerDestination.mof +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Abstract, Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "The description of a CIM Listener destination. A CIM_Listener " - "is an entity capable of receiving CIM Export Messages (e.g., " - "Indications or responses to an asynchronous CIM Operation)." )] -class CIM_ListenerDestination : CIM_ManagedElement { - - [Key, Description ( - "A System\'s CreationClassName. A CIM Listener " - "destination is defined in context of a CIM_System (e.g., " - "the sending system." ), - MaxLen ( 256 )] - string SystemCreationClassName; - - [Key, Description ( - "A System\'s Name. A CIM Listener destination is defined " - "in context of a CIM_System (e.g., the sending system." ), - MaxLen ( 256 )] - string SystemName; - - [Key, Description ( - "Indicates the name of the class or the subclass used in " - "the creation of an instance. When used with the other " - "key properties of this class, it allows all instances of " - "this class and its subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Description ( - "Indicates the name of the CIM Listener destination." ), - MaxLen ( 256 )] - string Name; - - [Description ( - "Describes the Persistence Type of the destination " - "defined by this instance. If the value of " - "PersistenceType is not specified, the value of " - "PersistenceType MUST be treated as 2 (\"Permanent\"). A " - "value of 2 (\"Permanent\") declares that the destination " - "is always expected to be available (e.g., system log " - "file). Inability to access this destination MUST be " - "treated as an error condition. A value of 3 " - "(\"Transient\") indicates that the destination is " - "short-lived. Inability to access the destination MAY be " - "treated as a normal termination condition. Subscriptions " - "with \"Transient\" destinations MAY be deleted when the " - "destination terminates or is no longer available." ), - ValueMap { "1", "2", "3" }, - Values { "Other", "Permanent", "Transient" }, - ModelCorrespondence { - "CIM_ListenerDestination.OtherPersistenceType" }] - uint16 PersistenceType; - - [Description ( - "A string describing (\"Other\") values for " - "PersistenceType. This value MUST be set to a non NULL " - "value when the PersistenceType is 1 (\"Other\"). For all " - "other values of PersistenceType, the value of " - "OtherPersistenceType MUST be NULL." ), - ModelCorrespondence { - "CIM_ListenerDestination.PersistenceType" }] - string OtherPersistenceType; - - [Description ( - "The destination IETF URI to which Export Messages are to " - "be delivered. The scheme in the URI must be supported by " - "theprotocol selected in the Protocol property." )] - string Destination; - - [Description ( - "A free-form string providing a description of the " - "supported protocols when 1, \"Other\", is specified for " - "the Protocol." ), - ModelCorrespondence { "CIM_ListenerDestination.Protocol" }] - string OtherProtocol; - - [Description ( - "Protocol describes an encoding and protocol which will " - "be used to deliver the indication. If Other is used, the " - "value for OtherProtocol must not be null.\n" - "If a protocol is not specified, 2 \"CIM-XML\" must be " - "assumed." ), - ValueMap { "1", "2", "3", "4", "5", ".." }, - Values { "Other", "CIM-XML", "SM CLP", "WS-Management", - "WSDM", "DMTF Reserved" }, - ModelCorrespondence { "CIM_ListenerDestination.OtherProtocol" }] - uint16 Protocol = 2; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_ListenerDestinationCIMXML.mof b/build/vendor/dmtf_mof/Event/CIM_ListenerDestinationCIMXML.mof deleted file mode 100644 index 89f102de..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_ListenerDestinationCIMXML.mof +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "CIM_ListenerDestinationCIMXML describes the destination for " - "CIM Export Messages to be delivered via CIM-XML." )] -class CIM_ListenerDestinationCIMXML : CIM_ListenerDestination { - - [Required, Override ( "Destination" ), - Description ( - "The destination URL to which CIM-XML Export Messages are " - "to be delivered.The scheme prefix MUST be consistent " - "with the DMTF CIM-XML specifications.If a scheme prefix " - "is not specified, the scheme \"http:\" MUST be assumed." )] - string Destination; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_ListenerDestinationWSManagement.mof b/build/vendor/dmtf_mof/Event/CIM_ListenerDestinationWSManagement.mof deleted file mode 100644 index 154ee7a7..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_ListenerDestinationWSManagement.mof +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "CIM_ListenerDestinationWSManagement describes the destination " - "for CIM indications to be delivered via WS-Management." )] -class CIM_ListenerDestinationWSManagement : CIM_ListenerDestination { - - [Required, Override ( "Destination" ), - Description ( - "The destination URL defined in the WS-Eventing Subscribe " - "message. This must match the wsa:Address element in the " - "wse:NotifyTo EPR. The value may be the WS-Addressing " - "anonymous URI if the subscription uses or employs a Pull " - "mode." )] - string Destination; - - [Description ( - "Separate To address for notice of abnormal subscription " - "termination." )] - string DestinationEndTo; - - [Description ( - "If the events contain localized content, the service " - "should accept a subscription with this Locale block " - "acting as a hint. The language of the event message is " - "encoded in an xml:lang attribute using RFC 3066 language " - "codes. The service should attempt to localize any " - "descriptive content to the specified language when " - "delivering such events." )] - string Locale; - - [Description ( - "This block acts as a hint to indicate how the delivered " - "events should be encoded. The two standard tokens " - "defined for this purpose are \"UTF-8\" or \"UTF-16\", " - "although other encoding formats may be specified if " - "necessary." )] - string ContentEncoding; - - [Description ( - "Method by which the service is to deliver events to the " - "client. Values are as follows. Push (2): the event is " - "sent to the destination address; depending on the " - "protocol, delivery may not be guaranteed. PushWithAck " - "(3): the service sends the event and waits for a " - "specific acknowledgment message from the subscriber. " - "Events (4): the service collects events into batches and " - "sends the batches to the subscriber. Pull (5): the " - "service collects the events into batches and the " - "subscriber pulls each batch from the service using " - "wxf:Pull." ), - ValueMap { "2", "3", "4", "5", "..", "32787.." }, - Values { "Push", "PushWithAck", "Events", "Pull", - "DMTF Reserved", "Vendor Reserved" }] - uint16 DeliveryMode; - - [Description ( - "Specifies how often heartbeat events are added to the " - "event stream at the specified interval." ), - Units ( "Seconds" )] - uint64 Heartbeat; - - [Description ( - "A property element that instructs the service to send a " - "bookmark with each event. Bookmarks apply to all " - "delivery modes. The bookmark is a token which represents " - "an abstract pointer in the event stream, but whether it " - "points to the last delivered event or the last event " - "plus one (the upcoming event) makes no difference since " - "the token is supplied to the same implementation during " - "a subsequent wse:Subscribe operation. The service may " - "thus attach any service-specific meaning and structure " - "to the bookmark with no change to the client." )] - boolean SendBookmark; - - [Description ( - "This element may contain a duration that indicates the " - "maximum amount of time the service should allow to " - "elapse while batching EVENT bodies. That is, this time " - "may not be exceeded between the encoding of the first " - "event in the batch and the dispatching of the batch for " - "delivery." ), - Units ( "Seconds" )] - uint64 MaxTime; - - [Description ( - "A URI identifying the WS-Management security profile to " - "be used by the service (acting as publisher) when " - "authenticating to the event sink (consumer) at event " - "delivery time." )] - string DeliveryAuth; - - [Description ( - "Specifies the treatment of Indication subclasses, " - "whether subclasses are to be included and with what set " - "of properties. Valid values are: None, " - "IncludeSubclassProperties, and " - "ExcludeSubclassProperties. Using None, only instances of " - "the parent class are included in the output (event " - "stream). For other modes, subclass instances are " - "included with the sets of properties stated." ), - ValueMap { "1", "2", "3", ".." }, - Values { "None", "IncludeSubclassProperties", - "ExcludeSubclassProperties", "DMTF Reserved" }] - uint16 PolyMorphismMode; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_ProcessIndication.mof b/build/vendor/dmtf_mof/Event/CIM_ProcessIndication.mof deleted file mode 100644 index 8acd3a12..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_ProcessIndication.mof +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Indication, Abstract, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "An abstract superclass for specialized Indication classes, " - "addressing specific changes and alerts published by providers " - "and instrumentation. Subclasses include AlertIndication (with " - "properties such as PerceivedSeverity and ProbableCause), and " - "SNMPTrapIndication (which recasts Traps as CIM indications)." )] -class CIM_ProcessIndication : CIM_Indication { - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_SNMPTrapIndication.mof b/build/vendor/dmtf_mof/Event/CIM_SNMPTrapIndication.mof deleted file mode 100644 index 29482ab7..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_SNMPTrapIndication.mof +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Indication, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "A concrete class for mapping an SNMP Trap to CIM based on the " - "IETF RFC 1157. The usefulness of this class is to describe " - "common trap semantics. But, a complete understanding of any " - "trap data received relies on the Indicaton recipient having " - "access to the sender\'s MIB. Understanding can be improved by " - "mapping the SNMP domain to CIM, and using CIM LifeCycle and " - "standard subclasses of CIM_ProcessIndication." )] -class CIM_SNMPTrapIndication : CIM_ProcessIndication { - - [Description ( "Type of object generating the trap." ), - MappingStrings { "PDU.IETF|RFC1157-TRAP-PDU.enterprise" }] - string Enterprise; - - [Description ( "Address of the object generating the trap." ), - MappingStrings { "PDU.IETF|RFC1157-TRAP-PDU.agent-addr" }] - string AgentAddress; - - [Description ( - "An enumerated value that describes the generic trap " - "type: \n" - "- The coldStart(0) trap signifies that the sending " - "protocol entity is reinitializing itself such that the " - "agent\'s configuration or the protocol entity " - "implementation may be altered. \n" - "- The warmStart(1) trap signifies that the sending " - "protocol entity is reinitializing itself such that " - "neither the agent configuration nor the protocol entity " - "implementation is altered. \n" - "- The linkDown(2) trap signifies that the sending " - "protocol recognizes a failure in one of the " - "communication links represented in the agent\'s " - "configuration. The Trap-PDU of type linkDown contains as " - "the first element of its variable-bindings the name and " - "value of the ifIndex instance for the affected " - "interface. \n" - "- The linkUp(3) trap signifies that the sending protocol " - "entity recognizes that one of the communication links " - "represented in the agent\'s configuration has come up. " - "The Trap-PDU of type linkUp contains as the first " - "element of its variable-bindings, the name and value of " - "the ifIndex instance for the affected interface. \n" - "- An authenticationFailure(4) trap signifies that the " - "sending protocol entity is the adressee of a protocol " - "message that was not properly authenticated. While " - "implementations of SNMP must be capable of generating " - "this trap, they must also be capable of suppressing the " - "emission of such traps via an implementation- specific " - "mechanism. \n" - "- An egpNeighborLoss(5) trap signifies that an EGP " - "neighbor for whom the sending protocol entity was an EGP " - "peer has been marked as down and the peer relationship " - "no longer pertains. The Trap-PDU of type egpNeighborLoss " - "contains as the first element of its variable-bindings, " - "the name and value of the egpNeighAddr instance for the " - "affected neighbor. \n" - "- An enterpriseSpecific(6) trap signifies that the " - "sending protocol entity recognizes that some " - "enterprise-specific event has occurred. The " - "specific-trap field identifies the particular trap which " - "occurred." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6" }, - Values { "Cold Start", "Warm Start", "Link Down", "Link Up", - "Authentication Failure", "EGP Neighbor Loss", - "Enterprise Specific" }, - MappingStrings { "PDU.IETF|RFC1157-TRAP-PDU.generic-trap" }] - uint16 GenericTrap; - - [Description ( "Specific trap code." ), - MappingStrings { "PDU.IETF|RFC1157-TRAP-PDU.specific-trap" }] - uint32 SpecificTrap; - - [Description ( - "Time elapsed between the last (re)intialization of the " - "managed entity and the generation of the trap." ), - MappingStrings { "PDU.IETF|RFC1157-TRAP-PDU.time-stamp" }] - datetime TimeStamp; - - [Description ( - "Object naming information (an OID) from the \'variable " - "binding\' portion of the Trap. This array is correlated " - "with the VarBindSyntaxes and VarBindValues arrays. Each " - "entry is related to the entries in the other arrays, " - "that are located at the same index. In this way, the " - "variable binding\'s name/syntax/value tuple can be " - "constructed." ), - ArrayType ( "Indexed" ), - MappingStrings { "PDU.IETF|RFC1157-TRAP-PDU.variable-bindings" }, - ModelCorrespondence { - "CIM_SNMPTrapIndication.VarBindSyntaxes", - "CIM_SNMPTrapIndication.VarBindValues" }] - string VarBindNames[]; - - [Description ( - "Object syntax information (defined as an enumerated " - "value) from the \'variable binding\' portion of the " - "Trap. This array is correlated with the VarBindNames and " - "VarBindValues arrays. Each entry is related to the " - "entries in the other arrays, that are located at the " - "same index. In this way, the variable binding\'s " - "name/syntax/value tuple can be constructed." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Integer", "OctetString", "ObjectIdentifier", - "NetworkAddress", "Counter", "Gauge", "TimeTicks", "Opaque" }, - ArrayType ( "Indexed" ), - MappingStrings { "PDU.IETF|RFC1157-TRAP-PDU.variable-bindings" }, - ModelCorrespondence { "CIM_SNMPTrapIndication.VarBindNames", - "CIM_SNMPTrapIndication.VarBindValues" }] - uint16 VarBindSyntaxes[]; - - [Description ( - "An OctetString representing object value information " - "from the \'variable binding\' portion of the Trap. This " - "array is correlated with the VarBindNames and " - "VarBindSyntaxes arrays. Each entry is related to the " - "entries in the other arrays, that are located at the " - "same index. In this way, the variable binding\'s " - "name/syntax/value tuple can be constructed." ), - OctetString, ArrayType ( "Indexed" ), - MappingStrings { "PDU.IETF|RFC1157-TRAP-PDU.variable-bindings" }, - ModelCorrespondence { "CIM_SNMPTrapIndication.VarBindNames", - "CIM_SNMPTrapIndication.VarBindSyntaxes" }] - string VarBindValues[]; - - -}; diff --git a/build/vendor/dmtf_mof/Event/CIM_ThresholdIndication.mof b/build/vendor/dmtf_mof/Event/CIM_ThresholdIndication.mof deleted file mode 100644 index d12b30f5..00000000 --- a/build/vendor/dmtf_mof/Event/CIM_ThresholdIndication.mof +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Indication, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Event" ), - Description ( - "A subclass of CIM_AlertIndications carrying additional " - "threshold information related to the notification. This " - "subclass is used when one of the ProbableCauses is set to 53, " - "\"Threshold Crossed\"." )] -class CIM_ThresholdIndication : CIM_AlertIndication { - - [Description ( - "A string describing the threshold or naming the property " - "that represents the threshold, if modeled in the CIM " - "hierarchy. In the latter case, the value should be " - "written as _ .." ), - MappingStrings { - "Recommendation.ITU|X733.Threshold information" }] - string ThresholdIdentifier; - - [Description ( - "A string holding the current value of the threshold. " - "This is modeled as a string for universal mapping, " - "similar to the CIM_Sensor properties in the Device " - "Model." ), - MappingStrings { - "Recommendation.ITU|X733.Threshold information" }] - string ThresholdValue; - - [Description ( - "A string holding the current reading value that exceeds " - "the threshold. This is modeled as a string for universal " - "mapping, similar to the CIM_Sensor properties in the " - "Device Model." ), - MappingStrings { - "Recommendation.ITU|X733.Threshold information" }] - string ObservedValue; - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_ContainedProposal.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_ContainedProposal.mof deleted file mode 100644 index f163266c..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_ContainedProposal.mof +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Aggregation, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "ContainedProposal holds an ordered list of SAProposals that " - "make up an SANegotiationAction. If the referenced " - "NegotiationAction is an IKEAction, then the SAProposal objects " - "MUST be IKEProposals. If the referenced NegotiationAction " - "object is an IPsecTransport/TunnelAction, then the referenced " - "SAProposal objects MUST be IPsecProposals." ), - MappingStrings { "IPSP Policy Model.IETF|ContainedProposal" }] -class CIM_ContainedProposal : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Description ( - "The SANegotiationAction containing a list of SAProposals." ), - MappingStrings { - "IPSP Policy Model.IETF|ContainedProposal.GroupComponent" }] - CIM_SANegotiationAction REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The SAProposal in this negotiation action." ), - MappingStrings { - "IPSP Policy Model.IETF|ContainedProposal.PartComponent" }] - CIM_SAProposal REF PartComponent; - - [Description ( - "SequenceNumber indicates the ordering to be used when " - "chosing from among the proposals. Lower-valued proposals " - "are preferred over proposals with higher values. For " - "ContainedProposals that reference the same " - "SANegotiationAction, SequenceNumber values MUST be " - "unique." ), - MappingStrings { - "IPSP Policy Model.IETF|ContainedProposal.SequenceNumber" }] - uint16 SequenceNumber; - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_ContainedTransform.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_ContainedTransform.mof deleted file mode 100644 index b3b6bd5d..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_ContainedTransform.mof +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Aggregation, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "ContainedTransform associates a proposal with a list of " - "transforms. If multiple transforms of a given type are " - "included in a proposal, these transforms are interpreted as " - "alternatives -- i.e., logically ORed with each other. The " - "order of preference is dictated by the SequenceNumber " - "property. Sets of transforms of different types are logically " - "ANDed. For example, a proposal based on two AH transforms and " - "three ESP transforms means one of the AH AND one of the ESP " - "transforms MUST be chosen. Note that at least 1 transform MUST " - "be aggregated into the proposal." ), - MappingStrings { "IPSP Policy Model.IETF|ContainedTransform" }] -class CIM_ContainedTransform : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Description ( "The Proposal containing the transforms." ), - MappingStrings { - "IPSP Policy Model.IETF|ContainedTransform.GroupComponent" }] - CIM_IPsecProposal REF GroupComponent; - - [Override ( "PartComponent" ), - Min ( 1 ), - Description ( "Transforms in the proposal." ), - MappingStrings { - "IPSP Policy Model.IETF|ContainedTransform.PartComponent" }] - CIM_SATransform REF PartComponent; - - [Description ( - "SequenceNumber indicates the order of preference for " - "SATransforms of the same type. Lower-valued transforms " - "are preferred over transforms of the same type with " - "higher values. For ContainedTransforms (of the same " - "type) that reference the same IPsecProposal, " - "SequenceNumber values MUST be unique." ), - MappingStrings { - "IPSP Policy Model.IETF|ContainedTransform.SequenceNumber" }] - uint16 SequenceNumber; - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_IKEAction.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_IKEAction.mof deleted file mode 100644 index d462a83b..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_IKEAction.mof +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "IKEAction specifies the parameters to use for an IPsec IKE " - "phase 1 negotiation." ), - MappingStrings { "IPSP Policy Model.IETF|IKEAction" }] -class CIM_IKEAction : CIM_SANegotiationAction { - - [Description ( - "The ExchangeMode designates the mode IKE should use for " - "its key negotiations." ), - ValueMap { "2", "3", "4" }, - Values { "Base", "Main", "Aggressive" }, - MappingStrings { - "IPSP Policy Model.IETF|IKEAction.ExchangeMode" }] - uint16 ExchangeMode; - - [Description ( - "UseIKEIdentityType specifies what network identity type " - "should be used when negotiating with the peer. It is " - "used in conjunction with the available IPNetworkIdentity " - "instances, that are associated with an " - "IPProtocolEndpoint." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "..", "0x8000.." }, - Values { "Other", "IPV4 Address", "FQDN", "User FQDN", - "IPV4 Subnet Address", "IPV6 Address", - "IPV6 Subnet Address", "IPV4 Address Range", - "IPV6 Address Range", "DER ASN1 DN", "DER ASN1 GN", - "KEY ID", "DMTF Reserved", "Vendor Reserved" }, - MappingStrings { - "IPSP Policy Model.IETF|IKEAction.UseIKEIdentityType", - "RFC2407.IETF|Section 4.6.2.1" }, - ModelCorrespondence { "CIM_IPNetworkIdentity.IdentityType" }] - uint16 UseIKEIdentityType; - - [Description ( - "VendorID specifies the value to be used in the Vendor ID " - "payload. An empty string (the default) means that the " - "Vendor ID payload will not be generated or accepted. A " - "non-NULL value means that a Vendor ID payload will be " - "generated (when acting as an initiator) or is expected " - "(when acting as a responder)." ), - MappingStrings { "IPSP Policy Model.IETF|IKEAction.VendorID" }] - string VendorID = ""; - - [Description ( - "When IKEAction.ExchangeMode is set to \"Aggressive\" " - "(4), this property specifies the key exchange groupID to " - "use in the first packets of the phase 1 negotiation. " - "This property is ignored unless the ExchangeMode is " - "\'aggressive\'. If the GroupID number is from the " - "vendor- specific range (32768-65535), the VendorID " - "qualifies the group number. Well-known group identifiers " - "from RFC2412, Appendix E, are: Group 1=\'768 bit prime\', " - "Group 2=\'1024 bit prime\', Group 3=\'Elliptic Curve " - "Group with 155 bit field element\', Group 4=\'Large " - "Elliptic Curve Group with 185 bit field element\', and " - "Group 5=\'1536 bit prime\'." ), - ValueMap { "0", "1", "2", "3", "4", "5", "..", "0x8000.." }, - Values { "No Group/Non-Diffie-Hellman Exchange", - "DH-768 bit prime", "DH-1024 bit prime", - "EC2N-155 bit field element", - "EC2N-185 bit field element", "DH-1536 bit prime", - "Standard Group - Reserved", "Vendor Reserved" }, - MappingStrings { - "IPSP Policy Model.IETF|IKEAction.AggressiveModeGroupID", - "RFC2412.IETF|Appendix E" }, - ModelCorrespondence { "CIM_IKEAction.VendorID" }] - uint16 AggressiveModeGroupID; - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_IKEProposal.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_IKEProposal.mof deleted file mode 100644 index 6c099b11..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_IKEProposal.mof +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "IKEProposal contains the parameters necessary to drive the " - "phase 1 IKE negotiation." ), - MappingStrings { "IPSP Policy Model.IETF|IKEProposal" }] -class CIM_IKEProposal : CIM_SAProposal { - - [Description ( - "MaxLifetimeSeconds specifies the maximum time the IKE " - "message sender proposes for an SA to be considered valid " - "after it has been created. A value of zero indicates " - "that the default of 8 hours be used. A non-zero value " - "indicates the maximum seconds lifetime." ), - Units ( "Seconds" ), - MappingStrings { - "IPSP Policy Model.IETF|IKEProposal.MaxLifetimeSeconds" }, - ModelCorrespondence { - "CIM_SecurityAssociationEndpoint.LifetimeSeconds" }, - PUnit ( "second" )] - uint64 MaxLifetimeSeconds; - - [Description ( - "MaxLifetimeKilobytes specifies the maximum kilobyte " - "lifetime the IKE message sender proposes for an SA to be " - "considered valid after it has been created. A value of " - "zero (the default) indicates that there should be no " - "maximum kilobyte lifetime. A non-zero value specifies " - "the desired kilobyte lifetime." ), - Units ( "KiloBytes" ), - MappingStrings { - "IPSP Policy Model.IETF|IKEProposal.MaxLifetimeKilobytes" }, - ModelCorrespondence { - "CIM_SecurityAssociationEndpoint.LifetimeKilobytes" }, - PUnit ( "byte * 10^3" )] - uint64 MaxLifetimeKilobytes; - - [Description ( - "CipherAlgorithm is an enumeration that specifies the " - "proposed encryption algorithm. The list of algorithms " - "was generated from Appendix A of RFC2409. Note that the " - "enumeration is different than the RFC list and aligns " - "with the values in IKESAEndpoint.CipherAlgorithm." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8..65000", - "65001..65535" }, - Values { "Other", "DES", "IDEA", "Blowfish", "RC5", "3DES", - "CAST", "DMTF/IANA Reserved", "Vendor Reserved" }, - MappingStrings { - "IPSP Policy Model.IETF|IKEProposal.CipherAlgorithm", - "RFC2409.IETF|Appendix A" }, - ModelCorrespondence { "CIM_IKESAEndpoint.CipherAlgorithm", - "CIM_IKEProposal.OtherCipherAlgorithm" }] - uint16 CipherAlgorithm; - - [Description ( - "Description of the encryption algorithm when the value 1 " - "(\"Other\") is specified for the property, " - "CipherAlgorithm." ), - ModelCorrespondence { - "CIM_IKESAEndpoint.OtherCipherAlgorithm", - "CIM_IKEProposal.CipherAlgorithm" }] - string OtherCipherAlgorithm; - - [Description ( - "HashAlgorithm is an enumeration that specifies the " - "proposed hash function. The list of algorithms was " - "generated from Appendix A of RFC2409. Note that the " - "enumeration is different than the RFC list and aligns " - "with the values in IKESAEndpoint.HashAlgorithm." ), - ValueMap { "1", "2", "3", "4", "5..65000", "65001..65535" }, - Values { "Other", "MD5", "SHA-1", "Tiger", - "DMTF/IANA Reserved", "Vendor Reserved" }, - MappingStrings { - "IPSP Policy Model.IETF|IKEProposal.HashAlgorithm", - "RFC2409.IETF|Appendix A" }, - ModelCorrespondence { "CIM_IKESAEndpoint.HashAlgorithm", - "CIM_IKEProposal.OtherHashAlgorithm" }] - uint16 HashAlgorithm; - - [Description ( - "Description of the hash function when the value 1 " - "(\"Other\") is specified for the property, " - "HashAlgorithm." ), - ModelCorrespondence { "CIM_IKESAEndpoint.OtherHashAlgorithm", - "CIM_IKEProposal.HashAlgorithm" }] - string OtherHashAlgorithm; - - [Description ( - "AuthenticationMethod is an enumeration that specifies " - "the proposed authentication. The list of methods was " - "generated from Appendix A of RFC2409. Note that the " - "enumeration is different than the RFC list and aligns " - "with the values in IKESAEndpoint.AuthenticationMethod. " - "There is one change to the list - the value 65000 has " - "special meaning. It is a special value that indicates " - "that this particular proposal should be repeated once " - "for each authentication method corresponding to " - "credentials installed on the machine. For example, if " - "the system has a pre-shared key and an public-key " - "certificate, a proposal list would be constructed which " - "includes a proposal that specifies a pre-shared key and " - "a proposal for any of the public-key certificates." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7..64999", "65000", - "65001..65535" }, - Values { "Other", "Pre-shared Key", "DSS Signatures", - "RSA Signatures", "Encryption with RSA", - "Revised Encryption with RSA", "DMTF/IANA Reserved", - "Any", "Vendor Reserved" }, - MappingStrings { - "IPSP Policy Model.IETF|IKEProposal.AuthenticationMethod", - "RFC2409.IETF|Appendix A" }, - ModelCorrespondence { - "CIM_IKESAEndpoint.AuthenticationMethod", - "CIM_IKEProposal.OtherAuthenticationMethod" }] - uint16 AuthenticationMethod; - - [Description ( - "Description of the method when the value 1 (\"Other\") " - "is specified for the property, AuthenticationMethod." ), - ModelCorrespondence { - "CIM_IKESAEndpoint.OtherAuthenticationMethod", - "CIM_IKEProposal.AuthenticationMethod" }] - string OtherAuthenticationMethod; - - [Description ( - "The property GroupId specifies the proposed phase 1 " - "security association key exchange group. This property " - "is ignored for all aggressive mode exchanges " - "(IKEAction.ExchangeMode = 4). If the GroupID number is " - "from the vendor-specific range (32768-65535), the " - "property VendorID qualifies the group number. Well-known " - "group identifiers from RFC2412, Appendix E, are: Group " - "1=\'768 bit prime\', Group 2=\'1024 bit prime\', Group 3 " - "=\'Elliptic Curve Group with 155 bit field element\', " - "Group 4= \'Large Elliptic Curve Group with 185 bit field " - "element\', and Group 5=\'1536 bit prime\'." ), - ValueMap { "0", "1", "2", "3", "4", "5", "..", "0x8000.." }, - Values { "No Group/Non-Diffie-Hellman Exchange", - "DH-768 bit prime", "DH-1024 bit prime", - "EC2N-155 bit field element", - "EC2N-185 bit field element", "DH-1536 bit prime", - "Standard Group - Reserved", "Vendor Reserved" }, - MappingStrings { - "IPSP Policy Model.IETF|IKEProposal.GroupID", - "RFC2412.IETF|Appendix E" }, - ModelCorrespondence { "CIM_IKESAEndpoint.GroupID", - "CIM_IKEProposal.VendorID" }] - uint16 GroupId; - - [Description ( - "VendorID identifies the vendor when the value of GroupID " - "is in the vendor-specific range, 32768 to 65535." ), - ModelCorrespondence { "CIM_IKESAEndpoint.VendorID", - "CIM_IKEProposal.GroupId" }] - string VendorID; - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_IKERule.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_IKERule.mof deleted file mode 100644 index 73c65f7d..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_IKERule.mof +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "IKERule contains the Conditions and Actions for IKE phase 1 " - "negotiations or to specify static actions such as Discard." ), - MappingStrings { "IPSP Policy Model.IETF|IKERule" }] -class CIM_IKERule : CIM_SARule { - - [Description ( - "An IP endpoint may have multiple identities for use in " - "different situations. The IdentityContext property " - "specifies the specific context/identities which pertain " - "to this Rule. The property\'s function is similar to " - "that of PolicyRoles. A context may be a VPN name or " - "other identifier that selects the appropriate identity. \n" - "\n" - "IdentityContext is an array of strings. The multiple " - "values in the array are logically ORed together in " - "matching an IPNetworkIdentity\'s IdentityContext. Each " - "value in the array may be a composition of multiple " - "context names. When an array value is a composition, the " - "individual values are logically ANDed together for " - "evaluation purposes. The syntax is: \n" - "[&&]* \n" - "where the individual context names appear in " - "alphabetical order (according to the collating sequence " - "for UCS-2). So, for example, the values \'CompanyXVPN\', " - "\'CompanyYVPN&&TopSecret\', \'CompanyZVPN&&Confidential\' " - "are possible contexts for a Rule. They are matched " - "against an IPNetworkIdentity\'s IdentityContext. Any of " - "the values may indicate a match and select an Identity, " - "since the values in the array are logically ORed." ), - MappingStrings { - "IPSP Policy Model.IETF|IKERule.IdentityContexts" }, - ModelCorrespondence { "CIM_IdentityContext" }] - string IdentityContexts[]; - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecAction.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecAction.mof deleted file mode 100644 index ff9cad2f..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecAction.mof +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "IPsecAction specifies the parameters to use for an IPsec phase " - "2 negotiation." ), - MappingStrings { "IPSP Policy Model.IETF|IPsecAction" }] -class CIM_IPsecAction : CIM_SANegotiationAction { - - [Description ( - "UsePFS indicates whether perfect forward secrecy is " - "required when refreshing keys." ), - MappingStrings { "IPSP Policy Model.IETF|IPsecAction.UsePFS" }, - ModelCorrespondence { "CIM_IPsecSAEndpoint.PFSInUse" }] - boolean UsePFS; - - [Description ( - "UsePhase1Group indicates that the phase 2 GroupId should " - "be the same as that used in the phase 1 key exchange. If " - "UsePFS is False, then this property is ignored. Note " - "that a value of False indicates that the property " - "GroupId will contain the key exchange group to use for " - "phase 2." ), - MappingStrings { - "IPSP Policy Model.IETF|IPsecAction.UseIKEGroup" }] - boolean UsePhase1Group; - - [Description ( - "GroupId specifies the PFS group ID to use. This value is " - "only used if PFS is True and UsePhase1Group is False. If " - "the GroupID number is from the vendor-specific range " - "(32768-65535), the VendorID qualifies the group number. " - "Well-known group identifiers from RFC2412, Appendix E, " - "are: Group 1=\'768 bit prime\', Group 2=\'1024 bit " - "prime\', Group 3=\'Elliptic Curve Group with 155 bit " - "field element\', Group 4=\'Large Elliptic Curve Group " - "with 185 bit field element\', and Group 5=\'1536 bit " - "prime\'." ), - ValueMap { "0", "1", "2", "3", "4", "5", "..", "0x8000.." }, - Values { "No Group/Non-Diffie-Hellman Exchange", - "DH-768 bit prime", "DH-1024 bit prime", - "EC2N-155 bit field element", - "EC2N-185 bit field element", "DH-1536 bit prime", - "Standard Group - Reserved", "Vendor Reserved" }, - MappingStrings { - "IPSP Policy Model.IETF|IPsecAction.GroupID", - "RFC2412.IETF|Appendix E" }, - ModelCorrespondence { "CIM_IPsecAction.VendorID", - "CIM_IKESAEndpoint.GroupID" }] - uint16 GroupId; - - [Description ( - "The property VendorID is used together with the property " - "GroupID (when it is in the vendor-specific range) to " - "identify the key exchange group. VendorID is ignored " - "unless UsePFS is true, AND UsePhase1Group is False, AND " - "GroupID is in the vendor-specific range (32768-65535)." ), - MappingStrings { "IPSP Policy Model.IETF|IPsecAction.VendorID" }, - ModelCorrespondence { "CIM_IPsecAction.GroupId", - "CIM_IKESAEndpoint.VendorID" }] - string VendorID; - - [Description ( - "The property Granularity is an enumeration that " - "specifies how the selector for the SA should be derived " - "from the traffic that triggered the negotiation. Its " - "values are: \n" - "1=Other; See the OtherGranularity property for more " - "information \n" - "2=Subnet; The source and destination subnet masks are " - "used \n" - "3=Address; The source and destination IP addresses of " - "the triggering packet are used \n" - "4=Protocol; The source and destination IP addresses and " - "the IP protocol of the triggering packet are used \n" - "5=Port; The source and destination IP addresses, IP " - "protocol and the source and destination layer 4 ports of " - "the triggering packet are used." ), - ValueMap { "1", "2", "3", "4", "5" }, - Values { "Other", "Subnet", "Address", "Protocol", "Port" }, - MappingStrings { - "IPSP Policy Model.IETF|IPsecAction.Granularity" }, - ModelCorrespondence { "CIM_IPsecAction.OtherGranularity" }] - uint16 Granularity; - - [Description ( - "Description of the granularity when the value 1 " - "(\"Other\") is specified for the property, Granularity." ), - ModelCorrespondence { "CIM_IPsecAction.Granularity" }] - string OtherGranularity; - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecPolicyForEndpoint.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecPolicyForEndpoint.mof deleted file mode 100644 index 60bf3148..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecPolicyForEndpoint.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "IPsecPolicyForEndpoint associates a PolicyGroup with a " - "specific IP endpoint. This association\'s policies take " - "priority over any PolicyGroup defined generically for the " - "hosting system. The latter is defined using the " - "IPsecPolicyForSystem association." ), - MappingStrings { "IPSP Policy Model.IETF|IPsecPolicyForEndpoint" }] -class CIM_IPsecPolicyForEndpoint : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "The IPProtocolEndpoint that identifies an interface to " - "which the PolicyGroup applies." ), - MappingStrings { - "IPSP Policy Model.IETF|IPsecPolicyForEndpoint.Antecedent" }] - CIM_IPProtocolEndpoint REF Antecedent; - - [Override ( "Dependent" ), - Min ( 0 ), - Max ( 1 ), - Description ( - "The PolicyGroup that defines the IPsec negotiation " - "policy for the Endpoint." ), - MappingStrings { - "IPSP Policy Model.IETF|IPsecPolicyForEndpoint.Dependent" }] - CIM_PolicyGroup REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecPolicyForSystem.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecPolicyForSystem.mof deleted file mode 100644 index bc648616..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecPolicyForSystem.mof +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "IPsecPolicyForSystem associates a PolicyGroup with a specific " - "system (e.g., a host or a network device) - indicating that " - "this is the \'default\' IPsec policy for that system. The " - "referenced PolicyGroup would be used for any " - "IPProtocolEndpoint\'s IPsec negotiations, UNLESS the " - "IPsecPolicyForEndpoint association is defined. " - "IPsecPolicyForEndpoint indicates a more specific PolicyGroup " - "for IPsec negotiations for the endpoint." ), - MappingStrings { "IPSP Policy Model.IETF|IPsecPolicyForSystem" }] -class CIM_IPsecPolicyForSystem : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "A System to which the PolicyGroup applies." ), - MappingStrings { - "IPSP Policy Model.IETF|IPsecPolicyForSystem.Antecedent" }] - CIM_System REF Antecedent; - - [Override ( "Dependent" ), - Min ( 0 ), - Max ( 1 ), - Description ( - "The PolicyGroup that defines the \'default\' IPsec " - "negotiation policy for the System." ), - MappingStrings { - "IPSP Policy Model.IETF|IPsecPolicyForSystem.Dependent" }] - CIM_PolicyGroup REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecProposal.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecProposal.mof deleted file mode 100644 index c850ff87..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecProposal.mof +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "The class IPsecProposal adds no new properties, but inherits " - "proposal properties from SAProposal as well as associating the " - "security association transforms necessary for building an " - "IPsec proposal (see the class ContainedTransform)." ), - MappingStrings { "IPSP Policy Model.IETF|IPsecProposal" }] -class CIM_IPsecProposal : CIM_SAProposal { - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecRule.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecRule.mof deleted file mode 100644 index c07b6193..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecRule.mof +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "IPsecRule contains the Conditions and Actions for phase 2 " - "negotiations or to specify static actions such as Discard." ), - MappingStrings { "IPSP Policy Model.IETF|IPsecRule" }] -class CIM_IPsecRule : CIM_SARule { - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecTransportAction.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecTransportAction.mof deleted file mode 100644 index 4819275e..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecTransportAction.mof +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "IPsecTransportAction is used to specify that a transport-mode " - "SA should be negotiated." ), - MappingStrings { "IPSP Policy Model.IETF|IPsecTransportAction" }] -class CIM_IPsecTransportAction : CIM_IPsecAction { - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecTunnelAction.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecTunnelAction.mof deleted file mode 100644 index d5a54452..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_IPsecTunnelAction.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "IPsecTunnelAction is used to specify that a tunnel-mode SA " - "should be negotiated." ), - MappingStrings { "IPSP Policy Model.IETF|IPsecTunnelAction" }] -class CIM_IPsecTunnelAction : CIM_IPsecAction { - - [Description ( - "DFHandling controls how the Don\'t Fragment bit is " - "managed by the tunnel." ), - ValueMap { "2", "3", "4" }, - Values { "Copy from Internal to External IP Header", - "Set DF Bit in External Header to 1", - "Set DF Bit in External Header to 0" }, - MappingStrings { - "IPSP Policy Model.IETF|PreconfiguredTunnelAction.DFHandling" }, - ModelCorrespondence { "CIM_IPsecSAEndpoint.DFHandling" }] - uint16 DFHandling; - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_PacketConditionInSARule.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_PacketConditionInSARule.mof deleted file mode 100644 index 666688bd..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_PacketConditionInSARule.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Aggregation, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "PacketConditionInSARule aggregates an SARule with at least one " - "instance of PacketFilterCondition. This is a specialization of " - "the PolicyConditionInPolicyRule association." ), - MappingStrings { "IPSP Policy Model.IETF|SAConditionInRule" }] -class CIM_PacketConditionInSARule : CIM_PolicyConditionInPolicyRule { - - [Aggregate, Override ( "GroupComponent" ), - Description ( "An SARule subclass of PolicyRule." ), - MappingStrings { - "IPSP Policy Model.IETF|SAConditionInRule.GroupComponent" }] - CIM_SARule REF GroupComponent; - - [Override ( "PartComponent" ), - Min ( 1 ), - Description ( - "An SACondition that is required for the SARule." ), - MappingStrings { - "IPSP Policy Model.IETF|SAConditionInRule.PartComponent" }] - CIM_PacketFilterCondition REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_PeerGatewayForPreconfiguredTunnel.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_PeerGatewayForPreconfiguredTunnel.mof deleted file mode 100644 index 17833630..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_PeerGatewayForPreconfiguredTunnel.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "PeerGatewayForPreconfiguredTunnel identifies at most one " - "security gateway be used in constructing a preconfigured " - "tunnel. A security gateway is simply a particular instance of " - "RemoteServiceAccessPoint." ), - MappingStrings { - "IPSP Policy Model.IETF|PeerGatewayForPreconfiguredTunnel" }] -class CIM_PeerGatewayForPreconfiguredTunnel : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "Security gateway for the preconfigured SA." ), - MappingStrings { - "IPSP Policy Model.IETF|PeerGatewayForPreconfiguredTunnel.Antecedent" }] - CIM_RemoteServiceAccessPoint REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The PreconfiguredTunnelAction that requires a security gateway." - ), - MappingStrings { - "IPSP Policy Model.IETF|PeerGatewayForPreconfiguredTunnel.Dependent" }] - CIM_PreconfiguredTunnelAction REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_PeerGatewayForTunnel.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_PeerGatewayForTunnel.mof deleted file mode 100644 index 37a953f3..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_PeerGatewayForTunnel.mof +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "PeerGatewayForTunnel identifies an ordered list of security " - "gateways to be used in negotiating and constructing a tunnel. " - "A security gateway is simply a particular instance of " - "RemoteServiceAccessPoint." ), - MappingStrings { "IPSP Policy Model.IETF|PeerGatewayForTunnel" }] -class CIM_PeerGatewayForTunnel : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "The security gateway for the SA. Note that the absense " - "of this association indicates that: \n" - "- When acting as a responder, IKE will accept phase 1 " - "negotiations with any other security gateway \n" - "- When acting as an initiator, IKE will use the " - "destination IP address (of the IP packets which " - "triggered the SARule) as the IP address of the peer IKE " - "entity." ), - MappingStrings { - "IPSP Policy Model.IETF|PeerGatewayForTunnel.Antecedent" }] - CIM_RemoteServiceAccessPoint REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The IPsecTunnelAction that requires a security gateway." ), - MappingStrings { - "IPSP Policy Model.IETF|PeerGatewayForTunnel.Dependent" }] - CIM_IPsecTunnelAction REF Dependent; - - [Description ( - "SequenceNumber indicates the ordering to be used when " - "selecting a PeerGateway instance for an " - "IPsecTunnelAction. Lower values are evaluated first." ), - MappingStrings { - "IPSP Policy Model.IETF|PeerGatewayForTunnel.SequenceNumber" }] - uint16 SequenceNumber; - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_PreconfiguredSAAction.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_PreconfiguredSAAction.mof deleted file mode 100644 index 87d7592e..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_PreconfiguredSAAction.mof +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "Subclasses of PreconfiguredSAAction are used to create SAs " - "using preconfigured, hard-wired algorithms and keys. No " - "negotiation is necessary. Note that this class is defined as " - "concrete, since its superclass is also concrete. However, it " - "should not be directly instantiated, but one of its subclasses " - "used instead. \n" - "\n" - "Also note that: \n" - "- The SPI for a preconfigured SA action is contained in the " - "association, TransformOfPreconfiguredAction. \n" - "- The session key (if applicable) is contained in an instance " - "of SharedSecret. For an instance of the SharedSecret class: " - "The session key is stored in the Secret property; the property " - "protocol contains one of the values, \"ESP-encrypt\", " - "\"ESP-auth\" or \"AH\"; and, the class\' property algorithm " - "contains the algorithm used to protect the secret. (The latter " - "can be \"PLAINTEXT\" if the IPsec entity has no secret " - "storage.) The value of the class\' RemoteID property is the " - "concatenation of the remote IPsec peer IP address in dotted " - "decimal, of the character \"/\", of \"IN\" (or respectively " - "\"OUT\") for inbound/outbound SAs, of the character \"/\" and " - "of the hexadecimal representation of the SPI." ), - MappingStrings { "IPSP Policy Model.IETF|PreconfiguredSAAction" }] -class CIM_PreconfiguredSAAction : CIM_SAStaticAction { - - [Description ( - "LifetimeKilobytes defines a traffic limit in kilobytes " - "that can be consumed before the SA is deleted. A value " - "of zero (the default) indicates that there is no " - "lifetime associated with this action (i.e., infinite " - "lifetime). A non-zero value is used to indicate that " - "after this number of kilobytes has been consumed the SA " - "must be deleted. \n" - "\n" - "Note that the actual lifetime of the preconfigured SA " - "will be the lesser of the value of this " - "LifetimeKilobytes property and the value of the " - "MaxLifetimeKilobytes property of the associated " - "SATransform. Also note that some SA negotiation " - "protocols (such as IKE) can negotiate the lifetime as an " - "arbitrary length field, it is assumed that a 64-bit " - "integer will be sufficient." ), - Units ( "KiloBytes" ), - MappingStrings { - "IPSP Policy Model.IETF|PreconfiguredSAAction.LifetimeKilobytes" }, - ModelCorrespondence { - "CIM_SecurityAssociationEndpoint.LifetimeKilobytes" }, - PUnit ( "byte * 10^3" )] - uint64 LifetimeKilobytes; - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_PreconfiguredTransportAction.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_PreconfiguredTransportAction.mof deleted file mode 100644 index cc03180e..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_PreconfiguredTransportAction.mof +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "PreconfiguredTransportAction is used to create transport-mode " - "SAs using preconfigured, hard-wired algorithms and keys. Note " - "that the SPI for a preconfigured SA action is contained in the " - "association, TransformOfPreconfiguredAction." ), - MappingStrings { - "IPSP Policy Model.IETF|PreconfiguredTransportAction" }] -class CIM_PreconfiguredTransportAction : CIM_PreconfiguredSAAction { - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_PreconfiguredTunnelAction.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_PreconfiguredTunnelAction.mof deleted file mode 100644 index 6c7589d6..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_PreconfiguredTunnelAction.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "PreconfiguredTunnelAction is used to create tunnel-mode SAs " - "using preconfigured, hard-wired algorithms and keys. Note that " - "the SPI for a preconfigured SA action is contained in the " - "association, TransformOfPreconfiguredAction." ), - MappingStrings { "IPSP Policy Model.IETF|PreconfiguredTunnelAction" }] -class CIM_PreconfiguredTunnelAction : CIM_PreconfiguredSAAction { - - [Description ( - "DFHandling controls how the Don\'t Fragment bit is " - "managed by the tunnel." ), - ValueMap { "2", "3", "4" }, - Values { "Copy from Internal to External IP Header", - "Set DF Bit in External Header to 1", - "Set DF Bit in External Header to 0" }, - MappingStrings { - "IPSP Policy Model.IETF|PreconfiguredTunnelAction.DFHandling" }, - ModelCorrespondence { "CIM_IPsecSAEndpoint.DFHandling" }] - uint16 DFHandling; - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_RuleThatGeneratedSA.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_RuleThatGeneratedSA.mof deleted file mode 100644 index 27177765..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_RuleThatGeneratedSA.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "RuleThatGeneratedSA associates a SecurityAssociationEndpoint " - "with the SARule used to generate (or negotiate) it." )] -class CIM_RuleThatGeneratedSA : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 0 ), - Max ( 1 ), - Description ( "SARule that led to the Security Association." )] - CIM_SARule REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "SecurityAssociationEndpoint created using the rule." )] - CIM_SecurityAssociationEndpoint REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_SAAction.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_SAAction.mof deleted file mode 100644 index 5994bc52..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_SAAction.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Abstract, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "SAAction is the base class for the various types of key " - "exchange or IPsec actions. It is abstract and used to " - "categorize the different types of actions of SARules." ), - MappingStrings { "IPSP Policy Model.IETF|SAAction" }] -class CIM_SAAction : CIM_PolicyAction { - - [Description ( - "DoPacketLogging causes a log message to be generated " - "when the action is applied to a packet." ), - MappingStrings { - "IPSP Policy Model.IETF|SAAction.DoPacketLogging" }, - ModelCorrespondence { - "CIM_SecurityAssociationEndpoint.PacketLoggingActive" }] - boolean DoPacketLogging; - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_SANegotiationAction.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_SANegotiationAction.mof deleted file mode 100644 index 275e280f..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_SANegotiationAction.mof +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Abstract, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "SANegotiationAction is the base class for negotiated SAs. It " - "is abstract, specifying the common parameters that control the " - "IPsec phase 1 and phase 2 negotiations." ), - MappingStrings { "IPSP Policy Model.IETF|SANegotiationAction", - "IPSP Policy Model.IETF|IKENegotiationAction" }] -class CIM_SANegotiationAction : CIM_SAAction { - - [Description ( - "MinLifetimeSeconds prevents certain denial of service " - "attacks where the peer requests an arbitrarily low " - "lifetime value, causing renegotiations with expensive " - "Diffie-Hellman operations. The property specifies the " - "minimum lifetime, in seconds, that will be accepted from " - "the peer. A value of zero (the default) indicates that " - "there is no minimum value. A non-zero value specifies " - "the minimum seconds lifetime." ), - Units ( "Seconds" ), - MappingStrings { - "IPSP Policy Model.IETF|IKENegotiationAction.MinLifetimeSeconds" }, - ModelCorrespondence { - "CIM_SecurityAssociationEndpoint.LifetimeSeconds" }, - PUnit ( "second" )] - uint64 MinLifetimeSeconds = 0; - - [Description ( - "IdleDurationSeconds is the time an SA can remain idle " - "(i.e., no traffic protected using the security " - "association) before it is automatically deleted. The " - "default (zero) value indicates that there is no idle " - "duration timer and that the SA is deleted based upon the " - "SA seconds and kilobyte lifetimes. Any non-zero value " - "indicates the number of seconds that the SA may remain " - "unused." ), - Units ( "Seconds" ), - MappingStrings { - "IPSP Policy Model.IETF|IKENegotiationAction.IdleDurationSeconds" }, - ModelCorrespondence { - "CIM_SecurityAssociationEndpoint.IdleDurationSeconds" }, - PUnit ( "second" )] - uint64 IdleDurationSeconds = 0; - - [Description ( - "MinLifetimeKilobytes prevents certain denial of service " - "attacks where the peer requests an arbitrarily low " - "lifetime value, causing renegotiations with expensive " - "Diffie-Hellman operations. The property specifies the " - "minimum lifetime, in kilobytes, that will be accepted " - "from the peer. A value of zero (the default) indicates " - "that there is no minimum value. A non-zero value " - "specifies the minimum kilobytes lifetime. Note that " - "there has been considerable debate regarding the " - "usefulness of applying kilobyte lifetimes to phase 1 " - "security associations, so it is likely that this " - "property will only apply to the subclass, IPsecAction." ), - Units ( "KiloBytes" ), - MappingStrings { - "IPSP Policy Model.IETF|IKENegotiationAction.MinLifetimeKilobytes" }, - ModelCorrespondence { - "CIM_SecurityAssociationEndpoint.LifetimeKilobytes" }, - PUnit ( "byte * 10^3" )] - uint64 MinLifetimeKilobytes = 0; - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_SAProposal.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_SAProposal.mof deleted file mode 100644 index 82467e14..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_SAProposal.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Abstract, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "SAProposal is a base class defining the common properties of, " - "and anchoring common associations for, IPsec phase 1 and phase " - "2 proposals. It is defined as a kind of ScopedSettingData " - "(scoped by a ComputerSystem or AdminDomain), since its " - "subclasses define sets of IPsec properties that MUST be " - "applied together, if negotiated. This subclassing is different " - "than that defined in IETF\'s IPSP Policy draft - where it is " - "subclassed from Policy. The definition as SettingData is more " - "consistent with the application of the properties as a set, to " - "the negotiated Security Association. To indicate that \'this\' " - "proposaltransform is negotiated for a Security Association, " - "use the ElementSettingData to associate the proposal and the " - "SA." ), - MappingStrings { "IPSP Policy Model.IETF|SAProposal" }] -class CIM_SAProposal : CIM_ScopedSettingData { - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_SARule.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_SARule.mof deleted file mode 100644 index 75ce1ebd..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_SARule.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "SARule is a base class for defining IKE and IPsec Rules. " - "Although concrete (because it subclasses from a concrete " - "class), it is not intended to be instantiated. It defines a " - "common connection point for associating conditions and actions " - "for both types of rules. Note that each valid PolicyGroup " - "containing SARules MUST use a unique priority number for the " - "Rule in the aggregation, PolicySetComponent.Priority." ), - MappingStrings { "IPSP Policy Model.IETF|SARule" }] -class CIM_SARule : CIM_PolicyRule { - - [Description ( - "LimitNegotiation is used as part of processing either a " - "key exchange or IPsec Rule. Before proceeding with " - "either a phase 1 or a phase 2 negotiation, this property " - "is checked to determine if the negotiation role of the " - "Rule matches that defined for the negotiation being " - "undertaken (e.g., Initiator, Responder, or Both). If " - "this check fails, then the negotiation is stopped. Note " - "that this only applies to new negotiations and has no " - "effect on either renegotiation or refresh operations " - "with peers for which an established Security Association " - "already exists." ), - ValueMap { "1", "2", "3" }, - Values { "Initiator-Only", "Responder-Only", "Either" }, - MappingStrings { - "IPSP Policy Model.IETF|SARule.LimitNegotiation" }] - uint16 LimitNegotiation; - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_SAStaticAction.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_SAStaticAction.mof deleted file mode 100644 index 3b9f8ae8..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_SAStaticAction.mof +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "SAStaticAction is the base class for both key exchange as well " - "as IPsec actions that require no negotiation. It is a concrete " - "class that can be aggregated with other subclasses of " - "PolicyAction (such as NetworkPacketAction) into a PolicyRule, " - "to describe how packets are handled throughout the lifetime of " - "the Security Association." ), - MappingStrings { "IPSP Policy Model.IETF|SAStaticAction" }] -class CIM_SAStaticAction : CIM_SAAction { - - [Description ( - "LifetimeSeconds specifies how long the SA created from " - "this action should be used/exist. A value of 0 means an " - "infinite lifetime. A non-zero value is typically used in " - "conjunction with alternate SAActions performed when " - "there is a negotiation failure of some sort. \n" - "\n" - "Note: If the referenced SAStaticAction object IS-A " - "PreconfiguredSAAction (that is associated to several " - "SATransforms), then the actual lifetime of the Security " - "Association will be the lesser of the value of this " - "LifetimeSeconds property and of the value of the " - "MaxLifetimeSeconds property of the associated " - "SATransform." ), - Units ( "Seconds" ), - MappingStrings { - "IPSP Policy Model.IETF|SAStaticAction.LifetimeSeconds" }, - ModelCorrespondence { - "CIM_SecurityAssociationEndpoint.LifetimeSeconds" }, - PUnit ( "second" )] - uint64 LifetimeSeconds; - - -}; diff --git a/build/vendor/dmtf_mof/IPsecPolicy/CIM_TransformOfPreconfiguredAction.mof b/build/vendor/dmtf_mof/IPsecPolicy/CIM_TransformOfPreconfiguredAction.mof deleted file mode 100644 index a114e68a..00000000 --- a/build/vendor/dmtf_mof/IPsecPolicy/CIM_TransformOfPreconfiguredAction.mof +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::IPsecPolicy" ), - Description ( - "TransformOfPreconfiguredAction defines the transforms used by " - "a preconfigured IPsec action. Two, four or six SATransforms " - "can be associated to a PreconfiguredSAAction (applied to the " - "inbound and outbound traffic, as indicated by the Direction " - "property of this association). The order of application of the " - "SATransforms is implicitly defined in RFC2401." ), - MappingStrings { - "IPSP Policy Model.IETF|TransformOfPreconfiguredAction" }] -class CIM_TransformOfPreconfiguredAction : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 2 ), - Max ( 6 ), - Description ( - "This defines the type of transform used by the " - "referenced PreconfiguredSAAction. A minimum of 2 and " - "maximum of 6 transforms can be defined, for the " - "inbound/outbound directions, representing AH, ESP, " - "and/or an IPCOMP transforms." ), - MappingStrings { - "IPSP Policy Model.IETF|TransformOfPreconfiguredAction.Antecedent" }] - CIM_SATransform REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "This defines the PreconfiguredSAAction which uses the " - "AH, ESP, and/or IPCOMP transforms." ), - MappingStrings { - "IPSP Policy Model.IETF|TransformOfPreconfiguredAction.Dependent" }] - CIM_PreconfiguredSAAction REF Dependent; - - [Description ( - "The SPI property specifies the security parameter index " - "to be used by the pre-configured action for the " - "associated transform." ), - MappingStrings { - "IPSP Policy Model.IETF|TransformOfPreconfiguredAction.SPI" }, - ModelCorrespondence { "CIM_IPsecSAEndpoint.SPI" }] - uint32 SPI; - - [Description ( - "InboundDirection specifies whether the SA applies to " - "inbound (TRUE) or outbound (FALSE) traffic." ), - MappingStrings { - "IPSP Policy Model.IETF|TransformOfPreconfiguredAction.Direction" }, - ModelCorrespondence { "CIM_IPsecSAEndpoint.InboundDirection" }] - boolean InboundDirection; - - -}; diff --git a/build/vendor/dmtf_mof/Interop/CIM_CIMOMStatisticalData.mof b/build/vendor/dmtf_mof/Interop/CIM_CIMOMStatisticalData.mof deleted file mode 100644 index 7d7fba9a..00000000 --- a/build/vendor/dmtf_mof/Interop/CIM_CIMOMStatisticalData.mof +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Interop" ), - Description ( - "CIM_CIMOMStatisticalData provides statistical data about the " - "performance of the CIM Object Manager. Each object of this " - "class provides elapsed time and size data for a particular " - "type of CIM operation. All operations of that type, regardless " - "of the CIM operations protocol being used, are accumulated in " - "one object and covers the CIM operations issued by all clients " - "of the Object Manager scoping the instance. Batched CIM " - "operations are accumulated into a separate operation type for " - "\"Batched\". The counters in this class SHOULD be implemented " - "such that they always increment and naturally wrap around when " - "their numerical limit is exceeded. A client that calculates " - "the difference of two snapshots of a counter at the beginning " - "and end of a measurement interval should get the correct " - "result, even if there was a wrap-around in between obtaining " - "the two snapshots. (Two or more wrap arounds will result in " - "wrong data being calculated.) The gathering of the data can be " - "controlled through the property, " - "CIM_ObjectManager.GatherStatisticalData. The time interval to " - "which the statistical data applies, ends at the current time " - "and therefore includes the most current CIM operations. The " - "interval starts when the statistical data gathering was last " - "turned on for the Object Manager." )] -class CIM_CIMOMStatisticalData : CIM_StatisticalData { - - [Override ( "InstanceID" ), - Description ( - "The InstanceID property opaquely identifies a unique " - "instance of CIMOMStatisticalData and MUST be unique " - "within a namespace. In order to ensure uniqueness, the " - "value of InstanceID MUST be constructed in the following " - "manner: \n" - "CIM \n" - "The MUST include a CIM Object Manager specified " - "unique identifier." )] - string InstanceID; - - [Required, Description ( - "The OperationType property identifies the type of CIM " - "operation for which data is reported in this instance. " - "Batched CIM operations (consisting of multiple simple " - "CIM operations) are reported against the \"Batched\" " - "type only." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26" }, - Values { "Unknown", "Other", "Batched", "GetClass", - "GetInstance", "DeleteClass", "DeleteInstance", - "CreateClass", "CreateInstance", "ModifyClass", - // 10 - "ModifyInstance", - "EnumerateClasses", "EnumerateClassNames", - "EnumerateInstances", "EnumerateInstanceNames", - "ExecQuery", "Associators", "AssociatorNames", - "References", "ReferenceNames", - // 20 - "GetProperty", - "SetProperty", "GetQualifier", "SetQualifier", - "DeleteQualifier", "EnumerateQualifiers", - "IndicationDelivery" }, - ModelCorrespondence { - "CIM_CIMOMStatisticalData.OtherOperationType" }] - uint16 OperationType; - - [Description ( - "The OtherOperationType property identifies the operation " - "if the OperationType property has a value of 1 " - "(\"Other\"). For all other values of OperationType, the " - "property is NULL." ), - MaxLen ( 64 ), - ModelCorrespondence { "CIM_CIMOMStatisticalData.OperationType" }] - string OtherOperationType; - - [Required, Description ( - "The NumberOfOperations property contains the number of " - "CIM operations of the specified type. This property can " - "be used to calculate average values per CIM operation." ), - Counter] - uint64 NumberOfOperations; - - [Required, Description ( - "The CimomElapsedTime property contains the elapsed time " - "spent in the CIM Object Manager for this operation type, " - "not counting the elapsed time spent in providers and the " - "underlying instrumentation. The measurement points for " - "this property SHOULD be at the transport layer interface " - "on the network side, and at the provider interface on " - "the instrumentation side of the CIM Object Manager." )] - datetime CimomElapsedTime; - - [Required, Description ( - "The ProviderElapsedTime property contains the elapsed " - "time spent in all providers involved with this operation " - "type, including the underlying instrumentation. The " - "measurement point for this property SHOULD be from the " - "provider interface of the CIM Object Manager." )] - datetime ProviderElapsedTime; - - [Description ( - "The RequestSize property contains the size of the " - "operation requests sent to the CIM Object Manager. Any " - "overhead of protocols above the transport protocol " - "SHOULD be included in the count. For example, for the " - "HTTP protocol, the size would include the size of the " - "HTTP payload and the size of the HTTP headers." ), - Units ( "Bytes" ), - Counter, PUnit ( "byte" )] - uint64 RequestSize; - - [Description ( - "The ResponseSize property contains the size of the " - "operation responses sent back from the CIM Object " - "Manager. Any overhead of protocols above the transport " - "protocol SHOULD be included in the count. For example, " - "for the HTTP protocol, the size would include the size " - "of the HTTP payload and the size of the HTTP headers." ), - Units ( "Bytes" ), - Counter, PUnit ( "byte" )] - uint64 ResponseSize; - - -}; diff --git a/build/vendor/dmtf_mof/Interop/CIM_CIMXMLCommunicationMechanism.mof b/build/vendor/dmtf_mof/Interop/CIM_CIMXMLCommunicationMechanism.mof deleted file mode 100644 index 5680a492..00000000 --- a/build/vendor/dmtf_mof/Interop/CIM_CIMXMLCommunicationMechanism.mof +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Interop" ), - Description ( - "This class specializes ObjectManagerCommunicationMechanism, " - "adding properties specific to the CIM-XML protocol (XML " - "encoding and CIM Operations)." )] -class CIM_CIMXMLCommunicationMechanism : CIM_ObjectManagerCommunicationMechanism { - - [Required, Override ( "CommunicationMechanism" ), - Description ( - "The only valid CommunicationMechanism for this subclass " - "is CIM-XML." ), - ValueMap { "2" }, - Values { "CIM-XML" }] - uint16 CommunicationMechanism = 2; - - [Required, Override ( "Version" ), - Description ( - "Enumeration describing the CIM-XML protocol version " - "supported by the ObjectManager." ), - ValueMap { "1.0", "1.1", "1.2" }] - string Version; - - [Deprecated { "CIM_CIMXMLCommunicationMechanism.Version" }, - Required, Description ( - "Enumeration describing the CIM-XML protocol version " - "supported by the ObjectManager. It is deprecated in lieu " - "of a more general, inherited property (Version)." ), - ValueMap { "0", "1" }, - Values { "Unknown", "1.0" }] - uint16 CIMXMLProtocolVersion; - - [Required, Description ( - "Describes whether the CIM Server is strictly validating " - "(validates the XML document against the DTD) or not " - "(loosely validating)." )] - boolean CIMValidated; - - -}; diff --git a/build/vendor/dmtf_mof/Interop/CIM_CommMechanismForAdapter.mof b/build/vendor/dmtf_mof/Interop/CIM_CommMechanismForAdapter.mof deleted file mode 100644 index 3a0ed1e0..00000000 --- a/build/vendor/dmtf_mof/Interop/CIM_CommMechanismForAdapter.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Deprecated { "CIM_CommMechanismForObjectManagerAdapter" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Interop" ), - Description ( - "CommMechanismForAdapter is an association between an " - "ObjectManager\'s communication mechanism and a ProtocolAdapter " - "that supports that mechanism to translate requests and " - "responses for the Object Manager." )] -class CIM_CommMechanismForAdapter : CIM_Dependency { - - [Deprecated { - "CIM_CommMechanismForObjectManagerAdapter.Antecedent" }, - Override ( "Antecedent" ), - Description ( - "The specific ProtocolAdapter whose communication " - "mechanism with the CIM Object Manager is described." )] - CIM_ProtocolAdapter REF Antecedent; - - [Deprecated { - "CIM_CommMechanismForObjectManagerAdapter.Dependent" }, - Override ( "Dependent" ), - Min ( 1 ), - Description ( - "The encoding/protocol/set of operations that may be used " - "to communicate between the Object Manager and the " - "referenced ProtocolAdapter." )] - CIM_ObjectManagerCommunicationMechanism REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Interop/CIM_CommMechanismForManager.mof b/build/vendor/dmtf_mof/Interop/CIM_CommMechanismForManager.mof deleted file mode 100644 index 8e5d8969..00000000 --- a/build/vendor/dmtf_mof/Interop/CIM_CommMechanismForManager.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Interop" ), - Description ( - "CommMechanismForManager is an association between an " - "ObjectManager and an ObjectManagerCommunicationMechanism " - "class. The latter describes a possible encoding/protocol/ set " - "of operations for accessing the referenced ObjectManager." )] -class CIM_CommMechanismForManager : CIM_ServiceAccessBySAP { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The specific ObjectManager whose communication mechanism " - "is described." )] - CIM_ObjectManager REF Antecedent; - - [Override ( "Dependent" ), - Min ( 1 ), - Description ( - "The encoding/protocol/set of operations that may be used " - "to communicate with the referenced ObjectManager." )] - CIM_ObjectManagerCommunicationMechanism REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Interop/CIM_CommMechanismForObjectManagerAdapter.mof b/build/vendor/dmtf_mof/Interop/CIM_CommMechanismForObjectManagerAdapter.mof deleted file mode 100644 index c4a20b53..00000000 --- a/build/vendor/dmtf_mof/Interop/CIM_CommMechanismForObjectManagerAdapter.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Interop" ), - Description ( - "CommMechanismForObjectManagerAdapter is an association between " - "an ObjectManager\'s communication mechanism and a " - "ObjectManagerAdapter that supports that mechanism to translate " - "requests and responses for the Object Manager." )] -class CIM_CommMechanismForObjectManagerAdapter : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "The specific ObjectManagerAdapter whose communication " - "mechanism with the CIM Object Manager is described." )] - CIM_ObjectManagerAdapter REF Antecedent; - - [Override ( "Dependent" ), - Min ( 1 ), - Description ( - "The encoding/protocol/set of operations that may be used " - "to communicate between the Object Manager and the " - "referenced ProtocolAdapter." )] - CIM_ObjectManagerCommunicationMechanism REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Interop/CIM_ElementConformsToProfile.mof b/build/vendor/dmtf_mof/Interop/CIM_ElementConformsToProfile.mof deleted file mode 100644 index f99de12b..00000000 --- a/build/vendor/dmtf_mof/Interop/CIM_ElementConformsToProfile.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Interop" ), - Description ( - "The CIM_ElementConformsToProfile association defines the " - "RegisteredProfiles to which the referenced ManagedElement is " - "conformant. Note: This association may apply to any Managed " - "Element. Typical usage will apply it to a higher level " - "instance, such as a System, NameSpace, or Service. When " - "applied to a higher level instance, all constituent parts MUST " - "behave appropriately in support of the ManagedElement\'s " - "conformance to the named RegisteredProfile." )] -class CIM_ElementConformsToProfile { - - [Key, Description ( - "The RegisteredProfile to which the ManagedElement conforms." - )] - CIM_RegisteredProfile REF ConformantStandard; - - [Key, Description ( - "The ManagedElement that conforms to the RegisteredProfile." - )] - CIM_ManagedElement REF ManagedElement; - - -}; diff --git a/build/vendor/dmtf_mof/Interop/CIM_Error.mof b/build/vendor/dmtf_mof/Interop/CIM_Error.mof deleted file mode 100644 index 68aae013..00000000 --- a/build/vendor/dmtf_mof/Interop/CIM_Error.mof +++ /dev/null @@ -1,375 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Indication, Version ( "2.22.1" ), - Exception, UMLPackagePath ( "CIM::Interop" ), - Description ( - "CIM_Error is a specialized class that contains information " - "about the severity, cause, recommended actions and other data " - "related to the failure of a CIM Operation. Instances of this " - "type MAY be included as part of the response to a CIM " - "Operation." )] -class CIM_Error { - - [Description ( - "Primary classification of the error. The following " - "values are defined: \n" - "2 - Communications Error. Errors of this type are " - "principally associated with the procedures and/or " - "processes required to convey information from one point " - "to another. \n" - "3 - Quality of Service Error. Errors of this type are " - "principally associated with failures that result in " - "reduced functionality or performance. \n" - "4 - Software Error. Error of this type are principally " - "associated with a software or processing fault. \n" - "5 - Hardware Error. Errors of this type are principally " - "associated with an equipment or hardware failure. \n" - "6 - Environmental Error. Errors of this type are " - "principally associated with a failure condition relating " - "the to facility, or other environmental considerations. \n" - "7 - Security Error. Errors of this type are associated " - "with security violations, detection of viruses, and " - "similar issues. \n" - "8 - Oversubscription Error. Errors of this type are " - "principally associated with the failure to allocate " - "sufficient resources to complete the operation. \n" - "9 - Unavailable Resource Error. Errors of this type are " - "principally associated with the failure to access a " - "required resource. \n" - "10 -Unsupported Operation Error. Errors of this type are " - "principally associated with requests that are not " - "supported." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", ".." }, - Values { "Unknown", "Other", "Communications Error", - "Quality of Service Error", "Software Error", - "Hardware Error", "Environmental Error", "Security Error", - "Oversubscription Error", "Unavailable Resource Error", - "Unsupported Operation Error", "DMTF Reserved" }, - ModelCorrespondence { "CIM_Error.OtherErrorType" }] - uint16 ErrorType; - - [Description ( - "A free-form string describing the ErrorType when 1, " - "\"Other\", is specified as the ErrorType." ), - ModelCorrespondence { "CIM_Error.ErrorType" }] - string OtherErrorType; - - [Description ( - "A string that uniquely identifies the entity that owns " - "the definition of the format of the Message described in " - "this instance. OwningEntity MUST include a copyrighted, " - "trademarked or otherwise unique name that is owned by " - "the business entity or standards body defining the " - "format." )] - string OwningEntity; - - [Required, Description ( - "An opaque string that uniquely identifies, within the " - "scope of the OwningEntity, the format of the Message." ), - ModelCorrespondence { "CIM_Error.Message", - "CIM_Error.MessageArguments" }] - string MessageID; - - [Description ( - "The formatted message. This message is constructed by " - "combining some or all of the dynamic elements specified " - "in the MessageArguments property with the static " - "elements uniquely identified by the MessageID in a " - "message registry or other catalog associated with the " - "OwningEntity." ), - ModelCorrespondence { "CIM_Error.MessageID", - "CIM_Error.MessageArguments" }] - string Message; - - [Description ( - "An array containing the dynamic content of the message." ), - ModelCorrespondence { "CIM_Error.MessageID", - "CIM_Error.Message" }] - string MessageArguments[]; - - [Description ( - "An enumerated value that describes the severity of the " - "Indication from the notifier\'s point of view: \n" - "0 - the Perceived Severity of the indication is unknown " - "or indeterminate. \n" - "1 - Other, by CIM convention, is used to indicate that " - "the Severity\'s value can be found in the OtherSeverity " - "property. \n" - "2 - Information should be used when providing an " - "informative response. \n" - "3 - Degraded/Warning should be used when its appropriate " - "to let the user decide if action is needed. \n" - "4 - Minor should be used to indicate action is needed, " - "but the situation is not serious at this time. \n" - "5 - Major should be used to indicate action is needed " - "NOW. \n" - "6 - Critical should be used to indicate action is needed " - "NOW and the scope is broad (perhaps an imminent outage " - "to a critical resource will result). \n" - "7 - Fatal/NonRecoverable should be used to indicate an " - "error occurred, but it\'s too late to take remedial " - "action. \n" - "2 and 0 - Information and Unknown (respectively) follow " - "common usage. Literally, the Error is purely " - "informational or its severity is simply unknown." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", ".." }, - Values { "Unknown", "Other", "Information", - "Degraded/Warning", "Minor", "Major", "Critical", - "Fatal/NonRecoverable", "DMTF Reserved" }, - MappingStrings { "Recommendation.ITU|X733.Perceived severity" }] - uint16 PerceivedSeverity; - - [Description ( - "An enumerated value that describes the probable cause of " - "the error." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26", "27", - "28", "29", "30", "31", "32", "33", "34", "35", "36", - "37", "38", "39", "40", "41", "42", "43", "44", "45", - "46", "47", "48", "49", "50", "51", "52", "53", "54", - "55", "56", "57", "58", "59", "60", "61", "62", "63", - "64", "65", "66", "67", "68", "69", "70", "71", "72", - "73", "74", "75", "76", "77", "78", "79", "80", "81", - "82", "83", "84", "85", "86", "87", "88", "89", "90", - "91", "92", "93", "94", "95", "96", "97", "98", "99", - "100", "101", "102", "103", "104", "105", "106", "107", - "108", "109", "110", "111", "112", "113", "114", "115", - "116", "117", "118", "119", "120", "121", "122", "123", - "124", "125", "126", "127", "128", "129", "130", ".." }, - Values { "Unknown", "Other", "Adapter/Card Error", - "Application Subsystem Failure", "Bandwidth Reduced", - "Connection Establishment Error", - "Communications Protocol Error", - "Communications Subsystem Failure", - "Configuration/Customization Error", "Congestion", - "Corrupt Data", "CPU Cycles Limit Exceeded", - "Dataset/Modem Error", "Degraded Signal", - "DTE-DCE Interface Error", "Enclosure Door Open", - "Equipment Malfunction", "Excessive Vibration", - "File Format Error", "Fire Detected", "Flood Detected", - "Framing Error", "HVAC Problem", "Humidity Unacceptable", - "I/O Device Error", "Input Device Error", "LAN Error", - "Non-Toxic Leak Detected", - "Local Node Transmission Error", "Loss of Frame", - "Loss of Signal", - //31 - "Material Supply Exhausted", - "Multiplexer Problem", "Out of Memory", - "Output Device Error", "Performance Degraded", - "Power Problem", "Pressure Unacceptable", - "Processor Problem (Internal Machine Error)", - "Pump Failure", "Queue Size Exceeded", "Receive Failure", - "Receiver Failure", "Remote Node Transmission Error", - "Resource at or Nearing Capacity", - "Response Time Excessive", - "Retransmission Rate Excessive", "Software Error", - "Software Program Abnormally Terminated", - "Software Program Error (Incorrect Results)", - "Storage Capacity Problem", "Temperature Unacceptable", - "Threshold Crossed", "Timing Problem", - "Toxic Leak Detected", "Transmit Failure", - "Transmitter Failure", "Underlying Resource Unavailable", - "Version Mismatch", "Previous Alert Cleared", - //60 - "Login Attempts Failed", - "Software Virus Detected", "Hardware Security Breached", - "Denial of Service Detected", - "Security Credential Mismatch", "Unauthorized Access", - "Alarm Received", "Loss of Pointer", "Payload Mismatch", - "Transmission Error", "Excessive Error Rate", - "Trace Problem", "Element Unavailable", "Element Missing", - "Loss of Multi Frame", "Broadcast Channel Failure", - "Invalid Message Received", "Routing Failure", - "Backplane Failure", "Identifier Duplication", - "Protection Path Failure", "Sync Loss or Mismatch", - "Terminal Problem", "Real Time Clock Failure", - "Antenna Failure", "Battery Charging Failure", - "Disk Failure", "Frequency Hopping Failure", - "Loss of Redundancy", "Power Supply Failure", - "Signal Quality Problem", - //91 - "Battery Discharging", "Battery Failure", - "Commercial Power Problem", "Fan Failure", - "Engine Failure", "Sensor Failure", "Fuse Failure", - "Generator Failure", "Low Battery", "Low Fuel", - "Low Water", "Explosive Gas", "High Winds", "Ice Buildup", - "Smoke", "Memory Mismatch", "Out of CPU Cycles", - "Software Environment Problem", - "Software Download Failure", "Element Reinitialized", - "Timeout", "Logging Problems", "Leak Detected", - "Protection Mechanism Failure", - //115 - "Protecting Resource Failure", - "Database Inconsistency", "Authentication Failure", - "Breach of Confidentiality", "Cable Tamper", - "Delayed Information", "Duplicate Information", - "Information Missing", "Information Modification", - "Information Out of Sequence", "Key Expired", - "Non-Repudiation Failure", "Out of Hours Activity", - "Out of Service", "Procedural Error", - "Unexpected Information", "DMTF Reserved" }, - MappingStrings { "Recommendation.ITU|X733.Probable cause", - "Recommendation.ITU|M3100.probableCause", - "ITU-IANA-ALARM-TC" }, - ModelCorrespondence { "CIM_Error.ProbableCauseDescription" }] - uint16 ProbableCause; - - [Description ( - "A free-form string describing the probable cause of the error." - ), - ModelCorrespondence { "CIM_Error.ProbableCause" }] - string ProbableCauseDescription; - - [Description ( - "A free-form string describing recommended actions to " - "take to resolve the error." )] - string RecommendedActions[]; - - [Description ( - "The identifying information of the entity (i.e., the " - "instance) generating the error. If this entity is " - "modeled in the CIM Schema, this property contains the " - "path of the instance encoded as a string parameter. If " - "not modeled, the property contains some identifying " - "string that names the entity that generated the error. " - "The path or identifying string is formatted per the " - "ErrorSourceFormat property." ), - ModelCorrespondence { "CIM_Error.ErrorSourceFormat" }] - string ErrorSource; - - [Description ( - "The format of the ErrorSource property is interpretable " - "based on the value of this property. Values are defined " - "as: \n" - "0 - Unknown. The format is unknown or not meaningfully " - "interpretable by a CIM client application. \n" - "1 - Other. The format is defined by the value of the " - "OtherErrorSourceFormat property.2 - CIMObjectPath. A CIM " - "Object Path as defined in the CIM Infrastructure " - "specification. Note: CIM 2.5 and earlier used the term " - "object names." ), - ValueMap { "0", "1", "2", ".." }, - Values { "Unknown", "Other", "CIMObjectPath", "DMTF Reserved" }, - ModelCorrespondence { "CIM_Error.ErrorSource", - "CIM_Error.OtherErrorSourceFormat" }] - uint16 ErrorSourceFormat = 0; - - [Description ( - "A string defining \"Other\" values for " - "ErrorSourceFormat. This value MUST be set to a non NULL " - "value when ErrorSourceFormat is set to a value of 1 " - "(\"Other\"). For all other values of ErrorSourceFormat, " - "the value of this string must be set to NULL." ), - ModelCorrespondence { "CIM_Error.ErrorSourceFormat" }] - string OtherErrorSourceFormat; - - [Description ( - "The CIM status code that characterizes this instance. \n" - "This property defines the status codes that MAY be " - "return by a conforming CIM Server or Listener. Note that " - "not all status codes are valid for each operation. The " - "specification for each operation SHOULD define the " - "status codes that may be returned by that operation. \n" - "The following values for CIM status code are defined: \n" - "1 - CIM_ERR_FAILED. A general error occurred that is not " - "covered by a more specific error code. \n" - "2 - CIM_ERR_ACCESS_DENIED. Access to a CIM resource was " - "not available to the client. \n" - "3 - CIM_ERR_INVALID_NAMESPACE. The target namespace does " - "not exist. \n" - "4 - CIM_ERR_INVALID_PARAMETER. One or more parameter " - "values passed to the method were invalid. \n" - "5 - CIM_ERR_INVALID_CLASS. The specified Class does not " - "exist. \n" - "6 - CIM_ERR_NOT_FOUND. The requested object could not be " - "found. \n" - "7 - CIM_ERR_NOT_SUPPORTED. The requested operation is " - "not supported. \n" - "8 - CIM_ERR_CLASS_HAS_CHILDREN. Operation cannot be " - "carried out on this class since it has instances. \n" - "9 - CIM_ERR_CLASS_HAS_INSTANCES. Operation cannot be " - "carried out on this class since it has instances. \n" - "10 - CIM_ERR_INVALID_SUPERCLASS. Operation cannot be " - "carried out since the specified superclass does not " - "exist. \n" - "11 - CIM_ERR_ALREADY_EXISTS. Operation cannot be carried " - "out because an object already exists. \n" - "12 - CIM_ERR_NO_SUCH_PROPERTY. The specified Property " - "does not exist. \n" - "13 - CIM_ERR_TYPE_MISMATCH. The value supplied is " - "incompatible with the type. \n" - "14 - CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED. The query " - "language is not recognized or supported. \n" - "15 - CIM_ERR_INVALID_QUERY. The query is not valid for " - "the specified query language. \n" - "16 - CIM_ERR_METHOD_NOT_AVAILABLE. The extrinsic Method " - "could not be executed. \n" - "17 - CIM_ERR_METHOD_NOT_FOUND. The specified extrinsic " - "Method does not exist. \n" - "18 - CIM_ERR_UNEXPECTED_RESPONSE. The returned response " - "to the asynchronous operation was not expected. \n" - "19 - CIM_ERR_INVALID_RESPONSE_DESTINATION. The specified " - "destination for the asynchronous response is not valid. \n" - "20 - CIM_ERR_NAMESPACE_NOT_EMPTY. The specified " - "Namespace is not empty.\n" - "21 - CIM_ERR_INVALID_ENUMERATION_CONTEXT. The " - "enumeration context supplied is not valid.\n" - "22 - CIM_ERR_INVALID_OPERATION_TIMEOUT. The specified " - "Namespace is not empty.\n" - "23 - CIM_ERR_PULL_HAS_BEEN_ABANDONED. The specified " - "Namespace is not empty.\n" - "24 - CIM_ERR_PULL_CANNOT_BE_ABANDONED. The attempt to " - "abandon a pull operation has failed.\n" - "25 - CIM_ERR_FILTERED_ENUMERATION_NOT_SUPPORTED. " - "Filtered Enumeratrions are not supported.\n" - "26 - CIM_ERR_CONTINUATION_ON_ERROR_NOT_SUPPORTED. " - "Continue on error is not supported.\n" - "27 - CIM_ERR_SERVER_LIMITS_EXCEEDED. The WBEM Server " - "limits have been exceeded (e.g. memory, connections, ...).\n" - "28 - CIM_ERR_SERVER_IS_SHUTTING_DOWN. The WBEM Server is " - "shutting down.\n" - "29 - CIM_ERR_QUERY_FEATURE_NOT_SUPPORTED. The specified " - "Query Feature is not supported." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "14", "15", "16", "17", "18", "19", - "20", "21", "22", "23", "24", "25", "26", "27", "28", - "29", ".." }, - Values { "CIM_ERR_FAILED", "CIM_ERR_ACCESS_DENIED", - "CIM_ERR_INVALID_NAMESPACE", "CIM_ERR_INVALID_PARAMETER", - "CIM_ERR_INVALID_CLASS", "CIM_ERR_NOT_FOUND", - "CIM_ERR_NOT_SUPPORTED", "CIM_ERR_CLASS_HAS_CHILDREN", - "CIM_ERR_CLASS_HAS_INSTANCES", - "CIM_ERR_INVALID_SUPERCLASS", "CIM_ERR_ALREADY_EXISTS", - "CIM_ERR_NO_SUCH_PROPERTY", "CIM_ERR_TYPE_MISMATCH", - "CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED", - "CIM_ERR_INVALID_QUERY", "CIM_ERR_METHOD_NOT_AVAILABLE", - "CIM_ERR_METHOD_NOT_FOUND", "CIM_ERR_UNEXPECTED_RESPONSE", - "CIM_ERR_INVALID_RESPONSE_DESTINATION", - "CIM_ERR_NAMESPACE_NOT_EMPTY", - "CIM_ERR_INVALID_ENUMERATION_CONTEXT", - "CIM_ERR_INVALID_OPERATION_TIMEOUT", - "CIM_ERR_PULL_HAS_BEEN_ABANDONED", - "CIM_ERR_PULL_CANNOT_BE_ABANDONED", - "CIM_ERR_FILTERED_ENUMERATION_NOT_SUPPORTED", - "CIM_ERR_CONTINUATION_ON_ERROR_NOT_SUPPORTED", - "CIM_ERR_SERVER_LIMITS_EXCEEDED", - "CIM_ERR_SERVER_IS_SHUTTING_DOWN", - "CIM_ERR_QUERY_FEATURE_NOT_SUPPORTED", "DMTF Reserved" }, - MappingStrings { "DSP0201.DMTF|ERROR.CODE|2.3", - "DSP0200.DMTF|CIMError|1.3" }, - ModelCorrespondence { "CIM_Error.CIMStatusCodeDescription" }] - uint32 CIMStatusCode; - - [Description ( - "A free-form string containing a human-readable " - "description of CIMStatusCode. This description MAY " - "extend, but MUST be consistent with, the definition of " - "CIMStatusCode." ), - MappingStrings { "DSP0201.DMTF|ERROR.DESCRIPTION|2.3", - "DSP0200.DMTF|CIMError|1.3" }, - ModelCorrespondence { "CIM_Error.CIMStatusCode" }] - string CIMStatusCodeDescription; - - -}; diff --git a/build/vendor/dmtf_mof/Interop/CIM_IdentificationOfManagedSystem.mof b/build/vendor/dmtf_mof/Interop/CIM_IdentificationOfManagedSystem.mof deleted file mode 100644 index baff6646..00000000 --- a/build/vendor/dmtf_mof/Interop/CIM_IdentificationOfManagedSystem.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Interop" ), - Description ( - "IdentificationOfManagedSystem is an association that links the " - "SystemIdentification object to the CIM_System(s) that are " - "being identified and represented in the Namespace." )] -class CIM_IdentificationOfManagedSystem : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The System which is identified." )] - CIM_System REF Antecedent; - - [Override ( "Dependent" ), - Max ( 1 ), - Description ( "The SystemIdentification information." )] - CIM_SystemIdentification REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Interop/CIM_Namespace.mof b/build/vendor/dmtf_mof/Interop/CIM_Namespace.mof deleted file mode 100644 index 9836af1e..00000000 --- a/build/vendor/dmtf_mof/Interop/CIM_Namespace.mof +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Interop" ), - Description ( - "Namespace provides a domain (in other words, a container), in " - "which the instances [of a class] are guaranteed to be unique " - "per the KEY qualifier definitions. It is named relative to the " - "CIM_ObjectManager implementation that provides such a domain." )] -class CIM_Namespace : CIM_ManagedElement { - - [Key, Description ( "The scoping System\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_ObjectManager.SystemCreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The scoping System\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_ObjectManager.SystemName" )] - string SystemName; - - [Key, Description ( - "The scoping ObjectManager\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_ObjectManager.CreationClassName" )] - string ObjectManagerCreationClassName; - - [Key, Description ( "The scoping ObjectManager\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_ObjectManager.Name" )] - string ObjectManagerName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Description ( - "A string to uniquely identify the Namespace within the " - "ObjectManager." ), - MaxLen ( 256 )] - string Name; - - [Deprecated { "CIM_Namespace.ClassType" }, - Required, Write, Description ( - "Enumeration indicating the organization/schema of the " - "Namespace\'s objects. For example, they may be instances " - "of classes of a specific CIM version." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "200", "201", "202" }, - Values { "Unknown", "Other", "CIM 1.0", "CIM 2.0", "CIM 2.1", - "CIM 2.2", "CIM 2.3", "CIM 2.4", "CIM 2.5", "CIM 2.6", - "CIM 2.7", "CIM 2.8", "DMI Recast", "SNMP Recast", - "CMIP Recast" }, - ModelCorrespondence { "CIM_Namespace.DescriptionOfClassInfo" }] - uint16 ClassInfo; - - [Deprecated { "CIM_Namespace.DescriptionOfClassType" }, - Write, Description ( - "A string providing more detail (beyond the general " - "classification in ClassInfo) for the object hierarchy of " - "the Namespace." ), - ModelCorrespondence { "CIM_Namespace.ClassInfo" }] - string DescriptionOfClassInfo; - - [Write, Description ( - "Enumeration indicating the schema of the Namespace\'s " - "objects. For example, they may be instances of classes " - "of a specific CIM version or a mapping from another " - "standard, such as SNMP. If \'Other\' is selected, the " - "DescriptionOfClassType property MUST be populated." ), - ValueMap { "0", "1", "2", "200", "201", "202" }, - Values { "Unknown", "Other", "CIM", "DMI Recast", - "SNMP Recast", "CMIP Recast" }, - ModelCorrespondence { "CIM_Namespace.DescriptionOfClassType", - "CIM_Namespace.ClassTypeVersion" }] - uint16 ClassType; - - [Write, Description ( - "The version of the objects in this namespace. The string " - "representing the version MUST be in the form: \n" - "M + \".\" + N + \".\" + U \n" - "Where: \n" - "M - The major version (in numeric form) \n" - "N - The minor version (in numeric form) \n" - "U - The update (e.g. errata, patch, ..., in numeric " - "form)" ), - ModelCorrespondence { "CIM_Namespace.DescriptionOfClassType", - "CIM_Namespace.ClassType" }] - string ClassTypeVersion; - - [Write, Description ( - "A string providing more detail (beyond the general " - "classification in ClassInfo) for the object hierarchy of " - "the Namespace." ), - ModelCorrespondence { "CIM_Namespace.ClassType", - "CIM_Namespace.ClassTypeVersion" }] - string DescriptionOfClassType; - - -}; diff --git a/build/vendor/dmtf_mof/Interop/CIM_NamespaceInManager.mof b/build/vendor/dmtf_mof/Interop/CIM_NamespaceInManager.mof deleted file mode 100644 index b25936d3..00000000 --- a/build/vendor/dmtf_mof/Interop/CIM_NamespaceInManager.mof +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Interop" ), - Description ( - "NamespaceInManager is an association describing the Namespaces " - "hosted by a CIM ObjectManager." )] -class CIM_NamespaceInManager : CIM_HostedDependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The ObjectManager containing a Namespace." )] - CIM_ObjectManager REF Antecedent; - - [Override ( "Dependent" ), - Weak, Description ( "The Namespace in an ObjectManager." )] - CIM_Namespace REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Interop/CIM_ObjectManager.mof b/build/vendor/dmtf_mof/Interop/CIM_ObjectManager.mof deleted file mode 100644 index 8f42d1be..00000000 --- a/build/vendor/dmtf_mof/Interop/CIM_ObjectManager.mof +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Interop" ), - Description ( - "A type of CIM_Service that defines the capabilities of the CIM " - "Server in which this ObjectManager class resides. Details " - "related to communicating with the ObjectManager, and the " - "Manager\'s basic capabilities, are stored in instances of the " - "associated CommunicationMechanism class available through the " - "CommMechanismForManager association. It is assumed that Basic " - "Read operations must be supported by all ObjectManager\'s in " - "order to retrieve any additional detail." )] -class CIM_ObjectManager : CIM_WBEMService { - - [Write, Description ( - "The GatherStatisticalData property is used to control " - "the gathering of statistical data made accessible " - "through the CIM_CIMOMStatisticalData objects. If set to " - "true, the data is gathered and can be accessed. If " - "false, the CIM_CIMOMStatisticalData instance MAY exist " - "but MUST show zero values for the counter properties." )] - boolean GatherStatisticalData = true; - - [Override ( "Name" ), - Description ( - "The Name property is used to uniquely identify a CIM " - "Server. The CIM Server MUST ensure that this value is " - "globally unique. In order to ensure uniqueness, this " - "value SHOULD be constructed in the following manner. " - ": \n" - " MUST include a copyrighted, trademarked or " - "otherwise unique name that is owned by the business " - "entity or a registered ID that is assigned to the " - "business entity that is defining the Name. (This is " - "similar to the _ structure of " - "Schema class names.) The purpose of is to " - "ensure that is truly unique across multiple vendor " - "implementations. If such a name is not used, the " - "defining entity MUST assure that the portion of the " - "Instance ID is unique when compared with other instance " - "providers. For DMTF defined instances, the " - "is \'CIM\'. \n" - " MUST include a vendor specified unique " - "identifier. \n" - "Note: Name is semantically the same as InstanceID. In " - "the next major version of the CIM Schema, Name will be " - "renamed to InstanceID and become the only key of this " - "class." )] - string Name; - - [Override ( "ElementName" ), - Description ( - "The ElementName property is used as a name of the CIM " - "Server for human interfaces. For example, \"ACME CIM " - "Server\"). This property is required to support the SLP " - "discovery mechanism. In the next major release this " - "property MAY include the required qualifier." )] - string ElementName; - - [Override ( "Description" ), - Description ( - "The description property is used as a description of the " - "CIM Server for human interfaces. For example, \" ACME " - "CIM Server version 2.2\"). This property is required to " - "support the SLP discovery mechanism. In the next major " - "release this property MAY include the required " - "qualifier." )] - string Description; - - -}; diff --git a/build/vendor/dmtf_mof/Interop/CIM_ObjectManagerAdapter.mof b/build/vendor/dmtf_mof/Interop/CIM_ObjectManagerAdapter.mof deleted file mode 100644 index 9315cf19..00000000 --- a/build/vendor/dmtf_mof/Interop/CIM_ObjectManagerAdapter.mof +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Interop" ), - Description ( - "A ObjectManagerAdapter is a Service of the CIM Object Manager. " - "An adapter can be any service of the Object Manager that needs " - "to be managed (e.g. started, stopped, monitored, ...). There " - "MUST be an instance for each Adapter type." )] -class CIM_ObjectManagerAdapter : CIM_WBEMService { - - [Override ( "Name" ), - Description ( - "A human-readable name that uniquely identifies the " - "ObjectManager within a system." )] - string Name; - - [Override ( "ElementName" ), - Description ( - "The ElmentName property is used as a name of the Object " - "Manager Adapter for human interfaces. For example, \"ACME " - "ObjectManager Adapter\"." )] - string ElementName; - - [Required, Description ( - "An implementation specific string that identifies the " - "handle to the Object Manager Adapter." )] - string Handle; - - [Required, Description ( - "AdapterType enumerates the kind of Object Manager " - "Adapter. If \'Other\' is specified, the " - "OtherAdapterTypeDescription property MUST be populated. \n" - "Other - If the adapter does not fit into one of the " - "other catagories in the list. If specified, the " - "OtherAdapterTypeDescription property MUST be populated. \n" - "Client - A client side adapter that responds to client " - "operation requests, such as CIM-XML or CIM-SOAP. \n" - "Provider - A provider adapter, such as DMI, SNMP, JSR48 " - "or CMPI. \n" - "Indication Handler - An Indication Handler is a service " - "that delivers indications to a subscriber. Examples of " - "possible Indication Handlers are CIM-XML, CIM-SOAP, SMPT " - "(e-mail) or any other delivery mechanism. \n" - "Repository - A repository is an adapter that can " - "store/retrieve persistent data, such as CIM Qualifier " - "Types, CIM Classes and CIM Instances. An Object Manager " - "could use multiple repositiories at one time, for " - "example one could be used for CIM Schema information " - "only, while another is used for instance information. " - "Repositories MAY be remote or local to the CIM Object " - "Manager. Examples of repository implementations could be " - "databases, LDAP or files." ), - ValueMap { "1", "2", "3", "4", "5" }, - Values { "Other", "Client", "Provider", "Indication Handler", - "Repository" }, - ModelCorrespondence { - "CIM_ObjectManagerAdapter.OtherAdapterTypeDescription" }] - uint16 AdapterType; - - [Description ( - "The type(s) of ObjectManagerAdapter when \"Other\" is " - "included in ObjectManagerAdapterType property." ), - ModelCorrespondence { "CIM_ObjectManagerAdapter.AdapterType" }] - string OtherAdapterTypeDescription; - - -}; diff --git a/build/vendor/dmtf_mof/Interop/CIM_ObjectManagerCommunicationMechanism.mof b/build/vendor/dmtf_mof/Interop/CIM_ObjectManagerCommunicationMechanism.mof deleted file mode 100644 index 7c622688..00000000 --- a/build/vendor/dmtf_mof/Interop/CIM_ObjectManagerCommunicationMechanism.mof +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.13.0" ), - UMLPackagePath ( "CIM::Interop" ), - Description ( - "The class, ObjectManagerCommunicationMechanism, describes " - "access to an ObjectManager. It describes a protocol and data " - "encoding that can be used for communication. When all " - "instances of this class are enumerated for an ObjectManager " - "(using the CommMechanismForManager association), all possible " - "protocol and encoding schemes will be known. Also, specific " - "capabilities (for example, basic read or query) that are " - "supported in the protocol/encoding are described - using the " - "ProfilesSupported property." )] -class CIM_ObjectManagerCommunicationMechanism : CIM_ServiceAccessPoint { - - [Required, Description ( - "CommunicationMechanism describes an encoding and " - "protocol which can be used to communicate with the " - "server. ObjectManager, the specified string should be " - "indicated. If Other is used, the value " - "forOtherCommunicationMechanismDescription must not be " - "null." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "CIM-XML", "SM-CLP", - "WS-Management", "WSDM" }, - ModelCorrespondence { - "CIM_ObjectManagerCommunicationMechanism.OtherCommunicationMechanismDescription" }] - uint16 CommunicationMechanism; - - [Description ( - "A free-form string providing a description of the " - "supported protocols when 1, \"Other\", is specified in " - "the CommunicationMechanism." ), - ModelCorrespondence { - "CIM_ObjectManagerCommunicationMechanism.CommunicationMechanism" }] - string OtherCommunicationMechanismDescription; - - [Required, Description ( - "Enumerated array describing the types of operations " - "supported by the ObjectManager, using this " - "encoding/protocol. The enumeration is based on the " - "Functional Profiles defined for conformance in the DMTF " - "document, Specification for CIM Operations over HTTP." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12" }, - Values { "Unknown", "Other", "Basic Read", "Basic Write", - "Schema Manipulation", "Instance Manipulation", - "Association Traversal", "Query Execution", - "Qualifier Declaration", "Indications", "Pulled Read", - "Pulled Read Count", "Pulled Query Execution" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_ObjectManagerCommunicationMechanism.FunctionalProfileDescriptions" }] - uint16 FunctionalProfilesSupported[]; - - [Description ( - "Free-form strings providing descriptions of the " - "supported operations of the object manager. Entries in " - "the array are correlated with those in the " - "ProfilesSupported array. An entry in this Descriptions " - "array MUST be provided when 1, \"Other\", is specified " - "in the FunctionalProfilesSupported array." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_ObjectManagerCommunicationMechanism.FunctionalProfilesSupported" }] - string FunctionalProfileDescriptions[]; - - [Required, Description ( - "Boolean indicating whether the ObjectManager supports " - "multiple operation requests (TRUE) or only simple " - "requests (FALSE)." )] - boolean MultipleOperationsSupported; - - [Required, Description ( - "Enumerated array describing the types of authentication " - "supported by the ObjectManager, using the " - "encoding/protocol. specified in the property, " - "CommunicationMechanism. The defined values represent the " - "authentication defined in the DMTF document, " - "Specification for CIM Operations over HTTP." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "None", "Basic", "Digest" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_ObjectManagerCommunicationMechanism.AuthenticationMechanismDescriptions" }] - uint16 AuthenticationMechanismsSupported[]; - - [Description ( - "Free-form strings providing descriptions of the " - "supported mechanisms. Entries in this array are " - "correlated with those in the " - "AuthenticationMechanismsSupported array. An entry in " - "this Descriptions array MUST be provided when 1, " - "\"Other\", is specified in " - "AuthenticationMechanismsSupported." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_ObjectManagerCommunicationMechanism.AuthenticationMechanismsSupported" }] - string AuthenticationMechanismDescriptions[]; - - [Required, Description ( - "Provides the protocol version for this service access " - "point. Version information MUST be in the form of M.N, " - "where M is a numeric that describes the Major version " - "and N is a numeric that describes the minor version." )] - string Version; - - [Required, Description ( - "This property signifies the advertisement for this " - "access point. . It is used by the advertising services " - "of the WBEM infrastructure to determine what should be " - "advertised, via what mechanisms. The property is an " - "array so that the communicationMechansim MAY be " - "advertised using several mechanisms. Note: If this " - "property is null/uninitialized, this is equivalent to " - "specifying the value 2, \"Not Advertised\"." ), - ValueMap { "1", "2", "3" }, - Values { "Other", "Not Advertised", "SLP" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_ObjectManagerCommunicationMechanism.AdvertiseTypeDescriptions" }] - uint16 AdvertiseTypes[]; - - [Description ( - "A free-form string providing additional information " - "related to the AdvertiseType. A description MUST be " - "provided when the AdvertiseType is 1, \"Other\". An " - "entry in this array corresponds to the entry in the " - "AdvertiseTypes array at the same index. It is not " - "expected that additional descriptions are needed if the " - "Type is set to \"Not Advertised\" or \"SLP\". However, " - "as the SLP template expands, or as other advertisement " - "mechanisms are defined, support for additional " - "descriptions may be needed. This array is defined to " - "support this." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_ObjectManagerCommunicationMechanism.AdvertiseTypes" }] - string AdvertiseTypeDescriptions[]; - - -}; diff --git a/build/vendor/dmtf_mof/Interop/CIM_ProtocolAdapter.mof b/build/vendor/dmtf_mof/Interop/CIM_ProtocolAdapter.mof deleted file mode 100644 index 1d252788..00000000 --- a/build/vendor/dmtf_mof/Interop/CIM_ProtocolAdapter.mof +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Deprecated { "CIM_ObjectManagerAdapter" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Interop" ), - Description ( - "CIM_ProtocolAdapter is deprecated in lieu of " - "CIM_ObjectManagerAdapter. Since the CIM_ProtocolAdapter class " - "does not have to support the protocols and can be any type of " - "adapter, it was decided to change the name to " - "ObjectManagerAdapter to better reflect the true meaning of the " - "class. A ProtocolAdapter is a Service of the CIM Object " - "Manager. It is responsible for accepting incoming requests on " - "a particular protocol, and translating and forwarding the " - "request to the CIM Object Manager. It is also responsible for " - "translating and sending the response from the CIM Object " - "Manager." )] -class CIM_ProtocolAdapter : CIM_WBEMService { - - [Deprecated { "CIM_ObjectManagerAdapter.Name" }, - Override ( "Name" ), - Description ( - "A human-readable name that uniquely identifies the " - "Protocol Adapter within a system." )] - string Name; - - [Deprecated { "CIM_ObjectManagerAdapter.Handle" }, - Required, Description ( - "An implementation specific string that identifies the " - "handle to the ProtocolAdapter." )] - string Handle; - - [Deprecated { "CIM_ObjectManagerAdapter.AdapterType" }, - Required, Description ( - "ProtocolAdapterType enumerates the kind of Protocol Adapter." - ), - ValueMap { "1", "2", "3" }, - Values { "Other", "Client", "Provider" }, - ModelCorrespondence { - "CIM_ProtocolAdapter.OtherProtocolAdapterType" }] - uint16 ProtocolAdapterType; - - [Deprecated { - "CIM_ObjectManagerAdapter.OtherAdapterTypeDescription" }, - Description ( - "The type(s) of ProtocolAdapter when \"Other\" is " - "included in ProtocolAdapterType property." ), - ModelCorrespondence { - "CIM_ProtocolAdapter.ProtocolAdapterType" }] - string OtherProtocolAdapterType; - - -}; diff --git a/build/vendor/dmtf_mof/Interop/CIM_ReferencedProfile.mof b/build/vendor/dmtf_mof/Interop/CIM_ReferencedProfile.mof deleted file mode 100644 index 8a475848..00000000 --- a/build/vendor/dmtf_mof/Interop/CIM_ReferencedProfile.mof +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Interop" ), - Description ( - "A profile that is referenced by another RegisteredProfile." )] -class CIM_ReferencedProfile : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "The RegisteredProfile that is referenced by the Dependent Profile." - )] - CIM_RegisteredProfile REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "A RegisteredProfile that references other profiles." )] - CIM_RegisteredProfile REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Interop/CIM_RegisteredProfile.mof b/build/vendor/dmtf_mof/Interop/CIM_RegisteredProfile.mof deleted file mode 100644 index 7117f1f8..00000000 --- a/build/vendor/dmtf_mof/Interop/CIM_RegisteredProfile.mof +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Interop" ), - Description ( - "A RegisteredProfile describes a set of CIM Schema classes with " - "required properties and/or methods, necessary to manage a " - "real-world entity or to support a usage scenario, in an " - "interoperable fashion. RegisteredProfiles can be defined by " - "the DMTF or other standards organizations. Note that this " - "class should not be confused with CIM_Profile, which collects " - "SettingData instances, to be applied as a \'configuration " - "profile\' for an element. \n" - "A RegisteredProfile is a named \'standard\' for CIM-based " - "management of a particular System, subsystem, Service or other " - "entity, for a specified set of uses. It is a complete, " - "standalone definition, as opposed to the subclass " - "RegisteredSubProfile, which requires a scoping profile for " - "context. \n" - "The uses for a RegisteredProfile or SubProfile MUST be " - "specified in the document that defines the profile. Examples " - "of Profiles are to manage various aspects of an Operating " - "System, Storage Array, or Database. The name of the profile is " - "defined and scoped by its authoring organization." )] -class CIM_RegisteredProfile : CIM_ManagedElement { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. In order to ensure uniqueness within the " - "NameSpace, the value of InstanceID SHOULD be constructed " - "using the following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon " - "\':\', and where MUST include a copyrighted, " - "trademarked or otherwise unique name that is owned by " - "the business entity creating/defining the InstanceID, or " - "is a registered ID that is assigned to the business " - "entity by a recognized global authority. (This is " - "similar to the _ structure of " - "Schema class names.) In addition, to ensure uniqueness, " - " MUST NOT contain a colon (\':\'). When using " - "this algorithm, the first colon to appear in InstanceID " - "MUST appear between and . \n" - " is chosen by the organizational entity and " - "SHOULD not be re-used to identify different underlying " - "(real-world) elements. If the above \'preferred\' " - "algorithm is not used, the defining entity MUST assure " - "that the resultant InstanceID is not re-used across any " - "InstanceIDs produced by this or other providers for this " - "instance\'s NameSpace. \n" - "For DMTF defined instances, the \'preferred\' algorithm " - "MUST be used with the set to \'CIM\'." )] - string InstanceID; - - [Required, Description ( - "The organization that defines this profile." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "14", "15", "16", "17", "18", "19", - "20", "21", ".." }, - Values { "Other", "DMTF", "CompTIA", - "Consortium for Service Innovation", "FAST", "GGF", - "INTAP", "itSMF", "NAC", - //10 - "Northwest Energy Efficiency Alliance", - "SNIA", "TM Forum", "The Open Group", "ANSI", "IEEE", - "IETF", "INCITS", "ISO", "W3C", //20 - "OGF", - "The Green Grid", "DMTF Reserved" }, - ModelCorrespondence { - "CIM_RegisteredProfile.OtherRegisteredOrganization" }] - uint16 RegisteredOrganization; - - [Description ( - "A free-form string providing a description of the " - "organization when 1, \"Other\", is specified for the " - "RegisteredOrganization." ), - MaxLen ( 256 ), - ModelCorrespondence { - "CIM_RegisteredProfile.RegisteredOrganization" }] - string OtherRegisteredOrganization; - - [Required, Description ( - "The name of this registered profile. Since multiple " - "versions can exist for the same RegisteredName, the " - "combination of RegisteredName, RegisteredOrganization, " - "and RegisteredVersion MUST uniquely identify the " - "registered profile within the scope of the organization." ), - MaxLen ( 256 )] - string RegisteredName; - - [Required, Description ( - "The version of this profile. The string representing the " - "version MUST be in the form: \n" - "M + \".\" + N + \".\" + U \n" - "Where: \n" - "M - The major version (in numeric form) describing the " - "profile\'s creation or last modification. \n" - "N - The minor version (in numeric form) describing the " - "profile\'s creation or last modification. \n" - "U - The update (e.g. errata, patch, ..., in numeric " - "form) describing the profile\'s creation or last " - "modification." )] - string RegisteredVersion; - - [Required, Description ( - "This property signifies the advertisement for the " - "profile information. It is used by the advertising " - "services of the WBEM infrastructure to determine what " - "should be advertised, via what mechanisms. The property " - "is an array so that the profile MAY be advertised using " - "several mechanisms. Note: If this property is " - "null/uninitialized, this is equivalent to specifying the " - "value 2, \"Not Advertised\"." ), - ValueMap { "1", "2", "3" }, - Values { "Other", "Not Advertised", "SLP" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_RegisteredProfile.AdvertiseTypeDescriptions" }] - uint16 AdvertiseTypes[]; - - [Description ( - "A free-form string providing additional information " - "related to the AdvertiseType. A description MUST be " - "provided when the AdvertiseType is 1, \"Other\". An " - "entry in this array corresponds to the entry in the " - "AdvertiseTypes array at the same index. It is not " - "expected that additional descriptions are needed if the " - "Type is set to \"Not Advertised\" or \"SLP\". However, " - "as the SLP template expands, or as other advertisement " - "mechanisms are defined, support for additional " - "descriptions may be needed. This array is defined to " - "support this." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_RegisteredProfile.AdvertiseTypes" }] - string AdvertiseTypeDescriptions[]; - - -}; diff --git a/build/vendor/dmtf_mof/Interop/CIM_RegisteredSubProfile.mof b/build/vendor/dmtf_mof/Interop/CIM_RegisteredSubProfile.mof deleted file mode 100644 index ed125955..00000000 --- a/build/vendor/dmtf_mof/Interop/CIM_RegisteredSubProfile.mof +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Interop" ), - Description ( - "A RegisteredSubProfile subclasses RegisteredProfile to " - "indicate that a scoping profile is required to provide " - "context. The latter is specified by the mandatory association, " - "SubProfileRequiresProfile." )] -class CIM_RegisteredSubProfile : CIM_RegisteredProfile { - - -}; diff --git a/build/vendor/dmtf_mof/Interop/CIM_SubProfileRequiresProfile.mof b/build/vendor/dmtf_mof/Interop/CIM_SubProfileRequiresProfile.mof deleted file mode 100644 index 5ffad664..00000000 --- a/build/vendor/dmtf_mof/Interop/CIM_SubProfileRequiresProfile.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Interop" ), - Description ( - "A subprofile requires another RegisteredProfile for context. " - "This association mandates the scoping relationship between a " - "subprofile and its scoping profile." )] -class CIM_SubProfileRequiresProfile : CIM_ReferencedProfile { - - [Override ( "Antecedent" ), - Min ( 1 ), - Description ( - "The RegisteredProfile that is referenced/required by the " - "subprofile." )] - CIM_RegisteredProfile REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "A RegisteredSubProfile that requires a scoping profile, " - "for context." )] - CIM_RegisteredSubProfile REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Interop/CIM_SystemIdentification.mof b/build/vendor/dmtf_mof/Interop/CIM_SystemIdentification.mof deleted file mode 100644 index ad0b0144..00000000 --- a/build/vendor/dmtf_mof/Interop/CIM_SystemIdentification.mof +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Interop" ), - Description ( - "A Namespace may represent data for one or many systems, that " - "are local, remote (different than the system on which the " - "ObjectManager is running) or aggregated. The System " - "Identification class provides enough data to identify the " - "system(s) represented in the Namespace. It is weak to the " - "Namespace." )] -class CIM_SystemIdentification : CIM_ManagedElement { - - [Key, Description ( "The scoping System\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_Namespace.SystemCreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The scoping System\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_Namespace.SystemName" )] - string SystemName; - - [Key, Description ( - "The scoping ObjectManager\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_Namespace.ObjectManagerCreationClassName" )] - string ObjectManagerCreationClassName; - - [Key, Description ( "The scoping ObjectManager\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_Namespace.ObjectManagerName" )] - string ObjectManagerName; - - [Key, Description ( - "The scoping Namespace\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_Namespace.CreationClassName" )] - string NamespaceCreationClassName; - - [Key, Description ( "The scoping Namespace\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_Namespace.Name" )] - string NamespaceName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Description ( - "A string uniquely identifying the name of the system " - "represented in the Namespace." ), - MaxLen ( 256 )] - string Name; - - [Required, Write, Description ( - "Enumeration indicating the format of the system " - "identification and/or addressing information." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11" }, - Values { "Unknown", "Other", "Short DNS Name", - "Fully qualified DNS Name", "Windows Domain Name", - "NetWare Server Name", "Unix Hostname", - "Globally Unique System Identifier", "IP Address", - "Modem Dialup String", "MAC Address", "IPMI Address" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_SystemIdentification.IdentificationData", - "CIM_SystemIdentification.FormatDescriptions" }] - uint16 IdentificationFormats[]; - - [Write, Description ( - "Strings further describing the format of the system " - "identification information." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_SystemIdentification.IdentificationFormats", - "CIM_SystemIdentification.IdentificationData" }] - string FormatDescriptions[]; - - [Write, Description ( - "Strings containing the system identification " - "information. The format is described by the " - "corresponding array item in IdentificationFormats." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_SystemIdentification.IdentificationFormats", - "CIM_SystemIdentification.FormatDescriptions" }] - string IdentificationData[]; - - -}; diff --git a/build/vendor/dmtf_mof/Interop/CIM_SystemInNamespace.mof b/build/vendor/dmtf_mof/Interop/CIM_SystemInNamespace.mof deleted file mode 100644 index b9743eee..00000000 --- a/build/vendor/dmtf_mof/Interop/CIM_SystemInNamespace.mof +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Interop" ), - Description ( - "SystemInNamespace is an association that allows enumeration of " - "the system(s) represented in a Namespace." )] -class CIM_SystemInNamespace { - - [Key, Min ( 1 ), - Max ( 1 ), - Description ( - "The Namespace containing management objects from one or " - "more systems." )] - CIM_Namespace REF ManagedNamespace; - - [Key, Weak, Description ( - "Identification information for systems in the Namespace." )] - CIM_SystemIdentification REF Identification; - - [Required, Write, Description ( - "A list of enumerated values providing a high level " - "description of the data contained and allowed in the " - "Namespace. Additional clarification is provided in the " - "DescriptionOfContainedData array." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "Local System Data", - "Data Aggregated from Multiple Systems", "Proxied Data" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_SystemInNamespace.DescriptionOfContainedData" }] - uint16 ScopeOfContainedData[]; - - [Write, Description ( - "An array of free-form strings providing more detailed " - "explanations for the data/objects contained in the " - "Namespace, as described by the ContainedData array. " - "Note, each entry of this array is related to the entry " - "in the ContainedData array that is located at the same " - "index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_SystemInNamespace.ScopeOfContainedData" }] - string DescriptionOfContainedData[]; - - -}; diff --git a/build/vendor/dmtf_mof/Interop/CIM_WBEMService.mof b/build/vendor/dmtf_mof/Interop/CIM_WBEMService.mof deleted file mode 100644 index 99f1f61a..00000000 --- a/build/vendor/dmtf_mof/Interop/CIM_WBEMService.mof +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Abstract, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Interop" ), - Description ( - "An abstract class for WBEM services such as the ObjectManager " - "(CIM Server), Providers, protocol adapters, or other pluggable " - "components. A type of CIM_Service that provides associated " - "capabilities and details about the communication capabilities, " - "namespaces, etc. for a specific WBEMService." )] -class CIM_WBEMService : CIM_Service { - - -}; diff --git a/build/vendor/dmtf_mof/Metrics/CIM_AggregationMetricDefinition.mof b/build/vendor/dmtf_mof/Metrics/CIM_AggregationMetricDefinition.mof deleted file mode 100644 index 8db1637c..00000000 --- a/build/vendor/dmtf_mof/Metrics/CIM_AggregationMetricDefinition.mof +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Metrics::BaseMetric" ), - Description ( - "CIM_AggregationMetricDefinition represents the definitional " - "aspects of a metric that is derived from another metric value. " - "The CIM_AggregationMetricDefinition should be associated with " - "the CIM_ManagedElement(s) to which it applies." )] -class CIM_AggregationMetricDefinition : CIM_BaseMetricDefinition { - - [Override ( "ChangeType" ), - Description ( - "ChangeType indicates how the metric value changes, in " - "the form of typical combinations of finer grain " - "attributes such as direction change, minimum and maximum " - "values, and wrapping semantics. \n" - "5=\"Simple Function\": indicates that the derived metric " - "value is calculated by applying the basic mathematical " - "function identified by the SimpleFunction property to " - "the underlying metric values." ), - ValueMap { "5", "..", "32768..65535" }, - Values { "Simple Function", "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { - "CIM_AggregationMetricDefinition.IsContinuous" }] - uint16 ChangeType = 5; - - [Description ( - "The SimpleFunction property identifies the basic " - "computation performed on an underlying metric to arrive " - "at the value of this derived metric. This property shall " - "be NULL when the ChangeType property has a value other " - "than 5 \"Simple Function\". \n" - "2=\"Minimum\" indicates that the metric reports the " - "lowest value detected for the associated monitored " - "entity. This is also known as a low watermark.\n" - ".3=\"Maximum\" indicates that the metric reports the " - "maximum value detected for the associated monitored " - "entity. This is also known as a high watermark.\n" - "4=\"Average\" indicates the metric reports the average " - "value of the underlying metric values.\n" - "5=\"Median\" indicates the metric reports the median " - "value of the underlying metric values.\n" - "6=\"Mode\" indicates the metric reports the modal value " - "of the underlying metric values." ), - ValueMap { "..", "2", "3", "4", "5", "6", "32768..65535" }, - Values { "DMTF Reserved", "Minimum", "Maximum", "Average", - "Median", "Mode", "Vendor Reserved" }] - uint16 SimpleFunction; - - -}; diff --git a/build/vendor/dmtf_mof/Metrics/CIM_AggregationMetricValue.mof b/build/vendor/dmtf_mof/Metrics/CIM_AggregationMetricValue.mof deleted file mode 100644 index a4411f6f..00000000 --- a/build/vendor/dmtf_mof/Metrics/CIM_AggregationMetricValue.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Metrics::BaseMetric" ), - Description ( - "Each CIM_AggregationMetricValue object represents the instance " - "value of a metric defined by an instance of " - "CIM_AggregationMetricDefinition. The properties inherited from " - "CIM_BaseMetricValue provide the actual metric value. The " - "properties introduced in CIM_AggregationMetricValue provide " - "information about the interval over which the aggregation " - "function was applied." )] -class CIM_AggregationMetricValue : CIM_BaseMetricValue { - - [Description ( - "Identifies the time when the aggregation function was " - "applied to determine the value of the metric instance. " - "Note that this is different from the time when the " - "instance is created. For a given " - "CIM_AggregationMetricValue instance, the " - "AggregationTimeStamp changes whenever the aggregation " - "function is applied to calculate the value." ), - ModelCorrespondence { "CIM_AggregationMetricValue.Duration" }] - datetime AggregationTimeStamp; - - [Description ( - "Property that represents the time duration over which " - "the aggregation was computed. The start of a monitoring " - "interval over which the aggregation function is applied " - "is determined by subtracting the AggregationDuration " - "from the AggregationTimestamp." ), - ModelCorrespondence { - "CIM_AggregationMetricValue.AggregationTimeStamp" }] - datetime AggregationDuration; - - -}; diff --git a/build/vendor/dmtf_mof/Metrics/CIM_BaseMetricDefinition.mof b/build/vendor/dmtf_mof/Metrics/CIM_BaseMetricDefinition.mof deleted file mode 100644 index 01486854..00000000 --- a/build/vendor/dmtf_mof/Metrics/CIM_BaseMetricDefinition.mof +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Metrics::BaseMetric" ), - Description ( - "CIM_BaseMetricDefinition represents the definitional aspects " - "of a metric, i.e., a definition template containing meta data " - "about a new metric. Since CIM_BaseMetricDefinition does not " - "capture metric instance information, it does not contain the " - "value of the metric. The associated class CIM_BaseMetricValue " - "holds the metric value and encapsulates its runtime behavior. " - "The purpose of CIM_BaseMetricDefinition is to provide a " - "convenient mechanism for introducing a new metric definition " - "at runtime and capturing its instance values in a separate " - "class. This mechanism is targeted specifically at CIM users " - "who would like to enhance existing CIM schemas by introducing " - "domain-specific metrics that are not captured in the existing " - "CIM schemas. In addition, vendors of managed resources may " - "make use of this mechanism if a small subset of a potentially " - "large and heterogeneous amount of performance-related data " - "needs to be exposed, based on the context in which the data is " - "captured. Additional meta data for a metric can be provided by " - "subclassing from CIM_BaseMetricDefinition. The " - "CIM_BaseMetricDefinition should be associated with the " - "CIM_ManagedElement(s) to which it applies." )] -class CIM_BaseMetricDefinition : CIM_ManagedElement { - - [Key, Description ( - "A string that uniquely identifies the metric definition. " - "The use of OSF UUID/GUIDs is recommended." )] - string Id; - - [Description ( - "The name of the metric. This name does not have to be " - "unique, but should be descriptive and may contain " - "blanks." )] - string Name; - - [Description ( - "The data type of the metric. For example, \"boolean\" " - "(value=1) or \"datetime\" (=3) may be specified. These " - "types represent the datatypes defined for CIM." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "14" }, - Values { "boolean", "char16", "datetime", "real32", "real64", - "sint16", "sint32", "sint64", "sint8", "string", "uint16", - "uint32", "uint64", "uint8" }] - uint16 DataType; - - [Description ( - "An enumerated value that describes the characteristics " - "of the metric, for purposes of performing calculations. " - "The property can take one of the following values: \n" - "1=\"Non-calculable\" -> a string. Arithmetic makes no " - "sense. \n" - "2=\"Summable\" -> It is reasonable to sum this value " - "over many instances of e.g., UnitOfWork, such as the " - "number of files processed in a backup job. For example, " - "if each backup job is a UnitOfWork, and each job backs " - "up 27,000 files on average, then it makes sense to say " - "that 100 backup jobs processed 2,700,000 files. \n" - "3=\"Non-summable\" -> It does not make sense to sum this " - "value over many instances of UnitOfWork. An example " - "would be a metric that measures the queue length when a " - "job arrives at a server. If each job is a UnitOfWork, " - "and the average queue length when each job arrives is " - "33, it does not make sense to say that the queue length " - "for 100 jobs is 3300. It does make sense to say that the " - "mean is 33." ), - ValueMap { "1", "2", "3" }, - Values { "Non-calculable", "Summable", "Non-summable" }] - uint16 Calculable; - - [Description ( - "Identifies the specific units of a value. Examples are " - "Bytes, Packets, Jobs, Files, Milliseconds, and Amps." )] - string Units; - - [Description ( - "Defines one or more strings that can be used to refine " - "(break down) queries against the BaseMetricValues along " - "a certain dimension. An example is a transaction name, " - "allowing the break down of the total value for all " - "transactions into a set of values, one for each " - "transaction name. Other examples might be application " - "system or user group name. The strings are free format " - "and should be meaningful to the end users of the metric " - "data. The strings indicate which break down dimensions " - "are supported for this metric definition, by the " - "underlying instrumentation." )] - string BreakdownDimensions[]; - - [Description ( - "IsContinuous indicates whether or not the metric value " - "is continuous or scalar. Performance metrics are an " - "example of a linear metric. Examples of non-linear " - "metrics include error codes or operational states. " - "Continuous metrics can be compared using the \"greater " - "than\" relation." )] - boolean IsContinuous; - - [Description ( - "ChangeType indicates how the metric value changes, in " - "the form of typical combinations of finer grain " - "attributes such as direction change, minimum and maximum " - "values, and wrapping semantics. \n" - "0=\"Unknown\": The metric designer did not qualify the " - "ChangeType. \n" - "2=\"N/A\": If the \"IsContinuous\" property is \"false\", " - "ChangeType does not make sense and MUST be is set to " - "\"N/A\". \n" - "3=\"Counter\": The metric is a counter metric. These " - "have non-negative integer values which increase " - "monotonically until reaching the maximum representable " - "number and then wrap around and start increasing from 0. " - "Such counters, also known as rollover counters, can be " - "used for instance to count the number of network errors " - "or the number of transactions processed. The only way " - "for a client application to keep track of wrap arounds " - "is to retrieve the value of the counter in appropriately " - "short intervals. \n" - "4=\"Gauge\": The metric is a gauge metric. These have " - "integer or float values that can increase and decrease " - "arbitrarily. A gauge MUST NOT wrap when reaching the " - "minimum or maximum representable number, instead, the " - "value \"sticks\" at that number. Minimum or maximum " - "values inside of the representable value range at which " - "the metric value \"sticks\", may or may not be defined. \n" - "Vendors may extend this property in the vendor reserved " - "range." ), - ValueMap { "0", "2", "3", "4", "5..32767", "32768..65535" }, - Values { "Unknown", "N/A", "Counter", "Gauge", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_BaseMetricDefinition.IsContinuous" }] - uint16 ChangeType; - - [Description ( - "TimeScope indicates the time scope to which the metric " - "value applies. \n" - "0=\"Unknown\" indicates the time scope was not qualified " - "by the metric designer, or is unknown to the provider. \n" - "2=\"Point\" indicates that the metric applies to a point " - "in time. On the corresponding BaseMetricValue instances, " - "TimeStamp specifies the point in time and Duration is " - "always 0. \n" - "3=\"Interval\" indicates that the metric applies to a " - "time interval. On the corresponding BaseMetricValue " - "instances, TimeStamp specifies the end of the time " - "interval and Duration specifies its duration. \n" - "4=\"StartupInterval\" indicates that the metric applies " - "to a time interval that began at the startup of the " - "measured resource (i.e. the ManagedElement associated by " - "MetricDefForMe). On the corresponding BaseMetricValue " - "instances, TimeStamp specifies the end of the time " - "interval. If Duration is 0, this indicates that the " - "startup time of the measured resource is unknown. Else, " - "Duration specifies the duration between startup of the " - "resource and TimeStamp." ), - ValueMap { "0", "2", "3", "4", "5..32767", "32768..65535" }, - Values { "Unknown", "Point", "Interval", "StartupInterval", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_BaseMetricValue.TimeStamp", - "CIM_BaseMetricValue.Duration" }] - uint16 TimeScope; - - [Description ( - "GatheringType indicates how the metric values are " - "gathered by the underlying instrumentation. This allows " - "the client application to choose the right metric for " - "the purpose. \n" - "0=\"Unknown\": Indicates that the GatheringType is not " - "known. \n" - "2=\"OnChange\": Indicates that the CIM metric values get " - "updated immediately when the values inside of the " - "measured resource change. The values of OnChange metrics " - "truly reflect the current situation within the resource " - "at any time. An example is the number of logged on users " - "that gets updated immediately as users log on and off. \n" - "3=\"Periodic\": Indicates that the CIM metric values get " - "updated periodically. For instance, to a client " - "application, a metric value applying to the current time " - "will appear constant during each gathering interval, and " - "then jumps to the new value at the end of each gathering " - "interval. \n" - "4=\"OnRequest\": Indicates that the CIM metric value is " - "determined each time a client application reads it. The " - "values of OnRequest metrics truly return the current " - "situation within the resource if somebody asks for it. " - "However, they do not change \"unobserved\", and " - "therefore subscribing for value changes of OnRequest " - "metrics is NOT RECOMMENDED." ), - ValueMap { "0", "2", "3", "4", "5..32767", "32768..65535" }, - Values { "Unknown", "OnChange", "Periodic", "OnRequest", - "DMTF Reserved", "Vendor Reserved" }] - uint16 GatheringType; - - [Description ( - "Identifies the specific units of a value. The value of " - "this property shall be a legal value of the Programmatic " - "Units qualifier as defined in Appendix C.1 of DSP0004 " - "V2.4 or later." )] - string ProgrammaticUnits; - - -}; diff --git a/build/vendor/dmtf_mof/Metrics/CIM_BaseMetricValue.mof b/build/vendor/dmtf_mof/Metrics/CIM_BaseMetricValue.mof deleted file mode 100644 index 9d53ddec..00000000 --- a/build/vendor/dmtf_mof/Metrics/CIM_BaseMetricValue.mof +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Metrics::BaseMetric" ), - Description ( - "Each CIM_BaseMetricValue object represents the instance value " - "of a metric. Since the gathering of metric information can " - "involve large quantities of information there may be many " - "instances of this class. The use of this class as an " - "instrumentation source may be inefficient unless the rate of " - "metrics are known. The length of time a CIM_BaseMetricValue " - "instance exists after the metric information is captured is " - "not defined and is implementation dependent. \n" - "Most metric data values change over time. There are two ways " - "of mapping this into CIM_BaseMetricValue objects: The value " - "for the next point in time may use the same object and just " - "change its properties (such as the value or timestamp), or the " - "existing objects remain unchanged and a new object is created " - "for the new point in time. The first method is typically used " - "for snapshot data and the second method for historical data. " - "Which method is used, is indicated by the Volatile property." )] -class CIM_BaseMetricValue : CIM_ManagedElement { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. In order to ensure uniqueness within the " - "NameSpace, the value of InstanceID SHOULD be constructed " - "using the following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon \':\', and where MUST " - "include a copyrighted, trademarked or otherwise unique " - "name that is owned by the business entity " - "creating/defining the InstanceID, or is a registered ID " - "that is assigned to the business entity by a recognized " - "global authority (This is similar to the _ structure of Schema class names.) In " - "addition, to ensure uniqueness MUST NOT contain a colon " - "(\':\'). When using this algorithm, the first colon to " - "appear in InstanceID MUST appear between and . \n" - "is chosen by the business entity and SHOULD not be " - "re-used to identify different underlying (real-world) " - "elements. If the above \'preferred\' algorithm is not " - "used, the defining entity MUST assure that the resultant " - "InstanceID is not re-used across any InstanceIDs " - "produced by this or other providers for this instance\'s " - "NameSpace. \n" - "For DMTF defined instances, the \'preferred\' algorithm " - "MUST be used with the set to \'CIM\'." )] - string InstanceID; - - [Required, Description ( - "The key of the BaseMetricDefinition instance for this " - "CIM_BaseMetricValue instance value." ), - ModelCorrespondence { "CIM_BaseMetricDefinition.Id" }] - string MetricDefinitionId; - - [Description ( - "A descriptive name for the element to which the metric " - "value belongs (i.e., the measured element). This " - "property is required by behavior if there is no " - "association defined to a ManagedElement, but may be used " - "in other cases to provide supplemental information. This " - "allows metrics to be captured independently of any " - "ManagedElement. An example is where a metric value " - "belongs to a combination of elements, such as the input " - "and output ports of the traffic in a switch. If there " - "are multiple ManagedElements associated with the metric " - "value, then usually there is one that naturally belongs " - "to the metric value and that one should be used to " - "create the supplemental information. The property is not " - "meant to be used as a foreign key to search on the " - "measured element. Instead, the association to the " - "ManagedElement should be used." )] - string MeasuredElementName; - - [Description ( - "Identifies the time when the value of a metric instance " - "is computed. Note that this is different from the time " - "when the instance is created. For a given " - "CIM_BaseMetricValue instance, the TimeStamp changes " - "whenever a new measurement snapshot is taken if Volatile " - "is true. A managmenet application may establish a time " - "series of metric data by retrieving the instances of " - "CIM_BaseMetricValue and sorting them according to their " - "TimeStamp." ), - ModelCorrespondence { "CIM_BaseMetricDefinition.TimeScope", - "CIM_BaseMetricValue.Duration" }] - datetime TimeStamp; - - [Description ( - "Property that represents the time duration over which " - "this metric value is valid. This property should not " - "exist for timestamps that apply only to a point in time " - "but should be defined for values that are considered " - "valid for a certain time period (ex. sampling). If the " - "\"Duration\" property exists and is nonNull, the " - "TimeStamp is to be considered the end of the interval." ), - ModelCorrespondence { "CIM_BaseMetricDefinition.TimeScope", - "CIM_BaseMetricValue.TimeStamp" }] - datetime Duration; - - [Required, Description ( - "The value of the metric represented as a string. Its " - "original data type is specified in " - "CIM_BaseMetricDefinition." )] - string MetricValue; - - [Description ( - "If present, specifies one BreakdownDimension from the " - "BreakdownDimensions array defined in the associated CIM_ " - "BaseMetricDefinition. This is the dimension along which " - "this set of metric values is broken down. For a " - "description of the concept, see the class " - "CIM_BaseMetricDefinition." )] - string BreakdownDimension; - - [Description ( - "Defines a value of the BreakdownDimension property " - "defined for this metric value instance. For instance, if " - "the BreakdownDimension is \"TransactionName\", this " - "property could name the actual transaction to which this " - "particular metric value applies." )] - string BreakdownValue; - - [Description ( - "If true, Volatile indicates that the value for the next " - "point in time may use the same object and just change " - "its properties (such as the value or timestamp). If " - "false, the existing objects remain unchanged and a new " - "object is created for the new point in time." )] - boolean Volatile; - - -}; diff --git a/build/vendor/dmtf_mof/Metrics/CIM_LogicalElementPerformsUoW.mof b/build/vendor/dmtf_mof/Metrics/CIM_LogicalElementPerformsUoW.mof deleted file mode 100644 index f0264495..00000000 --- a/build/vendor/dmtf_mof/Metrics/CIM_LogicalElementPerformsUoW.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2007 DMTF. All rights reserved. - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Metrics::UnitOfWork" ), - Description ( - "This association identifies a specific execution of a UnitOf " - "Work with the specific LogicalElement that is performing/ has " - "performed it. Where the LogicalElementUnitOfWorkDef " - "association describes what an Element can do, this " - "relationship describes what a particular Element is doing or " - "has done." )] -class CIM_LogicalElementPerformsUoW : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The LogicalElement performing the UnitOfWork." )] - CIM_LogicalElement REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The UnitOfWork being performed." )] - CIM_UnitOfWork REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Metrics/CIM_LogicalElementUnitOfWorkDef.mof b/build/vendor/dmtf_mof/Metrics/CIM_LogicalElementUnitOfWorkDef.mof deleted file mode 100644 index 33c4711f..00000000 --- a/build/vendor/dmtf_mof/Metrics/CIM_LogicalElementUnitOfWorkDef.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2007 DMTF. All rights reserved. - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Metrics::UnitOfWork" ), - Description ( - "This association links a LogicalElement to the UnitsOfWork " - "that it can perform. For example, a Printer Device may have " - "associated UnitOfWorkDefinitions representing PrintJobs. This " - "is a Dependency relationship since the Definitions are given " - "context by the LogicalElement." )] -class CIM_LogicalElementUnitOfWorkDef : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "The LogicalElement that is providing the UnitOfWork." )] - CIM_LogicalElement REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The UnitOfWorkDefinition associated with the LogicalElement." - )] - CIM_UnitOfWorkDefinition REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Metrics/CIM_MetricDefForME.mof b/build/vendor/dmtf_mof/Metrics/CIM_MetricDefForME.mof deleted file mode 100644 index 30ef01fb..00000000 --- a/build/vendor/dmtf_mof/Metrics/CIM_MetricDefForME.mof +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Association, Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Metrics::BaseMetric" ), - Description ( - "This association ties a CIM_BaseMetricDefinition to a " - "CIM_ManagedElement to define metrics for the latter. The " - "metrics definition is given context by the ManagedElement, " - "which is why the definition is dependent on the element." )] -class CIM_MetricDefForME : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "The CIM_ManagedElement that can have metrics of this " - "type associated with it." )] - CIM_ManagedElement REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "A CIM_BaseMetricDefinition for a CIM_ManagedElement." )] - CIM_BaseMetricDefinition REF Dependent; - - [Description ( - "MetricCollectionEnabled indicates whether the metric " - "defined by the referenced CIM_BaseMetricDefinition is " - "being collected for the referenced CIM_ManagedElement. A " - "value of 2 \"Enabled\" shall indicate the metric is " - "being collected. A value of 3 \"Disabled\" shall " - "indicate the metric is not being collected. When " - "collection of a metric is re-enabled, the metric is " - "re-initialized such that any values for a current access " - "metric reflect data collected after the time at which " - "collection was re-enabled." ), - ValueMap { "2", "3", "4", "..", "32768..65535" }, - Values { "Enabled", "Disabled", "Reserved", "DMTF Reserved", - "Vendor Reserved" }] - uint16 MetricCollectionEnabled = 2; - - -}; diff --git a/build/vendor/dmtf_mof/Metrics/CIM_MetricDefinition.mof b/build/vendor/dmtf_mof/Metrics/CIM_MetricDefinition.mof deleted file mode 100644 index 9c5c97cb..00000000 --- a/build/vendor/dmtf_mof/Metrics/CIM_MetricDefinition.mof +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2007 DMTF. All rights reserved. - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Metrics::UnitOfWork" ), - Description ( - "The metrics that are associated with a UnitOfWork. These " - "metrics usually describe some aspect of a UnitOfWork such as " - "how much work was done, or the size of the UnitOfWork. For " - "example, the size of a print job or the number of pages " - "printed could be metrics of a \'print\' UnitOfWork." )] -class CIM_MetricDefinition : CIM_BaseMetricDefinition { - - [Override ( "Id" ), - Description ( - "A 16 byte value that uniquely identifies the Metric " - "Definition. The use of OSF UUID/GUIDs is recommended." ), - MaxLen ( 16 )] - string Id; - - [Description ( - "An enumerated value describing when the Metric may be " - "considered valid. Some metrics are valid only at the " - "beginning of a transaction (e.g., bytes to print), while " - "the transaction is running (e.g., percent complete), or " - "when the transaction is finished (e.g., pages printed). " - "If a metric is valid at more than one of the enumerated " - "values, such as both when the unit of work starts and " - "when it stops, it is recommended to not use Validity." ), - ValueMap { "1", "2", "3" }, - Values { "At Start", "In Middle", "At Stop" }] - uint16 Validity; - - -}; diff --git a/build/vendor/dmtf_mof/Metrics/CIM_MetricForME.mof b/build/vendor/dmtf_mof/Metrics/CIM_MetricForME.mof deleted file mode 100644 index ef804d42..00000000 --- a/build/vendor/dmtf_mof/Metrics/CIM_MetricForME.mof +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2007 DMTF. All rights reserved. - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Metrics::BaseMetric" ), - Description ( - "This association links a ManagedElement to the metric values " - "being maintained for it." )] -class CIM_MetricForME : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "ManagedElement to which the metric values belong." )] - CIM_ManagedElement REF Antecedent; - - [Override ( "Dependent" ), - Description ( "A metric value for the ManagedElement." )] - CIM_BaseMetricValue REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Metrics/CIM_MetricInstance.mof b/build/vendor/dmtf_mof/Metrics/CIM_MetricInstance.mof deleted file mode 100644 index dbb3f160..00000000 --- a/build/vendor/dmtf_mof/Metrics/CIM_MetricInstance.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2007 DMTF. All rights reserved. - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Metrics::BaseMetric" ), - Description ( - "Weak association of metric value objects with their metric " - "definition. This association ties an instance of " - "CIM_BaseMetricValue to its CIM_BaseMetricDefinition; it is " - "weak because the existence of a CIM_BaseMetricValue depends on " - "the existence of its associated CIM_BaseMetricDefinition: An " - "instance of CIM_BaseMetricValue must not exist without being " - "associated to its corresponding CIM_BaseMetricDefinition." )] -class CIM_MetricInstance : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The CIM_BaseMetricDefinition for this particular " - "CIM_BaseMetricValue." )] - CIM_BaseMetricDefinition REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "A CIM_BaseMetricValue instance holding the Value." )] - CIM_BaseMetricValue REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Metrics/CIM_MetricService.mof b/build/vendor/dmtf_mof/Metrics/CIM_MetricService.mof deleted file mode 100644 index 9be3ce18..00000000 --- a/build/vendor/dmtf_mof/Metrics/CIM_MetricService.mof +++ /dev/null @@ -1,495 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.23.0" ), - UMLPackagePath ( "CIM::Metrics::BaseMetric" ), - Description ( - "CIM_MetricService provides the ability to manage metrics. For " - "each metric that the service manages, there shall be an " - "instance of CIM_ServiceAffectsElement that associates the " - "CIM_MetricService to the instance of CIM_BaseMetricDefinition " - "that defines the metric, where the value of the " - "CIM_ServiceAffectsElement.ElementAffects property is 5 " - "\"Manages\". The capabilities of the CIM_MetricService " - "instance are advertised through an instance of " - "CIM_MetricServiceCapabilities associated with the " - "CIM_MetricService instance through CIM_ElementCapabilities." )] -class CIM_MetricService : CIM_Service { - - - [Description ( - "ShowMetrics reports the Metrics available to be " - "collected for a ManagedElement, the ManagedElements for " - "which a metric defined by an instance of " - "CIM_BaseMetricDefinition is available to be collected, " - "and whether or not a particular metric is currently " - "being collected for a ManagedElement. \n" - "If the Subject parameter is specified and the Definition " - "parameter is NULL, upon successful completion of the " - "method, the DefinitionList[] parameter shall contain a " - "reference to an instance of CIM_BaseMetricDefinition for " - "each instance of CIM_BaseMetricDefinition to which the " - "instance of CIM_ManagedElement identified by the Subject " - "parameter is associated through CIM_MetricDefForME where " - "the CIM_BaseMetricDefinition instance is associated to " - "the CIM_MetricService instance through " - "CIM_ServiceAffectsElement, the MetricCollectionEnabled " - "parameter shall contain a value corresponding to the " - "value of the MetricCollectionEnabled property of the " - "instance of CIM_MetricDefForME that associates the " - "CIM_ManagedElement identified by the Subject parameter " - "with the CIM_BaseMetricDefinition for which a reference " - "is returned in the DefinitionList parameter at the same " - "array index.\n" - "If the Definition parameter is non-NULL and the Subject " - "parameter is NULL, upon successful completion of the " - "method the ManagedElements parameter shall contain a " - "reference to each CIM_ManagedElement instance to which " - "the CIM_BaseMetricDefinition instance referenced by the " - "Definition parameteris associated through " - "CIM_MetricDefForME and the MetricCollectionEnabled " - "parameter shall contain a value corresponding to the " - "value of the MetricCollectionEnabled property of the " - "instance of CIM_MetricDefForME that associates the " - "CIM_BaseMetricDefinition identified by the Definition " - "parameter with the CIM_ManagedElement for which a " - "reference is returned in the ManagedElements parameter " - "at the same array index as the reference to the CIM_ManagedElement.\n" - "If the Subject parameter and Definition parameter are " - "both non-NULL, the method shall return NULL values for " - "the DefinitionList and ManagedElements parameters, and " - "the MetricCollectionEnabled parameter shall contain a " - "single value that corresponds to the value of the " - "MetricCollectionEnabled property of the instance of " - "CIM_MetricDefForME that associates the instance of " - "CIM_ManagedElement identified by the Subject parameter " - "with the instance of CIM_BaseMetricDefinition identified " - "by the Definition parameter. If the Subject and " - "Definition parameters are both NULL, the method shall " - "return 2 \"Failed\". If the Definition parameter is a " - "reference to an instance of CIM_BaseMetricDefinition " - "that is not associated to the CIM_MetricService through " - "CIM_ServiceAffectsElement, the method shall return 2 " - "\"Failed\". If the Subject parameter does not identify a " - "single instance the Method shall return 2 \"Failed\"." ), - ValueMap { "0", "1", "2", "..", "32768..65535" }, - Values { "Success", "Not Supported", "Failed", - "Method Reserved", "Vendor Specific" }] - uint32 ShowMetrics( - [IN, Description ( - "The Subject parameter identifies an instance of " - "CIM_ManagedElement for which the method returns " - "references to instances of " - "CIM_BaseMetricDefinition that define metrics that " - "are being captured for the CIM_ManagedElement." )] - CIM_ManagedElement REF Subject, - [IN, Description ( - "The Definition parameter identifies an instance of " - "CIM_BaseMetricDefintion. The method returns " - "references to instances of CIM_ManagedElement for " - "which metrics defined by the instance of " - "CIM_BaseMetricDefinition are available to be " - "collected." )] - CIM_BaseMetricDefinition REF Definition, - [IN ( false ), OUT, Description ( - "Upon successful completion of the method, the " - "ManagedElements[] parameter may contain references " - "to CIM_ManagedElements for which the metric " - "identified by Definition parameter is available " - "for collection." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_MetricService.ShowMetrics.DefinitionList" }] - CIM_ManagedElement REF ManagedElements[], - [IN ( false ), OUT, Description ( - "Upon successful completion of the method, the " - "DefinitionList parameter may contain references to " - "instances of CIM_BaseMetricDefinitions that define " - "metrics available for collection for the " - "CIM_ManagedElement identified by the Subject " - "parameter." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_MetricService.ShowMetrics.ManagedElements" }] - CIM_BaseMetricDefinition REF DefinitionList[], - [IN ( false ), OUT, Description ( - "Upon successful completion of the method, each " - "array index of the MetricNames parameter shall " - "contain the value of the Name property for the " - "instance of CIM_BaseMetricDefinition referenced by " - "the corresponding array index of the " - "DefinitionList parameter." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_MetricService.ShowMetrics.DefinitionList" }] - string MetricNames[], - [IN ( false ), OUT, Description ( - "The MetricCollectionEnabled parameter indicates " - "whether a metric is being collected for a managed " - "element." ), - ValueMap { "2", "3", "4", "..", "32768..65535" }, - Values { "Enable", "Disable", "Reserved", - "DMTF Reserved", "Vendor Reserved" }] - uint16 MetricCollectionEnabled[]); - - [Description ( - "ShowMetricsByClass reports the Metrics available to be " - "collected for all instances of a CIM class. The CIM " - "classes for which a metric defined by an instance of " - "CIM_BaseMetricDefinition is available to be collected, " - "and whether or not a particular metric is currently " - "being collected for a ManagedElement. \n" - "If the Subject parameter is specified and the Definition " - "parameter is NULL, upon successful completion of the " - "method, the DefinitionList[] parameter shall contain a " - "reference to an instance of CIM_BaseMetricDefinition for " - "each instance of CIM_BaseMetricDefinition that is " - "associated with all instances of the class identified by " - "the Subject parameter, where the " - "CIM_BaseMetricDefinition instance is associated to the " - "CIM_MetricService instance through " - "CIM_ServiceAffectsElement; the MetricCollectionEnabled " - "parameter shall contain the value 2 \"Enabled\" if the " - "value of the MetricCollectionEnabled property has the " - "value 2 \"Enabled\" for every instance of " - "CIM_MetricDefForME that associates the " - "CIM_ManagedElement identified by the Subject parameter " - "with the CIM_BaseMetricDefinition for which a reference " - "CIM_BaseMetricDefinition is returned in the " - "DefinitionList parameter at the same array index as the " - "reference and the MetricCollectionEnabled parameter " - "shall contain the value 3 \"Disabled\" if the value of " - "the MetricCollectionEnabled property does not have the " - "value 2 \"Enabled\" for every instance of " - "CIM_MetricDefForME that associates the " - "CIM_ManagedElement identified by the Subject parameter " - "with the CIM_BaseMetricDefinition for which a reference " - "CIM_BaseMetricDefinition is returned in the " - "DefinitionList parameter at the same array index as the " - "reference. \n" - "If the Subject parameter and Definition parameter are " - "both non-NULL, the method shall return NULL value for " - "the DefinitionList parameter and the " - "MetricCollectionEnabled parameter shall contain a single " - "value that corresponds to the value of the " - "MetricCollectionEnabled property of the instance of " - "CIM_MetricDefForME that associates the instance of " - "CIM_ManagedElement identified by the Subject parameter " - "with the instance of CIM_BaseMetricDefinition identified " - "by the Definition parameter. If the Subject and " - "Definition parameters are both NULL, the method shall " - "return 2 \"Failed\". If the Definition parameter is a " - "reference to an instance of CIM_BaseMetricDefinition " - "that is not associated to the CIM_MetricService through " - "CIM_ServiceAffectsElement, the method shall return 2 " - "\"Failed\". If the Subject parameter does not identify a " - "single CIM Class the Method shall return 2 \"Failed\"." ), - ValueMap { "0", "1", "2", "..", "32768..65535" }, - Values { "Success", "Not Supported", "Failed", - "Method Reserved", "Vendor Specific" }] - uint32 ShowMetricsByClass( - [Required, IN, Description ( - "The Subject parameter identifies a CIM class for " - "which the method returns references to instances " - "of CIM_BaseMetricDefinition that define metrics " - "that are available to be captured for all " - "instances of the class." )] - CIM_ManagedElement REF Subject, - [IN, Description ( - "The Definition parameter identifies an instance of " - "CIM_BaseMetricDefinition. The method returns " - "references to instances of CIM_ManagedElement for " - "which metrics defined by the instance of " - "CIM_BaseMetricDefinition are available to be " - "collected." )] - CIM_BaseMetricDefinition REF Definition, - [IN ( false ), OUT, Description ( - "Upon successful completion of the method, the " - "DefinitionList parameter may contain references to " - "instances of CIM_BaseMetricDefinitions that define " - "metrics available for collection for the " - "CIM_ManagedElement identified by the Subject " - "parameter." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_MetricService.ShowMetricsByClass.ManagedElements" }] - CIM_BaseMetricDefinition REF DefinitionList[], - [IN ( false ), OUT, Description ( - "Upon successful completion of the method, each " - "array index of the MetricNames parameter shall " - "contain the value of the Name property for the " - "instance of CIM_BaseMetricDefinition referenced by " - "the corresponding array index of the " - "DefinitionList parameter." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_MetricService.ShowMetricsByClass.DefinitionList" }] - string MetricNames[], - [IN ( false ), OUT, Description ( - "The MetricCollectionEnabled parameter indicates " - "whether a metric is being collected for all " - "instances of a class of managed elements." ), - ValueMap { "2", "3", "4", "..", "32768..65535" }, - Values { "Enabled", "Disabled", "Reserved", - "DMTF Reserved", "Vendor Reserved" }] - uint16 MetricCollectionEnabled[]); - - [Description ( - "ControlMetrics enables and disables the collection of " - "metrics. It is used to control the collection of each " - "type of metric for a CIM_ManagedElement, the collection " - "of a given type of metric for all ManagedElements, or " - "the collection of a specific metric for a specific " - "ManagedElement. \n" - "If the Subject parameter is specified and the Definition " - "parameter is NULL and the MetricCollectionEnabled " - "parameter has the value 2 \"Enabled\" or 3 \"Disabled\", " - "upon successful completion of the method, the " - "MetricCollectionEnabled property of each instance of " - "CIM_MetricDefForME that references the instance of " - "CIM_ManagedElement identified by the Subject parameter " - "and references an instance of CIM_BaseMetricDefinition " - "that is associated to the CIM_BaseMetricService through " - "the CIM_ServiceAffectsElement association shall have the " - "value of the MetricCollectionEnabled parameter. If the " - "Subject parameter is specified and the Definition " - "parameter is NULL and the value of the " - "MetricCollectionEnabled parameter is 4 \"Reset\" upon " - "successful completion of the method, the value of the " - "MetricCollectionEnabled of each instance of " - "CIM_MetricDefForME that references the instance of " - "CIM_ManagedElement identified by the Subject parameter " - "and references an instance of CIM_BaseMetricDefinition " - "that is associated to the CIM_BaseMetricService through " - "the CIM_ServiceAffectsElement association shall " - "transition to 3 \"Disabled\" then to 2 \"Enabled\". If " - "the Definition parameter is non-NULL and the Subject " - "parameter is NULL, and the MetricCollectionEnabled " - "parameter has the value 2 \"Enabled\" or 3 \"Disabled\", " - "upon successful completion of the method the " - "MetricCollectionEnabled property of each instance of " - "CIM_MetricDefForME that references the instance of " - "CIM_BaseMetricDefinition identified by the Definition " - "parameter shall have the value of the " - "MetricCollectionEnabled parameter. If the Definition " - "parameter is non-NULL and the Subject parameter is NULL, " - "and the value of the MetricCollectionEnabled parameter " - "is 4 \"Reset\" upon successful completion of the method " - "the MetricCollectionEnabled property of each instance of " - "CIM_MetricDefForME that references the instance of " - "CIM_BaseMetricDefinition identified by the Definition " - "parameter shall transition to 3 \"Disabled\" then to 2 " - "\"Enabled\". If the Subject parameter and Definition " - "parameter are both non-NULL, and the " - "MetricCollectionEnabled parameter has the value 2 " - "\"Enable\" or 3 \"Disable\", upon successful completion " - "of the method, the MetricCollectionEnabled property of " - "the instance of CIM_MetricDefForME that references the " - "instance of CIM_ManagedElement identified by the Subject " - "parameter and references the instance of " - "CIM_BaseMetricDefinition identified by the Definition " - "parameter shall have the value of the " - "MetricCollectionEnabled parameter.\n" - "If the Subject parameter and Definition parameter are " - "both non-NULL and the value of the " - "MetricCollectionEnabled parameter is 4 \"Reset\" upon " - "successful completion of the method, the " - "MetricCollectionEnabled property of the instance of " - "CIM_MetricDefForME that references the instance of " - "CIM_ManagedElement identified by the Subject parameter " - "and references the instance of CIM_BaseMetricDefinition " - "identified by the Definition parameter shall transition " - "to 3 \"Disabled\" then to 2 \"Enabled\". If the Subject " - "parameter and Definition parameter are both non-NULL and " - "there is not an instance of CIM_MetricDefForME that " - "associates the two instances, the method shall return 2 " - "\"Failed\". If the Subject and Definition parameters are " - "both NULL, the method shall return 2 \"Failed\". If the " - "Definition parameter is a reference to an instance of " - "CIM_BaseMetricDefinition that is not associated to the " - "CIM_MetricService through CIM_ServiceAffectsElement, the " - "method shall return 2 \"Failed\". If the Subject " - "parameter does not identify a single instance the Method " - "shall return 2 \"Failed\"." ), - ValueMap { "0", "1", "2", "..", "32768..65535" }, - Values { "Success", "Not Supported", "Failed", - "Method Reserved", "Vendor Specific" }] - uint32 ControlMetrics( - [IN, Description ( - "The Subject parameter identifies managed " - "element(s) for which metrics will be controlled." )] - CIM_ManagedElement REF Subject, - [IN, Description ( - "The Definition parameter identifies a " - "CIM_BaseMetricDefinition for which metrics will be " - "controlled." )] - CIM_BaseMetricDefinition REF Definition, - [Required, IN, Description ( - "The MetricCollectionEnabled parameter indicates " - "the desired operation to perform on the metrics." ), - ValueMap { "2", "3", "4", "..", "32768..65535" }, - Values { "Enable", "Disable", "Reset", "DMTF Reserved", - "Vendor Reserved" }] - uint16 MetricCollectionEnabled); - - [Description ( - "ControlMetricsByClass enables and disables the " - "collection of metrics. It is used to control the " - "collection of each type of metric for all instances of a " - "class or the collection of a specific metric for all " - "instances of a class. \n" - "If the Definition parameter is NULL, and the " - "MetricCollectionEnabled parameter has the value 2 " - "\"Enabled\" or 3 \"Disabled\", upon successful " - "completion of the method, the MetricCollectionEnabled " - "property of each instance of CIM_MetricDefForME that " - "references an instance of the class identified by the " - "Subject parameter and references an instance of " - "CIM_BaseMetricDefinition that is associated to the " - "CIM_BaseMetricService through the " - "CIM_ServiceAffectsElement association shall have the " - "value of the MetricCollectionEnabled parameter. If the " - "Definition parameter is NULL, and the " - "MetricCollectionEnabled parameter has the value 4 " - "\"Reset\", upon successful completion of the method, the " - "MetricCollectionEnabled property of each instance of " - "CIM_MetricDefForME that references an instance of the " - "class identified by the Subject parameter and references " - "an instance of CIM_BaseMetricDefinition that is " - "associated to the CIM_BaseMetricService through the " - "CIM_ServiceAffectsElement association shall transition " - "to 3 \"Disabled\" then to 2 \"Enabled\". If the " - "Definition parameter is non-NULL, and the " - "MetricCollectionEnabled parameter has the value 2 " - "\"Enable\" or 3 \"Disable\", upon successful completion " - "of the method the MetricCollectionEnabled property of " - "each instance of CIM_MetricDefForME that references the " - "instance of CIM_BaseMetricDefinition identified by the " - "Definition parameter and references an instance of the " - "class identified by the Subject parameter shall have the " - "value of the MetricCollectionEnabled parameter. If the " - "Definition parameter is non-NULL, and the " - "MetricCollectionEnabled parameter has the value 4 " - "\"Reset\", upon successful completion of the method the " - "MetricCollectionEnabled property of each instance of " - "CIM_MetricDefForME that references the instance of " - "CIM_BaseMetricDefinition identified by the Definition " - "parameter and references an instance of the class " - "identified by the Subject parameter shall transition to " - "3 \"Disabled\" then to 2 \"Enabled\". For each instance " - "of the class identified by the Subject parameter, if " - "there is not an instance of CIM_MetricDefForME that " - "associates the CIM_BaseMetricDefinition instance " - "identified by the Definition parameter to the instance, " - "the method shall return 2 \"Failed\". If the Subject and " - "Definition parameters are both NULL, the method shall " - "return 2 \"Failed\". If the Definition parameter is a " - "reference to an instance of CIM_BaseMetricDefinition " - "that is not associated to the CIM_MetricService through " - "CIM_ServiceAffectsElement, the method shall return 2 " - "\"Failed\". If the Subject parameter does not identify a " - "single CIM Class the Method shall return 2 \"Failed\"." ), - ValueMap { "0", "1", "2", "..", "32768..65535" }, - Values { "Success", "Not Supported", "Failed", - "Method Reserved", "Vendor Specific" }] - uint32 ControlMetricsByClass( - [Required, IN, Description ( - "The Subject parameter identifies the CIM class for " - "which metrics will be controlled." )] - CIM_ManagedElement REF Subject, - [IN, Description ( - "The Definition parameter identifies a " - "CIM_BaseMetricDefinition for which metrics will be " - "controlled." )] - CIM_BaseMetricDefinition REF Definition, - [Required, IN, Description ( - "The MetricCollectionEnabled parameter indicates " - "the desired operation to perform on the metrics." ), - ValueMap { "2", "3", "4", "..", "32768..65535" }, - Values { "Enable", "Disable", "Reset", "DMTF Reserved", - "Vendor Reserved" }] - uint16 MetricCollectionEnabled); - - [Description ( - "GetMetricValues provides the ability to return a " - "filtered list of CIM_BaseMetricValue instances. \n" - "If the Definition parameter is NULL, the method shall " - "return 2 \"Failed\". If the Definition parameter is a " - "reference to an instance of CIM_BaseMetricDefinition " - "with which the CIM_MetricService is not associated " - "through CIM_ServiceAffectsElement, the method shall " - "return 2 \"Failed\"." ), - ValueMap { "0", "1", "2", "..", "32768..65535" }, - Values { "Success", "Not Supported", "Failed", - "Method Reserved", "Vendor Specific" }] - uint32 GetMetricValues( - [Required, IN, Description ( - "The Definition parameter identifies a " - "CIM_BaseMetricDefinition for which metrics will be " - "returned." )] - CIM_BaseMetricDefinition REF Definition, - [IN, Description ( - "The Range parameter identifies how the instances " - "are selected. The algorithm for ordering value " - "instances is metric definition specific." ), - ValueMap { "2", "3", "..", "32768..65535" }, - Values { "Minimum", "Maximum", "DMTF Reserved", - "Vendor Specific" }] - uint16 Range, - [IN, Description ( - "The Count parameter identifies the maximum number " - "of instances to to be returned by the method." )] - uint16 Count, - [IN ( false ), OUT, Description ( - "Upon successful completion of the method, the " - "Values parameter contains references to instances " - "of CIM_BaseMetricValue, filteredaccording to the " - "values of the input parameters." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_MetricService.ShowMetrics.ManagedElements" }] - CIM_BaseMetricValue REF Values[]); - - [Description ( - "Method used to allow specification of the point in time " - "metric gathering is to be started and to specify the " - "preferred sample interval time for periodic data " - "gathering. \n" - "Whenever sampling for additional metrics is started, the " - "settings specified by this method may be used." ), - ValueMap { "0", "1", "2", "..", "32768..65535" }, - Values { "Success", "Not Supported", "Failed", - "Method Reserved", "Vendor Specific" }] - uint32 ControlSampleTimes( - [Required, IN, Description ( - "Point in time when sampling for the metrics is to " - "be started. \n" - "A value of 99990101000000.000000+000 shall " - "indicate that sampling should start at the next " - "time it is synchronized to the full hour. Sampling " - "is synchronized to the full hour if seconds since " - "midnight modulo sample interval in seconds is " - "equal to 0." )] - datetime StartSampleTime, - [Required, IN, Description ( - "Preferred sample interval time. In order to get " - "correlatable metrics, it is recommended that the " - "sample interval be chosen in a way that 3600 " - "modulo sample interval time in seconds is equal to " - "0. \n" - "It is the responsibility of the CIM metric service " - "implementation to decide whether the requested " - "sample interval time is honored. \n" - "The CIM client can check whether or not the metric " - "providers are honoring the requested sample " - "interval time by retrieving related " - "BaseMetricDefinition instances and checking the " - "contents of the " - "\"CIM_BaseMetricDefinition.SampleInterval\" " - "property." )] - datetime PreferredSampleInterval, - [Required, IN, Description ( - "Boolean that when set to TRUE requests that " - "gathering of all metrics associated to the metric " - "service is re-started with this method call." )] - boolean RestartGathering); - -}; diff --git a/build/vendor/dmtf_mof/Metrics/CIM_MetricServiceCapabilities.mof b/build/vendor/dmtf_mof/Metrics/CIM_MetricServiceCapabilities.mof deleted file mode 100644 index ee5ddd41..00000000 --- a/build/vendor/dmtf_mof/Metrics/CIM_MetricServiceCapabilities.mof +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Metrics::BaseMetrics" ), - Description ( - "MetricServiceCapabilities describes the capabilities of the " - "associated CIM_BaseMetricService." )] -class CIM_MetricServiceCapabilities : CIM_EnabledLogicalElementCapabilities { - - [Description ( - "ControllableMetrics identifies the instances of " - "CIM_BaseMetricDefinition that can be controlled by the " - "associated CIM_MetricService instance. Each string value " - "shall be formatted as a WBEM URI defined as in " - "accordance with DSP0207 that identifies an instance of " - "CIM_BaseMetricDefinition. An instance of " - "CIM_BaseMetricDefinition shall not be identified by a " - "value of the ControllableMetrics property unless it is " - "associated through CIM_ServiceAffectsElement to the " - "associated instance of CIM_MetricService. If a value " - "corresponding to an instance of CIM_BaseMetricDefinition " - "is included in the ControllableMetrics property, the " - "associated instance of CIM_MetricService shall support " - "enabling and/or disabling at least one metric defined by " - "the CIM_BaseMetricDefinition instance." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_MetricServiceCapabilities.MetricControlTypes" }] - string ControllableMetrics[]; - - [Description ( - "MetricControlTypes identifies the type of control " - "supported by the associated CIM_MetricService instance " - "for the CIM_BaseMetricDefinition identified by the value " - "at the same array index in the ControllableMetrics " - "property. A value of 2 \"Discrete\" shall indicate that " - "individual metrics defined by the instance of " - "CIM_BaseMetricDefinition identified at the corresponding " - "array index of ControllableMetrics may be enabled and or " - "disabled by the associated instance of " - "CIM_MetricService.A value of 3 \"Bulk\" shall indicate " - "that all metrics defined by the instance of " - "CIM_BaseMetricDefinition identified by the value at the " - "same array index of ControllableMetrics may be enabled " - "and or disabled with a single operation. A value of 4 " - "\"Both\" shall indicate that all metrics defined by the " - "instance of CIM_BaseMetricDefinition identified by the " - "value at the same array index of ControllableMetrics may " - "be enabled and or disabled individually or as a single " - "operation." ), - ValueMap { "0", "2", "3", "4", "..", "32768..65535" }, - Values { "Unknown", "Discrete", "Bulk", "Both", - "DMTF Reserved", "Vendor Specific" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_MetricServiceCapabilities.ControllableMetrics" }] - uint16 MetricsControlTypes[]; - - [Description ( - "ControllableManagedElements identifies the instances of " - "CIM_ManagedElement that can be controlled by the " - "associated CIM_MetricService instance. Each value shall " - "be formatted as a WBEM URI defined according to DSP0207 " - "identifying an instance of CIM_ManagedElement If a value " - "corresponding to an instance of CIM_ManagedElement is " - "included in the ControllableManagedElements property, " - "the associated instance of CIM_MetricService shall " - "support enabling and/or disabling at least one metric " - "defined for the CIM_ManagedElement instance." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_MetricServiceCapabilities.ManagedElementControlTypes" }] - string ControllableManagedElements[]; - - [Description ( - "ManagedElementControlTypes identifies the type of " - "control supported by the associated CIM_MetricService " - "instance for the CIM_ManagedElement identified by the " - "value at the same array index in the " - "ControllableManagedElements property. A value of 2 " - "\"Discrete\" shall indicate that individual metrics " - "controlled by the associated instance of " - "CIM_MetricService may be enabled and or disabled for the " - "instance of CIM_ManagedElement identified at the " - "corresponding array index of " - "ControllableManagedElements.A value of 3 \"Bulk\" shall " - "indicate that all metrics controlled by the associated " - "instance of CIM_MetricService may be enabled and or " - "disabled for the instance of CIM_ManagedElement " - "identified at the corresponding array index of " - "ControllableManagedElements. A value of 4 \"Both\" shall " - "indicate that all metrics controlled by the associated " - "instance of CIM_MetricService may be enabled and or " - "disabled with a single operation or individually for the " - "instance of CIM_ManagedElement identified by the value " - "at the same array index of ControllableManagedElements." ), - ValueMap { "0", "2", "3", "4", "..", "32768..65535" }, - Values { "Unknown", "Discrete", "Bulk", "Both", - "DMTF Reserved", "Vendor Specific" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_MetricServiceCapabilities.ControllableManagedElements" }] - uint16 ManagedElementControlTypes[]; - - [Description ( - "Each enumeration corresponds to support for the " - "like-named method of the MetricService." ), - ValueMap { "2", "3", "4", "5", "6", "7", "..", "0x8000.." }, - Values { "ControlMetrics", "ControlMetricsByClass", - "ShowMetrics", "ShowMetricsByClass", "GetMetricValues", - "ControlSampleTimes", "DMTF Reserved", "Vendor Specific" }] - uint16 SupportedMethods[]; - - -}; diff --git a/build/vendor/dmtf_mof/Metrics/CIM_StartedUoW.mof b/build/vendor/dmtf_mof/Metrics/CIM_StartedUoW.mof deleted file mode 100644 index 8bba7d8b..00000000 --- a/build/vendor/dmtf_mof/Metrics/CIM_StartedUoW.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2007 DMTF. All rights reserved. - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Metrics::UnitOfWork" ), - Description ( - "This association links a UnitOfWork (which is a \'started\' " - "transaction) to its Definition." )] -class CIM_StartedUoW : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The Definition object for the UnitOfWork." )] - CIM_UnitOfWorkDefinition REF Antecedent; - - [Override ( "Dependent" ), - Weak, Description ( - "An instance of a UnitOfWork that has started executing." )] - CIM_UnitOfWork REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Metrics/CIM_SubUoW.mof b/build/vendor/dmtf_mof/Metrics/CIM_SubUoW.mof deleted file mode 100644 index c059cea9..00000000 --- a/build/vendor/dmtf_mof/Metrics/CIM_SubUoW.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2007 DMTF. All rights reserved. - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Metrics::UnitOfWork" ), - Description ( - "Similar to the SubUoWDef association (which describes the " - "relationship between definitional UnitsOfWork), this " - "association identifies the executional UnitOfWork " - "Dependencies. It associates executing/executed UnitsOfWork " - "with their parent Units. In most cases, the SubUoW reflects " - "the execution side of the relationship defined in SubUoWDef. " - "However, there may be cases where the SubUoWDef is not " - "defined, but for a particular UnitOfWork, the SubUoW " - "relationship is valid. Therefore, it is not a requirement (but " - "it is desirable) that there be a corresponding SubUoWDef for " - "each instance of SubUoW." )] -class CIM_SubUoW : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "The parent executing/executed UnitOfWork. On the " - "execution side, it is expected that a sub-Unit is " - "associated with only one parent UnitOfWork." )] - CIM_UnitOfWork REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The sub-UnitOfWork. On the execution side, it is " - "expected that a sub-Unit is associated with only one " - "parent UnitOfWork." )] - CIM_UnitOfWork REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Metrics/CIM_SubUoWDef.mof b/build/vendor/dmtf_mof/Metrics/CIM_SubUoWDef.mof deleted file mode 100644 index fb51aa5d..00000000 --- a/build/vendor/dmtf_mof/Metrics/CIM_SubUoWDef.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2007 DMTF. All rights reserved. - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Metrics::UnitOfWork" ), - Description ( - "This association defines the sub-UnitsOfWork (the sub- " - "transactions) for a particular UnitOfWorkDefinition. For " - "example, an \'AddOrder\' UnitOfWork could have sub-Units of " - "\'ValidateCustomer\', \'ValidatePartNumber\', " - "\'UpdateDatabase\', etc. This is a Dependency relationship " - "since the sub-UnitsOf Work are put in context relative to the " - "parent Unit. It is not an aggregation relationship - since " - "(using another example) a \'DatabaseWrite\' transaction is " - "likely to be dependent upon a \'DiskWrite\', but the two " - "transactions are separate concepts and one is not \'contained\' " - "by the other." )] -class CIM_SubUoWDef : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The parent UnitOfWorkDefinition." )] - CIM_UnitOfWorkDefinition REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The sub-UnitOfWorkDefinition." )] - CIM_UnitOfWorkDefinition REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Metrics/CIM_TraceLevelType.mof b/build/vendor/dmtf_mof/Metrics/CIM_TraceLevelType.mof deleted file mode 100644 index 6e53c51c..00000000 --- a/build/vendor/dmtf_mof/Metrics/CIM_TraceLevelType.mof +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Metrics::UnitOfWork" ), - Description ( - "TraceLevelType defines the encoding and semantics of trace " - "levels. A trace is data that is produced during the execution " - "of program code in order to provide information on the " - "behaviour of the code (e.g. textual data written to files). " - "Traces may be used for error detection/analysis or debugging. " - "Trace levels define the granularity and/or type of the traces " - "that are to be produced by the program code. Depending on the " - "program implementation, levels may be applied on the fly. The " - "possible levels are also implementation dependent, since no " - "general rules or standards exist. In consequence, program " - "developers could reuse their existing trace level scheme. \n" - "Traces are valuable information sources for management " - "applications in cases of error detection/analysis. In order to " - "correctly set trace levels to the level needed (exciting " - "exhaustive tracing by accident may result in significant " - "system resources consumption in terms of processing time and " - "storage) and to efficiently interpret which level of detail to " - "expect from traces already produced by some resource, the " - "possible trace level values and their meaning (semantics) must " - "be known by the user and/or the management application. The " - "type does not define the location or access method of the " - "traces, since traces of a particular type can have multiple " - "locations as well as multiple access methods." )] -class CIM_TraceLevelType : CIM_ManagedElement { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. In order to ensure uniqueness within the " - "NameSpace, the value of InstanceID SHOULD be constructed " - "using the following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon \':\', and where MUST " - "include a copyrighted, trademarked or otherwise unique " - "name that is owned by the business entity " - "creating/defining the InstanceID, or is a registered ID " - "that is assigned to the business entity by a recognized " - "global authority (This is similar to the _ structure of Schema class names.) In " - "addition, to ensure uniqueness MUST NOT contain a colon " - "(\':\'). When using this algorithm, the first colon to " - "appear in InstanceID MUST appear between and . \n" - "is chosen by the business entity and SHOULD not be " - "re-used to identify different underlying (real-world) " - "elements. If the above \'preferred\' algorithm is not " - "used, the defining entity MUST assure that the resultant " - "InstanceID is not re-used across any InstanceIDs " - "produced by this or other providers for this instance\'s " - "NameSpace. \n" - "For DMTF defined instances, the \'preferred\' algorithm " - "MUST be used with the set to \'CIM\'." ), - MaxLen ( 16 ), - ModelCorrespondence { - "CIM_UnitOfWorkDefinition.TraceLevelTypeId" }] - string InstanceID; - - [Description ( - "Describes the technical encoding of the trace level. \n" - "0: bit map = switches to turn on/off appropriate trace " - "production (e.g. 0x00000010, 0x0000F000); the use of bit " - "maps implies that the switches can be or-ed bitwise: " - "Values[1] | Values[2] | ... . \n" - "1: number = plain numbers that define levels (e.g. 1, 2, " - "7); the recommended and most common encoding scheme \n" - "2: any other encoding scheme you could think of (e.g. " - "mixture of bit maps and numbers)." ), - ValueMap { "1", "2", "3" }, - Values { "Other", "Bitmap", "Number" }] - uint16 BaseType; - - [Required, Description ( - "Each entry in the array is one possible value of the " - "trace level of this type. Depending on the base type, " - "these are either switches defined as bit maps (e.g. " - "0x00000001, 0x000000F0, ...) or plain numbers (1, 2, 3, " - "...). In either encoding, the value 0 is reserved for " - "the equivalent of \'no trace\'." ), - ArrayType ( "Indexed" )] - uint32 TraceValues[]; - - [Required, Description ( - "The index corresponds to TraceLevelType.TraceValues[]. " - "The array provides human-readable descriptions of the " - "semantics of each value entered in the TraceValues " - "array." ), - ArrayType ( "Indexed" )] - string ValueDescriptions[]; - - -}; diff --git a/build/vendor/dmtf_mof/Metrics/CIM_UnitOfWork.mof b/build/vendor/dmtf_mof/Metrics/CIM_UnitOfWork.mof deleted file mode 100644 index 38ce9757..00000000 --- a/build/vendor/dmtf_mof/Metrics/CIM_UnitOfWork.mof +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) 2007 DMTF. All rights reserved. - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Metrics::UnitOfWork" ), - Description ( - "Each instance of UnitOfWork identifies a transaction that is " - "either in-process or already completed. Because instances of " - "\'in-process\' UnitsOfWork can be very short-lived and there " - "can be a great number of active ones, use of this class as an " - "instrumentation source for determining response time may be " - "incorrect or inefficient, unless the rate and duration of the " - "UnitsOfWork are known. The intended use is to respond to " - "queries about currently active or recently completed " - "UnitsOfWork. The length of time that a UnitOfWork instance " - "exists after the UnitOfWork completes is not defined and " - "should be assumed to be implementation-dependent. This class " - "is weak to its definition (CIM_UnitOfWorkDefintion)." )] -class CIM_UnitOfWork : CIM_ManagedElement { - - [Override ( "Description" ), - Description ( - "Since UnitOfWork is designed to be an extremely " - "lightweight object, it is recommended that this property " - "not be used. The Description specified for the " - "instance\'s associated CIM_UnitOfWorkDefintion should " - "apply." )] - string Description; - - [Key, Description ( - "The identifier of the UnitOfWork, within the context of " - "the UnitOfWorkDefinition." )] - sint64 Id; - - [Key, Description ( - "A 16 byte value that uniquely identifies the UnitOfWork " - "Definition. The use of OSF UUID/GUIDs is recommended." ), - MaxLen ( 16 ), - Propagated ( "CIM_UnitOfWorkDefinition.Id" )] - string UoWDefId; - - [Description ( - "The name of the user who initiated the UnitOfWork. This " - "may be a real user\'s login name or a logical name " - "representing an application." )] - string UserName; - - [Description ( "The time that the UnitOfWork was started." )] - datetime StartTime; - - [Description ( - "The elapsed time since the UnitOfWork was started. Upon " - "completion of the UnitOfWork, this property contains the " - "total amount of time taken in processing the entire " - "UnitOfWork." )] - datetime ElapsedTime; - - [Description ( - "An enumeration identifing the status of the UnitOfWork. " - "Most of the property values are self-explanatory, but a " - "few need additional text: \n" - "3=\"Completed\" - Should be used to represent a " - "\'completed\' transaction whose status (\'good\', " - "\'failed\' or \'aborted\') is unknown. \n" - "6=\"Completed Aborted\" - Should be used when a " - "UnitOfWork has completed but was not allowed to end " - "normally. An example would be when the Stop or Back " - "buttons are selected from a web browser, before a page " - "is fully loaded." ), - ValueMap { "1", "2", "3", "4", "5", "6" }, - Values { "Active", "Suspended", "Completed", - "Completed Good", "Completed Failed", "Completed Aborted" }] - uint16 Status; - - [Description ( - "Indicates the granularity at which traces are written " - "for this particular instance of UnitOfWork. Traces allow " - "providing more detailed information on the course of the " - "execution of the UnitOfWork than just the status and the " - "elapsed time. The trace level does not indicate where " - "the traces are found (i.e. in which file or CIM " - "instances). TraceLevel cannot be set (i.e. written) " - "since an instance of UnitOfWork only publishes " - "information. So, the application code that executes the " - "unit of work must receive the desired trace level by its " - "caller (e.g. the parent module, the user or some remote " - "system that initiates the unit of work). \n" - "If its value is 0, no traces are available. If its value " - "is > 0, traces are available. Except 0, the possible " - "values and their semantics are implementation dependent. " - "Two instances of UnitOfWork (even with the same " - "definition) may have different trace levels since the " - "desired or required granularity of traces may be " - "dependent on the execution context (detection of an " - "error, analysis of an error, etc.) of the unit of work. \n" - "The trace level can be encoded as a bit map (each " - "individual bit indicates a certain trace type and/or " - "level of detail) or numbers (that are further defined by " - "a value map). No encoding scheme is imposed since no " - "general rules or standards exist and in consequence, " - "application developers could reuse their existing trace " - "level scheme." )] - uint32 TraceLevel; - - [Description ( - "A string that uniquely identifies the mutual context of " - "UnitOfWork instances. The context is defined as an " - "individual action that several UnitOfWork instances " - "participate in. The use of Ids such as OSF UUID/GUIDs is " - "recommended, although some implementations may require " - "longer Ids. (This is the reason why no maxlen(16) " - "qualifier has been used.) \n" - "MutualContextId explicitly identifies the context for " - "instances of UnitOfWork, that is otherwise provided " - "implicitly by SubUoW association instances. In addition, " - "one can query directly (i.e. without following the " - "associations) for UnitOfWork instances that participate " - "in some individual action (i.e., the mutual context). If " - "no mutual context is needed or if it is not supported by " - "the implementation, the value is NULL. \n" - "Note that the MutualContextId value is to be transferred " - "internally between the participating UnitOfWork " - "implementations such that each UnitOfWork instance " - "implementation receives its value from its " - "predecessor/parent or initially creates the value if it " - "is the first instance of the context." )] - string MutualContextId; - - -}; diff --git a/build/vendor/dmtf_mof/Metrics/CIM_UnitOfWorkDefinition.mof b/build/vendor/dmtf_mof/Metrics/CIM_UnitOfWorkDefinition.mof deleted file mode 100644 index 9a7dca4b..00000000 --- a/build/vendor/dmtf_mof/Metrics/CIM_UnitOfWorkDefinition.mof +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2007 DMTF. All rights reserved. - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Metrics::UnitOfWork" ), - Description ( - "A LogicalElement that describes units of work (e.g. " - "transactions). This class represents the definitional " - "components of a unit of work, and not the unit itself." )] -class CIM_UnitOfWorkDefinition : CIM_LogicalElement { - - [Override ( "Name" ), - Description ( - "The name of the Definition. This name does not have to " - "be unique, but should be descriptive. It may contain " - "blanks." )] - string Name; - - [Description ( - "A free format string describing the context of the " - "defined UnitOfWork. For example an \'Add Order\' Unit " - "could be defined in the context of a book ordering " - "application, whereas another \'Add Order\' UnitOfWork " - "could be defined for a computer ordering application. It " - "may contain blanks." )] - string Context; - - [Key, Description ( - "A 16 byte value that uniquely identifies the UnitOfWork " - "Definition. The use of OSF UUID/GUIDs is recommended." ), - MaxLen ( 16 )] - string Id; - - [Description ( - "A 16 byte value that uniquely identifies the applied " - "semantics and format of the trace levels used in the " - "instances of UnitOfWork. The use of OSF UUID/GUIDs is " - "recommended. \n" - "TraceLevelTypeId allows management applications to " - "efficiently discriminate between different trace level " - "semantics of different UnitOfWorkDefinitions. I.E., " - "CIM_UnitOfWork.TraceLevel = 1 may have different " - "semantics if TraceLevelTypeId is different for the " - "respective instances of UnitOfWork. \n" - "It is not assumed that different trace level semantics " - "are used within the same UnitOfWorkDefinition in order " - "to promote uniform trace level encodings. (Keep in mind: " - "At least the developers of the business actions " - "represented by the same UnitOfWorkDefinition instance " - "should strive to use the same trace level encoding, " - "otherwise the administrator will have a hard time to " - "figure out what detailed information to expect.) \n" - "If the string is empty no traces are expected to be " - "produced. If the string is not empty, an associated " - "instance of TraceLevelType may be attached to the " - "UnitOfWorkDefinition instance. Still, it is useful to " - "incorporate TraceLevelTypeId into UnitOfWorkDefinition, " - "to relate to an instance of TraceLevelType. The " - "management application can more easily detect different " - "trace level types." ), - MaxLen ( 16 ), - ModelCorrespondence { "CIM_TraceLevelType.InstanceID" }] - string TraceLevelTypeId; - - -}; diff --git a/build/vendor/dmtf_mof/Metrics/CIM_UoWDefTraceLevelType.mof b/build/vendor/dmtf_mof/Metrics/CIM_UoWDefTraceLevelType.mof deleted file mode 100644 index dcd15762..00000000 --- a/build/vendor/dmtf_mof/Metrics/CIM_UoWDefTraceLevelType.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2007 DMTF. All rights reserved. - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Metrics::UnitOfWork" ), - Description ( - "Refers to the refinement of the UnitOfWorkDefinition: the " - "trace level type. It is not required that a UnitOfWork be " - "associated to a TraceLevelType. But if it is associated, only " - "one Type can be specified for the Definition. In contrast, " - "TraceLevelTypes can be reused for multiple Definitions." )] -class CIM_UoWDefTraceLevelType { - - [Key, Max ( 1 ), - Description ( - "The trace level type description that is implemented by " - "the UnitOfWorkDefinition." )] - CIM_TraceLevelType REF TraceLevelType; - - [Key, Description ( - "The UnitOfWorkDefinition which is refined by the " - "instance of TraceLevelType." )] - CIM_UnitOfWorkDefinition REF UoWDefn; - - -}; diff --git a/build/vendor/dmtf_mof/Metrics/CIM_UoWMetric.mof b/build/vendor/dmtf_mof/Metrics/CIM_UoWMetric.mof deleted file mode 100644 index 3657cc3d..00000000 --- a/build/vendor/dmtf_mof/Metrics/CIM_UoWMetric.mof +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2007 DMTF. All rights reserved. - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Metrics::UnitOfWork" ), - Description ( - "This association ties a MetricDefinition to an instance of a " - "UnitOfWork. Its primary purpose is to specify the value of the " - "Metric for the instance of UnitOfWork. It is defined as a " - "Dependency since the Metric value relies on the specific " - "UnitOfWork for context." )] -class CIM_UoWMetric : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "The UnitOfWork whose Metric value is specified." )] - CIM_UnitOfWork REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The MetricDefinition for this particular UnitOfWork and " - "value. Note that the MetricDefinition must be associated " - "(via UoWMetricDefinition) to the same " - "UnitOfWorkDefinition to which the UnitOfWork is weakly " - "associated." )] - CIM_MetricDefinition REF Dependent; - - [Description ( - "The value of the Metric for the referenced UnitOfWork. " - "Note that the type of the data and other information are " - "defined by the properties of MetricDefinition." )] - string Value; - - -}; diff --git a/build/vendor/dmtf_mof/Metrics/CIM_UoWMetricDefinition.mof b/build/vendor/dmtf_mof/Metrics/CIM_UoWMetricDefinition.mof deleted file mode 100644 index 4c2f246b..00000000 --- a/build/vendor/dmtf_mof/Metrics/CIM_UoWMetricDefinition.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2007 DMTF. All rights reserved. - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Metrics::UnitOfWork" ), - Description ( - "An association that describes the Metrics related to a " - "UnitOfWorkDefinition. This is a Dependency relationship since " - "the MetricDefinition relies on the UnitOfWorkDefinition for " - "context. At least one context must be defined for a " - "MetricDefinition, hence the Min (1) qualifier is placed on the " - "UnitOfWorkDefinition reference." )] -class CIM_UoWMetricDefinition : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Description ( - "The UnitOfWorkDefinition where the Metric applies." )] - CIM_UnitOfWorkDefinition REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The MetricDefinition for a particular UnitOfWork." )] - CIM_MetricDefinition REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_AFRelatedServices.mof b/build/vendor/dmtf_mof/Network/CIM_AFRelatedServices.mof deleted file mode 100644 index e5a8c894..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_AFRelatedServices.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AFRelatedServices -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "The IETF\'s RFC2597 describes a Differentiated Services " - "Per-Hop-Behavior (PHB) Group called Assured Forwarding (AF). " - "Quoting from the RFC, \'The AF PHB group provides delivery of " - "IP packets in four independently forwarded AF classes. Within " - "each AF class, an IP packet can be assigned one of three " - "different levels of drop precedence.\' The AFRelatedServices " - "association describes the precedence of the individual AF " - "drop-related Services within an AF IP packet-forwarding class." )] -class CIM_AFRelatedServices { - - [Key, Max ( 1 ), - Description ( - "The AFService with a lower drop precedence (ie, lower " - "probability of dropping packets)." )] - CIM_AFService REF AFLowerDropPrecedence; - - [Key, Description ( - "An AFService at the same IP packet-forwarding class " - "level, but at a higher drop precedence." )] - CIM_AFService REF AFHigherDropPrecedence; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_AFService.mof b/build/vendor/dmtf_mof/Network/CIM_AFService.mof deleted file mode 100644 index 8b7286d2..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_AFService.mof +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AFService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This class represents a specialization to the general concept " - "of forwarding network traffic by adding specific semantics " - "that characterize the operation of the Assured Forwarding (AF) " - "Service (RFC2597). This RFC defines four different AF classes " - "to represent four different treatments of traffic (e.g., a " - "different amount of forwarding resources, such as buffer space " - "and bandwidth, are allocated). Within each AF class, IP " - "packets are marked with one of three possible drop precedence " - "values. The drop precedence of a packet determines the " - "relative importance of that packet compared to other packets " - "within the same AF class if congestion occurs. A congested " - "interface will try to avoid dropping packets with a lower drop " - "precedence value by instead discarding packets with a higher " - "drop precedence value. \n" - "\n" - "Note that [R2597] defines 12 DSCPs that together represent the " - "AF Per Hop Behavior (PHB) group. Implementations are free to " - "extend this (e.g., add more classes and/or drop precedences). \n" - "\n" - "The AFService class is modeled as a specialization of " - "DiffServService, which is in turn a specialization of " - "QoSService. This enables it to be related to higher-level " - "QoSServices, as well as to lower-level conditioning " - "sub-services (e.g., classification, metering, dropping, " - "queuing, and others)." )] -class CIM_AFService : CIM_DiffServService { - - [Description ( - "This property is an 8-bit unsigned integer that " - "indicates the number of AF classes that this AF " - "implementation uses. Among the instances aggregated into " - "AFService (using QoSConditioningSubService), one SHOULD " - "find markers with as many distinct values as is " - "indicated by ClassNumber." )] - uint8 ClassNumber; - - [Description ( - "This property is an 8-bit unsigned integer that " - "indicates the number of drop precedence values that this " - "AF implementation uses. The number of drop precedence " - "values is the number PER AF CLASS. The corresponding " - "droppers are found in the collection of " - "ConditioningServices aggregated by " - "QoSConditioningSubService." )] - uint8 DropperNumber; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_AHTransform.mof b/build/vendor/dmtf_mof/Network/CIM_AHTransform.mof deleted file mode 100644 index bab29a68..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_AHTransform.mof +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AHTransform -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::IPsec" ), - Description ( - "AHTransform defines the parameters used for a phase 2 AH " - "(Authentication Header) Security Association." ), - MappingStrings { "IPSP Model.IETF|AHTransform" }] -class CIM_AHTransform : CIM_SATransform { - - [Description ( - "AHTransformId is an enumeration that specifies the hash " - "algorithm to be used. The list of values was generated " - "from RFC2407, Section 4.4.3." ), - ValueMap { "1", "2", "3", "4" }, - Values { "Other", "MD5", "SHA-1", "DES" }, - MappingStrings { "IPSP Model.IETF|AHTransform.AHTransformID", - "RFC2407.IETF|Section 4.4.3" }, - ModelCorrespondence { "CIM_AHTransform.OtherAHTransformId" }] - uint16 AHTransformId; - - [Description ( - "Description of the hash algorithm when the value 1 " - "(\"Other\") is specified for the property, " - "AHTransformId." ), - ModelCorrespondence { "CIM_AHTransform.AHTransformId" }] - string OtherAHTransformId; - - [Description ( - "UseReplayPrevention causes the local peer to enable " - "replay prevention detection. This can be accomplished by " - "using a sequence number when sending a packet or " - "checking the sequence number upon receipt of a packet." ), - MappingStrings { - "IPSP Model.IETF|AHTransform.UseReplayPrevention" }] - boolean UseReplayPrevention; - - [Description ( - "ReplayPreventionWindowsSize specifies, in bits, the " - "length of the sliding window used by the replay " - "prevention mechanism. The value of this property is " - "meaningless if UseReplayPrevention is false. The window " - "size MUST be a power of 2." ), - Units ( "Bits" ), - MappingStrings { - "IPSP Model.IETF|AHTransform.ReplayPreventionWindowSize" }] - uint32 ReplayPreventionWindowSize; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_ASBGPEndpoints.mof b/build/vendor/dmtf_mof/Network/CIM_ASBGPEndpoints.mof deleted file mode 100644 index c4b8295b..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_ASBGPEndpoints.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ASBGPEndpoints -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::ProtocolEndpoints" ), - Description ( - "This aggregation defines the different router interfaces that " - "are running BGP in the AutonomousSystem." )] -class CIM_ASBGPEndpoints : CIM_SystemComponent { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( - "The AutonomousSystem that aggregates the router " - "interfaces that are running BGP." )] - CIM_AutonomousSystem REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The router interfaces that are contained in the AS." )] - CIM_BGPProtocolEndpoint REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_AdministrativeDistance.mof b/build/vendor/dmtf_mof/Network/CIM_AdministrativeDistance.mof deleted file mode 100644 index a30e31df..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_AdministrativeDistance.mof +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AdministrativeDistance -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Routes" ), - Description ( - "Information in this class affects the choice of one protocol " - "over another, when two protocols learn the same route. " - "Properties define the preference of a protocol, called its " - "distance. The lower the distance, the higher the preference " - "for that protocol. This class affects ALL routes and contains " - "the default distances. Specific administrative distances " - "relative to an individual route and Forwarding Service are " - "defined in the NextHopForwardedByService association, its " - "AdminDistance property. \n" - "\n" - "AdministrativeDistance, being a global object, is weak to the " - "AdminDomain that contains it. Hence, the AdminDomain keys are " - "propagated to this class." )] -class CIM_AdministrativeDistance : CIM_LogicalElement { - - [Key, Description ( - "The scoping AdminDomain\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_AdminDomain.CreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The scoping AdminDomain\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_AdminDomain.Name" )] - string SystemName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." )] - string CreationClassName; - - [Key, Override ( "Name" ), - Description ( - "This is the name of the AdministrativeDistance class." ), - MaxLen ( 256 )] - string Name; - - [Description ( - "The distance for directly connected peers. It has a " - "default value of 0." )] - uint8 DirectConnect = 0; - - [Description ( - "The distance for staticly connected peers. It has a " - "default value of 1." )] - uint8 Static = 1; - - [Description ( - "The distance for peers using EBGP. It has a default value of 20." - )] - uint8 EBGP = 20; - - [Description ( - "The distance for peers using internal EIGRP. It has a " - "default value of 90." )] - uint8 EIGRPInternal = 90; - - [Description ( - "The distance for peers using IGRP. It has a default value of 100." - )] - uint8 IGRP = 100; - - [Description ( - "The distance for peers using OSPF. It has a default value of 110." - )] - uint8 OSPF = 110; - - [Description ( - "The distance for peers using ISIS. It has a default value of 115." - )] - uint8 ISIS = 115; - - [Description ( - "The distance for peers using RIP. It has a default value of 120." - )] - uint8 RIP = 120; - - [Description ( - "The distance for peers using EGP. It has a default value of 140." - )] - uint8 EGP = 140; - - [Description ( - "The distance for peers using external EIGRP. It has a " - "default value of 170." )] - uint8 EIGRPExternal = 170; - - [Description ( - "The distance for peers using IBGP. It has a default value of 200." - )] - uint8 IBGP = 200; - - [Description ( - "The distance for peers using BGP locally. It has a " - "default value of 200." )] - uint8 BGPLocal = 200; - - [Description ( - "The distance for peers using an unknown protocol. It has " - "a default value of 255." )] - uint8 Unknown = 255; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_AllocationSchedulingElement.mof b/build/vendor/dmtf_mof/Network/CIM_AllocationSchedulingElement.mof deleted file mode 100644 index d54b0838..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_AllocationSchedulingElement.mof +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AllocationSchedulingElement -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This class is a subclass of the abstract class " - "SchedulingElement. It introduces five new properties to " - "support bandwidth-based scheduling. As is the case with all " - "subclasses of SchedulingElement, the input associated with an " - "instance of AllocationSchedulingElement is of one of two " - "types: either a queue, or another scheduler." )] -class CIM_AllocationSchedulingElement : CIM_SchedulingElement { - - [Description ( - "A 16-bit unsigned integer enumeration that identifies " - "the units in which the BandwidthAllocation and " - "BurstAllocation properties are expressed. The following " - "values are defined: \n" - "- Bytes(1) \n" - "- Packets(2) \n" - "- Cells(3) (fixed-size, for example, ATM) \n" - "If no value is specified, 1 (\"Bytes\") should be " - "assumed." ), - ValueMap { "1", "2", "3" }, - Values { "Bytes", "Packets", "Cells" }] - uint16 AllocationUnits; - - [Description ( - "A 32-bit bit unsigned integer defining the number of " - "\'units\' per second that should be allocated to the " - "associated input. \'Units\' are identified by the " - "AllocationUnits property." ), - ModelCorrespondence { - "CIM_AllocationSchedulingElement.AllocationUnits" }] - uint32 BandwidthAllocation; - - [Description ( - "A 32-bit bit unsigned integer specifying the amount of " - "temporary or short-term bandwidth (in \'units\' per " - "second) that can be allocated to an input, beyond the " - "amount of bandwidth allocated through the " - "BandwidthAllocation property. If the maximum actual " - "bandwidth allocation for the input were to be measured, " - "it would be the sum of the BurstAllocation and the " - "BandwidthAllocation properties. \'Units\' are identified " - "by the AllocationUnits property." ), - ModelCorrespondence { - "CIM_AllocationSchedulingElement.AllocationUnits" }] - uint32 BurstAllocation; - - [Description ( - "A boolean property that, if TRUE, enables unused " - "bandwidth from the associated input to be allocated to " - "other inputs serviced by the Scheduler." )] - boolean CanShare; - - [Description ( - "A boolean property that, if TRUE, indicates that the " - "behavior of the scheduler relative to this input can be " - "altered by changing the value of the inherited property, " - "WorkConserving." )] - boolean WorkFlexible; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_AreaOfConfiguration.mof b/build/vendor/dmtf_mof/Network/CIM_AreaOfConfiguration.mof deleted file mode 100644 index 4470a273..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_AreaOfConfiguration.mof +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AreaOfConfiguration -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::OSPF" ), - Description ( - "This association connects an area configuration to its area. " - "The OSPFAreaConfiguration class is defined to act as a focal " - "point to bring together the router (indicated as a " - "ComputerSystem with an instance of OSPFService, associated to " - "the AreaConfiguration using OSPFServiceConfiguration), the " - "area (indicated as an OSPFArea, associated to the " - "AreaConfiguration using AreaOfConfiguration) and the address " - "ranges for advertising (indicated as instances of " - "RangeOfIPAddresses, associated to the AreaConfiguration using " - "RangesOfConfiguration). There is an instance of " - "OSPFAreaConfiguration for each connected area of a " - "router/OSPFService." )] -class CIM_AreaOfConfiguration : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The OSPF area." )] - CIM_OSPFArea REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The configuration which is applied to an OSPF area. This " - "is the Dependent reference in this association, since it " - "depends on the area for any functional significance." )] - CIM_OSPFAreaConfiguration REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_AssociatedNextHop.mof b/build/vendor/dmtf_mof/Network/CIM_AssociatedNextHop.mof deleted file mode 100644 index eff9b2c5..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_AssociatedNextHop.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AssociatedNextHop -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Routes" ), - Description ( - "AssociatedNextHop depicts the relationship between a route and " - "the specification of its next hop. The next hop is external to " - "a System, and hence is defined as a kind of " - "RemoteServiceAccessPoint. Note that this relationship is " - "independent of RouteUsesEndpoint (the local Endpoint used to " - "transmit the traffic), and both may be defined for a route." )] -class CIM_AssociatedNextHop : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The next hop for the route." )] - CIM_RemoteServiceAccessPoint REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The route sending traffic to the next hop." )] - CIM_NextHopRoute REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_AutonomousSystem.mof b/build/vendor/dmtf_mof/Network/CIM_AutonomousSystem.mof deleted file mode 100644 index f131931e..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_AutonomousSystem.mof +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AutonomousSystem -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::Systems" ), - Description ( - "An Autonomous System (AS) is a fundamental concept in " - "networking. An AS provides a structured view of routing by " - "segregating the system that is using routing (e.g., the " - "Internet, or an extranet) into a set of separately " - "administered domains that each have their own independent " - "routing policies. These domains are called autonomous systems. \n" - "\n" - "The classic definition of an AS, from RFC1771, is \'...a set " - "of routers under a single technical administration, using an " - "interior gateway protocol and common metrics to route packets " - "within the AS, and using an exterior gateway protocol to route " - "packets to other ASs\'. The RFC continues: \'Since this " - "classic definition was developed, it has become common for a " - "single AS to use several interior gateway protocols and " - "sometimes several sets of metrics within an AS. The use of the " - "term Autonomous System here stresses the fact that, even when " - "multiple IGPs and metrics are used, the administration of an " - "AS appears to other ASs to have a single coherent interior " - "routing plan and presents a consistent picture of what " - "destinations are reachable through it.\'" )] -class CIM_AutonomousSystem : CIM_AdminDomain { - - [Description ( - "An ASNumber is an integer between 1 and 65535, with the " - "range 64512 through 65535 reserved for private use. " - "Every AS has a unique AS number, which is assigned to it " - "by an Internet Registry or a provider. IANA assigns and " - "administers AS numbers." )] - uint16 ASNumber; - - [Description ( - "IsSingleHomed is a boolean that, when its value is TRUE, " - "indicates that this AS reaches networks outside of its " - "domain through a single exit point." )] - boolean IsSingleHomed; - - [Description ( - "IsTransit is a boolean that, when its value is TRUE, " - "indicates that this AS will advertise routes that it " - "learns from other ASs. A non-transit AS will only " - "advertise its own routes." )] - boolean IsTransit; - - [Description ( - "RequireIGPSync is a boolean that, when its value is " - "TRUE, indicates that this AS must obey the following " - "rule: a router should not advertise destinations learned " - "from internal neighbors to external destinations unless " - "those destinations are also known via some internal " - "gateway protocol. Otherwise, a router may receive " - "traffic that cannot yet be routed. However, since this " - "is a costly choice, it is common practice to allow this " - "rule to be broken under certain carefully controlled " - "circumstances." )] - boolean RequireIGPSync; - - [Description ( - "RoutingUpdateSource defines how routing information is " - "to be injected. Statically injected routes are " - "maintained by the routing table and are independent of " - "the status of the networks to which they refer. This is " - "done simply by defining static routes in the routing " - "table. Dynamically injected routes are of two types. " - "Dynamic routes refer to distributing all of the IGP " - "routes. Semi-dynamic routes define a set of specific IGP " - "routes that will be injected." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Static", "Dynamic", "Semi-Dynamic" }] - uint16 RoutingUpdateSource; - - [Description ( - "Route aggregation refers to summarizing ranges of routes " - "into one or more aggregate routes. This is done to " - "minimize the number of routes in the global routing " - "table. A potential drawback is that specific path " - "information (e.g., the Path attribute value) is lost, " - "which may lead to potential routing loops. There are a " - "variety of ways to ensure that this does not happen. " - "Note that BGP4 is required to do this. \n" - "\n" - "There are many ways to form aggregate routes. The " - "following are the most popular: \'Aggregate only\', " - "where only the aggregate is advertised, and all of its " - "more specific routes are suppressed; \'Aggregate Plus " - "Specific Routes\', where both the aggregate as well as " - "its more specific routes are advertised (e.g., send the " - "aggregate to the NAP, but send the more specific routes " - "to providers); \'Aggregate Based on a Subset of Specific " - "Routes\', where the aggregate route is formed by looking " - "at certain more specific routes and forming an aggregate " - "on them, suppressing all others." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "None", "Aggregate Only", - "Aggregate And All Specific Routes", - "Aggregate Based on Subset of Specific Routes" }] - uint16 AggregationType; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_AverageRateMeterService.mof b/build/vendor/dmtf_mof/Network/CIM_AverageRateMeterService.mof deleted file mode 100644 index 59988032..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_AverageRateMeterService.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AverageRateMeterService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This is a concrete subclass of MeterService that represents a " - "simple meter, called an Average Rate Meter. This type of meter " - "measures the average rate at which packets are submitted to it " - "over a specified time. Packets are defined as conformant if " - "their average arrival rate does not exceed the specified " - "measuring rate of the meter. Any packet that causes the " - "specified measuring rate to be exceeded is defined to be " - "non-conforming." )] -class CIM_AverageRateMeterService : CIM_MeterService { - - [Description ( - "This property is a 32-bit unsigned integer that defines " - "the rate used to determine whether admitted packets are " - "in conformance or not. The value is specified in " - "kilobits per second." ), - Units ( "KiloBits per Second" )] - uint32 AverageRate; - - [Description ( - "This property is a 64-bit unsigned integer that defines " - "the time period over which the average measurement " - "should be taken. The value is specified in microseconds." ), - Units ( "MicroSeconds" )] - uint64 DeltaInterval; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_BGPAdminDistance.mof b/build/vendor/dmtf_mof/Network/CIM_BGPAdminDistance.mof deleted file mode 100644 index be4f1813..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_BGPAdminDistance.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BGPAdminDistance -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "This is a specialization of the Dependency association, and " - "defines the relationship between a BGPService and the " - "AdministrativeDistances that it uses to control the (BGP) " - "routing decisions that it makes." )] -class CIM_BGPAdminDistance : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The table of (global) administrative distances that are " - "used by the BGPService." )] - CIM_AdministrativeDistance REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The BGPService object that makes BGP routing decisions." )] - CIM_BGPService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_BGPAttributes.mof b/build/vendor/dmtf_mof/Network/CIM_BGPAttributes.mof deleted file mode 100644 index e05f1dc9..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_BGPAttributes.mof +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BGPAttributes -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "This class defines the BGP Attributes, that can be used to " - "affect routing decisions. BGPAttributes are specific to a " - "given AutonomousSystem that contains it. Hence, the keys of " - "the AutonomousSystem are propagated to this class." )] -class CIM_BGPAttributes : CIM_LogicalElement { - - [Key, Description ( - "The scoping AutonomousSystem\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_AutonomousSystem.CreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The scoping AutonomousSystem\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_AutonomousSystem.Name" )] - string SystemName; - - [Key, Description ( - "This defines the version of the BGP protocol." )] - string Version; - - [Description ( - "This defines the priority, or preference, of a route, in " - "order to better compare it with other routes for the " - "same destination. Higher values indicate a higher " - "preference for a route." ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgp4PathAttrLocalPref" }] - uint16 LocalPreference; - - [Description ( - "This attribute is a sequences of the AS numbers through " - "which routing information carried in this UPDATE message " - "has passed. The components of this list can be AS_SETs " - "or AS_SEQUENCEs." ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgp4PathAttrASPath" }] - string ASPath; - - [Description ( - "This is the set of all elements contained in all " - "specific paths that are being summarized, so that those " - "attributes will remain available to the routing decision " - "process." )] - string AsSet; - - [Description ( - "This attribute defines the IP address of the border " - "router that should be used as the next hop to the " - "destinations listed in the UPDATE message." ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgp4PathAttrNextHop" }] - string NextHop; - - [Description ( - "This defines the next hop to be the IP address of the " - "border IBGP neighbor." )] - string NextHopSelf; - - [Description ( - "This is used on external (e.g., inter-AS) links to " - "indicate which is the preferred entry point into an AS, " - "when that AS has multiple entry points. Lower MED values " - "have preference." ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgp4PathAttrMultiExitDisc" }] - uint32 MED; - - [Description ( - "This defines a group of destinations that share a " - "similar property. Communities are not restricted to a " - "single AS, and can span multiple ASs. This attribute is " - "used to simplify routing policies by basing policies on " - "a logical value, as opposed to an IP address or an AS " - "number." )] - uint32 BGPCommunityValue; - - [Description ( - "This property is set to TRUE if there are overlapping " - "routes, and a less-specific route is selected instead of " - "a more specific one (e.g., a system propagates an " - "aggregate that causes loss of information). The value is " - "set to FALSE if a less-specific route is NOT selected." ), - MappingStrings { - "MIB.IETF|BGP4-MIB.bgp4PathAttrAtomicAggregate" }] - boolean AtomicAggregate; - - [Description ( - "This specifies the AS and IP address of the router that " - "has generated an aggregate." ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgp4PathAttrAggregatorAS" }] - string Aggregator; - - [Description ( - "This is generated by the AS that originates the routing " - "information. There are three types of origins - IGP, " - "EGP, and INCOMPLETE. These correspond to whether the " - "information was learned internally in the AS, externally " - "via an EGP, or by some other means." ), - ValueMap { "1", "2", "3" }, - Values { "IGP", "EGP", "INCOMPLETE" }, - MappingStrings { "MIB.IETF|BGP4-MIB.bgp4PathAttrOrigin" }] - uint16 Origin; - - [Description ( - "This is the router ID for the ORIGIN attribute." )] - string OriginatorID; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_BGPAttributesForRoute.mof b/build/vendor/dmtf_mof/Network/CIM_BGPAttributesForRoute.mof deleted file mode 100644 index 2c134fc2..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_BGPAttributesForRoute.mof +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BGPAttributesForRoute -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "This defines the attributes that are transmitted between BGP " - "peers on a per-route basis." )] -class CIM_BGPAttributesForRoute : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "The BGPPathAttribute object that may be associated with " - "a BGPIPRoute." )] - CIM_BGPPathAttributes REF Antecedent; - - [Override ( "Dependent" ), - Max ( 1 ), - Description ( - "The BGPIPRoute that may have an associated set of " - "per-peer attributes." )] - CIM_BGPIPRoute REF Dependent; - - [Description ( - "This defines the IP address of the peer where the path " - "information was learned." ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgp4PathAttrPeer" }, - ModelCorrespondence { - "CIM_BGPAttributesForRoute.PathAttrIPAddrPrefixLen", - "CIM_BGPAttributesForRoute.PathAttrIPAddrPrefix" }] - string PathAttrPeer; - - [Description ( - "This defines the length in bits of the IP address prefix " - "for the property, PathAttrPeer. The range is 0 to 32." ), - MappingStrings { - "MIB.IETF|BGP4-MIB.bgp4PathAttrIpAddrPrefixLen" }, - ModelCorrespondence { "CIM_BGPAttributesForRoute.PathAttrPeer" }] - uint8 PathAttrIPAddrPrefixLen; - - [Description ( - "The IP address prefix of the property, PathAttrPeer. Its " - "length is specified by the property, " - "PathAttrIpAddrPrefixLen." ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgp4PathAttrIpAddrPrefix" }, - ModelCorrespondence { - "CIM_BGPAttributesForRoute.PathAttrPeer", - "CIM_BGPAttributesForRoute.PathAttrIPAddrPrefixLen" }] - string PathAttrIPAddrPrefix; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_BGPCluster.mof b/build/vendor/dmtf_mof/Network/CIM_BGPCluster.mof deleted file mode 100644 index 09315b39..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_BGPCluster.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BGPCluster -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "The BGP speakers in an AS are required to be fully meshed. " - "This can lead to a huge number of TCP connections per router. " - "One way to reduce the peering requirements is to use a route " - "reflector. This is based on specifying one or more routers to " - "act as focal points for IBGP sessions. \n" - "\n" - "The route reflector as a whole is called a cluster. It is " - "logically divided into three types of routers: reflectors, " - "clients of the route reflector(s), and non-clients of the " - "route reflector. There can be more than one route reflector in " - "a cluster, and there can be more than one cluster in an AS." )] -class CIM_BGPCluster : CIM_CollectionOfMSEs { - - [Key, Description ( - "If a cluster has more than one route reflector, all of " - "the route reflectors in the cluster need to be " - "configured with a 4-byte cluster ID. This allows route " - "reflectors to recognize updates from other route " - "reflectors in the same cluster." )] - uint32 ClusterID; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_BGPClustersInAS.mof b/build/vendor/dmtf_mof/Network/CIM_BGPClustersInAS.mof deleted file mode 100644 index f2faf3ef..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_BGPClustersInAS.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BGPClustersInAS -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "This aggregation establishes \'whole-part\' relationships " - "between an AutonomousSystem and the BGPClusters that it " - "contains." )] -class CIM_BGPClustersInAS { - - [Key, Aggregate, Max ( 1 ), - Description ( - "The AutonomousSystem that aggregates the Clusters " - "belonging to it and administers them." )] - CIM_AutonomousSystem REF GroupAS; - - [Key, Description ( - "The Clusters that are contained in the AS." )] - CIM_BGPCluster REF PartAS; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_BGPEndpointStatistics.mof b/build/vendor/dmtf_mof/Network/CIM_BGPEndpointStatistics.mof deleted file mode 100644 index 8df56e84..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_BGPEndpointStatistics.mof +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BGPEndpointStatistics -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "This class contains statistical information for a connection " - "on a BGPProtocolEndpoint. It is defined as a subclass of " - "StatisticalData and associated with the Endpoint using the " - "relationship, ElementStatisticalData." )] -class CIM_BGPEndpointStatistics : CIM_StatisticalData { - - [Description ( - "This is the number of BGP UPDATE messages received on " - "this router\'s BGP connection. This is a 32-bit counter." ), - Counter, MappingStrings { "MIB.IETF|BGP4-MIB.bgpPeerInUpdates" }] - uint32 InUpdates; - - [Description ( - "This is the number of BGP UPDATE messages transmitted on " - "this router\'s BGP connection. This is a 32-bit counter." ), - Counter, MappingStrings { - "MIB.IETF|BGP4-MIB.bgpPeerOutUpdates" }] - uint32 OutUpdates; - - [Description ( - "This is the total number of BGP messages received on " - "this router\'s BGP connection. This is a 32-bit counter." ), - Counter, MappingStrings { - "MIB.IETF|BGP4-MIB.bgpPeerInTotalMessages" }] - uint32 InTotalMessages; - - [Description ( - "This is the total number of BGP messages transmitted on " - "this router\'s BGP connection. This is a 32-bit counter." ), - Counter, MappingStrings { - "MIB.IETF|BGP4-MIB.bgpPeerOutTotalMessages" }] - uint32 OutTotalMessages; - - [Description ( - "This contains the last error code and error subcode for " - "this router\'s BGP connection. If no error has occurred, " - "then each integer in the array is zero." ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgpPeerLastError" }] - uint8 LastError[]; - - [Description ( - "This contains the total number of times that the BGP " - "Finite State Machine has transitioned into the " - "established state for this router\'s BGP connection. " - "This is a 32-bit counter." ), - Counter, MappingStrings { - "MIB.IETF|BGP4-MIB.bgpPeerFsmEstablishedTransitions" }] - uint32 FsmEstablishedTransitions; - - [Description ( - "This indicates how long, in seconds, this peer has been " - "in the established state, or how long since this peer " - "was last in the established state. It is set to zero " - "when a new peer is configured or when the router is " - "booted. This has the semantics of a 32-bit gauge." ), - Units ( "Seconds" ), - Gauge, MappingStrings { - "MIB.IETF|BGP4-MIB.bgpPeerFsmEstablishedTime" }] - uint32 FsmEstablishedTime; - - [Description ( - "This defines the time in seconds since the last BGP " - "UPDATE message was received from the peer. This has the " - "semantics of a 32-bit gauge." ), - Units ( "Seconds" ), - Gauge, MappingStrings { - "MIB.IETF|BGP4-MIB.bgpPeerInUpdateElapsedTime" }] - uint32 InUpdateElapsedTime; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_BGPIPRoute.mof b/build/vendor/dmtf_mof/Network/CIM_BGPIPRoute.mof deleted file mode 100644 index 0529fac8..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_BGPIPRoute.mof +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BGPIPRoute -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "BGPIPRoute describes a BGP routing entry that connects two " - "peer routers that are running BGP. The source and destination " - "addresses may be either specific IP endpoints or IP subnets. " - "Examining the BGPIPRoute class definition, note that its " - "superclass IPRoute is deprecated. Unfortunately, IPRoute " - "cannot be removed from the object hierarchy without a major " - "Schema release. When/if this occurs, the IPRoute superclass " - "will be removed, and BGPIPRoute will subclass from " - "CIM_NextHopRouting directly." )] -class CIM_BGPIPRoute : CIM_IPRoute { - - [Description ( - "Usually, the administrative distance is used to " - "determine which route gets installed in the routing " - "table. Using this scheme, routes learned via EBGP will " - "win over routes learned via an IGP. If this is not " - "desired, then this assigns the administrative distance " - "of this route to be equal to that of a local route, " - "which means that the same route learned by an IGP will " - "have a lower administrative distance and be installed " - "instead." )] - boolean IsBackDoorRoute; - - [Description ( - "Loopback interfaces are often used by IBGP peers, " - "because they eliminate a dependency that would otherwise " - "occur if the actual IP address of a physical interface " - "was used to configure BGP. The loopback interface " - "instead instructs the router to use any available " - "interface." )] - boolean UsesLoopbackPeering; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_BGPPathAttributes.mof b/build/vendor/dmtf_mof/Network/CIM_BGPPathAttributes.mof deleted file mode 100644 index cd8aa9b4..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_BGPPathAttributes.mof +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BGPPathAttributes -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "This class defines the per-path information used to process " - "specific BGP attribute information, as defined in the " - "bgp4PathAttrTable of RFC 1657." )] -class CIM_BGPPathAttributes : CIM_LogicalElement { - - [Key, Description ( - "A comma-separated list of AS numbers, as would be stored " - "in the value portion of the path segment in the " - "PathAttrASPathSegment property. This list can be ordered " - "or unordered." ), - MaxLen ( 512 )] - string ASNumbers; - - [Key, Description ( - "This is the address of the border router that should be " - "used for the destination network." ), - MaxLen ( 32 ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgp4PathAttrNextHop" }] - string PathAttrNextHop; - - [Description ( - "This property and its description are taken directly " - "from RFC 1657. The property represents a sequence of AS " - "path segments. Each AS path segment is represented by " - "the tuple: \n" - " \n" - "The type is a 1-octet field which has two possible " - "values: \n" - "1 = AS_SET \n" - "2 = AS_SEQUENCE \n" - "An AS_SET is an unordered set of ASs representing the " - "path that an UPDATE message has traversed, and an " - "AS_SEQUENCE is an ordered set of ASs representing the " - "path that an UPDATE message has traversed. \n" - "The length is a 1-octet field containing the number of " - "ASs in the value field. \n" - "The value field contains one or more AS numbers, each AS " - "is represented in the octet string as a pair of octets " - "according to the following algorithm: \n" - "first-byte-of-pair = ASNumber / 256; \n" - "second-byte-of-pair = ASNumber & 255; \n" - "This property is mapped from the " - "bgp4PathAttrASPathSegment MIB variable, which is an " - "OctetString. Its length is defined as a minimum of 2 and " - "a maximum of 255 octets." ), - OctetString, MappingStrings { - "MIB.IETF|BGP4-MIB.bgp4PathAttrASPathSegment" }] - uint8 PathAttrASPathSegment[]; - - [Description ( - "This is an enumeration that defines the ultimate origin " - "of the path information. The value \'IGP\' means that " - "the origin is interior; the value \'EGP\' means that it " - "was learned via an EGP; the value \'INCOMPLETE\' means " - "that the origin is undetermined." ), - ValueMap { "1", "2", "3" }, - Values { "IGP", "EGP", "Incomplete" }, - MappingStrings { "MIB.IETF|BGP4-MIB.bgp4PathAttrOrigin" }] - uint16 PathAttrOrigin; - - [Description ( - "This metric is used to discriminate between multiple " - "adjacent autonomous systems. A value of -1 indicates the " - "absence of this attribute. The range of this attribute " - "is defined to be -1 to 2147483647." ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgp4PathAttrMultiExitDisc" }] - sint32 PathAttrMultiExitDisc; - - [Description ( - "This is the originating BGP4 speaker\'s degree of " - "preference for an advertised route. A value of -1 " - "indicates the absence of this attribute. The range of " - "this attribute is defined to be -1 to 2147483647." ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgp4PathAttrLocalPref" }] - sint32 PathAttrLocalPref; - - [Description ( - "This is an enumeration that defines whether or not the " - "local system has selected a less specific route without " - "selecting a more specific route. There are two values, 1 " - "and 2, indicating that a less specific route has not and " - "has been selected, respectively. This is a 32-bit " - "integer to correspond to the IETF MIB." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "Less Specific Not Selected", - "Less Specific Selected" }, - MappingStrings { - "MIB.IETF|BGP4-MIB.bgp4PathAttrAtomicAggregate" }] - uint32 PathAttrAtomicAggregate; - - [Description ( - "This is the AS number of the last BGP speaker that " - "performed route aggregation. A value of 0 indicates the " - "absence of this attribute. The range of this attribute " - "is defined to be 0 to 65535." ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgp4PathAttrAggregatorAS" }] - uint16 PathAttrAggregatorAS; - - [Description ( - "This is the IP address of the last BGP speaker that " - "performed route aggregation. A value of 0.0.0.0 " - "indicates the absence of this attribute." ), - MappingStrings { - "MIB.IETF|BGP4-MIB.bgp4PathAttrAggregatorAddr" }] - string PathAttrAggregatorAddr; - - [Description ( - "This is the degree of preference calculated by the " - "receiving BGP speaker for an advertised route. A value " - "of -1 indicates the absence of this attribute. The range " - "of this attribute is defined to be -1 to 2147483647." ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgp4PathAttrCalcLocalPref" }] - sint16 PathAttrCalcLocalPref; - - [Description ( - "This is an indication of whether or not this route was " - "chosen as the best BGP route. There are three possible " - "values, 0 (Unknown), 1 (FALSE) and 2 (TRUE)." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "False", "True" }, - MappingStrings { "MIB.IETF|BGP4-MIB.bgp4PathAttrBest" }] - uint16 PathAttrBest; - - [Description ( - "This contains one or more path atributes not understood " - "by this BGP speaker. It is a array of path attributes " - "that are not understood. The number of attributes is " - "placed in a separate property of this class, " - "PathAttrUnknownNumber." ), - OctetString, MappingStrings { - "MIB.IETF|BGP4-MIB.bgp4PathAttrUnknown" }, - ModelCorrespondence { - "CIM_BGPPathAttributes.PathAttrUnknownNumber" }] - string PathAttrUnknown[]; - - [Description ( - "The number of unknown attributes in the array, PathAttrUnknown." - ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgp4PathAttrUnknown" }, - ModelCorrespondence { "CIM_BGPPathAttributes.PathAttrUnknown" }] - uint16 PathAttrUnknownNumber; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_BGPPeerGroup.mof b/build/vendor/dmtf_mof/Network/CIM_BGPPeerGroup.mof deleted file mode 100644 index 2df933db..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_BGPPeerGroup.mof +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BGPPeerGroup -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "A BGP Peer Group is a set of BGP neighbors that share the same " - "update policies. This enables an administrator to assign " - "policies to the peer group, instead of individually. This " - "enables the routers in the Peer Group to optimize UPDATE " - "messages. Consequently, Peer Groups have a set of restrictions " - "that must be followed in order to work correctly with external " - "BGP peers. Otherwise, loss of routing information could occur. \n" - "\n" - "A BGPPeerGroup is weak to the AutonomousSystem that contains " - "it. Therefore, the keys from System must be propagated to it." )] -class CIM_BGPPeerGroup : CIM_CollectionOfMSEs { - - [Key, Description ( - "The scoping AutonomousSystem\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_AutonomousSystem.CreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The scoping AutonomousSystem\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_AutonomousSystem.Name" )] - string SystemName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." )] - string CreationClassName; - - [Key, Description ( "This is the name of the BGP Peer Group." ), - MaxLen ( 256 )] - string Name; - - [Description ( - "This defines the time interval, in seconds, for the " - "ConnectRetry timer for the endpoints of the routers in " - "the PeerGroup. The suggested value is 120 seconds." ), - Units ( "Seconds" ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgpConnectRetryInterval" }] - uint32 ConnectRetryInterval = 120; - - [Description ( - "This defines the time interval in seconds for the Hold " - "TimeConfigured property of the endpoints of the routers " - "in the PeerGroup. This value must not be less than three " - "seconds. The suggested value for this timer is 90 " - "seconds." ), - Units ( "Seconds" ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgpPeerHoldTimeConfigured" }] - uint16 HoldTimeConfigured = 90; - - [Description ( - "This defines the time interval in seconds for the " - "KeepAliveConfigured timer for the endpoints of the " - "routers in the PeerGroup. The suggested value for this " - "property is 30 seconds. The maximum value of this " - "property is 21845 seconds." ), - Units ( "Seconds" ), - MappingStrings { - "MIB.IETF|BGP4-MIB.bgpPeerKeepAliveConfigured" }] - uint16 KeepAliveConfigured = 30; - - [Description ( - "This defines the time interval in seconds for the " - "MinASOriginationInterval timer for the endpoints of the " - "routers in the PeerGroup. The suggested value for this " - "property is 15 seconds." ), - Units ( "Seconds" ), - MappingStrings { - "MIB.IETF|BGP4-MIB.bgpPeerMinASOriginationInterval" }] - uint16 MinASOriginationInterval = 15; - - [Description ( - "This defines the time interval in seconds for the " - "MinRouteAdvertisementInterval timer for the endpoints of " - "the routers in the PeerGroup. The suggested value for " - "this property is 30 seconds." ), - Units ( "Seconds" ), - MappingStrings { - "MIB.IETF|BGP4-MIB.bgpPeerMinRouteAdvertisementInterval" }] - uint16 MinRouteAdvertisementInterval = 30; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_BGPPeerGroupService.mof b/build/vendor/dmtf_mof/Network/CIM_BGPPeerGroupService.mof deleted file mode 100644 index 0b7526d3..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_BGPPeerGroupService.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BGPPeerGroupService -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "This defines the relationship between a BGPService and a " - "specific BGPPeerGroup in which it is executing." )] -class CIM_BGPPeerGroupService : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "The BGPPeerGroup in which the BGPService is executing." )] - CIM_BGPPeerGroup REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The BGPService that is executing in the BGPPeerGroup." )] - CIM_BGPService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_BGPPeerUsesRouteMap.mof b/build/vendor/dmtf_mof/Network/CIM_BGPPeerUsesRouteMap.mof deleted file mode 100644 index aa80cd02..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_BGPPeerUsesRouteMap.mof +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BGPPeerUsesRouteMap -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "This association defines the RouteMaps that are aggregated and " - "used by a particular BGPPeerGroup object. Multiple instances " - "of the same RouteMap may be aggregated into the same " - "BGPPeerGroup. If this is desired, then the MapSequence " - "attribute of the association can be used to disambiguate them." )] -class CIM_BGPPeerUsesRouteMap : CIM_CollectedMSEs { - - [Aggregate, Override ( "Collection" ), - Description ( - "The BGPPeerGroup that aggregates the RouteMaps." )] - CIM_BGPPeerGroup REF Collection; - - [Override ( "Member" ), - Description ( - "The RouteMaps that are used by the BGPPeerGroup." )] - CIM_BGPRouteMap REF Member; - - [Description ( - "This defines the position of this RouteMap instance " - "relative to all other instances of the same RouteMap." )] - uint16 MapSequence; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_BGPProtocolEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_BGPProtocolEndpoint.mof deleted file mode 100644 index 7bf7d579..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_BGPProtocolEndpoint.mof +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Correct ValueMaps for ProtocolIfTypeAdd UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BGPProtocolEndpoint -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::ProtocolEndpoints" ), - Description ( - "A ProtocolEndpoint that is dedicated to running BGP." )] -class CIM_BGPProtocolEndpoint : CIM_ProtocolEndpoint { - - [Description ( - "A boolean that, when TRUE, signifies that this is an " - "instance of the external version of BGP (FALSE is the " - "internal version)." )] - boolean IsEBGP; - - [Description ( - "Normally, two routers running EBGP must be physically " - "connected. This boolean, when TRUE, denotes a LOGICAL " - "connection between two routers that are running EBGP " - "(e.g., there is an intermediate router or interface " - "between them)." )] - boolean IsEBGPMultihop; - - [Description ( - "This is the unique identifier of the local BGP router. " - "This is often the router ID (e.g., an IP address)." ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgpIdentifier" }] - string LocalIdentifier; - - [Description ( - "This is the unique identifier of the peer BGP router. " - "This is often the router ID (e.g., an IP address)." ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgpPeerIdentifier" }] - string PeerIdentifier; - - [Description ( - "This defines the current connection state of the BGP Peer." - ), - ValueMap { "1", "2", "3", "4", "5", "6" }, - Values { "Idle", "Connect", "Active", "OpenSet", - "OpenConfirm", "Established" }, - MappingStrings { "MIB.IETF|BGP4-MIB.bgpPeerState" }] - uint16 State; - - [Deprecated { "CIM_EnabledLogicalElement.RequestedState" }, - Description ( - "This defines the desired state of the BGP connection. It " - "is equivalent to the RequestedState property (i.e., " - "enabled/disabled status) that is inherited from " - "EnabledLogicalElement. AdminStatus is deprecated in lieu " - "of this inherited property." ), - ValueMap { "1", "2" }, - Values { "Stop", "Start" }, - MappingStrings { "MIB.IETF|BGP4-MIB.bgpPeerAdminStatus" }] - uint16 AdminStatus; - - [Description ( - "This defines the negotiated version of BGP that is " - "running between the two peers." ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgpPeerNegotiatedVersion" }] - string NegotiatedVersion; - - [Deprecated { "CIM_BindsTo", "CIM_IPProtocolEndpoint" }, - Description ( - "This is the local IP address of this router\'s BGP " - "connection. It is deprecated since a binding should be " - "defined using the CIM_BindsTo association. Ideally the " - "binding is to a TCPProtocolEndpoint which then handles " - "the association to its IPEndpoint." ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgpPeerLocalAddr" }] - string LocalAddress; - - [Deprecated { "CIM_BindsTo", "CIM_TCPProtocolEndpoint" }, - Description ( - "This is the local port number for the TCP connection of " - "this router\'s BGP connection. It is deprecated since a " - "binding should be defined (to a TCPProtocolEndpoint) " - "using the CIM_BindsTo association." ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgpPeerLocalPort" }] - uint16 LocalPort; - - [Deprecated { "CIM_BindsTo", "CIM_RemoteServiceAccessPoint" }, - Description ( - "This is the remote IP address of this router\'s BGP " - "connection. It is deprecated since a binding to a Remote " - "ServiceAccessPoint should be instantiated, using " - "CIM_BindsTo." ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgpPeerRemoteAddr" }] - string RemoteAddress; - - [Deprecated { "CIM_BindsTo", "CIM_RemotePort" }, - Description ( - "This is the remote port number for the TCP connection of " - "this router\'s BGP connection. It is deprecated since a " - "binding to a RemotePort should be instantiated, using " - "CIM_BindsTo." ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgpPeerRemotePort" }] - uint16 RemotePort; - - [Description ( - "This is the remote AS number for this router\'s BGP connection." - ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgpPeerRemoteAs" }] - uint16 RemoteAS; - - [Description ( - "This defines the time interval, in seconds, for the " - "ConnectRetry timer. The suggested value is 120 seconds." ), - Units ( "Seconds" ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgpConnectRetryInterval" }] - uint32 ConnectRetryInterval = 120; - - [Description ( - "This defines the time interval in seconds for the Hold " - "Time configured for this BGP speaker with a peer. This " - "value is placed in an OPEN message sent to a peer by " - "this BGP speaker, and is compared with the Hold Time " - "field in the OPEN message received from the peer. It " - "enables this speaker to establish a mutually agreeable " - "Hold Time with the peer. This value must not be less " - "than three seconds. If it is zero, then the Hold Time is " - "NOT to be established with the peer. The suggested value " - "for this timer is 90 seconds." ), - Units ( "Seconds" ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgpPeerHoldTimeConfigured" }] - uint16 HoldTimeConfigured = 90; - - [Description ( - "This defines the time interval in seconds for the " - "KeepAlive timer configured for this BGP speaker with a " - "peer. This value will determine the frequency of the " - "KEEPALIVE messages relative to the value of the " - "HoldTimeConfigured property; the actual frequency is " - "specified by the value of the KeepAlive property. A " - "reasonable value is one third of that of the value of " - "the HoldTimeConfigured property. If it is zero, then NO " - "periodic KEEPALIVE messages are sent to the peer. The " - "suggested value for this property is 30 seconds. The " - "maximum value of this property is 21845 seconds." ), - Units ( "Seconds" ), - MappingStrings { - "MIB.IETF|BGP4-MIB.bgpPeerKeepAliveConfigured" }] - uint16 KeepAliveConfigured = 30; - - [Description ( - "This defines the time interval in seconds for the " - "MinASOriginationInterval timer. The suggested value for " - "this property is 15 seconds." ), - Units ( "Seconds" ), - MappingStrings { - "MIB.IETF|BGP4-MIB.bgpPeerMinASOriginationInterval" }] - uint16 MinASOriginationInterval = 15; - - [Description ( - "This defines the time interval in seconds for the " - "MinRouteAdvertisementInterval timer. The suggested value " - "for this property is 30 seconds." ), - Units ( "Seconds" ), - MappingStrings { - "MIB.IETF|BGP4-MIB.bgpPeerMinRouteAdvertisementInterval" }] - uint16 MinRouteAdvertisementInterval = 30; - - [Description ( - "This defines the maximum amount of time in seconds that " - "may elapse between the receipt of successive KEEPALIVE " - "or UPDATE messages. This is instrumented as a counter " - "that increments from zero to the value specified in this " - "property. The value of this property is calculated by " - "the BGP speaker by using the smaller of the values of " - "bgpPeerHoldTimeConfigured and the Hold Time received in " - "the OPEN message. This value, if not zero seconds, must " - "be at least three seconds, up to a maximum of 65535 " - "seconds. Receipt of either a KEEPALIVE or an UPDATE " - "message resets this value." ), - Units ( "Seconds" ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgpPeerHoldTime" }] - uint16 HoldTime; - - [Description ( - "This defines the time interval in seconds for the " - "KeepAlive timer established with the peer. The value of " - "this property is calculated by the speaker such that, " - "when compared with the HoldTime property, it has the " - "same proportion as the KeepAliveConfigured property has " - "with the HoldTimeConfigured property. A value of 0 " - "indicates that the KeepAlive timer has not yet been " - "established. The maximum value of this property is 21845 " - "seconds." ), - Units ( "Seconds" ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgpPeerKeepAlive" }] - uint16 KeepAlive; - - [Override ( "ProtocolIFType" ), - Description ( - "ProtocolIFType\'s enumeration is limited to BGP and " - "reserved values for this subclass of ProtocolEndpoint." ), - ValueMap { "1", "225..4095", "4108", "4301..32767", "32768.." }, - Values { "Other", "IANA Reserved", "BGP", "DMTF Reserved", - "Vendor Reserved" }] - uint16 ProtocolIFType = 4108; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_BGPRouteMap.mof b/build/vendor/dmtf_mof/Network/CIM_BGPRouteMap.mof deleted file mode 100644 index 5efd63bb..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_BGPRouteMap.mof +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BGPRouteMap -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "A route map is used to control and modify routing information " - "as well as to define when a route is redistributed between " - "routing domains. Route maps are placed in router configuration " - "files, and several instances of the same route map may be used " - "to implement different actions. RouteMaps MAY use FilterLists " - "to identify the route. \n" - "\n" - "A BGPRouteMap is specific to a given AutonomousSystem that " - "contains it. Hence, the keys of the AutonomousSystem are " - "propagated to this class." )] -class CIM_BGPRouteMap : CIM_LogicalElement { - - [Key, Description ( - "The scoping AutonomousSystem\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_AutonomousSystem.CreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The scoping AutonomousSystem\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_AutonomousSystem.Name" )] - string SystemName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." )] - string CreationClassName; - - [Key, Override ( "Name" ), - Description ( "This is the name of the RouteMap class." ), - MaxLen ( 256 )] - string Name; - - [Description ( - "This defines whether this RouteMap is used for input, " - "output, or both input and output filtering." ), - ValueMap { "1", "2", "3" }, - Values { "Input", "Output", "Both" }] - uint16 Direction; - - [Description ( - "This defines whether the action should be to forward or " - "deny traffic meeting the match condition specified in " - "this RouteMap." ), - ValueMap { "1", "2" }, - Values { "Permit", "Deny" }] - uint16 Action; - - [Description ( - "This specifies the criteria that must be matched in " - "order for the corresponding MatchAction to take effect. " - "The matching of the criteria may be specified by using a " - "FilterList. For example, the command \'match ip address " - "foo\' uses the FilterList named \'foo\' to do the " - "matching of IP addresses." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9" }, - Values { "Other", "Source Address and Mask", - "Destination Address and Mask", "Source Port", - "Source Port Range", "Destination Port", - "Destination Port Range", "Protocol Type", - "Protocol Type and Option" }, - ModelCorrespondence { - "CIM_BGPRouteMap.OtherMatchConditionType" }] - uint16 MatchConditionType; - - [Description ( - "If the value of the MatchConditionType property in this " - "class is 1 (i.e., \"Other\"), then the specific type of " - "filtering is specified in this property." ), - ModelCorrespondence { "CIM_BGPRouteMap.MatchConditionType" }] - string OtherMatchConditionType; - - [Description ( - "This defines an additional action to take if the " - "MatchCondition is satisfied. This definition is " - "specifically limited to BGP filtering at this time. The " - "actual value of the metric is specified in the " - "SetMetricValue property." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9" }, - Values { "Origin", "AS_Path", "NEXT_HOP", "Multi_Exit_Disc", - "Local_Pref", "Atomic_Aggregate", "Aggregator", - "Community", "Originator_ID" }, - ModelCorrespondence { "CIM_BGPRouteMap.SetMetricValue" }] - uint16 SetMetricType; - - [Description ( - "This is the value of the metric that is being set for " - "the BGP attribute defined in the SetMetricType property." )] - string SetMetricValue; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_BGPRouteMapsInRoutingPolicy.mof b/build/vendor/dmtf_mof/Network/CIM_BGPRouteMapsInRoutingPolicy.mof deleted file mode 100644 index d5dea6d7..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_BGPRouteMapsInRoutingPolicy.mof +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BGPRouteMapsInRoutingPolicy -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "This aggregation defines the BGPRouteMaps that are used by a " - "particular RoutingPolicy object. Multiple instances of the " - "same RouteMap may be used in the same RoutingPolicy instance. " - "If this is desired, then the Sequence attribute of this " - "aggregation can be used to disambiguate them." )] -class CIM_BGPRouteMapsInRoutingPolicy : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Description ( - "The RoutingPolicy that aggregates the RouteMaps." )] - CIM_RoutingPolicy REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The RouteMaps that are used by the RoutingPolicy." )] - CIM_BGPRouteMap REF PartComponent; - - [Description ( - "This defines the position of this RouteMap instance " - "relative to all other instances of the same RouteMap." )] - uint16 MapSequence; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_BGPRoutingPolicy.mof b/build/vendor/dmtf_mof/Network/CIM_BGPRoutingPolicy.mof deleted file mode 100644 index c6997f8f..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_BGPRoutingPolicy.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BGPRoutingPolicy -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "This is a specialization of the Dependency association, and " - "defines the relationship between a BGPService and the " - "RoutingPolicy that control it." )] -class CIM_BGPRoutingPolicy : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The BGP routing policy object." )] - CIM_RoutingPolicy REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The BGPService that operates according to the routing policy." - )] - CIM_BGPService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_BGPService.mof b/build/vendor/dmtf_mof/Network/CIM_BGPService.mof deleted file mode 100644 index 6fa1ccf0..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_BGPService.mof +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BGPService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "This class is used to represent the basic operation of BGP. It " - "is derived from RouteCalculationService, the superclass of all " - "routing protocols." )] -class CIM_BGPService : CIM_RouteCalculationService { - - [Description ( - "The BGPVersion property defines the version of BGP that " - "this router is using. This is part of the BGP peer " - "negotiation process)." ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgpVersion" }] - uint8 BGPVersion; - - [Description ( - "BGP sends errors using a NOTIFICATION message. This " - "message contains an error code, an error subcode, and " - "error data. The error code defines the type of the " - "notification. The \'Cease\' error is for all fatal " - "errors that are not one of the other five types of " - "errors. For several of the errors, subcode information " - "is also enumerated in other properties of this class." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6" }, - Values { "None", "Message Header Error", - "OPEN Message Error", "UPDATE Message Error", - "Hold Timer Expired", "Finite State Machine Error", "Cease" }] - uint16 LastErrorCode; - - [Description ( - "This defines the BGP error subcode for message header " - "errors (LastErrorCode = 1). If LastErrorCode is any " - "other value, then this property should be set to NULL." ), - ValueMap { "0", "1", "2", "3" }, - Values { "None", "Connection Not Synchronized", - "Bad Message Length", "Bad Message Type" }] - uint16 LastMessageErrorSubCode; - - [Description ( - "This defines the BGP error subcode for OPEN message " - "errors (LastErrorCode = 2). If LastErrorCode is any " - "other value, then this property should be set to NULL." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6" }, - Values { "None", "Unsupported Version Number", "Bad Peer AS", - "Bad BGP Identifier", "Unsupported Optional Parameter", - "Authentication Failure", "Unacceptable Hold Time" }] - uint16 LastOpenErrorSubCode; - - [Description ( - "This defines the BGP error subcode for UPDATE message " - "errors (LastErrorCode = 3). If LastErrorCode is any " - "other value, then this property should be set to NULL." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11" }, - Values { "None", "Malformed Attribute List", - "Unrecognized Well-Known Attribute", - "Missing Well-Known Attribute", "Attribute Flags Error", - "Attribute Length Error", "Invalid Origin Attribute", - "AS Routing Loop", "Invalid NEXT_HOP Attribute", - "Optional Attribute Error", "Invalid Network Field", - "Malformed AS_path" }] - uint16 LastUpdateErrorSubCode; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_BGPServiceAttributes.mof b/build/vendor/dmtf_mof/Network/CIM_BGPServiceAttributes.mof deleted file mode 100644 index b23311db..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_BGPServiceAttributes.mof +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BGPServiceAttributes -// ================================================================== - [Association, Deprecated { "No value" }, - Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "This is a specialization of the Component aggregation. This " - "aggregation defines the set of BGPPathAttributes that are " - "transmitted in per-path UPDATE messages. The association is " - "deprecated since it is incorrectly defined as a Component " - "relationship, and since the properties of BGPPathAttribute are " - "path/endpoint-specific (not defined at the level of the " - "Service)." )] -class CIM_BGPServiceAttributes : CIM_Component { - - [Deprecated { "No value" }, - Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( - "The BGPService that aggregates BGPPathAttributes as part " - "of its routing information." )] - CIM_BGPService REF GroupComponent; - - [Deprecated { "No value" }, - Override ( "PartComponent" ), - Max ( 1 ), - Description ( - "The BGP attribute, which are part-of the BGP UPDATE message." - )] - CIM_BGPPathAttributes REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_BGPServiceStatistics.mof b/build/vendor/dmtf_mof/Network/CIM_BGPServiceStatistics.mof deleted file mode 100644 index 42d40087..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_BGPServiceStatistics.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BGPServiceStatistics -// ================================================================== - [Association, Deprecated { "CIM_ElementStatisticalData" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "This association defines statistics collected for a BGP " - "Service. The relationship is deprecated since the class " - "BGPStatistics is deprecated. It is incorrectly associated with " - "a BGPService, but should instead be associated with a " - "BGPProtocolEndpoint using the ElementStatisticalData " - "relationship." )] -class CIM_BGPServiceStatistics : CIM_ServiceStatistics { - - [Deprecated { "CIM_ElementStatisticalData.Stats" }, - Override ( "Stats" ), - Max ( 1 ), - Description ( "The statistics object for the BGP session." )] - CIM_BGPStatistics REF Stats; - - [Deprecated { "CIM_ElementStatisticalData.ManagedElement" }, - Override ( "Element" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The BGPService for which statistics are being gathered." )] - CIM_BGPService REF Element; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_BGPStatistics.mof b/build/vendor/dmtf_mof/Network/CIM_BGPStatistics.mof deleted file mode 100644 index 409264b5..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_BGPStatistics.mof +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BGPStatistics -// ================================================================== - [Deprecated { "CIM_BGPEndpointStatistics" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "This class contains statistical information for a Service\'s " - "sessions. It is deprecated since the statistics are defined in " - "the BGP4 MIB at the level of individual peers/ endpoints." )] -class CIM_BGPStatistics : CIM_ServiceStatisticalInformation { - - [Deprecated { "CIM_BGPEndpointStatistics.InUpdates" }, - Description ( - "This is the number of BGP UPDATE messages received on " - "this router\'s BGP connection. This is a 32-bit counter." ), - Counter, MappingStrings { "MIB.IETF|BGP4-MIB.bgpPeerInUpdates" }] - uint32 InUpdates; - - [Deprecated { "CIM_BGPEndpointStatistics.OutUpdates" }, - Description ( - "This is the number of BGP UPDATE messages transmitted on " - "this router\'s BGP connection. This is a 32-bit counter." ), - Counter, MappingStrings { - "MIB.IETF|BGP4-MIB.bgpPeerOutUpdates" }] - uint32 OutUpdates; - - [Deprecated { "CIM_BGPEndpointStatistics.InTotalMessages" }, - Description ( - "This is the total number of BGP messages received on " - "this router\'s BGP connection. This is a 32-bit counter." ), - Counter, MappingStrings { - "MIB.IETF|BGP4-MIB.bgpPeerInTotalMessages" }] - uint32 InTotalMessages; - - [Deprecated { "CIM_BGPEndpointStatistics.OutTotalMessages" }, - Description ( - "This is the total number of BGP messages transmitted on " - "this router\'s BGP connection. This is a 32-bit counter." ), - Counter, MappingStrings { - "MIB.IETF|BGP4-MIB.bgpPeerOutTotalMessages" }] - uint32 OutTotalMessages; - - [Deprecated { "CIM_BGPEndpointStatistics.LastError" }, - Description ( - "This contains the last error code and error subcode for " - "this router\'s BGP connection. If no error has occurred, " - "then each integer in the array is zero." ), - MappingStrings { "MIB.IETF|BGP4-MIB.bgpPeerLastError" }] - uint8 LastError[]; - - [Deprecated { - "CIM_BGPEndpointStatistics.FsmEstablishedTransitions" }, - Description ( - "This contains the total number of times that the BGP " - "Finite State Machine has transitioned into the " - "established state for this router\'s BGP connection. " - "This is a 32-bit counter." ), - Counter, MappingStrings { - "MIB.IETF|BGP4-MIB.bgpPeerFsmEstablishedTransitions" }] - uint32 FsmEstablishedTransitions; - - [Deprecated { "CIM_BGPEndpointStatistics.FsmEstablishedTime" }, - Description ( - "This indicates how long, in seconds, this peer has been " - "in the established state, or how long since this peer " - "was last in the established state. It is set to zero " - "when a new peer is configured or when the router is " - "booted. This has the semantics of a 32-bit gauge." ), - Units ( "Seconds" ), - Gauge, MappingStrings { - "MIB.IETF|BGP4-MIB.bgpPeerFsmEstablishedTime" }] - uint32 FsmEstablishedTime; - - [Deprecated { "CIM_BGPEndpointStatistics.InUpdateElapsedTime" }, - Description ( - "This defines the time in seconds since the last BGP " - "UPDATE message was received from the peer. This has the " - "semantics of a 32-bit gauge." ), - Units ( "Seconds" ), - Gauge, MappingStrings { - "MIB.IETF|BGP4-MIB.bgpPeerInUpdateElapsedTime" }] - uint32 InUpdateElapsedTime; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_BindsToLANEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_BindsToLANEndpoint.mof deleted file mode 100644 index 3ad80ada..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_BindsToLANEndpoint.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BindsToLANEndpoint -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::ProtocolEndpoints" ), - Description ( - "This association makes explicit the dependency of a SAP or " - "ProtocolEndpoint on an underlying LANEndpoint, on the same " - "system." )] -class CIM_BindsToLANEndpoint : CIM_BindsTo { - - [Override ( "Antecedent" ), - Description ( - "The underlying LANEndpoint, which is depended upon." )] - CIM_LANEndpoint REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The AccessPoint or ProtocolEndpoint dependent on the LANEndpoint." - )] - CIM_ServiceAccessPoint REF Dependent; - - [Description ( - "This describes the framing method for the upper layer " - "SAP or Endpoint that is bound to the LANEndpoint. Note: " - "\"Raw802.3\" is only known to be used with the IPX " - "protocol." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Ethernet", "802.2", "SNAP", "Raw802.3" }] - uint16 FrameType; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_BoundedPrioritySchedulingElement.mof b/build/vendor/dmtf_mof/Network/CIM_BoundedPrioritySchedulingElement.mof deleted file mode 100644 index 19683af7..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_BoundedPrioritySchedulingElement.mof +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BoundedPrioritySchedulingElement -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This class is a subclass of the class PriorityScheduling " - "Element, which is itself derived from the abstract class " - "SchedulingElement. As is the case with all subclasses of " - "SchedulingElement, the input associated with an instance of " - "BoundedPrioritySchedulingElement is of one of two types: " - "either a queue, or another scheduler. BoundedPriority " - "SchedulingElement adds an upper bound (BandwidthBound in " - "kilobits per second) on how much traffic can be handled from " - "an input. This data is specific to that one input. It is " - "needed when bounded strict priority scheduling is performed. " - "Note that this class inherits from its superclass the " - "restriction of the inherited boolean property WorkConserving " - "to TRUE." )] -class CIM_BoundedPrioritySchedulingElement : CIM_PrioritySchedulingElement { - - [Override ( "WorkConserving" )] - boolean WorkConserving = true; - - [Description ( - "A 32-bit unsigned integer that defines the upper limit " - "on the amount of traffic that can be handled from the " - "input (through this SchedulingElement). This is not a " - "shaped upper bound, since bursts can occur. It is a " - "strict bound, limiting the impact of the input. Units " - "are kilobits per second." ), - Units ( "KiloBits per Second" )] - uint32 BandwidthBound; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_BufferPool.mof b/build/vendor/dmtf_mof/Network/CIM_BufferPool.mof deleted file mode 100644 index 543f014e..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_BufferPool.mof +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BufferPool -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::Buffers" ), - Description ( - "This class represents the use of buffers by a Queuing Service. " - "The existence and management of individual buffers will be " - "modeled in a future release. At the current level of " - "abstraction, modeling the existence of the BufferPool is " - "necessary. Long term, it is not sufficient. \n" - "\n" - "In implementations where there are multiple buffer sizes, an " - "instance of BufferPool should be defined for each set of " - "buffers with identical or similar sizes. These instances of " - "buffer pools can then be grouped together using the " - "CollectedBuffersPool association. \n" - "\n" - "Note that this class is derived from CollectionOfMSEs, and not " - "from Forwarding or ConditioningService. BufferPool is only a " - "collection of storage, and is NOT a Service." )] -class CIM_BufferPool : CIM_CollectionOfMSEs { - - [Key, Override ( "CollectionID" ), - Description ( - "This property is defined in the CollectionOfMSEs class, " - "but is overridden here to serve as part of the " - "(composite) key that identifies the BufferPool instance." ), - MaxLen ( 256 )] - string CollectionID; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Description ( - "The Name property defines the label by which the object is known." - ), - MaxLen ( 256 )] - string Name; - - [Deprecated { "CIM_BufferPool.SizeOfBuffers" }, - Description ( - "This property is a 16-bit unsigned integer, and defines " - "the number of bytes in each buffer. It is deprecated in " - "lieu of a similar uint32 property." ), - Units ( "Bytes" )] - uint16 BufferSize; - - [Description ( - "This property is a 32-bit unsigned integer, and defines " - "the number of bytes in each buffer." ), - Units ( "Bytes" )] - uint32 SizeOfBuffers; - - [Description ( - "This property is a 32-bit unsigned integer, and defines " - "the total number of buffers in the Pool." )] - uint32 TotalBuffers; - - [Description ( - "This property is a 32-bit unsigned integer, and defines " - "the number of buffers in the Pool that are currently not " - "allocated to any instance of a QueuingService. Buffers " - "allocated to a QueuingService could either be in use " - "(containing packet data), or allocated to a Queue " - "pending the arrival of new packet data." )] - uint32 AvailableBuffers; - - [Description ( - "This property is a 32-bit unsigned integer, and defines " - "the number of buffers in the Pool that have been " - "simultaneously allocated to multiple instances of " - "QueuingService." )] - uint32 SharedBuffers; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_CLPCapabilities.mof b/build/vendor/dmtf_mof/Network/CIM_CLPCapabilities.mof deleted file mode 100644 index ac80ac8a..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_CLPCapabilities.mof +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Network::ProtocolEndpoints" ), - Description ( - "A subclass of ProtocolServiceCapabilities that defines the " - "capabilities of a CLPService. An instance of CLPCapabilities " - "is associated with a ProtocolService using " - "ElementCapabilities." )] -class CIM_CLPCapabilities : CIM_ProtocolServiceCapabilities { - - [Description ( - "CLPVersion is an array of strings that specifies the " - "versions of the SM CLP Specification, DMTF document " - "DSP0214, that the CLP service supports. The format of " - "the version string follows the conventions noted in DMTF " - "document DSP4004 in current and historical versions of " - "the document. Thus the version string format is \"m.n.ud " - "s\" where m is the string value of the major version " - "identifier in numeric form, n is the string value of the " - "minor version identifier in numeric form , u is the " - "optional string value of the update (errata or " - "coordination changes) in numeric form, d is the optional " - "draft in alphabetic form and s is one of the following " - "string values in alphabetic form: \"Work In Progress\", " - "\"Draft Standard\", \"DMTF Standard\", \"Preliminary " - "Standard\" or \"Final Standard\"." )] - string CLPVersions[]; - - [Description ( - "SMMEAddressVersion is an array of strings that specify " - "the versions of the Server Management Managed Element " - "Address Specification, DMTF document DSP0215, that the " - "CLP service supports. The format of the version string " - "follows the conventions noted in DMTF document DSP4004 " - "in current and historical versions of the document. Thus " - "the version string format is \"m.n.ud s\" where m is the " - "string value of the major version identifier in numeric " - "form, n is the string value of the minor version " - "identifier in numeric form , u is the optional string " - "value of the update (errata or coordination changes) in " - "numeric form, d is the optional draft in alphabetic form " - "and s is one of the following string values in " - "alphabetic form: \"Work In Progress\", \"Draft " - "Standard\", \"Preliminary Standard\" or \"Final " - "Standard\"." )] - string SMMEAddressVersions[]; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_CLPProtocolEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_CLPProtocolEndpoint.mof deleted file mode 100644 index 0f86c5e8..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_CLPProtocolEndpoint.mof +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Network::ProtocolEndpoints" ), - Description ( - "A representation of a communication endpoint where the CLP " - "protocol may be accessed." )] -class CIM_CLPProtocolEndpoint : CIM_ProtocolEndpoint { - - [Write, Description ( - "Identifies the Current Default Target when a CLP Session " - "is established. The Current Default Target is the CLP " - "session environment setting that establishes a default " - "base address for all command targets that are expressed " - "as a relative target address and is used as the command " - "target if no command target is specified in a command." ), - ModelCorrespondence { - "CIM_CLPSettingData.CurrentDefaultTarget" }] - string CurrentDefaultTarget; - - [Write, Description ( - "The amount of time in seconds that the CLP Session " - "should retain a CLP command job status. A KeepTime value " - "of zero shall be interpreted to mean keep forever." ), - Units ( "Seconds" ), - ModelCorrespondence { "CIM_CLPSettingData.KeepTime" }, - PUnit ( "second" )] - uint16 KeepTime; - - [Write, Description ( - "When TRUE the CLP Session will not return a command " - "response until all spawned jobs have completed, " - "otherwise it may." ), - ModelCorrespondence { "CIM_CLPSettingData.WaitBehavior" }] - boolean WaitBehavior; - - [Write, Description ( - "OutputFormat establishes the default CLP Session command " - "output format, as described in SM CLP Specification, " - "DMTF document DSP0214." ), - ValueMap { "2", "3", "4", "5", "..", "0x8000..0xFFFF" }, - Values { "Text", "clpcsv", "Keyword", "clpxml", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_CLPSettingData.OutputFormat" }] - uint16 OutputFormat; - - [Write, Description ( - "OutputVerbosity establishes the default CLP Session " - "output level of detail, as described in SM CLP " - "Specification, DMTF document DSP0214." ), - ValueMap { "2", "3", "4", "..", "0x8000..0xFFFF" }, - Values { "Error", "Terse", "Verbose", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { "CIM_CLPSettingData.OutputVerbosity" }] - uint16 OutputVerbosity; - - [Write, Description ( - "The default CLP Session command output language. As " - "described in SM CLP Specification, DMTF document " - "DSP0214, the language value is a 3-character string " - "identifier of language as specified in ISO 639.2; \"eng\" " - "is the default." ), - ModelCorrespondence { "CIM_CLPSettingData.OutputLanguage" }] - string OutputLanguage; - - [Write, Description ( - "OutputPosition establishes the default CLP Session " - "command output beginning position when multiple items " - "are returned in the command output, as described in SM " - "CLP Specification, DMTF document DSP0214." ), - ValueMap { "2", "3", "..", "0x8000..0xFFFF" }, - Values { "Begin", "End", "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_CLPSettingData.OutputPosition" }] - uint16 OutputPosition; - - [Write, Description ( - "OutputOrder establishes the default CLP Session command " - "output order when multiple items are returned in the " - "command output as described in SM CLP Specification, " - "DMTF document DSP0214." ), - ValueMap { "2", "3", "..", "0x8000..0xFFFF" }, - Values { "Default", "Reverse", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { "CIM_CLPSettingData.OutputOrder" }] - uint16 OutputOrder; - - [Write, Description ( - "Establishes the default CLP Session command output count " - "number when multiple items are returned in the output as " - "described in SM CLP Specification, DMTF document " - "DSP0214. The value 0xFFFFFFFF shall be interpreted to " - "mean that all items are to be returned. The maximum " - "value for the count number is determined by the class of " - "the target." ), - ModelCorrespondence { "CIM_CLPSettingData.OutputCount" }] - uint32 OutputCount; - - [Write, Description ( - "Maintains the session default value for the display " - "option. The argument string is stored \"as-is\" without " - "normalization beyond capitalization. The argument string " - "is compliant with the SM CLP command line grammar." ), - ModelCorrespondence { "CIM_CLPSettingData.DisplayOption" }] - string DisplayOption; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_CLPSettingData.mof b/build/vendor/dmtf_mof/Network/CIM_CLPSettingData.mof deleted file mode 100644 index 3896a153..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_CLPSettingData.mof +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Network::ProtocolEndpoints" ), - Description ( - "A representation of the SettingData of a CLProtocol. The " - "relationship between the SettingData and the CLP Service is " - "described by instantiating the ProvidesEndpoint association, " - "with an association to the transport (TelnetProtocolEndpoint " - "or SSHProtocolEndpoint) with a BindsTo association." )] -class CIM_CLPSettingData : CIM_SettingData { - - [Description ( - "Identifies the initial Current Default Target when a CLP " - "Session is established. The Current Default Target is " - "the CLP session environment setting that establishes a " - "default base address for all command targets that are " - "expressed as a relative target address and is used as " - "the command target if no command target is specified in " - "a command. The CLP specification requires this value to " - "be fixed at the root of the address space being managed. " - "Therefore this value does not have a write qualifier." ), - ModelCorrespondence { - "CIM_CLPProtocolEndpoint.CurrentDefaultTarget" }] - string CurrentDefaultTarget; - - [Write, Description ( - "Establishes the amount of time in seconds that the CLP " - "Session should retain a CLP command job status. A " - "KeepTime value of zero shall be interpreted to mean keep " - "forever." ), - Units ( "Seconds" ), - ModelCorrespondence { "CIM_CLPProtocolEndpoint.KeepTime" }, - PUnit ( "second" )] - uint16 KeepTime; - - [Write, Description ( - "When TRUE the CLP Session will not return a command " - "response until all spawned jobs have completed, " - "otherwise it may." ), - ModelCorrespondence { "CIM_CLPProtocolEndpoint.WaitBehavior" }] - boolean WaitBehavior; - - [Write, Description ( - "OutputFormat establishes the default CLP Session command " - "output format, as described in SM CLP Specification, " - "DMTF document DSP0214." ), - ValueMap { "2", "3", "4", "5", "..", "0x8000..0xFFFF" }, - Values { "Text", "clpcsv", "Keyword", "clpxml", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_CLPProtocolEndpoint.OutputFormat" }] - uint16 OutputFormat; - - [Write, Description ( - "OutputVerbosity establishes the default CLP Session " - "output level of detail, as described in SM CLP " - "Specification, DMTF document DSP0214." ), - ValueMap { "2", "3", "4", "..", "0x8000..0xFFFF" }, - Values { "Error", "Terse", "Verbose", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { - "CIM_CLPProtocolEndpoint.OutputVerbosity" }] - uint16 OutputVerbosity; - - [Write, Description ( - "Establishes the default CLP Session command output " - "language. As described in SM CLP Specification, DMTF " - "document DSP0214, the language value is a 3-character " - "string identifier of language as specified in ISO 639.2; " - "\"eng\" is the default." )] - string OutputLanguage; - - [Write, Description ( - "OutputPosition establishes the default CLP Session " - "command output beginning position when multiple items " - "are returned in the command output, as described in SM " - "CLP Specification, DMTF document DSP0214." ), - ValueMap { "2", "3", "..", "0x8000..0xFFFF" }, - Values { "Begin", "End", "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_CLPProtocolEndpoint.OutputPosition" }] - uint16 OutputPosition; - - [Write, Description ( - "OutputOrder establishes the default CLP Session command " - "output order when multiple items are returned in the " - "command output as described in SM CLP Specification, " - "DMTF document DSP0214." ), - ValueMap { "2", "3", "..", "0x8000..0xFFFF" }, - Values { "Default", "Reverse", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { "CIM_CLPProtocolEndpoint.OutputOrder" }] - uint16 OutputOrder; - - [Write, Description ( - "Establishes the default CLP Session command output count " - "number when multiple items are returned in the output as " - "described in SM CLP Specification, DMTF document " - "DSP0214. The value 0xFFFFFFFF shall be interpreted to " - "mean that all items are to be returned. The maximum " - "value for the count number is determined by the class of " - "the target." ), - ModelCorrespondence { "CIM_CLPProtocolEndpoint.OutputCount" }] - uint32 OutputCount; - - [Write, Description ( - "Establishes the default value for the display option. " - "The argument string is stored \"as-is\" without " - "normalization beyond capitalization. The argument string " - "is compliant with the SM CLP command line grammar." ), - ModelCorrespondence { "CIM_CLPProtocolEndpoint.DisplayOption" }] - string DisplayOption; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_CalculatedRoutes.mof b/build/vendor/dmtf_mof/Network/CIM_CalculatedRoutes.mof deleted file mode 100644 index ab12936c..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_CalculatedRoutes.mof +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_CalculatedRoutes -// ================================================================== - [Association, Deprecated { "CIM_ConcreteDependency", - "CIM_NextHopIPRoute.RouteDerivation" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Routes" ), - Description ( - "This assocation makes explicit the routes that are calculated " - "by a specific RouteCalculationService. Thus, every " - "RouteCalculationService can have its own unique set of " - "calculated routes. The association is not necessary in the " - "model and has been deprecated. An instance of the general " - "ConcreteDependency association can tie a NextHopIPRoute to a " - "RouteCalculationService. In addition, information on how the " - "route was derived is available in NextHopIPRoute\'s " - "RouteDerivation enumeration." )] -class CIM_CalculatedRoutes : CIM_Dependency { - - [Deprecated { "CIM_ConcreteDependency.Antecedent", - "CIM_NextHopIPRoute.RouteDerivation" }, - Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The route\'s calculation service." )] - CIM_RouteCalculationService REF Antecedent; - - [Deprecated { "CIM_ConcreteDependency.Dependent" }, - Override ( "Dependent" ), - Description ( - "The IP route calculated by a specific service." )] - CIM_IPRoute REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_CalculatesAmong.mof b/build/vendor/dmtf_mof/Network/CIM_CalculatesAmong.mof deleted file mode 100644 index f29e6ef6..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_CalculatesAmong.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_CalculatesAmong -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::RoutingForwarding" ), - Description ( - "This is a specialization of the ServiceSAPDependency " - "association, indicating that the referenced ProtocolEndpoint " - "is utilized by the RouteCalculationService to provide its " - "functionality." )] -class CIM_CalculatesAmong : CIM_ServiceSAPDependency { - - [Override ( "Antecedent" ), - Description ( "The required ProtocolEndpoint." )] - CIM_ProtocolEndpoint REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The RouteCalculationService, which is dependent on the " - "underlying ProtocolEndpoint." )] - CIM_RouteCalculationService REF Dependent; - - [Deprecated { "No value" }, - Description ( - "TRUE indicates that this ProtocolEndpoint represents a " - "static route, and FALSE means that it represents a " - "dynamically-learned route. This property is deprecated " - "since a Service may use an Endpoint to output several " - "routes, some static and others dynamic." )] - boolean IsStatic; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_CalculationBasedOnQueue.mof b/build/vendor/dmtf_mof/Network/CIM_CalculationBasedOnQueue.mof deleted file mode 100644 index 24d8f91b..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_CalculationBasedOnQueue.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_CalculationBasedOnQueue -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This association establishes a dependency relationship between " - "a QueuingService and an instance of the " - "DropThresholdCalculationService class. The queue\'s current " - "depth is used by the CalculationService in calculating an " - "average/smoothed queue depth." )] -class CIM_CalculationBasedOnQueue : CIM_ServiceServiceDependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The queue examined by the CalculationService." )] - CIM_QueuingService REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The CalculationService that provides an average queue depth." - )] - CIM_DropThresholdCalculationService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_CalculationServiceForDropper.mof b/build/vendor/dmtf_mof/Network/CIM_CalculationServiceForDropper.mof deleted file mode 100644 index bf66513b..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_CalculationServiceForDropper.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_CalculationServiceForDropper -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This association is a subclass of ServiceServiceDependency, " - "and represents the reliance of a REDDropperService on one or " - "more DropThresholdCalculationServices. The latter calculate " - "average queue depth, based on the observed depths of a queue. " - "The specific queue examined by each CalculationService is " - "defined using the CalculationBasedOnQueue association." )] -class CIM_CalculationServiceForDropper : CIM_ServiceServiceDependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Description ( "A calculation service for the dropper." )] - CIM_DropThresholdCalculationService REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The RED dropper which is dependent on average queue " - "depth calculations by the Antecedent Service." )] - CIM_REDDropperService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_ClassifierElement.mof b/build/vendor/dmtf_mof/Network/CIM_ClassifierElement.mof deleted file mode 100644 index e8886b40..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_ClassifierElement.mof +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ClassifierElement -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "ClassifierElement represents the linkage, within a single " - "ClassifierService, between a FilterList (that defines the " - "criteria to select packets from the stream of packets coming " - "into the Service) and the next ConditioningService (to which " - "the selected packets go after they leave the " - "ClassifierService). ClassifierElement has no properties of its " - "own. It is present to serve as an aggregated entity into " - "ClassifierService (using the ClassifierElementIn " - "ClassifierService association), and for associations with its " - "FilterList (ClassifierElementUsesFilterList) and its next " - "ConditioningService (NextServiceAfterClassifierElement). \n" - "\n" - "Note that a ClassifierElement may be associated with a " - "ClassifierService through the NextServiceAfterClassifier " - "Element association. This will occur when implementing " - "hierarchical classification. In this case, the " - "ClassifierElement MUST NOT instantiate the ClassifierElement " - "UsesFilterList association. Further, when a ClassifierElement " - "is associated with a ClassifierService as described above, the " - "order of processing of the associated ClassifierService is a " - "function of the ClassifierOrder property of the " - "ClassifierElementInClassifierService aggregation." )] -class CIM_ClassifierElement : CIM_ClassifierService { - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_ClassifierElementInClassifierService.mof b/build/vendor/dmtf_mof/Network/CIM_ClassifierElementInClassifierService.mof deleted file mode 100644 index 802897aa..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_ClassifierElementInClassifierService.mof +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ClassifierElementInClassifierService -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This aggregation represents the relationship between a " - "ClassifierService and the ClassifierElements that provide its " - "fan-out function. ClassifierElements represent the traffic " - "selectors for the Service. A ClassifierService typically " - "aggregates multiple ClassifierElements. An individual Element, " - "however, is aggregated only by a single ClassifierService." )] -class CIM_ClassifierElementInClassifierService : CIM_ServiceComponent { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The ClassifierService which aggregates ClassifierElements." - )] - CIM_ClassifierService REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The aggregated ClassifierElement, defined in the context " - "of one ClassifierService." )] - CIM_ClassifierElement REF PartComponent; - - [Description ( - "Because the filters for a classifier can overlap, it is " - "necessary to specify the order in which the " - "ClassifierElements are aggregated by a " - "ClassifierService. This then dictates the order in which " - "packets coming into the classifier are presented. Values " - "are represented in ascending order: first \'1\', then " - "\'2\', and so on. Different values MUST be assigned for " - "each of the ClassifierElements aggregated by a given " - "ClassifierService." )] - uint32 ClassifierOrder; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_ClassifierElementUsesFilterList.mof b/build/vendor/dmtf_mof/Network/CIM_ClassifierElementUsesFilterList.mof deleted file mode 100644 index 175e9ca2..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_ClassifierElementUsesFilterList.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ClassifierElementUsesFilterList -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This association relates one or more ClassifierElements with a " - "FilterList that defines the criteria to select packets for the " - "classifier to process. Note that a classifier is always " - "modeled as a ClassifierService that aggregates a set of " - "ClassifierElements. Each of these ClassifierElements is EITHER " - "associated with a single FilterList OR associated to another " - "ClassifierService (via NextServiceAfterClassifier Element to " - "describe hierarchical classification)." )] -class CIM_ClassifierElementUsesFilterList : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "The FilterList that specifies the traffic criteria for a " - "ClassifierElement." )] - CIM_FilterList REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The ClassifierElement that depends on the FilterList for " - "its traffic criteria." )] - CIM_ClassifierElement REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_ClassifierFilterSet.mof b/build/vendor/dmtf_mof/Network/CIM_ClassifierFilterSet.mof deleted file mode 100644 index 60191c6a..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_ClassifierFilterSet.mof +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ClassifierFilterSet -// ================================================================== - [Association, Deprecated { "CIM_ClassifierElementUsesFilterList", - "CIM_ClassifierElementInClassifierService" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "In order for a ClassifierService to correctly identify and " - "process network traffic, that traffic must be described by " - "FilterEntries, which are aggregated into FilterLists. This " - "association defines the Dependency of the ClassifierService on " - "FilterLists (and therefore, their FilterEntries). The " - "cardinality of the association requires that the Classifier " - "Service operate against at least one FilterList. \n" - "\n" - "The association is deprecated in lieu of associating Filter " - "Lists to ClassifierElements, and ClassifierElements into " - "ClassifierServices. The latter approach is very flexible " - "regarding the implementations that can be modeled, and removes " - "the need to track individual traffic streams using an " - "artificial model property, TrafficClass. Using " - "ClassifierElements, each stream is processed beginning with a " - "single FilterList and progressing through various " - "ConditioningServices, associated via instances of NextService." )] -class CIM_ClassifierFilterSet : CIM_Dependency { - - [Deprecated { "CIM_ClassifierElementUsesFilterList.Antecedent" }, - Override ( "Antecedent" ), - Description ( - "The FilterList aggregating FilterEntries, these in turn " - "describe how traffic is identified and processed by the " - "ClassifierService." )] - CIM_FilterList REF Antecedent; - - [Deprecated { "CIM_ClassifierElementUsesFilterList.Dependent" }, - Override ( "Dependent" ), - Description ( - "The ClassifierService which uses the FilterList and its " - "aggregated FilterEntries." )] - CIM_ClassifierService REF Dependent; - - [Deprecated { - "CIM_ClassifierElementInClassifierService.ClassifierOrder" }, - Description ( - "The ordering of the FilterLists used in the " - "classification and forwarding functions of the " - "ClassifierService." )] - uint16 FilterListPosition; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_ClassifierService.mof b/build/vendor/dmtf_mof/Network/CIM_ClassifierService.mof deleted file mode 100644 index e3e91563..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_ClassifierService.mof +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ClassifierService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "ClassifierService represents a logical entity associated with " - "an ingress or egress interface of a device, that takes a " - "single input stream, and sorts it into one or more output " - "streams. The sorting is done by a set of filters that select " - "packets based on the packet contents, or possibly based on " - "other attributes associated with the packet. Each output " - "stream is the result of matching a particular filter. \n" - "\n" - "Rather than being linked directly to its filters (instantiated " - "as FilterLists), a classifier is modeled as an aggregation of " - "ClassifierElements. Each of these ClassifierElements is linked " - "to a single FilterList, by the association " - "ClassifierElementUsesFilterList. Note that ClassifierServices " - "are designed to allow hierarchical classification. When " - "hierarchical classification is used, a ClassifierElement may " - "point to another ClassifierService (via the association, " - "NextServiceAfterClassifierElement). When this is true, the " - "ClassifierElement MUST NOT use the ClassifierElementUses " - "FilterList association. \n" - "\n" - "A classifier is modeled as a ConditioningService so that it " - "can be aggregated into a QoSService (using the " - "QoSConditioningSubService aggregation), and can use the " - "NextService association to identify the subsequent " - "ConditioningServices for different traffic streams." )] -class CIM_ClassifierService : CIM_ConditioningService { - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_CollectedBufferPool.mof b/build/vendor/dmtf_mof/Network/CIM_CollectedBufferPool.mof deleted file mode 100644 index bc9af457..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_CollectedBufferPool.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_CollectedBufferPool -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::Buffers" ), - Description ( - "CIM_CollectedBufferPool is an aggregation association " - "representing that a Pool may itself be contained in a \'higher " - "level\' Pool." )] -class CIM_CollectedBufferPool : CIM_MemberOfCollection { - - [Aggregate, Override ( "Collection" ), - Description ( "The \'higher level\' or parent Pool." )] - CIM_BufferPool REF Collection; - - [Override ( "Member" ), - Description ( "The \'collected\' Pool." )] - CIM_BufferPool REF Member; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_ConditioningService.mof b/build/vendor/dmtf_mof/Network/CIM_ConditioningService.mof deleted file mode 100644 index 973194e9..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_ConditioningService.mof +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ConditioningService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "ConditioningService represents the ability to define how " - "traffic is conditioned in the data-forwarding path of a " - "device. The subclasses of ConditioningService define the " - "particular types of conditioning that are done. These are the " - "services performed by a classifier, a meter, a marker, a " - "dropper, a queue, and a scheduler. Other, more sophisticated " - "types of conditioning may be defined in the future. \n" - "\n" - "ConditioningService is a concrete class because its superclass " - "(ForwardingService) is concrete. While this class can be " - "instantiated, an instance of it does not accomplish anything, " - "because the nature of the conditioning, and the parameters " - "that control it, are specified only in the subclasses of " - "ConditioningService. \n" - "\n" - "Two associations in which ConditioningService participates are " - "critical to its usage in QoS - QoSConditioningSubService and " - "NextService. QoSConditioningSubService aggregates " - "ConditioningServices into a particular QoS service (such as " - "AF), to describe the specific conditioning functionality that " - "underlies that QoSService in a particular device. NextService " - "indicates the subsequent conditioning service(s) for different " - "traffic streams." )] -class CIM_ConditioningService : CIM_Service { - - [Deprecated { "CIM_EnabledLogicalElement.EnabledState" }, - Description ( - "This property is a boolean that, if TRUE, signifies that " - "one or more conditioning functions can be performed on " - "traffic encountered by this ConditioningService. This " - "allows one or more ConditioningServices to be enabled or " - "disabled to provide different types of conditioning for " - "traffic. Enabled is deprecated in lieu of a similar (but " - "more generally and completely defined) property which is " - "inherited." )] - boolean Enabled; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_ConditioningServiceOnEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_ConditioningServiceOnEndpoint.mof deleted file mode 100644 index 7715f858..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_ConditioningServiceOnEndpoint.mof +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ConditioningServiceOnEndpoint -// ================================================================== - [Association, Deprecated { - "CIM_IngressConditioningServiceOnEndpoint", - "CIM_EgressConditioningServiceOnEndpoint" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "The QoS Model describes the traffic conditioning functions in " - "place for a network device. In order to \'be conditioned\', a " - "packet is received at a ProtocolEndpoint. After " - "\'conditioning\', a packet is dropped or leaves the device via " - "a ProtocolEndpoint. This dependency on ProtocolEndpoints is " - "defined by the ConditioningServiceOn Endpoint association. A " - "property of the association, ServiceType, indicates whether " - "the ConditioningService handles incoming (\"Ingress\") or " - "out-going (\"Egress\") packets. This association is deprecated " - "since different cardinalities are needed on the ingress and " - "egress classes. This cannot be done using a single " - "association." )] -class CIM_ConditioningServiceOnEndpoint : CIM_Dependency { - - [Deprecated { - "CIM_IngressConditioningServiceOnEndpoint.Antecedent", - "CIM_EgressConditioningServiceOnEndpoint.Antecedent" }, - Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "The ProtocolEndpoint through which traffic arrives at or " - "leaves from a network device." )] - CIM_ProtocolEndpoint REF Antecedent; - - [Deprecated { - "CIM_IngressConditioningServiceOnEndpoint.Dependent", - "CIM_EgressConditioningServiceOnEndpoint.Dependent" }, - Override ( "Dependent" ), - Description ( - "The ConditioningService which begins or ends the traffic " - "conditioning processing within a network device." )] - CIM_ConditioningService REF Dependent; - - [Deprecated { "CIM_IngressConditioningServiceOnEndpoint", - "CIM_EgressConditioningServiceOnEndpoint" }, - Description ( - "Indicates whether a packet is incoming (value = 1, " - "\"Ingress\") or out-going (value = 2, \"Egress\") at the " - "ProtocolEndpoint, relative to the ConditioningService." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "Ingress", "Egress" }] - uint16 ServiceType; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_Confederation.mof b/build/vendor/dmtf_mof/Network/CIM_Confederation.mof deleted file mode 100644 index d671ffb1..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_Confederation.mof +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Confederation -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "The BGP speakers in an AS are required to be fully meshed. " - "This can lead to a huge number of TCP connections per router. " - "One way to reduce the peering requirements is to use a " - "confederation. A confederation effectively partitions one AS " - "into a group of \'sub-ASs\'. This enables all of the benefits " - "of IBGP to be applied inside the confederation, while enabling " - "EBGP to be run between each confederation. It also enables " - "certain BGP attribute values to be preserved between " - "confederations. However, to the outside world, the AS with its " - "confederations appear to be a single AS." )] -class CIM_Confederation : CIM_SystemComponent { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( - "The AutonomousSystem that contains the confederations." )] - CIM_AutonomousSystem REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The Confederation within the AutonomousSystem." )] - CIM_AutonomousSystem REF PartComponent; - - [Description ( - "A unique identifier of the AutonomousSystem that " - "contains the confederations." )] - uint32 ParentASNumber; - - [Description ( - "A unique identifier of the Confederation within the " - "AutonomousSystem." )] - uint32 ChildASNumber; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_ConnectivityCollection.mof b/build/vendor/dmtf_mof/Network/CIM_ConnectivityCollection.mof deleted file mode 100644 index 8286ee1b..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_ConnectivityCollection.mof +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ConnectivityCollection -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Collections" ), - Description ( - "A ConnectivityCollection groups together a set of " - "ProtocolEndpoints of the same \'type\' (i.e., class) which are " - "able to communicate with each other. It may also group related " - "Systems, users or other ManagedElements. A " - "ConnectivityCollection represents the ability to send and/or " - "receive data over a set of ProtocolEndpoints. The collection " - "is defined in the context of an AdminDomain or scoping " - "ComputerSystem. This is mandated by the Hosted Collection " - "association on the SystemSpecificCollection superclass. Note " - "that the entities aggregated into the Collection are specified " - "using the association, MemberOfCollection." )] -class CIM_ConnectivityCollection : CIM_SystemSpecificCollection { - - [Description ( - "An enumeration describing the current or potential " - "connectivity between endpoints in this collection. " - "Connectivity may be provided or not, or may be in a " - "degraded/partitioned state if one or more endpoints or " - "links have failed. The latter would prevent full " - "connectivity between all elements in the Collection, but " - "would permit connectivity between subsets." ), - ValueMap { "0", "2", "3", "4" }, - Values { "Unknown", "Connectivity/Up", - "No Connectivity/Down", "Partitioned" }] - uint16 ConnectivityStatus; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_ConnectivityMembershipSettingData.mof b/build/vendor/dmtf_mof/Network/CIM_ConnectivityMembershipSettingData.mof deleted file mode 100644 index 057a94d6..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_ConnectivityMembershipSettingData.mof +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ConnectivityMembershipSettingData -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::Collections" ), - Description ( - "ConnectivityMembershipSettingData provides the identification " - "criteria for possible members of a ConnectivityCollection." )] -class CIM_ConnectivityMembershipSettingData : CIM_SettingData { - - [Required, Description ( - "ConnectivityMemberType specifies the type of " - "identification used in the ConnectivityMemberID field." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "0x8000.." }, - Values { "Unknown", "Other", "Permanent Address", - "Network Address", "Switch Port ID", "Logical Port Group", - "Connectivity Collection", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { - "CIM_ConnectivityMembershipSettingData.ConnectivityMemberID", - "CIM_ConnectivityMembershipSettingData.OtherConnectivityMemberType" }] - uint16 ConnectivityMemberType; - - [Description ( - "This property specifies the type of identification used " - "in the ConnectivityMemberID field, when " - "ConnectivityMemberType is 1, \"Other\"." ), - ModelCorrespondence { - "CIM_ConnectivityMembershipSettingData.ConnectivityMemberType" }] - string OtherConnectivityMemberType; - - [Required, Description ( - "The identification of the member, based on the type " - "specified by ConnectivityMemberType." ), - ModelCorrespondence { - "CIM_ConnectivityMembershipSettingData.ConnectivityMemberType" }] - string ConnectivityMemberID; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_DHCPCapabilities.mof b/build/vendor/dmtf_mof/Network/CIM_DHCPCapabilities.mof deleted file mode 100644 index a4768889..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_DHCPCapabilities.mof +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Network::DHCP" ), - Description ( - "A class derived from EnabledLogicalElementCapabilities " - "representing the capabilities of a DHCP client." )] -class CIM_DHCPCapabilities : CIM_EnabledLogicalElementCapabilities { - - [Description ( - "One or more DHCP options supported by the DHCP client. " - "These may include: Subnet Mask, Default Router, DNS " - "Server, etc. See RFC2132 for a description of each " - "option." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26", "27", - "28", "29", "30", "31", "32", "33", "34", "35", "36", - "37", "38", "39", "40", "41", "42", "43", "44", "45", - "46", "47", "48", "49", "50", "51", "52", "53", "54", - "55", "56", "57", "58", "59", "60", "61", "62", "63", - "64", "65", "66", "67", "68", "69", "70", "71", "72", - "73", "74", "75", "76", "77", "78", "79", "80", "81", - "82..83", "84", "85..118", "119", "120", "121..122", - "123", "124..256", "257", "258..32767", "32768..65535" }, - Values { "Unknown", "Other", "Pad", "Subnet Mask", - "Time Offset", "Router Option", "Time Server", - "Name Server", "Domain Name Server", "Log Server", - "Cookie Server", "LPR Server", "Impress Server", - "Resource Location Server", "Host Name", "Boot File Size", - "Merit Dump File", "Domain Name", "Swap Server", - "Root Path", "Extensions Path", - "IP Forwarding Enable/Disable", - "Non-Local Source Routing Enable/Disable", - "Policy Filter", "Maximum Datagram Reassembly Size", - "Default IP Time-to-live", "Path MTU Aging Timeout", - "Path MTU Plateau Table", "Interface MTU", - "All Subnets are Local", "Broadcast Address", - "Perform Subnet Mask Discovery", "Mask Supplier", - "Perform Router Discovery", "Router Solicitation Address", - "Static Route", "Trailer Encapsulation", - "ARP Cache Timeout", "Ethernet Encapsulation", - "TCP Default TTL", "TCP Keepalive Interval", - "TCP Keepalive Garbage", - "Network Information Service Domain", - "Network Information Servers", - "Network Time Protocol Servers", - "Vendor Specific Information", - "NetBIOS over TCP/IP Name Server", - "NetBIOS over TCP/IP Datagram Distribution Server", - "NetBIOS over TCP/IP Node Type", - "NetBIOS over TCP/IP Scope", - "X Window System Font Server", - "X Window System Display Manager", "Requested IP Address", - "Lease Time", "Option Overload", "Message Type", - "Server Identifier", "Parameter Request List", - "Error Message", "Maximum Message Size", - "Renewal (T1) Time", "Rebinding (T2) Time", - "Vendor Class Identifier", "Client Identifier", - "DMTF Reserved", "DMTF Reserved", - "Network Information Service+ Domain", - "Network Information Service+ Servers", - "TFTP Server Name", "Bootfile Name", - "Mobile IP Home Agent", - "Simple Mail Transport Protocol (SMTP) Server", - "Post Office Protocol (POP3) Server", - "Network News Transport Protocol (NNTP) Server", - "Default World Wide Web (WWW) Server", - "Default Finger Server", - "Default Internet Relay Chat (IRC) Server", - "StreetTalk Server", - "StreetTalk Directory Assistance (STDA) Server", - "User Class", "SLP Directory Agent", "SLP Service Scope", - "DMTF Reserved", "Relay Agent Information", - "DMTF Reserved", "Name Service Search", - "Subnet Selection", "DMTF Reserved", "Classless Route", - "DMTF Reserved", "End", "DMTF Reserved", "Vendor Reserved" }, - MappingStrings { "RFC2132.IETF", "RFC2937.IETF", - "RFC3011.IETF", "RFC3046.IETF", "RFC3004.IETF", - "RFC2610.IETF", "RFC3442.IETF" }, - ModelCorrespondence { - "CIM_DHCPProtocolEndpoint.OptionsReceived" }] - uint16 OptionsSupported[]; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_DHCPProtocolEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_DHCPProtocolEndpoint.mof deleted file mode 100644 index 7bb99fff..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_DHCPProtocolEndpoint.mof +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Network::ProtocolEndpoints" ), - Description ( - "A class derived from ProtocolEndpoint representing the " - "configuration of a DHCP client. The configuration information " - "contained by this ProtocolEndpoint is the current " - "configuration obtained/received from a DHCP server. An " - "instance of CIM_RemoteAccessAvailableToElement is used to " - "relate the DHCPProtocolEndpoint to the " - "RemoteServiceAccessPoint which represents the DHCP server. An " - "EndpointIdentity association from the DHCPProtocolEndpoint to " - "an IPProtocolEndpoint is established." )] -class CIM_DHCPProtocolEndpoint : CIM_ProtocolEndpoint { - - [Description ( - "ClientState represents the current state of the DHCP " - "client. See RFC1541 for more information on the meaning " - "of each state." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", - "9..32767", "32768..65535" }, - Values { "Unknown", "DMTF Reserved", "Init", "Selecting", - "Requesting", "Rebinding", "Init-Reboot", "Rebooting", - "Bound", "DMTF Reserved", "Vendor Specified" }, - MappingStrings { "RFC1541.IETF|Section 4.4.1" }] - uint16 ClientState; - - [Description ( - "This option specifies the time interval from address " - "assignment until the client transitions to the RENEWING " - "state. This value corresponds to the value for code 58 " - "as defined in RFC2132." ), - Units ( "Seconds" ), - MappingStrings { "RFC2132.IETF|Section 9.11" }, - PUnit ( "second" )] - uint32 RenewalTime; - - [Description ( - "This property specifies the time interval from address " - "assignment until the client transitions to the REBINDING " - "state. This value corresponds to the value for code 59 " - "as defined in RFC2132." ), - Units ( "Seconds" ), - MappingStrings { "RFC2132.IETF|Section 9.12" }, - PUnit ( "second" )] - uint32 RebindingTime; - - [Description ( - "This property is used in a client request (DHCPDISCOVER " - "or DHCPREQUEST) to allow the client to request a lease " - "time for the IP address. In a server reply (DHCPOFFER), " - "a DHCP server uses this option to specify the lease time " - "it is willing to offer. This value corresponds to the " - "value for code 51 as defined in RFC2132.or as specified " - "in RFC3315, Section 9" ), - Units ( "Seconds" ), - MappingStrings { "RFC2132.IETF|Section 9.2" }, - PUnit ( "second" )] - uint32 LeaseTime; - - [Description ( - "This property indicates the time a DHCP lease was " - "obtained by the client. There is no correlating value " - "defined in RFC2132. This value is persisted by the " - "client when it obtains a DHCP lease from a DHCP server." )] - datetime LeaseObtained; - - [Description ( - "This property indicates the time a DHCP lease will " - "expire. There is no correlating value defined in " - "RFC2132. This value is calculated by the client by " - "adding the interval specified in LeaseTime to the value " - "of LeaseObtained." )] - datetime LeaseExpires; - - [Description ( - "One or more DHCP options received by the DHCP client. " - "These may include: Subnet Mask, Default Router, DNS " - "Server, etc. See the RFCs for a description of each " - "option." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26", "27", - "28", "29", "30", "31", "32", "33", "34", "35", "36", - "37", "38", "39", "40", "41", "42", "43", "44", "45", - "46", "47", "48", "49", "50", "51", "52", "53", "54", - "55", "56", "57", "58", "59", "60", "61", "62", "63", - "64", "65", "66", "67", "68", "69", "70", "71", "72", - "73", "74", "75", "76", "77", "78", "79", "80", "81", - "82..83", "84", "85..118", "119", "120", "121..122", - "123", "124..256", "257", "258..32767", "32768..65535" }, - Values { "Unknown", "Other", "Pad", "Subnet Mask", - "Time Offset", "Router Option", "Time Server", - "Name Server", "Domain Name Server", "Log Server", - "Cookie Server", "LPR Server", "Impress Server", - "Resource Location Server", "Host Name", "Boot File Size", - "Merit Dump File", "Domain Name", "Swap Server", - "Root Path", "Extensions Path", - "IP Forwarding Enable/Disable", - "Non-Local Source Routing Enable/Disable", - "Policy Filter", "Maximum Datagram Reassembly Size", - "Default IP Time-to-live", "Path MTU Aging Timeout", - "Path MTU Plateau Table", "Interface MTU", - "All Subnets are Local", "Broadcast Address", - "Perform Subnet Mask Discovery", "Mask Supplier", - "Perform Router Discovery", "Router Solicitation Address", - "Static Route", "Trailer Encapsulation", - "ARP Cache Timeout", "Ethernet Encapsulation", - "TCP Default TTL", "TCP Keepalive Interval", - "TCP Keepalive Garbage", - "Network Information Service Domain", - "Network Information Servers", - "Network Time Protocol Servers", - "Vendor Specific Information", - "NetBIOS over TCP/IP Name Server", - "NetBIOS over TCP/IP Datagram Distribution Server", - "NetBIOS over TCP/IP Node Type", - "NetBIOS over TCP/IP Scope", - "X Window System Font Server", - "X Window System Display Manager", "Requested IP Address", - "Lease Time", "Option Overload", "Message Type", - "Server Identifier", "Parameter Request List", - "Error Message", "Maximum Message Size", - "Renewal (T1) Time", "Rebinding (T2) Time", - "Vendor Class Identifier", "Client Identifier", - "DMTF Reserved", "DMTF Reserved", - "Network Information Service+ Domain", - "Network Information Service+ Servers", - "TFTP Server Name", "Bootfile Name", - "Mobile IP Home Agent", - "Simple Mail Transport Protocol (SMTP) Server", - "Post Office Protocol (POP3) Server", - "Network News Transport Protocol (NNTP) Server", - "Default World Wide Web (WWW) Server", - "Default Finger Server", - "Default Internet Relay Chat (IRC) Server", - "StreetTalk Server", - "StreetTalk Directory Assistance (STDA) Server", - "User Class", "SLP Directory Agent", "SLP Service Scope", - "DMTF Reserved", "Relay Agent Information", - "DMTF Reserved", "Name Service Search", - "Subnet Selection", "DMTF Reserved", "Classless Route", - "DMTF Reserved", "End", "DMTF Reserved", "Vendor Reserved" }, - MappingStrings { "RFC2132.IETF", "RFC2937.IETF", - "RFC3011.IETF", "RFC3046.IETF", "RFC3004.IETF", - "RFC2610.IETF", "RFC3442.IETF" }] - uint16 OptionsReceived[]; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_DHCPSettingData.mof b/build/vendor/dmtf_mof/Network/CIM_DHCPSettingData.mof deleted file mode 100644 index 0447bec5..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_DHCPSettingData.mof +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Network::DHCP" ), - Description ( - "This class represents the desired configuration settings for " - "the DHCPProtocolEndpoint (i.e. DHCP client configuration." )] -class CIM_DHCPSettingData : CIM_IPAssignmentSettingData { - - [Override ( "AddressOrigin" ), - Description ( - "AddressOrigin identifies the method by which the IP " - "Address, Subnet Mask, and Gateway were assigned to the " - "IPProtocolEndpoint. A value of 4 indicates that the " - "values will be assigned via DHCP." ), - ValueMap { "0..3", "4", "5..32767", "32768.." }, - Values { "DMTF Reserved", "DHCP", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { "CIM_IPProtocolEndpoint.AddressOrigin" }] - uint16 AddressOrigin = 4; - - [Description ( - "A previously allocated IPv4 address for which the client " - "is requesting re-allocation. This property is used in a " - "client request (DHCPREQUEST) as the value of the ciaddr " - "field." ), - MappingStrings { "RFC1541.IETF|Section 3.2" }, - ModelCorrespondence { "CIM_IPProtocolEndpoint.IPv4Address" }] - string RequestedIPv4Address; - - [Description ( - "This property is used in a client request (DHCPREQUEST) " - "to allow the client to request a lease time for the IP " - "address. The value shall be specified as an interval at " - "a granularity of seconds. This value corresponds to the " - "value for code 51 as defined in RFC2132." ), - Units ( "Seconds" ), - MappingStrings { "RFC2132.IETF|Section 9.2" }, - ModelCorrespondence { "CIM_DHCPProtocolEndpoint.LeaseTime" }, - PUnit ( "second" )] - uint32 RequestedLeaseTime; - - [Write, Description ( - "This property is used by DHCP clients to specify their " - "unique identifier. DHCP servers use this value to index " - "their database of address bindings. This value is " - "expected to be unique for all clients in an " - "administrative domain. This corresponds to DHCP Option " - "Code 61 as defined in RFC2132. \n" - "While this value is an option and therefore could be " - "expressed using the RequestedOption property, it differs " - "from other properties in that it includes a value when " - "specified from the client." ), - MappingStrings { "RFC2132.IETF|Section 9.14" }] - string ClientIdentifier; - - [Write, Description ( - "This property is used by DHCP clients to optionally " - "identify the vendor type and configuration of a DHCP " - "client. This corresponds to DHCP Option Code 60 as " - "defined in RFC2132. While this is value is an option and " - "therefore could be expressed using the RequestedOption " - "property, it differs from other properties in that it " - "includes a value when specified from the client." ), - MappingStrings { "RFC2132.IETF|Section 9.13" }] - string VendorClassIdentifier; - - [Write, Description ( - "The list of requested DHCP options which the client is " - "capable of interpreting but not necessarily required for " - "the client to operate properly. This list of DHCP " - "options is for IPv4." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26", "27", - "28", "29", "30", "31", "32", "33", "34", "35", "36", - "37", "38", "39", "40", "41", "42", "43", "44", "45", - "46", "47", "48", "49", "50", "51", "52", "53", "54", - "55", "56", "57", "58", "59", "60", "61", "62", "63", - "64", "65", "66", "67", "68", "69", "70", "71", "72", - "73", "74", "75", "76", "77", "78", "79", "80", "81", - "82..83", "84", "85..118", "119", "120", "121..122", - "123", "124..256", "257", "258..32767", "32768..65535" }, - Values { "Unknown", "Other", "Pad", "Subnet Mask", - "Time Offset", "Router Option", "Time Server", - "Name Server", "Domain Name Server", "Log Server", - "Cookie Server", "LPR Server", "Impress Server", - "Resource Location Server", "Host Name", "Boot File Size", - "Merit Dump File", "Domain Name", "Swap Server", - "Root Path", "Extensions Path", - "IP Forwarding Enable/Disable", - "Non-Local Source Routing Enable/Disable", - "Policy Filter", "Maximum Datagram Reassembly Size", - "Default IP Time-to-live", "Path MTU Aging Timeout", - "Path MTU Plateau Table", "Interface MTU", - "All Subnets are Local", "Broadcast Address", - "Perform Subnet Mask Discovery", "Mask Supplier", - "Perform Router Discovery", "Router Solicitation Address", - "Static Route", "Trailer Encapsulation", - "ARP Cache Timeout", "Ethernet Encapsulation", - "TCP Default TTL", "TCP Keepalive Interval", - "TCP Keepalive Garbage", - "Network Information Service Domain", - "Network Information Servers", - "Network Time Protocol Servers", - "Vendor Specific Information", - "NetBIOS over TCP/IP Name Server", - "NetBIOS over TCP/IP Datagram Distribution Server", - "NetBIOS over TCP/IP Node Type", - "NetBIOS over TCP/IP Scope", - "X Window System Font Server", - "X Window System Display Manager", "Requested IP Address", - "Lease Time", "Option Overload", "Message Type", - "Server Identifier", "Parameter Request List", - "Error Message", "Maximum Message Size", - "Renewal (T1) Time", "Rebinding (T2) Time", - "Vendor Class Identifier", "Client Identifier", - "DMTF Reserved", "DMTF Reserved", - "Network Information Service+ Domain", - "Network Information Service+ Servers", - "TFTP Server Name", "Bootfile Name", - "Mobile IP Home Agent", - "Simple Mail Transport Protocol (SMTP) Server", - "Post Office Protocol (POP3) Server", - "Network News Transport Protocol (NNTP) Server", - "Default World Wide Web (WWW) Server", - "Default Finger Server", - "Default Internet Relay Chat (IRC) Server", - "StreetTalk Server", - "StreetTalk Directory Assistance (STDA) Server", - "User Class", "SLP Directory Agent", "SLP Service Scope", - "DMTF Reserved", "Relay Agent Information", - "DMTF Reserved", "Name Service Search", - "Subnet Selection", "DMTF Reserved", "Classless Route", - "DMTF Reserved", "End", "DMTF Reserved", "Vendor Reserved" }, - MappingStrings { "RFC2132.IETF", "RFC2937.IETF", - "RFC3011.IETF", "RFC3046.IETF", "RFC3004.IETF", - "RFC2610.IETF", "RFC3442.IETF" }, - ModelCorrespondence { - "CIM_DHCPProtocolEndpoint.OptionsReceived" }] - uint16 RequestedOptions[]; - - [Write, Description ( - "The list of DHCP options required for the client to " - "operate properly. This list of DHCP options is for IPv4." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26", "27", - "28", "29", "30", "31", "32", "33", "34", "35", "36", - "37", "38", "39", "40", "41", "42", "43", "44", "45", - "46", "47", "48", "49", "50", "51", "52", "53", "54", - "55", "56", "57", "58", "59", "60", "61", "62", "63", - "64", "65", "66", "67", "68", "69", "70", "71", "72", - "73", "74", "75", "76", "77", "78", "79", "80", "81", - "82..83", "84", "85..118", "119", "120", "121..122", - "123", "124..256", "257", "258..32767", "32768..65535" }, - Values { "Unknown", "Other", "Pad", "Subnet Mask", - "Time Offset", "Router Option", "Time Server", - "Name Server", "Domain Name Server", "Log Server", - "Cookie Server", "LPR Server", "Impress Server", - "Resource Location Server", "Host Name", "Boot File Size", - "Merit Dump File", "Domain Name", "Swap Server", - "Root Path", "Extensions Path", - "IP Forwarding Enable/Disable", - "Non-Local Source Routing Enable/Disable", - "Policy Filter", "Maximum Datagram Reassembly Size", - "Default IP Time-to-live", "Path MTU Aging Timeout", - "Path MTU Plateau Table", "Interface MTU", - "All Subnets are Local", "Broadcast Address", - "Perform Subnet Mask Discovery", "Mask Supplier", - "Perform Router Discovery", "Router Solicitation Address", - "Static Route", "Trailer Encapsulation", - "ARP Cache Timeout", "Ethernet Encapsulation", - "TCP Default TTL", "TCP Keepalive Interval", - "TCP Keepalive Garbage", - "Network Information Service Domain", - "Network Information Servers", - "Network Time Protocol Servers", - "Vendor Specific Information", - "NetBIOS over TCP/IP Name Server", - "NetBIOS over TCP/IP Datagram Distribution Server", - "NetBIOS over TCP/IP Node Type", - "NetBIOS over TCP/IP Scope", - "X Window System Font Server", - "X Window System Display Manager", "Requested IP Address", - "Lease Time", "Option Overload", "Message Type", - "Server Identifier", "Parameter Request List", - "Error Message", "Maximum Message Size", - "Renewal (T1) Time", "Rebinding (T2) Time", - "Vendor Class Identifier", "Client Identifier", - "DMTF Reserved", "DMTF Reserved", - "Network Information Service+ Domain", - "Network Information Service+ Servers", - "TFTP Server Name", "Bootfile Name", - "Mobile IP Home Agent", - "Simple Mail Transport Protocol (SMTP) Server", - "Post Office Protocol (POP3) Server", - "Network News Transport Protocol (NNTP) Server", - "Default World Wide Web (WWW) Server", - "Default Finger Server", - "Default Internet Relay Chat (IRC) Server", - "StreetTalk Server", - "StreetTalk Directory Assistance (STDA) Server", - "User Class", "SLP Directory Agent", "SLP Service Scope", - "DMTF Reserved", "Relay Agent Information", - "DMTF Reserved", "Name Service Search", - "Subnet Selection", "DMTF Reserved", "Classless Route", - "DMTF Reserved", "End", "DMTF Reserved", "Vendor Reserved" }, - MappingStrings { "RFC2132.IETF", "RFC2937.IETF", - "RFC3011.IETF", "RFC3046.IETF", "RFC3004.IETF", - "RFC2610.IETF", "RFC3442.IETF" }, - ModelCorrespondence { - "CIM_DHCPProtocolEndpoint.OptionsReceived" }] - uint16 RequiredOptions[]; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_DNSGeneralSettingData.mof b/build/vendor/dmtf_mof/Network/CIM_DNSGeneralSettingData.mof deleted file mode 100644 index 8b5c753b..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_DNSGeneralSettingData.mof +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.14.0" ), - UMLPackagePath ( "CIM::Network::DNS" ), - Description ( - "The DNSGeneralSettingData class represents the system wide " - "configuration options for the DNS client. Therefore, these " - "configuration parameters are scoped to a computer system and " - "are applicable to all of the network interfaces of the scoping " - "system." )] -class CIM_DNSGeneralSettingData : CIM_IPAssignmentSettingData { - - [Override ( "AddressOrigin" ), - Description ( - "AddressOrigin identifies the method by which the IP " - "Address, Subnet Mask, and Gateway were assigned to the " - "IPProtocolEndpoint. This is independent of the DNS " - "configuration, thus this property has the value of 2 " - "(\"Not Applicable\")" ), - ValueMap { "0..1", "2", "3..32767", "32768.." }, - Values { "DMTF Reserved", "Not Applicable", "DMTF Reserved", - "Vendor Reserved" }] - uint16 AddressOrigin = 2; - - [Write, Description ( - "Whether or not the client should automatically append " - "the primary domain suffix to target names prior to " - "attempting to resolve." ), - ModelCorrespondence { - "CIM_DNSProtocolEndpoint.AppendPrimarySuffixes" }] - boolean AppendPrimarySuffixes; - - [Write, Description ( - "Whether or not the client should automatically append " - "the parent domain suffix to target names prior to " - "attempting to resolve." ), - ModelCorrespondence { - "CIM_DNSProtocolEndpoint.AppendParentSuffixes" }] - boolean AppendParentSuffixes; - - [Write, Description ( - "DNS suffixes to append when attempting to resolve a hostname." - ), - ModelCorrespondence { - "CIM_DNSProtocolEndpoint.DNSSuffixesToAppend" }] - string DNSSuffixesToAppend[]; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_DNSProtocolEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_DNSProtocolEndpoint.mof deleted file mode 100644 index 580ed7f7..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_DNSProtocolEndpoint.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Network::ProtocolEndpoints" ), - Description ( - "A class derived from CIM_ProtocolEndpoint which represents the " - "DNS client and DNS configuration for a single IP endpoint. The " - "DNS server addresses can be determined by querying the " - "AccessInfo property of associated CIM_RemoteServiceAccessPoint " - "instances which have an AccessContext of \"DNS Server\". The " - "order in which the DNS servers will be queried can be " - "determined by the relative values of the OrderOfAccess " - "property on each CIM_RemoteAccessAvailableToElement " - "association which associated the CIM_RemoteServiceAccessPoint " - "with the CIM_DNSProtocolEndpoint." )] -class CIM_DNSProtocolEndpoint : CIM_ProtocolEndpoint { - - [Write, Description ( - "The Hostname actually in use for this client connection." )] - string Hostname; - - [Description ( - "One or more DHCP options that the DNS client is " - "utilizing if they were returned during a DHCP bind " - "operation." ), - ValueMap { "8", "14", "17", "18..32767", "32768..65535" }, - Values { "Domain Name Server", "Host Name", "Domain Name", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { - "CIM_DHCPProtocolEndpoint.OptionsReceived", - "CIM_DNSSettingData.DHCPOptionsToUse" }] - uint16 DHCPOptionsToUse[]; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_DNSSettingData.mof b/build/vendor/dmtf_mof/Network/CIM_DNSSettingData.mof deleted file mode 100644 index c35eaf02..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_DNSSettingData.mof +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.18.1" ), - UMLPackagePath ( "CIM::Network::DNS" ), - Description ( - "DNSSettingData defines the DNSconfiguration settings for a " - "single IP network connection. With the exception of the the " - "DNSServerAddresses and the hostname in use, the configuration " - "of a DNSProtocolEndpoint is indicated by the properties of an " - "associated instance of DNSSettingData." )] -class CIM_DNSSettingData : CIM_IPAssignmentSettingData { - - [Override ( "AddressOrigin" ), - Description ( - "AddressOrigin identifies the method by which the IP " - "Address, Subnet Mask, and Gateway were assigned to the " - "IPProtocolEndpoint. This is independent of the DNS " - "configuration, thus this property has the value of 2 " - "(\"Not Applicable\")" ), - ValueMap { "0..1", "2", "3..32767", "32768.." }, - Values { "DMTF Reserved", "Not Applicable", "DMTF Reserved", - "Vendor Reserved" }] - uint16 AddressOrigin = 2; - - [Write, Description ( - "The domain to use for this client connection." ), - ModelCorrespondence { "CIM_DNSProtocolEndpoint.DomainName" }] - string DomainName; - - [Write, Description ( - "The Hostname requested for this client connection." ), - ModelCorrespondence { "CIM_DNSProtocolEndpoint.Hostname" }] - string RequestedHostname; - - [Description ( - "Whether or not the suffix should be appended before " - "registering the client name with the DNS server." ), - ModelCorrespondence { - "CIM_DNSProtocolEndpoint.UseSuffixWhenRegistering" }] - boolean UseSuffixWhenRegistering; - - [Description ( - "Whether or not this connection\'s address should be " - "registered in DNS." ), - ModelCorrespondence { - "CIM_DNSProtocolEndpoint.RegisterThisConnectionsAddress" }] - boolean RegisterThisConnectionsAddress; - - [Write, Description ( - "The DNS servers to contact. The array ordering " - "correlates to the order in which the DNS servers will be " - "contacted. The RemoteServiceAccessPoints associated with " - "the DNSProtocolEndpoint with the value of the " - "AccessContext property being \"DNS Server\" represent " - "the actual DNS Servers being utilized by the DNS client." ), - ArrayType ( "Ordered" )] - string DNSServerAddresses[]; - - [Description ( - "One or more DHCP options that the DNS client should " - "utilise if they are returned during a DHCP bind " - "operation." ), - ValueMap { "8", "14", "17", "18..32767", "32768..65535" }, - Values { "Domain Name Server", "Host Name", "Domain Name", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { - "CIM_DHCPProtocolEndpoint.OptionsReceived", - "CIM_DNSProtocolEndpoint.DHCPOptionsToUse" }] - uint16 DHCPOptionsToUse[]; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_DSCPMarkerService.mof b/build/vendor/dmtf_mof/Network/CIM_DSCPMarkerService.mof deleted file mode 100644 index d6ee7bf3..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_DSCPMarkerService.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DSCPMarkerService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "DSCPMarkerService marks the differentiated services codepoint " - "(DSCP) within the DS field in the IPv4 and IPv6 packet " - "headers, as defined in [R2474]. It is marked with the specific " - "value defined in the property, DSCPValue. Following common " - "practice, the value to be written into the field is " - "represented as an unsigned 8-bit integer." )] -class CIM_DSCPMarkerService : CIM_MarkerService { - - [Description ( - "This property is an unsigned 8-bit integer, representing " - "a value to be used for marking the DSCP field in an IPv4 " - "or Ipv6 packet header. Since the DSCP consists of 6 " - "bits, the values for this property are limited to the " - "range 0..63. When the DSCP is marked, the remaining two " - "bits in the DS field are left unchanged." ), - MinValue ( 0 ), - MaxValue ( 63 )] - uint8 DSCPValue; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_DiffServService.mof b/build/vendor/dmtf_mof/Network/CIM_DiffServService.mof deleted file mode 100644 index d6b8b43e..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_DiffServService.mof +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DiffServService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "DiffServService represents the use of standard or custom " - "DiffServ services (associated with particular Per Hop " - "Behaviors, PHBs) to implement a (higher-level) QoSService. " - "Note that the DiffServService may be just one of a set of " - "coordinated QoSSubServices that together implement a " - "higher-level QoSService. The relationship between the " - "QoSServices is described using the association, QoSSubService." )] -class CIM_DiffServService : CIM_QoSService { - - [Deprecated { "CIM_DiffServService.PHBID" }, - Description ( - "This property is an unsigned 8-bit integer, and defines " - "the Differentiated Services Code Point (DSCP) that this " - "link uses to represent various types of differentiated " - "services through device-specific configuration commands. " - "It is deprecated since this information is conveyed via " - "filter lists, associated with ClassifierElements. The " - "DiffServService is better represented as a Per Hop " - "Behavior." )] - uint8 DSCP; - - [Description ( - "A 16-bit unsigned integer which identifies a particular " - "per hop behavior, or family of per hop behaviors. The " - "value is a Per Hop Behavior Identification Code, as " - "defined in [R3140]. Note that as defined, these " - "identification codes use the default, recommended, code " - "points for PHBs as part of their structure. These values " - "may well be different from the actual value used in the " - "marker, as the marked value is domain-dependent. The " - "ability to indicate the PHB Identification Code " - "associated with a DiffServService is helpful when tying " - "the QoSService to reference documents, and for " - "inter-domain coordination and operation." )] - uint16 PHBID; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_DropThresholdCalculationService.mof b/build/vendor/dmtf_mof/Network/CIM_DropThresholdCalculationService.mof deleted file mode 100644 index 193115b9..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_DropThresholdCalculationService.mof +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DropThresholdCalculationService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This class calculates an average depth for a queue, based on a " - "smoothing weight and a sampling time interval. The latter are " - "properties of this Service, describing how it operates and its " - "necessary parameters. The Service does the calculation on " - "behalf of a RED dropper (as indicated by the association, " - "CalculationServiceForDroppper). A " - "DropThresholdCalculationService is always associated to the " - "single queue that it examines via the Calculation BasedOnQueue " - "relationship." )] -class CIM_DropThresholdCalculationService : CIM_Service { - - [Description ( - "This property is a 32-bit unsigned integer, ranging " - "between 0 and 100,000 - specified in thousandths. It " - "defines the weighting of past history in affecting the " - "calculation of the current average queue depth. The " - "current queue depth calculation uses the inverse of this " - "value as its factor, and one minus that inverse as the " - "factor for the historical average. The calculation takes " - "the form: \n" - "average = (old_average*(1-inverse of SmoothingWeight)) \n" - "+ (current_queue_depth*inverse of SmoothingWeight) \n" - "Implementations may choose to limit the acceptable set " - "of values to a specified set, such as powers of 2." ), - Units ( "Thousandths" ), - MinValue ( 0 ), - MaxValue ( 100000 )] - uint32 SmoothingWeight; - - [Description ( - "This property is a 32-bit unsigned integer, and defines " - "the number of nanoseconds between each calculation of " - "average/smoothed queue depth. When this property is not " - "specified, the CalculationService may determine an " - "appropriate interval." ), - Units ( "NanoSeconds" )] - uint32 TimeInterval; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_DropperService.mof b/build/vendor/dmtf_mof/Network/CIM_DropperService.mof deleted file mode 100644 index 62beb034..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_DropperService.mof +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DropperService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "DropperService represents the ability to selectively drop " - "network traffic, and/or to invoke another ConditioningService " - "(indicated using the NextService association) for further " - "processing of traffic that is not dropped. It is the base " - "class for different types of droppers. Droppers are " - "distinguished by the algorithm that they use to drop traffic. \n" - "\n" - "The NextService association has special semantics for " - "droppers, in addition to conveying the general information of " - "\'what happens next\' (that apply to all Conditioning " - "Services). The queue(s) from which a particular dropper drops " - "packets are identified by following chain(s) of NextService " - "associations \'rightwards\' from the dropper, until they reach " - "a queue." )] -class CIM_DropperService : CIM_ConditioningService { - - [Description ( - "This property is an enumerated 16-bit unsigned integer " - "that defines the type of dropper. Its Values are: \n" - "1: Other \n" - "2: Random \n" - "3: HeadTail \n" - "4: Absolute Dropper \n" - "\n" - "Note: The DropperType property and the DropperService " - "subclasses provide similar information. This property is " - "defined for query purposes and to not require a subclass " - "for all types of DropperServices (for example, to " - "describe an Absolute Dropper in today\'s model). " - "Therefore, DropperService can be instantiated directly " - "and the Type property is needed." ), - ValueMap { "1", "2", "3", "4" }, - Values { "Other", "Random", "HeadTail", "Absolute Dropper" }, - ModelCorrespondence { "CIM_DropperService.OtherDropperType" }] - uint16 DropperType; - - [Description ( - "This property contains a vendor-specific value for the " - "type of dropping that is done. It is used when the value " - "of the DropperType property is 1 (Other)." ), - ModelCorrespondence { "CIM_DropperService.DropperType" }] - string OtherDropperType; - - [Deprecated { "CIM_DropperService.DropperType" }, - Description ( - "This property indicates whether the Dropper will always " - "drop incoming packets (value=1) regardless of their " - "type. It is deprecated since its information is conveyed " - "by the DropperType property (value=4, \'Absolute " - "Dropper\')." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "Always Drop", "Do Not Always Drop" }] - uint16 AlwaysDrop; - - [Description ( - "This enumeration indicates the point in the associated " - "queue (associated via the NextService relationship) from " - "which packets should be dropped. If the value is 0 " - "\"Unknown\", then packets MAY be dropped from any " - "location in the queue." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "Head", "Tail" }] - uint16 DropFrom; - - [Description ( - "This property is an enumerated unsigned 16-bit integer " - "that defines the metric used to trigger the start of " - "dropping packets. This does NOT mean that all packets " - "will be dropped; it does mean that SOME packets will " - "start to be dropped. The number and type of packets " - "dropped is a function of the type of algorithm used by " - "this Dropper. Values are: \n" - "\n" - "1: Other \n" - "2: Queue Threshold \n" - "3: Arrival Rate." ), - ValueMap { "1", "2", "3" }, - Values { "Other", "Queue Threshold", "Arrival Rate" }] - uint16 DropStartMetric; - - [Description ( - "This property is an enumerated unsigned 16-bit integer " - "that defines the metric used to determine when ALL " - "packets will be dropped REGARDLESS of the type of " - "algorithm used by this Dropper. Values are: \n" - "\n" - "1: Other \n" - "2: Queue Threshold \n" - "3: Arrival Rate." ), - ValueMap { "1", "2", "3" }, - Values { "Other", "Queue Threshold", "Arrival Rate" }] - uint16 DropMaintainMetric; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_DynamicForwardingEntry.mof b/build/vendor/dmtf_mof/Network/CIM_DynamicForwardingEntry.mof deleted file mode 100644 index bf1c5cd9..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_DynamicForwardingEntry.mof +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DynamicForwardingEntry -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "A DynamicForwardingEntry represents an entry in the forwarding " - "(filtering) database associated with the " - "TransparentBridgingService. The entry is Weak to the Service " - "as specified by TransparentBridgingDynamicForwarding." )] -class CIM_DynamicForwardingEntry : CIM_LogicalElement { - - [Key, Description ( "The scoping System\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.CreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The scoping System\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.Name" )] - string SystemName; - - [Key, Description ( "The scoping Service\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_Service.CreationClassName" )] - string ServiceCreationClassName; - - [Key, Description ( "The scoping Service\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_Service.Name" )] - string ServiceName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Description ( - "Unicast MAC address for which the TransparentBridging " - "Service has forwarding and/or filtering information. " - "Note that the MAC address is formatted as twelve " - "hexadecimal digits (e.g., \"010203040506\"), with each " - "pair representing one of the six octets of the MAC " - "address in \"canonical\" bit order according to RFC " - "2469." ), - MaxLen ( 12 ), - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dTpFdbAddress" }] - string MACAddress; - - [Description ( "The status of the entry." ), - ValueMap { "1", "2", "3", "4", "5" }, - Values { "Other", "Invalid", "Learned", "Self", "Mgmt" }, - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dTpFdbStatus" }] - uint16 DynamicStatus; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_EFService.mof b/build/vendor/dmtf_mof/Network/CIM_EFService.mof deleted file mode 100644 index c218ab43..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_EFService.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_EFService -// ================================================================== - [Deprecated { "CIM_DiffServService" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This class represents a specialization of the general concept " - "of forwarding network traffic by adding specific semantics " - "that characterize the operation of the Expedited Forwarding " - "(EF) Service (defined in RFC 2598). \n" - "\n" - "The EF PHB can be used to build a low loss, low latency, low " - "jitter, assured bandwidth, end-to-end service through DiffServ " - "domains. Such a service appears to the endpoints like a " - "point-to-point connection or a virtual leased line. This " - "service has also been described as Premium service in the IETF " - "literature. \n" - "\n" - "RFC 2598 defines one DSCP for the EF service. Thus, there is " - "no need to define any attributes in this class, since an " - "instance of the EFService class, by definition, means that " - "this particular DSCP is used. \n" - "\n" - "EFService is deprecated since forwarding based on the value of " - "the DiffServ Code Point is specified using a FilterList, which " - "is associated with a ClassifierElement. If there is a need to " - "distinguish a higher-level set of coordinated QoS services, " - "the DiffServService class can be instantiated directly." )] -class CIM_EFService : CIM_DiffServService { - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_EGPRouteCalcDependency.mof b/build/vendor/dmtf_mof/Network/CIM_EGPRouteCalcDependency.mof deleted file mode 100644 index 95535404..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_EGPRouteCalcDependency.mof +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_EGPRouteCalcDependency -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "This is a specialization of ServiceServiceDependency, and " - "captures the dependency that external gateway protocols (such " - "as BGP) have on interior gateway protocols (such as OSPF)." )] -class CIM_EGPRouteCalcDependency : CIM_ServiceServiceDependency { - - [Override ( "Antecedent" ), - Description ( - "The independent RouteCalculationService that provides " - "routing information from the AS, for the EGP to use." )] - CIM_RouteCalculationService REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The dependent RouteCalculationService (e.g., the Route " - "CalculationService) that is functioning as an EGP." )] - CIM_RouteCalculationService REF Dependent; - - [Description ( - "Sometimes it is necessary to inject EGP information, " - "such as that from BGP, into IGPs. This attribute defines " - "whether this should be done for the two routing " - "protocols that are defined by this association. The " - "values below mean that no, partial, and full EGP " - "information is injected into the IGP, respectively." ), - ValueMap { "1", "2", "3" }, - Values { "None", "Partial", "Full" }] - uint16 IGPInjection; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_ESPTransform.mof b/build/vendor/dmtf_mof/Network/CIM_ESPTransform.mof deleted file mode 100644 index 6c21fc7d..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_ESPTransform.mof +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ESPTransform -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::IPsec" ), - Description ( - "ESPTransform defines the parameters used for a phase 2 ESP " - "(Encapsulating Security Protocol) Security Association." ), - MappingStrings { "IPSP Model.IETF|ESPTransform" }] -class CIM_ESPTransform : CIM_SATransform { - - [Description ( - "IntegrityTransformId is an enumeration that specifies " - "the ESP integrity algorithm to be used. The list of " - "values is generated from the enumeration defined in " - "RFC2407, Section 4.5. Note that the enumeration is " - "different than the RFC list, since the values of Other " - "and None are taken into account. Also, note that 2 " - "(\"None\") is used when ESP is negotiated without " - "authentication." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7..61439", - "61440..65535" }, - Values { "Other", "None", "MD5", "SHA-1", "DES", "KPDK", - "DMTF/IANA Reserved", "Vendor Reserved" }, - MappingStrings { - "IPSP Model.IETF|ESPTransform.IntegrityTransformId", - "RFC2407.IETF|Section 4.5" }, - ModelCorrespondence { - "CIM_ESPTransform.OtherIntegrityTransformId" }] - uint16 IntegrityTransformId; - - [Description ( - "Description of the integrity algorithm when the value 1 " - "(\"Other\") is specified for the property, " - "IntegrityTransformId." ), - ModelCorrespondence { "CIM_ESPTransform.IntegrityTransformId" }] - string OtherIntegrityTransformId; - - [Description ( - "CipherTransformId is an enumeration that specifies the " - "ESP encrypion algorithm to be used. The list of values " - "is defined in RFC2407, Section 4.4.4, where the RFC\'s " - "NULL value maps to 2-\"None\". Note that the enumeration " - "is different than the RFC list, since \'Other\' is added " - "to the enumeration." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12" }, - Values { "Other", "None", "DES_IV64", "DES", "3DES", "RC5", - "IDEA", "CAST", "Blowfish", "3-IDEA", "DES_IV32", "RC4" }, - MappingStrings { - "IPSP Model.IETF|ESPTransform.CipherTransformId", - "RFC2407.IETF|Section 4.4.4" }, - ModelCorrespondence { - "CIM_ESPTransform.OtherCipherTransformId" }] - uint16 CipherTransformId; - - [Description ( - "Description of the encryption algorithm when the value 1 " - "(\"Other\") is specified for the property, " - "CipherTransformId." ), - ModelCorrespondence { "CIM_ESPTransform.CipherTransformId" }] - string OtherCipherTransformId; - - [Description ( - "CipherKeyLength specifies, in bits, the key length for " - "the encryption algorithm. For algorithms with fixed key " - "lengths, this value is ignored." ), - Units ( "Bits" ), - MappingStrings { - "IPSP Model.IETF|ESPTransform.CipherKeyLength" }] - uint16 CipherKeyLength; - - [Description ( - "CipherKeyRounds specifies the key rounds for the " - "encryption algorithm. For algorithms with a fixed number " - "of key rounds, this value is ignored. Currently, key " - "rounds are NOT defined for any ESP encryption " - "algorithms." ), - MappingStrings { - "IPSP Model.IETF|ESPTransform.CipherKeyRounds" }] - uint16 CipherKeyRounds; - - [Description ( - "UseReplayPrevention causes the local peer to enable " - "replay prevention detection. This can be accomplished by " - "using a sequence number when sending a packet or " - "checking the sequence number upon receipt of a packet." ), - MappingStrings { - "IPSP Model.IETF|ESPTransform.UseReplayPrevention" }] - boolean UseReplayPrevention; - - [Description ( - "ReplayPreventionWindowsSize specifies, in bits, the " - "length of the sliding window used by the replay " - "prevention mechanism. The value of this property is " - "meaningless if UseReplayPrevention is false. The window " - "size MUST be a power of 2." ), - Units ( "Bits" ), - MappingStrings { - "IPSP Model.IETF|ESPTransform.ReplayPreventionWindowSize" }] - uint32 ReplayPreventionWindowSize; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_EWMAMeterService.mof b/build/vendor/dmtf_mof/Network/CIM_EWMAMeterService.mof deleted file mode 100644 index 94c576d2..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_EWMAMeterService.mof +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_EWMAMeterService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This is a concrete subclass of the MeterService class that " - "represents an exponentially weighted moving average meter. " - "This meter is a simple low-pass filter that measures the rate " - "of incoming packets over a small, fixed sampling interval. Any " - "admitted packet that pushes the average rate over a " - "pre-defined limit is defined to be non-conforming." )] -class CIM_EWMAMeterService : CIM_MeterService { - - [Description ( - "This property is a 32-bit unsigned integer that defines " - "the average rate against which the sampled arrival rate " - "of packets should be measured. Any packet that causes " - "the sampled rate to exceed this rate is deemed " - "non-conforming. The value is specified in kilobits per " - "second." ), - Units ( "KiloBits Per Second" )] - uint32 AverageRate; - - [Description ( - "This property is a 64-bit unsigned integer that defines " - "the sampling interval used to measure the arrival rate. " - "The calculated rate is averaged over this interval and " - "checked against the AverageRate property. All packets " - "whose computed average arrival rate is less than the " - "AverageRate are deemed conforming. The value is " - "specified in microseconds." ), - Units ( "MicroSeconds" )] - uint64 DeltaInterval; - - [Description ( - "This property is a 32-bit unsigned integer representing " - "the reciprocal of the time constant (e.g., frequency " - "response) of what is essentially a simple low-pass " - "filter. For example, the value 64 for this property " - "represents a time constant value of 1/64." )] - uint32 Gain; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_EgressConditioningServiceOnEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_EgressConditioningServiceOnEndpoint.mof deleted file mode 100644 index 22eae9a6..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_EgressConditioningServiceOnEndpoint.mof +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_EgressConditioningServiceOnEndpoint -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This association represents the binding, in the egress " - "direction, between a ProtocolEndpoint and the last " - "ConditioningService that processes packets before they leave a " - "network device (via that ProtocolEndpoint). This \'last\' " - "ConditioningService is ordinarily a scheduler, but it does not " - "have to be. There can be multiple \'last\' " - "ConditioningServices for an Endpoint (for example, in the case " - "of a fallback scheduler). Therefore, the cardinality for the " - "Dependent object reference remains 0..n. On the other hand, a " - "single ConditioningService cannot be the last one to process " - "packets for multiple Endpoints. So, the cardinality of the " - "Antecedent object reference is narrowed from 0..n to 0..1." )] -class CIM_EgressConditioningServiceOnEndpoint : CIM_ServiceSAPDependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "The ProtocolEndpoint through which traffic leaves a " - "network device." )] - CIM_ProtocolEndpoint REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The ConditioningService which ends the traffic " - "conditioning processing within a network device." )] - CIM_ConditioningService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_ElementInSchedulingService.mof b/build/vendor/dmtf_mof/Network/CIM_ElementInSchedulingService.mof deleted file mode 100644 index 8c2fcdcc..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_ElementInSchedulingService.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ElementInSchedulingService -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This association represents the relationship between a " - "PacketSchedulingService and the set of SchedulingElements that " - "tie it to its inputs (either QueuingServices or other " - "PacketSchedulingServices)." )] -class CIM_ElementInSchedulingService : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( - "The scheduler aggregating the SchedulingElement. A " - "SchedulingElement can be associated with at most one " - "SchedulingService." )] - CIM_PacketSchedulingService REF GroupComponent; - - [Override ( "PartComponent" ), - Min ( 1 ), - Description ( - "A SchedulingElement that ties either a queue or another " - "scheduler to the referenced PacketSchedulingService. " - "Every PacketSchedulingService MUST have at least one " - "Scheduling Element/input." )] - CIM_SchedulingElement REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_EndpointIdentity.mof b/build/vendor/dmtf_mof/Network/CIM_EndpointIdentity.mof deleted file mode 100644 index efc94b25..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_EndpointIdentity.mof +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_EndpointIdentity -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::ProtocolEndpoints" ), - Description ( - "CIM_EndpointIdentity indicates that two ProtocolEndpoints " - "represent different aspects of the same underlying address or " - "protocol-specific ID. This association refines the " - "CIM_LogicalIdentity superclass by restricting it to the " - "Endpoint level and defining its use in well understood " - "scenarios. One of these scenarios is to represent that an " - "Endpoint has both \'LAN\' and protocol-specific aspects. For " - "example, an Endpoint could be both a LANEndpoint as well as a " - "DHCPEndpoint." )] -class CIM_EndpointIdentity : CIM_LogicalIdentity { - - [Override ( "SystemElement" ), - Description ( - "SystemElement represents one aspect of the Endpoint." )] - CIM_ProtocolEndpoint REF SystemElement; - - [Override ( "SameElement" ), - Description ( - "SameElement represents an alternate aspect of the Endpoint." - )] - CIM_ProtocolEndpoint REF SameElement; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_EndpointInArea.mof b/build/vendor/dmtf_mof/Network/CIM_EndpointInArea.mof deleted file mode 100644 index 8e27d685..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_EndpointInArea.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_EndpointInArea -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::OSPF" ), - Description ( "This relation connects an OSPF endpoint to an area." )] -class CIM_EndpointInArea : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The OSPF area." )] - CIM_OSPFArea REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The OSPF endpoint in the area." )] - CIM_OSPFProtocolEndpointBase REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_EndpointInLink.mof b/build/vendor/dmtf_mof/Network/CIM_EndpointInLink.mof deleted file mode 100644 index dd82da90..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_EndpointInLink.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_EndpointInLink -// ================================================================== - [Association, Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::OSPF" ), - Description ( - "This association connects an OSPFLink to the OSPFProtocol " - "Endpoints that this link aggregates." )] -class CIM_EndpointInLink : CIM_MemberOfCollection { - - [Aggregate, Override ( "Collection" ), - Max ( 1 ), - Description ( "The OSPF link." )] - CIM_OSPFLink REF Collection; - - [Override ( "Member" ), - Description ( "The OSPF protocol endpoint." )] - CIM_OSPFProtocolEndpointBase REF Member; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_EndpointOfNetworkPipe.mof b/build/vendor/dmtf_mof/Network/CIM_EndpointOfNetworkPipe.mof deleted file mode 100644 index ef6a145d..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_EndpointOfNetworkPipe.mof +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_EndpointOfNetworkPipe -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Pipes" ), - Description ( - "EndpointOfNetworkPipe describes the endpoints between which a " - "pipe transfers information. Whether an endpoint is a source or " - "sink is indicated by a property of the association, " - "SourceOrSink." ), - MappingStrings { "Recommendation.ITU|M3100.Pipe.a-TPInstance", - "Recommendation.ITU|M3100.Pipe.z-TPInstance" }] -class CIM_EndpointOfNetworkPipe : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 2 ), - Max ( 2 ), - Description ( "One of the endpoints of the pipe." )] - CIM_ProtocolEndpoint REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The pipe which is dependent on the endpoints as the " - "source or sink of the transferred information." )] - CIM_NetworkPipe REF Dependent; - - [Description ( - "Indicates whether the endpoint is a source (value = 2), " - "or sink (value = 3) for the pipe. If this information is " - "not applicable, the property is set to 4. If the " - "information is not known, the property is set to 0." ), - ValueMap { "0", "2", "3", "4" }, - Values { "Unknown", "Source", "Sink", "Not Applicable" }] - uint16 SourceOrSink; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_EntriesInFilterList.mof b/build/vendor/dmtf_mof/Network/CIM_EntriesInFilterList.mof deleted file mode 100644 index 6e76ff71..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_EntriesInFilterList.mof +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_EntriesInFilterList -// ================================================================== - [Association, Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Filtering" ), - Description ( - "This is a specialization of the CIM_Component aggregation " - "which is used to define a set of filter entries (subclasses of " - "FilterEntryBase) that are aggregated by a particular " - "FilterList." )] -class CIM_EntriesInFilterList : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( - "The FilterList, which aggregates the set of FilterEntries." - )] - CIM_FilterList REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "Any subclass of FilterEntryBase which is a part of the FilterList." - )] - CIM_FilterEntryBase REF PartComponent; - - [Description ( - "The order of the Entry relative to all others in the " - "FilterList. The only permissible value is zero - " - "indicating that all the Entries are ANDed together." ), - ValueMap { "0" }] - uint16 EntrySequence = 0; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_FailNextScheduler.mof b/build/vendor/dmtf_mof/Network/CIM_FailNextScheduler.mof deleted file mode 100644 index 2753e322..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_FailNextScheduler.mof +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FailNextScheduler -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This association is a subclass of NextScheduler, and defines a " - "predecessor-successor relationship between a NonWork " - "ConservingSchedulingService and another PacketScheduling " - "Service. It indicates that the NonWorkConserving scheduler may " - "pass up a scheduling opportunity (thereby behaving in a " - "non-work conserving manner), and make the resulting bandwidth " - "available to the FollowingService scheduler." )] -class CIM_FailNextScheduler : CIM_NextScheduler { - - [Override ( "PrecedingService" ), - Description ( - "The NonWorkConservingSchedulingService whose excess " - "bandwidth is made available to the scheduler identified " - "by the FollowingService reference. The [0..n] " - "cardinality indicates that a single FollowingService " - "scheduler may have the opportunity to use the unused " - "bandwidth of multiple prior non-work-conserving " - "schedulers." )] - CIM_NonWorkConservingSchedulingService REF PrecedingService; - - [Override ( "FollowingService" ), - Max ( 1 ), - Description ( - "A scheduler that may use the bandwidth available from " - "the non-work conserving scheduler." )] - CIM_PacketSchedulingService REF FollowingService; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_FilterEntry.mof b/build/vendor/dmtf_mof/Network/CIM_FilterEntry.mof deleted file mode 100644 index b09325f4..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_FilterEntry.mof +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FilterEntry -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Filtering" ), - Description ( - "A FilterEntry is used by network devices to identify traffic " - "and either forward it (with possibly further processing) to " - "its destination, or to deny its forwarding. It is one of the " - "building block of FilterLists. \n" - "\n" - "This class is oriented towards packet filtering. Other " - "subclasses of FilterEntryBase can be defined to do other types " - "of filtering. \n" - "\n" - "A FilterEntry is weak to the network device (i.e., the " - "ComputerSystem) that contains it. Hence, the ComputerSystem " - "keys are propagated to this class." )] -class CIM_FilterEntry : CIM_FilterEntryBase { - - [Description ( - "This defines the type of traffic that is being filtered. " - "This will affect the filtering rules in the " - "MatchCondition property of this class." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "IPv4", "IPX", "IPv6", "Any", "Other" }, - ModelCorrespondence { "CIM_FilterEntry.OtherTrafficType" }] - uint16 TrafficType; - - [Description ( - "If the value of the TrafficType property in this class " - "is 5 (i.e., \"Other\"), then the specific type of " - "traffic is specified in this property." ), - ModelCorrespondence { "CIM_FilterEntry.TrafficType" }] - string OtherTrafficType; - - [Description ( - "This specifies one of a set of ways to identify traffic. " - "If the value is 1 (i.e., \"Other\"), then the specific " - "type of filtering is specified in the " - "OtherMatchConditionType property of this class." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13" }, - Values { "Other", "Source Address and Mask", - "Destination Address and Mask", "Source Port", - "Source Port Range", "Destination Port", - "Destination Port Range", "Protocol Type", - "Protocol Type and Option", "DSCP", "ToS Value", - "802.1P Priority Value", "Any" }, - ModelCorrespondence { - "CIM_FilterEntry.OtherMatchConditionType" }] - uint16 MatchConditionType; - - [Description ( - "If the value of the MatchConditionType property in this " - "class is 1 (i.e., \"Other\"), then the specific type of " - "filtering is specified in this property." ), - ModelCorrespondence { "CIM_FilterEntry.MatchConditionType" }] - string OtherMatchConditionType; - - [Description ( - "This is the value of the condition that filters the " - "traffic. It corresponds to the condition specified in " - "the MatchConditionType property. If, however, the value " - "of the MatchConditionProperty is 1, then it corresponds " - "to the condition specified in the " - "OtherMatchConditionType property." )] - string MatchConditionValue; - - [Description ( - "This defines whether the action should be to forward or " - "deny traffic meeting the match condition specified in " - "this filter." ), - ValueMap { "1", "2" }, - Values { "Permit", "Deny" }] - uint16 Action; - - [Description ( - "This defines whether this FilterEntry is the default " - "entry to use by its FilterList." )] - boolean DefaultFilter; - - [Description ( - "This defines the traffic class that is being matched by " - "this FilterEntry. Note that FilterEntries are aggregated " - "into FilterLists by the EntriesInFilterList " - "relationship. If the EntrySequence property of the " - "aggregation is set to 0, this means that all the Filter " - "Entries should be ANDed together. Consequently, the " - "TrafficClass property of each of the aggregated Entries " - "should be set to the same value." )] - string TrafficClass; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_FilterEntryBase.mof b/build/vendor/dmtf_mof/Network/CIM_FilterEntryBase.mof deleted file mode 100644 index 7278cfc9..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_FilterEntryBase.mof +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FilterEntryBase -// ================================================================== - [Abstract, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Filtering" ), - Description ( - "A FilterList aggregates instances of (subclasses of) " - "FilterEntryBase via the aggregation EntriesInFilterList. The " - "filter entries are always ANDed together when grouped by the " - "FilterList. Note that it is possible to aggregate different " - "types of filters into a single FilterList - for example, " - "packet header filters (represented by the IpHeadersFilter " - "class) and IPsec security filters. \n" - "\n" - "A FilterList is weak to the network device (e.g., the " - "ComputerSystem) that contains it. Hence, the ComputerSystem " - "keys are propagated to this class." )] -class CIM_FilterEntryBase : CIM_LogicalElement { - - [Key, Description ( - "The scoping ComputerSystem\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_ComputerSystem.CreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The scoping ComputerSystem\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_ComputerSystem.Name" )] - string SystemName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Override ( "Name" ), - Description ( - "The Name property defines the label by which the Filter " - "Entry is known and uniquely identified." ), - MaxLen ( 256 )] - string Name; - - [Description ( - "Boolean indicating that the match condition described in " - "the properties of the FilterEntryBase subclass should be " - "negated. This property is defined for ease of use when " - "filtering on simple negations - for example, to select " - "all source ports except 162. It is not recommended that " - "this Boolean be set to True when filtering on multiple " - "criteria, such as defining an IPHeadersFilter based on " - "source/destination addresses, ports, and DiffServ Code " - "Points." )] - boolean IsNegated; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_FilterEntryInSystem.mof b/build/vendor/dmtf_mof/Network/CIM_FilterEntryInSystem.mof deleted file mode 100644 index eb4a9347..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_FilterEntryInSystem.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FilterEntryInSystem -// ================================================================== - [Association, Deprecated { "CIM_HostedFilterEntryBase" }, - Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Filtering" ), - Description ( - "All filter entries (FilterEntryBase and its subclasses) are " - "defined in the context of a ComputerSystem/network device, " - "where they are used to identify and act on network traffic. " - "Note that this class is deprecated since its subclassing is " - "not correct. It subclasses from System Component, but a " - "FilterEntryBase is NOT a Component of a System. Instead, it is " - "hosted/scoped by the System. In versions up to CIM 2.6, " - "FilterEntryInSystem was a mandatory, Weak relationship. This " - "is no longer true, beginning with CIM V2.7." )] -class CIM_FilterEntryInSystem : CIM_SystemComponent { - - [Deprecated { "CIM_HostedFilterEntryBase.Antecedent" }, - Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( - "The ComputerSystem/network device that scopes the FilterEntryBase." - )] - CIM_ComputerSystem REF GroupComponent; - - [Deprecated { "CIM_HostedFilterEntryBase.Dependent" }, - Override ( "PartComponent" ), - Description ( "The FilterEntryBase on the System." )] - CIM_FilterEntryBase REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_FilterList.mof b/build/vendor/dmtf_mof/Network/CIM_FilterList.mof deleted file mode 100644 index e85070b2..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_FilterList.mof +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FilterList -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Filtering" ), - Description ( - "A FilterList is used by network devices to identify routes by " - "aggregating a set of FilterEntries into a unit, called a " - "FilterList. FilterLists can also be used to accept or deny " - "routing updates. \n" - "\n" - "A FilterList is weak to the network device (i.e., the " - "ComputerSystem) that contains it. Hence, the ComputerSystem " - "keys are propagated to this class." )] -class CIM_FilterList : CIM_LogicalElement { - - [Key, Description ( - "The scoping ComputerSystem\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_ComputerSystem.CreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The scoping ComputerSystem\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_ComputerSystem.Name" )] - string SystemName; - - [Key, Description ( "The type of class that this instance is." )] - string CreationClassName; - - [Key, Override ( "Name" ), - Description ( "This is the name of the FilterList." ), - MaxLen ( 256 )] - string Name; - - [Description ( - "This defines whether the FilterList is used for input, " - "output, or both input and output filtering. All values " - "are used with respect to the interface for which the " - "FilterList applies. \n" - "\n" - "\"Not Applicable\" (0) is used when there is no " - "direction applicable to the FilterList. \"Input\" (1) is " - "used when the FilterList applies to packets that are " - "inbound on the related interface. \"Output\" (2) is used " - "when the FilterList applies to packets that are outbound " - "on the related interface. \"Both\" (3) is used to " - "indicate that the direction is immaterial, e.g., to " - "filter on a source subnet regardless of whether the flow " - "is inbound or outbound. \"Mirrored\" (4) is also " - "applicable to both inbound and outbound flow processing, " - "but indicates that the filter criteria are applied " - "asymmetrically to traffic in both directions and, thus, " - "specifies the reversal of source and destination " - "criteria (as opposed to the equality of these criteria " - "as indicated by \"Both\"). The match conditions in the " - "aggregated FilterEntryBase subclass instances are " - "defined from the perspective of outbound flows and " - "applied to inbound flows as well by reversing the source " - "and destination criteria. So, for example, consider a " - "FilterList with 3 FilterEntries indicating destination " - "port = 80, and source and destination addresses of a and " - "b, respectively. Then, for the outbound direction, the " - "filter entries match as specified and the \'mirror\' " - "(for the inbound direction) matches on source port = 80 " - "and source and destination addresses of b and a, " - "respectively." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Not Applicable", "Input", "Output", "Both", - "Mirrored" }] - uint16 Direction; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_FilterListInSystem.mof b/build/vendor/dmtf_mof/Network/CIM_FilterListInSystem.mof deleted file mode 100644 index 94ecfd99..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_FilterListInSystem.mof +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FilterListInSystem -// ================================================================== - [Association, Deprecated { "CIM_HostedFilterList" }, - Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Filtering" ), - Description ( - "FilterLists are defined in the context of a ComputerSystem " - "(e.g., a router, firewall or host). Note that this class is " - "deprecated since its subclassing is not correct. It subclasses " - "from SystemComponent, but a FilterList is NOT a Component of a " - "System. Instead, it is hosted/scoped by the System. In " - "versions up to CIM 2.6, FilterListInSystem was a mandatory, " - "Weak relationship. This is no longer true, beginning with CIM " - "V2.7." )] -class CIM_FilterListInSystem : CIM_SystemComponent { - - [Deprecated { "CIM_HostedFilterList.Antecedent" }, - Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( - "The ComputerSystem/network device that scopes the " - "FilterList and administers it." )] - CIM_ComputerSystem REF GroupComponent; - - [Deprecated { "CIM_HostedFilterList.Dependent" }, - Override ( "PartComponent" ), - Description ( "The FilterList on the System." )] - CIM_FilterList REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_FilterListsInBGPRouteMap.mof b/build/vendor/dmtf_mof/Network/CIM_FilterListsInBGPRouteMap.mof deleted file mode 100644 index 7bc1ebaa..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_FilterListsInBGPRouteMap.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FilterListsInBGPRouteMap -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "RouteMaps do not have to use FilterLists, but if they do, this " - "association defines which FilterList is used by a particular " - "RouteMap." )] -class CIM_FilterListsInBGPRouteMap : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The FilterList used by a RouteMap." )] - CIM_FilterList REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The RouteMap using the FilterList." )] - CIM_BGPRouteMap REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_FilterOfSecurityAssociation.mof b/build/vendor/dmtf_mof/Network/CIM_FilterOfSecurityAssociation.mof deleted file mode 100644 index 60f6efce..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_FilterOfSecurityAssociation.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FilterOfSecurityAssociation -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::IPsec" ), - Description ( - "FilterOfSecurityAssociation associates a network traffic " - "specification (i.e., a FilterList) with a SecurityAssociation " - "Endpoint, to which the filter list applies." )] -class CIM_FilterOfSecurityAssociation : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "FilterList describing the traffic to be selected/matched." )] - CIM_FilterList REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "SecurityAssociation using the FilterList as its traffic selector." - )] - CIM_SecurityAssociationEndpoint REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_FilteredBGPAttributes.mof b/build/vendor/dmtf_mof/Network/CIM_FilteredBGPAttributes.mof deleted file mode 100644 index 519bbfad..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_FilteredBGPAttributes.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FilteredBGPAttributes -// ================================================================== - [Association, Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "This is a specialization of the Component aggregation, which " - "is used to define the set of BGP Attributes that are used by a " - "particular Routing Policy." )] -class CIM_FilteredBGPAttributes : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Description ( - "The RoutingPolicy, which aggregates a set of BGP attributes." - )] - CIM_RoutingPolicy REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "A BGP attribute, which is part-of the RoutingPolicy." )] - CIM_BGPAttributes REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_FlowService.mof b/build/vendor/dmtf_mof/Network/CIM_FlowService.mof deleted file mode 100644 index a2fb4bd2..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_FlowService.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FlowService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This class represents a service that supports a particular " - "microflow. The microflow is identified by the string-valued " - "property FlowID. In some implementations, an instance of this " - "class corresponds to an entry in the implementation\'s flow " - "table." )] -class CIM_FlowService : CIM_QoSService { - - [Description ( - "This property is a string containing an identifier for a " - "microflow." )] - string FlowID; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_ForwardedRoutes.mof b/build/vendor/dmtf_mof/Network/CIM_ForwardedRoutes.mof deleted file mode 100644 index 7a2895a3..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_ForwardedRoutes.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ForwardedRoutes -// ================================================================== - [Association, Deprecated { "No value" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Routes" ), - Description ( - "This assocation makes explicit the IP routes that are defined " - "in the context of a specific ForwardingService. Every " - "ForwardingService can have its own unique set of IP routing " - "destinations. The association is deprecated since it is " - "incorrect to mandate the existence of a ForwardingService in " - "order to define the existence of a route." )] -class CIM_ForwardedRoutes : CIM_RouteForwardedByService { - - [Deprecated { "No value" }, - Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The forwarding service for the route." )] - CIM_ForwardingService REF Antecedent; - - [Deprecated { "No value" }, - Override ( "Dependent" ), - Weak, Description ( "The IP route being forwarded." )] - CIM_IPRoute REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_ForwardingService.mof b/build/vendor/dmtf_mof/Network/CIM_ForwardingService.mof deleted file mode 100644 index 46269068..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_ForwardingService.mof +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ForwardingService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::RoutingForwarding" ), - Description ( - "This class represents the functions used in forwarding network " - "traffic. Its instances act on packets received from one or " - "more ProtocolEndpoints or Services, and drop (discard), or " - "send those packets to one or more other ProtocolEndpoints or " - "Services. The explicit Endpoints being forwarded between, are " - "described using the ForwardsAmong association (or one of its " - "subclasses). Generally, the Endpoints are at the same protocol " - "layer and are usually of similar types, or of the same type. " - "ForwardingService is different than RouteCalculation Service " - "in that it represents the function of forwarding traffic " - "independent of calculating routing information. \n" - "\n" - "Examining the ForwardingService class definition, note that " - "its superclass NetworkService is deprecated. Therefore, " - "NetworkService\'s properties need not be implemented in an " - "instance of ForwardingService. Unfortunately, NetworkService " - "cannot be removed from the object hierarchy without a major " - "Schema release. When/if this occurs, the NetworkService " - "superclass will be removed, and ForwardingService will " - "subclass from CIM_Service directly. Also note that there are a " - "large number of additional protocols that are not currently " - "modeled. These will be added over time." )] -class CIM_ForwardingService : CIM_NetworkService { - - [Description ( - "This defines the type of protocol that is being forwarded." - ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", "19" }, - Values { "Unknown", "Other", "IPv4", "IPv6", "IPv4/IPv6", - "IPX", "AppleTalk", "DECnet", "SNA", "CONP", "CLNP", - "VINES", "XNS", "ATM", "Frame Relay", "Ethernet", - "TokenRing", "FDDI", "Infiniband", "Fibre Channel" }, - ModelCorrespondence { - "CIM_ForwardingService.OtherProtocolType" }] - uint16 ProtocolType; - - [Description ( - "This defines the type of protocol that is being " - "forwarded when the value of the ProtocolType attribute " - "is 1 (i.e., \"Other\"). This provides for future " - "extensibility." ), - MaxLen ( 32 ), - ModelCorrespondence { "CIM_ForwardingService.ProtocolType" }] - string OtherProtocolType; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_ForwardsAmong.mof b/build/vendor/dmtf_mof/Network/CIM_ForwardsAmong.mof deleted file mode 100644 index 403f420a..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_ForwardsAmong.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ForwardsAmong -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::RoutingForwarding" ), - Description ( - "This association represents the dependency that exists between " - "the ProtocolEndpoints that are used to forward data and the " - "ForwardingService that is performing the forwarding of data." )] -class CIM_ForwardsAmong : CIM_ServiceSAPDependency { - - [Override ( "Antecedent" ), - Description ( - "The ProtocolEndpoints that are used to forward the data." )] - CIM_ProtocolEndpoint REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The service that is forwarding the data." )] - CIM_ForwardingService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_Hdr8021Filter.mof b/build/vendor/dmtf_mof/Network/CIM_Hdr8021Filter.mof deleted file mode 100644 index 60cc712c..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_Hdr8021Filter.mof +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Hdr8021Filter -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Filtering" ), - Description ( - "8021Filter allows 802.1.source and destination MAC addresses, " - "as well as the 802.1 protocol ID, priority, and VLAN " - "identifier fields, to be expressed in a single object to " - "classify and identify traffic." )] -class CIM_Hdr8021Filter : CIM_FilterEntryBase { - - [Description ( - "This property is an OctetString of size 6, representing " - "a 48-bit source MAC address in canonical format. This " - "value is compared to the SourceAddress field in the MAC " - "header, subject to the mask represented in the " - "8021HdrSrcMACMask property. If a value for this property " - "is not provided, then the filter does not consider " - "8021HdrSrcMACAddr in selecting matching packets, i.e., " - "8021HdrSrcMACAddr matches for all values." ), - OctetString] - uint8 HdrSrcMACAddr8021[]; - - [Description ( - "This property is an OctetString of size 6, representing " - "a 48-bit mask to be used in comparing the SourceAddress " - "field in the MAC header with the value represented in " - "the 8021HdrSrcMACAddr property. If a value for this " - "property is not provided, then the filter does not " - "consider 8021HdrSrcMACMask in selecting matching " - "packets, i.e., the value of 8021HdrSrcMACAddr must match " - "the source MAC address in the packet exactly." ), - OctetString] - uint8 HdrSrcMACMask8021[]; - - [Description ( - "This property is an OctetString of size 6, representing " - "a 48-bit destination MAC address in canonical format. " - "This value is compared to the DestinationAddress field " - "in the MAC header, subject to the mask represented in " - "the 8021HdrDestMACMask property. If a value for this " - "property is not provided, then the filter does not " - "consider 8021HdrDestMACAddr in selecting matching " - "packets, i.e., 8021HdrDestMACAddr matches for all " - "values." ), - OctetString] - uint8 HdrDestMACAddr8021[]; - - [Description ( - "This property is an OctetString of size 6, representing " - "a 48-bit mask to be used in comparing the " - "DestinationAddress field in the MAC header with the " - "value represented in the 8021HdrDestMACAddr property. If " - "a value for this property is not provided, then the " - "filter does not consider 8021HdrDestMACMask in selecting " - "matching packets, i.e., the value of 8021HdrDestMACAddr " - "must match the destination MAC address in the packet " - "exactly." ), - OctetString] - uint8 HdrDestMACMask8021[]; - - [Description ( - "This property is a 16-bit unsigned integer, representing " - "an Ethernet protocol type. This value is compared to the " - "Ethernet Type field in the 802.3 MAC header. If a value " - "for this property is not provided, then the filter does " - "not consider 8021HdrProtocolID in selecting matching " - "packets, i.e., 8021HdrProtocolID matches for all values." )] - uint16 HdrProtocolID8021; - - [Description ( - "This property is an 8-bit unsigned integer, representing " - "an 802.1Q priority. This value is compared to the " - "Priority field in the 802.1Q header. Since the 802.1Q " - "Priority field consists of 3 bits, the values for this " - "property are limited to the range 0..7. If a value for " - "this property is not provided, then the filter does not " - "consider 8021HdrPriorityValue in selecting matching " - "packets, i.e., 8021HdrPriorityValue matches for all " - "values." ), - MinValue ( 0 ), - MaxValue ( 7 )] - uint8 HdrPriorityValue8021; - - [Description ( - "This property is an 32-bit unsigned integer, " - "representing an 802.1Q VLAN Identifier. This value is " - "compared to the VLAN ID field in the 802.1Q header. " - "Since the 802.1Q VLAN ID field consists of 12 bits, the " - "values for this property are limited to the range " - "0..4095. If a value for this property is not provided, " - "then the filter does not consider 8021HdrVLANID in " - "selecting matching packets, i.e., 8021HdrVLANID matches " - "for all values." ), - MinValue ( 0 ), - MaxValue ( 4095 )] - uint32 HdrVLANID8021; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_Hdr8021PService.mof b/build/vendor/dmtf_mof/Network/CIM_Hdr8021PService.mof deleted file mode 100644 index 553e263a..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_Hdr8021PService.mof +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Hdr8021PService -// ================================================================== - [Deprecated { "CIM_QoSService" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This class represents a specialization of the general concept " - "of forwarding network traffic by adding specific semantics " - "that define how traffic is forwarded based on the value of the " - "Priority field in the 802.1P header. \n" - "\n" - "This class is used to enable DiffServ domains and domains that " - "support 802.1P only to exchange traffic. It represents the " - "mapping between implementations that only support 802.1P " - "priority marking to be mapped to implementations that support " - "DiffServ, which use DSCPs. \n" - "\n" - "Hdr8021PService is deprecated since forwarding based on the " - "value of the Priority field in the 802.1P header is specified " - "using a FilterList, which is associated with a " - "ClassifierElement. If there is a need to distinguish a " - "higher-level set of coordinated QoS services, the QoSService " - "class can be instantiated directly." )] -class CIM_Hdr8021PService : CIM_QoSService { - - [Deprecated { "CIM_Hdr8021Filter.HdrPriorityValue8021" }, - Description ( - "This property is an 8-bit unsigned integer that defines " - "the notion of priority as specified in 802.1P " - "implementations." )] - uint8 PriorityValue; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_HeadTailDropQueueBinding.mof b/build/vendor/dmtf_mof/Network/CIM_HeadTailDropQueueBinding.mof deleted file mode 100644 index f0d81feb..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_HeadTailDropQueueBinding.mof +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HeadTailDropQueueBinding -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This association describes the relationship between a head or " - "tail dropper and the queue that it monitors to determine when " - "to drop traffic. The referenced queue\'s depth is compared " - "against the Dropper\'s threshold property. Although the " - "dropper drops from only one queue, the drop decision may be " - "influenced by the state of several queues. The rule for " - "combining the multiple inputs is simple addition: if the sum " - "of the lengths of the monitored queues exceeds the dropper\'s " - "QueueThreshold value, then packets are dropped. Note that this " - "rule for combining inputs may be overridden." )] -class CIM_HeadTailDropQueueBinding : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Description ( - "A QueuingService examined by the CalculationService." )] - CIM_QueuingService REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The CalculationService that provides an average queue depth." - )] - CIM_HeadTailDropper REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_HeadTailDropper.mof b/build/vendor/dmtf_mof/Network/CIM_HeadTailDropper.mof deleted file mode 100644 index 60a28c0a..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_HeadTailDropper.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HeadTailDropper -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "HeadTailDropper describes the threshold information of a head " - "or tail dropper. The inherited property DropFrom indicates " - "whether a particular instance of this class is a head dropper " - "or a tail dropper. \n" - "\n" - "A head dropper always examines the same queue from which it " - "drops packets, and this queue is always related to the dropper " - "as the following service in the NextService association." )] -class CIM_HeadTailDropper : CIM_DropperService { - - [Description ( - "This is an unsigned 32-bit integer that indicates the " - "queue depth (in bytes) at which traffic is dropped. For " - "a tail dropper, all newly arriving traffic is dropped. " - "For a head dropper, packets at the front of the queue " - "are dropped to make room for new packets, which are " - "added at the end." ), - Units ( "Bytes" )] - uint32 QueueThreshold; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_HostedAdminDistance.mof b/build/vendor/dmtf_mof/Network/CIM_HostedAdminDistance.mof deleted file mode 100644 index c5da7310..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_HostedAdminDistance.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HostedAdminDistance -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::Routes" ), - Description ( - "AdministrativeDistance, being a global object, is weak to the " - "AdminDomain that contains it. This association formalizes that " - "relationship." )] -class CIM_HostedAdminDistance : CIM_HostedDependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The AdminDomain that scopes the AdministrativeDistance." )] - CIM_AdminDomain REF Antecedent; - - [Override ( "Dependent" ), - Weak, Description ( - "The table of (global) administrative distances that are " - "defined in the context of the AdminDomain." )] - CIM_AdministrativeDistance REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_HostedBGPAttributes.mof b/build/vendor/dmtf_mof/Network/CIM_HostedBGPAttributes.mof deleted file mode 100644 index 8f6641df..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_HostedBGPAttributes.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HostedBGPAttributes -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "The class BGPAttributes is weak to the AutonomousSystem that " - "contains it. This association formalizes that relationship." )] -class CIM_HostedBGPAttributes : CIM_HostedDependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The AutonomousSystem that scopes the BGP attributes." )] - CIM_AutonomousSystem REF Antecedent; - - [Override ( "Dependent" ), - Weak, Description ( - "The BGP attributes defined in the context of the AutonomousSystem." - )] - CIM_BGPAttributes REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_HostedBGPPeerGroup.mof b/build/vendor/dmtf_mof/Network/CIM_HostedBGPPeerGroup.mof deleted file mode 100644 index 3b275d5c..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_HostedBGPPeerGroup.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HostedBGPPeerGroup -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "A BGPPeerGroup is weak to the AutonomousSystem that contains " - "it. This association formalizes that relationship." )] -class CIM_HostedBGPPeerGroup : CIM_HostedDependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The AutonomousSystem that scopes the BGP peer group." )] - CIM_AutonomousSystem REF Antecedent; - - [Override ( "Dependent" ), - Weak, Description ( - "The BGP peer group defined in the context of the AutonomousSystem." - )] - CIM_BGPPeerGroup REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_HostedBGPRouteMap.mof b/build/vendor/dmtf_mof/Network/CIM_HostedBGPRouteMap.mof deleted file mode 100644 index e078404b..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_HostedBGPRouteMap.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HostedBGPRouteMap -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "A BGPRouteMap is weak to the AutonomousSystem that contains " - "it. This association formalizes that relationship." )] -class CIM_HostedBGPRouteMap : CIM_HostedDependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The AutonomousSystem that scopes the BGPRouteMap." )] - CIM_AutonomousSystem REF Antecedent; - - [Override ( "Dependent" ), - Weak, Description ( - "The BGPRouteMap defined in the context of the AutonomousSystem." - )] - CIM_BGPRouteMap REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_HostedFilterEntryBase.mof b/build/vendor/dmtf_mof/Network/CIM_HostedFilterEntryBase.mof deleted file mode 100644 index 765809e0..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_HostedFilterEntryBase.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HostedFilterEntryBase -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Filtering" ), - Description ( - "All filter entries (FilterEntryBase and its subclasses) are " - "defined in the context of a ComputerSystem/network device, " - "where the filter entries are used and administered." )] -class CIM_HostedFilterEntryBase : CIM_HostedDependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The ComputerSystem/network device that scopes the FilterEntryBase." - )] - CIM_ComputerSystem REF Antecedent; - - [Override ( "Dependent" ), - Weak, Description ( "The FilterEntryBase on the System." )] - CIM_FilterEntryBase REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_HostedFilterList.mof b/build/vendor/dmtf_mof/Network/CIM_HostedFilterList.mof deleted file mode 100644 index f3a9b8b5..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_HostedFilterList.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HostedFilterList -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Filtering" ), - Description ( - "FilterLists are defined in the context of a ComputerSystem/ " - "network device, where the list is used and administered." )] -class CIM_HostedFilterList : CIM_HostedDependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The ComputerSystem/network device that scopes the FilterList." - )] - CIM_ComputerSystem REF Antecedent; - - [Override ( "Dependent" ), - Weak, Description ( "The FilterList on the System." )] - CIM_FilterList REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_HostedForwardingServices.mof b/build/vendor/dmtf_mof/Network/CIM_HostedForwardingServices.mof deleted file mode 100644 index 05e6aa13..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_HostedForwardingServices.mof +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HostedForwardingServices -// ================================================================== - [Association, Deprecated { "CIM_HostedService" }, - Version ( "2.7.1" ), - UMLPackagePath ( "CIM::Network::RoutingForwarding" ), - Description ( - "This is a specialization of CIM_HostedService, which is an " - "association between a Service and the System on which the " - "functionality resides. The class, HostedForwardingServices, is " - "deprecated since it provides no additional semantics over " - "HostedService, and unecessarily restricts the Service to a " - "single ComputerSystem, when the Service could reside in a " - "Network or other higher level System." )] -class CIM_HostedForwardingServices : CIM_HostedService { - - [Deprecated { "CIM_HostedService.Antecedent" }, - Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The hosting router." )] - CIM_ComputerSystem REF Antecedent; - - [Deprecated { "CIM_HostedService.Dependent" }, - Override ( "Dependent" ), - Description ( "The Service hosted on the System." )] - CIM_ForwardingService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_HostedNetworkPipe.mof b/build/vendor/dmtf_mof/Network/CIM_HostedNetworkPipe.mof deleted file mode 100644 index 3ca92993..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_HostedNetworkPipe.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HostedNetworkPipe -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Pipes" ), - Description ( - "HostedNetworkPipe is an association between a pipe and the " - "network in whose context the pipe is defined. The cardinality " - "of this association is 1-to-many. A network may host many " - "pipes, and pipes are scoped/contained by only one network." )] -class CIM_HostedNetworkPipe : CIM_HostedDependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The hosting network." )] - CIM_Network REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The pipe in the network." )] - CIM_NetworkPipe REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_HostedRoute.mof b/build/vendor/dmtf_mof/Network/CIM_HostedRoute.mof deleted file mode 100644 index da1f19cc..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_HostedRoute.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HostedRoute -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Routes" ), - Description ( - "HostedRoute describes the relationship between the route and " - "the system in whose context it is defined." )] -class CIM_HostedRoute : CIM_HostedDependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The network element that scopes/provides context for the route." - )] - CIM_System REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The next hop route defined on the System." )] - CIM_NextHopRoute REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_HostedRoutingPolicy.mof b/build/vendor/dmtf_mof/Network/CIM_HostedRoutingPolicy.mof deleted file mode 100644 index 5a2e9501..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_HostedRoutingPolicy.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HostedRoutingPolicy -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::RoutingForwarding" ), - Description ( - "A RoutingPolicy is weak to the network device (i.e., the " - "ComputerSystem) that contains it. This association formalizes " - "that relationship." )] -class CIM_HostedRoutingPolicy : CIM_HostedDependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The network device/computer system that scopes the RoutingPolicy." - )] - CIM_ComputerSystem REF Antecedent; - - [Override ( "Dependent" ), - Weak, Description ( - "The routing policy defined in the context of the network device." - )] - CIM_RoutingPolicy REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_HostedRoutingServices.mof b/build/vendor/dmtf_mof/Network/CIM_HostedRoutingServices.mof deleted file mode 100644 index dd7e2f67..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_HostedRoutingServices.mof +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HostedRoutingServices -// ================================================================== - [Association, Deprecated { "CIM_HostedService" }, - Version ( "2.7.1" ), - UMLPackagePath ( "CIM::Network::RoutingForwarding" ), - Description ( - "This is a specialization of CIM_HostedService, which is an " - "association between a Service and the System on which the " - "functionality resides. The class, HostedRoutingServices, is " - "deprecated since it provides no additional semantics over " - "HostedService, and unecessarily restricts the Service to a " - "single ComputerSystem, when the Service could reside in a " - "Network or other higher level System." )] -class CIM_HostedRoutingServices : CIM_HostedService { - - [Deprecated { "CIM_HostedService.Antecedent" }, - Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The hosting router." )] - CIM_ComputerSystem REF Antecedent; - - [Deprecated { "CIM_HostedService.Dependent" }, - Override ( "Dependent" ), - Description ( "The Service hosted on the System." )] - CIM_RouteCalculationService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_IEEE8021xCapabilities.mof b/build/vendor/dmtf_mof/Network/CIM_IEEE8021xCapabilities.mof deleted file mode 100644 index 7769b1cf..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_IEEE8021xCapabilities.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Network::IEEE8021x" ), - Description ( - "CIM_IEEE8021xCapabilities describes the IEEE 802.1x security " - "capabilities of a layer 2 ProtocolEndpoint." )] -class CIM_IEEE8021xCapabilities : CIM_Capabilities { - - [Description ( - "The IEEE 802.1x Extensible Authentication Protocol types " - "supported by the associated ProtocolEndpoint. See " - "AuthenticationProtocol description in " - "CIM_IEEE8021xSettings for more information." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", ".." }, - Values { "EAP-TLS", "EAP-TTLS/MSCHAPv2", - "PEAPv0/EAP-MSCHAPv2", "PEAPv1/EAP-GTC", - "EAP-FAST/MSCHAPv2", "EAP-FAST/GTC", "EAP-MD5", "EAP-PSK", - "EAP-SIM", "EAP-AKA", "EAP-FAST/TLS", "DMTF Reserved" }] - uint16 SupportedAuthenticationProtocols[]; - - [Description ( - "Indicates whether the associated ProtocolEndpoint " - "supports moving a session due to roaming." )] - boolean RoamingSupported; - - [Description ( - "Indicates whether the associated ProtocolEndpoint " - "supports fast reconnection of an IEEE 802.1x session " - "when it roams from one access point to another." )] - boolean FastRoamingSupported; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_IEEE8021xSettings.mof b/build/vendor/dmtf_mof/Network/CIM_IEEE8021xSettings.mof deleted file mode 100644 index d19585c1..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_IEEE8021xSettings.mof +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Network::IEEE8021x" ), - Description ( - "IEEE8021xSettings specifies a set of IEEE 802.1x Port-Based " - "Network Access Control settings that can be applied to a ISO " - "OSI layer 2 ProtocolEndpoint." )] -class CIM_IEEE8021xSettings : CIM_SettingData { - - [Description ( - "AuthenticationProtocol shall indicate the desired EAP " - "(Extensible Authentication Protocol) type.\n" - "\t* EAP-TLS (0): shall indicate that the desired EAP " - "type is the Transport Layer Security EAP type specified " - "in RFC 2716. If AuthenticationProtocol contains 0, " - "Username should not be null, ServerCertificateName and " - "ServerCertificateNameComparison may be null or not null, " - "and RoamingIdentity, Password, Domain, " - "ProtectedAccessCredential, PACPassword, and PSK should " - "be null.\n" - "\t* EAP-TTLS/MSCHAPv2 (1): shall indicate that the " - "desired EAP type is the Tunneled TLS Authentication " - "Protocol EAP type specified in " - "draft-ietf-pppext-eap-ttls, with Microsoft PPP CHAP " - "Extensions, Version 2 (MSCHAPv2) as the inner " - "authentication method. If AuthenticationProtocol " - "contains 1, Username and Password should not be null, " - "RoamingIdentity, ServerCertificateName, " - "ServerCertificateNameComparison, and Domain may be null " - "or not null, and ProtectedAccessCredential, PACPassword, " - "and PSK should be null.\n" - "\t* PEAPv0/EAP-MSCHAPv2 (2): shall indicate that the " - "desired EAP type is the Protected Extensible " - "Authentication Protocol (PEAP) Version 0 EAP type " - "specified in draft-kamath-pppext-peapv0, with Microsoft " - "PPP CHAP Extensions, Version 2 (MSCHAPv2) as the inner " - "authentication method. If AuthenticationProtocol " - "contains2, Username and Password should not be null, " - "RoamingIdentity, ServerCertificateName, " - "ServerCertificateNameComparison, and Domain may be null " - "or not null, and ProtectedAccessCredential, PACPassword, " - "and PSK should be null.\n" - "\t* PEAPv1/EAP-GTC (3): shall indicate that the desired " - "EAP type is the Protected Extensible Authentication " - "Protocol (PEAP) Version 1 EAP type specified in " - "draft-josefsson-pppext-eap-tls-eap, with Generic Token " - "Card (GTC) as the inner authentication method. If " - "AuthenticationProtocol contains 3, Username and Password " - "should not be null, RoamingIdentity, " - "ServerCertificateName, ServerCertificateNameComparison, " - "and Domain may be null or not null, and " - "ProtectedAccessCredential, PACPassword, and PSK should " - "be null.\n" - "\t* EAP-FAST/MSCHAPv2 (4): shall indicate that the " - "desired EAP type is the Flexible Authentication " - "Extensible Authentication Protocol EAP type specified in " - "IETF RFC 4851, with Microsoft PPP CHAP Extensions, " - "Version 2 (MSCHAPv2) as the inner authentication method. " - "If AuthenticationProtocol contains 4, Username and " - "Password should not be null, RoamingIdentity, " - "ServerCertificateName, ServerCertificateNameComparison, " - "Domain, ProtectedAccessCredential, and PACPassword may " - "be null or not null, and PSK should be null.\n" - "\t* EAP-FAST/GTC (5): shall indicate that the desired " - "EAP type is the Flexible Authentication Extensible " - "Authentication Protocol EAP type specified in IETF RFC " - "4851, with Generic Token Card (GTC) as the inner " - "authentication method. If AuthenticationProtocol " - "contains 5, Username and Password should not be null, " - "RoamingIdentity, ServerCertificateName, " - "ServerCertificateNameComparison, Domain, " - "ProtectedAccessCredential, and PACPassword may be null " - "or not null, and PSK should be null.\n" - "\t* EAP-MD5 (6): shall indicate that the desired EAP " - "type is the EAP MD5 authentication method, specified in " - "RFC 3748. If AuthenticationProtocol contains 6, Username " - "and Password should not be null, Domain may be null or " - "not null, and RoamingIdentity, ServerCertificateName, " - "ServerCertificateNameComparison, " - "ProtectedAccessCredential, PACPassword, and PSK should " - "be null.\n" - "\t* EAP-PSK (7): shall indicate that the desired EAP " - "type is the EAP-PSK (Pre-Shared Key) EAP type specified " - "in RFC 4764. If AuthenticationProtocol contains 7, " - "Username and PSK should not be null, Domain and " - "RoamingIdentity may be null or not null, and Password, " - "ServerCertificateName, ServerCertificateNameComparison, " - "ProtectedAccessCredential, and PACPassword should be null.\n" - "\t* EAP-SIM (8): shall indicate that the desired EAP " - "type is the Extensible Authentication Protocol Method " - "for Global System for Mobile Communications (GSM) " - "Subscriber Identity Modules (EAP-SIM), specified in RFC " - "4186. If AuthenticationProtocol contains 8, Username and " - "PSK should not be null, Domain and RoamingIdentity may " - "be null or not null, and Password, " - "ServerCertificateName, ServerCertificateNameComparison, " - "ProtectedAccessCredential, and PACPassword should be null.\n" - "\t* EAP-AKA (9): shall indicate that the desired EAP " - "type is the EAP Method for 3rd Generation Authentication " - "and Key Agreement (EAP-AKA), specified in RFC 4187. If " - "AuthenticationProtocol contains 9, Username and PSK " - "should not be null, Domain and RoamingIdentity may be " - "null or not null, and Password, ServerCertificateName, " - "ServerCertificateNameComparison, " - "ProtectedAccessCredential, and PACPassword should be null.\n" - "\t* EAP-FAST/TLS (10): shall indicate that the desired " - "EAP type is the Flexible Authentication EAP type " - "specified in IETF RFC 4851, with TLS as the inner " - "authentication method. If AuthenticationProtocol " - "contains 10, Username and Password should not be null, " - "RoamingIdentity, ServerCertificateName, " - "ServerCertificateNameComparison, Domain, " - "ProtectedAccessCredential, and PACPassword may be null " - "or not null, and PSK should be null." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", ".." }, - Values { "EAP-TLS", "EAP-TTLS/MSCHAPv2", - "PEAPv0/EAP-MSCHAPv2", "PEAPv1/EAP-GTC", - "EAP-FAST/MSCHAPv2", "EAP-FAST/GTC", "EAP-MD5", "EAP-PSK", - "EAP-SIM", "EAP-AKA", "EAP-FAST/TLS", "DMTF Reserved" }, - MappingStrings { "RFC4017.IETF", "RFC2716.IETF", - "draft-ietf-pppext-eap-ttls.IETF", - "draft-kamath-pppext-peapv0.IETF", - "draft-josefsson-pppext-eap-tls-eap", "RFC4851.IETF", - "RFC3748.IETF", "RFC4764.IETF", "RFC4186.IETF", - "RFC4187.IETF" }] - uint16 AuthenticationProtocol; - - [Description ( - "A string presented to the authentication server in " - "802.1x protocol exchange. The AAA server determines the " - "format of this string. Formats supported by AAA servers " - "include: \\, @." )] - string RoamingIdentity; - - [Description ( - "The name that shall be compared against the subject name " - "field in the certificate provided by the AAA server. " - "Shall contain either the fully qualified domain name of " - "the AAA server, in which case " - "ServerCertificateNameComparison shall contain " - "\"FullName\", or the domain suffix of the AAA server, in " - "which case ServerCertificateNameComparison shall contain " - "\"DomainSuffix\"." ), - ModelCorrespondence { - "CIM_IEEE8021xSettings.ServerCertificateNameComparison" }] - string ServerCertificateName; - - [Description ( - "The comparison algorithm that shall be used by the " - "server to validate the subject name field of the " - "certificate presented by the AAA server against the " - "value of the ServerCertificateName property." ), - ValueMap { "1", "2", "3", ".." }, - Values { "Other", "FullName", "DomainSuffix", "DMTF Reserved" }, - ModelCorrespondence { - "CIM_IEEE8021xSettings.ServerCertificateName" }] - uint16 ServerCertificateNameComparison; - - [Description ( - "Identifies the user requesting access to the network." ), - MappingStrings { "RFC2716.IETF", - "draft-ietf-pppext-eap-ttls.IETF", - "draft-kamath-pppext-peapv0.IETF", - "draft-josefsson-pppext-eap-tls-eap", "RFC4851.IETF", - "RFC3748.IETF", "RFC4764.IETF", "RFC4186.IETF", - "RFC4187.IETF" }] - string Username; - - [Description ( - "A password associated with the user identified by " - "Username within Domain." ), - MappingStrings { "draft-ietf-pppext-eap-ttls.IETF", - "draft-kamath-pppext-peapv0.IETF", - "draft-josefsson-pppext-eap-tls-eap", "RFC4851.IETF", - "RFC3748.IETF" }] - string Password; - - [Description ( - "The domain (also known as realm) within which Username is unique." - ), - MappingStrings { "draft-ietf-pppext-eap-ttls.IETF", - "draft-kamath-pppext-peapv0.IETF", - "draft-josefsson-pppext-eap-tls-eap", "RFC4851.IETF", - "RFC3748.IETF", "RFC4764.IETF", "RFC4186.IETF", - "RFC4187.IETF" }] - string Domain; - - [Description ( - "A credential used by the supplicant and AAA server to " - "establish a mutually authenticated encrypted tunnel for " - "confidential user authentication." ), - OctetString, MappingStrings { "RFC4851.IETF" }] - uint8 ProtectedAccessCredential[]; - - [Description ( - "Optional password to extract the PAC (Protected Access " - "Credential) information from the PAC data." ), - MappingStrings { "RFC4851.IETF" }] - string PACPassword; - - [Description ( - "A pre-shared key used for pre-shared key EAP types such " - "as EAP-PSK, EAP-SIM, and EAP-AKA." ), - OctetString, MappingStrings { "RFC4764.IETF", "RFC4186.IETF", - "RFC4187.IETF" }] - uint8 PSK[]; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_IKESAEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_IKESAEndpoint.mof deleted file mode 100644 index 24af5e76..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_IKESAEndpoint.mof +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_IKESAEndpoint -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::IPsec" ), - Description ( - "IKESAEndpoint is created in the first phase of SA negotiation " - "and protects the key negotiation traffic. This endpoint is " - "only created when IKE is the key exchange protocol. Other " - "protocols and their endpoints will be defined in a future " - "release." )] -class CIM_IKESAEndpoint : CIM_SecurityAssociationEndpoint { - - [Description ( - "Identifier of the IKE phase 1 negotiation initiator. " - "Combined with the ResponderCookie, this value, in string " - "form, may be used to construct the value of the key " - "field \'Name\', inherited from ServiceAccessPoint." )] - uint64 InitiatorCookie; - - [Description ( - "Identifier of the IKE phase 1 negotiation responder. " - "Combined with the InitiatorCookie, this value, in string " - "form, may be used to construct the value of the key " - "field \'Name\', inherited from ServiceAccessPoint." )] - uint64 ResponderCookie; - - [Description ( - "CipherAlgorithm is an enumeration that specifies the " - "encryption algorithm used by the IKESAEndpoint. The list " - "of algorithms was generated from Appendix A of RFC2409. " - "Note that the enumeration is different than the RFC " - "list, since the values of Unknown and Other are taken " - "into account." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", - "8..65000", "65001..65535" }, - Values { "Unknown", "Other", "DES", "IDEA", "Blowfish", - "RC5", "3DES", "CAST", "DMTF/IANA Reserved", - "Vendor Reserved" }, - MappingStrings { "RFC2409.IETF|Appendix A" }, - ModelCorrespondence { "CIM_IKESAEndpoint.OtherCipherAlgorithm" }] - uint16 CipherAlgorithm; - - [Description ( - "Description of the encryption algorithm when the value 1 " - "(\"Other\") is specified for the property, " - "CipherAlgorithm." ), - ModelCorrespondence { "CIM_IKESAEndpoint.CipherAlgorithm" }] - string OtherCipherAlgorithm; - - [Description ( - "HashAlgorithm is an enumeration that specifies the hash " - "function used by the IKESAEndpoint. The list of " - "algorithms was generated from Appendix A of RFC2409. " - "Note that the enumeration is different than the RFC " - "list, since the values of Unknown and Other are taken " - "into account." ), - ValueMap { "0", "1", "2", "3", "4", "5..65000", "65001..65535" }, - Values { "Unknown", "Other", "MD5", "SHA-1", "Tiger", - "DMTF/IANA Reserved", "Vendor Reserved" }, - MappingStrings { "RFC2409.IETF|Appendix A" }, - ModelCorrespondence { "CIM_IKESAEndpoint.OtherHashAlgorithm" }] - uint16 HashAlgorithm; - - [Description ( - "Description of the hash function when the value 1 " - "(\"Other\") is specified for the property, " - "HashAlgorithm." ), - ModelCorrespondence { "CIM_IKESAEndpoint.HashAlgorithm" }] - string OtherHashAlgorithm; - - [Description ( - "AuthenticationMethod is an enumeration that specifies " - "the operation of the IKESAEndpoint. The list of methods " - "was generated from Appendix A of RFC2409. Note that the " - "enumeration is different than the RFC list, since the " - "values of Unknown and Other are taken into account." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7..65000", - "65001..65535" }, - Values { "Unknown", "Other", "Pre-shared Key", - "DSS Signatures", "RSA Signatures", "Encryption with RSA", - "Revised Encryption with RSA", "DMTF/IANA Reserved", - "Vendor Reserved" }, - MappingStrings { "RFC2409.IETF|Appendix A" }, - ModelCorrespondence { - "CIM_IKESAEndpoint.OtherAuthenticationMethod" }] - uint16 AuthenticationMethod; - - [Description ( - "Description of the method when the value 1 (\"Other\") " - "is specified for the property, AuthenticationMethod." ), - ModelCorrespondence { "CIM_IKESAEndpoint.AuthenticationMethod" }] - string OtherAuthenticationMethod; - - [Description ( - "GroupId specifies the key exchange group ID. If the " - "GroupID number is from the vendor-specific range " - "(32768-65535), the VendorID qualifies the group number. " - "Well-known group identifiers from RFC2412, Appendix E, " - "are: Group 1=\'768 bit prime\', Group 2=\'1024 bit " - "prime\', Group 3= \'Elliptic Curve Group with 155 bit " - "field element\', Group 4= \'Large Elliptic Curve Group " - "with 185 bit field element\', and Group 5=\'1536 bit " - "prime\'." ), - ValueMap { "0", "1", "2", "3", "4", "5", "..", "0x8000.." }, - Values { "No Group/Non-Diffie-Hellman Exchange", - "DH-768 bit prime", "DH-1024 bit prime", - "EC2N-155 bit field element", - "EC2N-185 bit field element", "DH-1536 bit prime", - "Standard Group - Reserved", "Vendor Reserved" }, - MappingStrings { "RFC2412.IETF|Appendix E" }, - ModelCorrespondence { "CIM_IKESAEndpoint.VendorID" }] - uint16 GroupId; - - [Description ( - "VendorID identifies the vendor when the value of GroupID " - "is in the vendor-specific range, 32768 to 65535." ), - ModelCorrespondence { "CIM_IKESAEndpoint.GroupId" }] - string VendorID; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_IPAddressRange.mof b/build/vendor/dmtf_mof/Network/CIM_IPAddressRange.mof deleted file mode 100644 index e1a612f7..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_IPAddressRange.mof +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_IPAddressRange -// ================================================================== - [Deprecated { "CIM_RangeOfIPAddresses" }, - Abstract, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Collections" ), - Description ( - "IPAddressRange represents a grouping of specific addresses, " - "and provides additional semantics for this group if " - "appropriate. The class is deprecated in lieu of the concrete " - "class RangeOfIPAddresses since there is sufficient information " - "for the class to be instantiated. In addition, an address " - "range should be defined in the context of a System (for " - "example, a network element or an admin domain). These " - "semantics are incorporated in the RangeOfIPAddresses class." )] -class CIM_IPAddressRange : CIM_CollectionOfMSEs { - - [Deprecated { "CIM_RangeOfIPAddresses.StartAddress" }, - Description ( - "The starting IP address of the AddressRange, formatted " - "according to the appropriate convention as defined in " - "the AddressType property of this class (e.g., " - "171.79.6.40)." )] - string StartAddress; - - [Deprecated { "CIM_RangeOfIPAddresses.EndAddress" }, - Description ( - "The ending IP address of the AddressRange, formatted " - "according to the appropriate convention as defined in " - "the AddressType property of this class (e.g., " - "171.79.6.40)." )] - string EndAddress; - - [Deprecated { "CIM_RangeOfIPAddresses.AddressType" }, - Description ( - "An enumeration that defines how to format the address " - "and mask of the address range that defines this " - "IPSubnet. \n" - "\n" - "Whenever possible, IPv4-compatible addresses should be " - "used instead of IPv6 addresses (see RFC 2373, section " - "2.5.4). In order to have a consistent format for IPv4 " - "addresses in a mixed IPv4/v6 environment, all IPv4 " - "addresses and both IPv4-compatible IPv6 addresses and " - "IPv4-mapped IPv6 addresses, per RFC 2373, section 2.5.4, " - "should be formatted in standard IPv4 format." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "IPv4", "IPv6" }] - uint16 TypeOfAddress; - - [Deprecated { "No value" }, - Description ( - "This attribute defines the region that addresses can be " - "allocated to." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Unknown", - "Multiregional: 192.0.0.0 to 193.255.255.255", - "Europe: 194.0.0.0 to 195.255.255.255", - "Others: 196.0.0.0 to 197.255.255.255", - "North America: 198.0.0.0 to 199.255.255.255", - "Central & South America: 200.0.0.0 to 201.255.255.255", - "Pacific Rim: 202.0.0.0 to 203.255.255.255", - "Others: 204.0.0.0 to 205.255.255.255", - "Others: 206.0.0.0 to 207.255.255.255" }] - uint16 AllocationRegion; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_IPAssignmentSettingData.mof b/build/vendor/dmtf_mof/Network/CIM_IPAssignmentSettingData.mof deleted file mode 100644 index 9ecad95b..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_IPAssignmentSettingData.mof +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2010 DMTF. All rights reserved. - [Version ( "2.26.0" ), - UMLPackagePath ( "CIM::Network::IP" ), - Description ( - "This SettingData instance is the aggregation point identifying " - "an IP configuration. Multiple IP configurations could exist " - "for a target. Each configuration is represented with an " - "instance of IPAssignmentSettingData. The details of the IP " - "configuration are defined by instances of sub-classes of this " - "class (i.e. StaticIPAssignmentSettingData, DHCPSettingData, " - "DNSSettingData). These instances are associated with the " - "IPAssignmentSettingData instance using the OrderedComponent or " - "ConcreteComponent associations. For example, a static IP " - "configuration would be represented by an instance of " - "IPAssignmentSettingData and an instance of " - "StaticIPAssignmentSettingData associated via an instance of " - "ConcreteComponent. A static IP configuration including DNS " - "would be modeled using an instance of IPAssignmentSettingData, " - "DNSSettingData, and StaticIPAssignmentSettingData. The " - "DNSSettingData and StaticIPAssignmentSettingData instance " - "would be associated with the IPAssignmentSettingData using " - "instances of ConcreteComponent." )] -class CIM_IPAssignmentSettingData : CIM_SettingData { - - [Description ( - "AddressOrigin identifies the method by which the IP " - "Address, Subnet Mask, and Gateway were assigned to the " - "IPProtocolEndpoint. A value of 2 indicates that the " - "application of the IPAssignmentSettingData instance does " - "not affect these properties: \n" - "A value of 3 indicates that values for the properties " - "are contained in the IPAssignmentSettingData instance. \n" - "A value of 4 indicates that the values will be assigned " - "via DHCP.\n" - "A value of 5 indicates that the values will be assigned " - "via BOOTP." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6..32767", "32768.." }, - Values { "Unknown", "Other", "Not Applicable", "Static", - "DHCP", "BOOTP", "DMTF Reserved", "Vendor Reserved" }] - uint16 AddressOrigin = 0; - - [Description ( "An enumeration that describes the IP version." ), - ValueMap { "0", "..", "4096", "4097", "32768.." }, - Values { "Unknown", "DMTF Reserved", "IPv4", "IPv6", - "Vendor Reserved" }, - ModelCorrespondence { "CIM_ProtocolEndpoint.ProtocolIFType" }] - uint16 ProtocolIFType; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_IPCOMPTransform.mof b/build/vendor/dmtf_mof/Network/CIM_IPCOMPTransform.mof deleted file mode 100644 index dde47210..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_IPCOMPTransform.mof +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_IPCOMPTransform -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::IPsec" ), - Description ( - "The IPCOMPTransform specifies the IP compression algorithm to " - "use for payload of the Security Association." ), - MappingStrings { "IPSP Model.IETF|IPCOMPTransform" }] -class CIM_IPCOMPTransform : CIM_SATransform { - - [Description ( - "The Algorithm is an enumeration that designates the " - "IPCOMP compression algorithm to use. Its values are " - "generated from RFC2407, Section 4.4.5. Note that the " - "values are modified from the RFC, since \'Other\' must " - "be taken into account." ), - ValueMap { "1", "2", "3", "4" }, - Values { "Other", "Vendor Algorithm/OUI", "DEFLATE", "LZS" }, - MappingStrings { "IPSP Model.IETF|IPCOMPTransform.Algorithm", - "RFC2407.IETF|Section 4.4.5" }, - ModelCorrespondence { "CIM_IPCOMPTransform.PrivateAlgorithm", - "CIM_IPCOMPTransform.OtherAlgorithm" }] - uint16 Algorithm; - - [Description ( - "Description of the compression algorithm when the value " - "1 (\"Other\") is specified for the property, Algorithm." ), - ModelCorrespondence { "CIM_IPCOMPTransform.Algorithm" }] - string OtherAlgorithm; - - [Description ( - "A private compression algorithm, used when the Algorithm " - "property is set to 2, \"Vendor Algorithm/OUI\"." ), - MappingStrings { - "IPSP Model.IETF|IPCOMPTransform.PrivateAlgorithm" }, - ModelCorrespondence { "CIM_IPCOMPTransform.Algorithm" }] - uint32 PrivateAlgorithm; - - [Description ( - "DictionarySize is an optional field that specifies the " - "log2 maximum size of the dictionary for the compression " - "algorithm. For dictionaries that have a fixed size, this " - "value is ignored." ), - MappingStrings { - "IPSP Model.IETF|IPCOMPTransform.DictionarySize" }] - uint16 DictionarySize; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_IPConfigurationService.mof b/build/vendor/dmtf_mof/Network/CIM_IPConfigurationService.mof deleted file mode 100644 index cd7e2778..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_IPConfigurationService.mof +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Network::IP" ), - Description ( - "CIM_IPConfigurationService provides management of the IP " - "configuration associated with a LANEndpoint or " - "IPProtocolEndpoint." )] -class CIM_IPConfigurationService : CIM_Service { - - - [Description ( - "Apply the configuration represented by the " - "CIM_IPAssignmentSettingData to the specified " - "IPProtocolEndpoint. This will result in the value of the " - "IsCurrent property of the CIM_ElementSettingData which " - "associates the specified CIM_IPAssignmentSettingData and " - "specified CIM_IPProtocolEndpoint having a value of " - "\"true\". The IsCurrent property of any other instances " - "of CIM_ElementSettingData which reference the specified " - "CIM_IPProtocolEndpoint and an instance of " - "CIM_IPAssignmentSettingData will have a value of " - "\"false\". Each instance of CIM_IPAssignmentSettingData " - "which is aggregated into the target " - "CIM_IPAssignmentSettingData instance will be applied to " - "the CIM_ProtocolEndpoint to which it is associated via " - "an instance of CIM_ElementSettingData where the " - "CIM_ProtocolEndpoint is associated with the target " - "CIM_IPProtocolEndpoint via an instance of " - "CIM_EndpointIdentity." ), - ValueMap { "0", "1", "2", "3", "4", "5", "4096", "..", - "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", "Failed", - "Invalid Parameter", "Busy", - "Method Parameters Checked - Job Started", - "DMTF Reserved", "Vendor Reserved" }] - uint32 ApplySettingToIPProtocolEndpoint( - [Required, IN, Description ( - "The IPAssignmentSettingData to apply." )] - CIM_IPAssignmentSettingData REF Configuration, - [Required, IN, Description ( - "The IPProtocolEndpoint to which the configuration " - "will be applied." )] - CIM_IPProtocolEndpoint REF Endpoint, - [IN ( false ), OUT, Description ( - "Reference to the job spawned if the operation " - "continues after the method returns. This parameter " - "MUST NOT be null if a value of 4096 is returned. " - "This parameter MUST be null if any other value is " - "returned by the method." )] - CIM_ConcreteJob REF Job); - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_IPConnectivitySubnet.mof b/build/vendor/dmtf_mof/Network/CIM_IPConnectivitySubnet.mof deleted file mode 100644 index cddc13e4..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_IPConnectivitySubnet.mof +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_IPConnectivitySubnet -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Collections" ), - Description ( - "An IPConnectivitySubnet represents a group of related " - "IPProtocolEndpoints that can communicate with each other, as " - "members of a subnet. The class describes the characteristics " - "of the subnet." )] -class CIM_IPConnectivitySubnet : CIM_ConnectivityCollection { - - [Description ( - "The IP address of the entire subnet, formatted according " - "to the appropriate convention as defined in the " - "AddressType property of this class." ), - ModelCorrespondence { "CIM_IPConnectivitySubnet.AddressType" }] - string SubnetNumber; - - [Description ( - "The mask for the starting IPv4 address of the IP subnet, " - "if needed (i.e., if the AddressType property is 1, " - "\"IPv4\")." )] - string SubnetMask; - - [Description ( - "The prefix length for IPv6 addresses in the IP subnet, " - "if needed (i.e., if the AddressType property is 2, " - "\"IPv6\")." )] - uint8 PrefixLength; - - [Description ( - "An enumeration that describes the format of the address " - "properties in IPConnectivitySubnet." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "IPv4", "IPv6" }] - uint16 AddressType; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_IPHeadersFilter.mof b/build/vendor/dmtf_mof/Network/CIM_IPHeadersFilter.mof deleted file mode 100644 index c85abc1e..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_IPHeadersFilter.mof +++ /dev/null @@ -1,283 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_IPHeadersFilter -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::Filtering" ), - Description ( - "IPHeadersFilter contains the most commonly required properties " - "for performing filtering on IP, TCP or UDP headers. Properties " - "not present in an instance of the IPHeadersFilter are treated " - "as \'all values\'." )] -class CIM_IPHeadersFilter : CIM_FilterEntryBase { - - [Description ( - "HdrIPVersion identifies the version of the IP addresses " - "for IP header filters. It is also used to determine the " - "sizes of the OctetStrings in the six properties " - "HdrSrcAddress, HdrSrcAddressEndOfRange, HdrSrcMask, " - "HdrDestAddress, HdrDestAddressEndOfRange and " - "HdrDestMask, as follows: \n" - "ipv4(4): OctetString(SIZE (4)) \n" - "ipv6(6): OctetString(SIZE (16|20)), \n" - "depending on whether a scope identifier is present. \n" - "\n" - "If a value for this property is not provided, then the " - "filter does not consider IP version in selecting " - "matching packets, i.e., IP version matches for all " - "values. In this case, the HdrSrcAddress, " - "HdrSrcAddressEndOfRange, HdrSrcMask, HdrDestAddress, " - "HdrDestAddressEndOfRange and HdrDestMask must also be " - "not present." ), - ValueMap { "4", "6" }, - Values { "IPv4", "IPv6" }, - ModelCorrespondence { "CIM_IPHeadersFilter.HdrSrcAddress", - "CIM_IPHeadersFilter.HdrSrcAddressEndOfRange", - "CIM_IPHeadersFilter.HdrSrcMask", - "CIM_IPHeadersFilter.HdrDestAddress", - "CIM_IPHeadersFilter.HdrDestAddressEndOfRange", - "CIM_IPHeadersFilter.HdrDestMask" }] - uint8 HdrIPVersion; - - [Description ( - "HdrSrcAddress is an OctetString, of a size determined by " - "the value of the HdrIPVersion property, representing a " - "source IP address. When there is no " - "HdrSrcAddressEndOfRange value, this value is compared to " - "the source address in the IP header, subject to the mask " - "represented in the HdrSrcMask property. (Note that the " - "mask is ANDed with the address.) When there is a " - "HdrSrcAddressEndOfRange value, this value is the start " - "of the specified range (i.e., the HdrSrcAddress is lower " - "than the HdrSrcAddressEndOfRange) that is compared to " - "the source address in the IP header and matches on any " - "value in the range. \n" - "\n" - "If a value for this property is not provided, then the " - "filter does not consider HdrSrcAddress in selecting " - "matching packets, i.e., HdrSrcAddress matches for all " - "values." ), - OctetString, ModelCorrespondence { - "CIM_IPHeadersFilter.HdrIPVersion" }] - uint8 HdrSrcAddress[]; - - [Description ( - "HdrSrcAddressEndOfRange is an OctetString, of a size " - "determined by the value of the HdrIPVersion property, " - "representing the end of a range of source IP addresses " - "(inclusive), where the start of the range is the " - "HdrSrcAddress property value. \n" - "\n" - "If a value for HdrSrcAddress is not provided, then this " - "property also MUST NOT be provided. If a value for this " - "property is provided, then HdrSrcMask MUST NOT be " - "provided." ), - OctetString, ModelCorrespondence { - "CIM_IPHeadersFilter.HdrIPVersion" }] - uint8 HdrSrcAddressEndOfRange[]; - - [Description ( - "HdrSrcMask is an OctetString, of a size determined by " - "the value of the HdrIPVersion property, representing a " - "mask to be used in comparing the source address in the " - "IP header with the value represented in the " - "HdrSrcAddress property. \n" - "\n" - "If a value for this property is not provided, then the " - "filter does not consider HdrSrcMask in selecting " - "matching packets, i.e., the value of the HdrSrcAddress " - "or the source address range must match the source " - "address in the packet exactly. If a value for this " - "property is provided, then HdrSrcAddressEndOfRange MUST " - "NOT be provided." ), - OctetString, ModelCorrespondence { - "CIM_IPHeadersFilter.HdrIPVersion" }] - uint8 HdrSrcMask[]; - - [Description ( - "HdrDestAddress is an OctetString, of a size determined " - "by the value of the HdrIPVersion property, representing " - "a destination IP address. When there is no " - "HdrDestAddressEndOfRange value, this value is compared " - "to the destination address in the IP header, subject to " - "the mask represented in the HdrDestMask property. (Note " - "that the mask is ANDed with the address.) When there is " - "a HdrDestAddressEndOfRange value, this value is the " - "start of the specified range (i.e., the HdrDestAddress " - "is lower than the HdrDestAddressEndOfRange) that is " - "compared to the source address in the IP header and " - "matches on any value in the range. \n" - "\n" - "If a value for this property is not provided, then the " - "filter does not consider HdrDestAddress in selecting " - "matching packets, i.e., HdrDestAddress matches for all " - "values." ), - OctetString, ModelCorrespondence { - "CIM_IPHeadersFilter.HdrIPVersion" }] - uint8 HdrDestAddress[]; - - [Description ( - "HdrDestAddressEndOfRange is an OctetString, of a size " - "determined by the value of the HdrIPVersion property, " - "representing the end of a range of destination IP " - "addresses (inclusive), where the start of the range is " - "the HdrDestAddress property value. \n" - "\n" - "If a value for HdrDestAddress is not provided, then this " - "property also MUST NOT be provided. If a value for this " - "property is provided, then HdrDestMask MUST NOT be " - "provided." ), - OctetString, ModelCorrespondence { - "CIM_IPHeadersFilter.HdrIPVersion" }] - uint8 HdrDestAddressEndOfRange[]; - - [Description ( - "HdrDestMask is an OctetString, of a size determined by " - "the value of the HdrIPVersion property, representing a " - "mask to be used in comparing the destination address in " - "the IP header with the value represented in the " - "HdrDestAddress property. \n" - "\n" - "If a value for this property is not provided, then the " - "filter does not consider HdrDestMask in selecting " - "matching packets, i.e., the value of the HdrDestAddress " - "or the destination address range must match the " - "destination address in the packet exactly. If a value " - "for this property is provided, then " - "HdrDestAddressEndOfRange MUST NOT be provided." ), - OctetString, ModelCorrespondence { - "CIM_IPHeadersFilter.HdrIPVersion" }] - uint8 HdrDestMask[]; - - [Description ( - "HdrProtocolID is an 8-bit unsigned integer, representing " - "an IP protocol type. This value is compared to the " - "Protocol field in the IP header. \n" - "\n" - "If a value for this property is not provided, then the " - "filter does not consider HdrProtocolID in selecting " - "matching packets, i.e., HdrProtocolID matches for all " - "values." )] - uint8 HdrProtocolID; - - [Description ( - "HdrSrcPortStart represents the lower end of a range of " - "UDP or TCP source ports. The upper end of the range is " - "represented by the HdrSrcPortEnd property. The value of " - "HdrSrcPortStart MUST be no greater than the value of " - "HdrSrcPortEnd. \n" - "\n" - "A source port filter is evaluated by testing whether the " - "source port identified in the IP header falls within the " - "range of values between HdrSrcPortStart and " - "HdrSrcPortEnd, INCLUDING these two end points. \n" - "\n" - "If a value for this property is not provided, then the " - "filter does not consider HdrSrcPortStart in selecting " - "matching packets, i.e., there is no lower bound in " - "matching source port values." )] - uint16 HdrSrcPortStart; - - [Description ( - "HdrSrcPortEnd represents the upper end of a range of UDP " - "or TCP source ports. The lower end of the range is " - "represented by the HdrSrcPortStart property. The value " - "of HdrSrcPortEnd MUST be no less than the value of " - "HdrSrcPortStart. A single port is indicated by equal " - "values for HdrSrcPortStart and HdrSrcPortEnd. \n" - "\n" - "A source port filter is evaluated by testing whether the " - "source port identified in the IP header falls within the " - "range of values between HdrSrcPortStart and " - "HdrSrcPortEnd, INCLUDING these two end points. \n" - "\n" - "If a value for this property is not provided, then the " - "filter does not consider HdrSrcPortEnd in selecting " - "matching packets, i.e., there is no upper bound in " - "matching source port values." )] - uint16 HdrSrcPortEnd; - - [Description ( - "HdrDestPortStart represents the lower end of a range of " - "UDP or TCP destination ports. The upper end of the range " - "is represented by the HdrDestPortEnd property. The value " - "of HdrDestPortStart MUST be no greater than the value of " - "HdrDestPortEnd. A single port is indicated by equal " - "values for HdrDestPortStart and HdrDestPortEnd. \n" - "\n" - "A destination port filter is evaluated by testing " - "whether the destination port identified in the IP header " - "falls within the range of values between " - "HdrDestPortStart and HdrDestPortEnd, INCLUDING these two " - "end points. \n" - "\n" - "If a value for this property is not provided, then the " - "filter does not consider HdrDestPortStart in selecting " - "matching packets, i.e., there is no lower bound in " - "matching destination port values." )] - uint16 HdrDestPortStart; - - [Description ( - "HdrDestPortEnd represents the upper end of a range of " - "UDP or TCP destination ports. The lower end of the range " - "is represented by the HdrDestPortStart property. The " - "value of HdrDestPortEnd MUST be no less than the value " - "of HdrDestPortStart. A single port is indicated by equal " - "values for HdrDestPortStart and HdrDestPortEnd. \n" - "\n" - "A destination port filter is evaluated by testing " - "whether the destination port identified in the IP header " - "falls within the range of values between " - "HdrDestPortStart and HdrDestPortEnd, INCLUDING these two " - "end points. \n" - "\n" - "If a value for this property is not provided, then the " - "filter does not consider HdrDestPortEnd in selecting " - "matching packets, i.e., there is no upper bound in " - "matching destination port values." )] - uint16 HdrDestPortEnd; - - [Description ( - "HdrDSCP is defined as a set of discrete DiffServ code " - "points, with no inherent structure. There is no " - "semantically significant relationship between different " - "HdrDSCPs. Consequently, there is no provision for " - "specifying a range of HdrDSCPs. \n" - "\n" - "Since, in IPv4, the HdrDSCP field may contain bits to be " - "interpreted as the TOS IP Precedence, this property is " - "also used to filter on IP Precedence. Similarly, the " - "IPv6 Traffic Class field is also filtered using the " - "value(s) in this property. \n" - "\n" - "HdrDSCP is defined as an array, to provide the ability " - "to specify several discrete DSCPs in a single instance " - "of IPHeadersFilter, that would be OR\'ed together to " - "define the filter criteria. \n" - "\n" - "If a value for this property is not provided, then the " - "filter does not consider HdrDSCP in selecting matching " - "packets, i.e., HdrDSCP matches for all values." ), - MaxValue ( 63 )] - uint8 HdrDSCP[]; - - [Description ( - "The 20-bit Flow Label field in the IPv6 header may be " - "used by a source to label sequences of packets for which " - "it requests special handling by the IPv6 devices, such " - "as non-default quality of service or \'real-time\' " - "service. In the filter, this 20-bit string is encoded in " - "a 24-bit octetstring by right-adjusting the value and " - "padding on the left with b\'0000\'. \n" - "\n" - "If a value for this property is not provided, then the " - "filter does not consider HdrFlowLabel in selecting " - "matching packets, i.e., HdrFlowLabel matches for all " - "values." ), - OctetString] - uint8 HdrFlowLabel[]; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_IPProtocolEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_IPProtocolEndpoint.mof deleted file mode 100644 index 32ba9c23..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_IPProtocolEndpoint.mof +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.1" ), - UMLPackagePath ( "CIM::Network::ProtocolEndpoints" ), - Description ( "A ProtocolEndpoint that is dedicated to running IP." )] -class CIM_IPProtocolEndpoint : CIM_ProtocolEndpoint { - - [Description ( - "The IPv4 address that this ProtocolEndpoint represents." )] - string IPv4Address; - - [Description ( - "The IPv6 address that this ProtocolEndpoint represents." )] - string IPv6Address; - - [Deprecated { "CIM_IPProtocolEndpoint.IPv4Address", - "CIM_IPProtocolEndpoint.IPv6Address" }, - Description ( - "The IP address that this ProtocolEndpoint represents, " - "formatted according to the appropriate convention as " - "defined in the AddressType property of this class (e.g., " - "171.79.6.40). This single property is deprecated to " - "replace it by specific IPv4 and v6 addresses." )] - string Address; - - [Description ( - "The mask for the IPv4 address of this ProtocolEndpoint, " - "if one is defined." )] - string SubnetMask; - - [Description ( - "The prefix length for the IPv6 address of this Protocol " - "Endpoint, if one is defined." )] - uint8 PrefixLength; - - [Deprecated { "No value" }, - Description ( - "An enumeration that describes the format of the Address " - "property. It is deprecated since it is not needed, as " - "the class contains both IPv4 and v6 addresses)." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "IPv4", "IPv6" }] - uint16 AddressType; - - [Deprecated { "CIM_ProtocolEndpoint.ProtocolIFType" }, - Description ( - "This property explicitly defines support for different " - "versions of the IP protocol, for this Endpoint. It is " - "deprecated since the ProtocolIFType also provides this " - "functionality by describing an endpoint as IPv4 only " - "(value=4096), IPv6 only (value=4097), or IPv4/v6 " - "(value=4098)." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "IPv4 Only", "IPv6 Only", - "Both IPv4 and IPv6" }] - uint16 IPVersionSupport; - - [Override ( "ProtocolIFType" ), - Description ( - "ProtocolIFType\'s enumeration is limited to IP-related " - "and reserved values for this subclass of " - "ProtocolEndpoint." ), - ValueMap { "1", "225..4095", "4096", "4097", "4098", - "4301..32767", "32768.." }, - Values { "Other", "IANA Reserved", "IPv4", "IPv6", "IPv4/v6", - "DMTF Reserved", "Vendor Reserved" }] - uint16 ProtocolIFType = 4096; - - [Description ( - "AddressOrigin identifies the method by which the IP " - "Address, Subnet Mask, and Gateway were assigned to the " - "IPProtocolEndpoint.A value of 3 \"Static\" shall " - "indicate the values were assigned manually. A value of 4 " - "\"DHCP\" shall indicate the values were assigned " - "utilizing the Dynamic Host Configuration Protocol. See " - "RFC 2131 and related. \n" - "A value of 5 \"BOOTP\" shall indicate the values were " - "assigned utilizing BOOTP. See RFC 951 and related. \n" - "A value of 6 \"IPv4 Link Local\" shall indicate the " - "values were assigned using the IPv4 Link Local protocol. " - "See RFC 3927.\n" - "A value of 7 \"DHCPv6\" shall indicate the values were " - "assigned using DHCPv6. See RFC 3315. \n" - "A value of 8 \"IPv6 AutoConfig\" shall indicate the " - "values were assinged using the IPv6 AutoConfig Protocol. " - "See RFC 4862." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "..", - "32768..65535" }, - Values { "Unknown", "Other", "Not Applicable", "Static", - "DHCP", "BOOTP", "IPv4 Link Local", "DHCPv6", - "IPv6AutoConfig", "DMTF Reserved", "Vendor Reserved" }] - uint16 AddressOrigin = 0; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_IPRoute.mof b/build/vendor/dmtf_mof/Network/CIM_IPRoute.mof deleted file mode 100644 index e0fa18ea..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_IPRoute.mof +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_IPRoute -// ================================================================== - [Deprecated { "CIM_NextHopIPRoute" }, - Abstract, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Routes" ), - Description ( - "An IPRoute relates a destination address to the address or " - "interface through which the remote address may be reached. The " - "destination address may be a specific IP endpoint or a subnet, " - "dependent on the mask. An instance of this class represents " - "either static or dynamic routing. Static routes are " - "distinguished by setting the IsStatic boolean property to " - "TRUE. \n" - "\n" - "Since many routes between endpoints can be defined (using " - "different route calculation algorithms), the CIM_IPRoute class " - "is defined as Abstract. This forces subclassing (for example, " - "see CIM_BGPIPRoute) and allows the instances of its subclasses " - "to be distinguished based on their CreationClassName key " - "property. \n" - "\n" - "IPRoute is deprecated in lieu of the more general, concrete " - "NextHopIPRoute class. NextHopIPRoute allows the definition of " - "BOTH a next hop address and an interface for transmission of " - "the traffic. Also, it does not mandate the instantiation of a " - "ForwardingService class." )] -class CIM_IPRoute : CIM_NextHopRouting { - - [Deprecated { "No value" }, - Key, Description ( - "The scoping ForwardingService\'s SystemCreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_ForwardingService.SystemCreationClassName" )] - string SystemCreationClassName; - - [Deprecated { "No value" }, - Key, Description ( - "The scoping ForwardingService\'s SystemName." ), - MaxLen ( 256 ), - Propagated ( "CIM_ForwardingService.SystemName" )] - string SystemName; - - [Deprecated { "No value" }, - Key, Description ( - "The scoping ForwardingService\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_ForwardingService.CreationClassName" )] - string ServiceCreationClassName; - - [Deprecated { "No value" }, - Key, Description ( "The scoping ForwardingService\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_ForwardingService.Name" )] - string ServiceName; - - [Deprecated { "No value" }, - Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Deprecated { "CIM_NextHopIPRoute.DestinationAddress" }, - Key, Description ( - "The IP address which serves as the destination of the " - "traffic, formatted according to the appropriate " - "convention as defined in the AddressType property of " - "this class. \n" - "\n" - "This property has the same semantics as " - "DestinationAddress inherited from the NextHopRouting " - "superclass, but a different property name. This is " - "because this property and class were defined before " - "NextHopRouting and are Key properties. They cannot be " - "removed. ModelCorrespondence indicates that they should " - "be set to equivalent values for consistency and ease of " - "query." ), - ModelCorrespondence { "CIM_IPRoute.DestinationAddress" }] - string IPDestinationAddress; - - [Deprecated { "CIM_NextHopIPRoute.DestinationMask" }, - Key, Description ( - "The mask for the destination IP address, formatted " - "according to the appropriate convention as defined in " - "the AddressType property of this class. \n" - "\n" - "This property has the same semantics as DestinationMask " - "inherited from the NextHopRouting superclass, but a " - "different property name. This is because this property " - "and class were defined before NextHopRouting and are Key " - "properties. They cannot be removed. ModelCorrespondence " - "indicates that they should be set to equivalent values " - "for consistency and ease of query." ), - ModelCorrespondence { "CIM_IPRoute.DestinationMask" }] - string IPDestinationMask; - - [Deprecated { "CIM_NextHopIPRoute.AddressType" }, - Key, Description ( - "An enumeration that describes the format of the address " - "property. Addresses that can be formatted in IPv4 " - "format, must be formatted that way to ensure mixed " - "IPv4/IPv6 support. \n" - "\n" - "AddressType is part of the key so that an IPv4 and an " - "IPv6 route to IP subnets with the same network number " - "but different IP versions (v4/v6) can coexist." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "IPv4", "IPv6" }] - uint16 AddressType; - - [Deprecated { "No Value" }, - Override ( "DestinationAddress" ), - ModelCorrespondence { "CIM_IPRoute.IPDestinationAddress" }] - string DestinationAddress; - - [Deprecated { "No Value" }, - Override ( "DestinationMask" ), - ModelCorrespondence { "CIM_IPRoute.IPDestinationMask" }] - string DestinationMask; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_IPSOFilterEntry.mof b/build/vendor/dmtf_mof/Network/CIM_IPSOFilterEntry.mof deleted file mode 100644 index 5fe376a7..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_IPSOFilterEntry.mof +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_IPSOFilterEntry -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::Filtering" ), - Description ( - "An IPSOFilterEntry is used to match traffic based on the IP " - "Security Options header values (ClassificationLevel and " - "ProtectionAuthority) as defined in RFC1108. This type of " - "FilterEntry is used to adjust the IPsec encryption level " - "according to the IPSO classification of the traffic (e.g., " - "secret, confidential, restricted, etc.)." ), - MappingStrings { "IPSP Policy Model.IETF|IPSOFilterEntry" }] -class CIM_IPSOFilterEntry : CIM_FilterEntryBase { - - [Required, Description ( - "MatchConditionType specifies whether to match based on " - "traffic classification level, protection authority or " - "both. Note that this enumeration is modified from its " - "definition in the IETF\'s IPSP Policy Model to allow for " - "both classification level and protection authority " - "checking, and to allow the enumerated value, \"Other\", " - "to be added in the future." ), - ValueMap { "2", "3", "4" }, - Values { "Classification Level", "Protection Authority", - "Both Classification Level and Protection Authority" }, - MappingStrings { - "IPSP Policy Model.IETF|IPSOFilterEntry.MatchConditionType" }, - ModelCorrespondence { - "CIM_IPSOFilterEntry.ClassificationLevel", - "CIM_IPSOFilterEntry.ProtectionAuthorities" }] - uint16 MatchConditionType; - - [Required, Description ( - "This is the value to be matched when MatchConditionType " - "is 1 or 3 - meaning that \"Classification Level\" should " - "be filtered. In RFC1108, the following semantics are " - "specified: TopSecret, Secret, Confidential, and " - "Unclassified. Note that this enumeration\'s values are " - "different than the RFC list and the IETF\'s IPSP Policy " - "Model since those lists are simply bit maps, and do not " - "include specific values for \"Other\" or \"No " - "Filtering\"." ), - ValueMap { "1", "2", "3", "4", "5", "6", "..", "0x8000.." }, - Values { "Other", "No Filtering on Classification Level", - "Top Secret", "Secret", "Confidential", "Unclassified", - "DMTF Reserved", "Vendor Reserved" }, - MappingStrings { - "IPSP Policy Model.IETF|IPSOFilterEntry.MatchConditionValue", - "RFC1108.IETF|Section 2.3" }, - ModelCorrespondence { - "CIM_IPSOFilterEntry.MatchConditionType", - "CIM_IPSOFilterEntry.OtherClassificationLevel" }] - uint16 ClassificationLevel; - - [Description ( - "Description of the level when the value 1 (\"Other\") is " - "specified for the property, ClassificationLevel." ), - ModelCorrespondence { - "CIM_IPSOFilterEntry.ClassificationLevel" }] - string OtherClassificationLevel; - - [Required, Description ( - "These are the values to be matched when " - "MatchConditionType is 2 or 3 - meaning that \"Protection " - "Authority\" should be filtered. In RFC1108, the " - "following authorities are specified: GENSER, SIOP-ESI, " - "SCI, NSA and DOE. Note that multiple authorities may be " - "specified. \n" - "\n" - "This enumeration is modified from its definition in the " - "RFC and IETF\'s IPSP Policy Model. Those lists are " - "simply bit maps, and do not include specific values for " - "\"Other\" or \"No Filtering\"." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "..", "0x8000.." }, - Values { "Other", "No Filtering on Protection Authority", - "GENSER", "SIOP-ESI", "SCI", "NSA", "DOE", - "DMTF Reserved", "Vendor Reserved" }, - MappingStrings { - "IPSP Policy Model.IETF|IPSOFilterEntry.MatchConditionValue", - "RFC1108.IETF|Section 2.4" }, - ModelCorrespondence { - "CIM_IPSOFilterEntry.MatchConditionType", - "CIM_IPSOFilterEntry.OtherProtectionAuthorities" }] - uint16 ProtectionAuthorities[]; - - [Description ( - "Description of the authority when the value 1 (\"Other\") " - "is specified for the property, ProtectionAuthorities." ), - ModelCorrespondence { - "CIM_IPSOFilterEntry.ProtectionAuthorities" }] - string OtherProtectionAuthorities[]; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_IPSubnet.mof b/build/vendor/dmtf_mof/Network/CIM_IPSubnet.mof deleted file mode 100644 index 353cabbb..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_IPSubnet.mof +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_IPSubnet -// ================================================================== - [Deprecated { "CIM_IPConnectivitySubnet" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Collections" ), - Description ( - "An IPSubnet represents a group of related IPProtocolEndpoints " - "that can communicate with each other directly using IP. It is " - "used for describing the characteristics of the grouping. \n" - "\n" - "Since this class\' superclass (LogicalNetwork) has been " - "deprecated (in order to define more consistent \'collection\' " - "semantics), this class is also deprecated." )] -class CIM_IPSubnet : CIM_LogicalNetwork { - - [Deprecated { "CIM_IPConnectivitySubnet.SubnetNumber" }, - Description ( - "The IP address of the entire subnet, formatted according " - "to the appropriate convention as defined in the " - "AddressType property of this class." )] - string SubnetNumber; - - [Deprecated { "CIM_IPConnectivitySubnet.SubnetMask" }, - Description ( - "The mask for the starting IPv4 address of the IPSubnet, " - "if needed (i.e., if the AddressType property is 1, " - "\"IPv4\")." )] - string SubnetMask; - - [Deprecated { "CIM_IPConnectivitySubnet.PrefixLength" }, - Description ( - "The prefix length for IPv6 addresses in the IPSubnet, if " - "needed (i.e., if the AddressType property is 2, \"IPv6\")." - )] - uint8 PrefixLength; - - [Deprecated { "CIM_IPConnectivitySubnet.AddressType" }, - Description ( - "An enumeration that describes the format of the address " - "properties in IPSubnet." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "IPv4", "IPv6" }] - uint16 AddressType; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_IPXConnectivityNetwork.mof b/build/vendor/dmtf_mof/Network/CIM_IPXConnectivityNetwork.mof deleted file mode 100644 index b2c54e9f..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_IPXConnectivityNetwork.mof +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_IPXConnectivityNetwork -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Collections" ), - Description ( "A network or subnet that uses the IPX protocol." )] -class CIM_IPXConnectivityNetwork : CIM_ConnectivityCollection { - - [Description ( - "An IPX network number formatted as eight hexadecimal " - "digits (e.g., \"00112233\")." )] - string NetworkNumber; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_IPXNetwork.mof b/build/vendor/dmtf_mof/Network/CIM_IPXNetwork.mof deleted file mode 100644 index 00d091dc..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_IPXNetwork.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_IPXNetwork -// ================================================================== - [Deprecated { "CIM_IPXConnectivityNetwork" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Collections" ), - Description ( - "A network or subnet that uses the IPX protocol. Since this " - "class\' superclass (LogicalNetwork) has been deprecated (in " - "order to define more consistent \'collection\' semantics), " - "this class is also deprecated." )] -class CIM_IPXNetwork : CIM_LogicalNetwork { - - [Deprecated { "CIM_IPXConnectivityNetwork.NetworkNumber" }, - Description ( - "An IPX network number formatted as eight hexadecimal " - "digits (e.g., \"00112233\")." )] - string NetworkNumber; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_IPXProtocolEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_IPXProtocolEndpoint.mof deleted file mode 100644 index 5819a210..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_IPXProtocolEndpoint.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Correct ValueMaps for ProtocolIfTypeAdd UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_IPXProtocolEndpoint -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::ProtocolEndpoints" ), - Description ( - "An IPX communication point from which data may be sent or received." - )] -class CIM_IPXProtocolEndpoint : CIM_ProtocolEndpoint { - - [Description ( - "An IPX address formatted as eight hexadecimal digits " - "representing the network number, followed by a colon, " - "followed by twelve hexadecimal digits representing the " - "host address (e.g. \"00112233:010203040506\")." )] - string Address; - - [Override ( "ProtocolIFType" ), - Description ( - "ProtocolIFType\'s enumeration is limited to IPX and " - "reserved values for this subclass of ProtocolEndpoint." ), - ValueMap { "1", "225..4095", "4099", "4301..32767", "32768.." }, - Values { "Other", "IANA Reserved", "IPX", "DMTF Reserved", - "Vendor Reserved" }] - uint16 ProtocolIFType = 4099; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_IPsecSAEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_IPsecSAEndpoint.mof deleted file mode 100644 index 645cdd93..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_IPsecSAEndpoint.mof +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_IPsecSAEndpoint -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::IPsec" ), - Description ( - "IPsecSAEndpoints are types of SecurityAssociationEndpoints " - "representing both negotiated and static SAs that correspond to " - "AH, ESP, or IPCOMP transforms." )] -class CIM_IPsecSAEndpoint : CIM_SecurityAssociationEndpoint { - - [Description ( - "SPI contains the Security Parameter Index of the SA. " - "This value in string form may also be used in the key " - "field \'Name\' inherited from ServiceAccessPoint." )] - uint32 SPI; - - [Description ( - "InboundDirection specifies whether the SA applies to " - "inbound (TRUE) or outbound (FALSE) traffic." )] - boolean InboundDirection; - - [Description ( - "EncapsulationMode indicates whether the IPsecSAEndpoint " - "uses transport or tunnel encapsulation." ), - ValueMap { "0", "2", "3" }, - Values { "Unknown", "Tunnel", "Transport" }] - uint16 EncapsulationMode; - - [Description ( - "DFHandling controls how the \'Don\'t Fragment\' bit is " - "managed by the IPsecSAEndpoint." ), - ValueMap { "0", "2", "3", "4" }, - Values { "Unknown", - "Copy from Internal to External IP Header", - "Set DF Bit in External Header to 1", - "Set DF Bit in External Header to 0" }] - uint16 DFHandling; - - [Description ( - "PFSInUse indicates whether perfect forward secrecy is " - "required when refreshing keys." )] - boolean PFSInUse; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_InBGPPeerGroup.mof b/build/vendor/dmtf_mof/Network/CIM_InBGPPeerGroup.mof deleted file mode 100644 index f08e33c5..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_InBGPPeerGroup.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_InBGPPeerGroup -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "This aggregation defines the specific routers (i.e., " - "ComputerSystems) that participate in a PeerGroup." )] -class CIM_InBGPPeerGroup : CIM_CollectedMSEs { - - [Aggregate, Override ( "Collection" ), - Max ( 1 ), - Description ( "The PeerGroup that aggregates the routers." )] - CIM_BGPPeerGroup REF Collection; - - [Override ( "Member" ), - Min ( 2 ), - Description ( "The routers that comprise the PeerGroup." )] - CIM_ComputerSystem REF Member; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_InLogicalNetwork.mof b/build/vendor/dmtf_mof/Network/CIM_InLogicalNetwork.mof deleted file mode 100644 index 2907b618..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_InLogicalNetwork.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_InLogicalNetwork -// ================================================================== - [Association, Deprecated { "CIM_MemberOfCollection" }, - Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Collections" ), - Description ( - "This association defines a ProtocolEndpoint as a member of a " - "specific LogicalNetwork. \n" - "\n" - "Since the LogicalNetwork class is deprecated in lieu of " - "ConnectivityCollection, this association is no longer " - "necessary. It is deprecated to the MemberOfCollection " - "association, that is inherited by ConnectivityCollection from " - "its superclass, Collection." )] -class CIM_InLogicalNetwork : CIM_CollectedMSEs { - - [Deprecated { "CIM_MemberOfCollection.Collection" }, - Aggregate, Override ( "Collection" ), - Description ( - "The LogicalNetwork that groups the ProtocolEndpoint instances." - )] - CIM_LogicalNetwork REF Collection; - - [Deprecated { "CIM_MemberOfCollection.Member" }, - Override ( "Member" ), - Description ( - "The child ProtocolEndpoints that are components of the " - "LogicalNetwork." )] - CIM_ProtocolEndpoint REF Member; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_InSegment.mof b/build/vendor/dmtf_mof/Network/CIM_InSegment.mof deleted file mode 100644 index 329d1c6a..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_InSegment.mof +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_InSegment -// ================================================================== - [Association, Deprecated { "CIM_MemberOfCollection" }, - Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::ProtocolEndpoints" ), - Description ( - "Defines a LANEndpoint as a member of a specific LANSegment. " - "Note that one of this association\'s references (LANSegment) " - "is deprecated, as well as its superclass (InLogicalNetwork). " - "Following the same logic as its parent, this association is " - "deprecated to the MemberOfCollection association." )] -class CIM_InSegment : CIM_InLogicalNetwork { - - [Deprecated { "CIM_MemberOfCollection.Collection" }, - Aggregate, Override ( "Collection" ), - Max ( 1 ), - Description ( - "The LANSegment that groups the LANEndpoint instances." )] - CIM_LANSegment REF Collection; - - [Deprecated { "CIM_MemberOfCollection.Member" }, - Override ( "Member" ), - Description ( - "A child LANEndpoint that is a component of the LANSegment." - )] - CIM_LANEndpoint REF Member; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_InboundVLAN.mof b/build/vendor/dmtf_mof/Network/CIM_InboundVLAN.mof deleted file mode 100644 index 166cd3f4..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_InboundVLAN.mof +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_InboundVLAN -// ================================================================== - [Association, Deprecated { "No Value" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::VLAN" ), - Description ( - "This class is deprecated in lieu or not being necessary to " - "indicate whether the VLAN is inbound/outbound This association " - "makes explicit the operational dependencies of a SwitchPort " - "when operating in a VLAN. If there is an association between a " - "particular SwitchPort and a particular VLAN, then there is the " - "possibility that a packet received by the port will be " - "assigned to the VLAN (or if the packet already has a VLAN tag, " - "that the packet will not be dropped). If there is no such " - "association, then there is NO possibility that a packet " - "received by the port will progress through the switch having " - "been assigned to the referenced VLAN." )] -class CIM_InboundVLAN : CIM_SAPSAPDependency { - - [Deprecated { "No Value" }, - Override ( "Antecedent" ), - Description ( "The VLAN to which the SwitchPort is assigned." )] - CIM_VLAN REF Antecedent; - - [Deprecated { "No Value" }, - Override ( "Dependent" ), - Description ( "The SwitchPort on the VLAN." )] - CIM_SwitchPort REF Dependent; - - [Deprecated { "No Value" }, - Description ( - "If TRUE, packets already tagged with this VLAN number " - "will be accepted when arriving at this port. For " - "example, if there is an InboundVLAN association between " - "port 12 and VLAN 7 for which Tagged is true, then when a " - "packet tagged with VLAN 7 arrives at port 12, the packet " - "will be accepted into the switch for further processing. " - "If there is no such association, then the packet will be " - "dropped. \n" - "\n" - "If FALSE, it means that any untagged packets arriving at " - "this port MIGHT be classified into the associated VLAN. " - "If, for a particular SwitchPort, there is only one " - "instance of the association for which Tagged is FALSE, " - "then all incoming untagged packets will be classified " - "into that VLAN. This is the typical configuration of a " - "non-trunk port in a switch implementing port-based " - "VLANs. If there is more than one such association " - "instance, then the packet MIGHT be classified into any " - "one of them, based on some criterion other than the " - "identity of the switch port. For example, in a MAC-based " - "VLAN switch, the decision would be based on the source " - "MAC address. In a protocol-based VLAN switch, the " - "decision would be based on the values of some set of " - "bits in the packet. \n" - "\n" - "Note that the MAC address is formatted as twelve " - "hexadecimal digits (e.g., \"010203040506\"), with each " - "pair representing one of the six octets of the MAC " - "address in \"canonical\" bit order according to RFC " - "2469." )] - boolean Tagged; - - [Deprecated { "No Value" }, - Description ( - "Default should be TRUE if untagged packets received by " - "the SwitchPort are assigned to the VLAN. For " - "802.1Q-compliant ports, the Default property should be " - "TRUE on the association instance connecting a SwitchPort " - "to the VLAN corresponding to the port\'s PVID. Default " - "MUST never be TRUE if Tagged is true -- it applies only " - "to untagged packets." )] - boolean Default; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_IngressConditioningServiceOnEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_IngressConditioningServiceOnEndpoint.mof deleted file mode 100644 index 4c01402a..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_IngressConditioningServiceOnEndpoint.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_IngressConditioningServiceOnEndpoint -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This association represents the binding, in the ingress " - "direction, between a ProtocolEndpoint and the first " - "ConditioningService that processes packets received via that " - "Endpoint. Since there can only be one \'first\' " - "ConditioningService for a ProtocolEndpoint, the cardinality " - "for the Dependent object reference is narrowed from 0..n to " - "0..1. On the other hand, a single ConditioningService can be " - "the first to process packets received via multiple " - "ProtocolEndpoints. So, the cardinality of the Antecedent " - "object reference remains 0..n." )] -class CIM_IngressConditioningServiceOnEndpoint : CIM_ServiceSAPDependency { - - [Override ( "Antecedent" ), - Description ( - "The ProtocolEndpoint through which traffic arrives at a " - "network device." )] - CIM_ProtocolEndpoint REF Antecedent; - - [Override ( "Dependent" ), - Max ( 1 ), - Description ( - "The ConditioningService which begins the traffic " - "conditioning processing within a network device." )] - CIM_ConditioningService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_KVMRedirectionSAP.mof b/build/vendor/dmtf_mof/Network/CIM_KVMRedirectionSAP.mof deleted file mode 100644 index cfc57d6e..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_KVMRedirectionSAP.mof +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Network::ConsoleProtocols" ), - Description ( - "A class derived from Service Access Point, that describes an " - "access point to start the KVM redirection. One access point " - "represents access to a single KVM redirection stream." )] -class CIM_KVMRedirectionSAP : CIM_ServiceAccessPoint { - - [Description ( - "An enumeration specifying the type of the KVM stream " - "supported on this SAP. In some cases this may be a raw " - "video steam, with the characters having no special " - "meaning. However, in other cases it may support a " - "protocol where some messages have a predefined " - "structure. \n" - "0 \"Unknown\" shall indicate the protocol is unknown. \n" - "1 \"Other\" shall indicate the protocol is specified in " - "OtherKVMProtocol. \n" - "2 \"Raw\" shall indicate the protocol is a raw and " - "uncompressed data stream. 3 \"RDP\" shall indicate the " - "protocol is the Remote Desktop Protocol. \n" - "4 \"VNC\" shall indicate the protocol is the VNC " - "Protocol." ), - ValueMap { "0", "1", "2", "3", "4", "5..32767", "32768..65535" }, - Values { "Unknown", "Other", "Raw", "RDP", "VNC-RFB", - "DMTF Reserved", "Vendor Specified" }, - ModelCorrespondence { "CIM_KVMRedirectionSAP.OtherKVMProtocol" }] - uint16 KVMProtocol; - - [Description ( - "A string describing the KVMProtocol when the value of " - "the KVMProtocol property is set to 1 = \"Other\"." ), - ModelCorrespondence { "CIM_KVMRedirectionSAP.KVMProtocol" }] - string OtherKVMProtocol; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_LANConnectivitySegment.mof b/build/vendor/dmtf_mof/Network/CIM_LANConnectivitySegment.mof deleted file mode 100644 index 7ed9ae66..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_LANConnectivitySegment.mof +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LANConnectivitySegment -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Collections" ), - Description ( - "A collection of LAN Endpoints of a particular type (i.e., " - "Ethernet or Token Ring), that are able to intercommunicate " - "without the assistance of bridging or routing services." )] -class CIM_LANConnectivitySegment : CIM_ConnectivityCollection { - - [Description ( "A label or identifier for the LAN segment." ), - MaxLen ( 64 ), - ModelCorrespondence { "CIM_LANEndpoint.LANID" }] - string LANID; - - [Description ( - "An enumeration that categorizes and classifies instances " - "of this class. Instances SHOULD aggregate entities of " - "the appropriate \'type\', as defined by the value of " - "this enumeration." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "Ethernet", "TokenRing", "FDDI" }, - ModelCorrespondence { - "CIM_LANConnectivitySegment.OtherTypeDescription" }] - uint16 ConnectivityType; - - [Description ( - "A string describing the type of connectivity that is " - "supported by this Collection, when the value of the Type " - "property is set to 1 (i.e., \"Other\"). This property " - "should be set to NULL when the Type property is any " - "value other than 1." ), - ModelCorrespondence { - "CIM_LANConnectivitySegment.ConnectivityType" }] - string OtherTypeDescription; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_LANEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_LANEndpoint.mof deleted file mode 100644 index 18142d43..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_LANEndpoint.mof +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LANEndpoint -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::ProtocolEndpoints" ), - Description ( - "A communication endpoint which, when its associated interface " - "device is connected to a LAN, may send and receive data " - "frames. LANEndpoints include Ethernet, Token Ring and FDDI " - "interfaces." )] -class CIM_LANEndpoint : CIM_ProtocolEndpoint { - - [Description ( - "A label or identifier for the LAN Segment to which the " - "Endpoint is connected. If the Endpoint is not currently " - "active/connected or this information is not known, then " - "LANID is NULL." ), - ModelCorrespondence { "CIM_LANConnectivitySegment.LANID", - "CIM_LANSegment.LANID" }] - string LANID; - - [Deprecated { "CIM_ProtocolEndpoint.ProtocolType" }, - Description ( - "An indication of the kind of technology used on the LAN. " - "This property is deprecated in lieu of ProtocolType, " - "which is an enumeration inherited from ProtocolEndpoint " - "and which includes the Values specified here." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "Ethernet", "TokenRing", "FDDI" }, - ModelCorrespondence { - "CIM_LANConnectivitySegment.ConnectivityType", - "CIM_LANSegment.LANType" }] - uint16 LANType; - - [Deprecated { "CIM_ProtocolEndpoint.OtherTypeDescription" }, - Description ( - "A free-form string that describes the type of technology " - "used on the LAN when the value of the LANType property " - "is equal to 1 (i.e., \"Other\"). This property is " - "deprecated since its purpose overlaps with " - "OtherTypeDescription, which which is inherited from " - "ProtocolEndpoint." ), - ModelCorrespondence { - "CIM_LANConnectivitySegment.OtherTypeDescription", - "CIM_LANEndpoint.LANType" }] - string OtherLANType; - - [Description ( - "The principal unicast address used in communication with " - "the LANEndpoint. The MAC address is formatted as twelve " - "hexadecimal digits (e.g., \"010203040506\"), with each " - "pair representing one of the six octets of the MAC " - "address in \"canonical\" bit order according to RFC " - "2469." ), - MaxLen ( 12 )] - string MACAddress; - - [Description ( - "Other unicast addresses that may be used to communicate " - "with the LANEndpoint." )] - string AliasAddresses[]; - - [Description ( - "Multicast addresses to which the LANEndpoint listens." )] - string GroupAddresses[]; - - [Description ( - "The largest information field that may be sent or " - "received by the LANEndpoint." ), - Units ( "Bits" )] - uint32 MaxDataSize; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_LANSegment.mof b/build/vendor/dmtf_mof/Network/CIM_LANSegment.mof deleted file mode 100644 index 11bc50ef..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_LANSegment.mof +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LANSegment -// ================================================================== - [Deprecated { "CIM_LANConnectivitySegment" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Collections" ), - Description ( - "A collection of LAN Endpoints of a particular type that are " - "able to intercommunicate directly without the assistance of " - "bridging or routing services. \n" - "\n" - "Since this class\' superclass (LogicalNetwork) has been " - "deprecated (in order to define more consistent \'collection\' " - "semantics), this class is also deprecated." )] -class CIM_LANSegment : CIM_LogicalNetwork { - - [Deprecated { "CIM_LANConnectivitySegment.LANID" }, - Description ( "A label or identifier for the LAN Segment." ), - MaxLen ( 64 ), - ModelCorrespondence { "CIM_LANEndpoint.LANID" }] - string LANID; - - [Deprecated { "CIM_LANConnectivitySegment.ConnectivityType" }, - Description ( - "An indication of the kind of technology used on the LAN." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "Ethernet", "TokenRing", "FDDI" }, - ModelCorrespondence { "CIM_LANEndpoint.LANType" }] - uint16 LANType; - - [Deprecated { "CIM_LANConnectivitySegment.OtherTypeDescription" }, - Description ( - "A string describing the type of technology used on the " - "LAN when the value of the LANType property of this class " - "(or any of its subclasses) is set to 1 (i.e., \"Other\"). " - "The format of the string inserted in this property " - "should be similar in format to the values defined for " - "the LANType property. This property should be set to " - "NULL when the LANType property is any value other than " - "1." ), - MaxLen ( 64 ), - ModelCorrespondence { "CIM_LANSegment.LANType" }] - string OtherLANType; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_ListsInRoutingPolicy.mof b/build/vendor/dmtf_mof/Network/CIM_ListsInRoutingPolicy.mof deleted file mode 100644 index c1af8971..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_ListsInRoutingPolicy.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ListsInRoutingPolicy -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::RoutingForwarding" ), - Description ( - "This is a specialization of the CIM_Component aggregation " - "which is used to define a set of FilterLists that are " - "aggregated by a particular RoutingPolicy." )] -class CIM_ListsInRoutingPolicy : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Description ( - "The RoutingPolicy, which aggregates the set of FilterLists." - )] - CIM_RoutingPolicy REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "A FilterList, which is part-of the RoutingPolicy." )] - CIM_FilterList REF PartComponent; - - [Description ( - "The position of the FilterList relative to all other " - "entries in the RoutingPolicy." )] - uint16 ListSequence; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_LogicalNetwork.mof b/build/vendor/dmtf_mof/Network/CIM_LogicalNetwork.mof deleted file mode 100644 index 275d8346..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_LogicalNetwork.mof +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LogicalNetwork -// ================================================================== - [Deprecated { "CIM_ConnectivityCollection" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Collections" ), - Description ( - "A LogicalNetwork groups together a set of ProtocolEndpoints of " - "a given type which are able to communicate with each other " - "directly. It is used for describing the characteristics of the " - "grouping and/or its associated medium. A LogicalNetwork " - "represents the ability to send and/or receive data over a " - "network. \n" - "\n" - "This class is deprecated in lieu of ConnectivityCollection. " - "The latter better defines that a LogicalNetwork \'collects\' " - "ProtocolEndpoints and other related entities, and is hosted " - "within an AdminDomain." )] -class CIM_LogicalNetwork : CIM_CollectionOfMSEs { - - [Deprecated { "No value" }, - Key, Description ( - "The scoping AdminDomain\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_AdminDomain.CreationClassName" )] - string SystemCreationClassName; - - [Deprecated { "No value" }, - Key, Description ( "The scoping AdminDomain\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_AdminDomain.Name" )] - string SystemName; - - [Deprecated { "No value" }, - Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Deprecated { "CIM_ConnectivityCollection.InstanceID" }, - Key, Description ( - "The Name property defines the label by which the object is known." - ), - MaxLen ( 256 )] - string Name; - - [Deprecated { "No value" }, - Description ( - "Type is an enumeration that provides additional " - "information that can be used to help categorize and " - "classify different instances of this class. \n" - "\n" - "Subclasses should ensure that they are of the " - "appropriate type defined in the Type enumeration. That " - "is, the IPSubnet subclass should define its property as " - "either IPv4 or IPv6, as opposed to, for example, ATM." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18" }, - Values { "Unknown", "Other", "IPv4", "IPv6", "IPX", - "AppleTalk", "DECnet", "SNA", "CONP", "CLNP", "VINES", - "XNS", "ATM", "Frame Relay", "Ethernet", "TokenRing", - "FDDI", "Infiniband", "Fibre Channel" }, - ModelCorrespondence { - "CIM_LogicalNetwork.OtherTypeDescription" }] - uint16 NetworkType; - - [Deprecated { "No value" }, - Description ( - "A string describing the type of protocol that is being " - "run by this LogicalNetwork, when the value of the Type " - "property (or any of its subclasses) is set to 1 (i.e., " - "\"Other\"). This property should be set to NULL when the " - "Type property is any value other than 1." ), - MaxLen ( 64 ), - ModelCorrespondence { "CIM_LogicalNetwork.NetworkType" }] - string OtherTypeDescription; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_LogicalNetworkService.mof b/build/vendor/dmtf_mof/Network/CIM_LogicalNetworkService.mof deleted file mode 100644 index 492b67a0..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_LogicalNetworkService.mof +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LogicalNetworkService -// ================================================================== - [Association, Deprecated { "No value" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::RoutingForwarding" ), - Description ( - "A LogicalNetworkService represents network services that " - "either originate and/or terminate in a LogicalNetwork. This " - "association is deprecated since LogicalNetworks aggregate " - "ProtocolEndpoints, not their backing Services." )] -class CIM_LogicalNetworkService { - - [Deprecated { "No value" }, - Key, Description ( - "The LogicalNetwork that contains the network service." )] - CIM_LogicalNetwork REF Network; - - [Deprecated { "No value" }, - Key, Description ( - "The NetworkService that is running in the LogicalNetwork." )] - CIM_NetworkService REF NetworkService; - - [Deprecated { "No value" }, - Description ( - "An enumeration that explicitly defines this network " - "service as originating, terminating, or residing in this " - "LogicalNetwork." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Originates In", "Terminates In", - "Resides In" }] - uint16 ContainmentType; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_MarkerService.mof b/build/vendor/dmtf_mof/Network/CIM_MarkerService.mof deleted file mode 100644 index 4d5f0ddd..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_MarkerService.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_MarkerService -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "MarkerService represents the general process of marking a " - "selected field in a network packet with a specified value. " - "Packets are marked in order to control the conditioning that " - "they will subsequently receive. Subclasses of MarkerService " - "identify the specific fields to be marked, and introduce " - "properties to represent the values used in marking these " - "fields. Markers are usually invoked as a result of a preceding " - "classifier match. \n" - "\n" - "MarkerService is a concrete class because its superclass " - "(ConditioningService) is concrete. While this class can be " - "instantiated, an instance of it does not accomplish anything, " - "because both the field to be marked and the value used to mark " - "it are defined in subclasses. \n" - "\n" - "MarkerService is modeled as a ConditioningService so that it " - "can be aggregated into a QoSService (using the " - "QoSConditioningSubService association). This association " - "indicates that the MarkerService\'s functionality underlies " - "the QoSService. MarkerService also participates in the " - "NextService association to identify the subsequent " - "ConditioningService(s) that act on packets after they have " - "been marked." )] -class CIM_MarkerService : CIM_ConditioningService { - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_MediaRedirectionCapabilities.mof b/build/vendor/dmtf_mof/Network/CIM_MediaRedirectionCapabilities.mof deleted file mode 100644 index bcaa0cbb..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_MediaRedirectionCapabilities.mof +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Network::MediaRedirection" ), - Description ( - "MediaRedirectionCapabilities describes the capabilities of the " - "Media Redirection Service." )] -class CIM_MediaRedirectionCapabilities : CIM_RedirectionServiceCapabilities { - - [Description ( - "The connection mode used to configure the session. A " - "value set to 2 = \"Listen\" shall indicate that the SAP " - "will listen for a connection request from the remote " - "Media redirection server. A CIM_BindsTo association to a " - "CIM_ProtocolEndoint may be used to represent where the " - "SAP is listening for the connection request. A value set " - "to 3 = \"Connect\" shall indicate that the the SAP shall " - "initiate the connection to the remote Media redirection " - "server. A CIM_RemoteAccessAvailableToElement association " - "to a CIM_RemoteServiceAccessPoint may be used to " - "represent where the SAP shall connect to the remote " - "Media redirection server." ), - ValueMap { "0", "2", "3", "..", "32768..65535" }, - Values { "Unknown", "Listen", "Connect", "DMTF Reserved", - "Vendor Specified" }, - ModelCorrespondence { "CIM_MediaRedirectionSAP.ConnectionMode" }] - uint16 ConnectionModesSupported[]; - - [Description ( - "An enumeration indicating the types of Media Devices " - "which are supported by the Media Redirection Service. " - "Note that each entry of this array is related to the " - "entry in the MaxDevicesSupported array that is located " - "at the same index." ), - ValueMap { "0", "2", "3", "4", "5", "6", "7", "8", "..", - "32768..65535" }, - Values { "Unknown", "CIM_CDROMDrive", "CIM_DiskDrive", - "CIM_DisketteDrive", "CIM_DVDDrive", - "CIM_MagnetoOpticalDrive", "CIM_TapDrive", - "CIM_WORMDrive", "DMTF_ Reserved", "Vendor_ Specified" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_MediaRedirectionCapabilities.MaxDevicesSupported" }] - uint16 DevicesSupported[]; - - [Description ( - "An enumeration indicating the number of Media devices " - "which are supported for the devices specified in the " - "DevicesSupported array property. Note that each entry of " - "this array is related to the entry in the " - "DevicesSupported that is located at the same index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_MediaRedirectionCapabilities.DevicesSupported" }] - uint16 MaxDevicesSupported[]; - - [Description ( - "An enumeration indicating the number of Media devices " - "per MediaRedirection Session which are supported for the " - "devices specified in the DevicesSupported array " - "property. Note that each entry of this array is related " - "to the engry in the DevicesSupported array that is " - "located at the same index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_MediaRedirectionCapabilities.DevicesSupported" }] - uint16 MaxDevicesPerSAP[]; - - [Description ( - "An enumeration indicating the whether instances of " - "USBRedirectionSAPs already exist and whether whether " - "SAPs can be created. A value set to 2 = \"Modify " - "Timeouts\" shall indicate that the timeout parameters of " - "instances of CIM_USBRedirectionSAP can be modified by " - "applications using \'ModifyInstance\'" ), - ValueMap { "0", "2", "..", "32768..65535" }, - Values { "Unknown", "Modify SAP", "DMTF Reserved", - "Vendor Specified" }] - uint16 SAPCapabilitiesSupported[]; - - [Description ( - "An enumeration indicating which of the formats for " - "CIM_RemoteServiceAccessPoint.InfoFormat are supported by " - "the Media Redirection Service." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "10", "11", - "12", "13", "100", "101", "102", "200", "201", "202", - "203", "204", "205", "..", "32768..65535" }, - Values { "Other", "Host Name", "IPv4 Address", - "IPv6 Address", "IPX Address", "DECnet Address", - "SNA Address", "IPv4 Subnet Address", - "IPv6 Subnet Address", "IPv4 Address Range", - "IPv6 Address Range", "Dial String", "Ethernet Address", - "Token Ring Address", "URL", "FQDN", "User FQDN", - "DER ASN1 DN", "DER ASN1 GN", "Key ID", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { - "CIM_RemoteServiceAccessPoint.InfoFormat" }] - uint16 InfoFormatsSupported[]; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_MediaRedirectionSAP.mof b/build/vendor/dmtf_mof/Network/CIM_MediaRedirectionSAP.mof deleted file mode 100644 index 90a3ebde..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_MediaRedirectionSAP.mof +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Network::MediaRedirection" ), - Description ( - "MediaRedirectionSAP is a logical representation of a Media " - "redirection session. One access point represents access to a " - "single Media redirection session." )] -class CIM_MediaRedirectionSAP : CIM_ServiceAccessPoint { - - [Description ( - "An enumeration specifying the type of connection mode " - "supported by the session. A value set to 2 = \"Listen\" " - "shall indicate that the SAP will listen for a connection " - "request from the remote Media redirection server. A " - "CIM_BindsTo association to a CIM_ProtocolEndpoint may be " - "used to represent where the SAP is listening for the " - "connection request. A value set to 3 = \"Connect\" shall " - "indicate that the the SAP shall initiate the connection " - "to the remote Media redirection server. A " - "CIM_RemoteAccessAvailableToElement association to a " - "CIM_RemoteServiceAccessPoint may be used to represent " - "where the SAP shall connect to the remote Media " - "redirection server." ), - ValueMap { "0", "2", "3", "..", "32768..65535" }, - Values { "Unknown", "Listen", "Connect", "DMTF Reserved", - "Vendor Specified" }] - uint16 ConnectionMode; - - [Description ( - "CommandTimeout is configurable by management " - "applications supporting Media Redirections. When the " - "Redirection Service redirects a Media device command to " - "a remote device, and the remote device does not respond " - "before CommandTimeout times out, the Redirection Service " - "will emulate a media eject event and re-try the command " - "and/or try to re-establish the connection to the remote " - "device. Commandtimeout shall be expressed using the " - "interval format of the datetime type." )] - datetime CommandTimeout; - - [Description ( - "The amount of time the session shall wait after sending " - "a Reset to the Remote System before concluding that the " - "Remote System is not responding in a timely fashion, it " - "may be hung or busy. When the Reset Timeout is exceeded " - "the managed system tries to establish a new connection " - "with the Remote System. ResetTimeout shall be expressed " - "using the interval format of the datetime type." )] - datetime ResetTimeout; - - [Description ( - "The amount of time the session will wait for a Remote " - "System to establish a new connection before the Media " - "Device is detached. SessionTimeout shall be expressed " - "using the interval format of the datetime type." )] - datetime SessionTimeout; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_MeterService.mof b/build/vendor/dmtf_mof/Network/CIM_MeterService.mof deleted file mode 100644 index 2caefca6..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_MeterService.mof +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_MeterService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This class represents the metering of network traffic. " - "Metering is the function of monitoring the arrival times of " - "packets of a traffic stream and determining the level of " - "conformance of each packet with respect to a pre- established " - "traffic profile. A meter has the ability to invoke different " - "ConditioningServices for conforming and non-conforming " - "traffic. Traffic leaving a meter may be further conditioned " - "(e.g., dropped or queued) by routing the packet to another " - "conditioning element. \n" - "\n" - "This class is modeled as a ConditioningService so that it can " - "be aggregated into a QoSService (using the " - "QoSConditioningSubService association), to indicate that its " - "functionality underlies that QoS service. MeterService also " - "participates in a subclass of the NextService association, to " - "identify the subsequent ConditioningServices for conforming " - "and non-conforming traffic." )] -class CIM_MeterService : CIM_ConditioningService { - - [Description ( - "This property is an enumerated 16-bit unsigned integer " - "that is used to specify the particular type of meter. " - "Defined values of the enumeration are: \n" - "\n" - "1: Other \n" - "2: Average Rate Meter \n" - "3: Exponentially Weighted Moving Average Meter \n" - "4: Token Bucket Meter \n" - "\n" - "Note: The MeterType property and the MeterService " - "subclasses provide similar information. This property is " - "defined for query purposes and for future expansion. It " - "is assumed that not all MeterServices will require a " - "subclass to define them. Therefore, MeterService will be " - "instantiated directly and the Type property is needed." ), - ValueMap { "1", "2", "3", "4" }, - Values { "Other", "Average Rate Meter", - "Exponentially Weighted Moving Average Meter", - "Token Bucket Meter" }, - ModelCorrespondence { "CIM_MeterService.OtherMeterType" }] - uint16 MeterType; - - [Description ( - "This property is a string used in conjunction with the " - "MeterType property. When the value of MeterType is 1 " - "(i.e., \"Other\"), then the name of the conformance " - "level for this meter is defined in this property." ), - ModelCorrespondence { "CIM_MeterService.MeterType" }] - string OtherMeterType; - - [Description ( - "An unsigned integer indicating the number of conformance " - "levels supported by the Meter. For example, when only " - "\'in-profile\' or \'out of profile\' metering is " - "supported. ConformanceLevels is set to 2." )] - uint16 ConformanceLevels; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_NamedAddressCollection.mof b/build/vendor/dmtf_mof/Network/CIM_NamedAddressCollection.mof deleted file mode 100644 index 0b06d62b..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_NamedAddressCollection.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_NamedAddressCollection -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Collections" ), - Description ( - "A NamedAddressCollection groups ProtocolEndpoints/addresses " - "and other network identifiers for the purposes of assigning a " - "single name (i.e., an alias). It is a subclass of " - "SystemSpecificCollection to force the definition of the \'named " - "collection\' in the context of a System (for example, either a " - "ComputerSystem or an AdminDomain hosting a naming alias)." )] -class CIM_NamedAddressCollection : CIM_SystemSpecificCollection { - - [Required, Write, Description ( - "A name (alias) for the NamedAddressCollection which is " - "unique in the context of the hosting System." )] - string CollectionAlias; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_Network.mof b/build/vendor/dmtf_mof/Network/CIM_Network.mof deleted file mode 100644 index 45b0c74e..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_Network.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Network -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Systems" ), - Description ( - "Network is a subclass of AdminDomain that groups " - "interconnected networking and computing objects capable of " - "exchanging information. Instances of CIM_Network can represent " - "an enterprise\'s global network or specific connectivity " - "domains within the global network. These concepts are similar " - "to those defined for the Network object in ITU\'s M.3100 " - "specification." ), - MappingStrings { "Recommendation.ITU|M3100.Network" }] -class CIM_Network : CIM_AdminDomain { - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_NetworkPipe.mof b/build/vendor/dmtf_mof/Network/CIM_NetworkPipe.mof deleted file mode 100644 index d85d8dbd..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_NetworkPipe.mof +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Network::Pipes" ), - Description ( - "NetworkPipe is a subclass of EnabledLogicalElement, " - "representing the state and management of a connection or trail " - "between endpoints. This object is different than the " - "association between the endpoints (CIM_ActiveConnection) since " - "the emphasis is NOT on the endpoints but on the management of " - "the pipe itself - its state, configuration, etc. NetworkPipes " - "are defined in the context of a CIM_Network and represent the " - "\'transfer of information . . . between . . . endpoints\'. " - "These concepts are aligned with the definition of the Pipe " - "object in ITU\'s M.3100 specification." ), - MappingStrings { "Recommendation.ITU|M3100.Pipe", - "Recommendation.ITU|M3100.TrailR1", - "Recommendation.ITU|M3100.ConnectionR1", - "Recommendation.ITU|M3100.SubNetworkConnection" }] -class CIM_NetworkPipe : CIM_EnabledLogicalElement { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. In order to ensure uniqueness within the " - "NameSpace, the value of InstanceID SHOULD be constructed " - "using the following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon " - "\':\', and where MUST include a copyrighted, " - "trademarked or otherwise unique name that is owned by " - "the business entity creating/defining the InstanceID, or " - "is a registered ID that is assigned to the business " - "entity by a recognized global authority. (This is " - "similar to the _ structure of " - "Schema class names.) In addition, to ensure uniqueness " - " MUST NOT contain a colon (\':\'). When using " - "this algorithm, the first colon to appear in InstanceID " - "MUST appear between and . (For DMTF " - "defined instances, the \'preferred\' algorithm MUST be " - "used with the set to \'CIM\'.) \n" - " MUST include either a vendor specified unique " - "identifier, or if mapping from an ITU M.3100 " - "environment, the trailID, connectionID or " - "subNetworkConnectionID of the instances of PipeR2." ), - MappingStrings { "Recommendation.ITU|M3100.TrailR1.trailId", - "Recommendation.ITU|M3100.ConnectionR1.connectionID", - "Recommendation.ITU|M3100.SubNetworkConnection.subNetworkConnectionID" }] - string InstanceID; - - [Description ( - "Indicates whether the pipe is bi-directional (value = " - "2), unidirectional (value = 3), or this information is " - "not known (value = 0). For unidirectional pipes, the " - "source and sink are indicated by a property " - "(SourceOrSink) of the association, " - "EndpointOfNetworkPipe." ), - ValueMap { "0", "2", "3" }, - Values { "Unknown", "Bi-Directional", "Unidirectional" }, - MappingStrings { - "Recommendation.ITU|M3100.Pipe.directionality" }] - uint16 Directionality; - - [Description ( - "Indicates whether the pipe is composed of lower-level " - "pipes, and if so, how these lower-level pipes are " - "aggregated (in parallel or in sequence). The specific " - "instances of NetworkPipe that are combined are described " - "using the NetworkPipeComposition association. \n" - "\n" - "In the context of M.3100, the ability to be composed of " - "lower-level pipes is modeled as a Trail. A Trail is made " - "up of one or more Connections. (Note that both Trails " - "and Connections are subclasses of Pipe). Because of the " - "flexibility of the NetworkPipeComposition association, " - "there is no need to subclass NetworkPipe, as was done in " - "M.3100, but merely to instantiate the " - "NetworkPipeComposition association to describe the " - "bundling of the lower-level pipes (i.e., the " - "connections), or the sequencing of them." ), - ValueMap { "0", "2", "3", "4" }, - Values { "Unknown", "No Lower-Level Composition", - "Combined In Parallel", "Combined In Sequence" }] - uint16 AggregationBehavior; - - [Override ( "EnabledState" ), - MappingStrings { - "Recommendation.ITU|M3100.Pipe.operationalState" }] - uint16 EnabledState; - - [Override ( "RequestedState" ), - Write, MappingStrings { - "Recommendation.ITU|M3100.Pipe.administrativeState" }] - uint16 RequestedState = 5; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_NetworkPipeComposition.mof b/build/vendor/dmtf_mof/Network/CIM_NetworkPipeComposition.mof deleted file mode 100644 index 4ce09920..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_NetworkPipeComposition.mof +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_NetworkPipeComposition -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Pipes" ), - Description ( - "NetworkPipeComposition describes the makeup a pipe, based on " - "lower-level ones. If the pipe is not composed of lower-level " - "entities (i.e., its AggregationBehavior property is set to 2), " - "then no instances of this association should be defined where " - "the pipe has the role of GroupComponent. \n" - "\n" - "In the context of M.3100, this semantic is modeled as a Trail " - "that is made up of one or more Connections. Both Trails and " - "Connections are subclasses of M.3100\'s Pipe. Because of the " - "flexibility of the NetworkPipeComposition association, there " - "is no need to subclass NetworkPipe, as was done in M.3100, but " - "merely to instantiate this association to describe the " - "bundling of the lower-level pipes (connections), or the " - "sequencing of them. How the lower-level pipes are aggregated " - "is described by the property, AggregationBehavior, of " - "NetworkPipe. If the pipes are combined in a sequence, the " - "ordering is conveyed via the property, AggregationSequence, on " - "this association." ), - MappingStrings { - "Recommendation.ITU|M3100.TrailR1.serverConnectionListPackage", - "Recommendation.ITU|M3100.TrailR1.clientConnectionListPackage" }] -class CIM_NetworkPipeComposition : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Description ( - "The higher level pipe that is composed of lower-level parts/pipes." - )] - CIM_NetworkPipe REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "A pipe which is a part of a higher-level one." )] - CIM_NetworkPipe REF PartComponent; - - [Description ( - "Indicates the ordering of the PartComponent pipes in the " - "GroupComponent. If the AggregationBehavior property of " - "the GroupComponent pipe is set to 0 or 3 (\"Unknown\" or " - "\"Combined In Parallel\"), then this property MUST be " - "set to 0. If the AggregationBehavior is set to 4 " - "(\"Combined In Sequence\"), then this property SHOULD " - "indicate the ordering of the component pipes. Ordering " - "starts with 1 and larger numbers indicate subsequent " - "pipes. The numbering does not have to be in sequence. " - "The word SHOULD is used in this Description, since the " - "specific ordering of all the component pipes may not be " - "known. In these cases, a value of 0 would be placed in " - "AggregationSequence to indicate that ordering " - "information is not available." )] - uint16 AggregationSequence; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_NetworkPortConfigurationService.mof b/build/vendor/dmtf_mof/Network/CIM_NetworkPortConfigurationService.mof deleted file mode 100644 index df8a561b..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_NetworkPortConfigurationService.mof +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Network::Misc" ), - Description ( - "CIM_NetworkPortConfigurationService provides management of the " - "network interfaces associated with a network port." )] -class CIM_NetworkPortConfigurationService : CIM_Service { - - - [Description ( - "Create a CIM_LANEndpoint instance and associate it with " - "the specified NetworkPort instance via an instance of " - "CIM_PortImplementsEndpoint. The newly created instance " - "of CIM_LANEndpont contains the configuration properties " - "specified or default values applicable for the specified " - "NetworkPort instance. This method will also create an " - "instance of CIM_HostedAccessPoint which associates the " - "newly created CIM_LANEndpoint instance with the instance " - "of CIM_ComputerSystem which scopes the specified " - "CIM_NetworkPort. An extrinsic method is required in " - "order to provide atomic creation of multiple, related " - "instances. Prior to creating the instances, the " - "implementation will verify that a CIM_LANEndpoint " - "instance can be created and associated with the " - "CIM_NetworkPort instance." ), - ValueMap { "0", "1", "2", "3", "4", "..", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", "Failed", - "Invalid Parameter", "DMTF Reserved", "Vendor Reserved" }] - uint32 AddLANEndpoint( - [Required, IN, Description ( - "The NetworkPort to which the network interface will be added." - )] - CIM_NetworkPort REF Port, - [IN ( false ), OUT, Description ( - "The created LANEndpoint." )] - CIM_LANEndpoint REF Endpoint, - [Required, IN, Description ( - "The MAC address requested." )] - string Address, - [IN, Description ( "The requested LAN ID." )] - string LANID, - [IN, Description ( "The requested alias addresses." )] - string AliasAddresses[], - [IN, Description ( "The requested group addresses." )] - string GroupAddresses[]); - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_NetworkService.mof b/build/vendor/dmtf_mof/Network/CIM_NetworkService.mof deleted file mode 100644 index cf6acbbd..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_NetworkService.mof +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_NetworkService -// ================================================================== - [Deprecated { "CIM_Service" }, - Abstract, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::RoutingForwarding" ), - Description ( - "This is an abstract base class, derived from the Service " - "class. It is deprecated in Version 2.7 with the recommendation " - "that the Service class be subclassed instead. Distinguishing " - "between services that modify traffic versus supporting basic " - "communication has not proved useful." )] -class CIM_NetworkService : CIM_Service { - - [Deprecated { "No value" }, - Description ( - "This is a free-form array of strings that provide " - "descriptive words and phrases that can be used in " - "queries. To-date, this property has not been " - "implemented, since it is not standardized. Also, if this " - "was a necessary query construct, then it would be " - "required higher in the inheritance hierarchy. The latter " - "has not proven necessary. Therefore, the property is " - "deprecated." )] - string Keywords[]; - - [Deprecated { "CIM_ServiceAccessURI" }, - Description ( - "This is a URL that provides the protocol, network " - "location, and other service-specific information " - "required in order to access the service. It is " - "deprecated with the recommendation that ServiceAccessURI " - "be instantiated instead. This new class correctly " - "positions the semantics of the service access, and " - "clarifies the format of the information." )] - string ServiceURL; - - [Deprecated { "No value" }, - Description ( - "This is a free-form array of strings that specify any " - "specific pre-conditions that must be met in order for " - "this service to start correctly. It was expected that " - "subclasses would refine the inherited StartService() " - "method to suit their specific needs. To-date, this " - "refinement has not been necessary. Also, the property is " - "not very useful, since it is not standardized. If this " - "was a necessary construct, then it would be required " - "higher in the inheritance hierarchy (on Service). The " - "latter has not proven true. Therefore, the property is " - "deprecated." )] - string StartupConditions[]; - - [Deprecated { "No value" }, - Description ( - "This is a free-form array of strings that specify any " - "specific parameters that must be supplied to the " - "StartService() method in order for this service to start " - "correctly. It was expected that subclasses would refine " - "the inherited StartService() methods to suit their " - "specific needs. To-date, this refinement has not been " - "necessary. If indeed the method were refined, then its " - "parameters would more formally convey this information. " - "Therefore, the property is deprecated." )] - string StartupParameters[]; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_NetworkServicesInAdminDomain.mof b/build/vendor/dmtf_mof/Network/CIM_NetworkServicesInAdminDomain.mof deleted file mode 100644 index 678809a5..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_NetworkServicesInAdminDomain.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_NetworkServicesInAdminDomain -// ================================================================== - [Association, Deprecated { "CIM_HostedDependency" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::RoutingForwarding" ), - Description ( - "This association establishes the Dependency relationships that " - "exist between an administrative domain and the Network " - "Services that it hosts. It is deprecated since AdminDomains " - "can contain any ManagedSystemElements. There is no special " - "relationship needed for NetworkServices. In addition, the Min " - "(1) cardinality on AdminDomain is not valid - since it may not " - "be possible to define every NetworkService in the context of " - "one or more Domains." )] -class CIM_NetworkServicesInAdminDomain : CIM_HostedDependency { - - [Deprecated { "CIM_Dependency.Antecedent" }, - Override ( "Antecedent" ), - Description ( - "The AdminDomain that hosts and administers the various " - "network services." )] - CIM_AdminDomain REF Antecedent; - - [Deprecated { "CIM_Dependency.Dependent" }, - Override ( "Dependent" ), - Description ( - "The network service that is hosted in the administrative domain." - )] - CIM_NetworkService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_NetworkVLAN.mof b/build/vendor/dmtf_mof/Network/CIM_NetworkVLAN.mof deleted file mode 100644 index 3a4fe67b..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_NetworkVLAN.mof +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2010 DMTF. All rights reserved. - [Version ( "2.26.0" ), - UMLPackagePath ( "CIM::Network::VLAN" ), - Description ( - "An instance of NetworkVLAN represents a collection of " - "VLANSwitchEndpoints and/or VLANEndstationEndpoints which are " - "members of the VLAN. There SHOULD be an instance of " - "NetworkVLAN for every VLAN available in a switch. For example, " - "in a switch with port-based VLANs, if there are 16 VLANs to " - "which ports can be assigned (VLAN 1 through VLAN 16), there " - "SHOULD be an instance of NetworkVLAN for each of VLAN 1 " - "through VLAN 16." )] -class CIM_NetworkVLAN : CIM_ConnectivityCollection { - - [Description ( "A 12-bit VLAN ID used in the VLAN Tag header." ), - MinValue ( 1 ), - MaxValue ( 4094 ), - MappingStrings { "MIB.IETF|Q-BRIDGE-MIB.VlanId" }] - uint16 VLANId; - - [Description ( - "The value of the 802.10 SAID field which would be used " - "for this VLAN." )] - uint32 SAIdentifier; - - [Description ( - "The value of this property is set to a positive integer " - "when the value of the MTU for all members (switch " - "endpoints/endstationendpoints of the VLAN is the same, " - "otherwise is set to -1 and the Transmission size is set " - "on each of the individual endpoints." ), - ModelCorrespondence { - "CIM_VLANSystemCapabilities.MaxMTUsize", - "CIM_VLANSystemCapabilities.MinMTUsize" }] - sint32 TransmissionSize; - - [Description ( - "Defines/restricts the media type of the VLAN. This " - "information is also needed when a VLAN is not yet " - "associated to any end point." ), - ValueMap { "0", "1", "2", "3", "4", "5..16000", ".." }, - Values { "Unknown", "Other", "Not Applicable", "Ethernet", - "FDDI", "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_NetworkVLAN.OtherTypeDescription" }] - uint16 TypeOfMedia; - - [Description ( - "A string describing the type of media that is supported " - "by this VLAN, when the value of the Type property is set " - "to 1 (i.e., \"Other\"). This property should be set to " - "NULL when the Type property is any value other than 1." ), - ModelCorrespondence { "CIM_NetworkVLAN.TypeOfMedia" }] - string OtherTypeDescription; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_NetworksInAdminDomain.mof b/build/vendor/dmtf_mof/Network/CIM_NetworksInAdminDomain.mof deleted file mode 100644 index 140bb619..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_NetworksInAdminDomain.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_NetworksInAdminDomain -// ================================================================== - [Association, Deprecated { "CIM_HostedCollection" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Collections" ), - Description ( - "This association is used to define the set of Logical Networks " - "contained in an AdminDomain. This has the implied semantics " - "that this set of LogicalNetworks are all managed by the same " - "network administrator that manages the domain. \n" - "\n" - "Since the LogicalNetwork class is deprecated in lieu of " - "ConnectivityCollection, this association is no longer " - "necessary. It is deprecated to the HostedCollection " - "association, that is inherited by ConnectivityCollection from " - "its superclass, SystemSpecificCollection." )] -class CIM_NetworksInAdminDomain { - - [Deprecated { "CIM_HostedCollection.Antecedent" }, - Key, Min ( 1 ), - Max ( 1 ), - Description ( - "The AdminDomain that hosts the various LogicalNetworks." )] - CIM_AdminDomain REF Domain; - - [Deprecated { "CIM_HostedCollection.Dependent" }, - Key, Weak, Description ( - "The LogicalNetworks that are hosted by the AdminDomain." )] - CIM_LogicalNetwork REF Network; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_NextHopIPRoute.mof b/build/vendor/dmtf_mof/Network/CIM_NextHopIPRoute.mof deleted file mode 100644 index 70d475be..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_NextHopIPRoute.mof +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_NextHopIPRoute -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Routes" ), - Description ( "NextHopIPRoute specifies routing in an IP network." )] -class CIM_NextHopIPRoute : CIM_NextHopRoute { - - [Description ( - "An enumerated integer indicating how the route was " - "derived. This is useful for display and query purposes." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11" }, - Values { "Unknown", "Other", "Connected", "User-Defined", - "IGRP", "EIGRP", "RIP", "Hello", "EGP", "BGP", "ISIS", - "OSPF" }, - ModelCorrespondence { "CIM_NextHopIPRoute.OtherDerivation" }] - uint16 RouteDerivation; - - [Description ( - "A string describing how the route was derived when the " - "RouteDerivation property is 1 (\"Other\")." ), - ModelCorrespondence { "CIM_NextHopIPRoute.RouteDerivation" }] - string OtherDerivation; - - [Description ( "The mask for the Ipv4 destination address." )] - string DestinationMask; - - [Description ( - "The prefix length for the IPv6 destination address." )] - uint8 PrefixLength; - - [Description ( - "An enumeration that describes the format of the address " - "properties." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "IPv4", "IPv6" }] - uint16 AddressType; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_NextHopRoute.mof b/build/vendor/dmtf_mof/Network/CIM_NextHopRoute.mof deleted file mode 100644 index d825d9bd..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_NextHopRoute.mof +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Network::Routes" ), - Description ( - "NextHopRoute represents one of a series of \'hops\' to reach a " - "network destination. A route is administratively defined, or " - "calculated/learned by a particular routing process. A " - "ConcreteDependency associaton may be instantiated between a " - "route and its routing service to indicate this. (In this " - "scenario, the route is dependent on the service.)" )] -class CIM_NextHopRoute : CIM_ManagedElement { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. In order to ensure uniqueness within the " - "NameSpace, the value of InstanceID SHOULD be constructed " - "using the following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon " - "\':\', and where MUST include a copyrighted, " - "trademarked or otherwise unique name that is owned by " - "the business entity creating/defining the InstanceID, or " - "is a registered ID that is assigned to the business " - "entity by a recognized global authority. (This is " - "similar to the _ structure of " - "Schema class names.) In addition, to ensure uniqueness " - " MUST NOT contain a colon (\':\'). When using " - "this algorithm, the first colon to appear in InstanceID " - "MUST appear between and . \n" - " is chosen by the business entity and SHOULD " - "not be re-used to identify different underlying " - "(real-world) elements. If the above \'preferred\' " - "algorithm is not used, the defining entity MUST assure " - "that the resultant InstanceID is not re-used across any " - "InstanceIDs produced by this or other providers for this " - "instance\'s NameSpace. \n" - "For DMTF defined instances, the \'preferred\' algorithm " - "MUST be used with the set to \'CIM\'." )] - string InstanceID; - - [Description ( - "The address which serves as the destination to be reached." - )] - string DestinationAddress; - - [Description ( - "The specific administrative distance of this route, " - "overriding any default distances specified by the system " - "or routing service." )] - uint16 AdminDistance; - - [Description ( - "RouteMetric provides a numeric indication as to the " - "preference of this route, compared to other routes that " - "reach the same destination." )] - uint16 RouteMetric; - - [Description ( - "TRUE indicates that this is a static route, and FALSE " - "indicates a dynamically-learned route." )] - boolean IsStatic; - - [Description ( - "An enumerated integer indicating whether the route is " - "administrator-defined (value=2), computed (via a routing " - "protocol/algorithm, value=3) or the actual route " - "implemented in the network (value=4). The default is a " - "computed route." ), - ValueMap { "2", "3", "4" }, - Values { "Administrator Defined Route", "Computed Route", - "Actual Route" }] - uint16 TypeOfRoute = 3; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_NextHopRouting.mof b/build/vendor/dmtf_mof/Network/CIM_NextHopRouting.mof deleted file mode 100644 index b6228344..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_NextHopRouting.mof +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_NextHopRouting -// ================================================================== - [Deprecated { "CIM_NextHopRoute" }, - Abstract, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Routes" ), - Description ( - "NextHopRouting relates a destination address to the address or " - "interface through which the remote address may be reached. An " - "instance of this class can represent either static or dynamic " - "routing, and may represent a routing table entry (but it is " - "not required that all NextHopRoutes be in a routing table). " - "Static routes are distinguished by setting the IsStatic " - "boolean property to TRUE. Subclasses of NextHopRouting provide " - "specific protocol and Key information. NextHopRoutes are " - "dependent on at least one ForwardingService to execute them. " - "This is conveyed by the CIM_NextHopForwardedByService " - "association. \n" - "\n" - "NextHopRouting is deprecated in lieu of the more general, " - "concrete NextHopRoute class. NextHopRoute allows the " - "definition of BOTH a next hop address and an interface for " - "transmission of the traffic. Also, it does not mandate the " - "instantiation of a ForwardingService class. The latter is not " - "needed if the sole purpose of the instance is to specify a " - "\'desired/configured\' route. This is simply a specification " - "of the next hop." )] -class CIM_NextHopRouting : CIM_LogicalElement { - - [Deprecated { "CIM_NextHopRoute.DestinationAddress" }, - Description ( - "The address which serves as the destination to be reached." - )] - string DestinationAddress; - - [Deprecated { "no value" }, - Description ( "The mask for the DestinationAddress." )] - string DestinationMask; - - [Deprecated { "CIM_AssociatedNextHop.Antecedent", - "CIM_RouteUsesEndpoint.Antecedent" }, - Description ( - "This contains either the address of the next-hop router, " - "or the interface used to reach the destination." )] - string NextHop; - - [Deprecated { "CIM_NextHopRoute.IsStatic" }, - Description ( - "TRUE indicates that this is a static route, and FALSE " - "indicates a dynamically-learned route." )] - boolean IsStatic; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_NextScheduler.mof b/build/vendor/dmtf_mof/Network/CIM_NextScheduler.mof deleted file mode 100644 index b1d26cba..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_NextScheduler.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_NextScheduler -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This association is a subclass of NextService, and defines a " - "predecessor-successor relationship between Packet " - "SchedulingServices. In a hierarchical queuing configuration " - "(where a second scheduler treats the output of a first " - "scheduler as a single, aggregated input), the two schedulers " - "are related via the NextScheduler association." )] -class CIM_NextScheduler : CIM_NextService { - - [Override ( "PrecedingService" ), - Description ( - "The PacketSchedulingService whose output is treated as a " - "single, aggregated input by the FollowingService " - "scheduler. The [0..n] cardinality indicates that a " - "single FollowingService scheduler may bring together the " - "aggregated outputs of multiple prior schedulers." )] - CIM_PacketSchedulingService REF PrecedingService; - - [Override ( "FollowingService" ), - Max ( 1 ), - Description ( - "A scheduler that includes among its inputs the " - "aggregated outputs of one or more PrecedingService " - "schedulers." )] - CIM_PacketSchedulingService REF FollowingService; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_NextService.mof b/build/vendor/dmtf_mof/Network/CIM_NextService.mof deleted file mode 100644 index 9bfd101e..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_NextService.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_NextService -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "NextService establishes a predecessor-successor relationship " - "between two ConditioningService objects. This association is " - "used to indicate the sequence of ConditioningServices required " - "to process a particular type of traffic. \n" - "\n" - "Instances describe the various relationships between different " - "ConditioningServices (such as classifiers, meters, droppers, " - "etc.) that are used collectively to condition traffic. Both " - "one-to-one and more complicated fan-in and/or fan-out " - "relationships can be described. The Conditioning Services may " - "feed one another directly, or they may be mapped to multiple " - "\'next\' Services based on the characteristics of the packet." )] -class CIM_NextService { - - [Key, Description ( - "The preceding ConditioningService, \'earlier\' in the " - "processing sequence for a packet." )] - CIM_ConditioningService REF PrecedingService; - - [Key, Description ( - "The \'next\' or following ConditioningService." )] - CIM_ConditioningService REF FollowingService; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_NextServiceAfterClassifierElement.mof b/build/vendor/dmtf_mof/Network/CIM_NextServiceAfterClassifierElement.mof deleted file mode 100644 index 0ff692df..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_NextServiceAfterClassifierElement.mof +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_NextServiceAfterClassifierElement -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "An association used to establish a predecessor-successor " - "relationship between a single ClassifierElement (within a " - "ClassifierService) and the next ConditioningService object " - "that further processes the selected traffic. Note that the " - "cardinalities indicate that a FollowingService MUST be " - "defined, after the ClassifierElement. This is because there is " - "no reason to classify traffic unless further processing will " - "be done." )] -class CIM_NextServiceAfterClassifierElement : CIM_NextService { - - [Override ( "PrecedingService" ), - Description ( - "The ClassifierElement that selects traffic to be passed " - "to the FollowingService." )] - CIM_ClassifierElement REF PrecedingService; - - [Override ( "FollowingService" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The ConditioningService that follows the ClassifierElement." - )] - CIM_ConditioningService REF FollowingService; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_NextServiceAfterMeter.mof b/build/vendor/dmtf_mof/Network/CIM_NextServiceAfterMeter.mof deleted file mode 100644 index ac98398f..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_NextServiceAfterMeter.mof +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_NextServiceAfterMeter -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This association describes a predecessor-successor " - "relationship between a MeterService and one or more " - "ConditioningService objects that process traffic from the " - "meter. For example, for devices that implement preamble " - "marking, the FollowingService reference (after the meter) is a " - "PreambleMarkerService - to record the results of the metering " - "in the preamble. \n" - "\n" - "It might be expected that the NextServiceAfterMeter " - "association would subclass from NextService. However, meters " - "are 1:n fan-out elements, and require a mechanism to " - "distinguish between the different results/outputs of the " - "meter. Therefore, this association defines a new key property, " - "MeterResult, which is used to record the result and identify " - "the output through which this traffic left the meter." )] -class CIM_NextServiceAfterMeter { - - [Key, Description ( - "The preceding MeterService, \'earlier\' in the " - "processing sequence for a packet." )] - CIM_MeterService REF PrecedingService; - - [Key, Description ( - "The \'next\' or following ConditioningService." )] - CIM_ConditioningService REF FollowingService; - - [Key, Description ( - "Information on the result of the metering. Traffic is " - "distinguished as being conforming, non-conforming, or " - "partially conforming. More complicated metering can be " - "built either by extending the enumeration or by " - "cascading meters." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Conforming", "Partially Conforming", - "Non-Conforming" }] - uint16 MeterResult; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_NonWorkConservingSchedulingService.mof b/build/vendor/dmtf_mof/Network/CIM_NonWorkConservingSchedulingService.mof deleted file mode 100644 index b5c17137..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_NonWorkConservingSchedulingService.mof +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_NonWorkConservingSchedulingService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "A type of packet scheduler, that is capable of operating in a " - "non-work conserving manner. This class does not add any " - "properties beyond those it inherits from " - "PacketSchedulingService. It does, however, participate in one " - "additional association, FailNextScheduler." )] -class CIM_NonWorkConservingSchedulingService : CIM_PacketSchedulingService { - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_OSPFArea.mof b/build/vendor/dmtf_mof/Network/CIM_OSPFArea.mof deleted file mode 100644 index a4230e9b..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_OSPFArea.mof +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_OSPFArea -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::OSPF" ), - Description ( - "This class represents an OSPF area. The definition of an OSPF " - "area from RFC2328, is \'OSPF allows sets of networks to be " - "grouped together. Such a grouping is called an area. The " - "topology of an area is hidden from the rest of the Autonomous " - "System. This information hiding enables a significant " - "reduction in routing traffic. Also, routing within the area is " - "determined only by the area\'s own topology, lending the area " - "protection from bad routing data.\' This class has a \'Type\' " - "propery, which distinguishes between the different area types. " - "This approach was chosen, because it provides a simpler way to " - "indicate the type of an area, and additional subclassing is " - "not needed at this time." )] -class CIM_OSPFArea : CIM_RoutingProtocolDomain { - - [Description ( - "The area ID of this OSPF area, see C.2 in RFC 2328." ), - MappingStrings { "MIB.IETF|OSPF-MIB.ospfAreaId" }] - uint32 AreaID; - - [Required, Description ( "The type of the OSPF area." ), - ValueMap { "2", "3", "4" }, - Values { "Plain", "Stub", "NSSA" }] - uint16 AreaType; - - [Description ( - "When the number of non-default AS-external-LSAs in a " - "router\'s link-state database reaches this limit, the " - "router enters OverflowState, see 2.1 in RFC 1765." ), - MappingStrings { "MIB.IETF|OSPF-MIB.ospfExtLsdbLimit" }] - uint32 ExtLsdbLimit; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_OSPFAreaConfiguration.mof b/build/vendor/dmtf_mof/Network/CIM_OSPFAreaConfiguration.mof deleted file mode 100644 index 127b45bf..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_OSPFAreaConfiguration.mof +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Network::OSPF" ), - Description ( - "Each OSPF router has an association to one or more OSPF areas. " - "Into these areas, a router advertises summaries filtered by " - "specific address ranges. This would natively be modeled as a " - "ternary association (router/OSPFService to OSPFArea to " - "RangeOfIPAddresses), which is problematic in some " - "implementations. To get around this issue, the " - "OSPFAreaConfiguration class is defined to act as a focal point " - "to bring together the router (indicated as a ComputerSystem " - "with an instance of OSPFService, associated to the " - "AreaConfiguration using OSPFServiceConfiguration), the area " - "(indicated as an OSPFArea, associated to the AreaConfiguration " - "using AreaOfConfiguration) and the address ranges for " - "advertising (indicated as instances of RangeOfIPAddresses, " - "associated to the AreaConfiguration using " - "RangesOfConfiguration). There would be an instance of " - "OSPFAreaConfiguration for each connected area of a " - "router/OSPFService. \n" - "\n" - "When network administrators want to control the advertisements " - "of OSPF routers by filters, they first define the relevant " - "ranges. In order for a router to handle a range, an instance " - "of RangeOfIPAddresses MUST be associated to the relevant " - "OSPFAreaConfiguration (using the relationship, RangesOf " - "Configuration). The association between the range and area " - "configuration contains a property defining the handling " - "(EnableAdvertise) to allow or disallow advertisements in the " - "range. \n" - "\n" - "Notes: \n" - "- Because RangeOfIPAddresses is scoped by a System (via the " - "HostedCollection association), an instance of " - "RangeOfIPAddresses would be associated to an OSPFArea, " - "satisfying this semantic. \n" - "- This class is inherited from LogicalElement, because a " - "suitable subclass \'lower\' in the inheritance hiearchy does " - "not exist." )] -class CIM_OSPFAreaConfiguration : CIM_LogicalElement { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. In order to ensure uniqueness within the " - "NameSpace, the value of InstanceID SHOULD be constructed " - "using the following \'preferred\' algorithm: \n" - ": \n" - "where: \n" - " and the remainder of the InstanceID are " - "separated by a colon \':\', and where MUST " - "include a copyrighted, trademarked or otherwise unique " - "name that is owned by the business entity " - "creating/defining the InstanceID, or is a registered ID " - "that is assigned to the business entity by a recognized " - "global authority. (This is similar to the _ structure of Schema class names.) In " - "addition, to ensure uniqueness MUST NOT contain " - "a colon (\':\'). When using this algorithm, the first " - "colon to appear in InstanceID MUST appear between " - " and the . For DMTF defined " - "instances, the \'preferred\' algorithm MUST be used, and " - "the set to \'CIM\'. \n" - " and MUST " - "specify vendor-unique identifiers for the OSPFService " - "and AreaConfiguration." )] - string InstanceID; - - [Description ( - "This attribute contains the value of the default route " - "that this router advertises into a stub area, see C.2 " - "RFC 2328." ), - MappingStrings { "MIB.IETF|OSPF-MIB.ospfStubMetric" }] - uint32 StubDefaultCost; - - [Description ( - "This attribute contains the type of metric advertised as " - "a default route into a stub area, see 3. in RFC 1850." ), - ValueMap { "2", "3", "4" }, - Values { "OSPF Metric", "Comparable Cost", "NonComparable" }, - MappingStrings { "MIB.IETF|OSPF-MIB.ospfStubMetricType" }] - uint16 StubMetricType; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_OSPFLink.mof b/build/vendor/dmtf_mof/Network/CIM_OSPFLink.mof deleted file mode 100644 index bd8fb6d7..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_OSPFLink.mof +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_OSPFLink -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::OSPF" ), - Description ( - "This class is used to represent OSPF connectivity between two " - "or more OSPF protocol endpoints." )] -class CIM_OSPFLink : CIM_ConnectivityCollection { - - [Required, Description ( - "The type of the OSPF link, see section 1.2 in RFC 2328." ), - ValueMap { "2", "3", "4", "5" }, - Values { "Point-To-Point", "Point-To-Multipoint", - "Broadcast", "NBMA" }] - uint16 LinkType; - - [Description ( - "The time, in seconds, between sending OSPF Hello-packets " - "over the interface, see section C.3 in RFC 2328." ), - Units ( "Seconds" ), - MappingStrings { "MIB.IETF|OSPF-MIB.ospfIfHelloInterval" }] - uint32 HelloInterval; - - [Description ( - "After ceasing to hear a router\'s Hello-packets, the " - "number of seconds before its neighbors declare the " - "router down, see section C.3 in RFC 2328." ), - Units ( "Seconds" ), - MappingStrings { "MIB.IETF|OSPF-MIB.ospfIfRtrDeadInterval" }] - uint32 RouterDeadInterval; - - [Required, Description ( - "This parameter indicates whether IP multicast datagrams " - "should be forwarded over this OSPF link, and if so, how " - "the forwarding should be done, see section B.2 in RFC " - "1584." ), - ValueMap { "2", "3", "4" }, - Values { "Disabled", "Data-link Multicast", - "Data-link Unicast" }, - MappingStrings { "MIB.IETF|OSPF-MIB.ospfIfMulticastForwarding" }] - uint16 MulticastForwarding; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_OSPFProtocolEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_OSPFProtocolEndpoint.mof deleted file mode 100644 index 4e5a4093..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_OSPFProtocolEndpoint.mof +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_OSPFProtocolEndpoint -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::ProtocolEndpoints" ), - Description ( - "This class represents the OSPF configuration of an interface " - "running OSPF. The instance of this class should be connected " - "to an IPProtocolEndpoint instance via a BindsTo association. " - "The IPProtocolEndpoint instance is the Antecedent and the " - "OSPFProtocolEndpoint instance is the Dependent in the BindsTo " - "association." )] -class CIM_OSPFProtocolEndpoint : CIM_OSPFProtocolEndpointBase { - - [Description ( - "When two routers attached to a network both attempt to " - "become the Designated Router, the one with the highest " - "(i.e. largest) Priority takes precedence, see C.3 in RFC " - "2328. Only routers with greater than zero priority are " - "eligible to become Designated Router." ), - MappingStrings { "MIB.IETF|OSPF-MIB.ospfIfRtrPriority" }] - uint8 Priority; - - [Description ( - "If a neighbouring router on an NBMA (NonBroadcast " - "MultiAccess) link becomes inactive, it is still " - "necessary to send Hello Packets to the dead neighbor. " - "These packets will be sent at the reduced rate, which " - "should be much larger than HelloInterval, see C.5 in RFC " - "2328." ), - Units ( "Seconds" ), - MappingStrings { "MIB.IETF|OSPF-MIB.ospfIfPollInterval" }] - uint16 PollInterval; - - [Description ( - "The cost of the routes through this OSPF endpoint, see " - "C.3 in RFC 2328." ), - MappingStrings { "MIB.IETF|OSPF-MIB.ospfIfMetricStatus" }] - uint16 Cost; - - [Description ( - "Indicates whether the interface connects to an on-demand " - "circuit, see RFC 1793." ), - MappingStrings { "MIB.IETF|OSPF-MIB.ospfIfDemand" }] - boolean IfDemand; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_OSPFProtocolEndpointBase.mof b/build/vendor/dmtf_mof/Network/CIM_OSPFProtocolEndpointBase.mof deleted file mode 100644 index b4c55e89..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_OSPFProtocolEndpointBase.mof +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Correct ValueMaps for ProtocolIfTypeAdd UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_OSPFProtocolEndpointBase -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::ProtocolEndpoints" ), - Description ( - "Base class for OSPF protocol endpoints, defining several " - "general properties." )] -class CIM_OSPFProtocolEndpointBase : CIM_ProtocolEndpoint { - - [Override ( "EnabledState" ), - Description ( - "The operational status of the interface, see " - "ospfIfAdminStat in RFC 1850. This is an integer " - "enumeration whose complete definition is found in the " - "EnabledLogicalElement class." ), - MappingStrings { "MIB.IETF|OSPF-MIB.ospfIfAdminStat" }] - uint16 EnabledState; - - [Description ( - "Estimated delay, in seconds that it takes to transmit a " - "Link State Update Packet over this interface, see C.3 in " - "RFC 2328." ), - Units ( "Seconds" ), - MappingStrings { "MIB.IETF|OSPF-MIB.ospfIfTransitDelay" }] - uint16 TransitDelay; - - [Description ( - "The number of seconds between LSA (Link State " - "Advertisement) retransmissions, see C.3 in RFC 2328." ), - Units ( "Seconds" ), - MappingStrings { "MIB.IETF|OSPF-MIB.ospfIfRetransInterval" }] - uint16 RetransmitInterval; - - [Required, Description ( - "Identifies the authentication procedure to be used on " - "the attached network, see C.3 in RFC 2328." ), - ValueMap { "1", "2", "3", "4" }, - Values { "Other", "Null authentication", "Simple password", - "Cryptographic authentication" }, - MappingStrings { "MIB.IETF|OSPF-MIB.ospfIfAuthType" }] - uint16 AuthType; - - [Description ( - "Specifies the authentication procedure if the value, " - "\"Other\" (1) is set for AuthType." ), - ModelCorrespondence { "CIM_OSPFProtocolEndpoint.AuthType" }] - string OtherAuthType; - - [Description ( - "This key is used during the authentication procedure to " - "verify OSPF protocol packets, see C.3 RFC 2328. It is " - "used in the \"Simple password\" and in the " - "\"Cryptographic authentication\" case too." ), - MappingStrings { "MIB.IETF|OSPF-MIB.ospfIfAuthKey" }] - string AuthKey; - - [Override ( "ProtocolIFType" ), - Description ( - "ProtocolIFType\'s enumeration is limited to OSPF and " - "reserved values for this subclass of ProtocolEndpoint." ), - ValueMap { "1", "225..4095", "4109", "4301..32767", "32768.." }, - Values { "Other", "IANA Reserved", "OSPF", "DMTF Reserved", - "Vendor Reserved" }] - uint16 ProtocolIFType = 4109; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_OSPFService.mof b/build/vendor/dmtf_mof/Network/CIM_OSPFService.mof deleted file mode 100644 index 4b8208f9..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_OSPFService.mof +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_OSPFService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::OSPF" ), - Description ( - "This class is used to represent the basic operation of OSPF. " - "It is derived from the RouteCalculationService, the superclass " - "of all routing protocols." )] -class CIM_OSPFService : CIM_RouteCalculationService { - - [Description ( - "This attribute indicates whether this router is running " - "MOSPF (multicast enhancements to OSPF) or not, see B.1 " - "in RFC 1584. This attribute only can be true, when the " - "SupportMOSPF property in OSPFService Capabilities is " - "also true. If SupportMOSPF is false, then this property " - "has no meaning." ), - MappingStrings { "MIB.IETF|OSPF-MIB.ospfMulticastExtensions" }] - boolean RunningMOSPF; - - [Description ( - "This attribute indicates whether this router will " - "forward multicast datagrams between OSPF areas or not, " - "see B.1 in RFC 1584." ), - MappingStrings { "MIB.IETF|OSPF-MIB.ospfMulticastExtensions" }] - boolean IsInterAreaMulticastForwarder; - - [Description ( - "This attribute indicates whether this router will " - "forward multicast datagrams between Autonomous Systems " - "or not, see B.1 in RFC 1584." ), - MappingStrings { "MIB.IETF|OSPF-MIB.ospfMulticastExtensions" }] - boolean IsInterAsMulticastForwarder; - - [Description ( - "The number of seconds that, after entering " - "OverflowState, a router will attempt to leave " - "OverflowState. When set to 0, the router will not leave " - "OverflowState until restarted, see 2.1 in RFC 1765." ), - Units ( "Seconds" ), - MappingStrings { "MIB.IETF|OSPF-MIB.ospfExitOverflowInterval" }] - uint32 ExitOverflowInterval; - - [Description ( - "Controls the preference rules used in choosing among " - "multiple AS-external-LSAs advertising the same " - "destination. When set to TRUE, the preference rules " - "remain those specified by RFC 1583. When set to FALSE, " - "the preference rules are those stated in RFC 2328, which " - "prevent routing loops when AS-external-LSAs for the same " - "destination have been originated from different areas. " - "See C.1 in RFC2328." )] - boolean RFC1583Compatibility; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_OSPFServiceCapabilities.mof b/build/vendor/dmtf_mof/Network/CIM_OSPFServiceCapabilities.mof deleted file mode 100644 index 00f74e5b..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_OSPFServiceCapabilities.mof +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_OSPFServiceCapabilities -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::OSPF" ), - Description ( - "The OSPFServiceCapabilities class represents the capabilities " - "of an OSPF service." )] -class CIM_OSPFServiceCapabilities : CIM_Capabilities { - - [Description ( - "This attribute indicates whether this router supports " - "NSSA (\"not-so-stubby\") areas or not, see RFC 1587." )] - boolean SupportNSSA; - - [Description ( - "This attribute indicates whether this router supports " - "on-demand circuits or not, see RFC 1793." ), - MappingStrings { "MIB.IETF|OSPF-MIB.ospfDemandExtensions" }] - boolean SupportOnDemand; - - [Description ( - "This attribute indicates whether this router supports " - "MOSPF (multicast enhancements to OSPF) or not, see B.1 " - "in RFC 1584." ), - MappingStrings { "MIB.IETF|OSPF-MIB.ospfMulticastExtensions" }] - boolean SupportMOSPF; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_OSPFServiceConfiguration.mof b/build/vendor/dmtf_mof/Network/CIM_OSPFServiceConfiguration.mof deleted file mode 100644 index 9b9e9360..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_OSPFServiceConfiguration.mof +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_OSPFServiceConfiguration -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::OSPF" ), - Description ( - "OSPFServiceConfiguration connects an OSPF service to its area " - "configurations. The configurations are defined for the OSPF " - "Service, and so do not make sense as stand alone objects. This " - "is the reason for the Min (1), Max (1) cardinalities on " - "OSPFService. They mandate the instantiation of the service and " - "of this association for the referenced instance of " - "OSPFAreaConfiguration. The area configuration acts as a focal " - "point to bring together the router (indicated as a " - "ComputerSystem with an instance of OSPFService, associated to " - "the AreaConfiguration using this relationship), the area " - "(indicated as an OSPFArea, associated to the AreaConfiguration " - "using AreaOfConfiguration) and the address ranges for " - "advertising (indicated as instances of RangeOfIPAddresses, " - "associated to the AreaConfiguration using " - "RangesOfConfiguration). There would be an instance of " - "OSPFAreaConfiguration for each connected area of a " - "router/OSPFService." )] -class CIM_OSPFServiceConfiguration : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The OSPF service." )] - CIM_OSPFService REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The area configuration." )] - CIM_OSPFAreaConfiguration REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_OSPFVirtualInterface.mof b/build/vendor/dmtf_mof/Network/CIM_OSPFVirtualInterface.mof deleted file mode 100644 index f3a9116a..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_OSPFVirtualInterface.mof +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_OSPFVirtualInterface -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::ProtocolEndpoints" ), - Description ( - "This class represent an OSPF protocol endpoint on a virtual " - "link. The definition of a virtual link from RFC2328, is " - "\'Virtual links can be configured between any two backbone " - "routers that have an interface to a common non-backbone area. " - "Virtual links belong to the backbone. The protocol treats two " - "routers joined by a virtual link as if they were connected by " - "an unnumbered point-to-point backbone network.\'" )] -class CIM_OSPFVirtualInterface : CIM_OSPFProtocolEndpointBase { - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_OutboundVLAN.mof b/build/vendor/dmtf_mof/Network/CIM_OutboundVLAN.mof deleted file mode 100644 index 7d0c9a52..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_OutboundVLAN.mof +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_OutboundVLAN -// ================================================================== - [Association, Deprecated { "No Value" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::VLAN" ), - Description ( - "This class is deprecated in lieu or not being necessary to " - "indicate whether the VLAN is inbound/outbound This association " - "makes explicit the operational dependencies of a SwitchPort " - "when operating in a VLAN. If there is no instance of " - "OutboundVLAN between a given SwitchPort and VLAN, then any " - "packet that has been assigned to the VLAN and whose " - "destination address is associated with the port will be " - "dropped by the switch without being transmitted. Otherwise, " - "the packet will be transmitted." )] -class CIM_OutboundVLAN : CIM_SAPSAPDependency { - - [Deprecated { "No Value" }, - Override ( "Antecedent" ), - Description ( "The VLAN to which the SwitchPort is assigned." )] - CIM_VLAN REF Antecedent; - - [Deprecated { "No Value" }, - Override ( "Dependent" ), - Description ( "The SwitchPort on the VLAN." )] - CIM_SwitchPort REF Dependent; - - [Deprecated { "No Value" }, - Description ( - "If Tagged is TRUE, then the packet will be transmitted " - "in encapsulated form, tagged with the associated VLAN " - "tag. If Tagged is FALSE, the packet will be trasmitted " - "without any VLAN tag." )] - boolean Tagged; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_PacketSchedulingService.mof b/build/vendor/dmtf_mof/Network/CIM_PacketSchedulingService.mof deleted file mode 100644 index 50702d54..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_PacketSchedulingService.mof +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PacketSchedulingService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This class represents the scheduling service, which is a " - "process that determines whether a queued packet should be " - "removed from a queue and sent to an output interface. Note " - "that output interfaces can be physical network interfaces or " - "interfaces to components internal to systems, such as " - "crossbars or backplanes. In either case, if multiple queues " - "are involved, schedulers are used to provide access to the " - "interface. Each instance of a PacketSchedulingService " - "describes a scheduler from the perspective of the queues that " - "the scheduler is servicing. One can describe that different " - "schedulers support different queues, or that a scheduler " - "supports several queues. \n" - "\n" - "PacketSchedulingService is modeled as a ConditioningService so " - "that it can be aggregated into a QoSService (using the " - "QoSConditioningSubService association) to indicate that its " - "functionality underlies that QoS service. It participates in " - "the NextService association to identify a subsequent " - "ConditioningService, if any, that acts on traffic after it has " - "been processed by the scheduler." )] -class CIM_PacketSchedulingService : CIM_ConditioningService { - - [Description ( - "This property is an enumerated 16-bit unsigned integer, " - "and defines the type of scheduler. Values are: \n" - "1: Other \n" - "2: FIFO \n" - "3: Priority \n" - "4: Allocation \n" - "5: Bounded Priority \n" - "6: Weighted Round Robin Packet \n" - "If no value is specified, 2 (\"FIFO\") should be " - "assumed." ), - ValueMap { "1", "2", "3", "4", "5", "6" }, - Values { "Other", "FIFO", "Priority", "Allocation", - "Bounded Priority", "Weighted Round Robin Packet" }, - ModelCorrespondence { - "CIM_PacketSchedulingService.OtherSchedulerType" }] - uint16 SchedulerType; - - [Description ( - "This string property is used in conjunction with the " - "SchedulerType property. When the value of SchedulerType " - "is 1 (i.e., \"Other\"), then the type of scheduler to be " - "used is defined in this attribute." ), - ModelCorrespondence { - "CIM_PacketSchedulingService.SchedulerType" }] - string OtherSchedulerType; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_PeerIDPayloadFilterEntry.mof b/build/vendor/dmtf_mof/Network/CIM_PeerIDPayloadFilterEntry.mof deleted file mode 100644 index bd077ec5..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_PeerIDPayloadFilterEntry.mof +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PeerIDPayloadFilterEntry -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::Filtering" ), - Description ( - "PeerIDPayloadFilterEntry defines filters used to match the " - "Identification Type field in the ID Payload of the IKE " - "protocol exchange. It permits the specification of ID values " - "such as \"*@example.com\" or \"192.0.2.0/24\"." ), - MappingStrings { "IPSP Policy Model.IETF|PeerIDPayloadFilterEntry" }] -class CIM_PeerIDPayloadFilterEntry : CIM_FilterEntryBase { - - [Required, Description ( - "MatchIdentityType specifies the Identification Type " - "provided by the peer in the payload. The list of " - "identities was generated from Section 4.6.2.1 of " - "RFC2407. Note that the enumeration is different than the " - "RFC list, since the value \'Other\' is taken into " - "account." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "..", "0x8000.." }, - Values { "Other", "IPV4 Address", "FQDN", "User FQDN", - "IPV4 Subnet Address", "IPV6 Address", - "IPV6 Subnet Address", "IPV4 Address Range", - "IPV6 Address Range", "DER ASN1 DN", "DER ASN1 GN", - "KEY ID", "DMTF Reserved", "Vendor Reserved" }, - MappingStrings { - "IPSP Policy Model.IETF|PeerIDPayloadFilterEntry.MatchIdentityType", - "RFC2407.IETF|Section 4.6.2.1" }, - ModelCorrespondence { - "CIM_PeerIDPayloadFilterEntry.MatchIdentityValue" }] - uint16 MatchIdentityType; - - [Required, Description ( - "MatchIdentityValue is the filter value for comparison " - "with the ID payload, e,g, \"*@company.com\". The syntax " - "may need to be converted for comparison. For example, if " - "the type of identity is a DER-encoded distinguished " - "name, (for example, MatchIdentityType = 10, " - "\"DER_ASN1_DN\"), the MatchIdentityValue MUST be " - "converted into a DER-encoded string. This allows it to " - "be matched against the values extracted from the ID " - "payload at runtime. \n" - "\n" - "Note that a wildcard mechanism may be used when " - "MatchIdentityType specifies a general character string " - "(for example, if MatchIdentityType=3, \'FQDN\'). " - "MatchFieldValue may contain a wildcard character, \'*\', " - "in the pattern match specification. For example, for " - "\'FQDN\', a MatchFieldValue of \'*@example.com\' will " - "successfully match an ID payload of " - "\'janedoe@example.com\'. A wildcard can be used to " - "represent 0 or more characters as is appropriate for the " - "type specified in MatchIdentityType." ), - MappingStrings { - "IPSP Policy Model.IETF|PeerIDPayloadFilterEntry.MatchIdentityValue" }, - ModelCorrespondence { - "CIM_PeerIDPayloadFilterEntry.MatchIdentityType" }] - string MatchIdentityValue; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_PeerOfSAEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_PeerOfSAEndpoint.mof deleted file mode 100644 index 5a521ab7..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_PeerOfSAEndpoint.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PeerOfSAEndpoint -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::IPsec" ), - Description ( - "PeerOfIPsecSAEndpoint identifies the peer of the IPsecSAEndpoint." - )] -class CIM_PeerOfSAEndpoint : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The peer for the SAEndpoint." )] - CIM_RemoteServiceAccessPoint REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The IPsecSAEndpoint which has a peer." )] - CIM_IPsecSAEndpoint REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_Phase1SAUsedForPhase2.mof b/build/vendor/dmtf_mof/Network/CIM_Phase1SAUsedForPhase2.mof deleted file mode 100644 index 41b49ade..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_Phase1SAUsedForPhase2.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Phase1SAUsedForPhase2 -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::IPsec" ), - Description ( - "Phase1SAUsedForPhase2 associates a phase 1 endpoint (such as " - "an IKESAEndpoint) with an IPsecSAEndpoint that was negotiated " - "using that phase 1 Security Association." )] -class CIM_Phase1SAUsedForPhase2 : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "Phase 1 SAEndpoint that protected the negotiation of the " - "phase 2 Security Association. An example of a phase 1 " - "endpoint is an IKESAEndpoint." )] - CIM_SecurityAssociationEndpoint REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The phase 2 SAEndpoint." )] - CIM_IPsecSAEndpoint REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_PreambleFilter.mof b/build/vendor/dmtf_mof/Network/CIM_PreambleFilter.mof deleted file mode 100644 index 73cd1e4b..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_PreambleFilter.mof +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PreambleFilter -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Filtering" ), - Description ( - "PreambleFilter allows the classification of packets using " - "traffic-conditioning results (where the results are determined " - "by a PreambleMarkerService and stored in a \'packet " - "preamble\'). This permits information about the treatment that " - "a packet receives on an ingress interface to be communicated " - "along with the packet to the egress interface. An instance of " - "PreambleFilter selects packets based on a two-part string " - "(type and value pair) identifying a specific entry in the " - "preamble. The logic for this match is \'at least one.\' That " - "is, a packet with multiple entries/results in its preamble " - "matches a filter if at least one of these matches the filter." )] -class CIM_PreambleFilter : CIM_FilterEntryBase { - - [Description ( - "To foster interoperability, the basic format of the " - "information captured by a PreambleMarker is specified. " - "That information is contained in the FilterItemList " - "property (an ordered, string array). Each entry in the " - "array takes the form \'type,value\'. When entries are " - "added, they are appended to the end of the list. \n" - "\n" - "A limited set of standardized \'type\'s exist. They are: \n" - "- ConformingFromMeter, NonConformingFromMeter and " - "PartConformingFromMeter to convey metering results " - "(where the \'value\' is the name of the meter) \n" - "- VlanId to describe the traffic\'s VLAN information " - "(where the \'value\' is the VLAN ID). \n" - "An implementation is free to define and use other " - "preamble \'types\'. \n" - "\n" - "Note that a wildcard value of \"any\" is allowed to " - "indicate that the preamble entry matches for any \'value\' " - "of the specified \'type\'. For example, using the " - "wildcard, an administrator can define a filter to select " - "all packets that were found to be conforming (\'type\' = " - "\"ConformingFromMeter\") without having to name each " - "meter individually." ), - ArrayType ( "Ordered" )] - string FilterItemList[]; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_PreambleMarkerService.mof b/build/vendor/dmtf_mof/Network/CIM_PreambleMarkerService.mof deleted file mode 100644 index bd417e9b..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_PreambleMarkerService.mof +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PreambleMarkerService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "PreambleMarkerService models the storing of traffic- " - "conditioning results in a packet preamble. An instance appends " - "a two-part string of the form \',\' to the packet " - "preamble. The concept of \'type\'s is discussed more fully in " - "the Description of the class\' FilterItemList property." )] -class CIM_PreambleMarkerService : CIM_MarkerService { - - [Description ( - "To foster interoperability, the basic format of the " - "information captured by a PreambleMarker is specified. " - "That information is contained in the FilterItemList " - "property (an ordered, string array). Each entry in the " - "array takes the form \'type,value\'. When entries are " - "added, they are appended to the end of the list. \n" - "\n" - "A limited set of standardized \'type\'s exist. They are: \n" - "- ConformingFromMeter, NonConformingFromMeter and " - "PartConformingFromMeter to convey metering results " - "(where the \'value\' is the name of the meter) \n" - "- VlanId to describe the traffic\'s VLAN information " - "(where the \'value\' is the VLAN ID). \n" - "An implementation is free to define and use other " - "preamble \'types\'. \n" - "Note that a wildcard value of \"any\" is allowed to " - "indicate that the preamble entry matches for any \'value\' " - "of the specified \'type\'. For example, using the " - "wildcard, an administrator can define a filter to select " - "all packets that were found to be conforming (\'type\' = " - "\"ConformingFromMeter\") without having to name each " - "meter individually." ), - ArrayType ( "Ordered" )] - string FilterItemList[]; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_PrecedenceService.mof b/build/vendor/dmtf_mof/Network/CIM_PrecedenceService.mof deleted file mode 100644 index 8a9f4ea7..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_PrecedenceService.mof +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PrecedenceService -// ================================================================== - [Deprecated { "CIM_QoSService" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This class represents a specialization of the general concept " - "of forwarding network traffic by adding specific semantics " - "that define how traffic is forwarded based on the value of the " - "ToS byte of a packet. \n" - "\n" - "This class is used to enable DiffServ devices and non- " - "DiffServ devices to exchange traffic. This is done by defining " - "a sibling class, DiffServService, to represent devices that " - "forward traffic based on the DiffServ code point. This enables " - "the administrator to define mappings between devices that do " - "not support DiffServ (and instead use IP Precedence) and those " - "that do support DiffServ. \n" - "\n" - "PrecedenceService is deprecated since forwarding based on the " - "value of the ToS byte is specified using a FilterList, which " - "is associated with a ClassifierElement. If there is a need to " - "distinguish a higher-level set of coordinated QoS services, " - "the QoSService class can be instantiated directly." )] -class CIM_PrecedenceService : CIM_QoSService { - - [Deprecated { "CIM_IPHeadersFilter.HdrDSCP" }, - Description ( - "This property is an 8-bit unsigned integer that defines " - "the notion of precedence for different types of traffic." )] - uint8 PrecedenceValue; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_Priority8021QMarkerService.mof b/build/vendor/dmtf_mof/Network/CIM_Priority8021QMarkerService.mof deleted file mode 100644 index 97723e48..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_Priority8021QMarkerService.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Priority8021QMarkerService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "Priority8021QMarkerService marks the Priority field in an " - "802.1Q- compliant frame, with a specified value. Frames are " - "marked in order to control the conditioning that they will " - "subsequently receive. Following common practice, the value to " - "be written into the field is represented as an unsigned 8-bit " - "integer." )] -class CIM_Priority8021QMarkerService : CIM_MarkerService { - - [Description ( - "This property is an unsigned 8-bit integer, representing " - "a value to be used for marking the Priority field in the " - "802.1Q header. Since the Priority field consists of 3 " - "bits, the values for this property are limited to the " - "range 0..7. When the Priority field is marked, the " - "remaining two bits in the octet are left unchanged." ), - MinValue ( 0 ), - MaxValue ( 7 )] - uint8 PriorityValue; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_PrioritySchedulingElement.mof b/build/vendor/dmtf_mof/Network/CIM_PrioritySchedulingElement.mof deleted file mode 100644 index 5ac026ff..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_PrioritySchedulingElement.mof +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PrioritySchedulingElement -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This class is a subclass of the abstract class " - "SchedulingElement. It indicates that a scheduler is taking " - "packets from a set of inputs using the priority scheduling " - "discipline. As is the case with all subclasses of " - "SchedulingElement, the input associated with an instance of " - "PrioritySchedulingElement is of one of two types: either a " - "queue, or another scheduler. The Priority property represents " - "the priority for an input, relative to the priorities of all " - "the other inputs to which the scheduler (that aggregates this " - "PrioritySchedulingElement) is associated. Inputs to which the " - "scheduler is related via other scheduling disciplines do not " - "figure in this prioritization. Because scheduling of this type " - "is always work conserving, the inherited boolean property, " - "WorkConserving, is restricted to TRUE in this class." )] -class CIM_PrioritySchedulingElement : CIM_SchedulingElement { - - [Override ( "WorkConserving" )] - boolean WorkConserving = true; - - [Description ( - "A 16-bit unsigned integer indicating the priority level " - "of this SchedulingElement\'s input, relative to the " - "other inputs serviced by the SchedulingElement\'s " - "aggregating PacketSchedulingService. A larger value " - "represents a higher priority." )] - uint16 Priority; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_ProtocolServiceCapabilities.mof b/build/vendor/dmtf_mof/Network/CIM_ProtocolServiceCapabilities.mof deleted file mode 100644 index 6461407c..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_ProtocolServiceCapabilities.mof +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Network::Misc" ), - Description ( - "A subclass of EnabledLogicalElementCapabilities that defines " - "the capabilities of a ProtocolService. An instance of " - "CIM_ProtocolServiceCapabilities is associated with a " - "ProtocolService using ElementCapabilities." )] -class CIM_ProtocolServiceCapabilities : CIM_EnabledLogicalElementCapabilities { - - [Description ( - "MaxConnections specifies the maximum number of " - "connections supported by the protocol service." ), - MinValue ( 1 ), - MaxValue ( 65535 ), - ModelCorrespondence { "CIM_ProtocolService.MaxConnections" }] - uint16 MaxConnections = 1; - - [Description ( - "MaxListeningPorts specifies the maximum number of ports " - "on which a protocol service will listen." ), - MinValue ( 1 ), - MaxValue ( 65535 ), - ModelCorrespondence { - "CIM_ProtocolServiceCapabilities.ListeningPortManagementSupported" }] - uint16 MaxListeningPorts = 1; - - [Description ( - "ListeningPortManagementSupported indicates whether the " - "management of the ports on which the associated " - "ProtocolService listens is supported." ), - ModelCorrespondence { - "CIM_ProtocolServiceCapabilities.MaxListeningPorts" }] - boolean ListeningPortManagementSupported; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_QoSConditioningSubService.mof b/build/vendor/dmtf_mof/Network/CIM_QoSConditioningSubService.mof deleted file mode 100644 index 789ac632..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_QoSConditioningSubService.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_QoSConditioningSubService -// ================================================================== - [Association, Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "A QoSService utilizes underlying ConditioningServices as part " - "of its overall functionality. This is modeled using the " - "QoSConditioningSubService association. Note that a " - "ConditioningService may only be part of a single QoSService - " - "the cardinality on the QoSService reference is Max (1)." )] -class CIM_QoSConditioningSubService : CIM_ServiceComponent { - - [Aggregate, Override ( "GroupComponent" ), - Description ( - "This aggregation identifies the set of " - "ConditioningServices that together condition traffic for " - "a particular QoSService." )] - CIM_QoSService REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The ConditioningService." )] - CIM_ConditioningService REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_QoSService.mof b/build/vendor/dmtf_mof/Network/CIM_QoSService.mof deleted file mode 100644 index bcb00a00..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_QoSService.mof +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_QoSService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This is a concrete class that represents the ability to " - "conceptualize a QoS service as a set of coordinated " - "sub-services. This enables the network administrator to map " - "business rules to the network, and the network designer to " - "engineer the network such that it can provide different " - "functions for different traffic streams. \n" - "\n" - "This class has two main purposes. First, it serves as a common " - "base class for defining various sub-services that are needed " - "to build higher-level QoS services. Second, it serves as a way " - "to consolidate relationships between different types of QoS " - "services and different types of ConditioningServices. \n" - "\n" - "For example, Gold Service may be defined as a QoSService which " - "aggregates two other QoSServices together. Each of these " - "\'other\' QoSServices could be DiffServServices - one " - "representing the servicing of very high demand packets " - "(instantiated as a DiffServService directly), and one " - "representing the service given to most of the packets " - "(instantiated as an AFService). The high demand " - "DiffServService instance would use QoSConditioning SubService " - "to aggregate together the necessary classifiers to indicate " - "which traffic it applies to, the appropriate meters for " - "contract limits, the marker to mark the EF PHB in the packets, " - "and the queuing-related services. The AFService instance would " - "similarly use QoSConditioning SubService to aggregate its " - "classifiers, meters, the several markers used to mark the " - "different AF PHBs in the packets, and the queuing-related " - "services needed to deliver the packet treatment." )] -class CIM_QoSService : CIM_Service { - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_QoSSubService.mof b/build/vendor/dmtf_mof/Network/CIM_QoSSubService.mof deleted file mode 100644 index fd47daca..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_QoSSubService.mof +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_QoSSubService -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "The associations - QoSSubService and QoSConditioningSub " - "Service - operate in conjunction. High level QoS definitions, " - "such as \'John gets Gold Service\', map to lower level, more " - "concrete QoSServices (the subclasses of QoSService). This is " - "described by the QoSSubService association. In turn, each of " - "the SubServices may require their own conditioning. This is " - "modeled using the QoSConditioningSubService aggregation. \n" - "\n" - "Note that a more concrete QoSService may only be aggregated " - "into one higher level Service, using this association. The " - "cardinality on the GroupComponent reference is Max (1)." )] -class CIM_QoSSubService : CIM_ServiceComponent { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( - "The higher level QoSService that is constructed by " - "aggregating one or more lower-level QoSServices." )] - CIM_QoSService REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The more concrete QoSService that is used to provide the " - "higher level Service." )] - CIM_QoSService REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_QueueAllocation.mof b/build/vendor/dmtf_mof/Network/CIM_QueueAllocation.mof deleted file mode 100644 index 3da8b453..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_QueueAllocation.mof +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_QueueAllocation -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "Describes the reliance of a QueuingService on the availability " - "of space in a BufferPool." )] -class CIM_QueueAllocation : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "The BufferPool supporting packet storage for a QueuingService." - )] - CIM_BufferPool REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The QueuingService dependent on the BufferPool for storage space." - )] - CIM_QueuingService REF Dependent; - - [Description ( - "This property is an 8-bit unsigned integer representing " - "a percentage from 0 to 100. It defines the percentage of " - "the BufferPool that should be allocated to the " - "referenced QueuingService. If absolute sizes are " - "desired, this is accomplished by defining individual " - "BufferPools of the specified sizes, with " - "QueueAllocation.AllocationPercentages set to 100." ), - Units ( "Percent" ), - MinValue ( 0 ), - MaxValue ( 100 )] - uint8 AllocationPercentage; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_QueueHierarchy.mof b/build/vendor/dmtf_mof/Network/CIM_QueueHierarchy.mof deleted file mode 100644 index 72aa97ce..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_QueueHierarchy.mof +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_QueueHierarchy -// ================================================================== - [Association, Deprecated { "No value" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "Describes the reliance of a QueuingService on other, " - "supporting queues and their QueuingServices. A given Service " - "can only act in support of one QueuingService; but a higher " - "level queue may be supported by many lower level " - "QueuingServices. \n" - "\n" - "The class is deprecated since a queue only stores network " - "traffic. It does not support other queues, or manipulate their " - "entries. This type of processing is described using " - "NextService associations \'rightwards\' from the " - "QueuingService. These associations reference \'other\' " - "ConditioningServices that may send traffic to \'other\' " - "queues)." )] -class CIM_QueueHierarchy : CIM_ServiceServiceDependency { - - [Deprecated { "No value" }, - Override ( "Antecedent" ), - Description ( - "The supporting queue(s) and its QueuingService. This " - "Service can only support at most one, higher level " - "QueuingService." )] - CIM_QueuingService REF Antecedent; - - [Deprecated { "No value" }, - Override ( "Dependent" ), - Max ( 1 ), - Description ( - "The QueuingService dependent on other, supporting " - "Queuing Services." )] - CIM_QueuingService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_QueueToSchedule.mof b/build/vendor/dmtf_mof/Network/CIM_QueueToSchedule.mof deleted file mode 100644 index bfcfb575..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_QueueToSchedule.mof +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_QueueToSchedule -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This is a top-level association, representing the relationship " - "between a queue (QueuingService) and a SchedulingElement. The " - "SchedulingElement, in turn, represents the information in a " - "packet scheduling service that is specific to this queue, such " - "as relative priority or allocated bandwidth. \n" - "\n" - "Although it cannot be expressed formally with the association " - "cardinalities, there is an additional constraint on " - "participation in this association. A particular instance of (a " - "subclass of) SchedulingElement always participates either in " - "exactly one instance of this association, or in exactly one " - "instance of the association SchedulingServiceToSchedule." )] -class CIM_QueueToSchedule { - - [Key, Max ( 1 ), - Description ( - "The queue and its QueuingService from which packets are emptied." - )] - CIM_QueuingService REF Queue; - - [Key, Description ( - "The SchedulingElement for the input queue." )] - CIM_SchedulingElement REF SchedElement; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_QueuingService.mof b/build/vendor/dmtf_mof/Network/CIM_QueuingService.mof deleted file mode 100644 index dffbddef..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_QueuingService.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_QueuingService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "QueuingService represents the ability to queue network " - "traffic, and to specify the characteristics for determining " - "long-term congestion. It is modeled as a ConditioningService " - "so that it can be aggregated into a QoSService (using the " - "QoSConditioningSubService association). This indicates that " - "its functionality underlies the QoSService." )] -class CIM_QueuingService : CIM_ConditioningService { - - [Description ( - "Indicates the current depth of this queue in units " - "specified by DepthUnits. This value may be important in " - "diagnosing unexpected behavior." ), - Gauge, ModelCorrespondence { "CIM_QueuingService.DepthUnits" }] - uint32 CurrentQueueDepth; - - [Description ( - "DepthUnits is an enumerated integer that identifies the " - "units for the CurrentQueueDepth property. The values are " - "either bytes (1) or packets (2)." ), - ValueMap { "1", "2" }, - Values { "Bytes", "Packets" }] - uint16 DepthUnits; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_REDDropperService.mof b/build/vendor/dmtf_mof/Network/CIM_REDDropperService.mof deleted file mode 100644 index 23877dd8..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_REDDropperService.mof +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_REDDropperService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "REDDropperService represents the ability to drop network " - "traffic using a Random Early Detection (RED) algorithm. The " - "purpose of a RED algorithm is to avoid congestion (as opposed " - "to managing congestion). Instead of waiting for the queues to " - "fill up, and then dropping large numbers of packets, RED works " - "by monitoring average queue depth. When the queue depth " - "exceeds a minimum threshold, packets are randomly discarded. " - "These discards cause TCP to slow its transmission rate for " - "those connections that experienced the packet discards. Other " - "connections are not affected by these discards. \n" - "\n" - "A RED dropper always drops packets from a single queue, which " - "is related to the dropper as the following Service in the " - "NextService association. The queue(s) examined by the drop " - "algorithm are found by following the " - "CalculationServiceForDropper association(s) to determine the " - "dropper\'s DropThresholdCalculationService(s), and then " - "following the CalculationBasedOnQueue association to find the " - "queue being watched by each CalculationService." )] -class CIM_REDDropperService : CIM_DropperService { - - [Description ( - "This is an unsigned 32-bit integer that defines the " - "minimum average queue depth at which packets are subject " - "to being dropped. (See the ThresholdUnits property to " - "determine the units of the threshold.) The slope of the " - "drop probability function is described by the " - "Start/StopProbability properties." ), - ModelCorrespondence { "CIM_REDDropperService.ThresholdUnits" }] - uint32 MinQueueThreshold; - - [Description ( - "This is an unsigned 32-bit integer that defines the " - "maximum average queue length at which packets are " - "subject to always being dropped, regardless of the " - "dropping algorithm and probabilities being used. (See " - "the ThresholdUnits property to determine the units of " - "the threshold.)" ), - MinValue ( 0 ), - MaxValue ( 1000 ), - ModelCorrespondence { "CIM_REDDropperService.ThresholdUnits" }] - uint32 MaxQueueThreshold; - - [Description ( - "This is an unsigned 32-bit integer, used in conjunction " - "with the StopDropProbability property. The start and " - "stop probabilities define the slope of the drop " - "probability function. This function governs the rate at " - "which packets are subject to being dropped, as a " - "function of the queue length. \n" - "\n" - "This property expresses a drop probability in drops per " - "thousand packets. For example, the value 100 indicates a " - "drop probability of 100 per 1000 packets, that is, 10%. " - "Min and max values are 0 to 1000." ), - Units ( "Per Thousand Packets" ), - ModelCorrespondence { "CIM_REDDropperService.StopProbability" }] - uint32 StartProbability; - - [Description ( - "This is an unsigned 32-bit integer, used in conjunction " - "with the StartDropProbability property. The start and " - "stop probabilities define the slope of the drop " - "probability function. This function governs the rate at " - "which packets are subject to being dropped, as a " - "function of the queue length. \n" - "\n" - "This property expresses a drop probability in drops per " - "thousand packets. For example, the value 100 indicates a " - "drop probability of 100 per 1000 packets, that is, 10%. " - "Min and max values are 0 to 1000." ), - Units ( "Per Thousand Packets" ), - MinValue ( 0 ), - MaxValue ( 1000 ), - ModelCorrespondence { "CIM_REDDropperService.StartProbability" }] - uint32 StopProbability; - - [Description ( - "ThresholdUnits is an enumerated integer that identifies " - "the units for the Min and MaxQueueThreshold properties. " - "The values are either bytes (1) or packets (2)." ), - ValueMap { "1", "2" }, - Values { "Bytes", "Packets" }] - uint16 ThresholdUnits; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_RangeOfIPAddresses.mof b/build/vendor/dmtf_mof/Network/CIM_RangeOfIPAddresses.mof deleted file mode 100644 index 99e1bfa6..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_RangeOfIPAddresses.mof +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RangeOfIPAddresses -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Collections" ), - Description ( - "The class RangeOfIPAddresses represents an implicit grouping " - "(or \'pool\') of IP addresses specified by the properties, " - "Start and EndAddress. It is defined as scoped/contained by a " - "system such as an individual network element or an admin " - "domain." )] -class CIM_RangeOfIPAddresses : CIM_SystemSpecificCollection { - - [Description ( - "The starting IP address of the AddressRange, formatted " - "according to the appropriate convention as defined in " - "the AddressType property of this class (e.g., " - "171.79.6.40)." ), - ModelCorrespondence { "CIM_RangeOfIPAddresses.AddressType" }] - string StartAddress; - - [Description ( - "The ending IP address of the AddressRange, formatted " - "according to the appropriate convention as defined in " - "the AddressType property of this class (e.g., " - "171.79.6.40)." ), - ModelCorrespondence { "CIM_RangeOfIPAddresses.AddressType" }] - string EndAddress; - - [Description ( - "An enumeration that defines how the address and mask " - "properties are formatted." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "IPv4", "IPv6" }] - uint16 AddressType; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_RangesOfConfiguration.mof b/build/vendor/dmtf_mof/Network/CIM_RangesOfConfiguration.mof deleted file mode 100644 index a9ab1fc1..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_RangesOfConfiguration.mof +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RangesOfConfiguration -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::OSPF" ), - Description ( - "This association connects address ranges to the OSPF area " - "configuration. When network administrators want to control the " - "advertisements of OSPF routers by filters, they first define " - "the relevant ranges. In order for a router to handle a range, " - "an instance of RangeOfIPAddresses MUST be associated to the " - "router\'s OSPFAreaConfiguration, using this relationship. The " - "association between the range and area configuration contains " - "a property (EnableAdvertise) defining the handling - to allow " - "or disallow advertismenets in the range." )] -class CIM_RangesOfConfiguration : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "The address range that is in the OSPF area configuration." )] - CIM_RangeOfIPAddresses REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The OSPF area configuration that contains the range." )] - CIM_OSPFAreaConfiguration REF Dependent; - - [Description ( - "The address range is advertised (TRUE) or not (FALSE), " - "see C.2 in RFC 2328." )] - boolean EnableAdvertise; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_RedirectionService.mof b/build/vendor/dmtf_mof/Network/CIM_RedirectionService.mof deleted file mode 100644 index 6a6008ca..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_RedirectionService.mof +++ /dev/null @@ -1,73 +0,0 @@ -//Copyright (c) 2007 DMTF. All Rights Reserved. - [Version ( "2.17.0" ), - UMLPackagePath ( "CIM::Network::ConsoleProtocols" ), - Description ( - "RedirectionService provides the capability to manage " - "redirection services. Examples of this include any video " - "stream directed to a Network Port (by the operating system) on " - "a Computer System redirected out to a remote administrator\'s " - "console. Similarly this can include input redirected into the " - "same Network Port. Other examples include the redirection of " - "IO from a logical element to a remote or local destination. " - "Each redirection stream is accessible via a SAP. This service " - "can support multiple redirection types via multiple associated " - "SAPs." )] -class CIM_RedirectionService : CIM_Service { - - [Description ( - "An enumerated array indicating the type(s) of " - "Redirection supported by this Service. This value is set " - "to the type of redirection service that this service " - "represents. A value set to 2 = \"Text\" shall indicate a " - "Text Console Redirection service. A value set to 3 = " - "\"KVM\" shall indicate a Keyboard, Mouse and Video " - "Console Redirection service. A value set to 4 = \"USB\" " - "shall indicate a USB Redirection service. A value set to " - "5 = \"media\" shall indicate a traditional Media " - "Redirection service." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6..32767", - "32768..65535" }, - Values { "Unknown", "Other", "Text", "KVM", "USB", "Media", - "DMTF Reserved", "Vendor Specified" }, - ModelCorrespondence { - "CIM_RedirectionServiceType.OtherRedirectionServiceType" }] - uint16 RedirectionServiceType[]; - - [Description ( - "A string describing the Redirection Service when the " - "value of the RedirectionServiceType property is set to 1 " - "= \"Other\"." ), - ModelCorrespondence { - "CIM_RedirectionService.RedirectionServiceType" }] - string OtherRedirectionServiceType; - - [Description ( - "Maximum number of concurrently enabled redirection SAPs. " - "The Service may have multiple (more than this number) " - "SAPs associated with it. However, the number of Active " - "SAPs (EnabledState=Enabled) associated with this Service " - "instance cannot exceed this number. This limitation " - "could come from hardware limitations (e.g. one COM port " - "can only redirect the text to one console), or from any " - "other software resource limitations." )] - uint16 MaxCurrentEnabledSAPs; - - [Description ( - "An enumeration specifying the impact of enabling the " - "redirection of the text console flow on the original " - "destination of the flow. The original destination is " - "modeled as a concrete subclass of LogicalDevice and " - "associated to this service using a ServiceAffectsElement " - "association). If this value is Exclusive, it shall mean " - "that when the element flow is actively being redirected, " - "then the element being redirected cannot be accessed at " - "the original destination. If this value is Shared, it " - "shall mean that when the element flow is actively being " - "redirected, then the element being redirected can still " - "be accessed at the original destination." ), - ValueMap { "0", "2", "3" }, - Values { "Unknown", "Exclusive", "Shared" }] - uint16 SharingMode; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_RedirectionServiceCapabilities.mof b/build/vendor/dmtf_mof/Network/CIM_RedirectionServiceCapabilities.mof deleted file mode 100644 index 164fa8ad..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_RedirectionServiceCapabilities.mof +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Network::ConsoleProtocols" ), - Description ( - "RedirectionServiceCapabilities describes the capabilities of " - "the associated RedirectionService." )] -class CIM_RedirectionServiceCapabilities : CIM_EnabledLogicalElementCapabilities { - - [Description ( - "SharingModeSupported indicates the possible values to " - "which the SharingMode of the associated " - "RedirectionService can be set." ), - ValueMap { "0", "2", "3", ".." }, - Values { "Unknown", "Exclusive", "Shared", "DMTF Reserved" }] - uint16 SharingModeSupported[]; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_ReflectorClientService.mof b/build/vendor/dmtf_mof/Network/CIM_ReflectorClientService.mof deleted file mode 100644 index 48230d07..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_ReflectorClientService.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ReflectorClientService -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "This association will serve as the base class for handling BGP " - "routing information for clients of the reflector of this " - "Cluster." )] -class CIM_ReflectorClientService : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "The Cluster for which this Service is being defined." )] - CIM_BGPCluster REF Antecedent; - - [Override ( "Dependent" ), - Min ( 1 ), - Description ( - "The BGPService to handles routing information as a " - "client in the Cluster." )] - CIM_BGPService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_ReflectorNonClientService.mof b/build/vendor/dmtf_mof/Network/CIM_ReflectorNonClientService.mof deleted file mode 100644 index e962af2d..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_ReflectorNonClientService.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ReflectorNonClientService -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "This association will serve as the base class for handling BGP " - "routing information for the non-clients of the reflector of " - "this Cluster." )] -class CIM_ReflectorNonClientService : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "The Cluster for which this Service is being defined." )] - CIM_BGPCluster REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The BGPService which handles routing information as a " - "non-client of the Cluster." )] - CIM_BGPService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_ReflectorService.mof b/build/vendor/dmtf_mof/Network/CIM_ReflectorService.mof deleted file mode 100644 index 77604ed8..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_ReflectorService.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ReflectorService -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "This association will serve as the base class for defining and " - "distributing BGP routing information for the reflector of this " - "Cluster." )] -class CIM_ReflectorService : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "The Cluster for which this Service is being defined." )] - CIM_BGPCluster REF Antecedent; - - [Override ( "Dependent" ), - Min ( 1 ), - Description ( - "The BGPService which distributes routing information in " - "the Cluster." )] - CIM_BGPService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_RelatedSpanningTree.mof b/build/vendor/dmtf_mof/Network/CIM_RelatedSpanningTree.mof deleted file mode 100644 index 03e012b1..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_RelatedSpanningTree.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RelatedSpanningTree -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "This association identifies the spanning tree in which a " - "forwarding database (TransparentBridgingService) is nested." )] -class CIM_RelatedSpanningTree : CIM_ServiceServiceDependency { - - [Override ( "Antecedent" ), - Description ( - "The TransparentBridgingService that supports a " - "SpanningTreeService." )] - CIM_TransparentBridgingService REF Antecedent; - - [Override ( "Dependent" ), - Max ( 1 ), - Description ( - "The SpanningTree in which a TransparentBridgingService is nested." - )] - CIM_SpanningTreeService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_RelatedTransparentBridgingService.mof b/build/vendor/dmtf_mof/Network/CIM_RelatedTransparentBridgingService.mof deleted file mode 100644 index e9c939f2..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_RelatedTransparentBridgingService.mof +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RelatedTransparentBridgingService -// ================================================================== - [Association, Deprecated { "No Value" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::VLAN" ), - Description ( - "This class is deprecated as a fall out of the previous " - "deprecations within the existing model The association between " - "a VLAN and the forwarding database (some use the term " - "filtering database) used to determine which port a packet " - "should be transmitted on, given that it is assigned to the " - "VLAN and that it has a particular destination MAC address. The " - "TransparentBridgingService represents a forwarding database." )] -class CIM_RelatedTransparentBridgingService : CIM_ServiceSAPDependency { - - [Deprecated { "No Value" }, - Override ( "Antecedent" ), - Description ( "The VLAN." )] - CIM_VLAN REF Antecedent; - - [Deprecated { "No Value" }, - Override ( "Dependent" ), - Description ( - "The BridgingService that determines the port, given the " - "the VLAN and addressing information." )] - CIM_TransparentBridgingService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_RemoteAccessAvailableToElement.mof b/build/vendor/dmtf_mof/Network/CIM_RemoteAccessAvailableToElement.mof deleted file mode 100644 index ad75ccef..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_RemoteAccessAvailableToElement.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Association, Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Network::Misc" ), - Description ( - "Describes an element\'s knowledge regarding accessing other " - "(i.e., remote) Servers and Systems." )] -class CIM_RemoteAccessAvailableToElement : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The remote server or system." )] - CIM_RemoteServiceAccessPoint REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The EnabledLogicalElement which has knowledge of the " - "remote server or system." )] - CIM_EnabledLogicalElement REF Dependent; - - [Description ( - "Indicates that this access information is defined as a " - "default configuration for the system." )] - boolean IsDefault; - - [Description ( - "When an element is accessing remote services and " - "systems, it MAY be necessary to order those accesses. " - "This property defines that ordering - where lower " - "numbers indicate a higher priority for access. A value " - "of 0 (default) indicates that ordering does not apply. " - "If multiple RemoteAccessPoint instances have the same " - "value for OrderOfAccess, then these AccessPoints MAY be " - "used in any sequence defined by the implementation." )] - uint16 OrderOfAccess = 0; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_RouteCalculationService.mof b/build/vendor/dmtf_mof/Network/CIM_RouteCalculationService.mof deleted file mode 100644 index 45dd9c80..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_RouteCalculationService.mof +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RouteCalculationService -// ================================================================== - [Abstract, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::RoutingForwarding" ), - Description ( - "This is an abstract base class, derived from Service, that " - "represents the route calculation aspects of a system. This " - "class also addresses functions performed by the system when it " - "exchanges routing information. \n" - "\n" - "Examining the RouteCalculationService class definition, note " - "that its superclass NetworkService is deprecated. Therefore, " - "NetworkService\'s properties need not be implemented in an " - "instance of RouteCalculationService. Unfortunately, " - "NetworkService cannot be removed from the object hierarchy " - "without a major Schema release. When/if this occurs, the " - "NetworkService superclass will be removed, and " - "RouteCalculationService will subclass from CIM_Service " - "directly. Also note that there are a large number of " - "additional routing protocols that are not currently modeled. " - "These will be added over time." )] -class CIM_RouteCalculationService : CIM_NetworkService { - - [Description ( - "The RouterID uniquely identifies the router that is " - "performing the route calculation. It is the highest IP " - "address on the router (or the highest loopback " - "interface, if there is one)." )] - string RouterID; - - [Description ( - "This is an enumerated value that defines the routing " - "algorithm used in this route calculation." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Unknown", "RIPv1", "RIPv2", "OSPFv1", "OSPFv2", - "BGPv1", "BGPv2", "BGPv3", "BGPv4" }] - uint16 AlgorithmType; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_RouteForwardedByService.mof b/build/vendor/dmtf_mof/Network/CIM_RouteForwardedByService.mof deleted file mode 100644 index b01f38cf..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_RouteForwardedByService.mof +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RouteForwardedByService -// ================================================================== - [Association, Deprecated { "No value" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Routes" ), - Description ( - "This assocation makes explicit the next hops that are " - "forwarded by a specific ForwardingService, to reach the " - "destination. Every ForwardingService can have its own unique " - "set of routing destinations and next hops. The association is " - "deprecated since it is incorrect to mandate the existence of a " - "ForwardingService in order to define the existence of a route." )] -class CIM_RouteForwardedByService : CIM_Dependency { - - [Deprecated { "No value" }, - Override ( "Antecedent" ), - Min ( 1 ), - Description ( "The forwarding service for the route." )] - CIM_ForwardingService REF Antecedent; - - [Deprecated { "No value" }, - Override ( "Dependent" ), - Description ( "The route being forwarded." )] - CIM_NextHopRouting REF Dependent; - - [Deprecated { "CIM_NextHopRoute.AdminDistance" }, - Description ( - "This property contains the current administrative " - "distance of this route, for the ForwardingService. Note " - "that this property indicates current, specific values - " - "whereas an instance of the CIM_AdministrativeDistance " - "class defines default distances." )] - uint16 AdminDistance; - - [Deprecated { "CIM_NextHopRoute.RouteMetric" }, - Description ( - "PathMetric provides a numeric indication as to the " - "preference of this route compared to other routes that " - "reach the same destination." )] - uint16 PathMetric; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_RouteUsesEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_RouteUsesEndpoint.mof deleted file mode 100644 index 23f18a3c..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_RouteUsesEndpoint.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RouteUsesEndpoint -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Routes" ), - Description ( - "RouteUsesEndpoint depicts the relationship between a next hop " - "route and the local Endpoint that is used to transmit the " - "traffic to the \'next hop\'." )] -class CIM_RouteUsesEndpoint : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "The endpoint used to reach the route\'s destination." )] - CIM_ProtocolEndpoint REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The route using the endpoint." )] - CIM_NextHopRoute REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_RoutersInAS.mof b/build/vendor/dmtf_mof/Network/CIM_RoutersInAS.mof deleted file mode 100644 index 0c79d496..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_RoutersInAS.mof +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RoutersInAS -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::Systems" ), - Description ( - "This aggregation establishes \'whole-part\' relationships " - "between an AutonomousSystem and the routers that it contains. " - "In addition, the routers in the AS share common configuration " - "information, and are commonly administered." )] -class CIM_RoutersInAS : CIM_SystemComponent { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( - "The AutonomousSystem that aggregates the routers " - "belonging to it and administers them." )] - CIM_AutonomousSystem REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The Routers that are contained in the AS." )] - CIM_ComputerSystem REF PartComponent; - - [Description ( - "This is an array of strings that contain the BGP " - "attributes supported by this router." )] - string BGPSupportedAttributes[]; - - [Description ( - "TRUE means that the community value of this router is " - "added to the existing community value, and FALSE means " - "that the community value of this router replaces the " - "existing community value." )] - boolean AddCommunityValue; - - [Description ( - "This is an enumeration that defines the function, from " - "the point of view of BGP, of this router." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7" }, - Values { "Unknown", "Other", "Conventional BGP Speaker", - "Route Reflector", "Router Reflector Client", - "Route Reflector Non-Client", "Peer Group Member", - "Confederation Member" }] - uint16 Role; - - [Description ( - "A string describing the type of function that this " - "router has in its AS when the value of the Role property " - "of this class is set to 1 (i.e., \"Other\"). The format " - "of the string inserted in this property should be " - "similar in format to the values defined for the Role " - "property. This property should be set to NULL when the " - "Role property is any value other than 1." ), - MaxLen ( 64 )] - string OtherRoleDescription; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_RoutersInBGPCluster.mof b/build/vendor/dmtf_mof/Network/CIM_RoutersInBGPCluster.mof deleted file mode 100644 index 4de2bbf1..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_RoutersInBGPCluster.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RoutersInBGPCluster -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "This aggregation establishes the routers (ComputerSystems) in " - "a BGPCluster. At least three routers are required to form a " - "cluster - a reflector and two clients. The routers that form a " - "cluster share common configuration information." )] -class CIM_RoutersInBGPCluster : CIM_CollectedMSEs { - - [Aggregate, Override ( "Collection" ), - Max ( 1 ), - Description ( - "The Cluster that aggregates the routers participating in it." - )] - CIM_BGPCluster REF Collection; - - [Override ( "Member" ), - Min ( 3 ), - Description ( "The routers that form the Cluster." )] - CIM_ComputerSystem REF Member; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_RoutesBGP.mof b/build/vendor/dmtf_mof/Network/CIM_RoutesBGP.mof deleted file mode 100644 index 64c414f3..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_RoutesBGP.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RoutesBGP -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::BGP" ), - Description ( - "This association defines a BGP route, and makes explicit the " - "dependency between a BGPIPRoute and a BGPProtocolEndpoint." )] -class CIM_RoutesBGP : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 2 ), - Description ( - "The BGPProtocolEndpoints that represent the source and " - "destination (or at least the next hop) of the BGP route." )] - CIM_BGPProtocolEndpoint REF Antecedent; - - [Override ( "Dependent" ), - Min ( 1 ), - Description ( - "The routing table entry that represents a BGP route." )] - CIM_BGPIPRoute REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_RoutingPolicy.mof b/build/vendor/dmtf_mof/Network/CIM_RoutingPolicy.mof deleted file mode 100644 index db52a275..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_RoutingPolicy.mof +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RoutingPolicy -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::RoutingForwarding" ), - Description ( - "This class is used to implement routing policies. It " - "aggregates a set of FilterLists, along with other appropriate " - "constructs, into a unit. One of the most important uses of " - "this class is to change the routing policy by changing values " - "of various attributes in a consistent manner. \n" - "\n" - "A RoutingPolicy is weak to the network device (i.e., the " - "ComputerSystem) that contains it. Hence, the ComputerSystem " - "keys are propagated to this class. \n" - "\n" - "Note that this class was defined before the Policy Model and " - "hence is not positioned in that hierarchy. The class will be " - "repositioned in a later release of the Network Model." )] -class CIM_RoutingPolicy : CIM_LogicalElement { - - [Key, Description ( - "The scoping ComputerSystem\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_ComputerSystem.CreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The scoping ComputerSystem\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_ComputerSystem.Name" )] - string SystemName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Override ( "Name" ), - Description ( "This is the name of the Routing Policy." ), - MaxLen ( 256 )] - string Name; - - [Description ( - "This defines the type of action that will be performed " - "if the match conditions of the policy are met. The match " - "conditions are defined by the associated ListsIn " - "RoutingPolicy. There are essentially three choices: " - "forward the traffic unmodified, forward the traffic but " - "modify either the attributes describing the route and/or " - "other attributes that define how to condition the " - "traffic (e.g., its ToS byte settings), or prevent the " - "traffic from being forwarded." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9" }, - Values { "Accept As Is", - "Accept With Protocol Attribute Changes", - "Accept and Remark Packet", - "Accept With Protocol Attribute Changes and Remark", - "Accept With Other Action", - "Accept With Protocol Attribute Changes and Other Action", - "Accept with Remark and Other Action", - "Accept with Protocol Attribute Changes, Remark and Other Action", - "Deny" }] - uint16 Action; - - [Description ( - "This controls whether protocol-specific attributes " - "replace, get prepended, or get appended to their " - "existing values." ), - ValueMap { "1", "2", "3" }, - Values { "Replace", "Prepend", "Append" }, - ModelCorrespondence { "CIM_RoutingPolicy.BGPAction" }] - uint16 AttributeAction; - - [Description ( - "This defines one or more BGP-specific attributes that " - "should be used to modify this routing update." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" }, - Values { "Origin", "AS_Path", "NEXT_HOP", "Multi_Exit_Disc", - "Local_Pref", "Atomic_Aggregate", "Aggregator", - "Community", "Originator_ID", "Cluster_List" }, - ModelCorrespondence { "CIM_RoutingPolicy.BGPValue" }] - uint16 BGPAction; - - [Description ( "The value for the corresponding BGPAction." ), - ModelCorrespondence { "CIM_RoutingPolicy.BGPAction" }] - string BGPValue; - - [Description ( - "This defines a remarking action for this traffic." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7" }, - Values { "Change DSCP", "Change ToS", "Change 802.1Q Value", - "Change CIR", "Change CBR", "Change ABR", "Change VBR" }, - ModelCorrespondence { "CIM_RoutingPolicy.RemarkValue" }] - uint16 RemarkAction; - - [Description ( "The value for the corresponding RemarkAction." ), - ModelCorrespondence { "CIM_RoutingPolicy.RemarkAction" }] - string RemarkValue; - - [Description ( - "This defines another action to be taken for this traffic." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7" }, - Values { "Other", "Input Flow Policing", - "Output Flow Policing", "Input Aggregate Policing", - "Output Aggregate Policing", "Police By Marking Down", - "Police By Dropping Down" }, - ModelCorrespondence { "CIM_RoutingPolicy.ConditioningValue", - "CIM_RoutingPolicy.OtherConditioningAction" }] - uint16 ConditioningAction; - - [Description ( - "If the value of the ConditioningAction property of this " - "class is 1, this contains an application-specific type " - "of conditioning that is to be performed. Otherwise, if " - "the ConditioningAction property is any other value, the " - "value of this property should be NULL." ), - ModelCorrespondence { "CIM_RoutingPolicy.ConditioningAction" }] - string OtherConditioningAction; - - [Description ( - "The value for the corresponding ConditioningAction, if " - "appropriate." ), - ModelCorrespondence { "CIM_RoutingPolicy.ConditioningAction" }] - string ConditioningValue; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_RoutingProtocolDomain.mof b/build/vendor/dmtf_mof/Network/CIM_RoutingProtocolDomain.mof deleted file mode 100644 index b5993fc2..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_RoutingProtocolDomain.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RoutingProtocolDomain -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::RoutingForwarding" ), - Description ( - "A Routing Protocol Domain is a collection of routers which " - "coordinate their routing knowledge using a single [instance of " - "a] routing protocol. This class represents the " - "area/layer/level/zone like property of a routing protocol, " - "such as an OSPF (area), IS-IS (layer) or PNNI (level). It does " - "not represent the entire routing domain in every case. For " - "example for OSPF, it represents an Area, but in the case of " - "RIP, it represents the whole RIP domain. Any common attributes " - "of these routing domains can be placed in this class in future " - "versions of CIM." )] -class CIM_RoutingProtocolDomain : CIM_AdminDomain { - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_RoutingProtocolDomainInAS.mof b/build/vendor/dmtf_mof/Network/CIM_RoutingProtocolDomainInAS.mof deleted file mode 100644 index 97279121..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_RoutingProtocolDomainInAS.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RoutingProtocolDomainInAS -// ================================================================== - [Association, Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::RoutingForwarding" ), - Description ( - "This assocation connects an AutonomousSystem to the routing " - "domains that it contains." )] -class CIM_RoutingProtocolDomainInAS : CIM_ContainedDomain { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( "The autonomous system." )] - CIM_AutonomousSystem REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The routing domain." )] - CIM_RoutingProtocolDomain REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SAEndpointConnectionStatistics.mof b/build/vendor/dmtf_mof/Network/CIM_SAEndpointConnectionStatistics.mof deleted file mode 100644 index 370a8839..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SAEndpointConnectionStatistics.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SAEndpointConnectionStatistics -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::IPsec" ), - Description ( - "This class captures statistical and time-related information " - "about the use of the IPsec or IKE Security Associations, " - "through their IPsecSAEndpoint or IKESAEndpoint. The relevant " - "SAEndpoint is determined by traversing the " - "ElementStatisticalData association." )] -class CIM_SAEndpointConnectionStatistics : CIM_StatisticalData { - - [Description ( - "Number of bytes that have been protected by the " - "associated SAEndpoint." ), - Units ( "Bytes" ), - Counter] - uint64 ByteCount; - - [Description ( - "LastAccessed indicates when the SAEndpoint was last " - "used. This property is helpful in determining if the SA " - "(and its endpoint) will be deleted due to sitting idle." )] - datetime LastAccessed; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SAEndpointRefreshSettings.mof b/build/vendor/dmtf_mof/Network/CIM_SAEndpointRefreshSettings.mof deleted file mode 100644 index 512c6925..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SAEndpointRefreshSettings.mof +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SAEndpointRefreshSettings -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::IPsec" ), - Description ( - "SAEndpointRefreshSettings hold the refresh thresholds for the " - "SecurityAssociationEndpoint. Since these settings may change " - "for an SA, the properties are defined both in this class and " - "in SecurityAssociationEndpoint." )] -class CIM_SAEndpointRefreshSettings : CIM_SettingData { - - [Write, Description ( - "RefreshThresholdSecondsPercentage is the lifetime " - "percentage after which a new SA should be acquired, " - "before the existing SA expires." ), - Units ( "Percent" ), - MinValue ( 0 ), - MaxValue ( 100 ), - ModelCorrespondence { - "CIM_SecurityAssociationEndpoint.RefreshThresholdSecondsPercentage" }] - uint8 RefreshThresholdSecondsPercentage; - - [Write, Description ( - "RefreshThresholdKbytesPercentage is the lifetime " - "percentage of kilobytes processed, at which a new SA " - "should be acquired." ), - Units ( "Percent" ), - MinValue ( 0 ), - MaxValue ( 100 ), - ModelCorrespondence { - "CIM_SecurityAssociationEndpoint.RefreshThresholdKbytesPercentage" }] - uint8 RefreshThresholdKbytesPercentage; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SATransform.mof b/build/vendor/dmtf_mof/Network/CIM_SATransform.mof deleted file mode 100644 index e3a92728..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SATransform.mof +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SATransform -// ================================================================== - [Abstract, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::IPsec" ), - Description ( - "SATransform is the base class for the various types of " - "transforms that are in effect for an existing IPsecSAEndpoint, " - "or aggregated into phase 2 proposals used during the IPsec " - "negotiation process. This class is defined as a kind of " - "ScopedSettingData, since it describes the set of transform " - "properties that MUST be applied together, if negotiated. This " - "subclassing is different than that defined in IETF\'s IPSP " - "Policy draft - where it is subclassed from Policy. The " - "definition as SettingData is more consistent with the " - "application of the properties as a set, to the negotiated " - "Security Association. \n" - "\n" - "Note that an instance of this class is \'scoped\' or contained " - "by a System (either a ComputerSystem or AdminDomain), rather " - "than by a SecurityAssociationEndpoint. This is indicated by " - "instantiating the ScopedSetting association, and is necessary " - "since the transform data is used in IPsec negotiation policies " - "(also scoped by Systems) before ever being associated with a " - "SecurityAssociationEndpoint. The latter semantics (i.e., that " - "\'this\' transform is negotiated for \'this\' Security " - "Association) is conveyed via a subclass of ElementSettingData, " - "TransformOfSecurityAssociation." ), - MappingStrings { "IPSP Model.IETF|SATransform" }] -class CIM_SATransform : CIM_ScopedSettingData { - - [Override ( "ElementName" ), - MappingStrings { "IPSP Model.IETF|SATransform.CommonName" }] - string ElementName; - - [Description ( - "MaxLifetimeSeconds specifies the maximum time that the " - "Security Association should be considered valid after it " - "has been created. A value of 0, the default, indicates " - "that 8 hours should be used. A non-zero value indicates " - "the maximum lifetime in seconds." ), - Units ( "Seconds" ), - MappingStrings { - "IPSP Model.IETF|SATransform.MaxLifetimeSeconds" }] - uint64 MaxLifetimeSeconds = 0; - - [Description ( - "MaxLifetimeKilobytes specifies the maximum kilobyte " - "lifetime for a Security Association. Different lifetimes " - "are used, depending on the strength of the encryption " - "algorithm. A value of 0, the default, indicates that no " - "maximum should be defined. A non-zero value specifies " - "the desired kilobyte lifetime." ), - Units ( "KiloBytes" ), - MappingStrings { - "IPSP Model.IETF|SATransform.MaxLifetimeKilobytes" }] - uint64 MaxLifetimeKilobytes = 0; - - [Description ( - "VendorID identifies vendor-defined transforms. If this " - "field is empty (the default), then this is a standard " - "transform." ), - MappingStrings { "IPSP Model.IETF|SATransform.VendorID" }] - string VendorID = ""; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SCSIProtocolEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_SCSIProtocolEndpoint.mof deleted file mode 100644 index c56de0b2..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SCSIProtocolEndpoint.mof +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.11.0" ), - UMLPackagePath ( "CIM::Network::ProtocolEndpoints" ), - Description ( - "A SCSIProtocolEndpoint represents the protocol (command) " - "aspects of a logical SCSI port, independent of the " - "connection/transport. SCSIProtocolEndpoint is either directly " - "or indirectly associated to one or more instances of " - "LogicalPort (via PortImplementsEndpoint) depending on the " - "underlying transport. Indirect associations aggregate one or " - "more LogicalPorts using intermediate ProtocolEndpoints (iSCSI, " - "etc). SCSIProtocolEndpoint is also associated to a " - "SCSIProtocolController, representing the SCSI device." )] -class CIM_SCSIProtocolEndpoint : CIM_ProtocolEndpoint { - - [Override ( "Name" ), - Description ( - "The SCSI identifier for the target or initiator device, " - "in the format appropriate for the ConnectionType. If a " - "ConnectionType specific subclass is defined, the " - "subclass may override Name to define the format. For " - "other ConnectionTypes, the format (and content) should " - "match that of PermamnentAddress of the corresponding " - "LogicalPort." ), - MaxLen ( 256 ), - MappingStrings { - "SPC.INCITS-T10 |Protocol Specific Parameters | Name" }, - ModelCorrespondence { - "CIM_SCSIProtocolEndpoint.ConnectionType", - "CIM_SCSIProtocolEndpoint.OtherConnectionType" }] - string Name; - - [Description ( - "The supported connection type for this endpoint. The " - "connection type may be needed before the port(s) are " - "associated and also is used in some SCSI commands." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9" }, - Values { "Other", "Fibre Channel", "Parallel SCSI", "SSA", - "IEEE 1394", "RDMA", "iSCSI", "SAS", "ADT" }, - MappingStrings { - "SPC.INCITS-T10 | Protocol Identifier | Values" }, - ModelCorrespondence { "CIM_SCSIProtocolEndpoint.Name", - "CIM_SCSIProtocolEndpoint.OtherConnectionType" }] - uint16 ConnectionType; - - [Description ( - "For iSCSI, each SCSIProtocolEndpoint MUST act as either " - "a target or an initiator endpoint. Other transports " - "allow a SCSI PE to act as both an initiator and target " - "endpoint. This property indicates which role this " - "ProtocolEndpoint implements." ), - ValueMap { "0", "2", "3", "4" }, - Values { "Unknown", "Initiator", "Target", - "Both Initiator and Target" }] - uint16 Role; - - [Description ( - "For ports on a target device, the port number, relative " - "to the storage system. 0 is reserved by T10, 1 is port " - "A, 2 is port B, etc. These numbers are used in SCSI " - "commands that operate on target port groups." ), - MinValue ( 1 ), - MappingStrings { - "SPC.INCITS-T10 | RelativeTargetPort | IdentifierFormat" }] - uint32 TargetRelativePortNumber; - - [Description ( - "The connection type, if ConnectionType is \"Other\"." ), - ModelCorrespondence { "CIM_SCSIProtocolEndpoint.Name", - "CIM_SCSIProtocolEndpoint.ConnectionType" }] - string OtherConnectionType; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SNMPCommunityString.mof b/build/vendor/dmtf_mof/Network/CIM_SNMPCommunityString.mof deleted file mode 100644 index 843d5e51..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SNMPCommunityString.mof +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SNMPCommunityString -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::SNMP" ), - Description ( - "SNMPCommunityString is an access point for an SNMPService. " - "Each instance stores a community string that can be used for " - "making SNMP requests." )] -class CIM_SNMPCommunityString : CIM_ServiceAccessPoint { - - [Description ( - "The SNMP community string/password used for read or " - "read/write access to the agent\'s data." ), - MappingStrings { "MIB.IETF|ENTITY-MIB.entLogicalCommunity" }] - string CommunityString; - - [Description ( - "An enumerated integer describing whether read or read/ " - "write access is granted, or whether this information is " - "unknown." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "Read Only", "Read/Write" }] - uint16 TypeOfAccess; - - [Description ( - "This array contains one or more object identifiers " - "indicating the MIB modules/object subtrees that are " - "accessed using the CommunityString. Either text strings " - "of numbers (such as 1.2.3.4.5), or words (such as " - "\'system\') are specified. When using text strings of " - "numbers, an asterisk (*) can replace any subidentifier " - "to specify a subtree family - for example, 1.2.*.5. " - "Descriptions related to each entry in the array are " - "found at the corresponding index of the " - "LogicalEntitiesDescriptions property." ), - ArrayType ( "Indexed" ), - MappingStrings { "MIB.IETF|ENTITY-MIB.entLogicalType" }, - ModelCorrespondence { - "CIM_SNMPCommunityString.LogicalEntitiesDescriptions" }] - string LogicalEntitiesAccessed[]; - - [Description ( - "Free-form textual descriptions of the logical entities " - "indicated in the LogicalEntitiesAccessed array. There is " - "a correspondence between the entity identifier in the " - "LogicalEntitiesAccessed array, and the description in " - "this array at the corresponding index." ), - ArrayType ( "Indexed" ), - MappingStrings { "MIB.IETF|ENTITY-MIB.entLogicalDescr" }, - ModelCorrespondence { - "CIM_SNMPCommunityString.LogicalEntitiesAccessed" }] - string LogicalEntitiesDescriptions[]; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SNMPService.mof b/build/vendor/dmtf_mof/Network/CIM_SNMPService.mof deleted file mode 100644 index 01281f34..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SNMPService.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SNMPService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::SNMP" ), - Description ( - "SNMPService represents an SNMP agent running on a hosting " - "system. The UDP port to use to contact the agent is an " - "instance of UDPProtocolEndpoint. The endpoint is associated " - "with the SNMPService via a Dependency relationship. The " - "community string(s) to use when contacting the SNMP agent " - "reside in instances of SNMPCommunityString, that are " - "associated with the SNMPService via the ServiceAccessBySAP " - "relationship." )] -class CIM_SNMPService : CIM_Service { - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SNMPTrapTarget.mof b/build/vendor/dmtf_mof/Network/CIM_SNMPTrapTarget.mof deleted file mode 100644 index 4dee0661..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SNMPTrapTarget.mof +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SNMPTrapTarget -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::SNMP" ), - Description ( - "SNMPTrapTarget contains information describing a remote " - "system, to which Informs and Traps are sent. An SNMPService is " - "related via a ServiceSAPDependency association to one or more " - "instances of this class." )] -class CIM_SNMPTrapTarget : CIM_RemotePort { - - [Override ( "AccessInfo" ), - Description ( "The host address." )] - string AccessInfo; - - [Override ( "PortProtocol" ), - Description ( - "A UDP port to which the traps/informs are sent." )] - uint16 PortProtocol = 3; - - [Override ( "PortInfo" ), - Description ( - "The UDP port number to which the traps/informs are sent. " - "The default is port 162." )] - string PortInfo = "162"; - - [Description ( - "Allows the selection of the notification message - Traps " - "or Informs. By default, Traps are selected." ), - ValueMap { "1", "2" }, - Values { "Traps", "Informs" }] - uint16 NotificationMessage = 1; - - [Description ( - "The SNMP version used to send the traps or informs. Note " - "that v1 does not support informs." ), - ValueMap { "1", "2", "3" }, - Values { "v1", "v2C", "v3" }] - uint16 SNMPVersion; - - [Description ( - "A community string/password to send with the trap operation." - )] - string CommunityString; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SSHCapabilities.mof b/build/vendor/dmtf_mof/Network/CIM_SSHCapabilities.mof deleted file mode 100644 index 1dafc47a..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SSHCapabilities.mof +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Network::ConsoleProtocols" ), - Description ( - "A subclass of ProtocolServiceCapabilities that defines the " - "capabilities of an SSH Service. An instance of " - "CIM_SSHCapabilities is associated with an instance of " - "CIM_ProtocolService via the CIM_ElementCapabilities " - "association." )] -class CIM_SSHCapabilities : CIM_ProtocolServiceCapabilities { - - [Description ( - "An array of integers indicating the version or versions " - "of SSH protocol that the SSH service supports." ), - ValueMap { "0", "1", "2", "3", "4..32767", "32768..65535" }, - Values { "Unknown", "Other", "SSHv1", "SSHv2", - "DMTF Reserved", "Vendor Reserved" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_SSHCapabilities.OtherSupportedSSHVersion" }] - uint16 SupportedSSHVersions[]; - - [Description ( - "If the SupportedSSHVersions property is set to 1, " - "\"Other\" then free form string providing more " - "information about supported SSH protocols. If not set to " - "1, this string has no meaning." ), - ModelCorrespondence { - "CIM_SSHCapabilities.SupportedSSHVersions" }] - string OtherSupportedSSHVersion; - - [Description ( - "An array of integers indicating the encryption " - "algorithms that the SSH service supports." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7..32767", - "32768..65535" }, - Values { "Unknown", "Other", "DES", "DES3", "RC4", "IDEA", - "SKIPJACK", "DMTF Reserved", "Vendor Reserved" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_SSHCapabilities.OtherSupportedEncryptionAlgorithm" }] - uint16 SupportedEncryptionAlgorithms[]; - - [Description ( - "If the SupportedEncryptionAlgorithms property is set to " - "1, \"Other\" then free form string providing more " - "information about supported algorithms. If not set to 1, " - "this string has no meaning." ), - ModelCorrespondence { - "CIM_SSHCapabilities.SupportedEncryptionAlgorithms" }] - string OtherSupportedEncryptionAlgorithm; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SSHProtocolEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_SSHProtocolEndpoint.mof deleted file mode 100644 index 2851a919..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SSHProtocolEndpoint.mof +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Network::ConsoleProtocols" ), - Description ( - "A representation of a communications endpoint where an SSH " - "server can be accessed using the SSH protocol." )] -class CIM_SSHProtocolEndpoint : CIM_ProtocolEndpoint { - - [Write, Description ( - "An array of integers indicating the version or versions " - "of SSH protocol that are enabled for the SSH service. " - "Its possible for versions to be supported for a service " - "and not currently enabled for use." ), - ValueMap { "0", "1", "2", "3", "..", "32768..65535" }, - Values { "Unknown", "Other", "SSHv1", "SSHv2", - "DMTF Reserved", "Vendor Reserved" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_SSHProtocolEndpoint.OtherEnabledSSHVersion" }] - uint16 EnabledSSHVersions[]; - - [Description ( - "If the EnabledSSHVersions property is set to 1, \"Other\" " - "then this is a free form string providing more " - "information about the SSH protocol. If not set to 1, " - "this string has no meaning." ), - ModelCorrespondence { - "CIM_SSHProtocolEndpoint.EnabledSSHVersions" }] - string OtherEnabledSSHVersion; - - [Write, Description ( - "The version of SSH in use for this connection." ), - ValueMap { "0", "1", "2", "3", ".." }, - Values { "Unknown", "Other", "SSHv1", "SSHv2", "DMTF Reserved" }, - ModelCorrespondence { - "CIM_SSHProtocolEndpoint.OtherSSHVersion", - "CIM_SSHProtocolEndpoint.EnabledSSHVersions" }] - uint16 SSHVersion; - - [Write, Description ( - "If the SSHVersion property is set to 1, \"Other\" then " - "this is a free form string providing more information " - "about the current SSH protocol. If not set to 1, this " - "string has no meaning." ), - ModelCorrespondence { "CIM_SSHProtocolEndpoint.SSHVersion", - "CIM_SSHProtocolEndpoint.OtherEnabledSSHVersion" }] - string OtherSSHVersion; - - [Write, Description ( - "An array of integers indicating the encryption " - "algorithms that are enabled for this SSH service. Its " - "possible for an encryption algorithm to be supported by " - "an SSH service and not be enabled to be used. One of the " - "enabled algorithms will actually be in use." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", - "32768..65535" }, - Values { "Unknown", "Other", "DES", "DES3", "RC4", "IDEA", - "SKIPJACK", "DMTF Reserved", "Vendor Reserved" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_SSHProtocolEndpoint.OtherEnabledEncryptionAlgorithm" }] - uint16 EnabledEncryptionAlgorithms[]; - - [Description ( - "If the EnabledEncryptionAlgorithms property is set 1, " - "\"Other\" this property contains a free form string " - "providing more information about supported algorithms. " - "If not set to 1, this string has no meaning." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_SSHProtocolEndpoint.EnabledEncryptionAlgorithms" }] - string OtherEnabledEncryptionAlgorithm[]; - - [Write, Description ( - "The encryption algorithm currently in use for this connection." - ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", ".." }, - Values { "Unknown", "Other", "DES", "DES3", "RC4", "IDEA", - "SKIPJACK", "DMTF Reserved" }, - ModelCorrespondence { - "CIM_SSHProtocolEndpoint.OtherEncryptionAlgorithm", - "CIM_SSHProtocolEndpoint.EnabledEncryptionAlgorithms" }] - uint16 EncryptionAlgorithm; - - [Write, Description ( - "If the EncryptionAlgorithm property is set to 1, \"Other\" " - "then this is a free form string providing more " - "information about the current encryption algorithm. If " - "not set to 1, this string has no meaning." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_SSHProtocolEndpoint.EncryptionAlgorithm", - "CIM_SSHProtocolEndpoint.OtherEnabledEncryptionAlgorithm" }] - string OtherEncryptionAlgorithm[]; - - [Write, Description ( - "IdleTimeout specifies how long the connection can be " - "idle before the connection is terminated. The default " - "value, 0, indicates that there is no idle timeout " - "period." ), - Units ( "Seconds" ), - PUnit ( "second" )] - uint32 IdleTimeout = 0; - - [Write, Description ( - "If this property is true, the SSH keep alive timer is enabled." - )] - boolean KeepAlive = false; - - [Write, Description ( - "If this property is true, the SSH X11 forwarding mode is enabled." - )] - boolean ForwardX11 = false; - - [Write, Description ( - "If this property is true, SSH compression is enabled." )] - boolean Compression = true; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SSHSettingData.mof b/build/vendor/dmtf_mof/Network/CIM_SSHSettingData.mof deleted file mode 100644 index 55291700..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SSHSettingData.mof +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Network::ConsoleProtocols" ), - Description ( - "A representation of the SettingData of an SSH endpoint." )] -class CIM_SSHSettingData : CIM_SettingData { - - [Write, Description ( - "An array of integers indicating the version or versions " - "of SSH protocol that will be enabled for the SSH " - "endpoint." ), - ValueMap { "0", "1", "2", "3", "..", "32768..65535" }, - Values { "Unknown", "Other", "SSHv1", "SSHv2", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { - "CIM_SSHSettingData.OtherEnabledSSHVersion" }] - uint16 EnabledSSHVersions[]; - - [Write, Description ( - "When the EnabledSSHVersions property contains a value of " - "1, \"Other\" then this is a free form string providing " - "more information about the SSH protocol. If not set to " - "1, this string has no meaning." ), - ModelCorrespondence { "CIM_SSHSettingData.EnabledSSHVersions" }] - string OtherEnabledSSHVersion; - - [Write, Description ( - "The version of SSH that will be in use if this " - "SettingData is applied." ), - ValueMap { "0", "1", "2", "3", "..", "32768..65535" }, - Values { "Unknown", "Other", "SSHv1", "SSHv2", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_SSHSettingData.OtherSSHVersion", - "CIM_SSHSettingData.EnabledSSHVersions" }] - uint16 SSHVersion; - - [Write, Description ( - "If the CurrentSSHVersion property is set to 1, \"Other\" " - "then this is a free form string providing more " - "information about the current SSH protocol. If not set " - "to 1, this string has no meaning." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_SSHSettingData.SSHVersion", - "CIM_SSHSettingData.OtherEnabledSSHVersion" }] - string OtherSSHVersion[]; - - [Write, Description ( - "An array of integers indicating the encryption " - "algorithms that are enabled for this SSH service. Its " - "possible for an encryption algorithm to be supported and " - "not currently enabled to be used." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", - "32768..65535" }, - Values { "Unknown", "Other", "DES", "DES3", "RC4", "IDEA", - "SKIPJACK", "DMTF Reserved", "Vendor Reserved" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_SSHSettingData.OtherEnabledEncryptionAlgorithm" }] - uint16 EnabledEncryptionAlgorithms[]; - - [Write, Description ( - "If the EnabledEncryptionAlgorithms property is set 1, " - "\"Other\" this property contains a free form string " - "providing more information about supported algorithms. " - "If not set to 1, this string has no meaning." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_SSHProtocolEndpoint.EnabledEncryptionAlgorithms" }] - string OtherEnabledEncryptionAlgorithm[]; - - [Write, Description ( - "The encryption algorithm that will be in use if this " - "SettingData is applied." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", ".." }, - Values { "Unknown", "Other", "DES", "DES3", "RC4", "IDEA", - "SKIPJACK", "DMTF Reserved" }, - ModelCorrespondence { - "CIM_SSHSettingData.OtherEncryptionAlgorithm", - "CIM_SSHProtocolEndpoint.EnabledEncryptionAlgorithms" }] - uint16 EncryptionAlgorithm; - - [Write, Description ( - "If the EncryptionAlgorithm property is set 1, \"Other\" " - "then this is a free form string providing more " - "information about the encryption algorithm in use. If " - "not set to 1, this string has no meaning." ), - ModelCorrespondence { - "CIM_SSHSettingData.EncryptionAlgorithm", - "CIM_SSHSettingData.OtherEnabledEncryptionAlgorithm" }] - string OtherEncryptionAlgorithm; - - [Write, Description ( - "IdleTimeout specifies how long the connection can be " - "idle before the connection is terminated. The default " - "value, 0, indicates that there is no idle timeout " - "period." ), - Units ( "Seconds" ), - PUnit ( "second" )] - uint32 IdleTimeout = 0; - - [Write, Description ( - "If this property is true, the SSH keep alive timer is enabled." - )] - boolean KeepAlive = false; - - [Write, Description ( - "If this property is true, the SSH X11 forwarding mode is enabled." - )] - boolean ForwardX11 = false; - - [Write, Description ( - "If this property is true, SSH compression is enabled." )] - boolean Compression = true; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SchedulerUsed.mof b/build/vendor/dmtf_mof/Network/CIM_SchedulerUsed.mof deleted file mode 100644 index ce9dac50..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SchedulerUsed.mof +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SchedulerUsed -// ================================================================== - [Association, Deprecated { "CIM_QueueToSchedule", - "CIM_SchedulingServiceToSchedule" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "In order to remove queued packets, a process or Service " - "(identified as a PacketSchedulingService) runs. This " - "association describes the Dependency of the queue and its " - "QueuingService on a SchedulingService, which empties it. \n" - "\n" - "The association is deprecated in lieu of associating Queuing " - "Services to SchedulingElements, and SchedulingElements into " - "SchedulingServices. The latter approach is very flexible " - "regarding the implementations that can be modeled, and removes " - "the need to track individual traffic streams using an " - "artificial model property, TrafficClass." )] -class CIM_SchedulerUsed : CIM_ServiceServiceDependency { - - [Deprecated { "CIM_QueueToSchedule.Queue" }, - Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "The PacketSchedulingService which empties the Queuing " - "Service\'s queue." )] - CIM_PacketSchedulingService REF Antecedent; - - [Deprecated { "CIM_QueueToSchedule.SchedElement" }, - Override ( "Dependent" ), - Description ( - "The queue and its QueuingService from which packets are emptied." - )] - CIM_QueuingService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SchedulingElement.mof b/build/vendor/dmtf_mof/Network/CIM_SchedulingElement.mof deleted file mode 100644 index 54501595..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SchedulingElement.mof +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Abstract, Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "SchedulingElement represents the configuration information " - "that a PacketSchedulingService has for one of the elements " - "that it is scheduling. The scheduled element is either a " - "QueuingService or another Packet SchedulingService. \n" - "\n" - "Among the subclasses of this class, some are defined in such a " - "way that all of their instances are work conserving. Other " - "subclasses, however, have instances that either are or are not " - "work conserving. In this class, the boolean property " - "WorkConserving indicates whether an instance is or is not work " - "conserving. Note that WorkConserving is restricted to TRUE in " - "the subclasses that are inherently work conserving, since " - "instances of these classes cannot be anything else." )] -class CIM_SchedulingElement : CIM_ManagedElement { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. In order to ensure uniqueness within the " - "NameSpace, the value of InstanceID SHOULD be constructed " - "using the following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon " - "\':\', and where MUST include a copyrighted, " - "trademarked or otherwise unique name that is owned by " - "the business entity creating/defining the InstanceID, or " - "is a registered ID that is assigned to the business " - "entity by a recognized global authority. (This is " - "similar to the _ structure of " - "Schema class names.) In addition, to ensure uniqueness " - " MUST NOT contain a colon (\':\'). When using " - "this algorithm, the first colon to appear in InstanceID " - "MUST appear between and . \n" - " is chosen by the business entity and SHOULD " - "not be re-used to identify different underlying " - "(real-world) elements. If the above \'preferred\' " - "algorithm is not used, the defining entity MUST assure " - "that the resultant InstanceID is not re-used across any " - "InstanceIDs produced by this or other providers for this " - "instance\'s NameSpace. \n" - "For DMTF defined instances, the \'preferred\' algorithm " - "MUST be used with the set to \'CIM\'." )] - string InstanceID; - - [Write, Description ( - "A boolean property indicating whether the " - "PacketSchedulingService tied to this instance (by the " - "ElementInSchedulingService aggregation) is treating the " - "queue/input tied to this instance, in a work-conserving " - "manner. The queue/input is indicated by either the " - "QueueToSchedule or SchedulingServiceToSchedule " - "association. Note that this property is writeable, " - "indicating that an administrator can change the behavior " - "of the SchedulingElement - but only for those elements " - "that can operate in a non-work conserving mode." )] - boolean WorkConserving; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SchedulingServiceToSchedule.mof b/build/vendor/dmtf_mof/Network/CIM_SchedulingServiceToSchedule.mof deleted file mode 100644 index 5adf92db..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SchedulingServiceToSchedule.mof +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SchedulingServiceToSchedule -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This is a top-level association, representing the relationship " - "between a scheduler (PacketSchedulingService) and a " - "SchedulingElement, in a configuration involving cascaded " - "schedulers. The SchedulingElement, in turn, represents the " - "information in a packet scheduling service that is specific to " - "this scheduler, such as relative priority or allocated " - "bandwidth. \n" - "\n" - "Although it cannot be expressed formally with the association " - "cardinalities, there is an additional constraint on " - "participation in this association. A particular instance of (a " - "subclass of) SchedulingElement always participates either in " - "exactly one instance of this association, or in exactly one " - "instance of the association QueueToSchedule." )] -class CIM_SchedulingServiceToSchedule { - - [Key, Max ( 1 ), - Description ( "The scheduler being cascaded." )] - CIM_PacketSchedulingService REF SchedService; - - [Key, Description ( - "A SchedulingElement in the subsequent scheduler." )] - CIM_SchedulingElement REF SchedElement; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SecurityAssociationEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_SecurityAssociationEndpoint.mof deleted file mode 100644 index b3afc601..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SecurityAssociationEndpoint.mof +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SecurityAssociationEndpoint -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::IPsec" ), - Description ( - "SecurityAssociationEndpoint (SAEndpoint) represents the " - "endpoint of a secure connection. This is typically an IP " - "connection, although the model allows more flexibility than " - "just IP. The SecurityAssociationEndpoint is tied to an " - "IPProtocolEndpoint (or possibly other endpoint) using the " - "LogicalIdentity association. Note that an endpoint is defined " - "at both ends of the connection." )] -class CIM_SecurityAssociationEndpoint : CIM_ProtocolEndpoint { - - [Override ( "InstallDate" ), - Description ( - "InstallDate records when the SA (and its endpoint) was created." - )] - datetime InstallDate; - - [Description ( - "LifetimeSeconds specifies the maximum time that the SA " - "will be considered valid after it has been created. A " - "value of zero indicates that the default of 8 hours be " - "used. A non-zero value indicates the seconds lifetime." ), - Units ( "Seconds" )] - uint64 LifetimeSeconds = 0; - - [Write, Description ( - "RefreshThresholdSecondsPercentage is the lifetime " - "percentage after which a new SA should be acquired, " - "before the existing SA expires. A random period may be " - "added to a calculated threshold to reduce network " - "thrashing." ), - Units ( "Percent" ), - MinValue ( 0 ), - MaxValue ( 100 )] - uint8 RefreshThresholdSecondsPercentage; - - [Description ( - "IdleDurationSeconds specifies how long the SA can be " - "idle before it is deleted. The default value, 0, " - "indicates that there is no idle timeout period." ), - Units ( "Seconds" )] - uint64 IdleDurationSeconds = 0; - - [Description ( - "LifetimeKilobytes specifies the maximum number of " - "kilobytes of data traffic to be protected by the SA. A " - "value of zero (the default) indicates that there should " - "be no maximum kilobyte lifetime. A non-zero value " - "specifies the desired kilobyte lifetime. The SA is " - "deleted when the LifetimeKilobyte value is exceeded." ), - Units ( "KiloBytes" )] - uint64 LifetimeKilobytes = 0; - - [Write, Description ( - "RefreshThresholdKbytesPercentage is the lifetime " - "percentage of kilobytes processed, at which a new SA " - "should be acquired. A random value may be added to the " - "calculated threshold to reduce network thrashing." ), - Units ( "Percent" ), - MinValue ( 0 ), - MaxValue ( 100 )] - uint8 RefreshThresholdKbytesPercentage; - - [Write, Description ( - "PacketLoggingActive causes a log to be kept of traffic " - "processed by the SAEndpoint." )] - boolean PacketLoggingActive; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SourceRoutingService.mof b/build/vendor/dmtf_mof/Network/CIM_SourceRoutingService.mof deleted file mode 100644 index 87f794fb..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SourceRoutingService.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SourceRoutingService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "SourceRoutingService represents the capability of a switch to " - "participate in the source routing of frames received at its " - "ports. It is a system-level Service that provides and supports " - "local switching only. The SourceRouting Service is aggregated " - "into a higher level SwitchService through the " - "SwitchServiceSourceRouting association." )] -class CIM_SourceRoutingService : CIM_ForwardingService { - - [Description ( - "Indicates whether the bridge operates using older 3 bit " - "length negotiation fields or the newer 6 bit length " - "field in its RIF." ), - ValueMap { "1", "2" }, - Values { "Mode3", "Mode6" }, - MappingStrings { - "MIB.IETF|SOURCE-ROUTING-MIB.dot1dSrBridgeLfMode" }] - uint16 BridgeLfMode; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SpanningTreeService.mof b/build/vendor/dmtf_mof/Network/CIM_SpanningTreeService.mof deleted file mode 100644 index cebe9ea9..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SpanningTreeService.mof +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SpanningTreeService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "This service class represents the capability of a switch to " - "participate in the distributed construction of a spanning " - "tree." )] -class CIM_SpanningTreeService : CIM_ForwardingService { - - [Description ( - "The version of the spanning tree protocol used by the switch." - ), - ValueMap { "1", "2", "3" }, - Values { "Unknown", "DEC LB100", "IEEE 802d" }, - MappingStrings { - "MIB.IETF|BRIDGE-MIB.dot1dStpProtocolSpecification" }] - uint16 ProtocolSpec; - - [Description ( - "The format of the priority bits are the first two octets " - "of the 8-octet long Bridge ID. The other (last) 6 octets " - "of the Bridge ID are given by the value of the Bridge " - "Address. \n" - "\n" - "A priority that can be assigned to the switch for use in " - "constructing the spanning tree. The unique identifier " - "for a switch is constructed by concatenating the MAC " - "address associated with the switch for spanning tree " - "operations to the two-byte priority. Choice of the " - "priority value influences election of the root bridge." ), - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dStpPriority" }] - uint16 Priority; - - [Description ( - "MAC address used by the spanning tree service when it " - "must be uniquely identified. When concatenated with a " - "SpanningTreeService Priority, a unique bridge identifier " - "results. This property is defined for use of switches " - "supporting multiple spanning tree services. \n" - "\n" - "Note that the MAC address is formatted as twelve " - "hexadecimal digits (e.g., \"010203040506\"), with each " - "pair representing one of the six octets of the MAC " - "address in \"canonical\" bit order according to RFC " - "2469." )] - string SpanningTreeBridgeAddress; - - [Description ( - "The complete Bridge ID (Priority + MAC Address) of the " - "root bridge. The format of the priority bits are the " - "first two octets of the 8-octet long Bridge ID. Note " - "that the MAC address is formatted as twelve hexadecimal " - "digits (e.g., \"010203040506\"), with each pair " - "representing one of the six octets of the MAC address in " - "\"canonical\" bit order according to RFC 2469." ), - MaxLen ( 16 ), - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dStpDesignatedRoot" }] - string DesignatedRoot; - - [Description ( - "The cost of the path from the switch to the root." ), - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dStpRootCost" }] - uint16 RootCost; - - [Description ( - "The port number of the port having the lowest cost path " - "to the root bridge." ), - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dStpRootPort" }] - uint16 RootPort; - - [Description ( - "The current value for the maximum age of Spanning Tree " - "information before discard, as learned from the network." ), - Units ( "Hundredths of Seconds" ), - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dStpMaxAge" }] - uint32 MaxAge; - - [Description ( - "The current value of the interval between transmission " - "of bridge PDUs by the switch, on any port for which it " - "is the spanning tree root or trying to become so, as " - "learned from the network." ), - Units ( "Hundredths of Seconds" ), - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dStpHelloTime" }] - uint32 HelloTime; - - [Description ( - "The minimum interval between transmission of bridge PDUs " - "through a given port, as learned from the network." ), - Units ( "Hundredths of Seconds" ), - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dStpHoldTime" }] - uint32 HoldTime; - - [Description ( - "The time spent by a port in the listening state before " - "transitioning to the learning state, and in the learning " - "state before transitioning to the forwarding state, as " - "learned from the network. This value is also used during " - "the period of a topology change as the maximum age of " - "Spanning Tree information before discard." ), - Units ( "Hundredths of Seconds" ), - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dStpForwardDelay" }] - uint32 ForwardDelay; - - [Description ( - "The MaxAge parameter to be used by all switches in the " - "network if this switch becomes the root." ), - Units ( "Hundredths of Seconds" ), - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dStpBridgeMaxAge" }] - uint32 BridgeMaxAge; - - [Description ( - "The HelloTime parameter to be used by all switches in " - "the network if this switch becomes the root." ), - Units ( "Hundredths of Seconds" ), - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dStpBridgeHelloTime" }] - uint32 BridgeHelloTime; - - [Description ( - "The ForwardDelay parameter to be used by all switches in " - "the network if this switch becomes the root." ), - Units ( "Hundredths of Seconds" ), - MappingStrings { - "MIB.IETF|BRIDGE-MIB.dot1dStpBridgeForwardDelay" }] - uint32 BridgeForwardDelay; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SpanningTreeStatistics.mof b/build/vendor/dmtf_mof/Network/CIM_SpanningTreeStatistics.mof deleted file mode 100644 index ac430fe5..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SpanningTreeStatistics.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SpanningTreeStatistics -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "Statistical information regarding the SpanningTreeService." )] -class CIM_SpanningTreeStatistics : CIM_ServiceStatisticalInformation { - - [Description ( - "The time since the last topology change was detected by " - "the switch." ), - Units ( "Hundredths of Seconds" ), - MappingStrings { - "MIB.IETF|BRIDGE-MIB.dot1dStpTimeSinceTopologyChange" }] - uint32 TimeSinceTopologyChange; - - [Description ( - "The total number of topology changes detected by the " - "switch since the counter was last reset or initialized." ), - Counter, MappingStrings { - "MIB.IETF|BRIDGE-MIB.dot1dStpTopChanges" }] - uint32 TopChanges; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_Specific802dot1QVLANService.mof b/build/vendor/dmtf_mof/Network/CIM_Specific802dot1QVLANService.mof deleted file mode 100644 index da109b68..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_Specific802dot1QVLANService.mof +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Specific802dot1QVLANService -// ================================================================== - [Deprecated { "No Value" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::VLAN" ), - Description ( - "This class is deprecated following discussion as to the need " - "of a modeling a 802.1Q as a service. It was determined that a " - "802.1Q service was not needed. If a switch supports 802.1Q, an " - "instance of this class should be instantiated in the switch. " - "If the switch supports GVRP, this class represents the " - "function that the switch performs with respect to GVRP." )] -class CIM_Specific802dot1QVLANService : CIM_VLANService { - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_StaticForwardingEntry.mof b/build/vendor/dmtf_mof/Network/CIM_StaticForwardingEntry.mof deleted file mode 100644 index 2f3aede2..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_StaticForwardingEntry.mof +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_StaticForwardingEntry -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "A StaticForwardingEntry represents an entry in the static " - "(destination-address filtering) database associated with the " - "TransparentBridgingService. The entry is Weak to the Service " - "as specified by TransparentBridgingStatic Forwarding." )] -class CIM_StaticForwardingEntry : CIM_LogicalElement { - - [Key, Description ( "The scoping System\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.CreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The scoping System\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.Name" )] - string SystemName; - - [Key, Description ( "The scoping Service\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_Service.CreationClassName" )] - string ServiceCreationClassName; - - [Key, Description ( "The scoping Service\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_Service.Name" )] - string ServiceName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Description ( - "Destination MAC address (unicast, multicast or " - "broadcast) to which the filtering information applies. " - "Note that the MAC address is formatted as twelve " - "hexadecimal digits (e.g., \"010203040506\"), with each " - "pair representing one of the six octets of the MAC " - "address in \"canonical\" bit order according to RFC " - "2469." ), - MaxLen ( 12 ), - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dStaticAddress" }] - string MACAddress; - - [Description ( "The status of the entry." ), - ValueMap { "1", "2", "3", "4", "5" }, - Values { "Other", "Invalid", "Permanent", "DeleteOnReset", - "DeleteOnTimeout" }, - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dStaticStatus" }] - uint16 StaticStatus; - - [Description ( - "The ports to which frames with the destination MAC " - "address arriving on the port represented by the " - "SwitchPortStaticForwarding association are allowed to be " - "forwarded." )] - uint16 AllowedToGo[]; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_StaticIPAssignmentSettingData.mof b/build/vendor/dmtf_mof/Network/CIM_StaticIPAssignmentSettingData.mof deleted file mode 100644 index 094aef46..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_StaticIPAssignmentSettingData.mof +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.14.0" ), - UMLPackagePath ( "CIM::Network::IP" ), - Description ( - "CIM_StaticIPAssignmentSettingData defines a basic IP " - "configuration which could be statically assigned to an " - "IPProtocolEndpoint. This class defines a partial " - "configuration. Instances are aggregated into an instance of " - "IPAssignmentSettingData which defines a full configuration." )] -class CIM_StaticIPAssignmentSettingData : CIM_IPAssignmentSettingData { - - [Override ( "AddressOrigin" ), - Description ( - "AddressOrigin identifies the method by which the IP " - "Address, Subnet Mask, and Gateway were assigned to the " - "IPProtocolEndpoint. A value of 2 indicates that the " - "application of the IPAssignmentSettingData instance does " - "not affect these properties." ), - ValueMap { "0..2", "3", "4..32767", "32768.." }, - Values { "DMTF Reserved", "Static", "DMTF Reserved", - "Vendor Reserved" }] - uint16 AddressOrigin = 3; - - [Write, Description ( - "The IPv4 address that will be assigned to the ProtocolEndpoint." - )] - string IPv4Address; - - [Write, Description ( - "The subnet mask for the IPv4 address of this " - "ProtocolEndpoint, if one is defined." )] - string SubnetMask; - - [Write, Description ( - "The IP v4 address of the default gateway." )] - string GatewayIPv4Address; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SwitchPort.mof b/build/vendor/dmtf_mof/Network/CIM_SwitchPort.mof deleted file mode 100644 index c80a9540..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SwitchPort.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SwitchPort -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::ProtocolEndpoints" ), - Description ( - "Switch Port from which frames are received and out which they " - "are transmitted. This endpoint is associated with its " - "networking interface (such as Ethernet) via the " - "EndpointIdentity relationship." )] -class CIM_SwitchPort : CIM_ProtocolEndpoint { - - [Description ( "Numeric identifier for a switch port." ), - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dPort" }] - uint16 PortNumber; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SwitchPortDynamicForwarding.mof b/build/vendor/dmtf_mof/Network/CIM_SwitchPortDynamicForwarding.mof deleted file mode 100644 index 90a8cc31..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SwitchPortDynamicForwarding.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SwitchPortDynamicForwarding -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "This association links a DynamicForwardingEntry and the " - "SwitchPort to which the entry applies." )] -class CIM_SwitchPortDynamicForwarding : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Description ( "The SwitchPort." )] - CIM_SwitchPort REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "DynamicForwardingEntry of the forwarding database." )] - CIM_DynamicForwardingEntry REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SwitchPortPair.mof b/build/vendor/dmtf_mof/Network/CIM_SwitchPortPair.mof deleted file mode 100644 index a1a2592e..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SwitchPortPair.mof +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SwitchPortPair -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "This association represents information regarding port " - "pairings that is used by the SourceRoutingService of a switch." )] -class CIM_SwitchPortPair : CIM_SAPSAPDependency { - - [Override ( "Antecedent" ), - Description ( "The lower numbered port." )] - CIM_SwitchPort REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The higher numbered port." )] - CIM_SwitchPort REF Dependent; - - [Description ( - "A bridge number that uniquely identifies the path " - "provided by this source routing bridge between the " - "segments connected to high and low ports. The purpose of " - "bridge number is to disambiguate between multiple paths " - "connecting the same two LANs." ), - MappingStrings { - "MIB.IETF|SOURCE-ROUTING-MIB.dot1dPortPairBridgeNum" }] - uint16 BridgeNum; - - [Description ( - "The state of the pairing. Writing \'invalid(3)\' to this " - "property removes the association instance." ), - ValueMap { "1", "2", "3" }, - Values { "Enabled", "Disabled", "Invalid" }, - MappingStrings { - "MIB.IETF|SOURCE-ROUTING-MIB.dot1dPortPairBridgeState" }] - uint16 BridgeState; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SwitchPortSourceRouting.mof b/build/vendor/dmtf_mof/Network/CIM_SwitchPortSourceRouting.mof deleted file mode 100644 index 96abe9e4..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SwitchPortSourceRouting.mof +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SwitchPortSourceRouting -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "A switch capable of source routing maintains source-routing " - "specific information about each port. This association " - "represents that information." )] -class CIM_SwitchPortSourceRouting : CIM_ServiceSAPDependency { - - [Override ( "Antecedent" ), - Description ( "The SwitchPort." )] - CIM_SwitchPort REF Antecedent; - - [Override ( "Dependent" ), - Max ( 1 ), - Description ( "The SourceRoutingService." )] - CIM_SourceRoutingService REF Dependent; - - [Description ( - "The maximum number of routing descriptors allowed in an " - "All Paths or Spanning Tree Explorer frames." ), - MappingStrings { - "MIB.IETF|SOURCE-ROUTING-MIB.dot1dSrPortHopCount" }] - uint16 HopCount; - - [Description ( - "The segment number that uniquely identifies the segment " - "to which this port is connected. Current source routing " - "protocols limit this value to the range: 0 through 4095. " - "(The value 0 is used by some management applications for " - "special test cases.) A value of 65535 signifies that no " - "segment number is assigned to this port." ), - MappingStrings { - "MIB.IETF|SOURCE-ROUTING-MIB.dot1dSrPortLocalSegment" }] - uint16 LocalSegment; - - [Description ( - "A bridge number uniquely identifies a bridge when more " - "than one bridge is used to span the same two segments. " - "Current source routing protocols limit this value to the " - "range: 0 through 15. A value of 65535 signifies that no " - "bridge number is assigned to this bridge." ), - MappingStrings { - "MIB.IETF|SOURCE-ROUTING-MIB.dot1dSrPortBridgeNum" }] - uint16 BridgeNum; - - [Description ( - "The segment number that corresponds to the target " - "segment to which this port is considered connected. " - "Current source routing protocols limit this value to the " - "range: 0 through 4095. (The value 0 is used by some " - "management applications for special test cases.) A value " - "of 65535 signifies that no target segment is assigned to " - "this port." ), - MappingStrings { - "MIB.IETF|SOURCE-ROUTING-MIB.dot1dSrPortTargetSegment" }] - uint16 TargetSegment; - - [Description ( - "Determines how the port behaves when presented with a " - "Spanning Tree Explorer frame. The value \'disabled(2)\' " - "indicates that the port will not accept or send Spanning " - "Tree Explorer packets; any STE packets received will be " - "silently discarded. The value \'forced(3)\' indicates " - "the port will always accept and propagate Spanning Tree " - "Explorer frames. (This allows a manually configured " - "Spanning Tree for this class of packet to be " - "configured.) Note that unlike transparent bridging, it " - "is not catastrophic to the network if there are loops. " - "The value \'auto-span(1)\' can only be returned by a " - "bridge that both implements the Spanning Tree Protocol " - "and has use of the protocol enabled on this port. \n" - "\n" - "The behavior of the port for Spanning Tree Explorer " - "frames is determined by the value of the State property " - "of the SwitchPortSpanningTree association for the port. " - "If the port is in the \'forwarding\' state, the frame " - "will be accepted or propagated. Otherwise, it will be " - "silently discarded." ), - ValueMap { "1", "2", "3" }, - Values { "Auto-Span", "Disabled", "Forced" }, - MappingStrings { - "MIB.IETF|SOURCE-ROUTING-MIB.dot1dSrPortSTESpanMod" }, - ModelCorrespondence { "CIM_SwitchPortSpanningTree.State" }] - uint16 STESpanMode; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SwitchPortSourceRoutingStatistics.mof b/build/vendor/dmtf_mof/Network/CIM_SwitchPortSourceRoutingStatistics.mof deleted file mode 100644 index f8a38b92..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SwitchPortSourceRoutingStatistics.mof +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SwitchPortSourceRoutingStatistics -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "Statistical information regarding a SwitchPort supporting " - "source routing." )] -class CIM_SwitchPortSourceRoutingStatistics : CIM_SAPStatisticalInformation { - - [Description ( - "The number of Specifically Routed frames, also referred " - "to as Source Routed Frames, that have been received from " - "the segment attached to the port." ), - Counter, MappingStrings { - "MIB.IETF|SOURCE-ROUTING-MIB.dot1dSrPortSpecInFrames" }] - uint32 SpecInFrames; - - [Description ( - "The number of Specifically Routed frames, also referred " - "to as Source Routed Frames, that the port has " - "transmitted on its segment." ), - Counter, MappingStrings { - "MIB.IETF|SOURCE-ROUTING-MIB.dot1dSrPortSpecOutFrames" }] - uint32 SpecOutFrames; - - [Description ( - "The number of All Paths Explorer frames, also referred " - "to as All Routes Explorer frames, that have been " - "received by the port from its segment." ), - Counter, MappingStrings { - "MIB.IETF|SOURCE-ROUTING-MIB.dot1dSrPortApeInFrames" }] - uint32 ApeInFrames; - - [Description ( - "The number of all Paths Explorer Frames, also referred " - "to as All Routes Explorer frames, that have been " - "transmitted by the port on its segment." ), - Counter, MappingStrings { - "MIB.IETF|SOURCE-ROUTING-MIB.dot1dSrPortApeOutFrames" }] - uint32 ApeOutFrames; - - [Description ( - "The number of spanning tree explorer frames that have " - "been received by the port from its segment." ), - Counter, MappingStrings { - "MIB.IETF|SOURCE-ROUTING-MIB.dot1dSrPortSteInFrames" }] - uint32 SteInFrames; - - [Description ( - "The number of spanning tree explorer frames that have " - "been transmitted by the port on its segment." ), - Counter, MappingStrings { - "MIB.IETF|SOURCE-ROUTING-MIB.dot1dSrPortSteOutFrames" }] - uint32 SteOutFrames; - - [Description ( - "The number of explorer frames that have been discarded " - "by the port because the routing descriptor field " - "contained an invalid adjacent segment value." ), - Counter, MappingStrings { - "MIB.IETF|SOURCE-ROUTING-MIB.dot1dSrPortSegmentMismatchDiscards" }] - uint32 SegmentMismatchDiscards; - - [Description ( - "The number of frames that have been discarded by the " - "port because the routing descriptor field contained a " - "duplicate segment identifier." ), - Counter, MappingStrings { - "MIB.IETF|SOURCE-ROUTING-MIB.dot1dSrPortDuplicateSegmentDiscards" }] - uint32 DuplicateSegmentDiscards; - - [Description ( - "The number of explorer frames that have been discarded " - "by the port because the Routing Information Field has " - "exceeded the maximum route descriptor length." ), - Counter, MappingStrings { - "MIB.IETF|SOURCE-ROUTING-MIB.dot1dSrPortHopCountExceedsDiscards" }] - uint32 HopCountExceedsDiscards; - - [Description ( - "The number of duplicate LAN IDs or Tree errors. This " - "helps in detection of problems in networks containing " - "older Source Routing Bridges." ), - Counter, MappingStrings { - "MIB.IETF|SOURCE-ROUTING-MIB.dot1dSrPortDupLanIdOrTreeErrors" }] - uint32 DupLanIdOrTreeErrors; - - [Description ( - "The number of ARE and STE frames that were discarded " - "because the last LAN ID in the routing information field " - "did not equal the LAN-in ID. This error can occur in " - "implementations which do only a LAN-in ID and Bridge " - "Number check instead of a LAN-in ID, Bridge Number, and " - "LAN-out ID check before they forward broadcast frames." ), - Counter, MappingStrings { - "MIB.IETF|SOURCE-ROUTING-MIB.dot1dSrPortLanIdMismatches" }] - uint32 LanIdMismatches; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SwitchPortSpanningTree.mof b/build/vendor/dmtf_mof/Network/CIM_SwitchPortSpanningTree.mof deleted file mode 100644 index 1ee966b3..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SwitchPortSpanningTree.mof +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SwitchPortSpanningTree -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "A switch participating in the spanning tree maintains " - "spanning-tree specific information about each port whose " - "forwarding is determined by the spanning tree. This " - "association represents that information." )] -class CIM_SwitchPortSpanningTree : CIM_ServiceSAPDependency { - - [Override ( "Antecedent" ), - Description ( "The SwitchPort." )] - CIM_SwitchPort REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The SpanningTreeService." )] - CIM_SpanningTreeService REF Dependent; - - [Description ( - "The priority assigned to the port. Contained in the " - "first octet of the two-octet port ID; the other octet is " - "the port number." ), - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dStpPortPriority" }] - uint8 Priority; - - [Description ( - "The current state of the port as determined by the " - "spanning tree protocol." ), - ValueMap { "1", "2", "3", "4", "5", "6" }, - Values { "Disabled", "Blocking", "Listening", "Learning", - "Forwarding", "Broken" }, - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dStpPortState" }] - uint16 State; - - [Deprecated { "CIM_EnabledLogicalElement.EnabledState" }, - Description ( - "The enabled/disabled status of the port. This property " - "is deprecated since the status of the port is available " - "by inheritance from EnabledLogicalElement." ), - ValueMap { "1", "2" }, - Values { "Enabled", "Disabled" }, - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dStpPortEnable" }] - uint16 Enable; - - [Description ( - "The contribution of this port to the path cost of paths " - "towards the spanning tree root which include this port." ), - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dStpPortPathCost" }] - uint16 PathCost; - - [Description ( - "The bridge identifier of the root bridge for the segment " - "to which the port is attached, as transmitted by the " - "designated bridge for the segment." ), - MappingStrings { - "MIB.IETF|BRIDGE-MIB.dot1dStpPortDesignatedRoot" }] - string DesignatedRoot; - - [Description ( - "The cost of the path to the root offered by the " - "designated bridge for the segment." ), - MappingStrings { - "MIB.IETF|BRIDGE-MIB.dot1dStpPortDesignatedCost" }] - uint16 DesignatedCost; - - [Description ( - "The bridge identifier of the designated bridge for the " - "segment to which the port is attached." ), - MappingStrings { - "MIB.IETF|BRIDGE-MIB.dot1dStpPortDesignatedBridge" }] - string DesignatedBridge; - - [Description ( - "The port identifier of the port on the designated bridge " - "serving the segment to which the port is attached." ), - MappingStrings { - "MIB.IETF|BRIDGE-MIB.dot1dStpPortDesignatedPort" }] - uint16 DesignatedPort; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SwitchPortSpanningTreeStatistics.mof b/build/vendor/dmtf_mof/Network/CIM_SwitchPortSpanningTreeStatistics.mof deleted file mode 100644 index 849f957e..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SwitchPortSpanningTreeStatistics.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SwitchPortSpanningTreeStatistics -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "Statistical information regarding a SwitchPort participating " - "in the spanning tree." )] -class CIM_SwitchPortSpanningTreeStatistics : CIM_SAPStatisticalInformation { - - [Description ( - "The number of times the port has transitioned from the " - "Learning state to the Forwarding state." ), - Counter, MappingStrings { - "MIB.IETF|BRIDGE-MIB.dot1dStpPortForwardTransitions" }] - uint32 ForwardTransitions; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SwitchPortStaticForwarding.mof b/build/vendor/dmtf_mof/Network/CIM_SwitchPortStaticForwarding.mof deleted file mode 100644 index 57ffdcb1..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SwitchPortStaticForwarding.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SwitchPortStaticForwarding -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "This association links a static database entry and the " - "SwitchPort to which the entry applies." )] -class CIM_SwitchPortStaticForwarding : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Description ( "The SwitchPort." )] - CIM_SwitchPort REF Antecedent; - - [Override ( "Dependent" ), - Description ( "StaticForwardingEntry of static database." )] - CIM_StaticForwardingEntry REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SwitchPortStatistics.mof b/build/vendor/dmtf_mof/Network/CIM_SwitchPortStatistics.mof deleted file mode 100644 index bd615a95..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SwitchPortStatistics.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SwitchPortStatistics -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "Statistical information regarding a generic SwitchPort, " - "independent of the specific kind of switching done on frames " - "arriving at the port." )] -class CIM_SwitchPortStatistics : CIM_SAPStatisticalInformation { - - [Description ( - "The number of frames discarded by this port due to " - "excessive transit delay through the bridge." ), - Counter, MappingStrings { - "MIB.IETF|BRIDGE-MIB.dot1dBasePortDelayExceededDiscards" }] - uint32 DelayExceededDiscards; - - [Description ( - "The number of frames discarded by this port due to an " - "excessive size." ), - Counter, MappingStrings { - "MIB.IETF|BRIDGE-MIB.dot1dBasePortMtuExceededDiscards" }] - uint32 MtuExceededDiscards; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SwitchPortTransparentBridgingStatistics.mof b/build/vendor/dmtf_mof/Network/CIM_SwitchPortTransparentBridgingStatistics.mof deleted file mode 100644 index 0580d2b0..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SwitchPortTransparentBridgingStatistics.mof +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SwitchPortTransparentBridgingStatistics -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "Statistical information regarding a SwitchPort, at which " - "transparent bridging is performed." )] -class CIM_SwitchPortTransparentBridgingStatistics : CIM_SAPStatisticalInformation { - - [Description ( - "The number of frames that have been received by the port " - "from its segment. Note that a frame is only counted if " - "and only if it is for a protocol being processed by the " - "local bridging function, including bridge management " - "frames." ), - Counter, MappingStrings { - "MIB.IETF|BRIDGE-MIB.dot1dTpPortInFrames" }] - uint32 InFrames; - - [Description ( - "The number of frames that have been transmitted by the " - "port to its segment. Note that a frame is only counted " - "if and only if it is for a protocol being processed by " - "the local bridging function, including bridge management " - "frames." ), - Counter, MappingStrings { - "MIB.IETF|BRIDGE-MIB.dot1dTpPortOutFrames" }] - uint32 OutFrames; - - [Description ( - "Count of valid frames received which were discarded " - "(i.e., filtered) by the forwarding process." ), - Counter, MappingStrings { - "MIB.IETF|BRIDGE-MIB.dot1dTpPortInDiscards" }] - uint32 InDiscards; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SwitchService.mof b/build/vendor/dmtf_mof/Network/CIM_SwitchService.mof deleted file mode 100644 index 03f59721..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SwitchService.mof +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SwitchService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "Generic switch (bridging) service class. Additional switching " - "functions are incorporated as subordinate services related to " - "this class via ServiceComponent associations." )] -class CIM_SwitchService : CIM_ForwardingService { - - [Description ( - "Address used by this SwitchService when it must be " - "uniquely identified. For an ethernet bridge, the MAC " - "Address serves as the BridgeAddress. When concatenated " - "with a SpanningTreeService Priority, a unique bridge " - "identifier results. The MAC address is formatted as " - "twelve hexadecimal digits (e.g., \"010203040506\"), with " - "each pair representing one of the six octets of the MAC " - "address in \"canonical\" bit order according to RFC " - "2469. In other scenarios, like Ipv6, the address is " - "formatted as \"ffff:ffff:ffff:ffff\"." ), - MaxLen ( 32 ), - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dBaseBridgeAddress" }, - ModelCorrespondence { "CIM_SwitchService.BridgeAddressType" }] - string BridgeAddress; - - [Description ( - "The number of switch ports controlled by this switching service." - ), - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dBaseNumPorts" }] - uint16 NumPorts; - - [Description ( - "Indicates what type of switching service can be performed." - ), - ValueMap { "1", "2", "3", "4" }, - Values { "Unknown", "Transparent-only", "SourceRoute-only", - "SRT" }, - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dBaseType" }] - uint8 BridgeType; - - [Description ( - "BridgeAddressType defines the type of addressing scheme " - "used for this Bridge and its BridgeAddress property." ), - ValueMap { "1", "2", "3", "4", "5" }, - Values { "Other", "IPv4", "IPv6", "MAC", - "MAC + Spanning Tree Priority" }, - ModelCorrespondence { "CIM_SwitchService.BridgeAddress" }] - uint16 BridgeAddressType; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SwitchServiceSourceRouting.mof b/build/vendor/dmtf_mof/Network/CIM_SwitchServiceSourceRouting.mof deleted file mode 100644 index 763ba064..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SwitchServiceSourceRouting.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SwitchServiceSourceRouting -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "An association linking SwitchService to a component " - "SourceRoutingService. The cardinality of the " - "SourceRoutingService is 0..1 for a VLAN-unaware switch." )] -class CIM_SwitchServiceSourceRouting : CIM_ServiceComponent { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Description ( "The parent SwitchService." )] - CIM_SwitchService REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The component SourceRoutingService." )] - CIM_SourceRoutingService REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SwitchServiceSpanningTree.mof b/build/vendor/dmtf_mof/Network/CIM_SwitchServiceSpanningTree.mof deleted file mode 100644 index 9aa404fe..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SwitchServiceSpanningTree.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SwitchServiceSpanningTree -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "An association linking SwitchService to a component " - "SpanningTreeService. The cardinality of the " - "SpanningTreeService is 0..1 for a VLAN-unaware switch." )] -class CIM_SwitchServiceSpanningTree : CIM_ServiceComponent { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Description ( "The parent SwitchService." )] - CIM_SwitchService REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The component SpanningTreeService." )] - CIM_SpanningTreeService REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SwitchServiceTransparentBridging.mof b/build/vendor/dmtf_mof/Network/CIM_SwitchServiceTransparentBridging.mof deleted file mode 100644 index cd68d342..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SwitchServiceTransparentBridging.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SwitchServiceTransparentBridging -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "An association linking a SwitchService to a component " - "TransparentBridgingService. The cardinality of the " - "TransparentBridgingService is 0..1 for a VLAN-unaware switch." )] -class CIM_SwitchServiceTransparentBridging : CIM_ServiceComponent { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Description ( "The parent SwitchService." )] - CIM_SwitchService REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The component BridgingService." )] - CIM_TransparentBridgingService REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SwitchServiceVLAN.mof b/build/vendor/dmtf_mof/Network/CIM_SwitchServiceVLAN.mof deleted file mode 100644 index b34ed533..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SwitchServiceVLAN.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SwitchServiceVLAN -// ================================================================== - [Association, Deprecated { "No Value" }, - Aggregation, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::VLAN" ), - Description ( - "This class is deprecated as a fall out of the previous " - "deprecations within the existing model An association linking " - "SwitchService to a component VLANService." )] -class CIM_SwitchServiceVLAN : CIM_ServiceComponent { - - [Deprecated { "No Value" }, - Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The SwitchService containing the VLANService." )] - CIM_SwitchService REF GroupComponent; - - [Deprecated { "No Value" }, - Override ( "PartComponent" ), - Description ( - "The VLANService that is a component of the SwitchService." )] - CIM_VLANService REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_Switchable.mof b/build/vendor/dmtf_mof/Network/CIM_Switchable.mof deleted file mode 100644 index 38289237..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_Switchable.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Switchable -// ================================================================== - [Association, Deprecated { "CIM_EndpointIdentity" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "A switch port has a LANEndpoint that is exposed via this " - "relationship. The associaiton is deprecated since a binding is " - "not the correct relationship. The SwitchPort is simply another " - "aspect of the LANEndpoint - which is indicated by the " - "EndpointIdentity relationship." )] -class CIM_Switchable : CIM_BindsToLANEndpoint { - - [Deprecated { "CIM_EndpointIdentity.SystemElement" }, - Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The switch port." )] - CIM_LANEndpoint REF Antecedent; - - [Deprecated { "CIM_EndpointIdentity.SameElement" }, - Override ( "Dependent" ), - Max ( 1 ), - Description ( "The LAN endpoint." )] - CIM_SwitchPort REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_SwitchesAmong.mof b/build/vendor/dmtf_mof/Network/CIM_SwitchesAmong.mof deleted file mode 100644 index b69b9395..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_SwitchesAmong.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SwitchesAmong -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "A SwitchService switches frames between SwitchPorts. This " - "association makes that relationship explicit." )] -class CIM_SwitchesAmong : CIM_ForwardsAmong { - - [Override ( "Antecedent" ), - Description ( "The switch port." )] - CIM_SwitchPort REF Antecedent; - - [Override ( "Dependent" ), - Max ( 1 ), - Description ( "The switching service." )] - CIM_SwitchService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_TCPProtocolEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_TCPProtocolEndpoint.mof deleted file mode 100644 index 0d54d297..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_TCPProtocolEndpoint.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Correct ValueMaps for ProtocolIfTypeAdd UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_TCPProtocolEndpoint -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::ProtocolEndpoints" ), - Description ( - "A protocol endpoint that is dedicated to running TCP." )] -class CIM_TCPProtocolEndpoint : CIM_ProtocolEndpoint { - - [Description ( "The TCP port number." )] - uint32 PortNumber; - - [Override ( "ProtocolIFType" ), - Description ( - "ProtocolIFType\'s enumeration is limited to TCP and " - "reserved values for this subclass of ProtocolEndpoint." ), - ValueMap { "1", "225..4095", "4111", "4301..32767", "32768.." }, - Values { "Other", "IANA Reserved", "TCP", "DMTF Reserved", - "Vendor Reserved" }] - uint16 ProtocolIFType = 4111; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_TelnetCapabilities.mof b/build/vendor/dmtf_mof/Network/CIM_TelnetCapabilities.mof deleted file mode 100644 index 98534452..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_TelnetCapabilities.mof +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Network::ConsoleProtocols" ), - Description ( - "A subclass of ProtocolServiceCapabilities that defines the " - "capabilities of a Telnet Service. An instance of " - "TelnetCapabilities is associated with the ProtocolService " - "using ElementCapabilities." )] -class CIM_TelnetCapabilities : CIM_ProtocolServiceCapabilities { - - [Description ( - "An array of integers indicating the terminal modes that " - "the service supports." ), - ValueMap { "0", "1", "2", "3", "4..32767", "32768..65535" }, - Values { "Unknown", "Other", "VT100", "ANSI", - "DMTF Reserved", "Vendor Reserved" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_TelnetCapabilities.OtherSupportedTerminalMode" }] - uint16 SupportedTerminalModes[]; - - [Description ( - "If the SupportedTerminalModes property is set to 1, " - "\"Other\" then free form string providing more " - "information about supported terminal modes. If not set " - "to 1, this string has no meaning." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_TelnetCapabilities.SupportedTerminalModes" }] - string OtherSupportedTerminalMode[]; - - [Description ( - "An array of integers indicating the Character display " - "modes supported by the service." ), - ValueMap { "0", "1", "2", "3", "4..32767", "32768..65535" }, - Values { "Unknown", "Other", "Console", "Stream", - "DMTF Reserved", "Vendor Reserved" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_TelnetCapabilities.OtherSupportedCharacterDisplayMode" }] - uint16 SupportedCharacterDisplayModes[]; - - [Description ( - "If the SupportedCharacterDisplayModes property is set to " - "1 \"Other\" then free form string providing more " - "information about the supported modes. If not set to 1, " - "this string has no meaning." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_TelnetCapabilities.SupportedCharacterDisplayModes" }] - string OtherSupportedCharacterDisplayMode[]; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_TelnetProtocolEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_TelnetProtocolEndpoint.mof deleted file mode 100644 index 6bda6629..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_TelnetProtocolEndpoint.mof +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Network::ConsoleProtocols" ), - Description ( - "A representation of a communications endpoint where a Telnet " - "server can be accessed using the Telnet protocol." )] -class CIM_TelnetProtocolEndpoint : CIM_ProtocolEndpoint { - - [Description ( - "An array of integers indicating the terminal modes that " - "are enabled for use in this server connection. " - "Additional terminal modes may be supported by the " - "service but not enabled for use." ), - ValueMap { "0", "1", "2", "3", "4..32767", "32768..65535" }, - Values { "Unknown", "Other", "VT100", "ANSI", - "DMTF Reserved", "Vendor Reserved" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_TelnetProtocolEndpoint.OtherEnabledTerminalMode" }] - uint16 EnabledTerminalModes[]; - - [Description ( - "If the EnabledTerminalModes property is set to 1, " - "\"Other\" then free form string providing more " - "information about supported terminal mode. If not set to " - "1, this string has no meaning." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_TelnetProtocolEndpoint.EnabledTerminalModes" }] - string OtherEnabledTerminalMode[]; - - [Write, Description ( - "The terminal mode in use for this Telnet endpoint.This " - "value shall be one of the values in EnabledTerminalModes" ), - ValueMap { "0", "1", "2", "3", "4..32767", "32768..65535" }, - Values { "Unknown", "Other", "VT100", "ANSI", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { - "CIM_TelnetProtocolEndpoint.OtherTerminalMode", - "CIM_TelnetProtocolEndpoint.EnabledTerminalModes" }] - uint16 TerminalMode; - - [Write, Description ( - "Where the TerminalMode property contains a value of 1, " - "\"Other\" then this is a free form string providing more " - "information about the current terminal mode and this " - "value shall be one of the values in " - "OtherEnabledTerminalModes. If not set to 1, this string " - "has no meaning." ), - ModelCorrespondence { - "CIM_TelnetProtocolEndpoint.TerminalMode", - "CIM_TelnetProtocolEndpoint.OtherEnabledTerminalMode" }] - string OtherTerminalMode; - - [Write, Description ( - "An array of integers indicating the character display " - "modes enabled for the service. Additional character " - "display modes may be supported but currently not enabled " - "for use." ), - ValueMap { "0", "1", "2", "3", "4..32767", "32768..65535" }, - Values { "Unknown", "Other", "Console", "Stream", - "DMTF Reserved", "Vendor Reserved" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_TelnetProtocolEndpoint.OtherEnabledCharacterDisplayMode" }] - uint16 EnabledCharacterDisplayModes[]; - - [Description ( - "If the EnabledCharacterDisplayModes property is set to " - "1, \"Other\" then free form string providing more " - "information about the enabled mode. If not set to 1, " - "this string has no meaning." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_TelnetProtocolEndpoint.EnabledCharacterDisplayModes" }] - string OtherEnabledCharacterDisplayMode[]; - - [Write, Description ( - "The character display mode that is currently active." ), - ValueMap { "0", "1", "2", "3", "4..32767", "32768..65535" }, - Values { "Unknown", "Other", "Console", "Stream", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { - "CIM_TelnetProtocolEndpoint.OtherCharacterDisplayMode", - "CIM_TelnetProtocolEndpoint.EnabledCharacterDisplayModes" }] - uint16 CharacterDisplayMode; - - [Write, Description ( - "When the CharacterDisplayMode property is set to 1, " - "\"Other\" then this is a free form string providing more " - "information about the character display mode. If not set " - "to 1, this string has no meaning." ), - ModelCorrespondence { - "CIM_TelnetProtocolEndpoint.CharacterDisplayMode", - "CIM_TelnetProtocolEndpoint.OtherEnabledCharacterDisplayMode" }] - string OtherCharacterDisplayMode; - - [Write, Description ( - "String indicating the Escape Character is in effect." )] - string EscapeCharacter; - - [Write, Description ( - "IdleTimeout specifies how long the connection can be " - "idle before it is closed. The default value, 0, " - "indicates that there is no idle timeout period." ), - Units ( "Seconds" ), - PUnit ( "second" )] - uint32 IdleTimeout = 0; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_TelnetSettingData.mof b/build/vendor/dmtf_mof/Network/CIM_TelnetSettingData.mof deleted file mode 100644 index 0da4fbf5..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_TelnetSettingData.mof +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Network::ConsoleProtocols" ), - Description ( - "A representation of the settings of a Telnet server " - "connection. The relationship between the SettingData and the " - "TelnetProtocolEndpoint is described by instantiating the " - "ElementSettingData association." )] -class CIM_TelnetSettingData : CIM_SettingData { - - [Write, Description ( - "An array of integers indicating the terminal modes that " - "will be enabled." ), - ValueMap { "1", "2", "3", "..", "32768..65535" }, - Values { "Other", "VT100", "ANSI", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { - "CIM_TelnetSettingData.OtherEnabledTerminalMode" }] - uint16 EnabledTerminalModes[]; - - [Write, Description ( - "When the EnabledTerminalModes property contains a value " - "of 1, \"Other\" then free form string providing more " - "information about the enabled terminal mode. If it does " - "not contain 1, this string has no meaning." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_TelnetSettingData.EnabledTerminalModes" }] - string OtherEnabledTerminalMode[]; - - [Write, Description ( - "The terminal mode that will be in use if this " - "SettingData is applied." ), - ValueMap { "1", "2", "3", "..", "32768..65535" }, - Values { "Other", "VT100", "ANSI", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { - "CIM_TelnetSettingData.OtherTerminalMode", - "CIM_TelnetSettingData.EnabledTerminalModes" }] - uint16 TerminalMode; - - [Write, Description ( - "If the TerminalMode property is set to 1, \"Other\" then " - "this is a free form string providing more information " - "about the current terminal mode. If not set to 1, this " - "string has no meaning." ), - ModelCorrespondence { "CIM_TelnetSettingData.TerminalMode" }] - string OtherTerminalMode; - - [Write, Description ( - "An array of integers indicating the Character display " - "modes enabled for the endpoint." ), - ValueMap { "1", "2", "3", "..", "32768..65535" }, - Values { "Other", "Console", "Stream", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { - "CIM_TelnetSettingData.OtherEnabledCharacterDisplayMode" }] - uint16 EnabledCharacterDisplayModes[]; - - [Write, Description ( - "When the EnabledCharacterDisplayModes property contains " - "a value of 1, \"Other\" then this is a free form string " - "providing more information about the enabled modes. If " - "it does not contain 1, this string has no meaning." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_TelnetProtocolEndpoint.EnabledCharacterDisplayModes" }] - string OtherEnabledCharacterDisplayMode[]; - - [Write, Description ( - "The character display mode that will be active if this " - "SettingData is applied." ), - ValueMap { "1", "2", "3", "..", "32768..65535" }, - Values { "Other", "Console", "Stream", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { - "CIM_TelnetSettingData.OtherCharacterDisplayMode", - "CIM_TelnetProtocolEndpoint.EnabledCharacterDisplayModes" }] - uint16 CharacterDisplayMode; - - [Write, Description ( - "When the CharacterDisplayMode property is set to 1, " - "\"Other\" then this is a free form string providing more " - "information about the character display mode. If not set " - "to 1, this string has no meaning." ), - ModelCorrespondence { - "CIM_TelnetProtocolEndpoint.CharacterDisplayMode", - "CIM_TelnetSettingData.OtherEnabledCharacterDisplayMode" }] - string OtherCharacterDisplayMode; - - [Write, Description ( - "String indicating the Escape Character that will be in " - "effect if this SettingData is applied." ), - ModelCorrespondence { - "CIM_TelnetProtocolEndpoint.EscapeCharacter" }] - string EscapeCharacter; - - [Write, Description ( - "IdleTimeout specifies how long the connection can be " - "idle before it is closed. The default value, 0, " - "indicates that there is no idle timeout period." ), - Units ( "Seconds" ), - PUnit ( "second" )] - uint32 IdleTimeout = 0; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_TextRedirectionSAP.mof b/build/vendor/dmtf_mof/Network/CIM_TextRedirectionSAP.mof deleted file mode 100644 index 74140fbe..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_TextRedirectionSAP.mof +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2007 DMTF. All Rights Reserved. - [Version ( "2.17.0" ), - UMLPackagePath ( "CIM::Network::ConsoleProtocols" ), - Description ( - "TextRedirectionSAP describes an access point to start the text " - "redirection. One access point represents access to a single " - "text redirection stream." )] -class CIM_TextRedirectionSAP : CIM_ServiceAccessPoint { - - [Description ( - "A string sequence that allows the supervisor using the " - "command line session to terminate the redirection " - "stream. This is required because once the text " - "redirection is started then the supervisor may lose the " - "ability to interact with the command line session, and " - "be unable to perform a RequestStateChange operation." )] - string SessionTerminateSequence; - - [Description ( - "An enumeration specifying the type of the text stream " - "supported on this SAP. In some cases this may be a raw " - "character steam, with the characters having no special " - "meaning. However, in other cases it may support a " - "Terminal Mode where some characters have special " - "meanings like backspace, positioning of the character on " - "the screen, etc." ), - ValueMap { "0", "1", "2", "3", "4..32767", "32768..65535" }, - Values { "Unknown", "Other", "Character Stream", - "Terminal Mode", "DMTF Reserved", "Vendor Specified" }, - ModelCorrespondence { - "CIM_TextRedirectionSAP.OtherTextFlowType" }] - uint16 TextFlowType; - - [Description ( - "An string describing the TextFlowType when the value of " - "the TextFlowType property is set to 1 = \"Other\"." ), - ModelCorrespondence { "CIM_TextRedirectionSAP.TextFlowType" }] - string OtherTextFlowType; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_TextRedirectionService.mof b/build/vendor/dmtf_mof/Network/CIM_TextRedirectionService.mof deleted file mode 100644 index bc834ddc..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_TextRedirectionService.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2007 DMTF. All Rights Reserved. - [Version ( "2.17.0" ), - UMLPackagePath ( "CIM::Network::ConsoleProtocols" ), - Description ( - "TextRedirectionService provides the capability to redirect a " - "text console output to the remote console. For example, any " - "text stream directed to a Serial COM Port (by the operating " - "system) on a Computer System can be redirected out to a remote " - "administrator\'s console. Similarly the text input keystrokes " - "from the remote administrator\'s console can be redirected " - "into the same COM Port. Each redirection stream is accessible " - "via a TextRedirectionSAP. This service can support multiple " - "redirection streams via multiple associated " - "TextRedirectionSAPs." )] -class CIM_TextRedirectionService : CIM_RedirectionService { - - [Override ( "RedirectionServiceType" ), - Description ( - "Type of Redirection Supported by this Service. This " - "value is set to the type of Redirection Service That " - "this service represents. A value set to 2 = \"Text\" " - "indicates a Text Console Redirection service." ), - ValueMap { "..", "2", "3..32767", "32768..65535" }, - Values { "DMTF Reserved", "Text", "DMTF Reserved", - "Vendor Specified" }, - ModelCorrespondence { - "CIM_RedirectionSAP.OtherRedirectionServiceType" }] - uint16 RedirectionServiceType[] = {2}; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_ToSMarkerService.mof b/build/vendor/dmtf_mof/Network/CIM_ToSMarkerService.mof deleted file mode 100644 index f89a5072..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_ToSMarkerService.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ToSMarkerService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "ToSMarkerService marks the ToS (type of service) field in the " - "IPv4 packet header [R791] with a specific value. Packets are " - "marked in order to control the conditioning that they will " - "subsequently receive. Following common practice, the value to " - "be written into the ToS field is represented as an unsigned " - "8-bit integer." )] -class CIM_ToSMarkerService : CIM_MarkerService { - - [Description ( - "This property is an unsigned 8-bit integer, representing " - "a value to be used for marking the type of service (ToS) " - "field in the IPv4 packet header. The ToS field is " - "defined to be a complete octet, so the range for this " - "property is 0..255. Some implementations, however, " - "require that the lowest-order bit in the field is always " - "0. Such an implementation cannot support an odd " - "TosValue." )] - uint8 ToSValue; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_TokenBucketMeterService.mof b/build/vendor/dmtf_mof/Network/CIM_TokenBucketMeterService.mof deleted file mode 100644 index 6e5629fc..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_TokenBucketMeterService.mof +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_TokenBucketMeterService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This is a concrete subclass of the MeterService class that " - "represents the metering of network traffic using a token " - "bucket meter. Two types of token bucket meters are defined " - "using this class - a simple, two-parameter bucket meter, and a " - "multi-stage meter. \n" - "\n" - "A simple token bucket usually has two parameters, an average " - "token rate and a burst size, and has two conformance levels: " - "\'conforming\' and \'non-conforming\'. This class also defines " - "an excess burst size, which enables the meter to have three " - "conformance levels (\'conforming\', \'partially conforming\', " - "and \'non-conforming\'). In this case, packets that exceed the " - "excess burst size are deemed non-conforming, while packets " - "that exceed the smaller burst size but are less than the " - "excess burst size are deemed partially conforming." )] -class CIM_TokenBucketMeterService : CIM_MeterService { - - [Description ( - "This property is a 32-bit unsigned integer that is used " - "to define the committed rate of the meter. The value is " - "expressed in kilobits per second." ), - Units ( "KiloBits per Second" )] - uint32 AverageRate; - - [Description ( - "This attribute is a 32-bit unsigned integer that is used " - "to define the peak rate of the meter. The value is " - "expressed in kilobits per second." ), - Units ( "KiloBits per Second" )] - uint32 PeakRate; - - [Description ( - "This property is a 32-bit unsigned integer that is used " - "to define the maximum number of tokens available for the " - "committed rate (specified by the AverageRate property). " - "The value is specified in kilobytes." ), - Units ( "KiloBytes" )] - uint32 BurstSize; - - [Description ( - "This property is a 32-bit unsigned integer that is used " - "to define the maximum number of tokens available for the " - "peak rate (specified by the PeakRate property). The " - "value is specified in kilobytes." ), - Units ( "KiloBytes" )] - uint32 ExcessBurstSize; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_TransformOfSecurityAssociation.mof b/build/vendor/dmtf_mof/Network/CIM_TransformOfSecurityAssociation.mof deleted file mode 100644 index 5c951243..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_TransformOfSecurityAssociation.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_TransformOfSecurityAssociation -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::IPsec" ), - Description ( - "TransformOfSecurityAssociation maps a SecurityAssociation " - "Endpoint with the transform that it uses. For security, no " - "keying material of the SA is exposed." )] -class CIM_TransformOfSecurityAssociation : CIM_ElementSettingData { - - [Override ( "SettingData" ), - Min ( 1 ), - Max ( 1 ), - Description ( "Transform of the IPsecSAEndpoint." )] - CIM_SATransform REF SettingData; - - [Override ( "ManagedElement" ), - Description ( "The IPsecSAEndpoint that uses the transform." )] - CIM_IPsecSAEndpoint REF ManagedElement; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_TransparentBridgingDynamicForwarding.mof b/build/vendor/dmtf_mof/Network/CIM_TransparentBridgingDynamicForwarding.mof deleted file mode 100644 index daad873e..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_TransparentBridgingDynamicForwarding.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_TransparentBridgingDynamicForwarding -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "This association links an instance of the Transparent " - "BridgingService to the entries of its forwarding database. The " - "forwarding database is weak to the Service." )] -class CIM_TransparentBridgingDynamicForwarding : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The transparent bridging service." )] - CIM_TransparentBridgingService REF Antecedent; - - [Override ( "Dependent" ), - Weak, Description ( - "Dynamic Forwarding Entry of forwarding database." )] - CIM_DynamicForwardingEntry REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_TransparentBridgingService.mof b/build/vendor/dmtf_mof/Network/CIM_TransparentBridgingService.mof deleted file mode 100644 index 38ed7534..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_TransparentBridgingService.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_TransparentBridgingService -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "This service class represents the learning/transparent " - "bridging aspect of a SwitchService." )] -class CIM_TransparentBridgingService : CIM_ForwardingService { - - [Description ( - "The timeout period in seconds for aging out dynamically " - "learned forwarding information. 802.1D-1990 recommends a " - "default of 300 seconds." ), - Units ( "Seconds" ), - MappingStrings { "MIB.IETF|BRIDGE-MIB.dot1dTpAgingTime" }] - uint32 AgingTime = 300; - - [Description ( - "Filtering Database Identifier used by VLAN-aware " - "switches that have more than one filtering database." )] - uint32 FID; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_TransparentBridgingStaticForwarding.mof b/build/vendor/dmtf_mof/Network/CIM_TransparentBridgingStaticForwarding.mof deleted file mode 100644 index 494b3f58..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_TransparentBridgingStaticForwarding.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_TransparentBridgingStaticForwarding -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "This association links an instance of the Transparent " - "BridgingService to the entries of its static " - "(destination-address filtering) database." )] -class CIM_TransparentBridgingStaticForwarding : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The TransparentBridgingService." )] - CIM_TransparentBridgingService REF Antecedent; - - [Override ( "Dependent" ), - Weak, Description ( - "StaticForwardingEntry of the forwarding database." )] - CIM_StaticForwardingEntry REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_TransparentBridgingStatistics.mof b/build/vendor/dmtf_mof/Network/CIM_TransparentBridgingStatistics.mof deleted file mode 100644 index 544f55bd..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_TransparentBridgingStatistics.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_TransparentBridgingStatistics -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::SwitchingBridging" ), - Description ( - "Statistical information regarding the TransparentBridging Service." - )] -class CIM_TransparentBridgingStatistics : CIM_ServiceStatisticalInformation { - - [Description ( - "The total number of Forwarding Database entries, which " - "have been or would have been learnt, but have been " - "discarded due to a lack of space to store them in the " - "Forwarding Database." ), - Counter, MappingStrings { - "MIB.IETF|BRIDGE-MIB.dot1dTpLearnedEntryDiscards" }] - uint32 LearnedEntryDiscards; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_TrapSourceForSNMPService.mof b/build/vendor/dmtf_mof/Network/CIM_TrapSourceForSNMPService.mof deleted file mode 100644 index 87cf965e..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_TrapSourceForSNMPService.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_TrapSourceForSNMPService -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::SNMP" ), - Description ( - "TrapSourceForSNMPService specifies the protocol " - "endpoint/interface (and hence its IP address) from which traps " - "originate." )] -class CIM_TrapSourceForSNMPService : CIM_ServiceSAPDependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The endpoint that acts as the trap source." )] - CIM_ProtocolEndpoint REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The SNMP service that sends the notifications." )] - CIM_SNMPService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_UDPProtocolEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_UDPProtocolEndpoint.mof deleted file mode 100644 index 7197aac3..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_UDPProtocolEndpoint.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_UDPProtocolEndpoint -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::ProtocolEndpoints" ), - Description ( - "A protocol endpoint that is dedicated to running UDP." )] -class CIM_UDPProtocolEndpoint : CIM_ProtocolEndpoint { - - [Description ( "The UDP port number." )] - uint32 PortNumber; - - [Override ( "ProtocolIFType" ), - Description ( - "ProtocolIFType\'s enumeration is limited to UDP and " - "reserved values for this subclass of ProtocolEndpoint." ), - ValueMap { "1", "225..4095", "4110", "4301..32767", "32768.." }, - Values { "Other", "IANA Reserved", "UDP", "DMTF Reserved", - "Vendor Reserved" }] - uint16 ProtocolIFType = 4110; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_USBRedirectionCapabilities.mof b/build/vendor/dmtf_mof/Network/CIM_USBRedirectionCapabilities.mof deleted file mode 100644 index 98983167..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_USBRedirectionCapabilities.mof +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Network::USBRedirection" ), - Description ( - "USBRedirectionCapabilities describes the capabilities of the " - "USB Redirection Service." )] -class CIM_USBRedirectionCapabilities : CIM_RedirectionServiceCapabilities { - - [Description ( - "The connection mode used to configure the session. A " - "value set to 2 = \"Listen\" shall indicate that the SAP " - "will listen for a connection request from the remote USB " - "redirection server. A CIM_BindsTo association to a " - "CIM_ProtocolEndoint may be used to represent where the " - "SAP is listening for the connection request. A value set " - "to 3 = \"Connect\" shall indicate that the the SAP shall " - "initiate the connection to the remote USB redirection " - "server. A CIM_RemoteAccessAvailableToElement association " - "to a CIM_RemoteServiceAccessPoint may be used to " - "represent where the SAP shall connect to the remote USB " - "redirection server." ), - ValueMap { "0", "2", "3", "..", "32768..65535" }, - Values { "Unknown", "Listen", "Connect", "DMTF Reserved", - "Vendor Specified" }, - ModelCorrespondence { "CIM_USBRedirectionSAP.ConnectionMode" }] - uint16 ConnectionModesSupported[]; - - [Description ( - "An enumeration indicating the USB specification versions " - "which are supported. The property is expressed as a " - "Binary-Coded Decimal (BCD) where a decimal point is " - "implied between the 2nd and 3rd digits. For example, a " - "value of 0x0201 indicates that version 2.01 is " - "supported. Note that each entry of this array is related " - "to the entries of the ClassesSupported, " - "SubClassesSupported, MaxDevicesSupported and " - "MaxDevicesPerSAP arrays that are located at the same " - "index." ), - ArrayType ( "Indexed" ), - MappingStrings { - "Universal Serial Bus Specification.USB-IF|Standard Device Descriptor|bcdUSB" }, - ModelCorrespondence { "CIM_USBDevice.Version", - "CIM_USBRedirectionCapabilities.ClassesSupported", - "CIM_USBRedirectionCapabilities.SubClassesSupported", - "CIM_USBRedirectionCapabilities.MaxDevicesSupported", - "CIM_USBRedirectionCapabilities.MaxDevicesPerSAP" }] - uint16 USBVersionsSupported[]; - - [Description ( - "An enumeration indicating the USB Device Classes which " - "are supported. Note that each entry of this array is " - "related to the entries of the USBVersionsSupported, " - "SubClassesSupported, MaxDevicesSupported, and " - "MaxDevicesPerSAP arrays that are located at the same " - "index." ), - ArrayType ( "Indexed" ), - MappingStrings { - "Universal Serial Bus Specification.USB-IF|Standard Device Descriptor|bDeviceClass" }, - ModelCorrespondence { "CIM_USBDevice.ClassCode", - "CIM_USBRedirectionCapabilities.USBVersionsSupported", - "CIM_USBRedirectionCapabilities.SubClassesSupported", - "CIM_USBRedirectionCapabilities.MaxDevicesSupported", - "CIM_USBRedirectionCapabilities.MaxDevicesPerSAP" }] - uint8 ClassesSupported[]; - - [Description ( - "An enumeration indicating the USB Device SubClasses " - "which are supported. Note that each entry of this array " - "is related to the entries of the USBVersionsSupported, " - "ClassesSupproted, MaxDevicesSupported, and " - "MaxDevicesPerSAP arrays that are located at the same " - "index." ), - ArrayType ( "Indexed" ), - MappingStrings { - "Universal Serial Bus Specification.USB-IF|Standard Device Descriptor|bDeviceSubClass" }, - ModelCorrespondence { "CIM_USBDevice.SubclassCode", - "CIM_USBRedirectionCapabilities.USBVersionsSupported", - "CIM_USBRedirectionCapabilities.ClassesSupported", - "CIM_USBRedirectionCapabilities.MaxDevicesSupported", - "CIM_USBRedirectionCapabilities.MaxDevicesPerSAP" }] - uint8 SubClassesSupported[]; - - [Description ( - "An enumeration indicating the number of USB devices " - "which are supported for the devices specified in the " - "USBVersionsSupported, ClassesSupported, and " - "SubClassesSupported array properties. Note that each " - "entry of this array is related to the entries in the " - "USBVersionsSupported, ClassesSupported, and " - "SubClassesSupported arrays that are located at the same " - "index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_USBRedirectionCapabilities.ClassesSupported", - "CIM_USBRedirectionCapabilities.USBVersionsSupported", - "CIM_USBRedirectionCapabilities.SubClassesSupported", - "CIM_USBRedirectionCapabilities.MaxDevicesPerSAP" }] - uint16 MaxDevicesSupported[]; - - [Description ( - "An enumeration indicating the number of USB devices per " - "USB Redirection Session which are supported for the " - "devices specified in the USBVersionsSupported, " - "ClassesSupported, and SubClassesSupported array " - "properties. Note that each entry of this array is " - "related to the entries in the USBVersionsSupported, " - "ClassesSupported, and SubClassesSupported arrays that " - "are located at the same index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_USBRedirectionCapabilities.MaxDevicesSupported", - "CIM_USBRedirectionCapabilities.USBVersionsSupported", - "CIM_USBRedirectionCapabilities.SubClassesSupported", - "CIM_USBRedirectionCapabilities.ClassesSupported" }] - uint16 MaxDevicesPerSAP[]; - - [Description ( - "An enumeration indicating the whether instances of " - "USBRedirectionSAPs already exist and whether whether " - "SAPs can be created. A value set to 2 = \"Pre-Configured " - "SAPs\" shall indicate that instances of " - "CIM_USBRedirectionSAP exists which can be enabled. A " - "value set to 3 = \"Create SAPs\" shall indicate that " - "instances of CIM_USBRedirectionSAP can be created with " - "the CreateDevice() and CreateSession() methods. A value " - "set to 4 = \"Modify Timeouts\" shall indicate that the " - "timeout parameters of instances of CIM_USBRedirectionSAP " - "can be modified by applications using \'ModifyInstance\'" ), - ValueMap { "0", "2", "3", "4", "..", "32768..65535" }, - Values { "Unknown", "Pre-Configured SAPs", "Create SAPs", - "Modify SAP", "DMTF Reserved", "Vendor Specified" }] - uint16 SAPCapabilitiesSupported[]; - - [Description ( - "An enumeration indicating the RequestedStatesSupported " - "capabilities that may be used when creating a new SAP, " - "if SAPCapabilitiesSupported has a value of 3, \'Create " - "SAPs\', otherwise ignored" ), - ModelCorrespondence { - "CIM_EnabledLogicalElementCapabilities.RequestedStatesSupported", - "CIM_USBRedirectionCapabilities.SAPCapabilitiesSupported" }] - uint16 RequestedStatesSupportedForCreatedSAP[]; - - [Description ( - "An enumeration indicating which of the formats for " - "CIM_RemoteServiceAcccessPoint.InfoFormat are supported " - "by the USB Redirection Service. When a USB Redirection " - "Session is configured with ConnectionMode = 3 \'Connect\' " - "the USB Redirection SAP needs to know the remote service " - "access point to connect to. The " - "CIM_RemoteServiceAccessPoint class is used to model this " - "information. InfoFormat describes the address format for " - "CIM_RemoteServiceAccessPoint.AccessInfo. which tells the " - "local SAP where to find the USB redirection remote " - "access point modeled by CIM_RemoteServiceAccessPoint. " - "InfoFormatsSupported describes the AccessInfo formats " - "that are supported by the local USB Redirection Service." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "100", "101", "102", "103", "104", - "200", "201", "202", "203", "204", "205", "..", - "32768..65535" }, - Values { "Other", "Host Name", "IPv4 Address", - "IPv6 Address", "IPX Address", "DECnet Address", - "SNA Address", "Autonomous System Number", "MPLS Label", - "IPv4 Subnet Address", "IPv6 Subnet Address", - "IPv4 Address Range", "IPv6 Address Range", "Dial String", - "Ethernet Address", "Token Ring Address", "ATM Address", - "Frame Relay Address", "URL", "FQDN", "User FQDN", - "DER ASN1 DN", "DER ASN1 GN", "Key ID", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { - "CIM_RemoteServiceAccessPoint.InfoFormat" }] - uint16 InfoFormatsSupported[]; - - [Description ( - "SingleClassPerSAP indicates that only instances of " - "CIM_USBDevice whose ClassCode property have the same " - "value as each other shall be associated with the " - "instances of CIM_USBRedirectionSAP." ), - ModelCorrespondence { "CIM_USBDevice.ClassCode" }] - boolean SingleClassPerSAP; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_USBRedirectionSAP.mof b/build/vendor/dmtf_mof/Network/CIM_USBRedirectionSAP.mof deleted file mode 100644 index ce54c1fc..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_USBRedirectionSAP.mof +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Network::USBRedirection" ), - Description ( - "USBRedirectionSAP is a logical representation of a USB " - "redirection session. One access point represents access to a " - "single USB redirection session." )] -class CIM_USBRedirectionSAP : CIM_ServiceAccessPoint { - - [Description ( - "An enumeration specifying the type of connection mode " - "supported by the session. A value set to 2 = \"Listen\" " - "shall indicate that the SAP will listen for a connection " - "request from the remote USB redirection server. A " - "CIM_BindsTo association to a CIM_ProtocolEndpoint may be " - "used to represent where the SAP is listening for the " - "connection request. A value set to 3 = \"Connect\" shall " - "indicate that the the SAP shall initiate the connection " - "to the remote USB redirection server. A " - "CIM_RemoteAccessAvailableToElement association to a " - "CIM_RemoteServiceAccessPoint may be used to represent " - "where the SAP shall connect to the remote USB " - "redirection server." ), - ValueMap { "0", "2", "3", "..", "32768..65535" }, - Values { "Unknown", "Listen", "Connect", "DMTF Reserved", - "Vendor Specified" }] - uint16 ConnectionMode; - - [Description ( - "The amount of time the session shall wait after sending " - "a Reset to the Remote System before concluding that the " - "Remote System is not responding in a timely fashion, it " - "may be hung or busy. When the Reset Timeout is exceeded " - "the managed system tries to establish a new connection " - "with the Remote System. This property uses the interval " - "format of the datetime type" )] - datetime ResetTimeout; - - [Description ( - "The amount of time the session will wait for a Remote " - "System to establish a new connection before the USB " - "Device is detached. This property uses the interval " - "format of the datetime type." )] - datetime SessionTimeout; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_USBRedirectionService.mof b/build/vendor/dmtf_mof/Network/CIM_USBRedirectionService.mof deleted file mode 100644 index d26b41c6..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_USBRedirectionService.mof +++ /dev/null @@ -1,230 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Network::USBRedirection" ), - Description ( - "USBRedirectionService describes the service that manages the " - "USB Redirection of a system." )] -class CIM_USBRedirectionService : CIM_RedirectionService { - - [Override ( "RedirectionServiceType" ), - Description ( - "RedirectionServiceType\'s enumeration is limited to the " - "\'USB\' and reserved RedirectionServiceType values for " - "this subclass of CIM_RedirectionService." ), - ValueMap { "4", "..", "32768..65535" }, - Values { "USB", "DMTF Reserved", "Vendor Specified" }] - uint16 RedirectionServiceType[] = {4}; - - - [Description ( - "This method is used to add new redirection sessions " - "modeled by CIM_USBRedirectionSAP, to the USB Redirection " - "Service. The USBDevice parameter may contain references " - "to instances of CIM_USBDevice that model the USB Device " - "to be redirected by the new USB Redirection Session. " - "Alternatively new instances of CIM_USBDevice may be " - "created to redirect in the new session. The " - "NewUSBDevices parameter describes the new devices to be " - "created. Typically the new CIM_USBDevices created " - "represent devices that are emulated by the USB " - "Redirection Service. Or the new USB devices may be " - "associated to the existing logical devices specified in " - "the RedirectedLogicalDevices parameter. When the " - "ConnectionMode parameter specifies the new redirection " - "session be in the \'Connect\' mode, the AccessInfo " - "parameter specifies the remote network location the " - "redirection session should connect to when it is " - "enabled. Upon completion the following instances will " - "have been created, CIM_USBRedirectionSAP, " - "CIM_ServiceAccessBySAP associating the new " - "USBRedirectionSAP with the USBRedirectionService, " - "CIM_HostedAccessPoint associating the new SAP with the " - "CIM_ComputerSystem that hosts the new SAP, " - "CIM_SAPAvailableForElement associating the " - "CIM_ComputerSystem that has the USB device being " - "redirection with the new SAP, " - "EnabledLogicalElementCapabilities that describes the " - "capabilities of the new SAP, ElementCapabilties " - "associating the new EnabledLogicalElementCapabilities " - "with the new SAP, SAPAvailableForElement associating the " - "new SAP with the USBDevices specified in the parameters " - "to this method. CIM_BindsTo a new CIM_ProtocolEndpoint " - "to the new SAP if the ConnectionMode is 2, or if the " - "ConnectionMode parameter is 3, a new " - "CIM_RemoteAccessAvailableToElement associating the new " - "SAP to a new CIM_RemoteServiceAccessPoint." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7..32767", - "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", "Busy", "Invalid Reference", - "Invalid Parameter", "Access Denied", "DMTF Reserved", - "Vendor Specified" }] - uint32 CreateRedirectionSAP( - [IN, Description ( - "A string-valued embedded instance of " - "CIM_USBRedirectionSAP describing the new SAP to be " - "created." ), - EmbeddedInstance ( "CIM_USBRedirectionSAP" )] - string NewUSBRedirectionSAP, - [IN, Description ( - "an enumeration of the RequestedStatesSupported " - "capability for the newly created SAP. The values " - "specified for this parameter must be from the set " - "of values found in the Redirection Service\'s " - "CIM_USBRedirectionCapabilities.RequestedStatesSupporteForCreatedSAP " - "array." ), - ModelCorrespondence { - "CIM_USBRedirectionCapabilities.RequestedStatesSupportedForCreatedSAP" }] - uint16 NewSAPRequestedStatesSupported[], - [IN, Description ( - "Array of existing devices to redirect via the " - "redirection session. These will be associated with " - "the new CIM_USBRedirectionSAP by a " - "CIM_SAPAvailableForElement association." )] - CIM_USBDevice REF USBDevices[], - [IN, Description ( - "CreateDevices is a boolean that when TRUE tells " - "the method to create new instances of " - "CIM_USBDevice for each embedded instance in the " - "NewUSBDevices parameter. When CreateDevices is " - "FALSE, the NewUSBDevices and " - "RedirectedLogicalDevices parameters are unused." )] - boolean CreateDevices, - [IN, Description ( - "The NewUSBDevices parameter contains the " - "description of the new CIM_USBDevice instances to " - "be created and redirected via the redirection " - "session. This is an array of class CIM_USBDevice " - "encoded as a string-valued embedded instance " - "parameter. The string-valued embedded instances " - "allow specifying the properties desired for the " - "CIM_USBDevice instances that will be created by " - "this method. The new CIM_USBDevice instances " - "created by this method will be associated with the " - "CIM_USBRedirectionService instance by a " - "CIM_ServiceAffectsElement association and with the " - "newly created CIM_USBRedirectionSAP by a " - "CIM_SAPAvailableForElement association. Each entry " - "in this list of new USB Devices is related to the " - "entry in the RedirectedLogicalDevices array that " - "is located at the same index." ), - EmbeddedInstance ( "CIM_USBDevice" ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_USBRedirectionService.CreateRedirectionSAP.RedirectedLogicalDevices" }] - string NewUSBDevices[], - [IN, Description ( - "RedirectedLogicalDevices parameter is an array of " - "references to concrete subclass of " - "CIM_LogicalDevice that will be associated with the " - "new instances of CIM_USBDevice created from the " - "embedded instances of NewUSBDevices. Each entry of " - "this array is related to the entry of " - "NewUSBDevices array that is located at the same " - "index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_USBRedirectionService.CreateRedirectionSAP.NewUSBDevices" }] - CIM_LogicalDevice REF RedirectedLogicalDevices[], - [IN, Description ( - "When the ConnectionMode parameter of the new SAP " - "is 3, \'Connect\' this parameter contains a " - "string-valued embedded instance of " - "CIM_RemoteServiceAccessPoint to be created and " - "associated by a CIM_RemoteAccessAvailableToElement " - "association to the new SAP. The represents the " - "remote redirection access point that the new SAP " - "should connect to." ), - EmbeddedInstance ( "CIM_RemoteServiceAccessPoint" )] - string NewRemoteServiceAccessPoint, - [IN ( false ), OUT, Description ( - "A reference to the instances of " - "CIM_USBRedirectionSAP created by the method. This " - "parameter is not returned when the method is run " - "as a Job" )] - CIM_USBRedirectionSAP REF SAP, - [IN ( false ), OUT, Description ( - "Reference to the job spawned if the operation " - "continues after the method returns. (May be null " - "if the task is completed)." )] - CIM_ConcreteJob REF Job); - - [Description ( - "This method is invoked to delete a USB Redirection " - "session. This includes the associations created by " - "CreateRedirectionSession. The method may also delete the " - "instances of USBDevice associated by a " - "CIM_SAPAvailableForElement association with the " - "CIM_USBRedirectionSAP instance being deleted." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7..32767", - "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", "Busy", "Invalid Reference", - "Invalid Parameter", "Access Denied", "DMTF Reserved", - "Vendor Specified" }] - uint32 DeleteRedirectionSAP( - [IN, Description ( - "A reference to the instance of " - "CIM_USBRedirectionSAP the method shall delete." )] - CIM_USBRedirectionSAP REF SAP, - [IN, Description ( - "Indicates whether the USBDevices associated to the " - "SAP shall also be deleted by this method." )] - boolean DeleteUSBDevices, - [IN ( false ), OUT, Description ( - "Reference to the job spawned if the operation " - "continues after the method returns. (May be null " - "if the task is completed)." )] - CIM_ConcreteJob REF Job); - - [Description ( - "This method is invoked to create an new instance of " - "USBDevice that will be redirected by the USB Redirection " - "Service. The RedirectedLogicalDevice parameter may " - "contain a reference to an existing instance of a " - "concrete subclass of CIM_LogicalDevice that will be " - "redirected via the USB RedirectionService. Upon " - "Successful completion of this operation the following " - "instances will have been created. A new instance of " - "CIM_USBDevice, a new instance of ServiceAffectsElement " - "associating the new instance of CIM_USBDevice with the " - "instance of USBRedirectionService. If the " - "RedirectedLogicalDevice parameter is not empty, a new " - "CIM_LogicalIdentity is created associating the new " - "CIM_USBDevice with the RedirectedLogicalDevice." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7..32767", - "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", "Busy", "Invalid Reference", - "Invalid Parameter", "Access Denied", "DMTF Reserved", - "Vendor Specified" }] - uint32 CreateUSBDevice( - [IN, Description ( - "The NewUSBDevice parameter contains the " - "description of the new CIM_USBDevice instance to " - "be created and redirected via the redirection " - "session. This parameter is a string-valued " - "embedded instance of the CIM_USBDevice class." ), - EmbeddedInstance ( "CIM_USBDevice" ), - ModelCorrespondence { - "CIM_USBRedirectionService.CreateUSBDevice.RedirectedLogicalDevice" }] - string NewUSBDevice, - [IN, Description ( - "If not empty, this is a reference to a concrete " - "subclasss of CIM_LogicalDevice representing the " - "device to be redirected by the USB Redirection " - "Service. This might, for example, be a " - "CIM_CDROMDrive or a CIM_DisketteDrive." )] - CIM_LogicalDevice REF RedirectedLogicalDevice, - [IN ( false ), OUT, Description ( - "A reference to the instance of CIM_USBDevice " - "created by the method. This parameter is not " - "returned when the method is run as a Job" )] - CIM_USBDevice REF USBDevice, - [IN ( false ), OUT, Description ( - "Reference to the job spawned if the operation " - "continues after the method returns. (May be null " - "if the task is completed)." )] - CIM_ConcreteJob REF Job); - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_VLAN.mof b/build/vendor/dmtf_mof/Network/CIM_VLAN.mof deleted file mode 100644 index ee9ddf20..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_VLAN.mof +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_VLAN -// ================================================================== - [Deprecated { "No Value" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::VLAN" ), - Description ( - "An instance of VLAN represents a VLAN within a switch. In a " - "particular switch, there should be an instance of VLAN for " - "every VLAN available. For example, in a switch with port-based " - "VLANs, if there are 16 VLANs to which ports can be assigned " - "(VLAN 1 through VLAN 16), there should be an instance of " - "CIM_VLAN for each of VLAN 1 through VLAN 16. \n" - "\n" - "VLAN inherits Name from ServiceAccessPoint. Use this for the " - "textual name of the VLAN, if there is one. Otherwise, " - "synthesize a textual name, e.g., VLAN 0003. (Consider leading " - "zero fill, as shown, to ensure that if the textual VLAN names " - "are extracted and presented by a management applictions, the " - "VLAN names will sort in the expected order.) The numeric part " - "of the name should be at least four digits wide since 802.1Q " - "specifies 4095 VLANs. \n" - "\n" - "It is intended that VLAN be subclassed only if necessary to " - "add attributes. The type of the VLAN can be inferred from the " - "VLANService(s) with which the VLAN is associated in the " - "VLANFor association. \n" - "\n" - "An instance of VLAN may be associated with more than one " - "VLANService. For example, there are switches that support both " - "802.1Q VLANs and the vendor\'s proprietary VLANs. In some such " - "switches, if a broadcast packet is received on a port in an " - "802.1Q VLAN (VLAN 5, for example), it may be be transmitted " - "from a port in a \'proprietary\' VLAN 5. In effect, there is " - "only one VLAN 5, and the type of port only determines the " - "packet format for tagged packets. In the case just described, " - "only one instance of CIM_VLAN should be instantiated for VLAN " - "5, and it should be associated both with the 802.1Q " - "VLANService and the proprietary VLANService. \n" - "\n" - "In typical VLAN-aware switches, packets can be assigned to a " - "VLAN based on the port on which they are received (port-based " - "VLANS), based on the source MAC address (MAC-based VLANs), or " - "based on the value of a set of bits in the packet " - "(protocol-based VLANs). If it is desirable to represent the " - "VLAN assignment predicate for some MAC-based VLAN switch, it " - "will be necessary to subclass VLAN. The list of MAC addresses " - "associated with a VLAN might be an attribute of the subclass. " - "If it is desirable to represent the VLAN assignment predicate " - "in a protocol-based VLAN switch, it will also be necessary to " - "subclass VLAN, InboundVLAN, or both. If the predicate applies " - "to all ports in the switch, then only VLAN need be " - "used/instantiated. If the predicate may vary based on the " - "port, then InboundVLAN must be subclassed, and CIM_VLAN might " - "have to be subclassed as well." )] -class CIM_VLAN : CIM_ServiceAccessPoint { - - [Deprecated { "No Value" }, - Description ( "VLAN identifying number." )] - uint16 VLANNumber; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_VLANEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_VLANEndpoint.mof deleted file mode 100644 index ef062e3a..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_VLANEndpoint.mof +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) 2010 DMTF. All rights reserved. - [Version ( "2.26.0" ), - UMLPackagePath ( "CIM::Network::VLAN" ), - Description ( - "An endpoint on a switch or endstation which is assigned to a " - "given VLAN or accepts traffic from one or more VLANs. As " - "defined by the property, OperationalEndpointMode, the endpoint " - "may be configured as trunking or nontrunking. Note that an " - "endpoint may dynamically be converted to/from a trunking mode. " - "When this occurs, simply update the OperationalEndpointMode " - "property. This class is associated with a DataLink or " - "IPProtocol Endpoint - as another aspect of that endpoint - " - "using the LogicalIdentity relationship. In this case, the " - "VLANEndpoint takes the role of SameElement." )] -class CIM_VLANEndpoint : CIM_ProtocolEndpoint { - - [Write, Description ( - "The desired VLAN mode that is requested for use. (Note " - "that the current mode is given by the " - "OperationalEndpointMode property.) The following values " - "are defined: \n" - "- Access: Puts the endpoint/switch port into permanent " - "nontrunking mode and negotiates to convert the link into " - "a nontrunk link. The endpoint becomes a nontrunk " - "interface. \n" - "- Dynamic Auto: Makes the endpoint able to convert the " - "link to a trunk link. The endpoint becomes a trunk " - "interface if the neighboring interface is set to trunk " - "or desirable mode. \n" - "- Dynamic Desirable: Makes the endpoint actively attempt " - "to convert the link to a trunk link. The endpoint " - "becomes a trunk interface if the neighboring interface " - "is set to trunk, desirable, or auto mode. The default " - "switch-port mode for all Ethernet interfaces is \'dynamic " - "desirable.\' \n" - "- Trunk: Puts the endpoint into permanent trunking mode " - "and negotiates to convert the link into a trunk link. " - "The endpoint becomes a trunk interface even if the " - "neighboring interface is not a trunk interface. \n" - "- Dot1Q Tunnel: Configures the interface as a tunnel " - "(nontrunking) endpoint/port to be connected in an " - "asymmetric link with an 802.1Q trunk port. 802.1Q " - "tunneling is used to maintain customer VLAN integrity " - "across a service provider network." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7..32767", ".." }, - Values { "DMTF Reserved", "Other", "Access", "Dynamic Auto", - "Dynamic Desirable", "Trunk", "Dot1Q Tunnel", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { - "CIM_VLANEndpoint.OperationalEndpointMode", - "CIM_VLANEndpoint.OtherEndpointMode" }] - uint16 DesiredEndpointMode; - - [Write, Description ( - "A string describing the type of VLAN endpoint model that " - "is supported by this VLANEndpoint, when the value of the " - "mode property is set to 1 (i.e., \"Other\"). This " - "property should be set to NULL when the mode property is " - "any value other than 1." ), - ModelCorrespondence { "CIM_VLANEndpoint.DesiredEndpointMode", - "CIM_VLANEndpoint.OperationalEndpointMode" }] - string OtherEndpointMode; - - [Description ( - "The configuration mode for the VLAN endpoint. The " - "following values are defined: /n - Unknown: If the " - "endpoint is not VLAN aware. /n - Access: Puts the " - "endpoint into permanent nontrunking mode and negotiates " - "to convert the link into a nontrunk link. The endpoint " - "becomes a nontrunk interface. \n" - "- Dynamic Auto: Makes the endpoint able to convert the " - "link to a trunk link. The endpoint becomes a trunk " - "interface if the neighboring interface is set to trunk " - "or desirable mode. \n" - "- Dynamic Desirable: Makes the endpoint actively attempt " - "to convert the link to a trunk link. The endpoint " - "becomes a trunk interface if the neighboring interface " - "is set to trunk, desirable, or auto mode. The default " - "switch-port mode for all Ethernet interfaces is \'dynamic " - "desirable.\' \n" - "- Trunk: Puts the endpoint into permanent trunking mode " - "and negotiates to convert the link into a trunk link. " - "The endpoint becomes a trunk interface even if the " - "neighboring interface is not a trunk interface. \n" - "- Dot1Q Tunnel: Configures the interface as a tunnel " - "(nontrunking) endpoint/port to be connected in an " - "asymmetric link with an 802.1Q trunk port. 802.1Q " - "tunneling is used to maintain customer VLAN integrity " - "across a service provider network." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7..32767", ".." }, - Values { "DMTF Reserved", "Other", "Access", "Dynamic Auto", - "Dynamic Desirable", "Trunk", "Dot1Q Tunnel", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_VLANEndpoint.DesiredEndpointMode", - "CIM_VLANEndpoint.OtherEndpointMode" }] - uint16 OperationalEndpointMode; - - [Write, Description ( - "The type of VLAN encapsulation that is requested for " - "use. (Note that the encapsulation currently in use is " - "given by the OperationalVLANTrunkEncapsulation " - "property.) Note that this property is only applicable " - "when the endpoint is operating in a trunking mode (see " - "the OperationalEndpointMode property for additional " - "details). This property is either \'not applicable\' " - "(i.e., the endpoint will never be placed in a trunking " - "mode), a particular type (802.1q or Cisco ISL), or " - "\'negotiate\' (i.e., the result of the negotiation " - "between this interface and its neighbor). The value, " - "\'Negotiate\' is not allowed if the endpoint does not " - "support negotiation. This capability is hardware and " - "vendor dependent. Refer to the associated " - "VLANEndpointCapabilities.doesTrunkEncapsulationNegotiation " - "property to validate whether a particular endpoint " - "(port) supports encapsulation negotiation." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6..32767", "32768.." }, - Values { "DMTF Reserved", "Other", "Not Applicable", - "802.1q", "Cisco ISL", "Negotiate", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { - "CIM_VLANEndpointCapabilities.SupportsTrunkEncapsulationNegotiation", - "CIM_VLANEndpoint.OperationalVLANTrunkEncapsulation", - "CIM_VLANEndpoint.OtherTrunkEncapsulation" }] - uint16 DesiredVLANTrunkEncapsulation; - - [Write, Description ( - "A string describing the type of VLAN encapsulation that " - "is supported by this VLANEndpoint, when the value of the " - "encapsulation property is set to 1 (i.e., \"Other\"). " - "This property should be set to NULL when the desired " - "encapsulation property is any value other than 1." ), - ModelCorrespondence { - "CIM_VLANEndpoint.DesiredVLANTrunkEncapsulation", - "CIM_VLANEndpoint.OperationalVLANTrunkEncapsulation" }] - string OtherTrunkEncapsulation; - - [Description ( - "The type of VLAN encapsulation in use on a trunk " - "endpoint/port. This property is either \'not applicable\' " - "(i.e., the endpoint is not operating in trunking mode), " - "a particular type (802.1q or Cisco ISL), \'negotiating\' " - "(i.e., the endpoints are negotiating the encapsulation " - "type). Note that this property is only applicable when " - "the endpoint is operating in a trunking mode (see the " - "OperationalEndpointMode property for additional " - "details)." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6..32767", "32768.." }, - Values { "Unknown", "Other", "Not Applicable", "802.1q", - "Cisco ISL", "Negotiating", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { - "CIM_VLANEndpoint.OtherTrunkEncapsulation", - "CIM_VLANEndpoint.DesiredVLANTrunkEncapsulation" }] - uint16 OperationalVLANTrunkEncapsulation; - - [Description ( - "Indicates whether GARP VLAN Registration Protocol (GVRP) " - "is enabled or disabled on the trunk endpoint/port. This " - "property is \'not applicable\' unless GVRP is supported " - "by the endpoint. This is indicated in the Capabilities " - "property, VLANEndpointCapabilities.Dot1QTagging. This " - "property is applicable only when the endpoint is " - "operating in trunking mode (determined by examining the " - "SwitchEndpointMode property)." ), - ValueMap { "0", "2", "3", "4" }, - Values { "Unknown", "Not Applicable", "Enabled", "Disabled" }, - ModelCorrespondence { - "CIM_VLANEndpoint.OperationalEndpointMode", - "CIM_VLANEndpointCapabilities.Dot1QTagging" }] - uint16 GVRPStatus; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_VLANFor.mof b/build/vendor/dmtf_mof/Network/CIM_VLANFor.mof deleted file mode 100644 index 9bcb16b3..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_VLANFor.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_VLANFor -// ================================================================== - [Association, Deprecated { "No Value" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::VLAN" ), - Description ( "The VLAN for the VLAN Service." )] -class CIM_VLANFor : CIM_ServiceSAPDependency { - - [Deprecated { "No Value" }, - Override ( "Antecedent" ), - Description ( "The VLAN for the VLANService." )] - CIM_VLAN REF Antecedent; - - [Deprecated { "No Value" }, - Override ( "Dependent" ), - Min ( 1 ), - Description ( - "The VLANService which uses the VLAN for processing." )] - CIM_VLANService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_VLANService.mof b/build/vendor/dmtf_mof/Network/CIM_VLANService.mof deleted file mode 100644 index 7588d734..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_VLANService.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_VLANService -// ================================================================== - [Deprecated { "No Value" }, - Abstract, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::VLAN" ), - Description ( - "This class is deprecated following discussion as to the need " - "of a modeling a VLAN as a service. It was determined that a " - "VLAN service was not needed. VLANService represents the VLAN " - "aspects of the function performed by a switch. Some VLAN-aware " - "devices participate in protocols where VLAN information is " - "propagated among switches, e.g., GVRP in 802.1Q switches and " - "VTP in Cisco Catalyst switches. VLANService also represents " - "the function performed by the switch as a participant in such " - "a protocol. VLANService must be subclassed so that the type of " - "instance can be distinguished by its class." )] -class CIM_VLANService : CIM_Service { - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_WRRSchedulingElement.mof b/build/vendor/dmtf_mof/Network/CIM_WRRSchedulingElement.mof deleted file mode 100644 index d40c0a26..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_WRRSchedulingElement.mof +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_WRRSchedulingElement -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This class is a subclass of the abstract class " - "SchedulingElement. It introduces a new property, " - "WeightingFactor, to give some inputs a higher probability of " - "being serviced than other inputs. It also introduces a " - "Priority property, to serve as a tiebreaker to be used when " - "inputs have equal weighting factors. As is the case with all " - "subclasses of SchedulingElement, the input associated with an " - "instance of WRRSchedulingElement is of one of two types: " - "either a queue, or another scheduler. Because scheduling of " - "this type is always work conserving, the inherited boolean " - "property, WorkConserving, is restricted to TRUE in this class." )] -class CIM_WRRSchedulingElement : CIM_SchedulingElement { - - [Override ( "WorkConserving" )] - boolean WorkConserving = true; - - [Description ( - "A 32-bit bit unsigned integer defining the weighting " - "factor that offers some inputs a higher probability of " - "being serviced than other inputs. The property\'s " - "minimum value is 0, its maximum value is 100000, and its " - "Units are thousandths." ), - Units ( "Thousandths" ), - MinValue ( 0 ), - MaxValue ( 100000 )] - uint32 WeightingFactor; - - [Description ( - "A 16-bit bit unsigned integer which serves as a " - "tiebreaker, in the event that two or more inputs have " - "equal weights. A larger value represents a higher " - "priority. While this condition may not occur in some " - "implementations of a weighted round robin scheduler, " - "many implementations require a priority to resolve an " - "equal-weight condition. In the instances where this " - "behavior is not necessary or is undesirable, the " - "property may be left unspecified. \n" - "\n" - "If this property is specified for any of the " - "WRRSchedulingElements associated with a " - "PacketSchedulingService, then it MUST be specified for " - "all WRRSchedulingElements for that " - "PacketSchedulingService, and the property values for " - "these WRRSchedulingElements MUST all be different." )] - uint16 Priority; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_WeightedREDDropperService.mof b/build/vendor/dmtf_mof/Network/CIM_WeightedREDDropperService.mof deleted file mode 100644 index e582ae4f..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_WeightedREDDropperService.mof +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_WeightedREDDropperService -// ================================================================== - [Deprecated { "No value" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Network::QoS" ), - Description ( - "This class represents a logical entity that resides in the " - "data forwarding path of a network device. It describes the " - "ability to drop network traffic using a Weighted Random Early " - "Detection (WRED) algorithm. Like RED, the purpose of WRED is " - "to avoid congestion (as opposed to managing congestion). This " - "modification of the basic RED algorithm enables packets " - "belonging to different traffic classes to be dropped at " - "different queue depths. This algorithm also enables discard to " - "be done based on different information contained in the packet " - "header, such as IP Precedence, RSVP session parameters, or " - "even on other factors not directly encoded in the packet " - "header, such as the queue depth. \n" - "\n" - "Implementation of this class has shown that weighting should " - "not be a property of the class (but on an association to it), " - "and that there is insufficient data to process the drop " - "metric. The class is deprecated pending further definition by " - "the DMTF." )] -class CIM_WeightedREDDropperService : CIM_DropperService { - - [Deprecated { "No value" }, - Description ( - "This property is an enumerated 16-bit unsigned integer, " - "and defines the type of metric that is used to drop " - "traffic. Values are: \n" - "\n" - "1: Other \n" - "2: IP Precedence \n" - "3: DSCP Value \n" - "4: 802.1P Priority Value \n" - "5: RSVP Session \n" - "6: Queue Depth \n" - "7: Packet Arrival Rate." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7" }, - Values { "Other", "IP Precedence", "DSCP Value", - "802.1P Priority Value", "RSVP Session", "Queue Depth", - "Packet Arrival Rate" }, - ModelCorrespondence { - "CIM_WeightedREDDropperService.OtherDropMetric" }] - uint16 DropMetric; - - [Deprecated { "No value" }, - Description ( - "This string property is used in conjunction with the " - "DropMetric property. When the value of DropMetric is 1 " - "(i.e., \"Other\"), then the type of metric to be used is " - "defined in this property." ), - ModelCorrespondence { - "CIM_WeightedREDDropperService.DropMetric" }] - string OtherDropMetric; - - [Deprecated { - "CIM_DropThresholdCalculationService.SmoothingWeight" }, - Description ( - "This is a 32-bit real number that represents the " - "weighting factor used to determine which queues get more " - "service." ), - MinValue ( 0 ), - MaxValue ( 100 )] - real32 Weight; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_WiFiEndpointCapabilities.mof b/build/vendor/dmtf_mof/Network/CIM_WiFiEndpointCapabilities.mof deleted file mode 100644 index 7d0d0920..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_WiFiEndpointCapabilities.mof +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Network::Wireless" ), - Description ( "Describes the capabilities of a WiFiEndpoint." )] -class CIM_WiFiEndpointCapabilities : CIM_EnabledLogicalElementCapabilities { - - [Description ( - "The set of IEEE 802.11 encryption methods supported by " - "the associated WifiEndpoint. Shall contain one or more " - "of the values below.\n" - "\t* Other (1): shall indicate that at least one " - "encryption method not specified in the list below is " - "supported. If SupportedEncryptionMethods contains 1, " - "OtherSupportedEncryptionMethods shall not be NULL and " - "shall not be empty.\n" - "\t* WEP (2): shall indicate that Wired Equivalency " - "Privacy (WEP) is supported. SupportedEncryptionMethods " - "shall contain 2 only if SupportedAuthenticationMethods " - "contains 2 (\"Open System\") or 3 (\"Shared Key\").\n" - "\t* TKIP (3): shall indicate that the Temporal Key " - "Integrity Protocol (TKIP) is supported. " - "SupportedEncryptionMethods shall contain 3 only if " - "SupportedAuthenticationMethods contains 4 (\"WPA PSK\"), " - "5 (\"WPA IEEE 802.1x\"), 6 (\"WPA2 PSK\"), or 7 (\"WPA2 " - "IEEE 802.1x\").\n" - "\t* CCMP (4): shall indicate that the Counter Mode with " - "Cipher Block Chaining Message Authentication Code " - "Protocol (CCMP) is supported. SupportedEncryptionMethods " - "shall contain 4 only if SupportedAuthenticationMethods " - "contains 4 (\"WPA PSK\"), 5 (\"WPA IEEE 802.1x\"), 6 " - "(\"WPA2 PSK\"), or 7 (\"WPA2 IEEE 802.1x\").\n" - "\t* None (5): shall indicate that the associated " - "WiFiEndpoint supports connecting to a network without " - "encryption. SupportedEncryptionMethods shall contain 5 " - "only if SupportedAuthenticationMethods contains 2 (\"Open " - "System\") or 3 (\"Shared Key\")." ), - ValueMap { "1", "2", "3", "4", "5", ".." }, - Values { "Other", "WEP", "TKIP", "CCMP", "None", - "DMTF Reserved" }, - MappingStrings { "IEEE 802.11-2007 | 8" }, - ModelCorrespondence { "CIM_WifiEndpoint.EncryptionMethod" }] - uint16 SupportedEncryptionMethods[]; - - [Description ( - "Shall contain additional encryption methods supported by " - "the associated WifiEndpoint, but not listed in the " - "valuemap for SupportedEncryptionMethods. The positions " - "of these strings are the lowest indices of the array, " - "and do not correspond to the positions of the values in " - "SupportedEncryptionMethods." ), - ModelCorrespondence { "CIM_WifiEndpoint.OtherEncryptionMethod" }] - string OtherSupportedEncryptionMethods[]; - - [Description ( - "The set of IEEE 802.11 authentication methods supported " - "by the associated WifiEndpoint.\t* Other (1): shall " - "indicate that at least one authentication method not " - "specified in the list below is supported. If " - "SupportedAuthenticationMethods contains 1, " - "OtherSupportedAuthenticationMethods shall not be NULL " - "and shall not be empty.\n" - "\t* Open System (2): shall indicate that Open System " - "authentication is supported. " - "SupportedAuthenticationMethods shall contain 2 only if " - "SupportedEncryptionMethods contains 2 (\"WEP\") or 5 (\"None\").\n" - "\t* Shared Key (3): shall indicate Shared Key " - "authentication is supported. " - "SupportedAuthenticationMethods shall contain 3 only if " - "SupportedEncryptionMethods contains 2 (\"WEP\") or 5 (\"None\").\n" - "\t* WPA PSK (4): shall indicate that WPA (Wi-Fi " - "Protected Access) PSK (Pre-Shared Key) authentication is " - "supported. SupportedAuthenticationMethods shall contain " - "4 only if SupportedEncryptionMethods contains 3 (\"TKIP\") " - "or 4 (\"CCMP\").\n" - "\t* WPA IEEE 802.1x (5): shall indicate that WPA (Wi-Fi " - "Protected Access) IEEE 802.1x authentication is " - "supported. SupportedAuthenticationMethods shall contain " - "5 only if SupportedEncryptionMethods contains 3 (\"TKIP\") " - "or 4 (\"CCMP\").\n" - "\t* WPA2 PSK (6): shall indicate that WPA2 (Wi-Fi " - "Protected Access Version 2) PSK (Pre-Shared Key) " - "authentication is supported. " - "SupportedAuthenticationMethods shall contain 6 only if " - "SupportedEncryptionMethods contains 3 (\"TKIP\") or 4 (\"CCMP\").\n" - "\t* WPA2 IEEE 802.1x (7): shall indicate that WPA2 " - "(Wi-Fi Protected Access Version 2) IEEE 802.1x " - "authentication is supported. " - "SupportedAuthenticationMethods shall contain 7 only if " - "SupportedEncryptionMethods contains 3 (\"TKIP\") or 4 " - "(\"CCMP\")." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", ".." }, - Values { "Other", "Open System", "Shared Key", "WPA PSK", - "WPA IEEE 802.1x", "WPA2 PSK", "WPA2 IEEE 802.1X", - "DMTF Reserved" }, - ArrayType ( "Indexed" ), - MappingStrings { "IEEE 802.11-2007 | 8" }, - ModelCorrespondence { "CIM_WifiEndpoint.AuthenticationMethod" }] - uint16 SupportedAuthenticationMethods[]; - - [Description ( - "Shall contain additional authentication methods " - "supported by the associated WifiEndpoint, but not listed " - "in the valuemap for SupportedAuthenticationMethods. The " - "positions of these strings are the lowest indices of the " - "array, and do not correspond to the positions of the " - "values in SupportedAuthenticationMethods." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_WifiEndpoint.OtherAuthenticationMethod" }] - string OtherSupportedAuthenticationMethods[]; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_WiFiEndpointSettings.mof b/build/vendor/dmtf_mof/Network/CIM_WiFiEndpointSettings.mof deleted file mode 100644 index 921f0f59..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_WiFiEndpointSettings.mof +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Network::Wireless" ), - Description ( - "CIM_WiFiEndpointSettings describes setting data that can be " - "applied to an instance of CIM_WiFiEndpoint to enable it to " - "associate to a particular Wi-Fi network." )] -class CIM_WiFiEndpointSettings : CIM_SettingData { - - [Description ( - "Priority shall indicate the priority of the instance " - "among all WiFiEndpointSettings instances." )] - uint8 Priority; - - [Description ( - "SSID shall indicate the Service Set Identifier (SSID) " - "that shall be used when the settings are applied to a " - "WiFiEndpoint. An SSID identifies a wireless network." ), - MappingStrings { "IEEE 802.11-2007 | 7.3.2.1" }] - string SSID; - - [Description ( - "BSSType shall indicate the Basic Service Set (BSS) Type " - "that shall be used when the settings are applied. A " - "Basic Service Set is a set of stations controlled by a " - "single coordination function.\n" - "\t* Independent: the WiFiEndpoint is associated directly " - "to another client station.\n" - "\t* Infrastructure: the WiFiEndpoint is associated to a " - "network via an access point." ), - ValueMap { "0", "2", "3", ".." }, - Values { "Unknown", "Independent", "Infrastructure", - "DMTF Reserved" }, - MappingStrings { "IEEE 802.11-2007 | 3.16" }] - uint16 BSSType; - - [Description ( - "EncryptionMethod shall specify the 802.11 encryption " - "method used when the settings are applied. \t* Other " - "(1): shall indicate that the desired encryption method " - "is not specified in the list below. If this value is " - "used, OtherEncryptionMethod should not be NULL and " - "should not be empty.\n" - "\t* WEP (2): shall indicate that the desired encryption " - "method is Wired Equivalency Privacy (WEP). This value " - "should be used only if AuthenticationMethod contains 2 " - "(\"Open System\") or 3 (\"Shared Key\").\n" - "\t* TKIP (3): shall indicate that the desired encryption " - "method is Temporal Key Integrity Protocol (TKIP). This " - "value should be used only if AuthenticationMethod " - "contains 4 (\"WPA PSK\"), 5 (\"WPA IEEE 802.1x\"), 6 " - "(\"WPA2 PSK\"), or 7 (\"WPA2 IEEE 802.1x\").\n" - "\t* CCMP (4): shall indicate that the desired encryption " - "method is Counter Mode with Cipher Block Chaining " - "Message Authentication Code Protocol (CCMP). This value " - "should be used only if AuthenticationMethod contains 4 " - "(\"WPA PSK\"), 5 (\"WPA IEEE 802.1x\"), 6 (\"WPA2 PSK\"), " - "or 7 (\"WPA2 IEEE 802.1x\").\n" - "\t* None (5): shall indicate that no encryption is " - "desired. This value should be used only if " - "AuthenticationMethod contains 2 (\"Open System\") or 3 " - "(\"Shared Key\")." ), - ValueMap { "1", "2", "3", "4", "5", "6.." }, - Values { "Other", "WEP", "TKIP", "CCMP", "None", - "DMTF Reserved" }, - MappingStrings { "IEEE 802.11-2007 | 8" }, - ModelCorrespondence { "CIM_WiFiEndpoint.EncryptionMethod", - "CIM_WiFiEndpointSettings.AuthenticationMethod", - "CIM_WiFiEndpointSettings.OtherEncryptionMethod" }] - uint16 EncryptionMethod; - - [Description ( - "OtherEncryptionMethod shall specify the 802.11 " - "encryption method used when the settings are applied if " - "and only if EncryptionMethod contains \"Other\". The " - "format of this string shall be vendor-specific." ), - ModelCorrespondence { - "CIM_WiFiEndpoint.OtherEncryptionMethod", - "CIM_WiFiEndpointSettings.EncryptionMethod" }] - string OtherEncryptionMethod; - - [Description ( - "AuthenticationMethod shall specify the 802.11 " - "authentication method used when the settings are " - "applied. \t* Other (1): shall indicate that the desired " - "authentication method is not specified in the list " - "below. If AuthenticationMethod contains 1, " - "OtherAuthenticationMethod should not be NULL and should " - "not be empty.\n" - "\t* Open System (2): shall indicate that the desired " - "authentication method is Open System. " - "AuthenticationMethod should contain 2 only if " - "EncryptionMethod contains 2 (\"WEP\") or 5 (\"None\").\n" - "\t* Shared Key (3): shall indicate that the desired " - "authentication method is Shared Key. " - "AuthenticationMethod should contain 3 only if " - "EncryptionMethod contains 2 (\"WEP\") or 5 (\"None\").\n" - "\t* WPA PSK (4): shall indicate that the desired " - "authentication method is WPA (Wi-Fi Protected Access) " - "PSK (Pre-Shared Key). AuthenticationMethod should " - "contain 4 only if EncryptionMethod contains 3 (\"TKIP\") " - "or 4 (\"CCMP\").\n" - "\t* WPA IEEE 802.1x (5): shall indicate that the desired " - "authentication method is WPA (Wi-Fi Protected Access) " - "IEEE 802.1x. AuthenticationMethod should contain 5 only " - "if EncryptionMethod contains 3 (\"TKIP\") or 4 (\"CCMP\").\n" - "\t* WPA2 PSK (6): shall indicate that the desired " - "authentication method is WPA2 (Wi-Fi Protected Access " - "Version 2) PSK (Pre-Shared Key). AuthenticationMethod " - "should containt 6 only if EncryptionMethod contains 3 " - "(\"TKIP\") or 4 (\"CCMP\").\n" - "\t* WPA2 IEEE 802.1x (7): shall indicated that the " - "desired authentication method is WPA2 (Wi-Fi Protected " - "Access Version 2) IEEE 802.1x. AuthenticationMethod " - "should contain 7 only if EncryptionMethod contains 3 " - "(\"TKIP\") or 4 (\"CCMP\")." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8.." }, - Values { "Other", "Open System", "Shared Key", "WPA PSK", - "WPA IEEE 802.1x", "WPA2 PSK", "WPA2 IEEE 802.1x", - "DMTF Reserved" }, - MappingStrings { "IEEE 802.11-2007 | 8" }, - ModelCorrespondence { - "CIM_WiFiEndpoint.AuthenticationMethod", - "CIM_WiFiEndpointSettings.EncryptionMethod", - "CIM_WiFiEndpointSettings.OtherAuthenticationMethod" }] - uint16 AuthenticationMethod; - - [Description ( - "OtherAuthenticationMethod shall specify the 802.11 " - "authentication method used when the settings are applied " - "if and only if AuthenticationMethod contains \"Other\". " - "The format of this string shall be vendor-specific." ), - ModelCorrespondence { - "CIM_WiFiEndpoint.OtherAuthenticationMethod", - "CIM_WiFiEndpointSettings.AuthenticationMethod" }] - string OtherAuthenticationMethod; - - [Description ( - "Keys shall contain the default WEP encryption keys. Keys " - "should be non-NULL if and only if EncryptionMethod " - "contains 2 (\"WEP\")." ), - OctetString, ArrayType ( "Indexed" ), - MappingStrings { - "MIB.IETF|IEEE 802.11 MIB.dot11WEPDefaultKeys" }, - ModelCorrespondence { "CIM_WiFiEndpointSettings.KeyIndex", - "CIM_WiFiEndpointSettings.EncryptionMethod" }] - string Keys[]; - - [Description ( - "KeyIndex shall contain the index of the active key in " - "the Keys array property. KeyIndex should be non-NULL if " - "and only Keys is non-NULL." ), - MappingStrings { - "MIB.IETF|IEEE 802.11 MIB.dot11WEPDefaultKeyID" }, - ModelCorrespondence { "CIM_WiFiEndpointSettings.Keys" }] - uint8 KeyIndex; - - [Description ( - "The actual binary value of a PSK (pre-shared key). " - "PSKValue and PSKPassPhrase should not both be non-NULL. " - "PSKValue should be NULL if AuthenticationMethod does not " - "contain 4 (\"WPA PSK\") or 6 (\"WPA2 PSK\")." ), - OctetString, MappingStrings { - "MIB.IETF|IEEE 802.11 MIB.dot11RSNAConfigPSKValue" }, - ModelCorrespondence { - "CIM_WiFiEndpointSettings.PSKPassPhrase", - "CIM_WiFiEndpointSettings.AuthenticationMethod" }] - uint8 PSKValue[]; - - [Description ( - "An ASCII alphanumeric string used to generate a PSK " - "(pre-shared key). PSKPassPhrase and PSKValue should not " - "both be non-NULL. PSKPassPhrase should be NULL if " - "AuthenticationMethod does not contain 4 (\"WPA PSK\") or " - "6 (\"WPA2 PSK\")." ), - MinLen ( 8 ), - MaxLen ( 63 ), - MappingStrings { - "MIB.IETF|IEEE 802.11 MIB.dot11RSNAConfigPSKPassPhrase" }, - ModelCorrespondence { "CIM_WiFiEndpointSettings.PSKValue", - "CIM_WiFiEndpointSettings.AuthenticationMethod" }] - string PSKPassPhrase; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_WiFiNetworkDetectionSettings.mof b/build/vendor/dmtf_mof/Network/CIM_WiFiNetworkDetectionSettings.mof deleted file mode 100644 index bd79a663..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_WiFiNetworkDetectionSettings.mof +++ /dev/null @@ -1,57 +0,0 @@ -//Copyright (c) 2009 DMTF. All Rights Reserved. - [Version ( "2.23.0" ), - UMLPackagePath ( "CIM::Network::Wireless" ), - Description ( - "CIM_WiFiNetworkDetectionSettings describes setting data that " - "control the behavior of the network detection and selection " - "logic in a Wi-Fi Port." )] -class CIM_WiFiNetworkDetectionSettings : CIM_SettingData { - - [Description ( - "Enumeration indicating the type of wireless networks " - "that will be searched for.\n" - "A value of 2 \"Any\" shall indicate that no restrictions " - "are enforced on the SSIDs searched for.\n" - "A value of 3 \"Preferred\" shall indicate that only " - "networks listed in the PreferredNetworks property are " - "searced for." ), - ValueMap { "2", "3", "..", "16384..32767" }, - Values { "Any", "Preferred", "DMTF Reserved", - "Vendor Reserved" }] - uint16 TargetNetworkCategories; - - [Description ( - "PreferredNetworks lists the SSIDs of preferred wireless " - "LAN networks. Each value contained shall also be " - "contained in the KnownNetworks property." )] - string PreferredNetworks[]; - - [Description ( - "KnownNetworks lists the SSIDs of networks that have been " - "previously identified to or by the wireless LAN endpoint " - "on the platform." )] - string KnownNetworks[]; - - [Description ( - "MinimumSignalStrength specifies the minimum signal " - "strength required to be received by the wireless LAN " - "endpoint in order for it to attempt to connect to the " - "wireless network." ), - PUnit ( "decibel(m) * -1" )] - uint16 MinimumSignalStrength; - - [Description ( - "ProtocolTypes lists the different 802.11 variations that " - "a network may support in order to for the wireless " - "catcher to attempt a connection to the network. The " - "enumeration values are selected to align with " - "CIM_ProtocolEndpoint.ProtocolIFType\'s enumeration." ), - ValueMap { "0", "1", "70", "71", "72", "73", "..", - "16000..65535" }, - Values { "Unknown", "Other", "802.11a", "802.11b", "802.11g", - "802.11n", "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_LogicalPort.PortType" }] - uint16 PortTypes[]; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_X509CredentialFilterEntry.mof b/build/vendor/dmtf_mof/Network/CIM_X509CredentialFilterEntry.mof deleted file mode 100644 index 6ccc986b..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_X509CredentialFilterEntry.mof +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_X509CredentialFilterEntry -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Network::Filtering" ), - Description ( - "An X509CredentialFilterEntry allows filtering on the " - "attributes of an X.509 certificate. Each instance includes a " - "value for MatchFieldName that specifies the particular X.509 " - "attribute that is being matched." ), - MappingStrings { "IPSP Policy Model.IETF|CredentialFilterEntry" }] -class CIM_X509CredentialFilterEntry : CIM_FilterEntryBase { - - [Required, Description ( - "MatchFieldName specifies the X.509 attribute to match " - "against MatchFieldValue. Note that this enumeration is " - "modified from the IETF\'s IPSP Policy Model to " - "explicitly list the \'standard\' X.509 attributes." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "..", "0x8000.." }, - Values { "Other", "Version", "Serial Number", - "Signature Algorithm Identifier", "Issuer Name", - "Validity Period", "Subject Name", - "Subject Public Key Info", "Key Usage", "Alternate Name", - "DMTF Reserved", "Vendor Reserved" }, - MappingStrings { - "IPSP Policy Model.IETF|CredentialFilterEntry.MatchFieldName" }, - ModelCorrespondence { - "CIM_X509CredentialFilterEntry.MatchFieldValue" }] - string MatchFieldName; - - [Required, Description ( - "MatchFieldValue specifies the value to compare with the " - "credential attribute (defined in MatchFieldName), to " - "determine if the credential matches this filter entry. " - "An implementation must convert this string to a DER- " - "encoded string before matching against the values " - "extracted from credentials at runtime. \n" - "\n" - "Note that a wildcard mechanism may be used when " - "MatchFieldName specifies a general character string (for " - "example, if MatchFieldName=7, \'Subject Name\'). " - "MatchFieldValue may contain a wildcard character, \'*\', " - "in the pattern match specification. For example, for " - "\'Subject Name\', a MatchFieldValue of " - "\'cn=*,ou=engineering,o=foo,c=be\' will successfully " - "match a certificate whose subject attribute is " - "\'cn=JaneDoe,ou=engineering,o=foo,c=be\'. A wildcard can " - "be used to represent 0 or more characters as would be " - "displayed to the user (i.e., a wildcard pattern match " - "operates on displayable character boundaries)." ), - MappingStrings { - "IPSP Policy Model.IETF|CredentialFilterEntry.MatchFieldName" }, - ModelCorrespondence { - "CIM_X509CredentialFilterEntry.MatchFieldName" }] - string MatchFieldValue; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_iSCSICapabilities.mof b/build/vendor/dmtf_mof/Network/CIM_iSCSICapabilities.mof deleted file mode 100644 index 7b4f966b..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_iSCSICapabilities.mof +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.11.0" ), - UMLPackagePath ( "CIM::Network::iSCSI" ), - Description ( - "The capabilites for an iSCSI Network Entity. An instance of " - "this class will be associated by ElementCapabilities to a " - "instance of ComputerSystem that represents the Network Entity. " - "These capability properties are associated to a Network " - "Entity/ComputerSystem since they affect all login negotiations " - "on all iSCSI ProtocolEndpoints aggregated to the system." )] -class CIM_iSCSICapabilities : CIM_Capabilities { - - [Description ( - "The minimum version number of the iSCSI specification " - "such that this iSCSI instance supports this minimum " - "value, the maximum value indicated by the corresponding " - "property MaximumSpecificationVersionSupported, and all " - "versions in between." ), - MinValue ( 0 ), - MaxValue ( 255 ), - MappingStrings { "MIB.IETF|iSCSI-MIB.iscsiInstVersionMin" }, - ModelCorrespondence { - "CIM_iSCSICapabilities.MaximumSpecificationVersionSupported", - "CIM_iSCSIConnection.ActiveiSCSIVersion" }] - uint8 MinimumSpecificationVersionSupported; - - [Description ( - "The maximum version number of the iSCSI specification " - "such that this iSCSI instance supports this maximum " - "value, the minimum value indicated by the corresponding " - "property MinimumSpecificationVersionSupported, and all " - "versions in between." ), - MinValue ( 0 ), - MaxValue ( 255 ), - MappingStrings { "MIB.IETF|ISCSI-MIB.iscsiInstVersionMax" }, - ModelCorrespondence { - "CIM_iSCSICapabilities.MinimumSpecificationVersionSupported", - "CIM_iSCSIConnection.ActiveiSCSIVersion" }] - uint8 MaximumSpecificationVersionSupported; - - [Description ( - "An array containing a list of authentication methods " - "supported by this Network Entity." ), - ValueMap { "2", "3", "4", "5" }, - Values { "(None", "SRP", "CHAP", "Kerberos" }, - ArrayType ( "Indexed" ), - MappingStrings { "MIB.IETF|IPS-AUTH-MIB.ipsAuthCredAuthMethod" }, - ModelCorrespondence { - "CIM_iSCSIConnectionSettings.PrimaryAuthenticationMethod", - "CIM_iSCSIConnectionSettings.SecondaryAuthenticationMethod", - "CIM_iSCSIConnection.AuthenticationMethodUsed" }] - uint16 AuthenticationMethodsSupported[]; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_iSCSIConnection.mof b/build/vendor/dmtf_mof/Network/CIM_iSCSIConnection.mof deleted file mode 100644 index 82391780..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_iSCSIConnection.mof +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.11.0" ), - UMLPackagePath ( "CIM::Network::iSCSI" ), - Description ( - "This class contains the attributes of and negotiated values " - "for, an iSCSI Connection which is modeled as a subclass of " - "NetworkPipe. The original settings that are a starting point " - "for negotiation are found in the class " - "iSCSIConnectionSettings." )] -class CIM_iSCSIConnection : CIM_NetworkPipe { - - [Description ( "The iSCSI Connection ID for this connection." ), - MinValue ( 1 ), - MaxValue ( 65535 ), - MappingStrings { "MIB.IETF|iSCSI-MIB.iscsiCxnCid" }] - uint32 ConnectionID; - - [Description ( - "The maximum data payload size supported for command or " - "data PDUs able to be received on this connection." ), - Units ( "Bytes" ), - MinValue ( 512 ), - MaxValue ( 16777215 ), - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiCxnMaxRecvDataSegLength" }, - ModelCorrespondence { - "CIM_iSCSIConnectionSettings.MaxReceiveDataSegmentLength" }] - uint32 MaxReceiveDataSegmentLength; - - [Description ( - "The maximum data payload size supported for command or " - "data PDUs to be sent on this connection." ), - Units ( "Bytes" ), - MinValue ( 512 ), - MaxValue ( 16777215 ), - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiCxnMaxXmitDataSegLength" }] - uint32 MaxTransmitDataSegmentLength; - - [Description ( - "This property identifies the iSCSI header digest scheme " - "in use within this connection." ), - ValueMap { "1", "2", "3" }, - Values { "Other", "No Digest", "CRC32C" }, - MappingStrings { "MIB.IETF|iSCSI-MIB.iscsiCxnHeaderIntegrity" }, - ModelCorrespondence { - "CIM_iSCSIConnectionSettings.PrimaryHeaderDigestMethod", - "CIM_iSCSIConnectionSettings.SecondaryHeaderDigestMethod", - "CIM_iSCSIConnection.OtherHeaderDigestMethod" }] - uint16 HeaderDigestMethod; - - [Description ( - "A string describing the Header Digest scheme in use when " - "HeaderDigestMethod is equal to the value 1, \"Other\"." ), - ModelCorrespondence { - "CIM_iSCSIConnectionSettings.OtherPrimaryHeaderDigestMethod", - "CIM_iSCSIConnectionSettings.OtherSecondaryHeaderDigestMethod", - "CIM_iSCSIConnection.HeaderDigestMethod" }] - string OtherHeaderDigestMethod; - - [Description ( - "This property identifies the iSCSI data digest scheme in " - "use within this connection." ), - ValueMap { "1", "2", "3" }, - Values { "Other", "No Digest", "CRC32C" }, - MappingStrings { "MIB.IETF|iSCSI-MIB.iscsiCxnDataIntegrity" }, - ModelCorrespondence { - "CIM_iSCSIConnectionSettings.PrimaryHeaderDigestMethod", - "CIM_iSCSIConnectionSettings.SecondaryHeaderDigestMethod", - "CIM_iSCSIConnection.OtherDataDigestMethod" }] - uint16 DataDigestMethod; - - [Description ( - "A string describing the Data Digest scheme in use when " - "DataDigestMethod is equal to the value 1, \"Other\"." ), - ModelCorrespondence { - "CIM_iSCSIConnectionSettings.OtherPrimaryDataDigestMethod", - "CIM_iSCSIConnectionSettings.OtherSecondaryDataDigestMethod", - "CIM_iSCSIConnection.DataDigestMethod" }] - string OtherDataDigestMethod; - - [Description ( - "This property indicates whether or not this connection " - "is receiving markers in in its incoming data stream." ), - MappingStrings { "MIB.IETF|iSCSI-MIB.iscsiCxnRecvMarker" }, - ModelCorrespondence { - "CIM_iSCSIConnectionSettings.RequestingMarkersOnReceive" }] - boolean ReceivingMarkers; - - [Description ( - "This property indicates whether or not this connection " - "is inserting markers in in its outgoing data stream." ), - MappingStrings { "MIB.IETF|iSCSI-MIB.iscsiCxnSendMarker" }] - boolean SendingMarkers; - - [Description ( - "Active version number of the iSCSI specification " - "negotiated on this connection." ), - MappingStrings { "MIB.IETF|iSCSI-MIB.iscsiCxnVersionActive" }, - ModelCorrespondence { - "CIM_iSCSICapabilities.MinimumSpecificationVersionSupported", - "CIM_iSCSICapabilities.MaximumSpecificationVersionSupported" }] - boolean ActiveiSCSIVersion; - - [Description ( - "The authentication method being used on this connection, " - "as communicated during the login phase." ), - ValueMap { "2", "3", "4", "5" }, - Values { "No Authentication", "SRP", "CHAP", "Kerberos" }, - MappingStrings { "MIB.IETF|IPS-AUTH-MIB.ipsAuthCredAuthMethod" }, - ModelCorrespondence { - "CIM_iSCSIConnectionSettings.PrimaryAuthenticationMethod", - "CIM_iSCSIConnectionSettings.SecondaryAuthenticationMethod", - "CIM_iSCSICapabilities.AuthenticationMethodsSupported" }] - uint16 AuthenticationMethodUsed; - - [Description ( - "This property when true, indicates that the Target was " - "required to authenticate itself to the Initiator, in " - "addition to the Initiator authenticating itself to the " - "Target. When false, and AuthenticationMethod is other " - "than \'No Authentication\', only the Initatior " - "authenticated itself to the Target. \n" - "When AuthenticationMethodUsed is \'No Authentication\', " - "this property must be false." )] - boolean MutualAuthentication; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_iSCSIConnectionSettings.mof b/build/vendor/dmtf_mof/Network/CIM_iSCSIConnectionSettings.mof deleted file mode 100644 index 351895a6..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_iSCSIConnectionSettings.mof +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.11.0" ), - UMLPackagePath ( "CIM::Network::iSCSI" ), - Description ( - "The settings for the usage of an iSCSI NetworkPortal by an " - "iSCSIProtcolEndpoint. These settings are the starting point " - "for negotiation for connection establishment. If an " - "implmentation supports different connections settings for a " - "NetworkPortal for each iSCSIProtocolEndpoint that is bound to " - "it, an instance of this class will be associated by " - "ElementSettingData to an instance of iSCSIProtocolEndpoint. If " - "an implementation supports the same connection settings for a " - "NetworkPortal for all iSCSIProtocolEndpoints then an instance " - "of this class will be associated by ElementSettingData to an " - "instance of either TCPProtocolEndpoint (When the NetworkPortal " - "is a target) or IPProtocolEndpoint (When the NetworkPortal is " - "an initiator). The properties that reflect the actual outcome " - "of the negotiation are found in the iSCSIConnection class." )] -class CIM_iSCSIConnectionSettings : CIM_SettingData { - - [Write, Description ( - "The maximum PDU length this portal can receive. This MAY " - "be constrained by hardware characteristics and " - "individual implementations MAY choose not to allow this " - "property to be changed." ), - Units ( "Bytes" ), - MinValue ( 512 ), - MaxValue ( 16777215 ), - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiPortalMaxRecvDataSegLength" }, - ModelCorrespondence { - "CIM_iSCSIConnection.MaxReceiveDataSegmentLength" }] - uint32 MaxReceiveDataSegmentLength = 8192; - - [Write, Description ( - "The preferred header digest for this portal." ), - ValueMap { "1", "2", "3" }, - Values { "Other", "No Digest", "CRC32C" }, - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiPortalPrimaryHdrDigest" }, - ModelCorrespondence { - "CIM_iSCSIConnection.HeaderDigestMethod", - "CIM_iSCSIConnectionSettings.OtherPrimaryHeaderDigestMethod" }] - uint16 PrimaryHeaderDigestMethod = 3; - - [Write, Description ( - "A string describing the preferred Header Digest method " - "when PrimaryHeaderDigestMethod is equal to the value 1, " - "\"Other\"." ), - ModelCorrespondence { - "CIM_iSCSIConnection.OtherHeaderDigestMethod", - "CIM_iSCSIConnectionSettings.PrimaryHeaderDigestMethod" }] - string OtherPrimaryHeaderDigestMethod; - - [Write, Description ( - "The preferred data digest method for this portal." ), - ValueMap { "1", "2", "3" }, - Values { "Other", "No Digest", "CRC32C" }, - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiPortalPrimaryDataDigest" }, - ModelCorrespondence { "CIM_iSCSIConnection.DataDigestMethod", - "CIM_iSCSIConnectionSettings.OtherPrimaryDataDigestMethod" }] - uint16 PrimaryDataDigestMethod = 3; - - [Write, Description ( - "A string describing the preferred Data Digest method " - "when PrimaryDataDigestMethod is equal to the value 1, " - "\"Other\"." ), - ModelCorrespondence { - "CIM_iSCSIConnection.OtherDataDigestMethod", - "CIM_iSCSIConnectionSettings.PrimaryDataDigestMethod" }] - string OtherPrimaryDataDigestMethod; - - [Write, Description ( - "The secondary header digest preference for this portal." ), - ValueMap { "1", "2", "3", "4" }, - Values { "Other", "No Digest", "CRC32C", - "No Secondary Preference" }, - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiPortalSecondaryHdrDigest" }, - ModelCorrespondence { - "CIM_iSCSIConnection.HeaderDigestMethod", - "CIM_iSCSIConnectionSettings.OtherSecondaryHeaderDigestMethod" }] - uint16 SecondaryHeaderDigestMethod = 2; - - [Write, Description ( - "A string describing the alternate Header Digest method " - "preference when SecondaryHeaderDigestMethod is equal to " - "the value 1, \"Other\"." ), - ModelCorrespondence { - "CIM_iSCSIConnection.OtherHeaderDigestMethod", - "CIM_iSCSIConnectionSettings.SecondaryHeaderDigestMethod" }] - string OtherSecondaryHeaderDigestMethod; - - [Write, Description ( - "The secondary data digest preference for this portal." ), - ValueMap { "1", "2", "3", "4" }, - Values { "Other", "No Digest", "CRC32C", - "No Secondary Preference" }, - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiPortalSecondaryDataDigest" }, - ModelCorrespondence { "CIM_iSCSIConnection.DataDigestMethod", - "CIM_iSCSIConnectionSettings.OtherSecondaryDataDigestMethod" }] - uint16 SecondaryDataDigestMethod = 2; - - [Write, Description ( - "A string describing the alternate Data Digest method " - "preference when SecondaryDataDigestMethod is equal to " - "the value 1, \"Other\"." ), - ModelCorrespondence { - "CIM_iSCSIConnection.OtherDataDigestMethod", - "CIM_iSCSIConnectionSettings.SecondaryDataDigestMethod" }] - string OtherSecondaryDataDigestMethod; - - [Write, Description ( - "This property indicates whether or not this portal will " - "request markers in it\'s incoming data stream." ), - MappingStrings { "MIB.IETF|iSCSI-MIB.iscsiPortalRecvMarker" }, - ModelCorrespondence { "CIM_iSCSIConnection.ReceivingMarkers" }] - boolean RequestingMarkersOnReceive = false; - - [Description ( - "The preferred primary authentication method for " - "connections, as communicated during the login phase." ), - ValueMap { "2", "3", "4", "5", "6" }, - Values { "None", "No Authentication", "SRP", "CHAP", - "Kerberos" }, - MappingStrings { "MIB.IETF|IPS-AUTH-MIB.ipsAuthCredAuthMethod" }, - ModelCorrespondence { - "CIM_iSCSICapabilities.AuthenticationMethodsSupported", - "CIM_iSCSIConnectionSettings.SecondaryAuthenticationMethod", - "CIM_iSCSIConnection.AuthenticationMethodUsed" }] - uint16 PrimaryAuthenticationMethod = 5; - - [Description ( - "The preferred secondary authentication method for " - "connections, as communicated during the login phase." ), - ValueMap { "2", "3", "4", "5", "6" }, - Values { "None", "No Authentication", "SRP", "CHAP", - "Kerberos" }, - MappingStrings { "MIB.IETF|IPS-AUTH-MIB.ipsAuthCredAuthMethod" }, - ModelCorrespondence { - "CIM_iSCSICapabilities.AuthenticationMethodsSupported", - "CIM_iSCSIConnectionSettings.PrimaryAuthenticationMethod", - "CIM_iSCSIConnection.AuthenticationMethodUsed" }] - uint16 SecondaryAuthenticationMethod = 3; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_iSCSILoginStatistics.mof b/build/vendor/dmtf_mof/Network/CIM_iSCSILoginStatistics.mof deleted file mode 100644 index a8f8ef04..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_iSCSILoginStatistics.mof +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.11.0" ), - UMLPackagePath ( "CIM::Network::iSCSI" ), - Description ( - "Statistics for Logins and Logouts to or from an iSCSI Node. An " - "instance of this class will be associated by " - "ElementStatisticalData to an instance of " - "SCSIProtocolController that represents the Node. The Node can " - "be either an Initiator or Target and so the interpretation of " - "the properties in this class varies accordingly." )] -class CIM_iSCSILoginStatistics : CIM_StatisticalData { - - [Description ( - "This property counts the number of times a login attempt " - "from this node(initiator) or to this node(target) has " - "failed." ), - Counter, MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiIntrLoginFailures", - "MIB.IETF|iSCSI-MIB.iscsiTgtLoginFailures" }] - uint64 LoginFailures; - - [Description ( - "The timestamp of the most recent failure of a login " - "attempt from this node(initiator) or to this " - "node(target). A value of zero indicates that no such " - "failures have occurred since the last system boot." ), - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiIntrLastFailureTime", - "MIB.IETF|iSCSI-MIB.iscsiTgtLastFailureTime" }, - ModelCorrespondence { - "CIM_iSCSILoginStatistics.LastLoginFailureType", - "CIM_iSCSILoginStatistics.LastLoginFailureRemoteNodeName" }] - datetime LastLoginFailureTime; - - [Description ( - "The type of the most recent failure of a login attempt " - "from this node(initiator) or to this node(target)." ), - ValueMap { "1", "2", "3", "4", "5" }, - Values { "Other", "Negotiate", "Authenticate", "Authorize", - "Redirect" }, - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiIntrLastFailureType", - "MIB.IETF|iSCSI-MIB.iscsiTgtLastFailureType" }, - ModelCorrespondence { - "CIM_iSCSILoginStatistics.OtherLastLoginFailureType", - "CIM_iSCSILoginStatistics.LastLoginFailureTime", - "CIM_iSCSILoginStatistics.LastLoginFailureRemoteNodeName" }] - uint16 LastLoginFailureType; - - [Description ( - "A string describing the type of the last login failure " - "when LastLoginFailureType is equal to the value 1, " - "\"Other\"." ), - ModelCorrespondence { - "CIM_iSCSILoginStatistics.LastLoginFailureType" }] - string OtherLastLoginFailureType; - - [Description ( - "The iSCSI name of the remote node that failed the last " - "login attempt." ), - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiIntrLastTgtFailureName", - "MIB.IETF|iSCSI-MIB.iscsiTgtLastIntrFailureName" }, - ModelCorrespondence { - "CIM_iSCSILoginStatistics.LastLoginFailureTime", - "CIM_iSCSILoginStatistics.LastLoginFailureType", - "CIM_iSCSILoginStatistics.LastLoginFailureRemoteAddressType", - "CIM_iSCSILoginStatistics.LastLoginFailureRemoteAddress" }] - string LastLoginFailureRemoteNodeName; - - [Description ( - "The type of Internet Network Address of the remote node " - "that failed the last login attempt." ), - ValueMap { "1", "2" }, - Values { "IPv4", "IPv6" }, - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiIntrLastTgtFailureAddrType", - "MIB.IETF|iSCSI-MIB.iscsiTgtLastIntrFailureAddrType" }, - ModelCorrespondence { - "CIM_iSCSILoginStatistics.LastLoginFailureRemoteNodeName", - "CIM_iSCSILoginStatistics.LastLoginFailureRemoteAddress" }] - uint16 LastLoginFailureRemoteAddressType; - - [Description ( - "An Internet Network Address giving the host address of " - "the remote node that failed the last login attempt." ), - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiIntrLastTgtFailureAddr", - "MIB.IETF|iSCSI-MIB.iscsiTgtLastIntrFailureAddr" }, - ModelCorrespondence { - "CIM_iSCSILoginStatistics.LastLoginFailureRemoteNodeName", - "CIM_iSCSILoginStatistics.LastLoginFailureRemoteAddressType" }] - uint32 LastLoginFailureRemoteAddress; - - [Description ( - "The count of Login Response PDUs with status 0x0000, " - "Accept Login, received by this node(initator), or " - "transmitted by this node (target)." ), - Counter, MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiIntrLoginAcceptRsps", - "MIB.IETF|iSCSI-MIB.iscsiTgtLoginAccepts" }] - uint64 SuccessfulLogins; - - [Description ( - "If the node is an initiator this property is the number " - "of times it has aborted a login because parameter " - "negotiation with the target failed. \n" - "If the node is a target the property is the number of " - "times a it has effectively refused a login because the " - "parameter negotiation failed. While this situation can " - "occur, the exact mechanism is as yet undefined in the " - "iSCSI Protocol Spec." ), - Counter, MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiIntrLoginNegotiateFails", - "MIB.IETF|iSCSI-MIB.iscsiTgtLoginNegotiateFails" }] - uint64 NegotiationLoginFailures; - - [Description ( - "If the node is an initiator this property is the number " - "of times it has aborted a login because the target could " - "not be authenticated. If the node is a target this " - "property is the count of Login Response PDUs with status " - "0x0201, Authentication Failed, transmitted by this " - "target." ), - Counter, MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiIntrLoginAuthenticateFails", - "MIB.IETF|iSCSI-MIB.iscsiTgtLoginAuthenticateFails" }] - uint64 AuthenticationLoginFailures; - - [Description ( - "If the node is an initiator this property is the count " - "of Login Response PDUs with status class 0x201, " - "\'Authentication Failed\', received by this initiator. " - "If the node is a target the property is the count of " - "Login Response PDUs with status 0x0202, \'Forbidden " - "Target\', transmitted by this target." ), - Counter, MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiIntrLoginAuthFailRsps", - "MIB.IETF|iSCSI-MIB.iscsiTgtLoginAuthorizeFails" }] - uint64 AuthorizationLoginFailures; - - [Description ( - "The count of Login Response PDUs with status class 0x01, " - "Redirection, received by this node(initiator) or " - "transmitted by this node(target)." ), - Counter, MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiIntrLoginRedirectRsps", - "MIB.IETF|iSCSI-MIB.iscsiTgtLoginRedirects" }] - uint64 LoginRedirects; - - [Description ( - "The number of failure Login Response PDUs which were " - "received by this node(initiator) or were transmitted by " - "this node(target), and which were not counted by any " - "other property in this class." ), - Counter, MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiIntrLoginOtherFailRsps", - "MIB.IETF|iSCSI-MIB.iscsiTgtLoginOtherFails" }] - uint64 OtherLoginFailures; - - [Description ( - "The count of Logout Command PDUs generated by this node " - "(initiator) or received by this node(target), with " - "reason code 0 (closes the session)." ), - Counter, MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiIntrLogoutNormals", - "MIB.IETF|iSCSI-MIB.iscsiTgtLogoutNormals" }] - uint64 NormalLogouts; - - [Description ( - "The count of Logout Command PDUs generated by this node, " - "(initiator) or received by this node(target), with any " - "reason code other than 0." ), - Counter, MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiIntrLogoutOthers", - "MIB.IETF|iSCSI-MIB.iscsiTgtLogoutOthers" }] - uint64 OtherLogouts; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_iSCSIProtocolEndpoint.mof b/build/vendor/dmtf_mof/Network/CIM_iSCSIProtocolEndpoint.mof deleted file mode 100644 index 66a996c5..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_iSCSIProtocolEndpoint.mof +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.11.0" ), - UMLPackagePath ( "CIM::Network::ProtocolEndpoints" ), - Description ( - "This is an iSCSI-specific SCSIProtocolEndpoint. ConnectionType " - "MUST be \'iSCSI\'. \n" - "An iSCSIProtocolEndpoint represents an iSCSI port, which is " - "the usage of a subset of network portals (TCP+IP " - "ProtocolEndpoints) in a Portal Group by an iSCSI node. The " - "BindsTo associations from iSCSIProtocolEndpoint to " - "TCPProtocolEndpoints makes this relationship explicit. \n" - "For an iSCSI target, the Identifier property (the Target " - "Portal Group Tag) makes the relationship unique. \n" - "For an iSCSI initiator, the session identifier makes the " - "initiator port unique within the node." )] -class CIM_iSCSIProtocolEndpoint : CIM_SCSIProtocolEndpoint { - - [Override ( "Name" ), - Description ( - "The format of Name is based on the ConnectionType " - "property. For iSCSI, the Name property of an " - "SCSIProtocolEndpoint MUST contain the iSCSI port name as " - "described in the iSCSI RFC (currently " - "http://www.ietf.org/internet-drafts/draft-ietf- " - "ips-iscsi-20.txt) - \n" - " + \'i,\' + ISID for initiators, \n" - " + \'t,\' + TPGT for targets, \n" - "where can be any of the standard iSCSI " - "name namespaces (eg. iqn, eui); and includes the " - "namespace prefix." ), - MaxLen ( 256 ), - ModelCorrespondence { - "CIM_SCSIProtocolEndpoint.ConnectionType", - "CIM_SCSIProtocolEndpoint.OtherConnectionType" }] - string Name; - - [Required, Description ( - "If this is an Initiator PE, Identifier MUST contain the " - "ISID, if this is a Target PE, Identifier MUST contain " - "the Target Portal Group Tag (TGPT). Each " - "iSCSIProtocolEndpoint associated to a common " - "SCSIProtocolController (iSCSI node) MUST have a unique " - "Identifier. This field is formatted as 12 hexadecimal " - "digits." ), - MaxLen ( 13 )] - string Identifier; - - [Override ( "Role" ), - Description ( - "For iSCSI, each SCSIProtocolEndpoint MUST act as either " - "a target or an initiator endpoint." ), - ValueMap { "2", "3" }, - Values { "Initiator", "Target" }] - uint16 Role; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_iSCSISession.mof b/build/vendor/dmtf_mof/Network/CIM_iSCSISession.mof deleted file mode 100644 index 97ce876d..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_iSCSISession.mof +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.11.0" ), - UMLPackagePath ( "CIM::Network::Pipes" ), - Description ( - "iSCSISession is a network pipe between an initiator and target " - "SCSIProtocolEndpoints. An iSCSISession is composed of one or " - "more TCP connections which MUST be selected from a " - "SystemSpecificCollection representing an iSCSI Portal Group. " - "NetworkPipeComposition aggregates NetworkPipe instances " - "representing iSCSI connections, which are associated to " - "TCPProtocolEndpoints. Only an iSCSI initiator can create an " - "iSCSI Session, an iSCSI Target MUST accept (or reject) a " - "session request. EndOfNetworkPipe associates iSCSISession with " - "SCSIProtocolEndpoint." )] -class CIM_iSCSISession : CIM_NetworkPipe { - - [Override ( "Directionality" ), - Description ( "iSCSI sessions MUST be bidirectional." ), - ValueMap { "2" }, - Values { "Bi-Directional" }] - uint16 Directionality = 2; - - [Description ( "iSCSI Session type." ), - ValueMap { "2", "3" }, - Values { "Discovery", "Normal" }, - MappingStrings { "MIB.IETF|iSCSI-MIB.iscsiSsnType" }] - uint16 SessionType; - - [Description ( - "The Target Session Identifying Handle (TSIH) for this session." - ), - MappingStrings { "MIB.IETF|iSCSI-MIB.iscsiSsnTSIH" }] - uint32 TSIH; - - [Description ( - "The iSCSI Port Name (iSCSIProtocolEndPoint.Name), of the " - "device at the other end of this iSCSISession." ), - MappingStrings { "MIB.IETF|iSCSI-MIB.iscsiSsnInitiatorName", - "MIB.IETF|iSCSI-MIB.iscsiSsnTargetName" }] - string EndPointName; - - [Description ( - "The number of transport protocol connections that " - "currently belong to this session." ), - MinValue ( 1 ), - MaxValue ( 65535 ), - MappingStrings { "MIB.IETF|iSCSI-MIB.iscsiSsnConnectionNumber" }, - ModelCorrespondence { - "CIM_iSCSISessionSettings.MaxConnectionsPerSession" }] - uint32 CurrentConnections; - - [Description ( - "If set to true, indicates that the initiator MUST wait " - "for an R2T before sending to the target. If set to " - "false, the initiator MAY send data immediately, within " - "limits set by iscsiSsnFirstBurstLength and the expected " - "data transfer length of the request." ), - MappingStrings { "MIB.IETF|iSCSI-MIB.iscsiSsnInitialR2T" }, - ModelCorrespondence { - "CIM_iSCSISessionSettings.InitialR2TPreference" }] - boolean InitialR2T; - - [Description ( - "Indicates whether the initiator and target have agreed " - "to support immediate data on this session." ), - MappingStrings { "MIB.IETF|iSCSI-MIB.iscsiSsnImmediateData" }, - ModelCorrespondence { - "CIM_iSCSISessionSettings.ImmediateDataPreference" }] - boolean ImmediateData; - - [Description ( - "The maximum number of outstanding request-to-transmit " - "(R2T)s per iSCSI task within this session." ), - Units ( "Bytes" ), - MinValue ( 1 ), - MaxValue ( 65535 ), - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiSsnMaxOutstandingR2T" }, - ModelCorrespondence { - "CIM_iSCSISessionSettings.MaxOutstandingR2T" }] - uint32 MaxOutstandingR2T; - - [Description ( - "The maximum length supported for unsolicited data sent " - "within this session." ), - Units ( "Bytes" ), - MinValue ( 512 ), - MaxValue ( 16777215 ), - MappingStrings { "MIB.IETF|iSCSI-MIB.iscsiSsnFirstBurstLength" }, - ModelCorrespondence { - "CIM_iSCSISessionSettings.MaxUnsolicitedFirstDataBurstLength" }] - uint32 MaxUnsolicitedFirstDataBurstLength; - - [Description ( - "The maximum number of bytes which can be sent within a " - "single sequence of Data-In or Data-Out PDUs." ), - Units ( "Bytes" ), - MinValue ( 512 ), - MaxValue ( 16777215 ), - MappingStrings { "MIB.IETF|iSCSI-MIB.iscsiSsnMaxBurstLength" }, - ModelCorrespondence { - "CIM_iSCSISessionSettings.MaxDataBurstLength" }] - uint32 MaxDataBurstLength; - - [Description ( - "False indicates that iSCSI data PDU sequences MAY be " - "transferred in any order. True indicates that data PDU " - "sequences MUST be transferred using continuously " - "increasing offsets, except during error recovery." ), - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiSsnDataSequenceInOrder" }, - ModelCorrespondence { - "CIM_iSCSISessionSettings.DataSequenceInOrderPreference" }] - boolean DataSequenceInOrder; - - [Description ( - "False indicates that iSCSI data PDUs within sequences " - "MAY be in any order. True indicates that data PDUs " - "within sequences MUST be at continuously increasing " - "addresses, with no gaps or overlay between PDUs. Default " - "is true." ), - MappingStrings { "MIB.IETF|iSCSI-MIB.iscsiSsnDataPDUInOrder" }, - ModelCorrespondence { - "CIM_iSCSISessionSettings.DataPDUInOrderPreference" }] - boolean DataPDUInOrder; - - [Description ( - "The level of error recovery negotiated between the " - "initiator and the target. Higher numbers represent more " - "detailed recovery schemes." ), - MinValue ( 1 ), - MaxValue ( 255 ), - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiSsnErrorRecoveryLevel" }, - ModelCorrespondence { - "CIM_iSCSISessionSettings.ErrorRecoveryLevelPreference" }] - uint32 ErrorRecoveryLevel; - - [Description ( - "The maximum number of connections allowed in this session." - ), - MinValue ( 1 ), - MaxValue ( 65535 ), - MappingStrings { "MIB.IETF|iSCSI-MIB.iscsiNodeMaxConnections" }, - ModelCorrespondence { - "CIM_iSCSISessionSettings.MaxConnectionsPerSession" }] - uint32 MaxConnectionsPerSession; - - [Description ( - "The DefaultTime2Wait negotiated for this Session. This " - "is the minimum time, in seconds, to wait before " - "attempting an explicit/implicit logout or active iSCSI " - "task reassignment after an unexpected connection " - "termination or a connection reset." ), - Units ( "Seconds" ), - MinValue ( 0 ), - MaxValue ( 3600 ), - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiNodeDefaultTime2Wait" }, - ModelCorrespondence { - "CIM_iSCSISessionSettings.DefaultTimeToWaitPreference" }] - uint32 DefaultTimeToWait; - - [Description ( - "The DefaultTime2Retain negotiated for this Session. This " - "is the maximum time, in seconds after an initial wait " - "(Time2Wait), before which an active iSCSI task " - "reassignment is still possible after an unexpected " - "connection termination or a connection reset." ), - Units ( "Seconds" ), - MinValue ( 0 ), - MaxValue ( 3600 ), - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiNodeDefaultTime2Retain" }, - ModelCorrespondence { - "CIM_iSCSISessionSettings.DefaultTimeToRetainPreference" }] - uint32 DefaultTimeToRetain; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_iSCSISessionFailures.mof b/build/vendor/dmtf_mof/Network/CIM_iSCSISessionFailures.mof deleted file mode 100644 index 90f8a391..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_iSCSISessionFailures.mof +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.11.0" ), - UMLPackagePath ( "CIM::Network::iSCSI" ), - Description ( - "Failure Statistics for Sessions associated with a iSCSI Node. " - "An instance of this class will be associated by " - "ElementStatisticalData to an instance of " - "SCSIProtocolController representing an iSCSI Node. These " - "statistics are associated to a Node since they describe the " - "aggregated Session data for all failed Sessions associated to " - "iSCSI protocol endpoints used by the Node." )] -class CIM_iSCSISessionFailures : CIM_StatisticalData { - - [Description ( - "The number of times a session belonging to this Network " - "Entity has been failed." ), - Counter, MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiInstSsnFailures" }] - uint64 SessionFailures; - - [Description ( "The type of the last session failure." ), - ValueMap { "1", "2", "3", "4" }, - Values { "Other", "Digest", "Timeout", "Format" }, - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiInstLastSsnFailureType" }, - ModelCorrespondence { - "CIM_iSCSISessionFailures.OtherLastSessionFailureType", - "CIM_iSCSISessionFailures.LastSessionFailureRemoteNodeName" }] - uint16 LastSessionFailureType; - - [Description ( - "A string describing the type of the last Session failure " - "when LastSessionFailureType is equal to the value 1, " - "\"Other\"." ), - ModelCorrespondence { - "CIM_iSCSISessionFailures.LastSessionFailureType" }] - string OtherLastSessionFailureType; - - [Description ( - "The iSCSI name of the remote node from the failed session." - ), - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiInstLastSsnRmtNodeName" }, - ModelCorrespondence { - "CIM_iSCSISessionFailures.LastSessionFailureType" }] - string LastSessionFailureRemoteNodeName; - - [Description ( - "The count of sessions which were failed due to receipt " - "of a PDU containing header or data digest errors." ), - Counter, MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiInstSsnDigestErrors" }] - uint64 SessionDigestFailures; - - [Description ( - "The count of sessions which were failed due to a " - "sequence exceeding a time limit." ), - Counter, MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiInstSsnCxnTimeoutErrors" }] - uint64 SessionConnectionTimeoutFailures; - - [Description ( - "The count of sessions which were failed due to receipt " - "of a PDU which contained a format error." ), - Counter, MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiInstSsnFormatErrors" }] - uint64 SessionFormatErrors; - - -}; diff --git a/build/vendor/dmtf_mof/Network/CIM_iSCSISessionSettings.mof b/build/vendor/dmtf_mof/Network/CIM_iSCSISessionSettings.mof deleted file mode 100644 index a637e5a0..00000000 --- a/build/vendor/dmtf_mof/Network/CIM_iSCSISessionSettings.mof +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.11.0" ), - UMLPackagePath ( "CIM::Network::iSCSI" ), - Description ( - "The default negotiation settings for an iSCSI Session. These " - "properties are used as the starting position for login " - "negotiations between initiator and target nodes. The " - "properties describing the resulting outcome of the login " - "negotiation are in the iSCSISession class. Depending on a " - "given implementation an instance of iSCSISessionSettings will " - "be associated by ElementSettingData to one or more instances " - "of iSCSIProtocolEndpoint, SCSIProtocolController, or " - "ComputerSystem." )] -class CIM_iSCSISessionSettings : CIM_SettingData { - - [Write, Description ( - "The maximum number of connections allowed in each " - "session to and/or from this node." ), - MinValue ( 1 ), - MaxValue ( 65535 ), - MappingStrings { "MIB.IETF|iSCSI-MIB.iscsiNodeMaxConnections" }, - ModelCorrespondence { - "CIM_iSCSISession.MaxConnectionsPerSession" }] - uint32 MaxConnectionsPerSession = 1; - - [Write, Description ( - "This property indicates the InitialR2T preference for " - "this node: true = YES, false = will try to negotiate NO, " - "will accept YES." ), - MappingStrings { "MIB.IETF|iSCSI-MIB.iscsiNodeInitialR2T" }, - ModelCorrespondence { "CIM_iSCSISession.InitialR2T" }] - boolean InitialR2TPreference = true; - - [Write, Description ( - "This property indicates ImmediateData preference for " - "this node True = YES (but will accept NO), False = NO." ), - MappingStrings { "MIB.IETF|iSCSI-MIB.iscsiNodeImmediateData" }, - ModelCorrespondence { "CIM_iSCSISession.ImmediateData" }] - boolean ImmediateDataPreference = true; - - [Write, Description ( - "Maximum number of outstanding R2Ts allowed per ISCSI task." - ), - MinValue ( 1 ), - MaxValue ( 65535 ), - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiNodeMaxOutstandingR2T" }, - ModelCorrespondence { "CIM_iSCSISession.MaxOutstandingR2T" }] - uint32 MaxOutstandingR2T = 1; - - [Write, Description ( - "The maximum length (bytes) supported for unsolicited " - "data to/from this node." ), - Units ( "Bytes" ), - MinValue ( 512 ), - MaxValue ( 16777215 ), - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiNodeFirstBurstLength" }, - ModelCorrespondence { - "CIM_iSCSISession.MaxUnsolicitedFirstDataBurstLength" }] - uint32 MaxUnsolicitedFirstDataBurstLength = 65536; - - [Write, Description ( - "The maximum number of bytes which can be sent within a " - "single sequence of Data-In or Data-Out PDUs." ), - Units ( "Bytes" ), - MinValue ( 512 ), - MaxValue ( 16777215 ), - MappingStrings { "MIB.IETF|iSCSI-MIB.iscsiNodeMaxBurstLength" }, - ModelCorrespondence { "CIM_iSCSISession.MaxDataBurstLength" }] - uint32 MaxDataBurstLength = 262144; - - [Write, Description ( - "The DataSequenceInOrder preference of this node. False " - "(=No) indicates that iSCSI data PDU sequences MAY be " - "transferred in any order. True (=Yes) indicates that " - "data PDU sequences MUST be transferred using " - "continuously increasing offsets, except during error " - "recovery." ), - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiNodeDataSequenceInOrder" }, - ModelCorrespondence { "CIM_iSCSISession.DataSequenceInOrder" }] - boolean DataSequenceInOrderPreference = true; - - [Write, Description ( - "The DataPDUInOrder preference of this node. False (=No) " - "indicates that iSCSI data PDUs within sequences MAY be " - "in any order. True (=Yes) indicates that data PDUs " - "within sequences MUST be at continuously increasing " - "addresses, with no gaps or overlay between PDUs." ), - MappingStrings { "MIB.IETF|iSCSI-MIB.iscsiNodeDataPDUInOrder" }, - ModelCorrespondence { "CIM_iSCSISession.DataPDUInOrder" }] - boolean DataPDUInOrderPreference = true; - - [Write, Description ( - "The DefaultTime2Wait preference of this node. This is " - "the minimum time, in seconds, to wait before attempting " - "an explicit/implicit logout or active iSCSI task " - "reassignment after an unexpected connection termination " - "or a connection reset." ), - Units ( "Seconds" ), - MinValue ( 0 ), - MaxValue ( 3600 ), - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiNodeDefaultTime2Wait" }, - ModelCorrespondence { "CIM_iSCSISession.DefaultTimeToWait" }] - uint32 DefaultTimeToWaitPreference = 2; - - [Write, Description ( - "The DefaultTime2Retain preference of this node. This is " - "the maximum time, in seconds after an initial wait " - "(Time2Wait), before which an active iSCSI task " - "reassignment is still possible after an unexpected " - "connection termination or a connection reset." ), - Units ( "Seconds" ), - MinValue ( 0 ), - MaxValue ( 3600 ), - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiNodeDefaultTime2Retain" }, - ModelCorrespondence { "CIM_iSCSISession.DefaultTimeToRetain" }] - uint32 DefaultTimeToRetainPreference = 20; - - [Write, Description ( - "The ErrorRecoveryLevel preference of this node. " - "Currently, only 0-2 are valid. This is designed to " - "accommodate future error recover levels. \n" - "Higher error recovery levels imply support in addition " - "to support for the lower error level functions. In other " - "words, error level 2 implies support for levels 0-1, " - "since those functions are subsets of error level 2." ), - MinValue ( 0 ), - MaxValue ( 255 ), - MappingStrings { - "MIB.IETF|iSCSI-MIB.iscsiNodeErrorRecoveryLevel" }, - ModelCorrespondence { "CIM_iSCSISession.ErrorRecoveryLevel" }] - uint32 ErrorRecoveryLevelPreference = 0; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_AdjacentSlots.mof b/build/vendor/dmtf_mof/Physical/CIM_AdjacentSlots.mof deleted file mode 100644 index e579d90e..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_AdjacentSlots.mof +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Physical::Connector" ), - Description ( - "AdjacentSlots describes the layout of Slots on a HostingBoard " - "or adapter Card. Information like the distance between the " - "Slots and whether they are \'shared\' (if one is populated, " - "then the other Slot can not be used), is conveyed as " - "properties of the association." )] -class CIM_AdjacentSlots { - - [Key, Description ( "One of the adjacent Slots." )] - CIM_Slot REF SlotA; - - [Key, Description ( "The \'other\' adjacent Slot." )] - CIM_Slot REF SlotB; - - [Description ( - "The distance, in inches, between adjacent Slots." ), - Units ( "Inches" ), - PUnit ( "inch" )] - real32 DistanceBetweenSlots; - - [Description ( - "Slots can be located in close proximity on Hosting " - "Boards or other Cards, such that if one of these Slots " - "is populated by an adapter Card, the other Slot must be " - "left empty. This relationship is indicated by the " - "SharedSlots boolean set to TRUE." )] - boolean SharedSlots; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_Card.mof b/build/vendor/dmtf_mof/Physical/CIM_Card.mof deleted file mode 100644 index 66768536..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_Card.mof +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Physical::Package" ), - Description ( - "The Card class represents a type of physical container that " - "can be plugged into another Card or HostingBoard, or is itself " - "a HostingBoard/Motherboard in a Chassis. The CIM_Card class " - "includes any package capable of carrying signals and providing " - "a mounting point for PhysicalComponents, such as Chips, or " - "other PhysicalPackages, such as other Cards." )] -class CIM_Card : CIM_PhysicalPackage { - - [Description ( - "Boolean indicating that this Card is a Motherboard or, " - "more generically, a baseboard in a Chassis." )] - boolean HostingBoard; - - [Description ( - "SlotLayout is a free-form string that describes the slot " - "positioning, typical usage, restrictions, individual " - "slot spacings or any other pertinent information for the " - "slots on a Card." )] - string SlotLayout; - - [Description ( - "Boolean indicating that at least one daughterboard or " - "auxiliary Card is required in order to function " - "properly." )] - boolean RequiresDaughterBoard; - - [Description ( - "Boolean indicating that this Card is physically unique " - "from other Cards of the same type and therefore requires " - "a special Slot. For example, a double-wide Card requires " - "two Slots. Another example is where a certain Card may " - "be used for the same general function as other Cards but " - "requires a special Slot (e.g., extra long), whereas the " - "other Cards can be placed in any available Slot. If set " - "to TRUE, then the corresponding property, " - "RequirementsDescription, should specify the nature of " - "the uniqueness or purpose of the Card." ), - ModelCorrespondence { "CIM_Card.RequirementsDescription" }] - boolean SpecialRequirements; - - [Description ( - "A free-form string describing the way(s) in which this " - "Card is physically unique from other Cards. This " - "property only has meaning when the corresponding boolean " - "property, SpecialRequirements, is set to TRUE." ), - ModelCorrespondence { "CIM_Card.SpecialRequirements" }] - string RequirementsDescription; - - [Description ( "Operating voltages required by the Card." ), - Units ( "MilliVolts" ), - PUnit ( "volt * 10^-3" )] - sint16 OperatingVoltages[]; - - - [Description ( - "This method manipulates the power to a PhysicalConnector " - "on a Card. It is intended to be used by a Card " - "(especially by a motherboard - i.e., HostingBoard=TRUE) " - "to turn the power on and off for a specific " - "PhysicalConnector located on it. For example, in a " - "personal computer, a system slot does not know how to " - "turn itself on and off. However, the motherboard hosting " - "this slot may have that capability. This is important in " - "order to support hot swapping of an adapter card in a " - "system slot. The method should return 0 if successful, 1 " - "if the request is not supported, and some other value if " - "any other error occurred. In a subclass, the set of " - "possible return codes could be specified, using a " - "ValueMap qualifier on the method. The strings to which " - "the ValueMap contents are \'translated\' may also be " - "specified in the subclass as a Values array qualifier." )] - uint32 ConnectorPower( - [IN, Description ( - "The connector to change the power setting for." )] - CIM_PhysicalConnector REF Connector, - [IN, Description ( - "If TRUE, turn power on for the connector. If " - "FALSE, turn power off." )] - boolean PoweredOn); - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_CardInSlot.mof b/build/vendor/dmtf_mof/Physical/CIM_CardInSlot.mof deleted file mode 100644 index 3843f3f0..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_CardInSlot.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_CardInSlot -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Physical::Connector" ), - Description ( - "Slots are special types of Connectors into which adapter Cards " - "are inserted. This relationship of a Card in a Slot is made " - "explicit using the CardInSlot association." ), - MappingStrings { "MIF.DMTF|System Slot|005.4" }] -class CIM_CardInSlot : CIM_PackageInSlot { - - [Override ( "Antecedent" ), - Description ( "The Slot into which the Card is inserted." )] - CIM_Slot REF Antecedent; - - [Override ( "Dependent" ), - Max ( 1 ), - Description ( "The Card in the Slot." )] - CIM_Card REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_CardOnCard.mof b/build/vendor/dmtf_mof/Physical/CIM_CardOnCard.mof deleted file mode 100644 index 958bf99e..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_CardOnCard.mof +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_CardOnCard -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Physical::Package" ), - Description ( - "Cards may be plugged into Motherboards/baseboards, are " - "daughtercards of an adapter, or support special Card-like " - "modules. These relationships are described by the CardOnCard " - "association." )] -class CIM_CardOnCard : CIM_Container { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( "The Card that hosts another Card." )] - CIM_Card REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The Card that is plugged into or otherwise mounted on " - "another Card." )] - CIM_Card REF PartComponent; - - [Description ( - "A string describing and identifying how the Card is " - "mounted on or plugged into the \'other\' Card. Slot " - "information could be included in this field and may be " - "sufficient for certain management purposes. If so, this " - "avoids creating instantiations of Connector/Slot objects " - "just to model the relationship of Cards to HostingBoards " - "or other adapters. On the other hand, if Slot and " - "Connector information is available, this field could be " - "used to provide more detailed mounting or slot insertion " - "data." )] - string MountOrSlotDescription; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_Chassis.mof b/build/vendor/dmtf_mof/Physical/CIM_Chassis.mof deleted file mode 100644 index 45f54ce9..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_Chassis.mof +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) 2006 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// -// ================================================================== -// CIM_Chassis -// ================================================================== - [Version ( "2.14.0" ), - UMLPackagePath ( "CIM::Physical::Package" ), - Description ( - "The Chassis class represents the PhysicalElements that enclose " - "other Elements and provide definable functionality, such as a " - "desktop, processing node, UPS, disk or tape storage, or a " - "combination of these." )] -class CIM_Chassis : CIM_PhysicalFrame { - - [Description ( - "Integer indicating the number of power cords which must " - "be connected to the Chassis, for all the componentry to " - "operate." )] - uint16 NumberOfPowerCords; - - [Description ( - "Current required by the Chassis at 120V. If power is " - "provided by the Chassis (as in the case of a UPS), this " - "property may indicate the amperage produced, as a " - "negative number." ), - Units ( "Amps at 120 Volts" )] - sint16 CurrentRequiredOrProduced; - - [Description ( - "Amount of heat generated by the Chassis in BTU/hour." ), - Units ( "BTU per Hour" )] - uint16 HeatGeneration; - - [Deprecated { "CIM_Chassis.ChassisPackageType", - "CIM_Chassis.MultipleSystemSupport" }, - Description ( - "The use of this property is deprecated in lieu of " - "ChassisPackageType. A physical package should not have " - "multiple form factors. Therefore, this property is being " - "deprecated in lieu of a single value property. \n" - "An enumerated, integer-valued array indicating the type " - "of Chassis." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "14", "15", "16", "17", "18", "19", - "20", "21", "22", "23", "24", "25" }, - Values { "Other", "Unknown", "Desktop", - "Low Profile Desktop", "Pizza Box", "Mini Tower", "Tower", - "Portable", "LapTop", - // 10 - "Notebook", "Hand Held", - "Docking Station", "All in One", "Sub Notebook", - "Space-Saving", "Lunch Box", "Main System Chassis", - "Expansion Chassis", "SubChassis", - // 20 - "Bus Expansion Chassis", - "Peripheral Chassis", "Storage Chassis", - "Rack Mount Chassis", "Sealed-Case PC", - "Multi-system Chassis" }, - ArrayType ( "Indexed" ), - MappingStrings { - "MIF.DMTF|Physical Container Global Table|004.1" }, - ModelCorrespondence { "CIM_Chassis.TypeDescriptions" }] - uint16 ChassisTypes[]; - - [Deprecated { "CIM_Chassis.ChassisTypeDescription" }, - Description ( - "The use of this property is deprecated in lieu of a " - "single value property, ChassisTypeDescription. \n" - "An array of free-form strings providing more information " - "on the ChassisTypes array entries. Note, each entry of " - "this array is related to the entry in ChassisTypes that " - "is located at the same index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_Chassis.ChassisTypes" }] - string TypeDescriptions[]; - - [Description ( - "ChassisPackageType indicates the physical form factor " - "for the type of Chassis. This property may have a value " - "when the PackageType property contains the value 3 " - "\"Chassis Frame\".\n" - "A value of 28 \"Blade Enclosure\" shall indicate the " - "Chassis is designed to contain one or more " - "PhysicalPackage(s) of PackageType 16 \"Blade\" or " - "PackageType 17 \"Blade Expansion\"." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26", "27", - "28", "..", "0x8000..0xFFFF" }, - Values { "Unknown", "Other", "SMBIOS Reserved", "Desktop", - "Low Profile Desktop", "Pizza Box", "Mini Tower", "Tower", - "Portable", "LapTop", - // 10 - "Notebook", "Hand Held", - "Docking Station", "All in One", "Sub Notebook", - "Space-Saving", "Lunch Box", "Main System Chassis", - "Expansion Chassis", "SubChassis", - // 20 - "Bus Expansion Chassis", - "Peripheral Chassis", "Storage Chassis", "SMBIOS Reseved", - "Sealed-Case PC", "SMBIOS Reserved", "CompactPCI", - "AdvancedTCA", "Blade Enclosure", "DMTF Reserved", - "Vendor Reserved" }, - MappingStrings { - "MIF.DMTF|Physical Container Global Table|004.1" }, - ModelCorrespondence { "CIM_Chassis.ChassisTypeDescription" }] - uint16 ChassisPackageType; - - [Description ( - "A string providing more information on the ChassisPackageType." - ), - ModelCorrespondence { "CIM_Chassis.ChassisPackageType" }] - string ChassisTypeDescription; - - [Description ( - "MultipleSystemSupport indicates whether or not this " - "chassis supports multiple systems, for example server " - "blades." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "True", "False" }] - uint16 MultipleSystemSupport; - - [Description ( - "RackMountable indicates whether or not the chassis is " - "Rack Mountable." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "True", "False" }] - uint16 RackMountable; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_ChassisInRack.mof b/build/vendor/dmtf_mof/Physical/CIM_ChassisInRack.mof deleted file mode 100644 index 19b46510..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_ChassisInRack.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Association, Aggregation, Version ( "2.21.0" ), - UMLPackagePath ( "CIM::Physical::Package" ), - Description ( - "Racks, as simple enclosures, contain Chassis that provide the " - "physical componentry realizing processing nodes, storage " - "devices, UPSs, etc. The ChassisInRack association makes " - "explicit the \'containing\' relationship between the Rack and " - "the Chassis." )] -class CIM_ChassisInRack : CIM_Container { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( "The Rack that contains the Chassis." )] - CIM_Rack REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The Chassis which is mounted in the Rack." )] - CIM_Chassis REF PartComponent; - - [Description ( - "An integer indicating the lowest or \'bottom\' U in " - "which the Chassis is mounted. A \'U\' is a standard unit " - "of measure for the height of a Rack or rack-mountable " - "component. It is equal to 1.75 inches or 4.445 cm." ), - Units ( "Us" ), - PUnit ( "rack unit" )] - uint16 BottomU; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_Chip.mof b/build/vendor/dmtf_mof/Physical/CIM_Chip.mof deleted file mode 100644 index 0c17239a..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_Chip.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Chip -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Physical::Component" ), - Description ( - "The Chip class represents any type of integrated circuit " - "hardware, including ASICs, processors, memory chips, etc." )] -class CIM_Chip : CIM_PhysicalComponent { - - [Description ( - "The implementation form factor for the Chip. For " - "example, values such as SIMM (7), TSOP (9) or PGA (10) " - "can be specified." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23" }, - Values { "Unknown", "Other", "SIP", "DIP", "ZIP", "SOJ", - "Proprietary", "SIMM", "DIMM", "TSOP", - // 10 - "PGA", "RIMM", "SODIMM", - "SRIMM", "SMD", "SSMP", "QFP", "TQFP", "SOIC", "LCC", - // 20 - "PLCC", "BGA", "FPBGA", - "LGA" }] - uint16 FormFactor; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_ConfigurationCapacity.mof b/build/vendor/dmtf_mof/Physical/CIM_ConfigurationCapacity.mof deleted file mode 100644 index da997352..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_ConfigurationCapacity.mof +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.18.0" ), - UMLPackagePath ( "CIM::Physical::Misc" ), - Description ( - "ConfigurationCapacity provides information on the minimum and " - "maximum numbers of power supplies, fans, disk drives, etc. " - "that can be connected to or placed on/into a PhysicalElement " - "(and the number that must be connected/added/removed at a " - "time). The PhysicalElement whose configuration is described is " - "identified using the ElementCapacity association, inherited " - "from PhysicalCapacity. The object whose capacities are " - "indicated (ie, the power supply or fan) is identified in the " - "ObjectType and VendorCompatibilityStrings properties of this " - "class. When ObjectType has a value of 25 (Multi-Purpose) then " - "additional description of the object is provided in the " - "VendorCompatibilityStrings property. Since the same min/max " - "configurations can apply to multiple instances, this class is " - "not defined as \'weak\'. \n" - "Examples of the use of the ConfigurationCapacity class are to " - "describe that a \'control unit\' Chassis may be connected to " - "(at most) 4 other I/O chassis, or to describe what a " - "StorageLibrary\'s cabinet may contain. Continuing the latter " - "example, a particular StorageLibrary\'s cabinet might hold a " - "minimum of 3 and a maximum of 9 TapeDrives, and a minimum of " - "88 and a maximum of 264 StorageMediaLocations (\"Slots\"). " - "This information would be described in two instances of " - "ConfigurationCapacity, both associated to the StorageLibrary\'s " - "PhysicalPackage. \n" - "This class does NOT represent the tradeoffs that are likely to " - "be required of one resource for another. It simply represents " - "capacities. In the case of the StorageLibrary, there may be " - "only 2 valid configurations - 9 TapeDrives with 88 Slots, or 3 " - "TapeDrives with 264 Slots. This class only conveys that \'up " - "to\' 9 Drives and \'up to\' 264 slots may be available and are " - "supported." )] -class CIM_ConfigurationCapacity : CIM_PhysicalCapacity { - - [Key, Override ( "Name" ), - Description ( - "The inherited Name serves as a part of the Configuration " - "Capacity object key." )] - string Name; - - [Key, Description ( - "The type of object (power supply, fan, disk drive, ...) " - "whose capacities are indicated. This information is part " - "of the class\' key." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25" }, - Values { "Other", "Processors", "Power Supplies", "Fans", - "Batteries", "I/O Slots", "Memory Slots", - "MediaAccessDevices (Drives)", - "StorageMediaLocation Slots", - "StorageMediaLocation Magazines", - // 10 - "StorageMediaLocation Panels", - "StorageMediaLocation InterLibrary Ports", - "StorageMediaLocation Limited Access Ports", "Doors", - "MediaTransferDevice Pickers", - "MediaTransferDevice Changers", "LabelReaders", - "Contained Chassis", "Connected Chassis", - "Connected Frames", - // 20 - "Front Side I/O Slots", - "Back Side I/O Slots", "Cache Memory", "NVS Memory", - "Volatile Memory", "Multi-Purpose" }, - ModelCorrespondence { - "CIM_ConfigurationCapacity.OtherTypeDescription" }] - uint16 ObjectType; - - [Description ( - "A string describing the object type - used when the " - "ObjectType property is set to 0 (\"Other\"). OtherType " - "Description should be set to NULL when ObjectType is any " - "value other than 0." ), - MaxLen ( 64 ), - ModelCorrespondence { "CIM_ConfigurationCapacity.ObjectType" }] - string OtherTypeDescription; - - [Description ( - "Minimum number of Elements of type, ObjectType, that " - "must be installed." )] - uint64 MinimumCapacity; - - [Description ( - "Maximum number of Elements of type, ObjectType, that may " - "be installed." )] - uint64 MaximumCapacity; - - [Description ( - "Increment in which Elements must be added or removed." )] - uint32 Increment; - - [Description ( - "An array of strings that identifies the compatibility of " - "the elements within the configuration capacity. This " - "allows vendors to provide information to the system " - "administrators by providing sufficient information to " - "request the appropriate hardware that can populate the " - "configuration. In order to ensure uniqueness within the " - "NameSpace, each value defined by the vendor for use in " - "the VendorCompatibilityStrings property SHOULD be " - "constructed using the following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon " - "\':\', and where MUST include a copyrighted, " - "trademarked or otherwise unique name that is owned by " - "the business entity creating/defining the InstanceID, or " - "is a registered ID that is assigned to the business " - "entity by a recognized global authority (This is similar " - "to the _ structure of Schema " - "class names.) In addition, to ensure uniqueness " - "MUST NOT contain a colon (\':\'). When using this " - "algorithm, the first colon to appear in InstanceID MUST " - "appear between and . \n" - " is chosen by the business entity and SHOULD " - "not be re-used to identify different underlying " - "(real-world) elements." ), - ModelCorrespondence { - "CIM_PhysicalPackage.VendorCompatibilityStrings", - "CIM_Slot.VendorCompatibilityStrings" }] - string VendorCompatibilityStrings[]; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_ConnectedTo.mof b/build/vendor/dmtf_mof/Physical/CIM_ConnectedTo.mof deleted file mode 100644 index eccaa650..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_ConnectedTo.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ConnectedTo -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Physical::Connector" ), - Description ( - "The ConnectedTo association indicates that two or more " - "PhysicalConnectors are connected together." )] -class CIM_ConnectedTo : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "The Antecedent represents a PhysicalConnector that " - "serves as one end of the connection." )] - CIM_PhysicalConnector REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The Dependent represents another PhysicalConnector that " - "serves as the other end of the connection." )] - CIM_PhysicalConnector REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_ConnectorOnPackage.mof b/build/vendor/dmtf_mof/Physical/CIM_ConnectorOnPackage.mof deleted file mode 100644 index 271db547..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_ConnectorOnPackage.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ConnectorOnPackage -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Physical::Connector" ), - Description ( - "PhysicalPackages contain Connectors as well as other " - "PhysicalElements. The ConnectorOnPackage association makes " - "explicit the containment relationship between Connectors and " - "Packages." )] -class CIM_ConnectorOnPackage : CIM_Container { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( "The PhysicalPackage that has a Connector." )] - CIM_PhysicalPackage REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The PhysicalConnector." )] - CIM_PhysicalConnector REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_Container.mof b/build/vendor/dmtf_mof/Physical/CIM_Container.mof deleted file mode 100644 index 5c76fc5f..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_Container.mof +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Container -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Physical::Package" ), - Description ( - "The Container association represents the relationship between " - "a contained and a containing PhysicalElement. A containing " - "object must be a PhysicalPackage." )] -class CIM_Container : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( - "The PhysicalPackage that contains other " - "PhysicalElements, including other Packages." ), - MappingStrings { "MIB.IETF|Entity-MIB.entPhysicalContainedIn" }] - CIM_PhysicalPackage REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The PhysicalElement which is contained in the Package." )] - CIM_PhysicalElement REF PartComponent; - - [Description ( - "A free-form string representing the positioning of the " - "PhysicalElement within the PhysicalPackage. Information " - "relative to stationary elements in the Container (for " - "example, \'second drive bay from the top\'), angles, " - "altitudes and other data may be recorded in this " - "property. This string could supplement or be used in " - "place of instantiating the CIM_Location object." ), - MappingStrings { "MIB.IETF|Entity-MIB.entPhysicalParentRelPos" }] - string LocationWithinContainer; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_Docked.mof b/build/vendor/dmtf_mof/Physical/CIM_Docked.mof deleted file mode 100644 index 4e89da9d..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_Docked.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Docked -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Physical::Package" ), - Description ( - "A laptop, a type of Chassis, may be docked in another type of " - "Chassis, a Docking Station. This is the relationship " - "represented by the Docked association. Because this is such a " - "typical relationship, it is explicitly described." ), - MappingStrings { "MIF.DMTF|Dynamic States|001.2" }] -class CIM_Docked : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The Docking Station." )] - CIM_Chassis REF Antecedent; - - [Override ( "Dependent" ), - Max ( 1 ), - Description ( "The Laptop that is \'Docked\'." )] - CIM_Chassis REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_ElementCapacity.mof b/build/vendor/dmtf_mof/Physical/CIM_ElementCapacity.mof deleted file mode 100644 index c0d0cb39..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_ElementCapacity.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ElementCapacity -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Physical::Misc" ), - Description ( - "ElementCapacity associates a PhysicalCapacity object with one " - "or more PhysicalElements. It serves to associate a description " - "of min/max hardware requirements or capabilities (stored as a " - "kind of PhysicalCapacity), with the PhysicalElements being " - "described." )] -class CIM_ElementCapacity { - - [Key, Description ( - "PhysicalCapacity describes the minimum and maximum " - "requirements, and ability to support different types of " - "hardware for a PhysicalElement." )] - CIM_PhysicalCapacity REF Capacity; - - [Key, Min ( 1 ), - Description ( "The PhysicalElement being described." )] - CIM_PhysicalElement REF Element; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_ElementInConnector.mof b/build/vendor/dmtf_mof/Physical/CIM_ElementInConnector.mof deleted file mode 100644 index c09c7b9c..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_ElementInConnector.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Association, Version ( "2.18.0" ), - UMLPackagePath ( "CIM::Physical::Connector" ), - Description ( - "Adapter cards, DIMMs and other physical elements are plugged " - "into System Connectors for power and/or to transfer data. This " - "relationship is defined by ElementInConnector." )] -class CIM_ElementInConnector : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "The Connector into which the Element is inserted." )] - CIM_PhysicalConnector REF Antecedent; - - [Override ( "Dependent" ), - Max ( 1 ), - Description ( "The Element in the Connector." )] - CIM_PhysicalElement REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_ElementsLinked.mof b/build/vendor/dmtf_mof/Physical/CIM_ElementsLinked.mof deleted file mode 100644 index 66e43d34..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_ElementsLinked.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ElementsLinked -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Physical::Link" ), - Description ( - "The ElementsLinked association indicates which Physical " - "Elements are cabled together by a PhysicalLink." )] -class CIM_ElementsLinked : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The PhysicalLink." )] - CIM_PhysicalLink REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The PhysicalElement that is linked." )] - CIM_PhysicalElement REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_HomeForMedia.mof b/build/vendor/dmtf_mof/Physical/CIM_HomeForMedia.mof deleted file mode 100644 index 9ce95926..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_HomeForMedia.mof +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HomeForMedia -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Physical::PhysicalMedia" ), - Description ( - "In a StorageLibrary or repository for PhysicalMedia, it is " - "reasonable that a specific Media always be placed in a " - "specific Location (rather than anywhere in the repository/ " - "Library). The default location for a PhysicalMedia is called " - "its \'home\'. This information is expressed by the " - "HomeForMedia dependency association. (Note that a " - "PhysicalMedia can have at most one \'home\', and a " - "StorageMediaLocation can be \'home\' to at most one Media.)" )] -class CIM_HomeForMedia : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "The Location that is \'home\' to a piece of PhysicalMedia." - )] - CIM_StorageMediaLocation REF Antecedent; - - [Override ( "Dependent" ), - Max ( 1 ), - Description ( - "The PhysicalMedia whose \'home\' or default Location is defined." - )] - CIM_PhysicalMedia REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_LinkHasConnector.mof b/build/vendor/dmtf_mof/Physical/CIM_LinkHasConnector.mof deleted file mode 100644 index fc88e488..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_LinkHasConnector.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LinkHasConnector -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Physical::Link" ), - Description ( - "Cables and Links utilize PhysicalConnectors to actually " - "\'connect\' PhysicalElements. This association explicitly " - "defines this relationship of Connectors for PhysicalLinks." )] -class CIM_LinkHasConnector : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( "The PhysicalLink that has a Connector." )] - CIM_PhysicalLink REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The PhysicalConnector." )] - CIM_PhysicalConnector REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_Magazine.mof b/build/vendor/dmtf_mof/Physical/CIM_Magazine.mof deleted file mode 100644 index 998e1fed..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_Magazine.mof +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Magazine -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Physical::StoragePackage" ), - Description ( - "StorageMediaLocations are typically slots or spaces where " - "removable media are located. However, a specific kind of " - "MediaLocation is a Magazine. This entity represents a single " - "physical container with multiple StorageMediaLocations in it. " - "All the MediaLocations within the Magazine are added/removed " - "together. Often, this container has a Barcode or other label " - "for identification. This is the unique data captured in the " - "CIM_Magazine class. Magazine\'s label properties are defined " - "exactly as are labels for PhysicalMedia." )] -class CIM_Magazine : CIM_StorageMediaLocation { - - [Description ( - "One or more strings on \'labels\' on the Magazine. The " - "format of the labels and their state (readable, " - "unreadable, upside-down) are indicated in the " - "corresponding LabelFormats and LabelStates array " - "properties." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_Magazine.LabelStates", - "CIM_Magazine.LabelFormats" }] - string PhysicalLabels[]; - - [Description ( - "An array of enumerated integers describing the states of " - "each of the labels on a Magazine. The Labels themselves " - "are listed in the PhysicalLabels property. Note, each " - "entry of this array is related to the entry in " - "PhysicalLabels that is located at the same index." ), - ValueMap { "0", "1", "2" }, - Values { "OK/Readable", "Unreadable", "Upside Down" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_Magazine.PhysicalLabels" }] - uint16 LabelStates[]; - - [Description ( - "An array of enumerated integers describing the formats " - "of each of the labels on a Magazine. The Labels " - "themselves are listed in the PhysicalLabels property. " - "Note, each entry of this array is related to the entry " - "in PhysicalLabels that is located at the same index." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Barcode", "Radio Frequency Identification", - "OCR (Optical Character Recognition)", - "MICR (Magnetic Ink Character Recognition)", - "7 Character Barcode", "9 Character Barcode" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_Magazine.PhysicalLabels" }] - uint16 LabelFormats[]; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_MediaPhysicalStatData.mof b/build/vendor/dmtf_mof/Physical/CIM_MediaPhysicalStatData.mof deleted file mode 100644 index 7df3b5f0..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_MediaPhysicalStatData.mof +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_MediaPhysicalStatData -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Physical::StoragePackage" ), - Description ( - "Statistics related to reading physical labels and picks/puts " - "at a specific StorageMediaLocation, or for a specific piece of " - "PhysicalMedia. The same class is used to represent this data - " - "whether for a Location (independent of the Media), OR for the " - "Media (independent of its StorageMediaLocation). The element " - "whose statistics are described is associated using the " - "relationship, ElementStatisticalData." )] -class CIM_MediaPhysicalStatData : CIM_StatisticalData { - - [Description ( - "The number of successful physical label scans." ), - Counter] - uint64 ScanSuccesses; - - [Description ( "The number of failed physical label scans." ), - Counter] - uint64 ScanFailures; - - [Description ( "The number of retried physical label scans." ), - Counter] - uint64 ScanRetries; - - [Description ( "The number of successful picks." ), - Counter] - uint64 PickSuccesses; - - [Description ( "The number of failed picks." ), - Counter] - uint64 PickFailures; - - [Description ( "The number of retried picks." ), - Counter] - uint64 PickRetries; - - [Description ( "The number of successful puts." ), - Counter] - uint64 PutSuccesses; - - [Description ( "The number of failed puts." ), - Counter] - uint64 PutFailures; - - [Description ( "The number of retried puts." ), - Counter] - uint64 PutRetries; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_MediaPhysicalStatInfo.mof b/build/vendor/dmtf_mof/Physical/CIM_MediaPhysicalStatInfo.mof deleted file mode 100644 index 26f44338..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_MediaPhysicalStatInfo.mof +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_MediaPhysicalStatInfo -// ================================================================== - [Deprecated { "CIM_MediaPhysicalStatData" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Physical::StoragePackage" ), - Description ( - "Statistics related to reading physical labels and picks/puts " - "at a specific StorageMediaLocation, or for a specific piece of " - "PhysicalMedia. Although the same class is used to represent " - "this data, at the instance level the object holds information " - "for the Location (independent of the Media), OR for the Media " - "(independent of its StorageMediaLocation). This class is " - "deprecated in lieu of MediaPhysicalStatData, to take advantage " - "of the simplified key structure defined there." )] -class CIM_MediaPhysicalStatInfo : CIM_PhysicalStatisticalInformation { - - [Deprecated { "CIM_MediaPhysicalStatData.ScanSuccesses" }, - Description ( - "The number of successful physical label scans." ), - Counter] - uint64 ScanSuccesses; - - [Deprecated { "CIM_MediaPhysicalStatData.ScanFailures" }, - Description ( "The number of failed physical label scans." ), - Counter] - uint64 ScanFailures; - - [Deprecated { "CIM_MediaPhysicalStatData.ScanRetries" }, - Description ( "The number of retried physical label scans." ), - Counter] - uint64 ScanRetries; - - [Deprecated { "CIM_MediaPhysicalStatData.PickSuccesses" }, - Description ( "The number of successful picks." ), - Counter] - uint64 PickSuccesses; - - [Deprecated { "CIM_MediaPhysicalStatData.PickFailures" }, - Description ( "The number of failed picks." ), - Counter] - uint64 PickFailures; - - [Deprecated { "CIM_MediaPhysicalStatData.PickRetries" }, - Description ( "The number of retried picks." ), - Counter] - uint64 PickRetries; - - [Deprecated { "CIM_MediaPhysicalStatData.PutSuccesses" }, - Description ( "The number of successful puts." ), - Counter] - uint64 PutSuccesses; - - [Deprecated { "CIM_MediaPhysicalStatData.PutFailures" }, - Description ( "The number of failed puts." ), - Counter] - uint64 PutFailures; - - [Deprecated { "CIM_MediaPhysicalStatData.PutRetries" }, - Description ( "The number of retried puts." ), - Counter] - uint64 PutRetries; - - - [Deprecated { "CIM_StatisticalData.ResetSelectedStats" }, - Description ( - "Method to reset the statistical counters. The method " - "takes one parameter as input - an integer indicating " - "which counter to reset. For this input parameter, 0 " - "indicates all, 1-3 reset the scan-related counters, 4-6 " - "reset the \'pick\'-related counters, and 7-9 reset the " - "\'put\'-related counters. The method returns 0 if " - "successful, 1 if not supported, and any other value if " - "an error occurred. A method is specified so that the " - "Element\'s instrumentation can also reset its internal " - "processing and counters. The set of possible return " - "codes should be specified in a ValueMap qualifier on the " - "method. The strings to which the ValueMap contents are " - "\'translated\' should be specified as a Values array " - "qualifier on the method." )] - uint32 ResetCounter( - [IN, Description ( "The counter to reset." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", - "9" }, - Values { "All", "Scan Successes", "Scan Failures", - "Scan Retries", "Pick Successes", "Pick Failures", - "Pick Retries", "Put Successes", "Put Failures", - "Put Retries" }] - uint16 SelectedCounter); - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_MemoryCapacity.mof b/build/vendor/dmtf_mof/Physical/CIM_MemoryCapacity.mof deleted file mode 100644 index 476c4cac..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_MemoryCapacity.mof +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.18.0" ), - UMLPackagePath ( "CIM::Physical::Misc" ), - Description ( - "MemoryCapacity describes the type of Memory that can be " - "installed on a PhysicalElement and its minimum/maximum " - "configurations. Information on what memory is currently " - "\'installed\', versus an Element\'s min/max requirements, is " - "located in instances of the PhysicalMemory class." )] -class CIM_MemoryCapacity : CIM_PhysicalCapacity { - - [Key, Override ( "Name" ), - Description ( - "The inherited Name serves as a part of the " - "MemoryCapacity object key." )] - string Name; - - [Key, Description ( - "The type of memory. This is a part of the object key. " - "Values correspond to the list of possible memory types " - "in the PhysicalMemory class." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26..32567", - "32568..65535" }, - Values { "Unknown", "Other", "DRAM", "Synchronous DRAM", - "Cache DRAM", "EDO", "EDRAM", "VRAM", "SRAM", "RAM", - // 10 - "ROM", "Flash", "EEPROM", - "FEPROM", "EPROM", "CDRAM", "3DRAM", "SDRAM", "SGRAM", - "RDRAM", // 20 - "DDR", "DDR2", - "BRAM", "FB-DIMM", "DDR3", "FBD2", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { "CIM_PhysicalMemory.MemoryType" }] - uint16 MemoryType; - - [Description ( - "Minimum amount of memory, in Kbytes, that is needed for " - "the associated PhysicalElement to operate correctly." ), - Units ( "KiloBytes" ), - PUnit ( "byte * 2^10" )] - uint64 MinimumMemoryCapacity; - - [Description ( - "Maximum amount of memory, in Kbytes, that can be " - "supported by the associated PhysicalElement." ), - Units ( "KiloBytes" ), - PUnit ( "byte * 2^10" )] - uint64 MaximumMemoryCapacity; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_MemoryOnCard.mof b/build/vendor/dmtf_mof/Physical/CIM_MemoryOnCard.mof deleted file mode 100644 index 57920d9d..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_MemoryOnCard.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_MemoryOnCard -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Physical::Component" ), - Description ( - "PhysicalMemory can be located on HostingBoards, adapter Cards, " - "etc. This association explicitly defines this relationship of " - "Memory to Cards." )] -class CIM_MemoryOnCard : CIM_PackagedComponent { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( "The Card that includes or \'contains\' Memory." )] - CIM_Card REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The PhysicalMemory which is located on the Card." )] - CIM_PhysicalMemory REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_MemoryWithMedia.mof b/build/vendor/dmtf_mof/Physical/CIM_MemoryWithMedia.mof deleted file mode 100644 index 4ea449b6..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_MemoryWithMedia.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_MemoryWithMedia -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Physical::PhysicalMedia" ), - Description ( - "MemoryWithMedia indicates that Memory is associated with a " - "PhysicalMedia and its cartridge. The Memory provides media " - "identification and also stores user-specific data." )] -class CIM_MemoryWithMedia : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The Memory associated with PhysicalMedia." )] - CIM_PhysicalMemory REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The PhysicalMedia." )] - CIM_PhysicalMedia REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_PackageInChassis.mof b/build/vendor/dmtf_mof/Physical/CIM_PackageInChassis.mof deleted file mode 100644 index d75509fa..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_PackageInChassis.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PackageInChassis -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Physical::Package" ), - Description ( - "A Chassis can contain other Packages, such as other Chassis " - "and Cards. The PackageInChassis association makes explicit " - "this relationship." )] -class CIM_PackageInChassis : CIM_Container { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( - "The Chassis that contains other PhysicalPackages." )] - CIM_Chassis REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The PhysicalPackage which is contained in the Chassis." )] - CIM_PhysicalPackage REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_PackageInConnector.mof b/build/vendor/dmtf_mof/Physical/CIM_PackageInConnector.mof deleted file mode 100644 index f768d525..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_PackageInConnector.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Association, Version ( "2.18.0" ), - UMLPackagePath ( "CIM::Physical::Connector" ), - Description ( - "Adapter cards and other \'packaging\' are plugged into System " - "Connectors for power and/or to transfer data. This " - "relationship is defined by PackageInConnector. For example, it " - "would be used to describe the insertion of a daughtercard onto " - "another Card. Various subclasses of PackageInConnector are " - "also defined. PackageInSlot and its subclass, CardInSlot, are " - "two examples of subclasses." )] -class CIM_PackageInConnector : CIM_ElementInConnector { - - [Override ( "Antecedent" ), - Description ( - "The Connector into which the Package is inserted." )] - CIM_PhysicalConnector REF Antecedent; - - [Override ( "Dependent" ), - Max ( 1 ), - Description ( "The Package in the Connector." )] - CIM_PhysicalPackage REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_PackageInSlot.mof b/build/vendor/dmtf_mof/Physical/CIM_PackageInSlot.mof deleted file mode 100644 index 266f7448..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_PackageInSlot.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PackageInSlot -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Physical::Connector" ), - Description ( - "Complex networking devices often are Chassis-based. These " - "Chassis allow for enhancement and/or augmentation of their " - "base functionality by accepting additional Chassis devices, " - "similar to accepting functionality in the form of adding " - "Cards. This association models this capability." )] -class CIM_PackageInSlot : CIM_PackageInConnector { - - [Override ( "Antecedent" ), - Description ( - "The Slot into which the PhysicalPackage is inserted." )] - CIM_Slot REF Antecedent; - - [Override ( "Dependent" ), - Max ( 1 ), - Description ( "The Package in the Slot." )] - CIM_PhysicalPackage REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_PackageLocation.mof b/build/vendor/dmtf_mof/Physical/CIM_PackageLocation.mof deleted file mode 100644 index fb41fe70..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_PackageLocation.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PackageLocation -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Physical::Package" ), - Description ( - "PackageLocation is a space/hole/shelf, possibly with mounting " - "brackets or other connecting hardware, where other " - "PhysicalPackages may be placed. This class describes an entity " - "that holds something else and is not just a \'place\' (as is " - "conveyed by the CIM_Location object). This class has several " - "corollaries to HostingBoard. Where a HostingBoard (backplane) " - "has connectors/slots to describe the capabilities of holding " - "additional PhysicalPackages, a PackageLocation is used to " - "describe the same case for the general package, where there " - "may or may not be no connectors. Examples of PackageLocations " - "would include a disk cage in a tower PC or the chassis area " - "where the power supply is mounted." )] -class CIM_PackageLocation : CIM_PhysicalPackage { - - [Description ( - "LocationCoordinates represent the physical location of " - "the the FrameSlot instance. The property is defined as a " - "free-form string to allow the location information to be " - "described in vendor-unique terminology." )] - string LocationCoordinates; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_PackagedComponent.mof b/build/vendor/dmtf_mof/Physical/CIM_PackagedComponent.mof deleted file mode 100644 index 1bd8afff..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_PackagedComponent.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PackagedComponent -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Physical::Component" ), - Description ( - "A Component is typically contained by a PhysicalPackage, such " - "as a Chassis or Card. The PackagedComponent association makes " - "this relationship explicit. In the first sentence, the word, " - "\'typically\', is used. This is because a Component may be " - "removed from, or not yet inserted into, its containing Package " - "(ie, the Removable boolean is TRUE). Therefore, a Component " - "may not always be associated with a container." )] -class CIM_PackagedComponent : CIM_Container { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( - "The PhysicalPackage that contains Component(s)." )] - CIM_PhysicalPackage REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The PhysicalComponent which is contained in the Package." )] - CIM_PhysicalComponent REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_ParticipatesInSet.mof b/build/vendor/dmtf_mof/Physical/CIM_ParticipatesInSet.mof deleted file mode 100644 index d1968899..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_ParticipatesInSet.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ParticipatesInSet -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Physical::Misc" ), - Description ( - "ParticipatesInSet indicates which PhysicalElements should be " - "replaced together." )] -class CIM_ParticipatesInSet { - - [Key, Aggregate, Description ( "The ReplacementSet." )] - CIM_ReplacementSet REF Set; - - [Key, Description ( - "The PhysicalElement which should be replaced with other " - "Elements, as a Set." )] - CIM_PhysicalElement REF Element; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_PhysicalAssetCapabilities.mof b/build/vendor/dmtf_mof/Physical/CIM_PhysicalAssetCapabilities.mof deleted file mode 100644 index 7b9e5c55..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_PhysicalAssetCapabilities.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.18.0" ), - UMLPackagePath ( "CIM::Physical::Misc" ), - Description ( - "PhysicalAssetCapabilities describes the capabilities of " - "representing the FRU related information of the associated " - "instance of the CIM_PhysicalElement subclass." )] -class CIM_PhysicalAssetCapabilities : CIM_Capabilities { - - [Description ( - "Boolean indicating whether the PartNumber, Serial " - "Number, Model, Manufacturer, and SKU properties of " - "PhysicalElement are non-null, non-blank values, and the " - "availability of the complete FRU information." ), - ModelCorrespondence { "CIM_PhysicalElement.PartNumber", - "CIM_PhysicalElement.SerialNumber", - "CIM_PhysicalElement.Model", - "CIM_PhysicalElement.Manufacturer", - "CIM_PhysicalElement.SKU" }] - boolean FRUInfoSupported; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_PhysicalCapacity.mof b/build/vendor/dmtf_mof/Physical/CIM_PhysicalCapacity.mof deleted file mode 100644 index 2330097c..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_PhysicalCapacity.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PhysicalCapacity -// ================================================================== - [Abstract, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Physical::Misc" ), - Description ( - "PhysicalCapacity is an abstract class describing a " - "PhysicalElement\'s minimum/maximum requirements and ability to " - "support different types of hardware. For example, minimum and " - "maximum memory requirements can be modeled as a subclass of " - "CIM_PhysicalCapacity. \n" - "\n" - "Note that the items described in subclasses of " - "PhysicalCapacity, for example the class ConfigurationCapacity, " - "are either directly PhysicalElements (such as I/O slots or " - "storage library magazines) or closely associated to " - "PhysicalElements via the Realizes relationship (i.e., " - "LogicalDevices such as batteries or processors)." )] -class CIM_PhysicalCapacity : CIM_ManagedElement { - - [Description ( - "The Name property defines the label by which the " - "Physical Capacity object is known. When subclassed, the " - "Name property can be overridden to be a Key property." ), - MaxLen ( 256 )] - string Name; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_PhysicalComponent.mof b/build/vendor/dmtf_mof/Physical/CIM_PhysicalComponent.mof deleted file mode 100644 index bffb6cdf..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_PhysicalComponent.mof +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PhysicalComponent -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Physical::Component" ), - Description ( - "The PhysicalComponent class represents any low-level or basic " - "Component within a Package. A Component object either can not " - "or does not need to be decomposed into its constituent parts. " - "For example, an ASIC (or Chip) can not be further decomposed. " - "A tape for data storage (PhysicalMedia) does not need to be " - "decomposed. Any PhysicalElement that is not a Link, Connector, " - "or Package is a descendent (or member) of this class. For " - "example, the UART chipset on an internal modem Card would be a " - "subclass (if additional properties or associations are " - "defined) or an instance of PhysicalComponent." )] -class CIM_PhysicalComponent : CIM_PhysicalElement { - - [Description ( - "The RemovalCapabilites property is used to describe the " - "conditions under which a PhysicalPackage can be removed. " - "Since all PhysicalPackages are not removable, this " - "property defaults to 2, \'Not Applicable\'." ), - ValueMap { "0", "2", "3", "4" }, - Values { "Unknown", "Not Applicable", "Removable when off", - "Removable when on or off" }] - uint16 RemovalConditions = 2; - - [Deprecated { "CIM_PhysicalComponent.RemovalConditions" }, - Description ( - "The use of this property is being deprecated. Instead " - "RemovalConditions should be used. The RemovalConditions " - "property addresses whether a PhysicalComponent is " - "removable with or without power being applied. \n" - "\n" - "A PhysicalComponent is Removable if it is designed to be " - "taken in and out of the physical container in which it " - "is normally found, without impairing the function of the " - "overall packaging. A Component can still be Removable if " - "power must be \'off\' in order to perform the removal. " - "If power can be \'on\' and the Component removed, then " - "the Element is both Removable and HotSwappable. For " - "example, an upgradeable Processor chip is Removable." )] - boolean Removable; - - [Deprecated { "No Value" }, - Description ( - "The use of this property is being deprecated because it " - "is redundant with the FRU class and its associations. A " - "PhysicalComponent is Replaceable if it is possible to " - "replace (FRU or upgrade) the Element with a physically " - "different one. For example, some ComputerSystems allow " - "the main Processor chip to be upgraded to one of a " - "higher clock rating. In this case, the Processor is said " - "to be Replaceable. All Removable Components are " - "inherently Replaceable." )] - boolean Replaceable; - - [Deprecated { "CIM_PhysicalComponent.RemovalConditions" }, - Description ( - "The use of this property is being deprecated. Instead " - "RemovalConditions should be used. The RemovalConditions " - "property addresses whether a PhysicalComponent is " - "removable with or without power being applied. \n" - "\n" - "A PhysicalComponent is HotSwappable if it is possible to " - "replace the Element with a physically different but " - "equivalent one while the containing Package has power " - "applied to it (ie, is \'on\'). For example, a fan " - "Component may be designed to be HotSwappable. All " - "HotSwappable Components are inherently Removable and " - "Replaceable." )] - boolean HotSwappable; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_PhysicalConnector.mof b/build/vendor/dmtf_mof/Physical/CIM_PhysicalConnector.mof deleted file mode 100644 index 945ad02a..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_PhysicalConnector.mof +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::Physical::Package" ), - Description ( - "The PhysicalConnector class represents any PhysicalElement " - "that is used to connect to other Elements. Any object that can " - "be used to connect and transmit signals or power between two " - "or more PhysicalElements is a descendant (or member) of this " - "class. For example, Slots and D-shell connectors are types of " - "PhysicalConnectors." )] -class CIM_PhysicalConnector : CIM_PhysicalElement { - - [Description ( - "A free-form string describing the pin configuration " - "and/or signal usage of a PhysicalConnector." ), - ModelCorrespondence { "CIM_PhysicalConnector.NumPhysicalPins" }] - string ConnectorPinout; - - [Deprecated { "CIM_PhysicalConnector.ConnectorGender", - "CIM_PhysicalConnector.ConnectorElectricalCharacteristics", - "CIM_PhysicalConnector.NumPhysicalPins", - "CIM_PhysicalConnector.ConnectorLayout" }, - Description ( - "An array of integers defining the type of " - "PhysicalConnector. An array is specified to allow the " - "description of \'combinations\' of Connector " - "information. For example, one array entry could specify " - "RS-232 (value=25), another DB-25 (value=23) and a third " - "entry define the Connector as \"Male\" (value=2). \n" - "This single property is being deprecated in lieu of " - "using separate properties to describe the various " - "aspects of the connector. The separation allows for a " - "more generic means of describing the connectors. " - "Obsolete connectors were intentionally removed from the " - "new list." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26", "27", - "28", "29", "30", "31", "32", "33", "34", "35", "36", - "37", "38", "39", "40", "41", "42", "43", "44", "45", - "46", "47", "48", "49", "50", "51", "52", "53", "54", - "55", "56", "57", "58", "59", "60", "61", "62", "63", - "64", "65", "66", "67", "68", "69", "70", "71", "72", - "73", "74", "75", "76", "77", "78", "79", "80", "81", - "82", "83", "84", "85", "86", "87", "88", "89", "90", - "91", "92", "93", "94", "95", "96", "97", "98", "99", - "100", "101", "102", "103", "104", "105", "106", "107", - "108", "109", "110", "111", "112", "113", "114", "115", - "116", "117", "118", "119", "120", "121", "122" }, - Values { "Unknown", "Other", "Male", "Female", "Shielded", - "Unshielded", "SCSI (A) High-Density (50 pins)", - "SCSI (A) Low-Density (50 pins)", - "SCSI (P) High-Density (68 pins)", "SCSI SCA-I (80 pins)", - "SCSI SCA-II (80 pins)", - // 11 - "Fibre Channel (DB-9, Copper)", - "Fibre Channel (Optical Fibre)", - "Fibre Channel SCA-II (40 pins)", - "Fibre Channel SCA-II (20 pins)", "Fibre Channel BNC", - "ATA 3-1/2 Inch (40 pins)", "ATA 2-1/2 Inch (44 pins)", - "ATA-2", "ATA-3", "ATA/66", "DB-9", "DB-15", "DB-25", - "DB-36", "RS-232C", "RS-422", "RS-423", "RS-485", - "RS-449", "V.35", - // 31 - "X.21", "IEEE-488", - "AUI", "UPT Category 3", "UPT Category 4", - "UPT Category 5", "BNC", "RJ11", "RJ45", "Fiber MIC", - "Apple AUI", "Apple GeoPort", "PCI", "ISA", "EISA", - "VESA", "PCMCIA", "PCMCIA Type I", "PCMCIA Type II", - "PCMCIA Type III", - // 51 - "ZV Port", - "CardBus", "USB", "IEEE 1394", "HIPPI", "HSSDC (6 pins)", - "GBIC", "DIN", "Mini-DIN", "Micro-DIN", "PS/2", - "Infrared", "HP-HIL", "Access.bus", "NuBus", "Centronics", - "Mini-Centronics", "Mini-Centronics Type-14", - "Mini-Centronics Type-20", "Mini-Centronics Type-26", - // 71 - "Bus Mouse", "ADB", - "AGP", "VME Bus", "VME64", "Proprietary", - "Proprietary Processor Card Slot", - "Proprietary Memory Card Slot", - "Proprietary I/O Riser Slot", "PCI-66MHZ", "AGP2X", - "AGP4X", "PC-98", "PC-98-Hireso", "PC-H98", "PC-98Note", - "PC-98Full", "SSA SCSI", "Circular", - "On Board IDE Connector", "On Board Floppy Connector", - "9 Pin Dual Inline", "25 Pin Dual Inline", - "50 Pin Dual Inline", "68 Pin Dual Inline", - "On Board Sound Connector", "Mini-jack", "PCI-X", - "Sbus IEEE 1396-1993 32 bit", - // 100 - "Sbus IEEE 1396-1993 64 bit", - "MCA", "GIO", "XIO", "HIO", "NGIO", "PMC", "MTRJ", - "VF-45", "Future I/O", "SC", "SG", "Electrical", - "Optical", "Ribbon", "GLM", "1x9", "Mini SG", "LC", - "HSSC", - // 120 - "VHDCI Shielded (68 pins)", - "InfiniBand", "AGP8X" }, - ArrayType ( "Indexed" ), - MappingStrings { "MIF.DMTF|Bus Port|004.10" }, - ModelCorrespondence { - "CIM_PhysicalConnector.OtherTypeDescription" }] - uint16 ConnectorType[]; - - [Deprecated { "CIM_PhysicalConnector.ConnectorDescription" }, - Description ( - "A string describing the Connector - used when the " - "ConnectorType property is set to 1 (\"Other\"). " - "OtherType Description should be set to NULL when " - "ConnectorType is any value other than 1. \n" - "The use of this property is deprecated in lieu of " - "Connector Description." ), - MappingStrings { "MIF.DMTF|Bus Port|004.11" }, - ModelCorrespondence { "CIM_PhysicalConnector.ConnectorType" }] - string OtherTypeDescription; - - [Description ( "Describes the gender of the connector." ), - ValueMap { "0", "2", "3" }, - Values { "Unknown", "Male", "Female" }] - uint16 ConnectorGender; - - [Description ( - "Describes the electrical characteristic for this connector." - ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Unknown", "Other", "Single Ended", "Differential", - "Low Voltage Differential", "Optical", "Copper", - "Shielded", "Unshielded" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_PhysicalConnector.OtherElectricalCharacteristics" }] - uint16 ConnectorElectricalCharacteristics[]; - - [Description ( - "A string describing the connector\'s electrical " - "characteristics - used when the " - "ConnectorElectricalCharacteristics property contains an " - "entry of 1 (Other). OtherElectricalCharacteristics " - "should be set to NULL when " - "ConnectorElectricalCharacteristics does not contain an " - "value of 1." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_PhysicalConnector.ConnectorElectricalCharacteristics" }] - string OtherElectricalCharacteristics[]; - - [Description ( - "Describes the number of physical pins (male/female) that " - "are present on this connector." ), - ModelCorrespondence { "CIM_PhysicalConnector.ConnectorPinout" }] - uint32 NumPhysicalPins; - - [Description ( - "Describes the type of packaging normally associated with " - "this type of connector.16 (PCI) - describes the generic " - "PCI connector layout. 17 (PCI-X) - describes the PCI " - "Extended connector layout. 18 (PCI-E) - describes the " - "PCI Express connector layout, where the actual layout as " - "far as the length is concerned is unknown. 19 - 25 " - "(PCI-E xN) - describes the PCI Express connector layout, " - "where N is the lane count that appropriately descirbes " - "the length of the PCI-E connector." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26..32567", - "32568..65535" }, - Values { "Unknown", "Other", "RS232", "BNC", "RJ11", "RJ45", - "DB9", "Slot", "SCSI High Density", "SCSI Low Density", - "Ribbon", "AUI", "Fiber SC", "Fiber ST", "FDDI-MIC", - "Fiber-RTMJ", "PCI", "PCI-X", "PCI-E", "PCI-E x1", - "PCI-E x2", "PCI-E x4", "PCI-E x8", "PCI-E x16", - "PCI-E x32", "PCI-E x64", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { - "CIM_PhysicalConnector.ConnectorDescription" }] - uint16 ConnectorLayout; - - [Description ( - "A string describing the Connector - used when the " - "ConnectorLayout property is set to 1 (\"Other\"). " - "Connector Description should be set to NULL when " - "ConnectorLayout is any value other than 1." ), - MappingStrings { "MIF.DMTF|Bus Port|004.11" }, - ModelCorrespondence { "CIM_PhysicalConnector.ConnectorLayout" }] - string ConnectorDescription; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_PhysicalFrame.mof b/build/vendor/dmtf_mof/Physical/CIM_PhysicalFrame.mof deleted file mode 100644 index 2f854da3..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_PhysicalFrame.mof +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PhysicalFrame -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Physical::Package" ), - Description ( - "PhysicalFrame is a superclass of Rack, Chassis and other frame " - "enclosures, as they are defined in extension classes. " - "Properties like visible or audible alarm, and data related to " - "security breaches are in this superclass." )] -class CIM_PhysicalFrame : CIM_PhysicalPackage { - - [Description ( - "CableManagementStrategy is a free-form string that " - "contains information on how the various cables are " - "connected and bundled for the Frame. With many " - "networking, storage-related and power cables, cable " - "management can be a complex and challenging endeavor. " - "This string property contains information to aid in " - "assembly and service of the Frame." )] - string CableManagementStrategy; - - [Description ( - "ServicePhilosophy is an enumerated, integer-valued array " - "that indicates whether the Frame is serviced from the " - "top (value=2), front (3), back (4) or side (5), whether " - "it has sliding trays (6) or removable sides (7), and/or " - "whether the Frame is moveable (8), for example, having " - "rollers." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Unknown", "Other", "Service From Top", - "Service From Front", "Service From Back", - "Service From Side", "Sliding Trays", "Removable Sides", - "Moveable" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_PhysicalFrame.ServiceDescriptions" }] - uint16 ServicePhilosophy[]; - - [Description ( - "An array of free-form strings providing more detailed " - "explanations for any of the entries in the Service " - "Philosophy array. Note, each entry of this array is " - "related to the entry in ServicePhilosophy that is " - "located at the same index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_PhysicalFrame.ServicePhilosophy" }] - string ServiceDescriptions[]; - - [Description ( - "Boolean indicating whether the Frame is protected with a lock." - )] - boolean LockPresent; - - [Description ( - "Boolean indicating whether the Frame is equipped with an " - "audible alarm." )] - boolean AudibleAlarm; - - [Description ( - "Boolean indicating that the equipment includes a visible alarm." - )] - boolean VisibleAlarm; - - [Description ( - "SecurityBreach is an enumerated, integer-valued property " - "indicating whether a physical breach of the Frame was " - "attempted but unsuccessful (value=4) or attempted and " - "successful (5). Also, the values, \"Unknown\", \"Other\" " - "or \"No Breach\", can be specified." ), - ValueMap { "1", "2", "3", "4", "5" }, - Values { "Other", "Unknown", "No Breach", "Breach Attempted", - "Breach Successful" }, - MappingStrings { - "MIF.DMTF|Physical Container Global Table|004.12" }, - ModelCorrespondence { "CIM_PhysicalFrame.BreachDescription" }] - uint16 SecurityBreach; - - [Description ( - "BreachDescription is a free-form string providing more " - "information if the SecurityBreach property indicates " - "that a breach or some other security-related event " - "occurred." ), - ModelCorrespondence { "CIM_PhysicalFrame.SecurityBreach" }] - string BreachDescription; - - [Description ( - "Boolean indicating that the Frame is currently locked." )] - boolean IsLocked; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_PhysicalLink.mof b/build/vendor/dmtf_mof/Physical/CIM_PhysicalLink.mof deleted file mode 100644 index fbed6376..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_PhysicalLink.mof +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Physical::Link" ), - Description ( - "The PhysicalLink class represents the cabling of " - "PhysicalElements together. For example, serial or Ethernet " - "cables would be subclasses (if additional properties or " - "associations are defined) or instances of PhysicalLink. In " - "many cases, the numerous physical cables within a " - "PhysicalPackage or Network will not be modeled. However, where " - "these cables or Links are critical components, or are tagged " - "assets of the company, these objects can be instantiated using " - "this class or one of its descendent classes." )] -class CIM_PhysicalLink : CIM_PhysicalElement { - - [Description ( - "The maximum length of the PhysicalLink in feet." ), - Units ( "Feet" ), - PUnit ( "foot" )] - real64 MaxLength; - - [Description ( - "The current length of the PhysicalLink in feet. For some " - "connections, especially wireless technologies, this " - "property may not be applicable and should be left " - "uninitialized." ), - Units ( "Feet" ), - PUnit ( "foot" )] - real64 Length; - - [Description ( - "Boolean indicating whether the PhysicalLink is an actual " - "cable (TRUE) or a wireless connection (FALSE)." )] - boolean Wired; - - [Description ( - "The MediaType property defines the particular type of " - "Media through which transmission signals pass. Common " - "network media include twisted-pair (value=11 or 12), " - "coaxial (7, 8 or 9) and fiber-optic cable (10)." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17" }, - Values { "Unknown", "Other", "Cat1", "Cat2", "Cat3", "Cat4", - "Cat5", "50-ohm Coaxial", "75-ohm Coaxial", - "100-ohm Coaxial", "Fiber-optic", "UTP", "STP", - "Ribbon Cable", "Twinaxial", "Optical 9um", - "Optical 50um", "Optical 62.5um" }, - MappingStrings { - "MIF.DMTF|Fibre Channel Bus Port Extensions|001.4" }] - uint16 MediaType; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_PhysicalMedia.mof b/build/vendor/dmtf_mof/Physical/CIM_PhysicalMedia.mof deleted file mode 100644 index 7c434c20..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_PhysicalMedia.mof +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Physical::PhysicalMedia" ), - Description ( - "The PhysicalMedia class represents any type of documentation " - "or storage medium, such as tapes, CDROMs, etc. This class is " - "typically used to locate and manage Removable Media (versus " - "Media sealed with the MediaAccessDevice, as a single Package, " - "as is the case with hard disks). However, \'sealed\' Media can " - "also be modeled using this class, where the Media would then " - "be associated with the PhysicalPackage using the " - "PackagedComponent relationship." )] -class CIM_PhysicalMedia : CIM_PhysicalComponent { - - [Description ( - "The number of bytes that can be read from or written to " - "a Media. This property is not applicable to \"Hard Copy\" " - "(documentation) or cleaner Media. Data compression " - "should not be assumed, as it would increase the value in " - "this property. For tapes, it should be assumed that no " - "filemarks or blank space areas are recorded on the " - "Media." ), - Units ( "Bytes" ), - PUnit ( "byte" )] - uint64 Capacity; - - [Description ( - "Specifies the type of the PhysicalMedia, as an " - "enumerated integer. The MediaDescription property is " - "used to provide more explicit definition of the Media " - "type, whether it is pre-formatted, compatability " - "features, etc." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26", "27", - "28", "29", "30", "31", "32", "33", "34", "35", "36", - "37", "38", "39", "40", "41", "42", "43", "44", "45", - "46", "47", "48", "49", "50", "51", "52", "53", "54", - "55", "56", "57", "58", "59", "60", "61", "62", "63", - "64", "65", "66" }, - Values { "Unknown", "Other", "Tape Cartridge", - "QIC Cartridge", "AIT Cartridge", "DTF Cartridge", - "DAT Cartridge", "8mm Tape Cartridge", - "19mm Tape Cartridge", "DLT Cartridge", - // 10 - "Half-Inch Magnetic Tape Cartridge", - "Cartridge Disk", "JAZ Disk", "ZIP Disk", "SyQuest Disk", - "Winchester Removable Disk", "CD-ROM", "CD-ROM/XA", - "CD-I", "CD Recordable", - // 20 - "WORM", "Magneto-Optical", - "DVD", "DVD-RW+", "DVD-RAM", "DVD-ROM", "DVD-Video", - "Divx", "Floppy/Diskette", "Hard Disk", - // 30 - "Memory Card", - "Hard Copy", "Clik Disk", "CD-RW", "CD-DA", "CD+", - "DVD Recordable", "DVD-RW", "DVD-Audio", "DVD-5", - // 40 - "DVD-9", "DVD-10", - "DVD-18", "Magneto-Optical Rewriteable", - "Magneto-Optical Write Once", - "Magneto-Optical Rewriteable (LIMDOW)", - "Phase Change Write Once", "Phase Change Rewriteable", - "Phase Change Dual Rewriteable", "Ablative Write Once", - // 50 - "Near Field Recording", - "MiniQic", "Travan", "8mm Metal Particle", - "8mm Advanced Metal Evaporate", "NCTP", "LTO Ultrium", - "LTO Accelis", "9 Track Tape", "18 Track Tape", - // 60 - "36 Track Tape", - "Magstar 3590", "Magstar MP", "D2 Tape", - "Tape - DST Small", "Tape - DST Medium", "Tape - DST Large" }, - ModelCorrespondence { "CIM_PhysicalMedia.MediaDescription" }] - uint16 MediaType; - - [Description ( - "Additional detail related to the MediaType enumeration. " - "For example, if value 3 (\"QIC Cartridge\") is " - "specified, this property could indicate whether the tape " - "is wide or 1/4 inch, whether it is pre-formatted, " - "whether it is Travan compatible, etc." ), - ModelCorrespondence { "CIM_PhysicalMedia.MediaType" }] - string MediaDescription; - - [Description ( - "Boolean specifying whether the Media is currently write " - "protected by some kind of physical mechanism, such as a " - "protect tab on a floppy diskette." )] - boolean WriteProtectOn; - - [Description ( - "Boolean indicating that the PhysicalMedia is used for " - "cleaning purposes and not data storage." )] - boolean CleanerMedia; - - [Description ( - "Size of the Media in inches. For example, \'3.5\' would " - "be entered for a 3.5 inch disk, or \'12\' would be " - "entered for a 12 inch optical disk. On the other hand, " - "\'0.5\' would be defined for a 1/2 inch tape." ), - Units ( "Inches" ), - PUnit ( "inch" )] - real32 MediaSize; - - [Description ( - "For removable Media, the maximum number of times that " - "the Media can be mounted before it should be retired. " - "For cleaner Media, this is the maximum number of Drive " - "cleans that can be performed. For nonremovable Media, " - "such as hard disks, this property is not applicable and " - "should be set to 0." )] - uint64 MaxMounts; - - [Description ( - "For removable or cleaner Media, the number of times that " - "the Media has been mounted for data transfer or to clean " - "a Drive. For nonremovable Media, such as hard disks, " - "this property is not applicable and should be set to 0." ), - Counter, ModelCorrespondence { "CIM_PhysicalMedia.MaxMounts" }] - uint64 MountCount; - - [Description ( - "Boolean indicating that the Media has two recording " - "sides (TRUE) or only a single side (FALSE). Examples of " - "dual sided Media include DVD-ROM and some optical disks. " - "Examples of single sided Media are tapes and CD-ROM." )] - boolean DualSided; - - [Description ( - "One or more strings on \'labels\' on the PhysicalMedia. " - "The format of the labels and their state (readable, " - "unreadable, upside-down) are indicated in the " - "LabelFormats and LabelStates array properties." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_PhysicalMedia.LabelStates", - "CIM_PhysicalMedia.LabelFormats" }] - string PhysicalLabels[]; - - [Description ( - "An array of enumerated integers describing the states of " - "each of the labels on a PhysicalMedia. The Labels " - "themselves are listed in the PhysicalLabels property. " - "Note, each entry of this array is related to the entry " - "in PhysicalLabels that is located at the same index." ), - ValueMap { "0", "1", "2" }, - Values { "OK/Readable", "Unreadable", "Upside Down" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_PhysicalMedia.PhysicalLabels" }] - uint16 LabelStates[]; - - [Description ( - "An array of enumerated integers describing the formats " - "of each of the labels on a PhysicalMedia. The Labels " - "themselves are listed in the PhysicalLabels property. " - "Note, each entry of this array is related to the entry " - "in PhysicalLabels that is located at the same index." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Barcode", "Radio Frequency Identification", - "OCR (Optical Character Recognition)", - "MICR (Magnetic Ink Character Recognition)", - "7 Character Barcode", "9 Character Barcode" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_PhysicalMedia.PhysicalLabels" }] - uint16 LabelFormats[]; - - [Description ( - "For removable or cleaner Media, the date and time that " - "the Media was last mounted. For nonremovable Media, such " - "as hard disks, this property has no meaning and is not " - "applicable." )] - datetime TimeOfLastMount; - - [Description ( - "For removable or cleaner Media, the total time (in " - "seconds) that the Media has been mounted for data " - "transfer or to clean a Drive. For nonremovable Media, " - "such as hard disks, this property is not applicable and " - "should be set to 0." ), - Units ( "Seconds" ), - PUnit ( "second" )] - uint64 TotalMountTime; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_PhysicalMediaInLocation.mof b/build/vendor/dmtf_mof/Physical/CIM_PhysicalMediaInLocation.mof deleted file mode 100644 index 757212f7..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_PhysicalMediaInLocation.mof +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PhysicalMediaInLocation -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Physical::PhysicalMedia" ), - Description ( - "Within a StorageLibrary, all Media should be accounted for, " - "and be present in some Storage Location. This relationship is " - "made explicit by the PhysicalMediaInLocation association. In " - "addition, one can determine if a Location is empty or full " - "based on whether this association exists for the " - "StorageMediaLocation." )] -class CIM_PhysicalMediaInLocation : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "The StorageMediaLocation which holds the PhysicalMedia." )] - CIM_StorageMediaLocation REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The Media in the Location." )] - CIM_PhysicalMedia REF Dependent; - - [Description ( - "An enumeration expressing which \'Side\' of the Media is " - "facing up. Since sides can be named by various schemes " - "(0/1 or A/B), both schemes are expressed in the Values " - "array of this property. Also, the value 5 (\"Not " - "Applicable\" describes that orientation is not pertinent " - "for this Media." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Side 0", "Side 1", "Side A", "Side B", - "Not Applicable" }] - uint16 Orientation; - - [Description ( - "The date and time that the Media was last placed into " - "the referenced Location." )] - datetime TimeOfLastPlacement; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_PhysicalMemory.mof b/build/vendor/dmtf_mof/Physical/CIM_PhysicalMemory.mof deleted file mode 100644 index e359fbb9..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_PhysicalMemory.mof +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.18.0" ), - UMLPackagePath ( "CIM::Physical::Component" ), - Description ( - "PhysicalMemory is a subclass of CIM_Chip, representing low " - "level memory devices - SIMMS, DIMMs, raw memory chips, etc." )] -class CIM_PhysicalMemory : CIM_Chip { - - [Override ( "FormFactor" ), - MappingStrings { "MIF.DMTF|Memory Device|005.6" }] - uint16 FormFactor; - - [Description ( - "The type of PhysicalMemory. Synchronous DRAM is also " - "known as SDRAM Cache DRAM is also known as CDRAM CDRAM " - "is also known as Cache DRAM SDRAM is also known as " - "Synchronous DRAM BRAM is also known as Block RAM" ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26..32567", - "32568..65535" }, - Values { "Unknown", "Other", "DRAM", "Synchronous DRAM", - "Cache DRAM", "EDO", "EDRAM", "VRAM", "SRAM", "RAM", - //10 - "ROM", "Flash", "EEPROM", "FEPROM", - "EPROM", "CDRAM", "3DRAM", "SDRAM", "SGRAM", "RDRAM", - // 20 - "DDR", "DDR-2", "BRAM", - "FB-DIMM", "DDR3", "FBD2", "DMTF Reserved", - "Vendor Reserved" }, - MappingStrings { "MIF.DMTF|Memory Device|005.9" }] - uint16 MemoryType; - - [Description ( - "Total width, in bits, of the PhysicalMemory, including " - "check or error correction bits. If there are no error " - "correction bits, the value in this property should match " - "that specified for DataWidth." ), - Units ( "Bits" ), - MappingStrings { "MIF.DMTF|Memory Device|005.7" }] - uint16 TotalWidth; - - [Description ( - "Data width of the PhysicalMemory, in bits. A data width " - "of 0 and a TotalWidth of 8 would indicate that the " - "Memory is solely used to provide error correction bits." ), - Units ( "Bits" ), - MappingStrings { "MIF.DMTF|Memory Device|005.8" }] - uint16 DataWidth; - - [Description ( - "The speed of the PhysicalMemory, in nanoseconds." ), - Units ( "NanoSeconds" ), - MappingStrings { "MIF.DMTF|Memory Device|005.24" }] - uint32 Speed; - - [Description ( - "The total capacity of this PhysicalMemory, in bytes." ), - Units ( "Bytes" ), - MappingStrings { "MIF.DMTF|Memory Device|005.5" }] - uint64 Capacity; - - [Description ( - "A string identifying the physically labeled bank where " - "the Memory is located - for example, \'Bank 0\' or \'Bank " - "A\'." ), - MaxLen ( 64 ), - MappingStrings { "MIF.DMTF|Memory Device|005.4" }] - string BankLabel; - - [Description ( - "Specifies the position of the PhysicalMemory in a \'row\'. " - "For example, if it takes two 8-bit memory devices to " - "form a 16- bit row, then a value of \'2\'means that this " - "Memory is the second device. 0 is an invalid value for " - "this property." ), - MappingStrings { - "MIF.DMTF|Memory Device Mapped Addresses|001.6" }] - uint32 PositionInRow; - - [Description ( - "The position of this PhysicalMemory in an interleave. 0 " - "indicates non-interleaved. 1 indicates the first " - "position, 2 the second position and so on. For example, " - "in a 2:1 interleave, a value of \'1\' would indicate " - "that the Memory is in the \'even\' position." ), - MappingStrings { - "MIF.DMTF|Memory Device Mapped Addresses|001.7" }] - uint32 InterleavePosition; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_PhysicalPackage.mof b/build/vendor/dmtf_mof/Physical/CIM_PhysicalPackage.mof deleted file mode 100644 index bc3941f5..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_PhysicalPackage.mof +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.18.0" ), - UMLPackagePath ( "CIM::Physical::Package" ), - Description ( - "The PhysicalPackage class represents PhysicalElements that " - "contain or host other components. Examples are a Rack " - "enclosure or an adapter Card." )] -class CIM_PhysicalPackage : CIM_PhysicalElement { - - [Description ( - "The RemovalCapabilites property is used to describe the " - "conditions under which a PhysicalPackage can be removed. " - "Since all PhysicalPackages are not removable, this " - "property defaults to 2, \'Not Applicable\'." ), - ValueMap { "0", "2", "3", "4" }, - Values { "Unknown", "Not Applicable", "Removable when off", - "Removable when on or off" }] - uint16 RemovalConditions = 2; - - [Deprecated { "CIM_PhysicalPackage.RemovalConditions" }, - Description ( - "The use of this property is being deprecated. Instead " - "RemovalConditions should be used. The RemovalConditions " - "property addresses whether a PhysicalPackage is " - "removable with or without power being applied. \n" - "A PhysicalPackage is Removable if it is designed to be " - "taken in and out of the physical container in which it " - "is normally found, without impairing the function of the " - "overall packaging. A Package can still be Removable if " - "power must be \'off\' in order to perform the removal. " - "If power can be \'on\' and the Package removed, then the " - "Element is both Removable and HotSwappable. For example, " - "an extra battery in a laptop is Removable, as is a disk " - "drive Package inserted using SCA connectors. However, " - "the latter is also HotSwappable. A laptop\'s display is " - "not Removable, nor is a non-redundant power supply. " - "Removing these components would impact the function of " - "the overall packaging or is impossible due to the tight " - "integration of the Package." )] - boolean Removable; - - [Deprecated { "No Value" }, - Description ( - "The use of this property is being deprecated because it " - "is redundant with the FRU class and its associations. A " - "PhysicalPackage is Replaceable if it is possible to " - "replace (FRU or upgrade) the Element with a physically " - "different one. For example, some ComputerSystems allow " - "the main Processor chip to be upgraded to one of a " - "higher clock rating. In this case, the Processor is said " - "to be Replaceable. Another example is a power supply " - "Package mounted on sliding rails. All Removable packages " - "are inherently Replaceable." )] - boolean Replaceable; - - [Deprecated { "CIM_PhysicalPackage.RemovalConditions" }, - Description ( - "The use of this property is being deprecated. Instead " - "RemovalConditions should be used. The RemovalConditions " - "property addresses whether a PhysicalPackage is " - "removable with or without power being applied. \n" - "\n" - "A PhysicalPackage is HotSwappable if it is possible to " - "replace the Element with a physically different but " - "equivalent one while the containing Package has power " - "applied to it (ie, is \'on\'). For example, a disk drive " - "Package inserted using SCA connectors is both Removable " - "and HotSwappable. All HotSwappable packages are " - "inherently Removable and Replaceable." )] - boolean HotSwappable; - - [Description ( "The height of the PhysicalPackage in inches." ), - Units ( "Inches" ), - PUnit ( "inch" )] - real32 Height; - - [Description ( "The depth of the PhysicalPackage in inches." ), - Units ( "Inches" ), - PUnit ( "inch" )] - real32 Depth; - - [Description ( "The width of the PhysicalPackage in inches." ), - Units ( "Inches" ), - PUnit ( "inch" )] - real32 Width; - - [Description ( "The weight of the PhysicalPackage in pounds." ), - Units ( "Pounds" ), - PUnit ( "pound" )] - real32 Weight; - - [Description ( - "Enumeration defining the type of the PhysicalPackage. " - "Note that this enumeration expands on the list in the " - "Entity MIB (the attribute, entPhysicalClass). The " - "numeric values are consistent with CIM\'s enum numbering " - "guidelines, but are slightly different than the MIB\'s values.\n" - "Unknown - indicates that the package type is not known.\n" - "Other - The package type does not correspond to an " - "existing enumerated value. The value is specified using " - "the OtherPackageType property.\n" - "The values \"Rack\" through \"Port/Connector\" are " - "defined per the Entity-MIB (where the semantics of rack " - "are equivalent to the MIB\'s \'stack\' value). The other " - "values (for battery, processor, memory, power " - "source/generator and storage media package) are self-explanatory.\n" - "A value of \"Blade\" should be used when the " - "PhysicalPackage contains the operational hardware " - "aspects of a ComputerSystem, without the supporting " - "mechanicals such as power and cooling. For example, a " - "Blade Server includes processor(s) and memory, and " - "relies on the containing chassis to supply power and " - "cooling. In many respects, a Blade can be considered a " - "\"Module/Card\". However, it is tracked differently by " - "inventory systems and differs in terms of service " - "philosophy. For example, a Blade is intended to be " - "hot-plugged into a hosting enclosure without requiring " - "additional cabling, and does not require a cover to be " - "removed from the enclosure for installation. Similarly, " - "a \"Blade Expansion\" has characteristics of a \"Blade\" " - "and a \"Module/Card\". However, it is distinct from both " - "due to inventory tracking and service philosophy, and " - "because of its hardware dependence on a Blade. A Blade " - "Expansion must be attached to a Blade prior to inserting " - "the resultant assembly into an enclosure." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17" }, - Values { "Unknown", "Other", "Rack", "Chassis/Frame", - "Cross Connect/Backplane", "Container/Frame Slot", - "Power Supply", "Fan", "Sensor", "Module/Card", - "Port/Connector", "Battery", "Processor", "Memory", - "Power Source/Generator", - "Storage Media Package (e.g., Disk or Tape Drive)", - "Blade", "Blade Expansion" }, - MappingStrings { "MIB.IETF|ENTITY-MIB.entPhysicalClass" }, - ModelCorrespondence { "CIM_PhysicalPackage.OtherPackageType" }] - uint16 PackageType; - - [Description ( - "A string describing the package when the instance\'s " - "PackageType property is 1 (\"Other\")." ), - ModelCorrespondence { "CIM_PhysicalPackage.PackageType" }] - string OtherPackageType; - - [Description ( - "An array of strings that identify the component that is " - "compatible with, and can be inserted in a slot that " - "reports this string as one of the array element in the " - "VendorCompatibilityStrings This allows system " - "administrators to determine whether it is appropriateto " - "insert a package into a slot \n" - "In order to ensure uniqueness within the NameSpace, each " - "value defined by the vendor for use in the " - "VendorCompatibilityStrings property SHOULD be " - "constructed using the following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon " - "\':\', and where MUST include a copyrighted, " - "trademarked or otherwise unique name that is owned by " - "the business entity creating/defining the InstanceID, or " - "is a registered ID that is assigned to the business " - "entity by a recognized global authority (This is similar " - "to the _ structure of Schema " - "class names.) In addition, to ensure uniqueness " - "MUST NOT contain a colon (\':\'). When using this " - "algorithm, the first colon to appear in InstanceID MUST " - "appear between and . \n" - " is chosen by the business entity and SHOULD " - "not be re-used to identify different underlying " - "(real-world) elements." ), - ModelCorrespondence { "CIM_Slot.VendorCompatibilityStrings" }] - string VendorCompatibilityStrings[]; - - - [Deprecated { "No Value" }, - Description ( - "This method is being deprecated. A PhysicalPackage " - "cannot determine if it is compatible with another " - "object. The IsCompatible method verifies whether the " - "referenced PhysicalElement may be contained by or " - "inserted into the PhysicalPackage. The return value " - "should be 0 if the request was successfully executed, 1 " - "if the request is not supported and some other value if " - "an error occurred. In a subclass, the set of possible " - "return codes could be specified, using a ValueMap " - "qualifier on the method. The strings to which the " - "ValueMap contents are \'translated\' may also be " - "specified in the subclass as a Values array qualifier." )] - uint32 IsCompatible( - [IN, Description ( - "The element to check for compatibility with this one." - )] - CIM_PhysicalElement REF ElementToCheck); - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_PhysicalTape.mof b/build/vendor/dmtf_mof/Physical/CIM_PhysicalTape.mof deleted file mode 100644 index 625b4591..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_PhysicalTape.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Physical::PhysicalMedia" ), - Description ( - "The PhysicalTape class represents additional data for a Tape " - "Media. Information on the tape length and whether it must be " - "unloaded from BOT are properties of this class." )] -class CIM_PhysicalTape : CIM_PhysicalMedia { - - [Description ( "The physical length of the Tape in feet." ), - Units ( "Feet" ), - PUnit ( "foot" )] - real32 TapeLength; - - [Description ( - "Boolean set to TRUE if the Tape can be unloaded at any " - "position on the Media. It is set to FALSE if the tape " - "must be at a certain position for unload - such as at " - "the beginning of tape (BOT) area, or at mid-tape point " - "for TapeDrives with mid-tape load." )] - boolean UnloadAnywhere; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_Rack.mof b/build/vendor/dmtf_mof/Physical/CIM_Rack.mof deleted file mode 100644 index 3e1de9e1..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_Rack.mof +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.21.0" ), - UMLPackagePath ( "CIM::Physical::Package" ), - Description ( - "A Rack is a PhysicalFrame that represents an enclosure in " - "which Chassis are placed. Typically a Rack is nothing more " - "than the enclosure, and all the functioning componentry is " - "packaged in the Chassis, loaded in the Rack." )] -class CIM_Rack : CIM_PhysicalFrame { - - [Override ( "Height" ), - Description ( - "The height of the PhysicalPackage in \'U\'s. A \'U\' is " - "a standard unit of measure for the height of a Rack or " - "rack-mountable component. It is equal to 1.75 inches or " - "4.445 cm." ), - Units ( "Us" ), - PUnit ( "rack unit" )] - real32 Height; - - [Description ( - "Enumeration indicating the type of Rack. Information " - "such as \"Telco\" rack (value=2) or standard 19 inch " - "rack (1) can be specified. The country for which the " - "Rack is manufactured is defined in the the Country " - "Designation property." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Standard 19 Inch", "Telco", - "Equipment Shelf", "Non-Standard" }, - ModelCorrespondence { "CIM_Rack.CountryDesignation" }] - uint16 TypeOfRack; - - [Description ( - "Designation of the country for which the Rack is " - "designed. Country code strings are as defined by ISO/IEC " - "3166. The rack type is specified in the TypeOf Rack " - "property." ), - ModelCorrespondence { "CIM_Rack.TypeOfRack" }] - string CountryDesignation; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_ReplacementSet.mof b/build/vendor/dmtf_mof/Physical/CIM_ReplacementSet.mof deleted file mode 100644 index 44308710..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_ReplacementSet.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ReplacementSet -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Physical::Misc" ), - Description ( - "The ReplacementSet class aggregates PhysicalElements that must " - "be \'replaced\' or \'FRUed\' together. For example, when " - "replacing a memory card, the component memory chips could be " - "removed and replaced as well. Or, a set of memory chips may be " - "specified to be replaced or upgraded together using this " - "association." )] -class CIM_ReplacementSet : CIM_Collection { - - [Key, Description ( - "Name is a free-form string defining a label for the " - "ReplacementSet. It is the key for the object." ), - MaxLen ( 256 )] - string Name; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_Slot.mof b/build/vendor/dmtf_mof/Physical/CIM_Slot.mof deleted file mode 100644 index ec994d0b..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_Slot.mof +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.18.0" ), - UMLPackagePath ( "CIM::Physical::Connector" ), - Description ( - "The Slot class represents Connectors into which Packages are " - "inserted. For example, a PhysicalPackage that is a DiskDrive " - "may be inserted into an SCA \'Slot\'. As another example, a " - "Card (subclass of PhysicalPackage) may be inserted into a 16-, " - "32-, or 64-bit expansion \'Slot\' on a HostingBoard. PCI or " - "PCMCIA Type III Slots are examples of the latter." )] -class CIM_Slot : CIM_PhysicalConnector { - - [Override ( "ConnectorType" ), - MappingStrings { "MIF.DMTF|System Slot|005.2" }] - uint16 ConnectorType[]; - - [Override ( "PoweredOn" ), - MappingStrings { "MIF.DMTF|System Slot|005.13" }] - boolean PoweredOn; - - [Description ( - "Boolean indicating whether the Slot supports hot-plug of " - "adapter Cards." )] - boolean SupportsHotPlug; - - [Description ( - "Maximum height of an adapter Card that can be inserted " - "into the Slot, in inches." ), - Units ( "Inches" ), - PUnit ( "inch" )] - real32 HeightAllowed; - - [Description ( - "Maximum length of an adapter Card that can be inserted " - "into the Slot, in inches." ), - Units ( "Inches" ), - PUnit ( "inch" )] - real32 LengthAllowed; - - [Description ( - "Maximum bus width of adapter Cards that can be inserted " - "into this Slot, in bits. If the value is \'unknown\', " - "enter 0. If the value is other than 8, 16, 32, 64 or " - "128, enter 1." ), - Units ( "Bits" ), - ValueMap { "0", "1", "8", "16", "32", "64", "128" }, - MappingStrings { "MIF.DMTF|System Slot|005.3" }, - PUnit ( "bit" )] - uint16 MaxDataWidth; - - [Description ( - "An array of enumerated integers indicating the Vcc " - "voltage supported by this Slot." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Other", "3.3V", "5V" }, - MappingStrings { "MIF.DMTF|System Slot|005.9" }] - uint16 VccMixedVoltageSupport[]; - - [Description ( - "An array of enumerated integers indicating the Vpp " - "voltage supported by this Slot." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "3.3V", "5V", "12V" }, - MappingStrings { "MIF.DMTF|System Slot|005.10" }] - uint16 VppMixedVoltageSupport[]; - - [Description ( - "Maximum thermal dissipation of the Slot in milliwatts." ), - Units ( "MilliWatts" ), - MappingStrings { "MIF.DMTF|System Slot|005.11" }, - PUnit ( "watt * 10^-3" )] - uint32 ThermalRating; - - [Description ( - "Boolean indicating that this Slot is physically unique " - "and may hold special types of hardware, e.g. a graphics " - "processor slot. If set to TRUE, then the property, " - "Special PurposeDescription (a string), should specify " - "the nature of the uniqueness or purpose of the Slot." ), - ModelCorrespondence { "CIM_Slot.PurposeDescription" }] - boolean SpecialPurpose; - - [Description ( - "A free-form string describing that this Slot is " - "physically unique and may hold special types of " - "hardware. This property only has meaning when the " - "corresponding boolean property, SpecialPurpose, is set " - "to TRUE." ), - ModelCorrespondence { "CIM_Slot.SpecialPurpose" }] - string PurposeDescription; - - [Description ( - "The Number property indicates the physical slot number, " - "which can be used as an index into a system slot table, " - "whether or not that slot is physically occupied." ), - MappingStrings { "MIF.DMTF|System Slot|005.1" }] - uint16 Number; - - [Deprecated { "CIM_PhysicalElement.PoweredOn" }, - Description ( - "A boolean indicating whether the Slot is currently " - "powered (TRUE) or not (FALSE)." ), - MappingStrings { "MIF.DMTF|System Slot|005.13" }] - boolean Powered; - - [Description ( - "A boolean indicating whether the switch state of the " - "Slot is currently open (TRUE) or closed (FALSE). This " - "switch state determines whether the contents of the Slot " - "can be hot-plugged." ), - MappingStrings { "MIF.DMTF|System Slot|005.15" }] - boolean OpenSwitch; - - [Description ( - "Maximum link width of a switching bus type, such as " - "Infiniband and PCI Express. The width is expressed in " - "number of communication lines, or lanes, between port " - "and devices. This property dictates the maximum link " - "width, in lanes, of adapter Cards that can be inserted " - "into this Slot. If the value is \'unknown\', enter 0." ), - ValueMap { "0", "2", "3", "4", "5", "6", "7", "8", "9.." }, - Values { "Unknown", "x1", "x2", "x4", "x8", "x12", "x16", - "x32", "DMTF Reserved" }] - uint16 MaxLinkWidth; - - [Description ( - "An array of strings that identify the components that " - "are compatible and can be inserted in a slot. This " - "allows vendors to provide clues to the system " - "administrators by providing sufficient information to " - "request the appropriate hardware that can populate the " - "slot. In order to ensure uniqueness within the " - "NameSpace, each value defined by the vendor for use in " - "the VendorCompatibilityStrings property SHOULD be " - "constructed using the following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon " - "\':\', and where MUST include a copyrighted, " - "trademarked or otherwise unique name that is owned by " - "the business entity creating/defining the InstanceID, or " - "is a registered ID that is assigned to the business " - "entity by a recognized global authority (This is similar " - "to the _ structure of Schema " - "class names.) In addition, to ensure uniqueness " - "MUST NOT contain a colon (\':\'). When using this " - "algorithm, the first colon to appear in InstanceID MUST " - "appear between and . \n" - " is chosen by the business entity and SHOULD " - "not be re-used to identify different underlying " - "(real-world) elements." ), - ModelCorrespondence { - "CIM_PhysicalPackage.VendorCompatibilityStrings" }] - string VendorCompatibilityStrings[]; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_SlotInSlot.mof b/build/vendor/dmtf_mof/Physical/CIM_SlotInSlot.mof deleted file mode 100644 index 8b68f1c6..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_SlotInSlot.mof +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SlotInSlot -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Physical::Connector" ), - Description ( - "Slots are special types of Connectors into which adapter Cards " - "are typically inserted. The SlotInSlot relationship represents " - "the ability of a special adapter to extend the existing Slot " - "structure to enable otherwise incompatible Cards to be plugged " - "into a Frame or Hosting Board. The adapter effectively creates " - "a new Slot and can be thought of (conceptually) as a Slot in a " - "Slot. This enables Cards that would otherwise be physically " - "and/or electrically incompatible with the existing Slots to be " - "supported, by interfacing to the Slot provided by the adapter. " - "This has many practical uses. For example, networking boards " - "are very expensive. As new hardware becomes available, Chassis " - "and even Card configurations change. To protect the investment " - "of their customers, networking vendors will manufacture " - "special adapters that enable old Cards to fit into new Chassis " - "or Hosting Boards and/or new Cards to fit into old. This is " - "done using a special adapter that fits over one or more " - "existing Slots and presents a new Slot into which the Card can " - "plug." )] -class CIM_SlotInSlot : CIM_ConnectedTo { - - [Override ( "Antecedent" ), - Description ( - "The Antecedent represents the existing Slot(s) of the " - "HostingBoard, or Frame that are being adapted to " - "accommodate a Card that would otherwise not be " - "physically and/or electrically compatible with it." )] - CIM_Slot REF Antecedent; - - [Override ( "Dependent" ), - Max ( 1 ), - Description ( "The new Slot provided by the adapter board." )] - CIM_Slot REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_StorageMediaLocation.mof b/build/vendor/dmtf_mof/Physical/CIM_StorageMediaLocation.mof deleted file mode 100644 index 2cb00ce1..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_StorageMediaLocation.mof +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Physical::StoragePackage" ), - Description ( - "StorageMediaLocation is a PackageLocation where PhysicalMedia " - "may be placed. This class is typically used in the context of " - "a StorageLibrary. Examples of StorageMediaLocations are Media " - "AccessDevices, InterLibraryPorts or \'slots\' in a Library\'s " - "panel." )] -class CIM_StorageMediaLocation : CIM_PackageLocation { - - [Description ( - "The type of Location. For example, whether this is an " - "individual Media \"Slot\" (value=2), a MediaAccessDevice " - "(value=4) or a \"Magazine\" (value=3) is indicated in " - "this property." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" }, - Values { "Unknown", "Other", "Slot", "Magazine", - "MediaAccessDevice", "InterLibrary Port", - "Limited Access Port", "Door", "Shelf", "Vault" }] - uint16 LocationType; - - [Description ( - "Certain StorageMediaLocations may only be able to accept " - "a limited set of PhysicalMedia MediaTypes. This property " - "defines an array containing the types of Media that are " - "acceptable for placement in the Location. Additional " - "information and description of the contained MediaTypes " - "can be provided using the TypesDescription array. Also, " - "size data (for example, DVD disc diameter) can be " - "specified using the MediaSizesSupported array. \n" - "\n" - "Values defined here correspond to those in the " - "CIM_Physical Media.MediaType property. This allows quick " - "comparisons using value equivalence calculations. It is " - "understood that there is no external physical difference " - "between (for example) DVD- Video and DVD-RAM. But, " - "equivalent values in both the Physical Media and " - "StorageMediaLocation enumerations allows for one for one " - "comparisons with no additional processing logic (i.e., " - "the following is not required ... if \"DVD-Video\" then " - "value=\"DVD\")." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26", "27", - "28", "29", "30", "31", "32", "33", "34", "35", "36", - "37", "38", "39", "40", "41", "42", "43", "44", "45", - "46", "47", "48", "49", "50", "51", "52", "53", "54", - "55", "56", "57", "58", "59", "60", "61", "62", "63", - "64", "65", "66" }, - Values { "Unknown", "Other", "Tape Cartridge", - "QIC Cartridge", "AIT Cartridge", "DTF Cartridge", - "DAT Cartridge", "8mm Tape Cartridge", - "19mm Tape Cartridge", "DLT Cartridge", - // 10 - "Half-Inch Magnetic Tape Cartridge", - "Cartridge Disk", "JAZ Disk", "ZIP Disk", "SyQuest Disk", - "Winchester Removable Disk", "CD-ROM", "CD-ROM/XA", - "CD-I", "CD Recordable", - // 20 - "WORM", - "Magneto-Optical", "DVD", "DVD-RW+", "DVD-RAM", "DVD-ROM", - "DVD-Video", "Divx", "Floppy/Diskette", "Hard Disk", - // 30 - "Memory Card", "Hard Copy", - "Clik Disk", "CD-RW", "CD-DA", "CD+", "DVD Recordable", - "DVD-RW", "DVD-Audio", "DVD-5", - // 40 - "DVD-9", "DVD-10", - "DVD-18", "Magneto-Optical Rewriteable", - "Magneto-Optical Write Once", - "Magneto-Optical Rewriteable (LIMDOW)", - "Phase Change Write Once", "Phase Change Rewriteable", - "Phase Change Dual Rewriteable", "Ablative Write Once", - // 50 - "Near Field Recording", - "MiniQic", "Travan", "8mm Metal Particle", - "8mm Advanced Metal Evaporate", "NCTP", "LTO Ultrium", - "LTO Accelis", "9 Track Tape", "18 Track Tape", - // 60 - "36 Track Tape", - "Magstar 3590", "Magstar MP", "D2 Tape", - "Tape - DST Small", "Tape - DST Medium", "Tape - DST Large" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_PhysicalMedia.MediaType", - "CIM_StorageMediaLocation.MediaSizesSupported" }] - uint16 MediaTypesSupported[]; - - [Description ( - "The sizes (in inches) of the particular MediaTypes that " - "may be placed in the Location. Note, each entry of this " - "array is related to the entry in the MediaTypesSupported " - "array that is located at the same index." ), - Units ( "Inches" ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_PhysicalMedia.MediaType", - "CIM_StorageMediaLocation.MediaSizesSupported", - "CIM_StorageMediaLocation.TypeDescriptions" }, - PUnit ( "inch" )] - real32 MediaSizesSupported[]; - - [Description ( - "A StorageMediaLocation may hold more than one " - "PhysicalMedia - for example, a Magazine. This property " - "indicates the Physical Media capacity of the Location." )] - uint32 MediaCapacity; - - [Description ( - "This property provides additional detail related to the " - "entries in the MediaTypesSupported array. This is " - "especially critical when the MediaTypesSupported value " - "is 1 (\"Other\"). Note, each entry of this array is " - "related to the entry in MediaTypesSupported that is " - "located at the same index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_StorageMediaLocation.MediaTypesSupported" }] - string TypeDescriptions[]; - - -}; diff --git a/build/vendor/dmtf_mof/Physical/CIM_SystemBusCard.mof b/build/vendor/dmtf_mof/Physical/CIM_SystemBusCard.mof deleted file mode 100644 index 730414af..00000000 --- a/build/vendor/dmtf_mof/Physical/CIM_SystemBusCard.mof +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SystemBusCard -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Physical::Package" ), - Description ( - "The SystemBusCard class represents additional information for " - "a CIM_Card, detailing the Card\'s bus type and data width. " - "These properties dictate the type of Slot into which the Card " - "can be inserted. For example, using the properties of this " - "class, one can define that a Card is a PCI, 64 bit adapter." )] -class CIM_SystemBusCard : CIM_Card { - - [Description ( - "An enumerated integer describing the System bus type for " - "this Card. It indicates the type of Slot into which the " - "Card can plug. The list of permissible values aligns " - "with the System bus types in " - "CIM_PhysicalConnector.Connector Type." ), - ValueMap { "43", "44", "45", "46", "47", "48", "49", "50", - "52", "64", "65", "73", "74", "75", "76", "77", "78", - "79", "80", "81", "82", "83", "84", "85", "86", "87", - "98", "99", "100", "101", "102", "103", "104", "105", - "106", "109", "110", "111", "112" }, - Values { // 43 - "PCI", "ISA", "EISA", - "VESA", "PCMCIA", "PCMCIA Type I", "PCMCIA Type II", - "PCMCIA Type III", - // 52 - "CardBus", - // 64 - "Access.bus", "NuBus", - // 73 - "AGP", "VME Bus", "VME64", - "Proprietary", "Proprietary Processor Card Slot", - "Proprietary Memory Card Slot", - "Proprietary I/O Riser Slot", - // 80 - "PCI-66MHZ", "AGP2X", - "AGP4X", "PC-98", "PC-98-Hireso", "PC-H98", "PC-98Note", - "PC-98Full", // 98 - "PCI-X", - "Sbus IEEE 1396-1993 32 bit", - // 100 - "Sbus IEEE 1396-1993 64 bit", - "MCA", "GIO", "XIO", "HIO", "NGIO", "PMC", - // 109 - "Future I/O", - "InfiniBand", "AGP8X", "PCI-E" }, - ModelCorrespondence { "CIM_PhysicalConnector.ConnectorType" }] - uint16 BusType; - - [Description ( - "System bus width (in bits) required by this Card. If " - "\'unknown\', enter 0. If \'other\' than the values, 8, " - "16, 32, 64 or 128, enter 1. The list of permissible " - "values aligns with the data in CIM_Slot.MaxBusWidth." ), - Units ( "Bits" ), - ValueMap { "0", "1", "8", "16", "32", "64", "128" }, - ModelCorrespondence { "CIM_Slot.MaxDataWidth" }] - uint16 BusWidth; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_AcceptCredentialFrom.mof b/build/vendor/dmtf_mof/Policy/CIM_AcceptCredentialFrom.mof deleted file mode 100644 index 3b09ae67..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_AcceptCredentialFrom.mof +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "This association specifies that a credential management " - "service (e.g., CertificateAuthority or Kerberos key " - "distribution service) is to be trusted to certify credentials, " - "presented at the packet level. The association defines an " - "\'approved\' CredentialManagementService that is used for " - "validation. \n" - "\n" - "The use of this class is best explained via an example: \n" - "If a CertificateAuthority is specified using this association, " - "and a corresponding X509CredentialFilterEntry is also " - "associated with a PacketFilterCondition (via the relationship, " - "FilterOfPacketCondition), then the credential MUST match the " - "FilterEntry data AND be certified by that CA (or one of the " - "CredentialManagementServices in its trust hierarchy). " - "Otherwise, the X509CredentialFilterEntry is deemed not to " - "match. If a credential is certified by a " - "CredentialManagementService associated with the " - "PacketFilterCondition through the AcceptCredentialFrom " - "relationship, but there is no corresponding " - "CredentialFilterEntry, then all credentials from the related " - "service are considered to match." ), - MappingStrings { "IPSP Policy Model.IETF|AcceptCredentialFrom" }] -class CIM_AcceptCredentialFrom : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "The CredentialManagementService that is issuing the " - "credential to be matched in the PacketFilterCondition." ), - MappingStrings { - "IPSP Policy Model.IETF|AcceptCredentialFrom.Antecedent" }] - CIM_CredentialManagementService REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The PacketFilterCondition that associates the " - "CredentialManagementService and any " - "FilterLists/FilterEntries." ), - MappingStrings { - "IPSP Policy Model.IETF|AcceptCredentialFrom.Dependent" }] - CIM_PacketFilterCondition REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_AccountAuthentication.mof b/build/vendor/dmtf_mof/Policy/CIM_AccountAuthentication.mof deleted file mode 100644 index d097a01f..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_AccountAuthentication.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "A class describing a company\'s and/or administrator\'s " - "credential requirements that should be authenticated in order " - "to establish/trust a CIM_Identity. This class defines a " - "specific identity whose account credentials should be " - "authenticated." )] -class CIM_AccountAuthentication : CIM_AuthenticationCondition { - - [Description ( - "String defining the account\'s ID which is authenticated." )] - string AccountID; - - [Description ( - "String defining a hostname, URI or other information " - "identifying the system where the Account resides." )] - string AccountContext; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_AuthenticationCondition.mof b/build/vendor/dmtf_mof/Policy/CIM_AuthenticationCondition.mof deleted file mode 100644 index aad710a6..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_AuthenticationCondition.mof +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Abstract, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "An abstract class whose subclasses describe one of a company\'s " - "and/or administrator\'s credential requirements, and/or other " - "information that should be authenticated in order to " - "establish/trust a CIM_Identity. The PolicyConditions collected " - "by an instance of AuthenticationRule describe the various " - "requirements under which a CIM_Identity\'s " - "CurrentlyAuthenticated Boolean is set to TRUE. Note that the " - "CIM_Identities which are authenticated are specified through " - "the AuthenticationRule, using the PolicySet AppliesToElement " - "association." )] -class CIM_AuthenticationCondition : CIM_PolicyCondition { - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_AuthenticationRule.mof b/build/vendor/dmtf_mof/Policy/CIM_AuthenticationRule.mof deleted file mode 100644 index e2e6bc27..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_AuthenticationRule.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "A class representing a company\'s and/or administrator\'s " - "authentication requirements for a CIM_Identity. The " - "PolicyConditions collected by an instance of " - "AuthenticationRule describe the various requirements under " - "which a CIM_Identity\'s CurrentlyAuthenticated Boolean is set " - "to TRUE. Note that the CIM_Identities which are authenticated " - "are tied to the Rule by the association, PolicySet " - "AppliesToElement. \n" - "\n" - "At this time, there are no actions associated with this " - "PolicyRule. This is because the actions are implicit. When the " - "conditions of the rule are met, then the " - "CurrentlyAuthenticated Boolean properties of the associated " - "instances of CIM_Identity are set to TRUE." )] -class CIM_AuthenticationRule : CIM_PolicyRule { - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_BiometricAuthentication.mof b/build/vendor/dmtf_mof/Policy/CIM_BiometricAuthentication.mof deleted file mode 100644 index 62593dbd..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_BiometricAuthentication.mof +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "A class describing a company\'s and/or administrator\'s " - "credential requirements that should be authenticated in order " - "to establish/trust a CIM_Identity. This class defines specific " - "biometric data that should be authenticated." )] -class CIM_BiometricAuthentication : CIM_AuthenticationCondition { - - [Description ( - "Integer enumeration identifying the biometric data that " - "should be authenticated." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Other", "Facial", "Retina", "Mark", "Finger", - "Voice", "DNA-RNA", "EEG" }, - ModelCorrespondence { - "CIM_BiometricAuthentication.OtherBiometric" }] - uint16 TypeOfBiometric; - - [Description ( - "String specifying the biometric when the TypeOfBiometric " - "property is set to 1, \"Other\"." ), - ModelCorrespondence { - "CIM_BiometricAuthentication.TypeOfBiometric" }] - string OtherBiometric; - - [Description ( - "String defining a specific biometric code, which may be " - "validated by the security infrastructure. If this " - "property is left blank, it is the responsibility of the " - "infrastructure to verify the biometric (which MUST be of " - "a type specified by the TypeOfBiometric property)." )] - string PersonalIdentifier; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_CompoundPolicyAction.mof b/build/vendor/dmtf_mof/Policy/CIM_CompoundPolicyAction.mof deleted file mode 100644 index 9d95e78e..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_CompoundPolicyAction.mof +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "CompoundPolicyAction is used to represent an expression " - "consisting of an ordered sequence of action terms. Each action " - "term is represented as a subclass of the PolicyAction class. " - "Compound actions are constructed by associating dependent " - "action terms together using the PolicyActionInPolicyAction " - "aggregation." )] -class CIM_CompoundPolicyAction : CIM_PolicyAction { - - [Description ( - "This property gives a policy administrator a way of " - "specifying how the ordering of the PolicyActions " - "associated with this PolicyRule is to be interpreted. " - "Three values are supported: \n" - "o mandatory(1): Do the actions in the indicated order, " - "or don\'t do them at all. \n" - "o recommended(2): Do the actions in the indicated order " - "if you can, but if you can\'t do them in this order, do " - "them in another order if you can. \n" - "o dontCare(3): Do them -- I don\'t care about the order. \n" - "The default value is 3 (\"DontCare\")." ), - ValueMap { "1", "2", "3" }, - Values { "Mandatory", "Recommended", "Dont Care" }] - uint16 SequencedActions = 3; - - [Description ( - "ExecutionStrategy defines the strategy to be used in " - "executing the sequenced actions aggregated by this " - "CompoundPolicyAction. There are three execution " - "strategies: \n" - "\n" - "Do Until Success - execute actions according to " - "predefined order, until successful execution of a single " - "action. \n" - "Do All - execute ALL actions which are part of the " - "modeled set, according to their predefined order. " - "Continue doing this, even if one or more of the actions " - "fails. \n" - "Do Until Failure - execute actions according to " - "predefined order, until the first failure in execution " - "of an action instance. \n" - "The default value is 2 (\"Do All\")." ), - ValueMap { "1", "2", "3" }, - Values { "Do Until Success", "Do All", "Do Until Failure" }] - uint16 ExecutionStrategy = 2; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_CompoundPolicyCondition.mof b/build/vendor/dmtf_mof/Policy/CIM_CompoundPolicyCondition.mof deleted file mode 100644 index 0fa2535b..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_CompoundPolicyCondition.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "CompoundPolicyCondition is used to represent compound " - "conditions formed by aggregating simpler policy conditions. " - "Compound conditions are constructed by associating subordinate " - "condition terms together using the " - "PolicyConditionInPolicyCondition aggregation." )] -class CIM_CompoundPolicyCondition : CIM_PolicyCondition { - - [Description ( - "Indicates whether the list of CompoundPolicyConditions " - "associated with this PolicyRule is in disjunctive normal " - "form (DNF) or conjunctive normal form (CNF). The default " - "value is 1 (\"DNF\")." ), - ValueMap { "1", "2" }, - Values { "DNF", "CNF" }] - uint16 ConditionListType; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_DocumentAuthentication.mof b/build/vendor/dmtf_mof/Policy/CIM_DocumentAuthentication.mof deleted file mode 100644 index 9a14647d..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_DocumentAuthentication.mof +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "A class describing a company\'s and/or administrator\'s " - "credential requirements that should be authenticated in order " - "to establish/trust a CIM_Identity. This class defines the " - "specific document that should be authenticated." )] -class CIM_DocumentAuthentication : CIM_AuthenticationCondition { - - [Description ( - "Integer enumeration identifying the document that should " - "be authenticated." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7" }, - Values { "Other", "Passport", "Birth Certificate", - "Credit Card", "Drivers License", "Membership Card", - "Social Security Card" }, - ModelCorrespondence { - "CIM_DocumentAuthentication.OtherDocument" }] - uint16 TypeOfDocument; - - [Description ( - "String specifying the document when the TypeOfDocument " - "property is set to 1, \"Other\"." ), - ModelCorrespondence { - "CIM_DocumentAuthentication.TypeOfDocument" }] - string OtherDocument; - - [Description ( - "String defining a particular document which may be used " - "in the authentication process for example, a specific " - "driver\'s license or passport number. If left blank, " - "then any valid document matching the category specified " - "by the TypeOfDocument property, can be accepted." )] - string DocumentIdentifier; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_ElementInPolicyRoleCollection.mof b/build/vendor/dmtf_mof/Policy/CIM_ElementInPolicyRoleCollection.mof deleted file mode 100644 index e35812d4..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_ElementInPolicyRoleCollection.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Aggregation, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "An ElementInPolicyRoleCollection aggregates zero or more " - "ManagedElement subclass instances into a PolicyRoleCollection " - "object, representing a role played by these ManagedElements. " - "This Collection indicates that the aggregated PolicySets " - "(aggregated by CIM_PolicySetInRoleCollection) MAY BE applied " - "to the referenced elements. To indicate that the PolicySets " - "ARE being enforced for the element, use the " - "PolicySetAppliesToElement association." )] -class CIM_ElementInPolicyRoleCollection : CIM_MemberOfCollection { - - [Aggregate, Override ( "Collection" ), - Description ( "The PolicyRoleCollection." )] - CIM_PolicyRoleCollection REF Collection; - - [Override ( "Member" ), - Description ( - "The ManagedElement that plays the role represented by " - "the PolicyRoleCollection." )] - CIM_ManagedElement REF Member; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_FilterOfPacketCondition.mof b/build/vendor/dmtf_mof/Policy/CIM_FilterOfPacketCondition.mof deleted file mode 100644 index 6ff00d8f..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_FilterOfPacketCondition.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "FilterOfPacketCondition associates a network traffic " - "specification (i.e., a FilterList) with a PolicyRule\'s " - "PacketFilterCondition." ), - MappingStrings { "IPSP Policy Model.IETF|FilterOfSACondition" }] -class CIM_FilterOfPacketCondition : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "A FilterList describes the traffic selected by the " - "PacketFilterCondition. A PacketFilterCondition is " - "associated with one and only one FilterList, but that " - "filter list may aggregate many filter entries." ), - MappingStrings { - "IPSP Policy Model.IETF|FilterOfSACondition.Antecedent" }] - CIM_FilterList REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The PacketFilterCondition that uses the FilterList as " - "part of a PolicyRule." ), - MappingStrings { - "IPSP Policy Model.IETF|FilterOfSACondition.Dependent" }] - CIM_PacketFilterCondition REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_KerberosAuthentication.mof b/build/vendor/dmtf_mof/Policy/CIM_KerberosAuthentication.mof deleted file mode 100644 index 7dec2e4d..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_KerberosAuthentication.mof +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "A class describing a company\'s and/or administrator\'s " - "credential requirements that should be authenticated in order " - "to establish/trust a CIM_Identity. This class defines a user " - "whose Kerberos ticket should be authenticated." )] -class CIM_KerberosAuthentication : CIM_AuthenticationCondition { - - [Description ( - "String holding the user name for which the ticket is issued." - )] - string UserName; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_MethodAction.mof b/build/vendor/dmtf_mof/Policy/CIM_MethodAction.mof deleted file mode 100644 index b602ed45..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_MethodAction.mof +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "MethodAction is a PolicyAction that MAY invoke methods as " - "defined by a query. If there are no results returned from the " - "query, then no methods are called, otherwise each query result " - "row defines the method to call and its parameters. The called " - "method MAY be either an intrinsic method of a CIM Namespace or " - "an extrinsic method of a CIM_ManagedElement. \n" - "\n" - "In order to correlate between methods called by this " - "MethodAction and any other invoked Methods, InstMethodCall " - "indications MAY be created for the method calls that result " - "from this MethodAction. These indications are named by the " - "value in the InstMethodCallName property. These indications " - "MUST be produced if that InstMethodCallName value is included " - "in the FROM clause of the query of some other MethodAction " - "instance within the same PolicyRule. (The details of how this " - "is accomplished are implementation dependent.) \n" - "\n" - "The input parameters to the method are defined by the query " - "and MAY be fixed values defined by literals or MAY be defined " - "by reference to one or more properties of classes named in the " - "FROM clause of the query. The referenced objects MAY be those " - "produced by QueryConditions or MethodActions instances " - "associated to the same PolicyRule instance." )] -class CIM_MethodAction : CIM_PolicyAction { - - [Required, Description ( - "In the context of the associated PolicyRule, " - "InstMethodCallName defines a unique name for the " - "InstMethodCall instances that result from the methods " - "invoked as a result of evaluating the Query string. This " - "name MAY be used in subsequent MethodActions of the same " - "PolicyRule to identify the set of InstMethodCall " - "instances that result from evaluation of this " - "MethodAction in the context of its PolicyRule. This " - "string is treated as a class name, in a query statement." ), - ModelCorrespondence { "CIM_MethodAction.Query" }] - string InstMethodCallName; - - [Required, Description ( - "A query expression that defines the method to invoke and " - "its input parameters. These are defined by the first and " - "subsequent select-list entries in the Query string\'s " - "select-criteria. The FROM clause MAY reference any " - "object, including those named by the QueryResultName and " - "MethodCallName produced by QueryConditions or " - "MethodActions of the same PolicyRule. \n" - "Note that both intrinsic and extrinsic methods MAY be " - "called. The first select-list entry MUST be an object " - "Path to a method. For consistency it SHOULD be called " - "MethodName. However, if there is a conflict with " - "existing parameter names, it MAY be called something " - "else. The remaining select list entries are not " - "positional and MUST use the name of the corresponding " - "method parameter. \n" - "The object path to a method is defined here as a WBEM " - "URI, (see DSP0207) dot concatenated with a method name. " - "It must have the form: [, \".\",] . \n" - "The named method may be intrinsic or extrinsic. " - "Extrinsics may be at class level (i.e. static) or not. \n" - "The particular instance of this class that is invoking " - "the specified method defines the default namespace, " - "class, and key values. If any of these are missing from " - "the WBEM URI, these defaults are assumed. \n" - "For intrinsic methods (as defined in the \"Specification " - "for CIM Operations over HTTP\", see DSP0200), any class " - "name or key values specified in the WBEM URI are " - "ignored. Similarly, key values are ignored for static " - "methods. \n" - "Intrinsic methods that take an , an " - ", an , or a (as " - "defined in DSP0200) as an input parameter are " - "preprocessed by the implementation of the MethodAction " - "instance. For each of or , " - "the corresponding input parameter name is set to a WBEM " - "URI of the instance or class. /n For each of " - "or , the corresponding input parameter " - "must be set to a WBEM URI to the instance or class. " - "Properties of that instance are passed as additional " - "select list entries with the name of the corresponding " - "parameter dot appended with the name of the named " - "instance property. \n" - "For example: if the call is to ModifyInstance, then " - "parameter ModifiedInstance is set to the= of " - "the instance to modify and for each relevant property to " - "modify, a parameter is supplied with the name " - "ModifiedInstance. and is set to the new " - "value for the named property." ), - ModelCorrespondence { "CIM_MethodAction.InstMethodCallName", - "CIM_MethodAction.QueryLanguage" }] - string Query; - - [Required, Description ( - "The language in which the Query string is expressed./n " - "CQL - refers to the \'DMTF:CQL\' language defined by " - "DSP0200. \n" - "CQL: indicates a CIM Query Language string. \n" - "CQLT: indicates a CIM Query Language Template string. " - "When used, the identifiers recognized in the " - "$identifier$ tokens are \"SELF\" and the property names " - "of this class, or one of its subclasses. When used in " - "the Query string, $SELF$ will be replaced by a string " - "corresponding to a WBEM URI referencing the instance of " - "this class that contains the Query template string. " - "Tokens of the form $$ will be replaced by " - "a string representing the corresponding property value " - "of the instance of this class that contains the Query " - "string." ), - ValueMap { "2", "3", "..", "0x8000.." }, - Values { "CQL", "CQLT", "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_MethodAction.Query" }] - uint16 QueryLanguage = 2; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_NetworkPacketAction.mof b/build/vendor/dmtf_mof/Policy/CIM_NetworkPacketAction.mof deleted file mode 100644 index 62a4e129..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_NetworkPacketAction.mof +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "NetworkPacketAction standardizes different processing options " - "that can be taken at the network packet level. The specific " - "action is defined in the PacketAction enumerated property. " - "Note that this property can be used in conjunction with other " - "actions aggregated into a Rule, to fully define its effects. " - "For example, when aggregated with the SAStaticAction class, " - "NetworkPacketAction indicates whether a specific packet will " - "be encrypted, bypassed or discarded for the lifetime of the " - "Security Association." )] -class CIM_NetworkPacketAction : CIM_PolicyAction { - - [Description ( - "A network packet can be processed, bypassed for " - "processing (i.e., allowed to continue without further " - "processing, such as being forwarded in the clear versus " - "being encrypted), or discarded. This enumeration " - "indicates how a packet should be handled if a " - "PolicyRule\'s PolicyConditions evaluate to TRUE." ), - ValueMap { "1", "2", "3", "4" }, - Values { "Other", "Processed", "Bypassed", "Discarded" }, - MappingStrings { "IPSP Policy Model.IETF|IPsecBypassAction", - "IPSP Policy Model.IETF|IPsecDiscardAction" }, - ModelCorrespondence { "CIM_NetworkPacketAction.OtherAction" }] - uint16 PacketAction; - - [Description ( - "Description of the action when the value 1 (\"Other\") " - "is specified for the property, PacketAction." ), - ModelCorrespondence { "CIM_NetworkPacketAction.PacketAction" }] - string OtherAction; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_NetworkingIDAuthentication.mof b/build/vendor/dmtf_mof/Policy/CIM_NetworkingIDAuthentication.mof deleted file mode 100644 index eb180a0d..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_NetworkingIDAuthentication.mof +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "A class describing a company\'s and/or administrator\'s " - "credential requirements that should be authenticated in order " - "to establish/trust a CIM_Identity. This class specifies that a " - "networking ID or address should be verified." )] -class CIM_NetworkingIDAuthentication : CIM_AuthenticationCondition { - - [Description ( - "A string defining the specific type/subclass of " - "CIM_Identity which specifies the networking information. " - "For example, CIM_StorageHardwareID would be entered in " - "this property to identify that a \'known\' port should " - "be observed." )] - string NetworkingIdentityClassName; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PacketFilterCondition.mof b/build/vendor/dmtf_mof/Policy/CIM_PacketFilterCondition.mof deleted file mode 100644 index 49aaea70..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PacketFilterCondition.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "PacketFilterCondition specifies packet selection criteria (via " - "association to FilterLists) for firewall policies, IPsec " - "policies and similar uses. It is used as an anchor point to " - "associate various types of filters with policy rules via the " - "FilterOfPacketCondition association. By definition, policy " - "rules that aggregate PacketFilterCondition are assumed to " - "operate against every packet received and/or transmitted from " - "an ingress and/or egress point. (Whether policy condition " - "evaluation occurs at ingress or egress is specified by the " - "Direction property in the associated FilterList.) " - "PacketFilterCondition MAY also be used to define the specific " - "CredentialManagementService that validates the credentials " - "carried in a packet. This is accomplished using the " - "association, AcceptCredentialFrom. \n" - "\n" - "Associated objects (such as FilterListsor Credential " - "ManagementServices) represent components of the condition that " - "MAY or MAY NOT apply at a given rule evaluation. For example, " - "an AcceptCredentialFrom evaluation is only performed when a " - "credential is available to be evaluated and compared against " - "the list of trusted credential management services. Similarly, " - "a PeerIDPayloadFilterEntry MAY only be evaluated when an ID " - "payload is available for checking. Condition components that " - "do not have applicability at rule evaluation time, MUST be " - "evaluated to TRUE." ), - MappingStrings { "IPSP Policy Model.IETF|SACondition" }] -class CIM_PacketFilterCondition : CIM_PolicyCondition { - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PhysicalCredentialAuthentication.mof b/build/vendor/dmtf_mof/Policy/CIM_PhysicalCredentialAuthentication.mof deleted file mode 100644 index 16817dec..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PhysicalCredentialAuthentication.mof +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "A class describing a company\'s and/or administrator\'s " - "credential requirements that should be authenticated in order " - "to establish/trust a CIM_Identity. This class defines the " - "specific type of physical credential that should be " - "authenticated." )] -class CIM_PhysicalCredentialAuthentication : CIM_AuthenticationCondition { - - [Description ( - "Integer enumeration identifying the credential that " - "should be authenticated." ), - ValueMap { "1", "2", "3", "4" }, - Values { "Other", "Magnetic Stripe Card", "Smart Card", - "Password Generator Card" }, - ModelCorrespondence { - "CIM_PhysicalCredentialAuthentication.OtherCredential" }] - uint16 TypeOfCredential; - - [Description ( - "String specifying the credential when the " - "TypeOfCredential property is set to 1, \"Other\"." ), - ModelCorrespondence { - "CIM_PhysicalCredentialAuthentication.TypeOfCredential" }] - string OtherCredential; - - [Description ( - "String defining a character or binary sequence, which is " - "built into the physical credential to identify it. If " - "left blank, it is the responsibility of the security " - "infrastructure to verify that a valid credential (of the " - "specified type) has been used." )] - string PhysicalIdentifier; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_Policy.mof b/build/vendor/dmtf_mof/Policy/CIM_Policy.mof deleted file mode 100644 index 67a78e81..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_Policy.mof +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Abstract, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "An abstract class defining the common properties of the policy " - "managed elements derived from CIM_Policy. The subclasses are " - "used to create rules and groups of rules that work together to " - "form a coherent set of policies within an administrative " - "domain or set of domains." )] -class CIM_Policy : CIM_ManagedElement { - - [Description ( - "A user-friendly name of this policy-related object." )] - string CommonName; - - [Description ( - "An array of keywords for characterizing / categorizing " - "policy objects. Keywords are of one of two types: \n" - "- Keywords defined in this and other MOFs, or in DMTF " - "white papers. These keywords provide a vendor- " - "independent, installation-independent way of " - "characterizing policy objects. \n" - "- Installation-dependent keywords for characterizing " - "policy objects. Examples include \'Engineering\', " - "\'Billing\', and \'Review in December 2000\'. \n" - "This MOF defines the following keywords: \'UNKNOWN\', " - "\'CONFIGURATION\', \'USAGE\', \'SECURITY\', \'SERVICE\', " - "\'MOTIVATIONAL\', \'INSTALLATION\', and \'EVENT\'. These " - "concepts are self-explanatory and are further discussed " - "in the SLA/Policy White Paper. One additional keyword is " - "defined: \'POLICY\'. The role of this keyword is to " - "identify policy-related instances that may not be " - "otherwise identifiable, in some implementations. The " - "keyword \'POLICY\' is NOT mutually exclusive of the " - "other keywords specified above." )] - string PolicyKeywords[]; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyAction.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyAction.mof deleted file mode 100644 index b094fc3d..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyAction.mof +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Abstract, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "A class representing a rule-specific or reusable policy action " - "to be performed if the PolicyConditions for a Policy Rule " - "evaluate to TRUE. Since all operational details of a " - "PolicyAction are provided in subclasses of this object, this " - "class is abstract." )] -class CIM_PolicyAction : CIM_Policy { - - [Key, Description ( - "The name of the class or the subclass used in the " - "creation of the System object in whose scope this " - "PolicyAction is defined. \n" - "\n" - "This property helps to identify the System object in " - "whose scope this instance of PolicyAction exists. For a " - "rule-specific PolicyAction, this is the System in whose " - "context the PolicyRule is defined. For a reusable " - "PolicyAction, this is the instance of PolicyRepository " - "(which is a subclass of System) that holds the Action. \n" - "\n" - "Note that this property, and the analogous property " - "SystemName, do not represent propagated keys from an " - "instance of the class System. Instead, they are " - "properties defined in the context of this class, which " - "repeat the values from the instance of System to which " - "this PolicyAction is related, either directly via the " - "PolicyActionInPolicyRepository association or indirectly " - "via the PolicyActionInPolicyRule aggregation." ), - MaxLen ( 256 )] - string SystemCreationClassName; - - [Key, Description ( - "The name of the System object in whose scope this " - "PolicyAction is defined. \n" - "\n" - "This property completes the identification of the System " - "object in whose scope this instance of PolicyAction " - "exists. For a rule-specific PolicyAction, this is the " - "System in whose context the PolicyRule is defined. For a " - "reusable PolicyAction, this is the instance of " - "PolicyRepository (which is a subclass of System) that " - "holds the Action." ), - MaxLen ( 256 )] - string SystemName; - - [Key, Description ( - "For a rule-specific PolicyAction, the CreationClassName " - "of the PolicyRule object with which this Action is " - "associated. For a reusable PolicyAction, a special " - "value, \'NO RULE\', should be used to indicate that this " - "Action is reusable and not associated with a single " - "PolicyRule." ), - MaxLen ( 256 )] - string PolicyRuleCreationClassName; - - [Key, Description ( - "For a rule-specific PolicyAction, the name of the " - "PolicyRule object with which this Action is associated. " - "For a reusable PolicyAction, a special value, \'NO " - "RULE\', should be used to indicate that this Action is " - "reusable and not associated with a single PolicyRule." ), - MaxLen ( 256 )] - string PolicyRuleName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Description ( - "A user-friendly name of this PolicyAction." ), - MaxLen ( 256 )] - string PolicyActionName; - - [Description ( - "DoActionLogging causes a log message to be generated " - "when the action is performed." )] - boolean DoActionLogging; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyActionInPolicyAction.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyActionInPolicyAction.mof deleted file mode 100644 index 0ff911ed..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyActionInPolicyAction.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "PolicyActionInPolicyAction is used to represent the " - "compounding of policy actions into a higher-level policy " - "action." )] -class CIM_PolicyActionInPolicyAction : CIM_PolicyActionStructure { - - [Aggregate, Override ( "GroupComponent" ), - Description ( - "This property represents the CompoundPolicyAction that " - "contains one or more PolicyActions." )] - CIM_CompoundPolicyAction REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "This property holds the name of a PolicyAction contained " - "by one or more CompoundPolicyActions." )] - CIM_PolicyAction REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyActionInPolicyRepository.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyActionInPolicyRepository.mof deleted file mode 100644 index 82958656..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyActionInPolicyRepository.mof +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Deprecated { "CIM_ReusablePolicy" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "The ReusablePolicy association is a more general relationship " - "that incorporates both Conditions and Actions as well as any " - "other policy subclass. \n" - "\n" - "This class represents the hosting of reusable PolicyActions by " - "a PolicyRepository. A reusable Policy Action is always related " - "to a single PolicyRepository, via this association. \n" - "\n" - "Note, that an instance of PolicyAction can be either reusable " - "or rule-specific. When the Action is rule- specific, it shall " - "not be related to any PolicyRepository via the " - "PolicyActionInPolicyRepository association." )] -class CIM_PolicyActionInPolicyRepository : CIM_PolicyInSystem { - - [Deprecated { "CIM_ReusablePolicy.Antecedent" }, - Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "This property represents a PolicyRepository hosting one " - "or more PolicyActions. A reusable PolicyAction is always " - "related to exactly one PolicyRepository via the " - "PolicyActionInPolicyRepository association. The [0..1] " - "cardinality for this property covers the two types of " - "PolicyActions: 0 for a rule-specific PolicyAction, 1 for " - "a reusable one." )] - CIM_PolicyRepository REF Antecedent; - - [Deprecated { "CIM_ReusablePolicy.Dependent" }, - Override ( "Dependent" ), - Description ( - "This property holds the name of a PolicyAction hosted in " - "the PolicyRepository." )] - CIM_PolicyAction REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyActionInPolicyRule.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyActionInPolicyRule.mof deleted file mode 100644 index fb237f4d..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyActionInPolicyRule.mof +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "A PolicyRule aggregates zero or more instances of the " - "PolicyAction class, via the PolicyActionInPolicyRule " - "association. A Rule that aggregates zero Actions is not " - "valid--it may, however, be in the process of being entered " - "into a PolicyRepository or being defined for a System. " - "Alternately, the actions of the policy may be explicit in the " - "definition of the PolicyRule. Note that a PolicyRule should " - "have no effect until it is valid. \n" - "\n" - "The Actions associated with a PolicyRule may be given a " - "required order, a recommended order, or no order at all. For " - "Actions represented as separate objects, the " - "PolicyActionInPolicyRule aggregation can be used to express an " - "order. \n" - "\n" - "This aggregation does not indicate whether a specified action " - "order is required, recommended, or of no significance; the " - "property SequencedActions in the aggregating instance of " - "PolicyRule provides this indication." )] -class CIM_PolicyActionInPolicyRule : CIM_PolicyActionStructure { - - [Aggregate, Override ( "GroupComponent" ), - Description ( - "This property represents the PolicyRule that contains " - "one or more PolicyActions." )] - CIM_PolicyRule REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "This property holds the name of a PolicyAction contained " - "by one or more PolicyRules." )] - CIM_PolicyAction REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyActionStructure.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyActionStructure.mof deleted file mode 100644 index 2e187338..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyActionStructure.mof +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Abstract, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "PolicyActions may be aggregated into rules and into compound " - "actions. PolicyActionStructure is the abstract aggregation " - "class for the structuring of policy actions." )] -class CIM_PolicyActionStructure : CIM_PolicyComponent { - - [Aggregate, Override ( "GroupComponent" ), - Description ( - "PolicyAction instances may be aggregated into either " - "PolicyRule instances or CompoundPolicyAction instances." )] - CIM_Policy REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "A PolicyAction aggregated by a PolicyRule or CompoundPolicyAction." - )] - CIM_PolicyAction REF PartComponent; - - [Description ( - "ActionOrder is an unsigned integer \'n\' that indicates " - "the relative position of a PolicyAction in the sequence " - "of actions associated with a PolicyRule or " - "CompoundPolicyAction. When \'n\' is a positive integer, " - "it indicates a place in the sequence of actions to be " - "performed, with smaller integers indicating earlier " - "positions in the sequence. The special value \'0\' " - "indicates \'don\'t care\'. If two or more PolicyActions " - "have the same non-zero sequence number, they may be " - "performed in any order, but they must all be performed " - "at the appropriate place in the overall action sequence. \n" - "\n" - "A series of examples will make ordering of PolicyActions " - "clearer: \n" - "o If all actions have the same sequence number, " - "regardless of whether it is \'0\' or non-zero, any order " - "is acceptable. \n" - "o The values: \n" - "1:ACTION A \n" - "2:ACTION B \n" - "1:ACTION C \n" - "3:ACTION D \n" - "indicate two acceptable orders: A,C,B,D or C,A,B,D, \n" - "since A and C can be performed in either order, but only " - "at the \'1\' position. \n" - "o The values: \n" - "0:ACTION A \n" - "2:ACTION B \n" - "3:ACTION C \n" - "3:ACTION D \n" - "require that B,C, and D occur either as B,C,D or as " - "B,D,C. Action A may appear at any point relative to B, " - "C, and D. Thus the complete set of acceptable orders is: " - "A,B,C,D; B,A,C,D; B,C,A,D; B,C,D,A; A,B,D,C; B,A,D,C; " - "B,D,A,C; B,D,C,A. \n" - "\n" - "Note that the non-zero sequence numbers need not start " - "with \'1\', and they need not be consecutive. All that " - "matters is their relative magnitude." )] - uint16 ActionOrder; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyComponent.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyComponent.mof deleted file mode 100644 index 4b523f34..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyComponent.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Abstract, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "CIM_PolicyComponent is a generic association used to establish " - "\'part of\' relationships between the subclasses of " - "CIM_Policy. For example, the PolicyConditionInPolicyRule " - "association defines that PolicyConditions are part of a " - "PolicyRule." )] -class CIM_PolicyComponent : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Description ( "The parent Policy in the association." )] - CIM_Policy REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The child/part Policy in the association." )] - CIM_Policy REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyCondition.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyCondition.mof deleted file mode 100644 index 79c82f23..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyCondition.mof +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Abstract, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "A class representing a rule-specific or reusable policy " - "condition to be evaluated in conjunction with a Policy Rule. " - "Since all operational details of a PolicyCondition are " - "provided in subclasses of this object, this class is abstract." )] -class CIM_PolicyCondition : CIM_Policy { - - [Key, Description ( - "The name of the class or the subclass used in the " - "creation of the System object in whose scope this " - "PolicyCondition is defined. \n" - "\n" - "This property helps to identify the System object in " - "whose scope this instance of PolicyCondition exists. For " - "a rule-specific PolicyCondition, this is the System in " - "whose context the PolicyRule is defined. For a reusable " - "PolicyCondition, this is the instance of " - "PolicyRepository (which is a subclass of System) that " - "holds the Condition. \n" - "\n" - "Note that this property, and the analogous property " - "SystemName, do not represent propagated keys from an " - "instance of the class System. Instead, they are " - "properties defined in the context of this class, which " - "repeat the values from the instance of System to which " - "this PolicyCondition is related, either directly via the " - "PolicyConditionInPolicyRepository association or " - "indirectly via the PolicyConditionInPolicyRule " - "aggregation." ), - MaxLen ( 256 )] - string SystemCreationClassName; - - [Key, Description ( - "The name of the System object in whose scope this " - "PolicyCondition is defined. \n" - "\n" - "This property completes the identification of the System " - "object in whose scope this instance of PolicyCondition " - "exists. For a rule-specific PolicyCondition, this is the " - "System in whose context the PolicyRule is defined. For a " - "reusable PolicyCondition, this is the instance of " - "PolicyRepository (which is a subclass of System) that " - "holds the Condition." ), - MaxLen ( 256 )] - string SystemName; - - [Key, Description ( - "For a rule-specific PolicyCondition, the " - "CreationClassName of the PolicyRule object with which " - "this Condition is associated. For a reusable Policy " - "Condition, a special value, \'NO RULE\', should be used " - "to indicate that this Condition is reusable and not " - "associated with a single PolicyRule." ), - MaxLen ( 256 )] - string PolicyRuleCreationClassName; - - [Key, Description ( - "For a rule-specific PolicyCondition, the name of the " - "PolicyRule object with which this Condition is " - "associated. For a reusable PolicyCondition, a special " - "value, \'NO RULE\', should be used to indicate that this " - "Condition is reusable and not associated with a single " - "PolicyRule." ), - MaxLen ( 256 )] - string PolicyRuleName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Description ( - "A user-friendly name of this PolicyCondition." ), - MaxLen ( 256 )] - string PolicyConditionName; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyConditionInPolicyCondition.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyConditionInPolicyCondition.mof deleted file mode 100644 index 8c41e996..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyConditionInPolicyCondition.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "A CompoundPolicyCondition aggregates zero or more instances of " - "the PolicyCondition class, via the " - "PolicyConditionInPolicyCondition association. A " - "CompoundPolicyCondition that aggregates zero Conditions is not " - "valid; it may, however, be in the process of being defined. " - "Note that a CompoundPolicyCondition should have no effect " - "until it is valid." )] -class CIM_PolicyConditionInPolicyCondition : CIM_PolicyConditionStructure { - - [Aggregate, Override ( "GroupComponent" ), - Description ( - "This property represents the CompoundPolicyCondition " - "that contains one or more PolicyConditions." )] - CIM_CompoundPolicyCondition REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "This property holds the name of a PolicyCondition " - "contained by one or more PolicyRules." )] - CIM_PolicyCondition REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyConditionInPolicyRepository.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyConditionInPolicyRepository.mof deleted file mode 100644 index 2c8cdd62..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyConditionInPolicyRepository.mof +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Deprecated { "CIM_ReusablePolicy" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "The ReusablePolicy association is a more general relationship " - "that incorporates both Conditions and Actions as well as any " - "other policy subclass. \n" - "\n" - "This class represents the hosting of reusable PolicyConditions " - "by a PolicyRepository. A reusable Policy Condition is always " - "related to a single PolicyRepository, via this association. \n" - "\n" - "Note, that an instance of PolicyCondition can be either " - "reusable or rule-specific. When the Condition is rule- " - "specific, it shall not be related to any PolicyRepository via " - "the PolicyConditionInPolicyRepository association." )] -class CIM_PolicyConditionInPolicyRepository : CIM_PolicyInSystem { - - [Deprecated { "CIM_ReusablePolicy.Antecedent" }, - Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "This property identifies a PolicyRepository hosting one " - "or more PolicyConditions. A reusable PolicyCondition is " - "always related to exactly one PolicyRepository via the " - "PolicyConditionInPolicyRepository association. The " - "[0..1] cardinality for this property covers the two " - "types of PolicyConditions: 0 for a rule-specific " - "PolicyCondition, 1 for a reusable one." )] - CIM_PolicyRepository REF Antecedent; - - [Deprecated { "CIM_ReusablePolicy.Dependent" }, - Override ( "Dependent" ), - Description ( - "This property holds the name of a PolicyCondition hosted " - "in the PolicyRepository." )] - CIM_PolicyCondition REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyConditionInPolicyRule.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyConditionInPolicyRule.mof deleted file mode 100644 index 24725521..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyConditionInPolicyRule.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "A PolicyRule aggregates zero or more instances of the " - "PolicyCondition class, via the PolicyConditionInPolicyRule " - "association. A Rule that aggregates zero Conditions is not " - "valid; it may, however, be in the process of being defined. " - "Note that a PolicyRule should have no effect until it is " - "valid." )] -class CIM_PolicyConditionInPolicyRule : CIM_PolicyConditionStructure { - - [Aggregate, Override ( "GroupComponent" ), - Description ( - "This property represents the PolicyRule that contains " - "one or more PolicyConditions." )] - CIM_PolicyRule REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "This property holds the name of a PolicyCondition " - "contained by one or more PolicyRules." )] - CIM_PolicyCondition REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyConditionStructure.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyConditionStructure.mof deleted file mode 100644 index 4daab909..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyConditionStructure.mof +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Abstract, Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "PolicyConditions may be aggregated into rules and into " - "compound conditions. PolicyConditionStructure is the abstract " - "aggregation class for the structuring of policy conditions. \n" - "\n" - "The Conditions aggregated by a PolicyRule or " - "CompoundPolicyCondition are grouped into two levels of lists: " - "either an ORed set of ANDed sets of conditions (DNF, the " - "default) or an ANDed set of ORed sets of conditions (CNF). " - "Individual PolicyConditions in these lists may be negated. The " - "property ConditionListType specifies which of these two " - "grouping schemes applies to a particular PolicyRule or " - "CompoundPolicyCondition instance. \n" - "\n" - "One or more PolicyTimePeriodConditions may be among the " - "conditions associated with a PolicyRule or " - "CompoundPolicyCondition via the PolicyConditionStructure " - "subclass association. In this case, the time periods are " - "simply additional Conditions to be evaluated along with any " - "others that are specified." )] -class CIM_PolicyConditionStructure : CIM_PolicyComponent { - - [Aggregate, Override ( "GroupComponent" ), - Description ( - "This property represents the Policy that contains one or " - "more PolicyConditions." )] - CIM_Policy REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "This property holds the name of a PolicyCondition " - "contained by one or more PolicyRule or " - "CompoundPolicyCondition instances." )] - CIM_PolicyCondition REF PartComponent; - - [Description ( - "Unsigned integer indicating the group to which the " - "contained PolicyCondition belongs. This integer segments " - "the Conditions into the ANDed sets (when the " - "ConditionListType is \"DNF\") or, similarly, into the " - "ORed sets (when the ConditionListType is \"CNF\")." )] - uint16 GroupNumber; - - [Description ( - "Indication of whether the contained PolicyCondition is " - "negated. TRUE indicates that the PolicyCondition IS " - "negated, FALSE indicates that it IS NOT negated." )] - boolean ConditionNegated; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyContainerInPolicyContainer.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyContainerInPolicyContainer.mof deleted file mode 100644 index af09fcea..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyContainerInPolicyContainer.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "A relationship that aggregates one or more lower-level " - "ReusablePolicyContainer instances into a higher-level " - "ReusablePolicyContainer." )] -class CIM_PolicyContainerInPolicyContainer : CIM_SystemComponent { - - [Aggregate, Override ( "GroupComponent" ), - Description ( - "A ReusablePolicyContainer that aggregates other " - "ReusablePolicyContainers." )] - CIM_ReusablePolicyContainer REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "A ReusablePolicyContainer aggregated by another " - "ReusablePolicyContainer." )] - CIM_ReusablePolicyContainer REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyGroup.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyGroup.mof deleted file mode 100644 index 9bcf1c91..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyGroup.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "An aggregation of PolicySet instances (PolicyGroups and/or " - "PolicyRules) that have the same decision strategy and inherit " - "policy roles. PolicyGroup instances are defined and named " - "relative to the CIM_System that provides their context." )] -class CIM_PolicyGroup : CIM_PolicySet { - - [Key, Description ( "The scoping System\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.CreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The scoping System\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.Name" )] - string SystemName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Description ( - "A user-friendly name of this PolicyGroup." ), - MaxLen ( 256 )] - string PolicyGroupName; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyGroupInPolicyGroup.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyGroupInPolicyGroup.mof deleted file mode 100644 index ee0cbf7a..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyGroupInPolicyGroup.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved - [Association, Deprecated { "CIM_PolicySetComponent" }, - Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "PolicySetComponent provides a more general mechanism for " - "aggregating both PolicyGroups and PolicyRules and doing so " - "with the priority value applying only to the aggregated set " - "rather than policy wide. \n" - "\n" - "A relationship that aggregates one or more lower-level " - "PolicyGroups into a higher-level Group. A Policy Group may " - "aggregate PolicyRules and/or other Policy Groups." )] -class CIM_PolicyGroupInPolicyGroup : CIM_PolicyComponent { - - [Deprecated { "CIM_PolicySetComponent.GroupComponent" }, - Aggregate, Override ( "GroupComponent" ), - Description ( "A PolicyGroup that aggregates other Groups." )] - CIM_PolicyGroup REF GroupComponent; - - [Deprecated { "CIM_PolicySetComponent.PartComponent" }, - Override ( "PartComponent" ), - Description ( "A PolicyGroup aggregated by another Group." )] - CIM_PolicyGroup REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyGroupInSystem.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyGroupInSystem.mof deleted file mode 100644 index df1c3b5e..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyGroupInSystem.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "An association that links a PolicyGroup to the System in whose " - "scope the Group is defined." )] -class CIM_PolicyGroupInSystem : CIM_PolicySetInSystem { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The System in whose scope a PolicyGroup is defined." )] - CIM_System REF Antecedent; - - [Override ( "Dependent" ), - Weak, Description ( - "A PolicyGroup named within the scope of a System." )] - CIM_PolicyGroup REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyInSystem.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyInSystem.mof deleted file mode 100644 index a3be71d9..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyInSystem.mof +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Abstract, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "CIM_PolicyInSystem is a generic association used to establish " - "dependency relationships between Policies and the Systems that " - "host them. These Systems may be ComputerSystems where Policies " - "are \'running\' or they may be Policy Repositories where " - "Policies are stored. This relationship is similar to the " - "concept of CIM_Services being dependent on CIM_Systems as " - "defined by the HostedService association. \n" - "\n" - "Cardinality is Max (1) for the Antecedent/System reference " - "since Policies can only be hosted in at most one System " - "context. Some subclasses of the association will further " - "refine this definition to make the Policies Weak to Systems. " - "Other subclasses of PolicyInSystem will define an optional " - "hosting relationship. Examples of each of these are the " - "PolicyRuleInSystem and PolicyConditionIn PolicyRepository " - "associations, respectively." )] -class CIM_PolicyInSystem : CIM_HostedDependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The hosting System." )] - CIM_System REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The hosted Policy." )] - CIM_Policy REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyRepository.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyRepository.mof deleted file mode 100644 index 2b9c304c..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyRepository.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Deprecated { "CIM_ReusablePolicyContainer" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "The term \'PolicyRepository\' has been confusing to both " - "developers and users of the model. The replacement class name " - "describes model element properly and is less likely to be " - "confused with a data repository. \n" - "\n" - "A class representing an administratively defined container for " - "reusable policy-related information. This class does not " - "introduce any additional properties beyond those in its " - "superclass AdminDomain. It does, however, participate in a " - "number of unique associations. \n" - "\n" - "An instance of this class uses the NameFormat value " - "\"PolicyRepository\"." )] -class CIM_PolicyRepository : CIM_AdminDomain { - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyRepositoryInPolicyRepository.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyRepositoryInPolicyRepository.mof deleted file mode 100644 index afb29bfb..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyRepositoryInPolicyRepository.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Deprecated { "CIM_PolicyContainerInPolicyContainer" }, - Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "The term \'PolicyRepository\' has been confusing to both " - "developers and users of the model. The replacement class name " - "describes model element properly and is less likely to be " - "confused with a data repository. ContainedDomain is a general " - "purpose mechanism for expressing domain hierarchy. \n" - "\n" - "A relationship that aggregates one or more lower-level " - "PolicyRepositories into a higher-level Repository." )] -class CIM_PolicyRepositoryInPolicyRepository : CIM_SystemComponent { - - [Deprecated { - "CIM_PolicyContainerInPolicyContainer.GroupComponent" }, - Aggregate, Override ( "GroupComponent" ), - Description ( - "A PolicyRepository that aggregates other Repositories." )] - CIM_PolicyRepository REF GroupComponent; - - [Deprecated { - "CIM_PolicyContainerInPolicyContainer.PartComponent" }, - Override ( "PartComponent" ), - Description ( - "A PolicyRepository aggregated by another Repository." )] - CIM_PolicyRepository REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyRoleCollection.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyRoleCollection.mof deleted file mode 100644 index 36667a5a..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyRoleCollection.mof +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "PolicyRoleCollection is used to represent a collection of " - "ManagedElements that share a common policy role, and the " - "PolicySets that CAN BE applied to those elements. (Note that " - "the PolicySets that are CURRENTLY applied are indicated via " - "instances of the association, PolicySetAppliesToElement.) The " - "PolicyRoleCollection always exists in the context of a System, " - "specified using the PolicyRoleCollectionInSystem aggregation. " - "The value of the PolicyRole property in this class specifies " - "the role. It is defined as a free-form string. ManagedElements " - "that share the role defined in this collection are aggregated " - "into the Collection via the ElementInPolicyRoleCollection " - "association." )] -class CIM_PolicyRoleCollection : CIM_SystemSpecificCollection { - - [Required, Description ( - "The PolicyRole name for the PolicySets and other " - "ManagedElements that are identified and aggregated by " - "the Collection. Note that the aggregated PolicySets " - "define the rules and groups of rules that may be applied " - "to the associated ManagedElements. \n" - "\n" - "Although not officially designated as \'role " - "combinations\', multiple roles may be specified using " - "the form: \n" - "[&&]* \n" - "where the individual role names appear in alphabetical " - "order (according to the collating sequence for UCS-2). " - "Implementations may treat PolicyRole values that are " - "specified as \'role combinations\' as simple strings." )] - string PolicyRole; - - - [Description ( - "Activates/applies the PolicySets aggregated into this " - "Collection to the specified ManagedElement. The " - "ManagedElement MUST be a member of the Collection, " - "associated via ElementInPolicyRoleCollection. The result " - "of this method, if it is successfully executed, is that " - "the aggregated PolicySets are deployed and enforced for " - "the Element. This is reflected by the instantiation of " - "the PolicySetAppliesToElement association between the " - "named Element and each PolicySet." ), - ValueMap { "0", "1", "2", "3", "4", "..", "0x8000.." }, - Values { "Success", "Not Supported", "Unknown", "Timeout", - "Failed", "DMTF Reserved", "Vendor Specific" }] - uint32 ActivatePolicySet( - [IN, Description ( - "The ManagedElement to which the aggregated " - "PolicySets of this Collection are applied." )] - CIM_ManagedElement REF Element); - - [Description ( - "Deactivates the aggregated PolicySets for the specified " - "ManagedElement. The result of this method, if it is " - "successfully executed, is that the aggregated PolicySets " - "are NOT enforced for the Element. This is reflected by " - "the removal of the PolicySetAppliesToElement association " - "between the named Element and each PolicySet. If a " - "PolicySet is not currently enforced for the " - "ManagedElement, then this method has no effect for that " - "Set." ), - ValueMap { "0", "1", "2", "3", "4", "..", "0x8000..0xFFFF" }, - Values { "Success", "Not Supported", "Unknown", "Timeout", - "Failed", "DMTF Reserved", "Vendor Specific" }] - uint32 DeactivatePolicySet( - [IN, Description ( - "The ManagedElement to which the aggregated " - "PolicySets of this Collection MUST NOT apply." )] - CIM_ManagedElement REF Element); - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyRoleCollectionInSystem.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyRoleCollectionInSystem.mof deleted file mode 100644 index 1007dc52..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyRoleCollectionInSystem.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "PolicyRoleCollectionInSystem is an association used to " - "establish a relationship between a collection and an \'owning\' " - "System such as an AdminDomain or ComputerSystem." )] -class CIM_PolicyRoleCollectionInSystem : CIM_HostedCollection { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The parent system responsible for the collection." )] - CIM_System REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The Collection." )] - CIM_PolicyRoleCollection REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyRule.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyRule.mof deleted file mode 100644 index de55b256..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyRule.mof +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "The central class used for representing the \'If Condition " - "then Action\' semantics of a policy rule. A PolicyRule " - "condition, in the most general sense, is represented as either " - "an ORed set of ANDed conditions (Disjunctive Normal Form, or " - "DNF) or an ANDed set of ORed conditions (Conjunctive Normal " - "Form, or CNF). Individual conditions may either be negated " - "(NOT C) or unnegated (C). The actions specified by a " - "PolicyRule are to be performed if and only if the PolicyRule " - "condition (whether it is represented in DNF or CNF) evaluates " - "to TRUE. \n" - "\n" - "The conditions and actions associated with a PolicyRule are " - "modeled, respectively, with subclasses of PolicyCondition and " - "PolicyAction. These condition and action objects are tied to " - "instances of PolicyRule by the PolicyConditionInPolicyRule and " - "PolicyActionInPolicyRule aggregations. \n" - "\n" - "A PolicyRule may also be associated with one or more policy " - "time periods, indicating the schedule according to which the " - "policy rule is active and inactive. In this case it is the " - "PolicySetValidityPeriod aggregation that provides this " - "linkage. \n" - "\n" - "The PolicyRule class uses the property ConditionListType, to " - "indicate whether the conditions for the rule are in DNF " - "(disjunctive normal form), CNF (conjunctive normal form) or, " - "in the case of a rule with no conditions, as an " - "UnconditionalRule. The PolicyConditionInPolicyRule aggregation " - "contains two additional properties to complete the " - "representation of the Rule\'s conditional expression. The " - "first of these properties is an integer to partition the " - "referenced PolicyConditions into one or more groups, and the " - "second is a Boolean to indicate whether a referenced Condition " - "is negated. An example shows how ConditionListType and these " - "two additional properties provide a unique representation of a " - "set of PolicyConditions in either DNF or CNF. \n" - "\n" - "Suppose we have a PolicyRule that aggregates five " - "PolicyConditions C1 through C5, with the following values in " - "the properties of the five PolicyConditionInPolicyRule " - "associations: \n" - "C1: GroupNumber = 1, ConditionNegated = FALSE \n" - "C2: GroupNumber = 1, ConditionNegated = TRUE \n" - "C3: GroupNumber = 1, ConditionNegated = FALSE \n" - "C4: GroupNumber = 2, ConditionNegated = FALSE \n" - "C5: GroupNumber = 2, ConditionNegated = FALSE \n" - "\n" - "If ConditionListType = DNF, then the overall condition for the " - "PolicyRule is: \n" - "(C1 AND (NOT C2) AND C3) OR (C4 AND C5) \n" - "\n" - "On the other hand, if ConditionListType = CNF, then the " - "overall condition for the PolicyRule is: \n" - "(C1 OR (NOT C2) OR C3) AND (C4 OR C5) \n" - "\n" - "In both cases, there is an unambiguous specification of the " - "overall condition that is tested to determine whether to " - "perform the PolicyActions associated with the PolicyRule. \n" - "\n" - "PolicyRule instances may also be used to aggregate other " - "PolicyRules and/or PolicyGroups. When used in this way to " - "implement nested rules, the conditions of the aggregating rule " - "apply to the subordinate rules as well. However, any side " - "effects of condition evaluation or the execution of actions " - "MUST NOT affect the result of the evaluation of other " - "conditions evaluated by the rule engine in the same evaluation " - "pass. That is, an implementation of a rule engine MAY evaluate " - "all conditions in any order before applying the priority and " - "determining which actions are to be executed." )] -class CIM_PolicyRule : CIM_PolicySet { - - [Key, Description ( "The scoping System\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.CreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The scoping System\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.Name" )] - string SystemName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Description ( "A user-friendly name of this PolicyRule." ), - MaxLen ( 256 )] - string PolicyRuleName; - - [Description ( - "Indicates whether the list of PolicyConditions " - "associated with this PolicyRule is in disjunctive normal " - "form (DNF), conjunctive normal form (CNF), or has no " - "conditions (i.e., is an UnconditionalRule) and is " - "automatically evaluated to \"True.\" The default value " - "is 1 (\"DNF\")." ), - ValueMap { "0", "1", "2" }, - Values { "Unconditional Rule", "DNF", "CNF" }] - uint16 ConditionListType = 1; - - [Description ( - "A free-form string that can be used to provide " - "guidelines on how this PolicyRule should be used." )] - string RuleUsage; - - [Deprecated { "CIM_PolicySetComponent.Priority" }, - Description ( - "PolicyRule.Priority is deprecated and replaced by " - "providing the priority for a rule (and a group) in the " - "context of the aggregating PolicySet instead of the " - "priority being used for all aggregating PolicySet " - "instances. Thus, the assignment of priority values is " - "much simpler. \n" - "\n" - "A non-negative integer for prioritizing this Policy Rule " - "relative to other Rules. A larger value indicates a " - "higher priority. The default value is 0." )] - uint16 Priority = 0; - - [Deprecated { "No Value" }, - Description ( - "A flag indicating that the evaluation of the Policy " - "Conditions and execution of PolicyActions (if the " - "Conditions evaluate to TRUE) is required. The evaluation " - "of a PolicyRule MUST be attempted if the Mandatory " - "property value is TRUE. If the Mandatory property is " - "FALSE, then the evaluation of the Rule is \'best effort\' " - "and MAY be ignored." )] - boolean Mandatory; - - [Description ( - "This property gives a policy administrator a way of " - "specifying how the ordering of the PolicyActions " - "associated with this PolicyRule is to be interpreted. " - "Three values are supported: \n" - "o mandatory(1): Do the actions in the indicated order, " - "or don\'t do them at all. \n" - "o recommended(2): Do the actions in the indicated order " - "if you can, but if you can\'t do them in this order, do " - "them in another order if you can. \n" - "o dontCare(3): Do them -- I don\'t care about the order. \n" - "The default value is 3 (\"DontCare\")." ), - ValueMap { "1", "2", "3" }, - Values { "Mandatory", "Recommended", "Dont Care" }] - uint16 SequencedActions = 3; - - [Description ( - "ExecutionStrategy defines the strategy to be used in " - "executing the sequenced actions aggregated by this " - "PolicyRule. There are three execution strategies: \n" - "\n" - "Do Until Success - execute actions according to " - "predefined order, until successful execution of a single " - "action. \n" - "Do All - execute ALL actions which are part of the " - "modeled set, according to their predefined order. " - "Continue doing this, even if one or more of the actions " - "fails. \n" - "Do Until Failure - execute actions according to " - "predefined order, until the first failure in execution " - "of an action instance." ), - ValueMap { "1", "2", "3" }, - Values { "Do Until Success", "Do All", "Do Until Failure" }] - uint16 ExecutionStrategy; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyRuleInPolicyGroup.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyRuleInPolicyGroup.mof deleted file mode 100644 index 71d7ca8c..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyRuleInPolicyGroup.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Deprecated { "CIM_PolicySetComponent" }, - Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "PolicySetComponent provides a more general mechanism for " - "aggregating both PolicyGroups and PolicyRules and doing so " - "with the priority value applying only to the aggregated set " - "rather than policy wide. \n" - "\n" - "A relationship that aggregates one or more PolicyRules into a " - "PolicyGroup. A PolicyGroup may aggregate PolicyRules and/or " - "other PolicyGroups." )] -class CIM_PolicyRuleInPolicyGroup : CIM_PolicyComponent { - - [Deprecated { "CIM_PolicySetComponent.GroupComponent" }, - Aggregate, Override ( "GroupComponent" ), - Description ( - "A PolicyGroup that aggregates one or more PolicyRules." )] - CIM_PolicyGroup REF GroupComponent; - - [Deprecated { "CIM_PolicySetComponent.PartComponent" }, - Override ( "PartComponent" ), - Description ( "A PolicyRule aggregated by a PolicyGroup." )] - CIM_PolicyRule REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyRuleInSystem.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyRuleInSystem.mof deleted file mode 100644 index e4e2d931..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyRuleInSystem.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "An association that links a PolicyRule to the System in whose " - "scope the Rule is defined." )] -class CIM_PolicyRuleInSystem : CIM_PolicySetInSystem { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The System in whose scope a PolicyRule is defined." )] - CIM_System REF Antecedent; - - [Override ( "Dependent" ), - Weak, Description ( - "A PolicyRule named within the scope of a System." )] - CIM_PolicyRule REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyRuleValidityPeriod.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyRuleValidityPeriod.mof deleted file mode 100644 index be6cc425..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyRuleValidityPeriod.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Deprecated { "CIM_PolicySetValidityPeriod" }, - Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "The PolicyRuleValidityPeriod aggregation represents scheduled " - "activation and deactivation of a PolicyRule. If a PolicyRule " - "is associated with multiple policy time periods via this " - "association, then the Rule is active if at least one of the " - "time periods indicates that it is active. (In other words, the " - "PolicyTimePeriodConditions are ORed to determine whether the " - "Rule is active.) A Time Period may be aggregated by multiple " - "PolicyRules. A Rule that does not point to a " - "PolicyTimePeriodCondition via this association is, from the " - "point of view of scheduling, always active. It may, however, " - "be inactive for other reasons. For example, the Rule\'s " - "Enabled property may be set to \"disabled\" (value=2)." )] -class CIM_PolicyRuleValidityPeriod : CIM_PolicyComponent { - - [Deprecated { "CIM_PolicySetValidityPeriod.GroupComponent" }, - Aggregate, Override ( "GroupComponent" ), - Description ( - "This property contains the name of a PolicyRule that " - "contains one or more PolicyTimePeriodConditions." )] - CIM_PolicyRule REF GroupComponent; - - [Deprecated { "CIM_PolicySetValidityPeriod.PartComponent" }, - Override ( "PartComponent" ), - Description ( - "This property contains the name of a " - "PolicyTimePeriodCondition defining the valid time " - "periods for one or more PolicyRules." )] - CIM_PolicyTimePeriodCondition REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicySet.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicySet.mof deleted file mode 100644 index eded1c1a..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicySet.mof +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Abstract, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "PolicySet is an abstract class that represents a set of " - "policies that form a coherent set. The set of contained " - "policies has a common decision strategy and a common set of " - "policy roles (defined via the PolicySetInRole Collection " - "association). Subclasses include PolicyGroup and PolicyRule." )] -class CIM_PolicySet : CIM_Policy { - - [Description ( - "PolicyDecisionStrategy defines the evaluation method " - "used for policies contained in the PolicySet. There are " - "two values currently defined: \n" - "- \'First Matching\' (1) executes the actions of the " - "first rule whose conditions evaluate to TRUE. The " - "concept of \'first\' is determined by examining the " - "priority of the rule within the policy set (i.e., by " - "examining the property, PolicySetComponent.Priority). " - "Note that this ordering property MUST be maintained when " - "processing the PolicyDecisionStrategy. \n" - "- \'All\' (2) executes the actions of ALL rules whose " - "conditions evaluate to TRUE, in the set. As noted above, " - "the order of processing of the rules is defined by the " - "property, PolicySetComponent.Priority (and within a " - "rule, the ordering of the actions is defined by the " - "property, PolicyActionStructure.ActionOrder). Note that " - "when this strategy is defined, processing MUST be " - "completed of ALL rules whose conditions evaluate to " - "TRUE, regardless of errors in the execution of the rule " - "actions." ), - ValueMap { "1", "2" }, - Values { "First Matching", "All" }] - uint16 PolicyDecisionStrategy; - - [Deprecated { "CIM_PolicySetInRoleCollection" }, - Description ( - "The PolicyRoles property represents the roles associated " - "with a PolicySet. All contained PolicySet instances " - "inherit the values of the PolicyRoles of the aggregating " - "PolicySet but the values are not copied. A contained " - "PolicySet instance may, however, add additional " - "PolicyRoles to those it inherits from its aggregating " - "PolicySet(s). Each value in PolicyRoles multi-valued " - "property represents a role for which the PolicySet " - "applies, i.e., the PolicySet should be used by any " - "enforcement point that assumes any of the listed " - "PolicyRoles values. \n" - "\n" - "Although not officially designated as \'role " - "combinations\', multiple roles may be specified using " - "the form: \n" - "[&&]* \n" - "where the individual role names appear in alphabetical " - "order (according to the collating sequence for UCS-2). " - "Implementations may treat PolicyRoles values that are " - "specified as \'role combinations\' as simple strings. \n" - "\n" - "This property is deprecated in lieu of the use of an " - "association, CIM_PolicySetInRoleCollection. The latter " - "is a more explicit and less error-prone approach to " - "modeling that a PolicySet has one or more PolicyRoles." )] - string PolicyRoles[]; - - [Description ( - "Indicates whether this PolicySet is administratively " - "enabled, administratively disabled, or enabled for " - "debug. The \"EnabledForDebug\" property value is " - "deprecated and, when it or any value not understood by " - "the receiver is specified, the receiving enforcement " - "point treats the PolicySet as \"Disabled\". To determine " - "if a PolicySet is \"Enabled\", the containment hierarchy " - "specified by the PolicySetComponent aggregation is " - "examined and the Enabled property values of the " - "hierarchy are ANDed together. Thus, for example, " - "everything aggregated by a PolicyGroup may be disabled " - "by setting the Enabled property in the PolicyGroup " - "instance to \"Disabled\" without changing the Enabled " - "property values of any of the aggregated instances. The " - "default value is 1 (\"Enabled\")." ), - ValueMap { "1", "2", "3" }, - Values { "Enabled", "Disabled", "Enabled For Debug" }] - uint16 Enabled = 1; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicySetAppliesToElement.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicySetAppliesToElement.mof deleted file mode 100644 index 29554174..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicySetAppliesToElement.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "PolicySetAppliesToElement makes explicit which PolicySets " - "(i.e., policy rules and groups of rules) ARE CURRENTLY applied " - "to a particular Element. This association indicates that the " - "PolicySets that are appropriate for a ManagedElement " - "(specified using the PolicyRoleCollection aggregation) have " - "actually been deployed in the policy management " - "infrastructure. Note that if the named Element refers to a " - "Collection, then the PolicySet is assumed to be applied to all " - "the members of the Collection." )] -class CIM_PolicySetAppliesToElement { - - [Key, Description ( - "The PolicyRules and/or groups of rules that are " - "currently applied to an Element." )] - CIM_PolicySet REF PolicySet; - - [Key, Description ( - "The ManagedElement to which the PolicySet applies." )] - CIM_ManagedElement REF ManagedElement; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicySetComponent.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicySetComponent.mof deleted file mode 100644 index eff0a778..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicySetComponent.mof +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "PolicySetComponent is a concrete aggregation that collects " - "instances of the subclasses of PolicySet (i.e., PolicyGroups " - "and PolicyRules). Instances are collected in sets that use the " - "same decision strategy. They are prioritized relative to each " - "other, within the set, using the Priority property of this " - "aggregation. \n" - "\n" - "Together, the PolicySet.PolicyDecisionStrategy and PolicySet " - "Component.Priority properties determine the processing for the " - "groups and rules contained in a PolicySet. A larger priority " - "value represents a higher priority. Note that the Priority " - "property MUST have a unique value when compared with others " - "defined for the same aggregating PolicySet. Thus, the " - "evaluation of rules within a set is deterministically " - "specified." )] -class CIM_PolicySetComponent : CIM_PolicyComponent { - - [Aggregate, Override ( "GroupComponent" ), - Description ( - "A PolicySet that aggregates other PolicySet instances." )] - CIM_PolicySet REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "A PolicySet aggregated into a PolicySet." )] - CIM_PolicySet REF PartComponent; - - [Description ( - "A non-negative integer for prioritizing this PolicySet " - "component relative to other elements of the same " - "PolicySet. A larger value indicates a higher priority. " - "The Priority property MUST have a unique value when " - "compared with others defined for the same aggregating " - "PolicySet." )] - uint16 Priority; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicySetInRoleCollection.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicySetInRoleCollection.mof deleted file mode 100644 index c0aec874..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicySetInRoleCollection.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Aggregation, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "PolicySetInRoleCollection aggregates zero or more PolicyRules " - "and PolicyGroups (i.e., the subclasses of PolicySet) into a " - "PolicyRoleCollection object, representing a role " - "supported/enforced by the PolicySet." )] -class CIM_PolicySetInRoleCollection : CIM_MemberOfCollection { - - [Aggregate, Override ( "Collection" ), - Description ( "The PolicyRoleCollection." )] - CIM_PolicyRoleCollection REF Collection; - - [Override ( "Member" ), - Description ( - "The PolicySet that supports/enforces the PolicyRole for " - "the elements in the PolicyRoleCollection." )] - CIM_PolicySet REF Member; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicySetInSystem.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicySetInSystem.mof deleted file mode 100644 index 2d6ab58e..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicySetInSystem.mof +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Abstract, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "PolicySetInSystem is an abstract association class that " - "represents a relationship between a System and a PolicySet " - "used in the administrative scope of that system (e.g., " - "AdminDomain, ComputerSystem). The Priority property is used to " - "assign a relative priority to a PolicySet within the " - "administrative scope in contexts where it is not a component " - "of another PolicySet." )] -class CIM_PolicySetInSystem : CIM_PolicyInSystem { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The System in whose scope a PolicySet is defined." )] - CIM_System REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "A PolicySet named within the scope of a System." )] - CIM_PolicySet REF Dependent; - - [Description ( - "The Priority property is used to specify the relative " - "priority of the referenced PolicySet when there are more " - "than one PolicySet instances applied to a managed " - "resource that are not PolicySetComponents and, " - "therefore, have no other relative priority defined. The " - "priority is a non-negative integer; a larger value " - "indicates a higher priority." )] - uint16 Priority; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicySetValidityPeriod.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicySetValidityPeriod.mof deleted file mode 100644 index 7f0e180f..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicySetValidityPeriod.mof +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "The PolicySetValidityPeriod aggregation represents scheduled " - "activation and deactivation of a PolicySet. A PolicySet is " - "considered \"active\" if it is both \"Enabled\" and in a valid " - "time period. \n" - "\n" - "If a PolicySet is associated with multiple policy time periods " - "via this association, then the Set is in a valid time period " - "if at least one of the time periods evaluates to TRUE. If a " - "PolicySet is contained in another PolicySet via the " - "PolicySetComponent aggregation (e.g., a PolicyRule in a " - "PolicyGroup), then the contained PolicySet (e.g., PolicyRule) " - "is in a valid period if at least one of the aggregate\'s " - "PolicyTimePeriodCondition instances evaluates to TRUE and at " - "least one of its own PolicyTimePeriodCondition instances also " - "evalutes to TRUE. (In other words, the " - "PolicyTimePeriodConditions are ORed to determine whether the " - "PolicySet is in a valid time period and then ANDed with the " - "ORed PolicyTimePeriodConditions of each of PolicySet instances " - "in the PolicySetComponent hierarchy to determine if the " - "PolicySet is in a valid time period and, if also \"Enabled\", " - "therefore, active, i.e., the hierachy ANDs the ORed " - "PolicyTimePeriodConditions of the elements of the hierarchy. \n" - "\n" - "A Time Period may be aggregated by multiple PolicySets. A Set " - "that does not point to a PolicyTimePeriodCondition via this " - "association, from the point of view of scheduling, is always " - "in a valid time period." )] -class CIM_PolicySetValidityPeriod : CIM_PolicyComponent { - - [Aggregate, Override ( "GroupComponent" ), - Description ( - "This property contains the name of a PolicySet that " - "contains one or more PolicyTimePeriodConditions." )] - CIM_PolicySet REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "This property contains the name of a " - "PolicyTimePeriodCondition defining the valid time " - "periods for one or more PolicySets." )] - CIM_PolicyTimePeriodCondition REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PolicyTimePeriodCondition.mof b/build/vendor/dmtf_mof/Policy/CIM_PolicyTimePeriodCondition.mof deleted file mode 100644 index 86ebafbe..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PolicyTimePeriodCondition.mof +++ /dev/null @@ -1,285 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "This class provides a means of representing the time periods " - "during which a PolicySet is valid, i.e., active. At all times " - "that fall outside these time periods, the PolicySet has no " - "effect. A PolicySet is treated as valid at ALL times, if it " - "does not specify a PolicyTimePeriodCondition. \n" - "\n" - "In some cases a Policy Consumer may need to perform certain " - "setup / cleanup actions when a PolicySet becomes active / " - "inactive. For example, sessions that were established while a " - "PolicySet was active might need to be taken down when the " - "PolicySet becomes inactive. In other cases, however, such " - "sessions might be left up. In this case, the effect of " - "deactivating the PolicySet would just be to prevent the " - "establishment of new sessions. \n" - "\n" - "Setup / cleanup behaviors on validity period transitions are " - "not currently addressed by the Policy Model, and must be " - "specified in \'guideline\' documents or via subclasses of " - "CIM_PolicySet, CIM_PolicyTimePeriod Condition or other " - "concrete subclasses of CIM_Policy. If such behaviors need to " - "be under the control of the policy administrator, then a " - "mechanism to allow this control must also be specified in the " - "subclasses. \n" - "\n" - "PolicyTimePeriodCondition is defined as a subclass of " - "PolicyCondition. This is to allow the inclusion of time-based " - "criteria in the AND/OR condition definitions for a PolicyRule. \n" - "\n" - "Instances of this class may have up to five properties " - "identifying time periods at different levels. The values of " - "all the properties present in an instance are ANDed together " - "to determine the validity period(s) for the instance. For " - "example, an instance with an overall validity range of January " - "1, 2000 through December 31, 2000; a month mask that selects " - "March and April; a day-of-the-week mask that selects Fridays; " - "and a time of day range of 0800 through 1600 would be " - "represented using the following time periods: \n" - "Friday, March 5, 2000, from 0800 through 1600; \n" - "Friday, March 12, 2000, from 0800 through 1600; \n" - "Friday, March 19, 2000, from 0800 through 1600; \n" - "Friday, March 26, 2000, from 0800 through 1600; \n" - "Friday, April 2, 2000, from 0800 through 1600; \n" - "Friday, April 9, 2000, from 0800 through 1600; \n" - "Friday, April 16, 2000, from 0800 through 1600; \n" - "Friday, April 23, 2000, from 0800 through 1600; \n" - "Friday, April 30, 2000, from 0800 through 1600. \n" - "\n" - "Properties not present in an instance of " - "PolicyTimePeriodCondition are implicitly treated as having " - "their value \'always enabled\'. Thus, in the example above, " - "the day-of-the-month mask is not present, and so the validity " - "period for the instance implicitly includes a day-of-the-month " - "mask that selects all days of the month. If this \'missing " - "property\' rule is applied to its fullest, we see that there " - "is a second way to indicate that a PolicySet is always " - "enabled: associate with it an instance of " - "PolicyTimePeriodCondition whose only properties with specific " - "values are its key properties." )] -class CIM_PolicyTimePeriodCondition : CIM_PolicyCondition { - - [Description ( - "This property identifies an overall range of calendar " - "dates and times over which a PolicySet is valid. It is " - "formatted as a string representing a start date and " - "time, in which the character \'T\' indicates the " - "beginning of the time portion, followed by the solidus " - "character \'/\', followed by a similar string " - "representing an end date and time. The first date " - "indicates the beginning of the range, while the second " - "date indicates the end. Thus, the second date and time " - "must be later than the first. Date/times are expressed " - "as substrings of the form yyyymmddThhmmss. For example: \n" - "20000101T080000/20000131T120000 defines \n" - "January 1, 2000, 0800 through January 31, 2000, noon \n" - "\n" - "There are also two special cases in which one of the " - "date/time strings is replaced with a special string " - "defined in RFC 2445. \n" - "o If the first date/time is replaced with the string " - "\'THISANDPRIOR\', then the property indicates that a " - "PolicySet is valid [from now] until the date/time that " - "appears after the \'/\'. \n" - "o If the second date/time is replaced with the string " - "\'THISANDFUTURE\', then the property indicates that a " - "PolicySet becomes valid on the date/time that appears " - "before the \'/\', and remains valid from that point on." ), - ModelCorrespondence { - "CIM_PolicyTimePeriodCondition.MonthOfYearMask", - "CIM_PolicyTimePeriodCondition.DayOfMonthMask", - "CIM_PolicyTimePeriodCondition.DayOfWeekMask", - "CIM_PolicyTimePeriodCondition.TimeOfDayMask", - "CIM_PolicyTimePeriodCondition.LocalOrUtcTime" }] - string TimePeriod; - - [Description ( - "The purpose of this property is to refine the valid time " - "period that is defined by the TimePeriod property, by " - "explicitly specifying in which months the PolicySet is " - "valid. These properties work together, with the " - "TimePeriod used to specify the overall time period in " - "which the PolicySet is valid, and the MonthOfYearMask " - "used to pick out the months during which the PolicySet " - "is valid. \n" - "\n" - "This property is formatted as an octet string, " - "structured as follows: \n" - "o a 4-octet length field, indicating the length of the " - "entire octet string; this field is always set to " - "0x00000006 for this property; \n" - "o a 2-octet field consisting of 12 bits identifying the " - "12 months of the year, beginning with January and ending " - "with December, followed by 4 bits that are always set to " - "\'0\'. For each month, the value \'1\' indicates that " - "the policy is valid for that month, and the value \'0\' " - "indicates that it is not valid. \n" - "\n" - "The value 0x000000060830, for example, indicates that a " - "PolicySet is valid only in the months May, November, and " - "December. \n" - "\n" - "If a value for this property is not provided, then the " - "PolicySet is treated as valid for all twelve months, and " - "only restricted by its TimePeriod property value and the " - "other Mask properties." ), - OctetString, ModelCorrespondence { - "CIM_PolicyTimePeriodCondition.TimePeriod", - "CIM_PolicyTimePeriodCondition.LocalOrUtcTime" }] - uint8 MonthOfYearMask[]; - - [Description ( - "The purpose of this property is to refine the valid time " - "period that is defined by the TimePeriod property, by " - "explicitly specifying in which days of the month the " - "PolicySet is valid. These properties work together, with " - "the TimePeriod used to specify the overall time period " - "in which the PolicySet is valid, and the DayOfMonthMask " - "used to pick out the days of the month during which the " - "PolicySet is valid. \n" - "\n" - "This property is formatted as an octet string, " - "structured as follows: \n" - "o a 4-octet length field, indicating the length of the " - "entire octet string; this field is always set to " - "0x0000000C for this property; \n" - "o an 8-octet field consisting of 31 bits identifying the " - "days of the month counting from the beginning, followed " - "by 31 more bits identifying the days of the month " - "counting from the end, followed by 2 bits that are " - "always set to \'0\'. For each day, the value \'1\' " - "indicates that the PolicySet is valid for that day, and " - "the value \'0\' indicates that it is not valid. \n" - "\n" - "The value 0x0000000C8000000100000000, for example, " - "indicates that a PolicySet is valid on the first and " - "last days of the month. \n" - "\n" - "For months with fewer than 31 days, the digits " - "corresponding to days that the months do not have " - "(counting in both directions) are ignored. \n" - "\n" - "If a value for this property is not provided, then the " - "PolicySet is treated as valid for all days of the month, " - "and only restricted by its TimePeriod property value and " - "the other Mask properties." ), - OctetString, ModelCorrespondence { - "CIM_PolicyTimePeriodCondition.TimePeriod", - "CIM_PolicyTimePeriodCondition.LocalOrUtcTime" }] - uint8 DayOfMonthMask[]; - - [Description ( - "The purpose of this property is to refine the valid time " - "period that is defined by the TimePeriod property, by " - "explicitly specifying in which days of the week the " - "PolicySet is valid. These properties work together, with " - "the TimePeriod used to specify the overall time period " - "in which the PolicySet is valid, and the DayOfWeekMask " - "used to pick out the days of the week during which the " - "PolicySet is valid. \n" - "\n" - "This property is formatted as an octet string, " - "structured as follows: \n" - "o a 4-octet length field, indicating the length of the " - "entire octet string; this field is always set to " - "0x00000005 for this property; \n" - "o a 1-octet field consisting of 7 bits identifying the 7 " - "days of the week, beginning with Sunday and ending with " - "Saturday, followed by 1 bit that is always set to \'0\'. " - "For each day of the week, the value \'1\' indicates that " - "the PolicySet is valid for that day, and the value \'0\' " - "indicates that it is not valid. \n" - "\n" - "The value 0x000000057C, for example, indicates that a " - "PolicySet is valid Monday through Friday. \n" - "\n" - "If a value for this property is not provided, then the " - "PolicySet is treated as valid for all days of the week, " - "and only restricted by its TimePeriod property value and " - "the other Mask properties." ), - OctetString, ModelCorrespondence { - "CIM_PolicyTimePeriodCondition.TimePeriod", - "CIM_PolicyTimePeriodCondition.LocalOrUtcTime" }] - uint8 DayOfWeekMask[]; - - [Description ( - "The purpose of this property is to refine the valid time " - "period that is defined by the TimePeriod property, by " - "explicitly specifying a range of times in a day during " - "which the PolicySet is valid. These properties work " - "together, with the TimePeriod used to specify the " - "overall time period in which the PolicySet is valid, and " - "the TimeOfDayMask used to pick out the range of time " - "periods in a given day of during which the PolicySet is " - "valid. \n" - "\n" - "This property is formatted in the style of RFC 2445: a " - "time string beginning with the character \'T\', followed " - "by the solidus character \'/\', followed by a second " - "time string. The first time indicates the beginning of " - "the range, while the second time indicates the end. " - "Times are expressed as substrings of the form \'Thhmmss\'. \n" - "\n" - "The second substring always identifies a later time than " - "the first substring. To allow for ranges that span " - "midnight, however, the value of the second string may be " - "smaller than the value of the first substring. Thus, " - "\'T080000/T210000\' identifies the range from 0800 until " - "2100, while \'T210000/T080000\' identifies the range " - "from 2100 until 0800 of the following day. \n" - "\n" - "When a range spans midnight, it by definition includes " - "parts of two successive days. When one of these days is " - "also selected by either the MonthOfYearMask, " - "DayOfMonthMask, and/or DayOfWeekMask, but the other day " - "is not, then the PolicySet is active only during the " - "portion of the range that falls on the selected day. For " - "example, if the range extends from 2100 until 0800, and " - "the day of week mask selects Monday and Tuesday, then " - "the PolicySet is active during the following three " - "intervals: \n" - "From midnight Sunday until 0800 Monday; \n" - "From 2100 Monday until 0800 Tuesday; \n" - "From 2100 Tuesday until 23:59:59 Tuesday. \n" - "\n" - "If a value for this property is not provided, then the " - "PolicySet is treated as valid for all hours of the day, " - "and only restricted by its TimePeriod property value and " - "the other Mask properties." ), - ModelCorrespondence { - "CIM_PolicyTimePeriodCondition.TimePeriod", - "CIM_PolicyTimePeriodCondition.LocalOrUtcTime" }] - string TimeOfDayMask; - - [Description ( - "This property indicates whether the times represented in " - "the TimePeriod property and in the various Mask " - "properties represent local times or UTC times. There is " - "no provision for mixing of local times and UTC times: " - "the value of this property applies to all of the other " - "time-related properties. TimePeriods are synchronized " - "worldwide by using the enumeration value \'UTCTime\'. If " - "the goal is to synchronize worldwide on a particular " - "local time (such as 0300 - 0500 in New York), then if " - "the TimePeriod property spans a Daylight Savings Time " - "transition in New York, it will be necessary to create " - "multiple instances of PolicyTimePeriodCondition, one " - "based on the offset UTC-0500 for the part of each year " - "when standard time is used in New York, and one based on " - "the offset UTC-0400 for the part of each year when " - "Daylight Savings Time is used there." ), - ValueMap { "1", "2" }, - Values { "Local Time", "UTC Time" }, - ModelCorrespondence { - "CIM_PolicyTimePeriodCondition.TimePeriod", - "CIM_PolicyTimePeriodCondition.MonthOfYearMask", - "CIM_PolicyTimePeriodCondition.DayOfMonthMask", - "CIM_PolicyTimePeriodCondition.DayOfWeekMask", - "CIM_PolicyTimePeriodCondition.TimeOfDayMask" }] - uint16 LocalOrUtcTime; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_PublicPrivateKeyAuthentication.mof b/build/vendor/dmtf_mof/Policy/CIM_PublicPrivateKeyAuthentication.mof deleted file mode 100644 index ce06f55b..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_PublicPrivateKeyAuthentication.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "A class describing a company\'s and/or administrator\'s " - "credential requirements that should be authenticated in order " - "to establish/trust a CIM_Identity. This class defines the " - "specific public/private key pair that should be authenticated." )] -class CIM_PublicPrivateKeyAuthentication : CIM_AuthenticationCondition { - - [Description ( - "Boolean indicating whether the key pair is self-issued " - "(TRUE) or issued by a Certificate Authority (FALSE)." )] - boolean SelfIssuedKey; - - [Description ( - "String holding the user\'s (distinguished) name." )] - string DistinguishedName; - - [Description ( "String holding the public key data." )] - string PublicKey; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_QueryCondition.mof b/build/vendor/dmtf_mof/Policy/CIM_QueryCondition.mof deleted file mode 100644 index 761c5c2b..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_QueryCondition.mof +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "QueryCondition defines the criteria for generating a set of " - "query results that are accessible to other QueryConditions or " - "MethodActions of the same PolicyRule. If there are no results " - "returned from the query, then the Condition evaluates to " - "false; otherwise, true. \n" - "\n" - "QueryConditions are assumed to be constantly evaluated " - "whenever precursor PolicyConditions are met. Actual " - "implementations may evaluate conditions dynamically, via " - "polling, or via other means. \n" - "\n" - "QueryCondition instances are viewed as clients of query. The " - "QueryCondition implementation takes the query results and " - "makes them available by the name specified in QueryResultName " - "to the FROM clause in the Query property of other " - "QueryConditions or MethodActions. (The details of how this is " - "accomplished are implementation dependent.) These results are " - "not available via CIM Operations, do not create lifecycle " - "indications, and do not persist beyond a single evaluation of " - "the associated PolicyRule." )] -class CIM_QueryCondition : CIM_PolicyCondition { - - [Required, Description ( - "In the context of the associated PolicyRule, " - "QueryResultName defines a unique alias for the query " - "results that MAY be used in subsequent QueryConditions " - "or MethodActions of the same PolicyRule. This string is " - "treated as a class name, in a query statement." ), - ModelCorrespondence { "CIM_QueryCondition.Query", - "CIM_MethodAction.Query" }] - string QueryResultName; - - [Required, Description ( - "A query expression that MAY be evaluated and that " - "defines the query results that MAY be generated. Note " - "that the query\'s FROM clause MAY reference any class, " - "including those named by the QueryResultName of other " - "QueryCondition instances associated to the same " - "PolicyRule." ), - ModelCorrespondence { "CIM_QueryCondition.QueryLanguage", - "CIM_QueryCondition.QueryResultName" }] - string Query; - - [Required, Description ( - "The language in which the Query string is expressed./n " - "CQL - refers to the \'DMTF:CQL\' language defined by " - "DSP0200. \n" - "CQL: indicates a CIM Query Language string. \n" - "CQLT: indicates a CIM Query Language Template string. " - "When used, the identifiers recognized in the " - "$identifier$ tokens are \"SELF\" and the property names " - "of this class, or one of its subclasses. When used in " - "the Query string, $SELF$ will be replaced by a string " - "corresponding to a WBEM URI referencing the instance of " - "this class that contains the Query template string. " - "Tokens of the form $$ will be replaced by " - "a string representing the corresponding property value " - "of the instance of this class that contains the Query " - "string." ), - ValueMap { "2", "3", "..", "0x8000.." }, - Values { "CQL", "CQLT", "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_QueryCondition.Query" }] - uint16 QueryLanguage = 2; - - [Required, Description ( - "If Trigger = true, and with the exception of any " - "PolicyTimePeriodConditions, PolicyConditions of this " - "Policy are not evaluated until this \'triggering\' " - "condition query is true. There MUST be no more than one " - "QueryCondition with Trigger = true associated with a " - "particular Policy." )] - boolean Trigger = false; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_RejectConnectionAction.mof b/build/vendor/dmtf_mof/Policy/CIM_RejectConnectionAction.mof deleted file mode 100644 index c4771892..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_RejectConnectionAction.mof +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "RejectConnectionAction is used to cause a connection or its " - "negotiation to be terminated. For example, it can be used in " - "conjunction with an address filter on UDP port 500 to reduce " - "Denial of Service vulnerability. As another example, it can be " - "specified as a low priority rule to explicitly define the " - "default action for IKE key exchange negotiations - i.e., if " - "the higher priority rules are not satisfied, then reject the " - "connection negotiation." ), - MappingStrings { "IPSP Policy Model.IETF|IKERejectAction" }] -class CIM_RejectConnectionAction : CIM_PolicyAction { - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_ReusablePolicy.mof b/build/vendor/dmtf_mof/Policy/CIM_ReusablePolicy.mof deleted file mode 100644 index be13b369..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_ReusablePolicy.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "The ReusablePolicy association provides for the reuse of any " - "subclass of Policy in a ReusablePolicyContainer." )] -class CIM_ReusablePolicy : CIM_PolicyInSystem { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "This property identifies a ReusablePolicyContainer that " - "provides the administrative scope for the reuse of the " - "referenced policy element." )] - CIM_ReusablePolicyContainer REF Antecedent; - - [Override ( "Dependent" ), - Description ( "A reusable policy element." )] - CIM_Policy REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_ReusablePolicyContainer.mof b/build/vendor/dmtf_mof/Policy/CIM_ReusablePolicyContainer.mof deleted file mode 100644 index 9d22f31d..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_ReusablePolicyContainer.mof +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "A class representing an administratively defined container for " - "reusable policy-related information. This class does not " - "introduce any additional properties beyond those in its " - "superclass AdminDomain. It does, however, participate in a " - "unique association for containing policy elements. \n" - "\n" - "An instance of this class uses the NameFormat value " - "\"ReusablePolicyContainer\"." )] -class CIM_ReusablePolicyContainer : CIM_AdminDomain { - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_SharedSecretAuthentication.mof b/build/vendor/dmtf_mof/Policy/CIM_SharedSecretAuthentication.mof deleted file mode 100644 index 195bf2cc..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_SharedSecretAuthentication.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "A class describing a company\'s and/or administrator\'s " - "credential requirements that should be authenticated in order " - "to establish/trust a CIM_Identity. This class defines a " - "specific identity whose shared secret should be authenticated." )] -class CIM_SharedSecretAuthentication : CIM_AuthenticationCondition { - - [Description ( - "String defining the principal\'s ID whose secret is authenticated." - )] - string IDOfPrincipal; - - [Description ( - "String defining a hostname, URI or service/application " - "name. It defines the specific system or service which " - "provides the context for the shared secret." )] - string ContextOfSecret; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_VendorPolicyAction.mof b/build/vendor/dmtf_mof/Policy/CIM_VendorPolicyAction.mof deleted file mode 100644 index 1557d518..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_VendorPolicyAction.mof +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "A class that provides a general extension mechanism for " - "representing PolicyActions that have not been modeled with " - "specific properties. Instead, the two properties ActionData " - "and ActionEncoding are used to define the content and format " - "of the Action, as explained below. \n" - "\n" - "As its name suggests, VendorPolicyAction is intended for " - "vendor-specific extensions to the Policy Core Information " - "Model. Standardized extensions are not expected to use this " - "class." )] -class CIM_VendorPolicyAction : CIM_PolicyAction { - - [Description ( - "This property provides a general extension mechanism for " - "representing PolicyActions that have not been modeled " - "with specific properties. The format of the octet " - "strings in the array is left unspecified in this " - "definition. It is determined by the OID value stored in " - "the property ActionEncoding. Since ActionEncoding is " - "single-valued, all the values of ActionData share the " - "same format and semantics." ), - OctetString, ModelCorrespondence { - "CIM_VendorPolicyAction.ActionEncoding" }] - string ActionData[]; - - [Description ( - "An OID encoded as a string, identifying the format and " - "semantics for this instance\'s ActionData property." ), - ModelCorrespondence { "CIM_VendorPolicyAction.ActionData" }] - string ActionEncoding; - - -}; diff --git a/build/vendor/dmtf_mof/Policy/CIM_VendorPolicyCondition.mof b/build/vendor/dmtf_mof/Policy/CIM_VendorPolicyCondition.mof deleted file mode 100644 index 7045b4df..00000000 --- a/build/vendor/dmtf_mof/Policy/CIM_VendorPolicyCondition.mof +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::Policy" ), - Description ( - "A class that provides a general extension mechanism for " - "representing PolicyConditions that have not been modeled with " - "specific properties. Instead, the two properties Constraint " - "and ConstraintEncoding are used to define the content and " - "format of the Condition, as explained below. \n" - "\n" - "As its name suggests, VendorPolicyCondition is intended for " - "vendor-specific extensions to the Policy Core Information " - "Model. Standardized extensions are not expected to use this " - "class." )] -class CIM_VendorPolicyCondition : CIM_PolicyCondition { - - [Description ( - "This property provides a general extension mechanism for " - "representing PolicyConditions that have not been modeled " - "with specific properties. The format of the octet " - "strings in the array is left unspecified in this " - "definition. It is determined by the OID value stored in " - "the property ConstraintEncoding. Since " - "ConstraintEncoding is single-valued, all the values of " - "Constraint share the same format and semantics." ), - OctetString, ModelCorrespondence { - "CIM_VendorPolicyCondition.ConstraintEncoding" }] - string Constraint[]; - - [Description ( - "An OID encoded as a string, identifying the format and " - "semantics for this instance\'s Constraint property." ), - ModelCorrespondence { "CIM_VendorPolicyCondition.Constraint" }] - string ConstraintEncoding; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_Activity.mof b/build/vendor/dmtf_mof/Support/PRS_Activity.mof deleted file mode 100644 index b80bf49f..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_Activity.mof +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_Activity -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "Describes the date of each transaction and the objects involved." - )] -class PRS_Activity : PRS_ExchangeElement { - - [Deprecated { "PRS_Activity.NewKeys", "PRS_Activity.Deleted", - "PRS_Activity.Modified" }, - Description ( - "The key fields for the objects in the associated " - "Transaction. The use of this property is deprecated. The " - "PRS_SISService StartSISTransaction method uses the New, " - "Modified and Deleted properties instead of this field. " - "This field is set to NULL by the StartSISTransaction " - "method if the other properties are used." )] - string ParameterList; - - [Description ( - "The key fields for the objects added in the associated " - "Transaction. This property is set by the PRS_SISService " - "StartSISTransaction method." )] - string NewKeys; - - [Description ( - "The key fields for objects deleted in the associated " - "Transaction. This property is set by the PRS_SISService " - "StartSISTransaction method." )] - string Deleted; - - [Description ( - "The key fields for objects modified in the associated " - "Transaction. This property is set by the PRS_SISService " - "StartSISTransaction method." )] - string Modified; - - [Description ( - "The date of the Activity. This property is set by the " - "PRS_SISService StartSISTranasaction method." )] - datetime LocalDate; - - [Description ( "Description of the activity performed." )] - string ActionLog; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_ActivityContact.mof b/build/vendor/dmtf_mof/Support/PRS_ActivityContact.mof deleted file mode 100644 index 5af7ce2c..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_ActivityContact.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_ActivityContact -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( "Associates PRS_Activity with PRS_Contact." )] -class PRS_ActivityContact : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The PRS_Activity." )] - PRS_Activity REF Antecedent; - - [Override ( "Dependent" ), - Max ( 1 ), - Description ( "The PRS_Contact." )] - PRS_Contact REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_ActivityResource.mof b/build/vendor/dmtf_mof/Support/PRS_ActivityResource.mof deleted file mode 100644 index 1f759a61..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_ActivityResource.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_ActivityResource -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( "Associates PRS_Activity with PRS_Resource." )] -class PRS_ActivityResource : CIM_Dependency { - - [Aggregate, Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The PRS_Activity." )] - PRS_Activity REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The PRS_Resource." )] - PRS_Resource REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_ActivityTransaction.mof b/build/vendor/dmtf_mof/Support/PRS_ActivityTransaction.mof deleted file mode 100644 index c7109aa6..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_ActivityTransaction.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_ActivityTransaction -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( "Associates PRS_Activity with PRS_Transaction." )] -class PRS_ActivityTransaction : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The PRS_Activity." )] - PRS_Activity REF Antecedent; - - [Override ( "Dependent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The PRS_Transaction." )] - PRS_Transaction REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_Address.mof b/build/vendor/dmtf_mof/Support/PRS_Address.mof deleted file mode 100644 index a93ecd55..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_Address.mof +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_Address -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( "Provides address information for PRS_ContactItem." )] -class PRS_Address : PRS_ExchangeElement { - - [Description ( "The type of address." ), - ValueMap { "0", "1", "2", "3", "254", "255" }, - Values { "Primary", "Shipping", "Billing", "Service", - "Other", "Unknown" }] - uint8 AddressType; - - [Description ( "First line of address information." )] - string Address1; - - [Description ( "Second line of address information." )] - string Address2; - - [Description ( "Third line of address information." )] - string Address3; - - [Description ( "Fourth line of address information." )] - string Address4; - - [Description ( "The city." )] - string City; - - [Description ( - "The specific region, such as state or province." )] - string Region; - - [Description ( "The country\'s postal code for the address." )] - string PostalCode; - - [Description ( "The time zone of the address." )] - string TimeZone; - - [Description ( "The country code, based on ISO/IEC 3166." )] - string Country; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_AddressLocation.mof b/build/vendor/dmtf_mof/Support/PRS_AddressLocation.mof deleted file mode 100644 index 01cf7ec2..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_AddressLocation.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_AddressLocation -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( "Associates PRS_Address and PRS_Location." )] -class PRS_AddressLocation : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Description ( "The PRS_Address." )] - PRS_Address REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The PRS_Location." )] - PRS_Location REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_AdminAssociation.mof b/build/vendor/dmtf_mof/Support/PRS_AdminAssociation.mof deleted file mode 100644 index 6b021133..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_AdminAssociation.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_AdminAssociation -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "Associates PRS_Administrative data with any object derived " - "from PRS_ExchangeElement." )] -class PRS_AdminAssociation : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Description ( "The PRS_ExchangeElement." )] - PRS_ExchangeElement REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The PRS_Administrative object." )] - PRS_Administrative REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_Administrative.mof b/build/vendor/dmtf_mof/Support/PRS_Administrative.mof deleted file mode 100644 index 7b1808da..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_Administrative.mof +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_Administrative -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_Administrative defines administrative information about " - "associated objects. There must be at least one " - "PRS_Administrative instance associated with a PRS_Solution. " - "Administrative information is inherited from a parent object. \n" - "\n" - "If the administrative information among objects within a " - "Solution is not the same, additional PRS_Administrative " - "instances may be associated with other objects within the " - "Solution. All instances under a specific parent inherit their " - "administrative information unless there is an " - "PRS_Administrative instance associated with that instance. \n" - "\n" - "For example, if there is a PRS_Administrative instance " - "associated with a PRS_Problem instance, all of the " - "PRS_Statement and PRS_ Product instances within the Problem " - "use the same Administrative information as the PRS_Problem " - "instance." )] -class PRS_Administrative : PRS_ExchangeElement { - - [Description ( - "Level 0 means all information within a Reference, " - "Problem or Resolution is conveyed by a single " - "PRS_Statement. \n" - "\n" - "Level 1 means there may be multiple PRS_Statement " - "instances within a Reference, Problem or Resolution. \n" - "\n" - "Level 2 means that a PRS_Statement may be associated " - "with a PRS_Feature instance within a Reference, Problem " - "or Resolution." ), - ValueMap { "0", "1", "2" }] - uint16 ComplianceLevel; - - [Description ( - "Editorial status of the document. If \'Draft\', " - "information is complete, but unedited. If \'Reviewed\', " - "an editorial review has been completed. If \'Published\', " - "information has been reviewed and approved for " - "distribution." ), - ValueMap { "0", "1", "2", "254", "255" }, - Values { "Draft", "Reviewed", "Published", "Other", "Unknown" }] - uint8 DocumentStatus; - - [Description ( - "Intended distribution audience for the associated " - "information. If \'Proprietary\', information contains " - "proprietary information and is not to be released " - "externally. If \'Internal\', information is for internal " - "use only. If \'Partner\', information is only available " - "to contracted partners. If \'Public\', information is " - "available to anyone." ), - ValueMap { "0", "1", "2", "3", "254", "255" }, - Values { "Proprietary", "Internal", "Partner", "Public", - "Other", "Unknown" }] - uint8 Distribution; - - [Description ( "Language used in the associated information." )] - string Language; - - [Description ( "Copyright for the associated information." )] - string Copyright; - - [Description ( "Disclaimers about the associated information." )] - string Disclaimer; - - [Description ( "Usage rights for the associated information." )] - string Rights; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_AdministrativeContact.mof b/build/vendor/dmtf_mof/Support/PRS_AdministrativeContact.mof deleted file mode 100644 index 29708e43..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_AdministrativeContact.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_AdministrativeContact -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( "Associates PRS_Administrative and PRS_Contact." )] -class PRS_AdministrativeContact : CIM_Dependency { - - [Aggregate, Override ( "Antecedent" ), - Min ( 1 ), - Description ( "The PRS_Administrative instance." )] - PRS_Administrative REF Antecedent; - - [Override ( "Dependent" ), - Min ( 1 ), - Description ( "The PRS_Contact." )] - PRS_Contact REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_AdministrativeRevision.mof b/build/vendor/dmtf_mof/Support/PRS_AdministrativeRevision.mof deleted file mode 100644 index 2435246c..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_AdministrativeRevision.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_AdministrativeRevision -// ================================================================== - [Association, Aggregation, Version ( "2.8.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( "Associates PRS_Administrative with PRS_Revision." )] -class PRS_AdministrativeRevision : CIM_HostedDependency { - - [Aggregate, Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The PRS_Administrative." )] - PRS_Administrative REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The PRS_Revision." )] - PRS_Revision REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_Agreement.mof b/build/vendor/dmtf_mof/Support/PRS_Agreement.mof deleted file mode 100644 index aa41a426..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_Agreement.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_Agreement -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "The agreement or contract referenced for entitlement to service." - )] -class PRS_Agreement : PRS_ExchangeElement { - - [Description ( - "The identifier for the contract between the Request and " - "the Provider. This property is set by the Requester " - "prior to submitting a Service Request." )] - string ContractID; - - [Description ( "A brief description of the contract." )] - string AgreementType; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_Attached.mof b/build/vendor/dmtf_mof/Support/PRS_Attached.mof deleted file mode 100644 index 61d0c44e..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_Attached.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_Attached -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( "Associates PRS_Attachment with PRS_ExchangeElement." )] -class PRS_Attached : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The PRS_Attachment." )] - PRS_Attachment REF Antecedent; - - [Override ( "Dependent" ), - Min ( 1 ), - Description ( "The PRS_ExchangeElement." )] - PRS_ExchangeElement REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_Attachment.mof b/build/vendor/dmtf_mof/Support/PRS_Attachment.mof deleted file mode 100644 index 49cb6db3..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_Attachment.mof +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_Attachment -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_Attachment describes file attachments. A PRS_Attachment " - "may be associated to any object derived from " - "PRS_ExchangeElement. PRS_Attachment is used to attach objects " - "of any type including binary files, ASCII documents, or URLs. " - "Only one object may be attached per PRS_Attachment. \n" - "\n" - "The actual attachment carried by the Attachment object is " - "included by one of two methods: by reference or by value as " - "embedded data. A \'by reference\' approach links indirectly to " - "the attachment through the use of a string identifier, e.g. a " - "file name. An \'embedded data\' approach means the actual " - "binary data is included in PRS_Attachment." )] -class PRS_Attachment : PRS_ExchangeElement { - - [Description ( - "If the attachment is not embedded, where the attachment " - "is located." )] - string AttachmentReference; - - [Description ( - "Protocol required to read the attachment (e.g., http)." )] - string Protocol; - - [Description ( "The file format of the attachment." )] - string Format; - - [Description ( "The size of the attachment in bytes." )] - string AttachmentSize; - - [Description ( "The attachment itself, if embedded." )] - string AttachmentObject; - - [Description ( - "The purpose of the attachment, as related to the " - "diagnosis. \'Instructions\' are compilable code. " - "\'Background\' is descriptive information. \'Log\' is " - "information captured in a log file." ), - ValueMap { "0", "1", "2", "254", "255" }, - Values { "Instructions", "Background", "Log", "Unknown", - "Undefined" }] - uint8 AttachmentType; - - [Description ( - "The displayable attachment identifier. Used to define " - "what will appear as the name of the attachment, as " - "opposed to the specific attachment file name or URL." )] - string AttachmentName; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_Categorization.mof b/build/vendor/dmtf_mof/Support/PRS_Categorization.mof deleted file mode 100644 index 63168e4b..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_Categorization.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_Categorization -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_Categorization associates PRS_Reference, PRS_Problem or " - "PRS_Resolution with a PRS_Category for classification " - "purposes. For example, a Category named \'Printing Issues\' " - "can be defined for a Problem using the Categorization " - "association between a PRS_Problem and a PRS_Category." )] -class PRS_Categorization : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The PRS_Category used for classification." )] - PRS_Category REF Antecedent; - - [Override ( "Dependent" ), - Min ( 1 ), - Description ( - "The specific PRS_Reference, PRS_Problem or " - "PRS_Resolution classified by this association." )] - PRS_SolutionElement REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_Category.mof b/build/vendor/dmtf_mof/Support/PRS_Category.mof deleted file mode 100644 index df3eb019..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_Category.mof +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_Category -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_Category is used to classify the components of a Solution. " - "Hierarchical classifications are created by associating " - "PRS_CategoryParentChild with multiple PRS_Category instances." )] -class PRS_Category : PRS_ExchangeElement { - - [Description ( - "The specific value for the category. For example, \'HP " - "Laserjet\' would be a value for a category containing " - "printer names." )] - string CategoryContents; - - [Description ( - "The type of category. Used to give additional semantics " - "to the category. For example, a Category of Type " - "\'Printers\' would qualify the list of category values " - "for a list of printers. \n" - "\n" - "Note: the relationship of Category Type to Category " - "Value expresses no intrinsic hierarchy. If a tree of " - "relationships exists to define categories and " - "sub-categories, this should be defined using " - "CategoryParentChild associations." )] - string CategoryType; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_CategoryParentChild.mof b/build/vendor/dmtf_mof/Support/PRS_CategoryParentChild.mof deleted file mode 100644 index 364c9cb2..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_CategoryParentChild.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_CategoryParentChild -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_CategoryParentChild is used to define classification hierarchies." - )] -class PRS_CategoryParentChild : CIM_HostedDependency { - - [Override ( "Antecedent" ), - Description ( - "The parent PRS_Category used for classification." )] - PRS_Category REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The child PRS_Category used for classification." )] - PRS_Category REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_Contact.mof b/build/vendor/dmtf_mof/Support/PRS_Contact.mof deleted file mode 100644 index 64ee375d..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_Contact.mof +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_Contact -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_Contact is used to anchor associations to PRS_Person and " - "PRS_Orgnaization. PRS_Contact is also used to anchor " - "associations to PRS_Revision and PRS_Resolution, as well as " - "PRS_ServiceIncident." )] -class PRS_Contact : PRS_ExchangeElement { - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_ContactContactItem.mof b/build/vendor/dmtf_mof/Support/PRS_ContactContactItem.mof deleted file mode 100644 index 0bb5d996..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_ContactContactItem.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_ContactContactItem -// ================================================================== - [Association, Abstract, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "Abstract root class to associate PRS_Person or " - "PRS_Organization and PRS_Contact." )] -class PRS_ContactContactItem : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Description ( "The PRS_Contact." )] - PRS_Contact REF Antecedent; - - [Override ( "Dependent" ), - Min ( 1 ), - Description ( - "The PRS_ContactItem, either PRS_Person or " - "PRS_Organization. There is always at least one " - "PRS_ContactItem, however it may be either a PRS_Person " - "or PRS_Organization. For that reason, there is a minimum " - "cardinality of one for this property, but a minimum " - "cardinality of zero in the classes derived from this " - "class." )] - PRS_ContactItem REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_ContactItem.mof b/build/vendor/dmtf_mof/Support/PRS_ContactItem.mof deleted file mode 100644 index aa207f47..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_ContactItem.mof +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_ContactItem -// ================================================================== - [Abstract, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_ContactItem is the abstract root class for PRS_Person and " - "PRS_Organization. It provides a common anchor point for the " - "PRS_ContactContactItem association." )] -class PRS_ContactItem : PRS_ExchangeElement { - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_ContactItemAddress.mof b/build/vendor/dmtf_mof/Support/PRS_ContactItemAddress.mof deleted file mode 100644 index 93743d1c..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_ContactItemAddress.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_ContactItemAddress -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( "Associates PRS_ContactItem with PRS_Address." )] -class PRS_ContactItemAddress : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Description ( "The PRS_ContactItem." )] - PRS_ContactItem REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The PRS_Address." )] - PRS_Address REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_ContactOrganization.mof b/build/vendor/dmtf_mof/Support/PRS_ContactOrganization.mof deleted file mode 100644 index d165cfb5..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_ContactOrganization.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_ContactOrganization -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( "Associates PRS_Contact and PRS_Organization." )] -class PRS_ContactOrganization : PRS_ContactContactItem { - - [Override ( "Antecedent" ), - Min ( 1 ), - Description ( "The PRS_Contact." )] - PRS_Contact REF Antecedent; - - [Override ( "Dependent" ), - Min ( 1 ), - Description ( "The PRS_Organization." )] - PRS_Organization REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_ContactPerson.mof b/build/vendor/dmtf_mof/Support/PRS_ContactPerson.mof deleted file mode 100644 index 4cfe90cc..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_ContactPerson.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_ContactPerson -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( "Associates PRS_Contact and PRS_Person." )] -class PRS_ContactPerson : PRS_ContactContactItem { - - [Override ( "Antecedent" ), - Min ( 1 ), - Description ( "The PRS_Contact." )] - PRS_Contact REF Antecedent; - - [Override ( "Dependent" ), - Min ( 1 ), - Description ( "The PRS_Person." )] - PRS_Person REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_ExchangeElement.mof b/build/vendor/dmtf_mof/Support/PRS_ExchangeElement.mof deleted file mode 100644 index 7cd8b975..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_ExchangeElement.mof +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_ExchangeElement -// ================================================================== - [Abstract, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_ExchangeElement is an abstract base class for all classes " - "in the Solution and Service Incident object model. As an " - "abstract class it is never instantiated. \n" - "\n" - "PRS_ExchangeElement exists to provide a single anchor point " - "for associations that may be made to any Solution or Service " - "Incident object. For example, Administrative or Attachment " - "instances may be associated with any object derived from " - "PRS_ExchangeElement. To support this generic association " - "capability, the PRS_AdminAssociation and PRS_Attached " - "associations both derive from the CIM_Dependency association " - "and override the Antecedent property of that class to be a " - "PRS_ExchangeElement REF." )] -class PRS_ExchangeElement : CIM_ManagedElement { - - [Key, Description ( - "The PRSUniqueName property is a Globally Unique " - "IDentifier (GUID) also known as a Universally Unique " - "IDentifier (UUID). This property allows Solution and " - "Service Incident objects to be used by multiple " - "Solutions or Service Incidents without duplication. In " - "addition, all Solution or Service Incidents containing a " - "unique object are updated when the object is updated." )] - string PRSUniqueName; - - [Description ( - "The DirtyFlag is used by the SISService Start " - "Transaction method to determine whether an " - "ExchangeElement has been created, modified or deleted " - "since the last Transaction. Any object not marked " - "\'Clean\' is included in the next Transaction. \n" - "\n" - "It is the responsibility of the entity creating, " - "modifying or deleting the object derived from " - "ExchangeElement to set this property appropriately. \n" - "\n" - "This property value is set to \'Clean\' by an invocation " - "of the Transaction Complete method with a Status " - "parameter of zero (0)." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Clean", "New", "Modified", "Deleted" }] - uint8 DirtyFlag; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_Expression.mof b/build/vendor/dmtf_mof/Support/PRS_Expression.mof deleted file mode 100644 index 4a2e52c7..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_Expression.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_Expression -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_Expression defines a specific relationship between " - "PRS_ExpressionElements associated with PRS_SolutionElements." )] -class PRS_Expression : PRS_ExpressionElement { - - [Description ( - "The operator to be used with the associated " - "PRS_Expression Elements. The \'AND\', \'OR\' and \'NOT\' " - "operators are the only operators currently defined by " - "the standard. (They must be used as uppercase strings.) " - "Note that this is a vendor-extensible property - so that " - "additional operators can be defined and used in " - "implementations." )] - string Relation; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_ExpressionElement.mof b/build/vendor/dmtf_mof/Support/PRS_ExpressionElement.mof deleted file mode 100644 index 2b3dc907..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_ExpressionElement.mof +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_ExpressionElement -// ================================================================== - [Abstract, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_ExpressionElement is an abstract base class for " - "PRS_Products and PRS_Statements. It provides a common " - "association point for objects associated with PRS_Expressions." )] -class PRS_ExpressionElement : PRS_ExchangeElement { - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_ExpressionLink.mof b/build/vendor/dmtf_mof/Support/PRS_ExpressionLink.mof deleted file mode 100644 index 00ef3f8f..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_ExpressionLink.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_ExpressionLink -// ================================================================== - [Association, Aggregation, Version ( "2.8.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "Associates a PRS_Expression with PRS_ExpressionElements such " - "as PRS_Expression, PRS_Product, and PRS_Statement." )] -class PRS_ExpressionLink : CIM_HostedDependency { - - [Aggregate, Override ( "Antecedent" ), - Min ( 1 ), - Description ( "The parent PRS_Expression." )] - PRS_Expression REF Antecedent; - - [Override ( "Dependent" ), - Min ( 1 ), - Description ( - "The child PRS_ExpressionElement, either a " - "PRS_Expression, PRS_Product or PRS_Statement." )] - PRS_ExpressionElement REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_Feature.mof b/build/vendor/dmtf_mof/Support/PRS_Feature.mof deleted file mode 100644 index bfb9fd4f..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_Feature.mof +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_Feature -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_Feature is used for structured diagnostic data, including " - "specific data values like steps or conditions. For example, " - "consider a PRS_Statement with a Text property value of: \n" - "Print jobs per day are less than 50 \n" - "\n" - "This could be described using a PRS_Feature as follows: \n" - "Description: \'Print jobs per day\' \n" - "Prompt: \'How many print jobs per day?\' \n" - "ValidValues: \'10\' \'50\' \'100\' \n" - "DataType: \'Integer\' \n" - "\n" - "The associated PRS_Statement would contain: \n" - "Operator: \'<\' \n" - "FeatureValue: \'50\'" )] -class PRS_Feature : PRS_ExchangeElement { - - [Description ( "Prompt presented through user interface." )] - string Prompt; - - [Description ( "Valid values for this PRS_Feature." )] - string ValidValues; - - [Description ( - "Data type used for PRS_Statement FeatureValue property." ), - ValueMap { "0", "1", "2", "3", "4", "5", "254", "255" }, - Values { "String", "Integer", "Float", "Date/Time", - "Boolean", "Binary", "Other", "Unknown" }] - uint8 DataType; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_FeatureResource.mof b/build/vendor/dmtf_mof/Support/PRS_FeatureResource.mof deleted file mode 100644 index fd026326..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_FeatureResource.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_FeatureResource -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "Associates PRS_Feature with PRS_Resource. This is used to " - "track labor and costs associated with specific tasks defined " - "in a Feature object." )] -class PRS_FeatureResource : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The PRS_Feature." )] - PRS_Feature REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The PRS_Resource." )] - PRS_Resource REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_Location.mof b/build/vendor/dmtf_mof/Support/PRS_Location.mof deleted file mode 100644 index 5b5b7667..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_Location.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_Location -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_Location describes the location of a PRS_Address." )] -class PRS_Location : PRS_ExchangeElement { - - [Description ( "The type of location." ), - ValueMap { "0", "1", "2", "3", "4", "254", "255" }, - Values { "Primary_Voice", "Alternate_Voice", "Fax", "Email", - "URL", "Other", "Unknown" }] - uint8 LocationType; - - [Description ( "The specific location." )] - string LocationID; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_Organization.mof b/build/vendor/dmtf_mof/Support/PRS_Organization.mof deleted file mode 100644 index b33581c1..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_Organization.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_Organization -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_Organization describes a PRS_Contact\'s organization name " - "and business." )] -class PRS_Organization : PRS_ContactItem { - - [Description ( "The name of the organization." )] - string Name; - - [Description ( - "Description of organization\'s primary business." )] - string Business; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_Person.mof b/build/vendor/dmtf_mof/Support/PRS_Person.mof deleted file mode 100644 index b0edd51f..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_Person.mof +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_Person -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( "Information about a personal contact." )] -class PRS_Person : PRS_ContactItem { - - [Description ( "Contact\'s first name." )] - string FirstName; - - [Description ( "Contact\'s last name." )] - string LastName; - - [Description ( - "How the contact is addressed, i.e. Dr., Mr., Ms., Mrs., etc." - )] - string Salutation; - - [Description ( "Contact\'s business title." )] - string Title; - - [Description ( - "Description of the contact. For example, they may have " - "responsibilities not apparent from their title." )] - string ContactType; - - [Description ( - "Contact\'s preferred communication method. See the " - "PRS_Location.LocationType property." ), - ValueMap { "0", "1", "2", "3", "4", "254", "255" }, - Values { "Primary_Voice", "Alternate_Voice", "Fax", "Email", - "URL", "Other", "Unknown" }] - uint8 CommunicationMode; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_Problem.mof b/build/vendor/dmtf_mof/Support/PRS_Problem.mof deleted file mode 100644 index a3d19108..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_Problem.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_Problem -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_Problem is the root object of a set of associated objects " - "that describe a Problem. One or more Problems may be " - "associated with a Solution. \n" - "\n" - "The Problem is described by PRS_Statement and PRS_Product " - "instances indirectly associated to the PRS_Problem through a " - "PRS_Expression." )] -class PRS_Problem : PRS_SolutionElement { - - [Description ( - "The Likelihood describes the potential for the Problem " - "to occur. The value of this property shall be an integer " - "value in the range of 0 to 100, inclusive." ), - MinValue ( 0 ), - MaxValue ( 100 )] - uint16 Likelihood; - - [Description ( - "The Impact describes the severity of the problem. The " - "value of this property shall be an integer value in the " - "range of 0 to 100, inclusive." ), - MinValue ( 0 ), - MaxValue ( 100 )] - uint16 Impact; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_Product.mof b/build/vendor/dmtf_mof/Support/PRS_Product.mof deleted file mode 100644 index bf340a3f..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_Product.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_Product -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_Product is used to describe a single product to associate " - "with a PRS_Expression." )] -class PRS_Product : PRS_ExpressionElement { - - [Description ( "The vendor of the product." )] - string Vendor; - - [Description ( "The make and or model of the product." )] - string ProductName; - - [Description ( "The version of the product." )] - string Version; - - [Description ( - "The order of relevance of this product to an associated " - "PRS_SolutionElement (which includes PRS_Reference, " - "PRS_Problem or PRS_Resolution)." )] - string Order; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_ProductAsset.mof b/build/vendor/dmtf_mof/Support/PRS_ProductAsset.mof deleted file mode 100644 index aa780a06..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_ProductAsset.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_ProductAsset -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_ProductAsset is used to provide specific information about " - "a PRS_Product. PRS_ProductAsset associates this information to " - "a PRS_Product using one or more Statements associated to a " - "PRS_Expression." )] -class PRS_ProductAsset : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The product." )] - PRS_Product REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The expression." )] - PRS_Expression REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_ProductComponent.mof b/build/vendor/dmtf_mof/Support/PRS_ProductComponent.mof deleted file mode 100644 index 15650ac1..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_ProductComponent.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_ProductComponent -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_ProductComponent is used to describe \'has a\' " - "relationships between Products and their components parts. See " - "PRS_ProductParentChild for \'is a\' relationships." )] -class PRS_ProductComponent : CIM_Dependency { - - [Aggregate, Override ( "Antecedent" ), - Description ( "The PRS_Product which contains the component." )] - PRS_Product REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The component PRS_Product." )] - PRS_Product REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_ProductParentChild.mof b/build/vendor/dmtf_mof/Support/PRS_ProductParentChild.mof deleted file mode 100644 index 9dc21a3b..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_ProductParentChild.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_ProductParentChild -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "Products may exist in a hierarchy of relationships with " - "related Products. If a Producer deems these hierarchy " - "relationships are relevant to the current Problem or " - "Resolution, then the position of the Product in a hierarchy " - "can be implied using one of two types of relationships: \'is " - "a\' and \'has a\'. An \'is a\' relationship implies a " - "classification, such as versioning or typing. A \'has a\' " - "relationship implies that one product contains another. The " - "PRS_ProductParentChild association is used to imply an \'is a\' " - "hierarchy. Use the ProductComponent association to imply \'has " - "a\' relationships." )] -class PRS_ProductParentChild : CIM_Dependency { - - [Aggregate, Override ( "Antecedent" ), - Description ( "The parent PRS_Product." )] - PRS_Product REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The child PRS_Product." )] - PRS_Product REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_Reference.mof b/build/vendor/dmtf_mof/Support/PRS_Reference.mof deleted file mode 100644 index fa614ebf..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_Reference.mof +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_Reference -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_Reference is a placeholder to support links between " - "PRS_Expression objects and a PRS_Solution. It does not have " - "any properties. A \'Reference\' Solution uses PRS_Statement " - "objects to describe general, non-diagnostic knowledge and may " - "not include any PRS_Problem and PRS_Resolution instances." )] -class PRS_Reference : PRS_SolutionElement { - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_Resolution.mof b/build/vendor/dmtf_mof/Support/PRS_Resolution.mof deleted file mode 100644 index cce80ab7..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_Resolution.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_Resolution -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_Resolution is the root object of a set of associated " - "objects that describe a the resolution to a Problem. One or " - "more Resolutions may be associated with a Solution. \n" - "\n" - "The Resolution is described by PRS_Statement and PRS_Product " - "instances indirectly associated to the PRS_Resolution through " - "a PRS_Expression." )] -class PRS_Resolution : PRS_SolutionElement { - - [Description ( - "The Confidence describes the potential for the " - "Resolution to correct the Problem or Problems associated " - "with the PRS_Solution. The value of this property shall " - "be an integer value in the range of 0 to 100, inclusive." ), - MinValue ( 0 ), - MaxValue ( 100 )] - uint16 Confidence; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_ResolutionResource.mof b/build/vendor/dmtf_mof/Support/PRS_ResolutionResource.mof deleted file mode 100644 index 388bd57a..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_ResolutionResource.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_ResolutionResource -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( "Associates PRS_Resolution with PRS_Resource." )] -class PRS_ResolutionResource : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The PRS_Resource." )] - PRS_Resource REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The PRS_Resolution." )] - PRS_Resolution REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_Resource.mof b/build/vendor/dmtf_mof/Support/PRS_Resource.mof deleted file mode 100644 index c08e1d56..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_Resource.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_Resource -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "Each PRS_Resolution may have an associated cost of " - "implementation. This cost may have several components such as " - "time, material costs, labor cost, etc. To capture these costs, " - "a PRS_Resouce is associated with a PRS_Resolution. For Service " - "Incidents, one or more PRS_Resource objects may be associated " - "with an Activity." )] -class PRS_Resource : PRS_ExchangeElement { - - [Description ( "A string describing the type of resource." )] - string ResourceType; - - [Description ( "Number of units of resource used." )] - uint16 Quantity; - - [Description ( "Unit of measure for this resource." )] - string Units; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_Revision.mof b/build/vendor/dmtf_mof/Support/PRS_Revision.mof deleted file mode 100644 index d6ce4a1e..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_Revision.mof +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_Revision -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( "PRS_Revision records changes to the content." )] -class PRS_Revision : PRS_ExchangeElement { - - [Description ( "The date of this revision." )] - datetime RevisionDate; - - [Description ( "The name of the specific revision being made." ), - ValueMap { "0", "1", "2", "254", "255" }, - Values { "Create", "Update", "Delete", "Other", "Unknown" }] - uint8 ActivityName; - - [Description ( - "Type of revision activity. \'Technical\' refers to a " - "change in content. \'Editorial\' refers to a change in " - "language or style. \'Administrative\' refers to " - "information about the object." ), - ValueMap { "0", "1", "2", "254", "255" }, - Values { "Technical", "Editorial", "Administrative", "Other", - "Unknown" }] - uint8 ActivityType; - - [Description ( - "The current state of technical review. \'Open\' means " - "created but not necessarily completed or resolved. \'Not " - "Reviewed\' means contents have to be reviewed for " - "accuracy and consistency with other content. \'Reviewed\' " - "means review has been completed. \'Approved\' means " - "formally approval to certify the solution given the " - "specific status of the contents." ), - ValueMap { "0", "1", "2", "3", "254", "255" }, - Values { "Open", "Not Reviewed", "Reviewed", "Approved", - "Other", "Unknown" }] - uint8 TechnicalStatus; - - [Description ( - "The current state of editorial review. \'In Progress\' " - "means the content is in the process of being developed. " - "\'Draft\' means the content is complete but unedited. " - "\'Reviewed\' means the review has been completed. " - "\'Published\' means the contents have been released." ), - ValueMap { "0", "1", "2", "3", "254", "255" }, - Values { "In_Progress", "Draft", "Reviewed", "Published", - "Other", "Unknown" }] - uint8 EditorialStatus; - - [Override ( "Description" ), - Description ( - "Text description of what was done in this revision." )] - string Description; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_RevisionContact.mof b/build/vendor/dmtf_mof/Support/PRS_RevisionContact.mof deleted file mode 100644 index c6274ca2..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_RevisionContact.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_RevisionContact -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( "Associates PRS_Revision and PRS_Contact." )] -class PRS_RevisionContact : CIM_Dependency { - - [Aggregate, Override ( "Antecedent" ), - Description ( "The PRS_Revision." )] - PRS_Revision REF Antecedent; - - [Override ( "Dependent" ), - Min ( 1 ), - Description ( "The PRS_Contact." )] - PRS_Contact REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_SISService.mof b/build/vendor/dmtf_mof/Support/PRS_SISService.mof deleted file mode 100644 index 5a8f0792..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_SISService.mof +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_SISService -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "The PRS_SISService is used as a class factory for PRS_Transactions." - )] -class PRS_SISService : CIM_Service { - - - [Description ( - "When invoked on a local system, this method validates " - "the objects in the local repository, to determine if " - "they are sufficient for the indicated (input parameter) " - "TransactionType. If not, an error is returned and no " - "additional processing is performed. If the repository is " - "successfully validated, this method creates a " - "PRS_Transaction instance for return to the caller. \n" - "\n" - "The method also reviews the repository looking for new, " - "modified or deleted objects. As these objects are " - "located, their keys are appended to the related strings " - "in the PRS_Activity instance referenced by another " - "parameter of this method. \n" - "\n" - "After all the appropriate new, modified or deleted " - "objects have been located, this method invokes the " - "PRS_SISService\'s StartSISTransaction method on the " - "remote system specified by the objects related to the " - "Service Incident, associated with the PRS_Activity " - "instance specified as a method parameter. The " - "TransactionType and PRS_Activity REF is forwarded to the " - "remote system as method parameters as well as the " - "PRS_Transaction REF for the instance created by this " - "method. \n" - "\n" - "The remote system creates a child namespace using the " - "PRS_Transaction REF for the name. The local system then " - "transfers all of the new, modified and deleted objects " - "to the namespace on the remote system. Once all objects " - "have been successfully transferred, the PRS_SISService\'s " - "EndSISTransaction method is invoked on the remote system " - "with a Status value of zero to indicate that the remote " - "system should attempt to commit the transaction to the " - "remote repository. \n" - "\n" - "The remote system passes the results of the remote " - "commit back to the originating system by invoking the " - "PRS_SISService\'s SetSISCompletionStatus method on the " - "system that originated the SIS transaction. The " - "CompletionStatus method parameter indicates whether the " - "remote commit was successful. If the CompletionStatis is " - "zero, the remote commit was successful. If it was " - "unsuccessful, the objects were not applied to the remote " - "repository and the CompletionStatus is non-zero, " - "indicating the error. The local invocation of the SetSIS " - "CompletionStatus method updates the specified " - "PRS_Transaction\'s TransactionState to Closed and " - "CompletionStatus to the value provided by the remote " - "system in the CompletionStatus method parameter. \n" - "\n" - "In order to promote extensibility, the uint32 return " - "values for PRS_SISService\'s methods and Status-related " - "parameters are mapped into three sections. The first " - "describes the type of value being reported. It indicates " - "Error versus Notification, and Standard versus " - "Vendor-Specific. \n" - "\n" - "The second section describes the source of the value. It " - "indicates Method, Operating System, Repository, or " - "Transport. In addition, this section indicates whether " - "the value was created locally or remotely. \n" - "\n" - "The third section is the specific return value. \n" - "\n" - "If all 32 bits of the return value are reset, the method " - "completed successfully. Any other value indicates an " - "error condition or notification. If D31 is set, the " - "method did not complete successfully. If D31 is reset, " - "but the rest of the return value is non-zero, this is a " - "Notification that the operation did complete " - "successfully, but that there is a conditon of which the " - "caller should be aware. \n" - "\n" - "If D30 is set, the return value is vendor specific. If " - "D30 is reset, the return value is defined by the " - "standard. \n" - "\n" - "If D29 is set, the return value was generated by a " - "remote system. If D29 is reset, the return value was " - "generated locally. The bit is always set or reset by the " - "local system. The local system sets the bit if it " - "receives a non-zero return value from a remote method " - "invocation. \n" - "\n" - "Bit D28 is reserved for future use and shall be reset on " - "all return values. \n" - "\n" - "When there is an error or notification, D24 through D27 " - "indicate its source. The following sources are currently " - "defined (D24 is the least significant bit below): \n" - "0000 Method \n" - "0001 Operating System \n" - "0010 Repository \n" - "0011 Transport \n" - "All remaining values are reserved. \n" - "\n" - "Bits D16 through D23 are reserved for future use and " - "shall be reset to zero. \n" - "\n" - "Bits D0 through D15 indicate the specific return value. " - "If zero, all other bits in the return value must be " - "zero, indicating successful completion of the method (or " - "Transaction)." )] - uint32 StartSISTransaction( - [IN, Description ( - "The specific SIS transaction represented by this instance." - ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", - "9", "10", "11", "254", "255" }, - Values { "Service_Request", "Entitlement", - "Problem_Submittal", "Accept_Problem", - "Problem_Resolution", "Request_Problem_Information", - "Provide_Problem_Information", - "Provide_Admin_Information", "Query_Incident", - "Confirm_Close", "Reject_Resolution", - "Request_Closure", "Other", "Unknown" }] - uint8 TransactionType, - [IN, Description ( - "TransactionRef identifies the PRS_Transaction to " - "commit or abort. If this property is NULL or does " - "not identify an \'Open\' transaction, this method " - "returns an error." )] - PRS_Activity REF ActivityRef, - [IN, OUT, Description ( - "ActivityRef associates a time and description of " - "the activity involved in the service incident " - "transaction." )] - PRS_Transaction REF TransactionRef); - - [Description ( - "The EndSISTransaction method is used to handle " - "committing or aborting a transaction. For commit, the " - "method is invoked by a remote system when all of the " - "objects associated with the transaction have been placed " - "in the child namespace created by StartSISTransaction. \n" - "\n" - "For abort, the method cleans up the child namespace and " - "closes the specified PRS_Transaction, setting the " - "Transaction\'s CompletionStatus to the method parameter " - "of the same name." )] - uint32 EndSISTransaction( - [IN, Description ( - "Status indicates whether the transaction is to be " - "committed or aborted. If Status is zero, the " - "transaction is to be committed. If Status is " - "non-zero, it indicates the transaction is to be " - "aborted. If the transaction is being aborted, the " - "Status field is passed back to the originating " - "system as the CompletionStatus parameter for the " - "PRS_SISService SetSISCompletionStatus method. See " - "the description for " - "PRS_SISService.StartSISTransaction for the " - "definition of the contents of this property." )] - uint32 Status, - [IN, Description ( - "TransactionRef identifies the PRS_Transaction to " - "commit or abort. If this property is NULL or does " - "not identify an \'Open\' transaction, this method " - "returns an error." )] - PRS_Transaction REF TransactionRef); - - [Description ( - "SetSISCompletionStatus is used to signal the system that " - "originated a PRS_Transaction that the remote system has " - "completed processing of the transaction. If the " - "processing was successful, as indicated by the " - "CompletionStatus parameter, the local system resets the " - "DirtyFlag for all of the objects identified in the " - "PRS_Activity instance associated with the " - "PRS_Transaction." )] - uint32 SetSISCompletionStatus( - [IN, Description ( - "This parameter is used to set the CompletionStatus " - "field of the specified PRS_Transaction. If zero, " - "the Transaction was completed successfully. If " - "non-zero, an error occurred and the objects " - "provided in StartSISTransaction were not submitted " - "to the remote repository. See the description for " - "PRS_SISService.StartSISTransaction for the " - "definition of the contents of this property." )] - uint32 CompletionStatus, - [IN, Description ( - "TransactionRef identifies the PRS_Transaction that " - "has completed. If this property is NULL or does " - "not identify an \'Open\' transaction, this method " - "returns an error." )] - PRS_Transaction REF TransactionRef); - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_ServiceActivity.mof b/build/vendor/dmtf_mof/Support/PRS_ServiceActivity.mof deleted file mode 100644 index 835b2bb9..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_ServiceActivity.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_ServiceActivity -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( "Associates PRS_ServiceIncident to PRS_Activity." )] -class PRS_ServiceActivity : CIM_Dependency { - - [Aggregate, Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The PRS_ServiceIncident." )] - PRS_ServiceIncident REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The PRS_Activity." )] - PRS_Activity REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_ServiceAgreement.mof b/build/vendor/dmtf_mof/Support/PRS_ServiceAgreement.mof deleted file mode 100644 index d75380f4..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_ServiceAgreement.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_ServiceAgreement -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( "Associates PRS_ServiceIncident to PRS_Agreement." )] -class PRS_ServiceAgreement : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The PRS_ServiceIncident." )] - PRS_ServiceIncident REF Antecedent; - - [Override ( "Dependent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The PRS_Agreement." )] - PRS_Agreement REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_ServiceIncident.mof b/build/vendor/dmtf_mof/Support/PRS_ServiceIncident.mof deleted file mode 100644 index e541c878..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_ServiceIncident.mof +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_ServiceIncident -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_ServiceIncident contains the fundamental information " - "related to a specific incident: its identity, status, " - "priority, etc. The actual incident data, including specific " - "transactions and resolution information, is contained in the " - "objects associated with PRS_ServiceIncident. These include " - "specific Problem, Resolution and Activity related objects " - "accrued through the Transaction workflow." )] -class PRS_ServiceIncident : PRS_ExchangeElement { - - [Description ( - "The unique identifier for this incident assigned by the Requester." - )] - string RequesterID; - - [Description ( - "The unique identifier for this incident assigned by the Provider." - )] - string ProviderID; - - [Description ( - "The state of the incident within the Service Incident " - "Exchange Standard transaction model." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "254", - "255" }, - Values { "Beginning_State", "Not_Entitled", "Entitled", - "Problem_Submitted", "Open_Requester", "Open_Provider", - "Closed_Pending_Confirmation", "Closed", "Other", "Unknown" }] - uint8 CurrentState; - - [Description ( - "The severity of the incident as defined by the " - "Requester. One is the most severe and five is the least " - "severe." ), - ValueMap { "1", "2", "3", "4", "5" }] - uint8 RequesterSeverity; - - [Description ( - "The priority of the incident as defined by the " - "Requester. One is the highest priority and five is the " - "lowest priority." ), - ValueMap { "1", "2", "3", "4", "5" }] - uint8 ProviderPriority; - - [Description ( - "The explicit time the Requester expects a response." )] - datetime ResponseTime; - - [Description ( - "Status of the incident according to the workflow." )] - string WorkflowStatus; - - [Description ( - "Additional general information about the incident." )] - string Comment; - - [Description ( "Is the Requester entitled to service or not?" ), - ValueMap { "0", "1", "254", "255" }, - Values { "Yes", "No", "Other", "Unknown" }] - uint8 Entitled; - - [Description ( - "Was the last transaction was accepted or rejected?" ), - ValueMap { "0", "1", "254", "255" }, - Values { "Yes", "No", "Other", "Unknown" }] - uint8 Acknowledge; - - [Deprecated { "PRS_ServiceIncident.LastTransaction" }, - Description ( - "The use of the TransactionName property is deprecated. " - "New Service Incidents should use the LastTransaction " - "property and set this property to NULL." )] - string TransactionName; - - [Description ( - "The name of the last transaction which was acknowledged." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "254", "255" }, - Values { "Service_Request", "Entitlement", - "Problem_Submittal", "Accept_Problem", - "Problem_Resolution", "Request_Problem_Information", - "Provide_Problem_Information", - "Provide_Admin_Information", "Query_Incident", - "Confirm_Close", "Reject_Resolution", "Request_Closure", - "Other", "Unknown" }] - uint8 LastTransaction; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_ServiceProblem.mof b/build/vendor/dmtf_mof/Support/PRS_ServiceProblem.mof deleted file mode 100644 index 03917b18..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_ServiceProblem.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_ServiceProblem -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "Associates PRS_ServiceIncident to PRS_Problem to describe the " - "Problem being submitted to the Service Provider." )] -class PRS_ServiceProblem : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Description ( "The PRS_ServiceIncident." )] - PRS_ServiceIncident REF Antecedent; - - [Override ( "Dependent" ), - Max ( 1 ), - Description ( "The PRS_Problem." )] - PRS_Problem REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_ServiceProvider.mof b/build/vendor/dmtf_mof/Support/PRS_ServiceProvider.mof deleted file mode 100644 index 5b57ffb8..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_ServiceProvider.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_ServiceProvider -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "Associates PRS_ServiceIncident to PRS_Contact to describe the " - "Service Provider." )] -class PRS_ServiceProvider : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The PRS_ServiceIncident." )] - PRS_ServiceIncident REF Antecedent; - - [Override ( "Dependent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The PRS_Contact." )] - PRS_Contact REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_ServiceRequester.mof b/build/vendor/dmtf_mof/Support/PRS_ServiceRequester.mof deleted file mode 100644 index 45247b1b..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_ServiceRequester.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_ServiceRequester -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_ServiceRequester associates a PRS_ServiceIncident with a " - "PRS_Contact representing the entity requesting service. Note " - "that the Contact class is used for both Requesters and " - "Providers, the context is determined by which association " - "exists." )] -class PRS_ServiceRequester : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The PRS_ServiceIncident." )] - PRS_ServiceIncident REF Antecedent; - - [Override ( "Dependent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The PRS_Contact." )] - PRS_Contact REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_ServiceResolutionSolution.mof b/build/vendor/dmtf_mof/Support/PRS_ServiceResolutionSolution.mof deleted file mode 100644 index f4bd7876..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_ServiceResolutionSolution.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_ServiceResolutionSolution -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "Associates PRS_ServiceIncident to PRS_Solution to describe the " - "Resolutions proposed by the Service Provider." )] -class PRS_ServiceResolutionSolution : CIM_Dependency { - - [Aggregate, Override ( "Antecedent" ), - Description ( "The PRS_ServiceIncident." )] - PRS_ServiceIncident REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The PRS_Solution. PRS_Solution must be associated with " - "at least one Resolution." )] - PRS_Solution REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_Solution.mof b/build/vendor/dmtf_mof/Support/PRS_Solution.mof deleted file mode 100644 index 127d0918..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_Solution.mof +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_Solution -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_Solution is the root class of a set of associated classes " - "used to describe a single Solution. If a Solution is " - "associated with multiple Problems or Resolutions, all of the " - "Problems described are related to all of the Resolutions " - "described. The reverse is also true. All of the Resolutions " - "described are related to all of the Problems described in the " - "Solution. \n" - "\n" - "PRS_Solution is directly associated to one or more of the " - "following classes: \n" - "PRS_Reference \n" - "PRS_Problem \n" - "PRS_Resolution. " )] -class PRS_Solution : PRS_ExchangeElement { - - [Description ( "The Solution title." )] - string Title; - - [Description ( "A brief description of the Solution." )] - string SolutionAbstract; - - [Description ( - "The SolutionType suggests the type of knowledge " - "contained in the Solution. Depending on the type, the " - "Solution may or may not include particular objects. For " - "example, a \'Reference\' Solution describes " - "non-diagnostic technical or general information using " - "PRS_Statement objects. A \'Diagnostic\' Solution " - "includes one or more PRS_Problem and PRS_Resolution " - "objects. A \'How To\' Solution describes how to solve a " - "particular Problem described by a PRS_Problem in a " - "series of sequential steps within a PRS_Resolution." ), - ValueMap { "0", "1", "2", "254", "255" }, - Values { "Reference", "Diagnostic", "How To", "Other", - "Unknown" }] - uint8 SolutionType; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_SolutionCategory.mof b/build/vendor/dmtf_mof/Support/PRS_SolutionCategory.mof deleted file mode 100644 index 4638bb18..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_SolutionCategory.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_SolutionCategory -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_SolutionCategory associates PRS_Solution with a " - "PRS_Category for classification purposes." )] -class PRS_SolutionCategory : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Description ( "The PRS_Solution being classified." )] - PRS_Solution REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The specific PRS_Category being used to classify the Solution." - )] - PRS_Category REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_SolutionElement.mof b/build/vendor/dmtf_mof/Support/PRS_SolutionElement.mof deleted file mode 100644 index 3395e315..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_SolutionElement.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_SolutionElement -// ================================================================== - [Abstract, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_SolutionElement is an abstract base class for non-Category " - "objects that are associated with a Solution. This includes: \n" - "PRS_Reference \n" - "PRS_Problem \n" - "PRS_Resolution \n" - "\n" - "PRS_SolutionElement provides a common reference for these " - "objects to be associated with PRS_Expression objects through " - "the SolutionExpression association. \n" - "\n" - "In addition, all of the derived objects may be retrieved with " - "a single query for the common super-class." )] -class PRS_SolutionElement : PRS_ExchangeElement { - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_SolutionExpression.mof b/build/vendor/dmtf_mof/Support/PRS_SolutionExpression.mof deleted file mode 100644 index 9f295b7e..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_SolutionExpression.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_SolutionExpression -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "Associates PRS_SolutionElements (PRS_Reference, PRS_Problem or " - "PRS_Resolution) with PRS_Expressions." )] -class PRS_SolutionExpression : CIM_Dependency { - - [Aggregate, Override ( "Antecedent" ), - Min ( 1 ), - Description ( "The PRS_SolutionElement." )] - PRS_SolutionElement REF Antecedent; - - [Override ( "Dependent" ), - Min ( 1 ), - Description ( "The PRS_Expression." )] - PRS_Expression REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_SolutionHasElement.mof b/build/vendor/dmtf_mof/Support/PRS_SolutionHasElement.mof deleted file mode 100644 index 7b913510..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_SolutionHasElement.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_SolutionHasElement -// ================================================================== - [Association, Abstract, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_SolutionHasElement is an abstract base class for " - "associating PRS_Solution with objects derived from " - "PRS_SolutionElement. This association class allows all " - "PRS_Reference, PRS_Problem and PRS_Resolution objects to be " - "retrieved with a single query." )] -class PRS_SolutionHasElement : CIM_Dependency { - - [Aggregate, Override ( "Antecedent" ), - Min ( 1 ), - Description ( "The PRS_Solution root object of the Solution." )] - PRS_Solution REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The PRS_Reference, PRS_Problem or PRS_Resolution " - "aggregated into the Solution by this association." )] - PRS_SolutionElement REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_SolutionProblem.mof b/build/vendor/dmtf_mof/Support/PRS_SolutionProblem.mof deleted file mode 100644 index d12850c8..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_SolutionProblem.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_SolutionProblem -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_SolutionProblem aggregates a Problem into a Solution." )] -class PRS_SolutionProblem : PRS_SolutionHasElement { - - [Aggregate, Override ( "Antecedent" ), - Min ( 1 ), - Description ( "The PRS_Solution root object of the Solution." )] - PRS_Solution REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The PRS_Problem aggregated into the Solution." )] - PRS_Problem REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_SolutionReference.mof b/build/vendor/dmtf_mof/Support/PRS_SolutionReference.mof deleted file mode 100644 index f761133b..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_SolutionReference.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_SolutionReference -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_SolutionReference aggregates a Reference into a Solution." )] -class PRS_SolutionReference : PRS_SolutionHasElement { - - [Aggregate, Override ( "Antecedent" ), - Min ( 1 ), - Description ( "The PRS_Solution root object of the Solution." )] - PRS_Solution REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The PRS_Reference aggregated into the Solution." )] - PRS_Reference REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_SolutionResolution.mof b/build/vendor/dmtf_mof/Support/PRS_SolutionResolution.mof deleted file mode 100644 index bebee268..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_SolutionResolution.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_SolutionResolution -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_SolutionResolution aggregates a Resolution into a Solution." )] -class PRS_SolutionResolution : PRS_SolutionHasElement { - - [Aggregate, Override ( "Antecedent" ), - Min ( 1 ), - Description ( "The PRS_Solution root object of the Solution." )] - PRS_Solution REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The PRS_Solution aggregated into the Solution." )] - PRS_Resolution REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_Statement.mof b/build/vendor/dmtf_mof/Support/PRS_Statement.mof deleted file mode 100644 index b91f68a1..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_Statement.mof +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_Statement -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_Statement contains the text describing a problem, any " - "relevant background information, and its resolution. " - "Statements are units of text ranging from brief sentences or " - "phrases to paragraphs or pages. There is no limit to the " - "number of PRS_Statements within a Solution, as long as they " - "support the intent and focus of their root class. Root classes " - "include: PRS_Reference, PRS_Problem or PRS_Resolution. \n" - "\n" - "PRS_Statements may be grouped together to build compound " - "\'sentences\'. For example, \n" - "StatementA = Printer output is blotchy. \n" - "StatementB = Print jobs per day are less than 50. \n" - "ExpressionA = StatementA AND StatementB." )] -class PRS_Statement : PRS_ExpressionElement { - - [Description ( - "StatementRole describes how the PRS_Statement relates to " - "the larger context. For example, is the PRS_Statement " - "describing a Fix or a Symptom? \'Description\' is " - "generic text without a specific diagnostic application. " - "\'Symptom\' describes initial observable incident or " - "behavior that the user reports. \'Error_Message\' is a " - "specific type of symptom that the user reports, " - "describing the specific error condition. \'Objective\' " - "is what the user wants to accomplish, often expressed as " - "a positive condition. FOr example, how to print on a " - "network. \'Evidence\' is information that is collected " - "to diagnose the problem after the symptom is reported. " - "\'Cause\' is a description of the underlying facts or " - "factors that engender or relate this behavior. " - "\'Work_around\' is information that lets the user work, " - "but does not correct the problem completely. \'Fix\' is " - "information that fixes the problem completely. \'Answer\' " - "is the information given to the user such as steps to " - "perform, wording to support their environment and " - "understanding. \'Keyword\' is a specific classification " - "using defined words or phrases. \'Changes\' describe " - "recent changes in the environment which could affect the " - "problem or resolution. \'Title\' is the title applying " - "to associated PRS_Statements (usually associated via an " - "\'and\' expression." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "254", "255" }, - Values { "Description", "Symptom", "Error_Message", - "Objective", "Evidence", "Cause", "Work_Around", "Fix", - "Answer", "Keyword", "Changes", "Title", "Other", "Unknown" }] - uint8 StatementRole; - - [Description ( - "The descriptive text used for the PRS_Statement." )] - string Text; - - [Description ( - "When the PRS_Adminstrative object indicates Level 2 " - "compliance, StatementOperator describes the relationship " - "between an associated PRS_Feature and the FeatureValue " - "property. This property is ignored if there is no " - "PRS_Feature associated with this PRS_Statement." )] - string StatementOperator; - - [Description ( - "When the PRS_Adminstrative object indicates Level 2 " - "compliance, FeatureValue is the specific value selected " - "from the associated PRS_Feature. This property is " - "ignored if there is no PRS_Feature associated with this " - "PRS_Statement." )] - string FeatureValue; - - [Description ( - "Order is used to sequence PRS_Statements associated with " - "a single PRS_Expression to allow a Consumer to process " - "the information in the order desired by the Producer." )] - string Order; - - [Description ( - "Importance of this Statement. The value of this property " - "shall be an integer value in the range of 0 to 100, " - "inclusive." ), - MinValue ( 0 ), - MaxValue ( 100 )] - uint16 Relevance; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_StatementFeature.mof b/build/vendor/dmtf_mof/Support/PRS_StatementFeature.mof deleted file mode 100644 index 41dd7da2..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_StatementFeature.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_StatementFeature -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( "Associates PRS_Statement with PRS_Feature." )] -class PRS_StatementFeature : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The PRS_Statement." )] - PRS_Statement REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The PRS_Feature." )] - PRS_Feature REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/Support/PRS_Transaction.mof b/build/vendor/dmtf_mof/Support/PRS_Transaction.mof deleted file mode 100644 index aa1305ad..00000000 --- a/build/vendor/dmtf_mof/Support/PRS_Transaction.mof +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// PRS_Transaction -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "PRS::Support" ), - Description ( - "PRS_Transaction represents a single transaction of the Service " - "Incident workflow. A PRS_Transaction instance is created by " - "the PRS_SISService StartSISTransaction method." )] -class PRS_Transaction : PRS_ExchangeElement { - - [Description ( - "The specific SIS transaction represented by this " - "PRS_Transaction instance." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "254", "255" }, - Values { "Service_Request", "Entitlement", - "Problem_Submittal", "Accept_Problem", - "Problem_Resolution", "Request_Problem_Information", - "Provide_Problem_Information", - "Provide_Admin_Information", "Query_Incident", - "Confirm_Close", "Reject_Resolution", "Request_Closure", - "Other", "Unknown" }] - uint8 TransactionType; - - [Description ( - "The current state of this transaction. This value is " - "manipulated by the PRS_SISService:StartSISTransaction " - "and SetSISCompletionStatus method implementations. This " - "property is not intended to be written by management " - "applications." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Open", "Working", "Closed", "Notification_Pending" }] - uint8 TransactionState; - - [Description ( - "The status of the transaction after it has reached the " - "\'Closed\' state. A CompletionStatus of zero (0) means " - "the tranasaction completed successfully. A non-zero " - "CompletionStatus indicates the transaction did not " - "complete successfully. Non-zero values are " - "implementation-specific. While the transaction is \'Open\' " - "or \'Working\' the CompletionStatus property shall be " - "zero (0). See the description for PRS_SISService for the " - "definition of the contents of this property." )] - uint32 CompletionStatus; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_AffectedJobElement.mof b/build/vendor/dmtf_mof/System/CIM_AffectedJobElement.mof deleted file mode 100644 index 1b0bd168..00000000 --- a/build/vendor/dmtf_mof/System/CIM_AffectedJobElement.mof +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Add enumeration -// "Create" to ElementEffects. -// ================================================================== -// CIM_AffectedJobElement -// ================================================================== - [Association, Version ( "2.15.0" ), - UMLPackagePath ( "CIM::System::Processing" ), - Description ( - "AffectedJobElement represents an association between a Job and " - "the ManagedElement(s) that may be affected by its execution. " - "It may not be feasible for the Job to describe all of the " - "affected elements. The main purpose of this association is to " - "provide information when a Job requires exclusive use of the " - "\'affected\' ManagedElment(s) or when describing that side " - "effects may result." )] -class CIM_AffectedJobElement { - - [Key, Description ( - "The ManagedElement affected by the execution of the Job." )] - CIM_ManagedElement REF AffectedElement; - - [Key, Description ( - "The Job that is affecting the ManagedElement." )] - CIM_Job REF AffectingElement; - - [Description ( - "An enumeration describing the \'effect\' on the " - "ManagedElement. This array corresponds to the " - "OtherElementEffectsDescriptions array, where the latter " - "provides details related to the high-level \'effects\' " - "enumerated by this property. Additional detail is " - "required if the ElementEffects array contains the value " - "1, \"Other\"." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "Exclusive Use", - "Performance Impact", "Element Integrity", "Create" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_AffectedJobElement.OtherElementEffectsDescriptions" }] - uint16 ElementEffects[]; - - [Description ( - "Provides details for the \'effect\' at the corresponding " - "array position in ElementEffects. This information is " - "required whenever ElementEffects contains the value 1 " - "(\"Other\")." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_AffectedJobElement.ElementEffects" }] - string OtherElementEffectsDescriptions[]; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_AllocatedDMA.mof b/build/vendor/dmtf_mof/System/CIM_AllocatedDMA.mof deleted file mode 100644 index 9a1f44c1..00000000 --- a/build/vendor/dmtf_mof/System/CIM_AllocatedDMA.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AllocatedDMA -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::SystemResources" ), - Description ( - "An association between a LogicalDevice and a DMA System " - "Resource indicating that the DMA Channel is assigned to the " - "Device." )] -class CIM_AllocatedDMA : CIM_AllocatedResource { - - [Override ( "Antecedent" ), - Description ( "The DMA Channel." )] - CIM_DMA REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The LogicalDevice to which the Resource is assigned." )] - CIM_LogicalDevice REF Dependent; - - [Description ( - "Boolean indicating whether the LogicalDevice can act as " - "a bus master on the DMA Channel." ), - MappingStrings { "MIF.DMTF|System Resource DMA Info|001.6" }] - boolean BusMaster; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_AllocatedResource.mof b/build/vendor/dmtf_mof/System/CIM_AllocatedResource.mof deleted file mode 100644 index 111d9473..00000000 --- a/build/vendor/dmtf_mof/System/CIM_AllocatedResource.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AllocatedResource -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::SystemResources" ), - Description ( - "An association between LogicalDevices and SystemResources, " - "indicating that the Resource is assigned to the Device." )] -class CIM_AllocatedResource : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The Resource." )] - CIM_SystemResource REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The LogicalDevice to which the Resource is assigned." )] - CIM_LogicalDevice REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_AvailableDiagnosticService.mof b/build/vendor/dmtf_mof/System/CIM_AvailableDiagnosticService.mof deleted file mode 100644 index 314fc0c5..00000000 --- a/build/vendor/dmtf_mof/System/CIM_AvailableDiagnosticService.mof +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AvailableDiagnosticService -// ================================================================== - [Association, Version ( "2.9.0" ), - UMLPackagePath ( "CIM::System::Diagnostics" ), - Description ( - "This is an association class that relates a DiagnosticService " - "to a ManagedElement. Consumers wishing to \'diagnose\' a " - "particular Element could query this association to determine " - "what services are available." )] -class CIM_AvailableDiagnosticService : CIM_ServiceAvailableToElement { - - [Override ( "ServiceProvided" ), - Description ( - "The diagnostic service that is available to a ManagedElement." - )] - CIM_DiagnosticService REF ServiceProvided; - - [Description ( - "Estimated magnitude of time to perform the referenced " - "DiagnosticService on the referenced ManagedElement. \n" - "Since the processing speed of a system can vary " - "immensely due to a variety of factors (e.g., processor " - "speed), this property takes on values that are a " - "statement of magnitude, not absolute time. If greater " - "accuracy can be provided, a quantification may be " - "specified in the corresponding integer property, " - "EstimatedDurationQualifier. \n" - "Since execution times could vary by Element, this " - "property is located in the association between the two " - "entities." ), - ValueMap { "0", "2", "3", "4", "5", "6" }, - Values { "Unknown", "Milliseconds", "Seconds", "Minutes", - "Hours", "Days" }, - ModelCorrespondence { - "CIM_AvailableDiagnosticService.EstimatedDurationQualifier" }] - uint16 EstimatedDurationOfService; - - [Description ( - "EstimatedDurationQualifier can be used to further " - "quantify the magnitude of time to perform the service." ), - ModelCorrespondence { - "CIM_AvailableDiagnosticService.EstimatedDurationOfService" }] - uint32 EstimatedDurationQualifier; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_BIOSAttribute.mof b/build/vendor/dmtf_mof/System/CIM_BIOSAttribute.mof deleted file mode 100644 index c65eeea6..00000000 --- a/build/vendor/dmtf_mof/System/CIM_BIOSAttribute.mof +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::System::BIOS" ), - Description ( - "A class derived from ManagedElement that provides " - "instrumentation of BIOS configuration data or Attributes of a " - "managed computer system or device. These attributes are " - "surfaced in the form of BIOSAttribute instances. The " - "CIM_BIOSAttribute object may be used to represent both " - "configurable and static BIOS attributes." )] -class CIM_BIOSAttribute : CIM_ManagedElement { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. In order to ensure uniqueness within the " - "NameSpace, the value of InstanceID SHOULD be constructed " - "using the following 'preferred' algorithm: " - ":Where and are " - "separated by a colon ':', and where " - "MUST include a copyrighted, trademarked or otherwise " - "unique name that is owned by the business entity " - "creating/defining the InstanceID, or is a registered ID " - "that is assigned to the business entity by a recognized " - "global authority (This is similar to the _ structure of Schema class names.) In " - "addition, to ensure uniqueness MUST NOT contain " - "a colon (':'). When using this algorithm, the " - "first colon to appear in InstanceID MUST appear between " - " and . is chosen by the " - "business entity and SHOULD not be re-used to identify " - "different underlying (real-world) elements. If the above " - "'preferred' algorithm is not used, the " - "defining entity MUST assure that the resultant " - "InstanceID is not re-used across any InstanceIDs " - "produced by this or other providers for this instance\'s " - "NameSpace. For DMTF defined instances, the " - "'preferred' algorithm MUST be used with the " - " set to 'CIM'." )] - string InstanceID; - - [Required, Description ( - "A string identifying the structured element name for a " - "BIOS attribute using the format \":\" " - "in which , does contain a colon (\":\"). The " - "value of is a copyrighted, trademarked or " - "otherwise unique name that is owned by the entity " - "defining the , or is a registered ID that is " - "assigned to the entity by a recognized global authority. " - "For DMTF defined identifiers, the is set to " - "\'DMTF\' and the is specified in the BIOS " - "Attribute Registry." )] - string AttributeName; - - [Required, Description ( - "An array of strings representing the current value or " - "values of the BIOS Attribute." )] - string CurrentValue[]; - - [Description ( - "An array of strings representing the default value or " - "values of the BIOS Attribute." )] - string DefaultValue[]; - - [Description ( - "An array of strings representing a pending Attribute " - "value that will not take affect until some point in the " - "future. This would typically be used to represent " - "Attributes that could not be changed until a system " - "reset. When a BIOS attribute has no pending changes, " - "PendingValue SHALL be NULL. PendingValue SHALL have a " - "value of at least one element from the " - "CIM_BIOSEnumeration.PossibleValues array when the an " - "instance of the central class represents an enumeration." )] - string PendingValue[]; - - [Description ( - "This property specifies that the Attribute represented " - "makes up an ordered selection list with elements in the " - "CurrentValue array. The element zero shall be first or " - "least numbered element and incrementally increase to the " - "end of the array. The least or first element may " - "represent the highest priority in the ordered list." ), - ModelCorrespondence { "CIM_BIOSAttribute.CurrentValue" }] - boolean IsOrderedList; - - [Description ( - "This property specifies if the underlying system BIOS or " - "BIOSService will not allow the Attribute to be modified " - "through calls tothe methods " - "CIM_BIOSService.SetBIOSAttribute or " - "CIM_BIOSService.SetBIOSDefaults. This does not mean the " - "Attribute can not be modified through other means. Only " - "that the CIM interfaceis not capable of making a change" )] - boolean IsReadOnly; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_BIOSEnumeration.mof b/build/vendor/dmtf_mof/System/CIM_BIOSEnumeration.mof deleted file mode 100644 index 5da92804..00000000 --- a/build/vendor/dmtf_mof/System/CIM_BIOSEnumeration.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::System::BIOS" ), - Description ( - "This class extends the CIM_BIOSAttribute base class definition " - "to provide informational detail for enumeration data types. " - "Enumerations are single-selection lists with a finite set of " - "entities. Example enumerations might include \"Power-On Self " - "Test: Enable, Disable\" or \"Standby Timeout: 15 minutes, 30 " - "minutes, 45 minutes, Never\"." )] -class CIM_BIOSEnumeration : CIM_BIOSAttribute { - - [Required, Description ( - "An array of strings containing possible value " - "definitions for the Attribute. The first element SHOULD " - "not be NULL and there SHOULD be no NULL or empty string " - "elements intermixed with populated array element values. " - "A Value of NULL SHALL indicate an element\'s value is " - "unknown." ), - ArrayType ( "indexed" ), - ModelCorrespondence { - "CIM_BIOSEnumeration.PossibleValuesDescription" }] - string PossibleValues[]; - - [Description ( - "An array of free-form strings providing explanations and " - "details behind the entries in the " - "CIM_BIOSEnumeration.PossibleValues array. Note that each " - "entry of this array is related to the entry in " - "PossibleValues array that is located at the same index." ), - ArrayType ( "indexed" ), - ModelCorrespondence { "CIM_BIOSEnumeration.PossibleValues" }] - string PossibleValuesDescription[]; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_BIOSInteger.mof b/build/vendor/dmtf_mof/System/CIM_BIOSInteger.mof deleted file mode 100644 index d2679141..00000000 --- a/build/vendor/dmtf_mof/System/CIM_BIOSInteger.mof +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::System::BIOS" ), - Description ( - "The BIOSInteger object may be used to instantiate and provide " - "detailed information describing BIOS attributeswith integer " - "values." )] -class CIM_BIOSInteger : CIM_BIOSAttribute { - - [Description ( - "The property defines a lower bound or limit when " - "modifying this attribute." ), - ModelCorrespondence { "CIM_BIOSInteger.UpperBound" }] - uint64 LowerBound; - - [Description ( - "The property defines an upper bound or limit when " - "modifying this attribute." ), - ModelCorrespondence { "CIM_BIOSInteger.LowerBound" }] - uint64 UpperBound; - - [Description ( - "Indicates the programmatic unit for the " - "CIM_BIOSAttribute.CurrentValue, " - "CIM_BIOSAttribute.PendingValue, and " - "CIM_BIOSAttribute.DefaultValue Properties when instance " - "of the central class represents an Integer." ), - ModelCorrespondence { "CIM_BIOSAttribute.CurrentValue", - "CIM_BIOSAttribute.PendingValue", - "CIM_BIOSAttribute.PendingValue" }, - ISPUnit] - string ProgrammaticUnit; - - [Description ( - "Specifies the granularity of a scalar Attribute value. " - "The scalar increment is based on the scalar unit being " - "instrumented and returned as a programmaticUnit. For " - "example, if ProgrammaticUnit= \"Percentage\" and " - "ScalarIncrement=\"10\" then the scalar value is in " - "increments of 10 percent. It has a default value of 1." ), - ModelCorrespondence { "CIM_BIOSInteger.ProgramaticUnit" }] - uint32 ScalarIncrement = 1; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_BIOSPassword.mof b/build/vendor/dmtf_mof/System/CIM_BIOSPassword.mof deleted file mode 100644 index e90da7eb..00000000 --- a/build/vendor/dmtf_mof/System/CIM_BIOSPassword.mof +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.1" ), - UMLPackagePath ( "CIM::System::BIOS" ), - Description ( - "The CIM_BIOSPassword object may be used to instantiate detail " - "information about manageable BIOS-based passwords." )] -class CIM_BIOSPassword : CIM_BIOSAttribute { - - [Description ( - "This property specifies the minimum string length " - "allowed when modifying this BIOS attribute. A value of " - "NULL SHALL be defined as zero." ), - ModelCorrespondence { "CIM_BIOSPassword.MaxLength" }] - uint64 MinLength; - - [Description ( - "This property specifies the maximum string length " - "allowed when modifying this BIOS attribute. A value of " - "NULL defines the maximum length is unknown. A value of 0 " - "defines the maximum length as 18446744073709551615, the " - "limitation of the property definition as uint64." ), - ModelCorrespondence { "CIM_BIOSPassword.MinLength" }] - uint64 MaxLength; - - [Required, Override ( "CurrentValue" ), - Description ( "CurrentValue shall return an empty array." )] - string CurrentValue[]; - - [Required, Override ( "PendingValue" ), - Description ( "PendingValue shall return an empty array." )] - string PendingValue[]; - - [Description ( - "PasswordEncoding specifies encoding tag used to denote " - "the format the password string was createdor set with " - "\"kbd\" denotes a string in hexadecimal format " - "containing keyboard scan code input. An example of a " - "password structured in this format would be " - "\"321539191E1F1F11181320\", which is the representation " - "of \"my password\" in US English keyboard scan codes. " - "\"ascii\" denotes clear text that shall comply with the " - "ASCII character set. Character encodings from \" \" " - "(decimal 32) to \"~\" (decimal 126) are supported. An " - "example would be \"my password\".\"pin\" denotes that " - "only numeric input in ASCII text is allowed for the " - "password instance. An example would be \"1234\"." ), - ValueMap { "2", "3", "4", "5", "..", "65536..4294967295" }, - Values { "ascii", "kbd", "pin", "Unicode", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { - "CIM_BIOSServiceCapabilities.SupportedPasswordEncodings" }] - uint32 PasswordEncoding; - - [Description ( - "This property returns TRUE if the current password " - "instance is non-blank and FALSE otherwise. This property " - "is provided because the Value property is always defined " - "as NULL for password instances." )] - boolean IsSet; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_BIOSService.mof b/build/vendor/dmtf_mof/System/CIM_BIOSService.mof deleted file mode 100644 index e2477b1b..00000000 --- a/build/vendor/dmtf_mof/System/CIM_BIOSService.mof +++ /dev/null @@ -1,445 +0,0 @@ -//Copyright (c) 2008 DMTF. All RIghts Reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::System::BIOS" ), - Description ( - "A class derived from Service that provides the controls to " - "manage the system BIOS configuration of a managed computer " - "system or device. This service exposes functionality to " - "retrieve BIOS configuration data or attributes, set BIOS " - "attribute values, and restore a default configuration of " - "attribute values for a given computer system." )] -class CIM_BIOSService : CIM_Service { - - - [Description ( - "This method is called to modify instances of " - "BIOSAttribute associated with this BIOSService.If this " - "method is not supported by the implementation, 1 (Not " - "Supported) shall be returned. If the method is " - "supported, but has not completed due to an unspecified " - "error, 2 (Error) shall be returned. If the method is " - "supported and has completed successfully, 0 (Completed " - "with No Error) shall be returned. The method may return " - "an instance of CIM_Error." ), - ValueMap { "0", "1", "2", "..", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", "Error", - "DMTF Reserved", "Vendor Reserved" }] - uint32 SetBIOSAttribute( - [IN, Description ( - "If supplied, TargetBIOS references the scoping " - "instance of CIM_BIOSElement in which the operation " - "is targeted. If TargetBIOS is not supplied, the " - "target of the operation shall be the current " - "instance of CIM_BIOSElement associated to the " - "CIM_ComputerSystem hosting the service." )] - CIM_BIOSElement REF TargetBIOS, - [Required, IN, Description ( - "A reference to a BIOSAttribute specified by " - "AttributeName of the BIOSAttribute to be modified." )] - string AttributeName, - [Required, IN, Description ( - "A new value to assign to the specified " - "BIOSAttribute. A value of NULL indicates the " - "factory default value for the BIOSAttribute is " - "requested. If this value is valid, it will be " - "applied to the CurrentValue or PendingValue " - "property of the specified BIOSAttribute depending " - "on the system BIOS implementation and any " - "requirements for a system restart." )] - string AttributeValue[], - [IN, Description ( - "When required, a token to modify BIOSAttribute " - "values for this computer system. This is usually " - "the BIOS administrator password. If this is a " - "password, the PasswordEncoding parameter shall be " - "used to denote the format of the password string. " - "For example: the CIM_SharedCredential subclass may " - "be utilized. In that case, the " - "CIM_SharedCredential.Secret might be required and " - "if is not specified this method would return 6 " - "Invalid Parameter. The " - "CIM_SharedCredential.Algorithm property might also " - "be specified based on the property " - "CIM_BIOSServiceCapabilities.SupportedPasswordAlgorithms." - ), - EmbeddedInstance ( "CIM_Credential" )] - string AuthorizationToken, - [IN, Description ( - "PasswordEncoding specifies encoding tag used to " - "denote the format the password string is being " - "passed into the BIOS. \"kbd\" denotes a string in " - "hexadecimal format containing keyboard scan code " - "input. An example of a password structured in this " - "format would be \"321539191E1F1F11181320\", which " - "is the representation of \"my password\" in US " - "English keyboard scan codes. \"ascii\" denotes " - "clear text that shall comply with the ASCII " - "character set. Character encodings from \" \" " - "(decimal 32) to \"~\" (decimal 126) are supported. " - "An example would be \"my password\".\"pin\" " - "denotes that only numeric input in ASCII text is " - "allowed for the password instance. An example " - "would be \"1234\"." ), - ValueMap { "2", "3", "4", "5", "..", "32768..65535" }, - Values { "ascii", "kbd", "pin", "UTF16", - "DMTF Reserved", "Vendor Reserved" }] - uint32 PasswordEncoding, - [IN ( false ), OUT, Description ( - "Invoking the SetBIOSAttribute may result in a set " - "to CurrentValue property or the PendingValue " - "property. SetResult returns the result of invoking " - "the SetBIOSAttribute method when the method return " - "code is 0 completed with no error." ), - ValueMap { "2", "3", "..", "32768..65535" }, - Values { "Set CurrentValue property", - "Set PendingValue property", "DMTF Reserved", - "Vendor Reserved" }] - uint32 SetResult); - - [Description ( - "This method is called to modify instances of " - "BIOSAttribute associated with this BIOSService using an " - "embedded instance If this method is not supported by the " - "implementation, 1 (Not Supported) shall be returned. If " - "the method is supported, but has not completed due to an " - "unspecified error, 2 (Error) shall be returned. If the " - "method is supported and has completed successfully, 0 " - "(Completed with No Error) shall be returned. The method " - "may return an instance of CIM_Error." ), - ValueMap { "0", "1", "2", "..", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", "Error", - "DMTF Reserved", "Vendor Reserved" }] - uint32 SetBIOSAttributeEmbeddedInstance( - [IN, Description ( - "If supplied, TargetBIOS references the scoping " - "instance of CIM_BIOSElement in which the operation " - "is targeted. If TargetBIOS is not supplied, the " - "target of the operation shall be the current " - "instance of CIM_BIOSElement associated to the " - "CIM_ComputerSystem hosting the service." )] - CIM_BIOSElement REF TargetBIOS, - [Required, IN, Description ( - "AttributeConfig is the input required to modify " - "the value of a BIOSAttribute. The " - "CIM_BIOSAttribute.AttributeName and the " - "CIM_BIOSAttribute.CurrentValue properties are " - "Required for this operation. If both properties " - "are not specified the service shall return 6 " - "Invalid Parameter." ), - EmbeddedInstance ( "CIM_BIOSAttribute" )] - string AttributeConfig, - [IN, Description ( - "When required, a token to modify BIOSAttribute " - "values for this computer system. This is usually " - "the BIOS administrator password. If this is a " - "password, the PasswordEncoding parameter shall be " - "used to denote the format of the password string. " - "For example: the CIM_SharedCredential subclass may " - "be utilized. In that case, the " - "CIM_SharedCredential.Secret might be required and " - "if is not specified this method would return 6 " - "Invalid Parameter. The " - "CIM_SharedCredential.Algorithm property might also " - "be specified based on the property " - "CIM_BIOSServiceCapabilities.SupportedPasswordAlgorithms." - ), - EmbeddedInstance ( "CIM_Credential" )] - string AuthorizationToken, - [IN, Description ( - "PasswordEncoding specifies encoding tag used to " - "denote the format the password string is being " - "passed into the BIOS. This property is applicable " - "if the AuthorizationToken parameter includes a password.\n" - "\"kbd\" denotes a string in hexadecimal format " - "containing keyboard scan code input. An example of " - "a password structured in this format would be " - "\"321539191E1F1F11181320\", which is the " - "representation of \"my password\" in US English " - "keyboard scan codes. \"ascii\" denotes clear text " - "that shall comply with the ASCII character set. " - "Character encodings from \" \" (decimal 32) to \"~\" " - "(decimal 126) are supported. An example would be " - "\"my password\".\"pin\" denotes that only numeric " - "input in ASCII text is allowed for the password " - "instance. An example would be \"1234\"." ), - ValueMap { "2", "3", "4", "5", "..", "32768..65535" }, - Values { "ascii", "kbd", "pin", "UTF16", - "DMTF Reserved", "Vendor Reserved" }] - uint32 PasswordEncoding, - [IN ( false ), OUT, Description ( - "Invoking the SetBIOSAttributeEmbeddedInstance may " - "result in a set to CurrentValue property or the " - "PendingValue property. SetResult returns the " - "result of invoking the " - "SetBIOSAttributeEmbeddedInstance method when the " - "method return code is 0 completed with no error." ), - ValueMap { "2", "3", "..", "32768..65535" }, - Values { "Set CurrentValue property", - "Set PendingValue property", "DMTF Reserved", - "Vendor Reserved" }] - uint32 SetResult); - - [Description ( - "This method provides the ability to perform raw reads of " - "BIOS configuration storage area. The method will return " - "the lesser of the number of bytes specified by the " - "NumberOfBytes parameter and the actual number of bytes " - "available between Offset and the end of the BIOS area, " - "starting at specified by the Offset parameter " - "arereturned in the Data parameter." ), - ValueMap { "0", "1", "2", "..", "65536..4294967295" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", "DMTF Reserved", - "Vendor Reserved" }] - uint32 ReadRawBIOSData( - [IN, Description ( - "If supplied, TargetBIOS references the scoping " - "instance of CIM_BIOSElement in which the operation " - "is targeted. If TargetBIOS is not supplied, the " - "target of the operation shall be the current " - "instance of CIM_BIOSElement associated to the " - "CIM_ComputerSystem hosting the service." )] - CIM_BIOSElement REF TargetBIOS, - [Required, IN, Description ( - "Specifies initial offset to start reading from." )] - uint32 Offset, - [Required, IN, OUT, Description ( - "On input, specifies the number of bytes to read. " - "On output, specifies the number of bytes read." )] - uint32 NumberOfBytes, - [IN ( false ), OUT, Description ( - "Buffer to contain read data." ), - OctetString] - uint8 Data[]); - - [Description ( - "This method provides the ability to perform raw writes " - "of BIOS configuration storage area. The number of bytes " - "specified by the Length parameter will be written from " - "the Data parameter specified by the Offset parameter. If " - "the number of bytes to write as indicated by the " - "NumberOfBytes parameter exceeds the number of bytes from " - "Offset to the end of the BIOS area, the method shall " - "return 2." ), - ValueMap { "0", "1", "2", "..", "65536..4294967295" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", "DMTF Reserved", - "Vendor Reserved" }] - uint32 WriteRawBIOSData( - [IN, Description ( - "If supplied, TargetBIOS references the scoping " - "instance of CIM_BIOSElement in which the operation " - "is targeted. If TargetBIOS is not supplied, the " - "target of the operation shall be the current " - "instance of CIM_BIOSElement associated to the " - "CIM_ComputerSystem hosting the service." )] - CIM_BIOSElement REF TargetBIOS, - [Required, IN, Description ( - "Specifies initial offset to start reading from." )] - uint32 Offset, - [Required, IN, OUT, Description ( - "On input, specifies the number of bytes of data to " - "write. On output, specifies the number of bytes " - "written." )] - uint32 NumberOfBytes, - [IN, Description ( "Buffer containing data to write." ), - OctetString] - uint8 Data[], - [IN, Description ( - "A token required to modify BIOSAttribute values " - "for this computer system. This is usually the BIOS " - "administrator password. For example: the " - "CIM_SharedCredential subclass may be utilized. In " - "that case, the CIM_SharedCredential.Secret might " - "be required and if is not specified this method " - "would return 6 Invalid Parameter. The " - "CIM_SharedCredential.Algorithm property might also " - "be specified based on the " - "propertyCIM_BIOSServiceCapabilities.SupportedPasswordAlgorithms." - ), - EmbeddedInstance ( "CIM_Credential" )] - string AuthorizationToken, - [IN, Description ( - "PasswordEncoding specifies encoding tag used to " - "denote the format the password string is being " - "passed into the BIOS. This property is applicable " - "if the AuthorizationToken parameter includes a " - "password. \n" - "\"kbd\" denotes a string in hexadecimal format " - "containing keyboard scan code input. An example of " - "a password structured in this format would be " - "\"321539191E1F1F11181320\", which is the " - "representation of \"my password\" in US English " - "keyboard scan codes. \"ascii\" denotes clear text " - "that shall comply with the ASCII character set. " - "Character encodings from \" \" (decimal 32) to \"~\" " - "(decimal 126) are supported. An example would be " - "\"my password\".\"pin\" denotes that only numeric " - "input in ASCII text is allowed for the password " - "instance. An example would be \"1234\"." ), - ValueMap { "2", "3", "4", "5", "..", "32768..65535" }, - Values { "ascii", "kbd", "pin", "UTF16", - "DMTF Reserved", "Vendor Reserved" }] - uint32 PasswordEncoding); - - [Description ( - "This method is called to modify a group of BIOSAttribute " - "instances associated with this BIOSService. If the " - "method is not supported by the implementation, 1 (Not " - "Supported) shall be returned. If the method is " - "supported, but has not completed due to an unspecified " - "error, 2 (Error) shall be returned. If the method is " - "supported and has completed successfully, 0 (Completed " - "with No Error) shall be returned; SetResult[] should be " - "inspected to determine if individual BIOS Attribute " - "values have been set. The method may return an instance " - "of CIM_Error." ), - ValueMap { "0", "1", "2", "..", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", "Error", - "DMTF Reserved", "Vendor Reserved" }] - uint32 SetBIOSAttributes( - [IN, Description ( - "If supplied, TargetBIOS references the scoping " - "instance of CIM_BIOSElement in which the operation " - "is targeted. If TargetBIOS is not supplied, the " - "target of the operation shall be the current " - "instance of CIM_BIOSElement associated to the " - "CIM_ComputerSystem hosting the service." )] - CIM_BIOSElement REF TargetBIOS, - [IN, Description ( - "If supplied, the ConcreteCollection containing the " - "BIOS Attributes to be modified, as specified by " - "the ConcreteCollection.ElementName property. The " - "value of ConcreteCollection.ElementName supplied " - "for this parameter must be unique within the scope " - "of the instantiating Namespace; if the value is " - "not unique, this parameter shall not be supplied. " - "If BIOS Attributes represented by the " - "AttributeName[] parameter are not members of this " - "collection, the SetResult parameter that " - "corresponds to these BIOS Attributes shall return " - "5 (No Attempt to Set Value due to Error). If " - "CollectionElementName is not specified, the BIOS " - "Attributes represented by the AttributeName[] " - "parameter can be members of any collection or " - "associated with no collection at all." )] - string CollectionElementName, - [Required, IN, Description ( - "The BIOS Attribute names representing the BIOS " - "Attributes to be modified, as specified by " - "BIOSAttribute.AttributeName properties. The " - "specified BIOS Attributes must already exist. The " - "values of BIOSAttribute.AttributeName supplied for " - "this parameter must be unique within the scope of " - "the instantiating Namespace. The BIOS Attribute " - "name members of this array must correspond with " - "array members of the values represented by the " - "AttributeValue[] parameter. If more than one value " - "is specified for a particular BIOS Attribute, this " - "parameter shall contain multiple identical array " - "entries describing the BIOS Attribute name that " - "corresponds with each respective BIOS Attribute " - "value specified by the AttributeValue[] parameter." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_BIOSAttribute.AttributeName", - "CIM_BIOSService.SetBIOSAttributes.AttributeValue" }] - string AttributeName[], - [Required, IN, Description ( - "New values to assign to the BIOS Attributes " - "specified in the AttributeName[] parameter. The " - "BIOS Attribute value members of this array must " - "correspond with the array members of the names " - "represented by the AttributeName[] parameter. If " - "more than one value is specified for a particular " - "BIOS Attribute, this parameter shall contain an " - "entry for each BIOS Attribute value. A value of " - "NULL indicates the factory default values for the " - "BIOSAttribute is requested. If this value is " - "valid, it will be applied to the CurrentValue or " - "PendingValue property of the specified " - "BIOSAttribute depending on the system BIOS " - "implementation and any requirements for a system " - "restart. The result of applying the values are " - "described in the corresponding array entries of " - "the SetResult[] parameter." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_BIOSAttribute.CurrentValue", - "CIM_BIOSAttribute.PendingValue", - "CIM_BIOSService.SetBIOSAttributes.AttributeName", - "CIM_BIOSService.SetBIOSAttributes.SetResult" }] - string AttributeValue[], - [IN, Description ( - "When required, a token to modify BIOSAttribute " - "values for this computer system. This is usually " - "the BIOS administrator password. If this is a " - "password, the PasswordEncoding parameter shall be " - "used to denote the format of the password string. " - "For example: the CIM_SharedCredential subclass may " - "be utilized. In that case, the " - "CIM_SharedCredential.Secret might be required and " - "if is not specified this method would return 6 " - "Invalid Parameter. The " - "CIM_SharedCredential.Algorithm property might also " - "be specified based on the " - "propertyCIM_BIOSServiceCapabilities.SupportedPasswordAlgorithms." - ), - EmbeddedInstance ( "CIM_Credential" )] - string AuthorizationToken, - [IN, Description ( - "PasswordEncoding specifies encoding tag used to " - "denote the format the password string is being " - "passed into the BIOS. \"kbd\" denotes a string in " - "hexadecimal format containing keyboard scan code " - "input. An example of a password structured in this " - "format would be \"321539191E1F1F11181320\", which " - "is the representation of \"my password\" in US " - "English keyboard scan codes. \"ascii\" denotes " - "clear text that shall comply with the ASCII " - "character set. Character encodings from \" \" " - "(decimal 32) to \"~\" (decimal 126) are supported. " - "An example would be \"my password\".\"pin\" " - "denotes that only numeric input in ASCII text is " - "allowed for the password instance. An example " - "would be \"1234\"." ), - ValueMap { "2", "3", "4", "5", "..", "32768..65535" }, - Values { "ascii", "kbd", "pin", "UTF16", - "DMTF Reserved", "Vendor Reserved" }] - uint32 PasswordEncoding, - [IN ( false ), OUT, Description ( - "Invoking SetBIOSAttributes may result in new " - "values for BIOS Attributes specified in the " - "AttributeName[] parameter. SetResult returns the " - "results of invoking this method for each specified " - "attribute value. Each array element of SetResult " - "contains the result of setting the new value that " - "corresponds with each respective BIOS Attribute " - "value specified by the AttributeValue[] parameter. " - "If the BIOSAttribute.CurrentValue property is set " - "to the new value, 2 (Set CurrentValue Property) " - "shall be returned. If the " - "BIOSAttribute.PendingValue property is set to the " - "new value, 3 (Set PendingValue Property) shall be " - "returned. If an unspecified error occurred while " - "setting the value, 4 (Error Setting Value) shall " - "be returned. If there was no attempt to set the " - "value due to a prior unspecified error, 5 (No " - "Attempt to Set Value due to Error) shall be " - "returned. If a previously set value was " - "rolled-back to its original value due to a prior " - "unspecified error, 6 (Value Rolled-Back) shall be " - "returned." ), - ValueMap { "2", "3", "4", "5", "6", "..", "32768..65535" }, - Values { "Set CurrentValue Property", - "Set PendingValue Property", "Error Setting Value", - "No Attempt to Set Value due to Error", - "Value Rolled-Back", "DMTF Reserved", - "Vendor Reserved" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_BIOSAttribute.CurrentValue", - "CIM_BIOSAttribute.PendingValue", - "CIM_BIOSService.SetBIOSAttributes.AttributeName", - "CIM_BIOSService.SetBIOSAttributes.AttributeValue" }] - uint32 SetResult[]); - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_BIOSServiceCapabilities.mof b/build/vendor/dmtf_mof/System/CIM_BIOSServiceCapabilities.mof deleted file mode 100644 index e92fa986..00000000 --- a/build/vendor/dmtf_mof/System/CIM_BIOSServiceCapabilities.mof +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::Core::Capabilities" ), - Description ( - "BIOSServiceCapabilities advertises to a client the methods " - "that are supported by CIM_BIOSService." )] -class CIM_BIOSServiceCapabilities : CIM_Capabilities { - - [Description ( - "This property advertises the methods that are supported " - "by the service" ), - ValueMap { "0", "1", "2", "3", "4", "5", "..", - "65536..4294967295" }, - Values { "SetBIOSAttribute", "RestoreBIOSDefaults", - "SetBIOSAttributeEmbeddedInstance", "ReadRawBIOSData", - "WriteRawBIOSData", "SetBIOSAttributes", "DMTF Reserved", - "Vendor Reserved" }] - uint32 MethodsSupported[]; - - [Description ( - "The transformation algorithm, if any, used to protect " - "passwords before use in the protocol. For instance, " - "Kerberos doesn't store passwords as the shared." ), - ModelCorrespondence { "CIM_SharedSecret.Algorithm" }] - string SupportedPasswordAlgorithms[]; - - [Description ( - "This property specifies encoding the BIOS supports for " - "denoting password parameter strings. Encoding defines " - "the format that a password string is being passed into " - "the BIOS or set with. \"kbd\" denotes a string in " - "hexadecimal format containing keyboard scan code input. " - "An example of a password structured in this format would " - "be \"321539191E1F1F11181320\", which is the " - "representation of \"my password\" in US English keyboard " - "scan codes. \"ascii\" denotes clear text that shall " - "comply with the ASCII character set. Character encodings " - "from \" \" (decimal 32) to \"~\" (decimal 126) are " - "supported. An example would be \"my password\". \"pin\" " - "denotes that only numeric input in ASCII text is allowed " - "for the password instance. An example would be \"1234\"." ), - ValueMap { "2", "3", "4", "5", "..", "65536..4294967295" }, - Values { "ascii", "kbd", "pin", "UTF16", "DMTF Reserved", - "Vendor Reserved" }, - ModelCorrespondence { "CIM_BIOSPassword.SupportedEncodings" }] - uint32 SupportedPasswordEncodings[]; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_BIOSString.mof b/build/vendor/dmtf_mof/System/CIM_BIOSString.mof deleted file mode 100644 index 980c1b69..00000000 --- a/build/vendor/dmtf_mof/System/CIM_BIOSString.mof +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::System::BIOS" ), - Description ( - "The CIM_BIOSString object may be used to instantiate " - "string-based BIOS attributes." )] -class CIM_BIOSString : CIM_BIOSAttribute { - - [Description ( - "The StringType property provides management applications " - "with information defining implementation\'s capabilities " - "regarding string values. A value of ASCII indicates a " - "plain text formatting with no tabs formating or bolds, " - "plain text. A value of hex indicates a simple encoding " - "of the numerals 0 to 9 and the letters A to F and is not " - "case sensitive. A value of unicode indicates fully " - "multi-lingual text support. A string BIOS Attribute with " - "value of regex is a regular expression and the " - "CIM_BIOSString.ValueExpression shall be applied to " - "values represented and any value that is attempted to be " - "set by invoking SetBIOSAttribute()." ), - ValueMap { "0", "2", "3", "4", "5", "..", "65536..4294967295" }, - Values { "Unknown", "ASCII", "hex", "unicode", "regex", - "DMTF Reserved", "Vendor Reserved" }] - uint32 StringType; - - [Description ( - "This property specifies the minimum string length " - "allowed when modifying this BIOS attribute. A value of " - "NULL SHALL be defined as zero." ), - ModelCorrespondence { "CIM_BIOSString.MaxLength" }] - uint64 MinLength; - - [Description ( - "This property specifies the maximum string length " - "allowed when modifying this BIOS attribute. A value of " - "NULL defines the maximum length is unknown. A value of 0 " - "defines the maximum length as 18446744073709551615, the " - "limitation of the property definition as uint64." ), - ModelCorrespondence { "CIM_BIOSString.MinLength" }] - uint64 MaxLength; - - [Description ( - "The property denotes a Perl-compatible regular " - "expression (PCRE) syntax to use in validating Attribute " - "values. For a string Attribute where StringType=\"regex\" " - "this property shall have a value." )] - string ValueExpression; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_BootConfigSetting.mof b/build/vendor/dmtf_mof/System/CIM_BootConfigSetting.mof deleted file mode 100644 index 6ef5ecff..00000000 --- a/build/vendor/dmtf_mof/System/CIM_BootConfigSetting.mof +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::System::Boot" ), - Description ( - "A class derived from SettingData that provides the container " - "to arrange all the BootSourceSetting instances in an ordered " - "sequence. There can be one or more of the BootConfigSetting " - "instances associated to a ComputerSystem. For example, one " - "such BootConfigSetting could be a default boot configuration " - "supplied by the manufacturer, a second one could be a " - "configuration recommended by the IT Administrator. A third one " - "could be the one actually to be used on next system boot." )] -class CIM_BootConfigSetting : CIM_SettingData { - - - [Description ( - "This method is called to change the boot order within a " - "boot configuration. An ordered array of " - "BootSourceSetting instances is passed to this method. " - "Each BootSourceSetting instance MUST already be " - "associated with this BootConfigSetting instance via an " - "instance of OrderedComponent. If not, the implementation " - "MUST return a value of \"Invalid Parameter\" Upon " - "execution of this method, the value of the " - "AssignedSequence property on each instance of " - "OrderedComponent will be updated such that the values " - "are monotonically increasing in correlation with the " - "position of the referenced BootSourceSetting instance in " - "the source input parameter. That is, the first position " - "in the array will have the lowest value for " - "AssignedSequence. The second position will have the " - "second lowest value, and so on. For BootSourceSetting " - "instances which are associated with the " - "BootConfigSetting instance via OrderedComponent and not " - "present in the input array, the AssignedSequence " - "property on the OrderedComponent association will be " - "assigned a value of 0." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7..32767", - "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", "Busy", "Invalid Reference", - "Invalid Parameter", "Access Denied", "DMTF Reserved", - "Vendor Specified" }] - uint32 ChangeBootOrder( - [IN, Description ( - "An ordered array of BootSourceSettings." )] - CIM_BootSourceSetting REF Source[], - [IN ( false ), OUT, Description ( - "Reference to the job spawned if the operation " - "continues after the method returns. (May be null " - "if the task is completed)." )] - CIM_ConcreteJob REF Job); - - [Description ( - "This method validates all settings associated with the " - "BootConfigSetting. This is to make sure that all the " - "settings of the newly created BootConfigSetting are " - "consistent with the system configuration. This method " - "returns True or False. True would only mean that the " - "instrumentation has made a consistency check based on " - "its current knowledge of the system, and does not " - "actually guarantee the success of boot process." ), - ValueMap { "0", "1", "2", "3", "4..32767", "32768..65535" }, - Values { "Settings Validated OK", "Conflicting Settings", - "Unknown/Unspecified Error", "Busy", "DMTF Reserved", - "Vendor Specified" }] - uint32 ValidateSettings( -); - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_BootOSFromFS.mof b/build/vendor/dmtf_mof/System/CIM_BootOSFromFS.mof deleted file mode 100644 index 77570921..00000000 --- a/build/vendor/dmtf_mof/System/CIM_BootOSFromFS.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BootOSFromFS -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::OperatingSystem" ), - Description ( - "A link between the OperatingSystem and the FileSystem(s) from " - "which this OperatingSystem is loaded. The association is many- " - "to-many since a Distributed OS could depend on several File " - "Systems in order to correctly and completely load." )] -class CIM_BootOSFromFS : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "The FileSystem from which the OperatingSystem is loaded." )] - CIM_FileSystem REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The OperatingSystem." )] - CIM_OperatingSystem REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_BootSAP.mof b/build/vendor/dmtf_mof/System/CIM_BootSAP.mof deleted file mode 100644 index f7ae279b..00000000 --- a/build/vendor/dmtf_mof/System/CIM_BootSAP.mof +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BootSAP -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::Boot" ), - Description ( - "A representation of the access points of a BootService." )] -class CIM_BootSAP : CIM_ServiceAccessPoint { - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_BootService.mof b/build/vendor/dmtf_mof/System/CIM_BootService.mof deleted file mode 100644 index da31672e..00000000 --- a/build/vendor/dmtf_mof/System/CIM_BootService.mof +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::System::Boot" ), - Description ( - "A class derived from Service that provides the controls to " - "manage the boot configuration of a managed computer system or " - "device. This includes changing the order of the boot devices " - "and affecting settings on managed elements during the boot " - "process. This service can also affect the load of a specific " - "operating system on the computer system through a " - "BootSourceSetting that points to a specific operating system " - "image." )] -class CIM_BootService : CIM_Service { - - - [Description ( - "This method creates a new boot configuration by creating " - "a replica of an existing boot configuration. The new " - "boot configuration shall be a duplicate, with the " - "exception of key property values, of the " - "BootConfigSetting, and its associated classes, specified " - "in the StartingBootConfig parameter. If \"State Data " - "Supported\" is present in the " - "BootServiceCapabilities.BootCapabilitiesSupported " - "property, the new BootConfigSetting shall be associated " - "via ElementSettingData to a \'State\' BootConfigSetting, " - "which is associated to the ComputerSystem specified by " - "the ScopingComputerSystem parameter. Otherwise the new " - "BootConfigSetting shall be directly associated via " - "ElementSettingData data to the ComputerSystem." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", - "4097..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", "Busy", "Invalid Reference", - "Invalid Parameter", "Access Denied", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Method Reserved", "Vendor Specified" }] - uint32 CreateBootConfigSetting( - [Required, IN, Description ( - "An existing BootConfigSetting instance used as a " - "template to replicate. factory default " - "configuration." )] - CIM_BootConfigSetting REF StartingBootConfig, - [IN, Description ( - "directly or indirectly associated. If " - "ScopingComputerSystem has a non-NULL value, the " - "scoping system for NewBootConfig is explicitly " - "identified. If ScopingComputerSystem has a value " - "of NULL, the new BootConfigSetting shall be " - "related to the same set of ComputerSystems as is " - "the template configuration." )] - CIM_ComputerSystem REF ScopingComputerSystem, - [IN ( false ), OUT, Description ( - "The BootConfigSetting instance created by the " - "method. This parameter is not returned if the " - "method is run as a Job." )] - CIM_BootConfigSetting REF NewBootConfig, - [IN ( false ), OUT, Description ( - "Reference to the job spawned if the operation " - "continues after the method returns. (May be null " - "if the task is completed)." )] - CIM_ConcreteJob REF Job); - - [Description ( - "This method is called to set the role of the " - "BootConfigSetting that is directly or indirectly " - "associated to one or more ComputerSystems. The method " - "applies the new role equally to all related " - "ComputerSystems. If a BootConfigSetting can be related " - "to more than one ComputerSystem, but role modification " - "applies to just one of them, the SetBootConfigUsage " - "method shall be used instead.\n" - "The method shall update the IsNext or IsDefault property " - "of every ElementSettingData that directly or indirectly " - "associates BootConfigSetting to a ComputerSystem. The " - "method may also update the IsNext or IsDefault property " - "of other ElementSettingDatas that reference the same " - "ComputerSystems to satisfy cardinality constraints." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", - "4097..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", "Busy", "Invalid Reference", - "Invalid Parameter", "Access Denied", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Method Reserved", "Vendor Specified" }] - uint32 SetBootConfigRole( - [Required, IN, Description ( - "An existing BootConfigSetting instance whose role " - "will be updated." )] - CIM_BootConfigSetting REF BootConfigSetting, - [Required, IN, Description ( - "The desired Role of the BootConfigSetting. \n" - "\"IsNext\" updates the ElementSettingData.IsNext " - "property and indicates that the specified " - "BootConfigSetting is to be used in the future when " - "any of its related ComputerSystems are enabled.\n" - "\"IsNextSingleUse\" updates the " - "ElementSettingData.IsNext property. It is similar " - "to IsNext, except the change applies only to the " - "next time a related ComputerSystem is enabled.\n" - "\"IsDefault\" updates the " - "ElementSettingData.IsDefault property to indicate " - "that the BootConfigSetting is identified as the " - "default boot configuration for any of its related " - "ComputerSystems" ), - ValueMap { "0", "1", "2", "3..32767", "32768..65535" }, - Values { "IsNext", "IsNextSingleUse", "IsDefault", - "DMTF Reserved", "Vendor Specified" }] - uint16 Role, - [IN ( false ), OUT, Description ( - "Reference to the job spawned if the operation " - "continues after the method returns. (May be null " - "if the task is completed)." )] - CIM_ConcreteJob REF Job); - - [Description ( - "This method is called to set the role of the " - "BootConfigSetting for a specific ComputerSystem. The " - "method shall update the IsNext or IsDefault property of " - "the ElementSettingData that directly or indirectly " - "associates ScopingComputerSystem and BootConfigSetting. " - "The method may also update the IsNext or IsDefault " - "property of other ElementSettingDatas that reference " - "ScopingComputerSystem to satisfy cardinality " - "constraints." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", - "4097..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", "Busy", "Invalid Reference", - "Invalid Parameter", "Access Denied", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Method Reserved", "Vendor Specified" }] - uint32 SetBootConfigUsage( - [Required, IN, Description ( - "An existing BootConfigSetting instance whose role " - "will be updated." )] - CIM_BootConfigSetting REF BootConfigSetting, - [IN, Description ( - "The ComputerSystem to which the new Role applies. " - "A value of NULL indicates that the Role is to be " - "applied to each ComputerSystem that is directly or " - "indirectly associated to BootConfigSetting." )] - CIM_ComputerSystem REF ScopingComputerSystem, - [Required, IN, Description ( - "The desired Role of the BootConfigSetting.\n" - "\"IsNext\" updates the ElementSettingData.IsNext " - "property and indicates that the specified " - "BootConfigSetting is to be used in the future when " - "ScopingComputerSystem is enabled.\n" - "\"IsNextSingleUse\" updates the " - "ElementSettingData.IsNext property. It is similar " - "to IsNext, except the change applies only to the " - "next time the ScopingComputerSystem is enabled.\n" - "\"IsDefault\" updates the " - "ElementSettingData.IsDefault property to indicate " - "that the BootConfigSetting is identified as the " - "default boot configuration for ScopingComputerSystem\n" - "\"IsNotNext\" removes the IsNext or " - "IsNextSingleUse designation. The ComputerSystem " - "will not be automatically booted the next time it " - "is enabled.\n" - "\"IsDefault\" removes the IsDefault designation." ), - ValueMap { "0", "1", "2", "3", "4", "5..32767", - "32768..65535" }, - Values { "IsNext", "IsNextSingleUse", "IsDefault", - "IsNotNext", "IsNotDefault", "DMTF Reserved", - "Vendor Specified" }] - uint16 Role, - [IN ( false ), OUT, Description ( - "Reference to the job spawned if the operation " - "continues after the method returns. (May be null " - "if the task is completed)." )] - CIM_ConcreteJob REF Job); - - [Description ( - "This method is called to indicate to the referenced " - "ComputerSystem to apply the referenced " - "BootConfigSetting. This shall cause the referenced " - "ComputerSystem\'s boot process to start and apply the " - "referenced BootConfigSetting." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", - "4097..32767", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Unknown/Unspecified Error", "Busy", "Invalid Reference", - "Invalid Parameter", "Access Denied", "DMTF Reserved", - "Method Parameters Checked - Job Started", - "Method Reserved", "Vendor Specified" }] - uint32 ApplyBootConfigSetting( - [Required, IN, Description ( - "Reference to an instance of ComputerSystem which " - "will apply the BootConfigSetting referenced by the " - "ApplyBootConfig parameter. A value of NULL " - "indicates that the ApplyBootConfig is to be " - "applied to each related ComputerSystem." )] - CIM_ComputerSystem REF ScopingComputerSystem, - [Required, IN, Description ( - "Reference to an instance of BootConfigSetting " - "which will be applied to the instance of " - "ComputerSystem referenced by the ComputerSystem " - "parameter." )] - CIM_BootConfigSetting REF ApplyBootConfig, - [IN ( false ), OUT, Description ( - "Reference to the job spawned if the operation " - "continues after the method returns. (May be null " - "if the task is completed)." )] - CIM_ConcreteJob REF Job); - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_BootServiceAccessBySAP.mof b/build/vendor/dmtf_mof/System/CIM_BootServiceAccessBySAP.mof deleted file mode 100644 index 4aef6955..00000000 --- a/build/vendor/dmtf_mof/System/CIM_BootServiceAccessBySAP.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_BootServiceAccessBySAP -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::Boot" ), - Description ( - "BootServiceAccessBySAP is the relationship between a Boot " - "Service and its access points." )] -class CIM_BootServiceAccessBySAP : CIM_ServiceAccessBySAP { - - [Override ( "Antecedent" ), - Description ( "The BootService." )] - CIM_BootService REF Antecedent; - - [Override ( "Dependent" ), - Description ( "An access point for the BootService." )] - CIM_BootSAP REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_BootServiceCapabilities.mof b/build/vendor/dmtf_mof/System/CIM_BootServiceCapabilities.mof deleted file mode 100644 index 69b7ccb1..00000000 --- a/build/vendor/dmtf_mof/System/CIM_BootServiceCapabilities.mof +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::System::Boot" ), - Description ( - "A class derived from Capabilities that describes the boot " - "configuration management aspects of a system." )] -class CIM_BootServiceCapabilities : CIM_EnabledLogicalElementCapabilities { - - [Description ( - "An enumeration indicating the boot related operations " - "that can be applied to a managed element. Since this is " - "an array, multiple values may be specified. The current " - "values in the enumeration are: \n" - "0 = \"Unknown\", indicating that the capabilities are " - "not known at this time. If this value is present in the " - "array, it shall be the only value.\n" - "1 = \"Other\", indicating that a capability not " - "described by another value is present. A description of " - "the capability can be found in the " - "OtherBootConfigCapabilities property. \"Other\" can be " - "present more than once in the BootConfigCapabilities " - "array. \n" - "2 = \"Creates Boot Configuration\", indicating that a " - "boot service can create new boot configuration using an " - "existing boot configuration as a template. \n" - "3 = \"Applies Boot Configuration\", indicating that a " - "boot service can apply the boot configuration of a " - "computer system, without requiring a reset of the the " - "computer system.\n" - "4 = \"Sets Boot Role\", indicating that a boot service " - "can set the role (Default or Next) of a boot " - "configuration that is associated to a one or more " - "computer systems.\n" - "5 = \"Sets Boot Usage\", indicating that a boot service " - "can set or unset the role (Default or Next) of a boot " - "configuration for a specific computer system.\n" - "6 = \"Change Boot Order Method Not Supported\", " - "indicating that a boot service cannot change the boot " - "order using the CIM_BootConfigSetting.ChangeBootOrder() " - "method" ), - ValueMap { "0", "1", "2", "3", "4", "5", "6" }, - Values { "Unknown", "Other", "Creates Boot Configuration", - "Applies Boot Configuration", "Sets Boot Role", - "Sets Boot Usage", "Change Boot Order Not Supported" }, - ModelCorrespondence { - "CIM_BootServiceCapabilities.OtherBootConfigCapabilities" }] - uint16 BootConfigCapabilities[]; - - [Description ( - "A string describing the additional boot configuration " - "capabilities of the element, used when the corresponding " - "BootConfigCapabilities array element is set to the value " - "1, \"Other\".Each element that corresponds to a " - "BootCapabilitiesSupported array element with a value " - "other than 1 \"Other\" shall have a value of NULL." ), - ModelCorrespondence { - "CIM_BootServiceCapabilities.BootConfigCapabilities" }] - string OtherBootConfigCapabilities[]; - - [Description ( - "An enumeration indicating the boot string properties in " - "the CIM_BootSourceSetting which are supported. If the " - "array contains a value, then all the BootSourceSetting " - "instances managed by the service are guaranteed to have " - "a non-null value for the corresponding property.Since " - "this is an array, multiple values may be specified. The " - "values in the enumeration are: \n" - "2 = BootString property supported \n" - "3 = BIOSBootString property supported \n" - "4 = StructureBootString property supported" ), - ValueMap { "2", "3", "4" }, - Values { "BootString", "BIOSBootString", - "StructuredBootString" }, - ModelCorrespondence { "CIM_BootSourceSetting.BootString", - "CIM_BootSourceSetting.BIOSBootString", - "CIM_BootSourceSetting.StructuredBootString" }] - uint16 BootStringsSupported[]; - - [Description ( - "An enumeration indicating boot related capabilities that " - "are not related to showing support for operations of a " - "managed element. Since this is an array, multiple values " - "may be specified. The current values in the enumeration " - "are: \n" - "0 = \"Unknown\", indicating that the capabilities are " - "not known at this time. If this value is present in the " - "array, it shall be the only value.\n" - "1 = \"Other\", indicating that a capability not " - "described by another value is present. A description of " - "the capability can be found in the " - "OtherBootConfigCapabilities property. \"Other\" can be " - "present more than once in the BootCapabilitiesSupported " - "array. \n" - "2 = \"State Data Supported\" indicating that real-time " - "boot related state properties of systems are modeled " - "using \'State\' BootConfigSetting instances. In this " - "methodology, each system shall be associated to a boot " - "configuration representing the boot related state data " - "via SettingsDefineState. All persistent boot " - "configurations shall be related to the \'State\' " - "instance via ElementSettingData associations." ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "Other", "State Data Supported" }] - uint16 BootCapabilitiesSupported[]; - - [Description ( - "A string describing the additional boot capabilities of " - "the element, used when the corresponding " - "BootCapabilitiesSupported array element is set to the " - "value 1, \"Other\". Each element that corresponds to a " - "BootCapabilitiesSupported array element with a value " - "other than 1 \"Other\" shall have a value of NULL." ), - ModelCorrespondence { - "CIM_BootServiceCapabilities.BootCapabilitiesSupported" }] - string OtherBootCapabilitiesSupported[]; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_BootSettingData.mof b/build/vendor/dmtf_mof/System/CIM_BootSettingData.mof deleted file mode 100644 index 54faa024..00000000 --- a/build/vendor/dmtf_mof/System/CIM_BootSettingData.mof +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Abstract, Version ( "2.19.0" ), - UMLPackagePath ( "CIM::System::Boot" ), - Description ( - "BootSettingData is a set of settings that apply to system " - "boot. An example of usage of this class is to hold several " - "BIOS, NVRAM, firmware or system settings, typically seen in " - "the BIOS setup screens. These settings would need to be " - "modified by the system as part of the boot process. Since, it " - "is often not possible to intercept the boot process to apply " - "these settings, users can set these a priori in the instance " - "associated with the selected BootSourceSetting, thereby " - "instructing the system to apply them during the next system " - "reboot." )] -class CIM_BootSettingData : CIM_SettingData { - - [Description ( - "OwningEntity identifies the vendor or organization that " - "defines the contained boot settings. In order to ensure " - "uniqueness, the value of OwningEntity MUST be " - "constructed using the following algorithm: \n" - "[:] \n" - "where MUST include a copyrighted, trademarked or " - "otherwise unique name that is owned by the entity " - "creating/defining the BootSettingData, or is a " - "registered ID that is assigned to the entity by a " - "recognized global authority (This is similar to the " - "_ structure of Schema class " - "names.) In addition, MUST NOT contain a colon " - "(\':\'). \n" - " is optional and, when used, MUST be unique " - "within the scope of the . When a is " - "present, a colon MUST appear between and " - ". For DMTF defined instances, the algorithm " - "MUST be used with the set to \'CIM\'." )] - string OwningEntity; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_BootSourceSetting.mof b/build/vendor/dmtf_mof/System/CIM_BootSourceSetting.mof deleted file mode 100644 index d4d8ee2b..00000000 --- a/build/vendor/dmtf_mof/System/CIM_BootSourceSetting.mof +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::System::Boot" ), - Description ( - "A class derived from SettingData that provides the information " - "necessary to describe a boot source. This may be optionally " - "associated to a bootable logical device, such as a hard disk " - "partition, or a network device. The information from this " - "class instance is used by the boot manager, such as BIOS/EFI " - "or OS Loader to initiate the boot process, when this instance " - "appears in a BootConfigSetting collection." )] -class CIM_BootSourceSetting : CIM_SettingData { - - [Description ( - "A string identifying the boot source. It is typically " - "used by the instrumentation to pass to the boot manager " - "as a selection string. This could be a string " - "identifying the bootable device, such as \"CDROM 1\", or " - "could be an implementation specific address of a " - "bootable partition, such as the following. \"fd(64)unix " - "root=hd(40) swap=hd(41)\", or " - "\"multi(0)disk(0)rdisk(0)partition(1)\\WINDOWS=\"Microsoft " - "Windows XP Professional\"\"." )] - string BootString; - - [Description ( - "A string identifying the boot source which corresponds " - "to the string used by the BIOS to uniquely name the boot " - "source. For example, in systems which implement the BIOS " - "Boot Specification, the string could correspond to the " - "descString string for entries in the IPL Table or BCV " - "Table." )] - string BIOSBootString; - - [Description ( - "A string identifying the boot source using the format " - "\"::\", in which neither " - ", or contains a colon (\":\"). " - "The value of is a copyrighted, trademarked or " - "otherwise unique name that is owned by the entity " - "defining the , or is a registered ID that is " - "assigned to the entity by a recognized global authority. " - "For DMTF defined identifiers, the is set to " - "\'CIM\'. The are \"Floppy\", \"Hard-Disk\", " - "\"CD/DVD\", \"Network\", \"PCMCIA\", \"USB\". The value " - "of shall be a non-zero integer." )] - string StructuredBootString; - - [Description ( - "An enumeration indicating the behavior when the attempt " - "to boot using the boot source fails (no media, timeout). " - "The current values in the enumeration are: \n" - "0 = Unknown \n" - "1 = Is Supported \n" - "2 = Is Not Supported. \n" - "A value of 1 (Is Supported) indicates that next boot " - "source the boot order is used. A value of 2 (Is Not " - "Supported) indicates that the boot order is terminated " - "and no other boot sources associated to the same " - "CIM_BootConfigSetting are used). The default is 1 (Is " - "Supported)" ), - ValueMap { "0", "1", "2" }, - Values { "Unknown", "Is Supported", "Not Supported" }] - uint16 FailThroughSupported; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_Cluster.mof b/build/vendor/dmtf_mof/System/CIM_Cluster.mof deleted file mode 100644 index 341799d3..00000000 --- a/build/vendor/dmtf_mof/System/CIM_Cluster.mof +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Cluster -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::SystemElements" ), - Description ( - "A class derived from ComputerSystem that \'is made up of\' two " - "or more ComputerSystems which operate together as an atomic, " - "functional whole to increase the performance, resources and/or " - "RAS (Reliability, Availability and Serviceability) of the " - "component ComputerSystems, related to some aspects of these " - "ComputerSystems." )] -class CIM_Cluster : CIM_ComputerSystem { - - [Description ( - "Interconnect is a free form string that describes the " - "interconnection mechanism for the Cluster." )] - string Interconnect; - - [Description ( - "InterconnectAddress indicates the address of the Cluster " - "System, which is dependent on the interconnection " - "scheme. If no address is available or applicable, a null " - "string should be used." )] - string InterconnectAddress; - - [Description ( - "The cluster types. This specifies whether the cluster is " - "for failover (value=2), performance (3), etc. The values " - "which can be specified are not mutually exclusive. Thus, " - "Types is an array." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6" }, - Values { "Unknown", "Other", "Failover", "Performance", - "Distributed OS", "Node Grouping", "SysPlex" }] - uint16 Types[]; - - [Description ( - "Indicates the maximum number of nodes that may " - "participate in the Cluster. If unlimited, enter 0." )] - uint32 MaxNumberOfNodes; - - [Description ( - "Indicates the state of the Cluster. The cluster can be " - "defined to be on-line (value=2), off-line (3), in a " - "degraded mode of operation (4) or unavailable (5)." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "On-line", "Off-line", - "Degraded", "Unavailable" }] - uint16 ClusterState; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_ClusterServiceAccessBySAP.mof b/build/vendor/dmtf_mof/System/CIM_ClusterServiceAccessBySAP.mof deleted file mode 100644 index a1b1f9c1..00000000 --- a/build/vendor/dmtf_mof/System/CIM_ClusterServiceAccessBySAP.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ClusterServiceAccessBySAP -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::SystemElements" ), - Description ( - "ClusterServiceAccessBySAP is the relationship between a " - "ClusteringService and its access points." )] -class CIM_ClusterServiceAccessBySAP : CIM_ServiceAccessBySAP { - - [Override ( "Antecedent" ), - Description ( "The ClusteringService." )] - CIM_ClusteringService REF Antecedent; - - [Override ( "Dependent" ), - Description ( "An access point for the ClusteringService." )] - CIM_ClusteringSAP REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_ClusteringSAP.mof b/build/vendor/dmtf_mof/System/CIM_ClusteringSAP.mof deleted file mode 100644 index b83f0fab..00000000 --- a/build/vendor/dmtf_mof/System/CIM_ClusteringSAP.mof +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ClusteringSAP -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::SystemElements" ), - Description ( - "A representation of the access points of a ClusteringService." )] -class CIM_ClusteringSAP : CIM_ServiceAccessPoint { - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_ClusteringService.mof b/build/vendor/dmtf_mof/System/CIM_ClusteringService.mof deleted file mode 100644 index 067de914..00000000 --- a/build/vendor/dmtf_mof/System/CIM_ClusteringService.mof +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ClusteringService -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::System::SystemElements" ), - Description ( - "ClusteringService represents the functionality provided by a " - "Cluster. For example, failover functionality may be modeled as " - "a Service of a failover Cluster." )] -class CIM_ClusteringService : CIM_Service { - - - [Description ( - "AddNode brings a new ComputerSystem into a Cluster. The " - "node to be added is specified as a parameter to the " - "method. The return value should be 0 if the Computer " - "System is successfully added, 1 if the method is not " - "supported and any other number if an error occurred. In " - "a subclass, the set of possible return codes could be " - "specified, using a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \'translated\' " - "may also be specified in the subclass as a Values array " - "qualifier." )] - uint32 AddNode( - [IN, Description ( "The node to add to the cluster." )] - CIM_ComputerSystem REF CS); - - [Description ( - "EvictNode removes a ComputerSystem from a Cluster. The " - "node to be evicted is specified as a parameter to the " - "method. The return value should be 0 if the " - "ComputerSystem is successfully evicted, 1 if the method " - "is not supported and any other number if an error " - "occurred. In a subclass, the set of possible return " - "codes could be specified, using a ValueMap qualifier on " - "the method. The strings to which the ValueMap contents " - "are \'translated\' may also be specified in the subclass " - "as a Values array qualifier." )] - uint32 EvictNode( - [IN, Description ( - "The node to remove from the cluster." )] - CIM_ComputerSystem REF CS); - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_ComponentCS.mof b/build/vendor/dmtf_mof/System/CIM_ComponentCS.mof deleted file mode 100644 index dad151e9..00000000 --- a/build/vendor/dmtf_mof/System/CIM_ComponentCS.mof +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Errata to add MAX(1) -// qualifier to GroupComponent. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ComponentCS -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.13.0" ), - UMLPackagePath ( "CIM::System::SystemElements" ), - Description ( - "A ComputerSystem can aggregate another ComputerSystem. This " - "association can be used to model MPP Systems with workstation " - "frontends, an I2O subsystem embedded in a Unitary " - "ComputerSystem, or a System that splits functionality between " - "two processors, potentially running different Operating " - "Systems. For example, if a CISC Processor and its associated " - "OperatingSystem, are used for user interface and file support, " - "and a RISC Processor and its OS are used for complex " - "mathematical operations, this could be modeled as two " - "ComputerSystems where one aggregates the other. In some cases, " - "this could be modeled as a Cluster. The difference is the " - "focus of the relationship. ComponentCS represents that unique " - "and distinct ComputerSystems are aggregated by a higher level " - "CS object. However, each of the component CSs are still " - "distinguishable entities and are only viewed as such. " - "Alternately, with a Cluster, the ComputerSystems that " - "participate in it are inconsequential, when viewed through the " - "\'Cluster System\'. \n" - "\n" - "When instantiating or subclassing the ComponentCS " - "relationship, care should be taken that the component " - "ComputerSystem meets the definitional requirements of a " - "ComputerSystem - ie, a functional whole that provides compute " - "capabilities and aggregates System Devices, an " - "OperatingSystem, etc." )] -class CIM_ComponentCS : CIM_SystemComponent { - - [Aggregate, Override ( "GroupComponent" ), - MAX ( 1 ), - Description ( - "The ComputerSystem that contains and/or aggregates other Systems." - )] - CIM_ComputerSystem REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The contained (Sub)ComputerSystem." )] - CIM_ComputerSystem REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_ComputerSystem.mof b/build/vendor/dmtf_mof/System/CIM_ComputerSystem.mof deleted file mode 100644 index 4cc73da6..00000000 --- a/build/vendor/dmtf_mof/System/CIM_ComputerSystem.mof +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.24.0" ), - UMLPackagePath ( "CIM::System::SystemElements" ), - Description ( - "A class derived from System that is a special collection of " - "ManagedSystemElements. This collection is related to the " - "providing of compute capabilities and MAY serve as an " - "aggregation point to associate one or more of the following " - "elements: FileSystem, OperatingSystem, Processor and Memory " - "(Volatile and/or NonVolatile Storage)." )] -class CIM_ComputerSystem : CIM_System { - - [Override ( "NameFormat" ), - Description ( - "The ComputerSystem object and its derivatives are Top " - "Level Objects of CIM. They provide the scope for " - "numerous components. Having unique System keys is " - "required. The NameFormat property identifies how the " - "ComputerSystem Name is generated. The NameFormat " - "ValueMap qualifier defines the various mechanisms for " - "assigning the name. Note that another name can be " - "assigned and used for the ComputerSystem that better " - "suit a business, using the inherited ElementName " - "property." ), - ValueMap { "Other", "IP", "Dial", "HID", "NWA", "HWA", "X25", - "ISDN", "IPX", "DCC", "ICD", "E.164", "SNA", "OID/OSI", - "WWN", "NAA" }] - string NameFormat; - - [Description ( - "Enumeration indicating the purpose(s) to which the " - "ComputerSystem is dedicated, if any, and what " - "functionality is provided. For example, one could " - "specify that the System is dedicated to \"Print\" " - "(value=11) or acts as a \"Hub\" (value=8). \n" - "Also, one could indicate that this is a general purpose " - "system by indicating \'Not Dedicated\' (value=0) but " - "that it also hosts \'Print\' (value=11) or mobile phone " - "\'Mobile User Device\' (value=17) services. \n" - "A clarification is needed with respect to the value 17 " - "(\"Mobile User Device\"). An example of a dedicated user " - "device is a mobile phone or a barcode scanner in a store " - "that communicates via radio frequency. These systems are " - "quite limited in functionality and programmability, and " - "are not considered \'general purpose\' computing " - "platforms. Alternately, an example of a mobile system " - "that is \'general purpose\' (i.e., is NOT dedicated) is " - "a hand-held computer. Although limited in its " - "programmability, new software can be downloaded and its " - "functionality expanded by the user. \n" - "A value of \"Management\" indicates this instance is " - "dedicated to hosting system management software.\n" - "A value of \"Management Controller\" indicates this " - "instance represents specialized hardware dedicated to " - "systems management (i.e., a Baseboard Management " - "Controller (BMC) or service processor).\n" - "The management scope of a \"Management Controller\" is " - "typically a single managed system in which it is contained.\n" - "A value of \"Chassis Manager\" indicates this instance " - "represents a system dedicated to management of a blade " - "chassis and its contained devices. This value would be " - "used to represent a Shelf Controller. A \"Chassis " - "Manager\" is an aggregation point for management and may " - "rely on subordinate management controllers for the " - "management of constituent parts. A value of \"Host-based " - "RAID Controller\" indicates this instance represents a " - "RAID storage controller contained within a host " - "computer. A value of \"Storage Device Enclosure\" " - "indicates this instance represents an enclosure that " - "contains storage devices. A \"Virtual Tape Library\" is " - "the emulation of a tape library by a Virtual Library " - "System. A \"Virtual Library System\" uses disk storage " - "to emulate tape libraries.A \"FC Switch\" indicates this " - "instance is dedicated to switching layer 2 fibre channel " - "frames. An \"Ethernet Switch\" indicates this instance " - "is dedicated to switching layer 2 ethernet frames." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26", "27", - "28", "29", "30", "31", "32", "33", "34", "35", "36", - "37", "38", "..", "32568..65535" }, - Values { "Not Dedicated", "Unknown", "Other", "Storage", - "Router", "Switch", "Layer 3 Switch", - "Central Office Switch", "Hub", "Access Server", - "Firewall", "Print", "I/O", "Web Caching", "Management", - "Block Server", "File Server", "Mobile User Device", - "Repeater", "Bridge/Extender", "Gateway", - "Storage Virtualizer", "Media Library", "ExtenderNode", - "NAS Head", "Self-contained NAS", "UPS", "IP Phone", - "Management Controller", "Chassis Manager", - "Host-based RAID controller", "Storage Device Enclosure", - "Desktop", "Laptop", "Virtual Tape Library", - "Virtual Library System", "Network PC/Thin Client", - "FC Switch", "Ethernet Switch", "DMTF Reserved", - "Vendor Reserved" }, - ArrayType ( "Indexed" ), - MappingStrings { "MIB.IETF|MIB-II.sysServices", - "FC-GS.INCITS-T11 | Platform | PlatformType" }, - ModelCorrespondence { - "CIM_ComputerSystem.OtherDedicatedDescriptions" }] - uint16 Dedicated[]; - - [Description ( - "A string describing how or why the system is dedicated " - "when the Dedicated array includes the value 2, \"Other\"." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_ComputerSystem.Dedicated" }] - string OtherDedicatedDescriptions[]; - - [Description ( - "If enabled (value = 4), the ComputerSystem can be reset " - "via hardware (e.g. the power and reset buttons). If " - "disabled (value = 3), hardware reset is not allowed. In " - "addition to Enabled and Disabled, other Values for the " - "property are also defined - \"Not Implemented\" (5), " - "\"Other\" (1) and \"Unknown\" (2)." ), - ValueMap { "1", "2", "3", "4", "5" }, - Values { "Other", "Unknown", "Disabled", "Enabled", - "Not Implemented" }, - MappingStrings { "MIF.DMTF|System Hardware Security|001.4" }] - uint16 ResetCapability; - - [Deprecated { - "CIM_PowerManagementCapabilities.PowerCapabilities" }, - Description ( - "An enumerated array describing the power management " - "capabilities of the ComputerSystem. The use of this " - "property has been deprecated. Instead, the Power " - "Capabilites property in an associated PowerManagement " - "Capabilities class should be used." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7" }, - Values { "Unknown", "Not Supported", "Disabled", "Enabled", - "Power Saving Modes Entered Automatically", - "Power State Settable", "Power Cycling Supported", - "Timed Power On Supported" }, - MappingStrings { "MIF.DMTF|System Power Controls|001.2" }] - uint16 PowerManagementCapabilities[]; - - - [Deprecated { "CIM_PowerManagementService.SetPowerState" }, - Description ( - "Sets the power state of the computer. The use of this " - "method has been deprecated. Instead, use the " - "SetPowerState method in the associated " - "PowerManagementService class." )] - uint32 SetPowerState( - [IN, Description ( - "The Desired state for the COmputerSystem." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Full Power", "Power Save - Low Power Mode", - "Power Save - Standby", "Power Save - Other", - "Power Cycle", "Power Off", "Hibernate", "Soft Off" }] - uint32 PowerState, - [IN, Description ( - "Time indicates when the power state should be set, " - "either as a regular date-time value or as an " - "interval value (where the interval begins when the " - "method invocation is received." )] - datetime Time); - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_ComputerSystemDMA.mof b/build/vendor/dmtf_mof/System/CIM_ComputerSystemDMA.mof deleted file mode 100644 index 207e17cc..00000000 --- a/build/vendor/dmtf_mof/System/CIM_ComputerSystemDMA.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ComputerSystemDMA -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::System::SystemResources" ), - Description ( - "An association between a ComputerSystem and the DMA channels " - "available on it." )] -class CIM_ComputerSystemDMA : CIM_ComputerSystemResource { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The ComputerSystem." )] - CIM_ComputerSystem REF GroupComponent; - - [Override ( "PartComponent" ), - Weak, Description ( "A DMA channel of the ComputerSystem." )] - CIM_DMA REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_ComputerSystemIRQ.mof b/build/vendor/dmtf_mof/System/CIM_ComputerSystemIRQ.mof deleted file mode 100644 index e54318ad..00000000 --- a/build/vendor/dmtf_mof/System/CIM_ComputerSystemIRQ.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ComputerSystemIRQ -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::System::SystemResources" ), - Description ( - "An association between a ComputerSystem and the IRQs available on it." - )] -class CIM_ComputerSystemIRQ : CIM_ComputerSystemResource { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The ComputerSystem." )] - CIM_ComputerSystem REF GroupComponent; - - [Override ( "PartComponent" ), - Weak, Description ( "An IRQ of the ComputerSystem." )] - CIM_IRQ REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_ComputerSystemMappedIO.mof b/build/vendor/dmtf_mof/System/CIM_ComputerSystemMappedIO.mof deleted file mode 100644 index 06d9ba70..00000000 --- a/build/vendor/dmtf_mof/System/CIM_ComputerSystemMappedIO.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ComputerSystemMappedIO -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::System::SystemResources" ), - Description ( - "An association between a ComputerSystem and the Memory Mapped " - "I/O ports available on it." )] -class CIM_ComputerSystemMappedIO : CIM_ComputerSystemResource { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The ComputerSystem." )] - CIM_ComputerSystem REF GroupComponent; - - [Override ( "PartComponent" ), - Weak, Description ( - "A memory mapped I/O port of the ComputerSystem." )] - CIM_MemoryMappedIO REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_ComputerSystemNodeCapabilities.mof b/build/vendor/dmtf_mof/System/CIM_ComputerSystemNodeCapabilities.mof deleted file mode 100644 index f66d0f0a..00000000 --- a/build/vendor/dmtf_mof/System/CIM_ComputerSystemNodeCapabilities.mof +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ComputerSystemNodeCapabilities -// ================================================================== - [Version ( "2.7.2" ), - UMLPackagePath ( "CIM::System::SystemElements" ), - Description ( - "Indicates general capabilities of a ComputerSystem node, such " - "as the ability to support a battery (and be portable), and ECC " - "memory. To tie these capabilities to a ComputerSystem " - "instance, the ElementCapabilities association is used." )] -class CIM_ComputerSystemNodeCapabilities : CIM_Capabilities { - - [Required, Description ( - "Enumeration indicating whether a battery is installable/ " - "supportable on this System. This is independent of " - "whether one is currently installed. The latter is " - "indicated by an instance of the CIM_Battery class " - "associated using the SystemDevice relationship." ), - ValueMap { "0", "2", "3" }, - Values { "Unknown", "Battery Supported", - "Battery Not Supported" }] - uint16 BatterySupported; - - [Required, Description ( - "Enumeration indicating whether ECC single or multi-bit " - "memory is supported on this node. This is independent of " - "whether ECC memory is actually installed. The latter is " - "indicated by an instance of CIM_PhysicalMemory that " - "\'Realizes\' the CIM_Memory of the System (associated " - "using SystemDevice)." ), - ValueMap { "0", "2", "3" }, - Values { "Unknown", "Single-bit ECC", "Multi-bit ECC" }, - MappingStrings { "MIF.DMTF|Physical Memory|002.10" }] - uint16 ECCSupported; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_ComputerSystemPackage.mof b/build/vendor/dmtf_mof/System/CIM_ComputerSystemPackage.mof deleted file mode 100644 index 7903ad27..00000000 --- a/build/vendor/dmtf_mof/System/CIM_ComputerSystemPackage.mof +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Remove reference to -// UnitaryComputerSystem. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ComputerSystemPackage -// ================================================================== - [Association, Version ( "2.13.0" ), - UMLPackagePath ( "CIM::System::SystemElements" ), - Description ( - "Similar to the way that LogicalDevices are \'Realized\' by " - "PhysicalElements, ComputerSystem may be realized realized in " - "one or more PhysicalPackages. The ComputerSystemPackage " - "association explicitly defines this relationship." )] -class CIM_ComputerSystemPackage : CIM_SystemPackaging { - - [Override ( "Antecedent" ), - Description ( - "The PhysicalPackage(s) that realize a Unitary ComputerSystem." - )] - CIM_PhysicalPackage REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The UnitaryComputerSystem." )] - CIM_ComputerSystem REF Dependent; - - [Description ( - "A Gloabally Unique Identifier for the System\'s Package." )] - string PlatformGUID; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_ComputerSystemResource.mof b/build/vendor/dmtf_mof/System/CIM_ComputerSystemResource.mof deleted file mode 100644 index 4141fd4c..00000000 --- a/build/vendor/dmtf_mof/System/CIM_ComputerSystemResource.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ComputerSystemResource -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::System::SystemResources" ), - Description ( - "An association between a ComputerSystem and the System " - "Resources available on it." )] -class CIM_ComputerSystemResource : CIM_ResourceOfSystem { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The ComputerSystem." )] - CIM_ComputerSystem REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "A SystemResource of the ComputerSystem." )] - CIM_SystemResource REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_CorrespondingSettingDataRecord.mof b/build/vendor/dmtf_mof/System/CIM_CorrespondingSettingDataRecord.mof deleted file mode 100644 index 807db3a7..00000000 --- a/build/vendor/dmtf_mof/System/CIM_CorrespondingSettingDataRecord.mof +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Association, Version ( "2.22.0" ), - UMLPackagePath ( "CIM::System::Diagnostics" ), - Description ( - "CorrespondingSettingDataRecord is used to tie a log record to " - "its corresponding setting data record." )] -class CIM_CorrespondingSettingDataRecord { - - [Key, Description ( "The record containing the result data." )] - CIM_DiagnosticRecord REF DataRecord; - - [Key, Description ( - "The record containing the DiagnosticSettingData that " - "were used when the result was created." )] - CIM_DiagnosticSettingDataRecord REF SettingsRecord; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_CorrespondingSettingsRecord.mof b/build/vendor/dmtf_mof/System/CIM_CorrespondingSettingsRecord.mof deleted file mode 100644 index 5eed4458..00000000 --- a/build/vendor/dmtf_mof/System/CIM_CorrespondingSettingsRecord.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_CorrespondingSettingsRecord -// ================================================================== - [Association, Version ( "2.9.0" ), - UMLPackagePath ( "CIM::System::Diagnostics" ), - Description ( - "CorrespondingSettingsRecord is used to tie a log record to its " - "corresponding setting data record." )] -class CIM_CorrespondingSettingsRecord { - - [Key, Description ( "The record containing the result data." )] - CIM_DiagnosticRecord REF DataRecord; - - [Key, Description ( - "The record containing the DiagnosticSetting data that " - "were used when the result was created." )] - CIM_DiagnosticSettingRecord REF SettingsRecord; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DMA.mof b/build/vendor/dmtf_mof/System/CIM_DMA.mof deleted file mode 100644 index ea8b2aee..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DMA.mof +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DMA -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::SystemResources" ), - Description ( "Personal computer architecture DMA." )] -class CIM_DMA : CIM_SystemResource { - - [Key, Description ( - "The scoping ComputerSystem\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_ComputerSystem.CreationClassName" )] - string CSCreationClassName; - - [Key, Description ( "The scoping ComputerSystem\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_ComputerSystem.Name" )] - string CSName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Description ( - "A part of the object\'s key value, the DMA Channel number." - ), - MappingStrings { "MIF.DMTF|DMA|001.1" }] - uint32 DMAChannel; - - [Description ( "Availability of the DMA." ), - ValueMap { "1", "2", "3", "4", "5" }, - Values { "Other", "Unknown", "Available", - "In Use/Not Available", "In Use and Available/Shareable" }, - MappingStrings { "MIF.DMTF|DMA|001.2" }] - uint16 Availability; - - [Description ( - "Indication that the DMA Channel supports burst mode." ), - MappingStrings { "MIF.DMTF|DMA|001.3" }] - boolean BurstMode; - - [Description ( - "An array indicating all the transfer widths (in bits) " - "supported by this DMA Channel. Permissible values are 8, " - "16, 32, 64 or 128 bits. If unknown, enter 0." ), - Units ( "Bits" ), - ValueMap { "0", "8", "16", "32", "64", "128" }, - MappingStrings { "MIF.DMTF|System Resource DMA Info|001.2" }] - uint16 TransferWidths[]; - - [Description ( - "An integer indicating the DMA Channel address size in " - "bits. Permissible values are 8, 16, 32 or 64 bits. If " - "unknown, enter 0." ), - Units ( "Bits" ), - ValueMap { "0", "8", "16", "32", "64" }, - MappingStrings { "MIF.DMTF|System Resource DMA Info|001.3" }] - uint16 AddressSize; - - [Description ( - "The maximum number of bytes that can be transferred by " - "this DMA Channel. If unknown, enter 0." ), - Units ( "Bytes" ), - MappingStrings { "MIF.DMTF|System Resource DMA Info|001.4" }] - uint32 MaxTransferSize; - - [Description ( - "Indicates whether DMA may execute in \'count by byte\' " - "mode (value=4) or not (value=3). Also, \"Other\" (1) and " - "\"Unknown\" (2) may be defined." ), - ValueMap { "1", "2", "3", "4" }, - Values { "Other", "Unknown", - "Not execute in \'count by byte\' mode", - "Execute in \'count by byte\' mode" }, - MappingStrings { "MIF.DMTF|System Resource DMA Info|001.7" }] - uint16 ByteMode; - - [Description ( - "Indicates whether DMA may execute in \'count by word\' " - "mode (value=4) or not (value=3). Also, \"Other\" (1) and " - "\"Unknown\" (2) may be defined." ), - ValueMap { "1", "2", "3", "4" }, - Values { "Other", "Unknown", - "Not execute in \'count by word\' mode", - "Execute in \'count by word\' mode" }, - MappingStrings { "MIF.DMTF|System Resource DMA Info|001.8" }] - uint16 WordMode; - - [Description ( - "DMA channel timing. For example, \"Type A\" (value =4) " - "or \"Type F\" (6) could be specified." ), - ValueMap { "1", "2", "3", "4", "5", "6" }, - Values { "Other", "Unknown", "ISA Compatible", "Type A", - "Type B", "Type F" }, - MappingStrings { "MIF.DMTF|System Resource DMA Info|001.9" }] - uint16 ChannelTiming; - - [Description ( - "Indicates whether C type (burst) timing is supported " - "(value=5) or not (value=4). Also, \"Other\" (1), " - "\"Unknown\" (2) and \"ISA Compatible\" (3) are defined." ), - ValueMap { "1", "2", "3", "4", "5" }, - Values { "Other", "Unknown", "ISA Compatible", - "Not Supported", "Supported" }, - MappingStrings { "MIF.DMTF|System Resource DMA Info|001.10" }] - uint16 TypeCTiming; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DataFile.mof b/build/vendor/dmtf_mof/System/CIM_DataFile.mof deleted file mode 100644 index 522c5764..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DataFile.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DataFile -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::FileElements" ), - Description ( - "DataFile is a type of LogicalFile that is a named collection " - "of data or executable code." )] -class CIM_DataFile : CIM_LogicalFile { - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DeviceAccessedByFile.mof b/build/vendor/dmtf_mof/System/CIM_DeviceAccessedByFile.mof deleted file mode 100644 index fe688c53..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DeviceAccessedByFile.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DeviceAccessedByFile -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::FileElements" ), - Description ( - "Specifies the LogicalDevice that is associated with, and " - "accessed using the referenced DeviceFile." )] -class CIM_DeviceAccessedByFile : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The DeviceFile." )] - CIM_DeviceFile REF Antecedent; - - [Override ( "Dependent" ), - Max ( 1 ), - Description ( - "The Device that is accessed using the DeviceFile." )] - CIM_LogicalDevice REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DeviceFile.mof b/build/vendor/dmtf_mof/System/CIM_DeviceFile.mof deleted file mode 100644 index dd8a544a..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DeviceFile.mof +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DeviceFile -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::FileElements" ), - Description ( - "DeviceFile is a special type of LogicalFile that represents a " - "Device. This convention is useful for some operating systems " - "that manage devices using a byte stream I/O model. The Logical " - "Device that is associated with this file is specified using " - "the DeviceAccessedByFile relationship." )] -class CIM_DeviceFile : CIM_LogicalFile { - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DiagnosticCompletionRecord.mof b/build/vendor/dmtf_mof/System/CIM_DiagnosticCompletionRecord.mof deleted file mode 100644 index 23099de9..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DiagnosticCompletionRecord.mof +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.11.0" ), - UMLPackagePath ( "CIM::System::Diagnostics" ), - Description ( - "When a DiagnosticService has completed, results generated by " - "the service will be recorded in a DiagnosticCompletionRecord " - "object. This class is used when a DiagnosticRecord.RecordType " - "value = \"Results\", to contain completion information." )] -class CIM_DiagnosticCompletionRecord : CIM_DiagnosticServiceRecord { - - [Description ( - "This property is used when a DiagnosticRecord.RecordType " - "value = \"Results\", to record how the test has " - "completed. It is expected that additional " - "DiagnosticServiceRecords of RecordType \"Service " - "Errors\", \"Warning\" or \"Device Errors\" would be " - "created by the test to describe the details of a " - "\"Warning\", \"Incomplete\" or \"Failed\" " - "CompletionState, respectively. \n" - "\" Stopped\" and \"Aborted\" are similar, although the " - "former implies a clean and orderly stop, while the " - "latter implies an abrupt stop where the element\'s state " - "and configuration may need to be updated. \n" - "\"Warning\" means the element had a problem but did not " - "fail the test. \n" - "\"Failed\" and \"Incomplete\" are similar, although the " - "former means the test on the element failed, while the " - "latter means the test itself had a problem and could not " - "complete execution." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7" }, - Values { "Unknown", "Other", "OK", "Warning", "Incomplete", - "Failed", "Aborted", "Stopped" }, - ModelCorrespondence { - "CIM_DiagnosticCompletionRecord.OtherCompletionStateDescription" }] - uint16 CompletionState; - - [Description ( - "When \"Other\" (value=1) is entered in the " - "CompletionState property, " - "OtherCompletionStateDescription can be used to describe " - "the test\'s state." ), - ModelCorrespondence { - "CIM_DiagnosticCompletionRecord.CompletionState" }] - string OtherCompletionStateDescription; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DiagnosticLog.mof b/build/vendor/dmtf_mof/System/CIM_DiagnosticLog.mof deleted file mode 100644 index 8403074d..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DiagnosticLog.mof +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::System::Logs" ), - Description ( - "DiagnosticLog serves as an aggregation point for " - "DiagnosticRecord objects. This class exists in order to " - "encourage the use of a consolidated record management " - "methodology for diagnostics. A common set of providers for " - "this log and its associated records SHOULD be used to control " - "functions such as record persistence, query support and " - "overall data integrity in a consistent manner." )] -class CIM_DiagnosticLog : CIM_RecordLog { - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DiagnosticRecord.mof b/build/vendor/dmtf_mof/System/CIM_DiagnosticRecord.mof deleted file mode 100644 index 7180cf79..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DiagnosticRecord.mof +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::System::Diagnostics" ), - Description ( - "Data related to Diagnostics may be recorded in various " - "DiagnosticRecord objects. The type of information that is " - "recorded in a log is specified via the LogOptions property in " - "DiagnosticSetting." )] -class CIM_DiagnosticRecord : CIM_RecordForLog { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. In order to ensure uniqueness within the " - "NameSpace, the value of InstanceID SHOULD be constructed " - "using the following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon " - "\':\', and where MUST include a copyrighted, " - "trademarked or otherwise unique name that is owned by " - "the business entity creating/defining the InstanceID, or " - "is a registered ID that is assigned to the business " - "entity by a recognized global authority (This is similar " - "to the _ structure of Schema " - "class names.) In addition, to ensure uniqueness " - "MUST NOT contain a colon (\':\'). When using this " - "algorithm, the first colon to appear in InstanceID MUST " - "appear between and . \n" - " is chosen by the business entity and SHOULD " - "not be re-used to identify different underlying " - "(real-world) elements. If the above \'preferred\' " - "algorithm is not used, the defining entity MUST assure " - "that the resultant InstanceID is not re-used across any " - "InstanceIDs produced by this or other providers for this " - "instance\'s NameSpace. \n" - "For DMTF defined instances, the \'preferred\' algorithm " - "MUST be used with the set to \'CIM\'." )] - string InstanceID; - - [Required, Description ( - "This property should reflect the value of the underlying " - "DiagnosticService.Name property." ), - ModelCorrespondence { "CIM_DiagnosticService.Name" }] - string ServiceName; - - [Required, Description ( - "This property SHOULD reflect the value of the underlying " - "ManagedElement.ElementName property." ), - ModelCorrespondence { "CIM_ManagedElement.ElementName" }] - string ManagedElementName; - - [Description ( - "The date and time that the record instance should be " - "deleted. The expiration datetime SHOULD be set when the " - "record is fully populated with record data. The value " - "SHOULD be calculated using the ResultPersistence " - "property of the DiagnosticSetting class. Once the " - "Expiration Date has been reached, record instances " - "SHOULD be deleted as soon as possible.\n" - "If a ResultPersistence value is not provided, records " - "MAY be deleted at any time." ), - ModelCorrespondence { - "CIM_DiagnosticSetting.ResultPersistence" }] - datetime ExpirationDate; - - [Description ( - "The RecordType property specifies the nature of the data " - "being entered into the ServiceRecord. The value in this " - "property should match one of the values indicated by the " - "DiagnosticSetting.LogOptions property. A brief summary " - "of the various log options can be found in " - "CIM_DiagnosticSetting.LogOptions." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14" }, - Values { "Unknown", "Other", "Results", "Subtests", - "Actions", "Warnings", "Status", "Device Errors", - "Service Errors", "Setting Data", "Statistics", - "Hardware Configuration", "Software Configuration", - "References", "Debug" }, - ModelCorrespondence { "CIM_DiagnosticSetting.LogOptions", - "CIM_DiagnosticRecord.OtherRecordTypeDescription" }] - uint16 RecordType; - - [Description ( - "When \"Other\" (value=1) is entered in the RecordType " - "property, OtherRecordTypeDescription can be used to " - "describe the message type." ), - ModelCorrespondence { - "CIM_DiagnosticSetting.OtherLogOptionsDescriptions", - "CIM_DiagnosticRecord.RecordType" }] - string OtherRecordTypeDescription; - - [Description ( - "A timestamp indicating when the record was created." )] - datetime CreationTimeStamp; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DiagnosticResult.mof b/build/vendor/dmtf_mof/System/CIM_DiagnosticResult.mof deleted file mode 100644 index 7df2d523..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DiagnosticResult.mof +++ /dev/null @@ -1,302 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DiagnosticResult -// ================================================================== - [Deprecated { "CIM_DiagnosticServiceRecord" }, - Version ( "2.7.0" ), - UMLPackagePath ( "CIM::System::Diagnostics" ), - Description ( - "When a DiagnosticTest Service is running, test results are " - "reported using a DiagnosticResult object, or one of its " - "subclasses. A DiagnosticTest may be running because its " - "Service is Started or due to an invocation of the RunTest " - "method. Diagnostic Results are related to their Test via an " - "instance of the DiagnosticResultsForMSE association. \n" - "For every running of DiagnosticTest, a new instance of " - "DiagnosticResult, or one of it\'s subclasses should be " - "created." )] -class CIM_DiagnosticResult { - - [Deprecated { "No Value" }, - Key, Description ( "The scoping Test\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_DiagnosticTest.CreationClassName" )] - string DiagnosticCreationClassName; - - [Deprecated { "No Value" }, - Key, Description ( "The scoping Test\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_DiagnosticTest.Name" )] - string DiagnosticName; - - [Deprecated { "No Value" }, - Key, Description ( - "The scoping Test\'s SystemCreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_DiagnosticTest.SystemCreationClassName" )] - string DiagSystemCreationClassName; - - [Deprecated { "No Value" }, - Key, Description ( "The scoping Test\'s SystemName." ), - MaxLen ( 256 ), - Propagated ( "CIM_DiagnosticTest.SystemName" )] - string DiagSystemName; - - [Deprecated { "CIM_DiagnosticRecord.InstanceID" }, - Key, Description ( - "The Unique identifier for an instance of Diagnostic Results." - ), - MaxLen ( 1024 )] - string ExecutionID; - - [Deprecated { "CIM_LogRecord.MessageTimestamp" }, - Description ( - "The date and time the result was last updated." )] - datetime TimeStamp; - - [Deprecated { "No Value" }, - Description ( - "This property is being deprecated. Tests should be " - "grouped at the test level, not by the model. /n If this " - "property is TRUE, then this DiagnosticResult summarizes " - "the results from the execution of a packaged set of " - "DiagnosticTests. The Tests in the package can be " - "identified by following the DiagnosticResultForTest " - "association to the test and then using the " - "DiagnosticTest InPackage aggregation. The individual " - "Results can be broken out by instantiating " - "DiagnosticResults for the individual lower level tests " - "and aggregating into the \'summary\' Result using the " - "DiagnosticResultInPackage association." )] - boolean IsPackage; - - [Deprecated { "CIM_Job.StartTime" }, - Description ( "The date and time when this test started." )] - datetime TestStartTime; - - [Deprecated { "No Value" }, - Description ( "The date and time when this test completed." )] - datetime TestCompletionTime; - - [Deprecated { "No Value" }, - Description ( - "Describes how the test is progressing. For example, if " - "the test was discontinued, the TestState will be " - "\"Stopped\" (value=5), or if testing is currently " - "executing, TestState will be \"In Progress\" (4)." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "Passed", "Failed", - "In Progress", "Stopped" }, - ModelCorrespondence { - "CIM_DiagnosticResult.OtherStateDescription" }] - uint16 TestState; - - [Deprecated { "No Value" }, - Description ( - "When \"Other\" (value=1) is entered in the TestState " - "property, OtherStateDescription can be used to describe " - "the test\'s state." ), - ModelCorrespondence { "CIM_DiagnosticResult.TestState" }] - string OtherStateDescription; - - [Deprecated { "No Value" }, - Description ( - "Estimated number of seconds to perform the Diagnostic " - "Test indicated by the DiagnosticCreationClassName and " - "DiagnosticName properties. After the test has completed, " - "the actual elapsed time can be determined by subtracting " - "the TestStartTime from the TestCompletionTime. A similar " - "property is defined in the association, DiagnosticTest " - "ForMSE. The difference between the two properties is " - "that the value stored in the association is a generic " - "test execution time for the Element and the Test. But, " - "the value here (in DiagnosticResult) is the estimated " - "time that this instance with the given settings would " - "take to run the test. A CIM Consumer can compare this " - "value with the value in the association " - "DiagnosticTestForMSE to get an idea what impact their " - "settings have on test execution." ), - Units ( "Seconds" ), - ModelCorrespondence { - "CIM_DiagnosticTestForMSE.EstimatedTimeOfPerforming" }] - uint32 EstimatedTimeOfPerforming; - - [Deprecated { "CIM_LogRecord.RecordData" }, - Description ( - "TestResults stores one or more textual results from the " - "execution of the DiagnosticTest(s) referenced by the " - "DiagnosticCreationClassName and DiagnosticName " - "properties. One entry is considered a cell location in " - "the array. Each entry is time stamped and contains the " - "following information, in the following format: \n" - "LogOption|yyymmddhhttssoutc|TestName|message_text \n" - "Where: \n" - "LogOption = string identical to the LogOption value in " - "DiagnosticSetting that was used to enable logging this " - "message. \n" - "yyyy = year, e.g. 2000 \n" - "mm = month (01 - 12) \n" - "dd = day (01 - 31) \n" - "hh = hour (00 - 24) \n" - "tt = minute (00-59) \n" - "ss = second (00-59) \n" - "o = \"+\" or \"-\" indicating the sign of the UTC " - "correction field \n" - "utc = offset from UTC (Universal Coordinated Time) in " - "minutes \n" - "TestName = Internal test name or current internal " - "subtest name that sent the message. \n" - "Textual message = free form string that is the \'test " - "result\'." ), - ArrayType ( "Ordered" )] - string TestResults[]; - - [Deprecated { "CIM_Job.PercentComplete" }, - Description ( - "The percentage of the test that has executed thus far, " - "if the TestState property is set to \"In Progress\" or " - "the percentage of the complete test that was executed if " - "the TestState property is set to any of the completed " - "states (\"Passed\", \"Failed\" or \"Stopped\"). Final " - "results may be based on less than 100% coverage due to " - "the parameters defined in DiagnosticSetting (such as " - "QuickMode, PercentOfTestCoverage or HaltOnError)." ), - Units ( "Percent" ), - MinValue ( 0 ), - MaxValue ( 100 )] - uint8 PercentComplete; - - [Deprecated { "CIM_DiagnosticServiceRecord.ErrorCode" }, - Description ( - "If applicable, this string should contain one or more " - "vendor specific error codes that the diagnostic service " - "detected. These error codes may be used by the vendor " - "for variety of purposes such as: fault data base " - "indexing, field service trouble ticketing, product " - "quality tracking, part failure history, etc. Since these " - "codes are for vendor purposes they may assume any form. " - "Details on suggested use cases will be left to white " - "papers. The array of error codes has model " - "correspondence with an ErrorCount array so the number of " - "errors reported can be analyzed by individual error " - "code." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_DiagnosticResult.ErrorCount" }] - string ErrorCode[]; - - [Deprecated { "CIM_DiagnosticServiceRecord.ErrorCount" }, - Description ( - "Since some tests may detect transient and correctable " - "errors such as a network diagnostic or memory test, an " - "error count is useful to indicate the severity of the " - "failure. This field contains an integer value of the " - "number of errors detected by the test. The ErrorCount is " - "an array with model correspondence to ErrorCode so that " - "the test can report an ErrorCount on each type of error " - "encountered. It is recommended that hard errors and " - "correctable or recoverable errors be given different " - "codes so that clients with knowledge of the error codes " - "can evaluate correctable, recoverable, and hard errors " - "independently." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_DiagnosticResult.ErrorCode" }] - uint32 ErrorCount[]; - - [Deprecated { "CIM_DiagnosticServiceRecord.LoopsFailed" }, - Description ( - "Since some tests may be looped, it is useful to report " - "how many iterations passed and failed. This is relevant " - "in analyzing transitory failures. For example, if all " - "the errors occurred in just one of 100 iterations, the " - "device may be viewed as OK or marginal, to be monitored " - "further rather then failed. Note: LoopsPassed & " - "LoopsFailed should add up to the loops completed." )] - uint32 LoopsFailed; - - [Deprecated { "CIM_DiagnosticServiceRecord.LoopsPassed" }, - Description ( - "Since some tests may be looped, it is useful to report " - "how many iterations passed and failed. This is relevant " - "in analyzing transitory failures. For example if all the " - "errors occurred in just one of 100 iterations, the " - "device may be viewed as OK or marginal, to be monitored " - "further rather then failed. Note: LoopsPassed & " - "LoopsFailed should add up to the loops completed." )] - uint32 LoopsPassed; - - [Deprecated { "CIM_DiagnosticSetting.LogOptions" }, - Write, Description ( - "Sets the level of warning messages to be logged. If for " - "example no warning information is required, the level " - "would be set to \"No Warnings\" (value=0). Using " - "\"Missing Resources\" (value=1) will cause warnings to " - "be generated when required resources or hardware are not " - "found. Setting the value to 2, \"Testing Impacts\", " - "results in both missing resources and \'test impact\' " - "warnings (for example, multiple retries required) to be " - "reported." ), - ValueMap { "0", "1", "2", "3" }, - Values { "No Warnings", "Missing Resources", - "Testing Impacts", "All Warnings" }] - uint16 TestWarningLevel; - - [Deprecated { "CIM_DiagnosticSetting.LogOptions" }, - Write, Description ( - "When this flag is true, the diagnostic test will report " - "\'soft errors\'. In this context, a soft error is a " - "message from the diagnostic reporting a known defect in " - "the hardware or driver configuration, or execution " - "environment. Examples are: \'Not enough memory\', " - "\'Driver IOCTL not implemented\', \'Video RAM compare " - "failed during polygon fill test (A known defect in the " - "video chipset)\', etc." )] - boolean ReportSoftErrors; - - [Deprecated { "CIM_DiagnosticSetting.LogOptions" }, - Write, Description ( - "When this flag is true, the diagnostic test will report " - "\'status messages\'. In this context, a status message " - "indicates that the diagnostic code is at a checkpoint. " - "Examples are: \"Completion of phase 1\", \"Complex " - "pattern\", etc." )] - boolean ReportStatusMessages; - - [Deprecated { "CIM_DiagnosticSettingRecord.HaltOnError" }, - Write, Description ( - "When this flag is true, the test will halt after finding " - "the first error." )] - boolean HaltOnError; - - [Deprecated { "CIM_DiagnosticSettingRecord.QuickMode" }, - Write, Description ( - "When this flag is true, the test software should attempt " - "to run in an accelerated fashion either by reducing the " - "coverage or number of tests performed." )] - boolean QuickMode; - - [Deprecated { - "CIM_DiagnosticSettingRecord.PercentOfTestCoverage" }, - Write, Description ( - "Requests the diagnostic software to reduce test coverage " - "to the specified percentage. For example, a hard drive " - "scan test could be asked to run at 50%. The most " - "effective way to accomplish this is for the test " - "software to scan every other track, as opposed to only " - "scanning the first half of a drive. It is assumed that " - "the effectiveness of the test is impacted proportional " - "to the percentage of testing requested. Permissible " - "values for this property range from 0 to 100. \n" - "This property may not be applicable to all tests. If it " - "can be set for a test, the value 7 (\"Supports PercentOf " - "TestCoverage\") should be entered into the " - "DiagnosticTest\'s Characteristics array." ), - Units ( "Percent" ), - MinValue ( 0 ), - MaxValue ( 100 ), - ModelCorrespondence { "CIM_DiagnosticTest.Characteristics" }] - uint8 PercentOfTestCoverage; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DiagnosticResultForMSE.mof b/build/vendor/dmtf_mof/System/CIM_DiagnosticResultForMSE.mof deleted file mode 100644 index 204ee635..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DiagnosticResultForMSE.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DiagnosticResultForMSE -// ================================================================== - [Association, Deprecated { "No Value" }, - Version ( "2.9.0" ), - UMLPackagePath ( "CIM::System::Diagnostics" ), - Description ( - "This class is being deprecated as part of the deprecation of " - "the DiagnosticResult class. \n" - "This is an association class relating diagnostic test results " - "to the ManagedSystemElement that is/was tested." )] -class CIM_DiagnosticResultForMSE { - - [Deprecated { "No Value" }, - Key, Description ( "The diagnostic result." )] - CIM_DiagnosticResult REF Result; - - [Deprecated { "No Value" }, - Key, Description ( - "The ManagedSystemElement to which the diagnostic result applies." - )] - CIM_ManagedSystemElement REF SystemElement; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DiagnosticResultForTest.mof b/build/vendor/dmtf_mof/System/CIM_DiagnosticResultForTest.mof deleted file mode 100644 index 44c8770c..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DiagnosticResultForTest.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DiagnosticResultForTest -// ================================================================== - [Association, Deprecated { "No Value" }, - Version ( "2.9.0" ), - UMLPackagePath ( "CIM::System::Diagnostics" ), - Description ( - "This class is being deprecated as part of the deprecation of " - "the DiagnosticResult class. \n" - "This is an association class to relate the results of a test " - "to the test itself." )] -class CIM_DiagnosticResultForTest { - - [Deprecated { "No Value" }, - Key, Weak, Min ( 1 ), - Max ( 1 ), - Description ( "The result object." )] - CIM_DiagnosticResult REF DiagnosticResult; - - [Deprecated { "No Value" }, - Key, Min ( 1 ), - Max ( 1 ), - Description ( "The test that generated the result object." )] - CIM_DiagnosticTest REF DiagnosticTest; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DiagnosticResultInPackage.mof b/build/vendor/dmtf_mof/System/CIM_DiagnosticResultInPackage.mof deleted file mode 100644 index c6d2b8af..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DiagnosticResultInPackage.mof +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DiagnosticResultInPackage -// ================================================================== - [Association, Deprecated { "No value" }, - Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::System::Diagnostics" ), - Description ( - "This class is being deprecated. Tests should be grouped at the " - "test level, not by the model. Therefore, this association is " - "no longer appropriate. /n This is an association class that " - "identifies a Diagnostic Result as made up of lower level " - "Results. In this case, the Result identified as the " - "PackageResult reference (i.e., the higher level result) would " - "have its IsPackage property set to TRUE." )] -class CIM_DiagnosticResultInPackage { - - [Deprecated { "No value" }, - Key, Aggregate, Description ( - "The DiagnosticResult object that acts as the container " - "for all the results of the package." )] - CIM_DiagnosticResult REF PackageResult; - - [Deprecated { "No value" }, - Key, Description ( - "The DiagnosticResult object that is one of the elements " - "of the package." )] - CIM_DiagnosticResult REF Result; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DiagnosticService.mof b/build/vendor/dmtf_mof/System/CIM_DiagnosticService.mof deleted file mode 100644 index ff7c16b2..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DiagnosticService.mof +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Abstract, Version ( "2.22.0" ), - UMLPackagePath ( "CIM::System::Diagnostics" ), - Description ( - "The CIM_DiagnosticService class provides the ability to start " - "a service that functions to participate in a problem " - "determination process. Specific diagnostic services SHOULD be " - "defined by subclassing this class. Examples of a diagnostic " - "service are tests, information retrievers, exercisers, and " - "ports to external executives." )] -class CIM_DiagnosticService : CIM_Service { - - - [Description ( - "The RunDiagnostic method executes this test for the " - "specified ManagedSystemElement (defined using the " - "SystemElement input parameter). The capabilities for the " - "diagnostic service indicate where the results from the " - "test job are stored. How the test should execute, i.e. " - "its settings, is defined in a DiagnosticSetting object " - "(or by a subclass of DiagnosticSetting). A reference to " - "a Setting object is specified using the Setting input " - "parameter. If a reference is not passed into the method, " - "then a default DiagnosticSetting SHALL be used. \n" - "When RunDiagnostic starts execution, the settings, which " - "are time sensitive, SHOULD be evaluated and captured. " - "This is suggested since the DiagnosticSetting object MAY " - "be modified at any time, and therefore the current test " - "settings could be lost. \n" - "If 0 is returned, the function completed successfully " - "and no ConcreteJob instance is created. If 0x1000 a " - "ConcreteJob will be started." ), - ValueMap { "0", "1", "2", "3", "4", "5", "..", "0x1000", - "..", "0x8000.." }, - Values { "Job completed with no error", "Not Supported", - "Unknown", "Timeout", "Failed", "Invalid Parameter", - "DMTF Reserved", - "Method parameters checked - job started", - "Method Reserved", "Vendor Specific" }] - uint32 RunDiagnostic( - [IN, Description ( - "Specifies the element upon which the " - "DiagnosticService SHOULD be run." )] - CIM_ManagedElement REF ManagedElement, - [IN, Description ( - "Specifies the desired settings that SHOULD be " - "applied to the Diagnostic. If null, then the " - "Diagnostic\'s defaults MAY be used." )] - CIM_DiagnosticSetting REF DiagSetting, - [IN, Description ( - "Specifies the desired settings that SHOULD be " - "applied to the resulting Job. If null and a " - "resulting Job is required (i.e., the Diagnostic is " - "long running), then the test\'s defaults MAY be " - "used." )] - CIM_JobSettingData REF JobSetting, - [IN ( false ), OUT, Description ( - "Returns a handle to the resulting Job." )] - CIM_ConcreteJob REF Job); - - [Description ( - "The RunDiagnosticService method is invoked to commence " - "execution of a diagnostic program on a specific managed " - "element. The input parameters specify this managed " - "element and the settings to be applied to the diagnostic " - "and the resultant job. The method returns a reference to " - "the ConcreteJob instance created. \n" - "Prior to invoking this method, clients examine defaults " - "and appropriate capabilities and create valid " - "DiagnosticSettingData and JobSettingData instances to " - "apply as input parameters. The RunDiagnosticService " - "method SHALL evaluate and capture the attributes of " - "DiagnosticSettingData in an instance of " - "DiagnosticSettingDataRecord for use in post-mortem " - "analysis of diagnostic results. \n" - "A job SHALL be instantiated as a means for monitoring " - "the diagnostic as it runs and to provide useful " - "accounting and status information once the diagnostic " - "has completed. \n" - "The \"Busy\" return code indicates that the method " - "cannot be invoked \"at this time\". It is not an error " - "condition, but signals that the provider is doing " - "something else and cannot respond." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", - "0x1000..0x7FFF", "0x8000.." }, - Values { "Success", "Not Supported", "Unknown", "Timeout", - "Failed", "Invalid Parameter", "Busy", "DMTF Reserved", - "Method Reserved", "Vendor Specific" }] - uint32 RunDiagnosticService( - [IN, Description ( - "Specifies the element upon which the " - "DiagnosticService SHOULD be run." )] - CIM_ManagedElement REF ManagedElement, - [IN, Description ( - "A string containing an encoding of the " - "DiagnosticSettingData instance to be applied to " - "the diagnostic. If null, the diagnostic\'s " - "defaults are used." ), - EmbeddedInstance ( "CIM_DiagnosticSettingData" )] - string DiagnosticSettings, - [IN, Description ( - "A string containing an encoding of the " - "JobSettingData instance to be applied to the " - "resulting job. If null, the job\'s defaults are " - "used." ), - EmbeddedInstance ( "CIM_JobSettingData" )] - string JobSettings, - [IN ( false ), OUT, Description ( - "Returns a reference to the resulting Job." )] - CIM_ConcreteJob REF Job); - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DiagnosticServiceCapabilities.mof b/build/vendor/dmtf_mof/System/CIM_DiagnosticServiceCapabilities.mof deleted file mode 100644 index 3e9ff0fa..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DiagnosticServiceCapabilities.mof +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DiagnosticServiceCapabilities -// ================================================================== - [Version ( "2.9.0" ), - UMLPackagePath ( "CIM::System::Diagnostics" ), - Description ( - "DiagnosticServiceCapabilities is a class that describes the " - "capabilities of the diagnostic service. This provides the " - "means for the diagnostic service to describe its abilities, " - "limitations, and/or potential for use of various diagnostic " - "service parameters. For example, what types of settings the " - "diagnostic service supports." )] -class CIM_DiagnosticServiceCapabilities : CIM_Capabilities { - - [Description ( - "The SupportedServiceModes property lists the operational " - "modes that are supported by the Diagnostic Service. " - "These modes may correspond to, but are not limited to, " - "settings that may be applied to a Diagnostic Service." ), - ValueMap { "0", "1", "2", "3", "4", "5", "0x8000" }, - Values { "Unknown", "Other", "PercentOfTestCoverage", - "QuickMode", "HaltOnError", "ResultPersistence", - "No Service Modes" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_DiagnosticServiceCapabilities.OtherSupportedServiceModesDescriptions" }] - uint16 SupportedServiceModes[]; - - [Description ( - "Provides additional information for " - "SupportedServiceModes when the corresponding value is " - "set to 1 (\"Other\")." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_DiagnosticServiceCapabilities.SupportedServiceModes" }] - string OtherSupportedServiceModesDescriptions[]; - - [Description ( - "The SupportedLoopControl property lists the loop " - "controls that are supported by the Diagnostic Service." ), - ValueMap { "0", "1", "2", "3", "4", "5", "0x8000" }, - Values { "Unknown", "Other", "Continuous", "Count", "Timer", - "ErrorCount", "No Loop Control" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_DiagnosticSetting.LoopControl", - "CIM_DiagnosticServiceCapabilities.OtherSupportedLoopControlDescriptions" }] - uint16 SupportedLoopControl[]; - - [Description ( - "Provides additional information for SupportedLoopControl " - "when the corresponding value is set to 1 (\"Other\")." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_DiagnosticServiceCapabilities.SupportedLoopControl" }] - string OtherSupportedLoopControlDescriptions[]; - - [Description ( - "The SupportedLogOptions property lists the log options " - "that are supported by the Diagnostic Service." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "0x8000" }, - Values { "Unknown", "Other", "Results", "Subtests", - "Actions", "Warnings", "Status", "Device Errors", - "Service Errors", "Setting Data", "Statistics", - "Hardware Configuration", "Software Configuration", - "References", "Debug", "No Log Options" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_DiagnosticSetting.LogOptions", - "CIM_DiagnosticServiceCapabilities.OtherSupportedLogOptionsDescriptions" }] - uint16 SupportedLogOptions[]; - - [Description ( - "Provides additional information for SupportedLogOptions " - "when the corresponding value is set to 1 (\"Other\")." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_DiagnosticServiceCapabilities.SupportedLogOptions" }] - string OtherSupportedLogOptionsDescriptions[]; - - [Description ( - "The SupportedLogStorage property lists the storage " - "options for logging that are supported by the Diagnostic " - "Service. \n" - "The values are: \n" - "\"DiagnosticRecordLog\" (Value = 2): Supports use of the " - "DiagnosticRecordLog class for aggregating " - "DiagnosticRecords. \n" - "\"MessageLog\" (Value = 3): Supports writing log " - "information using the methods in the MessageLog class. \n" - "\"File\" (Value = 4): Supports writing log information " - "to a file." ), - ValueMap { "0", "1", "2", "3", "4", "0x8000" }, - Values { "Unknown", "Other", "DiagnosticRecordLog", - "MessageLog", "File", "No Log Storage" }, - ModelCorrespondence { - "CIM_DiagnosticServiceCapabilities.OtherSupportedLogStorageDescriptions", - "CIM_DiagnosticSetting.LogStorage" }] - uint16 SupportedLogStorage[]; - - [Description ( - "Provides additional information for SupportedLogStorage " - "when the corresponding value is set to 1 (\"Other\")." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_DiagnosticServiceCapabilities.SupportedLogStorage" }] - string OtherSupportedLogStorageDescriptions[]; - - [Description ( - "The SupportedExecutionControls property lists the job " - "controls that are supported by the Diagnostic Service. " - "The values are: \n" - "\"Job Creation\" (Value = 2): publishes that a " - "ConcreteJob instance will be created to control the " - "diagnostic job launched by the diagnostic service. \n" - "\"Kill Job\" (Value = 3): publishes that the diagnostic " - "service implements the " - "ConcreteJob.RequestStateChange(Kill) method. \n" - "\"Suspend Job\" (Value = 4): publishes that the " - "diagnostic service implements the " - "ConcreteJob.RequestStateChange(Suspend) method. \n" - "\"Terminate Job\" (Value = 5): publishes that the " - "diagnostic service implements the " - "ConcreteJob.RequestStateChange(Terminate) method." ), - ValueMap { "0", "1", "2", "3", "4", "5", "0x8000" }, - Values { "Unknown", "Other", "Job Creation", "Kill Job", - "Suspend Job", "Terminate Job", "No Execution Controls" }, - ModelCorrespondence { - "CIM_DiagnosticServiceCapabilities.OtherSupportedExecutionControlsDescriptions" }] - uint16 SupportedExecutionControls[]; - - [Description ( - "Provides additional information for " - "SupportedExecutionControls when the corresponding value " - "is set (\"Other\")." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_DiagnosticServiceCapabilities.SupportedExecutionControls" }] - string OtherSupportedExecutionControlsDescriptions[]; - - [Deprecated { - "CIM_DiagnosticServiceCapabilities.SupportedLogOptions" }, - Description ( - "This property is being deprecated because the " - "TestWarningLevel and LogOptions properties serve the " - "same purpose. \n" - "Lists the level of warning messages that MAY be logged. " - "If for example no warning information is required, the " - "level would be set to \"No Warnings\" (value=0). Using " - "\"Missing Resources\" (value=1) will cause warnings to " - "be generated when required resources or hardware are not " - "found. Setting the value to 2, \"Testing Impacts\", " - "results in both missing resources and \'test impact\' " - "warnings (for example, multiple retries required) to be " - "reported." ), - ValueMap { "2", "3", "4", "5" }, - Values { "No Warnings", "Missing Resources", - "Testing Impacts", "All Warnings" }] - uint16 SupportedTestWarnings = 3; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DiagnosticServiceRecord.mof b/build/vendor/dmtf_mof/System/CIM_DiagnosticServiceRecord.mof deleted file mode 100644 index 9326a14d..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DiagnosticServiceRecord.mof +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DiagnosticServiceRecord -// ================================================================== - [Version ( "2.9.0" ), - UMLPackagePath ( "CIM::System::Diagnostics" ), - Description ( - "While a DiagnosticService is running, data generated by the " - "service may be recorded in DiagnosticServiceRecord objects. A " - "DiagnosticServiceRecord is related to its MessageLog via an " - "instance of the RecordInLog aggregation class." )] -class CIM_DiagnosticServiceRecord : CIM_DiagnosticRecord { - - [Description ( - "If applicable, this string should contain one or more " - "vendor specific error codes that the diagnostic service " - "detected. These error codes may be used by the vendor " - "for variety of purposes such as: fault data base " - "indexing, field service trouble ticketing, product " - "quality tracking, part failure history, etc. Since these " - "codes are for vendor purposes they may assume any form. " - "Details on suggested use cases will be left to white " - "papers. The array of error codes has model " - "correspondence with an ErrorCount array so the number of " - "errors reported can be analyzed by individual error " - "code." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_DiagnosticServiceRecord.ErrorCount" }] - string ErrorCode[]; - - [Description ( - "Since some tests may detect transient and correctable " - "errors such as a network diagnostic or memory test, an " - "error count is useful to indicate the severity of the " - "failure. This field contains an integer value of the " - "number of errors detected by the test. The ErrorCount is " - "an array with model correspondence to ErrorCode so that " - "the test can report an ErrorCount on each type of error " - "encountered. It is recommended that hard errors and " - "correctable or recoverable errors be given different " - "codes so that clients with knowledge of the error codes " - "can evaluate correctable, recoverable, and hard errors " - "independently." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_DiagnosticServiceRecord.ErrorCode" }] - uint32 ErrorCount[]; - - [Description ( - "Since some tests may be looped, it is useful to report " - "how many iterations passed and failed. This is relevant " - "in analyzing transitory failures. For example, if all " - "the errors occurred in just one of 100 iterations, the " - "device may be viewed as OK or marginal, to be monitored " - "further rather then failed. Note: LoopsPassed & " - "LoopsFailed should add up to the loops completed. \n" - "A value for this property would likely be reported with " - "a DiagnosticServiceRecord.RecordType value = " - "\"ResultSummary\", which contains a summary result " - "covering all iterations of a looped service." )] - uint32 LoopsFailed; - - [Description ( - "Since some tests may be looped, it is useful to report " - "how many iterations passed and failed. This is relevant " - "in analyzing transitory failures. For example if all the " - "errors occurred in just one of 100 iterations, the " - "device may be viewed as OK or marginal, to be monitored " - "further rather then failed. Note: LoopsPassed & " - "LoopsFailed should add up to the loops completed. \n" - "A value for this property would likely be reported with " - "a DiagnosticServiceRecord.RecordType value = " - "\"ResultSummary\", which contains a summary result " - "covering all iterations of a looped service." )] - uint32 LoopsPassed; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DiagnosticSetting.mof b/build/vendor/dmtf_mof/System/CIM_DiagnosticSetting.mof deleted file mode 100644 index d455108f..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DiagnosticSetting.mof +++ /dev/null @@ -1,418 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DiagnosticSetting -// ================================================================== - [Version ( "2.9.0" ), - UMLPackagePath ( "CIM::System::Diagnostics" ), - Description ( - "Specific diagnostic test parameters and execution instructions " - "are defined by this class. To provide more detailed Settings " - "for a type of test (i.e., additional properties), subclassing " - "is appropriate." )] -class CIM_DiagnosticSetting : CIM_Setting { - - [Key, Override ( "SettingID" ), - Description ( - "In order to ensure uniqueness within the NameSpace, the " - "value of SettingID SHOULD be constructed using the " - "following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon " - "\':\', and where MUST include a copyrighted, " - "trademarked or otherwise unique name that is owned by " - "the business entity creating/defining the SettingID, or " - "is a registered ID that is assigned to the business " - "entity by a recognized global authority. (This is " - "similar to the _ structure of " - "Schema class names.) In addition, to ensure uniqueness " - " MUST NOT contain a colon (\':\'). When using " - "this algorithm, the first colon to appear in SettingID " - "MUST appear between and . \n" - " is chosen by the business entity and SHOULD " - "not be re-used to identify different underlying " - "(real-world) elements. If the above \'preferred\' " - "algorithm is not used, the defining entity MUST assure " - "that the resultant SettingID is not re-used across any " - "SettingIDs produced by this or other providers for this " - "instance\'s NameSpace. \n" - "A preferred value for is a timestamp (CIM " - "DateTime). For example, ACME:19980525133015.0000000-300" ), - MaxLen ( 256 )] - string SettingID; - - [Deprecated { "CIM_DiagnosticSetting.LogOptions", - "CIM_DiagnosticSetting.VerbosityLevel" }, - Write, Description ( - "This property is being deprecated because the " - "TestWarningLevel and LogOptions properties serve the " - "same purpose. It is deprecated in lieu of using the " - "LogOptions (\'Warnings\') property in conjunction with " - "VerbosityLevel to specify this information. The \'Missing " - "Resources\' and \'Testing Impacts\' values are not " - "included directly in LogOptions, but they are expected " - "to be recorded in the resulting DiagnosticServiceRecord " - "object. \n" - "\n" - "Sets the level of warning messages to be logged. \n" - "If for example no warning information is required, the " - "level would be set to \"No Warnings\" (value=0). Using " - "\"Missing Resources\" (value=1) will cause warnings to " - "be generated when required resources or hardware are not " - "found. Setting the value to 2, \"Testing Impacts\", " - "results in both missing resources and \'test impact\' " - "warnings (for example, multiple retries required) to be " - "reported." ), - ValueMap { "0", "1", "2", "3" }, - Values { "No Warnings", "Missing Resources", - "Testing Impacts", "All Warnings" }] - uint16 TestWarningLevel; - - [Deprecated { "CIM_DiagnosticSetting.LogOptions" }, - Write, Description ( - "When this flag is true, the diagnostic test will report " - "\'soft errors\'. In this context, a soft error is a " - "message from the diagnostic reporting a known defect in " - "the hardware or driver configuration, or execution " - "environment. Examples are: \'Not enough memory\', " - "\'Driver IOCTL not implemented\', \'Video RAM compare " - "failed during polygon fill test (A known defect in the " - "video chipset)\', etc." )] - boolean ReportSoftErrors; - - [Deprecated { "CIM_DiagnosticSetting.LogOptions" }, - Write, Description ( - "When this flag is true, the diagnostic test will report " - "\'status messages\'. In this context, a status message " - "indicates that the diagnostic code is at a checkpoint. " - "Examples are: \"Completion of phase 1\", \"Complex " - "pattern\", etc." )] - boolean ReportStatusMessages; - - [Write, Description ( - "When this flag is true, the test will halt after finding " - "the first error." )] - boolean HaltOnError; - - [Write, Description ( - "When this flag is true, the test software should attempt " - "to run in an accelerated fashion either by reducing the " - "coverage or number of tests performed." )] - boolean QuickMode; - - [Write, Description ( - "Requests the diagnostic software to reduce test coverage " - "to the specified percentage. For example, a hard drive " - "scan test could be asked to run at 50%. The most " - "effective way to accomplish this is for the test " - "software to scan every other track, as opposed to only " - "scanning the first half of a drive. It is assumed that " - "the effectiveness of the test is impacted proportional " - "to the percentage of testing requested. Permissible " - "values for this property range from 0 to 100." ), - Units ( "Percent" ), - MinValue ( 0 ), - MaxValue ( 100 ), - ModelCorrespondence { - "CIM_DiagnosticServiceCapabilities.SupportedServiceModes" }] - uint8 PercentOfTestCoverage; - - [Write, Description ( - "Array entries contain parameters corresponding to " - "entries in the LoopControl array, limiting the number of " - "times a test should be repeated with a single invocation " - "of a test method by a CIM client." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_DiagnosticSetting.LoopControl" }] - string LoopControlParameter[]; - - [Write, Description ( - "LoopControl, used in conjunction with " - "LoopControlParameter, sets one or more loop control " - "mechanisms that limits the number of times a test should " - "be repeated with a single invocation of a test method by " - "a CIM client. There is an array-positional " - "correspondence between LoopControl entries & " - "LoopControlParameter entries. The entries in these " - "coupled arrays of loop controls can be used in a logical " - "OR fashion to achieve the desired loop control. For " - "example, if a client wants to loop a test 1000 times, " - "but quit if a timer runs out, it could set both controls " - "into the LoopControl array as two separate entries in " - "each array. The looping test will terminate when the " - "first of the two ORed conditions are met. \n" - "The descriptions for each loop control are given below: \n" - "Unknown (= 0) \n" - "Other (= 1) : Additional detail may be found in " - "OtherLoopControlDescriptions. \n" - "Continuous (= 2) : The corresponding LoopControl " - "Parameter is ignored and the test will execute " - "continuously. Tests that use this control should also " - "support DiscontinueTest. \n" - "Count(=3) : The corresponding LoopControlParameter is " - "interpreted as a loop count (uint32), indicating the " - "number of times the test should be repeated with a " - "single invocation of a test method by a CIM client. \n" - "Timer (= 4) : The corresponding LoopControlParameter is " - "interpreted as an initial value (uint32) for a test loop " - "timer, given in seconds. The looping is terminated when " - "this timer has lapsed. \n" - "ErrorCount (= 5) : The corresponding LoopControl " - "Parameter is interpreted as an error count (uint32). The " - "loop will continue until the number of errors that have " - "occurred exceeds the ErrorCount. Note: the ErrorCount " - "only refers to hard test errors; it does not include " - "soft errors or warnings." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "Continuous", "Count", "Timer", - "ErrorCount" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_DiagnosticSetting.LoopControlParameter", - "CIM_DiagnosticSetting.OtherLoopControlDescriptions", - "CIM_DiagnosticServiceCapabilities.SupportedLoopControl" }] - uint16 LoopControl[]; - - [Deprecated { - "CIM_DiagnosticSetting.OtherLoopControlDescriptions" }, - Write, Description ( - "This property is deprecated and replaced with an array. \n" - "It provides additional information for LoopControl when " - "its value is set to 1 (\'Other\')." ), - ModelCorrespondence { - "CIM_DiagnosticSetting.LoopControlParameter" }] - string OtherLoopControlDescription; - - [Write, Description ( - "This property provides additional information for " - "LoopControl when the corresponding value is set to 1 " - "(\'Other\')." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_DiagnosticSetting.LoopControlParameter", - "CIM_DiagnosticSetting.LoopControl" }] - string OtherLoopControlDescriptions[]; - - [Write, Description ( - "The ResultPersistence property is a directive from a " - "diagnostic client to a diagnostic provider. It allows " - "the client to specify to the diagnostic service provider " - "how long to persist the messages that result from " - "execution of a diagnostic service. This applies to " - "instances of DiagnosticResult as well as the preferred " - "use of DiagnosticServiceRecord. The timeout period " - "starts upon completion of the diagnostic action " - "described by the DiagnosticService. \n" - "\n" - "Here is a summary of the choices and behaviors for " - "different ResultPersistence values: \n" - "0 = \"No Persistence\": \n" - "Setting the timer to zero tells the provider not to " - "persist the diagnostic result. The diagnostic " - "information is only available while the diagnostic is " - "executing or at its conclusion. \n" - "Value > 0 and < 0xFFFFFFFF = \"Persist With TimeOut\": \n" - "Setting the ResultPersistenceOption to a integer will " - "cause the DiagnosticResult to be persisted for that " - "number of seconds. At the end of that time, the " - "DiagnosticResult may be deleted by the diagnostic " - "service provider. \n" - "0xFFFFFFFF = \"Persist Forever\": \n" - "By setting the timeout value to the very large value, " - "0xFFFFFFFF, the provider shall persist results forever. " - "In this case, the client MUST bear the responsibility " - "for deleting them." ), - Units ( "Seconds" )] - uint32 ResultPersistence; - - [Write, Description ( - "The LogOptions property is used to specify the types of " - "data that SHOULD be logged by the diagnostic service. " - "Any number of values may be specified in the array. Note " - "that the default behavior is for nothing to be logged. \n" - "The AMOUNT of data to be logged can be controlled for " - "each value selected by specifying a VerbosityLevel " - "value. Verbosity may not apply to all LogOptions values, " - "in which case the default VerbosityLevel of \"Standard\" " - "SHOULD be used. \n" - "The RecordForLog produced by running a service MUST be " - "tagged with a RecordType that corresponds to one of " - "these log option values. \n" - "Following is a brief description of the available log " - "options: \n" - "* \"Other\" (value = 1): Details are given in the " - "corresponding OtherLogOptionsDescriptions entry. \n" - "* \"Results\" (value = 2): Log the results obtained by " - "running the service. This is the most common value for " - "reporting the service results. \n" - "* \"Subtests\" (value = 3): Log a test summary report " - "upon completion of each subtest and each loop iteration. " - "The summary reports SHOULD state whether the individual " - "subtest or iteration passed or failed and list relevant " - "error codes and respective error counts. \n" - "* \"Actions\" (value = 4): Log corrective action and " - "instructional messages to guide service personnel; for " - "example, a prioritized list of actions to perform in " - "order to isolate a failure or correct a problem. When " - "ordering steps or prioritizing actions, a number should " - "proceed the text; for example, 1) Do this first, 2) Do " - "this next, etc. \n" - "* \"Warnings\" (value = 5): Log warning messages; for " - "example, \'device will be taken off line\', \'test is " - "long-running\' or \'available memory is low\'. The " - "VerbosityLevel value specified for the Warnings option " - "is related to the severity of the warnings logged; for " - "instance, one would specify a high level of verbosity to " - "get all warnings logged, regardless of severity, and a " - "low level of verbosity to have only the most severe " - "warnings logged. \n" - "* \"Status\" (value = 6): Log status messages; for " - "example, state information for the driver, device, or " - "system. \n" - "* \"Device Errors\" (value = 7): Log errors related to " - "the managed element being serviced. \n" - "* \"Service Errors\" (value = 8): Log errors related to " - "the service itself rather than the element being " - "serviced, such as \'Resource Allocaton Failure\'. \n" - "* \"Setting Data\" (value=9): Log the property values of " - "the DiagnosticSetting object used to configure the " - "service. \n" - "* \"Statistics\" (value = 10): Log statistical messages; " - "for example, packets sent per second. \n" - "* \"Hardware Configuration\" (value = 11): Log messages " - "that contain information about the hardware " - "configuration as viewed by the service; for example, " - "vendor, version, FRU identification, and location " - "information. The format and contents of this property is " - "element dependent. Examples are: SCSI ID, LPTx, PCI Slot " - "Number, and Dimm#. \n" - "* \"Software Configuration\" (value = 12): Log messages " - "that contain information about the software environment " - "as viewed by the service; for example, the name and " - "version of all the critical software elements " - "controlling the device under test. Each configuration " - "message SHOULD have the following common format: Element " - "name; element type; manufacturer name; version; for " - "example, \'Miniport driver; SCSI; Intel; Version 1.2\'. \n" - "* \"Reference\" (value = 13): Log the keys of an CIM " - "object of of interest; for example, the element under " - "test, or a data file. \n" - "* \"Debug\" (value = 14): Log debug messages. These " - "messages are vendor specific." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15" }, - Values { "Unknown", "Other", "Results", "Subtests", - "Actions", "Warnings", "Status", "Device Errors", - "Service Errors", "Setting Data", "Statistics", - "Hardware Configuration", "Software Configuration", - "References", "Debug", "No Log Options" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_DiagnosticSetting.OtherLogOptionsDescriptions", - "CIM_DiagnosticServiceCapabilities.SupportedLogOptions", - "CIM_DiagnosticServiceRecord.RecordType", - "CIM_DiagnosticSetting.VerbosityLevel" }] - uint16 LogOptions[]; - - [Write, Description ( - "Provides additional information regarding the types of " - "test messages that are logged when the property " - "LogOptions includes the value 1 (\"Other\")." ), - ModelCorrespondence { "CIM_DiagnosticSetting.LogOptions" }] - string OtherLogOptionsDescriptions[]; - - [Write, Description ( - "The LogStorage setting property indicates which types of " - "supported storage should be used by the Diagnostic " - "Service for logging of the data specified in LogOptions. \n" - "The values are: \n" - "\"DiagnosticRecordLog\" (Value = 2): Use the " - "DiagnosticRecordLog and DiagnosticRecord classes. \n" - "\"MessageLog\" (Value = 4): Use the MessageLog class and " - "its methods. \n" - "\"File\" (Value = 5): Write data to a file." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "DiagnosticRecordLog", - "MessageLog", "File" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_DiagnosticSetting.OtherLogStorageDescriptions", - "CIM_DiagnosticServiceCapabilities.SupportedLogStorage" }] - uint16 LogStorage[]; - - [Write, Description ( - "This property provides additional information for " - "LogStorage when the corresponding value is set to 1 " - "(\"Other\")." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_DiagnosticSetting.LogStorage" }] - string OtherLogStorageDescriptions[]; - - [Write, Description ( - "A client may want to specify the desired volume or " - "detail logged by a diagnostic service. This property is " - "applied to a corresponding logging option, acting as a " - "qualifier on its description. Three levels of verbosity " - "are defined as follows: \n" - "* \"Minimum\" (value=2): Specified if the least amount " - "of information is desired; for example, Pass or Fail. \n" - "* \"Standard\" (value=3): This is the standard level of " - "messaging provided by the service. It is the form most " - "likely to be used if no verbosity value is specified " - "(default). \n" - "* \"Full\" (value=4): Specified when all information, " - "regardless of size, is desired. \n" - "Note that VerbosityLevel is a subjective property and " - "relates to the degree of detail, not an absolute metric. " - "A client simply specifies its desired level of detail " - "and the provider publishes its data in accordance with " - "this desired level of detail. \n" - "Verbosity may not apply to all LogOptions values, in " - "which case the default VerbosityLevel of \"Standard\" " - "SHOULD be used." ), - ValueMap { "2", "3", "4" }, - Values { "Minimum", "Standard", "Full" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_DiagnosticSetting.LogOptions" }] - uint16 VerbosityLevel[]; - - [Write, Description ( - "This property, along with the locale information in " - "LocalizationCapabilities and DiagnosticServiceRecord, " - "meets the requirement to specify locale for results " - "produced by a diagnostic service. A locale indicates a " - "particular geographical, political, or cultural region. " - "The Locales property of the DiagnosticSetting class is " - "an array of strings whose entries specify a language to " - "be used in the formulation of information requested by " - "or delivered to a client as a result of running a " - "diagnostic service. It is specified by the client as an " - "input parameter to the RunDiagnostic method, by virtue " - "of its inclusion in this Setting class which is a " - "parameter of the method. A single Setting object may " - "specify more than one Locale. In this case, information " - "MUST be returned in each language specified. \n" - "\n" - "Each array entry consists of three sub-strings, " - "separated by underscores: \n" - "- The first sub-string is the language code, as " - "specified in ISO639. \n" - "- The second sub-string is the country code, as " - "specified in ISO3166. \n" - "- The third sub-string is a variant, which is vendor " - "specific. \n" - "For example, US English appears as: \"en_US_WIN\", where " - "the \"WIN\" variant would specify a Windows " - "browser-specific collation (if one exists). Since the " - "variant is not standardized, it is not commonly used and " - "generally is limited to easily recognizable values " - "(\"WIN\", \"UNIX\", \"EURO\", etc.) used in standard " - "environments. The language and country codes are " - "required; the variant may be empty." ), - ModelCorrespondence { - "CIM_LocalizationCapabilities.SupportedOutputLocales" }] - string Locales[]; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DiagnosticSettingData.mof b/build/vendor/dmtf_mof/System/CIM_DiagnosticSettingData.mof deleted file mode 100644 index 44e75e6a..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DiagnosticSettingData.mof +++ /dev/null @@ -1,318 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::System::Diagnostics" ), - Description ( - "Specific diagnostic test parameters and execution instructions " - "are defined by this class. To provide more detailed Settings " - "for a type of test (i.e., additional properties), subclassing " - "is appropriate." )] -class CIM_DiagnosticSettingData : CIM_SettingData { - - [Description ( - "When this flag is true, the test will halt after finding " - "the first error." )] - boolean HaltOnError; - - [Description ( - "When this flag is true, the test software should attempt " - "to run in an accelerated fashion either by reducing the " - "coverage or number of tests performed." )] - boolean QuickMode; - - [Description ( - "Requests the diagnostic software to reduce test coverage " - "to the specified percentage. For example, a hard drive " - "scan test could be asked to run at 50%. The most " - "effective way to accomplish this is for the test " - "software to scan every other track, as opposed to only " - "scanning the first half of a drive. It is assumed that " - "the effectiveness of the test is impacted proportional " - "to the percentage of testing requested. Permissible " - "values for this property range from 0 to 100." ), - Units ( "Percent" ), - MinValue ( 0 ), - MaxValue ( 100 ), - ModelCorrespondence { - "CIM_DiagnosticServiceCapabilities.SupportedServiceModes" }, - PUnit ( "percent" )] - uint8 PercentOfTestCoverage; - - [Description ( - "Array entries contain parameters corresponding to " - "entries in the LoopControl array, limiting the number of " - "times a test should be repeated with a single invocation " - "of a test method by a CIM client." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_DiagnosticSettingData.LoopControl" }] - string LoopControlParameter[]; - - [Description ( - "LoopControl, used in conjunction with " - "LoopControlParameter, sets one or more loop control " - "mechanisms that limits the number of times a test should " - "be repeated with a single invocation of a test method by " - "a CIM client. There is an array-positional " - "correspondence between LoopControl entries & " - "LoopControlParameter entries. The entries in these " - "coupled arrays of loop controls can be used in a logical " - "OR fashion to achieve the desired loop control. For " - "example, if a client wants to loop a test 1000 times, " - "but quit if a timer runs out, it could set both controls " - "into the LoopControl array as two separate entries in " - "each array. The looping test will terminate when the " - "first of the two Ored conditions are met. \n" - "The descriptions for each loop control are given below: \n" - "Unknown (0) \n" - "Other (1) : Additional detail may be found in " - "OtherLoopControlDescriptions. \n" - "Continuous (2) : The corresponding LoopControl Parameter " - "is ignored and the test will execute continuously. Tests " - "that use this control should also support " - "DiscontinueTest. \n" - "Count(3) : The corresponding LoopControlParameter is " - "interpreted as a loop count (uint32), indicating the " - "number of times the test should be repeated with a " - "single invocation of a test method by a CIM client. \n" - "Timer (= 4) : The corresponding LoopControlParameter is " - "interpreted as an initial value (uint32) for a test loop " - "timer, given in seconds. The looping is terminated when " - "this timer has lapsed. \n" - "ErrorCount (= 5) : The corresponding LoopControl " - "Parameter is interpreted as an error count (uint32). The " - "loop will continue until the number of errors that have " - "occurred exceeds the ErrorCount. Note: the ErrorCount " - "only refers to hard test errors; it does not include " - "soft errors or warnings." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "Continuous", "Count", "Timer", - "ErrorCount" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_DiagnosticSettingData.LoopControlParameter", - "CIM_DiagnosticSettingData.OtherLoopControlDescriptions", - "CIM_DiagnosticServiceCapabilities.SupportedLoopControl" }] - uint16 LoopControl[]; - - [Description ( - "This property provides additional information for " - "LoopControl when the corresponding value is set to 1 " - "(\'Other\')." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_DiagnosticSettingData.LoopControlParameter", - "CIM_DiagnosticSettingData.LoopControl" }] - string OtherLoopControlDescriptions[]; - - [Description ( - "The ResultPersistence property is a directive from a " - "diagnostic client to a diagnostic provider. It allows " - "the client to specify to the diagnostic service provider " - "how long to persist the messages that result from " - "execution of a diagnostic service. This applies to " - "instances of DiagnosticResult as well as the preferred " - "use of DiagnosticServiceRecord. The timeout period " - "starts upon completion of the diagnostic action " - "described by the DiagnosticService. \n" - "\n" - "Here is a summary of the choices and behaviors for " - "different ResultPersistence values: \n" - "0 = \"No Persistence\": \n" - "Setting the timer to zero tells the provider not to " - "persist the diagnostic result. The diagnostic " - "information is only available while the diagnostic is " - "executing or at its conclusion. \n" - "Value > 0 and < 0xFFFFFFFF = \"Persist With TimeOut\": \n" - "Setting the ResultPersistenceOption to a integer will " - "cause the DiagnosticResult to be persisted for that " - "number of seconds. At the end of that time, the " - "DiagnosticResult may be deleted by the diagnostic " - "service provider. \n" - "0xFFFFFFFF = \"Persist Forever\": \n" - "By setting the timeout value to the very large value, " - "0xFFFFFFFF, the provider shall persist results forever. " - "In this case, the client MUST bear the responsibility " - "for deleting them." ), - Units ( "Seconds" ), - PUnit ( "second" )] - uint32 ResultPersistence; - - [Description ( - "The LogOptions property is used to specify the types of " - "data that SHOULD be logged by the diagnostic service. " - "Any number of values may be specified in the array. Note " - "that the default behavior is for nothing to be logged. \n" - "The AMOUNT of data to be logged can be controlled for " - "each value selected by specifying a VerbosityLevel " - "value. Verbosity may not apply to all LogOptions values, " - "in which case the default VerbosityLevel of \"Standard\" " - "SHOULD be used. \n" - "The RecordForLog produced by running a service MUST be " - "tagged with a RecordType that corresponds to one of " - "these log option values. \n" - "Following is a brief description of the available log " - "options: \n" - "* \"Other\" (value = 1): Details are given in the " - "corresponding OtherLogOptionsDescriptions entry. \n" - "* \"Results\" (value = 2): Log the results obtained by " - "running the service. This is the most common value for " - "reporting the service results. \n" - "* \"Subtests\" (value= 3): Log a test summary report " - "upon completion of each subtest and each loop iteration. " - "The summary reports SHOULD state whether the individual " - "subtest or iteration passed or failed and list relevant " - "error codes and respective error counts. \n" - "* \"Actions\" (value = 4): Log corrective action and " - "instructional messages to guide service personnel; for " - "example, a prioritized list of actions to perform in " - "order to isolate a failure or correct a problem. When " - "ordering steps or prioritizing actions, a number should " - "proceed the text; for example, 1) Do this first, 2) Do " - "this next, etc. \n" - "* \"Warnings\" (value = 5): Log warning messages; for " - "example, \'device will be taken off line\', \'test is " - "long-running\' or \'available memory is low\'. The " - "VerbosityLevel value specified for the Warnings option " - "is related to the severity of the warnings logged; for " - "instance, one would specify a high level of verbosity to " - "get all warnings logged, regardless of severity, and a " - "low level of verbosity to have only the most severe " - "warnings logged. \n" - "* \"Status\" (value = 6): Log status messages; for " - "example, state information for the driver, device, or " - "system. \n" - "* \"Device Errors\" (value = 7): Log errors related to " - "the managed element being serviced. \n" - "* \"Service Errors\" (value = 8): Log errors related to " - "the service itself rather than the element being " - "serviced, such as \'Resource Allocaton Failure\'. \n" - "* \"Setting Data\" (value=9): Log the property values of " - "the DiagnosticSettingData object used to configure the " - "service. \n" - "*\"Statistics\" (value = 10): Log statistical messages; " - "for example, packets sent per second. \n" - "* \"Hardware Configuration\" (value = 11): Log messages " - "that contain information about the hardware " - "configuration as viewed by the service; for example, " - "vendor, version, FRU identification, and location " - "information. The format and contents of this property is " - "element dependent. Examples are: SCSI ID, LPTx, PCI Slot " - "Number, and Dimm#. \n" - "* \"Software Configuration\" (value = 12): Log messages " - "that contain information about the software environment " - "as viewed by the service; for example, the name and " - "version of all the critical software elements " - "controlling the device under test. Each configuration " - "message SHOULD have the following common format: Element " - "name; element type; manufacturer name; version; for " - "example, \'Miniport driver; SCSI; Intel; Version 1.2\'. \n" - "* \"Reference\" (value = 13): Log the keys of an CIM " - "object of of interest; for example, the element under " - "test, or a data file. \n" - "* \"Debug\" (value = 14): Log debug messages. These " - "messages are vendor specific." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "0x8000" }, - Values { "Unknown", "Other", "Results", "Subtests", - "Actions", "Warnings", "Status", "Device Errors", - "Service Errors", "Setting Data", "Statistics", - "Hardware Configuration", "Software Configuration", - "References", "Debug", "No Log Options" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_DiagnosticSettingData.OtherLogOptionsDescriptions", - "CIM_DiagnosticServiceCapabilities.SupportedLogOptions", - "CIM_DiagnosticServiceRecord.RecordType", - "CIM_DiagnosticSettingData.VerbosityLevel" }] - uint16 LogOptions[]; - - [Description ( - "Provides additional information regarding the types of " - "test messages that are logged when the property " - "LogOptions includes the value 1 (Other)." ), - ModelCorrespondence { "CIM_DiagnosticSettingData.LogOptions" }] - string OtherLogOptionsDescriptions[]; - - [Description ( - "The LogStorage setting property indicates which types of " - "supported storage should be used by the Diagnostic " - "Service for logging of the data specified in LogOptions. \n" - "The values are: \n" - "\"DiagnosticLog\" (Value = 2): Use the DiagnosticLog and " - "DiagnosticRecord classes. \n" - "\"MessageLog\" (Value = 3): Use the MessageLog class and " - "its methods. \n" - "\"File\" (Value = 4): Write data to a file." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "DiagnosticLog", "MessageLog", - "File" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_DiagnosticSettingData.OtherLogStorageDescriptions", - "CIM_DiagnosticServiceCapabilities.SupportedLogStorage" }] - uint16 LogStorage[]; - - [Description ( - "This property provides additional information for " - "LogStorage when the corresponding value is set to 1 " - "(\"Other\")." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_DiagnosticSettingData.LogStorage" }] - string OtherLogStorageDescriptions[]; - - [Description ( - "A client may want to specify the desired volume or " - "detail logged by a diagnostic service. This property is " - "applied to a corresponding logging option, acting as a " - "qualifier on its description. Three levels of verbosity " - "are defined as follows: \n" - "* \"Minimum\" (value=2): Specified if the least amount " - "of information is desired; for example, Pass or Fail. \n" - "* \"Standard\" (value=3): This is the standard level of " - "messaging provided by the service. It is the form most " - "likely to be used if no verbosity value is specified " - "(default). \n" - "* \"Full\" (value=4): Specified when all information, " - "regardless of size, is desired. \n" - "Note that VerbosityLevel is a subjective property and " - "relates to the degree of detail, not an absolute metric. " - "A client simply specifies its desired level of detail " - "and the provider publishes its data in accordance with " - "this desired level of detail. \n" - "Verbosity may not apply to all LogOptions values, in " - "which case the default VerbosityLevel of \"Standard\" " - "SHOULD be used." ), - ValueMap { "2", "3", "4" }, - Values { "Minimum", "Standard", "Full" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_DiagnosticSettingData.LogOptions" }] - uint16 VerbosityLevel[]; - - [Description ( - "The time the Job should wait for a query response. " - "before using a default response and continuing " - "execution. A default response could result in a " - "cancellation of the Job. The timeout value starts at the " - "time the Job goes into the QueryPending state. \n" - "0 = \"Do not query\": \n" - "Setting the timer to zero tells the provider not to " - "query but use the default response. \n" - "Value > 0 and < 0xFFFFFFFF = \"Query With TimeOut\": \n" - "Setting the QueryTimeout to a integer will cause the Job " - "to wait for that number of seconds. At the end of that " - "time, the Job will use the default response and continue " - "execution. \n" - "0xFFFFFFFF = \"Wait Forever\": \n" - "By setting the timeout value to the very large value, " - "0xFFFFFFFF, the job shall wait forever for a response. " - "In this case, the client MUST bear the responsibility " - "for responding to the query." ), - Units ( "Seconds" ), - PUnit ( "second" )] - uint32 QueryTimeout = 0; - - [Description ( - "The test should only run non-destructive tests." )] - boolean NonDestructive = false; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DiagnosticSettingDataRecord.mof b/build/vendor/dmtf_mof/System/CIM_DiagnosticSettingDataRecord.mof deleted file mode 100644 index a25f4cdc..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DiagnosticSettingDataRecord.mof +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::System::Diagnostics" ), - Description ( - "This class contains a snapshot of the settings that were used " - "when the associated Diagnostic service was run." )] -class CIM_DiagnosticSettingDataRecord : CIM_DiagnosticRecord { - - [Description ( - "A string containing an encoding of the " - "DiagnosticSettingData instance that was used when the " - "diagnostic service was run." ), - EmbeddedInstance ( "CIM_DiagnosticSettingData" )] - string Settings; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DiagnosticSettingForTest.mof b/build/vendor/dmtf_mof/System/CIM_DiagnosticSettingForTest.mof deleted file mode 100644 index c65dd5a5..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DiagnosticSettingForTest.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DiagnosticSettingForTest -// ================================================================== - [Association, Deprecated { "CIM_ElementSetting" }, - Version ( "2.9.0" ), - UMLPackagePath ( "CIM::System::Diagnostics" ), - Description ( - "This class is no longer required and is being deprecated. Use " - "ElementSetting (its parent) instead if the association is " - "needed. \n" - "This is an association class to relate test settings with " - "diagnostic tests." )] -class CIM_DiagnosticSettingForTest : CIM_ElementSetting { - - [Deprecated { "CIM_ElementSetting.Element" }, - Override ( "Element" ), - Description ( "The Test that can use the Setting object." )] - CIM_DiagnosticTest REF Element; - - [Deprecated { "CIM_ElementSetting.Setting" }, - Override ( "Setting" ), - Description ( - "The Setting that can be applied to the execution of the " - "DiagnosticTest." )] - CIM_DiagnosticSetting REF Setting; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DiagnosticSettingRecord.mof b/build/vendor/dmtf_mof/System/CIM_DiagnosticSettingRecord.mof deleted file mode 100644 index 37398bbb..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DiagnosticSettingRecord.mof +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.11.0" ), - UMLPackagePath ( "CIM::System::Diagnostics" ), - Description ( - "A snapshot of the properties in the DiagnosticSetting instance " - "that was used when the Diagnostic was run." )] -class CIM_DiagnosticSettingRecord : CIM_DiagnosticRecord { - - [Description ( - "When this flag is true, the test will halt after finding " - "the first error." )] - boolean HaltOnError; - - [Description ( - "When this flag is true, the test software should attempt " - "to run in an accelerated fashion either by reducing the " - "coverage or number of tests performed." )] - boolean QuickMode; - - [Description ( - "The requested percentage of coverage for the diagnostic " - "service. For example, a hard drive scan test could be " - "asked to run at 50%. Permissible values for this " - "property range from 0 to 100." ), - Units ( "Percent" ), - MinValue ( 0 ), - MaxValue ( 100 )] - uint8 PercentOfTestCoverage; - - [Description ( - "Array entries contain parameters corresponding to " - "entries in the LoopControl array, limiting the number of " - "times a test should be repeated with a single invocation " - "of RunTest by a CIM client." ), - ArrayType ( "Indexed" )] - string LoopControlParameter[]; - - [Description ( - "LoopControl, used in conjunction with " - "LoopControlParameter, sets one or more loop control " - "mechanisms that limits the number of times a test should " - "be repeated with a single invocation of RunTest by a CIM " - "client. There is an array-positional correspondence " - "between LoopControl entries & LoopControlParameter " - "entries. The entries in these coupled arrays of loop " - "controls can be used in a logical OR fashion to achieve " - "the desired loop control. For example, if a client wants " - "to loop a test 1000 times, but quit if a timer runs out, " - "it could set both controls into the LoopControl array as " - "two separate entries in each array. The looping test " - "will terminate when the first of the two Ored conditions " - "are met. \n" - "A brief description for each loop control can be found " - "in the description of DiagnosticSetting.LoopControl." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "Continuous", "Count", "Timer", - "Error Count" }, - ArrayType ( "Indexed" )] - uint16 LoopControl[]; - - [Description ( - "Provides additional information for LoopControl when its " - "value is set to 1 (\'Other\')." ), - ArrayType ( "Indexed" )] - string OtherLoopControlDescriptions[]; - - [Description ( - "The desired length of time to persist the messages that " - "result from execution of a diagnostic service. Here is a " - "summary of the choices and behaviors for different " - "ResultPersistence values: \n" - "0 = \"No Persistence\": \n" - "Setting the timer to zero tells the provider not to " - "persist the diagnostic result. The diagnostic " - "information is only available while the diagnostic is " - "executing or at its conclusion. \n" - "Value > 0 and < 0xFFFFFFFF = \"Persist With TimeOut\": \n" - "Setting the ResultPersistenceOption to a integer will " - "cause the DiagnosticResult to be persisted for that " - "number of seconds. At the end of that time, the " - "DiagnosticResult may be deleted by the diagnostic " - "service provider. \n" - "0xFFFFFFFF = \"Persist Forever\": \n" - "By setting the timeout value to the very large value, " - "0xFFFFFFFF, the provider shall persist results forever. " - "In this case, the client MUST bear the responsibility " - "for deleting them." ), - Units ( "Seconds" )] - uint32 ResultPersistence; - - [Description ( - "The LogOptions property lists the log options that were " - "requested for the Diagnostic Service. A brief summary of " - "the various log options can be found in " - "CIM_DiagnosticSetting.LogOptions." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "0x8000" }, - Values { "Unknown", "Other", "Results", "Subtests", - "Actions", "Warnings", "Status", "Device Errors", - "Service Errors", "Setting Data", "Statistics", - "Hardware Configuration", "Software Configuration", - "References", "Debug", "No Log Options" }, - ArrayType ( "Indexed" )] - uint16 LogOptions[]; - - [Description ( - "Provides additional information regarding the types of " - "test messages that are logged when the property " - "LogOptions includes the value 1 (\"Other\")." )] - string OtherLogOptionsDescriptions[]; - - [Description ( - "The LogStorage setting property indicates which types of " - "supported storage should be used by the Diagnostic " - "Service for logging of the data specified in LogOptions. \n" - "The values are: \n" - "\"DiagnosticRecordLog\" (Value = 2): Use the " - "DiagnosticRecordLog and DiagnosticRecord classes. \n" - "\"MessageLog\" (Value = 4): Use the MessageLog class and " - "its methods. \n" - "\"File\" (Value = 5): Write data to a file." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "DiagnosticRecordLog", - "MessageLog", "File" }, - ArrayType ( "Indexed" )] - uint16 LogStorage[]; - - [Description ( - "This property provides additional information for " - "LogStorage when the corresponding value is set to 1 " - "(\"Other\")." ), - ArrayType ( "Indexed" )] - string OtherLogStorageDescriptions[]; - - [Description ( - "A client may want to specify the volume or detail of " - "information logged by a diagnostic service. This metric " - "is applied to a corresponding logging option, acting as " - "a qualifier on its description. Three levels of " - "verbosity are defined as follows: \n" - "* \"Minimum\" (value=2): Specified if the least amount " - "of information is desired; for example, Pass or Fail. \n" - "* \"Standard\" (value=3): This is the standard level of " - "messaging provided by the service. It is the form most " - "likely to be used if no verbosity value is specified " - "(default). \n" - "* \"Full\" (value=4): Specified when all information, " - "regardless of size, is desired. \n" - "Verbosity may not apply to all LogOptions values, in " - "which case the default VerbosityLevel of \"Standard\" " - "SHOULD be used." ), - ValueMap { "2", "3", "4" }, - Values { "Minimum", "Standard", "Full" }, - ArrayType ( "Indexed" )] - uint16 VerbosityLevel[]; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DiagnosticTest.mof b/build/vendor/dmtf_mof/System/CIM_DiagnosticTest.mof deleted file mode 100644 index 610ec6ff..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DiagnosticTest.mof +++ /dev/null @@ -1,346 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. - [Version ( "2.11.0" ), - UMLPackagePath ( "CIM::System::Diagnostics" ), - Description ( - "The CIM_DiagnosticTest class represents the framework for " - "running diagnostic tests. Specific diagnostic tests may be " - "defined by subclassing and/or instantiating this object. To " - "provide more detail for a type of test(s) (i.e, additional " - "properties and methods), subclassing is appropriate. \n" - "When a DiagnosticTest can be simultaneously executed against " - "several elements, then DiagnosticTest may launch a ConcreteJob " - "to represent each execution." )] -class CIM_DiagnosticTest : CIM_DiagnosticService { - - [Description ( - "The descriptions for each Characteristic are below: \n" - "\n" - "* \"Is Exclusive\" (value=2) is specified for the test " - "module only if the diagnostic cannot run more than one " - "test at a time, regardless of how many SystemElements " - "are supported. Typically, this occurs when hardware or " - "software constraints prevent the test from running as " - "multiple, concurrent instances. If the diagnostic can be " - "run against multiple SystemElements, but only once per " - "Element, then set the IsExclusiveForMSE boolean property " - "on the appropriate instances of DiagnosticTestForMSE. \n" - "\n" - "* If \"Is Interactive\" (value=3) is set, then the " - "diagnostic displays a message either before, during or " - "after testing. \n" - "\n" - "* Set \"Is Destructive\" (value=4) if the diagnostic " - "will destroy data, or reconfigure the Element that is " - "being tested. \n" - "\n" - "* \"Is Risky\" (value=5) indicates that data loss may " - "occur if the test is interrupted. Some tests make copies " - "of data, perform the test, and restore the data " - "returning the tested entity to its previous " - "configuration. If the test is interrupted, then loss of " - "data or reconfiguration of the tested " - "ManagedSystemElement may occur. \n" - "\n" - "* If \"Is Package\" (value=6) is set, this test is " - "actually a set of lower level diagnostics, that are " - "packaged together by the test. This packaging is " - "implemented by the diagnostic test, not aggregated by " - "CIM. Information and results associated with the " - "individual tests in the package may be requested by " - "using the \"Subtests\" value in the " - "DiagnosticSetting.LogOptions array. \n" - "\n" - "(value=7) was \"Supports PercentOfTestCoverage\" in " - "Version 2.6. Value = 7 is being deprecated. Instead, it " - "should be described in DiagnosticServiceCapabilities. \n" - "\n" - "\"Is Synchronous\" (value=8) indicates that this " - "diagnostic service will complete before the " - "RunDiagnostic method returns to the caller. A Job is " - "still created that can be accessed by the client for " - "accounting purposes, but the ability to track progress " - "and status of the Job are lost. Additionally, in certain " - "environments, the client may be \"blocked\" from further " - "action until the service completes. \n" - "\"Media Required\" (value=9) indicates that this " - "diagnostic service requires that media be inserted into " - "the device in order to perform the service. \"Additional " - "Hardware Required\" (value=10) indicates that this " - "diagnostic service requires that some additional " - "hardware is installed (e.g., wrap plug) in order to " - "perform the service." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10" }, - Values { "Unknown", "Other", "Is Exclusive", - "Is Interactive", "Is Destructive", "Is Risky", - "Is Package", "Reserved", "Is Synchronous", - "Media Required", "Additional Hardware Required" }, - ModelCorrespondence { - "CIM_DiagnosticTest.OtherCharacteristicsDescriptions" }] - uint16 Characteristics[]; - - [Deprecated { - "CIM_DiagnosticTest.OtherCharacteristicsDescriptions" }, - Description ( - "Provides additional information for the Characteristic " - "when its value is set to 1 (\"Other\")." ), - ModelCorrespondence { "CIM_DiagnosticTest.Characteristics" }] - string OtherCharacteristicDescription; - - [Description ( - "OtherCharacteristicsDescriptions is a Bag array that " - "contains an element with additional information for each " - "Characteristics element with a value of 1 (\"Other\")." ), - ModelCorrespondence { "CIM_DiagnosticTest.Characteristics" }] - string OtherCharacteristicsDescriptions[]; - - [Deprecated { "CIM_Service.Started" }, - Description ( - "This property is being deprecated. The boolean Started " - "property inherited from CIM_Service should be used " - "instead. \n" - "If this test is currently being performed, the InUse " - "property is set to TRUE. To determine which " - "ManagedSystem Element is being tested, query the " - "DiagnosticResult objects associated with this test " - "(query DiagnosticResultForTest), and for which the " - "TestState equals 4 (\"In Progress\"). The " - "DiagnosticResult object is associated with the System " - "Element under test, using DiagnosticResultForMSE." )] - boolean IsInUse; - - [Deprecated { "CIM_ServiceAffectsElement" }, - Description ( - "This property is being deprecated and replaced with a " - "more general method for indicating Managed Elements that " - "are affected by this Test. The DiagnosticService parent " - "has a ServiceAffectsElement association to a Managed " - "Element for this purpose. \n" - "The \"Expensive\" qualifier can be applied to this class " - "and its RunTest method. If so, the ResourcesUsed " - "property describes the resources that are capitalized, " - "based on a default setup for the test. Multiple " - "resources can be specified since the property is an " - "array." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "14", "15", "16", "17", "18", "19", - "20", "21", "22", "23", "24", "25", "26", "27", "28" }, - Values { "CPU", "Memory", "Hard Disk", "CDROM", "Floppy", - "PCI Bus", "USB Bus", "1394 Bus", "SCSI Bus", "IDE Bus", - "Network", "ISA Bus", "EISA Bus", "VESA Bus", - "PCMCIA Bus", "CardBus", "Access.bus", "NuBus", "AGP", - "VME Bus", "Sbus IEEE 1396-1993", "MCA Bus", "GIO Bus", - "XIO Bus", "HIO Bus", "PMC Bus", "SIO Bus" }] - uint16 ResourcesUsed[]; - - [Description ( - "The descriptions for each test type are below: \n" - "\n" - "* If \"Functional\" (value=2) is set, this tests one, " - "more or all the functionality of the element. \n" - "\n" - "* If \"Stress\" (value=3) is set, this test is a stress " - "test or exerciser for the element. \n" - "\n" - "* If \"Health Check\" (value=4) is set, this test " - "validates the current health of the element. \n" - "\n" - "* If \"Access Test\" (value=5) is set, this test " - "verifies the element is accessible to the system and " - "user. This would include access through the OS as a user " - "would access the element. \n" - "\n" - "* If \"Media Verify\" (value=6) is set, this test " - "verifies the media for the element. This does not " - "validate that specific data is correctly written on the " - "media or even if data can be written to the media, but " - "verifies that the media itself has no faults." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "0x8000.." }, - Values { "Unknown", "Other", "Functional", "Stress", - "Health Check", "Access Test", "Media Verify", - "DMTF Reserved", "Vendor Reserved" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_DiagnosticTest.OtherTestTypesDescriptions" }] - uint16 TestTypes[]; - - [Description ( - "OtherTestTypesDescriptions is an array that contains an " - "element with additional information for each TestTypes " - "element with a value of 1 (\"Other\")." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_DiagnosticTest.TestTypes" }] - string OtherTestTypesDescriptions[]; - - - [Deprecated { "CIM_DiagnosticService.RunDiagnostic" }, - Description ( - "This method is being deprecated and replaced by the " - "RunDiagnostic method in the DiagnosticService class. \n" - "The RunTest method executes this test for the specified " - "ManagedSystemElement. The use of this method has been " - "deprecated. Instead, the RunDiagnostic method (inherited " - "from DiagnosticService) should be used. \n" - "The RunTest method executes this test for the specified " - "ManagedSystemElement (defined using the SystemElement " - "input parameter). Results of the test are stored in a " - "Diagnostic Result object, a reference to which is " - "returned as the Result output parameter. How the test " - "should execute, i.e. its settings, is defined in a " - "DiagnosticSetting object (or by a subclass of " - "DiagnosticSetting). A reference to a Setting object is " - "specified using the Setting input parameter. If a " - "reference is not passed into the method, then a default " - "DiagnosticSetting may be used. This default Setting is " - "associated with the DiagnoticTest using the " - "DefaultSetting relationship of the Core Model. \n" - "When RunTest starts execution, the settings, which are " - "time sensitive, should be evaluated and captured. This " - "is suggested since the DiagnosticSetting object can be " - "modified at any time, and therefore the current test " - "settings could be lost. \n" - "The method\'s return codes are expected to adhere to the " - "XML return codes as they are introduced. Currently, the " - "standard return values are: \n" - "0 = OK (function succeeded, but the test itself may have " - "failed \n" - "1 = Unspecified Error (function failed for unspecified " - "reasons) \n" - "2 = Not Implemented (function is not implemented for " - "this instance) \n" - "3 = Out Of Resources (component could not allocate " - "required resources, e.g. memory, disk space, etc.) \n" - "In a subclass, the set of possible return codes could be " - "specified, using a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \'translated\' " - "may also be specified in the subclass as a Values array " - "qualifier." )] - uint32 RunTest( - [IN, Description ( - "The ManagedSystemElement on which the test will run." - )] - CIM_ManagedSystemElement REF SystemElement, - [IN, Description ( - "How the test should execute, i.e. its settings, is " - "defined in a DiagnosticSetting object (or by a " - "subclass of DiagnosticSetting). A reference to a " - "Setting object is specified using the Setting " - "input parameter. If a reference is not passed into " - "the method, then a default DiagnosticSetting may " - "be used. This default Setting is associated with " - "the DiagnoticTest using the DefaultSetting " - "relationship of the Core Model." )] - CIM_DiagnosticSetting REF Setting, - [IN ( false ), OUT, Description ( - "Results of the test are stored in a " - "DiagnosticResult object, a reference to which is " - "returned as the Result output parameter." )] - CIM_DiagnosticResult REF Result); - - [Deprecated { "CIM_Log.ClearLog" }, - Description ( - "This method is deprecated in favor of using the " - "corresponding functionality contained in the Log class, " - "this is consistant with the deprecation of the Result " - "class in favor of Log. \n" - "Execution of this method will delete all instances of " - "the DiagnosticResultForMSE object, for this " - "DiagnosticTest and the specified ManagedSystemElement " - "(defined using the SystemElement input parameter). The " - "DiagnosticResults referenced in the " - "DiagnosticResultForMSE instances will be deleted. Also " - "the association DiagnosticResultForTest that refers to " - "the DiagnosticResult object, and this test will be " - "deleted. \n" - "One output parameter is defined - ResultsNotCleared - " - "which is a string array that lists the keys of the " - "DiagnosticResults which could not be deleted. This " - "information enables those Results to be revisited and " - "either manually removed, or other corrective action " - "taken. \n" - "The method\'s return codes are expected to adhere to the " - "XML return codes as they are introduced. Currently, the " - "standard return values are: \n" - "0 = OK (function succeeded, but the test itself may have " - "failed) \n" - "1 = Unspecified Error (function failed for unspecified " - "reasons) \n" - "2 = Not Implemented (function is not implemented for " - "this instance) \n" - "3 = Out Of Resources (component could not allocate " - "required resources, e.g. memory, disk space, etc.) \n" - "In a subclass, the set of possible return codes could be " - "specified, using a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \'translated\' " - "may also be specified in the subclass as a Values array " - "qualifier." )] - uint32 ClearResults( - [IN, Description ( - "The Managed System Element for which results will be cleared." - )] - CIM_ManagedSystemElement REF SystemElement, - [IN ( false ), OUT, Description ( - "A string array that lists the keys of the " - "DiagnosticResults which could not be deleted." )] - string ResultsNotCleared[]); - - [Deprecated { "CIM_ConcreteJob.RequestStateChange" }, - Description ( - "After invocation of this method and its completion, the " - "specified test(s) will be discontinued for the indicated " - "ManagedSystemElement (defined by the SystemElement input " - "parameter). The test to discontinue is specified using " - "the Result input parameter. If all instances of this " - "test should be stopped for the SystemElement, then the " - "Result reference should be NULL. Upon completion of the " - "method, test status and other information (such as " - "PercentComplete) will be stored in the DiagnosticResult " - "instance defined by the Result input parameter. The " - "output parameter, TestingStopped, is used as follows: \n" - "Set to TRUE if testing was successfully stopped. \n" - "Set to FALSE if the current test(s) can not be stopped. \n" - "If set to FALSE, testing will stop when the diagnostic " - "is able to do so safely. To determine if/when the " - "testing is stopped, check the TestState property in the " - "DiagnosticResult instance defined by the Result " - "parameter. TestState will change from \"In Progress\" to " - "\"Stopped\" (from 4 to 5). \n" - "The method\'s return codes are expected to adhere to the " - "XML return codes as they are introduced. Currently, the " - "standard return values are: \n" - "0 = OK (function succeeded, but the test itself may have " - "failed \n" - "1 = Unspecified Error (function failed for unspecified " - "reasons) \n" - "2 = Not Implemented (function is not implemented for " - "this instance) \n" - "3 = Out Of Resources (component could not allocate " - "required resources, e.g. memory, disk space, etc.) \n" - "In a subclass, the set of possible return codes could be " - "specified, using a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \'translated\' " - "may also be specified in the subclass as a Values array " - "qualifier." )] - uint32 DiscontinueTest( - [IN, Description ( - "Testing will be discontinued for the indicated " - "ManagedSystemElement defined by the SystemElement " - "input parameter." )] - CIM_ManagedSystemElement REF SystemElement, - [IN, Description ( - "The test to discontinue is specified using the " - "Result input parameter." )] - CIM_DiagnosticResult REF Result, - [IN ( false ), OUT, Description ( - "TestingStopped, is set to TRUE if testing was " - "successfully stopped. It is set to FALSE if the " - "current test(s) can not be stopped. If set to " - "FALSE, testing will stop when the diagnostic is " - "able to do so safely. To determine if/when the " - "testing is stopped, check the TestState property " - "in the DiagnosticResult instance defined by the " - "Result parameter. TestState will change from \"In " - "Progress\" to \"Stopped\" (from 4 to 5)." )] - boolean TestingStopped); - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DiagnosticTestForMSE.mof b/build/vendor/dmtf_mof/System/CIM_DiagnosticTestForMSE.mof deleted file mode 100644 index 2392d09a..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DiagnosticTestForMSE.mof +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DiagnosticTestForMSE -// ================================================================== - [Association, Deprecated { "CIM_AvailableDiagnosticService" }, - Version ( "2.9.0" ), - UMLPackagePath ( "CIM::System::Diagnostics" ), - Description ( - "This class is being deprecated to promote its usage to the " - "DiagnosticService level. \n" - "This is an association class that relates a DiagnosticTest to " - "a ManagedSystemElement. Consumers wishing to \'diagnose\' a " - "particular Element could query this association, for the " - "Element, to determine what tests are available." )] -class CIM_DiagnosticTestForMSE : CIM_ProvidesServiceToElement { - - [Deprecated { "CIM_AvailableDiagnosticService.ServiceProvided" }, - Override ( "Antecedent" ), - Description ( - "The test that may be run against a ManagedSystemElement." )] - CIM_DiagnosticTest REF Antecedent; - - [Deprecated { "CIM_AvailableDiagnosticService.UserOfService" }, - Override ( "Dependent" ), - Description ( "The ManagedSystemElement that can be tested." )] - CIM_ManagedSystemElement REF Dependent; - - [Deprecated { - "CIM_AvailableDiagnosticService.EstimatedDurationOfService" }, - Description ( - "Estimated number of seconds to perform the referenced " - "DiagnosticTest against the ManagedSystemElement. Since " - "execution times could vary by Element, this property is " - "located in the association between the two entities. It " - "is also captured in DiagnosticResult, in the " - "EstimatedTimeOfPerforming property. \n" - "A CIM Consumer can compare this value with the value in " - "DiagnosticResult to get an idea of what impact their " - "settings have on test execution." ), - Units ( "Seconds" ), - ModelCorrespondence { - "CIM_DiagnosticResult.EstimatedTimeOfPerforming" }] - uint32 EstimatedTimeOfPerforming; - - [Deprecated { "CIM_ServiceAffectsElement.ElementEffects" }, - Description ( - "This property is being deprecated since the same " - "characterisitic can be published in the " - "CIM_ServiceAffectsElement.ElementEffects array as Value " - "= 2, \"Exclusive Use\". \n" - "If the DiagnosticTest referenced in this object can be " - "run concurrently against multiple SystemElements, but " - "only run one at a time for the referenced " - "ManagedSystemElement, then this boolean is set to TRUE. " - "Alternately, if the test can NOT be run concurrently " - "irregardless of the System Elements being tested, then " - "the more general \"Is Exclusive\" enumerated value (2) " - "should be set in DiagnosticTest. Characteristics." )] - boolean IsExclusiveForMSE; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DiagnosticTestInPackage.mof b/build/vendor/dmtf_mof/System/CIM_DiagnosticTestInPackage.mof deleted file mode 100644 index da65a79f..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DiagnosticTestInPackage.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DiagnosticTestInPackage -// ================================================================== - [Association, Deprecated { "No value" }, - Aggregation, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::System::Diagnostics" ), - Description ( - "This class is being deprecated. Tests should be grouped at the " - "test level, not in the model. Therefore, the association is " - "not appropriate. /n This is an association class that " - "identifies a Diagnostic Test as made up of lower level Tests. " - "In this case, the test identified as the GroupComponent " - "reference (i.e, the higher level test) would have the \"Is " - "Package\" enumerated value specified in DiagnosticTest. " - "Characteristics." )] -class CIM_DiagnosticTestInPackage : CIM_Component { - - [Deprecated { "No value" }, - Aggregate, Override ( "GroupComponent" ), - Description ( - "The DiagnosticTest object that acts as the container for " - "all the tests of the package." )] - CIM_DiagnosticTest REF GroupComponent; - - [Deprecated { "No value" }, - Override ( "PartComponent" ), - Description ( - "The DiagnosticTest object that is one of the elements of " - "the package." )] - CIM_DiagnosticTest REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DiagnosticsLog.mof b/build/vendor/dmtf_mof/System/CIM_DiagnosticsLog.mof deleted file mode 100644 index ad2e18da..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DiagnosticsLog.mof +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Deprecated { "CIM_DiagnosticLog" }, - Version ( "2.22.0" ), - UMLPackagePath ( "CIM::System::Logs" ), - Description ( - "DiagnosticsLog is being deprecated in order to change the " - "class name to DiagnosticLog. This is being done to follow the " - "naming convention used for other diagnostic model classes. \n" - "DiagnosticsLog serves as an aggregation point for " - "DiagnosticRecord objects. This class exists in order to " - "encourage the use of a consolidated record management " - "methodology for diagnostics. A common set of providers for " - "this log and its associated records SHOULD be used to control " - "functions such as record persistence, query support and " - "overall data integrity in a consistent manner." )] -class CIM_DiagnosticsLog : CIM_RecordLog { - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_Directory.mof b/build/vendor/dmtf_mof/System/CIM_Directory.mof deleted file mode 100644 index 19a828e0..00000000 --- a/build/vendor/dmtf_mof/System/CIM_Directory.mof +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Directory -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::FileElements" ), - Description ( - "Directory is a type of File that logically groups Files " - "\'contained\' in it, and provides path information for the " - "grouped Files." )] -class CIM_Directory : CIM_LogicalFile { - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_DirectoryContainsFile.mof b/build/vendor/dmtf_mof/System/CIM_DirectoryContainsFile.mof deleted file mode 100644 index 61b8da0a..00000000 --- a/build/vendor/dmtf_mof/System/CIM_DirectoryContainsFile.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_DirectoryContainsFile -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::System::FileElements" ), - Description ( - "Specifies the hierarchical arrangement of LogicalFiles in a " - "Directory." )] -class CIM_DirectoryContainsFile : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( "The Directory." )] - CIM_Directory REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The LogicalFile \'contained within\' the Directory." )] - CIM_LogicalFile REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_Export.mof b/build/vendor/dmtf_mof/System/CIM_Export.mof deleted file mode 100644 index 348df718..00000000 --- a/build/vendor/dmtf_mof/System/CIM_Export.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Export -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::FileElements" ), - Description ( - "An association between a LocalFileSystem and its Directories " - "indicating that the specified Directories are available for " - "mount. When exporting an entire FileSystem, the Directory " - "should reference the topmost directory of the FileSystem." )] -class CIM_Export { - - [Key, Max ( 1 ), - Description ( "The LocalFileSystem." )] - CIM_LocalFileSystem REF LocalFS; - - [Key, Description ( "The Directory exported for mount." )] - CIM_Directory REF Directory; - - [Description ( "Name under which the Directory is exported." )] - string ExportedDirectoryName; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_FIFOPipeFile.mof b/build/vendor/dmtf_mof/System/CIM_FIFOPipeFile.mof deleted file mode 100644 index d4046dc4..00000000 --- a/build/vendor/dmtf_mof/System/CIM_FIFOPipeFile.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FIFOPipeFile -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::FileElements" ), - Description ( - "FIFOPipeFile is a special type of LogicalFile that represents " - "an interprocess FIFO (sometimes referred to as a \"named " - "pipe\"). Operating systems use this convention to manage " - "interprocess communication through processes reading and " - "writing the FIFO. The FIFO can be accessed by unrelated " - "processes, in contrast to the more well-known command line " - "redirection mechanism (e.g. UNIX\'s \'ps -eaf | grep foo\', " - "also known as an \"unnamed pipe\"). An exemplary operating " - "system implementation (using the FIFO concept) is the UNIX " - "S_IFIFO file type." )] -class CIM_FIFOPipeFile : CIM_LogicalFile { - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_FileIdentity.mof b/build/vendor/dmtf_mof/System/CIM_FileIdentity.mof deleted file mode 100644 index 07040ee7..00000000 --- a/build/vendor/dmtf_mof/System/CIM_FileIdentity.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FileIdentity -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::Unix" ), - Description ( - "CIM_FileIdentity indicates that a UnixFile describes Unix- " - "specific aspects of the various subclasses of LogicalFile. The " - "association exists since it forces UnixFile to be weak to " - "(scoped by) the LogicalFile. This is not true in the " - "association\'s superclass, LogicalIdentity." )] -class CIM_FileIdentity : CIM_LogicalIdentity { - - [Override ( "SystemElement" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The Logical File." )] - CIM_LogicalFile REF SystemElement; - - [Override ( "SameElement" ), - Weak, Max ( 1 ), - Description ( - "SameElement represents the additional aspects of the " - "Unix/Linux Logical file." )] - CIM_UnixFile REF SameElement; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_FileStorage.mof b/build/vendor/dmtf_mof/System/CIM_FileStorage.mof deleted file mode 100644 index de8f0181..00000000 --- a/build/vendor/dmtf_mof/System/CIM_FileStorage.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FileStorage -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::System::FileElements" ), - Description ( - "A link between the FileSystem and the LogicalFile(s) addressed " - "through this FileSystem." )] -class CIM_FileStorage : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The FileSystem." )] - CIM_FileSystem REF GroupComponent; - - [Override ( "PartComponent" ), - Weak, Description ( - "The LogicalFile stored in the context of the FileSystem." )] - CIM_LogicalFile REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_FileSystem.mof b/build/vendor/dmtf_mof/System/CIM_FileSystem.mof deleted file mode 100644 index 874b56e1..00000000 --- a/build/vendor/dmtf_mof/System/CIM_FileSystem.mof +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FileSystem -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::System::FileElements" ), - Description ( - "A file or dataset store local to a System (such as a " - "ComputerSystem or an ApplicationSystem) or remotely mounted " - "from a file server." )] -class CIM_FileSystem : CIM_EnabledLogicalElement { - - [Key, Description ( - "The scoping System\'s CreationClassName. Note that this " - "class was originally defined in the scope of a " - "ComputerSystem, and was later allowed to be scoped by " - "any System (for example, a computer or application " - "system). Unfortunately, the property name, " - "CSCreationClassName, could not be changed (for example, " - "to SystemCreationClass Name) without deprecating the " - "class. This change was not deemed critical to the " - "semantics and therefore did not merit deprecation. So, " - "the property name remains." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.CreationClassName" )] - string CSCreationClassName; - - [Key, Description ( - "The scoping System\'s Name. Note that this class was " - "originally defined in the scope of a ComputerSystem, and " - "was later allowed to be scoped by any System (for " - "example, a computer or application system). " - "Unfortunately, the property name, CSName, could not be " - "changed (for example, to SystemName) without deprecating " - "the class. This change was not deemed critical to the " - "semantics and therefore did not merit deprecation. So, " - "the property name remains." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.Name" )] - string CSName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Override ( "Name" ), - Description ( - "The inherited Name serves as key of a FileSystem " - "instance within a ComputerSystem." ), - MaxLen ( 256 )] - string Name; - - [Description ( - "Path name or other information defining the root of the " - "FileSystem." ), - MappingStrings { - "MIB.IETF|HOST-RESOURCES-MIB.hrFSMountPoint", - "MIF.DMTF|Host File System|001.2" }] - string Root; - - [Description ( - "FileSystems can read/write data in blocks which are " - "defined independently of the underlying StorageExtents. " - "This property captures the FileSystem\'s block size for " - "data storage and retrieval." ), - Units ( "Bytes" )] - uint64 BlockSize; - - [Description ( - "The FileSystemSize property stores the total size of the " - "File System in bytes. If unknown, enter 0." ), - Units ( "Bytes" ), - MappingStrings { "MIF.DMTF|Host File System|001.13" }] - uint64 FileSystemSize; - - [Description ( - "AvailableSpace indicates the total amount of free space " - "for the FileSystem, in bytes. If unknown, enter 0." ), - Units ( "Bytes" ), - Gauge, MappingStrings { "MIF.DMTF|Host File System|001.14", - "MIF.DMTF|Partition|002.4" }] - uint64 AvailableSpace; - - [Description ( - "Indicates that the FileSystem is designated as read only." ), - MappingStrings { "MIB.IETF|HOST-RESOURCES-MIB.hrFSAccess", - "MIF.DMTF|Host File System|001.5" }] - boolean ReadOnly; - - [Description ( - "A free form string indicating the algorithm or tool used " - "to encrypt the FileSystem. If it is not possible or not " - "desired to describe the encryption scheme (perhaps for " - "security reasons), recommend using the following words: " - "\"Unknown\" to represent that it is not known whether " - "the FileSystem is encrypted or not, \"Encrypted\" to " - "represent that the File System is encrypted but either " - "its encryption scheme is not known or not disclosed, and " - "\"Not Encrypted\" to represent that the FileSystem is " - "not encrypted." ), - MappingStrings { "MIF.DMTF|Partition|002.8" }] - string EncryptionMethod; - - [Description ( - "A free form string indicating the algorithm or tool used " - "to compress the FileSystem. If it is not possible or not " - "desired to describe the compression scheme (perhaps " - "because it is not known), recommend using the following " - "words: \"Unknown\" to represent that it is not known " - "whether the FileSystem is compressed or not, " - "\"Compressed\" to represent that the File System is " - "compressed but either its compression scheme is not " - "known or not disclosed, and \"Not Compressed\" to " - "represent that the FileSystem is not compressed." ), - MappingStrings { "MIF.DMTF|Partition|002.7" }] - string CompressionMethod; - - [Description ( - "Indicates that case sensitive file names are supported." )] - boolean CaseSensitive; - - [Description ( - "Indicates that the case of file names are preserved." )] - boolean CasePreserved; - - [Description ( - "Array defining the character sets or encoding supported " - "by the FileSystem. For example, the values, \"ASCII\" " - "(2) or \"ISO2022\" (4), may be specified." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Unknown", "Other", "ASCII", "Unicode", "ISO2022", - "ISO8859", "Extended UNIX Code", "UTF-8", "UCS-2" }] - uint16 CodeSet[]; - - [Description ( - "Integer indicating the maximum length of a file name " - "within the FileSystem. 0 indicates that there is no " - "limit on file name length." )] - uint32 MaxFileNameLength; - - [Description ( - "The minimum file allocation size (an integral number of " - "blocks), imposed by the FileSystem. (The size of a block " - "is specified in the BlockSize property for the " - "FileSystem.) Minimum allocation size is the smallest " - "amount of storage allocated to a LogicalFile by the " - "FileSystem. This is not a mandatory minimum allocation " - "for all FileSystems. Under stress conditions, some " - "FileSystems may allocate storage in amounts smaller than " - "the ClusterSize." )] - uint32 ClusterSize; - - [Description ( - "String describing the type of FileSystem and therefore, " - "its conventions. For example, \"NTFS\" or \"S5\" may be " - "listed as well as any additional information on the " - "FileSystem\'s implementation. Since various flavors of " - "FileSystems (like S5) exist, this property is defined as " - "a string." ), - MappingStrings { "MIF.DMTF|Partition|002.6", - "MIF.DMTF|Host File System|001.4" }] - string FileSystemType; - - [Description ( - "An enumerated value representing the FileSystem\'s " - "perception of its own persistence characteristics. This " - "property would typically be set at the time the " - "FileSystem is instantiated and would not be changed by " - "external actions. A value of \"Persistent\" indicates " - "that the FileSystem is persistent, will be preserved " - "through an orderly shutdown and should be protected. A " - "value of \"Temporary\" indicates that the FileSystem is " - "non-persistent, should not be protected and may not " - "survive a shutdown. A value of \"External\" indicates " - "that the FileSystem is controlled outside of the scope " - "of the operating environment and may need to be " - "protected by specialized means. A value of \"Other\" is " - "provided to allow for additional persistence types, to " - "be described in the OtherPersistenceType attribute, and " - "is expected to be rarely, if ever, used. A value of " - "\"Unknown\" indicates that the persistence of the " - "FileSystem can not be determined." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "Persistent", "Temporary", - "External" }, - ModelCorrespondence { "CIM_FileSystem.OtherPersistenceType" }] - uint16 PersistenceType; - - [Description ( - "A string describing the persistence characteristics when " - "PersistenceType is \"Other\"." ), - ModelCorrespondence { "CIM_FileSystem.PersistenceType" }] - string OtherPersistenceType; - - [Description ( - "The number of files contained in the FileSystem." )] - uint64 NumberOfFiles; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_FileSystemCapabilities.mof b/build/vendor/dmtf_mof/System/CIM_FileSystemCapabilities.mof deleted file mode 100644 index 5fec0354..00000000 --- a/build/vendor/dmtf_mof/System/CIM_FileSystemCapabilities.mof +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FileSystemCapabilities -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::System::FilesystemServices" ), - Description ( - "This class defines the abilities for persistence and " - "recoverability of a FileSystem. This information is tied to " - "the FileSystem using the ElementCapabilities association." )] -class CIM_FileSystemCapabilities : CIM_Capabilities { - - [Description ( - "An array of enumerated values representing the " - "persistence capabilities of the FileSystem. A value of " - "\"Persistent\" indicates that the FileSystem supports " - "persistence, can be preserved through an orderly " - "shutdown and could be protected. A value of \"Temporary\" " - "indicates that the FileSystem supports non-persistence, " - "may not be protected and may not survive a shutdown. A " - "value of \"External\" indicates that the FileSystem " - "could controlled outside of the operating environment " - "and may need to be protected by specialized means. A " - "value of \"Other\" is provided to allow for additional " - "persistence types, to be described in the " - "OtherPersistenceType attribute, and is expected to be " - "rarely, if ever, used." ), - ValueMap { "1", "2", "3", "4" }, - Values { "Other", "Persistent", "Temporary", "External" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_FileSystemCapabilities.SupportedPersistenceTypes", - "CIM_FileSystem.PersistenceType" }] - uint16 SupportedPersistenceTypes[]; - - [Description ( - "An array of strings describing the persistence " - "capabilities where the corresponding entry in " - "SupportedPersistenceTypes has a value of \"Other\". This " - "value is ignored in all other cases." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_FileSystemCapabilities.SupportedPersistenceTypes", - "CIM_FileSystem.OtherPersistenceType" }] - string SupportedOtherPersistenceTypes[]; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_FileSystemSettingData.mof b/build/vendor/dmtf_mof/System/CIM_FileSystemSettingData.mof deleted file mode 100644 index fecaf5ba..00000000 --- a/build/vendor/dmtf_mof/System/CIM_FileSystemSettingData.mof +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_FileSystemSettingData -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::System::FileElements" ), - Description ( - "This class allows a client to specify the desired persistence " - "of a FileSystem. This information is tied to the FileSystem " - "using the ElementSettingData association." )] -class CIM_FileSystemSettingData : CIM_ScopedSettingData { - - [Write, Description ( - "An enumerated value representing the intended " - "persistence characteristics of the FileSystem. A value " - "of \"Persistent\" indicates that the FileSystem should " - "be persistent, should be preserved through an orderly " - "shutdown and should be protected. A value of \"Temporary\" " - "indicates that the FileSystem should be non-persistent, " - "should not be protected and may not survive a shutdown. " - "A value of \"External\" indicates that the FileSystem " - "should be controlled outside of the operating " - "environment and may need to be protected by specialized " - "means. A value of \"Other\" is provided to allow for " - "additional persistence types, to be described in the " - "OtherPersistenceType attribute, and is expected to be " - "rarely, if ever, used." ), - ValueMap { "1", "2", "3", "4" }, - Values { "Other", "Persistent", "Temporary", "External" }, - ModelCorrespondence { - "CIM_FileSystemSettingData.OtherPersistenceType", - "CIM_FileSystem.PersistenceType" }] - uint16 PersistenceType; - - [Write, Description ( - "A string describing the persistence characteristics when " - "PersistenceType is \"Other\"." ), - ModelCorrespondence { - "CIM_FileSystemSettingData.PersistenceType", - "CIM_FileSystem.OtherPersistenceType" }] - string OtherPersistenceType; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_HelpService.mof b/build/vendor/dmtf_mof/System/CIM_HelpService.mof deleted file mode 100644 index c23c6301..00000000 --- a/build/vendor/dmtf_mof/System/CIM_HelpService.mof +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HelpService -// ================================================================== - [Version ( "2.9.0" ), - UMLPackagePath ( "CIM::System::Help" ), - Description ( - "HelpService provides the ability for a managed element to " - "describe and provide access to its Help information. Support " - "for various delivery mechanisms and data formats can be " - "specified so that the most suitable data representation can be " - "chosen. In adddition, a request can be made to launch a \"Help\" " - "program, if available." )] -class CIM_HelpService : CIM_Service { - - [Description ( - "Defines the delivery methods supported by this help " - "service./n \"File Contents\" indicates that the contents " - "of the Help file is returned by the GetHelp method. \n" - "\"File Pointer\" indicates that a fully specified path " - "to the Help file is returned by the GetHelp method. \n" - "\"Associated File\" indicates that associations to " - "CIM_LogicalFile instance(s) is available. \n" - "\"URL\" indicates that a URL to a website is returned by " - "the GetHelp method. \n" - "\"Program\" indicates that a Help program is launched " - "(on the local system) by the GetHelp method." ), - ValueMap { "1", "2", "3", "4", "5", "6" }, - Values { "Other", "File Contents", "File Pointer", - "Associated File", "URL", "Program" }, - ModelCorrespondence { - "CIM_HelpService.OtherDeliveryOptionDescription", - "CIM_HelpServiceAvailableToFile" }] - uint16 DeliveryOptions[]; - - [Description ( - "Describes the nature of the delivery method when " - "DeliveryOptions = \"Other\" is specified." ), - ModelCorrespondence { "CIM_HelpService.DeliveryOptions" }] - string OtherDeliveryOptionDescription; - - [Description ( - "List of all of the document names/ids that are available " - "via this help service and NOT exposed by the " - "HelpServiceAvailableToFile association." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_HelpService.DocumentDescriptions", - "CIM_HelpService.DocumentFormat" }] - string DocumentsAvailable[]; - - [Description ( - "List of descriptions for the corresponding documents." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_HelpService.DocumentsAvailable", - "CIM_HelpService.DocumentFormat" }] - string DocumentDescriptions[]; - - [Description ( - "List of document formats for the corresponding documents." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6" }, - Values { "Unknown", "Other", "XML", "HTML", "Binary", - "Executable", ".hlp" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_HelpService.OtherDocumentFormatDescription", - "CIM_HelpService.DocumentDescriptions", - "CIM_HelpService.DocumentsAvailable" }] - uint16 DocumentFormat[]; - - [Description ( - "Describes the format of the document when " - "DocumentFormat= \"Other\" is specified." ), - ModelCorrespondence { "CIM_HelpService.DocumentFormat" }] - string OtherDocumentFormatDescription; - - - [Description ( - "The GetHelp method produces, as an OUT parameter, a " - "string containing document information as specified by " - "the input parameters. The input parameters are expected " - "to be valid sets of values from the corresponding " - "indexed properties of this class." ), - ValueMap { "0", "1", "2", "3", "4", "5", "..", "0x1000", - "0x1001", "0x1002..0x7FFF", "0x8000..0xFFFF" }, - Values { "Document returned with no error", "Not Supported", - "Unspecified Error", "Timeout", "Failed", - "Invalid Parameter", "DMTF Reserved", "Busy", - "Requested Document not found", "Method Reserved", - "Vendor Reserved" }] - uint32 GetHelp( - [IN, Description ( - "The name/id of the requested document or the " - "reference to the associated document." ), - ModelCorrespondence { - "CIM_HelpService.DocumentsAvailable", - "CIM_HelpServiceAvailableToFile.UserOfService" }] - string RequestedDocument, - [IN, OUT, Description ( - "The requested document format is passed in. The " - "actual document format is returned." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6" }, - Values { "Don\'t Care", "Other", "XML", "HTML", - "Binary", "Executable", ".hlp" }, - ModelCorrespondence { "CIM_HelpService.DocumentFormat" }] - uint16 Format, - [IN, Description ( "The requested delivery mechanism." ), - ValueMap { "1", "2", "3", "5", "6" }, - Values { "Other", "File Contents", "File Pointer", - "URL", "Program" }, - ModelCorrespondence { "CIM_HelpService.DeliveryOptions" }] - uint16 RequestedDelivery, - [IN ( false ), OUT, Description ( - "If RequestedDelivery = \n" - "File Contents, then the string contains the " - "contents. \n" - "File Pointer, then the string contains a pointer " - "to the file. \n" - "File Reference, then the string contains a REF to " - "a CIM_LogicalFile instance. \n" - "URL, then then the string contains a URL to the " - "help site. \n" - "Program, then the string is empty; the program was " - "launched." )] - string DocumentInfo); - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_HelpServiceAvailableToFile.mof b/build/vendor/dmtf_mof/System/CIM_HelpServiceAvailableToFile.mof deleted file mode 100644 index e25aff69..00000000 --- a/build/vendor/dmtf_mof/System/CIM_HelpServiceAvailableToFile.mof +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HelpServiceAvailableToFile -// ================================================================== - [Association, Version ( "2.9.0" ), - UMLPackagePath ( "CIM::System::Help" ), - Description ( - "CIM_HelpServiceAvailableToFile indicates that the service is " - "available for accessing the help file." )] -class CIM_HelpServiceAvailableToFile : CIM_ServiceAvailableToElement { - - [Override ( "ServiceProvided" ), - Description ( "The Service that is available." )] - CIM_HelpService REF ServiceProvided; - - [Override ( "UserOfService" ), - Description ( "The file that make use of this Service." )] - CIM_LogicalFile REF UserOfService; - - [Description ( "Document format for the associated file." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6" }, - Values { "Unknown", "Other", "XML", "HTML", "Binary", - "Executable", ".hlp" }, - ModelCorrespondence { - "CIM_HelpServiceAvailableToFile.OtherDocumentFormatDescription" }] - uint16 DocumentFormat; - - [Description ( - "Describes the format of the file when DocumentFormat= " - "\"Other\" is specified." ), - ModelCorrespondence { - "CIM_HelpServiceAvailableToFile.DocumentFormat" }] - string OtherDocumentFormatDescription; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_HostedBootSAP.mof b/build/vendor/dmtf_mof/System/CIM_HostedBootSAP.mof deleted file mode 100644 index c234e12d..00000000 --- a/build/vendor/dmtf_mof/System/CIM_HostedBootSAP.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HostedBootSAP -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::System::Boot" ), - Description ( - "HostedBootSAP defines the hosting UnitaryComputerSystem for a " - "BootSAP. Since this relationship is subclassed from " - "HostedAccessPoint, it inherits the scoping/naming scheme " - "defined for AccessPoint - where an AccessPoint is weak to its " - "hosting System. In this case, a BootSAP must be weak to its " - "hosting UnitaryComputerSystem." )] -class CIM_HostedBootSAP : CIM_HostedAccessPoint { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The UnitaryComputerSystem." )] - CIM_ComputerSystem REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The BootSAP hosted on the UnitaryComputer System." )] - CIM_BootSAP REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_HostedBootService.mof b/build/vendor/dmtf_mof/System/CIM_HostedBootService.mof deleted file mode 100644 index f4e85273..00000000 --- a/build/vendor/dmtf_mof/System/CIM_HostedBootService.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HostedBootService -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::Boot" ), - Description ( - "HostedBootService defines the hosting System for a Boot " - "Service. Since this relationship is subclassed from Hosted " - "Service, it inherits the scoping/naming scheme defined for " - "Service - where a Service is weak to its hosting System." )] -class CIM_HostedBootService : CIM_HostedService { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The hosting System." )] - CIM_System REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The BootService hosted on the System." )] - CIM_BootService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_HostedClusterSAP.mof b/build/vendor/dmtf_mof/System/CIM_HostedClusterSAP.mof deleted file mode 100644 index 1cf0b944..00000000 --- a/build/vendor/dmtf_mof/System/CIM_HostedClusterSAP.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HostedClusterSAP -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::SystemElements" ), - Description ( - "HostedClusterSAP defines the hosting ComputerSystem for a " - "ClusteringSAP. Since this relationship is subclassed from " - "HostedAccessPoint, it inherits the scoping/naming scheme " - "defined for AccessPoint - where an AccessPoint is weak to its " - "hosting System. In this case, a ClusteringSAP must be weak to " - "its hosting ComputerSystem." )] -class CIM_HostedClusterSAP : CIM_HostedAccessPoint { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The ComputerSystem." )] - CIM_ComputerSystem REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The ClusteringSAP that is hosted on the ComputerSystem." )] - CIM_ClusteringSAP REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_HostedClusterService.mof b/build/vendor/dmtf_mof/System/CIM_HostedClusterService.mof deleted file mode 100644 index fe2a69aa..00000000 --- a/build/vendor/dmtf_mof/System/CIM_HostedClusterService.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HostedClusterService -// ================================================================== - [Association, Version ( "2.8.1000" ), - UMLPackagePath ( "CIM::System::SystemElements" ), - Description ( - "HostedClusterService defines the hosting Cluster for a " - "ClusteringService. Since this relationship is subclassed from " - "HostedService, it inherits the scoping/naming scheme defined " - "for Service - where a Service is weak to its hosting System. " - "In this case, a ClusteringService must be weak to its hosting " - "Cluster System." )] -class CIM_HostedClusterService : CIM_HostedService { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The Cluster." )] - CIM_ComputerSystem REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The ClusteringService that is hosted on the Cluster." )] - CIM_ClusteringService REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_HostedFileSystem.mof b/build/vendor/dmtf_mof/System/CIM_HostedFileSystem.mof deleted file mode 100644 index cd9f6cee..00000000 --- a/build/vendor/dmtf_mof/System/CIM_HostedFileSystem.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HostedFileSystem -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::System::FileElements" ), - Description ( - "A link between the System (such as a Computer or Application " - "System) and the FileSystem that is a part of it." )] -class CIM_HostedFileSystem : CIM_SystemComponent { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The System that hosts the FileSystem." )] - CIM_System REF GroupComponent; - - [Override ( "PartComponent" ), - Weak, Description ( - "The FileSystem that is part of the System and hosted on it." - )] - CIM_FileSystem REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_HostedJobDestination.mof b/build/vendor/dmtf_mof/System/CIM_HostedJobDestination.mof deleted file mode 100644 index e3df9e69..00000000 --- a/build/vendor/dmtf_mof/System/CIM_HostedJobDestination.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HostedJobDestination -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::System::Processing" ), - Description ( - "An association between a JobDestination and a System on which " - "it resides. The cardinality of this association is 1-to-many. " - "A System may host many Job queues. Job Destinations are weak " - "with respect to their hosting System. Heuristic: A " - "JobDestination is hosted on the System where the " - "LogicalDevices, SoftwareFeatures or Services that implement/ " - "provide the JobDestination are located." )] -class CIM_HostedJobDestination : CIM_HostedDependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The hosting System." )] - CIM_System REF Antecedent; - - [Override ( "Dependent" ), - Weak, Description ( - "The JobDestination hosted on the System." )] - CIM_JobDestination REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_HostingCS.mof b/build/vendor/dmtf_mof/System/CIM_HostingCS.mof deleted file mode 100644 index 76a34e35..00000000 --- a/build/vendor/dmtf_mof/System/CIM_HostingCS.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_HostingCS -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::System::SystemElements" ), - Description ( - "A VirtualComputerSystem is hosted on another ComputerSystem. " - "This association makes that relationship explicit." )] -class CIM_HostingCS : CIM_HostedDependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Description ( "The hosting ComputerSystem." )] - CIM_ComputerSystem REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The VirtualComputerSystem." )] - CIM_VirtualComputerSystem REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_IRQ.mof b/build/vendor/dmtf_mof/System/CIM_IRQ.mof deleted file mode 100644 index f46cb0c8..00000000 --- a/build/vendor/dmtf_mof/System/CIM_IRQ.mof +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_IRQ -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::SystemResources" ), - Description ( "Personal computer architecture IRQ." )] -class CIM_IRQ : CIM_SystemResource { - - [Key, Description ( - "The scoping ComputerSystem\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_ComputerSystem.CreationClassName" )] - string CSCreationClassName; - - [Key, Description ( "The scoping ComputerSystem\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_ComputerSystem.Name" )] - string CSName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Description ( - "A part of the object\'s key value, IRQ Number." ), - MappingStrings { "MIF.DMTF|IRQ|002.1" }] - uint32 IRQNumber; - - [Description ( "Availability of the IRQ." ), - ValueMap { "1", "2", "3", "4", "5" }, - Values { "Other", "Unknown", "Available", - "In Use/Not Available", "In Use and Available/Shareable" }, - MappingStrings { "MIF.DMTF|IRQ|002.2" }] - uint16 Availability; - - [Description ( - "IRQ trigger type indicating whether edge (value=4) or " - "level triggered (value=3) interrupts occur. Also, " - "\"Other\" (1) and \"Unknown\" (2) may be defined." ), - ValueMap { "1", "2", "3", "4" }, - Values { "Other", "Unknown", "Level", "Edge" }, - MappingStrings { "MIF.DMTF|IRQ|002.3", - "MIF.DMTF|System Resource IRQ Info|001.2" }] - uint16 TriggerType; - - [Description ( - "IRQ trigger level indicating whether the interrupt is " - "triggered by the hardware signal going high (value=4) or " - "low (value=3). Also, \"Other\" (1) and \"Unknown\" (2) " - "may be defined." ), - ValueMap { "1", "2", "3", "4" }, - Values { "Other", "Unknown", "Active Low", "Active High" }, - MappingStrings { "MIF.DMTF|System Resource IRQ Info|001.3" }] - uint16 TriggerLevel; - - [Override ( "Shareable" ), - Description ( - "Boolean indicating whether the IRQ can be shared." ), - MappingStrings { "MIF.DMTF|IRQ|002.4" }] - boolean Shareable; - - [Description ( - "The Hardware property indicates whether the interrupt is " - "hardware or software based. (If TRUE, the interrupt is " - "hardware based.) On a personal computer, a hardware IRQ " - "is a physical wire to a programmable interrupt " - "controller (PIC) chip, through which the CPU can be " - "notified of time critical events. Some IRQ lines are " - "reserved for standard Devices such as the keyboard, " - "floppy disk drives, and the system clock. A software " - "interrupt is a programmatic mechanism to allow an " - "application to get the attention of the Processor." )] - boolean Hardware; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_InstalledOS.mof b/build/vendor/dmtf_mof/System/CIM_InstalledOS.mof deleted file mode 100644 index 4981f6f5..00000000 --- a/build/vendor/dmtf_mof/System/CIM_InstalledOS.mof +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_InstalledOS -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::System::OperatingSystem" ), - Description ( - "A link between the ComputerSystem and the OperatingSystem(s) " - "installed or loaded on it. An OperatingSystem is \'installed\' " - "on a ComputerSystem, when placed on one of its StorageExtents " - "- for example, copied to a disk drive or downloaded to Memory. " - "Using this definition, an OperatingSystem is \'installed\' on " - "a NetPC when downloaded via the network." )] -class CIM_InstalledOS : CIM_SystemComponent { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The ComputerSystem." )] - CIM_ComputerSystem REF GroupComponent; - - [Override ( "PartComponent" ), - Weak, Description ( - "The OperatingSystem installed on the ComputerSystem." )] - CIM_OperatingSystem REF PartComponent; - - [Description ( - "Boolean indicating that the OperatingSystem is the " - "default OS for the ComputerSystem." ), - MappingStrings { "MIF.DMTF|Operating System|001.4" }] - boolean PrimaryOS; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_JobDestination.mof b/build/vendor/dmtf_mof/System/CIM_JobDestination.mof deleted file mode 100644 index 2edab651..00000000 --- a/build/vendor/dmtf_mof/System/CIM_JobDestination.mof +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_JobDestination -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::System::Processing" ), - Description ( - "JobDestination is an EnabledLogicalElement representing where " - "a Job is submitted for processing. It can refer to a queue " - "that contains zero or more Jobs, such as a print queue " - "containing print Jobs. JobDestinations are hosted on Systems, " - "similar to the way that Services are hosted on Systems. Also, " - "they may be enabled/disabled similar to Services." )] -class CIM_JobDestination : CIM_EnabledLogicalElement { - - [Key, Description ( "The scoping System\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.CreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The scoping System\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.Name" )] - string SystemName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Override ( "Name" ), - Description ( - "The inherited Name serves as key of a JobDestination " - "instance in a System." ), - MaxLen ( 256 )] - string Name; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_JobDestinationJobs.mof b/build/vendor/dmtf_mof/System/CIM_JobDestinationJobs.mof deleted file mode 100644 index 739a1d2a..00000000 --- a/build/vendor/dmtf_mof/System/CIM_JobDestinationJobs.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_JobDestinationJobs -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::Processing" ), - Description ( - "An association describing where a Job is submitted for " - "processing, ie to which JobDestination." )] -class CIM_JobDestinationJobs : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The JobDestination, possibly a queue." )] - CIM_JobDestination REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The Job that is in the Job queue/Destination." )] - CIM_Job REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_JobQueue.mof b/build/vendor/dmtf_mof/System/CIM_JobQueue.mof deleted file mode 100644 index 7cdfbfa8..00000000 --- a/build/vendor/dmtf_mof/System/CIM_JobQueue.mof +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::System::Processing" ), - Description ( - "Status and configuration of a JobQueue. Jobs are held on a " - "queue, and can move from queue to queue until being processed." )] -class CIM_JobQueue : CIM_JobDestination { - - [Description ( - "Provides queue-specific status information, beyond the " - "ManagedSystemElement.OperationalStatus property. This " - "property further qualifies the status of the queue, or " - "indicates a secondary condition (e.g. queue full)." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Other", "No Additional Status", - "Queue Full" }, - ModelCorrespondence { "CIM_JobQueue.QueueStatusInfo" }] - uint16 QueueStatus; - - [Description ( - "Provides a textual explanation for the status of the " - "queue. Information about both QueueStatus and the " - "OperationalStatus property (inherited from " - "ManagedSystemElement) may be described in " - "QueueStatusInfo. Note, however, that OperationalStatus\' " - "Descriptions (if available) MUST be provided in the " - "StatusDescriptions array, inherited from " - "ManagedSystemElement. This is where management clients " - "will expect to locate this information." ), - ModelCorrespondence { "CIM_JobQueue.QueueStatus" }] - string QueueStatusInfo; - - [Write, Description ( - "Specifies the priority that will be assigned to a new " - "Job being submitted to this queue, if the Job does not " - "explicitly specify a priority. Note that lower numbers " - "indicate higher priorities. The default value of " - "0xFFFFFFFF is the lowest priority." )] - uint32 DefaultJobPriority = 65535; - - [Write, Description ( - "Specifies the maximum time (using a datetime interval " - "format) that a Job can remain on this Queue before " - "completing. If the MaxTimeOnQueue property is exceeded, " - "then the Job SHOULD be removed from the Queue. A value " - "of 0 (the default) indicates that there is no time " - "limit." )] - datetime MaxTimeOnQueue = "00000000000000.000000:000"; - - [Write, Description ( - "Specifies the maximum number of Jobs that can reside on " - "this Queue. A value of 0 (the default) indicates that " - "there is no maximum queue depth." )] - uint32 MaxJobsOnQueue = 0; - - [Write, Description ( - "Specifies the maximum number of milliseconds of CPU time " - "that a Job queued to this destination can consume to " - "complete its execution." ), - Units ( "MilliSeconds" ), - PUnit ( "second * 10^-3" )] - uint32 MaxJobCPUTime; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_JobSettingData.mof b/build/vendor/dmtf_mof/System/CIM_JobSettingData.mof deleted file mode 100644 index 39c67707..00000000 --- a/build/vendor/dmtf_mof/System/CIM_JobSettingData.mof +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_JobSettingData -// ================================================================== - [Version ( "2.9.0" ), - UMLPackagePath ( "CIM::System::Processing" ), - Description ( - "JobSettingData represents job characteristics and scheduling " - "information for a CIM_Job. The settings may be applied to a " - "job handling Service, a JobQueue or other destination to which " - "jobs are submitted, and/or to individual CIM_Jobs. The " - "applicability of the settings are defined using the " - "ElementSettingData relationship. Since the Settings may be " - "defined in several contexts and applied to many types of " - "elements, this class is defined as a subclass of SettingData, " - "versus ScopedSettingData." )] -class CIM_JobSettingData : CIM_SettingData { - - [Write, Description ( - "Indicates whether or not the Job should be automatically " - "deleted upon completion. Note that the \'completion\' of " - "a recurring job is defined by its JobRunTimes or " - "UntilTime properties, OR when the Job is terminated by " - "manual intervention." ), - ModelCorrespondence { "CIM_Job.DeleteOnCompletion" }] - boolean DeleteOnCompletion; - - [Description ( - "Describes the recovery setting if the Job does not " - "successfully complete. The possible values are: \n" - "0 = \"Unknown\", meaning it is unknown as to what " - "recovery action to take \n" - "1 = \"Other\", indicating that the recovery action will " - "be specified in the property, OtherRecoveryAction \n" - "2 = \"Do Not Continue\", meaning stop the execution of " - "the job and appropriately update its status \n" - "3 = \"Continue With Next Job\", meaning continue with " - "the next job in the queue \n" - "4 = \"Re-run Job\", indicating that the job should be " - "re-run \n" - "5 = \"Run Recovery Job\", meaning run the Job associated " - "using the RecoveryJob relationship. Note that the " - "recovery Job MUST already be on the queue from which it " - "will run." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "Do Not Continue", - "Continue With Next Job", "Re-run Job", "Run Recovery Job" }, - ModelCorrespondence { - "CIM_JobSettingData.OtherRecoveryAction", - "CIM_Job.RecoveryAction" }] - uint16 RecoveryAction; - - [Description ( - "A string describing the recovery action when the " - "instance\'s RecoveryAction property is 1 (\"Other\")." ), - ModelCorrespondence { "CIM_JobSettingData.RecoveryAction", - "CIM_Job.OtherRecoveryAction" }] - string OtherRecoveryAction; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_LocalFileSystem.mof b/build/vendor/dmtf_mof/System/CIM_LocalFileSystem.mof deleted file mode 100644 index 622fe1ee..00000000 --- a/build/vendor/dmtf_mof/System/CIM_LocalFileSystem.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LocalFileSystem -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::FileElements" ), - Description ( - "A class derived from FileSystem that represents the file store " - "controlled by a ComputerSystem through local means (e.g., " - "direct device driver access). In this case, the file store is " - "managed directly by the ComputerSystem without the need for " - "another computer to act as a file server. This definition does " - "not breakdown in the case of a Clustered File System. In this " - "scenario, the FileSystem is a LocalFileSystem, weak to the " - "Cluster." )] -class CIM_LocalFileSystem : CIM_FileSystem { - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_Log.mof b/build/vendor/dmtf_mof/System/CIM_Log.mof deleted file mode 100644 index 1aa551b5..00000000 --- a/build/vendor/dmtf_mof/System/CIM_Log.mof +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Abstract, Version ( "2.18.0" ), - UMLPackagePath ( "CIM::System::Logs" ), - Description ( - "Log represents any type of event, error or informational " - "register or chronicle. The object describes the existence of " - "the log and its characteristics. Log does not dictate the form " - "of the data represented or how records/messages are stored in " - "the log and/or accessed. Subclasses will define the " - "appropriate methods and behavior." )] -class CIM_Log : CIM_EnabledLogicalElement { - - [Description ( - "Maximum number of records that can be captured in the " - "Log. If undefined, a value of zero should be specified." )] - uint64 MaxNumberOfRecords; - - [Description ( "Current number of records in the Log." ), - Gauge] - uint64 CurrentNumberOfRecords; - - [Description ( - "OverwritePolicy is an integer enumeration that indicates " - "whether the log, represented by the CIM_Log subclasses, " - "can overwrite its entries.Unknown (0) indicates the " - "log\'s overwrite policy is unknown. \n" - "Wraps when Full (2) indicates that the log overwrites " - "its entries with new entries when the log has reached " - "its maximum capacity. \n" - "Never Overwrites (7) indicates that the log never " - "overwrites its entries by the new entries." ), - ValueMap { "0", "2", "7", "..", "32768..65535" }, - Values { "Unknown", "Wraps When Full", "Never Overwrites", - "DMTF Reserved", "Vendor Reserved" }] - uint16 OverwritePolicy = 0; - - [Description ( - "LogState is an integer enumeration that indicates the " - "current state of a log represented by CIM_Log " - "subclasses. LogState is to be used in conjunction with " - "the EnabledState property to fully describe the current " - "state of the log. The following text briefly summarizes " - "the various log states: \n" - "Unknown (0) indicates the state of the log is unknown. \n" - "Normal (2) indicates that the log is or could be " - "executing logging commands, will process any queued log " - "entries, and will queue new logging requests. \n" - "Erasing (3) indicates that the log is being erased. \n" - "Not Applicable (4) indicates the log does not support " - "representing a log state." ), - ValueMap { "0", "2", "3", "4", "..", "32768..65535" }, - Values { "Unknown", "Normal", "Erasing", "Not Applicable", - "DMTF Reserved", "Vendor Reserved" }, - ModelCorrespondence { "CIM_EnabledLogicalElement.EnabledState" }] - uint16 LogState = 4; - - - [Description ( - "Requests that the Log be cleared of all entries. \n" - "The return value should be 0 if the request was " - "successfully executed, 1 if the request is not " - "supported, and some other value, as indicated by the " - "ValueMap/Values qualifiers, if an error occurred." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6..0x0FFF", - "0x1000..0x7FFF", "0x8000.." }, - Values { "Completed with no error", "Not Supported", - "Unspecified Error", "Timeout", "Failed", - "Invalid Parameter", "DMTF_Reserved", "Method_Reserved", - "Vendor_Reserved" }] - uint32 ClearLog( -); - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_LogEntry.mof b/build/vendor/dmtf_mof/System/CIM_LogEntry.mof deleted file mode 100644 index 62f9d87d..00000000 --- a/build/vendor/dmtf_mof/System/CIM_LogEntry.mof +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) 2010 DMTF. All rights reserved. - [Version ( "2.25.0" ), - UMLPackagePath ( "CIM::System::Logs" ), - Description ( - "The LogEntry object can describe the definitional format for " - "entries in a Log, or can be used to instantiate the actual " - "entries in the Log." )] -class CIM_LogEntry : CIM_RecordForLog { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. In order to ensure uniqueness within the " - "NameSpace, the value of InstanceID SHOULD be constructed " - "using the following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon " - "\':\', and where MUST include a copyrighted, " - "trademarked or otherwise unique name that is owned by " - "the business entity creating/defining the InstanceID, or " - "is a registered ID that is assigned to the business " - "entity by a recognized global authority (This is similar " - "to the _ structure of Schema " - "class names.) In addition, to ensure uniqueness " - "MUST NOT contain a colon (\':\'). When using this " - "algorithm, the first colon to appear in InstanceID MUST " - "appear between and . \n" - " is chosen by the business entity and SHOULD " - "not be re-used to identify different underlying " - "(real-world) elements. If the above \'preferred\' " - "algorithm is not used, the defining entity MUST assure " - "that the resultant InstanceID is not re-used across any " - "InstanceIDs produced by this or other providers for this " - "instance\'s NameSpace. \n" - "For DMTF defined instances, the \'preferred\' algorithm " - "MUST be used with the set to \'CIM\'." )] - string InstanceID; - - [Description ( "The containing Log\'s InstanceID." ), - MaxLen ( 256 )] - string LogInstanceID; - - [Description ( - "The containing Log\'s Name. This property is available " - "for backwards continuity with CIM_LogRecord." ), - MaxLen ( 256 )] - string LogName; - - [Description ( - "RecordID may be used to provide a representation of log " - "entry ordering or pointers/handles for log entries." ), - MaxLen ( 256 )] - string RecordID; - - [Description ( - "A LogEntry may include a timestamp for the entry." )] - datetime CreationTimeStamp; - - [Description ( - "A string that uniquely identifies, within the scope of " - "the OwningEntity, the format of the Message." ), - ModelCorrespondence { "CIM_LogEntry.Message", - "CIM_LogEntry.MessageArguments" }] - string MessageID; - - [Description ( - "The formatted message. This message is constructed by " - "combining some or all of the dynamic elements specified " - "in the MessageArguments property with the static " - "elements uniquely identified by the MessageID in a " - "message registry or other catalog associated with the " - "OwningEntity." ), - ModelCorrespondence { "CIM_LogEntry.MessageID", - "CIM_LogEntry.MessageArguments" }] - string Message; - - [Description ( - "An array containing the dynamic content of the message.\r\n" - "Each DYNAMIC_ELEMENT for the message referred to by the " - "MessageID property shall be contained in " - "MessageArguments whether the DYNAMIC_ELEMENT is included " - "in the Message or not.\r\n" - "In addition, the entries in MessageArguments need to be " - "in the same order as the DYNAMIC_ELEMENTs." ), - ModelCorrespondence { "CIM_LogEntry.Message", - "CIM_LogEntry.MessageID" }] - string MessageArguments[]; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_LogInDataFile.mof b/build/vendor/dmtf_mof/System/CIM_LogInDataFile.mof deleted file mode 100644 index 4f2367c2..00000000 --- a/build/vendor/dmtf_mof/System/CIM_LogInDataFile.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LogInDataFile -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::Logs" ), - Description ( - "MessageLogs can reside in data files, on specially allocated " - "storage areas such as disks or memory, or output as raw I/O " - "streams. In fact, a single Log may use each of these " - "mechanisms to output or capture its contents. The " - "LogInDataFile association describes a Log stored as a " - "DataFile." )] -class CIM_LogInDataFile : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The DataFile." )] - CIM_DataFile REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The MessageLog residing in the DataFile." )] - CIM_MessageLog REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_LogInDeviceFile.mof b/build/vendor/dmtf_mof/System/CIM_LogInDeviceFile.mof deleted file mode 100644 index d371f59e..00000000 --- a/build/vendor/dmtf_mof/System/CIM_LogInDeviceFile.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LogInDeviceFile -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::Logs" ), - Description ( - "MessageLogs can reside in data files, on specially allocated " - "storage areas such as disks or memory, or output as raw I/O " - "streams. In fact, a single Log may use each of these " - "mechanisms to output or capture its contents. The " - "LogInDeviceFile association describes a Log outputting to a " - "raw I/O stream DeviceFile - for example, a serial port on a " - "UNIX system." )] -class CIM_LogInDeviceFile : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The I/O stream DeviceFile." )] - CIM_DeviceFile REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The MessageLog outputting to the DeviceFile." )] - CIM_MessageLog REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_LogInStorage.mof b/build/vendor/dmtf_mof/System/CIM_LogInStorage.mof deleted file mode 100644 index 8cd79730..00000000 --- a/build/vendor/dmtf_mof/System/CIM_LogInStorage.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LogInStorage -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::Logs" ), - Description ( - "MessageLogs can reside in data files, on specially allocated " - "storage areas such as disks or memory, or output as raw I/O " - "streams. In fact, a single Log may use each of these " - "mechanisms to output or capture its contents. The LogInStorage " - "association describes a Log located in a specially allocated " - "portion of a StorageExtent. The offset of the Log, within the " - "Extent, is defined using a property of the association, " - "StartingOffset." )] -class CIM_LogInStorage : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The StorageExtent." )] - CIM_StorageExtent REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The MessageLog located within the Extent." )] - CIM_MessageLog REF Dependent; - - [Description ( - "StartingOffset indicates where in the Extent that the Log begins." - )] - uint64 StartingOffset; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_LogManagesRecord.mof b/build/vendor/dmtf_mof/System/CIM_LogManagesRecord.mof deleted file mode 100644 index 9c63e232..00000000 --- a/build/vendor/dmtf_mof/System/CIM_LogManagesRecord.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LogManagesRecord -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.9.0" ), - UMLPackagePath ( "CIM::System::Logs" ), - Description ( - "LogManagesRecord describes the aggregation or location of " - "Records managed by a Log." )] -class CIM_LogManagesRecord { - - [Key, Aggregate, Min ( 1 ), - Max ( 1 ), - Description ( "The Log." )] - CIM_Log REF Log; - - [Key, Description ( "The record managed by the Log." )] - CIM_RecordForLog REF Record; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_LogRecord.mof b/build/vendor/dmtf_mof/System/CIM_LogRecord.mof deleted file mode 100644 index 85772848..00000000 --- a/build/vendor/dmtf_mof/System/CIM_LogRecord.mof +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Updat description of -// MessageTimestamp property to indicate what the value for unknown -// should be. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LogRecord -// ================================================================== - [Version ( "2.11.0" ), - UMLPackagePath ( "CIM::System::Logs" ), - Description ( - "The LogRecord object can describe the definitional format for " - "entries in a MessageLog, or can be used to instantiate the " - "actual records in the Log. The latter approach provides a " - "great deal more semantic definition and management control " - "over the individual entries in a MessageLog, than do the " - "record manipulation methods of the Log class. It is " - "recommended that the data in individual Log entries be modeled " - "using subclasses of LogRecord, to avoid the creation of " - "LogRecords with one property (such as RecordData) without " - "semantics. \n" - "Definitional formats for LogRecords could be specified by " - "establishing a naming convention for the RecordID and Message " - "Timestamp key properties." )] -class CIM_LogRecord : CIM_RecordForLog { - - [Key, Description ( "The scoping Log\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_MessageLog.CreationClassName" )] - string LogCreationClassName; - - [Key, Description ( "The scoping Log\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_MessageLog.Name" )] - string LogName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Description ( - "RecordID, with the MessageTimestamp property, serve to " - "uniquely identify the LogRecord within a MessageLog. " - "Note that this property is different than the " - "RecordNumber parameters of the MessageLog methods. The " - "latter are ordinal values only, useful to track position " - "when iterating through a Log. On the other hand, " - "RecordID is truly an identifier for an instance of " - "LogRecord. It may be set to the record\'s ordinal " - "position, but this is not required." ), - MaxLen ( 256 )] - string RecordID; - - [Key, Description ( - "A LogRecord\'s key structure includes a timestamp for " - "the entry. If the timestamp for the entry is unknown, " - "the value 99990101000000.000000+000 SHOULD be used." )] - datetime MessageTimestamp; - - [Deprecated { "CIM_LogRecord.RecordFormat" }, - Description ( - "A free-form string describing the LogRecord\'s data structure." - )] - string DataFormat; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_LogicalFile.mof b/build/vendor/dmtf_mof/System/CIM_LogicalFile.mof deleted file mode 100644 index 16abedf0..00000000 --- a/build/vendor/dmtf_mof/System/CIM_LogicalFile.mof +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_LogicalFile -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::FileElements" ), - Description ( - "A LogicalFile is a named collection of data or executable " - "code, or represents a LogicalDevice or Directory. It is " - "located within the context of a FileSystem, on a Storage " - "Extent." )] -class CIM_LogicalFile : CIM_LogicalElement { - - [Key, Description ( - "The scoping ComputerSystem\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_FileSystem.CSCreationClassName" )] - string CSCreationClassName; - - [Key, Description ( "The scoping ComputerSystem\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_FileSystem.CSName" )] - string CSName; - - [Key, Description ( - "The scoping FileSystem\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_FileSystem.CreationClassName" )] - string FSCreationClassName; - - [Key, Description ( "The scoping FileSystem\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_FileSystem.Name" )] - string FSName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Override ( "Name" ), - Description ( - "The inherited Name serves as part of the key of a " - "LogicalFile instance within a FileSystem. A unique " - "identifier (such as a full path name) is required as a " - "Name value. Since Files are weak to their FileSystem " - "(and not to a Directory which would provide a more " - "granular naming algorithm), care must be taken to make " - "LogicalFile\'s Name unique for a given Creation " - "ClassName and FileSystem. A full path name is one way to " - "do this." ), - MaxLen ( 1024 )] - string Name; - - [Description ( "Size of the File in bytes." ), - Units ( "Bytes" ), - Gauge] - uint64 FileSize; - - [Description ( "File\'s creation date." )] - datetime CreationDate; - - [Description ( "Time that the File was last modified." )] - datetime LastModified; - - [Description ( "Time that the File was last accessed." )] - datetime LastAccessed; - - [Description ( "Boolean indicating that the File can be read." )] - boolean Readable; - - [Description ( - "Boolean indicating that the File can be written." )] - boolean Writeable; - - [Description ( "Indicates the file is executable." )] - boolean Executable; - - [Description ( - "A free form string indicating the algorithm or tool used " - "to compress the LogicalFile. If it is not possible or " - "not desired to describe the compression scheme (perhaps " - "because it is not known), recommend using the following " - "words: \"Unknown\" to represent that it is not known " - "whether the LogicalFile is compressed or not, " - "\"Compressed\" to represent that the File is compressed " - "but either its compression scheme is not known or not " - "disclosed, and \"Not Compressed\" to represent that the " - "LogicalFile is not compressed." )] - string CompressionMethod; - - [Description ( - "A free form string indicating the algorithm or tool used " - "to encrypt the LogicalFile. If it is not possible or not " - "desired to describe the encryption scheme (perhaps for " - "security reasons), recommend using the following words: " - "\"Unknown\" to represent that it is not known whether " - "the LogicalFile is encrypted or not, \"Encrypted\" to " - "represent that the File is encrypted but either its " - "encryption scheme is not known or not disclosed, and " - "\"Not Encrypted\" to represent that the LogicalFile is " - "not encrypted." )] - string EncryptionMethod; - - [Description ( - "Integer indicating the number of \'file opens\' that are " - "currently active against the File." ), - Counter] - uint64 InUseCount; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_MemoryMappedIO.mof b/build/vendor/dmtf_mof/System/CIM_MemoryMappedIO.mof deleted file mode 100644 index a8b42daa..00000000 --- a/build/vendor/dmtf_mof/System/CIM_MemoryMappedIO.mof +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_MemoryMappedIO -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::SystemResources" ), - Description ( - "Personal Computer architecture Memory Mapped I/O. This class " - "addresses both memory and port I/O resources. The property, " - "MappedResource, defines whether memory or I/O is mapped (and " - "for I/O whether the mapping is to a memory or a port space)." )] -class CIM_MemoryMappedIO : CIM_SystemResource { - - [Key, Description ( - "The scoping ComputerSystem\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_ComputerSystem.CreationClassName" )] - string CSCreationClassName; - - [Key, Description ( "The scoping ComputerSystem\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_ComputerSystem.Name" )] - string CSName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Description ( - "A part of the object\'s key value, the starting address " - "of memory mapped I/O." ), - MappingStrings { "MIF.DMTF|Memory Mapped I/O|001.1" }] - uint64 StartingAddress; - - [Description ( "Ending address of memory mapped I/O." ), - MappingStrings { "MIF.DMTF|Memory Mapped I/O|001.2" }] - uint64 EndingAddress; - - [Description ( - "Type of memory mapped I/O. MappedResource defines " - "whether memory or I/O is mapped, and for I/O, whether " - "the mapping is to a memory or a port space." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Other", "Mapped Memory", - "I/O Mapped to Memory Space", "I/O Mapped to Port Space" }] - uint16 MappedResource; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_MemoryResource.mof b/build/vendor/dmtf_mof/System/CIM_MemoryResource.mof deleted file mode 100644 index 069a6912..00000000 --- a/build/vendor/dmtf_mof/System/CIM_MemoryResource.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_MemoryResource -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::SystemResources" ), - Description ( - "Since the MemoryMappedIO class applies to memory AND port " - "resources, there is the potential for key conflict. For " - "example, both a memory resource and a port resource may be " - "located at address 0. Since StartingAddress is the " - "distinguishing key of MemoryMappedIO, two instances would be " - "created with the same key. This is prevented by defining " - "memory and port resource subclasses of MemoryMappedIO, and " - "allowing the CreationClassName key property to distinguish " - "between them and force uniqueness in their keys." )] -class CIM_MemoryResource : CIM_MemoryMappedIO { - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_MessageLog.mof b/build/vendor/dmtf_mof/System/CIM_MessageLog.mof deleted file mode 100644 index 78cf9319..00000000 --- a/build/vendor/dmtf_mof/System/CIM_MessageLog.mof +++ /dev/null @@ -1,529 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Change OverwritePolicy -// to be inherited and overridden. -// ================================================================== -// CIM_MessageLog -// ================================================================== - [Version ( "2.14.0" ), - UMLPackagePath ( "CIM::System::Logs" ), - Description ( - "MessageLog represents any type of event, error or " - "informational register or chronicle. The object describes the " - "existence of the log and its characteristics. Several methods " - "are defined for retrieving, writing and deleting log entries, " - "and maintaining the log. This type of log uses iterators to " - "access the log records, whereas its peer class, RecordLog, " - "uses more abstracted access mechanisms." )] -class CIM_MessageLog : CIM_Log { - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Override ( "Name" ), - Description ( - "The inherited Name serves as part of the key (a unique " - "identifier) for the MessageLog instance." ), - MaxLen ( 256 )] - string Name; - - [Description ( - "An array of integers indicating the Log capabilities. " - "Information such as \"Write Record Supported\" (value= " - "2) or \"Variable Length Records Supported\" (8) is " - "specified in this property." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10" }, - Values { "Unknown", "Other", "Write Record Supported", - "Delete Record Supported", "Can Move Backward in Log", - "Freeze Log Supported", "Clear Log Supported", - "Supports Addressing by Ordinal Record Number", - "Variable Length Records Supported", - "Variable Formats for Records", - "Can Flag Records for Overwrite" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_MessageLog.CapabilitiesDescriptions" }] - uint16 Capabilities[]; - - [Description ( - "An array of free-form strings providing more detailed " - "explanations for any of the Log features indicated in " - "the Capabilities array. Note, each entry of this array " - "is related to the entry in the Capabilities array that " - "is located at the same index." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_MessageLog.Capabilities" }] - string CapabilitiesDescriptions[]; - - [Description ( - "The maximum size, in bytes, to which the Log can grow. " - "If there is no maximum, then MaxLogSize should be set to " - "0." ), - Units ( "Bytes" )] - uint64 MaxLogSize; - - [Description ( - "The size of the Log header, in bytes, if one is present. " - "If there is no Log header, then this property should be " - "set to 0. Headers may include general information about " - "the Log such as the current number of records, time of " - "last update, or a pointer to the location of the first " - "Log entry. Note that this property is NOT the size of " - "the header for an individual Log entry. The latter is " - "described by the property, SizeOfRecordHeader." ), - Units ( "Bytes" )] - uint64 SizeOfHeader; - - [Description ( - "If the SizeOfHeader property is non-zero, this property " - "describes the structure and format of the Log header. It " - "is a free-form string. If the SizeOfHeader property is " - "0, then the information in this property is undefined." )] - string HeaderFormat; - - [Description ( - "Maximum size, in bytes, to which an individual Log entry " - "(record) can grow - if the Capabilities array includes a " - "value of 7 (\"Variable Length Records Supported\"). If " - "the Capabilities array does not include a 7, then the " - "Log only supports fixed length entries. The size of " - "these entries is described by this property." ), - Units ( "Bytes" )] - uint64 MaxRecordSize; - - [Description ( - "The size of the header for the Log\'s individual " - "entries, in bytes, if record headers are defined. If " - "there are no record headers, then this property should " - "be set to 0. Record headers may include information such " - "as the type of the Log entry, the date/time that the " - "entry was last updated, or a pointer to the start of " - "optional data. Note that this property defines the " - "header size for individual records in the Log, while the " - "SizeOfHeader property describes the Log\'s overall " - "header, typically located at the start of the " - "MessageLog." ), - Units ( "Bytes" )] - uint64 SizeOfRecordHeader; - - [Description ( - "If the SizeOfRecordHeader property is non-zero, this " - "property describes the structure and format of the " - "record headers. It is a free-form string. If the " - "SizeOfRecordHeader property is 0, then the information " - "in this property is undefined." )] - string RecordHeaderFormat; - - [Override ( "OverwritePolicy" ), - Description ( - "An enumeration describing the behavior of the Log, when " - "it becomes full or near full. For example, the Log may " - "wrap (value=2) or may simply stop recording entries " - "(value =7). \n" - "\n" - "Some of the property\'s possible values need further " - "explanation: \n" - "3=\"Clear When Near Full\" indicates that all of the " - "Log\'s entries will be deleted when a specified record " - "capacity is reached. The capacity is specified in " - "percentage, using the property, PercentageNearFull. " - "\'Near Full\' may be less than 100% if the Log takes " - "time to clear, and a position should always be available " - "for new records. \n" - "4=\"Overwrite Outdated When Needed\" describes that Log " - "entries (timestamped later than the date/time specified " - "in the property, TimeWhenOutdated) can be overwritten. \n" - "5=\"Remove Outdated Records\" specifies that records " - "(timestamped later than the date/time specified in the " - "property, TimeWhenOutdated) are logically and/or " - "physically removed from the Log. \n" - "6=\"Overwrite Specific Records\" indicates that " - "specially flagged records may be overwritten. This " - "property only makes sense when the Capabilities array " - "includes a value of 10, \"Can Flag Records for " - "Overwrite\"." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7" }, - Values { "Unknown", "Other", "Wraps When Full", - "Clear When Near Full", "Overwrite Outdated When Needed", - "Remove Outdated Records", "Overwrite Specific Records", - "Never Overwrite" }, - ModelCorrespondence { - "CIM_MessageLog.OtherPolicyDescription", - "CIM_MessageLog.TimeWhenOutdated", - "CIM_MessageLog.PercentageNearFull" }] - uint16 OverwritePolicy; - - [Description ( - "When the OverwritePolicy specifies a value of 1 " - "(\"Other\"), the Log\'s behavior can be explained using " - "this property. If OverwritePolicy is not 1, then this " - "property\'s contents are undefined." ), - ModelCorrespondence { "CIM_MessageLog.OverwritePolicy" }] - string OtherPolicyDescription; - - [Description ( - "If the OverwritePolicy is based on \'outdated\' records " - "(values 4 or 5), this property defines when a Log entry " - "is considered to be outdated - either by time interval " - "or at a specific date and time." ), - ModelCorrespondence { "CIM_MessageLog.OverwritePolicy" }] - datetime TimeWhenOutdated; - - [Description ( - "If the OverwritePolicy is based on clearing records when " - "the Log is near full (value=3), this property defines " - "the record capacity (in percentage) that is considered " - "to be \'near full\'." ), - Units ( "Percent" ), - ModelCorrespondence { "CIM_MessageLog.OverwritePolicy" }] - uint8 PercentageNearFull; - - [Description ( - "An enumeration describing the last change to the MessageLog." - ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Add", "Delete", "Modify", "Log Cleared" }] - uint16 LastChange; - - [Description ( - "When a change is made to the Log, the date/time of that " - "modification is captured. This property could be used to " - "event against any update to the MessageLog." )] - datetime TimeOfLastChange; - - [Description ( - "When a change is made to the Log, the record number that " - "was modified is captured." )] - uint64 RecordLastChanged; - - [Description ( - "Boolean indicating that the Log is currently frozen and " - "modifications are not allowed." )] - boolean IsFrozen; - - [Description ( - "An enumeration describing the character set used to " - "record data in the individual Log entries. For example, " - "the Log records may contain ASCII data (value=2), or be " - "raw octet strings (value=10)." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11" }, - Values { "Unknown", "Other", "ASCII", "Unicode", "ISO2022", - "ISO8859", "Extended UNIX Code", "UTF-8", "UCS-2", - "Bitmapped Data", "OctetString", - "Defined by Individual Records" }] - uint16 CharacterSet; - - - [Description ( - "Requests that an iteration of the MessageLog be " - "established and that the iterator be set to the first " - "entry in the Log. An identifier for the iterator is " - "returned as an output parameter of the method. \n" - "\n" - "Regarding iteration, you have 2 choices: 1) Embed " - "iteration data in the method call, and allow " - "implementations to track/ store this data manually; or, " - "2) Iterate using a separate object (for example, class " - "ActiveIterator) as an iteration agent. The first " - "approach is used here for interoperability. The second " - "requires an instance of the Iterator object for EACH " - "iteration in progress. 2\'s functionality could be " - "implemented underneath 1. \n" - "\n" - "The return value from PositionToFirstRecord should be 0 " - "if the request was successfully executed, 1 if the " - "request is not supported and some other value if an " - "error occurred. In a subclass, the set of possible " - "return codes could be specified, using a ValueMap " - "qualifier on the method. The strings to which the " - "ValueMap contents are \'translated\' may also be " - "specified in the subclass as a Values array qualifier." )] - uint32 PositionToFirstRecord( - [IN ( false ), OUT, Description ( - "An identifier for the iterator." )] - string IterationIdentifier); - - [Description ( - "Requests that the Log\'s iteration identifier be " - "advanced or retreated a specific number of records, or " - "set to the entry at a specified numeric location. These " - "two different behaviors are accomplished using the input " - "parameters of the method. Advancing or retreating is " - "achieved by setting the MoveAbsolute boolean to FALSE, " - "and then specifying the number of entries to advance or " - "retreat as positive or negative values in the " - "RecordNumber parameter. Moving to a specific record " - "number is accomplished by setting the MoveAbsolute input " - "parameter to TRUE, and then placing the record number " - "into the RecordNumber parameter. This can only be done " - "if the Capabilities array includes a value of 7, " - "\"Supports Addressing by Ordinal Record Number\". \n" - "\n" - "After the method completes and if ordinal record numbers " - "are supported (the Capabilities array includes a 7), the " - "current record number is returned in the RecordNumber " - "output parameter. Otherwise, the value of the parameter " - "is undefined. \n" - "\n" - "IterationIdentifier is defined as an Input/Output method " - "parameter to allow the Log to embed state information in " - "the Identifier and potentially let the identifier be " - "maintained by the using application. \n" - "\n" - "The return value from PositionAtRecord should be 0 if " - "the request was successfully executed, 1 if the request " - "is not supported and some other value if an error " - "occurred. If the request is not supported, check the " - "Capabilities array regarding support for ordinal record " - "number addressing and backward movement in the Log " - "(values 7 and 4, respectively). \n" - "\n" - "Note: In a subclass, the set of possible return codes " - "could be described using a ValueMap qualifier on the " - "method. The strings to which the ValueMap contents are " - "\'translated\' may also be specified in the subclass as " - "a Values array qualifier." )] - uint32 PositionAtRecord( - [IN, OUT, Description ( - "An identifier for the iterator." )] - string IterationIdentifier, - [IN, Description ( - "Advancing or retreating the IterationIdentifier is " - "achieved by setting the MoveAbsolute boolean to " - "FALSE, and specifying the number of entries to " - "advance or retreat as positive or negative values " - "in the RecordNumber parameter. Moving to a " - "specific record number is accomplished by setting " - "the MoveAbsolute parameter to TRUE, and placing " - "the record number into the RecordNumber parameter." )] - boolean MoveAbsolute, - [IN, OUT, Description ( - "The relative or absolute record number." )] - sint64 RecordNumber); - - [Description ( - "Requests that the record indicated by the " - "IterationIdentifier be retrieved from the MessageLog. " - "After retrieval, the IterationIdentifier may be advanced " - "to the next record by setting the PositionToNext input " - "parameter to TRUE. Two output parameters are defined for " - "the method - RecordData which holds the contents of the " - "Log entry (as an array of bytes that can be recast to an " - "appropriate format), and RecordNumber which returns the " - "current record number addressed via the Iteration " - "Identifier. The RecordNumber parameter is only " - "defined/valid when the Capabilities array indicates that " - "ordinal record number addressing is supported (a value " - "of 7). \n" - "\n" - "IterationIdentifier is defined as an Input/Output method " - "parameter to allow the Log to embed state information in " - "the Identifier and potentially let the identifier be " - "maintained by the using application. \n" - "\n" - "The return value from GetRecord should be 0 if the " - "request was successfully executed, 1 if the request is " - "not supported, and some other value if an error " - "occurred. In a subclass, the set of possible return " - "codes could be specified, using a ValueMap qualifier on " - "the method. The strings to which the ValueMap contents " - "are \'translated\' may also be specified in the subclass " - "as a Values array qualifier." )] - uint32 GetRecord( - [IN, OUT, Description ( - "An identifier for the iterator." )] - string IterationIdentifier, - [IN, Description ( - "Boolean indicating that the Iteration Identifier " - "should be advanced to the next record, after " - "retrieving the current Log entry." )] - boolean PositionToNext, - [IN ( false ), OUT, Description ( "The record number." )] - uint64 RecordNumber, - [IN ( false ), OUT, Description ( "The record data." )] - uint8 RecordData[]); - - [Description ( - "Requests that the record indicated by the " - "IterationIdentifier be deleted from the MessageLog. " - "After deletion, the Iteration Identifier may be advanced " - "to the next record by setting the PositionToNext input " - "parameter to TRUE. If set to FALSE, then the " - "IterationIdentifier will be positioned at the previous " - "record. Two output parameters are defined for the method " - "- RecordData which holds the contents of the deleted Log " - "entry (as an array of bytes that can be recast to an " - "appropriate format or discarded), and RecordNumber which " - "returns the current record number addressed via the " - "IterationIdentifier. The RecordNumber parameter is only " - "defined/valid when the Capabilities array indicates that " - "ordinal record number addressing is supported (a value " - "of 7). \n" - "\n" - "IterationIdentifier is defined as an Input/Output method " - "parameter to allow the Log to embed state information in " - "the Identifier and potentially let the identifier be " - "maintained by the using application. \n" - "\n" - "The return value from DeleteRecord should be 0 if the " - "request was successfully executed, 1 if the request is " - "not supported, and some other value if an error " - "occurred. If the request is not supported, check the " - "Capabilities array that a value of 3 (\"Delete Record " - "Supported\") is specified. \n" - "\n" - "Note: In a subclass, the set of possible return codes " - "could be described using a ValueMap qualifier on the " - "method. The strings to which the ValueMap contents are " - "\'translated\' may also be specified in the subclass as " - "a Values array qualifier." )] - uint32 DeleteRecord( - [IN, OUT, Description ( - "An identifier for the iterator." )] - string IterationIdentifier, - [IN, Description ( - "Boolean that when set to TRUE requests the " - "IterationIdentifier to be advanced to the next " - "record, after the current entry is deleted. If set " - "to FALSE, IterationIdentifier is set to the " - "previous record." )] - boolean PositionToNext, - [IN ( false ), OUT, Description ( "The record number." )] - uint64 RecordNumber, - [IN ( false ), OUT, Description ( "The record data." )] - uint8 RecordData[]); - - [Description ( - "Requests that a record be inserted at the Log position " - "indicated by the IterationIdentifier. The entry\'s data " - "is provided in the RecordData input parameter. After " - "insertion, the IterationIdentifier may be advanced to " - "the next record by setting the PositionToNext input " - "parameter to TRUE. The output parameter, RecordNumber, " - "returns the current record number addressed via the " - "IterationIdentifier. This parameter is only " - "defined/valid when the Capabilities array indicates that " - "ordinal record number addressing is supported (a value " - "of 7). \n" - "\n" - "IterationIdentifier is defined as an Input/Output method " - "parameter to allow the Log to embed state information in " - "the Identifier and potentially let the identifier be " - "maintained by the using application. \n" - "\n" - "The return value from WriteRecord should be 0 if the " - "request was successfully executed, 1 if the request is " - "not supported, and some other value if an error " - "occurred. If the request is not supported, check the " - "Capabilities array that a value of 2 (\"Write Record " - "Supported\") is specified. \n" - "\n" - "Note: In a subclass, the set of possible return codes " - "could be described using a ValueMap qualifier on the " - "method. The strings to which the ValueMap contents are " - "\'translated\' may also be specified in the subclass as " - "a Values array qualifier." )] - uint32 WriteRecord( - [IN, OUT, Description ( - "An identifier for the iterator." )] - string IterationIdentifier, - [IN, Description ( - "Boolean indicating that the Iteration Identifier " - "should be advanced to the next record, after " - "writing the Log entry." )] - boolean PositionToNext, - [IN, Description ( "The record data." )] - uint8 RecordData[], - [IN ( false ), OUT, Description ( "The record number." )] - uint64 RecordNumber); - - [Description ( - "Requests that an iteration of the Log, identified by the " - "IterationIdentifier input parameter, be stopped. The " - "return value from CancelIteration should be 0 if the " - "request was successfully executed, 1 if the request is " - "not supported and some other value if an error occurred. " - "In a subclass, the set of possible return codes could be " - "specified, using a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \'translated\' " - "may also be specified in the subclass as a Values array " - "qualifier." )] - uint32 CancelIteration( - [IN, Description ( "An identifier for the iterator." )] - string IterationIdentifier); - - [Description ( - "Requests that the MessageLog be placed in a frozen state " - "(\"Freeze\" input parameter = TRUE) or \'unfrozen\' (= " - "FALSE). If frozen, modifications to the Log will not be " - "allowed. If successful, the Log\'s IsFrozen boolean " - "property will be updated to reflect the desired state. \n" - "\n" - "The method\'s return code should be 0 if the request was " - "successfully executed, 1 if the request is not supported " - "and some other value if an error occurred. If the " - "request is not supported, check the Capabilities array " - "that a value of 5 (\"Freeze Log Supported\") is " - "specified. \n" - "\n" - "Note: In a subclass, the set of possible return codes " - "could be described using a ValueMap qualifier on the " - "method. The strings to which the ValueMap contents are " - "\'translated\' may also be specified in the subclass as " - "a Values array qualifier." )] - uint32 FreezeLog( - [IN, Description ( - "If TRUE then freeze the log, if FALSE \'unfreeze\' the log." - )] - boolean Freeze); - - [Description ( - "Requests that the record indicated by the " - "IterationIdentifier be flagged as overwriteable. This " - "method is only supported when the Capabilities array " - "includes a value of 10, \"Can Flag Records for " - "Overwrite\". After updating the entry, the " - "IterationIdentifier may be advanced to the next record " - "by setting the PositionToNext input parameter to TRUE. " - "One output parameter is defined for the method " - "RecordNumber. It returns the current record number " - "addressed via the Iteration Identifier. This parameter " - "is only defined/valid when the Capabilities array " - "indicates that ordinal record number addressing is " - "supported (a value of 7). \n" - "\n" - "IterationIdentifier is defined as an Input/Output method " - "parameter to allow the Log to embed state information in " - "the Identifier and potentially let the identifier be " - "maintained by the using application. \n" - "\n" - "The return value from FlagRecordForOverwrite should be 0 " - "if the request was successfully executed, 1 if the " - "request is not supported, and some other value if an " - "error occurred. In a subclass, the set of possible " - "return codes could be specified, using a ValueMap " - "qualifier on the method. The strings to which the " - "ValueMap contents are \'translated\' may also be " - "specified in the subclass as a Values array qualifier." )] - uint32 FlagRecordForOverwrite( - [IN, OUT, Description ( - "An identifier for the iterator." )] - string IterationIdentifier, - [IN, Description ( - "Boolean indicating that the Iteration Identifier " - "should be advanced to the next record, after " - "updating the current Log entry." )] - boolean PositionToNext, - [IN ( false ), OUT, Description ( "The record number." )] - uint64 RecordNumber); - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_Mount.mof b/build/vendor/dmtf_mof/System/CIM_Mount.mof deleted file mode 100644 index 65405fa1..00000000 --- a/build/vendor/dmtf_mof/System/CIM_Mount.mof +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Mount -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::FileElements" ), - Description ( - "An association between a FileSystem and a Directory which " - "indicates that the Directory is being attached to the " - "FileSystem. The semantics of this relationship require that " - "the mounted Directory be contained by a FileSystem (via the " - "FileStorage association) that is different from the FileSystem " - "referenced as the Dependent. The Directory\'s containing " - "FileSystem could be either local or remote. For example, a " - "LocalFileSystem on a Solaris ComputerSystem can mount a " - "Directory from the FileSystem accessed via the machine\'s " - "CDROM drive, i.e., another LocalFile System. On the other " - "hand, in a \'remote\' case, the Directory is first exported by " - "its FileSystem, which is hosted on another ComputerSystem " - "acting (for example) as a file server. In order to distinguish " - "these two types of Mount, it is recommended that a CIM_Export " - "association always be defined for the remotely " - "accessed/mounted Directories." )] -class CIM_Mount : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( "The Directory mounted." )] - CIM_Directory REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The FileSystem the Directory is mounted on." )] - CIM_FileSystem REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_NFS.mof b/build/vendor/dmtf_mof/System/CIM_NFS.mof deleted file mode 100644 index b9e4c72e..00000000 --- a/build/vendor/dmtf_mof/System/CIM_NFS.mof +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_NFS -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::FileElements" ), - Description ( - "A class derived from RemoteFileSystem representing that the " - "FileSystem is mounted, using the NFS protocol, from a " - "ComputerSystem. The properties of the NFS object deal with the " - "operational aspects of the mount and represent the client-side " - "configuration for NFS access. The FileSystemType (inherited " - "from FileSystem) should be set to indicate the type of this " - "FileSystem as it appears to the client." )] -class CIM_NFS : CIM_RemoteFileSystem { - - [Description ( - "If set to true: Once the FileSystem is mounted, NFS " - "requests are retried until the hosting System responds. \n" - "If set to false: Once the FileSystem is mounted, an " - "error is returned if the hosting System does not " - "respond." )] - boolean HardMount; - - [Description ( - "If set to true: Retries are performed in the foreground. \n" - "If set to false: If the first mount attempt fails, " - "retries are performed in the background." )] - boolean ForegroundMount; - - [Description ( - "If set to true: Interrupts are permitted for hard " - "mounts. \n" - "If set to false : Interrupts are ignored for hard " - "mounts." )] - boolean Interrupt; - - [Description ( - "Maximum number of mount failure retries allowed." )] - uint16 MountFailureRetries; - - [Description ( - "Maximum number of NFS retransmissions allowed." )] - uint16 RetransmissionAttempts; - - [Description ( "NFS timeout in tenths of a second." ), - Units ( "Tenths of Seconds" )] - uint32 RetransmissionTimeout; - - [Description ( "Read buffer size in bytes." ), - Units ( "Bytes" )] - uint64 ReadBufferSize; - - [Description ( "Write buffer size in bytes." ), - Units ( "Bytes" )] - uint64 WriteBufferSize; - - [Description ( - "The remote ComputerSystem\'s (ie, the NFS File " - "\'Server\'s) UDP port number." )] - uint32 ServerCommunicationPort; - - [Description ( - "If set to true: Control attribute caching is enabled. \n" - "If set to false: Control attribute caching is disabled." )] - boolean AttributeCaching; - - [Description ( - "Minimum number of seconds that cached attributes are " - "held after file modification." ), - Units ( "Seconds" )] - uint16 AttributeCachingForRegularFilesMin; - - [Description ( - "Maximum number of seconds that cached attributes are " - "held after file modification." ), - Units ( "Seconds" )] - uint16 AttributeCachingForRegularFilesMax; - - [Description ( - "Minimum number of seconds that cached attributes are " - "held after directory update." ), - Units ( "Seconds" )] - uint16 AttributeCachingForDirectoriesMin; - - [Description ( - "Maximum number of seconds that cached attributes are " - "held after directory update." ), - Units ( "Seconds" )] - uint16 AttributeCachingForDirectoriesMax; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_OOBAlertService.mof b/build/vendor/dmtf_mof/System/CIM_OOBAlertService.mof deleted file mode 100644 index 99a02bf9..00000000 --- a/build/vendor/dmtf_mof/System/CIM_OOBAlertService.mof +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_OOBAlertService -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::Boot" ), - Description ( - "This Service is implemented by a LogicalDevice (e.g. a " - "NetworkAdapter or Modem) that is capable of sending alert " - "messages to a remote destination. The alert messages reflect " - "the state of one or more ManagedSystemElements. The Elements " - "for which alert messages are forwarded, are defined by " - "enumerating the ProvidesServiceToElement association for the " - "Service. Out of Band (OOB) refers to the mechanisms in use " - "when normal OS-based management mechanisms are not possible. " - "This occurs when the OS is down or not functioning properly." )] -class CIM_OOBAlertService : CIM_Service { - - [Description ( - "The type of the alert destination. For example, the " - "alert may be received by an application listening on a " - "UDP Port on a remote destination, or could be sent to a " - "pager (values 4 or 2, respectively)." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "Pager", "TCP Port", "UDP Port" }, - ModelCorrespondence { - "CIM_OOBAlertService.OtherDestinationTypeDescription" }] - uint16 DestinationType; - - [Description ( - "The description of the alert DestinationType. This is " - "used when the DestinationType is set to \"Other\" " - "(value=1)." ), - ModelCorrespondence { "CIM_OOBAlertService.DestinationType" }] - string OtherDestinationTypeDescription; - - [Description ( - "The address where this Service sends the alerts. The " - "format of this address depends on the DestinationType. " - "For example, if the DestinationType is a UDP Port " - "(value=4), then this property contains a string " - "identifying the IP address of the Port (for example, " - "111.222.333.444:4567). If DestinationType is a pager " - "(value=2), then the address is a Pager number (for " - "example, 18002257654)." )] - string DestinationAddress; - - [Description ( - "The format of the Alert Message sent by the Service." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "Numeric", "AlphaNumeric", - "Free Form Text", "Platform Event Trap" }, - ModelCorrespondence { - "CIM_OOBAlertService.OtherMessageFormatDescription" }] - uint16 MessageFormat; - - [Description ( - "The description of the format of the alert message used " - "by the Service when the AlertMessageFormat property is " - "set to \"Other\" (value=1)." ), - ModelCorrespondence { "CIM_OOBAlertService.MessageFormat" }] - string OtherMessageFormatDescription; - - [Description ( - "If the AlertService only uses a fixed message to send an " - "alert, then this flag should be set to TRUE." )] - boolean OnlySendsFixedMessage; - - [Description ( - "The AlertService may require some fixed data to send as " - "part of the message. This may include things like the " - "address or name of the System. This string contains the " - "complete message when the property, " - "OnlySendsFixedMessage, is set to TRUE." )] - string FixedPartOfMessage; - - [Description ( - "If the destination is capable of sending an " - "acknowledgement to the alert, then this flag is set to " - "TRUE. The format of the acknowledgement is determined by " - "the DestinationType and the MessageFormat." )] - boolean DestinationIsAckCapable; - - [Description ( - "The AlertService may retry and send an alert more than " - "once. The RetryCount identifies how often the operation " - "will be repeated. If DestinationIsAckCapable is set to " - "TRUE, then the retry will only be done if an Ack is not " - "received. Otherwise, the retries are done " - "unconditionally." )] - uint16 RetryCount; - - [Description ( - "The interval between each successive retry, in seconds. " - "If DestinationIsAckCapable is set to TRUE, then this " - "interval is used as a timeout interval, before the next " - "retry is done." ), - Units ( "Seconds" )] - uint16 RetryInterval; - - [Description ( - "If the OOB Alerting service is capable of sending " - "Presence heart beat messages." ), - Read] - boolean PresenceHeartbeatCapable; - - [Description ( - "When set to true causes the OOBAlertService to send " - "Presence heart beat messages." ), - ModelCorrespondence { - "CIM_OOBAlertService.PresenceHeartbeatCapable" }] - boolean EnablePresenceHeartbeats; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_OSProcess.mof b/build/vendor/dmtf_mof/System/CIM_OSProcess.mof deleted file mode 100644 index 9888e402..00000000 --- a/build/vendor/dmtf_mof/System/CIM_OSProcess.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_OSProcess -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::System::Processing" ), - Description ( - "A link between the OperatingSystem and Process(es) running in " - "the context of this OperatingSystem." )] -class CIM_OSProcess : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The OperatingSystem." )] - CIM_OperatingSystem REF GroupComponent; - - [Override ( "PartComponent" ), - Weak, Description ( - "The Process running in the context of the OperatingSystem." - )] - CIM_Process REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_OperatingSystem.mof b/build/vendor/dmtf_mof/System/CIM_OperatingSystem.mof deleted file mode 100644 index d24a1996..00000000 --- a/build/vendor/dmtf_mof/System/CIM_OperatingSystem.mof +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.23.0" ), - UMLPackagePath ( "CIM::System::OperatingSystem" ), - Description ( - "An OperatingSystem is software/firmware that makes a " - "ComputerSystem\'s hardware usable, and implements and/or " - "manages the resources, file systems, processes, user " - "interfaces, services, ... available on the ComputerSystem." )] -class CIM_OperatingSystem : CIM_EnabledLogicalElement { - - [Key, Description ( - "The scoping ComputerSystem\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_ComputerSystem.CreationClassName" )] - string CSCreationClassName; - - [Key, Description ( "The scoping ComputerSystem\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_ComputerSystem.Name" )] - string CSName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Override ( "Name" ), - Description ( - "The inherited Name serves as key of an OperatingSystem " - "instance within a ComputerSystem." ), - MaxLen ( 256 ), - MappingStrings { "MIF.DMTF|Operating System|001.2" }] - string Name; - - [Description ( - "A integer indicating the type of OperatingSystem." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18", - "19", "20", "21", "22", "23", "24", "25", "26", "27", - "28", "29", "30", "31", "32", "33", "34", "35", "36", - "37", "38", "39", "40", "41", "42", "43", "44", "45", - "46", "47", "48", "49", "50", "51", "52", "53", "54", - "55", "56", "57", "58", "59", "60", "61", "62", "63", - "64", "65", "66", "67", "68", "69", "70", "71", "72", - "73", "74", "75", "76", "77", "78", "79", "80", "81", - "82", "83", "84", "85", "86", "87", "88", "89", "90", - "91", "92", "93", "94", "95", "96", "97", "98", "99", - "100", "101", "102", "103", "104", "105", "106", "107", - "108", "109", "110" }, - Values { "Unknown", "Other", "MACOS", "ATTUNIX", "DGUX", - "DECNT", "Tru64 UNIX", "OpenVMS", "HPUX", "AIX", - //10 - "MVS", "OS400", "OS/2", "JavaVM", "MSDOS", - "WIN3x", "WIN95", "WIN98", "WINNT", "WINCE", - //20 - "NCR3000", "NetWare", "OSF", "DC/OS", - "Reliant UNIX", "SCO UnixWare", "SCO OpenServer", - "Sequent", "IRIX", "Solaris", //30 - "SunOS", - "U6000", "ASERIES", "HP NonStop OS", "HP NonStop OSS", - "BS2000", "LINUX", "Lynx", "XENIX", "VM", - //40 - "Interactive UNIX", "BSDUNIX", "FreeBSD", - "NetBSD", "GNU Hurd", "OS9", "MACH Kernel", "Inferno", - "QNX", "EPOC", //50 - "IxWorks", "VxWorks", - "MiNT", "BeOS", "HP MPE", "NextStep", "PalmPilot", - "Rhapsody", "Windows 2000", "Dedicated", - //60 - "OS/390", "VSE", "TPF", "Windows (R) Me", - "Caldera Open UNIX", "OpenBSD", "Not Applicable", - "Windows XP", "z/OS", "Microsoft Windows Server 2003", - //70 - "Microsoft Windows Server 2003 64-Bit", - "Windows XP 64-Bit", "Windows XP Embedded", - "Windows Vista", "Windows Vista 64-Bit", - "Windows Embedded for Point of Service", - "Microsoft Windows Server 2008", - "Microsoft Windows Server 2008 64-Bit", "FreeBSD 64-Bit", - "RedHat Enterprise Linux", - //80 - "RedHat Enterprise Linux 64-Bit", - "Solaris 64-Bit", "SUSE", "SUSE 64-Bit", "SLES", - "SLES 64-Bit", "Novell OES", "Novell Linux Desktop", - "Sun Java Desktop System", "Mandriva", - //90 - "Mandriva 64-Bit", "TurboLinux", - "TurboLinux 64-Bit", "Ubuntu", "Ubuntu 64-Bit", "Debian", - "Debian 64-Bit", "Linux 2.4.x", "Linux 2.4.x 64-Bit", - "Linux 2.6.x", //100 - "Linux 2.6.x 64-Bit", - "Linux 64-Bit", "Other 64-Bit", - "Microsoft Windows Server 2008 R2", "VMware ESXi", - "Microsoft Windows 7", "CentOS 32-bit", "CentOS 64-bit", - "Oracle Enterprise Linux 32-bit", - "Oracle Enterprise Linux 64-bit", - //110 - "eComStation 32-bitx" }, - ModelCorrespondence { - "CIM_OperatingSystem.OtherTypeDescription", - "CIM_SoftwareElement.TargetOperatingSystem" }] - uint16 OSType; - - [Description ( - "A string describing the manufacturer and OperatingSystem " - "type - used when the OperatingSystem property, OSType, " - "is set to 1 or 59 (\"Other\" or \"Dedicated\"). The " - "format of the string inserted in OtherTypeDescription " - "should be similar in format to the Values strings " - "defined for OSType. OtherTypeDescription should be set " - "to NULL when OSType is any value other than 1 or 59." ), - MaxLen ( 64 ), - ModelCorrespondence { "CIM_OperatingSystem.OSType" }] - string OtherTypeDescription; - - [Description ( - "A string describing the Operating System\'s version " - "number. The format of the version information is as " - "follows: .. or " - "..." ), - MappingStrings { "MIF.DMTF|Operating System|001.3" }] - string Version; - - [Description ( - "Time when the OperatingSystem was last booted." ), - MappingStrings { "MIF.DMTF|General Information|001.5" }] - datetime LastBootUpTime; - - [Description ( - "OperatingSystem\'s notion of the local date and time of day." - ), - MappingStrings { "MIB.IETF|HOST-RESOURCES-MIB.hrSystemDate", - "MIF.DMTF|General Information|001.6" }] - datetime LocalDateTime; - - [Description ( - "CurrentTimeZone indicates the number of minutes the " - "OperatingSystem is offset from Greenwich Mean Time. " - "Either the number is positive, negative or zero." ), - Units ( "Minutes" )] - sint16 CurrentTimeZone; - - [Description ( - "Number of user licenses for the OperatingSystem. If " - "unlimited, enter 0." )] - uint32 NumberOfLicensedUsers; - - [Description ( - "Number of user sessions for which the OperatingSystem is " - "currently storing state information." ), - Gauge, MappingStrings { "MIF.DMTF|Host System|001.4", - "MIB.IETF|HOST-RESOURCES-MIB.hrSystemNumUsers" }] - uint32 NumberOfUsers; - - [Description ( - "Number of process contexts currently loaded or running " - "on the OperatingSystem." ), - Gauge, MappingStrings { "MIF.DMTF|Host System|001.5", - "MIB.IETF|HOST-RESOURCES-MIB.hrSystemProcesses" }] - uint32 NumberOfProcesses; - - [Description ( - "Maximum number of process contexts the OperatingSystem " - "can support. If there is no fixed maximum, the value " - "should be 0. On systems that have a fixed maximum, this " - "object can help diagnose failures that occur when the " - "maximum is reached." ), - MappingStrings { "MIF.DMTF|Host System|001.6", - "MIB.IETF|HOST-RESOURCES-MIB.hrSystemMaxProcesses" }] - uint32 MaxNumberOfProcesses; - - [Description ( - "Total swap space in Kbytes. This value may be NULL " - "(unspecified) if swap space is not distinguished from " - "page files. However, some Operating Systems distinguish " - "these concepts. For example, in UNIX, whole processes " - "can be \'swapped out\' when the free page list falls and " - "remains below a specified amount." ), - Units ( "KiloBytes" )] - uint64 TotalSwapSpaceSize; - - [Description ( - "Number of Kbytes of virtual memory. For example, this " - "may be calculated by adding the amount of total RAM to " - "the amount of paging space (ie, adding the amount of " - "memory in/aggregated by the ComputerSystem to the " - "property, SizeStoredInPagingFiles." ), - Units ( "KiloBytes" ), - MappingStrings { "MIF.DMTF|System Memory Settings|001.5" }] - uint64 TotalVirtualMemorySize; - - [Description ( - "Number of Kbytes of virtual memory currently unused and " - "available. For example, this may be calculated by adding " - "the amount of free RAM to the amount of free paging " - "space (ie, adding the properties, FreePhysicalMemory and " - "FreeSpace InPagingFiles)." ), - Units ( "KiloBytes" ), - Gauge, MappingStrings { - "MIF.DMTF|System Memory Settings|001.6" }] - uint64 FreeVirtualMemory; - - [Description ( - "Number of Kbytes of physical memory currently unused and " - "available." ), - Units ( "KiloBytes" ), - Gauge, MappingStrings { - "MIF.DMTF|System Memory Settings|001.2", - "MIF.UNIX|Host Physical Memory|6.1" }] - uint64 FreePhysicalMemory; - - [Description ( - "The total amount of physical memory (in Kbytes) " - "available to the OperatingSystem. This value does not " - "necessarily indicate the true amount of physical memory, " - "but what is reported to the OperatingSystem as available " - "to it." ), - Units ( "KiloBytes" )] - uint64 TotalVisibleMemorySize; - - [Description ( - "The total number of KBytes that can be stored in the " - "OperatingSystem\'s paging files. 0 indicates that there " - "are no paging files." ), - Units ( "KiloBytes" ), - MappingStrings { "MIF.DMTF|System Memory Settings|001.3" }] - uint64 SizeStoredInPagingFiles; - - [Description ( - "The total number of KBytes that can be mapped into the " - "OperatingSystem\'s paging files without causing any " - "other pages to be swapped out. 0 indicates that there " - "are no paging files." ), - Units ( "KiloBytes" ), - Gauge, MappingStrings { - "MIF.DMTF|System Memory Settings|001.4" }] - uint64 FreeSpaceInPagingFiles; - - [Description ( - "Maximum number of Kbytes of memory that can be allocated " - "to a Process. For Operating Systems with no virtual " - "memory, this value is typically equal to the total " - "amount of physical Memory minus memory used by the BIOS " - "and OS. For some Operating Systems, this value may be " - "infinity - in which case, 0 should be entered. In other " - "cases, this value could be a constant - for example, 2G " - "or 4G." ), - Units ( "KiloBytes" )] - uint64 MaxProcessMemorySize; - - [Description ( - "Boolean indicating whether the OperatingSystem is " - "distributed across several ComputerSystem nodes. If so, " - "these nodes should be grouped as a Cluster." )] - boolean Distributed; - - [Description ( - "A value that indicates the maximum processes that a user " - "can have associate with it." )] - uint32 MaxProcessesPerUser; - - - [Description ( - "Requests a reboot of the OperatingSystem. The return " - "value should be 0 if the request was successfully " - "executed, 1 if the request is not supported and some " - "other value if an error occurred. In a subclass, the set " - "of possible return codes could be specified, using a " - "ValueMap qualifier on the method. The strings to which " - "the ValueMap contents are \'translated\' may also be " - "specified in the subclass as a Values array qualifier." )] - uint32 Reboot( -); - - [Description ( - "Requests a shutdown of the OperatingSystem. The return " - "value should be 0 if the request was successfully " - "executed, 1 if the request is not supported and some " - "other value if an error occurred. It is up to the " - "implementation or subclass of OperatingSystem to " - "establish dependencies between the Shutdown and Reboot " - "methods, and for example, to provide more sophisticated " - "capabilities such as scheduled shutdown/ reboot, etc. In " - "a subclass, the set of possible return codes could be " - "specified, using a ValueMap qualifier on the method. The " - "strings to which the ValueMap contents are \'translated\' " - "may also be specified in the subclass as a Values array " - "qualifier." )] - uint32 Shutdown( -); - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_OperatingSystemCapabilities.mof b/build/vendor/dmtf_mof/System/CIM_OperatingSystemCapabilities.mof deleted file mode 100644 index bcc0cc13..00000000 --- a/build/vendor/dmtf_mof/System/CIM_OperatingSystemCapabilities.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::System::OperatingSystem" ), - Description ( - "OperatingSystemCapabilities provides information about the " - "capabilities of associated instances of CIM_OperatingSystem." )] -class CIM_OperatingSystemCapabilities : CIM_EnabledLogicalElementCapabilities { - - [Description ( - "HostShutdownBehavior provides information about the " - "capabilities of an associated instance of " - "OperatingSystem to shutdown the hosting computer system.\n" - "A value of \"Disabled\" indicates that if the associated " - "OperatingSystem is shutdown using the " - "RequestStateChange() or Shutdown() extrinsic methods, " - "the ComputerSystem with which the ComputerSystem is " - "associated through an instance of CIM_RunningOS shall be shutdown.\n" - "A value of \"No effect\" indicates that if the " - "associated OperatingSystem is shutdown using the " - "RequestStateChange() or Shutdown() extrinsic methods, " - "the ComputerSystem with which the OperatingSystem is " - "associated through CIM_RunningOS shall not be shutdown.\n" - "A value of \"Unknown\" indicates that the effect on the " - "hosting ComputerSystem is unknown." ), - ValueMap { "0", "2", "3", "..", "32768..65535" }, - Values { "Unknown", "Disabled", "No effect", "DMTF Reserved", - "Vendor Reserved" }] - uint16 HostShutdownBehavior = 0; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_OperationLog.mof b/build/vendor/dmtf_mof/System/CIM_OperationLog.mof deleted file mode 100644 index be1b77af..00000000 --- a/build/vendor/dmtf_mof/System/CIM_OperationLog.mof +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_OperationLog -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::System::Logs" ), - Description ( - "CIM_OperationLog is a specialization of the " - "CIM_UseOfMessageLog association that identifies a reproducible " - "record of operations for a LogicalElement." )] -class CIM_OperationLog : CIM_UseOfMessageLog { - - [Override ( "Antecedent" ), - Description ( - "The Log containing reproducible operations for the " - "associated LogicalElement." )] - CIM_MessageLog REF Antecedent; - - [Override ( "Dependent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The LogicalElement for the associated OperationLog." )] - CIM_LogicalElement REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_OwningJobElement.mof b/build/vendor/dmtf_mof/System/CIM_OwningJobElement.mof deleted file mode 100644 index e4cd5345..00000000 --- a/build/vendor/dmtf_mof/System/CIM_OwningJobElement.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_OwningJobElement -// ================================================================== - [Association, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::System::Processing" ), - Description ( - "OwningJobElement represents an association between a Job and " - "the ManagedElement responsible for the creation of the Job. " - "This association may not be possible, given that the execution " - "of jobs can move between systems and that the lifecycle of the " - "creating entity may not persist for the total duration of the " - "job. However, this can be very useful information when " - "available. This association defines a more specific \'owner\' " - "than is provided by the CIM_Job.Owner string." ), - ModelCorrespondence { "CIM_Job.Owner" }] -class CIM_OwningJobElement { - - [Key, Max ( 1 ), - Description ( - "The ManagedElement responsible for the creation of the Job." - )] - CIM_ManagedElement REF OwningElement; - - [Key, Description ( "The Job created by the ManagedElement." )] - CIM_Job REF OwnedElement; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_ParticipatingCS.mof b/build/vendor/dmtf_mof/System/CIM_ParticipatingCS.mof deleted file mode 100644 index bbf22a9a..00000000 --- a/build/vendor/dmtf_mof/System/CIM_ParticipatingCS.mof +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ParticipatingCS -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::SystemElements" ), - Description ( - "A Cluster is composed of two or more ComputerSystems, " - "operating together. A ComputerSystem may participate in " - "multiple Clusters. \n" - "\n" - "When first establishing or bringing up a Cluster, only one " - "ComputerSystem may be defined as participating in it. " - "Therfore, the cardinality of the association for the " - "ComputerSystem reference is Min (1)." )] -class CIM_ParticipatingCS : CIM_Dependency { - - [Override ( "Antecedent" ), - Min ( 1 ), - Description ( - "The ComputerSystem which participates in the Cluster." )] - CIM_ComputerSystem REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The Cluster." )] - CIM_Cluster REF Dependent; - - [Description ( - "StateOfNode indicates the condition of the participating " - "ComputerSystem in the Cluster. For example, one value is " - "\"Joining\" (2)." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6" }, - Values { "Unknown", "Other", "Joining", "Paused", - "Available", "Unavailable", "Degraded" }] - uint16 StateOfNode; - - [Description ( - "RoleOfNode indicates whether the Cluster nodes are peers " - "(value = 2), connected in a master-slave/primary- " - "secondary relationship (values = 3 for primary, 4 for " - "secondary), available in a standby configuration (5) or " - "of some other (1) or unknown (0) relationship. In a " - "System/390 environment, the nodes are identified as " - "\"Base Plex\" (value=6) or \"Enhanced Plex\" (value=7)." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7" }, - Values { "Unknown", "Other", "Peer", "Primary", "Secondary", - "Standby", "Base Plex", "Enhanced Plex" }] - uint16 RoleOfNode; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_PlatformWatchdogService.mof b/build/vendor/dmtf_mof/System/CIM_PlatformWatchdogService.mof deleted file mode 100644 index 54a17418..00000000 --- a/build/vendor/dmtf_mof/System/CIM_PlatformWatchdogService.mof +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::System::Watchdog" ), - Description ( - "PlatformWatchdogService is class derived from Service that " - "provides the controls to manage the watchdog timer service of " - "a managed element. A PlatformWatchdogService monitors the " - "ability of a monitored entity to reset a countdown timer " - "before it expires. If the timer expires, the service may take " - "specific action upon expiration. The monitored entity may be " - "the Operating System, BIOS, or a software component that is " - "installed on the computer system." )] -class CIM_PlatformWatchdogService : CIM_Service { - - [Description ( - "The type of entity that is monitored by the " - "PlatformWatchdogService. This property is used to " - "identify the type of entity that is responsible for " - "re-arming, or whose information is used to re-arm, the " - "watchdog at periodic intervals. A value set to 2 = " - "\"Operating System\" shall indicate that the entity is " - "an operating system. A value set to 3 = \"Operating " - "System Boot Process\" shall indicate that the entity is " - "one which handles the process of booting an operating " - "system. A value set to 4 = \"Operating System Shutdown " - "Process\" shall indicate that the entity is one which " - "handles process of shutting down of an operating system. " - "A value set to 5 = \"Firmware Boot Process\" shall " - "indicate that the entity is one which handles process of " - "booting firmware. A value set to 6 = \"BIOS Boot " - "Process\" shall indicate that the entity is one which " - "handles process of booting the system BIOS. A value set " - "to 7 = \"Application\" shall indicate that the entity is " - "an application. A value set to 8 = \"Service Processor\" " - "shall indicate that the entity is an service processor." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Unknown", "Other", "Operating System", - "Operating System Boot Process", - "Operating System Shutdown Process", - "Firmware Boot Process", "BIOS Boot Process", - "Application", "Service Processor" }, - ModelCorrespondence { - "CIM_PlatformWatchdogService.OtherMonitoredEntityTypeDescription" }] - uint16 MonitoredEntityType; - - [Description ( - "A string that describes the type of monitored entity " - "when MonitoredEntityType is set to 1 (Other)." ), - MaxLen ( 256 ), - ModelCorrespondence { - "CIM_PlatformWatchdogService.MonitoredEntityType" }] - string OtherMonitoredEntityTypeDescription; - - [Description ( - "The timeout interval that is used by the watchdog." )] - datetime TimeoutInterval; - - [Description ( - "TimerExpired indicates when the watchdog timer has " - "expired. A value of False shall indicate the watchdog " - "timer did not expire the last time it was active, or " - "this information is unknown. A value of True shall " - "indicate the watchdog timer expired the last time it was " - "active. If CurrentTimerValue is supported it also " - "expresses this same information when it has the value " - "00000000000000.000000:000 expressed in the interval " - "notation of the datetime type." )] - boolean TimerExpired; - - [Description ( - "The resolution of the timer used by the watchdog. The " - "timer can expire anytime between (TimeoutInterval - " - "TimerResolution) or (TimeoutInterval + TimerResolution)." )] - datetime TimerResolution; - - [Description ( - "The amount of time remaining before the watchdog timer " - "expires. A value of NULL shall mean unknown." )] - datetime CurrentTimerValue; - - [Description ( - "The time of the last watchdog timer expiration." )] - datetime TimeOfLastExpiration; - - [Description ( - "ActionOnExpiration specifies the action that should " - "happen upon the expiration of the watchdog timer. A " - "value set to 1 = \"Other\" shall indicate that the " - "action described in OtherActionOnExpiration is to be " - "taken. A value set to 2 = \"None - Status Only\" shall " - "indicate that no action is to be taken. A value set to 3 " - "= \"System Reset\" shall indicate that the action is to " - "reset the system. A value set to 4 = \"System Power Off\" " - "shall indicate that the action is to power off the " - "system. A value set to 5 = \"System Power Off, then On\" " - "shall indicate that the action is to power off the " - "system, followed by a power-on of the system. A value " - "set to 6 = \"Generate System NonMaskableInterrupt (NMI)\" " - "shall indicate that the action is to generate a " - "non-maskable interrupt on the system. A value set to 7 = " - "\"Generate System Management Interrupt (SMI)\" shall " - "indicate that the action is to generate a management " - "interrupt on the system. A value set to 8 = \" Reset " - "Monitored Entity \" shall indicate that the action is to " - "reset the monitored entity." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Unknown", "Other", "None - Status Only", - "System Reset", "System Power Off", - "System Power Off, then On", - "Generate System NonMaskableInterrupt (NMI)", - "Generate System Management Interrupt (SMI)", - "Reset Monitored Entity" }, - ModelCorrespondence { - "CIM_PlatformWatchdogService.OtherActionOnExpiration" }] - uint16 ActionOnExpiration; - - [Description ( - "This property shall have a value if ActionOnExpiration " - "contains the value 1 (Other)." ), - ModelCorrespondence { - "CIM_PlatformWatchdogService.ActionOnExpiration" }] - string OtherActionOnExpiration; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_PlatformWatchdogServiceCapabilities.mof b/build/vendor/dmtf_mof/System/CIM_PlatformWatchdogServiceCapabilities.mof deleted file mode 100644 index 52309904..00000000 --- a/build/vendor/dmtf_mof/System/CIM_PlatformWatchdogServiceCapabilities.mof +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::System::Watchdog" ), - Description ( - "A class derived from Capabilities that describes the watchdog " - "service management aspects of a system." )] -class CIM_PlatformWatchdogServiceCapabilities : CIM_EnabledLogicalElementCapabilities { - - [Description ( - "ActionOnExpirationSupported indicates the actions which " - "can be performed when the watchdog timer expires. See " - "CIM_PlatformWatchdogService.ActionOnExpiration for a " - "description of the values." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8" }, - Values { "None - Status Only", "System Reset", - "System Power Off", "System Power Off, then On", - "Generate System NonMaskableInterrupt (NMI)", - "Generate System Management Interrupt (SMI)", - "Reset Monitored Entity" }, - ModelCorrespondence { - "CIM_PlatformWatchdogService.ActionOnExpiration" }] - uint16 ActionOnExpirationSupported[]; - - [Description ( - "WatchdogTimerDataSupported indicates the data which is " - "provided on the value of the watchdog timer. The values " - "in the enumeration are: A value set to 2 = \"Current " - "Value\" shall indicate that the time of the current " - "value of the timer is provided. A value set to 3 = " - "\"Timer Resolution\" shall indicate that the timer " - "resolution for the last expiration is provided." ), - ValueMap { "2", "3" }, - Values { "Current Value", "Timer Resolution" }, - ModelCorrespondence { - "CIM_PlatformWatchdogService.CurrentTimerValue", - "CIM_PlatformWatchdogService.TimerResolution" }] - uint16 WatchdogTimerDataSupported[]; - - [Description ( - "LastExpirationDataSupported indicates the data which is " - "provided on the last expiration of the watchdog timer. " - "The values in the enumeration are: A value set to 2 = " - "\"Time\" shall indicate that the time of the last " - "expiration is provided." ), - ValueMap { "2" }, - Values { "Time" }, - ModelCorrespondence { - "CIM_PlatformWatchdogService.TimeOfLastExpiration" }] - uint16 LastExpirationDataSupported[]; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_PortResource.mof b/build/vendor/dmtf_mof/System/CIM_PortResource.mof deleted file mode 100644 index 8745ab69..00000000 --- a/build/vendor/dmtf_mof/System/CIM_PortResource.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_PortResource -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::SystemResources" ), - Description ( - "Since the MemoryMappedIO class applies to memory AND port " - "resources, there is the potential for key conflict. For " - "example, both a memory resource and a port resource may be " - "located at address 0. Since StartingAddress is the " - "distinguishing key of MemoryMappedIO, two instances would be " - "created with the same key. This is prevented by defining " - "memory and port resource subclasses of MemoryMappedIO, and " - "allowing the CreationClassName key property to distinguish " - "between them and force uniqueness in their keys." )] -class CIM_PortResource : CIM_MemoryMappedIO { - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_Process.mof b/build/vendor/dmtf_mof/System/CIM_Process.mof deleted file mode 100644 index 688fe6ff..00000000 --- a/build/vendor/dmtf_mof/System/CIM_Process.mof +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Unix Process Priority Correction -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Process -// ================================================================== - [Version ( "2.10.0" ), - UMLPackagePath ( "CIM::System::Processing" ), - Description ( - "Each instance of the CIM_Process class represents a single " - "instance of a running program. A user of the OperatingSystem " - "will typically see a Process as an application or task. Within " - "an OperatingSystem, a Process is defined by a workspace of " - "memory resources and environmental settings that are allocated " - "to it. On a multitasking System, this workspace prevents " - "intrusion of resources by other Processes. Additionally, a " - "Process can execute as multiple Threads, all which run within " - "the same workspace." )] -class CIM_Process : CIM_EnabledLogicalElement { - - [Key, Description ( - "The scoping ComputerSystem\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_OperatingSystem.CSCreationClassName" )] - string CSCreationClassName; - - [Key, Description ( "The scoping ComputerSystem\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_OperatingSystem.CSName" )] - string CSName; - - [Key, Description ( - "The scoping OperatingSystem\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_OperatingSystem.CreationClassName" )] - string OSCreationClassName; - - [Key, Description ( "The scoping OperatingSystem\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_OperatingSystem.Name" )] - string OSName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Description ( - "A string used to identify the Process. A Process ID is a " - "kind of Process Handle." ), - MaxLen ( 256 ), - MappingStrings { "MIF.DMTF|Process Information|001.1" }] - string Handle; - - [Override ( "Name" ), - Description ( "The name of the process." ), - MappingStrings { "MIF.DMTF|Process Information|001.6" }] - string Name; - - [Description ( - "Priority indicates the urgency or importance of " - "execution of a Process. Lower values reflect more " - "favorable process scheduling. If a priority is not " - "defined for a Process, a value of 0 should be used." ), - MappingStrings { "MIF.DMTF|Process Information|001.10" }] - uint32 Priority; - - [Description ( - "Indicates the current operating condition of the " - "Process. Values include ready (2), running (3), and " - "blocked (4), among others. The majority of the " - "enumerated values are obvious. However, a few require " - "additional explanation: \n" - "7 (Terminated) describes that a process has naturally " - "completed \n" - "8 (Stopped) describes that a process has been " - "prematurely \'stopped\' by a user or other request \n" - "10 (Ready but Relinquished Processor) describes that a " - "process is in the Ready state, but has voluntarily " - "relinquished execution time to other processes. For " - "example, this state may indicate a problem when the " - "relinquishing process is not handling items on its " - "queues. If these semantics cannot be detected, the " - "process should report its state as 2 (\"Ready\"). \n" - "11 (Hung) indicates that a process is not responding and " - "should therefore not be given further execution time." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11" }, - Values { "Unknown", "Other", "Ready", "Running", "Blocked", - "Suspended Blocked", "Suspended Ready", "Terminated", - "Stopped", "Growing", "Ready But Relinquished Processor", - "Hung" }, - MappingStrings { "MIF.DMTF|Process Information|001.9", - "MIF.UNIX|Process Information|13.9" }] - uint16 ExecutionState; - - [Description ( - "A string describing the state - used when the instance\'s " - "ExecutionState property is set to 1 (\"Other\"). Other " - "ExecutionDescription should be set to NULL when the " - "Execution State property is any value other than 1." )] - string OtherExecutionDescription; - - [Description ( "Time that the Process began executing." )] - datetime CreationDate; - - [Description ( - "Time that the Process was stopped or terminated." )] - datetime TerminationDate; - - [Description ( - "Time in kernel mode, in milliseconds. If this " - "information is not available, or if the operating system " - "does not distinguish between time in kernel and in user " - "mode, a value of 0 should be used." ), - Units ( "MilliSeconds" ), - MappingStrings { "MIF.DMTF|Process Information|001.13" }] - uint64 KernelModeTime; - - [Description ( - "Time in user mode, in milliseconds. If this information " - "is not available, a value of 0 should be used. If the " - "operating system does not distinguish between time in " - "kernel mode and user mode, the time should be returned " - "in this property." ), - Units ( "MilliSeconds" ), - MappingStrings { "MIF.DMTF|Process Information|001.14" }] - uint64 UserModeTime; - - [Description ( - "The amount of memory in bytes that a Process needs to " - "execute efficiently, for an OperatingSystem that uses " - "page-based memory management. If an insufficient amount " - "of memory is available (< working set size), thrashing " - "will occur. If this information is not known, NULL or 0 " - "should be entered. If this data is provided, it could be " - "monitored to understand a Process\' changing memory " - "requirements as execution proceeds." ), - Units ( "Bytes" ), - Gauge] - uint64 WorkingSetSize; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_ProcessExecutable.mof b/build/vendor/dmtf_mof/System/CIM_ProcessExecutable.mof deleted file mode 100644 index 511fd30b..00000000 --- a/build/vendor/dmtf_mof/System/CIM_ProcessExecutable.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ProcessExecutable -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::Processing" ), - Description ( - "A link between a Process and a DataFile indicating that the " - "File participates in the execution of the Process." )] -class CIM_ProcessExecutable : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( - "The DataFile participating in the execution of the Process." - )] - CIM_DataFile REF Antecedent; - - [Override ( "Dependent" ), - Description ( "The Process." )] - CIM_Process REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_ProcessOfJob.mof b/build/vendor/dmtf_mof/System/CIM_ProcessOfJob.mof deleted file mode 100644 index 9bdfe487..00000000 --- a/build/vendor/dmtf_mof/System/CIM_ProcessOfJob.mof +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ProcessOfJob -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::System::Processing" ), - Description ( - "ProcessOfJob describes that the referenced Process is the " - "result of the execution of the Job. A Job may cause multiple " - "Processes to run, perhaps on different operating systems. This " - "is allowed by the \'*\' cardinality of the Process reference. " - "Note that a Process can result from only one Job - hence, the " - "\'0..1\' cardinality on Job." )] -class CIM_ProcessOfJob : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Description ( - "Execution of the Job results in the creation of the " - "Process referenced as PartComponent. The Job aggregates " - "the Process(es) that are created when it is executed." )] - CIM_Job REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "The Process that results from the execution of the Job." )] - CIM_Process REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_ProcessThread.mof b/build/vendor/dmtf_mof/System/CIM_ProcessThread.mof deleted file mode 100644 index 7e8a7fcf..00000000 --- a/build/vendor/dmtf_mof/System/CIM_ProcessThread.mof +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ProcessThread -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::System::Processing" ), - Description ( - "A link between a Process and the Thread(s) running in the " - "context of this Process." )] -class CIM_ProcessThread : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( "The Process." )] - CIM_Process REF GroupComponent; - - [Override ( "PartComponent" ), - Weak, Description ( - "The Thread running in the context of the Process." )] - CIM_Thread REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_RecordAppliesToElement.mof b/build/vendor/dmtf_mof/System/CIM_RecordAppliesToElement.mof deleted file mode 100644 index 650bf7d0..00000000 --- a/build/vendor/dmtf_mof/System/CIM_RecordAppliesToElement.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RecordAppliesToElement -// ================================================================== - [Association, Version ( "2.9.0" ), - UMLPackagePath ( "CIM::System::Logs" ), - Description ( - "ManagedSystemElements may create RecordForLog objects to " - "record their event, error or informational data within Logs. " - "The relationship between these managed elements and the " - "records they create is described by this association." )] -class CIM_RecordAppliesToElement : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The Record." )] - CIM_RecordForLog REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The ManagedSystemElement that participated in the " - "creation of the Record." )] - CIM_ManagedElement REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_RecordForLog.mof b/build/vendor/dmtf_mof/System/CIM_RecordForLog.mof deleted file mode 100644 index 3facd28a..00000000 --- a/build/vendor/dmtf_mof/System/CIM_RecordForLog.mof +++ /dev/null @@ -1,100 +0,0 @@ - [Abstract, Version ( "2.25.0" ), - UMLPackagePath ( "CIM::System::Logs" ), - Description ( - "The RecordForLog class is used to instantiate records to be " - "aggregated to a Log." )] -class CIM_RecordForLog : CIM_ManagedElement { - - [Description ( - "A string describing the data structure of the " - "information in the property, RecordData. If the " - "RecordFormat string is , RecordData should be " - "interpreted as a free-form string. \n" - "\n" - "To describe the data structure of RecordData, the " - "RecordFormat string should be constructed as follows: \n" - "- The first character is a delimiter character and is " - "used to parse the remainder of the string into " - "sub-strings. \n" - "- Each sub-string is separated by the delimiter " - "character and should be in the form of a CIM property " - "declaration (i.e., datatype and property name). This set " - "of declarations may be used to interpret the similarly " - "delimited RecordData property. \n" - "For example, using a \'*\' delimiter, RecordFormat = " - "\"*string ThisDay*uint32 ThisYear*datetime SomeTime\" \n" - "may be used to interpret: RecordData = \"*This is " - "Friday*2002*20020807141000.000000-300\"." ), - ModelCorrespondence { "CIM_RecordForLog.RecordData" }] - string RecordFormat; - - [Description ( - "A string containing LogRecord data. \n" - "If the corresponding RecordFormat property is , " - "or cannot be parsed according to the recommended format, " - "RecordData should be interpreted as a free-form string. " - "If the RecordFormat property contains parseable format " - "information (as recommended in the RecordFormat " - "Description qualifier), the RecordData string SHOULD be " - "parsed in accordance with this format. In this case, " - "RecordData SHOULD begin with the delimiter character and " - "this character SHOULD be used to separate substrings in " - "the manner described. The RecordData string can then be " - "parsed by the data consumer and appropriately typed." ), - ModelCorrespondence { "CIM_RecordForLog.RecordFormat" }] - string RecordData; - - [Description ( - "A locale indicates a particular geographical, political, " - "or cultural region. The Locale specifies the language " - "used in creating the RecordForLog data. If the Locale " - "property is empty, it is assumed that the default locale " - "is en_US (English). \n" - "The locale string consists of three sub-strings, " - "separated by underscores: \n" - "- The first sub-string is the language code, as " - "specified in ISO639. \n" - "- The second sub-string is the country code, as " - "specified in ISO3166. \n" - "- The third sub-string is a variant, which is vendor " - "specific. \n" - "For example, US English appears as: \"en_US_WIN\", where " - "the \"WIN\" variant would specify a Windows " - "browser-specific collation (if one exists). Since the " - "variant is not standardized, it is not commonly used and " - "generally is limited to easily recognizable values " - "(\"WIN\", \"UNIX\", \"EURO\", etc.) used in standard " - "environments. The language and country codes are " - "required; the variant may be empty." )] - string Locale; - - [Description ( - "An enumerated value that describes the severity of the " - "Indication from the notifier\'s point of view: \n" - "1 - Other, by CIM convention, is used to indicate that " - "the Severity\'s value can be found in the OtherSeverity " - "property. \n" - "3 - Degraded/Warning should be used when its appropriate " - "to let the user decide if action is needed. \n" - "4 - Minor should be used to indicate action is needed, " - "but the situation is not serious at this time. \n" - "5 - Major should be used to indicate action is needed " - "NOW. \n" - "6 - Critical should be used to indicate action is needed " - "NOW and the scope is broad (perhaps an imminent outage " - "to a critical resource will result). \n" - "7 - Fatal/NonRecoverable should be used to indicate an " - "error occurred, but it\'s too late to take remedial " - "action. \n" - "2 and 0 - Information and Unknown (respectively) follow " - "common usage. Literally, the Indication is purely " - "informational or its severity is simply unknown." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7" }, - Values { "Unknown", "Other", "Information", - "Degraded/Warning", "Minor", "Major", "Critical", - "Fatal/NonRecoverable" }, - MappingStrings { "Recommendation.ITU|X733.Perceived severity" }] - uint16 PerceivedSeverity; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_RecordInLog.mof b/build/vendor/dmtf_mof/System/CIM_RecordInLog.mof deleted file mode 100644 index f3130705..00000000 --- a/build/vendor/dmtf_mof/System/CIM_RecordInLog.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RecordInLog -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::System::Logs" ), - Description ( - "RecordInLog describes the aggregation or location of Log " - "entries within a MessageLog." )] -class CIM_RecordInLog { - - [Key, Aggregate, Min ( 1 ), - Max ( 1 ), - Description ( "The Message Log." )] - CIM_MessageLog REF MessageLog; - - [Key, Weak, Description ( - "The Log entry contained within the MessageLog." )] - CIM_LogRecord REF LogRecord; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_RecordLog.mof b/build/vendor/dmtf_mof/System/CIM_RecordLog.mof deleted file mode 100644 index 87d9d821..00000000 --- a/build/vendor/dmtf_mof/System/CIM_RecordLog.mof +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::System::Logs" ), - Description ( - "RecordLog serves as an aggregation point for LogRecord " - "objects. This class presents a higher level view of a log than " - "its peer class MessageLog (which uses iterators) and " - "introduces a new key structure. Access to records in this log " - "is achieved through the use of the standard CIM Operations " - "defined as part of WBEM." )] -class CIM_RecordLog : CIM_Log { - - [Key, Override ( "InstanceID" ), - Description ( - "Within the scope of the instantiating Namespace, " - "InstanceID opaquely and uniquely identifies an instance " - "of this class. \n" - "In order to ensure uniqueness within the NameSpace, the " - "value of InstanceID SHOULD be constructed using the " - "following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon " - "\':\', and where MUST include a copyrighted, " - "trademarked or otherwise unique name that is owned by " - "the business entity creating/defining the InstanceID, or " - "is a registered ID that is assigned to the business " - "entity by a recognized global authority (This is similar " - "to the _ structure of Schema " - "class names.) In addition, to ensure uniqueness " - "MUST NOT contain a colon (\':\'). When using this " - "algorithm, the first colon to appear in InstanceID MUST " - "appear between and . \n" - " is chosen by the business entity and SHOULD " - "not be re-used to identify different underlying " - "(real-world) elements. If the above \'preferred\' " - "algorithm is not used, the defining entity MUST assure " - "that the resultant InstanceID is not re-used across any " - "InstanceIDs produced by this or other providers for this " - "instance\'s NameSpace. \n" - "For DMTF defined instances, the \'preferred\' algorithm " - "MUST be used with the set to \'CIM\'." )] - string InstanceID; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_RemoteFileSystem.mof b/build/vendor/dmtf_mof/System/CIM_RemoteFileSystem.mof deleted file mode 100644 index be27d384..00000000 --- a/build/vendor/dmtf_mof/System/CIM_RemoteFileSystem.mof +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RemoteFileSystem -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::FileElements" ), - Description ( - "A class derived from FileSystem that represents access of the " - "FileSystem via a network-related service. In this case, the " - "file store is hosted by a computer, acting as a file server. " - "For example, the file store for an NFS FileSystem is typically " - "NOT on a ComputerSystem\'s locally controlled media, nor is it " - "directly accessed through a device driver. Subclasses of " - "RemoteFileSystem contain client-side configuration information " - "related to the access of the FileSystem." )] -class CIM_RemoteFileSystem : CIM_FileSystem { - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_ResidesOnExtent.mof b/build/vendor/dmtf_mof/System/CIM_ResidesOnExtent.mof deleted file mode 100644 index 0c8110b7..00000000 --- a/build/vendor/dmtf_mof/System/CIM_ResidesOnExtent.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ResidesOnExtent -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::System::FileElements" ), - Description ( - "An association between a LogicalElement and the StorageExtent " - "where it is located. Typically, a FileSystem ResidesOn a " - "LogicalDisk. However, it is possible for a logical file or " - "other internal data store to reside directly on a " - "StorageExtent or appropriate subclass." )] -class CIM_ResidesOnExtent : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The StorageExtent." )] - CIM_StorageExtent REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The LogicalElement that is located on the StorageExtent." )] - CIM_LogicalElement REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_ResourceOfSystem.mof b/build/vendor/dmtf_mof/System/CIM_ResourceOfSystem.mof deleted file mode 100644 index 01f9de9a..00000000 --- a/build/vendor/dmtf_mof/System/CIM_ResourceOfSystem.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_ResourceOfSystem -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.2" ), - UMLPackagePath ( "CIM::System::SystemResources" ), - Description ( - "An association between a System and a SystemResource that " - "exists and is allocated in the context of the System." )] -class CIM_ResourceOfSystem : CIM_SystemComponent { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The System in whose context the Resource exists and is allocated." - )] - CIM_System REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "A Resource of the System." )] - CIM_SystemResource REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_RunningOS.mof b/build/vendor/dmtf_mof/System/CIM_RunningOS.mof deleted file mode 100644 index 13ed6bc3..00000000 --- a/build/vendor/dmtf_mof/System/CIM_RunningOS.mof +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_RunningOS -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::OperatingSystem" ), - Description ( - "RunningOS indicates the currently executing OperatingSystem. " - "At most one OperatingSystem can execute at any time on a " - "ComputerSystem. \'At most one\' is specified, since the " - "Computer System may not be currently booted, or its " - "OperatingSystem may be unknown." )] -class CIM_RunningOS : CIM_Dependency { - - [Override ( "Antecedent" ), - Max ( 1 ), - Description ( - "The OperatingSystem currently running on the ComputerSystem." - )] - CIM_OperatingSystem REF Antecedent; - - [Override ( "Dependent" ), - Max ( 1 ), - Description ( "The ComputerSystem." )] - CIM_ComputerSystem REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_ServiceProcess.mof b/build/vendor/dmtf_mof/System/CIM_ServiceProcess.mof deleted file mode 100644 index 3b32ccad..00000000 --- a/build/vendor/dmtf_mof/System/CIM_ServiceProcess.mof +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Drop extraneous -// sentence from class description. -// ================================================================== -// CIM_ServiceProcess -// ================================================================== - [Association, Version ( "2.14.0" ), - UMLPackagePath ( "CIM::System::Processing" ), - Description ( - "CIM_ServiceProcess is an association used to establish " - "relationships between Services and Processes. It is used to " - "indicate if a Service is running in a particular Process. It " - "is also used to indicate, via the ExecutionType property, if " - "the Service started and is wholly responsible for the Process, " - "or if the Service is running in an existing Process, perhaps " - "with other unrelated Services, which is owned or started by a " - "different entity." )] -class CIM_ServiceProcess { - - [Key, Description ( - "The Service whose Process is described by this association." - )] - CIM_Service REF Service; - - [Key, Description ( - "The Process which represents or hosts the executing Service." - )] - CIM_Process REF Process; - - [Description ( - "Enumeration indicating how the Service runs in the " - "context of, or owns the Process. \"Unknown\" indicates " - "that the ExecutionType is not known. \"Other\" indicates " - "that the ExecutionType does not match any of the values " - "in the ExecutionType enumeration. \"Executes in Existing " - "Process\" indicates that the Service is hosted in a " - "Process that already exists in the system. The lifecycle " - "of the Service is separate from that of the Process. " - "\"Exeutes as Independent Process\" indicates that the " - "Service is responsible for the lifecycle of the Process. " - "When the Service is started, the Process is created. For " - "example, ServletEngines can run \"InProcess\" within the " - "existing Apache processes or \"OutOfProcess\" in its own " - "servlet engine process. In this case the Apache process " - "would communicate with the servlet engine process based " - "on the content of the request. The association may be " - "many to many." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Other", "Executes in Existing Process", - "Executes as Independent Process" }] - uint16 ExecutionType; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_SymbolicLink.mof b/build/vendor/dmtf_mof/System/CIM_SymbolicLink.mof deleted file mode 100644 index 5d738118..00000000 --- a/build/vendor/dmtf_mof/System/CIM_SymbolicLink.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SymbolicLink -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::FileElements" ), - Description ( - "This class is a special type of LogicalFile that represents a " - "Symbolic Link. This convention is useful for some operating " - "systems that want to represent a single file in multiple " - "places or a single file that is represented via multiple " - "names." )] -class CIM_SymbolicLink : CIM_LogicalFile { - - [Required, Description ( - "The target file of the symbolic link." )] - string TargetFile; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_SystemPartition.mof b/build/vendor/dmtf_mof/System/CIM_SystemPartition.mof deleted file mode 100644 index 5d09821b..00000000 --- a/build/vendor/dmtf_mof/System/CIM_SystemPartition.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SystemPartition -// ================================================================== - [Association, Aggregation, Composition, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::System::SystemElements" ), - Description ( - "A Partition is an instance of a UnitaryComputerSystem (with " - "its own OperatingSystem and Devices dedicated to the " - "Partition) that is supported by underlying hardware and " - "software. A Partition is not a virtualization of a Computer " - "System, but the segmentation of the System\'s compute " - "capabilities. Partitions can run independent copies of " - "possibly different OperatingSystems and have dedicated " - "Devices. The \'real\', underlying System (perhaps a Cluster or " - "another UnitaryComputerSystem) aggregates its Partitions. " - "These semantics are described by the System Partition " - "association." )] -class CIM_SystemPartition : CIM_ComponentCS { - - [Aggregate, Override ( "GroupComponent" ), - Max ( 1 ), - Description ( - "The \'underlying\' ComputerSystem that hosts a Partition." )] - CIM_ComputerSystem REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( "The System Partition." )] - CIM_UnitaryComputerSystem REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_SystemResource.mof b/build/vendor/dmtf_mof/System/CIM_SystemResource.mof deleted file mode 100644 index e0542ace..00000000 --- a/build/vendor/dmtf_mof/System/CIM_SystemResource.mof +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_SystemResource -// ================================================================== - [Abstract, Version ( "2.7.0" ), - UMLPackagePath ( "CIM::System::SystemResources" ), - Description ( - "An entity managed by BIOS, an OperatingSystem or other " - "software, which is available for use by application software " - "and/or LogicalDevices. Resources are individually identified " - "and allocated entities, that are assignable, reservable, " - "counted/ tracked, releasable, reset-able, etc. Examples of " - "software Resources are message queues, shared memory segments " - "(identified by a key value), and named pipes, while examples " - "of hardware Resources (in an x86 environment) are IRQs, DMA " - "channels and memory mapped I/O." )] -class CIM_SystemResource : CIM_EnabledLogicalElement { - - [Description ( - "Boolean indicating whether the Resource can be shared." )] - boolean Shareable; - - [Description ( - "Indicates whether the Resource is implemented in " - "hardware, software or both." ), - ValueMap { "0", "2", "3", "4" }, - Values { "Unknown", "Hardware Only", "Software Only", - "Hardware and Software" }] - uint16 ImplementationInfo; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_Thread.mof b/build/vendor/dmtf_mof/System/CIM_Thread.mof deleted file mode 100644 index 2173d8de..00000000 --- a/build/vendor/dmtf_mof/System/CIM_Thread.mof +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Thread -// ================================================================== - [Version ( "2.7.0" ), - UMLPackagePath ( "CIM::System::Processing" ), - Description ( - "Threads represent the ability to execute units of a Process or " - "task in parallel. A Process can have many Threads, each of " - "which is weak to the Process." )] -class CIM_Thread : CIM_EnabledLogicalElement { - - [Key, Description ( - "The scoping ComputerSystem\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_Process.CSCreationClassName" )] - string CSCreationClassName; - - [Key, Description ( "The scoping ComputerSystem\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_Process.CSName" )] - string CSName; - - [Key, Description ( - "The scoping OperatingSystem\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_Process.OSCreationClassName" )] - string OSCreationClassName; - - [Key, Description ( "The scoping OperatingSystem\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_Process.OSName" )] - string OSName; - - [Key, Description ( "The scoping Process\' CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_Process.CreationClassName" )] - string ProcessCreationClassName; - - [Key, Description ( "The scoping Process\' Handle." ), - MaxLen ( 256 ), - Propagated ( "CIM_Process.Handle" )] - string ProcessHandle; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allow all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Description ( "A string used to identify the Thread." ), - MaxLen ( 256 )] - string Handle; - - [Description ( - "Priority indicates the urgency or importance of " - "execution of a Thread. A Thread may have a different " - "priority than its owning Process. If this information is " - "not available for a Thread, a value of 0 should be used." )] - uint32 Priority; - - [Description ( - "Indicates the current operating condition of the Thread. " - "Values include ready (2), running (3), and blocked (4), " - "among others. The majority of the enumerated values are " - "obvious. However, a few require additional explanation: \n" - "7 (Ready but Relinquished Processor) describes that a " - "thread is in the Ready state, but has voluntarily " - "relinquished execution time to other threads. For " - "example, this state may indicate a problem when the " - "relinquishing thread is not handling items on its " - "queues. If these semantics cannot be detected, the " - "thread should report its state as 2 (\"Ready\"). \n" - "8 (Hung) indicates that a thread is not responding." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Unknown", "Other", "Ready", "Running", "Blocked", - "Suspended Blocked", "Suspended Ready", - "Ready But Relinquished Processor", "Hung" }] - uint16 ExecutionState; - - [Description ( - "Time in kernel mode, in milliseconds. If this " - "information is not available, a value of 0 should be " - "used." ), - Units ( "MilliSeconds" )] - uint64 KernelModeTime; - - [Description ( - "Time in user mode, in milliseconds. If this information " - "is not available, a value of 0 should be used." ), - Units ( "MilliSeconds" )] - uint64 UserModeTime; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_TimeZone.mof b/build/vendor/dmtf_mof/System/CIM_TimeZone.mof deleted file mode 100644 index e9190d09..00000000 --- a/build/vendor/dmtf_mof/System/CIM_TimeZone.mof +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_TimeZone -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::Time" ), - Description ( - "The TimeZone class is a set of properties defining a " - "particular time zone. These properties include the concept of " - "daylight saving time." )] -class CIM_TimeZone : CIM_Setting { - - [Key, Description ( - "Time zone identifier. The Id MAY be expressed in the " - "form \'area name/city name\' (e.g., \"America/New_York\"), " - "or as a time zone name (for example, EST or EDT)." )] - string TimeZoneID; - - [Key, Description ( - "The date and time at which this time zone definition " - "takes effect. The value is specified in UTC." )] - datetime TimeZoneStartDate; - - [Description ( - "Full name of the \'standard\' time zone (e.g., \"U.S. " - "Eastern Standard Time\"), suitable for presentation to " - "the user in the default locale." ), - ModelCorrespondence { "CIM_TimeZone.StandardCaption" }] - string StandardName; - - [Description ( - "Short name of the \'standard\' time zone (e.g., \"EST\"), " - "suitable for presentation to the user in the default " - "locale. Note that a specific StandardCaption property is " - "defined, instead of using the inherited Caption. This is " - "done to force consistent property naming for the " - "StandardXXX and DaylightXXX properties." ), - ModelCorrespondence { "CIM_TimeZone.StandardName" }] - string StandardCaption; - - [Description ( - "The number of minutes by which this \'standard\' time " - "differs from UTC. For example, U.S. EST differs from UTC " - "by -5.0 hours or -300 minutes, whereas Australia " - "Adelaide Standard Time differs by 9.5 hours or 570 " - "minutes." ), - Units ( "Minutes" )] - sint32 StandardOffset; - - [Description ( - "The month in which daylight saving time ends (and " - "\'standard\' time begins). Specify 0 for January, 1 for " - "February, and so on." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11" }, - Values { "January", "February", "March", "April", "May", - "June", "July", "August", "September", "October", - "November", "December" }, - ModelCorrespondence { "CIM_TimeZone.StandardDay" }] - uint8 StandardMonth; - - [Description ( - "There are two different interpretations for this " - "property, depending on the value of StandardDayOfWeek. " - "In one case, StandardDay defines the day-in-month on " - "which daylight saving time ends. This interpretation is " - "used when the StandardDayOfWeek is 0. A positive or " - "negative integer is specified to indicate whether the " - "StandardDay should be calculated from the beginning or " - "the end of the month. For example, 5 indicates the fifth " - "day in the StandardMonth and -1 indicates the last day " - "in the StandardMonth. \n" - "\n" - "When StandardDayOfWeek is not 0, StandardDay is the day- " - "in-month on which daylight saving time ends, defined in " - "conjunction with StandardDayOfWeek. For example, if " - "StandardDay is 15 and StandardDayOfWeek is Saturday, " - "then daylight saving time ends on the first Saturday on " - "or after the 15th day in the StandardMonth (i.e., the " - "third Saturday in the month). If StandardDay is 20 and " - "StandardDayOfWeek is -Saturday, then this indicates the " - "first Saturday on or before the 20th day in the " - "StandardMonth. If StandardDay is -1 and " - "StandardDayOfWeek is -Sunday, then this indicates the " - "last Sunday in the StandardMonth." ), - MinValue ( -31 ), - MaxValue ( 31 ), - ModelCorrespondence { "CIM_TimeZone.StandardDayOfWeek" }] - sint8 StandardDay; - - [Description ( - "Positive or negative integer used in conjunction with " - "StandardDay to indicate the day of the week on which " - "daylight saving time ends (and \'standard\' time " - "begins). StandardDayOfWeek is set to 0 to indicate an " - "exact day of the month, such as March 1. A positive " - "integer (representing Sunday, Monday, ..., Saturday) " - "means that the day of week is found on or after the " - "specified StandardDay. A negative integer (representing " - "-Sunday, -Monday, ..., -Saturday) means that the day of " - "week is found on or before the StandardDay." ), - ValueMap { "-7", "-6", "-5", "-4", "-3", "-2", "-1", "0", - "1", "2", "3", "4", "5", "6", "7" }, - Values { "-Saturday", "-Friday", "-Thursday", "-Wednesday", - "-Tuesday", "-Monday", "-Sunday", "ExactDayOfMonth", - "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", - "Friday", "Saturday" }, - ModelCorrespondence { "CIM_TimeZone.StandardDay" }] - sint8 StandardDayOfWeek; - - [Description ( - "The time interval after midnight when daylight saving " - "time ends. For example, \n" - "00000000020000.000000:000 \n" - "indicates that daylight saving time ends at two o\'clock, " - "local time (usually, daylight saving time)." )] - datetime StandardStartInterval; - - [Description ( - "Full name of the \'daylight\' time zone (e.g., \"U.S. " - "Eastern Daylight Saving Time\"), suitable for " - "presentation to the user in the default locale." ), - ModelCorrespondence { "CIM_TimeZone.DaylightCaption" }] - string DaylightName; - - [Description ( - "Short name of the \'daylight\' time zone (e.g., \"EDT\"), " - "suitable for presentation to the user in the default " - "locale. Note that a specific DaylightCaption property is " - "defined, instead of using the inherited Caption. This is " - "done to force consistent property naming for the " - "StandardXXX and DaylightXXX properties." ), - ModelCorrespondence { "CIM_TimeZone.DaylightName" }] - string DaylightCaption; - - [Description ( - "The number of minutes by which this daylight saving time " - "differs from UTC. For example, U.S. EDT differs from UTC " - "by -4.0 hours or -240 minutes, whereas Australia " - "Adelaide Daylight Time differs by 10.5 hours or 630 " - "minutes." ), - Units ( "Minutes" )] - sint32 DaylightOffset; - - [Description ( - "The month in which daylight saving time starts. Specify " - "0 for January, 1 for February, and so on." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "10", "11" }, - Values { "January", "February", "March", "April", "May", - "June", "July", "August", "September", "October", - "November", "December" }, - ModelCorrespondence { "CIM_TimeZone.DaylightDay" }] - uint8 DaylightMonth; - - [Description ( - "There are two different interpretations for this " - "property, depending on the value of DaylightDayOfWeek. " - "In one case, DaylightDay defines the day-in-month on " - "which daylight saving time starts. This interpretation " - "is used when the DaylightDayOfWeek is 0. A positive or " - "negative integer is specified to indicate whether the " - "DaylightDay should be calculated from the beginning or " - "the end of the month. For example, 5 indicates the fifth " - "day in the DaylightMonth and -1 indicates the last day " - "in the DaylightMonth. \n" - "\n" - "When DaylightDayOfWeek is not 0, DaylightDay is the day- " - "in-month on which daylight saving time starts, defined " - "in conjunction with DaylightDayOfWeek. For example, if " - "DaylightDay is 15 and DaylightDayOfWeek is Saturday, " - "then daylight saving time starts on the first Saturday " - "on or after the 15th day in the DaylightMonth (i.e., the " - "third Saturday in the month). If DaylightDay is 20 and " - "DaylightDayOfWeek is -Saturday, then this indicates the " - "first Saturday on or before the 20th day in the " - "DaylightMonth. If DaylightDay is -1 and " - "DaylightDayOfWeek is -Sunday, then this indicates the " - "last Sunday in the month." ), - MinValue ( -31 ), - MaxValue ( 31 ), - ModelCorrespondence { "CIM_TimeZone.DaylightDayOfWeek" }] - sint8 DaylightDay; - - [Description ( - "Positive or negative integer used in conjunction with " - "DaylightDay to indicate the day of the week on which " - "daylight saving time starts. Set DaylightDayOfWeek to 0 " - "to indicate an exact day of month, such as March 1. " - "Positive integer (Sunday, Monday, ..., Saturday) means " - "that the day of week is found on or after DaylightDay. " - "Negative integer (-Sunday, -Monday, ..., -Saturday) " - "means that the day of week is found on or before " - "DaylightDay." ), - ValueMap { "-7", "-6", "-5", "-4", "-3", "-2", "-1", "0", - "1", "2", "3", "4", "5", "6", "7" }, - Values { "-Saturday", "-Friday", "-Thursday", "-Wednesday", - "-Tuesday", "-Monday", "-Sunday", "ExactDayOfMonth", - "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", - "Friday", "Saturday" }, - ModelCorrespondence { "CIM_TimeZone.DaylightDay" }] - sint8 DaylightDayOfWeek; - - [Description ( - "The time interval after midnight when daylight saving " - "time starts. For example, \n" - "00000000020000.000000:000 \n" - "indicates that daylight saving time starts at two " - "o\'clock, local time (usually, standard time)." )] - datetime DaylightStartInterval; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_UnitaryComputerSystem.mof b/build/vendor/dmtf_mof/System/CIM_UnitaryComputerSystem.mof deleted file mode 100644 index 6c28d705..00000000 --- a/build/vendor/dmtf_mof/System/CIM_UnitaryComputerSystem.mof +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// Deprecate class. -// ================================================================== -// CIM_UnitaryComputerSystem -// ================================================================== - [Deprecated { "CIM_ComputerSystem" }, - Version ( "2.15.0" ), - UMLPackagePath ( "CIM::System::SystemElements" ), - Description ( - "A class derived from ComputerSystem that represents a Desktop, " - "Mobile, NetPC, Server or other type of a single node Computer " - "System." )] -class CIM_UnitaryComputerSystem : CIM_ComputerSystem { - - [Deprecated { "CIM_BootSourceSetting" }, - Description ( - "This object contains the data needed to find either the " - "initial load device (its key) or the boot service to " - "request the operating system to start up. In addition, " - "the load parameters (ie, a pathname and parameters) may " - "also be specified." )] - string InitialLoadInfo[]; - - [Deprecated { "CIM_BootSourceSetting" }, - Description ( - "This object contains the data identifying either the " - "initial load device (its key) or the boot service that " - "requested the last operating system load. In addition, " - "the load parameters (ie, a pathname and parameters) may " - "also be specified." ), - MappingStrings { - "MIB.IETF|HOST-RESOURCES-MIB.hrSystemInitialLoadDevice", - "MIB.IETF|HOST-RESOURCES-MIB.hrSystemInitialLoadParameters", - "MIF.DMTF|Host System|001.3" }] - string LastLoadInfo; - - [Deprecated { "CIM_PowerManagementCapabilities" }, - Description ( - "When TRUE, indicates that the computer can be power " - "managed. The use of this property has been deprecated. " - "Instead, the existence of an associated " - "PowerManagementCapabilities class (associated using the " - "ElementCapabilites relationship) indicates that power " - "management is supported." )] - boolean PowerManagementSupported; - - [Deprecated { "CIM_AssociatedPowerManagementService.PowerState" }, - Description ( - "Indicates the current power state of the ComputerSystem " - "and its associated OperatingSystem. This property is " - "being deprecated. Instead, the PowerState property in " - "the AssociatedPowerManagementService class SHOULD be " - "used. Regarding the Power Save states, these are defined " - "as follows: Value 4 (\"Power Save - Unknown\") indicates " - "that the System is known to be in a power save mode, but " - "its exact status in this mode is unknown; \n" - "Value 2 (\"Power Save - Low Power Mode\") indicates that " - "the System is in a power save state but still " - "functioning, and may exhibit degraded performance; \n" - "Value 3 (\"Power Save - Standby\") describes that the " - "System is not functioning but could be brought to full " - "power \'quickly\'; value 7 (\"Power Save - Warning\") " - "indicates that the ComputerSystem is in a warning state, " - "though also in a power save mode. \n" - "Values 8 and 9 describe the ACPI \"Hibernate\" and \"Soft " - "Off\" states." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" }, - Values { "Unknown", "Full Power", - "Power Save - Low Power Mode", "Power Save - Standby", - "Power Save - Unknown", "Power Cycle", "Power Off", - "Power Save - Warning", "Power Save - Hibernate", - "Power Save - Soft Off" }] - uint16 PowerState; - - [Deprecated { "No Value" }, - Description ( - "The event that caused the System to power up. This " - "information is available in SMBIOS, in the Type 1 " - "structure, the Wake Up Type attribute." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8" }, - Values { "Reserved", "Other", "Unknown", "APM Timer", - "Modem Ring", "LAN Remote", "Power Switch", "PCI PME#", - "A/C Power Restored" }] - uint16 WakeUpType; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_UnixDeviceFile.mof b/build/vendor/dmtf_mof/System/CIM_UnixDeviceFile.mof deleted file mode 100644 index 4dee78ac..00000000 --- a/build/vendor/dmtf_mof/System/CIM_UnixDeviceFile.mof +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_UnixDeviceFile -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::System::Unix" ), - Description ( - "DeviceFile is a special type of LogicalFile that represents a " - "Device. This class is a specialization of DeviceFile for a " - "Unix environment." )] -class CIM_UnixDeviceFile : CIM_DeviceFile { - - [Description ( "The type of device file." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Other", "Block", "Character" }, - ModelCorrespondence { - "CIM_UnixDeviceFile.OtherTypeDescription" }] - uint16 DeviceFileType; - - [Description ( - "Additional information when the DeviceFileType property " - "is set to \"Other\"." ), - ModelCorrespondence { "CIM_UnixDeviceFile.DeviceFileType" }] - string OtherTypeDescription; - - [Required, Description ( - "The device Identifier: this is the st_rdev field in the " - "stat structure." )] - string DeviceId; - - [Description ( - "Additional information provided by the driver. This " - "property may be null if no information is available, or " - "a general description of the device when available, e.g. " - "\"Non-rewind tape streamer\"." )] - string DeviceDescription; - - [Required, Description ( "The Device\'s Major Id." )] - string DeviceMajor; - - [Required, Description ( "The Device\'s Minor Id." )] - string DeviceMinor; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_UnixDirectory.mof b/build/vendor/dmtf_mof/System/CIM_UnixDirectory.mof deleted file mode 100644 index abf5f017..00000000 --- a/build/vendor/dmtf_mof/System/CIM_UnixDirectory.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_UnixDirectory -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::Unix" ), - Description ( - "UnixDirectory is a type of File that logically groups " - "UnixFiles \'contained\' in it." )] -class CIM_UnixDirectory : CIM_Directory { - - [Description ( - "Minimum number of bits needed to represent the maximum " - "size of a Unix file allowed in the specified directory, " - "as a signed integer value. Thus, a value of 32 indicates " - "a maximum size of 2**31 bytes." ), - Units ( "Bits" ), - MinValue ( 32 ), - MappingStrings { "POSIX.TOG|pathconf|_PC_FILESIZEBITS" }] - uint64 FileSizeBits; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_UnixFile.mof b/build/vendor/dmtf_mof/System/CIM_UnixFile.mof deleted file mode 100644 index fe36234a..00000000 --- a/build/vendor/dmtf_mof/System/CIM_UnixFile.mof +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_UnixFile -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::Unix" ), - Description ( - "The UnixFile class holds properties that are valid for various " - "subclasses of LogicalFile, in a Unix environment. This is " - "defined as a separate and unique class since it is applicable " - "to Unix files, directories, etc. It is associated via a " - "FileIdentity relationship to these subclasses of LogicalFile. " - "Unless this approach of creating and associating a separate " - "class is used, it is necessary to subclass each of the " - "inheritance hierarchies under LogicalFile, duplicating the " - "properties in this class. The referenced _PC* and _POSIX* " - "constants are defined in unistd.h. Some properties indicate " - "whether the UNIX implementation support a feature such as " - "asynchronous I/O or priority I/O. If supported, sysconf " - "returns the value as defined in the appropriate header file " - "such as unistd.h. If a feature is not supported, then pathconf " - "returns a -1. In this case, the corresponding property should " - "be returned without any value." )] -class CIM_UnixFile : CIM_LogicalElement { - - [Key, Description ( - "The scoping ComputerSystem\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_LogicalFile.CSCreationClassName" )] - string CSCreationClassName; - - [Key, Description ( "The scoping ComputerSystem\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_LogicalFile.CSName" )] - string CSName; - - [Key, Description ( - "The scoping FileSystem\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_LogicalFile.FSCreationClassName" )] - string FSCreationClassName; - - [Key, Description ( "The scoping FileSystem\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_LogicalFile.FSName" )] - string FSName; - - [Key, Description ( - "The scoping LogicalFile\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_LogicalFile.CreationClassName" )] - string LFCreationClassName; - - [Key, Description ( "The scoping LogicalFile\'s Name." ), - MaxLen ( 1024 ), - Propagated ( "CIM_LogicalFile.Name" )] - string LFName; - - [Required, Description ( - "An Identifer that uniquely describes the owner of this file." - )] - string UserID; - - [Required, Description ( - "An identifier that describes the group that owns this file." - )] - string GroupID; - - [Description ( - "Indicates restricted deletion for directories, or " - "possible implementation defined properties for " - "executable files. For directories this is known as the " - "sticky bit." )] - boolean SaveText; - - [Description ( "Count of the number of names for this file." ), - Counter] - uint64 LinkCount; - - [Description ( "File Inode number, as printed by \"ls -i\"." ), - MappingStrings { "UNIX.TOG|ls -i" }] - string FileInodeNumber; - - [Description ( - "Indicates whether the associated file has setuid permissions." - )] - boolean SetUid; - - [Description ( - "Indicates whether the associated file has setgid permissions." - )] - boolean SetGid; - - [Description ( - "The time that the Inode was last modified. This includes " - "the Inode creation time, state modification, and etc." )] - datetime LastModifiedInode; - - [Description ( "Maximum number of links to a single file." ), - MinValue ( 8 ), - MappingStrings { "POSIX.TOG|pathconf|_PC_LINK_MAX" }] - uint64 LinkMax; - - [Description ( - "Maximum number of bytes in a filename, not including " - "terminating null." ), - Units ( "Bytes" ), - MinValue ( 14 ), - MappingStrings { "POSIX.TOG|pathconf|_POSIX_NAME_MAX" }] - uint64 NameMax; - - [Description ( - "Maximum number of bytes in a pathname, including the " - "terminating null character." ), - Units ( "Bytes" ), - MinValue ( 255 ), - MappingStrings { "POSIX.TOG|pathconf|_POSIX_PATH_MAX" }] - uint64 PathMax; - - [Description ( - "The use of chown() is restricted to a process with " - "appropriate privileges. chown() is used to change the " - "group ID of a file. The group ID can be changed to the " - "effective group ID or one of its supplementary group " - "IDs." ), - MappingStrings { "POSIX.TOG|pathconf|_PC_CHOWN_RESTRICTED" }] - uint64 PosixChownRestricted; - - [Description ( - "Indicates whether pathname components longer than " - "NameMax generate an error." ), - MappingStrings { "POSIX.TOG|pathconf|_PC_NO_TRUNC" }, - ModelCorrespondence { "CIM_UnixFile.NameMax" }] - uint64 PosixNoTrunc; - - [Description ( - "Indicates whether asynchronous input or output " - "operations may be performed for the associated file." ), - MappingStrings { "POSIX.TOG|pathconf|_PC_ASYNC_IO" }] - uint64 PosixAsyncIo; - - [Description ( - "Indicates whether prioritized input or output operations " - "may be performed for the associated file." ), - MappingStrings { "POSIX.TOG|pathconf|_PC_PRIO_IO" }] - uint64 PosixPrioIo; - - [Description ( - "Indicates whether synchronised input or output " - "operations may be performed for the associated file." ), - MappingStrings { "POSIX.TOG|pathconf|_PC_SYNC_IO" }] - uint64 PosixSyncIo; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_UnixLocalFileSystem.mof b/build/vendor/dmtf_mof/System/CIM_UnixLocalFileSystem.mof deleted file mode 100644 index 31e26830..00000000 --- a/build/vendor/dmtf_mof/System/CIM_UnixLocalFileSystem.mof +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_UnixLocalFileSystem -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::System::Unix" ), - Description ( - "A class derived from LocalFileSystem that represents the Unix " - "environment view of a file store controlled by a " - "ComputerSystem through local means (e.g., direct device driver " - "access). In this case, the file store is managed directly by " - "the ComputerSystem without the need for another computer to " - "act as a file server. This definition does not breakdown in " - "the case of a Clustered File System. In this scenario, the " - "FileSystem is a LocalFileSystem, weak to the Cluster." )] -class CIM_UnixLocalFileSystem : CIM_LocalFileSystem { - - [Description ( - "The number of free inodes present in the file system. " - "This value is only valid if TotalSlots is non-zero." ), - MappingStrings { "MIF.DMTF|Host File System|001.12" }, - ModelCorrespondence { "CIM_UnixLocalFileSystem.TotalInodes" }] - uint64 FreeInodes; - - [Description ( - "The total number of inodes available in the file system. " - "A value of zero for TotalInodes indicates that this file " - "system does not have a preset limit." ), - MappingStrings { "MIF.DMTF|Host File System|001.11" }] - uint64 TotalInodes; - - [Description ( - "The reserve data capacity of the file system in bytes." ), - Units ( "Bytes" ), - MappingStrings { "MIF.DMTF|Host File System|001.15" }] - uint64 FSReservedCapacity; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_UnixProcess.mof b/build/vendor/dmtf_mof/System/CIM_UnixProcess.mof deleted file mode 100644 index 55a2946e..00000000 --- a/build/vendor/dmtf_mof/System/CIM_UnixProcess.mof +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_UnixProcess -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::Unix" ), - Description ( - "Each instance of the CIM_UnixProcess class represents a single " - "instance of a running program. A user of the Operating System " - "will typically see a Process as an application or task. Within " - "an OperatingSystem, a Process is defined by a workspace of " - "memory resources and environmental settings that are allocated " - "to it. On a multitasking System, this workspace prevents " - "intrusion of resources by other Processes. Additionally, a " - "Process can execute as multiple Threads, all which run within " - "the same workspace." )] -class CIM_UnixProcess : CIM_Process { - - [Required, Description ( - "The parent process ID of this executing process." ), - MappingStrings { "MIF.DMTF|Process Information|001.2" }] - string ParentProcessID; - - [Required, Description ( - "The Real User ID of this currently executing process." ), - MappingStrings { "MIF.DMTF|Process Information|001.4" }] - uint64 RealUserID; - - [Required, Description ( - "The Group ID of this currently executing process." ), - MappingStrings { "MIF.DMTF|Process Information|001.2" }] - uint64 ProcessGroupID; - - [Description ( - "If part of a group of processes are under the control of " - "a session leader, this property holds the session ID for " - "the group." )] - uint64 ProcessSessionID; - - [Description ( - "The TTY currently associated with this process." ), - MappingStrings { "MIF.DMTF|Process Information|001.5" }] - string ProcessTTY; - - [Description ( "The executing process\'s command path." ), - MappingStrings { "MIF.DMTF|Process Information|001.7" }] - string ModulePath; - - [Description ( - "The operating system parameters provided to the " - "executing process. These are the argv[] values." ), - MappingStrings { "MIF.DMTF|Process Information|001.8" }] - string Parameters[]; - - [Description ( - "The process\'s \'nice\' value. Used to compute its priority." - ), - MappingStrings { "MIF.DMTF|Process Information|001.11" }] - uint32 ProcessNiceValue; - - [Description ( - "A description of the event this process is currently " - "sleeping for. The precise nature of this string is " - "implementation defined, but is typically the address of " - "a system data structure that will be modified when the " - "event occurs. This string only has meaning when the " - "ExecutionState is \"Blocked\" or \"SuspendedBlocked\"." ), - ModelCorrespondence { "CIM_Process.ExecutionState" }] - string ProcessWaitingForEvent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_UnixProcessStatisticalInformation.mof b/build/vendor/dmtf_mof/System/CIM_UnixProcessStatisticalInformation.mof deleted file mode 100644 index 5cfb8723..00000000 --- a/build/vendor/dmtf_mof/System/CIM_UnixProcessStatisticalInformation.mof +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Fix description of CIM_UnixProcessStatisticalInformation.CPUTime -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_UnixProcessStatisticalInformation -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::Unix" ), - Description ( "The statistics associated with a Unix process." )] -class CIM_UnixProcessStatisticalInformation : CIM_StatisticalInformation { - - [Key, Description ( - "The scoping Process\'s ComputerSystem CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_Process.CSCreationClassName" )] - string CSCreationClassName; - - [Key, Description ( - "The scoping Process\'s ComputerSystem Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_Process.CSName" )] - string CSName; - - [Key, Description ( - "The scoping Process\'s OperatingSystem CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_Process.OSCreationClassName" )] - string OSCreationClassName; - - [Key, Description ( - "The scoping Process\'s OperatingSystem Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_Process.OSName" )] - string OSName; - - [Key, Description ( "The scoping Process\'s Handle." ), - MaxLen ( 256 ), - Propagated ( "CIM_Process.Handle" )] - string Handle; - - [Key, Description ( "The scoping Process\'s CreationClassName." ), - MaxLen ( 256 ), - Propagated ( "CIM_Process.CreationClassName" )] - string ProcessCreationClassName; - - [Key, Override ( "Name" ), - Description ( - "A string used to identify the related statistics of a " - "Process. This key allows multiple instances of " - "statistics to correspond to a single process. The " - "multiple instances could be used in applications such as " - "time-sliced statistics." ), - MaxLen ( 256 )] - string Name; - - [Description ( - "The percentage of a CPU\'s time this process is consuming." - ), - Units ( "Percent" ), - MappingStrings { "MIF.DMTF|Process Information|001.12" }] - uint32 CPUTime; - - [Description ( - "The number of KiloBytes of real text space used by the process." - ), - Units ( "KiloBytes" ), - MappingStrings { "MIF.DMTF|Process Information|001.15" }] - uint64 RealText; - - [Description ( - "The number of KiloBytes of real data space used by the process." - ), - Units ( "KiloBytes" ), - MappingStrings { "MIF.DMTF|Process Information|001.16" }] - uint64 RealData; - - [Description ( - "The number of KiloBytes of real stack space used by the process." - ), - Units ( "KiloBytes" ), - MappingStrings { "MIF.DMTF|Process Information|001.17" }] - uint64 RealStack; - - [Description ( - "The number of KiloBytes of virtual text space used by the process." - ), - Units ( "KiloBytes" ), - MappingStrings { "MIF.DMTF|Process Information|001.18" }] - uint64 VirtualText; - - [Description ( - "The number of KiloBytes of virtual data space used by the process." - ), - Units ( "KiloBytes" ), - MappingStrings { "MIF.DMTF|Process Information|001.19" }] - uint64 VirtualData; - - [Description ( - "The number of KiloBytes of virtual stack space used by " - "the process." ), - Units ( "KiloBytes" ), - MappingStrings { "MIF.DMTF|Process Information|001.20" }] - uint64 VirtualStack; - - [Description ( - "The number of KiloBytes of virtual space used for memory " - "mapped files by the process." ), - Units ( "KiloBytes" ), - MappingStrings { "MIF.DMTF|Process Information|001.22" }] - uint64 VirtualMemoryMappedFileSize; - - [Description ( - "The number of KiloBytes of shared memory used by the process." - ), - Units ( "KiloBytes" ), - MappingStrings { "MIF.DMTF|Process Information|001.21" }] - uint64 VirtualSharedMemory; - - [Description ( - "CPU time of terminated child processes in clock ticks." ), - Units ( "Clock Ticks" ), - Counter] - uint64 CpuTimeDeadChildren; - - [Description ( - "System time of terminated child processes in clock ticks." ), - Units ( "Clock Ticks" ), - Counter] - uint64 SystemTimeDeadChildren; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_UnixProcessStatistics.mof b/build/vendor/dmtf_mof/System/CIM_UnixProcessStatistics.mof deleted file mode 100644 index 5e97a9b2..00000000 --- a/build/vendor/dmtf_mof/System/CIM_UnixProcessStatistics.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_UnixProcessStatistics -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::Unix" ), - Description ( - "CIM_UnixProcessStatistics is an association that relates a " - "CIM_UnixProcess to its StatisticalInformation." )] -class CIM_UnixProcessStatistics : CIM_Statistics { - - [Override ( "Element" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The Process for which statistical or metric data is defined." - )] - CIM_UnixProcess REF Element; - - [Override ( "Stats" ), - Weak, Description ( - "The UNIX Process statistical information/object." )] - CIM_UnixProcessStatisticalInformation REF Stats; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_UnixThread.mof b/build/vendor/dmtf_mof/System/CIM_UnixThread.mof deleted file mode 100644 index 51ab5de2..00000000 --- a/build/vendor/dmtf_mof/System/CIM_UnixThread.mof +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_UnixThread -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::Unix" ), - Description ( - "Threads represent the ability to execute units of a Process or " - "task in parallel. A UnixThread inherits from the superclass, " - "CIM_Thread, which is weak to the Process. The values used are " - "defined in sched.h and psched.h." )] -class CIM_UnixThread : CIM_Thread { - - [Description ( - "Indicates the thread\'s scheduling policy. Set to " - "\"Other\" when using OtherSchedPolicy to specifiy " - "additional values. \"Other\" represents SCHED_OTHER as " - "defined in sched.h." ), - ValueMap { "0", "1", "2", "3" }, - Values { "Unknown", "Other", "SCHED_FIFO", "SCHED_RR" }, - ModelCorrespondence { "CIM_UnixThread.OtherSchedPolicy" }] - uint16 SchedPolicy; - - [Description ( - "Indicates the thread\'s scheduling policy when " - "SchedPolicy is set to \"Other\"." ), - ModelCorrespondence { "CIM_UnixThread.SchedPolicy" }] - string OtherSchedPolicy; - - [Description ( - "Indicates the size of the guard area for a created thread\'s stack." - )] - string GuardSize; - - [Description ( "Indicates the creation state of the thread." ), - ValueMap { "0", "2", "3" }, - Values { "Unknown", "PTHREAD_CREATE_DETACHED", - "PTHREAD_CREATE_JOINABLE" }] - uint16 DetachState; - - [Description ( - "Indicates how the scheduling attributes are to be set." ), - ValueMap { "0", "2", "3" }, - Values { "Unknown", "PTHREAD_INHERIT_SCHED", - "PTHREAD_EXPLICIT_SCHED" }] - uint16 InheritSched; - - [Description ( "Indicates the contention scope of the thread." ), - ValueMap { "0", "2", "3" }, - Values { "Unknown", "PTHREAD_SCOPE_SYSTEM", - "PTHREAD_SCOPE_PROCESS" }] - uint16 ContentionScope; - - [Description ( - "Indicates the size of storage to be used for the thread\'s stack." - )] - string StackSize; - - [Description ( "Indicates the thread\'s concurrency level." )] - uint64 ConcurrencyLevel; - - [Description ( "Indicates the thread\'s cancelability state." ), - ValueMap { "0", "2", "3" }, - Values { "Unknown", "PTHREAD_CANCEL_ENABLE", - "PTHREAD_CANCEL_DISABLE" }] - uint16 CancelState; - - [Description ( "Indicates the thread\'s cancelability type." ), - ValueMap { "0", "2", "3" }, - Values { "Unknown", "PTHREAD_CANCEL_DEFERRED", - "PTHREAD_CANCEL_ASYNCHRONOUS" }] - uint16 CancelType; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_UseOfLog.mof b/build/vendor/dmtf_mof/System/CIM_UseOfLog.mof deleted file mode 100644 index fde99e99..00000000 --- a/build/vendor/dmtf_mof/System/CIM_UseOfLog.mof +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_UseOfLog -// ================================================================== - [Association, Version ( "2.9.0" ), - UMLPackagePath ( "CIM::System::Logs" ), - Description ( - "ManagedSystemElements may record their event, error or " - "informational data within Logs. The use of a Log to hold a " - "ManagedSystemElement\'s data is described by this association. " - "The type of Element data captured by the Log can be specified " - "using the RecordedData string property." )] -class CIM_UseOfLog : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "The Log." )] - CIM_Log REF Antecedent; - - [Override ( "Dependent" ), - Description ( - "The ManagedSystemElement whose information is recorded in the Log." - )] - CIM_ManagedSystemElement REF Dependent; - - [Description ( - "A free-form string describing the use of the Log by the " - "ManagedSystemElement." )] - string RecordedData; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_UseOfMessageLog.mof b/build/vendor/dmtf_mof/System/CIM_UseOfMessageLog.mof deleted file mode 100644 index 98055879..00000000 --- a/build/vendor/dmtf_mof/System/CIM_UseOfMessageLog.mof +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_UseOfMessageLog -// ================================================================== - [Association, Version ( "2.9.0" ), - UMLPackagePath ( "CIM::System::Logs" ), - Description ( - "ManagedSystemElements may record their event, error or " - "informational data within MessageLogs. The use of a Log to " - "hold a ManagedSystemElement\'s data is described by this " - "association. \n" - "UseOfMessageLog has the same semantics as UseOfLog. Users " - "SHOULD reference UseOfLog in lieu of this association." )] -class CIM_UseOfMessageLog : CIM_UseOfLog { - - [Override ( "Antecedent" ), - Description ( "The MessageLog." )] - CIM_MessageLog REF Antecedent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_VirtualComputerSystem.mof b/build/vendor/dmtf_mof/System/CIM_VirtualComputerSystem.mof deleted file mode 100644 index 519810b3..00000000 --- a/build/vendor/dmtf_mof/System/CIM_VirtualComputerSystem.mof +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_VirtualComputerSystem -// ================================================================== - [Version ( "2.6.0" ), - UMLPackagePath ( "CIM::System::SystemElements" ), - Description ( - "A class derived from ComputerSystem that represents the " - "ability to virtualize or emulate another ComputerSystem." )] -class CIM_VirtualComputerSystem : CIM_ComputerSystem { - - [Description ( - "A string describing the type of System or hardware " - "platform that is virtualized. OperatingSystem " - "information is obtained via the RunningOS inherited from " - "ComputerSystem." )] - string VirtualSystem; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_VirtualSystemSettingDataComponent.mof b/build/vendor/dmtf_mof/System/CIM_VirtualSystemSettingDataComponent.mof deleted file mode 100644 index 5487c37f..00000000 --- a/build/vendor/dmtf_mof/System/CIM_VirtualSystemSettingDataComponent.mof +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Association, Aggregation, Version ( "2.22.0" ), - UMLPackagePath ( "CIM::System::SystemElements" ), - Description ( - "The CIM_VirtualSystemSettingDataComponent association " - "establishes a \'part of\' relationship between an instance of " - "the CIM_VirtualSystemSettingData class and a set of instances " - "of the CIM_ResourceAllocationSettingData class." )] -class CIM_VirtualSystemSettingDataComponent : CIM_Component { - - [Aggregate, Override ( "GroupComponent" ), - Description ( - "Reference to an instance of the " - "CIM_VirtualSystemSettingData class that is the top-level " - "object of a virtual system configuration." )] - CIM_VirtualSystemSettingData REF GroupComponent; - - [Override ( "PartComponent" ), - Description ( - "Reference to an instance of the " - "CIM_ResourceAllocationSettingData class representing a " - "part of a virtual system configuration applicable to one " - "particular virtual resource." )] - CIM_ResourceAllocationSettingData REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/System/CIM_WakeUpService.mof b/build/vendor/dmtf_mof/System/CIM_WakeUpService.mof deleted file mode 100644 index 4761eca3..00000000 --- a/build/vendor/dmtf_mof/System/CIM_WakeUpService.mof +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_WakeUpService -// ================================================================== - [Version ( "2.8.0" ), - UMLPackagePath ( "CIM::System::Boot" ), - Description ( - "WakeUpService allows a UnitaryComputerSystem to be woken up " - "from a low power sleep state. This Service is implemented by a " - "LogicalDevice (e.g. NetworkAdapter or Modem) that is capable " - "of receiving wakeup messages, and notifying the System." )] -class CIM_WakeUpService : CIM_Service { - - [Description ( "The Type of the WakeUp Service." ), - ValueMap { "0", "1", "2", "3", "4" }, - Values { "Unknown", "Other", "Wake On LAN - Magic Packet", - "Wake on LAN - Packet Filtering", "Wake On Ring" }, - ModelCorrespondence { - "CIM_WakeUpService.OtherWakeUpTypeDescription" }] - uint16 WakeUpType; - - [Description ( - "A description of the type of WakeUpService used when " - "WakeUpType is set to \"Other\" (value=1)." ), - ModelCorrespondence { "CIM_WakeUpService.WakeUpType" }] - string OtherWakeUpTypeDescription; - - [Description ( - "The filter type on the packets/messages that trigger the " - "WakeUpService. This field is only used when the WakeUp " - "Type is set to \"Wake On LAN - Packet Filtering\" (value " - "=3)." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6", "7" }, - Values { "Unknown", "Other", "ARP Broadcast", - "Neighbor Discovery Multicast", - "IP Packet with Directed MAC Address", - "IPX Diagnostic Responder", "NBT Name Query", - "Binary Match" }, - ModelCorrespondence { - "CIM_WakeUpService.OtherFilterTypeDescription" }] - uint16 FilterType; - - [Description ( - "The binary data that is used to compare the contents of " - "the received packet. This is used when the FilterType is " - "set to \"Binary Match\" (value=7). This could also be " - "used when the FilterType is set to \"Other\" (value=1)." ), - OctetString] - uint8 FilterData[]; - - [Description ( - "The description of the format of the FilterType used by " - "the Service when the FilterType is set to \"Other\" " - "(value=1)." ), - ModelCorrespondence { "CIM_WakeUpService.FilterType" }] - string OtherFilterTypeDescription; - - -}; diff --git a/build/vendor/dmtf_mof/User/CIM_AccessControlInformation.mof b/build/vendor/dmtf_mof/User/CIM_AccessControlInformation.mof deleted file mode 100644 index c04a1e36..00000000 --- a/build/vendor/dmtf_mof/User/CIM_AccessControlInformation.mof +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AccessControlInformation -// ================================================================== - [Deprecated { "CIM_AuthorizedPrivilege", "CIM_SecuritySensitivity" }, - Version ( "2.8.0" ), - UMLPackagePath ( "CIM::User::AccessControl" ), - Description ( - "CIM_AccessControlInformation provides, through its properties " - "and its associations, the specification of the access rights " - "granted to a set of subject users to a set of target " - "resources. The AccessControlInformation class is weak to the " - "system (e.g., Computer System or Administrative Domain) for " - "which the access controls apply. \n" - "\n" - "This class is deprecated in lieu of two others: " - "AuthorizedPrivilege (defining specific access details) and " - "SecuritySensitivity (defining individual security levels). The " - "reasons for this are: 1. More specific access details are " - "defined in Privilege (the superclass of AuthorizedPrivilege); " - "and, 2. SecuritySensitivity allows security levels to be " - "applied to other elements than access control information." )] -class CIM_AccessControlInformation : CIM_LogicalElement { - - [Deprecated { "No value" }, - Key, Description ( "Hosting system creation class name." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.CreationClassName" )] - string SystemCreationClassName; - - [Deprecated { "No value" }, - Key, Description ( "Hosting system name." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.Name" )] - string SystemName; - - [Deprecated { "No value" }, - Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Deprecated { "CIM_AuthorizedPrivilege.InstanceID" }, - Key, Override ( "Name" ), - Description ( - "The Name property defines the unique label, in the " - "context of the hosting system, by which the " - "AccessControlInformation is known." ), - MaxLen ( 256 )] - string Name; - - [Deprecated { "CIM_SecuritySensitivity.SecurityLevel" }, - Description ( - "The SecurityClassification property specifies a named " - "level of security associated with the " - "AccessControlInformation, e.g., \'Confidential\', \'Top " - "Secret\', etc." )] - string SecurityClassification; - - [Deprecated { "CIM_AuthorizedPrivilege.Activities" }, - Description ( - "The AccessType property is an array of string values " - "that specifies the type of access for which the " - "corresponding permission applies. For example, it can be " - "used to specify a generic access such as \'Read-only\', " - "\'Read/Write\', etc. for file or record access control " - "or it can be used to specifiy an entry point name for " - "service access control." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_AccessControlInformation.AccessQualifier", - "CIM_AccessControlInformation.Permission" }] - string AccessType[]; - - [Deprecated { "CIM_AuthorizedPrivilege.ActivityQualifiers" }, - Description ( - "The AccessQualifier property is an array of string " - "values may be used to further qualify the type of access " - "for which the corresponding permission applies. For " - "example, it may be used to specify a set of parameters " - "that are permitted or denied in conjunction with the " - "corresponding AccessType entry point name." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_AccessControlInformation.AccessType", - "CIM_AccessControlInformation.Permission" }] - string AccessQualifier[]; - - [Deprecated { "CIM_AuthorizedPrivilege" }, - Description ( - "The Permission property is an array of string values " - "indicating the permission that applies to the " - "corresponding AccessType and AccessQualifier array " - "values. The values may be extended in subclasses to " - "provide more specific access controls. \n" - "\n" - "This property is deprecated in lieu of the general " - "AuthorizedPrivilege class. This is because the " - "Permissions, \'Access\' and \'Deny\', are addressed by " - "the PrivilegeGranted property, while \'Manage\' maps to " - "specific activities with their corresponding qualifiers " - "and formats." ), - ValueMap { "Unknown", "Allow", "Deny", "Manage" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_AccessControlInformation.AccessType", - "CIM_AccessControlInformation.AccessQualifier" }] - string Permission[]; - - -}; diff --git a/build/vendor/dmtf_mof/User/CIM_Account.mof b/build/vendor/dmtf_mof/User/CIM_Account.mof deleted file mode 100644 index bc8bf979..00000000 --- a/build/vendor/dmtf_mof/User/CIM_Account.mof +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::User::Account" ), - Description ( - "CIM_Account is the information held by a SecurityService to " - "track identity and privileges managed by that service. Common " - "examples of an Account are the entries in a UNIX /etc/passwd " - "file. Several kinds of security services use various " - "information from those entries - the /bin/login program uses " - "the account name (\'root\') and hashed password to " - "authenticate users, and the file service, for instance, uses " - "the UserID field (\'0\') and GroupID field (\'0\') to record " - "ownership and determine access control privileges on files in " - "the file system. This class is defined so as to incorporate " - "commonly-used LDAP attributes to permit implementations to " - "easily derive this information from LDAP-accessible " - "directories. \n" - "\n" - "The semantics of Account overlap with that of the class, " - "CIM_Identity. However, aspects of Account - such as its " - "specific tie to a System - are valuable and have been widely " - "implemented. For this reason, the Account and Identity classes " - "are associated using a subclass of LogicalIdentity " - "(AccountIdentity), instead of deprecating the Account class in " - "the CIM Schema. When an Account has been authenticated, the " - "corresponding Identity\'s TrustEstablished Boolean would be " - "set to TRUE. Then, the Identity class can be used as defined " - "for authorization purposes." )] -class CIM_Account : CIM_EnabledLogicalElement { - - [Key, Description ( "The scoping System\'s CCN." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.CreationClassName" )] - string SystemCreationClassName; - - [Key, Description ( "The scoping System\'s Name." ), - MaxLen ( 256 ), - Propagated ( "CIM_System.Name" )] - string SystemName; - - [Key, Description ( - "CreationClassName indicates the name of the class or the " - "subclass used in the creation of an instance. When used " - "with the other key properties of this class, this " - "property allows all instances of this class and its " - "subclasses to be uniquely identified." ), - MaxLen ( 256 )] - string CreationClassName; - - [Key, Override ( "Name" ), - Description ( - "The Name property defines the label by which the object " - "is known. The value of this property may be set to be " - "the same as that of the UserID property or, in the case " - "of an LDAP-derived instance, the Name property value may " - "be set to the distinguishedName of the LDAP-accessed " - "object instance." ), - MaxLen ( 1024 )] - string Name; - - [Description ( - "UserID is the value used by the SecurityService to " - "represent identity. For an authentication service, the " - "UserID may be the name of the user, or for an " - "authorization service the value which serves as a handle " - "to a mapping of the identity." ), - MaxLen ( 256 )] - string UserID; - - [Description ( - "In the case of an LDAP-derived instance, the ObjectClass " - "property value(s) may be set to the objectClass " - "attribute values." )] - string ObjectClass[]; - - [Description ( - "The Descriptions property values may contain " - "human-readable descriptions of the object. In the case " - "of an LDAP-derived instance, the description attribute " - "may have multiple values that, therefore, cannot be " - "placed in the inherited Description property." ), - MaxLen ( 1024 )] - string Descriptions[]; - - [Description ( - "Based on RFC1274, the host name of the system(s) for " - "which the account applies. The host name may be a " - "fully-qualified DNS name or it may be an unqualified " - "host name." )] - string Host[]; - - [Description ( - "This property contains the name of a locality, such as a " - "city, county or other geographic region." )] - string LocalityName[]; - - [Required, Description ( - "The name of the organization related to the account." )] - string OrganizationName[]; - - [Description ( - "The name of an organizational unit related to the account." - )] - string OU[]; - - [Description ( - "In the case of an LDAP-derived instance, the SeeAlso " - "property specifies distinguished name of other Directory " - "objects which may be other aspects (in some sense) of " - "the same real world object." )] - string SeeAlso[]; - - [Description ( - "Based on inetOrgPerson and for directory compatibility, " - "the UserCertificate property may be used to specify a " - "public key certificate for the person." ), - OctetString] - string UserCertificate[]; - - [Description ( - "In the case of an LDAP-derived instance, the " - "UserPassword property may contain an encrypted password " - "used to access the person\'s resources in a directory." ), - OctetString] - string UserPassword[]; - - [Description ( - "The encryption algorithm (if any) used by the client to " - "produce the value in the UserPassword property when " - "creating or modifying an instance of CIM_Account. The " - "original password is encrypted using the algorithm " - "specified in this property, and UserPassword contains " - "the resulting encrypted value. In response to an " - "operation request that would return the value of the " - "UserPassword property to a client, an implementation " - "shall instead return an array of length zero.\n" - "The value of UserPasswordEncryptionAlgorithm in an " - "instance of CIM_Account shall be 0 (\"None\") unless the " - "SupportedUserPasswordEncryptionAlgorithms[] property in " - "the CIM_AccountManagementCapabilities instance " - "associated with the CIM_AccountManagementService " - "instance associated with the CIM_Account instance " - "contains a non-null entry other than 0 (\"None\").\n" - "This property does not prevent the use of encryption at " - "the transport, network, or data-link layer to protect " - "communications between a management client and the " - "server, nor is it meant to encourage communications " - "without such encryption.\n" - "The supported values for this property are:\n" - "- 0 (\"None\"): Indicates that the contents of " - "UserPassword are not encrypted.\n" - "- 1 (\"Other\"): Indicates that the contents of " - "UserPassword are encrypted using an algorithm not " - "specifically identified in the value map for this " - "property, and that this algorithm is described in OtherUserPasswordEncryptionAlgorithm.\n" - "- 2 (\"HTTP Digest MD5(A1)\"): The MD5 hash algorithm, " - "applied to the string A1 defined in RFC2617 as the " - "concatenation username-value \":\" realm-value \":\" " - "passwd, where username-value is provided by the client " - "as the value of the UserID property. passwd is the " - "underlying user password. realm-value is the HTTP digest " - "realm value, and is provided by the server. The " - "semantics of the HTTP digest realm are specified in RFC " - "2617. The server may surface the realm-value in the " - "UserPasswordEncryptionSalt property of " - "CIM_AccountManagementCapabilities." ), - ValueMap { "0", "1", "2", ".." }, - Values { "None", "Other", "HTTP Digest MD5(A1)", - "DMTF Reserved" }, - ModelCorrespondence { "CIM_Account.UserPassword", - "CIM_Account.OtherUserPasswordEncryptionAlgorithm", - "CIM_AccountManagementCapabilities.SupportedUserPasswordEncryptionAlgorithms", - "CIM_AccountManagementCapabilities.UserPasswordEncryptionSalt" }] - uint16 UserPasswordEncryptionAlgorithm; - - [Description ( - "If the UserPasswordEncryptionAlgorithm property is set " - "to 1 (\"Other\") this property contains a free form " - "string that provides more information about the " - "encryption algorithm. If UserPasswordEncryptionAlgorithm " - "is not set to 1 (\"Other\") this property has no " - "meaning." ), - ModelCorrespondence { - "CIM_Account.UserPasswordEncryptionAlgorithm" }] - string OtherUserPasswordEncryptionAlgorithm; - - [Description ( - "ComplexPasswordRulesEnforced indicates the rules for " - "constructing a complex password enforced by the Account.\n" - "Minimum Length a minimum length is enforced for " - "passwords for the account.\n" - "Preclude User ID inclusion precluding the password from " - "including the user ID is supported. \n" - "Maximum Repeating Characters a limit will be enforced on " - "the number of times a character can occur consecutively. \n" - "Lower Case Alpha at least one lower case alpha character " - "is required. \n" - "Upper Case Alpha at least one upper case alpha character " - "is required. \n" - "Numeric Character at least one numeric character is " - "required. \n" - "Special Character at least one special character is " - "required." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "..", - "0x8000..0xFFFF" }, - Values { "Minimum Length", "Preclude User ID Inclusion", - "Maximum Repeating Characters", "Lower Case Alpha", - "Upper Case Alpha", "Numeric Character", - "Special Character", "DMTF Reserved", "Vendor Reserved" }] - uint16 ComplexPasswordRulesEnforced[]; - - [Description ( - "InactivityTimeout specifies the interval after which if " - "an account has been inactive, it shall be Disabled. The " - "value may be expressed in interval format, as an " - "absolute date-time, or be NULL.\n" - "An absolute date-time shall indicate when the password " - "will be disabled due to inactivity.\n" - "An interval value shall indicate the time remaining " - "before the password is disabled due to inactivity.\n" - "A value of NULL shall indicate that the Account will not " - "be disabled due to inactivity." )] - datetime InactivityTimeout; - - [Description ( - "LastLogin shall be an absolute date-time that specifies " - "the last successful authentication that occurred for " - "this Account.A value of 99990101000000.000000+000 shall " - "indicate the Account has never been used. A value of " - "NULL shall indicate the last successful login is " - "unknown." )] - datetime LastLogin; - - [Description ( - "MaximumSuccessiveLoginFailures indicates the number of " - "successive failed login attempts that shall result in " - "the Account being disabled. A value of zero shall " - "indicate that the Account will not be disabled due to " - "successive failed login attempts." )] - uint16 MaximumSuccessiveLoginFailures; - - [Description ( - "PasswordExpiration indicates the maximum password age " - "enforced for the Account. The value may be expressed as " - "an absolute date-time as an interval, or may be NULL.\n" - "An absolute date-time shall indicate the date and time " - "when the password will expire.\n" - "An interval value shall indicate the time remaining " - "until the password expires.\n" - "A value of NULL shall indicate the password never " - "expires." )] - datetime PasswordExpiration; - - [Description ( - "PasswordHistoryDepth indicates the number of previous " - "passwords that shall be maintained for the Account. The " - "Account shall preclude the selection of a password if it " - "occurs in the password history. A value of zero shall " - "indicate that a password history is not maintained." )] - uint16 PasswordHistoryDepth; - - -}; diff --git a/build/vendor/dmtf_mof/User/CIM_AccountIdentity.mof b/build/vendor/dmtf_mof/User/CIM_AccountIdentity.mof deleted file mode 100644 index 1c700343..00000000 --- a/build/vendor/dmtf_mof/User/CIM_AccountIdentity.mof +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AccountIdentity -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::User::Account" ), - Description ( - "CIM_AccountIdentity relates a system Account with the Identity " - "that is established. Since Account also carries Identity " - "semantics, the LogicalIdentity association is defined as the " - "superclass of this association." )] -class CIM_AccountIdentity : CIM_LogicalIdentity { - - [Override ( "SystemElement" ), - Description ( "The Account that establishes Identity." )] - CIM_Account REF SystemElement; - - [Override ( "SameElement" ), - Description ( "The Identity established by the Account." )] - CIM_Identity REF SameElement; - - -}; diff --git a/build/vendor/dmtf_mof/User/CIM_AccountManagementCapabilities.mof b/build/vendor/dmtf_mof/User/CIM_AccountManagementCapabilities.mof deleted file mode 100644 index 3a456278..00000000 --- a/build/vendor/dmtf_mof/User/CIM_AccountManagementCapabilities.mof +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.23.0" ), - UMLPackagePath ( "CIM::User::Account" ), - Description ( - "AccountManagementCapabilities describes the capabilities " - "supported for managing Accounts associated with an instance of " - "AccountManagementService. AccountManagementCapabilities is " - "associated with an instance of AccountManagementService " - "through the ElementCapabilities association." )] -class CIM_AccountManagementCapabilities : CIM_EnabledLogicalElementCapabilities { - - [Description ( - "OperationsSupported describes the type of operations " - "that are supported for an Account associated with the AccountManagementService.\n" - "\"Create\" indicates the AccountManagementService may be " - "used to create new accounts.\n" - "\"Modify\" indicates that the associated Accounts may be modified.\n" - "\"Delete\" indicates that associated Accounts may be " - "deleted." ), - ValueMap { "2", "3", "4", "..", "0x8000..0xFFFF" }, - Values { "Create", "Modify", "Delete", "DMTF Reserved", - "Vendor Reserved" }] - uint16 OperationsSupported[]; - - [Description ( - "Additional implementation-specific algorithms that a " - "client may use to encrypt a value in the UserPassword " - "property when creating or modifying an instance of " - "CIM_Account. If this property is non-NULL, a client may " - "select an algorithm in it by setting " - "CIM_Account.UserPasswordEncryptionAlgorithm to 1 " - "(\"Other\") and setting " - "CIM_Account.OtherUserPasswordEncryptionAlgorithm to the " - "value of the selected algorithm string." ), - ModelCorrespondence { - "CIM_Account.OtherUserPasswordEncryptionAlgorithm", - "CIM_AccountManagementCapabilities.SupportedUserPasswordEncryptionAlgorithms" }] - string OtherSupportedUserPasswordEncryptionAlgorithms[]; - - [Description ( - "This property enumerates encryption algorithms that a " - "client may use to encrypt a value in the UserPassword " - "property when creating or modifying an instance of " - "CIM_Account. This capability is aimed at ensuring some " - "measure of confidentiality when the password is " - "transferred over an unencrypted transport protocol. An " - "implementation may elect to accept only encrypted " - "passwords, without regard to whether the transport " - "protocol is encrypted. Similarly, a a client may elect " - "to always provide encrypted passwords to implementations " - "that accept either unencrypted or encrypted passwords, " - "even if the underlying transport protocol is encrypted.\n" - "See CIM_Account property UserPasswordEncryptionAlgorithm " - "for a description of each enum value." ), - ValueMap { "0", "1", "2", ".." }, - Values { "None", "Other", "HTTP Digest MD5(A1)", - "DMTF Reserved" }, - ModelCorrespondence { - "CIM_Account.UserPasswordEncryptionAlgorithm", - "CIM_AccountManagementCapabilities.OtherSupportedUserPasswordEncryptionAlgorithms" }] - uint16 SupportedUserPasswordEncryptionAlgorithms[]; - - [Description ( - "A value unique to the specific WBEM server that may be " - "used in the selected UserPassword encryption algorithm " - "to ensure a value that is unique among all WBEM servers " - "even if a user uses the same password on multiple WBEM " - "servers." ), - ModelCorrespondence { - "CIM_Account.UserPasswordEncryptionAlgorithm" }] - string UserPasswordEncryptionSalt; - - [Description ( - "MaximumAccountsSupported shall indicate the maximum " - "number of accounts that may be managed by the associated " - "instance of CIM_AccountManagementService. Note that if " - "multiple instances of CIM_AccountManagementService " - "manage the accounts of a system, the total maximum " - "number of accounts supported on the system is the sum of " - "MaximumAccountsSupported for all of the instances of " - "CIM_AccountManagementService. A value of zero shall " - "indicate that the maximum number of accounts is unknown " - "or that a maximum number of accounts is not enforced." )] - uint16 MaximumAccountsSupported; - - -}; diff --git a/build/vendor/dmtf_mof/User/CIM_AccountManagementService.mof b/build/vendor/dmtf_mof/User/CIM_AccountManagementService.mof deleted file mode 100644 index 8751ba1c..00000000 --- a/build/vendor/dmtf_mof/User/CIM_AccountManagementService.mof +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Version ( "2.19.0" ), - UMLPackagePath ( "CIM::User::Account" ), - Description ( - "CIM_AccountManagementService creates, manages, and if " - "necessary destroys Accounts on behalf of other " - "SecuritySerices." )] -class CIM_AccountManagementService : CIM_SecurityService { - - - [Description ( - "CreateAccount creates an Account on the specified " - "ComputerSystem. Upon successful completion of the " - "method, there shall be a newly created instance of " - "CIM_Account associated through the CIM_AccountOnSystem " - "association with the instance of ComputerSystem " - "identified by the System parameter such that each " - "property of the CIM_Account instance has the value of " - "the corresponding property of the template instance " - "specified by the AccountTemplate parameter and the " - "CIM_Account instance is associated with this instance of " - "CIM_AccountManagementService through the " - "CIM_ServiceAffectsElement association.\n" - "Instances of CIM_Identity may be created by the method " - "and associated with the instance of CIM_Account through " - "CIM_AssignedIdentity. If one or more instances of " - "CIM_Identity are created, a reference to each shall be " - "returned in the Identities parameter, otherwise the " - "Identities parameter shall be NULL upon method " - "completion." ), - ValueMap { "0", "1", "2", "..", "32768..65535" }, - Values { "Completed with No Error", "Not Supported", - "Failed", "Method Reserved", "Vendor Specific" }] - uint32 CreateAccount( - [Required, IN, Description ( - "The scoping ComputerSystem in which to create the Account." - )] - CIM_ComputerSystem REF System, - [Required, IN, Description ( - "AccountTemplate is a template for the desired " - "Account to be created." ), - EmbeddedInstance ( "CIM_Account" )] - string AccountTemplate, - [IN ( false ), OUT, Description ( - "Reference to the instance of CIM_Account created " - "when the method returns a value of 0." )] - CIM_Account REF Account, - [IN ( false ), OUT, Description ( - "Reference to the instances of CIM_Identity created " - "when the method returns a value of 0. NULL if no " - "such instances are created." )] - CIM_Identity REF Identities[]); - -}; diff --git a/build/vendor/dmtf_mof/User/CIM_AccountMapsToAccount.mof b/build/vendor/dmtf_mof/User/CIM_AccountMapsToAccount.mof deleted file mode 100644 index 52c5dc56..00000000 --- a/build/vendor/dmtf_mof/User/CIM_AccountMapsToAccount.mof +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AccountMapsToAccount -// ================================================================== - [Association, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::User::Account" ), - Description ( - "This relationship may be used to associate an Account used by " - "an AuthenticationService to an Account used for Authorization. " - "For instance, this mapping occurs naturally in the UNIX " - "/etc/passwd file, where the AuthenticationService Account " - "(\'root\') is mapped to the AuthorizationService Account " - "(\'0\'). The two are separate accounts, as evidenced by the " - "ability to have another AuthenticationService Account which " - "ALSO maps to the AuthorizationService Account (\'0\') without " - "ambiguity. This association may be used for other account " - "mappings as well such as for coordinating single signon for " - "multiple accounts for the same user." )] -class CIM_AccountMapsToAccount : CIM_Dependency { - - [Override ( "Antecedent" ), - Description ( "An Account." )] - CIM_Account REF Antecedent; - - [Override ( "Dependent" ), - Description ( "A related Account." )] - CIM_Account REF Dependent; - - -}; diff --git a/build/vendor/dmtf_mof/User/CIM_AccountOnSystem.mof b/build/vendor/dmtf_mof/User/CIM_AccountOnSystem.mof deleted file mode 100644 index 784f3efe..00000000 --- a/build/vendor/dmtf_mof/User/CIM_AccountOnSystem.mof +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AccountOnSystem -// ================================================================== - [Association, Aggregation, Version ( "2.6.0" ), - UMLPackagePath ( "CIM::User::Account" ), - Description ( - "A system (e.g., ApplicationSystem, ComputerSystem, " - "AdminDomain) aggregates Accounts and scopes the uniqueness of " - "the Account names (i.e., userids)." )] -class CIM_AccountOnSystem : CIM_SystemComponent { - - [Aggregate, Override ( "GroupComponent" ), - Min ( 1 ), - Max ( 1 ), - Description ( - "The aggregating system also provides name scoping for the Account." - )] - CIM_System REF GroupComponent; - - [Override ( "PartComponent" ), - Weak, Description ( "The subordinate Account." )] - CIM_Account REF PartComponent; - - -}; diff --git a/build/vendor/dmtf_mof/User/CIM_AccountSettingData.mof b/build/vendor/dmtf_mof/User/CIM_AccountSettingData.mof deleted file mode 100644 index c070960c..00000000 --- a/build/vendor/dmtf_mof/User/CIM_AccountSettingData.mof +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2009 DMTF. All rights reserved. - [Version ( "2.22.0" ), - UMLPackagePath ( "CIM::User::Account" ), - Description ( - "CIM_AccountSettingData provides the ability to manage the " - "desired configuration for an instance of CIM_Account. When " - "associated with an instance of CIM_AccountManagementService, " - "this class may be used to constrain the properties of " - "instances of CIM_Accountcreated using the service. When " - "associated with an instance of CIM_Account, this class may be " - "used to manage the configuration of the CIM_Acount instance." )] -class CIM_AccountSettingData : CIM_SettingData { - - [Description ( - "ComplexPasswordRulesEnforced indicates the rules for " - "constructing a complex password enforced by the Account.\n" - "Minimum Length a minimum length is enforced for " - "passwords for the account.\n" - "Preclude User ID inclusion precluding the password from " - "including the user ID is supported. \n" - "Maximum Repeating Characters a limit will be enforced on " - "the number of times a character can occur consecutively. \n" - "Lower Case Alpha at least one lower case alpha character " - "is required. \n" - "Upper Case Alpha at least one upper case alpha character " - "is required. \n" - "Numeric Character at least one numeric character is " - "required. \n" - "Special Character at least one special character is " - "required." ), - ValueMap { "2", "3", "4", "5", "6", "7", "8", "..", - "0x8000..0xFFFF" }, - Values { "Minimum Length", "Preclude User ID Inclusion", - "Maximum Repeating Characters", "Lower Case Alpha", - "Upper Case Alpha", "Numeric Character", - "Special Character", "DMTF Reserved", "Vendor Reserved" }] - uint16 ComplexPasswordRulesEnforced[]; - - [Description ( - "InactivityTimeout specifies the interval after which if " - "an account has been inactive, it shall be Disabled. The " - "value shall be expressed in interval format or shall be " - "NULL. A value of NULL shall indicate that the Account " - "will not be disabled due to inactivity." )] - datetime InactivityTimeout; - - [Description ( - "MaximumPasswordExpiration indicates the maximum password " - "age enforced for the Account. The value shall be " - "expressed in interval format or shall be NULL. A value " - "of NULL shall indicate that the password aging is not " - "enforced." )] - datetime MaximumPasswordExpiration; - - [Description ( - "MaximumSuccessiveLoginFailures indicates the number of " - "successive failed login attempts that shall result in " - "the Account being disabled. A value of zero shall " - "indicate that the Account will not be disabled due to " - "successive failed login attempts." )] - uint16 MaximumSuccessiveLoginFailures; - - [Description ( - "PasswordHistoryDepth indicates the number of previous " - "passwords that shall be maintained for the Account. The " - "Account shall preclude the selection of a password if it " - "occurs in the password history. A value of zero shall " - "indicate that a password history is not maintained." )] - uint16 PasswordHistoryDepth; - - -}; diff --git a/build/vendor/dmtf_mof/User/CIM_AssignedIdentity.mof b/build/vendor/dmtf_mof/User/CIM_AssignedIdentity.mof deleted file mode 100644 index bbbfbbb0..00000000 --- a/build/vendor/dmtf_mof/User/CIM_AssignedIdentity.mof +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_AssignedIdentity -// ================================================================== - [Association, Version ( "2.8.0" ), - UMLPackagePath ( "CIM::User::Identity" ), - Description ( - "This relationship associates an Identity to a specific " - "ManagedElement, whose trust is represented." )] -class CIM_AssignedIdentity { - - [Key, Description ( - "An Identity of the referenced ManagedElement." )] - CIM_Identity REF IdentityInfo; - - [Key, Max ( 1 ), - Description ( - "The ManagedElement assigned to a specific Identity." )] - CIM_ManagedElement REF ManagedElement; - - -}; diff --git a/build/vendor/dmtf_mof/User/CIM_AssociatedPrivilege.mof b/build/vendor/dmtf_mof/User/CIM_AssociatedPrivilege.mof deleted file mode 100644 index db755f6e..00000000 --- a/build/vendor/dmtf_mof/User/CIM_AssociatedPrivilege.mof +++ /dev/null @@ -1,255 +0,0 @@ -// Copyright (c) 2008 DMTF. All rights reserved. - [Association, Version ( "2.22.0" ), - UMLPackagePath ( "CIM::User::Privilege" ), - Description ( - "CIM_AssociatedPrivilege is an association that models the " - "privileges that a Subject element has to access or authorize " - "other elements to access a Target element." )] -class CIM_AssociatedPrivilege { - - [Key, Description ( - "The Subject for which privileges are granted or denied." )] - CIM_ManagedElement REF Subject; - - [Key, Description ( - "The target element to which the privileges apply." )] - CIM_ManagedElement REF Target; - - [Key, Description ( - "UseKey is used to distinguish instances in case multiple " - "instances of this association exist between the same " - "Subject and Target. This may arise, for example, if " - "separate instances are created for each management " - "domain, or if the Subject has access and authorization " - "rights to the Target.\n" - "Within the scope of the instantiating Namespace, UseKey " - "opaquely and uniquely identifies an instance of this " - "class. In order to ensure uniqueness within the " - "NameSpace, the value of UseKey should be constructed " - "using the following \'preferred\' algorithm: \n" - ": \n" - "Where and are separated by a colon " - "\':\', and where shall include a copyrighted, " - "trademarked or otherwise unique name that is owned by " - "the business entity creating/defining the UseKey, or is " - "a registered ID that is assigned to the business entity " - "by a recognized global authority. (This is similar to " - "the _ structure of Schema class " - "names.) In addition, to ensure uniqueness shall " - "not contain a colon (\':\'). When using this algorithm, " - "the first colon to appear in UseKey shall appear between " - " and . \n" - " is chosen by the business entity and should " - "not be re-used to identify different underlying " - "(real-world) elements. If the above \'preferred\' " - "algorithm is not used, the defining entity shall assure " - "that the resultant UseKey is not re-used across any " - "UseKeys produced by this or other providers for this " - "instance\'s NameSpace. \n" - "For DMTF defined instances, the \'preferred\' algorithm " - "shall be used with the set to \'CIM\'." )] - string UseKey; - - [Description ( - "Boolean indicating whether the Privilege is granted " - "(TRUE) or denied (FALSE). The default is to grant " - "permission." )] - boolean PrivilegeGranted = true; - - [Description ( - "An enumeration indicating the activities that are " - "granted or denied. These activities apply to all " - "entities specified in the ActivityQualifiers array.\n" - "\"Other\" (1): indicates an activity that is not " - "specified in this enumeration.\n" - "\"Create\" (2), \"Delete\" (3), \"Detect\" (4), \"Read\" " - "(5), \"Write\" (6), \"Execute\" (7): each of these " - "values indicates that the Subject is permitted to use an " - "operation supported by the Target. They are all " - "straightforward except for one, 4=\"Detect\". This value " - "indicates that the existence or presence of an entity " - "may be determined, but not necessarily specific data " - "(which requires the Read privilege to be true). This " - "activity is exemplified by \'hidden files\'- if you list " - "the contents of a directory, you will not see hidden " - "files. However, if you know a specific file name, or " - "know how to expose hidden files, then they can be " - "\'detected\'. Another example is the ability to define " - "search privileges in directory implementations.\n" - "\"Deny Create\" (8), \"Deny Delete\" (9), \"Deny Detect\" " - "(10), \"Deny Read\" (11), \"Deny Write\" (12), \"Deny " - "Execute\" (13): each of these values indicates that the " - "Subject is expressly denied permission to use an " - "operation supported by the Target.\n" - "Authorize to Grant/Deny Authorization (14): this value " - "indicates that the Subject is permitted to add any of " - "the following values to - or remove any of the following " - "values from - the Activities array property in any other " - "instance of CIM_AssociatedPrivilege that references the " - "same Target: \"Authorize to Create\" (15), \"Authorize " - "to Delete\" (16), \"Authorize to Detect\" (17), " - "\"Authorize to Read\" (18), \"Authorize to Write\" (19), " - "\"Authorize to Execute\" (20), \"Authorize to Deny " - "Create\" (21), \"Authorize to Deny Delete\" (22), " - "\"Authorize to Deny Detect\" (23), \"Authorize to Deny " - "Read\" (24), \"Authorize to Deny Write\" (25), and " - "\"Authorize to Deny Execute\" (26).\n" - "\"Authorize to Create\" (15), \"Authorize to Delete\" " - "(16), \"Authorize to Detect\" (17), \"Authorize to Read\" " - "(18), \"Authorize to Write\" (19), \"Authorize to " - "Execute\" (20), \"Authorize to Deny Create\" (21), " - "\"Authorize to Deny Delete\" (22), \"Authorize to Deny " - "Detect\" (23), \"Authorize to Deny Read\" (24), " - "\"Authorize to Deny Write\" (25), and \"Authorize to " - "Deny Execute\" (26): each of these values indicates that " - "the Subject is permitted to add value named in the " - "string to - or remove the value from - the Activities " - "array property in any other instance of " - "CIM_AssociatedPrivilege that references the same Target. " - "For example, \"Authorize to Read\" indicates that the " - "Subject is permitted to add or remove the value \"Read\", " - "and \"Authorize to Deny Read\" indicates that the " - "Subject is permitted to add or remove the value \"Deny " - "Read\"." ), - ValueMap { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12", "13", "14", "15", "16", "17", "18", "19", - "20", "21", "22", "23", "24", "25", "26", "..", "16000.." }, - Values { "Other", "Create", "Delete", "Detect", "Read", - "Write", "Execute", "Deny Create", "Deny Delete", - "Deny Detect", "Deny Read", "Deny Write", "Deny Execute", - "Authorize to Grant/Deny Authorization", - "Authorize to Create", "Authorize to Delete", - "Authorize to Detect", "Authorize to Read", - "Authorize to Write", "Authorize to Execute", - "Authorize to Deny Create", "Authorize to Deny Delete", - "Authorize to Deny Detect", "Authorize to Deny Read", - "Authorize to Deny Write", "Authorize to Deny Execute", - "DMTF Reserved", "Vendor Reserved" }, - ArrayType ( "Indexed" ), - ModelCorrespondence { - "CIM_AssociatedPrivilege.ActivityQualifiers" }] - uint16 Activities[]; - - [Description ( - "The ActivityQualifiers property is an array of string " - "values used to further qualify and specify the " - "privileges granted or denied. For example, it is used to " - "specify a set of files for which \'Read\'/\'Write\' " - "access is permitted or denied. Or, it defines a class\' " - "methods that may be \'Executed\'. Details on the " - "semantics of the individual entries in " - "ActivityQualifiers are provided by corresponding entries " - "in the QualifierFormats array." ), - ArrayType ( "Indexed" ), - ModelCorrespondence { "CIM_AssociatedPrivilege.Activities", - "CIM_AssociatedPrivilege.QualifierFormats" }] - string ActivityQualifiers[]; - - [Description ( - "Defines the semantics of corresponding entries in the " - "ActivityQualifiers array. An example of each of these " - "\'formats\' and their use follows: \n" - "- 2=Class Name. Example: If the authorization target is " - "a CIM Service or a Namespace, then the " - "ActivityQualifiers entries can define a list of classes " - "that the authorized subject is able to create or delete. \n" - "- 3=Property. Example: If the authorization " - "target is a CIM Service, Namespace or Collection of " - "instances, then the ActivityQualifiers entries can " - "define the class properties that may or may not be " - "accessed. In this case, the class names are specified " - "with the property names to avoid ambiguity - since a CIM " - "Service, Namespace or Collection could manage multiple " - "classes. On the other hand, if the authorization target " - "is an individual instance, then there is no possible " - "ambiguity and the class name may be omitted. To specify " - "ALL properties, the wildcard string \"*\" should be " - "used. \n" - "- 4=Method. This example is very similar to the " - "Property one, above. And, as above, the string \"*\" may " - "be specified to select ALL methods. \n" - "- 5=Object Reference. Example: If the authorization " - "target is a CIM Service or Namespace, then the " - "ActivityQualifiers entries can define a list of object " - "references (as strings) that the authorized subject can " - "access. \n" - "- 6=Namespace. Example: If the authorization target is a " - "CIM Service, then the ActivityQualifiers entries can " - "define a list of Namespaces that the authorized subject " - "is able to access. \n" - "- 7=URL. Example: An authorization target may not be " - "defined, but a Privilege could be used to deny access to " - "specific URLs by individual Identities or for specific " - "Roles, such as the \'under 17\' Role. \n" - "- 8=Directory/File Name. Example: If the authorization " - "target is a FileSystem, then the ActivityQualifiers " - "entries can define a list of directories and files whose " - "access is protected. \n" - "- 9=Command Line Instruction. Example: If the " - "authorization target is a ComputerSystem or Service, " - "then the ActivityQualifiers entries can define a list of " - "command line instructions that may or may not be " - "\'Executed\' by the authorized subjects. \n" - "- 10=SCSI Command, using a format of \'CDB=xx[,Page=pp]\'. " - "For example, the ability to select the VPD page of the " - "Inquiry command is encoded as \'CDB=12,Page=83\' in the " - "corresponding ActivityQualifiers entry. A \'*\' may be " - "used to indicate all CDBs or Page numbers. \n" - "- 11=Packets. Example: The transmission of packets is " - "permitted or denied by the Privilege for the target (a " - "ComputerSystem, ProtocolEndpoint, Pipe, or other ManagedSystemElement).\n" - "- 12=Specification-defined. The semantics are defined in " - "a a specification produced by the DMTF or other " - "organization. The value of the corresponding " - "ActivityQualifiers entry names the specification and the " - "organization that produced it, and includes a label that " - "unambiguously references the semantic definition within " - "the specification. The value of of the corresponding " - "ActivityQualifiers entry should be constructed using the " - "following \"preferred\" algorithm: \n" - "::